dgz-ui-shared 1.1.29 → 1.1.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/{DateRangePicker-hhQndFoD.js → DateRangePicker-BbvT7XEr.js} +6 -6
- package/dist/{DateRangePicker-DqzcyN7H.cjs → DateRangePicker-DlH-0Nyv.cjs} +1 -1
- package/dist/{Empty-DspeyPQa.js → Empty-R6tJosqw.js} +7 -7
- package/dist/Empty-RpS8tJNv.cjs +6 -0
- package/dist/{FilterWrapper-OjCn16Bf.cjs → FilterWrapper-D0oACPk3.cjs} +4 -4
- package/dist/{FilterWrapper-BU6BOSt1.js → FilterWrapper-vMOeud_S.js} +4 -4
- package/dist/MyLimitSelect-CFjO6tYM.cjs +6 -0
- package/dist/MyLimitSelect-JkR-SZXb.js +221 -0
- package/dist/components/confirm/index.cjs.js +1 -1
- package/dist/components/confirm/index.es.js +1 -1
- package/dist/components/datatable/index.cjs.js +5 -5
- package/dist/components/datatable/index.es.js +164 -160
- package/dist/components/datepicker/index.cjs.js +1 -1
- package/dist/components/datepicker/index.es.js +1 -1
- package/dist/components/empty/index.cjs.js +1 -1
- package/dist/components/empty/index.es.js +1 -1
- package/dist/components/filters/index.cjs.js +1 -1
- package/dist/components/filters/index.es.js +15 -15
- package/dist/components/form/index.cjs.js +1 -1
- package/dist/components/form/index.es.js +1 -1
- package/dist/components/pagination/index.cjs.js +1 -1
- package/dist/components/pagination/index.es.js +1 -1
- package/dist/components/theme/index.cjs.js +2 -2
- package/dist/components/theme/index.es.js +5 -5
- package/dist/hooks/index.cjs.js +1 -1
- package/dist/hooks/index.es.js +1 -1
- package/dist/types/components/datatable/DataTable.d.ts +6 -2
- package/dist/types/components/datatable/DataTable.d.ts.map +1 -1
- package/dist/types/components/pagination/MyPagination.d.ts +4 -3
- package/dist/types/components/pagination/MyPagination.d.ts.map +1 -1
- package/dist/{unstyled-3gQZkMky.js → unstyled-B5s-hwxJ.js} +1 -1
- package/dist/{unstyled-CD5LId4m.cjs → unstyled-D8OC13a0.cjs} +1 -1
- package/package.json +3 -1
- package/dist/Empty-DPsWiBRX.cjs +0 -6
- package/dist/MyLimitSelect-BU1FClXt.cjs +0 -6
- package/dist/MyLimitSelect-D5ZWDY-s.js +0 -209
- package/dist/useTranslation-CZf20ucv.cjs +0 -1
- package/dist/useTranslation-dH-uwymc.js +0 -147
|
@@ -1,61 +1,61 @@
|
|
|
1
1
|
import { j as e } from "../../jsx-runtime-DS1N_tNq.js";
|
|
2
|
-
import { u as
|
|
3
|
-
import { T as
|
|
4
|
-
import { D as
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
2
|
+
import { u as P } from "../../button-CdZDBhmr-BT_j3ig5.js";
|
|
3
|
+
import { T as ee, A as se, i as te, u as le, f as de, d as re } from "../../dropdown-menu-TWRSm6RK-D_FJpI4C.js";
|
|
4
|
+
import { D as J, a as ae, M as xe } from "../../MyLimitSelect-JkR-SZXb.js";
|
|
5
|
+
import { useTranslation as ce } from "react-i18next";
|
|
6
|
+
import { y as ie, f as fe } from "../../index-BrQ82Wyu.js";
|
|
7
|
+
import { forwardRef as N, useEffect as W, useState as he } from "react";
|
|
8
|
+
import { l as M } from "../../lodash-CYNxjS-I.js";
|
|
8
9
|
import { a as m } from "../../index-BL59b1Bz-C9bJE_xn.js";
|
|
9
|
-
import { m as
|
|
10
|
-
import { u as
|
|
11
|
-
import { v as
|
|
12
|
-
import { S as
|
|
13
|
-
import { E as
|
|
10
|
+
import { m as f } from "../../utils-B6fNqzRf-B1_jG1K7.js";
|
|
11
|
+
import { u as je, a as pe, b as Ne } from "../../useSortable-DwSvT1qU.js";
|
|
12
|
+
import { v as B } from "../../input-mask-DBLFIvhN-BBxoZxnd.js";
|
|
13
|
+
import { S as O } from "../../SortOrder-CwuehjY1.js";
|
|
14
|
+
import { E as me } from "../../Empty-R6tJosqw.js";
|
|
14
15
|
import { c as R } from "../../createLucideIcon-B950nf2d.js";
|
|
15
|
-
import { S as
|
|
16
|
-
import { L as
|
|
17
|
-
import { A as
|
|
18
|
-
import { E as
|
|
19
|
-
|
|
20
|
-
const Q = j(
|
|
16
|
+
import { S as oe, F as ne } from "../../FilterWrapper-vMOeud_S.js";
|
|
17
|
+
import { L as ke } from "../../Loader-gLl5AAz4.js";
|
|
18
|
+
import { A as we } from "../../Actions-DYmkv_J9.js";
|
|
19
|
+
import { E as ye } from "../../ExportData-DvwQ6UCI.js";
|
|
20
|
+
const G = N(
|
|
21
21
|
({ className: s, ...l }, d) => /* @__PURE__ */ m.jsx(
|
|
22
22
|
"table",
|
|
23
23
|
{
|
|
24
24
|
ref: d,
|
|
25
|
-
className:
|
|
25
|
+
className: f("w-full caption-bottom text-sm", s),
|
|
26
26
|
...l
|
|
27
27
|
}
|
|
28
28
|
)
|
|
29
29
|
);
|
|
30
|
-
|
|
31
|
-
const
|
|
32
|
-
|
|
33
|
-
const
|
|
30
|
+
G.displayName = "Table";
|
|
31
|
+
const Q = N(({ className: s, ...l }, d) => /* @__PURE__ */ m.jsx("thead", { ref: d, className: f("[&_tr]:border-b", s), ...l }));
|
|
32
|
+
Q.displayName = "TableHeader";
|
|
33
|
+
const X = N(({ className: s, ...l }, d) => /* @__PURE__ */ m.jsx(
|
|
34
34
|
"tbody",
|
|
35
35
|
{
|
|
36
36
|
ref: d,
|
|
37
|
-
className:
|
|
37
|
+
className: f("[&_tr:last-child]:border-0", s),
|
|
38
38
|
...l
|
|
39
39
|
}
|
|
40
40
|
));
|
|
41
|
-
|
|
42
|
-
const
|
|
41
|
+
X.displayName = "TableBody";
|
|
42
|
+
const ge = N(({ className: s, ...l }, d) => /* @__PURE__ */ m.jsx(
|
|
43
43
|
"tfoot",
|
|
44
44
|
{
|
|
45
45
|
ref: d,
|
|
46
|
-
className:
|
|
46
|
+
className: f(
|
|
47
47
|
"bg-muted/50 border-t font-medium [&>tr]:last:border-b-0",
|
|
48
48
|
s
|
|
49
49
|
),
|
|
50
50
|
...l
|
|
51
51
|
}
|
|
52
52
|
));
|
|
53
|
-
|
|
54
|
-
const L =
|
|
53
|
+
ge.displayName = "TableFooter";
|
|
54
|
+
const L = N(({ className: s, ...l }, d) => /* @__PURE__ */ m.jsx(
|
|
55
55
|
"tr",
|
|
56
56
|
{
|
|
57
57
|
ref: d,
|
|
58
|
-
className:
|
|
58
|
+
className: f(
|
|
59
59
|
"hover:bg-muted/50 data-[state=selected]:bg-muted border-b transition-colors",
|
|
60
60
|
s
|
|
61
61
|
),
|
|
@@ -63,11 +63,11 @@ const L = j(({ className: s, ...l }, d) => /* @__PURE__ */ m.jsx(
|
|
|
63
63
|
}
|
|
64
64
|
));
|
|
65
65
|
L.displayName = "TableRow";
|
|
66
|
-
const z =
|
|
66
|
+
const z = N(({ className: s, ...l }, d) => /* @__PURE__ */ m.jsx(
|
|
67
67
|
"th",
|
|
68
68
|
{
|
|
69
69
|
ref: d,
|
|
70
|
-
className:
|
|
70
|
+
className: f(
|
|
71
71
|
"text-muted-foreground h-12 px-4 text-left align-middle font-medium [&:has([role=checkbox])]:pr-0",
|
|
72
72
|
s
|
|
73
73
|
),
|
|
@@ -75,37 +75,37 @@ const z = j(({ className: s, ...l }, d) => /* @__PURE__ */ m.jsx(
|
|
|
75
75
|
}
|
|
76
76
|
));
|
|
77
77
|
z.displayName = "TableHead";
|
|
78
|
-
const A =
|
|
78
|
+
const A = N(({ className: s, ...l }, d) => /* @__PURE__ */ m.jsx(
|
|
79
79
|
"td",
|
|
80
80
|
{
|
|
81
81
|
ref: d,
|
|
82
|
-
className:
|
|
82
|
+
className: f("p-4 align-middle [&:has([role=checkbox])]:pr-0", s),
|
|
83
83
|
...l
|
|
84
84
|
}
|
|
85
85
|
));
|
|
86
86
|
A.displayName = "TableCell";
|
|
87
|
-
const
|
|
87
|
+
const ve = N(({ className: s, ...l }, d) => /* @__PURE__ */ m.jsx(
|
|
88
88
|
"caption",
|
|
89
89
|
{
|
|
90
90
|
ref: d,
|
|
91
|
-
className:
|
|
91
|
+
className: f("text-muted-foreground mt-4 text-sm", s),
|
|
92
92
|
...l
|
|
93
93
|
}
|
|
94
94
|
));
|
|
95
|
-
|
|
95
|
+
ve.displayName = "TableCaption";
|
|
96
96
|
/**
|
|
97
97
|
* @license lucide-react v0.511.0 - ISC
|
|
98
98
|
*
|
|
99
99
|
* This source code is licensed under the ISC license.
|
|
100
100
|
* See the LICENSE file in the root directory of this source tree.
|
|
101
101
|
*/
|
|
102
|
-
const
|
|
102
|
+
const Me = [
|
|
103
103
|
["path", { d: "m3 16 4 4 4-4", key: "1co6wj" }],
|
|
104
104
|
["path", { d: "M7 20V4", key: "1yoxec" }],
|
|
105
105
|
["path", { d: "M11 4h10", key: "1w87gc" }],
|
|
106
106
|
["path", { d: "M11 8h7", key: "djye34" }],
|
|
107
107
|
["path", { d: "M11 12h4", key: "q8tih4" }]
|
|
108
|
-
],
|
|
108
|
+
], Te = R("arrow-down-wide-narrow", Me);
|
|
109
109
|
/**
|
|
110
110
|
* @license lucide-react v0.511.0 - ISC
|
|
111
111
|
*
|
|
@@ -117,91 +117,91 @@ const be = [
|
|
|
117
117
|
["path", { d: "M17 20V4", key: "1ejh1v" }],
|
|
118
118
|
["path", { d: "m3 8 4-4 4 4", key: "11wl7u" }],
|
|
119
119
|
["path", { d: "M7 4v16", key: "1glfcx" }]
|
|
120
|
-
],
|
|
120
|
+
], Ae = R("arrow-up-down", be);
|
|
121
121
|
/**
|
|
122
122
|
* @license lucide-react v0.511.0 - ISC
|
|
123
123
|
*
|
|
124
124
|
* This source code is licensed under the ISC license.
|
|
125
125
|
* See the LICENSE file in the root directory of this source tree.
|
|
126
126
|
*/
|
|
127
|
-
const
|
|
127
|
+
const Ee = [
|
|
128
128
|
["path", { d: "m3 8 4-4 4 4", key: "11wl7u" }],
|
|
129
129
|
["path", { d: "M7 4v16", key: "1glfcx" }],
|
|
130
130
|
["path", { d: "M11 12h10", key: "1438ji" }],
|
|
131
131
|
["path", { d: "M11 16h7", key: "uosisv" }],
|
|
132
132
|
["path", { d: "M11 20h4", key: "1krc32" }]
|
|
133
|
-
],
|
|
133
|
+
], _e = R("arrow-up-wide-narrow", Ee);
|
|
134
134
|
/**
|
|
135
135
|
* @license lucide-react v0.511.0 - ISC
|
|
136
136
|
*
|
|
137
137
|
* This source code is licensed under the ISC license.
|
|
138
138
|
* See the LICENSE file in the root directory of this source tree.
|
|
139
139
|
*/
|
|
140
|
-
const
|
|
140
|
+
const Le = [
|
|
141
141
|
["path", { d: "M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8", key: "v9h5vc" }],
|
|
142
142
|
["path", { d: "M21 3v5h-5", key: "1q7to0" }],
|
|
143
143
|
["path", { d: "M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16", key: "3uifl3" }],
|
|
144
144
|
["path", { d: "M8 16H3v5", key: "1cv678" }]
|
|
145
|
-
],
|
|
145
|
+
], ze = R("refresh-cw", Le), Re = ({
|
|
146
146
|
rows: s = [],
|
|
147
147
|
columns: l,
|
|
148
148
|
onRowClick: d,
|
|
149
|
-
rowKey:
|
|
150
|
-
params:
|
|
149
|
+
rowKey: p,
|
|
150
|
+
params: h = {
|
|
151
151
|
page: 1,
|
|
152
|
-
limit:
|
|
152
|
+
limit: J
|
|
153
153
|
},
|
|
154
|
-
hasNumbers:
|
|
155
|
-
hasCheckbox:
|
|
156
|
-
selectedItems:
|
|
157
|
-
onSelectedItemsChange:
|
|
154
|
+
hasNumbers: w = !1,
|
|
155
|
+
hasCheckbox: o = !1,
|
|
156
|
+
selectedItems: T,
|
|
157
|
+
onSelectedItemsChange: y,
|
|
158
158
|
onSortOrderChange: D,
|
|
159
159
|
isStickyHeader: r,
|
|
160
160
|
className: F,
|
|
161
161
|
...$
|
|
162
162
|
}) => {
|
|
163
|
-
const { sortObject:
|
|
164
|
-
sortField:
|
|
165
|
-
sortOrder:
|
|
163
|
+
const { sortObject: c, handleSort: b } = je({
|
|
164
|
+
sortField: h == null ? void 0 : h.sortField,
|
|
165
|
+
sortOrder: h == null ? void 0 : h.sortOrder,
|
|
166
166
|
onSortOrderChange: D
|
|
167
167
|
}), {
|
|
168
168
|
selectedRows: n,
|
|
169
169
|
isRowSelected: g,
|
|
170
|
-
isAllRowsSelected:
|
|
170
|
+
isAllRowsSelected: j,
|
|
171
171
|
handleSelectAllRows: q,
|
|
172
172
|
handleSelectRow: v
|
|
173
|
-
} =
|
|
173
|
+
} = pe({ rows: s, defaultSelectedRows: T });
|
|
174
174
|
return W(() => {
|
|
175
|
-
JSON.stringify(
|
|
176
|
-
}, [n,
|
|
175
|
+
JSON.stringify(T) !== JSON.stringify(n) && n && (y == null || y(n));
|
|
176
|
+
}, [n, T, y]), /* @__PURE__ */ e.jsxs(G, { ...$, className: f("relative", F), children: [
|
|
177
177
|
/* @__PURE__ */ e.jsx(
|
|
178
|
-
|
|
178
|
+
Q,
|
|
179
179
|
{
|
|
180
|
-
className:
|
|
180
|
+
className: f("bg-bg", r && "sticky top-0 z-10"),
|
|
181
181
|
children: /* @__PURE__ */ e.jsxs(L, { children: [
|
|
182
|
-
|
|
183
|
-
|
|
182
|
+
o && /* @__PURE__ */ e.jsx(z, { className: "w-12 p-3", children: /* @__PURE__ */ e.jsx(
|
|
183
|
+
B,
|
|
184
184
|
{
|
|
185
185
|
className: "mt-1",
|
|
186
|
-
checked: p
|
|
187
|
-
onCheckedChange: (t) => q(
|
|
186
|
+
checked: j(p),
|
|
187
|
+
onCheckedChange: (t) => q(p, !!t),
|
|
188
188
|
"aria-label": "Select all"
|
|
189
189
|
}
|
|
190
190
|
) }),
|
|
191
|
-
|
|
191
|
+
w && /* @__PURE__ */ e.jsx(z, { className: "w-12 p-2", children: "#" }),
|
|
192
192
|
l.filter((t) => !t.hidden).map((t) => /* @__PURE__ */ e.jsx(
|
|
193
193
|
z,
|
|
194
194
|
{
|
|
195
195
|
style: t.styles,
|
|
196
|
-
className:
|
|
197
|
-
onClick: () => t.sortable &&
|
|
196
|
+
className: f("p-2", t.sortable && "cursor-pointer"),
|
|
197
|
+
onClick: () => t.sortable && b(t.dataIndex),
|
|
198
198
|
children: /* @__PURE__ */ e.jsxs("div", { className: "flex items-center gap-2", children: [
|
|
199
199
|
t.name,
|
|
200
200
|
" ",
|
|
201
|
-
t.sortable && ((
|
|
202
|
-
(
|
|
203
|
-
(
|
|
204
|
-
] }) : /* @__PURE__ */ e.jsx(
|
|
201
|
+
t.sortable && ((c == null ? void 0 : c.sortField) === t.key ? /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
|
|
202
|
+
(c == null ? void 0 : c.sortOrder) === O.DESC && /* @__PURE__ */ e.jsx(Te, { size: 15 }),
|
|
203
|
+
(c == null ? void 0 : c.sortOrder) === O.ASC && /* @__PURE__ */ e.jsx(_e, { size: 15 })
|
|
204
|
+
] }) : /* @__PURE__ */ e.jsx(Ae, { size: 15 }))
|
|
205
205
|
] })
|
|
206
206
|
},
|
|
207
207
|
t.key
|
|
@@ -209,203 +209,206 @@ const Ee = [
|
|
|
209
209
|
] })
|
|
210
210
|
}
|
|
211
211
|
),
|
|
212
|
-
/* @__PURE__ */ e.jsx(
|
|
212
|
+
/* @__PURE__ */ e.jsx(X, { className: "[&>tr:nth-child(even)]:bg-bg-secondary", children: s.length ? s.map((t, k) => /* @__PURE__ */ e.jsxs(
|
|
213
213
|
L,
|
|
214
214
|
{
|
|
215
215
|
onClick: () => d == null ? void 0 : d(t),
|
|
216
|
-
className:
|
|
217
|
-
"data-state": g(t[
|
|
216
|
+
className: f(d && "cursor-pointer"),
|
|
217
|
+
"data-state": g(t[p]) && "selected",
|
|
218
218
|
children: [
|
|
219
|
-
|
|
219
|
+
o && /* @__PURE__ */ e.jsx(
|
|
220
220
|
A,
|
|
221
221
|
{
|
|
222
222
|
className: "w-12 p-3",
|
|
223
|
-
onClick: (
|
|
223
|
+
onClick: (x) => x.stopPropagation(),
|
|
224
224
|
children: /* @__PURE__ */ e.jsx(
|
|
225
|
-
|
|
225
|
+
B,
|
|
226
226
|
{
|
|
227
227
|
className: "mt-1",
|
|
228
|
-
checked: g(t[
|
|
229
|
-
onCheckedChange: (
|
|
228
|
+
checked: g(t[p]),
|
|
229
|
+
onCheckedChange: (x) => v(t[p], !!x),
|
|
230
230
|
"aria-label": "Select row"
|
|
231
231
|
}
|
|
232
232
|
)
|
|
233
233
|
}
|
|
234
234
|
),
|
|
235
|
-
|
|
236
|
-
l.filter((
|
|
235
|
+
w && /* @__PURE__ */ e.jsx(A, { className: "w-12 p-2", children: (h.page - 1) * (h.limit || J) + k + 1 }),
|
|
236
|
+
l.filter((x) => !x.hidden).map((x) => /* @__PURE__ */ e.jsx(
|
|
237
237
|
A,
|
|
238
238
|
{
|
|
239
239
|
className: "text-body-xs-medium max-w-xs p-2",
|
|
240
|
-
style:
|
|
241
|
-
children:
|
|
240
|
+
style: x.styles,
|
|
241
|
+
children: x.render ? x.render(M.get(t, x.dataIndex), t) : M.get(t, x.dataIndex, "")
|
|
242
242
|
},
|
|
243
|
-
`${
|
|
243
|
+
`${k}-${x.key}`
|
|
244
244
|
))
|
|
245
245
|
]
|
|
246
246
|
},
|
|
247
|
-
`${t[
|
|
247
|
+
`${t[p]}`
|
|
248
248
|
)) : /* @__PURE__ */ e.jsx(L, { children: /* @__PURE__ */ e.jsx(
|
|
249
249
|
A,
|
|
250
250
|
{
|
|
251
|
-
colSpan:
|
|
252
|
-
children: /* @__PURE__ */ e.jsx(
|
|
251
|
+
colSpan: w ? o ? l.length + 2 : l.length + 1 : l.length,
|
|
252
|
+
children: /* @__PURE__ */ e.jsx(me, {})
|
|
253
253
|
}
|
|
254
254
|
) }) })
|
|
255
255
|
] });
|
|
256
|
-
},
|
|
256
|
+
}, Se = ({
|
|
257
257
|
dataSource: s,
|
|
258
258
|
columns: l,
|
|
259
259
|
onRowClick: d,
|
|
260
|
-
rowKey:
|
|
261
|
-
hasNumbers:
|
|
262
|
-
hasSearch:
|
|
263
|
-
exportOptions:
|
|
264
|
-
hasCheckbox:
|
|
265
|
-
hasPagination:
|
|
260
|
+
rowKey: p,
|
|
261
|
+
hasNumbers: h,
|
|
262
|
+
hasSearch: w,
|
|
263
|
+
exportOptions: o,
|
|
264
|
+
hasCheckbox: T,
|
|
265
|
+
hasPagination: y,
|
|
266
266
|
isStickyHeader: D,
|
|
267
267
|
onParamChange: r,
|
|
268
268
|
dataKey: F = "docs",
|
|
269
269
|
loading: $,
|
|
270
|
-
tableKey:
|
|
271
|
-
filters:
|
|
270
|
+
tableKey: c,
|
|
271
|
+
filters: b,
|
|
272
272
|
actions: n,
|
|
273
273
|
handleFilterChange: g,
|
|
274
|
-
params:
|
|
274
|
+
params: j,
|
|
275
275
|
exportLoading: q = !1,
|
|
276
276
|
onColumnsUpdate: v,
|
|
277
277
|
hasColumnsVisibilityDropdown: t,
|
|
278
|
-
onSelectedItemsChange:
|
|
279
|
-
actionProps:
|
|
280
|
-
filterWrapperProps:
|
|
281
|
-
exportOptionsProps:
|
|
282
|
-
columnsVisibilityProps:
|
|
283
|
-
|
|
278
|
+
onSelectedItemsChange: k,
|
|
279
|
+
actionProps: x,
|
|
280
|
+
filterWrapperProps: Y,
|
|
281
|
+
exportOptionsProps: Z,
|
|
282
|
+
columnsVisibilityProps: i,
|
|
283
|
+
paginationProps: U,
|
|
284
|
+
searchProps: I,
|
|
285
|
+
...K
|
|
284
286
|
}) => {
|
|
285
|
-
const { t:
|
|
287
|
+
const { t: u } = ce(), [E, V] = he([]), { formattedColumns: _, handleColumnsChange: S, resetColumns: C } = Ne({ key: c, columns: l });
|
|
286
288
|
return W(() => {
|
|
287
289
|
v == null || v(_);
|
|
288
290
|
}, [_, v]), W(() => {
|
|
289
|
-
|
|
290
|
-
}, [E,
|
|
291
|
+
k == null || k(E);
|
|
292
|
+
}, [E, k]), /* @__PURE__ */ e.jsxs(
|
|
291
293
|
"div",
|
|
292
294
|
{
|
|
293
295
|
className: "border-border-alpha-light flex grow flex-col overflow-auto rounded-xl border shadow-xs",
|
|
294
296
|
children: [
|
|
295
|
-
(
|
|
296
|
-
/* @__PURE__ */ e.jsx("div", { className: "w-full shrink", children:
|
|
297
|
-
|
|
297
|
+
(w || t && c || !M.isEmpty(o) || !M.isEmpty(b)) && /* @__PURE__ */ e.jsxs("div", { className: "flex shrink-0 flex-col items-center justify-between gap-3 p-4 lg:flex-row", children: [
|
|
298
|
+
/* @__PURE__ */ e.jsx("div", { className: "w-full shrink", children: w && /* @__PURE__ */ e.jsx(
|
|
299
|
+
oe,
|
|
298
300
|
{
|
|
299
|
-
|
|
300
|
-
|
|
301
|
+
...I,
|
|
302
|
+
defaultValue: M.get(j, "search", ""),
|
|
303
|
+
onSearchChange: (a) => r == null ? void 0 : r({ ...j, search: a, page: 1 })
|
|
301
304
|
}
|
|
302
305
|
) }),
|
|
303
306
|
/* @__PURE__ */ e.jsxs("div", { className: "flex shrink-0 items-center justify-end gap-3", children: [
|
|
304
|
-
|
|
305
|
-
|
|
307
|
+
o && /* @__PURE__ */ e.jsx(
|
|
308
|
+
ye,
|
|
306
309
|
{
|
|
307
|
-
...
|
|
308
|
-
options:
|
|
310
|
+
...Z,
|
|
311
|
+
options: o,
|
|
309
312
|
loading: q
|
|
310
313
|
}
|
|
311
314
|
),
|
|
312
|
-
t &&
|
|
315
|
+
t && c && /* @__PURE__ */ e.jsxs(ee, { children: [
|
|
313
316
|
/* @__PURE__ */ e.jsx(
|
|
314
|
-
|
|
317
|
+
se,
|
|
315
318
|
{
|
|
316
319
|
asChild: !0,
|
|
317
|
-
...
|
|
320
|
+
...i == null ? void 0 : i.triggerProps,
|
|
318
321
|
children: /* @__PURE__ */ e.jsx(
|
|
319
|
-
|
|
322
|
+
P,
|
|
320
323
|
{
|
|
321
324
|
variant: "secondary",
|
|
322
325
|
size: "sm",
|
|
323
326
|
className: "ml-auto rounded-lg px-3",
|
|
324
|
-
children: (
|
|
327
|
+
children: (i == null ? void 0 : i.title) || /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
|
|
325
328
|
/* @__PURE__ */ e.jsx(ie, {}),
|
|
326
329
|
" ",
|
|
327
|
-
/* @__PURE__ */ e.jsx("span", { className: "hidden lg:!inline", children:
|
|
328
|
-
/* @__PURE__ */ e.jsx(
|
|
330
|
+
/* @__PURE__ */ e.jsx("span", { className: "hidden lg:!inline", children: u("Customize columns") }),
|
|
331
|
+
/* @__PURE__ */ e.jsx(fe, {})
|
|
329
332
|
] })
|
|
330
333
|
}
|
|
331
334
|
)
|
|
332
335
|
}
|
|
333
336
|
),
|
|
334
337
|
/* @__PURE__ */ e.jsxs(
|
|
335
|
-
|
|
338
|
+
te,
|
|
336
339
|
{
|
|
337
340
|
align: "end",
|
|
338
|
-
...
|
|
341
|
+
...i == null ? void 0 : i.contentProps,
|
|
339
342
|
children: [
|
|
340
343
|
/* @__PURE__ */ e.jsxs(
|
|
341
|
-
|
|
344
|
+
le,
|
|
342
345
|
{
|
|
343
346
|
className: "capitalize",
|
|
344
|
-
onClick:
|
|
347
|
+
onClick: C,
|
|
345
348
|
children: [
|
|
346
|
-
/* @__PURE__ */ e.jsx(
|
|
349
|
+
/* @__PURE__ */ e.jsx(ze, {}),
|
|
347
350
|
" ",
|
|
348
|
-
|
|
351
|
+
(i == null ? void 0 : i.resetText) || "Reset columns"
|
|
349
352
|
]
|
|
350
353
|
}
|
|
351
354
|
),
|
|
352
|
-
/* @__PURE__ */ e.jsx(
|
|
353
|
-
_.map((
|
|
354
|
-
|
|
355
|
+
/* @__PURE__ */ e.jsx(de, {}),
|
|
356
|
+
_.map((a) => /* @__PURE__ */ e.jsx(
|
|
357
|
+
re,
|
|
355
358
|
{
|
|
356
359
|
className: "capitalize",
|
|
357
|
-
checked: !
|
|
358
|
-
onCheckedChange: (H) =>
|
|
359
|
-
children:
|
|
360
|
+
checked: !a.hidden,
|
|
361
|
+
onCheckedChange: (H) => S(a, !H),
|
|
362
|
+
children: a.name
|
|
360
363
|
},
|
|
361
|
-
|
|
364
|
+
a.key
|
|
362
365
|
))
|
|
363
366
|
]
|
|
364
367
|
}
|
|
365
368
|
)
|
|
366
369
|
] }),
|
|
367
|
-
n && /* @__PURE__ */ e.jsx(
|
|
368
|
-
|
|
369
|
-
|
|
370
|
+
n && /* @__PURE__ */ e.jsx(we, { ...x, actions: n }),
|
|
371
|
+
b && /* @__PURE__ */ e.jsx(
|
|
372
|
+
ne,
|
|
370
373
|
{
|
|
371
|
-
...
|
|
372
|
-
filters:
|
|
373
|
-
params:
|
|
374
|
-
onFilter: (
|
|
375
|
-
r == null || r({ ...
|
|
374
|
+
...Y,
|
|
375
|
+
filters: b,
|
|
376
|
+
params: j,
|
|
377
|
+
onFilter: (a) => {
|
|
378
|
+
r == null || r({ ...j, ...a, page: 1 }), g == null || g(a);
|
|
376
379
|
}
|
|
377
380
|
}
|
|
378
381
|
)
|
|
379
382
|
] })
|
|
380
383
|
] }),
|
|
381
|
-
/* @__PURE__ */ e.jsx("div", { className: "flex flex-col overflow-auto border-y", children: $ ? /* @__PURE__ */ e.jsx(
|
|
382
|
-
|
|
384
|
+
/* @__PURE__ */ e.jsx("div", { className: "flex flex-col overflow-auto border-y", children: $ ? /* @__PURE__ */ e.jsx(ke, {}) : /* @__PURE__ */ e.jsx(
|
|
385
|
+
Re,
|
|
383
386
|
{
|
|
384
|
-
...
|
|
387
|
+
...K,
|
|
385
388
|
params: {
|
|
386
389
|
page: (s == null ? void 0 : s.page) || 1,
|
|
387
390
|
limit: s == null ? void 0 : s.limit,
|
|
388
|
-
...
|
|
391
|
+
...j
|
|
389
392
|
},
|
|
390
|
-
rows:
|
|
391
|
-
rowKey:
|
|
393
|
+
rows: M.get(s, F, []),
|
|
394
|
+
rowKey: p,
|
|
392
395
|
selectedItems: E,
|
|
393
396
|
isStickyHeader: D,
|
|
394
397
|
columns: _,
|
|
395
|
-
hasCheckbox:
|
|
396
|
-
hasNumbers:
|
|
398
|
+
hasCheckbox: T,
|
|
399
|
+
hasNumbers: h,
|
|
397
400
|
onRowClick: d,
|
|
398
|
-
onSelectedItemsChange:
|
|
399
|
-
onSortOrderChange: ({ sortField:
|
|
400
|
-
r == null || r({ ...
|
|
401
|
+
onSelectedItemsChange: V,
|
|
402
|
+
onSortOrderChange: ({ sortField: a, sortOrder: H }) => {
|
|
403
|
+
r == null || r({ ...j, sortField: a, sortOrder: H });
|
|
401
404
|
}
|
|
402
405
|
}
|
|
403
406
|
) }),
|
|
404
|
-
|
|
407
|
+
y && /* @__PURE__ */ e.jsxs("div", { className: "flex shrink-0 flex-col items-center justify-between gap-3 p-4 lg:flex-row", children: [
|
|
405
408
|
/* @__PURE__ */ e.jsx("div", { className: "text-sm", children: /* @__PURE__ */ e.jsx(
|
|
406
|
-
|
|
409
|
+
ae,
|
|
407
410
|
{
|
|
408
|
-
onLimitChange: (
|
|
411
|
+
onLimitChange: (a) => r == null ? void 0 : r({ ...j, limit: a, page: 1 }),
|
|
409
412
|
defaultValue: s == null ? void 0 : s.limit
|
|
410
413
|
}
|
|
411
414
|
) }),
|
|
@@ -416,9 +419,10 @@ const Ee = [
|
|
|
416
419
|
" row(s) selected."
|
|
417
420
|
] }),
|
|
418
421
|
/* @__PURE__ */ e.jsx("div", { children: /* @__PURE__ */ e.jsx(
|
|
419
|
-
|
|
422
|
+
xe,
|
|
420
423
|
{
|
|
421
|
-
|
|
424
|
+
...U,
|
|
425
|
+
onPageChange: (a) => r == null ? void 0 : r({ ...j, page: a }),
|
|
422
426
|
currentPage: s == null ? void 0 : s.page,
|
|
423
427
|
totalPages: s == null ? void 0 : s.totalPages
|
|
424
428
|
}
|
|
@@ -429,6 +433,6 @@ const Ee = [
|
|
|
429
433
|
);
|
|
430
434
|
};
|
|
431
435
|
export {
|
|
432
|
-
|
|
433
|
-
|
|
436
|
+
Se as DataTable,
|
|
437
|
+
Re as MyTable
|
|
434
438
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../../DateRangePicker-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../../DateRangePicker-DlH-0Nyv.cjs");exports.DateRangePicker=e.DateRangePicker;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("../../Empty-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("../../Empty-RpS8tJNv.cjs");exports.Empty=t.Empty;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("../../FilterWrapper-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("../../FilterWrapper-D0oACPk3.cjs"),t=require("../../jsx-runtime-h4oGeKUK.cjs"),p=require("react"),l=require("../../input-mask-DBLFIvhN-C_0RAR2l.cjs"),x=require("react-i18next"),d=require("../../button-CdZDBhmr-3yMPCRDo.cjs"),h=require("../../index-CGv7FLNy.cjs"),m=require("../../lodash-C5w_OPmE.cjs"),q=require("../../Keyboard-kyPAAQWP.cjs"),y=require("../../utils-B6fNqzRf-BNysSCt9.cjs"),j=({placeholder:r,onSearchChange:s,className:i,...a})=>{const{t:u}=x.useTranslation(),[o,c]=p.useState("");return t.jsxRuntimeExports.jsxs("div",{...a,className:y.mo("relative my-2 w-full",i),children:[t.jsxRuntimeExports.jsx(l.yp,{placeholder:r||u("Type text and press CTRL + Enter"),onInput:e=>c(m.lodashExports.get(e,"target.value","")),onKeyUp:e=>{e.key===q.Keyboard.ENTER&&(e.ctrlKey&&s(o||void 0),e.stopPropagation(),e.preventDefault())}}),t.jsxRuntimeExports.jsx(d.u,{type:"button",variant:"ghost",className:"text-foreground absolute top-0 right-0 cursor-pointer rounded-md !bg-transparent",onClick:()=>s(o),children:t.jsxRuntimeExports.jsx(h.pv,{})})]})};exports.FilterWrapper=n.FilterWrapper;exports.Search=n.Search;exports.SearchWithCtrl=j;
|