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