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