@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/README.md
CHANGED
|
@@ -1,95 +1,95 @@
|
|
|
1
|
-
<p align="center">
|
|
2
|
-
<img src="https://svgrid.com/brand/svgrid-logo-icon-1200.png" alt="SvGrid" width="100" height="100" />
|
|
3
|
-
</p>
|
|
4
|
-
|
|
5
|
-
<h1 align="center">@svgrid/enterprise</h1>
|
|
6
|
-
|
|
7
|
-
<p align="center"><strong>Excel export, import, pivot tables, and print for SvGrid.</strong></p>
|
|
8
|
-
|
|
9
|
-
<p align="center">
|
|
10
|
-
<a href="https://www.npmjs.com/package/@svgrid/enterprise"><img src="https://img.shields.io/npm/v/%40svgrid%2Fenterprise.svg?label=%40svgrid%2Fenterprise" alt="npm version" /></a>
|
|
11
|
-
<a href="https://svgrid.com/pricing/"><img src="https://img.shields.io/badge/license-commercial-blue.svg" alt="Commercial license" /></a>
|
|
12
|
-
<a href="https://svelte.dev"><img src="https://img.shields.io/badge/svelte-5-ff3e00.svg" alt="Svelte 5" /></a>
|
|
13
|
-
</p>
|
|
14
|
-
|
|
15
|
-
<p align="center">
|
|
16
|
-
<a href="https://svgrid.com">Website</a> ·
|
|
17
|
-
<a href="https://svgrid.com/docs/">Docs</a> ·
|
|
18
|
-
<a href="https://svgrid.com/pricing/">Pricing</a>
|
|
19
|
-
</p>
|
|
20
|
-
|
|
21
|
-
---
|
|
22
|
-
|
|
23
|
-
`@svgrid/enterprise` layers production export, printing, analytics, extra grid views, and a full data-app layer on top of the MIT [`@svgrid/grid`](https://www.npmjs.com/package/@svgrid/grid) core. It attaches to the grid's public API without changing it - the same `api` object you already hold simply gains new methods.
|
|
24
|
-
|
|
25
|
-
## What it adds
|
|
26
|
-
|
|
27
|
-
- **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
|
-
- **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
|
-
- **Paginated print** - opens a clean, paginated, printable view of the grid with title and page breaks.
|
|
30
|
-
- **Pivot tables** - drag-and-drop pivot Designer with row/column/value fields, aggregation, drill-through to source rows, and pivot-to-chart.
|
|
31
|
-
- **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
|
-
- **Staged editing** - collect edits into a reviewable change set before committing.
|
|
33
|
-
- **Scheduling automation** - a client-side cron / one-off scheduler (`createScheduler`, `parseCron`, `CRON_PRESETS`) to drive recurring exports and alerts with no backend.
|
|
34
|
-
- **SvGrid Studio** - 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
|
-
|
|
36
|
-
## Install
|
|
37
|
-
|
|
38
|
-
```bash
|
|
39
|
-
npm install @svgrid/enterprise
|
|
40
|
-
```
|
|
41
|
-
|
|
42
|
-
Format engines are optional peer dependencies - install only the ones you use:
|
|
43
|
-
|
|
44
|
-
```bash
|
|
45
|
-
npm install jszip # Excel (.xlsx) export + import
|
|
46
|
-
npm install pdfmake # PDF export
|
|
47
|
-
```
|
|
48
|
-
|
|
49
|
-
## Usage
|
|
50
|
-
|
|
51
|
-
```ts
|
|
52
|
-
import { setLicenseKey, installEnterprise } from '@svgrid/enterprise'
|
|
53
|
-
|
|
54
|
-
setLicenseKey('SVENTERPRISE-XXXX-XXXX-XXXX') // your Enterprise key
|
|
55
|
-
|
|
56
|
-
// Inside <SvGrid onApiReady={(api) => { ... }}>:
|
|
57
|
-
const pro = installEnterprise(api)
|
|
58
|
-
|
|
59
|
-
// Export / print
|
|
60
|
-
await pro.exportData({ format: 'xlsx', filename: 'orders' })
|
|
61
|
-
pro.print({ title: 'Q2 Orders' })
|
|
62
|
-
|
|
63
|
-
// Import
|
|
64
|
-
const result = await pro.importData({ file, format: 'xlsx' })
|
|
65
|
-
|
|
66
|
-
// Pivot - returns { rows, columns } for a second <SvGrid>
|
|
67
|
-
const { rows, columns } = pro.pivot.build({
|
|
68
|
-
rows: ['region'],
|
|
69
|
-
values: [{ field: 'total', agg: 'sum' }],
|
|
70
|
-
})
|
|
71
|
-
```
|
|
72
|
-
|
|
73
|
-
The AI helpers are **not** in this package. Natural-language filter,
|
|
74
|
-
smart fill, summarize, classify, anomaly detection, and "chart this" are
|
|
75
|
-
built in and free in [`@svgrid/grid`](https://www.npmjs.com/package/@svgrid/grid).
|
|
76
|
-
Installing Enterprise only adds the Excel/PDF export engine that
|
|
77
|
-
AI-planned exports write through.
|
|
78
|
-
|
|
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 and scheduler / calendar views, so `<SvGrid board={...}>` and `<SvGrid scheduler={...}>` render.
|
|
80
|
-
|
|
81
|
-
## Licensing
|
|
82
|
-
|
|
83
|
-
Commercial. A valid Enterprise key is required at runtime; calls throw without one. Purchase a key at [svgrid.com/pricing](https://svgrid.com/pricing/).
|
|
84
|
-
|
|
85
|
-
OSS projects under an [OSI-approved license](https://opensource.org/licenses) qualify for a **free Enterprise key**.
|
|
86
|
-
|
|
87
|
-
The source in this package is published for evaluation and for paying customers; visibility does not grant a license. See [LICENSE](./LICENSE).
|
|
88
|
-
|
|
89
|
-
## Support
|
|
90
|
-
|
|
91
|
-
Enterprise licenses include commercial and priority support. Open an issue at [github.com/sv-grid/sv-grid](https://github.com/sv-grid/sv-grid/issues) or reach the team via [svgrid.com](https://svgrid.com).
|
|
92
|
-
|
|
93
|
-
## Trademark
|
|
94
|
-
|
|
95
|
-
SvGrid™ and sv-grid™ are trademarks of jQWidgets Ltd.
|
|
1
|
+
<p align="center">
|
|
2
|
+
<img src="https://svgrid.com/brand/svgrid-logo-icon-1200.png" alt="SvGrid" width="100" height="100" />
|
|
3
|
+
</p>
|
|
4
|
+
|
|
5
|
+
<h1 align="center">@svgrid/enterprise</h1>
|
|
6
|
+
|
|
7
|
+
<p align="center"><strong>Excel export, import, pivot tables, and print for SvGrid.</strong></p>
|
|
8
|
+
|
|
9
|
+
<p align="center">
|
|
10
|
+
<a href="https://www.npmjs.com/package/@svgrid/enterprise"><img src="https://img.shields.io/npm/v/%40svgrid%2Fenterprise.svg?label=%40svgrid%2Fenterprise" alt="npm version" /></a>
|
|
11
|
+
<a href="https://svgrid.com/pricing/"><img src="https://img.shields.io/badge/license-commercial-blue.svg" alt="Commercial license" /></a>
|
|
12
|
+
<a href="https://svelte.dev"><img src="https://img.shields.io/badge/svelte-5-ff3e00.svg" alt="Svelte 5" /></a>
|
|
13
|
+
</p>
|
|
14
|
+
|
|
15
|
+
<p align="center">
|
|
16
|
+
<a href="https://svgrid.com">Website</a> ·
|
|
17
|
+
<a href="https://svgrid.com/docs/">Docs</a> ·
|
|
18
|
+
<a href="https://svgrid.com/pricing/">Pricing</a>
|
|
19
|
+
</p>
|
|
20
|
+
|
|
21
|
+
---
|
|
22
|
+
|
|
23
|
+
`@svgrid/enterprise` layers production export, printing, analytics, extra grid views, and a full data-app layer on top of the MIT [`@svgrid/grid`](https://www.npmjs.com/package/@svgrid/grid) core. It attaches to the grid's public API without changing it - the same `api` object you already hold simply gains new methods.
|
|
24
|
+
|
|
25
|
+
## What it adds
|
|
26
|
+
|
|
27
|
+
- **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
|
+
- **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
|
+
- **Paginated print** - opens a clean, paginated, printable view of the grid with title and page breaks.
|
|
30
|
+
- **Pivot tables** - drag-and-drop pivot Designer with row/column/value fields, aggregation, drill-through to source rows, and pivot-to-chart.
|
|
31
|
+
- **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
|
+
- **Staged editing** - collect edits into a reviewable change set before committing.
|
|
33
|
+
- **Scheduling automation** - a client-side cron / one-off scheduler (`createScheduler`, `parseCron`, `CRON_PRESETS`) to drive recurring exports and alerts with no backend.
|
|
34
|
+
- **SvGrid Studio** - 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
|
+
|
|
36
|
+
## Install
|
|
37
|
+
|
|
38
|
+
```bash
|
|
39
|
+
npm install @svgrid/enterprise
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
Format engines are optional peer dependencies - install only the ones you use:
|
|
43
|
+
|
|
44
|
+
```bash
|
|
45
|
+
npm install jszip # Excel (.xlsx) export + import
|
|
46
|
+
npm install pdfmake # PDF export
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
## Usage
|
|
50
|
+
|
|
51
|
+
```ts
|
|
52
|
+
import { setLicenseKey, installEnterprise } from '@svgrid/enterprise'
|
|
53
|
+
|
|
54
|
+
setLicenseKey('SVENTERPRISE-XXXX-XXXX-XXXX') // your Enterprise key
|
|
55
|
+
|
|
56
|
+
// Inside <SvGrid onApiReady={(api) => { ... }}>:
|
|
57
|
+
const pro = installEnterprise(api)
|
|
58
|
+
|
|
59
|
+
// Export / print
|
|
60
|
+
await pro.exportData({ format: 'xlsx', filename: 'orders' })
|
|
61
|
+
pro.print({ title: 'Q2 Orders' })
|
|
62
|
+
|
|
63
|
+
// Import
|
|
64
|
+
const result = await pro.importData({ file, format: 'xlsx' })
|
|
65
|
+
|
|
66
|
+
// Pivot - returns { rows, columns } for a second <SvGrid>
|
|
67
|
+
const { rows, columns } = pro.pivot.build({
|
|
68
|
+
rows: ['region'],
|
|
69
|
+
values: [{ field: 'total', agg: 'sum' }],
|
|
70
|
+
})
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
The AI helpers are **not** in this package. Natural-language filter,
|
|
74
|
+
smart fill, summarize, classify, anomaly detection, and "chart this" are
|
|
75
|
+
built in and free in [`@svgrid/grid`](https://www.npmjs.com/package/@svgrid/grid).
|
|
76
|
+
Installing Enterprise only adds the Excel/PDF export engine that
|
|
77
|
+
AI-planned exports write through.
|
|
78
|
+
|
|
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 and scheduler / calendar views, so `<SvGrid board={...}>` and `<SvGrid scheduler={...}>` render.
|
|
80
|
+
|
|
81
|
+
## Licensing
|
|
82
|
+
|
|
83
|
+
Commercial. A valid Enterprise key is required at runtime; calls throw without one. Purchase a key at [svgrid.com/pricing](https://svgrid.com/pricing/).
|
|
84
|
+
|
|
85
|
+
OSS projects under an [OSI-approved license](https://opensource.org/licenses) qualify for a **free Enterprise key**.
|
|
86
|
+
|
|
87
|
+
The source in this package is published for evaluation and for paying customers; visibility does not grant a license. See [LICENSE](./LICENSE).
|
|
88
|
+
|
|
89
|
+
## Support
|
|
90
|
+
|
|
91
|
+
Enterprise licenses include commercial and priority support. Open an issue at [github.com/sv-grid/sv-grid](https://github.com/sv-grid/sv-grid/issues) or reach the team via [svgrid.com](https://svgrid.com).
|
|
92
|
+
|
|
93
|
+
## Trademark
|
|
94
|
+
|
|
95
|
+
SvGrid™ and sv-grid™ are trademarks of jQWidgets Ltd.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { ExprColumn } from './expressions/expression-columns';
|
|
2
|
-
import type { PredicateExpr } from './expressions/expression-types';
|
|
1
|
+
import type { ExprColumn } from './expressions/expression-columns.js';
|
|
2
|
+
import type { PredicateExpr } from './expressions/expression-types.js';
|
|
3
3
|
type Props = {
|
|
4
4
|
columns: ReadonlyArray<ExprColumn>;
|
|
5
5
|
initial: PredicateExpr;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { ExprColumn } from './expressions/expression-columns';
|
|
2
|
-
import type { PredicateExpr } from './expressions/expression-types';
|
|
1
|
+
import type { ExprColumn } from './expressions/expression-columns.js';
|
|
2
|
+
import type { PredicateExpr } from './expressions/expression-types.js';
|
|
3
3
|
type MinimalApi = {
|
|
4
4
|
getColumns(): ReadonlyArray<{
|
|
5
5
|
id: string;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { ExprColumn } from './expressions/expression-columns';
|
|
2
|
-
import type { AlertRule } from './alerts/alert-types';
|
|
1
|
+
import type { ExprColumn } from './expressions/expression-columns.js';
|
|
2
|
+
import type { AlertRule } from './alerts/alert-types.js';
|
|
3
3
|
type Props = {
|
|
4
4
|
open?: boolean;
|
|
5
5
|
columns: ReadonlyArray<ExprColumn>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type { ExprColumn } from './expressions/expression-columns';
|
|
2
|
-
import type { AlertRulesManager } from './alerts/alert-storage';
|
|
3
|
-
import type { AlertRule } from './alerts/alert-types';
|
|
1
|
+
import type { ExprColumn } from './expressions/expression-columns.js';
|
|
2
|
+
import type { AlertRulesManager } from './alerts/alert-storage.js';
|
|
3
|
+
import type { AlertRule } from './alerts/alert-types.js';
|
|
4
4
|
type Props = {
|
|
5
5
|
open?: boolean;
|
|
6
6
|
manager: AlertRulesManager;
|
package/dist/SvAuthGate.svelte
CHANGED
|
@@ -1,115 +1,115 @@
|
|
|
1
|
-
<script lang="ts">
|
|
2
|
-
/**
|
|
3
|
-
* SvAuthGate - require a signed-in user before showing its content. Renders a
|
|
4
|
-
* login / sign-up form when signed out (Supabase Auth via `createSupabaseAuth`)
|
|
5
|
-
* and its children when signed in, with a small "signed in as ... / Sign out"
|
|
6
|
-
* bar. Pair with Row-Level Security so each user sees only their own rows.
|
|
7
|
-
*
|
|
8
|
-
* <SvAuthGate {client}>
|
|
9
|
-
* <MyStudioScreen />
|
|
10
|
-
* </SvAuthGate>
|
|
11
|
-
*/
|
|
12
|
-
import type { Snippet } from 'svelte'
|
|
13
|
-
import { createSupabaseAuth, type AuthState, type SupabaseAuthClientLike, type SupabaseAuthController } from './sources/auth-supabase'
|
|
14
|
-
|
|
15
|
-
type Props = {
|
|
16
|
-
client: SupabaseAuthClientLike
|
|
17
|
-
children: Snippet
|
|
18
|
-
title?: string
|
|
19
|
-
/** Show the "signed in as ... / Sign out" bar. Default true. */
|
|
20
|
-
showBar?: boolean
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
let { client, children, title = 'Sign in', showBar = true }: Props = $props()
|
|
24
|
-
|
|
25
|
-
let auth = $state<SupabaseAuthController | undefined>()
|
|
26
|
-
let authState = $state<AuthState>({ user: null, loading: true, error: null })
|
|
27
|
-
let mode = $state<'signin' | 'signup'>('signin')
|
|
28
|
-
let email = $state('')
|
|
29
|
-
let password = $state('')
|
|
30
|
-
|
|
31
|
-
$effect(() => {
|
|
32
|
-
const controller = createSupabaseAuth({ client, onChange: (s) => (authState = s) })
|
|
33
|
-
auth = controller
|
|
34
|
-
return () => controller.dispose()
|
|
35
|
-
})
|
|
36
|
-
|
|
37
|
-
function submit(e: SubmitEvent) {
|
|
38
|
-
e.preventDefault()
|
|
39
|
-
if (mode === 'signin') auth?.signIn(email, password)
|
|
40
|
-
else auth?.signUp(email, password)
|
|
41
|
-
}
|
|
42
|
-
</script>
|
|
43
|
-
|
|
44
|
-
{#if authState.user}
|
|
45
|
-
{#if showBar}
|
|
46
|
-
<div class="sv-auth-bar">
|
|
47
|
-
<span>Signed in as <strong>{authState.user.email ?? authState.user.id}</strong></span>
|
|
48
|
-
<button type="button" onclick={() => auth?.signOut()} disabled={authState.loading}>Sign out</button>
|
|
49
|
-
</div>
|
|
50
|
-
{/if}
|
|
51
|
-
{@render children()}
|
|
52
|
-
{:else}
|
|
53
|
-
<div class="sv-auth">
|
|
54
|
-
<form class="sv-auth__form" onsubmit={submit}>
|
|
55
|
-
<h2 class="sv-auth__title">{mode === 'signin' ? title : 'Create account'}</h2>
|
|
56
|
-
|
|
57
|
-
<label class="sv-auth__field">
|
|
58
|
-
<span>Email</span>
|
|
59
|
-
<input type="email" autocomplete="email" bind:value={email} required />
|
|
60
|
-
</label>
|
|
61
|
-
<label class="sv-auth__field">
|
|
62
|
-
<span>Password</span>
|
|
63
|
-
<input type="password" autocomplete="current-password" bind:value={password} required />
|
|
64
|
-
</label>
|
|
65
|
-
|
|
66
|
-
{#if authState.error}<p class="sv-auth__error">{authState.error}</p>{/if}
|
|
67
|
-
|
|
68
|
-
<button class="sv-auth__submit" type="submit" disabled={authState.loading}>
|
|
69
|
-
{authState.loading ? 'Please wait…' : mode === 'signin' ? 'Sign in' : 'Create account'}
|
|
70
|
-
</button>
|
|
71
|
-
|
|
72
|
-
<button
|
|
73
|
-
type="button"
|
|
74
|
-
class="sv-auth__toggle"
|
|
75
|
-
onclick={() => (mode = mode === 'signin' ? 'signup' : 'signin')}
|
|
76
|
-
>
|
|
77
|
-
{mode === 'signin' ? 'Need an account? Sign up' : 'Have an account? Sign in'}
|
|
78
|
-
</button>
|
|
79
|
-
</form>
|
|
80
|
-
</div>
|
|
81
|
-
{/if}
|
|
82
|
-
|
|
83
|
-
<style>
|
|
84
|
-
.sv-auth { display: flex; justify-content: center; padding: 32px 16px; }
|
|
85
|
-
.sv-auth__form {
|
|
86
|
-
display: flex; flex-direction: column; gap: 12px; width: 100%; max-width: 320px;
|
|
87
|
-
padding: 24px; border: 1px solid var(--sg-border, #e2e2e2); border-radius: 12px;
|
|
88
|
-
background: var(--sg-bg, #fff); color: var(--sg-fg, inherit);
|
|
89
|
-
}
|
|
90
|
-
.sv-auth__title { margin: 0 0 4px; font-size: 18px; font-weight: 600; }
|
|
91
|
-
.sv-auth__field { display: flex; flex-direction: column; gap: 4px; font-size: 12px; font-weight: 600; color: var(--sg-muted, #555); }
|
|
92
|
-
.sv-auth__field input {
|
|
93
|
-
padding: 8px 10px; border: 1px solid var(--sg-border, #ccc); border-radius: 6px;
|
|
94
|
-
background: var(--sg-input-bg, #fff); color: var(--sg-fg, inherit); font: inherit;
|
|
95
|
-
}
|
|
96
|
-
.sv-auth__error { margin: 0; font-size: 13px; color: #dc2626; }
|
|
97
|
-
.sv-auth__submit {
|
|
98
|
-
padding: 9px 12px; border: 1px solid var(--sg-accent, #2563eb); border-radius: 6px;
|
|
99
|
-
background: var(--sg-accent, #2563eb); color: #fff; cursor: pointer; font: inherit; font-weight: 600;
|
|
100
|
-
}
|
|
101
|
-
.sv-auth__submit:disabled { opacity: 0.6; cursor: default; }
|
|
102
|
-
.sv-auth__toggle { border: none; background: none; color: var(--sg-accent, #2563eb); cursor: pointer; font: inherit; font-size: 13px; }
|
|
103
|
-
|
|
104
|
-
.sv-auth-bar {
|
|
105
|
-
display: flex; align-items: center; justify-content: space-between; gap: 12px;
|
|
106
|
-
padding: 8px 12px; margin-bottom: 12px; font-size: 13px;
|
|
107
|
-
border: 1px solid var(--sg-border, #e2e2e2); border-radius: 8px;
|
|
108
|
-
background: var(--sg-header-bg, #f8fafc); color: var(--sg-fg, inherit);
|
|
109
|
-
}
|
|
110
|
-
.sv-auth-bar button {
|
|
111
|
-
padding: 5px 10px; border: 1px solid var(--sg-border, #ccc); border-radius: 6px;
|
|
112
|
-
background: var(--sg-bg, #fff); color: var(--sg-fg, inherit); cursor: pointer; font: inherit;
|
|
113
|
-
}
|
|
114
|
-
.sv-auth-bar button:disabled { opacity: 0.5; cursor: default; }
|
|
115
|
-
</style>
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
/**
|
|
3
|
+
* SvAuthGate - require a signed-in user before showing its content. Renders a
|
|
4
|
+
* login / sign-up form when signed out (Supabase Auth via `createSupabaseAuth`)
|
|
5
|
+
* and its children when signed in, with a small "signed in as ... / Sign out"
|
|
6
|
+
* bar. Pair with Row-Level Security so each user sees only their own rows.
|
|
7
|
+
*
|
|
8
|
+
* <SvAuthGate {client}>
|
|
9
|
+
* <MyStudioScreen />
|
|
10
|
+
* </SvAuthGate>
|
|
11
|
+
*/
|
|
12
|
+
import type { Snippet } from 'svelte'
|
|
13
|
+
import { createSupabaseAuth, type AuthState, type SupabaseAuthClientLike, type SupabaseAuthController } from './sources/auth-supabase'
|
|
14
|
+
|
|
15
|
+
type Props = {
|
|
16
|
+
client: SupabaseAuthClientLike
|
|
17
|
+
children: Snippet
|
|
18
|
+
title?: string
|
|
19
|
+
/** Show the "signed in as ... / Sign out" bar. Default true. */
|
|
20
|
+
showBar?: boolean
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
let { client, children, title = 'Sign in', showBar = true }: Props = $props()
|
|
24
|
+
|
|
25
|
+
let auth = $state<SupabaseAuthController | undefined>()
|
|
26
|
+
let authState = $state<AuthState>({ user: null, loading: true, error: null })
|
|
27
|
+
let mode = $state<'signin' | 'signup'>('signin')
|
|
28
|
+
let email = $state('')
|
|
29
|
+
let password = $state('')
|
|
30
|
+
|
|
31
|
+
$effect(() => {
|
|
32
|
+
const controller = createSupabaseAuth({ client, onChange: (s) => (authState = s) })
|
|
33
|
+
auth = controller
|
|
34
|
+
return () => controller.dispose()
|
|
35
|
+
})
|
|
36
|
+
|
|
37
|
+
function submit(e: SubmitEvent) {
|
|
38
|
+
e.preventDefault()
|
|
39
|
+
if (mode === 'signin') auth?.signIn(email, password)
|
|
40
|
+
else auth?.signUp(email, password)
|
|
41
|
+
}
|
|
42
|
+
</script>
|
|
43
|
+
|
|
44
|
+
{#if authState.user}
|
|
45
|
+
{#if showBar}
|
|
46
|
+
<div class="sv-auth-bar">
|
|
47
|
+
<span>Signed in as <strong>{authState.user.email ?? authState.user.id}</strong></span>
|
|
48
|
+
<button type="button" onclick={() => auth?.signOut()} disabled={authState.loading}>Sign out</button>
|
|
49
|
+
</div>
|
|
50
|
+
{/if}
|
|
51
|
+
{@render children()}
|
|
52
|
+
{:else}
|
|
53
|
+
<div class="sv-auth">
|
|
54
|
+
<form class="sv-auth__form" onsubmit={submit}>
|
|
55
|
+
<h2 class="sv-auth__title">{mode === 'signin' ? title : 'Create account'}</h2>
|
|
56
|
+
|
|
57
|
+
<label class="sv-auth__field">
|
|
58
|
+
<span>Email</span>
|
|
59
|
+
<input type="email" autocomplete="email" bind:value={email} required />
|
|
60
|
+
</label>
|
|
61
|
+
<label class="sv-auth__field">
|
|
62
|
+
<span>Password</span>
|
|
63
|
+
<input type="password" autocomplete="current-password" bind:value={password} required />
|
|
64
|
+
</label>
|
|
65
|
+
|
|
66
|
+
{#if authState.error}<p class="sv-auth__error">{authState.error}</p>{/if}
|
|
67
|
+
|
|
68
|
+
<button class="sv-auth__submit" type="submit" disabled={authState.loading}>
|
|
69
|
+
{authState.loading ? 'Please wait…' : mode === 'signin' ? 'Sign in' : 'Create account'}
|
|
70
|
+
</button>
|
|
71
|
+
|
|
72
|
+
<button
|
|
73
|
+
type="button"
|
|
74
|
+
class="sv-auth__toggle"
|
|
75
|
+
onclick={() => (mode = mode === 'signin' ? 'signup' : 'signin')}
|
|
76
|
+
>
|
|
77
|
+
{mode === 'signin' ? 'Need an account? Sign up' : 'Have an account? Sign in'}
|
|
78
|
+
</button>
|
|
79
|
+
</form>
|
|
80
|
+
</div>
|
|
81
|
+
{/if}
|
|
82
|
+
|
|
83
|
+
<style>
|
|
84
|
+
.sv-auth { display: flex; justify-content: center; padding: 32px 16px; }
|
|
85
|
+
.sv-auth__form {
|
|
86
|
+
display: flex; flex-direction: column; gap: 12px; width: 100%; max-width: 320px;
|
|
87
|
+
padding: 24px; border: 1px solid var(--sg-border, #e2e2e2); border-radius: 12px;
|
|
88
|
+
background: var(--sg-bg, #fff); color: var(--sg-fg, inherit);
|
|
89
|
+
}
|
|
90
|
+
.sv-auth__title { margin: 0 0 4px; font-size: 18px; font-weight: 600; }
|
|
91
|
+
.sv-auth__field { display: flex; flex-direction: column; gap: 4px; font-size: 12px; font-weight: 600; color: var(--sg-muted, #555); }
|
|
92
|
+
.sv-auth__field input {
|
|
93
|
+
padding: 8px 10px; border: 1px solid var(--sg-border, #ccc); border-radius: 6px;
|
|
94
|
+
background: var(--sg-input-bg, #fff); color: var(--sg-fg, inherit); font: inherit;
|
|
95
|
+
}
|
|
96
|
+
.sv-auth__error { margin: 0; font-size: 13px; color: #dc2626; }
|
|
97
|
+
.sv-auth__submit {
|
|
98
|
+
padding: 9px 12px; border: 1px solid var(--sg-accent, #2563eb); border-radius: 6px;
|
|
99
|
+
background: var(--sg-accent, #2563eb); color: #fff; cursor: pointer; font: inherit; font-weight: 600;
|
|
100
|
+
}
|
|
101
|
+
.sv-auth__submit:disabled { opacity: 0.6; cursor: default; }
|
|
102
|
+
.sv-auth__toggle { border: none; background: none; color: var(--sg-accent, #2563eb); cursor: pointer; font: inherit; font-size: 13px; }
|
|
103
|
+
|
|
104
|
+
.sv-auth-bar {
|
|
105
|
+
display: flex; align-items: center; justify-content: space-between; gap: 12px;
|
|
106
|
+
padding: 8px 12px; margin-bottom: 12px; font-size: 13px;
|
|
107
|
+
border: 1px solid var(--sg-border, #e2e2e2); border-radius: 8px;
|
|
108
|
+
background: var(--sg-header-bg, #f8fafc); color: var(--sg-fg, inherit);
|
|
109
|
+
}
|
|
110
|
+
.sv-auth-bar button {
|
|
111
|
+
padding: 5px 10px; border: 1px solid var(--sg-border, #ccc); border-radius: 6px;
|
|
112
|
+
background: var(--sg-bg, #fff); color: var(--sg-fg, inherit); cursor: pointer; font: inherit;
|
|
113
|
+
}
|
|
114
|
+
.sv-auth-bar button:disabled { opacity: 0.5; cursor: default; }
|
|
115
|
+
</style>
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
* </SvAuthGate>
|
|
10
10
|
*/
|
|
11
11
|
import type { Snippet } from 'svelte';
|
|
12
|
-
import { type SupabaseAuthClientLike } from './sources/auth-supabase';
|
|
12
|
+
import { type SupabaseAuthClientLike } from './sources/auth-supabase.js';
|
|
13
13
|
type Props = {
|
|
14
14
|
client: SupabaseAuthClientLike;
|
|
15
15
|
children: Snippet;
|
package/dist/SvBoard.svelte.d.ts
CHANGED
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
* SvSchemaChart / SvGridEditPanel), so both the generated app and the designer
|
|
10
10
|
* preview render it identically.
|
|
11
11
|
*/
|
|
12
|
-
import type { EntitySchema } from './schema';
|
|
12
|
+
import type { EntitySchema } from './schema.js';
|
|
13
13
|
type Row = Record<string, unknown>;
|
|
14
14
|
type $$ComponentProps = {
|
|
15
15
|
schema: EntitySchema<any>;
|