jcicl 0.0.325 → 0.0.327
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 +139 -125
- package/package.json +1 -1
package/Table/Table.js
CHANGED
|
@@ -1,22 +1,22 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import { jsxs as s, jsx as o } from "react/jsx-runtime";
|
|
2
|
+
import je, { forwardRef as X, createElement as F, useState as y, useMemo as I } from "react";
|
|
3
|
+
import N from "../theme.js";
|
|
4
4
|
import { n as i } from "../.chunks/emotion-styled.browser.esm.js";
|
|
5
|
-
import { Button as
|
|
6
|
-
import { Flex as
|
|
5
|
+
import { Button as ze } from "../Button/Button.js";
|
|
6
|
+
import { Flex as Ae } from "../Flex/Flex.js";
|
|
7
7
|
/**
|
|
8
8
|
* @license lucide-react v0.525.0 - ISC
|
|
9
9
|
*
|
|
10
10
|
* This source code is licensed under the ISC license.
|
|
11
11
|
* See the LICENSE file in the root directory of this source tree.
|
|
12
12
|
*/
|
|
13
|
-
const
|
|
13
|
+
const Te = (n) => n.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase(), Ne = (n) => n.replace(
|
|
14
14
|
/^([A-Z])|[\s-_]+(\w)/g,
|
|
15
15
|
(r, l, u) => u ? u.toUpperCase() : l.toLowerCase()
|
|
16
16
|
), G = (n) => {
|
|
17
|
-
const r =
|
|
17
|
+
const r = Ne(n);
|
|
18
18
|
return r.charAt(0).toUpperCase() + r.slice(1);
|
|
19
|
-
}, P = (...n) => n.filter((r, l, u) => !!r && r.trim() !== "" && u.indexOf(r) === l).join(" ").trim(),
|
|
19
|
+
}, P = (...n) => n.filter((r, l, u) => !!r && r.trim() !== "" && u.indexOf(r) === l).join(" ").trim(), Be = (n) => {
|
|
20
20
|
for (const r in n)
|
|
21
21
|
if (r.startsWith("aria-") || r === "role" || r === "title")
|
|
22
22
|
return !0;
|
|
@@ -44,31 +44,31 @@ var De = {
|
|
|
44
44
|
* This source code is licensed under the ISC license.
|
|
45
45
|
* See the LICENSE file in the root directory of this source tree.
|
|
46
46
|
*/
|
|
47
|
-
const
|
|
47
|
+
const Ie = X(
|
|
48
48
|
({
|
|
49
49
|
color: n = "currentColor",
|
|
50
50
|
size: r = 24,
|
|
51
51
|
strokeWidth: l = 2,
|
|
52
52
|
absoluteStrokeWidth: u,
|
|
53
|
-
className:
|
|
53
|
+
className: m = "",
|
|
54
54
|
children: g,
|
|
55
|
-
iconNode:
|
|
56
|
-
...
|
|
57
|
-
},
|
|
55
|
+
iconNode: _,
|
|
56
|
+
...z
|
|
57
|
+
}, a) => F(
|
|
58
58
|
"svg",
|
|
59
59
|
{
|
|
60
|
-
ref:
|
|
60
|
+
ref: a,
|
|
61
61
|
...De,
|
|
62
62
|
width: r,
|
|
63
63
|
height: r,
|
|
64
64
|
stroke: n,
|
|
65
65
|
strokeWidth: u ? Number(l) * 24 / Number(r) : l,
|
|
66
|
-
className: P("lucide",
|
|
67
|
-
...!g && !
|
|
68
|
-
...
|
|
66
|
+
className: P("lucide", m),
|
|
67
|
+
...!g && !Be(z) && { "aria-hidden": "true" },
|
|
68
|
+
...z
|
|
69
69
|
},
|
|
70
70
|
[
|
|
71
|
-
...
|
|
71
|
+
..._.map(([b, M]) => F(b, M)),
|
|
72
72
|
...Array.isArray(g) ? g : [g]
|
|
73
73
|
]
|
|
74
74
|
)
|
|
@@ -79,17 +79,17 @@ const Te = X(
|
|
|
79
79
|
* This source code is licensed under the ISC license.
|
|
80
80
|
* See the LICENSE file in the root directory of this source tree.
|
|
81
81
|
*/
|
|
82
|
-
const
|
|
82
|
+
const j = (n, r) => {
|
|
83
83
|
const l = X(
|
|
84
|
-
({ className: u, ...
|
|
84
|
+
({ className: u, ...m }, g) => F(Ie, {
|
|
85
85
|
ref: g,
|
|
86
86
|
iconNode: r,
|
|
87
87
|
className: P(
|
|
88
|
-
`lucide-${
|
|
88
|
+
`lucide-${Te(G(n))}`,
|
|
89
89
|
`lucide-${n}`,
|
|
90
90
|
u
|
|
91
91
|
),
|
|
92
|
-
...
|
|
92
|
+
...m
|
|
93
93
|
})
|
|
94
94
|
);
|
|
95
95
|
return l.displayName = G(n), l;
|
|
@@ -100,21 +100,21 @@ const z = (n, r) => {
|
|
|
100
100
|
* This source code is licensed under the ISC license.
|
|
101
101
|
* See the LICENSE file in the root directory of this source tree.
|
|
102
102
|
*/
|
|
103
|
-
const
|
|
103
|
+
const _e = [["path", { d: "m6 9 6 6 6-6", key: "qrunsl" }]], $ = j("chevron-down", _e);
|
|
104
104
|
/**
|
|
105
105
|
* @license lucide-react v0.525.0 - ISC
|
|
106
106
|
*
|
|
107
107
|
* This source code is licensed under the ISC license.
|
|
108
108
|
* See the LICENSE file in the root directory of this source tree.
|
|
109
109
|
*/
|
|
110
|
-
const
|
|
110
|
+
const Me = [["path", { d: "m18 15-6-6-6 6", key: "153udz" }]], J = j("chevron-up", Me);
|
|
111
111
|
/**
|
|
112
112
|
* @license lucide-react v0.525.0 - ISC
|
|
113
113
|
*
|
|
114
114
|
* This source code is licensed under the ISC license.
|
|
115
115
|
* See the LICENSE file in the root directory of this source tree.
|
|
116
116
|
*/
|
|
117
|
-
const
|
|
117
|
+
const Le = [
|
|
118
118
|
[
|
|
119
119
|
"path",
|
|
120
120
|
{
|
|
@@ -131,7 +131,7 @@ const Re = [
|
|
|
131
131
|
}
|
|
132
132
|
],
|
|
133
133
|
["path", { d: "m2 2 20 20", key: "1ooewy" }]
|
|
134
|
-
],
|
|
134
|
+
], Re = j("eye-off", Le);
|
|
135
135
|
/**
|
|
136
136
|
* @license lucide-react v0.525.0 - ISC
|
|
137
137
|
*
|
|
@@ -147,17 +147,17 @@ const Ee = [
|
|
|
147
147
|
}
|
|
148
148
|
],
|
|
149
149
|
["circle", { cx: "12", cy: "12", r: "3", key: "1v7zrd" }]
|
|
150
|
-
],
|
|
150
|
+
], We = j("eye", Ee);
|
|
151
151
|
/**
|
|
152
152
|
* @license lucide-react v0.525.0 - ISC
|
|
153
153
|
*
|
|
154
154
|
* This source code is licensed under the ISC license.
|
|
155
155
|
* See the LICENSE file in the root directory of this source tree.
|
|
156
156
|
*/
|
|
157
|
-
const
|
|
157
|
+
const $e = [
|
|
158
158
|
["path", { d: "m21 21-4.34-4.34", key: "14j7rj" }],
|
|
159
159
|
["circle", { cx: "11", cy: "11", r: "8", key: "4ej97u" }]
|
|
160
|
-
], Q =
|
|
160
|
+
], Q = j("search", $e);
|
|
161
161
|
/**
|
|
162
162
|
* @license lucide-react v0.525.0 - ISC
|
|
163
163
|
*
|
|
@@ -173,56 +173,56 @@ const Fe = [
|
|
|
173
173
|
}
|
|
174
174
|
],
|
|
175
175
|
["circle", { cx: "12", cy: "12", r: "3", key: "1v7zrd" }]
|
|
176
|
-
], Ve =
|
|
176
|
+
], Ve = j("settings", Fe);
|
|
177
177
|
let v = "";
|
|
178
178
|
const Ze = ({
|
|
179
179
|
data: n = [],
|
|
180
180
|
columnTitles: r = {},
|
|
181
181
|
rowsPerPage: l = 19,
|
|
182
182
|
title: u = "Data Table",
|
|
183
|
-
onRowClick:
|
|
183
|
+
onRowClick: m,
|
|
184
184
|
hiddenColumns: g = [],
|
|
185
|
-
defaultSort:
|
|
186
|
-
extraActions:
|
|
185
|
+
defaultSort: _ = { key: "", direction: "asc" },
|
|
186
|
+
extraActions: z
|
|
187
187
|
}) => {
|
|
188
|
-
const [
|
|
189
|
-
|
|
190
|
-
d.length > 0 && (V(new Set(d)),
|
|
188
|
+
const [a, b] = y(1), [, M] = y(""), [h, ee] = y(_), [w, B] = y(/* @__PURE__ */ new Set()), [L, V] = y(/* @__PURE__ */ new Set()), [U, oe] = y(!1), [H, te] = y(!1), d = I(() => n.length === 0 ? [] : Object.keys(n[0]).filter((e) => !g.includes(e)), [n]);
|
|
189
|
+
je.useEffect(() => {
|
|
190
|
+
d.length > 0 && (V(new Set(d)), B(new Set(d)));
|
|
191
191
|
}, [d]);
|
|
192
|
-
const
|
|
192
|
+
const R = I(() => {
|
|
193
193
|
if (!v) return n;
|
|
194
194
|
const e = w.size > 0 ? w : new Set(d);
|
|
195
195
|
return n.filter((t) => Array.from(e).some((c) => {
|
|
196
196
|
const f = t[c];
|
|
197
197
|
return f && f.toString().toLowerCase().includes(v.toLowerCase());
|
|
198
198
|
}));
|
|
199
|
-
}, [n, v, w, d]), x =
|
|
199
|
+
}, [n, v, w, d]), x = I(() => h.key ? [...R].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) : R, [R, h]), D = d.filter((e) => L.has(e)), ne = () => {
|
|
200
200
|
if (!Array.isArray(x) || x.length === 0) return;
|
|
201
|
-
const e = D.map((
|
|
202
|
-
const
|
|
203
|
-
return /[",\n]/.test(
|
|
201
|
+
const e = D.map((k) => r[k] || k), t = (k) => {
|
|
202
|
+
const T = String(k ?? "");
|
|
203
|
+
return /[",\n]/.test(T) ? `"${T.replace(/"/g, '""')}"` : T;
|
|
204
204
|
}, f = [
|
|
205
205
|
e.join(","),
|
|
206
206
|
// header row
|
|
207
|
-
...x.map((
|
|
207
|
+
...x.map((k) => D.map((T) => t(k[T])).join(","))
|
|
208
208
|
].join(`
|
|
209
|
-
`), ve = new Blob([f], { type: "text/csv;charset=utf-8;" }),
|
|
210
|
-
|
|
211
|
-
}, re =
|
|
212
|
-
const e = (
|
|
209
|
+
`), ve = new Blob([f], { type: "text/csv;charset=utf-8;" }), A = document.createElement("a");
|
|
210
|
+
A.href = URL.createObjectURL(ve), A.download = "data.csv", document.body.appendChild(A), A.click(), document.body.removeChild(A);
|
|
211
|
+
}, re = I(() => {
|
|
212
|
+
const e = (a - 1) * l;
|
|
213
213
|
return x.slice(e, e + l);
|
|
214
|
-
}, [x,
|
|
214
|
+
}, [x, a, l]), p = Math.ceil(x.length / l), ie = (e) => {
|
|
215
215
|
ee((t) => ({
|
|
216
216
|
key: e,
|
|
217
217
|
direction: t.key === e && t.direction === "asc" ? "desc" : "asc"
|
|
218
218
|
}));
|
|
219
|
-
},
|
|
220
|
-
|
|
219
|
+
}, ae = (e) => {
|
|
220
|
+
B((t) => {
|
|
221
221
|
const c = new Set(t);
|
|
222
222
|
return c.has(e) ? c.delete(e) : c.add(e), c;
|
|
223
223
|
});
|
|
224
|
-
},
|
|
225
|
-
w.size === d.length ?
|
|
224
|
+
}, se = () => {
|
|
225
|
+
w.size === d.length ? B(/* @__PURE__ */ new Set()) : B(new Set(d));
|
|
226
226
|
}, ce = (e) => {
|
|
227
227
|
V((t) => {
|
|
228
228
|
const c = new Set(t);
|
|
@@ -230,17 +230,17 @@ const Ze = ({
|
|
|
230
230
|
});
|
|
231
231
|
}, le = (e) => {
|
|
232
232
|
v = e;
|
|
233
|
-
},
|
|
234
|
-
|
|
235
|
-
},
|
|
233
|
+
}, O = () => {
|
|
234
|
+
M(v);
|
|
235
|
+
}, C = {
|
|
236
236
|
thActive: {
|
|
237
|
-
backgroundColor:
|
|
238
|
-
color:
|
|
237
|
+
backgroundColor: N.colors.green,
|
|
238
|
+
color: N.colors.white
|
|
239
239
|
},
|
|
240
240
|
paginationButtonActive: {
|
|
241
|
-
backgroundColor:
|
|
242
|
-
color:
|
|
243
|
-
borderColor:
|
|
241
|
+
backgroundColor: N.colors.green,
|
|
242
|
+
color: N.colors.white,
|
|
243
|
+
borderColor: N.colors.green
|
|
244
244
|
},
|
|
245
245
|
paginationButtonDisabled: {
|
|
246
246
|
opacity: 0.5,
|
|
@@ -258,7 +258,7 @@ const Ze = ({
|
|
|
258
258
|
boxShadow: "0 2px 10px rgba(0, 0, 0, 0.1)",
|
|
259
259
|
padding: "20px",
|
|
260
260
|
fontFamily: "Arial, sans-serif",
|
|
261
|
-
|
|
261
|
+
width: "100%",
|
|
262
262
|
overflow: "auto"
|
|
263
263
|
}), pe = i("div")({
|
|
264
264
|
display: "flex",
|
|
@@ -362,18 +362,18 @@ const Ze = ({
|
|
|
362
362
|
backgroundColor: "#f0f8f0",
|
|
363
363
|
color: "#005c00"
|
|
364
364
|
}
|
|
365
|
-
}),
|
|
365
|
+
}), W = i("input")({
|
|
366
366
|
width: "16px",
|
|
367
367
|
height: "16px",
|
|
368
368
|
accentColor: "#009200"
|
|
369
|
-
}),
|
|
369
|
+
}), me = i("table")({
|
|
370
370
|
width: "100%",
|
|
371
371
|
borderCollapse: "collapse",
|
|
372
372
|
backgroundColor: "#ffffff",
|
|
373
373
|
borderRadius: "8px",
|
|
374
374
|
overflow: "hidden",
|
|
375
375
|
boxShadow: "0 1px 3px rgba(0, 0, 0, 0.1)"
|
|
376
|
-
}),
|
|
376
|
+
}), Ce = i("th")({
|
|
377
377
|
backgroundColor: "#f8f9fa",
|
|
378
378
|
color: "#333333",
|
|
379
379
|
padding: "16px 12px",
|
|
@@ -407,13 +407,13 @@ const Ze = ({
|
|
|
407
407
|
cursor: "pointer"
|
|
408
408
|
}
|
|
409
409
|
}
|
|
410
|
-
})),
|
|
410
|
+
})), Se = i("div")({
|
|
411
411
|
display: "flex",
|
|
412
412
|
justifyContent: "center",
|
|
413
413
|
alignItems: "center",
|
|
414
414
|
marginTop: "20px",
|
|
415
415
|
gap: "10px"
|
|
416
|
-
}),
|
|
416
|
+
}), S = i("button")({
|
|
417
417
|
padding: "8px 12px",
|
|
418
418
|
border: "1px solid #e0e0e0",
|
|
419
419
|
borderRadius: "4px",
|
|
@@ -432,7 +432,7 @@ const Ze = ({
|
|
|
432
432
|
opacity: 0.5,
|
|
433
433
|
cursor: "not-allowed"
|
|
434
434
|
}
|
|
435
|
-
}),
|
|
435
|
+
}), ke = i("div")({
|
|
436
436
|
fontSize: "14px",
|
|
437
437
|
color: "#666666",
|
|
438
438
|
textAlign: "center",
|
|
@@ -442,18 +442,18 @@ const Ze = ({
|
|
|
442
442
|
color: "#666666",
|
|
443
443
|
fontSize: "14px"
|
|
444
444
|
});
|
|
445
|
-
return /* @__PURE__ */
|
|
446
|
-
/* @__PURE__ */
|
|
447
|
-
/* @__PURE__ */
|
|
445
|
+
return /* @__PURE__ */ s(de, { className: "jcTableContainer", children: [
|
|
446
|
+
/* @__PURE__ */ s(pe, { className: "jcTableHeader", children: [
|
|
447
|
+
/* @__PURE__ */ s(he, { className: "jcTableTitleAndActions", children: [
|
|
448
448
|
/* @__PURE__ */ o(fe, { children: u }),
|
|
449
|
-
/* @__PURE__ */
|
|
450
|
-
|
|
451
|
-
/* @__PURE__ */ o(
|
|
449
|
+
/* @__PURE__ */ s(Ae, { className: "jcTableExtraComponentsBox", gap: "9px", children: [
|
|
450
|
+
z && z,
|
|
451
|
+
/* @__PURE__ */ o(ze, { onClick: ne, children: "Export to CSV" })
|
|
452
452
|
] })
|
|
453
453
|
] }),
|
|
454
|
-
/* @__PURE__ */
|
|
455
|
-
/* @__PURE__ */
|
|
456
|
-
/* @__PURE__ */ o(ge, { onClick:
|
|
454
|
+
/* @__PURE__ */ s(ue, { className: "jcTableControls", children: [
|
|
455
|
+
/* @__PURE__ */ s(xe, { className: "jcTableSearchContainer", children: [
|
|
456
|
+
/* @__PURE__ */ o(ge, { onClick: O }),
|
|
457
457
|
/* @__PURE__ */ o(
|
|
458
458
|
be,
|
|
459
459
|
{
|
|
@@ -462,21 +462,28 @@ const Ze = ({
|
|
|
462
462
|
defaultValue: v,
|
|
463
463
|
onChange: (e) => le(e.target.value),
|
|
464
464
|
onKeyDown: (e) => {
|
|
465
|
-
e.key === "Enter" &&
|
|
465
|
+
e.key === "Enter" && O();
|
|
466
466
|
}
|
|
467
467
|
}
|
|
468
468
|
)
|
|
469
469
|
] }),
|
|
470
|
-
/* @__PURE__ */
|
|
471
|
-
/* @__PURE__ */
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
470
|
+
/* @__PURE__ */ s("div", { style: { position: "relative" }, children: [
|
|
471
|
+
/* @__PURE__ */ s(
|
|
472
|
+
q,
|
|
473
|
+
{
|
|
474
|
+
className: "jcTableSearchFields",
|
|
475
|
+
onClick: () => te(!H),
|
|
476
|
+
children: [
|
|
477
|
+
/* @__PURE__ */ o(Q, { size: 16 }),
|
|
478
|
+
"Fields",
|
|
479
|
+
/* @__PURE__ */ o($, { size: 16 })
|
|
480
|
+
]
|
|
481
|
+
}
|
|
482
|
+
),
|
|
483
|
+
H && /* @__PURE__ */ s(K, { className: "jcTableSearchFieldsDropdown", children: [
|
|
484
|
+
/* @__PURE__ */ s(E, { onClick: se, children: [
|
|
478
485
|
/* @__PURE__ */ o(
|
|
479
|
-
|
|
486
|
+
W,
|
|
480
487
|
{
|
|
481
488
|
type: "checkbox",
|
|
482
489
|
checked: w.size === d.length,
|
|
@@ -487,50 +494,57 @@ const Ze = ({
|
|
|
487
494
|
/* @__PURE__ */ o("span", { style: { fontWeight: "bold" }, children: "All" })
|
|
488
495
|
] }),
|
|
489
496
|
/* @__PURE__ */ o("div", { style: { height: "1px", backgroundColor: "#e0e0e0", margin: "4px 0" } }),
|
|
490
|
-
d.map((e) => /* @__PURE__ */
|
|
491
|
-
/* @__PURE__ */ o(
|
|
497
|
+
d.map((e) => /* @__PURE__ */ s(E, { onClick: () => ae(e), children: [
|
|
498
|
+
/* @__PURE__ */ o(W, { type: "checkbox", checked: w.has(e), onChange: () => {
|
|
492
499
|
} }),
|
|
493
500
|
/* @__PURE__ */ o("span", { children: r[e] || e })
|
|
494
501
|
] }, e))
|
|
495
502
|
] })
|
|
496
503
|
] }),
|
|
497
|
-
/* @__PURE__ */
|
|
498
|
-
/* @__PURE__ */
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
504
|
+
/* @__PURE__ */ s("div", { style: { position: "relative" }, children: [
|
|
505
|
+
/* @__PURE__ */ s(
|
|
506
|
+
q,
|
|
507
|
+
{
|
|
508
|
+
className: "jcTableColumnSettings",
|
|
509
|
+
onClick: () => oe(!U),
|
|
510
|
+
children: [
|
|
511
|
+
/* @__PURE__ */ o(Ve, { size: 16 }),
|
|
512
|
+
"Columns",
|
|
513
|
+
/* @__PURE__ */ o($, { size: 16 })
|
|
514
|
+
]
|
|
515
|
+
}
|
|
516
|
+
),
|
|
517
|
+
U && /* @__PURE__ */ o(K, { className: "jcTableColumnSettingsDropdown", children: d.map((e) => /* @__PURE__ */ s(E, { onClick: () => ce(e), children: [
|
|
518
|
+
/* @__PURE__ */ o(W, { type: "checkbox", checked: L.has(e), onChange: () => {
|
|
505
519
|
} }),
|
|
506
|
-
|
|
520
|
+
L.has(e) ? /* @__PURE__ */ o(We, { size: 16 }) : /* @__PURE__ */ o(Re, { size: 16 }),
|
|
507
521
|
/* @__PURE__ */ o("span", { children: r[e] || e })
|
|
508
522
|
] }, e)) })
|
|
509
523
|
] })
|
|
510
524
|
] })
|
|
511
525
|
] }),
|
|
512
|
-
/* @__PURE__ */
|
|
513
|
-
/* @__PURE__ */ o("thead", { children: /* @__PURE__ */ o(Y, { interactableRow: !1, children: D.map((e) => /* @__PURE__ */
|
|
514
|
-
|
|
526
|
+
/* @__PURE__ */ s(me, { className: "jcTableContent", children: [
|
|
527
|
+
/* @__PURE__ */ o("thead", { children: /* @__PURE__ */ o(Y, { interactableRow: !1, children: D.map((e) => /* @__PURE__ */ s(
|
|
528
|
+
Ce,
|
|
515
529
|
{
|
|
516
|
-
style: h.key === e ?
|
|
530
|
+
style: h.key === e ? C.thActive : {},
|
|
517
531
|
onClick: () => ie(e),
|
|
518
532
|
children: [
|
|
519
533
|
r[e] || e,
|
|
520
|
-
/* @__PURE__ */ o(we, { children: h.key === e ? h.direction === "asc" ? /* @__PURE__ */ o(J, { size: 16 }) : /* @__PURE__ */ o(
|
|
534
|
+
/* @__PURE__ */ o(we, { children: h.key === e ? h.direction === "asc" ? /* @__PURE__ */ o(J, { size: 16 }) : /* @__PURE__ */ o($, { size: 16 }) : /* @__PURE__ */ o(J, { size: 16, style: { opacity: 0.313 } }) })
|
|
521
535
|
]
|
|
522
536
|
},
|
|
523
537
|
e
|
|
524
538
|
)) }) }),
|
|
525
|
-
/* @__PURE__ */ o("tbody", { children: re.map((e, t) => /* @__PURE__ */ o(Y, { onClick: () =>
|
|
539
|
+
/* @__PURE__ */ o("tbody", { children: re.map((e, t) => /* @__PURE__ */ o(Y, { onClick: () => m && m(e), interactableRow: !!m, children: D.map((c) => /* @__PURE__ */ o(ye, { children: e[c] }, c)) }, t)) })
|
|
526
540
|
] }),
|
|
527
|
-
/* @__PURE__ */
|
|
541
|
+
/* @__PURE__ */ s(Se, { children: [
|
|
528
542
|
/* @__PURE__ */ o(
|
|
529
|
-
|
|
543
|
+
S,
|
|
530
544
|
{
|
|
531
|
-
style:
|
|
532
|
-
onClick: () => b(Math.max(1,
|
|
533
|
-
disabled:
|
|
545
|
+
style: a === 1 ? C.paginationButtonDisabled : {},
|
|
546
|
+
onClick: () => b(Math.max(1, a - 1)),
|
|
547
|
+
disabled: a === 1,
|
|
534
548
|
children: "Previous"
|
|
535
549
|
}
|
|
536
550
|
),
|
|
@@ -540,9 +554,9 @@ const Ze = ({
|
|
|
540
554
|
for (let t = 1; t <= p; t++)
|
|
541
555
|
e.push(
|
|
542
556
|
/* @__PURE__ */ o(
|
|
543
|
-
|
|
557
|
+
S,
|
|
544
558
|
{
|
|
545
|
-
style:
|
|
559
|
+
style: a === t ? C.paginationButtonActive : {},
|
|
546
560
|
onClick: () => b(t),
|
|
547
561
|
children: t
|
|
548
562
|
},
|
|
@@ -552,33 +566,33 @@ const Ze = ({
|
|
|
552
566
|
else {
|
|
553
567
|
e.push(
|
|
554
568
|
/* @__PURE__ */ o(
|
|
555
|
-
|
|
569
|
+
S,
|
|
556
570
|
{
|
|
557
|
-
style:
|
|
571
|
+
style: a === 1 ? C.paginationButtonActive : {},
|
|
558
572
|
onClick: () => b(1),
|
|
559
573
|
children: "1"
|
|
560
574
|
},
|
|
561
575
|
1
|
|
562
576
|
)
|
|
563
|
-
),
|
|
564
|
-
const t = Math.max(2,
|
|
577
|
+
), a > 3 && e.push(/* @__PURE__ */ o(Z, { children: "..." }, "ellipsis1"));
|
|
578
|
+
const t = Math.max(2, a - 1), c = Math.min(p - 1, a + 1);
|
|
565
579
|
for (let f = t; f <= c; f++)
|
|
566
580
|
e.push(
|
|
567
581
|
/* @__PURE__ */ o(
|
|
568
|
-
|
|
582
|
+
S,
|
|
569
583
|
{
|
|
570
|
-
style:
|
|
584
|
+
style: a === f ? C.paginationButtonActive : {},
|
|
571
585
|
onClick: () => b(f),
|
|
572
586
|
children: f
|
|
573
587
|
},
|
|
574
588
|
f
|
|
575
589
|
)
|
|
576
590
|
);
|
|
577
|
-
|
|
591
|
+
a < p - 2 && e.push(/* @__PURE__ */ o(Z, { children: "..." }, "ellipsis2")), p > 1 && e.push(
|
|
578
592
|
/* @__PURE__ */ o(
|
|
579
|
-
|
|
593
|
+
S,
|
|
580
594
|
{
|
|
581
|
-
style:
|
|
595
|
+
style: a === p ? C.paginationButtonActive : {},
|
|
582
596
|
onClick: () => b(p),
|
|
583
597
|
children: p
|
|
584
598
|
},
|
|
@@ -589,21 +603,21 @@ const Ze = ({
|
|
|
589
603
|
return e;
|
|
590
604
|
})(),
|
|
591
605
|
/* @__PURE__ */ o(
|
|
592
|
-
|
|
606
|
+
S,
|
|
593
607
|
{
|
|
594
|
-
style:
|
|
595
|
-
onClick: () => b(Math.min(p,
|
|
596
|
-
disabled:
|
|
608
|
+
style: a === p ? C.paginationButtonDisabled : {},
|
|
609
|
+
onClick: () => b(Math.min(p, a + 1)),
|
|
610
|
+
disabled: a === p,
|
|
597
611
|
children: "Next"
|
|
598
612
|
}
|
|
599
613
|
)
|
|
600
614
|
] }),
|
|
601
|
-
/* @__PURE__ */
|
|
615
|
+
/* @__PURE__ */ s(ke, { children: [
|
|
602
616
|
"Showing ",
|
|
603
|
-
Math.min((
|
|
617
|
+
Math.min((a - 1) * l + 1, x.length),
|
|
604
618
|
" to",
|
|
605
619
|
" ",
|
|
606
|
-
Math.min(
|
|
620
|
+
Math.min(a * l, x.length),
|
|
607
621
|
" of ",
|
|
608
622
|
x.length,
|
|
609
623
|
" entries"
|
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.327",
|
|
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",
|