@svgrid/enterprise 3.0.0 → 3.0.1
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/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 +1990 -1990
- package/dist/SvPivotDesigner.svelte.d.ts +2 -2
- package/dist/SvRecordDetail.svelte.d.ts +1 -1
- package/dist/SvSchedule.svelte.d.ts +1 -1
- package/dist/SvSchemaChart.svelte +234 -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/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 +1161 -1144
- package/dist/designer/assets/GridMenus-B1JtIN21.js +8 -0
- package/dist/designer/assets/SvDateRangeInput-C0iCCZ8o.css +1 -0
- package/dist/designer/assets/{SvDateRangeInput-CVn-yqrQ.js → SvDateRangeInput-CjO7nn_x.js} +1 -1
- package/dist/designer/assets/SvDateTimePicker-ByBD_ov6.js +1 -0
- package/dist/designer/assets/SvDateTimePicker-DPv09DIT.css +1 -0
- package/dist/designer/assets/SvField-YDLipR6O.css +1 -0
- package/dist/designer/assets/{SvField-BsqiA5me.js → SvField-cj1PFNgZ.js} +1 -1
- package/dist/designer/assets/{preload-helper-CG0n22O7.js → SvGrid.helpers-BgT-gnCo.js} +1 -1
- package/dist/designer/assets/SvGridCellEditor-0W1L2hJ1.js +2 -0
- package/dist/designer/assets/SvGridChart-DBOR4xcz.js +2 -0
- package/dist/designer/assets/SvGridChart-fkMWeh1J.css +1 -0
- package/dist/designer/assets/SvGridChartPanel-symrhNnR.js +11 -0
- package/dist/designer/assets/SvGridChartView-BmRxq6mU.js +1 -0
- package/dist/designer/assets/SvGridChartView-DUc-1RUf.css +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-1oUF6Iav.js +110 -0
- package/dist/designer/assets/SvListBox-BXfyqy4a.css +1 -0
- package/dist/designer/assets/cell-formatting-wr5wm7US.js +1 -0
- package/dist/designer/assets/chart-DXFganU8.js +1 -0
- package/dist/designer/assets/date-format-DGagAqRc.css +1 -0
- package/dist/designer/assets/{date-format-4DJvNtG2.js → date-format-onlYDsrY.js} +1 -1
- package/dist/designer/assets/export-format-D-eP4b2l.js +6 -0
- package/dist/designer/assets/{index-zUBix-JQ.js → index-C_a9Cj8Y.js} +2984 -141
- package/dist/designer/assets/index-k2stW6L8.css +1 -0
- package/dist/designer/assets/preload-helper-HclGiUj8.js +1 -0
- package/dist/designer/assets/src-D9p27OGC.js +58 -0
- package/dist/designer/index.html +22 -22
- package/dist/export-conditional.d.ts +1 -1
- 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 +7 -7
- 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 +53 -53
- package/dist/index.js +50 -50
- package/dist/install.d.ts +4 -4
- package/dist/install.js +11 -11
- package/dist/license.d.ts +3 -2
- package/dist/license.js +9 -4
- package/dist/node/studio.js +123 -114
- package/dist/pivot-chart.d.ts +1 -1
- 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/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.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/package.json +6 -3
- package/dist/designer/assets/GridMenus-Cgilexpk.js +0 -8
- package/dist/designer/assets/SvDateRangeInput-BV5OXYQ2.css +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/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/date-format-Dzy4mTGh.css +0 -1
- 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/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
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var e=function(e,t){return new URL(e,t).href},t={},n=function(n,r,i){let a=Promise.resolve();if(r&&r.length>0){let n=document.getElementsByTagName(`link`),o=document.querySelector(`meta[property=csp-nonce]`),s=o?.nonce||o?.getAttribute(`nonce`);function c(e){return Promise.all(e.map(e=>Promise.resolve(e).then(e=>({status:`fulfilled`,value:e}),e=>({status:`rejected`,reason:e}))))}function l(e){return import.meta.resolve?import.meta.resolve(e):new URL(e,import.meta.url).href}a=c(r.map(r=>{if(r=e(r,i),r=l(r),r in t)return;t[r]=!0;let a=r.endsWith(`.css`);for(let e=n.length-1;e>=0;e--){let t=n[e];if(t.href===r&&(!a||t.rel===`stylesheet`))return}let o=document.createElement(`link`);if(o.rel=a?`stylesheet`:`modulepreload`,a||(o.as=`script`),o.crossOrigin=``,o.href=r,s&&o.setAttribute(`nonce`,s),document.head.appendChild(o),a)return new Promise((e,t)=>{o.addEventListener(`load`,e),o.addEventListener(`error`,()=>t(Error(`Unable to preload CSS for ${r}`)))})}))}function o(e){let t=new Event(`vite:preloadError`,{cancelable:!0});if(t.payload=e,window.dispatchEvent(t),!t.defaultPrevented)throw e}return a.then(e=>{for(let t of e||[])t.status===`rejected`&&o(t.reason);return n().catch(o)})};export{n as t};
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./jszip.min-CX2fPs3O.js","./rolldown-runtime-Dd_uD5pT.js","./pdfmake-BpIYFHoG.js","./vfs_fonts-BV-Ul9v2.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{i as e,n as t}from"./rolldown-runtime-Dd_uD5pT.js";import{a as n,c as r,d as i,i as a,l as o,n as s,o as c,s as l,t as u,u as d}from"./export-format-D-eP4b2l.js";import{t as f}from"./preload-helper-HclGiUj8.js";var p={arrows:[`↓`,`→`,`↑`],traffic:[`🔴`,`🟡`,`🟢`],triangles:[`▼`,`◆`,`▲`]};function m(e){let t=1/0,n=-1/0,r=!1;for(let i of e){if(i==null||i===``)continue;let e=Number(i);Number.isFinite(e)&&(r=!0,e<t&&(t=e),e>n&&(n=e))}return r?{min:t,max:n}:null}function h(e,t,n){let r=0;for(let e=0;e<t.length;e+=1)n>=t[e]&&(r=e+1);return e[Math.min(e.length-1,Math.max(0,r))]??e[e.length-1]}function g(e){return e<0?0:e>1?1:e}function _(e){let t=/^#?([0-9a-f]{6})$/i.exec(e.trim());if(!t)return null;let n=parseInt(t[1],16);return[n>>16&255,n>>8&255,n&255]}function v(e){return`#`+e.map(e=>Math.round(g(e/255)*255).toString(16).padStart(2,`0`)).join(``)}function y(e){let t=_(e);if(!t)return null;let n=t.map(e=>{let t=e/255;return t<=.03928?t/12.92:((t+.055)/1.055)**2.4});return .2126*n[0]+.7152*n[1]+.0722*n[2]>.45?`#1e293b`:`#ffffff`}function b(e,t,n){let r=_(e),i=_(t);if(!r||!i)return e;let a=g(n);return v([r[0]+(i[0]-r[0])*a,r[1]+(i[1]-r[1])*a,r[2]+(i[2]-r[2])*a])}function x(e,t){let n=_(e);return n?`rgba(${n[0]}, ${n[1]}, ${n[2]}, ${g(t).toFixed(3)})`:e}function ee(e,t){let n=[...e].sort((e,t)=>e.offset-t.offset);if(n.length===0)return`#000000`;if(t<=n[0].offset)return n[0].color;let r=n[n.length-1];if(t>=r.offset)return r.color;for(let e=0;e<n.length-1;e+=1){let r=n[e],i=n[e+1];if(t>=r.offset&&t<=i.offset){let e=i.offset-r.offset||1;return b(r.color,i.color,(t-r.offset)/e)}}return r.color}function S(e,t){if(e.stops&&e.stops.length>=2)return ee(e.stops,t);let n=e.min??`#ffffff`,r=e.max??`#000000`;return e.mid?t<=.5?b(n,e.mid,t/.5):b(e.mid,r,(t-.5)/.5):b(n,r,t)}function C(e,t,n,r){let i;if(e.compareColumn){let r=Number(n?.[e.compareColumn]);if(!Number.isFinite(r)||r===0)return null;i=g(t/r)}else if(e.type===`colorScale`&&e.zeroCentred){let n=e.minValue??r?.min??t,a=e.maxValue??r?.max??t;i=g(.5+t/(Math.max(Math.abs(n),Math.abs(a))||1)/2)}else{let n=r?.min??t,a=r?.max??t,o,s;if(e.bounds===`percent`){let t=a-n;o=n+(e.minValue??0)/100*t,s=n+(e.maxValue??100)/100*t}else o=e.minValue??n,s=e.maxValue??a;i=s===o?.5:g((t-o)/(s-o))}return e.type===`colorScale`&&e.reverse&&(i=1-i),i}function w(e,t,n,r,i){let a={};for(let o of r){if(o.columns&&!o.columns.includes(n))continue;let r=Number(e);if(o.type===`rule`){if(o.when({value:e,row:t})){if(o.background&&(a.background=o.background,!o.color)){let e=y(o.background);e&&(a.color=e)}o.color&&(a.color=o.color),o.fontWeight!=null&&(a.fontWeight=o.fontWeight)}continue}if(!(e==null||e===``||!Number.isFinite(r))){if(o.type===`colorScale`){let n=C(o,r,t,i);if(n==null)continue;if(o.mode===`alpha`){let[e,t]=o.alphaBounds??[.05,.85];a.background=x(o.base??`#2563eb`,e+(t-e)*n)}else{a.background=S(o,n);let e=y(a.background);e&&(a.color=e)}o.tooltip===`value`?a.title=String(e):o.tooltip===`percent`&&(a.title=`${Math.round(n*100)}%`)}else if(o.type===`dataBar`){let e;if(o.compareColumn){let n=C(o,r,t,i);if(n==null)continue;e=n*100}else if(o.bounds===`percent`){let n=C(o,r,t,i);if(n==null)continue;e=n*100}else{let t=o.minValue??Math.min(0,i?.min??0),n=(o.maxValue??i?.max??r)-t||1;e=g((r-t)/n)*100}a.dataBar={percent:e,color:r<0?o.negativeColor??`#ef4444`:o.color,fromRight:!1,gradient:o.gradient},o.showValue===!1&&(a.color=`transparent`)}else if(o.type===`iconSet`){let e=p[o.set??`arrows`];a.icon=h(e,o.thresholds,r),o.iconOnly&&(a.iconOnly=!0)}}}return a}function T(e){return(e.type===`colorScale`||e.type===`dataBar`)&&!(`compareColumn`in e&&e.compareColumn)}function te(e){return e.some(T)}var ne=new Set([]),re=`SVENTERPRISE-`;function ie(e){if(!e)return null;let t=e.split(`-`);if(t.length<3)return null;let n=t[t.length-2];if(n==null)return null;if(/^\d{6}$/.test(n)){let e=Number(n.slice(0,4)),t=Number(n.slice(4,6));return t<1||t>12?null:new Date(Date.UTC(e,t,1)-1)}if(/^\d{8}$/.test(n)){let e=Number(n.slice(0,4)),t=Number(n.slice(4,6)),r=Number(n.slice(6,8));if(t<1||t>12||r<1||r>31)return null;let i=new Date(Date.UTC(e,t-1,r,23,59,59,999));return i.getUTCMonth()===t-1?i:null}return null}function ae(e,t=new Date){if(e==null||e===``)return{status:`unset`,valid:!1};if(!e.startsWith(`SVENTERPRISE-`))return{status:`invalid`,valid:!1};if(ne.has(e))return{status:`revoked`,valid:!1};let n=ie(e)??void 0,r=n?t.getTime()>n.getTime():void 0;return{status:e.startsWith(`SVENTERPRISE-DEV`)?`dev`:e.startsWith(`SVENTERPRISE-EVAL`)?`eval`:`licensed`,valid:!0,expiresAt:n,expired:r}}var E=`data-svgrid-enterprise-watermark`,D=`data-svgrid-enterprise-nudged`,oe=`https://svgrid.com`,se=`www.svgrid.com`,ce=5e3,O=700,k=!1,A=null;function j(){le(),!(typeof document>`u`||typeof window>`u`)&&(queueMicrotask(()=>ue()),A||(A=new MutationObserver(()=>ue()),A.observe(document.body,{childList:!0,subtree:!0})))}function le(){k||(k=!0,!(typeof console>`u`)&&console.log(`%c @svgrid/enterprise %c User is using a Commercial version which requires a license.
|
|
3
|
+
Contact sales@jqwidgets.com for details or visit the license page: https://svgrid.com/pricing/`,`background:#4f46e5;color:#fff;padding:2px 6px;border-radius:3px;font-weight:600`,`color:inherit`))}function ue(){if(typeof document>`u`)return;let e=document.querySelectorAll(`.sv-grid-root, [role="grid"]`);if(e.length===0){fe();return}document.querySelectorAll(`[${E}="fixed"]`).forEach(e=>e.remove()),e.forEach(de)}function de(e){if(e.hasAttribute(D))return;e.setAttribute(D,`1`),getComputedStyle(e).position===`static`&&(e.style.position=`relative`);let t=pe(`grid`);he(t,!1),e.appendChild(t),me(t)}function fe(){if(typeof document>`u`||document.querySelector(`[${E}="fixed"]`))return;let e=pe(`fixed`);he(e,!0),document.body.appendChild(e),me(e)}function pe(e){let t=document.createElement(`a`);return t.setAttribute(E,e),t.href=oe,t.target=`_blank`,t.rel=`noopener noreferrer`,t.textContent=se,t.title=`Unlicensed @svgrid/enterprise. Contact sales@jqwidgets.com or visit www.svgrid.com.`,t}function me(e){if(typeof window>`u`){e.remove();return}window.setTimeout(()=>{e.style.opacity=`0`,window.setTimeout(()=>e.remove(),O)},ce)}function he(e,t){Object.assign(e.style,{position:t?`fixed`:`absolute`,bottom:t?`12px`:`6px`,right:t?`12px`:`8px`,zIndex:`2147483647`,background:`rgba(15,23,42,0.85)`,color:`#fff`,padding:t?`6px 10px`:`4px 8px`,borderRadius:t?`4px`:`3px`,fontFamily:`-apple-system, "Segoe UI", Roboto, sans-serif`,fontSize:t?`11px`:`10px`,lineHeight:`1.2`,textDecoration:`none`,boxShadow:t?`0 2px 12px rgba(0,0,0,0.35)`:`0 1px 4px rgba(0,0,0,0.3)`,border:`1px solid rgba(255,255,255,0.18)`,pointerEvents:`auto`,letterSpacing:`0.02em`,opacity:`1`,transition:`opacity ${O}ms ease`})}var ge=`data-svgrid-enterprise-upgrade`,_e=`https://svgrid.com/pricing`,ve=`https://svgrid.com/pricing?ref=in-app&utm_source=svgrid-enterprise&utm_medium=upgrade-prompt`,ye=!1;function M(e,t){if(ye||typeof document>`u`||typeof window>`u`||document.querySelector(`[${ge}]`))return;ye=!0;let n=be(e,t?.expired===!0);document.body.appendChild(n),requestAnimationFrame(()=>{n.style.opacity=`1`,n.style.transform=`translateY(0)`})}function N(e){e.style.opacity=`0`,e.style.transform=`translateY(8px)`,window.setTimeout(()=>e.remove(),220)}function be(e,t=!1){let n=document.createElement(`div`);n.setAttribute(ge,`1`),n.setAttribute(`role`,`dialog`),n.setAttribute(`aria-label`,t?`Your trial has ended`:`Unlock SvGrid Pro`),Object.assign(n.style,{position:`fixed`,bottom:`16px`,right:`16px`,zIndex:`2147483646`,width:`320px`,maxWidth:`calc(100vw - 32px)`,boxSizing:`border-box`,padding:`16px 16px 14px`,background:`#0f172a`,color:`#e2e8f0`,borderRadius:`12px`,border:`1px solid rgba(99,102,241,0.4)`,boxShadow:`0 12px 40px rgba(0,0,0,0.45)`,fontFamily:`-apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif`,fontSize:`13px`,lineHeight:`1.45`,opacity:`0`,transform:`translateY(8px)`,transition:`opacity 220ms ease, transform 220ms ease`});let r=e?`<strong style="color:#fff">${xe(e?String(e):`This`)}</strong> is a Pro feature.`:`You just used a <strong style="color:#fff">Pro</strong> feature.`,i=t?`TRIAL ENDED`:`PRO`,a=t?`Your trial has ended`:`Unlock SvGrid Pro`,o=t?`${r} Your evaluation period is over - everything still works,
|
|
4
|
+
but this notice stays until a licence key is set.`:`${r} It runs in evaluation with a watermark - start a free trial
|
|
5
|
+
to remove it and ship to production.`;return n.innerHTML=`
|
|
6
|
+
<button type="button" data-act="x" aria-label="Dismiss"
|
|
7
|
+
style="position:absolute;top:8px;right:8px;width:24px;height:24px;display:flex;
|
|
8
|
+
align-items:center;justify-content:center;background:transparent;border:0;
|
|
9
|
+
color:#94a3b8;font-size:18px;line-height:1;cursor:pointer;border-radius:6px;">×</button>
|
|
10
|
+
<div style="display:flex;align-items:center;gap:8px;margin-bottom:8px;">
|
|
11
|
+
<span style="display:inline-block;background:${t?`#b45309`:`#4f46e5`};color:#fff;font-size:10px;
|
|
12
|
+
font-weight:700;letter-spacing:0.06em;padding:2px 7px;border-radius:999px;">${i}</span>
|
|
13
|
+
<span style="font-weight:700;color:#fff;">${a}</span>
|
|
14
|
+
</div>
|
|
15
|
+
<p style="margin:0 0 12px;color:#cbd5e1;">
|
|
16
|
+
${o}
|
|
17
|
+
</p>
|
|
18
|
+
<div style="display:flex;gap:8px;align-items:center;">
|
|
19
|
+
<a data-act="trial" href="${ve}" target="_blank" rel="noopener noreferrer"
|
|
20
|
+
style="flex:1;text-align:center;background:#6366f1;color:#fff;font-weight:600;
|
|
21
|
+
text-decoration:none;padding:8px 12px;border-radius:8px;">${t?`Buy a licence`:`Start free trial`}</a>
|
|
22
|
+
<a data-act="pricing" href="${_e}" target="_blank" rel="noopener noreferrer"
|
|
23
|
+
style="color:#a5b4fc;text-decoration:none;padding:8px 6px;font-weight:600;">Pricing</a>
|
|
24
|
+
</div>
|
|
25
|
+
<p style="margin:10px 0 0;font-size:11px;color:#64748b;">
|
|
26
|
+
Already licensed? Call <code style="color:#94a3b8;">setLicenseKey()</code> at startup to hide this.
|
|
27
|
+
</p>
|
|
28
|
+
`,n.querySelector(`[data-act="x"]`)?.addEventListener(`click`,()=>N(n)),n.querySelector(`[data-act="trial"]`)?.addEventListener(`click`,()=>N(n)),n.querySelector(`[data-act="pricing"]`)?.addEventListener(`click`,()=>N(n)),n}function xe(e){return e.replace(/&/g,`&`).replace(/</g,`<`).replace(/>/g,`>`).replace(/"/g,`"`)}var P=null,Se=!1,Ce=!1;function we(e){if(Ce)return;Ce=!0;let t=e.expiresAt?` on ${e.expiresAt.toISOString().slice(0,10)}`:``;console.info(`@svgrid/enterprise: your evaluation license expired${t}. Everything still works, but the watermark and upgrade notice stay until a license key is set. Contact sales@jqwidgets.com or see https://svgrid.com/pricing`)}function Te(){return P!=null}function Ee(e){let t=ae(P);if(t.valid&&!t.expired)return;let n=t.valid&&t.expired===!0;j(),n&&we(t),M(e,{expired:n})}function De(e){let t=ae(P);switch(t.status){case`unset`:j(),M(e);return;case`invalid`:throw Error(`@svgrid/enterprise: invalid license key format (expected "${re}..." prefix).`);case`revoked`:throw Error(`@svgrid/enterprise: this license key has been revoked. Contact sales@jqwidgets.com for a replacement.`);case`dev`:case`eval`:if(t.expired){j(),we(t),M(e,{expired:!0});return}Se||=(console.info(`@svgrid/enterprise: using a development / evaluation license. Not for production use.`),!0);return;case`licensed`:return}}var F=!1;function Oe(){if(F)return;if(typeof window>`u`)throw Error(`@svgrid/enterprise: installSmartShim() requires a browser environment`);let e=window.Smart??{Utilities:{}};e.Utilities=e.Utilities??{},typeof e.Utilities.Assign!=`function`&&(e.Utilities.Assign=(t,n)=>{e.Utilities[t]=n}),(!e.Utilities.Core||typeof e.Utilities.Core.toDash!=`function`)&&(e.Utilities.Core={toDash:e=>e.replace(/[A-Z]/g,e=>`-`+e.toLowerCase())}),window.Smart=e,F=!0}var ke=/[\x00-\x08\x0B\x0C\x0E-\x1F]/g;function I(e){return e.replace(ke,``).replace(/&/g,`&`).replace(/</g,`<`).replace(/>/g,`>`).replace(/"/g,`"`)}function Ae(e){let t=(e,t=2)=>String(e).padStart(t,`0`);return`${e.getFullYear()}-${t(e.getMonth()+1)}-${t(e.getDate())}T${t(e.getHours())}:${t(e.getMinutes())}:${t(e.getSeconds())}.000`}async function je(e,t,n,r={}){let o=Math.max(1,r.chunkRows??5e3),s=n.length,c=r.rawValues===!0,l=r.cellVisual,u=r.precisionSafe===!0,f=new Map,p=[`<Style ss:ID="sHeader"><Font ss:Bold="1"/><Interior ss:Color="#F2F2F2" ss:Pattern="Solid"/></Style>`],m=e=>e===`right`?`Right`:e===`center`?`Center`:`Left`,h=e=>{let t=e.align&&e.align!==`left`;if(!e.numFmt&&!e.fill&&!e.color&&!e.bold&&!t)return;let n=`${e.numFmt??``}|${e.fill??``}|${e.color??``}|${e.bold?`b`:``}|${e.align??``}`,r=f.get(n);if(r)return r;let i=`s${f.size+1}`,a=[];return t&&a.push(`<Alignment ss:Horizontal="${m(e.align)}"/>`),(e.color||e.bold)&&a.push(`<Font${e.color?` ss:Color="${e.color}"`:``}${e.bold?` ss:Bold="1"`:``}/>`),e.fill&&a.push(`<Interior ss:Color="${e.fill}" ss:Pattern="Solid"/>`),e.numFmt&&a.push(`<NumberFormat ss:Format="${I(e.numFmt)}"/>`),p.push(`<Style ss:ID="${i}">${a.join(``)}</Style>`),f.set(n,i),i};function g(e,t,n,r){let o=e.link?.(t)||void 0,s=l?.(n,r),f=t=>h({numFmt:t,fill:s?.fill,color:s?.color,bold:s?.bold,align:e.align});if(e.exportValue){let n=e.exportValue(t),r=n==null?``:String(n);return{type:`String`,value:s?.icon?`${s.icon} ${r}`:r,styleId:f(),href:o}}let p=t[e.field];if(s?.icon){let t=c?String(p??``):a(p,e.format);return{type:`String`,value:`${s.icon} ${t}`,styleId:f(),href:o}}let m=e=>u&&Math.abs(e)>=0x38d7ea4c68000;if(c){let e=p==null?``:String(p);return typeof p==`number`&&Number.isFinite(p)&&!m(p)?{type:`Number`,value:e,styleId:f(),href:o}:{type:`String`,value:e,styleId:f(),href:o}}let g=i(p,e.format);if(g.ok){let t=d(e.format);return g.value instanceof Date?{type:`DateTime`,value:Ae(g.value),styleId:f(t),href:o}:m(g.value)?{type:`String`,value:String(g.value),styleId:f(),href:o}:{type:`Number`,value:String(g.value),styleId:f(t),href:o}}return{type:`String`,value:a(p,e.format),styleId:f(),href:o}}let _=e=>`<Cell${e.styleId?` ss:StyleID="${e.styleId}"`:``}${e.href?` ss:HRef="${I(e.href)}"`:``}><Data ss:Type="${e.type}">${I(e.value)}</Data></Cell>`,v=r.widths?r.widths.map(e=>`<Column ss:Width="${Math.round(e*.75)}"/>`).join(``):``,y=Math.max(0,Math.floor(r.freezeColumns??0)),b=r.freezeHeader||y>0?`<WorksheetOptions xmlns="urn:schemas-microsoft-com:office:excel"><FreezePanes/><FrozenNoSplit/>`+(r.freezeHeader?`<SplitHorizontal>1</SplitHorizontal><TopRowBottomPane>1</TopRowBottomPane>`:``)+(y>0?`<SplitVertical>${y}</SplitVertical><LeftColumnRightPane>${y}</LeftColumnRightPane>`:``)+`<ActivePane>2</ActivePane></WorksheetOptions>`:``,x=[`<Row>${t.map(e=>`<Cell ss:StyleID="sHeader"><Data ss:Type="String">${I(e.header??e.field)}</Data></Cell>`).join(``)}</Row>`];for(let e=0;e<s;e++){if(r.signal?.aborted)throw new DOMException(`Export aborted`,`AbortError`);let i=n[e],a=t.map((t,n)=>_(g(t,i,e,n))).join(``);x.push(`<Row>${a}</Row>`),e>0&&e%o===0&&(r.onProgress?.({phase:`serialize`,ratio:e/s,row:e,total:s}),await new Promise(e=>setTimeout(e,0)))}return r.onProgress?.({phase:`serialize`,ratio:1,row:s,total:s}),`<?xml version="1.0"?>
|
|
29
|
+
<?mso-application progid="Excel.Sheet"?>
|
|
30
|
+
<Workbook xmlns="urn:schemas-microsoft-com:office:spreadsheet" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:x="urn:schemas-microsoft-com:office:excel" xmlns:ss="urn:schemas-microsoft-com:office:spreadsheet" xmlns:html="http://www.w3.org/TR/REC-html40"><Styles>${p.join(``)}</Styles><Worksheet ss:Name="${I(e.slice(0,31)||`Sheet1`)}"><Table>${v}${x.join(``)}</Table>`+b+`</Worksheet></Workbook>`}var Me={"&":`&`,"<":`<`,">":`>`,'"':`"`,"'":`'`},Ne=/[\x00-\x08\x0B\x0C\x0E-\x1F]/g;function L(e){return e.replace(Ne,``).replace(/[&<>"']/g,e=>Me[e])}function R(e){let t=e,n=``;do n=String.fromCharCode(65+t%26)+n,t=Math.floor(t/26)-1;while(t>=0);return n}function z(e){if(!e)return null;let t=/^#?([0-9a-f]{6})$/i.exec(e.trim());return t?`FF`+t[1].toUpperCase():null}function Pe(e){let t=Date.UTC(1899,11,30);return(e.getTime()-t)/864e5}var B=`<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
|
31
|
+
<Types xmlns="http://schemas.openxmlformats.org/package/2006/content-types"><Default Extension="rels" ContentType="application/vnd.openxmlformats-package.relationships+xml"/><Default Extension="xml" ContentType="application/xml"/><Override PartName="/xl/workbook.xml" ContentType="application/vnd.openxmlformats-officedocument.spreadsheetml.sheet.main+xml"/><Override PartName="/xl/worksheets/sheet1.xml" ContentType="application/vnd.openxmlformats-officedocument.spreadsheetml.worksheet+xml"/><Override PartName="/xl/styles.xml" ContentType="application/vnd.openxmlformats-officedocument.spreadsheetml.styles+xml"/></Types>`,Fe=`<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
|
32
|
+
<Relationships xmlns="http://schemas.openxmlformats.org/package/2006/relationships"><Relationship Id="rId1" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/officeDocument" Target="xl/workbook.xml"/></Relationships>`;function Ie(e){return e.replace(/[\\/?*[\]:]/g,` `).trim().slice(0,31)||`Sheet1`}function Le(e){return`<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
|
33
|
+
<workbook xmlns="http://schemas.openxmlformats.org/spreadsheetml/2006/main" xmlns:r="http://schemas.openxmlformats.org/officeDocument/2006/relationships"><sheets><sheet name="${L(Ie(e))}" sheetId="1" r:id="rId1"/></sheets></workbook>`}var Re=`<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
|
34
|
+
<Relationships xmlns="http://schemas.openxmlformats.org/package/2006/relationships"><Relationship Id="rId1" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/worksheet" Target="worksheets/sheet1.xml"/><Relationship Id="rId2" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/styles" Target="styles.xml"/></Relationships>`;function ze(e,t){let n=new Map,r=164,i=e=>{if(!e)return 0;let t=n.get(e);if(t!=null)return t;let i=r++;return n.set(e,i),i},a=[`<font><sz val="11"/><name val="Calibri"/></font>`,`<font><b/><sz val="11"/><name val="Calibri"/></font>`],o=new Map,s=(e,t)=>{let n=z(t);if(!e&&!n)return 0;let r=`${e?`b`:``}|${n??``}`,i=o.get(r);if(i!=null)return i;let s=a.length;return a.push(`<font>${e?`<b/>`:``}<sz val="11"/><name val="Calibri"/>${n?`<color rgb="${n}"/>`:``}</font>`),o.set(r,s),s},c=[`<fill><patternFill patternType="none"/></fill>`,`<fill><patternFill patternType="gray125"/></fill>`],l=new Map,u=e=>{let t=z(e);if(!t)return 0;let n=l.get(t);if(n!=null)return n;let r=c.length;return c.push(`<fill><patternFill patternType="solid"><fgColor rgb="${t}"/><bgColor indexed="64"/></patternFill></fill>`),l.set(t,r),r},d=[`<xf numFmtId="0" fontId="0" fillId="0" borderId="0" xfId="0"/>`,`<xf numFmtId="0" fontId="1" fillId="0" borderId="0" xfId="0" applyFont="1"/>`],f=new Map,p=(e,t,n,r)=>{let i=`${e}|${t}|${n}|${r??``}`,a=f.get(i);if(a!=null)return a;let o=d.length,s=r&&r!==`left`?`<alignment horizontal="${r}"/>`:``;return d.push(`<xf numFmtId="${e}" fontId="${t}" fillId="${n}" borderId="0" xfId="0"${e?` applyNumberFormat="1"`:``}${t?` applyFont="1"`:``}${n?` applyFill="1"`:``}${s?` applyAlignment="1"`:``}>${s}</xf>`),f.set(i,o),o},m=e=>{let t=i(e.numFmt),n=s(e.bold===!0,e.color),r=u(e.fill);return t===0&&n===0&&r===0&&(!e.align||e.align===`left`)?0:p(t,n,r,e.align)};for(let e of t)for(let t of e)m(t);return{styleIndexOf:m,build:()=>`<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
|
35
|
+
<styleSheet xmlns="http://schemas.openxmlformats.org/spreadsheetml/2006/main">`+(n.size>0?`<numFmts count="${n.size}">${[...n.entries()].map(([e,t])=>`<numFmt numFmtId="${t}" formatCode="${L(e)}"/>`).join(``)}</numFmts>`:``)+`<fonts count="${a.length}">${a.join(``)}</fonts><fills count="${c.length}">${c.join(``)}</fills><borders count="1"><border><left/><right/><top/><bottom/><diagonal/></border></borders><cellStyleXfs count="1"><xf numFmtId="0" fontId="0" fillId="0" borderId="0"/></cellStyleXfs><cellXfs count="${d.length}">${d.join(``)}</cellXfs><cellStyles count="1"><cellStyle name="Normal" xfId="0" builtinId="0"/></cellStyles></styleSheet>`}}function Be(e){let{header:t,rows:n}=e,r=ze(t,n),i=[],a=[`<row r="1">${t.map((e,t)=>`<c r="${R(t)}1" s="1" t="inlineStr"><is><t xml:space="preserve">${L(e)}</t></is></c>`).join(``)}</row>`];for(let e=0;e<n.length;e++){let t=e+2,o=n[e],s=[];for(let e=0;e<o.length;e++){let n=o[e],a=`${R(e)}${t}`,c=r.styleIndexOf(n),l=c?` s="${c}"`:``;if(n.link&&i.push({ref:a,url:n.link,id:`rId${i.length+1}`}),n.value==null||n.value===``)s.push(`<c r="${a}"${l}/>`);else if(n.t===`n`)s.push(`<c r="${a}"${l}><v>${Number(n.value)}</v></c>`);else if(n.t===`d`){let e=n.value instanceof Date?n.value:new Date(String(n.value));s.push(`<c r="${a}"${l}><v>${Pe(e)}</v></c>`)}else n.t===`b`?s.push(`<c r="${a}"${l} t="b"><v>${+!!n.value}</v></c>`):s.push(`<c r="${a}"${l} t="inlineStr"><is><t xml:space="preserve">${L(String(n.value))}</t></is></c>`)}a.push(`<row r="${t}">${s.join(``)}</row>`)}let o=e.widths?`<cols>${e.widths.map((e,t)=>`<col min="${t+1}" max="${t+1}" width="${Math.max(4,Math.round(e/7*100)/100)}" customWidth="1"/>`).join(``)}</cols>`:``,s=Math.max(0,Math.floor(e.freezeColumns??0)),c=+!!e.freezeHeader,l=`<sheetView workbookViewId="0"/>`;if(c>0||s>0){let e=`${R(s)}${c+1}`,t=s>0&&c>0?`bottomRight`:s>0?`topRight`:`bottomLeft`;l=`<sheetView workbookViewId="0"><pane${s>0?` xSplit="${s}"`:``}${c>0?` ySplit="${c}"`:``} topLeftCell="${e}" activePane="${t}" state="frozen"/><selection pane="${t}" activeCell="${e}" sqref="${e}"/></sheetView>`}let u=n.length>0?(e.condFormats??[]).map((e,t)=>{let r=R(e.colIdx),i=`${r}2:${r}${n.length+1}`;if(e.kind===`dataBar`){let n=z(e.color)??`FF638EC6`;return`<conditionalFormatting sqref="${i}"><cfRule type="dataBar" priority="${t+1}"><dataBar><cfvo type="min"/><cfvo type="max"/><color rgb="${n}"/></dataBar></cfRule></conditionalFormatting>`}let a=e.colors.map(e=>z(e)??`FFFFFFFF`),o=a.length>=3?`<cfvo type="min"/><cfvo type="percentile" val="50"/><cfvo type="max"/>`:`<cfvo type="min"/><cfvo type="max"/>`,s=a.map(e=>`<color rgb="${e}"/>`).join(``);return`<conditionalFormatting sqref="${i}"><cfRule type="colorScale" priority="${t+1}"><colorScale>${o}${s}</colorScale></cfRule></conditionalFormatting>`}).join(``):``,d=i.length?`<hyperlinks>${i.map(e=>`<hyperlink ref="${e.ref}" r:id="${e.id}"/>`).join(``)}</hyperlinks>`:``,f=``,p=``,m=``;if(e.table&&t.length>0){let o=e.table,s=new Set,c=t.map((e,t)=>{let n=(e??``).trim()||`Column${t+1}`,r=n,i=1;for(;s.has(r.toLowerCase());)r=`${n}${++i}`;return s.add(r.toLowerCase()),r}),l=R(t.length-1),u=n.length+1,d=u+1,h=o.totalsRow&&n.length>0,g=o.totalsFns.findIndex(e=>!e);if(h){let e=t.map((e,t)=>{let i=`${R(t)}${d}`,a=o.totalsFns[t];if(a){let e=0;for(let r of n){let n=r[t];n?.t===`n`&&typeof n.value==`number`&&(e+=n.value)}let s=n.find(e=>e[t]?.t===`n`)?.[t]?.numFmt,l=r.styleIndexOf({t:`n`,value:e,numFmt:s,bold:!0}),u=a===`average`?101:a===`count`?103:109,d=a===`count`?n.length:e;return`<c r="${i}"${l?` s="${l}"`:``}><f>SUBTOTAL(${u},${o.name}[${L(c[t])}])</f><v>${d}</v></c>`}if(t===g){let e=r.styleIndexOf({t:`s`,value:`Total`,bold:!0});return`<c r="${i}"${e?` s="${e}"`:``} t="inlineStr"><is><t>Total</t></is></c>`}return`<c r="${i}"/>`});a.push(`<row r="${d}">${e.join(``)}</row>`)}let _=c.map((e,t)=>{let n=h?o.totalsFns[t]:void 0,r=h?n?` totalsRowFunction="${n}"`:t===g?` totalsRowLabel="Total"`:``:``;return`<tableColumn id="${t+1}" name="${L(e)}"${r}/>`}).join(``);f=`<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
|
36
|
+
<table xmlns="http://schemas.openxmlformats.org/spreadsheetml/2006/main" id="1" name="${L(o.name)}" displayName="${L(o.name)}" ref="A1:${l}${h?d:u}"${h?` totalsRowCount="1"`:` totalsRowShown="0"`}><autoFilter ref="A1:${l}${u}"/><tableColumns count="${t.length}">${_}</tableColumns><tableStyleInfo name="${L(o.style??`TableStyleMedium2`)}" showFirstColumn="0" showLastColumn="0" showRowStripes="1" showColumnStripes="0"/></table>`,m=`rId${i.length+1}`,p=`<tableParts count="1"><tablePart r:id="${m}"/></tableParts>`}let h=`<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
|
37
|
+
<worksheet xmlns="http://schemas.openxmlformats.org/spreadsheetml/2006/main" xmlns:r="http://schemas.openxmlformats.org/officeDocument/2006/relationships"><sheetViews>${l}</sheetViews><sheetFormatPr defaultRowHeight="15"/>`+o+`<sheetData>${a.join(``)}</sheetData>`+u+d+p+`</worksheet>`,g={"[Content_Types].xml":f?B.replace(`</Types>`,`<Override PartName="/xl/tables/table1.xml" ContentType="application/vnd.openxmlformats-officedocument.spreadsheetml.table+xml"/></Types>`):B,"_rels/.rels":Fe,"xl/workbook.xml":Le(e.sheetName),"xl/_rels/workbook.xml.rels":Re,"xl/styles.xml":r.build(),"xl/worksheets/sheet1.xml":h};if(f&&(g[`xl/tables/table1.xml`]=f),i.length||m){let e=i.map(e=>`<Relationship Id="${e.id}" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/hyperlink" Target="${L(e.url)}" TargetMode="External"/>`);m&&e.push(`<Relationship Id="${m}" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/table" Target="../tables/table1.xml"/>`),g[`xl/worksheets/_rels/sheet1.xml.rels`]=`<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
|
38
|
+
<Relationships xmlns="http://schemas.openxmlformats.org/package/2006/relationships">`+e.join(``)+`</Relationships>`}return g}async function Ve(e,t){let n=new t;for(let[t,r]of Object.entries(e))n.file(t,r);return n.generateAsync({type:`blob`,mimeType:`application/vnd.openxmlformats-officedocument.spreadsheetml.sheet`})}function V(e){let{columns:t}=e,n=e.opts??{},r=e.now??new Date(0),i=n.fontSize??8,a=n.headerColor??`#334155`,o=n.headerTextColor??`#ffffff`,s=n.zebra??!0,c=n.zebraColor??`#f1f5f9`,l=n.groupColor??`#e2e8f0`,u=n.groupTextColor??`#0f172a`,d=n.subtotalColor??`#f8fafc`,f=n.repeatHeader??!0,p=n.pageOrientation??(t.length>(n.autoLandscapeThreshold??8)?`landscape`:`portrait`),m=Array.isArray(n.columnWidths)?n.columnWidths:t.map(()=>n.columnWidths===`auto`?`auto`:`*`),h=t.map(e=>({text:e.header,bold:!0,alignment:e.align??`left`,color:o,fillColor:a})),g=e.body??(e.rows??[]).map(e=>({kind:`data`,cells:e})),_=e.dataCellStyle,v=e.dataCellLink,y=0,b=new Set,x=[h];g.forEach((e,n)=>{let r=n+1;if(e.kind===`group`){let n={text:e.label,bold:!0,color:u,fillColor:l,colSpan:t.length,margin:[(e.level??0)*12,2,0,2]},r=Array.from({length:Math.max(0,t.length-1)},()=>({text:``}));x.push([n,...r])}else if(e.kind===`subtotal`)x.push(t.map((t,n)=>({text:e.cells[n]??``,bold:!0,alignment:t.align??`left`,fillColor:d})));else{b.add(r);let n=y++;x.push(t.map((t,r)=>{let i={text:e.cells[r]??``,alignment:t.align??`left`},a=_?.(n,r);a&&(a.fill&&(i.fillColor=a.fill),a.color&&(i.color=a.color),a.bold&&(i.bold=!0));let o=v?.(n,r);return o&&(i.link=o,i.decoration=`underline`,a?.color||(i.color=`#2563eb`)),i}))}});let ee={table:{headerRows:+!!f,dontBreakRows:!0,widths:m,body:x},layout:{fillColor:e=>s&&e>0&&e%2==0&&b.has(e)?c:null,hLineWidth:()=>.5,vLineWidth:()=>.5,hLineColor:()=>`#e2e8f0`,vLineColor:()=>`#e2e8f0`,paddingTop:()=>3,paddingBottom:()=>3,paddingLeft:()=>5,paddingRight:()=>5}},S=[];n.logo&&S.push({image:n.logo,width:n.logoWidth??90,margin:[0,0,0,8]}),n.title&&S.push({text:n.title,fontSize:i+8,bold:!0,margin:[0,0,0,2]}),n.subtitle&&S.push({text:n.subtitle,fontSize:i+1,color:`#64748b`,margin:[0,0,0,8]}),S.push(ee);let C={pageSize:n.pageSize??`A4`,pageOrientation:p,pageMargins:n.margins??[28,34,28,34],defaultStyle:{fontSize:i},content:S};if(n.showPageNumbers??!0){let e=r.toISOString().slice(0,10);C.footer=(t,n)=>({margin:[28,6,28,0],columns:[{text:e,alignment:`left`,fontSize:7,color:`#94a3b8`},{text:`Page ${t} of ${n}`,alignment:`right`,fontSize:7,color:`#94a3b8`}]})}return C}function He(e,t){let n=/^#?([0-9a-f]{6})$/i.exec(e.trim());if(!n)return e;let r=parseInt(n[1],16);return`#`+[r>>16&255,r>>8&255,r&255].map(e=>Math.round(e+(255-e)*t).toString(16).padStart(2,`0`)).join(``)}function Ue(e){let t={};return e.background&&(t.fill=e.background),!t.fill&&e.dataBar&&(t.fill=He(e.dataBar.color,.72)),e.color&&e.color!==`transparent`&&(t.color=e.color),(e.fontWeight===`bold`||typeof e.fontWeight==`number`&&e.fontWeight>=600)&&(t.bold=!0),e.icon&&(t.icon=e.icon),Object.keys(t).length>0?t:void 0}function H(e,t,n){if(!n||n.length===0)return()=>void 0;let r=new Map;if(te(n))for(let n of e)r.set(n.field,m(t.map(e=>e[n.field])));return(i,a)=>{let o=e[a],s=t[i];if(!o||!s)return;let c=s[o.field];return Ue(w(c,s,o.field,n,r.get(o.field)??null))}}var We=[`csv`,`tsv`,`html`,`json`,`xml`,`md`],Ge=null;async function Ke(){if(typeof window>`u`)throw Error(`@svgrid/enterprise: export requires a browser environment`);return Ge||=(async()=>{Oe(),await f(()=>import(`./smart.export-CDCwbFH4.js`),[],import.meta.url);let e=window.Smart?.Utilities?.DataExporter;if(!e)throw Error(`@svgrid/enterprise: failed to load Smart.Utilities.DataExporter`);return e})(),Ge}async function U(t){let n=globalThis;if(t===`xlsx`&&n.JSZip==null){let t;try{t=await f(()=>import(`./jszip.min-CX2fPs3O.js`).then(t=>e(t.default,1)),__vite__mapDeps([0,1]),import.meta.url)}catch{throw Error(`@svgrid/enterprise: xlsx export requires the "jszip" peer dependency. Install it with: pnpm add jszip`)}n.JSZip=t.default??t}if(t===`pdf`&&n.pdfMake==null){let t,r;try{t=await f(()=>import(`./pdfmake-BpIYFHoG.js`).then(t=>e(t.default,1)),__vite__mapDeps([2,1]),import.meta.url),r=await f(()=>import(`./vfs_fonts-BV-Ul9v2.js`).then(t=>e(t.default,1)),__vite__mapDeps([3,1]),import.meta.url)}catch{throw Error(`@svgrid/enterprise: pdf export requires the "pdfmake" peer dependency. Install it with: pnpm add pdfmake`)}let i=t.default??t,a=r.default??r,o=a.pdfMake?.vfs??a.vfs??a.default?.vfs;o&&(i.vfs=o),n.pdfMake=i}}function W(e,t){if(Array.isArray(t))return t;switch(t){case`selected`:return e.getSelectedRows();case`all`:return e.getData();case`displayed`:case void 0:default:return e.getDisplayedRows()}}function G(e,t,n){if(t.columns&&t.columns.length>0)return t.columns;let r=e.getColumns().filter(e=>e.visible&&e.field);return r.length>0?r.map(e=>({field:e.field,header:e.header,format:e.format,align:e.align})):n.length>0?Object.keys(n[0]).filter(e=>!e.startsWith(`_`)).map(e=>({field:e})):[]}function K(e,t,n){if(e.exportValue)return e.exportValue(t)??``;let r=t[e.field];return n?r:a(r,e.format)}async function q(e,t,n){let r=n.rawValues===!0,i={};for(let e of t)i[e.field]=e.header??e.field;let a=[i],o=e.length;for(let i=0;i<o;i++){if(n.signal?.aborted)throw new DOMException(`Export aborted`,`AbortError`);let s=e[i],c={};for(let e of t)c[e.field]=K(e,s,r);a.push(c),i>0&&i%5e3==0&&(n.onProgress?.({phase:`project`,ratio:i/o,row:i,total:o}),await new Promise(e=>setTimeout(e,0)))}return n.onProgress?.({phase:`project`,ratio:1,row:o,total:o}),a}function qe(e){if(!e)return;let t={};e.headerRow&&(t.header={...e.headerRow});let n=e.rows?{...e.rows}:{};return e.rowAlternate&&(n.alternationCount=2,n.alternationStart=0,e.rowAlternate.backgroundColor&&(n.alternationIndex1BackgroundColor=e.rowAlternate.backgroundColor),e.rowAlternate.color&&(n.alternationIndex1Color=e.rowAlternate.color)),Object.keys(n).length>0&&(t.rows=n),e.cells&&(t.cells=e.cells),t}var Je=0,Ye=new Map;function Xe(e){let t=Ye.get(e);if(t)return t;let n=`img${++Je}`;return Ye.set(e,n),n}function Ze(e,t=64,n=64){let r=/^data:image\/([a-zA-Z0-9+]+);/i.exec(e)?.[1]?.toLowerCase()??`png`,i=r===`jpg`?`jpeg`:r===`svg+xml`?`svg`:r;return{id:Xe(e),base64:e,imageType:i,width:t,height:n}}function Qe(e,t){if(!e||e.length===0||t.length===0)return;let n=t[0],r=[];for(let i of e){let e={},a;if(`image`in i)e[n]=i.image,a={mergeAcross:!0,textAlign:`left`};else if(`text`in i)e[n]=i.text,a={mergeAcross:!0,...i.style??{}};else{let r=t[Math.floor(t.length/2)],o=t[t.length-1];i.left!==void 0&&(e[n]=i.left),i.center!==void 0&&(e[r]=i.center),i.right!==void 0&&(e[o]=i.right),a={textAlign:`left`}}r.push({cells:e,style:a})}return r}function $e(e,t){let n=e&&e.length>0?new Set(e):null;return(e,r,i)=>typeof i!=`string`||!/^data:image\//i.test(i)?null:n&&!n.has(r)?{image:Ze(i,96,96),value:``}:{image:Ze(i,t.width,t.height),value:``}}function et(e){let t={exportHeader:!0,pageOrientation:e.pageOrientation??`portrait`};e.freezeHeader!==!1&&(t.freezeHeader=!0),e.freezeColumns&&e.freezeColumns>0&&(t.freezeColumnsCount=Math.floor(e.freezeColumns));let n=qe(e.styles);if(n&&(t.style=n),e.hierarchical&&(t.hierarchical=!0),e.merges?.length&&!e.groupBy?.length&&!e.hierarchical){let n=e.merges.map(e=>({cell:[e.row,e.col],rowspan:Math.max(1,Math.floor(e.rowSpan??1)),colspan:Math.max(1,Math.floor(e.colSpan??1))})).filter(e=>e.rowspan>1||e.colspan>1);n.length&&(t.mergedCells=n)}return t}function tt(e,t,n){let r=Qe(t.header,n),i=Qe(t.footer,n);r&&(e.headerContent=r),i&&(e.footerContent=i);let a=(t.header?.some(e=>`image`in e)??!1)||(t.footer?.some(e=>`image`in e)??!1);if(t.imageFields?.length||a){let n=t.imageSize??{width:32,height:32};e.addImageToCell=$e(t.imageFields,n)}return e}function J(e,t){return e.toLowerCase().endsWith(`.`+t)?e:`${e}.${t}`}function Y(e,t,n,r,i){return i!==!1&&u(e,t),{blob:e,filename:t,mime:n,rowCount:r,byteSize:e.size}}function nt(e,t,n,r,i){i!==!1&&s(e,t,n);let a=new Blob([e],{type:n});return{blob:a,filename:t,mime:n,rowCount:r,byteSize:a.size}}function X(e,t,n){let r=Math.min(t.length,200);return e.map(e=>{if(typeof e.width==`number`)return e.width;let i=String(e.header??e.field).length;for(let a=0;a<r;a++){let r=K(e,t[a],n),o=r==null?0:String(r).length;o>i&&(i=o)}return Math.max(48,Math.min(400,i*7+14))})}function rt(e,t,n){if(typeof t.freezeColumns==`number`)return t.freezeColumns;let r=e.getColumnPinning().left;if(!r||r.length===0)return;let i=new Set(r),a=0;for(let e of n)if(i.has(e.field))a++;else break;return a>0?a:void 0}function it(e){let t=e,n=``;do n=String.fromCharCode(65+t%26)+n,t=Math.floor(t/26)-1;while(t>=0);return n}function Z(e,t){if(e.some(e=>e.link))return(n,r)=>{let i=e[r],a=t[n];if(!(!i?.link||!a))return i.link(a)||void 0}}function at(e){let t={};for(let n of e)n.align&&(t[n.field]=n.align);return t}async function ot(e,t,i,a,s,u){let d=i.map(e=>e.field),f={onProgress:a.onProgress,signal:a.signal};switch(e){case`html`:return{text:await c(t,d,{...f,title:(a.filename??`grid`).trim()||`grid`,align:at(i),cellStyle:s,cellLink:u}),mime:`text/html;charset=utf-8`,ext:`html`};case`json`:return{text:await l(t,d,f),mime:`application/json;charset=utf-8`,ext:`json`};case`xml`:return{text:await o(t,d,f),mime:`application/xml;charset=utf-8`,ext:`xml`};case`md`:return{text:await r(t,d,{...f,align:at(i)}),mime:`text/markdown;charset=utf-8`,ext:`md`};case`tsv`:return{text:await n(t,d,{...f,csv:{...a.csv,delimiter:` `}}),mime:`text/tab-separated-values;charset=utf-8`,ext:`tsv`};default:{let e=a.csv?.delimiter??`,`;return{text:await n(t,d,{...f,csv:{...a.csv,delimiter:e}}),mime:`text/csv;charset=utf-8`,ext:`csv`}}}}async function st(e,t){if(t.sheets&&t.sheets.length>0)throw Error(`@svgrid/enterprise: multi-sheet export requires format 'xlsx', got '${t.format}'`);let n=W(e,t.rows);if(n.length===0)throw Error(`@svgrid/enterprise: nothing to export - the grid has no rows`);let r=G(e,t,n),i=await q(n,r,t.format===`json`?{...t,rawValues:t.rawValues??!0}:t),a=(t.filename??`grid`).trim()||`grid`,o=t.format===`html`?H(r,n,t.conditionalFormats):void 0,s=t.format===`html`?Z(r,n):void 0,{text:c,mime:l,ext:u}=await ot(t.format,i,r,t,o,s);return nt(c,J(a,u),l,n.length,t.download)}async function ct(e,t){if(t.sheets&&t.sheets.length>0)throw Error(`@svgrid/enterprise: multi-sheet export requires format 'xlsx'. Use 'xls' for a single legacy sheet.`);let n=W(e,t.rows);if(n.length===0)throw Error(`@svgrid/enterprise: nothing to export - the grid has no rows`);let r=G(e,t,n),i=(t.filename??`grid`).trim()||`grid`,a=H(r,n,t.conditionalFormats);return nt(await je(i,r,n,{rawValues:t.rawValues,onProgress:t.onProgress,signal:t.signal,freezeHeader:t.freezeHeader!==!1,freezeColumns:rt(e,t,r),widths:t.autoFitColumns===!1?void 0:X(r,n,t.rawValues===!0),cellVisual:t.conditionalFormats?.length?a:void 0,precisionSafe:t.precisionSafe}),J(i,`xls`),`application/vnd.ms-excel;charset=utf-8`,n.length,t.download)}function Q(e){return e.format?.type===`number`||e.format?.type===`currency`}function lt(e,t,n){let r=[],i=t=>e.find(e=>e.field===t)?.header??t,o=e.findIndex(e=>!Q(e)),s=(t,c)=>{if(c>=n.length){for(let n of t)r.push({kind:`data`,cells:e.map(e=>String(K(e,n,!1)??``))});return}let l=n[c],u=new Map;for(let e of t){let t=String(e[l]??``),n=u.get(t);n?n.push(e):u.set(t,[e])}for(let[t,n]of u)if(r.push({kind:`group`,label:`${i(l)}: ${t} (${n.length})`,level:c}),s(n,c+1),e.some(Q)){let i=e.map(e=>{if(!Q(e))return``;let t=n.reduce((t,n)=>t+(Number(n[e.field])||0),0);return a(t,e.format)});o>=0&&(i[o]=`Subtotal (${t})`),r.push({kind:`subtotal`,cells:i})}};return s(t,0),r}async function ut(e,t){await U(`pdf`);let n=globalThis.pdfMake;if(!n)throw Error(`@svgrid/enterprise: pdf export requires the "pdfmake" peer dependency.`);let r=W(e,t.rows);if(r.length===0)throw Error(`@svgrid/enterprise: nothing to export - the grid has no rows`);let i=G(e,t,r),a=i.map(e=>e.field),o=i.map(e=>({header:e.header??e.field,align:e.align})),s=t.autoGroup!==!1&&!t.groupBy?.length&&!t.hierarchical?(e.getState().grouping??[]).filter(e=>!!e).map(e=>String(e)):[],c=t.groupBy?.length?t.groupBy:s.length>0?s:void 0;if(t.signal?.aborted)throw new DOMException(`Export aborted`,`AbortError`);t.onProgress?.({phase:`write`,ratio:0,total:r.length});let l={...t.pdf,pageOrientation:t.pdf?.pageOrientation??t.pageOrientation},u=new Date,d;if(c?.length)d=V({columns:o,body:lt(i,r,c),opts:l,now:u});else{let e=(await q(r,i,t)).slice(1).map(e=>a.map(t=>String(e[t]??``))),n=H(i,r,t.conditionalFormats);for(let t=0;t<e.length;t++)for(let r=0;r<i.length;r++){let i=n(t,r)?.icon;i&&(e[t][r]=`${i} ${e[t][r]??``}`)}d=V({columns:o,rows:e,dataCellStyle:(e,t)=>{let r=n(e,t);return r?{fill:r.fill,color:r.color,bold:r.bold}:void 0},dataCellLink:Z(i,r),opts:l,now:u})}let f=(t.filename??`grid`).trim()||`grid`,p=await new Promise(e=>n.createPdf(d).getBlob(e));return t.onProgress?.({phase:`write`,ratio:1,total:r.length}),Y(p,J(f,`pdf`),`application/pdf`,r.length,t.download)}async function dt(e,t,n,r,o,s){let c=e.map(e=>e.header??e.field),l=s?.precisionSafe===!0,u=(e,t,n)=>l&&Math.abs(e)>=0x38d7ea4c68000?{t:`s`,value:String(e),...t}:{t:`n`,value:e,numFmt:n,...t},f=(t,s,c)=>{let l=e[c],f=r(s,c),p={align:l.align,fill:f?.fill,color:f?.color,bold:f?.bold,link:o?.(s,c)};if(l.exportValue){let e=l.exportValue(t);return typeof e==`number`&&Number.isFinite(e)?u(e,p,d(l.format)):e instanceof Date?{t:`d`,value:e,numFmt:d(l.format)??`yyyy-mm-dd`,...p}:{t:`s`,value:e==null?``:String(e),...p}}let m=t[l.field];if(f?.icon){let e=n?String(m??``):a(m,l.format);return{t:`s`,value:`${f.icon} ${e}`,...p}}if(n)return typeof m==`number`&&Number.isFinite(m)?u(m,p):{t:`s`,value:m==null?``:String(m),...p};let h=i(m,l.format);return h.ok?h.value instanceof Date?{t:`d`,value:h.value,numFmt:d(l.format)??`yyyy-mm-dd`,...p}:u(h.value,p,d(l.format)):{t:`s`,value:a(m,l.format),...p}},p=[],m=t.length;for(let n=0;n<m;n++){if(s?.signal?.aborted)throw new DOMException(`Export aborted`,`AbortError`);let r=t[n];p.push(e.map((e,t)=>f(r,n,t))),n>0&&n%2e3==0&&(s?.onProgress?.({phase:`project`,ratio:n/m,row:n,total:m}),await new Promise(e=>setTimeout(e,0)))}return{header:c,cells:p}}async function ft(e,t){await U(`xlsx`);let n=globalThis.JSZip;if(!n)throw Error(`@svgrid/enterprise: xlsx export requires the "jszip" peer dependency.`);let r=W(e,t.rows);if(r.length===0)throw Error(`@svgrid/enterprise: nothing to export - the grid has no rows`);let i=G(e,t,r),a=t.rawValues===!0,o=t.conditionalFormats??[],s=H(i,r,o.filter(e=>e.type===`rule`||e.type===`iconSet`)),c=Z(i,r),l=[];for(let e of o){if(e.type!==`colorScale`&&e.type!==`dataBar`)continue;let t=e.columns&&e.columns.length>0?i.map((t,n)=>e.columns.includes(t.field)?n:-1).filter(e=>e>=0):i.map((e,t)=>t);for(let n of t)if(e.type===`dataBar`)l.push({kind:`dataBar`,colIdx:n,color:e.color});else{let t=e.min??`#ffffff`,r=e.max??`#000000`;l.push({kind:`colorScale`,colIdx:n,colors:e.mid?[t,e.mid,r]:[t,r]})}}if(t.signal?.aborted)throw new DOMException(`Export aborted`,`AbortError`);t.onProgress?.({phase:`write`,ratio:0,total:r.length});let{header:u,cells:d}=await dt(i,r,a,s,c,{onProgress:t.onProgress,signal:t.signal,precisionSafe:t.precisionSafe}),f=t.autoFitColumns===!1?void 0:X(i,r,a),p=(t.filename??`grid`).trim()||`grid`,m;t.excelTable&&(m={name:`Table1`,totalsRow:typeof t.excelTable==`object`&&t.excelTable.totalsRow===!0,style:typeof t.excelTable==`object`?t.excelTable.style:void 0,totalsFns:i.map(e=>Q(e)?`sum`:void 0)});let h=await Ve(Be({sheetName:p,header:u,rows:d,widths:f,freezeHeader:t.freezeHeader!==!1,freezeColumns:rt(e,t,i),condFormats:l,table:m}),n);return t.onProgress?.({phase:`write`,ratio:1,total:r.length}),Y(h,J(p,`xlsx`),`application/vnd.openxmlformats-officedocument.spreadsheetml.sheet`,r.length,t.download)}async function pt(e,t){if(De(`Export`),We.includes(t.format))return st(e,t);if(t.format===`xls`)return ct(e,t);if(t.format===`pdf`)return ut(e,t);if(t.format===`xlsx`){let n=t.autoGroup===!1?[]:(e.getState().grouping??[]).filter(e=>!!e),r=(t.groupBy?.length??0)>0||n.length>0,i=!!t.styles&&!t.conditionalFormats?.length;if(!t.sheets?.length&&!r&&!t.hierarchical&&!t.merges?.length&&!t.header?.length&&!t.footer?.length&&!t.imageFields?.length&&!i)return ft(e,t)}await U(t.format);let n=await Ke();if(t.sheets&&t.sheets.length>0){if(t.format!==`xlsx`)throw Error(`@svgrid/enterprise: multi-sheet export requires format 'xlsx', got '${t.format}'`);let r=t.rawValues===!0,i=t.sheets.map(n=>{let i=G(e,{columns:n.columns??t.columns},n.rows),a=n.rows.map(e=>{let t={};for(let n of i)t[n.field]=K(n,e,r);return t}),o=t.autoFitColumns===!1?null:X(i,n.rows,r);return{label:n.label,dataSource:a,columns:i.map((e,t)=>o?{dataField:e.field,label:e.header??e.field,width:o[t]}:{dataField:e.field,label:e.header??e.field}),dataFields:i.map(e=>e.field),style:qe(n.styles??t.styles)}}),a=(t.filename??`grid`).trim()||`grid`,o=et(t),s=i[0],c=new n(o);c.spreadsheets=i,tt(c,t,s.dataFields);let l={};for(let e of s.columns)l[e.dataField]=e.label;let u=[l,...s.dataSource];if(t.download===!1)throw Error(`@svgrid/enterprise: download:false is not supported for multi-sheet xlsx.`);c.exportData(u,t.format,a);return}let r=W(e,t.rows);if(r.length===0)throw Error(`@svgrid/enterprise: nothing to export - the grid has no rows`);let i=G(e,t,r),a=await q(r,i,t),o=(t.filename??`grid`).trim()||`grid`,s=i.map(e=>e.field),c=t.autoGroup!==!1&&!t.groupBy?.length&&!t.hierarchical?(e.getState().grouping??[]).filter(e=>!!e).map(e=>String(e)):[],l=t.groupBy?.length?t.groupBy:c.length>0?c:void 0,u=!t.hierarchical&&l?.length?l:void 0,d=et(t);if(t.conditionalFormats?.length){let e=H(i,r,t.conditionalFormats),n={};for(let t=0;t<r.length;t++)for(let r=0;r<i.length;r++){let o=e(t,r);if(!o)continue;let s={};if(o.fill&&(s.backgroundColor=o.fill),o.color&&(s.color=o.color),o.bold&&(s.fontWeight=`bold`),Object.keys(s).length&&(n[it(r)+(t+2)]=s),o.icon){let e=a[t+1],n=i[r].field;e&&(e[n]=`${o.icon} ${e[n]??``}`)}}if(Object.keys(n).length){let e=d.style??{};d.style={...e,cells:{...e.cells??{},...n}}}}if(t.download===!1)throw Error(`@svgrid/enterprise: download:false is not supported for this xlsx export (grouped / merges / header / footer / images). Use a plain xlsx, xls, pdf, or a text format.`);if(t.signal?.aborted)throw new DOMException(`Export aborted`,`AbortError`);t.onProgress?.({phase:`write`,ratio:0,total:a.length-1});let f=new n(d,u);tt(f,t,s),f.exportData(a,t.format,o),t.onProgress?.({phase:`write`,ratio:1,total:a.length-1})}var mt={"&":`&`,"<":`<`,">":`>`,'"':`"`,"'":`'`};function $(e){return(e==null?``:String(e)).replace(/[&<>"']/g,e=>mt[e])}function ht(e){let{columns:t,rows:n}=e,r=e.cellStyle,i=e.cellLink,a=e.opts??{},o=a.orientation??`portrait`,s=a.pageSize?`${a.pageSize} ${o}`:o,c=a.margin??`14mm`,l=a.zebra??!0,u=a.zebraColor??`#f6f8fa`,d=a.headerColor??`#f1f5f9`,f=a.headerTextColor??`#0f172a`,p=a.fontSize??9,m=e=>e&&e!==`left`?` style="text-align:${e}"`:``,h=`<thead><tr>`+t.map(e=>`<th${m(e.align)}>${$(e.header)}</th>`).join(``)+`</tr></thead>`,g=(e,t,n,a)=>{let o=[];e.align&&e.align!==`left`&&o.push(`text-align:${e.align}`);let s=r?.(n,a);s?.fill&&o.push(`background:${s.fill}`),s?.color&&o.push(`color:${s.color}`),s?.bold&&o.push(`font-weight:700`);let c=o.length?` style="${o.join(`;`)}"`:``,l=s?.icon?`${$(s.icon)} ${$(t)}`:$(t),u=i?.(n,a);return u&&(l=`<a href="${$(u)}">${l}</a>`),`<td${c}>${l}</td>`},_=`<tbody>`+n.map((e,n)=>`<tr>`+t.map((t,r)=>g(t,e[r]??``,n,r)).join(``)+`</tr>`).join(``)+`</tbody>`,v=[];return a.logo&&v.push(`<img class="logo" src="${$(a.logo)}" alt="" />`),a.title&&v.push(`<h1>${$(a.title)}</h1>`),a.subtitle&&v.push(`<p class="subtitle">${$(a.subtitle)}</p>`),`<!DOCTYPE html>
|
|
39
|
+
<html><head><meta charset="utf-8"><title>${$(a.title??`Grid`)}</title>
|
|
40
|
+
<style>
|
|
41
|
+
@page { size: ${s}; margin: ${c}; }
|
|
42
|
+
@media print { body { -webkit-print-color-adjust: exact; print-color-adjust: exact; } }
|
|
43
|
+
body { font-family: -apple-system, "Segoe UI", Roboto, sans-serif; color: #111; margin: 0; }
|
|
44
|
+
.logo { max-height: ${a.logoWidth?``:`48px`}; width: ${a.logoWidth?`${a.logoWidth}px`:`auto`}; display: block; margin-bottom: 8px; }
|
|
45
|
+
h1 { font-size: 16pt; margin: 0 0 2px 0; }
|
|
46
|
+
.subtitle { font-size: 10pt; color: #64748b; margin: 0 0 10px 0; }
|
|
47
|
+
table { border-collapse: collapse; width: 100%; font-size: ${p}pt; }
|
|
48
|
+
thead { display: table-header-group; }
|
|
49
|
+
tr { break-inside: avoid; }
|
|
50
|
+
th, td { border: 1px solid #cbd5e1; padding: 4px 7px; text-align: left; }
|
|
51
|
+
th { background: ${d}; color: ${f}; font-weight: 700; }
|
|
52
|
+
${l?`tbody tr:nth-child(even) { background: ${u}; }`:``}
|
|
53
|
+
</style></head>
|
|
54
|
+
<body>
|
|
55
|
+
${v.join(`
|
|
56
|
+
`)}
|
|
57
|
+
<table>${h}${_}</table>
|
|
58
|
+
</body></html>`}async function gt(e,t){if(De(`Print`),typeof window>`u`)throw Error(`@svgrid/enterprise: print requires a browser environment`);let n=W(e,t?.rows);if(n.length===0)throw Error(`@svgrid/enterprise: nothing to print - the grid has no rows`);let r=G(e,{columns:t?.columns},n),i=r.map(e=>e.field),a=(await q(n,r,{rawValues:t?.rawValues})).slice(1).map(e=>i.map(t=>String(e[t]??``))),o=r.map(e=>({header:e.header??e.field,align:e.align})),s={title:t?.title??`Grid`,subtitle:t?.subtitle,logo:t?.logo,orientation:t?.orientation??`portrait`,pageSize:t?.pageSize,margin:t?.margin,zebra:t?.zebra,headerColor:t?.headerColor},c=H(r,n,t?.conditionalFormats),l=ht({columns:o,rows:a,cellStyle:(e,t)=>c(e,t),cellLink:Z(r,n),opts:s}),u=window.open(``,`_blank`,`width=900,height=700`);if(!u)throw Error(`@svgrid/enterprise: print() could not open a window - the browser blocked the popup`);u.document.open(),u.document.write(l),u.document.close(),u.focus(),u.addEventListener(`load`,()=>{setTimeout(()=>u.print(),50)}),setTimeout(()=>{try{u.print()}catch{}},300)}var _t=t({countReducer:()=>countReducer,exportGrid:()=>pt,printGrid:()=>gt});export{m as a,w as c,j as i,Te as n,T as o,Ee as r,te as s,_t as t};
|
package/dist/designer/index.html
CHANGED
|
@@ -4,34 +4,34 @@
|
|
|
4
4
|
<meta charset="UTF-8" />
|
|
5
5
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
6
6
|
<title>SvGrid Studio - Designer</title>
|
|
7
|
-
<script type="module" crossorigin src="./assets/index-
|
|
7
|
+
<script type="module" crossorigin src="./assets/index-C_a9Cj8Y.js"></script>
|
|
8
8
|
<link rel="modulepreload" crossorigin href="./assets/rolldown-runtime-Dd_uD5pT.js">
|
|
9
9
|
<link rel="modulepreload" crossorigin href="./assets/disclose-version-CIm4S9xS.js">
|
|
10
|
-
<link rel="modulepreload" crossorigin href="./assets/
|
|
11
|
-
<link rel="modulepreload" crossorigin href="./assets/
|
|
12
|
-
<link rel="modulepreload" crossorigin href="./assets/preload-helper-
|
|
13
|
-
<link rel="modulepreload" crossorigin href="./assets/
|
|
14
|
-
<link rel="modulepreload" crossorigin href="./assets/
|
|
10
|
+
<link rel="modulepreload" crossorigin href="./assets/cell-formatting-wr5wm7US.js">
|
|
11
|
+
<link rel="modulepreload" crossorigin href="./assets/export-format-D-eP4b2l.js">
|
|
12
|
+
<link rel="modulepreload" crossorigin href="./assets/preload-helper-HclGiUj8.js">
|
|
13
|
+
<link rel="modulepreload" crossorigin href="./assets/src-D9p27OGC.js">
|
|
14
|
+
<link rel="modulepreload" crossorigin href="./assets/SvField-cj1PFNgZ.js">
|
|
15
|
+
<link rel="modulepreload" crossorigin href="./assets/SvListBox-1oUF6Iav.js">
|
|
16
|
+
<link rel="modulepreload" crossorigin href="./assets/SvGrid.helpers-BgT-gnCo.js">
|
|
17
|
+
<link rel="modulepreload" crossorigin href="./assets/date-format-onlYDsrY.js">
|
|
15
18
|
<link rel="modulepreload" crossorigin href="./assets/popover-CUkLsvRX.js">
|
|
16
|
-
<link rel="modulepreload" crossorigin href="./assets/SvGridDropdown-
|
|
19
|
+
<link rel="modulepreload" crossorigin href="./assets/SvGridDropdown-Bb3HH2Aj.js">
|
|
17
20
|
<link rel="modulepreload" crossorigin href="./assets/dismissable-BO547MH9.js">
|
|
18
|
-
<link rel="modulepreload" crossorigin href="./assets/SvDateTimePicker-
|
|
21
|
+
<link rel="modulepreload" crossorigin href="./assets/SvDateTimePicker-ByBD_ov6.js">
|
|
22
|
+
<link rel="modulepreload" crossorigin href="./assets/SvDateRangeInput-CjO7nn_x.js">
|
|
19
23
|
<link rel="modulepreload" crossorigin href="./assets/editor-registry-BjP16H0v.js">
|
|
20
24
|
<link rel="modulepreload" crossorigin href="./assets/easing-zaypKrr0.js">
|
|
21
|
-
<link rel="modulepreload" crossorigin href="./assets/chart-
|
|
22
|
-
<link rel="modulepreload" crossorigin href="./assets/SvGridChart-
|
|
23
|
-
<link rel="
|
|
24
|
-
<link rel="
|
|
25
|
-
<link rel="
|
|
26
|
-
<link rel="stylesheet" crossorigin href="./assets/
|
|
27
|
-
<link rel="stylesheet" crossorigin href="./assets/
|
|
28
|
-
<link rel="stylesheet" crossorigin href="./assets/
|
|
29
|
-
<link rel="stylesheet" crossorigin href="./assets/
|
|
30
|
-
<link rel="stylesheet" crossorigin href="./assets/
|
|
31
|
-
<link rel="stylesheet" crossorigin href="./assets/src-B7DNcoQK.css">
|
|
32
|
-
<link rel="stylesheet" crossorigin href="./assets/SvDateRangeInput-BV5OXYQ2.css">
|
|
33
|
-
<link rel="stylesheet" crossorigin href="./assets/SvListBox-DgN8kvjt.css">
|
|
34
|
-
<link rel="stylesheet" crossorigin href="./assets/index-Cp7fDJ3b.css">
|
|
25
|
+
<link rel="modulepreload" crossorigin href="./assets/chart-DXFganU8.js">
|
|
26
|
+
<link rel="modulepreload" crossorigin href="./assets/SvGridChart-DBOR4xcz.js">
|
|
27
|
+
<link rel="stylesheet" crossorigin href="./assets/SvField-YDLipR6O.css">
|
|
28
|
+
<link rel="stylesheet" crossorigin href="./assets/SvListBox-BXfyqy4a.css">
|
|
29
|
+
<link rel="stylesheet" crossorigin href="./assets/date-format-DGagAqRc.css">
|
|
30
|
+
<link rel="stylesheet" crossorigin href="./assets/SvGridDropdown-CcidB3rm.css">
|
|
31
|
+
<link rel="stylesheet" crossorigin href="./assets/SvDateTimePicker-DPv09DIT.css">
|
|
32
|
+
<link rel="stylesheet" crossorigin href="./assets/SvDateRangeInput-C0iCCZ8o.css">
|
|
33
|
+
<link rel="stylesheet" crossorigin href="./assets/SvGridChart-fkMWeh1J.css">
|
|
34
|
+
<link rel="stylesheet" crossorigin href="./assets/index-k2stW6L8.css">
|
|
35
35
|
</head>
|
|
36
36
|
<body>
|
|
37
37
|
<div id="app"></div>
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
*/
|
|
14
14
|
import { type ConditionalFormat } from '@svgrid/grid/format';
|
|
15
15
|
import type { RowData } from '@svgrid/grid';
|
|
16
|
-
import type { ExportColumn } from './export';
|
|
16
|
+
import type { ExportColumn } from './export.js';
|
|
17
17
|
/** The visual primitives an exporter can apply to one cell. */
|
|
18
18
|
export type ExportCellVisual = {
|
|
19
19
|
fill?: string;
|
package/dist/export-print.js
CHANGED
|
@@ -68,24 +68,24 @@ export function buildPrintDocument(params) {
|
|
|
68
68
|
band.push(`<h1>${esc(o.title)}</h1>`);
|
|
69
69
|
if (o.subtitle)
|
|
70
70
|
band.push(`<p class="subtitle">${esc(o.subtitle)}</p>`);
|
|
71
|
-
return `<!DOCTYPE html>
|
|
72
|
-
<html><head><meta charset="utf-8"><title>${esc(o.title ?? 'Grid')}</title>
|
|
73
|
-
<style>
|
|
74
|
-
@page { size: ${size}; margin: ${margin}; }
|
|
75
|
-
@media print { body { -webkit-print-color-adjust: exact; print-color-adjust: exact; } }
|
|
76
|
-
body { font-family: -apple-system, "Segoe UI", Roboto, sans-serif; color: #111; margin: 0; }
|
|
77
|
-
.logo { max-height: ${o.logoWidth ? '' : '48px'}; width: ${o.logoWidth ? `${o.logoWidth}px` : 'auto'}; display: block; margin-bottom: 8px; }
|
|
78
|
-
h1 { font-size: 16pt; margin: 0 0 2px 0; }
|
|
79
|
-
.subtitle { font-size: 10pt; color: #64748b; margin: 0 0 10px 0; }
|
|
80
|
-
table { border-collapse: collapse; width: 100%; font-size: ${fontSize}pt; }
|
|
81
|
-
thead { display: table-header-group; }
|
|
82
|
-
tr { break-inside: avoid; }
|
|
83
|
-
th, td { border: 1px solid #cbd5e1; padding: 4px 7px; text-align: left; }
|
|
84
|
-
th { background: ${headerColor}; color: ${headerTextColor}; font-weight: 700; }
|
|
85
|
-
${zebra ? `tbody tr:nth-child(even) { background: ${zebraColor}; }` : ''}
|
|
86
|
-
</style></head>
|
|
87
|
-
<body>
|
|
88
|
-
${band.join('\n ')}
|
|
89
|
-
<table>${thead}${tbody}</table>
|
|
71
|
+
return `<!DOCTYPE html>
|
|
72
|
+
<html><head><meta charset="utf-8"><title>${esc(o.title ?? 'Grid')}</title>
|
|
73
|
+
<style>
|
|
74
|
+
@page { size: ${size}; margin: ${margin}; }
|
|
75
|
+
@media print { body { -webkit-print-color-adjust: exact; print-color-adjust: exact; } }
|
|
76
|
+
body { font-family: -apple-system, "Segoe UI", Roboto, sans-serif; color: #111; margin: 0; }
|
|
77
|
+
.logo { max-height: ${o.logoWidth ? '' : '48px'}; width: ${o.logoWidth ? `${o.logoWidth}px` : 'auto'}; display: block; margin-bottom: 8px; }
|
|
78
|
+
h1 { font-size: 16pt; margin: 0 0 2px 0; }
|
|
79
|
+
.subtitle { font-size: 10pt; color: #64748b; margin: 0 0 10px 0; }
|
|
80
|
+
table { border-collapse: collapse; width: 100%; font-size: ${fontSize}pt; }
|
|
81
|
+
thead { display: table-header-group; }
|
|
82
|
+
tr { break-inside: avoid; }
|
|
83
|
+
th, td { border: 1px solid #cbd5e1; padding: 4px 7px; text-align: left; }
|
|
84
|
+
th { background: ${headerColor}; color: ${headerTextColor}; font-weight: 700; }
|
|
85
|
+
${zebra ? `tbody tr:nth-child(even) { background: ${zebraColor}; }` : ''}
|
|
86
|
+
</style></head>
|
|
87
|
+
<body>
|
|
88
|
+
${band.join('\n ')}
|
|
89
|
+
<table>${thead}${tbody}</table>
|
|
90
90
|
</body></html>`;
|
|
91
91
|
}
|
package/dist/export-xls.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type { ExportColumn } from './export';
|
|
1
|
+
import type { ExportColumn } from './export.js';
|
|
2
2
|
import type { RowData } from '@svgrid/grid';
|
|
3
|
-
import type { SerializeOptions } from './export-serialize';
|
|
3
|
+
import type { SerializeOptions } from './export-serialize.js';
|
|
4
4
|
/**
|
|
5
5
|
* Serialize rows to an Excel 2003 XML Spreadsheet (`.xls`) document string.
|
|
6
6
|
* Streams in chunks with `onProgress` + `AbortSignal`, matching the other
|
package/dist/export.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { CellFormatConfig, RowData, TableFeatures } from '@svgrid/grid';
|
|
2
2
|
import type { SvGridApi } from '@svgrid/grid';
|
|
3
|
-
import { type CsvOptions, type SerializeProgress } from './export-serialize';
|
|
4
|
-
import { type PdfBodyRow, type PdfExportOptions } from './export-pdf';
|
|
3
|
+
import { type CsvOptions, type SerializeProgress } from './export-serialize.js';
|
|
4
|
+
import { type PdfBodyRow, type PdfExportOptions } from './export-pdf.js';
|
|
5
5
|
import type { ConditionalFormat } from '@svgrid/grid/format';
|
|
6
6
|
/**
|
|
7
7
|
* Export target formats.
|
package/dist/export.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
// Import the pure formatters from the grid's Svelte-free `/format` subpath so
|
|
2
2
|
// this module (and the enterprise unit tests) don't drag in SvGrid.svelte.
|
|
3
3
|
import { formatValueForExport, toExcelNumFmt, valueForExcel } from '@svgrid/grid/format';
|
|
4
|
-
import { assertEnterpriseLicensed } from './license';
|
|
5
|
-
import { installSmartShim } from './smart-shim';
|
|
6
|
-
import { downloadBlobFile, downloadTextFile, serializeDelimited, serializeHtml, serializeJson, serializeMarkdown, serializeXml, } from './export-serialize';
|
|
7
|
-
import { serializeSpreadsheetML } from './export-xls';
|
|
8
|
-
import { buildXlsxParts, packageXlsx } from './export-ooxml';
|
|
9
|
-
import { buildPdfDocDefinition } from './export-pdf';
|
|
10
|
-
import { buildConditionalResolver } from './export-conditional';
|
|
4
|
+
import { assertEnterpriseLicensed } from './license.js';
|
|
5
|
+
import { installSmartShim } from './smart-shim.js';
|
|
6
|
+
import { downloadBlobFile, downloadTextFile, serializeDelimited, serializeHtml, serializeJson, serializeMarkdown, serializeXml, } from './export-serialize.js';
|
|
7
|
+
import { serializeSpreadsheetML } from './export-xls.js';
|
|
8
|
+
import { buildXlsxParts, packageXlsx } from './export-ooxml.js';
|
|
9
|
+
import { buildPdfDocDefinition } from './export-pdf.js';
|
|
10
|
+
import { buildConditionalResolver } from './export-conditional.js';
|
|
11
11
|
/** Formats served by the native, dependency-free, streaming serializers. */
|
|
12
12
|
const NATIVE_TEXT_FORMATS = [
|
|
13
13
|
'csv',
|
|
@@ -22,8 +22,8 @@
|
|
|
22
22
|
* component, and so the round-trip property can be asserted directly.
|
|
23
23
|
*/
|
|
24
24
|
import type { ExcelFilterOperator } from '@svgrid/grid';
|
|
25
|
-
import { type ExprColumn } from './expression-columns';
|
|
26
|
-
import type { PredicateExpr } from './expression-types';
|
|
25
|
+
import { type ExprColumn } from './expression-columns.js';
|
|
26
|
+
import type { PredicateExpr } from './expression-types.js';
|
|
27
27
|
/** One column/operator/value row. */
|
|
28
28
|
export type BuilderCondition = {
|
|
29
29
|
kind: 'cond';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { isRangeOperator, isSetOperator, isValueless, operatorsForType, } from './expression-columns';
|
|
1
|
+
import { isRangeOperator, isSetOperator, isValueless, operatorsForType, } from './expression-columns.js';
|
|
2
2
|
/** How deep the UI allows nesting. */
|
|
3
3
|
export const MAX_BUILDER_DEPTH = 4;
|
|
4
4
|
/** A blank condition on the first column, with that column's first operator. */
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { PredicateExpr, ScalarExpr } from './expression-types';
|
|
1
|
+
import type { PredicateExpr, ScalarExpr } from './expression-types.js';
|
|
2
2
|
type Scalar = number | string | boolean | null;
|
|
3
3
|
export type CompileOptions<TRow> = {
|
|
4
4
|
getValue: (row: TRow, columnId: string) => unknown;
|
package/dist/import.js
CHANGED
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
* Both go through the same polite license soft-gate as `exportData` and
|
|
24
24
|
* `print`, so unlicensed evaluation works but emits a one-time nudge.
|
|
25
25
|
*/
|
|
26
|
-
import { assertEnterpriseLicensed } from './license';
|
|
26
|
+
import { assertEnterpriseLicensed } from './license.js';
|
|
27
27
|
// ---------------------------------------------------------------------------
|
|
28
28
|
// Lazy peer dependency: jszip (xlsx only)
|
|
29
29
|
// ---------------------------------------------------------------------------
|
package/dist/index.d.ts
CHANGED
|
@@ -1,41 +1,41 @@
|
|
|
1
|
-
export { setLicenseKey, clearLicenseKey, getLicenseKey, isLicenseKeySet, hasValidLicense, assertEnterpriseLicensed, nudgeEnterprise, checkLicenseKey, isLicenseExpired, getLicenseExpiry, type LicenseInfo, type LicenseStatus, } from './license';
|
|
2
|
-
export { parseLicenseExpiry } from './license-core';
|
|
3
|
-
export { exportGrid, copyExportToClipboard, type ExportFormat, type ExportOptions, type ExportColumn, type ExportCellStyle, type ExportStyles, type ExportHeaderFooterLine, type ExportSheet, type ExportRowSource, type ExportProgress, type ExportResult, type ClipboardFormat, type ClipboardExportOptions, } from './export';
|
|
1
|
+
export { setLicenseKey, clearLicenseKey, getLicenseKey, isLicenseKeySet, hasValidLicense, assertEnterpriseLicensed, nudgeEnterprise, checkLicenseKey, isLicenseExpired, getLicenseExpiry, type LicenseInfo, type LicenseStatus, } from './license.js';
|
|
2
|
+
export { parseLicenseExpiry } from './license-core.js';
|
|
3
|
+
export { exportGrid, copyExportToClipboard, type ExportFormat, type ExportOptions, type ExportColumn, type ExportCellStyle, type ExportStyles, type ExportHeaderFooterLine, type ExportSheet, type ExportRowSource, type ExportProgress, type ExportResult, type ClipboardFormat, type ClipboardExportOptions, } from './export.js';
|
|
4
4
|
export { default as SvExportMenu } from './SvExportMenu.svelte';
|
|
5
|
-
export { buildPdfDocDefinition, type PdfExportOptions, type PdfPageSize } from './export-pdf';
|
|
6
|
-
export { printGrid, type PrintOptions } from './print';
|
|
7
|
-
export { importData, readImportMatrix, mapImportMatrix, mapImportMatrixAsync, autoMapColumns, inferImportColumnTypes, type ImportFormat, type ImportFieldType, type ImportOptions, type ImportResult, type ImportProgress, type ImportColumnMap, type ImportColumnTypes, type ImportGridColumn, type ImportRowError, type ImportValidator, } from './import';
|
|
5
|
+
export { buildPdfDocDefinition, type PdfExportOptions, type PdfPageSize } from './export-pdf.js';
|
|
6
|
+
export { printGrid, type PrintOptions } from './print.js';
|
|
7
|
+
export { importData, readImportMatrix, mapImportMatrix, mapImportMatrixAsync, autoMapColumns, inferImportColumnTypes, type ImportFormat, type ImportFieldType, type ImportOptions, type ImportResult, type ImportProgress, type ImportColumnMap, type ImportColumnTypes, type ImportGridColumn, type ImportRowError, type ImportValidator, } from './import.js';
|
|
8
8
|
export { default as SvImportDialog } from './SvImportDialog.svelte';
|
|
9
|
-
export { installEnterprise, type EnterpriseGridApi, type EnterpriseAIApi, type EnterprisePivotApi } from './install';
|
|
10
|
-
export { enableSchedulerView, SvGridScheduler } from './scheduler';
|
|
11
|
-
export { enableBoardView, SvGridBoard } from './board';
|
|
12
|
-
export { enableSelectionBar, SvGridSelectionBar } from './selection-bar';
|
|
13
|
-
export { applyBulkEdit, bulkEditableFields, bulkEditInitialValues, coerceBulkValue, type BulkEditField, type BulkEditResult } from './bulk-edit';
|
|
9
|
+
export { installEnterprise, type EnterpriseGridApi, type EnterpriseAIApi, type EnterprisePivotApi } from './install.js';
|
|
10
|
+
export { enableSchedulerView, SvGridScheduler } from './scheduler.js';
|
|
11
|
+
export { enableBoardView, SvGridBoard } from './board.js';
|
|
12
|
+
export { enableSelectionBar, SvGridSelectionBar } from './selection-bar.js';
|
|
13
|
+
export { applyBulkEdit, bulkEditableFields, bulkEditInitialValues, coerceBulkValue, type BulkEditField, type BulkEditResult } from './bulk-edit.js';
|
|
14
14
|
export { default as SvGridBulkEditDrawer } from './SvGridBulkEditDrawer.svelte';
|
|
15
|
-
export { enablePivot } from './pivot-enable';
|
|
16
|
-
export { enableAdvancedFilter } from './advanced-filter-enable';
|
|
15
|
+
export { enablePivot } from './pivot-enable.js';
|
|
16
|
+
export { enableAdvancedFilter } from './advanced-filter-enable.js';
|
|
17
17
|
export { default as SvAdvancedFilter } from './SvAdvancedFilter.svelte';
|
|
18
|
-
export { exprColumnsFromGrid, type ExprColumnsOptions, } from './advanced-filter/expr-columns-from-grid';
|
|
19
|
-
export { compilePredicate, compileScalar, type CompileOptions, } from './expressions/compile';
|
|
20
|
-
export type { SchedulerProConfig } from './scheduler-config';
|
|
21
|
-
export { buildDependencyGraph, topoOrder, hasCycle, requiredStart, cascade, violations, type DependencyType, type SchedulerDependency, type EventTimes, type DependencyGraph, type CascadeOptions, } from './scheduler-dependencies';
|
|
22
|
-
export { expandAssignments, resourceLoad, overallocations, assignedMinutes, type SchedulerAssignment, type Allocation, type Overallocation, } from './scheduler-assignments';
|
|
23
|
-
export { columnSummaries, sumReducer, countReducer, busyMinutesReducer, type ColumnReducer, type SummaryItem, } from './scheduler-summary';
|
|
24
|
-
export { buildAxis, timeToX, xToTime, resolveZoom, zoomPresets, type Axis, type AxisSegment, type AxisSegmentKind, type BuildAxisOptions, type ZoomLevel, type ZoomMajorUnit, } from './scheduler-axis';
|
|
25
|
-
export { buildResourceRows, visibleResourceIds, type SchedulerResourceGroup, type ResourceRow, } from './scheduler-resource-tree';
|
|
26
|
-
export { heatCells, heatPeak, type HeatCell } from './scheduler-heatmap';
|
|
27
|
-
export { respectsBuffer, withinDurationBounds, afterLead, type BusyEvent, type GapMin, } from './scheduler-booking';
|
|
28
|
-
export { availableSlots, mergeIntervals, subtractIntervals, type Interval, type Slot, type SlotOptions, } from './scheduler-slots';
|
|
29
|
-
export { mergeBusy, commonFree } from './scheduler-freebusy';
|
|
30
|
-
export { createStagedEditing, type StagedChange, type StagedEditingApi, type StagedEditingEvent, } from './staged-editing';
|
|
31
|
-
export { createScheduler, parseCron, cronMatches, cronMatchesParsed, isScheduleDue, nextRun, CRON_PRESETS, type Schedule, type Scheduler, type SchedulerOptions, } from './scheduling';
|
|
32
|
-
export { dismissUnlicensedNudge } from './watermark';
|
|
33
|
-
export { showUpgradePrompt, dismissUpgradePrompt, type EnterpriseFeatureLabel, } from './upgrade-prompt';
|
|
34
|
-
export { createPivotModel, pivotAggregators, filterCollapsedPivotRows, type PivotAggregator, type PivotAggregatorId, type PivotConfig, type PivotResult, type PivotRow, type PivotRowKind, type PivotValueConfig, } from './pivot';
|
|
35
|
-
export { titleCase, resolveIdField, schemaToColumns, schemaToFormFields, isFieldHidden, validateField, applyComputed, validateEntity, type EntitySchema, type EntityField, type EntityFieldType, type EntityHooks, type FormFieldDescriptor, type FormLayout, type FormSection, type StudioEditorType, type StandardSchemaV1, type StandardSchemaResult, type ValidationOp, type ValidationRuleSpec, } from './schema';
|
|
36
|
-
export { planQuery, coerce, createInMemoryDataSource, createKitDataSource, createKitHandlers, createSqlDataSource, planToSql, type QueryPlan, type PlanPredicate, type PlanOp, type KitDataSourceOptions, type KitHandlerOptions, type KitScope, type KitHandlers, type KitMessage, type SqlDialect, type SqlPlan, type SqlExecutor, type SqlDataSourceConfig, type WritableDataSource, } from './sveltekit';
|
|
37
|
-
export { createSupabaseDataSource, createRestDataSource, offsetLimitAdapter, dummyJsonAdapter, jsonServerAdapter, introspectSupabaseTable, listSupabaseTables, createSupabaseRealtime, createRelationLookup, createSupabaseAuth, aggregateRows, chartFieldsFromSchema, normalizeFilters, buildEntitySchema, pickLabelField, linkRelationLabels, type SupabaseDataSourceConfig, type SupabaseClientLike, type RestDataSourceConfig, type RestAdapter, type OffsetLimitOptions, type IntrospectSupabaseOptions, type IntrospectedColumn, type ColumnReference, type NormalizedFilter, type NormalizedPredicate, type SupabaseRealtimeConfig, type SupabaseRealtimeClientLike, type SupabaseRealtimeHandle, type RealtimeChannelLike, type RealtimeChange, type RelationLookup, type RelationLookupConfig, type RelationOption, type SupabaseAuthConfig, type SupabaseAuthController, type SupabaseAuthClientLike, type AuthState, type AuthUser, withEntityRules, withRelationLabels, reduceValue, kpiSeries, sparklinePoints, seriesDelta, formatKpiValue, dashboardFromSchema, type AggregateReduce, type AggregateRequest, type AggregateBucket, type AggregateSource, type DashboardSpec, type DashboardWidget, type KpiWidget, type ChartWidget, type RelationLabelConfig, } from './sources';
|
|
38
|
-
export { buildInitialValues, controlKind, editMode, evalValidationRules, fieldState, sectionVisible, hasFieldConditions, rowId, stripHiddenValues, toSubmitValues, validateAll, visibleFormFields, type EditMode, type ControlKind, type FieldState, } from './edit-panel';
|
|
18
|
+
export { exprColumnsFromGrid, type ExprColumnsOptions, } from './advanced-filter/expr-columns-from-grid.js';
|
|
19
|
+
export { compilePredicate, compileScalar, type CompileOptions, } from './expressions/compile.js';
|
|
20
|
+
export type { SchedulerProConfig } from './scheduler-config.js';
|
|
21
|
+
export { buildDependencyGraph, topoOrder, hasCycle, requiredStart, cascade, violations, type DependencyType, type SchedulerDependency, type EventTimes, type DependencyGraph, type CascadeOptions, } from './scheduler-dependencies.js';
|
|
22
|
+
export { expandAssignments, resourceLoad, overallocations, assignedMinutes, type SchedulerAssignment, type Allocation, type Overallocation, } from './scheduler-assignments.js';
|
|
23
|
+
export { columnSummaries, sumReducer, countReducer, busyMinutesReducer, type ColumnReducer, type SummaryItem, } from './scheduler-summary.js';
|
|
24
|
+
export { buildAxis, timeToX, xToTime, resolveZoom, zoomPresets, type Axis, type AxisSegment, type AxisSegmentKind, type BuildAxisOptions, type ZoomLevel, type ZoomMajorUnit, } from './scheduler-axis.js';
|
|
25
|
+
export { buildResourceRows, visibleResourceIds, type SchedulerResourceGroup, type ResourceRow, } from './scheduler-resource-tree.js';
|
|
26
|
+
export { heatCells, heatPeak, type HeatCell } from './scheduler-heatmap.js';
|
|
27
|
+
export { respectsBuffer, withinDurationBounds, afterLead, type BusyEvent, type GapMin, } from './scheduler-booking.js';
|
|
28
|
+
export { availableSlots, mergeIntervals, subtractIntervals, type Interval, type Slot, type SlotOptions, } from './scheduler-slots.js';
|
|
29
|
+
export { mergeBusy, commonFree } from './scheduler-freebusy.js';
|
|
30
|
+
export { createStagedEditing, type StagedChange, type StagedEditingApi, type StagedEditingEvent, } from './staged-editing.js';
|
|
31
|
+
export { createScheduler, parseCron, cronMatches, cronMatchesParsed, isScheduleDue, nextRun, CRON_PRESETS, type Schedule, type Scheduler, type SchedulerOptions, } from './scheduling.js';
|
|
32
|
+
export { dismissUnlicensedNudge } from './watermark.js';
|
|
33
|
+
export { showUpgradePrompt, dismissUpgradePrompt, type EnterpriseFeatureLabel, } from './upgrade-prompt.js';
|
|
34
|
+
export { createPivotModel, pivotAggregators, filterCollapsedPivotRows, type PivotAggregator, type PivotAggregatorId, type PivotConfig, type PivotResult, type PivotRow, type PivotRowKind, type PivotValueConfig, } from './pivot.js';
|
|
35
|
+
export { titleCase, resolveIdField, schemaToColumns, schemaToFormFields, isFieldHidden, validateField, applyComputed, validateEntity, type EntitySchema, type EntityField, type EntityFieldType, type EntityHooks, type FormFieldDescriptor, type FormLayout, type FormSection, type StudioEditorType, type StandardSchemaV1, type StandardSchemaResult, type ValidationOp, type ValidationRuleSpec, } from './schema.js';
|
|
36
|
+
export { planQuery, coerce, createInMemoryDataSource, createKitDataSource, createKitHandlers, createSqlDataSource, planToSql, type QueryPlan, type PlanPredicate, type PlanOp, type KitDataSourceOptions, type KitHandlerOptions, type KitScope, type KitHandlers, type KitMessage, type SqlDialect, type SqlPlan, type SqlExecutor, type SqlDataSourceConfig, type WritableDataSource, } from './sveltekit/index.js';
|
|
37
|
+
export { createSupabaseDataSource, createRestDataSource, offsetLimitAdapter, dummyJsonAdapter, jsonServerAdapter, introspectSupabaseTable, listSupabaseTables, createSupabaseRealtime, createRelationLookup, createSupabaseAuth, aggregateRows, chartFieldsFromSchema, normalizeFilters, buildEntitySchema, pickLabelField, linkRelationLabels, type SupabaseDataSourceConfig, type SupabaseClientLike, type RestDataSourceConfig, type RestAdapter, type OffsetLimitOptions, type IntrospectSupabaseOptions, type IntrospectedColumn, type ColumnReference, type NormalizedFilter, type NormalizedPredicate, type SupabaseRealtimeConfig, type SupabaseRealtimeClientLike, type SupabaseRealtimeHandle, type RealtimeChannelLike, type RealtimeChange, type RelationLookup, type RelationLookupConfig, type RelationOption, type SupabaseAuthConfig, type SupabaseAuthController, type SupabaseAuthClientLike, type AuthState, type AuthUser, withEntityRules, withRelationLabels, reduceValue, kpiSeries, sparklinePoints, seriesDelta, formatKpiValue, dashboardFromSchema, type AggregateReduce, type AggregateRequest, type AggregateBucket, type AggregateSource, type DashboardSpec, type DashboardWidget, type KpiWidget, type ChartWidget, type RelationLabelConfig, } from './sources/index.js';
|
|
38
|
+
export { buildInitialValues, controlKind, editMode, evalValidationRules, fieldState, sectionVisible, hasFieldConditions, rowId, stripHiddenValues, toSubmitValues, validateAll, visibleFormFields, type EditMode, type ControlKind, type FieldState, } from './edit-panel.js';
|
|
39
39
|
export { default as SvGridEditPanel } from './SvGridEditPanel.svelte';
|
|
40
40
|
export { default as SvLookupInput } from './SvLookupInput.svelte';
|
|
41
41
|
export { default as SvFileInput } from './SvFileInput.svelte';
|
|
@@ -45,28 +45,28 @@ export { default as SvSchemaDashboard } from './SvSchemaDashboard.svelte';
|
|
|
45
45
|
export { default as SvBoard } from './SvBoard.svelte';
|
|
46
46
|
export { default as SvSchedule } from './SvSchedule.svelte';
|
|
47
47
|
export { default as SvRecordDetail } from './SvRecordDetail.svelte';
|
|
48
|
-
export { FIELD_TYPES, blankField, addField, removeField, updateField, moveField, validateSchema, isSchemaValid, sampleRows, type SchemaIssue, type SchemaIssueLevel, } from './schema-designer';
|
|
49
|
-
export { createProject, defaultScreenFor, emitStudioProject, emitStudioAppBundle, emitStudioApp, sampleApps, getSampleApp, starterProject, liveDataSamples, getLiveDataSample, type SampleApp, starterDatasets, getStarterDataset, type StarterDataset, crudSuiteScreens, addCrudSuite, crudAppFromSchemas, type CrudScreenKind, type CrudEditingMode, type CrudSuiteOptions, type CrudAppOptions, introspectJson, sanitizeStudioProject, buildStudioBugReport, type BugReport, type BugReportInput, addBlock, addBlockAt, removeBlock, moveBlock, reorderBlock, updateBlock, addScreen, removeScreen, updateScreen, duplicateScreen, reorderScreen, insertBlock, addEntity, removeEntity, updateEntity, formPlan, setEntityForm, setFormColumns, addFormSection, updateFormSection, removeFormSection, moveFormSection, moveFormField, moveFormFields, setFieldConditions, updateEntityField, setFieldInput, setFieldHidden, formControlsFor, formControlSettings, suggestFormSections, setDataSource, defaultEntitySource, setEntityDataSource, entityDataSource, setTheme, setThemePreset, setShell, sanitizeProject, screenFromTemplate, addScreenFromTemplate, addFreestandingScreen, serializeProject, parseProject, blockPalette, validateProject, isProjectValid, entityOf, studioThemes, defaultStudioTheme, getStudioTheme, resolveThemeTokens, isDarkTheme, themeStyleString, type StudioTheme, type StudioProject, type Screen, type ScreenNav, type Block, type BlockKind, type BlockConfig, type GridConfig, type GridEditing, type GridDensity, type GridAlign, type PagerPosition, type GridColumnConfig, type ChartConfig, type KpiConfig, type KpiFormat, type DashboardConfig, type MasterDetailConfig, type LookupConfig, type Reduce, type DataSourceKind, type EntityDataSource, type MemorySource, type RestSource, type SqlSource, type SupabaseSource, type RestMethod, type ParamLocation, type ParamType, type RequestParam, type SqlDialectKind, type ProjectTheme, type ShellConfig, type ShellStyle, type ScreenTemplate, type PaletteItem, type ProjectIssue, type GeneratedFile, } from './studio';
|
|
50
|
-
export { buildConnectionString, parseConnectionString, redactConnectionString, isFileDialect, DRIVER_PACKAGE, DEFAULT_PORT, countTableRows, probeConnection, type SqlConnectionParts, type TableRowCount, type SqlDialectName, } from './studio';
|
|
51
|
-
export { buildDisplayRows, isDetailRow, toggleExpanded, type DetailRow, } from './master-detail';
|
|
48
|
+
export { FIELD_TYPES, blankField, addField, removeField, updateField, moveField, validateSchema, isSchemaValid, sampleRows, type SchemaIssue, type SchemaIssueLevel, } from './schema-designer.js';
|
|
49
|
+
export { createProject, defaultScreenFor, emitStudioProject, emitStudioAppBundle, emitStudioApp, sampleApps, getSampleApp, starterProject, liveDataSamples, getLiveDataSample, type SampleApp, starterDatasets, getStarterDataset, type StarterDataset, crudSuiteScreens, addCrudSuite, crudAppFromSchemas, type CrudScreenKind, type CrudEditingMode, type CrudSuiteOptions, type CrudAppOptions, introspectJson, sanitizeStudioProject, buildStudioBugReport, type BugReport, type BugReportInput, addBlock, addBlockAt, removeBlock, moveBlock, reorderBlock, updateBlock, addScreen, removeScreen, updateScreen, duplicateScreen, reorderScreen, insertBlock, addEntity, removeEntity, updateEntity, formPlan, setEntityForm, setFormColumns, addFormSection, updateFormSection, removeFormSection, moveFormSection, moveFormField, moveFormFields, setFieldConditions, updateEntityField, setFieldInput, setFieldHidden, formControlsFor, formControlSettings, suggestFormSections, setDataSource, defaultEntitySource, setEntityDataSource, entityDataSource, setTheme, setThemePreset, setShell, sanitizeProject, screenFromTemplate, addScreenFromTemplate, addFreestandingScreen, serializeProject, parseProject, blockPalette, validateProject, isProjectValid, entityOf, studioThemes, defaultStudioTheme, getStudioTheme, resolveThemeTokens, isDarkTheme, themeStyleString, type StudioTheme, type StudioProject, type Screen, type ScreenNav, type Block, type BlockKind, type BlockConfig, type GridConfig, type GridEditing, type GridDensity, type GridAlign, type PagerPosition, type GridColumnConfig, type ChartConfig, type KpiConfig, type KpiFormat, type DashboardConfig, type MasterDetailConfig, type LookupConfig, type Reduce, type DataSourceKind, type EntityDataSource, type MemorySource, type RestSource, type SqlSource, type SupabaseSource, type RestMethod, type ParamLocation, type ParamType, type RequestParam, type SqlDialectKind, type ProjectTheme, type ShellConfig, type ShellStyle, type ScreenTemplate, type PaletteItem, type ProjectIssue, type GeneratedFile, } from './studio/index.js';
|
|
50
|
+
export { buildConnectionString, parseConnectionString, redactConnectionString, isFileDialect, DRIVER_PACKAGE, DEFAULT_PORT, countTableRows, probeConnection, type SqlConnectionParts, type TableRowCount, type SqlDialectName, } from './studio/index.js';
|
|
51
|
+
export { buildDisplayRows, isDetailRow, toggleExpanded, type DetailRow, } from './master-detail.js';
|
|
52
52
|
export { default as SvGridMasterDetail } from './SvGridMasterDetail.svelte';
|
|
53
53
|
export { default as SvPivotDesigner } from './SvPivotDesigner.svelte';
|
|
54
|
-
export { ALL_AGGREGATORS, AGG_LABEL, EMPTY_LAYOUT, defaultLayoutFor, type PivotField, type PivotValueChip, type PivotFilterChip, type PivotLayout, type PivotPreset, type Well, } from './pivot-designer';
|
|
55
|
-
export { pivotToChartSpec, type PivotChartOptions } from './pivot-chart';
|
|
56
|
-
export { evaluatePredicate, evaluateScalar, evaluateChange, BUILTIN_FUNCTION_NAMES, isBuiltinFunction, } from './expressions/evaluate';
|
|
57
|
-
export { parsePredicate, stringifyPredicate, stringifyScalar, validateExpression, collectColumnRefs, ExpressionParseError, } from './expressions/parse';
|
|
58
|
-
export { OPERATORS, operatorMeta, operatorsForType, isValueless, isSetOperator, isRangeOperator, columnById, resolveColumnRef, columnLabel, columnRefText, type ExprColumn, type ExprColumnType, type OperatorMeta, } from './expressions/expression-columns';
|
|
59
|
-
export type { ScalarExpr, PredicateExpr, ChangeExpr, ComparisonOp, ArithmeticOp, AggFn, EvalContext, ExprRow, } from './expressions/expression-types';
|
|
54
|
+
export { ALL_AGGREGATORS, AGG_LABEL, EMPTY_LAYOUT, defaultLayoutFor, type PivotField, type PivotValueChip, type PivotFilterChip, type PivotLayout, type PivotPreset, type Well, } from './pivot-designer.js';
|
|
55
|
+
export { pivotToChartSpec, type PivotChartOptions } from './pivot-chart.js';
|
|
56
|
+
export { evaluatePredicate, evaluateScalar, evaluateChange, BUILTIN_FUNCTION_NAMES, isBuiltinFunction, } from './expressions/evaluate.js';
|
|
57
|
+
export { parsePredicate, stringifyPredicate, stringifyScalar, validateExpression, collectColumnRefs, ExpressionParseError, } from './expressions/parse.js';
|
|
58
|
+
export { OPERATORS, operatorMeta, operatorsForType, isValueless, isSetOperator, isRangeOperator, columnById, resolveColumnRef, columnLabel, columnRefText, type ExprColumn, type ExprColumnType, type OperatorMeta, } from './expressions/expression-columns.js';
|
|
59
|
+
export type { ScalarExpr, PredicateExpr, ChangeExpr, ComparisonOp, ArithmeticOp, AggFn, EvalContext, ExprRow, } from './expressions/expression-types.js';
|
|
60
60
|
export { default as SvExpressionEditor } from './SvExpressionEditor.svelte';
|
|
61
|
-
export { enableAlerts } from './alerts';
|
|
62
|
-
export { createAlertEngine, renderTemplate, type AlertEngine, type AlertEngineOptions, type ValidateEditResult, } from './alerts/alert-engine';
|
|
63
|
-
export { attachAlertEngine, applyAlertEvents, type AlertAttachment, type AttachAlertOptions, type FlashTarget, } from './alerts/alert-engine-attach';
|
|
64
|
-
export { memoryAlertRules, localStorageAlertRules, createAlertRules, type AlertRulesStorage, type AlertRulesManager, } from './alerts/alert-storage';
|
|
65
|
-
export { createAlertObserver, type AlertObserver, type AlertObserverOptions, } from './alerts/alert-observer';
|
|
66
|
-
export { createAlertScheduler, type AlertScheduler, type AlertSchedulerMode, } from './alerts/alert-scheduler';
|
|
67
|
-
export { toConditionalFormats, rulesToConditionalFormats, type StylingContext } from './alerts/alert-formats';
|
|
68
|
-
export { alertStore } from './alerts/alert-store.svelte';
|
|
69
|
-
export type { AlertRule, AlertEvent, AlertTrigger, AlertAction, AlertActionKind, AlertActionStyle, AlertScope, AlertSeverity, } from './alerts/alert-types';
|
|
61
|
+
export { enableAlerts } from './alerts.js';
|
|
62
|
+
export { createAlertEngine, renderTemplate, type AlertEngine, type AlertEngineOptions, type ValidateEditResult, } from './alerts/alert-engine.js';
|
|
63
|
+
export { attachAlertEngine, applyAlertEvents, type AlertAttachment, type AttachAlertOptions, type FlashTarget, } from './alerts/alert-engine-attach.js';
|
|
64
|
+
export { memoryAlertRules, localStorageAlertRules, createAlertRules, type AlertRulesStorage, type AlertRulesManager, } from './alerts/alert-storage.js';
|
|
65
|
+
export { createAlertObserver, type AlertObserver, type AlertObserverOptions, } from './alerts/alert-observer.js';
|
|
66
|
+
export { createAlertScheduler, type AlertScheduler, type AlertSchedulerMode, } from './alerts/alert-scheduler.js';
|
|
67
|
+
export { toConditionalFormats, rulesToConditionalFormats, type StylingContext } from './alerts/alert-formats.js';
|
|
68
|
+
export { alertStore } from './alerts/alert-store.svelte.js';
|
|
69
|
+
export type { AlertRule, AlertEvent, AlertTrigger, AlertAction, AlertActionKind, AlertActionStyle, AlertScope, AlertSeverity, } from './alerts/alert-types.js';
|
|
70
70
|
export { default as SvGridAlerts } from './SvGridAlerts.svelte';
|
|
71
71
|
export { default as SvAlertRuleEditor } from './SvAlertRuleEditor.svelte';
|
|
72
72
|
export { default as SvAlertsManager } from './SvAlertsManager.svelte';
|