@keycloak/keycloak-admin-ui 26.7.5 → 26.8.1

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.
Files changed (74) hide show
  1. package/README.md +10 -0
  2. package/lib/.vite/manifest.json +52 -42
  3. package/lib/{AddDefaultTrust-BvsWwMDh.js → AddDefaultTrust-CmFBoVLh.js} +8 -8
  4. package/lib/{AddDefaultTrust-BvsWwMDh.js.map → AddDefaultTrust-CmFBoVLh.js.map} +1 -1
  5. package/lib/{AddJWTAuthorizationGrant-ByBPPwyK.js → AddJWTAuthorizationGrant-10wBuQUL.js} +12 -12
  6. package/lib/{AddJWTAuthorizationGrant-ByBPPwyK.js.map → AddJWTAuthorizationGrant-10wBuQUL.js.map} +1 -1
  7. package/lib/{AddKubernetesConnect-D4xTogVo.js → AddKubernetesConnect-CcEeza2C.js} +14 -11
  8. package/lib/AddKubernetesConnect-CcEeza2C.js.map +1 -0
  9. package/lib/{AddOAuth2-BDmTZ-YA.js → AddOAuth2-BBzSU5dK.js} +13 -13
  10. package/lib/{AddOAuth2-BDmTZ-YA.js.map → AddOAuth2-BBzSU5dK.js.map} +1 -1
  11. package/lib/AddOid4Vp-bpNno26D.js +73 -0
  12. package/lib/AddOid4Vp-bpNno26D.js.map +1 -0
  13. package/lib/{AddSpiffeConnect-B6_E1i6Z.js → AddSpiffeConnect-DDjtR--d.js} +8 -8
  14. package/lib/{AddSpiffeConnect-B6_E1i6Z.js.map → AddSpiffeConnect-DDjtR--d.js.map} +1 -1
  15. package/lib/{CreateFlow-C5QWzOsy.js → CreateFlow-BE5SrsQ8.js} +2 -2
  16. package/lib/{CreateFlow-C5QWzOsy.js.map → CreateFlow-BE5SrsQ8.js.map} +1 -1
  17. package/lib/DetailOrganization-Bu32j7ib.js +420 -0
  18. package/lib/DetailOrganization-Bu32j7ib.js.map +1 -0
  19. package/lib/{ExecutorForm-n3e9Qvrl.js → ExecutorForm-Dh_cpjdf.js} +23 -23
  20. package/lib/{ExecutorForm-n3e9Qvrl.js.map → ExecutorForm-Dh_cpjdf.js.map} +1 -1
  21. package/lib/{FlowDetails-CnVZXaRP.js → FlowDetails-CFTkvTDA.js} +243 -226
  22. package/lib/{FlowDetails-CnVZXaRP.js.map → FlowDetails-CFTkvTDA.js.map} +1 -1
  23. package/lib/{NewOrganization-D4X_bhyD.js → NewOrganization-D_Mml2TC.js} +13 -13
  24. package/lib/NewOrganization-D_Mml2TC.js.map +1 -0
  25. package/lib/{PermissionConfigurationDetails-UjUwrvYu.js → PermissionConfigurationDetails-n1d3Hq-O.js} +92 -91
  26. package/lib/PermissionConfigurationDetails-n1d3Hq-O.js.map +1 -0
  27. package/lib/PermissionDetails-DL0juJDV.js +437 -0
  28. package/lib/PermissionDetails-DL0juJDV.js.map +1 -0
  29. package/lib/{RealmSection-BTCX9rHA.js → RealmSection-CQax8V1F.js} +26 -26
  30. package/lib/{RealmSection-BTCX9rHA.js.map → RealmSection-CQax8V1F.js.map} +1 -1
  31. package/lib/{ResourceDetails-C3cyeLL5.js → ResourceDetails-D_029Hz8.js} +24 -24
  32. package/lib/{ResourceDetails-C3cyeLL5.js.map → ResourceDetails-D_029Hz8.js.map} +1 -1
  33. package/lib/{ScopeDetails-C16qMBw-.js → ScopeDetails-BUCey3vn.js} +17 -17
  34. package/lib/{ScopeDetails-C16qMBw-.js.map → ScopeDetails-BUCey3vn.js.map} +1 -1
  35. package/lib/{ScopePicker-DbxK9g9R.js → ScopePicker-lTpi2ES9.js} +18 -18
  36. package/lib/{ScopePicker-DbxK9g9R.js.map → ScopePicker-lTpi2ES9.js.map} +1 -1
  37. package/lib/{WorkflowDetailForm-d5rClboG.js → WorkflowDetailForm-BeobAJDg.js} +31 -31
  38. package/lib/{WorkflowDetailForm-d5rClboG.js.map → WorkflowDetailForm-BeobAJDg.js.map} +1 -1
  39. package/lib/{WorkflowsSection-DRU3QF93.js → WorkflowsSection-ZFKvDu9e.js} +16 -16
  40. package/lib/{WorkflowsSection-DRU3QF93.js.map → WorkflowsSection-ZFKvDu9e.js.map} +1 -1
  41. package/lib/apps/admin-ui/src/authentication/constants.d.ts +3 -1
  42. package/lib/apps/admin-ui/src/client-scopes/details/oid4vciAttributes.d.ts +8 -3
  43. package/lib/apps/admin-ui/src/clients/ssf/tabs/CreateStreamForm.d.ts +18 -0
  44. package/lib/apps/admin-ui/src/clients/ssf/utils.d.ts +13 -0
  45. package/lib/apps/admin-ui/src/components/client/ClientSelect.d.ts +3 -4
  46. package/lib/apps/admin-ui/src/components/client/ClientSelectModal.d.ts +8 -0
  47. package/lib/apps/admin-ui/src/components/group/GroupPickerDialog.d.ts +8 -2
  48. package/lib/apps/admin-ui/src/components/role-mapping/RoleMapping.d.ts +1 -32
  49. package/lib/apps/admin-ui/src/components/role-mapping/resource.d.ts +9 -1
  50. package/lib/apps/admin-ui/src/context/identity-provider/IdentityProviderContext.d.ts +12 -0
  51. package/lib/apps/admin-ui/src/identity-providers/add/AddOid4Vp.d.ts +1 -0
  52. package/lib/apps/admin-ui/src/identity-providers/add/IdpDomainsTab.d.ts +5 -0
  53. package/lib/apps/admin-ui/src/identity-providers/add/IdpOrganizationsTab.d.ts +6 -0
  54. package/lib/apps/admin-ui/src/identity-providers/add/Oid4VpSettings.d.ts +1 -0
  55. package/lib/apps/admin-ui/src/identity-providers/routes/IdentityProvider.d.ts +1 -1
  56. package/lib/apps/admin-ui/src/identity-providers/routes/IdentityProviderOid4Vp.d.ts +7 -0
  57. package/lib/apps/admin-ui/src/organizations/DomainsTab.d.ts +1 -0
  58. package/lib/apps/admin-ui/src/organizations/IdentityProviderSelect.d.ts +4 -1
  59. package/lib/apps/admin-ui/src/organizations/MembershipTypeToggle.d.ts +9 -0
  60. package/lib/apps/admin-ui/src/organizations/OrganizationForm.d.ts +4 -1
  61. package/lib/apps/admin-ui/src/organizations/routes/EditOrganization.d.ts +1 -1
  62. package/lib/apps/admin-ui/src/realm-settings/ssf/SsfTransmitterDisableConfirmDialog.d.ts +1 -1
  63. package/lib/apps/admin-ui/src/utils/useIsFeatureEnabled.d.ts +3 -1
  64. package/lib/{index-C-D-m0EP.js → index-DAVLcnp3.js} +24150 -23208
  65. package/lib/{index-C-D-m0EP.js.map → index-DAVLcnp3.js.map} +1 -1
  66. package/lib/keycloak-admin-ui.js +75 -75
  67. package/package.json +4 -4
  68. package/lib/AddKubernetesConnect-D4xTogVo.js.map +0 -1
  69. package/lib/DetailOrganization-amJJPyq-.js +0 -204
  70. package/lib/DetailOrganization-amJJPyq-.js.map +0 -1
  71. package/lib/NewOrganization-D4X_bhyD.js.map +0 -1
  72. package/lib/PermissionConfigurationDetails-UjUwrvYu.js.map +0 -1
  73. package/lib/PermissionDetails-gUH5Lf-7.js +0 -413
  74. package/lib/PermissionDetails-gUH5Lf-7.js.map +0 -1
