(attrName: string, childName: string)
| 64 | // Style parts enabled only when tblPr has attribute "1" (or true); per spec default is off. |
| 65 | // pptxjs uses attrs only (firstCol === "1"); we also accept child elements for compatibility. |
| 66 | const flag = (attrName: string, childName: string): boolean => { |
| 67 | if (!tblPr) return false |
| 68 | const attr = tblPr.attr(attrName) |
| 69 | if (attr !== undefined) return attr === '1' || attr === 'true' |
| 70 | const ch = tblPr.child(childName) |
| 71 | if (ch.exists()) { |
| 72 | const val = ch.attr('val') |
| 73 | return val !== '0' && val !== 'false' |
| 74 | } |
| 75 | return false |
| 76 | } |
| 77 | const bandRow = |
| 78 | tblPr?.attr('bandRow') === '1' || |
| 79 | tblPr?.attr('bandRow') === 'true' || |
no test coverage detected