@svgrid/grid-wc 3.0.48 → 3.0.50
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/GridFind-B5zpfGlk.js +39 -0
- package/dist/GridFooter-CSzuZWPH.js +142 -0
- package/dist/GridMenus-DGR1VkZL.js +1480 -0
- package/dist/PinSplitter-BbQwf4Eh.js +178 -0
- package/dist/{SvChartMenu-B6kpmwUv.js → SvChartMenu-CFvrEIJf.js} +133 -133
- package/dist/{SvDateRangeInput-ByR-LFgf.js → SvDateRangeInput-B8uPcD0z.js} +107 -107
- package/dist/{SvDateTimePicker-BCxhFb5c.js → SvDateTimePicker-D9MnooXn.js} +317 -317
- package/dist/{SvField-CtzxdF7J.js → SvField--1Px2j7E.js} +105 -105
- package/dist/SvGridCellEditor-BzLvoGRp.js +594 -0
- package/dist/SvGridChart-rvB4vvCB.js +3684 -0
- package/dist/{SvGridChartBuilder-BCQ3W8TY.js → SvGridChartBuilder-C0HbpZhw.js} +386 -386
- package/dist/SvGridChartPanel-CftDsgLi.js +1689 -0
- package/dist/{SvGridChartView-DWxEFzdM.js → SvGridChartView-BMJf1fCo.js} +13 -13
- package/dist/SvGridDropdown-CZRv-0Cw.js +258 -0
- package/dist/angular/fesm2022/svgrid-grid-wc-angular.mjs +4 -2
- package/dist/angular/fesm2022/svgrid-grid-wc-angular.mjs.map +1 -1
- package/dist/angular/types/svgrid-grid-wc-angular.d.ts +2 -1
- package/dist/chart/{SvChartMenu-NxEyX5kU.js → SvChartMenu-C7EDkoh8.js} +98 -91
- package/dist/chart/sv-chart-element.js +25 -21
- package/dist/{chart-Cwv61lx6.js → chart-CVOJXX1_.js} +24 -20
- package/dist/{shadow/chart-export-pdf-BZy6f5QB.js → chart-export-pdf-CFq7Y-pq.js} +1 -1
- package/dist/{shadow/chart-summary-D02rGO0c.js → chart-summary-B52586F9.js} +1 -1
- package/dist/{client-OtsRxGjS.js → client-DeNKZvIV.js} +593 -581
- package/dist/{date-format-DngG1HJ5.js → date-format-B1XMOxlA.js} +309 -309
- package/dist/dismissable-CuL0k6PX.js +52 -0
- package/dist/{grid-extension.svelte-DToFhcZv.js → grid-extension.svelte-B_gzYJQQ.js} +8 -8
- package/dist/{shadow/range-commit-C6Rogxem.js → range-commit-BriJZw_M.js} +1 -1
- package/dist/react/index.d.ts +3 -1
- package/dist/react/index.js +1 -1
- package/dist/{row-drag-DLQMyiV3.js → row-drag-DevACK09.js} +1 -1
- package/dist/shadow/GridFind-CVqPCjPK.js +39 -0
- package/dist/shadow/GridFooter-DY9numnH.js +142 -0
- package/dist/shadow/GridMenus-Bl11jIy6.js +1480 -0
- package/dist/shadow/PinSplitter-DNjnUtbi.js +178 -0
- package/dist/shadow/{SvChartMenu-C74rWwjU.js → SvChartMenu-Ca2hVFUA.js} +133 -133
- package/dist/shadow/{SvDateRangeInput-9Wq4E64y.js → SvDateRangeInput-CNXId95j.js} +107 -107
- package/dist/shadow/{SvDateTimePicker-y9jPLR19.js → SvDateTimePicker-B6lwKYFq.js} +317 -317
- package/dist/shadow/{SvField-DGPj2clt.js → SvField-1OiD5dJA.js} +105 -105
- package/dist/shadow/SvGridCellEditor-CRImfWTE.js +594 -0
- package/dist/shadow/SvGridChart-_GY1Mgr4.js +3684 -0
- package/dist/shadow/{SvGridChartBuilder-VUKgOcp7.js → SvGridChartBuilder-Ci_GlCg3.js} +386 -386
- package/dist/shadow/SvGridChartPanel-BHczMJAe.js +1689 -0
- package/dist/shadow/{SvGridChartView-DQmJahyT.js → SvGridChartView-BJEpaO8h.js} +13 -13
- package/dist/shadow/SvGridDropdown-giyKVcC0.js +258 -0
- package/dist/shadow/{chart-Cwv61lx6.js → chart-CVOJXX1_.js} +24 -20
- package/dist/{chart-export-pdf-DyuVs1gO.js → shadow/chart-export-pdf-Ne0ET-JM.js} +1 -1
- package/dist/{chart-summary-D02rGO0c.js → shadow/chart-summary-B52586F9.js} +1 -1
- package/dist/shadow/{client-OtsRxGjS.js → client-DeNKZvIV.js} +593 -581
- package/dist/shadow/{date-format-C9UkbCig.js → date-format-VCW-gATr.js} +309 -309
- package/dist/shadow/dismissable-CuL0k6PX.js +52 -0
- package/dist/shadow/{grid-extension.svelte-DToFhcZv.js → grid-extension.svelte-B_gzYJQQ.js} +8 -8
- package/dist/{range-commit-C6Rogxem.js → shadow/range-commit-BriJZw_M.js} +1 -1
- package/dist/shadow/{row-drag-DLQMyiV3.js → row-drag-DevACK09.js} +1 -1
- package/dist/shadow/sv-grid-scrollbar-yHMClECS.js +228 -0
- package/dist/shadow/sv-grid-shadow-element.d.ts +2 -0
- package/dist/shadow/sv-grid-shadow-element.js +5686 -5829
- package/dist/{svelte-virtualizer.svelte-DWvD9wvL.js → shadow/svelte-virtualizer.svelte-D8oCAQUc.js} +4 -4
- package/dist/sv-grid-element.d.ts +2 -0
- package/dist/sv-grid-element.js +5668 -5811
- package/dist/sv-grid-scrollbar-yHMClECS.js +228 -0
- package/dist/{shadow/svelte-virtualizer.svelte-DWvD9wvL.js → svelte-virtualizer.svelte-D8oCAQUc.js} +4 -4
- package/dist/vue/index.d.ts +2 -1
- package/dist/vue/index.js +1 -1
- package/package.json +3 -3
- package/dist/GridFind-C1YbloFh.js +0 -39
- package/dist/GridFooter-DOR8m9GQ.js +0 -142
- package/dist/GridMenus-Da8XGbc6.js +0 -1461
- package/dist/PinSplitter-Du4ZF8T3.js +0 -178
- package/dist/SvGridCellEditor-BUdVD7xM.js +0 -594
- package/dist/SvGridChart-DkKI8-bj.js +0 -3684
- package/dist/SvGridChartPanel-uqul044E.js +0 -1689
- package/dist/SvGridDropdown-CnCQuXaI.js +0 -258
- package/dist/dismissable-CQ6XFXsk.js +0 -45
- package/dist/shadow/GridFind-CcoKoisE.js +0 -39
- package/dist/shadow/GridFooter-CDq71ytl.js +0 -142
- package/dist/shadow/GridMenus-RAp-E3hp.js +0 -1461
- package/dist/shadow/PinSplitter-BAYTAZtm.js +0 -178
- package/dist/shadow/SvGridCellEditor-CzeBp9lp.js +0 -594
- package/dist/shadow/SvGridChart-zTsB6F3Y.js +0 -3684
- package/dist/shadow/SvGridChartPanel-DkjEUB7t.js +0 -1689
- package/dist/shadow/SvGridDropdown-B_5kqHQE.js +0 -258
- package/dist/shadow/dismissable-CQ6XFXsk.js +0 -45
|
@@ -1,594 +0,0 @@
|
|
|
1
|
-
import { $ as e, A as t, B as n, C as r, D as i, I as a, J 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 ee, b as te, ct as _, d as v, f as y, g as ne, h as b, i as re, it as ie, j as x, k as S, n as C, p as ae, q as w, rt as oe, st as T, tt as E, w as D, x as O, y as k, z as A } from "./client-OtsRxGjS.js";
|
|
2
|
-
import { C as se, d as ce, h as le, m as ue, o as de, p as j, 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 = c("<span class=\"sv-grid-chip sv-grid-chip-removable\"> <button type=\"button\" class=\"sv-grid-chip-remove\">×</button></span>"), P = c("<button type=\"button\" class=\"sv-grid-chip-commit\" aria-label=\"Commit chip selection\">Done</button>"), F = 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>"), I = c("<input type=\"checkbox\" class=\"sv-grid-fr-editor sv-grid-fr-checkbox\"/>"), L = c("<option> </option>"), R = c("<select class=\"sv-grid-cell-editor sv-grid-fr-editor\"></select>"), z = c("<input class=\"sv-grid-cell-editor sv-grid-fr-editor\"/>"), ge = c("<button type=\"button\" class=\"sv-grid-checkbox\" role=\"checkbox\" aria-label=\"Edit checkbox value\"></button>"), _e = c("<button type=\"button\" role=\"radio\">★</button>"), ve = 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>"), ye = c("<textarea class=\"sv-grid-cell-editor sv-grid-cell-editor-textarea\" rows=\"4\"></textarea>"), be = c("<button type=\"button\" class=\"sv-grid-autocomplete-option\" role=\"option\"> </button>"), xe = c("<div class=\"sv-grid-autocomplete-list\" role=\"listbox\"></div>"), Se = c("<div class=\"sv-grid-autocomplete\"><input class=\"sv-grid-cell-editor sv-grid-cell-editor-autocomplete\" type=\"text\"/> <!></div>"), Ce = c("<input type=\"color\"/>"), we = c("<textarea class=\"sv-grid-cell-editor sv-grid-cell-editor-text sv-grid-cell-editor-multiline\"></textarea>"), Te = c("<input/>");
|
|
7
|
-
function B(a, c) {
|
|
8
|
-
ee(c, !0);
|
|
9
|
-
let B = (e, n = _, a = _, c = _, l = _) => {
|
|
10
|
-
var u = x(), p = o(u), h = (e) => {
|
|
11
|
-
var s = x(), c = o(s), u = (e) => {
|
|
12
|
-
var i = x(), s = o(i);
|
|
13
|
-
{
|
|
14
|
-
let e = E(() => V().editingCell?.value);
|
|
15
|
-
r(s, () => A(H), (t, r) => {
|
|
16
|
-
r(t, {
|
|
17
|
-
get options() {
|
|
18
|
-
return n();
|
|
19
|
-
},
|
|
20
|
-
get loading() {
|
|
21
|
-
return l();
|
|
22
|
-
},
|
|
23
|
-
get value() {
|
|
24
|
-
return A(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
|
-
t(e, i);
|
|
46
|
-
};
|
|
47
|
-
i(c, (e) => {
|
|
48
|
-
A(H) && e(u);
|
|
49
|
-
}), t(e, s);
|
|
50
|
-
}, g = (e) => {
|
|
51
|
-
var n = F();
|
|
52
|
-
y(n, "tabindex", -1);
|
|
53
|
-
var r = w(n), o = w(r);
|
|
54
|
-
D(o, 19, c, (e, t) => String(e) + "_" + t, (e, n, r) => {
|
|
55
|
-
var i = N(), o = w(i), l = m(o);
|
|
56
|
-
T(i), f((e, t) => {
|
|
57
|
-
S(o, `${e ?? ""} `), y(l, "aria-label", `Remove ${t ?? ""}`);
|
|
58
|
-
}, [() => String(A(n)), () => String(A(n))]), s("mousedown", l, (e) => e.preventDefault()), s("click", l, () => {
|
|
59
|
-
let e = c().filter((e, t) => t !== A(r));
|
|
60
|
-
V().editingCell = V().editingCell ? {
|
|
61
|
-
...V().editingCell,
|
|
62
|
-
value: a() ? e : e[0] ?? null
|
|
63
|
-
} : V().editingCell;
|
|
64
|
-
}), t(e, i);
|
|
65
|
-
});
|
|
66
|
-
var l = m(o, 2);
|
|
67
|
-
O(l, (e) => A(Y)?.(e));
|
|
68
|
-
var u = m(l, 2), p = (e) => {
|
|
69
|
-
var n = P();
|
|
70
|
-
s("mousedown", n, (e) => e.preventDefault()), s("click", n, () => K()), t(e, n);
|
|
71
|
-
};
|
|
72
|
-
i(u, (e) => {
|
|
73
|
-
a() && e(p);
|
|
74
|
-
}), T(r), T(n), f(() => y(l, "placeholder", a() ? "Type, Enter to add" : "Type a value")), s("keydown", l, (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() ? [...c(), 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") A(J)(e);
|
|
86
|
-
else if (e.key === "Backspace" && e.currentTarget.value === "" && c().length > 0) {
|
|
87
|
-
e.preventDefault();
|
|
88
|
-
let t = c().slice(0, -1);
|
|
89
|
-
V().editingCell = V().editingCell ? {
|
|
90
|
-
...V().editingCell,
|
|
91
|
-
value: a() ? t : t[0] ?? null
|
|
92
|
-
} : V().editingCell;
|
|
93
|
-
}
|
|
94
|
-
}), d("blur", l, () => K()), t(e, n);
|
|
95
|
-
};
|
|
96
|
-
i(p, (e) => {
|
|
97
|
-
n().length > 0 ? e(h) : e(g, -1);
|
|
98
|
-
}), t(e, u);
|
|
99
|
-
}, V = C(c, "ctrl", 7), Ee = C(c, "fullRow", 3, !1), H = e(null), U = e(null);
|
|
100
|
-
p(() => {
|
|
101
|
-
let e = V().editingCell?.editorType;
|
|
102
|
-
(e === "list" || e === "chips" || e === "select" || e === "rich-select") && !A(H) && import("./SvGridDropdown-CnCQuXaI.js").then((e) => u(H, e.default, !0)), (e === "date" || e === "datetime" || e === "time") && !A(U) && import("./SvDateTimePicker-BCxhFb5c.js").then((e) => u(U, e.default, !0));
|
|
103
|
-
});
|
|
104
|
-
let De = E(() => V().grid), Oe = E(() => V().fullRowEdit), W = E(() => V().getColumnEditorOptions), G = E(() => V().areEditorOptionsLoading);
|
|
105
|
-
function K() {
|
|
106
|
-
let e = document.activeElement !== document.body;
|
|
107
|
-
V().saveEditingCell(), e && n().then(() => {
|
|
108
|
-
document.activeElement === document.body && V().gridRootEl?.focus({ preventScroll: !0 });
|
|
109
|
-
});
|
|
110
|
-
}
|
|
111
|
-
let q = E(() => V().updateEditingCellValue), J = E(() => V().onEditorKeyDown), Y = E(() => V().focusOnMount), ke = E(() => V().toggleCheckboxWithKeyboard), X = E(() => V().toolPanelHeaderLabel(c.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: c.column.columnDef,
|
|
136
|
-
row: c.row.original,
|
|
137
|
-
typed: e?.typed === !0,
|
|
138
|
-
grid: V(),
|
|
139
|
-
onChange: (e) => A(q)(e),
|
|
140
|
-
onCommit: (e) => {
|
|
141
|
-
e !== void 0 && A(q)(e), K();
|
|
142
|
-
},
|
|
143
|
-
onCancel: () => {
|
|
144
|
-
V().editingCell = null, V().gridRootEl?.focus({ preventScroll: !0 });
|
|
145
|
-
},
|
|
146
|
-
onCommitAndMove: (e, t) => {
|
|
147
|
-
e !== void 0 && A(q)(e), V().commitAndMoveByTab(t === -1);
|
|
148
|
-
},
|
|
149
|
-
onCommitAndMoveDown: (e, t) => {
|
|
150
|
-
e !== void 0 && A(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 $ = x(), Fe = o($), Ie = (e) => {
|
|
159
|
-
let n = E(() => c.column.columnDef.editorType ?? "text"), r = E(() => A(Oe)?.draft[c.column.id]);
|
|
160
|
-
var a = x(), l = o(a), u = (e) => {
|
|
161
|
-
var n = I();
|
|
162
|
-
v(n), f((e) => ae(n, e), [() => !!A(r)]), s("change", n, (e) => V().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);
|
|
163
|
-
}, d = (e) => {
|
|
164
|
-
let n = E(() => A(W)(c.column, c.row));
|
|
165
|
-
var i = R();
|
|
166
|
-
D(i, 21, () => A(n), (e) => Ae(e), (e, n) => {
|
|
167
|
-
var r = L(), i = h(r, !0), a = {};
|
|
168
|
-
f((e, t) => {
|
|
169
|
-
S(i, e), a !== (a = t) && (r.value = (r.__value = a) ?? "");
|
|
170
|
-
}, [() => je(A(n)), () => Ae(A(n))]), t(e, r);
|
|
171
|
-
}), T(i);
|
|
172
|
-
var a;
|
|
173
|
-
ne(i), f((e) => {
|
|
174
|
-
a !== (a = e) && (i.value = (i.__value = a) ?? "", g(i, a));
|
|
175
|
-
}, [() => String(A(r) ?? "")]), s("change", i, (e) => V().setFullRowDraft(c.column.id, e.currentTarget.value)), s("keydown", i, Q), s("pointerdown", i, (e) => e.stopPropagation()), s("click", i, (e) => e.stopPropagation()), t(e, i);
|
|
176
|
-
}, p = (e) => {
|
|
177
|
-
let i = E(() => A(n) === "number" ? "number" : A(n) === "date" ? "date" : A(n) === "datetime" ? "datetime-local" : A(n) === "time" ? "time" : A(n) === "password" ? "password" : "text");
|
|
178
|
-
var a = z();
|
|
179
|
-
v(a), f((e) => {
|
|
180
|
-
y(a, "type", A(i)), b(a, e);
|
|
181
|
-
}, [() => String(A(r) ?? "")]), s("input", a, (e) => V().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);
|
|
182
|
-
};
|
|
183
|
-
i(l, (e) => {
|
|
184
|
-
A(n) === "checkbox" ? e(u) : A(n) === "list" || A(n) === "select" || A(n) === "rich-select" ? e(d, 1) : e(p, -1);
|
|
185
|
-
}), t(e, a);
|
|
186
|
-
}, Le = (e) => {
|
|
187
|
-
var n = x(), a = o(n), u = (e) => {
|
|
188
|
-
let n = E(() => c.column.columnDef.cellEditor);
|
|
189
|
-
var r = x(), i = o(r);
|
|
190
|
-
{
|
|
191
|
-
let e = E(() => ({
|
|
192
|
-
cell: c.row.getAllCells().find((e) => e.column.id === c.column.id),
|
|
193
|
-
row: c.row,
|
|
194
|
-
column: c.column,
|
|
195
|
-
table: A(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
|
-
l(i, () => A(n), () => A(e));
|
|
215
|
-
}
|
|
216
|
-
t(e, r);
|
|
217
|
-
}, p = (e) => {
|
|
218
|
-
var n = ge();
|
|
219
|
-
O(n, (e) => Z?.(e)), f((e) => y(n, "aria-checked", e), [() => !!V().editingCell.value]), s("click", n, (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
|
-
}), s("keydown", n, (e) => {
|
|
227
|
-
if (e.key === "Enter" || e.key === " ") {
|
|
228
|
-
A(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
|
-
A(J)(e);
|
|
239
|
-
}), d("blur", n, () => K()), t(e, n);
|
|
240
|
-
}, g = (e) => {
|
|
241
|
-
let n = E(() => A(W)(c.column, c.row)), a = E(() => A(G)(c.column, c.row)), s = E(() => c.column.columnDef.editorMultiple === !0);
|
|
242
|
-
var l = x(), u = o(l), d = (e) => {
|
|
243
|
-
var i = x(), c = o(i);
|
|
244
|
-
{
|
|
245
|
-
let e = E(() => V().editingCell?.value);
|
|
246
|
-
r(c, () => A(H), (t, r) => {
|
|
247
|
-
r(t, {
|
|
248
|
-
get options() {
|
|
249
|
-
return A(n);
|
|
250
|
-
},
|
|
251
|
-
get loading() {
|
|
252
|
-
return A(a);
|
|
253
|
-
},
|
|
254
|
-
get value() {
|
|
255
|
-
return A(e);
|
|
256
|
-
},
|
|
257
|
-
get multiple() {
|
|
258
|
-
return A(s);
|
|
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
|
-
t(e, i);
|
|
276
|
-
};
|
|
277
|
-
i(u, (e) => {
|
|
278
|
-
A(H) && e(d);
|
|
279
|
-
}), t(e, l);
|
|
280
|
-
}, ee = (e) => {
|
|
281
|
-
let t = E(() => A(W)(c.column, c.row)), n = E(() => A(G)(c.column, c.row)), r = E(() => c.column.columnDef.editorMultiple === !0), i = E(() => se(V().editingCell?.value));
|
|
282
|
-
B(e, () => A(t), () => A(r), () => A(i), () => A(n));
|
|
283
|
-
}, _ = (e) => {
|
|
284
|
-
let n = E(() => Math.max(0, Math.min(5, Math.round(Number(V().editingCell?.value) || 0)))), r = E(() => Math.min(5, Math.max(1, A(n))));
|
|
285
|
-
var i = ve(), a = w(i);
|
|
286
|
-
D(a, 16, () => [
|
|
287
|
-
1,
|
|
288
|
-
2,
|
|
289
|
-
3,
|
|
290
|
-
4,
|
|
291
|
-
5
|
|
292
|
-
], (e) => e, (e, i) => {
|
|
293
|
-
var a = _e();
|
|
294
|
-
O(a, (e, t) => Z?.(e, t), () => i === A(r)), f(() => {
|
|
295
|
-
y(a, "aria-checked", A(n) >= i), y(a, "aria-label", `${i} ${i === 1 ? "star" : "stars"}`), k(a, 1, `sv-grid-rating-star ${A(n) >= i ? "sv-grid-rating-star-on" : ""}`);
|
|
296
|
-
}), s("mousedown", a, (e) => e.preventDefault()), s("click", a, (e) => {
|
|
297
|
-
e.stopPropagation(), V().editingCell = V().editingCell ? {
|
|
298
|
-
...V().editingCell,
|
|
299
|
-
value: i
|
|
300
|
-
} : V().editingCell, K();
|
|
301
|
-
}), s("keydown", a, (e) => {
|
|
302
|
-
let t = e.key;
|
|
303
|
-
if (t !== "ArrowLeft" && t !== "ArrowRight" && t !== "Home" && t !== "End") {
|
|
304
|
-
A(J)(e);
|
|
305
|
-
return;
|
|
306
|
-
}
|
|
307
|
-
e.preventDefault(), e.stopPropagation();
|
|
308
|
-
let r = Math.min(5, Math.max(1, A(n))), i = t === "Home" ? 1 : t === "End" ? 5 : t === "ArrowLeft" ? Math.max(1, r - 1) : Math.min(5, r + 1);
|
|
309
|
-
V().editingCell = V().editingCell ? {
|
|
310
|
-
...V().editingCell,
|
|
311
|
-
value: i
|
|
312
|
-
} : V().editingCell, (e.currentTarget.parentElement?.querySelectorAll(".sv-grid-rating-star"))?.[i - 1]?.focus({ preventScroll: !0 });
|
|
313
|
-
}), t(e, a);
|
|
314
|
-
});
|
|
315
|
-
var o = m(a, 2);
|
|
316
|
-
T(i), s("mousedown", o, (e) => e.preventDefault()), s("click", o, (e) => {
|
|
317
|
-
e.stopPropagation(), V().editingCell = V().editingCell ? {
|
|
318
|
-
...V().editingCell,
|
|
319
|
-
value: 0
|
|
320
|
-
} : V().editingCell, K();
|
|
321
|
-
}), t(e, i);
|
|
322
|
-
}, ne = (e) => {
|
|
323
|
-
let n = E(() => A(W)(c.column, c.row)), a = E(() => A(G)(c.column, c.row));
|
|
324
|
-
var s = x(), l = o(s), u = (e) => {
|
|
325
|
-
var i = x(), s = o(i);
|
|
326
|
-
{
|
|
327
|
-
let e = E(() => V().editingCell?.value);
|
|
328
|
-
r(s, () => A(H), (t, r) => {
|
|
329
|
-
r(t, {
|
|
330
|
-
get options() {
|
|
331
|
-
return A(n);
|
|
332
|
-
},
|
|
333
|
-
get loading() {
|
|
334
|
-
return A(a);
|
|
335
|
-
},
|
|
336
|
-
get value() {
|
|
337
|
-
return A(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
|
-
t(e, i);
|
|
356
|
-
};
|
|
357
|
-
i(l, (e) => {
|
|
358
|
-
A(H) && e(u);
|
|
359
|
-
}), t(e, s);
|
|
360
|
-
}, ie = (e) => {
|
|
361
|
-
let n = E(() => A(W)(c.column, c.row)), a = E(() => A(G)(c.column, c.row));
|
|
362
|
-
var s = x(), l = o(s), u = (e) => {
|
|
363
|
-
var i = x(), s = o(i);
|
|
364
|
-
{
|
|
365
|
-
let e = E(() => V().editingCell?.value);
|
|
366
|
-
r(s, () => A(H), (t, r) => {
|
|
367
|
-
r(t, {
|
|
368
|
-
get options() {
|
|
369
|
-
return A(n);
|
|
370
|
-
},
|
|
371
|
-
get loading() {
|
|
372
|
-
return A(a);
|
|
373
|
-
},
|
|
374
|
-
get value() {
|
|
375
|
-
return A(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
|
-
t(e, i);
|
|
395
|
-
};
|
|
396
|
-
i(l, (e) => {
|
|
397
|
-
A(H) && e(u);
|
|
398
|
-
}), t(e, s);
|
|
399
|
-
}, C = (e) => {
|
|
400
|
-
var n = ye();
|
|
401
|
-
oe(n), O(n, (e) => A(Y)?.(e)), f((e) => {
|
|
402
|
-
y(n, "aria-label", A(X)), b(n, e);
|
|
403
|
-
}, [() => String(V().editingCell?.value ?? "")]), s("pointerdown", n, (e) => e.stopPropagation()), s("input", n, (e) => A(q)(e.currentTarget.value)), s("keydown", n, (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
|
-
}), d("blur", n, () => K()), t(e, n);
|
|
414
|
-
}, ae = (e) => {
|
|
415
|
-
let n = E(() => A(W)(c.column, c.row)), r = E(() => String(V().editingCell?.value ?? "")), a = E(() => A(r).trim() ? A(n).filter((e) => String(e.label).toLowerCase().includes(A(r).toLowerCase())) : A(n));
|
|
416
|
-
var o = Se(), l = w(o);
|
|
417
|
-
v(l), O(l, (e) => A(Y)?.(e));
|
|
418
|
-
var u = m(l, 2), p = (e) => {
|
|
419
|
-
var n = xe();
|
|
420
|
-
D(n, 21, () => A(a).slice(0, 50), (e) => e.value, (e, n) => {
|
|
421
|
-
var i = be(), a = h(i, !0);
|
|
422
|
-
f((e) => {
|
|
423
|
-
y(i, "aria-selected", e), S(a, A(n).label);
|
|
424
|
-
}, [() => String(A(n).value) === A(r)]), s("mousedown", i, (e) => {
|
|
425
|
-
e.preventDefault(), V().editingCell = V().editingCell ? {
|
|
426
|
-
...V().editingCell,
|
|
427
|
-
value: A(n).value
|
|
428
|
-
} : V().editingCell, K();
|
|
429
|
-
}), t(e, i);
|
|
430
|
-
}), T(n), t(e, n);
|
|
431
|
-
};
|
|
432
|
-
i(u, (e) => {
|
|
433
|
-
A(a).length > 0 && e(p);
|
|
434
|
-
}), T(o), f(() => b(l, A(r))), s("pointerdown", l, (e) => e.stopPropagation()), s("input", l, (e) => A(q)(e.currentTarget.value)), d("blur", l, () => K()), s("keydown", l, function(...e) {
|
|
435
|
-
A(J)?.apply(this, e);
|
|
436
|
-
}), t(e, o);
|
|
437
|
-
}, M = (e) => {
|
|
438
|
-
var n = x(), a = o(n), s = (e) => {
|
|
439
|
-
var n = x(), i = o(n);
|
|
440
|
-
{
|
|
441
|
-
let e = E(() => V().editingCell?.value), t = E(() => c.column.columnDef.editorFormatString ?? "yyyy-MM-dd");
|
|
442
|
-
r(i, () => A(U), (n, r) => {
|
|
443
|
-
r(n, {
|
|
444
|
-
get value() {
|
|
445
|
-
return A(e);
|
|
446
|
-
},
|
|
447
|
-
get formatString() {
|
|
448
|
-
return A(t);
|
|
449
|
-
},
|
|
450
|
-
dropDownDisplayMode: "calendar",
|
|
451
|
-
autoOpen: !0,
|
|
452
|
-
block: !0,
|
|
453
|
-
onChange: (e) => A(q)(e),
|
|
454
|
-
onCommit: () => K(),
|
|
455
|
-
onCancel: () => {
|
|
456
|
-
V().editingCell = null, V().gridRootEl?.focus({ preventScroll: !0 });
|
|
457
|
-
}
|
|
458
|
-
});
|
|
459
|
-
});
|
|
460
|
-
}
|
|
461
|
-
t(e, n);
|
|
462
|
-
};
|
|
463
|
-
i(a, (e) => {
|
|
464
|
-
A(U) && e(s);
|
|
465
|
-
}), t(e, n);
|
|
466
|
-
}, N = (e) => {
|
|
467
|
-
var n = x(), a = o(n), s = (e) => {
|
|
468
|
-
var n = x(), i = o(n);
|
|
469
|
-
{
|
|
470
|
-
let e = E(() => V().editingCell?.value), t = E(() => c.column.columnDef.editorFormatString ?? "yyyy-MM-dd HH:mm");
|
|
471
|
-
r(i, () => A(U), (n, r) => {
|
|
472
|
-
r(n, {
|
|
473
|
-
get value() {
|
|
474
|
-
return A(e);
|
|
475
|
-
},
|
|
476
|
-
get formatString() {
|
|
477
|
-
return A(t);
|
|
478
|
-
},
|
|
479
|
-
dropDownDisplayMode: "both",
|
|
480
|
-
autoOpen: !0,
|
|
481
|
-
block: !0,
|
|
482
|
-
onChange: (e) => A(q)(e),
|
|
483
|
-
onCommit: () => K(),
|
|
484
|
-
onCancel: () => {
|
|
485
|
-
V().editingCell = null, V().gridRootEl?.focus({ preventScroll: !0 });
|
|
486
|
-
}
|
|
487
|
-
});
|
|
488
|
-
});
|
|
489
|
-
}
|
|
490
|
-
t(e, n);
|
|
491
|
-
};
|
|
492
|
-
i(a, (e) => {
|
|
493
|
-
A(U) && e(s);
|
|
494
|
-
}), t(e, n);
|
|
495
|
-
}, P = (e) => {
|
|
496
|
-
var n = x(), a = o(n), s = (e) => {
|
|
497
|
-
var n = x(), i = o(n);
|
|
498
|
-
{
|
|
499
|
-
let e = E(() => pe(V().editingCell?.value));
|
|
500
|
-
r(i, () => A(U), (t, n) => {
|
|
501
|
-
n(t, {
|
|
502
|
-
get value() {
|
|
503
|
-
return A(e);
|
|
504
|
-
},
|
|
505
|
-
formatString: "HH:mm",
|
|
506
|
-
dropDownDisplayMode: "time",
|
|
507
|
-
autoOpen: !0,
|
|
508
|
-
block: !0,
|
|
509
|
-
onChange: (e) => A(q)(de(e)),
|
|
510
|
-
onCommit: () => K(),
|
|
511
|
-
onCancel: () => {
|
|
512
|
-
V().editingCell = null, V().gridRootEl?.focus({ preventScroll: !0 });
|
|
513
|
-
}
|
|
514
|
-
});
|
|
515
|
-
});
|
|
516
|
-
}
|
|
517
|
-
t(e, n);
|
|
518
|
-
};
|
|
519
|
-
i(a, (e) => {
|
|
520
|
-
A(U) && e(s);
|
|
521
|
-
}), t(e, n);
|
|
522
|
-
}, F = (e) => {
|
|
523
|
-
var n = Ce();
|
|
524
|
-
v(n), O(n, (e) => A(Y)?.(e)), f((e, t) => {
|
|
525
|
-
k(n, 1, e), b(n, t);
|
|
526
|
-
}, [() => te(ue("color")), () => j("color", V().editingCell?.value)]), s("input", n, (e) => A(q)(e.currentTarget.value)), s("change", n, (e) => {
|
|
527
|
-
A(q)(e.currentTarget.value), K();
|
|
528
|
-
}), d("blur", n, () => K()), s("keydown", n, function(...e) {
|
|
529
|
-
A(J)?.apply(this, e);
|
|
530
|
-
}), t(e, n);
|
|
531
|
-
}, I = (e) => {
|
|
532
|
-
let n = E(() => Ne(String(V().editingCell?.editorType)));
|
|
533
|
-
var a = x(), s = o(a), c = (e) => {
|
|
534
|
-
let i = E(() => A(n).component);
|
|
535
|
-
var a = x(), s = o(a);
|
|
536
|
-
{
|
|
537
|
-
let e = E(() => he(A(n), Pe()));
|
|
538
|
-
r(s, () => A(i), (t, n) => {
|
|
539
|
-
n(t, re(() => A(e)));
|
|
540
|
-
});
|
|
541
|
-
}
|
|
542
|
-
t(e, a);
|
|
543
|
-
};
|
|
544
|
-
i(s, (e) => {
|
|
545
|
-
A(n) && e(c);
|
|
546
|
-
}), t(e, a);
|
|
547
|
-
}, L = E(() => me(String(V().editingCell?.editorType ?? ""))), R = (e) => {
|
|
548
|
-
var n = we();
|
|
549
|
-
oe(n), O(n, (e) => A(Y)?.(e)), f((e, t) => {
|
|
550
|
-
y(n, "aria-label", A(X)), y(n, "rows", e), b(n, t);
|
|
551
|
-
}, [() => Math.max(1, String(V().editingCell?.value ?? "").split("\n").length), () => String(V().editingCell?.value ?? "")]), s("input", n, (e) => {
|
|
552
|
-
let t = e.currentTarget;
|
|
553
|
-
t.rows = Math.max(1, t.value.split("\n").length), A(q)(t.value);
|
|
554
|
-
}), d("blur", n, () => K()), s("keydown", n, function(...e) {
|
|
555
|
-
A(J)?.apply(this, e);
|
|
556
|
-
}), t(e, n);
|
|
557
|
-
}, z = (e) => {
|
|
558
|
-
let n = E(() => V().editingCell?.editorType ?? "text"), r = E(() => ce(A(n)) === "text" && le(A(n)) === "number");
|
|
559
|
-
var i = Te();
|
|
560
|
-
v(i), O(i, (e) => A(Y)?.(e)), f((e, t, n) => {
|
|
561
|
-
y(i, "aria-label", A(X)), k(i, 1, e), y(i, "type", t), y(i, "inputmode", A(r) ? "decimal" : void 0), b(i, n);
|
|
562
|
-
}, [
|
|
563
|
-
() => te(ue(A(n))),
|
|
564
|
-
() => ce(A(n)),
|
|
565
|
-
() => j(A(n), V().editingCell?.value)
|
|
566
|
-
]), s("input", i, (e) => {
|
|
567
|
-
let t = e.currentTarget;
|
|
568
|
-
if (A(r) && !fe(t.value)) {
|
|
569
|
-
t.value = String(V().editingCell?.value ?? "");
|
|
570
|
-
return;
|
|
571
|
-
}
|
|
572
|
-
A(q)(t.value);
|
|
573
|
-
}), d("blur", i, () => K()), s("keydown", i, function(...e) {
|
|
574
|
-
A(J)?.apply(this, e);
|
|
575
|
-
}), t(e, i);
|
|
576
|
-
};
|
|
577
|
-
i(a, (e) => {
|
|
578
|
-
c.column.columnDef.cellEditor ? e(u) : V().editingCell?.editorType === "checkbox" ? e(p, 1) : V().editingCell?.editorType === "list" ? e(g, 2) : V().editingCell?.editorType === "chips" ? e(ee, 3) : V().editingCell?.editorType === "rating" ? e(_, 4) : V().editingCell?.editorType === "select" ? e(ne, 5) : V().editingCell?.editorType === "rich-select" ? e(ie, 6) : V().editingCell?.editorType === "textarea" ? e(C, 7) : V().editingCell?.editorType === "autocomplete" ? e(ae, 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) : A(L) ? e(I, 13) : (V().editingCell?.editorType ?? "text") === "text" && c.column?.columnDef.editorMultiline ? e(R, 14) : e(z, -1);
|
|
579
|
-
}), t(e, n);
|
|
580
|
-
};
|
|
581
|
-
i(Fe, (e) => {
|
|
582
|
-
Ee() ? e(Ie) : e(Le, -1);
|
|
583
|
-
}), t(a, $), ie();
|
|
584
|
-
}
|
|
585
|
-
a([
|
|
586
|
-
"mousedown",
|
|
587
|
-
"click",
|
|
588
|
-
"keydown",
|
|
589
|
-
"change",
|
|
590
|
-
"pointerdown",
|
|
591
|
-
"input"
|
|
592
|
-
]);
|
|
593
|
-
//#endregion
|
|
594
|
-
export { B as default };
|