dgz-ui-shared 1.1.20 → 1.1.21
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/{Actions-1AyyAnYT.js → Actions-CKVu3P3q.js} +6 -6
- package/dist/Actions-uGf1oq7E.cjs +1 -0
- package/dist/{DateRangePicker-kaBfJaKY.cjs → DateRangePicker-C1c1mofH.cjs} +3 -3
- package/dist/{DateRangePicker-D57HSCpq.js → DateRangePicker-DFsQ10c7.js} +5 -5
- package/dist/{ExportData-dSwR1N1v.js → ExportData-1xS2UAoq.js} +6 -6
- package/dist/ExportData-ApStkEWC.cjs +1 -0
- package/dist/{FilterWrapper-BYTeNMOP.js → FilterWrapper-Dk18nVPy.js} +26 -26
- package/dist/FilterWrapper-DvNjUQih.cjs +21 -0
- package/dist/{MyInput-xQAtNQfv.cjs → MyInput-9MnlVZ4h.cjs} +1 -1
- package/dist/{MyInput-DfwJGqEz.js → MyInput-B-QCpehg.js} +14 -14
- package/dist/{MyLimitSelect-BSZcXwK_.cjs → MyLimitSelect-BU1FClXt.cjs} +2 -2
- package/dist/{MyLimitSelect-B8aFncMj.js → MyLimitSelect-D5ZWDY-s.js} +7 -7
- package/dist/{MySelect-B09FshOo.js → MySelect-C5uWRVJh.js} +6 -6
- package/dist/MySelect-DNK997Bi.cjs +1 -0
- package/dist/{button-2punbuN6-BBVynxVj.cjs → button-CdZDBhmr-3yMPCRDo.cjs} +1 -1
- package/dist/{button-2punbuN6-Bxlf8sMg.js → button-CdZDBhmr-BT_j3ig5.js} +7 -7
- package/dist/{chevron-right-HWBijj-I-Bdcofm_0.cjs → chevron-right-HWBijj-I-CZBu0GKg.cjs} +1 -1
- package/dist/{chevron-right-HWBijj-I-Bkp_tbGM.js → chevron-right-HWBijj-I-DsFUufdU.js} +1 -1
- package/dist/components/actions/index.cjs.js +1 -1
- package/dist/components/actions/index.es.js +1 -1
- 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 +166 -166
- package/dist/components/datepicker/index.cjs.js +1 -1
- package/dist/components/datepicker/index.es.js +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 +3 -3
- package/dist/components/form/index.cjs.js +2 -2
- package/dist/components/form/index.es.js +12 -12
- package/dist/components/modal/index.cjs.js +2 -2
- package/dist/components/modal/index.es.js +7 -7
- 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 +3 -3
- package/dist/components/theme/index.es.js +4 -4
- package/dist/components/tooltip/index.cjs.js +1 -1
- package/dist/components/tooltip/index.es.js +44 -44
- package/dist/{createLucideIcon-B950nf2d-Brk4LIHH.js → createLucideIcon-B950nf2d-9wLYOF5y.js} +1 -1
- package/dist/{createLucideIcon-B950nf2d-BaIaB_Fz.cjs → createLucideIcon-B950nf2d-DrrWmvZU.cjs} +4 -4
- package/dist/dropdown-menu-TWRSm6RK-DQ03CnVw.cjs +1 -0
- package/dist/{dropdown-menu-lArmcWbC-jIg7CHSO.js → dropdown-menu-TWRSm6RK-D_FJpI4C.js} +83 -83
- package/dist/hooks/index.cjs.js +1 -1
- package/dist/hooks/index.es.js +1 -1
- package/dist/{index-CiR6yUKf-BEMUeikM.js → index-BL59b1Bz-C9bJE_xn.js} +90 -90
- package/dist/{index-CiR6yUKf-B1h5S0LB.cjs → index-BL59b1Bz-COeLljOH.cjs} +4 -4
- package/dist/{index-DUK8Bn0m-Clp83x2_.js → index-C4qYhCZt-BZQduTld.js} +29 -29
- package/dist/index-C4qYhCZt-DWBiWQ93.cjs +5 -0
- package/dist/index-CbK6da4c-QXbo5Vgb.cjs +1 -0
- package/dist/{index-Dp0y0FJw-B42jTfO0.js → index-CbK6da4c-d_6FdYZH.js} +1 -1
- package/dist/{index-GjjxAtgk-Dl4JPPHK.js → index-Cths1nBq-BUfZy21E.js} +71 -71
- package/dist/index-Cths1nBq-DzDn15YE.cjs +11 -0
- package/dist/{index-CMHo7s91-D6S6dZoG.cjs → index-ZsCkaYy6-Bjyf2SZs.cjs} +1 -1
- package/dist/{index-CMHo7s91-BRFfxKgJ.js → index-ZsCkaYy6-Cw9HUeiu.js} +1 -1
- package/dist/{input-mask-DBDaFFnm-CwBTZF0M.js → input-mask-DBLFIvhN-BBxoZxnd.js} +341 -341
- package/dist/{input-mask-DBDaFFnm-Dmv3bbE0.cjs → input-mask-DBLFIvhN-C_0RAR2l.cjs} +32 -32
- package/dist/{popover-Dvg-QyCn-CJ3lAD8Q.js → popover-OZcfKDD9-C2PVWPLS.js} +17 -17
- package/dist/popover-OZcfKDD9-KUWOsIOs.cjs +1 -0
- package/dist/{react-select-CKazfTiF-1EhjhhlL.js → react-select-DVPHHTAP-D2u3DqGr.js} +2 -2
- package/dist/{react-select-CKazfTiF-Bb-Uf4tM.cjs → react-select-DVPHHTAP-DKDInFsM.cjs} +9 -9
- package/dist/{unstyled-BcD9hmh4.cjs → unstyled-BFCMBSGZ.cjs} +2 -2
- package/dist/{unstyled-BRWVVWRl.js → unstyled-BMbrfzye.js} +5 -5
- package/package.json +2 -2
- package/dist/Actions-Dg5LYo56.cjs +0 -1
- package/dist/ExportData-DUuHYzA-.cjs +0 -1
- package/dist/FilterWrapper-DXKousYF.cjs +0 -21
- package/dist/MySelect-Dps9WQfz.cjs +0 -1
- package/dist/dropdown-menu-lArmcWbC-DCwGoXng.cjs +0 -1
- package/dist/index-DUK8Bn0m-BIulOZIQ.cjs +0 -5
- package/dist/index-Dp0y0FJw-DVwS4FcV.cjs +0 -1
- package/dist/index-GjjxAtgk-DaxZek3n.cjs +0 -11
- package/dist/popover-Dvg-QyCn-Dr2o9oAG.cjs +0 -1
|
@@ -1,330 +1,330 @@
|
|
|
1
|
-
import { j as
|
|
2
|
-
import { u as Y } from "../../button-
|
|
3
|
-
import {
|
|
4
|
-
import { D as H, a as C, M as
|
|
5
|
-
import { y as
|
|
6
|
-
import { forwardRef as
|
|
7
|
-
import { l as
|
|
8
|
-
import { a as h } from "../../index-
|
|
1
|
+
import { j as s } from "../../jsx-runtime-DS1N_tNq.js";
|
|
2
|
+
import { u as Y } from "../../button-CdZDBhmr-BT_j3ig5.js";
|
|
3
|
+
import { T as Z, A as U, i as I, u as K, f as S, d as P } from "../../dropdown-menu-TWRSm6RK-D_FJpI4C.js";
|
|
4
|
+
import { D as H, a as C, M as ss } from "../../MyLimitSelect-D5ZWDY-s.js";
|
|
5
|
+
import { y as es, f as ls } from "../../index-BrQ82Wyu.js";
|
|
6
|
+
import { forwardRef as m, useEffect as u, useState as ts } from "react";
|
|
7
|
+
import { l as w } from "../../lodash-CYNxjS-I.js";
|
|
8
|
+
import { a as h } from "../../index-BL59b1Bz-C9bJE_xn.js";
|
|
9
9
|
import { m as x } from "../../utils-B6fNqzRf-B1_jG1K7.js";
|
|
10
|
-
import { u as
|
|
11
|
-
import { v as V } from "../../input-mask-
|
|
10
|
+
import { u as is, a as ds, b as rs } from "../../useSortable-DRvyr1Gy.js";
|
|
11
|
+
import { v as V } from "../../input-mask-DBLFIvhN-BBxoZxnd.js";
|
|
12
12
|
import { S as W } from "../../SortOrder-CwuehjY1.js";
|
|
13
|
-
import { E as
|
|
14
|
-
import { c as
|
|
15
|
-
import { S as
|
|
16
|
-
import { L as
|
|
17
|
-
import { A as
|
|
18
|
-
import { E as
|
|
19
|
-
import { u as
|
|
20
|
-
const
|
|
21
|
-
({ className:
|
|
13
|
+
import { E as cs } from "../../Empty-_eAFU6r6.js";
|
|
14
|
+
import { c as R } from "../../createLucideIcon-B950nf2d.js";
|
|
15
|
+
import { S as as, F as xs } from "../../FilterWrapper-Dk18nVPy.js";
|
|
16
|
+
import { L as os } from "../../Loader-gLl5AAz4.js";
|
|
17
|
+
import { A as fs } from "../../Actions-CKVu3P3q.js";
|
|
18
|
+
import { E as ps } from "../../ExportData-1xS2UAoq.js";
|
|
19
|
+
import { u as ms } from "../../useTranslation-dH-uwymc.js";
|
|
20
|
+
const J = m(
|
|
21
|
+
({ className: e, ...l }, i) => /* @__PURE__ */ h.jsx(
|
|
22
22
|
"table",
|
|
23
23
|
{
|
|
24
24
|
ref: i,
|
|
25
|
-
className: x("w-full caption-bottom text-sm",
|
|
26
|
-
...
|
|
25
|
+
className: x("w-full caption-bottom text-sm", e),
|
|
26
|
+
...l
|
|
27
27
|
}
|
|
28
28
|
)
|
|
29
29
|
);
|
|
30
|
-
|
|
31
|
-
const B =
|
|
30
|
+
J.displayName = "Table";
|
|
31
|
+
const B = m(({ className: e, ...l }, i) => /* @__PURE__ */ h.jsx("thead", { ref: i, className: x("[&_tr]:border-b", e), ...l }));
|
|
32
32
|
B.displayName = "TableHeader";
|
|
33
|
-
const
|
|
33
|
+
const O = m(({ className: e, ...l }, i) => /* @__PURE__ */ h.jsx(
|
|
34
34
|
"tbody",
|
|
35
35
|
{
|
|
36
36
|
ref: i,
|
|
37
|
-
className: x("[&_tr:last-child]:border-0",
|
|
38
|
-
...
|
|
37
|
+
className: x("[&_tr:last-child]:border-0", e),
|
|
38
|
+
...l
|
|
39
39
|
}
|
|
40
40
|
));
|
|
41
|
-
|
|
42
|
-
const
|
|
41
|
+
O.displayName = "TableBody";
|
|
42
|
+
const hs = m(({ className: e, ...l }, i) => /* @__PURE__ */ h.jsx(
|
|
43
43
|
"tfoot",
|
|
44
44
|
{
|
|
45
45
|
ref: i,
|
|
46
46
|
className: x(
|
|
47
47
|
"bg-muted/50 border-t font-medium [&>tr]:last:border-b-0",
|
|
48
|
-
|
|
48
|
+
e
|
|
49
49
|
),
|
|
50
|
-
...
|
|
50
|
+
...l
|
|
51
51
|
}
|
|
52
52
|
));
|
|
53
|
-
|
|
54
|
-
const
|
|
53
|
+
hs.displayName = "TableFooter";
|
|
54
|
+
const L = m(({ className: e, ...l }, i) => /* @__PURE__ */ h.jsx(
|
|
55
55
|
"tr",
|
|
56
56
|
{
|
|
57
57
|
ref: i,
|
|
58
58
|
className: x(
|
|
59
59
|
"hover:bg-muted/50 data-[state=selected]:bg-muted border-b transition-colors",
|
|
60
|
-
|
|
60
|
+
e
|
|
61
61
|
),
|
|
62
|
-
...
|
|
62
|
+
...l
|
|
63
63
|
}
|
|
64
64
|
));
|
|
65
|
-
|
|
66
|
-
const
|
|
65
|
+
L.displayName = "TableRow";
|
|
66
|
+
const z = m(({ className: e, ...l }, i) => /* @__PURE__ */ h.jsx(
|
|
67
67
|
"th",
|
|
68
68
|
{
|
|
69
69
|
ref: i,
|
|
70
70
|
className: x(
|
|
71
71
|
"text-muted-foreground h-12 px-4 text-left align-middle font-medium [&:has([role=checkbox])]:pr-0",
|
|
72
|
-
|
|
72
|
+
e
|
|
73
73
|
),
|
|
74
|
-
...
|
|
74
|
+
...l
|
|
75
75
|
}
|
|
76
76
|
));
|
|
77
|
-
|
|
78
|
-
const
|
|
77
|
+
z.displayName = "TableHead";
|
|
78
|
+
const M = m(({ className: e, ...l }, i) => /* @__PURE__ */ h.jsx(
|
|
79
79
|
"td",
|
|
80
80
|
{
|
|
81
81
|
ref: i,
|
|
82
|
-
className: x("p-4 align-middle [&:has([role=checkbox])]:pr-0",
|
|
83
|
-
...
|
|
82
|
+
className: x("p-4 align-middle [&:has([role=checkbox])]:pr-0", e),
|
|
83
|
+
...l
|
|
84
84
|
}
|
|
85
85
|
));
|
|
86
|
-
|
|
87
|
-
const
|
|
86
|
+
M.displayName = "TableCell";
|
|
87
|
+
const js = m(({ className: e, ...l }, i) => /* @__PURE__ */ h.jsx(
|
|
88
88
|
"caption",
|
|
89
89
|
{
|
|
90
90
|
ref: i,
|
|
91
|
-
className: x("text-muted-foreground mt-4 text-sm",
|
|
92
|
-
...
|
|
91
|
+
className: x("text-muted-foreground mt-4 text-sm", e),
|
|
92
|
+
...l
|
|
93
93
|
}
|
|
94
94
|
));
|
|
95
|
-
|
|
95
|
+
js.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 Ns = [
|
|
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
|
+
], ns = R("arrow-down-wide-narrow", Ns);
|
|
109
109
|
/**
|
|
110
110
|
* @license lucide-react v0.511.0 - ISC
|
|
111
111
|
*
|
|
112
112
|
* This source code is licensed under the ISC license.
|
|
113
113
|
* See the LICENSE file in the root directory of this source tree.
|
|
114
114
|
*/
|
|
115
|
-
const
|
|
115
|
+
const ys = [
|
|
116
116
|
["path", { d: "m21 16-4 4-4-4", key: "f6ql7i" }],
|
|
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
|
+
], bs = R("arrow-up-down", ys);
|
|
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 ks = [
|
|
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
|
+
], ws = R("arrow-up-wide-narrow", ks);
|
|
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 vs = [
|
|
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
|
-
],
|
|
146
|
-
rows:
|
|
147
|
-
columns:
|
|
145
|
+
], gs = R("refresh-cw", vs), Ms = ({
|
|
146
|
+
rows: e = [],
|
|
147
|
+
columns: l,
|
|
148
148
|
onRowClick: i,
|
|
149
149
|
rowKey: p,
|
|
150
150
|
params: o = {
|
|
151
151
|
page: 1,
|
|
152
152
|
limit: H
|
|
153
153
|
},
|
|
154
|
-
hasNumbers:
|
|
154
|
+
hasNumbers: y = !1,
|
|
155
155
|
hasCheckbox: j = !1,
|
|
156
|
-
selectedItems:
|
|
157
|
-
onSelectedItemsChange:
|
|
156
|
+
selectedItems: v,
|
|
157
|
+
onSelectedItemsChange: b,
|
|
158
158
|
onSortOrderChange: D,
|
|
159
159
|
isStickyHeader: d
|
|
160
160
|
}) => {
|
|
161
|
-
const { sortObject: a, handleSort: $ } =
|
|
161
|
+
const { sortObject: a, handleSort: $ } = is({
|
|
162
162
|
sortField: o == null ? void 0 : o.sortField,
|
|
163
163
|
sortOrder: o == null ? void 0 : o.sortOrder,
|
|
164
164
|
onSortOrderChange: D
|
|
165
165
|
}), {
|
|
166
|
-
selectedRows:
|
|
167
|
-
isRowSelected:
|
|
168
|
-
isAllRowsSelected:
|
|
169
|
-
handleSelectAllRows:
|
|
170
|
-
handleSelectRow:
|
|
171
|
-
} =
|
|
166
|
+
selectedRows: N,
|
|
167
|
+
isRowSelected: k,
|
|
168
|
+
isAllRowsSelected: T,
|
|
169
|
+
handleSelectAllRows: g,
|
|
170
|
+
handleSelectRow: f
|
|
171
|
+
} = ds({ rows: e, defaultSelectedRows: v });
|
|
172
172
|
return u(() => {
|
|
173
|
-
|
|
174
|
-
}, [
|
|
175
|
-
/* @__PURE__ */
|
|
173
|
+
JSON.stringify(v) !== JSON.stringify(N) && (b == null || b(N));
|
|
174
|
+
}, [N, v, b]), /* @__PURE__ */ s.jsxs(J, { className: "relative", children: [
|
|
175
|
+
/* @__PURE__ */ s.jsx(
|
|
176
176
|
B,
|
|
177
177
|
{
|
|
178
178
|
className: x("bg-bg", d && "sticky top-0 z-10"),
|
|
179
|
-
children: /* @__PURE__ */
|
|
180
|
-
j && /* @__PURE__ */
|
|
179
|
+
children: /* @__PURE__ */ s.jsxs(L, { children: [
|
|
180
|
+
j && /* @__PURE__ */ s.jsx(z, { className: "w-12 p-3", children: /* @__PURE__ */ s.jsx(
|
|
181
181
|
V,
|
|
182
182
|
{
|
|
183
183
|
className: "mt-1",
|
|
184
|
-
checked:
|
|
185
|
-
onCheckedChange: (
|
|
184
|
+
checked: T(p),
|
|
185
|
+
onCheckedChange: (t) => g(p, !!t),
|
|
186
186
|
"aria-label": "Select all"
|
|
187
187
|
}
|
|
188
188
|
) }),
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
189
|
+
y && /* @__PURE__ */ s.jsx(z, { className: "w-12 p-2", children: "#" }),
|
|
190
|
+
l.filter((t) => !t.hidden).map((t) => /* @__PURE__ */ s.jsx(
|
|
191
|
+
z,
|
|
192
192
|
{
|
|
193
|
-
style:
|
|
194
|
-
className: x("p-2",
|
|
195
|
-
onClick: () =>
|
|
196
|
-
children: /* @__PURE__ */
|
|
197
|
-
|
|
193
|
+
style: t.styles,
|
|
194
|
+
className: x("p-2", t.sortable && "cursor-pointer"),
|
|
195
|
+
onClick: () => t.sortable && $(t.dataIndex),
|
|
196
|
+
children: /* @__PURE__ */ s.jsxs("div", { className: "flex items-center gap-2", children: [
|
|
197
|
+
t.name,
|
|
198
198
|
" ",
|
|
199
|
-
|
|
200
|
-
(a == null ? void 0 : a.sortOrder) === W.DESC && /* @__PURE__ */
|
|
201
|
-
(a == null ? void 0 : a.sortOrder) === W.ASC && /* @__PURE__ */
|
|
202
|
-
] }) : /* @__PURE__ */
|
|
199
|
+
t.sortable && ((a == null ? void 0 : a.sortField) === t.key ? /* @__PURE__ */ s.jsxs(s.Fragment, { children: [
|
|
200
|
+
(a == null ? void 0 : a.sortOrder) === W.DESC && /* @__PURE__ */ s.jsx(ns, { size: 15 }),
|
|
201
|
+
(a == null ? void 0 : a.sortOrder) === W.ASC && /* @__PURE__ */ s.jsx(ws, { size: 15 })
|
|
202
|
+
] }) : /* @__PURE__ */ s.jsx(bs, { size: 15 }))
|
|
203
203
|
] })
|
|
204
204
|
},
|
|
205
|
-
|
|
205
|
+
t.key
|
|
206
206
|
))
|
|
207
207
|
] })
|
|
208
208
|
}
|
|
209
209
|
),
|
|
210
|
-
/* @__PURE__ */
|
|
211
|
-
|
|
210
|
+
/* @__PURE__ */ s.jsx(O, { className: "[&>tr:nth-child(even)]:bg-bg-secondary", children: e.length ? e.map((t, n) => /* @__PURE__ */ s.jsxs(
|
|
211
|
+
L,
|
|
212
212
|
{
|
|
213
|
-
onClick: () => i == null ? void 0 : i(
|
|
213
|
+
onClick: () => i == null ? void 0 : i(t),
|
|
214
214
|
className: x(i && "cursor-pointer"),
|
|
215
|
-
"data-state":
|
|
215
|
+
"data-state": k(t[p]) && "selected",
|
|
216
216
|
children: [
|
|
217
|
-
j && /* @__PURE__ */
|
|
218
|
-
|
|
217
|
+
j && /* @__PURE__ */ s.jsx(
|
|
218
|
+
M,
|
|
219
219
|
{
|
|
220
220
|
className: "w-12 p-3",
|
|
221
221
|
onClick: (r) => r.stopPropagation(),
|
|
222
|
-
children: /* @__PURE__ */
|
|
222
|
+
children: /* @__PURE__ */ s.jsx(
|
|
223
223
|
V,
|
|
224
224
|
{
|
|
225
225
|
className: "mt-1",
|
|
226
|
-
checked:
|
|
227
|
-
onCheckedChange: (r) =>
|
|
226
|
+
checked: k(t[p]),
|
|
227
|
+
onCheckedChange: (r) => f(t[p], !!r),
|
|
228
228
|
"aria-label": "Select row"
|
|
229
229
|
}
|
|
230
230
|
)
|
|
231
231
|
}
|
|
232
232
|
),
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
233
|
+
y && /* @__PURE__ */ s.jsx(M, { className: "w-12 p-2", children: (o.page - 1) * (o.limit || H) + n + 1 }),
|
|
234
|
+
l.filter((r) => !r.hidden).map((r) => /* @__PURE__ */ s.jsx(
|
|
235
|
+
M,
|
|
236
236
|
{
|
|
237
237
|
className: "text-body-xs-medium max-w-xs p-2",
|
|
238
238
|
style: r.styles,
|
|
239
|
-
children: r.render ? r.render(
|
|
239
|
+
children: r.render ? r.render(w.get(t, r.dataIndex), t) : w.get(t, r.dataIndex, "")
|
|
240
240
|
},
|
|
241
241
|
`${n}-${r.key}`
|
|
242
242
|
))
|
|
243
243
|
]
|
|
244
244
|
},
|
|
245
|
-
`${
|
|
246
|
-
)) : /* @__PURE__ */
|
|
247
|
-
|
|
245
|
+
`${t[p]}`
|
|
246
|
+
)) : /* @__PURE__ */ s.jsx(L, { children: /* @__PURE__ */ s.jsx(
|
|
247
|
+
M,
|
|
248
248
|
{
|
|
249
|
-
colSpan:
|
|
250
|
-
children: /* @__PURE__ */
|
|
249
|
+
colSpan: y ? j ? l.length + 2 : l.length + 1 : l.length,
|
|
250
|
+
children: /* @__PURE__ */ s.jsx(cs, {})
|
|
251
251
|
}
|
|
252
252
|
) }) })
|
|
253
253
|
] });
|
|
254
|
-
},
|
|
255
|
-
dataSource:
|
|
256
|
-
columns:
|
|
254
|
+
}, Qs = ({
|
|
255
|
+
dataSource: e,
|
|
256
|
+
columns: l,
|
|
257
257
|
onRowClick: i,
|
|
258
258
|
rowKey: p,
|
|
259
259
|
hasNumbers: o,
|
|
260
|
-
hasSearch:
|
|
260
|
+
hasSearch: y,
|
|
261
261
|
exportOptions: j,
|
|
262
|
-
hasCheckbox:
|
|
263
|
-
hasPagination:
|
|
262
|
+
hasCheckbox: v,
|
|
263
|
+
hasPagination: b,
|
|
264
264
|
isStickyHeader: D,
|
|
265
265
|
onParamChange: d,
|
|
266
266
|
dataKey: a = "docs",
|
|
267
267
|
loading: $,
|
|
268
|
-
tableKey:
|
|
269
|
-
filters:
|
|
270
|
-
actions:
|
|
271
|
-
handleFilterChange:
|
|
272
|
-
params:
|
|
273
|
-
exportLoading:
|
|
268
|
+
tableKey: N,
|
|
269
|
+
filters: k,
|
|
270
|
+
actions: T,
|
|
271
|
+
handleFilterChange: g,
|
|
272
|
+
params: f,
|
|
273
|
+
exportLoading: t = !1,
|
|
274
274
|
onColumnsUpdate: n,
|
|
275
275
|
hasColumnsVisibilityDropdown: r,
|
|
276
|
-
onSelectedItemsChange:
|
|
276
|
+
onSelectedItemsChange: A
|
|
277
277
|
}) => {
|
|
278
|
-
const { t: q } =
|
|
278
|
+
const { t: q } = ms(), [E, G] = ts([]), { formattedColumns: _, handleColumnsChange: Q, resetColumns: X } = rs({ key: N, columns: l });
|
|
279
279
|
return u(() => {
|
|
280
280
|
n == null || n(_);
|
|
281
281
|
}, [_, n]), u(() => {
|
|
282
|
-
|
|
283
|
-
}, [E,
|
|
282
|
+
A == null || A(E);
|
|
283
|
+
}, [E, A]), /* @__PURE__ */ s.jsxs(
|
|
284
284
|
"div",
|
|
285
285
|
{
|
|
286
286
|
className: "border-border-alpha-light flex grow flex-col overflow-auto rounded-xl border shadow-xs",
|
|
287
287
|
children: [
|
|
288
|
-
(
|
|
289
|
-
/* @__PURE__ */
|
|
290
|
-
|
|
288
|
+
(y || r && N || !w.isEmpty(j) || !w.isEmpty(k)) && /* @__PURE__ */ s.jsxs("div", { className: "flex shrink-0 flex-col items-center justify-between gap-3 p-4 lg:flex-row", children: [
|
|
289
|
+
/* @__PURE__ */ s.jsx("div", { className: "w-full shrink", children: y && /* @__PURE__ */ s.jsx(
|
|
290
|
+
as,
|
|
291
291
|
{
|
|
292
|
-
defaultValue:
|
|
293
|
-
onSearchChange: (c) => d == null ? void 0 : d({ ...
|
|
292
|
+
defaultValue: w.get(f, "search", ""),
|
|
293
|
+
onSearchChange: (c) => d == null ? void 0 : d({ ...f, search: c, page: 1 })
|
|
294
294
|
}
|
|
295
295
|
) }),
|
|
296
|
-
/* @__PURE__ */
|
|
297
|
-
j && /* @__PURE__ */
|
|
298
|
-
r &&
|
|
299
|
-
/* @__PURE__ */
|
|
296
|
+
/* @__PURE__ */ s.jsxs("div", { className: "flex shrink-0 items-center justify-end gap-3", children: [
|
|
297
|
+
j && /* @__PURE__ */ s.jsx(ps, { options: j, loading: t }),
|
|
298
|
+
r && N && /* @__PURE__ */ s.jsxs(Z, { children: [
|
|
299
|
+
/* @__PURE__ */ s.jsx(U, { asChild: !0, children: /* @__PURE__ */ s.jsxs(
|
|
300
300
|
Y,
|
|
301
301
|
{
|
|
302
302
|
variant: "secondary",
|
|
303
303
|
size: "sm",
|
|
304
304
|
className: "ml-auto rounded-lg px-3",
|
|
305
305
|
children: [
|
|
306
|
-
/* @__PURE__ */
|
|
306
|
+
/* @__PURE__ */ s.jsx(es, {}),
|
|
307
307
|
" ",
|
|
308
|
-
/* @__PURE__ */
|
|
309
|
-
/* @__PURE__ */
|
|
308
|
+
/* @__PURE__ */ s.jsx("span", { className: "hidden lg:!inline", children: q("Customize columns") }),
|
|
309
|
+
/* @__PURE__ */ s.jsx(ls, {})
|
|
310
310
|
]
|
|
311
311
|
}
|
|
312
312
|
) }),
|
|
313
|
-
/* @__PURE__ */
|
|
314
|
-
/* @__PURE__ */
|
|
313
|
+
/* @__PURE__ */ s.jsxs(I, { align: "end", children: [
|
|
314
|
+
/* @__PURE__ */ s.jsxs(
|
|
315
315
|
K,
|
|
316
316
|
{
|
|
317
317
|
className: "capitalize",
|
|
318
318
|
onClick: X,
|
|
319
319
|
children: [
|
|
320
|
-
/* @__PURE__ */
|
|
320
|
+
/* @__PURE__ */ s.jsx(gs, {}),
|
|
321
321
|
" ",
|
|
322
322
|
q("Reset columns")
|
|
323
323
|
]
|
|
324
324
|
}
|
|
325
325
|
),
|
|
326
|
-
/* @__PURE__ */
|
|
327
|
-
_.map((c) => /* @__PURE__ */
|
|
326
|
+
/* @__PURE__ */ s.jsx(S, {}),
|
|
327
|
+
_.map((c) => /* @__PURE__ */ s.jsx(
|
|
328
328
|
P,
|
|
329
329
|
{
|
|
330
330
|
className: "capitalize",
|
|
@@ -336,61 +336,61 @@ const ve = [
|
|
|
336
336
|
))
|
|
337
337
|
] })
|
|
338
338
|
] }),
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
339
|
+
T && /* @__PURE__ */ s.jsx(fs, { actions: T }),
|
|
340
|
+
k && /* @__PURE__ */ s.jsx(
|
|
341
|
+
xs,
|
|
342
342
|
{
|
|
343
|
-
filters:
|
|
344
|
-
params:
|
|
343
|
+
filters: k,
|
|
344
|
+
params: f,
|
|
345
345
|
onFilter: (c) => {
|
|
346
|
-
d == null || d({ ...
|
|
346
|
+
d == null || d({ ...f, ...c, page: 1 }), g == null || g(c);
|
|
347
347
|
}
|
|
348
348
|
}
|
|
349
349
|
)
|
|
350
350
|
] })
|
|
351
351
|
] }),
|
|
352
|
-
/* @__PURE__ */
|
|
353
|
-
|
|
352
|
+
/* @__PURE__ */ s.jsx("div", { className: "flex flex-col overflow-auto border-y", children: $ ? /* @__PURE__ */ s.jsx(os, {}) : /* @__PURE__ */ s.jsx(
|
|
353
|
+
Ms,
|
|
354
354
|
{
|
|
355
355
|
params: {
|
|
356
|
-
page: (
|
|
357
|
-
limit:
|
|
358
|
-
...
|
|
356
|
+
page: (e == null ? void 0 : e.page) || 1,
|
|
357
|
+
limit: e == null ? void 0 : e.limit,
|
|
358
|
+
...f
|
|
359
359
|
},
|
|
360
|
-
rows:
|
|
360
|
+
rows: w.get(e, a, []),
|
|
361
361
|
rowKey: p,
|
|
362
362
|
selectedItems: E,
|
|
363
363
|
isStickyHeader: D,
|
|
364
364
|
columns: _,
|
|
365
|
-
hasCheckbox:
|
|
365
|
+
hasCheckbox: v,
|
|
366
366
|
hasNumbers: o,
|
|
367
367
|
onRowClick: i,
|
|
368
|
-
onSelectedItemsChange:
|
|
368
|
+
onSelectedItemsChange: G,
|
|
369
369
|
onSortOrderChange: ({ sortField: c, sortOrder: F }) => {
|
|
370
|
-
d == null || d({ ...
|
|
370
|
+
d == null || d({ ...f, sortField: c, sortOrder: F });
|
|
371
371
|
}
|
|
372
372
|
}
|
|
373
373
|
) }),
|
|
374
|
-
|
|
375
|
-
/* @__PURE__ */
|
|
374
|
+
b && /* @__PURE__ */ s.jsxs("div", { className: "flex shrink-0 flex-col items-center justify-between gap-3 p-4 lg:flex-row", children: [
|
|
375
|
+
/* @__PURE__ */ s.jsx("div", { className: "text-sm", children: /* @__PURE__ */ s.jsx(
|
|
376
376
|
C,
|
|
377
377
|
{
|
|
378
|
-
onLimitChange: (c) => d == null ? void 0 : d({ ...
|
|
379
|
-
defaultValue:
|
|
378
|
+
onLimitChange: (c) => d == null ? void 0 : d({ ...f, limit: c, page: 1 }),
|
|
379
|
+
defaultValue: e == null ? void 0 : e.limit
|
|
380
380
|
}
|
|
381
381
|
) }),
|
|
382
|
-
/* @__PURE__ */
|
|
382
|
+
/* @__PURE__ */ s.jsxs("div", { className: "text-muted-foreground text-sm", children: [
|
|
383
383
|
E.length,
|
|
384
384
|
" of ",
|
|
385
|
-
(
|
|
385
|
+
(e == null ? void 0 : e.total) || 0,
|
|
386
386
|
" row(s) selected."
|
|
387
387
|
] }),
|
|
388
|
-
/* @__PURE__ */
|
|
389
|
-
|
|
388
|
+
/* @__PURE__ */ s.jsx("div", { children: /* @__PURE__ */ s.jsx(
|
|
389
|
+
ss,
|
|
390
390
|
{
|
|
391
|
-
onPageChange: (c) => d == null ? void 0 : d({ ...
|
|
392
|
-
currentPage:
|
|
393
|
-
totalPages:
|
|
391
|
+
onPageChange: (c) => d == null ? void 0 : d({ ...f, page: c }),
|
|
392
|
+
currentPage: e == null ? void 0 : e.page,
|
|
393
|
+
totalPages: e == null ? void 0 : e.totalPages
|
|
394
394
|
}
|
|
395
395
|
) })
|
|
396
396
|
] })
|
|
@@ -399,6 +399,6 @@ const ve = [
|
|
|
399
399
|
);
|
|
400
400
|
};
|
|
401
401
|
export {
|
|
402
|
-
|
|
403
|
-
|
|
402
|
+
Qs as DataTable,
|
|
403
|
+
Ms as MyTable
|
|
404
404
|
};
|
|
@@ -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-C1c1mofH.cjs");exports.DateRangePicker=e.DateRangePicker;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("../../ExportData-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("../../ExportData-ApStkEWC.cjs");exports.ExportData=t.ExportData;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("../../FilterWrapper-DvNjUQih.cjs"),t=require("../../jsx-runtime-h4oGeKUK.cjs"),c=require("react"),p=require("../../input-mask-DBLFIvhN-C_0RAR2l.cjs"),l=require("../../button-CdZDBhmr-3yMPCRDo.cjs"),d=require("../../index-CGv7FLNy.cjs"),x=require("../../lodash-C5w_OPmE.cjs"),h=require("../../Keyboard-kyPAAQWP.cjs"),m=require("../../utils-B6fNqzRf-BNysSCt9.cjs"),q=require("../../useTranslation-CZf20ucv.cjs"),y=({placeholder:r,onSearchChange:s,className:i})=>{const{t:a}=q.useTranslation(),[o,u]=c.useState("");return t.jsxRuntimeExports.jsxs("div",{className:m.mo("relative my-2 w-full",i),children:[t.jsxRuntimeExports.jsx(p.yp,{placeholder:r||a("Type text and press CTRL + Enter"),onInput:e=>u(x.lodashExports.get(e,"target.value","")),onKeyUp:e=>{e.key===h.Keyboard.ENTER&&(e.ctrlKey&&s(o||void 0),e.stopPropagation(),e.preventDefault())}}),t.jsxRuntimeExports.jsx(l.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(d.pv,{})})]})};exports.FilterWrapper=n.FilterWrapper;exports.Search=n.Search;exports.SearchWithCtrl=y;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { F as k, S as C } from "../../FilterWrapper-
|
|
1
|
+
import { F as k, S as C } from "../../FilterWrapper-Dk18nVPy.js";
|
|
2
2
|
import { j as t } from "../../jsx-runtime-DS1N_tNq.js";
|
|
3
3
|
import { useState as i } from "react";
|
|
4
|
-
import { y as n } from "../../input-mask-
|
|
5
|
-
import { u as l } from "../../button-
|
|
4
|
+
import { y as n } from "../../input-mask-DBLFIvhN-BBxoZxnd.js";
|
|
5
|
+
import { u as l } from "../../button-CdZDBhmr-BT_j3ig5.js";
|
|
6
6
|
import { p as f } from "../../index-BrQ82Wyu.js";
|
|
7
7
|
import { l as u } from "../../lodash-CYNxjS-I.js";
|
|
8
8
|
import { K as c } from "../../Keyboard-CJVAJWdO.js";
|