dgz-ui-shared 1.2.39 → 1.2.41
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/chunks/useFilter-D93ncAmn.cjs.js.map +1 -1
- package/dist/chunks/useFilter-DpCwY1KO.es.js.map +1 -1
- package/dist/chunks/{useSortable-D9RgGUd0.cjs.js → useSortable-BKwVnk6V.cjs.js} +2 -2
- package/dist/chunks/{useSortable-D9RgGUd0.cjs.js.map → useSortable-BKwVnk6V.cjs.js.map} +1 -1
- package/dist/chunks/{useSortable-8RrwFw05.es.js → useSortable-rCSw-6ZK.es.js} +24 -24
- package/dist/chunks/{useSortable-8RrwFw05.es.js.map → useSortable-rCSw-6ZK.es.js.map} +1 -1
- package/dist/components/datatable/index.cjs.js +1 -1
- package/dist/components/datatable/index.cjs.js.map +1 -1
- package/dist/components/datatable/index.es.js +138 -138
- package/dist/components/datatable/index.es.js.map +1 -1
- package/dist/hooks/index.cjs.js +1 -1
- package/dist/hooks/index.es.js +1 -1
- package/dist/types/components/datatable/MyTable.d.ts +1 -1
- package/dist/types/components/datatable/MyTable.d.ts.map +1 -1
- package/dist/types/hooks/useColumns.d.ts +7 -1
- package/dist/types/hooks/useColumns.d.ts.map +1 -1
- package/dist/types/hooks/useDataTable.d.ts +8 -1
- package/dist/types/hooks/useDataTable.d.ts.map +1 -1
- package/dist/types/hooks/useFilter.d.ts +4 -1
- package/dist/types/hooks/useFilter.d.ts.map +1 -1
- package/dist/types/hooks/useSortable.d.ts +7 -1
- package/dist/types/hooks/useSortable.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -1,87 +1,87 @@
|
|
|
1
|
-
import { jsx as e, jsxs as
|
|
1
|
+
import { jsx as e, jsxs as m, Fragment as O } from "react/jsx-runtime";
|
|
2
2
|
import { y as P, f as ee } from "../../chunks/index-E1NtSoNr.es.js";
|
|
3
|
-
import { Button as
|
|
4
|
-
import { DropdownMenu as le, DropdownMenuTrigger as de, DropdownMenuContent as te, DropdownMenuItem as se, DropdownMenuSeparator as fe, DropdownMenuCheckboxItem as
|
|
3
|
+
import { Button as Q } from "dgz-ui/button";
|
|
4
|
+
import { DropdownMenu as le, DropdownMenuTrigger as de, DropdownMenuContent as te, DropdownMenuItem as se, DropdownMenuSeparator as fe, DropdownMenuCheckboxItem as re } from "dgz-ui/dropdown";
|
|
5
5
|
import { cn as M } from "dgz-ui/utils";
|
|
6
6
|
import { g as H } from "../../chunks/MyInput-ByJ5vTAN.es.js";
|
|
7
|
-
import { i as R, u as
|
|
8
|
-
import { XIcon as
|
|
9
|
-
import { memo as ne, useMemo as
|
|
7
|
+
import { i as R, u as ie, a as ce, b as pe } from "../../chunks/useSortable-rCSw-6ZK.es.js";
|
|
8
|
+
import { XIcon as h, ArrowDownWideNarrow as xe, ArrowUpWideNarrow as Ne, ArrowUpDown as me, RefreshCw as we } from "lucide-react";
|
|
9
|
+
import { memo as ne, useMemo as U, useEffect as Y, useState as ge } from "react";
|
|
10
10
|
import { useTranslation as K } from "react-i18next";
|
|
11
11
|
import { A as Te } from "../../chunks/Actions-Du8iQ3WR.es.js";
|
|
12
12
|
import { E as Ae } from "../../chunks/ExportData-CwotVgye.es.js";
|
|
13
13
|
import { S as De, F as ve } from "../../chunks/Search-DunDXQgP.es.js";
|
|
14
14
|
import { ButtonGroup as Me } from "dgz-ui";
|
|
15
15
|
import { L as ke } from "../../chunks/Loader-zvzAi0F6.es.js";
|
|
16
|
-
import { D as
|
|
17
|
-
import { Checkbox as
|
|
18
|
-
import { Table as Le, TableHeader as Re, TableRow as
|
|
19
|
-
import { S as
|
|
16
|
+
import { D as j, M as ze, a as Ee } from "../../chunks/MyPagination-B0czoGZK.es.js";
|
|
17
|
+
import { Checkbox as y } from "dgz-ui/form";
|
|
18
|
+
import { Table as Le, TableHeader as Re, TableRow as I, TableHead as J, TableBody as oe, TableCell as $ } from "dgz-ui/table";
|
|
19
|
+
import { S as b } from "../../chunks/SortOrder-CwuehjY1.es.js";
|
|
20
20
|
import { E as We } from "../../chunks/Empty-BReVQKje.es.js";
|
|
21
21
|
const Be = ne(function({
|
|
22
22
|
filters: n,
|
|
23
23
|
params: g,
|
|
24
|
-
onFilter:
|
|
25
|
-
className:
|
|
24
|
+
onFilter: N,
|
|
25
|
+
className: w,
|
|
26
26
|
...k
|
|
27
27
|
}) {
|
|
28
|
-
const { t: l } = K(),
|
|
28
|
+
const { t: l } = K(), c = U(
|
|
29
29
|
() => Object.fromEntries(
|
|
30
|
-
(n == null ? void 0 : n.map((
|
|
31
|
-
var
|
|
30
|
+
(n == null ? void 0 : n.map((p) => {
|
|
31
|
+
var x;
|
|
32
32
|
return [
|
|
33
|
-
|
|
33
|
+
p.name,
|
|
34
34
|
Object.fromEntries(
|
|
35
|
-
((
|
|
35
|
+
((x = p.options) == null ? void 0 : x.map(({ label: v, value: r }) => [r, v])) || []
|
|
36
36
|
)
|
|
37
37
|
];
|
|
38
38
|
})) || []
|
|
39
39
|
),
|
|
40
40
|
[n]
|
|
41
|
-
),
|
|
41
|
+
), A = U(
|
|
42
42
|
() => Object.entries(g || {}).filter(
|
|
43
|
-
([
|
|
43
|
+
([p, x]) => !!(c != null && c[p]) && !R(x)
|
|
44
44
|
),
|
|
45
|
-
[
|
|
45
|
+
[c, g]
|
|
46
46
|
);
|
|
47
|
-
return !R(
|
|
48
|
-
([
|
|
47
|
+
return !R(A) && /* @__PURE__ */ e("div", { ...k, className: M("flex flex-wrap gap-2", w), children: A.map(
|
|
48
|
+
([p, x]) => {
|
|
49
49
|
var v;
|
|
50
|
-
return Array.isArray(
|
|
50
|
+
return Array.isArray(x) ? /* @__PURE__ */ e(Me, { children: x.filter((r) => {
|
|
51
51
|
var s;
|
|
52
|
-
return ((s =
|
|
53
|
-
}).map((
|
|
52
|
+
return ((s = c == null ? void 0 : c[p]) == null ? void 0 : s[r]) && r;
|
|
53
|
+
}).map((r, s) => {
|
|
54
54
|
var z;
|
|
55
|
-
return /* @__PURE__ */
|
|
56
|
-
|
|
55
|
+
return /* @__PURE__ */ m(
|
|
56
|
+
Q,
|
|
57
57
|
{
|
|
58
58
|
size: "sm",
|
|
59
59
|
onClick: () => {
|
|
60
|
-
|
|
60
|
+
N == null || N({
|
|
61
61
|
...g,
|
|
62
|
-
[
|
|
62
|
+
[p]: x.filter((D) => D !== r)
|
|
63
63
|
});
|
|
64
64
|
},
|
|
65
65
|
children: [
|
|
66
|
-
l(String(((z =
|
|
66
|
+
l(String(((z = c == null ? void 0 : c[p]) == null ? void 0 : z[r]) || "")),
|
|
67
67
|
" ",
|
|
68
|
-
/* @__PURE__ */ e(
|
|
68
|
+
/* @__PURE__ */ e(h, {})
|
|
69
69
|
]
|
|
70
70
|
},
|
|
71
71
|
s
|
|
72
72
|
);
|
|
73
|
-
}) },
|
|
74
|
-
|
|
73
|
+
}) }, p) : /* @__PURE__ */ m(
|
|
74
|
+
Q,
|
|
75
75
|
{
|
|
76
76
|
size: "sm",
|
|
77
77
|
onClick: () => {
|
|
78
|
-
const
|
|
79
|
-
delete
|
|
78
|
+
const r = { ...g };
|
|
79
|
+
delete r[p], N == null || N(r);
|
|
80
80
|
},
|
|
81
81
|
children: [
|
|
82
|
-
l(String(((v =
|
|
82
|
+
l(String(((v = c == null ? void 0 : c[p]) == null ? void 0 : v[x]) || "")),
|
|
83
83
|
" ",
|
|
84
|
-
/* @__PURE__ */ e(
|
|
84
|
+
/* @__PURE__ */ e(h, {})
|
|
85
85
|
]
|
|
86
86
|
}
|
|
87
87
|
);
|
|
@@ -91,62 +91,62 @@ const Be = ne(function({
|
|
|
91
91
|
rows: t = [],
|
|
92
92
|
columns: n,
|
|
93
93
|
onRowClick: g,
|
|
94
|
-
rowKey:
|
|
95
|
-
params:
|
|
94
|
+
rowKey: N,
|
|
95
|
+
params: w = {
|
|
96
96
|
page: 1,
|
|
97
|
-
limit:
|
|
97
|
+
limit: j
|
|
98
98
|
},
|
|
99
99
|
hasNumbers: k = !1,
|
|
100
100
|
hasCheckbox: l = !1,
|
|
101
|
-
selectedItems:
|
|
102
|
-
onSelectedItemsChange:
|
|
103
|
-
onSortOrderChange:
|
|
104
|
-
isStickyHeader:
|
|
101
|
+
selectedItems: c,
|
|
102
|
+
onSelectedItemsChange: A,
|
|
103
|
+
onSortOrderChange: p,
|
|
104
|
+
isStickyHeader: x,
|
|
105
105
|
className: v,
|
|
106
|
-
...
|
|
106
|
+
...r
|
|
107
107
|
}) => {
|
|
108
|
-
const { sortObject: s, handleSort: z } =
|
|
109
|
-
sortField:
|
|
110
|
-
sortOrder:
|
|
111
|
-
onSortOrderChange:
|
|
108
|
+
const { sortObject: s, handleSort: z } = ie({
|
|
109
|
+
sortField: w == null ? void 0 : w.sortField,
|
|
110
|
+
sortOrder: w == null ? void 0 : w.sortOrder,
|
|
111
|
+
onSortOrderChange: p
|
|
112
112
|
}), {
|
|
113
|
-
selectedRows:
|
|
113
|
+
selectedRows: D,
|
|
114
114
|
isRowSelected: L,
|
|
115
|
-
isAllRowsSelected:
|
|
115
|
+
isAllRowsSelected: _,
|
|
116
116
|
handleSelectAllRows: E,
|
|
117
|
-
handleSelectRow:
|
|
118
|
-
} = ce({ rows: t, defaultSelectedRows:
|
|
119
|
-
return
|
|
120
|
-
|
|
121
|
-
}, [
|
|
117
|
+
handleSelectRow: G
|
|
118
|
+
} = ce({ rows: t, defaultSelectedRows: c });
|
|
119
|
+
return Y(() => {
|
|
120
|
+
A == null || A(D);
|
|
121
|
+
}, [D, A]), /* @__PURE__ */ m(Le, { ...r, children: [
|
|
122
122
|
/* @__PURE__ */ e(
|
|
123
123
|
Re,
|
|
124
124
|
{
|
|
125
|
-
className: M("bg-bg",
|
|
126
|
-
children: /* @__PURE__ */
|
|
127
|
-
l && /* @__PURE__ */ e(
|
|
128
|
-
|
|
125
|
+
className: M("bg-bg", x && "sticky top-0 z-1"),
|
|
126
|
+
children: /* @__PURE__ */ m(I, { children: [
|
|
127
|
+
l && /* @__PURE__ */ e(J, { className: "w-12 p-3", children: /* @__PURE__ */ e(
|
|
128
|
+
y,
|
|
129
129
|
{
|
|
130
130
|
className: "mt-1",
|
|
131
|
-
checked:
|
|
132
|
-
onCheckedChange: (f) => E(
|
|
131
|
+
checked: _(N),
|
|
132
|
+
onCheckedChange: (f) => E(N, !!f),
|
|
133
133
|
"aria-label": "Select all"
|
|
134
134
|
}
|
|
135
135
|
) }),
|
|
136
|
-
k && /* @__PURE__ */ e(
|
|
136
|
+
k && /* @__PURE__ */ e(J, { className: "w-12 p-2", children: "#" }),
|
|
137
137
|
n.filter((f) => !f.hidden).map((f) => /* @__PURE__ */ e(
|
|
138
|
-
|
|
138
|
+
J,
|
|
139
139
|
{
|
|
140
140
|
style: f.styles,
|
|
141
141
|
className: M("p-2", f.sortable && "cursor-pointer"),
|
|
142
142
|
onClick: () => f.sortable && z(f.dataIndex),
|
|
143
|
-
children: /* @__PURE__ */
|
|
143
|
+
children: /* @__PURE__ */ m("div", { className: "flex items-center gap-2", children: [
|
|
144
144
|
f.name,
|
|
145
145
|
" ",
|
|
146
|
-
f.sortable && ((s == null ? void 0 : s.sortField) === f.key ? /* @__PURE__ */
|
|
147
|
-
(s == null ? void 0 : s.sortOrder) ===
|
|
148
|
-
(s == null ? void 0 : s.sortOrder) ===
|
|
149
|
-
] }) : /* @__PURE__ */ e(
|
|
146
|
+
f.sortable && ((s == null ? void 0 : s.sortField) === f.key ? /* @__PURE__ */ m(O, { children: [
|
|
147
|
+
(s == null ? void 0 : s.sortOrder) === b.DESC && /* @__PURE__ */ e(xe, { size: 15 }),
|
|
148
|
+
(s == null ? void 0 : s.sortOrder) === b.ASC && /* @__PURE__ */ e(Ne, { size: 15 })
|
|
149
|
+
] }) : /* @__PURE__ */ e(me, { size: 15 }))
|
|
150
150
|
] })
|
|
151
151
|
},
|
|
152
152
|
f.key
|
|
@@ -154,12 +154,12 @@ const Be = ne(function({
|
|
|
154
154
|
] })
|
|
155
155
|
}
|
|
156
156
|
),
|
|
157
|
-
/* @__PURE__ */ e(oe, { className: "[&>tr:nth-child(even)]:bg-bg-secondary", children: t.length ? t.map((f, o) => /* @__PURE__ */
|
|
158
|
-
|
|
157
|
+
/* @__PURE__ */ e(oe, { className: "[&>tr:nth-child(even)]:bg-bg-secondary", children: t.length ? t.map((f, o) => /* @__PURE__ */ m(
|
|
158
|
+
I,
|
|
159
159
|
{
|
|
160
160
|
onClick: () => g == null ? void 0 : g(f),
|
|
161
161
|
className: M(g && "cursor-pointer"),
|
|
162
|
-
"data-state": L(f[
|
|
162
|
+
"data-state": L(f[N]) && "selected",
|
|
163
163
|
children: [
|
|
164
164
|
l && /* @__PURE__ */ e(
|
|
165
165
|
$,
|
|
@@ -167,17 +167,17 @@ const Be = ne(function({
|
|
|
167
167
|
className: "w-12 p-3",
|
|
168
168
|
onClick: (d) => d.stopPropagation(),
|
|
169
169
|
children: /* @__PURE__ */ e(
|
|
170
|
-
|
|
170
|
+
y,
|
|
171
171
|
{
|
|
172
172
|
className: "mt-1",
|
|
173
|
-
checked: L(f[
|
|
174
|
-
onCheckedChange: (d) =>
|
|
173
|
+
checked: L(f[N]),
|
|
174
|
+
onCheckedChange: (d) => G(f[N], !!d),
|
|
175
175
|
"aria-label": "Select row"
|
|
176
176
|
}
|
|
177
177
|
)
|
|
178
178
|
}
|
|
179
179
|
),
|
|
180
|
-
k && /* @__PURE__ */ e($, { className: "w-12 p-2", children: (
|
|
180
|
+
k && /* @__PURE__ */ e($, { className: "w-12 p-2", children: (w.page - 1) * (w.limit || j) + o + 1 }),
|
|
181
181
|
n.filter((d) => !d.hidden).map((d) => /* @__PURE__ */ e(
|
|
182
182
|
$,
|
|
183
183
|
{
|
|
@@ -189,8 +189,8 @@ const Be = ne(function({
|
|
|
189
189
|
))
|
|
190
190
|
]
|
|
191
191
|
},
|
|
192
|
-
`${f[
|
|
193
|
-
)) : /* @__PURE__ */ e(
|
|
192
|
+
`${f[N]}`
|
|
193
|
+
)) : /* @__PURE__ */ e(I, { children: /* @__PURE__ */ e(
|
|
194
194
|
$,
|
|
195
195
|
{
|
|
196
196
|
colSpan: k ? l ? n.length + 2 : n.length + 1 : n.length,
|
|
@@ -202,38 +202,38 @@ const Be = ne(function({
|
|
|
202
202
|
dataSource: t,
|
|
203
203
|
columns: n,
|
|
204
204
|
rowKey: g,
|
|
205
|
-
hasSearch:
|
|
206
|
-
exportOptions:
|
|
205
|
+
hasSearch: N,
|
|
206
|
+
exportOptions: w,
|
|
207
207
|
hasPagination: k,
|
|
208
208
|
onParamChange: l,
|
|
209
|
-
dataKey:
|
|
210
|
-
loading:
|
|
211
|
-
tableKey:
|
|
212
|
-
filters:
|
|
209
|
+
dataKey: c = "docs",
|
|
210
|
+
loading: A,
|
|
211
|
+
tableKey: p,
|
|
212
|
+
filters: x,
|
|
213
213
|
actions: v,
|
|
214
|
-
handleFilterChange:
|
|
214
|
+
handleFilterChange: r,
|
|
215
215
|
params: s,
|
|
216
216
|
exportLoading: z = !1,
|
|
217
|
-
onColumnsUpdate:
|
|
217
|
+
onColumnsUpdate: D,
|
|
218
218
|
hasColumnsVisibilityDropdown: L,
|
|
219
|
-
showAppliedFilters:
|
|
219
|
+
showAppliedFilters: _ = !1,
|
|
220
220
|
onSelectedItemsChange: E,
|
|
221
|
-
actionProps:
|
|
221
|
+
actionProps: G,
|
|
222
222
|
filterWrapperProps: f,
|
|
223
223
|
exportOptionsProps: o,
|
|
224
224
|
columnsVisibilityProps: d,
|
|
225
225
|
paginationProps: F,
|
|
226
|
-
searchProps:
|
|
226
|
+
searchProps: T,
|
|
227
227
|
className: S,
|
|
228
228
|
...V
|
|
229
229
|
}) => {
|
|
230
|
-
var
|
|
231
|
-
const { t:
|
|
232
|
-
return
|
|
233
|
-
|
|
234
|
-
}, [B,
|
|
230
|
+
var Z;
|
|
231
|
+
const { t: X } = K(), [W, u] = ge([]), { formattedColumns: B, handleColumnsChange: a, resetColumns: C } = pe({ key: p, columns: n });
|
|
232
|
+
return Y(() => {
|
|
233
|
+
D == null || D(B);
|
|
234
|
+
}, [B, D]), Y(() => {
|
|
235
235
|
E == null || E(W);
|
|
236
|
-
}, [W, E]), /* @__PURE__ */
|
|
236
|
+
}, [W, E]), /* @__PURE__ */ m(
|
|
237
237
|
"div",
|
|
238
238
|
{
|
|
239
239
|
className: M(
|
|
@@ -241,37 +241,37 @@ const Be = ne(function({
|
|
|
241
241
|
S
|
|
242
242
|
),
|
|
243
243
|
children: [
|
|
244
|
-
/* @__PURE__ */
|
|
245
|
-
(
|
|
246
|
-
/* @__PURE__ */ e("div", { className: "grow", children:
|
|
244
|
+
/* @__PURE__ */ m("div", { className: "flex shrink-0 flex-col gap-4 p-4", children: [
|
|
245
|
+
(N || L && p || !R(w) || !R(x)) && /* @__PURE__ */ m("div", { className: "flex flex-col justify-between gap-3 lg:flex-row lg:items-center", children: [
|
|
246
|
+
/* @__PURE__ */ e("div", { className: "grow", children: N && /* @__PURE__ */ e(
|
|
247
247
|
De,
|
|
248
248
|
{
|
|
249
|
-
...
|
|
249
|
+
...T,
|
|
250
250
|
inputProps: {
|
|
251
|
-
...
|
|
251
|
+
...T == null ? void 0 : T.inputProps,
|
|
252
252
|
className: M(
|
|
253
253
|
"h-8 grow",
|
|
254
|
-
(
|
|
254
|
+
(Z = T == null ? void 0 : T.inputProps) == null ? void 0 : Z.className
|
|
255
255
|
)
|
|
256
256
|
},
|
|
257
257
|
className: M(
|
|
258
258
|
"max-w-full lg:max-w-80! [&_button]:-top-1",
|
|
259
|
-
|
|
259
|
+
T == null ? void 0 : T.className
|
|
260
260
|
),
|
|
261
261
|
defaultValue: H(s, "search", ""),
|
|
262
|
-
onSearchChange: (
|
|
262
|
+
onSearchChange: (i) => l == null ? void 0 : l({ ...s, search: i, page: 1 })
|
|
263
263
|
}
|
|
264
264
|
) }),
|
|
265
|
-
/* @__PURE__ */
|
|
266
|
-
|
|
265
|
+
/* @__PURE__ */ m("div", { className: "flex items-center justify-end gap-3", children: [
|
|
266
|
+
w && /* @__PURE__ */ e(
|
|
267
267
|
Ae,
|
|
268
268
|
{
|
|
269
269
|
...o,
|
|
270
|
-
options:
|
|
270
|
+
options: w,
|
|
271
271
|
loading: z
|
|
272
272
|
}
|
|
273
273
|
),
|
|
274
|
-
L &&
|
|
274
|
+
L && p && /* @__PURE__ */ m(le, { children: [
|
|
275
275
|
/* @__PURE__ */ e(
|
|
276
276
|
de,
|
|
277
277
|
{
|
|
@@ -279,81 +279,81 @@ const Be = ne(function({
|
|
|
279
279
|
className: "grow",
|
|
280
280
|
...d == null ? void 0 : d.triggerProps,
|
|
281
281
|
children: /* @__PURE__ */ e(
|
|
282
|
-
|
|
282
|
+
Q,
|
|
283
283
|
{
|
|
284
284
|
variant: "secondary",
|
|
285
285
|
size: "sm",
|
|
286
286
|
className: "ml-auto rounded-lg px-3",
|
|
287
|
-
children: (d == null ? void 0 : d.title) || /* @__PURE__ */
|
|
287
|
+
children: (d == null ? void 0 : d.title) || /* @__PURE__ */ m(O, { children: [
|
|
288
288
|
/* @__PURE__ */ e(P, {}),
|
|
289
289
|
" ",
|
|
290
|
-
/* @__PURE__ */ e("span", { className: "hidden md:inline!", children:
|
|
290
|
+
/* @__PURE__ */ e("span", { className: "hidden md:inline!", children: X("Customize columns") }),
|
|
291
291
|
/* @__PURE__ */ e(ee, {})
|
|
292
292
|
] })
|
|
293
293
|
}
|
|
294
294
|
)
|
|
295
295
|
}
|
|
296
296
|
),
|
|
297
|
-
/* @__PURE__ */
|
|
297
|
+
/* @__PURE__ */ m(
|
|
298
298
|
te,
|
|
299
299
|
{
|
|
300
300
|
align: "end",
|
|
301
301
|
...d == null ? void 0 : d.contentProps,
|
|
302
302
|
children: [
|
|
303
|
-
/* @__PURE__ */
|
|
303
|
+
/* @__PURE__ */ m(
|
|
304
304
|
se,
|
|
305
305
|
{
|
|
306
306
|
className: "capitalize",
|
|
307
307
|
onClick: C,
|
|
308
308
|
children: [
|
|
309
|
-
/* @__PURE__ */ e(
|
|
309
|
+
/* @__PURE__ */ e(we, {}),
|
|
310
310
|
" ",
|
|
311
|
-
(d == null ? void 0 : d.resetText) ||
|
|
311
|
+
(d == null ? void 0 : d.resetText) || X("Reset columns")
|
|
312
312
|
]
|
|
313
313
|
}
|
|
314
314
|
),
|
|
315
315
|
/* @__PURE__ */ e(fe, {}),
|
|
316
|
-
B.map((
|
|
317
|
-
|
|
316
|
+
B.map((i) => /* @__PURE__ */ e(
|
|
317
|
+
re,
|
|
318
318
|
{
|
|
319
319
|
className: "capitalize",
|
|
320
|
-
checked: !
|
|
321
|
-
onCheckedChange: (
|
|
322
|
-
children:
|
|
320
|
+
checked: !i.hidden,
|
|
321
|
+
onCheckedChange: (q) => a(i, !q),
|
|
322
|
+
children: i.name
|
|
323
323
|
},
|
|
324
|
-
|
|
324
|
+
i.key
|
|
325
325
|
))
|
|
326
326
|
]
|
|
327
327
|
}
|
|
328
328
|
)
|
|
329
329
|
] }),
|
|
330
|
-
v && /* @__PURE__ */ e(Te, { ...
|
|
331
|
-
|
|
330
|
+
v && /* @__PURE__ */ e(Te, { ...G, actions: v }),
|
|
331
|
+
x && /* @__PURE__ */ e(
|
|
332
332
|
ve,
|
|
333
333
|
{
|
|
334
334
|
...f,
|
|
335
|
-
filters:
|
|
335
|
+
filters: x,
|
|
336
336
|
params: s,
|
|
337
|
-
onChange:
|
|
338
|
-
onFilter: (
|
|
339
|
-
l == null || l({ ...
|
|
337
|
+
onChange: r,
|
|
338
|
+
onFilter: (i) => {
|
|
339
|
+
l == null || l({ ...i, page: 1 }), r == null || r(i);
|
|
340
340
|
}
|
|
341
341
|
}
|
|
342
342
|
)
|
|
343
343
|
] })
|
|
344
344
|
] }),
|
|
345
|
-
|
|
345
|
+
_ && !R(x) && /* @__PURE__ */ e(
|
|
346
346
|
Be,
|
|
347
347
|
{
|
|
348
|
-
filters:
|
|
348
|
+
filters: x,
|
|
349
349
|
params: s,
|
|
350
|
-
onFilter: (
|
|
351
|
-
l == null || l({ ...
|
|
350
|
+
onFilter: (i) => {
|
|
351
|
+
l == null || l({ ...i, page: 1 }), r == null || r(i);
|
|
352
352
|
}
|
|
353
353
|
}
|
|
354
354
|
)
|
|
355
355
|
] }),
|
|
356
|
-
/* @__PURE__ */ e("div", { className: M("flex grow flex-col overflow-auto border-y"), children:
|
|
356
|
+
/* @__PURE__ */ e("div", { className: M("flex grow flex-col overflow-auto border-y"), children: A ? /* @__PURE__ */ e(ke, {}) : /* @__PURE__ */ e(
|
|
357
357
|
$e,
|
|
358
358
|
{
|
|
359
359
|
...V,
|
|
@@ -362,25 +362,25 @@ const Be = ne(function({
|
|
|
362
362
|
limit: t == null ? void 0 : t.limit,
|
|
363
363
|
...s
|
|
364
364
|
},
|
|
365
|
-
rows: H(t,
|
|
365
|
+
rows: H(t, c, []),
|
|
366
366
|
rowKey: g,
|
|
367
367
|
selectedItems: W,
|
|
368
368
|
columns: B,
|
|
369
369
|
onSelectedItemsChange: u,
|
|
370
|
-
onSortOrderChange: ({ sortField:
|
|
371
|
-
l == null || l({ ...s, sortField:
|
|
370
|
+
onSortOrderChange: ({ sortField: i, sortOrder: q }) => {
|
|
371
|
+
l == null || l({ ...s, sortField: i, sortOrder: q });
|
|
372
372
|
}
|
|
373
373
|
}
|
|
374
374
|
) }),
|
|
375
|
-
k && /* @__PURE__ */
|
|
375
|
+
k && /* @__PURE__ */ m("div", { className: "flex shrink-0 flex-wrap items-center justify-center gap-3 p-4 lg:justify-between", children: [
|
|
376
376
|
/* @__PURE__ */ e("div", { className: "text-sm", children: /* @__PURE__ */ e(
|
|
377
377
|
ze,
|
|
378
378
|
{
|
|
379
|
-
onLimitChange: (
|
|
379
|
+
onLimitChange: (i) => l == null ? void 0 : l({ ...s, limit: i, page: 1 }),
|
|
380
380
|
defaultValue: t == null ? void 0 : t.limit
|
|
381
381
|
}
|
|
382
382
|
) }),
|
|
383
|
-
/* @__PURE__ */ e("div", { className: "text-muted-foreground text-sm", children:
|
|
383
|
+
/* @__PURE__ */ e("div", { className: "text-muted-foreground text-sm", children: X("{{selectedCount}} of {{total}} row(s) selected", {
|
|
384
384
|
selectedCount: W.length,
|
|
385
385
|
total: (t == null ? void 0 : t.total) || 0
|
|
386
386
|
}) }),
|
|
@@ -388,7 +388,7 @@ const Be = ne(function({
|
|
|
388
388
|
Ee,
|
|
389
389
|
{
|
|
390
390
|
...F,
|
|
391
|
-
onPageChange: (
|
|
391
|
+
onPageChange: (i) => l == null ? void 0 : l({ ...s, page: i }),
|
|
392
392
|
currentPage: t == null ? void 0 : t.page,
|
|
393
393
|
totalPages: t == null ? void 0 : t.totalPages
|
|
394
394
|
}
|