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