ooxml-core 1.33.0 → 1.34.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/PptxHandler-5UDSMCBG.cjs +14 -0
- package/dist/PptxHandler-TTRTAQAR.mjs +5 -0
- package/dist/{PptxHandler-Q7CFNKOU.mjs → PptxHandler-XCYX5DVX.mjs} +2 -2
- package/dist/{PresentationBuilder-VP2637RH.cjs → PresentationBuilder-HA56ZY23.cjs} +6 -5
- package/dist/{PresentationBuilder-SADKXDWC.mjs → PresentationBuilder-IVLUEB4K.mjs} +2 -2
- package/dist/{PresentationBuilder-PJMQRZI6.mjs → PresentationBuilder-JBTNOIL7.mjs} +3 -2
- package/dist/automation/index.cjs +45489 -42876
- package/dist/automation/index.mjs +45489 -42876
- package/dist/{chunk-2LTIDUXH.cjs → chunk-A27O7M5X.cjs} +147 -133
- package/dist/{chunk-Y2RH4QWG.mjs → chunk-EGBNPVBA.mjs} +1542 -721
- package/dist/{chunk-QRXMYOVN.mjs → chunk-GNGL4BO7.mjs} +66 -44
- package/dist/chunk-LSO5SSFX.mjs +112 -0
- package/dist/chunk-MB3TYNMV.mjs +28 -0
- package/dist/{chunk-EBBWRRSB.mjs → chunk-MK2IBZU6.mjs} +1 -1
- package/dist/{chunk-BDZR4DZ6.cjs → chunk-PA5ADSTX.cjs} +1329 -1306
- package/dist/{chunk-BQGLWC6N.mjs → chunk-RI56PFGL.mjs} +67 -44
- package/dist/{chunk-3LMHYL4W.mjs → chunk-RPJHMPEL.mjs} +1 -1
- package/dist/{chunk-JQVOUS6B.mjs → chunk-TJXK4D4U.mjs} +4 -4
- package/dist/{chunk-6LJW76BZ.mjs → chunk-UQMAPY6D.mjs} +147 -128
- package/dist/chunk-XF6ZRA2D.cjs +120 -0
- package/dist/crypto/index.cjs +23 -15
- package/dist/crypto/index.mjs +23 -15
- package/dist/docx/block-parser.d.ts.map +1 -1
- package/dist/docx/embedded.cjs +519 -161
- package/dist/docx/embedded.mjs +519 -161
- package/dist/docx/find-pattern.d.ts +33 -0
- package/dist/docx/find-pattern.d.ts.map +1 -0
- package/dist/docx/find-replacement.d.ts +16 -0
- package/dist/docx/find-replacement.d.ts.map +1 -0
- package/dist/docx/find-syntax.d.ts +13 -0
- package/dist/docx/find-syntax.d.ts.map +1 -0
- package/dist/docx/find-wildcards.d.ts +8 -0
- package/dist/docx/find-wildcards.d.ts.map +1 -0
- package/dist/docx/form-field-model.d.ts +39 -0
- package/dist/docx/form-field-model.d.ts.map +1 -1
- package/dist/docx/index.cjs +3157 -994
- package/dist/docx/index.d.ts +3 -1
- package/dist/docx/index.d.ts.map +1 -1
- package/dist/docx/index.mjs +3153 -995
- package/dist/docx/layout/adapter.d.ts.map +1 -1
- package/dist/docx/layout/index.cjs +30 -8
- package/dist/docx/layout/index.mjs +30 -8
- package/dist/docx/layout/input.d.ts +2 -0
- package/dist/docx/layout/input.d.ts.map +1 -1
- package/dist/docx/load/index.cjs +6706 -1322
- package/dist/docx/load/index.mjs +6706 -1322
- package/dist/docx/load/legacy-doc/binary-save.d.ts +4 -0
- package/dist/docx/load/legacy-doc/binary-save.d.ts.map +1 -0
- package/dist/docx/load/legacy-doc/blocks.d.ts +19 -0
- package/dist/docx/load/legacy-doc/blocks.d.ts.map +1 -0
- package/dist/docx/load/legacy-doc/borders.d.ts +7 -0
- package/dist/docx/load/legacy-doc/borders.d.ts.map +1 -0
- package/dist/docx/load/legacy-doc/context.d.ts +65 -0
- package/dist/docx/load/legacy-doc/context.d.ts.map +1 -0
- package/dist/docx/load/legacy-doc/drawing.d.ts +15 -0
- package/dist/docx/load/legacy-doc/drawing.d.ts.map +1 -0
- package/dist/docx/load/legacy-doc/error.d.ts +5 -0
- package/dist/docx/load/legacy-doc/error.d.ts.map +1 -0
- package/dist/docx/load/legacy-doc/inline.d.ts +7 -0
- package/dist/docx/load/legacy-doc/inline.d.ts.map +1 -0
- package/dist/docx/load/legacy-doc/numbering-part.d.ts +3 -0
- package/dist/docx/load/legacy-doc/numbering-part.d.ts.map +1 -0
- package/dist/docx/load/legacy-doc/package.d.ts +8 -0
- package/dist/docx/load/legacy-doc/package.d.ts.map +1 -0
- package/dist/docx/load/legacy-doc/para-props.d.ts +6 -0
- package/dist/docx/load/legacy-doc/para-props.d.ts.map +1 -0
- package/dist/docx/load/legacy-doc/run-props.d.ts +8 -0
- package/dist/docx/load/legacy-doc/run-props.d.ts.map +1 -0
- package/dist/docx/load/legacy-doc/sections.d.ts +23 -0
- package/dist/docx/load/legacy-doc/sections.d.ts.map +1 -0
- package/dist/docx/load/legacy-doc/styles-part.d.ts +3 -0
- package/dist/docx/load/legacy-doc/styles-part.d.ts.map +1 -0
- package/dist/docx/load/legacy-doc/table.d.ts +6 -0
- package/dist/docx/load/legacy-doc/table.d.ts.map +1 -0
- package/dist/docx/load/legacy-doc/xml.d.ts +21 -0
- package/dist/docx/load/legacy-doc/xml.d.ts.map +1 -0
- package/dist/docx/load/legacy-doc.d.ts +5 -4
- package/dist/docx/load/legacy-doc.d.ts.map +1 -1
- package/dist/docx/model-paragraph.d.ts +5 -0
- package/dist/docx/model-paragraph.d.ts.map +1 -1
- package/dist/docx/model.d.ts +3 -0
- package/dist/docx/model.d.ts.map +1 -1
- package/dist/docx/numbering-editing.d.ts +11 -1
- package/dist/docx/numbering-editing.d.ts.map +1 -1
- package/dist/docx/numbering-format.d.ts.map +1 -1
- package/dist/docx/numbering-model.d.ts +17 -0
- package/dist/docx/numbering-model.d.ts.map +1 -1
- package/dist/docx/numbering-package.d.ts +2 -2
- package/dist/docx/numbering-package.d.ts.map +1 -1
- package/dist/docx/numbering-parse.d.ts +2 -1
- package/dist/docx/numbering-parse.d.ts.map +1 -1
- package/dist/docx/numbering-picture-save.d.ts +13 -0
- package/dist/docx/numbering-picture-save.d.ts.map +1 -0
- package/dist/docx/numbering-picture.d.ts +18 -0
- package/dist/docx/numbering-picture.d.ts.map +1 -0
- package/dist/docx/parse.d.ts.map +1 -1
- package/dist/docx/permission-markers.d.ts +19 -0
- package/dist/docx/permission-markers.d.ts.map +1 -0
- package/dist/docx/permissions.d.ts +11 -0
- package/dist/docx/permissions.d.ts.map +1 -0
- package/dist/docx/protection-legacy.d.ts +13 -0
- package/dist/docx/protection-legacy.d.ts.map +1 -0
- package/dist/docx/protection.d.ts +30 -0
- package/dist/docx/protection.d.ts.map +1 -0
- package/dist/docx/save.d.ts.map +1 -1
- package/dist/docx/settings.d.ts +6 -1
- package/dist/docx/settings.d.ts.map +1 -1
- package/dist/docx/ui/customization.d.ts.map +1 -1
- package/dist/docx/ui/edit-restriction.d.ts +53 -0
- package/dist/docx/ui/edit-restriction.d.ts.map +1 -0
- package/dist/docx/ui/index.cjs +548 -18
- package/dist/docx/ui/index.d.ts +4 -0
- package/dist/docx/ui/index.d.ts.map +1 -1
- package/dist/docx/ui/index.mjs +528 -19
- package/dist/docx/ui/paragraph-attributes.d.ts.map +1 -1
- package/dist/docx/ui/ribbon-action-ids.d.ts +1 -1
- package/dist/docx/ui/ribbon-action-ids.d.ts.map +1 -1
- package/dist/docx/write-paragraph.d.ts.map +1 -1
- package/dist/drawingml/index.cjs +1 -0
- package/dist/drawingml/index.mjs +1 -0
- package/dist/drawingml/write-theme.d.ts +2 -0
- package/dist/drawingml/write-theme.d.ts.map +1 -1
- package/dist/index.cjs +337 -95
- package/dist/index.mjs +337 -95
- package/dist/pptx/automation/index.cjs +1919 -758
- package/dist/pptx/automation/index.d.ts +37 -3
- package/dist/pptx/automation/index.d.ts.map +1 -1
- package/dist/pptx/automation/index.mjs +252 -10
- package/dist/pptx/automation/schemas/index.cjs +26 -0
- package/dist/pptx/automation/schemas/index.d.ts +26 -1
- package/dist/pptx/automation/schemas/index.d.ts.map +1 -0
- package/dist/pptx/automation/schemas/index.mjs +1 -1
- package/dist/pptx/chunks/index-Bp-1pGo1.d.ts.map +1 -1
- package/dist/pptx/chunks/{index-BuMPQDQb.d.ts → index-pLLN4OTz.d.ts} +37 -10
- package/dist/pptx/chunks/{index-BuMPQDQb.d.ts.map → index-pLLN4OTz.d.ts.map} +1 -1
- package/dist/pptx/cli/index.cjs +281 -116
- package/dist/pptx/cli/index.mjs +4 -4
- package/dist/pptx/converter/index.mjs +2 -2
- package/dist/pptx/editor/render/custom-show-operations.cjs +133 -0
- package/dist/pptx/editor/render/custom-show-operations.d.ts +42 -0
- package/dist/pptx/editor/render/custom-show-operations.d.ts.map +1 -0
- package/dist/pptx/editor/render/custom-show-operations.mjs +119 -0
- package/dist/pptx/editor/render/find-replace.cjs +15 -14
- package/dist/pptx/editor/render/find-replace.d.ts +1 -1
- package/dist/pptx/editor/render/find-replace.mjs +2 -1
- package/dist/pptx/editor/render/slide-operations.cjs +9 -8
- package/dist/pptx/editor/render/slide-operations.mjs +3 -2
- package/dist/pptx/editor/render/table-data-grid-ops.cjs +1 -1
- package/dist/pptx/editor/render/table-data-grid-ops.mjs +1 -1
- package/dist/pptx/index.cjs +1656 -761
- package/dist/pptx/index.d.ts +2 -2
- package/dist/pptx/index.mjs +5 -5
- package/dist/teams/index.cjs +213 -26
- package/dist/teams/index.mjs +213 -26
- package/dist/text/index.cjs +241 -0
- package/dist/text/index.d.ts +2 -0
- package/dist/text/index.d.ts.map +1 -1
- package/dist/text/index.mjs +240 -1
- package/dist/text/truetype/parse.d.ts +36 -0
- package/dist/text/truetype/parse.d.ts.map +1 -0
- package/dist/text/truetype/subset.d.ts +16 -0
- package/dist/text/truetype/subset.d.ts.map +1 -0
- package/dist/visio/cell-formula.d.ts.map +1 -1
- package/dist/visio/container-relationships.d.ts +40 -6
- package/dist/visio/container-relationships.d.ts.map +1 -1
- package/dist/visio/data-connections.d.ts +32 -0
- package/dist/visio/data-connections.d.ts.map +1 -0
- package/dist/visio/data-recordsets.d.ts +7 -0
- package/dist/visio/data-recordsets.d.ts.map +1 -1
- package/dist/visio/data-refresh.d.ts +33 -0
- package/dist/visio/data-refresh.d.ts.map +1 -0
- package/dist/visio/edit-commands.d.ts +6 -1
- package/dist/visio/edit-commands.d.ts.map +1 -1
- package/dist/visio/edit-connector.d.ts.map +1 -1
- package/dist/visio/edit-container-fit.d.ts +15 -2
- package/dist/visio/edit-container-fit.d.ts.map +1 -1
- package/dist/visio/edit-container-members.d.ts +12 -0
- package/dist/visio/edit-container-members.d.ts.map +1 -1
- package/dist/visio/edit-container-options.d.ts +33 -0
- package/dist/visio/edit-container-options.d.ts.map +1 -0
- package/dist/visio/edit-data-commands.d.ts +5 -0
- package/dist/visio/edit-data-commands.d.ts.map +1 -1
- package/dist/visio/edit-data-parts.d.ts +2 -0
- package/dist/visio/edit-data-parts.d.ts.map +1 -1
- package/dist/visio/edit-data.d.ts.map +1 -1
- package/dist/visio/edit-diagram-parts-commands.d.ts +2 -1
- package/dist/visio/edit-diagram-parts-commands.d.ts.map +1 -1
- package/dist/visio/edit-diagram-parts.d.ts +8 -0
- package/dist/visio/edit-diagram-parts.d.ts.map +1 -1
- package/dist/visio/edit-group-resize.d.ts.map +1 -1
- package/dist/visio/edit-instance-checks.d.ts.map +1 -1
- package/dist/visio/edit-package.d.ts.map +1 -1
- package/dist/visio/edit-page-theme-commands.d.ts +26 -0
- package/dist/visio/edit-page-theme-commands.d.ts.map +1 -1
- package/dist/visio/edit-page-theme-part.d.ts +6 -0
- package/dist/visio/edit-page-theme-part.d.ts.map +1 -0
- package/dist/visio/edit-page-theme.d.ts +9 -1
- package/dist/visio/edit-page-theme.d.ts.map +1 -1
- package/dist/visio/edit-picture-adjust.d.ts +32 -0
- package/dist/visio/edit-picture-adjust.d.ts.map +1 -0
- package/dist/visio/edit-resize-anchor.d.ts.map +1 -1
- package/dist/visio/edit-swimlane-commands.d.ts +91 -0
- package/dist/visio/edit-swimlane-commands.d.ts.map +1 -0
- package/dist/visio/edit-swimlane-layout.d.ts +64 -0
- package/dist/visio/edit-swimlane-layout.d.ts.map +1 -0
- package/dist/visio/edit-swimlane-ops.d.ts +11 -0
- package/dist/visio/edit-swimlane-ops.d.ts.map +1 -0
- package/dist/visio/edit-swimlane-shapes.d.ts +42 -0
- package/dist/visio/edit-swimlane-shapes.d.ts.map +1 -0
- package/dist/visio/edit-swimlane-turn.d.ts +9 -0
- package/dist/visio/edit-swimlane-turn.d.ts.map +1 -0
- package/dist/visio/edit.d.ts.map +1 -1
- package/dist/visio/effects.d.ts +3 -2
- package/dist/visio/effects.d.ts.map +1 -1
- package/dist/visio/geometry.d.ts +2 -1
- package/dist/visio/geometry.d.ts.map +1 -1
- package/dist/visio/index.cjs +10254 -7285
- package/dist/visio/index.d.ts +7 -0
- package/dist/visio/index.d.ts.map +1 -1
- package/dist/visio/index.mjs +10248 -7286
- package/dist/visio/infinite-line.d.ts +17 -0
- package/dist/visio/infinite-line.d.ts.map +1 -0
- package/dist/visio/model.d.ts +46 -0
- package/dist/visio/model.d.ts.map +1 -1
- package/dist/visio/package-kind.d.ts +34 -0
- package/dist/visio/package-kind.d.ts.map +1 -0
- package/dist/visio/page-theme.d.ts +7 -0
- package/dist/visio/page-theme.d.ts.map +1 -1
- package/dist/visio/parser.d.ts +2 -2
- package/dist/visio/parser.d.ts.map +1 -1
- package/dist/visio/shadow.d.ts +2 -1
- package/dist/visio/shadow.d.ts.map +1 -1
- package/dist/visio/shape-structure.d.ts +14 -1
- package/dist/visio/shape-structure.d.ts.map +1 -1
- package/dist/visio/shapes.d.ts +7 -1
- package/dist/visio/shapes.d.ts.map +1 -1
- package/dist/visio/stencil-file.d.ts +2 -2
- package/dist/visio/style.d.ts.map +1 -1
- package/dist/visio/swimlane-stack.d.ts +65 -0
- package/dist/visio/swimlane-stack.d.ts.map +1 -0
- package/dist/visio/theme-builtins.d.ts +3 -0
- package/dist/visio/theme-builtins.d.ts.map +1 -1
- package/dist/visio/theme-effects.d.ts +19 -0
- package/dist/visio/theme-effects.d.ts.map +1 -0
- package/dist/visio/theme-font.d.ts +13 -0
- package/dist/visio/theme-font.d.ts.map +1 -0
- package/dist/visio/theme-line.d.ts.map +1 -1
- package/dist/visio/theme-write.d.ts.map +1 -1
- package/dist/visio/theme.d.ts +7 -0
- package/dist/visio/theme.d.ts.map +1 -1
- package/dist/visio/ui/data-graphic-config.d.ts +45 -0
- package/dist/visio/ui/data-graphic-config.d.ts.map +1 -0
- package/dist/visio/ui/data-graphic-rules.d.ts +7 -0
- package/dist/visio/ui/data-graphic-rules.d.ts.map +1 -1
- package/dist/visio/ui/data-graphics.d.ts +9 -0
- package/dist/visio/ui/data-graphics.d.ts.map +1 -1
- package/dist/visio/ui/diagram-parts.d.ts +8 -1
- package/dist/visio/ui/diagram-parts.d.ts.map +1 -1
- package/dist/visio/ui/edit-commands.d.ts.map +1 -1
- package/dist/visio/ui/guides.d.ts +9 -1
- package/dist/visio/ui/guides.d.ts.map +1 -1
- package/dist/visio/ui/index.cjs +12664 -9884
- package/dist/visio/ui/index.d.ts +4 -0
- package/dist/visio/ui/index.d.ts.map +1 -1
- package/dist/visio/ui/index.mjs +12630 -9885
- package/dist/visio/ui/org-chart.d.ts +75 -0
- package/dist/visio/ui/org-chart.d.ts.map +1 -0
- package/dist/visio/ui/resize-snap.d.ts +51 -0
- package/dist/visio/ui/resize-snap.d.ts.map +1 -0
- package/dist/visio/ui/sample-drawing.d.ts +26 -0
- package/dist/visio/ui/sample-drawing.d.ts.map +1 -1
- package/dist/visio/ui/scene-validation.d.ts.map +1 -1
- package/dist/visio/ui/selection-resize.d.ts +2 -2
- package/dist/visio/ui/selection-resize.d.ts.map +1 -1
- package/dist/visio/ui/shape-resize.d.ts +29 -1
- package/dist/visio/ui/shape-resize.d.ts.map +1 -1
- package/dist/visio/ui/snapshot-scene.d.ts.map +1 -1
- package/dist/visio/ui/swimlane.d.ts +37 -0
- package/dist/visio/ui/swimlane.d.ts.map +1 -0
- package/dist/visio/ui/templates.d.ts +26 -0
- package/dist/visio/ui/templates.d.ts.map +1 -0
- package/dist/xlsx/audit/ast-text.d.ts +12 -0
- package/dist/xlsx/audit/ast-text.d.ts.map +1 -0
- package/dist/xlsx/audit/error-check.d.ts +23 -0
- package/dist/xlsx/audit/error-check.d.ts.map +1 -0
- package/dist/xlsx/audit/evaluate-steps.d.ts +48 -0
- package/dist/xlsx/audit/evaluate-steps.d.ts.map +1 -0
- package/dist/xlsx/audit/index.d.ts +6 -0
- package/dist/xlsx/audit/index.d.ts.map +1 -0
- package/dist/xlsx/audit/trace.d.ts +59 -0
- package/dist/xlsx/audit/trace.d.ts.map +1 -0
- package/dist/xlsx/audit/watch.d.ts +17 -0
- package/dist/xlsx/audit/watch.d.ts.map +1 -0
- package/dist/xlsx/edit/filter.d.ts +5 -2
- package/dist/xlsx/edit/filter.d.ts.map +1 -1
- package/dist/xlsx/edit/index.d.ts +4 -1
- package/dist/xlsx/edit/index.d.ts.map +1 -1
- package/dist/xlsx/edit/session.d.ts.map +1 -1
- package/dist/xlsx/edit/sort-choices.d.ts +23 -0
- package/dist/xlsx/edit/sort-choices.d.ts.map +1 -0
- package/dist/xlsx/edit/sort-keys.d.ts +49 -0
- package/dist/xlsx/edit/sort-keys.d.ts.map +1 -0
- package/dist/xlsx/edit/sort-reapply.d.ts +11 -0
- package/dist/xlsx/edit/sort-reapply.d.ts.map +1 -0
- package/dist/xlsx/edit/sort.d.ts +14 -12
- package/dist/xlsx/edit/sort.d.ts.map +1 -1
- package/dist/xlsx/edit/types.d.ts +7 -6
- package/dist/xlsx/edit/types.d.ts.map +1 -1
- package/dist/xlsx/edit/view.d.ts +9 -1
- package/dist/xlsx/edit/view.d.ts.map +1 -1
- package/dist/xlsx/filter-criteria.d.ts +2 -1
- package/dist/xlsx/filter-criteria.d.ts.map +1 -1
- package/dist/xlsx/formula/engine-types.d.ts +8 -0
- package/dist/xlsx/formula/engine-types.d.ts.map +1 -1
- package/dist/xlsx/formula/engine.d.ts.map +1 -1
- package/dist/xlsx/index.cjs +5478 -4220
- package/dist/xlsx/index.d.ts +1 -0
- package/dist/xlsx/index.d.ts.map +1 -1
- package/dist/xlsx/index.mjs +5450 -4221
- package/dist/xlsx/layout/index.d.ts +1 -0
- package/dist/xlsx/layout/index.d.ts.map +1 -1
- package/dist/xlsx/layout/split.d.ts +55 -0
- package/dist/xlsx/layout/split.d.ts.map +1 -0
- package/dist/xlsx/layout/viewport.d.ts +2 -0
- package/dist/xlsx/layout/viewport.d.ts.map +1 -1
- package/dist/xlsx/load/index.cjs +305 -109
- package/dist/xlsx/load/index.mjs +305 -109
- package/dist/xlsx/model-sort.d.ts +27 -0
- package/dist/xlsx/model-sort.d.ts.map +1 -0
- package/dist/xlsx/model.d.ts +39 -1
- package/dist/xlsx/model.d.ts.map +1 -1
- package/dist/xlsx/read/ignored-errors.d.ts +4 -0
- package/dist/xlsx/read/ignored-errors.d.ts.map +1 -0
- package/dist/xlsx/read/sheet-props.d.ts.map +1 -1
- package/dist/xlsx/read/sort-state.d.ts +5 -0
- package/dist/xlsx/read/sort-state.d.ts.map +1 -0
- package/dist/xlsx/read/tables.d.ts +2 -2
- package/dist/xlsx/read/tables.d.ts.map +1 -1
- package/dist/xlsx/read/worksheet.d.ts.map +1 -1
- package/dist/xlsx/sort-lists.d.ts +6 -0
- package/dist/xlsx/sort-lists.d.ts.map +1 -0
- package/dist/xlsx/ui/audit-state.d.ts +19 -0
- package/dist/xlsx/ui/audit-state.d.ts.map +1 -0
- package/dist/xlsx/ui/commands/audit.d.ts +3 -0
- package/dist/xlsx/ui/commands/audit.d.ts.map +1 -0
- package/dist/xlsx/ui/commands/formulas.d.ts.map +1 -1
- package/dist/xlsx/ui/commands/i18n/audit.d.ts +3 -0
- package/dist/xlsx/ui/commands/i18n/audit.d.ts.map +1 -0
- package/dist/xlsx/ui/commands/i18n/index.d.ts.map +1 -1
- package/dist/xlsx/ui/commands/i18n/navigation.d.ts.map +1 -1
- package/dist/xlsx/ui/commands/i18n/ribbon-tabs.d.ts.map +1 -1
- package/dist/xlsx/ui/commands/i18n/rules.d.ts.map +1 -1
- package/dist/xlsx/ui/commands/icons.d.ts.map +1 -1
- package/dist/xlsx/ui/commands/sort-filter.d.ts.map +1 -1
- package/dist/xlsx/ui/context.d.ts +6 -1
- package/dist/xlsx/ui/context.d.ts.map +1 -1
- package/dist/xlsx/ui/grid/geometry.d.ts +29 -1
- package/dist/xlsx/ui/grid/geometry.d.ts.map +1 -1
- package/dist/xlsx/ui/index.cjs +10761 -9573
- package/dist/xlsx/ui/index.d.ts +1 -0
- package/dist/xlsx/ui/index.d.ts.map +1 -1
- package/dist/xlsx/ui/index.mjs +10755 -9574
- package/dist/xlsx/ui/ribbon/icon-paths.d.ts.map +1 -1
- package/dist/xlsx/ui/ribbon/tabs/review-view.d.ts.map +1 -1
- package/dist/xlsx/write/filter-columns.d.ts +14 -0
- package/dist/xlsx/write/filter-columns.d.ts.map +1 -1
- package/dist/xlsx/write/ignored-errors.d.ts +3 -0
- package/dist/xlsx/write/ignored-errors.d.ts.map +1 -0
- package/dist/xlsx/write/sheet-parts.d.ts.map +1 -1
- package/dist/xlsx/write/sheet-props.d.ts.map +1 -1
- package/dist/xlsx/write/sort-state.d.ts +55 -0
- package/dist/xlsx/write/sort-state.d.ts.map +1 -0
- package/dist/xlsx/write/table-patch.d.ts +2 -1
- package/dist/xlsx/write/table-patch.d.ts.map +1 -1
- package/dist/xlsx/write/tables.d.ts +2 -1
- package/dist/xlsx/write/tables.d.ts.map +1 -1
- package/dist/xlsx/write/worksheet.d.ts.map +1 -1
- package/package.json +2 -2
- package/dist/PptxHandler-MGKMIK22.cjs +0 -13
- package/dist/PptxHandler-TEC7SWBU.mjs +0 -4
- package/dist/chunk-MHNETXQB.mjs +0 -1
package/dist/teams/index.mjs
CHANGED
|
@@ -8593,6 +8593,46 @@ var init_filter_columns = __esm({
|
|
|
8593
8593
|
}
|
|
8594
8594
|
});
|
|
8595
8595
|
|
|
8596
|
+
// xlsx/read/sort-state.ts
|
|
8597
|
+
function readSortState(node2, dxfs) {
|
|
8598
|
+
const range = parseRange(att(node2, "ref") ?? "");
|
|
8599
|
+
if (!node2 || !range) return void 0;
|
|
8600
|
+
const conditions = [];
|
|
8601
|
+
for (const child5 of xChildren(node2, "sortCondition")) {
|
|
8602
|
+
const ref = parseRange(att(child5, "ref") ?? "");
|
|
8603
|
+
if (!ref) continue;
|
|
8604
|
+
const condition = { ref };
|
|
8605
|
+
if (boolAttr(child5, "descending", false)) condition.descending = true;
|
|
8606
|
+
const by = att(child5, "sortBy");
|
|
8607
|
+
if (by && SORT_BY.has(by) && by !== "value") condition.sortBy = by;
|
|
8608
|
+
const customList = att(child5, "customList");
|
|
8609
|
+
if (customList) condition.customList = customList;
|
|
8610
|
+
const dxfId = numAttr(child5, "dxfId");
|
|
8611
|
+
if (dxfId !== void 0) {
|
|
8612
|
+
condition.dxfId = dxfId;
|
|
8613
|
+
}
|
|
8614
|
+
const iconSet = att(child5, "iconSet");
|
|
8615
|
+
if (iconSet) condition.iconSet = iconSet;
|
|
8616
|
+
const iconId = numAttr(child5, "iconId");
|
|
8617
|
+
if (iconId !== void 0) condition.iconId = iconId;
|
|
8618
|
+
conditions.push(condition);
|
|
8619
|
+
}
|
|
8620
|
+
return {
|
|
8621
|
+
range,
|
|
8622
|
+
...boolAttr(node2, "columnSort", false) ? { columnSort: true } : {},
|
|
8623
|
+
...boolAttr(node2, "caseSensitive", false) ? { caseSensitive: true } : {},
|
|
8624
|
+
conditions
|
|
8625
|
+
};
|
|
8626
|
+
}
|
|
8627
|
+
var SORT_BY;
|
|
8628
|
+
var init_sort_state = __esm({
|
|
8629
|
+
"xlsx/read/sort-state.ts"() {
|
|
8630
|
+
init_address();
|
|
8631
|
+
init_xml_util();
|
|
8632
|
+
SORT_BY = /* @__PURE__ */ new Set(["value", "cellColor", "fontColor", "icon"]);
|
|
8633
|
+
}
|
|
8634
|
+
});
|
|
8635
|
+
|
|
8596
8636
|
// xlsx/read/style-parts.ts
|
|
8597
8637
|
function parseColor(element3, palette) {
|
|
8598
8638
|
if (!element3) return void 0;
|
|
@@ -8771,23 +8811,41 @@ function readSheetView(sheetViews) {
|
|
|
8771
8811
|
const cols = Math.max(0, Math.round(numAttr(pane, "xSplit") ?? 0));
|
|
8772
8812
|
if (rows || cols) view.freeze = { rows, cols };
|
|
8773
8813
|
}
|
|
8814
|
+
const split2 = pane && state === "split";
|
|
8815
|
+
if (split2) {
|
|
8816
|
+
const x = Math.max(0, Math.round(numAttr(pane, "xSplit") ?? 0));
|
|
8817
|
+
const y = Math.max(0, Math.round(numAttr(pane, "ySplit") ?? 0));
|
|
8818
|
+
if (x || y) {
|
|
8819
|
+
view.split = { x, y };
|
|
8820
|
+
const first2 = parseAddress(att(node2, "topLeftCell") ?? "");
|
|
8821
|
+
if (first2) view.split.topLeft = first2;
|
|
8822
|
+
const active = att(pane, "activePane");
|
|
8823
|
+
if (active && PANES.has(active))
|
|
8824
|
+
view.split.activePane = active;
|
|
8825
|
+
}
|
|
8826
|
+
}
|
|
8774
8827
|
const topLeft = parseAddress(
|
|
8775
|
-
(frozen ? att(pane, "topLeftCell") : att(node2, "topLeftCell")) ?? ""
|
|
8828
|
+
(frozen || split2 ? att(pane, "topLeftCell") : att(node2, "topLeftCell")) ?? ""
|
|
8776
8829
|
);
|
|
8777
8830
|
if (topLeft) view.topLeft = topLeft;
|
|
8778
8831
|
const selections = xChildren(node2, "selection");
|
|
8779
8832
|
const activePane = att(pane, "activePane") ?? "topLeft";
|
|
8780
8833
|
const selection = selections.find((sel) => (att(sel, "pane") ?? "topLeft") === activePane) ?? selections[0];
|
|
8781
|
-
if (selection)
|
|
8782
|
-
|
|
8783
|
-
|
|
8784
|
-
|
|
8785
|
-
|
|
8786
|
-
|
|
8787
|
-
}
|
|
8834
|
+
if (selection) view.selection = readSelection(selection);
|
|
8835
|
+
if (view.split) {
|
|
8836
|
+
for (const other of selections) {
|
|
8837
|
+
const name2 = att(other, "pane") ?? "topLeft";
|
|
8838
|
+
if (other === selection || !PANES.has(name2)) continue;
|
|
8839
|
+
(view.split.paneSelections ??= {})[name2] = readSelection(other);
|
|
8840
|
+
}
|
|
8788
8841
|
}
|
|
8789
8842
|
return view;
|
|
8790
8843
|
}
|
|
8844
|
+
function readSelection(selection) {
|
|
8845
|
+
const ranges = parseSqref(att(selection, "sqref") ?? att(selection, "activeCell") ?? "A1");
|
|
8846
|
+
const active = parseAddress(att(selection, "activeCell") ?? "") ?? ranges[0]?.start ?? { row: 0, col: 0 };
|
|
8847
|
+
return { active, ranges: ranges.length ? ranges : [{ start: active, end: { ...active } }] };
|
|
8848
|
+
}
|
|
8791
8849
|
function readSheetFormat(format) {
|
|
8792
8850
|
const result2 = {
|
|
8793
8851
|
defaultRowHeight: numAttr(format, "defaultRowHeight") ?? 15
|
|
@@ -8810,6 +8868,8 @@ function readAutoFilter(node2, dxfs) {
|
|
|
8810
8868
|
const filter2 = { range };
|
|
8811
8869
|
const columns = xChildren(node2, "filterColumn").map((column2) => readFilterColumn(column2));
|
|
8812
8870
|
if (columns.length) filter2.columns = columns;
|
|
8871
|
+
const sortState = readSortState(xFirst(node2, "sortState"));
|
|
8872
|
+
if (sortState) filter2.sortState = sortState;
|
|
8813
8873
|
return filter2;
|
|
8814
8874
|
}
|
|
8815
8875
|
function readHeaderFooter(node2) {
|
|
@@ -8872,12 +8932,13 @@ function readProtection(node2) {
|
|
|
8872
8932
|
if (allow.length) protection.allow = allow.sort();
|
|
8873
8933
|
return protection;
|
|
8874
8934
|
}
|
|
8875
|
-
var defaultSheetView, readTabColor, readFitToPage, FORMAT_FLAGS, HEADER_FOOTER_TEXT, HEADER_FOOTER_FLAGS, ORIENTATIONS, PROTECTION_META;
|
|
8935
|
+
var defaultSheetView, readTabColor, readFitToPage, PANES, FORMAT_FLAGS, HEADER_FOOTER_TEXT, HEADER_FOOTER_FLAGS, ORIENTATIONS, PROTECTION_META;
|
|
8876
8936
|
var init_sheet_props = __esm({
|
|
8877
8937
|
"xlsx/read/sheet-props.ts"() {
|
|
8878
8938
|
init_address();
|
|
8879
8939
|
init_password_hash();
|
|
8880
8940
|
init_filter_columns();
|
|
8941
|
+
init_sort_state();
|
|
8881
8942
|
init_style_parts();
|
|
8882
8943
|
init_xml_util();
|
|
8883
8944
|
defaultSheetView = () => ({
|
|
@@ -8889,6 +8950,7 @@ var init_sheet_props = __esm({
|
|
|
8889
8950
|
});
|
|
8890
8951
|
readTabColor = (sheetPr, palette) => parseColor(xFirst(sheetPr, "tabColor"), palette);
|
|
8891
8952
|
readFitToPage = (sheetPr) => boolAttr(xFirst(sheetPr, "pageSetUpPr"), "fitToPage") ?? false;
|
|
8953
|
+
PANES = /* @__PURE__ */ new Set(["topLeft", "topRight", "bottomLeft", "bottomRight"]);
|
|
8892
8954
|
FORMAT_FLAGS = ["zeroHeight", "customHeight", "thickTop", "thickBottom"];
|
|
8893
8955
|
HEADER_FOOTER_TEXT = {
|
|
8894
8956
|
header: "oddHeader",
|
|
@@ -30174,7 +30236,7 @@ var init_date = __esm({
|
|
|
30174
30236
|
});
|
|
30175
30237
|
|
|
30176
30238
|
// xlsx/read/tables.ts
|
|
30177
|
-
function parseTable(xml, partName) {
|
|
30239
|
+
function parseTable(xml, partName, dxfs) {
|
|
30178
30240
|
const root = parseXml(xml, { label: "XLSX table" }).documentElement;
|
|
30179
30241
|
const range = parseRange(att(root, "ref") ?? "");
|
|
30180
30242
|
if (!range) return void 0;
|
|
@@ -30215,8 +30277,10 @@ function parseTable(xml, partName) {
|
|
|
30215
30277
|
}
|
|
30216
30278
|
return table2;
|
|
30217
30279
|
}
|
|
30218
|
-
function readColumnFilters(root, table2) {
|
|
30280
|
+
function readColumnFilters(root, table2, dxfs) {
|
|
30219
30281
|
const filter2 = xFirst(root, "autoFilter");
|
|
30282
|
+
const sortState = readSortState(xFirst(filter2, "sortState") ?? xFirst(root, "sortState"));
|
|
30283
|
+
if (sortState) table2.sortState = sortState;
|
|
30220
30284
|
for (const node2 of filter2 ? xChildren(filter2, "filterColumn") : []) {
|
|
30221
30285
|
const column2 = table2.columns[numAttr(node2, "colId") ?? -1];
|
|
30222
30286
|
const filters = xChildren(node2, "filters");
|
|
@@ -30242,6 +30306,7 @@ var init_tables = __esm({
|
|
|
30242
30306
|
"xlsx/read/tables.ts"() {
|
|
30243
30307
|
init_xml2();
|
|
30244
30308
|
init_address();
|
|
30309
|
+
init_sort_state();
|
|
30245
30310
|
init_formula_text();
|
|
30246
30311
|
init_xml_util();
|
|
30247
30312
|
}
|
|
@@ -45693,6 +45758,10 @@ function criteriaOf(column2) {
|
|
|
45693
45758
|
function unresolvedFilter(filter2) {
|
|
45694
45759
|
return filter2 && {
|
|
45695
45760
|
range: filter2.range,
|
|
45761
|
+
sortState: filter2.sortState && {
|
|
45762
|
+
...filter2.sortState,
|
|
45763
|
+
conditions: filter2.sortState.conditions.map(({ style: _style, ...rest }) => rest)
|
|
45764
|
+
},
|
|
45696
45765
|
columns: filter2.columns?.map((column2) => ({
|
|
45697
45766
|
offset: column2.offset,
|
|
45698
45767
|
sourceXml: column2.sourceXml,
|
|
@@ -45781,6 +45850,59 @@ var init_filter_columns2 = __esm({
|
|
|
45781
45850
|
}
|
|
45782
45851
|
});
|
|
45783
45852
|
|
|
45853
|
+
// xlsx/write/sort-state.ts
|
|
45854
|
+
function sortStateXml(state, styles) {
|
|
45855
|
+
if (!state) return "";
|
|
45856
|
+
const levels = state.conditions.map((c2) => {
|
|
45857
|
+
const dxfId = c2.style && styles ? styles.dxfId(c2.style) : c2.dxfId;
|
|
45858
|
+
return el("sortCondition", {
|
|
45859
|
+
descending: c2.descending || void 0,
|
|
45860
|
+
sortBy: c2.sortBy && c2.sortBy !== "value" ? c2.sortBy : void 0,
|
|
45861
|
+
ref: formatRange(c2.ref),
|
|
45862
|
+
customList: c2.customList,
|
|
45863
|
+
dxfId,
|
|
45864
|
+
iconSet: c2.iconSet,
|
|
45865
|
+
iconId: c2.iconId
|
|
45866
|
+
});
|
|
45867
|
+
}).join("");
|
|
45868
|
+
return el(
|
|
45869
|
+
"sortState",
|
|
45870
|
+
{
|
|
45871
|
+
columnSort: state.columnSort || void 0,
|
|
45872
|
+
caseSensitive: state.caseSensitive || void 0,
|
|
45873
|
+
ref: formatRange(state.range)
|
|
45874
|
+
},
|
|
45875
|
+
levels
|
|
45876
|
+
);
|
|
45877
|
+
}
|
|
45878
|
+
function sheetSortStateXml(sheet, styles) {
|
|
45879
|
+
if (!sheet.sortState) return "";
|
|
45880
|
+
const kept = sheet.preserved.get("sortState")?.[0];
|
|
45881
|
+
if (kept) {
|
|
45882
|
+
try {
|
|
45883
|
+
const source3 = readSortState(parseXml(kept, { label: "XLSX worksheet" }).documentElement);
|
|
45884
|
+
if (sameModel(bareSortState(source3), bareSortState(sheet.sortState))) return "";
|
|
45885
|
+
} catch {
|
|
45886
|
+
}
|
|
45887
|
+
}
|
|
45888
|
+
return sortStateXml(sheet.sortState, styles);
|
|
45889
|
+
}
|
|
45890
|
+
var bareSortState, unresolvedTable;
|
|
45891
|
+
var init_sort_state2 = __esm({
|
|
45892
|
+
"xlsx/write/sort-state.ts"() {
|
|
45893
|
+
init_xml2();
|
|
45894
|
+
init_address();
|
|
45895
|
+
init_sort_state();
|
|
45896
|
+
init_snapshot();
|
|
45897
|
+
init_xml_out();
|
|
45898
|
+
bareSortState = (state) => state && {
|
|
45899
|
+
...state,
|
|
45900
|
+
conditions: state.conditions.map(({ style: _style, ...rest }) => rest)
|
|
45901
|
+
};
|
|
45902
|
+
unresolvedTable = (table2) => table2 && { ...table2, sortState: bareSortState(table2.sortState) };
|
|
45903
|
+
}
|
|
45904
|
+
});
|
|
45905
|
+
|
|
45784
45906
|
// xlsx/write/sheet-props.ts
|
|
45785
45907
|
function sheetPrXml(sheet) {
|
|
45786
45908
|
const source3 = snapshotElement(sheet, "sheetPr");
|
|
@@ -45805,6 +45927,19 @@ function dimensionXml(sheet) {
|
|
|
45805
45927
|
const used = usedRange(sheet);
|
|
45806
45928
|
return `<dimension ref="${used ? formatRange(used) : "A1"}"/>`;
|
|
45807
45929
|
}
|
|
45930
|
+
function splitActivePane(split2) {
|
|
45931
|
+
const both = split2.x > 0 && split2.y > 0;
|
|
45932
|
+
const valid2 = both ? ["topLeft", "topRight", "bottomLeft", "bottomRight"] : split2.y > 0 ? ["topLeft", "bottomLeft"] : ["topLeft", "topRight"];
|
|
45933
|
+
if (split2.activePane && valid2.includes(split2.activePane)) return split2.activePane;
|
|
45934
|
+
return both ? "bottomRight" : split2.y > 0 ? "bottomLeft" : "topRight";
|
|
45935
|
+
}
|
|
45936
|
+
function selectionXml(selection, pane) {
|
|
45937
|
+
return el("selection", {
|
|
45938
|
+
pane,
|
|
45939
|
+
activeCell: formatAddress(selection.active),
|
|
45940
|
+
sqref: sqref(selection.ranges) || formatAddress(selection.active)
|
|
45941
|
+
});
|
|
45942
|
+
}
|
|
45808
45943
|
function sheetViewsXml(sheet, tabSelected) {
|
|
45809
45944
|
const source3 = snapshotElement(sheet, "sheetViews");
|
|
45810
45945
|
if (source3 && sameModel(readSheetView(source3), sheet.view)) {
|
|
@@ -45833,20 +45968,31 @@ function sheetViewsXml(sheet, tabSelected) {
|
|
|
45833
45968
|
state: "frozen"
|
|
45834
45969
|
});
|
|
45835
45970
|
}
|
|
45836
|
-
|
|
45837
|
-
|
|
45838
|
-
|
|
45839
|
-
|
|
45840
|
-
|
|
45971
|
+
const split2 = view.split && (view.split.x > 0 || view.split.y > 0) ? view.split : void 0;
|
|
45972
|
+
if (split2 && !pane) {
|
|
45973
|
+
const { x, y } = split2;
|
|
45974
|
+
pane = splitActivePane(split2);
|
|
45975
|
+
inner += el("pane", {
|
|
45976
|
+
xSplit: x || void 0,
|
|
45977
|
+
ySplit: y || void 0,
|
|
45978
|
+
topLeftCell: view.topLeft ? formatAddress(view.topLeft) : void 0,
|
|
45979
|
+
activePane: pane,
|
|
45980
|
+
state: "split"
|
|
45841
45981
|
});
|
|
45842
45982
|
}
|
|
45983
|
+
if (split2) {
|
|
45984
|
+
for (const name2 of ["topLeft", "topRight", "bottomLeft", "bottomRight"]) {
|
|
45985
|
+
const own = name2 === pane ? view.selection : split2.paneSelections?.[name2];
|
|
45986
|
+
if (own) inner += selectionXml(own, name2);
|
|
45987
|
+
}
|
|
45988
|
+
} else if (view.selection) inner += selectionXml(view.selection, pane);
|
|
45843
45989
|
const attributes2 = attrs({
|
|
45844
45990
|
tabSelected: tabSelected || void 0,
|
|
45845
45991
|
showGridLines: view.showGridLines ? void 0 : false,
|
|
45846
45992
|
showRowColHeaders: view.showHeaders ? void 0 : false,
|
|
45847
45993
|
showZeros: view.showZeros ? void 0 : false,
|
|
45848
45994
|
rightToLeft: view.rightToLeft || void 0,
|
|
45849
|
-
topLeftCell: !view.freeze && view.topLeft ? formatAddress(view.topLeft) : void 0,
|
|
45995
|
+
topLeftCell: split2 ? split2.topLeft ? formatAddress(split2.topLeft) : void 0 : !view.freeze && view.topLeft ? formatAddress(view.topLeft) : void 0,
|
|
45850
45996
|
showFormulas: view.showFormulas || void 0,
|
|
45851
45997
|
view: view.mode,
|
|
45852
45998
|
zoomScale: view.zoom !== 100 ? view.zoom : void 0,
|
|
@@ -45930,7 +46076,7 @@ function autoFilterXml(sheet, styles) {
|
|
|
45930
46076
|
return snapshotXml(sheet, "autoFilter") ?? "";
|
|
45931
46077
|
const width = filter2.range.end.col - filter2.range.start.col + 1;
|
|
45932
46078
|
const columns = (filter2.columns ?? []).filter((column2) => column2.offset >= 0 && column2.offset < width).sort((a2, b) => a2.offset - b.offset).map((column2) => filterColumnXml(column2, styles)).join("");
|
|
45933
|
-
const sort2 = source3 && sameModel(readAutoFilter(source3)?.range, filter2.range) ? elements(source3).filter((node2) => node2.localName === "sortState" || node2.localName === "extLst").map((node2) => outerXml(node2)).join("") : "";
|
|
46079
|
+
const sort2 = filter2.sortState ? sortStateXml(filter2.sortState, styles) + extLstOf(source3) : source3 && sameModel(readAutoFilter(source3)?.range, filter2.range) ? elements(source3).filter((node2) => node2.localName === "sortState" || node2.localName === "extLst").map((node2) => outerXml(node2)).join("") : "";
|
|
45934
46080
|
return el("autoFilter", { ref: formatRange(filter2.range) }, columns + sort2);
|
|
45935
46081
|
}
|
|
45936
46082
|
function mergeCellsXml(sheet) {
|
|
@@ -45938,7 +46084,7 @@ function mergeCellsXml(sheet) {
|
|
|
45938
46084
|
const cells2 = sheet.merges.map((range) => `<mergeCell ref="${formatRange(range)}"/>`).join("");
|
|
45939
46085
|
return `<mergeCells count="${sheet.merges.length}">${cells2}</mergeCells>`;
|
|
45940
46086
|
}
|
|
45941
|
-
var sqref;
|
|
46087
|
+
var sqref, extLstOf;
|
|
45942
46088
|
var init_sheet_props2 = __esm({
|
|
45943
46089
|
"xlsx/write/sheet-props.ts"() {
|
|
45944
46090
|
init_xml2();
|
|
@@ -45947,12 +46093,14 @@ var init_sheet_props2 = __esm({
|
|
|
45947
46093
|
init_sheet_props();
|
|
45948
46094
|
init_xml_util();
|
|
45949
46095
|
init_filter_columns2();
|
|
46096
|
+
init_sort_state2();
|
|
45950
46097
|
init_attr_merge();
|
|
45951
46098
|
init_password_hash2();
|
|
45952
46099
|
init_snapshot();
|
|
45953
46100
|
init_style_xml();
|
|
45954
46101
|
init_xml_out();
|
|
45955
46102
|
sqref = (ranges) => ranges.map((range) => formatRange(range)).join(" ");
|
|
46103
|
+
extLstOf = (source3) => source3 ? elements(source3).filter((node2) => node2.localName === "extLst").map((node2) => outerXml(node2)).join("") : "";
|
|
45956
46104
|
}
|
|
45957
46105
|
});
|
|
45958
46106
|
|
|
@@ -47136,7 +47284,7 @@ function syncColumnFilters(doc, filter2, table2) {
|
|
|
47136
47284
|
}
|
|
47137
47285
|
});
|
|
47138
47286
|
}
|
|
47139
|
-
function patchAutoFilter(doc, root, table2, before, names2) {
|
|
47287
|
+
function patchAutoFilter(doc, root, table2, before, names2, styles) {
|
|
47140
47288
|
const existing = xKid(root, "autoFilter");
|
|
47141
47289
|
if (!table2.headerRow) {
|
|
47142
47290
|
if (existing) root.removeChild(existing);
|
|
@@ -47157,6 +47305,19 @@ function patchAutoFilter(doc, root, table2, before, names2) {
|
|
|
47157
47305
|
syncColumnFilters(doc, filter2, table2);
|
|
47158
47306
|
if (!existing) insertBefore(root, filter2, ["sortState", "tableColumns"]);
|
|
47159
47307
|
const sort2 = xKid(filter2, "sortState") ?? xKid(root, "sortState");
|
|
47308
|
+
if (table2.sortState) {
|
|
47309
|
+
const kept = sort2 && bareSortState(readSortState(sort2));
|
|
47310
|
+
if (!sameModel(kept, bareSortState(table2.sortState))) {
|
|
47311
|
+
sort2?.parentNode?.removeChild(sort2);
|
|
47312
|
+
const xml = sortStateXml(table2.sortState, styles).replace(
|
|
47313
|
+
"<sortState",
|
|
47314
|
+
`<sortState xmlns="${NS.x}"`
|
|
47315
|
+
);
|
|
47316
|
+
const fresh = doc.importNode(parseXml(xml, { label: "XLSX table" }).documentElement, true);
|
|
47317
|
+
insertBefore(filter2, fresh, ["extLst"]);
|
|
47318
|
+
return;
|
|
47319
|
+
}
|
|
47320
|
+
}
|
|
47160
47321
|
if (!sort2) return;
|
|
47161
47322
|
const moved = before.start.row !== table2.range.start.row || before.start.col !== table2.range.start.col || before.end.col !== table2.range.end.col;
|
|
47162
47323
|
if (moved) {
|
|
@@ -47241,7 +47402,7 @@ function patchStyleInfo(doc, root, table2) {
|
|
|
47241
47402
|
info.setAttribute("showRowStripes", flag(table2.showRowStripes, true));
|
|
47242
47403
|
info.setAttribute("showColumnStripes", flag(table2.showColumnStripes, false));
|
|
47243
47404
|
}
|
|
47244
|
-
function patchTableXml(sourceXml, sheet, table2, id, names2) {
|
|
47405
|
+
function patchTableXml(sourceXml, sheet, table2, id, names2, styles) {
|
|
47245
47406
|
let doc;
|
|
47246
47407
|
try {
|
|
47247
47408
|
doc = parseXml(sourceXml, { label: "XLSX table" });
|
|
@@ -47263,7 +47424,7 @@ function patchTableXml(sourceXml, sheet, table2, id, names2) {
|
|
|
47263
47424
|
root.removeAttribute("totalsRowCount");
|
|
47264
47425
|
if (!root.hasAttribute("totalsRowShown")) root.setAttribute("totalsRowShown", "0");
|
|
47265
47426
|
}
|
|
47266
|
-
patchAutoFilter(doc, root, table2, before, names2);
|
|
47427
|
+
patchAutoFilter(doc, root, table2, before, names2, styles);
|
|
47267
47428
|
patchColumns(doc, root, sheet, table2, names2);
|
|
47268
47429
|
patchStyleInfo(doc, root, table2);
|
|
47269
47430
|
return buildXml(doc);
|
|
@@ -47274,8 +47435,11 @@ var init_table_patch = __esm({
|
|
|
47274
47435
|
init_xml2();
|
|
47275
47436
|
init_address();
|
|
47276
47437
|
init_formula_text();
|
|
47438
|
+
init_sort_state();
|
|
47277
47439
|
init_tables();
|
|
47278
47440
|
init_table_filter();
|
|
47441
|
+
init_snapshot();
|
|
47442
|
+
init_sort_state2();
|
|
47279
47443
|
init_xml_out();
|
|
47280
47444
|
xKids = (parent, local) => elements(parent).filter((e) => e.localName === local);
|
|
47281
47445
|
xKid = (parent, local) => xKids(parent, local)[0];
|
|
@@ -47306,12 +47470,13 @@ function resolveTableColumns(sheet, table2) {
|
|
|
47306
47470
|
}
|
|
47307
47471
|
return { names: names2, headerText };
|
|
47308
47472
|
}
|
|
47309
|
-
function tableXml(table2, id, names2) {
|
|
47473
|
+
function tableXml(table2, id, names2, styles) {
|
|
47310
47474
|
const range = formatRange(table2.range);
|
|
47311
47475
|
const filterEnd = { ...table2.range.end, row: table2.range.end.row - (table2.totalsRow ? 1 : 0) };
|
|
47312
47476
|
const criteria = table2.columns.map((column2, index2) => column2.filter ? filterColumnXml2(index2, column2.filter) : "").join("");
|
|
47313
47477
|
const filterRef = formatRange({ start: table2.range.start, end: filterEnd });
|
|
47314
|
-
const
|
|
47478
|
+
const sort2 = sortStateXml(table2.sortState, styles);
|
|
47479
|
+
const filter2 = table2.headerRow ? criteria || sort2 ? `<autoFilter ref="${filterRef}">${criteria}${sort2}</autoFilter>` : `<autoFilter ref="${filterRef}"/>` : "";
|
|
47315
47480
|
const columns = names2.map((name2, index2) => {
|
|
47316
47481
|
const column2 = table2.columns[index2];
|
|
47317
47482
|
const calculated = column2?.calculatedColumnFormula ? `<calculatedColumnFormula>${escapeText2(addFuturePrefixes(column2.calculatedColumnFormula))}</calculatedColumnFormula>` : "";
|
|
@@ -47374,6 +47539,7 @@ var init_tables2 = __esm({
|
|
|
47374
47539
|
init_address();
|
|
47375
47540
|
init_formula_text();
|
|
47376
47541
|
init_table_filter();
|
|
47542
|
+
init_sort_state2();
|
|
47377
47543
|
init_xml_out();
|
|
47378
47544
|
headerTextOf = (value) => typeof value === "string" ? value : typeof value === "number" || typeof value === "boolean" ? String(value).toUpperCase() : void 0;
|
|
47379
47545
|
SUBTOTAL_CODES = {
|
|
@@ -47478,7 +47644,7 @@ function writeTables(ctx, sheet, partName, rels, headerText, formulas) {
|
|
|
47478
47644
|
const totals = totalsRowFormulas(sheet, table2, names2);
|
|
47479
47645
|
for (const [key, formula2] of totals) formulas.set(key, formula2);
|
|
47480
47646
|
let id = table2.id;
|
|
47481
|
-
const unchanged = table2.partName && sourceXml && !writer.has(table2.partName) && !ctx.tableIds.has(id) && forced.size === 0 && totals.size === 0 && table2 === original && sameModel(before, table2);
|
|
47647
|
+
const unchanged = table2.partName && sourceXml && !writer.has(table2.partName) && !ctx.tableIds.has(id) && forced.size === 0 && totals.size === 0 && table2 === original && sameModel(unresolvedTable(before), unresolvedTable(table2));
|
|
47482
47648
|
let part;
|
|
47483
47649
|
if (unchanged && table2.partName) {
|
|
47484
47650
|
part = table2.partName;
|
|
@@ -47486,7 +47652,7 @@ function writeTables(ctx, sheet, partName, rels, headerText, formulas) {
|
|
|
47486
47652
|
} else {
|
|
47487
47653
|
while (ctx.tableIds.has(id) || id < 1) id++;
|
|
47488
47654
|
part = table2.partName && !writer.has(table2.partName) ? table2.partName : writer.uniqueName((n) => `xl/tables/table${n}.xml`, ctx.reserved);
|
|
47489
|
-
const xml = (sourceXml && patchTableXml(sourceXml, sheet, table2, id, names2)) ?? tableXml(table2, id, names2);
|
|
47655
|
+
const xml = (sourceXml && patchTableXml(sourceXml, sheet, table2, id, names2, ctx.styles)) ?? tableXml(table2, id, names2, ctx.styles);
|
|
47490
47656
|
writer.add(part, xml, CONTENT_TYPES.table);
|
|
47491
47657
|
}
|
|
47492
47658
|
ctx.tableIds.add(id);
|
|
@@ -47530,6 +47696,7 @@ var init_sheet_parts = __esm({
|
|
|
47530
47696
|
init_drawing4();
|
|
47531
47697
|
init_snapshot();
|
|
47532
47698
|
init_vml_ids();
|
|
47699
|
+
init_sort_state2();
|
|
47533
47700
|
init_table_patch();
|
|
47534
47701
|
init_tables2();
|
|
47535
47702
|
}
|
|
@@ -47568,6 +47735,22 @@ var init_scenarios = __esm({
|
|
|
47568
47735
|
}
|
|
47569
47736
|
});
|
|
47570
47737
|
|
|
47738
|
+
// xlsx/write/ignored-errors.ts
|
|
47739
|
+
function ignoredErrorsXml(list2) {
|
|
47740
|
+
const items = (list2 ?? []).filter((e) => e.ranges.length && e.flags.length);
|
|
47741
|
+
if (!items.length) return "";
|
|
47742
|
+
const body = items.map((e) => {
|
|
47743
|
+
const flags = e.flags.map((flag2) => ` ${flag2}="1"`).join("");
|
|
47744
|
+
return `<ignoredError sqref="${e.ranges.map(formatRange).join(" ")}"${flags}/>`;
|
|
47745
|
+
}).join("");
|
|
47746
|
+
return `<ignoredErrors>${body}</ignoredErrors>`;
|
|
47747
|
+
}
|
|
47748
|
+
var init_ignored_errors = __esm({
|
|
47749
|
+
"xlsx/write/ignored-errors.ts"() {
|
|
47750
|
+
init_address();
|
|
47751
|
+
}
|
|
47752
|
+
});
|
|
47753
|
+
|
|
47571
47754
|
// xlsx/write/worksheet.ts
|
|
47572
47755
|
function writeWorksheet(ctx, sheet, index2, partName) {
|
|
47573
47756
|
const { writer, source: source3 } = ctx;
|
|
@@ -47614,7 +47797,9 @@ function writeWorksheet(ctx, sheet, index2, partName) {
|
|
|
47614
47797
|
blocks.set("scenarios", scenariosXml(sheet.scenarios));
|
|
47615
47798
|
blocks.set("customSheetViews", customSheetViewsXml(sheet.customViews));
|
|
47616
47799
|
blocks.set("autoFilter", autoFilterXml(sheet, ctx.styles));
|
|
47800
|
+
blocks.set("sortState", sheetSortStateXml(sheet, ctx.styles));
|
|
47617
47801
|
blocks.set("mergeCells", mergeCellsXml(sheet));
|
|
47802
|
+
blocks.set("ignoredErrors", ignoredErrorsXml(sheet.ignoredErrors));
|
|
47618
47803
|
blocks.set("conditionalFormatting", conditionalFormatsXml(sheet.conditionalFormats, ctx.styles));
|
|
47619
47804
|
blocks.set("dataValidations", dataValidationsXml(sheet.dataValidations));
|
|
47620
47805
|
const links = sheet.hyperlinks.map((link) => {
|
|
@@ -47673,9 +47858,11 @@ var init_worksheet2 = __esm({
|
|
|
47673
47858
|
init_page_setup();
|
|
47674
47859
|
init_sheet_data();
|
|
47675
47860
|
init_sheet_parts();
|
|
47861
|
+
init_sort_state2();
|
|
47676
47862
|
init_sheet_props2();
|
|
47677
47863
|
init_scenarios();
|
|
47678
47864
|
init_custom_views2();
|
|
47865
|
+
init_ignored_errors();
|
|
47679
47866
|
init_worksheet_children();
|
|
47680
47867
|
init_xml_out();
|
|
47681
47868
|
REGENERATED = /* @__PURE__ */ new Set([
|