jcicl 0.0.299 → 0.0.301
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 +230 -207
- 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 y, 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: m = "",
|
|
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", m),
|
|
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, ...m }, 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
|
+
...m
|
|
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 We = [
|
|
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", We);
|
|
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 Re = [
|
|
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", Re);
|
|
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: m,
|
|
182
|
+
hiddenColumns: b = []
|
|
182
183
|
}) => {
|
|
183
|
-
const [
|
|
184
|
-
|
|
185
|
-
p.length > 0 && (
|
|
184
|
+
const [s, x] = y(1), [, D] = y(""), [d, M] = y({ key: "", direction: "asc" }), [w, B] = y(/* @__PURE__ */ new Set()), [T, N] = y(/* @__PURE__ */ new Set()), [V, X] = y(!1), [F, P] = y(!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 f = o[a];
|
|
193
|
+
return f && f.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
|
+
}, f = [
|
|
201
|
+
e.join(","),
|
|
202
|
+
// header row
|
|
203
|
+
...g.map((S) => I.map((j) => o(S[j])).join(","))
|
|
204
|
+
].join(`
|
|
205
|
+
`), we = new Blob([f], { 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]), h = 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
|
+
}, C = {
|
|
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
|
+
}), he = i("div")({
|
|
264
285
|
position: "relative",
|
|
265
286
|
display: "flex",
|
|
266
287
|
alignItems: "center",
|
|
267
|
-
|
|
268
|
-
}),
|
|
288
|
+
flexGrow: 1
|
|
289
|
+
}), fe = 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
|
+
}), W = 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
|
+
}), R = 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,28 @@ 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")({
|
|
377
399
|
transition: "all 0.2s ease",
|
|
378
400
|
cursor: "pointer",
|
|
379
401
|
"&:focus, &:hover, &:focus-within": {
|
|
380
402
|
backgroundColor: "#f8fff8"
|
|
381
403
|
}
|
|
382
|
-
}),
|
|
404
|
+
}), ye = i("div")({
|
|
383
405
|
display: "flex",
|
|
384
406
|
justifyContent: "center",
|
|
385
407
|
alignItems: "center",
|
|
386
408
|
marginTop: "20px",
|
|
387
409
|
gap: "10px"
|
|
388
|
-
}),
|
|
410
|
+
}), k = i("button")({
|
|
389
411
|
padding: "8px 12px",
|
|
390
412
|
border: "1px solid #e0e0e0",
|
|
391
413
|
borderRadius: "4px",
|
|
@@ -404,150 +426,151 @@ const We = ({
|
|
|
404
426
|
opacity: 0.5,
|
|
405
427
|
cursor: "not-allowed"
|
|
406
428
|
}
|
|
407
|
-
}),
|
|
429
|
+
}), me = i("div")({
|
|
408
430
|
fontSize: "14px",
|
|
409
431
|
color: "#666666",
|
|
410
432
|
textAlign: "center",
|
|
411
433
|
marginTop: "10px"
|
|
412
|
-
}),
|
|
434
|
+
}), K = i("span")({
|
|
413
435
|
padding: "8px 4px",
|
|
414
436
|
color: "#666666",
|
|
415
437
|
fontSize: "14px"
|
|
416
438
|
});
|
|
417
|
-
return /* @__PURE__ */
|
|
418
|
-
/* @__PURE__ */
|
|
419
|
-
/* @__PURE__ */
|
|
420
|
-
|
|
421
|
-
/* @__PURE__ */
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
439
|
+
return /* @__PURE__ */ c(ae, { children: [
|
|
440
|
+
/* @__PURE__ */ c(ce, { children: [
|
|
441
|
+
/* @__PURE__ */ c(le, { children: [
|
|
442
|
+
/* @__PURE__ */ t(de, { children: u }),
|
|
443
|
+
/* @__PURE__ */ t(Se, { onClick: ee, children: "Export to CSV" })
|
|
444
|
+
] }),
|
|
445
|
+
/* @__PURE__ */ c(pe, { children: [
|
|
446
|
+
/* @__PURE__ */ c(he, { children: [
|
|
447
|
+
/* @__PURE__ */ t(fe, { onClick: U }),
|
|
448
|
+
/* @__PURE__ */ t(
|
|
449
|
+
ue,
|
|
450
|
+
{
|
|
451
|
+
type: "text",
|
|
452
|
+
placeholder: "Search...",
|
|
453
|
+
defaultValue: v,
|
|
454
|
+
onChange: (e) => se(e.target.value),
|
|
455
|
+
onKeyDown: (e) => {
|
|
456
|
+
e.key === "Enter" && U();
|
|
434
457
|
}
|
|
435
|
-
|
|
458
|
+
}
|
|
459
|
+
)
|
|
460
|
+
] }),
|
|
461
|
+
/* @__PURE__ */ c("div", { style: { position: "relative" }, children: [
|
|
462
|
+
/* @__PURE__ */ c(O, { onClick: () => P(!F), children: [
|
|
463
|
+
/* @__PURE__ */ t(G, { size: 16 }),
|
|
464
|
+
"Fields",
|
|
465
|
+
/* @__PURE__ */ t($, { size: 16 })
|
|
436
466
|
] }),
|
|
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
|
-
}
|
|
467
|
+
F && /* @__PURE__ */ c(H, { children: [
|
|
468
|
+
/* @__PURE__ */ c(W, { onClick: re, children: [
|
|
469
|
+
/* @__PURE__ */ t(
|
|
470
|
+
R,
|
|
471
|
+
{
|
|
472
|
+
type: "checkbox",
|
|
473
|
+
checked: w.size === p.length,
|
|
474
|
+
onChange: () => {
|
|
452
475
|
}
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
] })
|
|
476
|
+
}
|
|
477
|
+
),
|
|
478
|
+
/* @__PURE__ */ t("span", { style: { fontWeight: "bold" }, children: "All" })
|
|
479
|
+
] }),
|
|
480
|
+
/* @__PURE__ */ t("div", { style: { height: "1px", backgroundColor: "#e0e0e0", margin: "4px 0" } }),
|
|
481
|
+
p.map((e) => /* @__PURE__ */ c(W, { onClick: () => ne(e), children: [
|
|
482
|
+
/* @__PURE__ */ t(R, { type: "checkbox", checked: w.has(e), onChange: () => {
|
|
483
|
+
} }),
|
|
484
|
+
/* @__PURE__ */ t("span", { children: r[e] || e })
|
|
485
|
+
] }, e))
|
|
463
486
|
] })
|
|
464
487
|
] }),
|
|
465
|
-
/* @__PURE__ */
|
|
466
|
-
/* @__PURE__ */
|
|
467
|
-
/* @__PURE__ */
|
|
488
|
+
/* @__PURE__ */ c("div", { style: { position: "relative" }, children: [
|
|
489
|
+
/* @__PURE__ */ c(O, { onClick: () => X(!V), children: [
|
|
490
|
+
/* @__PURE__ */ t($e, { size: 16 }),
|
|
468
491
|
"Columns",
|
|
469
|
-
/* @__PURE__ */
|
|
492
|
+
/* @__PURE__ */ t($, { size: 16 })
|
|
470
493
|
] }),
|
|
471
|
-
|
|
472
|
-
/* @__PURE__ */
|
|
494
|
+
V && /* @__PURE__ */ t(H, { children: p.map((e) => /* @__PURE__ */ c(W, { onClick: () => ie(e), children: [
|
|
495
|
+
/* @__PURE__ */ t(R, { type: "checkbox", checked: T.has(e), onChange: () => {
|
|
473
496
|
} }),
|
|
474
|
-
|
|
475
|
-
/* @__PURE__ */
|
|
497
|
+
T.has(e) ? /* @__PURE__ */ t(Le, { size: 16 }) : /* @__PURE__ */ t(Me, { size: 16 }),
|
|
498
|
+
/* @__PURE__ */ t("span", { children: r[e] || e })
|
|
476
499
|
] }, e)) })
|
|
477
500
|
] })
|
|
478
501
|
] })
|
|
479
502
|
] }),
|
|
480
|
-
/* @__PURE__ */
|
|
481
|
-
/* @__PURE__ */
|
|
482
|
-
|
|
503
|
+
/* @__PURE__ */ c(xe, { children: [
|
|
504
|
+
/* @__PURE__ */ t("thead", { children: /* @__PURE__ */ t(q, { children: I.map((e) => /* @__PURE__ */ c(
|
|
505
|
+
ge,
|
|
483
506
|
{
|
|
484
|
-
style: d.key === e ?
|
|
485
|
-
onClick: () =>
|
|
507
|
+
style: d.key === e ? C.thActive : {},
|
|
508
|
+
onClick: () => oe(e),
|
|
486
509
|
children: [
|
|
487
510
|
r[e] || e,
|
|
488
|
-
/* @__PURE__ */
|
|
511
|
+
/* @__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
512
|
]
|
|
490
513
|
},
|
|
491
514
|
e
|
|
492
515
|
)) }) }),
|
|
493
|
-
/* @__PURE__ */
|
|
516
|
+
/* @__PURE__ */ t("tbody", { children: te.map((e, o) => /* @__PURE__ */ t(q, { onClick: () => m && m(e), children: I.map((a) => /* @__PURE__ */ t(be, { children: e[a] }, a)) }, o)) })
|
|
494
517
|
] }),
|
|
495
|
-
/* @__PURE__ */
|
|
496
|
-
/* @__PURE__ */
|
|
497
|
-
|
|
518
|
+
/* @__PURE__ */ c(ye, { children: [
|
|
519
|
+
/* @__PURE__ */ t(
|
|
520
|
+
k,
|
|
498
521
|
{
|
|
499
|
-
style:
|
|
500
|
-
onClick: () =>
|
|
501
|
-
disabled:
|
|
522
|
+
style: s === 1 ? C.paginationButtonDisabled : {},
|
|
523
|
+
onClick: () => x(Math.max(1, s - 1)),
|
|
524
|
+
disabled: s === 1,
|
|
502
525
|
children: "Previous"
|
|
503
526
|
}
|
|
504
527
|
),
|
|
505
528
|
(() => {
|
|
506
529
|
const e = [];
|
|
507
530
|
if (h <= 5)
|
|
508
|
-
for (let
|
|
531
|
+
for (let o = 1; o <= h; o++)
|
|
509
532
|
e.push(
|
|
510
|
-
/* @__PURE__ */
|
|
511
|
-
|
|
533
|
+
/* @__PURE__ */ t(
|
|
534
|
+
k,
|
|
512
535
|
{
|
|
513
|
-
style:
|
|
514
|
-
onClick: () =>
|
|
515
|
-
children:
|
|
536
|
+
style: s === o ? C.paginationButtonActive : {},
|
|
537
|
+
onClick: () => x(o),
|
|
538
|
+
children: o
|
|
516
539
|
},
|
|
517
|
-
|
|
540
|
+
o
|
|
518
541
|
)
|
|
519
542
|
);
|
|
520
543
|
else {
|
|
521
544
|
e.push(
|
|
522
|
-
/* @__PURE__ */
|
|
523
|
-
|
|
545
|
+
/* @__PURE__ */ t(
|
|
546
|
+
k,
|
|
524
547
|
{
|
|
525
|
-
style:
|
|
526
|
-
onClick: () =>
|
|
548
|
+
style: s === 1 ? C.paginationButtonActive : {},
|
|
549
|
+
onClick: () => x(1),
|
|
527
550
|
children: "1"
|
|
528
551
|
},
|
|
529
552
|
1
|
|
530
553
|
)
|
|
531
|
-
),
|
|
532
|
-
const
|
|
533
|
-
for (let
|
|
554
|
+
), s > 3 && e.push(/* @__PURE__ */ t(K, { children: "..." }, "ellipsis1"));
|
|
555
|
+
const o = Math.max(2, s - 1), a = Math.min(h - 1, s + 1);
|
|
556
|
+
for (let f = o; f <= a; f++)
|
|
534
557
|
e.push(
|
|
535
|
-
/* @__PURE__ */
|
|
536
|
-
|
|
558
|
+
/* @__PURE__ */ t(
|
|
559
|
+
k,
|
|
537
560
|
{
|
|
538
|
-
style:
|
|
539
|
-
onClick: () =>
|
|
540
|
-
children:
|
|
561
|
+
style: s === f ? C.paginationButtonActive : {},
|
|
562
|
+
onClick: () => x(f),
|
|
563
|
+
children: f
|
|
541
564
|
},
|
|
542
|
-
|
|
565
|
+
f
|
|
543
566
|
)
|
|
544
567
|
);
|
|
545
|
-
|
|
546
|
-
/* @__PURE__ */
|
|
547
|
-
|
|
568
|
+
s < h - 2 && e.push(/* @__PURE__ */ t(K, { children: "..." }, "ellipsis2")), h > 1 && e.push(
|
|
569
|
+
/* @__PURE__ */ t(
|
|
570
|
+
k,
|
|
548
571
|
{
|
|
549
|
-
style:
|
|
550
|
-
onClick: () =>
|
|
572
|
+
style: s === h ? C.paginationButtonActive : {},
|
|
573
|
+
onClick: () => x(h),
|
|
551
574
|
children: h
|
|
552
575
|
},
|
|
553
576
|
h
|
|
@@ -556,28 +579,28 @@ const We = ({
|
|
|
556
579
|
}
|
|
557
580
|
return e;
|
|
558
581
|
})(),
|
|
559
|
-
/* @__PURE__ */
|
|
560
|
-
|
|
582
|
+
/* @__PURE__ */ t(
|
|
583
|
+
k,
|
|
561
584
|
{
|
|
562
|
-
style:
|
|
563
|
-
onClick: () =>
|
|
564
|
-
disabled:
|
|
585
|
+
style: s === h ? C.paginationButtonDisabled : {},
|
|
586
|
+
onClick: () => x(Math.min(h, s + 1)),
|
|
587
|
+
disabled: s === h,
|
|
565
588
|
children: "Next"
|
|
566
589
|
}
|
|
567
590
|
)
|
|
568
591
|
] }),
|
|
569
|
-
/* @__PURE__ */
|
|
592
|
+
/* @__PURE__ */ c(me, { children: [
|
|
570
593
|
"Showing ",
|
|
571
|
-
Math.min((
|
|
594
|
+
Math.min((s - 1) * l + 1, g.length),
|
|
572
595
|
" to",
|
|
573
596
|
" ",
|
|
574
|
-
Math.min(
|
|
597
|
+
Math.min(s * l, g.length),
|
|
575
598
|
" of ",
|
|
576
|
-
|
|
599
|
+
g.length,
|
|
577
600
|
" entries"
|
|
578
601
|
] })
|
|
579
602
|
] });
|
|
580
603
|
};
|
|
581
604
|
export {
|
|
582
|
-
|
|
605
|
+
Ue as default
|
|
583
606
|
};
|
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.301",
|
|
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",
|