@svgrid/grid-wc 2.7.0 → 3.0.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 (27) hide show
  1. package/dist/GridMenus-DpmS1pzo.js +1121 -0
  2. package/dist/SvDateRangeInput-u4ibte8S.js +196 -0
  3. package/dist/SvDateTimePicker-DVFiDxUq.js +765 -0
  4. package/dist/{dismissable-Nx79OIVg.js → SvField-ChCI-O2O.js} +9 -49
  5. package/dist/{SvGrid.helpers-BZPDBcza.js → SvGrid.helpers-BdVDtjUm.js} +24 -14
  6. package/dist/SvGridCellEditor-DvsQyE9a.js +550 -0
  7. package/dist/date-format-CPHqTHN6.js +1127 -0
  8. package/dist/dismissable-DvhBKm3q.js +41 -0
  9. package/dist/{row-drag-touch-Ddaa-QeB.js → row-drag-touch-CycRR65n.js} +12 -10
  10. package/dist/shadow/GridMenus-DpmS1pzo.js +1121 -0
  11. package/dist/shadow/SvDateRangeInput-u4ibte8S.js +196 -0
  12. package/dist/shadow/SvDateTimePicker-DVFiDxUq.js +765 -0
  13. package/dist/shadow/{dismissable-Nx79OIVg.js → SvField-ChCI-O2O.js} +9 -49
  14. package/dist/shadow/{SvGrid.helpers-BZPDBcza.js → SvGrid.helpers-BdVDtjUm.js} +24 -14
  15. package/dist/shadow/SvGridCellEditor-DvsQyE9a.js +550 -0
  16. package/dist/shadow/date-format-CPHqTHN6.js +1127 -0
  17. package/dist/shadow/dismissable-DvhBKm3q.js +41 -0
  18. package/dist/shadow/{row-drag-touch-Ddaa-QeB.js → row-drag-touch-CycRR65n.js} +12 -10
  19. package/dist/shadow/sv-grid-shadow-element.js +2718 -2610
  20. package/dist/sv-grid-element.js +2716 -2608
  21. package/package.json +3 -3
  22. package/dist/GridMenus-DE0zNY_3.js +0 -1022
  23. package/dist/SvDateTimePicker-BpeEupA2.js +0 -1885
  24. package/dist/SvGridCellEditor-_rqEaig7.js +0 -531
  25. package/dist/shadow/GridMenus-DE0zNY_3.js +0 -1022
  26. package/dist/shadow/SvDateTimePicker-BpeEupA2.js +0 -1885
  27. package/dist/shadow/SvGridCellEditor-_rqEaig7.js +0 -531
