@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/studio/scaffold.js
CHANGED
|
@@ -123,13 +123,13 @@ export function scaffold(schema, options = {}) {
|
|
|
123
123
|
const schemaFile = {
|
|
124
124
|
path: `src/lib/${route}.schema.ts`,
|
|
125
125
|
description: 'Entity schema + row type. Re-add any Standard Schema `validate` functions here by hand.',
|
|
126
|
-
contents: `import type { EntitySchema } from '@svgrid/enterprise'
|
|
127
|
-
|
|
128
|
-
${managed(`export type ${rowType} = {
|
|
129
|
-
${rowFields}
|
|
130
|
-
}
|
|
131
|
-
|
|
132
|
-
${schemaLiteral(schema, constName, rowType)}`)}
|
|
126
|
+
contents: `import type { EntitySchema } from '@svgrid/enterprise'
|
|
127
|
+
|
|
128
|
+
${managed(`export type ${rowType} = {
|
|
129
|
+
${rowFields}
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
${schemaLiteral(schema, constName, rowType)}`)}
|
|
133
133
|
`,
|
|
134
134
|
};
|
|
135
135
|
// 2. The API route: SvelteKit +server.ts using the transport handlers.
|
|
@@ -140,53 +140,53 @@ ${schemaLiteral(schema, constName, rowType)}`)}
|
|
|
140
140
|
let serverDescription;
|
|
141
141
|
if (driver) {
|
|
142
142
|
// Fully-connected route: driver + DATABASE_URL, no manual editing needed.
|
|
143
|
-
serverImport = `${driver.imports}
|
|
143
|
+
serverImport = `${driver.imports}
|
|
144
144
|
import { createKitHandlers, createSqlDataSource } from '@svgrid/enterprise'`;
|
|
145
|
-
serverBody = `${driver.setup}
|
|
146
|
-
|
|
147
|
-
const source = createSqlDataSource<${rowType}>({
|
|
148
|
-
schema: ${constName},
|
|
149
|
-
table: ${JSON.stringify(schema.name)},${driver.dialectArg}
|
|
150
|
-
execute: async (text, params) => {
|
|
151
|
-
${driver.execBody}
|
|
152
|
-
},
|
|
153
|
-
})
|
|
154
|
-
|
|
145
|
+
serverBody = `${driver.setup}
|
|
146
|
+
|
|
147
|
+
const source = createSqlDataSource<${rowType}>({
|
|
148
|
+
schema: ${constName},
|
|
149
|
+
table: ${JSON.stringify(schema.name)},${driver.dialectArg}
|
|
150
|
+
execute: async (text, params) => {
|
|
151
|
+
${driver.execBody}
|
|
152
|
+
},
|
|
153
|
+
})
|
|
154
|
+
|
|
155
155
|
export const { POST } = createKitHandlers({ schema: ${constName}, source })`;
|
|
156
156
|
serverDescription = `API route connected to your ${dataSource} database via process.env.DATABASE_URL.`;
|
|
157
157
|
}
|
|
158
158
|
else if (dataSource === 'sql') {
|
|
159
159
|
serverImport = `import { createKitHandlers, createSqlDataSource } from '@svgrid/enterprise'`;
|
|
160
|
-
serverBody = `// Wire execute() to your SQL client: run \`text\` with \`params\`, return the rows.
|
|
161
|
-
// Works with Drizzle (db.execute), postgres.js, better-sqlite3, mysql2, ...
|
|
162
|
-
const source = createSqlDataSource<${rowType}>({
|
|
163
|
-
schema: ${constName},
|
|
164
|
-
table: ${JSON.stringify(schema.name)},
|
|
165
|
-
dialect: { placeholders: '$', ilike: true },
|
|
166
|
-
execute: async (text, params) => {
|
|
167
|
-
throw new Error('TODO: run the query with your database client and return the rows.')
|
|
168
|
-
},
|
|
169
|
-
})
|
|
170
|
-
|
|
160
|
+
serverBody = `// Wire execute() to your SQL client: run \`text\` with \`params\`, return the rows.
|
|
161
|
+
// Works with Drizzle (db.execute), postgres.js, better-sqlite3, mysql2, ...
|
|
162
|
+
const source = createSqlDataSource<${rowType}>({
|
|
163
|
+
schema: ${constName},
|
|
164
|
+
table: ${JSON.stringify(schema.name)},
|
|
165
|
+
dialect: { placeholders: '$', ilike: true },
|
|
166
|
+
execute: async (text, params) => {
|
|
167
|
+
throw new Error('TODO: run the query with your database client and return the rows.')
|
|
168
|
+
},
|
|
169
|
+
})
|
|
170
|
+
|
|
171
171
|
export const { POST } = createKitHandlers({ schema: ${constName}, source })`;
|
|
172
172
|
serverDescription = 'API route. Fill in execute() with your SQL client (Drizzle / postgres.js / ...).';
|
|
173
173
|
}
|
|
174
174
|
else {
|
|
175
175
|
serverImport = `import { createInMemoryDataSource, createKitHandlers } from '@svgrid/enterprise'`;
|
|
176
|
-
serverBody = `// Starts empty and in-memory so the screen runs immediately. Swap this for
|
|
177
|
-
// a database-backed source (scaffold with dataSource:"sql" or a dialect) when ready.
|
|
178
|
-
const source = createInMemoryDataSource<${rowType}>([], ${constName})
|
|
179
|
-
|
|
176
|
+
serverBody = `// Starts empty and in-memory so the screen runs immediately. Swap this for
|
|
177
|
+
// a database-backed source (scaffold with dataSource:"sql" or a dialect) when ready.
|
|
178
|
+
const source = createInMemoryDataSource<${rowType}>([], ${constName})
|
|
179
|
+
|
|
180
180
|
export const { POST } = createKitHandlers({ schema: ${constName}, source })`;
|
|
181
181
|
serverDescription = 'API route using an in-memory source. Scaffold with a dialect for a real database.';
|
|
182
182
|
}
|
|
183
183
|
const serverFile = {
|
|
184
184
|
path: `src/routes${apiRoute}/+server.ts`,
|
|
185
185
|
description: serverDescription,
|
|
186
|
-
contents: `${serverImport}
|
|
187
|
-
import { ${constName}, type ${rowType} } from '${schemaImport}'
|
|
188
|
-
|
|
189
|
-
${managed(serverBody)}
|
|
186
|
+
contents: `${serverImport}
|
|
187
|
+
import { ${constName}, type ${rowType} } from '${schemaImport}'
|
|
188
|
+
|
|
189
|
+
${managed(serverBody)}
|
|
190
190
|
`,
|
|
191
191
|
};
|
|
192
192
|
// Relation (foreign-key) fields become searchable lookups in the edit form.
|
|
@@ -198,9 +198,9 @@ ${managed(serverBody)}
|
|
|
198
198
|
.map((f) => {
|
|
199
199
|
const name = `${camel(f.field)}Lookup`;
|
|
200
200
|
const endpoint = JSON.stringify(`/api/${f.relation.entity}`);
|
|
201
|
-
return ` const ${name} = createRelationLookup<Record<string, unknown>>({
|
|
202
|
-
source: createKitDataSource({ endpoint: ${endpoint} }),
|
|
203
|
-
labelField: ${JSON.stringify(f.relation.labelField)},
|
|
201
|
+
return ` const ${name} = createRelationLookup<Record<string, unknown>>({
|
|
202
|
+
source: createKitDataSource({ endpoint: ${endpoint} }),
|
|
203
|
+
labelField: ${JSON.stringify(f.relation.labelField)},
|
|
204
204
|
})`;
|
|
205
205
|
})
|
|
206
206
|
.join('\n');
|
|
@@ -210,121 +210,121 @@ ${managed(serverBody)}
|
|
|
210
210
|
const lookupsSection = hasLookups ? `\n\n${lookupDecls}\n${lookupsMap}` : '';
|
|
211
211
|
// 3. The page: a full data screen - search, server sort + paging,
|
|
212
212
|
// multi-select delete (optimistic), create/edit, loading/error/empty.
|
|
213
|
-
const pageBody = ` const source = createKitDataSource<${rowType}>({ endpoint: '${apiRoute}' })
|
|
214
|
-
const columns = schemaToColumns(${constName})${lookupsSection}
|
|
215
|
-
|
|
216
|
-
let state = $state<ServerState<${rowType}>>({
|
|
217
|
-
rows: [], total: 0, loading: false, saving: false, error: null,
|
|
218
|
-
pageIndex: 0, pageSize: 25, pageCount: 1, sortModel: [], filterModel: {},
|
|
219
|
-
})
|
|
220
|
-
const controller = createServerDataSource<${rowType}>(source, {
|
|
221
|
-
pageSize: 25,
|
|
222
|
-
optimistic: true,
|
|
223
|
-
getRowId: (r) => String(r.${idField}),
|
|
224
|
-
onChange: (s) => (state = s),
|
|
225
|
-
})
|
|
226
|
-
controller.refresh()
|
|
227
|
-
|
|
228
|
-
let selected = $state<${rowType}[]>([])
|
|
229
|
-
let editing = $state<${rowType} | null | undefined>(undefined) // undefined = closed, null = create
|
|
230
|
-
|
|
231
|
-
async function save({ mode, id, values }: { mode: 'create' | 'edit'; id: string | null; values: Partial<${rowType}> }) {
|
|
232
|
-
if (mode === 'create') {
|
|
233
|
-
await controller.createRow(values)
|
|
234
|
-
controller.setPage(state.pageCount - 1) // jump to the new row (appended at the end)
|
|
235
|
-
} else if (id) {
|
|
236
|
-
await controller.updateRow(id, values)
|
|
237
|
-
}
|
|
238
|
-
editing = undefined
|
|
239
|
-
}
|
|
240
|
-
|
|
241
|
-
async function removeSelected() {
|
|
242
|
-
for (const row of selected) await controller.deleteRow(String(row.${idField}))
|
|
243
|
-
selected = []
|
|
213
|
+
const pageBody = ` const source = createKitDataSource<${rowType}>({ endpoint: '${apiRoute}' })
|
|
214
|
+
const columns = schemaToColumns(${constName})${lookupsSection}
|
|
215
|
+
|
|
216
|
+
let state = $state<ServerState<${rowType}>>({
|
|
217
|
+
rows: [], total: 0, loading: false, saving: false, error: null,
|
|
218
|
+
pageIndex: 0, pageSize: 25, pageCount: 1, sortModel: [], filterModel: {},
|
|
219
|
+
})
|
|
220
|
+
const controller = createServerDataSource<${rowType}>(source, {
|
|
221
|
+
pageSize: 25,
|
|
222
|
+
optimistic: true,
|
|
223
|
+
getRowId: (r) => String(r.${idField}),
|
|
224
|
+
onChange: (s) => (state = s),
|
|
225
|
+
})
|
|
226
|
+
controller.refresh()
|
|
227
|
+
|
|
228
|
+
let selected = $state<${rowType}[]>([])
|
|
229
|
+
let editing = $state<${rowType} | null | undefined>(undefined) // undefined = closed, null = create
|
|
230
|
+
|
|
231
|
+
async function save({ mode, id, values }: { mode: 'create' | 'edit'; id: string | null; values: Partial<${rowType}> }) {
|
|
232
|
+
if (mode === 'create') {
|
|
233
|
+
await controller.createRow(values)
|
|
234
|
+
controller.setPage(state.pageCount - 1) // jump to the new row (appended at the end)
|
|
235
|
+
} else if (id) {
|
|
236
|
+
await controller.updateRow(id, values)
|
|
237
|
+
}
|
|
238
|
+
editing = undefined
|
|
239
|
+
}
|
|
240
|
+
|
|
241
|
+
async function removeSelected() {
|
|
242
|
+
for (const row of selected) await controller.deleteRow(String(row.${idField}))
|
|
243
|
+
selected = []
|
|
244
244
|
}`;
|
|
245
245
|
const pageFile = {
|
|
246
246
|
path: `src/routes/${route}/+page.svelte`,
|
|
247
247
|
description: 'The data screen: sort, filter, search, paging, multi-select delete, and create/edit - wired to the API route.',
|
|
248
|
-
contents: `<script lang="ts">
|
|
249
|
-
import { SvGrid, createServerDataSource } from '@svgrid/grid'
|
|
250
|
-
import {
|
|
251
|
-
SvGridEditPanel,
|
|
252
|
-
createKitDataSource,${hasLookups ? '\n createRelationLookup,' : ''}
|
|
253
|
-
schemaToColumns,
|
|
254
|
-
type ServerState,
|
|
255
|
-
} from '@svgrid/enterprise'
|
|
256
|
-
import { ${constName}, type ${rowType} } from '${schemaImport}'
|
|
257
|
-
|
|
258
|
-
${managed(pageBody)}
|
|
259
|
-
</script>
|
|
260
|
-
|
|
261
|
-
<svelte:head><style>
|
|
262
|
-
${themeTokenCss({ preset: options.theme, mode: options.dark ? 'dark' : 'light' }, { layer: 'svgrid-studio' })}
|
|
263
|
-
</style></svelte:head>
|
|
264
|
-
|
|
265
|
-
<div class="page">
|
|
266
|
-
<header class="page__toolbar">
|
|
267
|
-
<h2 class="page__title">${label}</h2>
|
|
268
|
-
<div class="page__actions">
|
|
269
|
-
<button onclick={() => (editing = null)}>New</button>
|
|
270
|
-
<button disabled={selected.length === 0} onclick={removeSelected}>
|
|
271
|
-
Delete {selected.length > 0 ? '(' + selected.length + ')' : ''}
|
|
272
|
-
</button>
|
|
273
|
-
</div>
|
|
274
|
-
</header>
|
|
275
|
-
|
|
276
|
-
{#if state.error}<p class="page__error" role="alert">{state.error}</p>{/if}
|
|
277
|
-
|
|
278
|
-
<SvGrid
|
|
279
|
-
data={state.rows}
|
|
280
|
-
{columns}
|
|
281
|
-
loading={state.loading}
|
|
282
|
-
loadingOverlay
|
|
283
|
-
fitColumns
|
|
284
|
-
enableRowSummaries={false}
|
|
285
|
-
showRowSelection
|
|
286
|
-
enableCellSelection
|
|
287
|
-
sortable
|
|
288
|
-
externalSort
|
|
289
|
-
onSortingChange={(s) => controller.setSort(s)}
|
|
290
|
-
filterable
|
|
291
|
-
showGlobalFilter
|
|
292
|
-
externalFilter
|
|
293
|
-
onFiltersChange={(f) =>
|
|
294
|
-
controller.setFilter({
|
|
295
|
-
global: f.global || undefined,
|
|
296
|
-
columns: Object.fromEntries(
|
|
297
|
-
f.columns.map((c) => [c.id, { operator: c.operator, value: c.value, valueTo: c.valueTo, selectedValues: c.selectedValues }]),
|
|
298
|
-
),
|
|
299
|
-
})}
|
|
300
|
-
onRowClick={(e) => (editing = e.row)}
|
|
301
|
-
onRowSelectionChange={(_sel, rows) => (selected = rows)}
|
|
302
|
-
showPagination
|
|
303
|
-
externalPagination
|
|
304
|
-
rowCount={state.total}
|
|
305
|
-
pageIndex={state.pageIndex}
|
|
306
|
-
pageSize={state.pageSize}
|
|
307
|
-
onPaginationChange={({ pageIndex, pageSize }) => {
|
|
308
|
-
if (pageSize !== state.pageSize) controller.setPageSize(pageSize)
|
|
309
|
-
else controller.setPage(pageIndex)
|
|
310
|
-
}}
|
|
311
|
-
emptyMessage="No ${label} yet"
|
|
312
|
-
containerHeight={480}
|
|
313
|
-
/>
|
|
314
|
-
|
|
315
|
-
{#if editing !== undefined}
|
|
316
|
-
<SvGridEditPanel schema={${constName}} row={editing} ${hasLookups ? 'lookups={lookups} ' : ''}onSubmit={save} onCancel={() => (editing = undefined)} />
|
|
317
|
-
{/if}
|
|
318
|
-
</div>
|
|
319
|
-
|
|
320
|
-
<style>
|
|
321
|
-
.page { display: flex; flex-direction: column; gap: 12px; }
|
|
322
|
-
.page__toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
|
|
323
|
-
.page__title { margin: 0; font-size: 18px; font-weight: 600; }
|
|
324
|
-
.page__actions { display: flex; gap: 8px; }
|
|
325
|
-
.page__actions button { padding: 7px 12px; border: 1px solid #ccc; border-radius: 6px; background: #fff; cursor: pointer; }
|
|
326
|
-
.page__error { margin: 0; padding: 8px 12px; color: #b3261e; background: #fdecea; border-radius: 6px; }
|
|
327
|
-
</style>
|
|
248
|
+
contents: `<script lang="ts">
|
|
249
|
+
import { SvGrid, createServerDataSource } from '@svgrid/grid'
|
|
250
|
+
import {
|
|
251
|
+
SvGridEditPanel,
|
|
252
|
+
createKitDataSource,${hasLookups ? '\n createRelationLookup,' : ''}
|
|
253
|
+
schemaToColumns,
|
|
254
|
+
type ServerState,
|
|
255
|
+
} from '@svgrid/enterprise'
|
|
256
|
+
import { ${constName}, type ${rowType} } from '${schemaImport}'
|
|
257
|
+
|
|
258
|
+
${managed(pageBody)}
|
|
259
|
+
</script>
|
|
260
|
+
|
|
261
|
+
<svelte:head><style>
|
|
262
|
+
${themeTokenCss({ preset: options.theme, mode: options.dark ? 'dark' : 'light' }, { layer: 'svgrid-studio' })}
|
|
263
|
+
</style></svelte:head>
|
|
264
|
+
|
|
265
|
+
<div class="page">
|
|
266
|
+
<header class="page__toolbar">
|
|
267
|
+
<h2 class="page__title">${label}</h2>
|
|
268
|
+
<div class="page__actions">
|
|
269
|
+
<button onclick={() => (editing = null)}>New</button>
|
|
270
|
+
<button disabled={selected.length === 0} onclick={removeSelected}>
|
|
271
|
+
Delete {selected.length > 0 ? '(' + selected.length + ')' : ''}
|
|
272
|
+
</button>
|
|
273
|
+
</div>
|
|
274
|
+
</header>
|
|
275
|
+
|
|
276
|
+
{#if state.error}<p class="page__error" role="alert">{state.error}</p>{/if}
|
|
277
|
+
|
|
278
|
+
<SvGrid
|
|
279
|
+
data={state.rows}
|
|
280
|
+
{columns}
|
|
281
|
+
loading={state.loading}
|
|
282
|
+
loadingOverlay
|
|
283
|
+
fitColumns
|
|
284
|
+
enableRowSummaries={false}
|
|
285
|
+
showRowSelection
|
|
286
|
+
enableCellSelection
|
|
287
|
+
sortable
|
|
288
|
+
externalSort
|
|
289
|
+
onSortingChange={(s) => controller.setSort(s)}
|
|
290
|
+
filterable
|
|
291
|
+
showGlobalFilter
|
|
292
|
+
externalFilter
|
|
293
|
+
onFiltersChange={(f) =>
|
|
294
|
+
controller.setFilter({
|
|
295
|
+
global: f.global || undefined,
|
|
296
|
+
columns: Object.fromEntries(
|
|
297
|
+
f.columns.map((c) => [c.id, { operator: c.operator, value: c.value, valueTo: c.valueTo, selectedValues: c.selectedValues }]),
|
|
298
|
+
),
|
|
299
|
+
})}
|
|
300
|
+
onRowClick={(e) => (editing = e.row)}
|
|
301
|
+
onRowSelectionChange={(_sel, rows) => (selected = rows)}
|
|
302
|
+
showPagination
|
|
303
|
+
externalPagination
|
|
304
|
+
rowCount={state.total}
|
|
305
|
+
pageIndex={state.pageIndex}
|
|
306
|
+
pageSize={state.pageSize}
|
|
307
|
+
onPaginationChange={({ pageIndex, pageSize }) => {
|
|
308
|
+
if (pageSize !== state.pageSize) controller.setPageSize(pageSize)
|
|
309
|
+
else controller.setPage(pageIndex)
|
|
310
|
+
}}
|
|
311
|
+
emptyMessage="No ${label} yet"
|
|
312
|
+
containerHeight={480}
|
|
313
|
+
/>
|
|
314
|
+
|
|
315
|
+
{#if editing !== undefined}
|
|
316
|
+
<SvGridEditPanel schema={${constName}} row={editing} ${hasLookups ? 'lookups={lookups} ' : ''}onSubmit={save} onCancel={() => (editing = undefined)} />
|
|
317
|
+
{/if}
|
|
318
|
+
</div>
|
|
319
|
+
|
|
320
|
+
<style>
|
|
321
|
+
.page { display: flex; flex-direction: column; gap: 12px; }
|
|
322
|
+
.page__toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
|
|
323
|
+
.page__title { margin: 0; font-size: 18px; font-weight: 600; }
|
|
324
|
+
.page__actions { display: flex; gap: 8px; }
|
|
325
|
+
.page__actions button { padding: 7px 12px; border: 1px solid #ccc; border-radius: 6px; background: #fff; cursor: pointer; }
|
|
326
|
+
.page__error { margin: 0; padding: 8px 12px; color: #b3261e; background: #fdecea; border-radius: 6px; }
|
|
327
|
+
</style>
|
|
328
328
|
`,
|
|
329
329
|
};
|
|
330
330
|
return { files: [schemaFile, serverFile, pageFile] };
|
|
@@ -82,6 +82,13 @@ export declare const GRID_CURATED_PROPS: ReadonlySet<string>;
|
|
|
82
82
|
/** The Grid's raw prop surface for the "All properties" panel: every extracted SvGrid
|
|
83
83
|
* prop the curated controls do NOT already manage. Sorted by group then label. */
|
|
84
84
|
export declare function gridPropSurface(): UiComponentProp[];
|
|
85
|
+
/** Split the grid's icon catalogue into the picker's display groups, in order,
|
|
86
|
+
* dropping any that came out empty. Takes the names rather than importing them so
|
|
87
|
+
* the studio metadata module stays free of a runtime dependency on the grid. */
|
|
88
|
+
export declare function gridIconGroups<T extends string>(names: readonly T[]): Array<{
|
|
89
|
+
label: string;
|
|
90
|
+
names: T[];
|
|
91
|
+
}>;
|
|
85
92
|
/** The Grid props settable at runtime through `ctx.grid.<prop> = value` (backed by
|
|
86
93
|
* `api.setOption`): the full extracted SvGrid surface minus controller-owned /
|
|
87
94
|
* seed-once props and function/snippet props. Drives the `ctx.grid` type + the code
|
|
@@ -7021,11 +7021,34 @@ export const GENERATED_UI_SURFACE = {
|
|
|
7021
7021
|
"description": "Prepend a header row (the column labels) to copied cell ranges, so pasting into Excel / Sheets includes the headers. Applies per copied range.",
|
|
7022
7022
|
"group": "common"
|
|
7023
7023
|
},
|
|
7024
|
+
{
|
|
7025
|
+
"key": "processCellForFill",
|
|
7026
|
+
"label": "Process Cell For Fill",
|
|
7027
|
+
"type": "json",
|
|
7028
|
+
"description": "Decide what the fill handle writes into one cell, ahead of the grid's own pattern rules (series, weekdays, \"Item 1\"). Receives the source cell's value and how far the target sits from it; return the value to write, or `undefined` to let the pattern decide. A spreadsheet uses it to move a formula's references by the distance filled, which the pattern rules would otherwise mangle (\"=A1+B1\" reads as \"Item 1\").",
|
|
7029
|
+
"code": true,
|
|
7030
|
+
"group": "advanced"
|
|
7031
|
+
},
|
|
7024
7032
|
{
|
|
7025
7033
|
"key": "processCellForClipboard",
|
|
7026
7034
|
"label": "Process Cell For Clipboard",
|
|
7027
7035
|
"type": "json",
|
|
7028
|
-
"
|
|
7036
|
+
"code": true,
|
|
7037
|
+
"group": "advanced"
|
|
7038
|
+
},
|
|
7039
|
+
{
|
|
7040
|
+
"key": "clipboardHtml",
|
|
7041
|
+
"label": "Clipboard Html",
|
|
7042
|
+
"type": "json",
|
|
7043
|
+
"description": "An HTML rendering of what Ctrl+C copies, written to the clipboard as `text/html` beside the TSV. Excel and Google Sheets read the HTML first, so a table with inline styles pastes into them with its formats, and the same markup can carry what the text cannot (a formula in a `data-` attribute) for a round trip back into a grid that reads it. Called after every cell has been through `processCellForClipboard`, with the rectangles copied and the text about to be written. Return nothing to write text alone. Runs synchronously inside the key press, which is what the clipboard needs.",
|
|
7044
|
+
"code": true,
|
|
7045
|
+
"group": "advanced"
|
|
7046
|
+
},
|
|
7047
|
+
{
|
|
7048
|
+
"key": "processCellFromClipboard",
|
|
7049
|
+
"label": "Process Cell From Clipboard",
|
|
7050
|
+
"type": "json",
|
|
7051
|
+
"description": "Transform each cell on its way IN from the clipboard, before the grid coerces it for the column's editor. Symmetric with `processCellForClipboard`: the pair is what lets a round trip survive. Receives the raw clipboard text for the cell plus where it is landing. Return the value to write, or `undefined` to leave the cell untouched. This is also the seam a feature pack uses to take over a paste entirely: `@svgrid/enterprise`'s paste-special reads the clipboard's `text/html` for formats and formulas and writes through here.",
|
|
7029
7052
|
"code": true,
|
|
7030
7053
|
"group": "advanced"
|
|
7031
7054
|
},
|
|
@@ -7036,6 +7059,13 @@ export const GENERATED_UI_SURFACE = {
|
|
|
7036
7059
|
"description": "Inline cell editing: F2 or double-click opens an editor in the active cell, Enter commits, Esc cancels. Off by default. A column still needs an `editorType` to pick its editor (text, number, date, checkbox, list, ...); without one it gets a plain text editor. `editable` is the shortcut alias and wins over this.",
|
|
7037
7060
|
"group": "common"
|
|
7038
7061
|
},
|
|
7062
|
+
{
|
|
7063
|
+
"key": "editOnSecondClick",
|
|
7064
|
+
"label": "Edit On Second Click",
|
|
7065
|
+
"type": "boolean",
|
|
7066
|
+
"description": "A click on the cell that is already active opens its editor, the way a second click on a selected file name starts renaming it. On by default. A spreadsheet turns it off: Excel edits on double-click or F2 only, and a user clicking the cell they are on to get back to it after a dialog would otherwise find the next shortcut typed into an editor.",
|
|
7067
|
+
"group": "common"
|
|
7068
|
+
},
|
|
7039
7069
|
{
|
|
7040
7070
|
"key": "fullRowEditing",
|
|
7041
7071
|
"label": "Full Row Editing",
|
|
@@ -7244,6 +7274,20 @@ export const GENERATED_UI_SURFACE = {
|
|
|
7244
7274
|
"description": "Rows to pin to the TOP of the grid - rendered above the regular rows and sticky-positioned so they stay visible while the user scrolls. Typical use: a \"totals\" or \"headline\" row that should always be in view. Rows are read-only (no inline editing, no row-selection checkbox). They share the column schema with the main grid; field/format/cell/cellClass all apply.",
|
|
7245
7275
|
"group": "common"
|
|
7246
7276
|
},
|
|
7277
|
+
{
|
|
7278
|
+
"key": "frozenRows",
|
|
7279
|
+
"label": "Frozen Rows",
|
|
7280
|
+
"type": "number",
|
|
7281
|
+
"description": "Freeze the first N rows: they stay under the header while the body scrolls, and unlike `pinnedTopRows` they are the grid's own rows, still editable, selectable and numbered as rows 1..N. Excel's Freeze Panes, for the row half; the column half is `columnPinning`. Under `virtualization` the frozen rows are always rendered and the window skips them.",
|
|
7282
|
+
"group": "common"
|
|
7283
|
+
},
|
|
7284
|
+
{
|
|
7285
|
+
"key": "mergedCells",
|
|
7286
|
+
"label": "Merged Cells",
|
|
7287
|
+
"type": "json",
|
|
7288
|
+
"description": "Merged cells: rectangles drawn as one cell, a spreadsheet's Merge & Center. Each entry is the top-left cell (display indices) and how many rows and columns it covers. The origin's td takes the span and shows the origin's value; the covered cells are not drawn, a selection grows to whole merges, the active cell inside a merge is its origin, and the arrow keys step over a merge as one cell. A merge that crosses the frozen boundary or the rendered window is drawn in parts, one per band. The grid does not write into covered cells on its own; a consumer that merges cells keeps them empty or marks them read-only through the column's `editable`.",
|
|
7289
|
+
"group": "common"
|
|
7290
|
+
},
|
|
7247
7291
|
{
|
|
7248
7292
|
"key": "pinnedBottomRows",
|
|
7249
7293
|
"label": "Pinned Bottom Rows",
|
|
@@ -7320,6 +7364,24 @@ export const GENERATED_UI_SURFACE = {
|
|
|
7320
7364
|
"prop": "onPaginationChange",
|
|
7321
7365
|
"description": "Fires when the user changes page or page size while `externalPagination` is on. Fetch that page and update `data` / `rowCount` / `pageIndex`."
|
|
7322
7366
|
},
|
|
7367
|
+
{
|
|
7368
|
+
"key": "columnResize",
|
|
7369
|
+
"label": "Column Resize",
|
|
7370
|
+
"prop": "onColumnResize",
|
|
7371
|
+
"description": "The user dragged a column's edge (or double-clicked it to autosize). Programmatic `api.setColumnWidth` does not fire it."
|
|
7372
|
+
},
|
|
7373
|
+
{
|
|
7374
|
+
"key": "rowResize",
|
|
7375
|
+
"label": "Row Resize",
|
|
7376
|
+
"prop": "onRowResize",
|
|
7377
|
+
"description": "The user dragged a row's edge, or double-clicked it: `height` is then `null`, the row back at its declared height. Programmatic `api.setRowHeight` does not fire it."
|
|
7378
|
+
},
|
|
7379
|
+
{
|
|
7380
|
+
"key": "pasteClipboard",
|
|
7381
|
+
"label": "Paste Clipboard",
|
|
7382
|
+
"prop": "onPasteClipboard",
|
|
7383
|
+
"description": "Take over a paste. Receives the clipboard's `text/plain` and, when the source put one there, its `text/html` (Excel's carries formats and formulas; a grid's own `clipboardHtml` carries whatever it chose to). Return `true` to say the paste was applied; anything else lets the grid paste the text as it always has. Runs inside one history group, so every `setCellValue` and `recordUndo` the handler makes is one Ctrl+Z. With this set, Ctrl+V lets the browser's own `paste` event through (that is where the unsanitised HTML is), and the async Clipboard API is the fallback for a browser that does not deliver it. `source` says which path the payload came by."
|
|
7384
|
+
},
|
|
7323
7385
|
{
|
|
7324
7386
|
"key": "apiReady",
|
|
7325
7387
|
"label": "Api Ready",
|
|
@@ -637,6 +637,11 @@ export const GRID_CURATED_PROPS = new Set([
|
|
|
637
637
|
'pageSize', 'pageSizeOptions', 'paginationPosition', 'rowHeight', 'containerHeight',
|
|
638
638
|
'columnVirtualization', 'initialColumnPinning', 'conditionalFormats', 'features', 'editable',
|
|
639
639
|
'enableInlineEditing',
|
|
640
|
+
// The icon picker owns this. The extractor already skips it (a map of snippets is
|
|
641
|
+
// content, not a property), so this is belt and braces - but if snippet handling
|
|
642
|
+
// there ever changes, `icons` must not reappear as a JSON box: the value it would
|
|
643
|
+
// produce is emitted with JSON.stringify and would throw at `{@render}`.
|
|
644
|
+
'icons',
|
|
640
645
|
]);
|
|
641
646
|
/** The Grid's raw prop surface for the "All properties" panel: every extracted SvGrid
|
|
642
647
|
* prop the curated controls do NOT already manage. Sorted by group then label. */
|
|
@@ -650,6 +655,36 @@ export function gridPropSurface() {
|
|
|
650
655
|
.map((p) => ({ ...p }))
|
|
651
656
|
.sort((a, b) => (order[a.group ?? 'common'] - order[b.group ?? 'common']) || a.label.localeCompare(b.label));
|
|
652
657
|
}
|
|
658
|
+
// --- Grid icons: how the picker groups the catalogue ------------------------
|
|
659
|
+
// SvGrid names ~50 chrome glyphs and `icons` replaces any subset, which is far too
|
|
660
|
+
// long a list to show flat. Array order is BOTH the matching order (each name takes
|
|
661
|
+
// the first rule that accepts it) and the order the picker shows the groups in, so
|
|
662
|
+
// the header icons people actually reach for - sort, filter, the column menu - come
|
|
663
|
+
// first rather than falling out of a catch-all at the bottom.
|
|
664
|
+
//
|
|
665
|
+
// 'Other' is the catch-all and is expected to stay empty: a glyph added to the
|
|
666
|
+
// catalogue still shows up there rather than vanishing from the picker, but the
|
|
667
|
+
// guardrail test fails so someone gives it a real home.
|
|
668
|
+
const GRID_ICON_GROUP_RULES = [
|
|
669
|
+
{ label: 'Header + column menu', match: (n) => ['sort', 'sort-asc', 'sort-desc', 'filter', 'menu', 'chevron-down', 'chevron-right', 'autosize', 'columns', 'reset'].includes(n) },
|
|
670
|
+
{ label: 'Filter operators', match: (n) => n.startsWith('op-') },
|
|
671
|
+
{ label: 'Pinning', match: (n) => n === 'pin-left' || n === 'pin-right' || n === 'unpin' },
|
|
672
|
+
{ label: 'Rows + grouping', match: (n) => ['group', 'group-add', 'row-number', 'pinned-row-top', 'pinned-row-bottom', 'drag-handle', 'breadcrumb-separator'].includes(n) },
|
|
673
|
+
{ label: 'Toolbar + overlays', match: (n) => ['search', 'tool-panel', 'chart', 'advanced-filter', 'column-group-caret'].includes(n) },
|
|
674
|
+
{ label: 'Pager', match: (n) => n.startsWith('page-') },
|
|
675
|
+
{ label: 'Find + move', match: (n) => n.startsWith('find-') || n.startsWith('move-') },
|
|
676
|
+
{ label: 'Close + clear', match: (n) => ['x', 'close', 'clear', 'remove'].includes(n) },
|
|
677
|
+
{ label: 'Other', match: () => true },
|
|
678
|
+
];
|
|
679
|
+
/** Split the grid's icon catalogue into the picker's display groups, in order,
|
|
680
|
+
* dropping any that came out empty. Takes the names rather than importing them so
|
|
681
|
+
* the studio metadata module stays free of a runtime dependency on the grid. */
|
|
682
|
+
export function gridIconGroups(names) {
|
|
683
|
+
return GRID_ICON_GROUP_RULES.map((rule, i) => ({
|
|
684
|
+
label: rule.label,
|
|
685
|
+
names: names.filter((n) => GRID_ICON_GROUP_RULES.findIndex((c) => c.match(n)) === i),
|
|
686
|
+
})).filter((g) => g.names.length);
|
|
687
|
+
}
|
|
653
688
|
// Props NOT offered on `ctx.grid` as runtime-settable options: structural data,
|
|
654
689
|
// controller-owned plumbing, and seed-once `initial*` props (the grid reads those at
|
|
655
690
|
// mount, so `setOption` on them is a no-op - excluding them keeps intellisense honest).
|
|
@@ -6,9 +6,9 @@
|
|
|
6
6
|
* and prototyping a schema before a database exists behind it.
|
|
7
7
|
*/
|
|
8
8
|
import type { RowData } from '@svgrid/grid';
|
|
9
|
-
import { type EntitySchema } from '../schema';
|
|
10
|
-
import type { WritableDataSource } from './types';
|
|
11
|
-
import { type AggregateSource } from '../sources/aggregate';
|
|
9
|
+
import { type EntitySchema } from '../schema.js';
|
|
10
|
+
import type { WritableDataSource } from './types.js';
|
|
11
|
+
import { type AggregateSource } from '../sources/aggregate.js';
|
|
12
12
|
export declare function createInMemoryDataSource<TData extends RowData>(initial: ReadonlyArray<TData>, schema: EntitySchema<TData>): WritableDataSource<TData> & AggregateSource & {
|
|
13
13
|
rows(): ReadonlyArray<TData>;
|
|
14
14
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { resolveIdField } from '../schema';
|
|
2
|
-
import { planQuery } from './query-plan';
|
|
3
|
-
import { compilePredicate } from '../expressions/compile';
|
|
4
|
-
import { aggregateRows } from '../sources/aggregate';
|
|
1
|
+
import { resolveIdField } from '../schema.js';
|
|
2
|
+
import { planQuery } from './query-plan.js';
|
|
3
|
+
import { compilePredicate } from '../expressions/compile.js';
|
|
4
|
+
import { aggregateRows } from '../sources/aggregate.js';
|
|
5
5
|
function asString(v) {
|
|
6
6
|
return v == null ? '' : String(v);
|
|
7
7
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export { planQuery, coerce, type QueryPlan, type PlanPredicate, type PlanOp, } from './query-plan';
|
|
2
|
-
export { createInMemoryDataSource } from './in-memory';
|
|
3
|
-
export { createKitDataSource, createKitHandlers, type KitDataSourceOptions, type KitHandlerOptions, type KitScope, type KitHandlers, type KitMessage, } from './transport';
|
|
4
|
-
export { planToSql, type SqlDialect, type SqlPlan } from './sql';
|
|
5
|
-
export { createSqlDataSource, type SqlExecutor, type SqlDataSourceConfig, } from './sql-source';
|
|
6
|
-
export type { WritableDataSource } from './types';
|
|
1
|
+
export { planQuery, coerce, type QueryPlan, type PlanPredicate, type PlanOp, } from './query-plan.js';
|
|
2
|
+
export { createInMemoryDataSource } from './in-memory.js';
|
|
3
|
+
export { createKitDataSource, createKitHandlers, type KitDataSourceOptions, type KitHandlerOptions, type KitScope, type KitHandlers, type KitMessage, } from './transport.js';
|
|
4
|
+
export { planToSql, type SqlDialect, type SqlPlan } from './sql.js';
|
|
5
|
+
export { createSqlDataSource, type SqlExecutor, type SqlDataSourceConfig, } from './sql-source.js';
|
|
6
|
+
export type { WritableDataSource } from './types.js';
|
package/dist/sveltekit/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export { planQuery, coerce, } from './query-plan';
|
|
2
|
-
export { createInMemoryDataSource } from './in-memory';
|
|
3
|
-
export { createKitDataSource, createKitHandlers, } from './transport';
|
|
4
|
-
export { planToSql } from './sql';
|
|
5
|
-
export { createSqlDataSource, } from './sql-source';
|
|
1
|
+
export { planQuery, coerce, } from './query-plan.js';
|
|
2
|
+
export { createInMemoryDataSource } from './in-memory.js';
|
|
3
|
+
export { createKitDataSource, createKitHandlers, } from './transport.js';
|
|
4
|
+
export { planToSql } from './sql.js';
|
|
5
|
+
export { createSqlDataSource, } from './sql-source.js';
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
* arbitrary identifiers through to SQL.
|
|
12
12
|
*/
|
|
13
13
|
import type { GridPredicateExpr, RowData, ServerRequest } from '@svgrid/grid';
|
|
14
|
-
import type { EntityFieldType, EntitySchema } from '../schema';
|
|
14
|
+
import type { EntityFieldType, EntitySchema } from '../schema.js';
|
|
15
15
|
/** Normalized predicate operators (a stable superset of the grid's filter operators). */
|
|
16
16
|
export type PlanOp = 'eq' | 'contains' | 'startsWith' | 'gt' | 'lt' | 'between' | 'isBlank' | 'in';
|
|
17
17
|
export type PlanPredicate = {
|
|
@@ -22,10 +22,10 @@
|
|
|
22
22
|
* })
|
|
23
23
|
*/
|
|
24
24
|
import type { RowData } from '@svgrid/grid';
|
|
25
|
-
import { type EntitySchema } from '../schema';
|
|
26
|
-
import { type SqlDialect } from './sql';
|
|
27
|
-
import type { WritableDataSource } from './types';
|
|
28
|
-
import type { AggregateSource } from '../sources/aggregate';
|
|
25
|
+
import { type EntitySchema } from '../schema.js';
|
|
26
|
+
import { type SqlDialect } from './sql.js';
|
|
27
|
+
import type { WritableDataSource } from './types.js';
|
|
28
|
+
import type { AggregateSource } from '../sources/aggregate.js';
|
|
29
29
|
/** Run a parameterized query, resolving to the result rows. */
|
|
30
30
|
export type SqlExecutor = (sql: string, params: unknown[]) => Promise<ReadonlyArray<Record<string, unknown>>>;
|
|
31
31
|
export type SqlDataSourceConfig<TData extends RowData> = {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { resolveIdField } from '../schema';
|
|
2
|
-
import { nudgeEnterprise } from '../license';
|
|
3
|
-
import { planQuery } from './query-plan';
|
|
4
|
-
import { planToSql } from './sql';
|
|
1
|
+
import { resolveIdField } from '../schema.js';
|
|
2
|
+
import { nudgeEnterprise } from '../license.js';
|
|
3
|
+
import { planQuery } from './query-plan.js';
|
|
4
|
+
import { planToSql } from './sql.js';
|
|
5
5
|
const SQL_AGG = { sum: 'SUM', avg: 'AVG', min: 'MIN', max: 'MAX' };
|
|
6
6
|
function quoter(dialect) {
|
|
7
7
|
const q = dialect.quote ?? '"';
|
package/dist/sveltekit/sql.d.ts
CHANGED
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
* (Or map `plan.where` to Drizzle operators directly - the plan is the seam
|
|
22
22
|
* either way.)
|
|
23
23
|
*/
|
|
24
|
-
import type { QueryPlan } from './query-plan';
|
|
24
|
+
import type { QueryPlan } from './query-plan.js';
|
|
25
25
|
export type SqlDialect = {
|
|
26
26
|
/** Identifier quote char. Default `"` (ANSI / Postgres / SQLite). MySQL: `` ` ``. */
|
|
27
27
|
quote?: string;
|
|
@@ -24,8 +24,8 @@
|
|
|
24
24
|
* const controller = createServerDataSource(source, { onChange: ... })
|
|
25
25
|
*/
|
|
26
26
|
import type { RowData, ServerDataSource, ServerRequest } from '@svgrid/grid';
|
|
27
|
-
import type { EntitySchema } from '../schema';
|
|
28
|
-
import type { WritableDataSource } from './types';
|
|
27
|
+
import type { EntitySchema } from '../schema.js';
|
|
28
|
+
import type { WritableDataSource } from './types.js';
|
|
29
29
|
/** Wire protocol: the single JSON body shape the client POSTs and the server dispatches on. */
|
|
30
30
|
export type KitMessage<TData> = {
|
|
31
31
|
kind: 'query';
|