@svgrid/grid-wc 3.0.2 → 3.0.4
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 +4 -1
- package/dist/GridMenus-DMkf7UMn.js +1086 -0
- package/dist/{SvChartMenu-CBMKm7Xb.js → SvChartMenu-DkSyLWYH.js} +2 -2
- package/dist/{shadow/SvDateTimePicker-CnLlqNDQ.js → SvDateTimePicker-Czin1Ead.js} +1 -1
- package/dist/{shadow/SvGridCellEditor-B005dmV1.js → SvGridCellEditor-DhXEIlyE.js} +1 -1
- package/dist/{SvGridChart-4TcL9Rj2.js → SvGridChart-BMdCbrqb.js} +5 -5
- package/dist/{SvGridChartBuilder-C4OL4XYx.js → SvGridChartBuilder-Chp_MD1B.js} +121 -120
- package/dist/{shadow/SvGridChartPanel-CfHA8Ioq.js → SvGridChartPanel-BIV2O2Lp.js} +6 -6
- package/dist/{SvGridChartView-Ci-9_EJ0.js → SvGridChartView-DyhkumD-.js} +2 -2
- package/dist/{SvGridDropdown-BlA6iw9m.js → SvGridDropdown-BwPpGwLz.js} +140 -140
- package/dist/angular/fesm2022/svgrid-grid-wc-angular.mjs +37 -3
- package/dist/angular/fesm2022/svgrid-grid-wc-angular.mjs.map +1 -1
- package/dist/angular/types/svgrid-grid-wc-angular.d.ts +16 -1
- package/dist/{shadow/cell-formatting-Eypm-id0.js → cell-formatting-CBfgahv1.js} +1 -1
- package/dist/chart/{SvChartMenu-C-sbGNk8.js → SvChartMenu-DslxOgPN.js} +5 -1
- package/dist/chart/{chart-summary-B86RFA3M.js → chart-summary-6Xu2JoNC.js} +1 -1
- package/dist/chart/{chart-trend-DP6DSsBa.js → chart-trend-7fxtAqEl.js} +1 -1
- package/dist/chart/sv-chart-element.js +3 -3
- package/dist/{chart-DoqdUoGg.js → chart-D_LKA1fr.js} +1 -1
- package/dist/{chart-export-pdf-BirUdchl.js → chart-export-pdf-9OCvhzr0.js} +1 -1
- package/dist/{shadow/chart-summary-BP9i-v8M.js → chart-summary-v3Lhe8YD.js} +1 -1
- package/dist/{shadow/dismissable-DvhBKm3q.js → dismissable-CQ6XFXsk.js} +5 -1
- package/dist/{export-format-uGayRKWM.js → export-format-CAi1mp-1.js} +1 -1
- package/dist/{shadow/focus-trap-DvlOlOGM.js → focus-trap-Dbb2tJxb.js} +1 -1
- package/dist/react/index.d.ts +44 -0
- package/dist/react/index.js +5 -1
- package/dist/{row-resize-Cf8qPLbi.js → row-resize-limG_N1z.js} +41 -32
- package/dist/shadow/GridMenus-DMkf7UMn.js +1086 -0
- package/dist/shadow/{SvChartMenu-CBMKm7Xb.js → SvChartMenu-DkSyLWYH.js} +2 -2
- package/dist/{SvDateTimePicker-CnLlqNDQ.js → shadow/SvDateTimePicker-Czin1Ead.js} +1 -1
- package/dist/{SvGridCellEditor-B005dmV1.js → shadow/SvGridCellEditor-DhXEIlyE.js} +1 -1
- package/dist/shadow/{SvGridChart-4TcL9Rj2.js → SvGridChart-BMdCbrqb.js} +5 -5
- package/dist/shadow/{SvGridChartBuilder-C4OL4XYx.js → SvGridChartBuilder-Chp_MD1B.js} +121 -120
- package/dist/{SvGridChartPanel-CfHA8Ioq.js → shadow/SvGridChartPanel-BIV2O2Lp.js} +6 -6
- package/dist/shadow/{SvGridChartView-Ci-9_EJ0.js → SvGridChartView-DyhkumD-.js} +2 -2
- package/dist/shadow/{SvGridDropdown-BlA6iw9m.js → SvGridDropdown-BwPpGwLz.js} +140 -140
- package/dist/{cell-formatting-Eypm-id0.js → shadow/cell-formatting-CBfgahv1.js} +1 -1
- package/dist/shadow/{chart-DoqdUoGg.js → chart-D_LKA1fr.js} +1 -1
- package/dist/shadow/{chart-export-pdf-BirUdchl.js → chart-export-pdf-9OCvhzr0.js} +1 -1
- package/dist/{chart-summary-BP9i-v8M.js → shadow/chart-summary-v3Lhe8YD.js} +1 -1
- package/dist/{dismissable-DvhBKm3q.js → shadow/dismissable-CQ6XFXsk.js} +5 -1
- package/dist/shadow/{export-format-DhdZREP1.js → export-format-mnW_rVBZ.js} +1 -1
- package/dist/{focus-trap-DvlOlOGM.js → shadow/focus-trap-Dbb2tJxb.js} +1 -1
- package/dist/shadow/{row-resize-Cf8qPLbi.js → row-resize-limG_N1z.js} +41 -32
- package/dist/shadow/sv-grid-shadow-element.d.ts +26 -0
- package/dist/shadow/sv-grid-shadow-element.js +3479 -2627
- package/dist/shadow/validate-BqDthkNr.js +88 -0
- package/dist/sv-grid-element.d.ts +26 -0
- package/dist/sv-grid-element.js +3464 -2612
- package/dist/validate-BqDthkNr.js +88 -0
- package/dist/vue/index.d.ts +17 -2
- package/dist/vue/index.js +1 -25
- package/package.json +3 -3
- package/dist/GridMenus-B1mC1aPp.js +0 -1077
- package/dist/shadow/GridMenus-B1mC1aPp.js +0 -1077
- package/dist/shadow/validate-CgmAtX1A.js +0 -75
- package/dist/validate-CgmAtX1A.js +0 -75
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
//#region ../grid/dist/server-block-cache.js
|
|
2
|
+
var e = Symbol.for("svgrid.rowPlaceholder");
|
|
3
|
+
Object.freeze({ [e]: "loading" }), Object.freeze({ [e]: "failed" });
|
|
4
|
+
function t(t) {
|
|
5
|
+
if (typeof t != "object" || !t) return null;
|
|
6
|
+
let n = t[e];
|
|
7
|
+
return n === "loading" || n === "failed" ? n : null;
|
|
8
|
+
}
|
|
9
|
+
//#endregion
|
|
10
|
+
//#region ../grid/dist/validate.js
|
|
11
|
+
var n = 10, r = "https://svgrid.com/docs/getting-started/3-data-and-columns/";
|
|
12
|
+
function i(e, t = []) {
|
|
13
|
+
for (let n of e) n.columns?.length ? i(n.columns, t) : t.push(n);
|
|
14
|
+
return t;
|
|
15
|
+
}
|
|
16
|
+
function a(e) {
|
|
17
|
+
let a = [], s = i(e.columns ?? []), c = [];
|
|
18
|
+
for (let r of e.data ?? []) {
|
|
19
|
+
if (c.length >= n) break;
|
|
20
|
+
t(r) || c.push(r);
|
|
21
|
+
}
|
|
22
|
+
if (c.length && !e.serverGroup) {
|
|
23
|
+
let e = /* @__PURE__ */ new Set();
|
|
24
|
+
for (let t of c) if (t && typeof t == "object") for (let n of Object.keys(t)) e.add(n);
|
|
25
|
+
for (let t of s) {
|
|
26
|
+
let n = t.field;
|
|
27
|
+
if (!n || t.fieldFn || e.has(n)) continue;
|
|
28
|
+
let i = o(n, [...e]);
|
|
29
|
+
a.push(`[svgrid] Column field "${n}" does not exist on your row data, so that column renders empty.${i ? ` Did you mean "${i}"?` : ""} Available keys: ${[...e].slice(0, 12).join(", ")}. See ${r}`);
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
let l = /* @__PURE__ */ new Map();
|
|
33
|
+
for (let e of s) {
|
|
34
|
+
let t = e.id ?? e.field;
|
|
35
|
+
t && l.set(t, (l.get(t) ?? 0) + 1);
|
|
36
|
+
}
|
|
37
|
+
for (let [e, t] of l) t > 1 && a.push(`[svgrid] ${t} columns share the id "${e}". Column state (sorting, filtering, pinning, width) is keyed by id, so they will act as one. Give each an explicit \`id\`. See ${r}`);
|
|
38
|
+
let u = e.pageable === void 0 && e.showPagination === void 0;
|
|
39
|
+
e.pageSize !== void 0 && u && a.push("[svgrid] `pageSize` is set but pagination was never turned on, so it has no effect and every row renders. Add `pageable` to switch the pager on."), !(e.sortable === !0 || e.features?.rowSortingFeature) && s.some((e) => e.sortable === !0) && a.push("[svgrid] A column sets `sortable: true`, but sorting is not enabled on the grid, so its header does nothing. Add `sortable` to <SvGrid> (it registers the sorting feature for you).");
|
|
40
|
+
let d = /* @__PURE__ */ new Set();
|
|
41
|
+
for (let e of s) {
|
|
42
|
+
let t = e.id ?? e.field;
|
|
43
|
+
t && d.add(t);
|
|
44
|
+
}
|
|
45
|
+
for (let t of e.groupBy ?? []) {
|
|
46
|
+
if (d.has(t)) continue;
|
|
47
|
+
let e = o(t, [...d]);
|
|
48
|
+
a.push(`[svgrid] \`groupBy\` refers to column "${t}", which does not exist, so that grouping level is ignored.${e ? ` Did you mean "${e}"?` : ""} Column ids: ${[...d].slice(0, 12).join(", ")}`);
|
|
49
|
+
}
|
|
50
|
+
let f = e.treeData?.column;
|
|
51
|
+
if (f && !d.has(f) && a.push(`[svgrid] \`treeData.column\` refers to column "${f}", which does not exist, so the expander falls back to the first visible column.`), c.length && e.treeData) {
|
|
52
|
+
let t = /* @__PURE__ */ new Set();
|
|
53
|
+
for (let e of c) if (e && typeof e == "object") for (let n of Object.keys(e)) t.add(n);
|
|
54
|
+
let n = e.treeData.parentField;
|
|
55
|
+
if (n && !t.has(n)) {
|
|
56
|
+
let e = o(n, [...t]);
|
|
57
|
+
a.push(`[svgrid] \`treeData.parentField\` is "${n}", which is not on your row data, so every row becomes a root and no hierarchy appears.${e ? ` Did you mean "${e}"?` : ""}`);
|
|
58
|
+
}
|
|
59
|
+
let r = e.treeData.idField;
|
|
60
|
+
r && !t.has(r) && a.push(`[svgrid] \`treeData.idField\` is "${r}", which is not on your row data, so parent lookups cannot match and the tree stays flat.`);
|
|
61
|
+
}
|
|
62
|
+
return e.gantt && e.treeData && a.push("[svgrid] `gantt` and `treeData` are both set. The Gantt builds its own work-breakdown tree from `gantt.parentField` and needs every descendant row, but `treeData` hides collapsed children from the view, so summary bars will under-report. Remove `treeData` and set `gantt.parentField` instead."), (e.initialColumnPinning?.left?.length ?? 0) + (e.initialColumnPinning?.right?.length ?? 0) > 0 && e.columnVirtualization !== !1 && a.push("[svgrid] `initialColumnPinning` is set while column virtualization is on (its default), so the pinned columns will not stick - the virtualizer recycles column nodes. Add `columnVirtualization={false}`."), e.externalPagination === !0 && e.rowCount === void 0 && a.push("[svgrid] `externalPagination` is on but `rowCount` is not set, so the pager cannot know how many pages exist. Pass the server total as `rowCount`."), e.externalSort === !0 && !e.onSortingChange && a.push("[svgrid] `externalSort` is on but there is no `onSortingChange` handler, so clicking a header changes nothing - the grid stopped sorting and nobody is listening. Add `onSortingChange` and re-fetch in your handler."), e.externalFilter === !0 && !e.onFiltersChange && a.push("[svgrid] `externalFilter` is on but there is no `onFiltersChange` handler, so filtering the grid changes nothing. Add `onFiltersChange` and re-fetch in your handler."), a;
|
|
63
|
+
}
|
|
64
|
+
function o(e, t) {
|
|
65
|
+
let n, r = Infinity;
|
|
66
|
+
for (let i of t) {
|
|
67
|
+
let t = s(e.toLowerCase(), i.toLowerCase());
|
|
68
|
+
t < r && (r = t, n = i);
|
|
69
|
+
}
|
|
70
|
+
let i = Math.min(3, Math.floor(e.length / 3) + 1);
|
|
71
|
+
return r <= i ? n : void 0;
|
|
72
|
+
}
|
|
73
|
+
function s(e, t) {
|
|
74
|
+
if (e === t) return 0;
|
|
75
|
+
let n = Array(t.length + 1);
|
|
76
|
+
for (let e = 0; e <= t.length; e++) n[e] = e;
|
|
77
|
+
for (let r = 1; r <= e.length; r++) {
|
|
78
|
+
let i = n[0];
|
|
79
|
+
n[0] = r;
|
|
80
|
+
for (let a = 1; a <= t.length; a++) {
|
|
81
|
+
let o = Math.min(n[a] + 1, n[a - 1] + 1, i + (e[r - 1] === t[a - 1] ? 0 : 1));
|
|
82
|
+
i = n[a], n[a] = o;
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
return n[t.length];
|
|
86
|
+
}
|
|
87
|
+
//#endregion
|
|
88
|
+
export { a as validateGridConfig };
|
|
@@ -21,6 +21,8 @@ export interface SvGridElement extends HTMLElement {
|
|
|
21
21
|
/** property only - an attribute cannot hold this */
|
|
22
22
|
scheduler: unknown
|
|
23
23
|
/** property only - an attribute cannot hold this */
|
|
24
|
+
gantt: unknown
|
|
25
|
+
/** property only - an attribute cannot hold this */
|
|
24
26
|
chart: unknown
|
|
25
27
|
/** property only - an attribute cannot hold this */
|
|
26
28
|
pivot: unknown
|
|
@@ -139,6 +141,8 @@ export interface SvGridElement extends HTMLElement {
|
|
|
139
141
|
/** property only - an attribute cannot hold this */
|
|
140
142
|
processCellForClipboard: unknown
|
|
141
143
|
/** property only - an attribute cannot hold this */
|
|
144
|
+
includeCollapsedRows: unknown
|
|
145
|
+
/** property only - an attribute cannot hold this */
|
|
142
146
|
clipboardHtml: unknown
|
|
143
147
|
/** property only - an attribute cannot hold this */
|
|
144
148
|
processCellFromClipboard: unknown
|
|
@@ -193,7 +197,23 @@ export interface SvGridElement extends HTMLElement {
|
|
|
193
197
|
/** attribute `conditional-stat-scope` */
|
|
194
198
|
conditionalStatScope: "filtered" | "visible" | "all"
|
|
195
199
|
/** property only - an attribute cannot hold this */
|
|
200
|
+
rowPlaceholder: unknown
|
|
201
|
+
/** property only - an attribute cannot hold this */
|
|
202
|
+
rowModel: unknown
|
|
203
|
+
/** property only - an attribute cannot hold this */
|
|
204
|
+
pivotResultColumns: readonly unknown[]
|
|
205
|
+
/** property only - an attribute cannot hold this */
|
|
206
|
+
rowSelectionModel: unknown
|
|
207
|
+
/** property only - an attribute cannot hold this */
|
|
196
208
|
isDetailRow: unknown
|
|
209
|
+
/** attribute `detail-row-height` */
|
|
210
|
+
detailRowHeight: number
|
|
211
|
+
/** attribute `show-detail-toggle` */
|
|
212
|
+
showDetailToggle: boolean
|
|
213
|
+
/** property only - an attribute cannot hold this */
|
|
214
|
+
isDetailOpen: unknown
|
|
215
|
+
/** property only - an attribute cannot hold this */
|
|
216
|
+
hasDetail: unknown
|
|
197
217
|
/** property only - an attribute cannot hold this */
|
|
198
218
|
serverGroup: unknown
|
|
199
219
|
/** property only - an attribute cannot hold this */
|
|
@@ -202,6 +222,8 @@ export interface SvGridElement extends HTMLElement {
|
|
|
202
222
|
pinnedTopRows: readonly unknown[]
|
|
203
223
|
/** attribute `frozen-rows` */
|
|
204
224
|
frozenRows: number
|
|
225
|
+
/** attribute `sticky-group-rows` */
|
|
226
|
+
stickyGroupRows: boolean
|
|
205
227
|
/** property only - an attribute cannot hold this */
|
|
206
228
|
mergedCells: readonly unknown[]
|
|
207
229
|
/** property only - an attribute cannot hold this */
|
|
@@ -252,8 +274,12 @@ declare global {
|
|
|
252
274
|
celldoubleclick: CustomEvent<unknown>
|
|
253
275
|
rowdoubleclick: CustomEvent<unknown>
|
|
254
276
|
scrollbottomreached: CustomEvent<unknown>
|
|
277
|
+
visiblerangechange: CustomEvent<unknown>
|
|
278
|
+
retryrow: CustomEvent<unknown>
|
|
279
|
+
detailtoggle: CustomEvent<unknown>
|
|
255
280
|
columnorderchange: CustomEvent<unknown>
|
|
256
281
|
rowdragend: CustomEvent<unknown>
|
|
282
|
+
rowdrop: CustomEvent<unknown>
|
|
257
283
|
selectionchange: CustomEvent<unknown>
|
|
258
284
|
}
|
|
259
285
|
}
|