@keycloak/keycloak-admin-ui 26.0.7 → 26.1.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/lib/.vite/manifest.json +30 -21
- package/lib/Banners.d.ts +5 -0
- package/lib/{CreateFlow-uRG_I_sd.js → CreateFlow--atMTNJc.js} +13 -13
- package/lib/{CreateFlow-uRG_I_sd.js.map → CreateFlow--atMTNJc.js.map} +1 -1
- package/lib/DetailOrganization-az4NPzMy.js +164 -0
- package/lib/DetailOrganization-az4NPzMy.js.map +1 -0
- package/lib/{ExecutorForm-CwWVGOtW.js → ExecutorForm-DaRc7uVA.js} +27 -27
- package/lib/{ExecutorForm-CwWVGOtW.js.map → ExecutorForm-DaRc7uVA.js.map} +1 -1
- package/lib/FlowDetails-qeT2t76N.js +10786 -0
- package/lib/FlowDetails-qeT2t76N.js.map +1 -0
- package/lib/{NewOrganization-CGV9yUfa.js → NewOrganization-DPk2Gzku.js} +12 -12
- package/lib/{NewOrganization-CGV9yUfa.js.map → NewOrganization-DPk2Gzku.js.map} +1 -1
- package/lib/PageHeaderClearCachesModal.d.ts +4 -0
- package/lib/{PermissionDetails-CpjubjMm.js → PermissionDetails-CnvNqBCb.js} +92 -92
- package/lib/{PermissionDetails-CpjubjMm.js.map → PermissionDetails-CnvNqBCb.js.map} +1 -1
- package/lib/{ResourceDetails-BoQE7rAq.js → ResourceDetails-Cfnqq1uy.js} +34 -34
- package/lib/{ResourceDetails-BoQE7rAq.js.map → ResourceDetails-Cfnqq1uy.js.map} +1 -1
- package/lib/{ScopeDetails-CXbD9GiG.js → ScopeDetails-_i-3BNjz.js} +18 -18
- package/lib/{ScopeDetails-CXbD9GiG.js.map → ScopeDetails-_i-3BNjz.js.map} +1 -1
- package/lib/admin-client.d.ts +1 -1
- package/lib/browser-ponyfill-uH6p8znu.js +342 -0
- package/lib/browser-ponyfill-uH6p8znu.js.map +1 -0
- package/lib/client-scopes/routes/ClientScope.d.ts +1 -1
- package/lib/client-scopes/routes/Mapper.d.ts +1 -0
- package/lib/clients/routes/Client.d.ts +1 -1
- package/lib/clients/routes/Mapper.d.ts +1 -0
- package/lib/components/dynamic/IntComponent.d.ts +2 -0
- package/lib/components/dynamic/NumberComponent.d.ts +2 -0
- package/lib/components/dynamic/components.d.ts +5 -1
- package/lib/components/json-file-upload/FileUploadForm.d.ts +2 -3
- package/lib/components/role-mapping/RoleMapping.d.ts +1 -1
- package/lib/context/RecentRealms.d.ts +1 -1
- package/lib/context/access/Access.d.ts +1 -1
- package/lib/context/realm-context/RealmContext.d.ts +1 -1
- package/lib/context/server-info/ServerInfoProvider.d.ts +1 -1
- package/lib/context/whoami/WhoAmI.d.ts +2 -1
- package/lib/events/AdminEvents.d.ts +5 -1
- package/lib/events/UserEvents.d.ts +6 -0
- package/lib/groups/MembershipsModal.d.ts +7 -0
- package/lib/identity-providers/routes/IdentityProvider.d.ts +1 -1
- package/lib/index-BIuvk4Xf.js +102021 -0
- package/lib/index-BIuvk4Xf.js.map +1 -0
- package/lib/index.d.ts +6 -2
- package/lib/keycloak-admin-ui.css +1 -0
- package/lib/keycloak-admin-ui.js +264 -259
- package/lib/organizations/routes/EditOrganization.d.ts +1 -1
- package/lib/permissions/PermissionsSection.d.ts +1 -0
- package/lib/permissions/routes/Permissions.d.ts +7 -0
- package/lib/permissions/routes/PermissionsTabs.d.ts +9 -0
- package/lib/permissions/routes.d.ts +3 -0
- package/lib/realm-roles/routes/RealmRole.d.ts +1 -1
- package/lib/realm-settings/TokensTab.d.ts +1 -2
- package/lib/realm-settings/routes/ThemesTab.d.ts +9 -0
- package/lib/realm-settings/themes/ImageUpload.d.ts +6 -0
- package/lib/realm-settings/themes/LogoContext.d.ts +9 -0
- package/lib/realm-settings/themes/PatternflyVars.d.ts +10 -0
- package/lib/realm-settings/themes/PreviewWindow.d.ts +5 -0
- package/lib/realm-settings/themes/ThemeColors.d.ts +9 -0
- package/lib/realm-settings/{ThemesTab.d.ts → themes/ThemeSettings.d.ts} +2 -2
- package/lib/realm-settings/themes/ThemesTab.d.ts +11 -0
- package/lib/realm-settings/user-profile/UserProfileContext.d.ts +1 -1
- package/lib/realm-settings/user-profile/attribute/AddTranslationsDialog.d.ts +3 -15
- package/lib/realm-settings/user-profile/attribute/AttributeGeneralSettings.d.ts +1 -14
- package/lib/realm-settings/user-profile/attribute/TranslatableField.d.ts +22 -0
- package/lib/theme/login.css +94 -0
- package/lib/user/routes/User.d.ts +1 -1
- package/lib/utils/useCurrentUser.d.ts +5 -5
- package/lib/utils/useIsAdminPermissionsClient.d.ts +1 -0
- package/lib/utils/useIsFeatureEnabled.d.ts +3 -1
- package/package.json +45 -32
- package/LICENSE.txt +0 -202
- package/lib/DetailOrganization-CqbiK2-2.js +0 -130
- package/lib/DetailOrganization-CqbiK2-2.js.map +0 -1
- package/lib/FlowDetails-CRuEMqzE.js +0 -10593
- package/lib/FlowDetails-CRuEMqzE.js.map +0 -1
- package/lib/components/json-file-upload/patternfly/FileUpload.d.ts +0 -73
- package/lib/components/json-file-upload/patternfly/FileUploadField.d.ts +0 -67
- package/lib/components/json-file-upload/patternfly/fileUtils.d.ts +0 -12
- package/lib/index-WPS7MqzE.js +0 -65977
- package/lib/index-WPS7MqzE.js.map +0 -1
- package/lib/style.css +0 -1
- /package/lib/{clients/scopes → components/copy-to-clipboard-button}/CopyToClipboardButton.d.ts +0 -0
@@ -1,20 +1,20 @@
|
|
1
1
|
import { jsxs as r, Fragment as v, jsx as a } from "react/jsx-runtime";
|
2
|
-
import { u as
|
3
|
-
import { useTranslation as
|
4
|
-
import { useNavigate as
|
5
|
-
function
|
6
|
-
const { adminClient: s } =
|
2
|
+
import { u as z, B as h, a as b, b as f, V as p, P as S, c as F, F as O, bw as A, A as w, z as y, d as C, bG as E, bC as x, bE as B } from "./index-BIuvk4Xf.js";
|
3
|
+
import { useTranslation as P } from "react-i18next";
|
4
|
+
import { useNavigate as j, Link as k } from "react-router-dom";
|
5
|
+
function K() {
|
6
|
+
const { adminClient: s } = z(), { addAlert: c, addError: d } = h(), { t } = P(), m = j(), { realm: e } = b(), i = f({ mode: "onChange" }), { handleSubmit: l, formState: g } = i;
|
7
7
|
return /* @__PURE__ */ r(v, { children: [
|
8
8
|
/* @__PURE__ */ a(p, { titleKey: "createOrganization" }),
|
9
|
-
/* @__PURE__ */ a(S, { variant: "light", children: /* @__PURE__ */ a(
|
9
|
+
/* @__PURE__ */ a(S, { variant: "light", children: /* @__PURE__ */ a(F, { role: "anyone", onSubmit: l(async (n) => {
|
10
10
|
try {
|
11
11
|
const o = x(n), { id: u } = await s.organizations.create(o);
|
12
|
-
c(t("organizationSaveSuccess")), m(
|
12
|
+
c(t("organizationSaveSuccess")), m(B({ realm: e, id: u, tab: "settings" }));
|
13
13
|
} catch (o) {
|
14
14
|
d("organizationSaveError", o);
|
15
15
|
}
|
16
|
-
}), isHorizontal: !0, children: /* @__PURE__ */ r(
|
17
|
-
/* @__PURE__ */ a(
|
16
|
+
}), isHorizontal: !0, children: /* @__PURE__ */ r(O, { ...i, children: [
|
17
|
+
/* @__PURE__ */ a(A, {}),
|
18
18
|
/* @__PURE__ */ r(w, { children: [
|
19
19
|
/* @__PURE__ */ a(y, { formState: g, "data-testid": "save", children: t("save") }),
|
20
20
|
/* @__PURE__ */ a(
|
@@ -22,7 +22,7 @@ function $() {
|
|
22
22
|
{
|
23
23
|
"data-testid": "cancel",
|
24
24
|
variant: "link",
|
25
|
-
component: (n) => /* @__PURE__ */ a(
|
25
|
+
component: (n) => /* @__PURE__ */ a(k, { ...n, to: E({ realm: e }) }),
|
26
26
|
children: t("cancel")
|
27
27
|
}
|
28
28
|
)
|
@@ -31,6 +31,6 @@ function $() {
|
|
31
31
|
] });
|
32
32
|
}
|
33
33
|
export {
|
34
|
-
|
34
|
+
K as default
|
35
35
|
};
|
36
|
-
//# sourceMappingURL=NewOrganization-
|
36
|
+
//# sourceMappingURL=NewOrganization-DPk2Gzku.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"NewOrganization-
|
1
|
+
{"version":3,"file":"NewOrganization-DPk2Gzku.js","sources":["../src/organizations/NewOrganization.tsx"],"sourcesContent":["import { FormSubmitButton } from \"@keycloak/keycloak-ui-shared\";\nimport { ActionGroup, Button, PageSection } from \"@patternfly/react-core\";\nimport { FormProvider, useForm } from \"react-hook-form\";\nimport { useTranslation } from \"react-i18next\";\nimport { Link, useNavigate } from \"react-router-dom\";\nimport { useAdminClient } from \"../admin-client\";\nimport { useAlerts } from \"@keycloak/keycloak-ui-shared\";\nimport { FormAccess } from \"../components/form/FormAccess\";\nimport { ViewHeader } from \"../components/view-header/ViewHeader\";\nimport { useRealm } from \"../context/realm-context/RealmContext\";\nimport {\n OrganizationForm,\n OrganizationFormType,\n convertToOrg,\n} from \"./OrganizationForm\";\nimport { toEditOrganization } from \"./routes/EditOrganization\";\nimport { toOrganizations } from \"./routes/Organizations\";\n\nexport default function NewOrganization() {\n const { adminClient } = useAdminClient();\n const { addAlert, addError } = useAlerts();\n const { t } = useTranslation();\n const navigate = useNavigate();\n const { realm } = useRealm();\n const form = useForm({ mode: \"onChange\" });\n const { handleSubmit, formState } = form;\n\n const save = async (org: OrganizationFormType) => {\n try {\n const organization = convertToOrg(org);\n const { id } = await adminClient.organizations.create(organization);\n addAlert(t(\"organizationSaveSuccess\"));\n navigate(toEditOrganization({ realm, id, tab: \"settings\" }));\n } catch (error) {\n addError(\"organizationSaveError\", error);\n }\n };\n\n return (\n <>\n <ViewHeader titleKey=\"createOrganization\" />\n <PageSection variant=\"light\">\n <FormAccess role=\"anyone\" onSubmit={handleSubmit(save)} isHorizontal>\n <FormProvider {...form}>\n <OrganizationForm />\n <ActionGroup>\n <FormSubmitButton formState={formState} data-testid=\"save\">\n {t(\"save\")}\n </FormSubmitButton>\n <Button\n data-testid=\"cancel\"\n variant=\"link\"\n component={(props) => (\n <Link {...props} to={toOrganizations({ realm })} />\n )}\n >\n {t(\"cancel\")}\n </Button>\n </ActionGroup>\n </FormProvider>\n </FormAccess>\n </PageSection>\n </>\n );\n}\n"],"names":["NewOrganization","adminClient","useAdminClient","addAlert","addError","useAlerts","useTranslation","navigate","useNavigate","realm","useRealm","form","useForm","handleSubmit","formState","jsxs","Fragment","jsx","ViewHeader","PageSection","FormAccess","org","organization","convertToOrg","id","toEditOrganization","error","FormProvider","OrganizationForm","ActionGroup","FormSubmitButton","Button","props","Link","toOrganizations"],"mappings":";;;;AAkBA,SAAwBA,IAAkB;AAClC,QAAA,EAAE,aAAAC,EAAY,IAAIC,EAAe,GACjC,EAAE,UAAAC,GAAU,UAAAC,EAAS,IAAIC,EAAU,GACnC,EAAE,EAAE,IAAIC,EAAe,GACvBC,IAAWC,EAAY,GACvB,EAAE,OAAAC,EAAM,IAAIC,EAAS,GACrBC,IAAOC,EAAQ,EAAE,MAAM,YAAY,GACnC,EAAE,cAAAC,GAAc,WAAAC,EAAA,IAAcH;AAapC,SAEI,gBAAAI,EAAAC,GAAA,EAAA,UAAA;AAAA,IAAC,gBAAAC,EAAAC,GAAA,EAAW,UAAS,qBAAqB,CAAA;AAAA,sBACzCC,GAAY,EAAA,SAAQ,SACnB,UAAA,gBAAAF,EAACG,KAAW,MAAK,UAAS,UAAUP,EAf7B,OAAOQ,MAA8B;AAC5C,UAAA;AACI,cAAAC,IAAeC,EAAaF,CAAG,GAC/B,EAAE,IAAAG,EAAG,IAAI,MAAMvB,EAAY,cAAc,OAAOqB,CAAY;AACzD,QAAAnB,EAAA,EAAE,yBAAyB,CAAC,GACrCI,EAASkB,EAAmB,EAAE,OAAAhB,GAAO,IAAAe,GAAI,KAAK,WAAA,CAAY,CAAC;AAAA,eACpDE,GAAO;AACd,QAAAtB,EAAS,yBAAyBsB,CAAK;AAAA,MAAA;AAAA,IAE3C,CAM2D,GAAG,cAAY,IAClE,UAAC,gBAAAX,EAAAY,GAAA,EAAc,GAAGhB,GAChB,UAAA;AAAA,MAAA,gBAAAM,EAACW,GAAiB,EAAA;AAAA,wBACjBC,GACC,EAAA,UAAA;AAAA,QAAA,gBAAAZ,EAACa,KAAiB,WAAAhB,GAAsB,eAAY,QACjD,UAAA,EAAE,MAAM,GACX;AAAA,QACA,gBAAAG;AAAA,UAACc;AAAA,UAAA;AAAA,YACC,eAAY;AAAA,YACZ,SAAQ;AAAA,YACR,WAAW,CAACC,MACV,gBAAAf,EAACgB,GAAM,EAAA,GAAGD,GAAO,IAAIE,EAAgB,EAAE,OAAAzB,EAAM,CAAC,EAAG,CAAA;AAAA,YAGlD,YAAE,QAAQ;AAAA,UAAA;AAAA,QAAA;AAAA,MACb,EACF,CAAA;AAAA,IAAA,EACF,CAAA,EACF,CAAA,EACF,CAAA;AAAA,EAAA,GACF;AAEJ;"}
|
@@ -1,22 +1,22 @@
|
|
1
|
-
import { jsx as s, jsxs as v, Fragment as
|
2
|
-
import { u as
|
1
|
+
import { jsx as s, jsxs as v, Fragment as N } from "react/jsx-runtime";
|
2
|
+
import { u as K, b5 as J, n as _, b6 as W, b7 as Y, b8 as B, aP as Q, b as X, b9 as Z, B as ee, ba as se, aY as ae, h as H, e as j, bb as k, bc as ie, bd as te, V as oe, be as ne, aG as re, P as le, c as ce, F as de, q as z, aJ as pe, bf as P, bg as C, bh as ue, bi as E, bj as M, bk as U, R as me, A as be, d as G, bl as fe } from "./index-BIuvk4Xf.js";
|
3
3
|
import { useState as f, useRef as he } from "react";
|
4
|
-
import { useTranslation as
|
4
|
+
import { useTranslation as $ } from "react-i18next";
|
5
5
|
import { useNavigate as ge, Link as ye } from "react-router-dom";
|
6
6
|
const Se = ({
|
7
7
|
clientId: c,
|
8
8
|
resourceId: e,
|
9
9
|
preSelected: u
|
10
10
|
}) => {
|
11
|
-
const { adminClient: h } =
|
11
|
+
const { adminClient: h } = K(), { t: R } = $(), {
|
12
12
|
control: F,
|
13
|
-
getValues:
|
13
|
+
getValues: V,
|
14
14
|
setValue: A,
|
15
|
-
formState: { errors:
|
16
|
-
} =
|
15
|
+
formState: { errors: n }
|
16
|
+
} = J(), [m, r] = f([]), [a, g] = f(
|
17
17
|
[]
|
18
|
-
), [p, b] = f(""), [y, D] = f(!1), S = he(!0), x =
|
19
|
-
return
|
18
|
+
), [p, b] = f(""), [y, D] = f(!1), S = he(!0), x = V("scopes"), q = (l) => l.map((o) => /* @__PURE__ */ s(Q, { value: o, children: o.name }, o.id));
|
19
|
+
return _(
|
20
20
|
async () => e ? (e && !S.current && A("scopes", []), S.current = !1, h.clients.listScopesByResource({
|
21
21
|
id: c,
|
22
22
|
resourceName: e
|
@@ -27,36 +27,36 @@ const Se = ({
|
|
27
27
|
)
|
28
28
|
),
|
29
29
|
(l) => {
|
30
|
-
|
31
|
-
l.filter((
|
30
|
+
r(l), p || g(
|
31
|
+
l.filter((o) => x?.includes(o.id))
|
32
32
|
);
|
33
33
|
},
|
34
34
|
[e, p]
|
35
35
|
), /* @__PURE__ */ s(
|
36
|
-
|
36
|
+
W,
|
37
37
|
{
|
38
38
|
name: "scopes",
|
39
39
|
defaultValue: u ? [u] : [],
|
40
40
|
control: F,
|
41
41
|
rules: { validate: (l) => l.length > 0 },
|
42
42
|
render: ({ field: l }) => /* @__PURE__ */ s(
|
43
|
-
|
43
|
+
Y,
|
44
44
|
{
|
45
45
|
toggleId: "scopes",
|
46
|
-
variant:
|
47
|
-
onToggle: (
|
48
|
-
onFilter: (
|
46
|
+
variant: B.typeaheadMulti,
|
47
|
+
onToggle: (o) => D(o),
|
48
|
+
onFilter: (o) => (b(o), q(m)),
|
49
49
|
onClear: () => {
|
50
50
|
l.onChange([]), b("");
|
51
51
|
},
|
52
|
-
selections: a.map((
|
53
|
-
onSelect: (
|
54
|
-
const T = typeof
|
52
|
+
selections: a.map((o) => o.name),
|
53
|
+
onSelect: (o) => {
|
54
|
+
const T = typeof o == "string" ? a.find((d) => d.name === o) : o, w = a.find((d) => d.id === T.id) ? a.filter((d) => d.id !== T.id) : [...a, T];
|
55
55
|
l.onChange(w.map((d) => d.id)), g(w), b("");
|
56
56
|
},
|
57
57
|
isOpen: y,
|
58
58
|
"aria-labelledby": R("scopes"),
|
59
|
-
validated:
|
59
|
+
validated: n.scopes ? "error" : "default",
|
60
60
|
isDisabled: !!u,
|
61
61
|
typeAheadAriaLabel: R("scopes"),
|
62
62
|
children: q(m)
|
@@ -66,34 +66,34 @@ const Se = ({
|
|
66
66
|
);
|
67
67
|
};
|
68
68
|
function Re() {
|
69
|
-
const { adminClient: c } =
|
69
|
+
const { adminClient: c } = K(), { t: e } = $(), u = X({
|
70
70
|
mode: "onChange"
|
71
71
|
}), {
|
72
72
|
control: h,
|
73
73
|
reset: R,
|
74
74
|
formState: { errors: F },
|
75
|
-
handleSubmit:
|
76
|
-
} = u, A = ge(), { id:
|
77
|
-
|
75
|
+
handleSubmit: V
|
76
|
+
} = u, A = ge(), { id: n, realm: m, permissionType: r, permissionId: a, selectedId: g } = Z(), { addAlert: p, addError: b } = ee(), [y, D] = f(), [S, x] = f(!1), { hasAccess: q } = se(), l = !q("manage-authorization");
|
77
|
+
_(
|
78
78
|
async () => {
|
79
79
|
if (!a)
|
80
80
|
return {};
|
81
|
-
const [i,
|
81
|
+
const [i, t, L, O] = await Promise.all([
|
82
82
|
c.clients.findOnePermission({
|
83
|
-
id:
|
84
|
-
type:
|
83
|
+
id: n,
|
84
|
+
type: r,
|
85
85
|
permissionId: a
|
86
86
|
}),
|
87
87
|
c.clients.getAssociatedResources({
|
88
|
-
id:
|
88
|
+
id: n,
|
89
89
|
permissionId: a
|
90
90
|
}),
|
91
91
|
c.clients.getAssociatedPolicies({
|
92
|
-
id:
|
92
|
+
id: n,
|
93
93
|
permissionId: a
|
94
94
|
}),
|
95
95
|
c.clients.getAssociatedScopes({
|
96
|
-
id:
|
96
|
+
id: n,
|
97
97
|
permissionId: a
|
98
98
|
})
|
99
99
|
]);
|
@@ -101,45 +101,45 @@ function Re() {
|
|
101
101
|
throw new Error(e("notFound"));
|
102
102
|
return {
|
103
103
|
permission: i,
|
104
|
-
resources:
|
104
|
+
resources: t.map((I) => I._id),
|
105
105
|
policies: L.map((I) => I.id),
|
106
|
-
scopes:
|
106
|
+
scopes: O.map((I) => I.id)
|
107
107
|
};
|
108
108
|
},
|
109
|
-
({ permission: i, resources:
|
110
|
-
R({ ...i, resources:
|
109
|
+
({ permission: i, resources: t, policies: L, scopes: O }) => {
|
110
|
+
R({ ...i, resources: t, policies: L, scopes: O }), i && "resourceType" in i && x(
|
111
111
|
!!i.resourceType
|
112
|
-
), D({ ...i, resources:
|
112
|
+
), D({ ...i, resources: t, policies: L });
|
113
113
|
},
|
114
114
|
[]
|
115
115
|
);
|
116
|
-
const
|
116
|
+
const o = async (i) => {
|
117
117
|
try {
|
118
118
|
if (a)
|
119
119
|
await c.clients.updatePermission(
|
120
|
-
{ id:
|
120
|
+
{ id: n, type: r, permissionId: a },
|
121
121
|
i
|
122
122
|
);
|
123
123
|
else {
|
124
|
-
const
|
125
|
-
{ id:
|
124
|
+
const t = await c.clients.createPermission(
|
125
|
+
{ id: n, type: r },
|
126
126
|
i
|
127
127
|
);
|
128
|
-
D(
|
128
|
+
D(t), A(
|
129
129
|
fe({
|
130
130
|
realm: m,
|
131
|
-
id:
|
132
|
-
permissionType:
|
133
|
-
permissionId:
|
131
|
+
id: n,
|
132
|
+
permissionType: r,
|
133
|
+
permissionId: t.id
|
134
134
|
})
|
135
135
|
);
|
136
136
|
}
|
137
137
|
p(
|
138
138
|
e((a ? "update" : "create") + "PermissionSuccess"),
|
139
|
-
|
139
|
+
j.success
|
140
140
|
);
|
141
|
-
} catch (
|
142
|
-
b("permissionSaveError",
|
141
|
+
} catch (t) {
|
142
|
+
b("permissionSaveError", t);
|
143
143
|
}
|
144
144
|
}, [T, w] = ae({
|
145
145
|
titleKey: "deletePermission",
|
@@ -151,11 +151,11 @@ function Re() {
|
|
151
151
|
onConfirm: async () => {
|
152
152
|
try {
|
153
153
|
await c.clients.delPermission({
|
154
|
-
id:
|
155
|
-
type:
|
154
|
+
id: n,
|
155
|
+
type: r,
|
156
156
|
permissionId: a
|
157
|
-
}), p(e("permissionDeletedSuccess"),
|
158
|
-
|
157
|
+
}), p(e("permissionDeletedSuccess"), j.success), A(
|
158
|
+
k({ realm: m, clientId: n, tab: "permissions" })
|
159
159
|
);
|
160
160
|
} catch (i) {
|
161
161
|
b("permissionDeletedError", i);
|
@@ -166,15 +166,15 @@ function Re() {
|
|
166
166
|
name: "resources",
|
167
167
|
defaultValue: []
|
168
168
|
});
|
169
|
-
return y ? /* @__PURE__ */ v(
|
169
|
+
return y ? /* @__PURE__ */ v(N, { children: [
|
170
170
|
/* @__PURE__ */ s(w, {}),
|
171
171
|
/* @__PURE__ */ s(
|
172
|
-
|
172
|
+
oe,
|
173
173
|
{
|
174
|
-
titleKey: a ? y.name : `create${
|
174
|
+
titleKey: a ? y.name : `create${ne(r)}BasedPermission`,
|
175
175
|
dropdownItems: a ? [
|
176
176
|
/* @__PURE__ */ s(
|
177
|
-
|
177
|
+
re,
|
178
178
|
{
|
179
179
|
"data-testid": "delete-resource",
|
180
180
|
isDisabled: l,
|
@@ -191,7 +191,7 @@ function Re() {
|
|
191
191
|
{
|
192
192
|
isHorizontal: !0,
|
193
193
|
role: "manage-authorization",
|
194
|
-
onSubmit:
|
194
|
+
onSubmit: V(o),
|
195
195
|
children: /* @__PURE__ */ v(de, { ...u, children: [
|
196
196
|
/* @__PURE__ */ s(
|
197
197
|
z,
|
@@ -219,12 +219,12 @@ function Re() {
|
|
219
219
|
}
|
220
220
|
),
|
221
221
|
/* @__PURE__ */ s(
|
222
|
-
|
222
|
+
P,
|
223
223
|
{
|
224
224
|
label: e("applyToResourceTypeFlag"),
|
225
225
|
fieldId: "applyToResourceTypeFlag",
|
226
226
|
labelIcon: /* @__PURE__ */ s(
|
227
|
-
|
227
|
+
C,
|
228
228
|
{
|
229
229
|
helpText: e("applyToResourceTypeFlagHelp"),
|
230
230
|
fieldLabelId: "applyToResourceTypeFlag"
|
@@ -238,7 +238,7 @@ function Re() {
|
|
238
238
|
label: e("on"),
|
239
239
|
labelOff: e("off"),
|
240
240
|
isChecked: S,
|
241
|
-
onChange: (i,
|
241
|
+
onChange: (i, t) => x(t),
|
242
242
|
"aria-label": e("applyToResourceTypeFlag")
|
243
243
|
}
|
244
244
|
)
|
@@ -252,47 +252,47 @@ function Re() {
|
|
252
252
|
labelIcon: e("resourceTypeHelp"),
|
253
253
|
rules: {
|
254
254
|
required: {
|
255
|
-
value:
|
255
|
+
value: r === "scope",
|
256
256
|
message: e("required")
|
257
257
|
}
|
258
258
|
}
|
259
259
|
}
|
260
260
|
) : /* @__PURE__ */ v(
|
261
|
-
|
261
|
+
P,
|
262
262
|
{
|
263
263
|
label: e("resource"),
|
264
264
|
fieldId: "resources",
|
265
265
|
labelIcon: /* @__PURE__ */ s(
|
266
|
-
|
266
|
+
C,
|
267
267
|
{
|
268
268
|
helpText: e("permissionResources"),
|
269
269
|
fieldLabelId: "resources"
|
270
270
|
}
|
271
271
|
),
|
272
|
-
isRequired:
|
272
|
+
isRequired: r !== "scope",
|
273
273
|
children: [
|
274
274
|
/* @__PURE__ */ s(
|
275
275
|
E,
|
276
276
|
{
|
277
277
|
name: "resources",
|
278
|
-
clientId:
|
278
|
+
clientId: n,
|
279
279
|
permissionId: a,
|
280
|
-
preSelected:
|
281
|
-
variant:
|
282
|
-
isRequired:
|
280
|
+
preSelected: r === "scope" ? void 0 : g,
|
281
|
+
variant: r === "scope" ? B.typeahead : B.typeaheadMulti,
|
282
|
+
isRequired: r !== "scope"
|
283
283
|
}
|
284
284
|
),
|
285
|
-
F.resources && /* @__PURE__ */ s(
|
285
|
+
F.resources && /* @__PURE__ */ s(M, { message: e("required") })
|
286
286
|
]
|
287
287
|
}
|
288
288
|
),
|
289
|
-
|
290
|
-
|
289
|
+
r === "scope" && /* @__PURE__ */ v(
|
290
|
+
P,
|
291
291
|
{
|
292
292
|
label: e("authorizationScopes"),
|
293
293
|
fieldId: "scopes",
|
294
294
|
labelIcon: /* @__PURE__ */ s(
|
295
|
-
|
295
|
+
C,
|
296
296
|
{
|
297
297
|
helpText: e("permissionScopesHelp"),
|
298
298
|
fieldLabelId: "scopesSelect"
|
@@ -303,22 +303,22 @@ function Re() {
|
|
303
303
|
/* @__PURE__ */ s(
|
304
304
|
Se,
|
305
305
|
{
|
306
|
-
clientId:
|
306
|
+
clientId: n,
|
307
307
|
resourceId: d?.[0],
|
308
308
|
preSelected: g
|
309
309
|
}
|
310
310
|
),
|
311
|
-
F.scopes && /* @__PURE__ */ s(
|
311
|
+
F.scopes && /* @__PURE__ */ s(M, { message: e("required") })
|
312
312
|
]
|
313
313
|
}
|
314
314
|
),
|
315
315
|
/* @__PURE__ */ s(
|
316
|
-
|
316
|
+
P,
|
317
317
|
{
|
318
318
|
label: e("policies"),
|
319
319
|
fieldId: "policies",
|
320
320
|
labelIcon: /* @__PURE__ */ s(
|
321
|
-
|
321
|
+
C,
|
322
322
|
{
|
323
323
|
helpText: e("permissionPoliciesHelp"),
|
324
324
|
fieldLabelId: "policies"
|
@@ -328,18 +328,18 @@ function Re() {
|
|
328
328
|
E,
|
329
329
|
{
|
330
330
|
name: "policies",
|
331
|
-
clientId:
|
331
|
+
clientId: n,
|
332
332
|
permissionId: a
|
333
333
|
}
|
334
334
|
)
|
335
335
|
}
|
336
336
|
),
|
337
337
|
/* @__PURE__ */ s(
|
338
|
-
|
338
|
+
P,
|
339
339
|
{
|
340
340
|
label: e("decisionStrategy"),
|
341
341
|
labelIcon: /* @__PURE__ */ s(
|
342
|
-
|
342
|
+
C,
|
343
343
|
{
|
344
344
|
helpText: e("permissionDecisionStrategyHelp"),
|
345
345
|
fieldLabelId: "decisionStrategy"
|
@@ -348,25 +348,25 @@ function Re() {
|
|
348
348
|
fieldId: "policyEnforcementMode",
|
349
349
|
hasNoPaddingTop: !0,
|
350
350
|
children: /* @__PURE__ */ s(
|
351
|
-
|
351
|
+
W,
|
352
352
|
{
|
353
353
|
name: "decisionStrategy",
|
354
354
|
"data-testid": "decisionStrategy",
|
355
|
-
defaultValue:
|
355
|
+
defaultValue: U.UNANIMOUS,
|
356
356
|
control: h,
|
357
|
-
render: ({ field: i }) => /* @__PURE__ */ s(
|
357
|
+
render: ({ field: i }) => /* @__PURE__ */ s(N, { children: Object.values(U).map((t) => /* @__PURE__ */ s(
|
358
358
|
me,
|
359
359
|
{
|
360
|
-
id:
|
361
|
-
"data-testid":
|
362
|
-
isChecked: i.value ===
|
360
|
+
id: t,
|
361
|
+
"data-testid": t,
|
362
|
+
isChecked: i.value === t,
|
363
363
|
isDisabled: l,
|
364
364
|
name: "decisionStrategies",
|
365
|
-
onChange: () => i.onChange(
|
366
|
-
label: e(`decisionStrategies.${
|
365
|
+
onChange: () => i.onChange(t),
|
366
|
+
label: e(`decisionStrategies.${t}`),
|
367
367
|
className: "pf-v5-u-mb-md"
|
368
368
|
},
|
369
|
-
|
369
|
+
t
|
370
370
|
)) })
|
371
371
|
}
|
372
372
|
)
|
@@ -374,7 +374,7 @@ function Re() {
|
|
374
374
|
),
|
375
375
|
/* @__PURE__ */ s(be, { children: /* @__PURE__ */ v("div", { className: "pf-v5-u-mt-md", children: [
|
376
376
|
/* @__PURE__ */ s(
|
377
|
-
|
377
|
+
G,
|
378
378
|
{
|
379
379
|
variant: H.primary,
|
380
380
|
type: "submit",
|
@@ -383,7 +383,7 @@ function Re() {
|
|
383
383
|
}
|
384
384
|
),
|
385
385
|
/* @__PURE__ */ s(
|
386
|
-
|
386
|
+
G,
|
387
387
|
{
|
388
388
|
variant: "link",
|
389
389
|
"data-testid": "cancel",
|
@@ -391,9 +391,9 @@ function Re() {
|
|
391
391
|
ye,
|
392
392
|
{
|
393
393
|
...i,
|
394
|
-
to:
|
394
|
+
to: k({
|
395
395
|
realm: m,
|
396
|
-
clientId:
|
396
|
+
clientId: n,
|
397
397
|
tab: "permissions"
|
398
398
|
})
|
399
399
|
}
|
@@ -405,9 +405,9 @@ function Re() {
|
|
405
405
|
] })
|
406
406
|
}
|
407
407
|
) })
|
408
|
-
] }) : /* @__PURE__ */ s(
|
408
|
+
] }) : /* @__PURE__ */ s(te, {});
|
409
409
|
}
|
410
410
|
export {
|
411
411
|
Re as default
|
412
412
|
};
|
413
|
-
//# sourceMappingURL=PermissionDetails-
|
413
|
+
//# sourceMappingURL=PermissionDetails-CnvNqBCb.js.map
|