jcicl 0.0.323 → 0.0.325
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/Button/Button.js +1 -3
- package/Table/Table.d.ts +1 -0
- package/Table/Table.js +156 -151
- package/package.json +1 -1
package/Button/Button.js
CHANGED
|
@@ -457,7 +457,6 @@ const S = s(j)`
|
|
|
457
457
|
}
|
|
458
458
|
`, eo = s(S)`
|
|
459
459
|
background-color: ${r.colors.green};
|
|
460
|
-
border-radius: 0;
|
|
461
460
|
height: 2.5rem;
|
|
462
461
|
border: 2px solid transparent;
|
|
463
462
|
color: ${r.colors.white};
|
|
@@ -507,7 +506,6 @@ const S = s(j)`
|
|
|
507
506
|
})
|
|
508
507
|
), so = s(S)`
|
|
509
508
|
background-color: ${r.colors.gold};
|
|
510
|
-
border-radius: 0;
|
|
511
509
|
height: 2.5rem;
|
|
512
510
|
border: 2px solid transparent;
|
|
513
511
|
color: ${r.colors.midnight};
|
|
@@ -515,7 +513,7 @@ const S = s(j)`
|
|
|
515
513
|
border-radius: 32px;
|
|
516
514
|
font-weight: 400;
|
|
517
515
|
padding: 0.75rem 2rem;
|
|
518
|
-
font-size:
|
|
516
|
+
font-size: 1rem;
|
|
519
517
|
box-shadow: ${r.boxShadows.gray63};
|
|
520
518
|
&:hover,
|
|
521
519
|
:focus-visible {
|
package/Table/Table.d.ts
CHANGED
package/Table/Table.js
CHANGED
|
@@ -1,21 +1,22 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import { n as
|
|
5
|
-
import { Button as
|
|
1
|
+
import { jsxs as a, jsx as o } from "react/jsx-runtime";
|
|
2
|
+
import ze, { forwardRef as X, createElement as F, useState as y, useMemo as T } from "react";
|
|
3
|
+
import I from "../theme.js";
|
|
4
|
+
import { n as i } from "../.chunks/emotion-styled.browser.esm.js";
|
|
5
|
+
import { Button as Ae } from "../Button/Button.js";
|
|
6
|
+
import { Flex as je } from "../Flex/Flex.js";
|
|
6
7
|
/**
|
|
7
8
|
* @license lucide-react v0.525.0 - ISC
|
|
8
9
|
*
|
|
9
10
|
* This source code is licensed under the ISC license.
|
|
10
11
|
* See the LICENSE file in the root directory of this source tree.
|
|
11
12
|
*/
|
|
12
|
-
const
|
|
13
|
+
const Be = (n) => n.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase(), Ie = (n) => n.replace(
|
|
13
14
|
/^([A-Z])|[\s-_]+(\w)/g,
|
|
14
15
|
(r, l, u) => u ? u.toUpperCase() : l.toLowerCase()
|
|
15
|
-
),
|
|
16
|
-
const r =
|
|
16
|
+
), G = (n) => {
|
|
17
|
+
const r = Ie(n);
|
|
17
18
|
return r.charAt(0).toUpperCase() + r.slice(1);
|
|
18
|
-
},
|
|
19
|
+
}, P = (...n) => n.filter((r, l, u) => !!r && r.trim() !== "" && u.indexOf(r) === l).join(" ").trim(), _e = (n) => {
|
|
19
20
|
for (const r in n)
|
|
20
21
|
if (r.startsWith("aria-") || r === "role" || r === "title")
|
|
21
22
|
return !0;
|
|
@@ -26,7 +27,7 @@ const Ae = (n) => n.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase(), je = (
|
|
|
26
27
|
* This source code is licensed under the ISC license.
|
|
27
28
|
* See the LICENSE file in the root directory of this source tree.
|
|
28
29
|
*/
|
|
29
|
-
var
|
|
30
|
+
var De = {
|
|
30
31
|
xmlns: "http://www.w3.org/2000/svg",
|
|
31
32
|
width: 24,
|
|
32
33
|
height: 24,
|
|
@@ -43,7 +44,7 @@ var Ie = {
|
|
|
43
44
|
* This source code is licensed under the ISC license.
|
|
44
45
|
* See the LICENSE file in the root directory of this source tree.
|
|
45
46
|
*/
|
|
46
|
-
const
|
|
47
|
+
const Te = X(
|
|
47
48
|
({
|
|
48
49
|
color: n = "currentColor",
|
|
49
50
|
size: r = 24,
|
|
@@ -52,22 +53,22 @@ const _e = Q(
|
|
|
52
53
|
className: C = "",
|
|
53
54
|
children: g,
|
|
54
55
|
iconNode: M,
|
|
55
|
-
...
|
|
56
|
-
},
|
|
56
|
+
...A
|
|
57
|
+
}, s) => F(
|
|
57
58
|
"svg",
|
|
58
59
|
{
|
|
59
|
-
ref:
|
|
60
|
-
...
|
|
60
|
+
ref: s,
|
|
61
|
+
...De,
|
|
61
62
|
width: r,
|
|
62
63
|
height: r,
|
|
63
64
|
stroke: n,
|
|
64
65
|
strokeWidth: u ? Number(l) * 24 / Number(r) : l,
|
|
65
|
-
className:
|
|
66
|
-
...!g && !
|
|
67
|
-
...
|
|
66
|
+
className: P("lucide", C),
|
|
67
|
+
...!g && !_e(A) && { "aria-hidden": "true" },
|
|
68
|
+
...A
|
|
68
69
|
},
|
|
69
70
|
[
|
|
70
|
-
...M.map(([
|
|
71
|
+
...M.map(([b, L]) => F(b, L)),
|
|
71
72
|
...Array.isArray(g) ? g : [g]
|
|
72
73
|
]
|
|
73
74
|
)
|
|
@@ -79,19 +80,19 @@ const _e = Q(
|
|
|
79
80
|
* See the LICENSE file in the root directory of this source tree.
|
|
80
81
|
*/
|
|
81
82
|
const z = (n, r) => {
|
|
82
|
-
const l =
|
|
83
|
-
({ className: u, ...C }, g) =>
|
|
83
|
+
const l = X(
|
|
84
|
+
({ className: u, ...C }, g) => F(Te, {
|
|
84
85
|
ref: g,
|
|
85
86
|
iconNode: r,
|
|
86
|
-
className:
|
|
87
|
-
`lucide-${
|
|
87
|
+
className: P(
|
|
88
|
+
`lucide-${Be(G(n))}`,
|
|
88
89
|
`lucide-${n}`,
|
|
89
90
|
u
|
|
90
91
|
),
|
|
91
92
|
...C
|
|
92
93
|
})
|
|
93
94
|
);
|
|
94
|
-
return l.displayName =
|
|
95
|
+
return l.displayName = G(n), l;
|
|
95
96
|
};
|
|
96
97
|
/**
|
|
97
98
|
* @license lucide-react v0.525.0 - ISC
|
|
@@ -99,21 +100,21 @@ const z = (n, r) => {
|
|
|
99
100
|
* This source code is licensed under the ISC license.
|
|
100
101
|
* See the LICENSE file in the root directory of this source tree.
|
|
101
102
|
*/
|
|
102
|
-
const
|
|
103
|
+
const Me = [["path", { d: "m6 9 6 6 6-6", key: "qrunsl" }]], N = z("chevron-down", Me);
|
|
103
104
|
/**
|
|
104
105
|
* @license lucide-react v0.525.0 - ISC
|
|
105
106
|
*
|
|
106
107
|
* This source code is licensed under the ISC license.
|
|
107
108
|
* See the LICENSE file in the root directory of this source tree.
|
|
108
109
|
*/
|
|
109
|
-
const
|
|
110
|
+
const Le = [["path", { d: "m18 15-6-6-6 6", key: "153udz" }]], J = z("chevron-up", Le);
|
|
110
111
|
/**
|
|
111
112
|
* @license lucide-react v0.525.0 - ISC
|
|
112
113
|
*
|
|
113
114
|
* This source code is licensed under the ISC license.
|
|
114
115
|
* See the LICENSE file in the root directory of this source tree.
|
|
115
116
|
*/
|
|
116
|
-
const
|
|
117
|
+
const Re = [
|
|
117
118
|
[
|
|
118
119
|
"path",
|
|
119
120
|
{
|
|
@@ -130,14 +131,14 @@ const Te = [
|
|
|
130
131
|
}
|
|
131
132
|
],
|
|
132
133
|
["path", { d: "m2 2 20 20", key: "1ooewy" }]
|
|
133
|
-
],
|
|
134
|
+
], We = z("eye-off", Re);
|
|
134
135
|
/**
|
|
135
136
|
* @license lucide-react v0.525.0 - ISC
|
|
136
137
|
*
|
|
137
138
|
* This source code is licensed under the ISC license.
|
|
138
139
|
* See the LICENSE file in the root directory of this source tree.
|
|
139
140
|
*/
|
|
140
|
-
const
|
|
141
|
+
const Ee = [
|
|
141
142
|
[
|
|
142
143
|
"path",
|
|
143
144
|
{
|
|
@@ -146,24 +147,24 @@ const Re = [
|
|
|
146
147
|
}
|
|
147
148
|
],
|
|
148
149
|
["circle", { cx: "12", cy: "12", r: "3", key: "1v7zrd" }]
|
|
149
|
-
],
|
|
150
|
+
], $e = z("eye", Ee);
|
|
150
151
|
/**
|
|
151
152
|
* @license lucide-react v0.525.0 - ISC
|
|
152
153
|
*
|
|
153
154
|
* This source code is licensed under the ISC license.
|
|
154
155
|
* See the LICENSE file in the root directory of this source tree.
|
|
155
156
|
*/
|
|
156
|
-
const
|
|
157
|
+
const Ne = [
|
|
157
158
|
["path", { d: "m21 21-4.34-4.34", key: "14j7rj" }],
|
|
158
159
|
["circle", { cx: "11", cy: "11", r: "8", key: "4ej97u" }]
|
|
159
|
-
],
|
|
160
|
+
], Q = z("search", Ne);
|
|
160
161
|
/**
|
|
161
162
|
* @license lucide-react v0.525.0 - ISC
|
|
162
163
|
*
|
|
163
164
|
* This source code is licensed under the ISC license.
|
|
164
165
|
* See the LICENSE file in the root directory of this source tree.
|
|
165
166
|
*/
|
|
166
|
-
const
|
|
167
|
+
const Fe = [
|
|
167
168
|
[
|
|
168
169
|
"path",
|
|
169
170
|
{
|
|
@@ -172,73 +173,74 @@ const Ee = [
|
|
|
172
173
|
}
|
|
173
174
|
],
|
|
174
175
|
["circle", { cx: "12", cy: "12", r: "3", key: "1v7zrd" }]
|
|
175
|
-
],
|
|
176
|
+
], Ve = z("settings", Fe);
|
|
176
177
|
let v = "";
|
|
177
|
-
const
|
|
178
|
+
const Ze = ({
|
|
178
179
|
data: n = [],
|
|
179
180
|
columnTitles: r = {},
|
|
180
181
|
rowsPerPage: l = 19,
|
|
181
182
|
title: u = "Data Table",
|
|
182
183
|
onRowClick: C,
|
|
183
184
|
hiddenColumns: g = [],
|
|
184
|
-
defaultSort: M = { key: "", direction: "asc" }
|
|
185
|
+
defaultSort: M = { key: "", direction: "asc" },
|
|
186
|
+
extraActions: A
|
|
185
187
|
}) => {
|
|
186
|
-
const [
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
}, [
|
|
190
|
-
const
|
|
188
|
+
const [s, b] = y(1), [, L] = y(""), [h, ee] = y(M), [w, _] = y(/* @__PURE__ */ new Set()), [R, V] = y(/* @__PURE__ */ new Set()), [U, oe] = y(!1), [O, te] = y(!1), d = T(() => n.length === 0 ? [] : Object.keys(n[0]).filter((e) => !g.includes(e)), [n]);
|
|
189
|
+
ze.useEffect(() => {
|
|
190
|
+
d.length > 0 && (V(new Set(d)), _(new Set(d)));
|
|
191
|
+
}, [d]);
|
|
192
|
+
const W = T(() => {
|
|
191
193
|
if (!v) return n;
|
|
192
|
-
const e = w.size > 0 ? w : new Set(
|
|
193
|
-
return n.filter((t) => Array.from(e).some((
|
|
194
|
-
const f = t[
|
|
194
|
+
const e = w.size > 0 ? w : new Set(d);
|
|
195
|
+
return n.filter((t) => Array.from(e).some((c) => {
|
|
196
|
+
const f = t[c];
|
|
195
197
|
return f && f.toString().toLowerCase().includes(v.toLowerCase());
|
|
196
198
|
}));
|
|
197
|
-
}, [n, v, w,
|
|
199
|
+
}, [n, v, w, d]), x = T(() => h.key ? [...W].sort((e, t) => e[h.key] < t[h.key] ? h.direction === "asc" ? -1 : 1 : e[h.key] > t[h.key] ? h.direction === "asc" ? 1 : -1 : 0) : W, [W, h]), D = d.filter((e) => R.has(e)), ne = () => {
|
|
198
200
|
if (!Array.isArray(x) || x.length === 0) return;
|
|
199
|
-
const e =
|
|
200
|
-
const
|
|
201
|
-
return /[",\n]/.test(
|
|
201
|
+
const e = D.map((S) => r[S] || S), t = (S) => {
|
|
202
|
+
const B = String(S ?? "");
|
|
203
|
+
return /[",\n]/.test(B) ? `"${B.replace(/"/g, '""')}"` : B;
|
|
202
204
|
}, f = [
|
|
203
205
|
e.join(","),
|
|
204
206
|
// header row
|
|
205
|
-
...x.map((S) =>
|
|
207
|
+
...x.map((S) => D.map((B) => t(S[B])).join(","))
|
|
206
208
|
].join(`
|
|
207
|
-
`),
|
|
208
|
-
|
|
209
|
-
},
|
|
210
|
-
const e = (
|
|
209
|
+
`), ve = new Blob([f], { type: "text/csv;charset=utf-8;" }), j = document.createElement("a");
|
|
210
|
+
j.href = URL.createObjectURL(ve), j.download = "data.csv", document.body.appendChild(j), j.click(), document.body.removeChild(j);
|
|
211
|
+
}, re = T(() => {
|
|
212
|
+
const e = (s - 1) * l;
|
|
211
213
|
return x.slice(e, e + l);
|
|
212
|
-
}, [x,
|
|
213
|
-
|
|
214
|
+
}, [x, s, l]), p = Math.ceil(x.length / l), ie = (e) => {
|
|
215
|
+
ee((t) => ({
|
|
214
216
|
key: e,
|
|
215
217
|
direction: t.key === e && t.direction === "asc" ? "desc" : "asc"
|
|
216
218
|
}));
|
|
217
|
-
},
|
|
218
|
-
|
|
219
|
-
const
|
|
220
|
-
return
|
|
219
|
+
}, se = (e) => {
|
|
220
|
+
_((t) => {
|
|
221
|
+
const c = new Set(t);
|
|
222
|
+
return c.has(e) ? c.delete(e) : c.add(e), c;
|
|
221
223
|
});
|
|
222
|
-
},
|
|
223
|
-
w.size ===
|
|
224
|
-
},
|
|
224
|
+
}, ae = () => {
|
|
225
|
+
w.size === d.length ? _(/* @__PURE__ */ new Set()) : _(new Set(d));
|
|
226
|
+
}, ce = (e) => {
|
|
225
227
|
V((t) => {
|
|
226
|
-
const
|
|
227
|
-
return
|
|
228
|
+
const c = new Set(t);
|
|
229
|
+
return c.has(e) ? c.delete(e) : c.add(e), c;
|
|
228
230
|
});
|
|
229
|
-
},
|
|
231
|
+
}, le = (e) => {
|
|
230
232
|
v = e;
|
|
231
|
-
},
|
|
232
|
-
|
|
233
|
-
},
|
|
233
|
+
}, H = () => {
|
|
234
|
+
L(v);
|
|
235
|
+
}, m = {
|
|
234
236
|
thActive: {
|
|
235
|
-
backgroundColor:
|
|
236
|
-
color:
|
|
237
|
+
backgroundColor: I.colors.green,
|
|
238
|
+
color: I.colors.white
|
|
237
239
|
},
|
|
238
240
|
paginationButtonActive: {
|
|
239
|
-
backgroundColor:
|
|
240
|
-
color:
|
|
241
|
-
borderColor:
|
|
241
|
+
backgroundColor: I.colors.green,
|
|
242
|
+
color: I.colors.white,
|
|
243
|
+
borderColor: I.colors.green
|
|
242
244
|
},
|
|
243
245
|
paginationButtonDisabled: {
|
|
244
246
|
opacity: 0.5,
|
|
@@ -250,7 +252,7 @@ const qe = ({
|
|
|
250
252
|
textAlign: "center",
|
|
251
253
|
marginTop: "10px"
|
|
252
254
|
}
|
|
253
|
-
},
|
|
255
|
+
}, de = i("div")({
|
|
254
256
|
backgroundColor: "#ffffff",
|
|
255
257
|
borderRadius: "8px",
|
|
256
258
|
boxShadow: "0 2px 10px rgba(0, 0, 0, 0.1)",
|
|
@@ -258,7 +260,7 @@ const qe = ({
|
|
|
258
260
|
fontFamily: "Arial, sans-serif",
|
|
259
261
|
maxWidth: "100%",
|
|
260
262
|
overflow: "auto"
|
|
261
|
-
}),
|
|
263
|
+
}), pe = i("div")({
|
|
262
264
|
display: "flex",
|
|
263
265
|
flexDirection: "column",
|
|
264
266
|
justifyContent: "space-between",
|
|
@@ -266,29 +268,29 @@ const qe = ({
|
|
|
266
268
|
marginBottom: "20px",
|
|
267
269
|
flexWrap: "wrap",
|
|
268
270
|
gap: "9px"
|
|
269
|
-
}),
|
|
271
|
+
}), he = i("div")({
|
|
270
272
|
display: "flex",
|
|
271
273
|
justifyContent: "space-between",
|
|
272
274
|
width: "100%",
|
|
273
275
|
alignItems: "center"
|
|
274
|
-
}),
|
|
276
|
+
}), fe = i("h2")({
|
|
275
277
|
fontSize: "24px",
|
|
276
278
|
fontWeight: "bold",
|
|
277
279
|
color: "#000000",
|
|
278
280
|
margin: 0
|
|
279
|
-
}),
|
|
281
|
+
}), ue = i("div")({
|
|
280
282
|
display: "flex",
|
|
281
283
|
justifyContent: "flex-end",
|
|
282
284
|
width: "100%",
|
|
283
285
|
gap: "15px",
|
|
284
286
|
alignItems: "center",
|
|
285
287
|
flexWrap: "wrap"
|
|
286
|
-
}),
|
|
288
|
+
}), xe = i("div")({
|
|
287
289
|
position: "relative",
|
|
288
290
|
display: "flex",
|
|
289
291
|
alignItems: "center",
|
|
290
292
|
flexGrow: 1
|
|
291
|
-
}),
|
|
293
|
+
}), ge = i(Q)({
|
|
292
294
|
position: "absolute",
|
|
293
295
|
left: "13px",
|
|
294
296
|
top: "10px",
|
|
@@ -300,7 +302,7 @@ const qe = ({
|
|
|
300
302
|
cursor: "pointer",
|
|
301
303
|
color: "#009200"
|
|
302
304
|
}
|
|
303
|
-
}),
|
|
305
|
+
}), be = i("input")({
|
|
304
306
|
padding: "10px 15px 10px 40px",
|
|
305
307
|
border: "2px solid #e0e0e0",
|
|
306
308
|
borderRadius: "25px",
|
|
@@ -314,7 +316,7 @@ const qe = ({
|
|
|
314
316
|
borderColor: "#009200",
|
|
315
317
|
boxShadow: "0 0 0 3px rgba(0, 146, 0, 0.1)"
|
|
316
318
|
}
|
|
317
|
-
}),
|
|
319
|
+
}), q = i("button")({
|
|
318
320
|
padding: "10px 15px",
|
|
319
321
|
border: "2px solid #009200",
|
|
320
322
|
borderRadius: "6px",
|
|
@@ -334,7 +336,7 @@ const qe = ({
|
|
|
334
336
|
transform: "translateY(-1px)",
|
|
335
337
|
boxShadow: "0 4px 12px rgba(0, 146, 0, 0.3)"
|
|
336
338
|
}
|
|
337
|
-
}),
|
|
339
|
+
}), K = i("div")({
|
|
338
340
|
position: "absolute",
|
|
339
341
|
top: "100%",
|
|
340
342
|
right: 0,
|
|
@@ -347,7 +349,7 @@ const qe = ({
|
|
|
347
349
|
minWidth: "200px",
|
|
348
350
|
maxHeight: "300px",
|
|
349
351
|
overflowY: "auto"
|
|
350
|
-
}),
|
|
352
|
+
}), E = i("div")({
|
|
351
353
|
padding: "12px 16px",
|
|
352
354
|
display: "flex",
|
|
353
355
|
alignItems: "center",
|
|
@@ -360,18 +362,18 @@ const qe = ({
|
|
|
360
362
|
backgroundColor: "#f0f8f0",
|
|
361
363
|
color: "#005c00"
|
|
362
364
|
}
|
|
363
|
-
}), $ =
|
|
365
|
+
}), $ = i("input")({
|
|
364
366
|
width: "16px",
|
|
365
367
|
height: "16px",
|
|
366
368
|
accentColor: "#009200"
|
|
367
|
-
}),
|
|
369
|
+
}), Ce = i("table")({
|
|
368
370
|
width: "100%",
|
|
369
371
|
borderCollapse: "collapse",
|
|
370
372
|
backgroundColor: "#ffffff",
|
|
371
373
|
borderRadius: "8px",
|
|
372
374
|
overflow: "hidden",
|
|
373
375
|
boxShadow: "0 1px 3px rgba(0, 0, 0, 0.1)"
|
|
374
|
-
}),
|
|
376
|
+
}), me = i("th")({
|
|
375
377
|
backgroundColor: "#f8f9fa",
|
|
376
378
|
color: "#333333",
|
|
377
379
|
padding: "16px 12px",
|
|
@@ -388,16 +390,16 @@ const qe = ({
|
|
|
388
390
|
backgroundColor: "#e8f5e8",
|
|
389
391
|
color: "#005c00"
|
|
390
392
|
}
|
|
391
|
-
}), ye =
|
|
393
|
+
}), ye = i("td")({
|
|
392
394
|
padding: "14px 12px",
|
|
393
395
|
borderBottom: "1px solid #f0f0f0",
|
|
394
396
|
fontSize: "14px",
|
|
395
397
|
color: "#333333",
|
|
396
398
|
transition: "all 0.2s ease"
|
|
397
|
-
}),
|
|
399
|
+
}), we = i("span")({
|
|
398
400
|
marginLeft: "8px",
|
|
399
401
|
opacity: 0.6
|
|
400
|
-
}),
|
|
402
|
+
}), Y = i("tr")(({ interactableRow: e }) => ({
|
|
401
403
|
transition: "all 0.2s ease",
|
|
402
404
|
...e && {
|
|
403
405
|
"&:focus, &:hover, &:focus-within": {
|
|
@@ -405,13 +407,13 @@ const qe = ({
|
|
|
405
407
|
cursor: "pointer"
|
|
406
408
|
}
|
|
407
409
|
}
|
|
408
|
-
})),
|
|
410
|
+
})), ke = i("div")({
|
|
409
411
|
display: "flex",
|
|
410
412
|
justifyContent: "center",
|
|
411
413
|
alignItems: "center",
|
|
412
414
|
marginTop: "20px",
|
|
413
415
|
gap: "10px"
|
|
414
|
-
}), k =
|
|
416
|
+
}), k = i("button")({
|
|
415
417
|
padding: "8px 12px",
|
|
416
418
|
border: "1px solid #e0e0e0",
|
|
417
419
|
borderRadius: "4px",
|
|
@@ -430,51 +432,54 @@ const qe = ({
|
|
|
430
432
|
opacity: 0.5,
|
|
431
433
|
cursor: "not-allowed"
|
|
432
434
|
}
|
|
433
|
-
}),
|
|
435
|
+
}), Se = i("div")({
|
|
434
436
|
fontSize: "14px",
|
|
435
437
|
color: "#666666",
|
|
436
438
|
textAlign: "center",
|
|
437
439
|
marginTop: "10px"
|
|
438
|
-
}),
|
|
440
|
+
}), Z = i("span")({
|
|
439
441
|
padding: "8px 4px",
|
|
440
442
|
color: "#666666",
|
|
441
443
|
fontSize: "14px"
|
|
442
444
|
});
|
|
443
|
-
return /* @__PURE__ */
|
|
444
|
-
/* @__PURE__ */
|
|
445
|
-
/* @__PURE__ */
|
|
446
|
-
/* @__PURE__ */ o(
|
|
447
|
-
/* @__PURE__ */
|
|
445
|
+
return /* @__PURE__ */ a(de, { children: [
|
|
446
|
+
/* @__PURE__ */ a(pe, { children: [
|
|
447
|
+
/* @__PURE__ */ a(he, { children: [
|
|
448
|
+
/* @__PURE__ */ o(fe, { children: u }),
|
|
449
|
+
/* @__PURE__ */ a(je, { className: "jcTableExtraComponentsBox", gap: "9px", children: [
|
|
450
|
+
A && A,
|
|
451
|
+
/* @__PURE__ */ o(Ae, { onClick: ne, children: "Export to CSV" })
|
|
452
|
+
] })
|
|
448
453
|
] }),
|
|
449
|
-
/* @__PURE__ */
|
|
450
|
-
/* @__PURE__ */
|
|
451
|
-
/* @__PURE__ */ o(
|
|
454
|
+
/* @__PURE__ */ a(ue, { children: [
|
|
455
|
+
/* @__PURE__ */ a(xe, { children: [
|
|
456
|
+
/* @__PURE__ */ o(ge, { onClick: H }),
|
|
452
457
|
/* @__PURE__ */ o(
|
|
453
|
-
|
|
458
|
+
be,
|
|
454
459
|
{
|
|
455
460
|
type: "text",
|
|
456
461
|
placeholder: "Search...",
|
|
457
462
|
defaultValue: v,
|
|
458
|
-
onChange: (e) =>
|
|
463
|
+
onChange: (e) => le(e.target.value),
|
|
459
464
|
onKeyDown: (e) => {
|
|
460
|
-
e.key === "Enter" &&
|
|
465
|
+
e.key === "Enter" && H();
|
|
461
466
|
}
|
|
462
467
|
}
|
|
463
468
|
)
|
|
464
469
|
] }),
|
|
465
|
-
/* @__PURE__ */
|
|
466
|
-
/* @__PURE__ */
|
|
467
|
-
/* @__PURE__ */ o(
|
|
470
|
+
/* @__PURE__ */ a("div", { style: { position: "relative" }, children: [
|
|
471
|
+
/* @__PURE__ */ a(q, { onClick: () => te(!O), children: [
|
|
472
|
+
/* @__PURE__ */ o(Q, { size: 16 }),
|
|
468
473
|
"Fields",
|
|
469
|
-
/* @__PURE__ */ o(
|
|
474
|
+
/* @__PURE__ */ o(N, { size: 16 })
|
|
470
475
|
] }),
|
|
471
|
-
|
|
472
|
-
/* @__PURE__ */
|
|
476
|
+
O && /* @__PURE__ */ a(K, { children: [
|
|
477
|
+
/* @__PURE__ */ a(E, { onClick: ae, children: [
|
|
473
478
|
/* @__PURE__ */ o(
|
|
474
479
|
$,
|
|
475
480
|
{
|
|
476
481
|
type: "checkbox",
|
|
477
|
-
checked: w.size ===
|
|
482
|
+
checked: w.size === d.length,
|
|
478
483
|
onChange: () => {
|
|
479
484
|
}
|
|
480
485
|
}
|
|
@@ -482,62 +487,62 @@ const qe = ({
|
|
|
482
487
|
/* @__PURE__ */ o("span", { style: { fontWeight: "bold" }, children: "All" })
|
|
483
488
|
] }),
|
|
484
489
|
/* @__PURE__ */ o("div", { style: { height: "1px", backgroundColor: "#e0e0e0", margin: "4px 0" } }),
|
|
485
|
-
|
|
490
|
+
d.map((e) => /* @__PURE__ */ a(E, { onClick: () => se(e), children: [
|
|
486
491
|
/* @__PURE__ */ o($, { type: "checkbox", checked: w.has(e), onChange: () => {
|
|
487
492
|
} }),
|
|
488
493
|
/* @__PURE__ */ o("span", { children: r[e] || e })
|
|
489
494
|
] }, e))
|
|
490
495
|
] })
|
|
491
496
|
] }),
|
|
492
|
-
/* @__PURE__ */
|
|
493
|
-
/* @__PURE__ */
|
|
494
|
-
/* @__PURE__ */ o(
|
|
497
|
+
/* @__PURE__ */ a("div", { style: { position: "relative" }, children: [
|
|
498
|
+
/* @__PURE__ */ a(q, { onClick: () => oe(!U), children: [
|
|
499
|
+
/* @__PURE__ */ o(Ve, { size: 16 }),
|
|
495
500
|
"Columns",
|
|
496
|
-
/* @__PURE__ */ o(
|
|
501
|
+
/* @__PURE__ */ o(N, { size: 16 })
|
|
497
502
|
] }),
|
|
498
|
-
|
|
499
|
-
/* @__PURE__ */ o($, { type: "checkbox", checked:
|
|
503
|
+
U && /* @__PURE__ */ o(K, { children: d.map((e) => /* @__PURE__ */ a(E, { onClick: () => ce(e), children: [
|
|
504
|
+
/* @__PURE__ */ o($, { type: "checkbox", checked: R.has(e), onChange: () => {
|
|
500
505
|
} }),
|
|
501
|
-
|
|
506
|
+
R.has(e) ? /* @__PURE__ */ o($e, { size: 16 }) : /* @__PURE__ */ o(We, { size: 16 }),
|
|
502
507
|
/* @__PURE__ */ o("span", { children: r[e] || e })
|
|
503
508
|
] }, e)) })
|
|
504
509
|
] })
|
|
505
510
|
] })
|
|
506
511
|
] }),
|
|
507
|
-
/* @__PURE__ */
|
|
508
|
-
/* @__PURE__ */ o("thead", { children: /* @__PURE__ */ o(
|
|
509
|
-
|
|
512
|
+
/* @__PURE__ */ a(Ce, { children: [
|
|
513
|
+
/* @__PURE__ */ o("thead", { children: /* @__PURE__ */ o(Y, { interactableRow: !1, children: D.map((e) => /* @__PURE__ */ a(
|
|
514
|
+
me,
|
|
510
515
|
{
|
|
511
|
-
style:
|
|
512
|
-
onClick: () =>
|
|
516
|
+
style: h.key === e ? m.thActive : {},
|
|
517
|
+
onClick: () => ie(e),
|
|
513
518
|
children: [
|
|
514
519
|
r[e] || e,
|
|
515
|
-
/* @__PURE__ */ o(
|
|
520
|
+
/* @__PURE__ */ o(we, { children: h.key === e ? h.direction === "asc" ? /* @__PURE__ */ o(J, { size: 16 }) : /* @__PURE__ */ o(N, { size: 16 }) : /* @__PURE__ */ o(J, { size: 16, style: { opacity: 0.313 } }) })
|
|
516
521
|
]
|
|
517
522
|
},
|
|
518
523
|
e
|
|
519
524
|
)) }) }),
|
|
520
|
-
/* @__PURE__ */ o("tbody", { children:
|
|
525
|
+
/* @__PURE__ */ o("tbody", { children: re.map((e, t) => /* @__PURE__ */ o(Y, { onClick: () => C && C(e), interactableRow: !!C, children: D.map((c) => /* @__PURE__ */ o(ye, { children: e[c] }, c)) }, t)) })
|
|
521
526
|
] }),
|
|
522
|
-
/* @__PURE__ */
|
|
527
|
+
/* @__PURE__ */ a(ke, { children: [
|
|
523
528
|
/* @__PURE__ */ o(
|
|
524
529
|
k,
|
|
525
530
|
{
|
|
526
|
-
style:
|
|
527
|
-
onClick: () => b(Math.max(1,
|
|
528
|
-
disabled:
|
|
531
|
+
style: s === 1 ? m.paginationButtonDisabled : {},
|
|
532
|
+
onClick: () => b(Math.max(1, s - 1)),
|
|
533
|
+
disabled: s === 1,
|
|
529
534
|
children: "Previous"
|
|
530
535
|
}
|
|
531
536
|
),
|
|
532
537
|
(() => {
|
|
533
538
|
const e = [];
|
|
534
|
-
if (
|
|
535
|
-
for (let t = 1; t <=
|
|
539
|
+
if (p <= 5)
|
|
540
|
+
for (let t = 1; t <= p; t++)
|
|
536
541
|
e.push(
|
|
537
542
|
/* @__PURE__ */ o(
|
|
538
543
|
k,
|
|
539
544
|
{
|
|
540
|
-
style:
|
|
545
|
+
style: s === t ? m.paginationButtonActive : {},
|
|
541
546
|
onClick: () => b(t),
|
|
542
547
|
children: t
|
|
543
548
|
},
|
|
@@ -549,35 +554,35 @@ const qe = ({
|
|
|
549
554
|
/* @__PURE__ */ o(
|
|
550
555
|
k,
|
|
551
556
|
{
|
|
552
|
-
style:
|
|
557
|
+
style: s === 1 ? m.paginationButtonActive : {},
|
|
553
558
|
onClick: () => b(1),
|
|
554
559
|
children: "1"
|
|
555
560
|
},
|
|
556
561
|
1
|
|
557
562
|
)
|
|
558
|
-
),
|
|
559
|
-
const t = Math.max(2,
|
|
560
|
-
for (let f = t; f <=
|
|
563
|
+
), s > 3 && e.push(/* @__PURE__ */ o(Z, { children: "..." }, "ellipsis1"));
|
|
564
|
+
const t = Math.max(2, s - 1), c = Math.min(p - 1, s + 1);
|
|
565
|
+
for (let f = t; f <= c; f++)
|
|
561
566
|
e.push(
|
|
562
567
|
/* @__PURE__ */ o(
|
|
563
568
|
k,
|
|
564
569
|
{
|
|
565
|
-
style:
|
|
570
|
+
style: s === f ? m.paginationButtonActive : {},
|
|
566
571
|
onClick: () => b(f),
|
|
567
572
|
children: f
|
|
568
573
|
},
|
|
569
574
|
f
|
|
570
575
|
)
|
|
571
576
|
);
|
|
572
|
-
|
|
577
|
+
s < p - 2 && e.push(/* @__PURE__ */ o(Z, { children: "..." }, "ellipsis2")), p > 1 && e.push(
|
|
573
578
|
/* @__PURE__ */ o(
|
|
574
579
|
k,
|
|
575
580
|
{
|
|
576
|
-
style:
|
|
577
|
-
onClick: () => b(
|
|
578
|
-
children:
|
|
581
|
+
style: s === p ? m.paginationButtonActive : {},
|
|
582
|
+
onClick: () => b(p),
|
|
583
|
+
children: p
|
|
579
584
|
},
|
|
580
|
-
|
|
585
|
+
p
|
|
581
586
|
)
|
|
582
587
|
);
|
|
583
588
|
}
|
|
@@ -586,19 +591,19 @@ const qe = ({
|
|
|
586
591
|
/* @__PURE__ */ o(
|
|
587
592
|
k,
|
|
588
593
|
{
|
|
589
|
-
style:
|
|
590
|
-
onClick: () => b(Math.min(
|
|
591
|
-
disabled:
|
|
594
|
+
style: s === p ? m.paginationButtonDisabled : {},
|
|
595
|
+
onClick: () => b(Math.min(p, s + 1)),
|
|
596
|
+
disabled: s === p,
|
|
592
597
|
children: "Next"
|
|
593
598
|
}
|
|
594
599
|
)
|
|
595
600
|
] }),
|
|
596
|
-
/* @__PURE__ */
|
|
601
|
+
/* @__PURE__ */ a(Se, { children: [
|
|
597
602
|
"Showing ",
|
|
598
|
-
Math.min((
|
|
603
|
+
Math.min((s - 1) * l + 1, x.length),
|
|
599
604
|
" to",
|
|
600
605
|
" ",
|
|
601
|
-
Math.min(
|
|
606
|
+
Math.min(s * l, x.length),
|
|
602
607
|
" of ",
|
|
603
608
|
x.length,
|
|
604
609
|
" entries"
|
|
@@ -606,5 +611,5 @@ const qe = ({
|
|
|
606
611
|
] });
|
|
607
612
|
};
|
|
608
613
|
export {
|
|
609
|
-
|
|
614
|
+
Ze as default
|
|
610
615
|
};
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "jcicl",
|
|
3
3
|
"private": false,
|
|
4
|
-
"version": "0.0.
|
|
4
|
+
"version": "0.0.325",
|
|
5
5
|
"description": "Component library for the websites of Johnson County Iowa",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"homepage": "https://devops.jc.net/JCIT/Business%20Solutions%20Delivery/_git/JCComponentLibrary?path=%2FREADME.md&version=GBmaster",
|