@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.
Files changed (82) hide show
  1. package/lib/.vite/manifest.json +30 -21
  2. package/lib/Banners.d.ts +5 -0
  3. package/lib/{CreateFlow-uRG_I_sd.js → CreateFlow--atMTNJc.js} +13 -13
  4. package/lib/{CreateFlow-uRG_I_sd.js.map → CreateFlow--atMTNJc.js.map} +1 -1
  5. package/lib/DetailOrganization-az4NPzMy.js +164 -0
  6. package/lib/DetailOrganization-az4NPzMy.js.map +1 -0
  7. package/lib/{ExecutorForm-CwWVGOtW.js → ExecutorForm-DaRc7uVA.js} +27 -27
  8. package/lib/{ExecutorForm-CwWVGOtW.js.map → ExecutorForm-DaRc7uVA.js.map} +1 -1
  9. package/lib/FlowDetails-qeT2t76N.js +10786 -0
  10. package/lib/FlowDetails-qeT2t76N.js.map +1 -0
  11. package/lib/{NewOrganization-CGV9yUfa.js → NewOrganization-DPk2Gzku.js} +12 -12
  12. package/lib/{NewOrganization-CGV9yUfa.js.map → NewOrganization-DPk2Gzku.js.map} +1 -1
  13. package/lib/PageHeaderClearCachesModal.d.ts +4 -0
  14. package/lib/{PermissionDetails-CpjubjMm.js → PermissionDetails-CnvNqBCb.js} +92 -92
  15. package/lib/{PermissionDetails-CpjubjMm.js.map → PermissionDetails-CnvNqBCb.js.map} +1 -1
  16. package/lib/{ResourceDetails-BoQE7rAq.js → ResourceDetails-Cfnqq1uy.js} +34 -34
  17. package/lib/{ResourceDetails-BoQE7rAq.js.map → ResourceDetails-Cfnqq1uy.js.map} +1 -1
  18. package/lib/{ScopeDetails-CXbD9GiG.js → ScopeDetails-_i-3BNjz.js} +18 -18
  19. package/lib/{ScopeDetails-CXbD9GiG.js.map → ScopeDetails-_i-3BNjz.js.map} +1 -1
  20. package/lib/admin-client.d.ts +1 -1
  21. package/lib/browser-ponyfill-uH6p8znu.js +342 -0
  22. package/lib/browser-ponyfill-uH6p8znu.js.map +1 -0
  23. package/lib/client-scopes/routes/ClientScope.d.ts +1 -1
  24. package/lib/client-scopes/routes/Mapper.d.ts +1 -0
  25. package/lib/clients/routes/Client.d.ts +1 -1
  26. package/lib/clients/routes/Mapper.d.ts +1 -0
  27. package/lib/components/dynamic/IntComponent.d.ts +2 -0
  28. package/lib/components/dynamic/NumberComponent.d.ts +2 -0
  29. package/lib/components/dynamic/components.d.ts +5 -1
  30. package/lib/components/json-file-upload/FileUploadForm.d.ts +2 -3
  31. package/lib/components/role-mapping/RoleMapping.d.ts +1 -1
  32. package/lib/context/RecentRealms.d.ts +1 -1
  33. package/lib/context/access/Access.d.ts +1 -1
  34. package/lib/context/realm-context/RealmContext.d.ts +1 -1
  35. package/lib/context/server-info/ServerInfoProvider.d.ts +1 -1
  36. package/lib/context/whoami/WhoAmI.d.ts +2 -1
  37. package/lib/events/AdminEvents.d.ts +5 -1
  38. package/lib/events/UserEvents.d.ts +6 -0
  39. package/lib/groups/MembershipsModal.d.ts +7 -0
  40. package/lib/identity-providers/routes/IdentityProvider.d.ts +1 -1
  41. package/lib/index-BIuvk4Xf.js +102021 -0
  42. package/lib/index-BIuvk4Xf.js.map +1 -0
  43. package/lib/index.d.ts +6 -2
  44. package/lib/keycloak-admin-ui.css +1 -0
  45. package/lib/keycloak-admin-ui.js +264 -259
  46. package/lib/organizations/routes/EditOrganization.d.ts +1 -1
  47. package/lib/permissions/PermissionsSection.d.ts +1 -0
  48. package/lib/permissions/routes/Permissions.d.ts +7 -0
  49. package/lib/permissions/routes/PermissionsTabs.d.ts +9 -0
  50. package/lib/permissions/routes.d.ts +3 -0
  51. package/lib/realm-roles/routes/RealmRole.d.ts +1 -1
  52. package/lib/realm-settings/TokensTab.d.ts +1 -2
  53. package/lib/realm-settings/routes/ThemesTab.d.ts +9 -0
  54. package/lib/realm-settings/themes/ImageUpload.d.ts +6 -0
  55. package/lib/realm-settings/themes/LogoContext.d.ts +9 -0
  56. package/lib/realm-settings/themes/PatternflyVars.d.ts +10 -0
  57. package/lib/realm-settings/themes/PreviewWindow.d.ts +5 -0
  58. package/lib/realm-settings/themes/ThemeColors.d.ts +9 -0
  59. package/lib/realm-settings/{ThemesTab.d.ts → themes/ThemeSettings.d.ts} +2 -2
  60. package/lib/realm-settings/themes/ThemesTab.d.ts +11 -0
  61. package/lib/realm-settings/user-profile/UserProfileContext.d.ts +1 -1
  62. package/lib/realm-settings/user-profile/attribute/AddTranslationsDialog.d.ts +3 -15
  63. package/lib/realm-settings/user-profile/attribute/AttributeGeneralSettings.d.ts +1 -14
  64. package/lib/realm-settings/user-profile/attribute/TranslatableField.d.ts +22 -0
  65. package/lib/theme/login.css +94 -0
  66. package/lib/user/routes/User.d.ts +1 -1
  67. package/lib/utils/useCurrentUser.d.ts +5 -5
  68. package/lib/utils/useIsAdminPermissionsClient.d.ts +1 -0
  69. package/lib/utils/useIsFeatureEnabled.d.ts +3 -1
  70. package/package.json +45 -32
  71. package/LICENSE.txt +0 -202
  72. package/lib/DetailOrganization-CqbiK2-2.js +0 -130
  73. package/lib/DetailOrganization-CqbiK2-2.js.map +0 -1
  74. package/lib/FlowDetails-CRuEMqzE.js +0 -10593
  75. package/lib/FlowDetails-CRuEMqzE.js.map +0 -1
  76. package/lib/components/json-file-upload/patternfly/FileUpload.d.ts +0 -73
  77. package/lib/components/json-file-upload/patternfly/FileUploadField.d.ts +0 -67
  78. package/lib/components/json-file-upload/patternfly/fileUtils.d.ts +0 -12
  79. package/lib/index-WPS7MqzE.js +0 -65977
  80. package/lib/index-WPS7MqzE.js.map +0 -1
  81. package/lib/style.css +0 -1
  82. /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 h, $ as z, a as b, b as f, V as p, P as S, c as A, F, bw as O, A as w, X as y, B as C, bE as E, bA as x, bC as P } from "./index-WPS7MqzE.js";
