@svgrid/grid-wc 3.0.8 → 3.0.10

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.
Files changed (52) hide show
  1. package/dist/GridMenus-BsOHO9kc.js +1086 -0
  2. package/dist/{SvChartMenu-DkSyLWYH.js → SvChartMenu-CwWtjXsG.js} +153 -153
  3. package/dist/{shadow/SvDateRangeInput-BrYTQEMM.js → SvDateRangeInput-DtKZ07aC.js} +88 -88
  4. package/dist/SvDateTimePicker-C37mOYov.js +766 -0
  5. package/dist/{SvField-Bmzp3ObZ.js → SvField-CpglDJLn.js} +107 -107
  6. package/dist/SvGridCellEditor-C2t-q8n3.js +560 -0
  7. package/dist/{SvGridChart-BSNYAW_W.js → SvGridChart-Bj2Pr2u9.js} +1522 -1522
  8. package/dist/{SvGridChartBuilder-DDl_Bv8k.js → SvGridChartBuilder-Dpw2X4pR.js} +418 -418
  9. package/dist/{shadow/SvGridChartPanel-DkIR-3rA.js → SvGridChartPanel-Ce78cR3g.js} +642 -642
  10. package/dist/{SvGridChartView-B4pqLWnm.js → SvGridChartView-CTfjtiXs.js} +11 -11
  11. package/dist/SvGridDropdown-CfA5Jfe5.js +257 -0
  12. package/dist/angular/fesm2022/svgrid-grid-wc-angular.mjs +4 -2
  13. package/dist/angular/fesm2022/svgrid-grid-wc-angular.mjs.map +1 -1
  14. package/dist/angular/types/svgrid-grid-wc-angular.d.ts +2 -1
  15. package/dist/{chart-export-pdf-hJVuR7_z.js → chart-export-pdf-Bc0Rz4kB.js} +1 -1
  16. package/dist/{shadow/client-DEF0GRjE.js → client-wYhMjrKG.js} +172 -161
  17. package/dist/{date-format-DMTwV8NC.js → date-format-SCGd8EWh.js} +363 -363
  18. package/dist/react/index.d.ts +2 -0
  19. package/dist/react/index.js +1 -1
  20. package/dist/shadow/GridMenus-BsOHO9kc.js +1086 -0
  21. package/dist/shadow/{SvChartMenu-DkSyLWYH.js → SvChartMenu-CwWtjXsG.js} +153 -153
  22. package/dist/{SvDateRangeInput-BrYTQEMM.js → shadow/SvDateRangeInput-DtKZ07aC.js} +88 -88
  23. package/dist/shadow/SvDateTimePicker-C37mOYov.js +766 -0
  24. package/dist/shadow/{SvField-Bmzp3ObZ.js → SvField-CpglDJLn.js} +107 -107
  25. package/dist/shadow/SvGridCellEditor-C2t-q8n3.js +560 -0
  26. package/dist/shadow/{SvGridChart-BSNYAW_W.js → SvGridChart-Bj2Pr2u9.js} +1522 -1522
  27. package/dist/shadow/{SvGridChartBuilder-DDl_Bv8k.js → SvGridChartBuilder-Dpw2X4pR.js} +418 -418
  28. package/dist/{SvGridChartPanel-DkIR-3rA.js → shadow/SvGridChartPanel-Ce78cR3g.js} +642 -642
  29. package/dist/shadow/{SvGridChartView-B4pqLWnm.js → SvGridChartView-CTfjtiXs.js} +11 -11
  30. package/dist/shadow/SvGridDropdown-CfA5Jfe5.js +257 -0
  31. package/dist/shadow/{chart-export-pdf-hJVuR7_z.js → chart-export-pdf-Bc0Rz4kB.js} +1 -1
  32. package/dist/{client-DEF0GRjE.js → shadow/client-wYhMjrKG.js} +172 -161
  33. package/dist/shadow/{date-format-DMTwV8NC.js → date-format-SCGd8EWh.js} +363 -363
  34. package/dist/shadow/sv-grid-shadow-element.d.ts +2 -0
  35. package/dist/shadow/sv-grid-shadow-element.js +4429 -3986
  36. package/dist/shadow/{svelte-virtualizer.svelte-CMX34S17.js → svelte-virtualizer.svelte-BGip4kwG.js} +106 -59
  37. package/dist/shadow/{validate-JAuMsk6Z.js → validate-43C03DLP.js} +1 -1
  38. package/dist/sv-grid-element.d.ts +2 -0
  39. package/dist/sv-grid-element.js +4414 -3971
  40. package/dist/{svelte-virtualizer.svelte-CMX34S17.js → svelte-virtualizer.svelte-BGip4kwG.js} +106 -59
  41. package/dist/{validate-JAuMsk6Z.js → validate-43C03DLP.js} +1 -1
  42. package/dist/vue/index.d.ts +2 -1
  43. package/dist/vue/index.js +1 -1
  44. package/package.json +3 -3
  45. package/dist/GridMenus-Nf04Zcl5.js +0 -1086
  46. package/dist/SvDateTimePicker-Czin1Ead.js +0 -766
  47. package/dist/SvGridCellEditor-BTbDEgpe.js +0 -560
  48. package/dist/SvGridDropdown-BwPpGwLz.js +0 -257
  49. package/dist/shadow/GridMenus-Nf04Zcl5.js +0 -1086
  50. package/dist/shadow/SvDateTimePicker-Czin1Ead.js +0 -766
  51. package/dist/shadow/SvGridCellEditor-BTbDEgpe.js +0 -560
  52. package/dist/shadow/SvGridDropdown-BwPpGwLz.js +0 -257
