@svgrid/enterprise 2.0.4 → 2.2.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.
Files changed (51) hide show
  1. package/README.md +18 -6
  2. package/dist/cdn/svgrid-enterprise.svelte-external.js +14035 -6842
  3. package/dist/node/studio.js +7888 -2459
  4. package/package.json +9 -4
  5. package/src/SvGridMasterDetail.svelte +24 -3
  6. package/src/SvGridScheduler.svelte +4410 -0
  7. package/src/SvPivotDesigner.svelte +1990 -1045
  8. package/src/SvSchemaChart.svelte +10 -9
  9. package/src/ai.test.ts +522 -522
  10. package/src/ai.ts +202 -2
  11. package/src/export.ts +7 -1
  12. package/src/index.ts +409 -384
  13. package/src/install.ts +10 -0
  14. package/src/pivot-chart.test.ts +86 -0
  15. package/src/pivot-chart.ts +112 -0
  16. package/src/scheduler.ts +37 -0
  17. package/src/scheduling.test.ts +194 -0
  18. package/src/scheduling.ts +293 -0
  19. package/src/sources/filters.ts +6 -0
  20. package/src/studio/HANDLERS-DESIGN.md +142 -0
  21. package/src/studio/cli.ts +7 -2
  22. package/src/studio/emit-project.test.ts +1447 -13
  23. package/src/studio/emit-project.ts +3995 -1273
  24. package/src/studio/emit-schema.ts +146 -29
  25. package/src/studio/index.ts +320 -195
  26. package/src/studio/project.test.ts +370 -0
  27. package/src/studio/project.ts +1146 -26
  28. package/src/studio/sample-data.ts +4 -1
  29. package/src/studio/samples/ats.ts +2 -2
  30. package/src/studio/samples/clinic.ts +4 -2
  31. package/src/studio/samples/crm.ts +16 -8
  32. package/src/studio/samples/events.ts +4 -2
  33. package/src/studio/samples/fleet.ts +4 -2
  34. package/src/studio/samples/gym.ts +4 -2
  35. package/src/studio/samples/hr.ts +3 -1
  36. package/src/studio/samples/live-data.ts +308 -308
  37. package/src/studio/samples/projects.ts +2 -2
  38. package/src/studio/samples/restaurant.ts +4 -2
  39. package/src/studio/samples/samples.test.ts +13 -5
  40. package/src/studio/samples/shared.ts +346 -305
  41. package/src/studio/samples/support.ts +3 -1
  42. package/src/studio/scaffold.test.ts +15 -1
  43. package/src/studio/scaffold.ts +16 -0
  44. package/src/studio/themes.ts +7 -0
  45. package/src/studio/ui-components.ts +472 -0
  46. package/src/sveltekit/transport.test.ts +26 -0
  47. package/src/sveltekit/transport.ts +50 -5
  48. package/dist/designer/assets/index-Dp44bTid.js +0 -939
  49. package/dist/designer/assets/index-RJp6x8tw.css +0 -1
  50. package/dist/designer/assets/jszip.min-CjMo-QGg.js +0 -2
  51. 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 analytics 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.
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, and drill-through to source rows.
24
- - **AI helpers** - utilities for wiring the grid into LLM-driven workflows.
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