@rowsncolumns/spreadsheet-state 28.0.66
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/LICENSE.md +100 -0
- package/Readme.md +65 -0
- package/dist/cjs/api/border.d.ts +9 -0
- package/dist/cjs/api/border.d.ts.map +1 -0
- package/dist/cjs/api/border.js +25 -0
- package/dist/cjs/api/conditional-format.d.ts +2 -0
- package/dist/cjs/api/conditional-format.d.ts.map +1 -0
- package/dist/cjs/api/conditional-format.js +5 -0
- package/dist/cjs/api/copy-paste.d.ts +20 -0
- package/dist/cjs/api/copy-paste.d.ts.map +1 -0
- package/dist/cjs/api/copy-paste.js +384 -0
- package/dist/cjs/api/data-validation.d.ts +2 -0
- package/dist/cjs/api/data-validation.d.ts.map +1 -0
- package/dist/cjs/api/data-validation.js +5 -0
- package/dist/cjs/api/datatype.d.ts +89 -0
- package/dist/cjs/api/datatype.d.ts.map +1 -0
- package/dist/cjs/api/datatype.js +671 -0
- package/dist/cjs/api/date.d.ts +27 -0
- package/dist/cjs/api/date.d.ts.map +1 -0
- package/dist/cjs/api/date.js +222 -0
- package/dist/cjs/api/decimals.d.ts +10 -0
- package/dist/cjs/api/decimals.d.ts.map +1 -0
- package/dist/cjs/api/decimals.js +192 -0
- package/dist/cjs/api/dependency.d.ts +64 -0
- package/dist/cjs/api/dependency.d.ts.map +1 -0
- package/dist/cjs/api/dependency.js +279 -0
- package/dist/cjs/api/fill.d.ts +88 -0
- package/dist/cjs/api/fill.d.ts.map +1 -0
- package/dist/cjs/api/fill.js +959 -0
- package/dist/cjs/api/filter-range.d.ts +4 -0
- package/dist/cjs/api/filter-range.d.ts.map +1 -0
- package/dist/cjs/api/filter-range.js +101 -0
- package/dist/cjs/api/filter.d.ts +24 -0
- package/dist/cjs/api/filter.d.ts.map +1 -0
- package/dist/cjs/api/filter.js +66 -0
- package/dist/cjs/api/format-caches.d.ts +43 -0
- package/dist/cjs/api/format-caches.d.ts.map +1 -0
- package/dist/cjs/api/format-caches.js +107 -0
- package/dist/cjs/api/formula.d.ts +69 -0
- package/dist/cjs/api/formula.d.ts.map +1 -0
- package/dist/cjs/api/formula.js +458 -0
- package/dist/cjs/api/immer-utils.d.ts +66 -0
- package/dist/cjs/api/immer-utils.d.ts.map +1 -0
- package/dist/cjs/api/immer-utils.js +1633 -0
- package/dist/cjs/api/intl.d.ts +51 -0
- package/dist/cjs/api/intl.d.ts.map +1 -0
- package/dist/cjs/api/intl.js +261 -0
- package/dist/cjs/api/merges.d.ts +7 -0
- package/dist/cjs/api/merges.d.ts.map +1 -0
- package/dist/cjs/api/merges.js +134 -0
- package/dist/cjs/api/outline.d.ts +33 -0
- package/dist/cjs/api/outline.d.ts.map +1 -0
- package/dist/cjs/api/outline.js +70 -0
- package/dist/cjs/api/parse-html.d.ts +15 -0
- package/dist/cjs/api/parse-html.d.ts.map +1 -0
- package/dist/cjs/api/parse-html.js +1066 -0
- package/dist/cjs/api/patches.d.ts +11 -0
- package/dist/cjs/api/patches.d.ts.map +1 -0
- package/dist/cjs/api/patches.js +218 -0
- package/dist/cjs/api/pivot-range.d.ts +8 -0
- package/dist/cjs/api/pivot-range.d.ts.map +1 -0
- package/dist/cjs/api/pivot-range.js +130 -0
- package/dist/cjs/api/range-rule-helpers.d.ts +65 -0
- package/dist/cjs/api/range-rule-helpers.d.ts.map +1 -0
- package/dist/cjs/api/range-rule-helpers.js +142 -0
- package/dist/cjs/api/range.d.ts +19 -0
- package/dist/cjs/api/range.d.ts.map +1 -0
- package/dist/cjs/api/range.js +183 -0
- package/dist/cjs/api/rename-sheet.d.ts +22 -0
- package/dist/cjs/api/rename-sheet.d.ts.map +1 -0
- package/dist/cjs/api/rename-sheet.js +54 -0
- package/dist/cjs/api/selection.d.ts +36 -0
- package/dist/cjs/api/selection.d.ts.map +1 -0
- package/dist/cjs/api/selection.js +133 -0
- package/dist/cjs/api/sort.d.ts +3 -0
- package/dist/cjs/api/sort.d.ts.map +1 -0
- package/dist/cjs/api/sort.js +33 -0
- package/dist/cjs/api/split-text.d.ts +2 -0
- package/dist/cjs/api/split-text.d.ts.map +1 -0
- package/dist/cjs/api/split-text.js +25 -0
- package/dist/cjs/api/structural-formula-update.d.ts +75 -0
- package/dist/cjs/api/structural-formula-update.d.ts.map +1 -0
- package/dist/cjs/api/structural-formula-update.js +508 -0
- package/dist/cjs/api/table.d.ts +39 -0
- package/dist/cjs/api/table.d.ts.map +1 -0
- package/dist/cjs/api/table.js +337 -0
- package/dist/cjs/api/validation.d.ts +12 -0
- package/dist/cjs/api/validation.d.ts.map +1 -0
- package/dist/cjs/api/validation.js +306 -0
- package/dist/cjs/api/xlsx-source.d.ts +22 -0
- package/dist/cjs/api/xlsx-source.d.ts.map +1 -0
- package/dist/cjs/api/xlsx-source.js +31 -0
- package/dist/cjs/atoms/delete-sheet-atom.d.ts +6 -0
- package/dist/cjs/atoms/delete-sheet-atom.d.ts.map +1 -0
- package/dist/cjs/atoms/delete-sheet-atom.js +4 -0
- package/dist/cjs/atoms/dialog-state.atom.d.ts +23 -0
- package/dist/cjs/atoms/dialog-state.atom.d.ts.map +1 -0
- package/dist/cjs/atoms/dialog-state.atom.js +72 -0
- package/dist/cjs/atoms/editing-data-validation-id.atom.d.ts +7 -0
- package/dist/cjs/atoms/editing-data-validation-id.atom.d.ts.map +1 -0
- package/dist/cjs/atoms/editing-data-validation-id.atom.js +12 -0
- package/dist/cjs/atoms/editing-embed.atom.d.ts +8 -0
- package/dist/cjs/atoms/editing-embed.atom.d.ts.map +1 -0
- package/dist/cjs/atoms/editing-embed.atom.js +5 -0
- package/dist/cjs/atoms/editing-table.atom.d.ts +8 -0
- package/dist/cjs/atoms/editing-table.atom.d.ts.map +1 -0
- package/dist/cjs/atoms/editing-table.atom.js +6 -0
- package/dist/cjs/atoms/error-state.atom.d.ts +10 -0
- package/dist/cjs/atoms/error-state.atom.d.ts.map +1 -0
- package/dist/cjs/atoms/error-state.atom.js +5 -0
- package/dist/cjs/atoms/index.d.ts +5 -0
- package/dist/cjs/atoms/index.d.ts.map +1 -0
- package/dist/cjs/atoms/index.js +4 -0
- package/dist/cjs/atoms/insert-image-state.atom.d.ts +6 -0
- package/dist/cjs/atoms/insert-image-state.atom.d.ts.map +1 -0
- package/dist/cjs/atoms/insert-image-state.atom.js +9 -0
- package/dist/cjs/atoms/named-range.atom.d.ts +8 -0
- package/dist/cjs/atoms/named-range.atom.d.ts.map +1 -0
- package/dist/cjs/atoms/named-range.atom.js +6 -0
- package/dist/cjs/atoms/resize-dimension.atom.d.ts +12 -0
- package/dist/cjs/atoms/resize-dimension.atom.d.ts.map +1 -0
- package/dist/cjs/atoms/resize-dimension.atom.js +5 -0
- package/dist/cjs/atoms/sheet-observer.atom.d.ts +16 -0
- package/dist/cjs/atoms/sheet-observer.atom.d.ts.map +1 -0
- package/dist/cjs/atoms/sheet-observer.atom.js +19 -0
- package/dist/cjs/cellxfs-registry.d.ts +37 -0
- package/dist/cjs/cellxfs-registry.d.ts.map +1 -0
- package/dist/cjs/cellxfs-registry.js +175 -0
- package/dist/cjs/commands.d.ts +691 -0
- package/dist/cjs/commands.d.ts.map +1 -0
- package/dist/cjs/commands.js +1 -0
- package/dist/cjs/components/dialogs/delete-sheet-confirmation.d.ts +7 -0
- package/dist/cjs/components/dialogs/delete-sheet-confirmation.d.ts.map +1 -0
- package/dist/cjs/components/dialogs/delete-sheet-confirmation.js +31 -0
- package/dist/cjs/components/dialogs/error-state.d.ts +3 -0
- package/dist/cjs/components/dialogs/error-state.d.ts.map +1 -0
- package/dist/cjs/components/dialogs/error-state.js +24 -0
- package/dist/cjs/components/editors/cell-format-editor.d.ts +26 -0
- package/dist/cjs/components/editors/cell-format-editor.d.ts.map +1 -0
- package/dist/cjs/components/editors/cell-format-editor.js +671 -0
- package/dist/cjs/components/editors/conditional-format-editor.d.ts +43 -0
- package/dist/cjs/components/editors/conditional-format-editor.d.ts.map +1 -0
- package/dist/cjs/components/editors/conditional-format-editor.js +176 -0
- package/dist/cjs/components/editors/conditional-format-rule-editor.d.ts +27 -0
- package/dist/cjs/components/editors/conditional-format-rule-editor.d.ts.map +1 -0
- package/dist/cjs/components/editors/conditional-format-rule-editor.js +640 -0
- package/dist/cjs/components/editors/data-validation-editor.d.ts +27 -0
- package/dist/cjs/components/editors/data-validation-editor.d.ts.map +1 -0
- package/dist/cjs/components/editors/data-validation-editor.js +163 -0
- package/dist/cjs/components/editors/data-validation-rule-editor.d.ts +17 -0
- package/dist/cjs/components/editors/data-validation-rule-editor.d.ts.map +1 -0
- package/dist/cjs/components/editors/data-validation-rule-editor.js +217 -0
- package/dist/cjs/components/editors/embed-editor.d.ts +19 -0
- package/dist/cjs/components/editors/embed-editor.d.ts.map +1 -0
- package/dist/cjs/components/editors/embed-editor.js +80 -0
- package/dist/cjs/components/editors/insert-image-editor.d.ts +20 -0
- package/dist/cjs/components/editors/insert-image-editor.d.ts.map +1 -0
- package/dist/cjs/components/editors/insert-image-editor.js +78 -0
- package/dist/cjs/components/editors/insert-link-editor.d.ts +20 -0
- package/dist/cjs/components/editors/insert-link-editor.d.ts.map +1 -0
- package/dist/cjs/components/editors/insert-link-editor.js +64 -0
- package/dist/cjs/components/editors/named-range-editor.d.ts +13 -0
- package/dist/cjs/components/editors/named-range-editor.d.ts.map +1 -0
- package/dist/cjs/components/editors/named-range-editor.js +106 -0
- package/dist/cjs/components/editors/resize-dimension-editor.d.ts +9 -0
- package/dist/cjs/components/editors/resize-dimension-editor.d.ts.map +1 -0
- package/dist/cjs/components/editors/resize-dimension-editor.js +62 -0
- package/dist/cjs/components/editors/sheet-filter.d.ts +59 -0
- package/dist/cjs/components/editors/sheet-filter.d.ts.map +1 -0
- package/dist/cjs/components/editors/sheet-filter.js +119 -0
- package/dist/cjs/components/editors/table-editor.d.ts +12 -0
- package/dist/cjs/components/editors/table-editor.d.ts.map +1 -0
- package/dist/cjs/components/editors/table-editor.js +105 -0
- package/dist/cjs/components/index.d.ts +13 -0
- package/dist/cjs/components/index.d.ts.map +1 -0
- package/dist/cjs/components/index.js +12 -0
- package/dist/cjs/generated-names.d.ts +51 -0
- package/dist/cjs/generated-names.d.ts.map +1 -0
- package/dist/cjs/generated-names.js +5 -0
- package/dist/cjs/helpers/iterative-calculation.d.ts +4 -0
- package/dist/cjs/helpers/iterative-calculation.d.ts.map +1 -0
- package/dist/cjs/helpers/iterative-calculation.js +44 -0
- package/dist/cjs/helpers/sheet-title.d.ts +5 -0
- package/dist/cjs/helpers/sheet-title.d.ts.map +1 -0
- package/dist/cjs/helpers/sheet-title.js +11 -0
- package/dist/cjs/helpers.d.ts +45 -0
- package/dist/cjs/helpers.d.ts.map +1 -0
- package/dist/cjs/helpers.js +154 -0
- package/dist/cjs/hooks/use-async-datasource.d.ts +57 -0
- package/dist/cjs/hooks/use-async-datasource.d.ts.map +1 -0
- package/dist/cjs/hooks/use-async-datasource.js +329 -0
- package/dist/cjs/hooks/use-calculation-initialize.d.ts +61 -0
- package/dist/cjs/hooks/use-calculation-initialize.d.ts.map +1 -0
- package/dist/cjs/hooks/use-calculation-initialize.js +800 -0
- package/dist/cjs/hooks/use-calculation-process-array.d.ts +20 -0
- package/dist/cjs/hooks/use-calculation-process-array.d.ts.map +1 -0
- package/dist/cjs/hooks/use-calculation-process-array.js +331 -0
- package/dist/cjs/hooks/use-calculation-queue.d.ts +10 -0
- package/dist/cjs/hooks/use-calculation-queue.d.ts.map +1 -0
- package/dist/cjs/hooks/use-calculation-queue.js +15 -0
- package/dist/cjs/hooks/use-calculation-worker.d.ts +37 -0
- package/dist/cjs/hooks/use-calculation-worker.d.ts.map +1 -0
- package/dist/cjs/hooks/use-calculation-worker.js +1868 -0
- package/dist/cjs/hooks/use-calculation.d.ts +173 -0
- package/dist/cjs/hooks/use-calculation.d.ts.map +1 -0
- package/dist/cjs/hooks/use-calculation.js +2735 -0
- package/dist/cjs/hooks/use-can-edit-cellrange.d.ts +31 -0
- package/dist/cjs/hooks/use-can-edit-cellrange.d.ts.map +1 -0
- package/dist/cjs/hooks/use-can-edit-cellrange.js +86 -0
- package/dist/cjs/hooks/use-cellxfs-registry.d.ts +6 -0
- package/dist/cjs/hooks/use-cellxfs-registry.d.ts.map +1 -0
- package/dist/cjs/hooks/use-cellxfs-registry.js +22 -0
- package/dist/cjs/hooks/use-citations.d.ts +19 -0
- package/dist/cjs/hooks/use-citations.d.ts.map +1 -0
- package/dist/cjs/hooks/use-citations.js +62 -0
- package/dist/cjs/hooks/use-comments.d.ts +14 -0
- package/dist/cjs/hooks/use-comments.d.ts.map +1 -0
- package/dist/cjs/hooks/use-comments.js +49 -0
- package/dist/cjs/hooks/use-conditional-formatting-rules.d.ts +22 -0
- package/dist/cjs/hooks/use-conditional-formatting-rules.d.ts.map +1 -0
- package/dist/cjs/hooks/use-conditional-formatting-rules.js +95 -0
- package/dist/cjs/hooks/use-data-validation-rules.d.ts +54 -0
- package/dist/cjs/hooks/use-data-validation-rules.d.ts.map +1 -0
- package/dist/cjs/hooks/use-data-validation-rules.js +151 -0
- package/dist/cjs/hooks/use-deferred-calculation-flush.d.ts +14 -0
- package/dist/cjs/hooks/use-deferred-calculation-flush.d.ts.map +1 -0
- package/dist/cjs/hooks/use-deferred-calculation-flush.js +81 -0
- package/dist/cjs/hooks/use-idle-scheduler.d.ts +5 -0
- package/dist/cjs/hooks/use-idle-scheduler.d.ts.map +1 -0
- package/dist/cjs/hooks/use-idle-scheduler.js +46 -0
- package/dist/cjs/hooks/use-indent.d.ts +23 -0
- package/dist/cjs/hooks/use-indent.d.ts.map +1 -0
- package/dist/cjs/hooks/use-indent.js +98 -0
- package/dist/cjs/hooks/use-named-range.d.ts +7 -0
- package/dist/cjs/hooks/use-named-range.d.ts.map +1 -0
- package/dist/cjs/hooks/use-named-range.js +70 -0
- package/dist/cjs/hooks/use-on-adjust-row-height.d.ts +11 -0
- package/dist/cjs/hooks/use-on-adjust-row-height.d.ts.map +1 -0
- package/dist/cjs/hooks/use-on-adjust-row-height.js +66 -0
- package/dist/cjs/hooks/use-on-autoresize.d.ts +17 -0
- package/dist/cjs/hooks/use-on-autoresize.d.ts.map +1 -0
- package/dist/cjs/hooks/use-on-autoresize.js +39 -0
- package/dist/cjs/hooks/use-on-banded-ranges.d.ts +15 -0
- package/dist/cjs/hooks/use-on-banded-ranges.d.ts.map +1 -0
- package/dist/cjs/hooks/use-on-banded-ranges.js +38 -0
- package/dist/cjs/hooks/use-on-calculation-begin.d.ts +14 -0
- package/dist/cjs/hooks/use-on-calculation-begin.d.ts.map +1 -0
- package/dist/cjs/hooks/use-on-calculation-begin.js +36 -0
- package/dist/cjs/hooks/use-on-calculation-success.d.ts +22 -0
- package/dist/cjs/hooks/use-on-calculation-success.d.ts.map +1 -0
- package/dist/cjs/hooks/use-on-calculation-success.js +182 -0
- package/dist/cjs/hooks/use-on-change-batch-stream.d.ts +7 -0
- package/dist/cjs/hooks/use-on-change-batch-stream.d.ts.map +1 -0
- package/dist/cjs/hooks/use-on-change-batch-stream.js +59 -0
- package/dist/cjs/hooks/use-on-change-batch.d.ts +54 -0
- package/dist/cjs/hooks/use-on-change-batch.d.ts.map +1 -0
- package/dist/cjs/hooks/use-on-change-batch.js +124 -0
- package/dist/cjs/hooks/use-on-change-calculated-column.d.ts +23 -0
- package/dist/cjs/hooks/use-on-change-calculated-column.d.ts.map +1 -0
- package/dist/cjs/hooks/use-on-change-calculated-column.js +30 -0
- package/dist/cjs/hooks/use-on-change-decimals.d.ts +22 -0
- package/dist/cjs/hooks/use-on-change-decimals.d.ts.map +1 -0
- package/dist/cjs/hooks/use-on-change-decimals.js +47 -0
- package/dist/cjs/hooks/use-on-change-formatting.d.ts +44 -0
- package/dist/cjs/hooks/use-on-change-formatting.d.ts.map +1 -0
- package/dist/cjs/hooks/use-on-change-formatting.js +165 -0
- package/dist/cjs/hooks/use-on-change-sheet-tabcolor.d.ts +11 -0
- package/dist/cjs/hooks/use-on-change-sheet-tabcolor.d.ts.map +1 -0
- package/dist/cjs/hooks/use-on-change-sheet-tabcolor.js +27 -0
- package/dist/cjs/hooks/use-on-change-table-column.d.ts +25 -0
- package/dist/cjs/hooks/use-on-change-table-column.d.ts.map +1 -0
- package/dist/cjs/hooks/use-on-change-table-column.js +53 -0
- package/dist/cjs/hooks/use-on-change-theme.d.ts +11 -0
- package/dist/cjs/hooks/use-on-change-theme.d.ts.map +1 -0
- package/dist/cjs/hooks/use-on-change-theme.js +20 -0
- package/dist/cjs/hooks/use-on-change.d.ts +61 -0
- package/dist/cjs/hooks/use-on-change.d.ts.map +1 -0
- package/dist/cjs/hooks/use-on-change.js +298 -0
- package/dist/cjs/hooks/use-on-clear-formatting.d.ts +17 -0
- package/dist/cjs/hooks/use-on-clear-formatting.d.ts.map +1 -0
- package/dist/cjs/hooks/use-on-clear-formatting.js +46 -0
- package/dist/cjs/hooks/use-on-collapse-column-group.d.ts +11 -0
- package/dist/cjs/hooks/use-on-collapse-column-group.d.ts.map +1 -0
- package/dist/cjs/hooks/use-on-collapse-column-group.js +47 -0
- package/dist/cjs/hooks/use-on-collapse-row-group.d.ts +18 -0
- package/dist/cjs/hooks/use-on-collapse-row-group.d.ts.map +1 -0
- package/dist/cjs/hooks/use-on-collapse-row-group.js +57 -0
- package/dist/cjs/hooks/use-on-copy.d.ts +49 -0
- package/dist/cjs/hooks/use-on-copy.d.ts.map +1 -0
- package/dist/cjs/hooks/use-on-copy.js +325 -0
- package/dist/cjs/hooks/use-on-create-named-range.d.ts +13 -0
- package/dist/cjs/hooks/use-on-create-named-range.d.ts.map +1 -0
- package/dist/cjs/hooks/use-on-create-named-range.js +33 -0
- package/dist/cjs/hooks/use-on-create-sheet.d.ts +23 -0
- package/dist/cjs/hooks/use-on-create-sheet.d.ts.map +1 -0
- package/dist/cjs/hooks/use-on-create-sheet.js +66 -0
- package/dist/cjs/hooks/use-on-delete-cells-shift-left.d.ts +28 -0
- package/dist/cjs/hooks/use-on-delete-cells-shift-left.d.ts.map +1 -0
- package/dist/cjs/hooks/use-on-delete-cells-shift-left.js +66 -0
- package/dist/cjs/hooks/use-on-delete-cells-shift-up.d.ts +28 -0
- package/dist/cjs/hooks/use-on-delete-cells-shift-up.d.ts.map +1 -0
- package/dist/cjs/hooks/use-on-delete-cells-shift-up.js +66 -0
- package/dist/cjs/hooks/use-on-delete-column.d.ts +38 -0
- package/dist/cjs/hooks/use-on-delete-column.d.ts.map +1 -0
- package/dist/cjs/hooks/use-on-delete-column.js +87 -0
- package/dist/cjs/hooks/use-on-delete-named-range.d.ts +14 -0
- package/dist/cjs/hooks/use-on-delete-named-range.d.ts.map +1 -0
- package/dist/cjs/hooks/use-on-delete-named-range.js +23 -0
- package/dist/cjs/hooks/use-on-delete-row.d.ts +38 -0
- package/dist/cjs/hooks/use-on-delete-row.d.ts.map +1 -0
- package/dist/cjs/hooks/use-on-delete-row.js +87 -0
- package/dist/cjs/hooks/use-on-delete-sheet.d.ts +16 -0
- package/dist/cjs/hooks/use-on-delete-sheet.d.ts.map +1 -0
- package/dist/cjs/hooks/use-on-delete-sheet.js +37 -0
- package/dist/cjs/hooks/use-on-delete-table-row.d.ts +29 -0
- package/dist/cjs/hooks/use-on-delete-table-row.d.ts.map +1 -0
- package/dist/cjs/hooks/use-on-delete-table-row.js +56 -0
- package/dist/cjs/hooks/use-on-delete.d.ts +33 -0
- package/dist/cjs/hooks/use-on-delete.d.ts.map +1 -0
- package/dist/cjs/hooks/use-on-delete.js +60 -0
- package/dist/cjs/hooks/use-on-drag-n-drop.d.ts +55 -0
- package/dist/cjs/hooks/use-on-drag-n-drop.d.ts.map +1 -0
- package/dist/cjs/hooks/use-on-drag-n-drop.js +191 -0
- package/dist/cjs/hooks/use-on-duplicate-sheet.d.ts +29 -0
- package/dist/cjs/hooks/use-on-duplicate-sheet.d.ts.map +1 -0
- package/dist/cjs/hooks/use-on-duplicate-sheet.js +65 -0
- package/dist/cjs/hooks/use-on-embeds.d.ts +19 -0
- package/dist/cjs/hooks/use-on-embeds.d.ts.map +1 -0
- package/dist/cjs/hooks/use-on-embeds.js +87 -0
- package/dist/cjs/hooks/use-on-expand-column-group.d.ts +11 -0
- package/dist/cjs/hooks/use-on-expand-column-group.d.ts.map +1 -0
- package/dist/cjs/hooks/use-on-expand-column-group.js +45 -0
- package/dist/cjs/hooks/use-on-expand-row-group.d.ts +18 -0
- package/dist/cjs/hooks/use-on-expand-row-group.d.ts.map +1 -0
- package/dist/cjs/hooks/use-on-expand-row-group.js +52 -0
- package/dist/cjs/hooks/use-on-fill-range.d.ts +9 -0
- package/dist/cjs/hooks/use-on-fill-range.d.ts.map +1 -0
- package/dist/cjs/hooks/use-on-fill-range.js +55 -0
- package/dist/cjs/hooks/use-on-fill.d.ts +29 -0
- package/dist/cjs/hooks/use-on-fill.d.ts.map +1 -0
- package/dist/cjs/hooks/use-on-fill.js +78 -0
- package/dist/cjs/hooks/use-on-filter-table.d.ts +76 -0
- package/dist/cjs/hooks/use-on-filter-table.d.ts.map +1 -0
- package/dist/cjs/hooks/use-on-filter-table.js +429 -0
- package/dist/cjs/hooks/use-on-find-replace.d.ts +19 -0
- package/dist/cjs/hooks/use-on-find-replace.d.ts.map +1 -0
- package/dist/cjs/hooks/use-on-find-replace.js +150 -0
- package/dist/cjs/hooks/use-on-freeze.d.ts +13 -0
- package/dist/cjs/hooks/use-on-freeze.d.ts.map +1 -0
- package/dist/cjs/hooks/use-on-freeze.js +56 -0
- package/dist/cjs/hooks/use-on-group-columns.d.ts +11 -0
- package/dist/cjs/hooks/use-on-group-columns.d.ts.map +1 -0
- package/dist/cjs/hooks/use-on-group-columns.js +49 -0
- package/dist/cjs/hooks/use-on-group-rows.d.ts +17 -0
- package/dist/cjs/hooks/use-on-group-rows.d.ts.map +1 -0
- package/dist/cjs/hooks/use-on-group-rows.js +55 -0
- package/dist/cjs/hooks/use-on-hide-column.d.ts +23 -0
- package/dist/cjs/hooks/use-on-hide-column.d.ts.map +1 -0
- package/dist/cjs/hooks/use-on-hide-column.js +55 -0
- package/dist/cjs/hooks/use-on-hide-row.d.ts +32 -0
- package/dist/cjs/hooks/use-on-hide-row.d.ts.map +1 -0
- package/dist/cjs/hooks/use-on-hide-row.js +58 -0
- package/dist/cjs/hooks/use-on-hide-show-sheet.d.ts +18 -0
- package/dist/cjs/hooks/use-on-hide-show-sheet.d.ts.map +1 -0
- package/dist/cjs/hooks/use-on-hide-show-sheet.js +90 -0
- package/dist/cjs/hooks/use-on-import-csv-legacy.d.ts +8 -0
- package/dist/cjs/hooks/use-on-import-csv-legacy.d.ts.map +1 -0
- package/dist/cjs/hooks/use-on-import-csv-legacy.js +165 -0
- package/dist/cjs/hooks/use-on-import-csv.d.ts +28 -0
- package/dist/cjs/hooks/use-on-import-csv.d.ts.map +1 -0
- package/dist/cjs/hooks/use-on-import-csv.js +332 -0
- package/dist/cjs/hooks/use-on-import-excel.d.ts +67 -0
- package/dist/cjs/hooks/use-on-import-excel.d.ts.map +1 -0
- package/dist/cjs/hooks/use-on-import-excel.js +689 -0
- package/dist/cjs/hooks/use-on-insert-autosum.d.ts +9 -0
- package/dist/cjs/hooks/use-on-insert-autosum.d.ts.map +1 -0
- package/dist/cjs/hooks/use-on-insert-autosum.js +105 -0
- package/dist/cjs/hooks/use-on-insert-cells-shift-down.d.ts +28 -0
- package/dist/cjs/hooks/use-on-insert-cells-shift-down.d.ts.map +1 -0
- package/dist/cjs/hooks/use-on-insert-cells-shift-down.js +66 -0
- package/dist/cjs/hooks/use-on-insert-cells-shift-right.d.ts +28 -0
- package/dist/cjs/hooks/use-on-insert-cells-shift-right.d.ts.map +1 -0
- package/dist/cjs/hooks/use-on-insert-cells-shift-right.js +66 -0
- package/dist/cjs/hooks/use-on-insert-checkbox.d.ts +17 -0
- package/dist/cjs/hooks/use-on-insert-checkbox.d.ts.map +1 -0
- package/dist/cjs/hooks/use-on-insert-checkbox.js +87 -0
- package/dist/cjs/hooks/use-on-insert-column.d.ts +40 -0
- package/dist/cjs/hooks/use-on-insert-column.d.ts.map +1 -0
- package/dist/cjs/hooks/use-on-insert-column.js +93 -0
- package/dist/cjs/hooks/use-on-insert-date-time.d.ts +4 -0
- package/dist/cjs/hooks/use-on-insert-date-time.d.ts.map +1 -0
- package/dist/cjs/hooks/use-on-insert-date-time.js +12 -0
- package/dist/cjs/hooks/use-on-insert-date.d.ts +4 -0
- package/dist/cjs/hooks/use-on-insert-date.d.ts.map +1 -0
- package/dist/cjs/hooks/use-on-insert-date.js +13 -0
- package/dist/cjs/hooks/use-on-insert-image.d.ts +24 -0
- package/dist/cjs/hooks/use-on-insert-image.d.ts.map +1 -0
- package/dist/cjs/hooks/use-on-insert-image.js +145 -0
- package/dist/cjs/hooks/use-on-insert-link.d.ts +25 -0
- package/dist/cjs/hooks/use-on-insert-link.d.ts.map +1 -0
- package/dist/cjs/hooks/use-on-insert-link.js +220 -0
- package/dist/cjs/hooks/use-on-insert-note.d.ts +4 -0
- package/dist/cjs/hooks/use-on-insert-note.d.ts.map +1 -0
- package/dist/cjs/hooks/use-on-insert-note.js +14 -0
- package/dist/cjs/hooks/use-on-insert-row.d.ts +38 -0
- package/dist/cjs/hooks/use-on-insert-row.d.ts.map +1 -0
- package/dist/cjs/hooks/use-on-insert-row.js +106 -0
- package/dist/cjs/hooks/use-on-insert-table-row.d.ts +31 -0
- package/dist/cjs/hooks/use-on-insert-table-row.d.ts.map +1 -0
- package/dist/cjs/hooks/use-on-insert-table-row.js +60 -0
- package/dist/cjs/hooks/use-on-insert-time.d.ts +4 -0
- package/dist/cjs/hooks/use-on-insert-time.d.ts.map +1 -0
- package/dist/cjs/hooks/use-on-insert-time.js +12 -0
- package/dist/cjs/hooks/use-on-locale-change.d.ts +35 -0
- package/dist/cjs/hooks/use-on-locale-change.d.ts.map +1 -0
- package/dist/cjs/hooks/use-on-locale-change.js +314 -0
- package/dist/cjs/hooks/use-on-merge-unmerge-cells.d.ts +28 -0
- package/dist/cjs/hooks/use-on-merge-unmerge-cells.d.ts.map +1 -0
- package/dist/cjs/hooks/use-on-merge-unmerge-cells.js +366 -0
- package/dist/cjs/hooks/use-on-move-columns.d.ts +28 -0
- package/dist/cjs/hooks/use-on-move-columns.d.ts.map +1 -0
- package/dist/cjs/hooks/use-on-move-columns.js +378 -0
- package/dist/cjs/hooks/use-on-move-rows.d.ts +30 -0
- package/dist/cjs/hooks/use-on-move-rows.d.ts.map +1 -0
- package/dist/cjs/hooks/use-on-move-rows.js +293 -0
- package/dist/cjs/hooks/use-on-move-selection.d.ts +35 -0
- package/dist/cjs/hooks/use-on-move-selection.d.ts.map +1 -0
- package/dist/cjs/hooks/use-on-move-selection.js +477 -0
- package/dist/cjs/hooks/use-on-move-sheet.d.ts +12 -0
- package/dist/cjs/hooks/use-on-move-sheet.d.ts.map +1 -0
- package/dist/cjs/hooks/use-on-move-sheet.js +68 -0
- package/dist/cjs/hooks/use-on-move-table-columns.d.ts +21 -0
- package/dist/cjs/hooks/use-on-move-table-columns.d.ts.map +1 -0
- package/dist/cjs/hooks/use-on-move-table-columns.js +249 -0
- package/dist/cjs/hooks/use-on-paste.d.ts +79 -0
- package/dist/cjs/hooks/use-on-paste.d.ts.map +1 -0
- package/dist/cjs/hooks/use-on-paste.js +985 -0
- package/dist/cjs/hooks/use-on-protect-range.d.ts +20 -0
- package/dist/cjs/hooks/use-on-protect-range.d.ts.map +1 -0
- package/dist/cjs/hooks/use-on-protect-range.js +67 -0
- package/dist/cjs/hooks/use-on-protect-sheet.d.ts +19 -0
- package/dist/cjs/hooks/use-on-protect-sheet.d.ts.map +1 -0
- package/dist/cjs/hooks/use-on-protect-sheet.js +65 -0
- package/dist/cjs/hooks/use-on-remove-duplicates.d.ts +21 -0
- package/dist/cjs/hooks/use-on-remove-duplicates.d.ts.map +1 -0
- package/dist/cjs/hooks/use-on-remove-duplicates.js +40 -0
- package/dist/cjs/hooks/use-on-rename-sheet.d.ts +21 -0
- package/dist/cjs/hooks/use-on-rename-sheet.d.ts.map +1 -0
- package/dist/cjs/hooks/use-on-rename-sheet.js +80 -0
- package/dist/cjs/hooks/use-on-request-calculate-wrapper.d.ts +30 -0
- package/dist/cjs/hooks/use-on-request-calculate-wrapper.d.ts.map +1 -0
- package/dist/cjs/hooks/use-on-request-calculate-wrapper.js +90 -0
- package/dist/cjs/hooks/use-on-request-conditional-format.d.ts +2 -0
- package/dist/cjs/hooks/use-on-request-conditional-format.d.ts.map +1 -0
- package/dist/cjs/hooks/use-on-request-conditional-format.js +8 -0
- package/dist/cjs/hooks/use-on-request-data-validation.d.ts +7 -0
- package/dist/cjs/hooks/use-on-request-data-validation.d.ts.map +1 -0
- package/dist/cjs/hooks/use-on-request-data-validation.js +23 -0
- package/dist/cjs/hooks/use-on-request-define-named-range.d.ts +8 -0
- package/dist/cjs/hooks/use-on-request-define-named-range.d.ts.map +1 -0
- package/dist/cjs/hooks/use-on-request-define-named-range.js +19 -0
- package/dist/cjs/hooks/use-on-request-delete-sheet.d.ts +2 -0
- package/dist/cjs/hooks/use-on-request-delete-sheet.d.ts.map +1 -0
- package/dist/cjs/hooks/use-on-request-delete-sheet.js +12 -0
- package/dist/cjs/hooks/use-on-request-edit-table.d.ts +3 -0
- package/dist/cjs/hooks/use-on-request-edit-table.d.ts.map +1 -0
- package/dist/cjs/hooks/use-on-request-edit-table.js +11 -0
- package/dist/cjs/hooks/use-on-request-format-cells.d.ts +2 -0
- package/dist/cjs/hooks/use-on-request-format-cells.d.ts.map +1 -0
- package/dist/cjs/hooks/use-on-request-format-cells.js +8 -0
- package/dist/cjs/hooks/use-on-request-insert-image.d.ts +3 -0
- package/dist/cjs/hooks/use-on-request-insert-image.d.ts.map +1 -0
- package/dist/cjs/hooks/use-on-request-insert-image.js +12 -0
- package/dist/cjs/hooks/use-on-request-insert-link.d.ts +5 -0
- package/dist/cjs/hooks/use-on-request-insert-link.d.ts.map +1 -0
- package/dist/cjs/hooks/use-on-request-insert-link.js +9 -0
- package/dist/cjs/hooks/use-on-request-resize.d.ts +3 -0
- package/dist/cjs/hooks/use-on-request-resize.d.ts.map +1 -0
- package/dist/cjs/hooks/use-on-request-resize.js +13 -0
- package/dist/cjs/hooks/use-on-request-update-named-range.d.ts +3 -0
- package/dist/cjs/hooks/use-on-request-update-named-range.d.ts.map +1 -0
- package/dist/cjs/hooks/use-on-request-update-named-range.js +11 -0
- package/dist/cjs/hooks/use-on-resize-table.d.ts +33 -0
- package/dist/cjs/hooks/use-on-resize-table.d.ts.map +1 -0
- package/dist/cjs/hooks/use-on-resize-table.js +218 -0
- package/dist/cjs/hooks/use-on-resize.d.ts +19 -0
- package/dist/cjs/hooks/use-on-resize.d.ts.map +1 -0
- package/dist/cjs/hooks/use-on-resize.js +55 -0
- package/dist/cjs/hooks/use-on-set-outline-depth.d.ts +17 -0
- package/dist/cjs/hooks/use-on-set-outline-depth.d.ts.map +1 -0
- package/dist/cjs/hooks/use-on-set-outline-depth.js +96 -0
- package/dist/cjs/hooks/use-on-show-column.d.ts +16 -0
- package/dist/cjs/hooks/use-on-show-column.d.ts.map +1 -0
- package/dist/cjs/hooks/use-on-show-column.js +96 -0
- package/dist/cjs/hooks/use-on-show-row.d.ts +22 -0
- package/dist/cjs/hooks/use-on-show-row.d.ts.map +1 -0
- package/dist/cjs/hooks/use-on-show-row.js +99 -0
- package/dist/cjs/hooks/use-on-sort-column.d.ts +53 -0
- package/dist/cjs/hooks/use-on-sort-column.d.ts.map +1 -0
- package/dist/cjs/hooks/use-on-sort-column.js +300 -0
- package/dist/cjs/hooks/use-on-sort-range.d.ts +42 -0
- package/dist/cjs/hooks/use-on-sort-range.d.ts.map +1 -0
- package/dist/cjs/hooks/use-on-sort-range.js +252 -0
- package/dist/cjs/hooks/use-on-sort-table.d.ts +59 -0
- package/dist/cjs/hooks/use-on-sort-table.d.ts.map +1 -0
- package/dist/cjs/hooks/use-on-sort-table.js +345 -0
- package/dist/cjs/hooks/use-on-table.d.ts +49 -0
- package/dist/cjs/hooks/use-on-table.d.ts.map +1 -0
- package/dist/cjs/hooks/use-on-table.js +386 -0
- package/dist/cjs/hooks/use-on-trace-dependents-precedents.d.ts +14 -0
- package/dist/cjs/hooks/use-on-trace-dependents-precedents.d.ts.map +1 -0
- package/dist/cjs/hooks/use-on-trace-dependents-precedents.js +146 -0
- package/dist/cjs/hooks/use-on-ungroup-columns.d.ts +11 -0
- package/dist/cjs/hooks/use-on-ungroup-columns.d.ts.map +1 -0
- package/dist/cjs/hooks/use-on-ungroup-columns.js +57 -0
- package/dist/cjs/hooks/use-on-ungroup-rows.d.ts +17 -0
- package/dist/cjs/hooks/use-on-ungroup-rows.d.ts.map +1 -0
- package/dist/cjs/hooks/use-on-ungroup-rows.js +63 -0
- package/dist/cjs/hooks/use-on-update-named-range.d.ts +19 -0
- package/dist/cjs/hooks/use-on-update-named-range.d.ts.map +1 -0
- package/dist/cjs/hooks/use-on-update-named-range.js +133 -0
- package/dist/cjs/hooks/use-on-update-note.d.ts +13 -0
- package/dist/cjs/hooks/use-on-update-note.d.ts.map +1 -0
- package/dist/cjs/hooks/use-on-update-note.js +21 -0
- package/dist/cjs/hooks/use-on-update-sheet.d.ts +10 -0
- package/dist/cjs/hooks/use-on-update-sheet.d.ts.map +1 -0
- package/dist/cjs/hooks/use-on-update-sheet.js +12 -0
- package/dist/cjs/hooks/use-paint-format.d.ts +17 -0
- package/dist/cjs/hooks/use-paint-format.d.ts.map +1 -0
- package/dist/cjs/hooks/use-paint-format.js +118 -0
- package/dist/cjs/hooks/use-search.d.ts +81 -0
- package/dist/cjs/hooks/use-search.d.ts.map +1 -0
- package/dist/cjs/hooks/use-search.js +261 -0
- package/dist/cjs/hooks/use-select-next-prev-sheet.d.ts +11 -0
- package/dist/cjs/hooks/use-select-next-prev-sheet.d.ts.map +1 -0
- package/dist/cjs/hooks/use-select-next-prev-sheet.js +22 -0
- package/dist/cjs/hooks/use-sheet-observer.d.ts +20 -0
- package/dist/cjs/hooks/use-sheet-observer.d.ts.map +1 -0
- package/dist/cjs/hooks/use-sheet-observer.js +127 -0
- package/dist/cjs/hooks/use-sheet-properties.d.ts +105 -0
- package/dist/cjs/hooks/use-sheet-properties.d.ts.map +1 -0
- package/dist/cjs/hooks/use-sheet-properties.js +1019 -0
- package/dist/cjs/hooks/use-sheet-state.d.ts +17 -0
- package/dist/cjs/hooks/use-sheet-state.d.ts.map +1 -0
- package/dist/cjs/hooks/use-sheet-state.js +84 -0
- package/dist/cjs/hooks/use-sheetdata-subscriber.d.ts +10 -0
- package/dist/cjs/hooks/use-sheetdata-subscriber.d.ts.map +1 -0
- package/dist/cjs/hooks/use-sheetdata-subscriber.js +15 -0
- package/dist/cjs/hooks/use-slicers.d.ts +19 -0
- package/dist/cjs/hooks/use-slicers.d.ts.map +1 -0
- package/dist/cjs/hooks/use-slicers.js +84 -0
- package/dist/cjs/hooks/use-split-text-to-columns.d.ts +19 -0
- package/dist/cjs/hooks/use-split-text-to-columns.d.ts.map +1 -0
- package/dist/cjs/hooks/use-split-text-to-columns.js +32 -0
- package/dist/cjs/hooks/use-spreadsheet-state.d.ts +627 -0
- package/dist/cjs/hooks/use-spreadsheet-state.d.ts.map +1 -0
- package/dist/cjs/hooks/use-spreadsheet-state.js +2038 -0
- package/dist/cjs/hooks/use-ss-registry.d.ts +6 -0
- package/dist/cjs/hooks/use-ss-registry.d.ts.map +1 -0
- package/dist/cjs/hooks/use-ss-registry.js +17 -0
- package/dist/cjs/hooks/use-structured-reference.d.ts +8 -0
- package/dist/cjs/hooks/use-structured-reference.d.ts.map +1 -0
- package/dist/cjs/hooks/use-structured-reference.js +132 -0
- package/dist/cjs/hooks/use-undo-redo-actions.d.ts +40 -0
- package/dist/cjs/hooks/use-undo-redo-actions.d.ts.map +1 -0
- package/dist/cjs/hooks/use-undo-redo-actions.js +209 -0
- package/dist/cjs/hooks/use-undo-redo.d.ts +69 -0
- package/dist/cjs/hooks/use-undo-redo.d.ts.map +1 -0
- package/dist/cjs/hooks/use-undo-redo.js +124 -0
- package/dist/cjs/hooks/utils/frozen-sort.d.ts +9 -0
- package/dist/cjs/hooks/utils/frozen-sort.d.ts.map +1 -0
- package/dist/cjs/hooks/utils/frozen-sort.js +28 -0
- package/dist/cjs/hooks/utils/sort-rows.d.ts +32 -0
- package/dist/cjs/hooks/utils/sort-rows.d.ts.map +1 -0
- package/dist/cjs/hooks/utils/sort-rows.js +113 -0
- package/dist/cjs/index.d.ts +38 -0
- package/dist/cjs/index.d.ts.map +1 -0
- package/dist/cjs/index.js +39 -0
- package/dist/cjs/interface/apply-fill.d.ts +6 -0
- package/dist/cjs/interface/apply-fill.d.ts.map +1 -0
- package/dist/cjs/interface/apply-fill.js +203 -0
- package/dist/cjs/interface/auto-resize.d.ts +4 -0
- package/dist/cjs/interface/auto-resize.d.ts.map +1 -0
- package/dist/cjs/interface/auto-resize.js +63 -0
- package/dist/cjs/interface/calculation-interface.d.ts +67 -0
- package/dist/cjs/interface/calculation-interface.d.ts.map +1 -0
- package/dist/cjs/interface/calculation-interface.js +409 -0
- package/dist/cjs/interface/change-batch-stream.d.ts +25 -0
- package/dist/cjs/interface/change-batch-stream.d.ts.map +1 -0
- package/dist/cjs/interface/change-batch-stream.js +428 -0
- package/dist/cjs/interface/change-batch.d.ts +39 -0
- package/dist/cjs/interface/change-batch.d.ts.map +1 -0
- package/dist/cjs/interface/change-batch.js +329 -0
- package/dist/cjs/interface/change-border.d.ts +5 -0
- package/dist/cjs/interface/change-border.d.ts.map +1 -0
- package/dist/cjs/interface/change-border.js +141 -0
- package/dist/cjs/interface/change-calculated-column.d.ts +5 -0
- package/dist/cjs/interface/change-calculated-column.d.ts.map +1 -0
- package/dist/cjs/interface/change-calculated-column.js +131 -0
- package/dist/cjs/interface/change-decimals.d.ts +7 -0
- package/dist/cjs/interface/change-decimals.d.ts.map +1 -0
- package/dist/cjs/interface/change-decimals.js +82 -0
- package/dist/cjs/interface/change-formatting.d.ts +4 -0
- package/dist/cjs/interface/change-formatting.d.ts.map +1 -0
- package/dist/cjs/interface/change-formatting.js +240 -0
- package/dist/cjs/interface/change-sheet-tabcolor.d.ts +4 -0
- package/dist/cjs/interface/change-sheet-tabcolor.d.ts.map +1 -0
- package/dist/cjs/interface/change-sheet-tabcolor.js +21 -0
- package/dist/cjs/interface/change-table-column.d.ts +49 -0
- package/dist/cjs/interface/change-table-column.d.ts.map +1 -0
- package/dist/cjs/interface/change-table-column.js +267 -0
- package/dist/cjs/interface/change-theme.d.ts +4 -0
- package/dist/cjs/interface/change-theme.d.ts.map +1 -0
- package/dist/cjs/interface/change-theme.js +23 -0
- package/dist/cjs/interface/chart-extensions.d.ts +32 -0
- package/dist/cjs/interface/chart-extensions.d.ts.map +1 -0
- package/dist/cjs/interface/chart-extensions.js +71 -0
- package/dist/cjs/interface/citations.d.ts +33 -0
- package/dist/cjs/interface/citations.d.ts.map +1 -0
- package/dist/cjs/interface/citations.js +142 -0
- package/dist/cjs/interface/clear-formatting.d.ts +5 -0
- package/dist/cjs/interface/clear-formatting.d.ts.map +1 -0
- package/dist/cjs/interface/clear-formatting.js +72 -0
- package/dist/cjs/interface/conditional-formatting-rules.d.ts +7 -0
- package/dist/cjs/interface/conditional-formatting-rules.d.ts.map +1 -0
- package/dist/cjs/interface/conditional-formatting-rules.js +191 -0
- package/dist/cjs/interface/create-table.d.ts +5 -0
- package/dist/cjs/interface/create-table.d.ts.map +1 -0
- package/dist/cjs/interface/create-table.js +96 -0
- package/dist/cjs/interface/data-validation-rules.d.ts +25 -0
- package/dist/cjs/interface/data-validation-rules.d.ts.map +1 -0
- package/dist/cjs/interface/data-validation-rules.js +366 -0
- package/dist/cjs/interface/data-validation-utils.d.ts +12 -0
- package/dist/cjs/interface/data-validation-utils.d.ts.map +1 -0
- package/dist/cjs/interface/data-validation-utils.js +118 -0
- package/dist/cjs/interface/delete-cells-shift-left.d.ts +5 -0
- package/dist/cjs/interface/delete-cells-shift-left.d.ts.map +1 -0
- package/dist/cjs/interface/delete-cells-shift-left.js +160 -0
- package/dist/cjs/interface/delete-cells-shift-up.d.ts +5 -0
- package/dist/cjs/interface/delete-cells-shift-up.d.ts.map +1 -0
- package/dist/cjs/interface/delete-cells-shift-up.js +152 -0
- package/dist/cjs/interface/delete-cells.d.ts +6 -0
- package/dist/cjs/interface/delete-cells.d.ts.map +1 -0
- package/dist/cjs/interface/delete-cells.js +231 -0
- package/dist/cjs/interface/delete-column.d.ts +4 -0
- package/dist/cjs/interface/delete-column.d.ts.map +1 -0
- package/dist/cjs/interface/delete-column.js +306 -0
- package/dist/cjs/interface/delete-row.d.ts +4 -0
- package/dist/cjs/interface/delete-row.d.ts.map +1 -0
- package/dist/cjs/interface/delete-row.js +227 -0
- package/dist/cjs/interface/delete-sheet.d.ts +4 -0
- package/dist/cjs/interface/delete-sheet.d.ts.map +1 -0
- package/dist/cjs/interface/delete-sheet.js +81 -0
- package/dist/cjs/interface/delete-table-column.d.ts +4 -0
- package/dist/cjs/interface/delete-table-column.d.ts.map +1 -0
- package/dist/cjs/interface/delete-table-column.js +349 -0
- package/dist/cjs/interface/delete-table-row.d.ts +4 -0
- package/dist/cjs/interface/delete-table-row.d.ts.map +1 -0
- package/dist/cjs/interface/delete-table-row.js +313 -0
- package/dist/cjs/interface/duplicate-sheet.d.ts +4 -0
- package/dist/cjs/interface/duplicate-sheet.d.ts.map +1 -0
- package/dist/cjs/interface/duplicate-sheet.js +232 -0
- package/dist/cjs/interface/embeds.d.ts +9 -0
- package/dist/cjs/interface/embeds.d.ts.map +1 -0
- package/dist/cjs/interface/embeds.js +121 -0
- package/dist/cjs/interface/freeze.d.ts +5 -0
- package/dist/cjs/interface/freeze.d.ts.map +1 -0
- package/dist/cjs/interface/freeze.js +160 -0
- package/dist/cjs/interface/helpers.d.ts +6 -0
- package/dist/cjs/interface/helpers.d.ts.map +1 -0
- package/dist/cjs/interface/helpers.js +44 -0
- package/dist/cjs/interface/hide-column.d.ts +4 -0
- package/dist/cjs/interface/hide-column.d.ts.map +1 -0
- package/dist/cjs/interface/hide-column.js +68 -0
- package/dist/cjs/interface/hide-row.d.ts +4 -0
- package/dist/cjs/interface/hide-row.d.ts.map +1 -0
- package/dist/cjs/interface/hide-row.js +65 -0
- package/dist/cjs/interface/indent.d.ts +7 -0
- package/dist/cjs/interface/indent.d.ts.map +1 -0
- package/dist/cjs/interface/indent.js +97 -0
- package/dist/cjs/interface/insert-cells-shift-down.d.ts +5 -0
- package/dist/cjs/interface/insert-cells-shift-down.d.ts.map +1 -0
- package/dist/cjs/interface/insert-cells-shift-down.js +154 -0
- package/dist/cjs/interface/insert-cells-shift-right.d.ts +5 -0
- package/dist/cjs/interface/insert-cells-shift-right.d.ts.map +1 -0
- package/dist/cjs/interface/insert-cells-shift-right.js +150 -0
- package/dist/cjs/interface/insert-column.d.ts +7 -0
- package/dist/cjs/interface/insert-column.d.ts.map +1 -0
- package/dist/cjs/interface/insert-column.js +645 -0
- package/dist/cjs/interface/insert-note.d.ts +5 -0
- package/dist/cjs/interface/insert-note.d.ts.map +1 -0
- package/dist/cjs/interface/insert-note.js +27 -0
- package/dist/cjs/interface/insert-row.d.ts +4 -0
- package/dist/cjs/interface/insert-row.d.ts.map +1 -0
- package/dist/cjs/interface/insert-row.js +188 -0
- package/dist/cjs/interface/insert-table-row.d.ts +4 -0
- package/dist/cjs/interface/insert-table-row.d.ts.map +1 -0
- package/dist/cjs/interface/insert-table-row.js +348 -0
- package/dist/cjs/interface/interface-cli.d.ts +3 -0
- package/dist/cjs/interface/interface-cli.d.ts.map +1 -0
- package/dist/cjs/interface/interface-cli.js +76 -0
- package/dist/cjs/interface/named-range-operations.d.ts +19 -0
- package/dist/cjs/interface/named-range-operations.d.ts.map +1 -0
- package/dist/cjs/interface/named-range-operations.js +96 -0
- package/dist/cjs/interface/new-sheet.d.ts +4 -0
- package/dist/cjs/interface/new-sheet.d.ts.map +1 -0
- package/dist/cjs/interface/new-sheet.js +109 -0
- package/dist/cjs/interface/pivot-extensions.d.ts +27 -0
- package/dist/cjs/interface/pivot-extensions.d.ts.map +1 -0
- package/dist/cjs/interface/pivot-extensions.js +62 -0
- package/dist/cjs/interface/remove-duplicates.d.ts +11 -0
- package/dist/cjs/interface/remove-duplicates.d.ts.map +1 -0
- package/dist/cjs/interface/remove-duplicates.js +132 -0
- package/dist/cjs/interface/remove-table.d.ts +4 -0
- package/dist/cjs/interface/remove-table.d.ts.map +1 -0
- package/dist/cjs/interface/remove-table.js +53 -0
- package/dist/cjs/interface/resize-utils.d.ts +18 -0
- package/dist/cjs/interface/resize-utils.d.ts.map +1 -0
- package/dist/cjs/interface/resize-utils.js +60 -0
- package/dist/cjs/interface/resize.d.ts +5 -0
- package/dist/cjs/interface/resize.d.ts.map +1 -0
- package/dist/cjs/interface/resize.js +56 -0
- package/dist/cjs/interface/slicers.d.ts +9 -0
- package/dist/cjs/interface/slicers.d.ts.map +1 -0
- package/dist/cjs/interface/slicers.js +113 -0
- package/dist/cjs/interface/split-text.d.ts +5 -0
- package/dist/cjs/interface/split-text.d.ts.map +1 -0
- package/dist/cjs/interface/split-text.js +120 -0
- package/dist/cjs/interface/spreadsheet-interface.d.ts +642 -0
- package/dist/cjs/interface/spreadsheet-interface.d.ts.map +1 -0
- package/dist/cjs/interface/spreadsheet-interface.js +2787 -0
- package/dist/cjs/interface/table-totalrow.d.ts +20 -0
- package/dist/cjs/interface/table-totalrow.d.ts.map +1 -0
- package/dist/cjs/interface/table-totalrow.js +170 -0
- package/dist/cjs/interface/table-utils.d.ts +21 -0
- package/dist/cjs/interface/table-utils.d.ts.map +1 -0
- package/dist/cjs/interface/table-utils.js +44 -0
- package/dist/cjs/interface/update-sheet.d.ts +16 -0
- package/dist/cjs/interface/update-sheet.d.ts.map +1 -0
- package/dist/cjs/interface/update-sheet.js +63 -0
- package/dist/cjs/interface/update-table.d.ts +4 -0
- package/dist/cjs/interface/update-table.d.ts.map +1 -0
- package/dist/cjs/interface/update-table.js +109 -0
- package/dist/cjs/server-utils.d.ts +8 -0
- package/dist/cjs/server-utils.d.ts.map +1 -0
- package/dist/cjs/server-utils.js +3 -0
- package/dist/cjs/server.browser.d.ts +9 -0
- package/dist/cjs/server.browser.d.ts.map +1 -0
- package/dist/cjs/server.browser.js +5 -0
- package/dist/cjs/server.d.ts +9 -0
- package/dist/cjs/server.d.ts.map +1 -0
- package/dist/cjs/server.js +5 -0
- package/dist/cjs/shared-string-registry.d.ts +35 -0
- package/dist/cjs/shared-string-registry.d.ts.map +1 -0
- package/dist/cjs/shared-string-registry.js +314 -0
- package/dist/cjs/sheet-cell.d.ts +310 -0
- package/dist/cjs/sheet-cell.d.ts.map +1 -0
- package/dist/cjs/sheet-cell.js +1809 -0
- package/dist/cjs/test-setup.d.ts +2 -0
- package/dist/cjs/test-setup.d.ts.map +1 -0
- package/dist/cjs/test-setup.js +3 -0
- package/dist/cjs/tsconfig.cjs.tsbuildinfo +1 -0
- package/dist/cjs/types.d.ts +44 -0
- package/dist/cjs/types.d.ts.map +1 -0
- package/dist/cjs/types.js +33 -0
- package/dist/cjs/validation-schema/table.schema.d.ts +6 -0
- package/dist/cjs/validation-schema/table.schema.d.ts.map +1 -0
- package/dist/cjs/validation-schema/table.schema.js +4 -0
- package/dist/cjs/vitest.config.d.ts +3 -0
- package/dist/cjs/vitest.config.d.ts.map +1 -0
- package/dist/cjs/vitest.config.js +22 -0
- package/dist/esm/api/border.d.ts +9 -0
- package/dist/esm/api/border.d.ts.map +1 -0
- package/dist/esm/api/border.js +25 -0
- package/dist/esm/api/conditional-format.d.ts +2 -0
- package/dist/esm/api/conditional-format.d.ts.map +1 -0
- package/dist/esm/api/conditional-format.js +5 -0
- package/dist/esm/api/copy-paste.d.ts +20 -0
- package/dist/esm/api/copy-paste.d.ts.map +1 -0
- package/dist/esm/api/copy-paste.js +302 -0
- package/dist/esm/api/data-validation.d.ts +2 -0
- package/dist/esm/api/data-validation.d.ts.map +1 -0
- package/dist/esm/api/data-validation.js +5 -0
- package/dist/esm/api/datatype.d.ts +89 -0
- package/dist/esm/api/datatype.d.ts.map +1 -0
- package/dist/esm/api/datatype.js +639 -0
- package/dist/esm/api/date.d.ts +27 -0
- package/dist/esm/api/date.d.ts.map +1 -0
- package/dist/esm/api/date.js +220 -0
- package/dist/esm/api/decimals.d.ts +10 -0
- package/dist/esm/api/decimals.d.ts.map +1 -0
- package/dist/esm/api/decimals.js +181 -0
- package/dist/esm/api/dependency.d.ts +64 -0
- package/dist/esm/api/dependency.d.ts.map +1 -0
- package/dist/esm/api/dependency.js +251 -0
- package/dist/esm/api/fill.d.ts +88 -0
- package/dist/esm/api/fill.d.ts.map +1 -0
- package/dist/esm/api/fill.js +919 -0
- package/dist/esm/api/filter-range.d.ts +4 -0
- package/dist/esm/api/filter-range.d.ts.map +1 -0
- package/dist/esm/api/filter-range.js +100 -0
- package/dist/esm/api/filter.d.ts +24 -0
- package/dist/esm/api/filter.d.ts.map +1 -0
- package/dist/esm/api/filter.js +62 -0
- package/dist/esm/api/format-caches.d.ts +43 -0
- package/dist/esm/api/format-caches.d.ts.map +1 -0
- package/dist/esm/api/format-caches.js +95 -0
- package/dist/esm/api/formula.d.ts +69 -0
- package/dist/esm/api/formula.d.ts.map +1 -0
- package/dist/esm/api/formula.js +422 -0
- package/dist/esm/api/immer-utils.d.ts +66 -0
- package/dist/esm/api/immer-utils.d.ts.map +1 -0
- package/dist/esm/api/immer-utils.js +1552 -0
- package/dist/esm/api/intl.d.ts +51 -0
- package/dist/esm/api/intl.d.ts.map +1 -0
- package/dist/esm/api/intl.js +257 -0
- package/dist/esm/api/merges.d.ts +7 -0
- package/dist/esm/api/merges.d.ts.map +1 -0
- package/dist/esm/api/merges.js +174 -0
- package/dist/esm/api/outline.d.ts +33 -0
- package/dist/esm/api/outline.d.ts.map +1 -0
- package/dist/esm/api/outline.js +56 -0
- package/dist/esm/api/parse-html.d.ts +15 -0
- package/dist/esm/api/parse-html.d.ts.map +1 -0
- package/dist/esm/api/parse-html.js +865 -0
- package/dist/esm/api/patches.d.ts +11 -0
- package/dist/esm/api/patches.d.ts.map +1 -0
- package/dist/esm/api/patches.js +206 -0
- package/dist/esm/api/pivot-range.d.ts +8 -0
- package/dist/esm/api/pivot-range.d.ts.map +1 -0
- package/dist/esm/api/pivot-range.js +93 -0
- package/dist/esm/api/range-rule-helpers.d.ts +65 -0
- package/dist/esm/api/range-rule-helpers.d.ts.map +1 -0
- package/dist/esm/api/range-rule-helpers.js +138 -0
- package/dist/esm/api/range.d.ts +19 -0
- package/dist/esm/api/range.d.ts.map +1 -0
- package/dist/esm/api/range.js +136 -0
- package/dist/esm/api/rename-sheet.d.ts +22 -0
- package/dist/esm/api/rename-sheet.d.ts.map +1 -0
- package/dist/esm/api/rename-sheet.js +41 -0
- package/dist/esm/api/selection.d.ts +36 -0
- package/dist/esm/api/selection.d.ts.map +1 -0
- package/dist/esm/api/selection.js +138 -0
- package/dist/esm/api/sort.d.ts +3 -0
- package/dist/esm/api/sort.d.ts.map +1 -0
- package/dist/esm/api/sort.js +33 -0
- package/dist/esm/api/split-text.d.ts +2 -0
- package/dist/esm/api/split-text.d.ts.map +1 -0
- package/dist/esm/api/split-text.js +24 -0
- package/dist/esm/api/structural-formula-update.d.ts +75 -0
- package/dist/esm/api/structural-formula-update.d.ts.map +1 -0
- package/dist/esm/api/structural-formula-update.js +431 -0
- package/dist/esm/api/table.d.ts +39 -0
- package/dist/esm/api/table.d.ts.map +1 -0
- package/dist/esm/api/table.js +333 -0
- package/dist/esm/api/validation.d.ts +12 -0
- package/dist/esm/api/validation.d.ts.map +1 -0
- package/dist/esm/api/validation.js +297 -0
- package/dist/esm/api/xlsx-source.d.ts +22 -0
- package/dist/esm/api/xlsx-source.d.ts.map +1 -0
- package/dist/esm/api/xlsx-source.js +30 -0
- package/dist/esm/atoms/delete-sheet-atom.d.ts +6 -0
- package/dist/esm/atoms/delete-sheet-atom.d.ts.map +1 -0
- package/dist/esm/atoms/delete-sheet-atom.js +4 -0
- package/dist/esm/atoms/dialog-state.atom.d.ts +23 -0
- package/dist/esm/atoms/dialog-state.atom.d.ts.map +1 -0
- package/dist/esm/atoms/dialog-state.atom.js +34 -0
- package/dist/esm/atoms/editing-data-validation-id.atom.d.ts +7 -0
- package/dist/esm/atoms/editing-data-validation-id.atom.d.ts.map +1 -0
- package/dist/esm/atoms/editing-data-validation-id.atom.js +6 -0
- package/dist/esm/atoms/editing-embed.atom.d.ts +8 -0
- package/dist/esm/atoms/editing-embed.atom.d.ts.map +1 -0
- package/dist/esm/atoms/editing-embed.atom.js +5 -0
- package/dist/esm/atoms/editing-table.atom.d.ts +8 -0
- package/dist/esm/atoms/editing-table.atom.d.ts.map +1 -0
- package/dist/esm/atoms/editing-table.atom.js +6 -0
- package/dist/esm/atoms/error-state.atom.d.ts +10 -0
- package/dist/esm/atoms/error-state.atom.d.ts.map +1 -0
- package/dist/esm/atoms/error-state.atom.js +5 -0
- package/dist/esm/atoms/index.d.ts +5 -0
- package/dist/esm/atoms/index.d.ts.map +1 -0
- package/dist/esm/atoms/index.js +4 -0
- package/dist/esm/atoms/insert-image-state.atom.d.ts +6 -0
- package/dist/esm/atoms/insert-image-state.atom.d.ts.map +1 -0
- package/dist/esm/atoms/insert-image-state.atom.js +5 -0
- package/dist/esm/atoms/named-range.atom.d.ts +8 -0
- package/dist/esm/atoms/named-range.atom.d.ts.map +1 -0
- package/dist/esm/atoms/named-range.atom.js +6 -0
- package/dist/esm/atoms/resize-dimension.atom.d.ts +12 -0
- package/dist/esm/atoms/resize-dimension.atom.d.ts.map +1 -0
- package/dist/esm/atoms/resize-dimension.atom.js +5 -0
- package/dist/esm/atoms/sheet-observer.atom.d.ts +16 -0
- package/dist/esm/atoms/sheet-observer.atom.d.ts.map +1 -0
- package/dist/esm/atoms/sheet-observer.atom.js +16 -0
- package/dist/esm/cellxfs-registry.d.ts +37 -0
- package/dist/esm/cellxfs-registry.d.ts.map +1 -0
- package/dist/esm/cellxfs-registry.js +147 -0
- package/dist/esm/commands.d.ts +691 -0
- package/dist/esm/commands.d.ts.map +1 -0
- package/dist/esm/commands.js +1 -0
- package/dist/esm/components/dialogs/delete-sheet-confirmation.d.ts +7 -0
- package/dist/esm/components/dialogs/delete-sheet-confirmation.d.ts.map +1 -0
- package/dist/esm/components/dialogs/delete-sheet-confirmation.js +29 -0
- package/dist/esm/components/dialogs/error-state.d.ts +3 -0
- package/dist/esm/components/dialogs/error-state.d.ts.map +1 -0
- package/dist/esm/components/dialogs/error-state.js +22 -0
- package/dist/esm/components/editors/cell-format-editor.d.ts +26 -0
- package/dist/esm/components/editors/cell-format-editor.d.ts.map +1 -0
- package/dist/esm/components/editors/cell-format-editor.js +648 -0
- package/dist/esm/components/editors/conditional-format-editor.d.ts +43 -0
- package/dist/esm/components/editors/conditional-format-editor.d.ts.map +1 -0
- package/dist/esm/components/editors/conditional-format-editor.js +172 -0
- package/dist/esm/components/editors/conditional-format-rule-editor.d.ts +27 -0
- package/dist/esm/components/editors/conditional-format-rule-editor.d.ts.map +1 -0
- package/dist/esm/components/editors/conditional-format-rule-editor.js +608 -0
- package/dist/esm/components/editors/data-validation-editor.d.ts +27 -0
- package/dist/esm/components/editors/data-validation-editor.d.ts.map +1 -0
- package/dist/esm/components/editors/data-validation-editor.js +160 -0
- package/dist/esm/components/editors/data-validation-rule-editor.d.ts +17 -0
- package/dist/esm/components/editors/data-validation-rule-editor.d.ts.map +1 -0
- package/dist/esm/components/editors/data-validation-rule-editor.js +194 -0
- package/dist/esm/components/editors/embed-editor.d.ts +19 -0
- package/dist/esm/components/editors/embed-editor.d.ts.map +1 -0
- package/dist/esm/components/editors/embed-editor.js +75 -0
- package/dist/esm/components/editors/insert-image-editor.d.ts +20 -0
- package/dist/esm/components/editors/insert-image-editor.d.ts.map +1 -0
- package/dist/esm/components/editors/insert-image-editor.js +73 -0
- package/dist/esm/components/editors/insert-link-editor.d.ts +20 -0
- package/dist/esm/components/editors/insert-link-editor.d.ts.map +1 -0
- package/dist/esm/components/editors/insert-link-editor.js +60 -0
- package/dist/esm/components/editors/named-range-editor.d.ts +13 -0
- package/dist/esm/components/editors/named-range-editor.d.ts.map +1 -0
- package/dist/esm/components/editors/named-range-editor.js +103 -0
- package/dist/esm/components/editors/resize-dimension-editor.d.ts +9 -0
- package/dist/esm/components/editors/resize-dimension-editor.d.ts.map +1 -0
- package/dist/esm/components/editors/resize-dimension-editor.js +60 -0
- package/dist/esm/components/editors/sheet-filter.d.ts +59 -0
- package/dist/esm/components/editors/sheet-filter.d.ts.map +1 -0
- package/dist/esm/components/editors/sheet-filter.js +88 -0
- package/dist/esm/components/editors/table-editor.d.ts +12 -0
- package/dist/esm/components/editors/table-editor.d.ts.map +1 -0
- package/dist/esm/components/editors/table-editor.js +106 -0
- package/dist/esm/components/index.d.ts +13 -0
- package/dist/esm/components/index.d.ts.map +1 -0
- package/dist/esm/components/index.js +12 -0
- package/dist/esm/generated-names.d.ts +51 -0
- package/dist/esm/generated-names.d.ts.map +1 -0
- package/dist/esm/generated-names.js +5 -0
- package/dist/esm/helpers/iterative-calculation.d.ts +4 -0
- package/dist/esm/helpers/iterative-calculation.d.ts.map +1 -0
- package/dist/esm/helpers/iterative-calculation.js +44 -0
- package/dist/esm/helpers/sheet-title.d.ts +5 -0
- package/dist/esm/helpers/sheet-title.d.ts.map +1 -0
- package/dist/esm/helpers/sheet-title.js +13 -0
- package/dist/esm/helpers.d.ts +45 -0
- package/dist/esm/helpers.d.ts.map +1 -0
- package/dist/esm/helpers.js +143 -0
- package/dist/esm/hooks/use-async-datasource.d.ts +57 -0
- package/dist/esm/hooks/use-async-datasource.d.ts.map +1 -0
- package/dist/esm/hooks/use-async-datasource.js +276 -0
- package/dist/esm/hooks/use-calculation-initialize.d.ts +61 -0
- package/dist/esm/hooks/use-calculation-initialize.d.ts.map +1 -0
- package/dist/esm/hooks/use-calculation-initialize.js +603 -0
- package/dist/esm/hooks/use-calculation-process-array.d.ts +20 -0
- package/dist/esm/hooks/use-calculation-process-array.d.ts.map +1 -0
- package/dist/esm/hooks/use-calculation-process-array.js +279 -0
- package/dist/esm/hooks/use-calculation-queue.d.ts +10 -0
- package/dist/esm/hooks/use-calculation-queue.d.ts.map +1 -0
- package/dist/esm/hooks/use-calculation-queue.js +13 -0
- package/dist/esm/hooks/use-calculation-worker.d.ts +37 -0
- package/dist/esm/hooks/use-calculation-worker.d.ts.map +1 -0
- package/dist/esm/hooks/use-calculation-worker.js +1688 -0
- package/dist/esm/hooks/use-calculation.d.ts +173 -0
- package/dist/esm/hooks/use-calculation.d.ts.map +1 -0
- package/dist/esm/hooks/use-calculation.js +2069 -0
- package/dist/esm/hooks/use-can-edit-cellrange.d.ts +31 -0
- package/dist/esm/hooks/use-can-edit-cellrange.d.ts.map +1 -0
- package/dist/esm/hooks/use-can-edit-cellrange.js +72 -0
- package/dist/esm/hooks/use-cellxfs-registry.d.ts +6 -0
- package/dist/esm/hooks/use-cellxfs-registry.d.ts.map +1 -0
- package/dist/esm/hooks/use-cellxfs-registry.js +22 -0
- package/dist/esm/hooks/use-citations.d.ts +19 -0
- package/dist/esm/hooks/use-citations.d.ts.map +1 -0
- package/dist/esm/hooks/use-citations.js +61 -0
- package/dist/esm/hooks/use-comments.d.ts +14 -0
- package/dist/esm/hooks/use-comments.d.ts.map +1 -0
- package/dist/esm/hooks/use-comments.js +45 -0
- package/dist/esm/hooks/use-conditional-formatting-rules.d.ts +22 -0
- package/dist/esm/hooks/use-conditional-formatting-rules.d.ts.map +1 -0
- package/dist/esm/hooks/use-conditional-formatting-rules.js +81 -0
- package/dist/esm/hooks/use-data-validation-rules.d.ts +54 -0
- package/dist/esm/hooks/use-data-validation-rules.d.ts.map +1 -0
- package/dist/esm/hooks/use-data-validation-rules.js +135 -0
- package/dist/esm/hooks/use-deferred-calculation-flush.d.ts +14 -0
- package/dist/esm/hooks/use-deferred-calculation-flush.d.ts.map +1 -0
- package/dist/esm/hooks/use-deferred-calculation-flush.js +78 -0
- package/dist/esm/hooks/use-idle-scheduler.d.ts +5 -0
- package/dist/esm/hooks/use-idle-scheduler.d.ts.map +1 -0
- package/dist/esm/hooks/use-idle-scheduler.js +46 -0
- package/dist/esm/hooks/use-indent.d.ts +23 -0
- package/dist/esm/hooks/use-indent.d.ts.map +1 -0
- package/dist/esm/hooks/use-indent.js +97 -0
- package/dist/esm/hooks/use-named-range.d.ts +7 -0
- package/dist/esm/hooks/use-named-range.d.ts.map +1 -0
- package/dist/esm/hooks/use-named-range.js +69 -0
- package/dist/esm/hooks/use-on-adjust-row-height.d.ts +11 -0
- package/dist/esm/hooks/use-on-adjust-row-height.d.ts.map +1 -0
- package/dist/esm/hooks/use-on-adjust-row-height.js +63 -0
- package/dist/esm/hooks/use-on-autoresize.d.ts +17 -0
- package/dist/esm/hooks/use-on-autoresize.d.ts.map +1 -0
- package/dist/esm/hooks/use-on-autoresize.js +38 -0
- package/dist/esm/hooks/use-on-banded-ranges.d.ts +15 -0
- package/dist/esm/hooks/use-on-banded-ranges.d.ts.map +1 -0
- package/dist/esm/hooks/use-on-banded-ranges.js +36 -0
- package/dist/esm/hooks/use-on-calculation-begin.d.ts +14 -0
- package/dist/esm/hooks/use-on-calculation-begin.d.ts.map +1 -0
- package/dist/esm/hooks/use-on-calculation-begin.js +22 -0
- package/dist/esm/hooks/use-on-calculation-success.d.ts +22 -0
- package/dist/esm/hooks/use-on-calculation-success.d.ts.map +1 -0
- package/dist/esm/hooks/use-on-calculation-success.js +167 -0
- package/dist/esm/hooks/use-on-change-batch-stream.d.ts +7 -0
- package/dist/esm/hooks/use-on-change-batch-stream.d.ts.map +1 -0
- package/dist/esm/hooks/use-on-change-batch-stream.js +58 -0
- package/dist/esm/hooks/use-on-change-batch.d.ts +54 -0
- package/dist/esm/hooks/use-on-change-batch.d.ts.map +1 -0
- package/dist/esm/hooks/use-on-change-batch.js +111 -0
- package/dist/esm/hooks/use-on-change-calculated-column.d.ts +23 -0
- package/dist/esm/hooks/use-on-change-calculated-column.d.ts.map +1 -0
- package/dist/esm/hooks/use-on-change-calculated-column.js +29 -0
- package/dist/esm/hooks/use-on-change-decimals.d.ts +22 -0
- package/dist/esm/hooks/use-on-change-decimals.d.ts.map +1 -0
- package/dist/esm/hooks/use-on-change-decimals.js +45 -0
- package/dist/esm/hooks/use-on-change-formatting.d.ts +44 -0
- package/dist/esm/hooks/use-on-change-formatting.d.ts.map +1 -0
- package/dist/esm/hooks/use-on-change-formatting.js +158 -0
- package/dist/esm/hooks/use-on-change-sheet-tabcolor.d.ts +11 -0
- package/dist/esm/hooks/use-on-change-sheet-tabcolor.d.ts.map +1 -0
- package/dist/esm/hooks/use-on-change-sheet-tabcolor.js +26 -0
- package/dist/esm/hooks/use-on-change-table-column.d.ts +25 -0
- package/dist/esm/hooks/use-on-change-table-column.d.ts.map +1 -0
- package/dist/esm/hooks/use-on-change-table-column.js +52 -0
- package/dist/esm/hooks/use-on-change-theme.d.ts +11 -0
- package/dist/esm/hooks/use-on-change-theme.d.ts.map +1 -0
- package/dist/esm/hooks/use-on-change-theme.js +11 -0
- package/dist/esm/hooks/use-on-change.d.ts +61 -0
- package/dist/esm/hooks/use-on-change.d.ts.map +1 -0
- package/dist/esm/hooks/use-on-change.js +281 -0
- package/dist/esm/hooks/use-on-clear-formatting.d.ts +17 -0
- package/dist/esm/hooks/use-on-clear-formatting.d.ts.map +1 -0
- package/dist/esm/hooks/use-on-clear-formatting.js +45 -0
- package/dist/esm/hooks/use-on-collapse-column-group.d.ts +11 -0
- package/dist/esm/hooks/use-on-collapse-column-group.d.ts.map +1 -0
- package/dist/esm/hooks/use-on-collapse-column-group.js +44 -0
- package/dist/esm/hooks/use-on-collapse-row-group.d.ts +18 -0
- package/dist/esm/hooks/use-on-collapse-row-group.d.ts.map +1 -0
- package/dist/esm/hooks/use-on-collapse-row-group.js +54 -0
- package/dist/esm/hooks/use-on-copy.d.ts +49 -0
- package/dist/esm/hooks/use-on-copy.d.ts.map +1 -0
- package/dist/esm/hooks/use-on-copy.js +302 -0
- package/dist/esm/hooks/use-on-create-named-range.d.ts +13 -0
- package/dist/esm/hooks/use-on-create-named-range.d.ts.map +1 -0
- package/dist/esm/hooks/use-on-create-named-range.js +32 -0
- package/dist/esm/hooks/use-on-create-sheet.d.ts +23 -0
- package/dist/esm/hooks/use-on-create-sheet.d.ts.map +1 -0
- package/dist/esm/hooks/use-on-create-sheet.js +64 -0
- package/dist/esm/hooks/use-on-delete-cells-shift-left.d.ts +28 -0
- package/dist/esm/hooks/use-on-delete-cells-shift-left.d.ts.map +1 -0
- package/dist/esm/hooks/use-on-delete-cells-shift-left.js +65 -0
- package/dist/esm/hooks/use-on-delete-cells-shift-up.d.ts +28 -0
- package/dist/esm/hooks/use-on-delete-cells-shift-up.d.ts.map +1 -0
- package/dist/esm/hooks/use-on-delete-cells-shift-up.js +65 -0
- package/dist/esm/hooks/use-on-delete-column.d.ts +38 -0
- package/dist/esm/hooks/use-on-delete-column.d.ts.map +1 -0
- package/dist/esm/hooks/use-on-delete-column.js +86 -0
- package/dist/esm/hooks/use-on-delete-named-range.d.ts +14 -0
- package/dist/esm/hooks/use-on-delete-named-range.d.ts.map +1 -0
- package/dist/esm/hooks/use-on-delete-named-range.js +22 -0
- package/dist/esm/hooks/use-on-delete-row.d.ts +38 -0
- package/dist/esm/hooks/use-on-delete-row.d.ts.map +1 -0
- package/dist/esm/hooks/use-on-delete-row.js +86 -0
- package/dist/esm/hooks/use-on-delete-sheet.d.ts +16 -0
- package/dist/esm/hooks/use-on-delete-sheet.d.ts.map +1 -0
- package/dist/esm/hooks/use-on-delete-sheet.js +36 -0
- package/dist/esm/hooks/use-on-delete-table-row.d.ts +29 -0
- package/dist/esm/hooks/use-on-delete-table-row.d.ts.map +1 -0
- package/dist/esm/hooks/use-on-delete-table-row.js +55 -0
- package/dist/esm/hooks/use-on-delete.d.ts +33 -0
- package/dist/esm/hooks/use-on-delete.d.ts.map +1 -0
- package/dist/esm/hooks/use-on-delete.js +58 -0
- package/dist/esm/hooks/use-on-drag-n-drop.d.ts +55 -0
- package/dist/esm/hooks/use-on-drag-n-drop.d.ts.map +1 -0
- package/dist/esm/hooks/use-on-drag-n-drop.js +160 -0
- package/dist/esm/hooks/use-on-duplicate-sheet.d.ts +29 -0
- package/dist/esm/hooks/use-on-duplicate-sheet.d.ts.map +1 -0
- package/dist/esm/hooks/use-on-duplicate-sheet.js +63 -0
- package/dist/esm/hooks/use-on-embeds.d.ts +19 -0
- package/dist/esm/hooks/use-on-embeds.d.ts.map +1 -0
- package/dist/esm/hooks/use-on-embeds.js +86 -0
- package/dist/esm/hooks/use-on-expand-column-group.d.ts +11 -0
- package/dist/esm/hooks/use-on-expand-column-group.d.ts.map +1 -0
- package/dist/esm/hooks/use-on-expand-column-group.js +42 -0
- package/dist/esm/hooks/use-on-expand-row-group.d.ts +18 -0
- package/dist/esm/hooks/use-on-expand-row-group.d.ts.map +1 -0
- package/dist/esm/hooks/use-on-expand-row-group.js +49 -0
- package/dist/esm/hooks/use-on-fill-range.d.ts +9 -0
- package/dist/esm/hooks/use-on-fill-range.d.ts.map +1 -0
- package/dist/esm/hooks/use-on-fill-range.js +79 -0
- package/dist/esm/hooks/use-on-fill.d.ts +29 -0
- package/dist/esm/hooks/use-on-fill.d.ts.map +1 -0
- package/dist/esm/hooks/use-on-fill.js +66 -0
- package/dist/esm/hooks/use-on-filter-table.d.ts +76 -0
- package/dist/esm/hooks/use-on-filter-table.d.ts.map +1 -0
- package/dist/esm/hooks/use-on-filter-table.js +341 -0
- package/dist/esm/hooks/use-on-find-replace.d.ts +19 -0
- package/dist/esm/hooks/use-on-find-replace.d.ts.map +1 -0
- package/dist/esm/hooks/use-on-find-replace.js +115 -0
- package/dist/esm/hooks/use-on-freeze.d.ts +13 -0
- package/dist/esm/hooks/use-on-freeze.d.ts.map +1 -0
- package/dist/esm/hooks/use-on-freeze.js +55 -0
- package/dist/esm/hooks/use-on-group-columns.d.ts +11 -0
- package/dist/esm/hooks/use-on-group-columns.d.ts.map +1 -0
- package/dist/esm/hooks/use-on-group-columns.js +35 -0
- package/dist/esm/hooks/use-on-group-rows.d.ts +17 -0
- package/dist/esm/hooks/use-on-group-rows.d.ts.map +1 -0
- package/dist/esm/hooks/use-on-group-rows.js +41 -0
- package/dist/esm/hooks/use-on-hide-column.d.ts +23 -0
- package/dist/esm/hooks/use-on-hide-column.d.ts.map +1 -0
- package/dist/esm/hooks/use-on-hide-column.js +54 -0
- package/dist/esm/hooks/use-on-hide-row.d.ts +32 -0
- package/dist/esm/hooks/use-on-hide-row.d.ts.map +1 -0
- package/dist/esm/hooks/use-on-hide-row.js +57 -0
- package/dist/esm/hooks/use-on-hide-show-sheet.d.ts +18 -0
- package/dist/esm/hooks/use-on-hide-show-sheet.d.ts.map +1 -0
- package/dist/esm/hooks/use-on-hide-show-sheet.js +88 -0
- package/dist/esm/hooks/use-on-import-csv-legacy.d.ts +8 -0
- package/dist/esm/hooks/use-on-import-csv-legacy.d.ts.map +1 -0
- package/dist/esm/hooks/use-on-import-csv-legacy.js +148 -0
- package/dist/esm/hooks/use-on-import-csv.d.ts +28 -0
- package/dist/esm/hooks/use-on-import-csv.d.ts.map +1 -0
- package/dist/esm/hooks/use-on-import-csv.js +267 -0
- package/dist/esm/hooks/use-on-import-excel.d.ts +67 -0
- package/dist/esm/hooks/use-on-import-excel.d.ts.map +1 -0
- package/dist/esm/hooks/use-on-import-excel.js +595 -0
- package/dist/esm/hooks/use-on-insert-autosum.d.ts +9 -0
- package/dist/esm/hooks/use-on-insert-autosum.d.ts.map +1 -0
- package/dist/esm/hooks/use-on-insert-autosum.js +91 -0
- package/dist/esm/hooks/use-on-insert-cells-shift-down.d.ts +28 -0
- package/dist/esm/hooks/use-on-insert-cells-shift-down.d.ts.map +1 -0
- package/dist/esm/hooks/use-on-insert-cells-shift-down.js +65 -0
- package/dist/esm/hooks/use-on-insert-cells-shift-right.d.ts +28 -0
- package/dist/esm/hooks/use-on-insert-cells-shift-right.d.ts.map +1 -0
- package/dist/esm/hooks/use-on-insert-cells-shift-right.js +65 -0
- package/dist/esm/hooks/use-on-insert-checkbox.d.ts +17 -0
- package/dist/esm/hooks/use-on-insert-checkbox.d.ts.map +1 -0
- package/dist/esm/hooks/use-on-insert-checkbox.js +73 -0
- package/dist/esm/hooks/use-on-insert-column.d.ts +40 -0
- package/dist/esm/hooks/use-on-insert-column.d.ts.map +1 -0
- package/dist/esm/hooks/use-on-insert-column.js +91 -0
- package/dist/esm/hooks/use-on-insert-date-time.d.ts +4 -0
- package/dist/esm/hooks/use-on-insert-date-time.d.ts.map +1 -0
- package/dist/esm/hooks/use-on-insert-date-time.js +11 -0
- package/dist/esm/hooks/use-on-insert-date.d.ts +4 -0
- package/dist/esm/hooks/use-on-insert-date.d.ts.map +1 -0
- package/dist/esm/hooks/use-on-insert-date.js +12 -0
- package/dist/esm/hooks/use-on-insert-image.d.ts +24 -0
- package/dist/esm/hooks/use-on-insert-image.d.ts.map +1 -0
- package/dist/esm/hooks/use-on-insert-image.js +131 -0
- package/dist/esm/hooks/use-on-insert-link.d.ts +25 -0
- package/dist/esm/hooks/use-on-insert-link.d.ts.map +1 -0
- package/dist/esm/hooks/use-on-insert-link.js +193 -0
- package/dist/esm/hooks/use-on-insert-note.d.ts +4 -0
- package/dist/esm/hooks/use-on-insert-note.d.ts.map +1 -0
- package/dist/esm/hooks/use-on-insert-note.js +14 -0
- package/dist/esm/hooks/use-on-insert-row.d.ts +38 -0
- package/dist/esm/hooks/use-on-insert-row.d.ts.map +1 -0
- package/dist/esm/hooks/use-on-insert-row.js +104 -0
- package/dist/esm/hooks/use-on-insert-table-row.d.ts +31 -0
- package/dist/esm/hooks/use-on-insert-table-row.d.ts.map +1 -0
- package/dist/esm/hooks/use-on-insert-table-row.js +59 -0
- package/dist/esm/hooks/use-on-insert-time.d.ts +4 -0
- package/dist/esm/hooks/use-on-insert-time.d.ts.map +1 -0
- package/dist/esm/hooks/use-on-insert-time.js +11 -0
- package/dist/esm/hooks/use-on-locale-change.d.ts +35 -0
- package/dist/esm/hooks/use-on-locale-change.d.ts.map +1 -0
- package/dist/esm/hooks/use-on-locale-change.js +314 -0
- package/dist/esm/hooks/use-on-merge-unmerge-cells.d.ts +28 -0
- package/dist/esm/hooks/use-on-merge-unmerge-cells.d.ts.map +1 -0
- package/dist/esm/hooks/use-on-merge-unmerge-cells.js +310 -0
- package/dist/esm/hooks/use-on-move-columns.d.ts +28 -0
- package/dist/esm/hooks/use-on-move-columns.d.ts.map +1 -0
- package/dist/esm/hooks/use-on-move-columns.js +295 -0
- package/dist/esm/hooks/use-on-move-rows.d.ts +30 -0
- package/dist/esm/hooks/use-on-move-rows.d.ts.map +1 -0
- package/dist/esm/hooks/use-on-move-rows.js +264 -0
- package/dist/esm/hooks/use-on-move-selection.d.ts +35 -0
- package/dist/esm/hooks/use-on-move-selection.d.ts.map +1 -0
- package/dist/esm/hooks/use-on-move-selection.js +383 -0
- package/dist/esm/hooks/use-on-move-sheet.d.ts +12 -0
- package/dist/esm/hooks/use-on-move-sheet.d.ts.map +1 -0
- package/dist/esm/hooks/use-on-move-sheet.js +65 -0
- package/dist/esm/hooks/use-on-move-table-columns.d.ts +21 -0
- package/dist/esm/hooks/use-on-move-table-columns.d.ts.map +1 -0
- package/dist/esm/hooks/use-on-move-table-columns.js +235 -0
- package/dist/esm/hooks/use-on-paste.d.ts +79 -0
- package/dist/esm/hooks/use-on-paste.d.ts.map +1 -0
- package/dist/esm/hooks/use-on-paste.js +868 -0
- package/dist/esm/hooks/use-on-protect-range.d.ts +20 -0
- package/dist/esm/hooks/use-on-protect-range.d.ts.map +1 -0
- package/dist/esm/hooks/use-on-protect-range.js +67 -0
- package/dist/esm/hooks/use-on-protect-sheet.d.ts +19 -0
- package/dist/esm/hooks/use-on-protect-sheet.d.ts.map +1 -0
- package/dist/esm/hooks/use-on-protect-sheet.js +61 -0
- package/dist/esm/hooks/use-on-remove-duplicates.d.ts +21 -0
- package/dist/esm/hooks/use-on-remove-duplicates.d.ts.map +1 -0
- package/dist/esm/hooks/use-on-remove-duplicates.js +39 -0
- package/dist/esm/hooks/use-on-rename-sheet.d.ts +21 -0
- package/dist/esm/hooks/use-on-rename-sheet.d.ts.map +1 -0
- package/dist/esm/hooks/use-on-rename-sheet.js +78 -0
- package/dist/esm/hooks/use-on-request-calculate-wrapper.d.ts +30 -0
- package/dist/esm/hooks/use-on-request-calculate-wrapper.d.ts.map +1 -0
- package/dist/esm/hooks/use-on-request-calculate-wrapper.js +88 -0
- package/dist/esm/hooks/use-on-request-conditional-format.d.ts +2 -0
- package/dist/esm/hooks/use-on-request-conditional-format.d.ts.map +1 -0
- package/dist/esm/hooks/use-on-request-conditional-format.js +8 -0
- package/dist/esm/hooks/use-on-request-data-validation.d.ts +7 -0
- package/dist/esm/hooks/use-on-request-data-validation.d.ts.map +1 -0
- package/dist/esm/hooks/use-on-request-data-validation.js +21 -0
- package/dist/esm/hooks/use-on-request-define-named-range.d.ts +8 -0
- package/dist/esm/hooks/use-on-request-define-named-range.d.ts.map +1 -0
- package/dist/esm/hooks/use-on-request-define-named-range.js +25 -0
- package/dist/esm/hooks/use-on-request-delete-sheet.d.ts +2 -0
- package/dist/esm/hooks/use-on-request-delete-sheet.d.ts.map +1 -0
- package/dist/esm/hooks/use-on-request-delete-sheet.js +11 -0
- package/dist/esm/hooks/use-on-request-edit-table.d.ts +3 -0
- package/dist/esm/hooks/use-on-request-edit-table.d.ts.map +1 -0
- package/dist/esm/hooks/use-on-request-edit-table.js +11 -0
- package/dist/esm/hooks/use-on-request-format-cells.d.ts +2 -0
- package/dist/esm/hooks/use-on-request-format-cells.d.ts.map +1 -0
- package/dist/esm/hooks/use-on-request-format-cells.js +8 -0
- package/dist/esm/hooks/use-on-request-insert-image.d.ts +3 -0
- package/dist/esm/hooks/use-on-request-insert-image.d.ts.map +1 -0
- package/dist/esm/hooks/use-on-request-insert-image.js +12 -0
- package/dist/esm/hooks/use-on-request-insert-link.d.ts +5 -0
- package/dist/esm/hooks/use-on-request-insert-link.d.ts.map +1 -0
- package/dist/esm/hooks/use-on-request-insert-link.js +9 -0
- package/dist/esm/hooks/use-on-request-resize.d.ts +3 -0
- package/dist/esm/hooks/use-on-request-resize.d.ts.map +1 -0
- package/dist/esm/hooks/use-on-request-resize.js +13 -0
- package/dist/esm/hooks/use-on-request-update-named-range.d.ts +3 -0
- package/dist/esm/hooks/use-on-request-update-named-range.d.ts.map +1 -0
- package/dist/esm/hooks/use-on-request-update-named-range.js +11 -0
- package/dist/esm/hooks/use-on-resize-table.d.ts +33 -0
- package/dist/esm/hooks/use-on-resize-table.d.ts.map +1 -0
- package/dist/esm/hooks/use-on-resize-table.js +212 -0
- package/dist/esm/hooks/use-on-resize.d.ts +19 -0
- package/dist/esm/hooks/use-on-resize.d.ts.map +1 -0
- package/dist/esm/hooks/use-on-resize.js +54 -0
- package/dist/esm/hooks/use-on-set-outline-depth.d.ts +17 -0
- package/dist/esm/hooks/use-on-set-outline-depth.d.ts.map +1 -0
- package/dist/esm/hooks/use-on-set-outline-depth.js +93 -0
- package/dist/esm/hooks/use-on-show-column.d.ts +16 -0
- package/dist/esm/hooks/use-on-show-column.d.ts.map +1 -0
- package/dist/esm/hooks/use-on-show-column.js +82 -0
- package/dist/esm/hooks/use-on-show-row.d.ts +22 -0
- package/dist/esm/hooks/use-on-show-row.d.ts.map +1 -0
- package/dist/esm/hooks/use-on-show-row.js +85 -0
- package/dist/esm/hooks/use-on-sort-column.d.ts +53 -0
- package/dist/esm/hooks/use-on-sort-column.d.ts.map +1 -0
- package/dist/esm/hooks/use-on-sort-column.js +268 -0
- package/dist/esm/hooks/use-on-sort-range.d.ts +42 -0
- package/dist/esm/hooks/use-on-sort-range.d.ts.map +1 -0
- package/dist/esm/hooks/use-on-sort-range.js +247 -0
- package/dist/esm/hooks/use-on-sort-table.d.ts +59 -0
- package/dist/esm/hooks/use-on-sort-table.d.ts.map +1 -0
- package/dist/esm/hooks/use-on-sort-table.js +332 -0
- package/dist/esm/hooks/use-on-table.d.ts +49 -0
- package/dist/esm/hooks/use-on-table.d.ts.map +1 -0
- package/dist/esm/hooks/use-on-table.js +384 -0
- package/dist/esm/hooks/use-on-trace-dependents-precedents.d.ts +14 -0
- package/dist/esm/hooks/use-on-trace-dependents-precedents.d.ts.map +1 -0
- package/dist/esm/hooks/use-on-trace-dependents-precedents.js +144 -0
- package/dist/esm/hooks/use-on-ungroup-columns.d.ts +11 -0
- package/dist/esm/hooks/use-on-ungroup-columns.d.ts.map +1 -0
- package/dist/esm/hooks/use-on-ungroup-columns.js +43 -0
- package/dist/esm/hooks/use-on-ungroup-rows.d.ts +17 -0
- package/dist/esm/hooks/use-on-ungroup-rows.d.ts.map +1 -0
- package/dist/esm/hooks/use-on-ungroup-rows.js +49 -0
- package/dist/esm/hooks/use-on-update-named-range.d.ts +19 -0
- package/dist/esm/hooks/use-on-update-named-range.d.ts.map +1 -0
- package/dist/esm/hooks/use-on-update-named-range.js +108 -0
- package/dist/esm/hooks/use-on-update-note.d.ts +13 -0
- package/dist/esm/hooks/use-on-update-note.d.ts.map +1 -0
- package/dist/esm/hooks/use-on-update-note.js +20 -0
- package/dist/esm/hooks/use-on-update-sheet.d.ts +10 -0
- package/dist/esm/hooks/use-on-update-sheet.d.ts.map +1 -0
- package/dist/esm/hooks/use-on-update-sheet.js +11 -0
- package/dist/esm/hooks/use-paint-format.d.ts +17 -0
- package/dist/esm/hooks/use-paint-format.d.ts.map +1 -0
- package/dist/esm/hooks/use-paint-format.js +110 -0
- package/dist/esm/hooks/use-search.d.ts +81 -0
- package/dist/esm/hooks/use-search.d.ts.map +1 -0
- package/dist/esm/hooks/use-search.js +251 -0
- package/dist/esm/hooks/use-select-next-prev-sheet.d.ts +11 -0
- package/dist/esm/hooks/use-select-next-prev-sheet.d.ts.map +1 -0
- package/dist/esm/hooks/use-select-next-prev-sheet.js +21 -0
- package/dist/esm/hooks/use-sheet-observer.d.ts +20 -0
- package/dist/esm/hooks/use-sheet-observer.d.ts.map +1 -0
- package/dist/esm/hooks/use-sheet-observer.js +120 -0
- package/dist/esm/hooks/use-sheet-properties.d.ts +105 -0
- package/dist/esm/hooks/use-sheet-properties.d.ts.map +1 -0
- package/dist/esm/hooks/use-sheet-properties.js +895 -0
- package/dist/esm/hooks/use-sheet-state.d.ts +17 -0
- package/dist/esm/hooks/use-sheet-state.d.ts.map +1 -0
- package/dist/esm/hooks/use-sheet-state.js +102 -0
- package/dist/esm/hooks/use-sheetdata-subscriber.d.ts +10 -0
- package/dist/esm/hooks/use-sheetdata-subscriber.d.ts.map +1 -0
- package/dist/esm/hooks/use-sheetdata-subscriber.js +14 -0
- package/dist/esm/hooks/use-slicers.d.ts +19 -0
- package/dist/esm/hooks/use-slicers.d.ts.map +1 -0
- package/dist/esm/hooks/use-slicers.js +83 -0
- package/dist/esm/hooks/use-split-text-to-columns.d.ts +19 -0
- package/dist/esm/hooks/use-split-text-to-columns.d.ts.map +1 -0
- package/dist/esm/hooks/use-split-text-to-columns.js +30 -0
- package/dist/esm/hooks/use-spreadsheet-state.d.ts +627 -0
- package/dist/esm/hooks/use-spreadsheet-state.d.ts.map +1 -0
- package/dist/esm/hooks/use-spreadsheet-state.js +2010 -0
- package/dist/esm/hooks/use-ss-registry.d.ts +6 -0
- package/dist/esm/hooks/use-ss-registry.d.ts.map +1 -0
- package/dist/esm/hooks/use-ss-registry.js +17 -0
- package/dist/esm/hooks/use-structured-reference.d.ts +8 -0
- package/dist/esm/hooks/use-structured-reference.d.ts.map +1 -0
- package/dist/esm/hooks/use-structured-reference.js +129 -0
- package/dist/esm/hooks/use-undo-redo-actions.d.ts +40 -0
- package/dist/esm/hooks/use-undo-redo-actions.d.ts.map +1 -0
- package/dist/esm/hooks/use-undo-redo-actions.js +166 -0
- package/dist/esm/hooks/use-undo-redo.d.ts +69 -0
- package/dist/esm/hooks/use-undo-redo.d.ts.map +1 -0
- package/dist/esm/hooks/use-undo-redo.js +113 -0
- package/dist/esm/hooks/utils/frozen-sort.d.ts +9 -0
- package/dist/esm/hooks/utils/frozen-sort.d.ts.map +1 -0
- package/dist/esm/hooks/utils/frozen-sort.js +25 -0
- package/dist/esm/hooks/utils/sort-rows.d.ts +32 -0
- package/dist/esm/hooks/utils/sort-rows.d.ts.map +1 -0
- package/dist/esm/hooks/utils/sort-rows.js +102 -0
- package/dist/esm/index.d.ts +38 -0
- package/dist/esm/index.d.ts.map +1 -0
- package/dist/esm/index.js +39 -0
- package/dist/esm/interface/apply-fill.d.ts +6 -0
- package/dist/esm/interface/apply-fill.d.ts.map +1 -0
- package/dist/esm/interface/apply-fill.js +195 -0
- package/dist/esm/interface/auto-resize.d.ts +4 -0
- package/dist/esm/interface/auto-resize.d.ts.map +1 -0
- package/dist/esm/interface/auto-resize.js +50 -0
- package/dist/esm/interface/calculation-interface.d.ts +67 -0
- package/dist/esm/interface/calculation-interface.d.ts.map +1 -0
- package/dist/esm/interface/calculation-interface.js +339 -0
- package/dist/esm/interface/change-batch-stream.d.ts +25 -0
- package/dist/esm/interface/change-batch-stream.d.ts.map +1 -0
- package/dist/esm/interface/change-batch-stream.js +294 -0
- package/dist/esm/interface/change-batch.d.ts +39 -0
- package/dist/esm/interface/change-batch.d.ts.map +1 -0
- package/dist/esm/interface/change-batch.js +282 -0
- package/dist/esm/interface/change-border.d.ts +5 -0
- package/dist/esm/interface/change-border.d.ts.map +1 -0
- package/dist/esm/interface/change-border.js +116 -0
- package/dist/esm/interface/change-calculated-column.d.ts +5 -0
- package/dist/esm/interface/change-calculated-column.d.ts.map +1 -0
- package/dist/esm/interface/change-calculated-column.js +120 -0
- package/dist/esm/interface/change-decimals.d.ts +7 -0
- package/dist/esm/interface/change-decimals.d.ts.map +1 -0
- package/dist/esm/interface/change-decimals.js +58 -0
- package/dist/esm/interface/change-formatting.d.ts +4 -0
- package/dist/esm/interface/change-formatting.d.ts.map +1 -0
- package/dist/esm/interface/change-formatting.js +209 -0
- package/dist/esm/interface/change-sheet-tabcolor.d.ts +4 -0
- package/dist/esm/interface/change-sheet-tabcolor.d.ts.map +1 -0
- package/dist/esm/interface/change-sheet-tabcolor.js +19 -0
- package/dist/esm/interface/change-table-column.d.ts +49 -0
- package/dist/esm/interface/change-table-column.d.ts.map +1 -0
- package/dist/esm/interface/change-table-column.js +247 -0
- package/dist/esm/interface/change-theme.d.ts +4 -0
- package/dist/esm/interface/change-theme.d.ts.map +1 -0
- package/dist/esm/interface/change-theme.js +21 -0
- package/dist/esm/interface/chart-extensions.d.ts +32 -0
- package/dist/esm/interface/chart-extensions.d.ts.map +1 -0
- package/dist/esm/interface/chart-extensions.js +71 -0
- package/dist/esm/interface/citations.d.ts +33 -0
- package/dist/esm/interface/citations.d.ts.map +1 -0
- package/dist/esm/interface/citations.js +123 -0
- package/dist/esm/interface/clear-formatting.d.ts +5 -0
- package/dist/esm/interface/clear-formatting.d.ts.map +1 -0
- package/dist/esm/interface/clear-formatting.js +48 -0
- package/dist/esm/interface/conditional-formatting-rules.d.ts +7 -0
- package/dist/esm/interface/conditional-formatting-rules.d.ts.map +1 -0
- package/dist/esm/interface/conditional-formatting-rules.js +123 -0
- package/dist/esm/interface/create-table.d.ts +5 -0
- package/dist/esm/interface/create-table.d.ts.map +1 -0
- package/dist/esm/interface/create-table.js +105 -0
- package/dist/esm/interface/data-validation-rules.d.ts +25 -0
- package/dist/esm/interface/data-validation-rules.d.ts.map +1 -0
- package/dist/esm/interface/data-validation-rules.js +310 -0
- package/dist/esm/interface/data-validation-utils.d.ts +12 -0
- package/dist/esm/interface/data-validation-utils.d.ts.map +1 -0
- package/dist/esm/interface/data-validation-utils.js +79 -0
- package/dist/esm/interface/delete-cells-shift-left.d.ts +5 -0
- package/dist/esm/interface/delete-cells-shift-left.d.ts.map +1 -0
- package/dist/esm/interface/delete-cells-shift-left.js +146 -0
- package/dist/esm/interface/delete-cells-shift-up.d.ts +5 -0
- package/dist/esm/interface/delete-cells-shift-up.d.ts.map +1 -0
- package/dist/esm/interface/delete-cells-shift-up.js +138 -0
- package/dist/esm/interface/delete-cells.d.ts +6 -0
- package/dist/esm/interface/delete-cells.d.ts.map +1 -0
- package/dist/esm/interface/delete-cells.js +184 -0
- package/dist/esm/interface/delete-column.d.ts +4 -0
- package/dist/esm/interface/delete-column.d.ts.map +1 -0
- package/dist/esm/interface/delete-column.js +254 -0
- package/dist/esm/interface/delete-row.d.ts +4 -0
- package/dist/esm/interface/delete-row.d.ts.map +1 -0
- package/dist/esm/interface/delete-row.js +226 -0
- package/dist/esm/interface/delete-sheet.d.ts +4 -0
- package/dist/esm/interface/delete-sheet.d.ts.map +1 -0
- package/dist/esm/interface/delete-sheet.js +78 -0
- package/dist/esm/interface/delete-table-column.d.ts +4 -0
- package/dist/esm/interface/delete-table-column.d.ts.map +1 -0
- package/dist/esm/interface/delete-table-column.js +274 -0
- package/dist/esm/interface/delete-table-row.d.ts +4 -0
- package/dist/esm/interface/delete-table-row.d.ts.map +1 -0
- package/dist/esm/interface/delete-table-row.js +278 -0
- package/dist/esm/interface/duplicate-sheet.d.ts +4 -0
- package/dist/esm/interface/duplicate-sheet.d.ts.map +1 -0
- package/dist/esm/interface/duplicate-sheet.js +206 -0
- package/dist/esm/interface/embeds.d.ts +9 -0
- package/dist/esm/interface/embeds.d.ts.map +1 -0
- package/dist/esm/interface/embeds.js +115 -0
- package/dist/esm/interface/freeze.d.ts +5 -0
- package/dist/esm/interface/freeze.d.ts.map +1 -0
- package/dist/esm/interface/freeze.js +109 -0
- package/dist/esm/interface/helpers.d.ts +6 -0
- package/dist/esm/interface/helpers.d.ts.map +1 -0
- package/dist/esm/interface/helpers.js +32 -0
- package/dist/esm/interface/hide-column.d.ts +4 -0
- package/dist/esm/interface/hide-column.d.ts.map +1 -0
- package/dist/esm/interface/hide-column.js +59 -0
- package/dist/esm/interface/hide-row.d.ts +4 -0
- package/dist/esm/interface/hide-row.d.ts.map +1 -0
- package/dist/esm/interface/hide-row.js +54 -0
- package/dist/esm/interface/indent.d.ts +7 -0
- package/dist/esm/interface/indent.d.ts.map +1 -0
- package/dist/esm/interface/indent.js +73 -0
- package/dist/esm/interface/insert-cells-shift-down.d.ts +5 -0
- package/dist/esm/interface/insert-cells-shift-down.d.ts.map +1 -0
- package/dist/esm/interface/insert-cells-shift-down.js +143 -0
- package/dist/esm/interface/insert-cells-shift-right.d.ts +5 -0
- package/dist/esm/interface/insert-cells-shift-right.d.ts.map +1 -0
- package/dist/esm/interface/insert-cells-shift-right.js +134 -0
- package/dist/esm/interface/insert-column.d.ts +7 -0
- package/dist/esm/interface/insert-column.d.ts.map +1 -0
- package/dist/esm/interface/insert-column.js +481 -0
- package/dist/esm/interface/insert-note.d.ts +5 -0
- package/dist/esm/interface/insert-note.d.ts.map +1 -0
- package/dist/esm/interface/insert-note.js +23 -0
- package/dist/esm/interface/insert-row.d.ts +4 -0
- package/dist/esm/interface/insert-row.d.ts.map +1 -0
- package/dist/esm/interface/insert-row.js +158 -0
- package/dist/esm/interface/insert-table-row.d.ts +4 -0
- package/dist/esm/interface/insert-table-row.d.ts.map +1 -0
- package/dist/esm/interface/insert-table-row.js +314 -0
- package/dist/esm/interface/interface-cli.d.ts +3 -0
- package/dist/esm/interface/interface-cli.d.ts.map +1 -0
- package/dist/esm/interface/interface-cli.js +62 -0
- package/dist/esm/interface/named-range-operations.d.ts +19 -0
- package/dist/esm/interface/named-range-operations.d.ts.map +1 -0
- package/dist/esm/interface/named-range-operations.js +71 -0
- package/dist/esm/interface/new-sheet.d.ts +4 -0
- package/dist/esm/interface/new-sheet.d.ts.map +1 -0
- package/dist/esm/interface/new-sheet.js +102 -0
- package/dist/esm/interface/pivot-extensions.d.ts +27 -0
- package/dist/esm/interface/pivot-extensions.d.ts.map +1 -0
- package/dist/esm/interface/pivot-extensions.js +60 -0
- package/dist/esm/interface/remove-duplicates.d.ts +11 -0
- package/dist/esm/interface/remove-duplicates.d.ts.map +1 -0
- package/dist/esm/interface/remove-duplicates.js +107 -0
- package/dist/esm/interface/remove-table.d.ts +4 -0
- package/dist/esm/interface/remove-table.d.ts.map +1 -0
- package/dist/esm/interface/remove-table.js +50 -0
- package/dist/esm/interface/resize-utils.d.ts +18 -0
- package/dist/esm/interface/resize-utils.d.ts.map +1 -0
- package/dist/esm/interface/resize-utils.js +34 -0
- package/dist/esm/interface/resize.d.ts +5 -0
- package/dist/esm/interface/resize.d.ts.map +1 -0
- package/dist/esm/interface/resize.js +43 -0
- package/dist/esm/interface/slicers.d.ts +9 -0
- package/dist/esm/interface/slicers.d.ts.map +1 -0
- package/dist/esm/interface/slicers.js +107 -0
- package/dist/esm/interface/split-text.d.ts +5 -0
- package/dist/esm/interface/split-text.d.ts.map +1 -0
- package/dist/esm/interface/split-text.js +94 -0
- package/dist/esm/interface/spreadsheet-interface.d.ts +642 -0
- package/dist/esm/interface/spreadsheet-interface.d.ts.map +1 -0
- package/dist/esm/interface/spreadsheet-interface.js +2442 -0
- package/dist/esm/interface/table-totalrow.d.ts +20 -0
- package/dist/esm/interface/table-totalrow.d.ts.map +1 -0
- package/dist/esm/interface/table-totalrow.js +155 -0
- package/dist/esm/interface/table-utils.d.ts +21 -0
- package/dist/esm/interface/table-utils.d.ts.map +1 -0
- package/dist/esm/interface/table-utils.js +38 -0
- package/dist/esm/interface/update-sheet.d.ts +16 -0
- package/dist/esm/interface/update-sheet.d.ts.map +1 -0
- package/dist/esm/interface/update-sheet.js +64 -0
- package/dist/esm/interface/update-table.d.ts +4 -0
- package/dist/esm/interface/update-table.d.ts.map +1 -0
- package/dist/esm/interface/update-table.js +111 -0
- package/dist/esm/server-utils.d.ts +8 -0
- package/dist/esm/server-utils.d.ts.map +1 -0
- package/dist/esm/server-utils.js +3 -0
- package/dist/esm/server.browser.d.ts +9 -0
- package/dist/esm/server.browser.d.ts.map +1 -0
- package/dist/esm/server.browser.js +5 -0
- package/dist/esm/server.d.ts +9 -0
- package/dist/esm/server.d.ts.map +1 -0
- package/dist/esm/server.js +5 -0
- package/dist/esm/shared-string-registry.d.ts +35 -0
- package/dist/esm/shared-string-registry.d.ts.map +1 -0
- package/dist/esm/shared-string-registry.js +248 -0
- package/dist/esm/sheet-cell.d.ts +310 -0
- package/dist/esm/sheet-cell.d.ts.map +1 -0
- package/dist/esm/sheet-cell.js +1829 -0
- package/dist/esm/test-setup.d.ts +2 -0
- package/dist/esm/test-setup.d.ts.map +1 -0
- package/dist/esm/test-setup.js +3 -0
- package/dist/esm/tsconfig.esm.tsbuildinfo +1 -0
- package/dist/esm/types.d.ts +44 -0
- package/dist/esm/types.d.ts.map +1 -0
- package/dist/esm/types.js +33 -0
- package/dist/esm/validation-schema/table.schema.d.ts +6 -0
- package/dist/esm/validation-schema/table.schema.d.ts.map +1 -0
- package/dist/esm/validation-schema/table.schema.js +4 -0
- package/dist/esm/vitest.config.d.ts +3 -0
- package/dist/esm/vitest.config.d.ts.map +1 -0
- package/dist/esm/vitest.config.js +22 -0
- package/package.json +89 -0
|
@@ -0,0 +1,2787 @@
|
|
|
1
|
+
import { __assign, __awaiter, __generator, __read, __spreadArray, __values } from "tslib";
|
|
2
|
+
import { tokenize as defaultTokenizer } from "@rowsncolumns/calculator";
|
|
3
|
+
import { isCellCoordinate, isCellNode, isCellRangeNode, isStaticNode, } from "@rowsncolumns/dag";
|
|
4
|
+
import { FormulaError } from "@rowsncolumns/fast-formula-parser";
|
|
5
|
+
import { defaultSpreadsheetTheme, } from "@rowsncolumns/spreadsheet";
|
|
6
|
+
import { addressToCell, canUseDOM, cellToAddress, DEFAULT_ACTIVE_CELL, DEFAULT_COLUMN_COUNT, DEFAULT_COLUMN_WIDTH, DEFAULT_ROW_COUNT, DEFAULT_ROW_HEIGHT, generateSelectionsFromFormula, getCellEffectiveFormat, getCellEffectiveValue, getCellFormattedValue, getCellUserEnteredFormat, getCellUserEnteredValue, getColumnIndexFromColumnName, getExtendedValueBool, getExtendedValueError, getExtendedValueFormula, getExtendedValueNumber, getExtendedValueString, isAreasEqual, isCellWithinBounds, isNil, iterateCellsInRange, pointToPixel, } from "@rowsncolumns/utils";
|
|
7
|
+
import { enableMapSet, enablePatches, produceWithPatches } from "immer";
|
|
8
|
+
import { buildConditionalFormatExpression } from "../api/conditional-format";
|
|
9
|
+
import { isConditionalFormatFormulaRule } from "../api/conditional-format";
|
|
10
|
+
import { buildDataValidationExpression } from "../api/data-validation";
|
|
11
|
+
import { isDataValidationFormulaRule } from "../api/data-validation";
|
|
12
|
+
import { getAutoFillValues } from "../api/fill";
|
|
13
|
+
import { formulaToRelativeReference } from "../api/formula";
|
|
14
|
+
import { createSheetDraft, deriveCellFromPrecedents } from "../api/immer-utils";
|
|
15
|
+
import { defaultCellCoords, isStyleReference, SheetCell } from "../sheet-cell";
|
|
16
|
+
import { CellXfsRegistry } from "../cellxfs-registry";
|
|
17
|
+
import { SharedStringRegistry } from "../shared-string-registry";
|
|
18
|
+
import { getSharedStringRuns, getSharedStringText } from "../types";
|
|
19
|
+
import { applyFill } from "./apply-fill";
|
|
20
|
+
import { autoResize } from "./auto-resize";
|
|
21
|
+
import { CalculationInterface } from "./calculation-interface";
|
|
22
|
+
import { changeBatch } from "./change-batch";
|
|
23
|
+
import { changeBatchStream } from "./change-batch-stream";
|
|
24
|
+
import { changeBorder } from "./change-border";
|
|
25
|
+
import { changeCalculatedColumn } from "./change-calculated-column";
|
|
26
|
+
import { changeDecimals } from "./change-decimals";
|
|
27
|
+
import { changeFormatting } from "./change-formatting";
|
|
28
|
+
import { changeSheetTabcolor } from "./change-sheet-tabcolor";
|
|
29
|
+
import { changeTableColumn } from "./change-table-column";
|
|
30
|
+
import { changeTheme } from "./change-theme";
|
|
31
|
+
import { isChartsAvailable, safeCreateChart, safeDeleteChart, safeMoveChart, safeResizeChart, safeUpdateChart, } from "./chart-extensions";
|
|
32
|
+
import { createBatchCitations, createCitation, deleteCitation, removeCitationFromCell, updateCitation, } from "./citations";
|
|
33
|
+
import { clearFormatting } from "./clear-formatting";
|
|
34
|
+
import { createConditionalFormattingRule, deleteConditionalFormattingRule, previewConditionalFormattingRule, updateConditionalFormattingRule, } from "./conditional-formatting-rules";
|
|
35
|
+
import { createTable } from "./create-table";
|
|
36
|
+
import { createDataValidationRule, deleteDataValidationRule, deleteDataValidationRules, updateDataValidationRule, } from "./data-validation-rules";
|
|
37
|
+
import { deleteCells } from "./delete-cells";
|
|
38
|
+
import { deleteCellsShiftLeft } from "./delete-cells-shift-left";
|
|
39
|
+
import { deleteCellsShiftUp } from "./delete-cells-shift-up";
|
|
40
|
+
import { deleteColumn } from "./delete-column";
|
|
41
|
+
import { deleteRow } from "./delete-row";
|
|
42
|
+
import { deleteSheet } from "./delete-sheet";
|
|
43
|
+
import { deleteTableColumn } from "./delete-table-column";
|
|
44
|
+
import { deleteTableRow } from "./delete-table-row";
|
|
45
|
+
import { duplicateSheet } from "./duplicate-sheet";
|
|
46
|
+
import { createEmbed, deleteEmbed, moveEmbed, resizeEmbed, updateEmbed, } from "./embeds";
|
|
47
|
+
import { freezeColumn, freezeRow } from "./freeze";
|
|
48
|
+
import { hideColumns } from "./hide-column";
|
|
49
|
+
import { hideRows } from "./hide-row";
|
|
50
|
+
import { decreaseIndent, increaseIndent } from "./indent";
|
|
51
|
+
import { insertColumn, insertTableColumn } from "./insert-column";
|
|
52
|
+
import { insertNote } from "./insert-note";
|
|
53
|
+
import { insertRow } from "./insert-row";
|
|
54
|
+
import { insertTableRow } from "./insert-table-row";
|
|
55
|
+
import { createNamedRange, deleteNamedRange } from "./named-range-operations";
|
|
56
|
+
import { createNewSheet } from "./new-sheet";
|
|
57
|
+
import { safeCreatePivotTable, safeDeletePivotTable } from "./pivot-extensions";
|
|
58
|
+
import { removeTable } from "./remove-table";
|
|
59
|
+
import { removeDuplicates } from "./remove-duplicates";
|
|
60
|
+
import { resize } from "./resize";
|
|
61
|
+
import { updateSheet } from "./update-sheet";
|
|
62
|
+
import { updateTable } from "./update-table";
|
|
63
|
+
// Enable patches
|
|
64
|
+
enablePatches();
|
|
65
|
+
enableMapSet();
|
|
66
|
+
// lib/canvas-adapter.ts
|
|
67
|
+
var canvasLib = null;
|
|
68
|
+
export var createCanvas = function (width, height) {
|
|
69
|
+
if (canUseDOM) {
|
|
70
|
+
// Browser environment (Storybook)
|
|
71
|
+
var canvas = document.createElement("canvas");
|
|
72
|
+
canvas.width = width;
|
|
73
|
+
canvas.height = height;
|
|
74
|
+
return canvas;
|
|
75
|
+
}
|
|
76
|
+
else {
|
|
77
|
+
// Node environment
|
|
78
|
+
if (!canvasLib) {
|
|
79
|
+
try {
|
|
80
|
+
// eslint-disable-next-line @typescript-eslint/no-require-imports
|
|
81
|
+
canvasLib = require("canvas");
|
|
82
|
+
}
|
|
83
|
+
catch (e) {
|
|
84
|
+
// Fallback: return a minimal mock canvas for SSR/build compatibility
|
|
85
|
+
console.warn("canvas not available, using mock canvas");
|
|
86
|
+
return {
|
|
87
|
+
width: width,
|
|
88
|
+
height: height,
|
|
89
|
+
getContext: function () { return ({
|
|
90
|
+
font: "",
|
|
91
|
+
measureText: function () { return ({ width: 0 }); },
|
|
92
|
+
}); },
|
|
93
|
+
};
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
return canvasLib.createCanvas(width, height);
|
|
97
|
+
}
|
|
98
|
+
};
|
|
99
|
+
/**
|
|
100
|
+
* Backend auto-sizer for measuring text dimensions in Node.js
|
|
101
|
+
*/
|
|
102
|
+
var BackendAutoSizer = /** @class */ (function () {
|
|
103
|
+
function BackendAutoSizer() {
|
|
104
|
+
this.canvas = createCanvas(0, 0);
|
|
105
|
+
this.ctx = this.canvas.getContext("2d");
|
|
106
|
+
this.currentFontSize = 12;
|
|
107
|
+
}
|
|
108
|
+
BackendAutoSizer.prototype.setFont = function (_a) {
|
|
109
|
+
var _b = _a.fontFamily, fontFamily = _b === void 0 ? "Arial" : _b, _c = _a.fontSize, fontSize = _c === void 0 ? 12 : _c, _d = _a.fontWeight, fontWeight = _d === void 0 ? "" : _d, _e = _a.fontStyle, fontStyle = _e === void 0 ? "" : _e, _f = _a.scale, scale = _f === void 0 ? 1 : _f;
|
|
110
|
+
this.currentFontSize = fontSize * scale;
|
|
111
|
+
var font = "".concat(fontStyle, " ").concat(fontWeight, " ").concat(this.currentFontSize, "px ").concat(fontFamily)
|
|
112
|
+
.trim()
|
|
113
|
+
.replace(/\s+/g, " ");
|
|
114
|
+
this.ctx.font = font;
|
|
115
|
+
};
|
|
116
|
+
BackendAutoSizer.prototype.reset = function () {
|
|
117
|
+
this.setFont({});
|
|
118
|
+
};
|
|
119
|
+
BackendAutoSizer.prototype.measureText = function (text, shouldWrap, maxWidth) {
|
|
120
|
+
var e_1, _a;
|
|
121
|
+
if (shouldWrap === void 0) { shouldWrap = false; }
|
|
122
|
+
if (!text)
|
|
123
|
+
return null;
|
|
124
|
+
var metrics = this.ctx.measureText(text);
|
|
125
|
+
var width = metrics.width;
|
|
126
|
+
var height = this.currentFontSize * 1.2; // Line height approximation
|
|
127
|
+
if (shouldWrap && maxWidth && width > maxWidth) {
|
|
128
|
+
// Simple word wrapping calculation
|
|
129
|
+
var words = text.split(" ");
|
|
130
|
+
var lines = 1;
|
|
131
|
+
var currentLineWidth = 0;
|
|
132
|
+
try {
|
|
133
|
+
for (var words_1 = __values(words), words_1_1 = words_1.next(); !words_1_1.done; words_1_1 = words_1.next()) {
|
|
134
|
+
var word = words_1_1.value;
|
|
135
|
+
var wordWidth = this.ctx.measureText(word + " ").width;
|
|
136
|
+
if (currentLineWidth + wordWidth > maxWidth) {
|
|
137
|
+
lines++;
|
|
138
|
+
currentLineWidth = wordWidth;
|
|
139
|
+
}
|
|
140
|
+
else {
|
|
141
|
+
currentLineWidth += wordWidth;
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
|
146
|
+
finally {
|
|
147
|
+
try {
|
|
148
|
+
if (words_1_1 && !words_1_1.done && (_a = words_1.return)) _a.call(words_1);
|
|
149
|
+
}
|
|
150
|
+
finally { if (e_1) throw e_1.error; }
|
|
151
|
+
}
|
|
152
|
+
height = this.currentFontSize * 1.2 * lines;
|
|
153
|
+
width = maxWidth;
|
|
154
|
+
}
|
|
155
|
+
return { width: width, height: height };
|
|
156
|
+
};
|
|
157
|
+
return BackendAutoSizer;
|
|
158
|
+
}());
|
|
159
|
+
// Generic state change function
|
|
160
|
+
var stateChangeFunction = function (getter, setter) {
|
|
161
|
+
return function (action) {
|
|
162
|
+
if (typeof action === "function") {
|
|
163
|
+
// If action is a function, call it with current state
|
|
164
|
+
setter(action(getter()));
|
|
165
|
+
}
|
|
166
|
+
else {
|
|
167
|
+
// If action is a value, set it directly
|
|
168
|
+
setter(action);
|
|
169
|
+
}
|
|
170
|
+
};
|
|
171
|
+
};
|
|
172
|
+
/**
|
|
173
|
+
* Spreadsheet Interface for SSR
|
|
174
|
+
*
|
|
175
|
+
* const spreadsheet = new Spreadsheet()
|
|
176
|
+
*/
|
|
177
|
+
var Spreadsheet = /** @class */ (function () {
|
|
178
|
+
function Spreadsheet(options) {
|
|
179
|
+
var _this = this;
|
|
180
|
+
this._sheets = [];
|
|
181
|
+
this._sheetData = {};
|
|
182
|
+
this._tables = [];
|
|
183
|
+
this._charts = [];
|
|
184
|
+
this._embeds = [];
|
|
185
|
+
this._pivotTables = [];
|
|
186
|
+
this._citations = [];
|
|
187
|
+
this._namedRanges = [];
|
|
188
|
+
this._dataValidations = [];
|
|
189
|
+
this._conditionalFormats = [];
|
|
190
|
+
this._locale = "en";
|
|
191
|
+
this._patches = [];
|
|
192
|
+
this._cellXfs = new Map();
|
|
193
|
+
this._activeSheetId = 1;
|
|
194
|
+
this._autoSizer = new BackendAutoSizer();
|
|
195
|
+
this.scale = 1;
|
|
196
|
+
this.skipDag = false;
|
|
197
|
+
this.cellHorizontalSpacing = 5;
|
|
198
|
+
this.cellVerticalSpacing = 5;
|
|
199
|
+
this.resizeStrategy = "full";
|
|
200
|
+
this.minRowDimension = DEFAULT_ROW_HEIGHT;
|
|
201
|
+
this.minColumnDimension = DEFAULT_COLUMN_WIDTH;
|
|
202
|
+
this._sharedStrings = new Map();
|
|
203
|
+
this.onChangeSheets = stateChangeFunction(function () { return _this.sheets; }, // Getter function
|
|
204
|
+
function (value) { return (_this.sheets = value); });
|
|
205
|
+
this.onChangeSheetData = stateChangeFunction(function () { return _this.sheetData; }, function (value) { return (_this.sheetData = value); });
|
|
206
|
+
this.onChangeTables = stateChangeFunction(function () { return _this.tables; }, function (value) { return (_this.tables = value); });
|
|
207
|
+
this.onChangeCharts = stateChangeFunction(function () { return _this.charts; }, function (value) { return (_this.charts = value); });
|
|
208
|
+
this.onChangeEmbeds = stateChangeFunction(function () { return _this.embeds; }, function (value) { return (_this.embeds = value); });
|
|
209
|
+
this.onChangeNamedRanges = stateChangeFunction(function () { return _this.namedRanges; }, function (value) { return (_this.namedRanges = value); });
|
|
210
|
+
this.onChangeSharedStrings = stateChangeFunction(function () { return _this.sharedStrings; }, function (value) { return (_this.sharedStrings = value); });
|
|
211
|
+
this.onChangeDataValidations = stateChangeFunction(function () { return _this.dataValidations; }, function (value) { return (_this.dataValidations = value); });
|
|
212
|
+
this.onChangeConditionalFormats = stateChangeFunction(function () { return _this.conditionalFormats; }, function (value) { return (_this.conditionalFormats = value); });
|
|
213
|
+
this.onChangeCellXfs = stateChangeFunction(function () { return _this.cellXfs; }, function (value) {
|
|
214
|
+
_this.cellXfs = value;
|
|
215
|
+
});
|
|
216
|
+
this.onChangeActiveSheet = stateChangeFunction(function () { return _this.activeSheetId; }, function (value) { return (_this.activeSheetId = value); });
|
|
217
|
+
this.onChangePivotTables = stateChangeFunction(function () { return _this.pivotTables; }, // Getter function
|
|
218
|
+
function (value) { return (_this.pivotTables = value); });
|
|
219
|
+
this.onChangeCitations = stateChangeFunction(function () { return _this.citations; }, function (value) { return (_this.citations = value); });
|
|
220
|
+
this.createHistory = function () { return function (patches) {
|
|
221
|
+
_this._patches.push(patches);
|
|
222
|
+
}; };
|
|
223
|
+
this.enqueueCalculation = function (_operation) { };
|
|
224
|
+
this.enqueueGraphOperation = function (_operation) { };
|
|
225
|
+
this.enqueueStructureChange = function (_change) { };
|
|
226
|
+
this.onRequestCalculate = function () { return __awaiter(_this, void 0, void 0, function () {
|
|
227
|
+
return __generator(this, function (_a) {
|
|
228
|
+
return [2 /*return*/, []];
|
|
229
|
+
});
|
|
230
|
+
}); };
|
|
231
|
+
this.getActiveCell = function () { return defaultCellCoords; };
|
|
232
|
+
this.getSelections = function () { return []; };
|
|
233
|
+
this.getDependents = function (source, includeSource) {
|
|
234
|
+
return _this._calculationInterface.getDependents(source).filter(function (node) {
|
|
235
|
+
if (isStaticNode(node)) {
|
|
236
|
+
return true;
|
|
237
|
+
}
|
|
238
|
+
if (!includeSource && isCellRangeNode(node)) {
|
|
239
|
+
return !isAreasEqual(node.position, source);
|
|
240
|
+
}
|
|
241
|
+
if (!includeSource && isCellCoordinate(source) && isCellNode(node)) {
|
|
242
|
+
var cellNode = node;
|
|
243
|
+
return (cellNode.position.rowIndex !== source.rowIndex ||
|
|
244
|
+
cellNode.position.columnIndex !== source.columnIndex);
|
|
245
|
+
}
|
|
246
|
+
return true;
|
|
247
|
+
});
|
|
248
|
+
};
|
|
249
|
+
this.onChangeSelections = function () { return []; };
|
|
250
|
+
this.getContentfulRangeAroundCell = function (sheetId, startCell) {
|
|
251
|
+
return {
|
|
252
|
+
startRowIndex: startCell.rowIndex,
|
|
253
|
+
endRowIndex: startCell.rowIndex,
|
|
254
|
+
startColumnIndex: startCell.columnIndex,
|
|
255
|
+
endColumnIndex: startCell.columnIndex,
|
|
256
|
+
};
|
|
257
|
+
};
|
|
258
|
+
this.onChangeActiveCell = function () { return []; };
|
|
259
|
+
this.getEffectiveValue = function (sheetId, rowIndex, columnIndex, _property) {
|
|
260
|
+
var _a, _b, _c, _d, _e, _f;
|
|
261
|
+
var cellData = (_d = (_c = (_b = (_a = _this.sheetData) === null || _a === void 0 ? void 0 : _a[sheetId]) === null || _b === void 0 ? void 0 : _b[rowIndex]) === null || _c === void 0 ? void 0 : _c.values) === null || _d === void 0 ? void 0 : _d[columnIndex];
|
|
262
|
+
// Check for shared strings
|
|
263
|
+
var sharedStringValue = _this.getSharedStringValue(cellData);
|
|
264
|
+
if (sharedStringValue !== undefined) {
|
|
265
|
+
return sharedStringValue;
|
|
266
|
+
}
|
|
267
|
+
var effectiveValue = getCellEffectiveValue(cellData);
|
|
268
|
+
if (!effectiveValue) {
|
|
269
|
+
return undefined;
|
|
270
|
+
}
|
|
271
|
+
return ((_f = (_e = getExtendedValueBool(effectiveValue)) !== null && _e !== void 0 ? _e : getExtendedValueNumber(effectiveValue)) !== null && _f !== void 0 ? _f : getExtendedValueString(effectiveValue));
|
|
272
|
+
};
|
|
273
|
+
this.getEffectiveValueForCalculation = function (sheetId, rowIndex, columnIndex, property) {
|
|
274
|
+
var _a, _b, _c, _d, _e, _f;
|
|
275
|
+
var cellData = _this.getCellData(sheetId, rowIndex, columnIndex);
|
|
276
|
+
if (property) {
|
|
277
|
+
return (_a = _this._getEffectiveStructuredValue) === null || _a === void 0 ? void 0 : _a.call(_this, (_b = getCellEffectiveValue(cellData)) === null || _b === void 0 ? void 0 : _b.structuredValue, property);
|
|
278
|
+
}
|
|
279
|
+
var effectiveValue = getCellEffectiveValue(cellData);
|
|
280
|
+
var errorValue = getExtendedValueError(effectiveValue);
|
|
281
|
+
if (errorValue) {
|
|
282
|
+
return new FormulaError(errorValue.name, errorValue.message);
|
|
283
|
+
}
|
|
284
|
+
var hyperlink = _this.getHyperlinkText(_this.getHyperLink(sheetId, rowIndex, columnIndex));
|
|
285
|
+
return ((_f = (_d = (_c = hyperlink !== null && hyperlink !== void 0 ? hyperlink : _this.getEffectiveValue(sheetId, rowIndex, columnIndex)) !== null && _c !== void 0 ? _c : hyperlink) !== null && _d !== void 0 ? _d : (_e = _this._getEffectiveStructuredValue) === null || _e === void 0 ? void 0 : _e.call(_this, effectiveValue === null || effectiveValue === void 0 ? void 0 : effectiveValue.structuredValue)) !== null && _f !== void 0 ? _f : effectiveValue === null || effectiveValue === void 0 ? void 0 : effectiveValue.structuredValue);
|
|
286
|
+
};
|
|
287
|
+
this.getUserEnteredValue = function (sheetId, rowIndex, columnIndex) {
|
|
288
|
+
var cellData = _this.getCellData(sheetId, rowIndex, columnIndex);
|
|
289
|
+
var sharedStringValue = _this.getSharedStringValue(cellData);
|
|
290
|
+
if (sharedStringValue !== undefined) {
|
|
291
|
+
return { sv: sharedStringValue };
|
|
292
|
+
}
|
|
293
|
+
return getCellUserEnteredValue(cellData);
|
|
294
|
+
};
|
|
295
|
+
this.getUserEnteredStringValue = function (sheetId, rowIndex, columnIndex) {
|
|
296
|
+
var formulaValue = _this.getFormulaValue(sheetId, rowIndex, columnIndex);
|
|
297
|
+
if (formulaValue) {
|
|
298
|
+
return formulaValue;
|
|
299
|
+
}
|
|
300
|
+
var userEnteredValue = _this.getUserEnteredValue(sheetId, rowIndex, columnIndex);
|
|
301
|
+
var stringValue = getExtendedValueString(userEnteredValue);
|
|
302
|
+
if (stringValue) {
|
|
303
|
+
return stringValue;
|
|
304
|
+
}
|
|
305
|
+
return undefined;
|
|
306
|
+
};
|
|
307
|
+
this.getFormulaValue = function (sheetId, rowIndex, columnIndex) {
|
|
308
|
+
var userEnteredValue = _this.getUserEnteredValue(sheetId, rowIndex, columnIndex);
|
|
309
|
+
return getExtendedValueFormula(userEnteredValue);
|
|
310
|
+
};
|
|
311
|
+
this.getFormattedValue = function (sheetId, rowIndex, columnIndex) {
|
|
312
|
+
var cellData = _this.getCellData(sheetId, rowIndex, columnIndex);
|
|
313
|
+
var sharedStringValue = _this.getSharedStringValue(cellData);
|
|
314
|
+
if (sharedStringValue !== undefined) {
|
|
315
|
+
return sharedStringValue;
|
|
316
|
+
}
|
|
317
|
+
return getCellFormattedValue(cellData);
|
|
318
|
+
};
|
|
319
|
+
this.getSheetId = function (sheetName, options) {
|
|
320
|
+
var _a;
|
|
321
|
+
var fallbackToActiveSheet = (_a = options === null || options === void 0 ? void 0 : options.fallbackToActiveSheet) !== null && _a !== void 0 ? _a : true;
|
|
322
|
+
var sheet = _this.sheets.find(function (sheet) { return sheet.title === sheetName; });
|
|
323
|
+
if (sheet) {
|
|
324
|
+
return sheet.sheetId;
|
|
325
|
+
}
|
|
326
|
+
return fallbackToActiveSheet ? _this.activeSheetId : undefined;
|
|
327
|
+
};
|
|
328
|
+
this.getSheetIdOrActive = function (sheetName) {
|
|
329
|
+
var _a;
|
|
330
|
+
return ((_a = _this.getSheetId(sheetName, { fallbackToActiveSheet: true })) !== null && _a !== void 0 ? _a : _this.activeSheetId);
|
|
331
|
+
};
|
|
332
|
+
this.getSheetName = function (sheetId) {
|
|
333
|
+
var _a;
|
|
334
|
+
return (_a = _this.getSheet(sheetId)) === null || _a === void 0 ? void 0 : _a.name;
|
|
335
|
+
};
|
|
336
|
+
this.getDataValidationById = function (id) {
|
|
337
|
+
var _a;
|
|
338
|
+
return (_a = _this.dataValidations) === null || _a === void 0 ? void 0 : _a.find(function (rule) { return rule.id === id; });
|
|
339
|
+
};
|
|
340
|
+
this.getConditionalFormatFormula = function (sheetId, rowIndex, columnIndex, conditionalFormatId) {
|
|
341
|
+
var e_2, _a;
|
|
342
|
+
var _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
|
|
343
|
+
var rule = (_b = _this.conditionalFormats) === null || _b === void 0 ? void 0 : _b.find(function (candidate) { return candidate.id === conditionalFormatId; });
|
|
344
|
+
if (!rule) {
|
|
345
|
+
return undefined;
|
|
346
|
+
}
|
|
347
|
+
var formulaValue = isConditionalFormatFormulaRule(rule)
|
|
348
|
+
? buildConditionalFormatExpression(rule, (_j = cellToAddress({
|
|
349
|
+
rowIndex: (_e = (_d = (_c = rule === null || rule === void 0 ? void 0 : rule.ranges) === null || _c === void 0 ? void 0 : _c[0]) === null || _d === void 0 ? void 0 : _d.startRowIndex) !== null && _e !== void 0 ? _e : 1,
|
|
350
|
+
columnIndex: (_h = (_g = (_f = rule === null || rule === void 0 ? void 0 : rule.ranges) === null || _f === void 0 ? void 0 : _f[0]) === null || _g === void 0 ? void 0 : _g.startColumnIndex) !== null && _h !== void 0 ? _h : 1,
|
|
351
|
+
}, false, false)) !== null && _j !== void 0 ? _j : "A1", _this.locale)
|
|
352
|
+
: undefined;
|
|
353
|
+
if (!formulaValue || !rule.ranges.length) {
|
|
354
|
+
return formulaValue;
|
|
355
|
+
}
|
|
356
|
+
var masterCell = {
|
|
357
|
+
rowIndex: rule.ranges[0].startRowIndex,
|
|
358
|
+
columnIndex: rule.ranges[0].startColumnIndex,
|
|
359
|
+
};
|
|
360
|
+
var activeSheetName = (_k = _this.getSheetName(sheetId)) !== null && _k !== void 0 ? _k : "";
|
|
361
|
+
try {
|
|
362
|
+
for (var _m = __values(rule.ranges), _o = _m.next(); !_o.done; _o = _m.next()) {
|
|
363
|
+
var range = _o.value;
|
|
364
|
+
if (sheetId === range.sheetId &&
|
|
365
|
+
isCellWithinBounds({ rowIndex: rowIndex, columnIndex: columnIndex }, range)) {
|
|
366
|
+
return ((_l = formulaToRelativeReference(formulaValue, masterCell, { rowIndex: rowIndex, columnIndex: columnIndex }, activeSheetName, {
|
|
367
|
+
ignoreCircular: true,
|
|
368
|
+
preserveAbsolutes: true,
|
|
369
|
+
ignoreReferenceError: true,
|
|
370
|
+
})) !== null && _l !== void 0 ? _l : "");
|
|
371
|
+
}
|
|
372
|
+
}
|
|
373
|
+
}
|
|
374
|
+
catch (e_2_1) { e_2 = { error: e_2_1 }; }
|
|
375
|
+
finally {
|
|
376
|
+
try {
|
|
377
|
+
if (_o && !_o.done && (_a = _m.return)) _a.call(_m);
|
|
378
|
+
}
|
|
379
|
+
finally { if (e_2) throw e_2.error; }
|
|
380
|
+
}
|
|
381
|
+
};
|
|
382
|
+
this.getDataValidationFormula = function (sheetId, rowIndex, columnIndex) {
|
|
383
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
384
|
+
var cellData = _this.getCellData(sheetId, rowIndex, columnIndex);
|
|
385
|
+
var dataValidation = cellData === null || cellData === void 0 ? void 0 : cellData.dataValidation;
|
|
386
|
+
if (typeof dataValidation === "string" ||
|
|
387
|
+
typeof dataValidation === "number") {
|
|
388
|
+
dataValidation = _this.getDataValidationById(dataValidation);
|
|
389
|
+
}
|
|
390
|
+
var record = dataValidation;
|
|
391
|
+
var formulaValue = isDataValidationFormulaRule(record)
|
|
392
|
+
? buildDataValidationExpression(record, (_g = cellToAddress({
|
|
393
|
+
rowIndex: (_c = (_b = (_a = record === null || record === void 0 ? void 0 : record.ranges) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.startRowIndex) !== null && _c !== void 0 ? _c : 1,
|
|
394
|
+
columnIndex: (_f = (_e = (_d = record === null || record === void 0 ? void 0 : record.ranges) === null || _d === void 0 ? void 0 : _d[0]) === null || _e === void 0 ? void 0 : _e.startColumnIndex) !== null && _f !== void 0 ? _f : 1,
|
|
395
|
+
}, false, false)) !== null && _g !== void 0 ? _g : "A1", _this.locale)
|
|
396
|
+
: undefined;
|
|
397
|
+
if (formulaValue && ((_h = record === null || record === void 0 ? void 0 : record.ranges) === null || _h === void 0 ? void 0 : _h.length)) {
|
|
398
|
+
var masterCell = {
|
|
399
|
+
rowIndex: record.ranges[0].startRowIndex,
|
|
400
|
+
columnIndex: record.ranges[0].startColumnIndex,
|
|
401
|
+
};
|
|
402
|
+
var activeSheetName = (_j = _this.getSheetName(sheetId)) !== null && _j !== void 0 ? _j : "";
|
|
403
|
+
return ((_k = formulaToRelativeReference(formulaValue, masterCell, { rowIndex: rowIndex, columnIndex: columnIndex }, activeSheetName, {
|
|
404
|
+
ignoreCircular: true,
|
|
405
|
+
preserveAbsolutes: true,
|
|
406
|
+
ignoreReferenceError: true,
|
|
407
|
+
})) !== null && _k !== void 0 ? _k : "");
|
|
408
|
+
}
|
|
409
|
+
return formulaValue;
|
|
410
|
+
};
|
|
411
|
+
this.getFinalUserEnteredValue = function (position) {
|
|
412
|
+
var conditionalFormatId = position.conditionalFormatId, dataValidationId = position.dataValidationId;
|
|
413
|
+
if (!isNil(conditionalFormatId)) {
|
|
414
|
+
return _this.getConditionalFormatFormula(position.sheetId, position.rowIndex, position.columnIndex, conditionalFormatId);
|
|
415
|
+
}
|
|
416
|
+
if (!isNil(dataValidationId)) {
|
|
417
|
+
return _this.getDataValidationFormula(position.sheetId, position.rowIndex, position.columnIndex);
|
|
418
|
+
}
|
|
419
|
+
return _this.getFormulaValue(position.sheetId, position.rowIndex, position.columnIndex);
|
|
420
|
+
};
|
|
421
|
+
this.getPrecedents = function (source, includeSource) {
|
|
422
|
+
return _this._calculationInterface.getPrecedents(source).filter(function (node) {
|
|
423
|
+
if (isStaticNode(node)) {
|
|
424
|
+
return true;
|
|
425
|
+
}
|
|
426
|
+
if (!includeSource &&
|
|
427
|
+
isCellCoordinate(node.position) &&
|
|
428
|
+
isCellCoordinate(source)) {
|
|
429
|
+
return (node.position.rowIndex !== source.rowIndex ||
|
|
430
|
+
node.position.columnIndex !== source.columnIndex);
|
|
431
|
+
}
|
|
432
|
+
if (includeSource &&
|
|
433
|
+
!isCellCoordinate(node.position) &&
|
|
434
|
+
!isCellCoordinate(source)) {
|
|
435
|
+
return !isAreasEqual(node.position, source);
|
|
436
|
+
}
|
|
437
|
+
return true;
|
|
438
|
+
});
|
|
439
|
+
};
|
|
440
|
+
this.collectFormulaOperations = function () {
|
|
441
|
+
var e_3, _a, e_4, _b;
|
|
442
|
+
var _c, _d, _e, _f;
|
|
443
|
+
var operations = [];
|
|
444
|
+
var sheetCell = new SheetCell();
|
|
445
|
+
for (var sheetIdKey in _this.sheetData) {
|
|
446
|
+
var sheetId = Number(sheetIdKey);
|
|
447
|
+
try {
|
|
448
|
+
for (var _g = (e_3 = void 0, __values((_d = (_c = _this.sheetData[sheetId]) === null || _c === void 0 ? void 0 : _c.entries()) !== null && _d !== void 0 ? _d : [])), _h = _g.next(); !_h.done; _h = _g.next()) {
|
|
449
|
+
var _j = __read(_h.value, 2), rowIndex = _j[0], value = _j[1];
|
|
450
|
+
try {
|
|
451
|
+
for (var _k = (e_4 = void 0, __values((_f = (_e = value === null || value === void 0 ? void 0 : value.values) === null || _e === void 0 ? void 0 : _e.entries()) !== null && _f !== void 0 ? _f : [])), _l = _k.next(); !_l.done; _l = _k.next()) {
|
|
452
|
+
var _m = __read(_l.value, 2), columnIndex = _m[0], cellData = _m[1];
|
|
453
|
+
if (!cellData) {
|
|
454
|
+
continue;
|
|
455
|
+
}
|
|
456
|
+
sheetCell.assign(sheetId, { rowIndex: rowIndex, columnIndex: columnIndex }, cellData);
|
|
457
|
+
if (sheetCell.formula) {
|
|
458
|
+
operations.push({
|
|
459
|
+
type: "add",
|
|
460
|
+
position: { sheetId: sheetId, rowIndex: rowIndex, columnIndex: columnIndex },
|
|
461
|
+
value: sheetCell.formula,
|
|
462
|
+
});
|
|
463
|
+
}
|
|
464
|
+
}
|
|
465
|
+
}
|
|
466
|
+
catch (e_4_1) { e_4 = { error: e_4_1 }; }
|
|
467
|
+
finally {
|
|
468
|
+
try {
|
|
469
|
+
if (_l && !_l.done && (_b = _k.return)) _b.call(_k);
|
|
470
|
+
}
|
|
471
|
+
finally { if (e_4) throw e_4.error; }
|
|
472
|
+
}
|
|
473
|
+
}
|
|
474
|
+
}
|
|
475
|
+
catch (e_3_1) { e_3 = { error: e_3_1 }; }
|
|
476
|
+
finally {
|
|
477
|
+
try {
|
|
478
|
+
if (_h && !_h.done && (_a = _g.return)) _a.call(_g);
|
|
479
|
+
}
|
|
480
|
+
finally { if (e_3) throw e_3.error; }
|
|
481
|
+
}
|
|
482
|
+
}
|
|
483
|
+
return operations;
|
|
484
|
+
};
|
|
485
|
+
this.getEffectiveValuesFromRange = function (address) {
|
|
486
|
+
var _a = __read(address.split("!"), 2), sheetToken = _a[0], rangeToken = _a[1];
|
|
487
|
+
var hasExplicitSheet = Boolean(rangeToken);
|
|
488
|
+
var sheetName = hasExplicitSheet ? sheetToken : undefined;
|
|
489
|
+
var sheetId = sheetName ? _this.getSheetId(sheetName) : _this.activeSheetId;
|
|
490
|
+
var rangeAddress = hasExplicitSheet ? rangeToken : sheetToken;
|
|
491
|
+
if (!sheetId || !rangeAddress) {
|
|
492
|
+
return [];
|
|
493
|
+
}
|
|
494
|
+
var sheet = _this.getSheet(sheetId);
|
|
495
|
+
var _b = __read(rangeAddress.split(":"), 2), startRef = _b[0], endRef = _b[1];
|
|
496
|
+
var startCell = addressToCell(startRef, {
|
|
497
|
+
position: "start",
|
|
498
|
+
rowCount: sheet.rowCount,
|
|
499
|
+
columnCount: sheet.columnCount,
|
|
500
|
+
});
|
|
501
|
+
var endCell = addressToCell(endRef !== null && endRef !== void 0 ? endRef : startRef, {
|
|
502
|
+
position: "end",
|
|
503
|
+
rowCount: sheet.rowCount,
|
|
504
|
+
columnCount: sheet.columnCount,
|
|
505
|
+
});
|
|
506
|
+
if (!startCell || !endCell) {
|
|
507
|
+
return [];
|
|
508
|
+
}
|
|
509
|
+
var values = [];
|
|
510
|
+
for (var row = startCell.rowIndex; row <= endCell.rowIndex; row += 1) {
|
|
511
|
+
for (var col = startCell.columnIndex; col <= endCell.columnIndex; col += 1) {
|
|
512
|
+
var value = _this.getEffectiveValue(sheetId, row, col);
|
|
513
|
+
values.push({
|
|
514
|
+
userEnteredValue: value == null ? "" : String(value),
|
|
515
|
+
});
|
|
516
|
+
}
|
|
517
|
+
}
|
|
518
|
+
return values;
|
|
519
|
+
};
|
|
520
|
+
this.applyCalculationResults = function (results) {
|
|
521
|
+
var _a;
|
|
522
|
+
var sheetCell = new SheetCell();
|
|
523
|
+
var saveHistory = _this.createHistory();
|
|
524
|
+
var cellXfsRegisry = _this.cellXfsRegistry;
|
|
525
|
+
(_a = _this.onChangeSheetData) === null || _a === void 0 ? void 0 : _a.call(_this, function (prevSheetData) {
|
|
526
|
+
var _a = __read(produceWithPatches(prevSheetData, function (draft) {
|
|
527
|
+
var e_5, _a;
|
|
528
|
+
var _b;
|
|
529
|
+
try {
|
|
530
|
+
for (var results_1 = __values(results), results_1_1 = results_1.next(); !results_1_1.done; results_1_1 = results_1.next()) {
|
|
531
|
+
var _c = __read(results_1_1.value, 3), position = _c[0], result = _c[1], formatting = _c[2];
|
|
532
|
+
var rowIndex = position.rowIndex, columnIndex = position.columnIndex, sheetId = position.sheetId, conditionalFormatId = position.conditionalFormatId, dataValidationId = position.dataValidationId;
|
|
533
|
+
var currentSheet = createSheetDraft(draft, sheetId, rowIndex);
|
|
534
|
+
var cellData = (_b = currentSheet[rowIndex].values) === null || _b === void 0 ? void 0 : _b[columnIndex];
|
|
535
|
+
sheetCell.assign(sheetId, { rowIndex: rowIndex, columnIndex: columnIndex }, cellData, {
|
|
536
|
+
getRangeValues: _this.getEffectiveValuesFromRange,
|
|
537
|
+
locale: _this.locale,
|
|
538
|
+
cellXfsRegistry: cellXfsRegisry,
|
|
539
|
+
getDataValidationById: _this.getDataValidationById,
|
|
540
|
+
});
|
|
541
|
+
sheetCell.hideLoading();
|
|
542
|
+
if (!isNil(conditionalFormatId)) {
|
|
543
|
+
sheetCell.setConditionalFormatResult(conditionalFormatId, result);
|
|
544
|
+
}
|
|
545
|
+
else if (!isNil(dataValidationId)) {
|
|
546
|
+
sheetCell.setDataValidationResult(result);
|
|
547
|
+
}
|
|
548
|
+
else {
|
|
549
|
+
var preserveStringLiteral = typeof result === "string";
|
|
550
|
+
sheetCell.setEffectiveValue(result, false, preserveStringLiteral);
|
|
551
|
+
// Calculator-supplied formatting (e.g. spilled FILTER results)
|
|
552
|
+
// is persisted as user-entered so the renderer respects it
|
|
553
|
+
// without walking precedents. Effective number format from
|
|
554
|
+
// precedents is derived at render time and not written here.
|
|
555
|
+
if (formatting) {
|
|
556
|
+
for (var type in formatting) {
|
|
557
|
+
sheetCell.setUserEnteredFormat(type, formatting[type]);
|
|
558
|
+
}
|
|
559
|
+
}
|
|
560
|
+
var derivedCell = deriveCellFromPrecedents(sheetCell.formula, _this.getPrecedents(position), draft, sheetId, _this.locale, _this.cellXfsRegistry);
|
|
561
|
+
if (derivedCell) {
|
|
562
|
+
sheetCell.processDerivedCell(derivedCell);
|
|
563
|
+
}
|
|
564
|
+
}
|
|
565
|
+
currentSheet[rowIndex].values[columnIndex] =
|
|
566
|
+
sheetCell.getCellData();
|
|
567
|
+
cellXfsRegisry === null || cellXfsRegisry === void 0 ? void 0 : cellXfsRegisry.registerCellXfs(sheetCell);
|
|
568
|
+
}
|
|
569
|
+
}
|
|
570
|
+
catch (e_5_1) { e_5 = { error: e_5_1 }; }
|
|
571
|
+
finally {
|
|
572
|
+
try {
|
|
573
|
+
if (results_1_1 && !results_1_1.done && (_a = results_1.return)) _a.call(results_1);
|
|
574
|
+
}
|
|
575
|
+
finally { if (e_5) throw e_5.error; }
|
|
576
|
+
}
|
|
577
|
+
}), 3), nextState = _a[0], patches = _a[1], inversePatches = _a[2];
|
|
578
|
+
saveHistory({
|
|
579
|
+
sheetData: { patches: patches, inversePatches: inversePatches },
|
|
580
|
+
disableRecalc: true,
|
|
581
|
+
});
|
|
582
|
+
return nextState;
|
|
583
|
+
});
|
|
584
|
+
cellXfsRegisry === null || cellXfsRegisry === void 0 ? void 0 : cellXfsRegisry.getPatches(saveHistory);
|
|
585
|
+
};
|
|
586
|
+
/**
|
|
587
|
+
* Get dimension of a single cell
|
|
588
|
+
* Similar to use-sizer.ts getCellDimensions
|
|
589
|
+
*/
|
|
590
|
+
this.getCellDimensions = function (sheetId, rowIndex, columnIndex, axis, options) {
|
|
591
|
+
var _a, _b;
|
|
592
|
+
if (axis === void 0) { axis = "y"; }
|
|
593
|
+
var _c = options !== null && options !== void 0 ? options : {}, textOverride = _c.textOverride, textFormatOverride = _c.textFormatOverride, shouldWrapOverride = _c.shouldWrapOverride;
|
|
594
|
+
var text = textOverride !== null && textOverride !== void 0 ? textOverride : _this.getFormattedValue(sheetId, rowIndex, columnIndex);
|
|
595
|
+
if (!text)
|
|
596
|
+
return { width: 0, height: 0 };
|
|
597
|
+
var textFormat = textFormatOverride !== null && textFormatOverride !== void 0 ? textFormatOverride : _this.getCellTextFormat(sheetId, rowIndex, columnIndex);
|
|
598
|
+
// Rich-text runs carry their own font sizes; the tallest run sets the
|
|
599
|
+
// line box (Excel scales a row to the largest glyph in a mixed line).
|
|
600
|
+
// Headless heuristic, mirroring the Rust engine's refit: the whole cell
|
|
601
|
+
// measures under the tallest font rather than per-segment metrics.
|
|
602
|
+
var runs = textFormatOverride == null
|
|
603
|
+
? _this.getCellTextFormatRuns(sheetId, rowIndex, columnIndex)
|
|
604
|
+
: undefined;
|
|
605
|
+
var maxRunFontSize = runs === null || runs === void 0 ? void 0 : runs.reduce(function (acc, run) { var _a, _b; return "format" in run ? Math.max(acc, (_b = (_a = run.format) === null || _a === void 0 ? void 0 : _a.fontSize) !== null && _b !== void 0 ? _b : 0) : acc; }, 0);
|
|
606
|
+
var fitFontSize = Math.max((_a = textFormat.fontSize) !== null && _a !== void 0 ? _a : 10, maxRunFontSize !== null && maxRunFontSize !== void 0 ? maxRunFontSize : 0);
|
|
607
|
+
// Reset and set font
|
|
608
|
+
_this._autoSizer.reset();
|
|
609
|
+
var textFontSize = pointToPixel(fitFontSize);
|
|
610
|
+
_this._autoSizer.setFont({
|
|
611
|
+
fontFamily: (_b = textFormat === null || textFormat === void 0 ? void 0 : textFormat.fontFamily) !== null && _b !== void 0 ? _b : "Arial",
|
|
612
|
+
fontSize: textFontSize,
|
|
613
|
+
fontWeight: (textFormat === null || textFormat === void 0 ? void 0 : textFormat.bold) ? "bold" : "",
|
|
614
|
+
fontStyle: (textFormat === null || textFormat === void 0 ? void 0 : textFormat.italic) ? "italic" : "",
|
|
615
|
+
scale: _this.scale,
|
|
616
|
+
});
|
|
617
|
+
var shouldWrap = shouldWrapOverride !== null && shouldWrapOverride !== void 0 ? shouldWrapOverride : _this.shouldWrapCell(sheetId, rowIndex, columnIndex);
|
|
618
|
+
var columnWidth = _this.getStoredColumnWidth(sheetId, columnIndex);
|
|
619
|
+
var metrics = _this._autoSizer.measureText(text, shouldWrap, columnWidth - _this.cellHorizontalSpacing);
|
|
620
|
+
if (!metrics)
|
|
621
|
+
return { width: 0, height: 0 };
|
|
622
|
+
return {
|
|
623
|
+
width: Math.ceil(metrics.width) + _this.cellHorizontalSpacing,
|
|
624
|
+
height: Math.ceil(metrics.height) + _this.cellVerticalSpacing,
|
|
625
|
+
};
|
|
626
|
+
};
|
|
627
|
+
/**
|
|
628
|
+
* Check if a cell is merged
|
|
629
|
+
* @param sheetId
|
|
630
|
+
* @param rowIndex
|
|
631
|
+
* @param columnIndex
|
|
632
|
+
* @returns
|
|
633
|
+
*/
|
|
634
|
+
this.isMergedCell = function (sheetId, rowIndex, columnIndex) {
|
|
635
|
+
var _a;
|
|
636
|
+
var sheet = _this.sheets.find(function (sheet) { return sheet.sheetId === sheetId; });
|
|
637
|
+
if (sheet) {
|
|
638
|
+
return (_a = sheet.merges) === null || _a === void 0 ? void 0 : _a.some(function (range) {
|
|
639
|
+
return isCellWithinBounds({ rowIndex: rowIndex, columnIndex: columnIndex }, range);
|
|
640
|
+
});
|
|
641
|
+
}
|
|
642
|
+
return false;
|
|
643
|
+
};
|
|
644
|
+
/**
|
|
645
|
+
* Calculate row height based on cell content
|
|
646
|
+
* Same logic as use-sizer.ts getRowHeight
|
|
647
|
+
*/
|
|
648
|
+
this.getRowHeight = function (sheetId, rowIndex, shouldExclude) {
|
|
649
|
+
var sheet = _this.getSheet(sheetId);
|
|
650
|
+
var columnCount = sheet.columnCount;
|
|
651
|
+
var visibleColumns = _this.resizeStrategy === "full" ? columnCount : 20;
|
|
652
|
+
var maxHeight = 0;
|
|
653
|
+
// Calculate for frozen columns
|
|
654
|
+
for (var i = 1; i <= sheet.frozenColumns; i++) {
|
|
655
|
+
if (_this.isHiddenColumn(sheetId, i)) {
|
|
656
|
+
continue;
|
|
657
|
+
}
|
|
658
|
+
var height = _this.getCellDimensions(sheetId, rowIndex, i, "x").height;
|
|
659
|
+
if (height > maxHeight)
|
|
660
|
+
maxHeight = height;
|
|
661
|
+
}
|
|
662
|
+
// Loop through visible columns
|
|
663
|
+
var start = _this.resizeStrategy === "full" ? Math.max(sheet.frozenColumns, 1) : 0;
|
|
664
|
+
while (start < visibleColumns) {
|
|
665
|
+
if (_this.isHiddenColumn(sheetId, start) || (shouldExclude === null || shouldExclude === void 0 ? void 0 : shouldExclude(start))) {
|
|
666
|
+
start++;
|
|
667
|
+
continue;
|
|
668
|
+
}
|
|
669
|
+
var height = _this.getCellDimensions(sheetId, rowIndex, start, "x").height;
|
|
670
|
+
if (height > maxHeight)
|
|
671
|
+
maxHeight = height;
|
|
672
|
+
start++;
|
|
673
|
+
}
|
|
674
|
+
return Math.max(_this.minRowDimension * _this.scale, maxHeight) / _this.scale;
|
|
675
|
+
};
|
|
676
|
+
/**
|
|
677
|
+
* Calculate column width based on cell content
|
|
678
|
+
* Same logic as use-sizer.ts getColumnWidth
|
|
679
|
+
*/
|
|
680
|
+
this.getColumnWidth = function (sheetId, columnIndex, options) {
|
|
681
|
+
var sheet = _this.getSheet(sheetId);
|
|
682
|
+
var rowCount = sheet.rowCount;
|
|
683
|
+
var _a = options !== null && options !== void 0 ? options : {}, rowStartIndexRegion = _a.rowStartIndexRegion, rowStopIndexRegion = _a.rowStopIndexRegion, fallbackToDefaultIfEmpty = _a.fallbackToDefaultIfEmpty;
|
|
684
|
+
var visibleRows = (rowStopIndexRegion !== null && rowStopIndexRegion !== void 0 ? rowStopIndexRegion : _this.resizeStrategy === "full") ? rowCount : 20;
|
|
685
|
+
var maxWidth = 0;
|
|
686
|
+
// Calculate for frozen rows: Frozen rows are always on the screen
|
|
687
|
+
for (var i = 1; i < sheet.frozenRows; i++) {
|
|
688
|
+
if (_this.isHiddenRow(sheetId, i)) {
|
|
689
|
+
continue;
|
|
690
|
+
}
|
|
691
|
+
var width = _this.getCellDimensions(sheetId, i, columnIndex).width;
|
|
692
|
+
if (width > maxWidth)
|
|
693
|
+
maxWidth = width;
|
|
694
|
+
}
|
|
695
|
+
// Loop through all visible rows
|
|
696
|
+
var start = (rowStartIndexRegion !== null && rowStartIndexRegion !== void 0 ? rowStartIndexRegion : _this.resizeStrategy === "full")
|
|
697
|
+
? sheet.frozenRows
|
|
698
|
+
: 0;
|
|
699
|
+
while (start < visibleRows) {
|
|
700
|
+
if (_this.isHiddenRow(sheetId, start)) {
|
|
701
|
+
start++;
|
|
702
|
+
continue;
|
|
703
|
+
}
|
|
704
|
+
var width = _this.getCellDimensions(sheetId, start, columnIndex, "y").width;
|
|
705
|
+
if (width > maxWidth)
|
|
706
|
+
maxWidth = width;
|
|
707
|
+
start++;
|
|
708
|
+
}
|
|
709
|
+
// This column is empty
|
|
710
|
+
if (maxWidth === 0) {
|
|
711
|
+
if (fallbackToDefaultIfEmpty) {
|
|
712
|
+
return DEFAULT_COLUMN_WIDTH;
|
|
713
|
+
}
|
|
714
|
+
return _this.getStoredColumnWidth(sheetId, columnIndex);
|
|
715
|
+
}
|
|
716
|
+
return (Math.max(_this.minColumnDimension * _this.scale, maxWidth) / _this.scale);
|
|
717
|
+
};
|
|
718
|
+
/**
|
|
719
|
+
* Get selection from a named range variable
|
|
720
|
+
* @param variableName
|
|
721
|
+
* @returns
|
|
722
|
+
*/
|
|
723
|
+
this.getSelectionFromNamedRange = function (variableName) {
|
|
724
|
+
var _a;
|
|
725
|
+
var namedRange = (_a = _this.namedRanges) === null || _a === void 0 ? void 0 : _a.find(function (range) {
|
|
726
|
+
return range.name.localeCompare(variableName, undefined, {
|
|
727
|
+
sensitivity: "accent",
|
|
728
|
+
}) === 0;
|
|
729
|
+
});
|
|
730
|
+
// Only return selection for names with ranges
|
|
731
|
+
if (namedRange === null || namedRange === void 0 ? void 0 : namedRange.range) {
|
|
732
|
+
var sheet = _this.getSheet(namedRange.range.sheetId);
|
|
733
|
+
return {
|
|
734
|
+
range: namedRange.range,
|
|
735
|
+
sheetName: sheet.name,
|
|
736
|
+
};
|
|
737
|
+
}
|
|
738
|
+
// Get static or formula value
|
|
739
|
+
var result = namedRange === null || namedRange === void 0 ? void 0 : namedRange.value;
|
|
740
|
+
if (!isNil(result)) {
|
|
741
|
+
return result;
|
|
742
|
+
}
|
|
743
|
+
return undefined;
|
|
744
|
+
};
|
|
745
|
+
/**
|
|
746
|
+
* Get selections from table reference
|
|
747
|
+
* @param sheetId
|
|
748
|
+
* @param cell
|
|
749
|
+
* @param tableName
|
|
750
|
+
* @param columnNames
|
|
751
|
+
* @param thisRow
|
|
752
|
+
* @param specialItem
|
|
753
|
+
* @returns
|
|
754
|
+
*/
|
|
755
|
+
this.getSelectionFromTable = function (sheetId, cell, tableName, columnNames, thisRow, specialItem) {
|
|
756
|
+
var _a, _b, _c;
|
|
757
|
+
// If there is no tablename, we need to find table based
|
|
758
|
+
// on cell
|
|
759
|
+
var table = (_a = _this.tables) === null || _a === void 0 ? void 0 : _a.find(function (table) {
|
|
760
|
+
if (tableName) {
|
|
761
|
+
return table.title === tableName;
|
|
762
|
+
}
|
|
763
|
+
return cell
|
|
764
|
+
? isCellWithinBounds(cell, table.range) && table.sheetId === sheetId
|
|
765
|
+
: true;
|
|
766
|
+
});
|
|
767
|
+
// Current row
|
|
768
|
+
var rowIndex = (cell !== null && cell !== void 0 ? cell : DEFAULT_ACTIVE_CELL).rowIndex;
|
|
769
|
+
if (table) {
|
|
770
|
+
var range = table.range;
|
|
771
|
+
var headerRow = (_b = table.headerRow) !== null && _b !== void 0 ? _b : true;
|
|
772
|
+
var totalRow = (_c = table.totalRow) !== null && _c !== void 0 ? _c : false;
|
|
773
|
+
var headerRowOffset = headerRow ? 1 : 0;
|
|
774
|
+
var totalRowOffset = totalRow ? 1 : 0;
|
|
775
|
+
var sheet = _this.getSheet(table.sheetId);
|
|
776
|
+
var sheetName = sheet.name;
|
|
777
|
+
var _d = __read(columnNames !== null && columnNames !== void 0 ? columnNames : [], 2), from = _d[0], to = _d[1];
|
|
778
|
+
var startColIndex = getColumnIndexFromColumnName(table, from);
|
|
779
|
+
var endColIndex = getColumnIndexFromColumnName(table, to);
|
|
780
|
+
var startColumnIndex = isNil(startColIndex)
|
|
781
|
+
? range.startColumnIndex
|
|
782
|
+
: startColIndex;
|
|
783
|
+
var endColumnIndex = isNil(endColIndex) && isNil(startColIndex)
|
|
784
|
+
? range.endColumnIndex
|
|
785
|
+
: isNil(endColIndex)
|
|
786
|
+
? startColumnIndex
|
|
787
|
+
: endColIndex;
|
|
788
|
+
// Headers only
|
|
789
|
+
if (specialItem === "#Headers") {
|
|
790
|
+
return {
|
|
791
|
+
range: __assign(__assign({}, range), { startColumnIndex: startColumnIndex, endColumnIndex: endColumnIndex, startRowIndex: range.startRowIndex, endRowIndex: range.startRowIndex }),
|
|
792
|
+
sheetName: sheetName,
|
|
793
|
+
};
|
|
794
|
+
}
|
|
795
|
+
// All
|
|
796
|
+
if (specialItem === "#All") {
|
|
797
|
+
return {
|
|
798
|
+
range: __assign(__assign({}, range), { startColumnIndex: startColumnIndex, endColumnIndex: endColumnIndex }),
|
|
799
|
+
sheetName: sheetName,
|
|
800
|
+
};
|
|
801
|
+
}
|
|
802
|
+
// All
|
|
803
|
+
if (specialItem === "#Data") {
|
|
804
|
+
return {
|
|
805
|
+
range: __assign(__assign({}, range), { startColumnIndex: startColumnIndex, endColumnIndex: endColumnIndex, startRowIndex: range.startRowIndex + headerRowOffset, endRowIndex: range.endRowIndex - totalRowOffset }),
|
|
806
|
+
sheetName: sheetName,
|
|
807
|
+
};
|
|
808
|
+
}
|
|
809
|
+
if (!from && !to) {
|
|
810
|
+
return {
|
|
811
|
+
range: {
|
|
812
|
+
startRowIndex: thisRow
|
|
813
|
+
? rowIndex
|
|
814
|
+
: range.startRowIndex + headerRowOffset,
|
|
815
|
+
endRowIndex: thisRow
|
|
816
|
+
? rowIndex
|
|
817
|
+
: range.endRowIndex - totalRowOffset,
|
|
818
|
+
startColumnIndex: startColumnIndex,
|
|
819
|
+
endColumnIndex: endColumnIndex,
|
|
820
|
+
},
|
|
821
|
+
sheetName: sheetName,
|
|
822
|
+
};
|
|
823
|
+
}
|
|
824
|
+
// If column is not found, lets not select anything
|
|
825
|
+
if (startColIndex === -1 || isNil(startColIndex)) {
|
|
826
|
+
return undefined;
|
|
827
|
+
}
|
|
828
|
+
// Check if thisrow is active and current cell is in bounds
|
|
829
|
+
if (thisRow &&
|
|
830
|
+
(rowIndex < range.startRowIndex || rowIndex > range.endRowIndex)) {
|
|
831
|
+
return undefined;
|
|
832
|
+
}
|
|
833
|
+
return {
|
|
834
|
+
range: __assign(__assign({}, range), { startRowIndex: thisRow
|
|
835
|
+
? rowIndex
|
|
836
|
+
: range.startRowIndex + headerRowOffset, endRowIndex: thisRow ? rowIndex : range.endRowIndex - totalRowOffset, startColumnIndex: startColumnIndex, endColumnIndex: endColumnIndex }),
|
|
837
|
+
sheetName: sheet.name,
|
|
838
|
+
};
|
|
839
|
+
}
|
|
840
|
+
};
|
|
841
|
+
/**
|
|
842
|
+
* Tokenize a string in the back-end
|
|
843
|
+
* @param value
|
|
844
|
+
* @param sheetId
|
|
845
|
+
* @param activeCell
|
|
846
|
+
* @returns
|
|
847
|
+
*/
|
|
848
|
+
this.tokenize = function (value, sheetId, activeCell) {
|
|
849
|
+
var e_6, _a;
|
|
850
|
+
var _b, _c, _d;
|
|
851
|
+
var tokens = (_b = defaultTokenizer === null || defaultTokenizer === void 0 ? void 0 : defaultTokenizer(value)) !== null && _b !== void 0 ? _b : [];
|
|
852
|
+
var index = -1;
|
|
853
|
+
try {
|
|
854
|
+
for (var tokens_1 = __values(tokens), tokens_1_1 = tokens_1.next(); !tokens_1_1.done; tokens_1_1 = tokens_1.next()) {
|
|
855
|
+
var token = tokens_1_1.value;
|
|
856
|
+
if (token.selection) {
|
|
857
|
+
token["index"] = ++index;
|
|
858
|
+
}
|
|
859
|
+
if (token.isNamedRange) {
|
|
860
|
+
if ((_c = _this.getSelectionFromNamedRange) === null || _c === void 0 ? void 0 : _c.call(_this, token.image)) {
|
|
861
|
+
token["index"] = ++index;
|
|
862
|
+
}
|
|
863
|
+
else {
|
|
864
|
+
delete token["index"];
|
|
865
|
+
}
|
|
866
|
+
}
|
|
867
|
+
if (token.structured) {
|
|
868
|
+
if ((_d = _this.getSelectionFromTable) === null || _d === void 0 ? void 0 : _d.call(_this, sheetId, activeCell, token.tableName, token.columnNames, token.thisRow, token.specialItem)) {
|
|
869
|
+
token["index"] = ++index;
|
|
870
|
+
}
|
|
871
|
+
else {
|
|
872
|
+
delete token["index"];
|
|
873
|
+
}
|
|
874
|
+
}
|
|
875
|
+
}
|
|
876
|
+
}
|
|
877
|
+
catch (e_6_1) { e_6 = { error: e_6_1 }; }
|
|
878
|
+
finally {
|
|
879
|
+
try {
|
|
880
|
+
if (tokens_1_1 && !tokens_1_1.done && (_a = tokens_1.return)) _a.call(tokens_1);
|
|
881
|
+
}
|
|
882
|
+
finally { if (e_6) throw e_6.error; }
|
|
883
|
+
}
|
|
884
|
+
return tokens;
|
|
885
|
+
};
|
|
886
|
+
/**
|
|
887
|
+
* Get selections from a formula
|
|
888
|
+
* @param value
|
|
889
|
+
* @param sheetId
|
|
890
|
+
* @param activeCell
|
|
891
|
+
* @returns
|
|
892
|
+
*/
|
|
893
|
+
this.getSelectionFromFormula = function (value, sheetId, activeCell) {
|
|
894
|
+
var sheet = _this.getSheet(sheetId);
|
|
895
|
+
return generateSelectionsFromFormula(value, sheetId, sheet.name, activeCell, sheet.rowCount, sheet.columnCount, function (formulaValue) {
|
|
896
|
+
return _this.tokenize(formulaValue, sheetId, activeCell);
|
|
897
|
+
}, function (id, cell, tableName, columnNames, thisRow, specialItem) {
|
|
898
|
+
return _this.getSelectionFromTable(id, cell, tableName, columnNames, thisRow, specialItem);
|
|
899
|
+
}, _this.getSelectionFromNamedRange);
|
|
900
|
+
};
|
|
901
|
+
this.getGridValuesForPivot = function (range) {
|
|
902
|
+
var _a;
|
|
903
|
+
var headers = [];
|
|
904
|
+
var rows = [];
|
|
905
|
+
for (var rowIndex = range.startRowIndex; rowIndex <= range.endRowIndex; rowIndex++) {
|
|
906
|
+
var row = [];
|
|
907
|
+
var isHeader = rowIndex === range.startRowIndex;
|
|
908
|
+
for (var columnIndex = range.startColumnIndex; columnIndex <= range.endColumnIndex; columnIndex++) {
|
|
909
|
+
row.push((_a = _this.getEffectiveValue(range.sheetId, rowIndex, columnIndex)) !== null && _a !== void 0 ? _a : "");
|
|
910
|
+
}
|
|
911
|
+
if (isHeader) {
|
|
912
|
+
headers = row;
|
|
913
|
+
}
|
|
914
|
+
else {
|
|
915
|
+
rows.push(row);
|
|
916
|
+
}
|
|
917
|
+
}
|
|
918
|
+
return {
|
|
919
|
+
headers: headers,
|
|
920
|
+
rows: rows,
|
|
921
|
+
};
|
|
922
|
+
};
|
|
923
|
+
this._getEffectiveStructuredValue = options === null || options === void 0 ? void 0 : options.getEffectiveStructuredValue;
|
|
924
|
+
this._calculationInterface = new CalculationInterface({
|
|
925
|
+
locale: this.locale,
|
|
926
|
+
createWorker: options === null || options === void 0 ? void 0 : options.createCalculationWorker,
|
|
927
|
+
iterativeCalculation: options === null || options === void 0 ? void 0 : options.iterativeCalculation,
|
|
928
|
+
clientOnlyFunctionPattern: options === null || options === void 0 ? void 0 : options.clientOnlyFunctionPattern,
|
|
929
|
+
getSheetName: this.getSheetName,
|
|
930
|
+
getSheetId: function (sheetName) {
|
|
931
|
+
return _this.getSheetId(sheetName, { fallbackToActiveSheet: false });
|
|
932
|
+
},
|
|
933
|
+
getSheets: function () { return _this.sheets; },
|
|
934
|
+
getTables: function () { return _this.tables; },
|
|
935
|
+
getNamedRanges: function () { return _this.namedRanges; },
|
|
936
|
+
getFinalUserEnteredValue: this.getFinalUserEnteredValue,
|
|
937
|
+
getEffectiveValue: this.getEffectiveValueForCalculation,
|
|
938
|
+
getEffectiveStructuredValue: options === null || options === void 0 ? void 0 : options.getEffectiveStructuredValue,
|
|
939
|
+
onResults: this.applyCalculationResults,
|
|
940
|
+
});
|
|
941
|
+
this.enqueueCalculation = function (operation) {
|
|
942
|
+
_this._calculationInterface.enqueueCalculation(operation);
|
|
943
|
+
};
|
|
944
|
+
this.enqueueGraphOperation = function (operation) {
|
|
945
|
+
_this._calculationInterface.enqueueGraphOperation(operation);
|
|
946
|
+
};
|
|
947
|
+
this.enqueueStructureChange = function (change) {
|
|
948
|
+
_this._calculationInterface.enqueueStructureChange(change);
|
|
949
|
+
};
|
|
950
|
+
}
|
|
951
|
+
Spreadsheet.prototype.rebuildGraph = function () {
|
|
952
|
+
if (this.skipDag) {
|
|
953
|
+
return;
|
|
954
|
+
}
|
|
955
|
+
this._calculationInterface.rebuildGraph(this.collectFormulaOperations());
|
|
956
|
+
this.addConditionalFormattingToGraph();
|
|
957
|
+
this.addDataValidationsToGraph();
|
|
958
|
+
};
|
|
959
|
+
/**
|
|
960
|
+
* Add conditional formatting rules to the dependency graph.
|
|
961
|
+
* @param sheetId - Optional sheet ID to restrict to a specific sheet
|
|
962
|
+
*/
|
|
963
|
+
Spreadsheet.prototype.addConditionalFormattingToGraph = function (sheetId) {
|
|
964
|
+
var e_7, _a, e_8, _b, e_9, _c;
|
|
965
|
+
var _d;
|
|
966
|
+
var restrictToSheet = typeof sheetId === "number";
|
|
967
|
+
try {
|
|
968
|
+
for (var _e = __values((_d = this.conditionalFormats) !== null && _d !== void 0 ? _d : []), _f = _e.next(); !_f.done; _f = _e.next()) {
|
|
969
|
+
var rule = _f.value;
|
|
970
|
+
if (rule.enabled === false) {
|
|
971
|
+
continue;
|
|
972
|
+
}
|
|
973
|
+
if (isConditionalFormatFormulaRule(rule)) {
|
|
974
|
+
try {
|
|
975
|
+
for (var _g = (e_8 = void 0, __values(rule.ranges)), _h = _g.next(); !_h.done; _h = _g.next()) {
|
|
976
|
+
var range = _h.value;
|
|
977
|
+
if (restrictToSheet && range.sheetId !== sheetId) {
|
|
978
|
+
continue;
|
|
979
|
+
}
|
|
980
|
+
try {
|
|
981
|
+
for (var _j = (e_9 = void 0, __values(iterateCellsInRange(range))), _k = _j.next(); !_k.done; _k = _j.next()) {
|
|
982
|
+
var _l = __read(_k.value, 2), rowIndex = _l[0], columnIndex = _l[1];
|
|
983
|
+
this.enqueueGraphOperation({
|
|
984
|
+
position: {
|
|
985
|
+
rowIndex: rowIndex,
|
|
986
|
+
columnIndex: columnIndex,
|
|
987
|
+
sheetId: range.sheetId,
|
|
988
|
+
conditionalFormatId: rule.id,
|
|
989
|
+
},
|
|
990
|
+
type: "add",
|
|
991
|
+
});
|
|
992
|
+
}
|
|
993
|
+
}
|
|
994
|
+
catch (e_9_1) { e_9 = { error: e_9_1 }; }
|
|
995
|
+
finally {
|
|
996
|
+
try {
|
|
997
|
+
if (_k && !_k.done && (_c = _j.return)) _c.call(_j);
|
|
998
|
+
}
|
|
999
|
+
finally { if (e_9) throw e_9.error; }
|
|
1000
|
+
}
|
|
1001
|
+
}
|
|
1002
|
+
}
|
|
1003
|
+
catch (e_8_1) { e_8 = { error: e_8_1 }; }
|
|
1004
|
+
finally {
|
|
1005
|
+
try {
|
|
1006
|
+
if (_h && !_h.done && (_b = _g.return)) _b.call(_g);
|
|
1007
|
+
}
|
|
1008
|
+
finally { if (e_8) throw e_8.error; }
|
|
1009
|
+
}
|
|
1010
|
+
}
|
|
1011
|
+
}
|
|
1012
|
+
}
|
|
1013
|
+
catch (e_7_1) { e_7 = { error: e_7_1 }; }
|
|
1014
|
+
finally {
|
|
1015
|
+
try {
|
|
1016
|
+
if (_f && !_f.done && (_a = _e.return)) _a.call(_e);
|
|
1017
|
+
}
|
|
1018
|
+
finally { if (e_7) throw e_7.error; }
|
|
1019
|
+
}
|
|
1020
|
+
};
|
|
1021
|
+
/**
|
|
1022
|
+
* Add data validation rules to the dependency graph.
|
|
1023
|
+
* @param sheetId - Optional sheet ID to restrict to a specific sheet
|
|
1024
|
+
*/
|
|
1025
|
+
Spreadsheet.prototype.addDataValidationsToGraph = function (sheetId) {
|
|
1026
|
+
var e_10, _a, e_11, _b, e_12, _c;
|
|
1027
|
+
var _d;
|
|
1028
|
+
var restrictToSheet = typeof sheetId === "number";
|
|
1029
|
+
try {
|
|
1030
|
+
for (var _e = __values((_d = this.dataValidations) !== null && _d !== void 0 ? _d : []), _f = _e.next(); !_f.done; _f = _e.next()) {
|
|
1031
|
+
var rule = _f.value;
|
|
1032
|
+
if (isDataValidationFormulaRule(rule)) {
|
|
1033
|
+
try {
|
|
1034
|
+
for (var _g = (e_11 = void 0, __values(rule.ranges)), _h = _g.next(); !_h.done; _h = _g.next()) {
|
|
1035
|
+
var range = _h.value;
|
|
1036
|
+
if (restrictToSheet && range.sheetId !== sheetId) {
|
|
1037
|
+
continue;
|
|
1038
|
+
}
|
|
1039
|
+
try {
|
|
1040
|
+
for (var _j = (e_12 = void 0, __values(iterateCellsInRange(range))), _k = _j.next(); !_k.done; _k = _j.next()) {
|
|
1041
|
+
var _l = __read(_k.value, 2), rowIndex = _l[0], columnIndex = _l[1];
|
|
1042
|
+
this.enqueueGraphOperation({
|
|
1043
|
+
position: {
|
|
1044
|
+
rowIndex: rowIndex,
|
|
1045
|
+
columnIndex: columnIndex,
|
|
1046
|
+
sheetId: range.sheetId,
|
|
1047
|
+
dataValidationId: rule.id,
|
|
1048
|
+
},
|
|
1049
|
+
type: "add",
|
|
1050
|
+
});
|
|
1051
|
+
}
|
|
1052
|
+
}
|
|
1053
|
+
catch (e_12_1) { e_12 = { error: e_12_1 }; }
|
|
1054
|
+
finally {
|
|
1055
|
+
try {
|
|
1056
|
+
if (_k && !_k.done && (_c = _j.return)) _c.call(_j);
|
|
1057
|
+
}
|
|
1058
|
+
finally { if (e_12) throw e_12.error; }
|
|
1059
|
+
}
|
|
1060
|
+
}
|
|
1061
|
+
}
|
|
1062
|
+
catch (e_11_1) { e_11 = { error: e_11_1 }; }
|
|
1063
|
+
finally {
|
|
1064
|
+
try {
|
|
1065
|
+
if (_h && !_h.done && (_b = _g.return)) _b.call(_g);
|
|
1066
|
+
}
|
|
1067
|
+
finally { if (e_11) throw e_11.error; }
|
|
1068
|
+
}
|
|
1069
|
+
}
|
|
1070
|
+
}
|
|
1071
|
+
}
|
|
1072
|
+
catch (e_10_1) { e_10 = { error: e_10_1 }; }
|
|
1073
|
+
finally {
|
|
1074
|
+
try {
|
|
1075
|
+
if (_f && !_f.done && (_a = _e.return)) _a.call(_e);
|
|
1076
|
+
}
|
|
1077
|
+
finally { if (e_10) throw e_10.error; }
|
|
1078
|
+
}
|
|
1079
|
+
};
|
|
1080
|
+
Object.defineProperty(Spreadsheet.prototype, "sharedStrings", {
|
|
1081
|
+
get: function () {
|
|
1082
|
+
return this._sharedStrings;
|
|
1083
|
+
},
|
|
1084
|
+
set: function (value) {
|
|
1085
|
+
this._sharedStrings = value;
|
|
1086
|
+
},
|
|
1087
|
+
enumerable: false,
|
|
1088
|
+
configurable: true
|
|
1089
|
+
});
|
|
1090
|
+
Object.defineProperty(Spreadsheet.prototype, "activeSheetId", {
|
|
1091
|
+
get: function () {
|
|
1092
|
+
return this._activeSheetId;
|
|
1093
|
+
},
|
|
1094
|
+
set: function (value) {
|
|
1095
|
+
this._activeSheetId = value;
|
|
1096
|
+
},
|
|
1097
|
+
enumerable: false,
|
|
1098
|
+
configurable: true
|
|
1099
|
+
});
|
|
1100
|
+
Object.defineProperty(Spreadsheet.prototype, "sheets", {
|
|
1101
|
+
get: function () {
|
|
1102
|
+
return this._sheets;
|
|
1103
|
+
},
|
|
1104
|
+
set: function (value) {
|
|
1105
|
+
this._sheets = value;
|
|
1106
|
+
this._calculationInterface.markMetadataDirty();
|
|
1107
|
+
},
|
|
1108
|
+
enumerable: false,
|
|
1109
|
+
configurable: true
|
|
1110
|
+
});
|
|
1111
|
+
Object.defineProperty(Spreadsheet.prototype, "charts", {
|
|
1112
|
+
get: function () {
|
|
1113
|
+
return this._charts;
|
|
1114
|
+
},
|
|
1115
|
+
set: function (value) {
|
|
1116
|
+
this._charts = value;
|
|
1117
|
+
},
|
|
1118
|
+
enumerable: false,
|
|
1119
|
+
configurable: true
|
|
1120
|
+
});
|
|
1121
|
+
Object.defineProperty(Spreadsheet.prototype, "embeds", {
|
|
1122
|
+
get: function () {
|
|
1123
|
+
return this._embeds;
|
|
1124
|
+
},
|
|
1125
|
+
set: function (value) {
|
|
1126
|
+
this._embeds = value;
|
|
1127
|
+
},
|
|
1128
|
+
enumerable: false,
|
|
1129
|
+
configurable: true
|
|
1130
|
+
});
|
|
1131
|
+
Object.defineProperty(Spreadsheet.prototype, "pivotTables", {
|
|
1132
|
+
get: function () {
|
|
1133
|
+
return this._pivotTables;
|
|
1134
|
+
},
|
|
1135
|
+
set: function (value) {
|
|
1136
|
+
this._pivotTables = value;
|
|
1137
|
+
},
|
|
1138
|
+
enumerable: false,
|
|
1139
|
+
configurable: true
|
|
1140
|
+
});
|
|
1141
|
+
Object.defineProperty(Spreadsheet.prototype, "citations", {
|
|
1142
|
+
get: function () {
|
|
1143
|
+
return this._citations;
|
|
1144
|
+
},
|
|
1145
|
+
set: function (value) {
|
|
1146
|
+
this._citations = value;
|
|
1147
|
+
},
|
|
1148
|
+
enumerable: false,
|
|
1149
|
+
configurable: true
|
|
1150
|
+
});
|
|
1151
|
+
Object.defineProperty(Spreadsheet.prototype, "namedRanges", {
|
|
1152
|
+
get: function () {
|
|
1153
|
+
return this._namedRanges;
|
|
1154
|
+
},
|
|
1155
|
+
set: function (value) {
|
|
1156
|
+
this._namedRanges = value;
|
|
1157
|
+
this._calculationInterface.markMetadataDirty();
|
|
1158
|
+
},
|
|
1159
|
+
enumerable: false,
|
|
1160
|
+
configurable: true
|
|
1161
|
+
});
|
|
1162
|
+
Object.defineProperty(Spreadsheet.prototype, "dataValidations", {
|
|
1163
|
+
get: function () {
|
|
1164
|
+
return this._dataValidations;
|
|
1165
|
+
},
|
|
1166
|
+
set: function (value) {
|
|
1167
|
+
this._dataValidations = value;
|
|
1168
|
+
},
|
|
1169
|
+
enumerable: false,
|
|
1170
|
+
configurable: true
|
|
1171
|
+
});
|
|
1172
|
+
Object.defineProperty(Spreadsheet.prototype, "conditionalFormats", {
|
|
1173
|
+
get: function () {
|
|
1174
|
+
return this._conditionalFormats;
|
|
1175
|
+
},
|
|
1176
|
+
set: function (value) {
|
|
1177
|
+
this._conditionalFormats = value;
|
|
1178
|
+
},
|
|
1179
|
+
enumerable: false,
|
|
1180
|
+
configurable: true
|
|
1181
|
+
});
|
|
1182
|
+
Object.defineProperty(Spreadsheet.prototype, "sheetData", {
|
|
1183
|
+
get: function () {
|
|
1184
|
+
return this._sheetData;
|
|
1185
|
+
},
|
|
1186
|
+
set: function (sheetData) {
|
|
1187
|
+
this._sheetData = sheetData;
|
|
1188
|
+
},
|
|
1189
|
+
enumerable: false,
|
|
1190
|
+
configurable: true
|
|
1191
|
+
});
|
|
1192
|
+
Object.defineProperty(Spreadsheet.prototype, "tables", {
|
|
1193
|
+
get: function () {
|
|
1194
|
+
return this._tables;
|
|
1195
|
+
},
|
|
1196
|
+
set: function (value) {
|
|
1197
|
+
this._tables = value;
|
|
1198
|
+
this._calculationInterface.markMetadataDirty();
|
|
1199
|
+
},
|
|
1200
|
+
enumerable: false,
|
|
1201
|
+
configurable: true
|
|
1202
|
+
});
|
|
1203
|
+
Object.defineProperty(Spreadsheet.prototype, "locale", {
|
|
1204
|
+
get: function () {
|
|
1205
|
+
return this._locale;
|
|
1206
|
+
},
|
|
1207
|
+
set: function (value) {
|
|
1208
|
+
this._locale = value;
|
|
1209
|
+
this._calculationInterface.markMetadataDirty();
|
|
1210
|
+
},
|
|
1211
|
+
enumerable: false,
|
|
1212
|
+
configurable: true
|
|
1213
|
+
});
|
|
1214
|
+
Object.defineProperty(Spreadsheet.prototype, "cellXfs", {
|
|
1215
|
+
get: function () {
|
|
1216
|
+
return this._cellXfs;
|
|
1217
|
+
},
|
|
1218
|
+
set: function (value) {
|
|
1219
|
+
this._cellXfs = value;
|
|
1220
|
+
},
|
|
1221
|
+
enumerable: false,
|
|
1222
|
+
configurable: true
|
|
1223
|
+
});
|
|
1224
|
+
Object.defineProperty(Spreadsheet.prototype, "patches", {
|
|
1225
|
+
get: function () {
|
|
1226
|
+
return this._patches;
|
|
1227
|
+
},
|
|
1228
|
+
set: function (value) {
|
|
1229
|
+
this._patches = value;
|
|
1230
|
+
},
|
|
1231
|
+
enumerable: false,
|
|
1232
|
+
configurable: true
|
|
1233
|
+
});
|
|
1234
|
+
Spreadsheet.prototype.clearPatches = function () {
|
|
1235
|
+
this._patches = [];
|
|
1236
|
+
};
|
|
1237
|
+
Object.defineProperty(Spreadsheet.prototype, "cellXfsRegistry", {
|
|
1238
|
+
get: function () {
|
|
1239
|
+
return new CellXfsRegistry(this.cellXfs, this.onChangeCellXfs);
|
|
1240
|
+
},
|
|
1241
|
+
enumerable: false,
|
|
1242
|
+
configurable: true
|
|
1243
|
+
});
|
|
1244
|
+
Object.defineProperty(Spreadsheet.prototype, "sharedStringRegistry", {
|
|
1245
|
+
get: function () {
|
|
1246
|
+
return new SharedStringRegistry(this.sharedStrings, this.onChangeSharedStrings);
|
|
1247
|
+
},
|
|
1248
|
+
enumerable: false,
|
|
1249
|
+
configurable: true
|
|
1250
|
+
});
|
|
1251
|
+
Spreadsheet.prototype.getSharedStringValue = function (cellData) {
|
|
1252
|
+
if ((cellData === null || cellData === void 0 ? void 0 : cellData.ss) == null) {
|
|
1253
|
+
return undefined;
|
|
1254
|
+
}
|
|
1255
|
+
var value = this.sharedStrings.get(String(cellData.ss));
|
|
1256
|
+
if (value == null) {
|
|
1257
|
+
return undefined;
|
|
1258
|
+
}
|
|
1259
|
+
// Entries may be plain strings OR rich `{text, runs}` objects — mirror the
|
|
1260
|
+
// hooks' getSharedStringValue, which resolves the rich form's text.
|
|
1261
|
+
return getSharedStringText(value);
|
|
1262
|
+
};
|
|
1263
|
+
Spreadsheet.prototype.getHyperLink = function (sheetId, rowIndex, columnIndex) {
|
|
1264
|
+
var _a;
|
|
1265
|
+
return (_a = this.getCellData(sheetId, rowIndex, columnIndex)) === null || _a === void 0 ? void 0 : _a.hyperlink;
|
|
1266
|
+
};
|
|
1267
|
+
Spreadsheet.prototype.getHyperlinkText = function (hyperlink) {
|
|
1268
|
+
if (!hyperlink) {
|
|
1269
|
+
return undefined;
|
|
1270
|
+
}
|
|
1271
|
+
if (typeof hyperlink === "string") {
|
|
1272
|
+
return hyperlink;
|
|
1273
|
+
}
|
|
1274
|
+
if (hyperlink.kind === "external") {
|
|
1275
|
+
return hyperlink.url;
|
|
1276
|
+
}
|
|
1277
|
+
return hyperlink.location;
|
|
1278
|
+
};
|
|
1279
|
+
Spreadsheet.prototype.getCellData = function (sheetId, rowIndex, columnIndex) {
|
|
1280
|
+
var _a, _b, _c, _d;
|
|
1281
|
+
return (_d = (_c = (_b = (_a = this.sheetData) === null || _a === void 0 ? void 0 : _a[sheetId]) === null || _b === void 0 ? void 0 : _b[rowIndex]) === null || _c === void 0 ? void 0 : _c.values) === null || _d === void 0 ? void 0 : _d[columnIndex];
|
|
1282
|
+
};
|
|
1283
|
+
/**
|
|
1284
|
+
* Get sheet
|
|
1285
|
+
* @param sheetId
|
|
1286
|
+
* @returns
|
|
1287
|
+
*/
|
|
1288
|
+
Spreadsheet.prototype.getSheet = function (sheetId) {
|
|
1289
|
+
var sheet = this.sheets.find(function (sheet) { return sheet.sheetId === sheetId; });
|
|
1290
|
+
return new SheetInterface(sheet);
|
|
1291
|
+
};
|
|
1292
|
+
Spreadsheet.prototype.flushCalculations = function () {
|
|
1293
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
1294
|
+
return __generator(this, function (_a) {
|
|
1295
|
+
switch (_a.label) {
|
|
1296
|
+
case 0: return [4 /*yield*/, this._calculationInterface.flush()];
|
|
1297
|
+
case 1:
|
|
1298
|
+
_a.sent();
|
|
1299
|
+
return [2 /*return*/];
|
|
1300
|
+
}
|
|
1301
|
+
});
|
|
1302
|
+
});
|
|
1303
|
+
};
|
|
1304
|
+
Spreadsheet.prototype.calculateAll = function () {
|
|
1305
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
1306
|
+
var operations;
|
|
1307
|
+
return __generator(this, function (_a) {
|
|
1308
|
+
operations = this.collectFormulaOperations();
|
|
1309
|
+
if (!operations.length) {
|
|
1310
|
+
return [2 /*return*/, []];
|
|
1311
|
+
}
|
|
1312
|
+
return [2 /*return*/, this._calculationInterface.calculate(operations)];
|
|
1313
|
+
});
|
|
1314
|
+
});
|
|
1315
|
+
};
|
|
1316
|
+
Spreadsheet.prototype.calculatePending = function () {
|
|
1317
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
1318
|
+
return __generator(this, function (_a) {
|
|
1319
|
+
return [2 /*return*/, this._calculationInterface.flushWithResults()];
|
|
1320
|
+
});
|
|
1321
|
+
});
|
|
1322
|
+
};
|
|
1323
|
+
/**
|
|
1324
|
+
* Get text format for a cell (for auto-sizing)
|
|
1325
|
+
*/
|
|
1326
|
+
/**
|
|
1327
|
+
* Rich-text runs for a cell, read off the SharedStrings entry the cell
|
|
1328
|
+
* points at via `ss` (same source as the hooks' `getTextFormatRuns`).
|
|
1329
|
+
*/
|
|
1330
|
+
Spreadsheet.prototype.getCellTextFormatRuns = function (sheetId, rowIndex, columnIndex) {
|
|
1331
|
+
var cellData = this.getCellData(sheetId, rowIndex, columnIndex);
|
|
1332
|
+
if ((cellData === null || cellData === void 0 ? void 0 : cellData.ss) == null)
|
|
1333
|
+
return undefined;
|
|
1334
|
+
return getSharedStringRuns(this.sharedStrings.get(String(cellData.ss)));
|
|
1335
|
+
};
|
|
1336
|
+
Spreadsheet.prototype.getCellTextFormat = function (sheetId, rowIndex, columnIndex) {
|
|
1337
|
+
var _a, _b, _c, _d, _e, _f;
|
|
1338
|
+
var cellData = this.getCellData(sheetId, rowIndex, columnIndex);
|
|
1339
|
+
// `ef` is no longer persisted on cellData. Read `uf` first, fall back to
|
|
1340
|
+
// legacy `ef` for older saved data.
|
|
1341
|
+
var effectiveFormat = (_a = getCellUserEnteredFormat(cellData)) !== null && _a !== void 0 ? _a : getCellEffectiveFormat(cellData);
|
|
1342
|
+
// Registry
|
|
1343
|
+
if (isStyleReference(effectiveFormat)) {
|
|
1344
|
+
effectiveFormat = this.cellXfsRegistry.getCellXfsFromStyleId((_b = effectiveFormat.sid) !== null && _b !== void 0 ? _b : effectiveFormat.styleId);
|
|
1345
|
+
}
|
|
1346
|
+
return {
|
|
1347
|
+
bold: (_c = effectiveFormat === null || effectiveFormat === void 0 ? void 0 : effectiveFormat.textFormat) === null || _c === void 0 ? void 0 : _c.bold,
|
|
1348
|
+
fontSize: (_d = effectiveFormat === null || effectiveFormat === void 0 ? void 0 : effectiveFormat.textFormat) === null || _d === void 0 ? void 0 : _d.fontSize,
|
|
1349
|
+
fontFamily: (_e = effectiveFormat === null || effectiveFormat === void 0 ? void 0 : effectiveFormat.textFormat) === null || _e === void 0 ? void 0 : _e.fontFamily,
|
|
1350
|
+
italic: (_f = effectiveFormat === null || effectiveFormat === void 0 ? void 0 : effectiveFormat.textFormat) === null || _f === void 0 ? void 0 : _f.italic,
|
|
1351
|
+
shouldWrap: (effectiveFormat === null || effectiveFormat === void 0 ? void 0 : effectiveFormat.wrapStrategy) === "wrap",
|
|
1352
|
+
};
|
|
1353
|
+
};
|
|
1354
|
+
Spreadsheet.prototype.shouldWrapCell = function (sheetId, rowIndex, columnIndex) {
|
|
1355
|
+
var cellFormat = this.getCellTextFormat(sheetId, rowIndex, columnIndex);
|
|
1356
|
+
return cellFormat === null || cellFormat === void 0 ? void 0 : cellFormat.shouldWrap;
|
|
1357
|
+
};
|
|
1358
|
+
/**
|
|
1359
|
+
* Get column width from sheet metadata (stored width)
|
|
1360
|
+
*/
|
|
1361
|
+
Spreadsheet.prototype.getStoredColumnWidth = function (sheetId, columnIndex) {
|
|
1362
|
+
var _a, _b, _c;
|
|
1363
|
+
var sheet = this.sheets.find(function (s) { return s.sheetId === sheetId; });
|
|
1364
|
+
return (_c = (_b = (_a = sheet === null || sheet === void 0 ? void 0 : sheet.columnMetadata) === null || _a === void 0 ? void 0 : _a[columnIndex]) === null || _b === void 0 ? void 0 : _b.size) !== null && _c !== void 0 ? _c : DEFAULT_COLUMN_WIDTH;
|
|
1365
|
+
};
|
|
1366
|
+
/**
|
|
1367
|
+
* Check if a column is hidden
|
|
1368
|
+
*/
|
|
1369
|
+
Spreadsheet.prototype.isHiddenColumn = function (sheetId, columnIndex) {
|
|
1370
|
+
var _a, _b, _c;
|
|
1371
|
+
var sheet = this.sheets.find(function (s) { return s.sheetId === sheetId; });
|
|
1372
|
+
var metadata = (_a = sheet === null || sheet === void 0 ? void 0 : sheet.columnMetadata) === null || _a === void 0 ? void 0 : _a[columnIndex];
|
|
1373
|
+
return (_c = (_b = metadata === null || metadata === void 0 ? void 0 : metadata.hiddenByUser) !== null && _b !== void 0 ? _b : metadata === null || metadata === void 0 ? void 0 : metadata.hiddenByFilter) !== null && _c !== void 0 ? _c : false;
|
|
1374
|
+
};
|
|
1375
|
+
/**
|
|
1376
|
+
* Check if a row is hidden
|
|
1377
|
+
*/
|
|
1378
|
+
Spreadsheet.prototype.isHiddenRow = function (sheetId, rowIndex) {
|
|
1379
|
+
var _a, _b, _c;
|
|
1380
|
+
var sheet = this.sheets.find(function (s) { return s.sheetId === sheetId; });
|
|
1381
|
+
var metadata = (_a = sheet === null || sheet === void 0 ? void 0 : sheet.rowMetadata) === null || _a === void 0 ? void 0 : _a[rowIndex];
|
|
1382
|
+
return (_c = (_b = metadata === null || metadata === void 0 ? void 0 : metadata.hiddenByUser) !== null && _b !== void 0 ? _b : metadata === null || metadata === void 0 ? void 0 : metadata.hiddenByFilter) !== null && _c !== void 0 ? _c : false;
|
|
1383
|
+
};
|
|
1384
|
+
/**
|
|
1385
|
+
* Generate RFC patches that can be used to
|
|
1386
|
+
* update yJS doc
|
|
1387
|
+
* @returns
|
|
1388
|
+
*/
|
|
1389
|
+
Spreadsheet.prototype.generateStatePatches = function () {
|
|
1390
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
1391
|
+
var spreadsheetPatches, promises;
|
|
1392
|
+
var _this = this;
|
|
1393
|
+
return __generator(this, function (_a) {
|
|
1394
|
+
switch (_a.label) {
|
|
1395
|
+
case 0:
|
|
1396
|
+
spreadsheetPatches = [];
|
|
1397
|
+
promises = [];
|
|
1398
|
+
// Sheet data
|
|
1399
|
+
promises.push(new Promise(function (resolve) {
|
|
1400
|
+
var _a;
|
|
1401
|
+
(_a = _this.onChangeSheetData) === null || _a === void 0 ? void 0 : _a.call(_this, function (prev) {
|
|
1402
|
+
var _a = __read(produceWithPatches({}, function () {
|
|
1403
|
+
return prev;
|
|
1404
|
+
}), 3), _ = _a[0], patches = _a[1], inversePatches = _a[2];
|
|
1405
|
+
spreadsheetPatches.push([
|
|
1406
|
+
{
|
|
1407
|
+
sheetData: { patches: patches, inversePatches: inversePatches },
|
|
1408
|
+
},
|
|
1409
|
+
]);
|
|
1410
|
+
resolve();
|
|
1411
|
+
return prev;
|
|
1412
|
+
});
|
|
1413
|
+
}));
|
|
1414
|
+
// onChangeSheets
|
|
1415
|
+
promises.push(new Promise(function (resolve) {
|
|
1416
|
+
var _a;
|
|
1417
|
+
(_a = _this.onChangeSheets) === null || _a === void 0 ? void 0 : _a.call(_this, function (prev) {
|
|
1418
|
+
var _a = __read(produceWithPatches([], function () {
|
|
1419
|
+
return prev;
|
|
1420
|
+
}), 3), _ = _a[0], patches = _a[1], inversePatches = _a[2];
|
|
1421
|
+
spreadsheetPatches.push([
|
|
1422
|
+
{
|
|
1423
|
+
sheets: { patches: patches, inversePatches: inversePatches },
|
|
1424
|
+
},
|
|
1425
|
+
]);
|
|
1426
|
+
resolve();
|
|
1427
|
+
return prev;
|
|
1428
|
+
});
|
|
1429
|
+
}));
|
|
1430
|
+
// onChangeTables
|
|
1431
|
+
promises.push(new Promise(function (resolve) {
|
|
1432
|
+
var _a;
|
|
1433
|
+
(_a = _this.onChangeTables) === null || _a === void 0 ? void 0 : _a.call(_this, function (prev) {
|
|
1434
|
+
var _a = __read(produceWithPatches([], function () {
|
|
1435
|
+
return prev;
|
|
1436
|
+
}), 3), _ = _a[0], patches = _a[1], inversePatches = _a[2];
|
|
1437
|
+
spreadsheetPatches.push([
|
|
1438
|
+
{
|
|
1439
|
+
tables: { patches: patches, inversePatches: inversePatches },
|
|
1440
|
+
},
|
|
1441
|
+
]);
|
|
1442
|
+
resolve();
|
|
1443
|
+
return prev;
|
|
1444
|
+
});
|
|
1445
|
+
}));
|
|
1446
|
+
// onChangeCharts
|
|
1447
|
+
promises.push(new Promise(function (resolve) {
|
|
1448
|
+
var _a;
|
|
1449
|
+
(_a = _this.onChangeCharts) === null || _a === void 0 ? void 0 : _a.call(_this, function (prev) {
|
|
1450
|
+
var _a = __read(produceWithPatches([], function () {
|
|
1451
|
+
return prev;
|
|
1452
|
+
}), 3), _ = _a[0], patches = _a[1], inversePatches = _a[2];
|
|
1453
|
+
spreadsheetPatches.push([
|
|
1454
|
+
{
|
|
1455
|
+
charts: { patches: patches, inversePatches: inversePatches },
|
|
1456
|
+
},
|
|
1457
|
+
]);
|
|
1458
|
+
resolve();
|
|
1459
|
+
return prev;
|
|
1460
|
+
});
|
|
1461
|
+
}));
|
|
1462
|
+
// onChangeEmbeds
|
|
1463
|
+
promises.push(new Promise(function (resolve) {
|
|
1464
|
+
var _a;
|
|
1465
|
+
(_a = _this.onChangeEmbeds) === null || _a === void 0 ? void 0 : _a.call(_this, function (prev) {
|
|
1466
|
+
var _a = __read(produceWithPatches([], function () {
|
|
1467
|
+
return prev;
|
|
1468
|
+
}), 3), _ = _a[0], patches = _a[1], inversePatches = _a[2];
|
|
1469
|
+
spreadsheetPatches.push([
|
|
1470
|
+
{
|
|
1471
|
+
embeds: { patches: patches, inversePatches: inversePatches },
|
|
1472
|
+
},
|
|
1473
|
+
]);
|
|
1474
|
+
resolve();
|
|
1475
|
+
return prev;
|
|
1476
|
+
});
|
|
1477
|
+
}));
|
|
1478
|
+
// onChangeNamedRanges
|
|
1479
|
+
promises.push(new Promise(function (resolve) {
|
|
1480
|
+
var _a;
|
|
1481
|
+
(_a = _this.onChangeNamedRanges) === null || _a === void 0 ? void 0 : _a.call(_this, function (prev) {
|
|
1482
|
+
var _a = __read(produceWithPatches([], function () {
|
|
1483
|
+
return prev;
|
|
1484
|
+
}), 3), _ = _a[0], patches = _a[1], inversePatches = _a[2];
|
|
1485
|
+
spreadsheetPatches.push([
|
|
1486
|
+
{
|
|
1487
|
+
namedRanges: { patches: patches, inversePatches: inversePatches },
|
|
1488
|
+
},
|
|
1489
|
+
]);
|
|
1490
|
+
resolve();
|
|
1491
|
+
return prev;
|
|
1492
|
+
});
|
|
1493
|
+
}));
|
|
1494
|
+
// onChangeSharedStrings
|
|
1495
|
+
promises.push(new Promise(function (resolve) {
|
|
1496
|
+
var _a;
|
|
1497
|
+
(_a = _this.onChangeSharedStrings) === null || _a === void 0 ? void 0 : _a.call(_this, function (prev) {
|
|
1498
|
+
// Always use Map for shared strings
|
|
1499
|
+
var base = new Map();
|
|
1500
|
+
var _a = __read(produceWithPatches(base, function () {
|
|
1501
|
+
return prev;
|
|
1502
|
+
}), 3), _ = _a[0], patches = _a[1], inversePatches = _a[2];
|
|
1503
|
+
spreadsheetPatches.push([
|
|
1504
|
+
{
|
|
1505
|
+
sharedStrings: { patches: patches, inversePatches: inversePatches },
|
|
1506
|
+
},
|
|
1507
|
+
]);
|
|
1508
|
+
resolve();
|
|
1509
|
+
return prev;
|
|
1510
|
+
});
|
|
1511
|
+
}));
|
|
1512
|
+
// onChangeDataValidations
|
|
1513
|
+
promises.push(new Promise(function (resolve) {
|
|
1514
|
+
var _a;
|
|
1515
|
+
(_a = _this.onChangeDataValidations) === null || _a === void 0 ? void 0 : _a.call(_this, function (prev) {
|
|
1516
|
+
var _a = __read(produceWithPatches([], function () {
|
|
1517
|
+
return prev;
|
|
1518
|
+
}), 3), _ = _a[0], patches = _a[1], inversePatches = _a[2];
|
|
1519
|
+
spreadsheetPatches.push([
|
|
1520
|
+
{
|
|
1521
|
+
dataValidations: { patches: patches, inversePatches: inversePatches },
|
|
1522
|
+
},
|
|
1523
|
+
]);
|
|
1524
|
+
resolve();
|
|
1525
|
+
return prev;
|
|
1526
|
+
});
|
|
1527
|
+
}));
|
|
1528
|
+
// onChangeConditionalFormats
|
|
1529
|
+
promises.push(new Promise(function (resolve) {
|
|
1530
|
+
var _a;
|
|
1531
|
+
(_a = _this.onChangeConditionalFormats) === null || _a === void 0 ? void 0 : _a.call(_this, function (prev) {
|
|
1532
|
+
var _a = __read(produceWithPatches([], function () {
|
|
1533
|
+
return prev;
|
|
1534
|
+
}), 3), _ = _a[0], patches = _a[1], inversePatches = _a[2];
|
|
1535
|
+
spreadsheetPatches.push([
|
|
1536
|
+
{
|
|
1537
|
+
conditionalFormats: { patches: patches, inversePatches: inversePatches },
|
|
1538
|
+
},
|
|
1539
|
+
]);
|
|
1540
|
+
resolve();
|
|
1541
|
+
return prev;
|
|
1542
|
+
});
|
|
1543
|
+
}));
|
|
1544
|
+
// onChangeCellXfs
|
|
1545
|
+
promises.push(new Promise(function (resolve) {
|
|
1546
|
+
var _a;
|
|
1547
|
+
(_a = _this.onChangeCellXfs) === null || _a === void 0 ? void 0 : _a.call(_this, function (prev) {
|
|
1548
|
+
var _a = __read(produceWithPatches([], function () {
|
|
1549
|
+
return prev;
|
|
1550
|
+
}), 3), _ = _a[0], patches = _a[1], inversePatches = _a[2];
|
|
1551
|
+
spreadsheetPatches.push([
|
|
1552
|
+
{
|
|
1553
|
+
cellXfs: { patches: patches, inversePatches: inversePatches },
|
|
1554
|
+
},
|
|
1555
|
+
]);
|
|
1556
|
+
resolve();
|
|
1557
|
+
return prev;
|
|
1558
|
+
});
|
|
1559
|
+
}));
|
|
1560
|
+
// onChangeCitations
|
|
1561
|
+
promises.push(new Promise(function (resolve) {
|
|
1562
|
+
var _a;
|
|
1563
|
+
(_a = _this.onChangeCitations) === null || _a === void 0 ? void 0 : _a.call(_this, function (prev) {
|
|
1564
|
+
var _a = __read(produceWithPatches([], function () {
|
|
1565
|
+
return prev;
|
|
1566
|
+
}), 3), _ = _a[0], patches = _a[1], inversePatches = _a[2];
|
|
1567
|
+
spreadsheetPatches.push([
|
|
1568
|
+
{
|
|
1569
|
+
citations: { patches: patches, inversePatches: inversePatches },
|
|
1570
|
+
},
|
|
1571
|
+
]);
|
|
1572
|
+
resolve();
|
|
1573
|
+
return prev;
|
|
1574
|
+
});
|
|
1575
|
+
}));
|
|
1576
|
+
// Wait for all callbacks to complete
|
|
1577
|
+
return [4 /*yield*/, Promise.all(promises)];
|
|
1578
|
+
case 1:
|
|
1579
|
+
// Wait for all callbacks to complete
|
|
1580
|
+
_a.sent();
|
|
1581
|
+
return [2 /*return*/, spreadsheetPatches];
|
|
1582
|
+
}
|
|
1583
|
+
});
|
|
1584
|
+
});
|
|
1585
|
+
};
|
|
1586
|
+
/**
|
|
1587
|
+
* Get patches as tuples for applyPatchesToYDoc
|
|
1588
|
+
* @param type - The operation type ('redo' or 'undo')
|
|
1589
|
+
* @returns Array of tuples in the format expected by applyPatchesToYDoc
|
|
1590
|
+
*/
|
|
1591
|
+
Spreadsheet.prototype.getPatchTuples = function (type) {
|
|
1592
|
+
if (type === void 0) { type = "redo"; }
|
|
1593
|
+
return this._patches.map(function (patch) { return [patch, type]; });
|
|
1594
|
+
};
|
|
1595
|
+
/**
|
|
1596
|
+
* Insert note in a cell
|
|
1597
|
+
* @param args
|
|
1598
|
+
*/
|
|
1599
|
+
Spreadsheet.prototype.insertNote = function () {
|
|
1600
|
+
var args = [];
|
|
1601
|
+
for (var _i = 0; _i < arguments.length; _i++) {
|
|
1602
|
+
args[_i] = arguments[_i];
|
|
1603
|
+
}
|
|
1604
|
+
insertNote({
|
|
1605
|
+
createHistory: this.createHistory,
|
|
1606
|
+
locale: this.locale,
|
|
1607
|
+
onChangeSheetData: this.onChangeSheetData,
|
|
1608
|
+
}).apply(void 0, __spreadArray([], __read(args), false));
|
|
1609
|
+
};
|
|
1610
|
+
/**
|
|
1611
|
+
* Inserts table row
|
|
1612
|
+
* @param tableView
|
|
1613
|
+
* @param relativeRowIndex
|
|
1614
|
+
* @param rowData
|
|
1615
|
+
*/
|
|
1616
|
+
Spreadsheet.prototype.insertTableRow = function (tableView, relativeRowIndex, rowData) {
|
|
1617
|
+
var sheet = this.getSheet(tableView.sheetId);
|
|
1618
|
+
insertTableRow({
|
|
1619
|
+
onChangeSheets: this.onChangeSheets,
|
|
1620
|
+
onChangeSheetData: this.onChangeSheetData,
|
|
1621
|
+
onChangeTables: this.onChangeTables,
|
|
1622
|
+
onChangeDataValidations: this.onChangeDataValidations,
|
|
1623
|
+
onChangeConditionalFormats: this.onChangeConditionalFormats,
|
|
1624
|
+
createHistory: this.createHistory,
|
|
1625
|
+
enqueueCalculation: this.enqueueCalculation,
|
|
1626
|
+
enqueueGraphOperation: this.enqueueGraphOperation,
|
|
1627
|
+
enqueueStructureChange: this.enqueueStructureChange,
|
|
1628
|
+
getActiveCell: this.getActiveCell,
|
|
1629
|
+
getDependents: this.getDependents,
|
|
1630
|
+
getSheetName: this.getSheetName,
|
|
1631
|
+
rowCount: sheet.rowCount,
|
|
1632
|
+
columnCount: sheet.columnCount,
|
|
1633
|
+
})(tableView, relativeRowIndex, rowData);
|
|
1634
|
+
};
|
|
1635
|
+
/**
|
|
1636
|
+
* Inserts a row
|
|
1637
|
+
* @param sheetId
|
|
1638
|
+
* @param referenceRowIndex
|
|
1639
|
+
* @param numRows
|
|
1640
|
+
*/
|
|
1641
|
+
Spreadsheet.prototype.insertRow = function (sheetId, referenceRowIndex, numRows) {
|
|
1642
|
+
var _this = this;
|
|
1643
|
+
if (numRows === void 0) { numRows = 1; }
|
|
1644
|
+
var sheet = this.getSheet(sheetId);
|
|
1645
|
+
insertRow({
|
|
1646
|
+
onChangeSheets: this.onChangeSheets,
|
|
1647
|
+
onChangeSheetData: this.onChangeSheetData,
|
|
1648
|
+
onChangeTables: this.onChangeTables,
|
|
1649
|
+
onChangeDataValidations: this.onChangeDataValidations,
|
|
1650
|
+
onChangeConditionalFormats: this.onChangeConditionalFormats,
|
|
1651
|
+
createHistory: this.createHistory,
|
|
1652
|
+
enqueueCalculation: this.enqueueCalculation,
|
|
1653
|
+
enqueueGraphOperation: this.enqueueGraphOperation,
|
|
1654
|
+
enqueueStructureChange: this.enqueueStructureChange,
|
|
1655
|
+
getActiveCell: this.getActiveCell,
|
|
1656
|
+
getSelections: this.getSelections,
|
|
1657
|
+
getDependents: this.getDependents,
|
|
1658
|
+
getGraphNodes: function () { return _this._calculationInterface.getNodes(); },
|
|
1659
|
+
getGraphNodesInSheet: function (sheetId) {
|
|
1660
|
+
return _this._calculationInterface.getNodesInSheet(sheetId);
|
|
1661
|
+
},
|
|
1662
|
+
getSheetName: this.getSheetName,
|
|
1663
|
+
rowCount: sheet.rowCount,
|
|
1664
|
+
columnCount: sheet.columnCount,
|
|
1665
|
+
})(sheetId, referenceRowIndex, numRows);
|
|
1666
|
+
};
|
|
1667
|
+
/**
|
|
1668
|
+
* Inserts a column
|
|
1669
|
+
* @param sheetId
|
|
1670
|
+
* @param referenceColumnIndex
|
|
1671
|
+
* @param numColumns
|
|
1672
|
+
*/
|
|
1673
|
+
Spreadsheet.prototype.insertColumn = function (sheetId, referenceColumnIndex, numColumns) {
|
|
1674
|
+
var _this = this;
|
|
1675
|
+
if (numColumns === void 0) { numColumns = 1; }
|
|
1676
|
+
var sheet = this.getSheet(sheetId);
|
|
1677
|
+
insertColumn({
|
|
1678
|
+
onChangeSheets: this.onChangeSheets,
|
|
1679
|
+
onChangeSheetData: this.onChangeSheetData,
|
|
1680
|
+
onChangeTables: this.onChangeTables,
|
|
1681
|
+
onChangeDataValidations: this.onChangeDataValidations,
|
|
1682
|
+
onChangeConditionalFormats: this.onChangeConditionalFormats,
|
|
1683
|
+
createHistory: this.createHistory,
|
|
1684
|
+
enqueueCalculation: this.enqueueCalculation,
|
|
1685
|
+
enqueueGraphOperation: this.enqueueGraphOperation,
|
|
1686
|
+
enqueueStructureChange: this.enqueueStructureChange,
|
|
1687
|
+
getDependents: this.getDependents,
|
|
1688
|
+
getGraphNodes: function () { return _this._calculationInterface.getNodes(); },
|
|
1689
|
+
getGraphNodesInSheet: function (sheetId) {
|
|
1690
|
+
return _this._calculationInterface.getNodesInSheet(sheetId);
|
|
1691
|
+
},
|
|
1692
|
+
getSelections: this.getSelections,
|
|
1693
|
+
getActiveCell: this.getActiveCell,
|
|
1694
|
+
getSheetName: this.getSheetName,
|
|
1695
|
+
rowCount: sheet.rowCount,
|
|
1696
|
+
columnCount: sheet.columnCount,
|
|
1697
|
+
tables: this.tables,
|
|
1698
|
+
})(sheetId, referenceColumnIndex, numColumns);
|
|
1699
|
+
};
|
|
1700
|
+
/**
|
|
1701
|
+
* Deletes columns
|
|
1702
|
+
* @param sheetId
|
|
1703
|
+
* @param columnIndexes
|
|
1704
|
+
*/
|
|
1705
|
+
Spreadsheet.prototype.deleteColumn = function (sheetId, columnIndexes) {
|
|
1706
|
+
var _this = this;
|
|
1707
|
+
var sheet = this.getSheet(sheetId);
|
|
1708
|
+
deleteColumn({
|
|
1709
|
+
onChangeSheets: this.onChangeSheets,
|
|
1710
|
+
onChangeSheetData: this.onChangeSheetData,
|
|
1711
|
+
onChangeTables: this.onChangeTables,
|
|
1712
|
+
onChangeDataValidations: this.onChangeDataValidations,
|
|
1713
|
+
onChangeConditionalFormats: this.onChangeConditionalFormats,
|
|
1714
|
+
createHistory: this.createHistory,
|
|
1715
|
+
enqueueCalculation: this.enqueueCalculation,
|
|
1716
|
+
enqueueGraphOperation: this.enqueueGraphOperation,
|
|
1717
|
+
enqueueStructureChange: this.enqueueStructureChange,
|
|
1718
|
+
getDependents: this.getDependents,
|
|
1719
|
+
getGraphNodes: function () { return _this._calculationInterface.getNodes(); },
|
|
1720
|
+
getGraphNodesInSheet: function (sheetId) {
|
|
1721
|
+
return _this._calculationInterface.getNodesInSheet(sheetId);
|
|
1722
|
+
},
|
|
1723
|
+
getActiveCell: this.getActiveCell,
|
|
1724
|
+
getSelections: this.getSelections,
|
|
1725
|
+
getSheetName: this.getSheetName,
|
|
1726
|
+
rowCount: sheet.rowCount,
|
|
1727
|
+
columnCount: sheet.columnCount,
|
|
1728
|
+
locale: this.locale,
|
|
1729
|
+
onChangeActiveCell: this.onChangeActiveSheet,
|
|
1730
|
+
onChangeSelections: this.onChangeSelections,
|
|
1731
|
+
onChangeCitations: this.onChangeCitations,
|
|
1732
|
+
})(sheetId, columnIndexes);
|
|
1733
|
+
};
|
|
1734
|
+
/**
|
|
1735
|
+
* Update a range of cells
|
|
1736
|
+
* @param sheetId
|
|
1737
|
+
* @param ranges
|
|
1738
|
+
* @param values
|
|
1739
|
+
*/
|
|
1740
|
+
Spreadsheet.prototype.changeBatch = function (sheetId, ranges, values, formatting, citations, changeBatchOptions) {
|
|
1741
|
+
var _this = this;
|
|
1742
|
+
var ssRegistry = this.sharedStringRegistry;
|
|
1743
|
+
var cellXfsRegistry = this.cellXfsRegistry;
|
|
1744
|
+
return changeBatch({
|
|
1745
|
+
createHistory: this.createHistory,
|
|
1746
|
+
enqueueCalculation: this.enqueueCalculation,
|
|
1747
|
+
onChangeSheetData: this.onChangeSheetData,
|
|
1748
|
+
onChangeSheets: this.onChangeSheets,
|
|
1749
|
+
tables: this.tables,
|
|
1750
|
+
onChangeTables: this.onChangeTables,
|
|
1751
|
+
locale: this.locale,
|
|
1752
|
+
getUserEnteredValue: this.getUserEnteredStringValue,
|
|
1753
|
+
cellXfsRegistry: cellXfsRegistry,
|
|
1754
|
+
getFormattedValue: this.getFormattedValue,
|
|
1755
|
+
getCellDimensions: this.getCellDimensions,
|
|
1756
|
+
getRowHeight: this.getRowHeight,
|
|
1757
|
+
enqueueGraphOperation: this.enqueueGraphOperation,
|
|
1758
|
+
getDependents: this.getDependents,
|
|
1759
|
+
getSheetName: this.getSheetName,
|
|
1760
|
+
isMergedCell: this.isMergedCell,
|
|
1761
|
+
getDataValidationById: this.getDataValidationById,
|
|
1762
|
+
sharedStringRegistry: ssRegistry,
|
|
1763
|
+
getEffectiveValuesFromRange: this.getEffectiveValuesFromRange,
|
|
1764
|
+
onChangeCitations: this.onChangeCitations,
|
|
1765
|
+
onChangeTableColumn: function () {
|
|
1766
|
+
var args = [];
|
|
1767
|
+
for (var _i = 0; _i < arguments.length; _i++) {
|
|
1768
|
+
args[_i] = arguments[_i];
|
|
1769
|
+
}
|
|
1770
|
+
return changeTableColumn({
|
|
1771
|
+
locale: _this.locale,
|
|
1772
|
+
sharedStringRegistry: ssRegistry,
|
|
1773
|
+
cellXfsRegistry: cellXfsRegistry,
|
|
1774
|
+
createHistory: _this.createHistory,
|
|
1775
|
+
enqueueCalculation: _this.enqueueCalculation,
|
|
1776
|
+
enqueueGraphOperation: _this.enqueueCalculation,
|
|
1777
|
+
getDependents: _this.getDependents,
|
|
1778
|
+
onChangeSheetData: _this.onChangeSheetData,
|
|
1779
|
+
onChangeTables: _this.onChangeTables,
|
|
1780
|
+
}).apply(void 0, __spreadArray([], __read(args), false));
|
|
1781
|
+
},
|
|
1782
|
+
onChangeCalculatedColumn: function () {
|
|
1783
|
+
var args = [];
|
|
1784
|
+
for (var _i = 0; _i < arguments.length; _i++) {
|
|
1785
|
+
args[_i] = arguments[_i];
|
|
1786
|
+
}
|
|
1787
|
+
return changeCalculatedColumn({
|
|
1788
|
+
locale: _this.locale,
|
|
1789
|
+
sharedStringRegistry: ssRegistry,
|
|
1790
|
+
cellXfsRegistry: cellXfsRegistry,
|
|
1791
|
+
createHistory: _this.createHistory,
|
|
1792
|
+
enqueueCalculation: _this.enqueueCalculation,
|
|
1793
|
+
onChangeTables: _this.onChangeTables,
|
|
1794
|
+
getSheetName: _this.getSheetName,
|
|
1795
|
+
getUserEnteredValue: _this.getUserEnteredStringValue,
|
|
1796
|
+
onChangeSheetData: _this.onChangeSheetData,
|
|
1797
|
+
}).apply(void 0, __spreadArray([], __read(args), false));
|
|
1798
|
+
},
|
|
1799
|
+
})(sheetId, ranges, values, formatting, citations, changeBatchOptions);
|
|
1800
|
+
};
|
|
1801
|
+
/**
|
|
1802
|
+
* Stream cell updates into a range
|
|
1803
|
+
* @param sheetId
|
|
1804
|
+
* @param range
|
|
1805
|
+
* @param stream
|
|
1806
|
+
*/
|
|
1807
|
+
Spreadsheet.prototype.changeBatchStream = function (sheetId, range, stream) {
|
|
1808
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
1809
|
+
return __generator(this, function (_a) {
|
|
1810
|
+
return [2 /*return*/, changeBatchStream({
|
|
1811
|
+
onChangeSheetData: this.onChangeSheetData,
|
|
1812
|
+
enqueueCalculation: this.enqueueCalculation,
|
|
1813
|
+
locale: this.locale,
|
|
1814
|
+
getDataValidationById: this.getDataValidationById,
|
|
1815
|
+
getEffectiveValuesFromRange: this.getEffectiveValuesFromRange,
|
|
1816
|
+
})(sheetId, range, stream)];
|
|
1817
|
+
});
|
|
1818
|
+
});
|
|
1819
|
+
};
|
|
1820
|
+
/**
|
|
1821
|
+
* Change cell formatting
|
|
1822
|
+
* @param args
|
|
1823
|
+
*/
|
|
1824
|
+
Spreadsheet.prototype.changeFormatting = function () {
|
|
1825
|
+
var args = [];
|
|
1826
|
+
for (var _i = 0; _i < arguments.length; _i++) {
|
|
1827
|
+
args[_i] = arguments[_i];
|
|
1828
|
+
}
|
|
1829
|
+
changeFormatting({
|
|
1830
|
+
getFormattedValue: this.getFormattedValue,
|
|
1831
|
+
createHistory: this.createHistory,
|
|
1832
|
+
enqueueCalculation: this.enqueueCalculation,
|
|
1833
|
+
onChangeSheetData: this.onChangeSheetData,
|
|
1834
|
+
onChangeSheets: this.onChangeSheets,
|
|
1835
|
+
locale: this.locale,
|
|
1836
|
+
cellXfsRegistry: this.cellXfsRegistry,
|
|
1837
|
+
getCellDimensions: this.getCellDimensions,
|
|
1838
|
+
getRowHeight: this.getRowHeight,
|
|
1839
|
+
}).apply(void 0, __spreadArray([], __read(args), false));
|
|
1840
|
+
};
|
|
1841
|
+
/**
|
|
1842
|
+
* Change cell border
|
|
1843
|
+
* @param sheetId
|
|
1844
|
+
* @param activeCell
|
|
1845
|
+
* @param selections
|
|
1846
|
+
* @param location
|
|
1847
|
+
* @param color
|
|
1848
|
+
* @param style
|
|
1849
|
+
*/
|
|
1850
|
+
Spreadsheet.prototype.changeBorder = function (sheetId, activeCell, selections, location, color, style) {
|
|
1851
|
+
if (style === void 0) { style = "solid"; }
|
|
1852
|
+
changeBorder({
|
|
1853
|
+
getFormattedValue: this.getFormattedValue,
|
|
1854
|
+
createHistory: this.createHistory,
|
|
1855
|
+
enqueueCalculation: this.enqueueCalculation,
|
|
1856
|
+
onChangeSheetData: this.onChangeSheetData,
|
|
1857
|
+
onChangeSheets: this.onChangeSheets,
|
|
1858
|
+
locale: this.locale,
|
|
1859
|
+
cellXfsRegistry: this.cellXfsRegistry,
|
|
1860
|
+
})(sheetId, activeCell, selections, location, color, style);
|
|
1861
|
+
};
|
|
1862
|
+
/**
|
|
1863
|
+
* Create a new table spec
|
|
1864
|
+
* @param sheetId
|
|
1865
|
+
* @param activeCell
|
|
1866
|
+
* @param selections
|
|
1867
|
+
* @param tableSpec
|
|
1868
|
+
* @param theme
|
|
1869
|
+
* @param bandedRange
|
|
1870
|
+
*/
|
|
1871
|
+
Spreadsheet.prototype.createTable = function (sheetId, activeCell, selections, tableSpec, theme, bandedRange) {
|
|
1872
|
+
var sheet = this.getSheet(sheetId);
|
|
1873
|
+
return createTable({
|
|
1874
|
+
locale: this.locale,
|
|
1875
|
+
rowCount: sheet.rowCount,
|
|
1876
|
+
columnCount: sheet.columnCount,
|
|
1877
|
+
createHistory: this.createHistory,
|
|
1878
|
+
enqueueCalculation: this.enqueueCalculation,
|
|
1879
|
+
enqueueGraphOperation: this.enqueueGraphOperation,
|
|
1880
|
+
getDependents: this.getDependents,
|
|
1881
|
+
onChangeSheetData: this.onChangeSheetData,
|
|
1882
|
+
onChangeSheets: this.onChangeSheets,
|
|
1883
|
+
onChangeTables: this.onChangeTables,
|
|
1884
|
+
onRequestCalculate: this.onRequestCalculate,
|
|
1885
|
+
getEffectiveValue: this.getEffectiveValue,
|
|
1886
|
+
getFormattedValue: this.getFormattedValue,
|
|
1887
|
+
getContentfulRangeAroundCell: this.getContentfulRangeAroundCell,
|
|
1888
|
+
getSheetName: this.getSheetName,
|
|
1889
|
+
theme: defaultSpreadsheetTheme,
|
|
1890
|
+
})(sheetId, activeCell, selections, tableSpec, theme, bandedRange);
|
|
1891
|
+
};
|
|
1892
|
+
/**
|
|
1893
|
+
* Updates an existing table spec
|
|
1894
|
+
* @param sheetId
|
|
1895
|
+
* @param updatedTable
|
|
1896
|
+
* @param previousTable
|
|
1897
|
+
*/
|
|
1898
|
+
Spreadsheet.prototype.updateTable = function (sheetId, tableId, updatedTable) {
|
|
1899
|
+
return updateTable({
|
|
1900
|
+
locale: this.locale,
|
|
1901
|
+
tables: this.tables,
|
|
1902
|
+
createHistory: this.createHistory,
|
|
1903
|
+
enqueueCalculation: this.enqueueCalculation,
|
|
1904
|
+
getDependents: this.getDependents,
|
|
1905
|
+
onChangeSheetData: this.onChangeSheetData,
|
|
1906
|
+
onChangeTables: this.onChangeTables,
|
|
1907
|
+
getFormattedValue: this.getFormattedValue,
|
|
1908
|
+
})(sheetId, tableId, updatedTable);
|
|
1909
|
+
};
|
|
1910
|
+
/**
|
|
1911
|
+
* Removes an existing table view
|
|
1912
|
+
* @param tableView
|
|
1913
|
+
*/
|
|
1914
|
+
Spreadsheet.prototype.removeTable = function (tableView) {
|
|
1915
|
+
removeTable({
|
|
1916
|
+
createHistory: this.createHistory,
|
|
1917
|
+
enqueueCalculation: this.enqueueCalculation,
|
|
1918
|
+
getDependents: this.getDependents,
|
|
1919
|
+
onChangeSheets: this.onChangeSheets,
|
|
1920
|
+
onChangeTables: this.onChangeTables,
|
|
1921
|
+
})(tableView);
|
|
1922
|
+
};
|
|
1923
|
+
/**
|
|
1924
|
+
* Insert a column into a table
|
|
1925
|
+
* @param tableView
|
|
1926
|
+
* @param dimensionIndex
|
|
1927
|
+
* @param direction
|
|
1928
|
+
*/
|
|
1929
|
+
Spreadsheet.prototype.insertTableColumn = function (tableView, dimensionIndex, direction) {
|
|
1930
|
+
var sheet = this.getSheet(tableView.sheetId);
|
|
1931
|
+
insertTableColumn({
|
|
1932
|
+
tables: this.tables,
|
|
1933
|
+
columnCount: sheet.columnCount,
|
|
1934
|
+
rowCount: sheet.rowCount,
|
|
1935
|
+
locale: this.locale,
|
|
1936
|
+
createHistory: this.createHistory,
|
|
1937
|
+
onChangeTables: this.onChangeTables,
|
|
1938
|
+
onChangeSheets: this.onChangeSheets,
|
|
1939
|
+
onChangeSheetData: this.onChangeSheetData,
|
|
1940
|
+
enqueueCalculation: this.enqueueCalculation,
|
|
1941
|
+
enqueueGraphOperation: this.enqueueGraphOperation,
|
|
1942
|
+
enqueueStructureChange: this.enqueueStructureChange,
|
|
1943
|
+
getDependents: this.getDependents,
|
|
1944
|
+
getSheetName: this.getSheetName,
|
|
1945
|
+
})(tableView, dimensionIndex, direction);
|
|
1946
|
+
};
|
|
1947
|
+
/**
|
|
1948
|
+
* Delete a column from a table
|
|
1949
|
+
* @param tableView
|
|
1950
|
+
* @param dimensionIndex
|
|
1951
|
+
*/
|
|
1952
|
+
Spreadsheet.prototype.deleteTableColumn = function (tableView, dimensionIndex) {
|
|
1953
|
+
var sheet = this.getSheet(tableView.sheetId);
|
|
1954
|
+
deleteTableColumn({
|
|
1955
|
+
columnCount: sheet.columnCount,
|
|
1956
|
+
rowCount: sheet.rowCount,
|
|
1957
|
+
locale: this.locale,
|
|
1958
|
+
getSheetName: this.getSheetName,
|
|
1959
|
+
createHistory: this.createHistory,
|
|
1960
|
+
onChangeTables: this.onChangeTables,
|
|
1961
|
+
onChangeSheets: this.onChangeSheets,
|
|
1962
|
+
onChangeSheetData: this.onChangeSheetData,
|
|
1963
|
+
enqueueCalculation: this.enqueueCalculation,
|
|
1964
|
+
enqueueGraphOperation: this.enqueueGraphOperation,
|
|
1965
|
+
enqueueStructureChange: this.enqueueStructureChange,
|
|
1966
|
+
getDependents: this.getDependents,
|
|
1967
|
+
})(tableView, dimensionIndex);
|
|
1968
|
+
};
|
|
1969
|
+
/**
|
|
1970
|
+
* Delete rows
|
|
1971
|
+
* @param sheetId
|
|
1972
|
+
* @param rowIndexes
|
|
1973
|
+
*/
|
|
1974
|
+
Spreadsheet.prototype.deleteRow = function (sheetId, rowIndexes) {
|
|
1975
|
+
var _this = this;
|
|
1976
|
+
var sheet = this.getSheet(sheetId);
|
|
1977
|
+
deleteRow({
|
|
1978
|
+
rowCount: sheet.rowCount,
|
|
1979
|
+
columnCount: sheet.columnCount,
|
|
1980
|
+
locale: this.locale,
|
|
1981
|
+
getActiveCell: this.getActiveCell,
|
|
1982
|
+
getSelections: this.getSelections,
|
|
1983
|
+
getDependents: this.getDependents,
|
|
1984
|
+
getGraphNodes: function () { return _this._calculationInterface.getNodes(); },
|
|
1985
|
+
getGraphNodesInSheet: function (sheetId) {
|
|
1986
|
+
return _this._calculationInterface.getNodesInSheet(sheetId);
|
|
1987
|
+
},
|
|
1988
|
+
getSheetName: this.getSheetName,
|
|
1989
|
+
createHistory: this.createHistory,
|
|
1990
|
+
enqueueGraphOperation: this.enqueueGraphOperation,
|
|
1991
|
+
enqueueCalculation: this.enqueueCalculation,
|
|
1992
|
+
enqueueStructureChange: this.enqueueStructureChange,
|
|
1993
|
+
onChangeSheetData: this.onChangeSheetData,
|
|
1994
|
+
onChangeSheets: this.onChangeSheets,
|
|
1995
|
+
onChangeTables: this.onChangeTables,
|
|
1996
|
+
onChangeDataValidations: this.onChangeDataValidations,
|
|
1997
|
+
onChangeConditionalFormats: this.onChangeConditionalFormats,
|
|
1998
|
+
onChangeActiveCell: this.onChangeActiveSheet,
|
|
1999
|
+
onChangeSelections: this.onChangeSelections,
|
|
2000
|
+
})(sheetId, rowIndexes);
|
|
2001
|
+
};
|
|
2002
|
+
/**
|
|
2003
|
+
* Delete selected cells and shift left
|
|
2004
|
+
*/
|
|
2005
|
+
Spreadsheet.prototype.deleteCellsShiftLeft = function (sheetId, activeCell, selections) {
|
|
2006
|
+
var sheet = this.getSheet(sheetId);
|
|
2007
|
+
deleteCellsShiftLeft({
|
|
2008
|
+
rowCount: sheet.rowCount,
|
|
2009
|
+
columnCount: sheet.columnCount,
|
|
2010
|
+
locale: this.locale,
|
|
2011
|
+
getDependents: this.getDependents,
|
|
2012
|
+
getActiveCell: this.getActiveCell,
|
|
2013
|
+
getSelections: this.getSelections,
|
|
2014
|
+
createHistory: this.createHistory,
|
|
2015
|
+
enqueueGraphOperation: this.enqueueGraphOperation,
|
|
2016
|
+
enqueueCalculation: this.enqueueCalculation,
|
|
2017
|
+
enqueueStructureChange: this.enqueueStructureChange,
|
|
2018
|
+
onChangeSheetData: this.onChangeSheetData,
|
|
2019
|
+
onChangeSheets: this.onChangeSheets,
|
|
2020
|
+
})(sheetId, activeCell, selections);
|
|
2021
|
+
};
|
|
2022
|
+
/**
|
|
2023
|
+
* Delete selected cells and shift up
|
|
2024
|
+
*/
|
|
2025
|
+
Spreadsheet.prototype.deleteCellsShiftUp = function (sheetId, activeCell, selections) {
|
|
2026
|
+
var sheet = this.getSheet(sheetId);
|
|
2027
|
+
deleteCellsShiftUp({
|
|
2028
|
+
rowCount: sheet.rowCount,
|
|
2029
|
+
columnCount: sheet.columnCount,
|
|
2030
|
+
locale: this.locale,
|
|
2031
|
+
getDependents: this.getDependents,
|
|
2032
|
+
getActiveCell: this.getActiveCell,
|
|
2033
|
+
getSelections: this.getSelections,
|
|
2034
|
+
createHistory: this.createHistory,
|
|
2035
|
+
enqueueGraphOperation: this.enqueueGraphOperation,
|
|
2036
|
+
enqueueCalculation: this.enqueueCalculation,
|
|
2037
|
+
enqueueStructureChange: this.enqueueStructureChange,
|
|
2038
|
+
onChangeSheetData: this.onChangeSheetData,
|
|
2039
|
+
onChangeSheets: this.onChangeSheets,
|
|
2040
|
+
})(sheetId, activeCell, selections);
|
|
2041
|
+
};
|
|
2042
|
+
/** Freeze a row index */
|
|
2043
|
+
Spreadsheet.prototype.freezeRow = function (sheetId, rowIndex) {
|
|
2044
|
+
freezeRow({
|
|
2045
|
+
createHistory: this.createHistory,
|
|
2046
|
+
onChangeSheets: this.onChangeSheets,
|
|
2047
|
+
onChangeCharts: this.onChangeCharts,
|
|
2048
|
+
onChangeEmbeds: this.onChangeEmbeds,
|
|
2049
|
+
})(sheetId, rowIndex);
|
|
2050
|
+
};
|
|
2051
|
+
/** Freeze a column index */
|
|
2052
|
+
Spreadsheet.prototype.freezeColumn = function (sheetId, columnIndex) {
|
|
2053
|
+
freezeColumn({
|
|
2054
|
+
createHistory: this.createHistory,
|
|
2055
|
+
onChangeSheets: this.onChangeSheets,
|
|
2056
|
+
onChangeCharts: this.onChangeCharts,
|
|
2057
|
+
onChangeEmbeds: this.onChangeEmbeds,
|
|
2058
|
+
})(sheetId, columnIndex);
|
|
2059
|
+
};
|
|
2060
|
+
/** Hide columns */
|
|
2061
|
+
Spreadsheet.prototype.hideColumns = function (sheetId, columnIndexes) {
|
|
2062
|
+
var sheet = this.getSheet(sheetId);
|
|
2063
|
+
hideColumns({
|
|
2064
|
+
createHistory: this.createHistory,
|
|
2065
|
+
getActiveCell: this.getActiveCell,
|
|
2066
|
+
getSelections: this.getSelections,
|
|
2067
|
+
onChangeActiveCell: this.onChangeActiveCell,
|
|
2068
|
+
onChangeSelections: this.onChangeSelections,
|
|
2069
|
+
onChangeSheets: this.onChangeSheets,
|
|
2070
|
+
rowCount: sheet.rowCount,
|
|
2071
|
+
columnCount: sheet.columnCount,
|
|
2072
|
+
getNextFocusableCell: undefined,
|
|
2073
|
+
})(sheetId, columnIndexes);
|
|
2074
|
+
};
|
|
2075
|
+
/** Hide rows */
|
|
2076
|
+
Spreadsheet.prototype.hideRows = function (sheetId, rowIndexes) {
|
|
2077
|
+
var sheet = this.getSheet(sheetId);
|
|
2078
|
+
hideRows({
|
|
2079
|
+
createHistory: this.createHistory,
|
|
2080
|
+
getActiveCell: this.getActiveCell,
|
|
2081
|
+
getSelections: this.getSelections,
|
|
2082
|
+
onChangeActiveCell: this.onChangeActiveCell,
|
|
2083
|
+
onChangeSelections: this.onChangeSelections,
|
|
2084
|
+
onChangeSheets: this.onChangeSheets,
|
|
2085
|
+
columnCount: sheet.columnCount,
|
|
2086
|
+
rowCount: sheet.rowCount,
|
|
2087
|
+
getNextFocusableCell: undefined,
|
|
2088
|
+
})(sheetId, rowIndexes);
|
|
2089
|
+
};
|
|
2090
|
+
/**
|
|
2091
|
+
* Apply fill operation programmatically
|
|
2092
|
+
*/
|
|
2093
|
+
Spreadsheet.prototype.applyFill = function (sheetId, activeCell, fillSelection, selections, fillableSelections, fillType) {
|
|
2094
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
2095
|
+
var getCellData, ssRegistry;
|
|
2096
|
+
var _this = this;
|
|
2097
|
+
return __generator(this, function (_a) {
|
|
2098
|
+
switch (_a.label) {
|
|
2099
|
+
case 0:
|
|
2100
|
+
getCellData = function (sId, r, c) { var _a, _b, _c, _d; return (_d = (_c = (_b = (_a = _this._sheetData) === null || _a === void 0 ? void 0 : _a[sId]) === null || _b === void 0 ? void 0 : _b[r]) === null || _c === void 0 ? void 0 : _c.values) === null || _d === void 0 ? void 0 : _d[c]; };
|
|
2101
|
+
ssRegistry = this.sharedStringRegistry;
|
|
2102
|
+
return [4 /*yield*/, applyFill({
|
|
2103
|
+
locale: this.locale,
|
|
2104
|
+
cellXfsRegistry: this.cellXfsRegistry,
|
|
2105
|
+
// Fallback safe getters
|
|
2106
|
+
getCellData: getCellData,
|
|
2107
|
+
getEffectiveValue: this.getEffectiveValue,
|
|
2108
|
+
getFormattedValue: this.getFormattedValue,
|
|
2109
|
+
getAutoFillValues: getAutoFillValues,
|
|
2110
|
+
enqueueCalculation: this.enqueueCalculation,
|
|
2111
|
+
onChangeSheetData: this.onChangeSheetData,
|
|
2112
|
+
createHistory: this.createHistory,
|
|
2113
|
+
getSheetName: this.getSheetName,
|
|
2114
|
+
sharedStringRegistry: ssRegistry,
|
|
2115
|
+
})(sheetId, activeCell, fillSelection, selections, fillableSelections, fillType)];
|
|
2116
|
+
case 1:
|
|
2117
|
+
_a.sent();
|
|
2118
|
+
return [2 /*return*/];
|
|
2119
|
+
}
|
|
2120
|
+
});
|
|
2121
|
+
});
|
|
2122
|
+
};
|
|
2123
|
+
Spreadsheet.prototype.createNewSheet = function (sheetSpec) {
|
|
2124
|
+
return createNewSheet({
|
|
2125
|
+
sheetId: this.activeSheetId,
|
|
2126
|
+
createHistory: this.createHistory,
|
|
2127
|
+
onChangeActiveSheet: this.onChangeActiveSheet,
|
|
2128
|
+
onChangeSheets: this.onChangeSheets,
|
|
2129
|
+
sheets: this.sheets,
|
|
2130
|
+
})(sheetSpec);
|
|
2131
|
+
};
|
|
2132
|
+
Spreadsheet.prototype.updateSheet = function (sheetId, sheetSpec) {
|
|
2133
|
+
var _this = this;
|
|
2134
|
+
return updateSheet({
|
|
2135
|
+
sheets: this.sheets,
|
|
2136
|
+
locale: this.locale,
|
|
2137
|
+
createHistory: this.createHistory,
|
|
2138
|
+
onChangeSheets: this.onChangeSheets,
|
|
2139
|
+
onChangeSheetData: this.onChangeSheetData,
|
|
2140
|
+
getGraphNodes: function () { return _this._calculationInterface.getNodes(); },
|
|
2141
|
+
// Use raw getPrecedents without filtering to correctly handle cross-sheet references
|
|
2142
|
+
getPrecedents: function (source) {
|
|
2143
|
+
return _this._calculationInterface.getPrecedents(source);
|
|
2144
|
+
},
|
|
2145
|
+
})(sheetId, sheetSpec);
|
|
2146
|
+
};
|
|
2147
|
+
/**
|
|
2148
|
+
* Delete a sheet
|
|
2149
|
+
* @param sheetId
|
|
2150
|
+
*/
|
|
2151
|
+
Spreadsheet.prototype.deleteSheet = function (sheetId) {
|
|
2152
|
+
deleteSheet({
|
|
2153
|
+
sheets: this.sheets,
|
|
2154
|
+
onChangeSheetData: this.onChangeSheetData,
|
|
2155
|
+
onChangeActiveSheet: function () { },
|
|
2156
|
+
onChangeSheets: this.onChangeSheets,
|
|
2157
|
+
createHistory: this.createHistory,
|
|
2158
|
+
enqueueGraphOperation: this.enqueueGraphOperation,
|
|
2159
|
+
})(sheetId);
|
|
2160
|
+
};
|
|
2161
|
+
/**
|
|
2162
|
+
* Create conditional formatting rule
|
|
2163
|
+
* @param rule
|
|
2164
|
+
*/
|
|
2165
|
+
Spreadsheet.prototype.createConditionalFormattingRule = function (rule) {
|
|
2166
|
+
createConditionalFormattingRule({
|
|
2167
|
+
enqueueCalculation: this.enqueueCalculation,
|
|
2168
|
+
createHistory: this.createHistory,
|
|
2169
|
+
onChangeConditionalFormats: this.onChangeConditionalFormats,
|
|
2170
|
+
})(rule);
|
|
2171
|
+
};
|
|
2172
|
+
/**
|
|
2173
|
+
* Update conditional formatting rule
|
|
2174
|
+
* @param updatedRule
|
|
2175
|
+
* @param previousRule
|
|
2176
|
+
*/
|
|
2177
|
+
Spreadsheet.prototype.updateConditionalFormattingRule = function (updatedRule, previousRule) {
|
|
2178
|
+
updateConditionalFormattingRule({
|
|
2179
|
+
enqueueCalculation: this.enqueueCalculation,
|
|
2180
|
+
createHistory: this.createHistory,
|
|
2181
|
+
onChangeConditionalFormats: this.onChangeConditionalFormats,
|
|
2182
|
+
})(updatedRule, previousRule);
|
|
2183
|
+
};
|
|
2184
|
+
/**
|
|
2185
|
+
* Delete conditional formatting rule
|
|
2186
|
+
* @param rule
|
|
2187
|
+
*/
|
|
2188
|
+
Spreadsheet.prototype.deleteConditionalFormattingRule = function (rule) {
|
|
2189
|
+
deleteConditionalFormattingRule({
|
|
2190
|
+
enqueueCalculation: this.enqueueCalculation,
|
|
2191
|
+
createHistory: this.createHistory,
|
|
2192
|
+
onChangeConditionalFormats: this.onChangeConditionalFormats,
|
|
2193
|
+
})(rule);
|
|
2194
|
+
};
|
|
2195
|
+
/**
|
|
2196
|
+
* Preview conditional formatting rule
|
|
2197
|
+
* @param rule
|
|
2198
|
+
*/
|
|
2199
|
+
Spreadsheet.prototype.previewConditionalFormattingRule = function (rule) {
|
|
2200
|
+
previewConditionalFormattingRule({
|
|
2201
|
+
enqueueCalculation: this.enqueueCalculation,
|
|
2202
|
+
createHistory: this.createHistory,
|
|
2203
|
+
onChangeConditionalFormats: this.onChangeConditionalFormats,
|
|
2204
|
+
})(rule);
|
|
2205
|
+
};
|
|
2206
|
+
/**
|
|
2207
|
+
* Create data validation rule
|
|
2208
|
+
* @param rule
|
|
2209
|
+
*/
|
|
2210
|
+
Spreadsheet.prototype.createDataValidationRule = function (rule) {
|
|
2211
|
+
createDataValidationRule({
|
|
2212
|
+
locale: this.locale,
|
|
2213
|
+
onChangeSheetData: this.onChangeSheetData,
|
|
2214
|
+
onChangeDataValidations: this.onChangeDataValidations,
|
|
2215
|
+
createHistory: this.createHistory,
|
|
2216
|
+
enqueueCalculation: this.enqueueCalculation,
|
|
2217
|
+
getSheetName: this.getSheetName,
|
|
2218
|
+
cellXfsRegistry: this.cellXfsRegistry,
|
|
2219
|
+
sharedStringRegistry: this.sharedStringRegistry,
|
|
2220
|
+
})(rule);
|
|
2221
|
+
};
|
|
2222
|
+
/**
|
|
2223
|
+
* Update data validation rule
|
|
2224
|
+
* @param rule
|
|
2225
|
+
* @param previousRule
|
|
2226
|
+
*/
|
|
2227
|
+
Spreadsheet.prototype.updateDataValidationRule = function (rule, previousRule) {
|
|
2228
|
+
updateDataValidationRule({
|
|
2229
|
+
locale: this.locale,
|
|
2230
|
+
onChangeSheetData: this.onChangeSheetData,
|
|
2231
|
+
onChangeDataValidations: this.onChangeDataValidations,
|
|
2232
|
+
createHistory: this.createHistory,
|
|
2233
|
+
enqueueCalculation: this.enqueueCalculation,
|
|
2234
|
+
getSheetName: this.getSheetName,
|
|
2235
|
+
cellXfsRegistry: this.cellXfsRegistry,
|
|
2236
|
+
sharedStringRegistry: this.sharedStringRegistry,
|
|
2237
|
+
})(rule, previousRule);
|
|
2238
|
+
};
|
|
2239
|
+
/**
|
|
2240
|
+
* Delete data validation rule
|
|
2241
|
+
* @param rule
|
|
2242
|
+
*/
|
|
2243
|
+
Spreadsheet.prototype.deleteDataValidationRule = function (rule) {
|
|
2244
|
+
deleteDataValidationRule({
|
|
2245
|
+
locale: this.locale,
|
|
2246
|
+
onChangeSheetData: this.onChangeSheetData,
|
|
2247
|
+
onChangeDataValidations: this.onChangeDataValidations,
|
|
2248
|
+
createHistory: this.createHistory,
|
|
2249
|
+
enqueueCalculation: this.enqueueCalculation,
|
|
2250
|
+
getSheetName: this.getSheetName,
|
|
2251
|
+
cellXfsRegistry: this.cellXfsRegistry,
|
|
2252
|
+
sharedStringRegistry: this.sharedStringRegistry,
|
|
2253
|
+
})(rule);
|
|
2254
|
+
};
|
|
2255
|
+
/**
|
|
2256
|
+
* Delete all data validation rules
|
|
2257
|
+
* @param rules
|
|
2258
|
+
*/
|
|
2259
|
+
Spreadsheet.prototype.deleteDataValidationRules = function (rules) {
|
|
2260
|
+
deleteDataValidationRules({
|
|
2261
|
+
locale: this.locale,
|
|
2262
|
+
onChangeSheetData: this.onChangeSheetData,
|
|
2263
|
+
onChangeDataValidations: this.onChangeDataValidations,
|
|
2264
|
+
createHistory: this.createHistory,
|
|
2265
|
+
enqueueCalculation: this.enqueueCalculation,
|
|
2266
|
+
getSheetName: this.getSheetName,
|
|
2267
|
+
cellXfsRegistry: this.cellXfsRegistry,
|
|
2268
|
+
sharedStringRegistry: this.sharedStringRegistry,
|
|
2269
|
+
})(rules);
|
|
2270
|
+
};
|
|
2271
|
+
/**
|
|
2272
|
+
* Change cell decimals
|
|
2273
|
+
* @param sheetId
|
|
2274
|
+
* @param activeCell
|
|
2275
|
+
* @param selections
|
|
2276
|
+
* @param type
|
|
2277
|
+
*/
|
|
2278
|
+
Spreadsheet.prototype.changeDecimals = function (sheetId, activeCell, selections, type) {
|
|
2279
|
+
changeDecimals({
|
|
2280
|
+
locale: this.locale,
|
|
2281
|
+
onChangeSheetData: this.onChangeSheetData,
|
|
2282
|
+
createHistory: this.createHistory,
|
|
2283
|
+
enqueueCalculation: this.enqueueCalculation,
|
|
2284
|
+
cellXfsRegistry: this.cellXfsRegistry,
|
|
2285
|
+
})(sheetId, activeCell, selections, type);
|
|
2286
|
+
};
|
|
2287
|
+
/**
|
|
2288
|
+
* Change sheet tab color
|
|
2289
|
+
* @param sheetId
|
|
2290
|
+
* @param color
|
|
2291
|
+
*/
|
|
2292
|
+
Spreadsheet.prototype.changeSheetTabcolor = function (sheetId, color) {
|
|
2293
|
+
changeSheetTabcolor({
|
|
2294
|
+
onChangeSheets: this.onChangeSheets,
|
|
2295
|
+
createHistory: this.createHistory,
|
|
2296
|
+
})(sheetId, color);
|
|
2297
|
+
};
|
|
2298
|
+
/**
|
|
2299
|
+
* Change theme
|
|
2300
|
+
* @param theme
|
|
2301
|
+
*/
|
|
2302
|
+
Spreadsheet.prototype.changeTheme = function (theme) {
|
|
2303
|
+
changeTheme({
|
|
2304
|
+
createHistory: this.createHistory,
|
|
2305
|
+
onChangeTheme: function () { },
|
|
2306
|
+
})(theme);
|
|
2307
|
+
};
|
|
2308
|
+
/**
|
|
2309
|
+
* Clear formatting
|
|
2310
|
+
* @param sheetId
|
|
2311
|
+
* @param activeCell
|
|
2312
|
+
* @param selections
|
|
2313
|
+
*/
|
|
2314
|
+
Spreadsheet.prototype.clearFormatting = function (sheetId, activeCell, selections) {
|
|
2315
|
+
clearFormatting({
|
|
2316
|
+
locale: this.locale,
|
|
2317
|
+
onChangeSheetData: this.onChangeSheetData,
|
|
2318
|
+
createHistory: this.createHistory,
|
|
2319
|
+
cellXfsRegistry: this.cellXfsRegistry,
|
|
2320
|
+
})(sheetId, activeCell, selections);
|
|
2321
|
+
};
|
|
2322
|
+
/**
|
|
2323
|
+
* Remove duplicate rows
|
|
2324
|
+
* @param sheetId
|
|
2325
|
+
* @param activeCell
|
|
2326
|
+
* @param selections
|
|
2327
|
+
*/
|
|
2328
|
+
Spreadsheet.prototype.removeDuplicates = function (sheetId, activeCell, selections) {
|
|
2329
|
+
return removeDuplicates({
|
|
2330
|
+
locale: this.locale,
|
|
2331
|
+
getFormattedValue: this.getFormattedValue,
|
|
2332
|
+
onChangeSheetData: this.onChangeSheetData,
|
|
2333
|
+
enqueueCalculation: this.enqueueCalculation,
|
|
2334
|
+
createHistory: this.createHistory,
|
|
2335
|
+
})(sheetId, activeCell, selections);
|
|
2336
|
+
};
|
|
2337
|
+
/**
|
|
2338
|
+
* Increase indent
|
|
2339
|
+
* @param sheetId
|
|
2340
|
+
* @param activeCell
|
|
2341
|
+
* @param selections
|
|
2342
|
+
*/
|
|
2343
|
+
Spreadsheet.prototype.increaseIndent = function (sheetId, activeCell, selections) {
|
|
2344
|
+
increaseIndent({
|
|
2345
|
+
locale: this.locale,
|
|
2346
|
+
enqueueCalculation: this.enqueueCalculation,
|
|
2347
|
+
onChangeSheetData: this.onChangeSheetData,
|
|
2348
|
+
createHistory: this.createHistory,
|
|
2349
|
+
cellXfsRegistry: this.cellXfsRegistry,
|
|
2350
|
+
})(sheetId, activeCell, selections);
|
|
2351
|
+
};
|
|
2352
|
+
/**
|
|
2353
|
+
* Decrease indent
|
|
2354
|
+
* @param sheetId
|
|
2355
|
+
* @param activeCell
|
|
2356
|
+
* @param selections
|
|
2357
|
+
*/
|
|
2358
|
+
Spreadsheet.prototype.decreaseIndent = function (sheetId, activeCell, selections) {
|
|
2359
|
+
decreaseIndent({
|
|
2360
|
+
locale: this.locale,
|
|
2361
|
+
enqueueCalculation: this.enqueueCalculation,
|
|
2362
|
+
onChangeSheetData: this.onChangeSheetData,
|
|
2363
|
+
createHistory: this.createHistory,
|
|
2364
|
+
cellXfsRegistry: this.cellXfsRegistry,
|
|
2365
|
+
})(sheetId, activeCell, selections);
|
|
2366
|
+
};
|
|
2367
|
+
/**
|
|
2368
|
+
* Create named range
|
|
2369
|
+
* @param sheetId
|
|
2370
|
+
* @param namedRange
|
|
2371
|
+
*/
|
|
2372
|
+
Spreadsheet.prototype.createNamedRange = function (sheetId, namedRange) {
|
|
2373
|
+
createNamedRange({
|
|
2374
|
+
enqueueCalculation: this.enqueueCalculation,
|
|
2375
|
+
createHistory: this.createHistory,
|
|
2376
|
+
onChangeNamedRanges: this.onChangeNamedRanges,
|
|
2377
|
+
})(sheetId, namedRange);
|
|
2378
|
+
};
|
|
2379
|
+
/**
|
|
2380
|
+
* Delete named range
|
|
2381
|
+
* @param id
|
|
2382
|
+
*/
|
|
2383
|
+
Spreadsheet.prototype.deleteNamedRange = function (id) {
|
|
2384
|
+
deleteNamedRange({
|
|
2385
|
+
getDependents: this.getDependents,
|
|
2386
|
+
enqueueCalculation: this.enqueueCalculation,
|
|
2387
|
+
createHistory: this.createHistory,
|
|
2388
|
+
onChangeNamedRanges: this.onChangeNamedRanges,
|
|
2389
|
+
})(id);
|
|
2390
|
+
};
|
|
2391
|
+
/**
|
|
2392
|
+
* Delete cells
|
|
2393
|
+
* @param sheetId
|
|
2394
|
+
* @param activeCell
|
|
2395
|
+
* @param selections
|
|
2396
|
+
* @param clearType - "contents" (default), "formats", or "all"
|
|
2397
|
+
*/
|
|
2398
|
+
Spreadsheet.prototype.deleteCells = function (sheetId, activeCell, selections, clearType) {
|
|
2399
|
+
if (clearType === void 0) { clearType = "contents"; }
|
|
2400
|
+
var sheet = this.getSheet(sheetId);
|
|
2401
|
+
deleteCells({
|
|
2402
|
+
locale: this.locale,
|
|
2403
|
+
rowCount: sheet.rowCount,
|
|
2404
|
+
cellXfsRegistry: this.cellXfsRegistry,
|
|
2405
|
+
getDependents: this.getDependents,
|
|
2406
|
+
getDataRowCount: function () { return sheet.rowCount; },
|
|
2407
|
+
onChangeSheetData: this.onChangeSheetData,
|
|
2408
|
+
onChangeSheets: this.onChangeSheets,
|
|
2409
|
+
onChangeTables: this.onChangeTables,
|
|
2410
|
+
onChangeActiveCell: function () { },
|
|
2411
|
+
enqueueCalculation: this.enqueueCalculation,
|
|
2412
|
+
createHistory: this.createHistory,
|
|
2413
|
+
isArrayFormula: function () { return false; },
|
|
2414
|
+
getRowHeight: this.getRowHeight,
|
|
2415
|
+
})(sheetId, activeCell, selections, clearType);
|
|
2416
|
+
};
|
|
2417
|
+
/**
|
|
2418
|
+
* Delete table row
|
|
2419
|
+
* @param tableView
|
|
2420
|
+
* @param rowIndexes
|
|
2421
|
+
*/
|
|
2422
|
+
Spreadsheet.prototype.deleteTableRow = function (tableView, rowIndexes) {
|
|
2423
|
+
var sheet = this.getSheet(tableView.sheetId);
|
|
2424
|
+
deleteTableRow({
|
|
2425
|
+
rowCount: sheet.rowCount,
|
|
2426
|
+
columnCount: sheet.columnCount,
|
|
2427
|
+
locale: this.locale,
|
|
2428
|
+
getDependents: this.getDependents,
|
|
2429
|
+
getSheetName: this.getSheetName,
|
|
2430
|
+
createHistory: this.createHistory,
|
|
2431
|
+
enqueueGraphOperation: this.enqueueGraphOperation,
|
|
2432
|
+
enqueueCalculation: this.enqueueCalculation,
|
|
2433
|
+
enqueueStructureChange: this.enqueueStructureChange,
|
|
2434
|
+
onChangeSheetData: this.onChangeSheetData,
|
|
2435
|
+
onChangeSheets: this.onChangeSheets,
|
|
2436
|
+
onChangeTables: this.onChangeTables,
|
|
2437
|
+
onChangeDataValidations: this.onChangeDataValidations,
|
|
2438
|
+
onChangeConditionalFormats: this.onChangeConditionalFormats,
|
|
2439
|
+
})(tableView, rowIndexes);
|
|
2440
|
+
};
|
|
2441
|
+
/**
|
|
2442
|
+
* Duplicate sheet
|
|
2443
|
+
* @param sheetId
|
|
2444
|
+
*/
|
|
2445
|
+
Spreadsheet.prototype.duplicateSheet = function (sheetId, newSheetId) {
|
|
2446
|
+
return duplicateSheet({
|
|
2447
|
+
locale: this.locale,
|
|
2448
|
+
maxSheetCount: 100,
|
|
2449
|
+
sheets: this.sheets,
|
|
2450
|
+
onChangeSheetData: this.onChangeSheetData,
|
|
2451
|
+
onChangeSheets: this.onChangeSheets,
|
|
2452
|
+
onChangeTables: this.onChangeTables,
|
|
2453
|
+
onChangeCharts: this.onChangeCharts,
|
|
2454
|
+
onChangeEmbeds: this.onChangeEmbeds,
|
|
2455
|
+
onChangeConditionalFormats: this.onChangeConditionalFormats,
|
|
2456
|
+
onChangeDataValidations: this.onChangeDataValidations,
|
|
2457
|
+
onChangeActiveSheet: function () { },
|
|
2458
|
+
enqueueGraphOperation: this.enqueueGraphOperation,
|
|
2459
|
+
createHistory: this.createHistory,
|
|
2460
|
+
})(sheetId, newSheetId);
|
|
2461
|
+
};
|
|
2462
|
+
/**
|
|
2463
|
+
* Create embed
|
|
2464
|
+
* @param embedId
|
|
2465
|
+
*/
|
|
2466
|
+
Spreadsheet.prototype.createEmbed = function (spec) {
|
|
2467
|
+
createEmbed({
|
|
2468
|
+
onChangeEmbeds: this.onChangeEmbeds,
|
|
2469
|
+
createHistory: this.createHistory,
|
|
2470
|
+
})(spec);
|
|
2471
|
+
};
|
|
2472
|
+
/**
|
|
2473
|
+
* Delete embed
|
|
2474
|
+
* @param embedId
|
|
2475
|
+
*/
|
|
2476
|
+
Spreadsheet.prototype.deleteEmbed = function (embedId) {
|
|
2477
|
+
deleteEmbed({
|
|
2478
|
+
onChangeEmbeds: this.onChangeEmbeds,
|
|
2479
|
+
createHistory: this.createHistory,
|
|
2480
|
+
})(embedId);
|
|
2481
|
+
};
|
|
2482
|
+
/**
|
|
2483
|
+
* Update embed
|
|
2484
|
+
* @param embed
|
|
2485
|
+
*/
|
|
2486
|
+
Spreadsheet.prototype.updateEmbed = function (embed) {
|
|
2487
|
+
updateEmbed({
|
|
2488
|
+
onChangeEmbeds: this.onChangeEmbeds,
|
|
2489
|
+
createHistory: this.createHistory,
|
|
2490
|
+
})(embed);
|
|
2491
|
+
};
|
|
2492
|
+
/**
|
|
2493
|
+
* Move embed
|
|
2494
|
+
* @param embedId
|
|
2495
|
+
* @param sheetId
|
|
2496
|
+
* @param anchorCell
|
|
2497
|
+
* @param offsetXPixels
|
|
2498
|
+
* @param offsetYPixels
|
|
2499
|
+
*/
|
|
2500
|
+
Spreadsheet.prototype.moveEmbed = function (embedId, sheetId, anchorCell, offsetXPixels, offsetYPixels) {
|
|
2501
|
+
moveEmbed({
|
|
2502
|
+
onChangeEmbeds: this.onChangeEmbeds,
|
|
2503
|
+
createHistory: this.createHistory,
|
|
2504
|
+
})(embedId, sheetId, anchorCell, offsetXPixels, offsetYPixels);
|
|
2505
|
+
};
|
|
2506
|
+
/**
|
|
2507
|
+
* Resize embed
|
|
2508
|
+
* @param embedId
|
|
2509
|
+
* @param sheetId
|
|
2510
|
+
* @param anchorCell
|
|
2511
|
+
* @param offsetXPixels
|
|
2512
|
+
* @param offsetYPixels
|
|
2513
|
+
* @param width
|
|
2514
|
+
* @param height
|
|
2515
|
+
*/
|
|
2516
|
+
Spreadsheet.prototype.resizeEmbed = function (embedId, sheetId, anchorCell, offsetXPixels, offsetYPixels, width, height) {
|
|
2517
|
+
resizeEmbed({
|
|
2518
|
+
onChangeEmbeds: this.onChangeEmbeds,
|
|
2519
|
+
createHistory: this.createHistory,
|
|
2520
|
+
})(embedId, sheetId, anchorCell, offsetXPixels, offsetYPixels, width, height);
|
|
2521
|
+
};
|
|
2522
|
+
/**
|
|
2523
|
+
* Check if chart operations are available
|
|
2524
|
+
* @returns true if @rowsncolumns/charts package is installed
|
|
2525
|
+
*/
|
|
2526
|
+
Spreadsheet.prototype.isChartsAvailable = function () {
|
|
2527
|
+
return isChartsAvailable();
|
|
2528
|
+
};
|
|
2529
|
+
/**
|
|
2530
|
+
* Create a chart
|
|
2531
|
+
* @param sheetId
|
|
2532
|
+
* @param activeCell
|
|
2533
|
+
* @param selections
|
|
2534
|
+
* @param chartSpec
|
|
2535
|
+
*/
|
|
2536
|
+
Spreadsheet.prototype.createChart = function (sheetId, activeCell, selections, chartSpec) {
|
|
2537
|
+
safeCreateChart({
|
|
2538
|
+
onChangeCharts: this.onChangeCharts,
|
|
2539
|
+
getFormattedValue: this.getFormattedValue,
|
|
2540
|
+
getEffectiveValue: this.getEffectiveValue,
|
|
2541
|
+
createHistory: this.createHistory,
|
|
2542
|
+
})(sheetId, activeCell, selections, chartSpec);
|
|
2543
|
+
};
|
|
2544
|
+
/**
|
|
2545
|
+
* Delete a chart
|
|
2546
|
+
* @param chartId
|
|
2547
|
+
*/
|
|
2548
|
+
Spreadsheet.prototype.deleteChart = function (chartId) {
|
|
2549
|
+
safeDeleteChart({
|
|
2550
|
+
onChangeCharts: this.onChangeCharts,
|
|
2551
|
+
createHistory: this.createHistory,
|
|
2552
|
+
})(chartId);
|
|
2553
|
+
};
|
|
2554
|
+
/**
|
|
2555
|
+
* Move a chart
|
|
2556
|
+
* @param chartId
|
|
2557
|
+
* @param anchorCell
|
|
2558
|
+
* @param offsetXPixels
|
|
2559
|
+
* @param offsetYPixels
|
|
2560
|
+
*/
|
|
2561
|
+
Spreadsheet.prototype.moveChart = function (chartId, anchorCell, offsetXPixels, offsetYPixels) {
|
|
2562
|
+
safeMoveChart({
|
|
2563
|
+
onChangeCharts: this.onChangeCharts,
|
|
2564
|
+
createHistory: this.createHistory,
|
|
2565
|
+
})(chartId, anchorCell, offsetXPixels, offsetYPixels);
|
|
2566
|
+
};
|
|
2567
|
+
/**
|
|
2568
|
+
* Resize a chart
|
|
2569
|
+
* @param chartId
|
|
2570
|
+
* @param anchorCell
|
|
2571
|
+
* @param offsetXPixels
|
|
2572
|
+
* @param offsetYPixels
|
|
2573
|
+
* @param width
|
|
2574
|
+
* @param height
|
|
2575
|
+
*/
|
|
2576
|
+
Spreadsheet.prototype.resizeChart = function (chartId, anchorCell, offsetXPixels, offsetYPixels, width, height) {
|
|
2577
|
+
safeResizeChart({
|
|
2578
|
+
onChangeCharts: this.onChangeCharts,
|
|
2579
|
+
createHistory: this.createHistory,
|
|
2580
|
+
})(chartId, anchorCell, offsetXPixels, offsetYPixels, width, height);
|
|
2581
|
+
};
|
|
2582
|
+
/**
|
|
2583
|
+
* Update a chart
|
|
2584
|
+
* @param chart
|
|
2585
|
+
*/
|
|
2586
|
+
Spreadsheet.prototype.updateChart = function (chart) {
|
|
2587
|
+
safeUpdateChart({
|
|
2588
|
+
onChangeCharts: this.onChangeCharts,
|
|
2589
|
+
createHistory: this.createHistory,
|
|
2590
|
+
})(chart);
|
|
2591
|
+
};
|
|
2592
|
+
/**
|
|
2593
|
+
* Auto fit rows or columns
|
|
2594
|
+
* @param sheetId
|
|
2595
|
+
* @param indexes
|
|
2596
|
+
* @param axis
|
|
2597
|
+
* @returns
|
|
2598
|
+
*/
|
|
2599
|
+
Spreadsheet.prototype.autoResize = function (sheetId, indexes, axis) {
|
|
2600
|
+
return autoResize({
|
|
2601
|
+
createHistory: this.createHistory,
|
|
2602
|
+
onChangeSheets: this.onChangeSheets,
|
|
2603
|
+
getColumnWidth: this.getColumnWidth,
|
|
2604
|
+
getRowHeight: this.getRowHeight,
|
|
2605
|
+
getActiveCell: this.getActiveCell,
|
|
2606
|
+
})(sheetId, indexes, axis);
|
|
2607
|
+
};
|
|
2608
|
+
/**
|
|
2609
|
+
* Resize row or column
|
|
2610
|
+
* @param sheetId
|
|
2611
|
+
* @param indexes
|
|
2612
|
+
* @param dimension
|
|
2613
|
+
* @param axis
|
|
2614
|
+
* @returns
|
|
2615
|
+
*/
|
|
2616
|
+
Spreadsheet.prototype.resize = function (sheetId, indexes, dimension, axis) {
|
|
2617
|
+
return resize({
|
|
2618
|
+
createHistory: this.createHistory,
|
|
2619
|
+
onChangeSheets: this.onChangeSheets,
|
|
2620
|
+
getRowHeight: this.getRowHeight,
|
|
2621
|
+
getActiveCell: this.getActiveCell,
|
|
2622
|
+
getCellDimensions: this.getCellDimensions,
|
|
2623
|
+
isMergedCell: this.isMergedCell,
|
|
2624
|
+
})(sheetId, indexes, dimension, axis);
|
|
2625
|
+
};
|
|
2626
|
+
Spreadsheet.prototype.deletePivotTable = function (pivotId, database) {
|
|
2627
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
2628
|
+
return __generator(this, function (_a) {
|
|
2629
|
+
return [2 /*return*/, safeDeletePivotTable({
|
|
2630
|
+
activeCell: this.getActiveCell(),
|
|
2631
|
+
enqueueCalculation: this.enqueueCalculation,
|
|
2632
|
+
onChangeActiveCell: this.onChangeActiveSheet,
|
|
2633
|
+
pivotTables: this.pivotTables,
|
|
2634
|
+
sheetId: this.activeSheetId,
|
|
2635
|
+
cellXfsRegistry: this.cellXfsRegistry,
|
|
2636
|
+
database: database,
|
|
2637
|
+
locale: this.locale,
|
|
2638
|
+
onChangeSheetData: this.onChangeSheetData,
|
|
2639
|
+
onChangeSheets: this.onChangeSheets,
|
|
2640
|
+
// onCreateNewSheet:,
|
|
2641
|
+
createHistory: this.createHistory,
|
|
2642
|
+
onChangePivotTables: this.onChangePivotTables,
|
|
2643
|
+
getColumnWidth: this.getColumnWidth,
|
|
2644
|
+
})(pivotId)];
|
|
2645
|
+
});
|
|
2646
|
+
});
|
|
2647
|
+
};
|
|
2648
|
+
Spreadsheet.prototype.createPivotTable = function (pivotTable, createNewSheet, database) {
|
|
2649
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
2650
|
+
return __generator(this, function (_a) {
|
|
2651
|
+
switch (_a.label) {
|
|
2652
|
+
case 0: return [4 /*yield*/, safeCreatePivotTable({
|
|
2653
|
+
activeCell: this.getActiveCell(),
|
|
2654
|
+
enqueueCalculation: this.enqueueCalculation,
|
|
2655
|
+
onChangeActiveCell: this.onChangeActiveSheet,
|
|
2656
|
+
pivotTables: this.pivotTables,
|
|
2657
|
+
sheetId: this.activeSheetId,
|
|
2658
|
+
cellXfsRegistry: this.cellXfsRegistry,
|
|
2659
|
+
database: database,
|
|
2660
|
+
locale: this.locale,
|
|
2661
|
+
onChangeSheetData: this.onChangeSheetData,
|
|
2662
|
+
onChangeSheets: this.onChangeSheets,
|
|
2663
|
+
// onCreateNewSheet:,
|
|
2664
|
+
createHistory: this.createHistory,
|
|
2665
|
+
onChangePivotTables: this.onChangePivotTables,
|
|
2666
|
+
getGridValues: this.getGridValuesForPivot,
|
|
2667
|
+
getColumnWidth: this.getColumnWidth,
|
|
2668
|
+
})(pivotTable, createNewSheet)];
|
|
2669
|
+
case 1:
|
|
2670
|
+
_a.sent();
|
|
2671
|
+
return [2 /*return*/];
|
|
2672
|
+
}
|
|
2673
|
+
});
|
|
2674
|
+
});
|
|
2675
|
+
};
|
|
2676
|
+
/**
|
|
2677
|
+
* Create a new citation and attach it to a cell
|
|
2678
|
+
* @param sheetId
|
|
2679
|
+
* @param rowIndex
|
|
2680
|
+
* @param columnIndex
|
|
2681
|
+
* @param citation
|
|
2682
|
+
*/
|
|
2683
|
+
Spreadsheet.prototype.createCitation = function (sheetId, rowIndex, columnIndex, citation) {
|
|
2684
|
+
createCitation({
|
|
2685
|
+
locale: this.locale,
|
|
2686
|
+
onChangeSheetData: this.onChangeSheetData,
|
|
2687
|
+
onChangeCitations: this.onChangeCitations,
|
|
2688
|
+
createHistory: this.createHistory,
|
|
2689
|
+
})(sheetId, rowIndex, columnIndex, citation);
|
|
2690
|
+
};
|
|
2691
|
+
/**
|
|
2692
|
+
* Create multiple citations in a batch (adds to citations array only)
|
|
2693
|
+
* @param cellCitations
|
|
2694
|
+
*/
|
|
2695
|
+
Spreadsheet.prototype.createBatchCitations = function (citations) {
|
|
2696
|
+
createBatchCitations({
|
|
2697
|
+
onChangeCitations: this.onChangeCitations,
|
|
2698
|
+
createHistory: this.createHistory,
|
|
2699
|
+
})(citations);
|
|
2700
|
+
};
|
|
2701
|
+
/**
|
|
2702
|
+
* Update an existing citation
|
|
2703
|
+
* @param citationId
|
|
2704
|
+
* @param updates
|
|
2705
|
+
*/
|
|
2706
|
+
Spreadsheet.prototype.updateCitation = function (citationId, updates) {
|
|
2707
|
+
updateCitation({
|
|
2708
|
+
onChangeCitations: this.onChangeCitations,
|
|
2709
|
+
createHistory: this.createHistory,
|
|
2710
|
+
})(citationId, updates);
|
|
2711
|
+
};
|
|
2712
|
+
/**
|
|
2713
|
+
* Remove a citation reference from a cell
|
|
2714
|
+
* @param sheetId
|
|
2715
|
+
* @param rowIndex
|
|
2716
|
+
* @param columnIndex
|
|
2717
|
+
*/
|
|
2718
|
+
Spreadsheet.prototype.removeCitationFromCell = function (sheetId, rowIndex, columnIndex) {
|
|
2719
|
+
removeCitationFromCell({
|
|
2720
|
+
locale: this.locale,
|
|
2721
|
+
onChangeSheetData: this.onChangeSheetData,
|
|
2722
|
+
createHistory: this.createHistory,
|
|
2723
|
+
})(sheetId, rowIndex, columnIndex);
|
|
2724
|
+
};
|
|
2725
|
+
/**
|
|
2726
|
+
* Delete a citation completely (removes from citations array)
|
|
2727
|
+
* Note: Cells with this citationId will still have the reference
|
|
2728
|
+
* @param citationId
|
|
2729
|
+
*/
|
|
2730
|
+
Spreadsheet.prototype.deleteCitation = function (citationId) {
|
|
2731
|
+
deleteCitation({
|
|
2732
|
+
onChangeCitations: this.onChangeCitations,
|
|
2733
|
+
createHistory: this.createHistory,
|
|
2734
|
+
})(citationId);
|
|
2735
|
+
};
|
|
2736
|
+
return Spreadsheet;
|
|
2737
|
+
}());
|
|
2738
|
+
export { Spreadsheet };
|
|
2739
|
+
/**
|
|
2740
|
+
* Simple sheet interface for some getters
|
|
2741
|
+
*/
|
|
2742
|
+
var SheetInterface = /** @class */ (function () {
|
|
2743
|
+
function SheetInterface(sheet) {
|
|
2744
|
+
this.sheet = sheet;
|
|
2745
|
+
}
|
|
2746
|
+
Object.defineProperty(SheetInterface.prototype, "name", {
|
|
2747
|
+
get: function () {
|
|
2748
|
+
var _a;
|
|
2749
|
+
return (_a = this.sheet) === null || _a === void 0 ? void 0 : _a.title;
|
|
2750
|
+
},
|
|
2751
|
+
enumerable: false,
|
|
2752
|
+
configurable: true
|
|
2753
|
+
});
|
|
2754
|
+
Object.defineProperty(SheetInterface.prototype, "rowCount", {
|
|
2755
|
+
get: function () {
|
|
2756
|
+
var _a, _b;
|
|
2757
|
+
return (_b = (_a = this.sheet) === null || _a === void 0 ? void 0 : _a.rowCount) !== null && _b !== void 0 ? _b : DEFAULT_ROW_COUNT;
|
|
2758
|
+
},
|
|
2759
|
+
enumerable: false,
|
|
2760
|
+
configurable: true
|
|
2761
|
+
});
|
|
2762
|
+
Object.defineProperty(SheetInterface.prototype, "columnCount", {
|
|
2763
|
+
get: function () {
|
|
2764
|
+
var _a, _b;
|
|
2765
|
+
return (_b = (_a = this.sheet) === null || _a === void 0 ? void 0 : _a.columnCount) !== null && _b !== void 0 ? _b : DEFAULT_COLUMN_COUNT;
|
|
2766
|
+
},
|
|
2767
|
+
enumerable: false,
|
|
2768
|
+
configurable: true
|
|
2769
|
+
});
|
|
2770
|
+
Object.defineProperty(SheetInterface.prototype, "frozenColumns", {
|
|
2771
|
+
get: function () {
|
|
2772
|
+
var _a, _b;
|
|
2773
|
+
return (_b = (_a = this.sheet) === null || _a === void 0 ? void 0 : _a.frozenColumnCount) !== null && _b !== void 0 ? _b : 0;
|
|
2774
|
+
},
|
|
2775
|
+
enumerable: false,
|
|
2776
|
+
configurable: true
|
|
2777
|
+
});
|
|
2778
|
+
Object.defineProperty(SheetInterface.prototype, "frozenRows", {
|
|
2779
|
+
get: function () {
|
|
2780
|
+
var _a, _b;
|
|
2781
|
+
return (_b = (_a = this.sheet) === null || _a === void 0 ? void 0 : _a.frozenRowCount) !== null && _b !== void 0 ? _b : 0;
|
|
2782
|
+
},
|
|
2783
|
+
enumerable: false,
|
|
2784
|
+
configurable: true
|
|
2785
|
+
});
|
|
2786
|
+
return SheetInterface;
|
|
2787
|
+
}());
|