@canonical/maas-react-components 1.33.3 → 1.34.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/@canonical/maas-react-components.es.js +920 -928
- package/dist/@canonical/maas-react-components.umd.js +11 -11
- package/dist/src/lib/components/GenericTable/GenericTable.d.ts +6 -4
- package/dist/src/lib/components/GenericTable/GenericTable.stories.d.ts +1 -0
- package/dist/src/lib/components/GenericTable/index.d.ts +0 -1
- package/package.json +1 -1
- package/dist/src/lib/components/GenericTable/GroupRowActions/GroupRowActions.d.ts +0 -7
- package/dist/src/lib/components/GenericTable/GroupRowActions/GroupRowActions.test.d.ts +0 -1
- package/dist/src/lib/components/GenericTable/GroupRowActions/index.d.ts +0 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { jsxs as B, jsx as
|
|
1
|
+
import { jsxs as B, jsx as u, Fragment as we } from "react/jsx-runtime";
|
|
2
2
|
import * as ue from "react";
|
|
3
|
-
import Si, { useRef as
|
|
4
|
-
import { useListener as Ei, Link as ki, Spinner as qt, Tooltip as Gt, Button as
|
|
3
|
+
import Si, { useRef as be, useState as ge, useEffect as Ce, useCallback as X, cloneElement as Ci, createContext as $n, useId as et, useContext as Ht, useMemo as se, useReducer as An, forwardRef as _i, useImperativeHandle as Ri, Fragment as Mn, useLayoutEffect as On } from "react";
|
|
4
|
+
import { useListener as Ei, Link as ki, Spinner as qt, Tooltip as Gt, Button as _e, Icon as Re, Row as Fi, Col as Pi, Input as Ii, Label as Di, CheckboxInput as $i, useClickOutside as Ai, useOnEscapePressed as Mi, SearchBox as jn, Select as Oi, ICONS as en } from "@canonical/react-components";
|
|
5
5
|
function Bt(e) {
|
|
6
6
|
return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
|
|
7
7
|
}
|
|
@@ -45,7 +45,7 @@ function ji() {
|
|
|
45
45
|
}(ft)), ft.exports;
|
|
46
46
|
}
|
|
47
47
|
var Ti = ji();
|
|
48
|
-
const
|
|
48
|
+
const q = /* @__PURE__ */ Bt(Ti), Ie = {
|
|
49
49
|
caution: "#F99B11",
|
|
50
50
|
light: "#F7F7F7",
|
|
51
51
|
linkFaded: "#D3E4ED",
|
|
@@ -79,24 +79,24 @@ const G = /* @__PURE__ */ Bt(Ti), Ie = {
|
|
|
79
79
|
size: a = "regular",
|
|
80
80
|
...r
|
|
81
81
|
}) => {
|
|
82
|
-
const l =
|
|
83
|
-
|
|
82
|
+
const l = be(null), s = t == null ? void 0 : t.reduce((m, v) => m + v.value, 0), c = i || s, d = t.map((m) => m.value / c * 100), [f, g] = ge(0);
|
|
83
|
+
Ce(() => {
|
|
84
84
|
g(o === "segmented" ? an(l, c) : 0);
|
|
85
85
|
}, [c, o]);
|
|
86
|
-
const
|
|
86
|
+
const p = X(() => {
|
|
87
87
|
g(an(l, c));
|
|
88
88
|
}, [l, c, g]);
|
|
89
|
-
return Ei(window,
|
|
89
|
+
return Ei(window, p, "resize", !0, o === "segmented"), /* @__PURE__ */ B(
|
|
90
90
|
"div",
|
|
91
91
|
{
|
|
92
|
-
className:
|
|
92
|
+
className: q("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
|
Li,
|
|
101
101
|
{
|
|
102
102
|
data: t,
|
|
@@ -111,7 +111,7 @@ const G = /* @__PURE__ */ Bt(Ti), Ie = {
|
|
|
111
111
|
]
|
|
112
112
|
}
|
|
113
113
|
);
|
|
114
|
-
}, Ni = ({ children: e }) => /* @__PURE__ */
|
|
114
|
+
}, Ni = ({ children: e }) => /* @__PURE__ */ u(
|
|
115
115
|
"div",
|
|
116
116
|
{
|
|
117
117
|
className: "p-meter__bar",
|
|
@@ -141,15 +141,15 @@ const G = /* @__PURE__ */ Bt(Ti), Ie = {
|
|
|
141
141
|
${It} ${i}px
|
|
142
142
|
)`
|
|
143
143
|
});
|
|
144
|
-
return /* @__PURE__ */ B(
|
|
145
|
-
o() ? /* @__PURE__ */
|
|
144
|
+
return /* @__PURE__ */ B(we, { children: [
|
|
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 G = /* @__PURE__ */ Bt(Ti), 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 G = /* @__PURE__ */ Bt(Ti), Ie = {
|
|
|
170
170
|
}, Hi = ({
|
|
171
171
|
className: e,
|
|
172
172
|
children: n
|
|
173
|
-
}) => /* @__PURE__ */
|
|
173
|
+
}) => /* @__PURE__ */ u(
|
|
174
174
|
"div",
|
|
175
175
|
{
|
|
176
|
-
className:
|
|
176
|
+
className: q("p-meter__label", e),
|
|
177
177
|
"data-testid": Oe.label,
|
|
178
178
|
children: n
|
|
179
179
|
}
|
|
180
180
|
);
|
|
181
181
|
Vi.Label = Hi;
|
|
182
|
-
const Gr = ({ children: e, to: n, ...t }) => /* @__PURE__ */
|
|
182
|
+
const Gr = ({ children: e, to: n, ...t }) => /* @__PURE__ */ u(ki, { ...t, href: n, rel: "noreferrer noopener", target: "_blank", children: e }), qi = ({
|
|
183
183
|
percentComplete: e
|
|
184
184
|
}) => /* @__PURE__ */ B("small", { className: "progress-indicator", children: [
|
|
185
185
|
e,
|
|
186
186
|
"% ",
|
|
187
|
-
/* @__PURE__ */
|
|
187
|
+
/* @__PURE__ */ u(qt, { className: "progress-indicator__spinner" })
|
|
188
188
|
] }), Gi = ({
|
|
189
189
|
text: e,
|
|
190
190
|
children: n,
|
|
@@ -192,110 +192,110 @@ const Gr = ({ children: e, to: n, ...t }) => /* @__PURE__ */ p(ki, { ...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: q("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
|
-
}, Bi = ({ children: e }) => /* @__PURE__ */
|
|
204
|
+
) : /* @__PURE__ */ u(we, { children: n });
|
|
205
|
+
}, Bi = ({ children: e }) => /* @__PURE__ */ u(we, { children: e }), Ui = ({
|
|
206
206
|
isCollapsed: e,
|
|
207
207
|
setIsCollapsed: n,
|
|
208
208
|
className: t
|
|
209
|
-
}) => /* @__PURE__ */
|
|
209
|
+
}) => /* @__PURE__ */ u(
|
|
210
210
|
Gt,
|
|
211
211
|
{
|
|
212
212
|
className: "p-side-navigation__tooltip-wrapper",
|
|
213
|
-
message: /* @__PURE__ */ B(
|
|
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__ */
|
|
222
|
-
|
|
221
|
+
children: /* @__PURE__ */ u(
|
|
222
|
+
_e,
|
|
223
223
|
{
|
|
224
224
|
appearance: "base",
|
|
225
225
|
"aria-label": `${e ? "expand" : "collapse"} main navigation`,
|
|
226
|
-
className:
|
|
226
|
+
className: q(
|
|
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
|
-
), Ki = ({ children: e }) => /* @__PURE__ */
|
|
237
|
+
), Ki = ({ children: e }) => /* @__PURE__ */ u("div", { className: "p-panel__content", children: /* @__PURE__ */ u("nav", { className: "p-side-navigation--icons is-dark", children: e }) }), Wi = ({ children: e }) => /* @__PURE__ */ u("div", { className: "p-panel__controls u-no-margin--top", children: e }), Yi = ({ children: e }) => /* @__PURE__ */ u("div", { className: "l-navigation__drawer", children: /* @__PURE__ */ u("div", { className: "p-panel is-dark", children: e }) }), Xi = ({ children: e }) => /* @__PURE__ */ u("div", { className: "p-panel__footer", children: e }), Qi = ({ children: e }) => /* @__PURE__ */ u("div", { className: "p-panel__header", children: e }), Ji = ({ light: e = !0, name: n }) => /* @__PURE__ */ u(Re, { className: "p-side-navigation__icon", light: e, name: n }), Zi = ({ children: e, className: n, hasActiveChild: t }) => /* @__PURE__ */ u("li", { className: q("p-side-navigation__item", n, { "has-active-child": t }), children: e }), eo = ({ children: e, id: n, variant: t = "base" }) => /* @__PURE__ */ u("span", { className: q("p-side-navigation__label", { "p-side-navigation__label--group": t === "group" }), id: n, children: e }), to = ({
|
|
238
238
|
as: e,
|
|
239
239
|
...n
|
|
240
|
-
}) => /* @__PURE__ */
|
|
240
|
+
}) => /* @__PURE__ */ u(
|
|
241
241
|
e || "a",
|
|
242
242
|
{
|
|
243
|
-
className:
|
|
243
|
+
className: q("p-side-navigation__link", n.className),
|
|
244
244
|
...n
|
|
245
245
|
}
|
|
246
|
-
), no = ({ children: e, className: n }) => /* @__PURE__ */
|
|
246
|
+
), no = ({ children: e, className: n }) => /* @__PURE__ */ u("ul", { className: q("p-side-navigation__list", n), children: e }), io = ({
|
|
247
247
|
as: e,
|
|
248
248
|
children: n,
|
|
249
249
|
className: t,
|
|
250
250
|
...i
|
|
251
|
-
}) => /* @__PURE__ */
|
|
251
|
+
}) => /* @__PURE__ */ u(e || "a", { className: q("p-panel__logo", t), ...i, children: /* @__PURE__ */ u("div", { className: "p-navigation__tagged-logo", children: n }) }), oo = ({ children: e }) => Ci(e, { className: "p-panel__logo-icon p-navigation__logo-icon" }), ao = ({ children: e, variant: n = "base" }) => /* @__PURE__ */ u(
|
|
252
252
|
"div",
|
|
253
253
|
{
|
|
254
|
-
className:
|
|
254
|
+
className: q("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
|
-
), ro = ({ children: e }) => /* @__PURE__ */
|
|
259
|
+
), ro = ({ children: e }) => /* @__PURE__ */ u("div", { className: "p-navigation__logo-tag", children: e }), lo = ({ children: e }) => /* @__PURE__ */ u("span", { className: "p-panel__logo-text", children: e }), so = ({
|
|
260
260
|
children: e,
|
|
261
261
|
className: n,
|
|
262
262
|
onClick: t
|
|
263
|
-
}) => /* @__PURE__ */
|
|
264
|
-
|
|
263
|
+
}) => /* @__PURE__ */ u(
|
|
264
|
+
_e,
|
|
265
265
|
{
|
|
266
266
|
appearance: "base",
|
|
267
|
-
className:
|
|
267
|
+
className: q(
|
|
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
|
-
), co = ({ children: e }) => /* @__PURE__ */
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
276
|
+
), co = ({ children: e }) => /* @__PURE__ */ u("span", { className: "p-side-navigation__text", children: e }), le = ({ children: e, className: n, isCollapsed: t }) => /* @__PURE__ */ u("header", { "aria-label": "main navigation", className: q("l-navigation is-maas", n, { "is-collapsed": t, "is-pinned": !t }), children: e }), po = ({ children: e, className: n }) => /* @__PURE__ */ u("header", { "aria-label": "navigation", className: "l-navigation-bar", children: /* @__PURE__ */ u("div", { className: q("p-panel is-dark", n), children: e }) });
|
|
277
|
+
le.Header = Qi;
|
|
278
|
+
le.Banner = Bi;
|
|
279
|
+
le.Drawer = Yi;
|
|
280
|
+
le.Controls = Wi;
|
|
281
|
+
le.CollapseToggle = Ui;
|
|
282
|
+
le.Content = Ki;
|
|
283
|
+
le.Footer = Xi;
|
|
284
|
+
le.List = no;
|
|
285
|
+
le.Item = Zi;
|
|
286
|
+
le.Link = to;
|
|
287
|
+
le.Text = co;
|
|
288
|
+
le.Icon = Ji;
|
|
289
|
+
le.Label = eo;
|
|
290
|
+
le.Logo = io;
|
|
291
|
+
le.LogoTag = ro;
|
|
292
|
+
le.LogoIcon = oo;
|
|
293
|
+
le.LogoName = ao;
|
|
294
|
+
le.LogoText = lo;
|
|
295
295
|
po.MenuButton = so;
|
|
296
296
|
const Ut = $n(null), zn = ({ children: e }) => {
|
|
297
297
|
const n = et();
|
|
298
|
-
return /* @__PURE__ */
|
|
298
|
+
return /* @__PURE__ */ u(Ut.Provider, { value: n, children: /* @__PURE__ */ u(
|
|
299
299
|
"div",
|
|
300
300
|
{
|
|
301
301
|
role: "group",
|
|
@@ -307,14 +307,14 @@ const Ut = $n(null), zn = ({ children: e }) => {
|
|
|
307
307
|
) });
|
|
308
308
|
}, uo = ({ children: e }) => {
|
|
309
309
|
const n = Ht(Ut);
|
|
310
|
-
return /* @__PURE__ */
|
|
310
|
+
return /* @__PURE__ */ u("label", { id: `${n}_label`, children: e });
|
|
311
311
|
}, go = ({ children: e }) => {
|
|
312
312
|
const n = Ht(Ut);
|
|
313
|
-
return /* @__PURE__ */
|
|
313
|
+
return /* @__PURE__ */ u("p", { className: "p-form-help-text", id: `${n}_description`, children: e });
|
|
314
314
|
};
|
|
315
315
|
zn.Label = uo;
|
|
316
316
|
zn.Description = go;
|
|
317
|
-
const Kt = ({ children: e }) => /* @__PURE__ */
|
|
317
|
+
const Kt = ({ children: e }) => /* @__PURE__ */ u("div", { className: "p-form-section", children: e }), fo = ({ children: e }) => /* @__PURE__ */ u("h5", { className: "p-form-section__title u-no-padding--top", children: e }), mo = ({ children: e }) => /* @__PURE__ */ u("p", { className: "p-form-help-text", children: e }), vo = ({ children: e }) => /* @__PURE__ */ u("div", { className: "p-form-section__content", children: e });
|
|
318
318
|
Kt.Title = fo;
|
|
319
319
|
Kt.Description = mo;
|
|
320
320
|
Kt.Content = vo;
|
|
@@ -337,14 +337,14 @@ function xo(e) {
|
|
|
337
337
|
const Vn = ue.createContext(null), Nn = ue.createContext([!1, () => {
|
|
338
338
|
}]), Ln = ({ children: e }) => {
|
|
339
339
|
const n = ue.useRef(null), t = xo(n), [i, o] = ue.useState(!1);
|
|
340
|
-
return /* @__PURE__ */
|
|
340
|
+
return /* @__PURE__ */ u(
|
|
341
341
|
"header",
|
|
342
342
|
{
|
|
343
|
-
className:
|
|
343
|
+
className: q("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(Nn.Provider, { value: [i, o], children: e }) })
|
|
348
348
|
}
|
|
349
349
|
);
|
|
350
350
|
}, ho = ({
|
|
@@ -352,10 +352,10 @@ 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: q("main-toolbar__title p-heading--4", t),
|
|
359
359
|
"data-testid": "main-toolbar-heading",
|
|
360
360
|
...i,
|
|
361
361
|
children: n
|
|
@@ -364,8 +364,8 @@ const Vn = ue.createContext(null), Nn = ue.createContext([!1, () => {
|
|
|
364
364
|
const n = ue.useContext(Vn), [t, i] = ue.useContext(Nn), o = ue.useRef(null);
|
|
365
365
|
return ue.useEffect(() => {
|
|
366
366
|
!o.current || !n || i(o.current.getBoundingClientRect().width > n.width);
|
|
367
|
-
}, [i, n, o]), /* @__PURE__ */ B(
|
|
368
|
-
/* @__PURE__ */
|
|
367
|
+
}, [i, n, o]), /* @__PURE__ */ B(we, { children: [
|
|
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: q("main-toolbar__controls", {
|
|
382
382
|
"main-toolbar__controls--stacked": t
|
|
383
383
|
}),
|
|
384
384
|
children: e
|
|
@@ -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
|
-
}, yo = ({ children: e, className: n, as: t, ...i }) => /* @__PURE__ */
|
|
398
|
+
const a = t || "section", r = q("content-section", n);
|
|
399
|
+
return /* @__PURE__ */ u(a, { ...o, className: r, children: /* @__PURE__ */ u(Fi, { children: /* @__PURE__ */ u(Pi, { size: i === "narrow" ? 6 : 12, children: /* @__PURE__ */ u(we, { children: e }) }) }) });
|
|
400
|
+
}, yo = ({ children: e, className: n, as: t, ...i }) => /* @__PURE__ */ u(
|
|
401
401
|
t || "h1",
|
|
402
402
|
{
|
|
403
403
|
...i,
|
|
404
|
-
className:
|
|
404
|
+
className: q("content-section__title p-heading--4", n),
|
|
405
405
|
children: e
|
|
406
406
|
}
|
|
407
|
-
), bo = ({ children: e, className: n }) => /* @__PURE__ */
|
|
407
|
+
), bo = ({ children: e, className: n }) => /* @__PURE__ */ u("header", { className: q("content-section__header", n), children: e }), So = ({ children: e, className: n }) => /* @__PURE__ */ u("div", { className: q("content-section__body", n), children: e }), Co = ({ children: e, className: n }) => /* @__PURE__ */ u("footer", { className: q("content-section__footer", n), children: e });
|
|
408
408
|
ot.Title = yo;
|
|
409
409
|
ot.Header = bo;
|
|
410
410
|
ot.Content = So;
|
|
@@ -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: q("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 }) }), _o = ({
|
|
428
428
|
className: e,
|
|
429
429
|
currentPage: n,
|
|
430
430
|
error: t,
|
|
@@ -435,26 +435,26 @@ const Hn = ({
|
|
|
435
435
|
onPreviousClick: l,
|
|
436
436
|
totalPages: s,
|
|
437
437
|
...c
|
|
438
|
-
}) => /* @__PURE__ */
|
|
438
|
+
}) => /* @__PURE__ */ u(
|
|
439
439
|
"nav",
|
|
440
440
|
{
|
|
441
441
|
"aria-label": (c == null ? void 0 : c["aria-label"]) || "pagination",
|
|
442
|
-
className:
|
|
442
|
+
className: q("p-pagination", e),
|
|
443
443
|
children: /* @__PURE__ */ B("span", { className: "p-pagination--items", children: [
|
|
444
|
-
/* @__PURE__ */
|
|
445
|
-
|
|
444
|
+
/* @__PURE__ */ u(
|
|
445
|
+
_e,
|
|
446
446
|
{
|
|
447
447
|
"aria-label": "Previous page",
|
|
448
448
|
className: "p-pagination__link--previous",
|
|
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
|
Ii,
|
|
459
459
|
{
|
|
460
460
|
"aria-label": "page number",
|
|
@@ -474,15 +474,15 @@ const Hn = ({
|
|
|
474
474
|
" of ",
|
|
475
475
|
s
|
|
476
476
|
] }),
|
|
477
|
-
/* @__PURE__ */
|
|
478
|
-
|
|
477
|
+
/* @__PURE__ */ u(
|
|
478
|
+
_e,
|
|
479
479
|
{
|
|
480
480
|
"aria-label": "Next page",
|
|
481
481
|
className: "p-pagination__link--next",
|
|
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] = ge(e), [r, l] = ge("");
|
|
497
|
+
return /* @__PURE__ */ u(
|
|
498
498
|
_o,
|
|
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: p, valueAsNumber: m } = g.target;
|
|
508
|
+
p ? (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: q("stepper__title", {
|
|
526
526
|
"stepper__title--is-active": o,
|
|
527
527
|
"stepper__title--is-complete": a
|
|
528
528
|
}),
|
|
@@ -543,8 +543,8 @@ var rn;
|
|
|
543
543
|
function Eo() {
|
|
544
544
|
if (rn) return K;
|
|
545
545
|
rn = 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, c = 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,
|
|
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, c = 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, p = e ? Symbol.for("react.memo") : 60115, m = e ? Symbol.for("react.lazy") : 60116, v = e ? Symbol.for("react.block") : 60121, E = e ? Symbol.for("react.fundamental") : 60117, h = e ? Symbol.for("react.responder") : 60118, A = e ? Symbol.for("react.scope") : 60119;
|
|
547
|
+
function k(x) {
|
|
548
548
|
if (typeof x == "object" && x !== null) {
|
|
549
549
|
var V = x.$$typeof;
|
|
550
550
|
switch (V) {
|
|
@@ -562,7 +562,7 @@ function Eo() {
|
|
|
562
562
|
case l:
|
|
563
563
|
case d:
|
|
564
564
|
case m:
|
|
565
|
-
case
|
|
565
|
+
case p:
|
|
566
566
|
case r:
|
|
567
567
|
return x;
|
|
568
568
|
default:
|
|
@@ -574,36 +574,36 @@ function Eo() {
|
|
|
574
574
|
}
|
|
575
575
|
}
|
|
576
576
|
}
|
|
577
|
-
function
|
|
578
|
-
return
|
|
577
|
+
function M(x) {
|
|
578
|
+
return k(x) === c;
|
|
579
579
|
}
|
|
580
|
-
return K.AsyncMode = s, K.ConcurrentMode = c, K.ContextConsumer = l, K.ContextProvider = r, K.Element = n, K.ForwardRef = d, K.Fragment = i, K.Lazy = m, K.Memo =
|
|
581
|
-
return
|
|
582
|
-
}, K.isConcurrentMode =
|
|
583
|
-
return
|
|
580
|
+
return K.AsyncMode = s, K.ConcurrentMode = c, K.ContextConsumer = l, K.ContextProvider = r, K.Element = n, K.ForwardRef = d, K.Fragment = i, K.Lazy = m, K.Memo = p, K.Portal = t, K.Profiler = a, K.StrictMode = o, K.Suspense = f, K.isAsyncMode = function(x) {
|
|
581
|
+
return M(x) || k(x) === s;
|
|
582
|
+
}, K.isConcurrentMode = M, K.isContextConsumer = function(x) {
|
|
583
|
+
return k(x) === l;
|
|
584
584
|
}, K.isContextProvider = function(x) {
|
|
585
|
-
return
|
|
585
|
+
return k(x) === r;
|
|
586
586
|
}, K.isElement = function(x) {
|
|
587
587
|
return typeof x == "object" && x !== null && x.$$typeof === n;
|
|
588
588
|
}, K.isForwardRef = function(x) {
|
|
589
|
-
return
|
|
589
|
+
return k(x) === d;
|
|
590
590
|
}, K.isFragment = function(x) {
|
|
591
|
-
return
|
|
591
|
+
return k(x) === i;
|
|
592
592
|
}, K.isLazy = function(x) {
|
|
593
|
-
return
|
|
593
|
+
return k(x) === m;
|
|
594
594
|
}, K.isMemo = function(x) {
|
|
595
|
-
return
|
|
595
|
+
return k(x) === p;
|
|
596
596
|
}, K.isPortal = function(x) {
|
|
597
|
-
return
|
|
597
|
+
return k(x) === t;
|
|
598
598
|
}, K.isProfiler = function(x) {
|
|
599
|
-
return
|
|
599
|
+
return k(x) === a;
|
|
600
600
|
}, K.isStrictMode = function(x) {
|
|
601
|
-
return
|
|
601
|
+
return k(x) === o;
|
|
602
602
|
}, K.isSuspense = function(x) {
|
|
603
|
-
return
|
|
603
|
+
return k(x) === f;
|
|
604
604
|
}, K.isValidElementType = function(x) {
|
|
605
|
-
return typeof x == "string" || typeof x == "function" || x === i || x === c || x === a || x === o || x === f || x === g || typeof x == "object" && x !== null && (x.$$typeof === m || x.$$typeof ===
|
|
606
|
-
}, K.typeOf =
|
|
605
|
+
return typeof x == "string" || typeof x == "function" || x === i || x === c || x === a || x === o || x === f || x === g || typeof x == "object" && x !== null && (x.$$typeof === m || x.$$typeof === p || x.$$typeof === r || x.$$typeof === l || x.$$typeof === d || x.$$typeof === E || x.$$typeof === h || x.$$typeof === A || x.$$typeof === v);
|
|
606
|
+
}, K.typeOf = k, K;
|
|
607
607
|
}
|
|
608
608
|
var W = {};
|
|
609
609
|
/** @license React v16.13.1
|
|
@@ -617,17 +617,17 @@ var W = {};
|
|
|
617
617
|
var ln;
|
|
618
618
|
function ko() {
|
|
619
619
|
return ln || (ln = 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, c = 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,
|
|
621
|
-
function
|
|
622
|
-
return typeof
|
|
623
|
-
|
|
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, c = 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, p = e ? Symbol.for("react.memo") : 60115, m = e ? Symbol.for("react.lazy") : 60116, v = e ? Symbol.for("react.block") : 60121, E = e ? Symbol.for("react.fundamental") : 60117, h = e ? Symbol.for("react.responder") : 60118, A = e ? Symbol.for("react.scope") : 60119;
|
|
621
|
+
function k(S) {
|
|
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 === c || S === a || S === o || S === f || S === g || typeof S == "object" && S !== null && (S.$$typeof === m || S.$$typeof === p || S.$$typeof === r || S.$$typeof === l || S.$$typeof === d || S.$$typeof === E || S.$$typeof === h || S.$$typeof === A || S.$$typeof === v);
|
|
624
624
|
}
|
|
625
|
-
function
|
|
626
|
-
if (typeof
|
|
627
|
-
var
|
|
628
|
-
switch (
|
|
625
|
+
function M(S) {
|
|
626
|
+
if (typeof S == "object" && S !== null) {
|
|
627
|
+
var ce = S.$$typeof;
|
|
628
|
+
switch (ce) {
|
|
629
629
|
case n:
|
|
630
|
-
var Fe =
|
|
630
|
+
var Fe = S.type;
|
|
631
631
|
switch (Fe) {
|
|
632
632
|
case s:
|
|
633
633
|
case c:
|
|
@@ -642,59 +642,59 @@ function ko() {
|
|
|
642
642
|
case l:
|
|
643
643
|
case d:
|
|
644
644
|
case m:
|
|
645
|
-
case
|
|
645
|
+
case p:
|
|
646
646
|
case r:
|
|
647
647
|
return Te;
|
|
648
648
|
default:
|
|
649
|
-
return
|
|
649
|
+
return ce;
|
|
650
650
|
}
|
|
651
651
|
}
|
|
652
652
|
case t:
|
|
653
|
-
return
|
|
653
|
+
return ce;
|
|
654
654
|
}
|
|
655
655
|
}
|
|
656
656
|
}
|
|
657
|
-
var x = s, V = c, H = l,
|
|
658
|
-
function te(
|
|
659
|
-
return
|
|
657
|
+
var x = s, V = c, H = l, Q = r, ie = n, Z = d, de = i, fe = m, D = p, R = t, G = a, J = o, ee = f, ae = !1;
|
|
658
|
+
function te(S) {
|
|
659
|
+
return ae || (ae = !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) || M(S) === s;
|
|
660
660
|
}
|
|
661
|
-
function w(
|
|
662
|
-
return
|
|
661
|
+
function w(S) {
|
|
662
|
+
return M(S) === c;
|
|
663
663
|
}
|
|
664
|
-
function
|
|
665
|
-
return
|
|
664
|
+
function _(S) {
|
|
665
|
+
return M(S) === l;
|
|
666
666
|
}
|
|
667
|
-
function N(
|
|
668
|
-
return
|
|
667
|
+
function N(S) {
|
|
668
|
+
return M(S) === r;
|
|
669
669
|
}
|
|
670
|
-
function S
|
|
671
|
-
return typeof
|
|
670
|
+
function L(S) {
|
|
671
|
+
return typeof S == "object" && S !== null && S.$$typeof === n;
|
|
672
672
|
}
|
|
673
|
-
function
|
|
674
|
-
return
|
|
673
|
+
function b(S) {
|
|
674
|
+
return M(S) === d;
|
|
675
675
|
}
|
|
676
|
-
function
|
|
677
|
-
return
|
|
676
|
+
function I(S) {
|
|
677
|
+
return M(S) === i;
|
|
678
678
|
}
|
|
679
|
-
function
|
|
680
|
-
return
|
|
679
|
+
function y(S) {
|
|
680
|
+
return M(S) === m;
|
|
681
681
|
}
|
|
682
|
-
function
|
|
683
|
-
return
|
|
682
|
+
function F(S) {
|
|
683
|
+
return M(S) === p;
|
|
684
684
|
}
|
|
685
|
-
function
|
|
686
|
-
return
|
|
685
|
+
function P(S) {
|
|
686
|
+
return M(S) === t;
|
|
687
687
|
}
|
|
688
|
-
function
|
|
689
|
-
return
|
|
688
|
+
function $(S) {
|
|
689
|
+
return M(S) === a;
|
|
690
690
|
}
|
|
691
|
-
function
|
|
692
|
-
return
|
|
691
|
+
function z(S) {
|
|
692
|
+
return M(S) === o;
|
|
693
693
|
}
|
|
694
|
-
function
|
|
695
|
-
return
|
|
694
|
+
function U(S) {
|
|
695
|
+
return M(S) === f;
|
|
696
696
|
}
|
|
697
|
-
W.AsyncMode = x, W.ConcurrentMode = V, W.ContextConsumer = H, W.ContextProvider =
|
|
697
|
+
W.AsyncMode = x, W.ConcurrentMode = V, W.ContextConsumer = H, W.ContextProvider = Q, W.Element = ie, W.ForwardRef = Z, W.Fragment = de, W.Lazy = fe, W.Memo = D, W.Portal = R, W.Profiler = G, W.StrictMode = J, W.Suspense = ee, W.isAsyncMode = te, W.isConcurrentMode = w, W.isContextConsumer = _, W.isContextProvider = N, W.isElement = L, W.isForwardRef = b, W.isFragment = I, W.isLazy = y, W.isMemo = F, W.isPortal = P, W.isProfiler = $, W.isStrictMode = z, W.isSuspense = U, W.isValidElementType = k, W.typeOf = M;
|
|
698
698
|
}()), W;
|
|
699
699
|
}
|
|
700
700
|
var sn;
|
|
@@ -800,9 +800,9 @@ function Po() {
|
|
|
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 p = c ? c() : "";
|
|
804
804
|
e(
|
|
805
|
-
"Failed " + l + " type: " + f.message + (
|
|
805
|
+
"Failed " + l + " type: " + f.message + (p ?? "")
|
|
806
806
|
);
|
|
807
807
|
}
|
|
808
808
|
}
|
|
@@ -832,11 +832,11 @@ function Io() {
|
|
|
832
832
|
return wt = function(l, s) {
|
|
833
833
|
var c = typeof Symbol == "function" && Symbol.iterator, d = "@@iterator";
|
|
834
834
|
function f(w) {
|
|
835
|
-
var
|
|
836
|
-
if (typeof
|
|
837
|
-
return
|
|
835
|
+
var _ = w && (c && w[c] || w[d]);
|
|
836
|
+
if (typeof _ == "function")
|
|
837
|
+
return _;
|
|
838
838
|
}
|
|
839
|
-
var g = "<<anonymous>>",
|
|
839
|
+
var g = "<<anonymous>>", p = {
|
|
840
840
|
array: h("array"),
|
|
841
841
|
bigint: h("bigint"),
|
|
842
842
|
bool: h("boolean"),
|
|
@@ -845,223 +845,223 @@ function Io() {
|
|
|
845
845
|
object: h("object"),
|
|
846
846
|
string: h("string"),
|
|
847
847
|
symbol: h("symbol"),
|
|
848
|
-
any:
|
|
849
|
-
arrayOf:
|
|
850
|
-
element:
|
|
848
|
+
any: A(),
|
|
849
|
+
arrayOf: k,
|
|
850
|
+
element: M(),
|
|
851
851
|
elementType: x(),
|
|
852
852
|
instanceOf: V,
|
|
853
|
-
node:
|
|
854
|
-
objectOf:
|
|
853
|
+
node: Z(),
|
|
854
|
+
objectOf: Q,
|
|
855
855
|
oneOf: H,
|
|
856
|
-
oneOfType:
|
|
857
|
-
shape:
|
|
856
|
+
oneOfType: ie,
|
|
857
|
+
shape: fe,
|
|
858
858
|
exact: D
|
|
859
859
|
};
|
|
860
|
-
function m(w,
|
|
861
|
-
return w ===
|
|
860
|
+
function m(w, _) {
|
|
861
|
+
return w === _ ? w !== 0 || 1 / w === 1 / _ : w !== w && _ !== _;
|
|
862
862
|
}
|
|
863
|
-
function v(w,
|
|
864
|
-
this.message = w, this.data =
|
|
863
|
+
function v(w, _) {
|
|
864
|
+
this.message = w, this.data = _ && typeof _ == "object" ? _ : {}, this.stack = "";
|
|
865
865
|
}
|
|
866
866
|
v.prototype = Error.prototype;
|
|
867
|
-
function
|
|
867
|
+
function E(w) {
|
|
868
868
|
if (process.env.NODE_ENV !== "production")
|
|
869
|
-
var
|
|
870
|
-
function
|
|
871
|
-
if (
|
|
869
|
+
var _ = {}, N = 0;
|
|
870
|
+
function L(I, y, F, P, $, z, U) {
|
|
871
|
+
if (P = P || g, z = z || F, U !== t) {
|
|
872
872
|
if (s) {
|
|
873
|
-
var
|
|
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
|
-
throw
|
|
876
|
+
throw S.name = "Invariant Violation", S;
|
|
877
877
|
} else if (process.env.NODE_ENV !== "production" && typeof console < "u") {
|
|
878
|
-
var
|
|
879
|
-
!
|
|
878
|
+
var ce = P + ":" + F;
|
|
879
|
+
!_[ce] && // Avoid spamming the console because they are often not actionable except for lib authors
|
|
880
880
|
N < 3 && (a(
|
|
881
|
-
"You are manually calling a React.PropTypes validation function for the `" +
|
|
882
|
-
),
|
|
881
|
+
"You are manually calling a React.PropTypes validation function for the `" + z + "` prop on `" + P + "`. 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
|
+
), _[ce] = !0, N++);
|
|
883
883
|
}
|
|
884
884
|
}
|
|
885
|
-
return
|
|
885
|
+
return y[F] == null ? I ? y[F] === null ? new v("The " + $ + " `" + z + "` is marked as required " + ("in `" + P + "`, but its value is `null`.")) : new v("The " + $ + " `" + z + "` is marked as required in " + ("`" + P + "`, but its value is `undefined`.")) : null : w(y, F, P, $, z);
|
|
886
886
|
}
|
|
887
|
-
var
|
|
888
|
-
return
|
|
887
|
+
var b = L.bind(null, !1);
|
|
888
|
+
return b.isRequired = L.bind(null, !0), b;
|
|
889
889
|
}
|
|
890
890
|
function h(w) {
|
|
891
|
-
function
|
|
892
|
-
var
|
|
893
|
-
if (
|
|
894
|
-
var
|
|
891
|
+
function _(N, L, b, I, y, F) {
|
|
892
|
+
var P = N[L], $ = J(P);
|
|
893
|
+
if ($ !== w) {
|
|
894
|
+
var z = ee(P);
|
|
895
895
|
return new v(
|
|
896
|
-
"Invalid " +
|
|
896
|
+
"Invalid " + I + " `" + y + "` of type " + ("`" + z + "` supplied to `" + b + "`, expected ") + ("`" + w + "`."),
|
|
897
897
|
{ expectedType: w }
|
|
898
898
|
);
|
|
899
899
|
}
|
|
900
900
|
return null;
|
|
901
901
|
}
|
|
902
|
-
return
|
|
902
|
+
return E(_);
|
|
903
903
|
}
|
|
904
|
-
function
|
|
905
|
-
return
|
|
904
|
+
function A() {
|
|
905
|
+
return E(r);
|
|
906
906
|
}
|
|
907
|
-
function
|
|
908
|
-
function
|
|
907
|
+
function k(w) {
|
|
908
|
+
function _(N, L, b, I, y) {
|
|
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 `" + y + "` of component `" + b + "` has invalid PropType notation inside arrayOf.");
|
|
911
|
+
var F = N[L];
|
|
912
|
+
if (!Array.isArray(F)) {
|
|
913
|
+
var P = J(F);
|
|
914
|
+
return new v("Invalid " + I + " `" + y + "` of type " + ("`" + P + "` supplied to `" + b + "`, expected an array."));
|
|
915
915
|
}
|
|
916
|
-
for (var
|
|
917
|
-
var
|
|
918
|
-
if (
|
|
919
|
-
return
|
|
916
|
+
for (var $ = 0; $ < F.length; $++) {
|
|
917
|
+
var z = w(F, $, b, I, y + "[" + $ + "]", t);
|
|
918
|
+
if (z instanceof Error)
|
|
919
|
+
return z;
|
|
920
920
|
}
|
|
921
921
|
return null;
|
|
922
922
|
}
|
|
923
|
-
return
|
|
923
|
+
return E(_);
|
|
924
924
|
}
|
|
925
|
-
function
|
|
926
|
-
function w(
|
|
927
|
-
var
|
|
928
|
-
if (!l(
|
|
929
|
-
var
|
|
930
|
-
return new v("Invalid " +
|
|
925
|
+
function M() {
|
|
926
|
+
function w(_, N, L, b, I) {
|
|
927
|
+
var y = _[N];
|
|
928
|
+
if (!l(y)) {
|
|
929
|
+
var F = J(y);
|
|
930
|
+
return new v("Invalid " + b + " `" + I + "` of type " + ("`" + F + "` supplied to `" + L + "`, expected a single ReactElement."));
|
|
931
931
|
}
|
|
932
932
|
return null;
|
|
933
933
|
}
|
|
934
|
-
return
|
|
934
|
+
return E(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(_, N, L, b, I) {
|
|
938
|
+
var y = _[N];
|
|
939
|
+
if (!e.isValidElementType(y)) {
|
|
940
|
+
var F = J(y);
|
|
941
|
+
return new v("Invalid " + b + " `" + I + "` of type " + ("`" + F + "` supplied to `" + L + "`, expected a single ReactElement type."));
|
|
942
942
|
}
|
|
943
943
|
return null;
|
|
944
944
|
}
|
|
945
|
-
return
|
|
945
|
+
return E(w);
|
|
946
946
|
}
|
|
947
947
|
function V(w) {
|
|
948
|
-
function
|
|
949
|
-
if (!(N[
|
|
950
|
-
var
|
|
951
|
-
return new v("Invalid " +
|
|
948
|
+
function _(N, L, b, I, y) {
|
|
949
|
+
if (!(N[L] instanceof w)) {
|
|
950
|
+
var F = w.name || g, P = te(N[L]);
|
|
951
|
+
return new v("Invalid " + I + " `" + y + "` of type " + ("`" + P + "` supplied to `" + b + "`, expected ") + ("instance of `" + F + "`."));
|
|
952
952
|
}
|
|
953
953
|
return null;
|
|
954
954
|
}
|
|
955
|
-
return
|
|
955
|
+
return E(_);
|
|
956
956
|
}
|
|
957
957
|
function H(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 _(N, L, b, I, y) {
|
|
963
|
+
for (var F = N[L], P = 0; P < w.length; P++)
|
|
964
|
+
if (m(F, w[P]))
|
|
965
965
|
return null;
|
|
966
|
-
var
|
|
967
|
-
var
|
|
968
|
-
return
|
|
966
|
+
var $ = JSON.stringify(w, function(U, S) {
|
|
967
|
+
var ce = ee(S);
|
|
968
|
+
return ce === "symbol" ? String(S) : S;
|
|
969
969
|
});
|
|
970
|
-
return new v("Invalid " +
|
|
970
|
+
return new v("Invalid " + I + " `" + y + "` of value `" + String(F) + "` " + ("supplied to `" + b + "`, expected one of " + $ + "."));
|
|
971
971
|
}
|
|
972
|
-
return
|
|
972
|
+
return E(_);
|
|
973
973
|
}
|
|
974
|
-
function
|
|
975
|
-
function
|
|
974
|
+
function Q(w) {
|
|
975
|
+
function _(N, L, b, I, y) {
|
|
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 `" + y + "` of component `" + b + "` has invalid PropType notation inside objectOf.");
|
|
978
|
+
var F = N[L], P = J(F);
|
|
979
|
+
if (P !== "object")
|
|
980
|
+
return new v("Invalid " + I + " `" + y + "` of type " + ("`" + P + "` supplied to `" + b + "`, expected an object."));
|
|
981
|
+
for (var $ in F)
|
|
982
|
+
if (i(F, $)) {
|
|
983
|
+
var z = w(F, $, b, I, y + "." + $, t);
|
|
984
|
+
if (z instanceof Error)
|
|
985
|
+
return z;
|
|
986
986
|
}
|
|
987
987
|
return null;
|
|
988
988
|
}
|
|
989
|
-
return
|
|
989
|
+
return E(_);
|
|
990
990
|
}
|
|
991
|
-
function
|
|
991
|
+
function ie(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 N = w[
|
|
994
|
+
for (var _ = 0; _ < w.length; _++) {
|
|
995
|
+
var N = w[_];
|
|
996
996
|
if (typeof N != "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 " + ae(N) + " at index " + _ + "."
|
|
999
999
|
), r;
|
|
1000
1000
|
}
|
|
1001
|
-
function
|
|
1002
|
-
for (var
|
|
1003
|
-
var
|
|
1004
|
-
if (
|
|
1001
|
+
function L(b, I, y, F, P) {
|
|
1002
|
+
for (var $ = [], z = 0; z < w.length; z++) {
|
|
1003
|
+
var U = w[z], S = U(b, I, y, F, P, t);
|
|
1004
|
+
if (S == null)
|
|
1005
1005
|
return null;
|
|
1006
|
-
|
|
1006
|
+
S.data && i(S.data, "expectedType") && $.push(S.data.expectedType);
|
|
1007
1007
|
}
|
|
1008
|
-
var
|
|
1009
|
-
return new v("Invalid " +
|
|
1008
|
+
var ce = $.length > 0 ? ", expected one of type [" + $.join(", ") + "]" : "";
|
|
1009
|
+
return new v("Invalid " + F + " `" + P + "` supplied to " + ("`" + y + "`" + ce + "."));
|
|
1010
1010
|
}
|
|
1011
|
-
return
|
|
1011
|
+
return E(L);
|
|
1012
1012
|
}
|
|
1013
|
-
function
|
|
1014
|
-
function w(
|
|
1015
|
-
return
|
|
1013
|
+
function Z() {
|
|
1014
|
+
function w(_, N, L, b, I) {
|
|
1015
|
+
return R(_[N]) ? null : new v("Invalid " + b + " `" + I + "` supplied to " + ("`" + L + "`, expected a ReactNode."));
|
|
1016
1016
|
}
|
|
1017
|
-
return
|
|
1017
|
+
return E(w);
|
|
1018
1018
|
}
|
|
1019
|
-
function
|
|
1019
|
+
function de(w, _, N, L, b) {
|
|
1020
1020
|
return new v(
|
|
1021
|
-
(w || "React class") + ": " +
|
|
1021
|
+
(w || "React class") + ": " + _ + " type `" + N + "." + L + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + b + "`."
|
|
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 fe(w) {
|
|
1025
|
+
function _(N, L, b, I, y) {
|
|
1026
|
+
var F = N[L], P = J(F);
|
|
1027
|
+
if (P !== "object")
|
|
1028
|
+
return new v("Invalid " + I + " `" + y + "` of type `" + P + "` " + ("supplied to `" + b + "`, expected `object`."));
|
|
1029
|
+
for (var $ in w) {
|
|
1030
|
+
var z = w[$];
|
|
1031
|
+
if (typeof z != "function")
|
|
1032
|
+
return de(b, I, y, $, ee(z));
|
|
1033
|
+
var U = z(F, $, b, I, y + "." + $, t);
|
|
1034
|
+
if (U)
|
|
1035
|
+
return U;
|
|
1036
1036
|
}
|
|
1037
1037
|
return null;
|
|
1038
1038
|
}
|
|
1039
|
-
return
|
|
1039
|
+
return E(_);
|
|
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 _(N, L, b, I, y) {
|
|
1043
|
+
var F = N[L], P = J(F);
|
|
1044
|
+
if (P !== "object")
|
|
1045
|
+
return new v("Invalid " + I + " `" + y + "` of type `" + P + "` " + ("supplied to `" + b + "`, expected `object`."));
|
|
1046
|
+
var $ = n({}, N[L], w);
|
|
1047
|
+
for (var z in $) {
|
|
1048
|
+
var U = w[z];
|
|
1049
|
+
if (i(w, z) && typeof U != "function")
|
|
1050
|
+
return de(b, I, y, z, ee(U));
|
|
1051
|
+
if (!U)
|
|
1052
1052
|
return new v(
|
|
1053
|
-
"Invalid " +
|
|
1053
|
+
"Invalid " + I + " `" + y + "` key `" + z + "` supplied to `" + b + "`.\nBad object: " + JSON.stringify(N[L], null, " ") + `
|
|
1054
1054
|
Valid keys: ` + JSON.stringify(Object.keys(w), null, " ")
|
|
1055
1055
|
);
|
|
1056
|
-
var
|
|
1057
|
-
if (
|
|
1058
|
-
return
|
|
1056
|
+
var S = U(F, z, b, I, y + "." + z, t);
|
|
1057
|
+
if (S)
|
|
1058
|
+
return S;
|
|
1059
1059
|
}
|
|
1060
1060
|
return null;
|
|
1061
1061
|
}
|
|
1062
|
-
return
|
|
1062
|
+
return E(_);
|
|
1063
1063
|
}
|
|
1064
|
-
function
|
|
1064
|
+
function R(w) {
|
|
1065
1065
|
switch (typeof w) {
|
|
1066
1066
|
case "number":
|
|
1067
1067
|
case "string":
|
|
@@ -1071,20 +1071,20 @@ Valid keys: ` + JSON.stringify(Object.keys(w), null, " ")
|
|
|
1071
1071
|
return !w;
|
|
1072
1072
|
case "object":
|
|
1073
1073
|
if (Array.isArray(w))
|
|
1074
|
-
return w.every(
|
|
1074
|
+
return w.every(R);
|
|
1075
1075
|
if (w === null || l(w))
|
|
1076
1076
|
return !0;
|
|
1077
|
-
var
|
|
1078
|
-
if (
|
|
1079
|
-
var N =
|
|
1080
|
-
if (
|
|
1081
|
-
for (; !(
|
|
1082
|
-
if (!
|
|
1077
|
+
var _ = f(w);
|
|
1078
|
+
if (_) {
|
|
1079
|
+
var N = _.call(w), L;
|
|
1080
|
+
if (_ !== w.entries) {
|
|
1081
|
+
for (; !(L = N.next()).done; )
|
|
1082
|
+
if (!R(L.value))
|
|
1083
1083
|
return !1;
|
|
1084
1084
|
} else
|
|
1085
|
-
for (; !(
|
|
1086
|
-
var
|
|
1087
|
-
if (
|
|
1085
|
+
for (; !(L = N.next()).done; ) {
|
|
1086
|
+
var b = L.value;
|
|
1087
|
+
if (b && !R(b[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 G(w, _) {
|
|
1098
|
+
return w === "symbol" ? !0 : _ ? _["@@toStringTag"] === "Symbol" || typeof Symbol == "function" && _ instanceof Symbol : !1;
|
|
1099
1099
|
}
|
|
1100
|
-
function
|
|
1101
|
-
var
|
|
1102
|
-
return Array.isArray(w) ? "array" : w instanceof RegExp ? "object" :
|
|
1100
|
+
function J(w) {
|
|
1101
|
+
var _ = typeof w;
|
|
1102
|
+
return Array.isArray(w) ? "array" : w instanceof RegExp ? "object" : G(_, w) ? "symbol" : _;
|
|
1103
1103
|
}
|
|
1104
|
-
function
|
|
1104
|
+
function ee(w) {
|
|
1105
1105
|
if (typeof w > "u" || w === null)
|
|
1106
1106
|
return "" + w;
|
|
1107
|
-
var
|
|
1108
|
-
if (
|
|
1107
|
+
var _ = J(w);
|
|
1108
|
+
if (_ === "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 _;
|
|
1115
1115
|
}
|
|
1116
|
-
function
|
|
1117
|
-
var
|
|
1118
|
-
switch (
|
|
1116
|
+
function ae(w) {
|
|
1117
|
+
var _ = ee(w);
|
|
1118
|
+
switch (_) {
|
|
1119
1119
|
case "array":
|
|
1120
1120
|
case "object":
|
|
1121
|
-
return "an " +
|
|
1121
|
+
return "an " + _;
|
|
1122
1122
|
case "boolean":
|
|
1123
1123
|
case "date":
|
|
1124
1124
|
case "regexp":
|
|
1125
|
-
return "a " +
|
|
1125
|
+
return "a " + _;
|
|
1126
1126
|
default:
|
|
1127
|
-
return
|
|
1127
|
+
return _;
|
|
1128
1128
|
}
|
|
1129
1129
|
}
|
|
1130
1130
|
function te(w) {
|
|
1131
1131
|
return !w.constructor || !w.constructor.name ? g : w.constructor.name;
|
|
1132
1132
|
}
|
|
1133
|
-
return
|
|
1133
|
+
return p.checkPropTypes = o, p.resetWarningCache = o.resetWarningCache, p.PropTypes = p, p;
|
|
1134
1134
|
}, wt;
|
|
1135
1135
|
}
|
|
1136
1136
|
var yt, fn;
|
|
@@ -1192,7 +1192,7 @@ function $o() {
|
|
|
1192
1192
|
return Ue.exports;
|
|
1193
1193
|
}
|
|
1194
1194
|
var Ao = /* @__PURE__ */ $o();
|
|
1195
|
-
const
|
|
1195
|
+
const Y = /* @__PURE__ */ Bt(Ao);
|
|
1196
1196
|
function De(e, n, t, i) {
|
|
1197
1197
|
function o(a) {
|
|
1198
1198
|
return a instanceof t ? a : new t(function(r) {
|
|
@@ -2711,7 +2711,7 @@ function Pe(e) {
|
|
|
2711
2711
|
function la(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 c = Yn(s, t), d = He(c, 1), f = d[0], g = Xn(s, i, o),
|
|
2714
|
+
var c = Yn(s, t), d = He(c, 1), f = d[0], g = Xn(s, i, o), p = He(g, 1), m = p[0], v = l ? l(s) : null;
|
|
2715
2715
|
return f && m && !v;
|
|
2716
2716
|
});
|
|
2717
2717
|
}
|
|
@@ -2736,7 +2736,7 @@ function pa() {
|
|
|
2736
2736
|
var e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : window.navigator.userAgent;
|
|
2737
2737
|
return sa(e) || ca(e);
|
|
2738
2738
|
}
|
|
2739
|
-
function
|
|
2739
|
+
function ye() {
|
|
2740
2740
|
for (var e = arguments.length, n = new Array(e), t = 0; t < e; t++)
|
|
2741
2741
|
n[t] = arguments[t];
|
|
2742
2742
|
return function(i) {
|
|
@@ -2855,7 +2855,7 @@ function En(e, n) {
|
|
|
2855
2855
|
}
|
|
2856
2856
|
return t;
|
|
2857
2857
|
}
|
|
2858
|
-
function
|
|
2858
|
+
function ne(e) {
|
|
2859
2859
|
for (var n = 1; n < arguments.length; n++) {
|
|
2860
2860
|
var t = arguments[n] != null ? arguments[n] : {};
|
|
2861
2861
|
n % 2 ? En(Object(t), !0).forEach(function(i) {
|
|
@@ -2892,7 +2892,7 @@ var Yt = /* @__PURE__ */ _i(function(e, n) {
|
|
|
2892
2892
|
return {
|
|
2893
2893
|
open: a
|
|
2894
2894
|
};
|
|
2895
|
-
}, [a]), /* @__PURE__ */ Si.createElement(Mn, null, t(
|
|
2895
|
+
}, [a]), /* @__PURE__ */ Si.createElement(Mn, null, t(ne(ne({}, r), {}, {
|
|
2896
2896
|
open: a
|
|
2897
2897
|
})));
|
|
2898
2898
|
});
|
|
@@ -2930,7 +2930,7 @@ Yt.propTypes = {
|
|
|
2930
2930
|
* @param {File[]} params.acceptedFiles Accepted files
|
|
2931
2931
|
* @param {FileRejection[]} params.fileRejections Rejected files and why they were rejected
|
|
2932
2932
|
*/
|
|
2933
|
-
children:
|
|
2933
|
+
children: Y.func,
|
|
2934
2934
|
/**
|
|
2935
2935
|
* Set accepted file types.
|
|
2936
2936
|
* Checkout https://developer.mozilla.org/en-US/docs/Web/API/window/showOpenFilePicker types option for more information.
|
|
@@ -2938,90 +2938,90 @@ Yt.propTypes = {
|
|
|
2938
2938
|
* for example, are reported as text/plain under macOS but as application/vnd.ms-excel under
|
|
2939
2939
|
* Windows. In some cases there might not be a mime type set at all (https://github.com/react-dropzone/react-dropzone/issues/276).
|
|
2940
2940
|
*/
|
|
2941
|
-
accept:
|
|
2941
|
+
accept: Y.objectOf(Y.arrayOf(Y.string)),
|
|
2942
2942
|
/**
|
|
2943
2943
|
* Allow drag 'n' drop (or selection from the file dialog) of multiple files
|
|
2944
2944
|
*/
|
|
2945
|
-
multiple:
|
|
2945
|
+
multiple: Y.bool,
|
|
2946
2946
|
/**
|
|
2947
2947
|
* If false, allow dropped items to take over the current browser window
|
|
2948
2948
|
*/
|
|
2949
|
-
preventDropOnDocument:
|
|
2949
|
+
preventDropOnDocument: Y.bool,
|
|
2950
2950
|
/**
|
|
2951
2951
|
* If true, disables click to open the native file selection dialog
|
|
2952
2952
|
*/
|
|
2953
|
-
noClick:
|
|
2953
|
+
noClick: Y.bool,
|
|
2954
2954
|
/**
|
|
2955
2955
|
* If true, disables SPACE/ENTER to open the native file selection dialog.
|
|
2956
2956
|
* Note that it also stops tracking the focus state.
|
|
2957
2957
|
*/
|
|
2958
|
-
noKeyboard:
|
|
2958
|
+
noKeyboard: Y.bool,
|
|
2959
2959
|
/**
|
|
2960
2960
|
* If true, disables drag 'n' drop
|
|
2961
2961
|
*/
|
|
2962
|
-
noDrag:
|
|
2962
|
+
noDrag: Y.bool,
|
|
2963
2963
|
/**
|
|
2964
2964
|
* If true, stops drag event propagation to parents
|
|
2965
2965
|
*/
|
|
2966
|
-
noDragEventsBubbling:
|
|
2966
|
+
noDragEventsBubbling: Y.bool,
|
|
2967
2967
|
/**
|
|
2968
2968
|
* Minimum file size (in bytes)
|
|
2969
2969
|
*/
|
|
2970
|
-
minSize:
|
|
2970
|
+
minSize: Y.number,
|
|
2971
2971
|
/**
|
|
2972
2972
|
* Maximum file size (in bytes)
|
|
2973
2973
|
*/
|
|
2974
|
-
maxSize:
|
|
2974
|
+
maxSize: Y.number,
|
|
2975
2975
|
/**
|
|
2976
2976
|
* Maximum accepted number of files
|
|
2977
2977
|
* The default value is 0 which means there is no limitation to how many files are accepted.
|
|
2978
2978
|
*/
|
|
2979
|
-
maxFiles:
|
|
2979
|
+
maxFiles: Y.number,
|
|
2980
2980
|
/**
|
|
2981
2981
|
* Enable/disable the dropzone
|
|
2982
2982
|
*/
|
|
2983
|
-
disabled:
|
|
2983
|
+
disabled: Y.bool,
|
|
2984
2984
|
/**
|
|
2985
2985
|
* Use this to provide a custom file aggregator
|
|
2986
2986
|
*
|
|
2987
2987
|
* @param {(DragEvent|Event|Array<FileSystemFileHandle>)} event A drag event or input change event (if files were selected via the file dialog)
|
|
2988
2988
|
*/
|
|
2989
|
-
getFilesFromEvent:
|
|
2989
|
+
getFilesFromEvent: Y.func,
|
|
2990
2990
|
/**
|
|
2991
2991
|
* Cb for when closing the file dialog with no selection
|
|
2992
2992
|
*/
|
|
2993
|
-
onFileDialogCancel:
|
|
2993
|
+
onFileDialogCancel: Y.func,
|
|
2994
2994
|
/**
|
|
2995
2995
|
* Cb for when opening the file dialog
|
|
2996
2996
|
*/
|
|
2997
|
-
onFileDialogOpen:
|
|
2997
|
+
onFileDialogOpen: Y.func,
|
|
2998
2998
|
/**
|
|
2999
2999
|
* Set to true to use the https://developer.mozilla.org/en-US/docs/Web/API/File_System_Access_API
|
|
3000
3000
|
* to open the file picker instead of using an `<input type="file">` click event.
|
|
3001
3001
|
*/
|
|
3002
|
-
useFsAccessApi:
|
|
3002
|
+
useFsAccessApi: Y.bool,
|
|
3003
3003
|
/**
|
|
3004
3004
|
* Set to true to focus the root element on render
|
|
3005
3005
|
*/
|
|
3006
|
-
autoFocus:
|
|
3006
|
+
autoFocus: Y.bool,
|
|
3007
3007
|
/**
|
|
3008
3008
|
* Cb for when the `dragenter` event occurs.
|
|
3009
3009
|
*
|
|
3010
3010
|
* @param {DragEvent} event
|
|
3011
3011
|
*/
|
|
3012
|
-
onDragEnter:
|
|
3012
|
+
onDragEnter: Y.func,
|
|
3013
3013
|
/**
|
|
3014
3014
|
* Cb for when the `dragleave` event occurs
|
|
3015
3015
|
*
|
|
3016
3016
|
* @param {DragEvent} event
|
|
3017
3017
|
*/
|
|
3018
|
-
onDragLeave:
|
|
3018
|
+
onDragLeave: Y.func,
|
|
3019
3019
|
/**
|
|
3020
3020
|
* Cb for when the `dragover` event occurs
|
|
3021
3021
|
*
|
|
3022
3022
|
* @param {DragEvent} event
|
|
3023
3023
|
*/
|
|
3024
|
-
onDragOver:
|
|
3024
|
+
onDragOver: Y.func,
|
|
3025
3025
|
/**
|
|
3026
3026
|
* Cb for when the `drop` event occurs.
|
|
3027
3027
|
* Note that this callback is invoked after the `getFilesFromEvent` callback is done.
|
|
@@ -3052,7 +3052,7 @@ Yt.propTypes = {
|
|
|
3052
3052
|
* @param {FileRejection[]} fileRejections
|
|
3053
3053
|
* @param {(DragEvent|Event)} event A drag event or input change event (if files were selected via the file dialog)
|
|
3054
3054
|
*/
|
|
3055
|
-
onDrop:
|
|
3055
|
+
onDrop: Y.func,
|
|
3056
3056
|
/**
|
|
3057
3057
|
* Cb for when the `drop` event occurs.
|
|
3058
3058
|
* Note that if no files are accepted, this callback is not invoked.
|
|
@@ -3060,7 +3060,7 @@ Yt.propTypes = {
|
|
|
3060
3060
|
* @param {File[]} files
|
|
3061
3061
|
* @param {(DragEvent|Event)} event
|
|
3062
3062
|
*/
|
|
3063
|
-
onDropAccepted:
|
|
3063
|
+
onDropAccepted: Y.func,
|
|
3064
3064
|
/**
|
|
3065
3065
|
* Cb for when the `drop` event occurs.
|
|
3066
3066
|
* Note that if no files are rejected, this callback is not invoked.
|
|
@@ -3068,19 +3068,19 @@ Yt.propTypes = {
|
|
|
3068
3068
|
* @param {FileRejection[]} fileRejections
|
|
3069
3069
|
* @param {(DragEvent|Event)} event
|
|
3070
3070
|
*/
|
|
3071
|
-
onDropRejected:
|
|
3071
|
+
onDropRejected: Y.func,
|
|
3072
3072
|
/**
|
|
3073
3073
|
* Cb for when there's some error from any of the promises.
|
|
3074
3074
|
*
|
|
3075
3075
|
* @param {Error} error
|
|
3076
3076
|
*/
|
|
3077
|
-
onError:
|
|
3077
|
+
onError: Y.func,
|
|
3078
3078
|
/**
|
|
3079
3079
|
* Custom validation function. It must return null if there's no errors.
|
|
3080
3080
|
* @param {File} file
|
|
3081
3081
|
* @returns {FileError|FileError[]|null}
|
|
3082
3082
|
*/
|
|
3083
|
-
validator:
|
|
3083
|
+
validator: Y.func
|
|
3084
3084
|
};
|
|
3085
3085
|
var Ot = {
|
|
3086
3086
|
isFocused: !1,
|
|
@@ -3092,156 +3092,156 @@ 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 = ne(ne({}, ei), e), t = n.accept, i = n.disabled, o = n.getFilesFromEvent, a = n.maxSize, r = n.minSize, l = n.multiple, s = n.maxFiles, c = n.onDragEnter, d = n.onDragLeave, f = n.onDragOver, g = n.onDrop, p = n.onDropAccepted, m = n.onDropRejected, v = n.onFileDialogCancel, E = n.onFileDialogOpen, h = n.useFsAccessApi, A = n.autoFocus, k = n.preventDropOnDocument, M = n.noClick, x = n.noKeyboard, V = n.noDrag, H = n.noDragEventsBubbling, Q = n.onError, ie = n.validator, Z = se(function() {
|
|
3096
3096
|
return ga(t);
|
|
3097
|
-
}, [t]),
|
|
3097
|
+
}, [t]), de = se(function() {
|
|
3098
3098
|
return da(t);
|
|
3099
|
-
}, [t]),
|
|
3100
|
-
return typeof
|
|
3101
|
-
}, [
|
|
3099
|
+
}, [t]), fe = se(function() {
|
|
3100
|
+
return typeof E == "function" ? E : kn;
|
|
3101
|
+
}, [E]), D = se(function() {
|
|
3102
3102
|
return typeof v == "function" ? v : kn;
|
|
3103
|
-
}, [v]),
|
|
3104
|
-
!N.current &&
|
|
3105
|
-
if (
|
|
3106
|
-
var T =
|
|
3103
|
+
}, [v]), R = be(null), G = be(null), J = An(Fa, Ot), ee = St(J, 2), ae = ee[0], te = ee[1], w = ae.isFocused, _ = ae.isFileDialogActive, N = be(typeof window < "u" && window.isSecureContext && h && ua()), L = function() {
|
|
3104
|
+
!N.current && _ && setTimeout(function() {
|
|
3105
|
+
if (G.current) {
|
|
3106
|
+
var T = G.current.files;
|
|
3107
3107
|
T.length || (te({
|
|
3108
3108
|
type: "closeDialog"
|
|
3109
3109
|
}), D());
|
|
3110
3110
|
}
|
|
3111
3111
|
}, 300);
|
|
3112
3112
|
};
|
|
3113
|
-
|
|
3114
|
-
return window.addEventListener("focus",
|
|
3115
|
-
window.removeEventListener("focus",
|
|
3113
|
+
Ce(function() {
|
|
3114
|
+
return window.addEventListener("focus", L, !1), function() {
|
|
3115
|
+
window.removeEventListener("focus", L, !1);
|
|
3116
3116
|
};
|
|
3117
|
-
}, [
|
|
3118
|
-
var
|
|
3119
|
-
|
|
3117
|
+
}, [G, _, D, N]);
|
|
3118
|
+
var b = be([]), I = function(T) {
|
|
3119
|
+
R.current && R.current.contains(T.target) || (T.preventDefault(), b.current = []);
|
|
3120
3120
|
};
|
|
3121
|
-
|
|
3122
|
-
return
|
|
3123
|
-
|
|
3121
|
+
Ce(function() {
|
|
3122
|
+
return k && (document.addEventListener("dragover", Rn, !1), document.addEventListener("drop", I, !1)), function() {
|
|
3123
|
+
k && (document.removeEventListener("dragover", Rn), document.removeEventListener("drop", I));
|
|
3124
3124
|
};
|
|
3125
|
-
}, [
|
|
3126
|
-
return !i &&
|
|
3125
|
+
}, [R, k]), Ce(function() {
|
|
3126
|
+
return !i && A && R.current && R.current.focus(), function() {
|
|
3127
3127
|
};
|
|
3128
|
-
}, [
|
|
3129
|
-
var
|
|
3130
|
-
|
|
3131
|
-
}, [
|
|
3132
|
-
|
|
3133
|
-
if (!(nt(
|
|
3134
|
-
var
|
|
3128
|
+
}, [R, A, i]);
|
|
3129
|
+
var y = X(function(C) {
|
|
3130
|
+
Q ? Q(C) : console.error(C);
|
|
3131
|
+
}, [Q]), F = X(function(C) {
|
|
3132
|
+
C.preventDefault(), C.persist(), Ge(C), b.current = [].concat(ya(b.current), [C.target]), Ye(C) && Promise.resolve(o(C)).then(function(T) {
|
|
3133
|
+
if (!(nt(C) && !H)) {
|
|
3134
|
+
var oe = T.length, re = oe > 0 && la({
|
|
3135
3135
|
files: T,
|
|
3136
|
-
accept:
|
|
3136
|
+
accept: Z,
|
|
3137
3137
|
minSize: r,
|
|
3138
3138
|
maxSize: a,
|
|
3139
3139
|
multiple: l,
|
|
3140
3140
|
maxFiles: s,
|
|
3141
|
-
validator:
|
|
3142
|
-
}),
|
|
3141
|
+
validator: ie
|
|
3142
|
+
}), me = oe > 0 && !re;
|
|
3143
3143
|
te({
|
|
3144
|
-
isDragAccept:
|
|
3145
|
-
isDragReject:
|
|
3144
|
+
isDragAccept: re,
|
|
3145
|
+
isDragReject: me,
|
|
3146
3146
|
isDragActive: !0,
|
|
3147
3147
|
type: "setDraggedFiles"
|
|
3148
|
-
}), c && c(
|
|
3148
|
+
}), c && c(C);
|
|
3149
3149
|
}
|
|
3150
3150
|
}).catch(function(T) {
|
|
3151
|
-
return
|
|
3151
|
+
return y(T);
|
|
3152
3152
|
});
|
|
3153
|
-
}, [o, c,
|
|
3154
|
-
|
|
3155
|
-
var T = Ye(
|
|
3156
|
-
if (T &&
|
|
3153
|
+
}, [o, c, y, H, Z, r, a, l, s, ie]), P = X(function(C) {
|
|
3154
|
+
C.preventDefault(), C.persist(), Ge(C);
|
|
3155
|
+
var T = Ye(C);
|
|
3156
|
+
if (T && C.dataTransfer)
|
|
3157
3157
|
try {
|
|
3158
|
-
|
|
3158
|
+
C.dataTransfer.dropEffect = "copy";
|
|
3159
3159
|
} catch {
|
|
3160
3160
|
}
|
|
3161
|
-
return T && f && f(
|
|
3162
|
-
}, [f, H]),
|
|
3163
|
-
|
|
3164
|
-
var T =
|
|
3165
|
-
return
|
|
3166
|
-
}),
|
|
3167
|
-
|
|
3161
|
+
return T && f && f(C), !1;
|
|
3162
|
+
}, [f, H]), $ = X(function(C) {
|
|
3163
|
+
C.preventDefault(), C.persist(), Ge(C);
|
|
3164
|
+
var T = b.current.filter(function(re) {
|
|
3165
|
+
return R.current && R.current.contains(re);
|
|
3166
|
+
}), oe = T.indexOf(C.target);
|
|
3167
|
+
oe !== -1 && T.splice(oe, 1), b.current = T, !(T.length > 0) && (te({
|
|
3168
3168
|
type: "setDraggedFiles",
|
|
3169
3169
|
isDragActive: !1,
|
|
3170
3170
|
isDragAccept: !1,
|
|
3171
3171
|
isDragReject: !1
|
|
3172
|
-
}), Ye(
|
|
3173
|
-
}, [
|
|
3174
|
-
var
|
|
3175
|
-
|
|
3176
|
-
var ze = Yn(
|
|
3172
|
+
}), Ye(C) && d && d(C));
|
|
3173
|
+
}, [R, d, H]), z = X(function(C, T) {
|
|
3174
|
+
var oe = [], re = [];
|
|
3175
|
+
C.forEach(function(me) {
|
|
3176
|
+
var ze = Yn(me, Z), Ae = St(ze, 2), lt = Ae[0], st = Ae[1], ct = Xn(me, r, a), Be = St(ct, 2), pt = Be[0], ut = Be[1], dt = ie ? ie(me) : null;
|
|
3177
3177
|
if (lt && pt && !dt)
|
|
3178
|
-
|
|
3178
|
+
oe.push(me);
|
|
3179
3179
|
else {
|
|
3180
3180
|
var gt = [st, ut];
|
|
3181
|
-
dt && (gt = gt.concat(dt)),
|
|
3182
|
-
file:
|
|
3181
|
+
dt && (gt = gt.concat(dt)), re.push({
|
|
3182
|
+
file: me,
|
|
3183
3183
|
errors: gt.filter(function(bi) {
|
|
3184
3184
|
return bi;
|
|
3185
3185
|
})
|
|
3186
3186
|
});
|
|
3187
3187
|
}
|
|
3188
|
-
}), (!l &&
|
|
3189
|
-
|
|
3190
|
-
file:
|
|
3188
|
+
}), (!l && oe.length > 1 || l && s >= 1 && oe.length > s) && (oe.forEach(function(me) {
|
|
3189
|
+
re.push({
|
|
3190
|
+
file: me,
|
|
3191
3191
|
errors: [ra]
|
|
3192
3192
|
});
|
|
3193
|
-
}),
|
|
3194
|
-
acceptedFiles:
|
|
3195
|
-
fileRejections:
|
|
3196
|
-
isDragReject:
|
|
3193
|
+
}), oe.splice(0)), te({
|
|
3194
|
+
acceptedFiles: oe,
|
|
3195
|
+
fileRejections: re,
|
|
3196
|
+
isDragReject: re.length > 0,
|
|
3197
3197
|
type: "setFiles"
|
|
3198
|
-
}), g && g(
|
|
3199
|
-
}, [te, l,
|
|
3200
|
-
|
|
3201
|
-
nt(
|
|
3198
|
+
}), g && g(oe, re, T), re.length > 0 && m && m(re, T), oe.length > 0 && p && p(oe, T);
|
|
3199
|
+
}, [te, l, Z, r, a, s, g, p, m, ie]), U = X(function(C) {
|
|
3200
|
+
C.preventDefault(), C.persist(), Ge(C), b.current = [], Ye(C) && Promise.resolve(o(C)).then(function(T) {
|
|
3201
|
+
nt(C) && !H || z(T, C);
|
|
3202
3202
|
}).catch(function(T) {
|
|
3203
|
-
return
|
|
3203
|
+
return y(T);
|
|
3204
3204
|
}), te({
|
|
3205
3205
|
type: "reset"
|
|
3206
3206
|
});
|
|
3207
|
-
}, [o,
|
|
3207
|
+
}, [o, z, y, H]), S = X(function() {
|
|
3208
3208
|
if (N.current) {
|
|
3209
3209
|
te({
|
|
3210
3210
|
type: "openDialog"
|
|
3211
|
-
}),
|
|
3212
|
-
var
|
|
3211
|
+
}), fe();
|
|
3212
|
+
var C = {
|
|
3213
3213
|
multiple: l,
|
|
3214
|
-
types:
|
|
3214
|
+
types: de
|
|
3215
3215
|
};
|
|
3216
|
-
window.showOpenFilePicker(
|
|
3216
|
+
window.showOpenFilePicker(C).then(function(T) {
|
|
3217
3217
|
return o(T);
|
|
3218
3218
|
}).then(function(T) {
|
|
3219
|
-
|
|
3219
|
+
z(T, null), te({
|
|
3220
3220
|
type: "closeDialog"
|
|
3221
3221
|
});
|
|
3222
3222
|
}).catch(function(T) {
|
|
3223
3223
|
fa(T) ? (D(T), te({
|
|
3224
3224
|
type: "closeDialog"
|
|
3225
|
-
})) : ma(T) ? (N.current = !1,
|
|
3225
|
+
})) : ma(T) ? (N.current = !1, G.current ? (G.current.value = null, G.current.click()) : y(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."))) : y(T);
|
|
3226
3226
|
});
|
|
3227
3227
|
return;
|
|
3228
3228
|
}
|
|
3229
|
-
|
|
3229
|
+
G.current && (te({
|
|
3230
3230
|
type: "openDialog"
|
|
3231
|
-
}),
|
|
3232
|
-
}, [te,
|
|
3233
|
-
!
|
|
3234
|
-
}, [
|
|
3231
|
+
}), fe(), G.current.value = null, G.current.click());
|
|
3232
|
+
}, [te, fe, D, h, z, y, de, l]), ce = X(function(C) {
|
|
3233
|
+
!R.current || !R.current.isEqualNode(C.target) || (C.key === " " || C.key === "Enter" || C.keyCode === 32 || C.keyCode === 13) && (C.preventDefault(), S());
|
|
3234
|
+
}, [R, S]), Fe = X(function() {
|
|
3235
3235
|
te({
|
|
3236
3236
|
type: "focus"
|
|
3237
3237
|
});
|
|
3238
|
-
}, []), Te =
|
|
3238
|
+
}, []), Te = X(function() {
|
|
3239
3239
|
te({
|
|
3240
3240
|
type: "blur"
|
|
3241
3241
|
});
|
|
3242
|
-
}, []), Zt =
|
|
3243
|
-
|
|
3244
|
-
}, [
|
|
3242
|
+
}, []), Zt = X(function() {
|
|
3243
|
+
M || (pa() ? setTimeout(S, 0) : S());
|
|
3244
|
+
}, [M, S]), $e = function(T) {
|
|
3245
3245
|
return i ? null : T;
|
|
3246
3246
|
}, rt = function(T) {
|
|
3247
3247
|
return x ? null : $e(T);
|
|
@@ -3249,29 +3249,29 @@ function ti() {
|
|
|
3249
3249
|
return V ? null : $e(T);
|
|
3250
3250
|
}, Ge = function(T) {
|
|
3251
3251
|
H && T.stopPropagation();
|
|
3252
|
-
}, hi =
|
|
3252
|
+
}, hi = se(function() {
|
|
3253
3253
|
return function() {
|
|
3254
|
-
var
|
|
3255
|
-
return
|
|
3256
|
-
onKeyDown: rt(
|
|
3257
|
-
onFocus: rt(
|
|
3258
|
-
onBlur: rt(
|
|
3259
|
-
onClick: $e(
|
|
3260
|
-
onDragEnter: qe(
|
|
3261
|
-
onDragOver: qe(
|
|
3262
|
-
onDragLeave: qe(
|
|
3263
|
-
onDrop: qe(
|
|
3264
|
-
role: typeof
|
|
3265
|
-
},
|
|
3254
|
+
var C = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, T = C.refKey, oe = T === void 0 ? "ref" : T, re = C.role, me = C.onKeyDown, ze = C.onFocus, Ae = C.onBlur, lt = C.onClick, st = C.onDragEnter, ct = C.onDragOver, Be = C.onDragLeave, pt = C.onDrop, ut = it(C, ha);
|
|
3255
|
+
return ne(ne(Mt({
|
|
3256
|
+
onKeyDown: rt(ye(me, ce)),
|
|
3257
|
+
onFocus: rt(ye(ze, Fe)),
|
|
3258
|
+
onBlur: rt(ye(Ae, Te)),
|
|
3259
|
+
onClick: $e(ye(lt, Zt)),
|
|
3260
|
+
onDragEnter: qe(ye(st, F)),
|
|
3261
|
+
onDragOver: qe(ye(ct, P)),
|
|
3262
|
+
onDragLeave: qe(ye(Be, $)),
|
|
3263
|
+
onDrop: qe(ye(pt, U)),
|
|
3264
|
+
role: typeof re == "string" && re !== "" ? re : "presentation"
|
|
3265
|
+
}, oe, R), !i && !x ? {
|
|
3266
3266
|
tabIndex: 0
|
|
3267
3267
|
} : {}), ut);
|
|
3268
3268
|
};
|
|
3269
|
-
}, [
|
|
3270
|
-
|
|
3271
|
-
}, []), yi =
|
|
3269
|
+
}, [R, ce, Fe, Te, Zt, F, P, $, U, x, V, i]), wi = X(function(C) {
|
|
3270
|
+
C.stopPropagation();
|
|
3271
|
+
}, []), yi = se(function() {
|
|
3272
3272
|
return function() {
|
|
3273
|
-
var
|
|
3274
|
-
accept:
|
|
3273
|
+
var C = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, T = C.refKey, oe = T === void 0 ? "ref" : T, re = C.onChange, me = C.onClick, ze = it(C, wa), Ae = Mt({
|
|
3274
|
+
accept: Z,
|
|
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(
|
|
3290
|
-
onClick: $e(
|
|
3289
|
+
onChange: $e(ye(re, U)),
|
|
3290
|
+
onClick: $e(ye(me, wi)),
|
|
3291
3291
|
tabIndex: -1
|
|
3292
|
-
},
|
|
3293
|
-
return
|
|
3292
|
+
}, oe, G);
|
|
3293
|
+
return ne(ne({}, Ae), ze);
|
|
3294
3294
|
};
|
|
3295
|
-
}, [
|
|
3296
|
-
return
|
|
3295
|
+
}, [G, t, l, U, i]);
|
|
3296
|
+
return ne(ne({}, ae), {}, {
|
|
3297
3297
|
isFocused: w && !i,
|
|
3298
3298
|
getRootProps: hi,
|
|
3299
3299
|
getInputProps: yi,
|
|
3300
|
-
rootRef:
|
|
3301
|
-
inputRef:
|
|
3302
|
-
open: $e(
|
|
3300
|
+
rootRef: R,
|
|
3301
|
+
inputRef: G,
|
|
3302
|
+
open: $e(S)
|
|
3303
3303
|
});
|
|
3304
3304
|
}
|
|
3305
3305
|
function Fa(e, n) {
|
|
3306
3306
|
switch (n.type) {
|
|
3307
3307
|
case "focus":
|
|
3308
|
-
return
|
|
3308
|
+
return ne(ne({}, e), {}, {
|
|
3309
3309
|
isFocused: !0
|
|
3310
3310
|
});
|
|
3311
3311
|
case "blur":
|
|
3312
|
-
return
|
|
3312
|
+
return ne(ne({}, e), {}, {
|
|
3313
3313
|
isFocused: !1
|
|
3314
3314
|
});
|
|
3315
3315
|
case "openDialog":
|
|
3316
|
-
return
|
|
3316
|
+
return ne(ne({}, Ot), {}, {
|
|
3317
3317
|
isFileDialogActive: !0
|
|
3318
3318
|
});
|
|
3319
3319
|
case "closeDialog":
|
|
3320
|
-
return
|
|
3320
|
+
return ne(ne({}, e), {}, {
|
|
3321
3321
|
isFileDialogActive: !1
|
|
3322
3322
|
});
|
|
3323
3323
|
case "setDraggedFiles":
|
|
3324
|
-
return
|
|
3324
|
+
return ne(ne({}, 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 ne(ne({}, 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 ne({}, Ot);
|
|
3337
3337
|
default:
|
|
3338
3338
|
return e;
|
|
3339
3339
|
}
|
|
@@ -3375,7 +3375,7 @@ const Pa = () => {
|
|
|
3375
3375
|
acceptedFiles: [],
|
|
3376
3376
|
fileRejections: []
|
|
3377
3377
|
}
|
|
3378
|
-
), o =
|
|
3378
|
+
), o = X(
|
|
3379
3379
|
(l, s) => i({
|
|
3380
3380
|
type: "add-files",
|
|
3381
3381
|
payload: { acceptedFiles: l, fileRejections: s }
|
|
@@ -3405,64 +3405,64 @@ const Pa = () => {
|
|
|
3405
3405
|
return /* @__PURE__ */ B(
|
|
3406
3406
|
"div",
|
|
3407
3407
|
{
|
|
3408
|
-
className:
|
|
3408
|
+
className: q("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(Di, { 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((p) => /* @__PURE__ */ B("span", { className: "is-error", children: [
|
|
3431
3431
|
/* @__PURE__ */ B("div", { className: "file-upload__file is-rejected", children: [
|
|
3432
|
-
|
|
3433
|
-
/* @__PURE__ */
|
|
3434
|
-
|
|
3432
|
+
p.file.name,
|
|
3433
|
+
/* @__PURE__ */ u(
|
|
3434
|
+
_e,
|
|
3435
3435
|
{
|
|
3436
3436
|
appearance: "base",
|
|
3437
3437
|
className: "file-upload__file-remove-button",
|
|
3438
|
-
onClick: () => d(
|
|
3438
|
+
onClick: () => d(p),
|
|
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
|
+
p.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
|
+
`${p.file.name}-${m.code}`
|
|
3451
3451
|
))
|
|
3452
|
-
] },
|
|
3453
|
-
t && t.map((
|
|
3454
|
-
|
|
3455
|
-
|
|
3456
|
-
|
|
3452
|
+
] }, p.file.name)),
|
|
3453
|
+
t && t.map((p) => /* @__PURE__ */ B("div", { className: "file-upload__file", children: [
|
|
3454
|
+
p.name,
|
|
3455
|
+
p.percentUploaded !== void 0 ? /* @__PURE__ */ u(qi, { percentComplete: p.percentUploaded }) : /* @__PURE__ */ u(
|
|
3456
|
+
_e,
|
|
3457
3457
|
{
|
|
3458
3458
|
appearance: "base",
|
|
3459
3459
|
className: "file-upload__file-remove-button",
|
|
3460
|
-
onClick: () => c(
|
|
3460
|
+
onClick: () => c(p),
|
|
3461
3461
|
type: "button",
|
|
3462
|
-
children: /* @__PURE__ */
|
|
3462
|
+
children: /* @__PURE__ */ u(Re, { name: "close", children: "Remove file" })
|
|
3463
3463
|
}
|
|
3464
3464
|
)
|
|
3465
|
-
] },
|
|
3465
|
+
] }, p.name))
|
|
3466
3466
|
] })
|
|
3467
3467
|
] })
|
|
3468
3468
|
]
|
|
@@ -3483,7 +3483,7 @@ const Pa = () => {
|
|
|
3483
3483
|
removeFile: c,
|
|
3484
3484
|
removeRejectedFile: d
|
|
3485
3485
|
} = Pa();
|
|
3486
|
-
return /* @__PURE__ */
|
|
3486
|
+
return /* @__PURE__ */ u(
|
|
3487
3487
|
Ia,
|
|
3488
3488
|
{
|
|
3489
3489
|
accept: e,
|
|
@@ -3524,43 +3524,43 @@ const Pa = () => {
|
|
|
3524
3524
|
groupFn: s = $a,
|
|
3525
3525
|
...c
|
|
3526
3526
|
}) => {
|
|
3527
|
-
const d =
|
|
3527
|
+
const d = se(
|
|
3528
3528
|
() => new Set(n.map((h) => h.value)),
|
|
3529
3529
|
[n]
|
|
3530
|
-
), f =
|
|
3530
|
+
), f = se(
|
|
3531
3531
|
() => new Set(t.map((h) => h.value)),
|
|
3532
3532
|
[t]
|
|
3533
|
-
), [g,
|
|
3534
|
-
|
|
3535
|
-
a &&
|
|
3533
|
+
), [g, p] = ge(new Set(d));
|
|
3534
|
+
Ce(() => {
|
|
3535
|
+
a && p(new Set(d));
|
|
3536
3536
|
}, [a]);
|
|
3537
|
-
const m =
|
|
3537
|
+
const m = se(() => e.some((h) => h.group), [e]), v = se(
|
|
3538
3538
|
() => m ? s(e) : [{ group: "Ungrouped", items: e }],
|
|
3539
3539
|
[e, s]
|
|
3540
|
-
),
|
|
3541
|
-
const { checked:
|
|
3542
|
-
if (
|
|
3543
|
-
const x =
|
|
3540
|
+
), E = (h) => {
|
|
3541
|
+
const { checked: A, value: k } = h.target, M = e.find((x) => `${x.value}` === k);
|
|
3542
|
+
if (M) {
|
|
3543
|
+
const x = A ? [...n, M] : n.filter((V) => `${V.value}` !== k) ?? [];
|
|
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", ...c, children: [
|
|
3548
3548
|
i || null,
|
|
3549
|
-
v.map(({ group: h, items:
|
|
3550
|
-
m ? /* @__PURE__ */
|
|
3551
|
-
/* @__PURE__ */
|
|
3549
|
+
v.map(({ group: h, items: A }) => /* @__PURE__ */ B("div", { className: "multi-select__group", children: [
|
|
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(Da(g)).map((k) => /* @__PURE__ */ u("li", { className: "multi-select__dropdown-item", children: /* @__PURE__ */ u(
|
|
3552
3552
|
$i,
|
|
3553
3553
|
{
|
|
3554
|
-
disabled: f.has(
|
|
3555
|
-
label:
|
|
3556
|
-
checked: d.has(
|
|
3557
|
-
value:
|
|
3558
|
-
onChange:
|
|
3554
|
+
disabled: f.has(k.value),
|
|
3555
|
+
label: k.label,
|
|
3556
|
+
checked: d.has(k.value),
|
|
3557
|
+
value: k.value,
|
|
3558
|
+
onChange: E
|
|
3559
3559
|
},
|
|
3560
|
-
|
|
3561
|
-
) },
|
|
3560
|
+
k.value
|
|
3561
|
+
) }, k.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,
|
|
@@ -3576,27 +3576,27 @@ const Pa = () => {
|
|
|
3576
3576
|
variant: d = "search"
|
|
3577
3577
|
}) => {
|
|
3578
3578
|
const f = Ai(() => {
|
|
3579
|
-
|
|
3579
|
+
p(!1), v("");
|
|
3580
3580
|
});
|
|
3581
3581
|
Mi(() => {
|
|
3582
|
-
|
|
3582
|
+
p(!1), v("");
|
|
3583
3583
|
});
|
|
3584
|
-
const [g,
|
|
3585
|
-
|
|
3584
|
+
const [g, p] = ge(!1), [m, v] = ge("");
|
|
3585
|
+
Ce(() => {
|
|
3586
3586
|
g || v("");
|
|
3587
3587
|
}, [g]);
|
|
3588
|
-
const [
|
|
3589
|
-
const
|
|
3590
|
-
h(
|
|
3591
|
-
},
|
|
3592
|
-
(H) => r.some((
|
|
3588
|
+
const [E, h] = ge([]), A = n || E, k = (H) => {
|
|
3589
|
+
const Q = Array.from(new Set(H));
|
|
3590
|
+
h(Q), i && i(Q);
|
|
3591
|
+
}, M = et(), x = et(), V = A.filter(
|
|
3592
|
+
(H) => r.some((Q) => Q.value === H.value)
|
|
3593
3593
|
).sort(ni).map((H) => H.label).join(", ");
|
|
3594
|
-
return /* @__PURE__ */
|
|
3595
|
-
d === "search" ? /* @__PURE__ */
|
|
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": M,
|
|
3600
3600
|
"aria-expanded": g,
|
|
3601
3601
|
id: x,
|
|
3602
3602
|
role: "combobox",
|
|
@@ -3604,70 +3604,70 @@ const Pa = () => {
|
|
|
3604
3604
|
disabled: e,
|
|
3605
3605
|
autoComplete: "off",
|
|
3606
3606
|
onChange: (H) => {
|
|
3607
|
-
v(H),
|
|
3607
|
+
v(H), p(!0);
|
|
3608
3608
|
},
|
|
3609
|
-
onFocus: () =>
|
|
3609
|
+
onFocus: () => p(!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": M,
|
|
3623
3623
|
"aria-expanded": g,
|
|
3624
3624
|
className: "multi-select__select-button",
|
|
3625
3625
|
onClick: () => {
|
|
3626
|
-
|
|
3626
|
+
p((H) => !H);
|
|
3627
3627
|
},
|
|
3628
|
-
children: /* @__PURE__ */
|
|
3628
|
+
children: /* @__PURE__ */ u("span", { className: "multi-select__condensed-text", children: A.length > 0 ? V : o ?? "Select items" })
|
|
3629
3629
|
}
|
|
3630
3630
|
),
|
|
3631
|
-
/* @__PURE__ */
|
|
3631
|
+
/* @__PURE__ */ u(
|
|
3632
3632
|
Aa,
|
|
3633
3633
|
{
|
|
3634
|
-
id:
|
|
3634
|
+
id: M,
|
|
3635
3635
|
isOpen: g,
|
|
3636
3636
|
items: m.length > 0 ? r.filter(
|
|
3637
3637
|
(H) => H.label.toLowerCase().includes(m.toLowerCase())
|
|
3638
3638
|
) : r,
|
|
3639
|
-
selectedItems:
|
|
3639
|
+
selectedItems: A,
|
|
3640
3640
|
disabledItems: l,
|
|
3641
3641
|
header: s,
|
|
3642
|
-
updateItems:
|
|
3643
|
-
footer: c || /* @__PURE__ */ B(
|
|
3644
|
-
/* @__PURE__ */
|
|
3645
|
-
|
|
3642
|
+
updateItems: k,
|
|
3643
|
+
footer: c || /* @__PURE__ */ B(we, { children: [
|
|
3644
|
+
/* @__PURE__ */ u(
|
|
3645
|
+
_e,
|
|
3646
3646
|
{
|
|
3647
3647
|
appearance: "link",
|
|
3648
3648
|
onClick: () => {
|
|
3649
3649
|
const H = r.filter(
|
|
3650
|
-
(
|
|
3651
|
-
(
|
|
3650
|
+
(Q) => !l.some(
|
|
3651
|
+
(ie) => ie.value === Q.value
|
|
3652
3652
|
)
|
|
3653
3653
|
);
|
|
3654
|
-
|
|
3654
|
+
k([...A, ...H]);
|
|
3655
3655
|
},
|
|
3656
3656
|
type: "button",
|
|
3657
3657
|
children: "Select all"
|
|
3658
3658
|
}
|
|
3659
3659
|
),
|
|
3660
|
-
/* @__PURE__ */
|
|
3661
|
-
|
|
3660
|
+
/* @__PURE__ */ u(
|
|
3661
|
+
_e,
|
|
3662
3662
|
{
|
|
3663
3663
|
appearance: "link",
|
|
3664
3664
|
onClick: () => {
|
|
3665
|
-
const H =
|
|
3666
|
-
(
|
|
3667
|
-
(
|
|
3665
|
+
const H = A.filter(
|
|
3666
|
+
(Q) => l.some(
|
|
3667
|
+
(ie) => ie.value === Q.value
|
|
3668
3668
|
)
|
|
3669
3669
|
);
|
|
3670
|
-
|
|
3670
|
+
k(H);
|
|
3671
3671
|
},
|
|
3672
3672
|
type: "button",
|
|
3673
3673
|
children: "Clear"
|
|
@@ -3685,20 +3685,20 @@ const Pa = () => {
|
|
|
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: q("p-table-dynamic", e, {
|
|
3693
3693
|
"is-full-height": t === "full-height"
|
|
3694
3694
|
}),
|
|
3695
3695
|
children: n
|
|
3696
3696
|
}
|
|
3697
|
-
) }), Oa = ({ columns: e }) => /* @__PURE__ */
|
|
3697
|
+
) }), Oa = ({ 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: q(i.id, "u-text-overflow-clip"),
|
|
3701
|
+
children: /* @__PURE__ */ u(Gi, { isPending: !0, text: "XXXxxxx.xxxxxxxxx" })
|
|
3702
3702
|
},
|
|
3703
3703
|
o
|
|
3704
3704
|
)) }, t)) }), ja = ({
|
|
@@ -3706,9 +3706,9 @@ const Pa = () => {
|
|
|
3706
3706
|
table: n
|
|
3707
3707
|
}) => {
|
|
3708
3708
|
const t = n ? n.getAllColumns() : Array.from({ length: 10 }).fill({ id: "" });
|
|
3709
|
-
return /* @__PURE__ */ B(
|
|
3710
|
-
/* @__PURE__ */
|
|
3711
|
-
/* @__PURE__ */
|
|
3709
|
+
return /* @__PURE__ */ B(we, { children: [
|
|
3710
|
+
/* @__PURE__ */ u("caption", { className: "u-visually-hidden", children: "Loading..." }),
|
|
3711
|
+
/* @__PURE__ */ u(ai, { "aria-busy": "true", className: e, children: /* @__PURE__ */ u(Oa, { columns: t }) })
|
|
3712
3712
|
] });
|
|
3713
3713
|
}, ai = ({
|
|
3714
3714
|
className: e,
|
|
@@ -3716,7 +3716,7 @@ const Pa = () => {
|
|
|
3716
3716
|
style: t,
|
|
3717
3717
|
...i
|
|
3718
3718
|
}) => {
|
|
3719
|
-
const { variant: o } = Ht(ii), a =
|
|
3719
|
+
const { variant: o } = Ht(ii), a = be(null), [r, l] = ge(null), s = X(() => {
|
|
3720
3720
|
var d, f;
|
|
3721
3721
|
if (window.innerWidth > Ma.small) {
|
|
3722
3722
|
const g = (f = (d = a.current) == null ? void 0 : d.getBoundingClientRect) == null ? void 0 : f.call(d).top;
|
|
@@ -3726,13 +3726,13 @@ const Pa = () => {
|
|
|
3726
3726
|
}, []);
|
|
3727
3727
|
On(() => {
|
|
3728
3728
|
s();
|
|
3729
|
-
}, [s]),
|
|
3730
|
-
const c =
|
|
3729
|
+
}, [s]), Ce(() => (window.addEventListener("resize", s), () => window.removeEventListener("resize", s)), [s]);
|
|
3730
|
+
const c = se(() => 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,
|
|
@@ -3745,7 +3745,7 @@ const Pa = () => {
|
|
|
3745
3745
|
};
|
|
3746
3746
|
oi.Body = ai;
|
|
3747
3747
|
oi.Loading = ja;
|
|
3748
|
-
const ri = ({ children: e }) => /* @__PURE__ */
|
|
3748
|
+
const ri = ({ children: e }) => /* @__PURE__ */ u("caption", { children: /* @__PURE__ */ u("div", { className: "p-strip", children: e }) }), Ta = ({ 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 }) }) }), za = ({ 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 = Ta;
|
|
3750
3750
|
ri.Description = za;
|
|
3751
3751
|
/**
|
|
@@ -3761,7 +3761,7 @@ ri.Description = za;
|
|
|
3761
3761
|
function Ee(e, n) {
|
|
3762
3762
|
return typeof e == "function" ? e(n) : e;
|
|
3763
3763
|
}
|
|
3764
|
-
function
|
|
3764
|
+
function ve(e, n) {
|
|
3765
3765
|
return (t) => {
|
|
3766
3766
|
n.setState((i) => ({
|
|
3767
3767
|
...i,
|
|
@@ -3796,12 +3796,12 @@ function O(e, n, t) {
|
|
|
3796
3796
|
i = l;
|
|
3797
3797
|
let c;
|
|
3798
3798
|
if (t.key && t.debug && (c = 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() - c) * 100) / 100, g = f / 16,
|
|
3799
|
+
const d = Math.round((Date.now() - r) * 100) / 100, f = Math.round((Date.now() - c) * 100) / 100, g = f / 16, p = (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⏱ ${p(f, 5)} /${p(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);
|
|
@@ -3850,12 +3850,12 @@ function La(e, n, t, i) {
|
|
|
3850
3850
|
}, s = l.accessorKey;
|
|
3851
3851
|
let c = (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 p = g;
|
|
3854
3854
|
for (const v of s.split(".")) {
|
|
3855
3855
|
var m;
|
|
3856
|
-
|
|
3856
|
+
p = (m = p) == null ? void 0 : m[v], process.env.NODE_ENV !== "production" && p === void 0 && console.warn(`"${v}" in deeply nested key "${s}" returned undefined.`);
|
|
3857
3857
|
}
|
|
3858
|
-
return
|
|
3858
|
+
return p;
|
|
3859
3859
|
} : d = (g) => g[l.accessorKey]), !c)
|
|
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 = {
|
|
@@ -3867,11 +3867,11 @@ function La(e, n, t, i) {
|
|
|
3867
3867
|
columns: [],
|
|
3868
3868
|
getFlatColumns: O(() => [!0], () => {
|
|
3869
3869
|
var g;
|
|
3870
|
-
return [f, ...(g = f.columns) == null ? void 0 : g.flatMap((
|
|
3870
|
+
return [f, ...(g = f.columns) == null ? void 0 : g.flatMap((p) => p.getFlatColumns())];
|
|
3871
3871
|
}, j(e.options, "debugColumns", "column.getFlatColumns")),
|
|
3872
3872
|
getLeafColumns: O(() => [e._getOrderColumnsFn()], (g) => {
|
|
3873
|
-
var
|
|
3874
|
-
if ((
|
|
3873
|
+
var p;
|
|
3874
|
+
if ((p = f.columns) != null && p.length) {
|
|
3875
3875
|
let m = f.columns.flatMap((v) => v.getLeafColumns());
|
|
3876
3876
|
return g(m);
|
|
3877
3877
|
}
|
|
@@ -3882,7 +3882,7 @@ function La(e, n, t, i) {
|
|
|
3882
3882
|
g.createColumn == null || g.createColumn(f, e);
|
|
3883
3883
|
return f;
|
|
3884
3884
|
}
|
|
3885
|
-
const
|
|
3885
|
+
const pe = "debugHeaders";
|
|
3886
3886
|
function Fn(e, n, t) {
|
|
3887
3887
|
var i;
|
|
3888
3888
|
let a = {
|
|
@@ -3918,81 +3918,81 @@ const Ha = {
|
|
|
3918
3918
|
var a, r;
|
|
3919
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 : [], c = t.filter((f) => !(i != null && i.includes(f.id)) && !(o != null && o.includes(f.id)));
|
|
3920
3920
|
return Xe(n, [...l, ...c, ...s], e);
|
|
3921
|
-
}, j(e.options,
|
|
3921
|
+
}, j(e.options, pe, "getHeaderGroups")), e.getCenterHeaderGroups = O(() => [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")), j(e.options, pe, "getCenterHeaderGroups")), e.getLeftHeaderGroups = O(() => [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
|
-
}, j(e.options,
|
|
3925
|
+
}, j(e.options, pe, "getLeftHeaderGroups")), e.getRightHeaderGroups = O(() => [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
|
-
}, j(e.options,
|
|
3929
|
+
}, j(e.options, pe, "getRightHeaderGroups")), e.getFooterGroups = O(() => [e.getHeaderGroups()], (n) => [...n].reverse(), j(e.options, pe, "getFooterGroups")), e.getLeftFooterGroups = O(() => [e.getLeftHeaderGroups()], (n) => [...n].reverse(), j(e.options, pe, "getLeftFooterGroups")), e.getCenterFooterGroups = O(() => [e.getCenterHeaderGroups()], (n) => [...n].reverse(), j(e.options, pe, "getCenterFooterGroups")), e.getRightFooterGroups = O(() => [e.getRightHeaderGroups()], (n) => [...n].reverse(), j(e.options, pe, "getRightFooterGroups")), e.getFlatHeaders = O(() => [e.getHeaderGroups()], (n) => n.map((t) => t.headers).flat(), j(e.options, pe, "getFlatHeaders")), e.getLeftFlatHeaders = O(() => [e.getLeftHeaderGroups()], (n) => n.map((t) => t.headers).flat(), j(e.options, pe, "getLeftFlatHeaders")), e.getCenterFlatHeaders = O(() => [e.getCenterHeaderGroups()], (n) => n.map((t) => t.headers).flat(), j(e.options, pe, "getCenterFlatHeaders")), e.getRightFlatHeaders = O(() => [e.getRightHeaderGroups()], (n) => n.map((t) => t.headers).flat(), j(e.options, pe, "getRightFlatHeaders")), e.getCenterLeafHeaders = O(() => [e.getCenterFlatHeaders()], (n) => n.filter((t) => {
|
|
3930
3930
|
var i;
|
|
3931
3931
|
return !((i = t.subHeaders) != null && i.length);
|
|
3932
|
-
}), j(e.options,
|
|
3932
|
+
}), j(e.options, pe, "getCenterLeafHeaders")), e.getLeftLeafHeaders = O(() => [e.getLeftFlatHeaders()], (n) => n.filter((t) => {
|
|
3933
3933
|
var i;
|
|
3934
3934
|
return !((i = t.subHeaders) != null && i.length);
|
|
3935
|
-
}), j(e.options,
|
|
3935
|
+
}), j(e.options, pe, "getLeftLeafHeaders")), e.getRightLeafHeaders = O(() => [e.getRightFlatHeaders()], (n) => n.filter((t) => {
|
|
3936
3936
|
var i;
|
|
3937
3937
|
return !((i = t.subHeaders) != null && i.length);
|
|
3938
|
-
}), j(e.options,
|
|
3938
|
+
}), j(e.options, pe, "getRightLeafHeaders")), e.getLeafHeaders = O(() => [e.getLeftHeaderGroups(), e.getCenterHeaderGroups(), e.getRightHeaderGroups()], (n, t, i) => {
|
|
3939
3939
|
var o, a, r, l, s, c;
|
|
3940
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 = (c = i[0]) == null ? void 0 : c.headers) != null ? s : []].map((d) => d.getLeafHeaders()).flat();
|
|
3941
|
-
}, j(e.options,
|
|
3941
|
+
}, j(e.options, pe, "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, p) {
|
|
3948
|
+
p === void 0 && (p = 1), r = Math.max(r, p), 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, p + 1);
|
|
3951
3951
|
}, 0);
|
|
3952
3952
|
};
|
|
3953
3953
|
l(e);
|
|
3954
3954
|
let s = [];
|
|
3955
|
-
const c = (g,
|
|
3955
|
+
const c = (g, p) => {
|
|
3956
3956
|
const m = {
|
|
3957
|
-
depth:
|
|
3958
|
-
id: [i, `${
|
|
3957
|
+
depth: p,
|
|
3958
|
+
id: [i, `${p}`].filter(Boolean).join("_"),
|
|
3959
3959
|
headers: []
|
|
3960
3960
|
}, v = [];
|
|
3961
|
-
g.forEach((
|
|
3962
|
-
const h = [...v].reverse()[0],
|
|
3963
|
-
let
|
|
3964
|
-
if (
|
|
3965
|
-
h.subHeaders.push(
|
|
3961
|
+
g.forEach((E) => {
|
|
3962
|
+
const h = [...v].reverse()[0], A = E.column.depth === m.depth;
|
|
3963
|
+
let k, M = !1;
|
|
3964
|
+
if (A && E.column.parent ? k = E.column.parent : (k = E.column, M = !0), h && (h == null ? void 0 : h.column) === k)
|
|
3965
|
+
h.subHeaders.push(E);
|
|
3966
3966
|
else {
|
|
3967
|
-
const x = Fn(t,
|
|
3968
|
-
id: [i,
|
|
3969
|
-
isPlaceholder:
|
|
3970
|
-
placeholderId:
|
|
3971
|
-
depth:
|
|
3967
|
+
const x = Fn(t, k, {
|
|
3968
|
+
id: [i, p, k.id, E == null ? void 0 : E.id].filter(Boolean).join("_"),
|
|
3969
|
+
isPlaceholder: M,
|
|
3970
|
+
placeholderId: M ? `${v.filter((V) => V.column === k).length}` : void 0,
|
|
3971
|
+
depth: p,
|
|
3972
3972
|
index: v.length
|
|
3973
3973
|
});
|
|
3974
|
-
x.subHeaders.push(
|
|
3974
|
+
x.subHeaders.push(E), v.push(x);
|
|
3975
3975
|
}
|
|
3976
|
-
m.headers.push(
|
|
3977
|
-
}), s.push(m),
|
|
3978
|
-
}, d = n.map((g,
|
|
3976
|
+
m.headers.push(E), E.headerGroup = m;
|
|
3977
|
+
}), s.push(m), p > 0 && c(v, p - 1);
|
|
3978
|
+
}, d = n.map((g, p) => Fn(t, g, {
|
|
3979
3979
|
depth: r,
|
|
3980
|
-
index:
|
|
3980
|
+
index: p
|
|
3981
3981
|
}));
|
|
3982
3982
|
c(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, E = 0, h = [0];
|
|
3985
|
+
m.subHeaders && m.subHeaders.length ? (h = [], f(m.subHeaders).forEach((k) => {
|
|
3986
3986
|
let {
|
|
3987
|
-
colSpan:
|
|
3987
|
+
colSpan: M,
|
|
3988
3988
|
rowSpan: x
|
|
3989
|
-
} =
|
|
3990
|
-
v +=
|
|
3989
|
+
} = k;
|
|
3990
|
+
v += M, h.push(x);
|
|
3991
3991
|
})) : v = 1;
|
|
3992
|
-
const
|
|
3993
|
-
return
|
|
3992
|
+
const A = Math.min(...h);
|
|
3993
|
+
return E = E + A, m.colSpan = v, m.rowSpan = E, {
|
|
3994
3994
|
colSpan: v,
|
|
3995
|
-
rowSpan:
|
|
3995
|
+
rowSpan: E
|
|
3996
3996
|
};
|
|
3997
3997
|
});
|
|
3998
3998
|
return f((o = (a = s[0]) == null ? void 0 : a.headers) != null ? o : []), s;
|
|
@@ -4100,7 +4100,7 @@ Xt.resolveFilterValue = (e) => {
|
|
|
4100
4100
|
return [a, r];
|
|
4101
4101
|
};
|
|
4102
4102
|
Xt.autoRemove = (e) => he(e) || he(e[0]) && he(e[1]);
|
|
4103
|
-
const
|
|
4103
|
+
const Se = {
|
|
4104
4104
|
includesString: ci,
|
|
4105
4105
|
includesStringSensitive: pi,
|
|
4106
4106
|
equalsString: ui,
|
|
@@ -4123,19 +4123,19 @@ const Ga = {
|
|
|
4123
4123
|
...e
|
|
4124
4124
|
}),
|
|
4125
4125
|
getDefaultOptions: (e) => ({
|
|
4126
|
-
onColumnFiltersChange:
|
|
4126
|
+
onColumnFiltersChange: ve("columnFilters", e),
|
|
4127
4127
|
filterFromLeafRows: !1,
|
|
4128
4128
|
maxLeafRowFilterDepth: 100
|
|
4129
4129
|
}),
|
|
4130
4130
|
createColumn: (e, n) => {
|
|
4131
4131
|
e.getAutoFilterFn = () => {
|
|
4132
4132
|
const t = n.getCoreRowModel().flatRows[0], i = t == null ? void 0 : t.getValue(e.id);
|
|
4133
|
-
return typeof i == "string" ?
|
|
4133
|
+
return typeof i == "string" ? Se.includesString : typeof i == "number" ? Se.inNumberRange : typeof i == "boolean" || i !== null && typeof i == "object" ? Se.equals : Array.isArray(i) ? Se.arrIncludes : Se.weakEquals;
|
|
4134
4134
|
}, e.getFilterFn = () => {
|
|
4135
4135
|
var t, i;
|
|
4136
4136
|
return at(e.columnDef.filterFn) ? e.columnDef.filterFn : e.columnDef.filterFn === "auto" ? e.getAutoFilterFn() : (
|
|
4137
4137
|
// @ts-ignore
|
|
4138
|
-
(t = (i = n.options.filterFns) == null ? void 0 : i[e.columnDef.filterFn]) != null ? t :
|
|
4138
|
+
(t = (i = n.options.filterFns) == null ? void 0 : i[e.columnDef.filterFn]) != null ? t : Se[e.columnDef.filterFn]
|
|
4139
4139
|
);
|
|
4140
4140
|
}, e.getCanFilter = () => {
|
|
4141
4141
|
var t, i, o;
|
|
@@ -4252,7 +4252,7 @@ const Ba = (e, n, t) => t.reduce((i, o) => {
|
|
|
4252
4252
|
...e
|
|
4253
4253
|
}),
|
|
4254
4254
|
getDefaultOptions: (e) => ({
|
|
4255
|
-
onGroupingChange:
|
|
4255
|
+
onGroupingChange: ve("grouping", e),
|
|
4256
4256
|
groupedColumnMode: "reorder"
|
|
4257
4257
|
}),
|
|
4258
4258
|
createColumn: (e, n) => {
|
|
@@ -4318,7 +4318,7 @@ const nr = {
|
|
|
4318
4318
|
...e
|
|
4319
4319
|
}),
|
|
4320
4320
|
getDefaultOptions: (e) => ({
|
|
4321
|
-
onColumnOrderChange:
|
|
4321
|
+
onColumnOrderChange: ve("columnOrder", e)
|
|
4322
4322
|
}),
|
|
4323
4323
|
createColumn: (e, n) => {
|
|
4324
4324
|
e.getIndex = O((t) => [Ne(n, t)], (t) => t.findIndex((i) => i.id === e.id), j(n.options, "debugColumns", "getIndex")), e.getIsFirstColumn = (t) => {
|
|
@@ -4358,7 +4358,7 @@ const nr = {
|
|
|
4358
4358
|
...e
|
|
4359
4359
|
}),
|
|
4360
4360
|
getDefaultOptions: (e) => ({
|
|
4361
|
-
onColumnPinningChange:
|
|
4361
|
+
onColumnPinningChange: ve("columnPinning", e)
|
|
4362
4362
|
}),
|
|
4363
4363
|
createColumn: (e, n) => {
|
|
4364
4364
|
e.pin = (t) => {
|
|
@@ -4449,8 +4449,8 @@ const nr = {
|
|
|
4449
4449
|
getDefaultOptions: (e) => ({
|
|
4450
4450
|
columnResizeMode: "onEnd",
|
|
4451
4451
|
columnResizeDirection: "ltr",
|
|
4452
|
-
onColumnSizingChange:
|
|
4453
|
-
onColumnSizingInfoChange:
|
|
4452
|
+
onColumnSizingChange: ve("columnSizing", e),
|
|
4453
|
+
onColumnSizingInfoChange: ve("columnSizingInfo", e)
|
|
4454
4454
|
}),
|
|
4455
4455
|
createColumn: (e, n) => {
|
|
4456
4456
|
e.getSize = () => {
|
|
@@ -4493,25 +4493,25 @@ const nr = {
|
|
|
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, c = {}, d = (h,
|
|
4497
|
-
typeof
|
|
4498
|
-
var
|
|
4499
|
-
const V = n.options.columnResizeDirection === "rtl" ? -1 : 1, H = (
|
|
4500
|
-
return
|
|
4501
|
-
let [
|
|
4502
|
-
c[
|
|
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, c = {}, d = (h, A) => {
|
|
4497
|
+
typeof A == "number" && (n.setColumnSizingInfo((k) => {
|
|
4498
|
+
var M, x;
|
|
4499
|
+
const V = n.options.columnResizeDirection === "rtl" ? -1 : 1, H = (A - ((M = k == null ? void 0 : k.startOffset) != null ? M : 0)) * V, Q = Math.max(H / ((x = k == null ? void 0 : k.startSize) != null ? x : 0), -0.999999);
|
|
4500
|
+
return k.columnSizingStart.forEach((ie) => {
|
|
4501
|
+
let [Z, de] = ie;
|
|
4502
|
+
c[Z] = Math.round(Math.max(de + de * Q, 0) * 100) / 100;
|
|
4503
4503
|
}), {
|
|
4504
|
-
...
|
|
4504
|
+
...k,
|
|
4505
4505
|
deltaOffset: H,
|
|
4506
|
-
deltaPercentage:
|
|
4506
|
+
deltaPercentage: Q
|
|
4507
4507
|
};
|
|
4508
|
-
}), (n.options.columnResizeMode === "onChange" || h === "end") && n.setColumnSizing((
|
|
4509
|
-
...
|
|
4508
|
+
}), (n.options.columnResizeMode === "onChange" || h === "end") && n.setColumnSizing((k) => ({
|
|
4509
|
+
...k,
|
|
4510
4510
|
...c
|
|
4511
4511
|
})));
|
|
4512
4512
|
}, f = (h) => d("move", h), g = (h) => {
|
|
4513
|
-
d("end", h), n.setColumnSizingInfo((
|
|
4514
|
-
...
|
|
4513
|
+
d("end", h), n.setColumnSizingInfo((A) => ({
|
|
4514
|
+
...A,
|
|
4515
4515
|
isResizingColumn: !1,
|
|
4516
4516
|
startOffset: null,
|
|
4517
4517
|
startSize: null,
|
|
@@ -4519,21 +4519,21 @@ const nr = {
|
|
|
4519
4519
|
deltaPercentage: null,
|
|
4520
4520
|
columnSizingStart: []
|
|
4521
4521
|
}));
|
|
4522
|
-
},
|
|
4522
|
+
}, p = t || typeof document < "u" ? document : null, m = {
|
|
4523
4523
|
moveHandler: (h) => f(h.clientX),
|
|
4524
4524
|
upHandler: (h) => {
|
|
4525
|
-
|
|
4525
|
+
p == null || p.removeEventListener("mousemove", m.moveHandler), p == null || p.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
|
-
var
|
|
4531
|
-
|
|
4530
|
+
var A;
|
|
4531
|
+
p == null || p.removeEventListener("touchmove", v.moveHandler), p == null || p.removeEventListener("touchend", v.upHandler), h.cancelable && (h.preventDefault(), h.stopPropagation()), g((A = h.touches[0]) == null ? void 0 : A.clientX);
|
|
4532
4532
|
}
|
|
4533
|
-
},
|
|
4533
|
+
}, E = ar() ? {
|
|
4534
4534
|
passive: !1
|
|
4535
4535
|
} : !1;
|
|
4536
|
-
Et(a) ? (
|
|
4536
|
+
Et(a) ? (p == null || p.addEventListener("touchmove", v.moveHandler, E), p == null || p.addEventListener("touchend", v.upHandler, E)) : (p == null || p.addEventListener("mousemove", m.moveHandler, E), p == null || p.addEventListener("mouseup", m.upHandler, E)), n.setColumnSizingInfo((h) => ({
|
|
4537
4537
|
...h,
|
|
4538
4538
|
startOffset: s,
|
|
4539
4539
|
startSize: r,
|
|
@@ -4593,7 +4593,7 @@ const rr = {
|
|
|
4593
4593
|
...e
|
|
4594
4594
|
}),
|
|
4595
4595
|
getDefaultOptions: (e) => ({
|
|
4596
|
-
onColumnVisibilityChange:
|
|
4596
|
+
onColumnVisibilityChange: ve("columnVisibility", e)
|
|
4597
4597
|
}),
|
|
4598
4598
|
createColumn: (e, n) => {
|
|
4599
4599
|
e.toggleVisibility = (t) => {
|
|
@@ -4648,7 +4648,7 @@ const lr = {
|
|
|
4648
4648
|
...e
|
|
4649
4649
|
}),
|
|
4650
4650
|
getDefaultOptions: (e) => ({
|
|
4651
|
-
onGlobalFilterChange:
|
|
4651
|
+
onGlobalFilterChange: ve("globalFilter", e),
|
|
4652
4652
|
globalFilterFn: "auto",
|
|
4653
4653
|
getColumnCanGlobalFilter: (n) => {
|
|
4654
4654
|
var t;
|
|
@@ -4663,12 +4663,12 @@ const lr = {
|
|
|
4663
4663
|
};
|
|
4664
4664
|
},
|
|
4665
4665
|
createTable: (e) => {
|
|
4666
|
-
e.getGlobalAutoFilterFn = () =>
|
|
4666
|
+
e.getGlobalAutoFilterFn = () => Se.includesString, e.getGlobalFilterFn = () => {
|
|
4667
4667
|
var n, t;
|
|
4668
4668
|
const {
|
|
4669
4669
|
globalFilterFn: i
|
|
4670
4670
|
} = e.options;
|
|
4671
|
-
return at(i) ? i : i === "auto" ? e.getGlobalAutoFilterFn() : (n = (t = e.options.filterFns) == null ? void 0 : t[i]) != null ? n :
|
|
4671
|
+
return at(i) ? i : i === "auto" ? e.getGlobalAutoFilterFn() : (n = (t = e.options.filterFns) == null ? void 0 : t[i]) != null ? n : Se[i];
|
|
4672
4672
|
}, e.setGlobalFilter = (n) => {
|
|
4673
4673
|
e.options.onGlobalFilterChange == null || e.options.onGlobalFilterChange(n);
|
|
4674
4674
|
}, e.resetGlobalFilter = (n) => {
|
|
@@ -4681,7 +4681,7 @@ const lr = {
|
|
|
4681
4681
|
...e
|
|
4682
4682
|
}),
|
|
4683
4683
|
getDefaultOptions: (e) => ({
|
|
4684
|
-
onExpandedChange:
|
|
4684
|
+
onExpandedChange: ve("expanded", e),
|
|
4685
4685
|
paginateExpandedRows: !0
|
|
4686
4686
|
}),
|
|
4687
4687
|
createTable: (e) => {
|
|
@@ -4774,7 +4774,7 @@ const lr = {
|
|
|
4774
4774
|
}
|
|
4775
4775
|
}),
|
|
4776
4776
|
getDefaultOptions: (e) => ({
|
|
4777
|
-
onPaginationChange:
|
|
4777
|
+
onPaginationChange: ve("pagination", e)
|
|
4778
4778
|
}),
|
|
4779
4779
|
createTable: (e) => {
|
|
4780
4780
|
let n = !1, t = !1;
|
|
@@ -4854,7 +4854,7 @@ const lr = {
|
|
|
4854
4854
|
...e
|
|
4855
4855
|
}),
|
|
4856
4856
|
getDefaultOptions: (e) => ({
|
|
4857
|
-
onRowPinningChange:
|
|
4857
|
+
onRowPinningChange: ve("rowPinning", e)
|
|
4858
4858
|
}),
|
|
4859
4859
|
createRow: (e, n) => {
|
|
4860
4860
|
e.pin = (t, i, o) => {
|
|
@@ -4879,9 +4879,9 @@ const lr = {
|
|
|
4879
4879
|
};
|
|
4880
4880
|
}
|
|
4881
4881
|
if (t === "top") {
|
|
4882
|
-
var
|
|
4882
|
+
var p, m;
|
|
4883
4883
|
return {
|
|
4884
|
-
top: [...((
|
|
4884
|
+
top: [...((p = s == null ? void 0 : s.top) != null ? p : []).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
|
}
|
|
@@ -4955,7 +4955,7 @@ const lr = {
|
|
|
4955
4955
|
...e
|
|
4956
4956
|
}),
|
|
4957
4957
|
getDefaultOptions: (e) => ({
|
|
4958
|
-
onRowSelectionChange:
|
|
4958
|
+
onRowSelectionChange: ve("rowSelection", e),
|
|
4959
4959
|
enableRowSelection: !0,
|
|
4960
4960
|
enableMultiRowSelection: !0,
|
|
4961
4961
|
enableSubRowSelection: !0
|
|
@@ -5152,7 +5152,7 @@ const Ve = {
|
|
|
5152
5152
|
sortUndefined: 1
|
|
5153
5153
|
}),
|
|
5154
5154
|
getDefaultOptions: (e) => ({
|
|
5155
|
-
onSortingChange:
|
|
5155
|
+
onSortingChange: ve("sorting", e),
|
|
5156
5156
|
isMultiSortEvent: (n) => n.shiftKey
|
|
5157
5157
|
}),
|
|
5158
5158
|
createColumn: (e, n) => {
|
|
@@ -5178,7 +5178,7 @@ 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((
|
|
5181
|
+
const l = r == null ? void 0 : r.find((p) => p.id === e.id), s = r == null ? void 0 : r.findIndex((p) => p.id === e.id);
|
|
5182
5182
|
let c = [], 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;
|
|
@@ -5186,10 +5186,10 @@ const Ve = {
|
|
|
5186
5186
|
id: e.id,
|
|
5187
5187
|
desc: f
|
|
5188
5188
|
}], c.splice(0, c.length - ((g = n.options.maxMultiSortColCount) != null ? g : Number.MAX_SAFE_INTEGER));
|
|
5189
|
-
} else d === "toggle" ? c = r.map((
|
|
5190
|
-
...
|
|
5189
|
+
} else d === "toggle" ? c = r.map((p) => p.id === e.id ? {
|
|
5190
|
+
...p,
|
|
5191
5191
|
desc: f
|
|
5192
|
-
} :
|
|
5192
|
+
} : p) : d === "remove" ? c = r.filter((p) => p.id !== e.id) : c = [{
|
|
5193
5193
|
id: e.id,
|
|
5194
5194
|
desc: f
|
|
5195
5195
|
}];
|
|
@@ -5258,7 +5258,7 @@ function br(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, p) => Object.assign(g, p.getDefaultOptions == null ? void 0 : p.getDefaultOptions(o)), {}), r = (g) => o.options.mergeOptions ? o.options.mergeOptions(a, g) : {
|
|
5262
5262
|
...a,
|
|
5263
5263
|
...g
|
|
5264
5264
|
};
|
|
@@ -5267,8 +5267,8 @@ function br(e) {
|
|
|
5267
5267
|
...(t = e.initialState) != null ? t : {}
|
|
5268
5268
|
};
|
|
5269
5269
|
o._features.forEach((g) => {
|
|
5270
|
-
var
|
|
5271
|
-
s = (
|
|
5270
|
+
var p;
|
|
5271
|
+
s = (p = g.getInitialState == null ? void 0 : g.getInitialState(s)) != null ? p : s;
|
|
5272
5272
|
});
|
|
5273
5273
|
const c = [];
|
|
5274
5274
|
let d = !1;
|
|
@@ -5284,47 +5284,47 @@ function br(e) {
|
|
|
5284
5284
|
for (; c.length; )
|
|
5285
5285
|
c.shift()();
|
|
5286
5286
|
d = !1;
|
|
5287
|
-
}).catch((
|
|
5288
|
-
throw
|
|
5287
|
+
}).catch((p) => setTimeout(() => {
|
|
5288
|
+
throw p;
|
|
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 p = Ee(g, o.options);
|
|
5296
|
+
o.options = r(p);
|
|
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, p, 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, p, m)) != null ? v : `${m ? [m.id, p].join(".") : p}`;
|
|
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, p) => {
|
|
5312
|
+
let m = (p ? 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
5317
|
_getDefaultColumnDef: O(() => [o.options.defaultColumn], (g) => {
|
|
5318
|
-
var
|
|
5319
|
-
return g = (
|
|
5318
|
+
var p;
|
|
5319
|
+
return g = (p = g) != null ? p : {}, {
|
|
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, E;
|
|
5327
|
+
return (v = (E = m.renderValue()) == null || E.toString == null ? void 0 : E.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
|
|
@@ -5332,29 +5332,29 @@ function br(e) {
|
|
|
5332
5332
|
}, j(e, "debugColumns", "_getDefaultColumnDef")),
|
|
5333
5333
|
_getColumnDefs: () => o.options.columns,
|
|
5334
5334
|
getAllColumns: O(() => [o._getColumnDefs()], (g) => {
|
|
5335
|
-
const
|
|
5336
|
-
return
|
|
5337
|
-
const
|
|
5338
|
-
return
|
|
5335
|
+
const p = function(m, v, E) {
|
|
5336
|
+
return E === void 0 && (E = 0), m.map((h) => {
|
|
5337
|
+
const A = La(o, h, E, v), k = h;
|
|
5338
|
+
return A.columns = k.columns ? p(k.columns, A, E + 1) : [], A;
|
|
5339
5339
|
});
|
|
5340
5340
|
};
|
|
5341
|
-
return
|
|
5341
|
+
return p(g);
|
|
5342
5342
|
}, j(e, "debugColumns", "getAllColumns")),
|
|
5343
|
-
getAllFlatColumns: O(() => [o.getAllColumns()], (g) => g.flatMap((
|
|
5344
|
-
_getAllFlatColumnsById: O(() => [o.getAllFlatColumns()], (g) => g.reduce((
|
|
5345
|
-
getAllLeafColumns: O(() => [o.getAllColumns(), o._getOrderColumnsFn()], (g,
|
|
5343
|
+
getAllFlatColumns: O(() => [o.getAllColumns()], (g) => g.flatMap((p) => p.getFlatColumns()), j(e, "debugColumns", "getAllFlatColumns")),
|
|
5344
|
+
_getAllFlatColumnsById: O(() => [o.getAllFlatColumns()], (g) => g.reduce((p, m) => (p[m.id] = m, p), {}), j(e, "debugColumns", "getAllFlatColumnsById")),
|
|
5345
|
+
getAllLeafColumns: O(() => [o.getAllColumns(), o._getOrderColumnsFn()], (g, p) => {
|
|
5346
5346
|
let m = g.flatMap((v) => v.getLeafColumns());
|
|
5347
|
-
return
|
|
5347
|
+
return p(m);
|
|
5348
5348
|
}, j(e, "debugColumns", "getAllLeafColumns")),
|
|
5349
5349
|
getColumn: (g) => {
|
|
5350
|
-
const
|
|
5351
|
-
return process.env.NODE_ENV !== "production" && !
|
|
5350
|
+
const p = o._getAllFlatColumnsById()[g];
|
|
5351
|
+
return process.env.NODE_ENV !== "production" && !p && console.error(`[Table] Column with id '${g}' does not exist.`), p;
|
|
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 p = o._features[g];
|
|
5357
|
+
p == null || p.createTable == null || p.createTable(o);
|
|
5358
5358
|
}
|
|
5359
5359
|
return o;
|
|
5360
5360
|
}
|
|
@@ -5404,18 +5404,18 @@ function Rr() {
|
|
|
5404
5404
|
return s.map((m) => (m.depth = c, o.push(m), a[m.id] = m, m.subRows && (m.subRows = r(m.subRows, c + 1, m.id)), m));
|
|
5405
5405
|
const f = i[c], g = Er(s, f);
|
|
5406
5406
|
return Array.from(g.entries()).map((m, v) => {
|
|
5407
|
-
let [
|
|
5408
|
-
|
|
5409
|
-
const
|
|
5410
|
-
|
|
5411
|
-
V.parentId =
|
|
5407
|
+
let [E, h] = m, A = `${f}:${E}`;
|
|
5408
|
+
A = d ? `${d}>${A}` : A;
|
|
5409
|
+
const k = r(h, c + 1, A);
|
|
5410
|
+
k.forEach((V) => {
|
|
5411
|
+
V.parentId = A;
|
|
5412
5412
|
});
|
|
5413
|
-
const
|
|
5413
|
+
const M = c ? li(h, (V) => V.subRows) : h, x = si(e, A, M[0].original, v, c, void 0, d);
|
|
5414
5414
|
return Object.assign(x, {
|
|
5415
5415
|
groupingColumnId: f,
|
|
5416
|
-
groupingValue:
|
|
5417
|
-
subRows:
|
|
5418
|
-
leafRows:
|
|
5416
|
+
groupingValue: E,
|
|
5417
|
+
subRows: k,
|
|
5418
|
+
leafRows: M,
|
|
5419
5419
|
getValue: (V) => {
|
|
5420
5420
|
if (i.includes(V)) {
|
|
5421
5421
|
if (x._valuesCache.hasOwnProperty(V))
|
|
@@ -5428,11 +5428,11 @@ function Rr() {
|
|
|
5428
5428
|
}
|
|
5429
5429
|
if (x._groupingValuesCache.hasOwnProperty(V))
|
|
5430
5430
|
return x._groupingValuesCache[V];
|
|
5431
|
-
const
|
|
5432
|
-
if (
|
|
5433
|
-
return x._groupingValuesCache[V] =
|
|
5431
|
+
const Q = e.getColumn(V), ie = Q == null ? void 0 : Q.getAggregationFn();
|
|
5432
|
+
if (ie)
|
|
5433
|
+
return x._groupingValuesCache[V] = ie(V, M, h), x._groupingValuesCache[V];
|
|
5434
5434
|
}
|
|
5435
|
-
}),
|
|
5435
|
+
}), k.forEach((V) => {
|
|
5436
5436
|
o.push(V), a[V.id] = V;
|
|
5437
5437
|
}), x;
|
|
5438
5438
|
});
|
|
@@ -5513,22 +5513,22 @@ const Dr = ({
|
|
|
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
|
-
}, $r = ({ header: e }) => /* @__PURE__ */
|
|
5520
|
-
|
|
5519
|
+
}, $r = ({ header: e }) => /* @__PURE__ */ u("th", { className: q(`${e.column.id}`), children: e.column.getCanSort() ? /* @__PURE__ */ u(
|
|
5520
|
+
_e,
|
|
5521
5521
|
{
|
|
5522
5522
|
appearance: "link",
|
|
5523
5523
|
className: "table-header-label p-button--table-header",
|
|
5524
5524
|
onClick: e.column.getToggleSortingHandler(),
|
|
5525
5525
|
type: "button",
|
|
5526
|
-
children: /* @__PURE__ */ B(
|
|
5526
|
+
children: /* @__PURE__ */ B(we, { children: [
|
|
5527
5527
|
Lt(e.column.columnDef.header, e.getContext()),
|
|
5528
|
-
/* @__PURE__ */
|
|
5528
|
+
/* @__PURE__ */ u(Dr, { header: e })
|
|
5529
5529
|
] })
|
|
5530
5530
|
}
|
|
5531
|
-
) : Lt(e.column.columnDef.header, e.getContext()) }, e.id), Le = ({ children: e }) => /* @__PURE__ */
|
|
5531
|
+
) : Lt(e.column.columnDef.header, e.getContext()) }, e.id), Le = ({ 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 });
|
|
5532
5532
|
Le.Left = Ar;
|
|
5533
5533
|
Le.Right = Mr;
|
|
5534
5534
|
const Or = ({
|
|
@@ -5541,14 +5541,14 @@ const Or = ({
|
|
|
5541
5541
|
isPending: r,
|
|
5542
5542
|
pageSizes: l = [20, 30, 50, 100]
|
|
5543
5543
|
}) => {
|
|
5544
|
-
const s =
|
|
5545
|
-
() => s.map((
|
|
5546
|
-
label: `${
|
|
5547
|
-
value:
|
|
5544
|
+
const s = se(() => l, []), c = se(
|
|
5545
|
+
() => s.map((p) => ({
|
|
5546
|
+
label: `${p}/page`,
|
|
5547
|
+
value: p
|
|
5548
5548
|
})),
|
|
5549
5549
|
[s]
|
|
5550
|
-
), d = Math.ceil(t / n), f = (
|
|
5551
|
-
const { value: m } =
|
|
5550
|
+
), d = Math.ceil(t / n), f = (p) => {
|
|
5551
|
+
const { value: m } = p.target;
|
|
5552
5552
|
i(Number(m));
|
|
5553
5553
|
}, g = () => e === d ? n - (d * n - t) : e < d ? n : 0;
|
|
5554
5554
|
return /* @__PURE__ */ B(Le, { children: [
|
|
@@ -5561,7 +5561,7 @@ const Or = ({
|
|
|
5561
5561
|
o
|
|
5562
5562
|
] }),
|
|
5563
5563
|
/* @__PURE__ */ B(Le.Right, { children: [
|
|
5564
|
-
/* @__PURE__ */
|
|
5564
|
+
/* @__PURE__ */ u(
|
|
5565
5565
|
Ro,
|
|
5566
5566
|
{
|
|
5567
5567
|
currentPage: e,
|
|
@@ -5570,7 +5570,7 @@ const Or = ({
|
|
|
5570
5570
|
totalPages: d
|
|
5571
5571
|
}
|
|
5572
5572
|
),
|
|
5573
|
-
/* @__PURE__ */
|
|
5573
|
+
/* @__PURE__ */ u(
|
|
5574
5574
|
Oi,
|
|
5575
5575
|
{
|
|
5576
5576
|
"aria-label": "Items per page",
|
|
@@ -5589,7 +5589,7 @@ const Or = ({
|
|
|
5589
5589
|
const t = e.getCoreRowModel().rows.filter((o) => o.getCanSelect());
|
|
5590
5590
|
let i;
|
|
5591
5591
|
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: [
|
|
5592
|
-
/* @__PURE__ */
|
|
5592
|
+
/* @__PURE__ */ u(
|
|
5593
5593
|
"input",
|
|
5594
5594
|
{
|
|
5595
5595
|
"aria-checked": i,
|
|
@@ -5607,7 +5607,7 @@ const Or = ({
|
|
|
5607
5607
|
...n
|
|
5608
5608
|
}
|
|
5609
5609
|
),
|
|
5610
|
-
/* @__PURE__ */
|
|
5610
|
+
/* @__PURE__ */ u("span", { className: "p-checkbox__label" })
|
|
5611
5611
|
] });
|
|
5612
5612
|
}, Tr = ({ row: e, ...n }) => {
|
|
5613
5613
|
if (!e)
|
|
@@ -5623,7 +5623,7 @@ const Or = ({
|
|
|
5623
5623
|
"aria-disabled": !e.getCanSelect(),
|
|
5624
5624
|
className: "p-checkbox--inline p-table-checkbox--group",
|
|
5625
5625
|
children: [
|
|
5626
|
-
/* @__PURE__ */
|
|
5626
|
+
/* @__PURE__ */ u(
|
|
5627
5627
|
"input",
|
|
5628
5628
|
{
|
|
5629
5629
|
"aria-checked": a ? "mixed" : void 0,
|
|
@@ -5640,7 +5640,7 @@ const Or = ({
|
|
|
5640
5640
|
...n
|
|
5641
5641
|
}
|
|
5642
5642
|
),
|
|
5643
|
-
/* @__PURE__ */
|
|
5643
|
+
/* @__PURE__ */ u("span", { className: "p-checkbox__label" })
|
|
5644
5644
|
]
|
|
5645
5645
|
}
|
|
5646
5646
|
);
|
|
@@ -5653,7 +5653,7 @@ const Or = ({
|
|
|
5653
5653
|
if (!e)
|
|
5654
5654
|
return null;
|
|
5655
5655
|
const o = typeof n == "string" ? n : n(e);
|
|
5656
|
-
return /* @__PURE__ */
|
|
5656
|
+
return /* @__PURE__ */ u(
|
|
5657
5657
|
Gt,
|
|
5658
5658
|
{
|
|
5659
5659
|
message: !e.getCanSelect() && o,
|
|
@@ -5664,7 +5664,7 @@ const Or = ({
|
|
|
5664
5664
|
"aria-disabled": !e.getCanSelect(),
|
|
5665
5665
|
className: "p-checkbox--inline p-table-checkbox",
|
|
5666
5666
|
children: [
|
|
5667
|
-
/* @__PURE__ */
|
|
5667
|
+
/* @__PURE__ */ u(
|
|
5668
5668
|
"input",
|
|
5669
5669
|
{
|
|
5670
5670
|
className: "p-checkbox__input",
|
|
@@ -5675,7 +5675,7 @@ const Or = ({
|
|
|
5675
5675
|
...i
|
|
5676
5676
|
}
|
|
5677
5677
|
),
|
|
5678
|
-
/* @__PURE__ */
|
|
5678
|
+
/* @__PURE__ */ u("span", { className: "p-checkbox__label" })
|
|
5679
5679
|
]
|
|
5680
5680
|
}
|
|
5681
5681
|
)
|
|
@@ -5698,47 +5698,48 @@ const Yr = ({
|
|
|
5698
5698
|
isLoading: d,
|
|
5699
5699
|
noData: f,
|
|
5700
5700
|
pagination: g,
|
|
5701
|
-
pinGroup:
|
|
5702
|
-
|
|
5703
|
-
|
|
5704
|
-
|
|
5705
|
-
|
|
5706
|
-
|
|
5707
|
-
|
|
5701
|
+
pinGroup: p,
|
|
5702
|
+
sorting: m = [],
|
|
5703
|
+
setSorting: v,
|
|
5704
|
+
rowSelection: E,
|
|
5705
|
+
setRowSelection: h,
|
|
5706
|
+
showChevron: A = !1,
|
|
5707
|
+
variant: k = "full-height",
|
|
5708
|
+
...M
|
|
5708
5709
|
}) => {
|
|
5709
|
-
const
|
|
5710
|
-
|
|
5711
|
-
const y = typeof
|
|
5710
|
+
const x = be(null), [V, H] = ge("auto"), [Q, ie] = ge(!1), [Z, de] = ge(c ?? []), [fe, D] = ge(m ?? []), [R, G] = ge(!0), J = (b) => {
|
|
5711
|
+
G((I) => {
|
|
5712
|
+
const y = typeof b == "function" ? b(I) : b;
|
|
5712
5713
|
if (y === !0) return !0;
|
|
5713
|
-
const
|
|
5714
|
-
if (
|
|
5715
|
-
for (const
|
|
5716
|
-
|
|
5717
|
-
return
|
|
5714
|
+
const F = { ...y };
|
|
5715
|
+
if (I !== !0)
|
|
5716
|
+
for (const P of Object.keys(I))
|
|
5717
|
+
P in F || (F[P] = !1);
|
|
5718
|
+
return F;
|
|
5718
5719
|
});
|
|
5719
5720
|
};
|
|
5720
|
-
|
|
5721
|
-
|
|
5722
|
-
const y = { ...
|
|
5723
|
-
for (const
|
|
5724
|
-
const
|
|
5725
|
-
|
|
5721
|
+
Ce(() => {
|
|
5722
|
+
Z.length && J((b) => {
|
|
5723
|
+
const y = { ...b === !0 ? {} : { ...b } };
|
|
5724
|
+
for (const F of a) {
|
|
5725
|
+
const P = Z.map(($) => `${$}:${F[$]}`).join(">");
|
|
5726
|
+
P in y || (y[P] = !0);
|
|
5726
5727
|
}
|
|
5727
5728
|
return y;
|
|
5728
5729
|
});
|
|
5729
|
-
}, [a,
|
|
5730
|
-
const
|
|
5731
|
-
let
|
|
5730
|
+
}, [a, Z]);
|
|
5731
|
+
const ee = se(() => {
|
|
5732
|
+
let b = [...i];
|
|
5732
5733
|
if (d)
|
|
5733
|
-
return
|
|
5734
|
+
return b;
|
|
5734
5735
|
if (n) {
|
|
5735
|
-
const
|
|
5736
|
+
const I = [
|
|
5736
5737
|
{
|
|
5737
5738
|
id: "p-generic-table__select",
|
|
5738
5739
|
accessorKey: "id",
|
|
5739
5740
|
enableSorting: !1,
|
|
5740
|
-
header: ({ table: y }) => c ? "" : /* @__PURE__ */
|
|
5741
|
-
cell: ({ row: y }) => y.getIsGrouped() ? null : /* @__PURE__ */
|
|
5741
|
+
header: ({ table: y }) => c ? "" : /* @__PURE__ */ u(Me.All, { table: y }),
|
|
5742
|
+
cell: ({ row: y }) => y.getIsGrouped() ? null : /* @__PURE__ */ u(
|
|
5742
5743
|
Me,
|
|
5743
5744
|
{
|
|
5744
5745
|
row: y,
|
|
@@ -5747,34 +5748,36 @@ const Yr = ({
|
|
|
5747
5748
|
}
|
|
5748
5749
|
)
|
|
5749
5750
|
},
|
|
5750
|
-
...
|
|
5751
|
+
...b
|
|
5751
5752
|
];
|
|
5752
|
-
c ?
|
|
5753
|
+
c ? b = [
|
|
5753
5754
|
{
|
|
5754
5755
|
id: "p-generic-table__group-select",
|
|
5755
5756
|
accessorKey: "id",
|
|
5756
5757
|
enableSorting: !1,
|
|
5757
|
-
header: ({ table: y }) => /* @__PURE__ */
|
|
5758
|
-
cell: ({ row: y }) => y.getIsGrouped() ? /* @__PURE__ */
|
|
5758
|
+
header: ({ table: y }) => /* @__PURE__ */ u(Me.All, { table: y }),
|
|
5759
|
+
cell: ({ row: y }) => y.getIsGrouped() ? /* @__PURE__ */ u(Me.Group, { row: y }) : null
|
|
5759
5760
|
},
|
|
5760
|
-
...
|
|
5761
|
-
] :
|
|
5761
|
+
...I
|
|
5762
|
+
] : b = I;
|
|
5762
5763
|
}
|
|
5763
|
-
return c &&
|
|
5764
|
+
return c && A && (b = [{
|
|
5764
5765
|
id: "p-generic-table__group-chevron",
|
|
5765
5766
|
accessorKey: "id",
|
|
5766
5767
|
enableSorting: !1,
|
|
5767
5768
|
header: "",
|
|
5768
5769
|
cell: ({ row: y }) => {
|
|
5769
|
-
const
|
|
5770
|
-
return y.getIsGrouped() ? /* @__PURE__ */
|
|
5771
|
-
|
|
5770
|
+
const F = y.getIsExpanded();
|
|
5771
|
+
return y.getIsGrouped() ? /* @__PURE__ */ u(
|
|
5772
|
+
Gt,
|
|
5772
5773
|
{
|
|
5773
|
-
|
|
5774
|
+
message: F ? "Collapse" : "Expand",
|
|
5775
|
+
position: "btm-right",
|
|
5776
|
+
children: /* @__PURE__ */ u(Re, { name: F ? en.chevronUp : en.chevronDown })
|
|
5774
5777
|
}
|
|
5775
|
-
)
|
|
5778
|
+
) : null;
|
|
5776
5779
|
}
|
|
5777
|
-
}, ...
|
|
5780
|
+
}, ...b]), b;
|
|
5778
5781
|
}, [
|
|
5779
5782
|
n,
|
|
5780
5783
|
i,
|
|
@@ -5782,64 +5785,68 @@ const Yr = ({
|
|
|
5782
5785
|
c,
|
|
5783
5786
|
s,
|
|
5784
5787
|
t
|
|
5785
|
-
]),
|
|
5786
|
-
for (const y of
|
|
5787
|
-
const
|
|
5788
|
-
if (
|
|
5789
|
-
if (
|
|
5790
|
-
if (
|
|
5788
|
+
]), ae = se(() => Z.length ? [...a].sort((b, I) => {
|
|
5789
|
+
for (const y of Z) {
|
|
5790
|
+
const F = b[y] ?? null, P = I[y] ?? null;
|
|
5791
|
+
if (F === null) return 1;
|
|
5792
|
+
if (P === null || F < P) return -1;
|
|
5793
|
+
if (F > P) return 1;
|
|
5791
5794
|
}
|
|
5792
5795
|
return 0;
|
|
5793
|
-
}) : a, [a,
|
|
5794
|
-
if (
|
|
5795
|
-
for (const { value: y, isTop:
|
|
5796
|
-
const
|
|
5797
|
-
if ($ === y &&
|
|
5798
|
-
return
|
|
5799
|
-
if (
|
|
5800
|
-
return
|
|
5796
|
+
}) : a, [a, Z]), te = se(() => ae.length ? [...ae].sort((b, I) => {
|
|
5797
|
+
if (p != null && p.length && Z.length)
|
|
5798
|
+
for (const { value: y, isTop: F } of p) {
|
|
5799
|
+
const P = Z[0], $ = b[P] ?? null, z = I[P] ?? null;
|
|
5800
|
+
if ($ === y && z !== y)
|
|
5801
|
+
return F ? -1 : 1;
|
|
5802
|
+
if (z === y && $ !== y)
|
|
5803
|
+
return F ? 1 : -1;
|
|
5801
5804
|
}
|
|
5802
|
-
for (const { id: y, desc:
|
|
5803
|
-
const
|
|
5804
|
-
if (
|
|
5805
|
-
if (
|
|
5806
|
-
if ($ === null ||
|
|
5807
|
-
return
|
|
5808
|
-
if (
|
|
5809
|
-
return
|
|
5805
|
+
for (const { id: y, desc: F } of fe) {
|
|
5806
|
+
const P = b[y] ?? null, $ = I[y] ?? null;
|
|
5807
|
+
if (P === null && $ === null) return 0;
|
|
5808
|
+
if (P === null) return F ? -1 : 1;
|
|
5809
|
+
if ($ === null || P < $)
|
|
5810
|
+
return F ? 1 : -1;
|
|
5811
|
+
if (P > $)
|
|
5812
|
+
return F ? -1 : 1;
|
|
5810
5813
|
}
|
|
5811
5814
|
return 0;
|
|
5812
|
-
}) : [], [
|
|
5815
|
+
}) : [], [ae, fe, p, Z]);
|
|
5813
5816
|
On(() => {
|
|
5814
|
-
const
|
|
5815
|
-
const
|
|
5816
|
-
if (!
|
|
5817
|
-
const
|
|
5818
|
-
if (!
|
|
5819
|
-
const $ =
|
|
5820
|
-
|
|
5817
|
+
const b = () => {
|
|
5818
|
+
const F = x.current;
|
|
5819
|
+
if (!F) return;
|
|
5820
|
+
const P = (o == null ? void 0 : o.current) || document.querySelector("main");
|
|
5821
|
+
if (!P) return;
|
|
5822
|
+
const $ = P.getBoundingClientRect(), z = F.getBoundingClientRect(), U = $.bottom - z.top, ce = F.scrollHeight > U;
|
|
5823
|
+
ie(ce), H(
|
|
5824
|
+
k === "full-height" && ce ? `${U}px` : "auto"
|
|
5825
|
+
);
|
|
5821
5826
|
};
|
|
5822
|
-
|
|
5823
|
-
const
|
|
5824
|
-
return y &&
|
|
5825
|
-
window.removeEventListener("resize",
|
|
5827
|
+
b();
|
|
5828
|
+
const I = new ResizeObserver(b), y = x.current;
|
|
5829
|
+
return y && I.observe(y), window.addEventListener("resize", b), () => {
|
|
5830
|
+
window.removeEventListener("resize", b), y && I.unobserve(y);
|
|
5826
5831
|
};
|
|
5827
|
-
}, [o,
|
|
5828
|
-
const
|
|
5829
|
-
data:
|
|
5830
|
-
columns:
|
|
5832
|
+
}, [o, te.length, d]);
|
|
5833
|
+
const w = k === "full-height" && Q ? "full-height" : "regular", _ = Ir({
|
|
5834
|
+
data: te,
|
|
5835
|
+
columns: ee,
|
|
5831
5836
|
state: {
|
|
5832
|
-
grouping:
|
|
5833
|
-
expanded:
|
|
5834
|
-
sorting:
|
|
5835
|
-
rowSelection:
|
|
5837
|
+
grouping: Z,
|
|
5838
|
+
expanded: R,
|
|
5839
|
+
sorting: fe,
|
|
5840
|
+
rowSelection: E
|
|
5836
5841
|
},
|
|
5837
5842
|
manualPagination: !0,
|
|
5838
5843
|
autoResetExpanded: !1,
|
|
5839
|
-
onExpandedChange:
|
|
5840
|
-
onSortingChange:
|
|
5841
|
-
|
|
5842
|
-
|
|
5844
|
+
onExpandedChange: J,
|
|
5845
|
+
onSortingChange: (b) => {
|
|
5846
|
+
D(b), v && v(b);
|
|
5847
|
+
},
|
|
5848
|
+
onGroupingChange: de,
|
|
5849
|
+
onRowSelectionChange: h,
|
|
5843
5850
|
manualSorting: !0,
|
|
5844
5851
|
enableSorting: !0,
|
|
5845
5852
|
enableExpanding: !0,
|
|
@@ -5850,24 +5857,24 @@ const Yr = ({
|
|
|
5850
5857
|
groupedColumnMode: !1,
|
|
5851
5858
|
enableRowSelection: n,
|
|
5852
5859
|
enableMultiRowSelection: n,
|
|
5853
|
-
getRowId: (
|
|
5854
|
-
}),
|
|
5855
|
-
const { getIsGrouped:
|
|
5856
|
-
return /* @__PURE__ */
|
|
5860
|
+
getRowId: (b) => b.id.toString()
|
|
5861
|
+
}), N = () => /* @__PURE__ */ u("tr", { children: /* @__PURE__ */ u("td", { className: "p-generic-table__loading", colSpan: ee.length, children: /* @__PURE__ */ u(qt, { text: "Loading..." }) }) }), L = () => _.getRowModel().rows.length < 1 ? /* @__PURE__ */ u("tr", { children: /* @__PURE__ */ u("td", { className: "p-generic-table__no-data", colSpan: ee.length, children: f }) }) : _.getRowModel().rows.map((b) => {
|
|
5862
|
+
const { getIsGrouped: I, id: y, getVisibleCells: F, parentId: P } = b, $ = !I(), z = E !== void 0 && Object.keys(E).includes(y);
|
|
5863
|
+
return /* @__PURE__ */ u(
|
|
5857
5864
|
"tr",
|
|
5858
5865
|
{
|
|
5859
5866
|
"aria-rowindex": parseInt(y.replace(/\D/g, "") || "0", 10) + 1,
|
|
5860
|
-
"aria-selected":
|
|
5861
|
-
className:
|
|
5867
|
+
"aria-selected": z,
|
|
5868
|
+
className: q({
|
|
5862
5869
|
"p-generic-table__individual-row": $,
|
|
5863
5870
|
"p-generic-table__group-row": !$,
|
|
5864
|
-
"p-generic-table__nested-row": s !== void 0 && !!
|
|
5871
|
+
"p-generic-table__nested-row": s !== void 0 && !!P
|
|
5865
5872
|
}),
|
|
5866
5873
|
onClick: () => {
|
|
5867
|
-
$ ||
|
|
5874
|
+
$ || b.toggleExpanded();
|
|
5868
5875
|
},
|
|
5869
5876
|
role: "row",
|
|
5870
|
-
children:
|
|
5877
|
+
children: F().filter((U) => !$ && (U.column.id === "p-generic-table__group-select" || U.column.id === "p-generic-table__group-chevron") ? !0 : r(b, U.column)).map((U) => /* @__PURE__ */ u("td", { className: q(`${U.column.id}`), children: Lt(U.column.columnDef.cell, U.getContext()) }, U.id))
|
|
5871
5878
|
},
|
|
5872
5879
|
y
|
|
5873
5880
|
);
|
|
@@ -5875,11 +5882,11 @@ const Yr = ({
|
|
|
5875
5882
|
return /* @__PURE__ */ B(
|
|
5876
5883
|
"div",
|
|
5877
5884
|
{
|
|
5878
|
-
className:
|
|
5885
|
+
className: q("p-generic-table", e),
|
|
5879
5886
|
"data-testid": "p-generic-table",
|
|
5880
|
-
...
|
|
5887
|
+
...M,
|
|
5881
5888
|
children: [
|
|
5882
|
-
g && /* @__PURE__ */
|
|
5889
|
+
g && /* @__PURE__ */ u(
|
|
5883
5890
|
Or,
|
|
5884
5891
|
{
|
|
5885
5892
|
currentPage: g.currentPage,
|
|
@@ -5896,35 +5903,35 @@ const Yr = ({
|
|
|
5896
5903
|
"table",
|
|
5897
5904
|
{
|
|
5898
5905
|
"aria-busy": d,
|
|
5899
|
-
"aria-label":
|
|
5906
|
+
"aria-label": M["aria-label"],
|
|
5900
5907
|
"aria-describedby": "generic-table-description",
|
|
5901
|
-
"aria-rowcount":
|
|
5902
|
-
className:
|
|
5903
|
-
"p-generic-table__is-full-height":
|
|
5908
|
+
"aria-rowcount": te.length + 1,
|
|
5909
|
+
className: q("p-generic-table__table", {
|
|
5910
|
+
"p-generic-table__is-full-height": w === "full-height",
|
|
5904
5911
|
"p-generic-table__is-selectable": n,
|
|
5905
5912
|
"p-generic-table__is-grouped": c !== void 0
|
|
5906
5913
|
}),
|
|
5907
5914
|
role: "grid",
|
|
5908
5915
|
children: [
|
|
5909
|
-
/* @__PURE__ */
|
|
5910
|
-
/* @__PURE__ */
|
|
5911
|
-
n && c && (!
|
|
5916
|
+
/* @__PURE__ */ u("thead", { children: _.getHeaderGroups().map((b) => /* @__PURE__ */ u("tr", { role: "row", children: b.headers.filter(l).map((I, y) => /* @__PURE__ */ B(Mn, { children: [
|
|
5917
|
+
/* @__PURE__ */ u($r, { header: I }),
|
|
5918
|
+
n && c && (!A && y === 2 || A && y === 3) ? /* @__PURE__ */ u(
|
|
5912
5919
|
"th",
|
|
5913
5920
|
{
|
|
5914
5921
|
className: "p-generic-table__select-alignment",
|
|
5915
5922
|
role: "columnheader"
|
|
5916
5923
|
}
|
|
5917
5924
|
) : null
|
|
5918
|
-
] },
|
|
5919
|
-
/* @__PURE__ */
|
|
5925
|
+
] }, I.id)) }, b.id)) }),
|
|
5926
|
+
/* @__PURE__ */ u(
|
|
5920
5927
|
"tbody",
|
|
5921
5928
|
{
|
|
5922
|
-
ref:
|
|
5929
|
+
ref: x,
|
|
5923
5930
|
style: {
|
|
5924
5931
|
overflowY: "auto",
|
|
5925
|
-
maxHeight:
|
|
5932
|
+
maxHeight: V
|
|
5926
5933
|
},
|
|
5927
|
-
children: d ?
|
|
5934
|
+
children: d ? N() : L()
|
|
5928
5935
|
}
|
|
5929
5936
|
)
|
|
5930
5937
|
]
|
|
@@ -5933,21 +5940,7 @@ const Yr = ({
|
|
|
5933
5940
|
]
|
|
5934
5941
|
}
|
|
5935
5942
|
);
|
|
5936
|
-
},
|
|
5937
|
-
row: e
|
|
5938
|
-
}) => /* @__PURE__ */ p(
|
|
5939
|
-
Ce,
|
|
5940
|
-
{
|
|
5941
|
-
appearance: "base",
|
|
5942
|
-
dense: !0,
|
|
5943
|
-
hasIcon: !0,
|
|
5944
|
-
onClick: () => {
|
|
5945
|
-
e.toggleExpanded();
|
|
5946
|
-
},
|
|
5947
|
-
type: "button",
|
|
5948
|
-
children: e.getIsExpanded() ? /* @__PURE__ */ p(we, { name: "minus", children: "Collapse" }) : /* @__PURE__ */ p(we, { name: "plus", children: "Expand" })
|
|
5949
|
-
}
|
|
5950
|
-
), In = {
|
|
5943
|
+
}, In = {
|
|
5951
5944
|
DEFAULT: 4,
|
|
5952
5945
|
EXPANDED: 15
|
|
5953
5946
|
}, xe = {
|
|
@@ -5984,7 +5977,7 @@ const Yr = ({
|
|
|
5984
5977
|
}, Dn = (e, n) => {
|
|
5985
5978
|
const t = e.charAt(n - 1);
|
|
5986
5979
|
return n > 0 && (t === xe.CLOSE_PAREN || t === xe.COMMA);
|
|
5987
|
-
},
|
|
5980
|
+
}, Xr = ({
|
|
5988
5981
|
className: e,
|
|
5989
5982
|
disabled: n = !1,
|
|
5990
5983
|
search: t,
|
|
@@ -5997,72 +5990,72 @@ const Yr = ({
|
|
|
5997
5990
|
placeholder: c,
|
|
5998
5991
|
...d
|
|
5999
5992
|
}) => {
|
|
6000
|
-
const [f, g] =
|
|
5993
|
+
const [f, g] = ge({
|
|
6001
5994
|
isVisible: !1,
|
|
6002
5995
|
highlightedIndex: -1,
|
|
6003
5996
|
showingMore: !1,
|
|
6004
5997
|
cursorPosition: 0
|
|
6005
|
-
}),
|
|
6006
|
-
const D = f.showingMore ? In.EXPANDED : In.DEFAULT,
|
|
6007
|
-
return !f.showingMore && l.length > D ? [...
|
|
6008
|
-
}, [l, f.showingMore]), h =
|
|
5998
|
+
}), p = be(null), m = be(null), v = be(null), E = se(() => {
|
|
5999
|
+
const D = f.showingMore ? In.EXPANDED : In.DEFAULT, R = l.slice(0, D);
|
|
6000
|
+
return !f.showingMore && l.length > D ? [...R, { value: "Show more...", type: "more" }] : R;
|
|
6001
|
+
}, [l, f.showingMore]), h = X(
|
|
6009
6002
|
(D) => {
|
|
6010
|
-
g(typeof D == "function" ? (
|
|
6003
|
+
g(typeof D == "function" ? (R) => ({ ...R, ...D(R) }) : (R) => ({ ...R, ...D }));
|
|
6011
6004
|
},
|
|
6012
6005
|
[]
|
|
6013
|
-
),
|
|
6006
|
+
), A = X(
|
|
6014
6007
|
(D) => {
|
|
6015
|
-
|
|
6008
|
+
p.current && !p.current.contains(D.target) && h({
|
|
6016
6009
|
isVisible: !1,
|
|
6017
6010
|
highlightedIndex: -1
|
|
6018
6011
|
});
|
|
6019
6012
|
},
|
|
6020
6013
|
[h]
|
|
6021
|
-
),
|
|
6022
|
-
(D,
|
|
6023
|
-
const { tokenStart:
|
|
6014
|
+
), k = X(
|
|
6015
|
+
(D, R) => {
|
|
6016
|
+
const { tokenStart: G, tokenEnd: J } = R;
|
|
6024
6017
|
if (D.type === "filter") {
|
|
6025
|
-
const
|
|
6026
|
-
return t.slice(0,
|
|
6018
|
+
const ae = D.value + xe.COLON + xe.OPEN_PAREN;
|
|
6019
|
+
return t.slice(0, G) + ae + t.slice(J);
|
|
6027
6020
|
}
|
|
6028
6021
|
if (o.length === 0) {
|
|
6029
|
-
const
|
|
6030
|
-
return t.slice(0,
|
|
6022
|
+
const ae = D.type + xe.COLON + xe.OPEN_PAREN + xe.EQUALS + D.value;
|
|
6023
|
+
return t.slice(0, G) + ae + t.slice(J);
|
|
6031
6024
|
}
|
|
6032
|
-
const
|
|
6033
|
-
return t.slice(0,
|
|
6025
|
+
const ee = t.charAt(G - 1) === xe.EQUALS ? D.value : xe.EQUALS + D.value;
|
|
6026
|
+
return t.slice(0, G) + ee + t.slice(J);
|
|
6034
6027
|
},
|
|
6035
6028
|
[t, o]
|
|
6036
|
-
),
|
|
6029
|
+
), M = X(
|
|
6037
6030
|
(D) => {
|
|
6038
|
-
const
|
|
6039
|
-
if (!
|
|
6040
|
-
if (
|
|
6031
|
+
const R = E[D];
|
|
6032
|
+
if (!R) return;
|
|
6033
|
+
if (R.type === "more") {
|
|
6041
6034
|
h({ showingMore: !0 });
|
|
6042
6035
|
return;
|
|
6043
6036
|
}
|
|
6044
|
-
const
|
|
6037
|
+
const G = Ze(
|
|
6045
6038
|
t,
|
|
6046
6039
|
f.cursorPosition
|
|
6047
|
-
),
|
|
6048
|
-
|
|
6049
|
-
|
|
6040
|
+
), J = k(R, G), ee = G.tokenStart + (R.type === "filter" ? R.value.length + 2 : o.length === 0 ? R.type.length + R.value.length + 3 : R.value.length + 1), { context: ae, token: te } = Ze(
|
|
6041
|
+
J,
|
|
6042
|
+
ee
|
|
6050
6043
|
);
|
|
6051
|
-
a(
|
|
6044
|
+
a(ae), r(te), i(J), setTimeout(() => {
|
|
6052
6045
|
v.current && (v.current.focus(), v.current.setSelectionRange(
|
|
6053
|
-
|
|
6054
|
-
|
|
6046
|
+
ee,
|
|
6047
|
+
ee
|
|
6055
6048
|
));
|
|
6056
6049
|
}, 0), h({
|
|
6057
6050
|
highlightedIndex: 0,
|
|
6058
6051
|
showingMore: !1,
|
|
6059
|
-
isVisible:
|
|
6060
|
-
cursorPosition:
|
|
6052
|
+
isVisible: R.type === "filter",
|
|
6053
|
+
cursorPosition: ee
|
|
6061
6054
|
});
|
|
6062
6055
|
},
|
|
6063
6056
|
[
|
|
6064
|
-
|
|
6065
|
-
|
|
6057
|
+
E,
|
|
6058
|
+
k,
|
|
6066
6059
|
t,
|
|
6067
6060
|
f.cursorPosition,
|
|
6068
6061
|
o,
|
|
@@ -6071,36 +6064,36 @@ const Yr = ({
|
|
|
6071
6064
|
i,
|
|
6072
6065
|
h
|
|
6073
6066
|
]
|
|
6074
|
-
), x =
|
|
6067
|
+
), x = X(() => {
|
|
6075
6068
|
if (!v.current) return;
|
|
6076
|
-
const D = v.current.selectionStart || 0, { context:
|
|
6069
|
+
const D = v.current.selectionStart || 0, { context: R, token: G } = Ze(
|
|
6077
6070
|
t,
|
|
6078
6071
|
D
|
|
6079
6072
|
);
|
|
6080
|
-
a(
|
|
6081
|
-
...
|
|
6073
|
+
a(R), r(G), h((J) => ({
|
|
6074
|
+
...J,
|
|
6082
6075
|
isVisible: !Dn(t, D),
|
|
6083
6076
|
cursorPosition: D
|
|
6084
6077
|
}));
|
|
6085
|
-
}, [t, a, r, h]), V =
|
|
6078
|
+
}, [t, a, r, h]), V = X(
|
|
6086
6079
|
(D) => {
|
|
6087
|
-
const { key:
|
|
6080
|
+
const { key: R } = D;
|
|
6088
6081
|
if (f.isVisible) {
|
|
6089
|
-
const
|
|
6090
|
-
switch (
|
|
6082
|
+
const G = E.length;
|
|
6083
|
+
switch (R) {
|
|
6091
6084
|
case "Tab":
|
|
6092
6085
|
case "ArrowDown":
|
|
6093
6086
|
D.preventDefault(), h({
|
|
6094
|
-
highlightedIndex: (f.highlightedIndex + 1) %
|
|
6087
|
+
highlightedIndex: (f.highlightedIndex + 1) % G
|
|
6095
6088
|
});
|
|
6096
6089
|
return;
|
|
6097
6090
|
case "ArrowUp":
|
|
6098
6091
|
D.preventDefault(), h({
|
|
6099
|
-
highlightedIndex: f.highlightedIndex <= 0 ?
|
|
6092
|
+
highlightedIndex: f.highlightedIndex <= 0 ? G - 1 : f.highlightedIndex - 1
|
|
6100
6093
|
});
|
|
6101
6094
|
return;
|
|
6102
6095
|
case "Enter":
|
|
6103
|
-
D.preventDefault(), f.highlightedIndex >= 0 ?
|
|
6096
|
+
D.preventDefault(), f.highlightedIndex >= 0 ? M(f.highlightedIndex) : h({ isVisible: !1 });
|
|
6104
6097
|
return;
|
|
6105
6098
|
case "Escape":
|
|
6106
6099
|
D.preventDefault(), h({
|
|
@@ -6110,63 +6103,63 @@ const Yr = ({
|
|
|
6110
6103
|
return;
|
|
6111
6104
|
}
|
|
6112
6105
|
}
|
|
6113
|
-
(
|
|
6106
|
+
(R === "ArrowLeft" || R === "ArrowRight" || R === "Home" || R === "End") && setTimeout(x, 0);
|
|
6114
6107
|
},
|
|
6115
6108
|
[
|
|
6116
6109
|
f,
|
|
6117
|
-
|
|
6110
|
+
E.length,
|
|
6118
6111
|
h,
|
|
6119
|
-
|
|
6112
|
+
M,
|
|
6120
6113
|
x
|
|
6121
6114
|
]
|
|
6122
|
-
), H =
|
|
6115
|
+
), H = X(
|
|
6123
6116
|
(D) => {
|
|
6124
|
-
const { key:
|
|
6125
|
-
(
|
|
6117
|
+
const { key: R } = D;
|
|
6118
|
+
(R === "ArrowLeft" || R === "ArrowRight" || R === "Home" || R === "End") && x();
|
|
6126
6119
|
},
|
|
6127
6120
|
[x]
|
|
6128
|
-
),
|
|
6121
|
+
), Q = X(() => {
|
|
6129
6122
|
h({
|
|
6130
6123
|
isVisible: !0,
|
|
6131
6124
|
highlightedIndex: 0
|
|
6132
6125
|
});
|
|
6133
|
-
}, [h]),
|
|
6126
|
+
}, [h]), ie = X(
|
|
6134
6127
|
(D) => {
|
|
6135
|
-
var
|
|
6136
|
-
const
|
|
6128
|
+
var ee;
|
|
6129
|
+
const R = ((ee = v.current) == null ? void 0 : ee.selectionStart) || D.length, { context: G, token: J } = Ze(
|
|
6137
6130
|
D,
|
|
6138
|
-
|
|
6131
|
+
R
|
|
6139
6132
|
);
|
|
6140
|
-
a(
|
|
6133
|
+
a(G), r(J), i(D), h({
|
|
6141
6134
|
highlightedIndex: 0,
|
|
6142
|
-
isVisible: !Dn(D,
|
|
6135
|
+
isVisible: !Dn(D, R),
|
|
6143
6136
|
showingMore: !1,
|
|
6144
|
-
cursorPosition:
|
|
6137
|
+
cursorPosition: R
|
|
6145
6138
|
});
|
|
6146
6139
|
},
|
|
6147
6140
|
[a, r, i, h]
|
|
6148
|
-
),
|
|
6141
|
+
), Z = X(() => {
|
|
6149
6142
|
setTimeout(x, 0);
|
|
6150
|
-
}, [x]),
|
|
6143
|
+
}, [x]), de = X(() => {
|
|
6151
6144
|
h({
|
|
6152
6145
|
isVisible: !1,
|
|
6153
6146
|
highlightedIndex: -1
|
|
6154
6147
|
});
|
|
6155
|
-
}, [h]),
|
|
6148
|
+
}, [h]), fe = X(
|
|
6156
6149
|
(D) => {
|
|
6157
6150
|
h({ highlightedIndex: D });
|
|
6158
6151
|
},
|
|
6159
6152
|
[h]
|
|
6160
6153
|
);
|
|
6161
|
-
return
|
|
6154
|
+
return Ce(() => (document.addEventListener("mousedown", A), () => document.removeEventListener("mousedown", A)), [A]), /* @__PURE__ */ B(
|
|
6162
6155
|
"div",
|
|
6163
6156
|
{
|
|
6164
|
-
className:
|
|
6157
|
+
className: q("p-query-input", e),
|
|
6165
6158
|
"data-testid": "p-query-input",
|
|
6166
|
-
ref:
|
|
6159
|
+
ref: p,
|
|
6167
6160
|
...d,
|
|
6168
6161
|
children: [
|
|
6169
|
-
/* @__PURE__ */
|
|
6162
|
+
/* @__PURE__ */ u(
|
|
6170
6163
|
jn,
|
|
6171
6164
|
{
|
|
6172
6165
|
disabled: n,
|
|
@@ -6177,19 +6170,19 @@ const Yr = ({
|
|
|
6177
6170
|
id: "query-input",
|
|
6178
6171
|
name: "query-input",
|
|
6179
6172
|
ref: v,
|
|
6180
|
-
onFocus:
|
|
6181
|
-
onChange:
|
|
6173
|
+
onFocus: Q,
|
|
6174
|
+
onChange: ie,
|
|
6182
6175
|
onKeyDown: V,
|
|
6183
6176
|
onKeyUp: H,
|
|
6184
|
-
onClear:
|
|
6185
|
-
onClick:
|
|
6177
|
+
onClear: de,
|
|
6178
|
+
onClick: Z,
|
|
6186
6179
|
"aria-disabled": n,
|
|
6187
6180
|
"aria-expanded": f.isVisible,
|
|
6188
6181
|
"aria-haspopup": "listbox",
|
|
6189
6182
|
"aria-owns": "query-suggestions"
|
|
6190
6183
|
}
|
|
6191
6184
|
),
|
|
6192
|
-
f.isVisible && l.length > 0 && /* @__PURE__ */
|
|
6185
|
+
f.isVisible && l.length > 0 && /* @__PURE__ */ u(
|
|
6193
6186
|
"ul",
|
|
6194
6187
|
{
|
|
6195
6188
|
className: "p-query-input__list",
|
|
@@ -6197,42 +6190,42 @@ const Yr = ({
|
|
|
6197
6190
|
id: "query-suggestions",
|
|
6198
6191
|
role: "listbox",
|
|
6199
6192
|
"aria-label": "Search suggestions",
|
|
6200
|
-
children: s ? /* @__PURE__ */
|
|
6193
|
+
children: s ? /* @__PURE__ */ u("div", { className: "p-query-input__loading", children: /* @__PURE__ */ u(qt, { text: "Loading..." }) }) : E.map((D, R) => /* @__PURE__ */ B(
|
|
6201
6194
|
"li",
|
|
6202
6195
|
{
|
|
6203
|
-
className:
|
|
6204
|
-
highlight:
|
|
6196
|
+
className: q("p-query-input__item", {
|
|
6197
|
+
highlight: R === f.highlightedIndex
|
|
6205
6198
|
}),
|
|
6206
|
-
onClick: () =>
|
|
6207
|
-
onKeyDown: () =>
|
|
6208
|
-
onMouseEnter: () =>
|
|
6199
|
+
onClick: () => M(R),
|
|
6200
|
+
onKeyDown: () => M(R),
|
|
6201
|
+
onMouseEnter: () => fe(R),
|
|
6209
6202
|
role: "option",
|
|
6210
|
-
"aria-selected":
|
|
6203
|
+
"aria-selected": R === f.highlightedIndex,
|
|
6211
6204
|
tabIndex: -1,
|
|
6212
6205
|
children: [
|
|
6213
6206
|
/* @__PURE__ */ B("span", { className: "p-query-input__item-label", children: [
|
|
6214
|
-
/* @__PURE__ */
|
|
6207
|
+
/* @__PURE__ */ u(
|
|
6215
6208
|
"span",
|
|
6216
6209
|
{
|
|
6217
|
-
className:
|
|
6210
|
+
className: q({
|
|
6218
6211
|
"u-text--muted": D.type === "more"
|
|
6219
6212
|
}),
|
|
6220
6213
|
children: D.value
|
|
6221
6214
|
}
|
|
6222
6215
|
),
|
|
6223
|
-
D.type === "filter" && /* @__PURE__ */
|
|
6216
|
+
D.type === "filter" && /* @__PURE__ */ u("span", { className: "u-text--muted", children: ":()" })
|
|
6224
6217
|
] }),
|
|
6225
|
-
D.type !== "more" && /* @__PURE__ */
|
|
6218
|
+
D.type !== "more" && /* @__PURE__ */ u("span", { className: "u-text--muted u-align-text--right", children: D.type })
|
|
6226
6219
|
]
|
|
6227
6220
|
},
|
|
6228
|
-
`${D.value}-${
|
|
6221
|
+
`${D.value}-${R}`
|
|
6229
6222
|
))
|
|
6230
6223
|
}
|
|
6231
6224
|
)
|
|
6232
6225
|
]
|
|
6233
6226
|
}
|
|
6234
6227
|
);
|
|
6235
|
-
},
|
|
6228
|
+
}, Qr = ({ value: e, unit: n }, {
|
|
6236
6229
|
binary: t = !1,
|
|
6237
6230
|
convertTo: i,
|
|
6238
6231
|
decimals: o = 2,
|
|
@@ -6242,13 +6235,13 @@ const Yr = ({
|
|
|
6242
6235
|
if (l === 0)
|
|
6243
6236
|
return { value: 0, unit: i || "B" };
|
|
6244
6237
|
const s = t ? 1024 : 1e3, c = t ? ["B", "KiB", "MiB", "GiB", "TiB", "PiB", "EiB", "ZiB", "YiB"] : ["B", "KB", "MB", "GB", "TB", "PB", "EB", "ZB", "YB"], d = c.findIndex((v) => v === n) || 0, f = l * Math.pow(s, d), g = i ? c.findIndex((v) => v === i) : Math.floor(Math.log(f) / Math.log(s));
|
|
6245
|
-
let
|
|
6246
|
-
if (
|
|
6238
|
+
let p = f / Math.pow(s, g);
|
|
6239
|
+
if (p % 1 !== 0) {
|
|
6247
6240
|
const v = Math.pow(10, o);
|
|
6248
|
-
|
|
6241
|
+
p = Math[a](p * v) / v;
|
|
6249
6242
|
}
|
|
6250
6243
|
return {
|
|
6251
|
-
value: r ? -
|
|
6244
|
+
value: r ? -p : p,
|
|
6252
6245
|
unit: c[g]
|
|
6253
6246
|
};
|
|
6254
6247
|
};
|
|
@@ -6260,24 +6253,23 @@ export {
|
|
|
6260
6253
|
Kr as FileUploadContainer,
|
|
6261
6254
|
Kt as FormSection,
|
|
6262
6255
|
Yr as GenericTable,
|
|
6263
|
-
Xr as GroupRowActions,
|
|
6264
6256
|
zn as InputGroup,
|
|
6265
6257
|
Ln as MainToolbar,
|
|
6266
6258
|
Vi as Meter,
|
|
6267
6259
|
Wr as MultiSelect,
|
|
6268
6260
|
Aa as MultiSelectDropdown,
|
|
6269
|
-
|
|
6261
|
+
le as Navigation,
|
|
6270
6262
|
po as NavigationBar,
|
|
6271
6263
|
Br as NestedFormGroup,
|
|
6272
6264
|
_o as Pagination,
|
|
6273
6265
|
Ro as PaginationContainer,
|
|
6274
6266
|
Gi as Placeholder,
|
|
6275
6267
|
qi as ProgressIndicator,
|
|
6276
|
-
|
|
6268
|
+
Xr as QueryInput,
|
|
6277
6269
|
Ur as Stepper,
|
|
6278
6270
|
ri as TableCaption,
|
|
6279
6271
|
qr as defaultFilledColors,
|
|
6280
|
-
|
|
6272
|
+
Qr as formatBytes,
|
|
6281
6273
|
Ie as meterColor,
|
|
6282
6274
|
Oe as testIds
|
|
6283
6275
|
};
|