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