@svgrid/grid-wc 3.0.46 → 3.0.47
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/dist/GridFind-C1YbloFh.js +39 -0
- package/dist/GridFooter-DOR8m9GQ.js +142 -0
- package/dist/GridMenus-Da8XGbc6.js +1461 -0
- package/dist/PinSplitter-Du4ZF8T3.js +178 -0
- package/dist/SvChartMenu-B6kpmwUv.js +401 -0
- package/dist/{SvDateRangeInput-Cpss2SsG.js → SvDateRangeInput-ByR-LFgf.js} +78 -77
- package/dist/SvDateTimePicker-BCxhFb5c.js +763 -0
- package/dist/{SvField-C--8r4go.js → SvField-CtzxdF7J.js} +100 -99
- package/dist/SvGridCellEditor-BUdVD7xM.js +594 -0
- package/dist/SvGridChart-DkKI8-bj.js +3684 -0
- package/dist/SvGridChartBuilder-BCQ3W8TY.js +1086 -0
- package/dist/SvGridChartPanel-uqul044E.js +1689 -0
- package/dist/{SvGridChartView-Bvacwk37.js → SvGridChartView-DWxEFzdM.js} +9 -8
- package/dist/SvGridDropdown-CnCQuXaI.js +258 -0
- package/dist/angular/fesm2022/svgrid-grid-wc-angular.mjs +12 -3
- package/dist/angular/fesm2022/svgrid-grid-wc-angular.mjs.map +1 -1
- package/dist/angular/types/svgrid-grid-wc-angular.d.ts +5 -1
- package/dist/chart/SvChartMenu-NxEyX5kU.js +635 -0
- package/dist/chart/{chart-export-C43UPY8D.js → chart-export-Dj_zVsjI.js} +5 -7
- package/dist/chart/chart-export-pdf-pmzjhHhB.js +156 -0
- package/dist/chart/{client-BuB0wIgc.js → client-Y303i9Lw.js} +1317 -1214
- package/dist/chart/sv-chart-element.js +2390 -2405
- package/dist/chart-export-pdf-DyuVs1gO.js +156 -0
- package/dist/client-OtsRxGjS.js +3075 -0
- package/dist/{column-resize-DUPgynvc.js → column-resize-SEn7el6C.js} +21 -9
- package/dist/{csv-injection-Ce26_TOb.js → csv-injection-Cxf6dMrr.js} +1 -1
- package/dist/{date-format-B0RznzxC.js → date-format-DngG1HJ5.js} +402 -407
- package/dist/{shadow/export-format-6jDuF2nb.js → export-format-7DhxeN27.js} +2 -2
- package/dist/{grid-extension.svelte-CBhmpjuc.js → grid-extension.svelte-DToFhcZv.js} +1 -1
- package/dist/grid-menu-messages-BEsB6Jhh.js +57 -0
- package/dist/history-Q12tf0k-.js +80 -0
- package/dist/list-option-DpIu99JN.js +203 -0
- package/dist/menu-focus-lmTebXyL.js +45 -0
- package/dist/range-commit-C6Rogxem.js +385 -0
- package/dist/react/index.d.ts +11 -0
- package/dist/react/index.js +2 -1
- package/dist/shadow/GridFind-CcoKoisE.js +39 -0
- package/dist/shadow/GridFooter-CDq71ytl.js +142 -0
- package/dist/shadow/GridMenus-RAp-E3hp.js +1461 -0
- package/dist/shadow/PinSplitter-BAYTAZtm.js +178 -0
- package/dist/shadow/SvChartMenu-C74rWwjU.js +401 -0
- package/dist/shadow/{SvDateRangeInput-Cpss2SsG.js → SvDateRangeInput-9Wq4E64y.js} +78 -77
- package/dist/shadow/SvDateTimePicker-y9jPLR19.js +763 -0
- package/dist/shadow/{SvField-C--8r4go.js → SvField-DGPj2clt.js} +100 -99
- package/dist/shadow/SvGridCellEditor-CzeBp9lp.js +594 -0
- package/dist/shadow/SvGridChart-zTsB6F3Y.js +3684 -0
- package/dist/shadow/SvGridChartBuilder-VUKgOcp7.js +1086 -0
- package/dist/shadow/SvGridChartPanel-DkjEUB7t.js +1689 -0
- package/dist/shadow/{SvGridChartView-Bvacwk37.js → SvGridChartView-DQmJahyT.js} +9 -8
- package/dist/shadow/SvGridDropdown-B_5kqHQE.js +258 -0
- package/dist/shadow/chart-export-pdf-BZy6f5QB.js +156 -0
- package/dist/shadow/client-OtsRxGjS.js +3075 -0
- package/dist/shadow/{column-resize-DUPgynvc.js → column-resize-SEn7el6C.js} +21 -9
- package/dist/shadow/{csv-injection-Ce26_TOb.js → csv-injection-Cxf6dMrr.js} +1 -1
- package/dist/shadow/{date-format-B0RznzxC.js → date-format-C9UkbCig.js} +402 -407
- package/dist/{export-format-6jDuF2nb.js → shadow/export-format-7DhxeN27.js} +2 -2
- package/dist/shadow/{grid-extension.svelte-CBhmpjuc.js → grid-extension.svelte-DToFhcZv.js} +1 -1
- package/dist/shadow/grid-menu-messages-BEsB6Jhh.js +57 -0
- package/dist/shadow/history-Q12tf0k-.js +80 -0
- package/dist/shadow/list-option-DpIu99JN.js +203 -0
- package/dist/shadow/menu-focus-lmTebXyL.js +45 -0
- package/dist/shadow/range-commit-C6Rogxem.js +385 -0
- package/dist/shadow/sv-grid-shadow-element.d.ts +7 -0
- package/dist/shadow/sv-grid-shadow-element.js +4236 -4469
- package/dist/shadow/{svelte-virtualizer.svelte-u-y0InK2.js → svelte-virtualizer.svelte-DWvD9wvL.js} +17 -12
- package/dist/sv-grid-element.d.ts +7 -0
- package/dist/sv-grid-element.js +4219 -4452
- package/dist/{svelte-virtualizer.svelte-u-y0InK2.js → svelte-virtualizer.svelte-DWvD9wvL.js} +17 -12
- package/dist/vue/index.d.ts +6 -2
- package/dist/vue/index.js +1 -1
- package/package.json +4 -4
- package/dist/GridFind-DianRZxS.js +0 -39
- package/dist/GridFooter-Bp3o5qJX.js +0 -162
- package/dist/GridMenus-BYkY3nhr.js +0 -1405
- package/dist/PinSplitter-CinhgIrH.js +0 -130
- package/dist/SvChartMenu-CgAcTloT.js +0 -413
- package/dist/SvDateTimePicker-DyRO_e91.js +0 -770
- package/dist/SvGridCellEditor-DHHGSjgp.js +0 -584
- package/dist/SvGridChart-BFQLtNmn.js +0 -3703
- package/dist/SvGridChartBuilder-CtGuoAOV.js +0 -1166
- package/dist/SvGridChartPanel-CeaXNzmV.js +0 -1743
- package/dist/SvGridDropdown-CrECQYeq.js +0 -257
- package/dist/chart/SvChartMenu-DslxOgPN.js +0 -590
- package/dist/chart/chart-export-pdf-C0_y8glC.js +0 -104
- package/dist/chart-export-pdf-DDVtypH7.js +0 -104
- package/dist/client-DtIdusS4.js +0 -2974
- package/dist/focus-trap-Dbb2tJxb.js +0 -65
- package/dist/list-option-DrRyivWp.js +0 -82
- package/dist/shadow/GridFind-DianRZxS.js +0 -39
- package/dist/shadow/GridFooter-DvMFqeNV.js +0 -162
- package/dist/shadow/GridMenus-DKLNTKDZ.js +0 -1405
- package/dist/shadow/PinSplitter-CinhgIrH.js +0 -130
- package/dist/shadow/SvChartMenu-CgAcTloT.js +0 -413
- package/dist/shadow/SvDateTimePicker-DyRO_e91.js +0 -770
- package/dist/shadow/SvGridCellEditor-DHHGSjgp.js +0 -584
- package/dist/shadow/SvGridChart-BFQLtNmn.js +0 -3703
- package/dist/shadow/SvGridChartBuilder-CtGuoAOV.js +0 -1166
- package/dist/shadow/SvGridChartPanel-CeaXNzmV.js +0 -1743
- package/dist/shadow/SvGridDropdown-CrECQYeq.js +0 -257
- package/dist/shadow/chart-export-pdf-DDVtypH7.js +0 -104
- package/dist/shadow/client-DtIdusS4.js +0 -2974
- package/dist/shadow/focus-trap-Dbb2tJxb.js +0 -65
- package/dist/shadow/list-option-DrRyivWp.js +0 -82
|
@@ -1,584 +0,0 @@
|
|
|
1
|
-
import { $ as e, A as t, C as n, D as r, I as i, L as a, M as o, O as s, R as c, U as l, W as u, X as d, Y as f, Z as p, _ as m, b as h, d as g, et as _, f as v, g as ee, h as y, i as te, it as b, j as x, k as S, n as C, nt as w, ot as T, p as ne, q as re, rt as E, st as D, w as O, x as k, y as A, z as j } from "./client-DtIdusS4.js";
|
|
2
|
-
import { C as ie, d as ae, h as oe, m as se, o as ce, p as le, v as ue, x as de } from "./SvGrid.helpers-DovOhyhU.js";
|
|
3
|
-
import { n as fe, r as pe, t as M } from "./editor-registry-DxGKqcvx.js";
|
|
4
|
-
//#region ../grid/dist/SvGridCellEditor.svelte
|
|
5
|
-
var N = o("<span class=\"sv-grid-chip sv-grid-chip-removable\"> <button type=\"button\" class=\"sv-grid-chip-remove\">×</button></span>"), P = o("<button type=\"button\" class=\"sv-grid-chip-commit\" aria-label=\"Commit chip selection\">Done</button>"), F = o("<div class=\"sv-grid-cell-editor sv-grid-cell-editor-chips\" role=\"group\"><div class=\"sv-grid-chips-row\"><!> <input class=\"sv-grid-chip-input\" type=\"text\"/> <!></div></div>"), I = o("<input type=\"checkbox\" class=\"sv-grid-fr-editor sv-grid-fr-checkbox\"/>"), L = o("<option> </option>"), R = o("<select class=\"sv-grid-cell-editor sv-grid-fr-editor\"></select>"), z = o("<input class=\"sv-grid-cell-editor sv-grid-fr-editor\"/>"), me = o("<button type=\"button\" class=\"sv-grid-checkbox\" role=\"checkbox\" aria-label=\"Edit checkbox value\"></button>"), he = o("<button type=\"button\" role=\"radio\">★</button>"), ge = o("<span class=\"sv-grid-rating-editor\" role=\"radiogroup\" aria-label=\"Rating\"><!> <button type=\"button\" aria-label=\"Clear rating\" class=\"sv-grid-rating-clear\">×</button></span>"), _e = o("<textarea class=\"sv-grid-cell-editor sv-grid-cell-editor-textarea\" rows=\"4\"></textarea>"), ve = o("<button type=\"button\" class=\"sv-grid-autocomplete-option\" role=\"option\"> </button>"), ye = o("<div class=\"sv-grid-autocomplete-list\" role=\"listbox\"></div>"), be = o("<div class=\"sv-grid-autocomplete\"><input class=\"sv-grid-cell-editor sv-grid-cell-editor-autocomplete\" type=\"text\"/> <!></div>"), xe = o("<input type=\"color\"/>"), Se = o("<textarea class=\"sv-grid-cell-editor sv-grid-cell-editor-text sv-grid-cell-editor-multiline\"></textarea>"), Ce = o("<input/>");
|
|
6
|
-
function B(i, o) {
|
|
7
|
-
b(o, !0);
|
|
8
|
-
let B = (e, i = D, o = D, s = D, u = D) => {
|
|
9
|
-
var m = x(), h = d(m), g = (e) => {
|
|
10
|
-
var a = x(), s = d(a), c = (e) => {
|
|
11
|
-
var r = x(), a = d(r);
|
|
12
|
-
{
|
|
13
|
-
let e = w(() => V().editingCell?.value);
|
|
14
|
-
n(a, () => j(U), (t, n) => {
|
|
15
|
-
n(t, {
|
|
16
|
-
get options() {
|
|
17
|
-
return i();
|
|
18
|
-
},
|
|
19
|
-
get loading() {
|
|
20
|
-
return u();
|
|
21
|
-
},
|
|
22
|
-
get value() {
|
|
23
|
-
return j(e);
|
|
24
|
-
},
|
|
25
|
-
get multiple() {
|
|
26
|
-
return o();
|
|
27
|
-
},
|
|
28
|
-
placeholder: "Pick…",
|
|
29
|
-
renderChipsInTrigger: !0,
|
|
30
|
-
onChange: (e) => {
|
|
31
|
-
V().editingCell = V().editingCell ? {
|
|
32
|
-
...V().editingCell,
|
|
33
|
-
value: e
|
|
34
|
-
} : V().editingCell;
|
|
35
|
-
},
|
|
36
|
-
onCommit: () => j(q)(),
|
|
37
|
-
onCancel: () => {
|
|
38
|
-
V().editingCell = null, V().gridRootEl?.focus({ preventScroll: !0 });
|
|
39
|
-
}
|
|
40
|
-
});
|
|
41
|
-
});
|
|
42
|
-
}
|
|
43
|
-
t(e, r);
|
|
44
|
-
};
|
|
45
|
-
r(s, (e) => {
|
|
46
|
-
j(U) && e(c);
|
|
47
|
-
}), t(e, a);
|
|
48
|
-
}, _ = (e) => {
|
|
49
|
-
var n = F();
|
|
50
|
-
v(n, "tabindex", -1);
|
|
51
|
-
var i = f(n), u = f(i);
|
|
52
|
-
O(u, 19, s, (e, t) => String(e) + "_" + t, (e, n, r) => {
|
|
53
|
-
var i = N(), c = f(i), u = p(c);
|
|
54
|
-
T(i), l((e, t) => {
|
|
55
|
-
S(c, `${e ?? ""} `), v(u, "aria-label", `Remove ${t ?? ""}`);
|
|
56
|
-
}, [() => String(j(n)), () => String(j(n))]), a("mousedown", u, (e) => e.preventDefault()), a("click", u, () => {
|
|
57
|
-
let e = s().filter((e, t) => t !== j(r));
|
|
58
|
-
V().editingCell = V().editingCell ? {
|
|
59
|
-
...V().editingCell,
|
|
60
|
-
value: o() ? e : e[0] ?? null
|
|
61
|
-
} : V().editingCell;
|
|
62
|
-
}), t(e, i);
|
|
63
|
-
});
|
|
64
|
-
var d = p(u, 2);
|
|
65
|
-
k(d, (e) => j(X)?.(e));
|
|
66
|
-
var m = p(d, 2), h = (e) => {
|
|
67
|
-
var n = P();
|
|
68
|
-
a("mousedown", n, (e) => e.preventDefault()), a("click", n, () => j(q)()), t(e, n);
|
|
69
|
-
};
|
|
70
|
-
r(m, (e) => {
|
|
71
|
-
o() && e(h);
|
|
72
|
-
}), T(i), T(n), l(() => v(d, "placeholder", o() ? "Type, Enter to add" : "Type a value")), a("keydown", d, (e) => {
|
|
73
|
-
if (e.key === "Enter" || o() && e.key === ",") {
|
|
74
|
-
e.preventDefault(), e.stopPropagation();
|
|
75
|
-
let t = e.currentTarget, n = t.value.trim();
|
|
76
|
-
if (n) {
|
|
77
|
-
let e = o() ? [...s(), n] : [n];
|
|
78
|
-
V().editingCell = V().editingCell ? {
|
|
79
|
-
...V().editingCell,
|
|
80
|
-
value: o() ? e : n
|
|
81
|
-
} : V().editingCell, t.value = "", o() || j(q)();
|
|
82
|
-
}
|
|
83
|
-
} else if (e.key === "Escape") j(Y)(e);
|
|
84
|
-
else if (e.key === "Backspace" && e.currentTarget.value === "" && s().length > 0) {
|
|
85
|
-
e.preventDefault();
|
|
86
|
-
let t = s().slice(0, -1);
|
|
87
|
-
V().editingCell = V().editingCell ? {
|
|
88
|
-
...V().editingCell,
|
|
89
|
-
value: o() ? t : t[0] ?? null
|
|
90
|
-
} : V().editingCell;
|
|
91
|
-
}
|
|
92
|
-
}), c("blur", d, () => j(q)()), t(e, n);
|
|
93
|
-
};
|
|
94
|
-
r(h, (e) => {
|
|
95
|
-
i().length > 0 ? e(g) : e(_, -1);
|
|
96
|
-
}), t(e, m);
|
|
97
|
-
}, V = C(o, "ctrl", 7), H = C(o, "fullRow", 3, !1), U = _(null), W = _(null);
|
|
98
|
-
u(() => {
|
|
99
|
-
let t = V().editingCell?.editorType;
|
|
100
|
-
(t === "list" || t === "chips" || t === "select" || t === "rich-select") && !j(U) && import("./SvGridDropdown-CrECQYeq.js").then((t) => e(U, t.default, !0)), (t === "date" || t === "datetime" || t === "time") && !j(W) && import("./SvDateTimePicker-DyRO_e91.js").then((t) => e(W, t.default, !0));
|
|
101
|
-
});
|
|
102
|
-
let we = w(() => V().grid), Te = w(() => V().fullRowEdit), G = w(() => V().getColumnEditorOptions), K = w(() => V().areEditorOptionsLoading), q = w(() => V().saveEditingCell), J = w(() => V().updateEditingCellValue), Y = w(() => V().onEditorKeyDown), X = w(() => V().focusOnMount), Ee = w(() => V().toggleCheckboxWithKeyboard), Z = w(() => V().toolPanelHeaderLabel(o.column));
|
|
103
|
-
function De(e, t = !0) {
|
|
104
|
-
t && e.focus({ preventScroll: !0 });
|
|
105
|
-
}
|
|
106
|
-
function Q(e) {
|
|
107
|
-
e.key === "Enter" ? (e.preventDefault(), V().commitFullRowEdit(), V().gridRootEl?.focus({ preventScroll: !0 })) : e.key === "Escape" && (e.preventDefault(), V().cancelFullRowEdit(), V().gridRootEl?.focus({ preventScroll: !0 }));
|
|
108
|
-
}
|
|
109
|
-
function Oe(e) {
|
|
110
|
-
return typeof e == "object" && e && "value" in e ? String(e.value) : String(e);
|
|
111
|
-
}
|
|
112
|
-
function ke(e) {
|
|
113
|
-
return typeof e == "object" && e && "label" in e ? String(e.label) : String(e);
|
|
114
|
-
}
|
|
115
|
-
let Ae;
|
|
116
|
-
function je(e) {
|
|
117
|
-
let t = M(e);
|
|
118
|
-
return t && (Ae = t), t ?? Ae;
|
|
119
|
-
}
|
|
120
|
-
function Me() {
|
|
121
|
-
let e = V().editingCell;
|
|
122
|
-
return {
|
|
123
|
-
value: e?.value,
|
|
124
|
-
rowId: e?.rowId ?? "",
|
|
125
|
-
columnId: e?.columnId ?? "",
|
|
126
|
-
columnDef: o.column.columnDef,
|
|
127
|
-
row: o.row.original,
|
|
128
|
-
typed: e?.typed === !0,
|
|
129
|
-
grid: V(),
|
|
130
|
-
onChange: (e) => j(J)(e),
|
|
131
|
-
onCommit: (e) => {
|
|
132
|
-
e !== void 0 && j(J)(e), j(q)();
|
|
133
|
-
},
|
|
134
|
-
onCancel: () => {
|
|
135
|
-
V().editingCell = null, V().gridRootEl?.focus({ preventScroll: !0 });
|
|
136
|
-
},
|
|
137
|
-
onCommitAndMove: (e, t) => {
|
|
138
|
-
e !== void 0 && j(J)(e), V().commitAndMoveByTab(t === -1);
|
|
139
|
-
},
|
|
140
|
-
onCommitAndMoveDown: (e, t) => {
|
|
141
|
-
e !== void 0 && j(J)(e), V().commitAndMoveByEnter(t === !0);
|
|
142
|
-
},
|
|
143
|
-
onRequestClose: () => {
|
|
144
|
-
V().editingCell = null, V().gridRootEl?.focus({ preventScroll: !0 });
|
|
145
|
-
},
|
|
146
|
-
inCell: !0
|
|
147
|
-
};
|
|
148
|
-
}
|
|
149
|
-
var $ = x(), Ne = d($), Pe = (e) => {
|
|
150
|
-
let n = w(() => o.column.columnDef.editorType ?? "text"), i = w(() => j(Te)?.draft[o.column.id]);
|
|
151
|
-
var s = x(), c = d(s), u = (e) => {
|
|
152
|
-
var n = I();
|
|
153
|
-
g(n), l((e) => ne(n, e), [() => !!j(i)]), a("change", n, (e) => V().setFullRowDraft(o.column.id, e.currentTarget.checked)), a("keydown", n, Q), a("pointerdown", n, (e) => e.stopPropagation()), a("click", n, (e) => e.stopPropagation()), t(e, n);
|
|
154
|
-
}, p = (e) => {
|
|
155
|
-
let n = w(() => j(G)(o.column, o.row));
|
|
156
|
-
var r = R();
|
|
157
|
-
O(r, 21, () => j(n), (e) => Oe(e), (e, n) => {
|
|
158
|
-
var r = L(), i = f(r, !0);
|
|
159
|
-
T(r);
|
|
160
|
-
var a = {};
|
|
161
|
-
l((e, t) => {
|
|
162
|
-
S(i, e), a !== (a = t) && (r.value = (r.__value = t) ?? "");
|
|
163
|
-
}, [() => ke(j(n)), () => Oe(j(n))]), t(e, r);
|
|
164
|
-
}), T(r);
|
|
165
|
-
var s;
|
|
166
|
-
ee(r), l((e) => {
|
|
167
|
-
s !== (s = e) && (r.value = (r.__value = e) ?? "", m(r, e));
|
|
168
|
-
}, [() => String(j(i) ?? "")]), a("change", r, (e) => V().setFullRowDraft(o.column.id, e.currentTarget.value)), a("keydown", r, Q), a("pointerdown", r, (e) => e.stopPropagation()), a("click", r, (e) => e.stopPropagation()), t(e, r);
|
|
169
|
-
}, h = (e) => {
|
|
170
|
-
let r = w(() => j(n) === "number" ? "number" : j(n) === "date" ? "date" : j(n) === "datetime" ? "datetime-local" : j(n) === "time" ? "time" : j(n) === "password" ? "password" : "text");
|
|
171
|
-
var s = z();
|
|
172
|
-
g(s), l((e) => {
|
|
173
|
-
v(s, "type", j(r)), y(s, e);
|
|
174
|
-
}, [() => String(j(i) ?? "")]), a("input", s, (e) => V().setFullRowDraft(o.column.id, e.currentTarget.value)), a("keydown", s, Q), a("pointerdown", s, (e) => e.stopPropagation()), a("click", s, (e) => e.stopPropagation()), t(e, s);
|
|
175
|
-
};
|
|
176
|
-
r(c, (e) => {
|
|
177
|
-
j(n) === "checkbox" ? e(u) : j(n) === "list" || j(n) === "select" || j(n) === "rich-select" ? e(p, 1) : e(h, -1);
|
|
178
|
-
}), t(e, s);
|
|
179
|
-
}, Fe = (e) => {
|
|
180
|
-
var i = x(), u = d(i), m = (e) => {
|
|
181
|
-
let n = w(() => o.column.columnDef.cellEditor);
|
|
182
|
-
var r = x(), i = d(r);
|
|
183
|
-
{
|
|
184
|
-
let e = w(() => ({
|
|
185
|
-
cell: o.row.getAllCells().find((e) => e.column.id === o.column.id),
|
|
186
|
-
row: o.row,
|
|
187
|
-
column: o.column,
|
|
188
|
-
table: j(we),
|
|
189
|
-
getValue: () => V().editingCell?.value,
|
|
190
|
-
value: V().editingCell?.value,
|
|
191
|
-
update: (e) => {
|
|
192
|
-
V().editingCell = V().editingCell ? {
|
|
193
|
-
...V().editingCell,
|
|
194
|
-
value: e
|
|
195
|
-
} : V().editingCell;
|
|
196
|
-
},
|
|
197
|
-
commit: (e) => {
|
|
198
|
-
e !== void 0 && (V().editingCell = V().editingCell ? {
|
|
199
|
-
...V().editingCell,
|
|
200
|
-
value: e
|
|
201
|
-
} : V().editingCell), j(q)();
|
|
202
|
-
},
|
|
203
|
-
cancel: () => {
|
|
204
|
-
V().editingCell = null, V().gridRootEl?.focus({ preventScroll: !0 });
|
|
205
|
-
}
|
|
206
|
-
}));
|
|
207
|
-
s(i, () => j(n), () => j(e));
|
|
208
|
-
}
|
|
209
|
-
t(e, r);
|
|
210
|
-
}, _ = (e) => {
|
|
211
|
-
var n = me();
|
|
212
|
-
k(n, (e) => De?.(e)), l((e) => v(n, "aria-checked", e), [() => !!V().editingCell.value]), a("click", n, (e) => {
|
|
213
|
-
e.stopPropagation();
|
|
214
|
-
let t = !V().editingCell?.value;
|
|
215
|
-
V().editingCell = V().editingCell ? {
|
|
216
|
-
...V().editingCell,
|
|
217
|
-
value: t
|
|
218
|
-
} : V().editingCell, j(q)();
|
|
219
|
-
}), a("keydown", n, (e) => {
|
|
220
|
-
if (e.key === "Enter" || e.key === " ") {
|
|
221
|
-
j(Ee)(e, () => {
|
|
222
|
-
e.stopPropagation();
|
|
223
|
-
let t = !V().editingCell?.value;
|
|
224
|
-
V().editingCell = V().editingCell ? {
|
|
225
|
-
...V().editingCell,
|
|
226
|
-
value: t
|
|
227
|
-
} : V().editingCell, j(q)();
|
|
228
|
-
});
|
|
229
|
-
return;
|
|
230
|
-
}
|
|
231
|
-
j(Y)(e);
|
|
232
|
-
}), c("blur", n, () => j(q)()), t(e, n);
|
|
233
|
-
}, ee = (e) => {
|
|
234
|
-
let i = w(() => j(G)(o.column, o.row)), a = w(() => j(K)(o.column, o.row)), s = w(() => o.column.columnDef.editorMultiple === !0);
|
|
235
|
-
var c = x(), l = d(c), u = (e) => {
|
|
236
|
-
var r = x(), o = d(r);
|
|
237
|
-
{
|
|
238
|
-
let e = w(() => V().editingCell?.value);
|
|
239
|
-
n(o, () => j(U), (t, n) => {
|
|
240
|
-
n(t, {
|
|
241
|
-
get options() {
|
|
242
|
-
return j(i);
|
|
243
|
-
},
|
|
244
|
-
get loading() {
|
|
245
|
-
return j(a);
|
|
246
|
-
},
|
|
247
|
-
get value() {
|
|
248
|
-
return j(e);
|
|
249
|
-
},
|
|
250
|
-
get multiple() {
|
|
251
|
-
return j(s);
|
|
252
|
-
},
|
|
253
|
-
placeholder: "Select…",
|
|
254
|
-
onChange: (e) => {
|
|
255
|
-
V().editingCell = V().editingCell ? {
|
|
256
|
-
...V().editingCell,
|
|
257
|
-
value: e
|
|
258
|
-
} : V().editingCell;
|
|
259
|
-
},
|
|
260
|
-
onCommit: () => j(q)(),
|
|
261
|
-
onCancel: () => {
|
|
262
|
-
V().editingCell = null, V().gridRootEl?.focus({ preventScroll: !0 });
|
|
263
|
-
}
|
|
264
|
-
});
|
|
265
|
-
});
|
|
266
|
-
}
|
|
267
|
-
t(e, r);
|
|
268
|
-
};
|
|
269
|
-
r(l, (e) => {
|
|
270
|
-
j(U) && e(u);
|
|
271
|
-
}), t(e, c);
|
|
272
|
-
}, b = (e) => {
|
|
273
|
-
let t = w(() => j(G)(o.column, o.row)), n = w(() => j(K)(o.column, o.row)), r = w(() => o.column.columnDef.editorMultiple === !0), i = w(() => ie(V().editingCell?.value));
|
|
274
|
-
B(e, () => j(t), () => j(r), () => j(i), () => j(n));
|
|
275
|
-
}, C = (e) => {
|
|
276
|
-
let n = w(() => Math.max(0, Math.min(5, Math.round(Number(V().editingCell?.value) || 0)))), r = w(() => Math.min(5, Math.max(1, j(n))));
|
|
277
|
-
var i = ge(), o = f(i);
|
|
278
|
-
O(o, 16, () => [
|
|
279
|
-
1,
|
|
280
|
-
2,
|
|
281
|
-
3,
|
|
282
|
-
4,
|
|
283
|
-
5
|
|
284
|
-
], (e) => e, (e, i) => {
|
|
285
|
-
var o = he();
|
|
286
|
-
k(o, (e, t) => De?.(e, t), () => i === j(r)), l(() => {
|
|
287
|
-
v(o, "aria-checked", j(n) >= i), v(o, "aria-label", `${i} ${i === 1 ? "star" : "stars"}`), A(o, 1, `sv-grid-rating-star ${j(n) >= i ? "sv-grid-rating-star-on" : ""}`);
|
|
288
|
-
}), a("mousedown", o, (e) => e.preventDefault()), a("click", o, (e) => {
|
|
289
|
-
e.stopPropagation(), V().editingCell = V().editingCell ? {
|
|
290
|
-
...V().editingCell,
|
|
291
|
-
value: i
|
|
292
|
-
} : V().editingCell, j(q)();
|
|
293
|
-
}), a("keydown", o, (e) => {
|
|
294
|
-
let t = e.key;
|
|
295
|
-
if (t !== "ArrowLeft" && t !== "ArrowRight" && t !== "Home" && t !== "End") {
|
|
296
|
-
j(Y)(e);
|
|
297
|
-
return;
|
|
298
|
-
}
|
|
299
|
-
e.preventDefault(), e.stopPropagation();
|
|
300
|
-
let r = Math.min(5, Math.max(1, j(n))), i = t === "Home" ? 1 : t === "End" ? 5 : t === "ArrowLeft" ? Math.max(1, r - 1) : Math.min(5, r + 1);
|
|
301
|
-
V().editingCell = V().editingCell ? {
|
|
302
|
-
...V().editingCell,
|
|
303
|
-
value: i
|
|
304
|
-
} : V().editingCell, (e.currentTarget.parentElement?.querySelectorAll(".sv-grid-rating-star"))?.[i - 1]?.focus({ preventScroll: !0 });
|
|
305
|
-
}), t(e, o);
|
|
306
|
-
});
|
|
307
|
-
var s = p(o, 2);
|
|
308
|
-
T(i), a("mousedown", s, (e) => e.preventDefault()), a("click", s, (e) => {
|
|
309
|
-
e.stopPropagation(), V().editingCell = V().editingCell ? {
|
|
310
|
-
...V().editingCell,
|
|
311
|
-
value: 0
|
|
312
|
-
} : V().editingCell, j(q)();
|
|
313
|
-
}), t(e, i);
|
|
314
|
-
}, ne = (e) => {
|
|
315
|
-
let i = w(() => j(G)(o.column, o.row)), a = w(() => j(K)(o.column, o.row));
|
|
316
|
-
var s = x(), c = d(s), l = (e) => {
|
|
317
|
-
var r = x(), o = d(r);
|
|
318
|
-
{
|
|
319
|
-
let e = w(() => V().editingCell?.value);
|
|
320
|
-
n(o, () => j(U), (t, n) => {
|
|
321
|
-
n(t, {
|
|
322
|
-
get options() {
|
|
323
|
-
return j(i);
|
|
324
|
-
},
|
|
325
|
-
get loading() {
|
|
326
|
-
return j(a);
|
|
327
|
-
},
|
|
328
|
-
get value() {
|
|
329
|
-
return j(e);
|
|
330
|
-
},
|
|
331
|
-
multiple: !1,
|
|
332
|
-
placeholder: "Select…",
|
|
333
|
-
onChange: (e) => {
|
|
334
|
-
V().editingCell = V().editingCell ? {
|
|
335
|
-
...V().editingCell,
|
|
336
|
-
value: e
|
|
337
|
-
} : V().editingCell;
|
|
338
|
-
},
|
|
339
|
-
onCommit: () => j(q)(),
|
|
340
|
-
onCancel: () => {
|
|
341
|
-
V().editingCell = null, V().gridRootEl?.focus({ preventScroll: !0 });
|
|
342
|
-
}
|
|
343
|
-
});
|
|
344
|
-
});
|
|
345
|
-
}
|
|
346
|
-
t(e, r);
|
|
347
|
-
};
|
|
348
|
-
r(c, (e) => {
|
|
349
|
-
j(U) && e(l);
|
|
350
|
-
}), t(e, s);
|
|
351
|
-
}, E = (e) => {
|
|
352
|
-
let i = w(() => j(G)(o.column, o.row)), a = w(() => j(K)(o.column, o.row));
|
|
353
|
-
var s = x(), c = d(s), l = (e) => {
|
|
354
|
-
var r = x(), o = d(r);
|
|
355
|
-
{
|
|
356
|
-
let e = w(() => V().editingCell?.value);
|
|
357
|
-
n(o, () => j(U), (t, n) => {
|
|
358
|
-
n(t, {
|
|
359
|
-
get options() {
|
|
360
|
-
return j(i);
|
|
361
|
-
},
|
|
362
|
-
get loading() {
|
|
363
|
-
return j(a);
|
|
364
|
-
},
|
|
365
|
-
get value() {
|
|
366
|
-
return j(e);
|
|
367
|
-
},
|
|
368
|
-
multiple: !1,
|
|
369
|
-
searchable: !0,
|
|
370
|
-
placeholder: "Search…",
|
|
371
|
-
onChange: (e) => {
|
|
372
|
-
V().editingCell = V().editingCell ? {
|
|
373
|
-
...V().editingCell,
|
|
374
|
-
value: e
|
|
375
|
-
} : V().editingCell;
|
|
376
|
-
},
|
|
377
|
-
onCommit: () => j(q)(),
|
|
378
|
-
onCancel: () => {
|
|
379
|
-
V().editingCell = null, V().gridRootEl?.focus({ preventScroll: !0 });
|
|
380
|
-
}
|
|
381
|
-
});
|
|
382
|
-
});
|
|
383
|
-
}
|
|
384
|
-
t(e, r);
|
|
385
|
-
};
|
|
386
|
-
r(c, (e) => {
|
|
387
|
-
j(U) && e(l);
|
|
388
|
-
}), t(e, s);
|
|
389
|
-
}, D = (e) => {
|
|
390
|
-
var n = _e();
|
|
391
|
-
re(n), k(n, (e) => j(X)?.(e)), l((e) => {
|
|
392
|
-
v(n, "aria-label", j(Z)), y(n, e);
|
|
393
|
-
}, [() => String(V().editingCell?.value ?? "")]), a("pointerdown", n, (e) => e.stopPropagation()), a("input", n, (e) => j(J)(e.currentTarget.value)), a("keydown", n, (e) => {
|
|
394
|
-
if (e.stopPropagation(), e.key === "Escape") {
|
|
395
|
-
e.preventDefault(), V().editingCell = null, V().gridRootEl?.focus({ preventScroll: !0 });
|
|
396
|
-
return;
|
|
397
|
-
}
|
|
398
|
-
if (e.key === "Tab") {
|
|
399
|
-
e.preventDefault(), V().commitAndMoveByTab(e.shiftKey);
|
|
400
|
-
return;
|
|
401
|
-
}
|
|
402
|
-
e.key === "Enter" && (e.ctrlKey || e.metaKey) && (e.preventDefault(), j(q)(), V().gridRootEl?.focus({ preventScroll: !0 }));
|
|
403
|
-
}), c("blur", n, () => j(q)()), t(e, n);
|
|
404
|
-
}, M = (e) => {
|
|
405
|
-
let n = w(() => j(G)(o.column, o.row)), i = w(() => String(V().editingCell?.value ?? "")), s = w(() => j(i).trim() ? j(n).filter((e) => String(e.label).toLowerCase().includes(j(i).toLowerCase())) : j(n));
|
|
406
|
-
var u = be(), d = f(u);
|
|
407
|
-
g(d), k(d, (e) => j(X)?.(e));
|
|
408
|
-
var m = p(d, 2), h = (e) => {
|
|
409
|
-
var n = ye();
|
|
410
|
-
O(n, 21, () => j(s).slice(0, 50), (e) => e.value, (e, n) => {
|
|
411
|
-
var r = ve(), o = f(r, !0);
|
|
412
|
-
T(r), l((e) => {
|
|
413
|
-
v(r, "aria-selected", e), S(o, j(n).label);
|
|
414
|
-
}, [() => String(j(n).value) === j(i)]), a("mousedown", r, (e) => {
|
|
415
|
-
e.preventDefault(), V().editingCell = V().editingCell ? {
|
|
416
|
-
...V().editingCell,
|
|
417
|
-
value: j(n).value
|
|
418
|
-
} : V().editingCell, j(q)();
|
|
419
|
-
}), t(e, r);
|
|
420
|
-
}), T(n), t(e, n);
|
|
421
|
-
};
|
|
422
|
-
r(m, (e) => {
|
|
423
|
-
j(s).length > 0 && e(h);
|
|
424
|
-
}), T(u), l(() => y(d, j(i))), a("pointerdown", d, (e) => e.stopPropagation()), a("input", d, (e) => j(J)(e.currentTarget.value)), c("blur", d, () => j(q)()), a("keydown", d, function(...e) {
|
|
425
|
-
j(Y)?.apply(this, e);
|
|
426
|
-
}), t(e, u);
|
|
427
|
-
}, N = (e) => {
|
|
428
|
-
var i = x(), a = d(i), s = (e) => {
|
|
429
|
-
var r = x(), i = d(r);
|
|
430
|
-
{
|
|
431
|
-
let e = w(() => V().editingCell?.value), t = w(() => o.column.columnDef.editorFormatString ?? "yyyy-MM-dd");
|
|
432
|
-
n(i, () => j(W), (n, r) => {
|
|
433
|
-
r(n, {
|
|
434
|
-
get value() {
|
|
435
|
-
return j(e);
|
|
436
|
-
},
|
|
437
|
-
get formatString() {
|
|
438
|
-
return j(t);
|
|
439
|
-
},
|
|
440
|
-
dropDownDisplayMode: "calendar",
|
|
441
|
-
autoOpen: !0,
|
|
442
|
-
block: !0,
|
|
443
|
-
onChange: (e) => j(J)(e),
|
|
444
|
-
onCommit: () => j(q)(),
|
|
445
|
-
onCancel: () => {
|
|
446
|
-
V().editingCell = null, V().gridRootEl?.focus({ preventScroll: !0 });
|
|
447
|
-
}
|
|
448
|
-
});
|
|
449
|
-
});
|
|
450
|
-
}
|
|
451
|
-
t(e, r);
|
|
452
|
-
};
|
|
453
|
-
r(a, (e) => {
|
|
454
|
-
j(W) && e(s);
|
|
455
|
-
}), t(e, i);
|
|
456
|
-
}, P = (e) => {
|
|
457
|
-
var i = x(), a = d(i), s = (e) => {
|
|
458
|
-
var r = x(), i = d(r);
|
|
459
|
-
{
|
|
460
|
-
let e = w(() => V().editingCell?.value), t = w(() => o.column.columnDef.editorFormatString ?? "yyyy-MM-dd HH:mm");
|
|
461
|
-
n(i, () => j(W), (n, r) => {
|
|
462
|
-
r(n, {
|
|
463
|
-
get value() {
|
|
464
|
-
return j(e);
|
|
465
|
-
},
|
|
466
|
-
get formatString() {
|
|
467
|
-
return j(t);
|
|
468
|
-
},
|
|
469
|
-
dropDownDisplayMode: "both",
|
|
470
|
-
autoOpen: !0,
|
|
471
|
-
block: !0,
|
|
472
|
-
onChange: (e) => j(J)(e),
|
|
473
|
-
onCommit: () => j(q)(),
|
|
474
|
-
onCancel: () => {
|
|
475
|
-
V().editingCell = null, V().gridRootEl?.focus({ preventScroll: !0 });
|
|
476
|
-
}
|
|
477
|
-
});
|
|
478
|
-
});
|
|
479
|
-
}
|
|
480
|
-
t(e, r);
|
|
481
|
-
};
|
|
482
|
-
r(a, (e) => {
|
|
483
|
-
j(W) && e(s);
|
|
484
|
-
}), t(e, i);
|
|
485
|
-
}, F = (e) => {
|
|
486
|
-
var i = x(), a = d(i), o = (e) => {
|
|
487
|
-
var r = x(), i = d(r);
|
|
488
|
-
{
|
|
489
|
-
let e = w(() => de(V().editingCell?.value));
|
|
490
|
-
n(i, () => j(W), (t, n) => {
|
|
491
|
-
n(t, {
|
|
492
|
-
get value() {
|
|
493
|
-
return j(e);
|
|
494
|
-
},
|
|
495
|
-
formatString: "HH:mm",
|
|
496
|
-
dropDownDisplayMode: "time",
|
|
497
|
-
autoOpen: !0,
|
|
498
|
-
block: !0,
|
|
499
|
-
onChange: (e) => j(J)(ce(e)),
|
|
500
|
-
onCommit: () => j(q)(),
|
|
501
|
-
onCancel: () => {
|
|
502
|
-
V().editingCell = null, V().gridRootEl?.focus({ preventScroll: !0 });
|
|
503
|
-
}
|
|
504
|
-
});
|
|
505
|
-
});
|
|
506
|
-
}
|
|
507
|
-
t(e, r);
|
|
508
|
-
};
|
|
509
|
-
r(a, (e) => {
|
|
510
|
-
j(W) && e(o);
|
|
511
|
-
}), t(e, i);
|
|
512
|
-
}, I = (e) => {
|
|
513
|
-
var n = xe();
|
|
514
|
-
g(n), k(n, (e) => j(X)?.(e)), l((e, t) => {
|
|
515
|
-
A(n, 1, e), y(n, t);
|
|
516
|
-
}, [() => h(se("color")), () => le("color", V().editingCell?.value)]), a("input", n, (e) => j(J)(e.currentTarget.value)), a("change", n, (e) => {
|
|
517
|
-
j(J)(e.currentTarget.value), j(q)();
|
|
518
|
-
}), c("blur", n, () => j(q)()), a("keydown", n, function(...e) {
|
|
519
|
-
j(Y)?.apply(this, e);
|
|
520
|
-
}), t(e, n);
|
|
521
|
-
}, L = (e) => {
|
|
522
|
-
let i = w(() => je(String(V().editingCell?.editorType)));
|
|
523
|
-
var a = x(), o = d(a), s = (e) => {
|
|
524
|
-
let r = w(() => j(i).component);
|
|
525
|
-
var a = x(), o = d(a);
|
|
526
|
-
{
|
|
527
|
-
let e = w(() => pe(j(i), Me()));
|
|
528
|
-
n(o, () => j(r), (t, n) => {
|
|
529
|
-
n(t, te(() => j(e)));
|
|
530
|
-
});
|
|
531
|
-
}
|
|
532
|
-
t(e, a);
|
|
533
|
-
};
|
|
534
|
-
r(o, (e) => {
|
|
535
|
-
j(i) && e(s);
|
|
536
|
-
}), t(e, a);
|
|
537
|
-
}, R = w(() => fe(String(V().editingCell?.editorType ?? ""))), z = (e) => {
|
|
538
|
-
var n = Se();
|
|
539
|
-
re(n), k(n, (e) => j(X)?.(e)), l((e, t) => {
|
|
540
|
-
v(n, "aria-label", j(Z)), v(n, "rows", e), y(n, t);
|
|
541
|
-
}, [() => Math.max(1, String(V().editingCell?.value ?? "").split("\n").length), () => String(V().editingCell?.value ?? "")]), a("input", n, (e) => {
|
|
542
|
-
let t = e.currentTarget;
|
|
543
|
-
t.rows = Math.max(1, t.value.split("\n").length), j(J)(t.value);
|
|
544
|
-
}), c("blur", n, () => j(q)()), a("keydown", n, function(...e) {
|
|
545
|
-
j(Y)?.apply(this, e);
|
|
546
|
-
}), t(e, n);
|
|
547
|
-
}, H = (e) => {
|
|
548
|
-
let n = w(() => V().editingCell?.editorType ?? "text"), r = w(() => ae(j(n)) === "text" && oe(j(n)) === "number");
|
|
549
|
-
var i = Ce();
|
|
550
|
-
g(i), k(i, (e) => j(X)?.(e)), l((e, t, n) => {
|
|
551
|
-
v(i, "aria-label", j(Z)), A(i, 1, e), v(i, "type", t), v(i, "inputmode", j(r) ? "decimal" : void 0), y(i, n);
|
|
552
|
-
}, [
|
|
553
|
-
() => h(se(j(n))),
|
|
554
|
-
() => ae(j(n)),
|
|
555
|
-
() => le(j(n), V().editingCell?.value)
|
|
556
|
-
]), a("input", i, (e) => {
|
|
557
|
-
let t = e.currentTarget;
|
|
558
|
-
if (j(r) && !ue(t.value)) {
|
|
559
|
-
t.value = String(V().editingCell?.value ?? "");
|
|
560
|
-
return;
|
|
561
|
-
}
|
|
562
|
-
j(J)(t.value);
|
|
563
|
-
}), c("blur", i, () => j(q)()), a("keydown", i, function(...e) {
|
|
564
|
-
j(Y)?.apply(this, e);
|
|
565
|
-
}), t(e, i);
|
|
566
|
-
};
|
|
567
|
-
r(u, (e) => {
|
|
568
|
-
o.column.columnDef.cellEditor ? e(m) : V().editingCell?.editorType === "checkbox" ? e(_, 1) : V().editingCell?.editorType === "list" ? e(ee, 2) : V().editingCell?.editorType === "chips" ? e(b, 3) : V().editingCell?.editorType === "rating" ? e(C, 4) : V().editingCell?.editorType === "select" ? e(ne, 5) : V().editingCell?.editorType === "rich-select" ? e(E, 6) : V().editingCell?.editorType === "textarea" ? e(D, 7) : V().editingCell?.editorType === "autocomplete" ? e(M, 8) : V().editingCell?.editorType === "date" ? e(N, 9) : V().editingCell?.editorType === "datetime" ? e(P, 10) : V().editingCell?.editorType === "time" ? e(F, 11) : V().editingCell?.editorType === "color" ? e(I, 12) : j(R) ? e(L, 13) : (V().editingCell?.editorType ?? "text") === "text" && o.column?.columnDef.editorMultiline ? e(z, 14) : e(H, -1);
|
|
569
|
-
}), t(e, i);
|
|
570
|
-
};
|
|
571
|
-
r(Ne, (e) => {
|
|
572
|
-
H() ? e(Pe) : e(Fe, -1);
|
|
573
|
-
}), t(i, $), E();
|
|
574
|
-
}
|
|
575
|
-
i([
|
|
576
|
-
"mousedown",
|
|
577
|
-
"click",
|
|
578
|
-
"keydown",
|
|
579
|
-
"change",
|
|
580
|
-
"pointerdown",
|
|
581
|
-
"input"
|
|
582
|
-
]);
|
|
583
|
-
//#endregion
|
|
584
|
-
export { B as default };
|