@keycloak/keycloak-admin-ui 26.1.5 → 26.2.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 (103) hide show
  1. package/README.md +4 -4
  2. package/lib/.vite/manifest.json +51 -30
  3. package/lib/{CreateFlow-CJuPGQV2.js → CreateFlow-C8ou3z3D.js} +9 -9
  4. package/lib/{CreateFlow-CJuPGQV2.js.map → CreateFlow-C8ou3z3D.js.map} +1 -1
  5. package/lib/{DetailOrganization-BZxym2fM.js → DetailOrganization-ChDFPj6w.js} +33 -33
  6. package/lib/{DetailOrganization-BZxym2fM.js.map → DetailOrganization-ChDFPj6w.js.map} +1 -1
  7. package/lib/{ExecutorForm-DxyNT3T5.js → ExecutorForm-CqhYZ9zD.js} +58 -57
  8. package/lib/ExecutorForm-CqhYZ9zD.js.map +1 -0
  9. package/lib/FlowDetails-BYnrUM6B.js +9025 -0
  10. package/lib/FlowDetails-BYnrUM6B.js.map +1 -0
  11. package/lib/NewOrganization-IjGiIFRg.js +36 -0
  12. package/lib/{NewOrganization-CdgyibqF.js.map → NewOrganization-IjGiIFRg.js.map} +1 -1
  13. package/lib/PermissionConfigurationDetails-B_xt8b5a.js +702 -0
  14. package/lib/PermissionConfigurationDetails-B_xt8b5a.js.map +1 -0
  15. package/lib/{PermissionDetails-lynVHdOa.js → PermissionDetails-FszJtVpG.js} +60 -60
  16. package/lib/{PermissionDetails-lynVHdOa.js.map → PermissionDetails-FszJtVpG.js.map} +1 -1
  17. package/lib/RealmSection-BkVmYRIb.js +179 -0
  18. package/lib/RealmSection-BkVmYRIb.js.map +1 -0
  19. package/lib/ResourceDetails-Br81AEgO.js +226 -0
  20. package/lib/ResourceDetails-Br81AEgO.js.map +1 -0
  21. package/lib/{ScopeDetails-plfHXCXz.js → ScopeDetails-nDvWwhgg.js} +35 -35
  22. package/lib/{ScopeDetails-plfHXCXz.js.map → ScopeDetails-nDvWwhgg.js.map} +1 -1
  23. package/lib/ScopePicker-kvjSuh0C.js +85 -0
  24. package/lib/ScopePicker-kvjSuh0C.js.map +1 -0
  25. package/lib/authentication/components/AuthenticationProviderContext.d.ts +9 -0
  26. package/lib/authentication/components/FlowRow.d.ts +1 -0
  27. package/lib/authentication/components/FlowTitle.d.ts +5 -2
  28. package/lib/clients/add/SamlSignature.d.ts +1 -0
  29. package/lib/clients/authorization/ScopePicker.d.ts +5 -2
  30. package/lib/clients/authorization/policy/LogicSelector.d.ts +1 -1
  31. package/lib/clients/authorization/policy/NameDescription.d.ts +3 -2
  32. package/lib/clients/routes/PermissionConfigurationDetails.d.ts +10 -0
  33. package/lib/components/client/ClientSelect.d.ts +4 -2
  34. package/lib/components/dynamic/BooleanComponent.d.ts +1 -1
  35. package/lib/components/dynamic/DynamicComponents.d.ts +2 -1
  36. package/lib/components/dynamic/FileComponent.d.ts +1 -1
  37. package/lib/components/dynamic/GroupComponent.d.ts +1 -1
  38. package/lib/components/dynamic/IntComponent.d.ts +1 -1
  39. package/lib/components/dynamic/ListComponent.d.ts +1 -1
  40. package/lib/components/dynamic/MapComponent.d.ts +1 -1
  41. package/lib/components/dynamic/MultivaluedListComponent.d.ts +1 -1
  42. package/lib/components/dynamic/MultivaluedStringComponent.d.ts +1 -1
  43. package/lib/components/dynamic/NumberComponent.d.ts +1 -1
  44. package/lib/components/dynamic/PasswordComponent.d.ts +1 -1
  45. package/lib/components/dynamic/RoleComponent.d.ts +1 -1
  46. package/lib/components/dynamic/ScriptComponent.d.ts +1 -1
  47. package/lib/components/dynamic/StringComponent.d.ts +1 -1
  48. package/lib/components/dynamic/TextComponent.d.ts +1 -1
  49. package/lib/components/dynamic/UserProfileAttributeListComponent.d.ts +1 -1
  50. package/lib/components/dynamic/components.d.ts +1 -0
  51. package/lib/components/form/CodeEditor.d.ts +12 -0
  52. package/lib/components/role-mapping/AddRoleMappingModal.d.ts +3 -2
  53. package/lib/components/users/UserSelect.d.ts +1 -1
  54. package/lib/context/RecentRealms.d.ts +6 -2
  55. package/lib/i18n/i18n.d.ts +4 -0
  56. package/lib/{index-lFXE1rYJ.js → index-CRHbhwXr.js} +36043 -36047
  57. package/lib/{index-lFXE1rYJ.js.map → index-CRHbhwXr.js.map} +1 -1
  58. package/lib/index.d.ts +1 -2
  59. package/lib/keycloak-admin-ui.css +1 -1
  60. package/lib/keycloak-admin-ui.js +162 -163
  61. package/lib/organizations/IdentityProviderSelect.d.ts +1 -1
  62. package/lib/permissions-configuration/PermissionsConfigurationSection.d.ts +1 -0
  63. package/lib/permissions-configuration/permission-configuration/AssignedPolicies.d.ts +10 -0
  64. package/lib/permissions-configuration/permission-configuration/AuthorizationScopesDetails.d.ts +10 -0
  65. package/lib/permissions-configuration/permission-configuration/ExistingPoliciesDialog.d.ts +10 -0
  66. package/lib/permissions-configuration/permission-configuration/NewPermissionConfigurationDialog.d.ts +8 -0
  67. package/lib/permissions-configuration/permission-configuration/NewPermissionPolicyDialog.d.ts +13 -0
  68. package/lib/permissions-configuration/permission-configuration/PermissionConfigurationDetails.d.ts +1 -0
  69. package/lib/permissions-configuration/permission-configuration/PermissionsConfigurationTab.d.ts +5 -0
  70. package/lib/permissions-configuration/permission-evaluation/PermissionEvaluationResult.d.ts +6 -0
  71. package/lib/permissions-configuration/permission-evaluation/PermissionsEvaluationTab.d.ts +8 -0
  72. package/lib/permissions-configuration/resource-types/GroupSelect.d.ts +7 -0
  73. package/lib/permissions-configuration/resource-types/ResourceType.d.ts +11 -0
  74. package/lib/permissions-configuration/resource-types/RoleSelect.d.ts +6 -0
  75. package/lib/permissions-configuration/resource-types/SearchDropdown.d.ts +20 -0
  76. package/lib/permissions-configuration/routes/NewPermissionConfiguration.d.ts +9 -0
  77. package/lib/permissions-configuration/routes/NewPermissionPolicy.d.ts +9 -0
  78. package/lib/permissions-configuration/routes/PermissionConfigurationDetails.d.ts +10 -0
  79. package/lib/permissions-configuration/routes/PermissionPolicyDetails.d.ts +10 -0
  80. package/lib/permissions-configuration/routes/PermissionsConfiguration.d.ts +7 -0
  81. package/lib/permissions-configuration/routes/PermissionsConfigurationTabs.d.ts +10 -0
  82. package/lib/permissions-configuration/routes/PermissionsPolicies.d.ts +8 -0
  83. package/lib/realm/RealmRoutes.d.ts +7 -0
  84. package/lib/realm/RealmSection.d.ts +5 -0
  85. package/lib/realm/add/NewRealmForm.d.ts +5 -1
  86. package/lib/realm-settings/themes/ThemesTab.d.ts +1 -0
  87. package/lib/utils/useIsFeatureEnabled.d.ts +2 -1
  88. package/lib/utils/useSortedResourceTypes.d.ts +5 -0
  89. package/package.json +26 -37
  90. package/lib/ExecutorForm-DxyNT3T5.js.map +0 -1
  91. package/lib/FlowDetails-ChnCh0MX.js +0 -10786
  92. package/lib/FlowDetails-ChnCh0MX.js.map +0 -1
  93. package/lib/NewOrganization-CdgyibqF.js +0 -36
  94. package/lib/ResourceDetails-BBY9AcKD.js +0 -286
  95. package/lib/ResourceDetails-BBY9AcKD.js.map +0 -1
  96. package/lib/browser-ponyfill-CTSSxZf6.js +0 -342
  97. package/lib/browser-ponyfill-CTSSxZf6.js.map +0 -1
  98. package/lib/components/realm-selector/RealmSelector.d.ts +0 -1
  99. package/lib/permissions/PermissionsSection.d.ts +0 -1
  100. package/lib/permissions/routes/Permissions.d.ts +0 -7
  101. package/lib/permissions/routes/PermissionsTabs.d.ts +0 -9
  102. package/lib/realm/routes/AddRealm.d.ts +0 -7
  103. /package/lib/{permissions → permissions-configuration}/routes.d.ts +0 -0
