@svgrid/grid-wc 2.6.1 → 2.7.0

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