@svgrid/grid 2.6.22 → 2.6.23

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