@svgrid/enterprise 3.0.2 → 3.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +94 -24
- package/README.md +36 -4
- package/dist/SvAdvancedFilter.svelte +1 -1
- package/dist/SvAlertsManager.svelte +2 -1
- package/dist/SvBoard.svelte +2 -1
- package/dist/SvExportMenu.svelte +4 -1
- package/dist/SvExportMenu.svelte.d.ts +0 -13
- package/dist/SvExpressionEditor.svelte +3 -3
- package/dist/SvFormulaBar.svelte +94 -20
- package/dist/SvFormulaBar.svelte.d.ts +7 -0
- package/dist/SvGridAlerts.svelte +49 -9
- package/dist/SvGridBoard.svelte +13 -8
- package/dist/SvGridBulkEditDrawer.svelte +26 -2
- package/dist/SvGridEditPanel.svelte +3 -0
- package/dist/SvGridScheduler.svelte +69 -40
- package/dist/SvGridSelectionBar.svelte +10 -3
- package/dist/SvPivotDesigner.svelte +198 -40
- package/dist/SvPivotDesigner.svelte.d.ts +27 -20
- package/dist/SvSheet.svelte +4043 -243
- package/dist/SvSheet.svelte.d.ts +76 -3
- package/dist/SvSheetChartSetup.svelte +151 -0
- package/dist/SvSheetChartSetup.svelte.d.ts +18 -0
- package/dist/SvSheetComment.svelte +216 -31
- package/dist/SvSheetComment.svelte.d.ts +11 -11
- package/dist/SvSheetConditionalFormat.svelte +28 -31
- package/dist/SvSheetDataValidation.svelte +66 -42
- package/dist/SvSheetEditRanges.svelte +217 -0
- package/dist/SvSheetEditRanges.svelte.d.ts +15 -0
- package/dist/SvSheetErrors.svelte +125 -0
- package/dist/SvSheetErrors.svelte.d.ts +20 -0
- package/dist/SvSheetEvaluate.svelte +133 -0
- package/dist/SvSheetEvaluate.svelte.d.ts +15 -0
- package/dist/SvSheetFilterMenu.svelte +137 -34
- package/dist/SvSheetFilterMenu.svelte.d.ts +5 -0
- package/dist/SvSheetFindReplace.svelte +19 -19
- package/dist/SvSheetFormatCells.svelte +125 -81
- package/dist/SvSheetGoalSeek.svelte +17 -16
- package/dist/SvSheetInsertFunction.svelte +15 -13
- package/dist/SvSheetIteration.svelte +81 -0
- package/dist/SvSheetIteration.svelte.d.ts +10 -0
- package/dist/SvSheetLink.svelte +99 -0
- package/dist/SvSheetLink.svelte.d.ts +17 -0
- package/dist/SvSheetListPicker.svelte +4 -2
- package/dist/SvSheetListPicker.svelte.d.ts +0 -6
- package/dist/SvSheetManageRules.svelte +20 -18
- package/dist/SvSheetNameManager.svelte +17 -15
- package/dist/SvSheetPageSetup.svelte +159 -0
- package/dist/SvSheetPageSetup.svelte.d.ts +13 -0
- package/dist/SvSheetPasteSpecial.svelte +22 -20
- package/dist/SvSheetPivot.svelte +220 -0
- package/dist/SvSheetPivot.svelte.d.ts +21 -0
- package/dist/SvSheetProtectSheet.svelte +81 -0
- package/dist/SvSheetProtectSheet.svelte.d.ts +11 -0
- package/dist/SvSheetRemoveDuplicates.svelte +13 -10
- package/dist/SvSheetRibbon.svelte +104 -51
- package/dist/SvSheetSizeDialog.svelte +4 -2
- package/dist/SvSheetSort.svelte +218 -0
- package/dist/SvSheetSort.svelte.d.ts +28 -0
- package/dist/SvSheetSparklines.svelte +135 -0
- package/dist/SvSheetSparklines.svelte.d.ts +14 -0
- package/dist/SvSheetTable.svelte +160 -0
- package/dist/SvSheetTable.svelte.d.ts +24 -0
- package/dist/SvSheetTabs.svelte +161 -31
- package/dist/SvSheetTabs.svelte.d.ts +22 -8
- package/dist/SvSheetTextToColumns.svelte +20 -20
- package/dist/SvSheetValidationAlert.svelte +8 -6
- package/dist/advanced-filter-enable.js +1 -1
- package/dist/alerts/alert-engine.d.ts +6 -0
- package/dist/alerts/alert-engine.js +21 -4
- package/dist/alerts/alert-formats.js +2 -0
- package/dist/alerts/alert-types.d.ts +1 -1
- package/dist/alerts.d.ts +1 -1
- package/dist/alerts.js +2 -2
- package/dist/board.js +2 -2
- package/dist/bulk-edit.d.ts +3 -1
- package/dist/bulk-edit.js +1 -1
- package/dist/cdn/svgrid-enterprise.svelte-external.js +39827 -16429
- package/dist/designer/assets/GridMenus-8gTNssgV.js +8 -0
- package/dist/designer/assets/{SvChartMenu-D9hEeHar.js → SvChartMenu-BDoeqGz6.js} +1 -1
- package/dist/designer/assets/{SvDateTimePicker-DARvKUL2.js → SvDateTimePicker-DCPg7WGN.js} +1 -1
- package/dist/designer/assets/SvGridCellEditor-DMoWJjEI.js +4 -0
- package/dist/designer/assets/{SvGridChart-B8j1SSy3.js → SvGridChart-Cy1ATrWh.js} +2 -2
- package/dist/designer/assets/SvGridChartBuilder-eQ3mn0L9.js +1 -0
- package/dist/designer/assets/{SvGridChartPanel-pT6ITc2P.js → SvGridChartPanel-CATdVc9X.js} +3 -3
- package/dist/designer/assets/{SvGridChartView-bg281UA1.js → SvGridChartView-CmsZtCED.js} +1 -1
- package/dist/designer/assets/SvGridDropdown-Cjz0H-fI.js +1 -0
- package/dist/designer/assets/{SvTabs-UFCMTHXS.js → SvTabs-2mHC6oaz.js} +1 -1
- package/dist/designer/assets/cell-formatting-BbubJTVz.js +1 -0
- package/dist/designer/assets/{chart-cIPUsbM5.js → chart-Cn7MnNqA.js} +1 -1
- package/dist/designer/assets/{chart-panel-messages-DtTxpBUU.js → chart-panel-messages-Dz7PTIqT.js} +1 -1
- package/dist/designer/assets/{chart-summary-Czu_5epb.js → chart-summary-BD1qYB2R.js} +1 -1
- package/dist/designer/assets/{chart-trend-D5I5VEe8.js → chart-trend-B8xr5LuD.js} +1 -1
- package/dist/designer/assets/{dismissable-BO547MH9.js → dismissable-ChWRPkoa.js} +1 -1
- package/dist/designer/assets/{export-format-D-eP4b2l.js → export-format-DGckmgKr.js} +1 -1
- package/dist/designer/assets/{focus-trap-CAreAhlU.js → focus-trap-V2-6Fy9I.js} +1 -1
- package/dist/designer/assets/{index-DwU7CAMm.js → index-D5bVbuzI.js} +317 -315
- package/dist/designer/assets/index-_JVFxt02.css +1 -0
- package/dist/designer/assets/row-resize-BInFWCpr.js +1 -0
- package/dist/designer/assets/server-block-cache-CXJKkJpy.js +1 -0
- package/dist/designer/assets/src-DUQ4xE3x.js +58 -0
- package/dist/designer/assets/validate-C3B8QKsM.js +1 -0
- package/dist/designer/index.html +17 -16
- package/dist/export-pdf.d.ts +75 -0
- package/dist/export-pdf.js +216 -15
- package/dist/export.js +10 -2
- package/dist/gantt/SvGridGantt.svelte +2890 -0
- package/dist/gantt/SvGridGantt.svelte.d.ts +30 -0
- package/dist/gantt/gantt-config.d.ts +73 -0
- package/dist/gantt/gantt-config.js +1 -0
- package/dist/gantt/gantt-critical-path.d.ts +67 -0
- package/dist/gantt/gantt-critical-path.js +207 -0
- package/dist/gantt/gantt-model.d.ts +257 -0
- package/dist/gantt/gantt-model.js +651 -0
- package/dist/gantt/gantt-resources.d.ts +59 -0
- package/dist/gantt/gantt-resources.js +71 -0
- package/dist/gantt/gantt.d.ts +7 -0
- package/dist/gantt/gantt.js +36 -0
- package/dist/gantt/index.d.ts +15 -0
- package/dist/gantt/index.js +22 -0
- package/dist/gantt/timeline-arrows.d.ts +102 -0
- package/dist/gantt/timeline-arrows.js +181 -0
- package/dist/import.d.ts +2 -2
- package/dist/import.js +1 -1
- package/dist/index.d.ts +34 -7
- package/dist/index.js +44 -7
- package/dist/install.js +8 -1
- package/dist/license-core.d.ts +17 -1
- package/dist/license-core.js +16 -5
- package/dist/license.d.ts +18 -2
- package/dist/license.js +71 -6
- package/dist/node/studio.js +140 -8
- package/dist/pivot-enable.js +2 -2
- package/dist/scheduler-dependencies.d.ts +35 -0
- package/dist/scheduler-dependencies.js +36 -1
- package/dist/scheduler.js +2 -2
- package/dist/selection-bar.js +2 -2
- package/dist/server/SvGroupCell.svelte +213 -0
- package/dist/server/SvGroupCell.svelte.d.ts +62 -0
- package/dist/server/SvRowGroupPanel.svelte +322 -0
- package/dist/server/SvRowGroupPanel.svelte.d.ts +37 -0
- package/dist/server/enable.d.ts +17 -0
- package/dist/server/enable.js +49 -0
- package/dist/server/index.d.ts +22 -0
- package/dist/server/index.js +24 -0
- package/dist/server/messages.d.ts +45 -0
- package/dist/server/messages.js +35 -0
- package/dist/server/server-group-model.d.ts +104 -0
- package/dist/server/server-group-model.js +272 -0
- package/dist/server/server-pivot.d.ts +46 -0
- package/dist/server/server-pivot.js +57 -0
- package/dist/server/server-row-model.d.ts +547 -0
- package/dist/server/server-row-model.js +1551 -0
- package/dist/server/server-selection.d.ts +99 -0
- package/dist/server/server-selection.js +215 -0
- package/dist/server/svgrid-adapter.d.ts +155 -0
- package/dist/server/svgrid-adapter.js +202 -0
- package/dist/sheet/ast.d.ts +45 -1
- package/dist/sheet/ast.js +14 -0
- package/dist/sheet/auto-filter.d.ts +58 -4
- package/dist/sheet/auto-filter.js +159 -11
- package/dist/sheet/autocomplete.d.ts +9 -0
- package/dist/sheet/autocomplete.js +90 -4
- package/dist/sheet/cell-images.d.ts +39 -0
- package/dist/sheet/cell-images.js +90 -0
- package/dist/sheet/cell-types.d.ts +58 -0
- package/dist/sheet/cell-types.js +96 -0
- package/dist/sheet/coerce.d.ts +40 -0
- package/dist/sheet/coerce.js +170 -3
- package/dist/sheet/comments.d.ts +43 -9
- package/dist/sheet/comments.js +85 -27
- package/dist/sheet/conditional-formats.d.ts +29 -6
- package/dist/sheet/conditional-formats.js +37 -12
- package/dist/sheet/csv.d.ts +32 -0
- package/dist/sheet/csv.js +158 -0
- package/dist/sheet/culture.d.ts +87 -0
- package/dist/sheet/culture.js +247 -0
- package/dist/sheet/delta.d.ts +102 -0
- package/dist/sheet/delta.js +203 -0
- package/dist/sheet/deps.d.ts +45 -1
- package/dist/sheet/deps.js +77 -2
- package/dist/sheet/document.d.ts +106 -4
- package/dist/sheet/document.js +204 -3
- package/dist/sheet/engine.d.ts +67 -0
- package/dist/sheet/engine.js +19 -0
- package/dist/sheet/entry.d.ts +8 -4
- package/dist/sheet/entry.js +171 -21
- package/dist/sheet/error-check.d.ts +49 -0
- package/dist/sheet/error-check.js +83 -0
- package/dist/sheet/evaluate-steps.d.ts +48 -0
- package/dist/sheet/evaluate-steps.js +196 -0
- package/dist/sheet/evaluate.d.ts +67 -0
- package/dist/sheet/evaluate.js +725 -13
- package/dist/sheet/filter-files.d.ts +37 -0
- package/dist/sheet/filter-files.js +465 -0
- package/dist/sheet/format-store.d.ts +15 -0
- package/dist/sheet/format-store.js +11 -1
- package/dist/sheet/from-rows.d.ts +14 -0
- package/dist/sheet/from-rows.js +50 -0
- package/dist/sheet/function-catalog.d.ts +1 -1
- package/dist/sheet/function-catalog.js +296 -5
- package/dist/sheet/functions.js +363 -91
- package/dist/sheet/index.d.ts +35 -8
- package/dist/sheet/index.js +35 -8
- package/dist/sheet/links.d.ts +57 -0
- package/dist/sheet/links.js +174 -0
- package/dist/sheet/messages.d.ts +778 -0
- package/dist/sheet/messages.js +806 -0
- package/dist/sheet/number-format.d.ts +52 -5
- package/dist/sheet/number-format.js +465 -68
- package/dist/sheet/objects.d.ts +106 -0
- package/dist/sheet/objects.js +149 -0
- package/dist/sheet/ods-document.d.ts +44 -0
- package/dist/sheet/ods-document.js +1275 -0
- package/dist/sheet/open-file.d.ts +26 -0
- package/dist/sheet/open-file.js +56 -0
- package/dist/sheet/outline.d.ts +82 -0
- package/dist/sheet/outline.js +228 -0
- package/dist/sheet/packs/array.d.ts +16 -0
- package/dist/sheet/packs/array.js +172 -0
- package/dist/sheet/packs/database.d.ts +42 -0
- package/dist/sheet/packs/database.js +142 -0
- package/dist/sheet/packs/engineering.d.ts +2 -0
- package/dist/sheet/packs/engineering.js +296 -0
- package/dist/sheet/packs/financial.d.ts +5 -0
- package/dist/sheet/packs/financial.js +220 -0
- package/dist/sheet/packs/math-stats.d.ts +2 -0
- package/dist/sheet/packs/math-stats.js +372 -0
- package/dist/sheet/packs/special.d.ts +44 -0
- package/dist/sheet/packs/special.js +187 -0
- package/dist/sheet/packs/stats-dist.d.ts +2 -0
- package/dist/sheet/packs/stats-dist.js +785 -0
- package/dist/sheet/packs/text-date.d.ts +2 -0
- package/dist/sheet/packs/text-date.js +332 -0
- package/dist/sheet/packs/trig.d.ts +2 -0
- package/dist/sheet/packs/trig.js +73 -0
- package/dist/sheet/page-setup.d.ts +73 -0
- package/dist/sheet/page-setup.js +73 -0
- package/dist/sheet/parse.js +42 -10
- package/dist/sheet/paste-special.d.ts +22 -0
- package/dist/sheet/paste-special.js +14 -5
- package/dist/sheet/pivot-range.d.ts +160 -0
- package/dist/sheet/pivot-range.js +333 -0
- package/dist/sheet/presence.d.ts +73 -0
- package/dist/sheet/presence.js +79 -0
- package/dist/sheet/print.d.ts +104 -0
- package/dist/sheet/print.js +169 -0
- package/dist/sheet/protection.d.ts +55 -1
- package/dist/sheet/protection.js +55 -2
- package/dist/sheet/rects.d.ts +1 -1
- package/dist/sheet/refs.d.ts +48 -0
- package/dist/sheet/refs.js +155 -8
- package/dist/sheet/ribbon-icons.d.ts +1 -1
- package/dist/sheet/ribbon-icons.js +186 -0
- package/dist/sheet/ribbon.d.ts +1 -1
- package/dist/sheet/ribbon.js +324 -23
- package/dist/sheet/sheet-kinds.d.ts +74 -0
- package/dist/sheet/sheet-kinds.js +91 -0
- package/dist/sheet/shortcuts.d.ts +13 -3
- package/dist/sheet/shortcuts.js +63 -12
- package/dist/sheet/sort.d.ts +51 -0
- package/dist/sheet/sort.js +107 -0
- package/dist/sheet/sparklines.d.ts +111 -0
- package/dist/sheet/sparklines.js +204 -0
- package/dist/sheet/table-styles.d.ts +74 -0
- package/dist/sheet/table-styles.js +152 -0
- package/dist/sheet/tables.d.ts +19 -0
- package/dist/sheet/tables.js +31 -0
- package/dist/sheet/tokenize.d.ts +18 -1
- package/dist/sheet/tokenize.js +60 -9
- package/dist/sheet/validation.d.ts +16 -0
- package/dist/sheet/validation.js +37 -0
- package/dist/sheet/workbook.d.ts +148 -3
- package/dist/sheet/workbook.js +742 -31
- package/dist/sheet/xls-cfb.d.ts +32 -0
- package/dist/sheet/xls-cfb.js +290 -0
- package/dist/sheet/xls-document.d.ts +10 -0
- package/dist/sheet/xls-document.js +1243 -0
- package/dist/sheet/xls-formula.d.ts +40 -0
- package/dist/sheet/xls-formula.js +569 -0
- package/dist/sheet/xlsx-document.d.ts +108 -0
- package/dist/sheet/xlsx-document.js +1849 -0
- package/dist/sheet/xlsx-drawing.d.ts +99 -0
- package/dist/sheet/xlsx-drawing.js +420 -0
- package/dist/sheet-enable.js +6 -7
- package/dist/sheet-text.d.ts +7 -0
- package/dist/sheet-text.js +29 -0
- package/dist/sources/auth-supabase.js +2 -2
- package/dist/sources/realtime-supabase.js +2 -2
- package/dist/sources/rest.d.ts +6 -2
- package/dist/sources/rest.js +42 -7
- package/dist/sources/supabase.d.ts +10 -1
- package/dist/sources/supabase.js +73 -40
- package/dist/studio/emit-project.js +14 -1
- package/dist/studio/index.js +1 -1
- package/dist/studio/project.d.ts +11 -2
- package/dist/studio/project.js +5 -2
- package/dist/studio/ui-components.generated.js +107 -2
- package/dist/sveltekit/in-memory.d.ts +2 -2
- package/dist/sveltekit/in-memory.js +125 -4
- package/dist/sveltekit/index.d.ts +1 -1
- package/dist/sveltekit/index.js +1 -1
- package/dist/sveltekit/query-plan.d.ts +50 -4
- package/dist/sveltekit/query-plan.js +25 -3
- package/dist/sveltekit/sql-source.d.ts +6 -0
- package/dist/sveltekit/sql-source.js +34 -6
- package/dist/sveltekit/sql.d.ts +31 -0
- package/dist/sveltekit/sql.js +135 -25
- package/dist/sveltekit/transport.d.ts +10 -2
- package/dist/sveltekit/transport.js +30 -6
- package/dist/upgrade-prompt.d.ts +1 -1
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/dist/watermark.js +35 -2
- package/dist/wc/GridMenus-By9vPuq0.js +1088 -0
- package/dist/wc/SvChartMenu-CQNrQGT2.js +308 -0
- package/dist/wc/SvDateRangeInput-DR6m7bSM.js +199 -0
- package/dist/wc/SvDateTimePicker-D-vRnaMo.js +771 -0
- package/dist/wc/SvField-B_kurx_P.js +149 -0
- package/dist/wc/SvGrid.helpers-BdVDtjUm.js +135 -0
- package/dist/wc/SvGridCellEditor-Bnf1Kr5C.js +560 -0
- package/dist/wc/SvGridChart-BqUJh2pG.js +3572 -0
- package/dist/wc/SvGridChartBuilder-CGycC5cn.js +988 -0
- package/dist/wc/SvGridChartPanel-CRnizsHD.js +1746 -0
- package/dist/wc/SvGridChartView-D1pa_xMy.js +47 -0
- package/dist/wc/SvGridDropdown-45WsObLL.js +259 -0
- package/dist/wc/SvModal-DrfOYYyX.js +189 -0
- package/dist/wc/cell-formatting-CBfgahv1.js +86 -0
- package/dist/wc/chart-6OXlybVT.js +4341 -0
- package/dist/wc/chart-export-CeSADGfi.js +135 -0
- package/dist/wc/chart-export-pdf-BGko7MER.js +104 -0
- package/dist/wc/chart-summary-2m3ia1-n.js +137 -0
- package/dist/wc/chart-trend-CQOQtTMl.js +50 -0
- package/dist/wc/chart-validate-CD6ptiwg.js +180 -0
- package/dist/wc/client-DQIzjDBG.js +3064 -0
- package/dist/wc/column-resize-DUPgynvc.js +101 -0
- package/dist/wc/date-format-DS-z_h9v.js +1130 -0
- package/dist/wc/dismissable-CQ6XFXsk.js +45 -0
- package/dist/wc/editor-contract-peBDxir_.js +22 -0
- package/dist/wc/editor-registry-DxGKqcvx.js +24 -0
- package/dist/wc/focus-trap-Dbb2tJxb.js +65 -0
- package/dist/wc/list-option-DrRyivWp.js +82 -0
- package/dist/wc/popover-WsGlvtQv.js +69 -0
- package/dist/wc/positioning-BiKLfu1E.js +112 -0
- package/dist/wc/react.d.ts +41 -0
- package/dist/wc/react.js +90 -0
- package/dist/wc/rolldown-runtime-Dy4uBu1J.js +11 -0
- package/dist/wc/row-drag-touch-CycRR65n.js +93 -0
- package/dist/wc/row-resize-limG_N1z.js +111 -0
- package/dist/wc/sv-sheet-element.d.ts +97 -0
- package/dist/wc/sv-sheet-element.js +44213 -0
- package/dist/wc/svelte-virtualizer.svelte-CXtQy2TQ.js +530 -0
- package/dist/wc/validate-BqDthkNr.js +88 -0
- package/dist/wc/vue.d.ts +31 -0
- package/dist/wc/vue.js +75 -0
- package/package.json +30 -5
- package/dist/designer/assets/GridMenus-BlsvL_aU.js +0 -8
- package/dist/designer/assets/SvGridCellEditor-C7uQXYds.js +0 -4
- package/dist/designer/assets/SvGridChartBuilder-kvyIU_Rl.js +0 -1
- package/dist/designer/assets/SvGridDropdown-Bb3HH2Aj.js +0 -1
- package/dist/designer/assets/cell-formatting-wr5wm7US.js +0 -1
- package/dist/designer/assets/index-CMFgAoVV.css +0 -1
- package/dist/designer/assets/row-resize-DLktcqUK.js +0 -1
- package/dist/designer/assets/src-EdI3Xqds.js +0 -58
- package/dist/designer/assets/validate-h-aslRV9.js +0 -1
package/LICENSE
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
SVGRID ENTERPRISE COMMERCIAL LICENSE
|
|
2
|
-
Version 1.
|
|
2
|
+
Version 1.1
|
|
3
3
|
|
|
4
4
|
Copyright (c) 2011-2026 jQWidgets Ltd.
|
|
5
5
|
Author contact: Boyko Markov <boikom@jqwidgets.com>
|
|
@@ -13,7 +13,7 @@ This file is a summary of the commercial terms. The full, authoritative
|
|
|
13
13
|
agreement is the SvGrid End User License Agreement (EULA). In case of any
|
|
14
14
|
conflict, the EULA governs.
|
|
15
15
|
|
|
16
|
-
EULA: https://svgrid.com/
|
|
16
|
+
EULA: https://svgrid.com/docs/legal/EULA/ (also docs/legal/EULA.md in the repo)
|
|
17
17
|
|
|
18
18
|
------------------------------------------------------------------------
|
|
19
19
|
1. GRANT (with valid license key)
|
|
@@ -30,23 +30,80 @@ non-exclusive, non-transferable, non-sublicensable license to:
|
|
|
30
30
|
that all copyright notices and license terms are preserved;
|
|
31
31
|
(c) distribute the Software bundled inside the Subscriber's own
|
|
32
32
|
application, provided the Software is not the primary product
|
|
33
|
-
distributed
|
|
33
|
+
distributed, that it remains under this License, and that the
|
|
34
|
+
distribution is not one of the cases in Section 1A.
|
|
34
35
|
|
|
35
|
-
|
|
36
|
+
License scope is set by the Subscriber's order:
|
|
36
37
|
|
|
37
|
-
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
38
|
+
- Grid Developer License: the Software excluding the Spreadsheet
|
|
39
|
+
Module and the Studio, on unlimited deployed production
|
|
40
|
+
applications within the Subscriber's organization, plus unlimited
|
|
41
|
+
internal dev / staging environments.
|
|
42
|
+
- Suite Developer License: the Software in full, including the
|
|
43
|
+
Spreadsheet Module and the Studio, on the same unlimited scope.
|
|
41
44
|
- Enterprise / Custom (Site or Org-wide): scope per the negotiated
|
|
42
45
|
order or master agreement.
|
|
46
|
+
- OEM License: the redistribution cases in Section 1A.
|
|
47
|
+
|
|
48
|
+
The "Spreadsheet Module" is the workbook, formula engine and
|
|
49
|
+
spreadsheet file-format features: <SvSheet>, the <sv-sheet> element,
|
|
50
|
+
the formula evaluator, and the .xlsx / .xls / .ods / .csv readers and
|
|
51
|
+
writers. The "Studio" is the designer, the code generator and the SQL
|
|
52
|
+
data sources.
|
|
53
|
+
|
|
54
|
+
Using the Spreadsheet Module or the Studio under a Grid Developer
|
|
55
|
+
License is outside the licensed scope. The Software does not block it:
|
|
56
|
+
the feature runs, and the watermark and the console notice described in
|
|
57
|
+
Section 4 show until the license is upgraded to Suite.
|
|
58
|
+
|
|
59
|
+
------------------------------------------------------------------------
|
|
60
|
+
1A. OEM AND REDISTRIBUTION
|
|
61
|
+
------------------------------------------------------------------------
|
|
62
|
+
|
|
63
|
+
Section 1(c) covers the ordinary case, in which the Subscriber ships
|
|
64
|
+
its own application and the Software is one component inside it. An OEM
|
|
65
|
+
License, negotiated separately with the Author, is required where:
|
|
66
|
+
|
|
67
|
+
(a) the Subscriber distributes the Software, or any part of it, to
|
|
68
|
+
third parties as a component, library, SDK, template, or building
|
|
69
|
+
block those third parties use to build their own applications;
|
|
70
|
+
(b) the Subscriber's product is a platform, application builder,
|
|
71
|
+
low-code or no-code tool, or development environment in which the
|
|
72
|
+
Subscriber's own customers author applications, reports, or
|
|
73
|
+
workbooks that render through the Software;
|
|
74
|
+
(c) the Subscriber sublicenses, resells, or white-labels the Software
|
|
75
|
+
under another name;
|
|
76
|
+
(d) the Subscriber deploys the Software in a multi-tenant hosted
|
|
77
|
+
product in which the Spreadsheet Module or the Studio is a
|
|
78
|
+
material part of what the Subscriber's customers pay for.
|
|
79
|
+
|
|
80
|
+
An OEM License is priced separately from developer seats, is granted
|
|
81
|
+
for a defined term and a defined product, and may carry a
|
|
82
|
+
redistribution volume or royalty basis recorded in the order. Developer
|
|
83
|
+
seats do not convey these rights, however many are purchased.
|
|
84
|
+
|
|
85
|
+
For the avoidance of doubt, ordinary business software sold to
|
|
86
|
+
customers is covered by Section 1(c). A SaaS application whose users
|
|
87
|
+
view, edit and export their own data in a grid or a workbook is the
|
|
88
|
+
Subscriber's own application, not redistribution. The test is whether
|
|
89
|
+
third parties receive the Software as something they build with, not
|
|
90
|
+
whether the Subscriber charges for its product.
|
|
91
|
+
|
|
92
|
+
The evaluation in Section 4 does not pass through an OEM product to its
|
|
93
|
+
users: a product that needs an OEM License may not rely on the
|
|
94
|
+
unlicensed state, an evaluation key or a development key for what it
|
|
95
|
+
delivers to third parties, and only the key an OEM License names may be
|
|
96
|
+
embedded in it.
|
|
97
|
+
|
|
98
|
+
Requests: sales@jqwidgets.com.
|
|
43
99
|
|
|
44
100
|
------------------------------------------------------------------------
|
|
45
101
|
2. SEATS
|
|
46
102
|
------------------------------------------------------------------------
|
|
47
103
|
|
|
48
|
-
The Software is licensed per developer. The number of seats
|
|
49
|
-
the Subscriber's order.
|
|
104
|
+
The Software is licensed per developer. The number of seats and the
|
|
105
|
+
edition, Grid or Suite, are set by the Subscriber's order. All seats on
|
|
106
|
+
one order share one edition. A "developer" is any individual who writes or
|
|
50
107
|
modifies source code that imports `@svgrid/enterprise`. Read-only users
|
|
51
108
|
and end users do not count toward seats and are unlimited. One license
|
|
52
109
|
key activates every grid instance in scope; there is no per-page or
|
|
@@ -73,23 +130,32 @@ The Author will not disable working features of a paying or previously
|
|
|
73
130
|
paying Subscriber.
|
|
74
131
|
|
|
75
132
|
------------------------------------------------------------------------
|
|
76
|
-
4. EVALUATION
|
|
133
|
+
4. EVALUATION AND OPEN SOURCE
|
|
77
134
|
------------------------------------------------------------------------
|
|
78
135
|
|
|
79
|
-
The
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
136
|
+
The Author grants a 30-day evaluation period. During it every feature,
|
|
137
|
+
the Spreadsheet Module and the Studio included, may be used without a
|
|
138
|
+
license key to decide whether to buy, on workstations and in internal
|
|
139
|
+
development, staging and demonstration environments; production use
|
|
140
|
+
needs a license key. Without a key the grid and the spreadsheet show a
|
|
141
|
+
small watermark and the Software emits a console notice about the
|
|
142
|
+
Enterprise package; nothing is disabled and nothing stops after the 30
|
|
143
|
+
days, the watermark and the notice stay until a key is set. On request
|
|
144
|
+
the Author issues an evaluation key with a 30-day expiry that removes
|
|
145
|
+
both for staging and demonstration deployments; when it expires the
|
|
146
|
+
Software keeps running, the watermark returns and a console notice names
|
|
147
|
+
the date. Evaluation and development keys are not for production and
|
|
148
|
+
must not be shared or embedded in a product distributed to third
|
|
149
|
+
parties.
|
|
85
150
|
|
|
86
151
|
Projects that are open source under an OSI-approved license, hosted in a
|
|
87
152
|
public repository, and not a paid product qualify for a free Enterprise
|
|
88
153
|
key with the full feature set and no watermark, renewable annually.
|
|
89
154
|
|
|
90
|
-
License key validation is performed entirely client-side
|
|
91
|
-
|
|
92
|
-
|
|
155
|
+
License key validation is performed entirely client-side and is not a
|
|
156
|
+
cryptographic check: the Software classifies the key string and nothing
|
|
157
|
+
more. No network call is made to validate, and no telemetry is sent.
|
|
158
|
+
Air-gapped deployments are supported.
|
|
93
159
|
|
|
94
160
|
------------------------------------------------------------------------
|
|
95
161
|
5. RESTRICTIONS
|
|
@@ -102,16 +168,20 @@ The Subscriber may NOT:
|
|
|
102
168
|
(b) sublicense, rent, lease, or sell the Software to third parties;
|
|
103
169
|
(c) remove, obscure, or disable the license-key check or any
|
|
104
170
|
copyright or proprietary notices;
|
|
105
|
-
(d) use the Software to develop a data-grid
|
|
106
|
-
that competes with the Software for
|
|
171
|
+
(d) use the Software to develop a data-grid, table, or spreadsheet
|
|
172
|
+
component product that competes with the Software for
|
|
173
|
+
distribution to third parties;
|
|
107
174
|
(e) share license keys outside of the developer seats covered by the
|
|
108
|
-
Subscriber's order
|
|
175
|
+
Subscriber's order;
|
|
176
|
+
(f) ship to production a use of the Spreadsheet Module or the Studio
|
|
177
|
+
that the Subscriber's edition does not cover, or a
|
|
178
|
+
redistribution described in Section 1A without an OEM License.
|
|
109
179
|
|
|
110
180
|
------------------------------------------------------------------------
|
|
111
181
|
6. TERMINATION
|
|
112
182
|
------------------------------------------------------------------------
|
|
113
183
|
|
|
114
|
-
On material breach of Sections 1, 2, or 5, the license terminates
|
|
184
|
+
On material breach of Sections 1, 1A, 2, or 5, the license terminates
|
|
115
185
|
automatically and the Subscriber must cease all use of the Software,
|
|
116
186
|
remove it from development environments, and stop deploying new versions
|
|
117
187
|
of any application that depends on it. Existing deployed copies in
|
package/README.md
CHANGED
|
@@ -24,14 +24,18 @@
|
|
|
24
24
|
|
|
25
25
|
## What it adds
|
|
26
26
|
|
|
27
|
+
- **Server-Side Row Model** - `createServerRowModel` over the free datasource contract: lazy grouping and tree data one level at a time with a block cache per level, aggregates, child counts and grand totals, server-side pivot with the designer in server mode, transactions on loaded rows, paging over the tree, and a selection kept as a rule so select-all reaches rows the grid never loaded, with a bulk edit by rule. Flat paging and infinite scroll stay free in `@svgrid/grid`.
|
|
27
28
|
- **Data export** - Excel (`.xlsx`), PDF, styled HTML and XML, with theme-matched styling, headers/footers, and image support. CSV, TSV and JSON export (and copy-to-clipboard) are free in `@svgrid/grid`; Enterprise adds the paid formats and a single `exportGrid()` entry point over all of them.
|
|
28
29
|
- **Data import** - read Excel / CSV / TSV / JSON into typed rows with column auto-mapping, type inference, and per-row validation, plus a ready-made `SvImportDialog`.
|
|
29
30
|
- **Paginated print** - opens a clean, paginated, printable view of the grid with title and page breaks.
|
|
30
31
|
- **Pivot tables** - drag-and-drop pivot Designer with row/column/value fields, aggregation, drill-through to source rows, and pivot-to-chart.
|
|
32
|
+
- **Kanban board view** - `enableBoardView()` lets `<SvGrid board={...}>` render the rows as cards in lanes, with drag-and-drop, swimlanes, WIP limits and a card drawer.
|
|
31
33
|
- **Scheduler / calendar view** - a Month/Week/Day/Agenda calendar rendered as a view of the grid: `enableSchedulerView()` lets `<SvGrid scheduler={...}>` show events with resources, recurrence, and drag/resize.
|
|
32
34
|
- **Staged editing** - collect edits into a reviewable change set before committing.
|
|
33
35
|
- **Scheduling automation** - a client-side cron / one-off scheduler (`createScheduler`, `parseCron`, `CRON_PRESETS`) to drive recurring exports and alerts with no backend.
|
|
34
|
-
- **
|
|
36
|
+
- **Spreadsheet** (Suite) - `<SvSheet>` and the `<sv-sheet>` custom element over a built-in formula engine: around 185 functions, cross-sheet references, named ranges, absolute and relative refs, dynamic arrays with spill, iterative calculation with convergence, circular-reference detection, volatile-function tracking, and dependency-graph recalculation. In-house, with no runtime dependency.
|
|
37
|
+
- **Spreadsheet file formats** (Suite) - read and write `.xlsx`, `.xls` (BIFF8) and `.ods`, plus `.csv`. Formulas, tables, named ranges, merges, frozen panes, sparklines, charts and images survive an `.xlsx` round trip. Pivot tables round-trip as their computed cells, not as live PivotTable parts, and `.xls` keeps the BIFF8 row and column ceilings.
|
|
38
|
+
- **SvGrid Studio** (Suite) - a schema-driven data-app layer: `EntitySchema`, memory / SQL / Supabase / REST data sources, a SvelteKit adapter, edit panels, master/detail, schema charts + KPI dashboards, and the project model + codegen behind the visual designer. See [`@svgrid/studio`](https://www.npmjs.com/package/@svgrid/studio).
|
|
35
39
|
|
|
36
40
|
## Install
|
|
37
41
|
|
|
@@ -76,13 +80,41 @@ built in and free in [`@svgrid/grid`](https://www.npmjs.com/package/@svgrid/grid
|
|
|
76
80
|
Installing Enterprise only adds the Excel/PDF export engine that
|
|
77
81
|
AI-planned exports write through.
|
|
78
82
|
|
|
79
|
-
`installEnterprise` returns the same grid API with the enterprise methods (`exportData`, `copyExport`, `print`, `importData`, `pivot.*`) added on top, so the rest of your integration is unchanged. It also registers the Kanban board
|
|
83
|
+
`installEnterprise` returns the same grid API with the enterprise methods (`exportData`, `copyExport`, `print`, `importData`, `pivot.*`) added on top, so the rest of your integration is unchanged. It also registers the Kanban board, scheduler / calendar and Gantt views, so `<SvGrid board={...}>`, `<SvGrid scheduler={...}>` and `<SvGrid gantt={...}>` render.
|
|
80
84
|
|
|
81
85
|
## Licensing
|
|
82
86
|
|
|
83
|
-
Commercial
|
|
87
|
+
Commercial, in two editions, both covering unlimited production apps:
|
|
84
88
|
|
|
85
|
-
|
|
89
|
+
| Edition | Covers |
|
|
90
|
+
| --------- | ----------------------------------------------------------------- |
|
|
91
|
+
| **Grid** | Everything above except the spreadsheet, the file formats and Studio |
|
|
92
|
+
| **Suite** | All of it |
|
|
93
|
+
|
|
94
|
+
Purchase a key at [svgrid.com/pricing](https://svgrid.com/pricing/).
|
|
95
|
+
|
|
96
|
+
**The gate is soft.** Every feature runs without a key, and under a key whose edition does not cover
|
|
97
|
+
it. You get a small watermark on the grid and a one-time console notice; nothing throws and nothing
|
|
98
|
+
is disabled, so you can evaluate any of this in your own app before buying. A key is only rejected
|
|
99
|
+
when it is malformed or revoked.
|
|
100
|
+
|
|
101
|
+
```ts
|
|
102
|
+
import { setLicenseKey, licenseCovers } from '@svgrid/enterprise'
|
|
103
|
+
|
|
104
|
+
setLicenseKey(import.meta.env.VITE_SVPRO_KEY)
|
|
105
|
+
licenseCovers('spreadsheet') // false on a Grid key, true on Suite
|
|
106
|
+
```
|
|
107
|
+
|
|
108
|
+
Keys carry their edition: `SVENTERPRISE-GRID-...` or `SVENTERPRISE-SUITE-...`. A key issued before
|
|
109
|
+
editions existed carries neither and reads as Suite, so nothing you already ship changes.
|
|
110
|
+
|
|
111
|
+
**OEM and redistribution.** A developer seat covers your own application, including a SaaS product
|
|
112
|
+
your customers pay for. It does not cover shipping this package to third parties as a component, an
|
|
113
|
+
SDK, or an app builder they build with. That needs an OEM license, priced separately from seats.
|
|
114
|
+
Section 4A of the [EULA](https://github.com/sv-grid/sv-grid/blob/main/docs/legal/EULA.md) has the
|
|
115
|
+
exact test; `sales@jqwidgets.com` will tell you which side you are on.
|
|
116
|
+
|
|
117
|
+
OSS projects under an [OSI-approved license](https://opensource.org/licenses) qualify for a **free Suite key**.
|
|
86
118
|
|
|
87
119
|
The source in this package is published for evaluation and for paying customers; visibility does not grant a license. See [LICENSE](./LICENSE).
|
|
88
120
|
|
|
@@ -72,7 +72,7 @@
|
|
|
72
72
|
(untrack(() => api.getAdvancedFilter()) as PredicateExpr | null) ?? null,
|
|
73
73
|
)
|
|
74
74
|
/** What the editor is editing. Not pushed until Apply. */
|
|
75
|
-
let draft = $state<PredicateExpr>(applied ?? EMPTY)
|
|
75
|
+
let draft = $state<PredicateExpr>(untrack(() => applied ?? EMPTY))
|
|
76
76
|
|
|
77
77
|
const isDirty = $derived(JSON.stringify(draft) !== JSON.stringify(applied ?? EMPTY))
|
|
78
78
|
const canClear = $derived(applied != null)
|
|
@@ -5,6 +5,7 @@
|
|
|
5
5
|
* Operates through an AlertRulesManager (persistence) and emits the updated
|
|
6
6
|
* list so the running engine can re-sync.
|
|
7
7
|
*/
|
|
8
|
+
import { untrack } from 'svelte'
|
|
8
9
|
import { SvModal, SvSwitchButton, toast } from '@svgrid/grid'
|
|
9
10
|
import SvAlertRuleEditor from './SvAlertRuleEditor.svelte'
|
|
10
11
|
import { stringifyPredicate } from './expressions/parse'
|
|
@@ -23,7 +24,7 @@
|
|
|
23
24
|
|
|
24
25
|
let { open = $bindable(false), manager, columns, rows = [], onChange, onClose }: Props = $props()
|
|
25
26
|
|
|
26
|
-
let rules = $state<AlertRule[]>(manager.list())
|
|
27
|
+
let rules = $state<AlertRule[]>(untrack(() => manager.list()))
|
|
27
28
|
let editing = $state<AlertRule | null>(null)
|
|
28
29
|
let editorOpen = $state(false)
|
|
29
30
|
let fileInput = $state<HTMLInputElement | null>(null)
|
package/dist/SvBoard.svelte
CHANGED
|
@@ -116,7 +116,8 @@
|
|
|
116
116
|
</header>
|
|
117
117
|
<div class="sv-board__cards">
|
|
118
118
|
{#each cards as r (String(r[idField]))}
|
|
119
|
-
<!-- svelte-ignore
|
|
119
|
+
<!-- svelte-ignore a11y_no_noninteractive_tabindex -->
|
|
120
|
+
<!-- svelte-ignore a11y_no_static_element_interactions -->
|
|
120
121
|
<article
|
|
121
122
|
class="sv-board__card"
|
|
122
123
|
class:is-dragging={dragId === String(r[idField])}
|
package/dist/SvExportMenu.svelte
CHANGED
|
@@ -12,6 +12,8 @@
|
|
|
12
12
|
*
|
|
13
13
|
* Minimal, unopinionated styling via a few overridable classes / CSS vars.
|
|
14
14
|
*/
|
|
15
|
+
import { untrack } from 'svelte'
|
|
16
|
+
|
|
15
17
|
import type { RowData, TableFeatures } from '@svgrid/grid'
|
|
16
18
|
import type { ConditionalFormat } from '@svgrid/grid/format'
|
|
17
19
|
import type { EnterpriseGridApi } from './install'
|
|
@@ -77,7 +79,7 @@
|
|
|
77
79
|
]
|
|
78
80
|
|
|
79
81
|
let open = $state(false)
|
|
80
|
-
let currentScope = $state<Extract<ExportRowSource<TData>, string>>(scope)
|
|
82
|
+
let currentScope = $state<Extract<ExportRowSource<TData>, string>>(untrack(() => scope))
|
|
81
83
|
let busy = $state(false)
|
|
82
84
|
let progress = $state(0)
|
|
83
85
|
let error = $state<string | null>(null)
|
|
@@ -265,6 +267,7 @@
|
|
|
265
267
|
<div
|
|
266
268
|
class="sv-export-menu"
|
|
267
269
|
role="menu"
|
|
270
|
+
tabindex="-1"
|
|
268
271
|
aria-label="Export options"
|
|
269
272
|
bind:this={menuEl}
|
|
270
273
|
onkeydown={onMenuKeydown}
|
|
@@ -1,16 +1,3 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* SvExportMenu - a drop-in export button + menu for a licensed grid. Wraps
|
|
3
|
-
* `api.exportData` / `api.copyExport` / `api.print` so consumers don't
|
|
4
|
-
* hand-roll a toolbar in every app:
|
|
5
|
-
* - a sectioned format picker with per-format icons + descriptions,
|
|
6
|
-
* - a row-scope toggle (current view / selected / all rows),
|
|
7
|
-
* - a per-column include picker,
|
|
8
|
-
* - copy-to-clipboard + optional print actions,
|
|
9
|
-
* - a progress bar + Cancel for large exports (via AbortController),
|
|
10
|
-
* - inline error surface when a peer dep is missing or the grid is empty.
|
|
11
|
-
*
|
|
12
|
-
* Minimal, unopinionated styling via a few overridable classes / CSS vars.
|
|
13
|
-
*/
|
|
14
1
|
import type { RowData, TableFeatures } from '@svgrid/grid';
|
|
15
2
|
import type { ConditionalFormat } from '@svgrid/grid/format';
|
|
16
3
|
import type { EnterpriseGridApi } from './install.js';
|
|
@@ -60,13 +60,13 @@
|
|
|
60
60
|
// The conversion itself lives in expressions/builder-tree.ts, so the round
|
|
61
61
|
// trip can be tested without mounting this component.
|
|
62
62
|
|
|
63
|
-
const initial = toBuilderTree(value, columns)
|
|
64
|
-
let root = $state<BuilderGroup>(initial ?? freshGroup(columns))
|
|
63
|
+
const initial = untrack(() => toBuilderTree(value, columns))
|
|
64
|
+
let root = $state<BuilderGroup>(initial ?? untrack(() => freshGroup(columns)))
|
|
65
65
|
// If the incoming value cannot be shown as a tree, start in text mode so
|
|
66
66
|
// nothing is lost.
|
|
67
67
|
if (!initial && mode === 'builder') mode = 'text'
|
|
68
68
|
|
|
69
|
-
let text = $state(stringifyPredicate(value, columns))
|
|
69
|
+
let text = $state(untrack(() => stringifyPredicate(value, columns)))
|
|
70
70
|
let textError = $state<string | null>(null)
|
|
71
71
|
|
|
72
72
|
/**
|
package/dist/SvFormulaBar.svelte
CHANGED
|
@@ -11,6 +11,7 @@
|
|
|
11
11
|
* through props and reports edits through `onCommit`, so it works over a
|
|
12
12
|
* `<SvGrid>`, a plain array, or a workbook with several sheets.
|
|
13
13
|
*/
|
|
14
|
+
import { useSheetText } from './sheet-text'
|
|
14
15
|
import {
|
|
15
16
|
suggestFunctions,
|
|
16
17
|
applySuggestion,
|
|
@@ -45,6 +46,13 @@
|
|
|
45
46
|
*/
|
|
46
47
|
label?: string | null
|
|
47
48
|
onSelectName?: (name: string) => void
|
|
49
|
+
/** A name typed that is neither an address nor a name yet: Excel defines
|
|
50
|
+
* it for the selection. Without a handler the entry is dropped. */
|
|
51
|
+
onDefineName?: (name: string) => void
|
|
52
|
+
/** A range or a sheet-qualified address typed into the Name Box, B2:D4 or
|
|
53
|
+
* Orders!C3: the consumer selects it and answers true, or false when the
|
|
54
|
+
* text is not a reference, which the bar then defines as a name. */
|
|
55
|
+
onSelectReference?: (text: string) => boolean
|
|
48
56
|
/** The fx button: Excel's Insert Function. Without a handler the button
|
|
49
57
|
* is not drawn, since a button that does nothing is worse than none. */
|
|
50
58
|
onInsertFunction?: () => void
|
|
@@ -72,6 +80,8 @@
|
|
|
72
80
|
names = [],
|
|
73
81
|
label = null,
|
|
74
82
|
onSelectName,
|
|
83
|
+
onDefineName,
|
|
84
|
+
onSelectReference,
|
|
75
85
|
onInsertFunction,
|
|
76
86
|
onDraft,
|
|
77
87
|
highlight,
|
|
@@ -79,6 +89,7 @@
|
|
|
79
89
|
autocomplete = true,
|
|
80
90
|
disabled = false,
|
|
81
91
|
}: Props = $props()
|
|
92
|
+
const t = useSheetText()
|
|
82
93
|
|
|
83
94
|
let draft = $state('')
|
|
84
95
|
let editing = $state(false)
|
|
@@ -118,8 +129,36 @@
|
|
|
118
129
|
*/
|
|
119
130
|
let expanded = $state(false)
|
|
120
131
|
const lines = $derived(draft.split('\n').length)
|
|
121
|
-
|
|
132
|
+
/**
|
|
133
|
+
* The lines the draft takes at the bar's width once it wraps, which is
|
|
134
|
+
* what the expanded bar is for: a long formula is one line of text and
|
|
135
|
+
* six lines on screen, and counting its line breaks gave it two rows with
|
|
136
|
+
* the rest cut off under `overflow: hidden`, so the chevron showed an
|
|
137
|
+
* empty second row and nothing more. Measured from the textarea at one
|
|
138
|
+
* row, where its scroll height is the text's rather than the box's.
|
|
139
|
+
*/
|
|
140
|
+
let wrapped = $state(1)
|
|
141
|
+
/** The scrollbar's width once the bar scrolls, so the mirror wraps where the text does. */
|
|
142
|
+
let gutter = $state(0)
|
|
143
|
+
let mirror = $state<HTMLDivElement | null>(null)
|
|
144
|
+
$effect(() => {
|
|
145
|
+
void draft
|
|
146
|
+
if (!expanded || !input) { wrapped = 1; gutter = 0; return }
|
|
147
|
+
const el = input
|
|
148
|
+
const style = getComputedStyle(el)
|
|
149
|
+
const line = parseFloat(style.lineHeight) || 18
|
|
150
|
+
const pad = (parseFloat(style.paddingTop) || 0) + (parseFloat(style.paddingBottom) || 0)
|
|
151
|
+
const was = el.rows
|
|
152
|
+
el.rows = 1
|
|
153
|
+
wrapped = Math.max(1, Math.round((el.scrollHeight - pad) / line))
|
|
154
|
+
el.rows = was
|
|
155
|
+
// Read after the rows settle: the gutter is there only past six lines.
|
|
156
|
+
requestAnimationFrame(() => { gutter = el.offsetWidth - el.clientWidth })
|
|
157
|
+
})
|
|
158
|
+
const rows = $derived(expanded ? Math.min(6, Math.max(2, lines, wrapped)) : 1)
|
|
122
159
|
let nameBoxText = $state('')
|
|
160
|
+
/** True while the Name Box has focus, which is when it shows a draft. */
|
|
161
|
+
let nameBoxTyping = $state(false)
|
|
123
162
|
|
|
124
163
|
// Follow the active cell while the user is not mid-edit. Clobbering the
|
|
125
164
|
// draft on every selection change would throw away half-typed formulas.
|
|
@@ -245,14 +284,26 @@
|
|
|
245
284
|
nameBoxText = ''
|
|
246
285
|
return
|
|
247
286
|
}
|
|
248
|
-
|
|
249
|
-
|
|
287
|
+
const typed = nameBoxText.trim()
|
|
288
|
+
if (names.some((n) => n.name.toUpperCase() === typed.toUpperCase())) {
|
|
289
|
+
onSelectName?.(typed)
|
|
290
|
+
nameBoxText = ''
|
|
291
|
+
return
|
|
292
|
+
}
|
|
293
|
+
// A range, or an address on another sheet, is a place to go.
|
|
294
|
+
if (typed && onSelectReference?.(typed)) {
|
|
295
|
+
nameBoxText = ''
|
|
296
|
+
return
|
|
297
|
+
}
|
|
298
|
+
// Neither an address nor a name: Excel defines it for the selection.
|
|
299
|
+
if (typed) {
|
|
300
|
+
onDefineName?.(typed)
|
|
250
301
|
nameBoxText = ''
|
|
251
302
|
}
|
|
252
303
|
}
|
|
253
304
|
</script>
|
|
254
305
|
|
|
255
|
-
<div class="sv-formula-bar" role="group" aria-label=
|
|
306
|
+
<div class="sv-formula-bar" role="group" aria-label={t('formulaBar')}>
|
|
256
307
|
{#if showNameBox}
|
|
257
308
|
<!--
|
|
258
309
|
Excel's Name Box: one field that takes an address and, behind its arrow,
|
|
@@ -263,13 +314,23 @@
|
|
|
263
314
|
<div class="name-box">
|
|
264
315
|
<input
|
|
265
316
|
type="text"
|
|
266
|
-
aria-label=
|
|
317
|
+
aria-label={t('nameBox')}
|
|
267
318
|
placeholder={label ?? address}
|
|
268
|
-
value={nameBoxText}
|
|
319
|
+
value={nameBoxTyping ? nameBoxText : (label ?? address)}
|
|
269
320
|
{disabled}
|
|
270
321
|
oninput={(e) => (nameBoxText = e.currentTarget.value)}
|
|
271
322
|
onkeydown={onNameBoxKey}
|
|
272
|
-
|
|
323
|
+
onfocus={(e) => {
|
|
324
|
+
// The address is the field's VALUE, not a placeholder: a placeholder
|
|
325
|
+
// is a hint, so a screen reader on the Name Box would say "blank"
|
|
326
|
+
// where Excel says B3. It is selected on focus, so typing over it
|
|
327
|
+
// still replaces it in one go.
|
|
328
|
+
nameBoxTyping = true
|
|
329
|
+
nameBoxText = label ?? address
|
|
330
|
+
const el = e.currentTarget
|
|
331
|
+
queueMicrotask(() => el.select())
|
|
332
|
+
}}
|
|
333
|
+
onblur={() => { nameBoxTyping = false; nameBoxText = '' }}
|
|
273
334
|
/>
|
|
274
335
|
<span class="caret" class:idle={names.length === 0} aria-hidden="true">
|
|
275
336
|
<svg viewBox="0 0 10 10" width="10" height="10"><path d="M2 3.5l3 3 3-3" fill="none" stroke="currentColor" stroke-width="1.3" stroke-linecap="round" stroke-linejoin="round" /></svg>
|
|
@@ -277,7 +338,7 @@
|
|
|
277
338
|
{#if names.length > 0}
|
|
278
339
|
<select
|
|
279
340
|
class="names"
|
|
280
|
-
aria-label=
|
|
341
|
+
aria-label={t('definedNames')}
|
|
281
342
|
{disabled}
|
|
282
343
|
onchange={(e) => {
|
|
283
344
|
const picked = e.currentTarget.value
|
|
@@ -285,7 +346,7 @@
|
|
|
285
346
|
e.currentTarget.selectedIndex = 0
|
|
286
347
|
}}
|
|
287
348
|
>
|
|
288
|
-
<option value="">
|
|
349
|
+
<option value="">{t('namesHeading')}</option>
|
|
289
350
|
{#each names as entry (entry.name)}
|
|
290
351
|
<option value={entry.name}>{entry.name}</option>
|
|
291
352
|
{/each}
|
|
@@ -299,8 +360,8 @@
|
|
|
299
360
|
<button
|
|
300
361
|
type="button"
|
|
301
362
|
class="action"
|
|
302
|
-
title=
|
|
303
|
-
aria-label=
|
|
363
|
+
title={t('formulaBarCancel')}
|
|
364
|
+
aria-label={t('formulaBarCancel')}
|
|
304
365
|
disabled={!editing}
|
|
305
366
|
onmousedown={(e) => e.preventDefault()}
|
|
306
367
|
onclick={cancel}
|
|
@@ -308,8 +369,8 @@
|
|
|
308
369
|
<button
|
|
309
370
|
type="button"
|
|
310
371
|
class="action"
|
|
311
|
-
title=
|
|
312
|
-
aria-label=
|
|
372
|
+
title={t('formulaBarEnter')}
|
|
373
|
+
aria-label={t('formulaBarEnter')}
|
|
313
374
|
disabled={!editing}
|
|
314
375
|
onmousedown={(e) => e.preventDefault()}
|
|
315
376
|
onclick={() => commit()}
|
|
@@ -318,8 +379,8 @@
|
|
|
318
379
|
<button
|
|
319
380
|
type="button"
|
|
320
381
|
class="action fx"
|
|
321
|
-
title=
|
|
322
|
-
aria-label=
|
|
382
|
+
title={`${t('insertFunction')} (Shift+F3)`}
|
|
383
|
+
aria-label={t('insertFunction')}
|
|
323
384
|
{disabled}
|
|
324
385
|
onclick={() => onInsertFunction?.()}
|
|
325
386
|
>fx</button>
|
|
@@ -333,15 +394,18 @@
|
|
|
333
394
|
typed with Alt+Enter holds, and would commit "twolines" for a cell
|
|
334
395
|
showing two lines. One row until there are breaks to show. -->
|
|
335
396
|
{#if runs.length > 0}
|
|
336
|
-
<div class="formula mirror" aria-hidden="true">{#each runs as run, i (i)}{#if run.colour}<span style:color={run.colour}>{run.text}</span>{:else}{run.text}{/if}{/each}</div>
|
|
397
|
+
<div class="formula mirror" class:line={!expanded} bind:this={mirror} style:padding-right={gutter ? `${6 + gutter}px` : undefined} aria-hidden="true">{#each runs as run, i (i)}{#if run.colour}<span style:color={run.colour}>{run.text}</span>{:else}{run.text}{/if}{/each}</div>
|
|
337
398
|
{/if}
|
|
338
399
|
<textarea
|
|
339
400
|
bind:this={input}
|
|
340
401
|
class="formula"
|
|
341
402
|
class:coloured={runs.length > 0}
|
|
342
|
-
|
|
403
|
+
class:tall={expanded}
|
|
404
|
+
class:line={!expanded}
|
|
405
|
+
aria-label={t('formula')}
|
|
343
406
|
autocomplete="off"
|
|
344
407
|
spellcheck="false"
|
|
408
|
+
wrap={expanded ? 'soft' : 'off'}
|
|
345
409
|
{rows}
|
|
346
410
|
value={draft}
|
|
347
411
|
disabled={disabled || active === null}
|
|
@@ -354,6 +418,7 @@
|
|
|
354
418
|
}}
|
|
355
419
|
onkeyup={syncCaret}
|
|
356
420
|
onclick={syncCaret}
|
|
421
|
+
onscroll={(e) => { if (mirror) { mirror.scrollTop = e.currentTarget.scrollTop; mirror.scrollLeft = e.currentTarget.scrollLeft } }}
|
|
357
422
|
onfocus={startEditing}
|
|
358
423
|
onblur={() => { if (editing) commit('blur') }}
|
|
359
424
|
onkeydown={onKeyDown}
|
|
@@ -362,8 +427,8 @@
|
|
|
362
427
|
type="button"
|
|
363
428
|
class="expand"
|
|
364
429
|
class:on={expanded}
|
|
365
|
-
title={expanded ? '
|
|
366
|
-
aria-label={expanded ? '
|
|
430
|
+
title={expanded ? t('collapseFormulaBar') : t('expandFormulaBar')}
|
|
431
|
+
aria-label={expanded ? t('collapseFormulaBar') : t('expandFormulaBar')}
|
|
367
432
|
aria-expanded={expanded}
|
|
368
433
|
onclick={() => (expanded = !expanded)}
|
|
369
434
|
><svg viewBox="0 0 12 12" width="10" height="10" aria-hidden="true"><path d="M2 4l4 4 4-4" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" /></svg></button>
|
|
@@ -373,7 +438,7 @@
|
|
|
373
438
|
{/if}
|
|
374
439
|
|
|
375
440
|
{#if suggestions.length > 0}
|
|
376
|
-
<ul class="suggestions" role="listbox" aria-label=
|
|
441
|
+
<ul class="suggestions" role="listbox" aria-label={t('functionSuggestions')}>
|
|
377
442
|
{#each suggestions as suggestion, i (suggestion.name)}
|
|
378
443
|
<li role="option" aria-selected={i === highlighted}>
|
|
379
444
|
<button
|
|
@@ -522,6 +587,15 @@
|
|
|
522
587
|
overflow: hidden;
|
|
523
588
|
white-space: pre-wrap;
|
|
524
589
|
}
|
|
590
|
+
/* Expanded, the bar shows up to six lines and scrolls past them, as
|
|
591
|
+
Excel's does; the mirror follows the scroll from the textarea's
|
|
592
|
+
onscroll. Collapsed, it stays one line with no scrollbar of its own. */
|
|
593
|
+
.formula.tall { overflow-y: auto; }
|
|
594
|
+
/* Collapsed, the line does not wrap: Excel's one-line bar is cut off at
|
|
595
|
+
the right and scrolls sideways with the caret, rather than folding a
|
|
596
|
+
long entry onto a second row that the one-row box then hides. The
|
|
597
|
+
mirror follows the scroll the same way. */
|
|
598
|
+
.formula.line { white-space: pre; overflow-x: hidden; }
|
|
525
599
|
.formula:focus-visible {
|
|
526
600
|
outline: 2px solid var(--sg-focus-ring, var(--sg-accent, #107c41));
|
|
527
601
|
outline-offset: -2px;
|
|
@@ -35,6 +35,13 @@ type Props = {
|
|
|
35
35
|
*/
|
|
36
36
|
label?: string | null;
|
|
37
37
|
onSelectName?: (name: string) => void;
|
|
38
|
+
/** A name typed that is neither an address nor a name yet: Excel defines
|
|
39
|
+
* it for the selection. Without a handler the entry is dropped. */
|
|
40
|
+
onDefineName?: (name: string) => void;
|
|
41
|
+
/** A range or a sheet-qualified address typed into the Name Box, B2:D4 or
|
|
42
|
+
* Orders!C3: the consumer selects it and answers true, or false when the
|
|
43
|
+
* text is not a reference, which the bar then defines as a name. */
|
|
44
|
+
onSelectReference?: (text: string) => boolean;
|
|
38
45
|
/** The fx button: Excel's Insert Function. Without a handler the button
|
|
39
46
|
* is not drawn, since a button that does nothing is worse than none. */
|
|
40
47
|
onInsertFunction?: () => void;
|