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