@nice2dev/ui 1.4.14 → 1.4.16
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/CHANGELOG.md +80 -0
- package/dist/{NiceColorPicker-BLwYNSXJ.cjs → NiceColorPicker-79rkvaSk.cjs} +1 -1
- package/dist/NiceDataGrid-B1AOjgjm.cjs +10 -0
- package/dist/NiceForm-fmePSeA9.cjs +1 -0
- package/dist/{NiceHtmlEditor-BzECmDO3.cjs → NiceHtmlEditor-By7R1wRo.cjs} +1 -1
- package/dist/{NiceMention-CYRqPKGU.cjs → NiceMention-i7n2BoMw.cjs} +1 -1
- package/dist/{NiceModuleLifecyclePanel-CiYbPcHV.cjs → NiceModuleLifecyclePanel-DVHQuhc-.cjs} +1 -1
- package/dist/{NicePagination-BAxwqeEd.cjs → NicePagination-D9JguOl0.cjs} +1 -1
- package/dist/NicePivotGrid-B_7iQJys.cjs +2 -0
- package/dist/NiceSavedQueryPanel-ChY4HwpM.cjs +587 -0
- package/dist/{NiceScheduler-BqYiHPvz.cjs → NiceScheduler-B2DamQ_L.cjs} +1 -1
- package/dist/backup/NiceBackupScheduler.mjs +171 -119
- package/dist/charts/NiceOrganizationChart.mjs +159 -59
- package/dist/charts/orgChartExport.mjs +71 -0
- package/dist/charts/tidyTree.mjs +43 -0
- package/dist/charts-C3Q3r8Yz.cjs +918 -0
- package/dist/charts.cjs +1 -1
- package/dist/charts.d.ts +9 -0
- package/dist/{core-lazy-BQexApr7.cjs → core-lazy-ChKRuEPb.cjs} +1 -1
- package/dist/data/NiceDataGrid.mjs +301 -320
- package/dist/data/NiceRowEditDialog.mjs +57 -0
- package/dist/data/NiceTreeGrid.mjs +478 -433
- package/dist/data.cjs +1 -1
- package/dist/data.d.ts +43 -2
- package/dist/{devops-cgRBnZVX.cjs → devops-o6Zm0VKB.cjs} +3 -3
- package/dist/devops.cjs +1 -1
- package/dist/editors/forms/NiceForm.mjs +216 -167
- package/dist/editors/inputs/NiceUpload.mjs +238 -238
- package/dist/editors.cjs +1 -1
- package/dist/editors.d.ts +13 -1
- package/dist/feedback.cjs +1 -1
- package/dist/index.cjs +254 -254
- package/dist/index.d.ts +198 -5
- package/dist/index.mjs +928 -920
- package/dist/lazy.cjs +1 -1
- package/dist/lazy.d.ts +11 -1
- package/dist/navigation.cjs +1 -1
- package/dist/no-code/NiceDataMapper.mjs +398 -361
- package/dist/no-code-CN_q6TcB.cjs +331 -0
- package/dist/no-code.cjs +1 -1
- package/dist/no-code.d.ts +11 -1
- package/dist/style.css +1 -1
- package/dist/tools/NicePermissionMatrix.mjs +171 -138
- package/dist/tools/NiceRoleEditor.mjs +334 -297
- package/package.json +4 -4
- package/dist/NiceDataGrid-D3qRQSjy.cjs +0 -10
- package/dist/NiceForm-BWb4LTQJ.cjs +0 -1
- package/dist/NicePivotGrid-Cxu5PECg.cjs +0 -152
- package/dist/NiceSavedQueryPanel-C1nxEmMu.cjs +0 -587
- package/dist/charts-BzlvCCg9.cjs +0 -768
- package/dist/no-code-B1jzfUF5.cjs +0 -331
|
@@ -1,15 +1,14 @@
|
|
|
1
1
|
import { jsx as a, jsxs as f, Fragment as sn } from "react/jsx-runtime";
|
|
2
|
-
import { useNiceAccessMode as Ur, useNiceTranslation as Br, useComponentDisplayStyle as Vr, useComponentDisplayClass as Hr, useNiceDataSource as Jr, matchesFilterGroup as Xr, useIntent as
|
|
3
|
-
import ln, { useMemo as _, useState as h, useRef as W, useEffect as G, useCallback as g, useId as
|
|
4
|
-
import { createPortal as
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import { NicePagination as na } from "../navigation/NicePagination.mjs";
|
|
9
|
-
import { NiceFilterBuilder as ia } from "../tools/NiceFilterBuilder.mjs";
|
|
2
|
+
import { useNiceAccessMode as Ur, useNiceTranslation as Br, useComponentDisplayStyle as Vr, useComponentDisplayClass as Hr, useNiceDataSource as Jr, matchesFilterGroup as Xr, useIntent as Yr, useInputHints as Qr, NiceIcon as $, clickOnActivationKey as on } from "@nice2dev/ui-core";
|
|
3
|
+
import ln, { useMemo as _, useState as h, useRef as W, useEffect as G, useCallback as g, useId as qr, useLayoutEffect as hi } from "react";
|
|
4
|
+
import { createPortal as cn } from "react-dom";
|
|
5
|
+
import { NiceConfirmDialog as Zr } from "../feedback/NiceConfirmDialog.mjs";
|
|
6
|
+
import { NicePagination as ea } from "../navigation/NicePagination.mjs";
|
|
7
|
+
import { NiceFilterBuilder as ta } from "../tools/NiceFilterBuilder.mjs";
|
|
10
8
|
import { useAnchoredPopup as mi } from "../utility/useAnchoredPopup.mjs";
|
|
11
|
-
import { readStoredGridState as yi, applyColumnOrder as vi, buildColumnGroupSegments as
|
|
12
|
-
|
|
9
|
+
import { readStoredGridState as yi, applyColumnOrder as vi, buildColumnGroupSegments as na, buildGridState as ia, writeStoredGridState as ra, measureColumnContentWidth as xi, escapeCsvField as dt, computeAggregate as aa, formatNumberPattern as sa } from "./NiceDataGrid.helpers.mjs";
|
|
10
|
+
import { NiceRowEditDialog as oa, rowEditFormItems as la } from "./NiceRowEditDialog.mjs";
|
|
11
|
+
const oe = {
|
|
13
12
|
width: 12,
|
|
14
13
|
height: 12,
|
|
15
14
|
viewBox: "0 0 24 24",
|
|
@@ -19,19 +18,19 @@ const le = {
|
|
|
19
18
|
strokeLinecap: "round",
|
|
20
19
|
strokeLinejoin: "round",
|
|
21
20
|
"aria-hidden": !0
|
|
22
|
-
},
|
|
21
|
+
}, ca = () => /* @__PURE__ */ a("svg", { ...oe, children: /* @__PURE__ */ a("polyline", { points: "6 15 12 9 18 15" }) }), Le = () => /* @__PURE__ */ a("svg", { ...oe, children: /* @__PURE__ */ a("polyline", { points: "6 9 12 15 18 9" }) }), da = () => /* @__PURE__ */ f("svg", { ...oe, style: { opacity: 0.55 }, children: [
|
|
23
22
|
/* @__PURE__ */ a("polyline", { points: "6 10 12 5 18 10" }),
|
|
24
23
|
/* @__PURE__ */ a("polyline", { points: "6 14 12 19 18 14" })
|
|
25
|
-
] }), ut = () => /* @__PURE__ */ a("svg", { ...
|
|
24
|
+
] }), ut = () => /* @__PURE__ */ a("svg", { ...oe, children: /* @__PURE__ */ a("polyline", { points: "9 6 15 12 9 18" }) }), ua = () => /* @__PURE__ */ f("svg", { ...oe, children: [
|
|
26
25
|
/* @__PURE__ */ a("polyline", { points: "3 17 9 11 13 15 21 7" }),
|
|
27
26
|
/* @__PURE__ */ a("polyline", { points: "14 7 21 7 21 14" })
|
|
28
|
-
] }), fa = () => /* @__PURE__ */ f("svg", { ...
|
|
27
|
+
] }), fa = () => /* @__PURE__ */ f("svg", { ...oe, children: [
|
|
29
28
|
/* @__PURE__ */ a("polyline", { points: "3 7 9 13 13 9 21 17" }),
|
|
30
29
|
/* @__PURE__ */ a("polyline", { points: "14 17 21 17 21 10" })
|
|
31
|
-
] }), pa = () => /* @__PURE__ */ a("svg", { ...
|
|
32
|
-
function ma(
|
|
33
|
-
return typeof
|
|
34
|
-
|
|
30
|
+
] }), pa = () => /* @__PURE__ */ a("svg", { ...oe, children: /* @__PURE__ */ a("line", { x1: "4", y1: "12", x2: "20", y2: "12" }) }), ga = 40, je = (b) => b.stopPropagation(), ha = [];
|
|
31
|
+
function ma(b) {
|
|
32
|
+
return typeof b == "boolean" ? b ? /* @__PURE__ */ a(
|
|
33
|
+
$,
|
|
35
34
|
{
|
|
36
35
|
name: "check",
|
|
37
36
|
size: 16,
|
|
@@ -39,24 +38,24 @@ function ma(x) {
|
|
|
39
38
|
title: "true"
|
|
40
39
|
}
|
|
41
40
|
) : /* @__PURE__ */ a(
|
|
42
|
-
|
|
41
|
+
$,
|
|
43
42
|
{
|
|
44
43
|
name: "close",
|
|
45
44
|
size: 16,
|
|
46
45
|
className: "nice-datagrid__bool-icon nice-datagrid__bool-icon--false",
|
|
47
46
|
title: "false"
|
|
48
47
|
}
|
|
49
|
-
) : String(
|
|
48
|
+
) : String(b ?? "");
|
|
50
49
|
}
|
|
51
50
|
function ya({
|
|
52
|
-
columns:
|
|
53
|
-
data:
|
|
51
|
+
columns: b = ha,
|
|
52
|
+
data: dn,
|
|
54
53
|
keyField: D = "id",
|
|
55
54
|
dataSource: ft,
|
|
56
55
|
sortable: un = !0,
|
|
57
|
-
sortField:
|
|
56
|
+
sortField: bi,
|
|
58
57
|
sortDirection: _i,
|
|
59
|
-
onSort:
|
|
58
|
+
onSort: be,
|
|
60
59
|
showAdvancedFilter: Fe,
|
|
61
60
|
advancedFilter: wi,
|
|
62
61
|
onAdvancedFilterChange: fn,
|
|
@@ -64,7 +63,7 @@ function ya({
|
|
|
64
63
|
filterPresets: Si,
|
|
65
64
|
onSaveFilterPreset: Ni,
|
|
66
65
|
onDeleteFilterPreset: ki,
|
|
67
|
-
selectable:
|
|
66
|
+
selectable: T,
|
|
68
67
|
selectedKeys: gn,
|
|
69
68
|
onSelectionChange: te,
|
|
70
69
|
pagination: Ke,
|
|
@@ -86,29 +85,29 @@ function ya({
|
|
|
86
85
|
formItems: Mi,
|
|
87
86
|
formColumns: Ii = 2,
|
|
88
87
|
editFormTitle: Ai,
|
|
89
|
-
formProps:
|
|
88
|
+
formProps: $i,
|
|
90
89
|
onRowEdit: Ge,
|
|
91
90
|
onRowAdd: Ue,
|
|
92
|
-
onRowDelete:
|
|
91
|
+
onRowDelete: le,
|
|
93
92
|
confirmDelete: Be,
|
|
94
93
|
bulkActions: yt,
|
|
95
94
|
onBulkDelete: vt,
|
|
96
95
|
exportCsv: yn,
|
|
97
96
|
exportFilename: vn = "export",
|
|
98
|
-
detailRow:
|
|
99
|
-
expandedRowKeys:
|
|
100
|
-
onExpandedRowChange:
|
|
101
|
-
columnReorder:
|
|
102
|
-
onColumnReorder:
|
|
103
|
-
columnResize:
|
|
97
|
+
detailRow: P,
|
|
98
|
+
expandedRowKeys: Oi,
|
|
99
|
+
onExpandedRowChange: xt,
|
|
100
|
+
columnReorder: Ri,
|
|
101
|
+
onColumnReorder: xn,
|
|
102
|
+
columnResize: bt,
|
|
104
103
|
rowDraggable: w,
|
|
105
104
|
onRowReorder: Ve,
|
|
106
|
-
striped:
|
|
105
|
+
striped: Ti,
|
|
107
106
|
compact: Ei,
|
|
108
107
|
size: _t,
|
|
109
|
-
loading:
|
|
110
|
-
emptyText:
|
|
111
|
-
toolbar:
|
|
108
|
+
loading: Pi,
|
|
109
|
+
emptyText: Li,
|
|
110
|
+
toolbar: bn,
|
|
112
111
|
onRowClick: ne,
|
|
113
112
|
pinnedTopKeys: wt,
|
|
114
113
|
pinnedBottomKeys: St,
|
|
@@ -145,44 +144,44 @@ function ya({
|
|
|
145
144
|
className: Hi,
|
|
146
145
|
style: Ji,
|
|
147
146
|
accessMode: Xi,
|
|
148
|
-
id:
|
|
147
|
+
id: Yi,
|
|
149
148
|
displayStyle: Dn,
|
|
150
|
-
disabled:
|
|
149
|
+
disabled: Qi,
|
|
151
150
|
readOnly: zn,
|
|
152
|
-
error:
|
|
151
|
+
error: $t
|
|
153
152
|
}) {
|
|
154
|
-
const
|
|
153
|
+
const Ot = Ur(Xi, Yi), qi = Ot === "hidden", ce = Qi || Ot === "disabled", ke = zn || ce || Ot === "readOnly", X = !!le && !ke, re = Math.max(0, Math.floor(Vi ?? 0)), { t: d } = Br();
|
|
155
154
|
Vr("table", Dn), Hr("table", Dn);
|
|
156
155
|
const v = Jr(ft ?? null, {
|
|
157
156
|
autoLoad: !!ft,
|
|
158
157
|
defaultPageSize: pt
|
|
159
|
-
}), y = !!ft,
|
|
158
|
+
}), y = !!ft, Rt = _(() => y ? v.data : dn ?? [], [y, v.data, dn]), Je = y ? v.loading : Pi, [k] = h(
|
|
160
159
|
() => Bi ?? (j ? yi(j) : null)
|
|
161
160
|
), [Mn, In] = h(() => ({
|
|
162
161
|
field: k?.sortField ?? "",
|
|
163
162
|
dir: k?.sortDirection ?? null
|
|
164
|
-
})), [Zi, er] = h(1), [tr,
|
|
163
|
+
})), [Zi, er] = h(1), [tr, Tt] = h(/* @__PURE__ */ new Set()), [Xe, nr] = h(""), [ir, rr] = h({
|
|
165
164
|
type: "group",
|
|
166
165
|
logic: "and",
|
|
167
166
|
items: []
|
|
168
|
-
}), [An,
|
|
167
|
+
}), [An, $n] = h(!1), Y = wi ?? ir, On = (e) => {
|
|
169
168
|
fn ? fn(e) : rr(e);
|
|
170
169
|
}, ar = _(
|
|
171
|
-
() => pn ??
|
|
172
|
-
[pn,
|
|
173
|
-
), ae =
|
|
170
|
+
() => pn ?? b.filter((e) => e.filterable !== !1 && e.field).map((e) => ({ field: String(e.field), label: String(e.header ?? e.field) })),
|
|
171
|
+
[pn, b]
|
|
172
|
+
), ae = Y.items.length, [Ye, Rn] = h(k?.pageSize ?? pt), [Q, Et] = h(null), [Qe, Ce] = h(null), [de, ue] = h(null), [Pt, Tn] = h(
|
|
174
173
|
() => new Set(k?.expandedGroups ?? [])
|
|
175
|
-
), [
|
|
174
|
+
), [Lt, sr] = h(0), qe = W(null), [or, lr] = h(/* @__PURE__ */ new Set()), Ze = Oi ?? or, [De, jt] = h(
|
|
176
175
|
() => k?.columnWidths ?? {}
|
|
177
|
-
), [fe, pe] = h(null), [ge, Ft] = h(null), [Kt, Wt] = h(null), [
|
|
176
|
+
), [fe, pe] = h(null), [ge, Ft] = h(null), [Kt, Wt] = h(null), [cr, dr] = h(null), [ur, fr] = h(null), [pr, gr] = h([]), [he, Gt] = h(null), Ut = W(null), [et, Bt] = h(
|
|
178
177
|
() => k?.hiddenColumns ?? []
|
|
179
178
|
), [ze, En] = h(
|
|
180
179
|
() => k?.columnOrder ?? null
|
|
181
|
-
), [Vt, Ht] = h(null), [
|
|
180
|
+
), [Vt, Ht] = h(null), [Pn, tt] = h(null), Jt = W(null), [hr, Ln] = h(/* @__PURE__ */ new Set()), [Me, Xt] = h(null), jn = W(null), [mr, yr] = h({}), q = W(null), [vr, xr] = h(pt);
|
|
182
181
|
G(() => {
|
|
183
182
|
if (!H)
|
|
184
183
|
return;
|
|
185
|
-
const e =
|
|
184
|
+
const e = qe.current;
|
|
186
185
|
if (!e || typeof ResizeObserver > "u")
|
|
187
186
|
return;
|
|
188
187
|
const t = () => {
|
|
@@ -190,26 +189,26 @@ function ya({
|
|
|
190
189
|
if (i <= 0)
|
|
191
190
|
return;
|
|
192
191
|
const r = Math.max(1, Math.floor(i / E) - 1);
|
|
193
|
-
|
|
192
|
+
xr((s) => s === r ? s : r), y && v.setPageSize(r);
|
|
194
193
|
};
|
|
195
194
|
t();
|
|
196
195
|
const n = new ResizeObserver(t);
|
|
197
196
|
return n.observe(e), () => n.disconnect();
|
|
198
197
|
}, [H, E, y]);
|
|
199
|
-
const
|
|
198
|
+
const O = Wi ?? cr, M = Gi ?? ur, F = Ui ?? pr, Fn = W(j);
|
|
200
199
|
G(() => {
|
|
201
200
|
if (Fn.current === j)
|
|
202
201
|
return;
|
|
203
202
|
Fn.current = j;
|
|
204
203
|
const e = j ? yi(j) : null;
|
|
205
|
-
e && (jt(e.columnWidths ?? {}),
|
|
204
|
+
e && (jt(e.columnWidths ?? {}), Tn(new Set(e.expandedGroups ?? [])), Bt(e.hiddenColumns ?? []), En(e.columnOrder ?? null), In({ field: e.sortField ?? "", dir: e.sortDirection ?? null }), e.pageSize !== void 0 && Rn(e.pageSize));
|
|
206
205
|
}, [j]), G(() => {
|
|
207
206
|
!y || !k || (k.sortField && k.sortDirection && v.setSortField(k.sortField, k.sortDirection), k.pageSize !== void 0 && !H && v.setPageSize(k.pageSize));
|
|
208
207
|
}, []), G(() => {
|
|
209
208
|
if (!It?.size)
|
|
210
209
|
return;
|
|
211
|
-
|
|
212
|
-
const e = setTimeout(() =>
|
|
210
|
+
Ln(new Set(It));
|
|
211
|
+
const e = setTimeout(() => Ln(/* @__PURE__ */ new Set()), Cn);
|
|
213
212
|
return () => clearTimeout(e);
|
|
214
213
|
}, [It, Cn]), G(() => {
|
|
215
214
|
if (!ge)
|
|
@@ -217,7 +216,7 @@ function ya({
|
|
|
217
216
|
const e = () => Ft(null);
|
|
218
217
|
return document.addEventListener("click", e), () => document.removeEventListener("click", e);
|
|
219
218
|
}, [ge]);
|
|
220
|
-
const
|
|
219
|
+
const br = g(
|
|
221
220
|
(e, t) => {
|
|
222
221
|
He?.length && (e.preventDefault(), Ft({ x: e.clientX, y: e.clientY, row: t }));
|
|
223
222
|
},
|
|
@@ -225,12 +224,12 @@ function ya({
|
|
|
225
224
|
), Kn = g(
|
|
226
225
|
(e) => {
|
|
227
226
|
const t = new Set(Ze);
|
|
228
|
-
t.has(e) ? t.delete(e) : t.add(e),
|
|
227
|
+
t.has(e) ? t.delete(e) : t.add(e), xt ? xt(t) : lr(t);
|
|
229
228
|
},
|
|
230
|
-
[Ze,
|
|
229
|
+
[Ze, xt]
|
|
231
230
|
), _r = g(
|
|
232
231
|
(e, t) => {
|
|
233
|
-
if (!
|
|
232
|
+
if (!bt)
|
|
234
233
|
return;
|
|
235
234
|
t.preventDefault();
|
|
236
235
|
const n = t.clientX, r = t.target.closest("th")?.offsetWidth ?? 100, s = (c) => {
|
|
@@ -241,44 +240,44 @@ function ya({
|
|
|
241
240
|
};
|
|
242
241
|
document.addEventListener("mousemove", s), document.addEventListener("mouseup", o);
|
|
243
242
|
},
|
|
244
|
-
[
|
|
245
|
-
), K = y ? v.sort[0]?.field ?? "" :
|
|
246
|
-
() => ze ? vi(
|
|
247
|
-
[
|
|
243
|
+
[bt]
|
|
244
|
+
), K = y ? v.sort[0]?.field ?? "" : bi ?? Mn.field, R = y ? v.sort[0]?.direction ?? null : _i ?? Mn.dir, me = y ? v.page : Ci ?? Zi, x = gn ?? tr, B = _(
|
|
245
|
+
() => ze ? vi(b, ze) : b,
|
|
246
|
+
[b, ze]
|
|
248
247
|
), C = _(
|
|
249
248
|
() => B.filter((e) => !e.hidden && !et.includes(e.field)),
|
|
250
249
|
[B, et]
|
|
251
|
-
),
|
|
250
|
+
), Yt = _(
|
|
252
251
|
() => C.filter((e) => e.pinned === "left"),
|
|
253
252
|
[C]
|
|
254
253
|
), nt = _(
|
|
255
254
|
() => C.filter((e) => e.pinned === "right"),
|
|
256
255
|
[C]
|
|
257
256
|
), Wn = _(() => C.filter((e) => !e.pinned), [C]), p = _(
|
|
258
|
-
() => [...
|
|
259
|
-
[
|
|
260
|
-
), wr = _(() => C.some((e) => e.aggregate), [C]), Ie =
|
|
257
|
+
() => [...Yt, ...Wn, ...nt],
|
|
258
|
+
[Yt, Wn, nt]
|
|
259
|
+
), wr = _(() => C.some((e) => e.aggregate), [C]), Ie = Yt.length > 0 || nt.length > 0, Qt = _(() => {
|
|
261
260
|
if (!Mt?.length)
|
|
262
261
|
return null;
|
|
263
|
-
const e =
|
|
262
|
+
const e = na(
|
|
264
263
|
p.map((t) => t.field),
|
|
265
264
|
Mt
|
|
266
265
|
);
|
|
267
266
|
return e.some((t) => t.group) ? e : null;
|
|
268
267
|
}, [Mt, p]), Ae = g(
|
|
269
268
|
(e, t) => {
|
|
270
|
-
y ? t ? v.setSortField(e, t) : v.setSort([]) :
|
|
269
|
+
y ? t ? v.setSortField(e, t) : v.setSort([]) : be ? be(e, t) : In({ field: e, dir: t });
|
|
271
270
|
},
|
|
272
|
-
[y, v,
|
|
271
|
+
[y, v, be]
|
|
273
272
|
), Gn = g(
|
|
274
273
|
(e) => {
|
|
275
|
-
Ae(e, K === e ?
|
|
274
|
+
Ae(e, K === e ? R === "asc" ? "desc" : R === "desc" ? null : "asc" : "asc");
|
|
276
275
|
},
|
|
277
|
-
[K,
|
|
276
|
+
[K, R, Ae]
|
|
278
277
|
), I = _(() => {
|
|
279
278
|
if (y)
|
|
280
|
-
return
|
|
281
|
-
let e = [...
|
|
279
|
+
return Rt;
|
|
280
|
+
let e = [...Rt];
|
|
282
281
|
if (Xe) {
|
|
283
282
|
const t = Xe.toLowerCase();
|
|
284
283
|
e = e.filter(
|
|
@@ -287,42 +286,42 @@ function ya({
|
|
|
287
286
|
)
|
|
288
287
|
);
|
|
289
288
|
}
|
|
290
|
-
return
|
|
291
|
-
(t) => Xr(t,
|
|
292
|
-
)), !
|
|
289
|
+
return Y.items.length > 0 && (e = e.filter(
|
|
290
|
+
(t) => Xr(t, Y)
|
|
291
|
+
)), !be && K && R && e.sort((t, n) => {
|
|
293
292
|
const i = t[K] ?? "", r = n[K] ?? "", s = typeof i == "number" ? i - r : String(i).localeCompare(String(r));
|
|
294
|
-
return
|
|
293
|
+
return R === "desc" ? -s : s;
|
|
295
294
|
}), e;
|
|
296
|
-
}, [
|
|
295
|
+
}, [Rt, Xe, Y, C, K, R, be, y]), it = y ? v.totalCount : hn ?? I.length, Z = H ? vr : y ? v.pageSize : Ye, qt = Math.max(1, Math.ceil(it / Z)), L = y ? I : Ke && !hn ? I.slice((me - 1) * Z, me * Z) : I, $e = g(
|
|
297
296
|
(e) => {
|
|
298
297
|
y ? v.setPage(e) : gt ? gt(e) : er(e);
|
|
299
298
|
},
|
|
300
299
|
[y, v, gt]
|
|
301
300
|
);
|
|
302
|
-
|
|
301
|
+
Yr(
|
|
303
302
|
["pagePrev", "pageNext"],
|
|
304
303
|
(e) => {
|
|
305
304
|
const t = me + (e.intent === "pageNext" ? 1 : -1);
|
|
306
|
-
if (e.source === "keyboard" || t < 1 || t >
|
|
305
|
+
if (e.source === "keyboard" || t < 1 || t > qt)
|
|
307
306
|
return !1;
|
|
308
|
-
|
|
307
|
+
$e(t);
|
|
309
308
|
},
|
|
310
|
-
{ ref:
|
|
311
|
-
),
|
|
312
|
-
|
|
309
|
+
{ ref: q, enabled: !!Ke }
|
|
310
|
+
), Qr(
|
|
311
|
+
q,
|
|
313
312
|
[
|
|
314
313
|
{ intent: "pagePrev", label: d("input.intent.pagePrev", "Previous page") },
|
|
315
314
|
{ intent: "pageNext", label: d("input.intent.pageNext", "Next page") }
|
|
316
315
|
],
|
|
317
|
-
{ enabled: !!Ke &&
|
|
316
|
+
{ enabled: !!Ke && qt > 1 }
|
|
318
317
|
);
|
|
319
|
-
const
|
|
320
|
-
|
|
318
|
+
const Oe = JSON.stringify(
|
|
319
|
+
ia({
|
|
321
320
|
columnWidths: De,
|
|
322
321
|
sortField: K,
|
|
323
|
-
sortDirection:
|
|
322
|
+
sortDirection: R,
|
|
324
323
|
pageSize: H ? void 0 : Z,
|
|
325
|
-
expandedGroups:
|
|
324
|
+
expandedGroups: Pt,
|
|
326
325
|
hiddenColumns: et,
|
|
327
326
|
columnOrder: ze ?? void 0
|
|
328
327
|
})
|
|
@@ -330,24 +329,24 @@ function ya({
|
|
|
330
329
|
Un.current = kn;
|
|
331
330
|
const Zt = W(j);
|
|
332
331
|
Zt.current = j;
|
|
333
|
-
const rt = W(null),
|
|
334
|
-
rt.current = e,
|
|
332
|
+
const rt = W(null), Re = W(null), at = g((e) => {
|
|
333
|
+
rt.current = e, Re.current = null, Zt.current && ra(Zt.current, e), Un.current?.(JSON.parse(e));
|
|
335
334
|
}, []);
|
|
336
335
|
G(() => {
|
|
337
336
|
if (rt.current === null) {
|
|
338
|
-
rt.current =
|
|
337
|
+
rt.current = Oe;
|
|
339
338
|
return;
|
|
340
339
|
}
|
|
341
|
-
if (
|
|
342
|
-
|
|
340
|
+
if (Oe === rt.current) {
|
|
341
|
+
Re.current = null;
|
|
343
342
|
return;
|
|
344
343
|
}
|
|
345
|
-
|
|
346
|
-
const e = setTimeout(() => at(
|
|
344
|
+
Re.current = Oe;
|
|
345
|
+
const e = setTimeout(() => at(Oe), 300);
|
|
347
346
|
return () => clearTimeout(e);
|
|
348
|
-
}, [
|
|
347
|
+
}, [Oe, at]), G(
|
|
349
348
|
() => () => {
|
|
350
|
-
|
|
349
|
+
Re.current !== null && at(Re.current);
|
|
351
350
|
},
|
|
352
351
|
[at]
|
|
353
352
|
);
|
|
@@ -363,44 +362,44 @@ function ya({
|
|
|
363
362
|
}, [he, Vn, Bn]);
|
|
364
363
|
const Sr = g(
|
|
365
364
|
(e) => {
|
|
366
|
-
const t =
|
|
365
|
+
const t = q.current;
|
|
367
366
|
if (!t)
|
|
368
367
|
return;
|
|
369
|
-
const n =
|
|
368
|
+
const n = b.find((r) => r.field === e), i = xi(t, e, n?.minWidth ?? 40);
|
|
370
369
|
jt((r) => ({ ...r, [e]: i }));
|
|
371
370
|
},
|
|
372
|
-
[
|
|
373
|
-
), Hn =
|
|
371
|
+
[b]
|
|
372
|
+
), Hn = qr(), Nr = g(() => Xt(null), []), se = mi(
|
|
374
373
|
Me !== null,
|
|
375
374
|
jn,
|
|
376
375
|
Nr,
|
|
377
376
|
{ anchorKey: Me }
|
|
378
377
|
), Jn = (e, t) => {
|
|
379
378
|
jn.current = e.currentTarget, Xt(t);
|
|
380
|
-
}, Xn = (e) => Xt((t) => t === e ? null : t),
|
|
379
|
+
}, Xn = (e) => Xt((t) => t === e ? null : t), Yn = g(
|
|
381
380
|
(e, t) => {
|
|
382
381
|
const n = B.findIndex((o) => o.field === e), i = B.findIndex((o) => o.field === t);
|
|
383
382
|
if (n < 0 || i < 0 || n === i || (B[n].pinned ?? null) !== (B[i].pinned ?? null))
|
|
384
383
|
return;
|
|
385
384
|
const r = B.map((o) => o.field).filter((o) => o !== e), s = r.indexOf(t) + (n < i ? 1 : 0);
|
|
386
|
-
r.splice(s, 0, e), En(r),
|
|
385
|
+
r.splice(s, 0, e), En(r), xn?.(vi(b, r));
|
|
387
386
|
},
|
|
388
|
-
[B,
|
|
387
|
+
[B, b, xn]
|
|
389
388
|
);
|
|
390
389
|
G(() => {
|
|
391
390
|
const e = Jt.current;
|
|
392
|
-
e && (Jt.current = null,
|
|
391
|
+
e && (Jt.current = null, q.current?.querySelector(`thead th[data-field="${e.replace(/["\\]/g, "\\$&")}"]`)?.focus());
|
|
393
392
|
}, [ze]);
|
|
394
393
|
const kr = (e) => {
|
|
395
|
-
|
|
394
|
+
Y.items.some(
|
|
396
395
|
(n) => n.type === "condition" && n.field === e
|
|
397
|
-
) ||
|
|
398
|
-
...
|
|
396
|
+
) || On({
|
|
397
|
+
...Y,
|
|
399
398
|
items: [
|
|
400
|
-
...
|
|
399
|
+
...Y.items,
|
|
401
400
|
{ type: "condition", field: e, operator: "contains", value: "" }
|
|
402
401
|
]
|
|
403
|
-
}),
|
|
402
|
+
}), $n(!0);
|
|
404
403
|
}, Cr = (e) => {
|
|
405
404
|
e(), en();
|
|
406
405
|
}, Dr = (e) => {
|
|
@@ -412,35 +411,35 @@ function ya({
|
|
|
412
411
|
const n = e.key === "ArrowDown" ? 1 : -1, i = t.indexOf(document.activeElement), r = i < 0 ? n > 0 ? 0 : t.length - 1 : (i + n + t.length) % t.length;
|
|
413
412
|
t[r]?.focus();
|
|
414
413
|
} else e.key === "Tab" && Gt(null);
|
|
415
|
-
}, ye = _(() =>
|
|
416
|
-
const e = new Set(
|
|
417
|
-
ve ? ye.forEach((t) => e.delete(t)) : ye.forEach((t) => e.add(t)), te ? te(e) :
|
|
418
|
-
}, [ve, ye,
|
|
414
|
+
}, ye = _(() => L.map((e) => String(e[D])), [L, D]), ve = ye.length > 0 && ye.every((e) => x.has(e)), Qn = ye.some((e) => x.has(e)), qn = g(() => {
|
|
415
|
+
const e = new Set(x);
|
|
416
|
+
ve ? ye.forEach((t) => e.delete(t)) : ye.forEach((t) => e.add(t)), te ? te(e) : Tt(e);
|
|
417
|
+
}, [ve, ye, x, te]), Zn = g(
|
|
419
418
|
(e) => {
|
|
420
|
-
const t = new Set(
|
|
421
|
-
t.has(e) ? t.delete(e) : t.add(e), te ? te(t) :
|
|
419
|
+
const t = new Set(x);
|
|
420
|
+
t.has(e) ? t.delete(e) : t.add(e), te ? te(t) : Tt(t);
|
|
422
421
|
},
|
|
423
|
-
[
|
|
424
|
-
), zr = ({ field: e }) => K !== e || !
|
|
422
|
+
[x, te]
|
|
423
|
+
), zr = ({ field: e }) => K !== e || !R ? /* @__PURE__ */ a("span", { className: "nice-table__sort-icon", children: /* @__PURE__ */ a(da, {}) }) : /* @__PURE__ */ a("span", { className: "nice-table__sort-icon", children: R === "asc" ? /* @__PURE__ */ a(ca, {}) : /* @__PURE__ */ a(Le, {}) }), S = _(() => {
|
|
425
424
|
if (!mt)
|
|
426
|
-
return
|
|
425
|
+
return L.map((n, i) => ({
|
|
427
426
|
type: "data",
|
|
428
427
|
row: n,
|
|
429
428
|
key: String(n[D] ?? i)
|
|
430
429
|
}));
|
|
431
430
|
const e = /* @__PURE__ */ new Map();
|
|
432
|
-
|
|
431
|
+
L.forEach((n) => {
|
|
433
432
|
const i = n[mt];
|
|
434
433
|
e.has(i) || e.set(i, []), e.get(i).push(n);
|
|
435
434
|
});
|
|
436
435
|
const t = [];
|
|
437
436
|
return e.forEach((n, i) => {
|
|
438
|
-
const r = `__group_${String(i)}`, s =
|
|
437
|
+
const r = `__group_${String(i)}`, s = Pt.has(r);
|
|
439
438
|
t.push({ type: "group", value: i, rows: n, expanded: s, key: r }), s && n.forEach(
|
|
440
439
|
(o, c) => t.push({ type: "data", row: o, key: String(o[D] ?? `${r}_${c}`) })
|
|
441
440
|
);
|
|
442
441
|
}), t;
|
|
443
|
-
}, [
|
|
442
|
+
}, [L, mt, D, Pt]), { pinnedTopRows: tn, pinnedBottomRows: Mr, normalRows: nn } = _(() => {
|
|
444
443
|
if (!wt?.size && !St?.size)
|
|
445
444
|
return {
|
|
446
445
|
pinnedTopRows: [],
|
|
@@ -464,72 +463,72 @@ function ya({
|
|
|
464
463
|
}
|
|
465
464
|
return { pinnedTopRows: e, pinnedBottomRows: t, normalRows: n };
|
|
466
465
|
}, [S, wt, St]), ei = g((e) => {
|
|
467
|
-
|
|
466
|
+
Tn((t) => {
|
|
468
467
|
const n = new Set(t);
|
|
469
468
|
return n.has(e) ? n.delete(e) : n.add(e), n;
|
|
470
469
|
});
|
|
471
470
|
}, []), ti = _(() => {
|
|
472
471
|
if (!U)
|
|
473
472
|
return S;
|
|
474
|
-
const e =
|
|
473
|
+
const e = qe.current?.clientHeight ?? 400, t = Math.ceil(e / E), n = Math.max(0, Math.floor(Lt / E) - 3), i = Math.min(S.length - 1, n + t + 6), r = S.slice(n, i + 1).map((o, c) => ({ ...o, _vIdx: n + c }));
|
|
475
474
|
return [...S.slice(0, Math.min(re, n)).map((o, c) => ({ ...o, _vIdx: c })), ...r];
|
|
476
|
-
}, [U, S,
|
|
475
|
+
}, [U, S, Lt, E, re]), Te = _(
|
|
477
476
|
() => re > 0 ? [...tn, ...nn].slice(0, re).map((e) => e.key) : [],
|
|
478
477
|
[re, tn, nn]
|
|
479
478
|
), [Ir, Ar] = h([]);
|
|
480
479
|
hi(() => {
|
|
481
|
-
if (U ||
|
|
480
|
+
if (U || Te.length === 0)
|
|
482
481
|
return;
|
|
483
|
-
const e =
|
|
482
|
+
const e = qe.current?.querySelector("table");
|
|
484
483
|
if (!e)
|
|
485
484
|
return;
|
|
486
485
|
const t = Array.from(e.tBodies[0]?.rows ?? []);
|
|
487
486
|
let n = ht ? e.tHead?.offsetHeight ?? 0 : 0;
|
|
488
|
-
const i =
|
|
487
|
+
const i = Te.map((r) => {
|
|
489
488
|
const s = n;
|
|
490
489
|
return n += t.find((o) => o.dataset.rowKey === r)?.offsetHeight ?? 0, s;
|
|
491
490
|
});
|
|
492
491
|
Ar(
|
|
493
492
|
(r) => r.length === i.length && r.every((s, o) => s === i[o]) ? r : i
|
|
494
493
|
);
|
|
495
|
-
}, [U,
|
|
494
|
+
}, [U, Te, ht, De, p, Qt]);
|
|
496
495
|
const ni = (e) => {
|
|
497
|
-
const t =
|
|
496
|
+
const t = Te.indexOf(e);
|
|
498
497
|
return t < 0 ? { className: "" } : {
|
|
499
|
-
className: t ===
|
|
498
|
+
className: t === Te.length - 1 ? "nice-datagrid__row--frozen nice-datagrid__row--frozen-last" : "nice-datagrid__row--frozen",
|
|
500
499
|
style: { position: "sticky", top: Ir[t] ?? 0, zIndex: 2 }
|
|
501
500
|
};
|
|
502
501
|
};
|
|
503
502
|
hi(() => {
|
|
504
|
-
const e =
|
|
503
|
+
const e = q.current;
|
|
505
504
|
if (!At || !e)
|
|
506
505
|
return;
|
|
507
506
|
const t = {};
|
|
508
507
|
for (const n of p)
|
|
509
|
-
n.width === void 0 && De[n.field] === void 0 && (t[n.field] =
|
|
508
|
+
n.width === void 0 && De[n.field] === void 0 && (t[n.field] = xi(e, n.field, n.minWidth ?? 40));
|
|
510
509
|
yr((n) => {
|
|
511
510
|
const i = Object.keys(t);
|
|
512
511
|
return i.length === Object.keys(n).length && i.every((s) => Math.abs((n[s] ?? -1 / 0) - t[s]) <= 1) ? n : t;
|
|
513
512
|
});
|
|
514
513
|
}, [At, p, De, ti]);
|
|
515
|
-
const
|
|
514
|
+
const xe = (e) => De[e.field] || e.width || (At ? mr[e.field] : void 0), st = g(
|
|
516
515
|
(e, t, n) => {
|
|
517
516
|
!z || ke || (Et({ rowKey: e, field: t }), Ce(n));
|
|
518
517
|
},
|
|
519
518
|
[z, ke]
|
|
520
519
|
), ii = g(() => {
|
|
521
|
-
|
|
522
|
-
}, [
|
|
520
|
+
Q && z && z(Q.rowKey, Q.field, Qe), Et(null), Ce(null);
|
|
521
|
+
}, [Q, Qe, z]), $r = g(() => {
|
|
523
522
|
Et(null), Ce(null);
|
|
524
|
-
}, []),
|
|
523
|
+
}, []), Or = g(
|
|
525
524
|
(e, t) => {
|
|
526
|
-
!
|
|
525
|
+
!le || ke || (Be ? Wt({ key: e, row: t }) : le(e, t));
|
|
527
526
|
},
|
|
528
|
-
[
|
|
529
|
-
),
|
|
527
|
+
[le, ke, Be]
|
|
528
|
+
), Rr = g(() => {
|
|
530
529
|
const e = Kt;
|
|
531
|
-
Wt(null), e &&
|
|
532
|
-
}, [Kt,
|
|
530
|
+
Wt(null), e && le?.(e.key, e.row);
|
|
531
|
+
}, [Kt, le]), Tr = g(() => Wt(null), []), Ee = `nice-datagrid__actions-col${nt.length > 0 ? " nice-datagrid__actions-col--sticky" : ""}`, ri = (e, t) => /* @__PURE__ */ a(
|
|
533
532
|
"button",
|
|
534
533
|
{
|
|
535
534
|
type: "button",
|
|
@@ -537,21 +536,21 @@ function ya({
|
|
|
537
536
|
"aria-label": d("controls.delete", "Delete"),
|
|
538
537
|
title: d("controls.delete", "Delete"),
|
|
539
538
|
onClick: (n) => {
|
|
540
|
-
n.stopPropagation(),
|
|
539
|
+
n.stopPropagation(), Or(e, t);
|
|
541
540
|
},
|
|
542
541
|
onDoubleClick: je,
|
|
543
542
|
onKeyDown: je,
|
|
544
|
-
children: /* @__PURE__ */ a(
|
|
543
|
+
children: /* @__PURE__ */ a($, { name: "trash", size: 14 })
|
|
545
544
|
}
|
|
546
545
|
), Er = g(() => {
|
|
547
|
-
const e = C, t = e.map((c) =>
|
|
548
|
-
(c) => e.map((l) =>
|
|
546
|
+
const e = C, t = e.map((c) => dt(c.header)).join(","), n = I.map(
|
|
547
|
+
(c) => e.map((l) => dt(String(c[l.field] ?? ""))).join(",")
|
|
549
548
|
), i = [t, ...n].join(`
|
|
550
549
|
`), r = new Blob(["\uFEFF" + i], { type: "text/csv;charset=utf-8;" }), s = URL.createObjectURL(r), o = document.createElement("a");
|
|
551
550
|
o.href = s, o.download = `${vn}.csv`, o.click(), URL.revokeObjectURL(s);
|
|
552
551
|
}, [C, I, vn]), ot = g(
|
|
553
552
|
(e) => {
|
|
554
|
-
Nt ? Nt(e) :
|
|
553
|
+
Nt ? Nt(e) : dr(e);
|
|
555
554
|
},
|
|
556
555
|
[Nt]
|
|
557
556
|
), lt = g(
|
|
@@ -559,11 +558,11 @@ function ya({
|
|
|
559
558
|
kt ? kt(e) : fr(e);
|
|
560
559
|
},
|
|
561
560
|
[kt]
|
|
562
|
-
), A = _(() => S.filter((e) => e.type === "data").map((e) => e.key), [S]),
|
|
561
|
+
), A = _(() => S.filter((e) => e.type === "data").map((e) => e.key), [S]), Pr = g(
|
|
563
562
|
(e) => {
|
|
564
|
-
if (e.target !== e.currentTarget || !we ||
|
|
563
|
+
if (e.target !== e.currentTarget || !we || Q || !O)
|
|
565
564
|
return;
|
|
566
|
-
const t = A.indexOf(
|
|
565
|
+
const t = A.indexOf(O.rowKey), n = p.findIndex((o) => o.field === O.field);
|
|
567
566
|
if (t < 0 || n < 0)
|
|
568
567
|
return;
|
|
569
568
|
let i = t, r = n;
|
|
@@ -590,8 +589,8 @@ function ya({
|
|
|
590
589
|
case "Enter": {
|
|
591
590
|
const o = p[n];
|
|
592
591
|
if (o.editable && z) {
|
|
593
|
-
const c =
|
|
594
|
-
c && st(
|
|
592
|
+
const c = L.find((l) => String(l[D]) === O.rowKey);
|
|
593
|
+
c && st(O.rowKey, o.field, c[o.field]);
|
|
595
594
|
}
|
|
596
595
|
return;
|
|
597
596
|
}
|
|
@@ -605,10 +604,10 @@ function ya({
|
|
|
605
604
|
e.ctrlKey && (i = A.length - 1), r = p.length - 1;
|
|
606
605
|
break;
|
|
607
606
|
case "PageUp":
|
|
608
|
-
i = Math.max(0, t -
|
|
607
|
+
i = Math.max(0, t - Ye);
|
|
609
608
|
break;
|
|
610
609
|
case "PageDown":
|
|
611
|
-
i = Math.min(A.length - 1, t +
|
|
610
|
+
i = Math.min(A.length - 1, t + Ye);
|
|
612
611
|
break;
|
|
613
612
|
default:
|
|
614
613
|
return;
|
|
@@ -619,15 +618,15 @@ function ya({
|
|
|
619
618
|
field: p[r].field
|
|
620
619
|
};
|
|
621
620
|
if (ot(s), e.shiftKey && wn) {
|
|
622
|
-
const o = M?.start ??
|
|
621
|
+
const o = M?.start ?? O;
|
|
623
622
|
lt({ start: o, end: s });
|
|
624
623
|
} else
|
|
625
624
|
lt(null);
|
|
626
625
|
},
|
|
627
626
|
[
|
|
628
627
|
we,
|
|
629
|
-
|
|
630
|
-
|
|
628
|
+
Q,
|
|
629
|
+
O,
|
|
631
630
|
A,
|
|
632
631
|
p,
|
|
633
632
|
wn,
|
|
@@ -635,22 +634,22 @@ function ya({
|
|
|
635
634
|
ot,
|
|
636
635
|
lt,
|
|
637
636
|
z,
|
|
638
|
-
|
|
637
|
+
L,
|
|
639
638
|
D,
|
|
640
639
|
st,
|
|
641
|
-
|
|
640
|
+
Ye
|
|
642
641
|
]
|
|
643
642
|
), ai = g(() => {
|
|
644
643
|
let e = [], t = [];
|
|
645
644
|
if (M) {
|
|
646
645
|
const n = A.indexOf(M.start.rowKey), i = A.indexOf(M.end.rowKey), r = Math.min(n, i), s = Math.max(n, i), o = p.findIndex((u) => u.field === M.start.field), c = p.findIndex((u) => u.field === M.end.field), l = Math.min(o, c), m = Math.max(o, c);
|
|
647
|
-
t = p.slice(l, m + 1).map((u) => u.field), e =
|
|
646
|
+
t = p.slice(l, m + 1).map((u) => u.field), e = L.filter((u) => {
|
|
648
647
|
const N = A.indexOf(String(u[D]));
|
|
649
648
|
return N >= r && N <= s;
|
|
650
649
|
});
|
|
651
|
-
} else
|
|
650
|
+
} else x.size > 0 && (e = L.filter((n) => x.has(String(n[D]))), t = p.map((n) => n.field));
|
|
652
651
|
return { rows: e, fields: t };
|
|
653
|
-
}, [M, A, p,
|
|
652
|
+
}, [M, A, p, L, D, x]), si = g(
|
|
654
653
|
(e, t, n) => {
|
|
655
654
|
const i = p.filter((r) => t.includes(r.field));
|
|
656
655
|
switch (n) {
|
|
@@ -661,7 +660,7 @@ function ya({
|
|
|
661
660
|
2
|
|
662
661
|
);
|
|
663
662
|
case "csv": {
|
|
664
|
-
const r = i.map((o) =>
|
|
663
|
+
const r = i.map((o) => dt(o.header)).join(","), s = e.map((o) => i.map((c) => dt(String(o[c.field] ?? ""))).join(",")).join(`
|
|
665
664
|
`);
|
|
666
665
|
return r + `
|
|
667
666
|
` + s;
|
|
@@ -692,23 +691,23 @@ function ya({
|
|
|
692
691
|
const n = si(e, t, Ct);
|
|
693
692
|
await navigator.clipboard.writeText(n), Nn?.(e, t, Ct);
|
|
694
693
|
}, [ie, ai, Sn, si, Ct, Nn]), oi = g(async () => {
|
|
695
|
-
if (!ie ||
|
|
694
|
+
if (!ie || !O || !Dt)
|
|
696
695
|
return;
|
|
697
696
|
const t = (await navigator.clipboard.readText()).split(`
|
|
698
697
|
`).map((n) => n.split(" "));
|
|
699
|
-
Dt(t,
|
|
700
|
-
}, [ie,
|
|
698
|
+
Dt(t, O);
|
|
699
|
+
}, [ie, O, Dt]);
|
|
701
700
|
G(() => {
|
|
702
|
-
if (!ie || !
|
|
701
|
+
if (!ie || !q.current)
|
|
703
702
|
return;
|
|
704
703
|
const e = (t) => {
|
|
705
|
-
|
|
704
|
+
q.current?.contains(document.activeElement) && (t.type === "copy" && (t.preventDefault(), rn()), t.type === "paste" && (t.preventDefault(), oi()));
|
|
706
705
|
};
|
|
707
706
|
return document.addEventListener("copy", e), document.addEventListener("paste", e), () => {
|
|
708
707
|
document.removeEventListener("copy", e), document.removeEventListener("paste", e);
|
|
709
708
|
};
|
|
710
709
|
}, [ie, rn, oi]);
|
|
711
|
-
const
|
|
710
|
+
const Lr = g(
|
|
712
711
|
(e) => {
|
|
713
712
|
const t = F.includes(e) ? F.filter((n) => n !== e) : [...F, e];
|
|
714
713
|
zt ? zt(t) : gr(t);
|
|
@@ -792,7 +791,7 @@ function ya({
|
|
|
792
791
|
lineHeight: 1
|
|
793
792
|
},
|
|
794
793
|
"aria-hidden": "true",
|
|
795
|
-
children: /* @__PURE__ */ a(
|
|
794
|
+
children: /* @__PURE__ */ a($, { name: "star", size: 14 })
|
|
796
795
|
},
|
|
797
796
|
l
|
|
798
797
|
)) });
|
|
@@ -844,7 +843,7 @@ function ya({
|
|
|
844
843
|
return {};
|
|
845
844
|
},
|
|
846
845
|
[]
|
|
847
|
-
),
|
|
846
|
+
), ci = g(
|
|
848
847
|
(e, t) => {
|
|
849
848
|
if (!Ie || !e.pinned)
|
|
850
849
|
return {};
|
|
@@ -859,7 +858,7 @@ function ya({
|
|
|
859
858
|
const s = p[r];
|
|
860
859
|
s.pinned === "left" && (i += typeof s.width == "number" ? s.width : parseInt(String(s.width) || "100", 10));
|
|
861
860
|
}
|
|
862
|
-
|
|
861
|
+
T && t === 0 && (i = 36), n.left = i;
|
|
863
862
|
} else {
|
|
864
863
|
let i = 0;
|
|
865
864
|
for (let r = p.length - 1; r > t; r--) {
|
|
@@ -870,19 +869,19 @@ function ya({
|
|
|
870
869
|
}
|
|
871
870
|
return n;
|
|
872
871
|
},
|
|
873
|
-
[Ie, p,
|
|
874
|
-
),
|
|
875
|
-
if (
|
|
876
|
-
return e.editor ? e.editor(
|
|
872
|
+
[Ie, p, T, X]
|
|
873
|
+
), di = (e, t, n, i) => {
|
|
874
|
+
if (Q?.rowKey === n && Q?.field === e.field)
|
|
875
|
+
return e.editor ? e.editor(Qe, t, (c) => Ce(c)) : /* @__PURE__ */ a(
|
|
877
876
|
"input",
|
|
878
877
|
{
|
|
879
878
|
className: "nice-datagrid__edit-input",
|
|
880
879
|
autoFocus: !0,
|
|
881
|
-
value:
|
|
880
|
+
value: Qe ?? "",
|
|
882
881
|
onChange: (c) => Ce(c.target.value),
|
|
883
882
|
onBlur: ii,
|
|
884
883
|
onKeyDown: (c) => {
|
|
885
|
-
c.key === "Enter" && ii(), c.key === "Escape" &&
|
|
884
|
+
c.key === "Enter" && ii(), c.key === "Escape" && $r();
|
|
886
885
|
}
|
|
887
886
|
}
|
|
888
887
|
);
|
|
@@ -890,11 +889,11 @@ function ya({
|
|
|
890
889
|
if (s)
|
|
891
890
|
return s;
|
|
892
891
|
const o = t[e.field];
|
|
893
|
-
return e.render ? e.render(o, t, i) : e.format && typeof o == "number" && Number.isFinite(o) ?
|
|
892
|
+
return e.render ? e.render(o, t, i) : e.format && typeof o == "number" && Number.isFinite(o) ? sa(o, e.format) : ma(o);
|
|
894
893
|
}, Gr = (e, t, n, i) => {
|
|
895
|
-
const r =
|
|
896
|
-
const l = A.indexOf(M.start.rowKey), m = A.indexOf(M.end.rowKey), u = A.indexOf(n), N = p.findIndex((ee) => ee.field === M.start.field),
|
|
897
|
-
return u >= Math.min(l, m) && u <= Math.max(l, m) && i >= Math.min(N,
|
|
894
|
+
const r = O?.rowKey === n && O?.field === e.field, s = M && (() => {
|
|
895
|
+
const l = A.indexOf(M.start.rowKey), m = A.indexOf(M.end.rowKey), u = A.indexOf(n), N = p.findIndex((ee) => ee.field === M.start.field), Pe = p.findIndex((ee) => ee.field === M.end.field);
|
|
896
|
+
return u >= Math.min(l, m) && u <= Math.max(l, m) && i >= Math.min(N, Pe) && i <= Math.max(N, Pe);
|
|
898
897
|
})(), o = Wr(e, t[e.field], t);
|
|
899
898
|
return {
|
|
900
899
|
className: [
|
|
@@ -903,7 +902,7 @@ function ya({
|
|
|
903
902
|
s && "nice-datagrid__cell--in-range"
|
|
904
903
|
].filter(Boolean).join(" "),
|
|
905
904
|
style: {
|
|
906
|
-
...
|
|
905
|
+
...ci(e, i),
|
|
907
906
|
textAlign: e.align,
|
|
908
907
|
...o.style,
|
|
909
908
|
...r ? { outline: "2px solid var(--nice-color-primary)", outlineOffset: -2 } : {},
|
|
@@ -912,12 +911,12 @@ function ya({
|
|
|
912
911
|
};
|
|
913
912
|
}, ui = [
|
|
914
913
|
"nice-table",
|
|
915
|
-
|
|
914
|
+
Ti ? "nice-table--striped" : "",
|
|
916
915
|
Ei ? "nice-table--compact" : "",
|
|
917
916
|
_t && _t !== "md" ? `nice-table--${_t}` : ""
|
|
918
|
-
].filter(Boolean).join(" "),
|
|
917
|
+
].filter(Boolean).join(" "), ct = p.length + (T ? 1 : 0) + (P ? 1 : 0) + (w ? 1 : 0) + (Ne ? 1 : 0) + (X ? 1 : 0), fi = (e) => Qt && /* @__PURE__ */ f("tr", { className: "nice-datagrid__column-group-row", children: [
|
|
919
918
|
e > 0 && /* @__PURE__ */ a("th", { colSpan: e }),
|
|
920
|
-
|
|
919
|
+
Qt.map(
|
|
921
920
|
(t, n) => t.group ? /* @__PURE__ */ a(
|
|
922
921
|
"th",
|
|
923
922
|
{
|
|
@@ -932,12 +931,12 @@ function ya({
|
|
|
932
931
|
),
|
|
933
932
|
X && /* @__PURE__ */ a("th", { className: Ee })
|
|
934
933
|
] }), pi = (e, t) => {
|
|
935
|
-
const n = un && e.sortable !== !1, i = n ? K === e.field ?
|
|
934
|
+
const n = un && e.sortable !== !1, i = n ? K === e.field ? R === "asc" ? "ascending" : R === "desc" ? "descending" : "none" : "none" : void 0, r = he === e.field, s = !!Ri && !ce, o = (l) => {
|
|
936
935
|
const m = l ? B.find((u) => u.field === l) : void 0;
|
|
937
936
|
return !!m && (m.pinned ?? null) === (e.pinned ?? null);
|
|
938
937
|
}, c = [
|
|
939
938
|
n && "nice-datagrid__th--sortable",
|
|
940
|
-
|
|
939
|
+
Pn === e.field && "nice-datagrid__th--drop-target"
|
|
941
940
|
].filter(Boolean).join(" ");
|
|
942
941
|
return /* @__PURE__ */ f(
|
|
943
942
|
"th",
|
|
@@ -945,11 +944,11 @@ function ya({
|
|
|
945
944
|
"data-field": e.field,
|
|
946
945
|
title: e.headerTooltip,
|
|
947
946
|
style: {
|
|
948
|
-
width:
|
|
947
|
+
width: xe(e),
|
|
949
948
|
minWidth: e.minWidth,
|
|
950
949
|
textAlign: e.align,
|
|
951
950
|
position: "relative",
|
|
952
|
-
...
|
|
951
|
+
...ci(e, t)
|
|
953
952
|
},
|
|
954
953
|
className: c || void 0,
|
|
955
954
|
onClick: () => n && Gn(e.field),
|
|
@@ -971,11 +970,11 @@ function ya({
|
|
|
971
970
|
l.dataTransfer?.setData("text/plain", e.field), Ht(e.field);
|
|
972
971
|
} : void 0,
|
|
973
972
|
onDragOver: s ? (l) => {
|
|
974
|
-
o(Vt) && (l.preventDefault(),
|
|
973
|
+
o(Vt) && (l.preventDefault(), Pn !== e.field && tt(e.field));
|
|
975
974
|
} : void 0,
|
|
976
975
|
onDragLeave: s ? () => tt((l) => l === e.field ? null : l) : void 0,
|
|
977
976
|
onDrop: s ? (l) => {
|
|
978
|
-
l.preventDefault(), Vt &&
|
|
977
|
+
l.preventDefault(), Vt && Yn(Vt, e.field), Ht(null), tt(null);
|
|
979
978
|
} : void 0,
|
|
980
979
|
onDragEnd: s ? () => {
|
|
981
980
|
Ht(null), tt(null);
|
|
@@ -989,7 +988,7 @@ function ya({
|
|
|
989
988
|
return;
|
|
990
989
|
l.preventDefault(), l.stopPropagation();
|
|
991
990
|
const m = p[t + (l.key === "ArrowLeft" ? -1 : 1)];
|
|
992
|
-
!m || !o(m.field) || (Jt.current = e.field,
|
|
991
|
+
!m || !o(m.field) || (Jt.current = e.field, Yn(e.field, m.field));
|
|
993
992
|
} : void 0,
|
|
994
993
|
children: [
|
|
995
994
|
e.header,
|
|
@@ -1006,10 +1005,10 @@ function ya({
|
|
|
1006
1005
|
l.stopPropagation(), r ? en() : (Ut.current = l.currentTarget, Gt(e.field));
|
|
1007
1006
|
},
|
|
1008
1007
|
onKeyDown: je,
|
|
1009
|
-
children: /* @__PURE__ */ a(
|
|
1008
|
+
children: /* @__PURE__ */ a($, { name: "more-vertical", size: 14 })
|
|
1010
1009
|
}
|
|
1011
1010
|
),
|
|
1012
|
-
|
|
1011
|
+
bt && /* @__PURE__ */ a(
|
|
1013
1012
|
"span",
|
|
1014
1013
|
{
|
|
1015
1014
|
className: "nice-datagrid__resize-handle",
|
|
@@ -1023,7 +1022,7 @@ function ya({
|
|
|
1023
1022
|
e.field
|
|
1024
1023
|
);
|
|
1025
1024
|
}, an = (e, t, n) => {
|
|
1026
|
-
const { row: i, key: r } = e, s =
|
|
1025
|
+
const { row: i, key: r } = e, s = x.has(r), o = Ze.has(r), c = hr.has(r), l = ni(r), m = [
|
|
1027
1026
|
s && "nice-datagrid__row--selected",
|
|
1028
1027
|
fe === t && "nice-datagrid__row--dragging",
|
|
1029
1028
|
n && "nice-datagrid__row--pinned",
|
|
@@ -1037,8 +1036,8 @@ function ya({
|
|
|
1037
1036
|
"data-row-key": r,
|
|
1038
1037
|
className: m,
|
|
1039
1038
|
onClick: () => ne?.(i),
|
|
1040
|
-
onDoubleClick: _e === "popup" && (Ge || z) ? () =>
|
|
1041
|
-
onContextMenu: (u) =>
|
|
1039
|
+
onDoubleClick: _e === "popup" && (Ge || z) ? () => ue({ key: r, data: { ...i } }) : void 0,
|
|
1040
|
+
onContextMenu: (u) => br(u, i),
|
|
1042
1041
|
style: ne || _e === "popup" || l.style ? {
|
|
1043
1042
|
...ne || _e === "popup" ? { cursor: "pointer" } : {},
|
|
1044
1043
|
...l.style
|
|
@@ -1052,14 +1051,14 @@ function ya({
|
|
|
1052
1051
|
onDragEnd: w ? () => pe(null) : void 0,
|
|
1053
1052
|
children: [
|
|
1054
1053
|
Ne && /* @__PURE__ */ a("td", { className: "nice-datagrid__row-indicator", style: { width: 32, padding: "0 4px" }, children: Ne(i) }),
|
|
1055
|
-
|
|
1054
|
+
P && /* @__PURE__ */ a(
|
|
1056
1055
|
"td",
|
|
1057
1056
|
{
|
|
1058
1057
|
className: "nice-datagrid__expand-col",
|
|
1059
1058
|
onClick: (u) => {
|
|
1060
1059
|
u.stopPropagation(), Kn(r);
|
|
1061
1060
|
},
|
|
1062
|
-
children: /* @__PURE__ */ a("span", { className: "nice-datagrid__expand-btn", "data-expanded": o, children: o ? /* @__PURE__ */ a(
|
|
1061
|
+
children: /* @__PURE__ */ a("span", { className: "nice-datagrid__expand-btn", "data-expanded": o, children: o ? /* @__PURE__ */ a(Le, {}) : /* @__PURE__ */ a(ut, {}) })
|
|
1063
1062
|
}
|
|
1064
1063
|
),
|
|
1065
1064
|
w && /* @__PURE__ */ a(
|
|
@@ -1068,10 +1067,10 @@ function ya({
|
|
|
1068
1067
|
className: "nice-datagrid__drag-handle",
|
|
1069
1068
|
style: { cursor: "grab", textAlign: "center", color: "var(--nice-text-muted)" },
|
|
1070
1069
|
"aria-label": d("datagrid.dragRow", "Drag to reorder"),
|
|
1071
|
-
children: /* @__PURE__ */ a(
|
|
1070
|
+
children: /* @__PURE__ */ a($, { name: "more-vertical", size: 14 })
|
|
1072
1071
|
}
|
|
1073
1072
|
),
|
|
1074
|
-
|
|
1073
|
+
T && /* @__PURE__ */ a(
|
|
1075
1074
|
"td",
|
|
1076
1075
|
{
|
|
1077
1076
|
className: "nice-datagrid__checkbox",
|
|
@@ -1098,12 +1097,12 @@ function ya({
|
|
|
1098
1097
|
),
|
|
1099
1098
|
(() => {
|
|
1100
1099
|
let u = 0;
|
|
1101
|
-
return p.map((N,
|
|
1100
|
+
return p.map((N, Pe) => {
|
|
1102
1101
|
if (u > 0)
|
|
1103
1102
|
return u--, null;
|
|
1104
|
-
const ee = _n ? _n(i, N,
|
|
1103
|
+
const ee = _n ? _n(i, N, Pe) : void 0;
|
|
1105
1104
|
ee && ee > 1 && (u = ee - 1);
|
|
1106
|
-
const gi = Gr(N, i, r,
|
|
1105
|
+
const gi = Gr(N, i, r, Pe);
|
|
1107
1106
|
return /* @__PURE__ */ a(
|
|
1108
1107
|
"td",
|
|
1109
1108
|
{
|
|
@@ -1113,7 +1112,7 @@ function ya({
|
|
|
1113
1112
|
style: gi.style,
|
|
1114
1113
|
onClick: we ? () => ot({ rowKey: r, field: N.field }) : void 0,
|
|
1115
1114
|
onDoubleClick: N.editable && z ? () => st(r, N.field, i[N.field]) : void 0,
|
|
1116
|
-
children:
|
|
1115
|
+
children: di(N, i, r, t)
|
|
1117
1116
|
},
|
|
1118
1117
|
N.field
|
|
1119
1118
|
);
|
|
@@ -1123,14 +1122,14 @@ function ya({
|
|
|
1123
1122
|
]
|
|
1124
1123
|
}
|
|
1125
1124
|
),
|
|
1126
|
-
|
|
1125
|
+
P && o && /* @__PURE__ */ a("tr", { className: "nice-datagrid__detail-row", children: /* @__PURE__ */ a("td", { colSpan: ct, children: P(i) }) })
|
|
1127
1126
|
] }, r);
|
|
1128
1127
|
};
|
|
1129
|
-
return
|
|
1128
|
+
return qi ? null : /* @__PURE__ */ f(
|
|
1130
1129
|
"div",
|
|
1131
1130
|
{
|
|
1132
|
-
ref:
|
|
1133
|
-
className: `nice-datagrid ${Ki ? "nice-datagrid--print" : ""} ${ht ? "nice-datagrid--sticky-header" : ""} ${Di ? "nice-datagrid--sticky-footer" : ""} ${H ? "nice-datagrid--auto-pagination" : ""} ${ce ? "nice-datagrid--disabled" : ""} ${zn && !ce ? "nice-datagrid--readonly" : ""} ${
|
|
1131
|
+
ref: q,
|
|
1132
|
+
className: `nice-datagrid ${Ki ? "nice-datagrid--print" : ""} ${ht ? "nice-datagrid--sticky-header" : ""} ${Di ? "nice-datagrid--sticky-footer" : ""} ${H ? "nice-datagrid--auto-pagination" : ""} ${ce ? "nice-datagrid--disabled" : ""} ${zn && !ce ? "nice-datagrid--readonly" : ""} ${$t ? "nice-datagrid--error" : ""} ${Hi || ""}`,
|
|
1134
1133
|
"aria-disabled": ce || void 0,
|
|
1135
1134
|
style: Ji,
|
|
1136
1135
|
role: "grid",
|
|
@@ -1139,10 +1138,10 @@ function ya({
|
|
|
1139
1138
|
"aria-colcount": C.length,
|
|
1140
1139
|
"aria-busy": Je || void 0,
|
|
1141
1140
|
tabIndex: we ? 0 : void 0,
|
|
1142
|
-
onKeyDown: we ?
|
|
1141
|
+
onKeyDown: we ? Pr : void 0,
|
|
1143
1142
|
children: [
|
|
1144
|
-
|
|
1145
|
-
(mn ||
|
|
1143
|
+
$t && /* @__PURE__ */ a("div", { className: "nice-datagrid__error", role: "alert", children: $t }),
|
|
1144
|
+
(mn || bn || yn || J?.length || Ue || Fe) && /* @__PURE__ */ f("div", { className: "nice-datagrid__toolbar", children: [
|
|
1146
1145
|
mn && /* @__PURE__ */ a("div", { className: "nice-datagrid__search", children: /* @__PURE__ */ a(
|
|
1147
1146
|
"input",
|
|
1148
1147
|
{
|
|
@@ -1150,7 +1149,7 @@ function ya({
|
|
|
1150
1149
|
value: y ? v.search : Xe,
|
|
1151
1150
|
"aria-label": d("controls.search", "Search"),
|
|
1152
1151
|
onChange: (e) => {
|
|
1153
|
-
y ? v.setSearch(e.target.value) : (nr(e.target.value),
|
|
1152
|
+
y ? v.setSearch(e.target.value) : (nr(e.target.value), $e(1));
|
|
1154
1153
|
},
|
|
1155
1154
|
placeholder: zi || d("controls.search", "Search...")
|
|
1156
1155
|
}
|
|
@@ -1163,10 +1162,10 @@ function ya({
|
|
|
1163
1162
|
"aria-expanded": An,
|
|
1164
1163
|
"aria-label": `${d("controls.filter", "Filter")}${ae > 0 ? ` (${ae})` : ""}`,
|
|
1165
1164
|
title: `${d("controls.filter", "Filter")}${ae > 0 ? ` (${ae})` : ""}`,
|
|
1166
|
-
onClick: () =>
|
|
1165
|
+
onClick: () => $n((e) => !e),
|
|
1167
1166
|
style: { position: "relative" },
|
|
1168
1167
|
children: [
|
|
1169
|
-
/* @__PURE__ */ a(
|
|
1168
|
+
/* @__PURE__ */ a($, { name: "filter", size: 14 }),
|
|
1170
1169
|
ae > 0 && /* @__PURE__ */ a("span", { className: "nice-datagrid__filter-badge", children: ae })
|
|
1171
1170
|
]
|
|
1172
1171
|
}
|
|
@@ -1180,7 +1179,7 @@ function ya({
|
|
|
1180
1179
|
"button",
|
|
1181
1180
|
{
|
|
1182
1181
|
className: `nice-datagrid__quick-filter ${F.includes(e.key) ? "nice-datagrid__quick-filter--active" : ""}`,
|
|
1183
|
-
onClick: () =>
|
|
1182
|
+
onClick: () => Lr(e.key),
|
|
1184
1183
|
style: {
|
|
1185
1184
|
display: "inline-flex",
|
|
1186
1185
|
alignItems: "center",
|
|
@@ -1211,7 +1210,7 @@ function ya({
|
|
|
1211
1210
|
"aria-label": d("controls.copy", "Copy selected"),
|
|
1212
1211
|
title: d("controls.copy", "Copy selected"),
|
|
1213
1212
|
style: { marginLeft: 4 },
|
|
1214
|
-
children: /* @__PURE__ */ a(
|
|
1213
|
+
children: /* @__PURE__ */ a($, { name: "copy", size: 14 })
|
|
1215
1214
|
}
|
|
1216
1215
|
),
|
|
1217
1216
|
yn && /* @__PURE__ */ f(
|
|
@@ -1221,7 +1220,7 @@ function ya({
|
|
|
1221
1220
|
onClick: Er,
|
|
1222
1221
|
title: d("controls.exportCsv", "Export CSV"),
|
|
1223
1222
|
children: [
|
|
1224
|
-
/* @__PURE__ */ a(
|
|
1223
|
+
/* @__PURE__ */ a($, { name: "download", size: 14 }),
|
|
1225
1224
|
d("controls.exportCsv", "Export CSV")
|
|
1226
1225
|
]
|
|
1227
1226
|
}
|
|
@@ -1231,15 +1230,15 @@ function ya({
|
|
|
1231
1230
|
{
|
|
1232
1231
|
type: "button",
|
|
1233
1232
|
className: "nice-btn nice-btn--sm nice-btn--primary",
|
|
1234
|
-
onClick: () =>
|
|
1233
|
+
onClick: () => ue({ key: null, data: {} }),
|
|
1235
1234
|
title: d("datagrid.addRow", "Add row"),
|
|
1236
1235
|
children: [
|
|
1237
|
-
/* @__PURE__ */ a(
|
|
1236
|
+
/* @__PURE__ */ a($, { name: "plus", size: 14 }),
|
|
1238
1237
|
d("datagrid.add", "Add")
|
|
1239
1238
|
]
|
|
1240
1239
|
}
|
|
1241
1240
|
),
|
|
1242
|
-
|
|
1241
|
+
bn
|
|
1243
1242
|
] }),
|
|
1244
1243
|
Fe && An && /* @__PURE__ */ a(
|
|
1245
1244
|
"div",
|
|
@@ -1247,12 +1246,12 @@ function ya({
|
|
|
1247
1246
|
className: "nice-datagrid__filter-panel",
|
|
1248
1247
|
style: { padding: "8px 12px", borderBottom: "1px solid var(--nice-border-color)" },
|
|
1249
1248
|
children: /* @__PURE__ */ a(
|
|
1250
|
-
|
|
1249
|
+
ta,
|
|
1251
1250
|
{
|
|
1252
1251
|
fields: ar,
|
|
1253
|
-
value:
|
|
1252
|
+
value: Y,
|
|
1254
1253
|
onChange: (e) => {
|
|
1255
|
-
|
|
1254
|
+
On(e), $e(1);
|
|
1256
1255
|
},
|
|
1257
1256
|
presets: Si,
|
|
1258
1257
|
onSavePreset: Ni,
|
|
@@ -1261,7 +1260,7 @@ function ya({
|
|
|
1261
1260
|
)
|
|
1262
1261
|
}
|
|
1263
1262
|
),
|
|
1264
|
-
|
|
1263
|
+
T && x.size > 0 && (yt?.length || vt) && /* @__PURE__ */ f(
|
|
1265
1264
|
"div",
|
|
1266
1265
|
{
|
|
1267
1266
|
className: "nice-datagrid__bulk-toolbar",
|
|
@@ -1279,10 +1278,10 @@ function ya({
|
|
|
1279
1278
|
children: [
|
|
1280
1279
|
/* @__PURE__ */ a("span", { style: { fontSize: "0.85rem", color: "var(--nice-text-secondary)" }, children: d("datagrid.selectedCount", "{count} selected").replace(
|
|
1281
1280
|
"{count}",
|
|
1282
|
-
String(
|
|
1281
|
+
String(x.size)
|
|
1283
1282
|
) }),
|
|
1284
1283
|
(yt || []).map((e) => {
|
|
1285
|
-
const t = Array.from(
|
|
1284
|
+
const t = Array.from(x), n = li.filter((r) => x.has(String(r[D]))), i = e.disabled?.(t, n) || !1;
|
|
1286
1285
|
return /* @__PURE__ */ f(
|
|
1287
1286
|
"button",
|
|
1288
1287
|
{
|
|
@@ -1305,13 +1304,13 @@ function ya({
|
|
|
1305
1304
|
type: "button",
|
|
1306
1305
|
className: "nice-btn nice-btn--sm nice-btn--danger",
|
|
1307
1306
|
onClick: () => {
|
|
1308
|
-
const e = Array.from(
|
|
1309
|
-
(n) =>
|
|
1307
|
+
const e = Array.from(x), t = li.filter(
|
|
1308
|
+
(n) => x.has(String(n[D]))
|
|
1310
1309
|
);
|
|
1311
1310
|
vt(e, t);
|
|
1312
1311
|
},
|
|
1313
1312
|
children: [
|
|
1314
|
-
/* @__PURE__ */ a(
|
|
1313
|
+
/* @__PURE__ */ a($, { name: "trash", size: 14 }),
|
|
1315
1314
|
d("datagrid.deleteSelected", "Delete selected")
|
|
1316
1315
|
]
|
|
1317
1316
|
}
|
|
@@ -1323,7 +1322,7 @@ function ya({
|
|
|
1323
1322
|
className: "nice-btn nice-btn--xs nice-btn--ghost",
|
|
1324
1323
|
onClick: () => {
|
|
1325
1324
|
const e = /* @__PURE__ */ new Set();
|
|
1326
|
-
gn === void 0 &&
|
|
1325
|
+
gn === void 0 && Tt(e), te?.(e);
|
|
1327
1326
|
},
|
|
1328
1327
|
style: { marginLeft: "auto" },
|
|
1329
1328
|
children: d("datagrid.clearSelection", "Clear")
|
|
@@ -1335,7 +1334,7 @@ function ya({
|
|
|
1335
1334
|
/* @__PURE__ */ f(
|
|
1336
1335
|
"div",
|
|
1337
1336
|
{
|
|
1338
|
-
ref:
|
|
1337
|
+
ref: qe,
|
|
1339
1338
|
className: `nice-datagrid__table-wrap ${U ? "nice-datagrid__table-wrap--virtual" : ""}`,
|
|
1340
1339
|
style: U ? { maxHeight: Math.min(S.length * E, 600), overflowY: "auto" } : void 0,
|
|
1341
1340
|
onScroll: U ? (e) => sr(e.currentTarget.scrollTop) : void 0,
|
|
@@ -1343,12 +1342,12 @@ function ya({
|
|
|
1343
1342
|
U && /* @__PURE__ */ f("div", { style: { height: S.length * E, position: "relative" }, children: [
|
|
1344
1343
|
/* @__PURE__ */ a("table", { className: ui, style: { position: "sticky", top: 0, zIndex: 3 }, children: /* @__PURE__ */ f("thead", { children: [
|
|
1345
1344
|
fi(
|
|
1346
|
-
(
|
|
1345
|
+
(P ? 1 : 0) + (w ? 1 : 0) + (T ? 1 : 0)
|
|
1347
1346
|
),
|
|
1348
1347
|
/* @__PURE__ */ f("tr", { children: [
|
|
1349
|
-
|
|
1348
|
+
P && /* @__PURE__ */ a("th", { className: "nice-datagrid__expand-col", style: { width: 36 } }),
|
|
1350
1349
|
w && /* @__PURE__ */ a("th", { style: { width: 28 } }),
|
|
1351
|
-
|
|
1350
|
+
T && /* @__PURE__ */ a(
|
|
1352
1351
|
"th",
|
|
1353
1352
|
{
|
|
1354
1353
|
className: "nice-datagrid__checkbox",
|
|
@@ -1364,9 +1363,9 @@ function ya({
|
|
|
1364
1363
|
type: "checkbox",
|
|
1365
1364
|
checked: ve,
|
|
1366
1365
|
ref: (e) => {
|
|
1367
|
-
e && (e.indeterminate =
|
|
1366
|
+
e && (e.indeterminate = Qn && !ve);
|
|
1368
1367
|
},
|
|
1369
|
-
onChange:
|
|
1368
|
+
onChange: qn,
|
|
1370
1369
|
"aria-label": d("controls.selectAll", "Select all")
|
|
1371
1370
|
}
|
|
1372
1371
|
)
|
|
@@ -1384,7 +1383,7 @@ function ya({
|
|
|
1384
1383
|
] })
|
|
1385
1384
|
] }) }),
|
|
1386
1385
|
ti.map((e, t) => {
|
|
1387
|
-
const n = e._vIdx ?? 0, i = n < re, r = (i ?
|
|
1386
|
+
const n = e._vIdx ?? 0, i = n < re, r = (i ? Lt : 0) + n * E, s = i ? ` nice-datagrid__row--frozen${n === Math.min(re, S.length) - 1 ? " nice-datagrid__row--frozen-last" : ""}` : "";
|
|
1388
1387
|
if (e.type === "group") {
|
|
1389
1388
|
const u = e;
|
|
1390
1389
|
return /* @__PURE__ */ f(
|
|
@@ -1405,7 +1404,7 @@ function ya({
|
|
|
1405
1404
|
},
|
|
1406
1405
|
onClick: () => ei(u.key),
|
|
1407
1406
|
children: [
|
|
1408
|
-
/* @__PURE__ */ a("span", { className: "nice-datagrid__group-toggle", children: u.expanded ? /* @__PURE__ */ a(
|
|
1407
|
+
/* @__PURE__ */ a("span", { className: "nice-datagrid__group-toggle", children: u.expanded ? /* @__PURE__ */ a(Le, {}) : /* @__PURE__ */ a(ut, {}) }),
|
|
1409
1408
|
We ? We(u.value, u.rows) : /* @__PURE__ */ f(sn, { children: [
|
|
1410
1409
|
String(u.value),
|
|
1411
1410
|
" (",
|
|
@@ -1417,7 +1416,7 @@ function ya({
|
|
|
1417
1416
|
u.key
|
|
1418
1417
|
);
|
|
1419
1418
|
}
|
|
1420
|
-
const { row: o, key: c } = e, l =
|
|
1419
|
+
const { row: o, key: c } = e, l = x.has(c), m = Ze.has(c);
|
|
1421
1420
|
return /* @__PURE__ */ f(ln.Fragment, { children: [
|
|
1422
1421
|
/* @__PURE__ */ f(
|
|
1423
1422
|
"div",
|
|
@@ -1437,7 +1436,7 @@ function ya({
|
|
|
1437
1436
|
alignItems: "center"
|
|
1438
1437
|
},
|
|
1439
1438
|
onClick: () => ne?.(o),
|
|
1440
|
-
onDoubleClick: _e === "popup" && (Ge || z) ? () =>
|
|
1439
|
+
onDoubleClick: _e === "popup" && (Ge || z) ? () => ue({ key: c, data: { ...o } }) : void 0,
|
|
1441
1440
|
draggable: w,
|
|
1442
1441
|
onDragStart: w ? () => pe(t) : void 0,
|
|
1443
1442
|
onDragOver: w ? (u) => u.preventDefault() : void 0,
|
|
@@ -1446,7 +1445,7 @@ function ya({
|
|
|
1446
1445
|
} : void 0,
|
|
1447
1446
|
onDragEnd: w ? () => pe(null) : void 0,
|
|
1448
1447
|
children: [
|
|
1449
|
-
|
|
1448
|
+
P && /* @__PURE__ */ a(
|
|
1450
1449
|
"div",
|
|
1451
1450
|
{
|
|
1452
1451
|
role: "button",
|
|
@@ -1462,7 +1461,7 @@ function ya({
|
|
|
1462
1461
|
onClick: (u) => {
|
|
1463
1462
|
u.stopPropagation(), Kn(c);
|
|
1464
1463
|
},
|
|
1465
|
-
children: /* @__PURE__ */ a("span", { className: "nice-datagrid__expand-btn", "data-expanded": m, children: m ? /* @__PURE__ */ a(
|
|
1464
|
+
children: /* @__PURE__ */ a("span", { className: "nice-datagrid__expand-btn", "data-expanded": m, children: m ? /* @__PURE__ */ a(Le, {}) : /* @__PURE__ */ a(ut, {}) })
|
|
1466
1465
|
}
|
|
1467
1466
|
),
|
|
1468
1467
|
w && /* @__PURE__ */ a(
|
|
@@ -1479,10 +1478,10 @@ function ya({
|
|
|
1479
1478
|
alignItems: "center",
|
|
1480
1479
|
justifyContent: "center"
|
|
1481
1480
|
},
|
|
1482
|
-
children: /* @__PURE__ */ a(
|
|
1481
|
+
children: /* @__PURE__ */ a($, { name: "more-vertical", size: 14 })
|
|
1483
1482
|
}
|
|
1484
1483
|
),
|
|
1485
|
-
|
|
1484
|
+
T && /* @__PURE__ */ a(
|
|
1486
1485
|
"div",
|
|
1487
1486
|
{
|
|
1488
1487
|
role: "presentation",
|
|
@@ -1505,8 +1504,8 @@ function ya({
|
|
|
1505
1504
|
"data-field": u.field,
|
|
1506
1505
|
className: "nice-datagrid__vcell",
|
|
1507
1506
|
style: {
|
|
1508
|
-
width:
|
|
1509
|
-
flex:
|
|
1507
|
+
width: xe(u) || "auto",
|
|
1508
|
+
flex: xe(u) ? `0 0 ${typeof xe(u) == "number" ? `${xe(u)}px` : xe(u)}` : 1,
|
|
1510
1509
|
textAlign: u.align,
|
|
1511
1510
|
overflow: "hidden",
|
|
1512
1511
|
textOverflow: "ellipsis",
|
|
@@ -1514,7 +1513,7 @@ function ya({
|
|
|
1514
1513
|
padding: "0 8px"
|
|
1515
1514
|
},
|
|
1516
1515
|
onDoubleClick: u.editable && z ? () => st(c, u.field, o[u.field]) : void 0,
|
|
1517
|
-
children:
|
|
1516
|
+
children: di(u, o, c, n)
|
|
1518
1517
|
},
|
|
1519
1518
|
u.field
|
|
1520
1519
|
)),
|
|
@@ -1522,7 +1521,7 @@ function ya({
|
|
|
1522
1521
|
]
|
|
1523
1522
|
}
|
|
1524
1523
|
),
|
|
1525
|
-
|
|
1524
|
+
P && m && /* @__PURE__ */ a(
|
|
1526
1525
|
"div",
|
|
1527
1526
|
{
|
|
1528
1527
|
className: "nice-datagrid__detail-row",
|
|
@@ -1534,7 +1533,7 @@ function ya({
|
|
|
1534
1533
|
padding: "8px 12px",
|
|
1535
1534
|
background: "var(--nice-bg-secondary, #f8f8f8)"
|
|
1536
1535
|
},
|
|
1537
|
-
children:
|
|
1536
|
+
children: P(o)
|
|
1538
1537
|
}
|
|
1539
1538
|
)
|
|
1540
1539
|
] }, c);
|
|
@@ -1543,13 +1542,13 @@ function ya({
|
|
|
1543
1542
|
!U && /* @__PURE__ */ f("table", { className: ui, children: [
|
|
1544
1543
|
/* @__PURE__ */ f("thead", { children: [
|
|
1545
1544
|
fi(
|
|
1546
|
-
(Ne ? 1 : 0) + (
|
|
1545
|
+
(Ne ? 1 : 0) + (P ? 1 : 0) + (w ? 1 : 0) + (T ? 1 : 0)
|
|
1547
1546
|
),
|
|
1548
1547
|
/* @__PURE__ */ f("tr", { children: [
|
|
1549
1548
|
Ne && /* @__PURE__ */ a("th", { className: "nice-datagrid__row-indicator" }),
|
|
1550
|
-
|
|
1549
|
+
P && /* @__PURE__ */ a("th", { className: "nice-datagrid__expand-col", style: { width: 36 } }),
|
|
1551
1550
|
w && /* @__PURE__ */ a("th", { style: { width: 28 } }),
|
|
1552
|
-
|
|
1551
|
+
T && /* @__PURE__ */ a(
|
|
1553
1552
|
"th",
|
|
1554
1553
|
{
|
|
1555
1554
|
className: "nice-datagrid__checkbox",
|
|
@@ -1565,9 +1564,9 @@ function ya({
|
|
|
1565
1564
|
type: "checkbox",
|
|
1566
1565
|
checked: ve,
|
|
1567
1566
|
ref: (e) => {
|
|
1568
|
-
e && (e.indeterminate =
|
|
1567
|
+
e && (e.indeterminate = Qn && !ve);
|
|
1569
1568
|
},
|
|
1570
|
-
onChange:
|
|
1569
|
+
onChange: qn,
|
|
1571
1570
|
"aria-label": d("controls.selectAll", "Select all")
|
|
1572
1571
|
}
|
|
1573
1572
|
)
|
|
@@ -1584,7 +1583,7 @@ function ya({
|
|
|
1584
1583
|
)
|
|
1585
1584
|
] })
|
|
1586
1585
|
] }),
|
|
1587
|
-
/* @__PURE__ */ a("tbody", { children: Je ? /* @__PURE__ */ a("tr", { children: /* @__PURE__ */ a("td", { colSpan:
|
|
1586
|
+
/* @__PURE__ */ a("tbody", { children: Je ? /* @__PURE__ */ a("tr", { children: /* @__PURE__ */ a("td", { colSpan: ct, className: "nice-datagrid__empty", children: /* @__PURE__ */ a("div", { className: "nice-spinner nice-spinner--md", style: { margin: "0 auto" } }) }) }) : S.length === 0 ? /* @__PURE__ */ a("tr", { children: /* @__PURE__ */ a("td", { colSpan: ct, className: "nice-datagrid__empty", children: Li || d("controls.noData", "No data available") }) }) : /* @__PURE__ */ f(sn, { children: [
|
|
1588
1587
|
tn.map(
|
|
1589
1588
|
(e, t) => e.type === "data" && an(e, t, "top")
|
|
1590
1589
|
),
|
|
@@ -1598,8 +1597,8 @@ function ya({
|
|
|
1598
1597
|
className: `nice-datagrid__group-row ${i.className}`.trim(),
|
|
1599
1598
|
style: i.style,
|
|
1600
1599
|
onClick: () => ei(n.key),
|
|
1601
|
-
children: /* @__PURE__ */ f("td", { colSpan:
|
|
1602
|
-
/* @__PURE__ */ a("span", { className: "nice-datagrid__group-toggle", children: n.expanded ? /* @__PURE__ */ a(
|
|
1600
|
+
children: /* @__PURE__ */ f("td", { colSpan: ct, className: "nice-datagrid__group-cell", children: [
|
|
1601
|
+
/* @__PURE__ */ a("span", { className: "nice-datagrid__group-toggle", children: n.expanded ? /* @__PURE__ */ a(Le, {}) : /* @__PURE__ */ a(ut, {}) }),
|
|
1603
1602
|
We ? We(n.value, n.rows) : /* @__PURE__ */ f(sn, { children: [
|
|
1604
1603
|
String(n.value),
|
|
1605
1604
|
" (",
|
|
@@ -1621,7 +1620,7 @@ function ya({
|
|
|
1621
1620
|
]
|
|
1622
1621
|
}
|
|
1623
1622
|
),
|
|
1624
|
-
wr && !Je &&
|
|
1623
|
+
wr && !Je && L.length > 0 && /* @__PURE__ */ a(
|
|
1625
1624
|
"div",
|
|
1626
1625
|
{
|
|
1627
1626
|
className: "nice-datagrid__summary",
|
|
@@ -1632,7 +1631,7 @@ function ya({
|
|
|
1632
1631
|
{
|
|
1633
1632
|
className: "nice-datagrid__summary-cell",
|
|
1634
1633
|
style: { textAlign: e.align },
|
|
1635
|
-
children: e.aggregate ? (e.aggregateLabel || e.aggregate.toUpperCase()) + ": " +
|
|
1634
|
+
children: e.aggregate ? (e.aggregateLabel || e.aggregate.toUpperCase()) + ": " + aa(I, e.field, e.aggregate) : ""
|
|
1636
1635
|
},
|
|
1637
1636
|
e.field
|
|
1638
1637
|
))
|
|
@@ -1657,17 +1656,17 @@ function ya({
|
|
|
1657
1656
|
] })
|
|
1658
1657
|
] }),
|
|
1659
1658
|
/* @__PURE__ */ a(
|
|
1660
|
-
|
|
1659
|
+
ea,
|
|
1661
1660
|
{
|
|
1662
1661
|
page: me,
|
|
1663
|
-
totalPages:
|
|
1664
|
-
onChange:
|
|
1662
|
+
totalPages: qt,
|
|
1663
|
+
onChange: $e,
|
|
1665
1664
|
showInfo: !0,
|
|
1666
1665
|
pageSize: Z,
|
|
1667
1666
|
showPageSize: !H,
|
|
1668
1667
|
pageSizeOptions: [5, 10, 25, 50, 100],
|
|
1669
1668
|
onPageSizeChange: (e) => {
|
|
1670
|
-
y ? v.setPageSize(e) : (
|
|
1669
|
+
y ? v.setPageSize(e) : (Rn(e), $e(1));
|
|
1671
1670
|
},
|
|
1672
1671
|
showFirstLast: !0
|
|
1673
1672
|
}
|
|
@@ -1679,10 +1678,10 @@ function ya({
|
|
|
1679
1678
|
": ",
|
|
1680
1679
|
it
|
|
1681
1680
|
] }),
|
|
1682
|
-
|
|
1681
|
+
T && x.size > 0 && /* @__PURE__ */ f("span", { children: [
|
|
1683
1682
|
d("controls.selected", "Selected"),
|
|
1684
1683
|
": ",
|
|
1685
|
-
|
|
1684
|
+
x.size
|
|
1686
1685
|
] })
|
|
1687
1686
|
] }),
|
|
1688
1687
|
ge && He && /* @__PURE__ */ a(
|
|
@@ -1709,8 +1708,8 @@ function ya({
|
|
|
1709
1708
|
))
|
|
1710
1709
|
}
|
|
1711
1710
|
),
|
|
1712
|
-
Se && Me !== null &&
|
|
1713
|
-
const e =
|
|
1711
|
+
Se && Me !== null && se.portalTarget && (() => {
|
|
1712
|
+
const e = b.find((r) => r.field === Me);
|
|
1714
1713
|
if (!e)
|
|
1715
1714
|
return null;
|
|
1716
1715
|
const t = Fr(e.field), n = (r) => r.toLocaleString(void 0, { maximumFractionDigits: 2 }), i = t.type === "numeric" ? [
|
|
@@ -1724,18 +1723,18 @@ function ya({
|
|
|
1724
1723
|
[d("datagrid.stats.count", "Count"), n(t.count)],
|
|
1725
1724
|
[d("datagrid.stats.unique", "Unique values"), n(t.unique)]
|
|
1726
1725
|
];
|
|
1727
|
-
return
|
|
1726
|
+
return cn(
|
|
1728
1727
|
/* @__PURE__ */ a(
|
|
1729
1728
|
"dl",
|
|
1730
1729
|
{
|
|
1731
|
-
ref:
|
|
1730
|
+
ref: se.popupRef,
|
|
1732
1731
|
id: Hn,
|
|
1733
1732
|
role: "tooltip",
|
|
1734
|
-
className: `nice-datagrid__column-stats ${
|
|
1733
|
+
className: `nice-datagrid__column-stats ${se.themeClass}`,
|
|
1735
1734
|
style: {
|
|
1736
|
-
left:
|
|
1737
|
-
top:
|
|
1738
|
-
opacity:
|
|
1735
|
+
left: se.coords?.left ?? 0,
|
|
1736
|
+
top: se.coords?.top ?? 0,
|
|
1737
|
+
opacity: se.ready ? 1 : 0
|
|
1739
1738
|
},
|
|
1740
1739
|
children: i.map(([r, s]) => /* @__PURE__ */ f(ln.Fragment, { children: [
|
|
1741
1740
|
/* @__PURE__ */ a("dt", { children: r }),
|
|
@@ -1743,14 +1742,14 @@ function ya({
|
|
|
1743
1742
|
] }, r))
|
|
1744
1743
|
}
|
|
1745
1744
|
),
|
|
1746
|
-
|
|
1745
|
+
se.portalTarget
|
|
1747
1746
|
);
|
|
1748
1747
|
})(),
|
|
1749
1748
|
he !== null && V.portalTarget && (() => {
|
|
1750
|
-
const e =
|
|
1749
|
+
const e = b.find((s) => s.field === he);
|
|
1751
1750
|
if (!e)
|
|
1752
1751
|
return null;
|
|
1753
|
-
const t = un && e.sortable !== !1, n = K === e.field && !!
|
|
1752
|
+
const t = un && e.sortable !== !1, n = K === e.field && !!R, i = !!Fe && e.filterable !== !1, r = (s, o, c, l, m = !1) => /* @__PURE__ */ f(
|
|
1754
1753
|
"button",
|
|
1755
1754
|
{
|
|
1756
1755
|
type: "button",
|
|
@@ -1759,13 +1758,13 @@ function ya({
|
|
|
1759
1758
|
disabled: m,
|
|
1760
1759
|
onClick: () => Cr(l),
|
|
1761
1760
|
children: [
|
|
1762
|
-
/* @__PURE__ */ a("span", { className: "nice-datagrid__context-icon", children: /* @__PURE__ */ a(
|
|
1761
|
+
/* @__PURE__ */ a("span", { className: "nice-datagrid__context-icon", children: /* @__PURE__ */ a($, { name: o, size: 14 }) }),
|
|
1763
1762
|
c
|
|
1764
1763
|
]
|
|
1765
1764
|
},
|
|
1766
1765
|
s
|
|
1767
1766
|
);
|
|
1768
|
-
return
|
|
1767
|
+
return cn(
|
|
1769
1768
|
/* @__PURE__ */ f(
|
|
1770
1769
|
"div",
|
|
1771
1770
|
{
|
|
@@ -1831,56 +1830,38 @@ function ya({
|
|
|
1831
1830
|
V.portalTarget
|
|
1832
1831
|
);
|
|
1833
1832
|
})(),
|
|
1834
|
-
(_e === "popup" || Ue) &&
|
|
1835
|
-
const e =
|
|
1836
|
-
let i = "text";
|
|
1837
|
-
return n.dataType === "number" || n.dataType === "currency" || n.dataType === "percent" ? i = "number" : n.dataType === "boolean" ? i = "checkbox" : n.dataType === "date" && (i = "date"), {
|
|
1838
|
-
field: n.field,
|
|
1839
|
-
label: n.header,
|
|
1840
|
-
type: i,
|
|
1841
|
-
required: n.validation?.required
|
|
1842
|
-
};
|
|
1843
|
-
});
|
|
1833
|
+
(_e === "popup" || Ue) && de && (() => {
|
|
1834
|
+
const e = de.key === null;
|
|
1844
1835
|
return /* @__PURE__ */ a(
|
|
1845
|
-
|
|
1836
|
+
oa,
|
|
1846
1837
|
{
|
|
1847
|
-
|
|
1848
|
-
|
|
1849
|
-
|
|
1850
|
-
|
|
1851
|
-
|
|
1852
|
-
|
|
1853
|
-
|
|
1854
|
-
|
|
1855
|
-
|
|
1856
|
-
|
|
1857
|
-
|
|
1858
|
-
|
|
1859
|
-
|
|
1860
|
-
onCancel: () => se(null),
|
|
1861
|
-
...Ti,
|
|
1862
|
-
onFieldChange: (n, i) => se((r) => r && { ...r, data: { ...r.data, [n]: i } }),
|
|
1863
|
-
onSubmit: (n) => {
|
|
1864
|
-
e ? Ue?.(n) : ue.key && (Ge ? Ge(ue.key, n) : z && Object.keys(n).forEach((i) => {
|
|
1865
|
-
z(ue.key, i, n[i]);
|
|
1866
|
-
})), se(null);
|
|
1867
|
-
}
|
|
1868
|
-
}
|
|
1869
|
-
)
|
|
1838
|
+
isNew: e,
|
|
1839
|
+
title: Ai,
|
|
1840
|
+
items: Mi ?? la(b, D),
|
|
1841
|
+
data: de.data,
|
|
1842
|
+
columns: Ii,
|
|
1843
|
+
formProps: $i,
|
|
1844
|
+
onClose: () => ue(null),
|
|
1845
|
+
onFieldChange: (t, n) => ue((i) => i && { ...i, data: { ...i.data, [t]: n } }),
|
|
1846
|
+
onSubmit: (t) => {
|
|
1847
|
+
e ? Ue?.(t) : de.key && (Ge ? Ge(de.key, t) : z && Object.keys(t).forEach((n) => {
|
|
1848
|
+
z(de.key, n, t[n]);
|
|
1849
|
+
})), ue(null);
|
|
1850
|
+
}
|
|
1870
1851
|
}
|
|
1871
1852
|
);
|
|
1872
1853
|
})(),
|
|
1873
|
-
Kt && typeof document < "u" &&
|
|
1854
|
+
Kt && typeof document < "u" && cn(
|
|
1874
1855
|
/* @__PURE__ */ a(
|
|
1875
|
-
|
|
1856
|
+
Zr,
|
|
1876
1857
|
{
|
|
1877
1858
|
visible: !0,
|
|
1878
1859
|
header: d("confirm.title", "Confirmation"),
|
|
1879
1860
|
message: typeof Be == "string" ? Be : d("confirm.deleteMessage", "Are you sure you want to delete this?"),
|
|
1880
1861
|
acceptLabel: d("controls.delete", "Delete"),
|
|
1881
1862
|
rejectLabel: d("controls.cancel", "Cancel"),
|
|
1882
|
-
onAccept:
|
|
1883
|
-
onReject:
|
|
1863
|
+
onAccept: Rr,
|
|
1864
|
+
onReject: Tr
|
|
1884
1865
|
}
|
|
1885
1866
|
),
|
|
1886
1867
|
document.body
|