@keycloak/keycloak-ui-shared 25.0.2 → 25.0.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.
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { AlertGroup as tt, Alert as nt, AlertVariant as re, AlertActionCloseButton as rt, Page as
|
|
3
|
-
import { createContext as ye, useContext as ve, useState as
|
|
1
|
+
import { jsxs as b, jsx as t, Fragment as Y } from "react/jsx-runtime";
|
|
2
|
+
import { AlertGroup as tt, Alert as nt, AlertVariant as re, AlertActionCloseButton as rt, Page as at, Modal as De, ModalVariant as lt, Button as P, TextContent as it, Text as le, TextVariants as st, Spinner as ot, FormHelperText as ue, HelperText as he, HelperTextItem as me, Popover as ct, Icon as ie, FormGroup as Ve, NumberInput as dt, ValidatedOptions as M, InputGroup as pe, InputGroupItem as se, TextInput as Q, Select as X, MenuToggle as K, MenuToggleStatus as fe, SelectList as Z, SelectOption as ge, TextInputGroup as Me, TextInputGroupMain as Ne, ChipGroup as Le, Chip as qe, TextInputGroupUtilities as Be, Switch as ut, TextArea as _e, Title as ht, Card as mt, CardHeader as pt, CardTitle as ft, CardBody as gt, Grid as yt, GridItem as xe, PageSection as vt, JumpLinks as bt, JumpLinksItem as Ct, ButtonVariant as we, Checkbox as It, Radio as kt, MenuFooter as xt, Dropdown as wt, DropdownList as At, DropdownItem as Ae, Brand as Tt, Avatar as St } from "@patternfly/react-core";
|
|
3
|
+
import { createContext as ye, useContext as ve, useState as S, useCallback as He, useEffect as be, useMemo as D, useRef as ee, forwardRef as Ot, useId as Ft, Fragment as Ue, Children as $e } from "react";
|
|
4
4
|
import { useTranslation as Ce } from "react-i18next";
|
|
5
|
-
import
|
|
6
|
-
import { ExclamationCircleIcon as
|
|
5
|
+
import Rt from "keycloak-js";
|
|
6
|
+
import { ExclamationCircleIcon as Et, HelpIcon as Te, EyeIcon as Pt, EyeSlashIcon as Dt, TimesIcon as Ge, CubeIcon as Vt, PaypalIcon as Mt, InstagramIcon as Nt, BitbucketIcon as Lt, MicrosoftIcon as qt, TwitterIcon as Bt, StackOverflowIcon as _t, OpenshiftIcon as Ht, LinkedinIcon as Ut, GoogleIcon as $t, GitlabIcon as Gt, FacebookSquareIcon as Kt, GithubIcon as Wt, MinusCircleIcon as jt, PlusCircleIcon as zt, EllipsisVIcon as Jt } from "@patternfly/react-icons";
|
|
7
7
|
import { useFormContext as te, Controller as U, useController as Ie, FormProvider as Yt, useWatch as Qt } from "react-hook-form";
|
|
8
8
|
import { get as G } from "lodash-es";
|
|
9
|
-
import { PageHeader as Xt, PageHeaderTools as Zt, PageHeaderToolsGroup as en, PageHeaderToolsItem as
|
|
9
|
+
import { PageHeader as Xt, PageHeaderTools as Zt, PageHeaderToolsGroup as en, PageHeaderToolsItem as ae } from "@patternfly/react-core/deprecated";
|
|
10
10
|
import j from "@patternfly/react-styles/css/components/Avatar/avatar";
|
|
11
11
|
import { css as tn } from "@patternfly/react-styles";
|
|
12
|
-
import './main.css';const
|
|
13
|
-
const [n, r] =
|
|
12
|
+
import './main.css';const Ke = ye(void 0), ar = () => ve(Ke), nn = ({ children: e }) => {
|
|
13
|
+
const [n, r] = S([]), a = (s) => {
|
|
14
14
|
r((c) => c.filter((o) => o.id !== s));
|
|
15
|
-
},
|
|
15
|
+
}, l = (s, c = re.success, o) => {
|
|
16
16
|
r([
|
|
17
17
|
{
|
|
18
18
|
id: Math.random() * 100,
|
|
@@ -23,10 +23,10 @@ import './main.css';const We = ye(void 0), rr = () => ve(We), nn = ({ children:
|
|
|
23
23
|
...n
|
|
24
24
|
]);
|
|
25
25
|
}, i = (s) => {
|
|
26
|
-
|
|
26
|
+
l(s, re.danger);
|
|
27
27
|
};
|
|
28
|
-
return /* @__PURE__ */
|
|
29
|
-
/* @__PURE__ */ t(tt, { isToast: !0, "data-testid": "alerts", children: n.map(({ id: s, variant: c, message: o, description:
|
|
28
|
+
return /* @__PURE__ */ b(Ke.Provider, { value: { addAlert: l, addError: i }, children: [
|
|
29
|
+
/* @__PURE__ */ t(tt, { isToast: !0, "data-testid": "alerts", children: n.map(({ id: s, variant: c, message: o, description: m }) => /* @__PURE__ */ t(
|
|
30
30
|
nt,
|
|
31
31
|
{
|
|
32
32
|
isLiveRegion: !0,
|
|
@@ -37,44 +37,44 @@ import './main.css';const We = ye(void 0), rr = () => ve(We), nn = ({ children:
|
|
|
37
37
|
rt,
|
|
38
38
|
{
|
|
39
39
|
title: o,
|
|
40
|
-
onClose: () =>
|
|
40
|
+
onClose: () => a(s)
|
|
41
41
|
}
|
|
42
42
|
),
|
|
43
43
|
timeout: !0,
|
|
44
|
-
onTimeout: () =>
|
|
45
|
-
children:
|
|
44
|
+
onTimeout: () => a(s),
|
|
45
|
+
children: m && /* @__PURE__ */ t("p", { children: m })
|
|
46
46
|
},
|
|
47
47
|
s
|
|
48
48
|
)) }),
|
|
49
49
|
e
|
|
50
50
|
] });
|
|
51
51
|
}, rn = (e) => {
|
|
52
|
-
const { t: n } = Ce(), r = e.error,
|
|
53
|
-
function
|
|
52
|
+
const { t: n } = Ce(), r = e.error, a = an(r);
|
|
53
|
+
function l() {
|
|
54
54
|
location.href = location.origin + location.pathname;
|
|
55
55
|
}
|
|
56
|
-
return /* @__PURE__ */ t(
|
|
57
|
-
|
|
56
|
+
return /* @__PURE__ */ t(at, { children: /* @__PURE__ */ t(
|
|
57
|
+
De,
|
|
58
58
|
{
|
|
59
|
-
variant:
|
|
59
|
+
variant: lt.small,
|
|
60
60
|
title: n("somethingWentWrong"),
|
|
61
61
|
titleIconVariant: "danger",
|
|
62
62
|
showClose: !1,
|
|
63
63
|
isOpen: !0,
|
|
64
64
|
actions: [
|
|
65
|
-
/* @__PURE__ */ t(
|
|
65
|
+
/* @__PURE__ */ t(P, { variant: "primary", onClick: l, children: n("tryAgain") }, "tryAgain")
|
|
66
66
|
],
|
|
67
|
-
children: /* @__PURE__ */
|
|
68
|
-
/* @__PURE__ */ t(
|
|
69
|
-
|
|
67
|
+
children: /* @__PURE__ */ b(it, { children: [
|
|
68
|
+
/* @__PURE__ */ t(le, { children: n("somethingWentWrongDescription") }),
|
|
69
|
+
a && /* @__PURE__ */ t(le, { component: st.small, children: a })
|
|
70
70
|
] })
|
|
71
71
|
}
|
|
72
72
|
) });
|
|
73
73
|
};
|
|
74
|
-
function
|
|
74
|
+
function an(e) {
|
|
75
75
|
return typeof e == "string" ? e : e instanceof Error ? e.message : null;
|
|
76
76
|
}
|
|
77
|
-
function
|
|
77
|
+
function ln(e, n) {
|
|
78
78
|
const r = ye(n);
|
|
79
79
|
return r.displayName = e, r;
|
|
80
80
|
}
|
|
@@ -90,42 +90,42 @@ function on(e) {
|
|
|
90
90
|
);
|
|
91
91
|
}
|
|
92
92
|
function cn(e, n, r) {
|
|
93
|
-
const [
|
|
93
|
+
const [a, l] = S(
|
|
94
94
|
() => e.getItem(n) ?? r
|
|
95
95
|
), i = He((s) => {
|
|
96
|
-
|
|
96
|
+
l(s), e.setItem(n, s);
|
|
97
97
|
}, []);
|
|
98
98
|
return be(() => {
|
|
99
|
-
|
|
99
|
+
l(e.getItem(n) ?? r), window.addEventListener("storage", s);
|
|
100
100
|
function s(c) {
|
|
101
|
-
c.storageArea === e && (c.key === null || c.key === n) &&
|
|
101
|
+
c.storageArea === e && (c.key === null || c.key === n) && l(c.newValue ?? r);
|
|
102
102
|
}
|
|
103
103
|
return () => window.removeEventListener("storage", s);
|
|
104
|
-
}, [e, n]), [
|
|
104
|
+
}, [e, n]), [a, i];
|
|
105
105
|
}
|
|
106
106
|
function dn(e, n, r) {
|
|
107
|
-
const
|
|
107
|
+
const a = D(
|
|
108
108
|
() => JSON.stringify(r),
|
|
109
109
|
[r]
|
|
110
|
-
), [
|
|
110
|
+
), [l, i] = cn(
|
|
111
111
|
e,
|
|
112
112
|
n,
|
|
113
|
-
|
|
114
|
-
), s =
|
|
113
|
+
a
|
|
114
|
+
), s = D(() => JSON.parse(l), [l]), c = He(
|
|
115
115
|
(o) => i(JSON.stringify(o)),
|
|
116
116
|
[]
|
|
117
117
|
);
|
|
118
118
|
return [s, c];
|
|
119
119
|
}
|
|
120
|
-
const
|
|
120
|
+
const We = ln(
|
|
121
121
|
"HelpContext",
|
|
122
122
|
void 0
|
|
123
|
-
), un = () => on(
|
|
123
|
+
), un = () => on(We), hn = ({ children: e }) => {
|
|
124
124
|
const [n, r] = dn(localStorage, "helpEnabled", !0);
|
|
125
|
-
function
|
|
125
|
+
function a() {
|
|
126
126
|
r(!n);
|
|
127
127
|
}
|
|
128
|
-
return /* @__PURE__ */ t(
|
|
128
|
+
return /* @__PURE__ */ t(We.Provider, { value: { enabled: n, toggleHelp: a }, children: e });
|
|
129
129
|
}, mn = () => ye(void 0);
|
|
130
130
|
let oe;
|
|
131
131
|
const lr = () => {
|
|
@@ -135,13 +135,13 @@ const lr = () => {
|
|
|
135
135
|
"no environment provider in the hierarchy make sure to add the provider"
|
|
136
136
|
);
|
|
137
137
|
return e;
|
|
138
|
-
},
|
|
138
|
+
}, ir = ({
|
|
139
139
|
environment: e,
|
|
140
140
|
children: n
|
|
141
141
|
}) => {
|
|
142
142
|
oe = mn();
|
|
143
|
-
const r = ee(!1), [
|
|
144
|
-
const o = new
|
|
143
|
+
const r = ee(!1), [a, l] = S(!1), [i, s] = S(), c = D(() => {
|
|
144
|
+
const o = new Rt({
|
|
145
145
|
url: e.serverBaseUrl,
|
|
146
146
|
realm: e.realm,
|
|
147
147
|
clientId: e.clientId
|
|
@@ -155,10 +155,10 @@ const lr = () => {
|
|
|
155
155
|
onLoad: "check-sso",
|
|
156
156
|
pkceMethod: "S256",
|
|
157
157
|
responseMode: "query"
|
|
158
|
-
}).then(() =>
|
|
159
|
-
}, [c]), i ? /* @__PURE__ */ t(rn, { error: i }) :
|
|
158
|
+
}).then(() => l(!0)).catch((m) => s(m)), r.current = !0;
|
|
159
|
+
}, [c]), i ? /* @__PURE__ */ t(rn, { error: i }) : a ? /* @__PURE__ */ t(oe.Provider, { value: { environment: e, keycloak: c }, children: /* @__PURE__ */ t(nn, { children: /* @__PURE__ */ t(hn, { children: n }) }) }) : /* @__PURE__ */ t(ot, {});
|
|
160
160
|
};
|
|
161
|
-
function
|
|
161
|
+
function sr() {
|
|
162
162
|
const n = document.getElementById("environment")?.textContent;
|
|
163
163
|
if (typeof n != "string")
|
|
164
164
|
throw new Error("Environment variables not found in the document.");
|
|
@@ -168,76 +168,76 @@ function ir() {
|
|
|
168
168
|
throw new Error("Unable to parse environment variables as JSON.");
|
|
169
169
|
}
|
|
170
170
|
}
|
|
171
|
-
const
|
|
171
|
+
const or = ({
|
|
172
172
|
modalTitle: e,
|
|
173
173
|
continueLabel: n,
|
|
174
174
|
cancelLabel: r,
|
|
175
|
-
buttonTitle:
|
|
176
|
-
isDisabled:
|
|
175
|
+
buttonTitle: a,
|
|
176
|
+
isDisabled: l,
|
|
177
177
|
buttonVariant: i,
|
|
178
178
|
buttonTestRole: s,
|
|
179
179
|
onContinue: c,
|
|
180
|
-
component: o =
|
|
181
|
-
children:
|
|
182
|
-
...
|
|
180
|
+
component: o = P,
|
|
181
|
+
children: m,
|
|
182
|
+
...f
|
|
183
183
|
}) => {
|
|
184
|
-
const [
|
|
185
|
-
return /* @__PURE__ */
|
|
184
|
+
const [h, d] = S(!1);
|
|
185
|
+
return /* @__PURE__ */ b(Y, { children: [
|
|
186
186
|
/* @__PURE__ */ t(
|
|
187
187
|
o,
|
|
188
188
|
{
|
|
189
189
|
variant: i,
|
|
190
|
-
onClick: () =>
|
|
191
|
-
isDisabled:
|
|
190
|
+
onClick: () => d(!0),
|
|
191
|
+
isDisabled: l,
|
|
192
192
|
"data-testrole": s,
|
|
193
|
-
children:
|
|
193
|
+
children: a
|
|
194
194
|
}
|
|
195
195
|
),
|
|
196
196
|
/* @__PURE__ */ t(
|
|
197
|
-
|
|
197
|
+
De,
|
|
198
198
|
{
|
|
199
199
|
variant: "small",
|
|
200
|
-
...
|
|
200
|
+
...f,
|
|
201
201
|
title: e,
|
|
202
|
-
isOpen:
|
|
203
|
-
onClose: () =>
|
|
202
|
+
isOpen: h,
|
|
203
|
+
onClose: () => d(!1),
|
|
204
204
|
actions: [
|
|
205
205
|
/* @__PURE__ */ t(
|
|
206
|
-
|
|
206
|
+
P,
|
|
207
207
|
{
|
|
208
208
|
id: "modal-confirm",
|
|
209
209
|
variant: "primary",
|
|
210
210
|
onClick: () => {
|
|
211
|
-
|
|
211
|
+
d(!1), c();
|
|
212
212
|
},
|
|
213
213
|
children: n
|
|
214
214
|
},
|
|
215
215
|
"confirm"
|
|
216
216
|
),
|
|
217
217
|
/* @__PURE__ */ t(
|
|
218
|
-
|
|
218
|
+
P,
|
|
219
219
|
{
|
|
220
220
|
id: "modal-cancel",
|
|
221
221
|
variant: "secondary",
|
|
222
|
-
onClick: () =>
|
|
222
|
+
onClick: () => d(!1),
|
|
223
223
|
children: r
|
|
224
224
|
},
|
|
225
225
|
"cancel"
|
|
226
226
|
)
|
|
227
227
|
],
|
|
228
|
-
children:
|
|
228
|
+
children: m
|
|
229
229
|
}
|
|
230
230
|
)
|
|
231
231
|
] });
|
|
232
|
-
}, je = ({ message: e, ...n }) => /* @__PURE__ */ t(ue, { ...n, children: /* @__PURE__ */ t(he, { children: /* @__PURE__ */ t(me, { icon: /* @__PURE__ */ t(
|
|
232
|
+
}, je = ({ message: e, ...n }) => /* @__PURE__ */ t(ue, { ...n, children: /* @__PURE__ */ t(he, { children: /* @__PURE__ */ t(me, { icon: /* @__PURE__ */ t(Et, {}), variant: "error", children: e }) }) }), ze = ({
|
|
233
233
|
helpText: e,
|
|
234
234
|
fieldLabelId: n,
|
|
235
235
|
noVerticalAlign: r = !0,
|
|
236
|
-
unWrap:
|
|
236
|
+
unWrap: a = !1
|
|
237
237
|
}) => {
|
|
238
|
-
const { enabled:
|
|
239
|
-
return
|
|
240
|
-
!
|
|
238
|
+
const { enabled: l } = un();
|
|
239
|
+
return l ? /* @__PURE__ */ t(ct, { bodyContent: e, children: /* @__PURE__ */ b(Y, { children: [
|
|
240
|
+
!a && /* @__PURE__ */ t(
|
|
241
241
|
"button",
|
|
242
242
|
{
|
|
243
243
|
"data-testid": `help-label-${n}`,
|
|
@@ -247,16 +247,21 @@ const sr = ({
|
|
|
247
247
|
children: /* @__PURE__ */ t(ie, { isInline: r, children: /* @__PURE__ */ t(Te, {}) })
|
|
248
248
|
}
|
|
249
249
|
),
|
|
250
|
-
|
|
250
|
+
a && /* @__PURE__ */ t(ie, { isInline: r, children: /* @__PURE__ */ t(Te, {}) })
|
|
251
251
|
] }) }) : null;
|
|
252
|
-
}
|
|
252
|
+
};
|
|
253
|
+
function pn(e) {
|
|
254
|
+
if (!(typeof e > "u" || e instanceof RegExp))
|
|
255
|
+
return typeof e == "object" ? e.value : e;
|
|
256
|
+
}
|
|
257
|
+
const _ = ({
|
|
253
258
|
name: e,
|
|
254
259
|
label: n,
|
|
255
260
|
labelIcon: r,
|
|
256
|
-
error:
|
|
257
|
-
children:
|
|
261
|
+
error: a,
|
|
262
|
+
children: l,
|
|
258
263
|
...i
|
|
259
|
-
}) => /* @__PURE__ */
|
|
264
|
+
}) => /* @__PURE__ */ b(
|
|
260
265
|
Ve,
|
|
261
266
|
{
|
|
262
267
|
label: n || e,
|
|
@@ -264,16 +269,16 @@ const sr = ({
|
|
|
264
269
|
labelIcon: r ? /* @__PURE__ */ t(ze, { helpText: r, fieldLabelId: e }) : void 0,
|
|
265
270
|
...i,
|
|
266
271
|
children: [
|
|
267
|
-
|
|
268
|
-
|
|
272
|
+
l,
|
|
273
|
+
a && /* @__PURE__ */ t(je, { "data-testid": `${e}-helper`, message: a.message })
|
|
269
274
|
]
|
|
270
275
|
}
|
|
271
|
-
),
|
|
276
|
+
), cr = ({
|
|
272
277
|
name: e,
|
|
273
278
|
label: n,
|
|
274
279
|
controller: r,
|
|
275
|
-
labelIcon:
|
|
276
|
-
...
|
|
280
|
+
labelIcon: a,
|
|
281
|
+
...l
|
|
277
282
|
}) => {
|
|
278
283
|
const {
|
|
279
284
|
control: i,
|
|
@@ -286,7 +291,7 @@ const sr = ({
|
|
|
286
291
|
label: n,
|
|
287
292
|
isRequired: r.rules?.required === !0,
|
|
288
293
|
error: s[e],
|
|
289
|
-
labelIcon:
|
|
294
|
+
labelIcon: a,
|
|
290
295
|
children: /* @__PURE__ */ t(
|
|
291
296
|
U,
|
|
292
297
|
{
|
|
@@ -294,22 +299,24 @@ const sr = ({
|
|
|
294
299
|
name: e,
|
|
295
300
|
control: i,
|
|
296
301
|
render: ({ field: c }) => {
|
|
297
|
-
const o = !!r.rules?.required,
|
|
302
|
+
const o = !!r.rules?.required, m = pn(r.rules?.min), f = c.value ?? r.defaultValue, h = (d) => c.onChange(
|
|
303
|
+
m !== void 0 ? Math.max(d, Number(m)) : d
|
|
304
|
+
);
|
|
298
305
|
return /* @__PURE__ */ t(
|
|
299
306
|
dt,
|
|
300
307
|
{
|
|
301
|
-
...
|
|
308
|
+
...l,
|
|
302
309
|
id: e,
|
|
303
|
-
value:
|
|
310
|
+
value: f,
|
|
304
311
|
validated: s[e] ? M.error : M.default,
|
|
305
312
|
required: o,
|
|
306
|
-
min: Number(
|
|
313
|
+
min: Number(m),
|
|
307
314
|
max: Number(r.rules?.max),
|
|
308
|
-
onPlus: () =>
|
|
309
|
-
onMinus: () =>
|
|
310
|
-
onChange: (
|
|
311
|
-
const u = Number(
|
|
312
|
-
|
|
315
|
+
onPlus: () => h(f + 1),
|
|
316
|
+
onMinus: () => h(f - 1),
|
|
317
|
+
onChange: (d) => {
|
|
318
|
+
const u = Number(d.currentTarget.value);
|
|
319
|
+
h(isNaN(u) ? r.defaultValue : u);
|
|
313
320
|
}
|
|
314
321
|
}
|
|
315
322
|
);
|
|
@@ -318,53 +325,53 @@ const sr = ({
|
|
|
318
325
|
)
|
|
319
326
|
}
|
|
320
327
|
);
|
|
321
|
-
},
|
|
328
|
+
}, fn = ({
|
|
322
329
|
hasReveal: e = !0,
|
|
323
330
|
innerRef: n,
|
|
324
331
|
...r
|
|
325
332
|
}) => {
|
|
326
|
-
const { t:
|
|
327
|
-
return /* @__PURE__ */
|
|
333
|
+
const { t: a } = Ce(), [l, i] = S(!0);
|
|
334
|
+
return /* @__PURE__ */ b(pe, { children: [
|
|
328
335
|
/* @__PURE__ */ t(se, { isFill: !0, children: /* @__PURE__ */ t(
|
|
329
336
|
Q,
|
|
330
337
|
{
|
|
331
338
|
...r,
|
|
332
|
-
type:
|
|
339
|
+
type: l ? "password" : "text",
|
|
333
340
|
ref: n
|
|
334
341
|
}
|
|
335
342
|
) }),
|
|
336
343
|
e && /* @__PURE__ */ t(
|
|
337
|
-
|
|
344
|
+
P,
|
|
338
345
|
{
|
|
339
346
|
variant: "control",
|
|
340
|
-
"aria-label":
|
|
341
|
-
onClick: () => i(!
|
|
342
|
-
children:
|
|
347
|
+
"aria-label": a("showPassword"),
|
|
348
|
+
onClick: () => i(!l),
|
|
349
|
+
children: l ? /* @__PURE__ */ t(Pt, {}) : /* @__PURE__ */ t(Dt, {})
|
|
343
350
|
}
|
|
344
351
|
)
|
|
345
352
|
] });
|
|
346
353
|
}, Je = Ot(
|
|
347
|
-
(e, n) => /* @__PURE__ */ t(
|
|
354
|
+
(e, n) => /* @__PURE__ */ t(fn, { ...e, innerRef: n })
|
|
348
355
|
);
|
|
349
356
|
Je.displayName = "PasswordInput";
|
|
350
|
-
const
|
|
351
|
-
const { labelIcon: n, ...r } = e,
|
|
357
|
+
const dr = (e) => {
|
|
358
|
+
const { labelIcon: n, ...r } = e, a = !!e.rules?.required, l = e.defaultValue ?? "", { field: i, fieldState: s } = Ie({
|
|
352
359
|
...e,
|
|
353
|
-
defaultValue:
|
|
360
|
+
defaultValue: l
|
|
354
361
|
});
|
|
355
|
-
return /* @__PURE__ */
|
|
362
|
+
return /* @__PURE__ */ b(
|
|
356
363
|
_,
|
|
357
364
|
{
|
|
358
365
|
name: e.name,
|
|
359
366
|
label: e.label,
|
|
360
367
|
labelIcon: n,
|
|
361
|
-
isRequired:
|
|
368
|
+
isRequired: a,
|
|
362
369
|
error: s.error,
|
|
363
370
|
children: [
|
|
364
371
|
/* @__PURE__ */ t(
|
|
365
372
|
Je,
|
|
366
373
|
{
|
|
367
|
-
isRequired:
|
|
374
|
+
isRequired: a,
|
|
368
375
|
id: e.name,
|
|
369
376
|
"data-testid": e.name,
|
|
370
377
|
validated: s.error ? M.error : M.default,
|
|
@@ -377,104 +384,104 @@ const cr = (e) => {
|
|
|
377
384
|
]
|
|
378
385
|
}
|
|
379
386
|
);
|
|
380
|
-
},
|
|
387
|
+
}, gn = ({
|
|
381
388
|
id: e,
|
|
382
389
|
name: n,
|
|
383
390
|
label: r,
|
|
384
|
-
options:
|
|
385
|
-
controller:
|
|
391
|
+
options: a,
|
|
392
|
+
controller: l,
|
|
386
393
|
labelIcon: i,
|
|
387
394
|
...s
|
|
388
395
|
}) => {
|
|
389
396
|
const {
|
|
390
397
|
control: c,
|
|
391
398
|
formState: { errors: o }
|
|
392
|
-
} = te(), [
|
|
399
|
+
} = te(), [m, f] = S(!1);
|
|
393
400
|
return /* @__PURE__ */ t(
|
|
394
401
|
_,
|
|
395
402
|
{
|
|
396
403
|
name: n,
|
|
397
404
|
label: r,
|
|
398
|
-
isRequired: !!
|
|
405
|
+
isRequired: !!l.rules?.required,
|
|
399
406
|
error: G(o, n),
|
|
400
407
|
labelIcon: i,
|
|
401
408
|
children: /* @__PURE__ */ t(
|
|
402
409
|
U,
|
|
403
410
|
{
|
|
404
|
-
...
|
|
411
|
+
...l,
|
|
405
412
|
name: n,
|
|
406
413
|
control: c,
|
|
407
|
-
render: ({ field: { onChange:
|
|
414
|
+
render: ({ field: { onChange: h, value: d } }) => /* @__PURE__ */ t(
|
|
408
415
|
X,
|
|
409
416
|
{
|
|
410
417
|
...s,
|
|
411
|
-
onClick: () =>
|
|
412
|
-
onOpenChange: () =>
|
|
413
|
-
selected: $(
|
|
414
|
-
(u) => Array.isArray(
|
|
415
|
-
).map((u) => u.value) :
|
|
418
|
+
onClick: () => f(!m),
|
|
419
|
+
onOpenChange: () => f(!1),
|
|
420
|
+
selected: $(a) ? a.filter(
|
|
421
|
+
(u) => Array.isArray(d) ? d.includes(u.key) : d === u.key
|
|
422
|
+
).map((u) => u.value) : d,
|
|
416
423
|
toggle: (u) => /* @__PURE__ */ t(
|
|
417
|
-
|
|
424
|
+
K,
|
|
418
425
|
{
|
|
419
426
|
id: e || n.slice(n.lastIndexOf(".") + 1),
|
|
420
427
|
ref: u,
|
|
421
|
-
onClick: () =>
|
|
422
|
-
isExpanded:
|
|
428
|
+
onClick: () => f(!m),
|
|
429
|
+
isExpanded: m,
|
|
423
430
|
isFullWidth: !0,
|
|
424
431
|
status: G(o, n) ? fe.danger : void 0,
|
|
425
432
|
"aria-label": "toggle",
|
|
426
|
-
children: $(
|
|
427
|
-
(
|
|
428
|
-
)?.value :
|
|
433
|
+
children: $(a) ? a.find(
|
|
434
|
+
(k) => k.key === (Array.isArray(d) ? d[0] : d)
|
|
435
|
+
)?.value : d
|
|
429
436
|
}
|
|
430
437
|
),
|
|
431
|
-
onSelect: (u,
|
|
432
|
-
const
|
|
433
|
-
|
|
438
|
+
onSelect: (u, k) => {
|
|
439
|
+
const x = k?.toString();
|
|
440
|
+
h(Array.isArray(d) ? [x] : x), f(!1);
|
|
434
441
|
},
|
|
435
|
-
isOpen:
|
|
436
|
-
children: /* @__PURE__ */ t(Z, { children:
|
|
442
|
+
isOpen: m,
|
|
443
|
+
children: /* @__PURE__ */ t(Z, { children: a.map((u) => /* @__PURE__ */ t(ge, { value: q(u), children: ke(u) ? u : u.value }, q(u))) })
|
|
437
444
|
}
|
|
438
445
|
)
|
|
439
446
|
}
|
|
440
447
|
)
|
|
441
448
|
}
|
|
442
449
|
);
|
|
443
|
-
}, z = (e) => ke(e) ? e : e.value,
|
|
450
|
+
}, z = (e) => ke(e) ? e : e.value, yn = ({
|
|
444
451
|
id: e,
|
|
445
452
|
name: n,
|
|
446
453
|
label: r,
|
|
447
|
-
options:
|
|
448
|
-
controller:
|
|
454
|
+
options: a,
|
|
455
|
+
controller: l,
|
|
449
456
|
labelIcon: i,
|
|
450
457
|
placeholderText: s,
|
|
451
458
|
onFilter: c,
|
|
452
459
|
variant: o,
|
|
453
|
-
...
|
|
460
|
+
...m
|
|
454
461
|
}) => {
|
|
455
462
|
const {
|
|
456
|
-
control:
|
|
457
|
-
formState: { errors:
|
|
458
|
-
} = te(), [
|
|
459
|
-
(p) => z(p).toLowerCase().startsWith(
|
|
460
|
-
),
|
|
461
|
-
() =>
|
|
463
|
+
control: f,
|
|
464
|
+
formState: { errors: h }
|
|
465
|
+
} = te(), [d, u] = S(!1), [k, x] = S(""), [g, y] = S(0), O = ee(), v = a.filter(
|
|
466
|
+
(p) => z(p).toLowerCase().startsWith(k.toLowerCase())
|
|
467
|
+
), C = D(
|
|
468
|
+
() => v.map((p, I) => /* @__PURE__ */ t(
|
|
462
469
|
ge,
|
|
463
470
|
{
|
|
464
|
-
value:
|
|
465
|
-
isFocused:
|
|
471
|
+
value: q(p),
|
|
472
|
+
isFocused: g === I,
|
|
466
473
|
children: z(p)
|
|
467
474
|
},
|
|
468
|
-
|
|
475
|
+
q(p)
|
|
469
476
|
)),
|
|
470
|
-
[
|
|
471
|
-
),
|
|
472
|
-
const A =
|
|
477
|
+
[g, v]
|
|
478
|
+
), L = (p, I) => {
|
|
479
|
+
const A = v[g];
|
|
473
480
|
switch (u(!0), p.key) {
|
|
474
481
|
case "Enter": {
|
|
475
|
-
p.preventDefault(), o !== H.typeaheadMulti ?
|
|
476
|
-
Array.isArray(I.value) ? [...I.value,
|
|
477
|
-
), u(!1),
|
|
482
|
+
p.preventDefault(), o !== H.typeaheadMulti ? x(z(A)) : x(""), I.onChange(
|
|
483
|
+
Array.isArray(I.value) ? [...I.value, q(A)] : q(A)
|
|
484
|
+
), u(!1), y(0);
|
|
478
485
|
break;
|
|
479
486
|
}
|
|
480
487
|
case "Tab":
|
|
@@ -489,8 +496,8 @@ const cr = (e) => {
|
|
|
489
496
|
case "ArrowUp":
|
|
490
497
|
case "ArrowDown": {
|
|
491
498
|
p.preventDefault();
|
|
492
|
-
let
|
|
493
|
-
p.key === "ArrowUp" && (
|
|
499
|
+
let w = 0;
|
|
500
|
+
p.key === "ArrowUp" && (g === 0 ? w = a.length - 1 : w = g - 1), p.key === "ArrowDown" && (g === a.length - 1 ? w = 0 : w = g + 1), y(w);
|
|
494
501
|
break;
|
|
495
502
|
}
|
|
496
503
|
}
|
|
@@ -500,76 +507,76 @@ const cr = (e) => {
|
|
|
500
507
|
{
|
|
501
508
|
name: n,
|
|
502
509
|
label: r,
|
|
503
|
-
isRequired: !!
|
|
504
|
-
error: G(
|
|
510
|
+
isRequired: !!l.rules?.required,
|
|
511
|
+
error: G(h, n),
|
|
505
512
|
labelIcon: i,
|
|
506
513
|
children: /* @__PURE__ */ t(
|
|
507
514
|
U,
|
|
508
515
|
{
|
|
509
|
-
...
|
|
516
|
+
...l,
|
|
510
517
|
name: n,
|
|
511
|
-
control:
|
|
518
|
+
control: f,
|
|
512
519
|
render: ({ field: p }) => /* @__PURE__ */ t(
|
|
513
520
|
X,
|
|
514
521
|
{
|
|
515
|
-
...
|
|
516
|
-
onClick: () => u(!
|
|
522
|
+
...m,
|
|
523
|
+
onClick: () => u(!d),
|
|
517
524
|
onOpenChange: () => u(!1),
|
|
518
|
-
selected: $(
|
|
525
|
+
selected: $(a) ? a.filter(
|
|
519
526
|
(I) => Array.isArray(p.value) ? p.value.includes(I.key) : p.value === I.key
|
|
520
527
|
).map((I) => I.value) : p.value,
|
|
521
528
|
toggle: (I) => /* @__PURE__ */ t(
|
|
522
|
-
|
|
529
|
+
K,
|
|
523
530
|
{
|
|
524
531
|
ref: I,
|
|
525
532
|
id: e || n.slice(n.lastIndexOf(".") + 1),
|
|
526
533
|
variant: "typeahead",
|
|
527
|
-
onClick: () => u(!
|
|
528
|
-
isExpanded:
|
|
534
|
+
onClick: () => u(!d),
|
|
535
|
+
isExpanded: d,
|
|
529
536
|
isFullWidth: !0,
|
|
530
|
-
status: G(
|
|
531
|
-
children: /* @__PURE__ */
|
|
537
|
+
status: G(h, n) ? fe.danger : void 0,
|
|
538
|
+
children: /* @__PURE__ */ b(Me, { isPlain: !0, children: [
|
|
532
539
|
/* @__PURE__ */ t(
|
|
533
540
|
Ne,
|
|
534
541
|
{
|
|
535
542
|
placeholder: s,
|
|
536
|
-
value: o === H.typeahead && p.value ? $(
|
|
543
|
+
value: o === H.typeahead && p.value ? $(a) ? a.find(
|
|
537
544
|
(A) => A.key === (Array.isArray(p.value) ? p.value[0] : p.value)
|
|
538
|
-
)?.value : p.value :
|
|
539
|
-
onClick: () => u(!
|
|
540
|
-
onChange: (A,
|
|
541
|
-
|
|
545
|
+
)?.value : p.value : k,
|
|
546
|
+
onClick: () => u(!d),
|
|
547
|
+
onChange: (A, w) => {
|
|
548
|
+
x(w), c?.(w);
|
|
542
549
|
},
|
|
543
|
-
onKeyDown: (A) =>
|
|
550
|
+
onKeyDown: (A) => L(A, p),
|
|
544
551
|
autoComplete: "off",
|
|
545
|
-
innerRef:
|
|
552
|
+
innerRef: O,
|
|
546
553
|
role: "combobox",
|
|
547
|
-
isExpanded:
|
|
554
|
+
isExpanded: d,
|
|
548
555
|
"aria-controls": "select-typeahead-listbox",
|
|
549
|
-
children: o === H.typeaheadMulti && Array.isArray(p.value) && /* @__PURE__ */ t(
|
|
550
|
-
(A,
|
|
551
|
-
|
|
556
|
+
children: o === H.typeaheadMulti && Array.isArray(p.value) && /* @__PURE__ */ t(Le, { "aria-label": "Current selections", children: p.value.map(
|
|
557
|
+
(A, w) => /* @__PURE__ */ t(
|
|
558
|
+
qe,
|
|
552
559
|
{
|
|
553
|
-
onClick: (
|
|
554
|
-
|
|
560
|
+
onClick: (T) => {
|
|
561
|
+
T.stopPropagation(), p.onChange(
|
|
555
562
|
p.value.filter(
|
|
556
|
-
(
|
|
563
|
+
(F) => F !== q(A)
|
|
557
564
|
)
|
|
558
565
|
);
|
|
559
566
|
},
|
|
560
|
-
children: $(
|
|
567
|
+
children: $(a) ? a.find((T) => A === T.key)?.value : z(A)
|
|
561
568
|
},
|
|
562
|
-
|
|
569
|
+
w
|
|
563
570
|
)
|
|
564
571
|
) })
|
|
565
572
|
}
|
|
566
573
|
),
|
|
567
|
-
/* @__PURE__ */ t(
|
|
568
|
-
|
|
574
|
+
/* @__PURE__ */ t(Be, { children: !!k && /* @__PURE__ */ t(
|
|
575
|
+
P,
|
|
569
576
|
{
|
|
570
577
|
variant: "plain",
|
|
571
578
|
onClick: () => {
|
|
572
|
-
p.onChange(void 0),
|
|
579
|
+
p.onChange(void 0), x(""), O?.current?.focus();
|
|
573
580
|
},
|
|
574
581
|
"aria-label": "Clear input value",
|
|
575
582
|
children: /* @__PURE__ */ t(Ge, { "aria-hidden": !0 })
|
|
@@ -580,13 +587,13 @@ const cr = (e) => {
|
|
|
580
587
|
),
|
|
581
588
|
onSelect: (I, A) => {
|
|
582
589
|
I?.stopPropagation();
|
|
583
|
-
const
|
|
584
|
-
o === H.typeaheadMulti && Array.isArray(p.value) ? p.value.includes(
|
|
585
|
-
p.value.filter((
|
|
586
|
-
) : p.onChange([...p.value,
|
|
590
|
+
const w = A?.toString();
|
|
591
|
+
o === H.typeaheadMulti && Array.isArray(p.value) ? p.value.includes(w) ? p.onChange(
|
|
592
|
+
p.value.filter((T) => T !== w)
|
|
593
|
+
) : p.onChange([...p.value, w]) : (p.onChange(Array.isArray(p.value) ? [w] : w), u(!1));
|
|
587
594
|
},
|
|
588
|
-
isOpen:
|
|
589
|
-
children: /* @__PURE__ */ t(Z, { children:
|
|
595
|
+
isOpen: d,
|
|
596
|
+
children: /* @__PURE__ */ t(Z, { children: C })
|
|
590
597
|
}
|
|
591
598
|
)
|
|
592
599
|
}
|
|
@@ -595,42 +602,42 @@ const cr = (e) => {
|
|
|
595
602
|
);
|
|
596
603
|
};
|
|
597
604
|
var H = /* @__PURE__ */ ((e) => (e.single = "single", e.typeahead = "typeahead", e.typeaheadMulti = "typeaheadMulti", e))(H || {});
|
|
598
|
-
const $ = (e) => typeof e[0] != "string", ke = (e) => typeof e == "string",
|
|
605
|
+
const $ = (e) => typeof e[0] != "string", ke = (e) => typeof e == "string", q = (e) => ke(e) ? e : e.key, vn = ({
|
|
599
606
|
variant: e = "single",
|
|
600
607
|
...n
|
|
601
|
-
}) => e === "single" ? /* @__PURE__ */ t(
|
|
608
|
+
}) => e === "single" ? /* @__PURE__ */ t(gn, { ...n }) : /* @__PURE__ */ t(yn, { ...n, variant: e }), ur = ({
|
|
602
609
|
labelOn: e,
|
|
603
610
|
stringify: n,
|
|
604
611
|
defaultValue: r,
|
|
605
|
-
labelIcon:
|
|
606
|
-
...
|
|
612
|
+
labelIcon: a,
|
|
613
|
+
...l
|
|
607
614
|
}) => {
|
|
608
615
|
const s = r ?? (n ? "false" : !1), { control: c } = te();
|
|
609
616
|
return /* @__PURE__ */ t(
|
|
610
617
|
_,
|
|
611
618
|
{
|
|
612
619
|
hasNoPaddingTop: !0,
|
|
613
|
-
name:
|
|
614
|
-
isRequired:
|
|
615
|
-
label:
|
|
616
|
-
labelIcon:
|
|
620
|
+
name: l.name,
|
|
621
|
+
isRequired: l.rules?.required === !0,
|
|
622
|
+
label: l.label,
|
|
623
|
+
labelIcon: a,
|
|
617
624
|
children: /* @__PURE__ */ t(
|
|
618
625
|
U,
|
|
619
626
|
{
|
|
620
627
|
control: c,
|
|
621
|
-
name:
|
|
628
|
+
name: l.name,
|
|
622
629
|
defaultValue: s,
|
|
623
|
-
render: ({ field: { onChange: o, value:
|
|
630
|
+
render: ({ field: { onChange: o, value: m } }) => /* @__PURE__ */ t(
|
|
624
631
|
ut,
|
|
625
632
|
{
|
|
626
|
-
...
|
|
627
|
-
id:
|
|
628
|
-
"data-testid":
|
|
633
|
+
...l,
|
|
634
|
+
id: l.name,
|
|
635
|
+
"data-testid": l.name,
|
|
629
636
|
label: e,
|
|
630
|
-
isChecked: n ?
|
|
631
|
-
onChange: (
|
|
632
|
-
const
|
|
633
|
-
|
|
637
|
+
isChecked: n ? m === "true" : m,
|
|
638
|
+
onChange: (f, h) => {
|
|
639
|
+
const d = n ? h.toString() : h;
|
|
640
|
+
l.onChange?.(f, h), o(d);
|
|
634
641
|
}
|
|
635
642
|
}
|
|
636
643
|
)
|
|
@@ -638,8 +645,8 @@ const $ = (e) => typeof e[0] != "string", ke = (e) => typeof e == "string", B =
|
|
|
638
645
|
)
|
|
639
646
|
}
|
|
640
647
|
);
|
|
641
|
-
},
|
|
642
|
-
const n = !!e.rules?.required, r = e.defaultValue ?? "", { field:
|
|
648
|
+
}, hr = (e) => {
|
|
649
|
+
const n = !!e.rules?.required, r = e.defaultValue ?? "", { field: a, fieldState: l } = Ie({
|
|
643
650
|
...e,
|
|
644
651
|
defaultValue: r
|
|
645
652
|
});
|
|
@@ -650,60 +657,60 @@ const $ = (e) => typeof e[0] != "string", ke = (e) => typeof e == "string", B =
|
|
|
650
657
|
label: e.label,
|
|
651
658
|
labelIcon: e.labelIcon,
|
|
652
659
|
name: e.name,
|
|
653
|
-
error:
|
|
660
|
+
error: l.error,
|
|
654
661
|
children: /* @__PURE__ */ t(
|
|
655
662
|
_e,
|
|
656
663
|
{
|
|
657
664
|
isRequired: n,
|
|
658
665
|
id: e.name,
|
|
659
666
|
"data-testid": e.name,
|
|
660
|
-
validated:
|
|
667
|
+
validated: l.error ? M.error : M.default,
|
|
661
668
|
isDisabled: e.isDisabled,
|
|
662
|
-
...
|
|
669
|
+
...a
|
|
663
670
|
}
|
|
664
671
|
)
|
|
665
672
|
}
|
|
666
673
|
);
|
|
667
|
-
},
|
|
668
|
-
const { labelIcon: n,
|
|
674
|
+
}, mr = (e) => {
|
|
675
|
+
const { labelIcon: n, helperText: r, ...a } = e, l = !!e.rules?.required, i = e.defaultValue ?? "", { field: s, fieldState: c } = Ie({
|
|
669
676
|
...e,
|
|
670
|
-
defaultValue:
|
|
677
|
+
defaultValue: i
|
|
671
678
|
});
|
|
672
|
-
return /* @__PURE__ */
|
|
679
|
+
return /* @__PURE__ */ b(
|
|
673
680
|
_,
|
|
674
681
|
{
|
|
675
682
|
name: e.name,
|
|
676
683
|
label: e.label,
|
|
677
684
|
labelIcon: n,
|
|
678
685
|
isRequired: l,
|
|
679
|
-
error:
|
|
686
|
+
error: c.error,
|
|
680
687
|
children: [
|
|
681
688
|
/* @__PURE__ */ t(
|
|
682
689
|
Q,
|
|
683
690
|
{
|
|
684
691
|
isRequired: l,
|
|
685
692
|
id: e.name,
|
|
686
|
-
"data-testid": e.name,
|
|
687
|
-
validated:
|
|
693
|
+
"data-testid": e["data-testid"] || e.name,
|
|
694
|
+
validated: c.error ? M.error : M.default,
|
|
688
695
|
isDisabled: e.isDisabled,
|
|
689
|
-
...
|
|
690
|
-
...
|
|
696
|
+
...a,
|
|
697
|
+
...s
|
|
691
698
|
}
|
|
692
699
|
),
|
|
693
|
-
|
|
700
|
+
r && /* @__PURE__ */ t(ue, { children: /* @__PURE__ */ t(he, { children: /* @__PURE__ */ t(me, { children: r }) }) })
|
|
694
701
|
]
|
|
695
702
|
}
|
|
696
703
|
);
|
|
697
|
-
},
|
|
698
|
-
const n =
|
|
704
|
+
}, bn = _e, pr = ({ icon: e }) => {
|
|
705
|
+
const n = Cn(e);
|
|
699
706
|
return /* @__PURE__ */ t(ie, { size: "lg", children: /* @__PURE__ */ t(n, { alt: e }) });
|
|
700
707
|
};
|
|
701
|
-
function
|
|
708
|
+
function Cn(e) {
|
|
702
709
|
switch (e) {
|
|
703
710
|
case "github":
|
|
704
|
-
return Kt;
|
|
705
|
-
case "facebook":
|
|
706
711
|
return Wt;
|
|
712
|
+
case "facebook":
|
|
713
|
+
return Kt;
|
|
707
714
|
case "gitlab":
|
|
708
715
|
return Gt;
|
|
709
716
|
case "google":
|
|
@@ -717,11 +724,11 @@ function bn(e) {
|
|
|
717
724
|
case "stackoverflow":
|
|
718
725
|
return _t;
|
|
719
726
|
case "twitter":
|
|
720
|
-
return Lt;
|
|
721
|
-
case "microsoft":
|
|
722
727
|
return Bt;
|
|
723
|
-
case "
|
|
728
|
+
case "microsoft":
|
|
724
729
|
return qt;
|
|
730
|
+
case "bitbucket":
|
|
731
|
+
return Lt;
|
|
725
732
|
case "instagram":
|
|
726
733
|
return Nt;
|
|
727
734
|
case "paypal":
|
|
@@ -730,76 +737,76 @@ function bn(e) {
|
|
|
730
737
|
return Vt;
|
|
731
738
|
}
|
|
732
739
|
}
|
|
733
|
-
const
|
|
734
|
-
title:
|
|
740
|
+
const In = "_title_180i0_2", kn = {
|
|
741
|
+
title: In
|
|
735
742
|
}, Ye = ({
|
|
736
743
|
id: e,
|
|
737
744
|
title: n,
|
|
738
745
|
headingLevel: r = "h1",
|
|
739
|
-
size:
|
|
740
|
-
...
|
|
746
|
+
size: a = "xl",
|
|
747
|
+
...l
|
|
741
748
|
}) => /* @__PURE__ */ t(
|
|
742
749
|
ht,
|
|
743
750
|
{
|
|
744
751
|
headingLevel: r,
|
|
745
|
-
size:
|
|
746
|
-
className:
|
|
752
|
+
size: a,
|
|
753
|
+
className: kn.title,
|
|
747
754
|
id: e,
|
|
748
755
|
tabIndex: 0,
|
|
749
|
-
...
|
|
756
|
+
...l,
|
|
750
757
|
children: n
|
|
751
758
|
}
|
|
752
|
-
),
|
|
759
|
+
), xn = ({
|
|
753
760
|
title: e,
|
|
754
761
|
children: n,
|
|
755
762
|
scrollId: r,
|
|
756
|
-
className:
|
|
763
|
+
className: a
|
|
757
764
|
}) => {
|
|
758
|
-
const
|
|
759
|
-
return /* @__PURE__ */
|
|
765
|
+
const l = Ft();
|
|
766
|
+
return /* @__PURE__ */ b(mt, { id: l, className: a, isFlat: !0, children: [
|
|
760
767
|
/* @__PURE__ */ t(pt, { className: "kc-form-panel__header", children: /* @__PURE__ */ t(ft, { tabIndex: 0, children: /* @__PURE__ */ t(Ye, { id: r, title: e }) }) }),
|
|
761
768
|
/* @__PURE__ */ t(gt, { className: "kc-form-panel__body", children: n })
|
|
762
769
|
] });
|
|
763
|
-
},
|
|
764
|
-
const { title: n, children: r, scrollId:
|
|
765
|
-
return /* @__PURE__ */ t("section", { ...
|
|
766
|
-
/* @__PURE__ */ t(Ye, { id:
|
|
770
|
+
}, wn = (e) => {
|
|
771
|
+
const { title: n, children: r, scrollId: a, ...l } = e;
|
|
772
|
+
return /* @__PURE__ */ t("section", { ...l, style: { marginTop: "var(--pf-v5-global--spacer--lg)" }, children: /* @__PURE__ */ b(Y, { children: [
|
|
773
|
+
/* @__PURE__ */ t(Ye, { id: a, title: n }),
|
|
767
774
|
r
|
|
768
775
|
] }) });
|
|
769
|
-
},
|
|
770
|
-
panel:
|
|
771
|
-
sticky:
|
|
772
|
-
},
|
|
776
|
+
}, An = "_panel_1cdve_1", Tn = "_sticky_1cdve_5", Se = {
|
|
777
|
+
panel: An,
|
|
778
|
+
sticky: Tn
|
|
779
|
+
}, Sn = "kc-main-content-page-container", Oe = (e) => e.replace(/\s+/g, "-"), On = ({
|
|
773
780
|
label: e,
|
|
774
781
|
sections: n,
|
|
775
782
|
borders: r = !1,
|
|
776
|
-
...
|
|
783
|
+
...a
|
|
777
784
|
}) => {
|
|
778
|
-
const
|
|
785
|
+
const l = D(
|
|
779
786
|
() => n.filter(({ isHidden: i }) => !i),
|
|
780
787
|
[n]
|
|
781
788
|
);
|
|
782
|
-
return /* @__PURE__ */
|
|
783
|
-
/* @__PURE__ */ t(xe, { md: 8, sm: 12, children:
|
|
789
|
+
return /* @__PURE__ */ b(yt, { hasGutter: !0, ...a, children: [
|
|
790
|
+
/* @__PURE__ */ t(xe, { md: 8, sm: 12, children: l.map(({ title: i, panel: s }) => {
|
|
784
791
|
const c = Oe(i.toLowerCase());
|
|
785
792
|
return /* @__PURE__ */ t(Ue, { children: r ? /* @__PURE__ */ t(
|
|
786
|
-
|
|
793
|
+
xn,
|
|
787
794
|
{
|
|
788
795
|
scrollId: c,
|
|
789
796
|
title: i,
|
|
790
797
|
className: Se.panel,
|
|
791
798
|
children: s
|
|
792
799
|
}
|
|
793
|
-
) : /* @__PURE__ */ t(
|
|
800
|
+
) : /* @__PURE__ */ t(wn, { scrollId: c, title: i, children: s }) }, i);
|
|
794
801
|
}) }),
|
|
795
802
|
/* @__PURE__ */ t(xe, { md: 4, sm: 12, order: { default: "-1", md: "1" }, children: /* @__PURE__ */ t(vt, { className: Se.sticky, children: /* @__PURE__ */ t(
|
|
796
803
|
bt,
|
|
797
804
|
{
|
|
798
805
|
isVertical: !0,
|
|
799
|
-
scrollableSelector: `#${
|
|
806
|
+
scrollableSelector: `#${Sn}`,
|
|
800
807
|
label: e,
|
|
801
808
|
offset: 100,
|
|
802
|
-
children:
|
|
809
|
+
children: l.map(({ title: i }) => {
|
|
803
810
|
const s = Oe(i.toLowerCase());
|
|
804
811
|
return (
|
|
805
812
|
// note that JumpLinks currently does not work with spaces in the href
|
|
@@ -817,23 +824,23 @@ const Cn = "_title_180i0_2", In = {
|
|
|
817
824
|
}
|
|
818
825
|
) }) })
|
|
819
826
|
] });
|
|
820
|
-
},
|
|
827
|
+
}, Fn = (e, n, r) => (e.isValid || r) && (e.isDirty || n) && !e.isLoading && !e.isValidating && !e.isSubmitting, fr = ({
|
|
821
828
|
formState: e,
|
|
822
829
|
isDisabled: n = !1,
|
|
823
830
|
allowInvalid: r = !1,
|
|
824
|
-
allowNonDirty:
|
|
825
|
-
children:
|
|
831
|
+
allowNonDirty: a = !1,
|
|
832
|
+
children: l,
|
|
826
833
|
...i
|
|
827
834
|
}) => /* @__PURE__ */ t(
|
|
828
|
-
|
|
835
|
+
P,
|
|
829
836
|
{
|
|
830
837
|
variant: "primary",
|
|
831
|
-
isDisabled: e && !
|
|
838
|
+
isDisabled: e && !Fn(e, a, r) || n,
|
|
832
839
|
...i,
|
|
833
840
|
type: "submit",
|
|
834
|
-
children:
|
|
841
|
+
children: l
|
|
835
842
|
}
|
|
836
|
-
),
|
|
843
|
+
), Rn = (e) => {
|
|
837
844
|
try {
|
|
838
845
|
return new Intl.DisplayNames([e], { type: "language" }).of(e);
|
|
839
846
|
} catch {
|
|
@@ -843,40 +850,40 @@ const Cn = "_title_180i0_2", In = {
|
|
|
843
850
|
t: e,
|
|
844
851
|
form: n,
|
|
845
852
|
supportedLocales: r,
|
|
846
|
-
currentLocale:
|
|
853
|
+
currentLocale: a
|
|
847
854
|
}) => {
|
|
848
|
-
const
|
|
855
|
+
const l = D(
|
|
849
856
|
() => r.map((i) => ({
|
|
850
857
|
key: i,
|
|
851
|
-
value: e(`locale_${i}`,
|
|
852
|
-
})).sort((i, s) => i.value.localeCompare(s.value,
|
|
853
|
-
[r,
|
|
858
|
+
value: e(`locale_${i}`, Rn(i) ?? i)
|
|
859
|
+
})).sort((i, s) => i.value.localeCompare(s.value, a)),
|
|
860
|
+
[r, a, e]
|
|
854
861
|
);
|
|
855
|
-
return
|
|
856
|
-
|
|
862
|
+
return l.length ? /* @__PURE__ */ t(Yt, { ...n, children: /* @__PURE__ */ t(
|
|
863
|
+
vn,
|
|
857
864
|
{
|
|
858
865
|
"data-testid": "locale-select",
|
|
859
866
|
name: "attributes.locale",
|
|
860
867
|
label: e("selectALocale"),
|
|
861
868
|
controller: { defaultValue: "" },
|
|
862
|
-
options:
|
|
863
|
-
variant:
|
|
869
|
+
options: l,
|
|
870
|
+
variant: l.length >= 10 ? "typeahead" : "single"
|
|
864
871
|
}
|
|
865
872
|
) }) : null;
|
|
866
|
-
}, Qe = (e) => e?.includes("${"), Xe = (e) => e.substring(2, e.length - 1),
|
|
867
|
-
|
|
868
|
-
"
|
|
869
|
-
)}`,
|
|
870
|
-
function
|
|
871
|
-
(e.responseData.errors !== void 0 ? e.responseData.errors : [e.responseData]).forEach((
|
|
872
|
-
const
|
|
873
|
+
}, Qe = (e) => e?.includes("${"), Xe = (e) => e.substring(2, e.length - 1), B = (e, n, r, a) => {
|
|
874
|
+
const l = n || r, i = Qe(l) ? Xe(l) : l, s = a ? `${a}.${i}` : i;
|
|
875
|
+
return e(s || "");
|
|
876
|
+
}, ce = (e, n) => B(e, n.displayName, n.name), Pn = ["username", "firstName", "lastName", "email"], Ze = (e) => e && Pn.includes(e), N = (e) => `${Ze(e) ? "" : "attributes."}${e?.replaceAll(".", "🍺")}`, gr = (e) => e.replaceAll(".", "🍺"), yr = (e) => e.replaceAll("🍺", ".");
|
|
877
|
+
function vr(e, n, r) {
|
|
878
|
+
(e.responseData.errors !== void 0 ? e.responseData.errors : [e.responseData]).forEach((a) => {
|
|
879
|
+
const l = Object.assign(
|
|
873
880
|
{},
|
|
874
|
-
|
|
881
|
+
a.params?.map((i) => r(Qe(i.toString()) ? Xe(i) : i))
|
|
875
882
|
);
|
|
876
|
-
n(N(
|
|
877
|
-
message: r(
|
|
878
|
-
...
|
|
879
|
-
defaultValue:
|
|
883
|
+
n(N(a.field), {
|
|
884
|
+
message: r(a.errorMessage, {
|
|
885
|
+
...l,
|
|
886
|
+
defaultValue: a.errorMessage || a.field
|
|
880
887
|
}),
|
|
881
888
|
type: "server"
|
|
882
889
|
});
|
|
@@ -891,7 +898,7 @@ function ne({
|
|
|
891
898
|
function Dn(e) {
|
|
892
899
|
return e && "length" in e && "min" in e.length && typeof e.length.min == "number" ? e.length.min > 0 : !1;
|
|
893
900
|
}
|
|
894
|
-
function
|
|
901
|
+
function br(e) {
|
|
895
902
|
if (typeof e != "object" || e === null || !("responseData" in e))
|
|
896
903
|
return !1;
|
|
897
904
|
const { responseData: n } = e;
|
|
@@ -900,20 +907,20 @@ function vr(e) {
|
|
|
900
907
|
function Fe(e) {
|
|
901
908
|
return !(typeof e != "object" || e === null || !("field" in e) || typeof e.field != "string" || !("errorMessage" in e) || typeof e.errorMessage != "string");
|
|
902
909
|
}
|
|
903
|
-
const
|
|
910
|
+
const W = ({
|
|
904
911
|
t: e,
|
|
905
912
|
form: n,
|
|
906
913
|
attribute: r,
|
|
907
|
-
renderer:
|
|
908
|
-
children:
|
|
914
|
+
renderer: a,
|
|
915
|
+
children: l
|
|
909
916
|
}) => {
|
|
910
|
-
const i =
|
|
917
|
+
const i = B(
|
|
911
918
|
e,
|
|
912
919
|
r.annotations?.inputHelperTextBefore
|
|
913
920
|
), {
|
|
914
921
|
formState: { errors: s }
|
|
915
|
-
} = n, c =
|
|
916
|
-
return /* @__PURE__ */
|
|
922
|
+
} = n, c = a?.(r), o = G(s, N(r.name));
|
|
923
|
+
return /* @__PURE__ */ b(
|
|
917
924
|
Ve,
|
|
918
925
|
{
|
|
919
926
|
label: ce(e, r) || "",
|
|
@@ -921,10 +928,10 @@ const K = ({
|
|
|
921
928
|
isRequired: ne(r),
|
|
922
929
|
labelIcon: i ? /* @__PURE__ */ t(ze, { helpText: i, fieldLabelId: r.name }) : void 0,
|
|
923
930
|
children: [
|
|
924
|
-
c ? /* @__PURE__ */
|
|
925
|
-
|
|
931
|
+
c ? /* @__PURE__ */ b(pe, { children: [
|
|
932
|
+
l,
|
|
926
933
|
c
|
|
927
|
-
] }) :
|
|
934
|
+
] }) : l,
|
|
928
935
|
o && /* @__PURE__ */ t(
|
|
929
936
|
je,
|
|
930
937
|
{
|
|
@@ -936,14 +943,14 @@ const K = ({
|
|
|
936
943
|
},
|
|
937
944
|
r.name
|
|
938
945
|
);
|
|
939
|
-
},
|
|
946
|
+
}, Vn = ({
|
|
940
947
|
t: e,
|
|
941
948
|
form: n,
|
|
942
949
|
attribute: r,
|
|
943
|
-
renderer:
|
|
944
|
-
...
|
|
945
|
-
}) => /* @__PURE__ */ t(
|
|
946
|
-
|
|
950
|
+
renderer: a,
|
|
951
|
+
...l
|
|
952
|
+
}) => /* @__PURE__ */ t(W, { t: e, form: n, attribute: r, renderer: a, children: /* @__PURE__ */ t(
|
|
953
|
+
Mn,
|
|
947
954
|
{
|
|
948
955
|
t: e,
|
|
949
956
|
form: n,
|
|
@@ -952,57 +959,57 @@ const K = ({
|
|
|
952
959
|
addButtonLabel: e("addMultivaluedLabel", {
|
|
953
960
|
fieldLabel: ce(e, r)
|
|
954
961
|
}),
|
|
955
|
-
...
|
|
962
|
+
...l
|
|
956
963
|
}
|
|
957
|
-
) }),
|
|
964
|
+
) }), Mn = ({
|
|
958
965
|
t: e,
|
|
959
966
|
name: n,
|
|
960
967
|
inputType: r,
|
|
961
|
-
form:
|
|
962
|
-
addButtonLabel:
|
|
968
|
+
form: a,
|
|
969
|
+
addButtonLabel: l,
|
|
963
970
|
isDisabled: i = !1,
|
|
964
971
|
defaultValue: s,
|
|
965
972
|
id: c,
|
|
966
973
|
...o
|
|
967
974
|
}) => {
|
|
968
|
-
const { register:
|
|
975
|
+
const { register: m, setValue: f, control: h } = a, d = Qt({
|
|
969
976
|
name: n,
|
|
970
|
-
control:
|
|
977
|
+
control: h,
|
|
971
978
|
defaultValue: s || ""
|
|
972
|
-
}), u =
|
|
973
|
-
|
|
974
|
-
},
|
|
975
|
-
|
|
976
|
-
},
|
|
977
|
-
|
|
978
|
-
},
|
|
979
|
-
const
|
|
980
|
-
|
|
979
|
+
}), u = D(() => Array.isArray(d) && d.length !== 0 ? d : s || [""], [d]), k = (v) => {
|
|
980
|
+
y([...u.slice(0, v), ...u.slice(v + 1)]);
|
|
981
|
+
}, x = () => {
|
|
982
|
+
y([...u, ""]);
|
|
983
|
+
}, g = (v, C) => {
|
|
984
|
+
y([...u.slice(0, v), C, ...u.slice(v + 1)]);
|
|
985
|
+
}, y = (v) => {
|
|
986
|
+
const C = v.flatMap((L) => L);
|
|
987
|
+
f(n, C, {
|
|
981
988
|
shouldDirty: !0
|
|
982
989
|
});
|
|
983
|
-
},
|
|
990
|
+
}, O = r.startsWith("html") ? r.substring(6) : "text";
|
|
984
991
|
return be(() => {
|
|
985
|
-
|
|
986
|
-
}, [
|
|
987
|
-
/* @__PURE__ */
|
|
992
|
+
m(n);
|
|
993
|
+
}, [m]), /* @__PURE__ */ t("div", { id: c, children: u.map((v, C) => /* @__PURE__ */ b(Ue, { children: [
|
|
994
|
+
/* @__PURE__ */ b(pe, { children: [
|
|
988
995
|
/* @__PURE__ */ t(se, { isFill: !0, children: /* @__PURE__ */ t(
|
|
989
996
|
Q,
|
|
990
997
|
{
|
|
991
|
-
"data-testid": n +
|
|
992
|
-
onChange: (
|
|
993
|
-
name: `${n}.${
|
|
994
|
-
value:
|
|
998
|
+
"data-testid": n + C,
|
|
999
|
+
onChange: (L, p) => g(C, p),
|
|
1000
|
+
name: `${n}.${C}.value`,
|
|
1001
|
+
value: v,
|
|
995
1002
|
isDisabled: i,
|
|
996
|
-
type:
|
|
1003
|
+
type: O,
|
|
997
1004
|
...o
|
|
998
1005
|
}
|
|
999
1006
|
) }),
|
|
1000
1007
|
/* @__PURE__ */ t(se, { children: /* @__PURE__ */ t(
|
|
1001
|
-
|
|
1008
|
+
P,
|
|
1002
1009
|
{
|
|
1003
|
-
"data-testid": "remove" +
|
|
1010
|
+
"data-testid": "remove" + C,
|
|
1004
1011
|
variant: we.link,
|
|
1005
|
-
onClick: () =>
|
|
1012
|
+
onClick: () => k(C),
|
|
1006
1013
|
tabIndex: -1,
|
|
1007
1014
|
"aria-label": e("remove"),
|
|
1008
1015
|
isDisabled: u.length === 1 || i,
|
|
@@ -1010,136 +1017,136 @@ const K = ({
|
|
|
1010
1017
|
}
|
|
1011
1018
|
) })
|
|
1012
1019
|
] }),
|
|
1013
|
-
|
|
1014
|
-
|
|
1020
|
+
C === u.length - 1 && /* @__PURE__ */ b(
|
|
1021
|
+
P,
|
|
1015
1022
|
{
|
|
1016
1023
|
variant: we.link,
|
|
1017
|
-
onClick:
|
|
1024
|
+
onClick: x,
|
|
1018
1025
|
tabIndex: -1,
|
|
1019
1026
|
"aria-label": e("add"),
|
|
1020
1027
|
"data-testid": "addValue",
|
|
1021
|
-
isDisabled: !
|
|
1028
|
+
isDisabled: !v || i,
|
|
1022
1029
|
children: [
|
|
1023
1030
|
/* @__PURE__ */ t(zt, {}),
|
|
1024
1031
|
" ",
|
|
1025
|
-
e(
|
|
1032
|
+
e(l || "add")
|
|
1026
1033
|
]
|
|
1027
1034
|
}
|
|
1028
1035
|
)
|
|
1029
|
-
] },
|
|
1030
|
-
},
|
|
1031
|
-
const { form: n, inputType: r, attribute:
|
|
1032
|
-
return /* @__PURE__ */ t(
|
|
1036
|
+
] }, C)) });
|
|
1037
|
+
}, Re = (e) => {
|
|
1038
|
+
const { form: n, inputType: r, attribute: a } = e, l = ne(a), i = r.startsWith("multiselect"), s = i ? It : kt, c = a.validators?.options?.options || [], o = a.annotations?.inputOptionLabels || {}, m = a.annotations?.inputOptionLabelsI18nPrefix;
|
|
1039
|
+
return /* @__PURE__ */ t(W, { ...e, children: /* @__PURE__ */ t(
|
|
1033
1040
|
U,
|
|
1034
1041
|
{
|
|
1035
|
-
name: N(
|
|
1042
|
+
name: N(a.name),
|
|
1036
1043
|
control: n.control,
|
|
1037
1044
|
defaultValue: "",
|
|
1038
|
-
render: ({ field:
|
|
1045
|
+
render: ({ field: f }) => /* @__PURE__ */ t(Y, { children: c.map((h) => /* @__PURE__ */ t(
|
|
1039
1046
|
s,
|
|
1040
1047
|
{
|
|
1041
|
-
id:
|
|
1042
|
-
"data-testid":
|
|
1043
|
-
label:
|
|
1044
|
-
value:
|
|
1045
|
-
isChecked:
|
|
1048
|
+
id: h,
|
|
1049
|
+
"data-testid": h,
|
|
1050
|
+
label: B(e.t, o[h], h, m),
|
|
1051
|
+
value: h,
|
|
1052
|
+
isChecked: f.value.includes(h),
|
|
1046
1053
|
onChange: () => {
|
|
1047
|
-
i ?
|
|
1048
|
-
|
|
1049
|
-
) :
|
|
1054
|
+
i ? f.value.includes(h) ? f.onChange(
|
|
1055
|
+
f.value.filter((d) => d !== h)
|
|
1056
|
+
) : f.onChange([...f.value, h]) : f.onChange([h]);
|
|
1050
1057
|
},
|
|
1051
|
-
readOnly:
|
|
1052
|
-
isRequired:
|
|
1058
|
+
readOnly: a.readOnly,
|
|
1059
|
+
isRequired: l
|
|
1053
1060
|
},
|
|
1054
|
-
|
|
1061
|
+
h
|
|
1055
1062
|
)) })
|
|
1056
1063
|
}
|
|
1057
1064
|
) });
|
|
1058
|
-
},
|
|
1065
|
+
}, Nn = ({
|
|
1059
1066
|
toggleId: e,
|
|
1060
1067
|
onToggle: n,
|
|
1061
1068
|
onSelect: r,
|
|
1062
|
-
selections:
|
|
1063
|
-
isOpen:
|
|
1069
|
+
selections: a,
|
|
1070
|
+
isOpen: l,
|
|
1064
1071
|
menuAppendTo: i,
|
|
1065
1072
|
direction: s,
|
|
1066
1073
|
width: c,
|
|
1067
1074
|
maxHeight: o,
|
|
1068
|
-
toggleIcon:
|
|
1069
|
-
className:
|
|
1070
|
-
children:
|
|
1071
|
-
...
|
|
1075
|
+
toggleIcon: m,
|
|
1076
|
+
className: f,
|
|
1077
|
+
children: h,
|
|
1078
|
+
...d
|
|
1072
1079
|
}) => {
|
|
1073
|
-
const [u,
|
|
1074
|
-
|
|
1075
|
-
},
|
|
1076
|
-
|
|
1080
|
+
const [u, k] = S(!1), x = ee(), g = () => {
|
|
1081
|
+
k(!u), n(!u);
|
|
1082
|
+
}, y = () => i === "parent" && x.current?.parentElement || "inline", O = $e.toArray(
|
|
1083
|
+
h
|
|
1077
1084
|
);
|
|
1078
1085
|
return /* @__PURE__ */ t(
|
|
1079
1086
|
X,
|
|
1080
1087
|
{
|
|
1081
|
-
ref:
|
|
1088
|
+
ref: x,
|
|
1082
1089
|
maxMenuHeight: J(o),
|
|
1083
1090
|
isScrollable: !0,
|
|
1084
1091
|
popperProps: {
|
|
1085
|
-
appendTo:
|
|
1092
|
+
appendTo: y(),
|
|
1086
1093
|
direction: s,
|
|
1087
1094
|
width: J(c)
|
|
1088
1095
|
},
|
|
1089
|
-
...
|
|
1090
|
-
onClick:
|
|
1091
|
-
onOpenChange: () =>
|
|
1092
|
-
selected:
|
|
1093
|
-
onSelect: (
|
|
1094
|
-
r?.(
|
|
1096
|
+
...d,
|
|
1097
|
+
onClick: g,
|
|
1098
|
+
onOpenChange: (v) => k(v),
|
|
1099
|
+
selected: a,
|
|
1100
|
+
onSelect: (v, C) => {
|
|
1101
|
+
r?.(C || ""), g();
|
|
1095
1102
|
},
|
|
1096
|
-
toggle: (
|
|
1097
|
-
|
|
1103
|
+
toggle: (v) => /* @__PURE__ */ t(
|
|
1104
|
+
K,
|
|
1098
1105
|
{
|
|
1099
1106
|
id: e,
|
|
1100
|
-
ref:
|
|
1101
|
-
className:
|
|
1102
|
-
onClick:
|
|
1103
|
-
isExpanded:
|
|
1104
|
-
"aria-label":
|
|
1105
|
-
icon:
|
|
1107
|
+
ref: v,
|
|
1108
|
+
className: f,
|
|
1109
|
+
onClick: g,
|
|
1110
|
+
isExpanded: l,
|
|
1111
|
+
"aria-label": d["aria-label"],
|
|
1112
|
+
icon: m,
|
|
1106
1113
|
isFullWidth: !0,
|
|
1107
|
-
children:
|
|
1114
|
+
children: O.find((C) => C.props.value === a)?.props.children || a || d["aria-label"]
|
|
1108
1115
|
}
|
|
1109
1116
|
),
|
|
1110
|
-
isOpen:
|
|
1111
|
-
children: /* @__PURE__ */ t(Z, { children:
|
|
1117
|
+
isOpen: l,
|
|
1118
|
+
children: /* @__PURE__ */ t(Z, { children: h })
|
|
1112
1119
|
}
|
|
1113
1120
|
);
|
|
1114
|
-
},
|
|
1121
|
+
}, Ln = ({
|
|
1115
1122
|
toggleId: e,
|
|
1116
1123
|
onSelect: n,
|
|
1117
1124
|
onToggle: r,
|
|
1118
|
-
onFilter:
|
|
1119
|
-
variant:
|
|
1125
|
+
onFilter: a,
|
|
1126
|
+
variant: l,
|
|
1120
1127
|
validated: i,
|
|
1121
1128
|
placeholderText: s,
|
|
1122
1129
|
maxHeight: c,
|
|
1123
1130
|
width: o,
|
|
1124
|
-
toggleIcon:
|
|
1125
|
-
direction:
|
|
1126
|
-
selections:
|
|
1127
|
-
typeAheadAriaLabel:
|
|
1131
|
+
toggleIcon: m,
|
|
1132
|
+
direction: f,
|
|
1133
|
+
selections: h,
|
|
1134
|
+
typeAheadAriaLabel: d,
|
|
1128
1135
|
chipGroupComponent: u,
|
|
1129
|
-
chipGroupProps:
|
|
1130
|
-
footer:
|
|
1131
|
-
children:
|
|
1132
|
-
...
|
|
1136
|
+
chipGroupProps: k,
|
|
1137
|
+
footer: x,
|
|
1138
|
+
children: g,
|
|
1139
|
+
...y
|
|
1133
1140
|
}) => {
|
|
1134
|
-
const [
|
|
1135
|
-
|
|
1141
|
+
const [O, v] = S(""), [C, L] = S(0), p = ee(), I = $e.toArray(
|
|
1142
|
+
g
|
|
1136
1143
|
), A = () => {
|
|
1137
|
-
r?.(!
|
|
1138
|
-
},
|
|
1139
|
-
const
|
|
1140
|
-
switch (r?.(!0),
|
|
1144
|
+
r?.(!y.isOpen);
|
|
1145
|
+
}, w = (T) => {
|
|
1146
|
+
const F = I[C];
|
|
1147
|
+
switch (r?.(!0), T.key) {
|
|
1141
1148
|
case "Enter": {
|
|
1142
|
-
|
|
1149
|
+
T.preventDefault(), l !== V.typeaheadMulti ? v(F.props.value) : v(""), n?.(F.props.value), r?.(!1), L(0);
|
|
1143
1150
|
break;
|
|
1144
1151
|
}
|
|
1145
1152
|
case "Escape": {
|
|
@@ -1147,73 +1154,73 @@ const K = ({
|
|
|
1147
1154
|
break;
|
|
1148
1155
|
}
|
|
1149
1156
|
case "Backspace": {
|
|
1150
|
-
|
|
1157
|
+
l === V.typeahead && n?.("");
|
|
1151
1158
|
break;
|
|
1152
1159
|
}
|
|
1153
1160
|
case "ArrowUp":
|
|
1154
1161
|
case "ArrowDown": {
|
|
1155
|
-
|
|
1156
|
-
let
|
|
1157
|
-
|
|
1162
|
+
T.preventDefault();
|
|
1163
|
+
let R = 0;
|
|
1164
|
+
T.key === "ArrowUp" && (C === 0 ? R = I.length - 1 : R = C - 1), T.key === "ArrowDown" && (C === I.length - 1 ? R = 0 : R = C + 1), L(R);
|
|
1158
1165
|
break;
|
|
1159
1166
|
}
|
|
1160
1167
|
}
|
|
1161
1168
|
};
|
|
1162
|
-
return /* @__PURE__ */
|
|
1169
|
+
return /* @__PURE__ */ b(
|
|
1163
1170
|
X,
|
|
1164
1171
|
{
|
|
1165
|
-
...
|
|
1172
|
+
...y,
|
|
1166
1173
|
onClick: A,
|
|
1167
|
-
onOpenChange: () => r?.(
|
|
1168
|
-
onSelect: (
|
|
1174
|
+
onOpenChange: (T) => r?.(T),
|
|
1175
|
+
onSelect: (T, F) => n?.(F || ""),
|
|
1169
1176
|
maxMenuHeight: J(c),
|
|
1170
|
-
popperProps: { direction:
|
|
1171
|
-
toggle: (
|
|
1172
|
-
|
|
1177
|
+
popperProps: { direction: f, width: J(o) },
|
|
1178
|
+
toggle: (T) => /* @__PURE__ */ t(
|
|
1179
|
+
K,
|
|
1173
1180
|
{
|
|
1174
|
-
ref:
|
|
1181
|
+
ref: T,
|
|
1175
1182
|
id: e,
|
|
1176
1183
|
variant: "typeahead",
|
|
1177
1184
|
onClick: () => r?.(!0),
|
|
1178
|
-
icon:
|
|
1179
|
-
isExpanded:
|
|
1185
|
+
icon: m,
|
|
1186
|
+
isExpanded: y.isOpen,
|
|
1180
1187
|
isFullWidth: !0,
|
|
1181
1188
|
status: i === "error" ? fe.danger : void 0,
|
|
1182
|
-
children: /* @__PURE__ */
|
|
1189
|
+
children: /* @__PURE__ */ b(Me, { isPlain: !0, children: [
|
|
1183
1190
|
/* @__PURE__ */ t(
|
|
1184
1191
|
Ne,
|
|
1185
1192
|
{
|
|
1186
1193
|
placeholder: s,
|
|
1187
|
-
value:
|
|
1194
|
+
value: l === V.typeahead && h ? h : O,
|
|
1188
1195
|
onClick: A,
|
|
1189
|
-
onChange: (
|
|
1190
|
-
|
|
1196
|
+
onChange: (F, R) => {
|
|
1197
|
+
v(R), a?.(R);
|
|
1191
1198
|
},
|
|
1192
|
-
onKeyDown: (
|
|
1199
|
+
onKeyDown: (F) => w(F),
|
|
1193
1200
|
autoComplete: "off",
|
|
1194
1201
|
innerRef: p,
|
|
1195
1202
|
role: "combobox",
|
|
1196
|
-
isExpanded:
|
|
1203
|
+
isExpanded: y.isOpen,
|
|
1197
1204
|
"aria-controls": "select-typeahead-listbox",
|
|
1198
|
-
"aria-label":
|
|
1199
|
-
children:
|
|
1200
|
-
|
|
1205
|
+
"aria-label": d,
|
|
1206
|
+
children: l === V.typeaheadMulti && Array.isArray(h) && (u || /* @__PURE__ */ t(Le, { ...k, children: h.map((F, R) => /* @__PURE__ */ t(
|
|
1207
|
+
qe,
|
|
1201
1208
|
{
|
|
1202
1209
|
onClick: (et) => {
|
|
1203
|
-
et.stopPropagation(), n?.(
|
|
1210
|
+
et.stopPropagation(), n?.(F);
|
|
1204
1211
|
},
|
|
1205
|
-
children:
|
|
1212
|
+
children: F
|
|
1206
1213
|
},
|
|
1207
|
-
|
|
1214
|
+
R
|
|
1208
1215
|
)) }))
|
|
1209
1216
|
}
|
|
1210
1217
|
),
|
|
1211
|
-
/* @__PURE__ */ t(
|
|
1212
|
-
|
|
1218
|
+
/* @__PURE__ */ t(Be, { children: !!O && /* @__PURE__ */ t(
|
|
1219
|
+
P,
|
|
1213
1220
|
{
|
|
1214
1221
|
variant: "plain",
|
|
1215
1222
|
onClick: () => {
|
|
1216
|
-
n?.(""),
|
|
1223
|
+
n?.(""), v(""), a?.(""), p?.current?.focus();
|
|
1217
1224
|
},
|
|
1218
1225
|
"aria-label": "Clear input value",
|
|
1219
1226
|
children: /* @__PURE__ */ t(Ge, { "aria-hidden": !0 })
|
|
@@ -1223,8 +1230,8 @@ const K = ({
|
|
|
1223
1230
|
}
|
|
1224
1231
|
),
|
|
1225
1232
|
children: [
|
|
1226
|
-
/* @__PURE__ */ t(Z, { children:
|
|
1227
|
-
|
|
1233
|
+
/* @__PURE__ */ t(Z, { children: g }),
|
|
1234
|
+
x && /* @__PURE__ */ t(xt, { children: x })
|
|
1228
1235
|
]
|
|
1229
1236
|
}
|
|
1230
1237
|
);
|
|
@@ -1233,51 +1240,51 @@ var V = /* @__PURE__ */ ((e) => (e.single = "single", e.typeahead = "typeahead",
|
|
|
1233
1240
|
const J = (e) => typeof e == "number" ? e + "px" : e, qn = ({
|
|
1234
1241
|
variant: e = "single",
|
|
1235
1242
|
...n
|
|
1236
|
-
}) => e === "single" ? /* @__PURE__ */ t(
|
|
1237
|
-
const { t: n, form: r, inputType:
|
|
1238
|
-
|
|
1239
|
-
},
|
|
1240
|
-
(
|
|
1241
|
-
).map((
|
|
1243
|
+
}) => e === "single" ? /* @__PURE__ */ t(Nn, { ...n }) : /* @__PURE__ */ t(Ln, { ...n, variant: e }), Ee = (e) => {
|
|
1244
|
+
const { t: n, form: r, inputType: a, attribute: l } = e, [i, s] = S(!1), [c, o] = S(""), m = a === "multiselect", f = (g, y) => {
|
|
1245
|
+
m ? y.value.includes(g) ? y.onChange(y.value.filter((O) => O !== g)) : Array.isArray(y.value) ? y.onChange([...y.value, g]) : y.onChange([g]) : y.onChange(g === y.value ? "" : g);
|
|
1246
|
+
}, h = l.validators?.options?.options || [], d = l.annotations?.inputOptionLabels || {}, u = l.annotations?.inputOptionLabelsI18nPrefix, k = (g) => B(e.t, d[g], g, u), x = (g) => h.filter(
|
|
1247
|
+
(y) => k(y).toLowerCase().includes(c.toLowerCase())
|
|
1248
|
+
).map((y) => /* @__PURE__ */ t(
|
|
1242
1249
|
ge,
|
|
1243
1250
|
{
|
|
1244
|
-
selected: g ===
|
|
1245
|
-
value:
|
|
1246
|
-
children:
|
|
1251
|
+
selected: g === y,
|
|
1252
|
+
value: y,
|
|
1253
|
+
children: k(y)
|
|
1247
1254
|
},
|
|
1248
|
-
|
|
1255
|
+
y
|
|
1249
1256
|
));
|
|
1250
|
-
return /* @__PURE__ */ t(
|
|
1257
|
+
return /* @__PURE__ */ t(W, { ...e, children: /* @__PURE__ */ t(
|
|
1251
1258
|
U,
|
|
1252
1259
|
{
|
|
1253
|
-
name: N(
|
|
1260
|
+
name: N(l.name),
|
|
1254
1261
|
defaultValue: "",
|
|
1255
1262
|
control: r.control,
|
|
1256
1263
|
render: ({ field: g }) => /* @__PURE__ */ t(
|
|
1257
1264
|
qn,
|
|
1258
1265
|
{
|
|
1259
|
-
toggleId:
|
|
1260
|
-
onToggle: (
|
|
1261
|
-
onClear: () =>
|
|
1262
|
-
onSelect: (
|
|
1263
|
-
const
|
|
1264
|
-
|
|
1266
|
+
toggleId: l.name,
|
|
1267
|
+
onToggle: (y) => s(y),
|
|
1268
|
+
onClear: () => f("", g),
|
|
1269
|
+
onSelect: (y) => {
|
|
1270
|
+
const O = y.toString();
|
|
1271
|
+
f(O, g), Array.isArray(g.value) || s(!1);
|
|
1265
1272
|
},
|
|
1266
|
-
selections:
|
|
1267
|
-
variant:
|
|
1273
|
+
selections: m && Array.isArray(g.value) ? g.value : k(g.value),
|
|
1274
|
+
variant: m ? V.typeaheadMulti : h.length >= 10 ? V.typeahead : V.single,
|
|
1268
1275
|
"aria-label": n("selectOne"),
|
|
1269
1276
|
isOpen: i,
|
|
1270
|
-
isDisabled:
|
|
1271
|
-
onFilter: (
|
|
1277
|
+
isDisabled: l.readOnly,
|
|
1278
|
+
onFilter: (y) => (o(y), x(g.value)),
|
|
1272
1279
|
children: x(g.value)
|
|
1273
1280
|
}
|
|
1274
1281
|
)
|
|
1275
1282
|
}
|
|
1276
1283
|
) });
|
|
1277
1284
|
}, Bn = (e) => {
|
|
1278
|
-
const { form: n, attribute: r } = e,
|
|
1279
|
-
return /* @__PURE__ */ t(
|
|
1280
|
-
|
|
1285
|
+
const { form: n, attribute: r } = e, a = ne(r);
|
|
1286
|
+
return /* @__PURE__ */ t(W, { ...e, children: /* @__PURE__ */ t(
|
|
1287
|
+
bn,
|
|
1281
1288
|
{
|
|
1282
1289
|
id: r.name,
|
|
1283
1290
|
"data-testid": r.name,
|
|
@@ -1285,33 +1292,35 @@ const J = (e) => typeof e == "number" ? e + "px" : e, qn = ({
|
|
|
1285
1292
|
cols: r.annotations?.inputTypeCols,
|
|
1286
1293
|
rows: r.annotations?.inputTypeRows,
|
|
1287
1294
|
readOnly: r.readOnly,
|
|
1288
|
-
isRequired:
|
|
1295
|
+
isRequired: a
|
|
1289
1296
|
}
|
|
1290
1297
|
) });
|
|
1291
1298
|
}, E = (e) => {
|
|
1292
|
-
const { form: n, inputType: r, attribute:
|
|
1293
|
-
return /* @__PURE__ */ t(
|
|
1299
|
+
const { form: n, inputType: r, attribute: a } = e, l = ne(a), i = r.startsWith("html") ? r.substring(6) : "text";
|
|
1300
|
+
return /* @__PURE__ */ t(W, { ...e, children: /* @__PURE__ */ t(
|
|
1294
1301
|
Q,
|
|
1295
1302
|
{
|
|
1296
|
-
id:
|
|
1297
|
-
"data-testid":
|
|
1303
|
+
id: a.name,
|
|
1304
|
+
"data-testid": a.name,
|
|
1298
1305
|
type: i,
|
|
1299
|
-
placeholder:
|
|
1306
|
+
placeholder: B(
|
|
1300
1307
|
e.t,
|
|
1301
|
-
|
|
1308
|
+
a.annotations?.inputTypePlaceholder,
|
|
1309
|
+
a.name,
|
|
1310
|
+
a.annotations?.inputOptionLabelsI18nPrefix
|
|
1302
1311
|
),
|
|
1303
|
-
readOnly:
|
|
1304
|
-
isRequired:
|
|
1305
|
-
...n.register(N(
|
|
1312
|
+
readOnly: a.readOnly,
|
|
1313
|
+
isRequired: l,
|
|
1314
|
+
...n.register(N(a.name))
|
|
1306
1315
|
}
|
|
1307
1316
|
) });
|
|
1308
1317
|
}, de = {
|
|
1309
1318
|
text: E,
|
|
1310
1319
|
textarea: Bn,
|
|
1311
|
-
select:
|
|
1312
|
-
"select-radiobuttons":
|
|
1313
|
-
multiselect:
|
|
1314
|
-
"multiselect-checkboxes":
|
|
1320
|
+
select: Ee,
|
|
1321
|
+
"select-radiobuttons": Re,
|
|
1322
|
+
multiselect: Ee,
|
|
1323
|
+
"multiselect-checkboxes": Re,
|
|
1315
1324
|
"html5-email": E,
|
|
1316
1325
|
"html5-tel": E,
|
|
1317
1326
|
"html5-url": E,
|
|
@@ -1321,28 +1330,28 @@ const J = (e) => typeof e == "number" ? e + "px" : e, qn = ({
|
|
|
1321
1330
|
"html5-date": E,
|
|
1322
1331
|
"html5-month": E,
|
|
1323
1332
|
"html5-time": E,
|
|
1324
|
-
"multi-input":
|
|
1325
|
-
},
|
|
1333
|
+
"multi-input": Vn
|
|
1334
|
+
}, Cr = ({
|
|
1326
1335
|
t: e,
|
|
1327
1336
|
form: n,
|
|
1328
1337
|
userProfileMetadata: r,
|
|
1329
|
-
supportedLocales:
|
|
1330
|
-
currentLocale:
|
|
1338
|
+
supportedLocales: a,
|
|
1339
|
+
currentLocale: l,
|
|
1331
1340
|
hideReadOnly: i = !1,
|
|
1332
1341
|
renderer: s
|
|
1333
1342
|
}) => {
|
|
1334
|
-
const c =
|
|
1343
|
+
const c = D(() => {
|
|
1335
1344
|
if (!r.attributes)
|
|
1336
1345
|
return [];
|
|
1337
|
-
const o = i ? r.attributes.filter(({ readOnly:
|
|
1346
|
+
const o = i ? r.attributes.filter(({ readOnly: m }) => !m) : r.attributes;
|
|
1338
1347
|
return [
|
|
1339
1348
|
// Insert an empty group for attributes without a group.
|
|
1340
1349
|
{ name: void 0 },
|
|
1341
1350
|
...r.groups ?? []
|
|
1342
|
-
].map((
|
|
1343
|
-
group:
|
|
1351
|
+
].map((m) => ({
|
|
1352
|
+
group: m,
|
|
1344
1353
|
attributes: o.filter(
|
|
1345
|
-
(
|
|
1354
|
+
(f) => f.group === m.name
|
|
1346
1355
|
)
|
|
1347
1356
|
}));
|
|
1348
1357
|
}, [
|
|
@@ -1351,46 +1360,46 @@ const J = (e) => typeof e == "number" ? e + "px" : e, qn = ({
|
|
|
1351
1360
|
r.attributes
|
|
1352
1361
|
]);
|
|
1353
1362
|
return c.length === 0 ? null : /* @__PURE__ */ t(
|
|
1354
|
-
|
|
1363
|
+
On,
|
|
1355
1364
|
{
|
|
1356
1365
|
label: e("jumpToSection"),
|
|
1357
|
-
sections: c.filter((o) => o.attributes.length > 0).map(({ group: o, attributes:
|
|
1358
|
-
title:
|
|
1359
|
-
panel: /* @__PURE__ */
|
|
1360
|
-
o.displayDescription && /* @__PURE__ */ t(
|
|
1361
|
-
|
|
1362
|
-
|
|
1366
|
+
sections: c.filter((o) => o.attributes.length > 0).map(({ group: o, attributes: m }) => ({
|
|
1367
|
+
title: B(e, o.displayHeader, o.name) || e("general"),
|
|
1368
|
+
panel: /* @__PURE__ */ b("div", { className: "pf-v5-c-form", children: [
|
|
1369
|
+
o.displayDescription && /* @__PURE__ */ t(le, { className: "pf-v5-u-pb-lg", children: B(e, o.displayDescription, "") }),
|
|
1370
|
+
m.map((f) => /* @__PURE__ */ t(
|
|
1371
|
+
_n,
|
|
1363
1372
|
{
|
|
1364
1373
|
t: e,
|
|
1365
1374
|
form: n,
|
|
1366
|
-
supportedLocales:
|
|
1367
|
-
currentLocale:
|
|
1375
|
+
supportedLocales: a,
|
|
1376
|
+
currentLocale: l,
|
|
1368
1377
|
renderer: s,
|
|
1369
|
-
attribute:
|
|
1378
|
+
attribute: f
|
|
1370
1379
|
},
|
|
1371
|
-
|
|
1380
|
+
f.name
|
|
1372
1381
|
))
|
|
1373
1382
|
] })
|
|
1374
1383
|
}))
|
|
1375
1384
|
}
|
|
1376
1385
|
);
|
|
1377
|
-
},
|
|
1386
|
+
}, _n = ({
|
|
1378
1387
|
t: e,
|
|
1379
1388
|
form: n,
|
|
1380
1389
|
renderer: r,
|
|
1381
|
-
supportedLocales:
|
|
1382
|
-
currentLocale:
|
|
1390
|
+
supportedLocales: a,
|
|
1391
|
+
currentLocale: l,
|
|
1383
1392
|
attribute: i
|
|
1384
1393
|
}) => {
|
|
1385
1394
|
const s = n.watch(
|
|
1386
1395
|
N(i.name)
|
|
1387
|
-
), c =
|
|
1396
|
+
), c = D(() => Un(i), [i]), o = i.multivalued || Gn(s) && i.annotations?.inputType === void 0 ? de["multi-input"] : de[c];
|
|
1388
1397
|
return i.name === "locale" ? /* @__PURE__ */ t(
|
|
1389
1398
|
En,
|
|
1390
1399
|
{
|
|
1391
1400
|
form: n,
|
|
1392
|
-
supportedLocales:
|
|
1393
|
-
currentLocale:
|
|
1401
|
+
supportedLocales: a,
|
|
1402
|
+
currentLocale: l,
|
|
1394
1403
|
t: e,
|
|
1395
1404
|
attribute: i
|
|
1396
1405
|
}
|
|
@@ -1404,18 +1413,18 @@ const J = (e) => typeof e == "number" ? e + "px" : e, qn = ({
|
|
|
1404
1413
|
renderer: r
|
|
1405
1414
|
}
|
|
1406
1415
|
);
|
|
1407
|
-
},
|
|
1408
|
-
function
|
|
1416
|
+
}, Hn = "text";
|
|
1417
|
+
function Un(e) {
|
|
1409
1418
|
if (Ze(e.name))
|
|
1410
1419
|
return "text";
|
|
1411
1420
|
const n = e.annotations?.inputType;
|
|
1412
|
-
return
|
|
1421
|
+
return $n(n) ? n : Hn;
|
|
1413
1422
|
}
|
|
1414
|
-
const
|
|
1423
|
+
const $n = (e) => typeof e == "string" && e in de, Gn = (e) => Array.isArray(e) && e.length > 1, Kn = ({
|
|
1415
1424
|
className: e = "",
|
|
1416
1425
|
border: n,
|
|
1417
1426
|
size: r = "md"
|
|
1418
|
-
}) => /* @__PURE__ */
|
|
1427
|
+
}) => /* @__PURE__ */ b(
|
|
1419
1428
|
"svg",
|
|
1420
1429
|
{
|
|
1421
1430
|
className: tn(
|
|
@@ -1471,7 +1480,7 @@ const Un = (e) => typeof e == "string" && e in de, $n = (e) => Array.isArray(e)
|
|
|
1471
1480
|
) })
|
|
1472
1481
|
}
|
|
1473
1482
|
),
|
|
1474
|
-
/* @__PURE__ */ t("g", { style: { filter: 'url("#a")' }, children: /* @__PURE__ */
|
|
1483
|
+
/* @__PURE__ */ t("g", { style: { filter: 'url("#a")' }, children: /* @__PURE__ */ b("g", { transform: "translate(5.04 6.88)", children: [
|
|
1475
1484
|
/* @__PURE__ */ t(
|
|
1476
1485
|
"path",
|
|
1477
1486
|
{
|
|
@@ -1531,32 +1540,33 @@ const Un = (e) => typeof e == "string" && e in de, $n = (e) => Array.isArray(e)
|
|
|
1531
1540
|
] }) })
|
|
1532
1541
|
]
|
|
1533
1542
|
}
|
|
1534
|
-
),
|
|
1543
|
+
), Pe = ({
|
|
1535
1544
|
isKebab: e = !1,
|
|
1536
1545
|
title: n,
|
|
1537
1546
|
dropDownItems: r,
|
|
1538
|
-
...
|
|
1547
|
+
...a
|
|
1539
1548
|
}) => {
|
|
1540
|
-
const [
|
|
1549
|
+
const [l, i] = S(!1);
|
|
1541
1550
|
return /* @__PURE__ */ t(
|
|
1542
1551
|
wt,
|
|
1543
1552
|
{
|
|
1544
|
-
...
|
|
1553
|
+
...a,
|
|
1545
1554
|
popperProps: {
|
|
1546
1555
|
position: "right"
|
|
1547
1556
|
},
|
|
1557
|
+
onOpenChange: (s) => i(s),
|
|
1548
1558
|
toggle: (s) => /* @__PURE__ */ t(
|
|
1549
|
-
|
|
1559
|
+
K,
|
|
1550
1560
|
{
|
|
1551
|
-
"data-testid": `${
|
|
1561
|
+
"data-testid": `${a["data-testid"]}-toggle`,
|
|
1552
1562
|
ref: s,
|
|
1553
|
-
onClick: () => i(!
|
|
1554
|
-
isExpanded:
|
|
1563
|
+
onClick: () => i(!l),
|
|
1564
|
+
isExpanded: l,
|
|
1555
1565
|
variant: e ? "plain" : "default",
|
|
1556
1566
|
children: e ? /* @__PURE__ */ t(Jt, {}) : n
|
|
1557
1567
|
}
|
|
1558
1568
|
),
|
|
1559
|
-
isOpen:
|
|
1569
|
+
isOpen: l,
|
|
1560
1570
|
children: /* @__PURE__ */ t(At, { children: r })
|
|
1561
1571
|
}
|
|
1562
1572
|
);
|
|
@@ -1564,122 +1574,122 @@ const Un = (e) => typeof e == "string" && e in de, $n = (e) => Array.isArray(e)
|
|
|
1564
1574
|
function Wn(e, n) {
|
|
1565
1575
|
if (!e)
|
|
1566
1576
|
return n("unknownUser");
|
|
1567
|
-
const r = e.given_name,
|
|
1568
|
-
return r &&
|
|
1577
|
+
const r = e.given_name, a = e.family_name, l = e.preferred_username;
|
|
1578
|
+
return r && a ? n("fullName", { givenName: r, familyName: a }) : r || a || l || n("unknownUser");
|
|
1569
1579
|
}
|
|
1570
|
-
const
|
|
1580
|
+
const Ir = ({
|
|
1571
1581
|
keycloak: e,
|
|
1572
1582
|
brand: { href: n, ...r },
|
|
1573
|
-
avatar:
|
|
1583
|
+
avatar: a,
|
|
1574
1584
|
features: {
|
|
1575
|
-
hasLogout:
|
|
1585
|
+
hasLogout: l = !0,
|
|
1576
1586
|
hasManageAccount: i = !0,
|
|
1577
1587
|
hasUsername: s = !0
|
|
1578
1588
|
} = {},
|
|
1579
1589
|
kebabDropdownItems: c,
|
|
1580
1590
|
dropdownItems: o = [],
|
|
1581
|
-
toolbarItems:
|
|
1582
|
-
...
|
|
1591
|
+
toolbarItems: m,
|
|
1592
|
+
...f
|
|
1583
1593
|
}) => {
|
|
1584
|
-
const { t:
|
|
1585
|
-
i &&
|
|
1594
|
+
const { t: h } = Ce(), d = [];
|
|
1595
|
+
i && d.push(
|
|
1586
1596
|
/* @__PURE__ */ t(
|
|
1587
1597
|
Ae,
|
|
1588
1598
|
{
|
|
1589
1599
|
onClick: () => e.accountManagement(),
|
|
1590
|
-
children:
|
|
1600
|
+
children: h("manageAccount")
|
|
1591
1601
|
},
|
|
1592
1602
|
"manageAccount"
|
|
1593
1603
|
)
|
|
1594
|
-
),
|
|
1595
|
-
/* @__PURE__ */ t(Ae, { onClick: () => e.logout(), children:
|
|
1604
|
+
), l && d.push(
|
|
1605
|
+
/* @__PURE__ */ t(Ae, { onClick: () => e.logout(), children: h("signOut") }, "signOut")
|
|
1596
1606
|
);
|
|
1597
1607
|
const u = e.idTokenParsed?.picture;
|
|
1598
1608
|
return /* @__PURE__ */ t(
|
|
1599
1609
|
Xt,
|
|
1600
1610
|
{
|
|
1601
|
-
...
|
|
1611
|
+
...f,
|
|
1602
1612
|
logo: /* @__PURE__ */ t(Tt, { ...r }),
|
|
1603
1613
|
logoProps: { href: n },
|
|
1604
|
-
headerTools: /* @__PURE__ */
|
|
1605
|
-
/* @__PURE__ */
|
|
1614
|
+
headerTools: /* @__PURE__ */ b(Zt, { children: [
|
|
1615
|
+
/* @__PURE__ */ b(en, { children: [
|
|
1606
1616
|
/* @__PURE__ */ t(
|
|
1607
|
-
|
|
1617
|
+
ae,
|
|
1608
1618
|
{
|
|
1609
1619
|
visibility: {
|
|
1610
1620
|
md: "hidden"
|
|
1611
1621
|
},
|
|
1612
1622
|
children: /* @__PURE__ */ t(
|
|
1613
|
-
|
|
1623
|
+
Pe,
|
|
1614
1624
|
{
|
|
1615
1625
|
"data-testid": "options-kebab",
|
|
1616
1626
|
isKebab: !0,
|
|
1617
1627
|
dropDownItems: [
|
|
1618
1628
|
...c || o,
|
|
1619
|
-
|
|
1629
|
+
d
|
|
1620
1630
|
]
|
|
1621
1631
|
}
|
|
1622
1632
|
)
|
|
1623
1633
|
}
|
|
1624
1634
|
),
|
|
1625
|
-
/* @__PURE__ */ t(
|
|
1635
|
+
/* @__PURE__ */ t(ae, { children: m }),
|
|
1626
1636
|
/* @__PURE__ */ t(
|
|
1627
|
-
|
|
1637
|
+
ae,
|
|
1628
1638
|
{
|
|
1629
1639
|
visibility: {
|
|
1630
1640
|
default: "hidden",
|
|
1631
1641
|
md: "visible"
|
|
1632
1642
|
},
|
|
1633
1643
|
children: /* @__PURE__ */ t(
|
|
1634
|
-
|
|
1644
|
+
Pe,
|
|
1635
1645
|
{
|
|
1636
1646
|
"data-testid": "options",
|
|
1637
|
-
dropDownItems: [...o,
|
|
1638
|
-
title: s ? Wn(e.idTokenParsed,
|
|
1647
|
+
dropDownItems: [...o, d],
|
|
1648
|
+
title: s ? Wn(e.idTokenParsed, h) : void 0
|
|
1639
1649
|
}
|
|
1640
1650
|
)
|
|
1641
1651
|
}
|
|
1642
1652
|
)
|
|
1643
1653
|
] }),
|
|
1644
|
-
u ||
|
|
1654
|
+
u || a?.src ? /* @__PURE__ */ t(St, { src: u, alt: h("avatar"), ...a }) : /* @__PURE__ */ t(Kn, { ...a })
|
|
1645
1655
|
] })
|
|
1646
1656
|
}
|
|
1647
1657
|
);
|
|
1648
1658
|
};
|
|
1649
1659
|
export {
|
|
1650
1660
|
nn as AlertProvider,
|
|
1651
|
-
|
|
1661
|
+
or as ContinueCancelModal,
|
|
1652
1662
|
rn as ErrorPage,
|
|
1653
1663
|
je as FormErrorText,
|
|
1654
|
-
|
|
1655
|
-
|
|
1664
|
+
xn as FormPanel,
|
|
1665
|
+
fr as FormSubmitButton,
|
|
1656
1666
|
hn as Help,
|
|
1657
1667
|
ze as HelpItem,
|
|
1658
|
-
|
|
1659
|
-
|
|
1660
|
-
|
|
1668
|
+
pr as IconMapper,
|
|
1669
|
+
Ir as KeycloakMasthead,
|
|
1670
|
+
ir as KeycloakProvider,
|
|
1661
1671
|
qn as KeycloakSelect,
|
|
1662
|
-
|
|
1663
|
-
|
|
1664
|
-
|
|
1672
|
+
bn as KeycloakTextArea,
|
|
1673
|
+
cr as NumberControl,
|
|
1674
|
+
dr as PasswordControl,
|
|
1665
1675
|
Je as PasswordInput,
|
|
1666
|
-
|
|
1667
|
-
|
|
1676
|
+
On as ScrollForm,
|
|
1677
|
+
vn as SelectControl,
|
|
1668
1678
|
H as SelectVariant,
|
|
1669
|
-
|
|
1670
|
-
|
|
1671
|
-
|
|
1672
|
-
|
|
1673
|
-
|
|
1674
|
-
|
|
1675
|
-
|
|
1676
|
-
|
|
1679
|
+
ur as SwitchControl,
|
|
1680
|
+
hr as TextAreaControl,
|
|
1681
|
+
mr as TextControl,
|
|
1682
|
+
Cr as UserProfileFields,
|
|
1683
|
+
gr as beerify,
|
|
1684
|
+
ln as createNamedContext,
|
|
1685
|
+
yr as debeerify,
|
|
1686
|
+
sr as getInjectedEnvironment,
|
|
1677
1687
|
sn as isDefined,
|
|
1678
|
-
|
|
1679
|
-
|
|
1680
|
-
|
|
1681
|
-
|
|
1682
|
-
|
|
1688
|
+
br as isUserProfileError,
|
|
1689
|
+
B as label,
|
|
1690
|
+
Sn as mainPageContentId,
|
|
1691
|
+
vr as setUserProfileServerError,
|
|
1692
|
+
ar as useAlerts,
|
|
1683
1693
|
lr as useEnvironment,
|
|
1684
1694
|
un as useHelp,
|
|
1685
1695
|
on as useRequiredContext,
|