@svgrid/enterprise 3.1.16 → 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-C0GDyyFs.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 +10475 -10461
  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-BdL--HXH.css +0 -1
  56. package/dist/wc/GridFooter-4T29pfok.js +0 -145
  57. package/dist/wc/SvGridCellEditor-Nnl8C3Yj.js +0 -582
@@ -1,582 +0,0 @@
1
- import { C as e, D as t, G as n, H as r, I as i, L as a, M as o, O as s, P as c, Q 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, dt as y, et as b, h as ee, ht as x, i as te, it as S, j as C, m as w, mt as T, n as E, nt as D, p as O, st as k, tt as A, ut as j, w as M, y as ne } from "./client-DQIzjDBG.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(r, u) {
7
- y(u, !0);
8
- let V = (e, r = x, o = x, l = x, u = x) => {
9
- var d = a(), m = A(d), g = (e) => {
10
- var s = a(), c = A(s), l = (e) => {
11
- var s = a(), c = A(s);
12
- {
13
- let e = k(() => H().editingCell?.value);
14
- t(c, () => n(W), (t, i) => {
15
- i(t, {
16
- get options() {
17
- return r();
18
- },
19
- get loading() {
20
- return u();
21
- },
22
- get value() {
23
- return n(e);
24
- },
25
- get multiple() {
26
- return o();
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: () => n(J)(),
37
- onCancel: () => {
38
- H().editingCell = null, H().gridRootEl?.focus({ preventScroll: !0 });
39
- }
40
- });
41
- });
42
- }
43
- i(e, s);
44
- };
45
- C(c, (e) => {
46
- n(W) && e(l);
47
- }), i(e, s);
48
- }, _ = (e) => {
49
- var t = I();
50
- w(t, "tabindex", -1);
51
- var r = b(t), a = b(r);
52
- s(a, 19, l, (e, t) => String(e) + "_" + t, (e, t, r) => {
53
- var a = P(), s = b(a), u = D(s);
54
- T(a), h((e, t) => {
55
- c(s, `${e ?? ""} `), w(u, "aria-label", `Remove ${t ?? ""}`);
56
- }, [() => String(n(t)), () => String(n(t))]), f("mousedown", u, (e) => e.preventDefault()), f("click", u, () => {
57
- let e = l().filter((e, t) => t !== n(r));
58
- H().editingCell = H().editingCell ? {
59
- ...H().editingCell,
60
- value: o() ? e : e[0] ?? null
61
- } : H().editingCell;
62
- }), i(e, a);
63
- });
64
- var u = D(a, 2);
65
- M(u, (e) => n(Z)?.(e));
66
- var d = D(u, 2), m = (e) => {
67
- var t = F();
68
- f("mousedown", t, (e) => e.preventDefault()), f("click", t, () => n(J)()), i(e, t);
69
- };
70
- C(d, (e) => {
71
- o() && e(m);
72
- }), T(r), T(t), h(() => w(u, "placeholder", o() ? "Type, Enter to add" : "Type a value")), f("keydown", u, (e) => {
73
- if (e.key === "Enter" || o() && e.key === ",") {
74
- e.preventDefault(), e.stopPropagation();
75
- let t = e.currentTarget, r = t.value.trim();
76
- if (r) {
77
- let e = o() ? [...l(), r] : [r];
78
- H().editingCell = H().editingCell ? {
79
- ...H().editingCell,
80
- value: o() ? e : r
81
- } : H().editingCell, t.value = "", o() || n(J)();
82
- }
83
- } else if (e.key === "Escape") n(X)(e);
84
- else if (e.key === "Backspace" && e.currentTarget.value === "" && l().length > 0) {
85
- e.preventDefault();
86
- let t = l().slice(0, -1);
87
- H().editingCell = H().editingCell ? {
88
- ...H().editingCell,
89
- value: o() ? t : t[0] ?? null
90
- } : H().editingCell;
91
- }
92
- }), p("blur", u, () => n(J)()), i(e, t);
93
- };
94
- C(m, (e) => {
95
- r().length > 0 ? e(g) : e(_, -1);
96
- }), i(e, d);
97
- }, H = E(u, "ctrl", 7), U = E(u, "fullRow", 3, !1), W = _(null), G = _(null);
98
- m(() => {
99
- let e = H().editingCell?.editorType;
100
- (e === "list" || e === "chips" || e === "select" || e === "rich-select") && !n(W) && import("./SvGridDropdown-45WsObLL.js").then((e) => S(W, e.default, !0)), (e === "date" || e === "datetime" || e === "time") && !n(G) && import("./SvDateTimePicker-Bq9N0Oiy.js").then((e) => S(G, e.default, !0));
101
- });
102
- let Ce = k(() => H().grid), we = k(() => H().fullRowEdit), K = k(() => H().getColumnEditorOptions), q = k(() => H().areEditorOptionsLoading), J = k(() => H().saveEditingCell), Y = k(() => H().updateEditingCellValue), X = k(() => H().onEditorKeyDown), Z = k(() => H().focusOnMount), Te = k(() => 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) => n(Y)(e),
131
- onCommit: (e) => {
132
- e !== void 0 && n(Y)(e), n(J)();
133
- },
134
- onCancel: () => {
135
- H().editingCell = null, H().gridRootEl?.focus({ preventScroll: !0 });
136
- },
137
- onCommitAndMove: (e, t) => {
138
- e !== void 0 && n(Y)(e), H().commitAndMoveByTab(t === -1);
139
- },
140
- onCommitAndMoveDown: (e, t) => {
141
- e !== void 0 && n(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 $ = a(), Me = A($), Ne = (e) => {
150
- let t = k(() => u.column.columnDef.editorType ?? "text"), r = k(() => n(we)?.draft[u.column.id]);
151
- var o = a(), l = A(o), d = (e) => {
152
- var t = L();
153
- O(t), h((e) => ee(t, e), [() => !!n(r)]), 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()), i(e, t);
154
- }, p = (e) => {
155
- let t = k(() => n(K)(u.column, u.row));
156
- var a = z();
157
- s(a, 21, () => n(t), (e) => De(e), (e, t) => {
158
- var r = R(), a = b(r, !0);
159
- T(r);
160
- var o = {};
161
- h((e, t) => {
162
- c(a, e), o !== (o = t) && (r.value = (r.__value = t) ?? "");
163
- }, [() => Oe(n(t)), () => De(n(t))]), i(e, r);
164
- }), T(a);
165
- var o;
166
- ne(a), h((e) => {
167
- o !== (o = e) && (a.value = (a.__value = e) ?? "", v(a, e));
168
- }, [() => String(n(r) ?? "")]), f("change", a, (e) => H().setFullRowDraft(u.column.id, e.currentTarget.value)), f("keydown", a, Q), f("pointerdown", a, (e) => e.stopPropagation()), f("click", a, (e) => e.stopPropagation()), i(e, a);
169
- }, m = (e) => {
170
- let a = k(() => n(t) === "number" ? "number" : n(t) === "date" ? "date" : n(t) === "datetime" ? "datetime-local" : n(t) === "time" ? "time" : n(t) === "password" ? "password" : "text");
171
- var o = B();
172
- O(o), h((e) => {
173
- w(o, "type", n(a)), g(o, e);
174
- }, [() => String(n(r) ?? "")]), 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()), i(e, o);
175
- };
176
- C(l, (e) => {
177
- n(t) === "checkbox" ? e(d) : n(t) === "list" || n(t) === "select" || n(t) === "rich-select" ? e(p, 1) : e(m, -1);
178
- }), i(e, o);
179
- }, Pe = (r) => {
180
- var m = a(), _ = A(m), v = (e) => {
181
- let t = k(() => u.column.columnDef.cellEditor);
182
- var r = a(), s = A(r);
183
- {
184
- let e = k(() => ({
185
- cell: u.row.getAllCells().find((e) => e.column.id === u.column.id),
186
- row: u.row,
187
- column: u.column,
188
- table: n(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), n(J)();
202
- },
203
- cancel: () => {
204
- H().editingCell = null, H().gridRootEl?.focus({ preventScroll: !0 });
205
- }
206
- }));
207
- o(s, () => n(t), () => n(e));
208
- }
209
- i(e, r);
210
- }, y = (e) => {
211
- var t = pe();
212
- M(t, (e) => Ee?.(e)), h((e) => w(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, n(J)();
219
- }), f("keydown", t, (e) => {
220
- if (e.key === "Enter" || e.key === " ") {
221
- n(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, n(J)();
228
- });
229
- return;
230
- }
231
- n(X)(e);
232
- }), p("blur", t, () => n(J)()), i(e, t);
233
- }, ee = (e) => {
234
- let r = k(() => n(K)(u.column, u.row)), o = k(() => n(q)(u.column, u.row)), s = k(() => u.column.columnDef.editorMultiple === !0);
235
- var c = a(), l = A(c), d = (e) => {
236
- var c = a(), l = A(c);
237
- {
238
- let e = k(() => H().editingCell?.value);
239
- t(l, () => n(W), (t, i) => {
240
- i(t, {
241
- get options() {
242
- return n(r);
243
- },
244
- get loading() {
245
- return n(o);
246
- },
247
- get value() {
248
- return n(e);
249
- },
250
- get multiple() {
251
- return n(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: () => n(J)(),
261
- onCancel: () => {
262
- H().editingCell = null, H().gridRootEl?.focus({ preventScroll: !0 });
263
- }
264
- });
265
- });
266
- }
267
- i(e, c);
268
- };
269
- C(l, (e) => {
270
- n(W) && e(d);
271
- }), i(e, c);
272
- }, x = (e) => {
273
- let t = k(() => n(K)(u.column, u.row)), r = k(() => n(q)(u.column, u.row)), i = k(() => u.column.columnDef.editorMultiple === !0), a = k(() => re(H().editingCell?.value));
274
- V(e, () => n(t), () => n(i), () => n(a), () => n(r));
275
- }, S = (e) => {
276
- let t = k(() => Math.max(0, Math.min(5, Math.round(Number(H().editingCell?.value) || 0)))), r = k(() => Math.min(5, Math.max(1, n(t))));
277
- var a = he(), o = b(a);
278
- s(o, 16, () => [
279
- 1,
280
- 2,
281
- 3,
282
- 4,
283
- 5
284
- ], (e) => e, (e, a) => {
285
- var o = me();
286
- M(o, (e, t) => Ee?.(e, t), () => a === n(r)), h(() => {
287
- w(o, "aria-checked", n(t) >= a), w(o, "aria-label", `${a} ${a === 1 ? "star" : "stars"}`), d(o, 1, `sv-grid-rating-star ${n(t) >= a ? "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: a
292
- } : H().editingCell, n(J)();
293
- }), f("keydown", o, (e) => {
294
- let r = e.key;
295
- if (r !== "ArrowLeft" && r !== "ArrowRight" && r !== "Home" && r !== "End") {
296
- n(X)(e);
297
- return;
298
- }
299
- e.preventDefault(), e.stopPropagation();
300
- let i = Math.min(5, Math.max(1, n(t))), a = r === "Home" ? 1 : r === "End" ? 5 : r === "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
- }), i(e, o);
306
- });
307
- var c = D(o, 2);
308
- T(a), f("mousedown", c, (e) => e.preventDefault()), f("click", c, (e) => {
309
- e.stopPropagation(), H().editingCell = H().editingCell ? {
310
- ...H().editingCell,
311
- value: 0
312
- } : H().editingCell, n(J)();
313
- }), i(e, a);
314
- }, E = (e) => {
315
- let r = k(() => n(K)(u.column, u.row)), o = k(() => n(q)(u.column, u.row));
316
- var s = a(), c = A(s), l = (e) => {
317
- var s = a(), c = A(s);
318
- {
319
- let e = k(() => H().editingCell?.value);
320
- t(c, () => n(W), (t, i) => {
321
- i(t, {
322
- get options() {
323
- return n(r);
324
- },
325
- get loading() {
326
- return n(o);
327
- },
328
- get value() {
329
- return n(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: () => n(J)(),
340
- onCancel: () => {
341
- H().editingCell = null, H().gridRootEl?.focus({ preventScroll: !0 });
342
- }
343
- });
344
- });
345
- }
346
- i(e, s);
347
- };
348
- C(c, (e) => {
349
- n(W) && e(l);
350
- }), i(e, s);
351
- }, j = (e) => {
352
- let r = k(() => n(K)(u.column, u.row)), o = k(() => n(q)(u.column, u.row));
353
- var s = a(), c = A(s), l = (e) => {
354
- var s = a(), c = A(s);
355
- {
356
- let e = k(() => H().editingCell?.value);
357
- t(c, () => n(W), (t, i) => {
358
- i(t, {
359
- get options() {
360
- return n(r);
361
- },
362
- get loading() {
363
- return n(o);
364
- },
365
- get value() {
366
- return n(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: () => n(J)(),
378
- onCancel: () => {
379
- H().editingCell = null, H().gridRootEl?.focus({ preventScroll: !0 });
380
- }
381
- });
382
- });
383
- }
384
- i(e, s);
385
- };
386
- C(c, (e) => {
387
- n(W) && e(l);
388
- }), i(e, s);
389
- }, ne = (e) => {
390
- var t = ge();
391
- l(t), M(t, (e) => n(Z)?.(e)), h((e) => g(t, e), [() => String(H().editingCell?.value ?? "")]), f("pointerdown", t, (e) => e.stopPropagation()), f("input", t, (e) => n(Y)(e.currentTarget.value)), f("keydown", t, (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(), n(J)(), H().gridRootEl?.focus({ preventScroll: !0 }));
401
- }), p("blur", t, () => n(J)()), i(e, t);
402
- }, N = (e) => {
403
- let t = k(() => n(K)(u.column, u.row)), r = k(() => String(H().editingCell?.value ?? "")), a = k(() => n(r).trim() ? n(t).filter((e) => String(e.label).toLowerCase().includes(n(r).toLowerCase())) : n(t));
404
- var o = ye(), l = b(o);
405
- O(l), M(l, (e) => n(Z)?.(e));
406
- var d = D(l, 2), m = (e) => {
407
- var t = ve();
408
- s(t, 21, () => n(a).slice(0, 50), (e) => e.value, (e, t) => {
409
- var a = _e(), o = b(a, !0);
410
- T(a), h((e) => {
411
- w(a, "aria-selected", e), c(o, n(t).label);
412
- }, [() => String(n(t).value) === n(r)]), f("mousedown", a, (e) => {
413
- e.preventDefault(), H().editingCell = H().editingCell ? {
414
- ...H().editingCell,
415
- value: n(t).value
416
- } : H().editingCell, n(J)();
417
- }), i(e, a);
418
- }), T(t), i(e, t);
419
- };
420
- C(d, (e) => {
421
- n(a).length > 0 && e(m);
422
- }), T(o), h(() => g(l, n(r))), f("pointerdown", l, (e) => e.stopPropagation()), f("input", l, (e) => n(Y)(e.currentTarget.value)), p("blur", l, () => n(J)()), f("keydown", l, function(...e) {
423
- n(X)?.apply(this, e);
424
- }), i(e, o);
425
- }, P = (e) => {
426
- var r = a(), o = A(r), s = (e) => {
427
- var r = a(), o = A(r);
428
- {
429
- let e = k(() => H().editingCell?.value), r = k(() => u.column.columnDef.editorFormatString ?? "yyyy-MM-dd");
430
- t(o, () => n(G), (t, i) => {
431
- i(t, {
432
- get value() {
433
- return n(e);
434
- },
435
- get formatString() {
436
- return n(r);
437
- },
438
- dropDownDisplayMode: "calendar",
439
- autoOpen: !0,
440
- block: !0,
441
- onChange: (e) => n(Y)(e),
442
- onCommit: () => n(J)(),
443
- onCancel: () => {
444
- H().editingCell = null, H().gridRootEl?.focus({ preventScroll: !0 });
445
- }
446
- });
447
- });
448
- }
449
- i(e, r);
450
- };
451
- C(o, (e) => {
452
- n(G) && e(s);
453
- }), i(e, r);
454
- }, F = (e) => {
455
- var r = a(), o = A(r), s = (e) => {
456
- var r = a(), o = A(r);
457
- {
458
- let e = k(() => H().editingCell?.value), r = k(() => u.column.columnDef.editorFormatString ?? "yyyy-MM-dd HH:mm");
459
- t(o, () => n(G), (t, i) => {
460
- i(t, {
461
- get value() {
462
- return n(e);
463
- },
464
- get formatString() {
465
- return n(r);
466
- },
467
- dropDownDisplayMode: "both",
468
- autoOpen: !0,
469
- block: !0,
470
- onChange: (e) => n(Y)(e),
471
- onCommit: () => n(J)(),
472
- onCancel: () => {
473
- H().editingCell = null, H().gridRootEl?.focus({ preventScroll: !0 });
474
- }
475
- });
476
- });
477
- }
478
- i(e, r);
479
- };
480
- C(o, (e) => {
481
- n(G) && e(s);
482
- }), i(e, r);
483
- }, I = (e) => {
484
- var r = a(), o = A(r), s = (e) => {
485
- var r = a(), o = A(r);
486
- {
487
- let e = k(() => ue(H().editingCell?.value));
488
- t(o, () => n(G), (t, r) => {
489
- r(t, {
490
- get value() {
491
- return n(e);
492
- },
493
- formatString: "HH:mm",
494
- dropDownDisplayMode: "time",
495
- autoOpen: !0,
496
- block: !0,
497
- onChange: (e) => n(Y)(se(e)),
498
- onCommit: () => n(J)(),
499
- onCancel: () => {
500
- H().editingCell = null, H().gridRootEl?.focus({ preventScroll: !0 });
501
- }
502
- });
503
- });
504
- }
505
- i(e, r);
506
- };
507
- C(o, (e) => {
508
- n(G) && e(s);
509
- }), i(e, r);
510
- }, L = (t) => {
511
- var r = be();
512
- O(r), M(r, (e) => n(Z)?.(e)), h((e, t) => {
513
- d(r, 1, e), g(r, t);
514
- }, [() => e(oe("color")), () => ce("color", H().editingCell?.value)]), f("input", r, (e) => n(Y)(e.currentTarget.value)), f("change", r, (e) => {
515
- n(Y)(e.currentTarget.value), n(J)();
516
- }), p("blur", r, () => n(J)()), f("keydown", r, function(...e) {
517
- n(X)?.apply(this, e);
518
- }), i(t, r);
519
- }, R = (e) => {
520
- let r = k(() => Ae(String(H().editingCell?.editorType)));
521
- var o = a(), s = A(o), c = (e) => {
522
- let o = k(() => n(r).component);
523
- var s = a(), c = A(s);
524
- {
525
- let e = k(() => fe(n(r), je()));
526
- t(c, () => n(o), (t, r) => {
527
- r(t, te(() => n(e)));
528
- });
529
- }
530
- i(e, s);
531
- };
532
- C(s, (e) => {
533
- n(r) && e(c);
534
- }), i(e, o);
535
- }, z = k(() => de(String(H().editingCell?.editorType ?? ""))), B = (e) => {
536
- var t = xe();
537
- l(t), M(t, (e) => n(Z)?.(e)), h((e, n) => {
538
- w(t, "rows", e), g(t, n);
539
- }, [() => Math.max(1, String(H().editingCell?.value ?? "").split("\n").length), () => String(H().editingCell?.value ?? "")]), f("input", t, (e) => {
540
- let t = e.currentTarget;
541
- t.rows = Math.max(1, t.value.split("\n").length), n(Y)(t.value);
542
- }), p("blur", t, () => n(J)()), f("keydown", t, function(...e) {
543
- n(X)?.apply(this, e);
544
- }), i(e, t);
545
- }, U = (t) => {
546
- let r = k(() => H().editingCell?.editorType ?? "text"), a = k(() => ie(n(r)) === "text" && ae(n(r)) === "number");
547
- var o = Se();
548
- O(o), M(o, (e) => n(Z)?.(e)), h((e, t, r) => {
549
- d(o, 1, e), w(o, "type", t), w(o, "inputmode", n(a) ? "decimal" : void 0), g(o, r);
550
- }, [
551
- () => e(oe(n(r))),
552
- () => ie(n(r)),
553
- () => ce(n(r), H().editingCell?.value)
554
- ]), f("input", o, (e) => {
555
- let t = e.currentTarget;
556
- if (n(a) && !le(t.value)) {
557
- t.value = String(H().editingCell?.value ?? "");
558
- return;
559
- }
560
- n(Y)(t.value);
561
- }), p("blur", o, () => n(J)()), f("keydown", o, function(...e) {
562
- n(X)?.apply(this, e);
563
- }), i(t, o);
564
- };
565
- C(_, (e) => {
566
- u.column.columnDef.cellEditor ? e(v) : H().editingCell?.editorType === "checkbox" ? e(y, 1) : H().editingCell?.editorType === "list" ? e(ee, 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(j, 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) : n(z) ? e(R, 13) : (H().editingCell?.editorType ?? "text") === "text" && u.column?.columnDef.editorMultiline ? e(B, 14) : e(U, -1);
567
- }), i(r, m);
568
- };
569
- C(Me, (e) => {
570
- U() ? e(Ne) : e(Pe, -1);
571
- }), i(r, $), j();
572
- }
573
- r([
574
- "mousedown",
575
- "click",
576
- "keydown",
577
- "change",
578
- "pointerdown",
579
- "input"
580
- ]);
581
- //#endregion
582
- export { V as default };