@@ -0,0 +1,550 @@
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 ne, q as D, rt as O, tt as k, w as A, x as j, y as M } from "./client-DjwUji8D.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-BdVDtjUm.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 = w("<span class=\"sv-grid-chip sv-grid-chip-removable\"> <button type=\"button\" class=\"sv-grid-chip-remove\">×</button></span>"), P = w("<button type=\"button\" class=\"sv-grid-chip-commit\" aria-label=\"Commit chip selection\">Done</button>"), F = 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>"), I = w("<input type=\"checkbox\" class=\"sv-grid-fr-editor sv-grid-fr-checkbox\"/>"), L = w("<option> </option>"), R = w("<select class=\"sv-grid-cell-editor sv-grid-fr-editor\"></select>"), z = w("<input class=\"sv-grid-cell-editor sv-grid-fr-editor\"/>"), me = w("<button type=\"button\" class=\"sv-grid-checkbox\" role=\"checkbox\" aria-label=\"Edit checkbox value\"></button>"), he = w("<button type=\"button\" role=\"radio\">★</button>"), ge = 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>"), _e = w("<textarea class=\"sv-grid-cell-editor sv-grid-cell-editor-textarea\" rows=\"4\"></textarea>"), ve = w("<button type=\"button\" class=\"sv-grid-autocomplete-option\" role=\"option\"> </button>"), ye = w("<div class=\"sv-grid-autocomplete-list\" role=\"listbox\"></div>"), be = w("<div class=\"sv-grid-autocomplete\"><input class=\"sv-grid-cell-editor sv-grid-cell-editor-autocomplete\" type=\"text\"/> <!></div>"), xe = w("<input type=\"color\"/>"), Se = w("<input/>");
6
+ function B(a, w) {
7
+ k(w, !0);
8
+ let B = (r, a = C, o = C, m = C, h = C) => {
9
+ var g = t(), _ = D(g), v = (r) => {
10
+ var s = t(), c = D(s), l = (r) => {
11
+ var i = t(), s = D(i);
12
+ {
13
+ let t = e(() => V().editingCell?.value);
14
+ n(s, () => f(U), (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
+ V().editingCell = V().editingCell ? {
32
+ ...V().editingCell,
33
+ value: e
34
+ } : V().editingCell;
35
+ },
36
+ onCommit: () => f(q)(),
37
+ onCancel: () => {
38
+ V().editingCell = null, V().gridRootEl?.focus({ preventScroll: !0 });
39
+ }
40
+ });
41
+ });
42
+ }
43
+ T(r, i);
44
+ };
45
+ i(c, (e) => {
46
+ f(U) && e(l);
47
+ }), T(r, s);
48
+ }, y = (e) => {
49
+ var t = F();
50
+ b(t, "tabindex", -1);
51
+ var n = l(t), r = l(n);
52
+ A(r, 19, m, (e, t) => String(e) + "_" + t, (e, t, n) => {
53
+ var r = N(), i = l(r), a = c(i);
54
+ O(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
+ V().editingCell = V().editingCell ? {
59
+ ...V().editingCell,
60
+ value: o() ? e : e[0] ?? null
61
+ } : V().editingCell;
62
+ }), T(e, r);
63
+ });
64
+ var a = c(r, 2);
65
+ j(a, (e) => f(X)?.(e));
66
+ var h = c(a, 2), g = (e) => {
67
+ var t = P();
68
+ s("mousedown", t, (e) => e.preventDefault()), s("click", t, () => f(q)()), T(e, t);
69
+ };
70
+ i(h, (e) => {
71
+ o() && e(g);
72
+ }), O(n), O(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
+ V().editingCell = V().editingCell ? {
79
+ ...V().editingCell,
80
+ value: o() ? e : n
81
+ } : V().editingCell, t.value = "", o() || f(q)();
82
+ }
83
+ } else if (e.key === "Escape") f(Y)(e);
84
+ else if (e.key === "Backspace" && e.currentTarget.value === "" && m().length > 0) {
85
+ e.preventDefault();
86
+ let t = m().slice(0, -1);
87
+ V().editingCell = V().editingCell ? {
88
+ ...V().editingCell,
89
+ value: o() ? t : t[0] ?? null
90
+ } : V().editingCell;
91
+ }
92
+ }), u("blur", a, () => f(q)()), T(e, t);
93
+ };
94
+ i(_, (e) => {
95
+ a().length > 0 ? e(v) : e(y, -1);
96
+ }), T(r, g);
97
+ }, V = E(w, "ctrl", 7), H = E(w, "fullRow", 3, !1), U = g(null), W = g(null);
98
+ o(() => {
99
+ let e = V().editingCell?.editorType;
100
+ (e === "list" || e === "chips" || e === "select" || e === "rich-select") && !f(U) && import("./SvGridDropdown-DnAESFDu.js").then((e) => h(U, e.default, !0)), (e === "date" || e === "datetime" || e === "time") && !f(W) && import("./SvDateTimePicker-DVFiDxUq.js").then((e) => h(W, e.default, !0));
101
+ });
102
+ let Ce = e(() => V().grid), we = e(() => V().fullRowEdit), G = e(() => V().getColumnEditorOptions), K = e(() => V().areEditorOptionsLoading), q = e(() => V().saveEditingCell), J = e(() => V().updateEditingCellValue), Y = e(() => V().onEditorKeyDown), X = e(() => V().focusOnMount), Te = e(() => V().toggleCheckboxWithKeyboard);
103
+ function Z(e, t = !0) {
104
+ t && requestAnimationFrame(() => 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 Ee(e) {
110
+ return typeof e == "object" && e && "value" in e ? String(e.value) : String(e);
111
+ }
112
+ function De(e) {
113
+ return typeof e == "object" && e && "label" in e ? String(e.label) : String(e);
114
+ }
115
+ function Oe() {
116
+ let e = V().editingCell;
117
+ return {
118
+ value: e?.value,
119
+ rowId: e?.rowId ?? "",
120
+ columnId: e?.columnId ?? "",
121
+ onChange: (e) => f(J)(e),
122
+ onCommit: (e) => {
123
+ e !== void 0 && f(J)(e), f(q)();
124
+ },
125
+ onCancel: () => {
126
+ V().editingCell = null, V().gridRootEl?.focus({ preventScroll: !0 });
127
+ },
128
+ onCommitAndMove: (e, t) => {
129
+ e !== void 0 && f(J)(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 $ = t(), ke = D($), Ae = (n) => {
138
+ let r = e(() => w.column.columnDef.editorType ?? "text"), a = e(() => f(we)?.draft[w.column.id]);
139
+ var o = t(), c = D(o), u = (e) => {
140
+ var t = I();
141
+ y(t), p((e) => ne(t, e), [() => !!f(a)]), s("change", t, (e) => V().setFullRowDraft(w.column.id, e.currentTarget.checked)), s("keydown", t, Q), s("pointerdown", t, (e) => e.stopPropagation()), s("click", t, (e) => e.stopPropagation()), T(e, t);
142
+ }, m = (t) => {
143
+ let n = e(() => f(G)(w.column, w.row));
144
+ var r = R();
145
+ A(r, 21, () => f(n), (e) => Ee(e), (e, t) => {
146
+ var n = L(), r = l(n, !0);
147
+ O(n);
148
+ var i = {};
149
+ p((e, t) => {
150
+ d(r, e), i !== (i = t) && (n.value = (n.__value = t) ?? "");
151
+ }, [() => De(f(t)), () => Ee(f(t))]), T(e, n);
152
+ }), O(r);
153
+ var i;
154
+ x(r), p((e) => {
155
+ i !== (i = e) && (r.value = (r.__value = e) ?? "", _(r, e));
156
+ }, [() => String(f(a) ?? "")]), s("change", r, (e) => V().setFullRowDraft(w.column.id, e.currentTarget.value)), s("keydown", r, Q), s("pointerdown", r, (e) => e.stopPropagation()), s("click", r, (e) => e.stopPropagation()), T(t, r);
157
+ }, h = (t) => {
158
+ 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");
159
+ var i = z();
160
+ y(i), p((e) => {
161
+ b(i, "type", f(n)), S(i, e);
162
+ }, [() => String(f(a) ?? "")]), s("input", i, (e) => V().setFullRowDraft(w.column.id, e.currentTarget.value)), s("keydown", i, Q), s("pointerdown", i, (e) => e.stopPropagation()), s("click", i, (e) => e.stopPropagation()), T(t, i);
163
+ };
164
+ i(c, (e) => {
165
+ f(r) === "checkbox" ? e(u) : f(r) === "list" || f(r) === "select" || f(r) === "rich-select" ? e(m, 1) : e(h, -1);
166
+ }), T(n, o);
167
+ }, je = (a) => {
168
+ var o = t(), h = D(o), g = (n) => {
169
+ let i = e(() => w.column.columnDef.cellEditor);
170
+ var a = t(), o = D(a);
171
+ {
172
+ let t = e(() => ({
173
+ cell: w.row.getAllCells().find((e) => e.column.id === w.column.id),
174
+ row: w.row,
175
+ column: w.column,
176
+ table: f(Ce),
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), f(q)();
190
+ },
191
+ cancel: () => {
192
+ V().editingCell = null, V().gridRootEl?.focus({ preventScroll: !0 });
193
+ }
194
+ }));
195
+ r(o, () => f(i), () => f(t));
196
+ }
197
+ T(n, a);
198
+ }, _ = (e) => {
199
+ var t = me();
200
+ j(t, (e) => Z?.(e)), p((e) => b(t, "aria-checked", e), [() => !!V().editingCell.value]), s("click", t, (e) => {
201
+ e.stopPropagation();
202
+ let t = !V().editingCell?.value;
203
+ V().editingCell = V().editingCell ? {
204
+ ...V().editingCell,
205
+ value: t
206
+ } : V().editingCell, f(q)();
207
+ }), s("keydown", t, (e) => {
208
+ if (e.key === "Enter" || e.key === " ") {
209
+ f(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, f(q)();
216
+ });
217
+ return;
218
+ }
219
+ f(Y)(e);
220
+ }), u("blur", t, () => f(q)()), T(e, t);
221
+ }, ee = (r) => {
222
+ let a = e(() => f(G)(w.column, w.row)), o = e(() => f(K)(w.column, w.row)), s = e(() => w.column.columnDef.editorMultiple === !0);
223
+ var c = t(), l = D(c), u = (r) => {
224
+ var i = t(), c = D(i);
225
+ {
226
+ let t = e(() => V().editingCell?.value);
227
+ n(c, () => f(U), (e, n) => {
228
+ n(e, {
229
+ get options() {
230
+ return f(a);
231
+ },
232
+ get loading() {
233
+ return f(o);
234
+ },
235
+ get value() {
236
+ return f(t);
237
+ },
238
+ get multiple() {
239
+ return f(s);
240
+ },
241
+ placeholder: "Select…",
242
+ onChange: (e) => {
243
+ V().editingCell = V().editingCell ? {
244
+ ...V().editingCell,
245
+ value: e
246
+ } : V().editingCell;
247
+ },
248
+ onCommit: () => f(q)(),
249
+ onCancel: () => {
250
+ V().editingCell = null, V().gridRootEl?.focus({ preventScroll: !0 });
251
+ }
252
+ });
253
+ });
254
+ }
255
+ T(r, i);
256
+ };
257
+ i(l, (e) => {
258
+ f(U) && e(u);
259
+ }), T(r, c);
260
+ }, x = (t) => {
261
+ let n = e(() => f(G)(w.column, w.row)), r = e(() => f(K)(w.column, w.row)), i = e(() => w.column.columnDef.editorMultiple === !0), a = e(() => re(V().editingCell?.value));
262
+ B(t, () => f(n), () => f(i), () => f(a), () => f(r));
263
+ }, C = (t) => {
264
+ let n = e(() => Math.max(0, Math.min(5, Math.round(Number(V().editingCell?.value) || 0)))), r = e(() => Math.min(5, Math.max(1, f(n))));
265
+ var i = ge(), a = l(i);
266
+ A(a, 16, () => [
267
+ 1,
268
+ 2,
269
+ 3,
270
+ 4,
271
+ 5
272
+ ], (e) => e, (e, t) => {
273
+ var i = he();
274
+ j(i, (e, t) => Z?.(e, t), () => t === f(r)), p(() => {
275
+ b(i, "aria-checked", f(n) >= t), b(i, "aria-label", `${t} ${t === 1 ? "star" : "stars"}`), M(i, 1, `sv-grid-rating-star ${f(n) >= t ? "sv-grid-rating-star-on" : ""}`);
276
+ }), s("mousedown", i, (e) => e.preventDefault()), s("click", i, (e) => {
277
+ e.stopPropagation(), V().editingCell = V().editingCell ? {
278
+ ...V().editingCell,
279
+ value: t
280
+ } : V().editingCell, f(q)();
281
+ }), s("keydown", i, (e) => {
282
+ let t = e.key;
283
+ if (t !== "ArrowLeft" && t !== "ArrowRight" && t !== "Home" && t !== "End") {
284
+ f(Y)(e);
285
+ return;
286
+ }
287
+ e.preventDefault(), e.stopPropagation();
288
+ let r = Math.min(5, Math.max(1, f(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, i);
294
+ });
295
+ var o = c(a, 2);
296
+ O(i), s("mousedown", o, (e) => e.preventDefault()), s("click", o, (e) => {
297
+ e.stopPropagation(), V().editingCell = V().editingCell ? {
298
+ ...V().editingCell,
299
+ value: 0
300
+ } : V().editingCell, f(q)();
301
+ }), T(t, i);
302
+ }, E = (r) => {
303
+ let a = e(() => f(G)(w.column, w.row)), o = e(() => f(K)(w.column, w.row));
304
+ var s = t(), c = D(s), l = (r) => {
305
+ var i = t(), s = D(i);
306
+ {
307
+ let t = e(() => V().editingCell?.value);
308
+ n(s, () => f(U), (e, n) => {
309
+ n(e, {
310
+ get options() {
311
+ return f(a);
312
+ },
313
+ get loading() {
314
+ return f(o);
315
+ },
316
+ get value() {
317
+ return f(t);
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: () => f(q)(),
328
+ onCancel: () => {
329
+ V().editingCell = null, V().gridRootEl?.focus({ preventScroll: !0 });
330
+ }
331
+ });
332
+ });
333
+ }
334
+ T(r, i);
335
+ };
336
+ i(c, (e) => {
337
+ f(U) && e(l);
338
+ }), T(r, s);
339
+ }, ne = (r) => {
340
+ let a = e(() => f(G)(w.column, w.row)), o = e(() => f(K)(w.column, w.row));
341
+ var s = t(), c = D(s), l = (r) => {
342
+ var i = t(), s = D(i);
343
+ {
344
+ let t = e(() => V().editingCell?.value);
345
+ n(s, () => f(U), (e, n) => {
346
+ n(e, {
347
+ get options() {
348
+ return f(a);
349
+ },
350
+ get loading() {
351
+ return f(o);
352
+ },
353
+ get value() {
354
+ return f(t);
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: () => f(q)(),
366
+ onCancel: () => {
367
+ V().editingCell = null, V().gridRootEl?.focus({ preventScroll: !0 });
368
+ }
369
+ });
370
+ });
371
+ }
372
+ T(r, i);
373
+ };
374
+ i(c, (e) => {
375
+ f(U) && e(l);
376
+ }), T(r, s);
377
+ }, k = (e) => {
378
+ var t = _e();
379
+ m(t), j(t, (e) => f(X)?.(e)), p((e) => S(t, e), [() => String(V().editingCell?.value ?? "")]), s("pointerdown", t, (e) => e.stopPropagation()), s("input", t, (e) => f(J)(e.currentTarget.value)), s("keydown", t, (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(), f(q)(), V().gridRootEl?.focus({ preventScroll: !0 }));
389
+ }), u("blur", t, () => f(q)()), T(e, t);
390
+ }, N = (t) => {
391
+ let n = e(() => f(G)(w.column, w.row)), r = e(() => String(V().editingCell?.value ?? "")), a = e(() => f(r).trim() ? f(n).filter((e) => String(e.label).toLowerCase().includes(f(r).toLowerCase())) : f(n));
392
+ var o = be(), m = l(o);
393
+ y(m), j(m, (e) => f(X)?.(e));
394
+ var h = c(m, 2), g = (e) => {
395
+ var t = ye();
396
+ A(t, 21, () => f(a).slice(0, 50), (e) => e.value, (e, t) => {
397
+ var n = ve(), i = l(n, !0);
398
+ O(n), p((e) => {
399
+ b(n, "aria-selected", e), d(i, f(t).label);
400
+ }, [() => String(f(t).value) === f(r)]), s("mousedown", n, (e) => {
401
+ e.preventDefault(), V().editingCell = V().editingCell ? {
402
+ ...V().editingCell,
403
+ value: f(t).value
404
+ } : V().editingCell, f(q)();
405
+ }), T(e, n);
406
+ }), O(t), T(e, t);
407
+ };
408
+ i(h, (e) => {
409
+ f(a).length > 0 && e(g);
410
+ }), O(o), p(() => S(m, f(r))), s("pointerdown", m, (e) => e.stopPropagation()), s("input", m, (e) => f(J)(e.currentTarget.value)), u("blur", m, () => f(q)()), s("keydown", m, function(...e) {
411
+ f(Y)?.apply(this, e);
412
+ }), T(t, o);
413
+ }, P = (r) => {
414
+ var a = t(), o = D(a), s = (r) => {
415
+ var i = t(), a = D(i);
416
+ {
417
+ let t = e(() => V().editingCell?.value);
418
+ n(a, () => f(W), (e, n) => {
419
+ n(e, {
420
+ get value() {
421
+ return f(t);
422
+ },
423
+ formatString: "yyyy-MM-dd",
424
+ dropDownDisplayMode: "calendar",
425
+ autoOpen: !0,
426
+ block: !0,
427
+ onChange: (e) => f(J)(e),
428
+ onCommit: () => f(q)(),
429
+ onCancel: () => {
430
+ V().editingCell = null, V().gridRootEl?.focus({ preventScroll: !0 });
431
+ }
432
+ });
433
+ });
434
+ }
435
+ T(r, i);
436
+ };
437
+ i(o, (e) => {
438
+ f(W) && e(s);
439
+ }), T(r, a);
440
+ }, F = (r) => {
441
+ var a = t(), o = D(a), s = (r) => {
442
+ var i = t(), a = D(i);
443
+ {
444
+ let t = e(() => V().editingCell?.value);
445
+ n(a, () => f(W), (e, n) => {
446
+ n(e, {
447
+ get value() {
448
+ return f(t);
449
+ },
450
+ formatString: "yyyy-MM-dd HH:mm",
451
+ dropDownDisplayMode: "both",
452
+ autoOpen: !0,
453
+ block: !0,
454
+ onChange: (e) => f(J)(e),
455
+ onCommit: () => f(q)(),
456
+ onCancel: () => {
457
+ V().editingCell = null, V().gridRootEl?.focus({ preventScroll: !0 });
458
+ }
459
+ });
460
+ });
461
+ }
462
+ T(r, i);
463
+ };
464
+ i(o, (e) => {
465
+ f(W) && e(s);
466
+ }), T(r, a);
467
+ }, I = (r) => {
468
+ var a = t(), o = D(a), s = (r) => {
469
+ var i = t(), a = D(i);
470
+ {
471
+ let t = e(() => ue(V().editingCell?.value));
472
+ n(a, () => f(W), (e, n) => {
473
+ n(e, {
474
+ get value() {
475
+ return f(t);
476
+ },
477
+ formatString: "HH:mm",
478
+ dropDownDisplayMode: "time",
479
+ autoOpen: !0,
480
+ block: !0,
481
+ onChange: (e) => f(J)(se(e)),
482
+ onCommit: () => f(q)(),
483
+ onCancel: () => {
484
+ V().editingCell = null, V().gridRootEl?.focus({ preventScroll: !0 });
485
+ }
486
+ });
487
+ });
488
+ }
489
+ T(r, i);
490
+ };
491
+ i(o, (e) => {
492
+ f(W) && e(s);
493
+ }), T(r, a);
494
+ }, L = (e) => {
495
+ var t = xe();
496
+ y(t), j(t, (e) => f(X)?.(e)), p((e, n) => {
497
+ M(t, 1, e), S(t, n);
498
+ }, [() => v(oe("color")), () => ce("color", V().editingCell?.value)]), s("input", t, (e) => f(J)(e.currentTarget.value)), s("change", t, (e) => {
499
+ f(J)(e.currentTarget.value), f(q)();
500
+ }), u("blur", t, () => f(q)()), s("keydown", t, function(...e) {
501
+ f(Y)?.apply(this, e);
502
+ }), T(e, t);
503
+ }, R = (r) => {
504
+ let i = e(() => pe(String(V().editingCell?.editorType))), a = e(() => f(i).component);
505
+ var o = t(), s = D(o);
506
+ {
507
+ let t = e(() => fe(f(i), Oe()));
508
+ n(s, () => f(a), (e, n) => {
509
+ n(e, te(() => f(t)));
510
+ });
511
+ }
512
+ T(r, o);
513
+ }, z = e(() => de(String(V().editingCell?.editorType ?? ""))), H = (t) => {
514
+ let n = e(() => V().editingCell?.editorType ?? "text"), r = e(() => ie(f(n)) === "text" && ae(f(n)) === "number");
515
+ var i = Se();
516
+ y(i), j(i, (e) => f(X)?.(e)), p((e, t, n) => {
517
+ M(i, 1, e), b(i, "type", t), b(i, "inputmode", f(r) ? "decimal" : void 0), S(i, n);
518
+ }, [
519
+ () => v(oe(f(n))),
520
+ () => ie(f(n)),
521
+ () => ce(f(n), V().editingCell?.value)
522
+ ]), s("input", i, (e) => {
523
+ let t = e.currentTarget;
524
+ if (f(r) && !le(t.value)) {
525
+ t.value = String(V().editingCell?.value ?? "");
526
+ return;
527
+ }
528
+ f(J)(t.value);
529
+ }), u("blur", i, () => f(q)()), s("keydown", i, function(...e) {
530
+ f(Y)?.apply(this, e);
531
+ }), T(t, i);
532
+ };
533
+ i(h, (e) => {
534
+ w.column.columnDef.cellEditor ? e(g) : V().editingCell?.editorType === "checkbox" ? e(_, 1) : V().editingCell?.editorType === "list" ? e(ee, 2) : V().editingCell?.editorType === "chips" ? e(x, 3) : V().editingCell?.editorType === "rating" ? e(C, 4) : V().editingCell?.editorType === "select" ? e(E, 5) : V().editingCell?.editorType === "rich-select" ? e(ne, 6) : V().editingCell?.editorType === "textarea" ? e(k, 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) : f(z) ? e(R, 13) : e(H, -1);
535
+ }), T(a, o);
536
+ };
537
+ i(ke, (e) => {
538
+ H() ? e(Ae) : e(je, -1);
539
+ }), T(a, $), ee();
540
+ }
541
+ a([
542
+ "mousedown",
543
+ "click",
544
+ "keydown",
545
+ "change",
546
+ "pointerdown",
547
+ "input"
548
+ ]);
549
+ //#endregion
550
+ export { B as default };