@@ -1,23 +1,23 @@
1
1
  import { jsxs as r, Fragment as v, jsx as a } from "react/jsx-runtime";
2
- import { u as h, q as z, a as f, b as p, V as S, P as F, c as O, F as y, aQ as A, A as b, t as w, B as x, aZ as C, aV as E, aX as N } from "./index-C-D-m0EP.js";
3
- import { useTranslation as P } from "react-i18next";
4
- import { useNavigate as V, Link as j } from "react-router-dom";
5
- function D() {
6
- const { adminClient: s } = h(), { addAlert: c, addError: d } = z(), { t } = P(), l = V(), { realm: e } = f(), i = p({ mode: "onChange" }), { handleSubmit: m, formState: g } = i;
2
+ import { u as h, K as z, a as f, b as p, V as S, P as F, c as O, F as b, aT as w, A as y, d as A, B as x, b0 as C, aY as E, a_ as K } from "./index-DAVLcnp3.js";
3
+ import { useTranslation as N } from "react-i18next";
4
+ import { useNavigate as P, Link as T } from "react-router-dom";
5
+ function V() {
6
+ const { adminClient: s } = h(), { addAlert: c, addError: d } = z(), { t } = N(), l = P(), { realm: e } = f(), i = p({ mode: "onChange" }), { handleSubmit: m, formState: g } = i;
7
7
  return /* @__PURE__ */ r(v, { children: [
8
8
  /* @__PURE__ */ a(S, { titleKey: "createOrganization" }),
9
9
  /* @__PURE__ */ a(F, { variant: "light", children: /* @__PURE__ */ a(O, { role: "anyone", onSubmit: m(async (n) => {
10
10
  try {
11
11
  const o = E(n), { id: u } = await s.organizations.create(o);
12
- c(t("organizationSaveSuccess")), l(N({ realm: e, id: u, tab: "settings" }));
12
+ c(t("organizationSaveSuccess")), l(K({ realm: e, id: u, tab: "settings" }));
13
13
  } catch (o) {
14
14
  d("organizationSaveError", o);
15
15
  }
16
- }), isHorizontal: !0, children: /* @__PURE__ */ r(y, { ...i, children: [
17
- /* @__PURE__ */ a(A, {}),
18
- /* @__PURE__ */ r(b, { children: [
16
+ }), isHorizontal: !0, children: /* @__PURE__ */ r(b, { ...i, children: [
17
+ /* @__PURE__ */ a(w, { showDomains: !0 }),
18
+ /* @__PURE__ */ r(y, { children: [
19
19
  /* @__PURE__ */ a(
20
- w,
20
+ A,
21
21
  {
22
22
  formState: g,
23
23
  allowNonDirty: !0,
@@ -30,7 +30,7 @@ function D() {
30
30
  {
31
31
  "data-testid": "cancel",
32
32
  variant: "link",
33
- component: (n) => /* @__PURE__ */ a(j, { ...n, to: C({ realm: e }) }),
33
+ component: (n) => /* @__PURE__ */ a(T, { ...n, to: C({ realm: e }) }),
34
34
  children: t("cancel")
35
35
  }
36
36
  )
@@ -39,6 +39,6 @@ function D() {
39
39
  ] });
40
40
  }
41
41
  export {
42
- D as default
42
+ V as default
43
43
  };
44
- //# sourceMappingURL=NewOrganization-D4X_bhyD.js.map
44
+ //# sourceMappingURL=NewOrganization-D_Mml2TC.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"NewOrganization-D_Mml2TC.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 void 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 showDomains />\n <ActionGroup>\n <FormSubmitButton\n formState={formState}\n allowNonDirty\n data-testid=\"save\"\n >\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;AACxC,QAAM,EAAE,aAAAC,EAAA,IAAgBC,EAAA,GAClB,EAAE,UAAAC,GAAU,UAAAC,EAAA,IAAaC,EAAA,GACzB,EAAE,EAAA,IAAMC,EAAA,GACRC,IAAWC,EAAA,GACX,EAAE,OAAAC,EAAA,IAAUC,EAAA,GACZC,IAAOC,EAAQ,EAAE,MAAM,YAAY,GACnC,EAAE,cAAAC,GAAc,WAAAC,EAAA,IAAcH;AAapC,SACE,gBAAAI,EAAAC,GAAA,EACE,UAAA;AAAA,IAAA,gBAAAC,EAACC,GAAA,EAAW,UAAS,qBAAA,CAAqB;AAAA,sBACzCC,GAAA,EAAY,SAAQ,SACnB,UAAA,gBAAAF,EAACG,KAAW,MAAK,UAAS,UAAUP,EAf7B,OAAOQ,MAA8B;AAChD,UAAI;AACF,cAAMC,IAAeC,EAAaF,CAAG,GAC/B,EAAE,IAAAG,EAAA,IAAO,MAAMvB,EAAY,cAAc,OAAOqB,CAAY;AAClE,QAAAnB,EAAS,EAAE,yBAAyB,CAAC,GAChCI,EAASkB,EAAmB,EAAE,OAAAhB,GAAO,IAAAe,GAAI,KAAK,WAAA,CAAY,CAAC;AAAA,MAClE,SAASE,GAAO;AACd,QAAAtB,EAAS,yBAAyBsB,CAAK;AAAA,MACzC;AAAA,IACF,CAM2D,GAAG,cAAY,IAClE,UAAA,gBAAAX,EAACY,GAAA,EAAc,GAAGhB,GAChB,UAAA;AAAA,MAAA,gBAAAM,EAACW,GAAA,EAAiB,aAAW,GAAA,CAAC;AAAA,wBAC7BC,GAAA,EACC,UAAA;AAAA,QAAA,gBAAAZ;AAAA,UAACa;AAAAA,UAAA;AAAA,YACC,WAAAhB;AAAA,YACA,eAAa;AAAA,YACb,eAAY;AAAA,YAEX,YAAE,MAAM;AAAA,UAAA;AAAA,QAAA;AAAA,QAEX,gBAAAG;AAAA,UAACc;AAAA,UAAA;AAAA,YACC,eAAY;AAAA,YACZ,SAAQ;AAAA,YACR,WAAW,CAACC,MACV,gBAAAf,EAACgB,GAAA,EAAM,GAAGD,GAAO,IAAIE,EAAgB,EAAE,OAAAzB,EAAA,CAAO,EAAA,CAAG;AAAA,YAGlD,YAAE,QAAQ;AAAA,UAAA;AAAA,QAAA;AAAA,MACb,EAAA,CACF;AAAA,IAAA,EAAA,CACF,GACF,EAAA,CACF;AAAA,EAAA,GACF;AAEJ;"}
@@ -1,84 +1,84 @@
1
- import { jsx as e, jsxs as T, Fragment as j } from "react/jsx-runtime";
2
- import { u as q, a as ce, b as X, be as le, aA as de, q as _, at as pe, M as $, j as J, k as me, F as Q, X as U, K as ue, bf as R, bg as ye, A as Y, B as F, l as V, bh as ge, bi as Pe, bj as he, e as M, bk as G, bl as fe, bm as ve, bn as be, bo as Ce, bp as Te, bq as Se, br as we, bs as xe, W as Z, v as L, bt as H, b2 as ee, o as ie, bu as Ae, O as se, Q as te, S as K, U as ne, bv as oe, bw as ae, am as Oe, aw as ke, an as Ie, az as De, a7 as Ee, aq as Fe, bx as Ne, aa as Ve, by as W, au as Ke, V as Re, P as Le, c as qe, bz as ze, bA as Me, bB as Be } from "./index-C-D-m0EP.js";
3
- import { useEffect as je, useState as x, useMemo as He } from "react";
4
- import { useTranslation as z } from "react-i18next";
5
- import { useNavigate as Ue, Link as Ge } from "react-router-dom";
6
- import { S as We } from "./ScopePicker-DbxK9g9R.js";
7
- const Xe = {
1
+ import { jsx as e, jsxs as T, Fragment as H } from "react/jsx-runtime";
2
+ import { u as z, a as ce, b as _, bg as le, aA as de, K as $, an as pe, M as J, j as Q, k as me, F as X, q as G, G as ue, bh as R, bi as ye, A as Y, B as F, l as V, bj as ge, bk as Pe, bl as he, e as B, bm as U, bn as fe, bo as ve, bp as be, bq as Ce, br as Te, bs as we, bt as Se, bu as xe, X as Z, n as L, bv as j, aI as ee, I as ie, bw as Ae, Q as se, S as te, U as K, W as ne, bx as oe, by as ae, am as Ie, aw as ke, ao as De, az as Ee, a7 as Oe, ar as Fe, bz as Ne, aa as Ve, bA as W, au as Ke, V as Re, P as Le, c as ze, bB as Me, bC as Be, bD as qe } from "./index-DAVLcnp3.js";
3
+ import { useEffect as He, useState as x, useMemo as je } from "react";
4
+ import { useTranslation as M } from "react-i18next";
5
+ import { useNavigate as Ge, Link as Ue } from "react-router-dom";
6
+ import { S as We } from "./ScopePicker-lTpi2ES9.js";
7
+ const _e = {
8
8
  name: "",
9
9
  description: "",
10
10
  type: "group",
11
11
  policies: [],
12
12
  decisionStrategy: de.UNANIMOUS,
13
13
  logic: le.POSITIVE
14
- }, B = {
14
+ }, q = {
15
15
  aggregate: xe,
16
- client: we,
17
- user: Se,
16
+ client: Se,
17
+ user: we,
18
18
  "client-scope": Te,
19
- group: G,
19
+ group: U,
20
20
  regex: Ce,
21
21
  role: be,
22
22
  time: ve,
23
23
  js: fe,
24
- default: G
25
- }, _e = (a) => a in B, $e = ({
24
+ default: U
25
+ }, $e = (a) => a in q, Je = ({
26
26
  permissionClientId: a,
27
27
  providers: p,
28
- policies: w,
28
+ policies: S,
29
29
  toggleDialog: t,
30
30
  onAssign: n
31
31
  }) => {
32
- const { adminClient: o } = q(), { realmRepresentation: A } = ce(), { t: l } = z(), y = X({
32
+ const { adminClient: o } = z(), { realmRepresentation: A } = ce(), { t: l } = M(), y = _({
33
33
  mode: "onChange",
34
- defaultValues: Xe
35
- }), { addAlert: O, addError: E } = _(), { handleSubmit: b, reset: f } = y, k = A.adminPermissionsEnabled, g = pe({
34
+ defaultValues: _e
35
+ }), { addAlert: I, addError: O } = $(), { handleSubmit: b, reset: f } = y, k = A.adminPermissionsEnabled, g = pe({
36
36
  control: y.control,
37
37
  name: "type"
38
38
  });
39
39
  function r() {
40
- return g && _e(g) ? B[g] : B.default;
40
+ return g && $e(g) ? q[g] : q.default;
41
41
  }
42
42
  const m = r();
43
- je(() => {
43
+ He(() => {
44
44
  if (g) {
45
- const { name: c, description: v, decisionStrategy: I, logic: S } = y.getValues();
45
+ const { name: c, description: v, decisionStrategy: D, logic: w } = y.getValues();
46
46
  f({
47
47
  type: g,
48
48
  name: c,
49
49
  description: v,
50
- decisionStrategy: I,
51
- logic: S
50
+ decisionStrategy: D,
51
+ logic: w
52
52
  });
53
53
  }
54
54
  }, [g, f, y]);
55
55
  const u = async (c) => {
56
- const { groups: v, roles: I, policies: S, clients: D, ...s } = c, P = {
56
+ const { groups: v, roles: D, policies: w, clients: E, ...s } = c, P = {
57
57
  ...s,
58
58
  ...v && v.length > 0 && { groups: v },
59
- ...I && I.length > 0 && { roles: I },
60
- ...S && S.length > 0 && { policies: S },
59
+ ...D && D.length > 0 && { roles: D },
60
+ ...w && w.length > 0 && { policies: w },
61
61
  // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition -- clients may be undefined at runtime despite the type
62
- ...D && D.length > 0 && { clients: D },
62
+ ...E && E.length > 0 && { clients: E },
63
63
  ...s.type === "group" && (!v || v.length === 0) && { groups: [] },
64
64
  ...s.type === "client" && // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition -- clients may be undefined at runtime despite the type
65
- (!D || D.length === 0) && { clients: [] }
65
+ (!E || E.length === 0) && { clients: [] }
66
66
  };
67
67
  try {
68
68
  const d = await o.clients.createPolicy(
69
69
  { id: a, type: g },
70
70
  P
71
71
  );
72
- n(d), t(), O(l("createPolicySuccess"), M.success);
72
+ n(d), t(), I(l("createPolicySuccess"), B.success);
73
73
  } catch (d) {
74
- E("policySaveError", d);
74
+ O("policySaveError", d);
75
75
  }
76
76
  };
77
77
  return /* @__PURE__ */ e(
78
- $,
78
+ J,
79
79
  {
80
80
  "aria-label": l("createPermissionPolicy"),
81
- variant: J.medium,
81
+ variant: Q.medium,
82
82
  header: /* @__PURE__ */ e(ge, { children: /* @__PURE__ */ e(Pe, { component: he.h1, children: l("createPermissionPolicy") }) }),
83
83
  isOpen: !0,
84
84
  onClose: t,
@@ -91,16 +91,17 @@ const Xe = {
91
91
  },
92
92
  isHorizontal: !0,
93
93
  children: [
94
- /* @__PURE__ */ T(Q, { ...y, children: [
94
+ /* @__PURE__ */ T(X, { ...y, children: [
95
95
  /* @__PURE__ */ e(
96
- U,
96
+ G,
97
97
  {
98
98
  name: "name",
99
99
  label: l("name"),
100
+ labelIcon: l("policyNameHelpText"),
100
101
  rules: { required: l("required") }
101
102
  }
102
103
  ),
103
- /* @__PURE__ */ e(U, { name: "description", label: l("description") }),
104
+ /* @__PURE__ */ e(G, { name: "description", label: l("description") }),
104
105
  p.length > 0 && /* @__PURE__ */ e(
105
106
  ue,
106
107
  {
@@ -131,7 +132,7 @@ const Xe = {
131
132
  className: "pf-v5-u-mr-md",
132
133
  type: "submit",
133
134
  "data-testid": "save",
134
- isDisabled: w.length === 0 && g === "aggregate",
135
+ isDisabled: S.length === 0 && g === "aggregate",
135
136
  children: l("save")
136
137
  }
137
138
  ),
@@ -142,20 +143,20 @@ const Xe = {
142
143
  )
143
144
  }
144
145
  );
145
- }, Je = ({
146
+ }, Qe = ({
146
147
  toggleDialog: a,
147
148
  onAssign: p,
148
- open: w,
149
+ open: S,
149
150
  permissionClientId: t
150
151
  }) => {
151
- const { t: n } = z(), { adminClient: o } = q(), [A, l] = x([]), [y, O] = x(void 0), [E, b] = Z(), [f, k] = x([]);
152
+ const { t: n } = M(), { adminClient: o } = z(), [A, l] = x([]), [y, I] = x(void 0), [O, b] = Z(), [f, k] = x([]);
152
153
  L(
153
154
  () => o.clients.listPolicyProviders({
154
155
  id: t
155
156
  }),
156
157
  (r) => {
157
158
  const m = r.filter((u) => u.type !== "resource" && u.type !== "scope").map((u) => u.name).filter((u) => u !== void 0);
158
- k(H(m));
159
+ k(j(m));
159
160
  },
160
161
  [t]
161
162
  );
@@ -169,14 +170,14 @@ const Xe = {
169
170
  return u && (c.name = u), y && (c.type = y), await o.clients.listPolicies(c) || [];
170
171
  };
171
172
  return /* @__PURE__ */ e(
172
- $,
173
+ J,
173
174
  {
174
- variant: J.medium,
175
+ variant: Q.medium,
175
176
  title: n("assignExistingPolicies"),
176
- isOpen: w,
177
+ isOpen: S,
177
178
  onClose: a,
178
179
  actions: [
179
- /* @__PURE__ */ T(j, { children: [
180
+ /* @__PURE__ */ T(H, { children: [
180
181
  /* @__PURE__ */ e(
181
182
  F,
182
183
  {
@@ -218,7 +219,7 @@ const Xe = {
218
219
  se,
219
220
  {
220
221
  onSelect: (r, m) => {
221
- O(m), b();
222
+ I(m), b();
222
223
  },
223
224
  onOpenChange: b,
224
225
  toggle: (r) => /* @__PURE__ */ e(
@@ -233,13 +234,13 @@ const Xe = {
233
234
  children: y || n("allTypes")
234
235
  }
235
236
  ),
236
- isOpen: E,
237
+ isOpen: O,
237
238
  children: /* @__PURE__ */ T(te, { children: [
238
239
  /* @__PURE__ */ e(
239
240
  K,
240
241
  {
241
242
  "data-testid": "filter-type-dropdown-existingPolicies-all",
242
- onClick: () => O(void 0),
243
+ onClick: () => I(void 0),
243
244
  children: n("allTypes")
244
245
  },
245
246
  "all"
@@ -248,7 +249,7 @@ const Xe = {
248
249
  K,
249
250
  {
250
251
  "data-testid": `filter-type-dropdown-existingPolicies-${r}`,
251
- onClick: () => O(r),
252
+ onClick: () => I(r),
252
253
  children: r
253
254
  },
254
255
  r
@@ -278,19 +279,19 @@ const Xe = {
278
279
  )
279
280
  }
280
281
  );
281
- }, Qe = ({
282
+ }, Xe = ({
282
283
  permissionClientId: a,
283
284
  providers: p,
284
- policies: w,
285
+ policies: S,
285
286
  resourceType: t
286
287
  }) => {
287
- const { adminClient: n } = q(), { t: o } = z(), {
288
+ const { adminClient: n } = z(), { t: o } = M(), {
288
289
  control: A,
289
290
  getValues: l,
290
291
  setValue: y,
291
- trigger: O,
292
- formState: { errors: E }
293
- } = Oe(), b = l("policies"), [f, k] = x(!1), [g, r] = x(!1), [m, u] = x([]), [c, v] = x(void 0), [I, S] = Z();
292
+ trigger: I,
293
+ formState: { errors: O }
294
+ } = Ie(), b = l("policies"), [f, k] = x(!1), [g, r] = x(!1), [m, u] = x([]), [c, v] = x(void 0), [D, w] = Z();
294
295
  L(
295
296
  () => b && b.length > 0 ? Promise.all(
296
297
  b.map(
@@ -308,9 +309,9 @@ const Xe = {
308
309
  )
309
310
  );
310
311
  },
311
- [w]
312
+ [S]
312
313
  );
313
- const D = H(
314
+ const E = j(
314
315
  p.filter((i) => i.type !== "resource" && i.type !== "scope").map((i) => i.name)
315
316
  ), s = async (i) => {
316
317
  const h = i.map(({ policy: C }) => ({
@@ -319,7 +320,7 @@ const Xe = {
319
320
  y("policies", [
320
321
  ...l("policies") || [],
321
322
  ...h
322
- ]), await O("policies"), u([
323
+ ]), await I("policies"), u([
323
324
  ...m,
324
325
  ...i.map(({ policy: C }) => C)
325
326
  ]);
@@ -344,7 +345,7 @@ const Xe = {
344
345
  {
345
346
  label: o("policies"),
346
347
  labelIcon: /* @__PURE__ */ e(
347
- Ee,
348
+ Oe,
348
349
  {
349
350
  helpText: o("permissionPoliciesHelp"),
350
351
  fieldLabelId: "policies"
@@ -354,7 +355,7 @@ const Xe = {
354
355
  isRequired: !0,
355
356
  children: [
356
357
  /* @__PURE__ */ e(
357
- Ie,
358
+ De,
358
359
  {
359
360
  name: "policies",
360
361
  control: A,
@@ -362,9 +363,9 @@ const Xe = {
362
363
  rules: {
363
364
  validate: (i) => !i || i.length === 0 ? !1 : i.every(({ id: h }) => h && h.trim().length > 0)
364
365
  },
365
- render: () => /* @__PURE__ */ T(j, { children: [
366
+ render: () => /* @__PURE__ */ T(H, { children: [
366
367
  f && /* @__PURE__ */ e(
367
- Je,
368
+ Qe,
368
369
  {
369
370
  permissionClientId: a,
370
371
  open: f,
@@ -373,12 +374,12 @@ const Xe = {
373
374
  }
374
375
  ),
375
376
  g && /* @__PURE__ */ e(
376
- $e,
377
+ Je,
377
378
  {
378
379
  toggleDialog: () => r(!g),
379
380
  permissionClientId: a,
380
381
  providers: p,
381
- policies: w,
382
+ policies: S,
382
383
  resourceType: t,
383
384
  onAssign: async (i) => {
384
385
  await s([{ policy: i }]);
@@ -422,22 +423,22 @@ const Xe = {
422
423
  se,
423
424
  {
424
425
  onSelect: (i, h) => {
425
- v(h), S();
426
+ v(h), w();
426
427
  },
427
- onOpenChange: S,
428
+ onOpenChange: w,
428
429
  toggle: (i) => /* @__PURE__ */ e(
429
430
  ne,
430
431
  {
431
432
  ref: i,
432
433
  "data-testid": "filter-type-dropdown-existingPolicies",
433
434
  id: "toggle-id-10",
434
- onClick: S,
435
+ onClick: w,
435
436
  icon: /* @__PURE__ */ e(ae, {}),
436
437
  statusIcon: /* @__PURE__ */ e(oe, {}),
437
438
  children: c ? R(c) : o("allTypes")
438
439
  }
439
440
  ),
440
- isOpen: I,
441
+ isOpen: D,
441
442
  children: /* @__PURE__ */ T(te, { children: [
442
443
  /* @__PURE__ */ e(
443
444
  K,
@@ -448,7 +449,7 @@ const Xe = {
448
449
  },
449
450
  "all"
450
451
  ),
451
- D.map((i) => /* @__PURE__ */ e(
452
+ E.map((i) => /* @__PURE__ */ e(
452
453
  K,
453
454
  {
454
455
  "data-testid": `filter-type-dropdown-existingPolicies-${i}`,
@@ -484,17 +485,17 @@ const Xe = {
484
485
  )
485
486
  }
486
487
  ),
487
- E.policies && /* @__PURE__ */ e(De, { message: o("requiredPolicies") })
488
+ O.policies && /* @__PURE__ */ e(Ee, { message: o("requiredPolicies") })
488
489
  ]
489
490
  }
490
491
  );
491
492
  };
492
493
  function ni() {
493
- const { adminClient: a } = q(), { t: p } = z(), { realm: w, permissionClientId: t, permissionId: n, resourceType: o } = Fe(), A = Ue(), l = X(), { handleSubmit: y, reset: O } = l, { addAlert: E, addError: b } = _(), [f, k] = x(
494
+ const { adminClient: a } = z(), { t: p } = M(), { realm: S, permissionClientId: t, permissionId: n, resourceType: o } = Fe(), A = Ge(), l = _(), { handleSubmit: y, reset: I } = l, { addAlert: O, addError: b } = $(), [f, k] = x(
494
495
  n ? null : {}
495
496
  ), [g, r] = x(), [m, u] = x(), c = Ne({
496
497
  clientId: t
497
- }), v = He(
498
+ }), v = je(
498
499
  () => c.filter(({ type: s }) => s === o).flatMap(({ scopes: s = [] }) => s).map((s) => s || ""),
499
500
  [c, o]
500
501
  );
@@ -516,7 +517,7 @@ function ni() {
516
517
  (i) => i.type !== "resource" && i.type !== "scope"
517
518
  );
518
519
  r(
519
- H(
520
+ j(
520
521
  d,
521
522
  (i) => i.type
522
523
  )
@@ -557,7 +558,7 @@ function ni() {
557
558
  },
558
559
  ({ permission: s, resources: P, policies: d, scopes: i }) => {
559
560
  const h = P?.map((N) => N.name) || [], C = d?.map((N) => N.id) || [], re = i?.map((N) => N.name) || [];
560
- O({
561
+ I({
561
562
  ...s,
562
563
  resources: h,
563
564
  policies: d,
@@ -571,7 +572,7 @@ function ni() {
571
572
  },
572
573
  [t, n]
573
574
  );
574
- const I = async (s) => {
575
+ const D = async (s) => {
575
576
  try {
576
577
  const P = {
577
578
  ...s,
@@ -590,22 +591,22 @@ function ni() {
590
591
  P
591
592
  );
592
593
  k(d), A(
593
- Be({
594
- realm: w,
594
+ qe({
595
+ realm: S,
595
596
  permissionClientId: t,
596
597
  permissionId: d.id,
597
598
  resourceType: o
598
599
  })
599
600
  );
600
601
  }
601
- E(
602
+ O(
602
603
  p(n ? "updatePermissionSuccess" : "createPermissionSuccess"),
603
- M.success
604
+ B.success
604
605
  );
605
606
  } catch (P) {
606
607
  b("permissionSaveError", P);
607
608
  }
608
- }, [S, D] = Ve({
609
+ }, [w, E] = Ve({
609
610
  titleKey: "deletePermission",
610
611
  messageKey: p("deleteAdminPermissionConfirm", {
611
612
  permission: f?.name
@@ -618,9 +619,9 @@ function ni() {
618
619
  id: t,
619
620
  type: "scope",
620
621
  permissionId: n
621
- }), E(p("permissionDeletedSuccess"), M.success), A(
622
+ }), O(p("permissionDeletedSuccess"), B.success), A(
622
623
  W({
623
- realm: w,
624
+ realm: S,
624
625
  permissionClientId: t,
625
626
  tab: "permissions"
626
627
  })
@@ -630,8 +631,8 @@ function ni() {
630
631
  }
631
632
  }
632
633
  });
633
- return f === null || !g ? /* @__PURE__ */ e(Ke, {}) : /* @__PURE__ */ T(j, { children: [
634
- /* @__PURE__ */ e(D, {}),
634
+ return f === null || !g ? /* @__PURE__ */ e(Ke, {}) : /* @__PURE__ */ T(H, { children: [
635
+ /* @__PURE__ */ e(E, {}),
635
636
  /* @__PURE__ */ e(
636
637
  Re,
637
638
  {
@@ -642,7 +643,7 @@ function ni() {
642
643
  K,
643
644
  {
644
645
  "data-testid": "delete-permission",
645
- onClick: () => S(),
646
+ onClick: () => w(),
646
647
  children: p("delete")
647
648
  },
648
649
  "delete"
@@ -650,9 +651,9 @@ function ni() {
650
651
  ] : void 0
651
652
  }
652
653
  ),
653
- /* @__PURE__ */ e(Le, { variant: "light", children: /* @__PURE__ */ T(qe, { isHorizontal: !0, onSubmit: y(I), role: "anyone", children: [
654
- /* @__PURE__ */ T(Q, { ...l, children: [
655
- /* @__PURE__ */ e(ze, { clientId: t }),
654
+ /* @__PURE__ */ e(Le, { variant: "light", children: /* @__PURE__ */ T(ze, { isHorizontal: !0, onSubmit: y(D), role: "anyone", children: [
655
+ /* @__PURE__ */ T(X, { ...l, children: [
656
+ /* @__PURE__ */ e(Me, { clientId: t }),
656
657
  /* @__PURE__ */ e(
657
658
  We,
658
659
  {
@@ -660,9 +661,9 @@ function ni() {
660
661
  resourceTypeScopes: v
661
662
  }
662
663
  ),
663
- /* @__PURE__ */ e(Me, { resourceType: o }),
664
+ /* @__PURE__ */ e(Be, { resourceType: o }),
664
665
  /* @__PURE__ */ e(
665
- Qe,
666
+ Xe,
666
667
  {
667
668
  permissionClientId: t,
668
669
  providers: g,
@@ -688,11 +689,11 @@ function ni() {
688
689
  variant: "link",
689
690
  "data-testid": "cancel",
690
691
  component: (s) => /* @__PURE__ */ e(
691
- Ge,
692
+ Ue,
692
693
  {
693
694
  ...s,
694
695
  to: W({
695
- realm: w,
696
+ realm: S,
696
697
  permissionClientId: t,
697
698
  tab: "permissions"
698
699
  })
@@ -708,4 +709,4 @@ function ni() {
708
709
  export {
709
710
  ni as default
710
711
  };
711
- //# sourceMappingURL=PermissionConfigurationDetails-UjUwrvYu.js.map
712
+ //# sourceMappingURL=PermissionConfigurationDetails-n1d3Hq-O.js.map