@canonical/maas-react-components 1.35.0 → 2.0.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.
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { jsxs as B, jsx as
|
|
2
|
-
import * as
|
|
3
|
-
import Ci, { useRef as be, useState as
|
|
1
|
+
import { jsxs as B, jsx as u, Fragment as we } from "react/jsx-runtime";
|
|
2
|
+
import * as pe from "react";
|
|
3
|
+
import Ci, { useRef as be, useState as de, useEffect as Ce, useCallback as X, cloneElement as _i, createContext as $n, useId as et, useContext as Nt, useMemo as re, useReducer as An, forwardRef as Ri, useImperativeHandle as Ei, Fragment as Mn, useLayoutEffect as On } from "react";
|
|
4
4
|
import { useListener as ki, Link as Fi, Spinner as Ht, Tooltip as qt, Button as _e, Icon as Re, Row as Pi, Col as Ii, Input as Di, Label as $i, CheckboxInput as Ai, useClickOutside as Mi, useOnEscapePressed as Oi, SearchBox as jn, Select as ji, ICONS as Zt } from "@canonical/react-components";
|
|
5
5
|
function Gt(e) {
|
|
6
6
|
return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
|
|
@@ -45,7 +45,7 @@ function Ti() {
|
|
|
45
45
|
}(ft)), ft.exports;
|
|
46
46
|
}
|
|
47
47
|
var zi = Ti();
|
|
48
|
-
const
|
|
48
|
+
const G = /* @__PURE__ */ Gt(zi), Ie = {
|
|
49
49
|
caution: "#F99B11",
|
|
50
50
|
light: "#F7F7F7",
|
|
51
51
|
linkFaded: "#D3E4ED",
|
|
@@ -70,7 +70,7 @@ const q = /* @__PURE__ */ Gt(zi), Ie = {
|
|
|
70
70
|
label: "meter-label",
|
|
71
71
|
meteroverflow: "meter-overflow",
|
|
72
72
|
segments: "meter-segments"
|
|
73
|
-
},
|
|
73
|
+
}, Li = ({
|
|
74
74
|
className: e,
|
|
75
75
|
children: n,
|
|
76
76
|
data: t,
|
|
@@ -79,29 +79,29 @@ const q = /* @__PURE__ */ Gt(zi), Ie = {
|
|
|
79
79
|
size: a = "regular",
|
|
80
80
|
...r
|
|
81
81
|
}) => {
|
|
82
|
-
const l = be(null), s = t == null ? void 0 : t.reduce((m, v) => m + v.value, 0),
|
|
82
|
+
const l = be(null), s = t == null ? void 0 : t.reduce((m, v) => m + v.value, 0), p = i || s, d = t.map((m) => m.value / p * 100), [f, g] = de(0);
|
|
83
83
|
Ce(() => {
|
|
84
|
-
g(o === "segmented" ? on(l,
|
|
85
|
-
}, [
|
|
86
|
-
const
|
|
87
|
-
g(on(l,
|
|
88
|
-
}, [l,
|
|
89
|
-
return ki(window,
|
|
84
|
+
g(o === "segmented" ? on(l, p) : 0);
|
|
85
|
+
}, [p, o]);
|
|
86
|
+
const c = X(() => {
|
|
87
|
+
g(on(l, p));
|
|
88
|
+
}, [l, p, g]);
|
|
89
|
+
return ki(window, c, "resize", !0, o === "segmented"), /* @__PURE__ */ B(
|
|
90
90
|
"div",
|
|
91
91
|
{
|
|
92
|
-
className:
|
|
92
|
+
className: G("p-meter", e, {
|
|
93
93
|
"p-meter--small": a === "small"
|
|
94
94
|
}),
|
|
95
95
|
"aria-label": r == null ? void 0 : r["aria-label"],
|
|
96
96
|
"data-testid": Oe.container,
|
|
97
97
|
ref: l,
|
|
98
98
|
children: [
|
|
99
|
-
/* @__PURE__ */
|
|
99
|
+
/* @__PURE__ */ u(Ni, { children: /* @__PURE__ */ u(
|
|
100
100
|
Hi,
|
|
101
101
|
{
|
|
102
102
|
data: t,
|
|
103
103
|
datumWidths: d,
|
|
104
|
-
maximum:
|
|
104
|
+
maximum: p,
|
|
105
105
|
overColor: Tn,
|
|
106
106
|
segmentWidth: f,
|
|
107
107
|
separatorColor: It
|
|
@@ -111,7 +111,7 @@ const q = /* @__PURE__ */ Gt(zi), Ie = {
|
|
|
111
111
|
]
|
|
112
112
|
}
|
|
113
113
|
);
|
|
114
|
-
},
|
|
114
|
+
}, Ni = ({ children: e }) => /* @__PURE__ */ u(
|
|
115
115
|
"div",
|
|
116
116
|
{
|
|
117
117
|
className: "p-meter__bar",
|
|
@@ -128,7 +128,7 @@ const q = /* @__PURE__ */ Gt(zi), Ie = {
|
|
|
128
128
|
const o = () => (e == null ? void 0 : e.reduce((l, s) => l + s.value, 0)) > t, a = (l, s) => ({
|
|
129
129
|
backgroundColor: l.color,
|
|
130
130
|
left: `${n == null ? void 0 : n.reduce(
|
|
131
|
-
(
|
|
131
|
+
(p, d, f) => s > f ? p + d : p,
|
|
132
132
|
0
|
|
133
133
|
)}%`,
|
|
134
134
|
width: `${n[s]}%`
|
|
@@ -142,14 +142,14 @@ const q = /* @__PURE__ */ Gt(zi), Ie = {
|
|
|
142
142
|
)`
|
|
143
143
|
});
|
|
144
144
|
return /* @__PURE__ */ B(we, { children: [
|
|
145
|
-
o() ? /* @__PURE__ */
|
|
145
|
+
o() ? /* @__PURE__ */ u(
|
|
146
146
|
"div",
|
|
147
147
|
{
|
|
148
148
|
className: "p-meter__filled",
|
|
149
149
|
"data-testid": Oe.meteroverflow,
|
|
150
150
|
style: { backgroundColor: Tn, width: "100%" }
|
|
151
151
|
}
|
|
152
|
-
) : e == null ? void 0 : e.map((l, s) => /* @__PURE__ */
|
|
152
|
+
) : e == null ? void 0 : e.map((l, s) => /* @__PURE__ */ u(
|
|
153
153
|
"div",
|
|
154
154
|
{
|
|
155
155
|
className: "p-meter__filled",
|
|
@@ -158,7 +158,7 @@ const q = /* @__PURE__ */ Gt(zi), Ie = {
|
|
|
158
158
|
},
|
|
159
159
|
`meter-${s}`
|
|
160
160
|
)),
|
|
161
|
-
i > 0 && /* @__PURE__ */
|
|
161
|
+
i > 0 && /* @__PURE__ */ u(
|
|
162
162
|
"div",
|
|
163
163
|
{
|
|
164
164
|
className: "p-meter__separators",
|
|
@@ -170,21 +170,21 @@ const q = /* @__PURE__ */ Gt(zi), Ie = {
|
|
|
170
170
|
}, qi = ({
|
|
171
171
|
className: e,
|
|
172
172
|
children: n
|
|
173
|
-
}) => /* @__PURE__ */
|
|
173
|
+
}) => /* @__PURE__ */ u(
|
|
174
174
|
"div",
|
|
175
175
|
{
|
|
176
|
-
className:
|
|
176
|
+
className: G("p-meter__label", e),
|
|
177
177
|
"data-testid": Oe.label,
|
|
178
178
|
children: n
|
|
179
179
|
}
|
|
180
180
|
);
|
|
181
|
-
|
|
182
|
-
const Gr = ({ children: e, to: n, ...t }) => /* @__PURE__ */
|
|
181
|
+
Li.Label = qi;
|
|
182
|
+
const Gr = ({ children: e, to: n, ...t }) => /* @__PURE__ */ u(Fi, { ...t, href: n, rel: "noreferrer noopener", target: "_blank", children: e }), Gi = ({
|
|
183
183
|
percentComplete: e
|
|
184
184
|
}) => /* @__PURE__ */ B("small", { className: "progress-indicator", children: [
|
|
185
185
|
e,
|
|
186
186
|
"% ",
|
|
187
|
-
/* @__PURE__ */
|
|
187
|
+
/* @__PURE__ */ u(Ht, { className: "progress-indicator__spinner" })
|
|
188
188
|
] }), Bi = ({
|
|
189
189
|
text: e,
|
|
190
190
|
children: n,
|
|
@@ -192,110 +192,110 @@ const Gr = ({ children: e, to: n, ...t }) => /* @__PURE__ */ p(Fi, { ...t, href:
|
|
|
192
192
|
isPending: i = !1
|
|
193
193
|
}) => {
|
|
194
194
|
const o = Math.floor(Math.random() * 750);
|
|
195
|
-
return i ? /* @__PURE__ */
|
|
195
|
+
return i ? /* @__PURE__ */ u(
|
|
196
196
|
"span",
|
|
197
197
|
{
|
|
198
198
|
"aria-label": "loading",
|
|
199
|
-
className:
|
|
199
|
+
className: G("p-placeholder", t),
|
|
200
200
|
role: "progressbar",
|
|
201
201
|
style: { animationDelay: `${o}ms` },
|
|
202
|
-
children: /* @__PURE__ */
|
|
202
|
+
children: /* @__PURE__ */ u("span", { "aria-hidden": "true", children: e || n || "Loading" })
|
|
203
203
|
}
|
|
204
|
-
) : /* @__PURE__ */
|
|
205
|
-
}, Ui = ({ children: e }) => /* @__PURE__ */
|
|
204
|
+
) : /* @__PURE__ */ u(we, { children: n });
|
|
205
|
+
}, Ui = ({ children: e }) => /* @__PURE__ */ u(we, { children: e }), Ki = ({
|
|
206
206
|
isCollapsed: e,
|
|
207
207
|
setIsCollapsed: n,
|
|
208
208
|
className: t
|
|
209
|
-
}) => /* @__PURE__ */
|
|
209
|
+
}) => /* @__PURE__ */ u(
|
|
210
210
|
qt,
|
|
211
211
|
{
|
|
212
212
|
className: "p-side-navigation__tooltip-wrapper",
|
|
213
213
|
message: /* @__PURE__ */ B(we, { children: [
|
|
214
214
|
e ? "expand" : "collapse",
|
|
215
215
|
"( ",
|
|
216
|
-
/* @__PURE__ */
|
|
216
|
+
/* @__PURE__ */ u("code", { children: "[" }),
|
|
217
217
|
" )"
|
|
218
218
|
] }),
|
|
219
219
|
position: "right",
|
|
220
220
|
tooltipClassName: "p-side-navigation__tooltip",
|
|
221
|
-
children: /* @__PURE__ */
|
|
221
|
+
children: /* @__PURE__ */ u(
|
|
222
222
|
_e,
|
|
223
223
|
{
|
|
224
224
|
appearance: "base",
|
|
225
225
|
"aria-label": `${e ? "expand" : "collapse"} main navigation`,
|
|
226
|
-
className:
|
|
226
|
+
className: G(
|
|
227
227
|
"is-dense has-icon is-dark u-no-margin l-navigation-collapse-toggle",
|
|
228
228
|
t
|
|
229
229
|
),
|
|
230
230
|
onClick: (i) => {
|
|
231
231
|
n(!e), i.stopPropagation(), i.currentTarget.blur();
|
|
232
232
|
},
|
|
233
|
-
children: /* @__PURE__ */
|
|
233
|
+
children: /* @__PURE__ */ u(Re, { light: !0, name: "sidebar-toggle" })
|
|
234
234
|
}
|
|
235
235
|
)
|
|
236
236
|
}
|
|
237
|
-
), Wi = ({ children: e }) => /* @__PURE__ */
|
|
237
|
+
), Wi = ({ children: e }) => /* @__PURE__ */ u("div", { className: "p-panel__content", children: /* @__PURE__ */ u("nav", { className: "p-side-navigation--icons is-dark", children: e }) }), Yi = ({ children: e }) => /* @__PURE__ */ u("div", { className: "p-panel__controls u-no-margin--top", children: e }), Xi = ({ children: e }) => /* @__PURE__ */ u("div", { className: "l-navigation__drawer", children: /* @__PURE__ */ u("div", { className: "p-panel is-dark", children: e }) }), Qi = ({ children: e }) => /* @__PURE__ */ u("div", { className: "p-panel__footer", children: e }), Ji = ({ children: e }) => /* @__PURE__ */ u("div", { className: "p-panel__header", children: e }), Zi = ({ light: e = !0, name: n }) => /* @__PURE__ */ u(Re, { className: "p-side-navigation__icon", light: e, name: n }), eo = ({ children: e, className: n, hasActiveChild: t }) => /* @__PURE__ */ u("li", { className: G("p-side-navigation__item", n, { "has-active-child": t }), children: e }), to = ({ children: e, id: n, variant: t = "base" }) => /* @__PURE__ */ u("span", { className: G("p-side-navigation__label", { "p-side-navigation__label--group": t === "group" }), id: n, children: e }), no = ({
|
|
238
238
|
as: e,
|
|
239
239
|
...n
|
|
240
|
-
}) => /* @__PURE__ */
|
|
240
|
+
}) => /* @__PURE__ */ u(
|
|
241
241
|
e || "a",
|
|
242
242
|
{
|
|
243
|
-
className:
|
|
243
|
+
className: G("p-side-navigation__link", n.className),
|
|
244
244
|
...n
|
|
245
245
|
}
|
|
246
|
-
), io = ({ children: e, className: n }) => /* @__PURE__ */
|
|
246
|
+
), io = ({ children: e, className: n }) => /* @__PURE__ */ u("ul", { className: G("p-side-navigation__list", n), children: e }), oo = ({
|
|
247
247
|
as: e,
|
|
248
248
|
children: n,
|
|
249
249
|
className: t,
|
|
250
250
|
...i
|
|
251
|
-
}) => /* @__PURE__ */
|
|
251
|
+
}) => /* @__PURE__ */ u(e || "a", { className: G("p-panel__logo", t), ...i, children: /* @__PURE__ */ u("div", { className: "p-navigation__tagged-logo", children: n }) }), ao = ({ children: e }) => _i(e, { className: "p-panel__logo-icon p-navigation__logo-icon" }), ro = ({ children: e, variant: n = "base" }) => /* @__PURE__ */ u(
|
|
252
252
|
"div",
|
|
253
253
|
{
|
|
254
|
-
className:
|
|
254
|
+
className: G("p-panel__logo-name is-fading-when-collapsed", {
|
|
255
255
|
"p-panel__logo-name--small": n === "small"
|
|
256
256
|
}),
|
|
257
257
|
children: e
|
|
258
258
|
}
|
|
259
|
-
), lo = ({ children: e }) => /* @__PURE__ */
|
|
259
|
+
), lo = ({ children: e }) => /* @__PURE__ */ u("div", { className: "p-navigation__logo-tag", children: e }), so = ({ children: e }) => /* @__PURE__ */ u("span", { className: "p-panel__logo-text", children: e }), co = ({
|
|
260
260
|
children: e,
|
|
261
261
|
className: n,
|
|
262
262
|
onClick: t
|
|
263
|
-
}) => /* @__PURE__ */
|
|
263
|
+
}) => /* @__PURE__ */ u(
|
|
264
264
|
_e,
|
|
265
265
|
{
|
|
266
266
|
appearance: "base",
|
|
267
|
-
className:
|
|
267
|
+
className: G(
|
|
268
268
|
"p-side-navigation__button--menu has-icon is-dark",
|
|
269
269
|
n
|
|
270
270
|
),
|
|
271
271
|
onClick: (i) => {
|
|
272
272
|
t && t(i), i.stopPropagation(), i.currentTarget.blur();
|
|
273
273
|
},
|
|
274
|
-
children: /* @__PURE__ */
|
|
274
|
+
children: /* @__PURE__ */ u(we, { children: e })
|
|
275
275
|
}
|
|
276
|
-
), po = ({ children: e }) => /* @__PURE__ */
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
276
|
+
), po = ({ children: e }) => /* @__PURE__ */ u("span", { className: "p-side-navigation__text", children: e }), ae = ({ children: e, className: n, isCollapsed: t }) => /* @__PURE__ */ u("header", { "aria-label": "main navigation", className: G("l-navigation is-maas", n, { "is-collapsed": t, "is-pinned": !t }), children: e }), uo = ({ children: e, className: n }) => /* @__PURE__ */ u("header", { "aria-label": "navigation", className: "l-navigation-bar", children: /* @__PURE__ */ u("div", { className: G("p-panel is-dark", n), children: e }) });
|
|
277
|
+
ae.Header = Ji;
|
|
278
|
+
ae.Banner = Ui;
|
|
279
|
+
ae.Drawer = Xi;
|
|
280
|
+
ae.Controls = Yi;
|
|
281
|
+
ae.CollapseToggle = Ki;
|
|
282
|
+
ae.Content = Wi;
|
|
283
|
+
ae.Footer = Qi;
|
|
284
|
+
ae.List = io;
|
|
285
|
+
ae.Item = eo;
|
|
286
|
+
ae.Link = no;
|
|
287
|
+
ae.Text = po;
|
|
288
|
+
ae.Icon = Zi;
|
|
289
|
+
ae.Label = to;
|
|
290
|
+
ae.Logo = oo;
|
|
291
|
+
ae.LogoTag = lo;
|
|
292
|
+
ae.LogoIcon = ao;
|
|
293
|
+
ae.LogoName = ro;
|
|
294
|
+
ae.LogoText = so;
|
|
295
295
|
uo.MenuButton = co;
|
|
296
296
|
const Bt = $n(null), zn = ({ children: e }) => {
|
|
297
297
|
const n = et();
|
|
298
|
-
return /* @__PURE__ */
|
|
298
|
+
return /* @__PURE__ */ u(Bt.Provider, { value: n, children: /* @__PURE__ */ u(
|
|
299
299
|
"div",
|
|
300
300
|
{
|
|
301
301
|
role: "group",
|
|
@@ -306,26 +306,26 @@ const Bt = $n(null), zn = ({ children: e }) => {
|
|
|
306
306
|
}
|
|
307
307
|
) });
|
|
308
308
|
}, go = ({ children: e }) => {
|
|
309
|
-
const n =
|
|
310
|
-
return /* @__PURE__ */
|
|
309
|
+
const n = Nt(Bt);
|
|
310
|
+
return /* @__PURE__ */ u("label", { id: `${n}_label`, children: e });
|
|
311
311
|
}, fo = ({ children: e }) => {
|
|
312
|
-
const n =
|
|
313
|
-
return /* @__PURE__ */
|
|
312
|
+
const n = Nt(Bt);
|
|
313
|
+
return /* @__PURE__ */ u("p", { className: "p-form-help-text", id: `${n}_description`, children: e });
|
|
314
314
|
};
|
|
315
315
|
zn.Label = go;
|
|
316
316
|
zn.Description = fo;
|
|
317
|
-
const Ut = ({ children: e }) => /* @__PURE__ */
|
|
317
|
+
const Ut = ({ children: e }) => /* @__PURE__ */ u("div", { className: "p-form-section", children: e }), mo = ({ children: e }) => /* @__PURE__ */ u("h5", { className: "p-form-section__title u-no-padding--top", children: e }), vo = ({ children: e }) => /* @__PURE__ */ u("p", { className: "p-form-help-text", children: e }), xo = ({ children: e }) => /* @__PURE__ */ u("div", { className: "p-form-section__content", children: e });
|
|
318
318
|
Ut.Title = mo;
|
|
319
319
|
Ut.Description = vo;
|
|
320
320
|
Ut.Content = xo;
|
|
321
321
|
function ho(e) {
|
|
322
|
-
const [n, t] =
|
|
322
|
+
const [n, t] = pe.useState(null), i = pe.useRef(null), o = pe.useCallback(() => {
|
|
323
323
|
if (e.current) {
|
|
324
324
|
const a = e.current.getBoundingClientRect();
|
|
325
325
|
t(a);
|
|
326
326
|
}
|
|
327
327
|
}, [e]);
|
|
328
|
-
return
|
|
328
|
+
return pe.useEffect(() => {
|
|
329
329
|
const a = new ResizeObserver(() => {
|
|
330
330
|
i.current && cancelAnimationFrame(i.current), i.current = requestAnimationFrame(o);
|
|
331
331
|
});
|
|
@@ -334,17 +334,17 @@ function ho(e) {
|
|
|
334
334
|
};
|
|
335
335
|
}, [e, o]), n;
|
|
336
336
|
}
|
|
337
|
-
const Vn =
|
|
338
|
-
}]),
|
|
339
|
-
const n =
|
|
340
|
-
return /* @__PURE__ */
|
|
337
|
+
const Vn = pe.createContext(null), Ln = pe.createContext([!1, () => {
|
|
338
|
+
}]), Nn = ({ children: e }) => {
|
|
339
|
+
const n = pe.useRef(null), t = ho(n), [i, o] = pe.useState(!1);
|
|
340
|
+
return /* @__PURE__ */ u(
|
|
341
341
|
"header",
|
|
342
342
|
{
|
|
343
|
-
className:
|
|
343
|
+
className: G("main-toolbar", {
|
|
344
344
|
"main-toolbar--stacked": i
|
|
345
345
|
}),
|
|
346
346
|
ref: n,
|
|
347
|
-
children: /* @__PURE__ */
|
|
347
|
+
children: /* @__PURE__ */ u(Vn.Provider, { value: t, children: /* @__PURE__ */ u(Ln.Provider, { value: [i, o], children: e }) })
|
|
348
348
|
}
|
|
349
349
|
);
|
|
350
350
|
}, wo = ({
|
|
@@ -352,20 +352,20 @@ const Vn = ue.createContext(null), Nn = ue.createContext([!1, () => {
|
|
|
352
352
|
children: n,
|
|
353
353
|
className: t,
|
|
354
354
|
...i
|
|
355
|
-
}) => /* @__PURE__ */
|
|
355
|
+
}) => /* @__PURE__ */ u(
|
|
356
356
|
e || "h1",
|
|
357
357
|
{
|
|
358
|
-
className:
|
|
358
|
+
className: G("main-toolbar__title p-heading--4", t),
|
|
359
359
|
"data-testid": "main-toolbar-heading",
|
|
360
360
|
...i,
|
|
361
361
|
children: n
|
|
362
362
|
}
|
|
363
363
|
), yo = ({ children: e }) => {
|
|
364
|
-
const n =
|
|
365
|
-
return
|
|
364
|
+
const n = pe.useContext(Vn), [t, i] = pe.useContext(Ln), o = pe.useRef(null);
|
|
365
|
+
return pe.useEffect(() => {
|
|
366
366
|
!o.current || !n || i(o.current.getBoundingClientRect().width > n.width);
|
|
367
367
|
}, [i, n, o]), /* @__PURE__ */ B(we, { children: [
|
|
368
|
-
/* @__PURE__ */
|
|
368
|
+
/* @__PURE__ */ u(
|
|
369
369
|
"div",
|
|
370
370
|
{
|
|
371
371
|
"aria-hidden": "true",
|
|
@@ -375,10 +375,10 @@ const Vn = ue.createContext(null), Nn = ue.createContext([!1, () => {
|
|
|
375
375
|
children: e
|
|
376
376
|
}
|
|
377
377
|
),
|
|
378
|
-
/* @__PURE__ */
|
|
378
|
+
/* @__PURE__ */ u(
|
|
379
379
|
"div",
|
|
380
380
|
{
|
|
381
|
-
className:
|
|
381
|
+
className: G("main-toolbar__controls", {
|
|
382
382
|
"main-toolbar__controls--stacked": t
|
|
383
383
|
}),
|
|
384
384
|
children: e
|
|
@@ -386,8 +386,8 @@ const Vn = ue.createContext(null), Nn = ue.createContext([!1, () => {
|
|
|
386
386
|
)
|
|
387
387
|
] });
|
|
388
388
|
};
|
|
389
|
-
|
|
390
|
-
|
|
389
|
+
Nn.Title = wo;
|
|
390
|
+
Nn.Controls = yo;
|
|
391
391
|
const ot = ({
|
|
392
392
|
children: e,
|
|
393
393
|
className: n,
|
|
@@ -395,16 +395,16 @@ const ot = ({
|
|
|
395
395
|
variant: i = "wide",
|
|
396
396
|
...o
|
|
397
397
|
}) => {
|
|
398
|
-
const a = t || "section", r =
|
|
399
|
-
return /* @__PURE__ */
|
|
400
|
-
}, bo = ({ children: e, className: n, as: t, ...i }) => /* @__PURE__ */
|
|
398
|
+
const a = t || "section", r = G("content-section", n);
|
|
399
|
+
return /* @__PURE__ */ u(a, { ...o, className: r, children: /* @__PURE__ */ u(Pi, { children: /* @__PURE__ */ u(Ii, { size: i === "narrow" ? 6 : 12, children: /* @__PURE__ */ u(we, { children: e }) }) }) });
|
|
400
|
+
}, bo = ({ children: e, className: n, as: t, ...i }) => /* @__PURE__ */ u(
|
|
401
401
|
t || "h1",
|
|
402
402
|
{
|
|
403
403
|
...i,
|
|
404
|
-
className:
|
|
404
|
+
className: G("content-section__title p-heading--4", n),
|
|
405
405
|
children: e
|
|
406
406
|
}
|
|
407
|
-
), So = ({ children: e, className: n }) => /* @__PURE__ */
|
|
407
|
+
), So = ({ children: e, className: n }) => /* @__PURE__ */ u("header", { className: G("content-section__header", n), children: e }), Co = ({ children: e, className: n }) => /* @__PURE__ */ u("div", { className: G("content-section__body", n), children: e }), _o = ({ children: e, className: n }) => /* @__PURE__ */ u("footer", { className: G("content-section__footer", n), children: e });
|
|
408
408
|
ot.Title = bo;
|
|
409
409
|
ot.Header = So;
|
|
410
410
|
ot.Content = Co;
|
|
@@ -413,10 +413,10 @@ const Hn = ({
|
|
|
413
413
|
children: e,
|
|
414
414
|
className: n,
|
|
415
415
|
isVisible: t
|
|
416
|
-
}) => /* @__PURE__ */
|
|
416
|
+
}) => /* @__PURE__ */ u(
|
|
417
417
|
"div",
|
|
418
418
|
{
|
|
419
|
-
className:
|
|
419
|
+
className: G("fade-in--down", n),
|
|
420
420
|
"aria-hidden": t ? "false" : "true",
|
|
421
421
|
style: { visibility: t ? "visible" : "hidden" },
|
|
422
422
|
children: e
|
|
@@ -424,7 +424,7 @@ const Hn = ({
|
|
|
424
424
|
), Br = ({
|
|
425
425
|
children: e,
|
|
426
426
|
...n
|
|
427
|
-
}) => /* @__PURE__ */
|
|
427
|
+
}) => /* @__PURE__ */ u(Hn, { isVisible: !n["aria-hidden"], children: /* @__PURE__ */ u("div", { className: "p-form__nested-group", ...n, children: e }) }), Ro = ({
|
|
428
428
|
className: e,
|
|
429
429
|
currentPage: n,
|
|
430
430
|
error: t,
|
|
@@ -434,14 +434,14 @@ const Hn = ({
|
|
|
434
434
|
onNextClick: r,
|
|
435
435
|
onPreviousClick: l,
|
|
436
436
|
totalPages: s,
|
|
437
|
-
...
|
|
438
|
-
}) => /* @__PURE__ */
|
|
437
|
+
...p
|
|
438
|
+
}) => /* @__PURE__ */ u(
|
|
439
439
|
"nav",
|
|
440
440
|
{
|
|
441
|
-
"aria-label": (
|
|
442
|
-
className:
|
|
441
|
+
"aria-label": (p == null ? void 0 : p["aria-label"]) || "pagination",
|
|
442
|
+
className: G("p-pagination", e),
|
|
443
443
|
children: /* @__PURE__ */ B("span", { className: "p-pagination--items", children: [
|
|
444
|
-
/* @__PURE__ */
|
|
444
|
+
/* @__PURE__ */ u(
|
|
445
445
|
_e,
|
|
446
446
|
{
|
|
447
447
|
"aria-label": "Previous page",
|
|
@@ -449,12 +449,12 @@ const Hn = ({
|
|
|
449
449
|
disabled: n === 1 || i,
|
|
450
450
|
onClick: l,
|
|
451
451
|
type: "button",
|
|
452
|
-
children: /* @__PURE__ */
|
|
452
|
+
children: /* @__PURE__ */ u(Re, { name: "chevron-down" })
|
|
453
453
|
}
|
|
454
454
|
),
|
|
455
|
-
/* @__PURE__ */
|
|
455
|
+
/* @__PURE__ */ u("strong", { children: "Page " }),
|
|
456
456
|
" ",
|
|
457
|
-
/* @__PURE__ */
|
|
457
|
+
/* @__PURE__ */ u(
|
|
458
458
|
Di,
|
|
459
459
|
{
|
|
460
460
|
"aria-label": "page number",
|
|
@@ -474,7 +474,7 @@ const Hn = ({
|
|
|
474
474
|
" of ",
|
|
475
475
|
s
|
|
476
476
|
] }),
|
|
477
|
-
/* @__PURE__ */
|
|
477
|
+
/* @__PURE__ */ u(
|
|
478
478
|
_e,
|
|
479
479
|
{
|
|
480
480
|
"aria-label": "Next page",
|
|
@@ -482,7 +482,7 @@ const Hn = ({
|
|
|
482
482
|
disabled: n === s || i,
|
|
483
483
|
onClick: r,
|
|
484
484
|
type: "button",
|
|
485
|
-
children: /* @__PURE__ */
|
|
485
|
+
children: /* @__PURE__ */ u(Re, { name: "chevron-up" })
|
|
486
486
|
}
|
|
487
487
|
)
|
|
488
488
|
] })
|
|
@@ -493,8 +493,8 @@ const Hn = ({
|
|
|
493
493
|
paginate: t,
|
|
494
494
|
totalPages: i
|
|
495
495
|
}) => {
|
|
496
|
-
const [o, a] =
|
|
497
|
-
return /* @__PURE__ */
|
|
496
|
+
const [o, a] = de(e), [r, l] = de("");
|
|
497
|
+
return /* @__PURE__ */ u(
|
|
498
498
|
Ro,
|
|
499
499
|
{
|
|
500
500
|
currentPage: o,
|
|
@@ -504,8 +504,8 @@ const Hn = ({
|
|
|
504
504
|
a(e), l("");
|
|
505
505
|
},
|
|
506
506
|
onInputChange: (g) => {
|
|
507
|
-
const { value:
|
|
508
|
-
|
|
507
|
+
const { value: c, valueAsNumber: m } = g.target;
|
|
508
|
+
c ? (a(m), m > i || m < 1 ? l(`${m} is not a valid page number.`) : (l(""), t(m))) : l("Enter a page number.");
|
|
509
509
|
},
|
|
510
510
|
onNextClick: () => {
|
|
511
511
|
a((g) => Number(g) + 1), t(Number(e) + 1);
|
|
@@ -516,13 +516,13 @@ const Hn = ({
|
|
|
516
516
|
totalPages: i
|
|
517
517
|
}
|
|
518
518
|
);
|
|
519
|
-
}, Ur = ({ activeStep: e, items: n }) => /* @__PURE__ */
|
|
519
|
+
}, Ur = ({ activeStep: e, items: n }) => /* @__PURE__ */ u("ol", { className: "stepper", children: n.map((t, i) => {
|
|
520
520
|
const o = i === e, a = i < e;
|
|
521
|
-
return /* @__PURE__ */
|
|
521
|
+
return /* @__PURE__ */ u("li", { "aria-label": t, className: "stepper__item", children: /* @__PURE__ */ u(
|
|
522
522
|
"p",
|
|
523
523
|
{
|
|
524
524
|
"aria-label": a ? `${t} (completed)` : t,
|
|
525
|
-
className:
|
|
525
|
+
className: G("stepper__title", {
|
|
526
526
|
"stepper__title--is-active": o,
|
|
527
527
|
"stepper__title--is-complete": a
|
|
528
528
|
}),
|
|
@@ -530,7 +530,7 @@ const Hn = ({
|
|
|
530
530
|
}
|
|
531
531
|
) }, i);
|
|
532
532
|
}) });
|
|
533
|
-
var Ue = { exports: {} }, Ke = { exports: {} },
|
|
533
|
+
var Ue = { exports: {} }, Ke = { exports: {} }, U = {};
|
|
534
534
|
/** @license React v16.13.1
|
|
535
535
|
* react-is.production.min.js
|
|
536
536
|
*
|
|
@@ -541,17 +541,17 @@ var Ue = { exports: {} }, Ke = { exports: {} }, K = {};
|
|
|
541
541
|
*/
|
|
542
542
|
var an;
|
|
543
543
|
function ko() {
|
|
544
|
-
if (an) return
|
|
544
|
+
if (an) return U;
|
|
545
545
|
an = 1;
|
|
546
|
-
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, r = e ? Symbol.for("react.provider") : 60109, l = e ? Symbol.for("react.context") : 60110, s = e ? Symbol.for("react.async_mode") : 60111,
|
|
547
|
-
function
|
|
546
|
+
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, r = e ? Symbol.for("react.provider") : 60109, l = e ? Symbol.for("react.context") : 60110, s = e ? Symbol.for("react.async_mode") : 60111, p = e ? Symbol.for("react.concurrent_mode") : 60111, d = e ? Symbol.for("react.forward_ref") : 60112, f = e ? Symbol.for("react.suspense") : 60113, g = e ? Symbol.for("react.suspense_list") : 60120, c = e ? Symbol.for("react.memo") : 60115, m = e ? Symbol.for("react.lazy") : 60116, v = e ? Symbol.for("react.block") : 60121, F = e ? Symbol.for("react.fundamental") : 60117, h = e ? Symbol.for("react.responder") : 60118, A = e ? Symbol.for("react.scope") : 60119;
|
|
547
|
+
function P(x) {
|
|
548
548
|
if (typeof x == "object" && x !== null) {
|
|
549
|
-
var
|
|
550
|
-
switch (
|
|
549
|
+
var L = x.$$typeof;
|
|
550
|
+
switch (L) {
|
|
551
551
|
case n:
|
|
552
552
|
switch (x = x.type, x) {
|
|
553
553
|
case s:
|
|
554
|
-
case
|
|
554
|
+
case p:
|
|
555
555
|
case i:
|
|
556
556
|
case a:
|
|
557
557
|
case o:
|
|
@@ -562,50 +562,50 @@ function ko() {
|
|
|
562
562
|
case l:
|
|
563
563
|
case d:
|
|
564
564
|
case m:
|
|
565
|
-
case
|
|
565
|
+
case c:
|
|
566
566
|
case r:
|
|
567
567
|
return x;
|
|
568
568
|
default:
|
|
569
|
-
return
|
|
569
|
+
return L;
|
|
570
570
|
}
|
|
571
571
|
}
|
|
572
572
|
case t:
|
|
573
|
-
return
|
|
573
|
+
return L;
|
|
574
574
|
}
|
|
575
575
|
}
|
|
576
576
|
}
|
|
577
|
-
function
|
|
578
|
-
return
|
|
577
|
+
function j(x) {
|
|
578
|
+
return P(x) === p;
|
|
579
579
|
}
|
|
580
|
-
return
|
|
581
|
-
return
|
|
582
|
-
},
|
|
583
|
-
return
|
|
584
|
-
},
|
|
585
|
-
return
|
|
586
|
-
},
|
|
580
|
+
return U.AsyncMode = s, U.ConcurrentMode = p, U.ContextConsumer = l, U.ContextProvider = r, U.Element = n, U.ForwardRef = d, U.Fragment = i, U.Lazy = m, U.Memo = c, U.Portal = t, U.Profiler = a, U.StrictMode = o, U.Suspense = f, U.isAsyncMode = function(x) {
|
|
581
|
+
return j(x) || P(x) === s;
|
|
582
|
+
}, U.isConcurrentMode = j, U.isContextConsumer = function(x) {
|
|
583
|
+
return P(x) === l;
|
|
584
|
+
}, U.isContextProvider = function(x) {
|
|
585
|
+
return P(x) === r;
|
|
586
|
+
}, U.isElement = function(x) {
|
|
587
587
|
return typeof x == "object" && x !== null && x.$$typeof === n;
|
|
588
|
-
},
|
|
589
|
-
return
|
|
590
|
-
},
|
|
591
|
-
return
|
|
592
|
-
},
|
|
593
|
-
return
|
|
594
|
-
},
|
|
595
|
-
return
|
|
596
|
-
},
|
|
597
|
-
return
|
|
598
|
-
},
|
|
599
|
-
return
|
|
600
|
-
},
|
|
601
|
-
return
|
|
602
|
-
},
|
|
603
|
-
return
|
|
604
|
-
},
|
|
605
|
-
return typeof x == "string" || typeof x == "function" || x === i || x ===
|
|
606
|
-
},
|
|
588
|
+
}, U.isForwardRef = function(x) {
|
|
589
|
+
return P(x) === d;
|
|
590
|
+
}, U.isFragment = function(x) {
|
|
591
|
+
return P(x) === i;
|
|
592
|
+
}, U.isLazy = function(x) {
|
|
593
|
+
return P(x) === m;
|
|
594
|
+
}, U.isMemo = function(x) {
|
|
595
|
+
return P(x) === c;
|
|
596
|
+
}, U.isPortal = function(x) {
|
|
597
|
+
return P(x) === t;
|
|
598
|
+
}, U.isProfiler = function(x) {
|
|
599
|
+
return P(x) === a;
|
|
600
|
+
}, U.isStrictMode = function(x) {
|
|
601
|
+
return P(x) === o;
|
|
602
|
+
}, U.isSuspense = function(x) {
|
|
603
|
+
return P(x) === f;
|
|
604
|
+
}, U.isValidElementType = function(x) {
|
|
605
|
+
return typeof x == "string" || typeof x == "function" || x === i || x === p || x === a || x === o || x === f || x === g || typeof x == "object" && x !== null && (x.$$typeof === m || x.$$typeof === c || x.$$typeof === r || x.$$typeof === l || x.$$typeof === d || x.$$typeof === F || x.$$typeof === h || x.$$typeof === A || x.$$typeof === v);
|
|
606
|
+
}, U.typeOf = P, U;
|
|
607
607
|
}
|
|
608
|
-
var
|
|
608
|
+
var K = {};
|
|
609
609
|
/** @license React v16.13.1
|
|
610
610
|
* react-is.development.js
|
|
611
611
|
*
|
|
@@ -617,20 +617,20 @@ var W = {};
|
|
|
617
617
|
var rn;
|
|
618
618
|
function Fo() {
|
|
619
619
|
return rn || (rn = 1, process.env.NODE_ENV !== "production" && function() {
|
|
620
|
-
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, r = e ? Symbol.for("react.provider") : 60109, l = e ? Symbol.for("react.context") : 60110, s = e ? Symbol.for("react.async_mode") : 60111,
|
|
621
|
-
function
|
|
620
|
+
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, r = e ? Symbol.for("react.provider") : 60109, l = e ? Symbol.for("react.context") : 60110, s = e ? Symbol.for("react.async_mode") : 60111, p = e ? Symbol.for("react.concurrent_mode") : 60111, d = e ? Symbol.for("react.forward_ref") : 60112, f = e ? Symbol.for("react.suspense") : 60113, g = e ? Symbol.for("react.suspense_list") : 60120, c = e ? Symbol.for("react.memo") : 60115, m = e ? Symbol.for("react.lazy") : 60116, v = e ? Symbol.for("react.block") : 60121, F = e ? Symbol.for("react.fundamental") : 60117, h = e ? Symbol.for("react.responder") : 60118, A = e ? Symbol.for("react.scope") : 60119;
|
|
621
|
+
function P(S) {
|
|
622
622
|
return typeof S == "string" || typeof S == "function" || // Note: its typeof might be other than 'symbol' or 'number' if it's a polyfill.
|
|
623
|
-
S === i || S ===
|
|
623
|
+
S === i || S === p || S === a || S === o || S === f || S === g || typeof S == "object" && S !== null && (S.$$typeof === m || S.$$typeof === c || S.$$typeof === r || S.$$typeof === l || S.$$typeof === d || S.$$typeof === F || S.$$typeof === h || S.$$typeof === A || S.$$typeof === v);
|
|
624
624
|
}
|
|
625
|
-
function
|
|
625
|
+
function j(S) {
|
|
626
626
|
if (typeof S == "object" && S !== null) {
|
|
627
|
-
var
|
|
628
|
-
switch (
|
|
627
|
+
var ge = S.$$typeof;
|
|
628
|
+
switch (ge) {
|
|
629
629
|
case n:
|
|
630
630
|
var Fe = S.type;
|
|
631
631
|
switch (Fe) {
|
|
632
632
|
case s:
|
|
633
|
-
case
|
|
633
|
+
case p:
|
|
634
634
|
case i:
|
|
635
635
|
case a:
|
|
636
636
|
case o:
|
|
@@ -642,60 +642,60 @@ function Fo() {
|
|
|
642
642
|
case l:
|
|
643
643
|
case d:
|
|
644
644
|
case m:
|
|
645
|
-
case
|
|
645
|
+
case c:
|
|
646
646
|
case r:
|
|
647
647
|
return Te;
|
|
648
648
|
default:
|
|
649
|
-
return
|
|
649
|
+
return ge;
|
|
650
650
|
}
|
|
651
651
|
}
|
|
652
652
|
case t:
|
|
653
|
-
return
|
|
653
|
+
return ge;
|
|
654
654
|
}
|
|
655
655
|
}
|
|
656
656
|
}
|
|
657
|
-
var x = s,
|
|
658
|
-
function
|
|
659
|
-
return
|
|
657
|
+
var x = s, L = p, z = l, Q = r, J = n, ce = d, ue = i, ve = m, D = c, R = t, q = a, W = o, Z = f, le = !1;
|
|
658
|
+
function ee(S) {
|
|
659
|
+
return le || (le = !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.")), w(S) || j(S) === s;
|
|
660
660
|
}
|
|
661
661
|
function w(S) {
|
|
662
|
-
return
|
|
663
|
-
}
|
|
664
|
-
function _(S) {
|
|
665
|
-
return M(S) === l;
|
|
666
|
-
}
|
|
667
|
-
function N(S) {
|
|
668
|
-
return M(S) === r;
|
|
662
|
+
return j(S) === p;
|
|
669
663
|
}
|
|
670
|
-
function
|
|
671
|
-
return
|
|
664
|
+
function k(S) {
|
|
665
|
+
return j(S) === l;
|
|
672
666
|
}
|
|
673
667
|
function b(S) {
|
|
674
|
-
return
|
|
668
|
+
return j(S) === r;
|
|
675
669
|
}
|
|
676
670
|
function I(S) {
|
|
677
|
-
return
|
|
671
|
+
return typeof S == "object" && S !== null && S.$$typeof === n;
|
|
678
672
|
}
|
|
679
673
|
function y(S) {
|
|
680
|
-
return
|
|
674
|
+
return j(S) === d;
|
|
681
675
|
}
|
|
682
|
-
function
|
|
683
|
-
return
|
|
676
|
+
function C(S) {
|
|
677
|
+
return j(S) === i;
|
|
684
678
|
}
|
|
685
|
-
function
|
|
686
|
-
return
|
|
679
|
+
function E(S) {
|
|
680
|
+
return j(S) === m;
|
|
687
681
|
}
|
|
688
682
|
function $(S) {
|
|
689
|
-
return
|
|
683
|
+
return j(S) === c;
|
|
690
684
|
}
|
|
691
|
-
function
|
|
692
|
-
return
|
|
685
|
+
function N(S) {
|
|
686
|
+
return j(S) === t;
|
|
693
687
|
}
|
|
694
|
-
function
|
|
695
|
-
return
|
|
688
|
+
function V(S) {
|
|
689
|
+
return j(S) === a;
|
|
696
690
|
}
|
|
697
|
-
|
|
698
|
-
|
|
691
|
+
function H(S) {
|
|
692
|
+
return j(S) === o;
|
|
693
|
+
}
|
|
694
|
+
function ne(S) {
|
|
695
|
+
return j(S) === f;
|
|
696
|
+
}
|
|
697
|
+
K.AsyncMode = x, K.ConcurrentMode = L, K.ContextConsumer = z, K.ContextProvider = Q, K.Element = J, K.ForwardRef = ce, K.Fragment = ue, K.Lazy = ve, K.Memo = D, K.Portal = R, K.Profiler = q, K.StrictMode = W, K.Suspense = Z, K.isAsyncMode = ee, K.isConcurrentMode = w, K.isContextConsumer = k, K.isContextProvider = b, K.isElement = I, K.isForwardRef = y, K.isFragment = C, K.isLazy = E, K.isMemo = $, K.isPortal = N, K.isProfiler = V, K.isStrictMode = H, K.isSuspense = ne, K.isValidElementType = P, K.typeOf = j;
|
|
698
|
+
}()), K;
|
|
699
699
|
}
|
|
700
700
|
var ln;
|
|
701
701
|
function qn() {
|
|
@@ -730,23 +730,23 @@ function Po() {
|
|
|
730
730
|
});
|
|
731
731
|
if (s.join("") !== "0123456789")
|
|
732
732
|
return !1;
|
|
733
|
-
var
|
|
733
|
+
var p = {};
|
|
734
734
|
return "abcdefghijklmnopqrst".split("").forEach(function(d) {
|
|
735
|
-
|
|
736
|
-
}), Object.keys(Object.assign({},
|
|
735
|
+
p[d] = d;
|
|
736
|
+
}), Object.keys(Object.assign({}, p)).join("") === "abcdefghijklmnopqrst";
|
|
737
737
|
} catch {
|
|
738
738
|
return !1;
|
|
739
739
|
}
|
|
740
740
|
}
|
|
741
741
|
return mt = o() ? Object.assign : function(a, r) {
|
|
742
|
-
for (var l, s = i(a),
|
|
742
|
+
for (var l, s = i(a), p, d = 1; d < arguments.length; d++) {
|
|
743
743
|
l = Object(arguments[d]);
|
|
744
744
|
for (var f in l)
|
|
745
745
|
n.call(l, f) && (s[f] = l[f]);
|
|
746
746
|
if (e) {
|
|
747
|
-
|
|
748
|
-
for (var g = 0; g <
|
|
749
|
-
t.call(l,
|
|
747
|
+
p = e(l);
|
|
748
|
+
for (var g = 0; g < p.length; g++)
|
|
749
|
+
t.call(l, p[g]) && (s[p[g]] = l[p[g]]);
|
|
750
750
|
}
|
|
751
751
|
}
|
|
752
752
|
return s;
|
|
@@ -780,7 +780,7 @@ function Io() {
|
|
|
780
780
|
}
|
|
781
781
|
};
|
|
782
782
|
}
|
|
783
|
-
function o(a, r, l, s,
|
|
783
|
+
function o(a, r, l, s, p) {
|
|
784
784
|
if (process.env.NODE_ENV !== "production") {
|
|
785
785
|
for (var d in a)
|
|
786
786
|
if (i(a, d)) {
|
|
@@ -800,9 +800,9 @@ function Io() {
|
|
|
800
800
|
(s || "React class") + ": type specification of " + l + " `" + d + "` 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)."
|
|
801
801
|
), f instanceof Error && !(f.message in t)) {
|
|
802
802
|
t[f.message] = !0;
|
|
803
|
-
var
|
|
803
|
+
var c = p ? p() : "";
|
|
804
804
|
e(
|
|
805
|
-
"Failed " + l + " type: " + f.message + (
|
|
805
|
+
"Failed " + l + " type: " + f.message + (c ?? "")
|
|
806
806
|
);
|
|
807
807
|
}
|
|
808
808
|
}
|
|
@@ -830,13 +830,13 @@ function Do() {
|
|
|
830
830
|
return null;
|
|
831
831
|
}
|
|
832
832
|
return wt = function(l, s) {
|
|
833
|
-
var
|
|
833
|
+
var p = typeof Symbol == "function" && Symbol.iterator, d = "@@iterator";
|
|
834
834
|
function f(w) {
|
|
835
|
-
var
|
|
836
|
-
if (typeof
|
|
837
|
-
return
|
|
835
|
+
var k = w && (p && w[p] || w[d]);
|
|
836
|
+
if (typeof k == "function")
|
|
837
|
+
return k;
|
|
838
838
|
}
|
|
839
|
-
var g = "<<anonymous>>",
|
|
839
|
+
var g = "<<anonymous>>", c = {
|
|
840
840
|
array: h("array"),
|
|
841
841
|
bigint: h("bigint"),
|
|
842
842
|
bool: h("boolean"),
|
|
@@ -846,220 +846,220 @@ function Do() {
|
|
|
846
846
|
string: h("string"),
|
|
847
847
|
symbol: h("symbol"),
|
|
848
848
|
any: A(),
|
|
849
|
-
arrayOf:
|
|
850
|
-
element:
|
|
849
|
+
arrayOf: P,
|
|
850
|
+
element: j(),
|
|
851
851
|
elementType: x(),
|
|
852
|
-
instanceOf:
|
|
853
|
-
node:
|
|
852
|
+
instanceOf: L,
|
|
853
|
+
node: ce(),
|
|
854
854
|
objectOf: Q,
|
|
855
|
-
oneOf:
|
|
856
|
-
oneOfType:
|
|
857
|
-
shape:
|
|
855
|
+
oneOf: z,
|
|
856
|
+
oneOfType: J,
|
|
857
|
+
shape: ve,
|
|
858
858
|
exact: D
|
|
859
859
|
};
|
|
860
|
-
function m(w,
|
|
861
|
-
return w ===
|
|
860
|
+
function m(w, k) {
|
|
861
|
+
return w === k ? w !== 0 || 1 / w === 1 / k : w !== w && k !== k;
|
|
862
862
|
}
|
|
863
|
-
function v(w,
|
|
864
|
-
this.message = w, this.data =
|
|
863
|
+
function v(w, k) {
|
|
864
|
+
this.message = w, this.data = k && typeof k == "object" ? k : {}, this.stack = "";
|
|
865
865
|
}
|
|
866
866
|
v.prototype = Error.prototype;
|
|
867
|
-
function
|
|
867
|
+
function F(w) {
|
|
868
868
|
if (process.env.NODE_ENV !== "production")
|
|
869
|
-
var
|
|
870
|
-
function
|
|
871
|
-
if (
|
|
869
|
+
var k = {}, b = 0;
|
|
870
|
+
function I(C, E, $, N, V, H, ne) {
|
|
871
|
+
if (N = N || g, H = H || $, ne !== t) {
|
|
872
872
|
if (s) {
|
|
873
873
|
var S = new Error(
|
|
874
874
|
"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"
|
|
875
875
|
);
|
|
876
876
|
throw S.name = "Invariant Violation", S;
|
|
877
877
|
} else if (process.env.NODE_ENV !== "production" && typeof console < "u") {
|
|
878
|
-
var
|
|
879
|
-
!
|
|
880
|
-
|
|
881
|
-
"You are manually calling a React.PropTypes validation function for the `" +
|
|
882
|
-
),
|
|
878
|
+
var ge = N + ":" + $;
|
|
879
|
+
!k[ge] && // Avoid spamming the console because they are often not actionable except for lib authors
|
|
880
|
+
b < 3 && (a(
|
|
881
|
+
"You are manually calling a React.PropTypes validation function for the `" + H + "` prop on `" + N + "`. 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."
|
|
882
|
+
), k[ge] = !0, b++);
|
|
883
883
|
}
|
|
884
884
|
}
|
|
885
|
-
return
|
|
885
|
+
return E[$] == null ? C ? E[$] === null ? new v("The " + V + " `" + H + "` is marked as required " + ("in `" + N + "`, but its value is `null`.")) : new v("The " + V + " `" + H + "` is marked as required in " + ("`" + N + "`, but its value is `undefined`.")) : null : w(E, $, N, V, H);
|
|
886
886
|
}
|
|
887
|
-
var
|
|
888
|
-
return
|
|
887
|
+
var y = I.bind(null, !1);
|
|
888
|
+
return y.isRequired = I.bind(null, !0), y;
|
|
889
889
|
}
|
|
890
890
|
function h(w) {
|
|
891
|
-
function
|
|
892
|
-
var
|
|
893
|
-
if (
|
|
894
|
-
var
|
|
891
|
+
function k(b, I, y, C, E, $) {
|
|
892
|
+
var N = b[I], V = W(N);
|
|
893
|
+
if (V !== w) {
|
|
894
|
+
var H = Z(N);
|
|
895
895
|
return new v(
|
|
896
|
-
"Invalid " +
|
|
896
|
+
"Invalid " + C + " `" + E + "` of type " + ("`" + H + "` supplied to `" + y + "`, expected ") + ("`" + w + "`."),
|
|
897
897
|
{ expectedType: w }
|
|
898
898
|
);
|
|
899
899
|
}
|
|
900
900
|
return null;
|
|
901
901
|
}
|
|
902
|
-
return
|
|
902
|
+
return F(k);
|
|
903
903
|
}
|
|
904
904
|
function A() {
|
|
905
|
-
return
|
|
905
|
+
return F(r);
|
|
906
906
|
}
|
|
907
|
-
function
|
|
908
|
-
function
|
|
907
|
+
function P(w) {
|
|
908
|
+
function k(b, I, y, C, E) {
|
|
909
909
|
if (typeof w != "function")
|
|
910
|
-
return new v("Property `" +
|
|
911
|
-
var
|
|
912
|
-
if (!Array.isArray(
|
|
913
|
-
var
|
|
914
|
-
return new v("Invalid " +
|
|
910
|
+
return new v("Property `" + E + "` of component `" + y + "` has invalid PropType notation inside arrayOf.");
|
|
911
|
+
var $ = b[I];
|
|
912
|
+
if (!Array.isArray($)) {
|
|
913
|
+
var N = W($);
|
|
914
|
+
return new v("Invalid " + C + " `" + E + "` of type " + ("`" + N + "` supplied to `" + y + "`, expected an array."));
|
|
915
915
|
}
|
|
916
|
-
for (var
|
|
917
|
-
var
|
|
918
|
-
if (
|
|
919
|
-
return
|
|
916
|
+
for (var V = 0; V < $.length; V++) {
|
|
917
|
+
var H = w($, V, y, C, E + "[" + V + "]", t);
|
|
918
|
+
if (H instanceof Error)
|
|
919
|
+
return H;
|
|
920
920
|
}
|
|
921
921
|
return null;
|
|
922
922
|
}
|
|
923
|
-
return
|
|
923
|
+
return F(k);
|
|
924
924
|
}
|
|
925
|
-
function
|
|
926
|
-
function w(
|
|
927
|
-
var
|
|
928
|
-
if (!l(
|
|
929
|
-
var
|
|
930
|
-
return new v("Invalid " +
|
|
925
|
+
function j() {
|
|
926
|
+
function w(k, b, I, y, C) {
|
|
927
|
+
var E = k[b];
|
|
928
|
+
if (!l(E)) {
|
|
929
|
+
var $ = W(E);
|
|
930
|
+
return new v("Invalid " + y + " `" + C + "` of type " + ("`" + $ + "` supplied to `" + I + "`, expected a single ReactElement."));
|
|
931
931
|
}
|
|
932
932
|
return null;
|
|
933
933
|
}
|
|
934
|
-
return
|
|
934
|
+
return F(w);
|
|
935
935
|
}
|
|
936
936
|
function x() {
|
|
937
|
-
function w(
|
|
938
|
-
var
|
|
939
|
-
if (!e.isValidElementType(
|
|
940
|
-
var
|
|
941
|
-
return new v("Invalid " +
|
|
937
|
+
function w(k, b, I, y, C) {
|
|
938
|
+
var E = k[b];
|
|
939
|
+
if (!e.isValidElementType(E)) {
|
|
940
|
+
var $ = W(E);
|
|
941
|
+
return new v("Invalid " + y + " `" + C + "` of type " + ("`" + $ + "` supplied to `" + I + "`, expected a single ReactElement type."));
|
|
942
942
|
}
|
|
943
943
|
return null;
|
|
944
944
|
}
|
|
945
|
-
return
|
|
945
|
+
return F(w);
|
|
946
946
|
}
|
|
947
|
-
function
|
|
948
|
-
function
|
|
949
|
-
if (!(
|
|
950
|
-
var
|
|
951
|
-
return new v("Invalid " +
|
|
947
|
+
function L(w) {
|
|
948
|
+
function k(b, I, y, C, E) {
|
|
949
|
+
if (!(b[I] instanceof w)) {
|
|
950
|
+
var $ = w.name || g, N = ee(b[I]);
|
|
951
|
+
return new v("Invalid " + C + " `" + E + "` of type " + ("`" + N + "` supplied to `" + y + "`, expected ") + ("instance of `" + $ + "`."));
|
|
952
952
|
}
|
|
953
953
|
return null;
|
|
954
954
|
}
|
|
955
|
-
return
|
|
955
|
+
return F(k);
|
|
956
956
|
}
|
|
957
|
-
function
|
|
957
|
+
function z(w) {
|
|
958
958
|
if (!Array.isArray(w))
|
|
959
959
|
return process.env.NODE_ENV !== "production" && (arguments.length > 1 ? a(
|
|
960
960
|
"Invalid arguments supplied to oneOf, expected an array, got " + arguments.length + " arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z])."
|
|
961
961
|
) : a("Invalid argument supplied to oneOf, expected an array.")), r;
|
|
962
|
-
function
|
|
963
|
-
for (var
|
|
964
|
-
if (m(
|
|
962
|
+
function k(b, I, y, C, E) {
|
|
963
|
+
for (var $ = b[I], N = 0; N < w.length; N++)
|
|
964
|
+
if (m($, w[N]))
|
|
965
965
|
return null;
|
|
966
|
-
var
|
|
967
|
-
var
|
|
968
|
-
return
|
|
966
|
+
var V = JSON.stringify(w, function(ne, S) {
|
|
967
|
+
var ge = Z(S);
|
|
968
|
+
return ge === "symbol" ? String(S) : S;
|
|
969
969
|
});
|
|
970
|
-
return new v("Invalid " +
|
|
970
|
+
return new v("Invalid " + C + " `" + E + "` of value `" + String($) + "` " + ("supplied to `" + y + "`, expected one of " + V + "."));
|
|
971
971
|
}
|
|
972
|
-
return
|
|
972
|
+
return F(k);
|
|
973
973
|
}
|
|
974
974
|
function Q(w) {
|
|
975
|
-
function
|
|
975
|
+
function k(b, I, y, C, E) {
|
|
976
976
|
if (typeof w != "function")
|
|
977
|
-
return new v("Property `" +
|
|
978
|
-
var
|
|
979
|
-
if (
|
|
980
|
-
return new v("Invalid " +
|
|
981
|
-
for (var
|
|
982
|
-
if (i(
|
|
983
|
-
var
|
|
984
|
-
if (
|
|
985
|
-
return
|
|
977
|
+
return new v("Property `" + E + "` of component `" + y + "` has invalid PropType notation inside objectOf.");
|
|
978
|
+
var $ = b[I], N = W($);
|
|
979
|
+
if (N !== "object")
|
|
980
|
+
return new v("Invalid " + C + " `" + E + "` of type " + ("`" + N + "` supplied to `" + y + "`, expected an object."));
|
|
981
|
+
for (var V in $)
|
|
982
|
+
if (i($, V)) {
|
|
983
|
+
var H = w($, V, y, C, E + "." + V, t);
|
|
984
|
+
if (H instanceof Error)
|
|
985
|
+
return H;
|
|
986
986
|
}
|
|
987
987
|
return null;
|
|
988
988
|
}
|
|
989
|
-
return
|
|
989
|
+
return F(k);
|
|
990
990
|
}
|
|
991
|
-
function
|
|
991
|
+
function J(w) {
|
|
992
992
|
if (!Array.isArray(w))
|
|
993
993
|
return process.env.NODE_ENV !== "production" && a("Invalid argument supplied to oneOfType, expected an instance of array."), r;
|
|
994
|
-
for (var
|
|
995
|
-
var
|
|
996
|
-
if (typeof
|
|
994
|
+
for (var k = 0; k < w.length; k++) {
|
|
995
|
+
var b = w[k];
|
|
996
|
+
if (typeof b != "function")
|
|
997
997
|
return a(
|
|
998
|
-
"Invalid argument supplied to oneOfType. Expected an array of check functions, but received " +
|
|
998
|
+
"Invalid argument supplied to oneOfType. Expected an array of check functions, but received " + le(b) + " at index " + k + "."
|
|
999
999
|
), r;
|
|
1000
1000
|
}
|
|
1001
|
-
function
|
|
1002
|
-
for (var
|
|
1003
|
-
var
|
|
1001
|
+
function I(y, C, E, $, N) {
|
|
1002
|
+
for (var V = [], H = 0; H < w.length; H++) {
|
|
1003
|
+
var ne = w[H], S = ne(y, C, E, $, N, t);
|
|
1004
1004
|
if (S == null)
|
|
1005
1005
|
return null;
|
|
1006
|
-
S.data && i(S.data, "expectedType") &&
|
|
1006
|
+
S.data && i(S.data, "expectedType") && V.push(S.data.expectedType);
|
|
1007
1007
|
}
|
|
1008
|
-
var
|
|
1009
|
-
return new v("Invalid " +
|
|
1008
|
+
var ge = V.length > 0 ? ", expected one of type [" + V.join(", ") + "]" : "";
|
|
1009
|
+
return new v("Invalid " + $ + " `" + N + "` supplied to " + ("`" + E + "`" + ge + "."));
|
|
1010
1010
|
}
|
|
1011
|
-
return
|
|
1011
|
+
return F(I);
|
|
1012
1012
|
}
|
|
1013
|
-
function
|
|
1014
|
-
function w(
|
|
1015
|
-
return R(
|
|
1013
|
+
function ce() {
|
|
1014
|
+
function w(k, b, I, y, C) {
|
|
1015
|
+
return R(k[b]) ? null : new v("Invalid " + y + " `" + C + "` supplied to " + ("`" + I + "`, expected a ReactNode."));
|
|
1016
1016
|
}
|
|
1017
|
-
return
|
|
1017
|
+
return F(w);
|
|
1018
1018
|
}
|
|
1019
|
-
function
|
|
1019
|
+
function ue(w, k, b, I, y) {
|
|
1020
1020
|
return new v(
|
|
1021
|
-
(w || "React class") + ": " +
|
|
1021
|
+
(w || "React class") + ": " + k + " type `" + b + "." + I + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + y + "`."
|
|
1022
1022
|
);
|
|
1023
1023
|
}
|
|
1024
|
-
function
|
|
1025
|
-
function
|
|
1026
|
-
var
|
|
1027
|
-
if (
|
|
1028
|
-
return new v("Invalid " +
|
|
1029
|
-
for (var
|
|
1030
|
-
var
|
|
1031
|
-
if (typeof
|
|
1032
|
-
return
|
|
1033
|
-
var
|
|
1034
|
-
if (
|
|
1035
|
-
return
|
|
1024
|
+
function ve(w) {
|
|
1025
|
+
function k(b, I, y, C, E) {
|
|
1026
|
+
var $ = b[I], N = W($);
|
|
1027
|
+
if (N !== "object")
|
|
1028
|
+
return new v("Invalid " + C + " `" + E + "` of type `" + N + "` " + ("supplied to `" + y + "`, expected `object`."));
|
|
1029
|
+
for (var V in w) {
|
|
1030
|
+
var H = w[V];
|
|
1031
|
+
if (typeof H != "function")
|
|
1032
|
+
return ue(y, C, E, V, Z(H));
|
|
1033
|
+
var ne = H($, V, y, C, E + "." + V, t);
|
|
1034
|
+
if (ne)
|
|
1035
|
+
return ne;
|
|
1036
1036
|
}
|
|
1037
1037
|
return null;
|
|
1038
1038
|
}
|
|
1039
|
-
return
|
|
1039
|
+
return F(k);
|
|
1040
1040
|
}
|
|
1041
1041
|
function D(w) {
|
|
1042
|
-
function
|
|
1043
|
-
var
|
|
1044
|
-
if (
|
|
1045
|
-
return new v("Invalid " +
|
|
1046
|
-
var
|
|
1047
|
-
for (var
|
|
1048
|
-
var
|
|
1049
|
-
if (i(w,
|
|
1050
|
-
return
|
|
1051
|
-
if (!
|
|
1042
|
+
function k(b, I, y, C, E) {
|
|
1043
|
+
var $ = b[I], N = W($);
|
|
1044
|
+
if (N !== "object")
|
|
1045
|
+
return new v("Invalid " + C + " `" + E + "` of type `" + N + "` " + ("supplied to `" + y + "`, expected `object`."));
|
|
1046
|
+
var V = n({}, b[I], w);
|
|
1047
|
+
for (var H in V) {
|
|
1048
|
+
var ne = w[H];
|
|
1049
|
+
if (i(w, H) && typeof ne != "function")
|
|
1050
|
+
return ue(y, C, E, H, Z(ne));
|
|
1051
|
+
if (!ne)
|
|
1052
1052
|
return new v(
|
|
1053
|
-
"Invalid " +
|
|
1053
|
+
"Invalid " + C + " `" + E + "` key `" + H + "` supplied to `" + y + "`.\nBad object: " + JSON.stringify(b[I], null, " ") + `
|
|
1054
1054
|
Valid keys: ` + JSON.stringify(Object.keys(w), null, " ")
|
|
1055
1055
|
);
|
|
1056
|
-
var S =
|
|
1056
|
+
var S = ne($, H, y, C, E + "." + H, t);
|
|
1057
1057
|
if (S)
|
|
1058
1058
|
return S;
|
|
1059
1059
|
}
|
|
1060
1060
|
return null;
|
|
1061
1061
|
}
|
|
1062
|
-
return
|
|
1062
|
+
return F(k);
|
|
1063
1063
|
}
|
|
1064
1064
|
function R(w) {
|
|
1065
1065
|
switch (typeof w) {
|
|
@@ -1074,17 +1074,17 @@ Valid keys: ` + JSON.stringify(Object.keys(w), null, " ")
|
|
|
1074
1074
|
return w.every(R);
|
|
1075
1075
|
if (w === null || l(w))
|
|
1076
1076
|
return !0;
|
|
1077
|
-
var
|
|
1078
|
-
if (
|
|
1079
|
-
var
|
|
1080
|
-
if (
|
|
1081
|
-
for (; !(
|
|
1082
|
-
if (!R(
|
|
1077
|
+
var k = f(w);
|
|
1078
|
+
if (k) {
|
|
1079
|
+
var b = k.call(w), I;
|
|
1080
|
+
if (k !== w.entries) {
|
|
1081
|
+
for (; !(I = b.next()).done; )
|
|
1082
|
+
if (!R(I.value))
|
|
1083
1083
|
return !1;
|
|
1084
1084
|
} else
|
|
1085
|
-
for (; !(
|
|
1086
|
-
var
|
|
1087
|
-
if (
|
|
1085
|
+
for (; !(I = b.next()).done; ) {
|
|
1086
|
+
var y = I.value;
|
|
1087
|
+
if (y && !R(y[1]))
|
|
1088
1088
|
return !1;
|
|
1089
1089
|
}
|
|
1090
1090
|
} else
|
|
@@ -1094,43 +1094,43 @@ Valid keys: ` + JSON.stringify(Object.keys(w), null, " ")
|
|
|
1094
1094
|
return !1;
|
|
1095
1095
|
}
|
|
1096
1096
|
}
|
|
1097
|
-
function
|
|
1098
|
-
return w === "symbol" ? !0 :
|
|
1097
|
+
function q(w, k) {
|
|
1098
|
+
return w === "symbol" ? !0 : k ? k["@@toStringTag"] === "Symbol" || typeof Symbol == "function" && k instanceof Symbol : !1;
|
|
1099
1099
|
}
|
|
1100
|
-
function
|
|
1101
|
-
var
|
|
1102
|
-
return Array.isArray(w) ? "array" : w instanceof RegExp ? "object" :
|
|
1100
|
+
function W(w) {
|
|
1101
|
+
var k = typeof w;
|
|
1102
|
+
return Array.isArray(w) ? "array" : w instanceof RegExp ? "object" : q(k, w) ? "symbol" : k;
|
|
1103
1103
|
}
|
|
1104
|
-
function
|
|
1104
|
+
function Z(w) {
|
|
1105
1105
|
if (typeof w > "u" || w === null)
|
|
1106
1106
|
return "" + w;
|
|
1107
|
-
var
|
|
1108
|
-
if (
|
|
1107
|
+
var k = W(w);
|
|
1108
|
+
if (k === "object") {
|
|
1109
1109
|
if (w instanceof Date)
|
|
1110
1110
|
return "date";
|
|
1111
1111
|
if (w instanceof RegExp)
|
|
1112
1112
|
return "regexp";
|
|
1113
1113
|
}
|
|
1114
|
-
return
|
|
1114
|
+
return k;
|
|
1115
1115
|
}
|
|
1116
|
-
function
|
|
1117
|
-
var
|
|
1118
|
-
switch (
|
|
1116
|
+
function le(w) {
|
|
1117
|
+
var k = Z(w);
|
|
1118
|
+
switch (k) {
|
|
1119
1119
|
case "array":
|
|
1120
1120
|
case "object":
|
|
1121
|
-
return "an " +
|
|
1121
|
+
return "an " + k;
|
|
1122
1122
|
case "boolean":
|
|
1123
1123
|
case "date":
|
|
1124
1124
|
case "regexp":
|
|
1125
|
-
return "a " +
|
|
1125
|
+
return "a " + k;
|
|
1126
1126
|
default:
|
|
1127
|
-
return
|
|
1127
|
+
return k;
|
|
1128
1128
|
}
|
|
1129
1129
|
}
|
|
1130
|
-
function
|
|
1130
|
+
function ee(w) {
|
|
1131
1131
|
return !w.constructor || !w.constructor.name ? g : w.constructor.name;
|
|
1132
1132
|
}
|
|
1133
|
-
return
|
|
1133
|
+
return c.checkPropTypes = o, c.resetWarningCache = o.resetWarningCache, c.PropTypes = c, c;
|
|
1134
1134
|
}, wt;
|
|
1135
1135
|
}
|
|
1136
1136
|
var yt, gn;
|
|
@@ -1143,7 +1143,7 @@ function $o() {
|
|
|
1143
1143
|
function t() {
|
|
1144
1144
|
}
|
|
1145
1145
|
return t.resetWarningCache = n, yt = function() {
|
|
1146
|
-
function i(r, l, s,
|
|
1146
|
+
function i(r, l, s, p, d, f) {
|
|
1147
1147
|
if (f !== e) {
|
|
1148
1148
|
var g = new Error(
|
|
1149
1149
|
"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"
|
|
@@ -1202,22 +1202,22 @@ function De(e, n, t, i) {
|
|
|
1202
1202
|
return new (t || (t = Promise))(function(a, r) {
|
|
1203
1203
|
function l(d) {
|
|
1204
1204
|
try {
|
|
1205
|
-
|
|
1205
|
+
p(i.next(d));
|
|
1206
1206
|
} catch (f) {
|
|
1207
1207
|
r(f);
|
|
1208
1208
|
}
|
|
1209
1209
|
}
|
|
1210
1210
|
function s(d) {
|
|
1211
1211
|
try {
|
|
1212
|
-
|
|
1212
|
+
p(i.throw(d));
|
|
1213
1213
|
} catch (f) {
|
|
1214
1214
|
r(f);
|
|
1215
1215
|
}
|
|
1216
1216
|
}
|
|
1217
|
-
function
|
|
1217
|
+
function p(d) {
|
|
1218
1218
|
d.done ? a(d.value) : o(d.value).then(l, s);
|
|
1219
1219
|
}
|
|
1220
|
-
|
|
1220
|
+
p((i = i.apply(e, n || [])).next());
|
|
1221
1221
|
});
|
|
1222
1222
|
}
|
|
1223
1223
|
const Oo = /* @__PURE__ */ new Map([
|
|
@@ -2457,19 +2457,19 @@ const To = [
|
|
|
2457
2457
|
];
|
|
2458
2458
|
function zo(e) {
|
|
2459
2459
|
return De(this, void 0, void 0, function* () {
|
|
2460
|
-
return tt(e) && Vo(e.dataTransfer) ? qo(e.dataTransfer, e.type) :
|
|
2460
|
+
return tt(e) && Vo(e.dataTransfer) ? qo(e.dataTransfer, e.type) : Lo(e) ? No(e) : Array.isArray(e) && e.every((n) => "getFile" in n && typeof n.getFile == "function") ? Ho(e) : [];
|
|
2461
2461
|
});
|
|
2462
2462
|
}
|
|
2463
2463
|
function Vo(e) {
|
|
2464
2464
|
return tt(e);
|
|
2465
2465
|
}
|
|
2466
|
-
function
|
|
2466
|
+
function Lo(e) {
|
|
2467
2467
|
return tt(e) && tt(e.target);
|
|
2468
2468
|
}
|
|
2469
2469
|
function tt(e) {
|
|
2470
2470
|
return typeof e == "object" && e !== null;
|
|
2471
2471
|
}
|
|
2472
|
-
function
|
|
2472
|
+
function No(e) {
|
|
2473
2473
|
return Dt(e.target.files).map((n) => je(n));
|
|
2474
2474
|
}
|
|
2475
2475
|
function Ho(e) {
|
|
@@ -2711,7 +2711,7 @@ function Pe(e) {
|
|
|
2711
2711
|
function sa(e) {
|
|
2712
2712
|
var n = e.files, t = e.accept, i = e.minSize, o = e.maxSize, a = e.multiple, r = e.maxFiles, l = e.validator;
|
|
2713
2713
|
return !a && n.length > 1 || a && r >= 1 && n.length > r ? !1 : n.every(function(s) {
|
|
2714
|
-
var
|
|
2714
|
+
var p = Yn(s, t), d = He(p, 1), f = d[0], g = Xn(s, i, o), c = He(g, 1), m = c[0], v = l ? l(s) : null;
|
|
2715
2715
|
return f && m && !v;
|
|
2716
2716
|
});
|
|
2717
2717
|
}
|
|
@@ -2855,7 +2855,7 @@ function Rn(e, n) {
|
|
|
2855
2855
|
}
|
|
2856
2856
|
return t;
|
|
2857
2857
|
}
|
|
2858
|
-
function
|
|
2858
|
+
function te(e) {
|
|
2859
2859
|
for (var n = 1; n < arguments.length; n++) {
|
|
2860
2860
|
var t = arguments[n] != null ? arguments[n] : {};
|
|
2861
2861
|
n % 2 ? Rn(Object(t), !0).forEach(function(i) {
|
|
@@ -2892,7 +2892,7 @@ var Wt = /* @__PURE__ */ Ri(function(e, n) {
|
|
|
2892
2892
|
return {
|
|
2893
2893
|
open: a
|
|
2894
2894
|
};
|
|
2895
|
-
}, [a]), /* @__PURE__ */ Ci.createElement(Mn, null, t(
|
|
2895
|
+
}, [a]), /* @__PURE__ */ Ci.createElement(Mn, null, t(te(te({}, r), {}, {
|
|
2896
2896
|
open: a
|
|
2897
2897
|
})));
|
|
2898
2898
|
});
|
|
@@ -3092,186 +3092,186 @@ var Ot = {
|
|
|
3092
3092
|
fileRejections: []
|
|
3093
3093
|
};
|
|
3094
3094
|
function ti() {
|
|
3095
|
-
var e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, n =
|
|
3095
|
+
var e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, n = te(te({}, ei), e), t = n.accept, i = n.disabled, o = n.getFilesFromEvent, a = n.maxSize, r = n.minSize, l = n.multiple, s = n.maxFiles, p = n.onDragEnter, d = n.onDragLeave, f = n.onDragOver, g = n.onDrop, c = n.onDropAccepted, m = n.onDropRejected, v = n.onFileDialogCancel, F = n.onFileDialogOpen, h = n.useFsAccessApi, A = n.autoFocus, P = n.preventDropOnDocument, j = n.noClick, x = n.noKeyboard, L = n.noDrag, z = n.noDragEventsBubbling, Q = n.onError, J = n.validator, ce = re(function() {
|
|
3096
3096
|
return fa(t);
|
|
3097
|
-
}, [t]),
|
|
3097
|
+
}, [t]), ue = re(function() {
|
|
3098
3098
|
return ga(t);
|
|
3099
|
-
}, [t]),
|
|
3100
|
-
return typeof
|
|
3101
|
-
}, [
|
|
3099
|
+
}, [t]), ve = re(function() {
|
|
3100
|
+
return typeof F == "function" ? F : En;
|
|
3101
|
+
}, [F]), D = re(function() {
|
|
3102
3102
|
return typeof v == "function" ? v : En;
|
|
3103
|
-
}, [v]), R = be(null),
|
|
3104
|
-
!
|
|
3105
|
-
if (
|
|
3106
|
-
var T =
|
|
3107
|
-
T.length || (
|
|
3103
|
+
}, [v]), R = be(null), q = be(null), W = An(Pa, Ot), Z = St(W, 2), le = Z[0], ee = Z[1], w = le.isFocused, k = le.isFileDialogActive, b = be(typeof window < "u" && window.isSecureContext && h && da()), I = function() {
|
|
3104
|
+
!b.current && k && setTimeout(function() {
|
|
3105
|
+
if (q.current) {
|
|
3106
|
+
var T = q.current.files;
|
|
3107
|
+
T.length || (ee({
|
|
3108
3108
|
type: "closeDialog"
|
|
3109
3109
|
}), D());
|
|
3110
3110
|
}
|
|
3111
3111
|
}, 300);
|
|
3112
3112
|
};
|
|
3113
3113
|
Ce(function() {
|
|
3114
|
-
return window.addEventListener("focus",
|
|
3115
|
-
window.removeEventListener("focus",
|
|
3114
|
+
return window.addEventListener("focus", I, !1), function() {
|
|
3115
|
+
window.removeEventListener("focus", I, !1);
|
|
3116
3116
|
};
|
|
3117
|
-
}, [
|
|
3118
|
-
var
|
|
3119
|
-
R.current && R.current.contains(T.target) || (T.preventDefault(),
|
|
3117
|
+
}, [q, k, D, b]);
|
|
3118
|
+
var y = be([]), C = function(T) {
|
|
3119
|
+
R.current && R.current.contains(T.target) || (T.preventDefault(), y.current = []);
|
|
3120
3120
|
};
|
|
3121
3121
|
Ce(function() {
|
|
3122
|
-
return
|
|
3123
|
-
|
|
3122
|
+
return P && (document.addEventListener("dragover", _n, !1), document.addEventListener("drop", C, !1)), function() {
|
|
3123
|
+
P && (document.removeEventListener("dragover", _n), document.removeEventListener("drop", C));
|
|
3124
3124
|
};
|
|
3125
|
-
}, [R,
|
|
3125
|
+
}, [R, P]), Ce(function() {
|
|
3126
3126
|
return !i && A && R.current && R.current.focus(), function() {
|
|
3127
3127
|
};
|
|
3128
3128
|
}, [R, A, i]);
|
|
3129
|
-
var
|
|
3130
|
-
Q ? Q(
|
|
3131
|
-
}, [Q]),
|
|
3132
|
-
|
|
3133
|
-
if (!(nt(
|
|
3134
|
-
var
|
|
3129
|
+
var E = X(function(_) {
|
|
3130
|
+
Q ? Q(_) : console.error(_);
|
|
3131
|
+
}, [Q]), $ = X(function(_) {
|
|
3132
|
+
_.preventDefault(), _.persist(), Ge(_), y.current = [].concat(ba(y.current), [_.target]), Ye(_) && Promise.resolve(o(_)).then(function(T) {
|
|
3133
|
+
if (!(nt(_) && !z)) {
|
|
3134
|
+
var ie = T.length, oe = ie > 0 && sa({
|
|
3135
3135
|
files: T,
|
|
3136
|
-
accept:
|
|
3136
|
+
accept: ce,
|
|
3137
3137
|
minSize: r,
|
|
3138
3138
|
maxSize: a,
|
|
3139
3139
|
multiple: l,
|
|
3140
3140
|
maxFiles: s,
|
|
3141
|
-
validator:
|
|
3142
|
-
}),
|
|
3143
|
-
|
|
3144
|
-
isDragAccept:
|
|
3145
|
-
isDragReject:
|
|
3141
|
+
validator: J
|
|
3142
|
+
}), fe = ie > 0 && !oe;
|
|
3143
|
+
ee({
|
|
3144
|
+
isDragAccept: oe,
|
|
3145
|
+
isDragReject: fe,
|
|
3146
3146
|
isDragActive: !0,
|
|
3147
3147
|
type: "setDraggedFiles"
|
|
3148
|
-
}),
|
|
3148
|
+
}), p && p(_);
|
|
3149
3149
|
}
|
|
3150
3150
|
}).catch(function(T) {
|
|
3151
|
-
return
|
|
3151
|
+
return E(T);
|
|
3152
3152
|
});
|
|
3153
|
-
}, [o,
|
|
3154
|
-
|
|
3155
|
-
var T = Ye(
|
|
3156
|
-
if (T &&
|
|
3153
|
+
}, [o, p, E, z, ce, r, a, l, s, J]), N = X(function(_) {
|
|
3154
|
+
_.preventDefault(), _.persist(), Ge(_);
|
|
3155
|
+
var T = Ye(_);
|
|
3156
|
+
if (T && _.dataTransfer)
|
|
3157
3157
|
try {
|
|
3158
|
-
|
|
3158
|
+
_.dataTransfer.dropEffect = "copy";
|
|
3159
3159
|
} catch {
|
|
3160
3160
|
}
|
|
3161
|
-
return T && f && f(
|
|
3162
|
-
}, [f,
|
|
3163
|
-
|
|
3164
|
-
var T =
|
|
3165
|
-
return R.current && R.current.contains(
|
|
3166
|
-
}),
|
|
3167
|
-
|
|
3161
|
+
return T && f && f(_), !1;
|
|
3162
|
+
}, [f, z]), V = X(function(_) {
|
|
3163
|
+
_.preventDefault(), _.persist(), Ge(_);
|
|
3164
|
+
var T = y.current.filter(function(oe) {
|
|
3165
|
+
return R.current && R.current.contains(oe);
|
|
3166
|
+
}), ie = T.indexOf(_.target);
|
|
3167
|
+
ie !== -1 && T.splice(ie, 1), y.current = T, !(T.length > 0) && (ee({
|
|
3168
3168
|
type: "setDraggedFiles",
|
|
3169
3169
|
isDragActive: !1,
|
|
3170
3170
|
isDragAccept: !1,
|
|
3171
3171
|
isDragReject: !1
|
|
3172
|
-
}), Ye(
|
|
3173
|
-
}, [R, d,
|
|
3174
|
-
var
|
|
3175
|
-
|
|
3176
|
-
var ze = Yn(
|
|
3172
|
+
}), Ye(_) && d && d(_));
|
|
3173
|
+
}, [R, d, z]), H = X(function(_, T) {
|
|
3174
|
+
var ie = [], oe = [];
|
|
3175
|
+
_.forEach(function(fe) {
|
|
3176
|
+
var ze = Yn(fe, ce), Ae = St(ze, 2), lt = Ae[0], st = Ae[1], ct = Xn(fe, r, a), Be = St(ct, 2), pt = Be[0], ut = Be[1], dt = J ? J(fe) : null;
|
|
3177
3177
|
if (lt && pt && !dt)
|
|
3178
|
-
|
|
3178
|
+
ie.push(fe);
|
|
3179
3179
|
else {
|
|
3180
3180
|
var gt = [st, ut];
|
|
3181
|
-
dt && (gt = gt.concat(dt)),
|
|
3182
|
-
file:
|
|
3181
|
+
dt && (gt = gt.concat(dt)), oe.push({
|
|
3182
|
+
file: fe,
|
|
3183
3183
|
errors: gt.filter(function(Si) {
|
|
3184
3184
|
return Si;
|
|
3185
3185
|
})
|
|
3186
3186
|
});
|
|
3187
3187
|
}
|
|
3188
|
-
}), (!l &&
|
|
3189
|
-
|
|
3190
|
-
file:
|
|
3188
|
+
}), (!l && ie.length > 1 || l && s >= 1 && ie.length > s) && (ie.forEach(function(fe) {
|
|
3189
|
+
oe.push({
|
|
3190
|
+
file: fe,
|
|
3191
3191
|
errors: [la]
|
|
3192
3192
|
});
|
|
3193
|
-
}),
|
|
3194
|
-
acceptedFiles:
|
|
3195
|
-
fileRejections:
|
|
3196
|
-
isDragReject:
|
|
3193
|
+
}), ie.splice(0)), ee({
|
|
3194
|
+
acceptedFiles: ie,
|
|
3195
|
+
fileRejections: oe,
|
|
3196
|
+
isDragReject: oe.length > 0,
|
|
3197
3197
|
type: "setFiles"
|
|
3198
|
-
}), g && g(
|
|
3199
|
-
}, [
|
|
3200
|
-
|
|
3201
|
-
nt(
|
|
3198
|
+
}), g && g(ie, oe, T), oe.length > 0 && m && m(oe, T), ie.length > 0 && c && c(ie, T);
|
|
3199
|
+
}, [ee, l, ce, r, a, s, g, c, m, J]), ne = X(function(_) {
|
|
3200
|
+
_.preventDefault(), _.persist(), Ge(_), y.current = [], Ye(_) && Promise.resolve(o(_)).then(function(T) {
|
|
3201
|
+
nt(_) && !z || H(T, _);
|
|
3202
3202
|
}).catch(function(T) {
|
|
3203
|
-
return
|
|
3204
|
-
}),
|
|
3203
|
+
return E(T);
|
|
3204
|
+
}), ee({
|
|
3205
3205
|
type: "reset"
|
|
3206
3206
|
});
|
|
3207
|
-
}, [o,
|
|
3208
|
-
if (
|
|
3209
|
-
|
|
3207
|
+
}, [o, H, E, z]), S = X(function() {
|
|
3208
|
+
if (b.current) {
|
|
3209
|
+
ee({
|
|
3210
3210
|
type: "openDialog"
|
|
3211
|
-
}),
|
|
3212
|
-
var
|
|
3211
|
+
}), ve();
|
|
3212
|
+
var _ = {
|
|
3213
3213
|
multiple: l,
|
|
3214
|
-
types:
|
|
3214
|
+
types: ue
|
|
3215
3215
|
};
|
|
3216
|
-
window.showOpenFilePicker(
|
|
3216
|
+
window.showOpenFilePicker(_).then(function(T) {
|
|
3217
3217
|
return o(T);
|
|
3218
3218
|
}).then(function(T) {
|
|
3219
|
-
|
|
3219
|
+
H(T, null), ee({
|
|
3220
3220
|
type: "closeDialog"
|
|
3221
3221
|
});
|
|
3222
3222
|
}).catch(function(T) {
|
|
3223
|
-
ma(T) ? (D(T),
|
|
3223
|
+
ma(T) ? (D(T), ee({
|
|
3224
3224
|
type: "closeDialog"
|
|
3225
|
-
})) : va(T) ? (
|
|
3225
|
+
})) : va(T) ? (b.current = !1, q.current ? (q.current.value = null, q.current.click()) : E(new Error("Cannot open the file picker because the https://developer.mozilla.org/en-US/docs/Web/API/File_System_Access_API is not supported and no <input> was provided."))) : E(T);
|
|
3226
3226
|
});
|
|
3227
3227
|
return;
|
|
3228
3228
|
}
|
|
3229
|
-
|
|
3229
|
+
q.current && (ee({
|
|
3230
3230
|
type: "openDialog"
|
|
3231
|
-
}),
|
|
3232
|
-
}, [
|
|
3233
|
-
!R.current || !R.current.isEqualNode(
|
|
3231
|
+
}), ve(), q.current.value = null, q.current.click());
|
|
3232
|
+
}, [ee, ve, D, h, H, E, ue, l]), ge = X(function(_) {
|
|
3233
|
+
!R.current || !R.current.isEqualNode(_.target) || (_.key === " " || _.key === "Enter" || _.keyCode === 32 || _.keyCode === 13) && (_.preventDefault(), S());
|
|
3234
3234
|
}, [R, S]), Fe = X(function() {
|
|
3235
|
-
|
|
3235
|
+
ee({
|
|
3236
3236
|
type: "focus"
|
|
3237
3237
|
});
|
|
3238
3238
|
}, []), Te = X(function() {
|
|
3239
|
-
|
|
3239
|
+
ee({
|
|
3240
3240
|
type: "blur"
|
|
3241
3241
|
});
|
|
3242
3242
|
}, []), Jt = X(function() {
|
|
3243
|
-
|
|
3244
|
-
}, [
|
|
3243
|
+
j || (ua() ? setTimeout(S, 0) : S());
|
|
3244
|
+
}, [j, S]), $e = function(T) {
|
|
3245
3245
|
return i ? null : T;
|
|
3246
3246
|
}, rt = function(T) {
|
|
3247
3247
|
return x ? null : $e(T);
|
|
3248
3248
|
}, qe = function(T) {
|
|
3249
|
-
return
|
|
3249
|
+
return L ? null : $e(T);
|
|
3250
3250
|
}, Ge = function(T) {
|
|
3251
|
-
|
|
3252
|
-
}, wi =
|
|
3251
|
+
z && T.stopPropagation();
|
|
3252
|
+
}, wi = re(function() {
|
|
3253
3253
|
return function() {
|
|
3254
|
-
var
|
|
3255
|
-
return
|
|
3256
|
-
onKeyDown: rt(ye(
|
|
3254
|
+
var _ = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, T = _.refKey, ie = T === void 0 ? "ref" : T, oe = _.role, fe = _.onKeyDown, ze = _.onFocus, Ae = _.onBlur, lt = _.onClick, st = _.onDragEnter, ct = _.onDragOver, Be = _.onDragLeave, pt = _.onDrop, ut = it(_, wa);
|
|
3255
|
+
return te(te(Mt({
|
|
3256
|
+
onKeyDown: rt(ye(fe, ge)),
|
|
3257
3257
|
onFocus: rt(ye(ze, Fe)),
|
|
3258
3258
|
onBlur: rt(ye(Ae, Te)),
|
|
3259
3259
|
onClick: $e(ye(lt, Jt)),
|
|
3260
|
-
onDragEnter: qe(ye(st,
|
|
3261
|
-
onDragOver: qe(ye(ct,
|
|
3262
|
-
onDragLeave: qe(ye(Be,
|
|
3263
|
-
onDrop: qe(ye(pt,
|
|
3264
|
-
role: typeof
|
|
3265
|
-
},
|
|
3260
|
+
onDragEnter: qe(ye(st, $)),
|
|
3261
|
+
onDragOver: qe(ye(ct, N)),
|
|
3262
|
+
onDragLeave: qe(ye(Be, V)),
|
|
3263
|
+
onDrop: qe(ye(pt, ne)),
|
|
3264
|
+
role: typeof oe == "string" && oe !== "" ? oe : "presentation"
|
|
3265
|
+
}, ie, R), !i && !x ? {
|
|
3266
3266
|
tabIndex: 0
|
|
3267
3267
|
} : {}), ut);
|
|
3268
3268
|
};
|
|
3269
|
-
}, [R,
|
|
3270
|
-
|
|
3271
|
-
}, []), bi =
|
|
3269
|
+
}, [R, ge, Fe, Te, Jt, $, N, V, ne, x, L, i]), yi = X(function(_) {
|
|
3270
|
+
_.stopPropagation();
|
|
3271
|
+
}, []), bi = re(function() {
|
|
3272
3272
|
return function() {
|
|
3273
|
-
var
|
|
3274
|
-
accept:
|
|
3273
|
+
var _ = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, T = _.refKey, ie = T === void 0 ? "ref" : T, oe = _.onChange, fe = _.onClick, ze = it(_, ya), Ae = Mt({
|
|
3274
|
+
accept: ce,
|
|
3275
3275
|
multiple: l,
|
|
3276
3276
|
type: "file",
|
|
3277
3277
|
style: {
|
|
@@ -3286,54 +3286,54 @@ function ti() {
|
|
|
3286
3286
|
width: "1px",
|
|
3287
3287
|
whiteSpace: "nowrap"
|
|
3288
3288
|
},
|
|
3289
|
-
onChange: $e(ye(
|
|
3290
|
-
onClick: $e(ye(
|
|
3289
|
+
onChange: $e(ye(oe, ne)),
|
|
3290
|
+
onClick: $e(ye(fe, yi)),
|
|
3291
3291
|
tabIndex: -1
|
|
3292
|
-
},
|
|
3293
|
-
return
|
|
3292
|
+
}, ie, q);
|
|
3293
|
+
return te(te({}, Ae), ze);
|
|
3294
3294
|
};
|
|
3295
|
-
}, [
|
|
3296
|
-
return
|
|
3295
|
+
}, [q, t, l, ne, i]);
|
|
3296
|
+
return te(te({}, le), {}, {
|
|
3297
3297
|
isFocused: w && !i,
|
|
3298
3298
|
getRootProps: wi,
|
|
3299
3299
|
getInputProps: bi,
|
|
3300
3300
|
rootRef: R,
|
|
3301
|
-
inputRef:
|
|
3301
|
+
inputRef: q,
|
|
3302
3302
|
open: $e(S)
|
|
3303
3303
|
});
|
|
3304
3304
|
}
|
|
3305
3305
|
function Pa(e, n) {
|
|
3306
3306
|
switch (n.type) {
|
|
3307
3307
|
case "focus":
|
|
3308
|
-
return
|
|
3308
|
+
return te(te({}, e), {}, {
|
|
3309
3309
|
isFocused: !0
|
|
3310
3310
|
});
|
|
3311
3311
|
case "blur":
|
|
3312
|
-
return
|
|
3312
|
+
return te(te({}, e), {}, {
|
|
3313
3313
|
isFocused: !1
|
|
3314
3314
|
});
|
|
3315
3315
|
case "openDialog":
|
|
3316
|
-
return
|
|
3316
|
+
return te(te({}, Ot), {}, {
|
|
3317
3317
|
isFileDialogActive: !0
|
|
3318
3318
|
});
|
|
3319
3319
|
case "closeDialog":
|
|
3320
|
-
return
|
|
3320
|
+
return te(te({}, e), {}, {
|
|
3321
3321
|
isFileDialogActive: !1
|
|
3322
3322
|
});
|
|
3323
3323
|
case "setDraggedFiles":
|
|
3324
|
-
return
|
|
3324
|
+
return te(te({}, e), {}, {
|
|
3325
3325
|
isDragActive: n.isDragActive,
|
|
3326
3326
|
isDragAccept: n.isDragAccept,
|
|
3327
3327
|
isDragReject: n.isDragReject
|
|
3328
3328
|
});
|
|
3329
3329
|
case "setFiles":
|
|
3330
|
-
return
|
|
3330
|
+
return te(te({}, e), {}, {
|
|
3331
3331
|
acceptedFiles: n.acceptedFiles,
|
|
3332
3332
|
fileRejections: n.fileRejections,
|
|
3333
3333
|
isDragReject: n.isDragReject
|
|
3334
3334
|
});
|
|
3335
3335
|
case "reset":
|
|
3336
|
-
return
|
|
3336
|
+
return te({}, Ot);
|
|
3337
3337
|
default:
|
|
3338
3338
|
return e;
|
|
3339
3339
|
}
|
|
@@ -3358,14 +3358,14 @@ const Ia = () => {
|
|
|
3358
3358
|
return {
|
|
3359
3359
|
...l,
|
|
3360
3360
|
acceptedFiles: l.acceptedFiles.filter(
|
|
3361
|
-
(
|
|
3361
|
+
(p) => p !== s.payload
|
|
3362
3362
|
)
|
|
3363
3363
|
};
|
|
3364
3364
|
case "remove-rejected":
|
|
3365
3365
|
return {
|
|
3366
3366
|
...l,
|
|
3367
3367
|
fileRejections: l.fileRejections.filter(
|
|
3368
|
-
(
|
|
3368
|
+
(p) => p !== s.payload
|
|
3369
3369
|
)
|
|
3370
3370
|
};
|
|
3371
3371
|
}
|
|
@@ -3393,7 +3393,7 @@ const Ia = () => {
|
|
|
3393
3393
|
maxSize: r,
|
|
3394
3394
|
onFileUpload: l,
|
|
3395
3395
|
rejectedFiles: s,
|
|
3396
|
-
removeFile:
|
|
3396
|
+
removeFile: p,
|
|
3397
3397
|
removeRejectedFile: d
|
|
3398
3398
|
}) => {
|
|
3399
3399
|
const { getRootProps: f } = ti({
|
|
@@ -3405,64 +3405,64 @@ const Ia = () => {
|
|
|
3405
3405
|
return /* @__PURE__ */ B(
|
|
3406
3406
|
"div",
|
|
3407
3407
|
{
|
|
3408
|
-
className:
|
|
3408
|
+
className: G("p-form__group p-form-validation", {
|
|
3409
3409
|
"is-error": !!n
|
|
3410
3410
|
}),
|
|
3411
3411
|
children: [
|
|
3412
|
-
o && /* @__PURE__ */
|
|
3413
|
-
i && /* @__PURE__ */
|
|
3412
|
+
o && /* @__PURE__ */ u($i, { id: g, children: o }),
|
|
3413
|
+
i && /* @__PURE__ */ u("p", { className: "p-form-help-text", children: i }),
|
|
3414
3414
|
/* @__PURE__ */ B("div", { className: "p-form__control", children: [
|
|
3415
|
-
!a || t.length < a ? /* @__PURE__ */
|
|
3415
|
+
!a || t.length < a ? /* @__PURE__ */ u("div", { className: "file-upload__wrapper", children: /* @__PURE__ */ u(
|
|
3416
3416
|
"div",
|
|
3417
3417
|
{
|
|
3418
3418
|
...f(),
|
|
3419
3419
|
"aria-labelledby": o ? g : void 0,
|
|
3420
3420
|
className: "file-upload",
|
|
3421
3421
|
"data-testid": "file-upload",
|
|
3422
|
-
children: /* @__PURE__ */
|
|
3422
|
+
children: /* @__PURE__ */ u("button", { className: "file-upload__button", type: "button", children: "Drag and drop files here or click to upload" })
|
|
3423
3423
|
}
|
|
3424
3424
|
) }) : null,
|
|
3425
3425
|
n ? /* @__PURE__ */ B("p", { className: "p-form-validation__message", children: [
|
|
3426
|
-
/* @__PURE__ */
|
|
3426
|
+
/* @__PURE__ */ u("strong", { children: "Error: " }),
|
|
3427
3427
|
n
|
|
3428
3428
|
] }) : null,
|
|
3429
3429
|
/* @__PURE__ */ B("div", { className: "file-upload__files-list", children: [
|
|
3430
|
-
s && s.map((
|
|
3430
|
+
s && s.map((c) => /* @__PURE__ */ B("span", { className: "is-error", children: [
|
|
3431
3431
|
/* @__PURE__ */ B("div", { className: "file-upload__file is-rejected", children: [
|
|
3432
|
-
|
|
3433
|
-
/* @__PURE__ */
|
|
3432
|
+
c.file.name,
|
|
3433
|
+
/* @__PURE__ */ u(
|
|
3434
3434
|
_e,
|
|
3435
3435
|
{
|
|
3436
3436
|
appearance: "base",
|
|
3437
3437
|
className: "file-upload__file-remove-button",
|
|
3438
|
-
onClick: () => d(
|
|
3438
|
+
onClick: () => d(c),
|
|
3439
3439
|
type: "button",
|
|
3440
|
-
children: /* @__PURE__ */
|
|
3440
|
+
children: /* @__PURE__ */ u(Re, { name: "close", children: "Remove file" })
|
|
3441
3441
|
}
|
|
3442
3442
|
)
|
|
3443
3443
|
] }),
|
|
3444
|
-
|
|
3444
|
+
c.errors.map((m) => /* @__PURE__ */ u(
|
|
3445
3445
|
"p",
|
|
3446
3446
|
{
|
|
3447
3447
|
className: "p-form-validation__message",
|
|
3448
3448
|
children: m.message
|
|
3449
3449
|
},
|
|
3450
|
-
`${
|
|
3450
|
+
`${c.file.name}-${m.code}`
|
|
3451
3451
|
))
|
|
3452
|
-
] },
|
|
3453
|
-
t && t.map((
|
|
3454
|
-
|
|
3455
|
-
|
|
3452
|
+
] }, c.file.name)),
|
|
3453
|
+
t && t.map((c) => /* @__PURE__ */ B("div", { className: "file-upload__file", children: [
|
|
3454
|
+
c.name,
|
|
3455
|
+
c.percentUploaded !== void 0 ? /* @__PURE__ */ u(Gi, { percentComplete: c.percentUploaded }) : /* @__PURE__ */ u(
|
|
3456
3456
|
_e,
|
|
3457
3457
|
{
|
|
3458
3458
|
appearance: "base",
|
|
3459
3459
|
className: "file-upload__file-remove-button",
|
|
3460
|
-
onClick: () => c
|
|
3460
|
+
onClick: () => p(c),
|
|
3461
3461
|
type: "button",
|
|
3462
|
-
children: /* @__PURE__ */
|
|
3462
|
+
children: /* @__PURE__ */ u(Re, { name: "close", children: "Remove file" })
|
|
3463
3463
|
}
|
|
3464
3464
|
)
|
|
3465
|
-
] },
|
|
3465
|
+
] }, c.name))
|
|
3466
3466
|
] })
|
|
3467
3467
|
] })
|
|
3468
3468
|
]
|
|
@@ -3480,10 +3480,10 @@ const Ia = () => {
|
|
|
3480
3480
|
acceptedFiles: r,
|
|
3481
3481
|
fileRejections: l,
|
|
3482
3482
|
onFileUpload: s,
|
|
3483
|
-
removeFile:
|
|
3483
|
+
removeFile: p,
|
|
3484
3484
|
removeRejectedFile: d
|
|
3485
3485
|
} = Ia();
|
|
3486
|
-
return /* @__PURE__ */
|
|
3486
|
+
return /* @__PURE__ */ u(
|
|
3487
3487
|
Da,
|
|
3488
3488
|
{
|
|
3489
3489
|
accept: e,
|
|
@@ -3495,7 +3495,7 @@ const Ia = () => {
|
|
|
3495
3495
|
maxFiles: o,
|
|
3496
3496
|
maxSize: a,
|
|
3497
3497
|
onFileUpload: s,
|
|
3498
|
-
removeFile:
|
|
3498
|
+
removeFile: p,
|
|
3499
3499
|
removeRejectedFile: d
|
|
3500
3500
|
}
|
|
3501
3501
|
);
|
|
@@ -3522,45 +3522,45 @@ const Ia = () => {
|
|
|
3522
3522
|
footer: r,
|
|
3523
3523
|
sortFn: l = ni,
|
|
3524
3524
|
groupFn: s = Aa,
|
|
3525
|
-
...
|
|
3525
|
+
...p
|
|
3526
3526
|
}) => {
|
|
3527
|
-
const d =
|
|
3527
|
+
const d = re(
|
|
3528
3528
|
() => new Set(n.map((h) => h.value)),
|
|
3529
3529
|
[n]
|
|
3530
|
-
), f =
|
|
3530
|
+
), f = re(
|
|
3531
3531
|
() => new Set(t.map((h) => h.value)),
|
|
3532
3532
|
[t]
|
|
3533
|
-
), [g,
|
|
3533
|
+
), [g, c] = de(new Set(d));
|
|
3534
3534
|
Ce(() => {
|
|
3535
|
-
a &&
|
|
3535
|
+
a && c(new Set(d));
|
|
3536
3536
|
}, [a]);
|
|
3537
|
-
const m =
|
|
3537
|
+
const m = re(() => e.some((h) => h.group), [e]), v = re(
|
|
3538
3538
|
() => m ? s(e) : [{ group: "Ungrouped", items: e }],
|
|
3539
3539
|
[e, s]
|
|
3540
|
-
),
|
|
3541
|
-
const { checked: A, value:
|
|
3542
|
-
if (
|
|
3543
|
-
const x = A ? [...n,
|
|
3540
|
+
), F = (h) => {
|
|
3541
|
+
const { checked: A, value: P } = h.target, j = e.find((x) => `${x.value}` === P);
|
|
3542
|
+
if (j) {
|
|
3543
|
+
const x = A ? [...n, j] : n.filter((L) => `${L.value}` !== P) ?? [];
|
|
3544
3544
|
o(x);
|
|
3545
3545
|
}
|
|
3546
3546
|
};
|
|
3547
|
-
return /* @__PURE__ */
|
|
3547
|
+
return /* @__PURE__ */ u(Hn, { isVisible: a, className: "put-above", children: /* @__PURE__ */ B("div", { className: "multi-select__dropdown", role: "listbox", ...p, children: [
|
|
3548
3548
|
i || null,
|
|
3549
3549
|
v.map(({ group: h, items: A }) => /* @__PURE__ */ B("div", { className: "multi-select__group", children: [
|
|
3550
|
-
m ? /* @__PURE__ */
|
|
3551
|
-
/* @__PURE__ */
|
|
3550
|
+
m ? /* @__PURE__ */ u("h5", { className: "multi-select__dropdown-header", children: h }) : null,
|
|
3551
|
+
/* @__PURE__ */ u("ul", { className: "multi-select__dropdown-list", "aria-label": h, children: A.sort(l).sort($a(g)).map((P) => /* @__PURE__ */ u("li", { className: "multi-select__dropdown-item", children: /* @__PURE__ */ u(
|
|
3552
3552
|
Ai,
|
|
3553
3553
|
{
|
|
3554
|
-
disabled: f.has(
|
|
3555
|
-
label:
|
|
3556
|
-
checked: d.has(
|
|
3557
|
-
value:
|
|
3558
|
-
onChange:
|
|
3554
|
+
disabled: f.has(P.value),
|
|
3555
|
+
label: P.label,
|
|
3556
|
+
checked: d.has(P.value),
|
|
3557
|
+
value: P.value,
|
|
3558
|
+
onChange: F
|
|
3559
3559
|
},
|
|
3560
|
-
|
|
3561
|
-
) },
|
|
3560
|
+
P.value
|
|
3561
|
+
) }, P.value)) })
|
|
3562
3562
|
] }, h)),
|
|
3563
|
-
r ? /* @__PURE__ */
|
|
3563
|
+
r ? /* @__PURE__ */ u("div", { className: "multi-select__footer", children: r }) : null
|
|
3564
3564
|
] }) });
|
|
3565
3565
|
}, Wr = ({
|
|
3566
3566
|
disabled: e,
|
|
@@ -3572,102 +3572,102 @@ const Ia = () => {
|
|
|
3572
3572
|
items: r = [],
|
|
3573
3573
|
disabledItems: l = [],
|
|
3574
3574
|
dropdownHeader: s,
|
|
3575
|
-
dropdownFooter:
|
|
3575
|
+
dropdownFooter: p,
|
|
3576
3576
|
variant: d = "search"
|
|
3577
3577
|
}) => {
|
|
3578
3578
|
const f = Mi(() => {
|
|
3579
|
-
|
|
3579
|
+
c(!1), v("");
|
|
3580
3580
|
});
|
|
3581
3581
|
Oi(() => {
|
|
3582
|
-
|
|
3582
|
+
c(!1), v("");
|
|
3583
3583
|
});
|
|
3584
|
-
const [g,
|
|
3584
|
+
const [g, c] = de(!1), [m, v] = de("");
|
|
3585
3585
|
Ce(() => {
|
|
3586
3586
|
g || v("");
|
|
3587
3587
|
}, [g]);
|
|
3588
|
-
const [
|
|
3589
|
-
const Q = Array.from(new Set(
|
|
3588
|
+
const [F, h] = de([]), A = n || F, P = (z) => {
|
|
3589
|
+
const Q = Array.from(new Set(z));
|
|
3590
3590
|
h(Q), i && i(Q);
|
|
3591
|
-
},
|
|
3592
|
-
(
|
|
3593
|
-
).sort(ni).map((
|
|
3594
|
-
return /* @__PURE__ */
|
|
3595
|
-
d === "search" ? /* @__PURE__ */
|
|
3591
|
+
}, j = et(), x = et(), L = A.filter(
|
|
3592
|
+
(z) => r.some((Q) => Q.value === z.value)
|
|
3593
|
+
).sort(ni).map((z) => z.label).join(", ");
|
|
3594
|
+
return /* @__PURE__ */ u("div", { ref: f, children: /* @__PURE__ */ B("div", { className: "multi-select", children: [
|
|
3595
|
+
d === "search" ? /* @__PURE__ */ u(
|
|
3596
3596
|
jn,
|
|
3597
3597
|
{
|
|
3598
3598
|
externallyControlled: !0,
|
|
3599
|
-
"aria-controls":
|
|
3599
|
+
"aria-controls": j,
|
|
3600
3600
|
"aria-expanded": g,
|
|
3601
3601
|
id: x,
|
|
3602
3602
|
role: "combobox",
|
|
3603
3603
|
"aria-label": t || o || "Search",
|
|
3604
3604
|
disabled: e,
|
|
3605
3605
|
autoComplete: "off",
|
|
3606
|
-
onChange: (
|
|
3607
|
-
v(
|
|
3606
|
+
onChange: (z) => {
|
|
3607
|
+
v(z), c(!0);
|
|
3608
3608
|
},
|
|
3609
|
-
onFocus: () =>
|
|
3609
|
+
onFocus: () => c(!0),
|
|
3610
3610
|
placeholder: o ?? "Search",
|
|
3611
3611
|
required: a,
|
|
3612
3612
|
type: "text",
|
|
3613
3613
|
value: m,
|
|
3614
3614
|
className: "multi-select__input"
|
|
3615
3615
|
}
|
|
3616
|
-
) : /* @__PURE__ */
|
|
3616
|
+
) : /* @__PURE__ */ u(
|
|
3617
3617
|
"button",
|
|
3618
3618
|
{
|
|
3619
3619
|
role: "combobox",
|
|
3620
3620
|
type: "button",
|
|
3621
3621
|
"aria-label": t || o || "Select items",
|
|
3622
|
-
"aria-controls":
|
|
3622
|
+
"aria-controls": j,
|
|
3623
3623
|
"aria-expanded": g,
|
|
3624
3624
|
className: "multi-select__select-button",
|
|
3625
3625
|
onClick: () => {
|
|
3626
|
-
|
|
3626
|
+
c((z) => !z);
|
|
3627
3627
|
},
|
|
3628
|
-
children: /* @__PURE__ */
|
|
3628
|
+
children: /* @__PURE__ */ u("span", { className: "multi-select__condensed-text", children: A.length > 0 ? L : o ?? "Select items" })
|
|
3629
3629
|
}
|
|
3630
3630
|
),
|
|
3631
|
-
/* @__PURE__ */
|
|
3631
|
+
/* @__PURE__ */ u(
|
|
3632
3632
|
Ma,
|
|
3633
3633
|
{
|
|
3634
|
-
id:
|
|
3634
|
+
id: j,
|
|
3635
3635
|
isOpen: g,
|
|
3636
3636
|
items: m.length > 0 ? r.filter(
|
|
3637
|
-
(
|
|
3637
|
+
(z) => z.label.toLowerCase().includes(m.toLowerCase())
|
|
3638
3638
|
) : r,
|
|
3639
3639
|
selectedItems: A,
|
|
3640
3640
|
disabledItems: l,
|
|
3641
3641
|
header: s,
|
|
3642
|
-
updateItems:
|
|
3643
|
-
footer:
|
|
3644
|
-
/* @__PURE__ */
|
|
3642
|
+
updateItems: P,
|
|
3643
|
+
footer: p || /* @__PURE__ */ B(we, { children: [
|
|
3644
|
+
/* @__PURE__ */ u(
|
|
3645
3645
|
_e,
|
|
3646
3646
|
{
|
|
3647
3647
|
appearance: "link",
|
|
3648
3648
|
onClick: () => {
|
|
3649
|
-
const
|
|
3649
|
+
const z = r.filter(
|
|
3650
3650
|
(Q) => !l.some(
|
|
3651
|
-
(
|
|
3651
|
+
(J) => J.value === Q.value
|
|
3652
3652
|
)
|
|
3653
3653
|
);
|
|
3654
|
-
|
|
3654
|
+
P([...A, ...z]);
|
|
3655
3655
|
},
|
|
3656
3656
|
type: "button",
|
|
3657
3657
|
children: "Select all"
|
|
3658
3658
|
}
|
|
3659
3659
|
),
|
|
3660
|
-
/* @__PURE__ */
|
|
3660
|
+
/* @__PURE__ */ u(
|
|
3661
3661
|
_e,
|
|
3662
3662
|
{
|
|
3663
3663
|
appearance: "link",
|
|
3664
3664
|
onClick: () => {
|
|
3665
|
-
const
|
|
3665
|
+
const z = A.filter(
|
|
3666
3666
|
(Q) => l.some(
|
|
3667
|
-
(
|
|
3667
|
+
(J) => J.value === Q.value
|
|
3668
3668
|
)
|
|
3669
3669
|
);
|
|
3670
|
-
|
|
3670
|
+
P(z);
|
|
3671
3671
|
},
|
|
3672
3672
|
type: "button",
|
|
3673
3673
|
children: "Clear"
|
|
@@ -3685,20 +3685,20 @@ const Ia = () => {
|
|
|
3685
3685
|
children: n,
|
|
3686
3686
|
variant: t,
|
|
3687
3687
|
...i
|
|
3688
|
-
}) => /* @__PURE__ */
|
|
3688
|
+
}) => /* @__PURE__ */ u(ii.Provider, { value: { variant: t }, children: /* @__PURE__ */ u(
|
|
3689
3689
|
"table",
|
|
3690
3690
|
{
|
|
3691
3691
|
...i,
|
|
3692
|
-
className:
|
|
3692
|
+
className: G("p-table-dynamic", e, {
|
|
3693
3693
|
"is-full-height": t === "full-height"
|
|
3694
3694
|
}),
|
|
3695
3695
|
children: n
|
|
3696
3696
|
}
|
|
3697
|
-
) }), ja = ({ columns: e }) => /* @__PURE__ */
|
|
3697
|
+
) }), ja = ({ columns: e }) => /* @__PURE__ */ u(we, { children: Array.from({ length: 10 }, (n, t) => /* @__PURE__ */ u("tr", { "aria-hidden": "true", children: e.map((i, o) => /* @__PURE__ */ u(
|
|
3698
3698
|
"td",
|
|
3699
3699
|
{
|
|
3700
|
-
className:
|
|
3701
|
-
children: /* @__PURE__ */
|
|
3700
|
+
className: G(i.id, "u-text-overflow-clip"),
|
|
3701
|
+
children: /* @__PURE__ */ u(Bi, { isPending: !0, text: "XXXxxxx.xxxxxxxxx" })
|
|
3702
3702
|
},
|
|
3703
3703
|
o
|
|
3704
3704
|
)) }, t)) }), Ta = ({
|
|
@@ -3707,8 +3707,8 @@ const Ia = () => {
|
|
|
3707
3707
|
}) => {
|
|
3708
3708
|
const t = n ? n.getAllColumns() : Array.from({ length: 10 }).fill({ id: "" });
|
|
3709
3709
|
return /* @__PURE__ */ B(we, { children: [
|
|
3710
|
-
/* @__PURE__ */
|
|
3711
|
-
/* @__PURE__ */
|
|
3710
|
+
/* @__PURE__ */ u("caption", { className: "u-visually-hidden", children: "Loading..." }),
|
|
3711
|
+
/* @__PURE__ */ u(ai, { "aria-busy": "true", className: e, children: /* @__PURE__ */ u(ja, { columns: t }) })
|
|
3712
3712
|
] });
|
|
3713
3713
|
}, ai = ({
|
|
3714
3714
|
className: e,
|
|
@@ -3716,7 +3716,7 @@ const Ia = () => {
|
|
|
3716
3716
|
style: t,
|
|
3717
3717
|
...i
|
|
3718
3718
|
}) => {
|
|
3719
|
-
const { variant: o } =
|
|
3719
|
+
const { variant: o } = Nt(ii), a = be(null), [r, l] = de(null), s = X(() => {
|
|
3720
3720
|
var d, f;
|
|
3721
3721
|
if (window.innerWidth > Oa.small) {
|
|
3722
3722
|
const g = (f = (d = a.current) == null ? void 0 : d.getBoundingClientRect) == null ? void 0 : f.call(d).top;
|
|
@@ -3727,17 +3727,17 @@ const Ia = () => {
|
|
|
3727
3727
|
On(() => {
|
|
3728
3728
|
s();
|
|
3729
3729
|
}, [s]), Ce(() => (window.addEventListener("resize", s), () => window.removeEventListener("resize", s)), [s]);
|
|
3730
|
-
const
|
|
3730
|
+
const p = re(() => o === "full-height" && r ? {
|
|
3731
3731
|
height: `calc(100vh - ${r}px)`,
|
|
3732
3732
|
minHeight: `calc(100vh - ${r}px)`,
|
|
3733
3733
|
...t
|
|
3734
3734
|
} : t, [o, r, t]);
|
|
3735
|
-
return /* @__PURE__ */
|
|
3735
|
+
return /* @__PURE__ */ u(
|
|
3736
3736
|
"tbody",
|
|
3737
3737
|
{
|
|
3738
3738
|
className: e,
|
|
3739
3739
|
ref: a,
|
|
3740
|
-
style:
|
|
3740
|
+
style: p,
|
|
3741
3741
|
...i,
|
|
3742
3742
|
children: n
|
|
3743
3743
|
}
|
|
@@ -3745,7 +3745,7 @@ const Ia = () => {
|
|
|
3745
3745
|
};
|
|
3746
3746
|
oi.Body = ai;
|
|
3747
3747
|
oi.Loading = Ta;
|
|
3748
|
-
const ri = ({ children: e }) => /* @__PURE__ */
|
|
3748
|
+
const ri = ({ children: e }) => /* @__PURE__ */ u("caption", { children: /* @__PURE__ */ u("div", { className: "p-strip", children: e }) }), za = ({ children: e }) => /* @__PURE__ */ u("div", { className: "row", children: /* @__PURE__ */ u("div", { className: "col-start-large-4 u-align--left col-8 col-medium-4", children: /* @__PURE__ */ u("p", { className: "p-heading--4 u-no-margin--bottom", children: e }) }) }), Va = ({ children: e }) => /* @__PURE__ */ u("div", { className: "row", children: /* @__PURE__ */ u("div", { className: "u-align--left col-start-large-4 col-8 col-medium-4", children: /* @__PURE__ */ u("p", { children: e }) }) });
|
|
3749
3749
|
ri.Title = za;
|
|
3750
3750
|
ri.Description = Va;
|
|
3751
3751
|
/**
|
|
@@ -3761,7 +3761,7 @@ ri.Description = Va;
|
|
|
3761
3761
|
function Ee(e, n) {
|
|
3762
3762
|
return typeof e == "function" ? e(n) : e;
|
|
3763
3763
|
}
|
|
3764
|
-
function
|
|
3764
|
+
function me(e, n) {
|
|
3765
3765
|
return (t) => {
|
|
3766
3766
|
n.setState((i) => ({
|
|
3767
3767
|
...i,
|
|
@@ -3772,7 +3772,7 @@ function ve(e, n) {
|
|
|
3772
3772
|
function at(e) {
|
|
3773
3773
|
return e instanceof Function;
|
|
3774
3774
|
}
|
|
3775
|
-
function
|
|
3775
|
+
function La(e) {
|
|
3776
3776
|
return Array.isArray(e) && e.every((n) => typeof n == "number");
|
|
3777
3777
|
}
|
|
3778
3778
|
function li(e, n) {
|
|
@@ -3785,7 +3785,7 @@ function li(e, n) {
|
|
|
3785
3785
|
};
|
|
3786
3786
|
return i(e), t;
|
|
3787
3787
|
}
|
|
3788
|
-
function
|
|
3788
|
+
function M(e, n, t) {
|
|
3789
3789
|
let i = [], o;
|
|
3790
3790
|
return (a) => {
|
|
3791
3791
|
let r;
|
|
@@ -3794,14 +3794,14 @@ function O(e, n, t) {
|
|
|
3794
3794
|
if (!(l.length !== i.length || l.some((d, f) => i[f] !== d)))
|
|
3795
3795
|
return o;
|
|
3796
3796
|
i = l;
|
|
3797
|
-
let
|
|
3798
|
-
if (t.key && t.debug && (
|
|
3799
|
-
const d = Math.round((Date.now() - r) * 100) / 100, f = Math.round((Date.now() -
|
|
3797
|
+
let p;
|
|
3798
|
+
if (t.key && t.debug && (p = Date.now()), o = n(...l), t == null || t.onChange == null || t.onChange(o), t.key && t.debug && t != null && t.debug()) {
|
|
3799
|
+
const d = Math.round((Date.now() - r) * 100) / 100, f = Math.round((Date.now() - p) * 100) / 100, g = f / 16, c = (m, v) => {
|
|
3800
3800
|
for (m = String(m); m.length < v; )
|
|
3801
3801
|
m = " " + m;
|
|
3802
3802
|
return m;
|
|
3803
3803
|
};
|
|
3804
|
-
console.info(`%c⏱ ${
|
|
3804
|
+
console.info(`%c⏱ ${c(f, 5)} /${c(d, 5)} ms`, `
|
|
3805
3805
|
font-size: .6rem;
|
|
3806
3806
|
font-weight: bold;
|
|
3807
3807
|
color: hsl(${Math.max(0, Math.min(120 - 120 * g, 120))}deg 100% 31%);`, t == null ? void 0 : t.key);
|
|
@@ -3809,7 +3809,7 @@ function O(e, n, t) {
|
|
|
3809
3809
|
return o;
|
|
3810
3810
|
};
|
|
3811
3811
|
}
|
|
3812
|
-
function
|
|
3812
|
+
function O(e, n, t, i) {
|
|
3813
3813
|
return {
|
|
3814
3814
|
debug: () => {
|
|
3815
3815
|
var o;
|
|
@@ -3819,7 +3819,7 @@ function j(e, n, t, i) {
|
|
|
3819
3819
|
onChange: i
|
|
3820
3820
|
};
|
|
3821
3821
|
}
|
|
3822
|
-
function
|
|
3822
|
+
function Na(e, n, t, i) {
|
|
3823
3823
|
const o = () => {
|
|
3824
3824
|
var r;
|
|
3825
3825
|
return (r = a.getValue()) != null ? r : e.options.renderFallbackValue;
|
|
@@ -3829,14 +3829,14 @@ function La(e, n, t, i) {
|
|
|
3829
3829
|
column: t,
|
|
3830
3830
|
getValue: () => n.getValue(i),
|
|
3831
3831
|
renderValue: o,
|
|
3832
|
-
getContext:
|
|
3832
|
+
getContext: M(() => [e, t, n, a], (r, l, s, p) => ({
|
|
3833
3833
|
table: r,
|
|
3834
3834
|
column: l,
|
|
3835
3835
|
row: s,
|
|
3836
|
-
cell:
|
|
3837
|
-
getValue:
|
|
3838
|
-
renderValue:
|
|
3839
|
-
}),
|
|
3836
|
+
cell: p,
|
|
3837
|
+
getValue: p.getValue,
|
|
3838
|
+
renderValue: p.renderValue
|
|
3839
|
+
}), O(e.options, "debugCells", "cell.getContext"))
|
|
3840
3840
|
};
|
|
3841
3841
|
return e._features.forEach((r) => {
|
|
3842
3842
|
r.createCell == null || r.createCell(a, t, n, e);
|
|
@@ -3848,41 +3848,41 @@ function Ha(e, n, t, i) {
|
|
|
3848
3848
|
...e._getDefaultColumnDef(),
|
|
3849
3849
|
...n
|
|
3850
3850
|
}, s = l.accessorKey;
|
|
3851
|
-
let
|
|
3851
|
+
let p = (o = (a = l.id) != null ? a : s ? typeof String.prototype.replaceAll == "function" ? s.replaceAll(".", "_") : s.replace(/\./g, "_") : void 0) != null ? o : typeof l.header == "string" ? l.header : void 0, d;
|
|
3852
3852
|
if (l.accessorFn ? d = l.accessorFn : s && (s.includes(".") ? d = (g) => {
|
|
3853
|
-
let
|
|
3853
|
+
let c = g;
|
|
3854
3854
|
for (const v of s.split(".")) {
|
|
3855
3855
|
var m;
|
|
3856
|
-
|
|
3856
|
+
c = (m = c) == null ? void 0 : m[v], process.env.NODE_ENV !== "production" && c === void 0 && console.warn(`"${v}" in deeply nested key "${s}" returned undefined.`);
|
|
3857
3857
|
}
|
|
3858
|
-
return
|
|
3859
|
-
} : d = (g) => g[l.accessorKey]), !
|
|
3858
|
+
return c;
|
|
3859
|
+
} : d = (g) => g[l.accessorKey]), !p)
|
|
3860
3860
|
throw process.env.NODE_ENV !== "production" ? new Error(l.accessorFn ? "Columns require an id when using an accessorFn" : "Columns require an id when using a non-string header") : new Error();
|
|
3861
3861
|
let f = {
|
|
3862
|
-
id: `${String(
|
|
3862
|
+
id: `${String(p)}`,
|
|
3863
3863
|
accessorFn: d,
|
|
3864
3864
|
parent: i,
|
|
3865
3865
|
depth: t,
|
|
3866
3866
|
columnDef: l,
|
|
3867
3867
|
columns: [],
|
|
3868
|
-
getFlatColumns:
|
|
3868
|
+
getFlatColumns: M(() => [!0], () => {
|
|
3869
3869
|
var g;
|
|
3870
|
-
return [f, ...(g = f.columns) == null ? void 0 : g.flatMap((
|
|
3871
|
-
},
|
|
3872
|
-
getLeafColumns:
|
|
3873
|
-
var
|
|
3874
|
-
if ((
|
|
3870
|
+
return [f, ...(g = f.columns) == null ? void 0 : g.flatMap((c) => c.getFlatColumns())];
|
|
3871
|
+
}, O(e.options, "debugColumns", "column.getFlatColumns")),
|
|
3872
|
+
getLeafColumns: M(() => [e._getOrderColumnsFn()], (g) => {
|
|
3873
|
+
var c;
|
|
3874
|
+
if ((c = f.columns) != null && c.length) {
|
|
3875
3875
|
let m = f.columns.flatMap((v) => v.getLeafColumns());
|
|
3876
3876
|
return g(m);
|
|
3877
3877
|
}
|
|
3878
3878
|
return [f];
|
|
3879
|
-
},
|
|
3879
|
+
}, O(e.options, "debugColumns", "column.getLeafColumns"))
|
|
3880
3880
|
};
|
|
3881
3881
|
for (const g of e._features)
|
|
3882
3882
|
g.createColumn == null || g.createColumn(f, e);
|
|
3883
3883
|
return f;
|
|
3884
3884
|
}
|
|
3885
|
-
const
|
|
3885
|
+
const se = "debugHeaders";
|
|
3886
3886
|
function kn(e, n, t) {
|
|
3887
3887
|
var i;
|
|
3888
3888
|
let a = {
|
|
@@ -3914,85 +3914,85 @@ function kn(e, n, t) {
|
|
|
3914
3914
|
}
|
|
3915
3915
|
const qa = {
|
|
3916
3916
|
createTable: (e) => {
|
|
3917
|
-
e.getHeaderGroups =
|
|
3917
|
+
e.getHeaderGroups = M(() => [e.getAllColumns(), e.getVisibleLeafColumns(), e.getState().columnPinning.left, e.getState().columnPinning.right], (n, t, i, o) => {
|
|
3918
3918
|
var a, r;
|
|
3919
|
-
const l = (a = i == null ? void 0 : i.map((f) => t.find((g) => g.id === f)).filter(Boolean)) != null ? a : [], s = (r = o == null ? void 0 : o.map((f) => t.find((g) => g.id === f)).filter(Boolean)) != null ? r : [],
|
|
3920
|
-
return Xe(n, [...l, ...
|
|
3921
|
-
},
|
|
3919
|
+
const l = (a = i == null ? void 0 : i.map((f) => t.find((g) => g.id === f)).filter(Boolean)) != null ? a : [], s = (r = o == null ? void 0 : o.map((f) => t.find((g) => g.id === f)).filter(Boolean)) != null ? r : [], p = t.filter((f) => !(i != null && i.includes(f.id)) && !(o != null && o.includes(f.id)));
|
|
3920
|
+
return Xe(n, [...l, ...p, ...s], e);
|
|
3921
|
+
}, O(e.options, se, "getHeaderGroups")), e.getCenterHeaderGroups = M(() => [e.getAllColumns(), e.getVisibleLeafColumns(), e.getState().columnPinning.left, e.getState().columnPinning.right], (n, t, i, o) => (t = t.filter((a) => !(i != null && i.includes(a.id)) && !(o != null && o.includes(a.id))), Xe(n, t, e, "center")), O(e.options, se, "getCenterHeaderGroups")), e.getLeftHeaderGroups = M(() => [e.getAllColumns(), e.getVisibleLeafColumns(), e.getState().columnPinning.left], (n, t, i) => {
|
|
3922
3922
|
var o;
|
|
3923
3923
|
const a = (o = i == null ? void 0 : i.map((r) => t.find((l) => l.id === r)).filter(Boolean)) != null ? o : [];
|
|
3924
3924
|
return Xe(n, a, e, "left");
|
|
3925
|
-
},
|
|
3925
|
+
}, O(e.options, se, "getLeftHeaderGroups")), e.getRightHeaderGroups = M(() => [e.getAllColumns(), e.getVisibleLeafColumns(), e.getState().columnPinning.right], (n, t, i) => {
|
|
3926
3926
|
var o;
|
|
3927
3927
|
const a = (o = i == null ? void 0 : i.map((r) => t.find((l) => l.id === r)).filter(Boolean)) != null ? o : [];
|
|
3928
3928
|
return Xe(n, a, e, "right");
|
|
3929
|
-
},
|
|
3929
|
+
}, O(e.options, se, "getRightHeaderGroups")), e.getFooterGroups = M(() => [e.getHeaderGroups()], (n) => [...n].reverse(), O(e.options, se, "getFooterGroups")), e.getLeftFooterGroups = M(() => [e.getLeftHeaderGroups()], (n) => [...n].reverse(), O(e.options, se, "getLeftFooterGroups")), e.getCenterFooterGroups = M(() => [e.getCenterHeaderGroups()], (n) => [...n].reverse(), O(e.options, se, "getCenterFooterGroups")), e.getRightFooterGroups = M(() => [e.getRightHeaderGroups()], (n) => [...n].reverse(), O(e.options, se, "getRightFooterGroups")), e.getFlatHeaders = M(() => [e.getHeaderGroups()], (n) => n.map((t) => t.headers).flat(), O(e.options, se, "getFlatHeaders")), e.getLeftFlatHeaders = M(() => [e.getLeftHeaderGroups()], (n) => n.map((t) => t.headers).flat(), O(e.options, se, "getLeftFlatHeaders")), e.getCenterFlatHeaders = M(() => [e.getCenterHeaderGroups()], (n) => n.map((t) => t.headers).flat(), O(e.options, se, "getCenterFlatHeaders")), e.getRightFlatHeaders = M(() => [e.getRightHeaderGroups()], (n) => n.map((t) => t.headers).flat(), O(e.options, se, "getRightFlatHeaders")), e.getCenterLeafHeaders = M(() => [e.getCenterFlatHeaders()], (n) => n.filter((t) => {
|
|
3930
3930
|
var i;
|
|
3931
3931
|
return !((i = t.subHeaders) != null && i.length);
|
|
3932
|
-
}),
|
|
3932
|
+
}), O(e.options, se, "getCenterLeafHeaders")), e.getLeftLeafHeaders = M(() => [e.getLeftFlatHeaders()], (n) => n.filter((t) => {
|
|
3933
3933
|
var i;
|
|
3934
3934
|
return !((i = t.subHeaders) != null && i.length);
|
|
3935
|
-
}),
|
|
3935
|
+
}), O(e.options, se, "getLeftLeafHeaders")), e.getRightLeafHeaders = M(() => [e.getRightFlatHeaders()], (n) => n.filter((t) => {
|
|
3936
3936
|
var i;
|
|
3937
3937
|
return !((i = t.subHeaders) != null && i.length);
|
|
3938
|
-
}),
|
|
3939
|
-
var o, a, r, l, s,
|
|
3940
|
-
return [...(o = (a = n[0]) == null ? void 0 : a.headers) != null ? o : [], ...(r = (l = t[0]) == null ? void 0 : l.headers) != null ? r : [], ...(s = (
|
|
3941
|
-
},
|
|
3938
|
+
}), O(e.options, se, "getRightLeafHeaders")), e.getLeafHeaders = M(() => [e.getLeftHeaderGroups(), e.getCenterHeaderGroups(), e.getRightHeaderGroups()], (n, t, i) => {
|
|
3939
|
+
var o, a, r, l, s, p;
|
|
3940
|
+
return [...(o = (a = n[0]) == null ? void 0 : a.headers) != null ? o : [], ...(r = (l = t[0]) == null ? void 0 : l.headers) != null ? r : [], ...(s = (p = i[0]) == null ? void 0 : p.headers) != null ? s : []].map((d) => d.getLeafHeaders()).flat();
|
|
3941
|
+
}, O(e.options, se, "getLeafHeaders"));
|
|
3942
3942
|
}
|
|
3943
3943
|
};
|
|
3944
3944
|
function Xe(e, n, t, i) {
|
|
3945
3945
|
var o, a;
|
|
3946
3946
|
let r = 0;
|
|
3947
|
-
const l = function(g,
|
|
3948
|
-
|
|
3947
|
+
const l = function(g, c) {
|
|
3948
|
+
c === void 0 && (c = 1), r = Math.max(r, c), g.filter((m) => m.getIsVisible()).forEach((m) => {
|
|
3949
3949
|
var v;
|
|
3950
|
-
(v = m.columns) != null && v.length && l(m.columns,
|
|
3950
|
+
(v = m.columns) != null && v.length && l(m.columns, c + 1);
|
|
3951
3951
|
}, 0);
|
|
3952
3952
|
};
|
|
3953
3953
|
l(e);
|
|
3954
3954
|
let s = [];
|
|
3955
|
-
const
|
|
3955
|
+
const p = (g, c) => {
|
|
3956
3956
|
const m = {
|
|
3957
|
-
depth:
|
|
3958
|
-
id: [i, `${
|
|
3957
|
+
depth: c,
|
|
3958
|
+
id: [i, `${c}`].filter(Boolean).join("_"),
|
|
3959
3959
|
headers: []
|
|
3960
3960
|
}, v = [];
|
|
3961
|
-
g.forEach((
|
|
3962
|
-
const h = [...v].reverse()[0], A =
|
|
3963
|
-
let
|
|
3964
|
-
if (A &&
|
|
3965
|
-
h.subHeaders.push(
|
|
3961
|
+
g.forEach((F) => {
|
|
3962
|
+
const h = [...v].reverse()[0], A = F.column.depth === m.depth;
|
|
3963
|
+
let P, j = !1;
|
|
3964
|
+
if (A && F.column.parent ? P = F.column.parent : (P = F.column, j = !0), h && (h == null ? void 0 : h.column) === P)
|
|
3965
|
+
h.subHeaders.push(F);
|
|
3966
3966
|
else {
|
|
3967
|
-
const x = kn(t,
|
|
3968
|
-
id: [i,
|
|
3969
|
-
isPlaceholder:
|
|
3970
|
-
placeholderId:
|
|
3971
|
-
depth:
|
|
3967
|
+
const x = kn(t, P, {
|
|
3968
|
+
id: [i, c, P.id, F == null ? void 0 : F.id].filter(Boolean).join("_"),
|
|
3969
|
+
isPlaceholder: j,
|
|
3970
|
+
placeholderId: j ? `${v.filter((L) => L.column === P).length}` : void 0,
|
|
3971
|
+
depth: c,
|
|
3972
3972
|
index: v.length
|
|
3973
3973
|
});
|
|
3974
|
-
x.subHeaders.push(
|
|
3974
|
+
x.subHeaders.push(F), v.push(x);
|
|
3975
3975
|
}
|
|
3976
|
-
m.headers.push(
|
|
3977
|
-
}), s.push(m),
|
|
3978
|
-
}, d = n.map((g,
|
|
3976
|
+
m.headers.push(F), F.headerGroup = m;
|
|
3977
|
+
}), s.push(m), c > 0 && p(v, c - 1);
|
|
3978
|
+
}, d = n.map((g, c) => kn(t, g, {
|
|
3979
3979
|
depth: r,
|
|
3980
|
-
index:
|
|
3980
|
+
index: c
|
|
3981
3981
|
}));
|
|
3982
|
-
|
|
3982
|
+
p(d, r - 1), s.reverse();
|
|
3983
3983
|
const f = (g) => g.filter((m) => m.column.getIsVisible()).map((m) => {
|
|
3984
|
-
let v = 0,
|
|
3985
|
-
m.subHeaders && m.subHeaders.length ? (h = [], f(m.subHeaders).forEach((
|
|
3984
|
+
let v = 0, F = 0, h = [0];
|
|
3985
|
+
m.subHeaders && m.subHeaders.length ? (h = [], f(m.subHeaders).forEach((P) => {
|
|
3986
3986
|
let {
|
|
3987
|
-
colSpan:
|
|
3987
|
+
colSpan: j,
|
|
3988
3988
|
rowSpan: x
|
|
3989
|
-
} =
|
|
3990
|
-
v +=
|
|
3989
|
+
} = P;
|
|
3990
|
+
v += j, h.push(x);
|
|
3991
3991
|
})) : v = 1;
|
|
3992
3992
|
const A = Math.min(...h);
|
|
3993
|
-
return
|
|
3993
|
+
return F = F + A, m.colSpan = v, m.rowSpan = F, {
|
|
3994
3994
|
colSpan: v,
|
|
3995
|
-
rowSpan:
|
|
3995
|
+
rowSpan: F
|
|
3996
3996
|
};
|
|
3997
3997
|
});
|
|
3998
3998
|
return f((o = (a = s[0]) == null ? void 0 : a.headers) != null ? o : []), s;
|
|
@@ -4009,39 +4009,39 @@ const si = (e, n, t, i, o, a, r) => {
|
|
|
4009
4009
|
getValue: (s) => {
|
|
4010
4010
|
if (l._valuesCache.hasOwnProperty(s))
|
|
4011
4011
|
return l._valuesCache[s];
|
|
4012
|
-
const
|
|
4013
|
-
if (
|
|
4014
|
-
return l._valuesCache[s] =
|
|
4012
|
+
const p = e.getColumn(s);
|
|
4013
|
+
if (p != null && p.accessorFn)
|
|
4014
|
+
return l._valuesCache[s] = p.accessorFn(l.original, i), l._valuesCache[s];
|
|
4015
4015
|
},
|
|
4016
4016
|
getUniqueValues: (s) => {
|
|
4017
4017
|
if (l._uniqueValuesCache.hasOwnProperty(s))
|
|
4018
4018
|
return l._uniqueValuesCache[s];
|
|
4019
|
-
const
|
|
4020
|
-
if (
|
|
4021
|
-
return
|
|
4019
|
+
const p = e.getColumn(s);
|
|
4020
|
+
if (p != null && p.accessorFn)
|
|
4021
|
+
return p.columnDef.getUniqueValues ? (l._uniqueValuesCache[s] = p.columnDef.getUniqueValues(l.original, i), l._uniqueValuesCache[s]) : (l._uniqueValuesCache[s] = [l.getValue(s)], l._uniqueValuesCache[s]);
|
|
4022
4022
|
},
|
|
4023
4023
|
renderValue: (s) => {
|
|
4024
|
-
var
|
|
4025
|
-
return (
|
|
4024
|
+
var p;
|
|
4025
|
+
return (p = l.getValue(s)) != null ? p : e.options.renderFallbackValue;
|
|
4026
4026
|
},
|
|
4027
4027
|
subRows: a ?? [],
|
|
4028
4028
|
getLeafRows: () => li(l.subRows, (s) => s.subRows),
|
|
4029
4029
|
getParentRow: () => l.parentId ? e.getRow(l.parentId, !0) : void 0,
|
|
4030
4030
|
getParentRows: () => {
|
|
4031
|
-
let s = [],
|
|
4031
|
+
let s = [], p = l;
|
|
4032
4032
|
for (; ; ) {
|
|
4033
|
-
const d =
|
|
4033
|
+
const d = p.getParentRow();
|
|
4034
4034
|
if (!d) break;
|
|
4035
|
-
s.push(d),
|
|
4035
|
+
s.push(d), p = d;
|
|
4036
4036
|
}
|
|
4037
4037
|
return s.reverse();
|
|
4038
4038
|
},
|
|
4039
|
-
getAllCells:
|
|
4040
|
-
_getAllCellsByColumnId:
|
|
4039
|
+
getAllCells: M(() => [e.getAllLeafColumns()], (s) => s.map((p) => Na(e, l, p, p.id)), O(e.options, "debugRows", "getAllCells")),
|
|
4040
|
+
_getAllCellsByColumnId: M(() => [l.getAllCells()], (s) => s.reduce((p, d) => (p[d.column.id] = d, p), {}), O(e.options, "debugRows", "getAllCellsByColumnId"))
|
|
4041
4041
|
};
|
|
4042
4042
|
for (let s = 0; s < e._features.length; s++) {
|
|
4043
|
-
const
|
|
4044
|
-
|
|
4043
|
+
const p = e._features[s];
|
|
4044
|
+
p == null || p.createRow == null || p.createRow(l, e);
|
|
4045
4045
|
}
|
|
4046
4046
|
return l;
|
|
4047
4047
|
}, Ga = {
|
|
@@ -4123,7 +4123,7 @@ const Ba = {
|
|
|
4123
4123
|
...e
|
|
4124
4124
|
}),
|
|
4125
4125
|
getDefaultOptions: (e) => ({
|
|
4126
|
-
onColumnFiltersChange:
|
|
4126
|
+
onColumnFiltersChange: me("columnFilters", e),
|
|
4127
4127
|
filterFromLeafRows: !1,
|
|
4128
4128
|
maxLeafRowFilterDepth: 100
|
|
4129
4129
|
}),
|
|
@@ -4158,8 +4158,8 @@ const Ba = {
|
|
|
4158
4158
|
value: r
|
|
4159
4159
|
};
|
|
4160
4160
|
if (a) {
|
|
4161
|
-
var
|
|
4162
|
-
return (
|
|
4161
|
+
var p;
|
|
4162
|
+
return (p = i == null ? void 0 : i.map((d) => d.id === e.id ? s : d)) != null ? p : [];
|
|
4163
4163
|
}
|
|
4164
4164
|
return i != null && i.length ? [...i, s] : [s];
|
|
4165
4165
|
});
|
|
@@ -4223,7 +4223,7 @@ const Ua = (e, n, t) => t.reduce((i, o) => {
|
|
|
4223
4223
|
if (!n.length)
|
|
4224
4224
|
return;
|
|
4225
4225
|
const t = n.map((a) => a.getValue(e));
|
|
4226
|
-
if (!
|
|
4226
|
+
if (!La(t))
|
|
4227
4227
|
return;
|
|
4228
4228
|
if (t.length === 1)
|
|
4229
4229
|
return t[0];
|
|
@@ -4252,7 +4252,7 @@ const Ua = (e, n, t) => t.reduce((i, o) => {
|
|
|
4252
4252
|
...e
|
|
4253
4253
|
}),
|
|
4254
4254
|
getDefaultOptions: (e) => ({
|
|
4255
|
-
onGroupingChange:
|
|
4255
|
+
onGroupingChange: me("grouping", e),
|
|
4256
4256
|
groupedColumnMode: "reorder"
|
|
4257
4257
|
}),
|
|
4258
4258
|
createColumn: (e, n) => {
|
|
@@ -4318,15 +4318,15 @@ const ir = {
|
|
|
4318
4318
|
...e
|
|
4319
4319
|
}),
|
|
4320
4320
|
getDefaultOptions: (e) => ({
|
|
4321
|
-
onColumnOrderChange:
|
|
4321
|
+
onColumnOrderChange: me("columnOrder", e)
|
|
4322
4322
|
}),
|
|
4323
4323
|
createColumn: (e, n) => {
|
|
4324
|
-
e.getIndex =
|
|
4324
|
+
e.getIndex = M((t) => [Le(n, t)], (t) => t.findIndex((i) => i.id === e.id), O(n.options, "debugColumns", "getIndex")), e.getIsFirstColumn = (t) => {
|
|
4325
4325
|
var i;
|
|
4326
|
-
return ((i =
|
|
4326
|
+
return ((i = Le(n, t)[0]) == null ? void 0 : i.id) === e.id;
|
|
4327
4327
|
}, e.getIsLastColumn = (t) => {
|
|
4328
4328
|
var i;
|
|
4329
|
-
const o =
|
|
4329
|
+
const o = Le(n, t);
|
|
4330
4330
|
return ((i = o[o.length - 1]) == null ? void 0 : i.id) === e.id;
|
|
4331
4331
|
};
|
|
4332
4332
|
},
|
|
@@ -4334,20 +4334,20 @@ const ir = {
|
|
|
4334
4334
|
e.setColumnOrder = (n) => e.options.onColumnOrderChange == null ? void 0 : e.options.onColumnOrderChange(n), e.resetColumnOrder = (n) => {
|
|
4335
4335
|
var t;
|
|
4336
4336
|
e.setColumnOrder(n ? [] : (t = e.initialState.columnOrder) != null ? t : []);
|
|
4337
|
-
}, e._getOrderColumnsFn =
|
|
4337
|
+
}, e._getOrderColumnsFn = M(() => [e.getState().columnOrder, e.getState().grouping, e.options.groupedColumnMode], (n, t, i) => (o) => {
|
|
4338
4338
|
let a = [];
|
|
4339
4339
|
if (!(n != null && n.length))
|
|
4340
4340
|
a = o;
|
|
4341
4341
|
else {
|
|
4342
4342
|
const r = [...n], l = [...o];
|
|
4343
4343
|
for (; l.length && r.length; ) {
|
|
4344
|
-
const s = r.shift(),
|
|
4345
|
-
|
|
4344
|
+
const s = r.shift(), p = l.findIndex((d) => d.id === s);
|
|
4345
|
+
p > -1 && a.push(l.splice(p, 1)[0]);
|
|
4346
4346
|
}
|
|
4347
4347
|
a = [...a, ...l];
|
|
4348
4348
|
}
|
|
4349
4349
|
return nr(a, t, i);
|
|
4350
|
-
},
|
|
4350
|
+
}, O(e.options, "debugTable", "_getOrderColumnsFn"));
|
|
4351
4351
|
}
|
|
4352
4352
|
}, _t = () => ({
|
|
4353
4353
|
left: [],
|
|
@@ -4358,7 +4358,7 @@ const ir = {
|
|
|
4358
4358
|
...e
|
|
4359
4359
|
}),
|
|
4360
4360
|
getDefaultOptions: (e) => ({
|
|
4361
|
-
onColumnPinningChange:
|
|
4361
|
+
onColumnPinningChange: me("columnPinning", e)
|
|
4362
4362
|
}),
|
|
4363
4363
|
createColumn: (e, n) => {
|
|
4364
4364
|
e.pin = (t) => {
|
|
@@ -4373,9 +4373,9 @@ const ir = {
|
|
|
4373
4373
|
};
|
|
4374
4374
|
}
|
|
4375
4375
|
if (t === "left") {
|
|
4376
|
-
var
|
|
4376
|
+
var p, d;
|
|
4377
4377
|
return {
|
|
4378
|
-
left: [...((
|
|
4378
|
+
left: [...((p = o == null ? void 0 : o.left) != null ? p : []).filter((f) => !(i != null && i.includes(f))), ...i],
|
|
4379
4379
|
right: ((d = o == null ? void 0 : o.right) != null ? d : []).filter((f) => !(i != null && i.includes(f)))
|
|
4380
4380
|
};
|
|
4381
4381
|
}
|
|
@@ -4400,16 +4400,16 @@ const ir = {
|
|
|
4400
4400
|
};
|
|
4401
4401
|
},
|
|
4402
4402
|
createRow: (e, n) => {
|
|
4403
|
-
e.getCenterVisibleCells =
|
|
4403
|
+
e.getCenterVisibleCells = M(() => [e._getAllVisibleCells(), n.getState().columnPinning.left, n.getState().columnPinning.right], (t, i, o) => {
|
|
4404
4404
|
const a = [...i ?? [], ...o ?? []];
|
|
4405
4405
|
return t.filter((r) => !a.includes(r.column.id));
|
|
4406
|
-
},
|
|
4406
|
+
}, O(n.options, "debugRows", "getCenterVisibleCells")), e.getLeftVisibleCells = M(() => [e._getAllVisibleCells(), n.getState().columnPinning.left], (t, i) => (i ?? []).map((a) => t.find((r) => r.column.id === a)).filter(Boolean).map((a) => ({
|
|
4407
4407
|
...a,
|
|
4408
4408
|
position: "left"
|
|
4409
|
-
})),
|
|
4409
|
+
})), O(n.options, "debugRows", "getLeftVisibleCells")), e.getRightVisibleCells = M(() => [e._getAllVisibleCells(), n.getState().columnPinning.right], (t, i) => (i ?? []).map((a) => t.find((r) => r.column.id === a)).filter(Boolean).map((a) => ({
|
|
4410
4410
|
...a,
|
|
4411
4411
|
position: "right"
|
|
4412
|
-
})),
|
|
4412
|
+
})), O(n.options, "debugRows", "getRightVisibleCells"));
|
|
4413
4413
|
},
|
|
4414
4414
|
createTable: (e) => {
|
|
4415
4415
|
e.setColumnPinning = (n) => e.options.onColumnPinningChange == null ? void 0 : e.options.onColumnPinningChange(n), e.resetColumnPinning = (n) => {
|
|
@@ -4423,10 +4423,10 @@ const ir = {
|
|
|
4423
4423
|
return !!((o = i.left) != null && o.length || (a = i.right) != null && a.length);
|
|
4424
4424
|
}
|
|
4425
4425
|
return !!((t = i[n]) != null && t.length);
|
|
4426
|
-
}, e.getLeftLeafColumns =
|
|
4426
|
+
}, e.getLeftLeafColumns = M(() => [e.getAllLeafColumns(), e.getState().columnPinning.left], (n, t) => (t ?? []).map((i) => n.find((o) => o.id === i)).filter(Boolean), O(e.options, "debugColumns", "getLeftLeafColumns")), e.getRightLeafColumns = M(() => [e.getAllLeafColumns(), e.getState().columnPinning.right], (n, t) => (t ?? []).map((i) => n.find((o) => o.id === i)).filter(Boolean), O(e.options, "debugColumns", "getRightLeafColumns")), e.getCenterLeafColumns = M(() => [e.getAllLeafColumns(), e.getState().columnPinning.left, e.getState().columnPinning.right], (n, t, i) => {
|
|
4427
4427
|
const o = [...t ?? [], ...i ?? []];
|
|
4428
4428
|
return n.filter((a) => !o.includes(a.id));
|
|
4429
|
-
},
|
|
4429
|
+
}, O(e.options, "debugColumns", "getCenterLeafColumns"));
|
|
4430
4430
|
}
|
|
4431
4431
|
}, Qe = {
|
|
4432
4432
|
size: 150,
|
|
@@ -4449,15 +4449,15 @@ const ir = {
|
|
|
4449
4449
|
getDefaultOptions: (e) => ({
|
|
4450
4450
|
columnResizeMode: "onEnd",
|
|
4451
4451
|
columnResizeDirection: "ltr",
|
|
4452
|
-
onColumnSizingChange:
|
|
4453
|
-
onColumnSizingInfoChange:
|
|
4452
|
+
onColumnSizingChange: me("columnSizing", e),
|
|
4453
|
+
onColumnSizingInfoChange: me("columnSizingInfo", e)
|
|
4454
4454
|
}),
|
|
4455
4455
|
createColumn: (e, n) => {
|
|
4456
4456
|
e.getSize = () => {
|
|
4457
4457
|
var t, i, o;
|
|
4458
4458
|
const a = n.getState().columnSizing[e.id];
|
|
4459
4459
|
return Math.min(Math.max((t = e.columnDef.minSize) != null ? t : Qe.minSize, (i = a ?? e.columnDef.size) != null ? i : Qe.size), (o = e.columnDef.maxSize) != null ? o : Qe.maxSize);
|
|
4460
|
-
}, e.getStart =
|
|
4460
|
+
}, e.getStart = M((t) => [t, Le(n, t), n.getState().columnSizing], (t, i) => i.slice(0, e.getIndex(t)).reduce((o, a) => o + a.getSize(), 0), O(n.options, "debugColumns", "getStart")), e.getAfter = M((t) => [t, Le(n, t), n.getState().columnSizing], (t, i) => i.slice(e.getIndex(t) + 1).reduce((o, a) => o + a.getSize(), 0), O(n.options, "debugColumns", "getAfter")), e.resetSize = () => {
|
|
4461
4461
|
n.setColumnSizing((t) => {
|
|
4462
4462
|
let {
|
|
4463
4463
|
[e.id]: i,
|
|
@@ -4493,21 +4493,21 @@ const ir = {
|
|
|
4493
4493
|
return (a) => {
|
|
4494
4494
|
if (!i || !o || (a.persist == null || a.persist(), Et(a) && a.touches && a.touches.length > 1))
|
|
4495
4495
|
return;
|
|
4496
|
-
const r = e.getSize(), l = e ? e.getLeafHeaders().map((h) => [h.column.id, h.column.getSize()]) : [[i.id, i.getSize()]], s = Et(a) ? Math.round(a.touches[0].clientX) : a.clientX,
|
|
4497
|
-
typeof A == "number" && (n.setColumnSizingInfo((
|
|
4498
|
-
var
|
|
4499
|
-
const
|
|
4500
|
-
return
|
|
4501
|
-
let [
|
|
4502
|
-
|
|
4496
|
+
const r = e.getSize(), l = e ? e.getLeafHeaders().map((h) => [h.column.id, h.column.getSize()]) : [[i.id, i.getSize()]], s = Et(a) ? Math.round(a.touches[0].clientX) : a.clientX, p = {}, d = (h, A) => {
|
|
4497
|
+
typeof A == "number" && (n.setColumnSizingInfo((P) => {
|
|
4498
|
+
var j, x;
|
|
4499
|
+
const L = n.options.columnResizeDirection === "rtl" ? -1 : 1, z = (A - ((j = P == null ? void 0 : P.startOffset) != null ? j : 0)) * L, Q = Math.max(z / ((x = P == null ? void 0 : P.startSize) != null ? x : 0), -0.999999);
|
|
4500
|
+
return P.columnSizingStart.forEach((J) => {
|
|
4501
|
+
let [ce, ue] = J;
|
|
4502
|
+
p[ce] = Math.round(Math.max(ue + ue * Q, 0) * 100) / 100;
|
|
4503
4503
|
}), {
|
|
4504
|
-
...
|
|
4505
|
-
deltaOffset:
|
|
4504
|
+
...P,
|
|
4505
|
+
deltaOffset: z,
|
|
4506
4506
|
deltaPercentage: Q
|
|
4507
4507
|
};
|
|
4508
|
-
}), (n.options.columnResizeMode === "onChange" || h === "end") && n.setColumnSizing((
|
|
4509
|
-
...
|
|
4510
|
-
...
|
|
4508
|
+
}), (n.options.columnResizeMode === "onChange" || h === "end") && n.setColumnSizing((P) => ({
|
|
4509
|
+
...P,
|
|
4510
|
+
...p
|
|
4511
4511
|
})));
|
|
4512
4512
|
}, f = (h) => d("move", h), g = (h) => {
|
|
4513
4513
|
d("end", h), n.setColumnSizingInfo((A) => ({
|
|
@@ -4519,21 +4519,21 @@ const ir = {
|
|
|
4519
4519
|
deltaPercentage: null,
|
|
4520
4520
|
columnSizingStart: []
|
|
4521
4521
|
}));
|
|
4522
|
-
},
|
|
4522
|
+
}, c = t || typeof document < "u" ? document : null, m = {
|
|
4523
4523
|
moveHandler: (h) => f(h.clientX),
|
|
4524
4524
|
upHandler: (h) => {
|
|
4525
|
-
|
|
4525
|
+
c == null || c.removeEventListener("mousemove", m.moveHandler), c == null || c.removeEventListener("mouseup", m.upHandler), g(h.clientX);
|
|
4526
4526
|
}
|
|
4527
4527
|
}, v = {
|
|
4528
4528
|
moveHandler: (h) => (h.cancelable && (h.preventDefault(), h.stopPropagation()), f(h.touches[0].clientX), !1),
|
|
4529
4529
|
upHandler: (h) => {
|
|
4530
4530
|
var A;
|
|
4531
|
-
|
|
4531
|
+
c == null || c.removeEventListener("touchmove", v.moveHandler), c == null || c.removeEventListener("touchend", v.upHandler), h.cancelable && (h.preventDefault(), h.stopPropagation()), g((A = h.touches[0]) == null ? void 0 : A.clientX);
|
|
4532
4532
|
}
|
|
4533
|
-
},
|
|
4533
|
+
}, F = rr() ? {
|
|
4534
4534
|
passive: !1
|
|
4535
4535
|
} : !1;
|
|
4536
|
-
Et(a) ? (
|
|
4536
|
+
Et(a) ? (c == null || c.addEventListener("touchmove", v.moveHandler, F), c == null || c.addEventListener("touchend", v.upHandler, F)) : (c == null || c.addEventListener("mousemove", m.moveHandler, F), c == null || c.addEventListener("mouseup", m.upHandler, F)), n.setColumnSizingInfo((h) => ({
|
|
4537
4537
|
...h,
|
|
4538
4538
|
startOffset: s,
|
|
4539
4539
|
startSize: r,
|
|
@@ -4593,7 +4593,7 @@ const lr = {
|
|
|
4593
4593
|
...e
|
|
4594
4594
|
}),
|
|
4595
4595
|
getDefaultOptions: (e) => ({
|
|
4596
|
-
onColumnVisibilityChange:
|
|
4596
|
+
onColumnVisibilityChange: me("columnVisibility", e)
|
|
4597
4597
|
}),
|
|
4598
4598
|
createColumn: (e, n) => {
|
|
4599
4599
|
e.toggleVisibility = (t) => {
|
|
@@ -4613,10 +4613,10 @@ const lr = {
|
|
|
4613
4613
|
};
|
|
4614
4614
|
},
|
|
4615
4615
|
createRow: (e, n) => {
|
|
4616
|
-
e._getAllVisibleCells =
|
|
4616
|
+
e._getAllVisibleCells = M(() => [e.getAllCells(), n.getState().columnVisibility], (t) => t.filter((i) => i.column.getIsVisible()), O(n.options, "debugRows", "_getAllVisibleCells")), e.getVisibleCells = M(() => [e.getLeftVisibleCells(), e.getCenterVisibleCells(), e.getRightVisibleCells()], (t, i, o) => [...t, ...i, ...o], O(n.options, "debugRows", "getVisibleCells"));
|
|
4617
4617
|
},
|
|
4618
4618
|
createTable: (e) => {
|
|
4619
|
-
const n = (t, i) =>
|
|
4619
|
+
const n = (t, i) => M(() => [i(), i().filter((o) => o.getIsVisible()).map((o) => o.id).join("_")], (o) => o.filter((a) => a.getIsVisible == null ? void 0 : a.getIsVisible()), O(e.options, "debugColumns", t));
|
|
4620
4620
|
e.getVisibleFlatColumns = n("getVisibleFlatColumns", () => e.getAllFlatColumns()), e.getVisibleLeafColumns = n("getVisibleLeafColumns", () => e.getAllLeafColumns()), e.getLeftVisibleLeafColumns = n("getLeftVisibleLeafColumns", () => e.getLeftLeafColumns()), e.getRightVisibleLeafColumns = n("getRightVisibleLeafColumns", () => e.getRightLeafColumns()), e.getCenterVisibleLeafColumns = n("getCenterVisibleLeafColumns", () => e.getCenterLeafColumns()), e.setColumnVisibility = (t) => e.options.onColumnVisibilityChange == null ? void 0 : e.options.onColumnVisibilityChange(t), e.resetColumnVisibility = (t) => {
|
|
4621
4621
|
var i;
|
|
4622
4622
|
e.setColumnVisibility(t ? {} : (i = e.initialState.columnVisibility) != null ? i : {});
|
|
@@ -4632,7 +4632,7 @@ const lr = {
|
|
|
4632
4632
|
};
|
|
4633
4633
|
}
|
|
4634
4634
|
};
|
|
4635
|
-
function
|
|
4635
|
+
function Le(e, n) {
|
|
4636
4636
|
return n ? n === "center" ? e.getCenterVisibleLeafColumns() : n === "left" ? e.getLeftVisibleLeafColumns() : e.getRightVisibleLeafColumns() : e.getVisibleLeafColumns();
|
|
4637
4637
|
}
|
|
4638
4638
|
const sr = {
|
|
@@ -4648,7 +4648,7 @@ const sr = {
|
|
|
4648
4648
|
...e
|
|
4649
4649
|
}),
|
|
4650
4650
|
getDefaultOptions: (e) => ({
|
|
4651
|
-
onGlobalFilterChange:
|
|
4651
|
+
onGlobalFilterChange: me("globalFilter", e),
|
|
4652
4652
|
globalFilterFn: "auto",
|
|
4653
4653
|
getColumnCanGlobalFilter: (n) => {
|
|
4654
4654
|
var t;
|
|
@@ -4681,7 +4681,7 @@ const sr = {
|
|
|
4681
4681
|
...e
|
|
4682
4682
|
}),
|
|
4683
4683
|
getDefaultOptions: (e) => ({
|
|
4684
|
-
onExpandedChange:
|
|
4684
|
+
onExpandedChange: me("expanded", e),
|
|
4685
4685
|
paginateExpandedRows: !0
|
|
4686
4686
|
}),
|
|
4687
4687
|
createTable: (e) => {
|
|
@@ -4774,7 +4774,7 @@ const sr = {
|
|
|
4774
4774
|
}
|
|
4775
4775
|
}),
|
|
4776
4776
|
getDefaultOptions: (e) => ({
|
|
4777
|
-
onPaginationChange:
|
|
4777
|
+
onPaginationChange: me("pagination", e)
|
|
4778
4778
|
}),
|
|
4779
4779
|
createTable: (e) => {
|
|
4780
4780
|
let n = !1, t = !1;
|
|
@@ -4829,10 +4829,10 @@ const sr = {
|
|
|
4829
4829
|
...o,
|
|
4830
4830
|
pageCount: r
|
|
4831
4831
|
};
|
|
4832
|
-
}), e.getPageOptions =
|
|
4832
|
+
}), e.getPageOptions = M(() => [e.getPageCount()], (i) => {
|
|
4833
4833
|
let o = [];
|
|
4834
4834
|
return i && i > 0 && (o = [...new Array(i)].fill(null).map((a, r) => r)), o;
|
|
4835
|
-
},
|
|
4835
|
+
}, O(e.options, "debugTable", "getPageOptions")), e.getCanPreviousPage = () => e.getState().pagination.pageIndex > 0, e.getCanNextPage = () => {
|
|
4836
4836
|
const {
|
|
4837
4837
|
pageIndex: i
|
|
4838
4838
|
} = e.getState().pagination, o = e.getPageCount();
|
|
@@ -4854,23 +4854,23 @@ const sr = {
|
|
|
4854
4854
|
...e
|
|
4855
4855
|
}),
|
|
4856
4856
|
getDefaultOptions: (e) => ({
|
|
4857
|
-
onRowPinningChange:
|
|
4857
|
+
onRowPinningChange: me("rowPinning", e)
|
|
4858
4858
|
}),
|
|
4859
4859
|
createRow: (e, n) => {
|
|
4860
4860
|
e.pin = (t, i, o) => {
|
|
4861
4861
|
const a = i ? e.getLeafRows().map((s) => {
|
|
4862
4862
|
let {
|
|
4863
|
-
id:
|
|
4863
|
+
id: p
|
|
4864
4864
|
} = s;
|
|
4865
|
-
return
|
|
4865
|
+
return p;
|
|
4866
4866
|
}) : [], r = o ? e.getParentRows().map((s) => {
|
|
4867
4867
|
let {
|
|
4868
|
-
id:
|
|
4868
|
+
id: p
|
|
4869
4869
|
} = s;
|
|
4870
|
-
return
|
|
4870
|
+
return p;
|
|
4871
4871
|
}) : [], l = /* @__PURE__ */ new Set([...r, e.id, ...a]);
|
|
4872
4872
|
n.setRowPinning((s) => {
|
|
4873
|
-
var
|
|
4873
|
+
var p, d;
|
|
4874
4874
|
if (t === "bottom") {
|
|
4875
4875
|
var f, g;
|
|
4876
4876
|
return {
|
|
@@ -4879,14 +4879,14 @@ const sr = {
|
|
|
4879
4879
|
};
|
|
4880
4880
|
}
|
|
4881
4881
|
if (t === "top") {
|
|
4882
|
-
var
|
|
4882
|
+
var c, m;
|
|
4883
4883
|
return {
|
|
4884
|
-
top: [...((
|
|
4884
|
+
top: [...((c = s == null ? void 0 : s.top) != null ? c : []).filter((v) => !(l != null && l.has(v))), ...Array.from(l)],
|
|
4885
4885
|
bottom: ((m = s == null ? void 0 : s.bottom) != null ? m : []).filter((v) => !(l != null && l.has(v)))
|
|
4886
4886
|
};
|
|
4887
4887
|
}
|
|
4888
4888
|
return {
|
|
4889
|
-
top: ((
|
|
4889
|
+
top: ((p = s == null ? void 0 : s.top) != null ? p : []).filter((v) => !(l != null && l.has(v))),
|
|
4890
4890
|
bottom: ((d = s == null ? void 0 : s.bottom) != null ? d : []).filter((v) => !(l != null && l.has(v)))
|
|
4891
4891
|
};
|
|
4892
4892
|
});
|
|
@@ -4944,10 +4944,10 @@ const sr = {
|
|
|
4944
4944
|
...r,
|
|
4945
4945
|
position: i
|
|
4946
4946
|
}));
|
|
4947
|
-
}, e.getTopRows =
|
|
4947
|
+
}, e.getTopRows = M(() => [e.getRowModel().rows, e.getState().rowPinning.top], (n, t) => e._getPinnedRows(n, t, "top"), O(e.options, "debugRows", "getTopRows")), e.getBottomRows = M(() => [e.getRowModel().rows, e.getState().rowPinning.bottom], (n, t) => e._getPinnedRows(n, t, "bottom"), O(e.options, "debugRows", "getBottomRows")), e.getCenterRows = M(() => [e.getRowModel().rows, e.getState().rowPinning.top, e.getState().rowPinning.bottom], (n, t, i) => {
|
|
4948
4948
|
const o = /* @__PURE__ */ new Set([...t ?? [], ...i ?? []]);
|
|
4949
4949
|
return n.filter((a) => !o.has(a.id));
|
|
4950
|
-
},
|
|
4950
|
+
}, O(e.options, "debugRows", "getCenterRows"));
|
|
4951
4951
|
}
|
|
4952
4952
|
}, gr = {
|
|
4953
4953
|
getInitialState: (e) => ({
|
|
@@ -4955,7 +4955,7 @@ const sr = {
|
|
|
4955
4955
|
...e
|
|
4956
4956
|
}),
|
|
4957
4957
|
getDefaultOptions: (e) => ({
|
|
4958
|
-
onRowSelectionChange:
|
|
4958
|
+
onRowSelectionChange: me("rowSelection", e),
|
|
4959
4959
|
enableRowSelection: !0,
|
|
4960
4960
|
enableMultiRowSelection: !0,
|
|
4961
4961
|
enableSubRowSelection: !0
|
|
@@ -4986,19 +4986,19 @@ const sr = {
|
|
|
4986
4986
|
return e.getRowModel().rows.forEach((a) => {
|
|
4987
4987
|
zt(o, a.id, i, !0, e);
|
|
4988
4988
|
}), o;
|
|
4989
|
-
}), e.getPreSelectedRowModel = () => e.getCoreRowModel(), e.getSelectedRowModel =
|
|
4989
|
+
}), e.getPreSelectedRowModel = () => e.getCoreRowModel(), e.getSelectedRowModel = M(() => [e.getState().rowSelection, e.getCoreRowModel()], (n, t) => Object.keys(n).length ? Pt(e, t) : {
|
|
4990
4990
|
rows: [],
|
|
4991
4991
|
flatRows: [],
|
|
4992
4992
|
rowsById: {}
|
|
4993
|
-
},
|
|
4993
|
+
}, O(e.options, "debugTable", "getSelectedRowModel")), e.getFilteredSelectedRowModel = M(() => [e.getState().rowSelection, e.getFilteredRowModel()], (n, t) => Object.keys(n).length ? Pt(e, t) : {
|
|
4994
4994
|
rows: [],
|
|
4995
4995
|
flatRows: [],
|
|
4996
4996
|
rowsById: {}
|
|
4997
|
-
},
|
|
4997
|
+
}, O(e.options, "debugTable", "getFilteredSelectedRowModel")), e.getGroupedSelectedRowModel = M(() => [e.getState().rowSelection, e.getSortedRowModel()], (n, t) => Object.keys(n).length ? Pt(e, t) : {
|
|
4998
4998
|
rows: [],
|
|
4999
4999
|
flatRows: [],
|
|
5000
5000
|
rowsById: {}
|
|
5001
|
-
},
|
|
5001
|
+
}, O(e.options, "debugTable", "getGroupedSelectedRowModel")), e.getIsAllRowsSelected = () => {
|
|
5002
5002
|
const n = e.getFilteredRowModel().flatRows, {
|
|
5003
5003
|
rowSelection: t
|
|
5004
5004
|
} = e.getState();
|
|
@@ -5075,9 +5075,9 @@ const sr = {
|
|
|
5075
5075
|
function Pt(e, n) {
|
|
5076
5076
|
const t = e.getState().rowSelection, i = [], o = {}, a = function(r, l) {
|
|
5077
5077
|
return r.map((s) => {
|
|
5078
|
-
var
|
|
5078
|
+
var p;
|
|
5079
5079
|
const d = Xt(s, t);
|
|
5080
|
-
if (d && (i.push(s), o[s.id] = s), (
|
|
5080
|
+
if (d && (i.push(s), o[s.id] = s), (p = s.subRows) != null && p.length && (s = {
|
|
5081
5081
|
...s,
|
|
5082
5082
|
subRows: a(s.subRows)
|
|
5083
5083
|
}), d)
|
|
@@ -5105,7 +5105,7 @@ function Vt(e, n, t) {
|
|
|
5105
5105
|
}
|
|
5106
5106
|
}), o ? "all" : a ? "some" : !1;
|
|
5107
5107
|
}
|
|
5108
|
-
const
|
|
5108
|
+
const Lt = /([0-9]+)/gm, fr = (e, n, t) => xi(ke(e.getValue(t)).toLowerCase(), ke(n.getValue(t)).toLowerCase()), mr = (e, n, t) => xi(ke(e.getValue(t)), ke(n.getValue(t))), vr = (e, n, t) => Qt(ke(e.getValue(t)).toLowerCase(), ke(n.getValue(t)).toLowerCase()), xr = (e, n, t) => Qt(ke(e.getValue(t)), ke(n.getValue(t))), hr = (e, n, t) => {
|
|
5109
5109
|
const i = e.getValue(t), o = n.getValue(t);
|
|
5110
5110
|
return i > o ? 1 : i < o ? -1 : 0;
|
|
5111
5111
|
}, wr = (e, n, t) => Qt(e.getValue(t), n.getValue(t));
|
|
@@ -5116,7 +5116,7 @@ function ke(e) {
|
|
|
5116
5116
|
return typeof e == "number" ? isNaN(e) || e === 1 / 0 || e === -1 / 0 ? "" : String(e) : typeof e == "string" ? e : "";
|
|
5117
5117
|
}
|
|
5118
5118
|
function xi(e, n) {
|
|
5119
|
-
const t = e.split(
|
|
5119
|
+
const t = e.split(Lt).filter(Boolean), i = n.split(Lt).filter(Boolean);
|
|
5120
5120
|
for (; t.length && i.length; ) {
|
|
5121
5121
|
const o = t.shift(), a = i.shift(), r = parseInt(o, 10), l = parseInt(a, 10), s = [r, l].sort();
|
|
5122
5122
|
if (isNaN(s[0])) {
|
|
@@ -5152,7 +5152,7 @@ const Ve = {
|
|
|
5152
5152
|
sortUndefined: 1
|
|
5153
5153
|
}),
|
|
5154
5154
|
getDefaultOptions: (e) => ({
|
|
5155
|
-
onSortingChange:
|
|
5155
|
+
onSortingChange: me("sorting", e),
|
|
5156
5156
|
isMultiSortEvent: (n) => n.shiftKey
|
|
5157
5157
|
}),
|
|
5158
5158
|
createColumn: (e, n) => {
|
|
@@ -5163,7 +5163,7 @@ const Ve = {
|
|
|
5163
5163
|
const a = o == null ? void 0 : o.getValue(e.id);
|
|
5164
5164
|
if (Object.prototype.toString.call(a) === "[object Date]")
|
|
5165
5165
|
return Ve.datetime;
|
|
5166
|
-
if (typeof a == "string" && (i = !0, a.split(
|
|
5166
|
+
if (typeof a == "string" && (i = !0, a.split(Lt).length > 1))
|
|
5167
5167
|
return Ve.alphanumeric;
|
|
5168
5168
|
}
|
|
5169
5169
|
return i ? Ve.text : Ve.basic;
|
|
@@ -5178,22 +5178,22 @@ const Ve = {
|
|
|
5178
5178
|
}, e.toggleSorting = (t, i) => {
|
|
5179
5179
|
const o = e.getNextSortingOrder(), a = typeof t < "u" && t !== null;
|
|
5180
5180
|
n.setSorting((r) => {
|
|
5181
|
-
const l = r == null ? void 0 : r.find((
|
|
5182
|
-
let
|
|
5181
|
+
const l = r == null ? void 0 : r.find((c) => c.id === e.id), s = r == null ? void 0 : r.findIndex((c) => c.id === e.id);
|
|
5182
|
+
let p = [], d, f = a ? t : o === "desc";
|
|
5183
5183
|
if (r != null && r.length && e.getCanMultiSort() && i ? l ? d = "toggle" : d = "add" : r != null && r.length && s !== r.length - 1 ? d = "replace" : l ? d = "toggle" : d = "replace", d === "toggle" && (a || o || (d = "remove")), d === "add") {
|
|
5184
5184
|
var g;
|
|
5185
|
-
|
|
5185
|
+
p = [...r, {
|
|
5186
5186
|
id: e.id,
|
|
5187
5187
|
desc: f
|
|
5188
|
-
}],
|
|
5189
|
-
} else d === "toggle" ?
|
|
5190
|
-
...
|
|
5188
|
+
}], p.splice(0, p.length - ((g = n.options.maxMultiSortColCount) != null ? g : Number.MAX_SAFE_INTEGER));
|
|
5189
|
+
} else d === "toggle" ? p = r.map((c) => c.id === e.id ? {
|
|
5190
|
+
...c,
|
|
5191
5191
|
desc: f
|
|
5192
|
-
} :
|
|
5192
|
+
} : c) : d === "remove" ? p = r.filter((c) => c.id !== e.id) : p = [{
|
|
5193
5193
|
id: e.id,
|
|
5194
5194
|
desc: f
|
|
5195
5195
|
}];
|
|
5196
|
-
return
|
|
5196
|
+
return p;
|
|
5197
5197
|
});
|
|
5198
5198
|
}, e.getFirstSortDir = () => {
|
|
5199
5199
|
var t, i;
|
|
@@ -5258,7 +5258,7 @@ function Sr(e) {
|
|
|
5258
5258
|
let o = {
|
|
5259
5259
|
_features: i
|
|
5260
5260
|
};
|
|
5261
|
-
const a = o._features.reduce((g,
|
|
5261
|
+
const a = o._features.reduce((g, c) => Object.assign(g, c.getDefaultOptions == null ? void 0 : c.getDefaultOptions(o)), {}), r = (g) => o.options.mergeOptions ? o.options.mergeOptions(a, g) : {
|
|
5262
5262
|
...a,
|
|
5263
5263
|
...g
|
|
5264
5264
|
};
|
|
@@ -5267,10 +5267,10 @@ function Sr(e) {
|
|
|
5267
5267
|
...(t = e.initialState) != null ? t : {}
|
|
5268
5268
|
};
|
|
5269
5269
|
o._features.forEach((g) => {
|
|
5270
|
-
var
|
|
5271
|
-
s = (
|
|
5270
|
+
var c;
|
|
5271
|
+
s = (c = g.getInitialState == null ? void 0 : g.getInitialState(s)) != null ? c : s;
|
|
5272
5272
|
});
|
|
5273
|
-
const
|
|
5273
|
+
const p = [];
|
|
5274
5274
|
let d = !1;
|
|
5275
5275
|
const f = {
|
|
5276
5276
|
_features: i,
|
|
@@ -5280,86 +5280,86 @@ function Sr(e) {
|
|
|
5280
5280
|
},
|
|
5281
5281
|
initialState: s,
|
|
5282
5282
|
_queue: (g) => {
|
|
5283
|
-
|
|
5284
|
-
for (;
|
|
5285
|
-
|
|
5283
|
+
p.push(g), d || (d = !0, Promise.resolve().then(() => {
|
|
5284
|
+
for (; p.length; )
|
|
5285
|
+
p.shift()();
|
|
5286
5286
|
d = !1;
|
|
5287
|
-
}).catch((
|
|
5288
|
-
throw
|
|
5287
|
+
}).catch((c) => setTimeout(() => {
|
|
5288
|
+
throw c;
|
|
5289
5289
|
})));
|
|
5290
5290
|
},
|
|
5291
5291
|
reset: () => {
|
|
5292
5292
|
o.setState(o.initialState);
|
|
5293
5293
|
},
|
|
5294
5294
|
setOptions: (g) => {
|
|
5295
|
-
const
|
|
5296
|
-
o.options = r(
|
|
5295
|
+
const c = Ee(g, o.options);
|
|
5296
|
+
o.options = r(c);
|
|
5297
5297
|
},
|
|
5298
5298
|
getState: () => o.options.state,
|
|
5299
5299
|
setState: (g) => {
|
|
5300
5300
|
o.options.onStateChange == null || o.options.onStateChange(g);
|
|
5301
5301
|
},
|
|
5302
|
-
_getRowId: (g,
|
|
5302
|
+
_getRowId: (g, c, m) => {
|
|
5303
5303
|
var v;
|
|
5304
|
-
return (v = o.options.getRowId == null ? void 0 : o.options.getRowId(g,
|
|
5304
|
+
return (v = o.options.getRowId == null ? void 0 : o.options.getRowId(g, c, m)) != null ? v : `${m ? [m.id, c].join(".") : c}`;
|
|
5305
5305
|
},
|
|
5306
5306
|
getCoreRowModel: () => (o._getCoreRowModel || (o._getCoreRowModel = o.options.getCoreRowModel(o)), o._getCoreRowModel()),
|
|
5307
5307
|
// The final calls start at the bottom of the model,
|
|
5308
5308
|
// expanded rows, which then work their way up
|
|
5309
5309
|
getRowModel: () => o.getPaginationRowModel(),
|
|
5310
5310
|
//in next version, we should just pass in the row model as the optional 2nd arg
|
|
5311
|
-
getRow: (g,
|
|
5312
|
-
let m = (
|
|
5311
|
+
getRow: (g, c) => {
|
|
5312
|
+
let m = (c ? o.getPrePaginationRowModel() : o.getRowModel()).rowsById[g];
|
|
5313
5313
|
if (!m && (m = o.getCoreRowModel().rowsById[g], !m))
|
|
5314
5314
|
throw process.env.NODE_ENV !== "production" ? new Error(`getRow could not find row with ID: ${g}`) : new Error();
|
|
5315
5315
|
return m;
|
|
5316
5316
|
},
|
|
5317
|
-
_getDefaultColumnDef:
|
|
5318
|
-
var
|
|
5319
|
-
return g = (
|
|
5317
|
+
_getDefaultColumnDef: M(() => [o.options.defaultColumn], (g) => {
|
|
5318
|
+
var c;
|
|
5319
|
+
return g = (c = g) != null ? c : {}, {
|
|
5320
5320
|
header: (m) => {
|
|
5321
5321
|
const v = m.header.column.columnDef;
|
|
5322
5322
|
return v.accessorKey ? v.accessorKey : v.accessorFn ? v.id : null;
|
|
5323
5323
|
},
|
|
5324
5324
|
// footer: props => props.header.column.id,
|
|
5325
5325
|
cell: (m) => {
|
|
5326
|
-
var v,
|
|
5327
|
-
return (v = (
|
|
5326
|
+
var v, F;
|
|
5327
|
+
return (v = (F = m.renderValue()) == null || F.toString == null ? void 0 : F.toString()) != null ? v : null;
|
|
5328
5328
|
},
|
|
5329
5329
|
...o._features.reduce((m, v) => Object.assign(m, v.getDefaultColumnDef == null ? void 0 : v.getDefaultColumnDef()), {}),
|
|
5330
5330
|
...g
|
|
5331
5331
|
};
|
|
5332
|
-
},
|
|
5332
|
+
}, O(e, "debugColumns", "_getDefaultColumnDef")),
|
|
5333
5333
|
_getColumnDefs: () => o.options.columns,
|
|
5334
|
-
getAllColumns:
|
|
5335
|
-
const
|
|
5336
|
-
return
|
|
5337
|
-
const A = Ha(o, h,
|
|
5338
|
-
return A.columns =
|
|
5334
|
+
getAllColumns: M(() => [o._getColumnDefs()], (g) => {
|
|
5335
|
+
const c = function(m, v, F) {
|
|
5336
|
+
return F === void 0 && (F = 0), m.map((h) => {
|
|
5337
|
+
const A = Ha(o, h, F, v), P = h;
|
|
5338
|
+
return A.columns = P.columns ? c(P.columns, A, F + 1) : [], A;
|
|
5339
5339
|
});
|
|
5340
5340
|
};
|
|
5341
|
-
return
|
|
5342
|
-
},
|
|
5343
|
-
getAllFlatColumns:
|
|
5344
|
-
_getAllFlatColumnsById:
|
|
5345
|
-
getAllLeafColumns:
|
|
5341
|
+
return c(g);
|
|
5342
|
+
}, O(e, "debugColumns", "getAllColumns")),
|
|
5343
|
+
getAllFlatColumns: M(() => [o.getAllColumns()], (g) => g.flatMap((c) => c.getFlatColumns()), O(e, "debugColumns", "getAllFlatColumns")),
|
|
5344
|
+
_getAllFlatColumnsById: M(() => [o.getAllFlatColumns()], (g) => g.reduce((c, m) => (c[m.id] = m, c), {}), O(e, "debugColumns", "getAllFlatColumnsById")),
|
|
5345
|
+
getAllLeafColumns: M(() => [o.getAllColumns(), o._getOrderColumnsFn()], (g, c) => {
|
|
5346
5346
|
let m = g.flatMap((v) => v.getLeafColumns());
|
|
5347
|
-
return
|
|
5348
|
-
},
|
|
5347
|
+
return c(m);
|
|
5348
|
+
}, O(e, "debugColumns", "getAllLeafColumns")),
|
|
5349
5349
|
getColumn: (g) => {
|
|
5350
|
-
const
|
|
5351
|
-
return process.env.NODE_ENV !== "production" && !
|
|
5350
|
+
const c = o._getAllFlatColumnsById()[g];
|
|
5351
|
+
return process.env.NODE_ENV !== "production" && !c && console.error(`[Table] Column with id '${g}' does not exist.`), c;
|
|
5352
5352
|
}
|
|
5353
5353
|
};
|
|
5354
5354
|
Object.assign(o, f);
|
|
5355
5355
|
for (let g = 0; g < o._features.length; g++) {
|
|
5356
|
-
const
|
|
5357
|
-
|
|
5356
|
+
const c = o._features[g];
|
|
5357
|
+
c == null || c.createTable == null || c.createTable(o);
|
|
5358
5358
|
}
|
|
5359
5359
|
return o;
|
|
5360
5360
|
}
|
|
5361
5361
|
function Cr() {
|
|
5362
|
-
return (e) =>
|
|
5362
|
+
return (e) => M(() => [e.options.data], (n) => {
|
|
5363
5363
|
const t = {
|
|
5364
5364
|
rows: [],
|
|
5365
5365
|
flatRows: [],
|
|
@@ -5367,20 +5367,20 @@ function Cr() {
|
|
|
5367
5367
|
}, i = function(o, a, r) {
|
|
5368
5368
|
a === void 0 && (a = 0);
|
|
5369
5369
|
const l = [];
|
|
5370
|
-
for (let
|
|
5371
|
-
const d = si(e, e._getRowId(o[
|
|
5370
|
+
for (let p = 0; p < o.length; p++) {
|
|
5371
|
+
const d = si(e, e._getRowId(o[p], p, r), o[p], p, a, void 0, r == null ? void 0 : r.id);
|
|
5372
5372
|
if (t.flatRows.push(d), t.rowsById[d.id] = d, l.push(d), e.options.getSubRows) {
|
|
5373
5373
|
var s;
|
|
5374
|
-
d.originalSubRows = e.options.getSubRows(o[
|
|
5374
|
+
d.originalSubRows = e.options.getSubRows(o[p], p), (s = d.originalSubRows) != null && s.length && (d.subRows = i(d.originalSubRows, a + 1, d));
|
|
5375
5375
|
}
|
|
5376
5376
|
}
|
|
5377
5377
|
return l;
|
|
5378
5378
|
};
|
|
5379
5379
|
return t.rows = i(n), t;
|
|
5380
|
-
},
|
|
5380
|
+
}, O(e.options, "debugTable", "getRowModel", () => e._autoResetPageIndex()));
|
|
5381
5381
|
}
|
|
5382
5382
|
function _r() {
|
|
5383
|
-
return (e) =>
|
|
5383
|
+
return (e) => M(() => [e.getState().expanded, e.getPreExpandedRowModel(), e.options.paginateExpandedRows], (n, t, i) => !t.rows.length || n !== !0 && !Object.keys(n ?? {}).length || !i ? t : Rr(t), O(e.options, "debugTable", "getExpandedRowModel"));
|
|
5384
5384
|
}
|
|
5385
5385
|
function Rr(e) {
|
|
5386
5386
|
const n = [], t = (i) => {
|
|
@@ -5394,46 +5394,46 @@ function Rr(e) {
|
|
|
5394
5394
|
};
|
|
5395
5395
|
}
|
|
5396
5396
|
function Er() {
|
|
5397
|
-
return (e) =>
|
|
5397
|
+
return (e) => M(() => [e.getState().grouping, e.getPreGroupedRowModel()], (n, t) => {
|
|
5398
5398
|
if (!t.rows.length || !n.length)
|
|
5399
5399
|
return t.rows.forEach((s) => {
|
|
5400
5400
|
s.depth = 0, s.parentId = void 0;
|
|
5401
5401
|
}), t;
|
|
5402
|
-
const i = n.filter((s) => e.getColumn(s)), o = [], a = {}, r = function(s,
|
|
5403
|
-
if (
|
|
5404
|
-
return s.map((m) => (m.depth =
|
|
5405
|
-
const f = i[
|
|
5402
|
+
const i = n.filter((s) => e.getColumn(s)), o = [], a = {}, r = function(s, p, d) {
|
|
5403
|
+
if (p === void 0 && (p = 0), p >= i.length)
|
|
5404
|
+
return s.map((m) => (m.depth = p, o.push(m), a[m.id] = m, m.subRows && (m.subRows = r(m.subRows, p + 1, m.id)), m));
|
|
5405
|
+
const f = i[p], g = kr(s, f);
|
|
5406
5406
|
return Array.from(g.entries()).map((m, v) => {
|
|
5407
|
-
let [
|
|
5407
|
+
let [F, h] = m, A = `${f}:${F}`;
|
|
5408
5408
|
A = d ? `${d}>${A}` : A;
|
|
5409
|
-
const
|
|
5410
|
-
|
|
5411
|
-
|
|
5409
|
+
const P = r(h, p + 1, A);
|
|
5410
|
+
P.forEach((L) => {
|
|
5411
|
+
L.parentId = A;
|
|
5412
5412
|
});
|
|
5413
|
-
const
|
|
5413
|
+
const j = p ? li(h, (L) => L.subRows) : h, x = si(e, A, j[0].original, v, p, void 0, d);
|
|
5414
5414
|
return Object.assign(x, {
|
|
5415
5415
|
groupingColumnId: f,
|
|
5416
|
-
groupingValue:
|
|
5417
|
-
subRows:
|
|
5418
|
-
leafRows:
|
|
5419
|
-
getValue: (
|
|
5420
|
-
if (i.includes(
|
|
5421
|
-
if (x._valuesCache.hasOwnProperty(
|
|
5422
|
-
return x._valuesCache[
|
|
5416
|
+
groupingValue: F,
|
|
5417
|
+
subRows: P,
|
|
5418
|
+
leafRows: j,
|
|
5419
|
+
getValue: (L) => {
|
|
5420
|
+
if (i.includes(L)) {
|
|
5421
|
+
if (x._valuesCache.hasOwnProperty(L))
|
|
5422
|
+
return x._valuesCache[L];
|
|
5423
5423
|
if (h[0]) {
|
|
5424
|
-
var
|
|
5425
|
-
x._valuesCache[
|
|
5424
|
+
var z;
|
|
5425
|
+
x._valuesCache[L] = (z = h[0].getValue(L)) != null ? z : void 0;
|
|
5426
5426
|
}
|
|
5427
|
-
return x._valuesCache[
|
|
5427
|
+
return x._valuesCache[L];
|
|
5428
5428
|
}
|
|
5429
|
-
if (x._groupingValuesCache.hasOwnProperty(
|
|
5430
|
-
return x._groupingValuesCache[
|
|
5431
|
-
const Q = e.getColumn(
|
|
5432
|
-
if (
|
|
5433
|
-
return x._groupingValuesCache[
|
|
5429
|
+
if (x._groupingValuesCache.hasOwnProperty(L))
|
|
5430
|
+
return x._groupingValuesCache[L];
|
|
5431
|
+
const Q = e.getColumn(L), J = Q == null ? void 0 : Q.getAggregationFn();
|
|
5432
|
+
if (J)
|
|
5433
|
+
return x._groupingValuesCache[L] = J(L, j, h), x._groupingValuesCache[L];
|
|
5434
5434
|
}
|
|
5435
|
-
}),
|
|
5436
|
-
o.push(
|
|
5435
|
+
}), P.forEach((L) => {
|
|
5436
|
+
o.push(L), a[L.id] = L;
|
|
5437
5437
|
}), x;
|
|
5438
5438
|
});
|
|
5439
5439
|
}, l = r(t.rows, 0);
|
|
@@ -5444,7 +5444,7 @@ function Er() {
|
|
|
5444
5444
|
flatRows: o,
|
|
5445
5445
|
rowsById: a
|
|
5446
5446
|
};
|
|
5447
|
-
},
|
|
5447
|
+
}, O(e.options, "debugTable", "getGroupedRowModel", () => {
|
|
5448
5448
|
e._queue(() => {
|
|
5449
5449
|
e._autoResetExpanded(), e._autoResetPageIndex();
|
|
5450
5450
|
});
|
|
@@ -5468,7 +5468,7 @@ function kr(e, n) {
|
|
|
5468
5468
|
* @license MIT
|
|
5469
5469
|
*/
|
|
5470
5470
|
function hi(e, n) {
|
|
5471
|
-
return e ? Fr(e) ? /* @__PURE__ */
|
|
5471
|
+
return e ? Fr(e) ? /* @__PURE__ */ pe.createElement(e, n) : e : null;
|
|
5472
5472
|
}
|
|
5473
5473
|
function Fr(e) {
|
|
5474
5474
|
return Pr(e) || typeof e == "function" || Ir(e);
|
|
@@ -5491,9 +5491,9 @@ function Dr(e) {
|
|
|
5491
5491
|
// noop
|
|
5492
5492
|
renderFallbackValue: null,
|
|
5493
5493
|
...e
|
|
5494
|
-
}, [t] =
|
|
5494
|
+
}, [t] = pe.useState(() => ({
|
|
5495
5495
|
current: Sr(n)
|
|
5496
|
-
})), [i, o] =
|
|
5496
|
+
})), [i, o] = pe.useState(() => t.current.initialState);
|
|
5497
5497
|
return t.current.setOptions((a) => ({
|
|
5498
5498
|
...a,
|
|
5499
5499
|
...e,
|
|
@@ -5513,13 +5513,13 @@ const Pn = ({
|
|
|
5513
5513
|
}) => {
|
|
5514
5514
|
var n;
|
|
5515
5515
|
return {
|
|
5516
|
-
asc: /* @__PURE__ */
|
|
5517
|
-
desc: /* @__PURE__ */
|
|
5516
|
+
asc: /* @__PURE__ */ u(Re, { name: "chevron-up", children: "ascending" }),
|
|
5517
|
+
desc: /* @__PURE__ */ u(Re, { name: "chevron-down", children: "descending" })
|
|
5518
5518
|
}[(n = e == null ? void 0 : e.column) == null ? void 0 : n.getIsSorted()] ?? null;
|
|
5519
5519
|
}, $r = ({ header: e }) => {
|
|
5520
5520
|
var o;
|
|
5521
5521
|
const n = e.column.getCanSort(), t = (o = e.column.columnDef.meta) == null ? void 0 : o.isInteractiveHeader, i = hi(e.column.columnDef.header, e.getContext());
|
|
5522
|
-
return /* @__PURE__ */
|
|
5522
|
+
return /* @__PURE__ */ u("th", { className: G("p-column-header", e.column.id), children: n && !t ? /* @__PURE__ */ u(
|
|
5523
5523
|
_e,
|
|
5524
5524
|
{
|
|
5525
5525
|
appearance: "link",
|
|
@@ -5528,16 +5528,16 @@ const Pn = ({
|
|
|
5528
5528
|
type: "button",
|
|
5529
5529
|
children: /* @__PURE__ */ B(we, { children: [
|
|
5530
5530
|
i,
|
|
5531
|
-
/* @__PURE__ */
|
|
5531
|
+
/* @__PURE__ */ u(Pn, { header: e })
|
|
5532
5532
|
] })
|
|
5533
5533
|
}
|
|
5534
5534
|
) : /* @__PURE__ */ B("span", { className: "p-container--column-header", children: [
|
|
5535
5535
|
i,
|
|
5536
|
-
n && !t && /* @__PURE__ */
|
|
5536
|
+
n && !t && /* @__PURE__ */ u(Pn, { header: e })
|
|
5537
5537
|
] }) }, e.id);
|
|
5538
|
-
},
|
|
5539
|
-
|
|
5540
|
-
|
|
5538
|
+
}, Ne = ({ children: e }) => /* @__PURE__ */ u("section", { className: "controls-bar u-flex u-flex--justify-between u-flex--wrap", children: /* @__PURE__ */ u("div", { className: "p-form p-form--inline", children: e }) }), Ar = ({ children: e }) => /* @__PURE__ */ u("strong", { className: "controls-bar__description", children: e }), Mr = ({ children: e }) => /* @__PURE__ */ u("div", { className: "u-flex u-flex--wrap u-flex--column-x-small controls-bar__right", children: e });
|
|
5539
|
+
Ne.Left = Ar;
|
|
5540
|
+
Ne.Right = Mr;
|
|
5541
5541
|
const Or = ({
|
|
5542
5542
|
currentPage: e,
|
|
5543
5543
|
itemsPerPage: n,
|
|
@@ -5548,18 +5548,18 @@ const Or = ({
|
|
|
5548
5548
|
isPending: r,
|
|
5549
5549
|
pageSizes: l = [20, 30, 50, 100]
|
|
5550
5550
|
}) => {
|
|
5551
|
-
const s =
|
|
5552
|
-
() => s.map((
|
|
5553
|
-
label: `${
|
|
5554
|
-
value:
|
|
5551
|
+
const s = re(() => l, []), p = re(
|
|
5552
|
+
() => s.map((c) => ({
|
|
5553
|
+
label: `${c}/page`,
|
|
5554
|
+
value: c
|
|
5555
5555
|
})),
|
|
5556
5556
|
[s]
|
|
5557
|
-
), d = Math.ceil(t / n), f = (
|
|
5558
|
-
const { value: m } =
|
|
5557
|
+
), d = Math.ceil(t / n), f = (c) => {
|
|
5558
|
+
const { value: m } = c.target;
|
|
5559
5559
|
i(Number(m));
|
|
5560
5560
|
}, g = () => e === d ? n - (d * n - t) : e < d ? n : 0;
|
|
5561
|
-
return /* @__PURE__ */ B(
|
|
5562
|
-
/* @__PURE__ */ B(
|
|
5561
|
+
return /* @__PURE__ */ B(Ne, { children: [
|
|
5562
|
+
/* @__PURE__ */ B(Ne.Left, { children: [
|
|
5563
5563
|
"Showing ",
|
|
5564
5564
|
g(),
|
|
5565
5565
|
" out of ",
|
|
@@ -5567,8 +5567,8 @@ const Or = ({
|
|
|
5567
5567
|
" ",
|
|
5568
5568
|
o
|
|
5569
5569
|
] }),
|
|
5570
|
-
/* @__PURE__ */ B(
|
|
5571
|
-
/* @__PURE__ */
|
|
5570
|
+
/* @__PURE__ */ B(Ne.Right, { children: [
|
|
5571
|
+
/* @__PURE__ */ u(
|
|
5572
5572
|
Eo,
|
|
5573
5573
|
{
|
|
5574
5574
|
currentPage: e,
|
|
@@ -5577,14 +5577,14 @@ const Or = ({
|
|
|
5577
5577
|
totalPages: d
|
|
5578
5578
|
}
|
|
5579
5579
|
),
|
|
5580
|
-
/* @__PURE__ */
|
|
5580
|
+
/* @__PURE__ */ u(
|
|
5581
5581
|
ji,
|
|
5582
5582
|
{
|
|
5583
5583
|
"aria-label": "Items per page",
|
|
5584
5584
|
className: "u-no-margin--bottom",
|
|
5585
5585
|
name: "Items per page",
|
|
5586
5586
|
onChange: f,
|
|
5587
|
-
options:
|
|
5587
|
+
options: p,
|
|
5588
5588
|
value: n
|
|
5589
5589
|
}
|
|
5590
5590
|
)
|
|
@@ -5596,7 +5596,7 @@ const Or = ({
|
|
|
5596
5596
|
const t = e.getCoreRowModel().rows.filter((o) => o.getCanSelect());
|
|
5597
5597
|
let i;
|
|
5598
5598
|
return e.getSelectedRowModel().rows.length === 0 ? i = "false" : e.getSelectedRowModel().rows.length < t.length ? i = "mixed" : i = "true", /* @__PURE__ */ B("label", { className: "p-checkbox--inline p-table-checkbox--all", children: [
|
|
5599
|
-
/* @__PURE__ */
|
|
5599
|
+
/* @__PURE__ */ u(
|
|
5600
5600
|
"input",
|
|
5601
5601
|
{
|
|
5602
5602
|
"aria-checked": i,
|
|
@@ -5614,7 +5614,7 @@ const Or = ({
|
|
|
5614
5614
|
...n
|
|
5615
5615
|
}
|
|
5616
5616
|
),
|
|
5617
|
-
/* @__PURE__ */
|
|
5617
|
+
/* @__PURE__ */ u("span", { className: "p-checkbox__label" })
|
|
5618
5618
|
] });
|
|
5619
5619
|
}, Tr = ({ row: e, ...n }) => {
|
|
5620
5620
|
if (!e)
|
|
@@ -5630,7 +5630,7 @@ const Or = ({
|
|
|
5630
5630
|
"aria-disabled": !e.getCanSelect(),
|
|
5631
5631
|
className: "p-checkbox--inline p-table-checkbox--group",
|
|
5632
5632
|
children: [
|
|
5633
|
-
/* @__PURE__ */
|
|
5633
|
+
/* @__PURE__ */ u(
|
|
5634
5634
|
"input",
|
|
5635
5635
|
{
|
|
5636
5636
|
"aria-checked": a ? "mixed" : void 0,
|
|
@@ -5647,7 +5647,7 @@ const Or = ({
|
|
|
5647
5647
|
...n
|
|
5648
5648
|
}
|
|
5649
5649
|
),
|
|
5650
|
-
/* @__PURE__ */
|
|
5650
|
+
/* @__PURE__ */ u("span", { className: "p-checkbox__label" })
|
|
5651
5651
|
]
|
|
5652
5652
|
}
|
|
5653
5653
|
);
|
|
@@ -5660,7 +5660,7 @@ const Or = ({
|
|
|
5660
5660
|
if (!e)
|
|
5661
5661
|
return null;
|
|
5662
5662
|
const o = typeof n == "string" ? n : n(e);
|
|
5663
|
-
return /* @__PURE__ */
|
|
5663
|
+
return /* @__PURE__ */ u(
|
|
5664
5664
|
qt,
|
|
5665
5665
|
{
|
|
5666
5666
|
message: !e.getCanSelect() && o,
|
|
@@ -5671,7 +5671,7 @@ const Or = ({
|
|
|
5671
5671
|
"aria-disabled": !e.getCanSelect(),
|
|
5672
5672
|
className: "p-checkbox--inline p-table-checkbox",
|
|
5673
5673
|
children: [
|
|
5674
|
-
/* @__PURE__ */
|
|
5674
|
+
/* @__PURE__ */ u(
|
|
5675
5675
|
"input",
|
|
5676
5676
|
{
|
|
5677
5677
|
className: "p-checkbox__input",
|
|
@@ -5682,7 +5682,7 @@ const Or = ({
|
|
|
5682
5682
|
...i
|
|
5683
5683
|
}
|
|
5684
5684
|
),
|
|
5685
|
-
/* @__PURE__ */
|
|
5685
|
+
/* @__PURE__ */ u("span", { className: "p-checkbox__label" })
|
|
5686
5686
|
]
|
|
5687
5687
|
}
|
|
5688
5688
|
)
|
|
@@ -5693,195 +5693,193 @@ Me.All = jr;
|
|
|
5693
5693
|
Me.Group = Tr;
|
|
5694
5694
|
const Yr = ({
|
|
5695
5695
|
className: e,
|
|
5696
|
-
|
|
5697
|
-
|
|
5698
|
-
|
|
5699
|
-
|
|
5700
|
-
|
|
5701
|
-
|
|
5702
|
-
|
|
5703
|
-
|
|
5704
|
-
|
|
5705
|
-
|
|
5706
|
-
|
|
5707
|
-
|
|
5708
|
-
|
|
5709
|
-
|
|
5710
|
-
|
|
5711
|
-
|
|
5712
|
-
|
|
5713
|
-
showChevron: A = !1,
|
|
5714
|
-
variant: k = "full-height",
|
|
5715
|
-
...M
|
|
5696
|
+
columns: n,
|
|
5697
|
+
containerRef: t,
|
|
5698
|
+
data: i,
|
|
5699
|
+
filterCells: o = () => !0,
|
|
5700
|
+
filterHeaders: a = () => !0,
|
|
5701
|
+
getSubRows: r,
|
|
5702
|
+
groupBy: l,
|
|
5703
|
+
isLoading: s,
|
|
5704
|
+
noData: p,
|
|
5705
|
+
pagination: d,
|
|
5706
|
+
pinGroup: f,
|
|
5707
|
+
sorting: g = [],
|
|
5708
|
+
selection: c,
|
|
5709
|
+
setSorting: m,
|
|
5710
|
+
showChevron: v = !1,
|
|
5711
|
+
variant: F = "full-height",
|
|
5712
|
+
...h
|
|
5716
5713
|
}) => {
|
|
5717
|
-
const
|
|
5718
|
-
|
|
5714
|
+
const A = be(null), [P, j] = de("auto"), [x, L] = de(!1), [z, Q] = de(l ?? []), [J, ce] = de(g ?? []), [ue, ve] = de(!0), D = !!c, R = (b) => {
|
|
5715
|
+
ve((I) => {
|
|
5719
5716
|
const y = typeof b == "function" ? b(I) : b;
|
|
5720
5717
|
if (y === !0) return !0;
|
|
5721
|
-
const
|
|
5718
|
+
const C = { ...y };
|
|
5722
5719
|
if (I !== !0)
|
|
5723
|
-
for (const
|
|
5724
|
-
|
|
5725
|
-
return
|
|
5720
|
+
for (const E of Object.keys(I))
|
|
5721
|
+
E in C || (C[E] = !1);
|
|
5722
|
+
return C;
|
|
5726
5723
|
});
|
|
5727
5724
|
};
|
|
5728
5725
|
Ce(() => {
|
|
5729
|
-
|
|
5726
|
+
z.length && R((b) => {
|
|
5730
5727
|
const y = { ...b === !0 ? {} : { ...b } };
|
|
5731
|
-
for (const
|
|
5732
|
-
const
|
|
5733
|
-
|
|
5728
|
+
for (const C of i) {
|
|
5729
|
+
const E = z.map(($) => `${$}:${C[$]}`).join(">");
|
|
5730
|
+
E in y || (y[E] = !0);
|
|
5734
5731
|
}
|
|
5735
5732
|
return y;
|
|
5736
5733
|
});
|
|
5737
|
-
}, [
|
|
5738
|
-
const
|
|
5739
|
-
let b = [...
|
|
5740
|
-
if (
|
|
5734
|
+
}, [i, z]);
|
|
5735
|
+
const q = re(() => {
|
|
5736
|
+
let b = [...n];
|
|
5737
|
+
if (s)
|
|
5741
5738
|
return b;
|
|
5742
|
-
if (
|
|
5739
|
+
if (D) {
|
|
5743
5740
|
const I = [
|
|
5744
5741
|
{
|
|
5745
5742
|
id: "p-generic-table__select",
|
|
5746
5743
|
accessorKey: "id",
|
|
5747
5744
|
enableSorting: !1,
|
|
5748
|
-
header: ({ table: y }) =>
|
|
5749
|
-
cell: ({ row: y }) =>
|
|
5750
|
-
|
|
5751
|
-
|
|
5752
|
-
|
|
5753
|
-
|
|
5754
|
-
|
|
5755
|
-
|
|
5756
|
-
|
|
5745
|
+
header: ({ table: y }) => l ? "" : /* @__PURE__ */ u(Me.All, { table: y }),
|
|
5746
|
+
cell: ({ row: y }) => {
|
|
5747
|
+
const C = c.rowSelectionLabelKey && c.rowSelectionLabelKey in y.original ? `select ${y.original[c.rowSelectionLabelKey]}` : "select row";
|
|
5748
|
+
return y.getIsGrouped() ? null : /* @__PURE__ */ u(
|
|
5749
|
+
Me,
|
|
5750
|
+
{
|
|
5751
|
+
"aria-label": C,
|
|
5752
|
+
disabledTooltip: c.disabledSelectionTooltip ?? "",
|
|
5753
|
+
isNested: r !== void 0 && !!y.parentId,
|
|
5754
|
+
row: y
|
|
5755
|
+
}
|
|
5756
|
+
);
|
|
5757
|
+
}
|
|
5757
5758
|
},
|
|
5758
5759
|
...b
|
|
5759
5760
|
];
|
|
5760
|
-
|
|
5761
|
-
{
|
|
5762
|
-
|
|
5763
|
-
|
|
5764
|
-
|
|
5765
|
-
|
|
5766
|
-
|
|
5767
|
-
|
|
5768
|
-
|
|
5769
|
-
|
|
5761
|
+
if (l) {
|
|
5762
|
+
const y = (C) => l[0] in C.original ? `select ${C.original[l[0]]}` : "select group";
|
|
5763
|
+
b = [
|
|
5764
|
+
{
|
|
5765
|
+
id: "p-generic-table__group-select",
|
|
5766
|
+
accessorKey: "id",
|
|
5767
|
+
enableSorting: !1,
|
|
5768
|
+
header: ({ table: C }) => /* @__PURE__ */ u(Me.All, { table: C }),
|
|
5769
|
+
cell: ({ row: C }) => C.getIsGrouped() ? /* @__PURE__ */ u(Me.Group, { "aria-label": y(C), row: C }) : null
|
|
5770
|
+
},
|
|
5771
|
+
...I
|
|
5772
|
+
];
|
|
5773
|
+
} else
|
|
5774
|
+
b = I;
|
|
5770
5775
|
}
|
|
5771
|
-
return
|
|
5776
|
+
return l && v && (b = [{
|
|
5772
5777
|
id: "p-generic-table__group-chevron",
|
|
5773
5778
|
accessorKey: "id",
|
|
5774
5779
|
enableSorting: !1,
|
|
5775
5780
|
header: "",
|
|
5776
5781
|
cell: ({ row: y }) => {
|
|
5777
|
-
const
|
|
5778
|
-
return y.getIsGrouped() ? /* @__PURE__ */
|
|
5782
|
+
const C = y.getIsExpanded();
|
|
5783
|
+
return y.getIsGrouped() ? /* @__PURE__ */ u(
|
|
5779
5784
|
qt,
|
|
5780
5785
|
{
|
|
5781
|
-
message:
|
|
5786
|
+
message: C ? "Collapse" : "Expand",
|
|
5782
5787
|
position: "btm-right",
|
|
5783
|
-
children: /* @__PURE__ */
|
|
5788
|
+
children: /* @__PURE__ */ u(Re, { name: C ? Zt.chevronUp : Zt.chevronDown })
|
|
5784
5789
|
}
|
|
5785
5790
|
) : null;
|
|
5786
5791
|
}
|
|
5787
5792
|
}, ...b]), b;
|
|
5788
|
-
}, [
|
|
5789
|
-
|
|
5790
|
-
|
|
5791
|
-
|
|
5792
|
-
|
|
5793
|
-
|
|
5794
|
-
t
|
|
5795
|
-
]), ae = se(() => Z.length ? [...a].sort((b, I) => {
|
|
5796
|
-
for (const y of Z) {
|
|
5797
|
-
const F = b[y] ?? null, P = I[y] ?? null;
|
|
5798
|
-
if (F === null) return 1;
|
|
5799
|
-
if (P === null || F < P) return -1;
|
|
5800
|
-
if (F > P) return 1;
|
|
5793
|
+
}, [D, n, s, l, r]), W = re(() => z.length ? [...i].sort((b, I) => {
|
|
5794
|
+
for (const y of z) {
|
|
5795
|
+
const C = b[y] ?? null, E = I[y] ?? null;
|
|
5796
|
+
if (C === null) return 1;
|
|
5797
|
+
if (E === null || C < E) return -1;
|
|
5798
|
+
if (C > E) return 1;
|
|
5801
5799
|
}
|
|
5802
5800
|
return 0;
|
|
5803
|
-
}) :
|
|
5804
|
-
if (
|
|
5805
|
-
for (const { value: y, isTop:
|
|
5806
|
-
const
|
|
5807
|
-
if ($ === y &&
|
|
5808
|
-
return
|
|
5809
|
-
if (
|
|
5810
|
-
return
|
|
5801
|
+
}) : i, [i, z]), Z = re(() => W.length ? [...W].sort((b, I) => {
|
|
5802
|
+
if (f != null && f.length && z.length)
|
|
5803
|
+
for (const { value: y, isTop: C } of f) {
|
|
5804
|
+
const E = z[0], $ = b[E] ?? null, N = I[E] ?? null;
|
|
5805
|
+
if ($ === y && N !== y)
|
|
5806
|
+
return C ? -1 : 1;
|
|
5807
|
+
if (N === y && $ !== y)
|
|
5808
|
+
return C ? 1 : -1;
|
|
5811
5809
|
}
|
|
5812
|
-
for (const { id: y, desc:
|
|
5813
|
-
const
|
|
5814
|
-
if (
|
|
5815
|
-
if (
|
|
5816
|
-
if ($ === null ||
|
|
5817
|
-
return
|
|
5818
|
-
if (
|
|
5819
|
-
return
|
|
5810
|
+
for (const { id: y, desc: C } of J) {
|
|
5811
|
+
const E = b[y] ?? null, $ = I[y] ?? null;
|
|
5812
|
+
if (E === null && $ === null) return 0;
|
|
5813
|
+
if (E === null) return C ? -1 : 1;
|
|
5814
|
+
if ($ === null || E < $)
|
|
5815
|
+
return C ? 1 : -1;
|
|
5816
|
+
if (E > $)
|
|
5817
|
+
return C ? -1 : 1;
|
|
5820
5818
|
}
|
|
5821
5819
|
return 0;
|
|
5822
|
-
}) : [], [
|
|
5820
|
+
}) : [], [W, J, f, z]);
|
|
5823
5821
|
On(() => {
|
|
5824
5822
|
const b = () => {
|
|
5825
|
-
const
|
|
5826
|
-
if (!
|
|
5827
|
-
const
|
|
5828
|
-
if (!
|
|
5829
|
-
const $ =
|
|
5830
|
-
|
|
5831
|
-
|
|
5823
|
+
const C = A.current;
|
|
5824
|
+
if (!C) return;
|
|
5825
|
+
const E = (t == null ? void 0 : t.current) || document.querySelector("main");
|
|
5826
|
+
if (!E) return;
|
|
5827
|
+
const $ = E.getBoundingClientRect(), N = C.getBoundingClientRect(), V = $.bottom - N.top, ne = C.scrollHeight > V;
|
|
5828
|
+
L(ne), j(
|
|
5829
|
+
F === "full-height" && ne ? `${V}px` : "auto"
|
|
5832
5830
|
);
|
|
5833
5831
|
};
|
|
5834
5832
|
b();
|
|
5835
|
-
const I = new ResizeObserver(b), y =
|
|
5833
|
+
const I = new ResizeObserver(b), y = A.current;
|
|
5836
5834
|
return y && I.observe(y), window.addEventListener("resize", b), () => {
|
|
5837
5835
|
window.removeEventListener("resize", b), y && I.unobserve(y);
|
|
5838
5836
|
};
|
|
5839
|
-
}, [
|
|
5840
|
-
const
|
|
5841
|
-
data:
|
|
5842
|
-
columns:
|
|
5837
|
+
}, [t, Z.length, s]);
|
|
5838
|
+
const le = F === "full-height" && x ? "full-height" : "regular", ee = Dr({
|
|
5839
|
+
data: Z,
|
|
5840
|
+
columns: q,
|
|
5843
5841
|
state: {
|
|
5844
|
-
grouping:
|
|
5845
|
-
expanded:
|
|
5846
|
-
sorting:
|
|
5847
|
-
rowSelection:
|
|
5842
|
+
grouping: z,
|
|
5843
|
+
expanded: ue,
|
|
5844
|
+
sorting: J,
|
|
5845
|
+
rowSelection: c == null ? void 0 : c.rowSelection
|
|
5848
5846
|
},
|
|
5849
5847
|
manualPagination: !0,
|
|
5850
5848
|
autoResetExpanded: !1,
|
|
5851
|
-
onExpandedChange:
|
|
5849
|
+
onExpandedChange: R,
|
|
5852
5850
|
onSortingChange: (b) => {
|
|
5853
|
-
|
|
5851
|
+
ce(b), m && m(b);
|
|
5854
5852
|
},
|
|
5855
|
-
onGroupingChange:
|
|
5856
|
-
onRowSelectionChange:
|
|
5853
|
+
onGroupingChange: Q,
|
|
5854
|
+
onRowSelectionChange: c == null ? void 0 : c.setRowSelection,
|
|
5857
5855
|
manualSorting: !0,
|
|
5858
5856
|
enableSorting: !0,
|
|
5859
5857
|
enableExpanding: !0,
|
|
5860
|
-
getSubRows:
|
|
5858
|
+
getSubRows: r,
|
|
5861
5859
|
getExpandedRowModel: _r(),
|
|
5862
5860
|
getCoreRowModel: Cr(),
|
|
5863
5861
|
getGroupedRowModel: Er(),
|
|
5864
5862
|
groupedColumnMode: !1,
|
|
5865
|
-
enableRowSelection:
|
|
5866
|
-
enableMultiRowSelection:
|
|
5863
|
+
enableRowSelection: (c == null ? void 0 : c.filterSelectable) ?? D,
|
|
5864
|
+
enableMultiRowSelection: (c == null ? void 0 : c.filterSelectable) ?? D,
|
|
5867
5865
|
getRowId: (b) => b.id.toString()
|
|
5868
|
-
}),
|
|
5869
|
-
const { getIsGrouped: I, id: y, getVisibleCells:
|
|
5870
|
-
return /* @__PURE__ */
|
|
5866
|
+
}), w = () => /* @__PURE__ */ u("tr", { children: /* @__PURE__ */ u("td", { className: "p-generic-table__loading", colSpan: q.length, children: /* @__PURE__ */ u(Ht, { text: "Loading..." }) }) }), k = () => ee.getRowModel().rows.length < 1 ? /* @__PURE__ */ u("tr", { children: /* @__PURE__ */ u("td", { className: "p-generic-table__no-data", colSpan: q.length, children: p }) }) : ee.getRowModel().rows.map((b) => {
|
|
5867
|
+
const { getIsGrouped: I, id: y, getVisibleCells: C, parentId: E } = b, $ = !I(), N = (c == null ? void 0 : c.rowSelection) !== void 0 && Object.keys(c.rowSelection).includes(y);
|
|
5868
|
+
return /* @__PURE__ */ u(
|
|
5871
5869
|
"tr",
|
|
5872
5870
|
{
|
|
5873
5871
|
"aria-rowindex": parseInt(y.replace(/\D/g, "") || "0", 10) + 1,
|
|
5874
|
-
"aria-selected":
|
|
5875
|
-
className:
|
|
5872
|
+
"aria-selected": N,
|
|
5873
|
+
className: G({
|
|
5876
5874
|
"p-generic-table__individual-row": $,
|
|
5877
5875
|
"p-generic-table__group-row": !$,
|
|
5878
|
-
"p-generic-table__nested-row":
|
|
5876
|
+
"p-generic-table__nested-row": r !== void 0 && !!E
|
|
5879
5877
|
}),
|
|
5880
5878
|
onClick: () => {
|
|
5881
5879
|
$ || b.toggleExpanded();
|
|
5882
5880
|
},
|
|
5883
5881
|
role: "row",
|
|
5884
|
-
children:
|
|
5882
|
+
children: C().filter((V) => !$ && (V.column.id === "p-generic-table__group-select" || V.column.id === "p-generic-table__group-chevron") ? !0 : o(b, V.column)).map((V) => /* @__PURE__ */ u("td", { className: G(`${V.column.id}`), children: hi(V.column.columnDef.cell, V.getContext()) }, V.id))
|
|
5885
5883
|
},
|
|
5886
5884
|
y
|
|
5887
5885
|
);
|
|
@@ -5889,40 +5887,40 @@ const Yr = ({
|
|
|
5889
5887
|
return /* @__PURE__ */ B(
|
|
5890
5888
|
"div",
|
|
5891
5889
|
{
|
|
5892
|
-
className:
|
|
5890
|
+
className: G("p-generic-table", e),
|
|
5893
5891
|
"data-testid": "p-generic-table",
|
|
5894
|
-
...
|
|
5892
|
+
...h,
|
|
5895
5893
|
children: [
|
|
5896
|
-
|
|
5894
|
+
d && /* @__PURE__ */ u(
|
|
5897
5895
|
Or,
|
|
5898
5896
|
{
|
|
5899
|
-
currentPage:
|
|
5900
|
-
dataContext:
|
|
5901
|
-
handlePageSizeChange:
|
|
5902
|
-
isPending:
|
|
5903
|
-
itemsPerPage:
|
|
5904
|
-
setCurrentPage:
|
|
5905
|
-
totalItems:
|
|
5906
|
-
pageSizes:
|
|
5897
|
+
currentPage: d.currentPage,
|
|
5898
|
+
dataContext: d.dataContext,
|
|
5899
|
+
handlePageSizeChange: d.handlePageSizeChange,
|
|
5900
|
+
isPending: d.isPending,
|
|
5901
|
+
itemsPerPage: d.itemsPerPage,
|
|
5902
|
+
setCurrentPage: d.setCurrentPage,
|
|
5903
|
+
totalItems: d.totalItems,
|
|
5904
|
+
pageSizes: d.pageSizes
|
|
5907
5905
|
}
|
|
5908
5906
|
),
|
|
5909
5907
|
/* @__PURE__ */ B(
|
|
5910
5908
|
"table",
|
|
5911
5909
|
{
|
|
5912
|
-
"aria-busy":
|
|
5913
|
-
"aria-label":
|
|
5910
|
+
"aria-busy": s,
|
|
5911
|
+
"aria-label": h["aria-label"],
|
|
5914
5912
|
"aria-describedby": "generic-table-description",
|
|
5915
|
-
"aria-rowcount":
|
|
5916
|
-
className:
|
|
5917
|
-
"p-generic-table__is-full-height":
|
|
5918
|
-
"p-generic-table__is-selectable":
|
|
5919
|
-
"p-generic-table__is-grouped":
|
|
5913
|
+
"aria-rowcount": Z.length + 1,
|
|
5914
|
+
className: G("p-generic-table__table", {
|
|
5915
|
+
"p-generic-table__is-full-height": le === "full-height",
|
|
5916
|
+
"p-generic-table__is-selectable": D,
|
|
5917
|
+
"p-generic-table__is-grouped": l !== void 0
|
|
5920
5918
|
}),
|
|
5921
5919
|
role: "grid",
|
|
5922
5920
|
children: [
|
|
5923
|
-
/* @__PURE__ */
|
|
5924
|
-
/* @__PURE__ */
|
|
5925
|
-
|
|
5921
|
+
/* @__PURE__ */ u("thead", { children: ee.getHeaderGroups().map((b) => /* @__PURE__ */ u("tr", { role: "row", children: b.headers.filter(a).map((I, y) => /* @__PURE__ */ B(Mn, { children: [
|
|
5922
|
+
/* @__PURE__ */ u($r, { header: I }),
|
|
5923
|
+
D && l && (!v && y === 2 || v && y === 3) ? /* @__PURE__ */ u(
|
|
5926
5924
|
"th",
|
|
5927
5925
|
{
|
|
5928
5926
|
className: "p-generic-table__select-alignment",
|
|
@@ -5930,15 +5928,15 @@ const Yr = ({
|
|
|
5930
5928
|
}
|
|
5931
5929
|
) : null
|
|
5932
5930
|
] }, I.id)) }, b.id)) }),
|
|
5933
|
-
/* @__PURE__ */
|
|
5931
|
+
/* @__PURE__ */ u(
|
|
5934
5932
|
"tbody",
|
|
5935
5933
|
{
|
|
5936
|
-
ref:
|
|
5934
|
+
ref: A,
|
|
5937
5935
|
style: {
|
|
5938
5936
|
overflowY: "auto",
|
|
5939
|
-
maxHeight:
|
|
5937
|
+
maxHeight: P
|
|
5940
5938
|
},
|
|
5941
|
-
children:
|
|
5939
|
+
children: s ? w() : k()
|
|
5942
5940
|
}
|
|
5943
5941
|
)
|
|
5944
5942
|
]
|
|
@@ -5994,15 +5992,15 @@ const Yr = ({
|
|
|
5994
5992
|
setToken: r,
|
|
5995
5993
|
suggestions: l,
|
|
5996
5994
|
isLoading: s = !1,
|
|
5997
|
-
placeholder:
|
|
5995
|
+
placeholder: p,
|
|
5998
5996
|
...d
|
|
5999
5997
|
}) => {
|
|
6000
|
-
const [f, g] =
|
|
5998
|
+
const [f, g] = de({
|
|
6001
5999
|
isVisible: !1,
|
|
6002
6000
|
highlightedIndex: -1,
|
|
6003
6001
|
showingMore: !1,
|
|
6004
6002
|
cursorPosition: 0
|
|
6005
|
-
}),
|
|
6003
|
+
}), c = be(null), m = be(null), v = be(null), F = re(() => {
|
|
6006
6004
|
const D = f.showingMore ? In.EXPANDED : In.DEFAULT, R = l.slice(0, D);
|
|
6007
6005
|
return !f.showingMore && l.length > D ? [...R, { value: "Show more...", type: "more" }] : R;
|
|
6008
6006
|
}, [l, f.showingMore]), h = X(
|
|
@@ -6012,57 +6010,57 @@ const Yr = ({
|
|
|
6012
6010
|
[]
|
|
6013
6011
|
), A = X(
|
|
6014
6012
|
(D) => {
|
|
6015
|
-
|
|
6013
|
+
c.current && !c.current.contains(D.target) && h({
|
|
6016
6014
|
isVisible: !1,
|
|
6017
6015
|
highlightedIndex: -1
|
|
6018
6016
|
});
|
|
6019
6017
|
},
|
|
6020
6018
|
[h]
|
|
6021
|
-
),
|
|
6019
|
+
), P = X(
|
|
6022
6020
|
(D, R) => {
|
|
6023
|
-
const { tokenStart:
|
|
6021
|
+
const { tokenStart: q, tokenEnd: W } = R;
|
|
6024
6022
|
if (D.type === "filter") {
|
|
6025
|
-
const
|
|
6026
|
-
return t.slice(0,
|
|
6023
|
+
const le = D.value + xe.COLON + xe.OPEN_PAREN;
|
|
6024
|
+
return t.slice(0, q) + le + t.slice(W);
|
|
6027
6025
|
}
|
|
6028
6026
|
if (o.length === 0) {
|
|
6029
|
-
const
|
|
6030
|
-
return t.slice(0,
|
|
6027
|
+
const le = D.type + xe.COLON + xe.OPEN_PAREN + xe.EQUALS + D.value;
|
|
6028
|
+
return t.slice(0, q) + le + t.slice(W);
|
|
6031
6029
|
}
|
|
6032
|
-
const
|
|
6033
|
-
return t.slice(0,
|
|
6030
|
+
const Z = t.charAt(q - 1) === xe.EQUALS ? D.value : xe.EQUALS + D.value;
|
|
6031
|
+
return t.slice(0, q) + Z + t.slice(W);
|
|
6034
6032
|
},
|
|
6035
6033
|
[t, o]
|
|
6036
|
-
),
|
|
6034
|
+
), j = X(
|
|
6037
6035
|
(D) => {
|
|
6038
|
-
const R =
|
|
6036
|
+
const R = F[D];
|
|
6039
6037
|
if (!R) return;
|
|
6040
6038
|
if (R.type === "more") {
|
|
6041
6039
|
h({ showingMore: !0 });
|
|
6042
6040
|
return;
|
|
6043
6041
|
}
|
|
6044
|
-
const
|
|
6042
|
+
const q = Ze(
|
|
6045
6043
|
t,
|
|
6046
6044
|
f.cursorPosition
|
|
6047
|
-
),
|
|
6048
|
-
|
|
6049
|
-
|
|
6045
|
+
), W = P(R, q), Z = q.tokenStart + (R.type === "filter" ? R.value.length + 2 : o.length === 0 ? R.type.length + R.value.length + 3 : R.value.length + 1), { context: le, token: ee } = Ze(
|
|
6046
|
+
W,
|
|
6047
|
+
Z
|
|
6050
6048
|
);
|
|
6051
|
-
a(
|
|
6049
|
+
a(le), r(ee), i(W), setTimeout(() => {
|
|
6052
6050
|
v.current && (v.current.focus(), v.current.setSelectionRange(
|
|
6053
|
-
|
|
6054
|
-
|
|
6051
|
+
Z,
|
|
6052
|
+
Z
|
|
6055
6053
|
));
|
|
6056
6054
|
}, 0), h({
|
|
6057
6055
|
highlightedIndex: 0,
|
|
6058
6056
|
showingMore: !1,
|
|
6059
6057
|
isVisible: R.type === "filter",
|
|
6060
|
-
cursorPosition:
|
|
6058
|
+
cursorPosition: Z
|
|
6061
6059
|
});
|
|
6062
6060
|
},
|
|
6063
6061
|
[
|
|
6064
|
-
|
|
6065
|
-
|
|
6062
|
+
F,
|
|
6063
|
+
P,
|
|
6066
6064
|
t,
|
|
6067
6065
|
f.cursorPosition,
|
|
6068
6066
|
o,
|
|
@@ -6073,34 +6071,34 @@ const Yr = ({
|
|
|
6073
6071
|
]
|
|
6074
6072
|
), x = X(() => {
|
|
6075
6073
|
if (!v.current) return;
|
|
6076
|
-
const D = v.current.selectionStart || 0, { context: R, token:
|
|
6074
|
+
const D = v.current.selectionStart || 0, { context: R, token: q } = Ze(
|
|
6077
6075
|
t,
|
|
6078
6076
|
D
|
|
6079
6077
|
);
|
|
6080
|
-
a(R), r(
|
|
6081
|
-
...
|
|
6078
|
+
a(R), r(q), h((W) => ({
|
|
6079
|
+
...W,
|
|
6082
6080
|
isVisible: !Dn(t, D),
|
|
6083
6081
|
cursorPosition: D
|
|
6084
6082
|
}));
|
|
6085
|
-
}, [t, a, r, h]),
|
|
6083
|
+
}, [t, a, r, h]), L = X(
|
|
6086
6084
|
(D) => {
|
|
6087
6085
|
const { key: R } = D;
|
|
6088
6086
|
if (f.isVisible) {
|
|
6089
|
-
const
|
|
6087
|
+
const q = F.length;
|
|
6090
6088
|
switch (R) {
|
|
6091
6089
|
case "Tab":
|
|
6092
6090
|
case "ArrowDown":
|
|
6093
6091
|
D.preventDefault(), h({
|
|
6094
|
-
highlightedIndex: (f.highlightedIndex + 1) %
|
|
6092
|
+
highlightedIndex: (f.highlightedIndex + 1) % q
|
|
6095
6093
|
});
|
|
6096
6094
|
return;
|
|
6097
6095
|
case "ArrowUp":
|
|
6098
6096
|
D.preventDefault(), h({
|
|
6099
|
-
highlightedIndex: f.highlightedIndex <= 0 ?
|
|
6097
|
+
highlightedIndex: f.highlightedIndex <= 0 ? q - 1 : f.highlightedIndex - 1
|
|
6100
6098
|
});
|
|
6101
6099
|
return;
|
|
6102
6100
|
case "Enter":
|
|
6103
|
-
D.preventDefault(), f.highlightedIndex >= 0 ?
|
|
6101
|
+
D.preventDefault(), f.highlightedIndex >= 0 ? j(f.highlightedIndex) : h({ isVisible: !1 });
|
|
6104
6102
|
return;
|
|
6105
6103
|
case "Escape":
|
|
6106
6104
|
D.preventDefault(), h({
|
|
@@ -6114,12 +6112,12 @@ const Yr = ({
|
|
|
6114
6112
|
},
|
|
6115
6113
|
[
|
|
6116
6114
|
f,
|
|
6117
|
-
|
|
6115
|
+
F.length,
|
|
6118
6116
|
h,
|
|
6119
|
-
|
|
6117
|
+
j,
|
|
6120
6118
|
x
|
|
6121
6119
|
]
|
|
6122
|
-
),
|
|
6120
|
+
), z = X(
|
|
6123
6121
|
(D) => {
|
|
6124
6122
|
const { key: R } = D;
|
|
6125
6123
|
(R === "ArrowLeft" || R === "ArrowRight" || R === "Home" || R === "End") && x();
|
|
@@ -6130,14 +6128,14 @@ const Yr = ({
|
|
|
6130
6128
|
isVisible: !0,
|
|
6131
6129
|
highlightedIndex: 0
|
|
6132
6130
|
});
|
|
6133
|
-
}, [h]),
|
|
6131
|
+
}, [h]), J = X(
|
|
6134
6132
|
(D) => {
|
|
6135
|
-
var
|
|
6136
|
-
const R = ((
|
|
6133
|
+
var Z;
|
|
6134
|
+
const R = ((Z = v.current) == null ? void 0 : Z.selectionStart) || D.length, { context: q, token: W } = Ze(
|
|
6137
6135
|
D,
|
|
6138
6136
|
R
|
|
6139
6137
|
);
|
|
6140
|
-
a(
|
|
6138
|
+
a(q), r(W), i(D), h({
|
|
6141
6139
|
highlightedIndex: 0,
|
|
6142
6140
|
isVisible: !Dn(D, R),
|
|
6143
6141
|
showingMore: !1,
|
|
@@ -6145,14 +6143,14 @@ const Yr = ({
|
|
|
6145
6143
|
});
|
|
6146
6144
|
},
|
|
6147
6145
|
[a, r, i, h]
|
|
6148
|
-
),
|
|
6146
|
+
), ce = X(() => {
|
|
6149
6147
|
setTimeout(x, 0);
|
|
6150
|
-
}, [x]),
|
|
6148
|
+
}, [x]), ue = X(() => {
|
|
6151
6149
|
h({
|
|
6152
6150
|
isVisible: !1,
|
|
6153
6151
|
highlightedIndex: -1
|
|
6154
6152
|
});
|
|
6155
|
-
}, [h]),
|
|
6153
|
+
}, [h]), ve = X(
|
|
6156
6154
|
(D) => {
|
|
6157
6155
|
h({ highlightedIndex: D });
|
|
6158
6156
|
},
|
|
@@ -6161,16 +6159,16 @@ const Yr = ({
|
|
|
6161
6159
|
return Ce(() => (document.addEventListener("mousedown", A), () => document.removeEventListener("mousedown", A)), [A]), /* @__PURE__ */ B(
|
|
6162
6160
|
"div",
|
|
6163
6161
|
{
|
|
6164
|
-
className:
|
|
6162
|
+
className: G("p-query-input", e),
|
|
6165
6163
|
"data-testid": "p-query-input",
|
|
6166
|
-
ref:
|
|
6164
|
+
ref: c,
|
|
6167
6165
|
...d,
|
|
6168
6166
|
children: [
|
|
6169
|
-
/* @__PURE__ */
|
|
6167
|
+
/* @__PURE__ */ u(
|
|
6170
6168
|
jn,
|
|
6171
6169
|
{
|
|
6172
6170
|
disabled: n,
|
|
6173
|
-
placeholder:
|
|
6171
|
+
placeholder: p,
|
|
6174
6172
|
value: t,
|
|
6175
6173
|
externallyControlled: !0,
|
|
6176
6174
|
autoComplete: "off",
|
|
@@ -6178,18 +6176,18 @@ const Yr = ({
|
|
|
6178
6176
|
name: "query-input",
|
|
6179
6177
|
ref: v,
|
|
6180
6178
|
onFocus: Q,
|
|
6181
|
-
onChange:
|
|
6182
|
-
onKeyDown:
|
|
6183
|
-
onKeyUp:
|
|
6184
|
-
onClear:
|
|
6185
|
-
onClick:
|
|
6179
|
+
onChange: J,
|
|
6180
|
+
onKeyDown: L,
|
|
6181
|
+
onKeyUp: z,
|
|
6182
|
+
onClear: ue,
|
|
6183
|
+
onClick: ce,
|
|
6186
6184
|
"aria-disabled": n,
|
|
6187
6185
|
"aria-expanded": f.isVisible,
|
|
6188
6186
|
"aria-haspopup": "listbox",
|
|
6189
6187
|
"aria-owns": "query-suggestions"
|
|
6190
6188
|
}
|
|
6191
6189
|
),
|
|
6192
|
-
f.isVisible && l.length > 0 && /* @__PURE__ */
|
|
6190
|
+
f.isVisible && l.length > 0 && /* @__PURE__ */ u(
|
|
6193
6191
|
"ul",
|
|
6194
6192
|
{
|
|
6195
6193
|
className: "p-query-input__list",
|
|
@@ -6197,32 +6195,32 @@ const Yr = ({
|
|
|
6197
6195
|
id: "query-suggestions",
|
|
6198
6196
|
role: "listbox",
|
|
6199
6197
|
"aria-label": "Search suggestions",
|
|
6200
|
-
children: s ? /* @__PURE__ */
|
|
6198
|
+
children: s ? /* @__PURE__ */ u("div", { className: "p-query-input__loading", children: /* @__PURE__ */ u(Ht, { text: "Loading..." }) }) : F.map((D, R) => /* @__PURE__ */ B(
|
|
6201
6199
|
"li",
|
|
6202
6200
|
{
|
|
6203
|
-
className:
|
|
6201
|
+
className: G("p-query-input__item", {
|
|
6204
6202
|
highlight: R === f.highlightedIndex
|
|
6205
6203
|
}),
|
|
6206
|
-
onClick: () =>
|
|
6207
|
-
onKeyDown: () =>
|
|
6208
|
-
onMouseEnter: () =>
|
|
6204
|
+
onClick: () => j(R),
|
|
6205
|
+
onKeyDown: () => j(R),
|
|
6206
|
+
onMouseEnter: () => ve(R),
|
|
6209
6207
|
role: "option",
|
|
6210
6208
|
"aria-selected": R === f.highlightedIndex,
|
|
6211
6209
|
tabIndex: -1,
|
|
6212
6210
|
children: [
|
|
6213
6211
|
/* @__PURE__ */ B("span", { className: "p-query-input__item-label", children: [
|
|
6214
|
-
/* @__PURE__ */
|
|
6212
|
+
/* @__PURE__ */ u(
|
|
6215
6213
|
"span",
|
|
6216
6214
|
{
|
|
6217
|
-
className:
|
|
6215
|
+
className: G({
|
|
6218
6216
|
"u-text--muted": D.type === "more"
|
|
6219
6217
|
}),
|
|
6220
6218
|
children: D.value
|
|
6221
6219
|
}
|
|
6222
6220
|
),
|
|
6223
|
-
D.type === "filter" && /* @__PURE__ */
|
|
6221
|
+
D.type === "filter" && /* @__PURE__ */ u("span", { className: "u-text--muted", children: ":()" })
|
|
6224
6222
|
] }),
|
|
6225
|
-
D.type !== "more" && /* @__PURE__ */
|
|
6223
|
+
D.type !== "more" && /* @__PURE__ */ u("span", { className: "u-text--muted u-align-text--right", children: D.type })
|
|
6226
6224
|
]
|
|
6227
6225
|
},
|
|
6228
6226
|
`${D.value}-${R}`
|
|
@@ -6241,15 +6239,15 @@ const Yr = ({
|
|
|
6241
6239
|
const r = e < 0, l = Math.abs(e);
|
|
6242
6240
|
if (l === 0)
|
|
6243
6241
|
return { value: 0, unit: i || "B" };
|
|
6244
|
-
const s = t ? 1024 : 1e3,
|
|
6245
|
-
let
|
|
6246
|
-
if (
|
|
6242
|
+
const s = t ? 1024 : 1e3, p = t ? ["B", "KiB", "MiB", "GiB", "TiB", "PiB", "EiB", "ZiB", "YiB"] : ["B", "KB", "MB", "GB", "TB", "PB", "EB", "ZB", "YB"], d = p.findIndex((v) => v === n) || 0, f = l * Math.pow(s, d), g = i ? p.findIndex((v) => v === i) : Math.floor(Math.log(f) / Math.log(s));
|
|
6243
|
+
let c = f / Math.pow(s, g);
|
|
6244
|
+
if (c % 1 !== 0) {
|
|
6247
6245
|
const v = Math.pow(10, o);
|
|
6248
|
-
|
|
6246
|
+
c = Math[a](c * v) / v;
|
|
6249
6247
|
}
|
|
6250
6248
|
return {
|
|
6251
|
-
value: r ? -
|
|
6252
|
-
unit:
|
|
6249
|
+
value: r ? -c : c,
|
|
6250
|
+
unit: p[g]
|
|
6253
6251
|
};
|
|
6254
6252
|
};
|
|
6255
6253
|
export {
|
|
@@ -6261,11 +6259,11 @@ export {
|
|
|
6261
6259
|
Ut as FormSection,
|
|
6262
6260
|
Yr as GenericTable,
|
|
6263
6261
|
zn as InputGroup,
|
|
6264
|
-
|
|
6265
|
-
|
|
6262
|
+
Nn as MainToolbar,
|
|
6263
|
+
Li as Meter,
|
|
6266
6264
|
Wr as MultiSelect,
|
|
6267
6265
|
Ma as MultiSelectDropdown,
|
|
6268
|
-
|
|
6266
|
+
ae as Navigation,
|
|
6269
6267
|
uo as NavigationBar,
|
|
6270
6268
|
Br as NestedFormGroup,
|
|
6271
6269
|
Ro as Pagination,
|