@keycloak/keycloak-ui-shared 26.0.7 → 26.0.8
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 +571 -572
- package/package.json +3 -3
|
@@ -1,60 +1,60 @@
|
|
|
1
1
|
import { jsx as t, jsxs as b, Fragment as J } from "react/jsx-runtime";
|
|
2
|
-
import { AlertGroup as
|
|
3
|
-
import { createContext as Rt, useContext as Dt, useRef as Y, useEffect as le, useCallback as ce, useState as x, useMemo as _, forwardRef as
|
|
2
|
+
import { AlertGroup as rn, Alert as an, AlertVariant as Me, AlertActionCloseButton as ln, Page as on, Modal as It, ModalVariant as sn, Button as L, TextContent as cn, Text as Pe, TextVariants as dn, Spinner as wt, FormHelperText as Ue, HelperText as He, HelperTextItem as We, Popover as un, Icon as Le, FormGroup as xt, NumberInput as hn, ValidatedOptions as Q, InputGroup as Ce, InputGroupItem as Ne, TextInput as ke, Select as Ie, MenuToggle as de, MenuToggleStatus as je, SelectList as we, SelectOption as Ge, TextInputGroup as Tt, TextInputGroupMain as St, ChipGroup as ze, Chip as Je, TextInputGroupUtilities as At, Switch as pn, TextArea as Et, Title as mn, Card as fn, CardHeader as gn, CardTitle as yn, CardBody as vn, Grid as bn, GridItem as ot, PageSection as Cn, JumpLinks as kn, JumpLinksItem as In, ButtonVariant as ve, Checkbox as wn, Radio as xn, MenuFooter as Tn, Dropdown as Sn, DropdownList as An, DropdownItem as it, Masthead as En, MastheadToggle as Rn, PageToggleButton as Dn, MastheadBrand as On, MastheadContent as Fn, Toolbar as ye, ToolbarContent as Be, ToolbarItem as K, Avatar as Mn, EmptyState as Pn, EmptyStateIcon as st, EmptyStateHeader as Ln, EmptyStateBody as Nn, EmptyStateFooter as Bn, EmptyStateActions as Vn, SearchInput as _n, Divider as qn, Pagination as $n, Bullseye as Kn, Badge as Un } from "@patternfly/react-core";
|
|
3
|
+
import { createContext as Rt, useContext as Dt, useRef as Y, useEffect as le, useCallback as ce, useState as x, useMemo as _, forwardRef as Hn, useId as Ot, Fragment as Ft, Children as Mt, Component as Wn, isValidElement as jn } from "react";
|
|
4
4
|
import { useTranslation as B } from "react-i18next";
|
|
5
5
|
import { NetworkError as Pt } from "@keycloak/keycloak-admin-client";
|
|
6
|
-
import
|
|
7
|
-
import { ExclamationCircleIcon as
|
|
8
|
-
import { useFormContext as xe, Controller as
|
|
9
|
-
import { get as U, cloneDeep as
|
|
6
|
+
import Gn from "keycloak-js";
|
|
7
|
+
import { ExclamationCircleIcon as zn, HelpIcon as ct, EyeIcon as Jn, EyeSlashIcon as Qn, TimesIcon as Lt, CubeIcon as Yn, PaypalIcon as Xn, InstagramIcon as Zn, BitbucketIcon as er, MicrosoftIcon as tr, TwitterIcon as nr, StackOverflowIcon as rr, OpenshiftIcon as ar, LinkedinIcon as lr, GoogleIcon as or, GitlabIcon as ir, FacebookSquareIcon as sr, GithubIcon as cr, MinusCircleIcon as dr, PlusCircleIcon as Nt, EllipsisVIcon as ur, BarsIcon as hr, SearchIcon as pr, SyncAltIcon as mr } from "@patternfly/react-icons";
|
|
8
|
+
import { useFormContext as xe, Controller as oe, useController as Qe, FormProvider as fr, useWatch as gr } from "react-hook-form";
|
|
9
|
+
import { get as U, cloneDeep as yr, differenceBy as vr } from "lodash-es";
|
|
10
10
|
import me from "@patternfly/react-styles/css/components/Avatar/avatar";
|
|
11
|
-
import { css as
|
|
12
|
-
import { Table as
|
|
13
|
-
import './main.css';function
|
|
11
|
+
import { css as br } from "@patternfly/react-styles";
|
|
12
|
+
import { Table as Cr, TableVariant as kr, Thead as Ir, Tr as fe, Th as Oe, Tbody as dt, Td as re, ActionsColumn as wr, ExpandableRowContent as xr, TableText as Tr } from "@patternfly/react-table";
|
|
13
|
+
import './main.css';function Ye(e, n) {
|
|
14
14
|
const r = Rt(n);
|
|
15
15
|
return r.displayName = e, r;
|
|
16
16
|
}
|
|
17
|
-
const
|
|
18
|
-
function
|
|
17
|
+
const Sr = ["error", "errorMessage"], Fe = "error_description";
|
|
18
|
+
function Ar(e) {
|
|
19
19
|
if (typeof e == "string")
|
|
20
20
|
return e;
|
|
21
21
|
if (e instanceof Pt)
|
|
22
|
-
return
|
|
22
|
+
return Dr(e.responseData);
|
|
23
23
|
if (e instanceof Error)
|
|
24
24
|
return e.message;
|
|
25
25
|
throw new Error("Unable to determine error message.");
|
|
26
26
|
}
|
|
27
|
-
function
|
|
27
|
+
function Er(e) {
|
|
28
28
|
if (!(e instanceof Pt))
|
|
29
29
|
return;
|
|
30
30
|
const n = e.responseData;
|
|
31
|
-
return
|
|
31
|
+
return Rr(n);
|
|
32
32
|
}
|
|
33
|
-
function
|
|
33
|
+
function Rr(e) {
|
|
34
34
|
if (typeof e == "object" && e !== null && Fe in e && typeof e[Fe] == "string")
|
|
35
35
|
return e[Fe];
|
|
36
36
|
}
|
|
37
|
-
function
|
|
37
|
+
function Dr(e) {
|
|
38
38
|
if (!(typeof e != "object" || e === null))
|
|
39
|
-
for (const n of
|
|
39
|
+
for (const n of Sr) {
|
|
40
40
|
const r = e[n];
|
|
41
41
|
if (typeof r == "string")
|
|
42
42
|
return r;
|
|
43
43
|
}
|
|
44
44
|
}
|
|
45
|
-
const
|
|
46
|
-
function
|
|
45
|
+
const Or = () => Math.floor(Math.random() * 1e3);
|
|
46
|
+
function Fr(e) {
|
|
47
47
|
return e != null;
|
|
48
48
|
}
|
|
49
|
-
function
|
|
49
|
+
function Xe(e) {
|
|
50
50
|
const n = Dt(e);
|
|
51
|
-
if (
|
|
51
|
+
if (Fr(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.`
|
|
55
55
|
);
|
|
56
56
|
}
|
|
57
|
-
function
|
|
57
|
+
function Mr() {
|
|
58
58
|
const e = Y(!1), n = Y(/* @__PURE__ */ new Set());
|
|
59
59
|
le(() => (e.current = !1, () => {
|
|
60
60
|
e.current = !0, r();
|
|
@@ -65,81 +65,81 @@ function Fr() {
|
|
|
65
65
|
return ce((a, l) => {
|
|
66
66
|
if (e.current)
|
|
67
67
|
throw new Error("Can't schedule a timeout on an unmounted component.");
|
|
68
|
-
const
|
|
69
|
-
n.current.add(
|
|
70
|
-
function
|
|
71
|
-
n.current.delete(
|
|
68
|
+
const o = Number(setTimeout(i, l));
|
|
69
|
+
n.current.add(o);
|
|
70
|
+
function i() {
|
|
71
|
+
n.current.delete(o), a();
|
|
72
72
|
}
|
|
73
73
|
return function() {
|
|
74
|
-
clearTimeout(
|
|
74
|
+
clearTimeout(o), n.current.delete(o);
|
|
75
75
|
};
|
|
76
76
|
}, []);
|
|
77
77
|
}
|
|
78
|
-
function
|
|
78
|
+
function Pr({ alerts: e, onCloseAlert: n }) {
|
|
79
79
|
return /* @__PURE__ */ t(
|
|
80
|
-
|
|
80
|
+
rn,
|
|
81
81
|
{
|
|
82
82
|
"data-testid": "global-alerts",
|
|
83
83
|
isToast: !0,
|
|
84
84
|
style: { whiteSpace: "pre-wrap" },
|
|
85
|
-
children: e.map(({ id: r, variant: a, message: l, description:
|
|
86
|
-
|
|
85
|
+
children: e.map(({ id: r, variant: a, message: l, description: o }, i) => /* @__PURE__ */ t(
|
|
86
|
+
an,
|
|
87
87
|
{
|
|
88
|
-
"data-testid":
|
|
88
|
+
"data-testid": i === 0 ? "last-alert" : void 0,
|
|
89
89
|
isLiveRegion: !0,
|
|
90
|
-
variant:
|
|
90
|
+
variant: Me[a],
|
|
91
91
|
component: "p",
|
|
92
92
|
variantLabel: "",
|
|
93
93
|
title: l,
|
|
94
94
|
actionClose: /* @__PURE__ */ t(
|
|
95
|
-
|
|
95
|
+
ln,
|
|
96
96
|
{
|
|
97
97
|
title: l,
|
|
98
98
|
onClose: () => n(r)
|
|
99
99
|
}
|
|
100
100
|
),
|
|
101
|
-
children:
|
|
101
|
+
children: o && /* @__PURE__ */ t("p", { children: o })
|
|
102
102
|
},
|
|
103
103
|
r
|
|
104
104
|
))
|
|
105
105
|
}
|
|
106
106
|
);
|
|
107
107
|
}
|
|
108
|
-
const
|
|
108
|
+
const Lr = 8e3, Bt = Ye(
|
|
109
109
|
"AlertContext",
|
|
110
110
|
void 0
|
|
111
|
-
),
|
|
112
|
-
const { t: n } = B(), r =
|
|
113
|
-
(c, h =
|
|
111
|
+
), Ua = () => Xe(Bt), Nr = ({ children: e }) => {
|
|
112
|
+
const { t: n } = B(), r = Mr(), [a, l] = x([]), o = (c) => l((h) => h.filter((d) => d.id !== c)), i = ce(
|
|
113
|
+
(c, h = Me.success, d) => {
|
|
114
114
|
const f = {
|
|
115
|
-
id:
|
|
115
|
+
id: Or(),
|
|
116
116
|
message: c,
|
|
117
117
|
variant: h,
|
|
118
|
-
description:
|
|
118
|
+
description: d
|
|
119
119
|
};
|
|
120
|
-
l((m) => [f, ...m]), r(() =>
|
|
120
|
+
l((m) => [f, ...m]), r(() => o(f.id), Lr);
|
|
121
121
|
},
|
|
122
122
|
[r]
|
|
123
123
|
), s = ce(
|
|
124
124
|
(c, h) => {
|
|
125
|
-
const
|
|
126
|
-
|
|
125
|
+
const d = n(c, { error: Ar(h) }), f = Er(h);
|
|
126
|
+
i(d, Me.danger, f);
|
|
127
127
|
},
|
|
128
|
-
[
|
|
129
|
-
),
|
|
130
|
-
return /* @__PURE__ */ b(Bt.Provider, { value:
|
|
131
|
-
/* @__PURE__ */ t(
|
|
128
|
+
[i, n]
|
|
129
|
+
), u = _(() => ({ addAlert: i, addError: s }), [i, s]);
|
|
130
|
+
return /* @__PURE__ */ b(Bt.Provider, { value: u, children: [
|
|
131
|
+
/* @__PURE__ */ t(Pr, { alerts: a, onCloseAlert: o }),
|
|
132
132
|
e
|
|
133
133
|
] });
|
|
134
|
-
},
|
|
135
|
-
const { t: n } = B(), r = e.error, a =
|
|
134
|
+
}, Br = (e) => {
|
|
135
|
+
const { t: n } = B(), r = e.error, a = Vr(r);
|
|
136
136
|
function l() {
|
|
137
137
|
location.href = location.origin + location.pathname;
|
|
138
138
|
}
|
|
139
|
-
return /* @__PURE__ */ t(
|
|
139
|
+
return /* @__PURE__ */ t(on, { children: /* @__PURE__ */ t(
|
|
140
140
|
It,
|
|
141
141
|
{
|
|
142
|
-
variant:
|
|
142
|
+
variant: sn.small,
|
|
143
143
|
title: n("somethingWentWrong"),
|
|
144
144
|
titleIconVariant: "danger",
|
|
145
145
|
showClose: !1,
|
|
@@ -147,74 +147,74 @@ const Pr = 8e3, Bt = Xe(
|
|
|
147
147
|
actions: [
|
|
148
148
|
/* @__PURE__ */ t(L, { variant: "primary", onClick: l, children: n("tryAgain") }, "tryAgain")
|
|
149
149
|
],
|
|
150
|
-
children: /* @__PURE__ */ b(
|
|
151
|
-
/* @__PURE__ */ t(
|
|
152
|
-
a && /* @__PURE__ */ t(
|
|
150
|
+
children: /* @__PURE__ */ b(cn, { children: [
|
|
151
|
+
/* @__PURE__ */ t(Pe, { children: n("somethingWentWrongDescription") }),
|
|
152
|
+
a && /* @__PURE__ */ t(Pe, { component: dn.small, children: a })
|
|
153
153
|
] })
|
|
154
154
|
}
|
|
155
155
|
) });
|
|
156
156
|
};
|
|
157
|
-
function
|
|
157
|
+
function Vr(e) {
|
|
158
158
|
return typeof e == "string" ? e : e instanceof Error ? e.message : null;
|
|
159
159
|
}
|
|
160
|
-
function
|
|
160
|
+
function _r(e, n, r) {
|
|
161
161
|
const [a, l] = x(
|
|
162
162
|
() => e.getItem(n) ?? r
|
|
163
|
-
),
|
|
164
|
-
l(
|
|
163
|
+
), o = ce((i) => {
|
|
164
|
+
l(i), e.setItem(n, i);
|
|
165
165
|
}, []);
|
|
166
166
|
return le(() => {
|
|
167
|
-
l(e.getItem(n) ?? r), window.addEventListener("storage",
|
|
168
|
-
function
|
|
167
|
+
l(e.getItem(n) ?? r), window.addEventListener("storage", i);
|
|
168
|
+
function i(s) {
|
|
169
169
|
s.storageArea === e && (s.key === null || s.key === n) && l(s.newValue ?? r);
|
|
170
170
|
}
|
|
171
|
-
return () => window.removeEventListener("storage",
|
|
172
|
-
}, [e, n]), [a,
|
|
171
|
+
return () => window.removeEventListener("storage", i);
|
|
172
|
+
}, [e, n]), [a, o];
|
|
173
173
|
}
|
|
174
174
|
function Vt(e, n, r) {
|
|
175
175
|
const a = _(
|
|
176
176
|
() => JSON.stringify(r),
|
|
177
177
|
[r]
|
|
178
|
-
), [l,
|
|
178
|
+
), [l, o] = _r(
|
|
179
179
|
e,
|
|
180
180
|
n,
|
|
181
181
|
a
|
|
182
|
-
),
|
|
183
|
-
(
|
|
182
|
+
), i = _(() => JSON.parse(l), [l]), s = ce(
|
|
183
|
+
(u) => o(JSON.stringify(u)),
|
|
184
184
|
[]
|
|
185
185
|
);
|
|
186
|
-
return [
|
|
186
|
+
return [i, s];
|
|
187
187
|
}
|
|
188
|
-
const _t =
|
|
188
|
+
const _t = Ye(
|
|
189
189
|
"HelpContext",
|
|
190
190
|
void 0
|
|
191
|
-
),
|
|
191
|
+
), qr = () => Xe(_t), $r = ({ children: e }) => {
|
|
192
192
|
const [n, r] = Vt(localStorage, "helpEnabled", !0);
|
|
193
193
|
function a() {
|
|
194
194
|
r(!n);
|
|
195
195
|
}
|
|
196
196
|
return /* @__PURE__ */ t(_t.Provider, { value: { enabled: n, toggleHelp: a }, children: e });
|
|
197
|
-
},
|
|
198
|
-
let
|
|
199
|
-
const
|
|
200
|
-
const e = Dt(
|
|
197
|
+
}, Kr = () => Rt(void 0);
|
|
198
|
+
let Ve;
|
|
199
|
+
const Ha = () => {
|
|
200
|
+
const e = Dt(Ve);
|
|
201
201
|
if (!e)
|
|
202
202
|
throw Error(
|
|
203
203
|
"no environment provider in the hierarchy make sure to add the provider"
|
|
204
204
|
);
|
|
205
205
|
return e;
|
|
206
|
-
},
|
|
206
|
+
}, Wa = ({
|
|
207
207
|
environment: e,
|
|
208
208
|
children: n
|
|
209
209
|
}) => {
|
|
210
|
-
|
|
211
|
-
const r = Y(!1), [a, l] = x(!1), [
|
|
212
|
-
const
|
|
210
|
+
Ve = Kr();
|
|
211
|
+
const r = Y(!1), [a, l] = x(!1), [o, i] = x(), s = _(() => {
|
|
212
|
+
const u = new Gn({
|
|
213
213
|
url: e.serverBaseUrl,
|
|
214
214
|
realm: e.realm,
|
|
215
215
|
clientId: e.clientId
|
|
216
216
|
});
|
|
217
|
-
return
|
|
217
|
+
return u.onAuthLogout = () => u.login(), u;
|
|
218
218
|
}, [e]);
|
|
219
219
|
return le(() => {
|
|
220
220
|
if (r.current)
|
|
@@ -223,10 +223,10 @@ const Ka = () => {
|
|
|
223
223
|
onLoad: "check-sso",
|
|
224
224
|
pkceMethod: "S256",
|
|
225
225
|
responseMode: "query"
|
|
226
|
-
}).then(() => l(!0)).catch((c) =>
|
|
227
|
-
}, [s]),
|
|
226
|
+
}).then(() => l(!0)).catch((c) => i(c)), r.current = !0;
|
|
227
|
+
}, [s]), o ? /* @__PURE__ */ t(Br, { error: o }) : a ? /* @__PURE__ */ t(Ve.Provider, { value: { environment: e, keycloak: s }, children: /* @__PURE__ */ t(Nr, { children: /* @__PURE__ */ t($r, { children: n }) }) }) : /* @__PURE__ */ t(wt, {});
|
|
228
228
|
};
|
|
229
|
-
function
|
|
229
|
+
function ja() {
|
|
230
230
|
const n = document.getElementById("environment")?.textContent;
|
|
231
231
|
if (typeof n != "string")
|
|
232
232
|
throw new Error("Environment variables not found in the document.");
|
|
@@ -236,28 +236,28 @@ function Ha() {
|
|
|
236
236
|
throw new Error("Unable to parse environment variables as JSON.");
|
|
237
237
|
}
|
|
238
238
|
}
|
|
239
|
-
const
|
|
239
|
+
const Ga = ({
|
|
240
240
|
modalTitle: e,
|
|
241
241
|
continueLabel: n,
|
|
242
242
|
cancelLabel: r,
|
|
243
243
|
buttonTitle: a,
|
|
244
244
|
isDisabled: l,
|
|
245
|
-
buttonVariant:
|
|
246
|
-
buttonTestRole:
|
|
245
|
+
buttonVariant: o,
|
|
246
|
+
buttonTestRole: i,
|
|
247
247
|
onContinue: s,
|
|
248
|
-
component:
|
|
248
|
+
component: u = L,
|
|
249
249
|
children: c,
|
|
250
250
|
...h
|
|
251
251
|
}) => {
|
|
252
|
-
const [
|
|
252
|
+
const [d, f] = x(!1);
|
|
253
253
|
return /* @__PURE__ */ b(J, { children: [
|
|
254
254
|
/* @__PURE__ */ t(
|
|
255
|
-
|
|
255
|
+
u,
|
|
256
256
|
{
|
|
257
|
-
variant:
|
|
257
|
+
variant: o,
|
|
258
258
|
onClick: () => f(!0),
|
|
259
259
|
isDisabled: l,
|
|
260
|
-
"data-testrole":
|
|
260
|
+
"data-testrole": i,
|
|
261
261
|
children: a
|
|
262
262
|
}
|
|
263
263
|
),
|
|
@@ -267,7 +267,7 @@ const Wa = ({
|
|
|
267
267
|
variant: "small",
|
|
268
268
|
...h,
|
|
269
269
|
title: e,
|
|
270
|
-
isOpen:
|
|
270
|
+
isOpen: d,
|
|
271
271
|
onClose: () => f(!1),
|
|
272
272
|
actions: [
|
|
273
273
|
/* @__PURE__ */ t(
|
|
@@ -297,28 +297,28 @@ const Wa = ({
|
|
|
297
297
|
}
|
|
298
298
|
)
|
|
299
299
|
] });
|
|
300
|
-
}, qt = ({ message: e, ...n }) => /* @__PURE__ */ t(
|
|
300
|
+
}, qt = ({ message: e, ...n }) => /* @__PURE__ */ t(Ue, { ...n, children: /* @__PURE__ */ t(He, { children: /* @__PURE__ */ t(We, { icon: /* @__PURE__ */ t(zn, {}), variant: "error", children: e }) }) }), $t = ({
|
|
301
301
|
helpText: e,
|
|
302
302
|
fieldLabelId: n,
|
|
303
303
|
noVerticalAlign: r = !0,
|
|
304
304
|
unWrap: a = !1
|
|
305
305
|
}) => {
|
|
306
|
-
const { enabled: l } =
|
|
307
|
-
return l ? /* @__PURE__ */ t(
|
|
306
|
+
const { enabled: l } = qr();
|
|
307
|
+
return l ? /* @__PURE__ */ t(un, { bodyContent: e, children: /* @__PURE__ */ b(J, { children: [
|
|
308
308
|
!a && /* @__PURE__ */ t(
|
|
309
309
|
"button",
|
|
310
310
|
{
|
|
311
311
|
"data-testid": `help-label-${n}`,
|
|
312
312
|
"aria-label": n,
|
|
313
|
-
onClick: (
|
|
313
|
+
onClick: (o) => o.preventDefault(),
|
|
314
314
|
className: "pf-v5-c-form__group-label-help",
|
|
315
|
-
children: /* @__PURE__ */ t(
|
|
315
|
+
children: /* @__PURE__ */ t(Le, { isInline: r, children: /* @__PURE__ */ t(ct, {}) })
|
|
316
316
|
}
|
|
317
317
|
),
|
|
318
|
-
a && /* @__PURE__ */ t(
|
|
318
|
+
a && /* @__PURE__ */ t(Le, { isInline: r, children: /* @__PURE__ */ t(ct, {}) })
|
|
319
319
|
] }) }) : null;
|
|
320
320
|
};
|
|
321
|
-
function
|
|
321
|
+
function Ze(e) {
|
|
322
322
|
if (!(typeof e > "u" || e instanceof RegExp))
|
|
323
323
|
return typeof e == "object" ? e.value : e;
|
|
324
324
|
}
|
|
@@ -328,20 +328,20 @@ const ne = ({
|
|
|
328
328
|
labelIcon: r,
|
|
329
329
|
error: a,
|
|
330
330
|
children: l,
|
|
331
|
-
...
|
|
331
|
+
...o
|
|
332
332
|
}) => /* @__PURE__ */ b(
|
|
333
333
|
xt,
|
|
334
334
|
{
|
|
335
335
|
label: n || e,
|
|
336
336
|
fieldId: e,
|
|
337
337
|
labelIcon: r ? /* @__PURE__ */ t($t, { helpText: r, fieldLabelId: e }) : void 0,
|
|
338
|
-
...
|
|
338
|
+
...o,
|
|
339
339
|
children: [
|
|
340
340
|
l,
|
|
341
341
|
a && /* @__PURE__ */ t(qt, { "data-testid": `${e}-helper`, message: a.message })
|
|
342
342
|
]
|
|
343
343
|
}
|
|
344
|
-
),
|
|
344
|
+
), za = ({
|
|
345
345
|
name: e,
|
|
346
346
|
label: n,
|
|
347
347
|
controller: r,
|
|
@@ -349,8 +349,8 @@ const ne = ({
|
|
|
349
349
|
...l
|
|
350
350
|
}) => {
|
|
351
351
|
const {
|
|
352
|
-
control:
|
|
353
|
-
formState: { errors:
|
|
352
|
+
control: o,
|
|
353
|
+
formState: { errors: i }
|
|
354
354
|
} = xe();
|
|
355
355
|
return /* @__PURE__ */ t(
|
|
356
356
|
ne,
|
|
@@ -358,33 +358,33 @@ const ne = ({
|
|
|
358
358
|
name: e,
|
|
359
359
|
label: n,
|
|
360
360
|
isRequired: r.rules?.required === !0,
|
|
361
|
-
error:
|
|
361
|
+
error: i[e],
|
|
362
362
|
labelIcon: a,
|
|
363
363
|
children: /* @__PURE__ */ t(
|
|
364
|
-
|
|
364
|
+
oe,
|
|
365
365
|
{
|
|
366
366
|
...r,
|
|
367
367
|
name: e,
|
|
368
|
-
control:
|
|
368
|
+
control: o,
|
|
369
369
|
render: ({ field: s }) => {
|
|
370
|
-
const
|
|
370
|
+
const u = !!r.rules?.required, c = Ze(r.rules?.min), h = s.value ?? r.defaultValue, d = (f) => s.onChange(
|
|
371
371
|
c !== void 0 ? Math.max(f, Number(c)) : f
|
|
372
372
|
);
|
|
373
373
|
return /* @__PURE__ */ t(
|
|
374
|
-
|
|
374
|
+
hn,
|
|
375
375
|
{
|
|
376
376
|
...l,
|
|
377
377
|
id: e,
|
|
378
378
|
value: h,
|
|
379
|
-
validated:
|
|
380
|
-
required:
|
|
379
|
+
validated: i[e] ? Q.error : Q.default,
|
|
380
|
+
required: u,
|
|
381
381
|
min: Number(c),
|
|
382
382
|
max: Number(r.rules?.max),
|
|
383
|
-
onPlus: () =>
|
|
384
|
-
onMinus: () =>
|
|
383
|
+
onPlus: () => d(h + 1),
|
|
384
|
+
onMinus: () => d(h - 1),
|
|
385
385
|
onChange: (f) => {
|
|
386
386
|
const m = Number(f.currentTarget.value);
|
|
387
|
-
|
|
387
|
+
d(isNaN(m) ? r.defaultValue : m);
|
|
388
388
|
}
|
|
389
389
|
}
|
|
390
390
|
);
|
|
@@ -393,14 +393,14 @@ const ne = ({
|
|
|
393
393
|
)
|
|
394
394
|
}
|
|
395
395
|
);
|
|
396
|
-
},
|
|
396
|
+
}, Ur = ({
|
|
397
397
|
hasReveal: e = !0,
|
|
398
398
|
innerRef: n,
|
|
399
399
|
...r
|
|
400
400
|
}) => {
|
|
401
|
-
const { t: a } = B(), [l,
|
|
401
|
+
const { t: a } = B(), [l, o] = x(!0);
|
|
402
402
|
return /* @__PURE__ */ b(Ce, { children: [
|
|
403
|
-
/* @__PURE__ */ t(
|
|
403
|
+
/* @__PURE__ */ t(Ne, { isFill: !0, children: /* @__PURE__ */ t(
|
|
404
404
|
ke,
|
|
405
405
|
{
|
|
406
406
|
...r,
|
|
@@ -413,17 +413,17 @@ const ne = ({
|
|
|
413
413
|
{
|
|
414
414
|
variant: "control",
|
|
415
415
|
"aria-label": a("showPassword"),
|
|
416
|
-
onClick: () =>
|
|
417
|
-
children: l ? /* @__PURE__ */ t(
|
|
416
|
+
onClick: () => o(!l),
|
|
417
|
+
children: l ? /* @__PURE__ */ t(Jn, {}) : /* @__PURE__ */ t(Qn, {})
|
|
418
418
|
}
|
|
419
419
|
)
|
|
420
420
|
] });
|
|
421
|
-
}, Kt =
|
|
422
|
-
(e, n) => /* @__PURE__ */ t(
|
|
421
|
+
}, Kt = Hn(
|
|
422
|
+
(e, n) => /* @__PURE__ */ t(Ur, { ...e, innerRef: n })
|
|
423
423
|
);
|
|
424
424
|
Kt.displayName = "PasswordInput";
|
|
425
|
-
const
|
|
426
|
-
const { labelIcon: n, ...r } = e, a = !!e.rules?.required, l = e.defaultValue ?? "", { field:
|
|
425
|
+
const Ja = (e) => {
|
|
426
|
+
const { labelIcon: n, ...r } = e, a = !!e.rules?.required, l = e.defaultValue ?? "", { field: o, fieldState: i } = Qe({
|
|
427
427
|
...e,
|
|
428
428
|
defaultValue: l
|
|
429
429
|
});
|
|
@@ -434,7 +434,7 @@ const Ga = (e) => {
|
|
|
434
434
|
label: e.label,
|
|
435
435
|
labelIcon: n,
|
|
436
436
|
isRequired: a,
|
|
437
|
-
error:
|
|
437
|
+
error: i.error,
|
|
438
438
|
children: [
|
|
439
439
|
/* @__PURE__ */ t(
|
|
440
440
|
Kt,
|
|
@@ -442,39 +442,39 @@ const Ga = (e) => {
|
|
|
442
442
|
isRequired: a,
|
|
443
443
|
id: e.name,
|
|
444
444
|
"data-testid": e.name,
|
|
445
|
-
validated:
|
|
445
|
+
validated: i.error ? Q.error : Q.default,
|
|
446
446
|
isDisabled: e.isDisabled,
|
|
447
447
|
...r,
|
|
448
|
-
...
|
|
448
|
+
...o
|
|
449
449
|
}
|
|
450
450
|
),
|
|
451
|
-
e.helperText && /* @__PURE__ */ t(
|
|
451
|
+
e.helperText && /* @__PURE__ */ t(Ue, { children: /* @__PURE__ */ t(He, { children: /* @__PURE__ */ t(We, { children: e.helperText }) }) })
|
|
452
452
|
]
|
|
453
453
|
}
|
|
454
454
|
);
|
|
455
|
-
},
|
|
455
|
+
}, Hr = ({
|
|
456
456
|
id: e,
|
|
457
457
|
name: n,
|
|
458
458
|
label: r,
|
|
459
459
|
options: a,
|
|
460
460
|
controller: l,
|
|
461
|
-
labelIcon:
|
|
462
|
-
...
|
|
461
|
+
labelIcon: o,
|
|
462
|
+
...i
|
|
463
463
|
}) => {
|
|
464
464
|
const {
|
|
465
465
|
control: s,
|
|
466
|
-
formState: { errors:
|
|
467
|
-
} = xe(), [c, h] = x(!1),
|
|
466
|
+
formState: { errors: u }
|
|
467
|
+
} = xe(), [c, h] = x(!1), d = Ze(l.rules?.required) === !0;
|
|
468
468
|
return /* @__PURE__ */ t(
|
|
469
469
|
ne,
|
|
470
470
|
{
|
|
471
471
|
name: n,
|
|
472
472
|
label: r,
|
|
473
|
-
isRequired:
|
|
474
|
-
error: U(
|
|
475
|
-
labelIcon:
|
|
473
|
+
isRequired: d,
|
|
474
|
+
error: U(u, n),
|
|
475
|
+
labelIcon: o,
|
|
476
476
|
children: /* @__PURE__ */ t(
|
|
477
|
-
|
|
477
|
+
oe,
|
|
478
478
|
{
|
|
479
479
|
...l,
|
|
480
480
|
name: n,
|
|
@@ -482,7 +482,7 @@ const Ga = (e) => {
|
|
|
482
482
|
render: ({ field: { onChange: f, value: m } }) => /* @__PURE__ */ t(
|
|
483
483
|
Ie,
|
|
484
484
|
{
|
|
485
|
-
...
|
|
485
|
+
...i,
|
|
486
486
|
onClick: () => h(!c),
|
|
487
487
|
onOpenChange: () => h(!1),
|
|
488
488
|
selected: se(a) ? a.filter(
|
|
@@ -496,7 +496,7 @@ const Ga = (e) => {
|
|
|
496
496
|
onClick: () => h(!c),
|
|
497
497
|
isExpanded: c,
|
|
498
498
|
isFullWidth: !0,
|
|
499
|
-
status: U(
|
|
499
|
+
status: U(u, n) ? je.danger : void 0,
|
|
500
500
|
"aria-label": "toggle",
|
|
501
501
|
children: se(a) ? a.find(
|
|
502
502
|
(T) => T.key === (Array.isArray(m) ? m[0] : m)
|
|
@@ -508,33 +508,33 @@ const Ga = (e) => {
|
|
|
508
508
|
f(Array.isArray(m) ? [g] : g), h(!1);
|
|
509
509
|
},
|
|
510
510
|
isOpen: c,
|
|
511
|
-
children: /* @__PURE__ */ t(we, { children: a.map((v) => /* @__PURE__ */ t(
|
|
511
|
+
children: /* @__PURE__ */ t(we, { children: a.map((v) => /* @__PURE__ */ t(Ge, { value: ee(v), children: et(v) ? v : v.value }, ee(v))) })
|
|
512
512
|
}
|
|
513
513
|
)
|
|
514
514
|
}
|
|
515
515
|
)
|
|
516
516
|
}
|
|
517
517
|
);
|
|
518
|
-
}, ge = (e) =>
|
|
518
|
+
}, ge = (e) => et(e) ? e : e.value, Wr = ({
|
|
519
519
|
id: e,
|
|
520
520
|
name: n,
|
|
521
521
|
label: r,
|
|
522
522
|
options: a,
|
|
523
523
|
controller: l,
|
|
524
|
-
labelIcon:
|
|
525
|
-
placeholderText:
|
|
524
|
+
labelIcon: o,
|
|
525
|
+
placeholderText: i,
|
|
526
526
|
onFilter: s,
|
|
527
|
-
variant:
|
|
527
|
+
variant: u,
|
|
528
528
|
...c
|
|
529
529
|
}) => {
|
|
530
530
|
const {
|
|
531
531
|
control: h,
|
|
532
|
-
formState: { errors:
|
|
533
|
-
} = xe(), [f, m] = x(!1), [v, T] = x(""), [g, p] = x(0), C = Y(), w =
|
|
532
|
+
formState: { errors: d }
|
|
533
|
+
} = xe(), [f, m] = x(!1), [v, T] = x(""), [g, p] = x(0), C = Y(), w = Ze(l.rules?.required) === !0, k = a.filter(
|
|
534
534
|
(y) => ge(y).toLowerCase().startsWith(v.toLowerCase())
|
|
535
535
|
), A = _(
|
|
536
536
|
() => k.map((y, S) => /* @__PURE__ */ t(
|
|
537
|
-
|
|
537
|
+
Ge,
|
|
538
538
|
{
|
|
539
539
|
value: ee(y),
|
|
540
540
|
isFocused: g === S,
|
|
@@ -547,7 +547,7 @@ const Ga = (e) => {
|
|
|
547
547
|
const D = k[g];
|
|
548
548
|
switch (m(!0), y.key) {
|
|
549
549
|
case "Enter": {
|
|
550
|
-
y.preventDefault(),
|
|
550
|
+
y.preventDefault(), u !== ae.typeaheadMulti ? T(ge(D)) : T(""), S.onChange(
|
|
551
551
|
Array.isArray(S.value) ? [...S.value, ee(D)] : ee(D)
|
|
552
552
|
), m(!1), p(0);
|
|
553
553
|
break;
|
|
@@ -558,7 +558,7 @@ const Ga = (e) => {
|
|
|
558
558
|
break;
|
|
559
559
|
}
|
|
560
560
|
case "Backspace": {
|
|
561
|
-
|
|
561
|
+
u === ae.typeahead && S.onChange("");
|
|
562
562
|
break;
|
|
563
563
|
}
|
|
564
564
|
case "ArrowUp":
|
|
@@ -576,10 +576,10 @@ const Ga = (e) => {
|
|
|
576
576
|
name: n,
|
|
577
577
|
label: r,
|
|
578
578
|
isRequired: w,
|
|
579
|
-
error: U(
|
|
580
|
-
labelIcon:
|
|
579
|
+
error: U(d, n),
|
|
580
|
+
labelIcon: o,
|
|
581
581
|
children: /* @__PURE__ */ t(
|
|
582
|
-
|
|
582
|
+
oe,
|
|
583
583
|
{
|
|
584
584
|
...l,
|
|
585
585
|
name: n,
|
|
@@ -602,13 +602,13 @@ const Ga = (e) => {
|
|
|
602
602
|
onClick: () => m(!f),
|
|
603
603
|
isExpanded: f,
|
|
604
604
|
isFullWidth: !0,
|
|
605
|
-
status: U(
|
|
605
|
+
status: U(d, n) ? je.danger : void 0,
|
|
606
606
|
children: /* @__PURE__ */ b(Tt, { isPlain: !0, children: [
|
|
607
607
|
/* @__PURE__ */ t(
|
|
608
608
|
St,
|
|
609
609
|
{
|
|
610
|
-
placeholder:
|
|
611
|
-
value:
|
|
610
|
+
placeholder: i,
|
|
611
|
+
value: u === ae.typeahead && y.value ? se(a) ? a.find(
|
|
612
612
|
(D) => D.key === (Array.isArray(y.value) ? y.value[0] : y.value)
|
|
613
613
|
)?.value : y.value : v,
|
|
614
614
|
onClick: () => m(!f),
|
|
@@ -621,9 +621,9 @@ const Ga = (e) => {
|
|
|
621
621
|
role: "combobox",
|
|
622
622
|
isExpanded: f,
|
|
623
623
|
"aria-controls": "select-typeahead-listbox",
|
|
624
|
-
children:
|
|
624
|
+
children: u === ae.typeaheadMulti && Array.isArray(y.value) && /* @__PURE__ */ t(ze, { "aria-label": "Current selections", children: y.value.map(
|
|
625
625
|
(D, F) => /* @__PURE__ */ t(
|
|
626
|
-
|
|
626
|
+
Je,
|
|
627
627
|
{
|
|
628
628
|
onClick: (E) => {
|
|
629
629
|
E.stopPropagation(), y.onChange(
|
|
@@ -656,7 +656,7 @@ const Ga = (e) => {
|
|
|
656
656
|
onSelect: (S, D) => {
|
|
657
657
|
S?.stopPropagation();
|
|
658
658
|
const F = D?.toString();
|
|
659
|
-
|
|
659
|
+
u === ae.typeaheadMulti && Array.isArray(y.value) ? y.value.includes(F) ? y.onChange(
|
|
660
660
|
y.value.filter((E) => E !== F)
|
|
661
661
|
) : y.onChange([...y.value, F]) : (y.onChange(Array.isArray(y.value) ? [F] : F), m(!1));
|
|
662
662
|
},
|
|
@@ -670,17 +670,17 @@ const Ga = (e) => {
|
|
|
670
670
|
);
|
|
671
671
|
};
|
|
672
672
|
var ae = /* @__PURE__ */ ((e) => (e.single = "single", e.typeahead = "typeahead", e.typeaheadMulti = "typeaheadMulti", e))(ae || {});
|
|
673
|
-
const se = (e) => typeof e[0] != "string",
|
|
673
|
+
const se = (e) => typeof e[0] != "string", et = (e) => typeof e == "string", ee = (e) => et(e) ? e : e.key, jr = ({
|
|
674
674
|
variant: e = "single",
|
|
675
675
|
...n
|
|
676
|
-
}) => e === "single" ? /* @__PURE__ */ t(
|
|
676
|
+
}) => e === "single" ? /* @__PURE__ */ t(Hr, { ...n }) : /* @__PURE__ */ t(Wr, { ...n, variant: e }), Qa = ({
|
|
677
677
|
labelOn: e,
|
|
678
678
|
stringify: n,
|
|
679
679
|
defaultValue: r,
|
|
680
680
|
labelIcon: a,
|
|
681
681
|
...l
|
|
682
682
|
}) => {
|
|
683
|
-
const
|
|
683
|
+
const i = r ?? (n ? "false" : !1), { control: s } = xe();
|
|
684
684
|
return /* @__PURE__ */ t(
|
|
685
685
|
ne,
|
|
686
686
|
{
|
|
@@ -690,22 +690,22 @@ const se = (e) => typeof e[0] != "string", tt = (e) => typeof e == "string", ee
|
|
|
690
690
|
label: l.label,
|
|
691
691
|
labelIcon: a,
|
|
692
692
|
children: /* @__PURE__ */ t(
|
|
693
|
-
|
|
693
|
+
oe,
|
|
694
694
|
{
|
|
695
695
|
control: s,
|
|
696
696
|
name: l.name,
|
|
697
|
-
defaultValue:
|
|
698
|
-
render: ({ field: { onChange:
|
|
699
|
-
|
|
697
|
+
defaultValue: i,
|
|
698
|
+
render: ({ field: { onChange: u, value: c } }) => /* @__PURE__ */ t(
|
|
699
|
+
pn,
|
|
700
700
|
{
|
|
701
701
|
...l,
|
|
702
702
|
id: l.name,
|
|
703
703
|
"data-testid": l.name,
|
|
704
704
|
label: e,
|
|
705
705
|
isChecked: n ? c === "true" : c,
|
|
706
|
-
onChange: (h,
|
|
707
|
-
const f = n ?
|
|
708
|
-
l.onChange?.(h,
|
|
706
|
+
onChange: (h, d) => {
|
|
707
|
+
const f = n ? d.toString() : d;
|
|
708
|
+
l.onChange?.(h, d), u(f);
|
|
709
709
|
}
|
|
710
710
|
}
|
|
711
711
|
)
|
|
@@ -713,8 +713,8 @@ const se = (e) => typeof e[0] != "string", tt = (e) => typeof e == "string", ee
|
|
|
713
713
|
)
|
|
714
714
|
}
|
|
715
715
|
);
|
|
716
|
-
},
|
|
717
|
-
const n = !!e.rules?.required, r = e.defaultValue ?? "", { field: a, fieldState: l } =
|
|
716
|
+
}, Ya = (e) => {
|
|
717
|
+
const n = !!e.rules?.required, r = e.defaultValue ?? "", { field: a, fieldState: l } = Qe({
|
|
718
718
|
...e,
|
|
719
719
|
defaultValue: r
|
|
720
720
|
});
|
|
@@ -739,10 +739,10 @@ const se = (e) => typeof e[0] != "string", tt = (e) => typeof e == "string", ee
|
|
|
739
739
|
)
|
|
740
740
|
}
|
|
741
741
|
);
|
|
742
|
-
},
|
|
743
|
-
const { labelIcon: n, helperText: r, ...a } = e, l = !!e.rules?.required,
|
|
742
|
+
}, Xa = (e) => {
|
|
743
|
+
const { labelIcon: n, helperText: r, ...a } = e, l = !!e.rules?.required, o = e.defaultValue ?? "", { field: i, fieldState: s } = Qe({
|
|
744
744
|
...e,
|
|
745
|
-
defaultValue:
|
|
745
|
+
defaultValue: o
|
|
746
746
|
});
|
|
747
747
|
return /* @__PURE__ */ b(
|
|
748
748
|
ne,
|
|
@@ -762,51 +762,51 @@ const se = (e) => typeof e[0] != "string", tt = (e) => typeof e == "string", ee
|
|
|
762
762
|
validated: s.error ? Q.error : Q.default,
|
|
763
763
|
isDisabled: e.isDisabled,
|
|
764
764
|
...a,
|
|
765
|
-
...
|
|
765
|
+
...i
|
|
766
766
|
}
|
|
767
767
|
),
|
|
768
|
-
r && /* @__PURE__ */ t(
|
|
768
|
+
r && /* @__PURE__ */ t(Ue, { children: /* @__PURE__ */ t(He, { children: /* @__PURE__ */ t(We, { children: r }) }) })
|
|
769
769
|
]
|
|
770
770
|
}
|
|
771
771
|
);
|
|
772
|
-
},
|
|
773
|
-
const n =
|
|
774
|
-
return /* @__PURE__ */ t(
|
|
772
|
+
}, Gr = Et, Za = ({ icon: e }) => {
|
|
773
|
+
const n = zr(e);
|
|
774
|
+
return /* @__PURE__ */ t(Le, { size: "lg", children: /* @__PURE__ */ t(n, { alt: e }) });
|
|
775
775
|
};
|
|
776
|
-
function
|
|
776
|
+
function zr(e) {
|
|
777
777
|
switch (e) {
|
|
778
778
|
case "github":
|
|
779
|
-
return
|
|
779
|
+
return cr;
|
|
780
780
|
case "facebook":
|
|
781
|
-
return
|
|
781
|
+
return sr;
|
|
782
782
|
case "gitlab":
|
|
783
783
|
return ir;
|
|
784
784
|
case "google":
|
|
785
|
-
return
|
|
785
|
+
return or;
|
|
786
786
|
case "linkedin":
|
|
787
787
|
case "linkedin-openid-connect":
|
|
788
|
-
return
|
|
788
|
+
return lr;
|
|
789
789
|
case "openshift-v3":
|
|
790
790
|
case "openshift-v4":
|
|
791
|
-
return
|
|
791
|
+
return ar;
|
|
792
792
|
case "stackoverflow":
|
|
793
|
-
return
|
|
793
|
+
return rr;
|
|
794
794
|
case "twitter":
|
|
795
|
-
return
|
|
795
|
+
return nr;
|
|
796
796
|
case "microsoft":
|
|
797
|
-
return
|
|
797
|
+
return tr;
|
|
798
798
|
case "bitbucket":
|
|
799
|
-
return
|
|
799
|
+
return er;
|
|
800
800
|
case "instagram":
|
|
801
|
-
return
|
|
801
|
+
return Zn;
|
|
802
802
|
case "paypal":
|
|
803
|
-
return
|
|
803
|
+
return Xn;
|
|
804
804
|
default:
|
|
805
|
-
return
|
|
805
|
+
return Yn;
|
|
806
806
|
}
|
|
807
807
|
}
|
|
808
|
-
const
|
|
809
|
-
title:
|
|
808
|
+
const Jr = "_title_180i0_2", Qr = {
|
|
809
|
+
title: Jr
|
|
810
810
|
}, Ut = ({
|
|
811
811
|
id: e,
|
|
812
812
|
title: n,
|
|
@@ -814,121 +814,121 @@ const zr = "_title_180i0_2", Jr = {
|
|
|
814
814
|
size: a = "xl",
|
|
815
815
|
...l
|
|
816
816
|
}) => /* @__PURE__ */ t(
|
|
817
|
-
|
|
817
|
+
mn,
|
|
818
818
|
{
|
|
819
819
|
headingLevel: r,
|
|
820
820
|
size: a,
|
|
821
|
-
className:
|
|
821
|
+
className: Qr.title,
|
|
822
822
|
id: e,
|
|
823
823
|
tabIndex: 0,
|
|
824
824
|
...l,
|
|
825
825
|
children: n
|
|
826
826
|
}
|
|
827
|
-
),
|
|
827
|
+
), Yr = ({
|
|
828
828
|
title: e,
|
|
829
829
|
children: n,
|
|
830
830
|
scrollId: r,
|
|
831
831
|
className: a
|
|
832
832
|
}) => {
|
|
833
833
|
const l = Ot();
|
|
834
|
-
return /* @__PURE__ */ b(
|
|
835
|
-
/* @__PURE__ */ t(
|
|
836
|
-
/* @__PURE__ */ t(
|
|
834
|
+
return /* @__PURE__ */ b(fn, { id: l, className: a, isFlat: !0, children: [
|
|
835
|
+
/* @__PURE__ */ t(gn, { className: "kc-form-panel__header", children: /* @__PURE__ */ t(yn, { tabIndex: 0, children: /* @__PURE__ */ t(Ut, { id: r, title: e }) }) }),
|
|
836
|
+
/* @__PURE__ */ t(vn, { className: "kc-form-panel__body", children: n })
|
|
837
837
|
] });
|
|
838
|
-
},
|
|
838
|
+
}, Xr = (e) => {
|
|
839
839
|
const { title: n, children: r, scrollId: a, ...l } = e;
|
|
840
840
|
return /* @__PURE__ */ t("section", { ...l, style: { marginTop: "var(--pf-v5-global--spacer--lg)" }, children: /* @__PURE__ */ b(J, { children: [
|
|
841
841
|
/* @__PURE__ */ t(Ut, { id: a, title: n }),
|
|
842
842
|
r
|
|
843
843
|
] }) });
|
|
844
|
-
},
|
|
845
|
-
panel:
|
|
846
|
-
sticky:
|
|
847
|
-
},
|
|
844
|
+
}, Zr = "_panel_1cdve_1", ea = "_sticky_1cdve_5", ut = {
|
|
845
|
+
panel: Zr,
|
|
846
|
+
sticky: ea
|
|
847
|
+
}, ta = "kc-main-content-page-container", ht = (e) => e.replace(/\s+/g, "-"), na = ({
|
|
848
848
|
label: e,
|
|
849
849
|
sections: n,
|
|
850
850
|
borders: r = !1,
|
|
851
851
|
...a
|
|
852
852
|
}) => {
|
|
853
853
|
const l = _(
|
|
854
|
-
() => n.filter(({ isHidden:
|
|
854
|
+
() => n.filter(({ isHidden: o }) => !o),
|
|
855
855
|
[n]
|
|
856
856
|
);
|
|
857
|
-
return /* @__PURE__ */ b(
|
|
858
|
-
/* @__PURE__ */ t(ot, { md: 8, sm: 12, children: l.map(({ title:
|
|
859
|
-
const s =
|
|
857
|
+
return /* @__PURE__ */ b(bn, { hasGutter: !0, ...a, children: [
|
|
858
|
+
/* @__PURE__ */ t(ot, { md: 8, sm: 12, children: l.map(({ title: o, panel: i }) => {
|
|
859
|
+
const s = ht(o.toLowerCase());
|
|
860
860
|
return /* @__PURE__ */ t(Ft, { children: r ? /* @__PURE__ */ t(
|
|
861
|
-
|
|
861
|
+
Yr,
|
|
862
862
|
{
|
|
863
863
|
scrollId: s,
|
|
864
|
-
title:
|
|
865
|
-
className:
|
|
866
|
-
children:
|
|
864
|
+
title: o,
|
|
865
|
+
className: ut.panel,
|
|
866
|
+
children: i
|
|
867
867
|
}
|
|
868
|
-
) : /* @__PURE__ */ t(
|
|
868
|
+
) : /* @__PURE__ */ t(Xr, { scrollId: s, title: o, children: i }) }, o);
|
|
869
869
|
}) }),
|
|
870
|
-
/* @__PURE__ */ t(ot, { md: 4, sm: 12, order: { default: "-1", md: "1" }, children: /* @__PURE__ */ t(
|
|
871
|
-
|
|
870
|
+
/* @__PURE__ */ t(ot, { md: 4, sm: 12, order: { default: "-1", md: "1" }, children: /* @__PURE__ */ t(Cn, { className: ut.sticky, children: /* @__PURE__ */ t(
|
|
871
|
+
kn,
|
|
872
872
|
{
|
|
873
873
|
isVertical: !0,
|
|
874
|
-
scrollableSelector: `#${
|
|
874
|
+
scrollableSelector: `#${ta}`,
|
|
875
875
|
label: e,
|
|
876
876
|
offset: 100,
|
|
877
|
-
children: l.map(({ title:
|
|
878
|
-
const
|
|
877
|
+
children: l.map(({ title: o }) => {
|
|
878
|
+
const i = ht(o.toLowerCase());
|
|
879
879
|
return (
|
|
880
880
|
// note that JumpLinks currently does not work with spaces in the href
|
|
881
881
|
/* @__PURE__ */ t(
|
|
882
|
-
|
|
882
|
+
In,
|
|
883
883
|
{
|
|
884
|
-
href: `#${
|
|
885
|
-
"data-testid": `jump-link-${
|
|
886
|
-
children:
|
|
884
|
+
href: `#${i}`,
|
|
885
|
+
"data-testid": `jump-link-${i}`,
|
|
886
|
+
children: o
|
|
887
887
|
},
|
|
888
|
-
|
|
888
|
+
o
|
|
889
889
|
)
|
|
890
890
|
);
|
|
891
891
|
})
|
|
892
892
|
}
|
|
893
893
|
) }) })
|
|
894
894
|
] });
|
|
895
|
-
},
|
|
895
|
+
}, ra = (e, n, r) => (e.isValid || r) && (e.isDirty || n) && !e.isLoading && !e.isValidating && !e.isSubmitting, el = ({
|
|
896
896
|
formState: e,
|
|
897
897
|
isDisabled: n = !1,
|
|
898
898
|
allowInvalid: r = !1,
|
|
899
899
|
allowNonDirty: a = !1,
|
|
900
900
|
children: l,
|
|
901
|
-
...
|
|
901
|
+
...o
|
|
902
902
|
}) => /* @__PURE__ */ t(
|
|
903
903
|
L,
|
|
904
904
|
{
|
|
905
905
|
variant: "primary",
|
|
906
|
-
isDisabled: e && !
|
|
907
|
-
...
|
|
906
|
+
isDisabled: e && !ra(e, a, r) || n,
|
|
907
|
+
...o,
|
|
908
908
|
type: "submit",
|
|
909
909
|
children: l
|
|
910
910
|
}
|
|
911
|
-
),
|
|
911
|
+
), aa = (e) => {
|
|
912
912
|
try {
|
|
913
913
|
return new Intl.DisplayNames([e], { type: "language" }).of(e);
|
|
914
914
|
} catch {
|
|
915
915
|
return e;
|
|
916
916
|
}
|
|
917
|
-
},
|
|
917
|
+
}, la = ({
|
|
918
918
|
t: e,
|
|
919
919
|
form: n,
|
|
920
920
|
supportedLocales: r,
|
|
921
921
|
currentLocale: a
|
|
922
922
|
}) => {
|
|
923
923
|
const l = _(
|
|
924
|
-
() => r.map((
|
|
925
|
-
key:
|
|
926
|
-
value: e(`locale_${
|
|
927
|
-
})).sort((
|
|
924
|
+
() => r.map((o) => ({
|
|
925
|
+
key: o,
|
|
926
|
+
value: e(`locale_${o}`, aa(o) ?? o)
|
|
927
|
+
})).sort((o, i) => o.value.localeCompare(i.value, a)),
|
|
928
928
|
[r, a, e]
|
|
929
929
|
);
|
|
930
|
-
return l.length ? /* @__PURE__ */ t(
|
|
931
|
-
|
|
930
|
+
return l.length ? /* @__PURE__ */ t(fr, { ...n, children: /* @__PURE__ */ t(
|
|
931
|
+
jr,
|
|
932
932
|
{
|
|
933
933
|
"data-testid": "locale-select",
|
|
934
934
|
name: "attributes.locale",
|
|
@@ -938,22 +938,22 @@ const zr = "_title_180i0_2", Jr = {
|
|
|
938
938
|
variant: l.length >= 10 ? "typeahead" : "single"
|
|
939
939
|
}
|
|
940
940
|
) }) : null;
|
|
941
|
-
},
|
|
942
|
-
const l = n || r,
|
|
943
|
-
return e(
|
|
944
|
-
},
|
|
941
|
+
}, _e = (e) => e?.includes("${"), qe = (e) => e.substring(2, e.length - 1), te = (e, n, r, a) => {
|
|
942
|
+
const l = n || r, o = _e(l) ? qe(l) : l, i = a ? `${a}.${o}` : o;
|
|
943
|
+
return e(i || "");
|
|
944
|
+
}, $e = (e, n) => te(e, n.displayName, n.name), oa = ["username", "firstName", "lastName", "email"], Ht = (e) => e && oa.includes(e), X = (e) => `${Ht(e) ? "" : "attributes."}${e?.replaceAll(
|
|
945
945
|
".",
|
|
946
946
|
"🍺"
|
|
947
|
-
)}`,
|
|
948
|
-
function
|
|
947
|
+
)}`, tl = (e) => e.replaceAll(".", "🍺"), nl = (e) => e.replaceAll("🍺", ".");
|
|
948
|
+
function rl(e, n, r) {
|
|
949
949
|
(e.responseData.errors !== void 0 ? e.responseData.errors : [e.responseData]).forEach((a) => {
|
|
950
950
|
const l = Object.assign(
|
|
951
951
|
{},
|
|
952
|
-
a.params?.map((
|
|
952
|
+
a.params?.map((o) => _e(o.toString()) ? r(qe(o)) : o)
|
|
953
953
|
);
|
|
954
954
|
n(X(a.field), {
|
|
955
955
|
message: r(
|
|
956
|
-
|
|
956
|
+
_e(a.errorMessage) ? qe(a.errorMessage) : a.errorMessage,
|
|
957
957
|
{
|
|
958
958
|
...l,
|
|
959
959
|
defaultValue: a.errorMessage || a.field
|
|
@@ -972,13 +972,13 @@ function Te({
|
|
|
972
972
|
function ia(e) {
|
|
973
973
|
return e && "length" in e && "min" in e.length && typeof e.length.min == "number" ? e.length.min > 0 : !1;
|
|
974
974
|
}
|
|
975
|
-
function
|
|
975
|
+
function al(e) {
|
|
976
976
|
if (typeof e != "object" || e === null || !("responseData" in e))
|
|
977
977
|
return !1;
|
|
978
978
|
const { responseData: n } = e;
|
|
979
|
-
return
|
|
979
|
+
return pt(n) ? !0 : typeof n != "object" || n === null || !("errors" in n) || !Array.isArray(n.errors) ? !1 : n.errors.every(pt);
|
|
980
980
|
}
|
|
981
|
-
function
|
|
981
|
+
function pt(e) {
|
|
982
982
|
return !(typeof e != "object" || e === null || !("field" in e) || typeof e.field != "string" || !("errorMessage" in e) || typeof e.errorMessage != "string");
|
|
983
983
|
}
|
|
984
984
|
const ue = ({
|
|
@@ -988,69 +988,69 @@ const ue = ({
|
|
|
988
988
|
renderer: a,
|
|
989
989
|
children: l
|
|
990
990
|
}) => {
|
|
991
|
-
const
|
|
991
|
+
const o = te(
|
|
992
992
|
e,
|
|
993
993
|
r.annotations?.inputHelperTextBefore
|
|
994
994
|
), {
|
|
995
|
-
formState: { errors:
|
|
996
|
-
} = n, s = a?.(r),
|
|
995
|
+
formState: { errors: i }
|
|
996
|
+
} = n, s = a?.(r), u = U(i, X(r.name));
|
|
997
997
|
return /* @__PURE__ */ b(
|
|
998
998
|
xt,
|
|
999
999
|
{
|
|
1000
|
-
label:
|
|
1000
|
+
label: $e(e, r) || "",
|
|
1001
1001
|
fieldId: r.name,
|
|
1002
1002
|
isRequired: Te(r),
|
|
1003
|
-
labelIcon:
|
|
1003
|
+
labelIcon: o ? /* @__PURE__ */ t($t, { helpText: o, fieldLabelId: r.name }) : void 0,
|
|
1004
1004
|
children: [
|
|
1005
1005
|
s ? /* @__PURE__ */ b(Ce, { children: [
|
|
1006
1006
|
l,
|
|
1007
1007
|
s
|
|
1008
1008
|
] }) : l,
|
|
1009
|
-
|
|
1009
|
+
u && /* @__PURE__ */ t(
|
|
1010
1010
|
qt,
|
|
1011
1011
|
{
|
|
1012
1012
|
"data-testid": `${r.name}-helper`,
|
|
1013
|
-
message:
|
|
1013
|
+
message: u.message
|
|
1014
1014
|
}
|
|
1015
1015
|
)
|
|
1016
1016
|
]
|
|
1017
1017
|
},
|
|
1018
1018
|
r.name
|
|
1019
1019
|
);
|
|
1020
|
-
},
|
|
1020
|
+
}, sa = ({
|
|
1021
1021
|
t: e,
|
|
1022
1022
|
form: n,
|
|
1023
1023
|
attribute: r,
|
|
1024
1024
|
renderer: a,
|
|
1025
1025
|
...l
|
|
1026
1026
|
}) => /* @__PURE__ */ t(ue, { t: e, form: n, attribute: r, renderer: a, children: /* @__PURE__ */ t(
|
|
1027
|
-
|
|
1027
|
+
ca,
|
|
1028
1028
|
{
|
|
1029
1029
|
t: e,
|
|
1030
1030
|
form: n,
|
|
1031
|
-
"aria-label":
|
|
1031
|
+
"aria-label": $e(e, r),
|
|
1032
1032
|
name: X(r.name),
|
|
1033
1033
|
addButtonLabel: e("addMultivaluedLabel", {
|
|
1034
|
-
fieldLabel:
|
|
1034
|
+
fieldLabel: $e(e, r)
|
|
1035
1035
|
}),
|
|
1036
1036
|
...l
|
|
1037
1037
|
}
|
|
1038
|
-
) }),
|
|
1038
|
+
) }), ca = ({
|
|
1039
1039
|
t: e,
|
|
1040
1040
|
name: n,
|
|
1041
1041
|
inputType: r,
|
|
1042
1042
|
form: a,
|
|
1043
1043
|
addButtonLabel: l,
|
|
1044
|
-
isDisabled:
|
|
1045
|
-
defaultValue:
|
|
1044
|
+
isDisabled: o = !1,
|
|
1045
|
+
defaultValue: i,
|
|
1046
1046
|
id: s,
|
|
1047
|
-
...
|
|
1047
|
+
...u
|
|
1048
1048
|
}) => {
|
|
1049
|
-
const { register: c, setValue: h, control:
|
|
1049
|
+
const { register: c, setValue: h, control: d } = a, f = gr({
|
|
1050
1050
|
name: n,
|
|
1051
|
-
control:
|
|
1052
|
-
defaultValue:
|
|
1053
|
-
}), m = _(() => Array.isArray(f) && f.length !== 0 ? f :
|
|
1051
|
+
control: d,
|
|
1052
|
+
defaultValue: i || ""
|
|
1053
|
+
}), m = _(() => Array.isArray(f) && f.length !== 0 ? f : i || [""], [f]), v = (w) => {
|
|
1054
1054
|
p([...m.slice(0, w), ...m.slice(w + 1)]);
|
|
1055
1055
|
}, T = () => {
|
|
1056
1056
|
p([...m, ""]);
|
|
@@ -1066,19 +1066,19 @@ const ue = ({
|
|
|
1066
1066
|
c(n);
|
|
1067
1067
|
}, [c]), /* @__PURE__ */ t("div", { id: s, children: m.map((w, k) => /* @__PURE__ */ b(Ft, { children: [
|
|
1068
1068
|
/* @__PURE__ */ b(Ce, { children: [
|
|
1069
|
-
/* @__PURE__ */ t(
|
|
1069
|
+
/* @__PURE__ */ t(Ne, { isFill: !0, children: /* @__PURE__ */ t(
|
|
1070
1070
|
ke,
|
|
1071
1071
|
{
|
|
1072
1072
|
"data-testid": n + k,
|
|
1073
1073
|
onChange: (A, V) => g(k, V),
|
|
1074
1074
|
name: `${n}.${k}.value`,
|
|
1075
1075
|
value: w,
|
|
1076
|
-
isDisabled:
|
|
1076
|
+
isDisabled: o,
|
|
1077
1077
|
type: C,
|
|
1078
|
-
...
|
|
1078
|
+
...u
|
|
1079
1079
|
}
|
|
1080
1080
|
) }),
|
|
1081
|
-
/* @__PURE__ */ t(
|
|
1081
|
+
/* @__PURE__ */ t(Ne, { children: /* @__PURE__ */ t(
|
|
1082
1082
|
L,
|
|
1083
1083
|
{
|
|
1084
1084
|
"data-testid": "remove" + k,
|
|
@@ -1086,8 +1086,8 @@ const ue = ({
|
|
|
1086
1086
|
onClick: () => v(k),
|
|
1087
1087
|
tabIndex: -1,
|
|
1088
1088
|
"aria-label": e("remove"),
|
|
1089
|
-
isDisabled: m.length === 1 ||
|
|
1090
|
-
children: /* @__PURE__ */ t(
|
|
1089
|
+
isDisabled: m.length === 1 || o,
|
|
1090
|
+
children: /* @__PURE__ */ t(dr, {})
|
|
1091
1091
|
}
|
|
1092
1092
|
) })
|
|
1093
1093
|
] }),
|
|
@@ -1099,7 +1099,7 @@ const ue = ({
|
|
|
1099
1099
|
tabIndex: -1,
|
|
1100
1100
|
"aria-label": e("add"),
|
|
1101
1101
|
"data-testid": "addValue",
|
|
1102
|
-
isDisabled: !w ||
|
|
1102
|
+
isDisabled: !w || o,
|
|
1103
1103
|
children: [
|
|
1104
1104
|
/* @__PURE__ */ t(Nt, {}),
|
|
1105
1105
|
" ",
|
|
@@ -1108,64 +1108,64 @@ const ue = ({
|
|
|
1108
1108
|
}
|
|
1109
1109
|
)
|
|
1110
1110
|
] }, k)) });
|
|
1111
|
-
},
|
|
1112
|
-
const { form: n, inputType: r, attribute: a } = e, l = Te(a),
|
|
1111
|
+
}, mt = (e) => {
|
|
1112
|
+
const { form: n, inputType: r, attribute: a } = e, l = Te(a), o = r.startsWith("multiselect"), i = o ? wn : xn, s = a.validators?.options?.options || [], u = a.annotations?.inputOptionLabels || {}, c = a.annotations?.inputOptionLabelsI18nPrefix;
|
|
1113
1113
|
return /* @__PURE__ */ t(ue, { ...e, children: /* @__PURE__ */ t(
|
|
1114
|
-
|
|
1114
|
+
oe,
|
|
1115
1115
|
{
|
|
1116
1116
|
name: X(a.name),
|
|
1117
1117
|
control: n.control,
|
|
1118
1118
|
defaultValue: "",
|
|
1119
|
-
render: ({ field: h }) => /* @__PURE__ */ t(J, { children: s.map((
|
|
1120
|
-
|
|
1119
|
+
render: ({ field: h }) => /* @__PURE__ */ t(J, { children: s.map((d) => /* @__PURE__ */ t(
|
|
1120
|
+
i,
|
|
1121
1121
|
{
|
|
1122
|
-
id:
|
|
1123
|
-
"data-testid":
|
|
1124
|
-
label: te(e.t, d
|
|
1125
|
-
value:
|
|
1126
|
-
isChecked: h.value.includes(
|
|
1122
|
+
id: d,
|
|
1123
|
+
"data-testid": d,
|
|
1124
|
+
label: te(e.t, u[d], d, c),
|
|
1125
|
+
value: d,
|
|
1126
|
+
isChecked: h.value.includes(d),
|
|
1127
1127
|
onChange: () => {
|
|
1128
|
-
|
|
1129
|
-
h.value.filter((f) => f !==
|
|
1130
|
-
) : h.onChange([...h.value,
|
|
1128
|
+
o ? h.value.includes(d) ? h.onChange(
|
|
1129
|
+
h.value.filter((f) => f !== d)
|
|
1130
|
+
) : h.onChange([...h.value, d]) : h.onChange([d]);
|
|
1131
1131
|
},
|
|
1132
1132
|
readOnly: a.readOnly,
|
|
1133
1133
|
isRequired: l
|
|
1134
1134
|
},
|
|
1135
|
-
|
|
1135
|
+
d
|
|
1136
1136
|
)) })
|
|
1137
1137
|
}
|
|
1138
1138
|
) });
|
|
1139
|
-
},
|
|
1139
|
+
}, da = ({
|
|
1140
1140
|
toggleId: e,
|
|
1141
1141
|
onToggle: n,
|
|
1142
1142
|
onSelect: r,
|
|
1143
1143
|
selections: a,
|
|
1144
1144
|
isOpen: l,
|
|
1145
|
-
menuAppendTo:
|
|
1146
|
-
direction:
|
|
1145
|
+
menuAppendTo: o,
|
|
1146
|
+
direction: i,
|
|
1147
1147
|
width: s,
|
|
1148
|
-
maxHeight:
|
|
1148
|
+
maxHeight: u,
|
|
1149
1149
|
toggleIcon: c,
|
|
1150
1150
|
className: h,
|
|
1151
|
-
isDisabled:
|
|
1151
|
+
isDisabled: d,
|
|
1152
1152
|
children: f,
|
|
1153
1153
|
...m
|
|
1154
1154
|
}) => {
|
|
1155
1155
|
const [v, T] = x(!1), g = Y(), p = () => {
|
|
1156
1156
|
T(!v), n(!v);
|
|
1157
|
-
}, C = () =>
|
|
1157
|
+
}, C = () => o === "parent" && g.current?.parentElement || "inline", w = Mt.toArray(
|
|
1158
1158
|
f
|
|
1159
1159
|
);
|
|
1160
1160
|
return /* @__PURE__ */ t(
|
|
1161
1161
|
Ie,
|
|
1162
1162
|
{
|
|
1163
1163
|
ref: g,
|
|
1164
|
-
maxMenuHeight: be(
|
|
1164
|
+
maxMenuHeight: be(u),
|
|
1165
1165
|
isScrollable: !0,
|
|
1166
1166
|
popperProps: {
|
|
1167
1167
|
appendTo: C(),
|
|
1168
|
-
direction:
|
|
1168
|
+
direction: i,
|
|
1169
1169
|
width: be(s)
|
|
1170
1170
|
},
|
|
1171
1171
|
...m,
|
|
@@ -1187,7 +1187,7 @@ const ue = ({
|
|
|
1187
1187
|
isExpanded: l,
|
|
1188
1188
|
"aria-label": m["aria-label"],
|
|
1189
1189
|
icon: c,
|
|
1190
|
-
isDisabled:
|
|
1190
|
+
isDisabled: d,
|
|
1191
1191
|
isFullWidth: !0,
|
|
1192
1192
|
children: w.find((A) => A.props.value === a)?.props.children || a || m["aria-label"]
|
|
1193
1193
|
}
|
|
@@ -1196,19 +1196,19 @@ const ue = ({
|
|
|
1196
1196
|
children: /* @__PURE__ */ t(we, { children: f })
|
|
1197
1197
|
}
|
|
1198
1198
|
);
|
|
1199
|
-
},
|
|
1199
|
+
}, ua = ({
|
|
1200
1200
|
toggleId: e,
|
|
1201
1201
|
onSelect: n,
|
|
1202
1202
|
onToggle: r,
|
|
1203
1203
|
onFilter: a,
|
|
1204
1204
|
variant: l,
|
|
1205
|
-
validated:
|
|
1206
|
-
placeholderText:
|
|
1205
|
+
validated: o,
|
|
1206
|
+
placeholderText: i,
|
|
1207
1207
|
maxHeight: s,
|
|
1208
|
-
width:
|
|
1208
|
+
width: u,
|
|
1209
1209
|
toggleIcon: c,
|
|
1210
1210
|
direction: h,
|
|
1211
|
-
selections:
|
|
1211
|
+
selections: d,
|
|
1212
1212
|
typeAheadAriaLabel: f,
|
|
1213
1213
|
chipGroupComponent: m,
|
|
1214
1214
|
chipGroupProps: v,
|
|
@@ -1253,7 +1253,7 @@ const ue = ({
|
|
|
1253
1253
|
onOpenChange: (E) => r?.(E),
|
|
1254
1254
|
onSelect: (E, M) => n?.(M || ""),
|
|
1255
1255
|
maxMenuHeight: be(s),
|
|
1256
|
-
popperProps: { direction: h, width: be(
|
|
1256
|
+
popperProps: { direction: h, width: be(u) },
|
|
1257
1257
|
toggle: (E) => /* @__PURE__ */ t(
|
|
1258
1258
|
de,
|
|
1259
1259
|
{
|
|
@@ -1265,13 +1265,13 @@ const ue = ({
|
|
|
1265
1265
|
isDisabled: g,
|
|
1266
1266
|
isExpanded: C.isOpen,
|
|
1267
1267
|
isFullWidth: !0,
|
|
1268
|
-
status:
|
|
1268
|
+
status: o === "error" ? je.danger : void 0,
|
|
1269
1269
|
children: /* @__PURE__ */ b(Tt, { isPlain: !0, children: [
|
|
1270
1270
|
/* @__PURE__ */ t(
|
|
1271
1271
|
St,
|
|
1272
1272
|
{
|
|
1273
|
-
placeholder:
|
|
1274
|
-
value: l === z.typeahead &&
|
|
1273
|
+
placeholder: i,
|
|
1274
|
+
value: l === z.typeahead && d ? d : w,
|
|
1275
1275
|
onClick: D,
|
|
1276
1276
|
onChange: (M, N) => {
|
|
1277
1277
|
k(N), a?.(N);
|
|
@@ -1283,8 +1283,8 @@ const ue = ({
|
|
|
1283
1283
|
isExpanded: C.isOpen,
|
|
1284
1284
|
"aria-controls": "select-typeahead-listbox",
|
|
1285
1285
|
"aria-label": f,
|
|
1286
|
-
children: l === z.typeaheadMulti && Array.isArray(
|
|
1287
|
-
|
|
1286
|
+
children: l === z.typeaheadMulti && Array.isArray(d) && (m || /* @__PURE__ */ t(ze, { ...v, children: d.map((M, N) => /* @__PURE__ */ t(
|
|
1287
|
+
Je,
|
|
1288
1288
|
{
|
|
1289
1289
|
onClick: (Se) => {
|
|
1290
1290
|
Se.stopPropagation(), n?.(M);
|
|
@@ -1311,22 +1311,22 @@ const ue = ({
|
|
|
1311
1311
|
),
|
|
1312
1312
|
children: [
|
|
1313
1313
|
/* @__PURE__ */ t(we, { children: p }),
|
|
1314
|
-
T && /* @__PURE__ */ t(
|
|
1314
|
+
T && /* @__PURE__ */ t(Tn, { children: T })
|
|
1315
1315
|
]
|
|
1316
1316
|
}
|
|
1317
1317
|
);
|
|
1318
1318
|
};
|
|
1319
1319
|
var z = /* @__PURE__ */ ((e) => (e.single = "single", e.typeahead = "typeahead", e.typeaheadMulti = "typeaheadMulti", e))(z || {});
|
|
1320
|
-
const be = (e) => typeof e == "number" ? e + "px" : e,
|
|
1320
|
+
const be = (e) => typeof e == "number" ? e + "px" : e, ha = ({
|
|
1321
1321
|
variant: e = "single",
|
|
1322
1322
|
...n
|
|
1323
|
-
}) => e === "single" ? /* @__PURE__ */ t(
|
|
1324
|
-
const { t: n, form: r, inputType: a, attribute: l } = e, [
|
|
1323
|
+
}) => e === "single" ? /* @__PURE__ */ t(da, { ...n }) : /* @__PURE__ */ t(ua, { ...n, variant: e }), ft = (e) => {
|
|
1324
|
+
const { t: n, form: r, inputType: a, attribute: l } = e, [o, i] = x(!1), [s, u] = x(""), c = a === "multiselect", h = (g, p) => {
|
|
1325
1325
|
c ? p.value.includes(g) ? p.onChange(p.value.filter((C) => C !== g)) : Array.isArray(p.value) ? p.onChange([...p.value, g]) : p.onChange([g]) : p.onChange(g === p.value ? "" : g);
|
|
1326
|
-
},
|
|
1326
|
+
}, d = l.validators?.options?.options || [], f = l.annotations?.inputOptionLabels || {}, m = l.annotations?.inputOptionLabelsI18nPrefix, v = (g) => te(e.t, f[g], g, m), T = (g) => d.filter(
|
|
1327
1327
|
(p) => v(p).toLowerCase().includes(s.toLowerCase())
|
|
1328
1328
|
).map((p) => /* @__PURE__ */ t(
|
|
1329
|
-
|
|
1329
|
+
Ge,
|
|
1330
1330
|
{
|
|
1331
1331
|
selected: g === p,
|
|
1332
1332
|
value: p,
|
|
@@ -1335,36 +1335,36 @@ const be = (e) => typeof e == "number" ? e + "px" : e, ua = ({
|
|
|
1335
1335
|
p
|
|
1336
1336
|
));
|
|
1337
1337
|
return /* @__PURE__ */ t(ue, { ...e, children: /* @__PURE__ */ t(
|
|
1338
|
-
|
|
1338
|
+
oe,
|
|
1339
1339
|
{
|
|
1340
1340
|
name: X(l.name),
|
|
1341
1341
|
defaultValue: "",
|
|
1342
1342
|
control: r.control,
|
|
1343
1343
|
render: ({ field: g }) => /* @__PURE__ */ t(
|
|
1344
|
-
|
|
1344
|
+
ha,
|
|
1345
1345
|
{
|
|
1346
1346
|
toggleId: l.name,
|
|
1347
|
-
onToggle: (p) =>
|
|
1347
|
+
onToggle: (p) => i(p),
|
|
1348
1348
|
onClear: () => h("", g),
|
|
1349
1349
|
onSelect: (p) => {
|
|
1350
1350
|
const C = p.toString();
|
|
1351
|
-
h(C, g), Array.isArray(g.value) ||
|
|
1351
|
+
h(C, g), Array.isArray(g.value) || i(!1);
|
|
1352
1352
|
},
|
|
1353
1353
|
selections: c && Array.isArray(g.value) ? g.value : v(g.value),
|
|
1354
|
-
variant: c ? z.typeaheadMulti :
|
|
1354
|
+
variant: c ? z.typeaheadMulti : d.length >= 10 ? z.typeahead : z.single,
|
|
1355
1355
|
"aria-label": n("selectOne"),
|
|
1356
|
-
isOpen:
|
|
1356
|
+
isOpen: o,
|
|
1357
1357
|
isDisabled: l.readOnly,
|
|
1358
|
-
onFilter: (p) => (
|
|
1358
|
+
onFilter: (p) => (u(p), T(g.value)),
|
|
1359
1359
|
children: T(g.value)
|
|
1360
1360
|
}
|
|
1361
1361
|
)
|
|
1362
1362
|
}
|
|
1363
1363
|
) });
|
|
1364
|
-
},
|
|
1364
|
+
}, pa = (e) => {
|
|
1365
1365
|
const { form: n, attribute: r } = e, a = Te(r);
|
|
1366
1366
|
return /* @__PURE__ */ t(ue, { ...e, children: /* @__PURE__ */ t(
|
|
1367
|
-
|
|
1367
|
+
Gr,
|
|
1368
1368
|
{
|
|
1369
1369
|
id: r.name,
|
|
1370
1370
|
"data-testid": r.name,
|
|
@@ -1376,13 +1376,13 @@ const be = (e) => typeof e == "number" ? e + "px" : e, ua = ({
|
|
|
1376
1376
|
}
|
|
1377
1377
|
) });
|
|
1378
1378
|
}, q = (e) => {
|
|
1379
|
-
const { form: n, inputType: r, attribute: a } = e, l = Te(a),
|
|
1379
|
+
const { form: n, inputType: r, attribute: a } = e, l = Te(a), o = r.startsWith("html") ? r.substring(6) : "text";
|
|
1380
1380
|
return /* @__PURE__ */ t(ue, { ...e, children: /* @__PURE__ */ t(
|
|
1381
1381
|
ke,
|
|
1382
1382
|
{
|
|
1383
1383
|
id: a.name,
|
|
1384
1384
|
"data-testid": a.name,
|
|
1385
|
-
type:
|
|
1385
|
+
type: o,
|
|
1386
1386
|
placeholder: te(
|
|
1387
1387
|
e.t,
|
|
1388
1388
|
a.annotations?.inputTypePlaceholder,
|
|
@@ -1394,13 +1394,13 @@ const be = (e) => typeof e == "number" ? e + "px" : e, ua = ({
|
|
|
1394
1394
|
...n.register(X(a.name))
|
|
1395
1395
|
}
|
|
1396
1396
|
) });
|
|
1397
|
-
},
|
|
1397
|
+
}, Ke = {
|
|
1398
1398
|
text: q,
|
|
1399
|
-
textarea:
|
|
1400
|
-
select:
|
|
1401
|
-
"select-radiobuttons":
|
|
1402
|
-
multiselect:
|
|
1403
|
-
"multiselect-checkboxes":
|
|
1399
|
+
textarea: pa,
|
|
1400
|
+
select: ft,
|
|
1401
|
+
"select-radiobuttons": mt,
|
|
1402
|
+
multiselect: ft,
|
|
1403
|
+
"multiselect-checkboxes": mt,
|
|
1404
1404
|
"html5-email": q,
|
|
1405
1405
|
"html5-tel": q,
|
|
1406
1406
|
"html5-url": q,
|
|
@@ -1410,51 +1410,51 @@ const be = (e) => typeof e == "number" ? e + "px" : e, ua = ({
|
|
|
1410
1410
|
"html5-date": q,
|
|
1411
1411
|
"html5-month": q,
|
|
1412
1412
|
"html5-time": q,
|
|
1413
|
-
"multi-input":
|
|
1414
|
-
},
|
|
1413
|
+
"multi-input": sa
|
|
1414
|
+
}, ll = ({
|
|
1415
1415
|
t: e,
|
|
1416
1416
|
form: n,
|
|
1417
1417
|
userProfileMetadata: r,
|
|
1418
1418
|
supportedLocales: a,
|
|
1419
1419
|
currentLocale: l,
|
|
1420
|
-
hideReadOnly:
|
|
1421
|
-
renderer:
|
|
1420
|
+
hideReadOnly: o = !1,
|
|
1421
|
+
renderer: i
|
|
1422
1422
|
}) => {
|
|
1423
1423
|
const s = _(() => {
|
|
1424
1424
|
if (!r.attributes)
|
|
1425
1425
|
return [];
|
|
1426
|
-
const
|
|
1426
|
+
const u = o ? r.attributes.filter(({ readOnly: c }) => !c) : r.attributes;
|
|
1427
1427
|
return [
|
|
1428
1428
|
// Insert an empty group for attributes without a group.
|
|
1429
1429
|
{ name: void 0 },
|
|
1430
1430
|
...r.groups ?? []
|
|
1431
1431
|
].map((c) => ({
|
|
1432
1432
|
group: c,
|
|
1433
|
-
attributes:
|
|
1433
|
+
attributes: u.filter(
|
|
1434
1434
|
(h) => h.group === c.name
|
|
1435
1435
|
)
|
|
1436
1436
|
}));
|
|
1437
1437
|
}, [
|
|
1438
|
-
|
|
1438
|
+
o,
|
|
1439
1439
|
r.groups,
|
|
1440
1440
|
r.attributes
|
|
1441
1441
|
]);
|
|
1442
1442
|
return s.length === 0 ? null : /* @__PURE__ */ t(
|
|
1443
|
-
|
|
1443
|
+
na,
|
|
1444
1444
|
{
|
|
1445
1445
|
label: e("jumpToSection"),
|
|
1446
|
-
sections: s.filter((
|
|
1447
|
-
title: te(e,
|
|
1446
|
+
sections: s.filter((u) => u.attributes.length > 0).map(({ group: u, attributes: c }) => ({
|
|
1447
|
+
title: te(e, u.displayHeader, u.name) || e("general"),
|
|
1448
1448
|
panel: /* @__PURE__ */ b("div", { className: "pf-v5-c-form", children: [
|
|
1449
|
-
|
|
1449
|
+
u.displayDescription && /* @__PURE__ */ t(Pe, { className: "pf-v5-u-pb-lg", children: te(e, u.displayDescription, "") }),
|
|
1450
1450
|
c.map((h) => /* @__PURE__ */ t(
|
|
1451
|
-
|
|
1451
|
+
ma,
|
|
1452
1452
|
{
|
|
1453
1453
|
t: e,
|
|
1454
1454
|
form: n,
|
|
1455
1455
|
supportedLocales: a,
|
|
1456
1456
|
currentLocale: l,
|
|
1457
|
-
renderer:
|
|
1457
|
+
renderer: i,
|
|
1458
1458
|
attribute: h
|
|
1459
1459
|
},
|
|
1460
1460
|
h.name
|
|
@@ -1463,51 +1463,51 @@ const be = (e) => typeof e == "number" ? e + "px" : e, ua = ({
|
|
|
1463
1463
|
}))
|
|
1464
1464
|
}
|
|
1465
1465
|
);
|
|
1466
|
-
},
|
|
1466
|
+
}, ma = ({
|
|
1467
1467
|
t: e,
|
|
1468
1468
|
form: n,
|
|
1469
1469
|
renderer: r,
|
|
1470
1470
|
supportedLocales: a,
|
|
1471
1471
|
currentLocale: l,
|
|
1472
|
-
attribute:
|
|
1472
|
+
attribute: o
|
|
1473
1473
|
}) => {
|
|
1474
|
-
const
|
|
1475
|
-
X(
|
|
1476
|
-
), s = _(() =>
|
|
1477
|
-
return
|
|
1478
|
-
|
|
1474
|
+
const i = n.watch(
|
|
1475
|
+
X(o.name)
|
|
1476
|
+
), s = _(() => ga(o), [o]), u = o.multivalued || va(i) && o.annotations?.inputType === void 0 ? Ke["multi-input"] : Ke[s];
|
|
1477
|
+
return o.name === "locale" ? /* @__PURE__ */ t(
|
|
1478
|
+
la,
|
|
1479
1479
|
{
|
|
1480
1480
|
form: n,
|
|
1481
1481
|
supportedLocales: a,
|
|
1482
1482
|
currentLocale: l,
|
|
1483
1483
|
t: e,
|
|
1484
|
-
attribute:
|
|
1484
|
+
attribute: o
|
|
1485
1485
|
}
|
|
1486
1486
|
) : /* @__PURE__ */ t(
|
|
1487
|
-
|
|
1487
|
+
u,
|
|
1488
1488
|
{
|
|
1489
1489
|
t: e,
|
|
1490
1490
|
form: n,
|
|
1491
1491
|
inputType: s,
|
|
1492
|
-
attribute:
|
|
1492
|
+
attribute: o,
|
|
1493
1493
|
renderer: r
|
|
1494
1494
|
}
|
|
1495
1495
|
);
|
|
1496
|
-
},
|
|
1497
|
-
function
|
|
1496
|
+
}, fa = "text";
|
|
1497
|
+
function ga(e) {
|
|
1498
1498
|
if (Ht(e.name))
|
|
1499
1499
|
return "text";
|
|
1500
1500
|
const n = e.annotations?.inputType;
|
|
1501
|
-
return
|
|
1501
|
+
return ya(n) ? n : fa;
|
|
1502
1502
|
}
|
|
1503
|
-
const
|
|
1503
|
+
const ya = (e) => typeof e == "string" && e in Ke, va = (e) => Array.isArray(e) && e.length > 1, ba = ({
|
|
1504
1504
|
className: e = "",
|
|
1505
1505
|
border: n,
|
|
1506
1506
|
size: r = "md"
|
|
1507
1507
|
}) => /* @__PURE__ */ b(
|
|
1508
1508
|
"svg",
|
|
1509
1509
|
{
|
|
1510
|
-
className:
|
|
1510
|
+
className: br(
|
|
1511
1511
|
me.avatar,
|
|
1512
1512
|
me.modifiers[r],
|
|
1513
1513
|
n === "light" && me.modifiers.light,
|
|
@@ -1620,76 +1620,76 @@ const ga = (e) => typeof e == "string" && e in Ue, ya = (e) => Array.isArray(e)
|
|
|
1620
1620
|
] }) })
|
|
1621
1621
|
]
|
|
1622
1622
|
}
|
|
1623
|
-
),
|
|
1623
|
+
), gt = ({
|
|
1624
1624
|
isKebab: e = !1,
|
|
1625
1625
|
title: n,
|
|
1626
1626
|
dropDownItems: r,
|
|
1627
1627
|
...a
|
|
1628
1628
|
}) => {
|
|
1629
|
-
const [l,
|
|
1629
|
+
const [l, o] = x(!1);
|
|
1630
1630
|
return /* @__PURE__ */ t(
|
|
1631
|
-
|
|
1631
|
+
Sn,
|
|
1632
1632
|
{
|
|
1633
1633
|
...a,
|
|
1634
1634
|
popperProps: {
|
|
1635
1635
|
position: "right"
|
|
1636
1636
|
},
|
|
1637
|
-
onOpenChange: (
|
|
1638
|
-
toggle: (
|
|
1637
|
+
onOpenChange: (i) => o(i),
|
|
1638
|
+
toggle: (i) => /* @__PURE__ */ t(
|
|
1639
1639
|
de,
|
|
1640
1640
|
{
|
|
1641
1641
|
"data-testid": `${a["data-testid"]}-toggle`,
|
|
1642
|
-
ref:
|
|
1643
|
-
onClick: () =>
|
|
1642
|
+
ref: i,
|
|
1643
|
+
onClick: () => o(!l),
|
|
1644
1644
|
isExpanded: l,
|
|
1645
1645
|
variant: e ? "plain" : "default",
|
|
1646
|
-
children: e ? /* @__PURE__ */ t(
|
|
1646
|
+
children: e ? /* @__PURE__ */ t(ur, {}) : n
|
|
1647
1647
|
}
|
|
1648
1648
|
),
|
|
1649
1649
|
isOpen: l,
|
|
1650
|
-
children: /* @__PURE__ */ t(
|
|
1650
|
+
children: /* @__PURE__ */ t(An, { children: r })
|
|
1651
1651
|
}
|
|
1652
1652
|
);
|
|
1653
1653
|
};
|
|
1654
|
-
function
|
|
1654
|
+
function Ca(e, n) {
|
|
1655
1655
|
if (!e)
|
|
1656
1656
|
return n("unknownUser");
|
|
1657
1657
|
const r = e.given_name, a = e.family_name, l = e.preferred_username;
|
|
1658
1658
|
return r && a ? n("fullName", { givenName: r, familyName: a }) : r || a || l || n("unknownUser");
|
|
1659
1659
|
}
|
|
1660
|
-
const
|
|
1660
|
+
const ol = ({
|
|
1661
1661
|
keycloak: e,
|
|
1662
1662
|
brand: { src: n, alt: r, className: a, ...l },
|
|
1663
|
-
avatar:
|
|
1663
|
+
avatar: o,
|
|
1664
1664
|
features: {
|
|
1665
|
-
hasLogout:
|
|
1665
|
+
hasLogout: i = !0,
|
|
1666
1666
|
hasManageAccount: s = !0,
|
|
1667
|
-
hasUsername:
|
|
1667
|
+
hasUsername: u = !0
|
|
1668
1668
|
} = {},
|
|
1669
1669
|
kebabDropdownItems: c,
|
|
1670
1670
|
dropdownItems: h = [],
|
|
1671
|
-
toolbarItems:
|
|
1671
|
+
toolbarItems: d,
|
|
1672
1672
|
...f
|
|
1673
1673
|
}) => {
|
|
1674
1674
|
const { t: m } = B(), v = [];
|
|
1675
1675
|
s && v.push(
|
|
1676
1676
|
/* @__PURE__ */ t(
|
|
1677
|
-
|
|
1677
|
+
it,
|
|
1678
1678
|
{
|
|
1679
1679
|
onClick: () => e.accountManagement(),
|
|
1680
1680
|
children: m("manageAccount")
|
|
1681
1681
|
},
|
|
1682
1682
|
"manageAccount"
|
|
1683
1683
|
)
|
|
1684
|
-
),
|
|
1685
|
-
/* @__PURE__ */ t(
|
|
1684
|
+
), i && v.push(
|
|
1685
|
+
/* @__PURE__ */ t(it, { onClick: () => e.logout(), children: m("signOut") }, "signOut")
|
|
1686
1686
|
);
|
|
1687
1687
|
const T = e.idTokenParsed?.picture;
|
|
1688
|
-
return /* @__PURE__ */ b(
|
|
1689
|
-
/* @__PURE__ */ t(
|
|
1690
|
-
/* @__PURE__ */ t(
|
|
1691
|
-
/* @__PURE__ */ t(
|
|
1692
|
-
|
|
1688
|
+
return /* @__PURE__ */ b(En, { ...f, children: [
|
|
1689
|
+
/* @__PURE__ */ t(Rn, { children: /* @__PURE__ */ t(Dn, { variant: "plain", "aria-label": m("navigation"), children: /* @__PURE__ */ t(hr, {}) }) }),
|
|
1690
|
+
/* @__PURE__ */ t(On, { ...l, children: /* @__PURE__ */ t("img", { src: n, alt: r, className: a }) }),
|
|
1691
|
+
/* @__PURE__ */ t(Fn, { children: /* @__PURE__ */ t(ye, { children: /* @__PURE__ */ b(Be, { children: [
|
|
1692
|
+
d?.map((g, p) => /* @__PURE__ */ t(K, { align: { default: "alignRight" }, children: g }, p)),
|
|
1693
1693
|
/* @__PURE__ */ t(
|
|
1694
1694
|
K,
|
|
1695
1695
|
{
|
|
@@ -1698,11 +1698,11 @@ const al = ({
|
|
|
1698
1698
|
md: "visible"
|
|
1699
1699
|
},
|
|
1700
1700
|
children: /* @__PURE__ */ t(
|
|
1701
|
-
|
|
1701
|
+
gt,
|
|
1702
1702
|
{
|
|
1703
1703
|
"data-testid": "options",
|
|
1704
1704
|
dropDownItems: [...h, v],
|
|
1705
|
-
title:
|
|
1705
|
+
title: u ? Ca(e.idTokenParsed, m) : void 0
|
|
1706
1706
|
}
|
|
1707
1707
|
)
|
|
1708
1708
|
}
|
|
@@ -1715,7 +1715,7 @@ const al = ({
|
|
|
1715
1715
|
md: "hidden"
|
|
1716
1716
|
},
|
|
1717
1717
|
children: /* @__PURE__ */ t(
|
|
1718
|
-
|
|
1718
|
+
gt,
|
|
1719
1719
|
{
|
|
1720
1720
|
"data-testid": "options-kebab",
|
|
1721
1721
|
isKebab: !0,
|
|
@@ -1733,13 +1733,13 @@ const al = ({
|
|
|
1733
1733
|
variant: "overflow-menu",
|
|
1734
1734
|
align: { default: "alignRight" },
|
|
1735
1735
|
className: "pf-v5-u-m-0-on-lg",
|
|
1736
|
-
children: T ||
|
|
1736
|
+
children: T || o?.src ? /* @__PURE__ */ t(Mn, { src: T, alt: m("avatar"), ...o }) : /* @__PURE__ */ t(ba, { ...o })
|
|
1737
1737
|
}
|
|
1738
1738
|
)
|
|
1739
1739
|
] }) }) })
|
|
1740
1740
|
] });
|
|
1741
|
-
}, Wt =
|
|
1742
|
-
class
|
|
1741
|
+
}, Wt = Ye("ErrorBoundaryContext", void 0), jt = () => Xe(Wt);
|
|
1742
|
+
class il extends Wn {
|
|
1743
1743
|
state = {};
|
|
1744
1744
|
static getDerivedStateFromError = (n) => ({ error: n });
|
|
1745
1745
|
showBoundary = (n) => {
|
|
@@ -1755,88 +1755,88 @@ class ll extends Hn {
|
|
|
1755
1755
|
);
|
|
1756
1756
|
}
|
|
1757
1757
|
}
|
|
1758
|
-
const
|
|
1758
|
+
const sl = ({ children: e, fallback: n }) => {
|
|
1759
1759
|
const { error: r } = jt();
|
|
1760
1760
|
return r ? /* @__PURE__ */ t(n, { error: r }) : e;
|
|
1761
1761
|
};
|
|
1762
|
-
function
|
|
1762
|
+
function ka(e, n, r) {
|
|
1763
1763
|
const { showBoundary: a } = jt();
|
|
1764
1764
|
le(() => {
|
|
1765
|
-
const l = new AbortController(), { signal:
|
|
1766
|
-
return e().then((
|
|
1767
|
-
|
|
1768
|
-
}).catch((
|
|
1769
|
-
console.error(
|
|
1765
|
+
const l = new AbortController(), { signal: o } = l;
|
|
1766
|
+
return e().then((i) => {
|
|
1767
|
+
o.aborted || n(i);
|
|
1768
|
+
}).catch((i) => {
|
|
1769
|
+
console.error(i), o.aborted || a(i);
|
|
1770
1770
|
}), () => l.abort();
|
|
1771
1771
|
}, r);
|
|
1772
1772
|
}
|
|
1773
|
-
const
|
|
1773
|
+
const Ia = ({
|
|
1774
1774
|
message: e,
|
|
1775
1775
|
instructions: n,
|
|
1776
1776
|
onPrimaryAction: r,
|
|
1777
1777
|
hasIcon: a = !0,
|
|
1778
1778
|
isSearchVariant: l,
|
|
1779
|
-
primaryActionText:
|
|
1780
|
-
secondaryActions:
|
|
1779
|
+
primaryActionText: o,
|
|
1780
|
+
secondaryActions: i,
|
|
1781
1781
|
icon: s,
|
|
1782
|
-
isDisabled:
|
|
1783
|
-
}) => /* @__PURE__ */ b(
|
|
1784
|
-
a && l ? /* @__PURE__ */ t(
|
|
1785
|
-
/* @__PURE__ */ t(
|
|
1786
|
-
/* @__PURE__ */ t(
|
|
1787
|
-
/* @__PURE__ */ b(
|
|
1788
|
-
|
|
1782
|
+
isDisabled: u = !1
|
|
1783
|
+
}) => /* @__PURE__ */ b(Pn, { "data-testid": "empty-state", variant: "lg", children: [
|
|
1784
|
+
a && l ? /* @__PURE__ */ t(st, { icon: pr }) : a && /* @__PURE__ */ t(st, { icon: s || Nt }),
|
|
1785
|
+
/* @__PURE__ */ t(Ln, { titleText: e, headingLevel: "h1" }),
|
|
1786
|
+
/* @__PURE__ */ t(Nn, { children: n }),
|
|
1787
|
+
/* @__PURE__ */ b(Bn, { children: [
|
|
1788
|
+
o && /* @__PURE__ */ t(
|
|
1789
1789
|
L,
|
|
1790
1790
|
{
|
|
1791
1791
|
"data-testid": `${e.replace(/\W+/g, "-").toLowerCase()}-empty-action`,
|
|
1792
1792
|
variant: "primary",
|
|
1793
1793
|
onClick: r,
|
|
1794
|
-
isDisabled:
|
|
1795
|
-
children:
|
|
1794
|
+
isDisabled: u,
|
|
1795
|
+
children: o
|
|
1796
1796
|
}
|
|
1797
1797
|
),
|
|
1798
|
-
|
|
1798
|
+
i && /* @__PURE__ */ t(Vn, { children: i.map((c) => /* @__PURE__ */ t(
|
|
1799
1799
|
L,
|
|
1800
1800
|
{
|
|
1801
1801
|
"data-testid": `${c.text.replace(/\W+/g, "-").toLowerCase()}-empty-action`,
|
|
1802
1802
|
variant: c.type || ve.secondary,
|
|
1803
1803
|
onClick: c.onClick,
|
|
1804
|
-
isDisabled:
|
|
1804
|
+
isDisabled: u,
|
|
1805
1805
|
children: c.text
|
|
1806
1806
|
},
|
|
1807
1807
|
c.text
|
|
1808
1808
|
)) })
|
|
1809
1809
|
] })
|
|
1810
|
-
] }),
|
|
1810
|
+
] }), wa = ({
|
|
1811
1811
|
toolbarItem: e,
|
|
1812
1812
|
subToolbar: n,
|
|
1813
1813
|
toolbarItemFooter: r,
|
|
1814
1814
|
children: a,
|
|
1815
1815
|
searchTypeComponent: l,
|
|
1816
|
-
inputGroupName:
|
|
1817
|
-
inputGroupPlaceholder:
|
|
1816
|
+
inputGroupName: o,
|
|
1817
|
+
inputGroupPlaceholder: i,
|
|
1818
1818
|
inputGroupOnEnter: s
|
|
1819
1819
|
}) => {
|
|
1820
|
-
const { t:
|
|
1820
|
+
const { t: u } = B(), [c, h] = x(""), d = () => {
|
|
1821
1821
|
c !== "" ? (h(c), s?.(c)) : (h(""), s?.(""));
|
|
1822
1822
|
}, f = (m) => {
|
|
1823
|
-
m.key === "Enter" &&
|
|
1823
|
+
m.key === "Enter" && d();
|
|
1824
1824
|
};
|
|
1825
1825
|
return /* @__PURE__ */ b(J, { children: [
|
|
1826
|
-
/* @__PURE__ */ t(ye, { children: /* @__PURE__ */ b(
|
|
1827
|
-
|
|
1826
|
+
/* @__PURE__ */ t(ye, { children: /* @__PURE__ */ b(Be, { children: [
|
|
1827
|
+
o && /* @__PURE__ */ t(K, { children: /* @__PURE__ */ b(Ce, { "data-testid": o, children: [
|
|
1828
1828
|
l,
|
|
1829
|
-
|
|
1830
|
-
|
|
1829
|
+
i && /* @__PURE__ */ t(
|
|
1830
|
+
_n,
|
|
1831
1831
|
{
|
|
1832
1832
|
"data-testid": "table-search-input",
|
|
1833
|
-
placeholder:
|
|
1834
|
-
"aria-label":
|
|
1833
|
+
placeholder: i,
|
|
1834
|
+
"aria-label": u("search"),
|
|
1835
1835
|
value: c,
|
|
1836
1836
|
onChange: (m, v) => {
|
|
1837
1837
|
h(v);
|
|
1838
1838
|
},
|
|
1839
|
-
onSearch:
|
|
1839
|
+
onSearch: d,
|
|
1840
1840
|
onKeyDown: f,
|
|
1841
1841
|
onClear: () => {
|
|
1842
1842
|
h(""), s?.("");
|
|
@@ -1846,93 +1846,90 @@ const ka = ({
|
|
|
1846
1846
|
] }) }),
|
|
1847
1847
|
e
|
|
1848
1848
|
] }) }),
|
|
1849
|
-
n && /* @__PURE__ */ t(ye, { children: /* @__PURE__ */ t(
|
|
1850
|
-
/* @__PURE__ */ t(
|
|
1849
|
+
n && /* @__PURE__ */ t(ye, { children: /* @__PURE__ */ t(Be, { children: n }) }),
|
|
1850
|
+
/* @__PURE__ */ t(qn, {}),
|
|
1851
1851
|
a,
|
|
1852
1852
|
/* @__PURE__ */ t(ye, { children: r })
|
|
1853
1853
|
] });
|
|
1854
|
-
},
|
|
1854
|
+
}, yt = ({
|
|
1855
1855
|
id: e,
|
|
1856
1856
|
variant: n = "top",
|
|
1857
1857
|
count: r,
|
|
1858
1858
|
first: a,
|
|
1859
1859
|
max: l,
|
|
1860
|
-
onNextClick:
|
|
1861
|
-
onPreviousClick:
|
|
1860
|
+
onNextClick: o,
|
|
1861
|
+
onPreviousClick: i,
|
|
1862
1862
|
onPerPageSelect: s
|
|
1863
1863
|
}) => {
|
|
1864
|
-
const { t:
|
|
1864
|
+
const { t: u } = B(), c = Math.round(a / l);
|
|
1865
1865
|
return /* @__PURE__ */ t(
|
|
1866
|
-
|
|
1866
|
+
$n,
|
|
1867
1867
|
{
|
|
1868
1868
|
widgetId: e,
|
|
1869
1869
|
titles: {
|
|
1870
|
-
paginationAriaLabel: `${
|
|
1870
|
+
paginationAriaLabel: `${u("pagination")} ${n} `
|
|
1871
1871
|
},
|
|
1872
1872
|
isCompact: !0,
|
|
1873
1873
|
toggleTemplate: ({
|
|
1874
1874
|
firstIndex: h,
|
|
1875
|
-
lastIndex:
|
|
1875
|
+
lastIndex: d
|
|
1876
1876
|
}) => /* @__PURE__ */ b("b", { children: [
|
|
1877
1877
|
h,
|
|
1878
1878
|
" - ",
|
|
1879
|
-
|
|
1879
|
+
d
|
|
1880
1880
|
] }),
|
|
1881
1881
|
itemCount: r + c * l,
|
|
1882
1882
|
page: c + 1,
|
|
1883
1883
|
perPage: l,
|
|
1884
|
-
onNextClick: (h,
|
|
1885
|
-
onPreviousClick: (h,
|
|
1886
|
-
onPerPageSelect: (h,
|
|
1884
|
+
onNextClick: (h, d) => o((d - 1) * l),
|
|
1885
|
+
onPreviousClick: (h, d) => i((d - 1) * l),
|
|
1886
|
+
onPerPageSelect: (h, d, f) => s(f - 1, d),
|
|
1887
1887
|
variant: n
|
|
1888
1888
|
}
|
|
1889
1889
|
);
|
|
1890
|
-
},
|
|
1890
|
+
}, xa = ({
|
|
1891
1891
|
count: e,
|
|
1892
1892
|
searchTypeComponent: n,
|
|
1893
1893
|
toolbarItem: r,
|
|
1894
1894
|
subToolbar: a,
|
|
1895
1895
|
children: l,
|
|
1896
|
-
inputGroupName:
|
|
1897
|
-
inputGroupPlaceholder:
|
|
1896
|
+
inputGroupName: o,
|
|
1897
|
+
inputGroupPlaceholder: i,
|
|
1898
1898
|
inputGroupOnEnter: s,
|
|
1899
|
-
...
|
|
1899
|
+
...u
|
|
1900
1900
|
}) => /* @__PURE__ */ t(
|
|
1901
|
-
|
|
1901
|
+
wa,
|
|
1902
1902
|
{
|
|
1903
1903
|
searchTypeComponent: n,
|
|
1904
1904
|
toolbarItem: /* @__PURE__ */ b(J, { children: [
|
|
1905
1905
|
r,
|
|
1906
|
-
/* @__PURE__ */ t(K, { variant: "pagination", children: /* @__PURE__ */ t(
|
|
1906
|
+
/* @__PURE__ */ t(K, { variant: "pagination", children: /* @__PURE__ */ t(yt, { count: e, ...u }) })
|
|
1907
1907
|
] }),
|
|
1908
1908
|
subToolbar: a,
|
|
1909
|
-
toolbarItemFooter: e !== 0 ? /* @__PURE__ */ t(K, { variant: "pagination", children: /* @__PURE__ */ t(
|
|
1910
|
-
inputGroupName:
|
|
1911
|
-
inputGroupPlaceholder:
|
|
1909
|
+
toolbarItemFooter: e !== 0 ? /* @__PURE__ */ t(K, { variant: "pagination", children: /* @__PURE__ */ t(yt, { count: e, variant: "bottom", ...u }) }) : null,
|
|
1910
|
+
inputGroupName: o,
|
|
1911
|
+
inputGroupPlaceholder: i,
|
|
1912
1912
|
inputGroupOnEnter: s,
|
|
1913
1913
|
children: l
|
|
1914
1914
|
}
|
|
1915
|
-
),
|
|
1915
|
+
), Ta = () => {
|
|
1916
1916
|
const { t: e } = B();
|
|
1917
|
-
return /* @__PURE__ */ t(
|
|
1918
|
-
},
|
|
1919
|
-
|
|
1920
|
-
return e.cells.map((r, a) => /* @__PURE__ */ t(re, { children: n(r) ? r.title : r }, `cell-${a}`));
|
|
1921
|
-
};
|
|
1922
|
-
function Ta({
|
|
1917
|
+
return /* @__PURE__ */ t(Kn, { children: /* @__PURE__ */ t(wt, { "aria-label": e("spinnerLoading") }) });
|
|
1918
|
+
}, Gt = (e) => !!e && e.title !== void 0, vt = ({ row: e }) => e.cells.map((n, r) => /* @__PURE__ */ t(re, { children: Gt(n) ? n.title : n }, `cell-${r}`)), Sa = ({ row: e }) => e.cells.map((n, r) => /* @__PURE__ */ t("div", { children: Gt(n) ? n.title : n }, `cell-${r}`));
|
|
1919
|
+
function Aa({
|
|
1923
1920
|
columns: e,
|
|
1924
1921
|
rows: n,
|
|
1925
1922
|
actions: r,
|
|
1926
1923
|
actionResolver: a,
|
|
1927
1924
|
ariaLabelKey: l,
|
|
1928
|
-
onSelect:
|
|
1929
|
-
onCollapse:
|
|
1925
|
+
onSelect: o,
|
|
1926
|
+
onCollapse: i,
|
|
1930
1927
|
canSelectAll: s,
|
|
1931
|
-
isNotCompact:
|
|
1928
|
+
isNotCompact: u,
|
|
1932
1929
|
isRadio: c,
|
|
1933
1930
|
...h
|
|
1934
1931
|
}) {
|
|
1935
|
-
const { t:
|
|
1932
|
+
const { t: d } = B(), [f, m] = x([]), [v, T] = x([]), g = (p, C) => {
|
|
1936
1933
|
const w = [
|
|
1937
1934
|
...p === -1 ? Array(n.length).fill(C) : f
|
|
1938
1935
|
];
|
|
@@ -1947,20 +1944,21 @@ function Ta({
|
|
|
1947
1944
|
}
|
|
1948
1945
|
}
|
|
1949
1946
|
}, [f]), /* @__PURE__ */ b(
|
|
1950
|
-
|
|
1947
|
+
Cr,
|
|
1951
1948
|
{
|
|
1952
1949
|
...h,
|
|
1953
|
-
variant:
|
|
1954
|
-
"aria-label":
|
|
1950
|
+
variant: u ? void 0 : kr.compact,
|
|
1951
|
+
"aria-label": d(l),
|
|
1955
1952
|
children: [
|
|
1956
|
-
/* @__PURE__ */ t(
|
|
1957
|
-
|
|
1953
|
+
/* @__PURE__ */ t(Ir, { children: /* @__PURE__ */ b(fe, { children: [
|
|
1954
|
+
i && /* @__PURE__ */ t(Oe, { screenReaderText: d("expandRow") }),
|
|
1958
1955
|
s && /* @__PURE__ */ t(
|
|
1959
1956
|
Oe,
|
|
1960
1957
|
{
|
|
1958
|
+
screenReaderText: d("selectAll"),
|
|
1961
1959
|
select: c ? void 0 : {
|
|
1962
1960
|
onSelect: (p, C, w) => {
|
|
1963
|
-
|
|
1961
|
+
o(C, w), g(-1, C);
|
|
1964
1962
|
},
|
|
1965
1963
|
isSelected: f.filter((p) => p === !0).length === n.length
|
|
1966
1964
|
}
|
|
@@ -1969,13 +1967,14 @@ function Ta({
|
|
|
1969
1967
|
e.map((p) => /* @__PURE__ */ t(
|
|
1970
1968
|
Oe,
|
|
1971
1969
|
{
|
|
1970
|
+
screenReaderText: d("expandRow"),
|
|
1972
1971
|
className: p.transforms?.[0]().className,
|
|
1973
|
-
children:
|
|
1972
|
+
children: d(p.displayKey || p.name)
|
|
1974
1973
|
},
|
|
1975
1974
|
p.displayKey
|
|
1976
1975
|
))
|
|
1977
1976
|
] }) }),
|
|
1978
|
-
|
|
1977
|
+
i ? n.map((p, C) => /* @__PURE__ */ t(dt, { children: C % 2 === 0 ? /* @__PURE__ */ b(fe, { children: [
|
|
1979
1978
|
/* @__PURE__ */ t(
|
|
1980
1979
|
re,
|
|
1981
1980
|
{
|
|
@@ -1984,34 +1983,34 @@ function Ta({
|
|
|
1984
1983
|
rowIndex: C,
|
|
1985
1984
|
expandId: `${C}`,
|
|
1986
1985
|
onToggle: (w, k, A) => {
|
|
1987
|
-
|
|
1986
|
+
i(A, k);
|
|
1988
1987
|
const V = [...v];
|
|
1989
1988
|
V[C] = A, T(V);
|
|
1990
1989
|
}
|
|
1991
1990
|
}
|
|
1992
1991
|
}
|
|
1993
1992
|
),
|
|
1994
|
-
/* @__PURE__ */ t(
|
|
1993
|
+
/* @__PURE__ */ t(vt, { row: p })
|
|
1995
1994
|
] }) : /* @__PURE__ */ b(fe, { isExpanded: !!v[C - 1], children: [
|
|
1996
1995
|
/* @__PURE__ */ t(re, {}),
|
|
1997
|
-
/* @__PURE__ */ t(re, { colSpan: e.length, children: /* @__PURE__ */ t(
|
|
1998
|
-
] }) }, C)) : /* @__PURE__ */ t(
|
|
1999
|
-
|
|
1996
|
+
/* @__PURE__ */ t(re, { colSpan: e.length, children: /* @__PURE__ */ t(xr, { children: /* @__PURE__ */ t(Sa, { row: p }) }) })
|
|
1997
|
+
] }) }, C)) : /* @__PURE__ */ t(dt, { children: n.map((p, C) => /* @__PURE__ */ b(fe, { isExpanded: v[C], children: [
|
|
1998
|
+
o && /* @__PURE__ */ t(
|
|
2000
1999
|
re,
|
|
2001
2000
|
{
|
|
2002
2001
|
select: {
|
|
2003
2002
|
rowIndex: C,
|
|
2004
2003
|
onSelect: (w, k, A) => {
|
|
2005
|
-
|
|
2004
|
+
o(k, A), g(A, k);
|
|
2006
2005
|
},
|
|
2007
2006
|
isSelected: f[C],
|
|
2008
2007
|
variant: c ? "radio" : "checkbox"
|
|
2009
2008
|
}
|
|
2010
2009
|
}
|
|
2011
2010
|
),
|
|
2012
|
-
/* @__PURE__ */ t(
|
|
2011
|
+
/* @__PURE__ */ t(vt, { row: p }),
|
|
2013
2012
|
(r || a) && /* @__PURE__ */ t(re, { isActionCell: !0, children: /* @__PURE__ */ t(
|
|
2014
|
-
|
|
2013
|
+
wr,
|
|
2015
2014
|
{
|
|
2016
2015
|
items: r || a?.(p, {}),
|
|
2017
2016
|
extraData: { rowIndex: C }
|
|
@@ -2022,19 +2021,19 @@ function Ta({
|
|
|
2022
2021
|
}
|
|
2023
2022
|
);
|
|
2024
2023
|
}
|
|
2025
|
-
function
|
|
2024
|
+
function Ea({
|
|
2026
2025
|
ariaLabelKey: e,
|
|
2027
2026
|
searchPlaceholderKey: n,
|
|
2028
2027
|
isPaginated: r = !1,
|
|
2029
2028
|
onSelect: a,
|
|
2030
2029
|
canSelectAll: l = !1,
|
|
2031
|
-
isNotCompact:
|
|
2032
|
-
isRadio:
|
|
2030
|
+
isNotCompact: o,
|
|
2031
|
+
isRadio: i,
|
|
2033
2032
|
detailColumns: s,
|
|
2034
|
-
isRowDisabled:
|
|
2033
|
+
isRowDisabled: u,
|
|
2035
2034
|
loader: c,
|
|
2036
2035
|
columns: h,
|
|
2037
|
-
actions:
|
|
2036
|
+
actions: d,
|
|
2038
2037
|
actionResolver: f,
|
|
2039
2038
|
searchTypeComponent: m,
|
|
2040
2039
|
toolbarItem: v,
|
|
@@ -2048,7 +2047,7 @@ function Sa({
|
|
|
2048
2047
|
localStorage,
|
|
2049
2048
|
"pageSize",
|
|
2050
2049
|
10
|
|
2051
|
-
), [H,
|
|
2050
|
+
), [H, zt] = x(N), [$, ie] = x(0), [W, Ae] = x(""), tt = Y(), [he, Jt] = x(0), nt = Y(), rt = () => Jt(he + 1), Qt = Ot(), at = (I, O) => I.map((R) => {
|
|
2052
2051
|
if ("cellFormatters" in R) {
|
|
2053
2052
|
const j = U(O, R.name);
|
|
2054
2053
|
return R.cellFormatters?.reduce((G, P) => P(G), j);
|
|
@@ -2058,43 +2057,43 @@ function Sa({
|
|
|
2058
2057
|
return { title: /* @__PURE__ */ t(j, { ...O }) };
|
|
2059
2058
|
}
|
|
2060
2059
|
return U(O, R.name);
|
|
2061
|
-
}),
|
|
2060
|
+
}), lt = (I) => {
|
|
2062
2061
|
const O = (R) => s?.[0]?.enabled?.(R);
|
|
2063
2062
|
return I.map((R, j) => {
|
|
2064
|
-
const G =
|
|
2063
|
+
const G = u ? u(R) : !1, P = [
|
|
2065
2064
|
{
|
|
2066
2065
|
data: R,
|
|
2067
2066
|
disableSelection: G,
|
|
2068
2067
|
disableActions: G,
|
|
2069
|
-
selected: !!A.find((
|
|
2068
|
+
selected: !!A.find((nn) => U(nn, "id") === U(R, "id")),
|
|
2070
2069
|
isOpen: O(R) ? !1 : void 0,
|
|
2071
|
-
cells:
|
|
2070
|
+
cells: at(h, R)
|
|
2072
2071
|
}
|
|
2073
2072
|
];
|
|
2074
2073
|
return s && P.push({
|
|
2075
2074
|
parent: j * 2,
|
|
2076
|
-
cells: O(R) ?
|
|
2075
|
+
cells: O(R) ? at(s, R) : []
|
|
2077
2076
|
}), P;
|
|
2078
2077
|
}).flat();
|
|
2079
2078
|
}, Ee = (I) => ["string", "number"].includes(typeof I) ? I.toString() : I instanceof Array ? I.map(Ee).join("") : typeof I == "object" ? Ee(
|
|
2080
|
-
|
|
2079
|
+
jn(I.title) ? I.title.props : Object.values(I)
|
|
2081
2080
|
) : "", Re = _(
|
|
2082
|
-
() => W === "" || r ? void 0 :
|
|
2081
|
+
() => W === "" || r ? void 0 : lt(D || []).filter(
|
|
2083
2082
|
(I) => I.cells.some(
|
|
2084
2083
|
(O) => O && Ee(O).toLowerCase().includes(W.toLowerCase())
|
|
2085
2084
|
)
|
|
2086
2085
|
).slice($, $ + H + 1),
|
|
2087
2086
|
[W, $, H]
|
|
2088
2087
|
);
|
|
2089
|
-
|
|
2088
|
+
ka(
|
|
2090
2089
|
async () => {
|
|
2091
2090
|
M(!0);
|
|
2092
|
-
const I =
|
|
2093
|
-
return I &&
|
|
2091
|
+
const I = tt.current === "" && W !== "";
|
|
2092
|
+
return I && ie(0), tt.current = W, typeof c == "function" ? he === nt.current && D ? D : await c(I ? 0 : $, H + 1, W) : c;
|
|
2094
2093
|
},
|
|
2095
2094
|
(I) => {
|
|
2096
|
-
|
|
2097
|
-
const O =
|
|
2095
|
+
nt.current = he, r || (F(I), I.length > $ ? I = I.slice($, $ + H + 1) : ie(0));
|
|
2096
|
+
const O = lt(I);
|
|
2098
2097
|
S(O), M(!1);
|
|
2099
2098
|
},
|
|
2100
2099
|
[
|
|
@@ -2105,17 +2104,17 @@ function Sa({
|
|
|
2105
2104
|
typeof c != "function" ? c : void 0
|
|
2106
2105
|
]
|
|
2107
2106
|
);
|
|
2108
|
-
const
|
|
2109
|
-
await
|
|
2107
|
+
const Yt = () => d && yr(d).map((I, O) => (delete I.onRowClick, I.onClick = async (R, j) => {
|
|
2108
|
+
await d[O].onRowClick(
|
|
2110
2109
|
(Re || y)[j].data
|
|
2111
|
-
) && (r || Ae(""),
|
|
2112
|
-
}, I)),
|
|
2110
|
+
) && (r || Ae(""), rt());
|
|
2111
|
+
}, I)), Xt = (I, O) => {
|
|
2113
2112
|
const R = Re || y;
|
|
2114
2113
|
O === -1 ? S(
|
|
2115
2114
|
R.map((P) => (P.selected = I, P))
|
|
2116
2115
|
) : (R[O].selected = I, S([...y]));
|
|
2117
2116
|
const G = [
|
|
2118
|
-
...
|
|
2117
|
+
...vr(
|
|
2119
2118
|
A,
|
|
2120
2119
|
R.map((P) => P.data),
|
|
2121
2120
|
"id"
|
|
@@ -2123,21 +2122,21 @@ function Sa({
|
|
|
2123
2122
|
...R.filter((P) => P.selected).map((P) => P.data)
|
|
2124
2123
|
];
|
|
2125
2124
|
V(G), a(G);
|
|
2126
|
-
},
|
|
2125
|
+
}, Zt = (I, O) => {
|
|
2127
2126
|
Z[O].isOpen = I, S([...Z]);
|
|
2128
|
-
}, Z = Re || y, pe = !Z || Z.length === 0, De = W !== "" || C,
|
|
2127
|
+
}, Z = Re || y, pe = !Z || Z.length === 0, De = W !== "" || C, en = s ? H * 2 : H, tn = s ? (Z?.length || 0) / 2 : Z?.length || 0;
|
|
2129
2128
|
return /* @__PURE__ */ b(J, { children: [
|
|
2130
2129
|
(E || !pe || De) && /* @__PURE__ */ b(
|
|
2131
|
-
|
|
2130
|
+
xa,
|
|
2132
2131
|
{
|
|
2133
|
-
id:
|
|
2134
|
-
count:
|
|
2132
|
+
id: Qt,
|
|
2133
|
+
count: tn,
|
|
2135
2134
|
first: $,
|
|
2136
2135
|
max: H,
|
|
2137
|
-
onNextClick:
|
|
2138
|
-
onPreviousClick:
|
|
2136
|
+
onNextClick: ie,
|
|
2137
|
+
onPreviousClick: ie,
|
|
2139
2138
|
onPerPageSelect: (I, O) => {
|
|
2140
|
-
|
|
2139
|
+
ie(I), zt(O), Se(O);
|
|
2141
2140
|
},
|
|
2142
2141
|
inputGroupName: n ? `${e}input` : void 0,
|
|
2143
2142
|
inputGroupOnEnter: Ae,
|
|
@@ -2148,8 +2147,8 @@ function Sa({
|
|
|
2148
2147
|
" ",
|
|
2149
2148
|
/* @__PURE__ */ t(K, { variant: "separator" }),
|
|
2150
2149
|
" ",
|
|
2151
|
-
/* @__PURE__ */ t(K, { children: /* @__PURE__ */ b(L, { variant: "link", onClick:
|
|
2152
|
-
/* @__PURE__ */ t(
|
|
2150
|
+
/* @__PURE__ */ t(K, { children: /* @__PURE__ */ b(L, { variant: "link", onClick: rt, children: [
|
|
2151
|
+
/* @__PURE__ */ t(mr, {}),
|
|
2153
2152
|
" ",
|
|
2154
2153
|
k("refresh")
|
|
2155
2154
|
] }) })
|
|
@@ -2157,23 +2156,23 @@ function Sa({
|
|
|
2157
2156
|
subToolbar: T,
|
|
2158
2157
|
children: [
|
|
2159
2158
|
!E && !pe && /* @__PURE__ */ t(
|
|
2160
|
-
|
|
2159
|
+
Aa,
|
|
2161
2160
|
{
|
|
2162
2161
|
...w,
|
|
2163
2162
|
canSelectAll: l,
|
|
2164
|
-
onSelect: a ?
|
|
2165
|
-
onCollapse: s ?
|
|
2166
|
-
actions:
|
|
2163
|
+
onSelect: a ? Xt : void 0,
|
|
2164
|
+
onCollapse: s ? Zt : void 0,
|
|
2165
|
+
actions: Yt(),
|
|
2167
2166
|
actionResolver: f,
|
|
2168
|
-
rows: Z.slice(0,
|
|
2167
|
+
rows: Z.slice(0, en),
|
|
2169
2168
|
columns: h,
|
|
2170
|
-
isNotCompact:
|
|
2171
|
-
isRadio:
|
|
2169
|
+
isNotCompact: o,
|
|
2170
|
+
isRadio: i,
|
|
2172
2171
|
ariaLabelKey: e
|
|
2173
2172
|
}
|
|
2174
2173
|
),
|
|
2175
2174
|
!E && pe && De && /* @__PURE__ */ t(
|
|
2176
|
-
|
|
2175
|
+
Ia,
|
|
2177
2176
|
{
|
|
2178
2177
|
hasIcon: !0,
|
|
2179
2178
|
icon: p,
|
|
@@ -2189,19 +2188,19 @@ function Sa({
|
|
|
2189
2188
|
]
|
|
2190
2189
|
}
|
|
2191
2190
|
),
|
|
2192
|
-
E && /* @__PURE__ */ t(
|
|
2191
|
+
E && /* @__PURE__ */ t(Ta, {})
|
|
2193
2192
|
]
|
|
2194
2193
|
}
|
|
2195
2194
|
),
|
|
2196
2195
|
!E && pe && !De && g
|
|
2197
2196
|
] });
|
|
2198
2197
|
}
|
|
2199
|
-
const
|
|
2198
|
+
const Ra = ({ link: e, organization: n }) => {
|
|
2200
2199
|
const { t: r } = B();
|
|
2201
|
-
return /* @__PURE__ */ t(
|
|
2200
|
+
return /* @__PURE__ */ t(Tr, { wrapModifier: "truncate", children: /* @__PURE__ */ b(e, { organization: n, children: [
|
|
2202
2201
|
n.name,
|
|
2203
2202
|
!n.enabled && /* @__PURE__ */ t(
|
|
2204
|
-
|
|
2203
|
+
Un,
|
|
2205
2204
|
{
|
|
2206
2205
|
isRead: !0,
|
|
2207
2206
|
className: "pf-v5-u-ml-sm",
|
|
@@ -2210,34 +2209,34 @@ const Aa = ({ link: e, organization: n }) => {
|
|
|
2210
2209
|
`${n.id}-disabled`
|
|
2211
2210
|
)
|
|
2212
2211
|
] }) });
|
|
2213
|
-
},
|
|
2212
|
+
}, Da = (e) => {
|
|
2214
2213
|
const { t: n } = B();
|
|
2215
2214
|
return /* @__PURE__ */ t(
|
|
2216
|
-
|
|
2215
|
+
ze,
|
|
2217
2216
|
{
|
|
2218
2217
|
numChips: 2,
|
|
2219
2218
|
expandedText: n("hide"),
|
|
2220
2219
|
collapsedText: n("showRemaining"),
|
|
2221
2220
|
children: e.domains?.map((r) => {
|
|
2222
2221
|
const a = typeof r == "string" ? r : r.name;
|
|
2223
|
-
return /* @__PURE__ */ t(
|
|
2222
|
+
return /* @__PURE__ */ t(Je, { isReadOnly: !0, children: a }, a);
|
|
2224
2223
|
})
|
|
2225
2224
|
}
|
|
2226
2225
|
);
|
|
2227
|
-
},
|
|
2226
|
+
}, cl = ({
|
|
2228
2227
|
loader: e,
|
|
2229
2228
|
toolbarItem: n,
|
|
2230
2229
|
isPaginated: r = !1,
|
|
2231
2230
|
isSearching: a = !1,
|
|
2232
2231
|
onSelect: l,
|
|
2233
|
-
onDelete:
|
|
2234
|
-
deleteLabel:
|
|
2232
|
+
onDelete: o,
|
|
2233
|
+
deleteLabel: i = "delete",
|
|
2235
2234
|
link: s,
|
|
2236
|
-
children:
|
|
2235
|
+
children: u
|
|
2237
2236
|
}) => {
|
|
2238
2237
|
const { t: c } = B();
|
|
2239
2238
|
return /* @__PURE__ */ t(
|
|
2240
|
-
|
|
2239
|
+
Ea,
|
|
2241
2240
|
{
|
|
2242
2241
|
loader: e,
|
|
2243
2242
|
isPaginated: r,
|
|
@@ -2246,22 +2245,22 @@ const Aa = ({ link: e, organization: n }) => {
|
|
|
2246
2245
|
toolbarItem: n,
|
|
2247
2246
|
onSelect: l,
|
|
2248
2247
|
canSelectAll: l !== void 0,
|
|
2249
|
-
actions:
|
|
2248
|
+
actions: o ? [
|
|
2250
2249
|
{
|
|
2251
|
-
title: c(
|
|
2252
|
-
onRowClick:
|
|
2250
|
+
title: c(i),
|
|
2251
|
+
onRowClick: o
|
|
2253
2252
|
}
|
|
2254
2253
|
] : void 0,
|
|
2255
2254
|
columns: [
|
|
2256
2255
|
{
|
|
2257
2256
|
name: "name",
|
|
2258
2257
|
displayKey: "name",
|
|
2259
|
-
cellRenderer: (h) => /* @__PURE__ */ t(
|
|
2258
|
+
cellRenderer: (h) => /* @__PURE__ */ t(Ra, { link: s, organization: h })
|
|
2260
2259
|
},
|
|
2261
2260
|
{
|
|
2262
2261
|
name: "domains",
|
|
2263
2262
|
displayKey: "domains",
|
|
2264
|
-
cellRenderer:
|
|
2263
|
+
cellRenderer: Da
|
|
2265
2264
|
},
|
|
2266
2265
|
{
|
|
2267
2266
|
name: "description",
|
|
@@ -2272,7 +2271,7 @@ const Aa = ({ link: e, organization: n }) => {
|
|
|
2272
2271
|
displayKey: "membershipType"
|
|
2273
2272
|
}
|
|
2274
2273
|
],
|
|
2275
|
-
emptyState:
|
|
2274
|
+
emptyState: u
|
|
2276
2275
|
}
|
|
2277
2276
|
);
|
|
2278
2277
|
}, bt = "pf-v5-theme-dark", Ct = window.matchMedia("(prefers-color-scheme: dark)");
|
|
@@ -2280,65 +2279,65 @@ function kt(e) {
|
|
|
2280
2279
|
const { classList: n } = document.documentElement;
|
|
2281
2280
|
e ? n.add(bt) : n.remove(bt);
|
|
2282
2281
|
}
|
|
2283
|
-
function
|
|
2282
|
+
function dl() {
|
|
2284
2283
|
kt(Ct.matches), Ct.addEventListener(
|
|
2285
2284
|
"change",
|
|
2286
2285
|
(e) => kt(e.matches)
|
|
2287
2286
|
);
|
|
2288
2287
|
}
|
|
2289
2288
|
export {
|
|
2290
|
-
|
|
2291
|
-
|
|
2292
|
-
|
|
2293
|
-
|
|
2294
|
-
|
|
2289
|
+
Nr as AlertProvider,
|
|
2290
|
+
Ga as ContinueCancelModal,
|
|
2291
|
+
sl as ErrorBoundaryFallback,
|
|
2292
|
+
il as ErrorBoundaryProvider,
|
|
2293
|
+
Br as ErrorPage,
|
|
2295
2294
|
qt as FormErrorText,
|
|
2296
|
-
|
|
2297
|
-
|
|
2298
|
-
|
|
2295
|
+
Yr as FormPanel,
|
|
2296
|
+
el as FormSubmitButton,
|
|
2297
|
+
$r as Help,
|
|
2299
2298
|
$t as HelpItem,
|
|
2300
|
-
|
|
2301
|
-
|
|
2302
|
-
|
|
2303
|
-
|
|
2304
|
-
|
|
2305
|
-
|
|
2306
|
-
|
|
2307
|
-
|
|
2308
|
-
|
|
2309
|
-
|
|
2310
|
-
|
|
2311
|
-
|
|
2299
|
+
Za as IconMapper,
|
|
2300
|
+
Ea as KeycloakDataTable,
|
|
2301
|
+
ol as KeycloakMasthead,
|
|
2302
|
+
Wa as KeycloakProvider,
|
|
2303
|
+
ha as KeycloakSelect,
|
|
2304
|
+
Ta as KeycloakSpinner,
|
|
2305
|
+
Gr as KeycloakTextArea,
|
|
2306
|
+
Ia as ListEmptyState,
|
|
2307
|
+
za as NumberControl,
|
|
2308
|
+
cl as OrganizationTable,
|
|
2309
|
+
xa as PaginatingTableToolbar,
|
|
2310
|
+
Ja as PasswordControl,
|
|
2312
2311
|
Kt as PasswordInput,
|
|
2313
|
-
|
|
2314
|
-
|
|
2312
|
+
na as ScrollForm,
|
|
2313
|
+
jr as SelectControl,
|
|
2315
2314
|
ae as SelectVariant,
|
|
2316
|
-
|
|
2317
|
-
|
|
2318
|
-
|
|
2319
|
-
|
|
2320
|
-
|
|
2321
|
-
|
|
2322
|
-
|
|
2323
|
-
|
|
2324
|
-
|
|
2325
|
-
|
|
2326
|
-
|
|
2327
|
-
|
|
2328
|
-
|
|
2329
|
-
|
|
2330
|
-
|
|
2331
|
-
|
|
2332
|
-
|
|
2315
|
+
Qa as SwitchControl,
|
|
2316
|
+
wa as TableToolbar,
|
|
2317
|
+
Ya as TextAreaControl,
|
|
2318
|
+
Xa as TextControl,
|
|
2319
|
+
ll as UserProfileFields,
|
|
2320
|
+
tl as beerify,
|
|
2321
|
+
Ye as createNamedContext,
|
|
2322
|
+
nl as debeerify,
|
|
2323
|
+
Or as generateId,
|
|
2324
|
+
Er as getErrorDescription,
|
|
2325
|
+
Ar as getErrorMessage,
|
|
2326
|
+
ja as getInjectedEnvironment,
|
|
2327
|
+
Rr as getNetworkErrorDescription,
|
|
2328
|
+
Dr as getNetworkErrorMessage,
|
|
2329
|
+
dl as initializeDarkMode,
|
|
2330
|
+
Fr as isDefined,
|
|
2331
|
+
al as isUserProfileError,
|
|
2333
2332
|
te as label,
|
|
2334
|
-
|
|
2335
|
-
|
|
2336
|
-
|
|
2337
|
-
|
|
2333
|
+
ta as mainPageContentId,
|
|
2334
|
+
rl as setUserProfileServerError,
|
|
2335
|
+
Ua as useAlerts,
|
|
2336
|
+
Ha as useEnvironment,
|
|
2338
2337
|
jt as useErrorBoundary,
|
|
2339
|
-
|
|
2340
|
-
|
|
2341
|
-
|
|
2342
|
-
|
|
2338
|
+
ka as useFetch,
|
|
2339
|
+
qr as useHelp,
|
|
2340
|
+
Xe as useRequiredContext,
|
|
2341
|
+
Mr as useSetTimeout,
|
|
2343
2342
|
Vt as useStoredState
|
|
2344
2343
|
};
|