@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/package.json
CHANGED
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@svgrid/enterprise",
|
|
3
|
-
"
|
|
3
|
+
"funding": {
|
|
4
|
+
"type": "commercial",
|
|
5
|
+
"url": "https://svgrid.com/pricing"
|
|
6
|
+
},
|
|
7
|
+
"version": "2.2.0",
|
|
4
8
|
"description": "Pro feature pack for sv-grid: data export (Excel, PDF, CSV, TSV, HTML), import (xlsx, CSV, TSV, JSON), pivot table + designer, AI assistant (BYO model), and printing. Requires a paid license key.",
|
|
5
9
|
"license": "SEE LICENSE IN LICENSE",
|
|
6
10
|
"author": "jQWidgets <sales@jqwidgets.com>",
|
|
@@ -53,7 +57,8 @@
|
|
|
53
57
|
"jsdelivr": "./dist/cdn/svgrid-enterprise.svelte-external.js",
|
|
54
58
|
"files": [
|
|
55
59
|
"src",
|
|
56
|
-
"dist",
|
|
60
|
+
"dist/node",
|
|
61
|
+
"dist/cdn",
|
|
57
62
|
"README.md",
|
|
58
63
|
"LICENSE"
|
|
59
64
|
],
|
|
@@ -64,7 +69,7 @@
|
|
|
64
69
|
"svelte": "^5.0.0",
|
|
65
70
|
"jszip": "^3.10.0",
|
|
66
71
|
"pdfmake": "^0.2.0",
|
|
67
|
-
"@svgrid/grid": "^2.
|
|
72
|
+
"@svgrid/grid": "^2.2.0"
|
|
68
73
|
},
|
|
69
74
|
"peerDependenciesMeta": {
|
|
70
75
|
"jszip": {
|
|
@@ -81,7 +86,7 @@
|
|
|
81
86
|
"svelte": "^5.55.5",
|
|
82
87
|
"typescript": "6.0.3",
|
|
83
88
|
"vite": "^8.0.10",
|
|
84
|
-
"@svgrid/grid": "^2.
|
|
89
|
+
"@svgrid/grid": "^2.2.0"
|
|
85
90
|
},
|
|
86
91
|
"scripts": {
|
|
87
92
|
"test": "vitest run",
|
|
@@ -37,6 +37,13 @@
|
|
|
37
37
|
/** When set, a parent row click calls this (with the row id) to drill into a
|
|
38
38
|
* detail page, instead of expanding the inline child grid. */
|
|
39
39
|
onParentClick?: (id: string) => void
|
|
40
|
+
/** Stretch columns to fill the width, like a standard grid. Default `true` so the
|
|
41
|
+
* master + detail cells match a plain `<SvGrid>` instead of using natural widths. */
|
|
42
|
+
fitColumns?: boolean
|
|
43
|
+
/** Row height (px) - keep in sync with your other grids. Defaults to the grid's own 30. */
|
|
44
|
+
rowHeight?: number
|
|
45
|
+
/** Zebra-stripe the rows (match a striped grid). */
|
|
46
|
+
zebraRows?: boolean
|
|
40
47
|
}
|
|
41
48
|
|
|
42
49
|
let {
|
|
@@ -47,6 +54,9 @@
|
|
|
47
54
|
containerHeight = 320,
|
|
48
55
|
detailHeight = 200,
|
|
49
56
|
onParentClick,
|
|
57
|
+
fitColumns = true,
|
|
58
|
+
rowHeight,
|
|
59
|
+
zebraRows = false,
|
|
50
60
|
}: Props = $props()
|
|
51
61
|
|
|
52
62
|
const parentIdOf = (p: TParent) => String(p[resolveIdField(schema)])
|
|
@@ -70,6 +80,9 @@
|
|
|
70
80
|
data={displayRows}
|
|
71
81
|
{columns}
|
|
72
82
|
{containerHeight}
|
|
83
|
+
{fitColumns}
|
|
84
|
+
{rowHeight}
|
|
85
|
+
{zebraRows}
|
|
73
86
|
virtualization={false}
|
|
74
87
|
isDetailRow={(row) => isDetailRow(row)}
|
|
75
88
|
onRowClick={(e) => handleRowClick(e.row)}
|
|
@@ -77,19 +90,27 @@
|
|
|
77
90
|
{#snippet renderDetailRow({ row })}
|
|
78
91
|
{@const parent = (row as unknown as DetailRow<TParent>).parent}
|
|
79
92
|
<div class="sv-md-detail">
|
|
80
|
-
<SvGrid data={getChildren(parent)} columns={detailColumns} containerHeight={detailHeight} />
|
|
93
|
+
<SvGrid data={getChildren(parent)} columns={detailColumns} containerHeight={detailHeight} {fitColumns} {rowHeight} {zebraRows} />
|
|
81
94
|
</div>
|
|
82
95
|
{/snippet}
|
|
83
96
|
</SvGrid>
|
|
84
97
|
|
|
85
98
|
<style>
|
|
86
|
-
|
|
87
|
-
|
|
99
|
+
/* `:global` because this div lives in the `renderDetailRow` snippet, which SvGrid
|
|
100
|
+
renders inside ITS OWN tree - a scoped rule can get pruned / not match there, which
|
|
101
|
+
left the detail region with no padding / background. Global keeps it reliable. */
|
|
102
|
+
:global(.sv-md-detail) {
|
|
103
|
+
/* Sit the detail as a separated, inset card below its master row - the margin
|
|
104
|
+
spaces it off the surrounding master rows; the radius + border read as a nested block. */
|
|
105
|
+
margin: 10px 12px;
|
|
106
|
+
padding: 12px 14px;
|
|
88
107
|
/* Fall back to the themed header surface (not a fixed light grey) so the
|
|
89
108
|
detail region tracks light/dark - `--sg-bg-subtle` is unset by default,
|
|
90
109
|
which used to leave this white on every dark theme. */
|
|
91
110
|
background: var(--sg-bg-subtle, var(--sg-header-bg, #f8fafc));
|
|
92
111
|
color: var(--sg-fg, inherit);
|
|
112
|
+
border: 1px solid var(--sg-border, #e2e8f0);
|
|
93
113
|
border-left: 3px solid var(--sg-accent, #2563eb);
|
|
114
|
+
border-radius: 8px;
|
|
94
115
|
}
|
|
95
116
|
</style>
|