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