@svgrid/grid-wc 3.0.23 → 3.0.25
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/GridFooter-La5NyTDN.js +145 -0
- package/dist/{GridMenus-Dq2xCN4N.js → GridMenus-4ksk1dnR.js} +491 -491
- package/dist/{shadow/PinSplitter-Qd1_-3pw.js → PinSplitter-vmU3zd_R.js} +44 -44
- package/dist/{shadow/SvChartMenu-CwWtjXsG.js → SvChartMenu-CgAcTloT.js} +116 -116
- package/dist/{shadow/SvDateRangeInput-EIQRPO_K.js → SvDateRangeInput-DHTz33L2.js} +77 -77
- package/dist/{SvDateTimePicker-IsJpZskc.js → SvDateTimePicker-DyRO_e91.js} +269 -269
- package/dist/{SvField-CpglDJLn.js → SvField-C--8r4go.js} +86 -86
- package/dist/{shadow/SvGridCellEditor-Bhdpvez8.js → SvGridCellEditor-6ZyGKeXd.js} +161 -161
- package/dist/{SvGridChart-DHptYODr.js → SvGridChart-B1Ro43s3.js} +750 -750
- package/dist/{shadow/SvGridChartBuilder-COttFU6T.js → SvGridChartBuilder-BGWhm8hq.js} +373 -373
- package/dist/{shadow/SvGridChartPanel-DGMs4B9p.js → SvGridChartPanel-t_UgLw4I.js} +579 -579
- package/dist/SvGridChartView-EbUF0BKk.js +45 -0
- package/dist/{shadow/SvGridDropdown-CfA5Jfe5.js → SvGridDropdown-CrECQYeq.js} +117 -117
- package/dist/chart/SvChartMenu-DslxOgPN.js +1 -1
- package/dist/chart/sv-chart-element.js +1 -1
- package/dist/{shadow/chart-export-pdf-C_iQ0kET.js → chart-export-pdf-BSDueOD-.js} +1 -1
- package/dist/{shadow/client-wYhMjrKG.js → client-DtIdusS4.js} +379 -376
- package/dist/{date-format-SCGd8EWh.js → date-format-B0RznzxC.js} +325 -325
- package/dist/{grid-extension.svelte-6IzZ_3Cv.js → grid-extension.svelte-BixlrIqc.js} +1 -1
- package/dist/shadow/GridFooter-d70CxdXM.js +145 -0
- package/dist/shadow/{GridMenus-BoD1TyJM.js → GridMenus-CpE2jjUR.js} +491 -491
- package/dist/{PinSplitter-Qd1_-3pw.js → shadow/PinSplitter-vmU3zd_R.js} +44 -44
- package/dist/{SvChartMenu-CwWtjXsG.js → shadow/SvChartMenu-CgAcTloT.js} +116 -116
- package/dist/{SvDateRangeInput-EIQRPO_K.js → shadow/SvDateRangeInput-DHTz33L2.js} +77 -77
- package/dist/shadow/{SvDateTimePicker-IsJpZskc.js → SvDateTimePicker-DyRO_e91.js} +269 -269
- package/dist/shadow/{SvField-CpglDJLn.js → SvField-C--8r4go.js} +86 -86
- package/dist/{SvGridCellEditor-Bhdpvez8.js → shadow/SvGridCellEditor-6ZyGKeXd.js} +161 -161
- package/dist/shadow/{SvGridChart-DHptYODr.js → SvGridChart-B1Ro43s3.js} +750 -750
- package/dist/{SvGridChartBuilder-COttFU6T.js → shadow/SvGridChartBuilder-BGWhm8hq.js} +373 -373
- package/dist/{SvGridChartPanel-DGMs4B9p.js → shadow/SvGridChartPanel-t_UgLw4I.js} +579 -579
- package/dist/shadow/SvGridChartView-EbUF0BKk.js +45 -0
- package/dist/{SvGridDropdown-CfA5Jfe5.js → shadow/SvGridDropdown-CrECQYeq.js} +117 -117
- package/dist/{chart-export-pdf-C_iQ0kET.js → shadow/chart-export-pdf-BSDueOD-.js} +1 -1
- package/dist/{client-wYhMjrKG.js → shadow/client-DtIdusS4.js} +379 -376
- package/dist/shadow/{date-format-SCGd8EWh.js → date-format-B0RznzxC.js} +325 -325
- package/dist/shadow/{grid-extension.svelte-6IzZ_3Cv.js → grid-extension.svelte-BixlrIqc.js} +1 -1
- package/dist/shadow/sv-grid-shadow-element.js +3469 -3459
- package/dist/shadow/{svelte-virtualizer.svelte-DTzTRxYp.js → svelte-virtualizer.svelte-u-y0InK2.js} +3 -3
- package/dist/sv-grid-element.js +3452 -3442
- package/dist/{svelte-virtualizer.svelte-DTzTRxYp.js → svelte-virtualizer.svelte-u-y0InK2.js} +3 -3
- package/package.json +3 -3
- package/dist/GridFooter-D1Mxru-f.js +0 -145
- package/dist/SvGridChartView-iQoET4TC.js +0 -45
- package/dist/shadow/GridFooter-BX1o5fzB.js +0 -145
- package/dist/shadow/SvGridChartView-iQoET4TC.js +0 -45
|
@@ -1,23 +1,23 @@
|
|
|
1
|
-
import { $ as e, A as t, C as n, D as r, I as i,
|
|
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 y, h as b, i as ee, it as x, j as S, k as C, n as w, nt as T, ot as E, p as te, q as ne, rt as D, st as O, w as k, x as A, y as j, z as M } from "./client-DtIdusS4.js";
|
|
2
2
|
import { C as re, d as ie, h as ae, m as oe, o as se, p as ce, v as le, x as ue } from "./SvGrid.helpers-tk7gWxcT.js";
|
|
3
3
|
import { n as de, r as fe, t as N } from "./editor-registry-DxGKqcvx.js";
|
|
4
4
|
//#region ../grid/dist/SvGridCellEditor.svelte
|
|
5
|
-
var P =
|
|
6
|
-
function V(i,
|
|
7
|
-
|
|
8
|
-
let V = (e, i =
|
|
9
|
-
var
|
|
10
|
-
var a =
|
|
11
|
-
var r =
|
|
5
|
+
var P = o("<span class=\"sv-grid-chip sv-grid-chip-removable\"> <button type=\"button\" class=\"sv-grid-chip-remove\">×</button></span>"), F = o("<button type=\"button\" class=\"sv-grid-chip-commit\" aria-label=\"Commit chip selection\">Done</button>"), I = 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>"), L = o("<input type=\"checkbox\" class=\"sv-grid-fr-editor sv-grid-fr-checkbox\"/>"), R = o("<option> </option>"), z = o("<select class=\"sv-grid-cell-editor sv-grid-fr-editor\"></select>"), B = o("<input class=\"sv-grid-cell-editor sv-grid-fr-editor\"/>"), pe = o("<button type=\"button\" class=\"sv-grid-checkbox\" role=\"checkbox\" aria-label=\"Edit checkbox value\"></button>"), me = o("<button type=\"button\" role=\"radio\">★</button>"), he = 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>"), ge = o("<textarea class=\"sv-grid-cell-editor sv-grid-cell-editor-textarea\" rows=\"4\"></textarea>"), _e = o("<button type=\"button\" class=\"sv-grid-autocomplete-option\" role=\"option\"> </button>"), ve = o("<div class=\"sv-grid-autocomplete-list\" role=\"listbox\"></div>"), ye = o("<div class=\"sv-grid-autocomplete\"><input class=\"sv-grid-cell-editor sv-grid-cell-editor-autocomplete\" type=\"text\"/> <!></div>"), be = o("<input type=\"color\"/>"), xe = o("<textarea class=\"sv-grid-cell-editor sv-grid-cell-editor-text sv-grid-cell-editor-multiline\"></textarea>"), Se = o("<input/>");
|
|
6
|
+
function V(i, o) {
|
|
7
|
+
x(o, !0);
|
|
8
|
+
let V = (e, i = O, o = O, s = O, u = O) => {
|
|
9
|
+
var m = S(), h = d(m), g = (e) => {
|
|
10
|
+
var a = S(), s = d(a), c = (e) => {
|
|
11
|
+
var r = S(), a = d(r);
|
|
12
12
|
{
|
|
13
|
-
let e =
|
|
13
|
+
let e = T(() => H().editingCell?.value);
|
|
14
14
|
n(a, () => M(W), (t, n) => {
|
|
15
15
|
n(t, {
|
|
16
16
|
get options() {
|
|
17
17
|
return i();
|
|
18
18
|
},
|
|
19
19
|
get loading() {
|
|
20
|
-
return
|
|
20
|
+
return u();
|
|
21
21
|
},
|
|
22
22
|
get value() {
|
|
23
23
|
return M(e);
|
|
@@ -45,61 +45,61 @@ function V(i, c) {
|
|
|
45
45
|
r(s, (e) => {
|
|
46
46
|
M(W) && e(c);
|
|
47
47
|
}), t(e, a);
|
|
48
|
-
},
|
|
48
|
+
}, _ = (e) => {
|
|
49
49
|
var n = I();
|
|
50
|
-
|
|
51
|
-
var i =
|
|
52
|
-
k(
|
|
53
|
-
var i = P(),
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
}, [() => String(M(n)), () => String(M(n))]),
|
|
57
|
-
let e =
|
|
50
|
+
v(n, "tabindex", -1);
|
|
51
|
+
var i = f(n), u = f(i);
|
|
52
|
+
k(u, 19, s, (e, t) => String(e) + "_" + t, (e, n, r) => {
|
|
53
|
+
var i = P(), c = f(i), u = p(c);
|
|
54
|
+
E(i), l((e, t) => {
|
|
55
|
+
C(c, `${e ?? ""} `), v(u, "aria-label", `Remove ${t ?? ""}`);
|
|
56
|
+
}, [() => String(M(n)), () => String(M(n))]), a("mousedown", u, (e) => e.preventDefault()), a("click", u, () => {
|
|
57
|
+
let e = s().filter((e, t) => t !== M(r));
|
|
58
58
|
H().editingCell = H().editingCell ? {
|
|
59
59
|
...H().editingCell,
|
|
60
60
|
value: o() ? e : e[0] ?? null
|
|
61
61
|
} : H().editingCell;
|
|
62
62
|
}), t(e, i);
|
|
63
63
|
});
|
|
64
|
-
var
|
|
65
|
-
A(
|
|
66
|
-
var
|
|
64
|
+
var d = p(u, 2);
|
|
65
|
+
A(d, (e) => M(Z)?.(e));
|
|
66
|
+
var m = p(d, 2), h = (e) => {
|
|
67
67
|
var n = F();
|
|
68
|
-
|
|
68
|
+
a("mousedown", n, (e) => e.preventDefault()), a("click", n, () => M(J)()), t(e, n);
|
|
69
69
|
};
|
|
70
|
-
r(
|
|
70
|
+
r(m, (e) => {
|
|
71
71
|
o() && e(h);
|
|
72
|
-
}),
|
|
72
|
+
}), E(i), E(n), l(() => v(d, "placeholder", o() ? "Type, Enter to add" : "Type a value")), a("keydown", d, (e) => {
|
|
73
73
|
if (e.key === "Enter" || o() && e.key === ",") {
|
|
74
74
|
e.preventDefault(), e.stopPropagation();
|
|
75
75
|
let t = e.currentTarget, n = t.value.trim();
|
|
76
76
|
if (n) {
|
|
77
|
-
let e = o() ? [...
|
|
77
|
+
let e = o() ? [...s(), n] : [n];
|
|
78
78
|
H().editingCell = H().editingCell ? {
|
|
79
79
|
...H().editingCell,
|
|
80
80
|
value: o() ? e : n
|
|
81
81
|
} : H().editingCell, t.value = "", o() || M(J)();
|
|
82
82
|
}
|
|
83
83
|
} else if (e.key === "Escape") M(X)(e);
|
|
84
|
-
else if (e.key === "Backspace" && e.currentTarget.value === "" &&
|
|
84
|
+
else if (e.key === "Backspace" && e.currentTarget.value === "" && s().length > 0) {
|
|
85
85
|
e.preventDefault();
|
|
86
|
-
let t =
|
|
86
|
+
let t = s().slice(0, -1);
|
|
87
87
|
H().editingCell = H().editingCell ? {
|
|
88
88
|
...H().editingCell,
|
|
89
89
|
value: o() ? t : t[0] ?? null
|
|
90
90
|
} : H().editingCell;
|
|
91
91
|
}
|
|
92
|
-
}),
|
|
92
|
+
}), c("blur", d, () => M(J)()), t(e, n);
|
|
93
93
|
};
|
|
94
|
-
r(
|
|
95
|
-
i().length > 0 ? e(g) : e(
|
|
96
|
-
}), t(e,
|
|
97
|
-
}, H =
|
|
98
|
-
|
|
99
|
-
let
|
|
100
|
-
(
|
|
94
|
+
r(h, (e) => {
|
|
95
|
+
i().length > 0 ? e(g) : e(_, -1);
|
|
96
|
+
}), t(e, m);
|
|
97
|
+
}, H = w(o, "ctrl", 7), U = w(o, "fullRow", 3, !1), W = _(null), G = _(null);
|
|
98
|
+
u(() => {
|
|
99
|
+
let t = H().editingCell?.editorType;
|
|
100
|
+
(t === "list" || t === "chips" || t === "select" || t === "rich-select") && !M(W) && import("./SvGridDropdown-CrECQYeq.js").then((t) => e(W, t.default, !0)), (t === "date" || t === "datetime" || t === "time") && !M(G) && import("./SvDateTimePicker-DyRO_e91.js").then((t) => e(G, t.default, !0));
|
|
101
101
|
});
|
|
102
|
-
let Ce =
|
|
102
|
+
let Ce = T(() => H().grid), we = T(() => H().fullRowEdit), K = T(() => H().getColumnEditorOptions), q = T(() => H().areEditorOptionsLoading), J = T(() => H().saveEditingCell), Y = T(() => H().updateEditingCellValue), X = T(() => H().onEditorKeyDown), Z = T(() => H().focusOnMount), Te = T(() => H().toggleCheckboxWithKeyboard);
|
|
103
103
|
function Ee(e, t = !0) {
|
|
104
104
|
t && e.focus({ preventScroll: !0 });
|
|
105
105
|
}
|
|
@@ -123,8 +123,8 @@ function V(i, c) {
|
|
|
123
123
|
value: e?.value,
|
|
124
124
|
rowId: e?.rowId ?? "",
|
|
125
125
|
columnId: e?.columnId ?? "",
|
|
126
|
-
columnDef:
|
|
127
|
-
row:
|
|
126
|
+
columnDef: o.column.columnDef,
|
|
127
|
+
row: o.row.original,
|
|
128
128
|
typed: e?.typed === !0,
|
|
129
129
|
grid: H(),
|
|
130
130
|
onChange: (e) => M(Y)(e),
|
|
@@ -146,45 +146,45 @@ function V(i, c) {
|
|
|
146
146
|
inCell: !0
|
|
147
147
|
};
|
|
148
148
|
}
|
|
149
|
-
var $ =
|
|
150
|
-
let n =
|
|
151
|
-
var
|
|
149
|
+
var $ = S(), Me = d($), Ne = (e) => {
|
|
150
|
+
let n = T(() => o.column.columnDef.editorType ?? "text"), i = T(() => M(we)?.draft[o.column.id]);
|
|
151
|
+
var s = S(), c = d(s), u = (e) => {
|
|
152
152
|
var n = L();
|
|
153
|
-
|
|
154
|
-
},
|
|
155
|
-
let n =
|
|
153
|
+
g(n), l((e) => te(n, e), [() => !!M(i)]), a("change", n, (e) => H().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 = T(() => M(K)(o.column, o.row));
|
|
156
156
|
var r = z();
|
|
157
157
|
k(r, 21, () => M(n), (e) => De(e), (e, n) => {
|
|
158
|
-
var r = R(), i =
|
|
159
|
-
|
|
160
|
-
var
|
|
161
|
-
|
|
162
|
-
|
|
158
|
+
var r = R(), i = f(r, !0);
|
|
159
|
+
E(r);
|
|
160
|
+
var a = {};
|
|
161
|
+
l((e, t) => {
|
|
162
|
+
C(i, e), a !== (a = t) && (r.value = (r.__value = t) ?? "");
|
|
163
163
|
}, [() => Oe(M(n)), () => De(M(n))]), t(e, r);
|
|
164
|
-
}),
|
|
165
|
-
var
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
}, [() => String(M(i) ?? "")]),
|
|
169
|
-
},
|
|
170
|
-
let r =
|
|
171
|
-
var
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
}, [() => String(M(i) ?? "")]),
|
|
164
|
+
}), E(r);
|
|
165
|
+
var s;
|
|
166
|
+
y(r), l((e) => {
|
|
167
|
+
s !== (s = e) && (r.value = (r.__value = e) ?? "", m(r, e));
|
|
168
|
+
}, [() => String(M(i) ?? "")]), a("change", r, (e) => H().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 = T(() => M(n) === "number" ? "number" : M(n) === "date" ? "date" : M(n) === "datetime" ? "datetime-local" : M(n) === "time" ? "time" : M(n) === "password" ? "password" : "text");
|
|
171
|
+
var s = B();
|
|
172
|
+
g(s), l((e) => {
|
|
173
|
+
v(s, "type", M(r)), b(s, e);
|
|
174
|
+
}, [() => String(M(i) ?? "")]), a("input", s, (e) => H().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
175
|
};
|
|
176
|
-
r(
|
|
177
|
-
M(n) === "checkbox" ? e(u) : M(n) === "list" || M(n) === "select" || M(n) === "rich-select" ? e(
|
|
178
|
-
}), t(e,
|
|
176
|
+
r(c, (e) => {
|
|
177
|
+
M(n) === "checkbox" ? e(u) : M(n) === "list" || M(n) === "select" || M(n) === "rich-select" ? e(p, 1) : e(h, -1);
|
|
178
|
+
}), t(e, s);
|
|
179
179
|
}, Pe = (e) => {
|
|
180
|
-
var i =
|
|
181
|
-
let n =
|
|
182
|
-
var r =
|
|
180
|
+
var i = S(), u = d(i), m = (e) => {
|
|
181
|
+
let n = T(() => o.column.columnDef.cellEditor);
|
|
182
|
+
var r = S(), i = d(r);
|
|
183
183
|
{
|
|
184
|
-
let e =
|
|
185
|
-
cell:
|
|
186
|
-
row:
|
|
187
|
-
column:
|
|
184
|
+
let e = T(() => ({
|
|
185
|
+
cell: o.row.getAllCells().find((e) => e.column.id === o.column.id),
|
|
186
|
+
row: o.row,
|
|
187
|
+
column: o.column,
|
|
188
188
|
table: M(Ce),
|
|
189
189
|
getValue: () => H().editingCell?.value,
|
|
190
190
|
value: H().editingCell?.value,
|
|
@@ -204,19 +204,19 @@ function V(i, c) {
|
|
|
204
204
|
H().editingCell = null, H().gridRootEl?.focus({ preventScroll: !0 });
|
|
205
205
|
}
|
|
206
206
|
}));
|
|
207
|
-
|
|
207
|
+
s(i, () => M(n), () => M(e));
|
|
208
208
|
}
|
|
209
209
|
t(e, r);
|
|
210
|
-
},
|
|
210
|
+
}, _ = (e) => {
|
|
211
211
|
var n = pe();
|
|
212
|
-
A(n, (e) => Ee?.(e)),
|
|
212
|
+
A(n, (e) => Ee?.(e)), l((e) => v(n, "aria-checked", e), [() => !!H().editingCell.value]), a("click", n, (e) => {
|
|
213
213
|
e.stopPropagation();
|
|
214
214
|
let t = !H().editingCell?.value;
|
|
215
215
|
H().editingCell = H().editingCell ? {
|
|
216
216
|
...H().editingCell,
|
|
217
217
|
value: t
|
|
218
218
|
} : H().editingCell, M(J)();
|
|
219
|
-
}),
|
|
219
|
+
}), a("keydown", n, (e) => {
|
|
220
220
|
if (e.key === "Enter" || e.key === " ") {
|
|
221
221
|
M(Te)(e, () => {
|
|
222
222
|
e.stopPropagation();
|
|
@@ -229,14 +229,14 @@ function V(i, c) {
|
|
|
229
229
|
return;
|
|
230
230
|
}
|
|
231
231
|
M(X)(e);
|
|
232
|
-
}),
|
|
233
|
-
},
|
|
234
|
-
let i =
|
|
235
|
-
var
|
|
236
|
-
var r =
|
|
232
|
+
}), c("blur", n, () => M(J)()), t(e, n);
|
|
233
|
+
}, y = (e) => {
|
|
234
|
+
let i = T(() => M(K)(o.column, o.row)), a = T(() => M(q)(o.column, o.row)), s = T(() => o.column.columnDef.editorMultiple === !0);
|
|
235
|
+
var c = S(), l = d(c), u = (e) => {
|
|
236
|
+
var r = S(), o = d(r);
|
|
237
237
|
{
|
|
238
|
-
let e =
|
|
239
|
-
n(
|
|
238
|
+
let e = T(() => H().editingCell?.value);
|
|
239
|
+
n(o, () => M(W), (t, n) => {
|
|
240
240
|
n(t, {
|
|
241
241
|
get options() {
|
|
242
242
|
return M(i);
|
|
@@ -248,7 +248,7 @@ function V(i, c) {
|
|
|
248
248
|
return M(e);
|
|
249
249
|
},
|
|
250
250
|
get multiple() {
|
|
251
|
-
return M(
|
|
251
|
+
return M(s);
|
|
252
252
|
},
|
|
253
253
|
placeholder: "Select…",
|
|
254
254
|
onChange: (e) => {
|
|
@@ -268,13 +268,13 @@ function V(i, c) {
|
|
|
268
268
|
};
|
|
269
269
|
r(l, (e) => {
|
|
270
270
|
M(W) && e(u);
|
|
271
|
-
}), t(e,
|
|
272
|
-
},
|
|
273
|
-
let t =
|
|
271
|
+
}), t(e, c);
|
|
272
|
+
}, x = (e) => {
|
|
273
|
+
let t = T(() => M(K)(o.column, o.row)), n = T(() => M(q)(o.column, o.row)), r = T(() => o.column.columnDef.editorMultiple === !0), i = T(() => re(H().editingCell?.value));
|
|
274
274
|
V(e, () => M(t), () => M(r), () => M(i), () => M(n));
|
|
275
|
-
},
|
|
276
|
-
let n =
|
|
277
|
-
var i = he(), o =
|
|
275
|
+
}, w = (e) => {
|
|
276
|
+
let n = T(() => Math.max(0, Math.min(5, Math.round(Number(H().editingCell?.value) || 0)))), r = T(() => Math.min(5, Math.max(1, M(n))));
|
|
277
|
+
var i = he(), o = f(i);
|
|
278
278
|
k(o, 16, () => [
|
|
279
279
|
1,
|
|
280
280
|
2,
|
|
@@ -282,15 +282,15 @@ function V(i, c) {
|
|
|
282
282
|
4,
|
|
283
283
|
5
|
|
284
284
|
], (e) => e, (e, i) => {
|
|
285
|
-
var
|
|
286
|
-
A(
|
|
287
|
-
|
|
288
|
-
}),
|
|
285
|
+
var o = me();
|
|
286
|
+
A(o, (e, t) => Ee?.(e, t), () => i === M(r)), l(() => {
|
|
287
|
+
v(o, "aria-checked", M(n) >= i), v(o, "aria-label", `${i} ${i === 1 ? "star" : "stars"}`), j(o, 1, `sv-grid-rating-star ${M(n) >= i ? "sv-grid-rating-star-on" : ""}`);
|
|
288
|
+
}), a("mousedown", o, (e) => e.preventDefault()), a("click", o, (e) => {
|
|
289
289
|
e.stopPropagation(), H().editingCell = H().editingCell ? {
|
|
290
290
|
...H().editingCell,
|
|
291
291
|
value: i
|
|
292
292
|
} : H().editingCell, M(J)();
|
|
293
|
-
}),
|
|
293
|
+
}), a("keydown", o, (e) => {
|
|
294
294
|
let t = e.key;
|
|
295
295
|
if (t !== "ArrowLeft" && t !== "ArrowRight" && t !== "Home" && t !== "End") {
|
|
296
296
|
M(X)(e);
|
|
@@ -302,21 +302,21 @@ function V(i, c) {
|
|
|
302
302
|
...H().editingCell,
|
|
303
303
|
value: i
|
|
304
304
|
} : H().editingCell, (e.currentTarget.parentElement?.querySelectorAll(".sv-grid-rating-star"))?.[i - 1]?.focus({ preventScroll: !0 });
|
|
305
|
-
}), t(e,
|
|
305
|
+
}), t(e, o);
|
|
306
306
|
});
|
|
307
|
-
var
|
|
308
|
-
|
|
307
|
+
var s = p(o, 2);
|
|
308
|
+
E(i), a("mousedown", s, (e) => e.preventDefault()), a("click", s, (e) => {
|
|
309
309
|
e.stopPropagation(), H().editingCell = H().editingCell ? {
|
|
310
310
|
...H().editingCell,
|
|
311
311
|
value: 0
|
|
312
312
|
} : H().editingCell, M(J)();
|
|
313
313
|
}), t(e, i);
|
|
314
|
-
},
|
|
315
|
-
let i =
|
|
316
|
-
var
|
|
317
|
-
var r =
|
|
314
|
+
}, te = (e) => {
|
|
315
|
+
let i = T(() => M(K)(o.column, o.row)), a = T(() => M(q)(o.column, o.row));
|
|
316
|
+
var s = S(), c = d(s), l = (e) => {
|
|
317
|
+
var r = S(), o = d(r);
|
|
318
318
|
{
|
|
319
|
-
let e =
|
|
319
|
+
let e = T(() => H().editingCell?.value);
|
|
320
320
|
n(o, () => M(W), (t, n) => {
|
|
321
321
|
n(t, {
|
|
322
322
|
get options() {
|
|
@@ -345,15 +345,15 @@ function V(i, c) {
|
|
|
345
345
|
}
|
|
346
346
|
t(e, r);
|
|
347
347
|
};
|
|
348
|
-
r(
|
|
348
|
+
r(c, (e) => {
|
|
349
349
|
M(W) && e(l);
|
|
350
|
-
}), t(e,
|
|
351
|
-
},
|
|
352
|
-
let i =
|
|
353
|
-
var
|
|
354
|
-
var r =
|
|
350
|
+
}), t(e, s);
|
|
351
|
+
}, D = (e) => {
|
|
352
|
+
let i = T(() => M(K)(o.column, o.row)), a = T(() => M(q)(o.column, o.row));
|
|
353
|
+
var s = S(), c = d(s), l = (e) => {
|
|
354
|
+
var r = S(), o = d(r);
|
|
355
355
|
{
|
|
356
|
-
let e =
|
|
356
|
+
let e = T(() => H().editingCell?.value);
|
|
357
357
|
n(o, () => M(W), (t, n) => {
|
|
358
358
|
n(t, {
|
|
359
359
|
get options() {
|
|
@@ -383,12 +383,12 @@ function V(i, c) {
|
|
|
383
383
|
}
|
|
384
384
|
t(e, r);
|
|
385
385
|
};
|
|
386
|
-
r(
|
|
386
|
+
r(c, (e) => {
|
|
387
387
|
M(W) && e(l);
|
|
388
|
-
}), t(e,
|
|
389
|
-
},
|
|
388
|
+
}), t(e, s);
|
|
389
|
+
}, O = (e) => {
|
|
390
390
|
var n = ge();
|
|
391
|
-
|
|
391
|
+
ne(n), A(n, (e) => M(Z)?.(e)), l((e) => b(n, e), [() => String(H().editingCell?.value ?? "")]), a("pointerdown", n, (e) => e.stopPropagation()), a("input", n, (e) => M(Y)(e.currentTarget.value)), a("keydown", n, (e) => {
|
|
392
392
|
if (e.stopPropagation(), e.key === "Escape") {
|
|
393
393
|
e.preventDefault(), H().editingCell = null, H().gridRootEl?.focus({ preventScroll: !0 });
|
|
394
394
|
return;
|
|
@@ -398,35 +398,35 @@ function V(i, c) {
|
|
|
398
398
|
return;
|
|
399
399
|
}
|
|
400
400
|
e.key === "Enter" && (e.ctrlKey || e.metaKey) && (e.preventDefault(), M(J)(), H().gridRootEl?.focus({ preventScroll: !0 }));
|
|
401
|
-
}),
|
|
401
|
+
}), c("blur", n, () => M(J)()), t(e, n);
|
|
402
402
|
}, N = (e) => {
|
|
403
|
-
let n =
|
|
404
|
-
var
|
|
405
|
-
|
|
406
|
-
var
|
|
403
|
+
let n = T(() => M(K)(o.column, o.row)), i = T(() => String(H().editingCell?.value ?? "")), s = T(() => M(i).trim() ? M(n).filter((e) => String(e.label).toLowerCase().includes(M(i).toLowerCase())) : M(n));
|
|
404
|
+
var u = ye(), d = f(u);
|
|
405
|
+
g(d), A(d, (e) => M(Z)?.(e));
|
|
406
|
+
var m = p(d, 2), h = (e) => {
|
|
407
407
|
var n = ve();
|
|
408
|
-
k(n, 21, () => M(
|
|
409
|
-
var r = _e(), o =
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
}, [() => String(M(n).value) === M(i)]),
|
|
408
|
+
k(n, 21, () => M(s).slice(0, 50), (e) => e.value, (e, n) => {
|
|
409
|
+
var r = _e(), o = f(r, !0);
|
|
410
|
+
E(r), l((e) => {
|
|
411
|
+
v(r, "aria-selected", e), C(o, M(n).label);
|
|
412
|
+
}, [() => String(M(n).value) === M(i)]), a("mousedown", r, (e) => {
|
|
413
413
|
e.preventDefault(), H().editingCell = H().editingCell ? {
|
|
414
414
|
...H().editingCell,
|
|
415
415
|
value: M(n).value
|
|
416
416
|
} : H().editingCell, M(J)();
|
|
417
417
|
}), t(e, r);
|
|
418
|
-
}),
|
|
418
|
+
}), E(n), t(e, n);
|
|
419
419
|
};
|
|
420
|
-
r(
|
|
421
|
-
M(
|
|
422
|
-
}),
|
|
420
|
+
r(m, (e) => {
|
|
421
|
+
M(s).length > 0 && e(h);
|
|
422
|
+
}), E(u), l(() => b(d, M(i))), a("pointerdown", d, (e) => e.stopPropagation()), a("input", d, (e) => M(Y)(e.currentTarget.value)), c("blur", d, () => M(J)()), a("keydown", d, function(...e) {
|
|
423
423
|
M(X)?.apply(this, e);
|
|
424
|
-
}), t(e,
|
|
424
|
+
}), t(e, u);
|
|
425
425
|
}, P = (e) => {
|
|
426
|
-
var i =
|
|
427
|
-
var r =
|
|
426
|
+
var i = S(), a = d(i), s = (e) => {
|
|
427
|
+
var r = S(), i = d(r);
|
|
428
428
|
{
|
|
429
|
-
let e =
|
|
429
|
+
let e = T(() => H().editingCell?.value), t = T(() => o.column.columnDef.editorFormatString ?? "yyyy-MM-dd");
|
|
430
430
|
n(i, () => M(G), (n, r) => {
|
|
431
431
|
r(n, {
|
|
432
432
|
get value() {
|
|
@@ -449,13 +449,13 @@ function V(i, c) {
|
|
|
449
449
|
t(e, r);
|
|
450
450
|
};
|
|
451
451
|
r(a, (e) => {
|
|
452
|
-
M(G) && e(
|
|
452
|
+
M(G) && e(s);
|
|
453
453
|
}), t(e, i);
|
|
454
454
|
}, F = (e) => {
|
|
455
|
-
var i =
|
|
456
|
-
var r =
|
|
455
|
+
var i = S(), a = d(i), s = (e) => {
|
|
456
|
+
var r = S(), i = d(r);
|
|
457
457
|
{
|
|
458
|
-
let e =
|
|
458
|
+
let e = T(() => H().editingCell?.value), t = T(() => o.column.columnDef.editorFormatString ?? "yyyy-MM-dd HH:mm");
|
|
459
459
|
n(i, () => M(G), (n, r) => {
|
|
460
460
|
r(n, {
|
|
461
461
|
get value() {
|
|
@@ -478,13 +478,13 @@ function V(i, c) {
|
|
|
478
478
|
t(e, r);
|
|
479
479
|
};
|
|
480
480
|
r(a, (e) => {
|
|
481
|
-
M(G) && e(
|
|
481
|
+
M(G) && e(s);
|
|
482
482
|
}), t(e, i);
|
|
483
483
|
}, I = (e) => {
|
|
484
|
-
var i =
|
|
485
|
-
var r =
|
|
484
|
+
var i = S(), a = d(i), o = (e) => {
|
|
485
|
+
var r = S(), i = d(r);
|
|
486
486
|
{
|
|
487
|
-
let e =
|
|
487
|
+
let e = T(() => ue(H().editingCell?.value));
|
|
488
488
|
n(i, () => M(G), (t, n) => {
|
|
489
489
|
n(t, {
|
|
490
490
|
get value() {
|
|
@@ -509,20 +509,20 @@ function V(i, c) {
|
|
|
509
509
|
}), t(e, i);
|
|
510
510
|
}, L = (e) => {
|
|
511
511
|
var n = be();
|
|
512
|
-
|
|
513
|
-
j(n, 1, e),
|
|
514
|
-
}, [() =>
|
|
512
|
+
g(n), A(n, (e) => M(Z)?.(e)), l((e, t) => {
|
|
513
|
+
j(n, 1, e), b(n, t);
|
|
514
|
+
}, [() => h(oe("color")), () => ce("color", H().editingCell?.value)]), a("input", n, (e) => M(Y)(e.currentTarget.value)), a("change", n, (e) => {
|
|
515
515
|
M(Y)(e.currentTarget.value), M(J)();
|
|
516
|
-
}),
|
|
516
|
+
}), c("blur", n, () => M(J)()), a("keydown", n, function(...e) {
|
|
517
517
|
M(X)?.apply(this, e);
|
|
518
518
|
}), t(e, n);
|
|
519
519
|
}, R = (e) => {
|
|
520
|
-
let i =
|
|
521
|
-
var a =
|
|
522
|
-
let r =
|
|
523
|
-
var a =
|
|
520
|
+
let i = T(() => Ae(String(H().editingCell?.editorType)));
|
|
521
|
+
var a = S(), o = d(a), s = (e) => {
|
|
522
|
+
let r = T(() => M(i).component);
|
|
523
|
+
var a = S(), o = d(a);
|
|
524
524
|
{
|
|
525
|
-
let e =
|
|
525
|
+
let e = T(() => fe(M(i), je()));
|
|
526
526
|
n(o, () => M(r), (t, n) => {
|
|
527
527
|
n(t, ee(() => M(e)));
|
|
528
528
|
});
|
|
@@ -532,43 +532,43 @@ function V(i, c) {
|
|
|
532
532
|
r(o, (e) => {
|
|
533
533
|
M(i) && e(s);
|
|
534
534
|
}), t(e, a);
|
|
535
|
-
}, z =
|
|
535
|
+
}, z = T(() => de(String(H().editingCell?.editorType ?? ""))), B = (e) => {
|
|
536
536
|
var n = xe();
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
}, [() => Math.max(1, String(H().editingCell?.value ?? "").split("\n").length), () => String(H().editingCell?.value ?? "")]),
|
|
537
|
+
ne(n), A(n, (e) => M(Z)?.(e)), l((e, t) => {
|
|
538
|
+
v(n, "rows", e), b(n, t);
|
|
539
|
+
}, [() => Math.max(1, String(H().editingCell?.value ?? "").split("\n").length), () => String(H().editingCell?.value ?? "")]), a("input", n, (e) => {
|
|
540
540
|
let t = e.currentTarget;
|
|
541
541
|
t.rows = Math.max(1, t.value.split("\n").length), M(Y)(t.value);
|
|
542
|
-
}),
|
|
542
|
+
}), c("blur", n, () => M(J)()), a("keydown", n, function(...e) {
|
|
543
543
|
M(X)?.apply(this, e);
|
|
544
544
|
}), t(e, n);
|
|
545
545
|
}, U = (e) => {
|
|
546
|
-
let n =
|
|
546
|
+
let n = T(() => H().editingCell?.editorType ?? "text"), r = T(() => ie(M(n)) === "text" && ae(M(n)) === "number");
|
|
547
547
|
var i = Se();
|
|
548
|
-
|
|
549
|
-
j(i, 1, e),
|
|
548
|
+
g(i), A(i, (e) => M(Z)?.(e)), l((e, t, n) => {
|
|
549
|
+
j(i, 1, e), v(i, "type", t), v(i, "inputmode", M(r) ? "decimal" : void 0), b(i, n);
|
|
550
550
|
}, [
|
|
551
|
-
() =>
|
|
551
|
+
() => h(oe(M(n))),
|
|
552
552
|
() => ie(M(n)),
|
|
553
553
|
() => ce(M(n), H().editingCell?.value)
|
|
554
|
-
]),
|
|
554
|
+
]), a("input", i, (e) => {
|
|
555
555
|
let t = e.currentTarget;
|
|
556
556
|
if (M(r) && !le(t.value)) {
|
|
557
557
|
t.value = String(H().editingCell?.value ?? "");
|
|
558
558
|
return;
|
|
559
559
|
}
|
|
560
560
|
M(Y)(t.value);
|
|
561
|
-
}),
|
|
561
|
+
}), c("blur", i, () => M(J)()), a("keydown", i, function(...e) {
|
|
562
562
|
M(X)?.apply(this, e);
|
|
563
563
|
}), t(e, i);
|
|
564
564
|
};
|
|
565
565
|
r(u, (e) => {
|
|
566
|
-
|
|
566
|
+
o.column.columnDef.cellEditor ? e(m) : H().editingCell?.editorType === "checkbox" ? e(_, 1) : H().editingCell?.editorType === "list" ? e(y, 2) : H().editingCell?.editorType === "chips" ? e(x, 3) : H().editingCell?.editorType === "rating" ? e(w, 4) : H().editingCell?.editorType === "select" ? e(te, 5) : H().editingCell?.editorType === "rich-select" ? e(D, 6) : H().editingCell?.editorType === "textarea" ? e(O, 7) : H().editingCell?.editorType === "autocomplete" ? e(N, 8) : H().editingCell?.editorType === "date" ? e(P, 9) : H().editingCell?.editorType === "datetime" ? e(F, 10) : H().editingCell?.editorType === "time" ? e(I, 11) : H().editingCell?.editorType === "color" ? e(L, 12) : M(z) ? e(R, 13) : (H().editingCell?.editorType ?? "text") === "text" && o.column?.columnDef.editorMultiline ? e(B, 14) : e(U, -1);
|
|
567
567
|
}), t(e, i);
|
|
568
568
|
};
|
|
569
569
|
r(Me, (e) => {
|
|
570
570
|
U() ? e(Ne) : e(Pe, -1);
|
|
571
|
-
}), t(i, $),
|
|
571
|
+
}), t(i, $), D();
|
|
572
572
|
}
|
|
573
573
|
i([
|
|
574
574
|
"mousedown",
|