@keycloak/keycloak-admin-ui 26.0.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 (531) hide show
  1. package/LICENSE.txt +202 -0
  2. package/README.md +59 -0
  3. package/lib/.vite/manifest.json +105 -0
  4. package/lib/App.d.ts +1 -0
  5. package/lib/Banners.d.ts +1 -0
  6. package/lib/CreateFlow-Cs5xTx-G.js +80 -0
  7. package/lib/CreateFlow-Cs5xTx-G.js.map +1 -0
  8. package/lib/DetailOrganization-qj8m2QUy.js +130 -0
  9. package/lib/DetailOrganization-qj8m2QUy.js.map +1 -0
  10. package/lib/ExecutorForm-DwNxoZuZ.js +198 -0
  11. package/lib/ExecutorForm-DwNxoZuZ.js.map +1 -0
  12. package/lib/FlowDetails-BMYNGuYV.js +10593 -0
  13. package/lib/FlowDetails-BMYNGuYV.js.map +1 -0
  14. package/lib/ForbiddenSection.d.ts +6 -0
  15. package/lib/NewOrganization-FsgFNfEd.js +36 -0
  16. package/lib/NewOrganization-FsgFNfEd.js.map +1 -0
  17. package/lib/PageHeader.d.ts +1 -0
  18. package/lib/PageNav.d.ts +1 -0
  19. package/lib/PageNotFoundSection.d.ts +1 -0
  20. package/lib/PermissionDetails-9Ej9jFpb.js +413 -0
  21. package/lib/PermissionDetails-9Ej9jFpb.js.map +1 -0
  22. package/lib/ResourceDetails-apuGPq7h.js +286 -0
  23. package/lib/ResourceDetails-apuGPq7h.js.map +1 -0
  24. package/lib/Root.d.ts +1 -0
  25. package/lib/ScopeDetails-CxuBwUaZ.js +153 -0
  26. package/lib/ScopeDetails-CxuBwUaZ.js.map +1 -0
  27. package/lib/admin-client.d.ts +10 -0
  28. package/lib/authentication/AuthenticationSection.d.ts +14 -0
  29. package/lib/authentication/BindFlowDialog.d.ts +6 -0
  30. package/lib/authentication/BuildInLabel.d.ts +1 -0
  31. package/lib/authentication/DuplicateFlowModal.d.ts +8 -0
  32. package/lib/authentication/EditFlowModal.d.ts +7 -0
  33. package/lib/authentication/EmptyExecutionState.d.ts +10 -0
  34. package/lib/authentication/FlowDetails.d.ts +3 -0
  35. package/lib/authentication/RequiredActions.d.ts +1 -0
  36. package/lib/authentication/components/AddFlowDropdown.d.ts +10 -0
  37. package/lib/authentication/components/DraggableTable.d.ts +20 -0
  38. package/lib/authentication/components/EditFlow.d.ts +7 -0
  39. package/lib/authentication/components/ExecutionConfigModal.d.ts +6 -0
  40. package/lib/authentication/components/FlowDiagram.d.ts +6 -0
  41. package/lib/authentication/components/FlowHeader.d.ts +1 -0
  42. package/lib/authentication/components/FlowRequirementDropdown.d.ts +7 -0
  43. package/lib/authentication/components/FlowRow.d.ts +14 -0
  44. package/lib/authentication/components/FlowTitle.d.ts +7 -0
  45. package/lib/authentication/components/RequiredActionConfigModal.d.ts +7 -0
  46. package/lib/authentication/components/UsedBy.d.ts +6 -0
  47. package/lib/authentication/components/diagram/ButtonEdge.d.ts +13 -0
  48. package/lib/authentication/components/diagram/ConditionalNode.d.ts +8 -0
  49. package/lib/authentication/components/diagram/SubFlowNode.d.ts +13 -0
  50. package/lib/authentication/components/diagram/auto-layout.d.ts +3 -0
  51. package/lib/authentication/components/modals/AddStepModal.d.ts +9 -0
  52. package/lib/authentication/components/modals/AddSubFlowModal.d.ts +14 -0
  53. package/lib/authentication/execution-model.d.ts +25 -0
  54. package/lib/authentication/form/CreateFlow.d.ts +1 -0
  55. package/lib/authentication/form/NameDescription.d.ts +1 -0
  56. package/lib/authentication/policies/CibaPolicy.d.ts +7 -0
  57. package/lib/authentication/policies/OtpPolicy.d.ts +7 -0
  58. package/lib/authentication/policies/PasswordPolicy.d.ts +7 -0
  59. package/lib/authentication/policies/Policies.d.ts +1 -0
  60. package/lib/authentication/policies/PolicyRow.d.ts +7 -0
  61. package/lib/authentication/policies/WebauthnPolicy.d.ts +8 -0
  62. package/lib/authentication/policies/util.d.ts +10 -0
  63. package/lib/authentication/routes/Authentication.d.ts +10 -0
  64. package/lib/authentication/routes/CreateFlow.d.ts +7 -0
  65. package/lib/authentication/routes/Flow.d.ts +11 -0
  66. package/lib/authentication/routes.d.ts +3 -0
  67. package/lib/client-scopes/ChangeTypeDropdown.d.ts +8 -0
  68. package/lib/client-scopes/ClientScopesSection.d.ts +1 -0
  69. package/lib/client-scopes/CreateClientScope.d.ts +1 -0
  70. package/lib/client-scopes/EditClientScope.d.ts +1 -0
  71. package/lib/client-scopes/add/MapperDialog.d.ts +12 -0
  72. package/lib/client-scopes/details/MapperList.d.ts +13 -0
  73. package/lib/client-scopes/details/MappingDetails.d.ts +1 -0
  74. package/lib/client-scopes/details/ScopeForm.d.ts +8 -0
  75. package/lib/client-scopes/details/SearchFilter.d.ts +22 -0
  76. package/lib/client-scopes/routes/ClientScope.d.ts +10 -0
  77. package/lib/client-scopes/routes/ClientScopes.d.ts +7 -0
  78. package/lib/client-scopes/routes/Mapper.d.ts +9 -0
  79. package/lib/client-scopes/routes/NewClientScope.d.ts +7 -0
  80. package/lib/client-scopes/routes.d.ts +3 -0
  81. package/lib/clients/AdvancedTab.d.ts +11 -0
  82. package/lib/clients/ClientDescription.d.ts +6 -0
  83. package/lib/clients/ClientDetails.d.ts +7 -0
  84. package/lib/clients/ClientSessions.d.ts +6 -0
  85. package/lib/clients/ClientSettings.d.ts +7 -0
  86. package/lib/clients/ClientsSection.d.ts +1 -0
  87. package/lib/clients/add/AccessSettings.d.ts +2 -0
  88. package/lib/clients/add/CapabilityConfig.d.ts +6 -0
  89. package/lib/clients/add/GeneralSettings.d.ts +1 -0
  90. package/lib/clients/add/LoginSettings.d.ts +5 -0
  91. package/lib/clients/add/LoginSettingsPanel.d.ts +3 -0
  92. package/lib/clients/add/LogoutPanel.d.ts +2 -0
  93. package/lib/clients/add/NewClientForm.d.ts +1 -0
  94. package/lib/clients/add/SamlConfig.d.ts +9 -0
  95. package/lib/clients/add/SamlSignature.d.ts +1 -0
  96. package/lib/clients/advanced/AddHostDialog.d.ts +8 -0
  97. package/lib/clients/advanced/AdvancedSettings.d.ts +8 -0
  98. package/lib/clients/advanced/ApplicationUrls.d.ts +5 -0
  99. package/lib/clients/advanced/AuthenticationOverrides.d.ts +8 -0
  100. package/lib/clients/advanced/ClusteringPanel.d.ts +2 -0
  101. package/lib/clients/advanced/FineGrainOpenIdConnect.d.ts +7 -0
  102. package/lib/clients/advanced/FineGrainSamlEndpointConfig.d.ts +6 -0
  103. package/lib/clients/advanced/OpenIdConnectCompatibilityModes.d.ts +7 -0
  104. package/lib/clients/advanced/TokenLifespan.d.ts +9 -0
  105. package/lib/clients/authorization/AuthorizationDataModal.d.ts +6 -0
  106. package/lib/clients/authorization/AuthorizationEvaluate.d.ts +36 -0
  107. package/lib/clients/authorization/AuthorizationEvaluateResource.d.ts +8 -0
  108. package/lib/clients/authorization/AuthorizationEvaluateResourcePolicies.d.ts +10 -0
  109. package/lib/clients/authorization/AuthorizationExport.d.ts +1 -0
  110. package/lib/clients/authorization/DecisionStrategySelect.d.ts +7 -0
  111. package/lib/clients/authorization/DeleteScopeDialog.d.ts +11 -0
  112. package/lib/clients/authorization/DetailCell.d.ts +7 -0
  113. package/lib/clients/authorization/DetailDescription.d.ts +12 -0
  114. package/lib/clients/authorization/EmptyPermissionsState.d.ts +7 -0
  115. package/lib/clients/authorization/ImportDialog.d.ts +7 -0
  116. package/lib/clients/authorization/KeyBasedAttributeInput.d.ts +16 -0
  117. package/lib/clients/authorization/MoreLabel.d.ts +5 -0
  118. package/lib/clients/authorization/NewPolicyDialog.d.ts +8 -0
  119. package/lib/clients/authorization/PermissionDetails.d.ts +1 -0
  120. package/lib/clients/authorization/Permissions.d.ts +6 -0
  121. package/lib/clients/authorization/Policies.d.ts +6 -0
  122. package/lib/clients/authorization/ResourceDetails.d.ts +1 -0
  123. package/lib/clients/authorization/Resources.d.ts +6 -0
  124. package/lib/clients/authorization/ResourcesPolicySelect.d.ts +12 -0
  125. package/lib/clients/authorization/ScopeDetails.d.ts +1 -0
  126. package/lib/clients/authorization/ScopePicker.d.ts +3 -0
  127. package/lib/clients/authorization/ScopeSelect.d.ts +7 -0
  128. package/lib/clients/authorization/Scopes.d.ts +12 -0
  129. package/lib/clients/authorization/SearchDropdown.d.ts +17 -0
  130. package/lib/clients/authorization/Settings.d.ts +5 -0
  131. package/lib/clients/authorization/evaluate/Results.d.ts +8 -0
  132. package/lib/clients/authorization/policy/Aggregate.d.ts +1 -0
  133. package/lib/clients/authorization/policy/Client.d.ts +1 -0
  134. package/lib/clients/authorization/policy/ClientScope.d.ts +5 -0
  135. package/lib/clients/authorization/policy/Group.d.ts +5 -0
  136. package/lib/clients/authorization/policy/JavaScript.d.ts +1 -0
  137. package/lib/clients/authorization/policy/LogicSelector.d.ts +5 -0
  138. package/lib/clients/authorization/policy/NameDescription.d.ts +5 -0
  139. package/lib/clients/authorization/policy/PolicyDetails.d.ts +2 -0
  140. package/lib/clients/authorization/policy/Regex.d.ts +1 -0
  141. package/lib/clients/authorization/policy/Role.d.ts +1 -0
  142. package/lib/clients/authorization/policy/Time.d.ts +1 -0
  143. package/lib/clients/authorization/policy/User.d.ts +1 -0
  144. package/lib/clients/credentials/ClientSecret.d.ts +7 -0
  145. package/lib/clients/credentials/Credentials.d.ts +7 -0
  146. package/lib/clients/credentials/SignedJWT.d.ts +5 -0
  147. package/lib/clients/credentials/X509.d.ts +1 -0
  148. package/lib/clients/import/ImportForm.d.ts +1 -0
  149. package/lib/clients/initial-access/AccessTokenDialog.d.ts +6 -0
  150. package/lib/clients/initial-access/CreateInitialAccessToken.d.ts +1 -0
  151. package/lib/clients/initial-access/InitialAccessTokenList.d.ts +1 -0
  152. package/lib/clients/keys/Certificate.d.ts +10 -0
  153. package/lib/clients/keys/ExportSamlKeyDialog.d.ts +8 -0
  154. package/lib/clients/keys/GenerateKeyDialog.d.ts +15 -0
  155. package/lib/clients/keys/ImportKeyDialog.d.ts +15 -0
  156. package/lib/clients/keys/Keys.d.ts +7 -0
  157. package/lib/clients/keys/SamlImportKeyDialog.d.ts +8 -0
  158. package/lib/clients/keys/SamlKeys.d.ts +8 -0
  159. package/lib/clients/keys/SamlKeysDialog.d.ts +15 -0
  160. package/lib/clients/keys/StoreSettings.d.ts +4 -0
  161. package/lib/clients/registration/AddProviderDialog.d.ts +6 -0
  162. package/lib/clients/registration/ClientRegistration.d.ts +1 -0
  163. package/lib/clients/registration/ClientRegistrationList.d.ts +5 -0
  164. package/lib/clients/registration/DetailProvider.d.ts +1 -0
  165. package/lib/clients/roles/CreateClientRole.d.ts +1 -0
  166. package/lib/clients/routes/AddClient.d.ts +7 -0
  167. package/lib/clients/routes/AddRegistrationProvider.d.ts +12 -0
  168. package/lib/clients/routes/AuthenticationTab.d.ts +10 -0
  169. package/lib/clients/routes/Client.d.ts +10 -0
  170. package/lib/clients/routes/ClientRegistration.d.ts +9 -0
  171. package/lib/clients/routes/ClientRole.d.ts +11 -0
  172. package/lib/clients/routes/ClientScopeTab.d.ts +10 -0
  173. package/lib/clients/routes/Clients.d.ts +10 -0
  174. package/lib/clients/routes/CreateInitialAccessToken.d.ts +7 -0
  175. package/lib/clients/routes/DedicatedScopeDetails.d.ts +11 -0
  176. package/lib/clients/routes/ImportClient.d.ts +7 -0
  177. package/lib/clients/routes/Mapper.d.ts +9 -0
  178. package/lib/clients/routes/NewPermission.d.ts +12 -0
  179. package/lib/clients/routes/NewPolicy.d.ts +9 -0
  180. package/lib/clients/routes/NewResource.d.ts +8 -0
  181. package/lib/clients/routes/NewRole.d.ts +8 -0
  182. package/lib/clients/routes/NewScope.d.ts +8 -0
  183. package/lib/clients/routes/PermissionDetails.d.ts +11 -0
  184. package/lib/clients/routes/PolicyDetails.d.ts +10 -0
  185. package/lib/clients/routes/Resource.d.ts +10 -0
  186. package/lib/clients/routes/Scope.d.ts +10 -0
  187. package/lib/clients/routes.d.ts +3 -0
  188. package/lib/clients/scopes/AddScopeDialog.d.ts +14 -0
  189. package/lib/clients/scopes/ClientScopes.d.ts +13 -0
  190. package/lib/clients/scopes/CopyToClipboardButton.d.ts +8 -0
  191. package/lib/clients/scopes/DedicatedScope.d.ts +6 -0
  192. package/lib/clients/scopes/DedicatedScopes.d.ts +1 -0
  193. package/lib/clients/scopes/EvaluateScopes.d.ts +5 -0
  194. package/lib/clients/scopes/GeneratedCodeTab.d.ts +8 -0
  195. package/lib/clients/service-account/ServiceAccount.d.ts +6 -0
  196. package/lib/clients/utils.d.ts +29 -0
  197. package/lib/components/SwitchControl.d.ts +4 -0
  198. package/lib/components/bread-crumb/GroupBreadCrumbs.d.ts +1 -0
  199. package/lib/components/bread-crumb/PageBreadCrumbs.d.ts +1 -0
  200. package/lib/components/client/ClientSelect.d.ts +7 -0
  201. package/lib/components/client-scope/ClientScopeTypes.d.ts +33 -0
  202. package/lib/components/confirm-dialog/ConfirmDialog.d.ts +21 -0
  203. package/lib/components/download-dialog/DownloadDialog.d.ts +8 -0
  204. package/lib/components/dropdown-panel/DropdownPanel.d.ts +10 -0
  205. package/lib/components/dynamic/BooleanComponent.d.ts +2 -0
  206. package/lib/components/dynamic/ClientSelectComponent.d.ts +2 -0
  207. package/lib/components/dynamic/DynamicComponents.d.ts +9 -0
  208. package/lib/components/dynamic/FileComponent.d.ts +2 -0
  209. package/lib/components/dynamic/GroupComponent.d.ts +2 -0
  210. package/lib/components/dynamic/ListComponent.d.ts +2 -0
  211. package/lib/components/dynamic/MapComponent.d.ts +2 -0
  212. package/lib/components/dynamic/MultivaluedListComponent.d.ts +2 -0
  213. package/lib/components/dynamic/MultivaluedStringComponent.d.ts +2 -0
  214. package/lib/components/dynamic/PasswordComponent.d.ts +2 -0
  215. package/lib/components/dynamic/RoleComponent.d.ts +2 -0
  216. package/lib/components/dynamic/ScriptComponent.d.ts +2 -0
  217. package/lib/components/dynamic/StringComponent.d.ts +2 -0
  218. package/lib/components/dynamic/TextComponent.d.ts +2 -0
  219. package/lib/components/dynamic/UrlComponent.d.ts +2 -0
  220. package/lib/components/dynamic/UserProfileAttributeListComponent.d.ts +2 -0
  221. package/lib/components/dynamic/components.d.ts +13 -0
  222. package/lib/components/error/ErrorRenderer.d.ts +2 -0
  223. package/lib/components/external-link/FormattedLink.d.ts +5 -0
  224. package/lib/components/form/FixedButtonGroup.d.ts +12 -0
  225. package/lib/components/form/FormAccess.d.ts +29 -0
  226. package/lib/components/group/GroupPath.d.ts +7 -0
  227. package/lib/components/group/GroupPickerDialog.d.ts +15 -0
  228. package/lib/components/help-enabler/HelpHeader.d.ts +1 -0
  229. package/lib/components/json-file-upload/FileUploadForm.d.ts +13 -0
  230. package/lib/components/json-file-upload/JsonFileUpload.d.ts +5 -0
  231. package/lib/components/json-file-upload/patternfly/FileUpload.d.ts +73 -0
  232. package/lib/components/json-file-upload/patternfly/FileUploadField.d.ts +67 -0
  233. package/lib/components/json-file-upload/patternfly/fileUtils.d.ts +12 -0
  234. package/lib/components/key-value-form/AttributeForm.d.ts +15 -0
  235. package/lib/components/key-value-form/KeySelect.d.ts +7 -0
  236. package/lib/components/key-value-form/KeyValueInput.d.ts +13 -0
  237. package/lib/components/key-value-form/ValueSelect.d.ts +8 -0
  238. package/lib/components/key-value-form/key-value-convert.d.ts +7 -0
  239. package/lib/components/keycloak-card/ClickableCard.d.ts +6 -0
  240. package/lib/components/keycloak-card/KeycloakCard.d.ts +11 -0
  241. package/lib/components/keycloak-spinner/KeycloakSpinner.d.ts +1 -0
  242. package/lib/components/multi-line-input/MultiLineInput.d.ts +9 -0
  243. package/lib/components/permission-tab/PermissionTab.d.ts +7 -0
  244. package/lib/components/realm-selector/RealmSelector.d.ts +1 -0
  245. package/lib/components/role-form/RoleForm.d.ts +11 -0
  246. package/lib/components/role-mapping/AddRoleMappingModal.d.ts +12 -0
  247. package/lib/components/role-mapping/RoleMapping.d.ts +55 -0
  248. package/lib/components/role-mapping/queries.d.ts +9 -0
  249. package/lib/components/role-mapping/resource.d.ts +40 -0
  250. package/lib/components/roles-list/RolesList.d.ts +13 -0
  251. package/lib/components/routable-tabs/RoutableTabs.d.ts +15 -0
  252. package/lib/components/time-selector/TimeSelector.d.ts +11 -0
  253. package/lib/components/time-selector/TimeSelectorControl.d.ts +13 -0
  254. package/lib/components/time-selector/TimeSelectorForm.d.ts +6 -0
  255. package/lib/components/users/UserDataTable.d.ts +10 -0
  256. package/lib/components/users/UserDataTableAttributeSearchForm.d.ts +12 -0
  257. package/lib/components/users/UserDataTableToolbarItems.d.ts +27 -0
  258. package/lib/components/users/UserSelect.d.ts +8 -0
  259. package/lib/components/view-header/ViewHeader.d.ts +25 -0
  260. package/lib/components/wizard-section-header/WizardSectionHeader.d.ts +6 -0
  261. package/lib/context/RecentRealms.d.ts +4 -0
  262. package/lib/context/access/Access.d.ts +10 -0
  263. package/lib/context/auth/admin-ui-endpoint.d.ts +4 -0
  264. package/lib/context/auth/uiRealmInfo.d.ts +5 -0
  265. package/lib/context/realm-context/RealmContext.d.ts +11 -0
  266. package/lib/context/server-info/ServerInfoProvider.d.ts +6 -0
  267. package/lib/context/whoami/WhoAmI.d.ts +23 -0
  268. package/lib/dashboard/Dashboard.d.ts +1 -0
  269. package/lib/dashboard/ProviderInfo.d.ts +1 -0
  270. package/lib/dashboard/routes/Dashboard.d.ts +11 -0
  271. package/lib/dashboard/routes.d.ts +3 -0
  272. package/lib/environment.d.ts +19 -0
  273. package/lib/events/AdminEvents.d.ts +1 -0
  274. package/lib/events/EventsSection.d.ts +1 -0
  275. package/lib/events/ResourceLinks.d.ts +7 -0
  276. package/lib/events/routes/Events.d.ts +10 -0
  277. package/lib/events/routes.d.ts +3 -0
  278. package/lib/favicon.svg +63 -0
  279. package/lib/groups/GroupAttributes.d.ts +1 -0
  280. package/lib/groups/GroupRoleMapping.d.ts +6 -0
  281. package/lib/groups/GroupTable.d.ts +5 -0
  282. package/lib/groups/GroupsModal.d.ts +10 -0
  283. package/lib/groups/GroupsSection.d.ts +1 -0
  284. package/lib/groups/Members.d.ts +1 -0
  285. package/lib/groups/MembersModal.d.ts +8 -0
  286. package/lib/groups/SubGroupsContext.d.ts +12 -0
  287. package/lib/groups/components/CheckableTreeView.d.ts +7 -0
  288. package/lib/groups/components/DeleteGroup.d.ts +9 -0
  289. package/lib/groups/components/GroupToolbar.d.ts +7 -0
  290. package/lib/groups/components/GroupTree.d.ts +8 -0
  291. package/lib/groups/components/MoveDialog.d.ts +8 -0
  292. package/lib/groups/groupIdUtils.d.ts +2 -0
  293. package/lib/groups/routes/Groups.d.ts +10 -0
  294. package/lib/groups/routes.d.ts +3 -0
  295. package/lib/help-urls.d.ts +19 -0
  296. package/lib/icon.svg +55 -0
  297. package/lib/identity-providers/IdentityProvidersSection.d.ts +1 -0
  298. package/lib/identity-providers/ManageOrderDialog.d.ts +7 -0
  299. package/lib/identity-providers/OIDCConfigurationRepresentation.d.ts +39 -0
  300. package/lib/identity-providers/add/AddIdentityProvider.d.ts +1 -0
  301. package/lib/identity-providers/add/AddMapper.d.ts +8 -0
  302. package/lib/identity-providers/add/AddMapperForm.d.ts +13 -0
  303. package/lib/identity-providers/add/AddOpenIdConnect.d.ts +1 -0
  304. package/lib/identity-providers/add/AddSamlConnect.d.ts +1 -0
  305. package/lib/identity-providers/add/AdvancedSettings.d.ts +6 -0
  306. package/lib/identity-providers/add/DescriptorSettings.d.ts +5 -0
  307. package/lib/identity-providers/add/DetailSettings.d.ts +1 -0
  308. package/lib/identity-providers/add/DiscoverySettings.d.ts +5 -0
  309. package/lib/identity-providers/add/ExtendedNonDiscoverySettings.d.ts +1 -0
  310. package/lib/identity-providers/add/GeneralSettings.d.ts +6 -0
  311. package/lib/identity-providers/add/OIDCAuthentication.d.ts +3 -0
  312. package/lib/identity-providers/add/OIDCGeneralSettings.d.ts +1 -0
  313. package/lib/identity-providers/add/OpenIdConnectSettings.d.ts +1 -0
  314. package/lib/identity-providers/add/ReqAuthnConstraintsSettings.d.ts +1 -0
  315. package/lib/identity-providers/add/SamlConnectSettings.d.ts +1 -0
  316. package/lib/identity-providers/add/SamlGeneralSettings.d.ts +5 -0
  317. package/lib/identity-providers/component/ClientIdSecret.d.ts +4 -0
  318. package/lib/identity-providers/component/DiscoveryEndpointField.d.ts +8 -0
  319. package/lib/identity-providers/component/DisplayOrder.d.ts +1 -0
  320. package/lib/identity-providers/component/FormGroupField.d.ts +10 -0
  321. package/lib/identity-providers/component/RedirectUrl.d.ts +3 -0
  322. package/lib/identity-providers/component/SwitchField.d.ts +8 -0
  323. package/lib/identity-providers/component/TextField.d.ts +2 -0
  324. package/lib/identity-providers/routes/AddMapper.d.ts +10 -0
  325. package/lib/identity-providers/routes/EditMapper.d.ts +10 -0
  326. package/lib/identity-providers/routes/IdentityProvider.d.ts +11 -0
  327. package/lib/identity-providers/routes/IdentityProviderCreate.d.ts +8 -0
  328. package/lib/identity-providers/routes/IdentityProviderKeycloakOidc.d.ts +7 -0
  329. package/lib/identity-providers/routes/IdentityProviderOidc.d.ts +7 -0
  330. package/lib/identity-providers/routes/IdentityProviderSaml.d.ts +7 -0
  331. package/lib/identity-providers/routes/IdentityProviders.d.ts +7 -0
  332. package/lib/identity-providers/routes.d.ts +3 -0
  333. package/lib/img_avatar.svg +33 -0
  334. package/lib/index-DXWy23Yd.js +65735 -0
  335. package/lib/index-DXWy23Yd.js.map +1 -0
  336. package/lib/index.d.ts +295 -0
  337. package/lib/keycloak-admin-ui.d.ts +2 -0
  338. package/lib/keycloak-admin-ui.js +309 -0
  339. package/lib/keycloak-admin-ui.js.map +1 -0
  340. package/lib/logo.svg +1 -0
  341. package/lib/main.d.ts +0 -0
  342. package/lib/organizations/DetailOraganzationHeader.d.ts +5 -0
  343. package/lib/organizations/DetailOrganization.d.ts +1 -0
  344. package/lib/organizations/IdentityProviderSelect.d.ts +7 -0
  345. package/lib/organizations/IdentityProviders.d.ts +1 -0
  346. package/lib/organizations/InviteMemberModal.d.ts +6 -0
  347. package/lib/organizations/LinkIdentityProviderModal.d.ts +8 -0
  348. package/lib/organizations/Members.d.ts +1 -0
  349. package/lib/organizations/NewOrganization.d.ts +1 -0
  350. package/lib/organizations/OrganizationForm.d.ts +11 -0
  351. package/lib/organizations/OrganizationModal.d.ts +9 -0
  352. package/lib/organizations/OrganizationsSection.d.ts +1 -0
  353. package/lib/organizations/routes/AddOrganization.d.ts +7 -0
  354. package/lib/organizations/routes/EditOrganization.d.ts +10 -0
  355. package/lib/organizations/routes/Organizations.d.ts +8 -0
  356. package/lib/organizations/routes.d.ts +3 -0
  357. package/lib/page/Page.d.ts +1 -0
  358. package/lib/page/PageHandler.d.ts +9 -0
  359. package/lib/page/PageList.d.ts +3 -0
  360. package/lib/page/routes.d.ts +16 -0
  361. package/lib/realm/add/NewRealmForm.d.ts +1 -0
  362. package/lib/realm/routes/AddRealm.d.ts +7 -0
  363. package/lib/realm/routes.d.ts +3 -0
  364. package/lib/realm-roles/CreateRealmRole.d.ts +1 -0
  365. package/lib/realm-roles/RealmRoleTabs.d.ts +1 -0
  366. package/lib/realm-roles/RealmRolesSection.d.ts +1 -0
  367. package/lib/realm-roles/UsersInRoleTab.d.ts +1 -0
  368. package/lib/realm-roles/routes/AddRole.d.ts +7 -0
  369. package/lib/realm-roles/routes/RealmRole.d.ts +10 -0
  370. package/lib/realm-roles/routes/RealmRoles.d.ts +7 -0
  371. package/lib/realm-roles/routes.d.ts +3 -0
  372. package/lib/realm-settings/AddClientProfileModal.d.ts +8 -0
  373. package/lib/realm-settings/AddTranslationModal.d.ts +15 -0
  374. package/lib/realm-settings/ClientProfileForm.d.ts +1 -0
  375. package/lib/realm-settings/DefaultGroupsTab.d.ts +1 -0
  376. package/lib/realm-settings/EmailTab.d.ts +7 -0
  377. package/lib/realm-settings/ExecutorForm.d.ts +1 -0
  378. package/lib/realm-settings/GeneralTab.d.ts +7 -0
  379. package/lib/realm-settings/LoginTab.d.ts +7 -0
  380. package/lib/realm-settings/NewAttributeSettings.d.ts +6 -0
  381. package/lib/realm-settings/NewClientPolicy.d.ts +1 -0
  382. package/lib/realm-settings/NewClientPolicyCondition.d.ts +4 -0
  383. package/lib/realm-settings/PartialExport.d.ts +5 -0
  384. package/lib/realm-settings/PartialImport.d.ts +5 -0
  385. package/lib/realm-settings/PoliciesTab.d.ts +1 -0
  386. package/lib/realm-settings/ProfilesTab.d.ts +1 -0
  387. package/lib/realm-settings/RealmSettingsSection.d.ts +1 -0
  388. package/lib/realm-settings/RealmSettingsTabs.d.ts +6 -0
  389. package/lib/realm-settings/SessionsTab.d.ts +7 -0
  390. package/lib/realm-settings/ThemesTab.d.ts +7 -0
  391. package/lib/realm-settings/TokensTab.d.ts +8 -0
  392. package/lib/realm-settings/UserRegistration.d.ts +1 -0
  393. package/lib/realm-settings/event-config/AddEventTypesDialog.d.ts +8 -0
  394. package/lib/realm-settings/event-config/EventConfigForm.d.ts +10 -0
  395. package/lib/realm-settings/event-config/EventListenersForm.d.ts +7 -0
  396. package/lib/realm-settings/event-config/EventsTab.d.ts +6 -0
  397. package/lib/realm-settings/event-config/EventsTypeTable.d.ts +12 -0
  398. package/lib/realm-settings/keys/KeysListTab.d.ts +6 -0
  399. package/lib/realm-settings/keys/KeysProvidersTab.d.ts +7 -0
  400. package/lib/realm-settings/keys/KeysTab.d.ts +1 -0
  401. package/lib/realm-settings/keys/key-providers/KeyProviderForm.d.ts +9 -0
  402. package/lib/realm-settings/keys/key-providers/KeyProviderModal.d.ts +7 -0
  403. package/lib/realm-settings/keys/key-providers/KeyProvidersPicker.d.ts +6 -0
  404. package/lib/realm-settings/localization/EffectiveMessageBundles.d.ts +6 -0
  405. package/lib/realm-settings/localization/LocalizationTab.d.ts +8 -0
  406. package/lib/realm-settings/localization/RealmOverrides.d.ts +21 -0
  407. package/lib/realm-settings/routes/AddAttribute.d.ts +7 -0
  408. package/lib/realm-settings/routes/AddClientPolicy.d.ts +7 -0
  409. package/lib/realm-settings/routes/AddClientProfile.d.ts +8 -0
  410. package/lib/realm-settings/routes/AddCondition.d.ts +8 -0
  411. package/lib/realm-settings/routes/AddExecutor.d.ts +8 -0
  412. package/lib/realm-settings/routes/Attribute.d.ts +8 -0
  413. package/lib/realm-settings/routes/ClientPolicies.d.ts +9 -0
  414. package/lib/realm-settings/routes/ClientProfile.d.ts +8 -0
  415. package/lib/realm-settings/routes/EditAttributesGroup.d.ts +8 -0
  416. package/lib/realm-settings/routes/EditClientPolicy.d.ts +8 -0
  417. package/lib/realm-settings/routes/EditCondition.d.ts +9 -0
  418. package/lib/realm-settings/routes/Executor.d.ts +9 -0
  419. package/lib/realm-settings/routes/KeyProvider.d.ts +10 -0
  420. package/lib/realm-settings/routes/KeysTab.d.ts +9 -0
  421. package/lib/realm-settings/routes/NewAttributesGroup.d.ts +7 -0
  422. package/lib/realm-settings/routes/RealmSettings.d.ts +10 -0
  423. package/lib/realm-settings/routes/UserProfile.d.ts +9 -0
  424. package/lib/realm-settings/routes.d.ts +3 -0
  425. package/lib/realm-settings/security-defences/BruteForceDetection.d.ts +7 -0
  426. package/lib/realm-settings/security-defences/HeadersForm.d.ts +7 -0
  427. package/lib/realm-settings/security-defences/HelpLinkTextInput.d.ts +6 -0
  428. package/lib/realm-settings/security-defences/SecurityDefenses.d.ts +7 -0
  429. package/lib/realm-settings/security-defences/Time.d.ts +5 -0
  430. package/lib/realm-settings/user-profile/AttributesGroupDetails.d.ts +2 -0
  431. package/lib/realm-settings/user-profile/AttributesGroupForm.d.ts +1 -0
  432. package/lib/realm-settings/user-profile/AttributesGroupTab.d.ts +5 -0
  433. package/lib/realm-settings/user-profile/AttributesTab.d.ts +5 -0
  434. package/lib/realm-settings/user-profile/JsonEditorTab.d.ts +1 -0
  435. package/lib/realm-settings/user-profile/UserProfileContext.d.ts +16 -0
  436. package/lib/realm-settings/user-profile/UserProfileTab.d.ts +5 -0
  437. package/lib/realm-settings/user-profile/attribute/AddTranslationsDialog.d.ts +19 -0
  438. package/lib/realm-settings/user-profile/attribute/AddValidatorDialog.d.ts +8 -0
  439. package/lib/realm-settings/user-profile/attribute/AttributeAnnotations.d.ts +1 -0
  440. package/lib/realm-settings/user-profile/attribute/AttributeGeneralSettings.d.ts +14 -0
  441. package/lib/realm-settings/user-profile/attribute/AttributePermission.d.ts +1 -0
  442. package/lib/realm-settings/user-profile/attribute/AttributeValidations.d.ts +1 -0
  443. package/lib/realm-settings/user-profile/attribute/ValidatorSelect.d.ts +7 -0
  444. package/lib/robots.txt +3 -0
  445. package/lib/root/AuthWall.d.ts +1 -0
  446. package/lib/routes.d.ts +15 -0
  447. package/lib/sessions/RevocationModal.d.ts +6 -0
  448. package/lib/sessions/SessionsSection.d.ts +1 -0
  449. package/lib/sessions/SessionsTable.d.ts +14 -0
  450. package/lib/sessions/routes/Sessions.d.ts +7 -0
  451. package/lib/sessions/routes.d.ts +3 -0
  452. package/lib/style.css +1 -0
  453. package/lib/user/CreateUser.d.ts +1 -0
  454. package/lib/user/EditUser.d.ts +1 -0
  455. package/lib/user/FederatedUserLink.d.ts +6 -0
  456. package/lib/user/Organizations.d.ts +1 -0
  457. package/lib/user/UserAttributes.d.ts +10 -0
  458. package/lib/user/UserConsents.d.ts +1 -0
  459. package/lib/user/UserCredentials.d.ts +7 -0
  460. package/lib/user/UserForm.d.ts +21 -0
  461. package/lib/user/UserGroups.d.ts +6 -0
  462. package/lib/user/UserIdPModal.d.ts +8 -0
  463. package/lib/user/UserIdentityProviderLinks.d.ts +5 -0
  464. package/lib/user/UserRoleMapping.d.ts +6 -0
  465. package/lib/user/UserSessions.d.ts +1 -0
  466. package/lib/user/UsersSection.d.ts +1 -0
  467. package/lib/user/details/SearchFilter.d.ts +9 -0
  468. package/lib/user/form-state.d.ts +14 -0
  469. package/lib/user/routes/AddUser.d.ts +7 -0
  470. package/lib/user/routes/User.d.ts +10 -0
  471. package/lib/user/routes/Users.d.ts +10 -0
  472. package/lib/user/routes.d.ts +3 -0
  473. package/lib/user/user-credentials/CredentialDataDialog.d.ts +6 -0
  474. package/lib/user/user-credentials/CredentialRow.d.ts +10 -0
  475. package/lib/user/user-credentials/InlineLabelEdit.d.ts +9 -0
  476. package/lib/user/user-credentials/LifespanField.d.ts +1 -0
  477. package/lib/user/user-credentials/RequiredActionMultiSelect.d.ts +7 -0
  478. package/lib/user/user-credentials/ResetCredentialDialog.d.ts +6 -0
  479. package/lib/user/user-credentials/ResetPasswordDialog.d.ts +15 -0
  480. package/lib/user/utils/user-profile.d.ts +2 -0
  481. package/lib/user/utils.d.ts +1 -0
  482. package/lib/user-federation/CreateUserFederationLdapSettings.d.ts +1 -0
  483. package/lib/user-federation/ManagePriorityDialog.d.ts +7 -0
  484. package/lib/user-federation/UserFederationKerberosSettings.d.ts +1 -0
  485. package/lib/user-federation/UserFederationKerberosWizard.d.ts +1 -0
  486. package/lib/user-federation/UserFederationLdapForm.d.ts +13 -0
  487. package/lib/user-federation/UserFederationLdapSettings.d.ts +1 -0
  488. package/lib/user-federation/UserFederationLdapWizard.d.ts +1 -0
  489. package/lib/user-federation/UserFederationSection.d.ts +1 -0
  490. package/lib/user-federation/custom/CustomProviderSettings.d.ts +1 -0
  491. package/lib/user-federation/custom/SyncSettings.d.ts +1 -0
  492. package/lib/user-federation/kerberos/KerberosSettingsRequired.d.ts +7 -0
  493. package/lib/user-federation/ldap/LdapSettingsAdvanced.d.ts +8 -0
  494. package/lib/user-federation/ldap/LdapSettingsConnection.d.ts +10 -0
  495. package/lib/user-federation/ldap/LdapSettingsGeneral.d.ts +9 -0
  496. package/lib/user-federation/ldap/LdapSettingsKerberosIntegration.d.ts +7 -0
  497. package/lib/user-federation/ldap/LdapSettingsSearching.d.ts +7 -0
  498. package/lib/user-federation/ldap/LdapSettingsSynchronization.d.ts +7 -0
  499. package/lib/user-federation/ldap/mappers/LdapMapperDetails.d.ts +1 -0
  500. package/lib/user-federation/ldap/mappers/LdapMapperList.d.ts +6 -0
  501. package/lib/user-federation/routes/CustomUserFederation.d.ts +9 -0
  502. package/lib/user-federation/routes/NewCustomUserFederation.d.ts +8 -0
  503. package/lib/user-federation/routes/NewKerberosUserFederation.d.ts +7 -0
  504. package/lib/user-federation/routes/NewLdapUserFederation.d.ts +7 -0
  505. package/lib/user-federation/routes/UserFederation.d.ts +7 -0
  506. package/lib/user-federation/routes/UserFederationKerberos.d.ts +8 -0
  507. package/lib/user-federation/routes/UserFederationLdap.d.ts +11 -0
  508. package/lib/user-federation/routes/UserFederationLdapMapper.d.ts +9 -0
  509. package/lib/user-federation/routes/UserFederationsKerberos.d.ts +7 -0
  510. package/lib/user-federation/routes/UserFederationsLdap.d.ts +7 -0
  511. package/lib/user-federation/routes.d.ts +3 -0
  512. package/lib/user-federation/shared/ExtendedHeader.d.ts +8 -0
  513. package/lib/user-federation/shared/Header.d.ts +9 -0
  514. package/lib/user-federation/shared/SettingsCache.d.ts +8 -0
  515. package/lib/util.d.ts +24 -0
  516. package/lib/utils/client-url.d.ts +3 -0
  517. package/lib/utils/generateEncodedPath.d.ts +23 -0
  518. package/lib/utils/getAuthorizationHeaders.d.ts +1 -0
  519. package/lib/utils/joinPath.d.ts +1 -0
  520. package/lib/utils/translationFormatter.d.ts +3 -0
  521. package/lib/utils/types.d.ts +4 -0
  522. package/lib/utils/useCurrentUser.d.ts +27 -0
  523. package/lib/utils/useFormatDate.d.ts +2 -0
  524. package/lib/utils/useIsFeatureEnabled.d.ts +14 -0
  525. package/lib/utils/useLocale.d.ts +1 -0
  526. package/lib/utils/useLocaleSort.d.ts +7 -0
  527. package/lib/utils/useParams.d.ts +1 -0
  528. package/lib/utils/useQueryPermission.d.ts +6 -0
  529. package/lib/utils/useToggle.d.ts +6 -0
  530. package/lib/utils/useUpdateEffect.d.ts +5 -0
  531. package/package.json +128 -0
