@keycloak/keycloak-ui-shared 26.3.2 → 26.3.4
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/keycloak-ui-shared.js +413 -418
- package/dist/user-profile/utils.d.ts +1 -1
- package/package.json +2 -2
|
@@ -1,25 +1,25 @@
|
|
|
1
1
|
import { jsx as t, jsxs as v, Fragment as j } from "react/jsx-runtime";
|
|
2
|
-
import { AlertGroup as en, Alert as tn, AlertVariant as
|
|
3
|
-
import { createContext as
|
|
2
|
+
import { AlertGroup as en, Alert as tn, AlertVariant as Be, AlertActionCloseButton as nn, Page as rn, Modal as Ct, ModalVariant as an, TextContent as ln, Text as Ce, Button as N, Spinner as kt, FormHelperText as We, HelperText as je, HelperTextItem as Ge, Popover as on, Icon as Ve, FormGroup as It, NumberInput as sn, ValidatedOptions as K, InputGroup as xe, InputGroupItem as Ne, TextInput as Se, Select as Te, SelectList as Ee, SelectOption as ze, MenuToggle as me, MenuToggleStatus as Je, TextInputGroup as wt, TextInputGroupMain as xt, ChipGroup as Ye, Chip as Qe, TextInputGroupUtilities as St, Switch as cn, TextArea as Tt, FileUpload as dn, Title as un, Card as hn, CardHeader as mn, CardTitle as pn, CardBody as fn, Grid as gn, GridItem as ot, PageSection as yn, JumpLinks as bn, JumpLinksItem as vn, ButtonVariant as Ie, Checkbox as Cn, Radio as kn, MenuFooter as In, Dropdown as wn, DropdownList as xn, DropdownItem as st, Masthead as Sn, MastheadToggle as Tn, PageToggleButton as En, MastheadBrand as An, MastheadContent as Rn, Toolbar as ke, ToolbarContent as _e, ToolbarItem as W, Avatar as Dn, Bullseye as On, EmptyState as Fn, EmptyStateIcon as ct, EmptyStateHeader as Pn, EmptyStateBody as Mn, EmptyStateFooter as Ln, EmptyStateActions as Bn, SearchInput as Vn, Divider as Nn, Pagination as _n, Badge as qn } from "@patternfly/react-core";
|
|
3
|
+
import { createContext as Et, useContext as At, useRef as J, useEffect as le, useCallback as he, useState as E, useMemo as q, forwardRef as $n, useId as Rt, Fragment as Dt, Children as Ot, Component as Un, isValidElement as Kn } from "react";
|
|
4
4
|
import { useTranslation as _ } from "react-i18next";
|
|
5
5
|
import { NetworkError as Ft } from "@keycloak/keycloak-admin-client";
|
|
6
6
|
import Hn from "keycloak-js";
|
|
7
7
|
import { ExclamationCircleIcon as Wn, HelpIcon as dt, EyeIcon as jn, EyeSlashIcon as Gn, TimesIcon as Pt, CubeIcon as zn, PaypalIcon as Jn, InstagramIcon as Yn, BitbucketIcon as Qn, MicrosoftIcon as Xn, TwitterIcon as Zn, StackOverflowIcon as er, OpenshiftIcon as tr, LinkedinIcon as nr, GoogleIcon as rr, GitlabIcon as ar, FacebookSquareIcon as lr, GithubIcon as ir, MinusCircleIcon as or, PlusCircleIcon as Mt, EllipsisVIcon as sr, BarsIcon as cr, SearchIcon as dr, SyncAltIcon as ur } from "@patternfly/react-icons";
|
|
8
|
-
import { useFormContext as Ae, Controller as ie, useController as
|
|
9
|
-
import { get as
|
|
8
|
+
import { useFormContext as Ae, Controller as ie, useController as Re, FormProvider as hr, useWatch as mr } from "react-hook-form";
|
|
9
|
+
import { get as V, cloneDeep as pr, intersectionBy as fr } from "lodash-es";
|
|
10
10
|
import be from "@patternfly/react-styles/css/components/Avatar/avatar";
|
|
11
11
|
import { css as gr } from "@patternfly/react-styles";
|
|
12
|
-
import { Table as yr, TableVariant as br, Thead as vr, Tr as ve, Th as
|
|
12
|
+
import { Table as yr, TableVariant as br, Thead as vr, Tr as ve, Th as Me, Tbody as ut, Td as re, ExpandableRowContent as Cr, ActionsColumn as kr, TableText as Ir } from "@patternfly/react-table";
|
|
13
13
|
import './main.css';function Xe(e, n) {
|
|
14
|
-
const r =
|
|
14
|
+
const r = Et(n);
|
|
15
15
|
return r.displayName = e, r;
|
|
16
16
|
}
|
|
17
|
-
const wr = ["error", "errorMessage"],
|
|
17
|
+
const wr = ["error", "errorMessage"], Le = "error_description";
|
|
18
18
|
function xr(e) {
|
|
19
19
|
if (typeof e == "string")
|
|
20
20
|
return e;
|
|
21
21
|
if (e instanceof Ft)
|
|
22
|
-
return
|
|
22
|
+
return Lt(e.responseData);
|
|
23
23
|
if (e instanceof Error)
|
|
24
24
|
return e.message;
|
|
25
25
|
throw new Error("Unable to determine error message.");
|
|
@@ -28,13 +28,13 @@ function Sr(e) {
|
|
|
28
28
|
if (!(e instanceof Ft))
|
|
29
29
|
return;
|
|
30
30
|
const n = e.responseData;
|
|
31
|
-
return
|
|
32
|
-
}
|
|
33
|
-
function Lt(e) {
|
|
34
|
-
if (typeof e == "object" && e !== null && Me in e && typeof e[Me] == "string")
|
|
35
|
-
return e[Me];
|
|
31
|
+
return Tr(n);
|
|
36
32
|
}
|
|
37
33
|
function Tr(e) {
|
|
34
|
+
if (typeof e == "object" && e !== null && Le in e && typeof e[Le] == "string")
|
|
35
|
+
return e[Le];
|
|
36
|
+
}
|
|
37
|
+
function Lt(e) {
|
|
38
38
|
if (!(typeof e != "object" || e === null))
|
|
39
39
|
for (const n of wr) {
|
|
40
40
|
const r = e[n];
|
|
@@ -42,13 +42,13 @@ function Tr(e) {
|
|
|
42
42
|
return r;
|
|
43
43
|
}
|
|
44
44
|
}
|
|
45
|
-
const
|
|
46
|
-
function
|
|
45
|
+
const Er = () => Math.floor(Math.random() * 1e3);
|
|
46
|
+
function Ar(e) {
|
|
47
47
|
return e != null;
|
|
48
48
|
}
|
|
49
49
|
function Ze(e) {
|
|
50
|
-
const n =
|
|
51
|
-
if (
|
|
50
|
+
const n = At(e);
|
|
51
|
+
if (Ar(n))
|
|
52
52
|
return n;
|
|
53
53
|
throw new Error(
|
|
54
54
|
`No provider found for ${e.displayName ? `the '${e.displayName}'` : "an unknown"} context, make sure it is included in your component hierarchy.`
|
|
@@ -87,7 +87,7 @@ function Dr({ alerts: e, onCloseAlert: n }) {
|
|
|
87
87
|
{
|
|
88
88
|
"data-testid": o === 0 ? "last-alert" : void 0,
|
|
89
89
|
isLiveRegion: !0,
|
|
90
|
-
variant:
|
|
90
|
+
variant: Be[a],
|
|
91
91
|
component: "p",
|
|
92
92
|
variantLabel: "",
|
|
93
93
|
title: l,
|
|
@@ -109,54 +109,54 @@ const Or = 8e3, Bt = Xe(
|
|
|
109
109
|
"AlertContext",
|
|
110
110
|
void 0
|
|
111
111
|
), _a = () => Ze(Bt), Fr = ({ children: e }) => {
|
|
112
|
-
const { t: n } = _(), r = Rr(), [a, l] =
|
|
113
|
-
(
|
|
112
|
+
const { t: n } = _(), r = Rr(), [a, l] = E([]), i = (u) => l((h) => h.filter((c) => c.id !== u)), o = he(
|
|
113
|
+
(u, h = Be.success, c) => {
|
|
114
114
|
const y = {
|
|
115
|
-
id:
|
|
116
|
-
message:
|
|
117
|
-
variant:
|
|
115
|
+
id: Er(),
|
|
116
|
+
message: u,
|
|
117
|
+
variant: h,
|
|
118
118
|
description: c
|
|
119
119
|
};
|
|
120
120
|
l((g) => [y, ...g]), r(() => i(y.id), Or);
|
|
121
121
|
},
|
|
122
122
|
[r]
|
|
123
123
|
), s = he(
|
|
124
|
-
(
|
|
125
|
-
const c = n(
|
|
126
|
-
o(c,
|
|
124
|
+
(u, h) => {
|
|
125
|
+
const c = n(u, { error: xr(h) }), y = Sr(h);
|
|
126
|
+
o(c, Be.danger, y);
|
|
127
127
|
},
|
|
128
128
|
[o, n]
|
|
129
|
-
),
|
|
130
|
-
return /* @__PURE__ */ v(Bt.Provider, { value:
|
|
129
|
+
), d = q(() => ({ addAlert: o, addError: s }), [o, s]);
|
|
130
|
+
return /* @__PURE__ */ v(Bt.Provider, { value: d, children: [
|
|
131
131
|
/* @__PURE__ */ t(Dr, { alerts: a, onCloseAlert: i }),
|
|
132
132
|
e
|
|
133
133
|
] });
|
|
134
134
|
}, Pr = (e) => {
|
|
135
|
-
const { t: n } = _(),
|
|
136
|
-
console.error(
|
|
137
|
-
function
|
|
135
|
+
const { t: n, i18n: r } = _(), a = e.error, l = Mr(a), i = Lt(a);
|
|
136
|
+
console.error(a);
|
|
137
|
+
function o() {
|
|
138
138
|
location.href = location.origin + location.pathname;
|
|
139
139
|
}
|
|
140
140
|
return /* @__PURE__ */ t(rn, { children: /* @__PURE__ */ t(
|
|
141
141
|
Ct,
|
|
142
142
|
{
|
|
143
143
|
variant: an.small,
|
|
144
|
-
title:
|
|
144
|
+
title: n("somethingWentWrong"),
|
|
145
145
|
titleIconVariant: "danger",
|
|
146
146
|
showClose: !1,
|
|
147
147
|
isOpen: !0,
|
|
148
148
|
actions: [
|
|
149
|
-
/* @__PURE__ */ t(
|
|
149
|
+
/* @__PURE__ */ t(N, { variant: "primary", onClick: o, children: n("tryAgain") }, "tryAgain")
|
|
150
150
|
],
|
|
151
|
-
children: /* @__PURE__ */ t(ln, { children:
|
|
151
|
+
children: /* @__PURE__ */ t(ln, { children: l ? /* @__PURE__ */ t(Ce, { children: n(l) }) : i && r.exists(i) ? /* @__PURE__ */ t(Ce, { children: n(i) }) : /* @__PURE__ */ t(Ce, { children: n("somethingWentWrongDescription") }) })
|
|
152
152
|
}
|
|
153
153
|
) });
|
|
154
154
|
};
|
|
155
155
|
function Mr(e) {
|
|
156
|
-
return
|
|
156
|
+
return e instanceof Error ? e.message : null;
|
|
157
157
|
}
|
|
158
158
|
function Lr(e, n, r) {
|
|
159
|
-
const [a, l] =
|
|
159
|
+
const [a, l] = E(
|
|
160
160
|
() => e.getItem(n) ?? r
|
|
161
161
|
), i = he((o) => {
|
|
162
162
|
l(o), e.setItem(n, o);
|
|
@@ -169,7 +169,7 @@ function Lr(e, n, r) {
|
|
|
169
169
|
return () => window.removeEventListener("storage", o);
|
|
170
170
|
}, [e, n]), [a, i];
|
|
171
171
|
}
|
|
172
|
-
function
|
|
172
|
+
function Vt(e, n, r) {
|
|
173
173
|
const a = q(
|
|
174
174
|
() => JSON.stringify(r),
|
|
175
175
|
[r]
|
|
@@ -178,35 +178,35 @@ function Nt(e, n, r) {
|
|
|
178
178
|
n,
|
|
179
179
|
a
|
|
180
180
|
), o = q(() => JSON.parse(l), [l]), s = he(
|
|
181
|
-
(
|
|
181
|
+
(d) => i(JSON.stringify(d)),
|
|
182
182
|
[]
|
|
183
183
|
);
|
|
184
184
|
return [o, s];
|
|
185
185
|
}
|
|
186
|
-
const
|
|
186
|
+
const Nt = Xe(
|
|
187
187
|
"HelpContext",
|
|
188
188
|
void 0
|
|
189
|
-
), Br = () => Ze(
|
|
190
|
-
const [n, r] =
|
|
189
|
+
), Br = () => Ze(Nt), Vr = ({ children: e }) => {
|
|
190
|
+
const [n, r] = Vt(localStorage, "helpEnabled", !0);
|
|
191
191
|
function a() {
|
|
192
192
|
r(!n);
|
|
193
193
|
}
|
|
194
|
-
return /* @__PURE__ */ t(
|
|
195
|
-
},
|
|
194
|
+
return /* @__PURE__ */ t(Nt.Provider, { value: { enabled: n, toggleHelp: a }, children: e });
|
|
195
|
+
}, Nr = () => Et(void 0);
|
|
196
196
|
let qe;
|
|
197
197
|
const qa = () => {
|
|
198
|
-
const e =
|
|
198
|
+
const e = At(qe);
|
|
199
199
|
if (!e)
|
|
200
200
|
throw Error(
|
|
201
201
|
"no environment provider in the hierarchy make sure to add the provider"
|
|
202
202
|
);
|
|
203
203
|
return e;
|
|
204
|
-
},
|
|
204
|
+
}, $a = ({
|
|
205
205
|
environment: e,
|
|
206
206
|
children: n
|
|
207
207
|
}) => {
|
|
208
|
-
qe =
|
|
209
|
-
const r = J(!1), [a, l] =
|
|
208
|
+
qe = Nr();
|
|
209
|
+
const r = J(!1), [a, l] = E(!1), [i, o] = E(), s = q(() => {
|
|
210
210
|
const d = new Hn({
|
|
211
211
|
url: e.serverBaseUrl,
|
|
212
212
|
realm: e.realm,
|
|
@@ -214,25 +214,18 @@ const qa = () => {
|
|
|
214
214
|
});
|
|
215
215
|
return d.onAuthLogout = () => d.login(), d;
|
|
216
216
|
}, [e]);
|
|
217
|
-
le(() => {
|
|
217
|
+
return le(() => {
|
|
218
218
|
if (r.current)
|
|
219
219
|
return;
|
|
220
220
|
s.init({
|
|
221
|
-
onLoad: "
|
|
221
|
+
onLoad: "login-required",
|
|
222
222
|
pkceMethod: "S256",
|
|
223
223
|
responseMode: "query",
|
|
224
224
|
scope: e.scope
|
|
225
225
|
}).then(() => l(!0)).catch((u) => o(u)), r.current = !0;
|
|
226
|
-
}, [s]);
|
|
227
|
-
const h = new URLSearchParams(window.location.search);
|
|
228
|
-
return i || h.get("error_description") ? /* @__PURE__ */ t(
|
|
229
|
-
Pr,
|
|
230
|
-
{
|
|
231
|
-
error: i || h.get("error_description")
|
|
232
|
-
}
|
|
233
|
-
) : a ? /* @__PURE__ */ t(qe.Provider, { value: { environment: e, keycloak: s }, children: /* @__PURE__ */ t(Fr, { children: /* @__PURE__ */ t(Nr, { children: n }) }) }) : /* @__PURE__ */ t(kt, {});
|
|
226
|
+
}, [s]), i ? /* @__PURE__ */ t(Pr, { error: i }) : a ? /* @__PURE__ */ t(qe.Provider, { value: { environment: e, keycloak: s }, children: /* @__PURE__ */ t(Fr, { children: /* @__PURE__ */ t(Vr, { children: n }) }) }) : /* @__PURE__ */ t(kt, {});
|
|
234
227
|
};
|
|
235
|
-
function
|
|
228
|
+
function Ua() {
|
|
236
229
|
const n = document.getElementById("environment")?.textContent;
|
|
237
230
|
if (typeof n != "string")
|
|
238
231
|
throw new Error("Environment variables not found in the document.");
|
|
@@ -251,14 +244,14 @@ const Ka = ({
|
|
|
251
244
|
buttonVariant: i,
|
|
252
245
|
buttonTestRole: o,
|
|
253
246
|
onContinue: s,
|
|
254
|
-
component:
|
|
255
|
-
children:
|
|
256
|
-
...
|
|
247
|
+
component: d = N,
|
|
248
|
+
children: u,
|
|
249
|
+
...h
|
|
257
250
|
}) => {
|
|
258
|
-
const [c, y] =
|
|
251
|
+
const [c, y] = E(!1);
|
|
259
252
|
return /* @__PURE__ */ v(j, { children: [
|
|
260
253
|
/* @__PURE__ */ t(
|
|
261
|
-
|
|
254
|
+
d,
|
|
262
255
|
{
|
|
263
256
|
variant: i,
|
|
264
257
|
onClick: () => y(!0),
|
|
@@ -271,13 +264,13 @@ const Ka = ({
|
|
|
271
264
|
Ct,
|
|
272
265
|
{
|
|
273
266
|
variant: "small",
|
|
274
|
-
...
|
|
267
|
+
...h,
|
|
275
268
|
title: e,
|
|
276
269
|
isOpen: c,
|
|
277
270
|
onClose: () => y(!1),
|
|
278
271
|
actions: [
|
|
279
272
|
/* @__PURE__ */ t(
|
|
280
|
-
|
|
273
|
+
N,
|
|
281
274
|
{
|
|
282
275
|
id: "modal-confirm",
|
|
283
276
|
variant: "primary",
|
|
@@ -289,7 +282,7 @@ const Ka = ({
|
|
|
289
282
|
"confirm"
|
|
290
283
|
),
|
|
291
284
|
/* @__PURE__ */ t(
|
|
292
|
-
|
|
285
|
+
N,
|
|
293
286
|
{
|
|
294
287
|
id: "modal-cancel",
|
|
295
288
|
variant: "secondary",
|
|
@@ -299,7 +292,7 @@ const Ka = ({
|
|
|
299
292
|
"cancel"
|
|
300
293
|
)
|
|
301
294
|
],
|
|
302
|
-
children:
|
|
295
|
+
children: u
|
|
303
296
|
}
|
|
304
297
|
)
|
|
305
298
|
] });
|
|
@@ -318,10 +311,10 @@ const Ka = ({
|
|
|
318
311
|
"aria-label": n,
|
|
319
312
|
onClick: (i) => i.preventDefault(),
|
|
320
313
|
className: "pf-v5-c-form__group-label-help",
|
|
321
|
-
children: /* @__PURE__ */ t(
|
|
314
|
+
children: /* @__PURE__ */ t(Ve, { isInline: r, children: /* @__PURE__ */ t(dt, {}) })
|
|
322
315
|
}
|
|
323
316
|
),
|
|
324
|
-
a && /* @__PURE__ */ t(
|
|
317
|
+
a && /* @__PURE__ */ t(Ve, { isInline: r, children: /* @__PURE__ */ t(dt, {}) })
|
|
325
318
|
] }) }) : null;
|
|
326
319
|
};
|
|
327
320
|
function oe(e) {
|
|
@@ -374,21 +367,21 @@ const Y = ({
|
|
|
374
367
|
name: e,
|
|
375
368
|
control: i,
|
|
376
369
|
render: ({ field: s }) => {
|
|
377
|
-
const
|
|
378
|
-
|
|
370
|
+
const d = !!r.rules?.required, u = oe(r.rules?.min), h = s.value ?? r.defaultValue, c = (y) => s.onChange(
|
|
371
|
+
u !== void 0 ? Math.max(y, Number(u)) : y
|
|
379
372
|
);
|
|
380
373
|
return /* @__PURE__ */ t(
|
|
381
374
|
sn,
|
|
382
375
|
{
|
|
383
376
|
...l,
|
|
384
377
|
id: e,
|
|
385
|
-
value:
|
|
378
|
+
value: h,
|
|
386
379
|
validated: o[e] ? K.error : K.default,
|
|
387
|
-
required:
|
|
388
|
-
min: Number(
|
|
380
|
+
required: d,
|
|
381
|
+
min: Number(u),
|
|
389
382
|
max: Number(r.rules?.max),
|
|
390
|
-
onPlus: () => c(
|
|
391
|
-
onMinus: () => c(
|
|
383
|
+
onPlus: () => c(h + 1),
|
|
384
|
+
onMinus: () => c(h - 1),
|
|
392
385
|
onChange: (y) => {
|
|
393
386
|
const g = Number(y.currentTarget.value);
|
|
394
387
|
c(isNaN(g) ? r.defaultValue : g);
|
|
@@ -405,10 +398,10 @@ const Y = ({
|
|
|
405
398
|
innerRef: n,
|
|
406
399
|
...r
|
|
407
400
|
}) => {
|
|
408
|
-
const { t: a } = _(), [l, i] =
|
|
409
|
-
return /* @__PURE__ */ v(
|
|
410
|
-
/* @__PURE__ */ t(
|
|
411
|
-
|
|
401
|
+
const { t: a } = _(), [l, i] = E(!0);
|
|
402
|
+
return /* @__PURE__ */ v(xe, { children: [
|
|
403
|
+
/* @__PURE__ */ t(Ne, { isFill: !0, children: /* @__PURE__ */ t(
|
|
404
|
+
Se,
|
|
412
405
|
{
|
|
413
406
|
...r,
|
|
414
407
|
type: l ? "password" : "text",
|
|
@@ -416,7 +409,7 @@ const Y = ({
|
|
|
416
409
|
}
|
|
417
410
|
) }),
|
|
418
411
|
e && /* @__PURE__ */ t(
|
|
419
|
-
|
|
412
|
+
N,
|
|
420
413
|
{
|
|
421
414
|
variant: "control",
|
|
422
415
|
"aria-label": a("showPassword"),
|
|
@@ -425,12 +418,12 @@ const Y = ({
|
|
|
425
418
|
}
|
|
426
419
|
)
|
|
427
420
|
] });
|
|
428
|
-
},
|
|
421
|
+
}, $t = $n(
|
|
429
422
|
(e, n) => /* @__PURE__ */ t(_r, { ...e, innerRef: n })
|
|
430
423
|
);
|
|
431
|
-
|
|
424
|
+
$t.displayName = "PasswordInput";
|
|
432
425
|
const Wa = (e) => {
|
|
433
|
-
const { labelIcon: n, ...r } = e, a = !!oe(e.rules?.required), l = e.defaultValue ?? "", { field: i, fieldState: o } =
|
|
426
|
+
const { labelIcon: n, ...r } = e, a = !!oe(e.rules?.required), l = e.defaultValue ?? "", { field: i, fieldState: o } = Re({
|
|
434
427
|
...e,
|
|
435
428
|
defaultValue: l
|
|
436
429
|
});
|
|
@@ -444,7 +437,7 @@ const Wa = (e) => {
|
|
|
444
437
|
error: o.error,
|
|
445
438
|
children: [
|
|
446
439
|
/* @__PURE__ */ t(
|
|
447
|
-
|
|
440
|
+
$t,
|
|
448
441
|
{
|
|
449
442
|
isRequired: a,
|
|
450
443
|
id: e.name,
|
|
@@ -468,13 +461,13 @@ const Wa = (e) => {
|
|
|
468
461
|
controller: i,
|
|
469
462
|
labelIcon: o,
|
|
470
463
|
isDisabled: s,
|
|
471
|
-
onSelect:
|
|
472
|
-
...
|
|
464
|
+
onSelect: d,
|
|
465
|
+
...u
|
|
473
466
|
}) => {
|
|
474
467
|
const {
|
|
475
|
-
control:
|
|
468
|
+
control: h,
|
|
476
469
|
formState: { errors: c }
|
|
477
|
-
} = Ae(), [y, g] =
|
|
470
|
+
} = Ae(), [y, g] = E(!1), C = oe(i.rules?.required) === !0;
|
|
478
471
|
return /* @__PURE__ */ t(
|
|
479
472
|
Y,
|
|
480
473
|
{
|
|
@@ -482,53 +475,53 @@ const Wa = (e) => {
|
|
|
482
475
|
name: n,
|
|
483
476
|
label: r,
|
|
484
477
|
isRequired: C,
|
|
485
|
-
error:
|
|
478
|
+
error: V(c, n),
|
|
486
479
|
labelIcon: o,
|
|
487
480
|
children: /* @__PURE__ */ t(
|
|
488
481
|
ie,
|
|
489
482
|
{
|
|
490
483
|
...i,
|
|
491
484
|
name: n,
|
|
492
|
-
control:
|
|
493
|
-
render: ({ field: { onChange: R, value:
|
|
494
|
-
|
|
485
|
+
control: h,
|
|
486
|
+
render: ({ field: { onChange: R, value: p } }) => /* @__PURE__ */ t(
|
|
487
|
+
Te,
|
|
495
488
|
{
|
|
496
|
-
...
|
|
489
|
+
...u,
|
|
497
490
|
variant: "default",
|
|
498
491
|
onClick: () => g(!y),
|
|
499
492
|
onOpenChange: () => g(!1),
|
|
500
493
|
selected: te(a) ? a.filter(
|
|
501
|
-
(
|
|
502
|
-
).map((
|
|
503
|
-
toggle: (
|
|
504
|
-
|
|
494
|
+
(m) => Array.isArray(p) ? p.includes(m.key) : p === m.key
|
|
495
|
+
).map((m) => m.value) : p,
|
|
496
|
+
toggle: (m) => /* @__PURE__ */ t(
|
|
497
|
+
me,
|
|
505
498
|
{
|
|
506
499
|
id: e || n,
|
|
507
|
-
ref:
|
|
500
|
+
ref: m,
|
|
508
501
|
onClick: () => g(!y),
|
|
509
502
|
isExpanded: y,
|
|
510
503
|
isFullWidth: !0,
|
|
511
|
-
status:
|
|
504
|
+
status: V(c, n) ? Je.danger : void 0,
|
|
512
505
|
"aria-label": r,
|
|
513
506
|
isDisabled: s,
|
|
514
507
|
children: te(a) ? a.find(
|
|
515
|
-
(S) => S.key === (Array.isArray(
|
|
516
|
-
)?.value :
|
|
508
|
+
(S) => S.key === (Array.isArray(p) ? p[0] : p)
|
|
509
|
+
)?.value : p
|
|
517
510
|
}
|
|
518
511
|
),
|
|
519
|
-
onSelect: (
|
|
520
|
-
const T = S?.toString(), I = Array.isArray(
|
|
521
|
-
|
|
512
|
+
onSelect: (m, S) => {
|
|
513
|
+
const T = S?.toString(), I = Array.isArray(p) ? [T] : T;
|
|
514
|
+
d ? d(I, R) : R(I), g(!1);
|
|
522
515
|
},
|
|
523
516
|
isOpen: y,
|
|
524
|
-
children: /* @__PURE__ */ t(
|
|
517
|
+
children: /* @__PURE__ */ t(Ee, { "data-testid": `select-${n}`, children: [...a, ...l].map((m) => /* @__PURE__ */ t(ze, { value: ae(m), children: et(m) ? m : m.value }, ae(m))) })
|
|
525
518
|
}
|
|
526
519
|
)
|
|
527
520
|
}
|
|
528
521
|
)
|
|
529
522
|
}
|
|
530
523
|
);
|
|
531
|
-
}, ee = (e) => et(e) ? e : e.value,
|
|
524
|
+
}, ee = (e) => et(e) ? e : e.value, $r = ({
|
|
532
525
|
id: e,
|
|
533
526
|
name: n,
|
|
534
527
|
label: r,
|
|
@@ -537,14 +530,14 @@ const Wa = (e) => {
|
|
|
537
530
|
controller: i,
|
|
538
531
|
labelIcon: o,
|
|
539
532
|
placeholderText: s,
|
|
540
|
-
onFilter:
|
|
541
|
-
variant:
|
|
542
|
-
...
|
|
533
|
+
onFilter: d,
|
|
534
|
+
variant: u,
|
|
535
|
+
...h
|
|
543
536
|
}) => {
|
|
544
537
|
const {
|
|
545
538
|
control: c,
|
|
546
539
|
formState: { errors: y }
|
|
547
|
-
} = Ae(), [g, C] =
|
|
540
|
+
} = Ae(), [g, C] = E(!1), [R, p] = E(""), [m, S] = E(0), [T, I] = E([]), b = J(), x = oe(i.rules?.required) === !0, F = u === ue.typeaheadMulti, A = q(
|
|
548
541
|
() => [
|
|
549
542
|
...a.filter(
|
|
550
543
|
(f) => !l.map((k) => ee(k)).includes(ee(f))
|
|
@@ -552,20 +545,20 @@ const Wa = (e) => {
|
|
|
552
545
|
...l
|
|
553
546
|
],
|
|
554
547
|
[l, a]
|
|
555
|
-
), B =
|
|
548
|
+
), B = A.filter(
|
|
556
549
|
(f) => ee(f).toLowerCase().startsWith(R.toLowerCase())
|
|
557
550
|
), H = (f, k) => {
|
|
558
551
|
k.value.includes(f) ? (k.onChange(k.value.filter((D) => D !== f)), te(a) && I(
|
|
559
552
|
T.filter((D) => D.key !== f)
|
|
560
|
-
)) : (k.onChange([...k.value, f]), te(
|
|
553
|
+
)) : (k.onChange([...k.value, f]), te(A) && I([
|
|
561
554
|
...T,
|
|
562
|
-
|
|
555
|
+
A.find((D) => D.key === f)
|
|
563
556
|
]));
|
|
564
557
|
}, M = (f, k) => {
|
|
565
|
-
const D = B[
|
|
558
|
+
const D = B[m];
|
|
566
559
|
switch (C(!0), f.key) {
|
|
567
560
|
case "Enter": {
|
|
568
|
-
f.preventDefault(),
|
|
561
|
+
f.preventDefault(), p(F ? "" : ee(D)), H(ae(D), k), C(!1), S(0);
|
|
569
562
|
break;
|
|
570
563
|
}
|
|
571
564
|
case "Tab":
|
|
@@ -574,14 +567,14 @@ const Wa = (e) => {
|
|
|
574
567
|
break;
|
|
575
568
|
}
|
|
576
569
|
case "Backspace": {
|
|
577
|
-
|
|
570
|
+
u === ue.typeahead && k.onChange("");
|
|
578
571
|
break;
|
|
579
572
|
}
|
|
580
573
|
case "ArrowUp":
|
|
581
574
|
case "ArrowDown": {
|
|
582
575
|
f.preventDefault();
|
|
583
576
|
let O = 0;
|
|
584
|
-
f.key === "ArrowUp" && (
|
|
577
|
+
f.key === "ArrowUp" && (m === 0 ? O = a.length - 1 : O = m - 1), f.key === "ArrowDown" && (m === a.length - 1 ? O = 0 : O = m + 1), S(O);
|
|
585
578
|
break;
|
|
586
579
|
}
|
|
587
580
|
}
|
|
@@ -593,7 +586,7 @@ const Wa = (e) => {
|
|
|
593
586
|
name: n,
|
|
594
587
|
label: r,
|
|
595
588
|
isRequired: x,
|
|
596
|
-
error:
|
|
589
|
+
error: V(y, n),
|
|
597
590
|
labelIcon: o,
|
|
598
591
|
children: /* @__PURE__ */ t(
|
|
599
592
|
ie,
|
|
@@ -602,16 +595,16 @@ const Wa = (e) => {
|
|
|
602
595
|
name: n,
|
|
603
596
|
control: c,
|
|
604
597
|
render: ({ field: f }) => /* @__PURE__ */ t(
|
|
605
|
-
|
|
598
|
+
Te,
|
|
606
599
|
{
|
|
607
|
-
...
|
|
600
|
+
...h,
|
|
608
601
|
onOpenChange: () => C(!1),
|
|
609
|
-
selected: te(
|
|
602
|
+
selected: te(A) ? A.filter(
|
|
610
603
|
(k) => Array.isArray(f.value) ? f.value.includes(k.key) : f.value === k.key
|
|
611
604
|
).map((k) => k.value) : f.value,
|
|
612
605
|
shouldFocusFirstItemOnOpen: !1,
|
|
613
606
|
toggle: (k) => /* @__PURE__ */ t(
|
|
614
|
-
|
|
607
|
+
me,
|
|
615
608
|
{
|
|
616
609
|
ref: k,
|
|
617
610
|
id: e || n,
|
|
@@ -621,18 +614,18 @@ const Wa = (e) => {
|
|
|
621
614
|
},
|
|
622
615
|
isExpanded: g,
|
|
623
616
|
isFullWidth: !0,
|
|
624
|
-
status:
|
|
617
|
+
status: V(y, n) ? Je.danger : void 0,
|
|
625
618
|
children: /* @__PURE__ */ v(wt, { isPlain: !0, children: [
|
|
626
619
|
/* @__PURE__ */ t(
|
|
627
620
|
xt,
|
|
628
621
|
{
|
|
629
622
|
placeholder: s,
|
|
630
|
-
value:
|
|
623
|
+
value: u === ue.typeahead && f.value ? te(A) ? A.find(
|
|
631
624
|
(D) => D.key === (Array.isArray(f.value) ? f.value[0] : f.value)
|
|
632
625
|
)?.value : f.value : R,
|
|
633
626
|
onClick: () => C(!g),
|
|
634
627
|
onChange: (D, O) => {
|
|
635
|
-
|
|
628
|
+
p(O), d?.(O);
|
|
636
629
|
},
|
|
637
630
|
onKeyDown: (D) => M(D, f),
|
|
638
631
|
autoComplete: "off",
|
|
@@ -640,19 +633,19 @@ const Wa = (e) => {
|
|
|
640
633
|
role: "combobox",
|
|
641
634
|
isExpanded: g,
|
|
642
635
|
"aria-controls": "select-typeahead-listbox",
|
|
643
|
-
children:
|
|
636
|
+
children: u === ue.typeaheadMulti && Array.isArray(f.value) && /* @__PURE__ */ t(Ye, { "aria-label": "Current selections", children: f.value.map(
|
|
644
637
|
(D, O) => /* @__PURE__ */ t(
|
|
645
638
|
Qe,
|
|
646
639
|
{
|
|
647
640
|
onClick: (se) => {
|
|
648
641
|
se.stopPropagation(), f.onChange(
|
|
649
642
|
f.value.filter(
|
|
650
|
-
(
|
|
643
|
+
($) => $ !== ae(D)
|
|
651
644
|
)
|
|
652
645
|
);
|
|
653
646
|
},
|
|
654
|
-
children: te(
|
|
655
|
-
...
|
|
647
|
+
children: te(A) ? [
|
|
648
|
+
...A,
|
|
656
649
|
...T
|
|
657
650
|
].find((se) => D === se.key)?.value : ee(D)
|
|
658
651
|
},
|
|
@@ -662,11 +655,11 @@ const Wa = (e) => {
|
|
|
662
655
|
}
|
|
663
656
|
),
|
|
664
657
|
/* @__PURE__ */ t(St, { children: (!!R || f.value) && /* @__PURE__ */ t(
|
|
665
|
-
|
|
658
|
+
N,
|
|
666
659
|
{
|
|
667
660
|
variant: "plain",
|
|
668
661
|
onClick: () => {
|
|
669
|
-
|
|
662
|
+
p(""), f.onChange(F ? [] : ""), b?.current?.focus();
|
|
670
663
|
},
|
|
671
664
|
"aria-label": "Clear input value",
|
|
672
665
|
children: /* @__PURE__ */ t(Pt, { "aria-hidden": !0 })
|
|
@@ -678,14 +671,14 @@ const Wa = (e) => {
|
|
|
678
671
|
onSelect: (k, D) => {
|
|
679
672
|
k?.stopPropagation();
|
|
680
673
|
const O = D?.toString();
|
|
681
|
-
F && Array.isArray(f.value) ? (
|
|
674
|
+
F && Array.isArray(f.value) ? (p(""), H(O || "", f)) : (f.onChange(Array.isArray(f.value) ? [O] : O), C(!1));
|
|
682
675
|
},
|
|
683
676
|
isOpen: g,
|
|
684
|
-
children: /* @__PURE__ */ t(
|
|
677
|
+
children: /* @__PURE__ */ t(Ee, { children: B.map((k, D) => /* @__PURE__ */ t(
|
|
685
678
|
ze,
|
|
686
679
|
{
|
|
687
680
|
value: ae(k),
|
|
688
|
-
isFocused:
|
|
681
|
+
isFocused: m === D,
|
|
689
682
|
isActive: f.value.includes(ee(k)),
|
|
690
683
|
children: ee(k)
|
|
691
684
|
},
|
|
@@ -699,13 +692,13 @@ const Wa = (e) => {
|
|
|
699
692
|
);
|
|
700
693
|
};
|
|
701
694
|
var ue = /* @__PURE__ */ ((e) => (e.single = "single", e.typeahead = "typeahead", e.typeaheadMulti = "typeaheadMulti", e))(ue || {});
|
|
702
|
-
const te = (e) => typeof e[0] != "string", et = (e) => typeof e == "string", ae = (e) => et(e) ? e : e.key,
|
|
695
|
+
const te = (e) => typeof e[0] != "string", et = (e) => typeof e == "string", ae = (e) => et(e) ? e : e.key, Ur = ({
|
|
703
696
|
variant: e = "single",
|
|
704
697
|
...n
|
|
705
|
-
}) => e === "single" ? /* @__PURE__ */ t(qr, { ...n }) : /* @__PURE__ */ t(
|
|
706
|
-
const l = n || r, i =
|
|
698
|
+
}) => e === "single" ? /* @__PURE__ */ t(qr, { ...n }) : /* @__PURE__ */ t($r, { ...n, variant: e }), $e = (e) => e && typeof e == "string" ? e.includes("${") : !1, Ue = (e) => e.substring(2, e.length - 1), ne = (e, n, r, a) => {
|
|
699
|
+
const l = n || r, i = $e(l) ? Ue(l) : l, o = a ? `${a}.${i}` : i;
|
|
707
700
|
return e(o || "");
|
|
708
|
-
}, Ke = (e, n) => ne(e, n.displayName, n.name), Kr = ["username", "firstName", "lastName", "email"],
|
|
701
|
+
}, Ke = (e, n) => ne(e, n.displayName, n.name), Kr = ["username", "firstName", "lastName", "email"], Ut = (e) => e && Kr.includes(e), Q = (e) => `${Ut(e) ? "" : "attributes."}${e?.replaceAll(
|
|
709
702
|
".",
|
|
710
703
|
"🍺"
|
|
711
704
|
)}`, ja = (e) => e.replaceAll(".", "🍺"), Hr = (e) => e.replaceAll("🍺", ".");
|
|
@@ -713,11 +706,13 @@ function Ga(e, n, r) {
|
|
|
713
706
|
(e.responseData.errors !== void 0 ? e.responseData.errors : [e.responseData]).forEach((a) => {
|
|
714
707
|
const l = Object.assign(
|
|
715
708
|
{},
|
|
716
|
-
a.params?.map(
|
|
709
|
+
a.params?.map(
|
|
710
|
+
(i) => $e(i?.toString()) ? r(Ue(i)) : i
|
|
711
|
+
)
|
|
717
712
|
);
|
|
718
713
|
n(Q(a.field), {
|
|
719
714
|
message: r(
|
|
720
|
-
|
|
715
|
+
$e(a.errorMessage) ? Ue(a.errorMessage) : a.errorMessage,
|
|
721
716
|
{
|
|
722
717
|
/* eslint-disable @typescript-eslint/no-misused-spread */
|
|
723
718
|
...l,
|
|
@@ -728,7 +723,7 @@ function Ga(e, n, r) {
|
|
|
728
723
|
});
|
|
729
724
|
});
|
|
730
725
|
}
|
|
731
|
-
function
|
|
726
|
+
function De({
|
|
732
727
|
required: e
|
|
733
728
|
}) {
|
|
734
729
|
return e;
|
|
@@ -764,17 +759,17 @@ const Ja = ({
|
|
|
764
759
|
control: s,
|
|
765
760
|
name: l.name,
|
|
766
761
|
defaultValue: o,
|
|
767
|
-
render: ({ field: { onChange:
|
|
762
|
+
render: ({ field: { onChange: d, value: u } }) => /* @__PURE__ */ t(
|
|
768
763
|
cn,
|
|
769
764
|
{
|
|
770
765
|
...l,
|
|
771
766
|
id: l.name,
|
|
772
767
|
"data-testid": Hr(l.name),
|
|
773
768
|
label: e,
|
|
774
|
-
isChecked: n ?
|
|
775
|
-
onChange: (
|
|
769
|
+
isChecked: n ? u === "true" : u,
|
|
770
|
+
onChange: (h, c) => {
|
|
776
771
|
const y = n ? c.toString() : c;
|
|
777
|
-
l.onChange?.(
|
|
772
|
+
l.onChange?.(h, c), d(y);
|
|
778
773
|
}
|
|
779
774
|
}
|
|
780
775
|
)
|
|
@@ -783,7 +778,7 @@ const Ja = ({
|
|
|
783
778
|
}
|
|
784
779
|
);
|
|
785
780
|
}, Ya = (e) => {
|
|
786
|
-
const n = !!e.rules?.required, r = e.defaultValue ?? "", { field: a, fieldState: l } =
|
|
781
|
+
const n = !!e.rules?.required, r = e.defaultValue ?? "", { field: a, fieldState: l } = Re({
|
|
787
782
|
...e,
|
|
788
783
|
defaultValue: r
|
|
789
784
|
});
|
|
@@ -810,7 +805,7 @@ const Ja = ({
|
|
|
810
805
|
}
|
|
811
806
|
);
|
|
812
807
|
}, Qa = (e) => {
|
|
813
|
-
const { labelIcon: n, helperText: r, ...a } = e, l = !!oe(e.rules?.required), i = e.defaultValue ?? "", { field: o, fieldState: s } =
|
|
808
|
+
const { labelIcon: n, helperText: r, ...a } = e, l = !!oe(e.rules?.required), i = e.defaultValue ?? "", { field: o, fieldState: s } = Re({
|
|
814
809
|
...e,
|
|
815
810
|
defaultValue: i
|
|
816
811
|
});
|
|
@@ -824,7 +819,7 @@ const Ja = ({
|
|
|
824
819
|
error: s.error,
|
|
825
820
|
children: [
|
|
826
821
|
/* @__PURE__ */ t(
|
|
827
|
-
|
|
822
|
+
Se,
|
|
828
823
|
{
|
|
829
824
|
isRequired: l,
|
|
830
825
|
id: e.name,
|
|
@@ -840,7 +835,7 @@ const Ja = ({
|
|
|
840
835
|
}
|
|
841
836
|
);
|
|
842
837
|
}, Wr = Tt, Xa = (e) => {
|
|
843
|
-
const { labelIcon: n, ...r } = e, a = !!oe(e.rules?.required), l = e.defaultValue ?? "", { t: i } = _(), [o, s] =
|
|
838
|
+
const { labelIcon: n, ...r } = e, a = !!oe(e.rules?.required), l = e.defaultValue ?? "", { t: i } = _(), [o, s] = E(""), { field: d, fieldState: u } = Re({
|
|
844
839
|
...e,
|
|
845
840
|
defaultValue: l
|
|
846
841
|
});
|
|
@@ -851,7 +846,7 @@ const Ja = ({
|
|
|
851
846
|
label: e.label,
|
|
852
847
|
labelIcon: n,
|
|
853
848
|
isRequired: a,
|
|
854
|
-
error:
|
|
849
|
+
error: u.error,
|
|
855
850
|
children: /* @__PURE__ */ t(
|
|
856
851
|
dn,
|
|
857
852
|
{
|
|
@@ -859,25 +854,25 @@ const Ja = ({
|
|
|
859
854
|
"data-testid": e["data-testid"] || e.name,
|
|
860
855
|
filename: o,
|
|
861
856
|
browseButtonText: i("browse"),
|
|
862
|
-
validated:
|
|
857
|
+
validated: u.error ? K.error : K.default,
|
|
863
858
|
hideDefaultPreview: !0,
|
|
864
859
|
isDisabled: e.isDisabled,
|
|
865
860
|
type: "text",
|
|
866
|
-
onFileInputChange: (
|
|
867
|
-
|
|
861
|
+
onFileInputChange: (h, c) => {
|
|
862
|
+
d.onChange(c), s(c.name);
|
|
868
863
|
},
|
|
869
864
|
onClearClick: () => {
|
|
870
|
-
|
|
865
|
+
d.onChange(null), s("");
|
|
871
866
|
},
|
|
872
867
|
...r,
|
|
873
|
-
...
|
|
868
|
+
...d
|
|
874
869
|
}
|
|
875
870
|
)
|
|
876
871
|
}
|
|
877
872
|
);
|
|
878
873
|
}, Za = ({ icon: e }) => {
|
|
879
874
|
const n = jr(e);
|
|
880
|
-
return /* @__PURE__ */ t(
|
|
875
|
+
return /* @__PURE__ */ t(Ve, { size: "lg", children: /* @__PURE__ */ t(n, { alt: e }) });
|
|
881
876
|
};
|
|
882
877
|
function jr(e) {
|
|
883
878
|
switch (e) {
|
|
@@ -937,7 +932,7 @@ const Gr = "_title_180i0_2", zr = {
|
|
|
937
932
|
}) => {
|
|
938
933
|
const l = Rt();
|
|
939
934
|
return /* @__PURE__ */ v(hn, { id: l, className: a, isFlat: !0, children: [
|
|
940
|
-
/* @__PURE__ */ t(
|
|
935
|
+
/* @__PURE__ */ t(mn, { className: "kc-form-panel__header", children: /* @__PURE__ */ t(pn, { tabIndex: 0, children: /* @__PURE__ */ t(Kt, { id: r, title: e }) }) }),
|
|
941
936
|
/* @__PURE__ */ t(fn, { className: "kc-form-panel__body", children: n })
|
|
942
937
|
] });
|
|
943
938
|
}, Yr = (e) => {
|
|
@@ -946,10 +941,10 @@ const Gr = "_title_180i0_2", zr = {
|
|
|
946
941
|
/* @__PURE__ */ t(Kt, { id: a, title: n }),
|
|
947
942
|
r
|
|
948
943
|
] }) });
|
|
949
|
-
}, Qr = "_panel_1cdve_1", Xr = "_sticky_1cdve_5",
|
|
944
|
+
}, Qr = "_panel_1cdve_1", Xr = "_sticky_1cdve_5", mt = {
|
|
950
945
|
panel: Qr,
|
|
951
946
|
sticky: Xr
|
|
952
|
-
}, Zr = "kc-main-content-page-container",
|
|
947
|
+
}, Zr = "kc-main-content-page-container", pt = (e) => e.replace(/\s+/g, "-"), ea = ({
|
|
953
948
|
label: e,
|
|
954
949
|
sections: n,
|
|
955
950
|
borders: r = !1,
|
|
@@ -961,18 +956,18 @@ const Gr = "_title_180i0_2", zr = {
|
|
|
961
956
|
);
|
|
962
957
|
return /* @__PURE__ */ v(gn, { hasGutter: !0, ...a, children: [
|
|
963
958
|
/* @__PURE__ */ t(ot, { md: 8, sm: 12, children: l.map(({ title: i, panel: o }) => {
|
|
964
|
-
const s =
|
|
959
|
+
const s = pt(i.toLowerCase());
|
|
965
960
|
return /* @__PURE__ */ t(Dt, { children: r ? /* @__PURE__ */ t(
|
|
966
961
|
Jr,
|
|
967
962
|
{
|
|
968
963
|
scrollId: s,
|
|
969
964
|
title: i,
|
|
970
|
-
className:
|
|
965
|
+
className: mt.panel,
|
|
971
966
|
children: o
|
|
972
967
|
}
|
|
973
968
|
) : /* @__PURE__ */ t(Yr, { scrollId: s, title: i, children: o }) }, i);
|
|
974
969
|
}) }),
|
|
975
|
-
/* @__PURE__ */ t(ot, { md: 4, sm: 12, order: { default: "-1", md: "1" }, children: /* @__PURE__ */ t(yn, { className:
|
|
970
|
+
/* @__PURE__ */ t(ot, { md: 4, sm: 12, order: { default: "-1", md: "1" }, children: /* @__PURE__ */ t(yn, { className: mt.sticky, children: /* @__PURE__ */ t(
|
|
976
971
|
bn,
|
|
977
972
|
{
|
|
978
973
|
isVertical: !0,
|
|
@@ -980,7 +975,7 @@ const Gr = "_title_180i0_2", zr = {
|
|
|
980
975
|
label: e,
|
|
981
976
|
offset: 100,
|
|
982
977
|
children: l.map(({ title: i }) => {
|
|
983
|
-
const o =
|
|
978
|
+
const o = pt(i.toLowerCase());
|
|
984
979
|
return /* @__PURE__ */ t(
|
|
985
980
|
vn,
|
|
986
981
|
{
|
|
@@ -1008,7 +1003,7 @@ const Gr = "_title_180i0_2", zr = {
|
|
|
1008
1003
|
children: l,
|
|
1009
1004
|
...i
|
|
1010
1005
|
}) => /* @__PURE__ */ t(
|
|
1011
|
-
|
|
1006
|
+
N,
|
|
1012
1007
|
{
|
|
1013
1008
|
variant: "primary",
|
|
1014
1009
|
isDisabled: e && !ta(e, a, r) || n,
|
|
@@ -1036,7 +1031,7 @@ const Gr = "_title_180i0_2", zr = {
|
|
|
1036
1031
|
[r, a, e]
|
|
1037
1032
|
);
|
|
1038
1033
|
return l.length ? /* @__PURE__ */ t(hr, { ...n, children: /* @__PURE__ */ t(
|
|
1039
|
-
|
|
1034
|
+
Ur,
|
|
1040
1035
|
{
|
|
1041
1036
|
"data-testid": "locale-select",
|
|
1042
1037
|
name: "attributes.locale",
|
|
@@ -1046,7 +1041,7 @@ const Gr = "_title_180i0_2", zr = {
|
|
|
1046
1041
|
variant: l.length >= 10 ? "typeahead" : "single"
|
|
1047
1042
|
}
|
|
1048
1043
|
) }) : null;
|
|
1049
|
-
},
|
|
1044
|
+
}, pe = ({
|
|
1050
1045
|
t: e,
|
|
1051
1046
|
form: n,
|
|
1052
1047
|
attribute: r,
|
|
@@ -1058,24 +1053,24 @@ const Gr = "_title_180i0_2", zr = {
|
|
|
1058
1053
|
r.annotations?.inputHelperTextBefore
|
|
1059
1054
|
), {
|
|
1060
1055
|
formState: { errors: o }
|
|
1061
|
-
} = n, s = a?.(r),
|
|
1056
|
+
} = n, s = a?.(r), d = V(o, Q(r.name));
|
|
1062
1057
|
return /* @__PURE__ */ v(
|
|
1063
1058
|
It,
|
|
1064
1059
|
{
|
|
1065
1060
|
label: Ke(e, r) || "",
|
|
1066
1061
|
fieldId: r.name,
|
|
1067
|
-
isRequired:
|
|
1062
|
+
isRequired: De(r),
|
|
1068
1063
|
labelIcon: i ? /* @__PURE__ */ t(qt, { helpText: i, fieldLabelId: r.name }) : void 0,
|
|
1069
1064
|
children: [
|
|
1070
|
-
s ? /* @__PURE__ */ v(
|
|
1065
|
+
s ? /* @__PURE__ */ v(xe, { children: [
|
|
1071
1066
|
l,
|
|
1072
1067
|
s
|
|
1073
1068
|
] }) : l,
|
|
1074
|
-
|
|
1069
|
+
d && /* @__PURE__ */ t(
|
|
1075
1070
|
_t,
|
|
1076
1071
|
{
|
|
1077
1072
|
"data-testid": `${r.name}-helper`,
|
|
1078
|
-
message:
|
|
1073
|
+
message: d.message
|
|
1079
1074
|
}
|
|
1080
1075
|
)
|
|
1081
1076
|
]
|
|
@@ -1088,7 +1083,7 @@ const Gr = "_title_180i0_2", zr = {
|
|
|
1088
1083
|
attribute: r,
|
|
1089
1084
|
renderer: a,
|
|
1090
1085
|
...l
|
|
1091
|
-
}) => /* @__PURE__ */ t(
|
|
1086
|
+
}) => /* @__PURE__ */ t(pe, { t: e, form: n, attribute: r, renderer: a, children: /* @__PURE__ */ t(
|
|
1092
1087
|
la,
|
|
1093
1088
|
{
|
|
1094
1089
|
t: e,
|
|
@@ -1109,45 +1104,45 @@ const Gr = "_title_180i0_2", zr = {
|
|
|
1109
1104
|
isDisabled: i = !1,
|
|
1110
1105
|
defaultValue: o,
|
|
1111
1106
|
id: s,
|
|
1112
|
-
...
|
|
1107
|
+
...d
|
|
1113
1108
|
}) => {
|
|
1114
|
-
const { register:
|
|
1109
|
+
const { register: u, setValue: h, control: c } = a, y = mr({
|
|
1115
1110
|
name: n,
|
|
1116
1111
|
control: c,
|
|
1117
1112
|
defaultValue: o || ""
|
|
1118
1113
|
}), g = q(() => Array.isArray(y) && y.length !== 0 ? y : o || [""], [y]), C = (T) => {
|
|
1119
|
-
|
|
1114
|
+
m([...g.slice(0, T), ...g.slice(T + 1)]);
|
|
1120
1115
|
}, R = () => {
|
|
1121
|
-
|
|
1122
|
-
},
|
|
1123
|
-
|
|
1124
|
-
},
|
|
1116
|
+
m([...g, ""]);
|
|
1117
|
+
}, p = (T, I) => {
|
|
1118
|
+
m([...g.slice(0, T), I, ...g.slice(T + 1)]);
|
|
1119
|
+
}, m = (T) => {
|
|
1125
1120
|
const I = T.flatMap((b) => b);
|
|
1126
|
-
|
|
1121
|
+
h(n, I, {
|
|
1127
1122
|
shouldDirty: !0
|
|
1128
1123
|
});
|
|
1129
1124
|
}, S = r.startsWith("html") ? r.substring(6) : "text";
|
|
1130
1125
|
return le(() => {
|
|
1131
|
-
|
|
1132
|
-
}, [
|
|
1133
|
-
/* @__PURE__ */ v(
|
|
1134
|
-
/* @__PURE__ */ t(
|
|
1135
|
-
|
|
1126
|
+
u(n);
|
|
1127
|
+
}, [u]), /* @__PURE__ */ t("div", { id: s, children: g.map((T, I) => /* @__PURE__ */ v(Dt, { children: [
|
|
1128
|
+
/* @__PURE__ */ v(xe, { children: [
|
|
1129
|
+
/* @__PURE__ */ t(Ne, { isFill: !0, children: /* @__PURE__ */ t(
|
|
1130
|
+
Se,
|
|
1136
1131
|
{
|
|
1137
1132
|
"data-testid": n + I,
|
|
1138
|
-
onChange: (b, x) =>
|
|
1133
|
+
onChange: (b, x) => p(I, x),
|
|
1139
1134
|
name: `${n}.${I}.value`,
|
|
1140
1135
|
value: T,
|
|
1141
1136
|
isDisabled: i,
|
|
1142
1137
|
type: S,
|
|
1143
|
-
...
|
|
1138
|
+
...d
|
|
1144
1139
|
}
|
|
1145
1140
|
) }),
|
|
1146
|
-
/* @__PURE__ */ t(
|
|
1147
|
-
|
|
1141
|
+
/* @__PURE__ */ t(Ne, { children: /* @__PURE__ */ t(
|
|
1142
|
+
N,
|
|
1148
1143
|
{
|
|
1149
1144
|
"data-testid": "remove" + I,
|
|
1150
|
-
variant:
|
|
1145
|
+
variant: Ie.link,
|
|
1151
1146
|
onClick: () => C(I),
|
|
1152
1147
|
tabIndex: -1,
|
|
1153
1148
|
"aria-label": e("remove"),
|
|
@@ -1157,9 +1152,9 @@ const Gr = "_title_180i0_2", zr = {
|
|
|
1157
1152
|
) })
|
|
1158
1153
|
] }),
|
|
1159
1154
|
I === g.length - 1 && /* @__PURE__ */ v(
|
|
1160
|
-
|
|
1155
|
+
N,
|
|
1161
1156
|
{
|
|
1162
|
-
variant:
|
|
1157
|
+
variant: Ie.link,
|
|
1163
1158
|
onClick: R,
|
|
1164
1159
|
tabIndex: -1,
|
|
1165
1160
|
"aria-label": e("add"),
|
|
@@ -1174,25 +1169,25 @@ const Gr = "_title_180i0_2", zr = {
|
|
|
1174
1169
|
)
|
|
1175
1170
|
] }, I)) });
|
|
1176
1171
|
}, ft = (e) => {
|
|
1177
|
-
const { form: n, inputType: r, attribute: a } = e, l =
|
|
1178
|
-
return /* @__PURE__ */ t(
|
|
1172
|
+
const { form: n, inputType: r, attribute: a } = e, l = De(a), i = r.startsWith("multiselect"), o = i ? Cn : kn, s = a.validators?.options?.options || [], d = a.annotations?.inputOptionLabels || {}, u = a.annotations?.inputOptionLabelsI18nPrefix;
|
|
1173
|
+
return /* @__PURE__ */ t(pe, { ...e, children: /* @__PURE__ */ t(
|
|
1179
1174
|
ie,
|
|
1180
1175
|
{
|
|
1181
1176
|
name: Q(a.name),
|
|
1182
1177
|
control: n.control,
|
|
1183
1178
|
defaultValue: "",
|
|
1184
|
-
render: ({ field:
|
|
1179
|
+
render: ({ field: h }) => /* @__PURE__ */ t(j, { children: s.map((c) => /* @__PURE__ */ t(
|
|
1185
1180
|
o,
|
|
1186
1181
|
{
|
|
1187
1182
|
id: c,
|
|
1188
1183
|
"data-testid": c,
|
|
1189
|
-
label: ne(e.t,
|
|
1184
|
+
label: ne(e.t, d[c], c, u),
|
|
1190
1185
|
value: c,
|
|
1191
|
-
isChecked:
|
|
1186
|
+
isChecked: h.value.includes(c),
|
|
1192
1187
|
onChange: () => {
|
|
1193
|
-
i ?
|
|
1194
|
-
|
|
1195
|
-
) :
|
|
1188
|
+
i ? h.value.includes(c) ? h.onChange(
|
|
1189
|
+
h.value.filter((y) => y !== c)
|
|
1190
|
+
) : h.onChange([...h.value, c]) : h.onChange([c]);
|
|
1196
1191
|
},
|
|
1197
1192
|
readOnly: a.readOnly,
|
|
1198
1193
|
isRequired: l
|
|
@@ -1210,55 +1205,55 @@ const Gr = "_title_180i0_2", zr = {
|
|
|
1210
1205
|
menuAppendTo: i,
|
|
1211
1206
|
direction: o,
|
|
1212
1207
|
width: s,
|
|
1213
|
-
maxHeight:
|
|
1214
|
-
toggleIcon:
|
|
1215
|
-
className:
|
|
1208
|
+
maxHeight: d,
|
|
1209
|
+
toggleIcon: u,
|
|
1210
|
+
className: h,
|
|
1216
1211
|
isDisabled: c,
|
|
1217
1212
|
children: y,
|
|
1218
1213
|
...g
|
|
1219
1214
|
}) => {
|
|
1220
|
-
const [C, R] =
|
|
1215
|
+
const [C, R] = E(!1), p = J(), m = () => {
|
|
1221
1216
|
R(!C), n(!C);
|
|
1222
|
-
}, S = () => i === "parent" &&
|
|
1217
|
+
}, S = () => i === "parent" && p.current?.parentElement || "inline", T = Ot.toArray(
|
|
1223
1218
|
y
|
|
1224
1219
|
);
|
|
1225
1220
|
return /* @__PURE__ */ t(
|
|
1226
|
-
|
|
1221
|
+
Te,
|
|
1227
1222
|
{
|
|
1228
|
-
ref:
|
|
1229
|
-
maxMenuHeight:
|
|
1223
|
+
ref: p,
|
|
1224
|
+
maxMenuHeight: we(d),
|
|
1230
1225
|
isScrollable: !0,
|
|
1231
1226
|
popperProps: {
|
|
1232
1227
|
appendTo: S(),
|
|
1233
1228
|
direction: o,
|
|
1234
|
-
width:
|
|
1229
|
+
width: we(s)
|
|
1235
1230
|
},
|
|
1236
1231
|
...g,
|
|
1237
|
-
onClick:
|
|
1232
|
+
onClick: m,
|
|
1238
1233
|
onOpenChange: (I) => {
|
|
1239
|
-
I !== C &&
|
|
1234
|
+
I !== C && m();
|
|
1240
1235
|
},
|
|
1241
1236
|
selected: a,
|
|
1242
1237
|
onSelect: (I, b) => {
|
|
1243
|
-
r?.(b || ""),
|
|
1238
|
+
r?.(b || ""), m();
|
|
1244
1239
|
},
|
|
1245
1240
|
toggle: (I) => /* @__PURE__ */ t(
|
|
1246
|
-
|
|
1241
|
+
me,
|
|
1247
1242
|
{
|
|
1248
1243
|
id: e,
|
|
1249
1244
|
ref: I,
|
|
1250
|
-
className:
|
|
1251
|
-
onClick:
|
|
1245
|
+
className: h,
|
|
1246
|
+
onClick: m,
|
|
1252
1247
|
isExpanded: l,
|
|
1253
1248
|
"aria-label": g["aria-label"],
|
|
1254
|
-
icon:
|
|
1249
|
+
icon: u,
|
|
1255
1250
|
isDisabled: c,
|
|
1256
1251
|
isFullWidth: !0,
|
|
1257
1252
|
children: T.find((b) => b.props.value === a)?.props.children || a || g["aria-label"]
|
|
1258
1253
|
}
|
|
1259
1254
|
),
|
|
1260
1255
|
isOpen: l,
|
|
1261
|
-
children: /* @__PURE__ */ t(
|
|
1256
|
+
children: /* @__PURE__ */ t(Ee, { children: y })
|
|
1262
1257
|
}
|
|
1263
1258
|
);
|
|
1264
1259
|
}, oa = ({
|
|
@@ -1270,24 +1265,24 @@ const Gr = "_title_180i0_2", zr = {
|
|
|
1270
1265
|
validated: i,
|
|
1271
1266
|
placeholderText: o,
|
|
1272
1267
|
maxHeight: s,
|
|
1273
|
-
width:
|
|
1274
|
-
toggleIcon:
|
|
1275
|
-
direction:
|
|
1268
|
+
width: d,
|
|
1269
|
+
toggleIcon: u,
|
|
1270
|
+
direction: h,
|
|
1276
1271
|
selections: c,
|
|
1277
1272
|
typeAheadAriaLabel: y,
|
|
1278
1273
|
chipGroupComponent: g,
|
|
1279
1274
|
chipGroupProps: C,
|
|
1280
1275
|
footer: R,
|
|
1281
|
-
isDisabled:
|
|
1282
|
-
children:
|
|
1276
|
+
isDisabled: p,
|
|
1277
|
+
children: m,
|
|
1283
1278
|
...S
|
|
1284
1279
|
}) => {
|
|
1285
|
-
const [T, I] =
|
|
1286
|
-
|
|
1280
|
+
const [T, I] = E(""), [b, x] = E(0), F = J(), A = Ot.toArray(
|
|
1281
|
+
m
|
|
1287
1282
|
), B = () => {
|
|
1288
1283
|
r?.(!S.isOpen);
|
|
1289
1284
|
}, H = (M) => {
|
|
1290
|
-
const f =
|
|
1285
|
+
const f = A[b];
|
|
1291
1286
|
switch (r?.(!0), M.key) {
|
|
1292
1287
|
case "Enter": {
|
|
1293
1288
|
M.preventDefault(), l !== z.typeaheadMulti ? I(f.props.value) : I(""), n?.(f.props.value), r?.(!1), x(0);
|
|
@@ -1305,13 +1300,13 @@ const Gr = "_title_180i0_2", zr = {
|
|
|
1305
1300
|
case "ArrowDown": {
|
|
1306
1301
|
M.preventDefault();
|
|
1307
1302
|
let k = 0;
|
|
1308
|
-
M.key === "ArrowUp" && (b === 0 ? k =
|
|
1303
|
+
M.key === "ArrowUp" && (b === 0 ? k = A.length - 1 : k = b - 1), M.key === "ArrowDown" && (b === A.length - 1 ? k = 0 : k = b + 1), x(k);
|
|
1309
1304
|
break;
|
|
1310
1305
|
}
|
|
1311
1306
|
}
|
|
1312
1307
|
};
|
|
1313
1308
|
return /* @__PURE__ */ v(
|
|
1314
|
-
|
|
1309
|
+
Te,
|
|
1315
1310
|
{
|
|
1316
1311
|
...S,
|
|
1317
1312
|
onClick: B,
|
|
@@ -1319,17 +1314,17 @@ const Gr = "_title_180i0_2", zr = {
|
|
|
1319
1314
|
onSelect: (M, f) => {
|
|
1320
1315
|
n?.(f || ""), a?.(""), I("");
|
|
1321
1316
|
},
|
|
1322
|
-
maxMenuHeight:
|
|
1323
|
-
popperProps: { direction:
|
|
1317
|
+
maxMenuHeight: we(s),
|
|
1318
|
+
popperProps: { direction: h, width: we(d) },
|
|
1324
1319
|
toggle: (M) => /* @__PURE__ */ t(
|
|
1325
|
-
|
|
1320
|
+
me,
|
|
1326
1321
|
{
|
|
1327
1322
|
ref: M,
|
|
1328
1323
|
id: e,
|
|
1329
1324
|
variant: "typeahead",
|
|
1330
1325
|
onClick: () => r?.(!0),
|
|
1331
|
-
icon:
|
|
1332
|
-
isDisabled:
|
|
1326
|
+
icon: u,
|
|
1327
|
+
isDisabled: p,
|
|
1333
1328
|
isExpanded: S.isOpen,
|
|
1334
1329
|
isFullWidth: !0,
|
|
1335
1330
|
status: i === "error" ? Je.danger : void 0,
|
|
@@ -1363,7 +1358,7 @@ const Gr = "_title_180i0_2", zr = {
|
|
|
1363
1358
|
}
|
|
1364
1359
|
),
|
|
1365
1360
|
/* @__PURE__ */ t(St, { children: !!T && /* @__PURE__ */ t(
|
|
1366
|
-
|
|
1361
|
+
N,
|
|
1367
1362
|
{
|
|
1368
1363
|
variant: "plain",
|
|
1369
1364
|
onClick: () => {
|
|
@@ -1377,60 +1372,60 @@ const Gr = "_title_180i0_2", zr = {
|
|
|
1377
1372
|
}
|
|
1378
1373
|
),
|
|
1379
1374
|
children: [
|
|
1380
|
-
/* @__PURE__ */ t(
|
|
1375
|
+
/* @__PURE__ */ t(Ee, { children: m }),
|
|
1381
1376
|
R && /* @__PURE__ */ t(In, { children: R })
|
|
1382
1377
|
]
|
|
1383
1378
|
}
|
|
1384
1379
|
);
|
|
1385
1380
|
};
|
|
1386
1381
|
var z = /* @__PURE__ */ ((e) => (e.single = "single", e.typeahead = "typeahead", e.typeaheadMulti = "typeaheadMulti", e))(z || {});
|
|
1387
|
-
const
|
|
1382
|
+
const we = (e) => typeof e == "number" ? e + "px" : e, sa = ({
|
|
1388
1383
|
variant: e = "single",
|
|
1389
1384
|
...n
|
|
1390
1385
|
}) => e === "single" ? /* @__PURE__ */ t(ia, { ...n }) : /* @__PURE__ */ t(oa, { ...n, variant: e }), gt = (e) => {
|
|
1391
|
-
const { t: n, form: r, inputType: a, attribute: l } = e, [i, o] =
|
|
1392
|
-
|
|
1393
|
-
}, c = l.validators?.options?.options || [], y = l.annotations?.inputOptionLabels || {}, g = l.annotations?.inputOptionLabelsI18nPrefix, C = (
|
|
1394
|
-
(
|
|
1395
|
-
).map((
|
|
1386
|
+
const { t: n, form: r, inputType: a, attribute: l } = e, [i, o] = E(!1), [s, d] = E(""), u = a === "multiselect", h = (p, m) => {
|
|
1387
|
+
u ? m.value.includes(p) ? m.onChange(m.value.filter((S) => S !== p)) : Array.isArray(m.value) ? m.onChange([...m.value, p]) : m.onChange([p]) : m.onChange(p === m.value ? "" : p);
|
|
1388
|
+
}, c = l.validators?.options?.options || [], y = l.annotations?.inputOptionLabels || {}, g = l.annotations?.inputOptionLabelsI18nPrefix, C = (p) => ne(e.t, y[p], p, g), R = (p) => c.filter(
|
|
1389
|
+
(m) => C(m).toLowerCase().includes(s.toLowerCase())
|
|
1390
|
+
).map((m) => /* @__PURE__ */ t(
|
|
1396
1391
|
ze,
|
|
1397
1392
|
{
|
|
1398
|
-
selected:
|
|
1399
|
-
value:
|
|
1400
|
-
children: C(
|
|
1393
|
+
selected: p === m,
|
|
1394
|
+
value: m,
|
|
1395
|
+
children: C(m)
|
|
1401
1396
|
},
|
|
1402
|
-
|
|
1397
|
+
m
|
|
1403
1398
|
));
|
|
1404
|
-
return /* @__PURE__ */ t(
|
|
1399
|
+
return /* @__PURE__ */ t(pe, { ...e, children: /* @__PURE__ */ t(
|
|
1405
1400
|
ie,
|
|
1406
1401
|
{
|
|
1407
1402
|
name: Q(l.name),
|
|
1408
1403
|
defaultValue: "",
|
|
1409
1404
|
control: r.control,
|
|
1410
|
-
render: ({ field:
|
|
1405
|
+
render: ({ field: p }) => /* @__PURE__ */ t(
|
|
1411
1406
|
sa,
|
|
1412
1407
|
{
|
|
1413
1408
|
toggleId: l.name,
|
|
1414
|
-
onToggle: (
|
|
1415
|
-
onClear: () =>
|
|
1416
|
-
onSelect: (
|
|
1417
|
-
const S =
|
|
1418
|
-
|
|
1409
|
+
onToggle: (m) => o(m),
|
|
1410
|
+
onClear: () => h("", p),
|
|
1411
|
+
onSelect: (m) => {
|
|
1412
|
+
const S = m.toString();
|
|
1413
|
+
h(S, p), Array.isArray(p.value) || o(!1);
|
|
1419
1414
|
},
|
|
1420
|
-
selections:
|
|
1421
|
-
variant:
|
|
1415
|
+
selections: u && Array.isArray(p.value) ? p.value.map((m) => C(m)) : C(p.value),
|
|
1416
|
+
variant: u ? z.typeaheadMulti : c.length >= 10 ? z.typeahead : z.single,
|
|
1422
1417
|
"aria-label": n("selectOne"),
|
|
1423
1418
|
isOpen: i,
|
|
1424
1419
|
isDisabled: l.readOnly,
|
|
1425
|
-
onFilter: (
|
|
1426
|
-
children: R(
|
|
1420
|
+
onFilter: (m) => (d(m), R(p.value)),
|
|
1421
|
+
children: R(p.value)
|
|
1427
1422
|
}
|
|
1428
1423
|
)
|
|
1429
1424
|
}
|
|
1430
1425
|
) });
|
|
1431
1426
|
}, ca = (e) => {
|
|
1432
|
-
const { form: n, attribute: r } = e, a =
|
|
1433
|
-
return /* @__PURE__ */ t(
|
|
1427
|
+
const { form: n, attribute: r } = e, a = De(r);
|
|
1428
|
+
return /* @__PURE__ */ t(pe, { ...e, children: /* @__PURE__ */ t(
|
|
1434
1429
|
Wr,
|
|
1435
1430
|
{
|
|
1436
1431
|
id: r.name,
|
|
@@ -1442,10 +1437,10 @@ const Ie = (e) => typeof e == "number" ? e + "px" : e, sa = ({
|
|
|
1442
1437
|
isRequired: a
|
|
1443
1438
|
}
|
|
1444
1439
|
) });
|
|
1445
|
-
},
|
|
1446
|
-
const { form: n, inputType: r, attribute: a } = e, l =
|
|
1447
|
-
return /* @__PURE__ */ t(
|
|
1448
|
-
|
|
1440
|
+
}, U = (e) => {
|
|
1441
|
+
const { form: n, inputType: r, attribute: a } = e, l = De(a), i = r.startsWith("html") ? r.substring(6) : "text";
|
|
1442
|
+
return /* @__PURE__ */ t(pe, { ...e, children: /* @__PURE__ */ t(
|
|
1443
|
+
Se,
|
|
1449
1444
|
{
|
|
1450
1445
|
id: a.name,
|
|
1451
1446
|
"data-testid": a.name,
|
|
@@ -1462,21 +1457,21 @@ const Ie = (e) => typeof e == "number" ? e + "px" : e, sa = ({
|
|
|
1462
1457
|
}
|
|
1463
1458
|
) });
|
|
1464
1459
|
}, He = {
|
|
1465
|
-
text:
|
|
1460
|
+
text: U,
|
|
1466
1461
|
textarea: ca,
|
|
1467
1462
|
select: gt,
|
|
1468
1463
|
"select-radiobuttons": ft,
|
|
1469
1464
|
multiselect: gt,
|
|
1470
1465
|
"multiselect-checkboxes": ft,
|
|
1471
|
-
"html5-email":
|
|
1472
|
-
"html5-tel":
|
|
1473
|
-
"html5-url":
|
|
1474
|
-
"html5-number":
|
|
1475
|
-
"html5-range":
|
|
1476
|
-
"html5-datetime-local":
|
|
1477
|
-
"html5-date":
|
|
1478
|
-
"html5-month":
|
|
1479
|
-
"html5-time":
|
|
1466
|
+
"html5-email": U,
|
|
1467
|
+
"html5-tel": U,
|
|
1468
|
+
"html5-url": U,
|
|
1469
|
+
"html5-number": U,
|
|
1470
|
+
"html5-range": U,
|
|
1471
|
+
"html5-datetime-local": U,
|
|
1472
|
+
"html5-date": U,
|
|
1473
|
+
"html5-month": U,
|
|
1474
|
+
"html5-time": U,
|
|
1480
1475
|
"multi-input": aa
|
|
1481
1476
|
}, tl = ({
|
|
1482
1477
|
t: e,
|
|
@@ -1490,15 +1485,15 @@ const Ie = (e) => typeof e == "number" ? e + "px" : e, sa = ({
|
|
|
1490
1485
|
const s = q(() => {
|
|
1491
1486
|
if (!r.attributes)
|
|
1492
1487
|
return [];
|
|
1493
|
-
const
|
|
1488
|
+
const d = i ? r.attributes.filter(({ readOnly: u }) => !u) : r.attributes;
|
|
1494
1489
|
return [
|
|
1495
1490
|
// Insert an empty group for attributes without a group.
|
|
1496
1491
|
{ name: void 0 },
|
|
1497
1492
|
...r.groups ?? []
|
|
1498
|
-
].map((
|
|
1499
|
-
group:
|
|
1500
|
-
attributes:
|
|
1501
|
-
(
|
|
1493
|
+
].map((u) => ({
|
|
1494
|
+
group: u,
|
|
1495
|
+
attributes: d.filter(
|
|
1496
|
+
(h) => h.group === u.name
|
|
1502
1497
|
)
|
|
1503
1498
|
}));
|
|
1504
1499
|
}, [
|
|
@@ -1510,11 +1505,11 @@ const Ie = (e) => typeof e == "number" ? e + "px" : e, sa = ({
|
|
|
1510
1505
|
ea,
|
|
1511
1506
|
{
|
|
1512
1507
|
label: e("jumpToSection"),
|
|
1513
|
-
sections: s.filter((
|
|
1514
|
-
title: ne(e,
|
|
1508
|
+
sections: s.filter((d) => d.attributes.length > 0).map(({ group: d, attributes: u }) => ({
|
|
1509
|
+
title: ne(e, d.displayHeader, d.name) || e("general"),
|
|
1515
1510
|
panel: /* @__PURE__ */ v("div", { className: "pf-v5-c-form", children: [
|
|
1516
|
-
|
|
1517
|
-
|
|
1511
|
+
d.displayDescription && /* @__PURE__ */ t(Ce, { className: "pf-v5-u-pb-lg", children: ne(e, d.displayDescription, "") }),
|
|
1512
|
+
u.map((h) => /* @__PURE__ */ t(
|
|
1518
1513
|
da,
|
|
1519
1514
|
{
|
|
1520
1515
|
t: e,
|
|
@@ -1522,9 +1517,9 @@ const Ie = (e) => typeof e == "number" ? e + "px" : e, sa = ({
|
|
|
1522
1517
|
supportedLocales: a,
|
|
1523
1518
|
currentLocale: l,
|
|
1524
1519
|
renderer: o,
|
|
1525
|
-
attribute:
|
|
1520
|
+
attribute: h
|
|
1526
1521
|
},
|
|
1527
|
-
|
|
1522
|
+
h.name
|
|
1528
1523
|
))
|
|
1529
1524
|
] })
|
|
1530
1525
|
}))
|
|
@@ -1540,7 +1535,7 @@ const Ie = (e) => typeof e == "number" ? e + "px" : e, sa = ({
|
|
|
1540
1535
|
}) => {
|
|
1541
1536
|
const o = n.watch(
|
|
1542
1537
|
Q(i.name)
|
|
1543
|
-
), s = q(() => ha(i), [i]),
|
|
1538
|
+
), s = q(() => ha(i), [i]), d = i.multivalued || pa(o) && i.annotations?.inputType === void 0 ? He["multi-input"] : He[s];
|
|
1544
1539
|
return i.name === "locale" ? /* @__PURE__ */ t(
|
|
1545
1540
|
ra,
|
|
1546
1541
|
{
|
|
@@ -1551,7 +1546,7 @@ const Ie = (e) => typeof e == "number" ? e + "px" : e, sa = ({
|
|
|
1551
1546
|
attribute: i
|
|
1552
1547
|
}
|
|
1553
1548
|
) : /* @__PURE__ */ t(
|
|
1554
|
-
|
|
1549
|
+
d,
|
|
1555
1550
|
{
|
|
1556
1551
|
t: e,
|
|
1557
1552
|
form: n,
|
|
@@ -1562,12 +1557,12 @@ const Ie = (e) => typeof e == "number" ? e + "px" : e, sa = ({
|
|
|
1562
1557
|
);
|
|
1563
1558
|
}, ua = "text";
|
|
1564
1559
|
function ha(e) {
|
|
1565
|
-
if (
|
|
1560
|
+
if (Ut(e.name))
|
|
1566
1561
|
return "text";
|
|
1567
1562
|
const n = e.annotations?.inputType;
|
|
1568
|
-
return
|
|
1563
|
+
return ma(n) ? n : ua;
|
|
1569
1564
|
}
|
|
1570
|
-
const
|
|
1565
|
+
const ma = (e) => typeof e == "string" && e in He, pa = (e) => Array.isArray(e) && e.length > 1, fa = ({
|
|
1571
1566
|
className: e = "",
|
|
1572
1567
|
border: n,
|
|
1573
1568
|
size: r = "md"
|
|
@@ -1693,7 +1688,7 @@ const pa = (e) => typeof e == "string" && e in He, ma = (e) => Array.isArray(e)
|
|
|
1693
1688
|
dropDownItems: r,
|
|
1694
1689
|
...a
|
|
1695
1690
|
}) => {
|
|
1696
|
-
const [l, i] =
|
|
1691
|
+
const [l, i] = E(!1);
|
|
1697
1692
|
return /* @__PURE__ */ t(
|
|
1698
1693
|
wn,
|
|
1699
1694
|
{
|
|
@@ -1703,7 +1698,7 @@ const pa = (e) => typeof e == "string" && e in He, ma = (e) => Array.isArray(e)
|
|
|
1703
1698
|
},
|
|
1704
1699
|
onOpenChange: (o) => i(o),
|
|
1705
1700
|
toggle: (o) => /* @__PURE__ */ t(
|
|
1706
|
-
|
|
1701
|
+
me,
|
|
1707
1702
|
{
|
|
1708
1703
|
"data-testid": `${a["data-testid"]}-toggle`,
|
|
1709
1704
|
ref: o,
|
|
@@ -1731,10 +1726,10 @@ const nl = ({
|
|
|
1731
1726
|
features: {
|
|
1732
1727
|
hasLogout: o = !0,
|
|
1733
1728
|
hasManageAccount: s = !0,
|
|
1734
|
-
hasUsername:
|
|
1729
|
+
hasUsername: d = !0
|
|
1735
1730
|
} = {},
|
|
1736
|
-
kebabDropdownItems:
|
|
1737
|
-
dropdownItems:
|
|
1731
|
+
kebabDropdownItems: u,
|
|
1732
|
+
dropdownItems: h = [],
|
|
1738
1733
|
toolbarItems: c,
|
|
1739
1734
|
toolbar: y,
|
|
1740
1735
|
...g
|
|
@@ -1752,14 +1747,14 @@ const nl = ({
|
|
|
1752
1747
|
), o && R.push(
|
|
1753
1748
|
/* @__PURE__ */ t(st, { onClick: () => e.logout(), children: C("signOut") }, "signOut")
|
|
1754
1749
|
);
|
|
1755
|
-
const
|
|
1750
|
+
const p = e.idTokenParsed?.picture;
|
|
1756
1751
|
return /* @__PURE__ */ v(Sn, { ...g, children: [
|
|
1757
|
-
/* @__PURE__ */ t(Tn, { children: /* @__PURE__ */ t(
|
|
1758
|
-
/* @__PURE__ */ t(
|
|
1752
|
+
/* @__PURE__ */ t(Tn, { children: /* @__PURE__ */ t(En, { variant: "plain", "aria-label": C("navigation"), children: /* @__PURE__ */ t(cr, {}) }) }),
|
|
1753
|
+
/* @__PURE__ */ t(An, { ...l, children: /* @__PURE__ */ t("img", { src: n, alt: r, className: a }) }),
|
|
1759
1754
|
/* @__PURE__ */ v(Rn, { children: [
|
|
1760
1755
|
y,
|
|
1761
|
-
/* @__PURE__ */ t(
|
|
1762
|
-
c?.map((
|
|
1756
|
+
/* @__PURE__ */ t(ke, { children: /* @__PURE__ */ v(_e, { children: [
|
|
1757
|
+
c?.map((m, S) => /* @__PURE__ */ t(W, { align: { default: "alignRight" }, children: m }, S)),
|
|
1763
1758
|
/* @__PURE__ */ t(
|
|
1764
1759
|
W,
|
|
1765
1760
|
{
|
|
@@ -1771,8 +1766,8 @@ const nl = ({
|
|
|
1771
1766
|
yt,
|
|
1772
1767
|
{
|
|
1773
1768
|
"data-testid": "options",
|
|
1774
|
-
dropDownItems: [...
|
|
1775
|
-
title:
|
|
1769
|
+
dropDownItems: [...h, R],
|
|
1770
|
+
title: d ? ga(e.idTokenParsed, C) : void 0
|
|
1776
1771
|
}
|
|
1777
1772
|
)
|
|
1778
1773
|
}
|
|
@@ -1790,7 +1785,7 @@ const nl = ({
|
|
|
1790
1785
|
"data-testid": "options-kebab",
|
|
1791
1786
|
isKebab: !0,
|
|
1792
1787
|
dropDownItems: [
|
|
1793
|
-
...
|
|
1788
|
+
...u || h,
|
|
1794
1789
|
R
|
|
1795
1790
|
]
|
|
1796
1791
|
}
|
|
@@ -1803,14 +1798,14 @@ const nl = ({
|
|
|
1803
1798
|
variant: "overflow-menu",
|
|
1804
1799
|
align: { default: "alignRight" },
|
|
1805
1800
|
className: "pf-v5-u-m-0-on-lg",
|
|
1806
|
-
children:
|
|
1801
|
+
children: p || i?.src ? /* @__PURE__ */ t(Dn, { src: p, alt: C("avatar"), ...i }) : /* @__PURE__ */ t(fa, { ...i })
|
|
1807
1802
|
}
|
|
1808
1803
|
)
|
|
1809
1804
|
] }) })
|
|
1810
1805
|
] })
|
|
1811
1806
|
] });
|
|
1812
1807
|
}, Ht = Xe("ErrorBoundaryContext", void 0), Wt = () => Ze(Ht);
|
|
1813
|
-
class rl extends
|
|
1808
|
+
class rl extends Un {
|
|
1814
1809
|
state = {};
|
|
1815
1810
|
static getDerivedStateFromError = (n) => ({ error: n });
|
|
1816
1811
|
showBoundary = (n) => {
|
|
@@ -1853,34 +1848,34 @@ const ba = () => {
|
|
|
1853
1848
|
primaryActionText: i,
|
|
1854
1849
|
secondaryActions: o,
|
|
1855
1850
|
icon: s,
|
|
1856
|
-
isDisabled:
|
|
1857
|
-
children:
|
|
1851
|
+
isDisabled: d = !1,
|
|
1852
|
+
children: u
|
|
1858
1853
|
}) => /* @__PURE__ */ v(Fn, { "data-testid": "empty-state", variant: "lg", children: [
|
|
1859
1854
|
a && l ? /* @__PURE__ */ t(ct, { icon: dr }) : a && /* @__PURE__ */ t(ct, { icon: s || Mt }),
|
|
1860
1855
|
/* @__PURE__ */ t(Pn, { titleText: e, headingLevel: "h1" }),
|
|
1861
1856
|
/* @__PURE__ */ t(Mn, { children: n }),
|
|
1862
1857
|
/* @__PURE__ */ v(Ln, { children: [
|
|
1863
1858
|
i && /* @__PURE__ */ t(
|
|
1864
|
-
|
|
1859
|
+
N,
|
|
1865
1860
|
{
|
|
1866
1861
|
"data-testid": `${e.replace(/\W+/g, "-").toLowerCase()}-empty-action`,
|
|
1867
1862
|
variant: "primary",
|
|
1868
1863
|
onClick: r,
|
|
1869
|
-
isDisabled:
|
|
1864
|
+
isDisabled: d,
|
|
1870
1865
|
children: i
|
|
1871
1866
|
}
|
|
1872
1867
|
),
|
|
1873
|
-
|
|
1874
|
-
o && /* @__PURE__ */ t(Bn, { children: o.map((
|
|
1875
|
-
|
|
1868
|
+
u,
|
|
1869
|
+
o && /* @__PURE__ */ t(Bn, { children: o.map((h) => /* @__PURE__ */ t(
|
|
1870
|
+
N,
|
|
1876
1871
|
{
|
|
1877
|
-
"data-testid": `${
|
|
1878
|
-
variant:
|
|
1879
|
-
onClick:
|
|
1880
|
-
isDisabled:
|
|
1881
|
-
children:
|
|
1872
|
+
"data-testid": `${h.text.replace(/\W+/g, "-").toLowerCase()}-empty-action`,
|
|
1873
|
+
variant: h.type || Ie.secondary,
|
|
1874
|
+
onClick: h.onClick,
|
|
1875
|
+
isDisabled: d,
|
|
1876
|
+
children: h.text
|
|
1882
1877
|
},
|
|
1883
|
-
|
|
1878
|
+
h.text
|
|
1884
1879
|
)) })
|
|
1885
1880
|
] })
|
|
1886
1881
|
] }), Ca = ({
|
|
@@ -1893,26 +1888,26 @@ const ba = () => {
|
|
|
1893
1888
|
inputGroupPlaceholder: o,
|
|
1894
1889
|
inputGroupOnEnter: s
|
|
1895
1890
|
}) => {
|
|
1896
|
-
const { t:
|
|
1897
|
-
|
|
1891
|
+
const { t: d } = _(), [u, h] = E(""), c = (g) => {
|
|
1892
|
+
h(g.trim()), s?.(g.trim());
|
|
1898
1893
|
}, y = (g) => {
|
|
1899
|
-
g.key === "Enter" && c(
|
|
1894
|
+
g.key === "Enter" && c(u);
|
|
1900
1895
|
};
|
|
1901
1896
|
return /* @__PURE__ */ v(j, { children: [
|
|
1902
|
-
/* @__PURE__ */ t(
|
|
1903
|
-
i && /* @__PURE__ */ t(W, { children: /* @__PURE__ */ v(
|
|
1897
|
+
/* @__PURE__ */ t(ke, { "data-testid": "table-toolbar", children: /* @__PURE__ */ v(_e, { children: [
|
|
1898
|
+
i && /* @__PURE__ */ t(W, { children: /* @__PURE__ */ v(xe, { "data-testid": i, children: [
|
|
1904
1899
|
l,
|
|
1905
1900
|
o && /* @__PURE__ */ t(
|
|
1906
|
-
|
|
1901
|
+
Vn,
|
|
1907
1902
|
{
|
|
1908
1903
|
"data-testid": "table-search-input",
|
|
1909
1904
|
placeholder: o,
|
|
1910
|
-
"aria-label":
|
|
1911
|
-
value:
|
|
1905
|
+
"aria-label": d("search"),
|
|
1906
|
+
value: u,
|
|
1912
1907
|
onChange: (g, C) => {
|
|
1913
|
-
|
|
1908
|
+
h(C);
|
|
1914
1909
|
},
|
|
1915
|
-
onSearch: () => c(
|
|
1910
|
+
onSearch: () => c(u),
|
|
1916
1911
|
onKeyDown: y,
|
|
1917
1912
|
onClear: () => c("")
|
|
1918
1913
|
}
|
|
@@ -1920,10 +1915,10 @@ const ba = () => {
|
|
|
1920
1915
|
] }) }),
|
|
1921
1916
|
e
|
|
1922
1917
|
] }) }),
|
|
1923
|
-
n && /* @__PURE__ */ t(
|
|
1924
|
-
/* @__PURE__ */ t(
|
|
1918
|
+
n && /* @__PURE__ */ t(ke, { children: /* @__PURE__ */ t(_e, { children: n }) }),
|
|
1919
|
+
/* @__PURE__ */ t(Nn, {}),
|
|
1925
1920
|
a,
|
|
1926
|
-
/* @__PURE__ */ t(
|
|
1921
|
+
/* @__PURE__ */ t(ke, { children: r })
|
|
1927
1922
|
] });
|
|
1928
1923
|
}, bt = ({
|
|
1929
1924
|
id: e,
|
|
@@ -1935,29 +1930,29 @@ const ba = () => {
|
|
|
1935
1930
|
onPreviousClick: o,
|
|
1936
1931
|
onPerPageSelect: s
|
|
1937
1932
|
}) => {
|
|
1938
|
-
const { t:
|
|
1933
|
+
const { t: d } = _(), u = Math.round(a / l);
|
|
1939
1934
|
return /* @__PURE__ */ t(
|
|
1940
1935
|
_n,
|
|
1941
1936
|
{
|
|
1942
1937
|
widgetId: e,
|
|
1943
1938
|
titles: {
|
|
1944
|
-
paginationAriaLabel: `${
|
|
1939
|
+
paginationAriaLabel: `${d("pagination")} ${n} `
|
|
1945
1940
|
},
|
|
1946
1941
|
isCompact: !0,
|
|
1947
1942
|
toggleTemplate: ({
|
|
1948
|
-
firstIndex:
|
|
1943
|
+
firstIndex: h,
|
|
1949
1944
|
lastIndex: c
|
|
1950
1945
|
}) => /* @__PURE__ */ v("b", { children: [
|
|
1951
|
-
|
|
1946
|
+
h,
|
|
1952
1947
|
" - ",
|
|
1953
1948
|
c
|
|
1954
1949
|
] }),
|
|
1955
|
-
itemCount: r +
|
|
1956
|
-
page:
|
|
1950
|
+
itemCount: r + u * l,
|
|
1951
|
+
page: u + 1,
|
|
1957
1952
|
perPage: l,
|
|
1958
|
-
onNextClick: (
|
|
1959
|
-
onPreviousClick: (
|
|
1960
|
-
onPerPageSelect: (
|
|
1953
|
+
onNextClick: (h, c) => i((c - 1) * l),
|
|
1954
|
+
onPreviousClick: (h, c) => o((c - 1) * l),
|
|
1955
|
+
onPerPageSelect: (h, c, y) => s(y - 1, c),
|
|
1961
1956
|
variant: n
|
|
1962
1957
|
}
|
|
1963
1958
|
);
|
|
@@ -1970,17 +1965,17 @@ const ba = () => {
|
|
|
1970
1965
|
inputGroupName: i,
|
|
1971
1966
|
inputGroupPlaceholder: o,
|
|
1972
1967
|
inputGroupOnEnter: s,
|
|
1973
|
-
...
|
|
1968
|
+
...d
|
|
1974
1969
|
}) => /* @__PURE__ */ t(
|
|
1975
1970
|
Ca,
|
|
1976
1971
|
{
|
|
1977
1972
|
searchTypeComponent: n,
|
|
1978
1973
|
toolbarItem: /* @__PURE__ */ v(j, { children: [
|
|
1979
1974
|
r,
|
|
1980
|
-
/* @__PURE__ */ t(W, { variant: "pagination", children: /* @__PURE__ */ t(bt, { count: e, ...
|
|
1975
|
+
/* @__PURE__ */ t(W, { variant: "pagination", children: /* @__PURE__ */ t(bt, { count: e, ...d }) })
|
|
1981
1976
|
] }),
|
|
1982
1977
|
subToolbar: a,
|
|
1983
|
-
toolbarItemFooter: e !== 0 ? /* @__PURE__ */ t(W, { variant: "pagination", children: /* @__PURE__ */ t(bt, { count: e, variant: "bottom", ...
|
|
1978
|
+
toolbarItemFooter: e !== 0 ? /* @__PURE__ */ t(W, { variant: "pagination", children: /* @__PURE__ */ t(bt, { count: e, variant: "bottom", ...d }) }) : null,
|
|
1984
1979
|
inputGroupName: i,
|
|
1985
1980
|
inputGroupPlaceholder: o,
|
|
1986
1981
|
inputGroupOnEnter: s,
|
|
@@ -2007,13 +2002,13 @@ function wa({
|
|
|
2007
2002
|
selected: i,
|
|
2008
2003
|
onSelect: o,
|
|
2009
2004
|
onCollapse: s,
|
|
2010
|
-
canSelectAll:
|
|
2011
|
-
canSelect:
|
|
2012
|
-
isNotCompact:
|
|
2005
|
+
canSelectAll: d,
|
|
2006
|
+
canSelect: u,
|
|
2007
|
+
isNotCompact: h,
|
|
2013
2008
|
isRadio: c,
|
|
2014
2009
|
...y
|
|
2015
2010
|
}) {
|
|
2016
|
-
const { t: g } = _(), [C, R] =
|
|
2011
|
+
const { t: g } = _(), [C, R] = E(i || []), [p, m] = E([]), S = q(
|
|
2017
2012
|
() => fr(
|
|
2018
2013
|
C,
|
|
2019
2014
|
n.map((b) => b.data),
|
|
@@ -2022,14 +2017,14 @@ function wa({
|
|
|
2022
2017
|
[C, n]
|
|
2023
2018
|
);
|
|
2024
2019
|
le(() => {
|
|
2025
|
-
if (
|
|
2020
|
+
if (d) {
|
|
2026
2021
|
const b = document.getElementsByName("check-all").item(0);
|
|
2027
2022
|
if (b) {
|
|
2028
2023
|
const x = b;
|
|
2029
2024
|
x.indeterminate = S.length < n.length && S.length > 0;
|
|
2030
2025
|
}
|
|
2031
2026
|
}
|
|
2032
|
-
}, [C,
|
|
2027
|
+
}, [C, d, n]);
|
|
2033
2028
|
const T = (b) => {
|
|
2034
2029
|
R(b), o?.(b);
|
|
2035
2030
|
}, I = (b, x) => {
|
|
@@ -2038,29 +2033,29 @@ function wa({
|
|
|
2038
2033
|
T(F);
|
|
2039
2034
|
} else if (b === -1) {
|
|
2040
2035
|
const F = S.map(
|
|
2041
|
-
(
|
|
2036
|
+
(A) => V(A, "id")
|
|
2042
2037
|
);
|
|
2043
2038
|
T(
|
|
2044
|
-
x ? [...C, ...n.map((
|
|
2045
|
-
(
|
|
2039
|
+
x ? [...C, ...n.map((A) => A.data)] : C.filter(
|
|
2040
|
+
(A) => !F.includes(V(A, "id"))
|
|
2046
2041
|
)
|
|
2047
2042
|
);
|
|
2048
2043
|
} else
|
|
2049
2044
|
T(x ? [...C, n[b].data] : C.filter(
|
|
2050
|
-
(F) =>
|
|
2045
|
+
(F) => V(F, "id") !== n[b].data.id
|
|
2051
2046
|
));
|
|
2052
2047
|
};
|
|
2053
2048
|
return /* @__PURE__ */ v(
|
|
2054
2049
|
yr,
|
|
2055
2050
|
{
|
|
2056
2051
|
...y,
|
|
2057
|
-
variant:
|
|
2052
|
+
variant: h ? void 0 : br.compact,
|
|
2058
2053
|
"aria-label": g(l),
|
|
2059
2054
|
children: [
|
|
2060
2055
|
/* @__PURE__ */ t(vr, { children: /* @__PURE__ */ v(ve, { children: [
|
|
2061
|
-
s && /* @__PURE__ */ t(
|
|
2062
|
-
|
|
2063
|
-
|
|
2056
|
+
s && /* @__PURE__ */ t(Me, { screenReaderText: g("expandRow") }),
|
|
2057
|
+
d && /* @__PURE__ */ t(
|
|
2058
|
+
Me,
|
|
2064
2059
|
{
|
|
2065
2060
|
screenReaderText: g("selectAll"),
|
|
2066
2061
|
select: c ? void 0 : {
|
|
@@ -2072,7 +2067,7 @@ function wa({
|
|
|
2072
2067
|
}
|
|
2073
2068
|
),
|
|
2074
2069
|
e.map((b) => /* @__PURE__ */ t(
|
|
2075
|
-
|
|
2070
|
+
Me,
|
|
2076
2071
|
{
|
|
2077
2072
|
screenReaderText: g("expandRow"),
|
|
2078
2073
|
className: b.transforms?.[0]().className,
|
|
@@ -2086,13 +2081,13 @@ function wa({
|
|
|
2086
2081
|
re,
|
|
2087
2082
|
{
|
|
2088
2083
|
expand: n[x + 1].cells.length === 0 ? void 0 : {
|
|
2089
|
-
isExpanded: !!
|
|
2084
|
+
isExpanded: !!p[x],
|
|
2090
2085
|
rowIndex: x,
|
|
2091
2086
|
expandId: "expandable-row-",
|
|
2092
|
-
onToggle: (F,
|
|
2093
|
-
s(B,
|
|
2094
|
-
const H = [...
|
|
2095
|
-
H[x] = B,
|
|
2087
|
+
onToggle: (F, A, B) => {
|
|
2088
|
+
s(B, A);
|
|
2089
|
+
const H = [...p];
|
|
2090
|
+
H[x] = B, m(H);
|
|
2096
2091
|
}
|
|
2097
2092
|
}
|
|
2098
2093
|
}
|
|
@@ -2106,20 +2101,20 @@ function wa({
|
|
|
2106
2101
|
actionResolver: a
|
|
2107
2102
|
}
|
|
2108
2103
|
)
|
|
2109
|
-
] }) : /* @__PURE__ */ v(ve, { isExpanded: !!
|
|
2104
|
+
] }) : /* @__PURE__ */ v(ve, { isExpanded: !!p[x - 1], children: [
|
|
2110
2105
|
/* @__PURE__ */ t(re, {}),
|
|
2111
2106
|
/* @__PURE__ */ t(re, { colSpan: e.length, children: /* @__PURE__ */ t(Cr, { children: /* @__PURE__ */ t(Ia, { row: b }) }) })
|
|
2112
|
-
] }) }, x)) : /* @__PURE__ */ t(ut, { children: n.map((b, x) => /* @__PURE__ */ v(ve, { isExpanded:
|
|
2113
|
-
|
|
2107
|
+
] }) }, x)) : /* @__PURE__ */ t(ut, { children: n.map((b, x) => /* @__PURE__ */ v(ve, { isExpanded: p[x], children: [
|
|
2108
|
+
u && /* @__PURE__ */ t(
|
|
2114
2109
|
re,
|
|
2115
2110
|
{
|
|
2116
2111
|
select: {
|
|
2117
2112
|
rowIndex: x,
|
|
2118
|
-
onSelect: (F,
|
|
2119
|
-
I(B,
|
|
2113
|
+
onSelect: (F, A, B) => {
|
|
2114
|
+
I(B, A);
|
|
2120
2115
|
},
|
|
2121
2116
|
isSelected: !!C.find(
|
|
2122
|
-
(F) =>
|
|
2117
|
+
(F) => V(F, "id") === b.data.id
|
|
2123
2118
|
),
|
|
2124
2119
|
variant: c ? "radio" : "checkbox",
|
|
2125
2120
|
isDisabled: b.disableSelection
|
|
@@ -2149,44 +2144,44 @@ function xa({
|
|
|
2149
2144
|
isNotCompact: i,
|
|
2150
2145
|
isRadio: o,
|
|
2151
2146
|
detailColumns: s,
|
|
2152
|
-
isRowDisabled:
|
|
2153
|
-
loader:
|
|
2154
|
-
columns:
|
|
2147
|
+
isRowDisabled: d,
|
|
2148
|
+
loader: u,
|
|
2149
|
+
columns: h,
|
|
2155
2150
|
actions: c,
|
|
2156
2151
|
actionResolver: y,
|
|
2157
2152
|
searchTypeComponent: g,
|
|
2158
2153
|
toolbarItem: C,
|
|
2159
2154
|
subToolbar: R,
|
|
2160
|
-
emptyState:
|
|
2161
|
-
icon:
|
|
2155
|
+
emptyState: p,
|
|
2156
|
+
icon: m,
|
|
2162
2157
|
isSearching: S = !1,
|
|
2163
2158
|
...T
|
|
2164
2159
|
}) {
|
|
2165
|
-
const { t: I } = _(), [b, x] =
|
|
2160
|
+
const { t: I } = _(), [b, x] = E([]), [F, A] = E(), [B, H] = E(), [M, f] = E(!1), [k, D] = Vt(
|
|
2166
2161
|
localStorage,
|
|
2167
2162
|
"pageSize",
|
|
2168
2163
|
10
|
|
2169
|
-
), [O, se] =
|
|
2164
|
+
), [O, se] = E(k), [$, ce] = E(0), [G, Oe] = E(""), tt = J(), [fe, Gt] = E(0), nt = J(), rt = () => Gt(fe + 1), zt = Rt(), at = (w, P) => w.map((L) => {
|
|
2170
2165
|
if ("cellFormatters" in L) {
|
|
2171
|
-
const Z =
|
|
2166
|
+
const Z = V(P, L.name);
|
|
2172
2167
|
return L.cellFormatters?.reduce((de, ye) => ye(de), Z);
|
|
2173
2168
|
}
|
|
2174
2169
|
if (L.cellRenderer) {
|
|
2175
2170
|
const Z = L.cellRenderer;
|
|
2176
2171
|
return { title: /* @__PURE__ */ t(Z, { ...P }) };
|
|
2177
2172
|
}
|
|
2178
|
-
return
|
|
2173
|
+
return V(P, L.name);
|
|
2179
2174
|
}), lt = (w) => {
|
|
2180
2175
|
const P = (L) => s?.[0]?.enabled?.(L);
|
|
2181
2176
|
return w.map((L, Z) => {
|
|
2182
|
-
const de =
|
|
2177
|
+
const de = d ? d(L) : !1, ye = [
|
|
2183
2178
|
{
|
|
2184
2179
|
data: L,
|
|
2185
2180
|
disableSelection: de,
|
|
2186
2181
|
disableActions: de,
|
|
2187
|
-
selected: !!b.find((Zt) =>
|
|
2182
|
+
selected: !!b.find((Zt) => V(Zt, "id") === V(L, "id")),
|
|
2188
2183
|
isOpen: P(L) ? !1 : void 0,
|
|
2189
|
-
cells: at(
|
|
2184
|
+
cells: at(h, L)
|
|
2190
2185
|
}
|
|
2191
2186
|
];
|
|
2192
2187
|
return s && ye.push({
|
|
@@ -2194,49 +2189,49 @@ function xa({
|
|
|
2194
2189
|
cells: P(L) ? at(s, L) : []
|
|
2195
2190
|
}), ye;
|
|
2196
2191
|
}).flat();
|
|
2197
|
-
},
|
|
2192
|
+
}, Fe = (w) => ["string", "number"].includes(typeof w) ? w.toString() : w instanceof Array ? w.map(Fe).join("") : typeof w == "object" ? Fe(
|
|
2198
2193
|
Kn(w.title) ? w.title.props : Object.values(w)
|
|
2199
2194
|
) : "", it = q(
|
|
2200
2195
|
() => G === "" || r ? void 0 : lt(B || []).filter(
|
|
2201
2196
|
(w) => w.cells.some(
|
|
2202
|
-
(P) => P &&
|
|
2197
|
+
(P) => P && Fe(P).toLowerCase().includes(G.toLowerCase())
|
|
2203
2198
|
)
|
|
2204
|
-
).slice(
|
|
2205
|
-
[G,
|
|
2199
|
+
).slice($, $ + O + 1),
|
|
2200
|
+
[G, $, O]
|
|
2206
2201
|
);
|
|
2207
2202
|
ya(
|
|
2208
2203
|
async () => {
|
|
2209
2204
|
f(!0);
|
|
2210
2205
|
const w = tt.current === "" && G !== "";
|
|
2211
|
-
return w && ce(0), tt.current = G, typeof
|
|
2206
|
+
return w && ce(0), tt.current = G, typeof u == "function" ? fe === nt.current && B ? B : await u(w ? 0 : $, O + 1, G) : u;
|
|
2212
2207
|
},
|
|
2213
2208
|
(w) => {
|
|
2214
|
-
nt.current = fe, r || (H(w), w.length >
|
|
2209
|
+
nt.current = fe, r || (H(w), w.length > $ ? w = w.slice($, $ + O + 1) : ce(0));
|
|
2215
2210
|
const P = lt(w);
|
|
2216
|
-
|
|
2211
|
+
A(P), f(!1);
|
|
2217
2212
|
},
|
|
2218
2213
|
[
|
|
2219
2214
|
fe,
|
|
2220
|
-
|
|
2215
|
+
$,
|
|
2221
2216
|
O,
|
|
2222
2217
|
G,
|
|
2223
|
-
typeof
|
|
2218
|
+
typeof u != "function" ? u : void 0
|
|
2224
2219
|
]
|
|
2225
2220
|
);
|
|
2226
|
-
const Jt = () => c &&
|
|
2221
|
+
const Jt = () => c && pr(c).map((w, P) => (delete w.onRowClick, w.onClick = async (L, Z) => {
|
|
2227
2222
|
await c[P].onRowClick(
|
|
2228
2223
|
(it || F)[Z].data
|
|
2229
|
-
) && (r ||
|
|
2224
|
+
) && (r || Oe(""), rt());
|
|
2230
2225
|
}, w)), Yt = (w, P) => {
|
|
2231
|
-
X[P].isOpen = w,
|
|
2232
|
-
}, X = it || F, ge = !X || X.length === 0,
|
|
2226
|
+
X[P].isOpen = w, A([...X]);
|
|
2227
|
+
}, X = it || F, ge = !X || X.length === 0, Pe = G !== "" || S, Qt = s ? O * 2 : O, Xt = s ? (X?.length || 0) / 2 : X?.length || 0;
|
|
2233
2228
|
return /* @__PURE__ */ v(j, { children: [
|
|
2234
|
-
(!ge ||
|
|
2229
|
+
(!ge || Pe) && /* @__PURE__ */ v(
|
|
2235
2230
|
ka,
|
|
2236
2231
|
{
|
|
2237
2232
|
id: zt,
|
|
2238
2233
|
count: Xt,
|
|
2239
|
-
first:
|
|
2234
|
+
first: $,
|
|
2240
2235
|
max: O,
|
|
2241
2236
|
onNextClick: ce,
|
|
2242
2237
|
onPreviousClick: ce,
|
|
@@ -2244,7 +2239,7 @@ function xa({
|
|
|
2244
2239
|
ce(w), se(P), D(P);
|
|
2245
2240
|
},
|
|
2246
2241
|
inputGroupName: n ? `${e}input` : void 0,
|
|
2247
|
-
inputGroupOnEnter:
|
|
2242
|
+
inputGroupOnEnter: Oe,
|
|
2248
2243
|
inputGroupPlaceholder: I(n || ""),
|
|
2249
2244
|
searchTypeComponent: g,
|
|
2250
2245
|
toolbarItem: /* @__PURE__ */ v(j, { children: [
|
|
@@ -2252,7 +2247,7 @@ function xa({
|
|
|
2252
2247
|
" ",
|
|
2253
2248
|
/* @__PURE__ */ t(W, { variant: "separator" }),
|
|
2254
2249
|
" ",
|
|
2255
|
-
/* @__PURE__ */ t(W, { children: /* @__PURE__ */ v(
|
|
2250
|
+
/* @__PURE__ */ t(W, { children: /* @__PURE__ */ v(N, { variant: "link", onClick: rt, "data-testid": "refresh", children: [
|
|
2256
2251
|
/* @__PURE__ */ t(ur, {}),
|
|
2257
2252
|
" ",
|
|
2258
2253
|
I("refresh")
|
|
@@ -2274,25 +2269,25 @@ function xa({
|
|
|
2274
2269
|
actions: Jt(),
|
|
2275
2270
|
actionResolver: y,
|
|
2276
2271
|
rows: X.slice(0, Qt),
|
|
2277
|
-
columns:
|
|
2272
|
+
columns: h,
|
|
2278
2273
|
isNotCompact: i,
|
|
2279
2274
|
isRadio: o,
|
|
2280
2275
|
ariaLabelKey: e
|
|
2281
2276
|
}
|
|
2282
2277
|
),
|
|
2283
|
-
!M && ge &&
|
|
2278
|
+
!M && ge && Pe && /* @__PURE__ */ t(
|
|
2284
2279
|
va,
|
|
2285
2280
|
{
|
|
2286
2281
|
hasIcon: !0,
|
|
2287
|
-
icon:
|
|
2282
|
+
icon: m,
|
|
2288
2283
|
isSearchVariant: !0,
|
|
2289
2284
|
message: I("noSearchResults"),
|
|
2290
2285
|
instructions: I("noSearchResultsInstructions"),
|
|
2291
2286
|
secondaryActions: S ? [] : [
|
|
2292
2287
|
{
|
|
2293
2288
|
text: I("clearAllFilters"),
|
|
2294
|
-
onClick: () =>
|
|
2295
|
-
type:
|
|
2289
|
+
onClick: () => Oe(""),
|
|
2290
|
+
type: Ie.link
|
|
2296
2291
|
}
|
|
2297
2292
|
]
|
|
2298
2293
|
}
|
|
@@ -2301,7 +2296,7 @@ function xa({
|
|
|
2301
2296
|
}
|
|
2302
2297
|
),
|
|
2303
2298
|
M && /* @__PURE__ */ t(ba, {}),
|
|
2304
|
-
!M && ge && !
|
|
2299
|
+
!M && ge && !Pe && p
|
|
2305
2300
|
] });
|
|
2306
2301
|
}
|
|
2307
2302
|
const Sa = ({ link: e, organization: n }) => {
|
|
@@ -2341,10 +2336,10 @@ const Sa = ({ link: e, organization: n }) => {
|
|
|
2341
2336
|
onSelect: i,
|
|
2342
2337
|
onDelete: o,
|
|
2343
2338
|
deleteLabel: s = "delete",
|
|
2344
|
-
link:
|
|
2345
|
-
children:
|
|
2339
|
+
link: d,
|
|
2340
|
+
children: u
|
|
2346
2341
|
}) => {
|
|
2347
|
-
const { t:
|
|
2342
|
+
const { t: h } = _();
|
|
2348
2343
|
return /* @__PURE__ */ t(
|
|
2349
2344
|
xa,
|
|
2350
2345
|
{
|
|
@@ -2358,7 +2353,7 @@ const Sa = ({ link: e, organization: n }) => {
|
|
|
2358
2353
|
canSelectAll: i !== void 0,
|
|
2359
2354
|
actions: o ? [
|
|
2360
2355
|
{
|
|
2361
|
-
title:
|
|
2356
|
+
title: h(s),
|
|
2362
2357
|
onRowClick: o
|
|
2363
2358
|
}
|
|
2364
2359
|
] : void 0,
|
|
@@ -2366,7 +2361,7 @@ const Sa = ({ link: e, organization: n }) => {
|
|
|
2366
2361
|
{
|
|
2367
2362
|
name: "name",
|
|
2368
2363
|
displayKey: "name",
|
|
2369
|
-
cellRenderer: (c) => /* @__PURE__ */ t(Sa, { link:
|
|
2364
|
+
cellRenderer: (c) => /* @__PURE__ */ t(Sa, { link: d, organization: c })
|
|
2370
2365
|
},
|
|
2371
2366
|
{
|
|
2372
2367
|
name: "domains",
|
|
@@ -2382,7 +2377,7 @@ const Sa = ({ link: e, organization: n }) => {
|
|
|
2382
2377
|
displayKey: "membershipType"
|
|
2383
2378
|
}
|
|
2384
2379
|
],
|
|
2385
|
-
emptyState:
|
|
2380
|
+
emptyState: u
|
|
2386
2381
|
}
|
|
2387
2382
|
);
|
|
2388
2383
|
};
|
|
@@ -2396,12 +2391,12 @@ export {
|
|
|
2396
2391
|
_t as FormErrorText,
|
|
2397
2392
|
Jr as FormPanel,
|
|
2398
2393
|
el as FormSubmitButton,
|
|
2399
|
-
|
|
2394
|
+
Vr as Help,
|
|
2400
2395
|
qt as HelpItem,
|
|
2401
2396
|
Za as IconMapper,
|
|
2402
2397
|
xa as KeycloakDataTable,
|
|
2403
2398
|
nl as KeycloakMasthead,
|
|
2404
|
-
|
|
2399
|
+
$a as KeycloakProvider,
|
|
2405
2400
|
sa as KeycloakSelect,
|
|
2406
2401
|
ba as KeycloakSpinner,
|
|
2407
2402
|
Wr as KeycloakTextArea,
|
|
@@ -2410,9 +2405,9 @@ export {
|
|
|
2410
2405
|
ll as OrganizationTable,
|
|
2411
2406
|
ka as PaginatingTableToolbar,
|
|
2412
2407
|
Wa as PasswordControl,
|
|
2413
|
-
|
|
2408
|
+
$t as PasswordInput,
|
|
2414
2409
|
ea as ScrollForm,
|
|
2415
|
-
|
|
2410
|
+
Ur as SelectControl,
|
|
2416
2411
|
ue as SelectVariant,
|
|
2417
2412
|
Ja as SwitchControl,
|
|
2418
2413
|
Ca as TableToolbar,
|
|
@@ -2422,13 +2417,13 @@ export {
|
|
|
2422
2417
|
ja as beerify,
|
|
2423
2418
|
Xe as createNamedContext,
|
|
2424
2419
|
Hr as debeerify,
|
|
2425
|
-
|
|
2420
|
+
Er as generateId,
|
|
2426
2421
|
Sr as getErrorDescription,
|
|
2427
2422
|
xr as getErrorMessage,
|
|
2428
|
-
|
|
2429
|
-
|
|
2430
|
-
|
|
2431
|
-
|
|
2423
|
+
Ua as getInjectedEnvironment,
|
|
2424
|
+
Tr as getNetworkErrorDescription,
|
|
2425
|
+
Lt as getNetworkErrorMessage,
|
|
2426
|
+
Ar as isDefined,
|
|
2432
2427
|
za as isUserProfileError,
|
|
2433
2428
|
ne as label,
|
|
2434
2429
|
Zr as mainPageContentId,
|
|
@@ -2440,5 +2435,5 @@ export {
|
|
|
2440
2435
|
Br as useHelp,
|
|
2441
2436
|
Ze as useRequiredContext,
|
|
2442
2437
|
Rr as useSetTimeout,
|
|
2443
|
-
|
|
2438
|
+
Vt as useStoredState
|
|
2444
2439
|
};
|