@keycloak/keycloak-ui-shared 26.5.7 → 26.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/context/KeycloakContext.d.ts +2 -1
- package/dist/controls/HelpItem.d.ts +2 -1
- package/dist/controls/OrganizationTable.d.ts +3 -2
- package/dist/controls/select-control/SelectControl.d.ts +2 -0
- package/dist/controls/select-control/SingleSelectControl.d.ts +1 -1
- package/dist/controls/select-control/TypeaheadSelectControl.d.ts +1 -1
- package/dist/keycloak-ui-shared.js +1056 -1027
- package/dist/keycloak-ui-shared.js.map +1 -0
- package/package.json +4 -4
|
@@ -1,62 +1,62 @@
|
|
|
1
|
-
import { jsx as t, jsxs as
|
|
2
|
-
import { AlertGroup as
|
|
3
|
-
import { createContext as
|
|
4
|
-
import { useTranslation as
|
|
5
|
-
import { NetworkError as
|
|
6
|
-
import
|
|
7
|
-
import { ExclamationCircleIcon as
|
|
8
|
-
import { useFormContext as
|
|
9
|
-
import { get as
|
|
10
|
-
import
|
|
11
|
-
import { css as
|
|
12
|
-
import { Table as
|
|
13
|
-
import './main.css';function
|
|
14
|
-
const r =
|
|
1
|
+
import { jsx as t, jsxs as k, Fragment as W } from "react/jsx-runtime";
|
|
2
|
+
import { AlertGroup as Zt, Alert as en, AlertVariant as Be, AlertActionCloseButton as tn, Page as nn, Modal as vt, ModalVariant as rn, TextContent as an, Text as ke, Button as q, Spinner as Ct, FormHelperText as Ge, HelperText as We, HelperTextItem as ze, Popover as ln, Icon as Ne, FormGroup as kt, NumberInput as sn, ValidatedOptions as H, InputGroup as xe, InputGroupItem as _e, TextInput as Se, Select as Ee, SelectList as Ae, SelectOption as Je, MenuToggle as me, MenuToggleStatus as Ye, TextInputGroup as It, TextInputGroupMain as wt, ChipGroup as Qe, Chip as Xe, TextInputGroupUtilities as Tt, Switch as on, TextArea as xt, FileUpload as cn, Title as dn, Card as un, CardHeader as hn, CardTitle as pn, CardBody as mn, Grid as fn, GridItem as st, PageSection as gn, JumpLinks as yn, JumpLinksItem as bn, ButtonVariant as we, Checkbox as vn, Radio as Cn, MenuFooter as kn, Dropdown as In, DropdownList as wn, DropdownItem as ot, Masthead as Tn, MastheadToggle as xn, PageToggleButton as Sn, MastheadBrand as En, MastheadContent as An, Toolbar as Ie, ToolbarContent as qe, ToolbarItem as G, Avatar as Rn, Bullseye as Dn, EmptyState as On, EmptyStateIcon as ct, EmptyStateHeader as Fn, EmptyStateBody as Pn, EmptyStateFooter as Vn, EmptyStateActions as Mn, SearchInput as Ln, Divider as Bn, Pagination as Nn, Badge as _n } from "@patternfly/react-core";
|
|
3
|
+
import { createContext as St, useContext as Et, useRef as Y, useEffect as se, useCallback as he, useState as A, useMemo as U, forwardRef as qn, useId as At, Fragment as Rt, Children as Dt, Component as $n, isValidElement as Un } from "react";
|
|
4
|
+
import { useTranslation as $ } from "react-i18next";
|
|
5
|
+
import { NetworkError as Ot } from "@keycloak/keycloak-admin-client";
|
|
6
|
+
import Kn from "keycloak-js";
|
|
7
|
+
import { ExclamationCircleIcon as Hn, ExclamationTriangleIcon as jn, HelpIcon as Gn, EyeIcon as Wn, EyeSlashIcon as zn, TimesIcon as Ft, CubeIcon as Jn, PaypalIcon as Yn, InstagramIcon as Qn, BitbucketIcon as Xn, MicrosoftIcon as Zn, TwitterIcon as er, StackOverflowIcon as tr, OpenshiftIcon as nr, LinkedinIcon as rr, GoogleIcon as ar, GitlabIcon as lr, FacebookSquareIcon as ir, GithubIcon as sr, MinusCircleIcon as or, PlusCircleIcon as Pt, EllipsisVIcon as cr, BarsIcon as dr, SearchIcon as ur, SyncAltIcon as hr } from "@patternfly/react-icons";
|
|
8
|
+
import { useFormContext as Re, Controller as oe, useController as De, FormProvider as pr, useWatch as mr } from "react-hook-form";
|
|
9
|
+
import { get as _, cloneDeep as fr, intersectionBy as gr } from "lodash-es";
|
|
10
|
+
import ve from "@patternfly/react-styles/css/components/Avatar/avatar";
|
|
11
|
+
import { css as yr } from "@patternfly/react-styles";
|
|
12
|
+
import { Table as br, TableVariant as vr, Thead as Cr, Tr as Ce, Th as Me, Tbody as dt, Td as le, ExpandableRowContent as kr, ActionsColumn as Ir, TableText as wr } from "@patternfly/react-table";
|
|
13
|
+
import './main.css';function Ze(e, n) {
|
|
14
|
+
const r = St(n);
|
|
15
15
|
return r.displayName = e, r;
|
|
16
16
|
}
|
|
17
|
-
const
|
|
17
|
+
const Tr = ["error", "errorMessage"], Le = "error_description";
|
|
18
18
|
function xr(e) {
|
|
19
19
|
if (typeof e == "string")
|
|
20
20
|
return e;
|
|
21
|
-
if (e instanceof
|
|
22
|
-
return
|
|
21
|
+
if (e instanceof Ot)
|
|
22
|
+
return Vt(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
27
|
function Sr(e) {
|
|
28
|
-
if (!(e instanceof
|
|
28
|
+
if (!(e instanceof Ot))
|
|
29
29
|
return;
|
|
30
30
|
const n = e.responseData;
|
|
31
|
-
return
|
|
31
|
+
return Er(n);
|
|
32
32
|
}
|
|
33
|
-
function
|
|
34
|
-
if (typeof e == "object" && e !== null &&
|
|
35
|
-
return e[
|
|
33
|
+
function Er(e) {
|
|
34
|
+
if (typeof e == "object" && e !== null && Le in e && typeof e[Le] == "string")
|
|
35
|
+
return e[Le];
|
|
36
36
|
}
|
|
37
|
-
function
|
|
37
|
+
function Vt(e) {
|
|
38
38
|
if (!(typeof e != "object" || e === null))
|
|
39
|
-
for (const n of
|
|
39
|
+
for (const n of Tr) {
|
|
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 Ar = () => Math.floor(Math.random() * 1e3);
|
|
46
|
+
function Rr(e) {
|
|
47
47
|
return e != null;
|
|
48
48
|
}
|
|
49
|
-
function
|
|
50
|
-
const n =
|
|
51
|
-
if (
|
|
49
|
+
function et(e) {
|
|
50
|
+
const n = Et(e);
|
|
51
|
+
if (Rr(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
|
|
58
|
-
const e =
|
|
59
|
-
|
|
57
|
+
function Dr() {
|
|
58
|
+
const e = Y(!1), n = Y(/* @__PURE__ */ new Set());
|
|
59
|
+
se(() => (e.current = !1, () => {
|
|
60
60
|
e.current = !0, r();
|
|
61
61
|
}), []);
|
|
62
62
|
function r() {
|
|
@@ -65,9 +65,9 @@ function Rr() {
|
|
|
65
65
|
return he((a, l) => {
|
|
66
66
|
if (e.current)
|
|
67
67
|
throw new Error("Can't schedule a timeout on an unmounted component.");
|
|
68
|
-
const i = Number(setTimeout(
|
|
68
|
+
const i = Number(setTimeout(s, l));
|
|
69
69
|
n.current.add(i);
|
|
70
|
-
function
|
|
70
|
+
function s() {
|
|
71
71
|
n.current.delete(i), a();
|
|
72
72
|
}
|
|
73
73
|
return function() {
|
|
@@ -75,24 +75,24 @@ function Rr() {
|
|
|
75
75
|
};
|
|
76
76
|
}, []);
|
|
77
77
|
}
|
|
78
|
-
function
|
|
78
|
+
function Or({ alerts: e, onCloseAlert: n }) {
|
|
79
79
|
return /* @__PURE__ */ t(
|
|
80
|
-
|
|
80
|
+
Zt,
|
|
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: i },
|
|
86
|
-
|
|
85
|
+
children: e.map(({ id: r, variant: a, message: l, description: i }, s) => /* @__PURE__ */ t(
|
|
86
|
+
en,
|
|
87
87
|
{
|
|
88
|
-
"data-testid":
|
|
88
|
+
"data-testid": s === 0 ? "last-alert" : void 0,
|
|
89
89
|
isLiveRegion: !0,
|
|
90
|
-
variant:
|
|
90
|
+
variant: Be[a],
|
|
91
91
|
component: "p",
|
|
92
92
|
variantLabel: "",
|
|
93
93
|
title: l,
|
|
94
94
|
actionClose: /* @__PURE__ */ t(
|
|
95
|
-
|
|
95
|
+
tn,
|
|
96
96
|
{
|
|
97
97
|
title: l,
|
|
98
98
|
onClose: () => n(r)
|
|
@@ -105,127 +105,130 @@ function Dr({ alerts: e, onCloseAlert: n }) {
|
|
|
105
105
|
}
|
|
106
106
|
);
|
|
107
107
|
}
|
|
108
|
-
const
|
|
108
|
+
const Fr = 8e3, Mt = Ze(
|
|
109
109
|
"AlertContext",
|
|
110
110
|
void 0
|
|
111
|
-
),
|
|
112
|
-
const { t: n } =
|
|
113
|
-
(
|
|
114
|
-
const
|
|
115
|
-
id:
|
|
116
|
-
message:
|
|
117
|
-
variant:
|
|
118
|
-
description:
|
|
111
|
+
), qa = () => et(Mt), Pr = ({ children: e }) => {
|
|
112
|
+
const { t: n } = $(), r = Dr(), [a, l] = A([]), i = (c) => l((u) => u.filter((d) => d.id !== c)), s = he(
|
|
113
|
+
(c, u = Be.success, d) => {
|
|
114
|
+
const g = {
|
|
115
|
+
id: Ar(),
|
|
116
|
+
message: c,
|
|
117
|
+
variant: u,
|
|
118
|
+
description: d
|
|
119
119
|
};
|
|
120
|
-
l((
|
|
120
|
+
l((y) => [g, ...y]), r(() => i(g.id), Fr);
|
|
121
121
|
},
|
|
122
122
|
[r]
|
|
123
|
-
),
|
|
124
|
-
(
|
|
125
|
-
const
|
|
126
|
-
|
|
123
|
+
), o = he(
|
|
124
|
+
(c, u) => {
|
|
125
|
+
const d = n(c, { error: xr(u) }), g = Sr(u);
|
|
126
|
+
s(d, Be.danger, g);
|
|
127
127
|
},
|
|
128
|
-
[
|
|
129
|
-
),
|
|
130
|
-
return /* @__PURE__ */
|
|
131
|
-
/* @__PURE__ */ t(
|
|
128
|
+
[s, n]
|
|
129
|
+
), h = U(() => ({ addAlert: s, addError: o }), [s, o]);
|
|
130
|
+
return /* @__PURE__ */ k(Mt.Provider, { value: h, children: [
|
|
131
|
+
/* @__PURE__ */ t(Or, { alerts: a, onCloseAlert: i }),
|
|
132
132
|
e
|
|
133
133
|
] });
|
|
134
|
-
},
|
|
135
|
-
const { t: n, i18n: r } =
|
|
134
|
+
}, Vr = (e) => {
|
|
135
|
+
const { t: n, i18n: r } = $(), a = e.error, l = Mr(a), i = Vt(a);
|
|
136
136
|
console.error(a);
|
|
137
|
-
function
|
|
137
|
+
function s() {
|
|
138
138
|
location.href = location.origin + location.pathname;
|
|
139
139
|
}
|
|
140
|
-
return /* @__PURE__ */ t(
|
|
141
|
-
|
|
140
|
+
return /* @__PURE__ */ t(nn, { children: /* @__PURE__ */ t(
|
|
141
|
+
vt,
|
|
142
142
|
{
|
|
143
|
-
variant:
|
|
143
|
+
variant: rn.small,
|
|
144
144
|
title: n("somethingWentWrong"),
|
|
145
145
|
titleIconVariant: "danger",
|
|
146
146
|
showClose: !1,
|
|
147
147
|
isOpen: !0,
|
|
148
148
|
actions: [
|
|
149
|
-
/* @__PURE__ */ t(
|
|
149
|
+
/* @__PURE__ */ t(q, { variant: "primary", onClick: s, children: n("tryAgain") }, "tryAgain")
|
|
150
150
|
],
|
|
151
|
-
children: /* @__PURE__ */ t(
|
|
151
|
+
children: /* @__PURE__ */ t(an, { children: l ? /* @__PURE__ */ t(ke, { children: n(l) }) : i && r.exists(i) ? /* @__PURE__ */ t(ke, { children: n(i) }) : /* @__PURE__ */ t(ke, { children: n("somethingWentWrongDescription") }) })
|
|
152
152
|
}
|
|
153
153
|
) });
|
|
154
154
|
};
|
|
155
|
-
function
|
|
155
|
+
function Mr(e) {
|
|
156
156
|
return e instanceof Error ? e.message : null;
|
|
157
157
|
}
|
|
158
|
-
function
|
|
159
|
-
const [a, l] =
|
|
158
|
+
function Lr(e, n, r) {
|
|
159
|
+
const [a, l] = A(
|
|
160
160
|
() => e.getItem(n) ?? r
|
|
161
|
-
), i = he((
|
|
162
|
-
l(
|
|
161
|
+
), i = he((s) => {
|
|
162
|
+
l(s), e.setItem(n, s);
|
|
163
163
|
}, []);
|
|
164
|
-
return
|
|
165
|
-
l(e.getItem(n) ?? r), window.addEventListener("storage",
|
|
166
|
-
function o
|
|
167
|
-
|
|
164
|
+
return se(() => {
|
|
165
|
+
l(e.getItem(n) ?? r), window.addEventListener("storage", s);
|
|
166
|
+
function s(o) {
|
|
167
|
+
o.storageArea === e && (o.key === null || o.key === n) && l(o.newValue ?? r);
|
|
168
168
|
}
|
|
169
|
-
return () => window.removeEventListener("storage",
|
|
169
|
+
return () => window.removeEventListener("storage", s);
|
|
170
170
|
}, [e, n]), [a, i];
|
|
171
171
|
}
|
|
172
|
-
function
|
|
173
|
-
const a =
|
|
172
|
+
function Lt(e, n, r) {
|
|
173
|
+
const a = U(
|
|
174
174
|
() => JSON.stringify(r),
|
|
175
175
|
[r]
|
|
176
|
-
), [l, i] =
|
|
176
|
+
), [l, i] = Lr(
|
|
177
177
|
e,
|
|
178
178
|
n,
|
|
179
179
|
a
|
|
180
|
-
),
|
|
181
|
-
(
|
|
180
|
+
), s = U(() => JSON.parse(l), [l]), o = he(
|
|
181
|
+
(h) => i(JSON.stringify(h)),
|
|
182
182
|
[]
|
|
183
183
|
);
|
|
184
|
-
return [
|
|
184
|
+
return [s, o];
|
|
185
185
|
}
|
|
186
|
-
const
|
|
186
|
+
const Bt = Ze(
|
|
187
187
|
"HelpContext",
|
|
188
188
|
void 0
|
|
189
|
-
),
|
|
190
|
-
const [n, r] =
|
|
189
|
+
), Br = () => et(Bt), Nr = ({ children: e }) => {
|
|
190
|
+
const [n, r] = Lt(localStorage, "helpEnabled", !0);
|
|
191
191
|
function a() {
|
|
192
192
|
r(!n);
|
|
193
193
|
}
|
|
194
|
-
return /* @__PURE__ */ t(
|
|
195
|
-
},
|
|
196
|
-
let
|
|
197
|
-
const
|
|
198
|
-
const e =
|
|
194
|
+
return /* @__PURE__ */ t(Bt.Provider, { value: { enabled: n, toggleHelp: a }, children: e });
|
|
195
|
+
}, _r = () => St(void 0);
|
|
196
|
+
let $e;
|
|
197
|
+
const $a = () => {
|
|
198
|
+
const e = Et($e);
|
|
199
199
|
if (!e)
|
|
200
200
|
throw Error(
|
|
201
201
|
"no environment provider in the hierarchy make sure to add the provider"
|
|
202
202
|
);
|
|
203
203
|
return e;
|
|
204
|
-
},
|
|
204
|
+
}, Ua = ({
|
|
205
205
|
environment: e,
|
|
206
|
-
|
|
206
|
+
keycloak: n,
|
|
207
|
+
children: r
|
|
207
208
|
}) => {
|
|
208
|
-
|
|
209
|
-
const
|
|
210
|
-
|
|
209
|
+
$e = _r();
|
|
210
|
+
const a = Y(!1), [l, i] = A(!!n), [s, o] = A(), h = U(() => {
|
|
211
|
+
if (n)
|
|
212
|
+
return n;
|
|
213
|
+
const c = new Kn({
|
|
211
214
|
url: e.serverBaseUrl,
|
|
212
215
|
realm: e.realm,
|
|
213
216
|
clientId: e.clientId
|
|
214
217
|
});
|
|
215
|
-
return
|
|
216
|
-
}, [e]);
|
|
217
|
-
return
|
|
218
|
-
if (
|
|
218
|
+
return c.onAuthLogout = () => c.login(), c;
|
|
219
|
+
}, [e, n]);
|
|
220
|
+
return se(() => {
|
|
221
|
+
if (n || a.current)
|
|
219
222
|
return;
|
|
220
|
-
|
|
223
|
+
h.init({
|
|
221
224
|
onLoad: "login-required",
|
|
222
225
|
pkceMethod: "S256",
|
|
223
226
|
responseMode: "query",
|
|
224
227
|
scope: e.scope
|
|
225
|
-
}).then(() =>
|
|
226
|
-
}, [
|
|
228
|
+
}).then(() => i(!0)).catch((u) => o(u)), a.current = !0;
|
|
229
|
+
}, [h, n]), s ? /* @__PURE__ */ t(Vr, { error: s }) : l ? /* @__PURE__ */ t($e.Provider, { value: { environment: e, keycloak: h }, children: /* @__PURE__ */ t(Pr, { children: /* @__PURE__ */ t(Nr, { children: r }) }) }) : /* @__PURE__ */ t(Ct, {});
|
|
227
230
|
};
|
|
228
|
-
function
|
|
231
|
+
function Ka() {
|
|
229
232
|
const n = document.getElementById("environment")?.textContent;
|
|
230
233
|
if (typeof n != "string")
|
|
231
234
|
throw new Error("Environment variables not found in the document.");
|
|
@@ -235,113 +238,128 @@ function Ua() {
|
|
|
235
238
|
throw new Error("Unable to parse environment variables as JSON.");
|
|
236
239
|
}
|
|
237
240
|
}
|
|
238
|
-
const
|
|
241
|
+
const Ha = ({
|
|
239
242
|
modalTitle: e,
|
|
240
243
|
continueLabel: n,
|
|
241
244
|
cancelLabel: r,
|
|
242
245
|
buttonTitle: a,
|
|
243
246
|
isDisabled: l,
|
|
244
247
|
buttonVariant: i,
|
|
245
|
-
buttonTestRole:
|
|
246
|
-
onContinue:
|
|
247
|
-
component:
|
|
248
|
-
children:
|
|
249
|
-
...
|
|
248
|
+
buttonTestRole: s,
|
|
249
|
+
onContinue: o,
|
|
250
|
+
component: h = q,
|
|
251
|
+
children: c,
|
|
252
|
+
...u
|
|
250
253
|
}) => {
|
|
251
|
-
const [
|
|
252
|
-
return /* @__PURE__ */
|
|
254
|
+
const [d, g] = A(!1);
|
|
255
|
+
return /* @__PURE__ */ k(W, { children: [
|
|
253
256
|
/* @__PURE__ */ t(
|
|
254
|
-
|
|
257
|
+
h,
|
|
255
258
|
{
|
|
256
259
|
variant: i,
|
|
257
|
-
onClick: () =>
|
|
260
|
+
onClick: () => g(!0),
|
|
258
261
|
isDisabled: l,
|
|
259
|
-
"data-testrole":
|
|
262
|
+
"data-testrole": s,
|
|
260
263
|
children: a
|
|
261
264
|
}
|
|
262
265
|
),
|
|
263
266
|
/* @__PURE__ */ t(
|
|
264
|
-
|
|
267
|
+
vt,
|
|
265
268
|
{
|
|
266
269
|
variant: "small",
|
|
267
|
-
...
|
|
270
|
+
...u,
|
|
268
271
|
title: e,
|
|
269
|
-
isOpen:
|
|
270
|
-
onClose: () =>
|
|
272
|
+
isOpen: d,
|
|
273
|
+
onClose: () => g(!1),
|
|
271
274
|
actions: [
|
|
272
275
|
/* @__PURE__ */ t(
|
|
273
|
-
|
|
276
|
+
q,
|
|
274
277
|
{
|
|
275
278
|
id: "modal-confirm",
|
|
276
279
|
variant: "primary",
|
|
277
280
|
onClick: () => {
|
|
278
|
-
|
|
281
|
+
g(!1), o();
|
|
279
282
|
},
|
|
280
283
|
children: n
|
|
281
284
|
},
|
|
282
285
|
"confirm"
|
|
283
286
|
),
|
|
284
287
|
/* @__PURE__ */ t(
|
|
285
|
-
|
|
288
|
+
q,
|
|
286
289
|
{
|
|
287
290
|
id: "modal-cancel",
|
|
288
291
|
variant: "secondary",
|
|
289
|
-
onClick: () =>
|
|
292
|
+
onClick: () => g(!1),
|
|
290
293
|
children: r
|
|
291
294
|
},
|
|
292
295
|
"cancel"
|
|
293
296
|
)
|
|
294
297
|
],
|
|
295
|
-
children:
|
|
298
|
+
children: c
|
|
296
299
|
}
|
|
297
300
|
)
|
|
298
301
|
] });
|
|
299
|
-
},
|
|
302
|
+
}, Nt = ({ message: e, ...n }) => /* @__PURE__ */ t(Ge, { ...n, children: /* @__PURE__ */ t(We, { children: /* @__PURE__ */ t(ze, { icon: /* @__PURE__ */ t(Hn, {}), variant: "error", children: e }) }) }), _t = ({
|
|
300
303
|
helpText: e,
|
|
301
304
|
fieldLabelId: n,
|
|
302
305
|
noVerticalAlign: r = !0,
|
|
303
|
-
unWrap: a = !1
|
|
306
|
+
unWrap: a = !1,
|
|
307
|
+
isRecommendation: l = !1
|
|
304
308
|
}) => {
|
|
305
|
-
const { enabled:
|
|
306
|
-
return
|
|
309
|
+
const { enabled: i } = Br(), s = l ? jn : Gn;
|
|
310
|
+
return i ? /* @__PURE__ */ t(ln, { bodyContent: e, children: /* @__PURE__ */ k(W, { children: [
|
|
307
311
|
!a && /* @__PURE__ */ t(
|
|
308
312
|
"button",
|
|
309
313
|
{
|
|
310
314
|
"data-testid": `help-label-${n}`,
|
|
311
315
|
"aria-label": n,
|
|
312
|
-
onClick: (
|
|
316
|
+
onClick: (o) => o.preventDefault(),
|
|
313
317
|
className: "pf-v5-c-form__group-label-help",
|
|
314
|
-
children: /* @__PURE__ */ t(
|
|
318
|
+
children: /* @__PURE__ */ t(
|
|
319
|
+
Ne,
|
|
320
|
+
{
|
|
321
|
+
isInline: r,
|
|
322
|
+
status: l ? "warning" : void 0,
|
|
323
|
+
children: /* @__PURE__ */ t(s, {})
|
|
324
|
+
}
|
|
325
|
+
)
|
|
315
326
|
}
|
|
316
327
|
),
|
|
317
|
-
a && /* @__PURE__ */ t(
|
|
328
|
+
a && /* @__PURE__ */ t(
|
|
329
|
+
Ne,
|
|
330
|
+
{
|
|
331
|
+
isInline: r,
|
|
332
|
+
status: l ? "warning" : void 0,
|
|
333
|
+
children: /* @__PURE__ */ t(s, {})
|
|
334
|
+
}
|
|
335
|
+
)
|
|
318
336
|
] }) }) : null;
|
|
319
337
|
};
|
|
320
|
-
function
|
|
338
|
+
function ce(e) {
|
|
321
339
|
if (!(typeof e > "u" || e instanceof RegExp))
|
|
322
340
|
return typeof e == "object" ? e.value : e;
|
|
323
341
|
}
|
|
324
|
-
const
|
|
342
|
+
const Q = ({
|
|
325
343
|
id: e,
|
|
326
344
|
name: n,
|
|
327
345
|
label: r,
|
|
328
346
|
labelIcon: a,
|
|
329
347
|
error: l,
|
|
330
348
|
children: i,
|
|
331
|
-
...
|
|
332
|
-
}) => /* @__PURE__ */
|
|
333
|
-
|
|
349
|
+
...s
|
|
350
|
+
}) => /* @__PURE__ */ k(
|
|
351
|
+
kt,
|
|
334
352
|
{
|
|
335
353
|
label: r || n,
|
|
336
354
|
fieldId: e || n,
|
|
337
|
-
labelIcon: a ? /* @__PURE__ */ t(
|
|
338
|
-
...
|
|
355
|
+
labelIcon: a ? /* @__PURE__ */ t(_t, { helpText: a, fieldLabelId: e || n }) : void 0,
|
|
356
|
+
...s,
|
|
339
357
|
children: [
|
|
340
358
|
i,
|
|
341
|
-
l && /* @__PURE__ */ t(
|
|
359
|
+
l && /* @__PURE__ */ t(Nt, { "data-testid": `${n}-helper`, message: l.message })
|
|
342
360
|
]
|
|
343
361
|
}
|
|
344
|
-
),
|
|
362
|
+
), ja = ({
|
|
345
363
|
name: e,
|
|
346
364
|
label: n,
|
|
347
365
|
controller: r,
|
|
@@ -350,41 +368,41 @@ const Y = ({
|
|
|
350
368
|
}) => {
|
|
351
369
|
const {
|
|
352
370
|
control: i,
|
|
353
|
-
formState: { errors:
|
|
354
|
-
} =
|
|
371
|
+
formState: { errors: s }
|
|
372
|
+
} = Re();
|
|
355
373
|
return /* @__PURE__ */ t(
|
|
356
|
-
|
|
374
|
+
Q,
|
|
357
375
|
{
|
|
358
376
|
name: e,
|
|
359
377
|
label: n,
|
|
360
378
|
isRequired: r.rules?.required === !0,
|
|
361
|
-
error:
|
|
379
|
+
error: s[e],
|
|
362
380
|
labelIcon: a,
|
|
363
381
|
children: /* @__PURE__ */ t(
|
|
364
|
-
|
|
382
|
+
oe,
|
|
365
383
|
{
|
|
366
384
|
...r,
|
|
367
385
|
name: e,
|
|
368
386
|
control: i,
|
|
369
|
-
render: ({ field:
|
|
370
|
-
const
|
|
371
|
-
|
|
387
|
+
render: ({ field: o }) => {
|
|
388
|
+
const h = !!r.rules?.required, c = ce(r.rules?.min), u = o.value ?? r.defaultValue, d = (g) => o.onChange(
|
|
389
|
+
c !== void 0 ? Math.max(g, Number(c)) : g
|
|
372
390
|
);
|
|
373
391
|
return /* @__PURE__ */ t(
|
|
374
392
|
sn,
|
|
375
393
|
{
|
|
376
394
|
...l,
|
|
377
395
|
id: e,
|
|
378
|
-
value:
|
|
379
|
-
validated:
|
|
380
|
-
required:
|
|
381
|
-
min: Number(
|
|
396
|
+
value: u,
|
|
397
|
+
validated: s[e] ? H.error : H.default,
|
|
398
|
+
required: h,
|
|
399
|
+
min: Number(c),
|
|
382
400
|
max: Number(r.rules?.max),
|
|
383
|
-
onPlus: () =>
|
|
384
|
-
onMinus: () =>
|
|
385
|
-
onChange: (
|
|
386
|
-
const
|
|
387
|
-
|
|
401
|
+
onPlus: () => d(u + 1),
|
|
402
|
+
onMinus: () => d(u - 1),
|
|
403
|
+
onChange: (g) => {
|
|
404
|
+
const y = Number(g.currentTarget.value);
|
|
405
|
+
d(isNaN(y) ? r.defaultValue : y);
|
|
388
406
|
}
|
|
389
407
|
}
|
|
390
408
|
);
|
|
@@ -393,14 +411,14 @@ const Y = ({
|
|
|
393
411
|
)
|
|
394
412
|
}
|
|
395
413
|
);
|
|
396
|
-
},
|
|
414
|
+
}, qr = ({
|
|
397
415
|
hasReveal: e = !0,
|
|
398
416
|
innerRef: n,
|
|
399
417
|
...r
|
|
400
418
|
}) => {
|
|
401
|
-
const { t: a } =
|
|
402
|
-
return /* @__PURE__ */
|
|
403
|
-
/* @__PURE__ */ t(
|
|
419
|
+
const { t: a } = $(), [l, i] = A(!0);
|
|
420
|
+
return /* @__PURE__ */ k(xe, { children: [
|
|
421
|
+
/* @__PURE__ */ t(_e, { isFill: !0, children: /* @__PURE__ */ t(
|
|
404
422
|
Se,
|
|
405
423
|
{
|
|
406
424
|
...r,
|
|
@@ -409,280 +427,291 @@ const Y = ({
|
|
|
409
427
|
}
|
|
410
428
|
) }),
|
|
411
429
|
e && /* @__PURE__ */ t(
|
|
412
|
-
|
|
430
|
+
q,
|
|
413
431
|
{
|
|
414
432
|
variant: "control",
|
|
415
433
|
"aria-label": a("showPassword"),
|
|
416
434
|
onClick: () => i(!l),
|
|
417
|
-
children: l ? /* @__PURE__ */ t(
|
|
435
|
+
children: l ? /* @__PURE__ */ t(Wn, {}) : /* @__PURE__ */ t(zn, {})
|
|
418
436
|
}
|
|
419
437
|
)
|
|
420
438
|
] });
|
|
421
|
-
},
|
|
422
|
-
(e, n) => /* @__PURE__ */ t(
|
|
439
|
+
}, qt = qn(
|
|
440
|
+
(e, n) => /* @__PURE__ */ t(qr, { ...e, innerRef: n })
|
|
423
441
|
);
|
|
424
|
-
|
|
425
|
-
const
|
|
426
|
-
const { labelIcon: n, ...r } = e, a = !!
|
|
442
|
+
qt.displayName = "PasswordInput";
|
|
443
|
+
const Ga = (e) => {
|
|
444
|
+
const { labelIcon: n, ...r } = e, a = !!ce(e.rules?.required), l = e.defaultValue ?? "", { field: i, fieldState: s } = De({
|
|
427
445
|
...e,
|
|
428
446
|
defaultValue: l
|
|
429
447
|
});
|
|
430
|
-
return /* @__PURE__ */
|
|
431
|
-
|
|
448
|
+
return /* @__PURE__ */ k(
|
|
449
|
+
Q,
|
|
432
450
|
{
|
|
433
451
|
name: e.name,
|
|
434
452
|
label: e.label,
|
|
435
453
|
labelIcon: n,
|
|
436
454
|
isRequired: a,
|
|
437
|
-
error:
|
|
455
|
+
error: s.error,
|
|
438
456
|
children: [
|
|
439
457
|
/* @__PURE__ */ t(
|
|
440
|
-
|
|
458
|
+
qt,
|
|
441
459
|
{
|
|
442
460
|
isRequired: a,
|
|
443
461
|
id: e.name,
|
|
444
462
|
"data-testid": e.name,
|
|
445
|
-
validated:
|
|
463
|
+
validated: s.error ? H.error : H.default,
|
|
446
464
|
isDisabled: e.isDisabled,
|
|
447
465
|
...r,
|
|
448
466
|
...i
|
|
449
467
|
}
|
|
450
468
|
),
|
|
451
|
-
e.helperText && /* @__PURE__ */ t(
|
|
469
|
+
e.helperText && /* @__PURE__ */ t(Ge, { children: /* @__PURE__ */ t(We, { children: /* @__PURE__ */ t(ze, { children: e.helperText }) }) })
|
|
452
470
|
]
|
|
453
471
|
}
|
|
454
472
|
);
|
|
455
|
-
},
|
|
473
|
+
}, $r = ({
|
|
456
474
|
id: e,
|
|
457
475
|
name: n,
|
|
458
476
|
label: r,
|
|
459
477
|
options: a,
|
|
460
478
|
selectedOptions: l = [],
|
|
461
479
|
controller: i,
|
|
462
|
-
labelIcon:
|
|
463
|
-
isDisabled:
|
|
464
|
-
|
|
480
|
+
labelIcon: s,
|
|
481
|
+
isDisabled: o,
|
|
482
|
+
isFullWidth: h = !0,
|
|
483
|
+
onSelect: c,
|
|
465
484
|
...u
|
|
466
485
|
}) => {
|
|
467
486
|
const {
|
|
468
|
-
control:
|
|
469
|
-
formState: { errors:
|
|
470
|
-
} =
|
|
487
|
+
control: d,
|
|
488
|
+
formState: { errors: g }
|
|
489
|
+
} = Re(), [y, C] = A(!1), R = ce(i.rules?.required) === !0;
|
|
471
490
|
return /* @__PURE__ */ t(
|
|
472
|
-
|
|
491
|
+
Q,
|
|
473
492
|
{
|
|
474
493
|
id: e,
|
|
475
494
|
name: n,
|
|
476
495
|
label: r,
|
|
477
|
-
isRequired:
|
|
478
|
-
error:
|
|
479
|
-
labelIcon:
|
|
496
|
+
isRequired: R,
|
|
497
|
+
error: _(g, n),
|
|
498
|
+
labelIcon: s,
|
|
480
499
|
children: /* @__PURE__ */ t(
|
|
481
|
-
|
|
500
|
+
oe,
|
|
482
501
|
{
|
|
483
502
|
...i,
|
|
484
503
|
name: n,
|
|
485
|
-
control:
|
|
486
|
-
render: ({ field: { onChange:
|
|
487
|
-
|
|
504
|
+
control: d,
|
|
505
|
+
render: ({ field: { onChange: v, value: p } }) => /* @__PURE__ */ t(
|
|
506
|
+
Ee,
|
|
488
507
|
{
|
|
489
508
|
...u,
|
|
490
509
|
variant: "default",
|
|
491
|
-
onClick: () =>
|
|
492
|
-
onOpenChange: () =>
|
|
493
|
-
selected:
|
|
494
|
-
(
|
|
495
|
-
).map((
|
|
496
|
-
toggle: (
|
|
510
|
+
onClick: () => C(!y),
|
|
511
|
+
onOpenChange: () => C(!1),
|
|
512
|
+
selected: re(a) ? a.filter(
|
|
513
|
+
(b) => Array.isArray(p) ? p.includes(b.key) : p === b.key
|
|
514
|
+
).map((b) => b.value) : p,
|
|
515
|
+
toggle: (b) => /* @__PURE__ */ t(
|
|
497
516
|
me,
|
|
498
517
|
{
|
|
499
518
|
id: e || n,
|
|
500
|
-
ref:
|
|
501
|
-
onClick: () =>
|
|
519
|
+
ref: b,
|
|
520
|
+
onClick: () => C(!y),
|
|
502
521
|
isExpanded: y,
|
|
503
|
-
isFullWidth:
|
|
504
|
-
status:
|
|
522
|
+
isFullWidth: h,
|
|
523
|
+
status: _(g, n) ? Ye.danger : void 0,
|
|
505
524
|
"aria-label": r,
|
|
506
|
-
isDisabled:
|
|
507
|
-
children:
|
|
508
|
-
(
|
|
525
|
+
isDisabled: o,
|
|
526
|
+
children: re(a) ? a.find(
|
|
527
|
+
(E) => E.key === (Array.isArray(p) ? p[0] : p)
|
|
509
528
|
)?.value : p
|
|
510
529
|
}
|
|
511
530
|
),
|
|
512
|
-
onSelect: (
|
|
513
|
-
const
|
|
514
|
-
|
|
531
|
+
onSelect: (b, E) => {
|
|
532
|
+
const I = E?.toString(), f = Array.isArray(p) ? [I] : I;
|
|
533
|
+
c ? c(f, v) : v(f), C(!1);
|
|
515
534
|
},
|
|
516
535
|
isOpen: y,
|
|
517
|
-
children: /* @__PURE__ */ t(
|
|
536
|
+
children: /* @__PURE__ */ t(Ae, { "data-testid": `select-${n}`, children: [...a, ...l].map((b) => /* @__PURE__ */ t(
|
|
537
|
+
Je,
|
|
538
|
+
{
|
|
539
|
+
value: ie(b),
|
|
540
|
+
description: !pe(b) && "description" in b ? b.description : void 0,
|
|
541
|
+
children: pe(b) ? b : b.value
|
|
542
|
+
},
|
|
543
|
+
ie(b)
|
|
544
|
+
)) })
|
|
518
545
|
}
|
|
519
546
|
)
|
|
520
547
|
}
|
|
521
548
|
)
|
|
522
549
|
}
|
|
523
550
|
);
|
|
524
|
-
},
|
|
551
|
+
}, ne = (e) => pe(e) ? e : e.value, Ur = ({
|
|
525
552
|
id: e,
|
|
526
553
|
name: n,
|
|
527
554
|
label: r,
|
|
528
555
|
options: a,
|
|
529
556
|
selectedOptions: l = [],
|
|
530
557
|
controller: i,
|
|
531
|
-
labelIcon:
|
|
532
|
-
placeholderText:
|
|
533
|
-
onFilter:
|
|
534
|
-
variant:
|
|
535
|
-
|
|
558
|
+
labelIcon: s,
|
|
559
|
+
placeholderText: o,
|
|
560
|
+
onFilter: h,
|
|
561
|
+
variant: c,
|
|
562
|
+
isFullWidth: u = !0,
|
|
563
|
+
...d
|
|
536
564
|
}) => {
|
|
537
565
|
const {
|
|
538
|
-
control:
|
|
566
|
+
control: g,
|
|
539
567
|
formState: { errors: y }
|
|
540
|
-
} =
|
|
568
|
+
} = Re(), [C, R] = A(!1), [v, p] = A(""), [b, E] = A(0), [I, f] = A([]), T = Y(), V = ce(i.rules?.required) === !0, O = c === ue.typeaheadMulti, D = U(
|
|
541
569
|
() => [
|
|
542
570
|
...a.filter(
|
|
543
|
-
(
|
|
571
|
+
(m) => !l.map((x) => ne(x)).includes(ne(m))
|
|
544
572
|
),
|
|
545
573
|
...l
|
|
546
574
|
],
|
|
547
575
|
[l, a]
|
|
548
|
-
),
|
|
549
|
-
(
|
|
550
|
-
),
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
)) : (
|
|
554
|
-
...
|
|
555
|
-
|
|
576
|
+
), j = D.filter(
|
|
577
|
+
(m) => ne(m).toLowerCase().startsWith(v.toLowerCase())
|
|
578
|
+
), F = (m, x) => {
|
|
579
|
+
x.value.includes(m) ? (x.onChange(x.value.filter((S) => S !== m)), re(a) && f(
|
|
580
|
+
I.filter((S) => S.key !== m)
|
|
581
|
+
)) : (x.onChange([...x.value, m]), re(D) && f([
|
|
582
|
+
...I,
|
|
583
|
+
D.find((S) => S.key === m)
|
|
556
584
|
]));
|
|
557
|
-
},
|
|
558
|
-
const
|
|
559
|
-
switch (
|
|
585
|
+
}, B = (m, x) => {
|
|
586
|
+
const S = j[b];
|
|
587
|
+
switch (R(!0), m.key) {
|
|
560
588
|
case "Enter": {
|
|
561
|
-
|
|
589
|
+
m.preventDefault(), p(O ? "" : ne(S)), F(ie(S), x), R(!1), E(0);
|
|
562
590
|
break;
|
|
563
591
|
}
|
|
564
592
|
case "Tab":
|
|
565
593
|
case "Escape": {
|
|
566
|
-
|
|
594
|
+
R(!1), x.onChange(void 0);
|
|
567
595
|
break;
|
|
568
596
|
}
|
|
569
597
|
case "Backspace": {
|
|
570
|
-
|
|
598
|
+
c === ue.typeahead && x.onChange("");
|
|
571
599
|
break;
|
|
572
600
|
}
|
|
573
601
|
case "ArrowUp":
|
|
574
602
|
case "ArrowDown": {
|
|
575
|
-
|
|
576
|
-
let
|
|
577
|
-
|
|
603
|
+
m.preventDefault();
|
|
604
|
+
let L = 0;
|
|
605
|
+
m.key === "ArrowUp" && (b === 0 ? L = a.length - 1 : L = b - 1), m.key === "ArrowDown" && (b === a.length - 1 ? L = 0 : L = b + 1), E(L);
|
|
578
606
|
break;
|
|
579
607
|
}
|
|
580
608
|
}
|
|
581
609
|
};
|
|
582
610
|
return /* @__PURE__ */ t(
|
|
583
|
-
|
|
611
|
+
Q,
|
|
584
612
|
{
|
|
585
613
|
id: e,
|
|
586
614
|
name: n,
|
|
587
615
|
label: r,
|
|
588
|
-
isRequired:
|
|
589
|
-
error:
|
|
590
|
-
labelIcon:
|
|
616
|
+
isRequired: V,
|
|
617
|
+
error: _(y, n),
|
|
618
|
+
labelIcon: s,
|
|
591
619
|
children: /* @__PURE__ */ t(
|
|
592
|
-
|
|
620
|
+
oe,
|
|
593
621
|
{
|
|
594
622
|
...i,
|
|
595
623
|
name: n,
|
|
596
|
-
control:
|
|
597
|
-
render: ({ field:
|
|
598
|
-
|
|
624
|
+
control: g,
|
|
625
|
+
render: ({ field: m }) => /* @__PURE__ */ t(
|
|
626
|
+
Ee,
|
|
599
627
|
{
|
|
600
|
-
...
|
|
601
|
-
onOpenChange: () =>
|
|
602
|
-
selected:
|
|
603
|
-
(
|
|
604
|
-
).map((
|
|
628
|
+
...d,
|
|
629
|
+
onOpenChange: () => R(!1),
|
|
630
|
+
selected: re(D) ? D.filter(
|
|
631
|
+
(x) => Array.isArray(m.value) ? m.value.includes(x.key) : m.value === x.key
|
|
632
|
+
).map((x) => x.value) : m.value,
|
|
605
633
|
shouldFocusFirstItemOnOpen: !1,
|
|
606
|
-
toggle: (
|
|
634
|
+
toggle: (x) => /* @__PURE__ */ t(
|
|
607
635
|
me,
|
|
608
636
|
{
|
|
609
|
-
ref:
|
|
637
|
+
ref: x,
|
|
610
638
|
id: e || n,
|
|
611
639
|
variant: "typeahead",
|
|
612
640
|
onClick: () => {
|
|
613
|
-
|
|
641
|
+
R(!C), T.current?.focus();
|
|
614
642
|
},
|
|
615
|
-
isExpanded:
|
|
616
|
-
isFullWidth:
|
|
617
|
-
status:
|
|
618
|
-
children: /* @__PURE__ */
|
|
643
|
+
isExpanded: C,
|
|
644
|
+
isFullWidth: u,
|
|
645
|
+
status: _(y, n) ? Ye.danger : void 0,
|
|
646
|
+
children: /* @__PURE__ */ k(It, { isPlain: !0, children: [
|
|
619
647
|
/* @__PURE__ */ t(
|
|
620
|
-
|
|
648
|
+
wt,
|
|
621
649
|
{
|
|
622
|
-
placeholder:
|
|
623
|
-
value:
|
|
624
|
-
(
|
|
625
|
-
)?.value :
|
|
626
|
-
onClick: () =>
|
|
627
|
-
onChange: (
|
|
628
|
-
p(
|
|
650
|
+
placeholder: o,
|
|
651
|
+
value: c === ue.typeahead && m.value ? re(D) ? D.find(
|
|
652
|
+
(S) => S.key === (Array.isArray(m.value) ? m.value[0] : m.value)
|
|
653
|
+
)?.value : m.value : v,
|
|
654
|
+
onClick: () => R(!C),
|
|
655
|
+
onChange: (S, L) => {
|
|
656
|
+
p(L), h?.(L);
|
|
629
657
|
},
|
|
630
|
-
onKeyDown: (
|
|
658
|
+
onKeyDown: (S) => B(S, m),
|
|
631
659
|
autoComplete: "off",
|
|
632
|
-
innerRef:
|
|
660
|
+
innerRef: T,
|
|
633
661
|
role: "combobox",
|
|
634
|
-
isExpanded:
|
|
662
|
+
isExpanded: C,
|
|
635
663
|
"aria-controls": "select-typeahead-listbox",
|
|
636
|
-
children:
|
|
637
|
-
(
|
|
638
|
-
|
|
664
|
+
children: c === ue.typeaheadMulti && Array.isArray(m.value) && /* @__PURE__ */ t(Qe, { "aria-label": "Current selections", children: m.value.map(
|
|
665
|
+
(S, L) => /* @__PURE__ */ t(
|
|
666
|
+
Xe,
|
|
639
667
|
{
|
|
640
|
-
onClick: (
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
(
|
|
668
|
+
onClick: (N) => {
|
|
669
|
+
N.stopPropagation(), m.onChange(
|
|
670
|
+
m.value.filter(
|
|
671
|
+
(Z) => Z !== ie(S)
|
|
644
672
|
)
|
|
645
673
|
);
|
|
646
674
|
},
|
|
647
|
-
children:
|
|
648
|
-
...
|
|
649
|
-
...
|
|
650
|
-
].find((
|
|
675
|
+
children: re(D) ? [
|
|
676
|
+
...D,
|
|
677
|
+
...I
|
|
678
|
+
].find((N) => S === N.key)?.value : ne(S)
|
|
651
679
|
},
|
|
652
|
-
|
|
680
|
+
L
|
|
653
681
|
)
|
|
654
682
|
) })
|
|
655
683
|
}
|
|
656
684
|
),
|
|
657
|
-
/* @__PURE__ */ t(
|
|
658
|
-
|
|
685
|
+
/* @__PURE__ */ t(Tt, { children: (!!v || m.value) && /* @__PURE__ */ t(
|
|
686
|
+
q,
|
|
659
687
|
{
|
|
660
688
|
variant: "plain",
|
|
661
689
|
onClick: () => {
|
|
662
|
-
p(""),
|
|
690
|
+
p(""), m.onChange(O ? [] : ""), T?.current?.focus();
|
|
663
691
|
},
|
|
664
692
|
"aria-label": "Clear input value",
|
|
665
|
-
children: /* @__PURE__ */ t(
|
|
693
|
+
children: /* @__PURE__ */ t(Ft, { "aria-hidden": !0 })
|
|
666
694
|
}
|
|
667
695
|
) })
|
|
668
696
|
] })
|
|
669
697
|
}
|
|
670
698
|
),
|
|
671
|
-
onSelect: (
|
|
672
|
-
|
|
673
|
-
const
|
|
674
|
-
|
|
699
|
+
onSelect: (x, S) => {
|
|
700
|
+
x?.stopPropagation();
|
|
701
|
+
const L = S?.toString();
|
|
702
|
+
O && Array.isArray(m.value) ? (p(""), F(L || "", m)) : (m.onChange(Array.isArray(m.value) ? [L] : L), R(!1));
|
|
675
703
|
},
|
|
676
|
-
isOpen:
|
|
677
|
-
children: /* @__PURE__ */ t(
|
|
678
|
-
|
|
704
|
+
isOpen: C,
|
|
705
|
+
children: /* @__PURE__ */ t(Ae, { children: j.map((x, S) => /* @__PURE__ */ t(
|
|
706
|
+
Je,
|
|
679
707
|
{
|
|
680
|
-
value:
|
|
681
|
-
isFocused:
|
|
682
|
-
isActive:
|
|
683
|
-
|
|
708
|
+
value: ie(x),
|
|
709
|
+
isFocused: b === S,
|
|
710
|
+
isActive: m.value.includes(ne(x)),
|
|
711
|
+
description: !pe(x) && "description" in x ? x.description : void 0,
|
|
712
|
+
children: ne(x)
|
|
684
713
|
},
|
|
685
|
-
|
|
714
|
+
ie(x)
|
|
686
715
|
)) })
|
|
687
716
|
}
|
|
688
717
|
)
|
|
@@ -692,25 +721,25 @@ const Wa = (e) => {
|
|
|
692
721
|
);
|
|
693
722
|
};
|
|
694
723
|
var ue = /* @__PURE__ */ ((e) => (e.single = "single", e.typeahead = "typeahead", e.typeaheadMulti = "typeaheadMulti", e))(ue || {});
|
|
695
|
-
const
|
|
724
|
+
const re = (e) => typeof e[0] != "string", pe = (e) => typeof e == "string", ie = (e) => pe(e) ? e : e.key, Kr = ({
|
|
696
725
|
variant: e = "single",
|
|
697
726
|
...n
|
|
698
|
-
}) => e === "single" ? /* @__PURE__ */ t(
|
|
699
|
-
const l = n || r, i =
|
|
700
|
-
return e(
|
|
701
|
-
},
|
|
727
|
+
}) => e === "single" ? /* @__PURE__ */ t($r, { ...n }) : /* @__PURE__ */ t(Ur, { ...n, variant: e }), Ue = (e) => e && typeof e == "string" ? e.includes("${") : !1, Ke = (e) => e.substring(2, e.length - 1), ae = (e, n, r, a) => {
|
|
728
|
+
const l = n || r, i = Ue(l) ? Ke(l) : l, s = a ? `${a}.${i}` : i;
|
|
729
|
+
return e(s || "");
|
|
730
|
+
}, He = (e, n) => ae(e, n.displayName, n.name), Hr = ["username", "firstName", "lastName", "email"], $t = (e) => e && Hr.includes(e), X = (e) => `${$t(e) ? "" : "attributes."}${e?.replaceAll(
|
|
702
731
|
".",
|
|
703
732
|
"🍺"
|
|
704
|
-
)}`,
|
|
705
|
-
function
|
|
733
|
+
)}`, Wa = (e) => e.replaceAll(".", "🍺"), jr = (e) => e.replaceAll("🍺", ".");
|
|
734
|
+
function za(e, n, r) {
|
|
706
735
|
(e.responseData.errors !== void 0 ? e.responseData.errors : [e.responseData]).forEach((a) => {
|
|
707
736
|
const l = Object.assign(
|
|
708
737
|
{},
|
|
709
|
-
a.params?.map((i) =>
|
|
738
|
+
a.params?.map((i) => Ue(i) ? r(Ke(i)) : i)
|
|
710
739
|
);
|
|
711
|
-
n(
|
|
740
|
+
n(X(a.field), {
|
|
712
741
|
message: r(
|
|
713
|
-
|
|
742
|
+
Ue(a.errorMessage) ? Ke(a.errorMessage) : a.errorMessage,
|
|
714
743
|
{
|
|
715
744
|
/* eslint-disable @typescript-eslint/no-misused-spread */
|
|
716
745
|
...l,
|
|
@@ -721,30 +750,30 @@ function Ga(e, n, r) {
|
|
|
721
750
|
});
|
|
722
751
|
});
|
|
723
752
|
}
|
|
724
|
-
function
|
|
753
|
+
function Oe({
|
|
725
754
|
required: e
|
|
726
755
|
}) {
|
|
727
756
|
return e;
|
|
728
757
|
}
|
|
729
|
-
function
|
|
758
|
+
function Ja(e) {
|
|
730
759
|
if (typeof e != "object" || e === null || !("responseData" in e))
|
|
731
760
|
return !1;
|
|
732
761
|
const { responseData: n } = e;
|
|
733
|
-
return
|
|
762
|
+
return ut(n) ? !0 : typeof n != "object" || n === null || !("errors" in n) || !Array.isArray(n.errors) ? !1 : n.errors.every(ut);
|
|
734
763
|
}
|
|
735
|
-
function
|
|
764
|
+
function ut(e) {
|
|
736
765
|
return !(typeof e != "object" || e === null || !("field" in e) || typeof e.field != "string" || !("errorMessage" in e) || typeof e.errorMessage != "string");
|
|
737
766
|
}
|
|
738
|
-
const
|
|
767
|
+
const Ya = ({
|
|
739
768
|
labelOn: e,
|
|
740
769
|
stringify: n,
|
|
741
770
|
defaultValue: r,
|
|
742
771
|
labelIcon: a,
|
|
743
772
|
...l
|
|
744
773
|
}) => {
|
|
745
|
-
const
|
|
774
|
+
const s = r ?? (n ? "false" : !1), { control: o } = Re();
|
|
746
775
|
return /* @__PURE__ */ t(
|
|
747
|
-
|
|
776
|
+
Q,
|
|
748
777
|
{
|
|
749
778
|
hasNoPaddingTop: !0,
|
|
750
779
|
name: l.name,
|
|
@@ -752,23 +781,23 @@ const Ja = ({
|
|
|
752
781
|
label: l.label,
|
|
753
782
|
labelIcon: a,
|
|
754
783
|
children: /* @__PURE__ */ t(
|
|
755
|
-
|
|
784
|
+
oe,
|
|
756
785
|
{
|
|
757
|
-
control:
|
|
786
|
+
control: o,
|
|
758
787
|
name: l.name,
|
|
759
|
-
defaultValue:
|
|
760
|
-
render: ({ field: { onChange:
|
|
761
|
-
|
|
788
|
+
defaultValue: s,
|
|
789
|
+
render: ({ field: { onChange: h, value: c } }) => /* @__PURE__ */ t(
|
|
790
|
+
on,
|
|
762
791
|
{
|
|
763
792
|
...l,
|
|
764
793
|
id: l.name,
|
|
765
|
-
"data-testid":
|
|
794
|
+
"data-testid": jr(l.name),
|
|
766
795
|
label: e,
|
|
767
796
|
"aria-label": l.label,
|
|
768
|
-
isChecked: n ?
|
|
769
|
-
onChange: (
|
|
770
|
-
const
|
|
771
|
-
l.onChange?.(
|
|
797
|
+
isChecked: n ? c === "true" : c,
|
|
798
|
+
onChange: (u, d) => {
|
|
799
|
+
const g = n ? d.toString() : d;
|
|
800
|
+
l.onChange?.(u, d), h(g);
|
|
772
801
|
}
|
|
773
802
|
}
|
|
774
803
|
)
|
|
@@ -776,13 +805,13 @@ const Ja = ({
|
|
|
776
805
|
)
|
|
777
806
|
}
|
|
778
807
|
);
|
|
779
|
-
},
|
|
780
|
-
const n = !!e.rules?.required, r = e.defaultValue ?? "", { field: a, fieldState: l } =
|
|
808
|
+
}, Qa = (e) => {
|
|
809
|
+
const n = !!e.rules?.required, r = e.defaultValue ?? "", { field: a, fieldState: l } = De({
|
|
781
810
|
...e,
|
|
782
811
|
defaultValue: r
|
|
783
812
|
});
|
|
784
813
|
return /* @__PURE__ */ t(
|
|
785
|
-
|
|
814
|
+
Q,
|
|
786
815
|
{
|
|
787
816
|
isRequired: n,
|
|
788
817
|
label: e.label,
|
|
@@ -790,12 +819,12 @@ const Ja = ({
|
|
|
790
819
|
name: e.name,
|
|
791
820
|
error: l.error,
|
|
792
821
|
children: /* @__PURE__ */ t(
|
|
793
|
-
|
|
822
|
+
xt,
|
|
794
823
|
{
|
|
795
824
|
isRequired: n,
|
|
796
825
|
id: e.name,
|
|
797
826
|
"data-testid": e.name,
|
|
798
|
-
validated: l.error ?
|
|
827
|
+
validated: l.error ? H.error : H.default,
|
|
799
828
|
isDisabled: e.isDisabled,
|
|
800
829
|
...e,
|
|
801
830
|
...a
|
|
@@ -803,19 +832,19 @@ const Ja = ({
|
|
|
803
832
|
)
|
|
804
833
|
}
|
|
805
834
|
);
|
|
806
|
-
},
|
|
807
|
-
const { labelIcon: n, helperText: r, ...a } = e, l = !!
|
|
835
|
+
}, Xa = (e) => {
|
|
836
|
+
const { labelIcon: n, helperText: r, ...a } = e, l = !!ce(e.rules?.required), i = e.defaultValue ?? "", { field: s, fieldState: o } = De({
|
|
808
837
|
...e,
|
|
809
838
|
defaultValue: i
|
|
810
839
|
});
|
|
811
|
-
return /* @__PURE__ */
|
|
812
|
-
|
|
840
|
+
return /* @__PURE__ */ k(
|
|
841
|
+
Q,
|
|
813
842
|
{
|
|
814
843
|
name: e.name,
|
|
815
844
|
label: e.label,
|
|
816
845
|
labelIcon: n,
|
|
817
846
|
isRequired: l,
|
|
818
|
-
error:
|
|
847
|
+
error: o.error,
|
|
819
848
|
children: [
|
|
820
849
|
/* @__PURE__ */ t(
|
|
821
850
|
Se,
|
|
@@ -823,169 +852,169 @@ const Ja = ({
|
|
|
823
852
|
isRequired: l,
|
|
824
853
|
id: e.name,
|
|
825
854
|
"data-testid": e["data-testid"] || e.name,
|
|
826
|
-
validated:
|
|
855
|
+
validated: o.error ? H.error : H.default,
|
|
827
856
|
isDisabled: e.isDisabled,
|
|
828
857
|
...a,
|
|
829
|
-
...
|
|
858
|
+
...s
|
|
830
859
|
}
|
|
831
860
|
),
|
|
832
|
-
r && /* @__PURE__ */ t(
|
|
861
|
+
r && /* @__PURE__ */ t(Ge, { children: /* @__PURE__ */ t(We, { children: /* @__PURE__ */ t(ze, { children: r }) }) })
|
|
833
862
|
]
|
|
834
863
|
}
|
|
835
864
|
);
|
|
836
|
-
},
|
|
837
|
-
const { labelIcon: n, ...r } = e, a = !!
|
|
865
|
+
}, Gr = xt, Za = (e) => {
|
|
866
|
+
const { labelIcon: n, ...r } = e, a = !!ce(e.rules?.required), l = e.defaultValue ?? "", { t: i } = $(), [s, o] = A(""), { field: h, fieldState: c } = De({
|
|
838
867
|
...e,
|
|
839
868
|
defaultValue: l
|
|
840
869
|
});
|
|
841
870
|
return /* @__PURE__ */ t(
|
|
842
|
-
|
|
871
|
+
Q,
|
|
843
872
|
{
|
|
844
873
|
name: e.name,
|
|
845
874
|
label: e.label,
|
|
846
875
|
labelIcon: n,
|
|
847
876
|
isRequired: a,
|
|
848
|
-
error:
|
|
877
|
+
error: c.error,
|
|
849
878
|
children: /* @__PURE__ */ t(
|
|
850
|
-
|
|
879
|
+
cn,
|
|
851
880
|
{
|
|
852
881
|
isRequired: a,
|
|
853
882
|
"data-testid": e["data-testid"] || e.name,
|
|
854
|
-
filename:
|
|
883
|
+
filename: s,
|
|
855
884
|
browseButtonText: i("browse"),
|
|
856
|
-
validated:
|
|
885
|
+
validated: c.error ? H.error : H.default,
|
|
857
886
|
hideDefaultPreview: !0,
|
|
858
887
|
isDisabled: e.isDisabled,
|
|
859
888
|
type: "text",
|
|
860
|
-
onFileInputChange: (
|
|
861
|
-
|
|
889
|
+
onFileInputChange: (u, d) => {
|
|
890
|
+
h.onChange(d), o(d.name);
|
|
862
891
|
},
|
|
863
892
|
onClearClick: () => {
|
|
864
|
-
|
|
893
|
+
h.onChange(null), o("");
|
|
865
894
|
},
|
|
866
895
|
...r,
|
|
867
|
-
...
|
|
896
|
+
...h
|
|
868
897
|
}
|
|
869
898
|
)
|
|
870
899
|
}
|
|
871
900
|
);
|
|
872
|
-
},
|
|
873
|
-
const n =
|
|
874
|
-
return /* @__PURE__ */ t(
|
|
901
|
+
}, el = ({ icon: e }) => {
|
|
902
|
+
const n = Wr(e);
|
|
903
|
+
return /* @__PURE__ */ t(Ne, { size: "lg", children: /* @__PURE__ */ t(n, { alt: e }) });
|
|
875
904
|
};
|
|
876
|
-
function
|
|
905
|
+
function Wr(e) {
|
|
877
906
|
switch (e) {
|
|
878
907
|
case "github":
|
|
879
|
-
return
|
|
908
|
+
return sr;
|
|
880
909
|
case "facebook":
|
|
881
|
-
return
|
|
910
|
+
return ir;
|
|
882
911
|
case "gitlab":
|
|
883
|
-
return
|
|
912
|
+
return lr;
|
|
884
913
|
case "google":
|
|
885
|
-
return
|
|
914
|
+
return ar;
|
|
886
915
|
case "linkedin":
|
|
887
916
|
case "linkedin-openid-connect":
|
|
888
|
-
return
|
|
917
|
+
return rr;
|
|
889
918
|
case "openshift-v4":
|
|
890
|
-
return
|
|
919
|
+
return nr;
|
|
891
920
|
case "stackoverflow":
|
|
892
|
-
return
|
|
921
|
+
return tr;
|
|
893
922
|
case "twitter":
|
|
894
|
-
return
|
|
923
|
+
return er;
|
|
895
924
|
case "microsoft":
|
|
896
|
-
return
|
|
925
|
+
return Zn;
|
|
897
926
|
case "bitbucket":
|
|
898
|
-
return
|
|
927
|
+
return Xn;
|
|
899
928
|
case "instagram":
|
|
900
|
-
return
|
|
929
|
+
return Qn;
|
|
901
930
|
case "paypal":
|
|
902
|
-
return
|
|
931
|
+
return Yn;
|
|
903
932
|
default:
|
|
904
|
-
return
|
|
933
|
+
return Jn;
|
|
905
934
|
}
|
|
906
935
|
}
|
|
907
|
-
const
|
|
908
|
-
title:
|
|
909
|
-
},
|
|
936
|
+
const zr = "_title_180i0_2", Jr = {
|
|
937
|
+
title: zr
|
|
938
|
+
}, Ut = ({
|
|
910
939
|
id: e,
|
|
911
940
|
title: n,
|
|
912
941
|
headingLevel: r = "h1",
|
|
913
942
|
size: a = "xl",
|
|
914
943
|
...l
|
|
915
944
|
}) => /* @__PURE__ */ t(
|
|
916
|
-
|
|
945
|
+
dn,
|
|
917
946
|
{
|
|
918
947
|
headingLevel: r,
|
|
919
948
|
size: a,
|
|
920
|
-
className:
|
|
949
|
+
className: Jr.title,
|
|
921
950
|
id: e,
|
|
922
951
|
tabIndex: 0,
|
|
923
952
|
...l,
|
|
924
953
|
children: n
|
|
925
954
|
}
|
|
926
|
-
),
|
|
955
|
+
), Yr = ({
|
|
927
956
|
title: e,
|
|
928
957
|
children: n,
|
|
929
958
|
scrollId: r,
|
|
930
959
|
className: a
|
|
931
960
|
}) => {
|
|
932
|
-
const l =
|
|
933
|
-
return /* @__PURE__ */
|
|
934
|
-
/* @__PURE__ */ t(
|
|
935
|
-
/* @__PURE__ */ t(
|
|
961
|
+
const l = At();
|
|
962
|
+
return /* @__PURE__ */ k(un, { id: l, className: a, isFlat: !0, children: [
|
|
963
|
+
/* @__PURE__ */ t(hn, { className: "kc-form-panel__header", children: /* @__PURE__ */ t(pn, { tabIndex: 0, children: /* @__PURE__ */ t(Ut, { id: r, title: e }) }) }),
|
|
964
|
+
/* @__PURE__ */ t(mn, { className: "kc-form-panel__body", children: n })
|
|
936
965
|
] });
|
|
937
|
-
},
|
|
966
|
+
}, Qr = (e) => {
|
|
938
967
|
const { title: n, children: r, scrollId: a, ...l } = e;
|
|
939
|
-
return /* @__PURE__ */ t("section", { ...l, style: { marginTop: "var(--pf-v5-global--spacer--lg)" }, children: /* @__PURE__ */
|
|
940
|
-
/* @__PURE__ */ t(
|
|
968
|
+
return /* @__PURE__ */ t("section", { ...l, style: { marginTop: "var(--pf-v5-global--spacer--lg)" }, children: /* @__PURE__ */ k(W, { children: [
|
|
969
|
+
/* @__PURE__ */ t(Ut, { id: a, title: n }),
|
|
941
970
|
r
|
|
942
971
|
] }) });
|
|
943
|
-
},
|
|
944
|
-
panel:
|
|
945
|
-
sticky:
|
|
946
|
-
},
|
|
972
|
+
}, Xr = "_panel_1cdve_1", Zr = "_sticky_1cdve_5", ht = {
|
|
973
|
+
panel: Xr,
|
|
974
|
+
sticky: Zr
|
|
975
|
+
}, ea = "kc-main-content-page-container", pt = (e) => e.replace(/\s+/g, "-"), ta = ({
|
|
947
976
|
label: e,
|
|
948
977
|
sections: n,
|
|
949
978
|
borders: r = !1,
|
|
950
979
|
...a
|
|
951
980
|
}) => {
|
|
952
|
-
const l =
|
|
981
|
+
const l = U(
|
|
953
982
|
() => n.filter(({ isHidden: i }) => !i),
|
|
954
983
|
[n]
|
|
955
984
|
);
|
|
956
|
-
return /* @__PURE__ */
|
|
957
|
-
/* @__PURE__ */ t(
|
|
958
|
-
const
|
|
959
|
-
return /* @__PURE__ */ t(
|
|
960
|
-
|
|
985
|
+
return /* @__PURE__ */ k(fn, { hasGutter: !0, ...a, children: [
|
|
986
|
+
/* @__PURE__ */ t(st, { md: 8, sm: 12, children: l.map(({ title: i, panel: s }) => {
|
|
987
|
+
const o = pt(i.toLowerCase());
|
|
988
|
+
return /* @__PURE__ */ t(Rt, { children: r ? /* @__PURE__ */ t(
|
|
989
|
+
Yr,
|
|
961
990
|
{
|
|
962
|
-
scrollId:
|
|
991
|
+
scrollId: o,
|
|
963
992
|
title: i,
|
|
964
|
-
className:
|
|
965
|
-
children:
|
|
993
|
+
className: ht.panel,
|
|
994
|
+
children: s
|
|
966
995
|
}
|
|
967
|
-
) : /* @__PURE__ */ t(
|
|
996
|
+
) : /* @__PURE__ */ t(Qr, { scrollId: o, title: i, children: s }) }, i);
|
|
968
997
|
}) }),
|
|
969
|
-
/* @__PURE__ */ t(
|
|
970
|
-
|
|
998
|
+
/* @__PURE__ */ t(st, { md: 4, sm: 12, order: { default: "-1", md: "1" }, children: /* @__PURE__ */ t(gn, { className: ht.sticky, children: /* @__PURE__ */ t(
|
|
999
|
+
yn,
|
|
971
1000
|
{
|
|
972
1001
|
isVertical: !0,
|
|
973
|
-
scrollableSelector: `#${
|
|
1002
|
+
scrollableSelector: `#${ea}`,
|
|
974
1003
|
label: e,
|
|
975
1004
|
offset: 100,
|
|
976
1005
|
children: l.map(({ title: i }) => {
|
|
977
|
-
const
|
|
1006
|
+
const s = pt(i.toLowerCase());
|
|
978
1007
|
return /* @__PURE__ */ t(
|
|
979
|
-
|
|
1008
|
+
bn,
|
|
980
1009
|
{
|
|
981
1010
|
onClick: () => {
|
|
982
|
-
const
|
|
983
|
-
|
|
1011
|
+
const o = document.getElementById(s);
|
|
1012
|
+
o && o.scrollIntoView({
|
|
984
1013
|
behavior: "smooth",
|
|
985
1014
|
block: "start"
|
|
986
1015
|
});
|
|
987
1016
|
},
|
|
988
|
-
"data-testid": `jump-link-${
|
|
1017
|
+
"data-testid": `jump-link-${s}`,
|
|
989
1018
|
children: i
|
|
990
1019
|
},
|
|
991
1020
|
i
|
|
@@ -994,7 +1023,7 @@ const Gr = "_title_180i0_2", zr = {
|
|
|
994
1023
|
}
|
|
995
1024
|
) }) })
|
|
996
1025
|
] });
|
|
997
|
-
},
|
|
1026
|
+
}, na = (e, n, r) => (e.isValid || r) && (e.isDirty || n) && !e.isLoading && !e.isValidating && !e.isSubmitting, tl = ({
|
|
998
1027
|
formState: e,
|
|
999
1028
|
isDisabled: n = !1,
|
|
1000
1029
|
allowInvalid: r = !1,
|
|
@@ -1002,35 +1031,35 @@ const Gr = "_title_180i0_2", zr = {
|
|
|
1002
1031
|
children: l,
|
|
1003
1032
|
...i
|
|
1004
1033
|
}) => /* @__PURE__ */ t(
|
|
1005
|
-
|
|
1034
|
+
q,
|
|
1006
1035
|
{
|
|
1007
1036
|
variant: "primary",
|
|
1008
|
-
isDisabled: e && !
|
|
1037
|
+
isDisabled: e && !na(e, a, r) || n,
|
|
1009
1038
|
...i,
|
|
1010
1039
|
type: "submit",
|
|
1011
1040
|
children: l
|
|
1012
1041
|
}
|
|
1013
|
-
),
|
|
1042
|
+
), ra = (e) => {
|
|
1014
1043
|
try {
|
|
1015
1044
|
return new Intl.DisplayNames([e], { type: "language" }).of(e);
|
|
1016
1045
|
} catch {
|
|
1017
1046
|
return e;
|
|
1018
1047
|
}
|
|
1019
|
-
},
|
|
1048
|
+
}, aa = ({
|
|
1020
1049
|
t: e,
|
|
1021
1050
|
form: n,
|
|
1022
1051
|
supportedLocales: r,
|
|
1023
1052
|
currentLocale: a
|
|
1024
1053
|
}) => {
|
|
1025
|
-
const l =
|
|
1054
|
+
const l = U(
|
|
1026
1055
|
() => r.map((i) => ({
|
|
1027
1056
|
key: i,
|
|
1028
|
-
value: e(`locale_${i}`,
|
|
1029
|
-
})).sort((i,
|
|
1057
|
+
value: e(`locale_${i}`, ra(i) ?? i)
|
|
1058
|
+
})).sort((i, s) => i.value.localeCompare(s.value, a)),
|
|
1030
1059
|
[r, a, e]
|
|
1031
1060
|
);
|
|
1032
|
-
return l.length ? /* @__PURE__ */ t(
|
|
1033
|
-
|
|
1061
|
+
return l.length ? /* @__PURE__ */ t(pr, { ...n, children: /* @__PURE__ */ t(
|
|
1062
|
+
Kr,
|
|
1034
1063
|
{
|
|
1035
1064
|
"data-testid": "locale-select",
|
|
1036
1065
|
name: "attributes.locale",
|
|
@@ -1040,220 +1069,220 @@ const Gr = "_title_180i0_2", zr = {
|
|
|
1040
1069
|
variant: l.length >= 10 ? "typeahead" : "single"
|
|
1041
1070
|
}
|
|
1042
1071
|
) }) : null;
|
|
1043
|
-
},
|
|
1072
|
+
}, fe = ({
|
|
1044
1073
|
t: e,
|
|
1045
1074
|
form: n,
|
|
1046
1075
|
attribute: r,
|
|
1047
1076
|
renderer: a,
|
|
1048
1077
|
children: l
|
|
1049
1078
|
}) => {
|
|
1050
|
-
const i =
|
|
1079
|
+
const i = ae(
|
|
1051
1080
|
e,
|
|
1052
1081
|
r.annotations?.inputHelperTextBefore
|
|
1053
1082
|
), {
|
|
1054
|
-
formState: { errors:
|
|
1055
|
-
} = n,
|
|
1056
|
-
return /* @__PURE__ */
|
|
1057
|
-
|
|
1083
|
+
formState: { errors: s }
|
|
1084
|
+
} = n, o = a?.(r), h = _(s, X(r.name));
|
|
1085
|
+
return /* @__PURE__ */ k(
|
|
1086
|
+
kt,
|
|
1058
1087
|
{
|
|
1059
|
-
label:
|
|
1088
|
+
label: He(e, r) || "",
|
|
1060
1089
|
fieldId: r.name,
|
|
1061
|
-
isRequired:
|
|
1062
|
-
labelIcon: i ? /* @__PURE__ */ t(
|
|
1090
|
+
isRequired: Oe(r),
|
|
1091
|
+
labelIcon: i ? /* @__PURE__ */ t(_t, { helpText: i, fieldLabelId: r.name }) : void 0,
|
|
1063
1092
|
children: [
|
|
1064
|
-
|
|
1093
|
+
o ? /* @__PURE__ */ k(xe, { children: [
|
|
1065
1094
|
l,
|
|
1066
|
-
|
|
1095
|
+
o
|
|
1067
1096
|
] }) : l,
|
|
1068
|
-
|
|
1069
|
-
|
|
1097
|
+
h && /* @__PURE__ */ t(
|
|
1098
|
+
Nt,
|
|
1070
1099
|
{
|
|
1071
1100
|
"data-testid": `${r.name}-helper`,
|
|
1072
|
-
message:
|
|
1101
|
+
message: h.message
|
|
1073
1102
|
}
|
|
1074
1103
|
)
|
|
1075
1104
|
]
|
|
1076
1105
|
},
|
|
1077
1106
|
r.name
|
|
1078
1107
|
);
|
|
1079
|
-
},
|
|
1108
|
+
}, la = ({
|
|
1080
1109
|
t: e,
|
|
1081
1110
|
form: n,
|
|
1082
1111
|
attribute: r,
|
|
1083
1112
|
renderer: a,
|
|
1084
1113
|
...l
|
|
1085
|
-
}) => /* @__PURE__ */ t(
|
|
1086
|
-
|
|
1114
|
+
}) => /* @__PURE__ */ t(fe, { t: e, form: n, attribute: r, renderer: a, children: /* @__PURE__ */ t(
|
|
1115
|
+
ia,
|
|
1087
1116
|
{
|
|
1088
1117
|
t: e,
|
|
1089
1118
|
form: n,
|
|
1090
|
-
"aria-label":
|
|
1091
|
-
name:
|
|
1119
|
+
"aria-label": He(e, r),
|
|
1120
|
+
name: X(r.name),
|
|
1092
1121
|
defaultValue: [r.defaultValue || ""],
|
|
1093
1122
|
addButtonLabel: e("addMultivaluedLabel", {
|
|
1094
|
-
fieldLabel:
|
|
1123
|
+
fieldLabel: He(e, r)
|
|
1095
1124
|
}),
|
|
1096
1125
|
...l
|
|
1097
1126
|
}
|
|
1098
|
-
) }),
|
|
1127
|
+
) }), ia = ({
|
|
1099
1128
|
t: e,
|
|
1100
1129
|
name: n,
|
|
1101
1130
|
inputType: r,
|
|
1102
1131
|
form: a,
|
|
1103
1132
|
addButtonLabel: l,
|
|
1104
1133
|
isDisabled: i = !1,
|
|
1105
|
-
defaultValue:
|
|
1106
|
-
id:
|
|
1107
|
-
...
|
|
1134
|
+
defaultValue: s,
|
|
1135
|
+
id: o,
|
|
1136
|
+
...h
|
|
1108
1137
|
}) => {
|
|
1109
|
-
const { register:
|
|
1138
|
+
const { register: c, setValue: u, control: d } = a, g = mr({
|
|
1110
1139
|
name: n,
|
|
1111
|
-
control:
|
|
1112
|
-
defaultValue:
|
|
1113
|
-
}),
|
|
1114
|
-
|
|
1140
|
+
control: d,
|
|
1141
|
+
defaultValue: s || ""
|
|
1142
|
+
}), y = U(() => Array.isArray(g) && g.length !== 0 ? g : s || [""], [g]), C = (E) => {
|
|
1143
|
+
p([...y.slice(0, E), ...y.slice(E + 1)]);
|
|
1115
1144
|
}, R = () => {
|
|
1116
|
-
|
|
1117
|
-
},
|
|
1118
|
-
|
|
1119
|
-
},
|
|
1120
|
-
const I =
|
|
1121
|
-
|
|
1145
|
+
p([...y, ""]);
|
|
1146
|
+
}, v = (E, I) => {
|
|
1147
|
+
p([...y.slice(0, E), I, ...y.slice(E + 1)]);
|
|
1148
|
+
}, p = (E) => {
|
|
1149
|
+
const I = E.flatMap((f) => f);
|
|
1150
|
+
u(n, I, {
|
|
1122
1151
|
shouldDirty: !0
|
|
1123
1152
|
});
|
|
1124
|
-
},
|
|
1125
|
-
return
|
|
1126
|
-
|
|
1127
|
-
}, [
|
|
1128
|
-
/* @__PURE__ */
|
|
1129
|
-
/* @__PURE__ */ t(
|
|
1153
|
+
}, b = r.startsWith("html") ? r.substring(6) : "text";
|
|
1154
|
+
return se(() => {
|
|
1155
|
+
c(n);
|
|
1156
|
+
}, [c]), /* @__PURE__ */ t("div", { id: o, children: y.map((E, I) => /* @__PURE__ */ k(Rt, { children: [
|
|
1157
|
+
/* @__PURE__ */ k(xe, { children: [
|
|
1158
|
+
/* @__PURE__ */ t(_e, { isFill: !0, children: /* @__PURE__ */ t(
|
|
1130
1159
|
Se,
|
|
1131
1160
|
{
|
|
1132
1161
|
"data-testid": n + I,
|
|
1133
|
-
onChange: (
|
|
1162
|
+
onChange: (f, T) => v(I, T),
|
|
1134
1163
|
name: `${n}.${I}.value`,
|
|
1135
|
-
value:
|
|
1164
|
+
value: E,
|
|
1136
1165
|
isDisabled: i,
|
|
1137
|
-
type:
|
|
1138
|
-
...
|
|
1166
|
+
type: b,
|
|
1167
|
+
...h
|
|
1139
1168
|
}
|
|
1140
1169
|
) }),
|
|
1141
|
-
/* @__PURE__ */ t(
|
|
1142
|
-
|
|
1170
|
+
/* @__PURE__ */ t(_e, { children: /* @__PURE__ */ t(
|
|
1171
|
+
q,
|
|
1143
1172
|
{
|
|
1144
1173
|
"data-testid": "remove" + I,
|
|
1145
|
-
variant:
|
|
1174
|
+
variant: we.link,
|
|
1146
1175
|
onClick: () => C(I),
|
|
1147
1176
|
tabIndex: -1,
|
|
1148
1177
|
"aria-label": e("remove"),
|
|
1149
|
-
isDisabled:
|
|
1178
|
+
isDisabled: y.length === 1 || i,
|
|
1150
1179
|
children: /* @__PURE__ */ t(or, {})
|
|
1151
1180
|
}
|
|
1152
1181
|
) })
|
|
1153
1182
|
] }),
|
|
1154
|
-
I ===
|
|
1155
|
-
|
|
1183
|
+
I === y.length - 1 && /* @__PURE__ */ k(
|
|
1184
|
+
q,
|
|
1156
1185
|
{
|
|
1157
|
-
variant:
|
|
1186
|
+
variant: we.link,
|
|
1158
1187
|
onClick: R,
|
|
1159
1188
|
tabIndex: -1,
|
|
1160
1189
|
"aria-label": e("add"),
|
|
1161
1190
|
"data-testid": "addValue",
|
|
1162
|
-
isDisabled: !
|
|
1191
|
+
isDisabled: !E || i,
|
|
1163
1192
|
children: [
|
|
1164
|
-
/* @__PURE__ */ t(
|
|
1193
|
+
/* @__PURE__ */ t(Pt, {}),
|
|
1165
1194
|
" ",
|
|
1166
1195
|
e(l || "add")
|
|
1167
1196
|
]
|
|
1168
1197
|
}
|
|
1169
1198
|
)
|
|
1170
1199
|
] }, I)) });
|
|
1171
|
-
},
|
|
1172
|
-
const { form: n, inputType: r, attribute: a } = e, l =
|
|
1173
|
-
return /* @__PURE__ */ t(
|
|
1174
|
-
|
|
1200
|
+
}, mt = (e) => {
|
|
1201
|
+
const { form: n, inputType: r, attribute: a } = e, l = Oe(a), i = r.startsWith("multiselect"), s = i ? vn : Cn, o = a.validators?.options?.options || [], h = a.annotations?.inputOptionLabels || {}, c = a.annotations?.inputOptionLabelsI18nPrefix;
|
|
1202
|
+
return /* @__PURE__ */ t(fe, { ...e, children: /* @__PURE__ */ t(
|
|
1203
|
+
oe,
|
|
1175
1204
|
{
|
|
1176
|
-
name:
|
|
1205
|
+
name: X(a.name),
|
|
1177
1206
|
control: n.control,
|
|
1178
1207
|
defaultValue: a.defaultValue,
|
|
1179
|
-
render: ({ field:
|
|
1180
|
-
|
|
1208
|
+
render: ({ field: u }) => /* @__PURE__ */ t(W, { children: o.map((d) => /* @__PURE__ */ t(
|
|
1209
|
+
s,
|
|
1181
1210
|
{
|
|
1182
|
-
id:
|
|
1183
|
-
"data-testid":
|
|
1184
|
-
label:
|
|
1185
|
-
value:
|
|
1186
|
-
isChecked:
|
|
1211
|
+
id: d,
|
|
1212
|
+
"data-testid": d,
|
|
1213
|
+
label: ae(e.t, h[d], d, c),
|
|
1214
|
+
value: d,
|
|
1215
|
+
isChecked: u.value?.includes(d),
|
|
1187
1216
|
onChange: () => {
|
|
1188
|
-
i ?
|
|
1189
|
-
|
|
1190
|
-
) :
|
|
1217
|
+
i ? u.value?.includes(d) ? u.onChange(
|
|
1218
|
+
u.value?.filter((g) => g !== d)
|
|
1219
|
+
) : u.onChange([...u.value || [], d]) : u.onChange([d]);
|
|
1191
1220
|
},
|
|
1192
1221
|
readOnly: a.readOnly,
|
|
1193
1222
|
isRequired: l
|
|
1194
1223
|
},
|
|
1195
|
-
|
|
1224
|
+
d
|
|
1196
1225
|
)) })
|
|
1197
1226
|
}
|
|
1198
1227
|
) });
|
|
1199
|
-
},
|
|
1228
|
+
}, sa = ({
|
|
1200
1229
|
toggleId: e,
|
|
1201
1230
|
onToggle: n,
|
|
1202
1231
|
onSelect: r,
|
|
1203
1232
|
selections: a,
|
|
1204
1233
|
isOpen: l,
|
|
1205
1234
|
menuAppendTo: i,
|
|
1206
|
-
direction:
|
|
1207
|
-
width:
|
|
1208
|
-
maxHeight:
|
|
1209
|
-
toggleIcon:
|
|
1210
|
-
className:
|
|
1211
|
-
isDisabled:
|
|
1212
|
-
children:
|
|
1213
|
-
...
|
|
1235
|
+
direction: s,
|
|
1236
|
+
width: o,
|
|
1237
|
+
maxHeight: h,
|
|
1238
|
+
toggleIcon: c,
|
|
1239
|
+
className: u,
|
|
1240
|
+
isDisabled: d,
|
|
1241
|
+
children: g,
|
|
1242
|
+
...y
|
|
1214
1243
|
}) => {
|
|
1215
|
-
const [C, R] =
|
|
1244
|
+
const [C, R] = A(!1), v = Y(), p = () => {
|
|
1216
1245
|
R(!C), n(!C);
|
|
1217
|
-
},
|
|
1218
|
-
|
|
1246
|
+
}, b = () => i === "parent" && v.current?.parentElement || "inline", E = Dt.toArray(
|
|
1247
|
+
g
|
|
1219
1248
|
);
|
|
1220
1249
|
return /* @__PURE__ */ t(
|
|
1221
|
-
|
|
1250
|
+
Ee,
|
|
1222
1251
|
{
|
|
1223
|
-
ref:
|
|
1224
|
-
maxMenuHeight:
|
|
1252
|
+
ref: v,
|
|
1253
|
+
maxMenuHeight: Te(h),
|
|
1225
1254
|
isScrollable: !0,
|
|
1226
1255
|
popperProps: {
|
|
1227
|
-
appendTo:
|
|
1228
|
-
direction:
|
|
1229
|
-
width:
|
|
1256
|
+
appendTo: b(),
|
|
1257
|
+
direction: s,
|
|
1258
|
+
width: Te(o)
|
|
1230
1259
|
},
|
|
1231
|
-
...
|
|
1232
|
-
onClick:
|
|
1260
|
+
...y,
|
|
1261
|
+
onClick: p,
|
|
1233
1262
|
onOpenChange: (I) => {
|
|
1234
|
-
I !== C &&
|
|
1263
|
+
I !== C && p();
|
|
1235
1264
|
},
|
|
1236
1265
|
selected: a,
|
|
1237
|
-
onSelect: (I,
|
|
1238
|
-
r?.(
|
|
1266
|
+
onSelect: (I, f) => {
|
|
1267
|
+
r?.(f || ""), p();
|
|
1239
1268
|
},
|
|
1240
1269
|
toggle: (I) => /* @__PURE__ */ t(
|
|
1241
1270
|
me,
|
|
1242
1271
|
{
|
|
1243
1272
|
id: e,
|
|
1244
1273
|
ref: I,
|
|
1245
|
-
className:
|
|
1246
|
-
onClick:
|
|
1274
|
+
className: u,
|
|
1275
|
+
onClick: p,
|
|
1247
1276
|
isExpanded: l,
|
|
1248
|
-
"aria-label":
|
|
1249
|
-
icon:
|
|
1250
|
-
isDisabled:
|
|
1277
|
+
"aria-label": y["aria-label"],
|
|
1278
|
+
icon: c,
|
|
1279
|
+
isDisabled: d,
|
|
1251
1280
|
isFullWidth: !0,
|
|
1252
|
-
children:
|
|
1281
|
+
children: E.find((f) => f.props.value === a)?.props.children || a || y["aria-label"]
|
|
1253
1282
|
}
|
|
1254
1283
|
),
|
|
1255
1284
|
isOpen: l,
|
|
1256
|
-
children: /* @__PURE__ */ t(
|
|
1285
|
+
children: /* @__PURE__ */ t(Ae, { children: g })
|
|
1257
1286
|
}
|
|
1258
1287
|
);
|
|
1259
1288
|
}, oa = ({
|
|
@@ -1263,29 +1292,29 @@ const Gr = "_title_180i0_2", zr = {
|
|
|
1263
1292
|
onFilter: a,
|
|
1264
1293
|
variant: l,
|
|
1265
1294
|
validated: i,
|
|
1266
|
-
placeholderText:
|
|
1267
|
-
maxHeight:
|
|
1268
|
-
width:
|
|
1269
|
-
toggleIcon:
|
|
1270
|
-
direction:
|
|
1271
|
-
selections:
|
|
1272
|
-
typeAheadAriaLabel:
|
|
1273
|
-
chipGroupComponent:
|
|
1295
|
+
placeholderText: s,
|
|
1296
|
+
maxHeight: o,
|
|
1297
|
+
width: h,
|
|
1298
|
+
toggleIcon: c,
|
|
1299
|
+
direction: u,
|
|
1300
|
+
selections: d,
|
|
1301
|
+
typeAheadAriaLabel: g,
|
|
1302
|
+
chipGroupComponent: y,
|
|
1274
1303
|
chipGroupProps: C,
|
|
1275
1304
|
footer: R,
|
|
1276
|
-
isDisabled:
|
|
1277
|
-
children:
|
|
1278
|
-
...
|
|
1305
|
+
isDisabled: v,
|
|
1306
|
+
children: p,
|
|
1307
|
+
...b
|
|
1279
1308
|
}) => {
|
|
1280
|
-
const [
|
|
1281
|
-
|
|
1282
|
-
),
|
|
1283
|
-
r?.(!
|
|
1284
|
-
},
|
|
1285
|
-
const
|
|
1286
|
-
switch (r?.(!0),
|
|
1309
|
+
const [E, I] = A(""), [f, T] = A(0), V = Y(), O = Dt.toArray(
|
|
1310
|
+
p
|
|
1311
|
+
), D = () => {
|
|
1312
|
+
r?.(!b.isOpen);
|
|
1313
|
+
}, j = (F) => {
|
|
1314
|
+
const B = O[f];
|
|
1315
|
+
switch (r?.(!0), F.key) {
|
|
1287
1316
|
case "Enter": {
|
|
1288
|
-
|
|
1317
|
+
F.preventDefault(), l !== J.typeaheadMulti ? I(B.props.value) : I(""), n?.(B.props.value), r?.(!1), T(0);
|
|
1289
1318
|
break;
|
|
1290
1319
|
}
|
|
1291
1320
|
case "Escape": {
|
|
@@ -1293,144 +1322,144 @@ const Gr = "_title_180i0_2", zr = {
|
|
|
1293
1322
|
break;
|
|
1294
1323
|
}
|
|
1295
1324
|
case "Backspace": {
|
|
1296
|
-
l ===
|
|
1325
|
+
l === J.typeahead && n?.("");
|
|
1297
1326
|
break;
|
|
1298
1327
|
}
|
|
1299
1328
|
case "ArrowUp":
|
|
1300
1329
|
case "ArrowDown": {
|
|
1301
|
-
|
|
1302
|
-
let
|
|
1303
|
-
|
|
1330
|
+
F.preventDefault();
|
|
1331
|
+
let m = 0;
|
|
1332
|
+
F.key === "ArrowUp" && (f === 0 ? m = O.length - 1 : m = f - 1), F.key === "ArrowDown" && (f === O.length - 1 ? m = 0 : m = f + 1), T(m);
|
|
1304
1333
|
break;
|
|
1305
1334
|
}
|
|
1306
1335
|
}
|
|
1307
1336
|
};
|
|
1308
|
-
return /* @__PURE__ */
|
|
1309
|
-
|
|
1337
|
+
return /* @__PURE__ */ k(
|
|
1338
|
+
Ee,
|
|
1310
1339
|
{
|
|
1311
|
-
...
|
|
1312
|
-
onClick:
|
|
1313
|
-
onOpenChange: (
|
|
1314
|
-
onSelect: (
|
|
1315
|
-
n?.(
|
|
1340
|
+
...b,
|
|
1341
|
+
onClick: D,
|
|
1342
|
+
onOpenChange: (F) => r?.(F),
|
|
1343
|
+
onSelect: (F, B) => {
|
|
1344
|
+
n?.(B || ""), a?.(""), I("");
|
|
1316
1345
|
},
|
|
1317
|
-
maxMenuHeight:
|
|
1318
|
-
popperProps: { direction:
|
|
1319
|
-
toggle: (
|
|
1346
|
+
maxMenuHeight: Te(o),
|
|
1347
|
+
popperProps: { direction: u, width: Te(h) },
|
|
1348
|
+
toggle: (F) => /* @__PURE__ */ t(
|
|
1320
1349
|
me,
|
|
1321
1350
|
{
|
|
1322
|
-
ref:
|
|
1351
|
+
ref: F,
|
|
1323
1352
|
id: e,
|
|
1324
1353
|
variant: "typeahead",
|
|
1325
1354
|
onClick: () => r?.(!0),
|
|
1326
|
-
icon:
|
|
1327
|
-
isDisabled:
|
|
1328
|
-
isExpanded:
|
|
1355
|
+
icon: c,
|
|
1356
|
+
isDisabled: v,
|
|
1357
|
+
isExpanded: b.isOpen,
|
|
1329
1358
|
isFullWidth: !0,
|
|
1330
|
-
status: i === "error" ?
|
|
1331
|
-
children: /* @__PURE__ */
|
|
1359
|
+
status: i === "error" ? Ye.danger : void 0,
|
|
1360
|
+
children: /* @__PURE__ */ k(It, { isPlain: !0, children: [
|
|
1332
1361
|
/* @__PURE__ */ t(
|
|
1333
|
-
|
|
1362
|
+
wt,
|
|
1334
1363
|
{
|
|
1335
|
-
placeholder:
|
|
1336
|
-
value: l ===
|
|
1337
|
-
onClick:
|
|
1338
|
-
onChange: (
|
|
1339
|
-
I(
|
|
1364
|
+
placeholder: s,
|
|
1365
|
+
value: l === J.typeahead && d ? d : E,
|
|
1366
|
+
onClick: D,
|
|
1367
|
+
onChange: (B, m) => {
|
|
1368
|
+
I(m), a?.(m);
|
|
1340
1369
|
},
|
|
1341
|
-
onKeyDown: (
|
|
1370
|
+
onKeyDown: (B) => j(B),
|
|
1342
1371
|
autoComplete: "off",
|
|
1343
|
-
innerRef:
|
|
1372
|
+
innerRef: V,
|
|
1344
1373
|
role: "combobox",
|
|
1345
|
-
isExpanded:
|
|
1374
|
+
isExpanded: b.isOpen,
|
|
1346
1375
|
"aria-controls": "select-typeahead-listbox",
|
|
1347
|
-
"aria-label":
|
|
1348
|
-
children: l ===
|
|
1349
|
-
|
|
1376
|
+
"aria-label": g,
|
|
1377
|
+
children: l === J.typeaheadMulti && Array.isArray(d) && (y || /* @__PURE__ */ t(Qe, { ...C, children: d.map((B, m) => /* @__PURE__ */ t(
|
|
1378
|
+
Xe,
|
|
1350
1379
|
{
|
|
1351
|
-
onClick: (
|
|
1352
|
-
|
|
1380
|
+
onClick: (x) => {
|
|
1381
|
+
x.stopPropagation(), n?.(B);
|
|
1353
1382
|
},
|
|
1354
|
-
children:
|
|
1383
|
+
children: B
|
|
1355
1384
|
},
|
|
1356
|
-
|
|
1385
|
+
m
|
|
1357
1386
|
)) }))
|
|
1358
1387
|
}
|
|
1359
1388
|
),
|
|
1360
|
-
/* @__PURE__ */ t(
|
|
1361
|
-
|
|
1389
|
+
/* @__PURE__ */ t(Tt, { children: !!E && /* @__PURE__ */ t(
|
|
1390
|
+
q,
|
|
1362
1391
|
{
|
|
1363
1392
|
variant: "plain",
|
|
1364
1393
|
onClick: () => {
|
|
1365
|
-
n?.(""), I(""), a?.(""),
|
|
1394
|
+
n?.(""), I(""), a?.(""), V?.current?.focus();
|
|
1366
1395
|
},
|
|
1367
1396
|
"aria-label": "Clear input value",
|
|
1368
|
-
children: /* @__PURE__ */ t(
|
|
1397
|
+
children: /* @__PURE__ */ t(Ft, { "aria-hidden": !0 })
|
|
1369
1398
|
}
|
|
1370
1399
|
) })
|
|
1371
1400
|
] })
|
|
1372
1401
|
}
|
|
1373
1402
|
),
|
|
1374
1403
|
children: [
|
|
1375
|
-
/* @__PURE__ */ t(
|
|
1376
|
-
R && /* @__PURE__ */ t(
|
|
1404
|
+
/* @__PURE__ */ t(Ae, { children: p }),
|
|
1405
|
+
R && /* @__PURE__ */ t(kn, { children: R })
|
|
1377
1406
|
]
|
|
1378
1407
|
}
|
|
1379
1408
|
);
|
|
1380
1409
|
};
|
|
1381
|
-
var
|
|
1382
|
-
const
|
|
1410
|
+
var J = /* @__PURE__ */ ((e) => (e.single = "single", e.typeahead = "typeahead", e.typeaheadMulti = "typeaheadMulti", e))(J || {});
|
|
1411
|
+
const Te = (e) => typeof e == "number" ? e + "px" : e, ca = ({
|
|
1383
1412
|
variant: e = "single",
|
|
1384
1413
|
...n
|
|
1385
|
-
}) => e === "single" ? /* @__PURE__ */ t(
|
|
1386
|
-
const { t: n, form: r, inputType: a, attribute: l } = e, [i,
|
|
1387
|
-
|
|
1388
|
-
},
|
|
1389
|
-
(
|
|
1390
|
-
).map((
|
|
1391
|
-
|
|
1414
|
+
}) => e === "single" ? /* @__PURE__ */ t(sa, { ...n }) : /* @__PURE__ */ t(oa, { ...n, variant: e }), ft = (e) => {
|
|
1415
|
+
const { t: n, form: r, inputType: a, attribute: l } = e, [i, s] = A(!1), [o, h] = A(""), c = a === "multiselect", u = (v, p) => {
|
|
1416
|
+
c ? p.value?.includes(v) ? p.onChange(p.value.filter((b) => b !== v)) : Array.isArray(p.value) ? p.onChange([...p.value, v]) : p.onChange([v]) : p.onChange(v === p.value ? "" : v);
|
|
1417
|
+
}, d = l.validators?.options?.options || [], g = l.annotations?.inputOptionLabels || {}, y = l.annotations?.inputOptionLabelsI18nPrefix, C = (v) => ae(e.t, g[v], v, y), R = (v) => d.filter(
|
|
1418
|
+
(p) => C(p).toLowerCase().includes(o.toLowerCase())
|
|
1419
|
+
).map((p) => /* @__PURE__ */ t(
|
|
1420
|
+
Je,
|
|
1392
1421
|
{
|
|
1393
|
-
selected:
|
|
1394
|
-
value:
|
|
1395
|
-
children: C(
|
|
1422
|
+
selected: v === p,
|
|
1423
|
+
value: p,
|
|
1424
|
+
children: C(p)
|
|
1396
1425
|
},
|
|
1397
|
-
|
|
1426
|
+
p
|
|
1398
1427
|
));
|
|
1399
|
-
return /* @__PURE__ */ t(
|
|
1400
|
-
|
|
1428
|
+
return /* @__PURE__ */ t(fe, { ...e, children: /* @__PURE__ */ t(
|
|
1429
|
+
oe,
|
|
1401
1430
|
{
|
|
1402
|
-
name:
|
|
1431
|
+
name: X(l.name),
|
|
1403
1432
|
defaultValue: l.defaultValue,
|
|
1404
1433
|
control: r.control,
|
|
1405
|
-
render: ({ field:
|
|
1406
|
-
|
|
1434
|
+
render: ({ field: v }) => /* @__PURE__ */ t(
|
|
1435
|
+
ca,
|
|
1407
1436
|
{
|
|
1408
1437
|
toggleId: l.name,
|
|
1409
|
-
onToggle: (
|
|
1410
|
-
onClear: () =>
|
|
1411
|
-
onSelect: (
|
|
1412
|
-
const
|
|
1413
|
-
|
|
1438
|
+
onToggle: (p) => s(p),
|
|
1439
|
+
onClear: () => u("", v),
|
|
1440
|
+
onSelect: (p) => {
|
|
1441
|
+
const b = p.toString();
|
|
1442
|
+
u(b, v), Array.isArray(v.value) || s(!1);
|
|
1414
1443
|
},
|
|
1415
|
-
selections:
|
|
1416
|
-
variant:
|
|
1444
|
+
selections: c && Array.isArray(v.value) ? v.value.map((p) => C(p)) : C(v.value),
|
|
1445
|
+
variant: c ? J.typeaheadMulti : d.length >= 10 ? J.typeahead : J.single,
|
|
1417
1446
|
"aria-label": n("selectOne"),
|
|
1418
1447
|
isOpen: i,
|
|
1419
1448
|
isDisabled: l.readOnly,
|
|
1420
|
-
onFilter: (
|
|
1421
|
-
children: R(
|
|
1449
|
+
onFilter: (p) => (h(p), R(v.value)),
|
|
1450
|
+
children: R(v.value)
|
|
1422
1451
|
}
|
|
1423
1452
|
)
|
|
1424
1453
|
}
|
|
1425
1454
|
) });
|
|
1426
|
-
},
|
|
1427
|
-
const { form: n, attribute: r } = e, a =
|
|
1428
|
-
return /* @__PURE__ */ t(
|
|
1429
|
-
|
|
1455
|
+
}, da = (e) => {
|
|
1456
|
+
const { form: n, attribute: r } = e, a = Oe(r);
|
|
1457
|
+
return /* @__PURE__ */ t(fe, { ...e, children: /* @__PURE__ */ t(
|
|
1458
|
+
Gr,
|
|
1430
1459
|
{
|
|
1431
1460
|
id: r.name,
|
|
1432
1461
|
"data-testid": r.name,
|
|
1433
|
-
...n.register(
|
|
1462
|
+
...n.register(X(r.name)),
|
|
1434
1463
|
cols: r.annotations?.inputTypeCols,
|
|
1435
1464
|
rows: r.annotations?.inputTypeRows,
|
|
1436
1465
|
readOnly: r.readOnly,
|
|
@@ -1438,15 +1467,15 @@ const we = (e) => typeof e == "number" ? e + "px" : e, sa = ({
|
|
|
1438
1467
|
defaultValue: r.defaultValue
|
|
1439
1468
|
}
|
|
1440
1469
|
) });
|
|
1441
|
-
},
|
|
1442
|
-
const { form: n, inputType: r, attribute: a } = e, l =
|
|
1443
|
-
return /* @__PURE__ */ t(
|
|
1470
|
+
}, K = (e) => {
|
|
1471
|
+
const { form: n, inputType: r, attribute: a } = e, l = Oe(a), i = r.startsWith("html") ? r.substring(6) : "text";
|
|
1472
|
+
return /* @__PURE__ */ t(fe, { ...e, children: /* @__PURE__ */ t(
|
|
1444
1473
|
Se,
|
|
1445
1474
|
{
|
|
1446
1475
|
id: a.name,
|
|
1447
1476
|
"data-testid": a.name,
|
|
1448
1477
|
type: i,
|
|
1449
|
-
placeholder: a.readOnly ? "" :
|
|
1478
|
+
placeholder: a.readOnly ? "" : ae(
|
|
1450
1479
|
e.t,
|
|
1451
1480
|
a.annotations?.inputTypePlaceholder,
|
|
1452
1481
|
"",
|
|
@@ -1455,47 +1484,47 @@ const we = (e) => typeof e == "number" ? e + "px" : e, sa = ({
|
|
|
1455
1484
|
isDisabled: a.readOnly,
|
|
1456
1485
|
isRequired: l,
|
|
1457
1486
|
defaultValue: a.defaultValue,
|
|
1458
|
-
...n.register(
|
|
1487
|
+
...n.register(X(a.name))
|
|
1459
1488
|
}
|
|
1460
1489
|
) });
|
|
1461
|
-
},
|
|
1462
|
-
text:
|
|
1463
|
-
textarea:
|
|
1464
|
-
select:
|
|
1465
|
-
"select-radiobuttons":
|
|
1466
|
-
multiselect:
|
|
1467
|
-
"multiselect-checkboxes":
|
|
1468
|
-
"html5-email":
|
|
1469
|
-
"html5-tel":
|
|
1470
|
-
"html5-url":
|
|
1471
|
-
"html5-number":
|
|
1472
|
-
"html5-range":
|
|
1473
|
-
"html5-datetime-local":
|
|
1474
|
-
"html5-date":
|
|
1475
|
-
"html5-month":
|
|
1476
|
-
"html5-time":
|
|
1477
|
-
"multi-input":
|
|
1478
|
-
},
|
|
1490
|
+
}, je = {
|
|
1491
|
+
text: K,
|
|
1492
|
+
textarea: da,
|
|
1493
|
+
select: ft,
|
|
1494
|
+
"select-radiobuttons": mt,
|
|
1495
|
+
multiselect: ft,
|
|
1496
|
+
"multiselect-checkboxes": mt,
|
|
1497
|
+
"html5-email": K,
|
|
1498
|
+
"html5-tel": K,
|
|
1499
|
+
"html5-url": K,
|
|
1500
|
+
"html5-number": K,
|
|
1501
|
+
"html5-range": K,
|
|
1502
|
+
"html5-datetime-local": K,
|
|
1503
|
+
"html5-date": K,
|
|
1504
|
+
"html5-month": K,
|
|
1505
|
+
"html5-time": K,
|
|
1506
|
+
"multi-input": la
|
|
1507
|
+
}, nl = ({
|
|
1479
1508
|
t: e,
|
|
1480
1509
|
form: n,
|
|
1481
1510
|
userProfileMetadata: r,
|
|
1482
1511
|
supportedLocales: a,
|
|
1483
1512
|
currentLocale: l,
|
|
1484
1513
|
hideReadOnly: i = !1,
|
|
1485
|
-
renderer:
|
|
1514
|
+
renderer: s
|
|
1486
1515
|
}) => {
|
|
1487
|
-
const
|
|
1516
|
+
const o = U(() => {
|
|
1488
1517
|
if (!r.attributes)
|
|
1489
1518
|
return [];
|
|
1490
|
-
const
|
|
1519
|
+
const h = i ? r.attributes.filter(({ readOnly: c }) => !c) : r.attributes;
|
|
1491
1520
|
return [
|
|
1492
1521
|
// Insert an empty group for attributes without a group.
|
|
1493
1522
|
{ name: void 0 },
|
|
1494
1523
|
...r.groups ?? []
|
|
1495
|
-
].map((
|
|
1496
|
-
group:
|
|
1497
|
-
attributes:
|
|
1498
|
-
(
|
|
1524
|
+
].map((c) => ({
|
|
1525
|
+
group: c,
|
|
1526
|
+
attributes: h.filter(
|
|
1527
|
+
(u) => u.group === c.name
|
|
1499
1528
|
)
|
|
1500
1529
|
}));
|
|
1501
1530
|
}, [
|
|
@@ -1503,31 +1532,31 @@ const we = (e) => typeof e == "number" ? e + "px" : e, sa = ({
|
|
|
1503
1532
|
r.groups,
|
|
1504
1533
|
r.attributes
|
|
1505
1534
|
]);
|
|
1506
|
-
return
|
|
1507
|
-
|
|
1535
|
+
return o.length === 0 ? null : /* @__PURE__ */ t(
|
|
1536
|
+
ta,
|
|
1508
1537
|
{
|
|
1509
1538
|
label: e("jumpToSection"),
|
|
1510
|
-
sections:
|
|
1511
|
-
title:
|
|
1512
|
-
panel: /* @__PURE__ */
|
|
1513
|
-
|
|
1514
|
-
|
|
1515
|
-
|
|
1539
|
+
sections: o.filter((h) => h.attributes.length > 0).map(({ group: h, attributes: c }) => ({
|
|
1540
|
+
title: ae(e, h.displayHeader, h.name) || e("general"),
|
|
1541
|
+
panel: /* @__PURE__ */ k("div", { className: "pf-v5-c-form", children: [
|
|
1542
|
+
h.displayDescription && /* @__PURE__ */ t(ke, { className: "pf-v5-u-pb-lg", children: ae(e, h.displayDescription, "") }),
|
|
1543
|
+
c.map((u) => /* @__PURE__ */ t(
|
|
1544
|
+
ua,
|
|
1516
1545
|
{
|
|
1517
1546
|
t: e,
|
|
1518
1547
|
form: n,
|
|
1519
1548
|
supportedLocales: a,
|
|
1520
1549
|
currentLocale: l,
|
|
1521
|
-
renderer:
|
|
1522
|
-
attribute:
|
|
1550
|
+
renderer: s,
|
|
1551
|
+
attribute: u
|
|
1523
1552
|
},
|
|
1524
|
-
|
|
1553
|
+
u.name
|
|
1525
1554
|
))
|
|
1526
1555
|
] })
|
|
1527
1556
|
}))
|
|
1528
1557
|
}
|
|
1529
1558
|
);
|
|
1530
|
-
},
|
|
1559
|
+
}, ua = ({
|
|
1531
1560
|
t: e,
|
|
1532
1561
|
form: n,
|
|
1533
1562
|
renderer: r,
|
|
@@ -1535,11 +1564,11 @@ const we = (e) => typeof e == "number" ? e + "px" : e, sa = ({
|
|
|
1535
1564
|
currentLocale: l,
|
|
1536
1565
|
attribute: i
|
|
1537
1566
|
}) => {
|
|
1538
|
-
const
|
|
1539
|
-
|
|
1540
|
-
),
|
|
1567
|
+
const s = n.watch(
|
|
1568
|
+
X(i.name)
|
|
1569
|
+
), o = U(() => pa(i), [i]), h = i.multivalued || fa(s) && i.annotations?.inputType === void 0 ? je["multi-input"] : je[o];
|
|
1541
1570
|
return i.name === "locale" ? /* @__PURE__ */ t(
|
|
1542
|
-
|
|
1571
|
+
aa,
|
|
1543
1572
|
{
|
|
1544
1573
|
form: n,
|
|
1545
1574
|
supportedLocales: a,
|
|
@@ -1548,34 +1577,34 @@ const we = (e) => typeof e == "number" ? e + "px" : e, sa = ({
|
|
|
1548
1577
|
attribute: i
|
|
1549
1578
|
}
|
|
1550
1579
|
) : /* @__PURE__ */ t(
|
|
1551
|
-
|
|
1580
|
+
h,
|
|
1552
1581
|
{
|
|
1553
1582
|
t: e,
|
|
1554
1583
|
form: n,
|
|
1555
|
-
inputType:
|
|
1584
|
+
inputType: o,
|
|
1556
1585
|
attribute: i,
|
|
1557
1586
|
renderer: r
|
|
1558
1587
|
}
|
|
1559
1588
|
);
|
|
1560
|
-
},
|
|
1561
|
-
function
|
|
1562
|
-
if (
|
|
1589
|
+
}, ha = "text";
|
|
1590
|
+
function pa(e) {
|
|
1591
|
+
if ($t(e.name))
|
|
1563
1592
|
return "text";
|
|
1564
1593
|
const n = e.annotations?.inputType;
|
|
1565
|
-
return ma(n) ? n :
|
|
1594
|
+
return ma(n) ? n : ha;
|
|
1566
1595
|
}
|
|
1567
|
-
const ma = (e) => typeof e == "string" && e in
|
|
1596
|
+
const ma = (e) => typeof e == "string" && e in je, fa = (e) => Array.isArray(e) && e.length > 1, ga = ({
|
|
1568
1597
|
className: e = "",
|
|
1569
1598
|
border: n,
|
|
1570
1599
|
size: r = "md"
|
|
1571
|
-
}) => /* @__PURE__ */
|
|
1600
|
+
}) => /* @__PURE__ */ k(
|
|
1572
1601
|
"svg",
|
|
1573
1602
|
{
|
|
1574
|
-
className:
|
|
1575
|
-
|
|
1576
|
-
|
|
1577
|
-
n === "light" &&
|
|
1578
|
-
n === "dark" &&
|
|
1603
|
+
className: yr(
|
|
1604
|
+
ve.avatar,
|
|
1605
|
+
ve.modifiers[r],
|
|
1606
|
+
n === "light" && ve.modifiers.light,
|
|
1607
|
+
n === "dark" && ve.modifiers.dark,
|
|
1579
1608
|
e
|
|
1580
1609
|
),
|
|
1581
1610
|
enableBackground: "new 0 0 36 36",
|
|
@@ -1624,7 +1653,7 @@ const ma = (e) => typeof e == "string" && e in He, pa = (e) => Array.isArray(e)
|
|
|
1624
1653
|
) })
|
|
1625
1654
|
}
|
|
1626
1655
|
),
|
|
1627
|
-
/* @__PURE__ */ t("g", { style: { filter: 'url("#a")' }, children: /* @__PURE__ */
|
|
1656
|
+
/* @__PURE__ */ t("g", { style: { filter: 'url("#a")' }, children: /* @__PURE__ */ k("g", { transform: "translate(5.04 6.88)", children: [
|
|
1628
1657
|
/* @__PURE__ */ t(
|
|
1629
1658
|
"path",
|
|
1630
1659
|
{
|
|
@@ -1684,110 +1713,110 @@ const ma = (e) => typeof e == "string" && e in He, pa = (e) => Array.isArray(e)
|
|
|
1684
1713
|
] }) })
|
|
1685
1714
|
]
|
|
1686
1715
|
}
|
|
1687
|
-
),
|
|
1716
|
+
), gt = ({
|
|
1688
1717
|
isKebab: e = !1,
|
|
1689
1718
|
title: n,
|
|
1690
1719
|
dropDownItems: r,
|
|
1691
1720
|
...a
|
|
1692
1721
|
}) => {
|
|
1693
|
-
const [l, i] =
|
|
1722
|
+
const [l, i] = A(!1);
|
|
1694
1723
|
return /* @__PURE__ */ t(
|
|
1695
|
-
|
|
1724
|
+
In,
|
|
1696
1725
|
{
|
|
1697
1726
|
...a,
|
|
1698
1727
|
popperProps: {
|
|
1699
1728
|
position: "right"
|
|
1700
1729
|
},
|
|
1701
|
-
onOpenChange: (
|
|
1702
|
-
toggle: (
|
|
1730
|
+
onOpenChange: (s) => i(s),
|
|
1731
|
+
toggle: (s) => /* @__PURE__ */ t(
|
|
1703
1732
|
me,
|
|
1704
1733
|
{
|
|
1705
1734
|
"data-testid": `${a["data-testid"]}-toggle`,
|
|
1706
|
-
ref:
|
|
1735
|
+
ref: s,
|
|
1707
1736
|
onClick: () => i(!l),
|
|
1708
1737
|
isExpanded: l,
|
|
1709
1738
|
variant: e ? "plain" : "default",
|
|
1710
|
-
children: e ? /* @__PURE__ */ t(
|
|
1739
|
+
children: e ? /* @__PURE__ */ t(cr, {}) : n
|
|
1711
1740
|
}
|
|
1712
1741
|
),
|
|
1713
1742
|
isOpen: l,
|
|
1714
|
-
children: /* @__PURE__ */ t(
|
|
1743
|
+
children: /* @__PURE__ */ t(wn, { children: r })
|
|
1715
1744
|
}
|
|
1716
1745
|
);
|
|
1717
1746
|
};
|
|
1718
|
-
function
|
|
1747
|
+
function ya(e, n) {
|
|
1719
1748
|
if (!e)
|
|
1720
1749
|
return n("unknownUser");
|
|
1721
1750
|
const r = e.given_name, a = e.family_name, l = e.preferred_username;
|
|
1722
1751
|
return r && a ? n("fullName", { givenName: r, familyName: a }) : r || a || l || n("unknownUser");
|
|
1723
1752
|
}
|
|
1724
|
-
const
|
|
1753
|
+
const rl = ({
|
|
1725
1754
|
keycloak: e,
|
|
1726
1755
|
brand: { src: n, alt: r, className: a, ...l },
|
|
1727
1756
|
avatar: i,
|
|
1728
1757
|
features: {
|
|
1729
|
-
hasLogout:
|
|
1730
|
-
hasManageAccount:
|
|
1731
|
-
hasUsername:
|
|
1758
|
+
hasLogout: s = !0,
|
|
1759
|
+
hasManageAccount: o = !0,
|
|
1760
|
+
hasUsername: h = !0
|
|
1732
1761
|
} = {},
|
|
1733
|
-
kebabDropdownItems:
|
|
1734
|
-
dropdownItems:
|
|
1735
|
-
toolbarItems:
|
|
1736
|
-
toolbar:
|
|
1737
|
-
...
|
|
1762
|
+
kebabDropdownItems: c,
|
|
1763
|
+
dropdownItems: u = [],
|
|
1764
|
+
toolbarItems: d,
|
|
1765
|
+
toolbar: g,
|
|
1766
|
+
...y
|
|
1738
1767
|
}) => {
|
|
1739
|
-
const { t: C } =
|
|
1740
|
-
|
|
1768
|
+
const { t: C } = $(), R = [];
|
|
1769
|
+
o && R.push(
|
|
1741
1770
|
/* @__PURE__ */ t(
|
|
1742
|
-
|
|
1771
|
+
ot,
|
|
1743
1772
|
{
|
|
1744
1773
|
onClick: () => e.accountManagement(),
|
|
1745
1774
|
children: C("manageAccount")
|
|
1746
1775
|
},
|
|
1747
1776
|
"manageAccount"
|
|
1748
1777
|
)
|
|
1749
|
-
),
|
|
1750
|
-
/* @__PURE__ */ t(
|
|
1778
|
+
), s && R.push(
|
|
1779
|
+
/* @__PURE__ */ t(ot, { onClick: () => e.logout(), children: C("signOut") }, "signOut")
|
|
1751
1780
|
);
|
|
1752
|
-
const
|
|
1753
|
-
return /* @__PURE__ */
|
|
1754
|
-
/* @__PURE__ */ t(
|
|
1755
|
-
/* @__PURE__ */ t(
|
|
1756
|
-
/* @__PURE__ */
|
|
1757
|
-
|
|
1758
|
-
/* @__PURE__ */ t(
|
|
1759
|
-
|
|
1781
|
+
const v = e.idTokenParsed?.picture;
|
|
1782
|
+
return /* @__PURE__ */ k(Tn, { ...y, children: [
|
|
1783
|
+
/* @__PURE__ */ t(xn, { children: /* @__PURE__ */ t(Sn, { variant: "plain", "aria-label": C("navigation"), children: /* @__PURE__ */ t(dr, {}) }) }),
|
|
1784
|
+
/* @__PURE__ */ t(En, { ...l, children: /* @__PURE__ */ t("img", { src: n, alt: r, className: a }) }),
|
|
1785
|
+
/* @__PURE__ */ k(An, { children: [
|
|
1786
|
+
g,
|
|
1787
|
+
/* @__PURE__ */ t(Ie, { children: /* @__PURE__ */ k(qe, { children: [
|
|
1788
|
+
d?.map((p, b) => /* @__PURE__ */ t(G, { align: { default: "alignRight" }, children: p }, b)),
|
|
1760
1789
|
/* @__PURE__ */ t(
|
|
1761
|
-
|
|
1790
|
+
G,
|
|
1762
1791
|
{
|
|
1763
1792
|
visibility: {
|
|
1764
1793
|
default: "hidden",
|
|
1765
1794
|
md: "visible"
|
|
1766
1795
|
},
|
|
1767
1796
|
children: /* @__PURE__ */ t(
|
|
1768
|
-
|
|
1797
|
+
gt,
|
|
1769
1798
|
{
|
|
1770
1799
|
"data-testid": "options",
|
|
1771
|
-
dropDownItems: [...
|
|
1772
|
-
title:
|
|
1800
|
+
dropDownItems: [...u, R],
|
|
1801
|
+
title: h ? ya(e.idTokenParsed, C) : void 0
|
|
1773
1802
|
}
|
|
1774
1803
|
)
|
|
1775
1804
|
}
|
|
1776
1805
|
),
|
|
1777
1806
|
/* @__PURE__ */ t(
|
|
1778
|
-
|
|
1807
|
+
G,
|
|
1779
1808
|
{
|
|
1780
1809
|
align: { default: "alignLeft" },
|
|
1781
1810
|
visibility: {
|
|
1782
1811
|
md: "hidden"
|
|
1783
1812
|
},
|
|
1784
1813
|
children: /* @__PURE__ */ t(
|
|
1785
|
-
|
|
1814
|
+
gt,
|
|
1786
1815
|
{
|
|
1787
1816
|
"data-testid": "options-kebab",
|
|
1788
1817
|
isKebab: !0,
|
|
1789
1818
|
dropDownItems: [
|
|
1790
|
-
...
|
|
1819
|
+
...c || u,
|
|
1791
1820
|
R
|
|
1792
1821
|
]
|
|
1793
1822
|
}
|
|
@@ -1795,19 +1824,19 @@ const nl = ({
|
|
|
1795
1824
|
}
|
|
1796
1825
|
),
|
|
1797
1826
|
/* @__PURE__ */ t(
|
|
1798
|
-
|
|
1827
|
+
G,
|
|
1799
1828
|
{
|
|
1800
1829
|
variant: "overflow-menu",
|
|
1801
1830
|
align: { default: "alignRight" },
|
|
1802
1831
|
className: "pf-v5-u-m-0-on-lg",
|
|
1803
|
-
children:
|
|
1832
|
+
children: v || i?.src ? /* @__PURE__ */ t(Rn, { src: v, alt: C("avatar"), ...i }) : /* @__PURE__ */ t(ga, { ...i })
|
|
1804
1833
|
}
|
|
1805
1834
|
)
|
|
1806
1835
|
] }) })
|
|
1807
1836
|
] })
|
|
1808
1837
|
] });
|
|
1809
|
-
},
|
|
1810
|
-
class
|
|
1838
|
+
}, Kt = Ze("ErrorBoundaryContext", void 0), Ht = () => et(Kt);
|
|
1839
|
+
class al extends $n {
|
|
1811
1840
|
state = {};
|
|
1812
1841
|
static getDerivedStateFromError = (n) => ({ error: n });
|
|
1813
1842
|
showBoundary = (n) => {
|
|
@@ -1815,7 +1844,7 @@ class rl extends Un {
|
|
|
1815
1844
|
};
|
|
1816
1845
|
render() {
|
|
1817
1846
|
return /* @__PURE__ */ t(
|
|
1818
|
-
|
|
1847
|
+
Kt.Provider,
|
|
1819
1848
|
{
|
|
1820
1849
|
value: { error: this.state.error, showBoundary: this.showBoundary },
|
|
1821
1850
|
children: this.props.children
|
|
@@ -1823,316 +1852,316 @@ class rl extends Un {
|
|
|
1823
1852
|
);
|
|
1824
1853
|
}
|
|
1825
1854
|
}
|
|
1826
|
-
const
|
|
1827
|
-
const { error: r } =
|
|
1855
|
+
const ll = ({ children: e, fallback: n }) => {
|
|
1856
|
+
const { error: r } = Ht();
|
|
1828
1857
|
return r ? /* @__PURE__ */ t(n, { error: r }) : e;
|
|
1829
1858
|
};
|
|
1830
|
-
function
|
|
1831
|
-
const { showBoundary: a } =
|
|
1832
|
-
|
|
1859
|
+
function ba(e, n, r) {
|
|
1860
|
+
const { showBoundary: a } = Ht();
|
|
1861
|
+
se(() => {
|
|
1833
1862
|
const l = new AbortController(), { signal: i } = l;
|
|
1834
|
-
return e().then((
|
|
1835
|
-
i.aborted || n(
|
|
1836
|
-
}).catch((
|
|
1837
|
-
console.error(
|
|
1863
|
+
return e().then((s) => {
|
|
1864
|
+
i.aborted || n(s);
|
|
1865
|
+
}).catch((s) => {
|
|
1866
|
+
console.error(s), i.aborted || a(s);
|
|
1838
1867
|
}), () => l.abort();
|
|
1839
1868
|
}, r);
|
|
1840
1869
|
}
|
|
1841
|
-
const
|
|
1842
|
-
const { t: e } =
|
|
1843
|
-
return /* @__PURE__ */ t(
|
|
1844
|
-
},
|
|
1870
|
+
const va = () => {
|
|
1871
|
+
const { t: e } = $();
|
|
1872
|
+
return /* @__PURE__ */ t(Dn, { children: /* @__PURE__ */ t(Ct, { "aria-label": e("spinnerLoading") }) });
|
|
1873
|
+
}, Ca = ({
|
|
1845
1874
|
message: e,
|
|
1846
1875
|
instructions: n,
|
|
1847
1876
|
onPrimaryAction: r,
|
|
1848
1877
|
hasIcon: a = !0,
|
|
1849
1878
|
isSearchVariant: l,
|
|
1850
1879
|
primaryActionText: i,
|
|
1851
|
-
secondaryActions:
|
|
1852
|
-
icon:
|
|
1853
|
-
isDisabled:
|
|
1854
|
-
children:
|
|
1855
|
-
}) => /* @__PURE__ */
|
|
1856
|
-
a && l ? /* @__PURE__ */ t(ct, { icon:
|
|
1857
|
-
/* @__PURE__ */ t(
|
|
1858
|
-
/* @__PURE__ */ t(
|
|
1859
|
-
/* @__PURE__ */
|
|
1880
|
+
secondaryActions: s,
|
|
1881
|
+
icon: o,
|
|
1882
|
+
isDisabled: h = !1,
|
|
1883
|
+
children: c
|
|
1884
|
+
}) => /* @__PURE__ */ k(On, { "data-testid": "empty-state", variant: "lg", children: [
|
|
1885
|
+
a && l ? /* @__PURE__ */ t(ct, { icon: ur }) : a && /* @__PURE__ */ t(ct, { icon: o || Pt }),
|
|
1886
|
+
/* @__PURE__ */ t(Fn, { titleText: e, headingLevel: "h1" }),
|
|
1887
|
+
/* @__PURE__ */ t(Pn, { children: n }),
|
|
1888
|
+
/* @__PURE__ */ k(Vn, { children: [
|
|
1860
1889
|
i && /* @__PURE__ */ t(
|
|
1861
|
-
|
|
1890
|
+
q,
|
|
1862
1891
|
{
|
|
1863
1892
|
"data-testid": `${e.replace(/\W+/g, "-").toLowerCase()}-empty-action`,
|
|
1864
1893
|
variant: "primary",
|
|
1865
1894
|
onClick: r,
|
|
1866
|
-
isDisabled:
|
|
1895
|
+
isDisabled: h,
|
|
1867
1896
|
children: i
|
|
1868
1897
|
}
|
|
1869
1898
|
),
|
|
1870
|
-
|
|
1871
|
-
|
|
1872
|
-
|
|
1899
|
+
c,
|
|
1900
|
+
s && /* @__PURE__ */ t(Mn, { children: s.map((u) => /* @__PURE__ */ t(
|
|
1901
|
+
q,
|
|
1873
1902
|
{
|
|
1874
|
-
"data-testid": `${
|
|
1875
|
-
variant:
|
|
1876
|
-
onClick:
|
|
1877
|
-
isDisabled:
|
|
1878
|
-
children:
|
|
1903
|
+
"data-testid": `${u.text.replace(/\W+/g, "-").toLowerCase()}-empty-action`,
|
|
1904
|
+
variant: u.type || we.secondary,
|
|
1905
|
+
onClick: u.onClick,
|
|
1906
|
+
isDisabled: h,
|
|
1907
|
+
children: u.text
|
|
1879
1908
|
},
|
|
1880
|
-
|
|
1909
|
+
u.text
|
|
1881
1910
|
)) })
|
|
1882
1911
|
] })
|
|
1883
|
-
] }),
|
|
1912
|
+
] }), ka = ({
|
|
1884
1913
|
toolbarItem: e,
|
|
1885
1914
|
subToolbar: n,
|
|
1886
1915
|
toolbarItemFooter: r,
|
|
1887
1916
|
children: a,
|
|
1888
1917
|
searchTypeComponent: l,
|
|
1889
1918
|
inputGroupName: i,
|
|
1890
|
-
inputGroupPlaceholder:
|
|
1891
|
-
inputGroupOnEnter:
|
|
1919
|
+
inputGroupPlaceholder: s,
|
|
1920
|
+
inputGroupOnEnter: o
|
|
1892
1921
|
}) => {
|
|
1893
|
-
const { t:
|
|
1894
|
-
|
|
1895
|
-
},
|
|
1896
|
-
|
|
1922
|
+
const { t: h } = $(), [c, u] = A(""), d = (y) => {
|
|
1923
|
+
u(y.trim()), o?.(y.trim());
|
|
1924
|
+
}, g = (y) => {
|
|
1925
|
+
y.key === "Enter" && d(c);
|
|
1897
1926
|
};
|
|
1898
|
-
return /* @__PURE__ */
|
|
1899
|
-
/* @__PURE__ */ t(
|
|
1900
|
-
i && /* @__PURE__ */ t(
|
|
1927
|
+
return /* @__PURE__ */ k(W, { children: [
|
|
1928
|
+
/* @__PURE__ */ t(Ie, { "data-testid": "table-toolbar", children: /* @__PURE__ */ k(qe, { children: [
|
|
1929
|
+
i && /* @__PURE__ */ t(G, { children: /* @__PURE__ */ k(xe, { "data-testid": i, children: [
|
|
1901
1930
|
l,
|
|
1902
|
-
|
|
1903
|
-
|
|
1931
|
+
s && /* @__PURE__ */ t(
|
|
1932
|
+
Ln,
|
|
1904
1933
|
{
|
|
1905
1934
|
"data-testid": "table-search-input",
|
|
1906
|
-
placeholder:
|
|
1907
|
-
"aria-label":
|
|
1908
|
-
value:
|
|
1909
|
-
onChange: (
|
|
1910
|
-
|
|
1935
|
+
placeholder: s,
|
|
1936
|
+
"aria-label": h("search"),
|
|
1937
|
+
value: c,
|
|
1938
|
+
onChange: (y, C) => {
|
|
1939
|
+
u(C);
|
|
1911
1940
|
},
|
|
1912
|
-
onSearch: () => c
|
|
1913
|
-
onKeyDown:
|
|
1914
|
-
onClear: () =>
|
|
1941
|
+
onSearch: () => d(c),
|
|
1942
|
+
onKeyDown: g,
|
|
1943
|
+
onClear: () => d("")
|
|
1915
1944
|
}
|
|
1916
1945
|
)
|
|
1917
1946
|
] }) }),
|
|
1918
1947
|
e
|
|
1919
1948
|
] }) }),
|
|
1920
|
-
n && /* @__PURE__ */ t(
|
|
1921
|
-
/* @__PURE__ */ t(
|
|
1949
|
+
n && /* @__PURE__ */ t(Ie, { children: /* @__PURE__ */ t(qe, { children: n }) }),
|
|
1950
|
+
/* @__PURE__ */ t(Bn, {}),
|
|
1922
1951
|
a,
|
|
1923
|
-
/* @__PURE__ */ t(
|
|
1952
|
+
/* @__PURE__ */ t(Ie, { children: r })
|
|
1924
1953
|
] });
|
|
1925
|
-
},
|
|
1954
|
+
}, yt = ({
|
|
1926
1955
|
id: e,
|
|
1927
1956
|
variant: n = "top",
|
|
1928
1957
|
count: r,
|
|
1929
1958
|
first: a,
|
|
1930
1959
|
max: l,
|
|
1931
1960
|
onNextClick: i,
|
|
1932
|
-
onPreviousClick:
|
|
1933
|
-
onPerPageSelect:
|
|
1961
|
+
onPreviousClick: s,
|
|
1962
|
+
onPerPageSelect: o
|
|
1934
1963
|
}) => {
|
|
1935
|
-
const { t:
|
|
1964
|
+
const { t: h } = $(), c = Math.round(a / l);
|
|
1936
1965
|
return /* @__PURE__ */ t(
|
|
1937
|
-
|
|
1966
|
+
Nn,
|
|
1938
1967
|
{
|
|
1939
1968
|
widgetId: e,
|
|
1940
1969
|
titles: {
|
|
1941
|
-
paginationAriaLabel: `${
|
|
1970
|
+
paginationAriaLabel: `${h("pagination")} ${n} `
|
|
1942
1971
|
},
|
|
1943
1972
|
isCompact: !0,
|
|
1944
1973
|
toggleTemplate: ({
|
|
1945
|
-
firstIndex:
|
|
1946
|
-
lastIndex:
|
|
1947
|
-
}) => /* @__PURE__ */
|
|
1948
|
-
|
|
1974
|
+
firstIndex: u,
|
|
1975
|
+
lastIndex: d
|
|
1976
|
+
}) => /* @__PURE__ */ k("b", { children: [
|
|
1977
|
+
u,
|
|
1949
1978
|
" - ",
|
|
1950
|
-
|
|
1979
|
+
d
|
|
1951
1980
|
] }),
|
|
1952
|
-
itemCount: r +
|
|
1953
|
-
page:
|
|
1981
|
+
itemCount: r + c * l,
|
|
1982
|
+
page: c + 1,
|
|
1954
1983
|
perPage: l,
|
|
1955
|
-
onNextClick: (
|
|
1956
|
-
onPreviousClick: (
|
|
1957
|
-
onPerPageSelect: (
|
|
1984
|
+
onNextClick: (u, d) => i((d - 1) * l),
|
|
1985
|
+
onPreviousClick: (u, d) => s((d - 1) * l),
|
|
1986
|
+
onPerPageSelect: (u, d, g) => o(g - 1, d),
|
|
1958
1987
|
variant: n
|
|
1959
1988
|
}
|
|
1960
1989
|
);
|
|
1961
|
-
},
|
|
1990
|
+
}, Ia = ({
|
|
1962
1991
|
count: e,
|
|
1963
1992
|
searchTypeComponent: n,
|
|
1964
1993
|
toolbarItem: r,
|
|
1965
1994
|
subToolbar: a,
|
|
1966
1995
|
children: l,
|
|
1967
1996
|
inputGroupName: i,
|
|
1968
|
-
inputGroupPlaceholder:
|
|
1969
|
-
inputGroupOnEnter:
|
|
1970
|
-
...
|
|
1997
|
+
inputGroupPlaceholder: s,
|
|
1998
|
+
inputGroupOnEnter: o,
|
|
1999
|
+
...h
|
|
1971
2000
|
}) => /* @__PURE__ */ t(
|
|
1972
|
-
|
|
2001
|
+
ka,
|
|
1973
2002
|
{
|
|
1974
2003
|
searchTypeComponent: n,
|
|
1975
|
-
toolbarItem: /* @__PURE__ */
|
|
2004
|
+
toolbarItem: /* @__PURE__ */ k(W, { children: [
|
|
1976
2005
|
r,
|
|
1977
|
-
/* @__PURE__ */ t(
|
|
2006
|
+
/* @__PURE__ */ t(G, { variant: "pagination", children: /* @__PURE__ */ t(yt, { count: e, ...h }) })
|
|
1978
2007
|
] }),
|
|
1979
2008
|
subToolbar: a,
|
|
1980
|
-
toolbarItemFooter: e !== 0 ? /* @__PURE__ */ t(
|
|
2009
|
+
toolbarItemFooter: e !== 0 ? /* @__PURE__ */ t(G, { variant: "pagination", children: /* @__PURE__ */ t(yt, { count: e, variant: "bottom", ...h }) }) : null,
|
|
1981
2010
|
inputGroupName: i,
|
|
1982
|
-
inputGroupPlaceholder:
|
|
1983
|
-
inputGroupOnEnter:
|
|
2011
|
+
inputGroupPlaceholder: s,
|
|
2012
|
+
inputGroupOnEnter: o,
|
|
1984
2013
|
children: l
|
|
1985
2014
|
}
|
|
1986
|
-
), jt = (e) => !!e && e.title !== void 0,
|
|
2015
|
+
), jt = (e) => !!e && e.title !== void 0, bt = ({
|
|
1987
2016
|
row: e,
|
|
1988
2017
|
index: n,
|
|
1989
2018
|
actions: r,
|
|
1990
2019
|
actionResolver: a
|
|
1991
2020
|
}) => {
|
|
1992
2021
|
const l = r || a?.(e, {});
|
|
1993
|
-
return /* @__PURE__ */
|
|
1994
|
-
e.cells.map((i,
|
|
1995
|
-
l && l.length > 0 && !e.disableActions && /* @__PURE__ */ t(
|
|
2022
|
+
return /* @__PURE__ */ k(W, { children: [
|
|
2023
|
+
e.cells.map((i, s) => /* @__PURE__ */ t(le, { children: jt(i) ? i.title : i }, `cell-${s}`)),
|
|
2024
|
+
l && l.length > 0 && !e.disableActions && /* @__PURE__ */ t(le, { isActionCell: !0, children: /* @__PURE__ */ t(Ir, { items: l, extraData: { rowIndex: n } }) })
|
|
1996
2025
|
] });
|
|
1997
|
-
},
|
|
1998
|
-
function
|
|
2026
|
+
}, wa = ({ row: e }) => e.cells.map((n, r) => /* @__PURE__ */ t("div", { children: jt(n) ? n.title : n }, `cell-${r}`));
|
|
2027
|
+
function Ta({
|
|
1999
2028
|
columns: e,
|
|
2000
2029
|
rows: n,
|
|
2001
2030
|
actions: r,
|
|
2002
2031
|
actionResolver: a,
|
|
2003
2032
|
ariaLabelKey: l,
|
|
2004
2033
|
selected: i,
|
|
2005
|
-
onSelect:
|
|
2006
|
-
onCollapse:
|
|
2007
|
-
canSelectAll:
|
|
2008
|
-
canSelect:
|
|
2009
|
-
isNotCompact:
|
|
2010
|
-
isRadio:
|
|
2011
|
-
...
|
|
2034
|
+
onSelect: s,
|
|
2035
|
+
onCollapse: o,
|
|
2036
|
+
canSelectAll: h,
|
|
2037
|
+
canSelect: c,
|
|
2038
|
+
isNotCompact: u,
|
|
2039
|
+
isRadio: d,
|
|
2040
|
+
...g
|
|
2012
2041
|
}) {
|
|
2013
|
-
const { t:
|
|
2014
|
-
() =>
|
|
2042
|
+
const { t: y } = $(), [C, R] = A(i || []), [v, p] = A([]), b = U(
|
|
2043
|
+
() => gr(
|
|
2015
2044
|
C,
|
|
2016
|
-
n.map((
|
|
2045
|
+
n.map((f) => f.data),
|
|
2017
2046
|
"id"
|
|
2018
2047
|
),
|
|
2019
2048
|
[C, n]
|
|
2020
2049
|
);
|
|
2021
|
-
|
|
2022
|
-
if (
|
|
2023
|
-
const
|
|
2024
|
-
if (
|
|
2025
|
-
const
|
|
2026
|
-
|
|
2050
|
+
se(() => {
|
|
2051
|
+
if (h) {
|
|
2052
|
+
const f = document.getElementsByName("check-all").item(0);
|
|
2053
|
+
if (f) {
|
|
2054
|
+
const T = f;
|
|
2055
|
+
T.indeterminate = b.length < n.length && b.length > 0;
|
|
2027
2056
|
}
|
|
2028
2057
|
}
|
|
2029
|
-
}, [C,
|
|
2030
|
-
const
|
|
2031
|
-
R(
|
|
2032
|
-
}, I = (
|
|
2033
|
-
if (
|
|
2034
|
-
const
|
|
2035
|
-
|
|
2036
|
-
} else if (
|
|
2037
|
-
const
|
|
2038
|
-
(
|
|
2058
|
+
}, [C, h, n]);
|
|
2059
|
+
const E = (f) => {
|
|
2060
|
+
R(f), s?.(f);
|
|
2061
|
+
}, I = (f, T) => {
|
|
2062
|
+
if (d) {
|
|
2063
|
+
const V = T ? [n[f].data] : [];
|
|
2064
|
+
E(V);
|
|
2065
|
+
} else if (f === -1) {
|
|
2066
|
+
const V = b.map(
|
|
2067
|
+
(O) => _(O, "id")
|
|
2039
2068
|
);
|
|
2040
|
-
|
|
2041
|
-
|
|
2042
|
-
(
|
|
2069
|
+
E(
|
|
2070
|
+
T ? [...C, ...n.map((O) => O.data)] : C.filter(
|
|
2071
|
+
(O) => !V.includes(_(O, "id"))
|
|
2043
2072
|
)
|
|
2044
2073
|
);
|
|
2045
2074
|
} else
|
|
2046
|
-
T
|
|
2047
|
-
(
|
|
2075
|
+
E(T ? [...C, n[f].data] : C.filter(
|
|
2076
|
+
(V) => _(V, "id") !== n[f].data.id
|
|
2048
2077
|
));
|
|
2049
2078
|
};
|
|
2050
|
-
return /* @__PURE__ */
|
|
2051
|
-
|
|
2079
|
+
return /* @__PURE__ */ k(
|
|
2080
|
+
br,
|
|
2052
2081
|
{
|
|
2053
|
-
...
|
|
2054
|
-
variant:
|
|
2055
|
-
"aria-label":
|
|
2082
|
+
...g,
|
|
2083
|
+
variant: u ? void 0 : vr.compact,
|
|
2084
|
+
"aria-label": y(l),
|
|
2056
2085
|
children: [
|
|
2057
|
-
/* @__PURE__ */ t(
|
|
2058
|
-
|
|
2059
|
-
|
|
2060
|
-
|
|
2086
|
+
/* @__PURE__ */ t(Cr, { children: /* @__PURE__ */ k(Ce, { children: [
|
|
2087
|
+
o && /* @__PURE__ */ t(Me, { screenReaderText: y("expandRow") }),
|
|
2088
|
+
h && /* @__PURE__ */ t(
|
|
2089
|
+
Me,
|
|
2061
2090
|
{
|
|
2062
|
-
screenReaderText:
|
|
2063
|
-
select:
|
|
2064
|
-
onSelect: (
|
|
2065
|
-
I(-1,
|
|
2091
|
+
screenReaderText: y("selectAll"),
|
|
2092
|
+
select: d ? void 0 : {
|
|
2093
|
+
onSelect: (f, T) => {
|
|
2094
|
+
I(-1, T);
|
|
2066
2095
|
},
|
|
2067
|
-
isSelected:
|
|
2096
|
+
isSelected: b.length === n.length
|
|
2068
2097
|
}
|
|
2069
2098
|
}
|
|
2070
2099
|
),
|
|
2071
|
-
e.map((
|
|
2072
|
-
|
|
2100
|
+
e.map((f) => /* @__PURE__ */ t(
|
|
2101
|
+
Me,
|
|
2073
2102
|
{
|
|
2074
|
-
screenReaderText:
|
|
2075
|
-
className:
|
|
2076
|
-
children:
|
|
2103
|
+
screenReaderText: y("expandRow"),
|
|
2104
|
+
className: f.transforms?.[0]().className,
|
|
2105
|
+
children: y(f.displayKey || f.name)
|
|
2077
2106
|
},
|
|
2078
|
-
|
|
2107
|
+
f.displayKey || f.name
|
|
2079
2108
|
))
|
|
2080
2109
|
] }) }),
|
|
2081
|
-
|
|
2110
|
+
o ? n.map((f, T) => /* @__PURE__ */ t(dt, { children: T % 2 === 0 ? /* @__PURE__ */ k(Ce, { children: [
|
|
2082
2111
|
/* @__PURE__ */ t(
|
|
2083
|
-
|
|
2112
|
+
le,
|
|
2084
2113
|
{
|
|
2085
|
-
expand: n[
|
|
2086
|
-
isExpanded:
|
|
2087
|
-
rowIndex:
|
|
2114
|
+
expand: n[T + 1].cells.length === 0 ? void 0 : {
|
|
2115
|
+
isExpanded: v[T] ?? !1,
|
|
2116
|
+
rowIndex: T,
|
|
2088
2117
|
expandId: "expandable-row-",
|
|
2089
|
-
onToggle: (
|
|
2090
|
-
|
|
2091
|
-
const
|
|
2092
|
-
|
|
2118
|
+
onToggle: (V, O, D) => {
|
|
2119
|
+
o(D, O);
|
|
2120
|
+
const j = [...v];
|
|
2121
|
+
j[T] = D, p(j);
|
|
2093
2122
|
}
|
|
2094
2123
|
}
|
|
2095
2124
|
}
|
|
2096
2125
|
),
|
|
2097
2126
|
/* @__PURE__ */ t(
|
|
2098
|
-
|
|
2127
|
+
bt,
|
|
2099
2128
|
{
|
|
2100
|
-
row:
|
|
2101
|
-
index:
|
|
2129
|
+
row: f,
|
|
2130
|
+
index: T,
|
|
2102
2131
|
actions: r,
|
|
2103
2132
|
actionResolver: a
|
|
2104
2133
|
}
|
|
2105
2134
|
)
|
|
2106
|
-
] }) : /* @__PURE__ */
|
|
2107
|
-
/* @__PURE__ */ t(
|
|
2108
|
-
/* @__PURE__ */ t(
|
|
2109
|
-
] }) },
|
|
2110
|
-
|
|
2111
|
-
|
|
2135
|
+
] }) : /* @__PURE__ */ k(Ce, { isExpanded: v[T - 1] ?? !1, children: [
|
|
2136
|
+
/* @__PURE__ */ t(le, {}),
|
|
2137
|
+
/* @__PURE__ */ t(le, { colSpan: e.length, children: /* @__PURE__ */ t(kr, { children: /* @__PURE__ */ t(wa, { row: f }) }) })
|
|
2138
|
+
] }) }, T)) : /* @__PURE__ */ t(dt, { children: n.map((f, T) => /* @__PURE__ */ k(Ce, { isExpanded: v[T], children: [
|
|
2139
|
+
c && /* @__PURE__ */ t(
|
|
2140
|
+
le,
|
|
2112
2141
|
{
|
|
2113
2142
|
select: {
|
|
2114
|
-
rowIndex:
|
|
2115
|
-
onSelect: (
|
|
2116
|
-
I(
|
|
2143
|
+
rowIndex: T,
|
|
2144
|
+
onSelect: (V, O, D) => {
|
|
2145
|
+
I(D, O);
|
|
2117
2146
|
},
|
|
2118
2147
|
isSelected: !!C.find(
|
|
2119
|
-
(
|
|
2148
|
+
(V) => _(V, "id") === f.data.id
|
|
2120
2149
|
),
|
|
2121
|
-
variant:
|
|
2122
|
-
isDisabled:
|
|
2150
|
+
variant: d ? "radio" : "checkbox",
|
|
2151
|
+
isDisabled: f.disableSelection
|
|
2123
2152
|
}
|
|
2124
2153
|
}
|
|
2125
2154
|
),
|
|
2126
2155
|
/* @__PURE__ */ t(
|
|
2127
|
-
|
|
2156
|
+
bt,
|
|
2128
2157
|
{
|
|
2129
|
-
row:
|
|
2130
|
-
index:
|
|
2158
|
+
row: f,
|
|
2159
|
+
index: T,
|
|
2131
2160
|
actions: r,
|
|
2132
2161
|
actionResolver: a
|
|
2133
2162
|
}
|
|
2134
2163
|
)
|
|
2135
|
-
] },
|
|
2164
|
+
] }, T)) })
|
|
2136
2165
|
]
|
|
2137
2166
|
}
|
|
2138
2167
|
);
|
|
@@ -2144,152 +2173,152 @@ function xa({
|
|
|
2144
2173
|
onSelect: a,
|
|
2145
2174
|
canSelectAll: l = !1,
|
|
2146
2175
|
isNotCompact: i,
|
|
2147
|
-
isRadio:
|
|
2148
|
-
detailColumns:
|
|
2149
|
-
isRowDisabled:
|
|
2150
|
-
loader:
|
|
2151
|
-
columns:
|
|
2152
|
-
actions:
|
|
2153
|
-
actionResolver:
|
|
2154
|
-
searchTypeComponent:
|
|
2176
|
+
isRadio: s,
|
|
2177
|
+
detailColumns: o,
|
|
2178
|
+
isRowDisabled: h,
|
|
2179
|
+
loader: c,
|
|
2180
|
+
columns: u,
|
|
2181
|
+
actions: d,
|
|
2182
|
+
actionResolver: g,
|
|
2183
|
+
searchTypeComponent: y,
|
|
2155
2184
|
toolbarItem: C,
|
|
2156
2185
|
subToolbar: R,
|
|
2157
|
-
emptyState:
|
|
2158
|
-
icon:
|
|
2159
|
-
isSearching:
|
|
2160
|
-
...
|
|
2186
|
+
emptyState: v,
|
|
2187
|
+
icon: p,
|
|
2188
|
+
isSearching: b = !1,
|
|
2189
|
+
...E
|
|
2161
2190
|
}) {
|
|
2162
|
-
const { t: I } =
|
|
2191
|
+
const { t: I } = $(), [f, T] = A([]), [V, O] = A(), [D, j] = A(), [F, B] = A(!1), [m, x] = Lt(
|
|
2163
2192
|
localStorage,
|
|
2164
2193
|
"pageSize",
|
|
2165
2194
|
10
|
|
2166
|
-
), [
|
|
2195
|
+
), [S, L] = A(m), [N, Z] = A(0), [z, Fe] = A(""), tt = Y(), [ge, Gt] = A(0), nt = Y(), rt = () => Gt(ge + 1), Wt = At(), at = (w, P) => w.map((M) => {
|
|
2167
2196
|
if ("cellFormatters" in M) {
|
|
2168
|
-
const
|
|
2169
|
-
return M.cellFormatters?.reduce((de,
|
|
2197
|
+
const te = _(P, M.name);
|
|
2198
|
+
return M.cellFormatters?.reduce((de, be) => be(de), te);
|
|
2170
2199
|
}
|
|
2171
2200
|
if (M.cellRenderer) {
|
|
2172
|
-
const
|
|
2173
|
-
return { title: /* @__PURE__ */ t(
|
|
2201
|
+
const te = M.cellRenderer;
|
|
2202
|
+
return { title: /* @__PURE__ */ t(te, { ...P }) };
|
|
2174
2203
|
}
|
|
2175
|
-
return
|
|
2204
|
+
return _(P, M.name);
|
|
2176
2205
|
}), lt = (w) => {
|
|
2177
|
-
const P = (M) =>
|
|
2178
|
-
return w.map((M,
|
|
2179
|
-
const de =
|
|
2206
|
+
const P = (M) => o?.[0]?.enabled?.(M);
|
|
2207
|
+
return w.map((M, te) => {
|
|
2208
|
+
const de = h ? h(M) : !1, be = [
|
|
2180
2209
|
{
|
|
2181
2210
|
data: M,
|
|
2182
2211
|
disableSelection: de,
|
|
2183
2212
|
disableActions: de,
|
|
2184
|
-
selected: !!
|
|
2213
|
+
selected: !!f.find((Xt) => _(Xt, "id") === _(M, "id")),
|
|
2185
2214
|
isOpen: P(M) ? !1 : void 0,
|
|
2186
|
-
cells: at(
|
|
2215
|
+
cells: at(u, M)
|
|
2187
2216
|
}
|
|
2188
2217
|
];
|
|
2189
|
-
return
|
|
2190
|
-
parent:
|
|
2191
|
-
cells: P(M) ? at(
|
|
2192
|
-
}),
|
|
2218
|
+
return o && be.push({
|
|
2219
|
+
parent: te * 2,
|
|
2220
|
+
cells: P(M) ? at(o, M) : []
|
|
2221
|
+
}), be;
|
|
2193
2222
|
}).flat();
|
|
2194
|
-
},
|
|
2195
|
-
|
|
2196
|
-
) : "", it =
|
|
2197
|
-
() =>
|
|
2223
|
+
}, Pe = (w) => ["string", "number"].includes(typeof w) ? w.toString() : w instanceof Array ? w.map(Pe).join("") : typeof w == "object" ? Pe(
|
|
2224
|
+
Un(w.title) ? w.title.props : Object.values(w)
|
|
2225
|
+
) : "", it = U(
|
|
2226
|
+
() => z === "" || r ? void 0 : lt(D || []).filter(
|
|
2198
2227
|
(w) => w.cells.some(
|
|
2199
|
-
(P) => P &&
|
|
2228
|
+
(P) => P && Pe(P).toLowerCase().includes(z.toLowerCase())
|
|
2200
2229
|
)
|
|
2201
|
-
).slice(
|
|
2202
|
-
[
|
|
2230
|
+
).slice(N, N + S + 1),
|
|
2231
|
+
[z, N, S]
|
|
2203
2232
|
);
|
|
2204
|
-
|
|
2233
|
+
ba(
|
|
2205
2234
|
async () => {
|
|
2206
|
-
|
|
2207
|
-
const w = tt.current === "" &&
|
|
2208
|
-
return w &&
|
|
2235
|
+
B(!0);
|
|
2236
|
+
const w = tt.current === "" && z !== "";
|
|
2237
|
+
return w && Z(0), tt.current = z, typeof c == "function" ? ge === nt.current && D ? D : await c(w ? 0 : N, S + 1, z) : c;
|
|
2209
2238
|
},
|
|
2210
2239
|
(w) => {
|
|
2211
|
-
nt.current =
|
|
2240
|
+
nt.current = ge, r || (j(w), w.length > N ? w = w.slice(N, N + S + 1) : Z(0));
|
|
2212
2241
|
const P = lt(w);
|
|
2213
|
-
|
|
2242
|
+
O(P), B(!1);
|
|
2214
2243
|
},
|
|
2215
2244
|
[
|
|
2216
|
-
|
|
2217
|
-
|
|
2218
|
-
|
|
2219
|
-
|
|
2220
|
-
typeof
|
|
2245
|
+
ge,
|
|
2246
|
+
N,
|
|
2247
|
+
S,
|
|
2248
|
+
z,
|
|
2249
|
+
typeof c != "function" ? c : void 0
|
|
2221
2250
|
]
|
|
2222
2251
|
);
|
|
2223
|
-
const
|
|
2224
|
-
await
|
|
2225
|
-
(it ||
|
|
2226
|
-
) && (r ||
|
|
2227
|
-
}, w)),
|
|
2228
|
-
|
|
2229
|
-
},
|
|
2230
|
-
return /* @__PURE__ */
|
|
2231
|
-
(!
|
|
2232
|
-
|
|
2252
|
+
const zt = () => d && fr(d).map((w, P) => (delete w.onRowClick, w.onClick = async (M, te) => {
|
|
2253
|
+
await d[P].onRowClick(
|
|
2254
|
+
(it || V)[te].data
|
|
2255
|
+
) && (r || Fe(""), rt());
|
|
2256
|
+
}, w)), Jt = (w, P) => {
|
|
2257
|
+
ee[P].isOpen = w, O([...ee]);
|
|
2258
|
+
}, ee = it || V, ye = !ee || ee.length === 0, Ve = z !== "" || b, Yt = o ? S * 2 : S, Qt = o ? (ee?.length || 0) / 2 : ee?.length || 0;
|
|
2259
|
+
return /* @__PURE__ */ k(W, { children: [
|
|
2260
|
+
(!ye || Ve) && /* @__PURE__ */ k(
|
|
2261
|
+
Ia,
|
|
2233
2262
|
{
|
|
2234
|
-
id:
|
|
2235
|
-
count:
|
|
2236
|
-
first:
|
|
2237
|
-
max:
|
|
2238
|
-
onNextClick:
|
|
2239
|
-
onPreviousClick:
|
|
2263
|
+
id: Wt,
|
|
2264
|
+
count: Qt,
|
|
2265
|
+
first: N,
|
|
2266
|
+
max: S,
|
|
2267
|
+
onNextClick: Z,
|
|
2268
|
+
onPreviousClick: Z,
|
|
2240
2269
|
onPerPageSelect: (w, P) => {
|
|
2241
|
-
|
|
2270
|
+
Z(w), L(P), x(P);
|
|
2242
2271
|
},
|
|
2243
2272
|
inputGroupName: n ? `${e}input` : void 0,
|
|
2244
|
-
inputGroupOnEnter:
|
|
2273
|
+
inputGroupOnEnter: Fe,
|
|
2245
2274
|
inputGroupPlaceholder: I(n || ""),
|
|
2246
|
-
searchTypeComponent:
|
|
2247
|
-
toolbarItem: /* @__PURE__ */
|
|
2275
|
+
searchTypeComponent: y,
|
|
2276
|
+
toolbarItem: /* @__PURE__ */ k(W, { children: [
|
|
2248
2277
|
C,
|
|
2249
2278
|
" ",
|
|
2250
|
-
/* @__PURE__ */ t(
|
|
2279
|
+
/* @__PURE__ */ t(G, { variant: "separator" }),
|
|
2251
2280
|
" ",
|
|
2252
|
-
/* @__PURE__ */ t(
|
|
2253
|
-
/* @__PURE__ */ t(
|
|
2281
|
+
/* @__PURE__ */ t(G, { children: /* @__PURE__ */ k(q, { variant: "link", onClick: rt, "data-testid": "refresh", children: [
|
|
2282
|
+
/* @__PURE__ */ t(hr, {}),
|
|
2254
2283
|
" ",
|
|
2255
2284
|
I("refresh")
|
|
2256
2285
|
] }) })
|
|
2257
2286
|
] }),
|
|
2258
2287
|
subToolbar: R,
|
|
2259
2288
|
children: [
|
|
2260
|
-
!
|
|
2261
|
-
|
|
2289
|
+
!F && !ye && /* @__PURE__ */ t(
|
|
2290
|
+
Ta,
|
|
2262
2291
|
{
|
|
2263
|
-
...
|
|
2292
|
+
...E,
|
|
2264
2293
|
canSelectAll: l,
|
|
2265
2294
|
canSelect: !!a,
|
|
2266
|
-
selected:
|
|
2295
|
+
selected: f,
|
|
2267
2296
|
onSelect: (w) => {
|
|
2268
|
-
|
|
2297
|
+
T(w), a?.(w);
|
|
2269
2298
|
},
|
|
2270
|
-
onCollapse:
|
|
2271
|
-
actions:
|
|
2272
|
-
actionResolver:
|
|
2273
|
-
rows:
|
|
2274
|
-
columns:
|
|
2299
|
+
onCollapse: o ? Jt : void 0,
|
|
2300
|
+
actions: zt(),
|
|
2301
|
+
actionResolver: g,
|
|
2302
|
+
rows: ee.slice(0, Yt),
|
|
2303
|
+
columns: u,
|
|
2275
2304
|
isNotCompact: i,
|
|
2276
|
-
isRadio:
|
|
2305
|
+
isRadio: s,
|
|
2277
2306
|
ariaLabelKey: e
|
|
2278
2307
|
}
|
|
2279
2308
|
),
|
|
2280
|
-
!
|
|
2281
|
-
|
|
2309
|
+
!F && ye && Ve && /* @__PURE__ */ t(
|
|
2310
|
+
Ca,
|
|
2282
2311
|
{
|
|
2283
2312
|
hasIcon: !0,
|
|
2284
|
-
icon:
|
|
2313
|
+
icon: p,
|
|
2285
2314
|
isSearchVariant: !0,
|
|
2286
2315
|
message: I("noSearchResults"),
|
|
2287
2316
|
instructions: I("noSearchResultsInstructions"),
|
|
2288
|
-
secondaryActions:
|
|
2317
|
+
secondaryActions: b ? [] : [
|
|
2289
2318
|
{
|
|
2290
2319
|
text: I("clearAllFilters"),
|
|
2291
|
-
onClick: () =>
|
|
2292
|
-
type:
|
|
2320
|
+
onClick: () => Fe(""),
|
|
2321
|
+
type: we.link
|
|
2293
2322
|
}
|
|
2294
2323
|
]
|
|
2295
2324
|
}
|
|
@@ -2297,16 +2326,16 @@ function xa({
|
|
|
2297
2326
|
]
|
|
2298
2327
|
}
|
|
2299
2328
|
),
|
|
2300
|
-
|
|
2301
|
-
!
|
|
2329
|
+
F && /* @__PURE__ */ t(va, {}),
|
|
2330
|
+
!F && ye && !Ve && v
|
|
2302
2331
|
] });
|
|
2303
2332
|
}
|
|
2304
2333
|
const Sa = ({ link: e, organization: n }) => {
|
|
2305
|
-
const { t: r } =
|
|
2306
|
-
return /* @__PURE__ */ t(
|
|
2334
|
+
const { t: r } = $();
|
|
2335
|
+
return /* @__PURE__ */ t(wr, { wrapModifier: "truncate", children: /* @__PURE__ */ k(e, { organization: n, children: [
|
|
2307
2336
|
n.name,
|
|
2308
2337
|
!n.enabled && /* @__PURE__ */ t(
|
|
2309
|
-
|
|
2338
|
+
_n,
|
|
2310
2339
|
{
|
|
2311
2340
|
isRead: !0,
|
|
2312
2341
|
className: "pf-v5-u-ml-sm",
|
|
@@ -2315,33 +2344,34 @@ const Sa = ({ link: e, organization: n }) => {
|
|
|
2315
2344
|
`${n.id}-disabled`
|
|
2316
2345
|
)
|
|
2317
2346
|
] }) });
|
|
2318
|
-
},
|
|
2319
|
-
const { t: n } =
|
|
2347
|
+
}, Ea = (e) => {
|
|
2348
|
+
const { t: n } = $();
|
|
2320
2349
|
return /* @__PURE__ */ t(
|
|
2321
|
-
|
|
2350
|
+
Qe,
|
|
2322
2351
|
{
|
|
2323
2352
|
numChips: 2,
|
|
2324
2353
|
expandedText: n("hide"),
|
|
2325
2354
|
collapsedText: n("showRemaining"),
|
|
2326
2355
|
children: e.domains?.map((r) => {
|
|
2327
2356
|
const a = typeof r == "string" ? r : r.name;
|
|
2328
|
-
return /* @__PURE__ */ t(
|
|
2357
|
+
return /* @__PURE__ */ t(Xe, { isReadOnly: !0, children: a }, a);
|
|
2329
2358
|
})
|
|
2330
2359
|
}
|
|
2331
2360
|
);
|
|
2332
|
-
},
|
|
2361
|
+
}, il = ({
|
|
2333
2362
|
loader: e,
|
|
2334
2363
|
toolbarItem: n,
|
|
2335
2364
|
isPaginated: r = !1,
|
|
2336
2365
|
isSearching: a = !1,
|
|
2337
2366
|
searchPlaceholderKey: l,
|
|
2338
2367
|
onSelect: i,
|
|
2339
|
-
onDelete:
|
|
2340
|
-
deleteLabel:
|
|
2341
|
-
link:
|
|
2342
|
-
children:
|
|
2368
|
+
onDelete: s,
|
|
2369
|
+
deleteLabel: o = "delete",
|
|
2370
|
+
link: h,
|
|
2371
|
+
children: c,
|
|
2372
|
+
actions: u
|
|
2343
2373
|
}) => {
|
|
2344
|
-
const { t:
|
|
2374
|
+
const { t: d } = $();
|
|
2345
2375
|
return /* @__PURE__ */ t(
|
|
2346
2376
|
xa,
|
|
2347
2377
|
{
|
|
@@ -2353,22 +2383,20 @@ const Sa = ({ link: e, organization: n }) => {
|
|
|
2353
2383
|
toolbarItem: n,
|
|
2354
2384
|
onSelect: i,
|
|
2355
2385
|
canSelectAll: i !== void 0,
|
|
2356
|
-
actions:
|
|
2357
|
-
{
|
|
2358
|
-
|
|
2359
|
-
|
|
2360
|
-
}
|
|
2361
|
-
] : void 0,
|
|
2386
|
+
actions: [
|
|
2387
|
+
...s ? [{ title: d(o), onRowClick: s }] : [],
|
|
2388
|
+
...u ?? []
|
|
2389
|
+
],
|
|
2362
2390
|
columns: [
|
|
2363
2391
|
{
|
|
2364
2392
|
name: "name",
|
|
2365
2393
|
displayKey: "name",
|
|
2366
|
-
cellRenderer: (
|
|
2394
|
+
cellRenderer: (g) => /* @__PURE__ */ t(Sa, { link: h, organization: g })
|
|
2367
2395
|
},
|
|
2368
2396
|
{
|
|
2369
2397
|
name: "domains",
|
|
2370
2398
|
displayKey: "domains",
|
|
2371
|
-
cellRenderer:
|
|
2399
|
+
cellRenderer: Ea
|
|
2372
2400
|
},
|
|
2373
2401
|
{
|
|
2374
2402
|
name: "description",
|
|
@@ -2379,63 +2407,64 @@ const Sa = ({ link: e, organization: n }) => {
|
|
|
2379
2407
|
displayKey: "membershipType"
|
|
2380
2408
|
}
|
|
2381
2409
|
],
|
|
2382
|
-
emptyState:
|
|
2410
|
+
emptyState: c
|
|
2383
2411
|
}
|
|
2384
2412
|
);
|
|
2385
2413
|
};
|
|
2386
2414
|
export {
|
|
2387
|
-
|
|
2388
|
-
|
|
2389
|
-
|
|
2390
|
-
|
|
2391
|
-
|
|
2392
|
-
|
|
2393
|
-
|
|
2394
|
-
|
|
2395
|
-
|
|
2396
|
-
|
|
2397
|
-
|
|
2398
|
-
|
|
2415
|
+
Pr as AlertProvider,
|
|
2416
|
+
Ha as ContinueCancelModal,
|
|
2417
|
+
ll as ErrorBoundaryFallback,
|
|
2418
|
+
al as ErrorBoundaryProvider,
|
|
2419
|
+
Vr as ErrorPage,
|
|
2420
|
+
Za as FileUploadControl,
|
|
2421
|
+
Nt as FormErrorText,
|
|
2422
|
+
Yr as FormPanel,
|
|
2423
|
+
tl as FormSubmitButton,
|
|
2424
|
+
Nr as Help,
|
|
2425
|
+
_t as HelpItem,
|
|
2426
|
+
el as IconMapper,
|
|
2399
2427
|
xa as KeycloakDataTable,
|
|
2400
|
-
|
|
2401
|
-
|
|
2402
|
-
|
|
2403
|
-
|
|
2404
|
-
|
|
2405
|
-
|
|
2406
|
-
|
|
2407
|
-
|
|
2408
|
-
|
|
2409
|
-
|
|
2410
|
-
|
|
2411
|
-
|
|
2412
|
-
|
|
2428
|
+
rl as KeycloakMasthead,
|
|
2429
|
+
Ua as KeycloakProvider,
|
|
2430
|
+
ca as KeycloakSelect,
|
|
2431
|
+
va as KeycloakSpinner,
|
|
2432
|
+
Gr as KeycloakTextArea,
|
|
2433
|
+
Ca as ListEmptyState,
|
|
2434
|
+
ja as NumberControl,
|
|
2435
|
+
il as OrganizationTable,
|
|
2436
|
+
Ia as PaginatingTableToolbar,
|
|
2437
|
+
Ga as PasswordControl,
|
|
2438
|
+
qt as PasswordInput,
|
|
2439
|
+
ta as ScrollForm,
|
|
2440
|
+
Kr as SelectControl,
|
|
2413
2441
|
ue as SelectVariant,
|
|
2414
|
-
|
|
2415
|
-
|
|
2416
|
-
|
|
2417
|
-
|
|
2418
|
-
|
|
2419
|
-
|
|
2420
|
-
|
|
2421
|
-
|
|
2422
|
-
|
|
2442
|
+
Ya as SwitchControl,
|
|
2443
|
+
ka as TableToolbar,
|
|
2444
|
+
Qa as TextAreaControl,
|
|
2445
|
+
Xa as TextControl,
|
|
2446
|
+
nl as UserProfileFields,
|
|
2447
|
+
Wa as beerify,
|
|
2448
|
+
Ze as createNamedContext,
|
|
2449
|
+
jr as debeerify,
|
|
2450
|
+
Ar as generateId,
|
|
2423
2451
|
Sr as getErrorDescription,
|
|
2424
2452
|
xr as getErrorMessage,
|
|
2425
|
-
|
|
2426
|
-
|
|
2427
|
-
|
|
2428
|
-
|
|
2429
|
-
|
|
2430
|
-
|
|
2431
|
-
|
|
2432
|
-
|
|
2433
|
-
|
|
2434
|
-
|
|
2435
|
-
|
|
2436
|
-
|
|
2437
|
-
|
|
2438
|
-
|
|
2439
|
-
|
|
2440
|
-
|
|
2453
|
+
Ka as getInjectedEnvironment,
|
|
2454
|
+
Er as getNetworkErrorDescription,
|
|
2455
|
+
Vt as getNetworkErrorMessage,
|
|
2456
|
+
Rr as isDefined,
|
|
2457
|
+
Ja as isUserProfileError,
|
|
2458
|
+
ae as label,
|
|
2459
|
+
ea as mainPageContentId,
|
|
2460
|
+
za as setUserProfileServerError,
|
|
2461
|
+
qa as useAlerts,
|
|
2462
|
+
$a as useEnvironment,
|
|
2463
|
+
Ht as useErrorBoundary,
|
|
2464
|
+
ba as useFetch,
|
|
2465
|
+
Br as useHelp,
|
|
2466
|
+
et as useRequiredContext,
|
|
2467
|
+
Dr as useSetTimeout,
|
|
2468
|
+
Lt as useStoredState
|
|
2441
2469
|
};
|
|
2470
|
+
//# sourceMappingURL=keycloak-ui-shared.js.map
|