jcicl 1.0.9 → 1.0.11
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/.chunks/DefaultPropsProvider.js +5 -5
- package/.chunks/Paper.js +1 -1
- package/.chunks/Popper.js +1 -1
- package/.chunks/Portal.js +205 -187
- package/.chunks/TextField.js +13 -15
- package/.chunks/check.js +11 -0
- package/.chunks/index.js +83 -6
- package/.chunks/useMediaQuery.js +1 -1
- package/.chunks/useSlot.js +1 -1
- package/.chunks/x.js +4 -12
- package/AppContainer/AppContainer.js +46 -47
- package/Button/Button.d.ts +2 -1
- package/Button/Button.js +234 -183
- package/EditableDetailItemWithIcon/EditableDetailItemWithIcon.d.ts +2 -0
- package/EditableDetailItemWithIcon/EditableDetailItemWithIcon.js +53 -41
- package/FormFields/FormFields.d.ts +1 -1
- package/FormFields/FormFields.js +52 -37
- package/LabeledDropdown/LabeledDropdown.js +4 -5
- package/Stepper/Stepper.js +1 -1
- package/Table/Table.js +299 -268
- package/Toast/Toast.js +8 -7
- package/Toast/ToastHelpers.d.ts +2 -0
- package/Toast/ToastHelpers.js +22 -7
- package/Toast/index.d.ts +1 -1
- package/Toast/index.js +8 -6
- package/Tooltip/Tooltip.js +18 -20
- package/package.json +1 -1
- package/utils.d.ts +1 -0
- package/utils.js +34 -15
- package/.chunks/resolveComponentProps.js +0 -80
- package/.chunks/useTheme.js +0 -23
package/Table/Table.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { useState as b, useMemo as N, useEffect as
|
|
3
|
-
import
|
|
4
|
-
import { c
|
|
5
|
-
import { n as
|
|
6
|
-
import { Button as
|
|
7
|
-
import { Flex as
|
|
8
|
-
import { useThemeColors as
|
|
1
|
+
import { jsxs as d, jsx as t } from "react/jsx-runtime";
|
|
2
|
+
import { useState as b, useMemo as N, useEffect as L, useRef as ae } from "react";
|
|
3
|
+
import r from "../theme.js";
|
|
4
|
+
import { c } from "../.chunks/emotion-react.browser.esm.js";
|
|
5
|
+
import { n as l } from "../.chunks/emotion-styled.browser.esm.js";
|
|
6
|
+
import { Button as de } from "../Button/Button.js";
|
|
7
|
+
import { Flex as he } from "../Flex/Flex.js";
|
|
8
|
+
import { useThemeColors as pe } from "../ThemeContext.js";
|
|
9
9
|
import { c as S } from "../.chunks/createLucideIcon.js";
|
|
10
10
|
/**
|
|
11
11
|
* @license lucide-react v0.525.0 - ISC
|
|
@@ -13,21 +13,21 @@ import { c as S } from "../.chunks/createLucideIcon.js";
|
|
|
13
13
|
* This source code is licensed under the ISC license.
|
|
14
14
|
* See the LICENSE file in the root directory of this source tree.
|
|
15
15
|
*/
|
|
16
|
-
const
|
|
16
|
+
const ue = [["path", { d: "m6 9 6 6 6-6", key: "qrunsl" }]], M = S("chevron-down", ue);
|
|
17
17
|
/**
|
|
18
18
|
* @license lucide-react v0.525.0 - ISC
|
|
19
19
|
*
|
|
20
20
|
* This source code is licensed under the ISC license.
|
|
21
21
|
* See the LICENSE file in the root directory of this source tree.
|
|
22
22
|
*/
|
|
23
|
-
const
|
|
23
|
+
const ge = [["path", { d: "m18 15-6-6-6 6", key: "153udz" }]], G = S("chevron-up", ge);
|
|
24
24
|
/**
|
|
25
25
|
* @license lucide-react v0.525.0 - ISC
|
|
26
26
|
*
|
|
27
27
|
* This source code is licensed under the ISC license.
|
|
28
28
|
* See the LICENSE file in the root directory of this source tree.
|
|
29
29
|
*/
|
|
30
|
-
const
|
|
30
|
+
const me = [
|
|
31
31
|
[
|
|
32
32
|
"path",
|
|
33
33
|
{
|
|
@@ -44,14 +44,14 @@ const ue = [
|
|
|
44
44
|
}
|
|
45
45
|
],
|
|
46
46
|
["path", { d: "m2 2 20 20", key: "1ooewy" }]
|
|
47
|
-
],
|
|
47
|
+
], xe = S("eye-off", me);
|
|
48
48
|
/**
|
|
49
49
|
* @license lucide-react v0.525.0 - ISC
|
|
50
50
|
*
|
|
51
51
|
* This source code is licensed under the ISC license.
|
|
52
52
|
* See the LICENSE file in the root directory of this source tree.
|
|
53
53
|
*/
|
|
54
|
-
const
|
|
54
|
+
const fe = [
|
|
55
55
|
[
|
|
56
56
|
"path",
|
|
57
57
|
{
|
|
@@ -60,24 +60,24 @@ const xe = [
|
|
|
60
60
|
}
|
|
61
61
|
],
|
|
62
62
|
["circle", { cx: "12", cy: "12", r: "3", key: "1v7zrd" }]
|
|
63
|
-
],
|
|
63
|
+
], be = S("eye", fe);
|
|
64
64
|
/**
|
|
65
65
|
* @license lucide-react v0.525.0 - ISC
|
|
66
66
|
*
|
|
67
67
|
* This source code is licensed under the ISC license.
|
|
68
68
|
* See the LICENSE file in the root directory of this source tree.
|
|
69
69
|
*/
|
|
70
|
-
const
|
|
70
|
+
const we = [
|
|
71
71
|
["path", { d: "m21 21-4.34-4.34", key: "14j7rj" }],
|
|
72
72
|
["circle", { cx: "11", cy: "11", r: "8", key: "4ej97u" }]
|
|
73
|
-
],
|
|
73
|
+
], Z = S("search", we);
|
|
74
74
|
/**
|
|
75
75
|
* @license lucide-react v0.525.0 - ISC
|
|
76
76
|
*
|
|
77
77
|
* This source code is licensed under the ISC license.
|
|
78
78
|
* See the LICENSE file in the root directory of this source tree.
|
|
79
79
|
*/
|
|
80
|
-
const
|
|
80
|
+
const ye = [
|
|
81
81
|
[
|
|
82
82
|
"path",
|
|
83
83
|
{
|
|
@@ -86,9 +86,9 @@ const be = [
|
|
|
86
86
|
}
|
|
87
87
|
],
|
|
88
88
|
["circle", { cx: "12", cy: "12", r: "3", key: "1v7zrd" }]
|
|
89
|
-
],
|
|
90
|
-
...
|
|
91
|
-
background-color: ${
|
|
89
|
+
], Ce = S("settings", ye), ke = l("div")(() => ({
|
|
90
|
+
...c`
|
|
91
|
+
background-color: ${r.colors.white};
|
|
92
92
|
border-radius: 8px;
|
|
93
93
|
box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
|
|
94
94
|
padding: 20px;
|
|
@@ -96,8 +96,8 @@ const be = [
|
|
|
96
96
|
width: 100%;
|
|
97
97
|
overflow: auto;
|
|
98
98
|
`
|
|
99
|
-
})),
|
|
100
|
-
...
|
|
99
|
+
})), ve = l("div")(() => ({
|
|
100
|
+
...c`
|
|
101
101
|
display: flex;
|
|
102
102
|
flex-direction: column;
|
|
103
103
|
justify-content: space-between;
|
|
@@ -106,22 +106,22 @@ const be = [
|
|
|
106
106
|
flex-wrap: wrap;
|
|
107
107
|
gap: 9px;
|
|
108
108
|
`
|
|
109
|
-
})),
|
|
110
|
-
...
|
|
109
|
+
})), Se = l("div")(() => ({
|
|
110
|
+
...c`
|
|
111
111
|
display: flex;
|
|
112
112
|
justify-content: space-between;
|
|
113
113
|
width: 100%;
|
|
114
114
|
align-items: center;
|
|
115
115
|
`
|
|
116
|
-
})),
|
|
117
|
-
...
|
|
116
|
+
})), $e = l("h2")(() => ({
|
|
117
|
+
...c`
|
|
118
118
|
font-size: 24px;
|
|
119
119
|
font-weight: bold;
|
|
120
|
-
color: ${
|
|
120
|
+
color: ${r.colors.black};
|
|
121
121
|
margin: 0;
|
|
122
122
|
`
|
|
123
|
-
})),
|
|
124
|
-
...
|
|
123
|
+
})), ze = l("div")(() => ({
|
|
124
|
+
...c`
|
|
125
125
|
display: flex;
|
|
126
126
|
justify-content: flex-end;
|
|
127
127
|
width: 100%;
|
|
@@ -129,21 +129,21 @@ const be = [
|
|
|
129
129
|
align-items: center;
|
|
130
130
|
flex-wrap: wrap;
|
|
131
131
|
`
|
|
132
|
-
})),
|
|
133
|
-
...
|
|
132
|
+
})), je = l("div")(() => ({
|
|
133
|
+
...c`
|
|
134
134
|
position: relative;
|
|
135
135
|
display: flex;
|
|
136
136
|
align-items: center;
|
|
137
137
|
flex-grow: 1;
|
|
138
138
|
`
|
|
139
|
-
})),
|
|
139
|
+
})), Te = l(Z, {
|
|
140
140
|
shouldForwardProp: (o) => !["customTheme"].includes(o)
|
|
141
141
|
})(({ customTheme: o }) => ({
|
|
142
|
-
...
|
|
142
|
+
...c`
|
|
143
143
|
position: absolute;
|
|
144
144
|
left: 13px;
|
|
145
145
|
top: 10px;
|
|
146
|
-
color: ${
|
|
146
|
+
color: ${r.colors.gray3};
|
|
147
147
|
width: 19px;
|
|
148
148
|
height: 19px;
|
|
149
149
|
transition: all 313ms ease;
|
|
@@ -154,19 +154,19 @@ const be = [
|
|
|
154
154
|
color: ${o.themeColor};
|
|
155
155
|
}
|
|
156
156
|
`
|
|
157
|
-
})),
|
|
157
|
+
})), De = l("input", {
|
|
158
158
|
shouldForwardProp: (o) => !["customTheme"].includes(o)
|
|
159
159
|
})(({ customTheme: o }) => ({
|
|
160
|
-
...
|
|
160
|
+
...c`
|
|
161
161
|
padding: 10px 15px 10px 40px;
|
|
162
|
-
border: 2px solid ${
|
|
162
|
+
border: 2px solid ${r.colors.gray4};
|
|
163
163
|
border-radius: 25px;
|
|
164
164
|
font-size: 14px;
|
|
165
165
|
min-width: 270px;
|
|
166
166
|
width: 100%;
|
|
167
167
|
transition: all 313ms ease;
|
|
168
168
|
outline: none;
|
|
169
|
-
background-color: ${
|
|
169
|
+
background-color: ${r.colors.white};
|
|
170
170
|
:focus,
|
|
171
171
|
:hover,
|
|
172
172
|
:focus-within {
|
|
@@ -174,14 +174,14 @@ const be = [
|
|
|
174
174
|
box-shadow: 0 0 0 3px ${o.themeColor}18; // 18 = alpha 0.1
|
|
175
175
|
}
|
|
176
176
|
`
|
|
177
|
-
})),
|
|
177
|
+
})), J = l("button", {
|
|
178
178
|
shouldForwardProp: (o) => !["customTheme"].includes(o)
|
|
179
179
|
})(({ customTheme: o }) => ({
|
|
180
|
-
...
|
|
180
|
+
...c`
|
|
181
181
|
padding: 10px 15px;
|
|
182
182
|
border: 2px solid ${o.themeColor};
|
|
183
183
|
border-radius: 6px;
|
|
184
|
-
background-color: ${
|
|
184
|
+
background-color: ${r.colors.white};
|
|
185
185
|
color: ${o.themeColor};
|
|
186
186
|
cursor: pointer;
|
|
187
187
|
display: flex;
|
|
@@ -195,19 +195,19 @@ const be = [
|
|
|
195
195
|
:hover,
|
|
196
196
|
:focus-within {
|
|
197
197
|
background-color: ${o.themeColor};
|
|
198
|
-
color: ${
|
|
198
|
+
color: ${r.colors.white};
|
|
199
199
|
transform: translateY(-1px);
|
|
200
200
|
box-shadow: 0 4px 12px ${o.themeColor}4c; // 4c = alpha 0.3
|
|
201
201
|
}
|
|
202
202
|
`
|
|
203
|
-
})),
|
|
204
|
-
...
|
|
203
|
+
})), K = l("div")(() => ({
|
|
204
|
+
...c`
|
|
205
205
|
position: absolute;
|
|
206
206
|
top: 100%;
|
|
207
207
|
right: 0;
|
|
208
208
|
margin-top: 5px;
|
|
209
|
-
background-color: ${
|
|
210
|
-
border: 1px solid ${
|
|
209
|
+
background-color: ${r.colors.white};
|
|
210
|
+
border: 1px solid ${r.colors.gray4};
|
|
211
211
|
border-radius: 6px;
|
|
212
212
|
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
|
|
213
213
|
z-index: 1000;
|
|
@@ -215,17 +215,17 @@ const be = [
|
|
|
215
215
|
max-height: 300px;
|
|
216
216
|
overflow-y: auto;
|
|
217
217
|
`
|
|
218
|
-
})),
|
|
218
|
+
})), E = l("div", {
|
|
219
219
|
shouldForwardProp: (o) => !["customTheme"].includes(o)
|
|
220
220
|
})(({ customTheme: o }) => ({
|
|
221
|
-
...
|
|
221
|
+
...c`
|
|
222
222
|
padding: 12px 16px;
|
|
223
223
|
display: flex;
|
|
224
224
|
align-items: center;
|
|
225
225
|
gap: 10px;
|
|
226
226
|
cursor: pointer;
|
|
227
227
|
font-size: 14px;
|
|
228
|
-
color: ${
|
|
228
|
+
color: ${r.colors.slate};
|
|
229
229
|
transition: all 0.2s ease;
|
|
230
230
|
:focus,
|
|
231
231
|
:hover,
|
|
@@ -234,33 +234,33 @@ const be = [
|
|
|
234
234
|
color: ${o.themeDark};
|
|
235
235
|
}
|
|
236
236
|
`
|
|
237
|
-
})),
|
|
237
|
+
})), _ = l("input", {
|
|
238
238
|
shouldForwardProp: (o) => !["customTheme"].includes(o)
|
|
239
239
|
})(({ customTheme: o }) => ({
|
|
240
|
-
...
|
|
240
|
+
...c`
|
|
241
241
|
width: 16px;
|
|
242
242
|
height: 16px;
|
|
243
243
|
accent-color: ${o.themeColor};
|
|
244
244
|
`
|
|
245
|
-
})),
|
|
246
|
-
...
|
|
245
|
+
})), Ne = l("table")(() => ({
|
|
246
|
+
...c`
|
|
247
247
|
width: 100%;
|
|
248
248
|
border-collapse: collapse;
|
|
249
|
-
background-color: ${
|
|
249
|
+
background-color: ${r.colors.white};
|
|
250
250
|
border-radius: 8px;
|
|
251
251
|
overflow: hidden;
|
|
252
252
|
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
|
|
253
253
|
`
|
|
254
|
-
})),
|
|
254
|
+
})), Ae = l("th", { shouldForwardProp: (o) => !["customTheme"].includes(o) })(
|
|
255
255
|
({ customTheme: o }) => ({
|
|
256
|
-
...
|
|
257
|
-
background-color: ${
|
|
258
|
-
color: ${
|
|
256
|
+
...c`
|
|
257
|
+
background-color: ${r.colors.whiteBlue};
|
|
258
|
+
color: ${r.colors.slate};
|
|
259
259
|
padding: 16px 12px;
|
|
260
260
|
text-align: left;
|
|
261
261
|
font-size: 14px;
|
|
262
262
|
font-weight: 600;
|
|
263
|
-
border-bottom: 2px solid ${
|
|
263
|
+
border-bottom: 2px solid ${r.colors.gray4};
|
|
264
264
|
cursor: pointer;
|
|
265
265
|
user-select: none;
|
|
266
266
|
transition: all 0.2s ease;
|
|
@@ -274,23 +274,23 @@ const be = [
|
|
|
274
274
|
}
|
|
275
275
|
`
|
|
276
276
|
})
|
|
277
|
-
),
|
|
278
|
-
...
|
|
277
|
+
), Be = l("td")(() => ({
|
|
278
|
+
...c`
|
|
279
279
|
padding: 14px 12px;
|
|
280
|
-
border-bottom: 1px solid ${
|
|
280
|
+
border-bottom: 1px solid ${r.colors.almostWhite};
|
|
281
281
|
font-size: 14px;
|
|
282
|
-
color: ${
|
|
282
|
+
color: ${r.colors.slate};
|
|
283
283
|
transition: all 0.2s ease;
|
|
284
284
|
`
|
|
285
|
-
})),
|
|
286
|
-
...
|
|
285
|
+
})), Fe = l("span")(() => ({
|
|
286
|
+
...c`
|
|
287
287
|
margin-left: 8px;
|
|
288
288
|
opacity: 0.6;
|
|
289
289
|
`
|
|
290
|
-
})),
|
|
291
|
-
...
|
|
290
|
+
})), Q = l("tr", { shouldForwardProp: (o) => !["customTheme"].includes(o) })(({ interactableRow: o, customTheme: w }) => ({
|
|
291
|
+
...c`
|
|
292
292
|
transition: all 0.2s ease;
|
|
293
|
-
${o &&
|
|
293
|
+
${o && c`
|
|
294
294
|
:focus,
|
|
295
295
|
:hover,
|
|
296
296
|
:focus-within {
|
|
@@ -299,23 +299,23 @@ const be = [
|
|
|
299
299
|
}
|
|
300
300
|
`}
|
|
301
301
|
`
|
|
302
|
-
})),
|
|
303
|
-
...
|
|
302
|
+
})), Le = l("div")(() => ({
|
|
303
|
+
...c`
|
|
304
304
|
display: flex;
|
|
305
305
|
justify-content: center;
|
|
306
306
|
align-items: center;
|
|
307
307
|
margin-top: 20px;
|
|
308
308
|
gap: 10px;
|
|
309
309
|
`
|
|
310
|
-
})), v =
|
|
310
|
+
})), v = l("button", {
|
|
311
311
|
shouldForwardProp: (o) => !["customTheme"].includes(o)
|
|
312
312
|
})(({ customTheme: o }) => ({
|
|
313
|
-
...
|
|
313
|
+
...c`
|
|
314
314
|
padding: 8px 12px;
|
|
315
|
-
border: 1px solid ${
|
|
315
|
+
border: 1px solid ${r.colors.gray4};
|
|
316
316
|
border-radius: 4px;
|
|
317
|
-
background-color: ${
|
|
318
|
-
color: ${
|
|
317
|
+
background-color: ${r.colors.white};
|
|
318
|
+
color: ${r.colors.slate};
|
|
319
319
|
cursor: pointer;
|
|
320
320
|
font-size: 14px;
|
|
321
321
|
transition: all 0.2s ease;
|
|
@@ -324,7 +324,7 @@ const be = [
|
|
|
324
324
|
:hover,
|
|
325
325
|
:focus-within {
|
|
326
326
|
background-color: ${o.themeColor};
|
|
327
|
-
color: ${
|
|
327
|
+
color: ${r.colors.white};
|
|
328
328
|
border-color: ${o.themeColor};
|
|
329
329
|
}
|
|
330
330
|
:disabled {
|
|
@@ -332,38 +332,38 @@ const be = [
|
|
|
332
332
|
cursor: not-allowed;
|
|
333
333
|
}
|
|
334
334
|
`
|
|
335
|
-
})),
|
|
336
|
-
...
|
|
335
|
+
})), Me = l("div")(() => ({
|
|
336
|
+
...c`
|
|
337
337
|
font-size: 14px;
|
|
338
|
-
color: ${
|
|
338
|
+
color: ${r.colors.gray3};
|
|
339
339
|
text-align: center;
|
|
340
340
|
margin-top: 10px;
|
|
341
341
|
`
|
|
342
|
-
})),
|
|
343
|
-
...
|
|
342
|
+
})), X = l("span")(() => ({
|
|
343
|
+
...c`
|
|
344
344
|
padding: 8px 4px;
|
|
345
|
-
color: ${
|
|
345
|
+
color: ${r.colors.gray3};
|
|
346
346
|
font-size: 14px;
|
|
347
347
|
`
|
|
348
|
-
})),
|
|
348
|
+
})), qe = ({
|
|
349
349
|
data: o = [],
|
|
350
350
|
columnTitles: w = {},
|
|
351
351
|
rowsPerPage: y = 19,
|
|
352
|
-
title:
|
|
352
|
+
title: ee = "Data Table",
|
|
353
353
|
onRowClick: A,
|
|
354
|
-
hiddenColumns:
|
|
355
|
-
defaultSort:
|
|
356
|
-
extraActions:
|
|
354
|
+
hiddenColumns: oe = [],
|
|
355
|
+
defaultSort: I = { key: "", direction: "asc" },
|
|
356
|
+
extraActions: V
|
|
357
357
|
}) => {
|
|
358
|
-
const [
|
|
358
|
+
const [a, x] = b(1), [j, O] = b(""), [p, P] = b(I), [C, T] = b(/* @__PURE__ */ new Set()), [B, R] = b(/* @__PURE__ */ new Set()), [H, U] = b(!1), [q, W] = b(!1), i = pe(), f = {
|
|
359
359
|
thActive: {
|
|
360
|
-
backgroundColor:
|
|
361
|
-
color:
|
|
360
|
+
backgroundColor: i.themeColor,
|
|
361
|
+
color: r.colors.white
|
|
362
362
|
},
|
|
363
363
|
paginationButtonActive: {
|
|
364
|
-
backgroundColor:
|
|
365
|
-
color:
|
|
366
|
-
borderColor:
|
|
364
|
+
backgroundColor: i.themeColor,
|
|
365
|
+
color: r.colors.white,
|
|
366
|
+
borderColor: i.themeColor
|
|
367
367
|
},
|
|
368
368
|
paginationButtonDisabled: {
|
|
369
369
|
opacity: 0.5,
|
|
@@ -371,220 +371,251 @@ const be = [
|
|
|
371
371
|
},
|
|
372
372
|
info: {
|
|
373
373
|
fontSize: "14px",
|
|
374
|
-
color:
|
|
374
|
+
color: r.colors.gray3,
|
|
375
375
|
textAlign: "center",
|
|
376
376
|
marginTop: "10px"
|
|
377
377
|
}
|
|
378
|
-
},
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
}, [
|
|
382
|
-
|
|
378
|
+
}, u = N(() => o.length === 0 ? [] : Object.keys(o[0]).filter((e) => !oe.includes(e)), [o]);
|
|
379
|
+
L(() => {
|
|
380
|
+
u.length > 0 && (R(new Set(u)), T(new Set(u)));
|
|
381
|
+
}, [u]), L(() => {
|
|
382
|
+
O(""), P(I), x(1);
|
|
383
383
|
}, []);
|
|
384
|
-
const
|
|
384
|
+
const F = N(() => {
|
|
385
385
|
if (!j) return o;
|
|
386
|
-
const e = C.size > 0 ? C : new Set(
|
|
387
|
-
return o.filter((
|
|
388
|
-
const
|
|
389
|
-
return
|
|
386
|
+
const e = C.size > 0 ? C : new Set(u);
|
|
387
|
+
return o.filter((n) => Array.from(e).some((s) => {
|
|
388
|
+
const h = n[s];
|
|
389
|
+
return h && h.toString().toLowerCase().replace(/[-()\s]/g, "").includes(j.toLowerCase().replace(/[-()\s]/g, ""));
|
|
390
390
|
}));
|
|
391
|
-
}, [o, j, C,
|
|
392
|
-
|
|
393
|
-
|
|
391
|
+
}, [o, j, C, u]), m = N(() => p.key ? [...F].sort((e, n) => {
|
|
392
|
+
const s = typeof e[p.key] == "string" ? e[p.key].toLowerCase() : e[p.key], h = typeof n[p.key] == "string" ? n[p.key].toLowerCase() : n[p.key];
|
|
393
|
+
return s < h ? p.direction === "asc" ? -1 : 1 : s > h ? p.direction === "asc" ? 1 : -1 : 0;
|
|
394
|
+
}) : F, [F, p]), D = u.filter((e) => B.has(e)), te = () => {
|
|
395
|
+
if (!Array.isArray(m) || m.length === 0) return;
|
|
396
|
+
const e = D.map((k) => w[k] || k), n = (k) => {
|
|
394
397
|
const z = String(k ?? "");
|
|
395
398
|
return /[",\n]/.test(z) ? `"${z.replace(/"/g, '""')}"` : z;
|
|
396
|
-
},
|
|
399
|
+
}, h = [
|
|
397
400
|
e.join(","),
|
|
398
401
|
// header row
|
|
399
|
-
...
|
|
402
|
+
...m.map((k) => D.map((z) => n(k[z])).join(","))
|
|
400
403
|
].join(`
|
|
401
|
-
`),
|
|
402
|
-
$.href = URL.createObjectURL(
|
|
403
|
-
},
|
|
404
|
-
const e = (
|
|
405
|
-
return
|
|
406
|
-
}, [
|
|
407
|
-
P((
|
|
404
|
+
`), le = new Blob([h], { type: "text/csv;charset=utf-8;" }), $ = document.createElement("a");
|
|
405
|
+
$.href = URL.createObjectURL(le), $.download = "data.csv", document.body.appendChild($), $.click(), document.body.removeChild($);
|
|
406
|
+
}, ne = N(() => {
|
|
407
|
+
const e = (a - 1) * y;
|
|
408
|
+
return m.slice(e, e + y);
|
|
409
|
+
}, [m, a, y]), g = Math.ceil(m.length / y), re = (e) => {
|
|
410
|
+
P((n) => ({
|
|
408
411
|
key: e,
|
|
409
|
-
direction:
|
|
412
|
+
direction: n.key === e && n.direction === "asc" ? "desc" : "asc"
|
|
410
413
|
}));
|
|
411
|
-
},
|
|
412
|
-
T((
|
|
413
|
-
const
|
|
414
|
-
return
|
|
414
|
+
}, se = (e) => {
|
|
415
|
+
T((n) => {
|
|
416
|
+
const s = new Set(n);
|
|
417
|
+
return s.has(e) ? s.delete(e) : s.add(e), s;
|
|
415
418
|
});
|
|
416
|
-
},
|
|
417
|
-
C.size ===
|
|
418
|
-
},
|
|
419
|
-
|
|
420
|
-
const
|
|
421
|
-
return
|
|
419
|
+
}, ie = () => {
|
|
420
|
+
C.size === u.length ? T(/* @__PURE__ */ new Set()) : T(new Set(u));
|
|
421
|
+
}, ce = (e) => {
|
|
422
|
+
R((n) => {
|
|
423
|
+
const s = new Set(n);
|
|
424
|
+
return s.has(e) ? s.delete(e) : s.add(e), s;
|
|
422
425
|
});
|
|
426
|
+
}, Y = (e) => {
|
|
427
|
+
const n = ae(null);
|
|
428
|
+
return L(() => {
|
|
429
|
+
const s = (h) => {
|
|
430
|
+
!n.current || n.current.contains(h.target) || e(h);
|
|
431
|
+
};
|
|
432
|
+
return document.addEventListener("mousedown", s), document.addEventListener("touchstart", s), () => {
|
|
433
|
+
document.removeEventListener("mousedown", s), document.removeEventListener("touchstart", s);
|
|
434
|
+
};
|
|
435
|
+
}, [n, e]), n;
|
|
423
436
|
};
|
|
424
|
-
return /* @__PURE__ */
|
|
425
|
-
/* @__PURE__ */
|
|
426
|
-
/* @__PURE__ */
|
|
427
|
-
/* @__PURE__ */ t(
|
|
428
|
-
/* @__PURE__ */
|
|
429
|
-
|
|
430
|
-
/* @__PURE__ */ t(
|
|
437
|
+
return /* @__PURE__ */ d(ke, { className: "jcTableContainer", children: [
|
|
438
|
+
/* @__PURE__ */ d(ve, { className: "jcTableHeader", children: [
|
|
439
|
+
/* @__PURE__ */ d(Se, { className: "jcTableTitleAndActions", children: [
|
|
440
|
+
/* @__PURE__ */ t($e, { children: ee }),
|
|
441
|
+
/* @__PURE__ */ d(he, { className: "jcTableExtraComponentsBox", gap: "9px", children: [
|
|
442
|
+
V && V,
|
|
443
|
+
/* @__PURE__ */ t(de, { onClick: te, children: "Export to CSV" })
|
|
431
444
|
] })
|
|
432
445
|
] }),
|
|
433
|
-
/* @__PURE__ */
|
|
434
|
-
/* @__PURE__ */
|
|
435
|
-
/* @__PURE__ */ t(
|
|
446
|
+
/* @__PURE__ */ d(ze, { className: "jcTableControls", children: [
|
|
447
|
+
/* @__PURE__ */ d(je, { className: "jcTableSearchContainer", children: [
|
|
448
|
+
/* @__PURE__ */ t(Te, { customTheme: i }),
|
|
436
449
|
/* @__PURE__ */ t(
|
|
437
|
-
|
|
450
|
+
De,
|
|
438
451
|
{
|
|
439
|
-
customTheme:
|
|
452
|
+
customTheme: i,
|
|
440
453
|
type: "text",
|
|
441
454
|
placeholder: "Search...",
|
|
442
455
|
value: j,
|
|
443
|
-
onChange: (e) =>
|
|
456
|
+
onChange: (e) => O(e.target.value)
|
|
444
457
|
}
|
|
445
458
|
)
|
|
446
459
|
] }),
|
|
447
|
-
/* @__PURE__ */
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
{
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
/* @__PURE__ */ t(M, { size: 16 })
|
|
458
|
-
]
|
|
459
|
-
}
|
|
460
|
-
),
|
|
461
|
-
R && /* @__PURE__ */ a(Y, { className: "jcTableSearchFieldsDropdown", children: [
|
|
462
|
-
/* @__PURE__ */ a(_, { customTheme: s, onClick: se, children: [
|
|
463
|
-
/* @__PURE__ */ t(
|
|
464
|
-
L,
|
|
460
|
+
/* @__PURE__ */ d(
|
|
461
|
+
"div",
|
|
462
|
+
{
|
|
463
|
+
style: { position: "relative" },
|
|
464
|
+
ref: Y(() => {
|
|
465
|
+
W(!1);
|
|
466
|
+
}),
|
|
467
|
+
children: [
|
|
468
|
+
/* @__PURE__ */ d(
|
|
469
|
+
J,
|
|
465
470
|
{
|
|
466
|
-
customTheme:
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
+
customTheme: i,
|
|
472
|
+
className: "jcTableSearchFields",
|
|
473
|
+
onClick: () => W(!q),
|
|
474
|
+
children: [
|
|
475
|
+
/* @__PURE__ */ t(Z, { size: 16 }),
|
|
476
|
+
"Fields",
|
|
477
|
+
/* @__PURE__ */ t(M, { size: 16 })
|
|
478
|
+
]
|
|
471
479
|
}
|
|
472
480
|
),
|
|
473
|
-
/* @__PURE__ */
|
|
474
|
-
|
|
475
|
-
/* @__PURE__ */ t("div", { style: { height: "1px", backgroundColor: n.colors.gray4, margin: "4px 0" } }),
|
|
476
|
-
h.map((e) => /* @__PURE__ */ a(
|
|
477
|
-
_,
|
|
478
|
-
{
|
|
479
|
-
customTheme: s,
|
|
480
|
-
onClick: () => re(e),
|
|
481
|
-
children: [
|
|
481
|
+
q && /* @__PURE__ */ d(K, { className: "jcTableSearchFieldsDropdown", children: [
|
|
482
|
+
/* @__PURE__ */ d(E, { customTheme: i, onClick: ie, children: [
|
|
482
483
|
/* @__PURE__ */ t(
|
|
483
|
-
|
|
484
|
+
_,
|
|
484
485
|
{
|
|
485
|
-
customTheme:
|
|
486
|
+
customTheme: i,
|
|
486
487
|
type: "checkbox",
|
|
487
|
-
checked: C.
|
|
488
|
+
checked: C.size === u.length,
|
|
488
489
|
onChange: () => {
|
|
489
490
|
}
|
|
490
491
|
}
|
|
491
492
|
),
|
|
492
|
-
/* @__PURE__ */ t("span", {
|
|
493
|
-
]
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
] })
|
|
498
|
-
] }),
|
|
499
|
-
/* @__PURE__ */ a("div", { style: { position: "relative" }, children: [
|
|
500
|
-
/* @__PURE__ */ a(
|
|
501
|
-
W,
|
|
502
|
-
{
|
|
503
|
-
customTheme: s,
|
|
504
|
-
className: "jcTableColumnSettings",
|
|
505
|
-
onClick: () => Z(!O),
|
|
506
|
-
children: [
|
|
507
|
-
/* @__PURE__ */ t(we, { size: 16 }),
|
|
508
|
-
"Columns",
|
|
509
|
-
/* @__PURE__ */ t(M, { size: 16 })
|
|
510
|
-
]
|
|
511
|
-
}
|
|
512
|
-
),
|
|
513
|
-
O && /* @__PURE__ */ t(Y, { className: "jcTableColumnSettingsDropdown", children: h.map((e) => /* @__PURE__ */ a(
|
|
514
|
-
_,
|
|
515
|
-
{
|
|
516
|
-
customTheme: s,
|
|
517
|
-
onClick: () => ie(e),
|
|
518
|
-
children: [
|
|
519
|
-
/* @__PURE__ */ t(
|
|
520
|
-
L,
|
|
493
|
+
/* @__PURE__ */ t("span", { style: { fontWeight: "bold" }, children: "All" })
|
|
494
|
+
] }),
|
|
495
|
+
/* @__PURE__ */ t("div", { style: { height: "1px", backgroundColor: r.colors.gray4, margin: "4px 0" } }),
|
|
496
|
+
u.map((e) => /* @__PURE__ */ d(
|
|
497
|
+
E,
|
|
521
498
|
{
|
|
522
|
-
customTheme:
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
499
|
+
customTheme: i,
|
|
500
|
+
onClick: () => se(e),
|
|
501
|
+
children: [
|
|
502
|
+
/* @__PURE__ */ t(
|
|
503
|
+
_,
|
|
504
|
+
{
|
|
505
|
+
customTheme: i,
|
|
506
|
+
type: "checkbox",
|
|
507
|
+
checked: C.has(e),
|
|
508
|
+
onChange: () => {
|
|
509
|
+
}
|
|
510
|
+
}
|
|
511
|
+
),
|
|
512
|
+
/* @__PURE__ */ t("span", { children: w[e] || e })
|
|
513
|
+
]
|
|
514
|
+
},
|
|
515
|
+
e
|
|
516
|
+
))
|
|
517
|
+
] })
|
|
518
|
+
]
|
|
519
|
+
}
|
|
520
|
+
),
|
|
521
|
+
/* @__PURE__ */ d(
|
|
522
|
+
"div",
|
|
523
|
+
{
|
|
524
|
+
style: { position: "relative" },
|
|
525
|
+
ref: Y(() => {
|
|
526
|
+
U(!1);
|
|
527
|
+
}),
|
|
528
|
+
children: [
|
|
529
|
+
/* @__PURE__ */ d(
|
|
530
|
+
J,
|
|
531
|
+
{
|
|
532
|
+
customTheme: i,
|
|
533
|
+
className: "jcTableColumnSettings",
|
|
534
|
+
onClick: () => U(!H),
|
|
535
|
+
children: [
|
|
536
|
+
/* @__PURE__ */ t(Ce, { size: 16 }),
|
|
537
|
+
"Columns",
|
|
538
|
+
/* @__PURE__ */ t(M, { size: 16 })
|
|
539
|
+
]
|
|
540
|
+
}
|
|
541
|
+
),
|
|
542
|
+
H && /* @__PURE__ */ t(K, { className: "jcTableColumnSettingsDropdown", children: u.map((e) => /* @__PURE__ */ d(
|
|
543
|
+
E,
|
|
544
|
+
{
|
|
545
|
+
customTheme: i,
|
|
546
|
+
onClick: () => ce(e),
|
|
547
|
+
children: [
|
|
548
|
+
/* @__PURE__ */ t(
|
|
549
|
+
_,
|
|
550
|
+
{
|
|
551
|
+
customTheme: i,
|
|
552
|
+
type: "checkbox",
|
|
553
|
+
checked: B.has(e),
|
|
554
|
+
onChange: () => {
|
|
555
|
+
}
|
|
556
|
+
}
|
|
557
|
+
),
|
|
558
|
+
B.has(e) ? /* @__PURE__ */ t(be, { size: 16 }) : /* @__PURE__ */ t(xe, { size: 16 }),
|
|
559
|
+
/* @__PURE__ */ t("span", { children: w[e] || e })
|
|
560
|
+
]
|
|
561
|
+
},
|
|
562
|
+
e
|
|
563
|
+
)) })
|
|
564
|
+
]
|
|
565
|
+
}
|
|
566
|
+
)
|
|
536
567
|
] })
|
|
537
568
|
] }),
|
|
538
|
-
/* @__PURE__ */
|
|
539
|
-
/* @__PURE__ */ t("thead", { children: /* @__PURE__ */ t(
|
|
540
|
-
|
|
569
|
+
/* @__PURE__ */ d(Ne, { className: "jcTableContent", children: [
|
|
570
|
+
/* @__PURE__ */ t("thead", { children: /* @__PURE__ */ t(Q, { customTheme: i, interactableRow: !1, children: D.map((e) => /* @__PURE__ */ d(
|
|
571
|
+
Ae,
|
|
541
572
|
{
|
|
542
|
-
customTheme:
|
|
543
|
-
style:
|
|
544
|
-
onClick: () =>
|
|
573
|
+
customTheme: i,
|
|
574
|
+
style: p.key === e ? f.thActive : {},
|
|
575
|
+
onClick: () => re(e),
|
|
545
576
|
children: [
|
|
546
577
|
w[e] || e,
|
|
547
|
-
/* @__PURE__ */ t(
|
|
578
|
+
/* @__PURE__ */ t(Fe, { children: p.key === e ? p.direction === "asc" ? /* @__PURE__ */ t(G, { size: 16 }) : /* @__PURE__ */ t(M, { size: 16 }) : /* @__PURE__ */ t(G, { size: 16, style: { opacity: 0.313 } }) })
|
|
548
579
|
]
|
|
549
580
|
},
|
|
550
581
|
e
|
|
551
582
|
)) }) }),
|
|
552
|
-
/* @__PURE__ */ t("tbody", { children:
|
|
553
|
-
|
|
583
|
+
/* @__PURE__ */ t("tbody", { children: ne.map((e, n) => /* @__PURE__ */ t(
|
|
584
|
+
Q,
|
|
554
585
|
{
|
|
555
|
-
customTheme:
|
|
586
|
+
customTheme: i,
|
|
556
587
|
onClick: () => A && A(e),
|
|
557
588
|
interactableRow: !!A,
|
|
558
|
-
children: D.map((
|
|
589
|
+
children: D.map((s) => /* @__PURE__ */ t(Be, { children: e[s] }, s))
|
|
559
590
|
},
|
|
560
|
-
|
|
591
|
+
n
|
|
561
592
|
)) })
|
|
562
593
|
] }),
|
|
563
|
-
/* @__PURE__ */
|
|
594
|
+
/* @__PURE__ */ d(Le, { children: [
|
|
564
595
|
/* @__PURE__ */ t(
|
|
565
596
|
v,
|
|
566
597
|
{
|
|
567
|
-
customTheme:
|
|
568
|
-
style:
|
|
569
|
-
onClick: () =>
|
|
570
|
-
disabled:
|
|
598
|
+
customTheme: i,
|
|
599
|
+
style: a === 1 ? f.paginationButtonDisabled : {},
|
|
600
|
+
onClick: () => x(Math.max(1, a - 1)),
|
|
601
|
+
disabled: a === 1,
|
|
571
602
|
children: "Previous"
|
|
572
603
|
}
|
|
573
604
|
),
|
|
574
605
|
(() => {
|
|
575
606
|
const e = [];
|
|
576
|
-
if (
|
|
577
|
-
for (let
|
|
607
|
+
if (g <= 5)
|
|
608
|
+
for (let n = 1; n <= g; n++)
|
|
578
609
|
e.push(
|
|
579
610
|
/* @__PURE__ */ t(
|
|
580
611
|
v,
|
|
581
612
|
{
|
|
582
|
-
customTheme:
|
|
583
|
-
style:
|
|
584
|
-
onClick: () =>
|
|
585
|
-
children:
|
|
613
|
+
customTheme: i,
|
|
614
|
+
style: a === n ? f.paginationButtonActive : {},
|
|
615
|
+
onClick: () => x(n),
|
|
616
|
+
children: n
|
|
586
617
|
},
|
|
587
|
-
|
|
618
|
+
n
|
|
588
619
|
)
|
|
589
620
|
);
|
|
590
621
|
else {
|
|
@@ -592,38 +623,38 @@ const be = [
|
|
|
592
623
|
/* @__PURE__ */ t(
|
|
593
624
|
v,
|
|
594
625
|
{
|
|
595
|
-
customTheme:
|
|
596
|
-
style:
|
|
597
|
-
onClick: () =>
|
|
626
|
+
customTheme: i,
|
|
627
|
+
style: a === 1 ? f.paginationButtonActive : {},
|
|
628
|
+
onClick: () => x(1),
|
|
598
629
|
children: "1"
|
|
599
630
|
},
|
|
600
631
|
1
|
|
601
632
|
)
|
|
602
|
-
),
|
|
603
|
-
const
|
|
604
|
-
for (let
|
|
633
|
+
), a > 3 && e.push(/* @__PURE__ */ t(X, { children: "..." }, "ellipsis1"));
|
|
634
|
+
const n = Math.max(2, a - 1), s = Math.min(g - 1, a + 1);
|
|
635
|
+
for (let h = n; h <= s; h++)
|
|
605
636
|
e.push(
|
|
606
637
|
/* @__PURE__ */ t(
|
|
607
638
|
v,
|
|
608
639
|
{
|
|
609
|
-
customTheme:
|
|
610
|
-
style:
|
|
611
|
-
onClick: () =>
|
|
612
|
-
children:
|
|
640
|
+
customTheme: i,
|
|
641
|
+
style: a === h ? f.paginationButtonActive : {},
|
|
642
|
+
onClick: () => x(h),
|
|
643
|
+
children: h
|
|
613
644
|
},
|
|
614
|
-
|
|
645
|
+
h
|
|
615
646
|
)
|
|
616
647
|
);
|
|
617
|
-
|
|
648
|
+
a < g - 2 && e.push(/* @__PURE__ */ t(X, { children: "..." }, "ellipsis2")), g > 1 && e.push(
|
|
618
649
|
/* @__PURE__ */ t(
|
|
619
650
|
v,
|
|
620
651
|
{
|
|
621
|
-
customTheme:
|
|
622
|
-
style:
|
|
623
|
-
onClick: () =>
|
|
624
|
-
children:
|
|
652
|
+
customTheme: i,
|
|
653
|
+
style: a === g ? f.paginationButtonActive : {},
|
|
654
|
+
onClick: () => x(g),
|
|
655
|
+
children: g
|
|
625
656
|
},
|
|
626
|
-
|
|
657
|
+
g
|
|
627
658
|
)
|
|
628
659
|
);
|
|
629
660
|
}
|
|
@@ -632,26 +663,26 @@ const be = [
|
|
|
632
663
|
/* @__PURE__ */ t(
|
|
633
664
|
v,
|
|
634
665
|
{
|
|
635
|
-
customTheme:
|
|
636
|
-
style:
|
|
637
|
-
onClick: () =>
|
|
638
|
-
disabled:
|
|
666
|
+
customTheme: i,
|
|
667
|
+
style: a === g ? f.paginationButtonDisabled : {},
|
|
668
|
+
onClick: () => x(Math.min(g, a + 1)),
|
|
669
|
+
disabled: a === g,
|
|
639
670
|
children: "Next"
|
|
640
671
|
}
|
|
641
672
|
)
|
|
642
673
|
] }),
|
|
643
|
-
/* @__PURE__ */
|
|
674
|
+
/* @__PURE__ */ d(Me, { children: [
|
|
644
675
|
"Showing ",
|
|
645
|
-
Math.min((
|
|
676
|
+
Math.min((a - 1) * y + 1, m.length),
|
|
646
677
|
" to",
|
|
647
678
|
" ",
|
|
648
|
-
Math.min(
|
|
679
|
+
Math.min(a * y, m.length),
|
|
649
680
|
" of ",
|
|
650
|
-
|
|
681
|
+
m.length,
|
|
651
682
|
" entries"
|
|
652
683
|
] })
|
|
653
684
|
] });
|
|
654
685
|
};
|
|
655
686
|
export {
|
|
656
|
-
|
|
687
|
+
qe as default
|
|
657
688
|
};
|