@svgrid/grid-wc 3.0.49 → 3.0.51

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 (72) hide show
  1. package/dist/GridFind-B5zpfGlk.js +39 -0
  2. package/dist/GridFooter-CSzuZWPH.js +142 -0
  3. package/dist/GridMenus-DGR1VkZL.js +1480 -0
  4. package/dist/PinSplitter-BbQwf4Eh.js +178 -0
  5. package/dist/{SvChartMenu-CztABicV.js → SvChartMenu-CFvrEIJf.js} +132 -132
  6. package/dist/{SvDateRangeInput-ByR-LFgf.js → SvDateRangeInput-B8uPcD0z.js} +107 -107
  7. package/dist/{SvDateTimePicker-8nq26l0z.js → SvDateTimePicker-D9MnooXn.js} +316 -316
  8. package/dist/{SvField-CtzxdF7J.js → SvField--1Px2j7E.js} +105 -105
  9. package/dist/SvGridCellEditor-BzLvoGRp.js +594 -0
  10. package/dist/SvGridChart-rvB4vvCB.js +3684 -0
  11. package/dist/{SvGridChartBuilder-BMPDRY0A.js → SvGridChartBuilder-C0HbpZhw.js} +385 -385
  12. package/dist/SvGridChartPanel-CftDsgLi.js +1689 -0
  13. package/dist/{SvGridChartView-D0Mk0N4Q.js → SvGridChartView-BMJf1fCo.js} +12 -12
  14. package/dist/SvGridDropdown-CZRv-0Cw.js +258 -0
  15. package/dist/angular/fesm2022/svgrid-grid-wc-angular.mjs +4 -2
  16. package/dist/angular/fesm2022/svgrid-grid-wc-angular.mjs.map +1 -1
  17. package/dist/angular/types/svgrid-grid-wc-angular.d.ts +2 -1
  18. package/dist/{chart-export-pdf-COD2Ugv7.js → chart-export-pdf-CFq7Y-pq.js} +1 -1
  19. package/dist/{shadow/client-OtsRxGjS.js → client-DeNKZvIV.js} +593 -581
  20. package/dist/{date-format-DngG1HJ5.js → date-format-B1XMOxlA.js} +309 -309
  21. package/dist/{grid-extension.svelte-DToFhcZv.js → grid-extension.svelte-B_gzYJQQ.js} +8 -8
  22. package/dist/{range-commit-C6Rogxem.js → range-commit-BriJZw_M.js} +1 -1
  23. package/dist/react/index.d.ts +3 -1
  24. package/dist/react/index.js +1 -1
  25. package/dist/{shadow/row-drag-DLQMyiV3.js → row-drag-DevACK09.js} +1 -1
  26. package/dist/shadow/GridFind-CVqPCjPK.js +39 -0
  27. package/dist/shadow/GridFooter-DY9numnH.js +142 -0
  28. package/dist/shadow/GridMenus-Bl11jIy6.js +1480 -0
  29. package/dist/shadow/PinSplitter-DNjnUtbi.js +178 -0
  30. package/dist/shadow/{SvChartMenu-CFlDiKdq.js → SvChartMenu-Ca2hVFUA.js} +132 -132
  31. package/dist/shadow/{SvDateRangeInput-9Wq4E64y.js → SvDateRangeInput-CNXId95j.js} +107 -107
  32. package/dist/shadow/{SvDateTimePicker-J65ZmtSw.js → SvDateTimePicker-B6lwKYFq.js} +316 -316
  33. package/dist/shadow/{SvField-DGPj2clt.js → SvField-1OiD5dJA.js} +105 -105
  34. package/dist/shadow/SvGridCellEditor-CRImfWTE.js +594 -0
  35. package/dist/shadow/SvGridChart-_GY1Mgr4.js +3684 -0
  36. package/dist/shadow/{SvGridChartBuilder-BY64S-Zw.js → SvGridChartBuilder-Ci_GlCg3.js} +385 -385
  37. package/dist/shadow/SvGridChartPanel-BHczMJAe.js +1689 -0
  38. package/dist/shadow/{SvGridChartView-DwchQygE.js → SvGridChartView-BJEpaO8h.js} +12 -12
  39. package/dist/shadow/SvGridDropdown-giyKVcC0.js +258 -0
  40. package/dist/shadow/{chart-export-pdf-D9OfzqwS.js → chart-export-pdf-Ne0ET-JM.js} +1 -1
  41. package/dist/{client-OtsRxGjS.js → shadow/client-DeNKZvIV.js} +593 -581
  42. package/dist/shadow/{date-format-C9UkbCig.js → date-format-VCW-gATr.js} +309 -309
  43. package/dist/shadow/{grid-extension.svelte-DToFhcZv.js → grid-extension.svelte-B_gzYJQQ.js} +8 -8
  44. package/dist/shadow/{range-commit-C6Rogxem.js → range-commit-BriJZw_M.js} +1 -1
  45. package/dist/{row-drag-DLQMyiV3.js → shadow/row-drag-DevACK09.js} +1 -1
  46. package/dist/shadow/sv-grid-scrollbar-yHMClECS.js +228 -0
  47. package/dist/shadow/sv-grid-shadow-element.d.ts +2 -0
  48. package/dist/shadow/sv-grid-shadow-element.js +5686 -5829
  49. package/dist/{svelte-virtualizer.svelte-DWvD9wvL.js → shadow/svelte-virtualizer.svelte-D8oCAQUc.js} +4 -4
  50. package/dist/sv-grid-element.d.ts +2 -0
  51. package/dist/sv-grid-element.js +5668 -5811
  52. package/dist/sv-grid-scrollbar-yHMClECS.js +228 -0
  53. package/dist/{shadow/svelte-virtualizer.svelte-DWvD9wvL.js → svelte-virtualizer.svelte-D8oCAQUc.js} +4 -4
  54. package/dist/vue/index.d.ts +2 -1
  55. package/dist/vue/index.js +1 -1
  56. package/package.json +3 -3
  57. package/dist/GridFind-C1YbloFh.js +0 -39
  58. package/dist/GridFooter-DOR8m9GQ.js +0 -142
  59. package/dist/GridMenus-ac4ROLfR.js +0 -1461
  60. package/dist/PinSplitter-Du4ZF8T3.js +0 -178
  61. package/dist/SvGridCellEditor-3jq3ec38.js +0 -594
  62. package/dist/SvGridChart-CHMHUQto.js +0 -3684
  63. package/dist/SvGridChartPanel-Bk_xFAwN.js +0 -1689
  64. package/dist/SvGridDropdown-CnCQuXaI.js +0 -258
  65. package/dist/shadow/GridFind-CcoKoisE.js +0 -39
  66. package/dist/shadow/GridFooter-CDq71ytl.js +0 -142
  67. package/dist/shadow/GridMenus-hIMzQt3E.js +0 -1461
  68. package/dist/shadow/PinSplitter-BAYTAZtm.js +0 -178
  69. package/dist/shadow/SvGridCellEditor-DA5l3ENL.js +0 -594
  70. package/dist/shadow/SvGridChart-DgCuTYRq.js +0 -3684
  71. package/dist/shadow/SvGridChartPanel-CuRtOxSk.js +0 -1689
  72. package/dist/shadow/SvGridDropdown-B_5kqHQE.js +0 -258