@@ -0,0 +1,198 @@
1
+ import { jsxs as u, Fragment as R, jsx as o } from "react/jsx-runtime";
2
+ import { u as q, b9 as k, $ as J, bF as Q, b as U, m 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-DXWy23Yd.js";
3
+ import { useState as l } from "react";
4
+ import { useTranslation as ie } from "react-i18next";
5
+ import { useNavigate as le, Link as F } from "react-router-dom";
6
+ const C = {
7
+ config: {},
8
+ executor: ""
9
+ };
10
+ function ge() {
11
+ const { adminClient: h } = q(), { t: a } = ie(), I = le(), { realm: d, profileName: n } = k(), { executorName: i } = k(), { addAlert: A, addError: G } = J(), [H, P] = l(!1), x = Q().componentTypes?.["org.keycloak.services.clientpolicy.executor.ClientPolicyExecutorProvider"], [f, N] = l([]), [O, B] = l([]), [T, L] = l([]), [D, $] = l([]), p = U({ defaultValues: C }), { control: j, reset: v, handleSubmit: w } = p, c = !!i, y = (e) => {
12
+ const r = e.find((s) => s.name === n)?.executors?.find(
13
+ (s) => s.executor === i
14
+ );
15
+ r && v({ config: r.configuration });
16
+ };
17
+ W(
18
+ () => h.clientPolicies.listProfiles({ includeGlobalProfiles: !0 }),
19
+ (e) => {
20
+ L(e.globalProfiles), $(e.profiles), y(e.profiles), y(e.globalProfiles);
21
+ },
22
+ []
23
+ );
24
+ const z = async () => {
25
+ const e = p.getValues(), t = D.map((r) => {
26
+ if (r.name !== n)
27
+ return r;
28
+ const s = (r.executors ?? []).concat({
29
+ executor: e.executor,
30
+ configuration: e.config || {}
31
+ });
32
+ if (c) {
33
+ const S = r.executors.find(
34
+ (M) => M.executor === i
35
+ );
36
+ S.configuration = {
37
+ ...S.configuration,
38
+ ...e.config
39
+ };
40
+ }
41
+ return c ? r : {
42
+ ...r,
43
+ executors: s
44
+ };
45
+ });
46
+ try {
47
+ await h.clientPolicies.createProfiles({
48
+ profiles: t,
49
+ globalProfiles: T
50
+ }), A(
51
+ a(c ? "updateExecutorSuccess" : "addExecutorSuccess"),
52
+ ne.success
53
+ ), I(b({ realm: d, profileName: n }));
54
+ } catch (r) {
55
+ G(c ? "updateExecutorError" : "addExecutorError", r);
56
+ }
57
+ }, m = T.find(
58
+ (e) => e.name === n
59
+ ), E = x?.find(
60
+ (e) => e.id === i
61
+ ), K = E?.properties.map(
62
+ (e) => {
63
+ const t = c ? e.defaultValue : "";
64
+ return {
65
+ ...e,
66
+ defaultValue: t
67
+ };
68
+ }
69
+ );
70
+ return /* @__PURE__ */ u(R, { children: [
71
+ /* @__PURE__ */ o(
72
+ X,
73
+ {
74
+ titleKey: c ? i : a("addExecutor"),
75
+ divider: !0
76
+ }
77
+ ),
78
+ /* @__PURE__ */ u(Y, { variant: "light", children: [
79
+ /* @__PURE__ */ u(
80
+ Z,
81
+ {
82
+ isHorizontal: !0,
83
+ role: "manage-realm",
84
+ className: "pf-v5-u-mt-lg",
85
+ isReadOnly: !!m,
86
+ children: [
87
+ /* @__PURE__ */ o(
88
+ _,
89
+ {
90
+ label: a("executorType"),
91
+ fieldId: "kc-executorType",
92
+ labelIcon: f.length > 0 && f[0].helpText !== "" ? /* @__PURE__ */ o(
93
+ V,
94
+ {
95
+ helpText: f[0].helpText,
96
+ fieldLabelId: "executorTypeHelpText"
97
+ }
98
+ ) : c ? /* @__PURE__ */ o(
99
+ V,
100
+ {
101
+ helpText: E?.helpText,
102
+ fieldLabelId: "executorTypeHelpText"
103
+ }
104
+ ) : void 0,
105
+ children: /* @__PURE__ */ o(
106
+ ee,
107
+ {
108
+ name: "executor",
109
+ defaultValue: "",
110
+ control: j,
111
+ render: ({ field: e }) => /* @__PURE__ */ o(
112
+ te,
113
+ {
114
+ toggleId: "kc-executor",
115
+ placeholderText: "Select an executor",
116
+ onToggle: (t) => P(t),
117
+ onSelect: (t) => {
118
+ v({ ...C, executor: t.toString() });
119
+ const r = x?.filter(
120
+ (s) => s.id === t
121
+ );
122
+ N(r ?? []), B(
123
+ r?.[0].properties ?? []
124
+ ), P(!1);
125
+ },
126
+ selections: c ? i : e.value,
127
+ variant: oe.single,
128
+ "data-testid": "executorType-select",
129
+ "aria-label": a("executorType"),
130
+ isOpen: H,
131
+ maxHeight: 580,
132
+ isDisabled: c,
133
+ children: x?.map((t) => /* @__PURE__ */ o(
134
+ re,
135
+ {
136
+ selected: t.id === e.value,
137
+ value: t.id,
138
+ description: t.helpText,
139
+ children: t.id
140
+ },
141
+ t.id
142
+ ))
143
+ }
144
+ )
145
+ }
146
+ )
147
+ }
148
+ ),
149
+ /* @__PURE__ */ o(ce, { ...p, children: /* @__PURE__ */ o(
150
+ ae,
151
+ {
152
+ properties: c ? K : O
153
+ }
154
+ ) }),
155
+ !m && /* @__PURE__ */ u(se, { children: [
156
+ /* @__PURE__ */ o(
157
+ g,
158
+ {
159
+ variant: "primary",
160
+ onClick: () => w(z)(),
161
+ "data-testid": "addExecutor-saveBtn",
162
+ children: a(c ? "save" : "add")
163
+ }
164
+ ),
165
+ /* @__PURE__ */ o(
166
+ g,
167
+ {
168
+ variant: "link",
169
+ component: (e) => /* @__PURE__ */ o(
170
+ F,
171
+ {
172
+ ...e,
173
+ to: b({ realm: d, profileName: n })
174
+ }
175
+ ),
176
+ "data-testid": "addExecutor-cancelBtn",
177
+ children: a("cancel")
178
+ }
179
+ )
180
+ ] })
181
+ ]
182
+ }
183
+ ),
184
+ c && m && /* @__PURE__ */ o("div", { className: "kc-backToProfile", children: /* @__PURE__ */ o(
185
+ g,
186
+ {
187
+ component: (e) => /* @__PURE__ */ o(F, { ...e, to: b({ realm: d, profileName: n }) }),
188
+ variant: "primary",
189
+ children: a("back")
190
+ }
191
+ ) })
192
+ ] })
193
+ ] });
194
+ }
195
+ export {
196
+ ge as default
197
+ };
198
+ //# sourceMappingURL=ExecutorForm-DwNxoZuZ.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ExecutorForm-DwNxoZuZ.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 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,MAAgBC,KAElB,EAAE,GAAAC,MAAMC,MACRC,IAAWC,MACX,EAAE,OAAAC,GAAO,aAAAC,EAAY,IAAIC,EAA+B,GACxD,EAAE,cAAAC,MAAiBD,KACnB,EAAE,UAAAE,GAAU,UAAAC,EAAS,IAAIC,EAAU,GACnC,CAACC,GAAwBC,CAAyB,IAAIC,EAAS,EAAK,GAEpEC,IADaC,IAEN,iBACT,0EACF,GACI,CAACC,GAAWC,CAAY,IAAIJ,EAAwC,CAAE,CAAA,GACtE,CAACK,GAAoBC,CAAqB,IAAIN,EAElD,CAAE,CAAA,GACE,CAACO,GAAgBC,CAAiB,IAAIR,EAE1C,CAAE,CAAA,GACE,CAACS,GAAUC,CAAW,IAAIV,EAAwC,CAAE,CAAA,GACpEW,IAAOC,EAAQ,EAAE,eAAA7B,EAAe,CAAA,GAChC,EAAE,SAAA8B,GAAS,OAAAC,GAAO,cAAAC,EAAA,IAAiBJ,GACnCK,IAAW,CAAC,CAACtB,GAEbuB,IAAY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