@svgrid/enterprise 2.0.3 → 2.2.0
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 +18 -6
- package/dist/cdn/svgrid-enterprise.svelte-external.js +14025 -6836
- package/dist/node/studio.js +7889 -2460
- package/package.json +9 -4
- package/src/SvGridMasterDetail.svelte +24 -3
- package/src/SvGridScheduler.svelte +4410 -0
- package/src/SvPivotDesigner.svelte +1990 -1045
- package/src/SvSchemaChart.svelte +10 -9
- package/src/ai.test.ts +522 -522
- package/src/ai.ts +202 -2
- package/src/index.ts +409 -384
- package/src/install.ts +10 -0
- package/src/pivot-chart.test.ts +86 -0
- package/src/pivot-chart.ts +112 -0
- package/src/scheduler.ts +37 -0
- package/src/scheduling.test.ts +194 -0
- package/src/scheduling.ts +293 -0
- package/src/sources/filters.ts +6 -0
- package/src/studio/HANDLERS-DESIGN.md +142 -0
- package/src/studio/cli.ts +7 -2
- package/src/studio/emit-project.test.ts +1447 -13
- package/src/studio/emit-project.ts +3995 -1273
- package/src/studio/emit-schema.ts +146 -29
- package/src/studio/index.ts +320 -195
- package/src/studio/project.test.ts +370 -0
- package/src/studio/project.ts +1146 -26
- package/src/studio/sample-data.ts +4 -1
- package/src/studio/samples/ats.ts +2 -2
- package/src/studio/samples/clinic.ts +4 -2
- package/src/studio/samples/crm.ts +16 -8
- package/src/studio/samples/events.ts +4 -2
- package/src/studio/samples/fleet.ts +4 -2
- package/src/studio/samples/gym.ts +4 -2
- package/src/studio/samples/hr.ts +3 -1
- package/src/studio/samples/live-data.ts +308 -308
- package/src/studio/samples/projects.ts +2 -2
- package/src/studio/samples/restaurant.ts +4 -2
- package/src/studio/samples/samples.test.ts +13 -5
- package/src/studio/samples/shared.ts +346 -305
- package/src/studio/samples/support.ts +3 -1
- package/src/studio/scaffold.test.ts +15 -1
- package/src/studio/scaffold.ts +16 -0
- package/src/studio/themes.ts +7 -0
- package/src/studio/ui-components.ts +472 -0
- package/src/sveltekit/transport.test.ts +26 -0
- package/src/sveltekit/transport.ts +50 -5
- package/dist/designer/assets/index-Dp44bTid.js +0 -939
- package/dist/designer/assets/index-RJp6x8tw.css +0 -1
- package/dist/designer/assets/jszip.min-CjMo-QGg.js +0 -2
- package/dist/designer/index.html +0 -13
package/README.md
CHANGED
|
@@ -14,14 +14,19 @@
|
|
|
14
14
|
|
|
15
15
|
---
|
|
16
16
|
|
|
17
|
-
`@svgrid/enterprise` layers production export, printing, and
|
|
17
|
+
`@svgrid/enterprise` layers production export, printing, analytics, extra grid views, and a full data-app layer on top of the MIT [`@svgrid/grid`](https://www.npmjs.com/package/@svgrid/grid) core. It attaches to the grid's public API without changing it - the same `api` object you already hold simply gains new methods.
|
|
18
18
|
|
|
19
19
|
## What it adds
|
|
20
20
|
|
|
21
21
|
- **Data export** - Excel (`.xlsx`), PDF, CSV, TSV, and HTML, with theme-matched styling, headers/footers, and image support.
|
|
22
|
+
- **Data import** - read Excel / CSV / TSV / JSON into typed rows with column auto-mapping, type inference, and per-row validation, plus a ready-made `SvImportDialog`.
|
|
22
23
|
- **Paginated print** - opens a clean, paginated, printable view of the grid with title and page breaks.
|
|
23
|
-
- **Pivot tables** - drag-and-drop pivot Designer with row/column/value fields, aggregation,
|
|
24
|
-
- **
|
|
24
|
+
- **Pivot tables** - drag-and-drop pivot Designer with row/column/value fields, aggregation, drill-through to source rows, and pivot-to-chart.
|
|
25
|
+
- **Scheduler / calendar view** - a Month/Week/Day/Agenda calendar rendered as a view of the grid: `enableSchedulerView()` lets `<SvGrid scheduler={...}>` show events with resources, recurrence, and drag/resize.
|
|
26
|
+
- **Staged editing** - collect edits into a reviewable change set before committing.
|
|
27
|
+
- **Scheduling automation** - a client-side cron / one-off scheduler (`createScheduler`, `parseCron`, `CRON_PRESETS`) to drive recurring exports and alerts with no backend.
|
|
28
|
+
- **AI toolkit** - natural-language filter, "chart this", smart-fill, summarize, classify, anomaly detection, and NL export. Every call routes through a provider you register with `setAIProvider()`; no model client is bundled.
|
|
29
|
+
- **SvGrid Studio** - a schema-driven data-app layer: `EntitySchema`, memory / SQL / Supabase / REST data sources, a SvelteKit adapter, edit panels, master/detail, schema charts + KPI dashboards, and the project model + codegen behind the visual designer. See [`@svgrid/studio`](https://www.npmjs.com/package/@svgrid/studio).
|
|
25
30
|
|
|
26
31
|
## Install
|
|
27
32
|
|
|
@@ -32,8 +37,8 @@ npm install @svgrid/enterprise
|
|
|
32
37
|
Format engines are optional peer dependencies - install only the ones you use:
|
|
33
38
|
|
|
34
39
|
```bash
|
|
35
|
-
npm install jszip # Excel (.xlsx)
|
|
36
|
-
npm install pdfmake # PDF
|
|
40
|
+
npm install jszip # Excel (.xlsx) export + import
|
|
41
|
+
npm install pdfmake # PDF export
|
|
37
42
|
```
|
|
38
43
|
|
|
39
44
|
## Usage
|
|
@@ -46,11 +51,18 @@ setLicenseKey('SVENTERPRISE-XXXX-XXXX-XXXX') // your Enterprise key
|
|
|
46
51
|
// Inside <SvGrid onApiReady={(api) => { ... }}>:
|
|
47
52
|
const pro = installEnterprise(api)
|
|
48
53
|
|
|
54
|
+
// Export / print
|
|
49
55
|
await pro.exportData({ format: 'xlsx', filename: 'orders' })
|
|
50
56
|
pro.print({ title: 'Q2 Orders' })
|
|
57
|
+
|
|
58
|
+
// Import
|
|
59
|
+
const result = await pro.importData({ file, format: 'xlsx' })
|
|
60
|
+
|
|
61
|
+
// AI (needs setAIProvider())
|
|
62
|
+
await pro.ai.filter('EU orders over $1k from last quarter')
|
|
51
63
|
```
|
|
52
64
|
|
|
53
|
-
`installEnterprise` returns the same grid API with the enterprise methods added on top, so the rest of your integration is unchanged.
|
|
65
|
+
`installEnterprise` returns the same grid API with the enterprise methods (`exportData`, `copyExport`, `print`, `importData`, `ai.*`, `pivot.*`) added on top, so the rest of your integration is unchanged. It also registers the scheduler / calendar view, so `<SvGrid scheduler={...}>` works.
|
|
54
66
|
|
|
55
67
|
## Licensing
|
|
56
68
|
|