@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,286 @@
1
+ import { jsx as e, jsxs as I, Fragment as x } from "react/jsx-runtime";
2
+ import { u as T, b5 as q, m as H, bd as L, bf as S, bg as w, b6 as M, b7 as E, b8 as G, aP as j, $ as K, b as U, b9 as $, ba as Q, aY as W, bm as Y, d as D, bb as F, V as J, aG as X, P as Z, F as ee, c as ae, Q as g, bn as se, bo as re, bp as te, A as ne, B as N, g as oe, aO as le, bq as ie, aN as ce } from "./index-DXWy23Yd.js";
3
+ import { useState as m } from "react";
4
+ import { useTranslation as V } from "react-i18next";
5
+ import { useNavigate as ue, Link as de } from "react-router-dom";
6
+ const me = ({ clientId: l }) => {
7
+ const { adminClient: a } = T(), { t: i } = V(), { control: y } = q(), [A, v] = m(!1), [u, C] = m(), [p, b] = m("");
8
+ H(
9
+ () => {
10
+ const o = {
11
+ id: l,
12
+ first: 0,
13
+ max: 20,
14
+ deep: !1,
15
+ name: p
16
+ };
17
+ return a.clients.listAllScopes(o);
18
+ },
19
+ C,
20
+ [p]
21
+ );
22
+ const h = (o) => o.map((s) => /* @__PURE__ */ e(j, { value: s, children: s.name }, s.id));
23
+ return u ? /* @__PURE__ */ e(
24
+ S,
25
+ {
26
+ label: i("authorizationScopes"),
27
+ labelIcon: /* @__PURE__ */ e(w, { helpText: i("clientScopesHelp"), fieldLabelId: "scopes" }),
28
+ fieldId: "scopes",
29
+ children: /* @__PURE__ */ e(
30
+ M,
31
+ {
32
+ name: "scopes",
33
+ defaultValue: [],
34
+ control: y,
35
+ render: ({ field: o }) => /* @__PURE__ */ e(
36
+ E,
37
+ {
38
+ toggleId: "scopes",
39
+ variant: G.typeaheadMulti,
40
+ chipGroupProps: {
41
+ numChips: 3,
42
+ expandedText: i("hide"),
43
+ collapsedText: i("showRemaining")
44
+ },
45
+ onToggle: (s) => v(s),
46
+ isOpen: A,
47
+ selections: o.value.map((s) => s.name),
48
+ onFilter: (s) => (b(s), h(u)),
49
+ onSelect: (s) => {
50
+ const r = typeof s == "string" ? s : s.name, t = o.value.find(
51
+ (c) => c.name === r
52
+ ) ? o.value.filter((c) => c.name !== r) : [...o.value, s];
53
+ o.onChange(t);
54
+ },
55
+ onClear: () => {
56
+ b(""), o.onChange([]);
57
+ },
58
+ typeAheadAriaLabel: i("authorizationScopes"),
59
+ children: h(u)
60
+ }
61
+ )
62
+ }
63
+ )
64
+ }
65
+ ) : /* @__PURE__ */ e(L, {});
66
+ };
67
+ function ve() {
68
+ const { adminClient: l } = T(), { t: a } = V(), [i, y] = m(), [A, v] = m(), [u, C] = m(), { addAlert: p, addError: b } = K(), h = U({
69
+ mode: "onChange"
70
+ }), { setValue: o, handleSubmit: s } = h, { id: r, resourceId: t, realm: c } = $(), P = ue(), O = (n = {}) => {
71
+ ce(n, o);
72
+ }, { hasAccess: k } = Q(), R = !k("manage-authorization");
73
+ H(
74
+ () => Promise.all([
75
+ l.clients.findOne({ id: r }),
76
+ t ? l.clients.getResource({ id: r, resourceId: t }) : Promise.resolve(void 0),
77
+ t ? l.clients.listPermissionsByResource({ id: r, resourceId: t }) : Promise.resolve(void 0)
78
+ ]),
79
+ ([n, d, f]) => {
80
+ if (!n)
81
+ throw new Error(a("notFound"));
82
+ y(n), C(f), v(d), O(d);
83
+ },
84
+ []
85
+ );
86
+ const z = async (n) => {
87
+ const d = le(n);
88
+ try {
89
+ if (t)
90
+ await l.clients.updateResource({ id: r, resourceId: t }, d);
91
+ else {
92
+ const f = await l.clients.createResource(
93
+ { id: r },
94
+ d
95
+ );
96
+ v(d), P(ie({ realm: c, id: r, resourceId: f._id }));
97
+ }
98
+ p(
99
+ a((t ? "update" : "create") + "ResourceSuccess"),
100
+ D.success
101
+ );
102
+ } catch (f) {
103
+ b("resourceSaveError", f);
104
+ }
105
+ }, [B, _] = W({
106
+ titleKey: "deleteResource",
107
+ children: /* @__PURE__ */ I(x, { children: [
108
+ a("deleteResourceConfirm"),
109
+ u?.length !== 0 && /* @__PURE__ */ e(
110
+ Y,
111
+ {
112
+ variant: "warning",
113
+ isInline: !0,
114
+ isPlain: !0,
115
+ title: a("deleteResourceWarning"),
116
+ className: "pf-v5-u-pt-lg",
117
+ children: /* @__PURE__ */ e("p", { className: "pf-v5-u-pt-xs", children: u?.map((n) => /* @__PURE__ */ e("strong", { className: "pf-v5-u-pr-md", children: n.name }, n.id)) })
118
+ }
119
+ )
120
+ ] }),
121
+ continueButtonLabel: "confirm",
122
+ onConfirm: async () => {
123
+ try {
124
+ await l.clients.delResource({
125
+ id: r,
126
+ resourceId: t
127
+ }), p(a("resourceDeletedSuccess"), D.success), P(F({ realm: c, clientId: r, tab: "resources" }));
128
+ } catch (n) {
129
+ b("resourceDeletedError", n);
130
+ }
131
+ }
132
+ });
133
+ return i ? /* @__PURE__ */ I(x, { children: [
134
+ /* @__PURE__ */ e(_, {}),
135
+ /* @__PURE__ */ e(
136
+ J,
137
+ {
138
+ titleKey: t ? A?.name : "createResource",
139
+ dropdownItems: t ? [
140
+ /* @__PURE__ */ e(
141
+ X,
142
+ {
143
+ "data-testid": "delete-resource",
144
+ isDisabled: R,
145
+ onClick: () => B(),
146
+ children: a("delete")
147
+ },
148
+ "delete"
149
+ )
150
+ ] : void 0
151
+ }
152
+ ),
153
+ /* @__PURE__ */ e(Z, { variant: "light", children: /* @__PURE__ */ e(ee, { ...h, children: /* @__PURE__ */ I(
154
+ ae,
155
+ {
156
+ isHorizontal: !0,
157
+ role: "manage-authorization",
158
+ className: "keycloak__resource-details__form",
159
+ onSubmit: s(z),
160
+ children: [
161
+ /* @__PURE__ */ e(
162
+ g,
163
+ {
164
+ name: t ? "owner.name" : "",
165
+ label: a("owner"),
166
+ labelIcon: a("ownerHelp"),
167
+ defaultValue: i.clientId,
168
+ readOnly: !0
169
+ }
170
+ ),
171
+ /* @__PURE__ */ e(
172
+ g,
173
+ {
174
+ name: "name",
175
+ label: a("name"),
176
+ labelIcon: a("resourceNameHelp"),
177
+ rules: { required: a("required") }
178
+ }
179
+ ),
180
+ /* @__PURE__ */ e(
181
+ g,
182
+ {
183
+ name: "displayName",
184
+ label: a("displayName"),
185
+ labelIcon: a("displayNameHelp"),
186
+ rules: { required: a("required") }
187
+ }
188
+ ),
189
+ /* @__PURE__ */ e(
190
+ g,
191
+ {
192
+ name: "type",
193
+ label: a("type"),
194
+ labelIcon: a("resourceDetailsTypeHelp")
195
+ }
196
+ ),
197
+ /* @__PURE__ */ e(
198
+ S,
199
+ {
200
+ label: a("uris"),
201
+ fieldId: "uris",
202
+ labelIcon: /* @__PURE__ */ e(w, { helpText: a("urisHelp"), fieldLabelId: "uris" }),
203
+ children: /* @__PURE__ */ e(
204
+ se,
205
+ {
206
+ name: "uris",
207
+ type: "url",
208
+ "aria-label": a("uris"),
209
+ addButtonLabel: "addUri"
210
+ }
211
+ )
212
+ }
213
+ ),
214
+ /* @__PURE__ */ e(me, { clientId: r }),
215
+ /* @__PURE__ */ e(
216
+ g,
217
+ {
218
+ name: "icon_uri",
219
+ label: a("iconUri"),
220
+ labelIcon: a("iconUriHelp"),
221
+ type: "url"
222
+ }
223
+ ),
224
+ /* @__PURE__ */ e(
225
+ re,
226
+ {
227
+ name: "ownerManagedAccess",
228
+ label: a("ownerManagedAccess"),
229
+ labelIcon: a("ownerManagedAccessHelp")
230
+ }
231
+ ),
232
+ /* @__PURE__ */ e(
233
+ S,
234
+ {
235
+ hasNoPaddingTop: !0,
236
+ label: a("resourceAttribute"),
237
+ labelIcon: /* @__PURE__ */ e(
238
+ w,
239
+ {
240
+ helpText: a("resourceAttributeHelp"),
241
+ fieldLabelId: "resourceAttribute"
242
+ }
243
+ ),
244
+ fieldId: "resourceAttribute",
245
+ children: /* @__PURE__ */ e(te, { name: "attributes", isDisabled: R })
246
+ }
247
+ ),
248
+ /* @__PURE__ */ e(ne, { children: /* @__PURE__ */ I("div", { className: "pf-v5-u-mt-md", children: [
249
+ /* @__PURE__ */ e(
250
+ N,
251
+ {
252
+ variant: oe.primary,
253
+ type: "submit",
254
+ "data-testid": "save",
255
+ children: a("save")
256
+ }
257
+ ),
258
+ /* @__PURE__ */ e(
259
+ N,
260
+ {
261
+ variant: "link",
262
+ "data-testid": "cancel",
263
+ component: (n) => /* @__PURE__ */ e(
264
+ de,
265
+ {
266
+ ...n,
267
+ to: F({
268
+ realm: c,
269
+ clientId: r,
270
+ tab: "resources"
271
+ })
272
+ }
273
+ ),
274
+ children: a("cancel")
275
+ }
276
+ )
277
+ ] }) })
278
+ ]
279
+ }
280
+ ) }) })
281
+ ] }) : /* @__PURE__ */ e(L, {});
282
+ }
283
+ export {
284
+ ve as default
285
+ };
286
+ //# sourceMappingURL=ResourceDetails-apuGPq7h.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ResourceDetails-apuGPq7h.js","sources":["../src/clients/authorization/ScopePicker.tsx","../src/clients/authorization/ResourceDetails.tsx"],"sourcesContent":["import type ScopeRepresentation from \"@keycloak/keycloak-admin-client/lib/defs/scopeRepresentation\";\nimport {\n HelpItem,\n KeycloakSelect,\n SelectVariant,\n useFetch,\n} from \"@keycloak/keycloak-ui-shared\";\nimport { FormGroup, SelectOption } from \"@patternfly/react-core\";\nimport { useState } from \"react\";\nimport { Controller, useFormContext } from \"react-hook-form\";\nimport { useTranslation } from \"react-i18next\";\nimport { useAdminClient } from \"../../admin-client\";\nimport { KeycloakSpinner } from \"@keycloak/keycloak-ui-shared\";\n\ntype Scope = {\n id: string;\n name: string;\n};\n\nexport const ScopePicker = ({ clientId }: { clientId: string }) => {\n const { adminClient } = useAdminClient();\n\n const { t } = useTranslation();\n const { control } = useFormContext();\n\n const [open, setOpen] = useState(false);\n const [scopes, setScopes] = useState<ScopeRepresentation[]>();\n const [search, setSearch] = useState(\"\");\n\n useFetch(\n () => {\n const params = {\n id: clientId,\n first: 0,\n max: 20,\n deep: false,\n name: search,\n };\n return adminClient.clients.listAllScopes(params);\n },\n setScopes,\n [search],\n );\n\n const renderScopes = (scopes: ScopeRepresentation[]) =>\n scopes.map((option) => (\n <SelectOption key={option.id} value={option}>\n {option.name}\n </SelectOption>\n ));\n\n if (!scopes) return <KeycloakSpinner />;\n return (\n <FormGroup\n label={t(\"authorizationScopes\")}\n labelIcon={\n <HelpItem helpText={t(\"clientScopesHelp\")} fieldLabelId=\"scopes\" />\n }\n fieldId=\"scopes\"\n >\n <Controller\n name=\"scopes\"\n defaultValue={[]}\n control={control}\n render={({ field }) => (\n <KeycloakSelect\n toggleId=\"scopes\"\n variant={SelectVariant.typeaheadMulti}\n chipGroupProps={{\n numChips: 3,\n expandedText: t(\"hide\"),\n collapsedText: t(\"showRemaining\"),\n }}\n onToggle={(val) => setOpen(val)}\n isOpen={open}\n selections={field.value.map((o: Scope) => o.name)}\n onFilter={(value) => {\n setSearch(value);\n return renderScopes(scopes);\n }}\n onSelect={(selectedValue) => {\n const option =\n typeof selectedValue === \"string\"\n ? selectedValue\n : (selectedValue as Scope).name;\n const changedValue = field.value.find(\n (o: Scope) => o.name === option,\n )\n ? field.value.filter((item: Scope) => item.name !== option)\n : [...field.value, selectedValue];\n field.onChange(changedValue);\n }}\n onClear={() => {\n setSearch(\"\");\n field.onChange([]);\n }}\n typeAheadAriaLabel={t(\"authorizationScopes\")}\n >\n {renderScopes(scopes)}\n </KeycloakSelect>\n )}\n />\n </FormGroup>\n );\n};\n","import type ClientRepresentation from \"@keycloak/keycloak-admin-client/lib/defs/clientRepresentation\";\nimport type ResourceRepresentation from \"@keycloak/keycloak-admin-client/lib/defs/resourceRepresentation\";\nimport type ResourceServerRepresentation from \"@keycloak/keycloak-admin-client/lib/defs/resourceServerRepresentation\";\nimport {\n HelpItem,\n TextControl,\n useAlerts,\n useFetch,\n} from \"@keycloak/keycloak-ui-shared\";\nimport {\n ActionGroup,\n Alert,\n AlertVariant,\n Button,\n ButtonVariant,\n DropdownItem,\n FormGroup,\n PageSection,\n} from \"@patternfly/react-core\";\nimport { useState } from \"react\";\nimport { FormProvider, useForm } from \"react-hook-form\";\nimport { useTranslation } from \"react-i18next\";\nimport { Link, useNavigate } from \"react-router-dom\";\nimport { useAdminClient } from \"../../admin-client\";\nimport { DefaultSwitchControl } from \"../../components/SwitchControl\";\nimport { useConfirmDialog } from \"../../components/confirm-dialog/ConfirmDialog\";\nimport { FormAccess } from \"../../components/form/FormAccess\";\nimport { KeyValueInput } from \"../../components/key-value-form/KeyValueInput\";\nimport type { KeyValueType } from \"../../components/key-value-form/key-value-convert\";\nimport { KeycloakSpinner } from \"@keycloak/keycloak-ui-shared\";\nimport { MultiLineInput } from \"../../components/multi-line-input/MultiLineInput\";\nimport { ViewHeader } from \"../../components/view-header/ViewHeader\";\nimport { useAccess } from \"../../context/access/Access\";\nimport { convertFormValuesToObject, convertToFormValues } from \"../../util\";\nimport { useParams } from \"../../utils/useParams\";\nimport { toAuthorizationTab } from \"../routes/AuthenticationTab\";\nimport { ResourceDetailsParams, toResourceDetails } from \"../routes/Resource\";\nimport { ScopePicker } from \"./ScopePicker\";\nimport \"./resource-details.css\";\n\ntype SubmittedResource = Omit<\n ResourceRepresentation,\n \"attributes\" | \"scopes\"\n> & {\n attributes: KeyValueType[];\n};\n\nexport default function ResourceDetails() {\n const { adminClient } = useAdminClient();\n\n const { t } = useTranslation();\n const [client, setClient] = useState<ClientRepresentation>();\n const [resource, setResource] = useState<ResourceRepresentation>();\n\n const [permissions, setPermission] =\n useState<ResourceServerRepresentation[]>();\n\n const { addAlert, addError } = useAlerts();\n const form = useForm<SubmittedResource>({\n mode: \"onChange\",\n });\n const { setValue, handleSubmit } = form;\n\n const { id, resourceId, realm } = useParams<ResourceDetailsParams>();\n const navigate = useNavigate();\n\n const setupForm = (resource: ResourceRepresentation = {}) => {\n convertToFormValues(resource, setValue);\n };\n\n const { hasAccess } = useAccess();\n\n const isDisabled = !hasAccess(\"manage-authorization\");\n\n useFetch(\n () =>\n Promise.all([\n adminClient.clients.findOne({ id }),\n resourceId\n ? adminClient.clients.getResource({ id, resourceId })\n : Promise.resolve(undefined),\n resourceId\n ? adminClient.clients.listPermissionsByResource({ id, resourceId })\n : Promise.resolve(undefined),\n ]),\n ([client, resource, permissions]) => {\n if (!client) {\n throw new Error(t(\"notFound\"));\n }\n setClient(client);\n setPermission(permissions);\n setResource(resource);\n setupForm(resource);\n },\n [],\n );\n\n const submit = async (submitted: SubmittedResource) => {\n const resource = convertFormValuesToObject<\n SubmittedResource,\n ResourceRepresentation\n >(submitted);\n\n try {\n if (resourceId) {\n await adminClient.clients.updateResource({ id, resourceId }, resource);\n } else {\n const result = await adminClient.clients.createResource(\n { id },\n resource,\n );\n setResource(resource);\n navigate(toResourceDetails({ realm, id, resourceId: result._id! }));\n }\n addAlert(\n t((resourceId ? \"update\" : \"create\") + \"ResourceSuccess\"),\n AlertVariant.success,\n );\n } catch (error) {\n addError(\"resourceSaveError\", error);\n }\n };\n\n const [toggleDeleteDialog, DeleteConfirm] = useConfirmDialog({\n titleKey: \"deleteResource\",\n children: (\n <>\n {t(\"deleteResourceConfirm\")}\n {permissions?.length !== 0 && (\n <Alert\n variant=\"warning\"\n isInline\n isPlain\n title={t(\"deleteResourceWarning\")}\n className=\"pf-v5-u-pt-lg\"\n >\n <p className=\"pf-v5-u-pt-xs\">\n {permissions?.map((permission) => (\n <strong key={permission.id} className=\"pf-v5-u-pr-md\">\n {permission.name}\n </strong>\n ))}\n </p>\n </Alert>\n )}\n </>\n ),\n continueButtonLabel: \"confirm\",\n onConfirm: async () => {\n try {\n await adminClient.clients.delResource({\n id,\n resourceId: resourceId!,\n });\n addAlert(t(\"resourceDeletedSuccess\"), AlertVariant.success);\n navigate(toAuthorizationTab({ realm, clientId: id, tab: \"resources\" }));\n } catch (error) {\n addError(\"resourceDeletedError\", error);\n }\n },\n });\n\n if (!client) {\n return <KeycloakSpinner />;\n }\n\n return (\n <>\n <DeleteConfirm />\n <ViewHeader\n titleKey={resourceId ? resource?.name! : \"createResource\"}\n dropdownItems={\n resourceId\n ? [\n <DropdownItem\n key=\"delete\"\n data-testid=\"delete-resource\"\n isDisabled={isDisabled}\n onClick={() => toggleDeleteDialog()}\n >\n {t(\"delete\")}\n </DropdownItem>,\n ]\n : undefined\n }\n />\n <PageSection variant=\"light\">\n <FormProvider {...form}>\n <FormAccess\n isHorizontal\n role=\"manage-authorization\"\n className=\"keycloak__resource-details__form\"\n onSubmit={handleSubmit(submit)}\n >\n <TextControl\n name={resourceId ? \"owner.name\" : \"\"}\n label={t(\"owner\")}\n labelIcon={t(\"ownerHelp\")}\n defaultValue={client.clientId}\n readOnly\n />\n <TextControl\n name={\"name\"}\n label={t(\"name\")}\n labelIcon={t(\"resourceNameHelp\")}\n rules={{ required: t(\"required\") }}\n />\n <TextControl\n name=\"displayName\"\n label={t(\"displayName\")}\n labelIcon={t(\"displayNameHelp\")}\n rules={{ required: t(\"required\") }}\n />\n <TextControl\n name=\"type\"\n label={t(\"type\")}\n labelIcon={t(\"resourceDetailsTypeHelp\")}\n />\n <FormGroup\n label={t(\"uris\")}\n fieldId=\"uris\"\n labelIcon={\n <HelpItem helpText={t(\"urisHelp\")} fieldLabelId=\"uris\" />\n }\n >\n <MultiLineInput\n name=\"uris\"\n type=\"url\"\n aria-label={t(\"uris\")}\n addButtonLabel=\"addUri\"\n />\n </FormGroup>\n <ScopePicker clientId={id} />\n <TextControl\n name=\"icon_uri\"\n label={t(\"iconUri\")}\n labelIcon={t(\"iconUriHelp\")}\n type=\"url\"\n />\n <DefaultSwitchControl\n name=\"ownerManagedAccess\"\n label={t(\"ownerManagedAccess\")}\n labelIcon={t(\"ownerManagedAccessHelp\")}\n />\n <FormGroup\n hasNoPaddingTop\n label={t(\"resourceAttribute\")}\n labelIcon={\n <HelpItem\n helpText={t(\"resourceAttributeHelp\")}\n fieldLabelId=\"resourceAttribute\"\n />\n }\n fieldId=\"resourceAttribute\"\n >\n <KeyValueInput name=\"attributes\" isDisabled={isDisabled} />\n </FormGroup>\n <ActionGroup>\n <div className=\"pf-v5-u-mt-md\">\n <Button\n variant={ButtonVariant.primary}\n type=\"submit\"\n data-testid=\"save\"\n >\n {t(\"save\")}\n </Button>\n\n <Button\n variant=\"link\"\n data-testid=\"cancel\"\n component={(props) => (\n <Link\n {...props}\n to={toAuthorizationTab({\n realm,\n clientId: id,\n tab: \"resources\",\n })}\n ></Link>\n )}\n >\n {t(\"cancel\")}\n </Button>\n </div>\n </ActionGroup>\n </FormAccess>\n </FormProvider>\n </PageSection>\n </>\n );\n}\n"],"names":["ScopePicker","clientId","adminClient","useAdminClient","t","useTranslation","control","useFormContext","open","setOpen","useState","scopes","setScopes","search","setSearch","useFetch","params","renderScopes","option","jsx","SelectOption","FormGroup","HelpItem","Controller","field","KeycloakSelect","SelectVariant","val","o","value","selectedValue","changedValue","item","KeycloakSpinner","ResourceDetails","client","setClient","resource","setResource","permissions","setPermission","addAlert","addError","useAlerts","form","useForm","setValue","handleSubmit","id","resourceId","realm","useParams","navigate","useNavigate","setupForm","convertToFormValues","hasAccess","useAccess","isDisabled","submit","submitted","convertFormValuesToObject","result","toResourceDetails","AlertVariant","error","toggleDeleteDialog","DeleteConfirm","useConfirmDialog","jsxs","Fragment","Alert","permission","toAuthorizationTab","ViewHeader","DropdownItem","PageSection","FormProvider","FormAccess","TextControl","MultiLineInput","DefaultSwitchControl","KeyValueInput","ActionGroup","Button","ButtonVariant","props","Link"],"mappings":";;;;;AAmBO,MAAMA,KAAc,CAAC,EAAE,UAAAC,QAAqC;AAC3D,QAAA,EAAE,aAAAC,MAAgBC,KAElB,EAAE,GAAAC,MAAMC,KACR,EAAE,SAAAC,MAAYC,KAEd,CAACC,GAAMC,CAAO,IAAIC,EAAS,EAAK,GAChC,CAACC,GAAQC,CAAS,IAAIF,EAAgC,GACtD,CAACG,GAAQC,CAAS,IAAIJ,EAAS,EAAE;AAEvCK,EAAAA;AAAAA,IACE,MAAM;AACJ,YAAMC,IAAS;AAAA,QACb,IAAIf;AAAA,QACJ,OAAO;AAAA,QACP,KAAK;AAAA,QACL,MAAM;AAAA,QACN,MAAMY;AAAA,MAAA;AAED,aAAAX,EAAY,QAAQ,cAAcc,CAAM;AAAA,IACjD;AAAA,IACAJ;AAAA,IACA,CAACC,CAAM;AAAA,EAAA;AAGT,QAAMI,IAAe,CAACN,MACpBA,EAAO,IAAI,CAACO,MACT,gBAAAC,EAAAC,GAAA,EAA6B,OAAOF,GAClC,UAAAA,EAAO,KADS,GAAAA,EAAO,EAE1B,CACD;AAEH,SAAKP,IAEH,gBAAAQ;AAAA,IAACE;AAAA,IAAA;AAAA,MACC,OAAOjB,EAAE,qBAAqB;AAAA,MAC9B,6BACGkB,GAAS,EAAA,UAAUlB,EAAE,kBAAkB,GAAG,cAAa,UAAS;AAAA,MAEnE,S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A,gBAAA;AAAA,cACf;AAAA,cAEF,SAAQ;AAAA,cAER,UAAC,gBAAAe,EAAA+D,IAAA,EAAc,MAAK,cAAa,YAAAxB,GAAwB;AAAA,YAAA;AAAA,UAC3D;AAAA,UACC,gBAAAvC,EAAAgE,IAAA,EACC,UAAC,gBAAAd,EAAA,OAAA,EAAI,WAAU,iBACb,UAAA;AAAA,YAAA,gBAAAlD;AAAA,cAACiE;AAAA,cAAA;AAAA,gBACC,SAASC,GAAc;AAAA,gBACvB,MAAK;AAAA,gBACL,eAAY;AAAA,gBAEX,YAAE,MAAM;AAAA,cAAA;AAAA,YACX;AAAA,YAEA,gBAAAlE;AAAA,cAACiE;AAAA,cAAA;AAAA,gBACC,SAAQ;AAAA,gBACR,eAAY;AAAA,gBACZ,WAAW,CAACE,MACV,gBAAAnE;AAAA,kBAACoE;AAAA,kBAAA;AAAA,oBACE,GAAGD;AAAA,oBACJ,IAAIb,EAAmB;AAAA,sBACrB,OAAAvB;AAAA,sBACA,UAAUF;AAAA,sBACV,KAAK;AAAA,oBAAA,CACN;AAAA,kBAAA;AAAA,gBACF;AAAA,gBAGF,YAAE,QAAQ;AAAA,cAAA;AAAA,YACb;AAAA,UAAA,EAAA,CACF,EACF,CAAA;AAAA,QAAA;AAAA,MAAA;AAAA,OAEJ,EACF,CAAA;AAAA,EACF,EAAA,CAAA,sBA7HQf,GAAgB,CAAA,CAAA;AA+H5B;"}
package/lib/Root.d.ts ADDED
@@ -0,0 +1 @@
1
+ export declare const Root: () => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,153 @@
1
+ import { jsxs as c, Fragment as D, jsx as t } from "react/jsx-runtime";
2
+ import { u as w, b9 as N, $ as z, aH as C, b as F, m as H, br as k, bb as l, V as U, aG as P, P as V, F as x, c as B, Q as d, A as E, B as m, g as T, d as j } from "./index-DXWy23Yd.js";
3
+ import { useState as q } from "react";
4
+ import { useTranslation as G } from "react-i18next";
5
+ import { useNavigate as Q, Link as $ } from "react-router-dom";
6
+ function R() {
7
+ const { adminClient: r } = w(), { t: e } = G(), { id: i, scopeId: o, realm: s } = N(), p = Q(), { addAlert: S, addError: v } = z(), [f, u] = C(), [n, h] = q(), b = F({
8
+ mode: "onChange"
9
+ }), { reset: g, handleSubmit: y } = b;
10
+ H(
11
+ async () => {
12
+ if (o) {
13
+ const a = await r.clients.getAuthorizationScope({
14
+ id: i,
15
+ scopeId: o
16
+ });
17
+ if (!a)
18
+ throw new Error(e("notFound"));
19
+ return a;
20
+ }
21
+ },
22
+ (a) => {
23
+ h(a), g({ ...a });
24
+ },
25
+ []
26
+ );
27
+ const A = async (a) => {
28
+ try {
29
+ o ? (await r.clients.updateAuthorizationScope(
30
+ { id: i, scopeId: o },
31
+ a
32
+ ), h(a)) : (await r.clients.createAuthorizationScope(
33
+ { id: i },
34
+ {
35
+ name: a.name,
36
+ displayName: a.displayName,
37
+ iconUri: a.iconUri
38
+ }
39
+ ), p(l({ realm: s, clientId: i, tab: "scopes" }))), S(
40
+ e((o ? "update" : "create") + "ScopeSuccess"),
41
+ j.success
42
+ );
43
+ } catch (I) {
44
+ v("scopeSaveError", I);
45
+ }
46
+ };
47
+ return /* @__PURE__ */ c(D, { children: [
48
+ /* @__PURE__ */ t(
49
+ k,
50
+ {
51
+ clientId: i,
52
+ open: f,
53
+ toggleDialog: u,
54
+ selectedScope: n,
55
+ refresh: () => p(l({ realm: s, clientId: i, tab: "scopes" }))
56
+ }
57
+ ),
58
+ /* @__PURE__ */ t(
59
+ U,
60
+ {
61
+ titleKey: o ? n?.name : e("createAuthorizationScope"),
62
+ dropdownItems: o ? [
63
+ /* @__PURE__ */ t(
64
+ P,
65
+ {
66
+ "data-testid": "delete-resource",
67
+ onClick: () => u(),
68
+ children: e("delete")
69
+ },
70
+ "delete"
71
+ )
72
+ ] : void 0
73
+ }
74
+ ),
75
+ /* @__PURE__ */ t(V, { variant: "light", children: /* @__PURE__ */ t(x, { ...b, children: /* @__PURE__ */ c(
76
+ B,
77
+ {
78
+ isHorizontal: !0,
79
+ role: "manage-authorization",
80
+ onSubmit: y(A),
81
+ children: [
82
+ /* @__PURE__ */ t(
83
+ d,
84
+ {
85
+ name: "name",
86
+ label: e("name"),
87
+ labelIcon: e("scopeNameHelp"),
88
+ rules: { required: e("required") }
89
+ }
90
+ ),
91
+ /* @__PURE__ */ t(
92
+ d,
93
+ {
94
+ name: "displayName",
95
+ label: e("displayName"),
96
+ labelIcon: e("scopeDisplayNameHelp")
97
+ }
98
+ ),
99
+ /* @__PURE__ */ t(
100
+ d,
101
+ {
102
+ name: "iconUri",
103
+ label: e("iconUri"),
104
+ labelIcon: e("iconUriHelp")
105
+ }
106
+ ),
107
+ /* @__PURE__ */ t(E, { children: /* @__PURE__ */ c("div", { className: "pf-v5-u-mt-md", children: [
108
+ /* @__PURE__ */ t(
109
+ m,
110
+ {
111
+ variant: T.primary,
112
+ type: "submit",
113
+ "data-testid": "save",
114
+ children: e("save")
115
+ }
116
+ ),
117
+ n ? /* @__PURE__ */ t(
118
+ m,
119
+ {
120
+ variant: "link",
121
+ "data-testid": "revert",
122
+ onClick: () => g({ ...n }),
123
+ children: e("revert")
124
+ }
125
+ ) : /* @__PURE__ */ t(
126
+ m,
127
+ {
128
+ variant: "link",
129
+ "data-testid": "cancel",
130
+ component: (a) => /* @__PURE__ */ t(
131
+ $,
132
+ {
133
+ ...a,
134
+ to: l({
135
+ realm: s,
136
+ clientId: i,
137
+ tab: "scopes"
138
+ })
139
+ }
140
+ ),
141
+ children: e("cancel")
142
+ }
143
+ )
144
+ ] }) })
145
+ ]
146
+ }
147
+ ) }) })
148
+ ] });
149
+ }
150
+ export {
151
+ R as default
152
+ };
153
+ //# sourceMappingURL=ScopeDetails-CxuBwUaZ.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ScopeDetails-CxuBwUaZ.js","sources":["../src/clients/authorization/ScopeDetails.tsx"],"sourcesContent":["import type ScopeRepresentation from \"@keycloak/keycloak-admin-client/lib/defs/scopeRepresentation\";\nimport { TextControl, useAlerts, useFetch } from \"@keycloak/keycloak-ui-shared\";\nimport {\n ActionGroup,\n AlertVariant,\n Button,\n ButtonVariant,\n DropdownItem,\n PageSection,\n} from \"@patternfly/react-core\";\nimport { useState } from \"react\";\nimport { FormProvider, useForm } from \"react-hook-form\";\nimport { useTranslation } from \"react-i18next\";\nimport { Link, useNavigate } from \"react-router-dom\";\nimport { useAdminClient } from \"../../admin-client\";\nimport { FormAccess } from \"../../components/form/FormAccess\";\nimport { ViewHeader } from \"../../components/view-header/ViewHeader\";\nimport { useParams } from \"../../utils/useParams\";\nimport useToggle from \"../../utils/useToggle\";\nimport { toAuthorizationTab } from \"../routes/AuthenticationTab\";\nimport type { ScopeDetailsParams } from \"../routes/Scope\";\nimport { DeleteScopeDialog } from \"./DeleteScopeDialog\";\n\ntype FormFields = Omit<ScopeRepresentation, \"resources\">;\n\nexport default function ScopeDetails() {\n const { adminClient } = useAdminClient();\n\n const { t } = useTranslation();\n const { id, scopeId, realm } = useParams<ScopeDetailsParams>();\n const navigate = useNavigate();\n const { addAlert, addError } = useAlerts();\n const [deleteDialog, toggleDeleteDialog] = useToggle();\n const [scope, setScope] = useState<ScopeRepresentation>();\n const form = useForm<FormFields>({\n mode: \"onChange\",\n });\n const { reset, handleSubmit } = form;\n\n useFetch(\n async () => {\n if (scopeId) {\n const scope = await adminClient.clients.getAuthorizationScope({\n id,\n scopeId,\n });\n if (!scope) {\n throw new Error(t(\"notFound\"));\n }\n return scope;\n }\n },\n (scope) => {\n setScope(scope);\n reset({ ...scope });\n },\n [],\n );\n\n const onSubmit = async (scope: ScopeRepresentation) => {\n try {\n if (scopeId) {\n await adminClient.clients.updateAuthorizationScope(\n { id, scopeId },\n scope,\n );\n setScope(scope);\n } else {\n await adminClient.clients.createAuthorizationScope(\n { id },\n {\n name: scope.name!,\n displayName: scope.displayName,\n iconUri: scope.iconUri,\n },\n );\n navigate(toAuthorizationTab({ realm, clientId: id, tab: \"scopes\" }));\n }\n addAlert(\n t((scopeId ? \"update\" : \"create\") + \"ScopeSuccess\"),\n AlertVariant.success,\n );\n } catch (error) {\n addError(\"scopeSaveError\", error);\n }\n };\n\n return (\n <>\n <DeleteScopeDialog\n clientId={id}\n open={deleteDialog}\n toggleDialog={toggleDeleteDialog}\n selectedScope={scope}\n refresh={() =>\n navigate(toAuthorizationTab({ realm, clientId: id, tab: \"scopes\" }))\n }\n />\n <ViewHeader\n titleKey={scopeId ? scope?.name! : t(\"createAuthorizationScope\")}\n dropdownItems={\n scopeId\n ? [\n <DropdownItem\n key=\"delete\"\n data-testid=\"delete-resource\"\n onClick={() => toggleDeleteDialog()}\n >\n {t(\"delete\")}\n </DropdownItem>,\n ]\n : undefined\n }\n />\n <PageSection variant=\"light\">\n <FormProvider {...form}>\n <FormAccess\n isHorizontal\n role=\"manage-authorization\"\n onSubmit={handleSubmit(onSubmit)}\n >\n <TextControl\n name=\"name\"\n label={t(\"name\")}\n labelIcon={t(\"scopeNameHelp\")}\n rules={{ required: t(\"required\") }}\n />\n <TextControl\n name=\"displayName\"\n label={t(\"displayName\")}\n labelIcon={t(\"scopeDisplayNameHelp\")}\n />\n <TextControl\n name=\"iconUri\"\n label={t(\"iconUri\")}\n labelIcon={t(\"iconUriHelp\")}\n />\n <ActionGroup>\n <div className=\"pf-v5-u-mt-md\">\n <Button\n variant={ButtonVariant.primary}\n type=\"submit\"\n data-testid=\"save\"\n >\n {t(\"save\")}\n </Button>\n\n {!scope ? (\n <Button\n variant=\"link\"\n data-testid=\"cancel\"\n component={(props) => (\n <Link\n {...props}\n to={toAuthorizationTab({\n realm,\n clientId: id,\n tab: \"scopes\",\n })}\n ></Link>\n )}\n >\n {t(\"cancel\")}\n </Button>\n ) : (\n <Button\n variant=\"link\"\n data-testid=\"revert\"\n onClick={() => reset({ ...scope })}\n >\n {t(\"revert\")}\n </Button>\n )}\n </div>\n </ActionGroup>\n </FormAccess>\n </FormProvider>\n </PageSection>\n </>\n );\n}\n"],"names":["ScopeDetails","adminClient","useAdminClient","t","useTranslation","id","scopeId","realm","useParams","navigate","useNavigate","addAlert","addError","useAlerts","deleteDialog","toggleDeleteDialog","useToggle","scope","setScope","useState","form","useForm","reset","handleSubmit","useFetch","onSubmit","toAuthorizationTab","AlertVariant","error","jsxs","Fragment","jsx","DeleteScopeDialog","ViewHeader","DropdownItem","PageSection","FormProvider","FormAccess","TextControl","ActionGroup","Button","ButtonVariant","props","Link"],"mappings":";;;;;AAyBA,SAAwBA,IAAe;AAC/B,QAAA,EAAE,aAAAC,MAAgBC,KAElB,EAAE,GAAAC,MAAMC,KACR,EAAE,IAAAC,GAAI,SAAAC,GAAS,OAAAC,MAAUC,EAA8B,GACvDC,IAAWC,KACX,EAAE,UAAAC,GAAU,UAAAC,EAAS,IAAIC,EAAU,GACnC,CAACC,GAAcC,CAAkB,IAAIC,EAAU,GAC/C,CAACC,GAAOC,CAAQ,IAAIC,EAA8B,GAClDC,IAAOC,EAAoB;AAAA,IAC/B,MAAM;AAAA,EAAA,CACP,GACK,EAAE,OAAAC,GAAO,cAAAC,EAAiB,IAAAH;AAEhCI,EAAAA;AAAAA,IACE,YAAY;AACV,UAAIlB,GAAS;AACX,cAAMW,IAAQ,MAAMhB,EAAY,QAAQ,sBAAsB;AAAA,UAC5D,IAAAI;AAAA,UACA,SAAAC;AAAA,QAAA,CACD;AACD,YAAI,CAACW;AACH,gBAAM,IAAI,MAAMd,EAAE,UAAU,CAAC;AAExBc,eAAAA;AAAAA,MACT;AAAA,IACF;AAAA,IACA,CAACA,MAAU;AACT,MAAAC,EAASD,CAAK,GACRK,EAAA,EAAE,GAAGL,EAAAA,CAAO;AAAA,IACpB;AAAA,IACA,CAAC;AAAA,EAAA;AAGG,QAAAQ,IAAW,OAAOR,MAA+B;AACjD,QAAA;AACF,MAAIX,KACF,MAAML,EAAY,QAAQ;AAAA,QACxB,EAAE,IAAAI,GAAI,SAAAC,EAAQ;AAAA,QACdW;AAAAA,MAAA,GAEFC,EAASD,CAAK,MAEd,MAAMhB,EA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AAQ;AAAA,cAAA;AAAA,YAAA;AAAA,UASb,EAAA,CAEJ,EACF,CAAA;AAAA,QAAA;AAAA,MAAA;AAAA,OAEJ,EACF,CAAA;AAAA,EACF,EAAA,CAAA;AAEJ;"}
@@ -0,0 +1,10 @@
1
+ import { default as KeycloakAdminClient } from '@keycloak/keycloak-admin-client';
2
+ import { default as Keycloak } from 'keycloak-js';
3
+ import { Environment } from './environment';
4
+ export type AdminClientProps = {
5
+ keycloak: Keycloak;
6
+ adminClient: KeycloakAdminClient;
7
+ };
8
+ export declare const AdminClientContext: import('js/libs/ui-shared/dist/utils/createNamedContext').NamedContext<AdminClientProps | undefined>;
9
+ export declare const useAdminClient: () => AdminClientProps;
10
+ export declare function initAdminClient(keycloak: Keycloak, environment: Environment): Promise<KeycloakAdminClient>;
@@ -0,0 +1,14 @@
1
+ import { default as AuthenticationFlowRepresentation } from '@keycloak/keycloak-admin-client/lib/defs/authenticationFlowRepresentation';
2
+ import { default as RealmRepresentation } from '@keycloak/keycloak-admin-client/lib/defs/realmRepresentation';
3
+ import { UsedBy } from './components/UsedBy';
4
+ type UsedBy = "SPECIFIC_CLIENTS" | "SPECIFIC_PROVIDERS" | "DEFAULT";
5
+ export type AuthenticationType = AuthenticationFlowRepresentation & {
6
+ usedBy?: {
7
+ type?: UsedBy;
8
+ values: string[];
9
+ };
10
+ realm: RealmRepresentation;
11
+ };
12
+ export declare const REALM_FLOWS: Map<string, string>;
13
+ export default function AuthenticationSection(): import("react/jsx-runtime").JSX.Element;
14
+ export {};
@@ -0,0 +1,6 @@
1
+ type BindFlowDialogProps = {
2
+ flowAlias: string;
3
+ onClose: (used?: boolean) => void;
4
+ };
5
+ export declare const BindFlowDialog: ({ flowAlias, onClose }: BindFlowDialogProps) => import("react/jsx-runtime").JSX.Element;
6
+ export {};
@@ -0,0 +1 @@
1
+ export declare const BuildInLabel: () => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,8 @@
1
+ type DuplicateFlowModalProps = {
2
+ name: string;
3
+ description: string;
4
+ toggleDialog: () => void;
5
+ onComplete: () => void;
6
+ };
7
+ export declare const DuplicateFlowModal: ({ name, description, toggleDialog, onComplete, }: DuplicateFlowModalProps) => import("react/jsx-runtime").JSX.Element;
8
+ export {};
@@ -0,0 +1,7 @@
1
+ import { default as AuthenticationFlowRepresentation } from '@keycloak/keycloak-admin-client/lib/defs/authenticationFlowRepresentation';
2
+ type EditFlowModalProps = {
3
+ flow: AuthenticationFlowRepresentation;
4
+ toggleDialog: () => void;
5
+ };
6
+ export declare const EditFlowModal: ({ flow, toggleDialog }: EditFlowModalProps) => import("react/jsx-runtime").JSX.Element;
7
+ export {};
@@ -0,0 +1,10 @@
1
+ import { default as AuthenticationFlowRepresentation } from '@keycloak/keycloak-admin-client/lib/defs/authenticationFlowRepresentation';
2
+ import { AuthenticationProviderRepresentation } from '@keycloak/keycloak-admin-client/lib/defs/authenticatorConfigRepresentation';
3
+ import { Flow } from './components/modals/AddSubFlowModal';
4
+ type EmptyExecutionStateProps = {
5
+ flow: AuthenticationFlowRepresentation;
6
+ onAddExecution: (type: AuthenticationProviderRepresentation) => void;
7
+ onAddFlow: (flow: Flow) => void;
8
+ };
9
+ export declare const EmptyExecutionState: ({ flow, onAddExecution, onAddFlow, }: EmptyExecutionStateProps) => import("react/jsx-runtime").JSX.Element;
10
+ export {};
@@ -0,0 +1,3 @@
1
+ import { AuthenticationProviderRepresentation } from '@keycloak/keycloak-admin-client/lib/defs/authenticatorConfigRepresentation';
2
+ export declare const providerConditionFilter: (value: AuthenticationProviderRepresentation) => boolean | undefined;
3
+ export default function FlowDetails(): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1 @@
1
+ export declare const RequiredActions: () => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,10 @@
1
+ import { AuthenticationProviderRepresentation } from '@keycloak/keycloak-admin-client/lib/defs/authenticatorConfigRepresentation';
2
+ import { ExpandableExecution } from '../execution-model';
3
+ import { Flow } from './modals/AddSubFlowModal';
4
+ type AddFlowDropdownProps = {
5
+ execution: ExpandableExecution;
6
+ onAddExecution: (execution: ExpandableExecution, type: AuthenticationProviderRepresentation) => void;
7
+ onAddFlow: (execution: ExpandableExecution, flow: Flow) => void;
8
+ };
9
+ export declare const AddFlowDropdown: ({ execution, onAddExecution, onAddFlow, }: AddFlowDropdownProps) => import("react/jsx-runtime").JSX.Element;
10
+ export {};
@@ -0,0 +1,20 @@
1
+ import { IAction, TableProps, ThProps } from '@patternfly/react-table';
2
+ import { ReactNode } from 'react';
3
+ export type Field<T> = Pick<ThProps, "width"> & {
4
+ name: string;
5
+ displayKey?: string;
6
+ cellRenderer?: (row: T) => ReactNode;
7
+ thTooltipText?: string;
8
+ };
9
+ export type Action<T> = IAction & {
10
+ isActionable?: (item: T) => boolean;
11
+ };
12
+ type DraggableTableProps<T> = Omit<TableProps, "data" | "ref"> & {
13
+ keyField: string;
14
+ columns: Field<T>[];
15
+ data: T[];
16
+ actions?: Action<T>[];
17
+ onDragFinish: (dragged: string, newOrder: string[]) => void;
18
+ };
19
+ export declare function DraggableTable<T>({ keyField, columns, data, actions, onDragFinish, ...props }: DraggableTableProps<T>): import("react/jsx-runtime").JSX.Element;
20
+ export {};
@@ -0,0 +1,7 @@
1
+ import { ExpandableExecution } from '../execution-model';
2
+ type EditFlowProps = {
3
+ execution: ExpandableExecution;
4
+ onRowChange: (execution: ExpandableExecution) => void;
5
+ };
6
+ export declare const EditFlow: ({ execution, onRowChange }: EditFlowProps) => import("react/jsx-runtime").JSX.Element;
7
+ export {};
@@ -0,0 +1,6 @@
1
+ import { ExpandableExecution } from '../execution-model';
2
+ type ExecutionConfigModalProps = {
3
+ execution: ExpandableExecution;
4
+ };
5
+ export declare const ExecutionConfigModal: ({ execution, }: ExecutionConfigModalProps) => import("react/jsx-runtime").JSX.Element;
6
+ export {};
@@ -0,0 +1,6 @@
1
+ import { ExecutionList } from '../execution-model';
2
+ type FlowDiagramProps = {
3
+ executionList: ExecutionList;
4
+ };
5
+ export declare const FlowDiagram: ({ executionList: { expandableList }, }: FlowDiagramProps) => import("react/jsx-runtime").JSX.Element;
6
+ export {};
@@ -0,0 +1 @@
1
+ export declare const FlowHeader: () => import("react/jsx-runtime").JSX.Element;