@@ -0,0 +1,560 @@
1
+ import { $ as e, A as t, C as n, D as r, I as i, J as a, K as o, L as s, M as c, O as l, Q as u, R as d, U as f, W as p, X as m, Y as h, _ as g, at as _, b as v, d as y, f as b, g as x, h as S, i as ee, j as C, k as w, n as T, nt as E, ot as D, p as te, rt as ne, tt as O, w as k, x as A, y as j, z as M } from "./client-wYhMjrKG.js";
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-zBkDTryR.js";
3
+ import { n as de, r as fe, t as pe } from "./editor-registry-DxGKqcvx.js";
4
+ //#region ../grid/dist/SvGridCellEditor.svelte
5
+ var N = c("<span class=\"sv-grid-chip sv-grid-chip-removable\"> <button type=\"button\" class=\"sv-grid-chip-remove\">×</button></span>"), P = c("<button type=\"button\" class=\"sv-grid-chip-commit\" aria-label=\"Commit chip selection\">Done</button>"), F = c("<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 = c("<input type=\"checkbox\" class=\"sv-grid-fr-editor sv-grid-fr-checkbox\"/>"), L = c("<option> </option>"), R = c("<select class=\"sv-grid-cell-editor sv-grid-fr-editor\"></select>"), z = c("<input class=\"sv-grid-cell-editor sv-grid-fr-editor\"/>"), me = c("<button type=\"button\" class=\"sv-grid-checkbox\" role=\"checkbox\" aria-label=\"Edit checkbox value\"></button>"), he = c("<button type=\"button\" role=\"radio\">★</button>"), ge = c("<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 = c("<textarea class=\"sv-grid-cell-editor sv-grid-cell-editor-textarea\" rows=\"4\"></textarea>"), ve = c("<button type=\"button\" class=\"sv-grid-autocomplete-option\" role=\"option\"> </button>"), ye = c("<div class=\"sv-grid-autocomplete-list\" role=\"listbox\"></div>"), be = c("<div class=\"sv-grid-autocomplete\"><input class=\"sv-grid-cell-editor sv-grid-cell-editor-autocomplete\" type=\"text\"/> <!></div>"), xe = c("<input type=\"color\"/>"), Se = c("<textarea class=\"sv-grid-cell-editor sv-grid-cell-editor-text sv-grid-cell-editor-multiline\"></textarea>"), Ce = c("<input/>");
6
+ function B(i, c) {
7
+ ne(c, !0);
8
+ let B = (e, i = D, o = D, c = D, l = D) => {
9
+ var u = C(), p = h(u), g = (e) => {
10
+ var a = C(), s = h(a), c = (e) => {
11
+ var r = C(), a = h(r);
12
+ {
13
+ let e = O(() => V().editingCell?.value);
14
+ n(a, () => M(U), (t, n) => {
15
+ n(t, {
16
+ get options() {
17
+ return i();
18
+ },
19
+ get loading() {
20
+ return l();
21
+ },
22
+ get value() {
23
+ return M(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: () => M(J)(),
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
+ M(U) && e(c);
47
+ }), t(e, a);
48
+ }, v = (e) => {
49
+ var n = F();
50
+ b(n, "tabindex", -1);
51
+ var i = a(n), l = a(i);
52
+ k(l, 19, c, (e, t) => String(e) + "_" + t, (e, n, r) => {
53
+ var i = N(), l = a(i), u = m(l);
54
+ _(i), f((e, t) => {
55
+ w(l, `${e ?? ""} `), b(u, "aria-label", `Remove ${t ?? ""}`);
56
+ }, [() => String(M(n)), () => String(M(n))]), s("mousedown", u, (e) => e.preventDefault()), s("click", u, () => {
57
+ let e = c().filter((e, t) => t !== M(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 u = m(l, 2);
65
+ A(u, (e) => M(Z)?.(e));
66
+ var p = m(u, 2), h = (e) => {
67
+ var n = P();
68
+ s("mousedown", n, (e) => e.preventDefault()), s("click", n, () => M(J)()), t(e, n);
69
+ };
70
+ r(p, (e) => {
71
+ o() && e(h);
72
+ }), _(i), _(n), f(() => b(u, "placeholder", o() ? "Type, Enter to add" : "Type a value")), s("keydown", u, (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() ? [...c(), n] : [n];
78
+ V().editingCell = V().editingCell ? {
79
+ ...V().editingCell,
80
+ value: o() ? e : n
81
+ } : V().editingCell, t.value = "", o() || M(J)();
82
+ }
83
+ } else if (e.key === "Escape") M(X)(e);
84
+ else if (e.key === "Backspace" && e.currentTarget.value === "" && c().length > 0) {
85
+ e.preventDefault();
86
+ let t = c().slice(0, -1);
87
+ V().editingCell = V().editingCell ? {
88
+ ...V().editingCell,
89
+ value: o() ? t : t[0] ?? null
90
+ } : V().editingCell;
91
+ }
92
+ }), d("blur", u, () => M(J)()), t(e, n);
93
+ };
94
+ r(p, (e) => {
95
+ i().length > 0 ? e(g) : e(v, -1);
96
+ }), t(e, u);
97
+ }, V = T(c, "ctrl", 7), H = T(c, "fullRow", 3, !1), U = e(null), W = e(null);
98
+ p(() => {
99
+ let e = V().editingCell?.editorType;
100
+ (e === "list" || e === "chips" || e === "select" || e === "rich-select") && !M(U) && import("./SvGridDropdown-CfA5Jfe5.js").then((e) => u(U, e.default, !0)), (e === "date" || e === "datetime" || e === "time") && !M(W) && import("./SvDateTimePicker-C37mOYov.js").then((e) => u(W, e.default, !0));
101
+ });
102
+ let we = O(() => V().grid), G = O(() => V().fullRowEdit), K = O(() => V().getColumnEditorOptions), q = O(() => V().areEditorOptionsLoading), J = O(() => V().saveEditingCell), Y = O(() => V().updateEditingCellValue), X = O(() => V().onEditorKeyDown), Z = O(() => V().focusOnMount), Te = O(() => V().toggleCheckboxWithKeyboard);
103
+ function Ee(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 De(e) {
110
+ return typeof e == "object" && e && "value" in e ? String(e.value) : String(e);
111
+ }
112
+ function Oe(e) {
113
+ return typeof e == "object" && e && "label" in e ? String(e.label) : String(e);
114
+ }
115
+ function ke() {
116
+ let e = V().editingCell;
117
+ return {
118
+ value: e?.value,
119
+ rowId: e?.rowId ?? "",
120
+ columnId: e?.columnId ?? "",
121
+ onChange: (e) => M(Y)(e),
122
+ onCommit: (e) => {
123
+ e !== void 0 && M(Y)(e), M(J)();
124
+ },
125
+ onCancel: () => {
126
+ V().editingCell = null, V().gridRootEl?.focus({ preventScroll: !0 });
127
+ },
128
+ onCommitAndMove: (e, t) => {
129
+ e !== void 0 && M(Y)(e), V().commitAndMoveByTab(t === -1);
130
+ },
131
+ onRequestClose: () => {
132
+ V().editingCell = null, V().gridRootEl?.focus({ preventScroll: !0 });
133
+ },
134
+ inCell: !0
135
+ };
136
+ }
137
+ var $ = C(), Ae = h($), je = (e) => {
138
+ let n = O(() => c.column.columnDef.editorType ?? "text"), i = O(() => M(G)?.draft[c.column.id]);
139
+ var o = C(), l = h(o), u = (e) => {
140
+ var n = I();
141
+ y(n), f((e) => te(n, e), [() => !!M(i)]), s("change", n, (e) => V().setFullRowDraft(c.column.id, e.currentTarget.checked)), s("keydown", n, Q), s("pointerdown", n, (e) => e.stopPropagation()), s("click", n, (e) => e.stopPropagation()), t(e, n);
142
+ }, d = (e) => {
143
+ let n = O(() => M(K)(c.column, c.row));
144
+ var r = R();
145
+ k(r, 21, () => M(n), (e) => De(e), (e, n) => {
146
+ var r = L(), i = a(r, !0);
147
+ _(r);
148
+ var o = {};
149
+ f((e, t) => {
150
+ w(i, e), o !== (o = t) && (r.value = (r.__value = t) ?? "");
151
+ }, [() => Oe(M(n)), () => De(M(n))]), t(e, r);
152
+ }), _(r);
153
+ var o;
154
+ x(r), f((e) => {
155
+ o !== (o = e) && (r.value = (r.__value = e) ?? "", g(r, e));
156
+ }, [() => String(M(i) ?? "")]), s("change", r, (e) => V().setFullRowDraft(c.column.id, e.currentTarget.value)), s("keydown", r, Q), s("pointerdown", r, (e) => e.stopPropagation()), s("click", r, (e) => e.stopPropagation()), t(e, r);
157
+ }, p = (e) => {
158
+ let r = O(() => M(n) === "number" ? "number" : M(n) === "date" ? "date" : M(n) === "datetime" ? "datetime-local" : M(n) === "time" ? "time" : M(n) === "password" ? "password" : "text");
159
+ var a = z();
160
+ y(a), f((e) => {
161
+ b(a, "type", M(r)), S(a, e);
162
+ }, [() => String(M(i) ?? "")]), s("input", a, (e) => V().setFullRowDraft(c.column.id, e.currentTarget.value)), s("keydown", a, Q), s("pointerdown", a, (e) => e.stopPropagation()), s("click", a, (e) => e.stopPropagation()), t(e, a);
163
+ };
164
+ r(l, (e) => {
165
+ M(n) === "checkbox" ? e(u) : M(n) === "list" || M(n) === "select" || M(n) === "rich-select" ? e(d, 1) : e(p, -1);
166
+ }), t(e, o);
167
+ }, Me = (e) => {
168
+ var i = C(), u = h(i), p = (e) => {
169
+ let n = O(() => c.column.columnDef.cellEditor);
170
+ var r = C(), i = h(r);
171
+ {
172
+ let e = O(() => ({
173
+ cell: c.row.getAllCells().find((e) => e.column.id === c.column.id),
174
+ row: c.row,
175
+ column: c.column,
176
+ table: M(we),
177
+ getValue: () => V().editingCell?.value,
178
+ value: V().editingCell?.value,
179
+ update: (e) => {
180
+ V().editingCell = V().editingCell ? {
181
+ ...V().editingCell,
182
+ value: e
183
+ } : V().editingCell;
184
+ },
185
+ commit: (e) => {
186
+ e !== void 0 && (V().editingCell = V().editingCell ? {
187
+ ...V().editingCell,
188
+ value: e
189
+ } : V().editingCell), M(J)();
190
+ },
191
+ cancel: () => {
192
+ V().editingCell = null, V().gridRootEl?.focus({ preventScroll: !0 });
193
+ }
194
+ }));
195
+ l(i, () => M(n), () => M(e));
196
+ }
197
+ t(e, r);
198
+ }, g = (e) => {
199
+ var n = me();
200
+ A(n, (e) => Ee?.(e)), f((e) => b(n, "aria-checked", e), [() => !!V().editingCell.value]), s("click", n, (e) => {
201
+ e.stopPropagation();
202
+ let t = !V().editingCell?.value;
203
+ V().editingCell = V().editingCell ? {
204
+ ...V().editingCell,
205
+ value: t
206
+ } : V().editingCell, M(J)();
207
+ }), s("keydown", n, (e) => {
208
+ if (e.key === "Enter" || e.key === " ") {
209
+ M(Te)(e, () => {
210
+ e.stopPropagation();
211
+ let t = !V().editingCell?.value;
212
+ V().editingCell = V().editingCell ? {
213
+ ...V().editingCell,
214
+ value: t
215
+ } : V().editingCell, M(J)();
216
+ });
217
+ return;
218
+ }
219
+ M(X)(e);
220
+ }), d("blur", n, () => M(J)()), t(e, n);
221
+ }, x = (e) => {
222
+ let i = O(() => M(K)(c.column, c.row)), a = O(() => M(q)(c.column, c.row)), o = O(() => c.column.columnDef.editorMultiple === !0);
223
+ var s = C(), l = h(s), u = (e) => {
224
+ var r = C(), s = h(r);
225
+ {
226
+ let e = O(() => V().editingCell?.value);
227
+ n(s, () => M(U), (t, n) => {
228
+ n(t, {
229
+ get options() {
230
+ return M(i);
231
+ },
232
+ get loading() {
233
+ return M(a);
234
+ },
235
+ get value() {
236
+ return M(e);
237
+ },
238
+ get multiple() {
239
+ return M(o);
240
+ },
241
+ placeholder: "Select…",
242
+ onChange: (e) => {
243
+ V().editingCell = V().editingCell ? {
244
+ ...V().editingCell,
245
+ value: e
246
+ } : V().editingCell;
247
+ },
248
+ onCommit: () => M(J)(),
249
+ onCancel: () => {
250
+ V().editingCell = null, V().gridRootEl?.focus({ preventScroll: !0 });
251
+ }
252
+ });
253
+ });
254
+ }
255
+ t(e, r);
256
+ };
257
+ r(l, (e) => {
258
+ M(U) && e(u);
259
+ }), t(e, s);
260
+ }, T = (e) => {
261
+ let t = O(() => M(K)(c.column, c.row)), n = O(() => M(q)(c.column, c.row)), r = O(() => c.column.columnDef.editorMultiple === !0), i = O(() => re(V().editingCell?.value));
262
+ B(e, () => M(t), () => M(r), () => M(i), () => M(n));
263
+ }, E = (e) => {
264
+ let n = O(() => Math.max(0, Math.min(5, Math.round(Number(V().editingCell?.value) || 0)))), r = O(() => Math.min(5, Math.max(1, M(n))));
265
+ var i = ge(), o = a(i);
266
+ k(o, 16, () => [
267
+ 1,
268
+ 2,
269
+ 3,
270
+ 4,
271
+ 5
272
+ ], (e) => e, (e, i) => {
273
+ var a = he();
274
+ A(a, (e, t) => Ee?.(e, t), () => i === M(r)), f(() => {
275
+ b(a, "aria-checked", M(n) >= i), b(a, "aria-label", `${i} ${i === 1 ? "star" : "stars"}`), j(a, 1, `sv-grid-rating-star ${M(n) >= i ? "sv-grid-rating-star-on" : ""}`);
276
+ }), s("mousedown", a, (e) => e.preventDefault()), s("click", a, (e) => {
277
+ e.stopPropagation(), V().editingCell = V().editingCell ? {
278
+ ...V().editingCell,
279
+ value: i
280
+ } : V().editingCell, M(J)();
281
+ }), s("keydown", a, (e) => {
282
+ let t = e.key;
283
+ if (t !== "ArrowLeft" && t !== "ArrowRight" && t !== "Home" && t !== "End") {
284
+ M(X)(e);
285
+ return;
286
+ }
287
+ e.preventDefault(), e.stopPropagation();
288
+ let r = Math.min(5, Math.max(1, M(n))), i = t === "Home" ? 1 : t === "End" ? 5 : t === "ArrowLeft" ? Math.max(1, r - 1) : Math.min(5, r + 1);
289
+ V().editingCell = V().editingCell ? {
290
+ ...V().editingCell,
291
+ value: i
292
+ } : V().editingCell, (e.currentTarget.parentElement?.querySelectorAll(".sv-grid-rating-star"))?.[i - 1]?.focus({ preventScroll: !0 });
293
+ }), t(e, a);
294
+ });
295
+ var c = m(o, 2);
296
+ _(i), s("mousedown", c, (e) => e.preventDefault()), s("click", c, (e) => {
297
+ e.stopPropagation(), V().editingCell = V().editingCell ? {
298
+ ...V().editingCell,
299
+ value: 0
300
+ } : V().editingCell, M(J)();
301
+ }), t(e, i);
302
+ }, D = (e) => {
303
+ let i = O(() => M(K)(c.column, c.row)), a = O(() => M(q)(c.column, c.row));
304
+ var o = C(), s = h(o), l = (e) => {
305
+ var r = C(), o = h(r);
306
+ {
307
+ let e = O(() => V().editingCell?.value);
308
+ n(o, () => M(U), (t, n) => {
309
+ n(t, {
310
+ get options() {
311
+ return M(i);
312
+ },
313
+ get loading() {
314
+ return M(a);
315
+ },
316
+ get value() {
317
+ return M(e);
318
+ },
319
+ multiple: !1,
320
+ placeholder: "Select…",
321
+ onChange: (e) => {
322
+ V().editingCell = V().editingCell ? {
323
+ ...V().editingCell,
324
+ value: e
325
+ } : V().editingCell;
326
+ },
327
+ onCommit: () => M(J)(),
328
+ onCancel: () => {
329
+ V().editingCell = null, V().gridRootEl?.focus({ preventScroll: !0 });
330
+ }
331
+ });
332
+ });
333
+ }
334
+ t(e, r);
335
+ };
336
+ r(s, (e) => {
337
+ M(U) && e(l);
338
+ }), t(e, o);
339
+ }, te = (e) => {
340
+ let i = O(() => M(K)(c.column, c.row)), a = O(() => M(q)(c.column, c.row));
341
+ var o = C(), s = h(o), l = (e) => {
342
+ var r = C(), o = h(r);
343
+ {
344
+ let e = O(() => V().editingCell?.value);
345
+ n(o, () => M(U), (t, n) => {
346
+ n(t, {
347
+ get options() {
348
+ return M(i);
349
+ },
350
+ get loading() {
351
+ return M(a);
352
+ },
353
+ get value() {
354
+ return M(e);
355
+ },
356
+ multiple: !1,
357
+ searchable: !0,
358
+ placeholder: "Search…",
359
+ onChange: (e) => {
360
+ V().editingCell = V().editingCell ? {
361
+ ...V().editingCell,
362
+ value: e
363
+ } : V().editingCell;
364
+ },
365
+ onCommit: () => M(J)(),
366
+ onCancel: () => {
367
+ V().editingCell = null, V().gridRootEl?.focus({ preventScroll: !0 });
368
+ }
369
+ });
370
+ });
371
+ }
372
+ t(e, r);
373
+ };
374
+ r(s, (e) => {
375
+ M(U) && e(l);
376
+ }), t(e, o);
377
+ }, ne = (e) => {
378
+ var n = _e();
379
+ o(n), A(n, (e) => M(Z)?.(e)), f((e) => S(n, e), [() => String(V().editingCell?.value ?? "")]), s("pointerdown", n, (e) => e.stopPropagation()), s("input", n, (e) => M(Y)(e.currentTarget.value)), s("keydown", n, (e) => {
380
+ if (e.stopPropagation(), e.key === "Escape") {
381
+ e.preventDefault(), V().editingCell = null, V().gridRootEl?.focus({ preventScroll: !0 });
382
+ return;
383
+ }
384
+ if (e.key === "Tab") {
385
+ e.preventDefault(), V().commitAndMoveByTab(e.shiftKey);
386
+ return;
387
+ }
388
+ e.key === "Enter" && (e.ctrlKey || e.metaKey) && (e.preventDefault(), M(J)(), V().gridRootEl?.focus({ preventScroll: !0 }));
389
+ }), d("blur", n, () => M(J)()), t(e, n);
390
+ }, N = (e) => {
391
+ let n = O(() => M(K)(c.column, c.row)), i = O(() => String(V().editingCell?.value ?? "")), o = O(() => M(i).trim() ? M(n).filter((e) => String(e.label).toLowerCase().includes(M(i).toLowerCase())) : M(n));
392
+ var l = be(), u = a(l);
393
+ y(u), A(u, (e) => M(Z)?.(e));
394
+ var p = m(u, 2), h = (e) => {
395
+ var n = ye();
396
+ k(n, 21, () => M(o).slice(0, 50), (e) => e.value, (e, n) => {
397
+ var r = ve(), o = a(r, !0);
398
+ _(r), f((e) => {
399
+ b(r, "aria-selected", e), w(o, M(n).label);
400
+ }, [() => String(M(n).value) === M(i)]), s("mousedown", r, (e) => {
401
+ e.preventDefault(), V().editingCell = V().editingCell ? {
402
+ ...V().editingCell,
403
+ value: M(n).value
404
+ } : V().editingCell, M(J)();
405
+ }), t(e, r);
406
+ }), _(n), t(e, n);
407
+ };
408
+ r(p, (e) => {
409
+ M(o).length > 0 && e(h);
410
+ }), _(l), f(() => S(u, M(i))), s("pointerdown", u, (e) => e.stopPropagation()), s("input", u, (e) => M(Y)(e.currentTarget.value)), d("blur", u, () => M(J)()), s("keydown", u, function(...e) {
411
+ M(X)?.apply(this, e);
412
+ }), t(e, l);
413
+ }, P = (e) => {
414
+ var i = C(), a = h(i), o = (e) => {
415
+ var r = C(), i = h(r);
416
+ {
417
+ let e = O(() => V().editingCell?.value);
418
+ n(i, () => M(W), (t, n) => {
419
+ n(t, {
420
+ get value() {
421
+ return M(e);
422
+ },
423
+ formatString: "yyyy-MM-dd",
424
+ dropDownDisplayMode: "calendar",
425
+ autoOpen: !0,
426
+ block: !0,
427
+ onChange: (e) => M(Y)(e),
428
+ onCommit: () => M(J)(),
429
+ onCancel: () => {
430
+ V().editingCell = null, V().gridRootEl?.focus({ preventScroll: !0 });
431
+ }
432
+ });
433
+ });
434
+ }
435
+ t(e, r);
436
+ };
437
+ r(a, (e) => {
438
+ M(W) && e(o);
439
+ }), t(e, i);
440
+ }, F = (e) => {
441
+ var i = C(), a = h(i), o = (e) => {
442
+ var r = C(), i = h(r);
443
+ {
444
+ let e = O(() => V().editingCell?.value);
445
+ n(i, () => M(W), (t, n) => {
446
+ n(t, {
447
+ get value() {
448
+ return M(e);
449
+ },
450
+ formatString: "yyyy-MM-dd HH:mm",
451
+ dropDownDisplayMode: "both",
452
+ autoOpen: !0,
453
+ block: !0,
454
+ onChange: (e) => M(Y)(e),
455
+ onCommit: () => M(J)(),
456
+ onCancel: () => {
457
+ V().editingCell = null, V().gridRootEl?.focus({ preventScroll: !0 });
458
+ }
459
+ });
460
+ });
461
+ }
462
+ t(e, r);
463
+ };
464
+ r(a, (e) => {
465
+ M(W) && e(o);
466
+ }), t(e, i);
467
+ }, I = (e) => {
468
+ var i = C(), a = h(i), o = (e) => {
469
+ var r = C(), i = h(r);
470
+ {
471
+ let e = O(() => ue(V().editingCell?.value));
472
+ n(i, () => M(W), (t, n) => {
473
+ n(t, {
474
+ get value() {
475
+ return M(e);
476
+ },
477
+ formatString: "HH:mm",
478
+ dropDownDisplayMode: "time",
479
+ autoOpen: !0,
480
+ block: !0,
481
+ onChange: (e) => M(Y)(se(e)),
482
+ onCommit: () => M(J)(),
483
+ onCancel: () => {
484
+ V().editingCell = null, V().gridRootEl?.focus({ preventScroll: !0 });
485
+ }
486
+ });
487
+ });
488
+ }
489
+ t(e, r);
490
+ };
491
+ r(a, (e) => {
492
+ M(W) && e(o);
493
+ }), t(e, i);
494
+ }, L = (e) => {
495
+ var n = xe();
496
+ y(n), A(n, (e) => M(Z)?.(e)), f((e, t) => {
497
+ j(n, 1, e), S(n, t);
498
+ }, [() => v(oe("color")), () => ce("color", V().editingCell?.value)]), s("input", n, (e) => M(Y)(e.currentTarget.value)), s("change", n, (e) => {
499
+ M(Y)(e.currentTarget.value), M(J)();
500
+ }), d("blur", n, () => M(J)()), s("keydown", n, function(...e) {
501
+ M(X)?.apply(this, e);
502
+ }), t(e, n);
503
+ }, R = (e) => {
504
+ let r = O(() => pe(String(V().editingCell?.editorType))), i = O(() => M(r).component);
505
+ var a = C(), o = h(a);
506
+ {
507
+ let e = O(() => fe(M(r), ke()));
508
+ n(o, () => M(i), (t, n) => {
509
+ n(t, ee(() => M(e)));
510
+ });
511
+ }
512
+ t(e, a);
513
+ }, z = O(() => de(String(V().editingCell?.editorType ?? ""))), H = (e) => {
514
+ var n = Se();
515
+ o(n), A(n, (e) => M(Z)?.(e)), f((e, t) => {
516
+ b(n, "rows", e), S(n, t);
517
+ }, [() => Math.max(1, String(V().editingCell?.value ?? "").split("\n").length), () => String(V().editingCell?.value ?? "")]), s("input", n, (e) => {
518
+ let t = e.currentTarget;
519
+ t.rows = Math.max(1, t.value.split("\n").length), M(Y)(t.value);
520
+ }), d("blur", n, () => M(J)()), s("keydown", n, function(...e) {
521
+ M(X)?.apply(this, e);
522
+ }), t(e, n);
523
+ }, G = (e) => {
524
+ let n = O(() => V().editingCell?.editorType ?? "text"), r = O(() => ie(M(n)) === "text" && ae(M(n)) === "number");
525
+ var i = Ce();
526
+ y(i), A(i, (e) => M(Z)?.(e)), f((e, t, n) => {
527
+ j(i, 1, e), b(i, "type", t), b(i, "inputmode", M(r) ? "decimal" : void 0), S(i, n);
528
+ }, [
529
+ () => v(oe(M(n))),
530
+ () => ie(M(n)),
531
+ () => ce(M(n), V().editingCell?.value)
532
+ ]), s("input", i, (e) => {
533
+ let t = e.currentTarget;
534
+ if (M(r) && !le(t.value)) {
535
+ t.value = String(V().editingCell?.value ?? "");
536
+ return;
537
+ }
538
+ M(Y)(t.value);
539
+ }), d("blur", i, () => M(J)()), s("keydown", i, function(...e) {
540
+ M(X)?.apply(this, e);
541
+ }), t(e, i);
542
+ };
543
+ r(u, (e) => {
544
+ c.column.columnDef.cellEditor ? e(p) : V().editingCell?.editorType === "checkbox" ? e(g, 1) : V().editingCell?.editorType === "list" ? e(x, 2) : V().editingCell?.editorType === "chips" ? e(T, 3) : V().editingCell?.editorType === "rating" ? e(E, 4) : V().editingCell?.editorType === "select" ? e(D, 5) : V().editingCell?.editorType === "rich-select" ? e(te, 6) : V().editingCell?.editorType === "textarea" ? e(ne, 7) : V().editingCell?.editorType === "autocomplete" ? e(N, 8) : V().editingCell?.editorType === "date" ? e(P, 9) : V().editingCell?.editorType === "datetime" ? e(F, 10) : V().editingCell?.editorType === "time" ? e(I, 11) : V().editingCell?.editorType === "color" ? e(L, 12) : M(z) ? e(R, 13) : (V().editingCell?.editorType ?? "text") === "text" && c.column?.columnDef.editorMultiline ? e(H, 14) : e(G, -1);
545
+ }), t(e, i);
546
+ };
547
+ r(Ae, (e) => {
548
+ H() ? e(je) : e(Me, -1);
549
+ }), t(i, $), E();
550
+ }
551
+ i([
552
+ "mousedown",
553
+ "click",
554
+ "keydown",
555
+ "change",
556
+ "pointerdown",
557
+ "input"
558
+ ]);
559
+ //#endregion
560
+ export { B as default };