@rowsncolumns/spreadsheet-state 28.0.76 → 29.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/api/anchored-objects.d.ts +122 -6
- package/dist/cjs/api/anchored-objects.d.ts.map +1 -1
- package/dist/cjs/api/anchored-objects.js +464 -43
- package/dist/cjs/api/copy-paste.d.ts +8 -2
- package/dist/cjs/api/copy-paste.d.ts.map +1 -1
- package/dist/cjs/api/copy-paste.js +4 -4
- package/dist/cjs/api/filter.d.ts +15 -1
- package/dist/cjs/api/filter.d.ts.map +1 -1
- package/dist/cjs/api/filter.js +32 -2
- package/dist/cjs/api/formula.d.ts +63 -0
- package/dist/cjs/api/formula.d.ts.map +1 -1
- package/dist/cjs/api/formula.js +278 -8
- package/dist/cjs/api/immer-utils.d.ts +11 -1
- package/dist/cjs/api/immer-utils.d.ts.map +1 -1
- package/dist/cjs/api/immer-utils.js +17 -1
- package/dist/cjs/api/insert-cut-cells.d.ts +35 -0
- package/dist/cjs/api/insert-cut-cells.d.ts.map +1 -0
- package/dist/cjs/api/insert-cut-cells.js +60 -0
- package/dist/cjs/api/merges.d.ts +8 -0
- package/dist/cjs/api/merges.d.ts.map +1 -1
- package/dist/cjs/api/merges.js +11 -0
- package/dist/cjs/api/paint-format.d.ts +22 -1
- package/dist/cjs/api/paint-format.d.ts.map +1 -1
- package/dist/cjs/api/paint-format.js +57 -1
- package/dist/cjs/api/sort.d.ts +23 -1
- package/dist/cjs/api/sort.d.ts.map +1 -1
- package/dist/cjs/api/sort.js +52 -6
- package/dist/cjs/api/structural-guards.d.ts +57 -0
- package/dist/cjs/api/structural-guards.d.ts.map +1 -1
- package/dist/cjs/api/structural-guards.js +93 -1
- package/dist/cjs/api/structural-table-refs.d.ts +58 -3
- package/dist/cjs/api/structural-table-refs.d.ts.map +1 -1
- package/dist/cjs/api/structural-table-refs.js +177 -16
- package/dist/cjs/api/subtotal.d.ts +20 -13
- package/dist/cjs/api/subtotal.d.ts.map +1 -1
- package/dist/cjs/api/subtotal.js +26 -19
- package/dist/cjs/api/table.d.ts +26 -2
- package/dist/cjs/api/table.d.ts.map +1 -1
- package/dist/cjs/api/table.js +93 -60
- package/dist/cjs/api/validation.d.ts.map +1 -1
- package/dist/cjs/api/validation.js +53 -8
- package/dist/cjs/atoms/creating-table.atom.d.ts +22 -0
- package/dist/cjs/atoms/creating-table.atom.d.ts.map +1 -0
- package/dist/cjs/atoms/creating-table.atom.js +4 -0
- package/dist/cjs/atoms/dialog-state.atom.d.ts +8 -0
- package/dist/cjs/atoms/dialog-state.atom.d.ts.map +1 -1
- package/dist/cjs/atoms/dialog-state.atom.js +28 -0
- package/dist/cjs/atoms/editing-slicer.atom.d.ts +9 -0
- package/dist/cjs/atoms/editing-slicer.atom.d.ts.map +1 -0
- package/dist/cjs/atoms/editing-slicer.atom.js +6 -0
- package/dist/cjs/atoms/index.d.ts +4 -0
- package/dist/cjs/atoms/index.d.ts.map +1 -1
- package/dist/cjs/atoms/index.js +4 -0
- package/dist/cjs/atoms/inserting-slicer.atom.d.ts +8 -0
- package/dist/cjs/atoms/inserting-slicer.atom.d.ts.map +1 -0
- package/dist/cjs/atoms/inserting-slicer.atom.js +5 -0
- package/dist/cjs/atoms/resizing-table.atom.d.ts +8 -0
- package/dist/cjs/atoms/resizing-table.atom.d.ts.map +1 -0
- package/dist/cjs/atoms/resizing-table.atom.js +5 -0
- package/dist/cjs/commands.d.ts +138 -2
- package/dist/cjs/commands.d.ts.map +1 -1
- package/dist/cjs/components/editors/embed-editor.d.ts +4 -2
- package/dist/cjs/components/editors/embed-editor.d.ts.map +1 -1
- package/dist/cjs/components/editors/embed-editor.js +38 -9
- package/dist/cjs/components/editors/slicer-editor.d.ts +15 -0
- package/dist/cjs/components/editors/slicer-editor.d.ts.map +1 -0
- package/dist/cjs/components/editors/slicer-editor.js +87 -0
- package/dist/cjs/components/editors/table-editor.d.ts +58 -2
- package/dist/cjs/components/editors/table-editor.d.ts.map +1 -1
- package/dist/cjs/components/editors/table-editor.js +261 -20
- package/dist/cjs/components/index.d.ts +1 -0
- package/dist/cjs/components/index.d.ts.map +1 -1
- package/dist/cjs/components/index.js +1 -0
- package/dist/cjs/constants.d.ts +9 -1
- package/dist/cjs/constants.d.ts.map +1 -1
- package/dist/cjs/constants.js +12 -0
- package/dist/cjs/generated-names.d.ts +13 -3
- package/dist/cjs/generated-names.d.ts.map +1 -1
- package/dist/cjs/generated-names.js +3 -1
- package/dist/cjs/helpers.d.ts +5 -0
- package/dist/cjs/helpers.d.ts.map +1 -1
- package/dist/cjs/helpers.js +10 -1
- package/dist/cjs/hooks/use-on-change-batch.d.ts +19 -2
- package/dist/cjs/hooks/use-on-change-batch.d.ts.map +1 -1
- package/dist/cjs/hooks/use-on-change-batch.js +43 -35
- package/dist/cjs/hooks/use-on-change-calculated-column.d.ts +10 -1
- package/dist/cjs/hooks/use-on-change-calculated-column.d.ts.map +1 -1
- package/dist/cjs/hooks/use-on-change-calculated-column.js +17 -5
- package/dist/cjs/hooks/use-on-change-table-column.d.ts +6 -1
- package/dist/cjs/hooks/use-on-change-table-column.d.ts.map +1 -1
- package/dist/cjs/hooks/use-on-change-table-column.js +17 -5
- package/dist/cjs/hooks/use-on-change.d.ts +36 -3
- package/dist/cjs/hooks/use-on-change.d.ts.map +1 -1
- package/dist/cjs/hooks/use-on-change.js +218 -136
- package/dist/cjs/hooks/use-on-copy.d.ts +1 -1
- package/dist/cjs/hooks/use-on-copy.d.ts.map +1 -1
- package/dist/cjs/hooks/use-on-copy.js +2 -3
- package/dist/cjs/hooks/use-on-create-custom-table-style.d.ts +17 -0
- package/dist/cjs/hooks/use-on-create-custom-table-style.d.ts.map +1 -0
- package/dist/cjs/hooks/use-on-create-custom-table-style.js +28 -0
- package/dist/cjs/hooks/use-on-create-named-range.d.ts +4 -2
- package/dist/cjs/hooks/use-on-create-named-range.d.ts.map +1 -1
- package/dist/cjs/hooks/use-on-create-named-range.js +11 -1
- package/dist/cjs/hooks/use-on-delete-cells-shift-left.d.ts +2 -1
- package/dist/cjs/hooks/use-on-delete-cells-shift-left.d.ts.map +1 -1
- package/dist/cjs/hooks/use-on-delete-cells-shift-left.js +3 -1
- package/dist/cjs/hooks/use-on-delete-cells-shift-up.d.ts +2 -1
- package/dist/cjs/hooks/use-on-delete-cells-shift-up.d.ts.map +1 -1
- package/dist/cjs/hooks/use-on-delete-cells-shift-up.js +3 -1
- package/dist/cjs/hooks/use-on-delete-column.d.ts +2 -1
- package/dist/cjs/hooks/use-on-delete-column.d.ts.map +1 -1
- package/dist/cjs/hooks/use-on-delete-column.js +3 -1
- package/dist/cjs/hooks/use-on-delete-row.d.ts +2 -1
- package/dist/cjs/hooks/use-on-delete-row.d.ts.map +1 -1
- package/dist/cjs/hooks/use-on-delete-row.js +3 -1
- package/dist/cjs/hooks/use-on-delete-sheet.d.ts +9 -1
- package/dist/cjs/hooks/use-on-delete-sheet.d.ts.map +1 -1
- package/dist/cjs/hooks/use-on-delete-sheet.js +17 -1
- package/dist/cjs/hooks/use-on-delete-table-row.d.ts +4 -1
- package/dist/cjs/hooks/use-on-delete-table-row.d.ts.map +1 -1
- package/dist/cjs/hooks/use-on-delete-table-row.js +19 -1
- package/dist/cjs/hooks/use-on-delete.d.ts +5 -2
- package/dist/cjs/hooks/use-on-delete.d.ts.map +1 -1
- package/dist/cjs/hooks/use-on-delete.js +5 -1
- package/dist/cjs/hooks/use-on-embeds.d.ts +7 -4
- package/dist/cjs/hooks/use-on-embeds.d.ts.map +1 -1
- package/dist/cjs/hooks/use-on-embeds.js +26 -24
- package/dist/cjs/hooks/use-on-fill.d.ts +17 -2
- package/dist/cjs/hooks/use-on-fill.d.ts.map +1 -1
- package/dist/cjs/hooks/use-on-fill.js +29 -15
- package/dist/cjs/hooks/use-on-filter-table.d.ts.map +1 -1
- package/dist/cjs/hooks/use-on-filter-table.js +209 -103
- package/dist/cjs/hooks/use-on-import-excel.d.ts +2 -1
- package/dist/cjs/hooks/use-on-import-excel.d.ts.map +1 -1
- package/dist/cjs/hooks/use-on-import-excel.js +22 -19
- package/dist/cjs/hooks/use-on-insert-cells-shift-down.d.ts +2 -1
- package/dist/cjs/hooks/use-on-insert-cells-shift-down.d.ts.map +1 -1
- package/dist/cjs/hooks/use-on-insert-cells-shift-down.js +3 -1
- package/dist/cjs/hooks/use-on-insert-cells-shift-right.d.ts +2 -1
- package/dist/cjs/hooks/use-on-insert-cells-shift-right.d.ts.map +1 -1
- package/dist/cjs/hooks/use-on-insert-cells-shift-right.js +3 -1
- package/dist/cjs/hooks/use-on-insert-column.d.ts +2 -1
- package/dist/cjs/hooks/use-on-insert-column.d.ts.map +1 -1
- package/dist/cjs/hooks/use-on-insert-column.js +3 -1
- package/dist/cjs/hooks/use-on-insert-row.d.ts +2 -1
- package/dist/cjs/hooks/use-on-insert-row.d.ts.map +1 -1
- package/dist/cjs/hooks/use-on-insert-row.js +3 -1
- package/dist/cjs/hooks/use-on-insert-table-row.d.ts +5 -2
- package/dist/cjs/hooks/use-on-insert-table-row.d.ts.map +1 -1
- package/dist/cjs/hooks/use-on-insert-table-row.js +19 -1
- package/dist/cjs/hooks/use-on-merge-unmerge-cells.d.ts +3 -2
- package/dist/cjs/hooks/use-on-merge-unmerge-cells.d.ts.map +1 -1
- package/dist/cjs/hooks/use-on-merge-unmerge-cells.js +14 -1
- package/dist/cjs/hooks/use-on-move-columns.d.ts +4 -1
- package/dist/cjs/hooks/use-on-move-columns.d.ts.map +1 -1
- package/dist/cjs/hooks/use-on-move-columns.js +28 -6
- package/dist/cjs/hooks/use-on-move-rows.d.ts +18 -1
- package/dist/cjs/hooks/use-on-move-rows.d.ts.map +1 -1
- package/dist/cjs/hooks/use-on-move-rows.js +44 -6
- package/dist/cjs/hooks/use-on-move-selection.d.ts +9 -2
- package/dist/cjs/hooks/use-on-move-selection.d.ts.map +1 -1
- package/dist/cjs/hooks/use-on-move-selection.js +101 -25
- package/dist/cjs/hooks/use-on-paste.d.ts +33 -2
- package/dist/cjs/hooks/use-on-paste.d.ts.map +1 -1
- package/dist/cjs/hooks/use-on-paste.js +1005 -740
- package/dist/cjs/hooks/use-on-remove-duplicates.d.ts +5 -2
- package/dist/cjs/hooks/use-on-remove-duplicates.d.ts.map +1 -1
- package/dist/cjs/hooks/use-on-remove-duplicates.js +5 -1
- package/dist/cjs/hooks/use-on-request-create-table.d.ts +13 -0
- package/dist/cjs/hooks/use-on-request-create-table.d.ts.map +1 -0
- package/dist/cjs/hooks/use-on-request-create-table.js +44 -0
- package/dist/cjs/hooks/use-on-request-insert-slicer.d.ts +7 -0
- package/dist/cjs/hooks/use-on-request-insert-slicer.d.ts.map +1 -0
- package/dist/cjs/hooks/use-on-request-insert-slicer.js +15 -0
- package/dist/cjs/hooks/use-on-request-resize-table.d.ts +7 -0
- package/dist/cjs/hooks/use-on-request-resize-table.d.ts.map +1 -0
- package/dist/cjs/hooks/use-on-request-resize-table.js +15 -0
- package/dist/cjs/hooks/use-on-resize-table.d.ts +5 -1
- package/dist/cjs/hooks/use-on-resize-table.d.ts.map +1 -1
- package/dist/cjs/hooks/use-on-resize-table.js +110 -33
- package/dist/cjs/hooks/use-on-sort-column.d.ts +28 -3
- package/dist/cjs/hooks/use-on-sort-column.d.ts.map +1 -1
- package/dist/cjs/hooks/use-on-sort-column.js +136 -90
- package/dist/cjs/hooks/use-on-sort-range.d.ts +26 -3
- package/dist/cjs/hooks/use-on-sort-range.d.ts.map +1 -1
- package/dist/cjs/hooks/use-on-sort-range.js +113 -67
- package/dist/cjs/hooks/use-on-sort-table.d.ts +18 -1
- package/dist/cjs/hooks/use-on-sort-table.d.ts.map +1 -1
- package/dist/cjs/hooks/use-on-sort-table.js +128 -98
- package/dist/cjs/hooks/use-on-subtotal.d.ts +10 -3
- package/dist/cjs/hooks/use-on-subtotal.d.ts.map +1 -1
- package/dist/cjs/hooks/use-on-subtotal.js +13 -9
- package/dist/cjs/hooks/use-on-table.d.ts +39 -7
- package/dist/cjs/hooks/use-on-table.d.ts.map +1 -1
- package/dist/cjs/hooks/use-on-table.js +257 -49
- package/dist/cjs/hooks/use-on-undo-calculated-column.d.ts +23 -0
- package/dist/cjs/hooks/use-on-undo-calculated-column.d.ts.map +1 -0
- package/dist/cjs/hooks/use-on-undo-calculated-column.js +70 -0
- package/dist/cjs/hooks/use-on-undo-table-auto-expansion.d.ts +28 -0
- package/dist/cjs/hooks/use-on-undo-table-auto-expansion.d.ts.map +1 -0
- package/dist/cjs/hooks/use-on-undo-table-auto-expansion.js +96 -0
- package/dist/cjs/hooks/use-on-update-named-range.d.ts +4 -2
- package/dist/cjs/hooks/use-on-update-named-range.d.ts.map +1 -1
- package/dist/cjs/hooks/use-on-update-named-range.js +13 -1
- package/dist/cjs/hooks/use-sheet-properties.d.ts +1 -0
- package/dist/cjs/hooks/use-sheet-properties.d.ts.map +1 -1
- package/dist/cjs/hooks/use-sheet-properties.js +54 -34
- package/dist/cjs/hooks/use-slicers.d.ts +2 -2
- package/dist/cjs/hooks/use-slicers.d.ts.map +1 -1
- package/dist/cjs/hooks/use-slicers.js +17 -26
- package/dist/cjs/hooks/use-sparkline-groups.d.ts +50 -0
- package/dist/cjs/hooks/use-sparkline-groups.d.ts.map +1 -0
- package/dist/cjs/hooks/use-sparkline-groups.js +192 -0
- package/dist/cjs/hooks/use-spreadsheet-state.d.ts +69 -12
- package/dist/cjs/hooks/use-spreadsheet-state.d.ts.map +1 -1
- package/dist/cjs/hooks/use-spreadsheet-state.js +383 -84
- package/dist/cjs/hooks/use-structured-reference.d.ts.map +1 -1
- package/dist/cjs/hooks/use-structured-reference.js +17 -0
- package/dist/cjs/hooks/use-undo-redo-actions.d.ts +2 -1
- package/dist/cjs/hooks/use-undo-redo-actions.d.ts.map +1 -1
- package/dist/cjs/hooks/use-undo-redo-actions.js +10 -2
- package/dist/cjs/hooks/use-undo-redo.d.ts +12 -0
- package/dist/cjs/hooks/use-undo-redo.d.ts.map +1 -1
- package/dist/cjs/hooks/use-undo-redo.js +169 -10
- package/dist/cjs/hooks/utils/sort-rows.d.ts.map +1 -1
- package/dist/cjs/hooks/utils/sort-rows.js +4 -3
- package/dist/cjs/index.d.ts +8 -0
- package/dist/cjs/index.d.ts.map +1 -1
- package/dist/cjs/index.js +9 -0
- package/dist/cjs/interface/apply-fill.d.ts +26 -3
- package/dist/cjs/interface/apply-fill.d.ts.map +1 -1
- package/dist/cjs/interface/apply-fill.js +207 -98
- package/dist/cjs/interface/change-batch.d.ts +1 -1
- package/dist/cjs/interface/change-batch.d.ts.map +1 -1
- package/dist/cjs/interface/change-batch.js +112 -15
- package/dist/cjs/interface/change-calculated-column.d.ts +6 -2
- package/dist/cjs/interface/change-calculated-column.d.ts.map +1 -1
- package/dist/cjs/interface/change-calculated-column.js +87 -17
- package/dist/cjs/interface/change-table-column.d.ts +81 -7
- package/dist/cjs/interface/change-table-column.d.ts.map +1 -1
- package/dist/cjs/interface/change-table-column.js +336 -76
- package/dist/cjs/interface/create-table.d.ts +15 -3
- package/dist/cjs/interface/create-table.d.ts.map +1 -1
- package/dist/cjs/interface/create-table.js +100 -25
- package/dist/cjs/interface/delete-cells-shift-left.d.ts +1 -1
- package/dist/cjs/interface/delete-cells-shift-left.d.ts.map +1 -1
- package/dist/cjs/interface/delete-cells-shift-left.js +10 -1
- package/dist/cjs/interface/delete-cells-shift-up.d.ts +1 -1
- package/dist/cjs/interface/delete-cells-shift-up.d.ts.map +1 -1
- package/dist/cjs/interface/delete-cells-shift-up.js +10 -1
- package/dist/cjs/interface/delete-cells.d.ts +1 -1
- package/dist/cjs/interface/delete-cells.d.ts.map +1 -1
- package/dist/cjs/interface/delete-cells.js +81 -25
- package/dist/cjs/interface/delete-column.d.ts +1 -1
- package/dist/cjs/interface/delete-column.d.ts.map +1 -1
- package/dist/cjs/interface/delete-column.js +29 -22
- package/dist/cjs/interface/delete-row.d.ts +1 -1
- package/dist/cjs/interface/delete-row.d.ts.map +1 -1
- package/dist/cjs/interface/delete-row.js +244 -39
- package/dist/cjs/interface/delete-sheet.d.ts +2 -2
- package/dist/cjs/interface/delete-sheet.d.ts.map +1 -1
- package/dist/cjs/interface/delete-sheet.js +118 -1
- package/dist/cjs/interface/delete-table-column.d.ts +1 -1
- package/dist/cjs/interface/delete-table-column.d.ts.map +1 -1
- package/dist/cjs/interface/delete-table-column.js +11 -1
- package/dist/cjs/interface/delete-table-row.d.ts +1 -1
- package/dist/cjs/interface/delete-table-row.d.ts.map +1 -1
- package/dist/cjs/interface/delete-table-row.js +361 -275
- package/dist/cjs/interface/duplicate-sheet.d.ts.map +1 -1
- package/dist/cjs/interface/duplicate-sheet.js +83 -31
- package/dist/cjs/interface/embeds.d.ts +10 -1
- package/dist/cjs/interface/embeds.d.ts.map +1 -1
- package/dist/cjs/interface/embeds.js +120 -6
- package/dist/cjs/interface/insert-cells-shift-down.d.ts +1 -1
- package/dist/cjs/interface/insert-cells-shift-down.d.ts.map +1 -1
- package/dist/cjs/interface/insert-cells-shift-down.js +10 -1
- package/dist/cjs/interface/insert-cells-shift-right.d.ts +1 -1
- package/dist/cjs/interface/insert-cells-shift-right.d.ts.map +1 -1
- package/dist/cjs/interface/insert-cells-shift-right.js +10 -1
- package/dist/cjs/interface/insert-column.d.ts +2 -2
- package/dist/cjs/interface/insert-column.d.ts.map +1 -1
- package/dist/cjs/interface/insert-column.js +101 -56
- package/dist/cjs/interface/insert-row.d.ts +1 -1
- package/dist/cjs/interface/insert-row.d.ts.map +1 -1
- package/dist/cjs/interface/insert-row.js +25 -7
- package/dist/cjs/interface/insert-table-row.d.ts +2 -1
- package/dist/cjs/interface/insert-table-row.d.ts.map +1 -1
- package/dist/cjs/interface/insert-table-row.js +70 -19
- package/dist/cjs/interface/remove-duplicates.d.ts +1 -1
- package/dist/cjs/interface/remove-duplicates.d.ts.map +1 -1
- package/dist/cjs/interface/remove-duplicates.js +46 -6
- package/dist/cjs/interface/remove-table.d.ts +1 -1
- package/dist/cjs/interface/remove-table.d.ts.map +1 -1
- package/dist/cjs/interface/remove-table.js +72 -16
- package/dist/cjs/interface/slicers.d.ts +12 -1
- package/dist/cjs/interface/slicers.d.ts.map +1 -1
- package/dist/cjs/interface/slicers.js +47 -2
- package/dist/cjs/interface/spreadsheet-interface.d.ts +1 -1
- package/dist/cjs/interface/spreadsheet-interface.d.ts.map +1 -1
- package/dist/cjs/interface/spreadsheet-interface.js +64 -1
- package/dist/cjs/interface/table-totalrow.d.ts +13 -1
- package/dist/cjs/interface/table-totalrow.d.ts.map +1 -1
- package/dist/cjs/interface/table-totalrow.js +107 -73
- package/dist/cjs/interface/table-utils.d.ts +59 -6
- package/dist/cjs/interface/table-utils.d.ts.map +1 -1
- package/dist/cjs/interface/table-utils.js +211 -15
- package/dist/cjs/interface/update-table.d.ts +16 -1
- package/dist/cjs/interface/update-table.d.ts.map +1 -1
- package/dist/cjs/interface/update-table.js +190 -44
- package/dist/cjs/sheet-cell.d.ts.map +1 -1
- package/dist/cjs/test-setup.d.ts.map +1 -1
- package/dist/cjs/test-setup.js +6 -0
- package/dist/cjs/tsconfig.cjs.tsbuildinfo +1 -1
- package/dist/cjs/validation-schema/table.schema.d.ts +11 -0
- package/dist/cjs/validation-schema/table.schema.d.ts.map +1 -1
- package/dist/cjs/validation-schema/table.schema.js +20 -3
- package/dist/esm/api/anchored-objects.d.ts +122 -6
- package/dist/esm/api/anchored-objects.d.ts.map +1 -1
- package/dist/esm/api/anchored-objects.js +375 -15
- package/dist/esm/api/copy-paste.d.ts +8 -2
- package/dist/esm/api/copy-paste.d.ts.map +1 -1
- package/dist/esm/api/copy-paste.js +4 -4
- package/dist/esm/api/filter.d.ts +15 -1
- package/dist/esm/api/filter.d.ts.map +1 -1
- package/dist/esm/api/filter.js +28 -0
- package/dist/esm/api/formula.d.ts +63 -0
- package/dist/esm/api/formula.d.ts.map +1 -1
- package/dist/esm/api/formula.js +235 -8
- package/dist/esm/api/immer-utils.d.ts +11 -1
- package/dist/esm/api/immer-utils.d.ts.map +1 -1
- package/dist/esm/api/immer-utils.js +16 -0
- package/dist/esm/api/insert-cut-cells.d.ts +35 -0
- package/dist/esm/api/insert-cut-cells.d.ts.map +1 -0
- package/dist/esm/api/insert-cut-cells.js +67 -0
- package/dist/esm/api/merges.d.ts +8 -0
- package/dist/esm/api/merges.d.ts.map +1 -1
- package/dist/esm/api/merges.js +9 -0
- package/dist/esm/api/paint-format.d.ts +22 -1
- package/dist/esm/api/paint-format.d.ts.map +1 -1
- package/dist/esm/api/paint-format.js +44 -1
- package/dist/esm/api/sort.d.ts +23 -1
- package/dist/esm/api/sort.d.ts.map +1 -1
- package/dist/esm/api/sort.js +45 -6
- package/dist/esm/api/structural-guards.d.ts +57 -0
- package/dist/esm/api/structural-guards.d.ts.map +1 -1
- package/dist/esm/api/structural-guards.js +85 -0
- package/dist/esm/api/structural-table-refs.d.ts +58 -3
- package/dist/esm/api/structural-table-refs.d.ts.map +1 -1
- package/dist/esm/api/structural-table-refs.js +126 -6
- package/dist/esm/api/subtotal.d.ts +20 -13
- package/dist/esm/api/subtotal.d.ts.map +1 -1
- package/dist/esm/api/subtotal.js +15 -8
- package/dist/esm/api/table.d.ts +26 -2
- package/dist/esm/api/table.d.ts.map +1 -1
- package/dist/esm/api/table.js +70 -48
- package/dist/esm/api/validation.d.ts.map +1 -1
- package/dist/esm/api/validation.js +53 -8
- package/dist/esm/atoms/creating-table.atom.d.ts +22 -0
- package/dist/esm/atoms/creating-table.atom.d.ts.map +1 -0
- package/dist/esm/atoms/creating-table.atom.js +4 -0
- package/dist/esm/atoms/dialog-state.atom.d.ts +8 -0
- package/dist/esm/atoms/dialog-state.atom.d.ts.map +1 -1
- package/dist/esm/atoms/dialog-state.atom.js +12 -0
- package/dist/esm/atoms/editing-slicer.atom.d.ts +9 -0
- package/dist/esm/atoms/editing-slicer.atom.d.ts.map +1 -0
- package/dist/esm/atoms/editing-slicer.atom.js +6 -0
- package/dist/esm/atoms/index.d.ts +4 -0
- package/dist/esm/atoms/index.d.ts.map +1 -1
- package/dist/esm/atoms/index.js +4 -0
- package/dist/esm/atoms/inserting-slicer.atom.d.ts +8 -0
- package/dist/esm/atoms/inserting-slicer.atom.d.ts.map +1 -0
- package/dist/esm/atoms/inserting-slicer.atom.js +5 -0
- package/dist/esm/atoms/resizing-table.atom.d.ts +8 -0
- package/dist/esm/atoms/resizing-table.atom.d.ts.map +1 -0
- package/dist/esm/atoms/resizing-table.atom.js +5 -0
- package/dist/esm/commands.d.ts +138 -2
- package/dist/esm/commands.d.ts.map +1 -1
- package/dist/esm/components/editors/embed-editor.d.ts +4 -2
- package/dist/esm/components/editors/embed-editor.d.ts.map +1 -1
- package/dist/esm/components/editors/embed-editor.js +40 -6
- package/dist/esm/components/editors/slicer-editor.d.ts +15 -0
- package/dist/esm/components/editors/slicer-editor.d.ts.map +1 -0
- package/dist/esm/components/editors/slicer-editor.js +85 -0
- package/dist/esm/components/editors/table-editor.d.ts +58 -2
- package/dist/esm/components/editors/table-editor.d.ts.map +1 -1
- package/dist/esm/components/editors/table-editor.js +243 -19
- package/dist/esm/components/index.d.ts +1 -0
- package/dist/esm/components/index.d.ts.map +1 -1
- package/dist/esm/components/index.js +1 -0
- package/dist/esm/constants.d.ts +9 -1
- package/dist/esm/constants.d.ts.map +1 -1
- package/dist/esm/constants.js +12 -0
- package/dist/esm/generated-names.d.ts +13 -3
- package/dist/esm/generated-names.d.ts.map +1 -1
- package/dist/esm/generated-names.js +3 -1
- package/dist/esm/helpers.d.ts +5 -0
- package/dist/esm/helpers.d.ts.map +1 -1
- package/dist/esm/helpers.js +7 -1
- package/dist/esm/hooks/use-on-change-batch.d.ts +19 -2
- package/dist/esm/hooks/use-on-change-batch.d.ts.map +1 -1
- package/dist/esm/hooks/use-on-change-batch.js +19 -3
- package/dist/esm/hooks/use-on-change-calculated-column.d.ts +10 -1
- package/dist/esm/hooks/use-on-change-calculated-column.d.ts.map +1 -1
- package/dist/esm/hooks/use-on-change-calculated-column.js +17 -5
- package/dist/esm/hooks/use-on-change-table-column.d.ts +6 -1
- package/dist/esm/hooks/use-on-change-table-column.d.ts.map +1 -1
- package/dist/esm/hooks/use-on-change-table-column.js +17 -5
- package/dist/esm/hooks/use-on-change.d.ts +36 -3
- package/dist/esm/hooks/use-on-change.d.ts.map +1 -1
- package/dist/esm/hooks/use-on-change.js +214 -124
- package/dist/esm/hooks/use-on-copy.d.ts +1 -1
- package/dist/esm/hooks/use-on-copy.d.ts.map +1 -1
- package/dist/esm/hooks/use-on-copy.js +2 -3
- package/dist/esm/hooks/use-on-create-custom-table-style.d.ts +17 -0
- package/dist/esm/hooks/use-on-create-custom-table-style.d.ts.map +1 -0
- package/dist/esm/hooks/use-on-create-custom-table-style.js +26 -0
- package/dist/esm/hooks/use-on-create-named-range.d.ts +4 -2
- package/dist/esm/hooks/use-on-create-named-range.d.ts.map +1 -1
- package/dist/esm/hooks/use-on-create-named-range.js +11 -1
- package/dist/esm/hooks/use-on-delete-cells-shift-left.d.ts +2 -1
- package/dist/esm/hooks/use-on-delete-cells-shift-left.d.ts.map +1 -1
- package/dist/esm/hooks/use-on-delete-cells-shift-left.js +3 -1
- package/dist/esm/hooks/use-on-delete-cells-shift-up.d.ts +2 -1
- package/dist/esm/hooks/use-on-delete-cells-shift-up.d.ts.map +1 -1
- package/dist/esm/hooks/use-on-delete-cells-shift-up.js +3 -1
- package/dist/esm/hooks/use-on-delete-column.d.ts +2 -1
- package/dist/esm/hooks/use-on-delete-column.d.ts.map +1 -1
- package/dist/esm/hooks/use-on-delete-column.js +3 -1
- package/dist/esm/hooks/use-on-delete-row.d.ts +2 -1
- package/dist/esm/hooks/use-on-delete-row.d.ts.map +1 -1
- package/dist/esm/hooks/use-on-delete-row.js +3 -1
- package/dist/esm/hooks/use-on-delete-sheet.d.ts +9 -1
- package/dist/esm/hooks/use-on-delete-sheet.d.ts.map +1 -1
- package/dist/esm/hooks/use-on-delete-sheet.js +17 -1
- package/dist/esm/hooks/use-on-delete-table-row.d.ts +4 -1
- package/dist/esm/hooks/use-on-delete-table-row.d.ts.map +1 -1
- package/dist/esm/hooks/use-on-delete-table-row.js +19 -1
- package/dist/esm/hooks/use-on-delete.d.ts +5 -2
- package/dist/esm/hooks/use-on-delete.d.ts.map +1 -1
- package/dist/esm/hooks/use-on-delete.js +5 -1
- package/dist/esm/hooks/use-on-embeds.d.ts +7 -4
- package/dist/esm/hooks/use-on-embeds.d.ts.map +1 -1
- package/dist/esm/hooks/use-on-embeds.js +23 -6
- package/dist/esm/hooks/use-on-fill.d.ts +17 -2
- package/dist/esm/hooks/use-on-fill.d.ts.map +1 -1
- package/dist/esm/hooks/use-on-fill.js +27 -1
- package/dist/esm/hooks/use-on-filter-table.d.ts.map +1 -1
- package/dist/esm/hooks/use-on-filter-table.js +97 -26
- package/dist/esm/hooks/use-on-import-excel.d.ts +2 -1
- package/dist/esm/hooks/use-on-import-excel.d.ts.map +1 -1
- package/dist/esm/hooks/use-on-import-excel.js +4 -1
- package/dist/esm/hooks/use-on-insert-cells-shift-down.d.ts +2 -1
- package/dist/esm/hooks/use-on-insert-cells-shift-down.d.ts.map +1 -1
- package/dist/esm/hooks/use-on-insert-cells-shift-down.js +3 -1
- package/dist/esm/hooks/use-on-insert-cells-shift-right.d.ts +2 -1
- package/dist/esm/hooks/use-on-insert-cells-shift-right.d.ts.map +1 -1
- package/dist/esm/hooks/use-on-insert-cells-shift-right.js +3 -1
- package/dist/esm/hooks/use-on-insert-column.d.ts +2 -1
- package/dist/esm/hooks/use-on-insert-column.d.ts.map +1 -1
- package/dist/esm/hooks/use-on-insert-column.js +3 -1
- package/dist/esm/hooks/use-on-insert-row.d.ts +2 -1
- package/dist/esm/hooks/use-on-insert-row.d.ts.map +1 -1
- package/dist/esm/hooks/use-on-insert-row.js +3 -1
- package/dist/esm/hooks/use-on-insert-table-row.d.ts +5 -2
- package/dist/esm/hooks/use-on-insert-table-row.d.ts.map +1 -1
- package/dist/esm/hooks/use-on-insert-table-row.js +19 -1
- package/dist/esm/hooks/use-on-merge-unmerge-cells.d.ts +3 -2
- package/dist/esm/hooks/use-on-merge-unmerge-cells.d.ts.map +1 -1
- package/dist/esm/hooks/use-on-merge-unmerge-cells.js +12 -1
- package/dist/esm/hooks/use-on-move-columns.d.ts +4 -1
- package/dist/esm/hooks/use-on-move-columns.d.ts.map +1 -1
- package/dist/esm/hooks/use-on-move-columns.js +28 -6
- package/dist/esm/hooks/use-on-move-rows.d.ts +18 -1
- package/dist/esm/hooks/use-on-move-rows.d.ts.map +1 -1
- package/dist/esm/hooks/use-on-move-rows.js +44 -6
- package/dist/esm/hooks/use-on-move-selection.d.ts +9 -2
- package/dist/esm/hooks/use-on-move-selection.d.ts.map +1 -1
- package/dist/esm/hooks/use-on-move-selection.js +57 -1
- package/dist/esm/hooks/use-on-paste.d.ts +33 -2
- package/dist/esm/hooks/use-on-paste.d.ts.map +1 -1
- package/dist/esm/hooks/use-on-paste.js +825 -643
- package/dist/esm/hooks/use-on-remove-duplicates.d.ts +5 -2
- package/dist/esm/hooks/use-on-remove-duplicates.d.ts.map +1 -1
- package/dist/esm/hooks/use-on-remove-duplicates.js +5 -1
- package/dist/esm/hooks/use-on-request-create-table.d.ts +13 -0
- package/dist/esm/hooks/use-on-request-create-table.d.ts.map +1 -0
- package/dist/esm/hooks/use-on-request-create-table.js +43 -0
- package/dist/esm/hooks/use-on-request-insert-slicer.d.ts +7 -0
- package/dist/esm/hooks/use-on-request-insert-slicer.d.ts.map +1 -0
- package/dist/esm/hooks/use-on-request-insert-slicer.js +15 -0
- package/dist/esm/hooks/use-on-request-resize-table.d.ts +7 -0
- package/dist/esm/hooks/use-on-request-resize-table.d.ts.map +1 -0
- package/dist/esm/hooks/use-on-request-resize-table.js +15 -0
- package/dist/esm/hooks/use-on-resize-table.d.ts +5 -1
- package/dist/esm/hooks/use-on-resize-table.d.ts.map +1 -1
- package/dist/esm/hooks/use-on-resize-table.js +107 -27
- package/dist/esm/hooks/use-on-sort-column.d.ts +28 -3
- package/dist/esm/hooks/use-on-sort-column.d.ts.map +1 -1
- package/dist/esm/hooks/use-on-sort-column.js +105 -68
- package/dist/esm/hooks/use-on-sort-range.d.ts +26 -3
- package/dist/esm/hooks/use-on-sort-range.d.ts.map +1 -1
- package/dist/esm/hooks/use-on-sort-range.js +100 -64
- package/dist/esm/hooks/use-on-sort-table.d.ts +18 -1
- package/dist/esm/hooks/use-on-sort-table.d.ts.map +1 -1
- package/dist/esm/hooks/use-on-sort-table.js +107 -86
- package/dist/esm/hooks/use-on-subtotal.d.ts +10 -3
- package/dist/esm/hooks/use-on-subtotal.d.ts.map +1 -1
- package/dist/esm/hooks/use-on-subtotal.js +7 -5
- package/dist/esm/hooks/use-on-table.d.ts +39 -7
- package/dist/esm/hooks/use-on-table.d.ts.map +1 -1
- package/dist/esm/hooks/use-on-table.js +234 -26
- package/dist/esm/hooks/use-on-undo-calculated-column.d.ts +23 -0
- package/dist/esm/hooks/use-on-undo-calculated-column.d.ts.map +1 -0
- package/dist/esm/hooks/use-on-undo-calculated-column.js +62 -0
- package/dist/esm/hooks/use-on-undo-table-auto-expansion.d.ts +28 -0
- package/dist/esm/hooks/use-on-undo-table-auto-expansion.d.ts.map +1 -0
- package/dist/esm/hooks/use-on-undo-table-auto-expansion.js +75 -0
- package/dist/esm/hooks/use-on-update-named-range.d.ts +4 -2
- package/dist/esm/hooks/use-on-update-named-range.d.ts.map +1 -1
- package/dist/esm/hooks/use-on-update-named-range.js +13 -1
- package/dist/esm/hooks/use-sheet-properties.d.ts +1 -0
- package/dist/esm/hooks/use-sheet-properties.d.ts.map +1 -1
- package/dist/esm/hooks/use-sheet-properties.js +38 -19
- package/dist/esm/hooks/use-slicers.d.ts +2 -2
- package/dist/esm/hooks/use-slicers.d.ts.map +1 -1
- package/dist/esm/hooks/use-slicers.js +16 -8
- package/dist/esm/hooks/use-sparkline-groups.d.ts +50 -0
- package/dist/esm/hooks/use-sparkline-groups.d.ts.map +1 -0
- package/dist/esm/hooks/use-sparkline-groups.js +146 -0
- package/dist/esm/hooks/use-spreadsheet-state.d.ts +69 -12
- package/dist/esm/hooks/use-spreadsheet-state.d.ts.map +1 -1
- package/dist/esm/hooks/use-spreadsheet-state.js +321 -14
- package/dist/esm/hooks/use-structured-reference.d.ts.map +1 -1
- package/dist/esm/hooks/use-structured-reference.js +17 -0
- package/dist/esm/hooks/use-undo-redo-actions.d.ts +2 -1
- package/dist/esm/hooks/use-undo-redo-actions.d.ts.map +1 -1
- package/dist/esm/hooks/use-undo-redo-actions.js +8 -2
- package/dist/esm/hooks/use-undo-redo.d.ts +12 -0
- package/dist/esm/hooks/use-undo-redo.d.ts.map +1 -1
- package/dist/esm/hooks/use-undo-redo.js +158 -7
- package/dist/esm/hooks/utils/sort-rows.d.ts.map +1 -1
- package/dist/esm/hooks/utils/sort-rows.js +4 -3
- package/dist/esm/index.d.ts +8 -0
- package/dist/esm/index.d.ts.map +1 -1
- package/dist/esm/index.js +9 -0
- package/dist/esm/interface/apply-fill.d.ts +26 -3
- package/dist/esm/interface/apply-fill.d.ts.map +1 -1
- package/dist/esm/interface/apply-fill.js +188 -88
- package/dist/esm/interface/change-batch.d.ts +1 -1
- package/dist/esm/interface/change-batch.d.ts.map +1 -1
- package/dist/esm/interface/change-batch.js +89 -8
- package/dist/esm/interface/change-calculated-column.d.ts +6 -2
- package/dist/esm/interface/change-calculated-column.d.ts.map +1 -1
- package/dist/esm/interface/change-calculated-column.js +81 -16
- package/dist/esm/interface/change-table-column.d.ts +81 -7
- package/dist/esm/interface/change-table-column.d.ts.map +1 -1
- package/dist/esm/interface/change-table-column.js +295 -67
- package/dist/esm/interface/create-table.d.ts +15 -3
- package/dist/esm/interface/create-table.d.ts.map +1 -1
- package/dist/esm/interface/create-table.js +103 -27
- package/dist/esm/interface/delete-cells-shift-left.d.ts +1 -1
- package/dist/esm/interface/delete-cells-shift-left.d.ts.map +1 -1
- package/dist/esm/interface/delete-cells-shift-left.js +10 -1
- package/dist/esm/interface/delete-cells-shift-up.d.ts +1 -1
- package/dist/esm/interface/delete-cells-shift-up.d.ts.map +1 -1
- package/dist/esm/interface/delete-cells-shift-up.js +10 -1
- package/dist/esm/interface/delete-cells.d.ts +1 -1
- package/dist/esm/interface/delete-cells.d.ts.map +1 -1
- package/dist/esm/interface/delete-cells.js +47 -14
- package/dist/esm/interface/delete-column.d.ts +1 -1
- package/dist/esm/interface/delete-column.d.ts.map +1 -1
- package/dist/esm/interface/delete-column.js +26 -30
- package/dist/esm/interface/delete-row.d.ts +1 -1
- package/dist/esm/interface/delete-row.d.ts.map +1 -1
- package/dist/esm/interface/delete-row.js +191 -44
- package/dist/esm/interface/delete-sheet.d.ts +2 -2
- package/dist/esm/interface/delete-sheet.d.ts.map +1 -1
- package/dist/esm/interface/delete-sheet.js +113 -1
- package/dist/esm/interface/delete-table-column.d.ts +1 -1
- package/dist/esm/interface/delete-table-column.d.ts.map +1 -1
- package/dist/esm/interface/delete-table-column.js +11 -1
- package/dist/esm/interface/delete-table-row.d.ts +1 -1
- package/dist/esm/interface/delete-table-row.d.ts.map +1 -1
- package/dist/esm/interface/delete-table-row.js +312 -232
- package/dist/esm/interface/duplicate-sheet.d.ts.map +1 -1
- package/dist/esm/interface/duplicate-sheet.js +73 -26
- package/dist/esm/interface/embeds.d.ts +10 -1
- package/dist/esm/interface/embeds.d.ts.map +1 -1
- package/dist/esm/interface/embeds.js +84 -5
- package/dist/esm/interface/insert-cells-shift-down.d.ts +1 -1
- package/dist/esm/interface/insert-cells-shift-down.d.ts.map +1 -1
- package/dist/esm/interface/insert-cells-shift-down.js +10 -1
- package/dist/esm/interface/insert-cells-shift-right.d.ts +1 -1
- package/dist/esm/interface/insert-cells-shift-right.d.ts.map +1 -1
- package/dist/esm/interface/insert-cells-shift-right.js +10 -1
- package/dist/esm/interface/insert-column.d.ts +2 -2
- package/dist/esm/interface/insert-column.d.ts.map +1 -1
- package/dist/esm/interface/insert-column.js +70 -33
- package/dist/esm/interface/insert-row.d.ts +1 -1
- package/dist/esm/interface/insert-row.d.ts.map +1 -1
- package/dist/esm/interface/insert-row.js +22 -6
- package/dist/esm/interface/insert-table-row.d.ts +2 -1
- package/dist/esm/interface/insert-table-row.d.ts.map +1 -1
- package/dist/esm/interface/insert-table-row.js +67 -12
- package/dist/esm/interface/remove-duplicates.d.ts +1 -1
- package/dist/esm/interface/remove-duplicates.d.ts.map +1 -1
- package/dist/esm/interface/remove-duplicates.js +41 -6
- package/dist/esm/interface/remove-table.d.ts +1 -1
- package/dist/esm/interface/remove-table.d.ts.map +1 -1
- package/dist/esm/interface/remove-table.js +58 -10
- package/dist/esm/interface/slicers.d.ts +12 -1
- package/dist/esm/interface/slicers.d.ts.map +1 -1
- package/dist/esm/interface/slicers.js +44 -2
- package/dist/esm/interface/spreadsheet-interface.d.ts +1 -1
- package/dist/esm/interface/spreadsheet-interface.d.ts.map +1 -1
- package/dist/esm/interface/spreadsheet-interface.js +73 -1
- package/dist/esm/interface/table-totalrow.d.ts +13 -1
- package/dist/esm/interface/table-totalrow.d.ts.map +1 -1
- package/dist/esm/interface/table-totalrow.js +98 -68
- package/dist/esm/interface/table-utils.d.ts +59 -6
- package/dist/esm/interface/table-utils.d.ts.map +1 -1
- package/dist/esm/interface/table-utils.js +155 -14
- package/dist/esm/interface/update-table.d.ts +16 -1
- package/dist/esm/interface/update-table.d.ts.map +1 -1
- package/dist/esm/interface/update-table.js +203 -42
- package/dist/esm/sheet-cell.d.ts.map +1 -1
- package/dist/esm/test-setup.d.ts.map +1 -1
- package/dist/esm/test-setup.js +6 -0
- package/dist/esm/tsconfig.esm.tsbuildinfo +1 -1
- package/dist/esm/validation-schema/table.schema.d.ts +11 -0
- package/dist/esm/validation-schema/table.schema.d.ts.map +1 -1
- package/dist/esm/validation-schema/table.schema.js +15 -2
- package/package.json +25 -17
|
@@ -87,11 +87,24 @@ const isSheetRangeLike = (value) => {
|
|
|
87
87
|
* (`sources`), nulled on properties (`dataRange`) — the chart's `#REF!`.
|
|
88
88
|
* Unknown keys are left untouched. Mutates in place; returns whether anything
|
|
89
89
|
* changed.
|
|
90
|
+
*
|
|
91
|
+
* `band` restricts the rewrite to ranges whose PERPENDICULAR span lies wholly
|
|
92
|
+
* inside it — the insert/delete-CELLS shift of columns `B:C` only touches
|
|
93
|
+
* ranges living entirely in B..C, exactly like `expandRangesInFormula` /
|
|
94
|
+
* `contractRangesInFormula` with the same `bandSpan` (SHF-07 / SHF-08), so a
|
|
95
|
+
* chart and a formula reading the same cells always agree. A range that only
|
|
96
|
+
* partially overlaps the band keeps its address, as in Excel.
|
|
90
97
|
*/
|
|
91
|
-
export const shiftChartSpecRanges = (spec, sheetId, axis, op, index, count) => {
|
|
98
|
+
export const shiftChartSpecRanges = (spec, sheetId, axis, op, index, count, band) => {
|
|
92
99
|
let changed = false;
|
|
100
|
+
const [acrossStartKey, acrossEndKey] = axis === "row"
|
|
101
|
+
? ["startColumnIndex", "endColumnIndex"]
|
|
102
|
+
: ["startRowIndex", "endRowIndex"];
|
|
103
|
+
const isWithinBand = (range) => !band ||
|
|
104
|
+
(range[acrossStartKey] >= band.startIndex &&
|
|
105
|
+
range[acrossEndKey] <= band.endIndex);
|
|
93
106
|
const shiftRange = (range) => {
|
|
94
|
-
if (range.sheetId !== sheetId)
|
|
107
|
+
if (range.sheetId !== sheetId || !isWithinBand(range))
|
|
95
108
|
return range;
|
|
96
109
|
const next = shiftGridRangeLikeReference(range, axis, op, index, count);
|
|
97
110
|
if (next !== range)
|
|
@@ -133,38 +146,121 @@ export const shiftChartSpecRanges = (spec, sheetId, axis, op, index, count) => {
|
|
|
133
146
|
walk(spec);
|
|
134
147
|
return changed;
|
|
135
148
|
};
|
|
136
|
-
/**
|
|
149
|
+
/**
|
|
150
|
+
* Record (or clear) the second anchor a move / resize gesture reported —
|
|
151
|
+
* `moveAndSize` objects carry one, `moveOnly` / `absolute` never do.
|
|
152
|
+
*/
|
|
153
|
+
export const setOverlayToAnchor = (overlay, toAnchor) => {
|
|
154
|
+
if (toAnchor) {
|
|
155
|
+
overlay.toCell = toAnchor.toCell;
|
|
156
|
+
overlay.toOffsetXPixels = toAnchor.toOffsetXPixels;
|
|
157
|
+
overlay.toOffsetYPixels = toAnchor.toOffsetYPixels;
|
|
158
|
+
return;
|
|
159
|
+
}
|
|
160
|
+
delete overlay.toCell;
|
|
161
|
+
delete overlay.toOffsetXPixels;
|
|
162
|
+
delete overlay.toOffsetYPixels;
|
|
163
|
+
};
|
|
164
|
+
/**
|
|
165
|
+
* Shift a floating object's anchors for a whole row / column insert or
|
|
166
|
+
* delete, per its placement mode. Returns `"removed"` when a delete consumed
|
|
167
|
+
* the whole span of a `moveAndSize` object (Excel deletes it), otherwise
|
|
168
|
+
* whether anything moved.
|
|
169
|
+
*/
|
|
170
|
+
export const shiftOverlayOnStructuralChange = (overlay, axis, op, index, count) => {
|
|
171
|
+
if (!overlay.anchorCell || overlay.placement === "absolute")
|
|
172
|
+
return false;
|
|
173
|
+
const moveAndSize = (overlay.placement ?? "moveAndSize") === "moveAndSize";
|
|
174
|
+
const toCell = moveAndSize ? overlay.toCell : undefined;
|
|
175
|
+
if (toCell && op === "delete" && count > 0) {
|
|
176
|
+
const key = axis === "row" ? "rowIndex" : "columnIndex";
|
|
177
|
+
const start = overlay.anchorCell[key];
|
|
178
|
+
// `to` sits on the cell the corner lands in; a corner flush with the
|
|
179
|
+
// cell's leading edge does not occupy it.
|
|
180
|
+
const offset = axis === "row" ? overlay.toOffsetYPixels : overlay.toOffsetXPixels;
|
|
181
|
+
const end = (offset ?? 0) > 0 ? toCell[key] : Math.max(start, toCell[key] - 1);
|
|
182
|
+
if (index <= start && index + count - 1 >= end)
|
|
183
|
+
return "removed";
|
|
184
|
+
}
|
|
185
|
+
let changed = false;
|
|
186
|
+
const next = shiftAnchorCell(overlay.anchorCell, axis, op, index, count);
|
|
187
|
+
if (next !== overlay.anchorCell) {
|
|
188
|
+
overlay.anchorCell = next;
|
|
189
|
+
changed = true;
|
|
190
|
+
}
|
|
191
|
+
if (toCell) {
|
|
192
|
+
const nextTo = shiftAnchorCell(toCell, axis, op, index, count);
|
|
193
|
+
if (nextTo !== toCell) {
|
|
194
|
+
overlay.toCell = nextTo;
|
|
195
|
+
changed = true;
|
|
196
|
+
}
|
|
197
|
+
}
|
|
198
|
+
return changed;
|
|
199
|
+
};
|
|
200
|
+
/** Shift the anchors of every embed (picture, shape, text box…) on the edited sheet. */
|
|
137
201
|
export const shiftEmbedsOnStructuralChange = (draft, sheetId, axis, op, index, count) => {
|
|
138
|
-
for (
|
|
139
|
-
const position =
|
|
202
|
+
for (let i = draft.length - 1; i >= 0; i--) {
|
|
203
|
+
const position = draft[i].position;
|
|
140
204
|
if (!position || position.sheetId !== sheetId)
|
|
141
205
|
continue;
|
|
142
206
|
const overlay = position.overlayPosition;
|
|
143
207
|
if (!overlay?.anchorCell)
|
|
144
208
|
continue;
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
209
|
+
if (shiftOverlayOnStructuralChange(overlay, axis, op, index, count) ===
|
|
210
|
+
"removed") {
|
|
211
|
+
draft.splice(i, 1);
|
|
212
|
+
}
|
|
148
213
|
}
|
|
149
214
|
};
|
|
150
215
|
/**
|
|
151
|
-
* Shift every
|
|
216
|
+
* Shift the anchors of every slicer on the edited sheet — a slicer is a
|
|
217
|
+
* floating frame with the same placement modes as a picture (#668 C-46).
|
|
218
|
+
*/
|
|
219
|
+
export const shiftSlicersOnStructuralChange = (draft, sheetId, axis, op, index, count) => {
|
|
220
|
+
for (let i = draft.length - 1; i >= 0; i--) {
|
|
221
|
+
const position = draft[i].position;
|
|
222
|
+
if (!position || position.sheetId !== sheetId)
|
|
223
|
+
continue;
|
|
224
|
+
const overlay = position.overlayPosition;
|
|
225
|
+
if (!overlay?.anchorCell)
|
|
226
|
+
continue;
|
|
227
|
+
if (shiftOverlayOnStructuralChange(overlay, axis, op, index, count) ===
|
|
228
|
+
"removed") {
|
|
229
|
+
draft.splice(i, 1);
|
|
230
|
+
}
|
|
231
|
+
}
|
|
232
|
+
};
|
|
233
|
+
/**
|
|
234
|
+
* Shift every chart on the edited sheet: its anchors like a floating
|
|
152
235
|
* object, and the ranges inside its spec like references.
|
|
153
236
|
*/
|
|
154
237
|
export const shiftChartsOnStructuralChange = (draft, sheetId, axis, op, index, count) => {
|
|
155
|
-
for (
|
|
238
|
+
for (let i = draft.length - 1; i >= 0; i--) {
|
|
239
|
+
const chart = draft[i];
|
|
156
240
|
const position = chart.position;
|
|
157
|
-
if (position?.sheetId === sheetId &&
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
241
|
+
if (position?.sheetId === sheetId &&
|
|
242
|
+
position.overlayPosition?.anchorCell &&
|
|
243
|
+
shiftOverlayOnStructuralChange(position.overlayPosition, axis, op, index, count) === "removed") {
|
|
244
|
+
draft.splice(i, 1);
|
|
245
|
+
continue;
|
|
162
246
|
}
|
|
163
247
|
// Series ranges may point at ANY sheet, so the spec walk is not gated on
|
|
164
248
|
// the chart's own sheet.
|
|
165
249
|
shiftChartSpecRanges(chart.spec, sheetId, axis, op, index, count);
|
|
166
250
|
}
|
|
167
251
|
};
|
|
252
|
+
/**
|
|
253
|
+
* Insert/delete CELLS with shift (SHF-*): only the ranges a chart reads move —
|
|
254
|
+
* those wholly inside the shifted band's columns (shift down/up) or rows
|
|
255
|
+
* (shift right/left), with the reference rule along the shift axis. Excel
|
|
256
|
+
* moves drawing anchors only for whole row/column edits, so the chart frame
|
|
257
|
+
* stays where it is.
|
|
258
|
+
*/
|
|
259
|
+
export const shiftChartsOnCellShift = (draft, sheetId, axis, op, index, count, band) => {
|
|
260
|
+
for (const chart of draft) {
|
|
261
|
+
shiftChartSpecRanges(chart.spec, sheetId, axis, op, index, count, band);
|
|
262
|
+
}
|
|
263
|
+
};
|
|
168
264
|
/**
|
|
169
265
|
* Shift AllowEditRange rectangles. A protected range without a rectangle
|
|
170
266
|
* (sheet-scoped protection) is untouched; one the delete consumes is removed.
|
|
@@ -210,3 +306,267 @@ export const shiftProtectedRangesOnStructuralChange = (draft, sheetId, axis, op,
|
|
|
210
306
|
}
|
|
211
307
|
}
|
|
212
308
|
};
|
|
309
|
+
/**
|
|
310
|
+
* Visit every `SheetRange` a chart spec holds — `dataRange`, per-series /
|
|
311
|
+
* per-domain `sources`, error-bar `plusRange` / `minusRange`, and any future
|
|
312
|
+
* range-valued key — replacing it with what `rewrite` returns. A range the
|
|
313
|
+
* rewrite returns `null` for is removed — spliced out of arrays (`sources`),
|
|
314
|
+
* nulled on properties (`dataRange`) — the chart's `#REF!`; a move never
|
|
315
|
+
* consumes a range, so its rewrites always return a range. Mutates in place;
|
|
316
|
+
* returns whether anything changed.
|
|
317
|
+
*/
|
|
318
|
+
const rewriteChartSpecRanges = (spec, rewrite) => {
|
|
319
|
+
let changed = false;
|
|
320
|
+
const walk = (node) => {
|
|
321
|
+
if (!node || typeof node !== "object")
|
|
322
|
+
return;
|
|
323
|
+
if (Array.isArray(node)) {
|
|
324
|
+
for (let i = node.length - 1; i >= 0; i--) {
|
|
325
|
+
const item = node[i];
|
|
326
|
+
if (isSheetRangeLike(item)) {
|
|
327
|
+
const next = rewrite(item);
|
|
328
|
+
if (next === null) {
|
|
329
|
+
node.splice(i, 1);
|
|
330
|
+
changed = true;
|
|
331
|
+
}
|
|
332
|
+
else if (next !== item) {
|
|
333
|
+
node[i] = next;
|
|
334
|
+
changed = true;
|
|
335
|
+
}
|
|
336
|
+
}
|
|
337
|
+
else {
|
|
338
|
+
walk(item);
|
|
339
|
+
}
|
|
340
|
+
}
|
|
341
|
+
return;
|
|
342
|
+
}
|
|
343
|
+
const obj = node;
|
|
344
|
+
for (const key of Object.keys(obj)) {
|
|
345
|
+
const value = obj[key];
|
|
346
|
+
if (isSheetRangeLike(value)) {
|
|
347
|
+
const next = rewrite(value);
|
|
348
|
+
if (next !== value) {
|
|
349
|
+
obj[key] = next;
|
|
350
|
+
changed = true;
|
|
351
|
+
}
|
|
352
|
+
}
|
|
353
|
+
else {
|
|
354
|
+
walk(value);
|
|
355
|
+
}
|
|
356
|
+
}
|
|
357
|
+
};
|
|
358
|
+
walk(spec);
|
|
359
|
+
return changed;
|
|
360
|
+
};
|
|
361
|
+
/**
|
|
362
|
+
* Deleting a sheet consumes every range on it: a chart elsewhere whose series
|
|
363
|
+
* / category / data range read the deleted sheet keeps the chart but loses
|
|
364
|
+
* that range (Excel's empty `#REF!` series).
|
|
365
|
+
*/
|
|
366
|
+
export const removeChartSpecRangesOnSheet = (spec, sheetId) => rewriteChartSpecRanges(spec, (range) => range.sheetId === sheetId ? null : range);
|
|
367
|
+
/**
|
|
368
|
+
* Re-point every range on `fromSheetId` at `toSheetId` — a duplicated sheet's
|
|
369
|
+
* charts read the copy's own cells (Excel), while ranges on other sheets keep
|
|
370
|
+
* reading the original.
|
|
371
|
+
*/
|
|
372
|
+
export const retargetChartSpecRanges = (spec, fromSheetId, toSheetId) => rewriteChartSpecRanges(spec, (range) => range.sheetId === fromSheetId ? { ...range, sheetId: toSheetId } : range);
|
|
373
|
+
/**
|
|
374
|
+
* Relocate the ranges inside a chart spec when the block `from` on
|
|
375
|
+
* `fromSheetId` is moved (drag-move, cut → paste) to `to` on `toSheetId`, the
|
|
376
|
+
* way Excel re-points series like references: a range that lies ENTIRELY
|
|
377
|
+
* inside the moved block travels with it (shifted by the move delta and onto
|
|
378
|
+
* the destination sheet); a range the block covers only partially, and any
|
|
379
|
+
* range outside it, keeps referring to its original cells. Mirrors
|
|
380
|
+
* `move_spec_sheet_ranges` in `rnc-store`.
|
|
381
|
+
*/
|
|
382
|
+
export const moveChartSpecRanges = (spec, fromSheetId, from, toSheetId, to) => {
|
|
383
|
+
const rowDelta = to.startRowIndex - from.startRowIndex;
|
|
384
|
+
const columnDelta = to.startColumnIndex - from.startColumnIndex;
|
|
385
|
+
if (rowDelta === 0 && columnDelta === 0 && fromSheetId === toSheetId) {
|
|
386
|
+
return false;
|
|
387
|
+
}
|
|
388
|
+
return rewriteChartSpecRanges(spec, (range) => {
|
|
389
|
+
if (range.sheetId !== fromSheetId ||
|
|
390
|
+
range.startRowIndex < from.startRowIndex ||
|
|
391
|
+
range.endRowIndex > from.endRowIndex ||
|
|
392
|
+
range.startColumnIndex < from.startColumnIndex ||
|
|
393
|
+
range.endColumnIndex > from.endColumnIndex) {
|
|
394
|
+
return range;
|
|
395
|
+
}
|
|
396
|
+
return {
|
|
397
|
+
...range,
|
|
398
|
+
sheetId: toSheetId,
|
|
399
|
+
startRowIndex: range.startRowIndex + rowDelta,
|
|
400
|
+
endRowIndex: range.endRowIndex + rowDelta,
|
|
401
|
+
startColumnIndex: range.startColumnIndex + columnDelta,
|
|
402
|
+
endColumnIndex: range.endColumnIndex + columnDelta,
|
|
403
|
+
};
|
|
404
|
+
});
|
|
405
|
+
};
|
|
406
|
+
/** Re-point the ranges of every chart when a cell block is moved (see `moveChartSpecRanges`). */
|
|
407
|
+
export const moveChartsOnRangeMove = (draft, fromSheetId, from, toSheetId, to) => {
|
|
408
|
+
for (const chart of draft) {
|
|
409
|
+
moveChartSpecRanges(chart.spec, fromSheetId, from, toSheetId, to);
|
|
410
|
+
}
|
|
411
|
+
};
|
|
412
|
+
/**
|
|
413
|
+
* Where line `index` (a row or column) ends up after the whole lines `lines`
|
|
414
|
+
* (sorted ascending) are moved so the block lands at `target` in the
|
|
415
|
+
* post-removal frame — the permutation a row/column move applies to every
|
|
416
|
+
* cell. A moved line lands at `target` + its rank in the block; a line outside
|
|
417
|
+
* closes the gap the block left and is pushed by the block landing at or
|
|
418
|
+
* before it. Mirrors `moved_line_index` in `rnc-store`.
|
|
419
|
+
*/
|
|
420
|
+
export const movedLineIndex = (lines, target, index) => {
|
|
421
|
+
const rank = lines.indexOf(index);
|
|
422
|
+
if (rank !== -1)
|
|
423
|
+
return target + rank;
|
|
424
|
+
let removedBefore = 0;
|
|
425
|
+
for (const line of lines) {
|
|
426
|
+
if (line < index)
|
|
427
|
+
removedBefore++;
|
|
428
|
+
}
|
|
429
|
+
const settled = index - removedBefore;
|
|
430
|
+
return settled < target ? settled : settled + lines.length;
|
|
431
|
+
};
|
|
432
|
+
/**
|
|
433
|
+
* Re-point the ranges inside a chart spec when whole rows / columns of
|
|
434
|
+
* `sheetId` are moved (`lines` land at `target`), with the rule the engines
|
|
435
|
+
* apply to formula references: both edges follow their line, and the range is
|
|
436
|
+
* rewritten only when that yields a range of the same size — so a range wholly
|
|
437
|
+
* inside the moved block relocates with it, one wholly inside the displaced
|
|
438
|
+
* band shifts by the block size, and one straddling the block and its
|
|
439
|
+
* neighbours keeps its text (it still covers the same cells). Mirrors
|
|
440
|
+
* `permute_spec_sheet_ranges` in `rnc-store` / `remap_formula_axis`.
|
|
441
|
+
*/
|
|
442
|
+
export const reorderChartSpecRanges = (spec, sheetId, axis, lines, target) => {
|
|
443
|
+
if (!lines.length)
|
|
444
|
+
return false;
|
|
445
|
+
const [startKey, endKey] = axis === "row"
|
|
446
|
+
? ["startRowIndex", "endRowIndex"]
|
|
447
|
+
: ["startColumnIndex", "endColumnIndex"];
|
|
448
|
+
return rewriteChartSpecRanges(spec, (range) => {
|
|
449
|
+
if (range.sheetId !== sheetId)
|
|
450
|
+
return range;
|
|
451
|
+
const start = range[startKey];
|
|
452
|
+
const end = range[endKey];
|
|
453
|
+
const nextStart = movedLineIndex(lines, target, start);
|
|
454
|
+
const nextEnd = movedLineIndex(lines, target, end);
|
|
455
|
+
if (nextEnd < nextStart ||
|
|
456
|
+
nextEnd - nextStart !== end - start ||
|
|
457
|
+
(nextStart === start && nextEnd === end)) {
|
|
458
|
+
return range;
|
|
459
|
+
}
|
|
460
|
+
return { ...range, [startKey]: nextStart, [endKey]: nextEnd };
|
|
461
|
+
});
|
|
462
|
+
};
|
|
463
|
+
/** Re-point the ranges of every chart when whole rows / columns are moved (see `reorderChartSpecRanges`). */
|
|
464
|
+
export const reorderChartsOnLineMove = (draft, sheetId, axis, lines, target) => {
|
|
465
|
+
for (const chart of draft) {
|
|
466
|
+
reorderChartSpecRanges(chart.spec, sheetId, axis, lines, target);
|
|
467
|
+
}
|
|
468
|
+
};
|
|
469
|
+
export const tableBinding = (table) => {
|
|
470
|
+
const { range } = table;
|
|
471
|
+
const bodyStartRowIndex = range.startRowIndex + (table.headerRow === false ? 0 : 1);
|
|
472
|
+
return {
|
|
473
|
+
range,
|
|
474
|
+
rowStarts: [range.startRowIndex, bodyStartRowIndex],
|
|
475
|
+
bodyEndRowIndex: range.endRowIndex - (table.totalRow ? 1 : 0),
|
|
476
|
+
};
|
|
477
|
+
};
|
|
478
|
+
/**
|
|
479
|
+
* A range bound to the table along `axis`: it covers the body rows (or header + body) of one or
|
|
480
|
+
* more table columns — for a column edit ALL of them, since a series is a column and only a range
|
|
481
|
+
* reading the whole table gains a column with it.
|
|
482
|
+
*/
|
|
483
|
+
const isTableBoundRange = (range, binding, axis) => binding.rowStarts.includes(range.startRowIndex) &&
|
|
484
|
+
range.endRowIndex === binding.bodyEndRowIndex &&
|
|
485
|
+
range.startColumnIndex >= binding.range.startColumnIndex &&
|
|
486
|
+
range.endColumnIndex <= binding.range.endColumnIndex &&
|
|
487
|
+
(axis === "row" ||
|
|
488
|
+
(range.startColumnIndex === binding.range.startColumnIndex &&
|
|
489
|
+
range.endColumnIndex === binding.range.endColumnIndex));
|
|
490
|
+
/** The table's extent across `axis` — the band a table-local edit moves cells in. */
|
|
491
|
+
const tableBand = (binding, axis) => axis === "row"
|
|
492
|
+
? {
|
|
493
|
+
startIndex: binding.range.startColumnIndex,
|
|
494
|
+
endIndex: binding.range.endColumnIndex,
|
|
495
|
+
}
|
|
496
|
+
: {
|
|
497
|
+
startIndex: binding.range.startRowIndex,
|
|
498
|
+
endIndex: binding.range.endRowIndex,
|
|
499
|
+
};
|
|
500
|
+
const growSpan = (range, axis, delta) => {
|
|
501
|
+
const [startKey, endKey] = axis === "row"
|
|
502
|
+
? ["startRowIndex", "endRowIndex"]
|
|
503
|
+
: ["startColumnIndex", "endColumnIndex"];
|
|
504
|
+
const end = range[endKey] + delta;
|
|
505
|
+
return end < range[startKey] ? null : { ...range, [endKey]: end };
|
|
506
|
+
};
|
|
507
|
+
/**
|
|
508
|
+
* Insert / delete table rows (or columns): the cells inside the table's columns (rows) at/after
|
|
509
|
+
* `index` move, so every chart range wholly inside that band follows the reference rule like
|
|
510
|
+
* insert/delete-cells — except a range bound to the table (`isTableBoundRange`), which grows /
|
|
511
|
+
* shrinks by `count` even when the rows are appended below the last body row (where the
|
|
512
|
+
* reference rule would leave it alone) or inserted above the first one (where it would shift):
|
|
513
|
+
* Excel keeps the series on the table column. A range that collapses is removed (`#REF!`).
|
|
514
|
+
* Mutates in place; returns whether anything changed. Mirrors
|
|
515
|
+
* `shift_spec_sheet_ranges_for_table_edit` in `rnc-store`.
|
|
516
|
+
*/
|
|
517
|
+
export const shiftChartSpecRangesOnTableEdit = (spec, sheetId, binding, axis, op, index, count) => {
|
|
518
|
+
const band = tableBand(binding, axis);
|
|
519
|
+
const [acrossStartKey, acrossEndKey] = axis === "row"
|
|
520
|
+
? ["startColumnIndex", "endColumnIndex"]
|
|
521
|
+
: ["startRowIndex", "endRowIndex"];
|
|
522
|
+
return rewriteChartSpecRanges(spec, (range) => {
|
|
523
|
+
if (range.sheetId !== sheetId ||
|
|
524
|
+
range[acrossStartKey] < band.startIndex ||
|
|
525
|
+
range[acrossEndKey] > band.endIndex) {
|
|
526
|
+
return range;
|
|
527
|
+
}
|
|
528
|
+
if (isTableBoundRange(range, binding, axis)) {
|
|
529
|
+
return growSpan(range, axis, op === "insert" ? count : -count);
|
|
530
|
+
}
|
|
531
|
+
return shiftGridRangeLikeReference(range, axis, op, index, count);
|
|
532
|
+
});
|
|
533
|
+
};
|
|
534
|
+
/**
|
|
535
|
+
* Table growth without a cell shift — the resize handle, typing below / to the right of the
|
|
536
|
+
* table: a range bound to the table (`isTableBoundRange`) grows / shrinks with its body by
|
|
537
|
+
* `rowDelta` rows, then by `columnDelta` columns against the row-grown table. Mutates in place;
|
|
538
|
+
* returns whether anything changed. Mirrors `grow_table_bound_spec_ranges` in `rnc-store`.
|
|
539
|
+
*/
|
|
540
|
+
export const growTableBoundChartSpecRanges = (spec, sheetId, binding, rowDelta, columnDelta) => {
|
|
541
|
+
if (rowDelta === 0 && columnDelta === 0)
|
|
542
|
+
return false;
|
|
543
|
+
const rowGrown = {
|
|
544
|
+
...binding,
|
|
545
|
+
range: { ...binding.range, endRowIndex: binding.range.endRowIndex + rowDelta },
|
|
546
|
+
bodyEndRowIndex: binding.bodyEndRowIndex + rowDelta,
|
|
547
|
+
};
|
|
548
|
+
return rewriteChartSpecRanges(spec, (range) => {
|
|
549
|
+
if (range.sheetId !== sheetId)
|
|
550
|
+
return range;
|
|
551
|
+
let next = range;
|
|
552
|
+
if (rowDelta !== 0 && isTableBoundRange(next, binding, "row")) {
|
|
553
|
+
next = growSpan(next, "row", rowDelta);
|
|
554
|
+
}
|
|
555
|
+
if (next && columnDelta !== 0 && isTableBoundRange(next, rowGrown, "column")) {
|
|
556
|
+
next = growSpan(next, "column", columnDelta);
|
|
557
|
+
}
|
|
558
|
+
return next;
|
|
559
|
+
});
|
|
560
|
+
};
|
|
561
|
+
/** Every chart's ranges follow a table-local row / column insert or delete (see `shiftChartSpecRangesOnTableEdit`). */
|
|
562
|
+
export const shiftChartsOnTableEdit = (draft, sheetId, binding, axis, op, index, count) => {
|
|
563
|
+
for (const chart of draft) {
|
|
564
|
+
shiftChartSpecRangesOnTableEdit(chart.spec, sheetId, binding, axis, op, index, count);
|
|
565
|
+
}
|
|
566
|
+
};
|
|
567
|
+
/** Every chart's table-bound ranges grow / shrink with a resized or auto-expanded table (see `growTableBoundChartSpecRanges`). */
|
|
568
|
+
export const growChartsWithTable = (draft, sheetId, binding, rowDelta, columnDelta) => {
|
|
569
|
+
for (const chart of draft) {
|
|
570
|
+
growTableBoundChartSpecRanges(chart.spec, sheetId, binding, rowDelta, columnDelta);
|
|
571
|
+
}
|
|
572
|
+
};
|
|
@@ -1,10 +1,16 @@
|
|
|
1
1
|
import type { CellInterface, GridRange } from "@rowsncolumns/common-types";
|
|
2
2
|
import type { CellData, EmbeddedObject, TableView } from "@rowsncolumns/spreadsheet";
|
|
3
|
-
import type { GeneratedNames } from "../generated-names";
|
|
4
3
|
import type { UseSpreadsheetProps } from "../hooks/use-spreadsheet-state";
|
|
5
4
|
export type ClipBoardFormat = "text/html" | "text/csv" | "text/plain" | "application/json" | "image/apng" | "image/bmp" | "image/gif" | "image/jpeg" | "image/pjpeg" | "image/png" | "image/svg+xml" | "image/tiff" | "image/webp" | "image/x-icon";
|
|
6
5
|
export declare const SUPPORTED_IMAGE_TYPES: string[];
|
|
7
|
-
export declare const generateDataFromClipboard: <T extends CellData>(e: ClipboardEvent | undefined, activeCell: CellInterface, sheetId: number, activeSheetName: string, preserveFormatting?: boolean, locale?: string, idCreationStrategy?: UseSpreadsheetProps<T>["idCreationStrategy"], forcePlainText?: boolean, sanitizeHtml?: (html: string) => string,
|
|
6
|
+
export declare const generateDataFromClipboard: <T extends CellData>(e: ClipboardEvent | undefined, activeCell: CellInterface, sheetId: number, activeSheetName: string, preserveFormatting?: boolean, locale?: string, idCreationStrategy?: UseSpreadsheetProps<T>["idCreationStrategy"], forcePlainText?: boolean, sanitizeHtml?: (html: string) => string, options?: {
|
|
7
|
+
/**
|
|
8
|
+
* Re-anchor each copied formula's relative refs from its `sourceCell` to the paste
|
|
9
|
+
* destination (a COPY). `false` for a CUT: Excel keeps a moved formula's text verbatim and
|
|
10
|
+
* only repoints references INTO the moved block, which the consumer does itself.
|
|
11
|
+
*/
|
|
12
|
+
relocateFormulas?: boolean;
|
|
13
|
+
}) => Promise<{
|
|
8
14
|
results?: (CellData | null | undefined)[][];
|
|
9
15
|
merges?: GridRange[];
|
|
10
16
|
embeds?: EmbeddedObject[];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"copy-paste.d.ts","sourceRoot":"","sources":["../../../api/copy-paste.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAEV,aAAa,EACb,SAAS,EACV,MAAM,4BAA4B,CAAC;AACpC,OAAO,KAAK,EACV,QAAQ,EACR,cAAc,EACd,SAAS,EAEV,MAAM,2BAA2B,CAAC;
|
|
1
|
+
{"version":3,"file":"copy-paste.d.ts","sourceRoot":"","sources":["../../../api/copy-paste.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAEV,aAAa,EACb,SAAS,EACV,MAAM,4BAA4B,CAAC;AACpC,OAAO,KAAK,EACV,QAAQ,EACR,cAAc,EACd,SAAS,EAEV,MAAM,2BAA2B,CAAC;AAcnC,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,gCAAgC,CAAC;AAW1E,MAAM,MAAM,eAAe,GACvB,WAAW,GACX,UAAU,GACV,YAAY,GACZ,kBAAkB,GAClB,YAAY,GACZ,WAAW,GACX,WAAW,GACX,YAAY,GACZ,aAAa,GACb,WAAW,GACX,eAAe,GACf,YAAY,GACZ,YAAY,GACZ,cAAc,CAAC;AAEnB,eAAO,MAAM,qBAAqB,UAWjC,CAAC;AAEF,eAAO,MAAM,yBAAyB,GAAU,CAAC,SAAS,QAAQ,EAChE,GAAG,cAAc,GAAG,SAAS,EAC7B,YAAY,aAAa,EACzB,SAAS,MAAM,EACf,iBAAiB,MAAM,EACvB,qBAAqB,OAAO,EAC5B,SAAS,MAAM,EACf,qBAAqB,mBAAmB,CAAC,CAAC,CAAC,CAAC,oBAAoB,CAAC,EACjE,iBAAiB,OAAO,EACxB,eAAe,CAAC,IAAI,EAAE,MAAM,KAAK,MAAM,EACvC,UAAU;IACR;;;;OAIG;IACH,gBAAgB,CAAC,EAAE,OAAO,CAAC;CAC5B,KACA,OAAO,CACN;IACE,OAAO,CAAC,EAAE,CAAC,QAAQ,GAAG,IAAI,GAAG,SAAS,CAAC,EAAE,EAAE,CAAC;IAC5C,MAAM,CAAC,EAAE,SAAS,EAAE,CAAC;IACrB,MAAM,CAAC,EAAE,cAAc,EAAE,CAAC;IAC1B,MAAM,CAAC,EAAE,SAAS,EAAE,CAAC;IACrB,UAAU,CAAC,EAAE,MAAM,EAAE,CAAC;IACtB,YAAY,CAAC,EAAE,MAAM,EAAE,CAAC;CACzB,GACD,SAAS,CAqQZ,CAAC;AAEF,wBAAgB,SAAS,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,EAAE,SAazC;AAED,wBAAgB,cAAc,CAAC,CAAC,SAAS,QAAQ,EAC/C,MAAM,EAAE,CAAC,QAAQ,GAAG,CAAC,GAAG,SAAS,GAAG,IAAI,CAAC,EAAE,EAAE,yCAwB9C;AAED,wBAAgB,SAAS,CAAC,CAAC,SAAS,QAAQ,EAC1C,MAAM,EAAE,CAAC,QAAQ,GAAG,CAAC,GAAG,SAAS,GAAG,IAAI,CAAC,EAAE,EAAE,EAC7C,OAAO,EAAE,MAAM,EACf,MAAM,CAAC,EAAE,MAAM,yCAkChB;AAED,wBAAgB,WAAW,CAAC,CAAC,SAAS,QAAQ,EAC5C,MAAM,EAAE,CAAC,QAAQ,GAAG,CAAC,GAAG,SAAS,GAAG,IAAI,CAAC,EAAE,EAAE,EAC7C,OAAO,EAAE,MAAM,EACf,MAAM,CAAC,EAAE,MAAM,yCAwBhB;AAED,eAAO,MAAM,iBAAiB,GAAI,CAAC,SAAS,QAAQ,GAAG,QAAQ,EAC7D,MAAM,CAAC,MAAM,GAAG,CAAC,GAAG,QAAQ,GAAG,SAAS,GAAG,IAAI,CAAC,EAAE,EAAE,KACnD,MAAM,EAmBR,CAAC"}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { createCellDataArrayFromCSVString, readImageFileAsDataUri, } from "@rowsncolumns/toolkit";
|
|
2
2
|
import { getCellEffectiveFormat, isAFormula, isNil, log, } from "@rowsncolumns/utils";
|
|
3
3
|
import { uuid } from "@rowsncolumns/utils";
|
|
4
|
-
import { getGeneratedTableCopyName } from "../generated-names";
|
|
5
4
|
import { defaultCellCoords, defaultSheetId, isStyleReference, SheetCell, } from "../sheet-cell";
|
|
6
5
|
import { isRichSharedString } from "../types";
|
|
7
6
|
import { isBoolean, isValidURLorEmail } from "./datatype";
|
|
@@ -18,7 +17,7 @@ export const SUPPORTED_IMAGE_TYPES = [
|
|
|
18
17
|
"image/webp",
|
|
19
18
|
"image/x-icon",
|
|
20
19
|
];
|
|
21
|
-
export const generateDataFromClipboard = async (e, activeCell, sheetId, activeSheetName, preserveFormatting, locale, idCreationStrategy, forcePlainText, sanitizeHtml,
|
|
20
|
+
export const generateDataFromClipboard = async (e, activeCell, sheetId, activeSheetName, preserveFormatting, locale, idCreationStrategy, forcePlainText, sanitizeHtml, options) => {
|
|
22
21
|
const items = e?.clipboardData?.items;
|
|
23
22
|
const files = e?.clipboardData?.files;
|
|
24
23
|
const formatOrder = [
|
|
@@ -84,7 +83,6 @@ export const generateDataFromClipboard = async (e, activeCell, sheetId, activeSh
|
|
|
84
83
|
const rowSpan = table.range.endRowIndex - table.range.startRowIndex;
|
|
85
84
|
const colSpan = table.range.endColumnIndex - table.range.startColumnIndex;
|
|
86
85
|
table.id = idCreationStrategy?.("table") ?? uuid();
|
|
87
|
-
table.title = getGeneratedTableCopyName(table.title, generatedNames);
|
|
88
86
|
// Update sheet id
|
|
89
87
|
table.sheetId = sheetId;
|
|
90
88
|
table.range.startRowIndex = activeCell.rowIndex + rowDelta;
|
|
@@ -150,7 +148,9 @@ export const generateDataFromClipboard = async (e, activeCell, sheetId, activeSh
|
|
|
150
148
|
// Delete structured
|
|
151
149
|
delete data?.ev?.structuredValue;
|
|
152
150
|
// Move formulas if source cell is present
|
|
153
|
-
if (data?.ue?.fv &&
|
|
151
|
+
if (data?.ue?.fv &&
|
|
152
|
+
sourceCell &&
|
|
153
|
+
options?.relocateFormulas !== false) {
|
|
154
154
|
const destinationCell = {
|
|
155
155
|
rowIndex: activeCell.rowIndex + i,
|
|
156
156
|
columnIndex: activeCell.columnIndex + j,
|
package/dist/esm/api/filter.d.ts
CHANGED
|
@@ -1,10 +1,24 @@
|
|
|
1
|
-
import type { ColorFilterCriteria, ConditionType, ConditionValue, FilterSpec, IconFilterCriteria } from "@rowsncolumns/spreadsheet";
|
|
1
|
+
import type { BooleanCondition, ColorFilterCriteria, ConditionType, ConditionValue, FilterConditionJoin, FilterCriteria, FilterSpec, IconFilterCriteria } from "@rowsncolumns/spreadsheet";
|
|
2
2
|
export type CreateFilterSpecsExtras = {
|
|
3
3
|
/** Pass `null` to clear an existing color filter on this column. */
|
|
4
4
|
colorFilter?: ColorFilterCriteria | null;
|
|
5
5
|
/** Pass `null` to clear an existing icon filter on this column. */
|
|
6
6
|
iconFilter?: IconFilterCriteria | null;
|
|
7
|
+
/**
|
|
8
|
+
* Custom AutoFilter second clause + join (Excel's And / Or). Pass `null`
|
|
9
|
+
* to drop an existing second clause; omit to preserve it.
|
|
10
|
+
*/
|
|
11
|
+
condition2?: BooleanCondition | null;
|
|
12
|
+
conditionJoin?: FilterConditionJoin | null;
|
|
7
13
|
};
|
|
14
|
+
/**
|
|
15
|
+
* Whether a column's criteria still filter anything. An entry with no
|
|
16
|
+
* condition, no value whitelist and no color / icon criterion is inert, so
|
|
17
|
+
* `createFilterSpecs` drops it — Excel's "Clear Filter From <column>" —
|
|
18
|
+
* instead of leaving a stale spec behind (the rnc engine's
|
|
19
|
+
* `upsert_filter_spec` removes such entries the same way).
|
|
20
|
+
*/
|
|
21
|
+
export declare const isFilterCriteriaActive: (criteria: FilterCriteria) => boolean;
|
|
8
22
|
/**
|
|
9
23
|
* Create a new filterspec
|
|
10
24
|
* @param filterSpecs
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"filter.d.ts","sourceRoot":"","sources":["../../../api/filter.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,mBAAmB,EACnB,aAAa,EACb,cAAc,EACd,UAAU,EACV,kBAAkB,EACnB,MAAM,2BAA2B,CAAC;AAEnC,MAAM,MAAM,uBAAuB,GAAG;IACpC,oEAAoE;IACpE,WAAW,CAAC,EAAE,mBAAmB,GAAG,IAAI,CAAC;IACzC,mEAAmE;IACnE,UAAU,CAAC,EAAE,kBAAkB,GAAG,IAAI,CAAC;
|
|
1
|
+
{"version":3,"file":"filter.d.ts","sourceRoot":"","sources":["../../../api/filter.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,gBAAgB,EAChB,mBAAmB,EACnB,aAAa,EACb,cAAc,EACd,mBAAmB,EACnB,cAAc,EACd,UAAU,EACV,kBAAkB,EACnB,MAAM,2BAA2B,CAAC;AAEnC,MAAM,MAAM,uBAAuB,GAAG;IACpC,oEAAoE;IACpE,WAAW,CAAC,EAAE,mBAAmB,GAAG,IAAI,CAAC;IACzC,mEAAmE;IACnE,UAAU,CAAC,EAAE,kBAAkB,GAAG,IAAI,CAAC;IACvC;;;OAGG;IACH,UAAU,CAAC,EAAE,gBAAgB,GAAG,IAAI,CAAC;IACrC,aAAa,CAAC,EAAE,mBAAmB,GAAG,IAAI,CAAC;CAC5C,CAAC;AAEF;;;;;;GAMG;AACH,eAAO,MAAM,sBAAsB,GAAI,UAAU,cAAc,KAAG,OAO/D,CAAC;AAEJ;;;;;;;;GAQG;AACH,eAAO,MAAM,iBAAiB,GAC5B,aAAa,UAAU,EAAE,GAAG,SAAS,EACrC,aAAa,MAAM,EACnB,eAAe,aAAa,GAAG,SAAS,EACxC,iBAAiB,cAAc,EAAE,GAAG,SAAS,EAC7C,eAAe,MAAM,EAAE,GAAG,SAAS,GAAG,IAAI,EAC1C,SAAQ,uBAA4B,KACnC,UAAU,EAuDZ,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,8BAA8B,GACzC,cAAa,UAAU,EAAO,+BAO/B,CAAC"}
|
package/dist/esm/api/filter.js
CHANGED
|
@@ -1,3 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Whether a column's criteria still filter anything. An entry with no
|
|
3
|
+
* condition, no value whitelist and no color / icon criterion is inert, so
|
|
4
|
+
* `createFilterSpecs` drops it — Excel's "Clear Filter From <column>" —
|
|
5
|
+
* instead of leaving a stale spec behind (the rnc engine's
|
|
6
|
+
* `upsert_filter_spec` removes such entries the same way).
|
|
7
|
+
*/
|
|
8
|
+
export const isFilterCriteriaActive = (criteria) => Boolean(criteria.condition?.type ||
|
|
9
|
+
criteria.condition2?.type ||
|
|
10
|
+
criteria.visibleValues?.length ||
|
|
11
|
+
criteria.colorFilter ||
|
|
12
|
+
criteria.iconFilter);
|
|
1
13
|
/**
|
|
2
14
|
* Create a new filterspec
|
|
3
15
|
* @param filterSpecs
|
|
@@ -31,8 +43,24 @@ export const createFilterSpecs = (filterSpecs, columnIndex, conditionType, condi
|
|
|
31
43
|
: exists?.filterCriteria.iconFilter
|
|
32
44
|
? { iconFilter: exists.filterCriteria.iconFilter }
|
|
33
45
|
: {}),
|
|
46
|
+
...(extras.condition2 !== undefined
|
|
47
|
+
? extras.condition2
|
|
48
|
+
? {
|
|
49
|
+
condition2: extras.condition2,
|
|
50
|
+
conditionJoin: extras.conditionJoin ?? "AND",
|
|
51
|
+
}
|
|
52
|
+
: {}
|
|
53
|
+
: exists?.filterCriteria.condition2
|
|
54
|
+
? {
|
|
55
|
+
condition2: exists.filterCriteria.condition2,
|
|
56
|
+
conditionJoin: exists.filterCriteria.conditionJoin ?? "AND",
|
|
57
|
+
}
|
|
58
|
+
: {}),
|
|
34
59
|
},
|
|
35
60
|
};
|
|
61
|
+
if (!isFilterCriteriaActive(filterSpec.filterCriteria)) {
|
|
62
|
+
return (filterSpecs ?? []).filter((spec) => spec.columnIndex !== columnIndex);
|
|
63
|
+
}
|
|
36
64
|
if (exists && filterSpecs) {
|
|
37
65
|
return filterSpecs.map((spec) => {
|
|
38
66
|
if (spec.columnIndex === columnIndex) {
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { GridRange } from "@rowsncolumns/common-types";
|
|
1
2
|
import type { ParsedToken } from "@rowsncolumns/spreadsheet";
|
|
2
3
|
export { ERROR_CIRCULAR_DEPENDENCY, ERROR_REFERENCE, formulaToRelativeReference, } from "@rowsncolumns/calculator";
|
|
3
4
|
export type { FormulaToRelativeReferenceOptions } from "@rowsncolumns/calculator";
|
|
@@ -39,6 +40,68 @@ export declare const breakTableReferencesInFormula: (formulaValue: string, table
|
|
|
39
40
|
* `=Table1[@#REF!]*2`). Keeps every other character of the reference as typed.
|
|
40
41
|
*/
|
|
41
42
|
export declare const breakTableColumnsInFormula: (formulaValue: string, tableName: string | undefined, columnNames: string[]) => string;
|
|
43
|
+
/**
|
|
44
|
+
* Rename the column `oldName` → `newName` inside the structured references to
|
|
45
|
+
* `tableName` (or, when `tableName` is undefined, the bare this-row form
|
|
46
|
+
* `[@Col]` whose table is implied by the formula's own cell): `Table1[Qty]`,
|
|
47
|
+
* `[@Qty]`, `Table1[[#Headers],[Qty]]` and `Table1[[Qty]:[Price]]` all follow
|
|
48
|
+
* a header-cell edit in Excel. Column names compare case-insensitively; every
|
|
49
|
+
* other character of the reference is kept as typed.
|
|
50
|
+
*/
|
|
51
|
+
export declare const renameTableColumnInFormula: (formulaValue: string, tableName: string | undefined, oldName: string, newName: string) => string;
|
|
52
|
+
/**
|
|
53
|
+
* Rename several columns of `tableName` at once — `renames` maps each
|
|
54
|
+
* LOWER-CASED old name to its new name. One pass over the formula, so
|
|
55
|
+
* `Name` → `Qty` and `Qty` → `Name` swap instead of chaining into the same
|
|
56
|
+
* column (a header row re-derived after a row delete, or several header cells
|
|
57
|
+
* written by one paste / change-batch).
|
|
58
|
+
*/
|
|
59
|
+
export declare const renameTableColumnsInFormula: (formulaValue: string, tableName: string | undefined, renames: ReadonlyMap<string, string>) => string;
|
|
60
|
+
/**
|
|
61
|
+
* Rename the table `oldName` → `newName` in every structured reference
|
|
62
|
+
* (`Old[Col]`, `Old[@Col]`, `Old[[#Headers],[Col]]`, `Old[#All]`) — Excel
|
|
63
|
+
* rewrites them all when a table is renamed. Table names compare
|
|
64
|
+
* case-insensitively; the bare `[@Col]` form names no table and is left alone.
|
|
65
|
+
*/
|
|
66
|
+
export declare const renameTableInFormula: (formulaValue: string, oldName: string, newName: string) => string;
|
|
67
|
+
/**
|
|
68
|
+
* Rename several tables at once — `renames` maps each LOWER-CASED old name to
|
|
69
|
+
* its new name. One pass, so `Sales` → `Sales2` and `Sales2` → `Sales3` never
|
|
70
|
+
* chain (a sheet duplicated with both tables re-points each reference exactly
|
|
71
|
+
* once).
|
|
72
|
+
*/
|
|
73
|
+
export declare const renameTablesInFormula: (formulaValue: string, renames: ReadonlyMap<string, string>) => string;
|
|
74
|
+
/** The table geometry a structured reference resolves against — the `TableView` fields that matter. */
|
|
75
|
+
export type StructuredRefTable = {
|
|
76
|
+
title: string;
|
|
77
|
+
range: GridRange;
|
|
78
|
+
headerRow?: boolean | null;
|
|
79
|
+
totalRow?: boolean | null;
|
|
80
|
+
/** Column names in header order. */
|
|
81
|
+
columnNames: string[];
|
|
82
|
+
};
|
|
83
|
+
export type ConvertStructuredRefsOptions = {
|
|
84
|
+
/** Name of the sheet the table lives on. */
|
|
85
|
+
tableSheetName: string;
|
|
86
|
+
/** Name of the sheet the formula cell lives on — the reference is sheet-qualified when it differs. */
|
|
87
|
+
formulaSheetName: string;
|
|
88
|
+
/** Row of the formula cell: what a this-row item (`[@Col]`) resolves to. */
|
|
89
|
+
formulaRowIndex: number;
|
|
90
|
+
/** Whether the formula cell sits inside the table, which the bare `[@Col]` / `[Col]` forms name. */
|
|
91
|
+
inTable: boolean;
|
|
92
|
+
};
|
|
93
|
+
/**
|
|
94
|
+
* Rewrite every structured reference into `table` — `T[Col]`, `T[[#Headers],[Col]]`, `T[#All]`,
|
|
95
|
+
* `T[[A]:[B]]`, `T[@Col]`, `T[[#This Row],[Col]]` and, inside the table, the bare `[@Col]` /
|
|
96
|
+
* `[Col]` forms — to the plain A1 reference it resolves to, the way Excel's Convert to Range
|
|
97
|
+
* rewrites formulas so their values keep working once the table is gone. Column, header, totals
|
|
98
|
+
* and whole-table items become absolute (`$B$2:$B$9`, `$B$1`), this-row items the relative
|
|
99
|
+
* same-row reference (`B3`), and the reference is qualified with the table's sheet when the
|
|
100
|
+
* formula lives on another one. A reference that cannot resolve (an unknown column, `#Headers`
|
|
101
|
+
* on a headerless table, `@` outside the table's data rows) becomes the `#REF!` it would have
|
|
102
|
+
* evaluated to. Returns the input unchanged when the formula never references the table.
|
|
103
|
+
*/
|
|
104
|
+
export declare const convertStructuredRefsToA1InFormula: (formulaValue: string, table: StructuredRefTable, options: ConvertStructuredRefsOptions) => string;
|
|
42
105
|
/**
|
|
43
106
|
* Converts tokens to string
|
|
44
107
|
* @param tokens
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"formula.d.ts","sourceRoot":"","sources":["../../../api/formula.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"formula.d.ts","sourceRoot":"","sources":["../../../api/formula.ts"],"names":[],"mappings":"AAUA,OAAO,KAAK,EAAiB,SAAS,EAAE,MAAM,4BAA4B,CAAC;AAC3E,OAAO,KAAK,EAAE,WAAW,EAAS,MAAM,2BAA2B,CAAC;AAUpE,OAAO,EACL,yBAAyB,EACzB,eAAe,EACf,0BAA0B,GAC3B,MAAM,0BAA0B,CAAC;AAClC,YAAY,EAAE,iCAAiC,EAAE,MAAM,0BAA0B,CAAC;AAElF;;;;;GAKG;AACH,eAAO,MAAM,eAAe,GAC1B,cAAc,MAAM,EACpB,SAAS,MAAM,EACf,SAAS,MAAM,WA4BhB,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,oBAAoB,GAC/B,cAAc,MAAM,EACpB,SAAS,MAAM,EACf,SAAS,MAAM,WAehB,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,gBAAgB,GAC3B,cAAc,MAAM,EACpB,SAAS,MAAM,EACf,SAAS,MAAM,WAYhB,CAAC;AAEF,uFAAuF;AACvF,eAAO,MAAM,gBAAgB,UAAU,CAAC;AAgDxC;;;;;GAKG;AACH,eAAO,MAAM,6BAA6B,GACxC,cAAc,MAAM,EACpB,WAAW,MAAM,KAChB,MA4BF,CAAC;AAEF;;;;;;GAMG;AACH,eAAO,MAAM,0BAA0B,GACrC,cAAc,MAAM,EACpB,WAAW,MAAM,GAAG,SAAS,EAC7B,aAAa,MAAM,EAAE,KACpB,MAMA,CAAC;AAEJ;;;;;;;GAOG;AACH,eAAO,MAAM,0BAA0B,GACrC,cAAc,MAAM,EACpB,WAAW,MAAM,GAAG,SAAS,EAC7B,SAAS,MAAM,EACf,SAAS,MAAM,KACd,MAOe,CAAC;AAEnB;;;;;;GAMG;AACH,eAAO,MAAM,2BAA2B,GACtC,cAAc,MAAM,EACpB,WAAW,MAAM,GAAG,SAAS,EAC7B,SAAS,WAAW,CAAC,MAAM,EAAE,MAAM,CAAC,KACnC,MAGA,CAAC;AAEJ;;;;;GAKG;AACH,eAAO,MAAM,oBAAoB,GAC/B,cAAc,MAAM,EACpB,SAAS,MAAM,EACf,SAAS,MAAM,KACd,MAQF,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,qBAAqB,GAChC,cAAc,MAAM,EACpB,SAAS,WAAW,CAAC,MAAM,EAAE,MAAM,CAAC,KACnC,MAiBF,CAAC;AA6EF,uGAAuG;AACvG,MAAM,MAAM,kBAAkB,GAAG;IAC/B,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,SAAS,CAAC;IACjB,SAAS,CAAC,EAAE,OAAO,GAAG,IAAI,CAAC;IAC3B,QAAQ,CAAC,EAAE,OAAO,GAAG,IAAI,CAAC;IAC1B,oCAAoC;IACpC,WAAW,EAAE,MAAM,EAAE,CAAC;CACvB,CAAC;AAEF,MAAM,MAAM,4BAA4B,GAAG;IACzC,4CAA4C;IAC5C,cAAc,EAAE,MAAM,CAAC;IACvB,sGAAsG;IACtG,gBAAgB,EAAE,MAAM,CAAC;IACzB,4EAA4E;IAC5E,eAAe,EAAE,MAAM,CAAC;IACxB,oGAAoG;IACpG,OAAO,EAAE,OAAO,CAAC;CAClB,CAAC;AAEF;;;;;;;;;;GAUG;AACH,eAAO,MAAM,kCAAkC,GAC7C,cAAc,MAAM,EACpB,OAAO,kBAAkB,EACzB,SAAS,4BAA4B,KACpC,MAkDF,CAAC;AA2HF;;;GAGG;AACH,eAAO,MAAM,UAAU,GAAI,QAAQ,WAAW,EAAE,WAU/C,CAAC;AAiBF;;;;;GAKG;AACH,eAAO,MAAM,yBAAyB,GACpC,SAAS,MAAM,EACf,UAAU,MAAM,EAChB,aAAa,MAAM,WAGpB,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,yBAAyB,GAAI,SAAS,MAAM,GAAG,SAAS,YAGpE,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,sBAAsB,GAAI,SAAS,MAAM,GAAG,SAAS,YAGjE,CAAC;AAEF,MAAM,MAAM,6BAA6B,GAAG;IAC1C;;;;;OAKG;IACH,4BAA4B,CAAC,EAAE,OAAO,CAAC;IACvC;;;;;;OAMG;IACH,QAAQ,CAAC,EAAE,aAAa,CAAC;CAC1B,CAAC;AAEF,4EAA4E;AAC5E,MAAM,MAAM,6BAA6B,GAAG,6BAA6B,CAAC;AAE1E;;;;;GAKG;AACH,MAAM,MAAM,aAAa,GAAG;IAAE,UAAU,EAAE,MAAM,CAAC;IAAC,QAAQ,EAAE,MAAM,CAAA;CAAE,CAAC;AAmBrE;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,qBAAqB,GAChC,SAAS,MAAM,GAAG,SAAS,EAC3B,gBAAgB,MAAM,EACtB,OAAO,MAAM,EACb,WAAW,KAAK,GAAG,QAAQ,EAC3B,iBAAiB,MAAM,EACvB,UAAS,6BAAkC,KAC1C,MAAM,GAAG,SAyKX,CAAC;AAEF;;;;;;;;;;;;;;;GAeG;AACH,eAAO,MAAM,uBAAuB,GAClC,SAAS,MAAM,GAAG,SAAS,EAC3B,eAAe,MAAM,EACrB,OAAO,MAAM,EACb,WAAW,KAAK,GAAG,QAAQ,EAC3B,iBAAiB,MAAM,EACvB,UAAS,6BAAkC,KAC1C,MAAM,GAAG,SAkPX,CAAC"}
|