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