@svgrid/enterprise 3.0.0 → 3.0.2
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/README.md +95 -95
- package/dist/ExpressionEditorHarness.svelte.d.ts +2 -2
- package/dist/SvAdvancedFilter.svelte.d.ts +2 -2
- package/dist/SvAlertRuleEditor.svelte.d.ts +2 -2
- package/dist/SvAlertsManager.svelte.d.ts +3 -3
- package/dist/SvAlertsPanel.svelte.d.ts +1 -1
- package/dist/SvAuthGate.svelte +115 -115
- package/dist/SvAuthGate.svelte.d.ts +1 -1
- package/dist/SvBoard.svelte.d.ts +1 -1
- package/dist/SvExportMenu.svelte +553 -553
- package/dist/SvExportMenu.svelte.d.ts +2 -2
- package/dist/SvExpressionEditor.svelte.d.ts +2 -2
- package/dist/SvFileInput.svelte +113 -113
- package/dist/SvFormulaBar.svelte +606 -0
- package/dist/SvFormulaBar.svelte.d.ts +62 -0
- package/dist/SvGridAlerts.svelte.d.ts +2 -2
- package/dist/SvGridBoard.svelte +2358 -2358
- package/dist/SvGridBulkEditDrawer.svelte.d.ts +1 -1
- package/dist/SvGridEditPanel.svelte +1157 -1157
- package/dist/SvGridEditPanel.svelte.d.ts +3 -3
- package/dist/SvGridMasterDetail.svelte +116 -116
- package/dist/SvGridMasterDetail.svelte.d.ts +1 -1
- package/dist/SvGridScheduler.svelte +5358 -5358
- package/dist/SvImportDialog.svelte +1020 -1020
- package/dist/SvImportDialog.svelte.d.ts +2 -2
- package/dist/SvLookupInput.svelte +180 -180
- package/dist/SvLookupInput.svelte.d.ts +1 -1
- package/dist/SvPivotDesigner.svelte +2041 -1990
- package/dist/SvPivotDesigner.svelte.d.ts +2 -2
- package/dist/SvRecordDetail.svelte.d.ts +1 -1
- package/dist/SvRibbonIcon.svelte +46 -0
- package/dist/SvRibbonIcon.svelte.d.ts +17 -0
- package/dist/SvSchedule.svelte.d.ts +1 -1
- package/dist/SvSchemaChart.svelte +236 -234
- package/dist/SvSchemaChart.svelte.d.ts +2 -2
- package/dist/SvSchemaDashboard.svelte +130 -130
- package/dist/SvSchemaDashboard.svelte.d.ts +3 -3
- package/dist/SvSheet.svelte +4114 -0
- package/dist/SvSheet.svelte.d.ts +142 -0
- package/dist/SvSheetComment.svelte +98 -0
- package/dist/SvSheetComment.svelte.d.ts +22 -0
- package/dist/SvSheetConditionalFormat.svelte +162 -0
- package/dist/SvSheetConditionalFormat.svelte.d.ts +14 -0
- package/dist/SvSheetDataValidation.svelte +249 -0
- package/dist/SvSheetDataValidation.svelte.d.ts +14 -0
- package/dist/SvSheetFilterMenu.svelte +217 -0
- package/dist/SvSheetFilterMenu.svelte.d.ts +17 -0
- package/dist/SvSheetFindReplace.svelte +132 -0
- package/dist/SvSheetFindReplace.svelte.d.ts +10 -0
- package/dist/SvSheetFormatCells.svelte +421 -0
- package/dist/SvSheetFormatCells.svelte.d.ts +17 -0
- package/dist/SvSheetGoalSeek.svelte +144 -0
- package/dist/SvSheetGoalSeek.svelte.d.ts +12 -0
- package/dist/SvSheetInsertFunction.svelte +147 -0
- package/dist/SvSheetInsertFunction.svelte.d.ts +8 -0
- package/dist/SvSheetListPicker.svelte +89 -0
- package/dist/SvSheetListPicker.svelte.d.ts +16 -0
- package/dist/SvSheetManageRules.svelte +185 -0
- package/dist/SvSheetManageRules.svelte.d.ts +16 -0
- package/dist/SvSheetNameManager.svelte +225 -0
- package/dist/SvSheetNameManager.svelte.d.ts +11 -0
- package/dist/SvSheetPasteSpecial.svelte +105 -0
- package/dist/SvSheetPasteSpecial.svelte.d.ts +12 -0
- package/dist/SvSheetRemoveDuplicates.svelte +149 -0
- package/dist/SvSheetRemoveDuplicates.svelte.d.ts +12 -0
- package/dist/SvSheetRibbon.svelte +1201 -0
- package/dist/SvSheetRibbon.svelte.d.ts +34 -0
- package/dist/SvSheetSizeDialog.svelte +58 -0
- package/dist/SvSheetSizeDialog.svelte.d.ts +11 -0
- package/dist/SvSheetTabs.svelte +441 -0
- package/dist/SvSheetTabs.svelte.d.ts +36 -0
- package/dist/SvSheetTabs.test-harness.svelte.d.ts +17 -0
- package/dist/SvSheetTabs.test-harness.svelte.js +22 -0
- package/dist/SvSheetTextToColumns.svelte +172 -0
- package/dist/SvSheetTextToColumns.svelte.d.ts +13 -0
- package/dist/SvSheetValidationAlert.svelte +83 -0
- package/dist/SvSheetValidationAlert.svelte.d.ts +15 -0
- package/dist/advanced-filter/expr-columns-from-grid.d.ts +1 -1
- package/dist/advanced-filter-enable.js +3 -3
- package/dist/alerts/alert-engine-attach.d.ts +2 -2
- package/dist/alerts/alert-engine-attach.js +3 -3
- package/dist/alerts/alert-engine.d.ts +1 -1
- package/dist/alerts/alert-engine.js +2 -2
- package/dist/alerts/alert-formats.d.ts +1 -1
- package/dist/alerts/alert-formats.js +1 -1
- package/dist/alerts/alert-observer.d.ts +3 -3
- package/dist/alerts/alert-observer.js +1 -1
- package/dist/alerts/alert-storage.d.ts +1 -1
- package/dist/alerts/alert-store.svelte.d.ts +1 -1
- package/dist/alerts/alert-types.d.ts +2 -2
- package/dist/alerts.js +2 -2
- package/dist/board.js +2 -2
- package/dist/cdn/svgrid-enterprise.svelte-external.js +19046 -5428
- package/dist/designer/assets/GridMenus-BlsvL_aU.js +8 -0
- package/dist/designer/assets/SvChartMenu-BYO9cYdy.css +1 -0
- package/dist/designer/assets/SvChartMenu-D9hEeHar.js +1 -0
- package/dist/designer/assets/SvDateRangeInput-BBRzrQeg.js +1 -0
- package/dist/designer/assets/SvDateRangeInput-C0iCCZ8o.css +1 -0
- package/dist/designer/assets/SvDateTimePicker-DARvKUL2.js +1 -0
- package/dist/designer/assets/SvDateTimePicker-DPv09DIT.css +1 -0
- package/dist/designer/assets/{preload-helper-CG0n22O7.js → SvGrid.helpers-BgT-gnCo.js} +1 -1
- package/dist/designer/assets/SvGridCellEditor-C7uQXYds.js +4 -0
- package/dist/designer/assets/SvGridChart-B8j1SSy3.js +3 -0
- package/dist/designer/assets/SvGridChart-BgLuPO7I.css +1 -0
- package/dist/designer/assets/SvGridChartBuilder-08YWWeqY.css +1 -0
- package/dist/designer/assets/SvGridChartBuilder-kvyIU_Rl.js +1 -0
- package/dist/designer/assets/SvGridChartPanel-4Pc8y5yO.css +1 -0
- package/dist/designer/assets/SvGridChartPanel-pT6ITc2P.js +4 -0
- package/dist/designer/assets/SvGridChartView-7msfnWZT.css +1 -0
- package/dist/designer/assets/SvGridChartView-bg281UA1.js +1 -0
- package/dist/designer/assets/SvGridDropdown-Bb3HH2Aj.js +1 -0
- package/dist/designer/assets/SvGridDropdown-CcidB3rm.css +1 -0
- package/dist/designer/assets/SvListBox-BDS66lmZ.js +110 -0
- package/dist/designer/assets/SvListBox-BXfyqy4a.css +1 -0
- package/dist/designer/assets/SvMenuList-DJ47ba1h.css +1 -0
- package/dist/designer/assets/SvMenuList-Dgq2D5VN.js +1 -0
- package/dist/designer/assets/SvTabs-DKmwb5p1.css +1 -0
- package/dist/designer/assets/SvTabs-UFCMTHXS.js +1 -0
- package/dist/designer/assets/cell-formatting-wr5wm7US.js +1 -0
- package/dist/designer/assets/chart-cIPUsbM5.js +1 -0
- package/dist/designer/assets/chart-export-B6bkQ3X8.js +11 -0
- package/dist/designer/assets/chart-export-pdf-BbA28-gt.js +11 -0
- package/dist/designer/assets/chart-panel-messages-DtTxpBUU.js +1 -0
- package/dist/designer/assets/chart-summary-Czu_5epb.js +1 -0
- package/dist/designer/assets/chart-trend-D5I5VEe8.js +1 -0
- package/dist/designer/assets/chart-validate-BMqM-qkF.js +1 -0
- package/dist/designer/assets/column-resize-BYDzR1Ve.js +1 -0
- package/dist/designer/assets/date-format-B8JbEtIG.js +1 -0
- package/dist/designer/assets/date-format-DKS-z0xS.css +1 -0
- package/dist/designer/assets/editor-contract-Bpoa7A5g.js +1 -0
- package/dist/designer/assets/export-format-D-eP4b2l.js +6 -0
- package/dist/designer/assets/focus-trap-CAreAhlU.js +1 -0
- package/dist/designer/assets/index-CMFgAoVV.css +1 -0
- package/dist/designer/assets/{index-zUBix-JQ.js → index-DwU7CAMm.js} +2985 -141
- package/dist/designer/assets/list-option-BP_dWS66.js +1 -0
- package/dist/designer/assets/preload-helper-HclGiUj8.js +1 -0
- package/dist/designer/assets/row-resize-DLktcqUK.js +1 -0
- package/dist/designer/assets/src-CITpcm6b.js +1 -0
- package/dist/designer/assets/src-EdI3Xqds.js +58 -0
- package/dist/designer/index.html +32 -23
- package/dist/export-conditional.d.ts +1 -1
- package/dist/export-pdf.d.ts +89 -0
- package/dist/export-pdf.js +130 -0
- package/dist/export-print.js +19 -19
- package/dist/export-xls.d.ts +2 -2
- package/dist/export.d.ts +2 -2
- package/dist/export.js +23 -16
- package/dist/expressions/builder-tree.d.ts +2 -2
- package/dist/expressions/builder-tree.js +1 -1
- package/dist/expressions/compile.d.ts +1 -1
- package/dist/import.js +1 -1
- package/dist/index.d.ts +116 -53
- package/dist/index.js +117 -50
- package/dist/install.d.ts +4 -4
- package/dist/install.js +16 -11
- package/dist/license.d.ts +3 -2
- package/dist/license.js +9 -4
- package/dist/node/studio.js +187 -116
- package/dist/pivot-chart.d.ts +26 -2
- package/dist/pivot-chart.js +25 -69
- package/dist/pivot-designer.d.ts +1 -1
- package/dist/pivot-enable.js +3 -3
- package/dist/print.d.ts +1 -1
- package/dist/print.js +4 -4
- package/dist/scheduler-config.d.ts +5 -5
- package/dist/scheduler-freebusy.d.ts +1 -1
- package/dist/scheduler-freebusy.js +1 -1
- package/dist/scheduler.js +2 -2
- package/dist/schema-designer.d.ts +1 -1
- package/dist/schema-designer.js +2 -2
- package/dist/selection-bar.js +2 -2
- package/dist/sheet/address.d.ts +43 -0
- package/dist/sheet/address.js +81 -0
- package/dist/sheet/ast.d.ts +94 -0
- package/dist/sheet/ast.js +56 -0
- package/dist/sheet/auto-filter.d.ts +66 -0
- package/dist/sheet/auto-filter.js +147 -0
- package/dist/sheet/autocomplete.d.ts +42 -0
- package/dist/sheet/autocomplete.js +162 -0
- package/dist/sheet/coerce.d.ts +31 -0
- package/dist/sheet/coerce.js +122 -0
- package/dist/sheet/commands.d.ts +89 -0
- package/dist/sheet/commands.js +230 -0
- package/dist/sheet/comments.d.ts +29 -0
- package/dist/sheet/comments.js +73 -0
- package/dist/sheet/conditional-formats.d.ts +144 -0
- package/dist/sheet/conditional-formats.js +316 -0
- package/dist/sheet/deps.d.ts +60 -0
- package/dist/sheet/deps.js +199 -0
- package/dist/sheet/document.d.ts +150 -0
- package/dist/sheet/document.js +264 -0
- package/dist/sheet/edit-keys.d.ts +14 -0
- package/dist/sheet/edit-keys.js +40 -0
- package/dist/sheet/entry.d.ts +31 -0
- package/dist/sheet/entry.js +76 -0
- package/dist/sheet/evaluate.d.ts +61 -0
- package/dist/sheet/evaluate.js +337 -0
- package/dist/sheet/find-replace.d.ts +62 -0
- package/dist/sheet/find-replace.js +152 -0
- package/dist/sheet/format-store.d.ts +99 -0
- package/dist/sheet/format-store.js +233 -0
- package/dist/sheet/freeze.d.ts +54 -0
- package/dist/sheet/freeze.js +58 -0
- package/dist/sheet/function-catalog.d.ts +10 -0
- package/dist/sheet/function-catalog.js +94 -0
- package/dist/sheet/functions.d.ts +28 -0
- package/dist/sheet/functions.js +362 -0
- package/dist/sheet/goal-seek.d.ts +73 -0
- package/dist/sheet/goal-seek.js +153 -0
- package/dist/sheet/index.d.ts +53 -0
- package/dist/sheet/index.js +53 -0
- package/dist/sheet/merges.d.ts +71 -0
- package/dist/sheet/merges.js +137 -0
- package/dist/sheet/names.d.ts +31 -0
- package/dist/sheet/names.js +87 -0
- package/dist/sheet/navigate.d.ts +52 -0
- package/dist/sheet/navigate.js +135 -0
- package/dist/sheet/number-format.d.ts +63 -0
- package/dist/sheet/number-format.js +508 -0
- package/dist/sheet/palette.d.ts +19 -0
- package/dist/sheet/palette.js +84 -0
- package/dist/sheet/parse.d.ts +13 -0
- package/dist/sheet/parse.js +108 -0
- package/dist/sheet/paste-special.d.ts +164 -0
- package/dist/sheet/paste-special.js +592 -0
- package/dist/sheet/protection.d.ts +21 -0
- package/dist/sheet/protection.js +48 -0
- package/dist/sheet/rects.d.ts +45 -0
- package/dist/sheet/rects.js +112 -0
- package/dist/sheet/refs.d.ts +82 -0
- package/dist/sheet/refs.js +266 -0
- package/dist/sheet/ribbon-icons.d.ts +31 -0
- package/dist/sheet/ribbon-icons.js +350 -0
- package/dist/sheet/ribbon.d.ts +173 -0
- package/dist/sheet/ribbon.js +753 -0
- package/dist/sheet/shortcuts.d.ts +164 -0
- package/dist/sheet/shortcuts.js +623 -0
- package/dist/sheet/structure.d.ts +87 -0
- package/dist/sheet/structure.js +166 -0
- package/dist/sheet/tables.d.ts +70 -0
- package/dist/sheet/tables.js +147 -0
- package/dist/sheet/tokenize.d.ts +54 -0
- package/dist/sheet/tokenize.js +304 -0
- package/dist/sheet/transforms.d.ts +76 -0
- package/dist/sheet/transforms.js +154 -0
- package/dist/sheet/validation.d.ts +92 -0
- package/dist/sheet/validation.js +241 -0
- package/dist/sheet/workbook.d.ts +72 -0
- package/dist/sheet/workbook.js +409 -0
- package/dist/sheet-enable.d.ts +6 -0
- package/dist/sheet-enable.js +46 -0
- package/dist/sources/aggregate.d.ts +1 -1
- package/dist/sources/auth-supabase.js +1 -1
- package/dist/sources/dashboard.d.ts +2 -2
- package/dist/sources/dashboard.js +1 -1
- package/dist/sources/index.d.ts +13 -13
- package/dist/sources/index.js +13 -13
- package/dist/sources/realtime-supabase.js +1 -1
- package/dist/sources/relation-lookup.d.ts +1 -1
- package/dist/sources/relation-lookup.js +1 -1
- package/dist/sources/rest-adapters.d.ts +1 -1
- package/dist/sources/rest-adapters.js +1 -1
- package/dist/sources/rest.d.ts +2 -2
- package/dist/sources/rest.js +3 -3
- package/dist/sources/supabase.d.ts +2 -2
- package/dist/sources/supabase.js +3 -3
- package/dist/sources/with-entity-rules.d.ts +1 -1
- package/dist/sources/with-entity-rules.js +1 -1
- package/dist/sources/with-relation-labels.d.ts +1 -1
- package/dist/studio/emit-project.js +2161 -2127
- package/dist/studio/emit-schema.js +369 -369
- package/dist/studio/index.d.ts +1 -1
- package/dist/studio/index.js +1 -1
- package/dist/studio/introspect-db.js +45 -45
- package/dist/studio/project.d.ts +10 -0
- package/dist/studio/samples/crm.js +6 -6
- package/dist/studio/samples/fleet.js +7 -7
- package/dist/studio/samples/insurance.js +9 -9
- package/dist/studio/samples/inventory.js +12 -12
- package/dist/studio/samples/projects.js +5 -5
- package/dist/studio/samples/support.js +8 -8
- package/dist/studio/scaffold-app.js +104 -104
- package/dist/studio/scaffold.js +151 -151
- package/dist/studio/ui-components.d.ts +7 -0
- package/dist/studio/ui-components.generated.js +63 -1
- package/dist/studio/ui-components.js +35 -0
- package/dist/sveltekit/in-memory.d.ts +3 -3
- package/dist/sveltekit/in-memory.js +4 -4
- package/dist/sveltekit/index.d.ts +6 -6
- package/dist/sveltekit/index.js +5 -5
- package/dist/sveltekit/query-plan.d.ts +1 -1
- package/dist/sveltekit/sql-source.d.ts +4 -4
- package/dist/sveltekit/sql-source.js +4 -4
- package/dist/sveltekit/sql.d.ts +1 -1
- package/dist/sveltekit/transport.d.ts +2 -2
- package/dist/sveltekit/transport.js +1 -1
- package/dist/upgrade-prompt.js +25 -25
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +12 -4
- package/dist/designer/assets/GridMenus-Cgilexpk.js +0 -8
- package/dist/designer/assets/SvDateRangeInput-BV5OXYQ2.css +0 -1
- package/dist/designer/assets/SvDateRangeInput-CVn-yqrQ.js +0 -1
- package/dist/designer/assets/SvDateTimePicker-BdioTrJQ.js +0 -1
- package/dist/designer/assets/SvDateTimePicker-CY8TK4BT.css +0 -1
- package/dist/designer/assets/SvField-BF-9TJSd.css +0 -1
- package/dist/designer/assets/SvField-BsqiA5me.js +0 -1
- package/dist/designer/assets/SvGridCellEditor-dLY7_kk9.js +0 -2
- package/dist/designer/assets/SvGridChart-BEDNTdc5.js +0 -2
- package/dist/designer/assets/SvGridChart-Vu4Nvjiv.css +0 -1
- package/dist/designer/assets/SvGridChartPanel-x3lzSxuf.js +0 -10
- package/dist/designer/assets/SvGridChartView-CAKhPELi.js +0 -1
- package/dist/designer/assets/SvGridChartView-DX9HfkBR.css +0 -1
- package/dist/designer/assets/SvGridDropdown-CAYG7Y-O.js +0 -1
- package/dist/designer/assets/SvGridDropdown-Crwb2P3Q.css +0 -1
- package/dist/designer/assets/SvListBox-CVYQcLX9.js +0 -1
- package/dist/designer/assets/SvListBox-DgN8kvjt.css +0 -1
- package/dist/designer/assets/chart-DHEgt4lN.js +0 -1
- package/dist/designer/assets/column-resize-C_inr5zT.js +0 -1
- package/dist/designer/assets/date-format-4DJvNtG2.js +0 -1
- package/dist/designer/assets/date-format-Dzy4mTGh.css +0 -1
- package/dist/designer/assets/easing-zaypKrr0.js +0 -3
- package/dist/designer/assets/export-format-DwjuTfrQ.js +0 -6
- package/dist/designer/assets/index-Cp7fDJ3b.css +0 -1
- package/dist/designer/assets/js-scroller.svelte-Bhxqb3-c.js +0 -110
- package/dist/designer/assets/row-resize-B0FWHcNr.js +0 -1
- package/dist/designer/assets/src-B7DNcoQK.css +0 -1
- package/dist/designer/assets/src-BoYyigAC.js +0 -2896
- package/dist/studio/node_modules/.vite/vitest/be65d27ae088a0e03fd8e1331d90b01649464cb6/_svelte_metadata.json +0 -1
- package/dist/studio/node_modules/.vite/vitest/be65d27ae088a0e03fd8e1331d90b01649464cb6/deps___vitest__/_metadata.json +0 -178
- package/dist/studio/node_modules/.vite/vitest/be65d27ae088a0e03fd8e1331d90b01649464cb6/deps___vitest__/attachments-BOv1rBKp.js +0 -3875
- package/dist/studio/node_modules/.vite/vitest/be65d27ae088a0e03fd8e1331d90b01649464cb6/deps___vitest__/attachments-BOv1rBKp.js.map +0 -1
- package/dist/studio/node_modules/.vite/vitest/be65d27ae088a0e03fd8e1331d90b01649464cb6/deps___vitest__/constants-B9vgIdCd.js +0 -21
- package/dist/studio/node_modules/.vite/vitest/be65d27ae088a0e03fd8e1331d90b01649464cb6/deps___vitest__/constants-B9vgIdCd.js.map +0 -1
- package/dist/studio/node_modules/.vite/vitest/be65d27ae088a0e03fd8e1331d90b01649464cb6/deps___vitest__/dev-T1qbW_qD.js +0 -1938
- package/dist/studio/node_modules/.vite/vitest/be65d27ae088a0e03fd8e1331d90b01649464cb6/deps___vitest__/dev-T1qbW_qD.js.map +0 -1
- package/dist/studio/node_modules/.vite/vitest/be65d27ae088a0e03fd8e1331d90b01649464cb6/deps___vitest__/events-Bo11SfVK.js +0 -205
- package/dist/studio/node_modules/.vite/vitest/be65d27ae088a0e03fd8e1331d90b01649464cb6/deps___vitest__/events-Bo11SfVK.js.map +0 -1
- package/dist/studio/node_modules/.vite/vitest/be65d27ae088a0e03fd8e1331d90b01649464cb6/deps___vitest__/flags-X7D4vfrZ.js +0 -18
- package/dist/studio/node_modules/.vite/vitest/be65d27ae088a0e03fd8e1331d90b01649464cb6/deps___vitest__/flags-X7D4vfrZ.js.map +0 -1
- package/dist/studio/node_modules/.vite/vitest/be65d27ae088a0e03fd8e1331d90b01649464cb6/deps___vitest__/hydration-oyUje5i1.js +0 -264
- package/dist/studio/node_modules/.vite/vitest/be65d27ae088a0e03fd8e1331d90b01649464cb6/deps___vitest__/hydration-oyUje5i1.js.map +0 -1
- package/dist/studio/node_modules/.vite/vitest/be65d27ae088a0e03fd8e1331d90b01649464cb6/deps___vitest__/legacy-client-DeSQgSFm.js +0 -697
- package/dist/studio/node_modules/.vite/vitest/be65d27ae088a0e03fd8e1331d90b01649464cb6/deps___vitest__/legacy-client-DeSQgSFm.js.map +0 -1
- package/dist/studio/node_modules/.vite/vitest/be65d27ae088a0e03fd8e1331d90b01649464cb6/deps___vitest__/package.json +0 -3
- package/dist/studio/node_modules/.vite/vitest/be65d27ae088a0e03fd8e1331d90b01649464cb6/deps___vitest__/svelte.js +0 -134
- package/dist/studio/node_modules/.vite/vitest/be65d27ae088a0e03fd8e1331d90b01649464cb6/deps___vitest__/svelte.js.map +0 -1
- package/dist/studio/node_modules/.vite/vitest/be65d27ae088a0e03fd8e1331d90b01649464cb6/deps___vitest__/svelte_animate.js +0 -55
- package/dist/studio/node_modules/.vite/vitest/be65d27ae088a0e03fd8e1331d90b01649464cb6/deps___vitest__/svelte_animate.js.map +0 -1
- package/dist/studio/node_modules/.vite/vitest/be65d27ae088a0e03fd8e1331d90b01649464cb6/deps___vitest__/svelte_attachments.js +0 -2
- package/dist/studio/node_modules/.vite/vitest/be65d27ae088a0e03fd8e1331d90b01649464cb6/deps___vitest__/svelte_compiler.js +0 -46843
- package/dist/studio/node_modules/.vite/vitest/be65d27ae088a0e03fd8e1331d90b01649464cb6/deps___vitest__/svelte_compiler.js.map +0 -1
- package/dist/studio/node_modules/.vite/vitest/be65d27ae088a0e03fd8e1331d90b01649464cb6/deps___vitest__/svelte_easing.js +0 -237
- package/dist/studio/node_modules/.vite/vitest/be65d27ae088a0e03fd8e1331d90b01649464cb6/deps___vitest__/svelte_easing.js.map +0 -1
- package/dist/studio/node_modules/.vite/vitest/be65d27ae088a0e03fd8e1331d90b01649464cb6/deps___vitest__/svelte_events.js +0 -2
- package/dist/studio/node_modules/.vite/vitest/be65d27ae088a0e03fd8e1331d90b01649464cb6/deps___vitest__/svelte_internal.js +0 -4
- package/dist/studio/node_modules/.vite/vitest/be65d27ae088a0e03fd8e1331d90b01649464cb6/deps___vitest__/svelte_internal.js.map +0 -1
- package/dist/studio/node_modules/.vite/vitest/be65d27ae088a0e03fd8e1331d90b01649464cb6/deps___vitest__/svelte_internal_client.js +0 -7
- package/dist/studio/node_modules/.vite/vitest/be65d27ae088a0e03fd8e1331d90b01649464cb6/deps___vitest__/svelte_internal_disclose-version.js +0 -4
- package/dist/studio/node_modules/.vite/vitest/be65d27ae088a0e03fd8e1331d90b01649464cb6/deps___vitest__/svelte_internal_disclose-version.js.map +0 -1
- package/dist/studio/node_modules/.vite/vitest/be65d27ae088a0e03fd8e1331d90b01649464cb6/deps___vitest__/svelte_internal_flags_async.js +0 -5
- package/dist/studio/node_modules/.vite/vitest/be65d27ae088a0e03fd8e1331d90b01649464cb6/deps___vitest__/svelte_internal_flags_async.js.map +0 -1
- package/dist/studio/node_modules/.vite/vitest/be65d27ae088a0e03fd8e1331d90b01649464cb6/deps___vitest__/svelte_internal_flags_legacy.js +0 -5
- package/dist/studio/node_modules/.vite/vitest/be65d27ae088a0e03fd8e1331d90b01649464cb6/deps___vitest__/svelte_internal_flags_legacy.js.map +0 -1
- package/dist/studio/node_modules/.vite/vitest/be65d27ae088a0e03fd8e1331d90b01649464cb6/deps___vitest__/svelte_internal_flags_tracing.js +0 -5
- package/dist/studio/node_modules/.vite/vitest/be65d27ae088a0e03fd8e1331d90b01649464cb6/deps___vitest__/svelte_internal_flags_tracing.js.map +0 -1
- package/dist/studio/node_modules/.vite/vitest/be65d27ae088a0e03fd8e1331d90b01649464cb6/deps___vitest__/svelte_internal_server.js +0 -6
- package/dist/studio/node_modules/.vite/vitest/be65d27ae088a0e03fd8e1331d90b01649464cb6/deps___vitest__/svelte_legacy.js +0 -83
- package/dist/studio/node_modules/.vite/vitest/be65d27ae088a0e03fd8e1331d90b01649464cb6/deps___vitest__/svelte_legacy.js.map +0 -1
- package/dist/studio/node_modules/.vite/vitest/be65d27ae088a0e03fd8e1331d90b01649464cb6/deps___vitest__/svelte_motion.js +0 -559
- package/dist/studio/node_modules/.vite/vitest/be65d27ae088a0e03fd8e1331d90b01649464cb6/deps___vitest__/svelte_motion.js.map +0 -1
- package/dist/studio/node_modules/.vite/vitest/be65d27ae088a0e03fd8e1331d90b01649464cb6/deps___vitest__/svelte_reactivity.js +0 -24
- package/dist/studio/node_modules/.vite/vitest/be65d27ae088a0e03fd8e1331d90b01649464cb6/deps___vitest__/svelte_reactivity.js.map +0 -1
- package/dist/studio/node_modules/.vite/vitest/be65d27ae088a0e03fd8e1331d90b01649464cb6/deps___vitest__/svelte_reactivity_window.js +0 -122
- package/dist/studio/node_modules/.vite/vitest/be65d27ae088a0e03fd8e1331d90b01649464cb6/deps___vitest__/svelte_reactivity_window.js.map +0 -1
- package/dist/studio/node_modules/.vite/vitest/be65d27ae088a0e03fd8e1331d90b01649464cb6/deps___vitest__/svelte_server.js +0 -2
- package/dist/studio/node_modules/.vite/vitest/be65d27ae088a0e03fd8e1331d90b01649464cb6/deps___vitest__/svelte_store.js +0 -89
- package/dist/studio/node_modules/.vite/vitest/be65d27ae088a0e03fd8e1331d90b01649464cb6/deps___vitest__/svelte_store.js.map +0 -1
- package/dist/studio/node_modules/.vite/vitest/be65d27ae088a0e03fd8e1331d90b01649464cb6/deps___vitest__/svelte_transition.js +0 -241
- package/dist/studio/node_modules/.vite/vitest/be65d27ae088a0e03fd8e1331d90b01649464cb6/deps___vitest__/svelte_transition.js.map +0 -1
- package/dist/studio/node_modules/.vite/vitest/be65d27ae088a0e03fd8e1331d90b01649464cb6/deps___vitest__/utils-BbWyXNk1.js +0 -4938
- package/dist/studio/node_modules/.vite/vitest/be65d27ae088a0e03fd8e1331d90b01649464cb6/deps___vitest__/utils-BbWyXNk1.js.map +0 -1
- package/dist/studio/node_modules/.vite/vitest/be65d27ae088a0e03fd8e1331d90b01649464cb6/deps___vitest__/utils-DI_fC7vt.js +0 -495
- package/dist/studio/node_modules/.vite/vitest/be65d27ae088a0e03fd8e1331d90b01649464cb6/deps___vitest__/utils-DI_fC7vt.js.map +0 -1
- package/dist/studio/node_modules/.vite/vitest/be65d27ae088a0e03fd8e1331d90b01649464cb6/deps___vitest__/validate-Dyr3lQv9.js +0 -190
- package/dist/studio/node_modules/.vite/vitest/be65d27ae088a0e03fd8e1331d90b01649464cb6/deps___vitest__/validate-Dyr3lQv9.js.map +0 -1
- package/dist/studio/node_modules/.vite/vitest/be65d27ae088a0e03fd8e1331d90b01649464cb6/deps___vitest__/version-_9FHH-LF.js +0 -8
- package/dist/studio/node_modules/.vite/vitest/be65d27ae088a0e03fd8e1331d90b01649464cb6/deps___vitest__/version-_9FHH-LF.js.map +0 -1
- package/dist/studio/node_modules/.vite/vitest/be65d27ae088a0e03fd8e1331d90b01649464cb6/deps___vitest__/warnings-CUbSPnyP.js +0 -138
- package/dist/studio/node_modules/.vite/vitest/be65d27ae088a0e03fd8e1331d90b01649464cb6/deps___vitest__/warnings-CUbSPnyP.js.map +0 -1
package/dist/pivot-enable.js
CHANGED
|
@@ -17,9 +17,9 @@
|
|
|
17
17
|
* ```
|
|
18
18
|
*/
|
|
19
19
|
import { registerPivotEngine } from '@svgrid/grid';
|
|
20
|
-
import { isLicenseKeySet } from './license';
|
|
21
|
-
import { emitUnlicensedNudge } from './watermark';
|
|
22
|
-
import { createPivotModel } from './pivot';
|
|
20
|
+
import { isLicenseKeySet } from './license.js';
|
|
21
|
+
import { emitUnlicensedNudge } from './watermark.js';
|
|
22
|
+
import { createPivotModel } from './pivot.js';
|
|
23
23
|
let enabled = false;
|
|
24
24
|
// The grid's `PivotEngine` seam is generic over row type; `createPivotModel` is
|
|
25
25
|
// the concrete implementation. Bridge them with a single boundary cast.
|
package/dist/print.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { RowData, TableFeatures, SvGridApi } from '@svgrid/grid';
|
|
2
|
-
import { type ExportColumn, type ExportRowSource } from './export';
|
|
2
|
+
import { type ExportColumn, type ExportRowSource } from './export.js';
|
|
3
3
|
import type { ConditionalFormat } from '@svgrid/grid/format';
|
|
4
4
|
export type PrintOptions<TData> = {
|
|
5
5
|
/** Title placed above the printed grid. Defaults to "Grid". */
|
package/dist/print.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { assertEnterpriseLicensed } from './license';
|
|
2
|
-
import { buildLinkResolver, projectRows, resolveColumns, resolveRowSource, } from './export';
|
|
3
|
-
import { buildPrintDocument } from './export-print';
|
|
4
|
-
import { buildConditionalResolver } from './export-conditional';
|
|
1
|
+
import { assertEnterpriseLicensed } from './license.js';
|
|
2
|
+
import { buildLinkResolver, projectRows, resolveColumns, resolveRowSource, } from './export.js';
|
|
3
|
+
import { buildPrintDocument } from './export-print.js';
|
|
4
|
+
import { buildConditionalResolver } from './export-conditional.js';
|
|
5
5
|
export async function printGrid(api, opts) {
|
|
6
6
|
assertEnterpriseLicensed('Print');
|
|
7
7
|
if (typeof window === 'undefined') {
|
|
@@ -12,11 +12,11 @@
|
|
|
12
12
|
* - Wave C: non-working-time collapse + continuous zoom
|
|
13
13
|
*/
|
|
14
14
|
import type { SchedulerConfig, SchedulerResource, TableFeatures, RowData } from '@svgrid/grid';
|
|
15
|
-
import type { SchedulerDependency } from './scheduler-dependencies';
|
|
16
|
-
import type { SchedulerAssignment } from './scheduler-assignments';
|
|
17
|
-
import type { ColumnReducer } from './scheduler-summary';
|
|
18
|
-
import type { ZoomLevel } from './scheduler-axis';
|
|
19
|
-
import type { SchedulerResourceGroup } from './scheduler-resource-tree';
|
|
15
|
+
import type { SchedulerDependency } from './scheduler-dependencies.js';
|
|
16
|
+
import type { SchedulerAssignment } from './scheduler-assignments.js';
|
|
17
|
+
import type { ColumnReducer } from './scheduler-summary.js';
|
|
18
|
+
import type { ZoomLevel } from './scheduler-axis.js';
|
|
19
|
+
import type { SchedulerResourceGroup } from './scheduler-resource-tree.js';
|
|
20
20
|
export type SchedulerProConfig<TFeatures extends TableFeatures = TableFeatures, TData extends RowData = RowData> = SchedulerConfig<TFeatures, TData> & {
|
|
21
21
|
/**
|
|
22
22
|
* Event dependency links (predecessor -> successor). `from` / `to` are row ids
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* Deterministic - the caller supplies all dates. Reuses the interval algebra from
|
|
6
6
|
* scheduler-slots (`mergeIntervals` / `subtractIntervals`).
|
|
7
7
|
*/
|
|
8
|
-
import { type Interval } from './scheduler-slots';
|
|
8
|
+
import { type Interval } from './scheduler-slots.js';
|
|
9
9
|
export type { Interval };
|
|
10
10
|
/** Union of a set of busy intervals into a sorted, disjoint list (an alias of the
|
|
11
11
|
* slots merge, named for the free/busy domain). */
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* Deterministic - the caller supplies all dates. Reuses the interval algebra from
|
|
6
6
|
* scheduler-slots (`mergeIntervals` / `subtractIntervals`).
|
|
7
7
|
*/
|
|
8
|
-
import { mergeIntervals, subtractIntervals } from './scheduler-slots';
|
|
8
|
+
import { mergeIntervals, subtractIntervals } from './scheduler-slots.js';
|
|
9
9
|
const MS_MIN = 60000;
|
|
10
10
|
/** Union of a set of busy intervals into a sorted, disjoint list (an alias of the
|
|
11
11
|
* slots merge, named for the free/busy domain). */
|
package/dist/scheduler.js
CHANGED
|
@@ -16,8 +16,8 @@
|
|
|
16
16
|
* ```
|
|
17
17
|
*/
|
|
18
18
|
import { registerSchedulerView } from '@svgrid/grid';
|
|
19
|
-
import { isLicenseKeySet } from './license';
|
|
20
|
-
import { emitUnlicensedNudge } from './watermark';
|
|
19
|
+
import { isLicenseKeySet } from './license.js';
|
|
20
|
+
import { emitUnlicensedNudge } from './watermark.js';
|
|
21
21
|
import SvGridScheduler from './SvGridScheduler.svelte';
|
|
22
22
|
let enabled = false;
|
|
23
23
|
/**
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
* Pure (no Svelte, no DOM), mirroring the pivot-designer / edit-panel split.
|
|
8
8
|
* Every mutation returns a NEW schema so Svelte reactivity and undo stay simple.
|
|
9
9
|
*/
|
|
10
|
-
import type { EntityField, EntityFieldType, EntitySchema } from './schema';
|
|
10
|
+
import type { EntityField, EntityFieldType, EntitySchema } from './schema.js';
|
|
11
11
|
/** All field types the designer offers, in menu order. */
|
|
12
12
|
export declare const FIELD_TYPES: ReadonlyArray<EntityFieldType>;
|
|
13
13
|
/** A fresh field with a name unique within the schema. */
|
package/dist/schema-designer.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { resolveIdField } from './schema';
|
|
2
|
-
import { generateRows } from './studio/sample-data';
|
|
1
|
+
import { resolveIdField } from './schema.js';
|
|
2
|
+
import { generateRows } from './studio/sample-data.js';
|
|
3
3
|
/** All field types the designer offers, in menu order. */
|
|
4
4
|
export const FIELD_TYPES = [
|
|
5
5
|
'text',
|
package/dist/selection-bar.js
CHANGED
|
@@ -22,8 +22,8 @@
|
|
|
22
22
|
* ```
|
|
23
23
|
*/
|
|
24
24
|
import { registerSelectionBarView } from '@svgrid/grid';
|
|
25
|
-
import { isLicenseKeySet } from './license';
|
|
26
|
-
import { emitUnlicensedNudge } from './watermark';
|
|
25
|
+
import { isLicenseKeySet } from './license.js';
|
|
26
|
+
import { emitUnlicensedNudge } from './watermark.js';
|
|
27
27
|
import SvGridSelectionBar from './SvGridSelectionBar.svelte';
|
|
28
28
|
let enabled = false;
|
|
29
29
|
/**
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A1 addressing, with absolute and relative parts kept apart.
|
|
3
|
+
*
|
|
4
|
+
* Every demo copy of this engine does `part.replace(/\$/g, '')` and then treats
|
|
5
|
+
* what is left as relative, so `$A$1` parses and evaluates as `A1`. Nothing
|
|
6
|
+
* notices while nothing translates a formula. The moment fill-down, copy/paste
|
|
7
|
+
* or insert-row exists, `=$A$1*B2` copied down starts reading the wrong cell
|
|
8
|
+
* and quietly returns a plausible wrong number, which is the worst failure mode
|
|
9
|
+
* a spreadsheet has.
|
|
10
|
+
*
|
|
11
|
+
* So `$` is structure here, not noise: `parseA1` reports which halves were
|
|
12
|
+
* pinned, and `refs.ts` is the only module allowed to move the unpinned ones.
|
|
13
|
+
*
|
|
14
|
+
* Rows and columns are 0-based internally (`A1` is `{ row: 0, col: 0 }`) and
|
|
15
|
+
* 1-based on the wire, which is the same convention the grid's selection model
|
|
16
|
+
* uses so nothing has to convert at the boundary.
|
|
17
|
+
*/
|
|
18
|
+
/** A parsed cell reference. `row: null` means a whole-column ref (`A:A`). */
|
|
19
|
+
export type CellRef = {
|
|
20
|
+
col: number;
|
|
21
|
+
colAbs: boolean;
|
|
22
|
+
/** null for a column-only reference. */
|
|
23
|
+
row: number | null;
|
|
24
|
+
rowAbs: boolean;
|
|
25
|
+
/** null means "the sheet the formula lives on". */
|
|
26
|
+
sheet: string | null;
|
|
27
|
+
};
|
|
28
|
+
/** 0-based column index to letters: 0 -> A, 25 -> Z, 26 -> AA. */
|
|
29
|
+
export declare function colToLetters(col: number): string;
|
|
30
|
+
/** Letters to a 0-based column index. Returns -1 for anything unparseable. */
|
|
31
|
+
export declare function lettersToCol(letters: string): number;
|
|
32
|
+
/**
|
|
33
|
+
* Parse one reference part: `A1`, `$A$1`, `A$1`, `$A1`, or a bare column `A`.
|
|
34
|
+
* Returns null when the text is not a reference at all, which is how the
|
|
35
|
+
* tokenizer tells a reference from a bare name.
|
|
36
|
+
*/
|
|
37
|
+
export declare function parseA1(text: string, sheet?: string | null): CellRef | null;
|
|
38
|
+
/** Render a reference back to A1, `$` included, sheet prefix and all. */
|
|
39
|
+
export declare function formatA1(ref: CellRef): string;
|
|
40
|
+
/** A sheet name needs quoting unless it is a bare word. */
|
|
41
|
+
export declare function quoteSheet(name: string): string;
|
|
42
|
+
/** True when the reference points outside a sheet of this size. */
|
|
43
|
+
export declare function isOutOfBounds(ref: CellRef, rowCount: number, colCount: number): boolean;
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A1 addressing, with absolute and relative parts kept apart.
|
|
3
|
+
*
|
|
4
|
+
* Every demo copy of this engine does `part.replace(/\$/g, '')` and then treats
|
|
5
|
+
* what is left as relative, so `$A$1` parses and evaluates as `A1`. Nothing
|
|
6
|
+
* notices while nothing translates a formula. The moment fill-down, copy/paste
|
|
7
|
+
* or insert-row exists, `=$A$1*B2` copied down starts reading the wrong cell
|
|
8
|
+
* and quietly returns a plausible wrong number, which is the worst failure mode
|
|
9
|
+
* a spreadsheet has.
|
|
10
|
+
*
|
|
11
|
+
* So `$` is structure here, not noise: `parseA1` reports which halves were
|
|
12
|
+
* pinned, and `refs.ts` is the only module allowed to move the unpinned ones.
|
|
13
|
+
*
|
|
14
|
+
* Rows and columns are 0-based internally (`A1` is `{ row: 0, col: 0 }`) and
|
|
15
|
+
* 1-based on the wire, which is the same convention the grid's selection model
|
|
16
|
+
* uses so nothing has to convert at the boundary.
|
|
17
|
+
*/
|
|
18
|
+
/** 0-based column index to letters: 0 -> A, 25 -> Z, 26 -> AA. */
|
|
19
|
+
export function colToLetters(col) {
|
|
20
|
+
if (!Number.isInteger(col) || col < 0)
|
|
21
|
+
return '';
|
|
22
|
+
let n = col;
|
|
23
|
+
let out = '';
|
|
24
|
+
while (n >= 0) {
|
|
25
|
+
out = String.fromCharCode(65 + (n % 26)) + out;
|
|
26
|
+
n = Math.floor(n / 26) - 1;
|
|
27
|
+
}
|
|
28
|
+
return out;
|
|
29
|
+
}
|
|
30
|
+
/** Letters to a 0-based column index. Returns -1 for anything unparseable. */
|
|
31
|
+
export function lettersToCol(letters) {
|
|
32
|
+
if (!letters || !/^[A-Za-z]+$/.test(letters))
|
|
33
|
+
return -1;
|
|
34
|
+
let col = 0;
|
|
35
|
+
for (const ch of letters.toUpperCase())
|
|
36
|
+
col = col * 26 + (ch.charCodeAt(0) - 64);
|
|
37
|
+
return col - 1;
|
|
38
|
+
}
|
|
39
|
+
const REF_RE = /^(\$?)([A-Za-z]+)(?:(\$?)(\d+))?$/;
|
|
40
|
+
/**
|
|
41
|
+
* Parse one reference part: `A1`, `$A$1`, `A$1`, `$A1`, or a bare column `A`.
|
|
42
|
+
* Returns null when the text is not a reference at all, which is how the
|
|
43
|
+
* tokenizer tells a reference from a bare name.
|
|
44
|
+
*/
|
|
45
|
+
export function parseA1(text, sheet = null) {
|
|
46
|
+
const m = REF_RE.exec(text);
|
|
47
|
+
if (!m)
|
|
48
|
+
return null;
|
|
49
|
+
const col = lettersToCol(m[2]);
|
|
50
|
+
if (col < 0)
|
|
51
|
+
return null;
|
|
52
|
+
const rowText = m[4];
|
|
53
|
+
if (rowText === undefined) {
|
|
54
|
+
return { col, colAbs: m[1] === '$', row: null, rowAbs: false, sheet };
|
|
55
|
+
}
|
|
56
|
+
const row = Number(rowText) - 1;
|
|
57
|
+
// Row 0 does not exist in A1 notation; `A0` is a name, not a reference.
|
|
58
|
+
if (!Number.isInteger(row) || row < 0)
|
|
59
|
+
return null;
|
|
60
|
+
return { col, colAbs: m[1] === '$', row, rowAbs: m[3] === '$', sheet };
|
|
61
|
+
}
|
|
62
|
+
/** Render a reference back to A1, `$` included, sheet prefix and all. */
|
|
63
|
+
export function formatA1(ref) {
|
|
64
|
+
const col = `${ref.colAbs ? '$' : ''}${colToLetters(ref.col)}`;
|
|
65
|
+
const cell = ref.row === null ? col : `${col}${ref.rowAbs ? '$' : ''}${ref.row + 1}`;
|
|
66
|
+
if (ref.sheet === null)
|
|
67
|
+
return cell;
|
|
68
|
+
return `${quoteSheet(ref.sheet)}!${cell}`;
|
|
69
|
+
}
|
|
70
|
+
/** A sheet name needs quoting unless it is a bare word. */
|
|
71
|
+
export function quoteSheet(name) {
|
|
72
|
+
return /^[A-Za-z_][A-Za-z0-9_.]*$/.test(name) ? name : `'${name.replace(/'/g, "''")}'`;
|
|
73
|
+
}
|
|
74
|
+
/** True when the reference points outside a sheet of this size. */
|
|
75
|
+
export function isOutOfBounds(ref, rowCount, colCount) {
|
|
76
|
+
if (ref.col < 0 || ref.col >= colCount)
|
|
77
|
+
return true;
|
|
78
|
+
if (ref.row === null)
|
|
79
|
+
return false;
|
|
80
|
+
return ref.row < 0 || ref.row >= rowCount;
|
|
81
|
+
}
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The formula AST and the error vocabulary, in their own module so the
|
|
3
|
+
* tokenizer, parser, evaluator and the reference rewriter can all import the
|
|
4
|
+
* shapes without importing each other.
|
|
5
|
+
*/
|
|
6
|
+
import type { CellRef } from './address.js';
|
|
7
|
+
export type SheetError = '#REF!' | '#CYCLE!' | '#DIV/0!' | '#VALUE!' | '#NAME?' | '#NUM!' | '#N/A' | '#PARSE!';
|
|
8
|
+
/** A computed cell value. Errors are values, not exceptions, once evaluation
|
|
9
|
+
* finishes - that is what lets `=IFERROR(A1, 0)` see one. */
|
|
10
|
+
export type CellValue = string | number | boolean | {
|
|
11
|
+
error: SheetError;
|
|
12
|
+
};
|
|
13
|
+
export declare function isError(v: CellValue): v is {
|
|
14
|
+
error: SheetError;
|
|
15
|
+
};
|
|
16
|
+
export declare function err(code: SheetError): {
|
|
17
|
+
error: SheetError;
|
|
18
|
+
};
|
|
19
|
+
/** Thrown during evaluation and caught at the boundary, where it becomes a
|
|
20
|
+
* value. Carrying the code on a real Error keeps stack traces useful in dev
|
|
21
|
+
* without the evaluator having to thread a result type through every branch. */
|
|
22
|
+
export declare class FormulaError extends Error {
|
|
23
|
+
readonly code: SheetError;
|
|
24
|
+
constructor(code: SheetError);
|
|
25
|
+
}
|
|
26
|
+
export type Node = {
|
|
27
|
+
k: 'num';
|
|
28
|
+
v: number;
|
|
29
|
+
} | {
|
|
30
|
+
k: 'str';
|
|
31
|
+
v: string;
|
|
32
|
+
} | {
|
|
33
|
+
k: 'bool';
|
|
34
|
+
v: boolean;
|
|
35
|
+
}
|
|
36
|
+
/** A single cell. `ref.row` is never null here; a column-only reference
|
|
37
|
+
* parses as a range instead. */
|
|
38
|
+
| {
|
|
39
|
+
k: 'ref';
|
|
40
|
+
ref: CellRef;
|
|
41
|
+
}
|
|
42
|
+
/** A rectangle. Either end's row may be null, meaning a whole-column ref
|
|
43
|
+
* that runs to the last used row of the sheet. */
|
|
44
|
+
| {
|
|
45
|
+
k: 'range';
|
|
46
|
+
from: CellRef;
|
|
47
|
+
to: CellRef;
|
|
48
|
+
}
|
|
49
|
+
/** A defined name (`=Tax`), resolved against the workbook at evaluation. */
|
|
50
|
+
| {
|
|
51
|
+
k: 'name';
|
|
52
|
+
name: string;
|
|
53
|
+
}
|
|
54
|
+
/**
|
|
55
|
+
* A structured reference: `Orders[Amount]`, `[@Amount]`, `Orders[#Totals]`.
|
|
56
|
+
*
|
|
57
|
+
* Deliberately NOT resolved to a range here. The range a table reference
|
|
58
|
+
* means depends on how many rows the table has right now, and the AST is
|
|
59
|
+
* cached across the edits that change that. Resolving at parse time is how
|
|
60
|
+
* a total silently stops covering rows added after it was typed, which is
|
|
61
|
+
* the exact problem tables exist to fix.
|
|
62
|
+
*/
|
|
63
|
+
| {
|
|
64
|
+
k: 'table';
|
|
65
|
+
/** null for the unqualified `[Amount]` form, which only means
|
|
66
|
+
* something inside a table. */
|
|
67
|
+
table: string | null;
|
|
68
|
+
/** null when the reference names no column, e.g. `Orders[#All]`. */
|
|
69
|
+
column: string | null;
|
|
70
|
+
/** The far end of a column span: `Orders[[Qty]:[Amount]]`. */
|
|
71
|
+
columnTo?: string | null;
|
|
72
|
+
specifier: '#All' | '#Data' | '#Headers' | '#Totals' | '#ThisRow';
|
|
73
|
+
} | {
|
|
74
|
+
k: 'unary';
|
|
75
|
+
op: '-' | '+' | '%';
|
|
76
|
+
arg: Node;
|
|
77
|
+
} | {
|
|
78
|
+
k: 'binary';
|
|
79
|
+
op: BinaryOp;
|
|
80
|
+
left: Node;
|
|
81
|
+
right: Node;
|
|
82
|
+
} | {
|
|
83
|
+
k: 'fn';
|
|
84
|
+
name: string;
|
|
85
|
+
args: Node[];
|
|
86
|
+
};
|
|
87
|
+
export type BinaryOp = '+' | '-' | '*' | '/' | '^' | '&' | '=' | '<>' | '<' | '>' | '<=' | '>=';
|
|
88
|
+
/** Binding power. Comparison loosest, then concat, then arithmetic. */
|
|
89
|
+
export declare const PRECEDENCE: Record<BinaryOp, number>;
|
|
90
|
+
/** Walk every node, parents before children. */
|
|
91
|
+
export declare function visit(node: Node, fn: (n: Node) => void): void;
|
|
92
|
+
/** Rebuild the tree with `fn` applied to every node, deepest first. Used by
|
|
93
|
+
* the reference rewriter, which must not mutate a cached AST in place. */
|
|
94
|
+
export declare function mapNode(node: Node, fn: (n: Node) => Node): Node;
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
export function isError(v) {
|
|
2
|
+
return typeof v === 'object' && v !== null && 'error' in v;
|
|
3
|
+
}
|
|
4
|
+
export function err(code) {
|
|
5
|
+
return { error: code };
|
|
6
|
+
}
|
|
7
|
+
/** Thrown during evaluation and caught at the boundary, where it becomes a
|
|
8
|
+
* value. Carrying the code on a real Error keeps stack traces useful in dev
|
|
9
|
+
* without the evaluator having to thread a result type through every branch. */
|
|
10
|
+
export class FormulaError extends Error {
|
|
11
|
+
constructor(code) {
|
|
12
|
+
super(code);
|
|
13
|
+
this.name = 'FormulaError';
|
|
14
|
+
this.code = code;
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
/** Binding power. Comparison loosest, then concat, then arithmetic. */
|
|
18
|
+
export const PRECEDENCE = {
|
|
19
|
+
'=': 1, '<>': 1, '<': 1, '>': 1, '<=': 1, '>=': 1,
|
|
20
|
+
'&': 2,
|
|
21
|
+
'+': 3, '-': 3,
|
|
22
|
+
'*': 4, '/': 4,
|
|
23
|
+
'^': 5,
|
|
24
|
+
};
|
|
25
|
+
/** Walk every node, parents before children. */
|
|
26
|
+
export function visit(node, fn) {
|
|
27
|
+
fn(node);
|
|
28
|
+
switch (node.k) {
|
|
29
|
+
case 'unary':
|
|
30
|
+
visit(node.arg, fn);
|
|
31
|
+
break;
|
|
32
|
+
case 'binary':
|
|
33
|
+
visit(node.left, fn);
|
|
34
|
+
visit(node.right, fn);
|
|
35
|
+
break;
|
|
36
|
+
case 'fn':
|
|
37
|
+
for (const a of node.args)
|
|
38
|
+
visit(a, fn);
|
|
39
|
+
break;
|
|
40
|
+
default: break;
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
/** Rebuild the tree with `fn` applied to every node, deepest first. Used by
|
|
44
|
+
* the reference rewriter, which must not mutate a cached AST in place. */
|
|
45
|
+
export function mapNode(node, fn) {
|
|
46
|
+
switch (node.k) {
|
|
47
|
+
case 'unary':
|
|
48
|
+
return fn({ ...node, arg: mapNode(node.arg, fn) });
|
|
49
|
+
case 'binary':
|
|
50
|
+
return fn({ ...node, left: mapNode(node.left, fn), right: mapNode(node.right, fn) });
|
|
51
|
+
case 'fn':
|
|
52
|
+
return fn({ ...node, args: node.args.map((a) => mapNode(a, fn)) });
|
|
53
|
+
default:
|
|
54
|
+
return fn(node);
|
|
55
|
+
}
|
|
56
|
+
}
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Excel's AutoFilter: arrows on the header row of a region, each opening a
|
|
3
|
+
* menu of the column's values to tick and untick, or a condition (equals,
|
|
4
|
+
* greater than, contains, between...), and the rows that fail fold away.
|
|
5
|
+
* The rows are hidden through the grid's collapsed rows, kept apart from
|
|
6
|
+
* the rows the user hid by hand so Unhide and the saved document see
|
|
7
|
+
* only those.
|
|
8
|
+
*
|
|
9
|
+
* This module is the pure part: the state, the values a column offers,
|
|
10
|
+
* which rows a state hides, and how the state moves with an insert or
|
|
11
|
+
* delete. Conditions run through the grid's own Excel-filter compiler, so
|
|
12
|
+
* the operator semantics are the ones the grid's filter row has.
|
|
13
|
+
*/
|
|
14
|
+
import { type ExcelFilterOperator } from '@svgrid/grid/filtering';
|
|
15
|
+
import { type CellValue } from './ast.js';
|
|
16
|
+
import type { StructuralEdit } from './refs.js';
|
|
17
|
+
import { type Rect } from './rects.js';
|
|
18
|
+
export type FilterCondition = {
|
|
19
|
+
op: ExcelFilterOperator;
|
|
20
|
+
value?: string;
|
|
21
|
+
valueTo?: string;
|
|
22
|
+
};
|
|
23
|
+
export type ColumnFilter = {
|
|
24
|
+
kind: 'values'; /** Display texts left unticked; '' stands for the blanks. */
|
|
25
|
+
excluded: string[];
|
|
26
|
+
} | {
|
|
27
|
+
kind: 'condition';
|
|
28
|
+
first: FilterCondition;
|
|
29
|
+
join?: 'and' | 'or';
|
|
30
|
+
second?: FilterCondition;
|
|
31
|
+
};
|
|
32
|
+
export type AutoFilterState = {
|
|
33
|
+
/** The region, header row first. */
|
|
34
|
+
range: Rect;
|
|
35
|
+
/** Filters by column index; a column absent here shows every row. */
|
|
36
|
+
filters: Record<number, ColumnFilter>;
|
|
37
|
+
};
|
|
38
|
+
export type FilterValue = {
|
|
39
|
+
text: string;
|
|
40
|
+
count: number;
|
|
41
|
+
numeric: number | null;
|
|
42
|
+
};
|
|
43
|
+
/**
|
|
44
|
+
* The values a column offers, each once with its count: numbers first
|
|
45
|
+
* in order, then text A to Z, the blanks last. `rowVisible` leaves out the
|
|
46
|
+
* rows other columns' filters hide, as Excel's list does.
|
|
47
|
+
*/
|
|
48
|
+
export declare function distinctValues(state: AutoFilterState, col: number, valueAt: (r: number, c: number) => CellValue, displayAt: (r: number, c: number) => string, rowVisible?: (r: number) => boolean): FilterValue[];
|
|
49
|
+
/** Whether a row passes one column's filter. */
|
|
50
|
+
export declare function passesFilter(filter: ColumnFilter, value: CellValue, display: string): boolean;
|
|
51
|
+
/**
|
|
52
|
+
* The rows the state hides: every row of the region under the header
|
|
53
|
+
* that fails a column's filter. Blanks past the region's edge are not in
|
|
54
|
+
* it, as Excel's region is what was filtered.
|
|
55
|
+
*/
|
|
56
|
+
export declare function hiddenRowsFor(state: AutoFilterState | null, valueAt: (r: number, c: number) => CellValue, displayAt: (r: number, c: number) => string): Set<number>;
|
|
57
|
+
/** Whether any column is filtered. */
|
|
58
|
+
export declare function isFiltering(state: AutoFilterState | null): boolean;
|
|
59
|
+
/** The state with one column's filter set, or cleared with null. */
|
|
60
|
+
export declare function withColumnFilter(state: AutoFilterState, col: number, filter: ColumnFilter | null): AutoFilterState;
|
|
61
|
+
/** A values filter from the ticked list, or null when everything is ticked. */
|
|
62
|
+
export declare function valuesFilter(all: ReadonlyArray<string>, ticked: ReadonlySet<string>): ColumnFilter | null;
|
|
63
|
+
/** The state after an insert or delete: the region moves, the filters follow their columns. */
|
|
64
|
+
export declare function shiftAutoFilter(state: AutoFilterState | null, edit: StructuralEdit): AutoFilterState | null;
|
|
65
|
+
/** A filter in words, for the menu's heading. */
|
|
66
|
+
export declare function describeFilter(filter: ColumnFilter): string;
|
|
@@ -0,0 +1,147 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Excel's AutoFilter: arrows on the header row of a region, each opening a
|
|
3
|
+
* menu of the column's values to tick and untick, or a condition (equals,
|
|
4
|
+
* greater than, contains, between...), and the rows that fail fold away.
|
|
5
|
+
* The rows are hidden through the grid's collapsed rows, kept apart from
|
|
6
|
+
* the rows the user hid by hand so Unhide and the saved document see
|
|
7
|
+
* only those.
|
|
8
|
+
*
|
|
9
|
+
* This module is the pure part: the state, the values a column offers,
|
|
10
|
+
* which rows a state hides, and how the state moves with an insert or
|
|
11
|
+
* delete. Conditions run through the grid's own Excel-filter compiler, so
|
|
12
|
+
* the operator semantics are the ones the grid's filter row has.
|
|
13
|
+
*/
|
|
14
|
+
import { compileExcelFilter } from '@svgrid/grid/filtering';
|
|
15
|
+
import { isError } from './ast.js';
|
|
16
|
+
import { shiftRect, lineShift } from './rects.js';
|
|
17
|
+
/** The operators that compare as numbers; the rest compare the display text. */
|
|
18
|
+
const NUMERIC_OPS = new Set(['greaterThan', 'lessThan', 'between']);
|
|
19
|
+
/**
|
|
20
|
+
* The values a column offers, each once with its count: numbers first
|
|
21
|
+
* in order, then text A to Z, the blanks last. `rowVisible` leaves out the
|
|
22
|
+
* rows other columns' filters hide, as Excel's list does.
|
|
23
|
+
*/
|
|
24
|
+
export function distinctValues(state, col, valueAt, displayAt, rowVisible = () => true) {
|
|
25
|
+
const seen = new Map();
|
|
26
|
+
for (let r = state.range[0] + 1; r <= state.range[2]; r += 1) {
|
|
27
|
+
if (!rowVisible(r))
|
|
28
|
+
continue;
|
|
29
|
+
const text = displayAt(r, col);
|
|
30
|
+
const v = valueAt(r, col);
|
|
31
|
+
const entry = seen.get(text);
|
|
32
|
+
if (entry) {
|
|
33
|
+
entry.count += 1;
|
|
34
|
+
continue;
|
|
35
|
+
}
|
|
36
|
+
seen.set(text, { text, count: 1, numeric: typeof v === 'number' && Number.isFinite(v) ? v : null });
|
|
37
|
+
}
|
|
38
|
+
return [...seen.values()].sort((a, b) => {
|
|
39
|
+
if (a.text === '')
|
|
40
|
+
return 1;
|
|
41
|
+
if (b.text === '')
|
|
42
|
+
return -1;
|
|
43
|
+
if (a.numeric !== null && b.numeric !== null)
|
|
44
|
+
return a.numeric - b.numeric;
|
|
45
|
+
if (a.numeric !== null)
|
|
46
|
+
return -1;
|
|
47
|
+
if (b.numeric !== null)
|
|
48
|
+
return 1;
|
|
49
|
+
return a.text.localeCompare(b.text, undefined, { sensitivity: 'base' });
|
|
50
|
+
});
|
|
51
|
+
}
|
|
52
|
+
function passesCondition(cond, value, display) {
|
|
53
|
+
const test = compileExcelFilter({ id: 'f', operator: cond.op, value: cond.value, valueTo: cond.valueTo });
|
|
54
|
+
if (NUMERIC_OPS.has(cond.op)) {
|
|
55
|
+
if (typeof value !== 'number' || !Number.isFinite(value))
|
|
56
|
+
return false;
|
|
57
|
+
return test(value);
|
|
58
|
+
}
|
|
59
|
+
if (cond.op === 'isBlank' || cond.op === 'isNotBlank')
|
|
60
|
+
return test(display === '' ? null : display);
|
|
61
|
+
return test(isError(value) ? value.error : display);
|
|
62
|
+
}
|
|
63
|
+
/** Whether a row passes one column's filter. */
|
|
64
|
+
export function passesFilter(filter, value, display) {
|
|
65
|
+
if (filter.kind === 'values')
|
|
66
|
+
return !filter.excluded.includes(display);
|
|
67
|
+
const first = passesCondition(filter.first, value, display);
|
|
68
|
+
if (!filter.second)
|
|
69
|
+
return first;
|
|
70
|
+
const second = passesCondition(filter.second, value, display);
|
|
71
|
+
return filter.join === 'or' ? first || second : first && second;
|
|
72
|
+
}
|
|
73
|
+
/**
|
|
74
|
+
* The rows the state hides: every row of the region under the header
|
|
75
|
+
* that fails a column's filter. Blanks past the region's edge are not in
|
|
76
|
+
* it, as Excel's region is what was filtered.
|
|
77
|
+
*/
|
|
78
|
+
export function hiddenRowsFor(state, valueAt, displayAt) {
|
|
79
|
+
const out = new Set();
|
|
80
|
+
if (!state)
|
|
81
|
+
return out;
|
|
82
|
+
const columns = Object.entries(state.filters).map(([c, f]) => [Number(c), f]);
|
|
83
|
+
if (!columns.length)
|
|
84
|
+
return out;
|
|
85
|
+
for (let r = state.range[0] + 1; r <= state.range[2]; r += 1) {
|
|
86
|
+
for (const [c, filter] of columns) {
|
|
87
|
+
if (!passesFilter(filter, valueAt(r, c), displayAt(r, c))) {
|
|
88
|
+
out.add(r);
|
|
89
|
+
break;
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
return out;
|
|
94
|
+
}
|
|
95
|
+
/** Whether any column is filtered. */
|
|
96
|
+
export function isFiltering(state) {
|
|
97
|
+
return !!state && Object.keys(state.filters).length > 0;
|
|
98
|
+
}
|
|
99
|
+
/** The state with one column's filter set, or cleared with null. */
|
|
100
|
+
export function withColumnFilter(state, col, filter) {
|
|
101
|
+
const filters = { ...state.filters };
|
|
102
|
+
if (filter === null)
|
|
103
|
+
delete filters[col];
|
|
104
|
+
else
|
|
105
|
+
filters[col] = filter;
|
|
106
|
+
return { range: state.range, filters };
|
|
107
|
+
}
|
|
108
|
+
/** A values filter from the ticked list, or null when everything is ticked. */
|
|
109
|
+
export function valuesFilter(all, ticked) {
|
|
110
|
+
const excluded = all.filter((text) => !ticked.has(text));
|
|
111
|
+
return excluded.length ? { kind: 'values', excluded } : null;
|
|
112
|
+
}
|
|
113
|
+
/** The state after an insert or delete: the region moves, the filters follow their columns. */
|
|
114
|
+
export function shiftAutoFilter(state, edit) {
|
|
115
|
+
if (!state)
|
|
116
|
+
return null;
|
|
117
|
+
const range = shiftRect(state.range, edit);
|
|
118
|
+
if (!range)
|
|
119
|
+
return null;
|
|
120
|
+
if (edit.kind === 'insertRows' || edit.kind === 'deleteRows')
|
|
121
|
+
return { range, filters: { ...state.filters } };
|
|
122
|
+
const shift = lineShift(edit);
|
|
123
|
+
const filters = {};
|
|
124
|
+
for (const [c, f] of Object.entries(state.filters)) {
|
|
125
|
+
const next = shift(Number(c));
|
|
126
|
+
if (next !== null)
|
|
127
|
+
filters[next] = f;
|
|
128
|
+
}
|
|
129
|
+
return { range, filters };
|
|
130
|
+
}
|
|
131
|
+
const OP_WORDS = {
|
|
132
|
+
equals: 'equals', notEquals: 'does not equal', greaterThan: 'is greater than', lessThan: 'is less than',
|
|
133
|
+
between: 'is between', contains: 'contains', notContains: 'does not contain', startsWith: 'begins with',
|
|
134
|
+
endsWith: 'ends with', isBlank: 'is blank', isNotBlank: 'is not blank',
|
|
135
|
+
};
|
|
136
|
+
/** A filter in words, for the menu's heading. */
|
|
137
|
+
export function describeFilter(filter) {
|
|
138
|
+
if (filter.kind === 'values')
|
|
139
|
+
return filter.excluded.length === 1 ? '1 value hidden' : `${filter.excluded.length} values hidden`;
|
|
140
|
+
const one = (c) => {
|
|
141
|
+
const word = OP_WORDS[c.op] ?? c.op;
|
|
142
|
+
if (c.op === 'isBlank' || c.op === 'isNotBlank')
|
|
143
|
+
return word;
|
|
144
|
+
return c.op === 'between' ? `${word} ${c.value ?? ''} and ${c.valueTo ?? ''}` : `${word} ${c.value ?? ''}`;
|
|
145
|
+
};
|
|
146
|
+
return filter.second ? `${one(filter.first)} ${filter.join ?? 'and'} ${one(filter.second)}` : one(filter.first);
|
|
147
|
+
}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
export type FunctionSuggestion = {
|
|
2
|
+
name: string;
|
|
3
|
+
/** Where the partial name starts, so accepting can splice it out. */
|
|
4
|
+
start: number;
|
|
5
|
+
/** Where the caret is, i.e. where the partial name ends. */
|
|
6
|
+
end: number;
|
|
7
|
+
};
|
|
8
|
+
/** Signature hints, for the ones whose argument order is not obvious. */
|
|
9
|
+
export declare const SIGNATURES: Record<string, string>;
|
|
10
|
+
/**
|
|
11
|
+
* The word being typed immediately before the caret, if it could be a function
|
|
12
|
+
* name. Returns null when the caret is not in a formula, or sits somewhere a
|
|
13
|
+
* function name cannot start (inside a string, or right after a reference).
|
|
14
|
+
*/
|
|
15
|
+
export declare function partialAt(text: string, caret: number): {
|
|
16
|
+
word: string;
|
|
17
|
+
start: number;
|
|
18
|
+
} | null;
|
|
19
|
+
/**
|
|
20
|
+
* Function names matching what is being typed.
|
|
21
|
+
*
|
|
22
|
+
* Prefix matches first, then anything merely containing the text, so typing
|
|
23
|
+
* "look" still finds VLOOKUP. Within each group, SHORTER names rank first:
|
|
24
|
+
* alphabetical order puts SUBSTITUTE above SUM for "SU", which is exactly
|
|
25
|
+
* backwards from what someone typing two letters wants.
|
|
26
|
+
*/
|
|
27
|
+
export declare function suggestFunctions(text: string, caret: number, limit?: number): FunctionSuggestion[];
|
|
28
|
+
/** Splice an accepted suggestion in, leaving the caret inside the parens. */
|
|
29
|
+
export declare function applySuggestion(text: string, suggestion: FunctionSuggestion): {
|
|
30
|
+
text: string;
|
|
31
|
+
caret: number;
|
|
32
|
+
};
|
|
33
|
+
/**
|
|
34
|
+
* Close the parentheses a formula left open, the way Excel corrects
|
|
35
|
+
* "=SUM(A1:A3" to "=SUM(A1:A3)" when it is entered. Quoted text is skipped,
|
|
36
|
+
* so a ")" inside a string neither closes nor needs closing. Text that is
|
|
37
|
+
* not a formula, or has more closers than openers, is returned as it is:
|
|
38
|
+
* that one is an error the engine should report, not paper over.
|
|
39
|
+
*/
|
|
40
|
+
export declare function balanceParens(text: string): string;
|
|
41
|
+
/** The signature hint for whatever call the caret is inside, if any. */
|
|
42
|
+
export declare function signatureAt(text: string, caret: number): string | null;
|