@@ -1,83 +1,83 @@
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-lFXE1rYJ.js";
1
+ import { jsxs as u, Fragment as R, jsx as o } from "react/jsx-runtime";
2
+ import { u as J, ao as V, V as Q, b7 as U, b as W, n as X, c as Y, P as Z, d as _, at as $, al as ee, am as te, an as oe, a4 as re, a7 as k, F as ae, a0 as ce, A as se, B as g, b8 as h, e as ne } from "./index-CRHbhwXr.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 I } from "react-router-dom";
6
- const F = {
5
+ import { useNavigate as le, Link as F } from "react-router-dom";
6
+ const I = {
7
7
  config: {},
8
8
  executor: ""
9
9
  };
10
10
  function ge() {
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) => {
11
+ const { adminClient: P } = J(), { t: c } = ie(), C = le(), { realm: d, profileName: n } = V(), { executorName: i } = V(), { addAlert: A, addError: H } = Q(), [N, T] = l(!1), x = U().componentTypes?.["org.keycloak.services.clientpolicy.executor.ClientPolicyExecutorProvider"], [f, O] = l([]), [B, G] = l([]), [v, D] = l([]), [L, j] = l([]), p = W({ defaultValues: I }), { control: w, reset: y, handleSubmit: q } = p, a = !!i, E = (e) => {
12
12
  const r = e.find((s) => s.name === n)?.executors?.find(
13
13
  (s) => s.executor === i
14
14
  );
15
- r && v({ config: r.configuration });
15
+ r && y({ config: r.configuration });
16
16
  };
17
- W(
18
- () => h.clientPolicies.listProfiles({ includeGlobalProfiles: !0 }),
17
+ X(
18
+ () => P.clientPolicies.listProfiles({ includeGlobalProfiles: !0 }),
19
19
  (e) => {
20
- L(e.globalProfiles), j(e.profiles), y(e.profiles), y(e.globalProfiles);
20
+ D(e.globalProfiles), j(e.profiles), E(e.profiles), E(e.globalProfiles);
21
21
  },
22
22
  []
23
23
  );
24
- const K = async () => {
25
- const e = p.getValues(), t = D.map((r) => {
24
+ const z = async () => {
25
+ const e = p.getValues(), t = L.map((r) => {
26
26
  if (r.name !== n)
27
27
  return r;
28
28
  const s = (r.executors ?? []).concat({
29
29
  executor: e.executor,
30
30
  configuration: e.config || {}
31
31
  });
32
- if (c) {
32
+ if (a) {
33
33
  const S = r.executors.find(
34
- (R) => R.executor === i
34
+ (M) => M.executor === i
35
35
  );
36
36
  S.configuration = {
37
37
  ...S.configuration,
38
38
  ...e.config
39
39
  };
40
40
  }
41
- return c ? r : {
41
+ return a ? r : {
42
42
  ...r,
43
43
  executors: s
44
44
  };
45
45
  });
46
46
  try {
47
- await h.clientPolicies.createProfiles({
47
+ await P.clientPolicies.createProfiles({
48
48
  profiles: t,
49
- globalProfiles: T
49
+ globalProfiles: v
50
50
  }), A(
51
- a(c ? "updateExecutorSuccess" : "addExecutorSuccess"),
51
+ c(a ? "updateExecutorSuccess" : "addExecutorSuccess"),
52
52
  ne.success
53
- ), C(b({ realm: d, profileName: n }));
53
+ ), C(h({ realm: d, profileName: n }));
54
54
  } catch (r) {
55
- H(c ? "updateExecutorError" : "addExecutorError", r);
55
+ H(a ? "updateExecutorError" : "addExecutorError", r);
56
56
  }
57
- }, m = T.find(
57
+ }, m = v.find(
58
58
  (e) => e.name === n
59
- ), E = f?.find(
59
+ ), b = x?.find(
60
60
  (e) => e.id === i
61
- ), M = E?.properties.map(
61
+ ), K = b?.properties.map(
62
62
  (e) => {
63
- const t = c ? e.defaultValue : "";
63
+ const t = a ? e.defaultValue : "";
64
64
  return {
65
65
  ...e,
66
66
  defaultValue: t
67
67
  };
68
68
  }
69
69
  );
70
- return /* @__PURE__ */ u(_, { children: [
70
+ return /* @__PURE__ */ u(R, { children: [
71
71
  /* @__PURE__ */ o(
72
- X,
72
+ Y,
73
73
  {
74
- titleKey: c ? i : a("addExecutor"),
74
+ titleKey: a ? i : c("addExecutor"),
75
75
  divider: !0
76
76
  }
77
77
  ),
78
- /* @__PURE__ */ u(Y, { variant: "light", children: [
78
+ /* @__PURE__ */ u(Z, { variant: "light", children: [
79
79
  /* @__PURE__ */ u(
80
- Z,
80
+ _,
81
81
  {
82
82
  isHorizontal: !0,
83
83
  role: "manage-realm",
@@ -87,18 +87,18 @@ function ge() {
87
87
  /* @__PURE__ */ o(
88
88
  $,
89
89
  {
90
- label: a("executorType"),
90
+ label: c("executorType"),
91
91
  fieldId: "kc-executorType",
92
- labelIcon: x.length > 0 && x[0].helpText !== "" ? /* @__PURE__ */ o(
93
- V,
92
+ labelIcon: f.length > 0 && f[0].helpText !== "" ? /* @__PURE__ */ o(
93
+ k,
94
94
  {
95
- helpText: x[0].helpText,
95
+ helpText: f[0].helpText,
96
96
  fieldLabelId: "executorTypeHelpText"
97
97
  }
98
- ) : c ? /* @__PURE__ */ o(
99
- V,
98
+ ) : a ? /* @__PURE__ */ o(
99
+ k,
100
100
  {
101
- helpText: E?.helpText,
101
+ helpText: b?.helpText,
102
102
  fieldLabelId: "executorTypeHelpText"
103
103
  }
104
104
  ) : void 0,
@@ -113,26 +113,27 @@ function ge() {
113
113
  {
114
114
  toggleId: "kc-executor",
115
115
  placeholderText: "Select an executor",
116
- onToggle: (t) => P(t),
116
+ onToggle: (t) => T(t),
117
117
  onSelect: (t) => {
118
- v({ ...F, executor: t.toString() });
119
- const r = f?.filter(
118
+ y({ ...I, executor: t.toString() });
119
+ const r = x?.filter(
120
120
  (s) => s.id === t
121
121
  );
122
- N(r ?? []), G(
122
+ O(r ?? []), G(
123
123
  r?.[0].properties ?? []
124
- ), P(!1);
124
+ ), T(!1);
125
125
  },
126
- selections: c ? i : e.value,
126
+ selections: a ? i : e.value,
127
127
  variant: oe.single,
128
128
  "data-testid": "executorType-select",
129
- "aria-label": a("executorType"),
130
- isOpen: B,
129
+ "aria-label": c("executorType"),
130
+ isOpen: N,
131
131
  maxHeight: 580,
132
- isDisabled: c,
133
- children: f?.map((t) => /* @__PURE__ */ o(
132
+ isDisabled: a,
133
+ children: x?.map((t) => /* @__PURE__ */ o(
134
134
  re,
135
135
  {
136
+ "data-testid": t.id,
136
137
  selected: t.id === e.value,
137
138
  value: t.id,
138
139
  description: t.helpText,
@@ -146,10 +147,10 @@ function ge() {
146
147
  )
147
148
  }
148
149
  ),
149
- /* @__PURE__ */ o(ce, { ...p, children: /* @__PURE__ */ o(
150
- ae,
150
+ /* @__PURE__ */ o(ae, { ...p, children: /* @__PURE__ */ o(
151
+ ce,
151
152
  {
152
- properties: c ? M : O
153
+ properties: a ? K : B
153
154
  }
154
155
  ) }),
155
156
  !m && /* @__PURE__ */ u(se, { children: [
@@ -157,9 +158,9 @@ function ge() {
157
158
  g,
158
159
  {
159
160
  variant: "primary",
160
- onClick: () => z(K)(),
161
+ onClick: () => q(z)(),
161
162
  "data-testid": "addExecutor-saveBtn",
162
- children: a(c ? "save" : "add")
163
+ children: c(a ? "save" : "add")
163
164
  }
164
165
  ),
165
166
  /* @__PURE__ */ o(
@@ -167,26 +168,26 @@ function ge() {
167
168
  {
168
169
  variant: "link",
169
170
  component: (e) => /* @__PURE__ */ o(
170
- I,
171
+ F,
171
172
  {
172
173
  ...e,
173
- to: b({ realm: d, profileName: n })
174
+ to: h({ realm: d, profileName: n })
174
175
  }
175
176
  ),
176
177
  "data-testid": "addExecutor-cancelBtn",
177
- children: a("cancel")
178
+ children: c("cancel")
178
179
  }
179
180
  )
180
181
  ] })
181
182
  ]
182
183
  }
183
184
  ),
184
- c && m && /* @__PURE__ */ o("div", { className: "kc-backToProfile", children: /* @__PURE__ */ o(
185
+ a && m && /* @__PURE__ */ o("div", { className: "kc-backToProfile", children: /* @__PURE__ */ o(
185
186
  g,
186
187
  {
187
- component: (e) => /* @__PURE__ */ o(I, { ...e, to: b({ realm: d, profileName: n }) }),
188
+ component: (e) => /* @__PURE__ */ o(F, { ...e, to: h({ realm: d, profileName: n }) }),
188
189
  variant: "primary",
189
- children: a("back")
190
+ children: c("back")
190
191
  }
191
192
  ) })
192
193
  ] })
@@ -195,4 +196,4 @@ function ge() {
195
196
  export {
196
197
  ge as default
197
198
  };
198
- //# sourceMappingURL=ExecutorForm-DxyNT3T5.js.map
199
+ //# sourceMappingURL=ExecutorForm-CqhYZ9zD.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ExecutorForm-CqhYZ9zD.js","sources":["../src/realm-settings/ExecutorForm.tsx"],"sourcesContent":["import type { ConfigPropertyRepresentation } from \"@keycloak/keycloak-admin-client/lib/defs/authenticatorConfigInfoRepresentation\";\nimport type ClientProfileRepresentation from \"@keycloak/keycloak-admin-client/lib/defs/clientProfileRepresentation\";\nimport type ComponentTypeRepresentation from \"@keycloak/keycloak-admin-client/lib/defs/componentTypeRepresentation\";\nimport {\n HelpItem,\n KeycloakSelect,\n SelectVariant,\n useAlerts,\n useFetch,\n} from \"@keycloak/keycloak-ui-shared\";\nimport {\n ActionGroup,\n AlertVariant,\n Button,\n FormGroup,\n PageSection,\n SelectOption,\n} from \"@patternfly/react-core\";\nimport { useState } from \"react\";\nimport { Controller, FormProvider, useForm } from \"react-hook-form\";\nimport { useTranslation } from \"react-i18next\";\nimport { Link, useNavigate } from \"react-router-dom\";\nimport { useAdminClient } from \"../admin-client\";\nimport { DynamicComponents } from \"../components/dynamic/DynamicComponents\";\nimport { FormAccess } from \"../components/form/FormAccess\";\nimport { ViewHeader } from \"../components/view-header/ViewHeader\";\nimport { useServerInfo } from \"../context/server-info/ServerInfoProvider\";\nimport { useParams } from \"../utils/useParams\";\nimport { ClientProfileParams, toClientProfile } from \"./routes/ClientProfile\";\nimport type { ExecutorParams } from \"./routes/Executor\";\n\ntype ExecutorForm = {\n config?: object;\n executor: string;\n};\n\nconst defaultValues: ExecutorForm = {\n config: {},\n executor: \"\",\n};\n\nexport default function ExecutorForm() {\n const { adminClient } = useAdminClient();\n\n const { t } = useTranslation();\n const navigate = useNavigate();\n const { realm, profileName } = useParams<ClientProfileParams>();\n const { executorName } = useParams<ExecutorParams>();\n const { addAlert, addError } = useAlerts();\n const [selectExecutorTypeOpen, setSelectExecutorTypeOpen] = useState(false);\n const serverInfo = useServerInfo();\n const executorTypes =\n serverInfo.componentTypes?.[\n \"org.keycloak.services.clientpolicy.executor.ClientPolicyExecutorProvider\"\n ];\n const [executors, setExecutors] = useState<ComponentTypeRepresentation[]>([]);\n const [executorProperties, setExecutorProperties] = useState<\n ConfigPropertyRepresentation[]\n >([]);\n const [globalProfiles, setGlobalProfiles] = useState<\n ClientProfileRepresentation[]\n >([]);\n const [profiles, setProfiles] = useState<ClientProfileRepresentation[]>([]);\n const form = useForm({ defaultValues });\n const { control, reset, handleSubmit } = form;\n const editMode = !!executorName;\n\n const setupForm = (profiles: ClientProfileRepresentation[]) => {\n const profile = profiles.find((profile) => profile.name === profileName);\n const executor = profile?.executors?.find(\n (executor) => executor.executor === executorName,\n );\n if (executor) reset({ config: executor.configuration });\n };\n\n useFetch(\n () =>\n adminClient.clientPolicies.listProfiles({ includeGlobalProfiles: true }),\n (profiles) => {\n setGlobalProfiles(profiles.globalProfiles!);\n setProfiles(profiles.profiles!);\n\n setupForm(profiles.profiles!);\n setupForm(profiles.globalProfiles!);\n },\n [],\n );\n\n const save = async () => {\n const formValues = form.getValues();\n const updatedProfiles = profiles.map((profile) => {\n if (profile.name !== profileName) {\n return profile;\n }\n\n const executors = (profile.executors ?? []).concat({\n executor: formValues.executor,\n configuration: formValues.config || {},\n });\n\n if (editMode) {\n const profileExecutor = profile.executors!.find(\n (executor) => executor.executor === executorName,\n );\n profileExecutor!.configuration = {\n ...profileExecutor!.configuration,\n ...formValues.config,\n };\n }\n\n if (editMode) {\n return profile;\n }\n return {\n ...profile,\n executors,\n };\n });\n try {\n await adminClient.clientPolicies.createProfiles({\n profiles: updatedProfiles,\n globalProfiles: globalProfiles,\n });\n addAlert(\n editMode ? t(\"updateExecutorSuccess\") : t(\"addExecutorSuccess\"),\n AlertVariant.success,\n );\n\n navigate(toClientProfile({ realm, profileName }));\n } catch (error) {\n addError(editMode ? \"updateExecutorError\" : \"addExecutorError\", error);\n }\n };\n\n const globalProfile = globalProfiles.find(\n (globalProfile) => globalProfile.name === profileName,\n );\n\n const profileExecutorType = executorTypes?.find(\n (executor) => executor.id === executorName,\n );\n\n const editedProfileExecutors =\n profileExecutorType?.properties.map<ConfigPropertyRepresentation>(\n (property) => {\n const globalDefaultValues = editMode ? property.defaultValue : \"\";\n return {\n ...property,\n defaultValue: globalDefaultValues,\n };\n },\n );\n\n return (\n <>\n <ViewHeader\n titleKey={editMode ? executorName : t(\"addExecutor\")}\n divider\n />\n <PageSection variant=\"light\">\n <FormAccess\n isHorizontal\n role=\"manage-realm\"\n className=\"pf-v5-u-mt-lg\"\n isReadOnly={!!globalProfile}\n >\n <FormGroup\n label={t(\"executorType\")}\n fieldId=\"kc-executorType\"\n labelIcon={\n executors.length > 0 && executors[0].helpText! !== \"\" ? (\n <HelpItem\n helpText={executors[0].helpText}\n fieldLabelId=\"executorTypeHelpText\"\n />\n ) : editMode ? (\n <HelpItem\n helpText={profileExecutorType?.helpText}\n fieldLabelId=\"executorTypeHelpText\"\n />\n ) : undefined\n }\n >\n <Controller\n name=\"executor\"\n defaultValue=\"\"\n control={control}\n render={({ field }) => (\n <KeycloakSelect\n toggleId=\"kc-executor\"\n placeholderText=\"Select an executor\"\n onToggle={(isOpen) => setSelectExecutorTypeOpen(isOpen)}\n onSelect={(value) => {\n reset({ ...defaultValues, executor: value.toString() });\n const selectedExecutor = executorTypes?.filter(\n (type) => type.id === value,\n );\n setExecutors(selectedExecutor ?? []);\n setExecutorProperties(\n selectedExecutor?.[0].properties ?? [],\n );\n setSelectExecutorTypeOpen(false);\n }}\n selections={editMode ? executorName : field.value}\n variant={SelectVariant.single}\n data-testid=\"executorType-select\"\n aria-label={t(\"executorType\")}\n isOpen={selectExecutorTypeOpen}\n maxHeight={580}\n isDisabled={editMode}\n >\n {executorTypes?.map((option) => (\n <SelectOption\n data-testid={option.id}\n selected={option.id === field.value}\n key={option.id}\n value={option.id}\n description={option.helpText}\n >\n {option.id}\n </SelectOption>\n ))}\n </KeycloakSelect>\n )}\n />\n </FormGroup>\n <FormProvider {...form}>\n <DynamicComponents\n properties={\n editMode ? editedProfileExecutors! : executorProperties\n }\n />\n </FormProvider>\n {!globalProfile && (\n <ActionGroup>\n <Button\n variant=\"primary\"\n onClick={() => handleSubmit(save)()}\n data-testid=\"addExecutor-saveBtn\"\n >\n {editMode ? t(\"save\") : t(\"add\")}\n </Button>\n <Button\n variant=\"link\"\n component={(props) => (\n <Link\n {...props}\n to={toClientProfile({ realm, profileName })}\n />\n )}\n data-testid=\"addExecutor-cancelBtn\"\n >\n {t(\"cancel\")}\n </Button>\n </ActionGroup>\n )}\n </FormAccess>\n {editMode && globalProfile && (\n <div className=\"kc-backToProfile\">\n <Button\n component={(props) => (\n <Link {...props} to={toClientProfile({ realm, profileName })} />\n )}\n variant=\"primary\"\n >\n {t(\"back\")}\n </Button>\n </div>\n )}\n </PageSection>\n </>\n );\n}\n"],"names":["defaultValues","ExecutorForm","adminClient","useAdminClient","t","useTranslation","navigate","useNavigate","realm","profileName","useParams","executorName","addAlert","addError","useAlerts","selectExecutorTypeOpen","setSelectExecutorTypeOpen","useState","executorTypes","useServerInfo","executors","setExecutors","executorProperties","setExecutorProperties","globalProfiles","setGlobalProfiles","profiles","setProfiles","form","useForm","control","reset","handleSubmit","editMode","setupForm","executor","profile","useFetch","save","formValues","updatedProfiles","profileExecutor","AlertVariant","toClientProfile","error","globalProfile","profileExecutorType","editedProfileExecutors","property","globalDefaultValues","jsxs","Fragment","jsx","ViewHeader","PageSection","FormAccess","FormGroup","HelpItem","Controller","field","KeycloakSelect","isOpen","value","selectedExecutor","type","SelectVariant","option","SelectOption","FormProvider","DynamicComponents","ActionGroup","Button","props","Link"],"mappings":";;;;;AAoCA,MAAMA,IAA8B;AAAA,EAClC,QAAQ,CAAC;AAAA,EACT,UAAU;AACZ;AAEA,SAAwBC,KAAe;AAC/B,QAAA,EAAE,aAAAC,EAAY,IAAIC,EAAe,GAEjC,EAAE,GAAAC,EAAE,IAAIC,GAAe,GACvBC,IAAWC,GAAY,G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