@canonical/maas-react-components 2.1.0 → 2.2.0
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/dist/@canonical/maas-react-components.es.js +482 -449
- package/dist/@canonical/maas-react-components.umd.js +14 -14
- package/dist/maas-react-components.css +1 -1
- package/dist/src/lib/components/GenericTable/GenericTable.d.ts +1 -1
- package/dist/src/lib/elements/Placeholder/Placeholder.d.ts +39 -9
- package/dist/src/lib/elements/Placeholder/Placeholder.stories.d.ts +7 -2
- package/package.json +1 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsxs as G, jsx as d, Fragment as be } from "react/jsx-runtime";
|
|
2
2
|
import * as pe from "react";
|
|
3
|
-
import
|
|
4
|
-
import { useListener as
|
|
3
|
+
import _i, { useRef as ge, useState as fe, useEffect as ue, useCallback as U, cloneElement as Ri, createContext as $n, useId as et, useContext as Nt, useMemo as le, useReducer as Mn, forwardRef as Ei, useImperativeHandle as ki, Fragment as On, useLayoutEffect as Ht } from "react";
|
|
4
|
+
import { useListener as Fi, Link as Pi, Spinner as qt, Tooltip as Gt, Button as _e, Icon as Re, Row as Ii, Col as Di, Input as Ai, Label as $i, CheckboxInput as Mi, useClickOutside as Oi, useOnEscapePressed as ji, SearchBox as jn, Select as Ti, ICONS as en } from "@canonical/react-components";
|
|
5
5
|
function Bt(e) {
|
|
6
6
|
return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
|
|
7
7
|
}
|
|
@@ -12,7 +12,7 @@ var ft = { exports: {} };
|
|
|
12
12
|
http://jedwatson.github.io/classnames
|
|
13
13
|
*/
|
|
14
14
|
var tn;
|
|
15
|
-
function
|
|
15
|
+
function zi() {
|
|
16
16
|
return tn || (tn = 1, function(e) {
|
|
17
17
|
(function() {
|
|
18
18
|
var n = {}.hasOwnProperty;
|
|
@@ -44,8 +44,8 @@ function Ti() {
|
|
|
44
44
|
})();
|
|
45
45
|
}(ft)), ft.exports;
|
|
46
46
|
}
|
|
47
|
-
var
|
|
48
|
-
const L = /* @__PURE__ */ Bt(
|
|
47
|
+
var Vi = zi();
|
|
48
|
+
const L = /* @__PURE__ */ Bt(Vi), Ie = {
|
|
49
49
|
caution: "#F99B11",
|
|
50
50
|
light: "#F7F7F7",
|
|
51
51
|
linkFaded: "#D3E4ED",
|
|
@@ -59,7 +59,7 @@ const L = /* @__PURE__ */ Bt(zi), Ie = {
|
|
|
59
59
|
Ie.positive,
|
|
60
60
|
Ie.negative,
|
|
61
61
|
Ie.caution
|
|
62
|
-
],
|
|
62
|
+
], Li = Ie.linkFaded, Tn = Ie.caution, It = Ie.light, nn = 2, on = 1, an = (e, n) => {
|
|
63
63
|
var o, a;
|
|
64
64
|
const t = ((a = (o = e == null ? void 0 : e.current) == null ? void 0 : o.getBoundingClientRect()) == null ? void 0 : a.width) || 0;
|
|
65
65
|
return t > n * nn ? t / n : nn;
|
|
@@ -70,7 +70,7 @@ const L = /* @__PURE__ */ Bt(zi), Ie = {
|
|
|
70
70
|
label: "meter-label",
|
|
71
71
|
meteroverflow: "meter-overflow",
|
|
72
72
|
segments: "meter-segments"
|
|
73
|
-
},
|
|
73
|
+
}, Ni = ({
|
|
74
74
|
className: e,
|
|
75
75
|
children: n,
|
|
76
76
|
data: t,
|
|
@@ -79,14 +79,14 @@ const L = /* @__PURE__ */ Bt(zi), Ie = {
|
|
|
79
79
|
size: a = "regular",
|
|
80
80
|
...l
|
|
81
81
|
}) => {
|
|
82
|
-
const r =
|
|
83
|
-
|
|
82
|
+
const r = ge(null), s = t == null ? void 0 : t.reduce((m, v) => m + v.value, 0), c = i || s, p = t.map((m) => m.value / c * 100), [f, g] = fe(0);
|
|
83
|
+
ue(() => {
|
|
84
84
|
g(o === "segmented" ? an(r, c) : 0);
|
|
85
85
|
}, [c, o]);
|
|
86
|
-
const
|
|
86
|
+
const u = U(() => {
|
|
87
87
|
g(an(r, c));
|
|
88
88
|
}, [r, c, g]);
|
|
89
|
-
return
|
|
89
|
+
return Fi(window, u, "resize", !0, o === "segmented"), /* @__PURE__ */ G(
|
|
90
90
|
"div",
|
|
91
91
|
{
|
|
92
92
|
className: L("p-meter", e, {
|
|
@@ -96,11 +96,11 @@ const L = /* @__PURE__ */ Bt(zi), Ie = {
|
|
|
96
96
|
"data-testid": Oe.container,
|
|
97
97
|
ref: r,
|
|
98
98
|
children: [
|
|
99
|
-
/* @__PURE__ */ d(
|
|
100
|
-
|
|
99
|
+
/* @__PURE__ */ d(Hi, { children: /* @__PURE__ */ d(
|
|
100
|
+
qi,
|
|
101
101
|
{
|
|
102
102
|
data: t,
|
|
103
|
-
datumWidths:
|
|
103
|
+
datumWidths: p,
|
|
104
104
|
maximum: c,
|
|
105
105
|
overColor: Tn,
|
|
106
106
|
segmentWidth: f,
|
|
@@ -111,15 +111,15 @@ const L = /* @__PURE__ */ Bt(zi), Ie = {
|
|
|
111
111
|
]
|
|
112
112
|
}
|
|
113
113
|
);
|
|
114
|
-
},
|
|
114
|
+
}, Hi = ({ children: e }) => /* @__PURE__ */ d(
|
|
115
115
|
"div",
|
|
116
116
|
{
|
|
117
117
|
className: "p-meter__bar",
|
|
118
118
|
"data-testid": Oe.bar,
|
|
119
|
-
style: { backgroundColor:
|
|
119
|
+
style: { backgroundColor: Li },
|
|
120
120
|
children: e
|
|
121
121
|
}
|
|
122
|
-
),
|
|
122
|
+
), qi = ({
|
|
123
123
|
data: e,
|
|
124
124
|
datumWidths: n,
|
|
125
125
|
maximum: t,
|
|
@@ -128,7 +128,7 @@ const L = /* @__PURE__ */ Bt(zi), Ie = {
|
|
|
128
128
|
const o = () => (e == null ? void 0 : e.reduce((r, s) => r + s.value, 0)) > t, a = (r, s) => ({
|
|
129
129
|
backgroundColor: r.color,
|
|
130
130
|
left: `${n == null ? void 0 : n.reduce(
|
|
131
|
-
(c,
|
|
131
|
+
(c, p, f) => s > f ? c + p : c,
|
|
132
132
|
0
|
|
133
133
|
)}%`,
|
|
134
134
|
width: `${n[s]}%`
|
|
@@ -167,7 +167,7 @@ const L = /* @__PURE__ */ Bt(zi), Ie = {
|
|
|
167
167
|
}
|
|
168
168
|
)
|
|
169
169
|
] });
|
|
170
|
-
},
|
|
170
|
+
}, Gi = ({
|
|
171
171
|
className: e,
|
|
172
172
|
children: n
|
|
173
173
|
}) => /* @__PURE__ */ d(
|
|
@@ -178,30 +178,63 @@ const L = /* @__PURE__ */ Bt(zi), Ie = {
|
|
|
178
178
|
children: n
|
|
179
179
|
}
|
|
180
180
|
);
|
|
181
|
-
|
|
182
|
-
const Qr = ({ children: e, to: n, ...t }) => /* @__PURE__ */ d(
|
|
181
|
+
Ni.Label = Gi;
|
|
182
|
+
const Qr = ({ children: e, to: n, ...t }) => /* @__PURE__ */ d(Pi, { ...t, href: n, rel: "noreferrer noopener", target: "_blank", children: e }), Bi = ({
|
|
183
183
|
percentComplete: e
|
|
184
184
|
}) => /* @__PURE__ */ G("small", { className: "progress-indicator", children: [
|
|
185
185
|
e,
|
|
186
186
|
"% ",
|
|
187
187
|
/* @__PURE__ */ d(qt, { className: "progress-indicator__spinner" })
|
|
188
|
-
] }),
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
isPending: i
|
|
188
|
+
] }), zn = ({
|
|
189
|
+
className: e,
|
|
190
|
+
width: n,
|
|
191
|
+
height: t,
|
|
192
|
+
isPending: i,
|
|
193
|
+
text: o,
|
|
194
|
+
children: a,
|
|
195
|
+
variant: l = "text",
|
|
196
|
+
style: r,
|
|
197
|
+
...s
|
|
193
198
|
}) => {
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
199
|
+
if (ue(() => {
|
|
200
|
+
i !== void 0 && console.warn(
|
|
201
|
+
"[Placeholder] The `isPending` prop is deprecated and will be removed in a future major version. Control skeleton visibility with conditional rendering at the call-site instead."
|
|
202
|
+
);
|
|
203
|
+
}, [i]), ue(() => {
|
|
204
|
+
o !== void 0 && console.warn(
|
|
205
|
+
"[Placeholder] The `text` prop is deprecated and will be removed in a future major version. Use the `width` prop to set the skeleton width."
|
|
206
|
+
);
|
|
207
|
+
}, [o]), ue(() => {
|
|
208
|
+
a !== void 0 && console.warn(
|
|
209
|
+
"[Placeholder] Passing `children` to Placeholder is deprecated and will be removed in a future major version. Render children outside the Placeholder and control visibility at the call-site."
|
|
210
|
+
);
|
|
211
|
+
}, [a]), l === "text") {
|
|
212
|
+
if (!i)
|
|
213
|
+
return /* @__PURE__ */ d(be, { children: a });
|
|
214
|
+
const p = Math.floor(Math.random() * 750), f = n ?? "fit-content";
|
|
215
|
+
return /* @__PURE__ */ d(
|
|
216
|
+
"div",
|
|
217
|
+
{
|
|
218
|
+
"aria-label": "loading",
|
|
219
|
+
className: L("p-placeholder", e),
|
|
220
|
+
role: "progressbar",
|
|
221
|
+
style: { animationDelay: `${p}ms`, width: f, height: t, ...r },
|
|
222
|
+
...s,
|
|
223
|
+
children: /* @__PURE__ */ d("span", { "aria-hidden": "true", className: "p-placeholder__sizer", children: o || a || "Loading" })
|
|
224
|
+
}
|
|
225
|
+
);
|
|
226
|
+
}
|
|
227
|
+
const c = o && !n ? "fit-content" : n;
|
|
228
|
+
return /* @__PURE__ */ d(
|
|
229
|
+
"div",
|
|
197
230
|
{
|
|
198
231
|
"aria-label": "loading",
|
|
199
|
-
className: L("p-placeholder",
|
|
232
|
+
className: L("p-placeholder", e),
|
|
200
233
|
role: "progressbar",
|
|
201
|
-
style: {
|
|
202
|
-
|
|
234
|
+
style: { width: c, height: t, ...r },
|
|
235
|
+
...s
|
|
203
236
|
}
|
|
204
|
-
)
|
|
237
|
+
);
|
|
205
238
|
}, Ui = ({ children: e }) => /* @__PURE__ */ d(be, { children: e }), Ki = ({
|
|
206
239
|
isCollapsed: e,
|
|
207
240
|
setIsCollapsed: n,
|
|
@@ -248,7 +281,7 @@ const Qr = ({ children: e, to: n, ...t }) => /* @__PURE__ */ d(Fi, { ...t, href:
|
|
|
248
281
|
children: n,
|
|
249
282
|
className: t,
|
|
250
283
|
...i
|
|
251
|
-
}) => /* @__PURE__ */ d(e || "a", { className: L("p-panel__logo", t), ...i, children: /* @__PURE__ */ d("div", { className: "p-navigation__tagged-logo", children: n }) }), ao = ({ children: e }) =>
|
|
284
|
+
}) => /* @__PURE__ */ d(e || "a", { className: L("p-panel__logo", t), ...i, children: /* @__PURE__ */ d("div", { className: "p-navigation__tagged-logo", children: n }) }), ao = ({ children: e }) => Ri(e, { className: "p-panel__logo-icon p-navigation__logo-icon" }), ro = ({ children: e, variant: n = "base" }) => /* @__PURE__ */ d(
|
|
252
285
|
"div",
|
|
253
286
|
{
|
|
254
287
|
className: L("p-panel__logo-name is-fading-when-collapsed", {
|
|
@@ -293,7 +326,7 @@ re.LogoIcon = ao;
|
|
|
293
326
|
re.LogoName = ro;
|
|
294
327
|
re.LogoText = so;
|
|
295
328
|
uo.MenuButton = co;
|
|
296
|
-
const Ut = $n(null),
|
|
329
|
+
const Ut = $n(null), Vn = ({ children: e }) => {
|
|
297
330
|
const n = et();
|
|
298
331
|
return /* @__PURE__ */ d(Ut.Provider, { value: n, children: /* @__PURE__ */ d(
|
|
299
332
|
"div",
|
|
@@ -312,8 +345,8 @@ const Ut = $n(null), zn = ({ children: e }) => {
|
|
|
312
345
|
const n = Nt(Ut);
|
|
313
346
|
return /* @__PURE__ */ d("p", { className: "p-form-help-text", id: `${n}_description`, children: e });
|
|
314
347
|
};
|
|
315
|
-
|
|
316
|
-
|
|
348
|
+
Vn.Label = go;
|
|
349
|
+
Vn.Description = fo;
|
|
317
350
|
const Kt = ({ children: e }) => /* @__PURE__ */ d("div", { className: "p-form-section", children: e }), mo = ({ children: e }) => /* @__PURE__ */ d("h5", { className: "p-form-section__title u-no-padding--top", children: e }), vo = ({ children: e }) => /* @__PURE__ */ d("p", { className: "p-form-help-text", children: e }), xo = ({ children: e }) => /* @__PURE__ */ d("div", { className: "p-form-section__content", children: e });
|
|
318
351
|
Kt.Title = mo;
|
|
319
352
|
Kt.Description = vo;
|
|
@@ -334,8 +367,8 @@ function ho(e) {
|
|
|
334
367
|
};
|
|
335
368
|
}, [e, o]), n;
|
|
336
369
|
}
|
|
337
|
-
const
|
|
338
|
-
}]),
|
|
370
|
+
const Ln = pe.createContext(null), Nn = pe.createContext([!1, () => {
|
|
371
|
+
}]), Hn = ({ children: e }) => {
|
|
339
372
|
const n = pe.useRef(null), t = ho(n), [i, o] = pe.useState(!1);
|
|
340
373
|
return /* @__PURE__ */ d(
|
|
341
374
|
"header",
|
|
@@ -344,7 +377,7 @@ const Vn = pe.createContext(null), Ln = pe.createContext([!1, () => {
|
|
|
344
377
|
"main-toolbar--stacked": i
|
|
345
378
|
}),
|
|
346
379
|
ref: n,
|
|
347
|
-
children: /* @__PURE__ */ d(
|
|
380
|
+
children: /* @__PURE__ */ d(Ln.Provider, { value: t, children: /* @__PURE__ */ d(Nn.Provider, { value: [i, o], children: e }) })
|
|
348
381
|
}
|
|
349
382
|
);
|
|
350
383
|
}, wo = ({
|
|
@@ -361,7 +394,7 @@ const Vn = pe.createContext(null), Ln = pe.createContext([!1, () => {
|
|
|
361
394
|
children: n
|
|
362
395
|
}
|
|
363
396
|
), yo = ({ children: e }) => {
|
|
364
|
-
const n = pe.useContext(
|
|
397
|
+
const n = pe.useContext(Ln), [t, i] = pe.useContext(Nn), o = pe.useRef(null);
|
|
365
398
|
return pe.useEffect(() => {
|
|
366
399
|
!o.current || !n || i(o.current.getBoundingClientRect().width > n.width);
|
|
367
400
|
}, [i, n, o]), /* @__PURE__ */ G(be, { children: [
|
|
@@ -386,8 +419,8 @@ const Vn = pe.createContext(null), Ln = pe.createContext([!1, () => {
|
|
|
386
419
|
)
|
|
387
420
|
] });
|
|
388
421
|
};
|
|
389
|
-
|
|
390
|
-
|
|
422
|
+
Hn.Title = wo;
|
|
423
|
+
Hn.Controls = yo;
|
|
391
424
|
const ot = ({
|
|
392
425
|
children: e,
|
|
393
426
|
className: n,
|
|
@@ -396,7 +429,7 @@ const ot = ({
|
|
|
396
429
|
...o
|
|
397
430
|
}) => {
|
|
398
431
|
const a = t || "section", l = L("content-section", n);
|
|
399
|
-
return /* @__PURE__ */ d(a, { ...o, className: l, children: /* @__PURE__ */ d(
|
|
432
|
+
return /* @__PURE__ */ d(a, { ...o, className: l, children: /* @__PURE__ */ d(Ii, { children: /* @__PURE__ */ d(Di, { size: i === "narrow" ? 6 : 12, children: /* @__PURE__ */ d(be, { children: e }) }) }) });
|
|
400
433
|
}, bo = ({ children: e, className: n, as: t, ...i }) => /* @__PURE__ */ d(
|
|
401
434
|
t || "h1",
|
|
402
435
|
{
|
|
@@ -409,7 +442,7 @@ ot.Title = bo;
|
|
|
409
442
|
ot.Header = So;
|
|
410
443
|
ot.Content = Co;
|
|
411
444
|
ot.Footer = _o;
|
|
412
|
-
const
|
|
445
|
+
const qn = ({
|
|
413
446
|
children: e,
|
|
414
447
|
className: n,
|
|
415
448
|
isVisible: t
|
|
@@ -424,7 +457,7 @@ const Hn = ({
|
|
|
424
457
|
), Jr = ({
|
|
425
458
|
children: e,
|
|
426
459
|
...n
|
|
427
|
-
}) => /* @__PURE__ */ d(
|
|
460
|
+
}) => /* @__PURE__ */ d(qn, { isVisible: !n["aria-hidden"], children: /* @__PURE__ */ d("div", { className: "p-form__nested-group", ...n, children: e }) }), Ro = ({
|
|
428
461
|
className: e,
|
|
429
462
|
currentPage: n,
|
|
430
463
|
error: t,
|
|
@@ -455,7 +488,7 @@ const Hn = ({
|
|
|
455
488
|
/* @__PURE__ */ d("strong", { children: "Page " }),
|
|
456
489
|
" ",
|
|
457
490
|
/* @__PURE__ */ d(
|
|
458
|
-
|
|
491
|
+
Ai,
|
|
459
492
|
{
|
|
460
493
|
"aria-label": "page number",
|
|
461
494
|
className: "p-pagination__input",
|
|
@@ -494,7 +527,7 @@ const Hn = ({
|
|
|
494
527
|
paginate: t,
|
|
495
528
|
totalPages: i
|
|
496
529
|
}) => {
|
|
497
|
-
const [o, a] =
|
|
530
|
+
const [o, a] = fe(e), [l, r] = fe("");
|
|
498
531
|
return /* @__PURE__ */ d(
|
|
499
532
|
Ro,
|
|
500
533
|
{
|
|
@@ -505,8 +538,8 @@ const Hn = ({
|
|
|
505
538
|
a(e), r("");
|
|
506
539
|
},
|
|
507
540
|
onInputChange: (g) => {
|
|
508
|
-
const { value:
|
|
509
|
-
|
|
541
|
+
const { value: u, valueAsNumber: m } = g.target;
|
|
542
|
+
u ? (a(m), m > i || m < 1 ? r(`${m} is not a valid page number.`) : (r(""), t(m))) : r("Enter a page number.");
|
|
510
543
|
},
|
|
511
544
|
onNextClick: () => {
|
|
512
545
|
a((g) => Number(g) + 1), t(Number(e) + 1);
|
|
@@ -544,7 +577,7 @@ var rn;
|
|
|
544
577
|
function ko() {
|
|
545
578
|
if (rn) return W;
|
|
546
579
|
rn = 1;
|
|
547
|
-
var e = typeof Symbol == "function" && Symbol.for, n = e ? Symbol.for("react.element") : 60103, t = e ? Symbol.for("react.portal") : 60106, i = e ? Symbol.for("react.fragment") : 60107, o = e ? Symbol.for("react.strict_mode") : 60108, a = e ? Symbol.for("react.profiler") : 60114, l = e ? Symbol.for("react.provider") : 60109, r = e ? Symbol.for("react.context") : 60110, s = e ? Symbol.for("react.async_mode") : 60111, c = e ? Symbol.for("react.concurrent_mode") : 60111,
|
|
580
|
+
var e = typeof Symbol == "function" && Symbol.for, n = e ? Symbol.for("react.element") : 60103, t = e ? Symbol.for("react.portal") : 60106, i = e ? Symbol.for("react.fragment") : 60107, o = e ? Symbol.for("react.strict_mode") : 60108, a = e ? Symbol.for("react.profiler") : 60114, l = e ? Symbol.for("react.provider") : 60109, r = e ? Symbol.for("react.context") : 60110, s = e ? Symbol.for("react.async_mode") : 60111, c = e ? Symbol.for("react.concurrent_mode") : 60111, p = e ? Symbol.for("react.forward_ref") : 60112, f = e ? Symbol.for("react.suspense") : 60113, g = e ? Symbol.for("react.suspense_list") : 60120, u = e ? Symbol.for("react.memo") : 60115, m = e ? Symbol.for("react.lazy") : 60116, v = e ? Symbol.for("react.block") : 60121, b = e ? Symbol.for("react.fundamental") : 60117, x = e ? Symbol.for("react.responder") : 60118, E = e ? Symbol.for("react.scope") : 60119;
|
|
548
581
|
function w(h) {
|
|
549
582
|
if (typeof h == "object" && h !== null) {
|
|
550
583
|
var P = h.$$typeof;
|
|
@@ -561,9 +594,9 @@ function ko() {
|
|
|
561
594
|
default:
|
|
562
595
|
switch (h = h && h.$$typeof, h) {
|
|
563
596
|
case r:
|
|
564
|
-
case u:
|
|
565
|
-
case m:
|
|
566
597
|
case p:
|
|
598
|
+
case m:
|
|
599
|
+
case u:
|
|
567
600
|
case l:
|
|
568
601
|
return h;
|
|
569
602
|
default:
|
|
@@ -578,7 +611,7 @@ function ko() {
|
|
|
578
611
|
function F(h) {
|
|
579
612
|
return w(h) === c;
|
|
580
613
|
}
|
|
581
|
-
return W.AsyncMode = s, W.ConcurrentMode = c, W.ContextConsumer = r, W.ContextProvider = l, W.Element = n, W.ForwardRef =
|
|
614
|
+
return W.AsyncMode = s, W.ConcurrentMode = c, W.ContextConsumer = r, W.ContextProvider = l, W.Element = n, W.ForwardRef = p, W.Fragment = i, W.Lazy = m, W.Memo = u, W.Portal = t, W.Profiler = a, W.StrictMode = o, W.Suspense = f, W.isAsyncMode = function(h) {
|
|
582
615
|
return F(h) || w(h) === s;
|
|
583
616
|
}, W.isConcurrentMode = F, W.isContextConsumer = function(h) {
|
|
584
617
|
return w(h) === r;
|
|
@@ -587,13 +620,13 @@ function ko() {
|
|
|
587
620
|
}, W.isElement = function(h) {
|
|
588
621
|
return typeof h == "object" && h !== null && h.$$typeof === n;
|
|
589
622
|
}, W.isForwardRef = function(h) {
|
|
590
|
-
return w(h) ===
|
|
623
|
+
return w(h) === p;
|
|
591
624
|
}, W.isFragment = function(h) {
|
|
592
625
|
return w(h) === i;
|
|
593
626
|
}, W.isLazy = function(h) {
|
|
594
627
|
return w(h) === m;
|
|
595
628
|
}, W.isMemo = function(h) {
|
|
596
|
-
return w(h) ===
|
|
629
|
+
return w(h) === u;
|
|
597
630
|
}, W.isPortal = function(h) {
|
|
598
631
|
return w(h) === t;
|
|
599
632
|
}, W.isProfiler = function(h) {
|
|
@@ -603,7 +636,7 @@ function ko() {
|
|
|
603
636
|
}, W.isSuspense = function(h) {
|
|
604
637
|
return w(h) === f;
|
|
605
638
|
}, W.isValidElementType = function(h) {
|
|
606
|
-
return typeof h == "string" || typeof h == "function" || h === i || h === c || h === a || h === o || h === f || h === g || typeof h == "object" && h !== null && (h.$$typeof === m || h.$$typeof ===
|
|
639
|
+
return typeof h == "string" || typeof h == "function" || h === i || h === c || h === a || h === o || h === f || h === g || typeof h == "object" && h !== null && (h.$$typeof === m || h.$$typeof === u || h.$$typeof === l || h.$$typeof === r || h.$$typeof === p || h.$$typeof === b || h.$$typeof === x || h.$$typeof === E || h.$$typeof === v);
|
|
607
640
|
}, W.typeOf = w, W;
|
|
608
641
|
}
|
|
609
642
|
var Y = {};
|
|
@@ -618,15 +651,15 @@ var Y = {};
|
|
|
618
651
|
var ln;
|
|
619
652
|
function Fo() {
|
|
620
653
|
return ln || (ln = 1, process.env.NODE_ENV !== "production" && function() {
|
|
621
|
-
var e = typeof Symbol == "function" && Symbol.for, n = e ? Symbol.for("react.element") : 60103, t = e ? Symbol.for("react.portal") : 60106, i = e ? Symbol.for("react.fragment") : 60107, o = e ? Symbol.for("react.strict_mode") : 60108, a = e ? Symbol.for("react.profiler") : 60114, l = e ? Symbol.for("react.provider") : 60109, r = e ? Symbol.for("react.context") : 60110, s = e ? Symbol.for("react.async_mode") : 60111, c = e ? Symbol.for("react.concurrent_mode") : 60111,
|
|
654
|
+
var e = typeof Symbol == "function" && Symbol.for, n = e ? Symbol.for("react.element") : 60103, t = e ? Symbol.for("react.portal") : 60106, i = e ? Symbol.for("react.fragment") : 60107, o = e ? Symbol.for("react.strict_mode") : 60108, a = e ? Symbol.for("react.profiler") : 60114, l = e ? Symbol.for("react.provider") : 60109, r = e ? Symbol.for("react.context") : 60110, s = e ? Symbol.for("react.async_mode") : 60111, c = e ? Symbol.for("react.concurrent_mode") : 60111, p = e ? Symbol.for("react.forward_ref") : 60112, f = e ? Symbol.for("react.suspense") : 60113, g = e ? Symbol.for("react.suspense_list") : 60120, u = e ? Symbol.for("react.memo") : 60115, m = e ? Symbol.for("react.lazy") : 60116, v = e ? Symbol.for("react.block") : 60121, b = e ? Symbol.for("react.fundamental") : 60117, x = e ? Symbol.for("react.responder") : 60118, E = e ? Symbol.for("react.scope") : 60119;
|
|
622
655
|
function w(S) {
|
|
623
656
|
return typeof S == "string" || typeof S == "function" || // Note: its typeof might be other than 'symbol' or 'number' if it's a polyfill.
|
|
624
|
-
S === i || S === c || S === a || S === o || S === f || S === g || typeof S == "object" && S !== null && (S.$$typeof === m || S.$$typeof ===
|
|
657
|
+
S === i || S === c || S === a || S === o || S === f || S === g || typeof S == "object" && S !== null && (S.$$typeof === m || S.$$typeof === u || S.$$typeof === l || S.$$typeof === r || S.$$typeof === p || S.$$typeof === b || S.$$typeof === x || S.$$typeof === E || S.$$typeof === v);
|
|
625
658
|
}
|
|
626
659
|
function F(S) {
|
|
627
660
|
if (typeof S == "object" && S !== null) {
|
|
628
|
-
var
|
|
629
|
-
switch (
|
|
661
|
+
var me = S.$$typeof;
|
|
662
|
+
switch (me) {
|
|
630
663
|
case n:
|
|
631
664
|
var Fe = S.type;
|
|
632
665
|
switch (Fe) {
|
|
@@ -641,21 +674,21 @@ function Fo() {
|
|
|
641
674
|
var Te = Fe && Fe.$$typeof;
|
|
642
675
|
switch (Te) {
|
|
643
676
|
case r:
|
|
644
|
-
case u:
|
|
645
|
-
case m:
|
|
646
677
|
case p:
|
|
678
|
+
case m:
|
|
679
|
+
case u:
|
|
647
680
|
case l:
|
|
648
681
|
return Te;
|
|
649
682
|
default:
|
|
650
|
-
return
|
|
683
|
+
return me;
|
|
651
684
|
}
|
|
652
685
|
}
|
|
653
686
|
case t:
|
|
654
|
-
return
|
|
687
|
+
return me;
|
|
655
688
|
}
|
|
656
689
|
}
|
|
657
690
|
}
|
|
658
|
-
var h = s, P = c, z = r, X = l, ee = n, ce =
|
|
691
|
+
var h = s, P = c, z = r, X = l, ee = n, ce = p, de = i, he = m, k = u, _ = t, q = a, K = o, J = f, ie = !1;
|
|
659
692
|
function te(S) {
|
|
660
693
|
return ie || (ie = !0, console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")), y(S) || F(S) === s;
|
|
661
694
|
}
|
|
@@ -672,7 +705,7 @@ function Fo() {
|
|
|
672
705
|
return typeof S == "object" && S !== null && S.$$typeof === n;
|
|
673
706
|
}
|
|
674
707
|
function I(S) {
|
|
675
|
-
return F(S) ===
|
|
708
|
+
return F(S) === p;
|
|
676
709
|
}
|
|
677
710
|
function N(S) {
|
|
678
711
|
return F(S) === i;
|
|
@@ -681,7 +714,7 @@ function Fo() {
|
|
|
681
714
|
return F(S) === m;
|
|
682
715
|
}
|
|
683
716
|
function T(S) {
|
|
684
|
-
return F(S) ===
|
|
717
|
+
return F(S) === u;
|
|
685
718
|
}
|
|
686
719
|
function H(S) {
|
|
687
720
|
return F(S) === t;
|
|
@@ -695,11 +728,11 @@ function Fo() {
|
|
|
695
728
|
function oe(S) {
|
|
696
729
|
return F(S) === f;
|
|
697
730
|
}
|
|
698
|
-
Y.AsyncMode = h, Y.ConcurrentMode = P, Y.ContextConsumer = z, Y.ContextProvider = X, Y.Element = ee, Y.ForwardRef = ce, Y.Fragment =
|
|
731
|
+
Y.AsyncMode = h, Y.ConcurrentMode = P, Y.ContextConsumer = z, Y.ContextProvider = X, Y.Element = ee, Y.ForwardRef = ce, Y.Fragment = de, Y.Lazy = he, Y.Memo = k, Y.Portal = _, Y.Profiler = q, Y.StrictMode = K, Y.Suspense = J, Y.isAsyncMode = te, Y.isConcurrentMode = y, Y.isContextConsumer = R, Y.isContextProvider = M, Y.isElement = j, Y.isForwardRef = I, Y.isFragment = N, Y.isLazy = O, Y.isMemo = T, Y.isPortal = H, Y.isProfiler = B, Y.isStrictMode = V, Y.isSuspense = oe, Y.isValidElementType = w, Y.typeOf = F;
|
|
699
732
|
}()), Y;
|
|
700
733
|
}
|
|
701
734
|
var sn;
|
|
702
|
-
function
|
|
735
|
+
function Gn() {
|
|
703
736
|
return sn || (sn = 1, process.env.NODE_ENV === "production" ? Ke.exports = ko() : Ke.exports = Fo()), Ke.exports;
|
|
704
737
|
}
|
|
705
738
|
/*
|
|
@@ -726,22 +759,22 @@ function Po() {
|
|
|
726
759
|
return !1;
|
|
727
760
|
for (var l = {}, r = 0; r < 10; r++)
|
|
728
761
|
l["_" + String.fromCharCode(r)] = r;
|
|
729
|
-
var s = Object.getOwnPropertyNames(l).map(function(
|
|
730
|
-
return l[
|
|
762
|
+
var s = Object.getOwnPropertyNames(l).map(function(p) {
|
|
763
|
+
return l[p];
|
|
731
764
|
});
|
|
732
765
|
if (s.join("") !== "0123456789")
|
|
733
766
|
return !1;
|
|
734
767
|
var c = {};
|
|
735
|
-
return "abcdefghijklmnopqrst".split("").forEach(function(
|
|
736
|
-
c[
|
|
768
|
+
return "abcdefghijklmnopqrst".split("").forEach(function(p) {
|
|
769
|
+
c[p] = p;
|
|
737
770
|
}), Object.keys(Object.assign({}, c)).join("") === "abcdefghijklmnopqrst";
|
|
738
771
|
} catch {
|
|
739
772
|
return !1;
|
|
740
773
|
}
|
|
741
774
|
}
|
|
742
775
|
return mt = o() ? Object.assign : function(a, l) {
|
|
743
|
-
for (var r, s = i(a), c,
|
|
744
|
-
r = Object(arguments[
|
|
776
|
+
for (var r, s = i(a), c, p = 1; p < arguments.length; p++) {
|
|
777
|
+
r = Object(arguments[p]);
|
|
745
778
|
for (var f in r)
|
|
746
779
|
n.call(r, f) && (s[f] = r[f]);
|
|
747
780
|
if (e) {
|
|
@@ -761,7 +794,7 @@ function Wt() {
|
|
|
761
794
|
return vt = e, vt;
|
|
762
795
|
}
|
|
763
796
|
var xt, un;
|
|
764
|
-
function
|
|
797
|
+
function Bn() {
|
|
765
798
|
return un || (un = 1, xt = Function.call.bind(Object.prototype.hasOwnProperty)), xt;
|
|
766
799
|
}
|
|
767
800
|
var ht, dn;
|
|
@@ -771,7 +804,7 @@ function Io() {
|
|
|
771
804
|
var e = function() {
|
|
772
805
|
};
|
|
773
806
|
if (process.env.NODE_ENV !== "production") {
|
|
774
|
-
var n = /* @__PURE__ */ Wt(), t = {}, i = /* @__PURE__ */
|
|
807
|
+
var n = /* @__PURE__ */ Wt(), t = {}, i = /* @__PURE__ */ Bn();
|
|
775
808
|
e = function(a) {
|
|
776
809
|
var l = "Warning: " + a;
|
|
777
810
|
typeof console < "u" && console.error(l);
|
|
@@ -783,27 +816,27 @@ function Io() {
|
|
|
783
816
|
}
|
|
784
817
|
function o(a, l, r, s, c) {
|
|
785
818
|
if (process.env.NODE_ENV !== "production") {
|
|
786
|
-
for (var
|
|
787
|
-
if (i(a,
|
|
819
|
+
for (var p in a)
|
|
820
|
+
if (i(a, p)) {
|
|
788
821
|
var f;
|
|
789
822
|
try {
|
|
790
|
-
if (typeof a[
|
|
823
|
+
if (typeof a[p] != "function") {
|
|
791
824
|
var g = Error(
|
|
792
|
-
(s || "React class") + ": " + r + " type `" +
|
|
825
|
+
(s || "React class") + ": " + r + " type `" + p + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof a[p] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`."
|
|
793
826
|
);
|
|
794
827
|
throw g.name = "Invariant Violation", g;
|
|
795
828
|
}
|
|
796
|
-
f = a[
|
|
829
|
+
f = a[p](l, p, s, r, null, n);
|
|
797
830
|
} catch (m) {
|
|
798
831
|
f = m;
|
|
799
832
|
}
|
|
800
833
|
if (f && !(f instanceof Error) && e(
|
|
801
|
-
(s || "React class") + ": type specification of " + r + " `" +
|
|
834
|
+
(s || "React class") + ": type specification of " + r + " `" + p + "` is invalid; the type checker function must return `null` or an `Error` but returned a " + typeof f + ". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."
|
|
802
835
|
), f instanceof Error && !(f.message in t)) {
|
|
803
836
|
t[f.message] = !0;
|
|
804
|
-
var
|
|
837
|
+
var u = c ? c() : "";
|
|
805
838
|
e(
|
|
806
|
-
"Failed " + r + " type: " + f.message + (
|
|
839
|
+
"Failed " + r + " type: " + f.message + (u ?? "")
|
|
807
840
|
);
|
|
808
841
|
}
|
|
809
842
|
}
|
|
@@ -817,7 +850,7 @@ var wt, gn;
|
|
|
817
850
|
function Do() {
|
|
818
851
|
if (gn) return wt;
|
|
819
852
|
gn = 1;
|
|
820
|
-
var e =
|
|
853
|
+
var e = Gn(), n = Po(), t = /* @__PURE__ */ Wt(), i = /* @__PURE__ */ Bn(), o = /* @__PURE__ */ Io(), a = function() {
|
|
821
854
|
};
|
|
822
855
|
process.env.NODE_ENV !== "production" && (a = function(r) {
|
|
823
856
|
var s = "Warning: " + r;
|
|
@@ -831,13 +864,13 @@ function Do() {
|
|
|
831
864
|
return null;
|
|
832
865
|
}
|
|
833
866
|
return wt = function(r, s) {
|
|
834
|
-
var c = typeof Symbol == "function" && Symbol.iterator,
|
|
867
|
+
var c = typeof Symbol == "function" && Symbol.iterator, p = "@@iterator";
|
|
835
868
|
function f(y) {
|
|
836
|
-
var R = y && (c && y[c] || y[
|
|
869
|
+
var R = y && (c && y[c] || y[p]);
|
|
837
870
|
if (typeof R == "function")
|
|
838
871
|
return R;
|
|
839
872
|
}
|
|
840
|
-
var g = "<<anonymous>>",
|
|
873
|
+
var g = "<<anonymous>>", u = {
|
|
841
874
|
array: x("array"),
|
|
842
875
|
bigint: x("bigint"),
|
|
843
876
|
bool: x("boolean"),
|
|
@@ -876,11 +909,11 @@ function Do() {
|
|
|
876
909
|
);
|
|
877
910
|
throw S.name = "Invariant Violation", S;
|
|
878
911
|
} else if (process.env.NODE_ENV !== "production" && typeof console < "u") {
|
|
879
|
-
var
|
|
880
|
-
!R[
|
|
912
|
+
var me = H + ":" + T;
|
|
913
|
+
!R[me] && // Avoid spamming the console because they are often not actionable except for lib authors
|
|
881
914
|
M < 3 && (a(
|
|
882
915
|
"You are manually calling a React.PropTypes validation function for the `" + V + "` prop on `" + H + "`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details."
|
|
883
|
-
), R[
|
|
916
|
+
), R[me] = !0, M++);
|
|
884
917
|
}
|
|
885
918
|
}
|
|
886
919
|
return O[T] == null ? N ? O[T] === null ? new v("The " + B + " `" + V + "` is marked as required " + ("in `" + H + "`, but its value is `null`.")) : new v("The " + B + " `" + V + "` is marked as required in " + ("`" + H + "`, but its value is `undefined`.")) : null : y(O, T, H, B, V);
|
|
@@ -965,8 +998,8 @@ function Do() {
|
|
|
965
998
|
if (m(T, y[H]))
|
|
966
999
|
return null;
|
|
967
1000
|
var B = JSON.stringify(y, function(oe, S) {
|
|
968
|
-
var
|
|
969
|
-
return
|
|
1001
|
+
var me = J(S);
|
|
1002
|
+
return me === "symbol" ? String(S) : S;
|
|
970
1003
|
});
|
|
971
1004
|
return new v("Invalid " + N + " `" + O + "` of value `" + String(T) + "` " + ("supplied to `" + I + "`, expected one of " + B + "."));
|
|
972
1005
|
}
|
|
@@ -1006,8 +1039,8 @@ function Do() {
|
|
|
1006
1039
|
return null;
|
|
1007
1040
|
S.data && i(S.data, "expectedType") && B.push(S.data.expectedType);
|
|
1008
1041
|
}
|
|
1009
|
-
var
|
|
1010
|
-
return new v("Invalid " + T + " `" + H + "` supplied to " + ("`" + O + "`" +
|
|
1042
|
+
var me = B.length > 0 ? ", expected one of type [" + B.join(", ") + "]" : "";
|
|
1043
|
+
return new v("Invalid " + T + " `" + H + "` supplied to " + ("`" + O + "`" + me + "."));
|
|
1011
1044
|
}
|
|
1012
1045
|
return b(j);
|
|
1013
1046
|
}
|
|
@@ -1017,7 +1050,7 @@ function Do() {
|
|
|
1017
1050
|
}
|
|
1018
1051
|
return b(y);
|
|
1019
1052
|
}
|
|
1020
|
-
function
|
|
1053
|
+
function de(y, R, M, j, I) {
|
|
1021
1054
|
return new v(
|
|
1022
1055
|
(y || "React class") + ": " + R + " type `" + M + "." + j + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + I + "`."
|
|
1023
1056
|
);
|
|
@@ -1030,7 +1063,7 @@ function Do() {
|
|
|
1030
1063
|
for (var B in y) {
|
|
1031
1064
|
var V = y[B];
|
|
1032
1065
|
if (typeof V != "function")
|
|
1033
|
-
return
|
|
1066
|
+
return de(I, N, O, B, J(V));
|
|
1034
1067
|
var oe = V(T, B, I, N, O + "." + B, t);
|
|
1035
1068
|
if (oe)
|
|
1036
1069
|
return oe;
|
|
@@ -1048,7 +1081,7 @@ function Do() {
|
|
|
1048
1081
|
for (var V in B) {
|
|
1049
1082
|
var oe = y[V];
|
|
1050
1083
|
if (i(y, V) && typeof oe != "function")
|
|
1051
|
-
return
|
|
1084
|
+
return de(I, N, O, V, J(oe));
|
|
1052
1085
|
if (!oe)
|
|
1053
1086
|
return new v(
|
|
1054
1087
|
"Invalid " + N + " `" + O + "` key `" + V + "` supplied to `" + I + "`.\nBad object: " + JSON.stringify(M[j], null, " ") + `
|
|
@@ -1131,7 +1164,7 @@ Valid keys: ` + JSON.stringify(Object.keys(y), null, " ")
|
|
|
1131
1164
|
function te(y) {
|
|
1132
1165
|
return !y.constructor || !y.constructor.name ? g : y.constructor.name;
|
|
1133
1166
|
}
|
|
1134
|
-
return
|
|
1167
|
+
return u.checkPropTypes = o, u.resetWarningCache = o.resetWarningCache, u.PropTypes = u, u;
|
|
1135
1168
|
}, wt;
|
|
1136
1169
|
}
|
|
1137
1170
|
var yt, fn;
|
|
@@ -1144,7 +1177,7 @@ function Ao() {
|
|
|
1144
1177
|
function t() {
|
|
1145
1178
|
}
|
|
1146
1179
|
return t.resetWarningCache = n, yt = function() {
|
|
1147
|
-
function i(l, r, s, c,
|
|
1180
|
+
function i(l, r, s, c, p, f) {
|
|
1148
1181
|
if (f !== e) {
|
|
1149
1182
|
var g = new Error(
|
|
1150
1183
|
"Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types"
|
|
@@ -1186,7 +1219,7 @@ var mn;
|
|
|
1186
1219
|
function $o() {
|
|
1187
1220
|
if (mn) return Ue.exports;
|
|
1188
1221
|
if (mn = 1, process.env.NODE_ENV !== "production") {
|
|
1189
|
-
var e =
|
|
1222
|
+
var e = Gn(), n = !0;
|
|
1190
1223
|
Ue.exports = /* @__PURE__ */ Do()(e.isElement, n);
|
|
1191
1224
|
} else
|
|
1192
1225
|
Ue.exports = /* @__PURE__ */ Ao()();
|
|
@@ -1201,22 +1234,22 @@ function De(e, n, t, i) {
|
|
|
1201
1234
|
});
|
|
1202
1235
|
}
|
|
1203
1236
|
return new (t || (t = Promise))(function(a, l) {
|
|
1204
|
-
function r(
|
|
1237
|
+
function r(p) {
|
|
1205
1238
|
try {
|
|
1206
|
-
c(i.next(
|
|
1239
|
+
c(i.next(p));
|
|
1207
1240
|
} catch (f) {
|
|
1208
1241
|
l(f);
|
|
1209
1242
|
}
|
|
1210
1243
|
}
|
|
1211
|
-
function s(
|
|
1244
|
+
function s(p) {
|
|
1212
1245
|
try {
|
|
1213
|
-
c(i.throw(
|
|
1246
|
+
c(i.throw(p));
|
|
1214
1247
|
} catch (f) {
|
|
1215
1248
|
l(f);
|
|
1216
1249
|
}
|
|
1217
1250
|
}
|
|
1218
|
-
function c(
|
|
1219
|
-
|
|
1251
|
+
function c(p) {
|
|
1252
|
+
p.done ? a(p.value) : o(p.value).then(r, s);
|
|
1220
1253
|
}
|
|
1221
1254
|
c((i = i.apply(e, n || [])).next());
|
|
1222
1255
|
});
|
|
@@ -2485,7 +2518,7 @@ function qo(e, n) {
|
|
|
2485
2518
|
if (n !== "drop")
|
|
2486
2519
|
return t;
|
|
2487
2520
|
const i = yield Promise.all(t.map(Go));
|
|
2488
|
-
return xn(
|
|
2521
|
+
return xn(Un(i));
|
|
2489
2522
|
}
|
|
2490
2523
|
return xn(Dt(e.files).map((t) => je(t)));
|
|
2491
2524
|
});
|
|
@@ -2507,12 +2540,12 @@ function Go(e) {
|
|
|
2507
2540
|
if (typeof e.webkitGetAsEntry != "function")
|
|
2508
2541
|
return hn(e);
|
|
2509
2542
|
const n = e.webkitGetAsEntry();
|
|
2510
|
-
return n && n.isDirectory ?
|
|
2543
|
+
return n && n.isDirectory ? Kn(n) : hn(e, n);
|
|
2511
2544
|
}
|
|
2512
|
-
function
|
|
2545
|
+
function Un(e) {
|
|
2513
2546
|
return e.reduce((n, t) => [
|
|
2514
2547
|
...n,
|
|
2515
|
-
...Array.isArray(t) ?
|
|
2548
|
+
...Array.isArray(t) ? Un(t) : [t]
|
|
2516
2549
|
], []);
|
|
2517
2550
|
}
|
|
2518
2551
|
function hn(e, n) {
|
|
@@ -2535,10 +2568,10 @@ function hn(e, n) {
|
|
|
2535
2568
|
}
|
|
2536
2569
|
function Bo(e) {
|
|
2537
2570
|
return De(this, void 0, void 0, function* () {
|
|
2538
|
-
return e.isDirectory ?
|
|
2571
|
+
return e.isDirectory ? Kn(e) : Uo(e);
|
|
2539
2572
|
});
|
|
2540
2573
|
}
|
|
2541
|
-
function
|
|
2574
|
+
function Kn(e) {
|
|
2542
2575
|
const n = e.createReader();
|
|
2543
2576
|
return new Promise((t, i) => {
|
|
2544
2577
|
const o = [];
|
|
@@ -2592,7 +2625,7 @@ function Ko() {
|
|
|
2592
2625
|
var Wo = Ko();
|
|
2593
2626
|
const bt = /* @__PURE__ */ Bt(Wo);
|
|
2594
2627
|
function yn(e) {
|
|
2595
|
-
return Qo(e) || Xo(e) ||
|
|
2628
|
+
return Qo(e) || Xo(e) || Yn(e) || Yo();
|
|
2596
2629
|
}
|
|
2597
2630
|
function Yo() {
|
|
2598
2631
|
throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
@@ -2618,24 +2651,24 @@ function Sn(e) {
|
|
|
2618
2651
|
for (var n = 1; n < arguments.length; n++) {
|
|
2619
2652
|
var t = arguments[n] != null ? arguments[n] : {};
|
|
2620
2653
|
n % 2 ? bn(Object(t), !0).forEach(function(i) {
|
|
2621
|
-
|
|
2654
|
+
Wn(e, i, t[i]);
|
|
2622
2655
|
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : bn(Object(t)).forEach(function(i) {
|
|
2623
2656
|
Object.defineProperty(e, i, Object.getOwnPropertyDescriptor(t, i));
|
|
2624
2657
|
});
|
|
2625
2658
|
}
|
|
2626
2659
|
return e;
|
|
2627
2660
|
}
|
|
2628
|
-
function
|
|
2661
|
+
function Wn(e, n, t) {
|
|
2629
2662
|
return n in e ? Object.defineProperty(e, n, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[n] = t, e;
|
|
2630
2663
|
}
|
|
2631
2664
|
function He(e, n) {
|
|
2632
|
-
return ea(e) || Zo(e, n) ||
|
|
2665
|
+
return ea(e) || Zo(e, n) || Yn(e, n) || Jo();
|
|
2633
2666
|
}
|
|
2634
2667
|
function Jo() {
|
|
2635
2668
|
throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
2636
2669
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
|
|
2637
2670
|
}
|
|
2638
|
-
function
|
|
2671
|
+
function Yn(e, n) {
|
|
2639
2672
|
if (e) {
|
|
2640
2673
|
if (typeof e == "string") return At(e, n);
|
|
2641
2674
|
var t = Object.prototype.toString.call(e).slice(8, -1);
|
|
@@ -2691,11 +2724,11 @@ var ta = typeof bt == "function" ? bt : bt.default, na = "file-invalid-type", ia
|
|
|
2691
2724
|
code: aa,
|
|
2692
2725
|
message: "Too many files"
|
|
2693
2726
|
};
|
|
2694
|
-
function
|
|
2727
|
+
function Xn(e, n) {
|
|
2695
2728
|
var t = e.type === "application/x-moz-file" || ta(e, n);
|
|
2696
2729
|
return [t, t ? null : ra(n)];
|
|
2697
2730
|
}
|
|
2698
|
-
function
|
|
2731
|
+
function Qn(e, n, t) {
|
|
2699
2732
|
if (Pe(e.size))
|
|
2700
2733
|
if (Pe(n) && Pe(t)) {
|
|
2701
2734
|
if (e.size > t) return [!1, Cn(t)];
|
|
@@ -2712,7 +2745,7 @@ function Pe(e) {
|
|
|
2712
2745
|
function sa(e) {
|
|
2713
2746
|
var n = e.files, t = e.accept, i = e.minSize, o = e.maxSize, a = e.multiple, l = e.maxFiles, r = e.validator;
|
|
2714
2747
|
return !a && n.length > 1 || a && l >= 1 && n.length > l ? !1 : n.every(function(s) {
|
|
2715
|
-
var c =
|
|
2748
|
+
var c = Xn(s, t), p = He(c, 1), f = p[0], g = Qn(s, i, o), u = He(g, 1), m = u[0], v = r ? r(s) : null;
|
|
2716
2749
|
return f && m && !v;
|
|
2717
2750
|
});
|
|
2718
2751
|
}
|
|
@@ -2755,10 +2788,10 @@ function ga(e) {
|
|
|
2755
2788
|
if (Pe(e)) {
|
|
2756
2789
|
var n = Object.entries(e).filter(function(t) {
|
|
2757
2790
|
var i = He(t, 2), o = i[0], a = i[1], l = !0;
|
|
2758
|
-
return
|
|
2791
|
+
return Jn(o) || (console.warn('Skipped "'.concat(o, '" because it is not a valid MIME type. Check https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types/Common_types for a list of valid MIME types.')), l = !1), (!Array.isArray(a) || !a.every(Zn)) && (console.warn('Skipped "'.concat(o, '" because an invalid file extension was provided.')), l = !1), l;
|
|
2759
2792
|
}).reduce(function(t, i) {
|
|
2760
2793
|
var o = He(i, 2), a = o[0], l = o[1];
|
|
2761
|
-
return Sn(Sn({}, t), {},
|
|
2794
|
+
return Sn(Sn({}, t), {}, Wn({}, a, l));
|
|
2762
2795
|
}, {});
|
|
2763
2796
|
return [{
|
|
2764
2797
|
// description is required due to https://crbug.com/1264708
|
|
@@ -2774,7 +2807,7 @@ function fa(e) {
|
|
|
2774
2807
|
var i = He(t, 2), o = i[0], a = i[1];
|
|
2775
2808
|
return [].concat(yn(n), [o], yn(a));
|
|
2776
2809
|
}, []).filter(function(n) {
|
|
2777
|
-
return
|
|
2810
|
+
return Jn(n) || Zn(n);
|
|
2778
2811
|
}).join(",");
|
|
2779
2812
|
}
|
|
2780
2813
|
function ma(e) {
|
|
@@ -2783,15 +2816,15 @@ function ma(e) {
|
|
|
2783
2816
|
function va(e) {
|
|
2784
2817
|
return e instanceof DOMException && (e.name === "SecurityError" || e.code === e.SECURITY_ERR);
|
|
2785
2818
|
}
|
|
2786
|
-
function
|
|
2819
|
+
function Jn(e) {
|
|
2787
2820
|
return e === "audio/*" || e === "video/*" || e === "image/*" || e === "text/*" || e === "application/*" || /\w+\/[-+.\w]+/g.test(e);
|
|
2788
2821
|
}
|
|
2789
|
-
function
|
|
2822
|
+
function Zn(e) {
|
|
2790
2823
|
return /^.*\.[\w]+$/.test(e);
|
|
2791
2824
|
}
|
|
2792
2825
|
var xa = ["children"], ha = ["open"], wa = ["refKey", "role", "onKeyDown", "onFocus", "onBlur", "onClick", "onDragEnter", "onDragOver", "onDragLeave", "onDrop"], ya = ["refKey", "onChange", "onClick"];
|
|
2793
2826
|
function ba(e) {
|
|
2794
|
-
return _a(e) || Ca(e) ||
|
|
2827
|
+
return _a(e) || Ca(e) || ei(e) || Sa();
|
|
2795
2828
|
}
|
|
2796
2829
|
function Sa() {
|
|
2797
2830
|
throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
@@ -2804,13 +2837,13 @@ function _a(e) {
|
|
|
2804
2837
|
if (Array.isArray(e)) return $t(e);
|
|
2805
2838
|
}
|
|
2806
2839
|
function St(e, n) {
|
|
2807
|
-
return ka(e) || Ea(e, n) ||
|
|
2840
|
+
return ka(e) || Ea(e, n) || ei(e, n) || Ra();
|
|
2808
2841
|
}
|
|
2809
2842
|
function Ra() {
|
|
2810
2843
|
throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
2811
2844
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
|
|
2812
2845
|
}
|
|
2813
|
-
function
|
|
2846
|
+
function ei(e, n) {
|
|
2814
2847
|
if (e) {
|
|
2815
2848
|
if (typeof e == "string") return $t(e, n);
|
|
2816
2849
|
var t = Object.prototype.toString.call(e).slice(8, -1);
|
|
@@ -2887,18 +2920,18 @@ function Fa(e, n) {
|
|
|
2887
2920
|
o = i[a], !(n.indexOf(o) >= 0) && (t[o] = e[o]);
|
|
2888
2921
|
return t;
|
|
2889
2922
|
}
|
|
2890
|
-
var Yt = /* @__PURE__ */
|
|
2891
|
-
var t = e.children, i = it(e, xa), o =
|
|
2892
|
-
return
|
|
2923
|
+
var Yt = /* @__PURE__ */ Ei(function(e, n) {
|
|
2924
|
+
var t = e.children, i = it(e, xa), o = ni(i), a = o.open, l = it(o, ha);
|
|
2925
|
+
return ki(n, function() {
|
|
2893
2926
|
return {
|
|
2894
2927
|
open: a
|
|
2895
2928
|
};
|
|
2896
|
-
}, [a]), /* @__PURE__ */
|
|
2929
|
+
}, [a]), /* @__PURE__ */ _i.createElement(On, null, t(Z(Z({}, l), {}, {
|
|
2897
2930
|
open: a
|
|
2898
2931
|
})));
|
|
2899
2932
|
});
|
|
2900
2933
|
Yt.displayName = "Dropzone";
|
|
2901
|
-
var
|
|
2934
|
+
var ti = {
|
|
2902
2935
|
disabled: !1,
|
|
2903
2936
|
getFilesFromEvent: zo,
|
|
2904
2937
|
maxSize: 1 / 0,
|
|
@@ -2914,7 +2947,7 @@ var ei = {
|
|
|
2914
2947
|
useFsAccessApi: !1,
|
|
2915
2948
|
autoFocus: !1
|
|
2916
2949
|
};
|
|
2917
|
-
Yt.defaultProps =
|
|
2950
|
+
Yt.defaultProps = ti;
|
|
2918
2951
|
Yt.propTypes = {
|
|
2919
2952
|
/**
|
|
2920
2953
|
* Render function that exposes the dropzone state and prop getter fns
|
|
@@ -3092,16 +3125,16 @@ var Ot = {
|
|
|
3092
3125
|
acceptedFiles: [],
|
|
3093
3126
|
fileRejections: []
|
|
3094
3127
|
};
|
|
3095
|
-
function
|
|
3096
|
-
var e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, n = Z(Z({},
|
|
3128
|
+
function ni() {
|
|
3129
|
+
var e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, n = Z(Z({}, ti), e), t = n.accept, i = n.disabled, o = n.getFilesFromEvent, a = n.maxSize, l = n.minSize, r = n.multiple, s = n.maxFiles, c = n.onDragEnter, p = n.onDragLeave, f = n.onDragOver, g = n.onDrop, u = n.onDropAccepted, m = n.onDropRejected, v = n.onFileDialogCancel, b = n.onFileDialogOpen, x = n.useFsAccessApi, E = n.autoFocus, w = n.preventDropOnDocument, F = n.noClick, h = n.noKeyboard, P = n.noDrag, z = n.noDragEventsBubbling, X = n.onError, ee = n.validator, ce = le(function() {
|
|
3097
3130
|
return fa(t);
|
|
3098
|
-
}, [t]),
|
|
3131
|
+
}, [t]), de = le(function() {
|
|
3099
3132
|
return ga(t);
|
|
3100
3133
|
}, [t]), he = le(function() {
|
|
3101
3134
|
return typeof b == "function" ? b : kn;
|
|
3102
3135
|
}, [b]), k = le(function() {
|
|
3103
3136
|
return typeof v == "function" ? v : kn;
|
|
3104
|
-
}, [v]), _ =
|
|
3137
|
+
}, [v]), _ = ge(null), q = ge(null), K = Mn(Pa, Ot), J = St(K, 2), ie = J[0], te = J[1], y = ie.isFocused, R = ie.isFileDialogActive, M = ge(typeof window < "u" && window.isSecureContext && x && da()), j = function() {
|
|
3105
3138
|
!M.current && R && setTimeout(function() {
|
|
3106
3139
|
if (q.current) {
|
|
3107
3140
|
var $ = q.current.files;
|
|
@@ -3111,19 +3144,19 @@ function ti() {
|
|
|
3111
3144
|
}
|
|
3112
3145
|
}, 300);
|
|
3113
3146
|
};
|
|
3114
|
-
|
|
3147
|
+
ue(function() {
|
|
3115
3148
|
return window.addEventListener("focus", j, !1), function() {
|
|
3116
3149
|
window.removeEventListener("focus", j, !1);
|
|
3117
3150
|
};
|
|
3118
3151
|
}, [q, R, k, M]);
|
|
3119
|
-
var I =
|
|
3152
|
+
var I = ge([]), N = function($) {
|
|
3120
3153
|
_.current && _.current.contains($.target) || ($.preventDefault(), I.current = []);
|
|
3121
3154
|
};
|
|
3122
|
-
|
|
3155
|
+
ue(function() {
|
|
3123
3156
|
return w && (document.addEventListener("dragover", Rn, !1), document.addEventListener("drop", N, !1)), function() {
|
|
3124
3157
|
w && (document.removeEventListener("dragover", Rn), document.removeEventListener("drop", N));
|
|
3125
3158
|
};
|
|
3126
|
-
}, [_, w]),
|
|
3159
|
+
}, [_, w]), ue(function() {
|
|
3127
3160
|
return !i && E && _.current && _.current.focus(), function() {
|
|
3128
3161
|
};
|
|
3129
3162
|
}, [_, E, i]);
|
|
@@ -3140,10 +3173,10 @@ function ti() {
|
|
|
3140
3173
|
multiple: r,
|
|
3141
3174
|
maxFiles: s,
|
|
3142
3175
|
validator: ee
|
|
3143
|
-
}),
|
|
3176
|
+
}), ve = ne > 0 && !ae;
|
|
3144
3177
|
te({
|
|
3145
3178
|
isDragAccept: ae,
|
|
3146
|
-
isDragReject:
|
|
3179
|
+
isDragReject: ve,
|
|
3147
3180
|
isDragActive: !0,
|
|
3148
3181
|
type: "setDraggedFiles"
|
|
3149
3182
|
}), c && c(C);
|
|
@@ -3170,25 +3203,25 @@ function ti() {
|
|
|
3170
3203
|
isDragActive: !1,
|
|
3171
3204
|
isDragAccept: !1,
|
|
3172
3205
|
isDragReject: !1
|
|
3173
|
-
}), Ye(C) &&
|
|
3174
|
-
}, [_,
|
|
3206
|
+
}), Ye(C) && p && p(C));
|
|
3207
|
+
}, [_, p, z]), V = U(function(C, $) {
|
|
3175
3208
|
var ne = [], ae = [];
|
|
3176
|
-
C.forEach(function(
|
|
3177
|
-
var ze =
|
|
3209
|
+
C.forEach(function(ve) {
|
|
3210
|
+
var ze = Xn(ve, ce), $e = St(ze, 2), lt = $e[0], st = $e[1], ct = Qn(ve, l, a), Be = St(ct, 2), pt = Be[0], ut = Be[1], dt = ee ? ee(ve) : null;
|
|
3178
3211
|
if (lt && pt && !dt)
|
|
3179
|
-
ne.push(
|
|
3212
|
+
ne.push(ve);
|
|
3180
3213
|
else {
|
|
3181
3214
|
var gt = [st, ut];
|
|
3182
3215
|
dt && (gt = gt.concat(dt)), ae.push({
|
|
3183
|
-
file:
|
|
3184
|
-
errors: gt.filter(function(
|
|
3185
|
-
return
|
|
3216
|
+
file: ve,
|
|
3217
|
+
errors: gt.filter(function(Ci) {
|
|
3218
|
+
return Ci;
|
|
3186
3219
|
})
|
|
3187
3220
|
});
|
|
3188
3221
|
}
|
|
3189
|
-
}), (!r && ne.length > 1 || r && s >= 1 && ne.length > s) && (ne.forEach(function(
|
|
3222
|
+
}), (!r && ne.length > 1 || r && s >= 1 && ne.length > s) && (ne.forEach(function(ve) {
|
|
3190
3223
|
ae.push({
|
|
3191
|
-
file:
|
|
3224
|
+
file: ve,
|
|
3192
3225
|
errors: [la]
|
|
3193
3226
|
});
|
|
3194
3227
|
}), ne.splice(0)), te({
|
|
@@ -3196,8 +3229,8 @@ function ti() {
|
|
|
3196
3229
|
fileRejections: ae,
|
|
3197
3230
|
isDragReject: ae.length > 0,
|
|
3198
3231
|
type: "setFiles"
|
|
3199
|
-
}), g && g(ne, ae, $), ae.length > 0 && m && m(ae, $), ne.length > 0 &&
|
|
3200
|
-
}, [te, r, ce, l, a, s, g,
|
|
3232
|
+
}), g && g(ne, ae, $), ae.length > 0 && m && m(ae, $), ne.length > 0 && u && u(ne, $);
|
|
3233
|
+
}, [te, r, ce, l, a, s, g, u, m, ee]), oe = U(function(C) {
|
|
3201
3234
|
C.preventDefault(), C.persist(), Ge(C), I.current = [], Ye(C) && Promise.resolve(o(C)).then(function($) {
|
|
3202
3235
|
nt(C) && !z || V($, C);
|
|
3203
3236
|
}).catch(function($) {
|
|
@@ -3212,7 +3245,7 @@ function ti() {
|
|
|
3212
3245
|
}), he();
|
|
3213
3246
|
var C = {
|
|
3214
3247
|
multiple: r,
|
|
3215
|
-
types:
|
|
3248
|
+
types: de
|
|
3216
3249
|
};
|
|
3217
3250
|
window.showOpenFilePicker(C).then(function($) {
|
|
3218
3251
|
return o($);
|
|
@@ -3230,7 +3263,7 @@ function ti() {
|
|
|
3230
3263
|
q.current && (te({
|
|
3231
3264
|
type: "openDialog"
|
|
3232
3265
|
}), he(), q.current.value = null, q.current.click());
|
|
3233
|
-
}, [te, he, k, x, V, O,
|
|
3266
|
+
}, [te, he, k, x, V, O, de, r]), me = U(function(C) {
|
|
3234
3267
|
!_.current || !_.current.isEqualNode(C.target) || (C.key === " " || C.key === "Enter" || C.keyCode === 32 || C.keyCode === 13) && (C.preventDefault(), S());
|
|
3235
3268
|
}, [_, S]), Fe = U(function() {
|
|
3236
3269
|
te({
|
|
@@ -3250,11 +3283,11 @@ function ti() {
|
|
|
3250
3283
|
return P ? null : Ae($);
|
|
3251
3284
|
}, Ge = function($) {
|
|
3252
3285
|
z && $.stopPropagation();
|
|
3253
|
-
},
|
|
3286
|
+
}, yi = le(function() {
|
|
3254
3287
|
return function() {
|
|
3255
|
-
var C = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, $ = C.refKey, ne = $ === void 0 ? "ref" : $, ae = C.role,
|
|
3288
|
+
var C = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, $ = C.refKey, ne = $ === void 0 ? "ref" : $, ae = C.role, ve = C.onKeyDown, ze = C.onFocus, $e = C.onBlur, lt = C.onClick, st = C.onDragEnter, ct = C.onDragOver, Be = C.onDragLeave, pt = C.onDrop, ut = it(C, wa);
|
|
3256
3289
|
return Z(Z(Mt({
|
|
3257
|
-
onKeyDown: rt(Se(
|
|
3290
|
+
onKeyDown: rt(Se(ve, me)),
|
|
3258
3291
|
onFocus: rt(Se(ze, Fe)),
|
|
3259
3292
|
onBlur: rt(Se($e, Te)),
|
|
3260
3293
|
onClick: Ae(Se(lt, Zt)),
|
|
@@ -3267,11 +3300,11 @@ function ti() {
|
|
|
3267
3300
|
tabIndex: 0
|
|
3268
3301
|
} : {}), ut);
|
|
3269
3302
|
};
|
|
3270
|
-
}, [_,
|
|
3303
|
+
}, [_, me, Fe, Te, Zt, T, H, B, oe, h, P, i]), bi = U(function(C) {
|
|
3271
3304
|
C.stopPropagation();
|
|
3272
|
-
}, []),
|
|
3305
|
+
}, []), Si = le(function() {
|
|
3273
3306
|
return function() {
|
|
3274
|
-
var C = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, $ = C.refKey, ne = $ === void 0 ? "ref" : $, ae = C.onChange,
|
|
3307
|
+
var C = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, $ = C.refKey, ne = $ === void 0 ? "ref" : $, ae = C.onChange, ve = C.onClick, ze = it(C, ya), $e = Mt({
|
|
3275
3308
|
accept: ce,
|
|
3276
3309
|
multiple: r,
|
|
3277
3310
|
type: "file",
|
|
@@ -3288,7 +3321,7 @@ function ti() {
|
|
|
3288
3321
|
whiteSpace: "nowrap"
|
|
3289
3322
|
},
|
|
3290
3323
|
onChange: Ae(Se(ae, oe)),
|
|
3291
|
-
onClick: Ae(Se(
|
|
3324
|
+
onClick: Ae(Se(ve, bi)),
|
|
3292
3325
|
tabIndex: -1
|
|
3293
3326
|
}, ne, q);
|
|
3294
3327
|
return Z(Z({}, $e), ze);
|
|
@@ -3296,8 +3329,8 @@ function ti() {
|
|
|
3296
3329
|
}, [q, t, r, oe, i]);
|
|
3297
3330
|
return Z(Z({}, ie), {}, {
|
|
3298
3331
|
isFocused: y && !i,
|
|
3299
|
-
getRootProps:
|
|
3300
|
-
getInputProps:
|
|
3332
|
+
getRootProps: yi,
|
|
3333
|
+
getInputProps: Si,
|
|
3301
3334
|
rootRef: _,
|
|
3302
3335
|
inputRef: q,
|
|
3303
3336
|
open: Ae(S)
|
|
@@ -3395,11 +3428,11 @@ const Ia = () => {
|
|
|
3395
3428
|
minSize: r,
|
|
3396
3429
|
onFileUpload: s,
|
|
3397
3430
|
onRemoveFile: c,
|
|
3398
|
-
rejectedFiles:
|
|
3431
|
+
rejectedFiles: p
|
|
3399
3432
|
}) => {
|
|
3400
|
-
const f = Ia(), g = t ?? f.acceptedFiles,
|
|
3433
|
+
const f = Ia(), g = t ?? f.acceptedFiles, u = p ?? f.fileRejections, m = s ?? f.onFileUpload, v = (w) => {
|
|
3401
3434
|
c ? c(w) : "file" in w && "errors" in w ? f.removeRejectedFile(w) : f.removeFile(w);
|
|
3402
|
-
}, { getRootProps: b, getInputProps: x } =
|
|
3435
|
+
}, { getRootProps: b, getInputProps: x } = ni({
|
|
3403
3436
|
accept: e,
|
|
3404
3437
|
maxFiles: a,
|
|
3405
3438
|
maxSize: l,
|
|
@@ -3413,10 +3446,10 @@ const Ia = () => {
|
|
|
3413
3446
|
"is-error": !!n
|
|
3414
3447
|
}),
|
|
3415
3448
|
children: [
|
|
3416
|
-
o && /* @__PURE__ */ d(
|
|
3449
|
+
o && /* @__PURE__ */ d($i, { id: E, children: o }),
|
|
3417
3450
|
i && /* @__PURE__ */ d("p", { className: "p-form-help-text", children: i }),
|
|
3418
3451
|
/* @__PURE__ */ G("div", { className: "p-form__control", children: [
|
|
3419
|
-
!a || g.length +
|
|
3452
|
+
!a || g.length + u.length < a ? /* @__PURE__ */ d("div", { className: "file-upload__wrapper", children: /* @__PURE__ */ G(
|
|
3420
3453
|
"div",
|
|
3421
3454
|
{
|
|
3422
3455
|
...b(),
|
|
@@ -3430,7 +3463,7 @@ const Ia = () => {
|
|
|
3430
3463
|
}
|
|
3431
3464
|
) }) : null,
|
|
3432
3465
|
/* @__PURE__ */ G("div", { className: "file-upload__files-list", children: [
|
|
3433
|
-
|
|
3466
|
+
u && u.map((w) => /* @__PURE__ */ d("span", { className: "is-error", children: /* @__PURE__ */ G("div", { className: "file-upload__file is-rejected", children: [
|
|
3434
3467
|
w.file.name,
|
|
3435
3468
|
/* @__PURE__ */ d(
|
|
3436
3469
|
_e,
|
|
@@ -3445,7 +3478,7 @@ const Ia = () => {
|
|
|
3445
3478
|
] }) }, w.file.name)),
|
|
3446
3479
|
g && g.map((w) => /* @__PURE__ */ G("div", { className: "file-upload__file", children: [
|
|
3447
3480
|
w.name,
|
|
3448
|
-
w.percentUploaded !== void 0 ? /* @__PURE__ */ d(
|
|
3481
|
+
w.percentUploaded !== void 0 ? /* @__PURE__ */ d(Bi, { percentComplete: w.percentUploaded }) : /* @__PURE__ */ d(
|
|
3449
3482
|
_e,
|
|
3450
3483
|
{
|
|
3451
3484
|
appearance: "base",
|
|
@@ -3465,7 +3498,7 @@ const Ia = () => {
|
|
|
3465
3498
|
]
|
|
3466
3499
|
}
|
|
3467
3500
|
);
|
|
3468
|
-
},
|
|
3501
|
+
}, ii = (e, n) => e.label.localeCompare(n.label, "en", { numeric: !0 }), Da = (e) => (n, t) => {
|
|
3469
3502
|
if (e) {
|
|
3470
3503
|
const i = e.has(n.value), o = e.has(t.value);
|
|
3471
3504
|
if (i && !o) return -1;
|
|
@@ -3486,19 +3519,19 @@ const Ia = () => {
|
|
|
3486
3519
|
updateItems: o,
|
|
3487
3520
|
isOpen: a,
|
|
3488
3521
|
footer: l,
|
|
3489
|
-
sortFn: r =
|
|
3522
|
+
sortFn: r = ii,
|
|
3490
3523
|
groupFn: s = Aa,
|
|
3491
3524
|
...c
|
|
3492
3525
|
}) => {
|
|
3493
|
-
const
|
|
3526
|
+
const p = le(
|
|
3494
3527
|
() => new Set(n.map((x) => x.value)),
|
|
3495
3528
|
[n]
|
|
3496
3529
|
), f = le(
|
|
3497
3530
|
() => new Set(t.map((x) => x.value)),
|
|
3498
3531
|
[t]
|
|
3499
|
-
), [g,
|
|
3500
|
-
|
|
3501
|
-
a &&
|
|
3532
|
+
), [g, u] = fe(new Set(p));
|
|
3533
|
+
ue(() => {
|
|
3534
|
+
a && u(new Set(p));
|
|
3502
3535
|
}, [a]);
|
|
3503
3536
|
const m = le(() => e.some((x) => x.group), [e]), v = le(
|
|
3504
3537
|
() => m ? s(e) : [{ group: "Ungrouped", items: e }],
|
|
@@ -3510,16 +3543,16 @@ const Ia = () => {
|
|
|
3510
3543
|
o(h);
|
|
3511
3544
|
}
|
|
3512
3545
|
};
|
|
3513
|
-
return /* @__PURE__ */ d(
|
|
3546
|
+
return /* @__PURE__ */ d(qn, { isVisible: a, className: "put-above", children: /* @__PURE__ */ G("div", { className: "multi-select__dropdown", role: "listbox", ...c, children: [
|
|
3514
3547
|
i || null,
|
|
3515
3548
|
v.map(({ group: x, items: E }) => /* @__PURE__ */ G("div", { className: "multi-select__group", children: [
|
|
3516
3549
|
m ? /* @__PURE__ */ d("h5", { className: "multi-select__dropdown-header", children: x }) : null,
|
|
3517
3550
|
/* @__PURE__ */ d("ul", { className: "multi-select__dropdown-list", "aria-label": x, children: E.sort(r).sort(Da(g)).map((w) => /* @__PURE__ */ d("li", { className: "multi-select__dropdown-item", children: /* @__PURE__ */ d(
|
|
3518
|
-
|
|
3551
|
+
Mi,
|
|
3519
3552
|
{
|
|
3520
3553
|
disabled: f.has(w.value),
|
|
3521
3554
|
label: w.label,
|
|
3522
|
-
checked:
|
|
3555
|
+
checked: p.has(w.value),
|
|
3523
3556
|
value: w.value,
|
|
3524
3557
|
onChange: b
|
|
3525
3558
|
},
|
|
@@ -3539,26 +3572,26 @@ const Ia = () => {
|
|
|
3539
3572
|
disabledItems: r = [],
|
|
3540
3573
|
dropdownHeader: s,
|
|
3541
3574
|
dropdownFooter: c,
|
|
3542
|
-
variant:
|
|
3575
|
+
variant: p = "search"
|
|
3543
3576
|
}) => {
|
|
3544
|
-
const f =
|
|
3545
|
-
|
|
3577
|
+
const f = Oi(() => {
|
|
3578
|
+
u(!1), v("");
|
|
3546
3579
|
});
|
|
3547
|
-
|
|
3548
|
-
|
|
3580
|
+
ji(() => {
|
|
3581
|
+
u(!1), v("");
|
|
3549
3582
|
});
|
|
3550
|
-
const [g,
|
|
3551
|
-
|
|
3583
|
+
const [g, u] = fe(!1), [m, v] = fe("");
|
|
3584
|
+
ue(() => {
|
|
3552
3585
|
g || v("");
|
|
3553
3586
|
}, [g]);
|
|
3554
|
-
const [b, x] =
|
|
3587
|
+
const [b, x] = fe([]), E = n || b, w = (z) => {
|
|
3555
3588
|
const X = Array.from(new Set(z));
|
|
3556
3589
|
x(X), i && i(X);
|
|
3557
3590
|
}, F = et(), h = et(), P = E.filter(
|
|
3558
3591
|
(z) => l.some((X) => X.value === z.value)
|
|
3559
|
-
).sort(
|
|
3592
|
+
).sort(ii).map((z) => z.label).join(", ");
|
|
3560
3593
|
return /* @__PURE__ */ d("div", { ref: f, children: /* @__PURE__ */ G("div", { className: "multi-select", children: [
|
|
3561
|
-
|
|
3594
|
+
p === "search" ? /* @__PURE__ */ d(
|
|
3562
3595
|
jn,
|
|
3563
3596
|
{
|
|
3564
3597
|
externallyControlled: !0,
|
|
@@ -3570,9 +3603,9 @@ const Ia = () => {
|
|
|
3570
3603
|
disabled: e,
|
|
3571
3604
|
autoComplete: "off",
|
|
3572
3605
|
onChange: (z) => {
|
|
3573
|
-
v(z),
|
|
3606
|
+
v(z), u(!0);
|
|
3574
3607
|
},
|
|
3575
|
-
onFocus: () =>
|
|
3608
|
+
onFocus: () => u(!0),
|
|
3576
3609
|
placeholder: o ?? "Search",
|
|
3577
3610
|
required: a,
|
|
3578
3611
|
type: "text",
|
|
@@ -3589,7 +3622,7 @@ const Ia = () => {
|
|
|
3589
3622
|
"aria-expanded": g,
|
|
3590
3623
|
className: "multi-select__select-button",
|
|
3591
3624
|
onClick: () => {
|
|
3592
|
-
|
|
3625
|
+
u((z) => !z);
|
|
3593
3626
|
},
|
|
3594
3627
|
children: /* @__PURE__ */ d("span", { className: "multi-select__condensed-text", children: E.length > 0 ? P : o ?? "Select items" })
|
|
3595
3628
|
}
|
|
@@ -3646,12 +3679,12 @@ const Ia = () => {
|
|
|
3646
3679
|
}, Ma = {
|
|
3647
3680
|
// Mobile or tablet
|
|
3648
3681
|
small: 620
|
|
3649
|
-
},
|
|
3682
|
+
}, oi = $n({ variant: "regular" }), ai = ({
|
|
3650
3683
|
className: e,
|
|
3651
3684
|
children: n,
|
|
3652
3685
|
variant: t,
|
|
3653
3686
|
...i
|
|
3654
|
-
}) => /* @__PURE__ */ d(
|
|
3687
|
+
}) => /* @__PURE__ */ d(oi.Provider, { value: { variant: t }, children: /* @__PURE__ */ d(
|
|
3655
3688
|
"table",
|
|
3656
3689
|
{
|
|
3657
3690
|
...i,
|
|
@@ -3664,7 +3697,7 @@ const Ia = () => {
|
|
|
3664
3697
|
"td",
|
|
3665
3698
|
{
|
|
3666
3699
|
className: L(i.id, "u-text-overflow-clip"),
|
|
3667
|
-
children: /* @__PURE__ */ d(
|
|
3700
|
+
children: /* @__PURE__ */ d(zn, { isPending: !0, text: "XXXxxxx.xxxxxxxxx" })
|
|
3668
3701
|
},
|
|
3669
3702
|
o
|
|
3670
3703
|
)) }, t)) }), ja = ({
|
|
@@ -3674,25 +3707,25 @@ const Ia = () => {
|
|
|
3674
3707
|
const t = n ? n.getAllColumns() : Array.from({ length: 10 }).fill({ id: "" });
|
|
3675
3708
|
return /* @__PURE__ */ G(be, { children: [
|
|
3676
3709
|
/* @__PURE__ */ d("caption", { className: "u-visually-hidden", children: "Loading..." }),
|
|
3677
|
-
/* @__PURE__ */ d(
|
|
3710
|
+
/* @__PURE__ */ d(ri, { "aria-busy": "true", className: e, children: /* @__PURE__ */ d(Oa, { columns: t }) })
|
|
3678
3711
|
] });
|
|
3679
|
-
},
|
|
3712
|
+
}, ri = ({
|
|
3680
3713
|
className: e,
|
|
3681
3714
|
children: n,
|
|
3682
3715
|
style: t,
|
|
3683
3716
|
...i
|
|
3684
3717
|
}) => {
|
|
3685
|
-
const { variant: o } = Nt(
|
|
3686
|
-
var
|
|
3718
|
+
const { variant: o } = Nt(oi), a = ge(null), [l, r] = fe(null), s = U(() => {
|
|
3719
|
+
var p, f;
|
|
3687
3720
|
if (window.innerWidth > Ma.small) {
|
|
3688
|
-
const g = (f = (
|
|
3721
|
+
const g = (f = (p = a.current) == null ? void 0 : p.getBoundingClientRect) == null ? void 0 : f.call(p).top;
|
|
3689
3722
|
g && r(g + 1);
|
|
3690
3723
|
} else
|
|
3691
3724
|
r(null);
|
|
3692
3725
|
}, []);
|
|
3693
3726
|
Ht(() => {
|
|
3694
3727
|
s();
|
|
3695
|
-
}, [s]),
|
|
3728
|
+
}, [s]), ue(() => (window.addEventListener("resize", s), () => window.removeEventListener("resize", s)), [s]);
|
|
3696
3729
|
const c = le(() => o === "full-height" && l ? {
|
|
3697
3730
|
height: `calc(100vh - ${l}px)`,
|
|
3698
3731
|
minHeight: `calc(100vh - ${l}px)`,
|
|
@@ -3709,11 +3742,11 @@ const Ia = () => {
|
|
|
3709
3742
|
}
|
|
3710
3743
|
);
|
|
3711
3744
|
};
|
|
3712
|
-
|
|
3713
|
-
|
|
3714
|
-
const
|
|
3715
|
-
|
|
3716
|
-
|
|
3745
|
+
ai.Body = ri;
|
|
3746
|
+
ai.Loading = ja;
|
|
3747
|
+
const li = ({ children: e }) => /* @__PURE__ */ d("caption", { children: /* @__PURE__ */ d("div", { className: "p-strip", children: e }) }), Ta = ({ children: e }) => /* @__PURE__ */ d("div", { className: "row", children: /* @__PURE__ */ d("div", { className: "col-start-large-4 u-align--left col-8 col-medium-4", children: /* @__PURE__ */ d("p", { className: "p-heading--4 u-no-margin--bottom", children: e }) }) }), za = ({ children: e }) => /* @__PURE__ */ d("div", { className: "row", children: /* @__PURE__ */ d("div", { className: "u-align--left col-start-large-4 col-8 col-medium-4", children: /* @__PURE__ */ d("p", { children: e }) }) });
|
|
3748
|
+
li.Title = Ta;
|
|
3749
|
+
li.Description = za;
|
|
3717
3750
|
/**
|
|
3718
3751
|
* table-core
|
|
3719
3752
|
*
|
|
@@ -3727,7 +3760,7 @@ ri.Description = za;
|
|
|
3727
3760
|
function Ee(e, n) {
|
|
3728
3761
|
return typeof e == "function" ? e(n) : e;
|
|
3729
3762
|
}
|
|
3730
|
-
function
|
|
3763
|
+
function xe(e, n) {
|
|
3731
3764
|
return (t) => {
|
|
3732
3765
|
n.setState((i) => ({
|
|
3733
3766
|
...i,
|
|
@@ -3741,7 +3774,7 @@ function at(e) {
|
|
|
3741
3774
|
function Va(e) {
|
|
3742
3775
|
return Array.isArray(e) && e.every((n) => typeof n == "number");
|
|
3743
3776
|
}
|
|
3744
|
-
function
|
|
3777
|
+
function si(e, n) {
|
|
3745
3778
|
const t = [], i = (o) => {
|
|
3746
3779
|
o.forEach((a) => {
|
|
3747
3780
|
t.push(a);
|
|
@@ -3757,17 +3790,17 @@ function D(e, n, t) {
|
|
|
3757
3790
|
let l;
|
|
3758
3791
|
t.key && t.debug && (l = Date.now());
|
|
3759
3792
|
const r = e(a);
|
|
3760
|
-
if (!(r.length !== i.length || r.some((
|
|
3793
|
+
if (!(r.length !== i.length || r.some((p, f) => i[f] !== p)))
|
|
3761
3794
|
return o;
|
|
3762
3795
|
i = r;
|
|
3763
3796
|
let c;
|
|
3764
3797
|
if (t.key && t.debug && (c = Date.now()), o = n(...r), t == null || t.onChange == null || t.onChange(o), t.key && t.debug && t != null && t.debug()) {
|
|
3765
|
-
const
|
|
3798
|
+
const p = Math.round((Date.now() - l) * 100) / 100, f = Math.round((Date.now() - c) * 100) / 100, g = f / 16, u = (m, v) => {
|
|
3766
3799
|
for (m = String(m); m.length < v; )
|
|
3767
3800
|
m = " " + m;
|
|
3768
3801
|
return m;
|
|
3769
3802
|
};
|
|
3770
|
-
console.info(`%c⏱ ${
|
|
3803
|
+
console.info(`%c⏱ ${u(f, 5)} /${u(p, 5)} ms`, `
|
|
3771
3804
|
font-size: .6rem;
|
|
3772
3805
|
font-weight: bold;
|
|
3773
3806
|
color: hsl(${Math.max(0, Math.min(120 - 120 * g, 120))}deg 100% 31%);`, t == null ? void 0 : t.key);
|
|
@@ -3814,30 +3847,30 @@ function Na(e, n, t, i) {
|
|
|
3814
3847
|
...e._getDefaultColumnDef(),
|
|
3815
3848
|
...n
|
|
3816
3849
|
}, s = r.accessorKey;
|
|
3817
|
-
let c = (o = (a = r.id) != null ? a : s ? typeof String.prototype.replaceAll == "function" ? s.replaceAll(".", "_") : s.replace(/\./g, "_") : void 0) != null ? o : typeof r.header == "string" ? r.header : void 0,
|
|
3818
|
-
if (r.accessorFn ?
|
|
3819
|
-
let
|
|
3850
|
+
let c = (o = (a = r.id) != null ? a : s ? typeof String.prototype.replaceAll == "function" ? s.replaceAll(".", "_") : s.replace(/\./g, "_") : void 0) != null ? o : typeof r.header == "string" ? r.header : void 0, p;
|
|
3851
|
+
if (r.accessorFn ? p = r.accessorFn : s && (s.includes(".") ? p = (g) => {
|
|
3852
|
+
let u = g;
|
|
3820
3853
|
for (const v of s.split(".")) {
|
|
3821
3854
|
var m;
|
|
3822
|
-
|
|
3855
|
+
u = (m = u) == null ? void 0 : m[v], process.env.NODE_ENV !== "production" && u === void 0 && console.warn(`"${v}" in deeply nested key "${s}" returned undefined.`);
|
|
3823
3856
|
}
|
|
3824
|
-
return
|
|
3825
|
-
} :
|
|
3857
|
+
return u;
|
|
3858
|
+
} : p = (g) => g[r.accessorKey]), !c)
|
|
3826
3859
|
throw process.env.NODE_ENV !== "production" ? new Error(r.accessorFn ? "Columns require an id when using an accessorFn" : "Columns require an id when using a non-string header") : new Error();
|
|
3827
3860
|
let f = {
|
|
3828
3861
|
id: `${String(c)}`,
|
|
3829
|
-
accessorFn:
|
|
3862
|
+
accessorFn: p,
|
|
3830
3863
|
parent: i,
|
|
3831
3864
|
depth: t,
|
|
3832
3865
|
columnDef: r,
|
|
3833
3866
|
columns: [],
|
|
3834
3867
|
getFlatColumns: D(() => [!0], () => {
|
|
3835
3868
|
var g;
|
|
3836
|
-
return [f, ...(g = f.columns) == null ? void 0 : g.flatMap((
|
|
3869
|
+
return [f, ...(g = f.columns) == null ? void 0 : g.flatMap((u) => u.getFlatColumns())];
|
|
3837
3870
|
}, A(e.options, "debugColumns", "column.getFlatColumns")),
|
|
3838
3871
|
getLeafColumns: D(() => [e._getOrderColumnsFn()], (g) => {
|
|
3839
|
-
var
|
|
3840
|
-
if ((
|
|
3872
|
+
var u;
|
|
3873
|
+
if ((u = f.columns) != null && u.length) {
|
|
3841
3874
|
let m = f.columns.flatMap((v) => v.getLeafColumns());
|
|
3842
3875
|
return g(m);
|
|
3843
3876
|
}
|
|
@@ -3903,25 +3936,25 @@ const Ha = {
|
|
|
3903
3936
|
return !((i = t.subHeaders) != null && i.length);
|
|
3904
3937
|
}), A(e.options, se, "getRightLeafHeaders")), e.getLeafHeaders = D(() => [e.getLeftHeaderGroups(), e.getCenterHeaderGroups(), e.getRightHeaderGroups()], (n, t, i) => {
|
|
3905
3938
|
var o, a, l, r, s, c;
|
|
3906
|
-
return [...(o = (a = n[0]) == null ? void 0 : a.headers) != null ? o : [], ...(l = (r = t[0]) == null ? void 0 : r.headers) != null ? l : [], ...(s = (c = i[0]) == null ? void 0 : c.headers) != null ? s : []].map((
|
|
3939
|
+
return [...(o = (a = n[0]) == null ? void 0 : a.headers) != null ? o : [], ...(l = (r = t[0]) == null ? void 0 : r.headers) != null ? l : [], ...(s = (c = i[0]) == null ? void 0 : c.headers) != null ? s : []].map((p) => p.getLeafHeaders()).flat();
|
|
3907
3940
|
}, A(e.options, se, "getLeafHeaders"));
|
|
3908
3941
|
}
|
|
3909
3942
|
};
|
|
3910
3943
|
function Xe(e, n, t, i) {
|
|
3911
3944
|
var o, a;
|
|
3912
3945
|
let l = 0;
|
|
3913
|
-
const r = function(g,
|
|
3914
|
-
|
|
3946
|
+
const r = function(g, u) {
|
|
3947
|
+
u === void 0 && (u = 1), l = Math.max(l, u), g.filter((m) => m.getIsVisible()).forEach((m) => {
|
|
3915
3948
|
var v;
|
|
3916
|
-
(v = m.columns) != null && v.length && r(m.columns,
|
|
3949
|
+
(v = m.columns) != null && v.length && r(m.columns, u + 1);
|
|
3917
3950
|
}, 0);
|
|
3918
3951
|
};
|
|
3919
3952
|
r(e);
|
|
3920
3953
|
let s = [];
|
|
3921
|
-
const c = (g,
|
|
3954
|
+
const c = (g, u) => {
|
|
3922
3955
|
const m = {
|
|
3923
|
-
depth:
|
|
3924
|
-
id: [i, `${
|
|
3956
|
+
depth: u,
|
|
3957
|
+
id: [i, `${u}`].filter(Boolean).join("_"),
|
|
3925
3958
|
headers: []
|
|
3926
3959
|
}, v = [];
|
|
3927
3960
|
g.forEach((b) => {
|
|
@@ -3931,21 +3964,21 @@ function Xe(e, n, t, i) {
|
|
|
3931
3964
|
x.subHeaders.push(b);
|
|
3932
3965
|
else {
|
|
3933
3966
|
const h = Fn(t, w, {
|
|
3934
|
-
id: [i,
|
|
3967
|
+
id: [i, u, w.id, b == null ? void 0 : b.id].filter(Boolean).join("_"),
|
|
3935
3968
|
isPlaceholder: F,
|
|
3936
3969
|
placeholderId: F ? `${v.filter((P) => P.column === w).length}` : void 0,
|
|
3937
|
-
depth:
|
|
3970
|
+
depth: u,
|
|
3938
3971
|
index: v.length
|
|
3939
3972
|
});
|
|
3940
3973
|
h.subHeaders.push(b), v.push(h);
|
|
3941
3974
|
}
|
|
3942
3975
|
m.headers.push(b), b.headerGroup = m;
|
|
3943
|
-
}), s.push(m),
|
|
3944
|
-
},
|
|
3976
|
+
}), s.push(m), u > 0 && c(v, u - 1);
|
|
3977
|
+
}, p = n.map((g, u) => Fn(t, g, {
|
|
3945
3978
|
depth: l,
|
|
3946
|
-
index:
|
|
3979
|
+
index: u
|
|
3947
3980
|
}));
|
|
3948
|
-
c(
|
|
3981
|
+
c(p, l - 1), s.reverse();
|
|
3949
3982
|
const f = (g) => g.filter((m) => m.column.getIsVisible()).map((m) => {
|
|
3950
3983
|
let v = 0, b = 0, x = [0];
|
|
3951
3984
|
m.subHeaders && m.subHeaders.length ? (x = [], f(m.subHeaders).forEach((w) => {
|
|
@@ -3963,7 +3996,7 @@ function Xe(e, n, t, i) {
|
|
|
3963
3996
|
});
|
|
3964
3997
|
return f((o = (a = s[0]) == null ? void 0 : a.headers) != null ? o : []), s;
|
|
3965
3998
|
}
|
|
3966
|
-
const
|
|
3999
|
+
const ci = (e, n, t, i, o, a, l) => {
|
|
3967
4000
|
let r = {
|
|
3968
4001
|
id: n,
|
|
3969
4002
|
index: i,
|
|
@@ -3991,19 +4024,19 @@ const si = (e, n, t, i, o, a, l) => {
|
|
|
3991
4024
|
return (c = r.getValue(s)) != null ? c : e.options.renderFallbackValue;
|
|
3992
4025
|
},
|
|
3993
4026
|
subRows: a ?? [],
|
|
3994
|
-
getLeafRows: () =>
|
|
4027
|
+
getLeafRows: () => si(r.subRows, (s) => s.subRows),
|
|
3995
4028
|
getParentRow: () => r.parentId ? e.getRow(r.parentId, !0) : void 0,
|
|
3996
4029
|
getParentRows: () => {
|
|
3997
4030
|
let s = [], c = r;
|
|
3998
4031
|
for (; ; ) {
|
|
3999
|
-
const
|
|
4000
|
-
if (!
|
|
4001
|
-
s.push(
|
|
4032
|
+
const p = c.getParentRow();
|
|
4033
|
+
if (!p) break;
|
|
4034
|
+
s.push(p), c = p;
|
|
4002
4035
|
}
|
|
4003
4036
|
return s.reverse();
|
|
4004
4037
|
},
|
|
4005
4038
|
getAllCells: D(() => [e.getAllLeafColumns()], (s) => s.map((c) => La(e, r, c, c.id)), A(e.options, "debugRows", "getAllCells")),
|
|
4006
|
-
_getAllCellsByColumnId: D(() => [r.getAllCells()], (s) => s.reduce((c,
|
|
4039
|
+
_getAllCellsByColumnId: D(() => [r.getAllCells()], (s) => s.reduce((c, p) => (c[p.column.id] = p, c), {}), A(e.options, "debugRows", "getAllCellsByColumnId"))
|
|
4007
4040
|
};
|
|
4008
4041
|
for (let s = 0; s < e._features.length; s++) {
|
|
4009
4042
|
const c = e._features[s];
|
|
@@ -4017,41 +4050,41 @@ const si = (e, n, t, i, o, a, l) => {
|
|
|
4017
4050
|
return e._getFacetedMinMaxValues();
|
|
4018
4051
|
};
|
|
4019
4052
|
}
|
|
4020
|
-
},
|
|
4053
|
+
}, pi = (e, n, t) => {
|
|
4021
4054
|
var i, o;
|
|
4022
4055
|
const a = t == null || (i = t.toString()) == null ? void 0 : i.toLowerCase();
|
|
4023
4056
|
return !!(!((o = e.getValue(n)) == null || (o = o.toString()) == null || (o = o.toLowerCase()) == null) && o.includes(a));
|
|
4024
4057
|
};
|
|
4025
|
-
ci.autoRemove = (e) => ye(e);
|
|
4026
|
-
const pi = (e, n, t) => {
|
|
4027
|
-
var i;
|
|
4028
|
-
return !!(!((i = e.getValue(n)) == null || (i = i.toString()) == null) && i.includes(t));
|
|
4029
|
-
};
|
|
4030
4058
|
pi.autoRemove = (e) => ye(e);
|
|
4031
4059
|
const ui = (e, n, t) => {
|
|
4032
4060
|
var i;
|
|
4033
|
-
return ((i = e.getValue(n)) == null || (i = i.toString()) == null
|
|
4061
|
+
return !!(!((i = e.getValue(n)) == null || (i = i.toString()) == null) && i.includes(t));
|
|
4034
4062
|
};
|
|
4035
4063
|
ui.autoRemove = (e) => ye(e);
|
|
4036
4064
|
const di = (e, n, t) => {
|
|
4037
4065
|
var i;
|
|
4038
|
-
return (i = e.getValue(n)) == null ? void 0 : i.
|
|
4066
|
+
return ((i = e.getValue(n)) == null || (i = i.toString()) == null ? void 0 : i.toLowerCase()) === (t == null ? void 0 : t.toLowerCase());
|
|
4039
4067
|
};
|
|
4040
4068
|
di.autoRemove = (e) => ye(e);
|
|
4041
|
-
const gi = (e, n, t) =>
|
|
4069
|
+
const gi = (e, n, t) => {
|
|
4070
|
+
var i;
|
|
4071
|
+
return (i = e.getValue(n)) == null ? void 0 : i.includes(t);
|
|
4072
|
+
};
|
|
4073
|
+
gi.autoRemove = (e) => ye(e);
|
|
4074
|
+
const fi = (e, n, t) => !t.some((i) => {
|
|
4042
4075
|
var o;
|
|
4043
4076
|
return !((o = e.getValue(n)) != null && o.includes(i));
|
|
4044
4077
|
});
|
|
4045
|
-
|
|
4046
|
-
const
|
|
4078
|
+
fi.autoRemove = (e) => ye(e) || !(e != null && e.length);
|
|
4079
|
+
const mi = (e, n, t) => t.some((i) => {
|
|
4047
4080
|
var o;
|
|
4048
4081
|
return (o = e.getValue(n)) == null ? void 0 : o.includes(i);
|
|
4049
4082
|
});
|
|
4050
|
-
|
|
4051
|
-
const
|
|
4052
|
-
mi.autoRemove = (e) => ye(e);
|
|
4053
|
-
const vi = (e, n, t) => e.getValue(n) == t;
|
|
4083
|
+
mi.autoRemove = (e) => ye(e) || !(e != null && e.length);
|
|
4084
|
+
const vi = (e, n, t) => e.getValue(n) === t;
|
|
4054
4085
|
vi.autoRemove = (e) => ye(e);
|
|
4086
|
+
const xi = (e, n, t) => e.getValue(n) == t;
|
|
4087
|
+
xi.autoRemove = (e) => ye(e);
|
|
4055
4088
|
const Xt = (e, n, t) => {
|
|
4056
4089
|
let [i, o] = t;
|
|
4057
4090
|
const a = e.getValue(n);
|
|
@@ -4067,14 +4100,14 @@ Xt.resolveFilterValue = (e) => {
|
|
|
4067
4100
|
};
|
|
4068
4101
|
Xt.autoRemove = (e) => ye(e) || ye(e[0]) && ye(e[1]);
|
|
4069
4102
|
const Ce = {
|
|
4070
|
-
includesString:
|
|
4071
|
-
includesStringSensitive:
|
|
4072
|
-
equalsString:
|
|
4073
|
-
arrIncludes:
|
|
4074
|
-
arrIncludesAll:
|
|
4075
|
-
arrIncludesSome:
|
|
4076
|
-
equals:
|
|
4077
|
-
weakEquals:
|
|
4103
|
+
includesString: pi,
|
|
4104
|
+
includesStringSensitive: ui,
|
|
4105
|
+
equalsString: di,
|
|
4106
|
+
arrIncludes: gi,
|
|
4107
|
+
arrIncludesAll: fi,
|
|
4108
|
+
arrIncludesSome: mi,
|
|
4109
|
+
equals: vi,
|
|
4110
|
+
weakEquals: xi,
|
|
4078
4111
|
inNumberRange: Xt
|
|
4079
4112
|
};
|
|
4080
4113
|
function ye(e) {
|
|
@@ -4089,7 +4122,7 @@ const Ga = {
|
|
|
4089
4122
|
...e
|
|
4090
4123
|
}),
|
|
4091
4124
|
getDefaultOptions: (e) => ({
|
|
4092
|
-
onColumnFiltersChange:
|
|
4125
|
+
onColumnFiltersChange: xe("columnFilters", e),
|
|
4093
4126
|
filterFromLeafRows: !1,
|
|
4094
4127
|
maxLeafRowFilterDepth: 100
|
|
4095
4128
|
}),
|
|
@@ -4114,10 +4147,10 @@ const Ga = {
|
|
|
4114
4147
|
return (t = (i = n.getState().columnFilters) == null ? void 0 : i.findIndex((o) => o.id === e.id)) != null ? t : -1;
|
|
4115
4148
|
}, e.setFilterValue = (t) => {
|
|
4116
4149
|
n.setColumnFilters((i) => {
|
|
4117
|
-
const o = e.getFilterFn(), a = i == null ? void 0 : i.find((
|
|
4150
|
+
const o = e.getFilterFn(), a = i == null ? void 0 : i.find((p) => p.id === e.id), l = Ee(t, a ? a.value : void 0);
|
|
4118
4151
|
if (Pn(o, l, e)) {
|
|
4119
4152
|
var r;
|
|
4120
|
-
return (r = i == null ? void 0 : i.filter((
|
|
4153
|
+
return (r = i == null ? void 0 : i.filter((p) => p.id !== e.id)) != null ? r : [];
|
|
4121
4154
|
}
|
|
4122
4155
|
const s = {
|
|
4123
4156
|
id: e.id,
|
|
@@ -4125,7 +4158,7 @@ const Ga = {
|
|
|
4125
4158
|
};
|
|
4126
4159
|
if (a) {
|
|
4127
4160
|
var c;
|
|
4128
|
-
return (c = i == null ? void 0 : i.map((
|
|
4161
|
+
return (c = i == null ? void 0 : i.map((p) => p.id === e.id ? s : p)) != null ? c : [];
|
|
4129
4162
|
}
|
|
4130
4163
|
return i != null && i.length ? [...i, s] : [s];
|
|
4131
4164
|
});
|
|
@@ -4218,7 +4251,7 @@ const Ba = (e, n, t) => t.reduce((i, o) => {
|
|
|
4218
4251
|
...e
|
|
4219
4252
|
}),
|
|
4220
4253
|
getDefaultOptions: (e) => ({
|
|
4221
|
-
onGroupingChange:
|
|
4254
|
+
onGroupingChange: xe("grouping", e),
|
|
4222
4255
|
groupedColumnMode: "reorder"
|
|
4223
4256
|
}),
|
|
4224
4257
|
createColumn: (e, n) => {
|
|
@@ -4284,7 +4317,7 @@ const nr = {
|
|
|
4284
4317
|
...e
|
|
4285
4318
|
}),
|
|
4286
4319
|
getDefaultOptions: (e) => ({
|
|
4287
|
-
onColumnOrderChange:
|
|
4320
|
+
onColumnOrderChange: xe("columnOrder", e)
|
|
4288
4321
|
}),
|
|
4289
4322
|
createColumn: (e, n) => {
|
|
4290
4323
|
e.getIndex = D((t) => [Le(n, t)], (t) => t.findIndex((i) => i.id === e.id), A(n.options, "debugColumns", "getIndex")), e.getIsFirstColumn = (t) => {
|
|
@@ -4307,7 +4340,7 @@ const nr = {
|
|
|
4307
4340
|
else {
|
|
4308
4341
|
const l = [...n], r = [...o];
|
|
4309
4342
|
for (; r.length && l.length; ) {
|
|
4310
|
-
const s = l.shift(), c = r.findIndex((
|
|
4343
|
+
const s = l.shift(), c = r.findIndex((p) => p.id === s);
|
|
4311
4344
|
c > -1 && a.push(r.splice(c, 1)[0]);
|
|
4312
4345
|
}
|
|
4313
4346
|
a = [...a, ...r];
|
|
@@ -4324,7 +4357,7 @@ const nr = {
|
|
|
4324
4357
|
...e
|
|
4325
4358
|
}),
|
|
4326
4359
|
getDefaultOptions: (e) => ({
|
|
4327
|
-
onColumnPinningChange:
|
|
4360
|
+
onColumnPinningChange: xe("columnPinning", e)
|
|
4328
4361
|
}),
|
|
4329
4362
|
createColumn: (e, n) => {
|
|
4330
4363
|
e.pin = (t) => {
|
|
@@ -4339,10 +4372,10 @@ const nr = {
|
|
|
4339
4372
|
};
|
|
4340
4373
|
}
|
|
4341
4374
|
if (t === "left") {
|
|
4342
|
-
var c,
|
|
4375
|
+
var c, p;
|
|
4343
4376
|
return {
|
|
4344
4377
|
left: [...((c = o == null ? void 0 : o.left) != null ? c : []).filter((f) => !(i != null && i.includes(f))), ...i],
|
|
4345
|
-
right: ((
|
|
4378
|
+
right: ((p = o == null ? void 0 : o.right) != null ? p : []).filter((f) => !(i != null && i.includes(f)))
|
|
4346
4379
|
};
|
|
4347
4380
|
}
|
|
4348
4381
|
return {
|
|
@@ -4415,8 +4448,8 @@ const nr = {
|
|
|
4415
4448
|
getDefaultOptions: (e) => ({
|
|
4416
4449
|
columnResizeMode: "onEnd",
|
|
4417
4450
|
columnResizeDirection: "ltr",
|
|
4418
|
-
onColumnSizingChange:
|
|
4419
|
-
onColumnSizingInfoChange:
|
|
4451
|
+
onColumnSizingChange: xe("columnSizing", e),
|
|
4452
|
+
onColumnSizingInfoChange: xe("columnSizingInfo", e)
|
|
4420
4453
|
}),
|
|
4421
4454
|
createColumn: (e, n) => {
|
|
4422
4455
|
e.getSize = () => {
|
|
@@ -4459,13 +4492,13 @@ const nr = {
|
|
|
4459
4492
|
return (a) => {
|
|
4460
4493
|
if (!i || !o || (a.persist == null || a.persist(), Et(a) && a.touches && a.touches.length > 1))
|
|
4461
4494
|
return;
|
|
4462
|
-
const l = e.getSize(), r = e ? e.getLeafHeaders().map((x) => [x.column.id, x.column.getSize()]) : [[i.id, i.getSize()]], s = Et(a) ? Math.round(a.touches[0].clientX) : a.clientX, c = {},
|
|
4495
|
+
const l = e.getSize(), r = e ? e.getLeafHeaders().map((x) => [x.column.id, x.column.getSize()]) : [[i.id, i.getSize()]], s = Et(a) ? Math.round(a.touches[0].clientX) : a.clientX, c = {}, p = (x, E) => {
|
|
4463
4496
|
typeof E == "number" && (n.setColumnSizingInfo((w) => {
|
|
4464
4497
|
var F, h;
|
|
4465
4498
|
const P = n.options.columnResizeDirection === "rtl" ? -1 : 1, z = (E - ((F = w == null ? void 0 : w.startOffset) != null ? F : 0)) * P, X = Math.max(z / ((h = w == null ? void 0 : w.startSize) != null ? h : 0), -0.999999);
|
|
4466
4499
|
return w.columnSizingStart.forEach((ee) => {
|
|
4467
|
-
let [ce,
|
|
4468
|
-
c[ce] = Math.round(Math.max(
|
|
4500
|
+
let [ce, de] = ee;
|
|
4501
|
+
c[ce] = Math.round(Math.max(de + de * X, 0) * 100) / 100;
|
|
4469
4502
|
}), {
|
|
4470
4503
|
...w,
|
|
4471
4504
|
deltaOffset: z,
|
|
@@ -4475,8 +4508,8 @@ const nr = {
|
|
|
4475
4508
|
...w,
|
|
4476
4509
|
...c
|
|
4477
4510
|
})));
|
|
4478
|
-
}, f = (x) =>
|
|
4479
|
-
|
|
4511
|
+
}, f = (x) => p("move", x), g = (x) => {
|
|
4512
|
+
p("end", x), n.setColumnSizingInfo((E) => ({
|
|
4480
4513
|
...E,
|
|
4481
4514
|
isResizingColumn: !1,
|
|
4482
4515
|
startOffset: null,
|
|
@@ -4485,21 +4518,21 @@ const nr = {
|
|
|
4485
4518
|
deltaPercentage: null,
|
|
4486
4519
|
columnSizingStart: []
|
|
4487
4520
|
}));
|
|
4488
|
-
},
|
|
4521
|
+
}, u = t || typeof document < "u" ? document : null, m = {
|
|
4489
4522
|
moveHandler: (x) => f(x.clientX),
|
|
4490
4523
|
upHandler: (x) => {
|
|
4491
|
-
|
|
4524
|
+
u == null || u.removeEventListener("mousemove", m.moveHandler), u == null || u.removeEventListener("mouseup", m.upHandler), g(x.clientX);
|
|
4492
4525
|
}
|
|
4493
4526
|
}, v = {
|
|
4494
4527
|
moveHandler: (x) => (x.cancelable && (x.preventDefault(), x.stopPropagation()), f(x.touches[0].clientX), !1),
|
|
4495
4528
|
upHandler: (x) => {
|
|
4496
4529
|
var E;
|
|
4497
|
-
|
|
4530
|
+
u == null || u.removeEventListener("touchmove", v.moveHandler), u == null || u.removeEventListener("touchend", v.upHandler), x.cancelable && (x.preventDefault(), x.stopPropagation()), g((E = x.touches[0]) == null ? void 0 : E.clientX);
|
|
4498
4531
|
}
|
|
4499
4532
|
}, b = ar() ? {
|
|
4500
4533
|
passive: !1
|
|
4501
4534
|
} : !1;
|
|
4502
|
-
Et(a) ? (
|
|
4535
|
+
Et(a) ? (u == null || u.addEventListener("touchmove", v.moveHandler, b), u == null || u.addEventListener("touchend", v.upHandler, b)) : (u == null || u.addEventListener("mousemove", m.moveHandler, b), u == null || u.addEventListener("mouseup", m.upHandler, b)), n.setColumnSizingInfo((x) => ({
|
|
4503
4536
|
...x,
|
|
4504
4537
|
startOffset: s,
|
|
4505
4538
|
startSize: l,
|
|
@@ -4559,7 +4592,7 @@ const rr = {
|
|
|
4559
4592
|
...e
|
|
4560
4593
|
}),
|
|
4561
4594
|
getDefaultOptions: (e) => ({
|
|
4562
|
-
onColumnVisibilityChange:
|
|
4595
|
+
onColumnVisibilityChange: xe("columnVisibility", e)
|
|
4563
4596
|
}),
|
|
4564
4597
|
createColumn: (e, n) => {
|
|
4565
4598
|
e.toggleVisibility = (t) => {
|
|
@@ -4614,7 +4647,7 @@ const lr = {
|
|
|
4614
4647
|
...e
|
|
4615
4648
|
}),
|
|
4616
4649
|
getDefaultOptions: (e) => ({
|
|
4617
|
-
onGlobalFilterChange:
|
|
4650
|
+
onGlobalFilterChange: xe("globalFilter", e),
|
|
4618
4651
|
globalFilterFn: "auto",
|
|
4619
4652
|
getColumnCanGlobalFilter: (n) => {
|
|
4620
4653
|
var t;
|
|
@@ -4647,7 +4680,7 @@ const lr = {
|
|
|
4647
4680
|
...e
|
|
4648
4681
|
}),
|
|
4649
4682
|
getDefaultOptions: (e) => ({
|
|
4650
|
-
onExpandedChange:
|
|
4683
|
+
onExpandedChange: xe("expanded", e),
|
|
4651
4684
|
paginateExpandedRows: !0
|
|
4652
4685
|
}),
|
|
4653
4686
|
createTable: (e) => {
|
|
@@ -4740,7 +4773,7 @@ const lr = {
|
|
|
4740
4773
|
}
|
|
4741
4774
|
}),
|
|
4742
4775
|
getDefaultOptions: (e) => ({
|
|
4743
|
-
onPaginationChange:
|
|
4776
|
+
onPaginationChange: xe("pagination", e)
|
|
4744
4777
|
}),
|
|
4745
4778
|
createTable: (e) => {
|
|
4746
4779
|
let n = !1, t = !1;
|
|
@@ -4820,7 +4853,7 @@ const lr = {
|
|
|
4820
4853
|
...e
|
|
4821
4854
|
}),
|
|
4822
4855
|
getDefaultOptions: (e) => ({
|
|
4823
|
-
onRowPinningChange:
|
|
4856
|
+
onRowPinningChange: xe("rowPinning", e)
|
|
4824
4857
|
}),
|
|
4825
4858
|
createRow: (e, n) => {
|
|
4826
4859
|
e.pin = (t, i, o) => {
|
|
@@ -4836,7 +4869,7 @@ const lr = {
|
|
|
4836
4869
|
return c;
|
|
4837
4870
|
}) : [], r = /* @__PURE__ */ new Set([...l, e.id, ...a]);
|
|
4838
4871
|
n.setRowPinning((s) => {
|
|
4839
|
-
var c,
|
|
4872
|
+
var c, p;
|
|
4840
4873
|
if (t === "bottom") {
|
|
4841
4874
|
var f, g;
|
|
4842
4875
|
return {
|
|
@@ -4845,15 +4878,15 @@ const lr = {
|
|
|
4845
4878
|
};
|
|
4846
4879
|
}
|
|
4847
4880
|
if (t === "top") {
|
|
4848
|
-
var
|
|
4881
|
+
var u, m;
|
|
4849
4882
|
return {
|
|
4850
|
-
top: [...((
|
|
4883
|
+
top: [...((u = s == null ? void 0 : s.top) != null ? u : []).filter((v) => !(r != null && r.has(v))), ...Array.from(r)],
|
|
4851
4884
|
bottom: ((m = s == null ? void 0 : s.bottom) != null ? m : []).filter((v) => !(r != null && r.has(v)))
|
|
4852
4885
|
};
|
|
4853
4886
|
}
|
|
4854
4887
|
return {
|
|
4855
4888
|
top: ((c = s == null ? void 0 : s.top) != null ? c : []).filter((v) => !(r != null && r.has(v))),
|
|
4856
|
-
bottom: ((
|
|
4889
|
+
bottom: ((p = s == null ? void 0 : s.bottom) != null ? p : []).filter((v) => !(r != null && r.has(v)))
|
|
4857
4890
|
};
|
|
4858
4891
|
});
|
|
4859
4892
|
}, e.getCanPin = () => {
|
|
@@ -4921,7 +4954,7 @@ const lr = {
|
|
|
4921
4954
|
...e
|
|
4922
4955
|
}),
|
|
4923
4956
|
getDefaultOptions: (e) => ({
|
|
4924
|
-
onRowSelectionChange:
|
|
4957
|
+
onRowSelectionChange: xe("rowSelection", e),
|
|
4925
4958
|
enableRowSelection: !0,
|
|
4926
4959
|
enableMultiRowSelection: !0,
|
|
4927
4960
|
enableSubRowSelection: !0
|
|
@@ -5042,11 +5075,11 @@ function Pt(e, n) {
|
|
|
5042
5075
|
const t = e.getState().rowSelection, i = [], o = {}, a = function(l, r) {
|
|
5043
5076
|
return l.map((s) => {
|
|
5044
5077
|
var c;
|
|
5045
|
-
const
|
|
5046
|
-
if (
|
|
5078
|
+
const p = Qt(s, t);
|
|
5079
|
+
if (p && (i.push(s), o[s.id] = s), (c = s.subRows) != null && c.length && (s = {
|
|
5047
5080
|
...s,
|
|
5048
5081
|
subRows: a(s.subRows)
|
|
5049
|
-
}),
|
|
5082
|
+
}), p)
|
|
5050
5083
|
return s;
|
|
5051
5084
|
}).filter(Boolean);
|
|
5052
5085
|
};
|
|
@@ -5071,7 +5104,7 @@ function Vt(e, n, t) {
|
|
|
5071
5104
|
}
|
|
5072
5105
|
}), o ? "all" : a ? "some" : !1;
|
|
5073
5106
|
}
|
|
5074
|
-
const Lt = /([0-9]+)/gm, gr = (e, n, t) =>
|
|
5107
|
+
const Lt = /([0-9]+)/gm, gr = (e, n, t) => hi(ke(e.getValue(t)).toLowerCase(), ke(n.getValue(t)).toLowerCase()), fr = (e, n, t) => hi(ke(e.getValue(t)), ke(n.getValue(t))), mr = (e, n, t) => Jt(ke(e.getValue(t)).toLowerCase(), ke(n.getValue(t)).toLowerCase()), vr = (e, n, t) => Jt(ke(e.getValue(t)), ke(n.getValue(t))), xr = (e, n, t) => {
|
|
5075
5108
|
const i = e.getValue(t), o = n.getValue(t);
|
|
5076
5109
|
return i > o ? 1 : i < o ? -1 : 0;
|
|
5077
5110
|
}, hr = (e, n, t) => Jt(e.getValue(t), n.getValue(t));
|
|
@@ -5081,7 +5114,7 @@ function Jt(e, n) {
|
|
|
5081
5114
|
function ke(e) {
|
|
5082
5115
|
return typeof e == "number" ? isNaN(e) || e === 1 / 0 || e === -1 / 0 ? "" : String(e) : typeof e == "string" ? e : "";
|
|
5083
5116
|
}
|
|
5084
|
-
function
|
|
5117
|
+
function hi(e, n) {
|
|
5085
5118
|
const t = e.split(Lt).filter(Boolean), i = n.split(Lt).filter(Boolean);
|
|
5086
5119
|
for (; t.length && i.length; ) {
|
|
5087
5120
|
const o = t.shift(), a = i.shift(), l = parseInt(o, 10), r = parseInt(a, 10), s = [l, r].sort();
|
|
@@ -5118,7 +5151,7 @@ const Ve = {
|
|
|
5118
5151
|
sortUndefined: 1
|
|
5119
5152
|
}),
|
|
5120
5153
|
getDefaultOptions: (e) => ({
|
|
5121
|
-
onSortingChange:
|
|
5154
|
+
onSortingChange: xe("sorting", e),
|
|
5122
5155
|
isMultiSortEvent: (n) => n.shiftKey
|
|
5123
5156
|
}),
|
|
5124
5157
|
createColumn: (e, n) => {
|
|
@@ -5144,18 +5177,18 @@ const Ve = {
|
|
|
5144
5177
|
}, e.toggleSorting = (t, i) => {
|
|
5145
5178
|
const o = e.getNextSortingOrder(), a = typeof t < "u" && t !== null;
|
|
5146
5179
|
n.setSorting((l) => {
|
|
5147
|
-
const r = l == null ? void 0 : l.find((
|
|
5148
|
-
let c = [],
|
|
5149
|
-
if (l != null && l.length && e.getCanMultiSort() && i ? r ?
|
|
5180
|
+
const r = l == null ? void 0 : l.find((u) => u.id === e.id), s = l == null ? void 0 : l.findIndex((u) => u.id === e.id);
|
|
5181
|
+
let c = [], p, f = a ? t : o === "desc";
|
|
5182
|
+
if (l != null && l.length && e.getCanMultiSort() && i ? r ? p = "toggle" : p = "add" : l != null && l.length && s !== l.length - 1 ? p = "replace" : r ? p = "toggle" : p = "replace", p === "toggle" && (a || o || (p = "remove")), p === "add") {
|
|
5150
5183
|
var g;
|
|
5151
5184
|
c = [...l, {
|
|
5152
5185
|
id: e.id,
|
|
5153
5186
|
desc: f
|
|
5154
5187
|
}], c.splice(0, c.length - ((g = n.options.maxMultiSortColCount) != null ? g : Number.MAX_SAFE_INTEGER));
|
|
5155
|
-
} else
|
|
5156
|
-
...
|
|
5188
|
+
} else p === "toggle" ? c = l.map((u) => u.id === e.id ? {
|
|
5189
|
+
...u,
|
|
5157
5190
|
desc: f
|
|
5158
|
-
} :
|
|
5191
|
+
} : u) : p === "remove" ? c = l.filter((u) => u.id !== e.id) : c = [{
|
|
5159
5192
|
id: e.id,
|
|
5160
5193
|
desc: f
|
|
5161
5194
|
}];
|
|
@@ -5224,7 +5257,7 @@ function br(e) {
|
|
|
5224
5257
|
let o = {
|
|
5225
5258
|
_features: i
|
|
5226
5259
|
};
|
|
5227
|
-
const a = o._features.reduce((g,
|
|
5260
|
+
const a = o._features.reduce((g, u) => Object.assign(g, u.getDefaultOptions == null ? void 0 : u.getDefaultOptions(o)), {}), l = (g) => o.options.mergeOptions ? o.options.mergeOptions(a, g) : {
|
|
5228
5261
|
...a,
|
|
5229
5262
|
...g
|
|
5230
5263
|
};
|
|
@@ -5233,11 +5266,11 @@ function br(e) {
|
|
|
5233
5266
|
...(t = e.initialState) != null ? t : {}
|
|
5234
5267
|
};
|
|
5235
5268
|
o._features.forEach((g) => {
|
|
5236
|
-
var
|
|
5237
|
-
s = (
|
|
5269
|
+
var u;
|
|
5270
|
+
s = (u = g.getInitialState == null ? void 0 : g.getInitialState(s)) != null ? u : s;
|
|
5238
5271
|
});
|
|
5239
5272
|
const c = [];
|
|
5240
|
-
let
|
|
5273
|
+
let p = !1;
|
|
5241
5274
|
const f = {
|
|
5242
5275
|
_features: i,
|
|
5243
5276
|
options: {
|
|
@@ -5246,43 +5279,43 @@ function br(e) {
|
|
|
5246
5279
|
},
|
|
5247
5280
|
initialState: s,
|
|
5248
5281
|
_queue: (g) => {
|
|
5249
|
-
c.push(g),
|
|
5282
|
+
c.push(g), p || (p = !0, Promise.resolve().then(() => {
|
|
5250
5283
|
for (; c.length; )
|
|
5251
5284
|
c.shift()();
|
|
5252
|
-
|
|
5253
|
-
}).catch((
|
|
5254
|
-
throw
|
|
5285
|
+
p = !1;
|
|
5286
|
+
}).catch((u) => setTimeout(() => {
|
|
5287
|
+
throw u;
|
|
5255
5288
|
})));
|
|
5256
5289
|
},
|
|
5257
5290
|
reset: () => {
|
|
5258
5291
|
o.setState(o.initialState);
|
|
5259
5292
|
},
|
|
5260
5293
|
setOptions: (g) => {
|
|
5261
|
-
const
|
|
5262
|
-
o.options = l(
|
|
5294
|
+
const u = Ee(g, o.options);
|
|
5295
|
+
o.options = l(u);
|
|
5263
5296
|
},
|
|
5264
5297
|
getState: () => o.options.state,
|
|
5265
5298
|
setState: (g) => {
|
|
5266
5299
|
o.options.onStateChange == null || o.options.onStateChange(g);
|
|
5267
5300
|
},
|
|
5268
|
-
_getRowId: (g,
|
|
5301
|
+
_getRowId: (g, u, m) => {
|
|
5269
5302
|
var v;
|
|
5270
|
-
return (v = o.options.getRowId == null ? void 0 : o.options.getRowId(g,
|
|
5303
|
+
return (v = o.options.getRowId == null ? void 0 : o.options.getRowId(g, u, m)) != null ? v : `${m ? [m.id, u].join(".") : u}`;
|
|
5271
5304
|
},
|
|
5272
5305
|
getCoreRowModel: () => (o._getCoreRowModel || (o._getCoreRowModel = o.options.getCoreRowModel(o)), o._getCoreRowModel()),
|
|
5273
5306
|
// The final calls start at the bottom of the model,
|
|
5274
5307
|
// expanded rows, which then work their way up
|
|
5275
5308
|
getRowModel: () => o.getPaginationRowModel(),
|
|
5276
5309
|
//in next version, we should just pass in the row model as the optional 2nd arg
|
|
5277
|
-
getRow: (g,
|
|
5278
|
-
let m = (
|
|
5310
|
+
getRow: (g, u) => {
|
|
5311
|
+
let m = (u ? o.getPrePaginationRowModel() : o.getRowModel()).rowsById[g];
|
|
5279
5312
|
if (!m && (m = o.getCoreRowModel().rowsById[g], !m))
|
|
5280
5313
|
throw process.env.NODE_ENV !== "production" ? new Error(`getRow could not find row with ID: ${g}`) : new Error();
|
|
5281
5314
|
return m;
|
|
5282
5315
|
},
|
|
5283
5316
|
_getDefaultColumnDef: D(() => [o.options.defaultColumn], (g) => {
|
|
5284
|
-
var
|
|
5285
|
-
return g = (
|
|
5317
|
+
var u;
|
|
5318
|
+
return g = (u = g) != null ? u : {}, {
|
|
5286
5319
|
header: (m) => {
|
|
5287
5320
|
const v = m.header.column.columnDef;
|
|
5288
5321
|
return v.accessorKey ? v.accessorKey : v.accessorFn ? v.id : null;
|
|
@@ -5298,29 +5331,29 @@ function br(e) {
|
|
|
5298
5331
|
}, A(e, "debugColumns", "_getDefaultColumnDef")),
|
|
5299
5332
|
_getColumnDefs: () => o.options.columns,
|
|
5300
5333
|
getAllColumns: D(() => [o._getColumnDefs()], (g) => {
|
|
5301
|
-
const
|
|
5334
|
+
const u = function(m, v, b) {
|
|
5302
5335
|
return b === void 0 && (b = 0), m.map((x) => {
|
|
5303
5336
|
const E = Na(o, x, b, v), w = x;
|
|
5304
|
-
return E.columns = w.columns ?
|
|
5337
|
+
return E.columns = w.columns ? u(w.columns, E, b + 1) : [], E;
|
|
5305
5338
|
});
|
|
5306
5339
|
};
|
|
5307
|
-
return
|
|
5340
|
+
return u(g);
|
|
5308
5341
|
}, A(e, "debugColumns", "getAllColumns")),
|
|
5309
|
-
getAllFlatColumns: D(() => [o.getAllColumns()], (g) => g.flatMap((
|
|
5310
|
-
_getAllFlatColumnsById: D(() => [o.getAllFlatColumns()], (g) => g.reduce((
|
|
5311
|
-
getAllLeafColumns: D(() => [o.getAllColumns(), o._getOrderColumnsFn()], (g,
|
|
5342
|
+
getAllFlatColumns: D(() => [o.getAllColumns()], (g) => g.flatMap((u) => u.getFlatColumns()), A(e, "debugColumns", "getAllFlatColumns")),
|
|
5343
|
+
_getAllFlatColumnsById: D(() => [o.getAllFlatColumns()], (g) => g.reduce((u, m) => (u[m.id] = m, u), {}), A(e, "debugColumns", "getAllFlatColumnsById")),
|
|
5344
|
+
getAllLeafColumns: D(() => [o.getAllColumns(), o._getOrderColumnsFn()], (g, u) => {
|
|
5312
5345
|
let m = g.flatMap((v) => v.getLeafColumns());
|
|
5313
|
-
return
|
|
5346
|
+
return u(m);
|
|
5314
5347
|
}, A(e, "debugColumns", "getAllLeafColumns")),
|
|
5315
5348
|
getColumn: (g) => {
|
|
5316
|
-
const
|
|
5317
|
-
return process.env.NODE_ENV !== "production" && !
|
|
5349
|
+
const u = o._getAllFlatColumnsById()[g];
|
|
5350
|
+
return process.env.NODE_ENV !== "production" && !u && console.error(`[Table] Column with id '${g}' does not exist.`), u;
|
|
5318
5351
|
}
|
|
5319
5352
|
};
|
|
5320
5353
|
Object.assign(o, f);
|
|
5321
5354
|
for (let g = 0; g < o._features.length; g++) {
|
|
5322
|
-
const
|
|
5323
|
-
|
|
5355
|
+
const u = o._features[g];
|
|
5356
|
+
u == null || u.createTable == null || u.createTable(o);
|
|
5324
5357
|
}
|
|
5325
5358
|
return o;
|
|
5326
5359
|
}
|
|
@@ -5334,10 +5367,10 @@ function Sr() {
|
|
|
5334
5367
|
a === void 0 && (a = 0);
|
|
5335
5368
|
const r = [];
|
|
5336
5369
|
for (let c = 0; c < o.length; c++) {
|
|
5337
|
-
const
|
|
5338
|
-
if (t.flatRows.push(
|
|
5370
|
+
const p = ci(e, e._getRowId(o[c], c, l), o[c], c, a, void 0, l == null ? void 0 : l.id);
|
|
5371
|
+
if (t.flatRows.push(p), t.rowsById[p.id] = p, r.push(p), e.options.getSubRows) {
|
|
5339
5372
|
var s;
|
|
5340
|
-
|
|
5373
|
+
p.originalSubRows = e.options.getSubRows(o[c], c), (s = p.originalSubRows) != null && s.length && (p.subRows = i(p.originalSubRows, a + 1, p));
|
|
5341
5374
|
}
|
|
5342
5375
|
}
|
|
5343
5376
|
return r;
|
|
@@ -5365,18 +5398,18 @@ function Rr() {
|
|
|
5365
5398
|
return t.rows.forEach((s) => {
|
|
5366
5399
|
s.depth = 0, s.parentId = void 0;
|
|
5367
5400
|
}), t;
|
|
5368
|
-
const i = n.filter((s) => e.getColumn(s)), o = [], a = {}, l = function(s, c,
|
|
5401
|
+
const i = n.filter((s) => e.getColumn(s)), o = [], a = {}, l = function(s, c, p) {
|
|
5369
5402
|
if (c === void 0 && (c = 0), c >= i.length)
|
|
5370
5403
|
return s.map((m) => (m.depth = c, o.push(m), a[m.id] = m, m.subRows && (m.subRows = l(m.subRows, c + 1, m.id)), m));
|
|
5371
5404
|
const f = i[c], g = Er(s, f);
|
|
5372
5405
|
return Array.from(g.entries()).map((m, v) => {
|
|
5373
5406
|
let [b, x] = m, E = `${f}:${b}`;
|
|
5374
|
-
E =
|
|
5407
|
+
E = p ? `${p}>${E}` : E;
|
|
5375
5408
|
const w = l(x, c + 1, E);
|
|
5376
5409
|
w.forEach((P) => {
|
|
5377
5410
|
P.parentId = E;
|
|
5378
5411
|
});
|
|
5379
|
-
const F = c ?
|
|
5412
|
+
const F = c ? si(x, (P) => P.subRows) : x, h = ci(e, E, F[0].original, v, c, void 0, p);
|
|
5380
5413
|
return Object.assign(h, {
|
|
5381
5414
|
groupingColumnId: f,
|
|
5382
5415
|
groupingValue: b,
|
|
@@ -5433,7 +5466,7 @@ function Er(e, n) {
|
|
|
5433
5466
|
*
|
|
5434
5467
|
* @license MIT
|
|
5435
5468
|
*/
|
|
5436
|
-
function
|
|
5469
|
+
function wi(e, n) {
|
|
5437
5470
|
return e ? kr(e) ? /* @__PURE__ */ pe.createElement(e, n) : e : null;
|
|
5438
5471
|
}
|
|
5439
5472
|
function kr(e) {
|
|
@@ -5483,7 +5516,7 @@ const In = ({
|
|
|
5483
5516
|
desc: /* @__PURE__ */ d(Re, { name: "chevron-down", children: "descending" })
|
|
5484
5517
|
}[(n = e == null ? void 0 : e.column) == null ? void 0 : n.getIsSorted()] ?? null;
|
|
5485
5518
|
}, Dr = ({ header: e }) => {
|
|
5486
|
-
const n = e.column.getCanSort(), t = e.column.columnDef.meta, i = t == null ? void 0 : t.isInteractiveHeader, o =
|
|
5519
|
+
const n = e.column.getCanSort(), t = e.column.columnDef.meta, i = t == null ? void 0 : t.isInteractiveHeader, o = wi(e.column.columnDef.header, e.getContext());
|
|
5487
5520
|
return /* @__PURE__ */ d(
|
|
5488
5521
|
"th",
|
|
5489
5522
|
{
|
|
@@ -5533,15 +5566,15 @@ const Mr = ({
|
|
|
5533
5566
|
pageSizes: r = [20, 30, 50, 100]
|
|
5534
5567
|
}) => {
|
|
5535
5568
|
const s = le(() => r, []), c = le(
|
|
5536
|
-
() => s.map((
|
|
5537
|
-
label: `${
|
|
5538
|
-
value:
|
|
5569
|
+
() => s.map((u) => ({
|
|
5570
|
+
label: `${u}/page`,
|
|
5571
|
+
value: u
|
|
5539
5572
|
})),
|
|
5540
5573
|
[s]
|
|
5541
|
-
),
|
|
5542
|
-
const { value: m } =
|
|
5574
|
+
), p = Math.ceil(t / n), f = (u) => {
|
|
5575
|
+
const { value: m } = u.target;
|
|
5543
5576
|
i(Number(m));
|
|
5544
|
-
}, g = () => e ===
|
|
5577
|
+
}, g = () => e === p ? n - (p * n - t) : e < p ? n : 0;
|
|
5545
5578
|
return /* @__PURE__ */ G(Ne, { children: [
|
|
5546
5579
|
/* @__PURE__ */ G(Ne.Left, { children: [
|
|
5547
5580
|
"Showing ",
|
|
@@ -5558,11 +5591,11 @@ const Mr = ({
|
|
|
5558
5591
|
currentPage: e,
|
|
5559
5592
|
disabled: l,
|
|
5560
5593
|
paginate: a,
|
|
5561
|
-
totalPages:
|
|
5594
|
+
totalPages: p
|
|
5562
5595
|
}
|
|
5563
5596
|
),
|
|
5564
5597
|
/* @__PURE__ */ d(
|
|
5565
|
-
|
|
5598
|
+
Ti,
|
|
5566
5599
|
{
|
|
5567
5600
|
"aria-label": "Items per page",
|
|
5568
5601
|
className: "u-no-margin--bottom",
|
|
@@ -5578,7 +5611,7 @@ const Mr = ({
|
|
|
5578
5611
|
grouping: e,
|
|
5579
5612
|
initialData: n
|
|
5580
5613
|
}) => {
|
|
5581
|
-
const [t, i] =
|
|
5614
|
+
const [t, i] = fe(!0), o = U(
|
|
5582
5615
|
(a) => {
|
|
5583
5616
|
i((l) => {
|
|
5584
5617
|
const r = typeof a == "function" ? a(l) : a;
|
|
@@ -5592,11 +5625,11 @@ const Mr = ({
|
|
|
5592
5625
|
},
|
|
5593
5626
|
[]
|
|
5594
5627
|
);
|
|
5595
|
-
return
|
|
5628
|
+
return ue(() => {
|
|
5596
5629
|
e.length && o((a) => {
|
|
5597
5630
|
const r = { ...a === !0 ? {} : { ...a } };
|
|
5598
5631
|
for (const s of n) {
|
|
5599
|
-
const c = e.map((
|
|
5632
|
+
const c = e.map((p) => `${p}:${s[p]}`).join(">");
|
|
5600
5633
|
c in r || (r[c] = !0);
|
|
5601
5634
|
}
|
|
5602
5635
|
return r;
|
|
@@ -5606,7 +5639,7 @@ const Mr = ({
|
|
|
5606
5639
|
groupBy: e,
|
|
5607
5640
|
initialData: n
|
|
5608
5641
|
}) => {
|
|
5609
|
-
const [t, i] =
|
|
5642
|
+
const [t, i] = fe(e ?? []), o = le(() => t.length ? [...n].sort((a, l) => {
|
|
5610
5643
|
for (const r of t) {
|
|
5611
5644
|
const s = a[r] ?? null, c = l[r] ?? null;
|
|
5612
5645
|
if (s === null) return 1;
|
|
@@ -5619,8 +5652,8 @@ const Mr = ({
|
|
|
5619
5652
|
}, Tr = ({
|
|
5620
5653
|
isLoading: e
|
|
5621
5654
|
}) => {
|
|
5622
|
-
const n =
|
|
5623
|
-
|
|
5655
|
+
const n = ge(null), t = ge(null);
|
|
5656
|
+
ue(() => {
|
|
5624
5657
|
const a = n.current;
|
|
5625
5658
|
if (!a || e) return;
|
|
5626
5659
|
const l = [
|
|
@@ -5662,23 +5695,23 @@ const Mr = ({
|
|
|
5662
5695
|
const s = r.matches('tr[role="row"]'), c = r.matches('td[role="gridcell"][tabindex="-1"]');
|
|
5663
5696
|
if (!s && !c) return;
|
|
5664
5697
|
a.preventDefault();
|
|
5665
|
-
const
|
|
5698
|
+
const p = Array.from(
|
|
5666
5699
|
l.querySelectorAll('tbody tr[role="row"]')
|
|
5667
5700
|
), f = s ? r : r.closest("tr");
|
|
5668
5701
|
if (!f) return;
|
|
5669
|
-
const g =
|
|
5702
|
+
const g = p.indexOf(f);
|
|
5670
5703
|
if (g === -1) return;
|
|
5671
|
-
const
|
|
5704
|
+
const u = (h) => Array.from(
|
|
5672
5705
|
h.querySelectorAll(
|
|
5673
5706
|
'td[role="gridcell"][tabindex="-1"]:not(.p-generic-table__group-chevron)'
|
|
5674
5707
|
)
|
|
5675
|
-
), m =
|
|
5708
|
+
), m = u(f), v = c ? m.indexOf(r) : -1;
|
|
5676
5709
|
switch (a.key) {
|
|
5677
5710
|
case "ArrowUp": {
|
|
5678
5711
|
if (g <= 0) break;
|
|
5679
|
-
const h =
|
|
5712
|
+
const h = p[g - 1];
|
|
5680
5713
|
if (c && v >= 0) {
|
|
5681
|
-
const P =
|
|
5714
|
+
const P = u(h);
|
|
5682
5715
|
if (P.length > 0) {
|
|
5683
5716
|
P[Math.min(v, P.length - 1)].focus();
|
|
5684
5717
|
break;
|
|
@@ -5688,10 +5721,10 @@ const Mr = ({
|
|
|
5688
5721
|
break;
|
|
5689
5722
|
}
|
|
5690
5723
|
case "ArrowDown": {
|
|
5691
|
-
if (g >=
|
|
5692
|
-
const h =
|
|
5724
|
+
if (g >= p.length - 1) break;
|
|
5725
|
+
const h = p[g + 1];
|
|
5693
5726
|
if (c && v >= 0) {
|
|
5694
|
-
const P =
|
|
5727
|
+
const P = u(h);
|
|
5695
5728
|
if (P.length > 0) {
|
|
5696
5729
|
P[Math.min(v, P.length - 1)].focus();
|
|
5697
5730
|
break;
|
|
@@ -5708,10 +5741,10 @@ const Mr = ({
|
|
|
5708
5741
|
v > 0 ? m[v - 1].focus() : f.focus();
|
|
5709
5742
|
break;
|
|
5710
5743
|
case "Home":
|
|
5711
|
-
c ? (x = m[0]) == null || x.focus() : a.ctrlKey && ((E =
|
|
5744
|
+
c ? (x = m[0]) == null || x.focus() : a.ctrlKey && ((E = p[0]) == null || E.focus());
|
|
5712
5745
|
break;
|
|
5713
5746
|
case "End":
|
|
5714
|
-
c ? (w = m[m.length - 1]) == null || w.focus() : a.ctrlKey && ((F =
|
|
5747
|
+
c ? (w = m[m.length - 1]) == null || w.focus() : a.ctrlKey && ((F = p[p.length - 1]) == null || F.focus());
|
|
5715
5748
|
break;
|
|
5716
5749
|
}
|
|
5717
5750
|
},
|
|
@@ -5724,22 +5757,22 @@ const Mr = ({
|
|
|
5724
5757
|
length: t,
|
|
5725
5758
|
isLoading: i
|
|
5726
5759
|
}) => {
|
|
5727
|
-
const o =
|
|
5760
|
+
const o = ge(null), [a, l] = fe("auto"), [r, s] = fe(!1);
|
|
5728
5761
|
return Ht(() => {
|
|
5729
|
-
const
|
|
5730
|
-
const
|
|
5731
|
-
if (!
|
|
5762
|
+
const p = () => {
|
|
5763
|
+
const u = o.current;
|
|
5764
|
+
if (!u) return;
|
|
5732
5765
|
const m = (e == null ? void 0 : e.current) || document.querySelector("main");
|
|
5733
5766
|
if (!m) return;
|
|
5734
|
-
const v = m.getBoundingClientRect(), b =
|
|
5767
|
+
const v = m.getBoundingClientRect(), b = u.getBoundingClientRect(), x = v.bottom - b.top, w = u.scrollHeight > x;
|
|
5735
5768
|
s(w), l(
|
|
5736
5769
|
n === "full-height" && w ? `${x}px` : "auto"
|
|
5737
5770
|
);
|
|
5738
5771
|
};
|
|
5739
|
-
|
|
5740
|
-
const f = new ResizeObserver(
|
|
5741
|
-
return g && f.observe(g), window.addEventListener("resize",
|
|
5742
|
-
window.removeEventListener("resize",
|
|
5772
|
+
p();
|
|
5773
|
+
const f = new ResizeObserver(p), g = o.current;
|
|
5774
|
+
return g && f.observe(g), window.addEventListener("resize", p), () => {
|
|
5775
|
+
window.removeEventListener("resize", p), g && f.unobserve(g);
|
|
5743
5776
|
};
|
|
5744
5777
|
}, [e, t, i]), { tableBodyRef: o, maxHeight: a, effectiveVariant: n === "full-height" && r ? "full-height" : "regular" };
|
|
5745
5778
|
}, Vr = ({
|
|
@@ -5749,36 +5782,36 @@ const Mr = ({
|
|
|
5749
5782
|
groupedData: i,
|
|
5750
5783
|
pinGroup: o
|
|
5751
5784
|
}) => {
|
|
5752
|
-
const [a, l] =
|
|
5785
|
+
const [a, l] = fe(e ?? []), r = U(
|
|
5753
5786
|
(c) => {
|
|
5754
5787
|
l(c), n && n(c);
|
|
5755
5788
|
},
|
|
5756
5789
|
[n]
|
|
5757
|
-
), s = le(() => i.length ? [...i].sort((c,
|
|
5790
|
+
), s = le(() => i.length ? [...i].sort((c, p) => {
|
|
5758
5791
|
if (o != null && o.length && t.length)
|
|
5759
5792
|
for (const { value: f, isTop: g } of o) {
|
|
5760
|
-
const
|
|
5793
|
+
const u = t[0], m = c[u] ?? null, v = p[u] ?? null;
|
|
5761
5794
|
if (m === f && v !== f)
|
|
5762
5795
|
return g ? -1 : 1;
|
|
5763
5796
|
if (v === f && m !== f)
|
|
5764
5797
|
return g ? 1 : -1;
|
|
5765
5798
|
}
|
|
5766
5799
|
for (const { id: f, desc: g } of a) {
|
|
5767
|
-
const
|
|
5768
|
-
if (
|
|
5769
|
-
if (
|
|
5770
|
-
if (m === null ||
|
|
5771
|
-
if (
|
|
5800
|
+
const u = c[f] ?? null, m = p[f] ?? null;
|
|
5801
|
+
if (u === null && m === null) return 0;
|
|
5802
|
+
if (u === null) return g ? -1 : 1;
|
|
5803
|
+
if (m === null || u < m) return g ? 1 : -1;
|
|
5804
|
+
if (u > m) return g ? -1 : 1;
|
|
5772
5805
|
}
|
|
5773
5806
|
return 0;
|
|
5774
5807
|
}) : [], [i, a, o, t]);
|
|
5775
5808
|
return { sorting: a, setSorting: r, sortedData: s };
|
|
5776
5809
|
}, Lr = ({ table: e, ...n }) => {
|
|
5777
|
-
const t =
|
|
5810
|
+
const t = ge(null);
|
|
5778
5811
|
if (!e)
|
|
5779
5812
|
return null;
|
|
5780
5813
|
const i = e.getCoreRowModel().rows.filter((r) => r.getCanSelect()), o = e.getSelectedRowModel().rows.filter((r) => r.getCanSelect()), a = i.length > 0 && o.length === i.length, l = o.length > 0 && !a;
|
|
5781
|
-
return
|
|
5814
|
+
return ue(() => {
|
|
5782
5815
|
t.current && (t.current.indeterminate = l);
|
|
5783
5816
|
}, [l]), // eslint-disable-next-line jsx-a11y/no-noninteractive-element-interactions
|
|
5784
5817
|
/* @__PURE__ */ G(
|
|
@@ -5809,7 +5842,7 @@ const Mr = ({
|
|
|
5809
5842
|
}
|
|
5810
5843
|
);
|
|
5811
5844
|
}, Nr = ({ row: e, ...n }) => {
|
|
5812
|
-
const t =
|
|
5845
|
+
const t = ge(null);
|
|
5813
5846
|
if (!e)
|
|
5814
5847
|
return null;
|
|
5815
5848
|
const i = e.subRows.filter(
|
|
@@ -5817,7 +5850,7 @@ const Mr = ({
|
|
|
5817
5850
|
), o = i.filter(
|
|
5818
5851
|
(r) => r.getIsSelected()
|
|
5819
5852
|
).length, a = i.length > 0 && o === i.length, l = o > 0 && !a;
|
|
5820
|
-
return
|
|
5853
|
+
return ue(() => {
|
|
5821
5854
|
t.current && (t.current.indeterminate = l);
|
|
5822
5855
|
}, [l]), // eslint-disable-next-line jsx-a11y/no-noninteractive-element-interactions
|
|
5823
5856
|
/* @__PURE__ */ G(
|
|
@@ -5903,11 +5936,11 @@ const Hr = ({
|
|
|
5903
5936
|
meta: { headerAriaLabel: "Row selection" },
|
|
5904
5937
|
header: ({ table: c }) => i ? "" : /* @__PURE__ */ d(Me.All, { table: c }),
|
|
5905
5938
|
cell: ({ row: c }) => {
|
|
5906
|
-
const
|
|
5939
|
+
const p = a.rowSelectionLabelKey && a.rowSelectionLabelKey in c.original ? `select ${c.original[a.rowSelectionLabelKey]}` : "select row";
|
|
5907
5940
|
return c.getIsGrouped() ? null : /* @__PURE__ */ d(
|
|
5908
5941
|
Me,
|
|
5909
5942
|
{
|
|
5910
|
-
"aria-label":
|
|
5943
|
+
"aria-label": p,
|
|
5911
5944
|
disabledTooltip: a.disabledSelectionTooltip ?? "",
|
|
5912
5945
|
isNested: o !== void 0 && !!c.parentId,
|
|
5913
5946
|
row: c
|
|
@@ -5918,15 +5951,15 @@ const Hr = ({
|
|
|
5918
5951
|
...r
|
|
5919
5952
|
];
|
|
5920
5953
|
if (i) {
|
|
5921
|
-
const c = (
|
|
5954
|
+
const c = (p) => i[0] in p.original ? `select ${p.original[i[0]]}` : "select group";
|
|
5922
5955
|
r = [
|
|
5923
5956
|
{
|
|
5924
5957
|
id: "p-generic-table__group-select",
|
|
5925
5958
|
accessorKey: "id",
|
|
5926
5959
|
enableSorting: !1,
|
|
5927
5960
|
meta: { headerAriaLabel: "Row selection" },
|
|
5928
|
-
header: ({ table:
|
|
5929
|
-
cell: ({ row:
|
|
5961
|
+
header: ({ table: p }) => /* @__PURE__ */ d(Me.All, { table: p }),
|
|
5962
|
+
cell: ({ row: p }) => p.getIsGrouped() ? /* @__PURE__ */ d(Me.Group, { "aria-label": c(p), row: p }) : null
|
|
5930
5963
|
},
|
|
5931
5964
|
...s
|
|
5932
5965
|
];
|
|
@@ -5940,13 +5973,13 @@ const Hr = ({
|
|
|
5940
5973
|
meta: { headerAriaHidden: !0 },
|
|
5941
5974
|
header: "",
|
|
5942
5975
|
cell: ({ row: c }) => {
|
|
5943
|
-
const
|
|
5976
|
+
const p = c.getIsExpanded();
|
|
5944
5977
|
return c.getIsGrouped() ? /* @__PURE__ */ d(
|
|
5945
5978
|
Gt,
|
|
5946
5979
|
{
|
|
5947
|
-
message:
|
|
5980
|
+
message: p ? "Collapse" : "Expand",
|
|
5948
5981
|
position: "btm-right",
|
|
5949
|
-
children: /* @__PURE__ */ d(Re, { name:
|
|
5982
|
+
children: /* @__PURE__ */ d(Re, { name: p ? en.chevronUp : en.chevronDown })
|
|
5950
5983
|
}
|
|
5951
5984
|
) : null;
|
|
5952
5985
|
}
|
|
@@ -5972,7 +6005,7 @@ const Hr = ({
|
|
|
5972
6005
|
let l = 1;
|
|
5973
6006
|
return e.getRowModel().rows.map((r) => {
|
|
5974
6007
|
l++;
|
|
5975
|
-
const s = l, { getIsGrouped: c, id:
|
|
6008
|
+
const s = l, { getIsGrouped: c, id: p, getVisibleCells: f, parentId: g } = r, u = !c(), m = (a == null ? void 0 : a.rowSelection) !== void 0 && Object.keys(a.rowSelection).includes(p), v = (x) => {
|
|
5976
6009
|
x.target === x.currentTarget && (x.key === "Enter" || x.key === " ") && (x.preventDefault(), r.toggleExpanded());
|
|
5977
6010
|
}, b = (x) => {
|
|
5978
6011
|
if (x.target !== x.currentTarget || x.key !== "Enter" && x.key !== " ") return;
|
|
@@ -5985,19 +6018,19 @@ const Hr = ({
|
|
|
5985
6018
|
return /* @__PURE__ */ d(
|
|
5986
6019
|
"tr",
|
|
5987
6020
|
{
|
|
5988
|
-
"aria-expanded":
|
|
6021
|
+
"aria-expanded": u ? void 0 : r.getIsExpanded(),
|
|
5989
6022
|
"aria-rowindex": s,
|
|
5990
6023
|
"aria-selected": m,
|
|
5991
6024
|
className: L({
|
|
5992
|
-
"p-generic-table__individual-row":
|
|
5993
|
-
"p-generic-table__group-row": !
|
|
6025
|
+
"p-generic-table__individual-row": u,
|
|
6026
|
+
"p-generic-table__group-row": !u,
|
|
5994
6027
|
"p-generic-table__nested-row": i !== void 0 && !!g
|
|
5995
6028
|
}),
|
|
5996
|
-
onClick:
|
|
5997
|
-
onKeyDown:
|
|
6029
|
+
onClick: u ? void 0 : () => r.toggleExpanded(),
|
|
6030
|
+
onKeyDown: u ? b : v,
|
|
5998
6031
|
tabIndex: -1,
|
|
5999
6032
|
role: "row",
|
|
6000
|
-
children: f().filter((x) => !
|
|
6033
|
+
children: f().filter((x) => !u && (x.column.id === "p-generic-table__group-select" || x.column.id === "p-generic-table__group-chevron") ? !0 : t(r, x.column)).map((x) => {
|
|
6001
6034
|
var E, w;
|
|
6002
6035
|
return /* @__PURE__ */ d(
|
|
6003
6036
|
"td",
|
|
@@ -6007,13 +6040,13 @@ const Hr = ({
|
|
|
6007
6040
|
className: L(`${x.column.id}`),
|
|
6008
6041
|
role: "gridcell",
|
|
6009
6042
|
tabIndex: -1,
|
|
6010
|
-
children:
|
|
6043
|
+
children: wi(x.column.columnDef.cell, x.getContext())
|
|
6011
6044
|
},
|
|
6012
6045
|
x.id
|
|
6013
6046
|
);
|
|
6014
6047
|
})
|
|
6015
6048
|
},
|
|
6016
|
-
|
|
6049
|
+
p
|
|
6017
6050
|
);
|
|
6018
6051
|
});
|
|
6019
6052
|
}, Gr = ({
|
|
@@ -6040,7 +6073,7 @@ const Hr = ({
|
|
|
6040
6073
|
className: "p-generic-table__skeleton-row",
|
|
6041
6074
|
role: "row",
|
|
6042
6075
|
children: a.map((c) => {
|
|
6043
|
-
const
|
|
6076
|
+
const p = c.column.columnDef.meta, f = c.column.id.startsWith("p-generic-table__");
|
|
6044
6077
|
return /* @__PURE__ */ d(
|
|
6045
6078
|
"td",
|
|
6046
6079
|
{
|
|
@@ -6049,7 +6082,7 @@ const Hr = ({
|
|
|
6049
6082
|
c.column.id
|
|
6050
6083
|
),
|
|
6051
6084
|
role: "gridcell",
|
|
6052
|
-
children: f ? null :
|
|
6085
|
+
children: f ? null : p != null && p.skeleton ? p.skeleton() : /* @__PURE__ */ d(zn, { variant: "block", width: "70%", height: "1.5rem" })
|
|
6053
6086
|
},
|
|
6054
6087
|
`skel-${s}-${c.id}`
|
|
6055
6088
|
);
|
|
@@ -6068,10 +6101,10 @@ const Hr = ({
|
|
|
6068
6101
|
getSubRows: r,
|
|
6069
6102
|
groupBy: s,
|
|
6070
6103
|
isLoading: c,
|
|
6071
|
-
loadingVariant:
|
|
6104
|
+
loadingVariant: p = "spinner",
|
|
6072
6105
|
skeletonRowCount: f = 10,
|
|
6073
6106
|
noData: g,
|
|
6074
|
-
pagination:
|
|
6107
|
+
pagination: u,
|
|
6075
6108
|
pinGroup: m,
|
|
6076
6109
|
sorting: v = [],
|
|
6077
6110
|
selection: b,
|
|
@@ -6089,7 +6122,7 @@ const Hr = ({
|
|
|
6089
6122
|
grouping: h,
|
|
6090
6123
|
groupedData: z,
|
|
6091
6124
|
pinGroup: m
|
|
6092
|
-
}), { expanded:
|
|
6125
|
+
}), { expanded: de, setExpanded: he } = Or({
|
|
6093
6126
|
grouping: h,
|
|
6094
6127
|
initialData: o
|
|
6095
6128
|
}), { tableBodyRef: k, maxHeight: _, effectiveVariant: q } = zr({
|
|
@@ -6113,7 +6146,7 @@ const Hr = ({
|
|
|
6113
6146
|
columns: J,
|
|
6114
6147
|
state: {
|
|
6115
6148
|
grouping: h,
|
|
6116
|
-
expanded:
|
|
6149
|
+
expanded: de,
|
|
6117
6150
|
sorting: ee,
|
|
6118
6151
|
rowSelection: b == null ? void 0 : b.rowSelection
|
|
6119
6152
|
},
|
|
@@ -6142,17 +6175,17 @@ const Hr = ({
|
|
|
6142
6175
|
"data-testid": "p-generic-table",
|
|
6143
6176
|
...F,
|
|
6144
6177
|
children: [
|
|
6145
|
-
|
|
6178
|
+
u && /* @__PURE__ */ d(
|
|
6146
6179
|
Mr,
|
|
6147
6180
|
{
|
|
6148
|
-
currentPage:
|
|
6149
|
-
dataContext:
|
|
6150
|
-
handlePageSizeChange:
|
|
6151
|
-
isPending:
|
|
6152
|
-
itemsPerPage:
|
|
6153
|
-
setCurrentPage:
|
|
6154
|
-
totalItems:
|
|
6155
|
-
pageSizes:
|
|
6181
|
+
currentPage: u.currentPage,
|
|
6182
|
+
dataContext: u.dataContext,
|
|
6183
|
+
handlePageSizeChange: u.handlePageSizeChange,
|
|
6184
|
+
isPending: u.isPending,
|
|
6185
|
+
itemsPerPage: u.itemsPerPage,
|
|
6186
|
+
setCurrentPage: u.setCurrentPage,
|
|
6187
|
+
totalItems: u.totalItems,
|
|
6188
|
+
pageSizes: u.pageSizes
|
|
6156
6189
|
}
|
|
6157
6190
|
),
|
|
6158
6191
|
/* @__PURE__ */ G(
|
|
@@ -6161,7 +6194,7 @@ const Hr = ({
|
|
|
6161
6194
|
ref: te,
|
|
6162
6195
|
"aria-busy": c,
|
|
6163
6196
|
"aria-label": e,
|
|
6164
|
-
"aria-rowcount": ((
|
|
6197
|
+
"aria-rowcount": ((u == null ? void 0 : u.totalItems) ?? ie.getRowModel().rows.length) + 1,
|
|
6165
6198
|
className: L("p-generic-table__table", {
|
|
6166
6199
|
"p-generic-table__is-full-height": q === "full-height",
|
|
6167
6200
|
"p-generic-table__is-selectable": K,
|
|
@@ -6194,7 +6227,7 @@ const Hr = ({
|
|
|
6194
6227
|
table: ie,
|
|
6195
6228
|
columns: J,
|
|
6196
6229
|
filterHeaders: l,
|
|
6197
|
-
loadingVariant:
|
|
6230
|
+
loadingVariant: p,
|
|
6198
6231
|
skeletonRowCount: f
|
|
6199
6232
|
}) : qr({
|
|
6200
6233
|
table: ie,
|
|
@@ -6260,14 +6293,14 @@ const Hr = ({
|
|
|
6260
6293
|
suggestions: r,
|
|
6261
6294
|
isLoading: s = !1,
|
|
6262
6295
|
placeholder: c,
|
|
6263
|
-
...
|
|
6296
|
+
...p
|
|
6264
6297
|
}) => {
|
|
6265
|
-
const [f, g] =
|
|
6298
|
+
const [f, g] = fe({
|
|
6266
6299
|
isVisible: !1,
|
|
6267
6300
|
highlightedIndex: -1,
|
|
6268
6301
|
showingMore: !1,
|
|
6269
6302
|
cursorPosition: 0
|
|
6270
|
-
}),
|
|
6303
|
+
}), u = ge(null), m = ge(null), v = ge(null), b = le(() => {
|
|
6271
6304
|
const k = f.showingMore ? Dn.EXPANDED : Dn.DEFAULT, _ = r.slice(0, k);
|
|
6272
6305
|
return !f.showingMore && r.length > k ? [..._, { value: "Show more...", type: "more" }] : _;
|
|
6273
6306
|
}, [r, f.showingMore]), x = U(
|
|
@@ -6277,7 +6310,7 @@ const Hr = ({
|
|
|
6277
6310
|
[]
|
|
6278
6311
|
), E = U(
|
|
6279
6312
|
(k) => {
|
|
6280
|
-
|
|
6313
|
+
u.current && !u.current.contains(k.target) && x({
|
|
6281
6314
|
isVisible: !1,
|
|
6282
6315
|
highlightedIndex: -1
|
|
6283
6316
|
});
|
|
@@ -6412,7 +6445,7 @@ const Hr = ({
|
|
|
6412
6445
|
[a, l, i, x]
|
|
6413
6446
|
), ce = U(() => {
|
|
6414
6447
|
setTimeout(h, 0);
|
|
6415
|
-
}, [h]),
|
|
6448
|
+
}, [h]), de = U(() => {
|
|
6416
6449
|
x({
|
|
6417
6450
|
isVisible: !1,
|
|
6418
6451
|
highlightedIndex: -1
|
|
@@ -6423,13 +6456,13 @@ const Hr = ({
|
|
|
6423
6456
|
},
|
|
6424
6457
|
[x]
|
|
6425
6458
|
);
|
|
6426
|
-
return
|
|
6459
|
+
return ue(() => (document.addEventListener("mousedown", E), () => document.removeEventListener("mousedown", E)), [E]), /* @__PURE__ */ G(
|
|
6427
6460
|
"div",
|
|
6428
6461
|
{
|
|
6429
6462
|
className: L("p-query-input", e),
|
|
6430
6463
|
"data-testid": "p-query-input",
|
|
6431
|
-
ref:
|
|
6432
|
-
...
|
|
6464
|
+
ref: u,
|
|
6465
|
+
...p,
|
|
6433
6466
|
children: [
|
|
6434
6467
|
/* @__PURE__ */ d(
|
|
6435
6468
|
jn,
|
|
@@ -6446,7 +6479,7 @@ const Hr = ({
|
|
|
6446
6479
|
onChange: ee,
|
|
6447
6480
|
onKeyDown: P,
|
|
6448
6481
|
onKeyUp: z,
|
|
6449
|
-
onClear:
|
|
6482
|
+
onClear: de,
|
|
6450
6483
|
onClick: ce,
|
|
6451
6484
|
"aria-disabled": n,
|
|
6452
6485
|
"aria-expanded": f.isVisible,
|
|
@@ -6506,27 +6539,27 @@ const Hr = ({
|
|
|
6506
6539
|
const l = e < 0, r = Math.abs(e);
|
|
6507
6540
|
if (r === 0)
|
|
6508
6541
|
return { value: 0, unit: i || "B" };
|
|
6509
|
-
const s = t ? 1024 : 1e3, c = t ? ["B", "KiB", "MiB", "GiB", "TiB", "PiB", "EiB", "ZiB", "YiB"] : ["B", "KB", "MB", "GB", "TB", "PB", "EB", "ZB", "YB"],
|
|
6510
|
-
let
|
|
6511
|
-
if (
|
|
6542
|
+
const s = t ? 1024 : 1e3, c = t ? ["B", "KiB", "MiB", "GiB", "TiB", "PiB", "EiB", "ZiB", "YiB"] : ["B", "KB", "MB", "GB", "TB", "PB", "EB", "ZB", "YB"], p = c.findIndex((v) => v === n) || 0, f = r * Math.pow(s, p), g = i ? c.findIndex((v) => v === i) : Math.floor(Math.log(f) / Math.log(s));
|
|
6543
|
+
let u = f / Math.pow(s, g);
|
|
6544
|
+
if (u % 1 !== 0) {
|
|
6512
6545
|
const v = Math.pow(10, o);
|
|
6513
|
-
|
|
6546
|
+
u = Math[a](u * v) / v;
|
|
6514
6547
|
}
|
|
6515
6548
|
return {
|
|
6516
|
-
value: l ? -
|
|
6549
|
+
value: l ? -u : u,
|
|
6517
6550
|
unit: c[g]
|
|
6518
6551
|
};
|
|
6519
6552
|
};
|
|
6520
6553
|
export {
|
|
6521
6554
|
ot as ContentSection,
|
|
6522
|
-
|
|
6555
|
+
ai as DynamicTable,
|
|
6523
6556
|
Qr as ExternalLink,
|
|
6524
6557
|
el as FileUpload,
|
|
6525
6558
|
Kt as FormSection,
|
|
6526
6559
|
nl as GenericTable,
|
|
6527
|
-
|
|
6528
|
-
|
|
6529
|
-
|
|
6560
|
+
Vn as InputGroup,
|
|
6561
|
+
Hn as MainToolbar,
|
|
6562
|
+
Ni as Meter,
|
|
6530
6563
|
tl as MultiSelect,
|
|
6531
6564
|
$a as MultiSelectDropdown,
|
|
6532
6565
|
re as Navigation,
|
|
@@ -6534,11 +6567,11 @@ export {
|
|
|
6534
6567
|
Jr as NestedFormGroup,
|
|
6535
6568
|
Ro as Pagination,
|
|
6536
6569
|
Eo as PaginationContainer,
|
|
6537
|
-
|
|
6538
|
-
|
|
6570
|
+
zn as Placeholder,
|
|
6571
|
+
Bi as ProgressIndicator,
|
|
6539
6572
|
il as QueryInput,
|
|
6540
6573
|
Zr as Stepper,
|
|
6541
|
-
|
|
6574
|
+
li as TableCaption,
|
|
6542
6575
|
Xr as defaultFilledColors,
|
|
6543
6576
|
ol as formatBytes,
|
|
6544
6577
|
Ie as meterColor,
|