@keycloak/keycloak-admin-ui 26.0.8 → 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-D3hVgFZr.js → CreateFlow--atMTNJc.js} +9 -9
  4. package/lib/{CreateFlow-D3hVgFZr.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-Dp7Iqxos.js → ExecutorForm-DaRc7uVA.js} +27 -27
  8. package/lib/{ExecutorForm-Dp7Iqxos.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-DPk2Gzku.js +36 -0
  12. package/lib/{NewOrganization-CQAjr9Dn.js.map → NewOrganization-DPk2Gzku.js.map} +1 -1
  13. package/lib/PageHeaderClearCachesModal.d.ts +4 -0
  14. package/lib/{PermissionDetails-xk5HiPzx.js → PermissionDetails-CnvNqBCb.js} +93 -93
  15. package/lib/{PermissionDetails-xk5HiPzx.js.map → PermissionDetails-CnvNqBCb.js.map} +1 -1
  16. package/lib/{ResourceDetails-CbJWQn4F.js → ResourceDetails-Cfnqq1uy.js} +30 -30
  17. package/lib/{ResourceDetails-CbJWQn4F.js.map → ResourceDetails-Cfnqq1uy.js.map} +1 -1
  18. package/lib/{ScopeDetails-BtYWOGtn.js → ScopeDetails-_i-3BNjz.js} +32 -32
  19. package/lib/{ScopeDetails-BtYWOGtn.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 +1 -1
  37. package/lib/events/AdminEvents.d.ts +5 -1
  38. package/lib/groups/MembershipsModal.d.ts +7 -0
  39. package/lib/identity-providers/routes/IdentityProvider.d.ts +1 -1
  40. package/lib/index-BIuvk4Xf.js +102021 -0
  41. package/lib/index-BIuvk4Xf.js.map +1 -0
  42. package/lib/index.d.ts +5 -2
  43. package/lib/keycloak-admin-ui.css +1 -0
  44. package/lib/keycloak-admin-ui.js +105 -102
  45. package/lib/organizations/routes/EditOrganization.d.ts +1 -1
  46. package/lib/permissions/PermissionsSection.d.ts +1 -0
  47. package/lib/permissions/routes/Permissions.d.ts +7 -0
  48. package/lib/permissions/routes/PermissionsTabs.d.ts +9 -0
  49. package/lib/permissions/routes.d.ts +3 -0
  50. package/lib/realm-roles/routes/RealmRole.d.ts +1 -1
  51. package/lib/realm-settings/TokensTab.d.ts +1 -2
  52. package/lib/realm-settings/routes/ThemesTab.d.ts +9 -0
  53. package/lib/realm-settings/themes/ImageUpload.d.ts +6 -0
  54. package/lib/realm-settings/themes/LogoContext.d.ts +9 -0
  55. package/lib/realm-settings/themes/PatternflyVars.d.ts +10 -0
  56. package/lib/realm-settings/themes/PreviewWindow.d.ts +5 -0
  57. package/lib/realm-settings/themes/ThemeColors.d.ts +9 -0
  58. package/lib/realm-settings/{ThemesTab.d.ts → themes/ThemeSettings.d.ts} +2 -2
  59. package/lib/realm-settings/themes/ThemesTab.d.ts +11 -0
  60. package/lib/realm-settings/user-profile/UserProfileContext.d.ts +1 -1
  61. package/lib/realm-settings/user-profile/attribute/AddTranslationsDialog.d.ts +3 -15
  62. package/lib/realm-settings/user-profile/attribute/AttributeGeneralSettings.d.ts +1 -14
  63. package/lib/realm-settings/user-profile/attribute/TranslatableField.d.ts +22 -0
  64. package/lib/theme/login.css +94 -0
  65. package/lib/user/routes/User.d.ts +1 -1
  66. package/lib/utils/useCurrentUser.d.ts +5 -5
  67. package/lib/utils/useIsAdminPermissionsClient.d.ts +1 -0
  68. package/lib/utils/useIsFeatureEnabled.d.ts +3 -1
  69. package/package.json +45 -32
  70. package/LICENSE.txt +0 -202
  71. package/lib/DetailOrganization-DUNwCft_.js +0 -130
  72. package/lib/DetailOrganization-DUNwCft_.js.map +0 -1
  73. package/lib/FlowDetails-SHMxH_Rb.js +0 -10593
  74. package/lib/FlowDetails-SHMxH_Rb.js.map +0 -1
  75. package/lib/NewOrganization-CQAjr9Dn.js +0 -36
  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-6gx7hHms.js +0 -66020
  80. package/lib/index-6gx7hHms.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,10 +1,20 @@
1
1
  {
2
- "_index-6gx7hHms.js": {
3
- "file": "index-6gx7hHms.js",
2
+ "_browser-ponyfill-uH6p8znu.js": {
3
+ "file": "browser-ponyfill-uH6p8znu.js",
4
+ "name": "browser-ponyfill",
5
+ "isDynamicEntry": true,
6
+ "imports": [
7
+ "_index-BIuvk4Xf.js"
8
+ ]
9
+ },
10
+ "_index-BIuvk4Xf.js": {
11
+ "file": "index-BIuvk4Xf.js",
4
12
  "name": "index",
5
13
  "dynamicImports": [
14
+ "_browser-ponyfill-uH6p8znu.js",
6
15
  "src/authentication/FlowDetails.tsx",
7
16
  "src/authentication/form/CreateFlow.tsx",
17
+ "src/organizations/DetailOrganization.tsx",
8
18
  "src/clients/authorization/PermissionDetails.tsx",
9
19
  "src/clients/authorization/ResourceDetails.tsx",
10
20
  "src/clients/authorization/ResourceDetails.tsx",
@@ -12,54 +22,53 @@
12
22
  "src/clients/authorization/ScopeDetails.tsx",
13
23
  "src/clients/authorization/ScopeDetails.tsx",
14
24
  "src/organizations/NewOrganization.tsx",
15
- "src/organizations/DetailOrganization.tsx",
16
25
  "src/realm-settings/ExecutorForm.tsx",
17
26
  "src/realm-settings/ExecutorForm.tsx"
18
27
  ]
19
28
  },
20
29
  "src/authentication/FlowDetails.tsx": {
21
- "file": "FlowDetails-SHMxH_Rb.js",
30
+ "file": "FlowDetails-qeT2t76N.js",
22
31
  "name": "FlowDetails",
23
32
  "src": "src/authentication/FlowDetails.tsx",
24
33
  "isDynamicEntry": true,
25
34
  "imports": [
26
- "_index-6gx7hHms.js"
35
+ "_index-BIuvk4Xf.js"
27
36
  ]
28
37
  },
29
38
  "src/authentication/form/CreateFlow.tsx": {
30
- "file": "CreateFlow-D3hVgFZr.js",
39
+ "file": "CreateFlow--atMTNJc.js",
31
40
  "name": "CreateFlow",
32
41
  "src": "src/authentication/form/CreateFlow.tsx",
33
42
  "isDynamicEntry": true,
34
43
  "imports": [
35
- "_index-6gx7hHms.js"
44
+ "_index-BIuvk4Xf.js"
36
45
  ]
37
46
  },
38
47
  "src/clients/authorization/PermissionDetails.tsx": {
39
- "file": "PermissionDetails-xk5HiPzx.js",
48
+ "file": "PermissionDetails-CnvNqBCb.js",
40
49
  "name": "PermissionDetails",
41
50
  "src": "src/clients/authorization/PermissionDetails.tsx",
42
51
  "isDynamicEntry": true,
43
52
  "imports": [
44
- "_index-6gx7hHms.js"
53
+ "_index-BIuvk4Xf.js"
45
54
  ]
46
55
  },
47
56
  "src/clients/authorization/ResourceDetails.tsx": {
48
- "file": "ResourceDetails-CbJWQn4F.js",
57
+ "file": "ResourceDetails-Cfnqq1uy.js",
49
58
  "name": "ResourceDetails",
50
59
  "src": "src/clients/authorization/ResourceDetails.tsx",
51
60
  "isDynamicEntry": true,
52
61
  "imports": [
53
- "_index-6gx7hHms.js"
62
+ "_index-BIuvk4Xf.js"
54
63
  ]
55
64
  },
56
65
  "src/clients/authorization/ScopeDetails.tsx": {
57
- "file": "ScopeDetails-BtYWOGtn.js",
66
+ "file": "ScopeDetails-_i-3BNjz.js",
58
67
  "name": "ScopeDetails",
59
68
  "src": "src/clients/authorization/ScopeDetails.tsx",
60
69
  "isDynamicEntry": true,
61
70
  "imports": [
62
- "_index-6gx7hHms.js"
71
+ "_index-BIuvk4Xf.js"
63
72
  ]
64
73
  },
65
74
  "src/index.ts": {
@@ -68,38 +77,38 @@
68
77
  "src": "src/index.ts",
69
78
  "isEntry": true,
70
79
  "imports": [
71
- "_index-6gx7hHms.js"
80
+ "_index-BIuvk4Xf.js"
72
81
  ]
73
82
  },
74
83
  "src/organizations/DetailOrganization.tsx": {
75
- "file": "DetailOrganization-DUNwCft_.js",
84
+ "file": "DetailOrganization-az4NPzMy.js",
76
85
  "name": "DetailOrganization",
77
86
  "src": "src/organizations/DetailOrganization.tsx",
78
87
  "isDynamicEntry": true,
79
88
  "imports": [
80
- "_index-6gx7hHms.js"
89
+ "_index-BIuvk4Xf.js"
81
90
  ]
82
91
  },
83
92
  "src/organizations/NewOrganization.tsx": {
84
- "file": "NewOrganization-CQAjr9Dn.js",
93
+ "file": "NewOrganization-DPk2Gzku.js",
85
94
  "name": "NewOrganization",
86
95
  "src": "src/organizations/NewOrganization.tsx",
87
96
  "isDynamicEntry": true,
88
97
  "imports": [
89
- "_index-6gx7hHms.js"
98
+ "_index-BIuvk4Xf.js"
90
99
  ]
91
100
  },
92
101
  "src/realm-settings/ExecutorForm.tsx": {
93
- "file": "ExecutorForm-Dp7Iqxos.js",
102
+ "file": "ExecutorForm-DaRc7uVA.js",
94
103
  "name": "ExecutorForm",
95
104
  "src": "src/realm-settings/ExecutorForm.tsx",
96
105
  "isDynamicEntry": true,
97
106
  "imports": [
98
- "_index-6gx7hHms.js"
107
+ "_index-BIuvk4Xf.js"
99
108
  ]
100
109
  },
101
110
  "style.css": {
102
- "file": "style.css",
111
+ "file": "keycloak-admin-ui.css",
103
112
  "src": "style.css"
104
113
  }
105
114
  }
package/lib/Banners.d.ts CHANGED
@@ -1 +1,6 @@
1
+ type EventsBannerType = "userEvents" | "adminEvents";
1
2
  export declare const Banners: () => import("react/jsx-runtime").JSX.Element | undefined;
3
+ export declare const EventsBanners: ({ type }: {
4
+ type: EventsBannerType;
5
+ }) => import("react/jsx-runtime").JSX.Element;
6
+ export {};
@@ -1,10 +1,10 @@
1
1
  import { jsxs as r, Fragment as w, jsx as t } from "react/jsx-runtime";
2
- import { u as h, a as F, U as b, b as v, V as y, P as g, F as S, c as A, N as C, j as I, A as T, e as j, B as H, t as N, d as i, f as P } from "./index-6gx7hHms.js";
3
- import { useTranslation as V } from "react-i18next";
4
- import { useNavigate as k, Link as x } from "react-router-dom";
2
+ import { u as h, a as F, B as b, b as v, V as y, P as g, F as S, c as A, N as C, $ as I, A as T, z, d as B, t as H, e as i, f as N } from "./index-BIuvk4Xf.js";
3
+ import { useTranslation as P } from "react-i18next";
4
+ import { useNavigate as V, Link as k } from "react-router-dom";
5
5
  const c = ["basic-flow", "client-flow"];
6
6
  function E() {
7
- const { adminClient: u } = h(), { t: e } = V(), d = k(), { realm: n } = F(), { addAlert: l } = b(), s = v(), { handleSubmit: m, formState: p } = s;
7
+ const { adminClient: u } = h(), { t: e } = P(), d = V(), { realm: n } = F(), { addAlert: l } = b(), s = v(), { handleSubmit: m, formState: p } = s;
8
8
  return /* @__PURE__ */ r(w, { children: [
9
9
  /* @__PURE__ */ t(y, { titleKey: "createFlow", subKey: "authenticationCreateFlowHelp" }),
10
10
  /* @__PURE__ */ t(g, { variant: "light", children: /* @__PURE__ */ t(S, { ...s, children: /* @__PURE__ */ r(
@@ -17,7 +17,7 @@ function E() {
17
17
  try {
18
18
  const { id: o } = await u.authenticationManagement.createFlow(f);
19
19
  l(e("flowCreatedSuccess"), i.success), d(
20
- P({
20
+ N({
21
21
  realm: n,
22
22
  id: o,
23
23
  usedBy: "notInUse"
@@ -50,7 +50,7 @@ function E() {
50
50
  ),
51
51
  /* @__PURE__ */ r(T, { children: [
52
52
  /* @__PURE__ */ t(
53
- j,
53
+ z,
54
54
  {
55
55
  formState: p,
56
56
  "data-testid": "create",
@@ -60,11 +60,11 @@ function E() {
60
60
  }
61
61
  ),
62
62
  /* @__PURE__ */ t(
63
- H,
63
+ B,
64
64
  {
65
65
  "data-testid": "cancel",
66
66
  variant: "link",
67
- component: (a) => /* @__PURE__ */ t(x, { ...a, to: N({ realm: n }) }),
67
+ component: (a) => /* @__PURE__ */ t(k, { ...a, to: H({ realm: n }) }),
68
68
  children: e("cancel")
69
69
  }
70
70
  )
@@ -77,4 +77,4 @@ function E() {
77
77
  export {
78
78
  E as default
79
79
  };
80
- //# sourceMappingURL=CreateFlow-D3hVgFZr.js.map
80
+ //# sourceMappingURL=CreateFlow--atMTNJc.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"CreateFlow-D3hVgFZr.js","sources":["../src/authentication/form/CreateFlow.tsx"],"sourcesContent":["import type AuthenticationFlowRepresentation from \"@keycloak/keycloak-admin-client/lib/defs/authenticationFlowRepresentation\";\nimport {\n ActionGroup,\n AlertVariant,\n Button,\n PageSection,\n} from \"@patternfly/react-core\";\nimport { FormProvider, useForm } from \"react-hook-form\";\nimport { useTranslation } from \"react-i18next\";\nimport { Link, useNavigate } from \"react-router-dom\";\nimport { FormSubmitButton, SelectControl } from \"@keycloak/keycloak-ui-shared\";\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 { toAuthentication } from \"../routes/Authentication\";\nimport { toFlow } from \"../routes/Flow\";\nimport { NameDescription } from \"./NameDescription\";\n\nconst TYPES = [\"basic-flow\", \"client-flow\"] as const;\n\nexport default function CreateFlow() {\n const { adminClient } = useAdminClient();\n\n const { t } = useTranslation();\n const navigate = useNavigate();\n const { realm } = useRealm();\n const { addAlert } = useAlerts();\n const form = useForm<AuthenticationFlowRepresentation>();\n const { handleSubmit, formState } = form;\n\n const onSubmit = async (formValues: AuthenticationFlowRepresentation) => {\n const flow = { ...formValues, builtIn: false, topLevel: true };\n\n try {\n const { id } =\n await adminClient.authenticationManagement.createFlow(flow);\n addAlert(t(\"flowCreatedSuccess\"), AlertVariant.success);\n navigate(\n toFlow({\n realm,\n id: id!,\n usedBy: \"notInUse\",\n }),\n );\n } catch (error: any) {\n addAlert(\n t(\"flowCreateError\", {\n error: error.response?.data?.errorMessage || error,\n }),\n AlertVariant.danger,\n );\n }\n };\n\n return (\n <>\n <ViewHeader titleKey=\"createFlow\" subKey=\"authenticationCreateFlowHelp\" />\n <PageSection variant=\"light\">\n <FormProvider {...form}>\n <FormAccess\n isHorizontal\n role=\"manage-authorization\"\n onSubmit={handleSubmit(onSubmit)}\n >\n <NameDescription />\n <SelectControl\n name=\"providerId\"\n label={t(\"flowType\")}\n labelIcon={t(\"topLevelFlowTypeHelp\")}\n aria-label={t(\"selectFlowType\")}\n controller={{ defaultValue: TYPES[0] }}\n options={TYPES.map((type) => ({\n key: type,\n value: t(`top-level-flow-type.${type}`),\n }))}\n />\n <ActionGroup>\n <FormSubmitButton\n formState={formState}\n data-testid=\"create\"\n allowInvalid\n allowNonDirty\n >\n {t(\"create\")}\n </FormSubmitButton>\n <Button\n data-testid=\"cancel\"\n variant=\"link\"\n component={(props) => (\n <Link {...props} to={toAuthentication({ realm })}></Link>\n )}\n >\n {t(\"cancel\")}\n </Button>\n </ActionGroup>\n </FormAccess>\n </FormProvider>\n </PageSection>\n </>\n );\n}\n"],"names":["TYPES","CreateFlow","adminClient","useAdminClient","t","useTranslation","navigate","useNavigate","realm","useRealm","addAlert","useAlerts","form","useForm","handleSubmit","formState","jsxs","Fragment","jsx","ViewHeader","PageSection","FormProvider","FormAccess","formValues","flow","id","AlertVariant","toFlow","error","NameDescription","SelectControl","type","ActionGroup","FormSubmitButton","Button","props","Link","toAuthentication"],"mappings":";;;;AAoBA,MAAMA,IAAQ,CAAC,cAAc,aAAa;AAE1C,SAAwBC,IAAa;AAC7B,QAAA,EAAE,aAAAC,MAAgBC,KAElB,EAAE,GAAAC,MAAMC,KACRC,IAAWC,KACX,EAAE,OAAAC,MAAUC,KACZ,EAAE,UAAAC,MAAaC,KACfC,IAAOC,KACP,EAAE,cAAAC,GAAc,WAAAC,EAAc,IAAAH;AA0BpC,SAEI,gBAAAI,EAAAC,GAAA,EAAA,UAAA;AAAA,IAAA,gBAAAC,EAACC,GAAW,EAAA,UAAS,cAAa,QAAO,gCAA+B;AAAA,sBACvEC,GAAY,EAAA,SAAQ,SACnB,UAAC,gBAAAF,EAAAG,GAAA,EAAc,GAAGT,GAChB,UAAA,gBAAAI;AAAA,MAACM;AAAA,MAAA;AAAA,QACC,cAAY;AAAA,QACZ,MAAK;AAAA,QACL,UAAUR,EAhCH,OAAOS,MAAiD;AACvE,gBAAMC,IAAO,EAAE,GAAGD,GAAY,SAAS,IAAO,UAAU;AAEpD,cAAA;AACF,kBAAM,EAAE,IAAAE,EAAG,IACT,MAAMvB,EAAY,yBAAyB,WAAWsB,CAAI;AAC5D,YAAAd,EAASN,EAAE,oBAAoB,GAAGsB,EAAa,OAAO,GACtDpB;AAAA,cACEqB,EAAO;AAAA,gBACL,OAAAnB;AAAA,gBACA,IA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"}
1
+ {"version":3,"file":"CreateFlow--atMTNJc.js","sources":["../src/authentication/form/CreateFlow.tsx"],"sourcesContent":["import type AuthenticationFlowRepresentation from \"@keycloak/keycloak-admin-client/lib/defs/authenticationFlowRepresentation\";\nimport {\n ActionGroup,\n AlertVariant,\n Button,\n PageSection,\n} from \"@patternfly/react-core\";\nimport { FormProvider, useForm } from \"react-hook-form\";\nimport { useTranslation } from \"react-i18next\";\nimport { Link, useNavigate } from \"react-router-dom\";\nimport { FormSubmitButton, SelectControl } from \"@keycloak/keycloak-ui-shared\";\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 { toAuthentication } from \"../routes/Authentication\";\nimport { toFlow } from \"../routes/Flow\";\nimport { NameDescription } from \"./NameDescription\";\n\nconst TYPES = [\"basic-flow\", \"client-flow\"] as const;\n\nexport default function CreateFlow() {\n const { adminClient } = useAdminClient();\n\n const { t } = useTranslation();\n const navigate = useNavigate();\n const { realm } = useRealm();\n const { addAlert } = useAlerts();\n const form = useForm<AuthenticationFlowRepresentation>();\n const { handleSubmit, formState } = form;\n\n const onSubmit = async (formValues: AuthenticationFlowRepresentation) => {\n const flow = { ...formValues, builtIn: false, topLevel: true };\n\n try {\n const { id } =\n await adminClient.authenticationManagement.createFlow(flow);\n addAlert(t(\"flowCreatedSuccess\"), AlertVariant.success);\n navigate(\n toFlow({\n realm,\n id: id!,\n usedBy: \"notInUse\",\n }),\n );\n } catch (error: any) {\n addAlert(\n t(\"flowCreateError\", {\n error: error.response?.data?.errorMessage || error,\n }),\n AlertVariant.danger,\n );\n }\n };\n\n return (\n <>\n <ViewHeader titleKey=\"createFlow\" subKey=\"authenticationCreateFlowHelp\" />\n <PageSection variant=\"light\">\n <FormProvider {...form}>\n <FormAccess\n isHorizontal\n role=\"manage-authorization\"\n onSubmit={handleSubmit(onSubmit)}\n >\n <NameDescription />\n <SelectControl\n name=\"providerId\"\n label={t(\"flowType\")}\n labelIcon={t(\"topLevelFlowTypeHelp\")}\n aria-label={t(\"selectFlowType\")}\n controller={{ defaultValue: TYPES[0] }}\n options={TYPES.map((type) => ({\n key: type,\n value: t(`top-level-flow-type.${type}`),\n }))}\n />\n <ActionGroup>\n <FormSubmitButton\n formState={formState}\n data-testid=\"create\"\n allowInvalid\n allowNonDirty\n >\n {t(\"create\")}\n </FormSubmitButton>\n <Button\n data-testid=\"cancel\"\n variant=\"link\"\n component={(props) => (\n <Link {...props} to={toAuthentication({ realm })}></Link>\n )}\n >\n {t(\"cancel\")}\n </Button>\n </ActionGroup>\n </FormAccess>\n </FormProvider>\n </PageSection>\n </>\n );\n}\n"],"names":["TYPES","CreateFlow","adminClient","useAdminClient","t","useTranslation","navigate","useNavigate","realm","useRealm","addAlert","useAlerts","form","useForm","handleSubmit","formState","jsxs","Fragment","jsx","ViewHeader","PageSection","FormProvider","FormAccess","formValues","flow","id","AlertVariant","toFlow","error","NameDescription","SelectControl","type","ActionGroup","FormSubmitButton","Button","props","Link","toAuthentication"],"mappings":";;;;AAoBA,MAAMA,IAAQ,CAAC,cAAc,aAAa;AAE1C,SAAwBC,IAAa;AAC7B,QAAA,EAAE,aAAAC,EAAY,IAAIC,EAAe,GAEjC,EAAE,GAAAC,EAAE,IAAIC,EAAe,GACvBC,IAAWC,EAAY,GACvB,EAAE,OAAAC,EAAM,IAAIC,EAAS,GACrB,EAAE,UAAAC,EAAS,IAAIC,EAAU,GACzBC,IAAOC,EAA0C,GACjD,EAAE,cAAAC,GAAc,WAAAC,EAAA,IAAcH;AA0BpC,SAEI,gBAAAI,EAAAC,GAAA,EAAA,UAAA;AAAA,IAAA,gBAAAC,EAACC,GAAW,EAAA,UAAS,cAAa,QAAO,gCAA+B;AAAA,sBACvEC,GAAY,EAAA,SAAQ,SACnB,UAAC,gBAAAF,EAAAG,GAA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A,gBAEZ,YAAE,QAAQ;AAAA,cAAA;AAAA,YACb;AAAA,YACA,gBAAAG;AAAA,cAACgB;AAAA,cAAA;AAAA,gBACC,eAAY;AAAA,gBACZ,SAAQ;AAAA,gBACR,WAAW,CAACC,MACV,gBAAAjB,EAACkB,GAAM,EAAA,GAAGD,GAAO,IAAIE,EAAiB,EAAE,OAAA7B,EAAM,CAAC,EAAG,CAAA;AAAA,gBAGnD,YAAE,QAAQ;AAAA,cAAA;AAAA,YAAA;AAAA,UACb,EACF,CAAA;AAAA,QAAA;AAAA,MAAA;AAAA,OAEJ,EACF,CAAA;AAAA,EAAA,GACF;AAEJ;"}
@@ -0,0 +1,164 @@
1
+ import { jsx as t, jsxs as c } from "react/jsx-runtime";
2
+ import { u as F, B as O, a as x, b9 as B, b as w, n as C, ba as K, P as l, F as R, bs as D, bt as V, bu as n, bv as r, c as j, bw as k, A as H, z as I, d as $, bx as G, by as M, bz as N, bA as _, bB as u, bC as q, bD as J, bE as L, bF as Q } from "./index-BIuvk4Xf.js";
3
+ import { useTranslation as U } from "react-i18next";
4
+ import { useState as W } from "react";
5
+ function et() {
6
+ const { adminClient: m } = F(), { addAlert: v, addError: h } = O(), { realm: T, realmRepresentation: g } = x(), { id: o } = B(), { t: e } = U(), a = w(), b = async (s) => {
7
+ try {
8
+ const i = q(s);
9
+ await m.organizations.updateById({ id: o }, i), v(e("organizationSaveSuccess"));
10
+ } catch (i) {
11
+ h("organizationSaveError", i);
12
+ }
13
+ };
14
+ C(
15
+ () => m.organizations.findOne({ id: o }),
16
+ (s) => {
17
+ if (!s)
18
+ throw new Error(e("notFound"));
19
+ a.reset({
20
+ ...s,
21
+ domains: s.domains?.map((i) => i.name),
22
+ attributes: Q(s.attributes)
23
+ });
24
+ },
25
+ [o]
26
+ );
27
+ const d = (s) => J(
28
+ L({
29
+ realm: T,
30
+ id: o,
31
+ tab: s
32
+ })
33
+ ), y = d("settings"), z = d("attributes"), E = d("members"), p = d("identityProviders"), f = d("events"), { hasAccess: P } = K(), [A, S] = W("adminEvents");
34
+ return /* @__PURE__ */ t(l, { variant: "light", className: "pf-v5-u-p-0", children: /* @__PURE__ */ c(R, { ...a, children: [
35
+ /* @__PURE__ */ t(D, { save: () => b(a.getValues()) }),
36
+ /* @__PURE__ */ c(
37
+ V,
38
+ {
39
+ "data-testid": "organization-tabs",
40
+ "aria-label": e("organization"),
41
+ isBox: !0,
42
+ mountOnEnter: !0,
43
+ children: [
44
+ /* @__PURE__ */ t(
45
+ n,
46
+ {
47
+ id: "settings",
48
+ "data-testid": "settingsTab",
49
+ title: /* @__PURE__ */ t(r, { children: e("settings") }),
50
+ ...y,
51
+ children: /* @__PURE__ */ t(l, { children: /* @__PURE__ */ c(
52
+ j,
53
+ {
54
+ role: "anyone",
55
+ onSubmit: a.handleSubmit(b),
56
+ isHorizontal: !0,
57
+ children: [
58
+ /* @__PURE__ */ t(k, { readOnly: !0 }),
59
+ /* @__PURE__ */ c(H, { children: [
60
+ /* @__PURE__ */ t(
61
+ I,
62
+ {
63
+ formState: a.formState,
64
+ "data-testid": "save",
65
+ children: e("save")
66
+ }
67
+ ),
68
+ /* @__PURE__ */ t(
69
+ $,
70
+ {
71
+ onClick: () => a.reset(),
72
+ "data-testid": "reset",
73
+ variant: "link",
74
+ children: e("reset")
75
+ }
76
+ )
77
+ ] })
78
+ ]
79
+ }
80
+ ) })
81
+ }
82
+ ),
83
+ /* @__PURE__ */ t(
84
+ n,
85
+ {
86
+ id: "attributes",
87
+ "data-testid": "attributeTab",
88
+ title: /* @__PURE__ */ t(r, { children: e("attributes") }),
89
+ ...z,
90
+ children: /* @__PURE__ */ t(l, { variant: "light", children: /* @__PURE__ */ t(
91
+ G,
92
+ {
93
+ form: a,
94
+ save: b,
95
+ reset: () => a.reset({
96
+ ...a.getValues()
97
+ }),
98
+ name: "attributes"
99
+ }
100
+ ) })
101
+ }
102
+ ),
103
+ /* @__PURE__ */ t(
104
+ n,
105
+ {
106
+ id: "members",
107
+ "data-testid": "membersTab",
108
+ title: /* @__PURE__ */ t(r, { children: e("members") }),
109
+ ...E,
110
+ children: /* @__PURE__ */ t(M, {})
111
+ }
112
+ ),
113
+ /* @__PURE__ */ t(
114
+ n,
115
+ {
116
+ id: "identityProviders",
117
+ "data-testid": "identityProvidersTab",
118
+ title: /* @__PURE__ */ t(r, { children: e("identityProviders") }),
119
+ ...p,
120
+ children: /* @__PURE__ */ t(N, {})
121
+ }
122
+ ),
123
+ g?.adminEventsEnabled && P("view-events") && /* @__PURE__ */ t(
124
+ n,
125
+ {
126
+ "data-testid": "admin-events-tab",
127
+ title: /* @__PURE__ */ t(r, { children: e("adminEvents") }),
128
+ ...f,
129
+ children: /* @__PURE__ */ c(
130
+ _,
131
+ {
132
+ activeKey: A,
133
+ onSelect: (s, i) => S(i),
134
+ children: [
135
+ /* @__PURE__ */ t(
136
+ n,
137
+ {
138
+ eventKey: "adminEvents",
139
+ title: /* @__PURE__ */ t(r, { children: e("adminEvents") }),
140
+ children: /* @__PURE__ */ t(u, { resourcePath: `organizations/${o}` })
141
+ }
142
+ ),
143
+ /* @__PURE__ */ t(
144
+ n,
145
+ {
146
+ eventKey: "membershipEvents",
147
+ title: /* @__PURE__ */ t(r, { children: e("membershipEvents") }),
148
+ children: /* @__PURE__ */ t(u, { resourcePath: `organizations/${o}/members` })
149
+ }
150
+ )
151
+ ]
152
+ }
153
+ )
154
+ }
155
+ )
156
+ ]
157
+ }
158
+ )
159
+ ] }) });
160
+ }
161
+ export {
162
+ et as default
163
+ };
164
+ //# sourceMappingURL=DetailOrganization-az4NPzMy.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DetailOrganization-az4NPzMy.js","sources":["../src/organizations/DetailOrganization.tsx"],"sourcesContent":["import {\n FormSubmitButton,\n useAlerts,\n useFetch,\n} from \"@keycloak/keycloak-ui-shared\";\nimport {\n ActionGroup,\n Button,\n PageSection,\n Tab,\n Tabs,\n TabTitleText,\n} from \"@patternfly/react-core\";\nimport { FormProvider, useForm } from \"react-hook-form\";\nimport { useTranslation } from \"react-i18next\";\nimport { useAdminClient } from \"../admin-client\";\nimport { FormAccess } from \"../components/form/FormAccess\";\nimport { AttributesForm } from \"../components/key-value-form/AttributeForm\";\nimport { arrayToKeyValue } from \"../components/key-value-form/key-value-convert\";\nimport {\n RoutableTabs,\n useRoutableTab,\n} from \"../components/routable-tabs/RoutableTabs\";\nimport { useRealm } from \"../context/realm-context/RealmContext\";\nimport { useParams } from \"../utils/useParams\";\nimport { DetailOrganizationHeader } from \"./DetailOraganzationHeader\";\nimport { IdentityProviders } from \"./IdentityProviders\";\nimport { Members } from \"./Members\";\nimport {\n OrganizationForm,\n OrganizationFormType,\n convertToOrg,\n} from \"./OrganizationForm\";\nimport {\n EditOrganizationParams,\n OrganizationTab,\n toEditOrganization,\n} from \"./routes/EditOrganization\";\nimport { useAccess } from \"../context/access/Access\";\nimport { AdminEvents } from \"../events/AdminEvents\";\nimport { useState } from \"react\";\n\nexport default function DetailOrganization() {\n const { adminClient } = useAdminClient();\n const { addAlert, addError } = useAlerts();\n\n const { realm, realmRepresentation } = useRealm();\n const { id } = useParams<EditOrganizationParams>();\n const { t } = useTranslation();\n\n const form = useForm<OrganizationFormType>();\n\n const save = async (org: OrganizationFormType) => {\n try {\n const organization = convertToOrg(org);\n await adminClient.organizations.updateById({ id }, organization);\n addAlert(t(\"organizationSaveSuccess\"));\n } catch (error) {\n addError(\"organizationSaveError\", error);\n }\n };\n\n useFetch(\n () => adminClient.organizations.findOne({ id }),\n (org) => {\n if (!org) {\n throw new Error(t(\"notFound\"));\n }\n form.reset({\n ...org,\n domains: org.domains?.map((d) => d.name),\n attributes: arrayToKeyValue(org.attributes),\n });\n },\n [id],\n );\n\n const useTab = (tab: OrganizationTab) =>\n useRoutableTab(\n toEditOrganization({\n realm,\n id,\n tab,\n }),\n );\n\n const settingsTab = useTab(\"settings\");\n const attributesTab = useTab(\"attributes\");\n const membersTab = useTab(\"members\");\n const identityProvidersTab = useTab(\"identityProviders\");\n const eventsTab = useTab(\"events\");\n\n const { hasAccess } = useAccess();\n const [activeEventsTab, setActiveEventsTab] = useState(\"adminEvents\");\n\n return (\n <PageSection variant=\"light\" className=\"pf-v5-u-p-0\">\n <FormProvider {...form}>\n <DetailOrganizationHeader save={() => save(form.getValues())} />\n <RoutableTabs\n data-testid=\"organization-tabs\"\n aria-label={t(\"organization\")}\n isBox\n mountOnEnter\n >\n <Tab\n id=\"settings\"\n data-testid=\"settingsTab\"\n title={<TabTitleText>{t(\"settings\")}</TabTitleText>}\n {...settingsTab}\n >\n <PageSection>\n <FormAccess\n role=\"anyone\"\n onSubmit={form.handleSubmit(save)}\n isHorizontal\n >\n <OrganizationForm readOnly />\n <ActionGroup>\n <FormSubmitButton\n formState={form.formState}\n data-testid=\"save\"\n >\n {t(\"save\")}\n </FormSubmitButton>\n <Button\n onClick={() => form.reset()}\n data-testid=\"reset\"\n variant=\"link\"\n >\n {t(\"reset\")}\n </Button>\n </ActionGroup>\n </FormAccess>\n </PageSection>\n </Tab>\n <Tab\n id=\"attributes\"\n data-testid=\"attributeTab\"\n title={<TabTitleText>{t(\"attributes\")}</TabTitleText>}\n {...attributesTab}\n >\n <PageSection variant=\"light\">\n <AttributesForm\n form={form}\n save={save}\n reset={() =>\n form.reset({\n ...form.getValues(),\n })\n }\n name=\"attributes\"\n />\n </PageSection>\n </Tab>\n <Tab\n id=\"members\"\n data-testid=\"membersTab\"\n title={<TabTitleText>{t(\"members\")}</TabTitleText>}\n {...membersTab}\n >\n <Members />\n </Tab>\n <Tab\n id=\"identityProviders\"\n data-testid=\"identityProvidersTab\"\n title={<TabTitleText>{t(\"identityProviders\")}</TabTitleText>}\n {...identityProvidersTab}\n >\n <IdentityProviders />\n </Tab>\n {realmRepresentation?.adminEventsEnabled &&\n hasAccess(\"view-events\") && (\n <Tab\n data-testid=\"admin-events-tab\"\n title={<TabTitleText>{t(\"adminEvents\")}</TabTitleText>}\n {...eventsTab}\n >\n <Tabs\n activeKey={activeEventsTab}\n onSelect={(_, key) => setActiveEventsTab(key as string)}\n >\n <Tab\n eventKey=\"adminEvents\"\n title={<TabTitleText>{t(\"adminEvents\")}</TabTitleText>}\n >\n <AdminEvents resourcePath={`organizations/${id}`} />\n </Tab>\n <Tab\n eventKey=\"membershipEvents\"\n title={<TabTitleText>{t(\"membershipEvents\")}</TabTitleText>}\n >\n <AdminEvents resourcePath={`organizations/${id}/members`} />\n </Tab>\n </Tabs>\n </Tab>\n )}\n </RoutableTabs>\n </FormProvider>\n </PageSection>\n );\n}\n"],"names":["DetailOrganization","adminClient","useAdminClient","addAlert","addError","useAlerts","realm","realmRepresentation","useRealm","id","useParams","t","useTranslation","form","useForm","save","org","organization","convertToOrg","error","useFetch","d","arrayToKeyValue","useTab","tab","useRoutableTab","toEditOrganization","settingsTab","attributesTab","membersTab","identityProvidersTab","eventsTab","hasAccess","useAccess","activeEventsTab","setActiveEventsTab","useState","jsx","PageSection","jsxs","FormProvider","DetailOrganizationHeader","RoutableTabs","Tab","TabTitleText","FormAccess","OrganizationForm","ActionGroup","FormSubmitButton","Button","AttributesForm","Members","IdentityProviders","Tabs","_","key","AdminEvents"],"mappings":";;;;AA0CA,SAAwBA,KAAqB;AACrC,QAAA,EAAE,aAAAC,EAAY,IAAIC,EAAe,GACjC,EAAE,UAAAC,GAAU,UAAAC,EAAS,IAAIC,EAAU,GAEnC,EAAE,OAAAC,GAAO,qBAAAC,EAAoB,IAAIC,EAAS,GAC1C,EAAE,IAAAC,EAAG,IAAIC,EAAkC,GAC3C,EAAE,GAAAC,EAAE,IAAIC,EAAe,GAEvBC,IAAOC,EAA8B,GAErCC,IAAO,OAAOC,MAA8B;AAC5C,QAAA;AACI,YAAAC,IAAeC,EAAaF,CAAG;AACrC,YAAMf,EAAY,cAAc,WAAW,EAAE,IAAAQ,EAAA,GAAMQ,CAAY,GACtDd,EAAAQ,EAAE,yBAAyB,CAAC;AAAA,aAC9BQ,GAAO;AACd,MAAAf,EAAS,yBAAyBe,CAAK;AA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/C,CAAE,WAAY,CAAA;AAAA,sBAAA;AAAA,oBAAA;AAAA,kBAC5D;AAAA,gBAAA;AAAA,cAAA;AAAA,YACF;AAAA,UAAA;AAAA,QACF;AAAA,MAAA;AAAA,IAAA;AAAA,EAEN,EAAA,CACF,EACF,CAAA;AAEJ;"}
@@ -1,14 +1,14 @@
1
- import { jsxs as u, Fragment as R, jsx as o } from "react/jsx-runtime";
2
- import { u as $, b9 as S, U as q, bF as J, b as Q, o as W, V as X, P as Y, c as Z, bf as _, bg as V, b6 as ee, b7 as te, b8 as oe, aP as re, F as ce, aL as ae, A as se, B as g, bG as b, d as ne } from "./index-6gx7hHms.js";
1
+ import { jsxs as u, Fragment as _, jsx as o } from "react/jsx-runtime";
2
+ import { u as q, b9 as k, B as J, bH as Q, b as U, n as W, V as X, P as Y, c as Z, bf as $, bg as V, b6 as ee, b7 as te, b8 as oe, aP as re, F as ce, aL as ae, A as se, d as g, bI as b, e as ne } from "./index-BIuvk4Xf.js";
3
3
  import { useState as l } from "react";
4
4
  import { useTranslation as ie } from "react-i18next";
5
- import { useNavigate as le, Link as F } from "react-router-dom";
6
- const I = {
5
+ import { useNavigate as le, Link as I } from "react-router-dom";
6
+ const F = {
7
7
  config: {},
8
8
  executor: ""
9
9
  };
10
10
  function ge() {
11
- const { adminClient: h } = $(), { t: a } = ie(), C = le(), { realm: d, profileName: n } = S(), { executorName: i } = S(), { addAlert: A, addError: G } = q(), [H, P] = l(!1), x = J().componentTypes?.["org.keycloak.services.clientpolicy.executor.ClientPolicyExecutorProvider"], [f, N] = l([]), [O, B] = l([]), [T, L] = l([]), [D, j] = l([]), p = Q({ defaultValues: I }), { control: w, reset: v, handleSubmit: U } = p, c = !!i, y = (e) => {
11
+ const { adminClient: h } = q(), { t: a } = ie(), C = le(), { realm: d, profileName: n } = k(), { executorName: i } = k(), { addAlert: A, addError: H } = J(), [B, P] = l(!1), f = Q().componentTypes?.["org.keycloak.services.clientpolicy.executor.ClientPolicyExecutorProvider"], [x, N] = l([]), [O, G] = l([]), [T, L] = l([]), [D, j] = l([]), p = U({ defaultValues: F }), { control: w, reset: v, handleSubmit: z } = p, c = !!i, y = (e) => {
12
12
  const r = e.find((s) => s.name === n)?.executors?.find(
13
13
  (s) => s.executor === i
14
14
  );
@@ -21,7 +21,7 @@ function ge() {
21
21
  },
22
22
  []
23
23
  );
24
- const z = async () => {
24
+ const K = async () => {
25
25
  const e = p.getValues(), t = D.map((r) => {
26
26
  if (r.name !== n)
27
27
  return r;
@@ -30,11 +30,11 @@ function ge() {
30
30
  configuration: e.config || {}
31
31
  });
32
32
  if (c) {
33
- const k = r.executors.find(
34
- (M) => M.executor === i
33
+ const S = r.executors.find(
34
+ (R) => R.executor === i
35
35
  );
36
- k.configuration = {
37
- ...k.configuration,
36
+ S.configuration = {
37
+ ...S.configuration,
38
38
  ...e.config
39
39
  };
40
40
  }
@@ -52,13 +52,13 @@ function ge() {
52
52
  ne.success
53
53
  ), C(b({ realm: d, profileName: n }));
54
54
  } catch (r) {
55
- G(c ? "updateExecutorError" : "addExecutorError", r);
55
+ H(c ? "updateExecutorError" : "addExecutorError", r);
56
56
  }
57
57
  }, m = T.find(
58
58
  (e) => e.name === n
59
- ), E = x?.find(
59
+ ), E = f?.find(
60
60
  (e) => e.id === i
61
- ), K = E?.properties.map(
61
+ ), M = E?.properties.map(
62
62
  (e) => {
63
63
  const t = c ? e.defaultValue : "";
64
64
  return {
@@ -67,7 +67,7 @@ function ge() {
67
67
  };
68
68
  }
69
69
  );
70
- return /* @__PURE__ */ u(R, { children: [
70
+ return /* @__PURE__ */ u(_, { children: [
71
71
  /* @__PURE__ */ o(
72
72
  X,
73
73
  {
@@ -85,14 +85,14 @@ function ge() {
85
85
  isReadOnly: !!m,
86
86
  children: [
87
87
  /* @__PURE__ */ o(
88
- _,
88
+ $,
89
89
  {
90
90
  label: a("executorType"),
91
91
  fieldId: "kc-executorType",
92
- labelIcon: f.length > 0 && f[0].helpText !== "" ? /* @__PURE__ */ o(
92
+ labelIcon: x.length > 0 && x[0].helpText !== "" ? /* @__PURE__ */ o(
93
93
  V,
94
94
  {
95
- helpText: f[0].helpText,
95
+ helpText: x[0].helpText,
96
96
  fieldLabelId: "executorTypeHelpText"
97
97
  }
98
98
  ) : c ? /* @__PURE__ */ o(
@@ -115,11 +115,11 @@ function ge() {
115
115
  placeholderText: "Select an executor",
116
116
  onToggle: (t) => P(t),
117
117
  onSelect: (t) => {
118
- v({ ...I, executor: t.toString() });
119
- const r = x?.filter(
118
+ v({ ...F, executor: t.toString() });
119
+ const r = f?.filter(
120
120
  (s) => s.id === t
121
121
  );
122
- N(r ?? []), B(
122
+ N(r ?? []), G(
123
123
  r?.[0].properties ?? []
124
124
  ), P(!1);
125
125
  },
@@ -127,10 +127,10 @@ function ge() {
127
127
  variant: oe.single,
128
128
  "data-testid": "executorType-select",
129
129
  "aria-label": a("executorType"),
130
- isOpen: H,
130
+ isOpen: B,
131
131
  maxHeight: 580,
132
132
  isDisabled: c,
133
- children: x?.map((t) => /* @__PURE__ */ o(
133
+ children: f?.map((t) => /* @__PURE__ */ o(
134
134
  re,
135
135
  {
136
136
  selected: t.id === e.value,
@@ -149,7 +149,7 @@ function ge() {
149
149
  /* @__PURE__ */ o(ce, { ...p, children: /* @__PURE__ */ o(
150
150
  ae,
151
151
  {
152
- properties: c ? K : O
152
+ properties: c ? M : O
153
153
  }
154
154
  ) }),
155
155
  !m && /* @__PURE__ */ u(se, { children: [
@@ -157,7 +157,7 @@ function ge() {
157
157
  g,
158
158
  {
159
159
  variant: "primary",
160
- onClick: () => U(z)(),
160
+ onClick: () => z(K)(),
161
161
  "data-testid": "addExecutor-saveBtn",
162
162
  children: a(c ? "save" : "add")
163
163
  }
@@ -167,7 +167,7 @@ function ge() {
167
167
  {
168
168
  variant: "link",
169
169
  component: (e) => /* @__PURE__ */ o(
170
- F,
170
+ I,
171
171
  {
172
172
  ...e,
173
173
  to: b({ realm: d, profileName: n })
@@ -184,7 +184,7 @@ function ge() {
184
184
  c && m && /* @__PURE__ */ o("div", { className: "kc-backToProfile", children: /* @__PURE__ */ o(
185
185
  g,
186
186
  {
187
- component: (e) => /* @__PURE__ */ o(F, { ...e, to: b({ realm: d, profileName: n }) }),
187
+ component: (e) => /* @__PURE__ */ o(I, { ...e, to: b({ realm: d, profileName: n }) }),
188
188
  variant: "primary",
189
189
  children: a("back")
190
190
  }
@@ -195,4 +195,4 @@ function ge() {
195
195
  export {
196
196
  ge as default
197
197
  };
198
- //# sourceMappingURL=ExecutorForm-Dp7Iqxos.js.map
198
+ //# sourceMappingURL=ExecutorForm-DaRc7uVA.js.map