@svgrid/enterprise 3.1.17 → 3.1.18

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