dgz-ui-shared 1.1.19 → 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-DeQRSTAc.js → FilterWrapper-Dk18nVPy.js} +31 -31
- package/dist/{FilterWrapper-B6p9fJWb.cjs → FilterWrapper-DvNjUQih.cjs} +5 -5
- package/dist/{MyInput-BzXWiSVj.cjs → MyInput-9MnlVZ4h.cjs} +1 -1
- package/dist/{MyInput-CkiPA3UG.js → MyInput-B-QCpehg.js} +57 -57
- package/dist/{MyLimitSelect-DHyIJawN.cjs → MyLimitSelect-BU1FClXt.cjs} +2 -2
- package/dist/{MyLimitSelect-XMVeSEqs.js → MyLimitSelect-D5ZWDY-s.js} +13 -13
- package/dist/{MySelect-Bmw1Krye.js → MySelect-C5uWRVJh.js} +7 -7
- 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 +204 -201
- 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 +6 -6
- package/dist/components/form/index.cjs.js +2 -2
- package/dist/components/form/index.es.js +33 -33
- 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 +2 -2
- 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/index.esm-CQEA7FC8.js +1007 -0
- package/dist/index.esm-TI7V1a5F.cjs +1 -0
- package/dist/{input-mask-Chc-UIWX-Br4gXX2T.js → input-mask-DBLFIvhN-BBxoZxnd.js} +3738 -3687
- package/dist/input-mask-DBLFIvhN-C_0RAR2l.cjs +190 -0
- 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/types/components/datatable/DataTable.d.ts +1 -1
- package/dist/types/components/datatable/DataTable.d.ts.map +1 -1
- package/dist/{unstyled-4GbbDand.cjs → unstyled-BFCMBSGZ.cjs} +2 -2
- package/dist/{unstyled-Cmnf9U5U.js → unstyled-BMbrfzye.js} +42 -42
- package/dist/{useFilter-CiORTEHP.cjs → useFilter-Cwz8oftI.cjs} +1 -1
- package/dist/{useFilter-DMpxv27U.js → useFilter-DJunNBm2.js} +1 -1
- package/package.json +2 -2
- package/dist/Actions-Dg5LYo56.cjs +0 -1
- package/dist/ExportData-DUuHYzA-.cjs +0 -1
- package/dist/MySelect-lSICw49W.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/index.esm-CpcLzfLZ.cjs +0 -1
- package/dist/index.esm-lbl2HgR1.js +0 -970
- package/dist/input-mask-Chc-UIWX-DimBl_dd.cjs +0 -190
- package/dist/popover-Dvg-QyCn-Dr2o9oAG.cjs +0 -1
|
@@ -1,393 +1,396 @@
|
|
|
1
|
-
import { j as
|
|
2
|
-
import { u as
|
|
3
|
-
import {
|
|
4
|
-
import { D as
|
|
5
|
-
import { y as
|
|
6
|
-
import { forwardRef as
|
|
7
|
-
import { l as
|
|
8
|
-
import { a as h } from "../../index-
|
|
9
|
-
import { m as
|
|
10
|
-
import { u as
|
|
11
|
-
import {
|
|
12
|
-
import { S as
|
|
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:
|
|
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
|
+
import { m as x } from "../../utils-B6fNqzRf-B1_jG1K7.js";
|
|
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
|
+
import { S as W } from "../../SortOrder-CwuehjY1.js";
|
|
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:
|
|
26
|
-
...
|
|
25
|
+
className: x("w-full caption-bottom text-sm", e),
|
|
26
|
+
...l
|
|
27
27
|
}
|
|
28
28
|
)
|
|
29
29
|
);
|
|
30
|
-
|
|
31
|
-
const
|
|
32
|
-
|
|
33
|
-
const
|
|
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
|
+
B.displayName = "TableHeader";
|
|
33
|
+
const O = m(({ className: e, ...l }, i) => /* @__PURE__ */ h.jsx(
|
|
34
34
|
"tbody",
|
|
35
35
|
{
|
|
36
36
|
ref: i,
|
|
37
|
-
className:
|
|
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
|
-
className:
|
|
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
|
-
className:
|
|
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
|
-
className:
|
|
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:
|
|
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:
|
|
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
|
-
params:
|
|
150
|
+
params: o = {
|
|
151
151
|
page: 1,
|
|
152
|
-
limit:
|
|
152
|
+
limit: H
|
|
153
153
|
},
|
|
154
|
-
hasNumbers:
|
|
155
|
-
hasCheckbox:
|
|
156
|
-
selectedItems:
|
|
157
|
-
onSelectedItemsChange:
|
|
158
|
-
onSortOrderChange:
|
|
154
|
+
hasNumbers: y = !1,
|
|
155
|
+
hasCheckbox: j = !1,
|
|
156
|
+
selectedItems: v,
|
|
157
|
+
onSelectedItemsChange: b,
|
|
158
|
+
onSortOrderChange: D,
|
|
159
159
|
isStickyHeader: d
|
|
160
160
|
}) => {
|
|
161
|
-
const { sortObject: a, handleSort:
|
|
162
|
-
sortField:
|
|
163
|
-
sortOrder:
|
|
164
|
-
onSortOrderChange:
|
|
161
|
+
const { sortObject: a, handleSort: $ } = is({
|
|
162
|
+
sortField: o == null ? void 0 : o.sortField,
|
|
163
|
+
sortOrder: o == null ? void 0 : o.sortOrder,
|
|
164
|
+
onSortOrderChange: D
|
|
165
165
|
}), {
|
|
166
|
-
selectedRows:
|
|
167
|
-
isRowSelected:
|
|
168
|
-
isAllRowsSelected:
|
|
166
|
+
selectedRows: N,
|
|
167
|
+
isRowSelected: k,
|
|
168
|
+
isAllRowsSelected: T,
|
|
169
169
|
handleSelectAllRows: g,
|
|
170
|
-
handleSelectRow:
|
|
171
|
-
} =
|
|
172
|
-
return
|
|
173
|
-
v &&
|
|
174
|
-
}, [
|
|
175
|
-
/* @__PURE__ */
|
|
176
|
-
|
|
170
|
+
handleSelectRow: f
|
|
171
|
+
} = ds({ rows: e, defaultSelectedRows: v });
|
|
172
|
+
return u(() => {
|
|
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
|
+
B,
|
|
177
177
|
{
|
|
178
|
-
className:
|
|
179
|
-
children: /* @__PURE__ */
|
|
180
|
-
|
|
181
|
-
|
|
178
|
+
className: x("bg-bg", d && "sticky top-0 z-10"),
|
|
179
|
+
children: /* @__PURE__ */ s.jsxs(L, { children: [
|
|
180
|
+
j && /* @__PURE__ */ s.jsx(z, { className: "w-12 p-3", children: /* @__PURE__ */ s.jsx(
|
|
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:
|
|
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) ===
|
|
201
|
-
(a == null ? void 0 : a.sortOrder) ===
|
|
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(
|
|
214
|
-
className:
|
|
215
|
-
"data-state":
|
|
213
|
+
onClick: () => i == null ? void 0 : i(t),
|
|
214
|
+
className: x(i && "cursor-pointer"),
|
|
215
|
+
"data-state": k(t[p]) && "selected",
|
|
216
216
|
children: [
|
|
217
|
-
|
|
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__ */
|
|
223
|
-
|
|
222
|
+
children: /* @__PURE__ */ s.jsx(
|
|
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
|
-
hasNumbers:
|
|
260
|
-
hasSearch:
|
|
261
|
-
exportOptions:
|
|
262
|
-
hasCheckbox:
|
|
263
|
-
hasPagination:
|
|
264
|
-
isStickyHeader:
|
|
259
|
+
hasNumbers: o,
|
|
260
|
+
hasSearch: y,
|
|
261
|
+
exportOptions: j,
|
|
262
|
+
hasCheckbox: v,
|
|
263
|
+
hasPagination: b,
|
|
264
|
+
isStickyHeader: D,
|
|
265
265
|
onParamChange: d,
|
|
266
266
|
dataKey: a = "docs",
|
|
267
|
-
loading:
|
|
268
|
-
tableKey:
|
|
269
|
-
filters:
|
|
270
|
-
actions:
|
|
267
|
+
loading: $,
|
|
268
|
+
tableKey: N,
|
|
269
|
+
filters: k,
|
|
270
|
+
actions: T,
|
|
271
271
|
handleFilterChange: g,
|
|
272
|
-
params:
|
|
273
|
-
exportLoading:
|
|
274
|
-
onColumnsUpdate:
|
|
275
|
-
hasColumnsVisibilityDropdown: r
|
|
272
|
+
params: f,
|
|
273
|
+
exportLoading: t = !1,
|
|
274
|
+
onColumnsUpdate: n,
|
|
275
|
+
hasColumnsVisibilityDropdown: r,
|
|
276
|
+
onSelectedItemsChange: A
|
|
276
277
|
}) => {
|
|
277
|
-
const { t:
|
|
278
|
-
return
|
|
279
|
-
|
|
280
|
-
}, [
|
|
278
|
+
const { t: q } = ms(), [E, G] = ts([]), { formattedColumns: _, handleColumnsChange: Q, resetColumns: X } = rs({ key: N, columns: l });
|
|
279
|
+
return u(() => {
|
|
280
|
+
n == null || n(_);
|
|
281
|
+
}, [_, n]), u(() => {
|
|
282
|
+
A == null || A(E);
|
|
283
|
+
}, [E, A]), /* @__PURE__ */ s.jsxs(
|
|
281
284
|
"div",
|
|
282
285
|
{
|
|
283
286
|
className: "border-border-alpha-light flex grow flex-col overflow-auto rounded-xl border shadow-xs",
|
|
284
287
|
children: [
|
|
285
|
-
(
|
|
286
|
-
/* @__PURE__ */
|
|
287
|
-
|
|
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,
|
|
288
291
|
{
|
|
289
|
-
defaultValue:
|
|
290
|
-
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 })
|
|
291
294
|
}
|
|
292
295
|
) }),
|
|
293
|
-
/* @__PURE__ */
|
|
294
|
-
|
|
295
|
-
r &&
|
|
296
|
-
/* @__PURE__ */
|
|
297
|
-
|
|
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
|
+
Y,
|
|
298
301
|
{
|
|
299
302
|
variant: "secondary",
|
|
300
303
|
size: "sm",
|
|
301
304
|
className: "ml-auto rounded-lg px-3",
|
|
302
305
|
children: [
|
|
303
|
-
/* @__PURE__ */
|
|
306
|
+
/* @__PURE__ */ s.jsx(es, {}),
|
|
304
307
|
" ",
|
|
305
|
-
/* @__PURE__ */
|
|
306
|
-
/* @__PURE__ */
|
|
308
|
+
/* @__PURE__ */ s.jsx("span", { className: "hidden lg:!inline", children: q("Customize columns") }),
|
|
309
|
+
/* @__PURE__ */ s.jsx(ls, {})
|
|
307
310
|
]
|
|
308
311
|
}
|
|
309
312
|
) }),
|
|
310
|
-
/* @__PURE__ */
|
|
311
|
-
/* @__PURE__ */
|
|
312
|
-
|
|
313
|
+
/* @__PURE__ */ s.jsxs(I, { align: "end", children: [
|
|
314
|
+
/* @__PURE__ */ s.jsxs(
|
|
315
|
+
K,
|
|
313
316
|
{
|
|
314
317
|
className: "capitalize",
|
|
315
|
-
onClick:
|
|
318
|
+
onClick: X,
|
|
316
319
|
children: [
|
|
317
|
-
/* @__PURE__ */
|
|
320
|
+
/* @__PURE__ */ s.jsx(gs, {}),
|
|
318
321
|
" ",
|
|
319
|
-
|
|
322
|
+
q("Reset columns")
|
|
320
323
|
]
|
|
321
324
|
}
|
|
322
325
|
),
|
|
323
|
-
/* @__PURE__ */
|
|
324
|
-
|
|
325
|
-
|
|
326
|
+
/* @__PURE__ */ s.jsx(S, {}),
|
|
327
|
+
_.map((c) => /* @__PURE__ */ s.jsx(
|
|
328
|
+
P,
|
|
326
329
|
{
|
|
327
330
|
className: "capitalize",
|
|
328
331
|
checked: !c.hidden,
|
|
329
|
-
onCheckedChange: (
|
|
332
|
+
onCheckedChange: (F) => Q(c, !F),
|
|
330
333
|
children: c.name
|
|
331
334
|
},
|
|
332
335
|
c.key
|
|
333
336
|
))
|
|
334
337
|
] })
|
|
335
338
|
] }),
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
+
T && /* @__PURE__ */ s.jsx(fs, { actions: T }),
|
|
340
|
+
k && /* @__PURE__ */ s.jsx(
|
|
341
|
+
xs,
|
|
339
342
|
{
|
|
340
|
-
filters:
|
|
341
|
-
params:
|
|
343
|
+
filters: k,
|
|
344
|
+
params: f,
|
|
342
345
|
onFilter: (c) => {
|
|
343
|
-
d == null || d({ ...
|
|
346
|
+
d == null || d({ ...f, ...c, page: 1 }), g == null || g(c);
|
|
344
347
|
}
|
|
345
348
|
}
|
|
346
349
|
)
|
|
347
350
|
] })
|
|
348
351
|
] }),
|
|
349
|
-
/* @__PURE__ */
|
|
350
|
-
|
|
352
|
+
/* @__PURE__ */ s.jsx("div", { className: "flex flex-col overflow-auto border-y", children: $ ? /* @__PURE__ */ s.jsx(os, {}) : /* @__PURE__ */ s.jsx(
|
|
353
|
+
Ms,
|
|
351
354
|
{
|
|
352
355
|
params: {
|
|
353
|
-
page: (
|
|
354
|
-
limit:
|
|
355
|
-
...
|
|
356
|
+
page: (e == null ? void 0 : e.page) || 1,
|
|
357
|
+
limit: e == null ? void 0 : e.limit,
|
|
358
|
+
...f
|
|
356
359
|
},
|
|
357
|
-
rows:
|
|
360
|
+
rows: w.get(e, a, []),
|
|
358
361
|
rowKey: p,
|
|
359
|
-
selectedItems:
|
|
360
|
-
isStickyHeader:
|
|
361
|
-
columns:
|
|
362
|
-
hasCheckbox:
|
|
363
|
-
hasNumbers:
|
|
362
|
+
selectedItems: E,
|
|
363
|
+
isStickyHeader: D,
|
|
364
|
+
columns: _,
|
|
365
|
+
hasCheckbox: v,
|
|
366
|
+
hasNumbers: o,
|
|
364
367
|
onRowClick: i,
|
|
365
368
|
onSelectedItemsChange: G,
|
|
366
|
-
onSortOrderChange: ({ sortField: c, sortOrder:
|
|
367
|
-
d == null || d({ ...
|
|
369
|
+
onSortOrderChange: ({ sortField: c, sortOrder: F }) => {
|
|
370
|
+
d == null || d({ ...f, sortField: c, sortOrder: F });
|
|
368
371
|
}
|
|
369
372
|
}
|
|
370
373
|
) }),
|
|
371
|
-
|
|
372
|
-
/* @__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(
|
|
373
376
|
C,
|
|
374
377
|
{
|
|
375
|
-
onLimitChange: (c) => d == null ? void 0 : d({ ...
|
|
376
|
-
defaultValue:
|
|
378
|
+
onLimitChange: (c) => d == null ? void 0 : d({ ...f, limit: c, page: 1 }),
|
|
379
|
+
defaultValue: e == null ? void 0 : e.limit
|
|
377
380
|
}
|
|
378
381
|
) }),
|
|
379
|
-
/* @__PURE__ */
|
|
380
|
-
|
|
382
|
+
/* @__PURE__ */ s.jsxs("div", { className: "text-muted-foreground text-sm", children: [
|
|
383
|
+
E.length,
|
|
381
384
|
" of ",
|
|
382
|
-
(
|
|
385
|
+
(e == null ? void 0 : e.total) || 0,
|
|
383
386
|
" row(s) selected."
|
|
384
387
|
] }),
|
|
385
|
-
/* @__PURE__ */
|
|
386
|
-
|
|
388
|
+
/* @__PURE__ */ s.jsx("div", { children: /* @__PURE__ */ s.jsx(
|
|
389
|
+
ss,
|
|
387
390
|
{
|
|
388
|
-
onPageChange: (c) => d == null ? void 0 : d({ ...
|
|
389
|
-
currentPage:
|
|
390
|
-
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
|
|
391
394
|
}
|
|
392
395
|
) })
|
|
393
396
|
] })
|
|
@@ -396,6 +399,6 @@ const ge = [
|
|
|
396
399
|
);
|
|
397
400
|
};
|
|
398
401
|
export {
|
|
399
|
-
|
|
400
|
-
|
|
402
|
+
Qs as DataTable,
|
|
403
|
+
Ms as MyTable
|
|
401
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 n=require("../../FilterWrapper-
|
|
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;
|