@svgrid/grid-wc 3.0.5 → 3.0.6
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.
|
@@ -911,7 +911,7 @@ function It(e) {
|
|
|
911
911
|
for (let e = 0; e < r.length; e++) {
|
|
912
912
|
let t = r[e], n = i?.[e];
|
|
913
913
|
if (n && n.original === t) {
|
|
914
|
-
n[mt] = null, n[ht] = null, c[e] = n;
|
|
914
|
+
n[mt] !== null && (n[mt] = null), n[ht] !== null && (n[ht] = null), c[e] = n;
|
|
915
915
|
continue;
|
|
916
916
|
}
|
|
917
917
|
l && l.size * 4 >= r.length && (l = null);
|
|
@@ -1830,7 +1830,7 @@ function Ln(e) {
|
|
|
1830
1830
|
}
|
|
1831
1831
|
}
|
|
1832
1832
|
if (i?.columnDef.editorType === "checkbox") {
|
|
1833
|
-
e.toggleBooleanCell(n.rowIndex, n.colIndex);
|
|
1833
|
+
(e.isCellEditableAt?.(n.rowIndex, n.colIndex) ?? !0) && e.toggleBooleanCell(n.rowIndex, n.colIndex);
|
|
1834
1834
|
return;
|
|
1835
1835
|
}
|
|
1836
1836
|
e.onCellDoubleClick(n.rowIndex, n.colIndex);
|
|
@@ -3507,7 +3507,7 @@ function Zn(e) {
|
|
|
3507
3507
|
return;
|
|
3508
3508
|
}
|
|
3509
3509
|
let o = Rn(r, i), s = e.getCellDisplayValue(r.id, i.id, o);
|
|
3510
|
-
|
|
3510
|
+
e.props.onCellClick?.({
|
|
3511
3511
|
rowIndex: t,
|
|
3512
3512
|
colIndex: n,
|
|
3513
3513
|
columnId: i.id,
|
|
@@ -3517,8 +3517,10 @@ function Zn(e) {
|
|
|
3517
3517
|
rowIndex: t,
|
|
3518
3518
|
columnId: i.id,
|
|
3519
3519
|
row: r.original
|
|
3520
|
-
})
|
|
3521
|
-
|
|
3520
|
+
});
|
|
3521
|
+
let c = i.columnDef.editorType === "checkbox", l = !c && typeof s == "boolean" && i.columnDef.cell == null;
|
|
3522
|
+
if (c || l) {
|
|
3523
|
+
(e.isCellEditableAt?.(t, n) ?? !0) && (c || e.editingEnabled) && e.toggleBooleanCell(t, n), a(t, n), p(t, n), e.editingCell = null;
|
|
3522
3524
|
return;
|
|
3523
3525
|
}
|
|
3524
3526
|
if (e.activeAtPointerDown !== null && e.activeAtPointerDown.rowIndex === t && e.activeAtPointerDown.colIndex === n && e.editingEnabled && e.props.editOnSecondClick !== !1) {
|
|
@@ -6224,8 +6226,11 @@ function ei(e, n) {
|
|
|
6224
6226
|
if (Rt) return e;
|
|
6225
6227
|
let t = e;
|
|
6226
6228
|
if (g(d).trim()) {
|
|
6227
|
-
let e = _e(g(d),
|
|
6228
|
-
t = t.filter((t) =>
|
|
6229
|
+
let e = s.filterLocale ?? s.localization?.locale, n = _e(g(d), e), r = G.getAllColumns().map((e) => e.id);
|
|
6230
|
+
t = t.filter((t) => {
|
|
6231
|
+
for (let i of r) if (_e(String(t.getCellValueByColumnId(i) ?? ""), e).includes(n)) return !0;
|
|
6232
|
+
return !1;
|
|
6233
|
+
});
|
|
6229
6234
|
}
|
|
6230
6235
|
if (t = kn(t), g(m)) {
|
|
6231
6236
|
let e = pr();
|
|
@@ -10062,7 +10067,7 @@ function Hs(t, a) {
|
|
|
10062
10067
|
}), M(t, d);
|
|
10063
10068
|
};
|
|
10064
10069
|
i(d, (e) => {
|
|
10065
|
-
s().columnDef.editorType === "checkbox" || typeof l() == "boolean" ? e(f) : (s().columnDef.editorType === "list" || s().columnDef.editorType === "chips") && s().columnDef.cell == null ? e(h, 1) : s().columnDef.sparkline && s().columnDef.cell == null ? e(v, 2) : e(y, -1);
|
|
10070
|
+
(s().columnDef.editorType === "checkbox" || typeof l() == "boolean") && s().columnDef.cell == null ? e(f) : (s().columnDef.editorType === "list" || s().columnDef.editorType === "chips") && s().columnDef.cell == null ? e(h, 1) : s().columnDef.sparkline && s().columnDef.cell == null ? e(v, 2) : e(y, -1);
|
|
10066
10071
|
}), M(t, u);
|
|
10067
10072
|
}, l = (e, t = T) => {
|
|
10068
10073
|
let n = D(() => t().getCanExpand?.() ?? !1);
|
|
@@ -8,69 +8,69 @@ function t(t) {
|
|
|
8
8
|
}
|
|
9
9
|
//#endregion
|
|
10
10
|
//#region ../grid/dist/validate.js
|
|
11
|
-
var n = 10, r = "https://svgrid.com/docs/getting-started/3-data-and-columns/";
|
|
12
|
-
function
|
|
13
|
-
for (let n of e) n.columns?.length ?
|
|
11
|
+
var n = 10, r = 1e3, i = "https://svgrid.com/docs/getting-started/3-data-and-columns/";
|
|
12
|
+
function a(e, t = []) {
|
|
13
|
+
for (let n of e) n.columns?.length ? a(n.columns, t) : t.push(n);
|
|
14
14
|
return t;
|
|
15
15
|
}
|
|
16
|
-
function
|
|
17
|
-
let
|
|
18
|
-
for (let
|
|
19
|
-
|
|
20
|
-
t(
|
|
16
|
+
function o(e) {
|
|
17
|
+
let o = [], c = a(e.columns ?? []), l = [], u = e.data ?? [], d = Math.min(u.length, r);
|
|
18
|
+
for (let e = 0; e < d && l.length < n; e += 1) {
|
|
19
|
+
let n = u[e];
|
|
20
|
+
t(n) || l.push(n);
|
|
21
21
|
}
|
|
22
|
-
if (
|
|
22
|
+
if (l.length && !e.serverGroup) {
|
|
23
23
|
let e = /* @__PURE__ */ new Set();
|
|
24
|
-
for (let t of
|
|
25
|
-
for (let t of
|
|
24
|
+
for (let t of l) if (t && typeof t == "object") for (let n of Object.keys(t)) e.add(n);
|
|
25
|
+
for (let t of c) {
|
|
26
26
|
let n = t.field;
|
|
27
27
|
if (!n || t.fieldFn || e.has(n)) continue;
|
|
28
|
-
let
|
|
29
|
-
|
|
28
|
+
let r = s(n, [...e]);
|
|
29
|
+
o.push(`[svgrid] Column field "${n}" does not exist on your row data, so that column renders empty.${r ? ` Did you mean "${r}"?` : ""} Available keys: ${[...e].slice(0, 12).join(", ")}. See ${i}`);
|
|
30
30
|
}
|
|
31
31
|
}
|
|
32
|
-
let
|
|
33
|
-
for (let e of
|
|
32
|
+
let f = /* @__PURE__ */ new Map();
|
|
33
|
+
for (let e of c) {
|
|
34
34
|
let t = e.id ?? e.field;
|
|
35
|
-
t &&
|
|
35
|
+
t && f.set(t, (f.get(t) ?? 0) + 1);
|
|
36
36
|
}
|
|
37
|
-
for (let [e, t] of
|
|
38
|
-
let
|
|
39
|
-
e.pageSize !== void 0 &&
|
|
40
|
-
let
|
|
41
|
-
for (let e of
|
|
37
|
+
for (let [e, t] of f) t > 1 && o.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 ${i}`);
|
|
38
|
+
let p = e.pageable === void 0 && e.showPagination === void 0;
|
|
39
|
+
e.pageSize !== void 0 && p && o.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) && c.some((e) => e.sortable === !0) && o.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 m = /* @__PURE__ */ new Set();
|
|
41
|
+
for (let e of c) {
|
|
42
42
|
let t = e.id ?? e.field;
|
|
43
|
-
t &&
|
|
43
|
+
t && m.add(t);
|
|
44
44
|
}
|
|
45
45
|
for (let t of e.groupBy ?? []) {
|
|
46
|
-
if (
|
|
47
|
-
let e =
|
|
48
|
-
|
|
46
|
+
if (m.has(t)) continue;
|
|
47
|
+
let e = s(t, [...m]);
|
|
48
|
+
o.push(`[svgrid] \`groupBy\` refers to column "${t}", which does not exist, so that grouping level is ignored.${e ? ` Did you mean "${e}"?` : ""} Column ids: ${[...m].slice(0, 12).join(", ")}`);
|
|
49
49
|
}
|
|
50
|
-
let
|
|
51
|
-
if (
|
|
50
|
+
let h = e.treeData?.column;
|
|
51
|
+
if (h && !m.has(h) && o.push(`[svgrid] \`treeData.column\` refers to column "${h}", which does not exist, so the expander falls back to the first visible column.`), l.length && e.treeData) {
|
|
52
52
|
let t = /* @__PURE__ */ new Set();
|
|
53
|
-
for (let e of
|
|
53
|
+
for (let e of l) if (e && typeof e == "object") for (let n of Object.keys(e)) t.add(n);
|
|
54
54
|
let n = e.treeData.parentField;
|
|
55
55
|
if (n && !t.has(n)) {
|
|
56
|
-
let e =
|
|
57
|
-
|
|
56
|
+
let e = s(n, [...t]);
|
|
57
|
+
o.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
58
|
}
|
|
59
59
|
let r = e.treeData.idField;
|
|
60
|
-
r && !t.has(r) &&
|
|
60
|
+
r && !t.has(r) && o.push(`[svgrid] \`treeData.idField\` is "${r}", which is not on your row data, so parent lookups cannot match and the tree stays flat.`);
|
|
61
61
|
}
|
|
62
|
-
return e.gantt && e.treeData &&
|
|
62
|
+
return e.gantt && e.treeData && o.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 && o.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 && o.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 && o.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 && o.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."), o;
|
|
63
63
|
}
|
|
64
|
-
function
|
|
64
|
+
function s(e, t) {
|
|
65
65
|
let n, r = Infinity;
|
|
66
66
|
for (let i of t) {
|
|
67
|
-
let t =
|
|
67
|
+
let t = c(e.toLowerCase(), i.toLowerCase());
|
|
68
68
|
t < r && (r = t, n = i);
|
|
69
69
|
}
|
|
70
70
|
let i = Math.min(3, Math.floor(e.length / 3) + 1);
|
|
71
71
|
return r <= i ? n : void 0;
|
|
72
72
|
}
|
|
73
|
-
function
|
|
73
|
+
function c(e, t) {
|
|
74
74
|
if (e === t) return 0;
|
|
75
75
|
let n = Array(t.length + 1);
|
|
76
76
|
for (let e = 0; e <= t.length; e++) n[e] = e;
|
|
@@ -85,4 +85,4 @@ function s(e, t) {
|
|
|
85
85
|
return n[t.length];
|
|
86
86
|
}
|
|
87
87
|
//#endregion
|
|
88
|
-
export {
|
|
88
|
+
export { o as validateGridConfig };
|
package/dist/sv-grid-element.js
CHANGED
|
@@ -911,7 +911,7 @@ function It(e) {
|
|
|
911
911
|
for (let e = 0; e < r.length; e++) {
|
|
912
912
|
let t = r[e], n = i?.[e];
|
|
913
913
|
if (n && n.original === t) {
|
|
914
|
-
n[mt] = null, n[ht] = null, c[e] = n;
|
|
914
|
+
n[mt] !== null && (n[mt] = null), n[ht] !== null && (n[ht] = null), c[e] = n;
|
|
915
915
|
continue;
|
|
916
916
|
}
|
|
917
917
|
l && l.size * 4 >= r.length && (l = null);
|
|
@@ -1830,7 +1830,7 @@ function Ln(e) {
|
|
|
1830
1830
|
}
|
|
1831
1831
|
}
|
|
1832
1832
|
if (i?.columnDef.editorType === "checkbox") {
|
|
1833
|
-
e.toggleBooleanCell(n.rowIndex, n.colIndex);
|
|
1833
|
+
(e.isCellEditableAt?.(n.rowIndex, n.colIndex) ?? !0) && e.toggleBooleanCell(n.rowIndex, n.colIndex);
|
|
1834
1834
|
return;
|
|
1835
1835
|
}
|
|
1836
1836
|
e.onCellDoubleClick(n.rowIndex, n.colIndex);
|
|
@@ -3507,7 +3507,7 @@ function Zn(e) {
|
|
|
3507
3507
|
return;
|
|
3508
3508
|
}
|
|
3509
3509
|
let o = Rn(r, i), s = e.getCellDisplayValue(r.id, i.id, o);
|
|
3510
|
-
|
|
3510
|
+
e.props.onCellClick?.({
|
|
3511
3511
|
rowIndex: t,
|
|
3512
3512
|
colIndex: n,
|
|
3513
3513
|
columnId: i.id,
|
|
@@ -3517,8 +3517,10 @@ function Zn(e) {
|
|
|
3517
3517
|
rowIndex: t,
|
|
3518
3518
|
columnId: i.id,
|
|
3519
3519
|
row: r.original
|
|
3520
|
-
})
|
|
3521
|
-
|
|
3520
|
+
});
|
|
3521
|
+
let c = i.columnDef.editorType === "checkbox", l = !c && typeof s == "boolean" && i.columnDef.cell == null;
|
|
3522
|
+
if (c || l) {
|
|
3523
|
+
(e.isCellEditableAt?.(t, n) ?? !0) && (c || e.editingEnabled) && e.toggleBooleanCell(t, n), a(t, n), p(t, n), e.editingCell = null;
|
|
3522
3524
|
return;
|
|
3523
3525
|
}
|
|
3524
3526
|
if (e.activeAtPointerDown !== null && e.activeAtPointerDown.rowIndex === t && e.activeAtPointerDown.colIndex === n && e.editingEnabled && e.props.editOnSecondClick !== !1) {
|
|
@@ -6224,8 +6226,11 @@ function ei(e, n) {
|
|
|
6224
6226
|
if (Rt) return e;
|
|
6225
6227
|
let t = e;
|
|
6226
6228
|
if (g(d).trim()) {
|
|
6227
|
-
let e = _e(g(d),
|
|
6228
|
-
t = t.filter((t) =>
|
|
6229
|
+
let e = s.filterLocale ?? s.localization?.locale, n = _e(g(d), e), r = G.getAllColumns().map((e) => e.id);
|
|
6230
|
+
t = t.filter((t) => {
|
|
6231
|
+
for (let i of r) if (_e(String(t.getCellValueByColumnId(i) ?? ""), e).includes(n)) return !0;
|
|
6232
|
+
return !1;
|
|
6233
|
+
});
|
|
6229
6234
|
}
|
|
6230
6235
|
if (t = kn(t), g(m)) {
|
|
6231
6236
|
let e = pr();
|
|
@@ -10062,7 +10067,7 @@ function Hs(t, a) {
|
|
|
10062
10067
|
}), M(t, d);
|
|
10063
10068
|
};
|
|
10064
10069
|
i(d, (e) => {
|
|
10065
|
-
s().columnDef.editorType === "checkbox" || typeof l() == "boolean" ? e(f) : (s().columnDef.editorType === "list" || s().columnDef.editorType === "chips") && s().columnDef.cell == null ? e(h, 1) : s().columnDef.sparkline && s().columnDef.cell == null ? e(v, 2) : e(y, -1);
|
|
10070
|
+
(s().columnDef.editorType === "checkbox" || typeof l() == "boolean") && s().columnDef.cell == null ? e(f) : (s().columnDef.editorType === "list" || s().columnDef.editorType === "chips") && s().columnDef.cell == null ? e(h, 1) : s().columnDef.sparkline && s().columnDef.cell == null ? e(v, 2) : e(y, -1);
|
|
10066
10071
|
}), M(t, u);
|
|
10067
10072
|
}, l = (e, t = T) => {
|
|
10068
10073
|
let n = D(() => t().getCanExpand?.() ?? !1);
|
|
@@ -8,69 +8,69 @@ function t(t) {
|
|
|
8
8
|
}
|
|
9
9
|
//#endregion
|
|
10
10
|
//#region ../grid/dist/validate.js
|
|
11
|
-
var n = 10, r = "https://svgrid.com/docs/getting-started/3-data-and-columns/";
|
|
12
|
-
function
|
|
13
|
-
for (let n of e) n.columns?.length ?
|
|
11
|
+
var n = 10, r = 1e3, i = "https://svgrid.com/docs/getting-started/3-data-and-columns/";
|
|
12
|
+
function a(e, t = []) {
|
|
13
|
+
for (let n of e) n.columns?.length ? a(n.columns, t) : t.push(n);
|
|
14
14
|
return t;
|
|
15
15
|
}
|
|
16
|
-
function
|
|
17
|
-
let
|
|
18
|
-
for (let
|
|
19
|
-
|
|
20
|
-
t(
|
|
16
|
+
function o(e) {
|
|
17
|
+
let o = [], c = a(e.columns ?? []), l = [], u = e.data ?? [], d = Math.min(u.length, r);
|
|
18
|
+
for (let e = 0; e < d && l.length < n; e += 1) {
|
|
19
|
+
let n = u[e];
|
|
20
|
+
t(n) || l.push(n);
|
|
21
21
|
}
|
|
22
|
-
if (
|
|
22
|
+
if (l.length && !e.serverGroup) {
|
|
23
23
|
let e = /* @__PURE__ */ new Set();
|
|
24
|
-
for (let t of
|
|
25
|
-
for (let t of
|
|
24
|
+
for (let t of l) if (t && typeof t == "object") for (let n of Object.keys(t)) e.add(n);
|
|
25
|
+
for (let t of c) {
|
|
26
26
|
let n = t.field;
|
|
27
27
|
if (!n || t.fieldFn || e.has(n)) continue;
|
|
28
|
-
let
|
|
29
|
-
|
|
28
|
+
let r = s(n, [...e]);
|
|
29
|
+
o.push(`[svgrid] Column field "${n}" does not exist on your row data, so that column renders empty.${r ? ` Did you mean "${r}"?` : ""} Available keys: ${[...e].slice(0, 12).join(", ")}. See ${i}`);
|
|
30
30
|
}
|
|
31
31
|
}
|
|
32
|
-
let
|
|
33
|
-
for (let e of
|
|
32
|
+
let f = /* @__PURE__ */ new Map();
|
|
33
|
+
for (let e of c) {
|
|
34
34
|
let t = e.id ?? e.field;
|
|
35
|
-
t &&
|
|
35
|
+
t && f.set(t, (f.get(t) ?? 0) + 1);
|
|
36
36
|
}
|
|
37
|
-
for (let [e, t] of
|
|
38
|
-
let
|
|
39
|
-
e.pageSize !== void 0 &&
|
|
40
|
-
let
|
|
41
|
-
for (let e of
|
|
37
|
+
for (let [e, t] of f) t > 1 && o.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 ${i}`);
|
|
38
|
+
let p = e.pageable === void 0 && e.showPagination === void 0;
|
|
39
|
+
e.pageSize !== void 0 && p && o.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) && c.some((e) => e.sortable === !0) && o.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 m = /* @__PURE__ */ new Set();
|
|
41
|
+
for (let e of c) {
|
|
42
42
|
let t = e.id ?? e.field;
|
|
43
|
-
t &&
|
|
43
|
+
t && m.add(t);
|
|
44
44
|
}
|
|
45
45
|
for (let t of e.groupBy ?? []) {
|
|
46
|
-
if (
|
|
47
|
-
let e =
|
|
48
|
-
|
|
46
|
+
if (m.has(t)) continue;
|
|
47
|
+
let e = s(t, [...m]);
|
|
48
|
+
o.push(`[svgrid] \`groupBy\` refers to column "${t}", which does not exist, so that grouping level is ignored.${e ? ` Did you mean "${e}"?` : ""} Column ids: ${[...m].slice(0, 12).join(", ")}`);
|
|
49
49
|
}
|
|
50
|
-
let
|
|
51
|
-
if (
|
|
50
|
+
let h = e.treeData?.column;
|
|
51
|
+
if (h && !m.has(h) && o.push(`[svgrid] \`treeData.column\` refers to column "${h}", which does not exist, so the expander falls back to the first visible column.`), l.length && e.treeData) {
|
|
52
52
|
let t = /* @__PURE__ */ new Set();
|
|
53
|
-
for (let e of
|
|
53
|
+
for (let e of l) if (e && typeof e == "object") for (let n of Object.keys(e)) t.add(n);
|
|
54
54
|
let n = e.treeData.parentField;
|
|
55
55
|
if (n && !t.has(n)) {
|
|
56
|
-
let e =
|
|
57
|
-
|
|
56
|
+
let e = s(n, [...t]);
|
|
57
|
+
o.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
58
|
}
|
|
59
59
|
let r = e.treeData.idField;
|
|
60
|
-
r && !t.has(r) &&
|
|
60
|
+
r && !t.has(r) && o.push(`[svgrid] \`treeData.idField\` is "${r}", which is not on your row data, so parent lookups cannot match and the tree stays flat.`);
|
|
61
61
|
}
|
|
62
|
-
return e.gantt && e.treeData &&
|
|
62
|
+
return e.gantt && e.treeData && o.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 && o.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 && o.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 && o.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 && o.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."), o;
|
|
63
63
|
}
|
|
64
|
-
function
|
|
64
|
+
function s(e, t) {
|
|
65
65
|
let n, r = Infinity;
|
|
66
66
|
for (let i of t) {
|
|
67
|
-
let t =
|
|
67
|
+
let t = c(e.toLowerCase(), i.toLowerCase());
|
|
68
68
|
t < r && (r = t, n = i);
|
|
69
69
|
}
|
|
70
70
|
let i = Math.min(3, Math.floor(e.length / 3) + 1);
|
|
71
71
|
return r <= i ? n : void 0;
|
|
72
72
|
}
|
|
73
|
-
function
|
|
73
|
+
function c(e, t) {
|
|
74
74
|
if (e === t) return 0;
|
|
75
75
|
let n = Array(t.length + 1);
|
|
76
76
|
for (let e = 0; e <= t.length; e++) n[e] = e;
|
|
@@ -85,4 +85,4 @@ function s(e, t) {
|
|
|
85
85
|
return n[t.length];
|
|
86
86
|
}
|
|
87
87
|
//#endregion
|
|
88
|
-
export {
|
|
88
|
+
export { o as validateGridConfig };
|
package/package.json
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
"type": "commercial",
|
|
5
5
|
"url": "https://svgrid.com/pricing"
|
|
6
6
|
},
|
|
7
|
-
"version": "3.0.
|
|
7
|
+
"version": "3.0.6",
|
|
8
8
|
"description": "SvGrid as a framework-agnostic web component (<sv-grid> custom element, plus <sv-grid-shadow> for an open shadow root and <sv-chart> for the standalone chart). Drop into React, Vue, Angular, or plain HTML - no build step required.",
|
|
9
9
|
"type": "module",
|
|
10
10
|
"license": "MIT",
|
|
@@ -112,8 +112,8 @@
|
|
|
112
112
|
"vite": "^8.2.1",
|
|
113
113
|
"vue": "^3.5.42",
|
|
114
114
|
"vue-tsc": "^3.3.11",
|
|
115
|
-
"@svgrid/enterprise": "^3.1.
|
|
116
|
-
"@svgrid/grid": "^3.0.
|
|
115
|
+
"@svgrid/enterprise": "^3.1.2",
|
|
116
|
+
"@svgrid/grid": "^3.0.8"
|
|
117
117
|
},
|
|
118
118
|
"types": "./dist/sv-grid-element.d.ts",
|
|
119
119
|
"peerDependencies": {
|