3
- import { useTranslation as j } from "react-i18next";
4
- import { useNavigate as k, Link as B } from "react-router-dom";
5
- function $() {
6
- const { adminClient: s } = h(), { addAlert: c, addError: d } = z(), { t } = j(), m = k(), { realm: e } = b(), i = f({ mode: "onChange" }), { handleSubmit: l, formState: g } = i;
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(A, { role: "anyone", onSubmit: l(async (n) => {
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(P({ realm: e, id: u, tab: "settings" }));
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(F, { ...i, children: [
17
- /* @__PURE__ */ a(O, {}),
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(B, { ...n, to: E({ realm: e }) }),
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
- $ as default
34
+ K as default
35
35
  };
36
- //# sourceMappingURL=NewOrganization-CGV9yUfa.js.map
36
+ //# sourceMappingURL=NewOrganization-DPk2Gzku.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"NewOrganization-CGV9yUfa.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,MAAgBC,KAClB,EAAE,UAAAC,GAAU,UAAAC,EAAS,IAAIC,EAAU,GACnC,EAAE,MAAMC,KACRC,IAAWC,KACX,EAAE,OAAAC,MAAUC,KACZC,IAAOC,EAAQ,EAAE,MAAM,WAAY,CAAA,GACnC,EAAE,cAAAC,GAAc,WAAAC,EAAc,IAAAH;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,WAAY,CAAA,CAAC;AAAA,eACpDE,GAAO;AACd,QAAAtB,EAAS,yBAAyBsB,CAAK;AAAA,MACzC;AAAA,IAAA,CAOyD,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,QACb;AAAA,MAAA,GACF;AAAA,IAAA,EACF,CAAA,EACF,CAAA,GACF;AAAA,EACF,EAAA,CAAA;AAEJ;"}
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;"}
@@ -0,0 +1,4 @@
1
+ export type ClearCachesModalProps = {
2
+ onClose: () => void;
3
+ };
4
+ export declare const PageHeaderClearCachesModal: ({ onClose, }: ClearCachesModalProps) => import("react/jsx-runtime").JSX.Element;
@@ -1,22 +1,22 @@
1
- import { jsx as s, jsxs as v, Fragment as B } from "react/jsx-runtime";
2
- import { u as G, b5 as _, m as K, b6 as J, b7 as W, b8 as N, aP as Y, b as X, b9 as Z, $ as ee, ba as se, aY as ae, g as H, d as k, bb as j, bc as ie, bd as oe, V as te, be as re, aG as ne, P as le, c as ce, F as de, Q as z, aJ as pe, bf as C, bg as P, bh as ue, bi as E, bj as $, bk as M, R as me, A as be, B as U, bl as fe } from "./index-WPS7MqzE.js";
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 Q } from "react-i18next";
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 } = G(), { t: R } = Q(), {
11
+ const { adminClient: h } = K(), { t: R } = $(), {
12
12
  control: F,
13
- getValues: O,
13
+ getValues: V,
14
14
  setValue: A,
15
- formState: { errors: r }
16
- } = _(), [m, n] = f([]), [a, g] = f(
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 = O("scopes"), q = (l) => l.map((t) => /* @__PURE__ */ s(Y, { value: t, children: t.name }, t.id));
19
- return K(
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
- n(l), p || g(
31
- l.filter((t) => x?.includes(t.id))
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
- J,
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
- W,
43
+ Y,
44
44
  {
45
45
  toggleId: "scopes",
46
- variant: N.typeaheadMulti,
47
- onToggle: (t) => D(t),
48
- onFilter: (t) => (b(t), q(m)),
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((t) => t.name),
53
- onSelect: (t) => {
54
- const T = typeof t == "string" ? a.find((d) => d.name === t) : t, w = a.find((d) => d.id === T.id) ? a.filter((d) => d.id !== T.id) : [...a, T];
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: r.scopes ? "error" : "default",
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 } = G(), { t: e } = Q(), u = X({
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: O
76
- } = u, A = ge(), { id: r, realm: m, permissionType: n, 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
- K(
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, o, L, V] = await Promise.all([
81
+ const [i, t, L, O] = await Promise.all([
82
82
  c.clients.findOnePermission({
83
- id: r,
84
- type: n,
83
+ id: n,
84
+ type: r,
85
85
  permissionId: a
86
86
  }),
87
87
  c.clients.getAssociatedResources({
88
- id: r,
88
+ id: n,
89
89
  permissionId: a
90
90
  }),
91
91
  c.clients.getAssociatedPolicies({
92
- id: r,
92
+ id: n,
93
93
  permissionId: a
94
94
  }),
95
95
  c.clients.getAssociatedScopes({
96
- id: r,
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: o.map((I) => I._id),
104
+ resources: t.map((I) => I._id),
105
105
  policies: L.map((I) => I.id),
106
- scopes: V.map((I) => I.id)
106
+ scopes: O.map((I) => I.id)
107
107
  };
108
108
  },
109
- ({ permission: i, resources: o, policies: L, scopes: V }) => {
110
- R({ ...i, resources: o, policies: L, scopes: V }), i && "resourceType" in i && x(
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: o, policies: L });
112
+ ), D({ ...i, resources: t, policies: L });
113
113
  },
114
114
  []
115
115
  );
116
- const t = async (i) => {
116
+ const o = async (i) => {
117
117
  try {
118
118
  if (a)
119
119
  await c.clients.updatePermission(
120
- { id: r, type: n, permissionId: a },
120
+ { id: n, type: r, permissionId: a },
121
121
  i
122
122
  );
123
123
  else {
124
- const o = await c.clients.createPermission(
125
- { id: r, type: n },
124
+ const t = await c.clients.createPermission(
125
+ { id: n, type: r },
126
126
  i
127
127
  );
128
- D(o), A(
128
+ D(t), A(
129
129
  fe({
130
130
  realm: m,
131
- id: r,
132
- permissionType: n,
133
- permissionId: o.id
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
- k.success
139
+ j.success
140
140
  );
141
- } catch (o) {
142
- b("permissionSaveError", o);
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: r,
155
- type: n,
154
+ id: n,
155
+ type: r,
156
156
  permissionId: a
157
- }), p(e("permissionDeletedSuccess"), k.success), A(
158
- j({ realm: m, clientId: r, tab: "permissions" })
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(B, { children: [
169
+ return y ? /* @__PURE__ */ v(N, { children: [
170
170
  /* @__PURE__ */ s(w, {}),
171
171
  /* @__PURE__ */ s(
172
- te,
172
+ oe,
173
173
  {
174
- titleKey: a ? y.name : `create${re(n)}BasedPermission`,
174
+ titleKey: a ? y.name : `create${ne(r)}BasedPermission`,
175
175
  dropdownItems: a ? [
176
176
  /* @__PURE__ */ s(
177
- ne,
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: O(t),
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
- C,
222
+ P,
223
223
  {
224
224
  label: e("applyToResourceTypeFlag"),
225
225
  fieldId: "applyToResourceTypeFlag",
226
226
  labelIcon: /* @__PURE__ */ s(
227
- P,
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, o) => x(o),
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: n === "scope",
255
+ value: r === "scope",
256
256
  message: e("required")
257
257
  }
258
258
  }
259
259
  }
260
260
  ) : /* @__PURE__ */ v(
261
- C,
261
+ P,
262
262
  {
263
263
  label: e("resource"),
264
264
  fieldId: "resources",
265
265
  labelIcon: /* @__PURE__ */ s(
266
- P,
266
+ C,
267
267
  {
268
268
  helpText: e("permissionResources"),
269
269
  fieldLabelId: "resources"
270
270
  }
271
271
  ),
272
- isRequired: n !== "scope",
272
+ isRequired: r !== "scope",
273
273
  children: [
274
274
  /* @__PURE__ */ s(
275
275
  E,
276
276
  {
277
277
  name: "resources",
278
- clientId: r,
278
+ clientId: n,
279
279
  permissionId: a,
280
- preSelected: n === "scope" ? void 0 : g,
281
- variant: n === "scope" ? N.typeahead : N.typeaheadMulti,
282
- isRequired: n !== "scope"
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($, { message: e("required") })
285
+ F.resources && /* @__PURE__ */ s(M, { message: e("required") })
286
286
  ]
287
287
  }
288
288
  ),
289
- n === "scope" && /* @__PURE__ */ v(
290
- C,
289
+ r === "scope" && /* @__PURE__ */ v(
290
+ P,
291
291
  {
292
292
  label: e("authorizationScopes"),
293
293
  fieldId: "scopes",
294
294
  labelIcon: /* @__PURE__ */ s(
295
- P,
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: r,
306
+ clientId: n,
307
307
  resourceId: d?.[0],
308
308
  preSelected: g
309
309
  }
310
310
  ),
311
- F.scopes && /* @__PURE__ */ s($, { message: e("required") })
311
+ F.scopes && /* @__PURE__ */ s(M, { message: e("required") })
312
312
  ]
313
313
  }
314
314
  ),
315
315
  /* @__PURE__ */ s(
316
- C,
316
+ P,
317
317
  {
318
318
  label: e("policies"),
319
319
  fieldId: "policies",
320
320
  labelIcon: /* @__PURE__ */ s(
321
- P,
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: r,
331
+ clientId: n,
332
332
  permissionId: a
333
333
  }
334
334
  )
335
335
  }
336
336
  ),
337
337
  /* @__PURE__ */ s(
338
- C,
338
+ P,
339
339
  {
340
340
  label: e("decisionStrategy"),
341
341
  labelIcon: /* @__PURE__ */ s(
342
- P,
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
- J,
351
+ W,
352
352
  {
353
353
  name: "decisionStrategy",
354
354
  "data-testid": "decisionStrategy",
355
- defaultValue: M.UNANIMOUS,
355
+ defaultValue: U.UNANIMOUS,
356
356
  control: h,
357
- render: ({ field: i }) => /* @__PURE__ */ s(B, { children: Object.values(M).map((o) => /* @__PURE__ */ s(
357
+ render: ({ field: i }) => /* @__PURE__ */ s(N, { children: Object.values(U).map((t) => /* @__PURE__ */ s(
358
358
  me,
359
359
  {
360
- id: o,
361
- "data-testid": o,
362
- isChecked: i.value === o,
360
+ id: t,
361
+ "data-testid": t,
362
+ isChecked: i.value === t,
363
363
  isDisabled: l,
364
364
  name: "decisionStrategies",
365
- onChange: () => i.onChange(o),
366
- label: e(`decisionStrategies.${o}`),
365
+ onChange: () => i.onChange(t),
366
+ label: e(`decisionStrategies.${t}`),
367
367
  className: "pf-v5-u-mb-md"
368
368
  },
369
- o
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
- U,
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
- U,
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: j({
394
+ to: k({
395
395
  realm: m,
396
- clientId: r,
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(oe, {});
408
+ ] }) : /* @__PURE__ */ s(te, {});
409
409
  }
410
410
  export {
411
411
  Re as default
412
412
  };
413
- //# sourceMappingURL=PermissionDetails-CpjubjMm.js.map
413
+ //# sourceMappingURL=PermissionDetails-CnvNqBCb.js.map