@@ -0,0 +1,594 @@
1
+ import { $ as e, A as t, B as n, G as r, J as i, L as a, M as o, N as s, O as c, R as l, S as u, T as d, V as f, W as p, X as m, Y as h, Z as g, _, at as v, b as y, ct as b, et as x, f as S, g as C, i as ee, it as te, j as w, k as ne, lt as T, m as re, n as E, nt as D, ot as O, p as k, v as ie, w as A, x as ae, z as j } from "./client-DeNKZvIV.js";
2
+ import { C as oe, d as se, h as ce, m as le, o as ue, p as de, v as fe, x as pe } from "./SvGrid.helpers-DovOhyhU.js";
3
+ import { n as me, r as he, t as M } from "./editor-registry-DxGKqcvx.js";
4
+ import "./sv-grid-element.js";
5
+ //#region ../grid/dist/SvGridCellEditor.svelte
6
+ var N = s("<span class=\"sv-grid-chip sv-grid-chip-removable\"> <button type=\"button\" class=\"sv-grid-chip-remove\">×</button></span>"), P = s("<button type=\"button\" class=\"sv-grid-chip-commit\" aria-label=\"Commit chip selection\">Done</button>"), F = s("<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 = s("<input type=\"checkbox\" class=\"sv-grid-fr-editor sv-grid-fr-checkbox\"/>"), L = s("<option> </option>"), R = s("<select class=\"sv-grid-cell-editor sv-grid-fr-editor\"></select>"), z = s("<input class=\"sv-grid-cell-editor sv-grid-fr-editor\"/>"), ge = s("<button type=\"button\" class=\"sv-grid-checkbox\" role=\"checkbox\" aria-label=\"Edit checkbox value\"></button>"), _e = s("<button type=\"button\" role=\"radio\">★</button>"), ve = s("<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>"), ye = s("<textarea class=\"sv-grid-cell-editor sv-grid-cell-editor-textarea\" rows=\"4\"></textarea>"), be = s("<button type=\"button\" class=\"sv-grid-autocomplete-option\" role=\"option\"> </button>"), xe = s("<div class=\"sv-grid-autocomplete-list\" role=\"listbox\"></div>"), Se = s("<div class=\"sv-grid-autocomplete\"><input class=\"sv-grid-cell-editor sv-grid-cell-editor-autocomplete\" type=\"text\"/> <!></div>"), Ce = s("<input type=\"color\"/>"), we = s("<textarea class=\"sv-grid-cell-editor sv-grid-cell-editor-text sv-grid-cell-editor-multiline\"></textarea>"), Te = s("<input/>");
7
+ function B(a, s) {
8
+ O(s, !0);
9
+ let B = (e, r = T, a = T, s = T, f = T) => {
10
+ var m = o(), _ = h(m), v = (e) => {
11
+ var t = o(), i = h(t), s = (e) => {
12
+ var t = o(), i = h(t);
13
+ {
14
+ let e = D(() => V().editingCell?.value);
15
+ A(i, () => n(H), (t, i) => {
16
+ i(t, {
17
+ get options() {
18
+ return r();
19
+ },
20
+ get loading() {
21
+ return f();
22
+ },
23
+ get value() {
24
+ return n(e);
25
+ },
26
+ get multiple() {
27
+ return a();
28
+ },
29
+ placeholder: "Pick…",
30
+ renderChipsInTrigger: !0,
31
+ onChange: (e) => {
32
+ V().editingCell = V().editingCell ? {
33
+ ...V().editingCell,
34
+ value: e
35
+ } : V().editingCell;
36
+ },
37
+ onCommit: () => K(),
38
+ onTab: (e) => V().commitAndMoveByTab(e),
39
+ onCancel: () => {
40
+ V().editingCell = null, V().gridRootEl?.focus({ preventScroll: !0 });
41
+ }
42
+ });
43
+ });
44
+ }
45
+ w(e, t);
46
+ };
47
+ c(i, (e) => {
48
+ n(H) && e(s);
49
+ }), w(e, t);
50
+ }, y = (e) => {
51
+ var r = F();
52
+ k(r, "tabindex", -1);
53
+ var o = i(r), f = i(o);
54
+ d(f, 19, s, (e, t) => String(e) + "_" + t, (e, r, o) => {
55
+ var c = N(), u = i(c), d = g(u);
56
+ b(c), p((e, n) => {
57
+ t(u, `${e ?? ""} `), k(d, "aria-label", `Remove ${n ?? ""}`);
58
+ }, [() => String(n(r)), () => String(n(r))]), l("mousedown", d, (e) => e.preventDefault()), l("click", d, () => {
59
+ let e = s().filter((e, t) => t !== n(o));
60
+ V().editingCell = V().editingCell ? {
61
+ ...V().editingCell,
62
+ value: a() ? e : e[0] ?? null
63
+ } : V().editingCell;
64
+ }), w(e, c);
65
+ });
66
+ var m = g(f, 2);
67
+ u(m, (e) => n(Y)?.(e));
68
+ var h = g(m, 2), _ = (e) => {
69
+ var t = P();
70
+ l("mousedown", t, (e) => e.preventDefault()), l("click", t, () => K()), w(e, t);
71
+ };
72
+ c(h, (e) => {
73
+ a() && e(_);
74
+ }), b(o), b(r), p(() => k(m, "placeholder", a() ? "Type, Enter to add" : "Type a value")), l("keydown", m, (e) => {
75
+ if (e.key === "Enter" || a() && e.key === ",") {
76
+ e.preventDefault(), e.stopPropagation();
77
+ let t = e.currentTarget, n = t.value.trim();
78
+ if (n) {
79
+ let e = a() ? [...s(), n] : [n];
80
+ V().editingCell = V().editingCell ? {
81
+ ...V().editingCell,
82
+ value: a() ? e : n
83
+ } : V().editingCell, t.value = "", a() || K();
84
+ }
85
+ } else if (e.key === "Escape") n(J)(e);
86
+ else if (e.key === "Backspace" && e.currentTarget.value === "" && s().length > 0) {
87
+ e.preventDefault();
88
+ let t = s().slice(0, -1);
89
+ V().editingCell = V().editingCell ? {
90
+ ...V().editingCell,
91
+ value: a() ? t : t[0] ?? null
92
+ } : V().editingCell;
93
+ }
94
+ }), j("blur", m, () => K()), w(e, r);
95
+ };
96
+ c(_, (e) => {
97
+ r().length > 0 ? e(v) : e(y, -1);
98
+ }), w(e, m);
99
+ }, V = E(s, "ctrl", 7), Ee = E(s, "fullRow", 3, !1), H = x(null), U = x(null);
100
+ r(() => {
101
+ let t = V().editingCell?.editorType;
102
+ (t === "list" || t === "chips" || t === "select" || t === "rich-select") && !n(H) && import("./SvGridDropdown-CZRv-0Cw.js").then((t) => e(H, t.default, !0)), (t === "date" || t === "datetime" || t === "time") && !n(U) && import("./SvDateTimePicker-D9MnooXn.js").then((t) => e(U, t.default, !0));
103
+ });
104
+ let De = D(() => V().grid), Oe = D(() => V().fullRowEdit), W = D(() => V().getColumnEditorOptions), G = D(() => V().areEditorOptionsLoading);
105
+ function K() {
106
+ let e = document.activeElement !== document.body;
107
+ V().saveEditingCell(), e && f().then(() => {
108
+ document.activeElement === document.body && V().gridRootEl?.focus({ preventScroll: !0 });
109
+ });
110
+ }
111
+ let q = D(() => V().updateEditingCellValue), J = D(() => V().onEditorKeyDown), Y = D(() => V().focusOnMount), ke = D(() => V().toggleCheckboxWithKeyboard), X = D(() => V().toolPanelHeaderLabel(s.column));
112
+ function Z(e, t = !0) {
113
+ t && e.focus({ preventScroll: !0 });
114
+ }
115
+ function Q(e) {
116
+ e.isComposing || (e.key === "Enter" ? (e.preventDefault(), V().commitFullRowEdit(), V().gridRootEl?.focus({ preventScroll: !0 })) : e.key === "Escape" && (e.preventDefault(), V().cancelFullRowEdit(), V().gridRootEl?.focus({ preventScroll: !0 })));
117
+ }
118
+ function Ae(e) {
119
+ return typeof e == "object" && e && "value" in e ? String(e.value) : String(e);
120
+ }
121
+ function je(e) {
122
+ return typeof e == "object" && e && "label" in e ? String(e.label) : String(e);
123
+ }
124
+ let Me;
125
+ function Ne(e) {
126
+ let t = M(e);
127
+ return t && (Me = t), t ?? Me;
128
+ }
129
+ function Pe() {
130
+ let e = V().editingCell;
131
+ return {
132
+ value: e?.value,
133
+ rowId: e?.rowId ?? "",
134
+ columnId: e?.columnId ?? "",
135
+ columnDef: s.column.columnDef,
136
+ row: s.row.original,
137
+ typed: e?.typed === !0,
138
+ grid: V(),
139
+ onChange: (e) => n(q)(e),
140
+ onCommit: (e) => {
141
+ e !== void 0 && n(q)(e), K();
142
+ },
143
+ onCancel: () => {
144
+ V().editingCell = null, V().gridRootEl?.focus({ preventScroll: !0 });
145
+ },
146
+ onCommitAndMove: (e, t) => {
147
+ e !== void 0 && n(q)(e), V().commitAndMoveByTab(t === -1);
148
+ },
149
+ onCommitAndMoveDown: (e, t) => {
150
+ e !== void 0 && n(q)(e), V().commitAndMoveByEnter(t === !0);
151
+ },
152
+ onRequestClose: () => {
153
+ V().editingCell = null, V().gridRootEl?.focus({ preventScroll: !0 });
154
+ },
155
+ inCell: !0
156
+ };
157
+ }
158
+ var $ = o(), Fe = h($), Ie = (e) => {
159
+ let r = D(() => s.column.columnDef.editorType ?? "text"), i = D(() => n(Oe)?.draft[s.column.id]);
160
+ var a = o(), u = h(a), f = (e) => {
161
+ var t = I();
162
+ S(t), p((e) => re(t, e), [() => !!n(i)]), l("change", t, (e) => V().setFullRowDraft(s.column.id, e.currentTarget.checked)), l("keydown", t, Q), l("pointerdown", t, (e) => e.stopPropagation()), l("click", t, (e) => e.stopPropagation()), w(e, t);
163
+ }, g = (e) => {
164
+ let r = D(() => n(W)(s.column, s.row));
165
+ var a = R();
166
+ d(a, 21, () => n(r), (e) => Ae(e), (e, r) => {
167
+ var i = L(), a = m(i, !0), o = {};
168
+ p((e, n) => {
169
+ t(a, e), o !== (o = n) && (i.value = (i.__value = o) ?? "");
170
+ }, [() => je(n(r)), () => Ae(n(r))]), w(e, i);
171
+ }), b(a);
172
+ var o;
173
+ _(a), p((e) => {
174
+ o !== (o = e) && (a.value = (a.__value = o) ?? "", ie(a, o));
175
+ }, [() => String(n(i) ?? "")]), l("change", a, (e) => V().setFullRowDraft(s.column.id, e.currentTarget.value)), l("keydown", a, Q), l("pointerdown", a, (e) => e.stopPropagation()), l("click", a, (e) => e.stopPropagation()), w(e, a);
176
+ }, v = (e) => {
177
+ let t = D(() => n(r) === "number" ? "number" : n(r) === "date" ? "date" : n(r) === "datetime" ? "datetime-local" : n(r) === "time" ? "time" : n(r) === "password" ? "password" : "text");
178
+ var a = z();
179
+ S(a), p((e) => {
180
+ k(a, "type", n(t)), C(a, e);
181
+ }, [() => String(n(i) ?? "")]), l("input", a, (e) => V().setFullRowDraft(s.column.id, e.currentTarget.value)), l("keydown", a, Q), l("pointerdown", a, (e) => e.stopPropagation()), l("click", a, (e) => e.stopPropagation()), w(e, a);
182
+ };
183
+ c(u, (e) => {
184
+ n(r) === "checkbox" ? e(f) : n(r) === "list" || n(r) === "select" || n(r) === "rich-select" ? e(g, 1) : e(v, -1);
185
+ }), w(e, a);
186
+ }, Le = (e) => {
187
+ var r = o(), a = h(r), f = (e) => {
188
+ let t = D(() => s.column.columnDef.cellEditor);
189
+ var r = o(), i = h(r);
190
+ {
191
+ let e = D(() => ({
192
+ cell: s.row.getAllCells().find((e) => e.column.id === s.column.id),
193
+ row: s.row,
194
+ column: s.column,
195
+ table: n(De),
196
+ getValue: () => V().editingCell?.value,
197
+ value: V().editingCell?.value,
198
+ update: (e) => {
199
+ V().editingCell = V().editingCell ? {
200
+ ...V().editingCell,
201
+ value: e
202
+ } : V().editingCell;
203
+ },
204
+ commit: (e) => {
205
+ e !== void 0 && (V().editingCell = V().editingCell ? {
206
+ ...V().editingCell,
207
+ value: e
208
+ } : V().editingCell), K();
209
+ },
210
+ cancel: () => {
211
+ V().editingCell = null, V().gridRootEl?.focus({ preventScroll: !0 });
212
+ }
213
+ }));
214
+ ne(i, () => n(t), () => n(e));
215
+ }
216
+ w(e, r);
217
+ }, _ = (e) => {
218
+ var t = ge();
219
+ u(t, (e) => Z?.(e)), p((e) => k(t, "aria-checked", e), [() => !!V().editingCell.value]), l("click", t, (e) => {
220
+ e.stopPropagation();
221
+ let t = !V().editingCell?.value;
222
+ V().editingCell = V().editingCell ? {
223
+ ...V().editingCell,
224
+ value: t
225
+ } : V().editingCell, K();
226
+ }), l("keydown", t, (e) => {
227
+ if (e.key === "Enter" || e.key === " ") {
228
+ n(ke)(e, () => {
229
+ e.stopPropagation();
230
+ let t = !V().editingCell?.value;
231
+ V().editingCell = V().editingCell ? {
232
+ ...V().editingCell,
233
+ value: t
234
+ } : V().editingCell, K();
235
+ });
236
+ return;
237
+ }
238
+ n(J)(e);
239
+ }), j("blur", t, () => K()), w(e, t);
240
+ }, v = (e) => {
241
+ let t = D(() => n(W)(s.column, s.row)), r = D(() => n(G)(s.column, s.row)), i = D(() => s.column.columnDef.editorMultiple === !0);
242
+ var a = o(), l = h(a), u = (e) => {
243
+ var a = o(), s = h(a);
244
+ {
245
+ let e = D(() => V().editingCell?.value);
246
+ A(s, () => n(H), (a, o) => {
247
+ o(a, {
248
+ get options() {
249
+ return n(t);
250
+ },
251
+ get loading() {
252
+ return n(r);
253
+ },
254
+ get value() {
255
+ return n(e);
256
+ },
257
+ get multiple() {
258
+ return n(i);
259
+ },
260
+ placeholder: "Select…",
261
+ onChange: (e) => {
262
+ V().editingCell = V().editingCell ? {
263
+ ...V().editingCell,
264
+ value: e
265
+ } : V().editingCell;
266
+ },
267
+ onCommit: () => K(),
268
+ onTab: (e) => V().commitAndMoveByTab(e),
269
+ onCancel: () => {
270
+ V().editingCell = null, V().gridRootEl?.focus({ preventScroll: !0 });
271
+ }
272
+ });
273
+ });
274
+ }
275
+ w(e, a);
276
+ };
277
+ c(l, (e) => {
278
+ n(H) && e(u);
279
+ }), w(e, a);
280
+ }, x = (e) => {
281
+ let t = D(() => n(W)(s.column, s.row)), r = D(() => n(G)(s.column, s.row)), i = D(() => s.column.columnDef.editorMultiple === !0), a = D(() => oe(V().editingCell?.value));
282
+ B(e, () => n(t), () => n(i), () => n(a), () => n(r));
283
+ }, T = (e) => {
284
+ let t = D(() => Math.max(0, Math.min(5, Math.round(Number(V().editingCell?.value) || 0)))), r = D(() => Math.min(5, Math.max(1, n(t))));
285
+ var a = ve(), o = i(a);
286
+ d(o, 16, () => [
287
+ 1,
288
+ 2,
289
+ 3,
290
+ 4,
291
+ 5
292
+ ], (e) => e, (e, i) => {
293
+ var a = _e();
294
+ u(a, (e, t) => Z?.(e, t), () => i === n(r)), p(() => {
295
+ k(a, "aria-checked", n(t) >= i), k(a, "aria-label", `${i} ${i === 1 ? "star" : "stars"}`), y(a, 1, `sv-grid-rating-star ${n(t) >= i ? "sv-grid-rating-star-on" : ""}`);
296
+ }), l("mousedown", a, (e) => e.preventDefault()), l("click", a, (e) => {
297
+ e.stopPropagation(), V().editingCell = V().editingCell ? {
298
+ ...V().editingCell,
299
+ value: i
300
+ } : V().editingCell, K();
301
+ }), l("keydown", a, (e) => {
302
+ let r = e.key;
303
+ if (r !== "ArrowLeft" && r !== "ArrowRight" && r !== "Home" && r !== "End") {
304
+ n(J)(e);
305
+ return;
306
+ }
307
+ e.preventDefault(), e.stopPropagation();
308
+ 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);
309
+ V().editingCell = V().editingCell ? {
310
+ ...V().editingCell,
311
+ value: a
312
+ } : V().editingCell, (e.currentTarget.parentElement?.querySelectorAll(".sv-grid-rating-star"))?.[a - 1]?.focus({ preventScroll: !0 });
313
+ }), w(e, a);
314
+ });
315
+ var s = g(o, 2);
316
+ b(a), l("mousedown", s, (e) => e.preventDefault()), l("click", s, (e) => {
317
+ e.stopPropagation(), V().editingCell = V().editingCell ? {
318
+ ...V().editingCell,
319
+ value: 0
320
+ } : V().editingCell, K();
321
+ }), w(e, a);
322
+ }, re = (e) => {
323
+ let t = D(() => n(W)(s.column, s.row)), r = D(() => n(G)(s.column, s.row));
324
+ var i = o(), a = h(i), l = (e) => {
325
+ var i = o(), a = h(i);
326
+ {
327
+ let e = D(() => V().editingCell?.value);
328
+ A(a, () => n(H), (i, a) => {
329
+ a(i, {
330
+ get options() {
331
+ return n(t);
332
+ },
333
+ get loading() {
334
+ return n(r);
335
+ },
336
+ get value() {
337
+ return n(e);
338
+ },
339
+ multiple: !1,
340
+ placeholder: "Select…",
341
+ onChange: (e) => {
342
+ V().editingCell = V().editingCell ? {
343
+ ...V().editingCell,
344
+ value: e
345
+ } : V().editingCell;
346
+ },
347
+ onCommit: () => K(),
348
+ onTab: (e) => V().commitAndMoveByTab(e),
349
+ onCancel: () => {
350
+ V().editingCell = null, V().gridRootEl?.focus({ preventScroll: !0 });
351
+ }
352
+ });
353
+ });
354
+ }
355
+ w(e, i);
356
+ };
357
+ c(a, (e) => {
358
+ n(H) && e(l);
359
+ }), w(e, i);
360
+ }, E = (e) => {
361
+ let t = D(() => n(W)(s.column, s.row)), r = D(() => n(G)(s.column, s.row));
362
+ var i = o(), a = h(i), l = (e) => {
363
+ var i = o(), a = h(i);
364
+ {
365
+ let e = D(() => V().editingCell?.value);
366
+ A(a, () => n(H), (i, a) => {
367
+ a(i, {
368
+ get options() {
369
+ return n(t);
370
+ },
371
+ get loading() {
372
+ return n(r);
373
+ },
374
+ get value() {
375
+ return n(e);
376
+ },
377
+ multiple: !1,
378
+ searchable: !0,
379
+ placeholder: "Search…",
380
+ onChange: (e) => {
381
+ V().editingCell = V().editingCell ? {
382
+ ...V().editingCell,
383
+ value: e
384
+ } : V().editingCell;
385
+ },
386
+ onCommit: () => K(),
387
+ onTab: (e) => V().commitAndMoveByTab(e),
388
+ onCancel: () => {
389
+ V().editingCell = null, V().gridRootEl?.focus({ preventScroll: !0 });
390
+ }
391
+ });
392
+ });
393
+ }
394
+ w(e, i);
395
+ };
396
+ c(a, (e) => {
397
+ n(H) && e(l);
398
+ }), w(e, i);
399
+ }, O = (e) => {
400
+ var t = ye();
401
+ te(t), u(t, (e) => n(Y)?.(e)), p((e) => {
402
+ k(t, "aria-label", n(X)), C(t, e);
403
+ }, [() => String(V().editingCell?.value ?? "")]), l("pointerdown", t, (e) => e.stopPropagation()), l("input", t, (e) => n(q)(e.currentTarget.value)), l("keydown", t, (e) => {
404
+ if (e.stopPropagation(), e.key === "Escape") {
405
+ e.preventDefault(), V().editingCell = null, V().gridRootEl?.focus({ preventScroll: !0 });
406
+ return;
407
+ }
408
+ if (e.key === "Tab") {
409
+ e.preventDefault(), V().commitAndMoveByTab(e.shiftKey);
410
+ return;
411
+ }
412
+ e.key === "Enter" && (e.ctrlKey || e.metaKey) && (e.preventDefault(), K(), V().gridRootEl?.focus({ preventScroll: !0 }));
413
+ }), j("blur", t, () => K()), w(e, t);
414
+ }, ie = (e) => {
415
+ let r = D(() => n(W)(s.column, s.row)), a = D(() => String(V().editingCell?.value ?? "")), o = D(() => n(a).trim() ? n(r).filter((e) => String(e.label).toLowerCase().includes(n(a).toLowerCase())) : n(r));
416
+ var f = Se(), h = i(f);
417
+ S(h), u(h, (e) => n(Y)?.(e));
418
+ var _ = g(h, 2), v = (e) => {
419
+ var r = xe();
420
+ d(r, 21, () => n(o).slice(0, 50), (e) => e.value, (e, r) => {
421
+ var i = be(), o = m(i, !0);
422
+ p((e) => {
423
+ k(i, "aria-selected", e), t(o, n(r).label);
424
+ }, [() => String(n(r).value) === n(a)]), l("mousedown", i, (e) => {
425
+ e.preventDefault(), V().editingCell = V().editingCell ? {
426
+ ...V().editingCell,
427
+ value: n(r).value
428
+ } : V().editingCell, K();
429
+ }), w(e, i);
430
+ }), b(r), w(e, r);
431
+ };
432
+ c(_, (e) => {
433
+ n(o).length > 0 && e(v);
434
+ }), b(f), p(() => C(h, n(a))), l("pointerdown", h, (e) => e.stopPropagation()), l("input", h, (e) => n(q)(e.currentTarget.value)), j("blur", h, () => K()), l("keydown", h, function(...e) {
435
+ n(J)?.apply(this, e);
436
+ }), w(e, f);
437
+ }, M = (e) => {
438
+ var t = o(), r = h(t), i = (e) => {
439
+ var t = o(), r = h(t);
440
+ {
441
+ let e = D(() => V().editingCell?.value), t = D(() => s.column.columnDef.editorFormatString ?? "yyyy-MM-dd");
442
+ A(r, () => n(U), (r, i) => {
443
+ i(r, {
444
+ get value() {
445
+ return n(e);
446
+ },
447
+ get formatString() {
448
+ return n(t);
449
+ },
450
+ dropDownDisplayMode: "calendar",
451
+ autoOpen: !0,
452
+ block: !0,
453
+ onChange: (e) => n(q)(e),
454
+ onCommit: () => K(),
455
+ onCancel: () => {
456
+ V().editingCell = null, V().gridRootEl?.focus({ preventScroll: !0 });
457
+ }
458
+ });
459
+ });
460
+ }
461
+ w(e, t);
462
+ };
463
+ c(r, (e) => {
464
+ n(U) && e(i);
465
+ }), w(e, t);
466
+ }, N = (e) => {
467
+ var t = o(), r = h(t), i = (e) => {
468
+ var t = o(), r = h(t);
469
+ {
470
+ let e = D(() => V().editingCell?.value), t = D(() => s.column.columnDef.editorFormatString ?? "yyyy-MM-dd HH:mm");
471
+ A(r, () => n(U), (r, i) => {
472
+ i(r, {
473
+ get value() {
474
+ return n(e);
475
+ },
476
+ get formatString() {
477
+ return n(t);
478
+ },
479
+ dropDownDisplayMode: "both",
480
+ autoOpen: !0,
481
+ block: !0,
482
+ onChange: (e) => n(q)(e),
483
+ onCommit: () => K(),
484
+ onCancel: () => {
485
+ V().editingCell = null, V().gridRootEl?.focus({ preventScroll: !0 });
486
+ }
487
+ });
488
+ });
489
+ }
490
+ w(e, t);
491
+ };
492
+ c(r, (e) => {
493
+ n(U) && e(i);
494
+ }), w(e, t);
495
+ }, P = (e) => {
496
+ var t = o(), r = h(t), i = (e) => {
497
+ var t = o(), r = h(t);
498
+ {
499
+ let e = D(() => pe(V().editingCell?.value));
500
+ A(r, () => n(U), (t, r) => {
501
+ r(t, {
502
+ get value() {
503
+ return n(e);
504
+ },
505
+ formatString: "HH:mm",
506
+ dropDownDisplayMode: "time",
507
+ autoOpen: !0,
508
+ block: !0,
509
+ onChange: (e) => n(q)(ue(e)),
510
+ onCommit: () => K(),
511
+ onCancel: () => {
512
+ V().editingCell = null, V().gridRootEl?.focus({ preventScroll: !0 });
513
+ }
514
+ });
515
+ });
516
+ }
517
+ w(e, t);
518
+ };
519
+ c(r, (e) => {
520
+ n(U) && e(i);
521
+ }), w(e, t);
522
+ }, F = (e) => {
523
+ var t = Ce();
524
+ S(t), u(t, (e) => n(Y)?.(e)), p((e, n) => {
525
+ y(t, 1, e), C(t, n);
526
+ }, [() => ae(le("color")), () => de("color", V().editingCell?.value)]), l("input", t, (e) => n(q)(e.currentTarget.value)), l("change", t, (e) => {
527
+ n(q)(e.currentTarget.value), K();
528
+ }), j("blur", t, () => K()), l("keydown", t, function(...e) {
529
+ n(J)?.apply(this, e);
530
+ }), w(e, t);
531
+ }, I = (e) => {
532
+ let t = D(() => Ne(String(V().editingCell?.editorType)));
533
+ var r = o(), i = h(r), a = (e) => {
534
+ let r = D(() => n(t).component);
535
+ var i = o(), a = h(i);
536
+ {
537
+ let e = D(() => he(n(t), Pe()));
538
+ A(a, () => n(r), (t, r) => {
539
+ r(t, ee(() => n(e)));
540
+ });
541
+ }
542
+ w(e, i);
543
+ };
544
+ c(i, (e) => {
545
+ n(t) && e(a);
546
+ }), w(e, r);
547
+ }, L = D(() => me(String(V().editingCell?.editorType ?? ""))), R = (e) => {
548
+ var t = we();
549
+ te(t), u(t, (e) => n(Y)?.(e)), p((e, r) => {
550
+ k(t, "aria-label", n(X)), k(t, "rows", e), C(t, r);
551
+ }, [() => Math.max(1, String(V().editingCell?.value ?? "").split("\n").length), () => String(V().editingCell?.value ?? "")]), l("input", t, (e) => {
552
+ let t = e.currentTarget;
553
+ t.rows = Math.max(1, t.value.split("\n").length), n(q)(t.value);
554
+ }), j("blur", t, () => K()), l("keydown", t, function(...e) {
555
+ n(J)?.apply(this, e);
556
+ }), w(e, t);
557
+ }, z = (e) => {
558
+ let t = D(() => V().editingCell?.editorType ?? "text"), r = D(() => se(n(t)) === "text" && ce(n(t)) === "number");
559
+ var i = Te();
560
+ S(i), u(i, (e) => n(Y)?.(e)), p((e, t, a) => {
561
+ k(i, "aria-label", n(X)), y(i, 1, e), k(i, "type", t), k(i, "inputmode", n(r) ? "decimal" : void 0), C(i, a);
562
+ }, [
563
+ () => ae(le(n(t))),
564
+ () => se(n(t)),
565
+ () => de(n(t), V().editingCell?.value)
566
+ ]), l("input", i, (e) => {
567
+ let t = e.currentTarget;
568
+ if (n(r) && !fe(t.value)) {
569
+ t.value = String(V().editingCell?.value ?? "");
570
+ return;
571
+ }
572
+ n(q)(t.value);
573
+ }), j("blur", i, () => K()), l("keydown", i, function(...e) {
574
+ n(J)?.apply(this, e);
575
+ }), w(e, i);
576
+ };
577
+ c(a, (e) => {
578
+ s.column.columnDef.cellEditor ? e(f) : V().editingCell?.editorType === "checkbox" ? e(_, 1) : V().editingCell?.editorType === "list" ? e(v, 2) : V().editingCell?.editorType === "chips" ? e(x, 3) : V().editingCell?.editorType === "rating" ? e(T, 4) : V().editingCell?.editorType === "select" ? e(re, 5) : V().editingCell?.editorType === "rich-select" ? e(E, 6) : V().editingCell?.editorType === "textarea" ? e(O, 7) : V().editingCell?.editorType === "autocomplete" ? e(ie, 8) : V().editingCell?.editorType === "date" ? e(M, 9) : V().editingCell?.editorType === "datetime" ? e(N, 10) : V().editingCell?.editorType === "time" ? e(P, 11) : V().editingCell?.editorType === "color" ? e(F, 12) : n(L) ? e(I, 13) : (V().editingCell?.editorType ?? "text") === "text" && s.column?.columnDef.editorMultiline ? e(R, 14) : e(z, -1);
579
+ }), w(e, r);
580
+ };
581
+ c(Fe, (e) => {
582
+ Ee() ? e(Ie) : e(Le, -1);
583
+ }), w(a, $), v();
584
+ }
585
+ a([
586
+ "mousedown",
587
+ "click",
588
+ "keydown",
589
+ "change",
590
+ "pointerdown",
591
+ "input"
592
+ ]);
593
+ //#endregion
594
+ export { B as default };