@flightctl/ui-components 0.10.0-rc7 → 1.0.0-rc1

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 (423) hide show
  1. package/dist/src/components/AuthProvider/AuthProviderDetails/AuthProviderDetails.d.ts +4 -0
  2. package/dist/src/components/AuthProvider/AuthProviderDetails/AuthProviderDetails.d.ts.map +1 -0
  3. package/dist/src/components/AuthProvider/AuthProviderDetails/AuthProviderDetails.js +57 -0
  4. package/dist/src/components/AuthProvider/AuthProviderDetails/AuthProviderDetails.js.map +1 -0
  5. package/dist/src/components/AuthProvider/AuthProviderDetails/AuthProviderDetailsTab.d.ts +7 -0
  6. package/dist/src/components/AuthProvider/AuthProviderDetails/AuthProviderDetailsTab.d.ts.map +1 -0
  7. package/dist/src/components/AuthProvider/AuthProviderDetails/AuthProviderDetailsTab.js +118 -0
  8. package/dist/src/components/AuthProvider/AuthProviderDetails/AuthProviderDetailsTab.js.map +1 -0
  9. package/dist/src/components/AuthProvider/AuthProviderDetails/DeleteAuthProviderModal.d.ts +9 -0
  10. package/dist/src/components/AuthProvider/AuthProviderDetails/DeleteAuthProviderModal.d.ts.map +1 -0
  11. package/dist/src/components/AuthProvider/AuthProviderDetails/DeleteAuthProviderModal.js +55 -0
  12. package/dist/src/components/AuthProvider/AuthProviderDetails/DeleteAuthProviderModal.js.map +1 -0
  13. package/dist/src/components/AuthProvider/AuthProviderDetails/RoleAssigmentDetails.d.ts +7 -0
  14. package/dist/src/components/AuthProvider/AuthProviderDetails/RoleAssigmentDetails.d.ts.map +1 -0
  15. package/dist/src/components/AuthProvider/AuthProviderDetails/RoleAssigmentDetails.js +35 -0
  16. package/dist/src/components/AuthProvider/AuthProviderDetails/RoleAssigmentDetails.js.map +1 -0
  17. package/dist/src/components/AuthProvider/AuthProviderRow.d.ts +8 -0
  18. package/dist/src/components/AuthProvider/AuthProviderRow.d.ts.map +1 -0
  19. package/dist/src/components/AuthProvider/AuthProviderRow.js +67 -0
  20. package/dist/src/components/AuthProvider/AuthProviderRow.js.map +1 -0
  21. package/dist/src/components/AuthProvider/AuthProvidersPage.d.ts +4 -0
  22. package/dist/src/components/AuthProvider/AuthProvidersPage.d.ts.map +1 -0
  23. package/dist/src/components/AuthProvider/AuthProvidersPage.js +90 -0
  24. package/dist/src/components/AuthProvider/AuthProvidersPage.js.map +1 -0
  25. package/dist/src/components/AuthProvider/CreateAuthProvider/AuthOrganizationAssignment.d.ts +4 -0
  26. package/dist/src/components/AuthProvider/CreateAuthProvider/AuthOrganizationAssignment.d.ts.map +1 -0
  27. package/dist/src/components/AuthProvider/CreateAuthProvider/AuthOrganizationAssignment.js +39 -0
  28. package/dist/src/components/AuthProvider/CreateAuthProvider/AuthOrganizationAssignment.js.map +1 -0
  29. package/dist/src/components/AuthProvider/CreateAuthProvider/AuthProviderHelperText.d.ts +6 -0
  30. package/dist/src/components/AuthProvider/CreateAuthProvider/AuthProviderHelperText.d.ts.map +1 -0
  31. package/dist/src/components/AuthProvider/CreateAuthProvider/AuthProviderHelperText.js +87 -0
  32. package/dist/src/components/AuthProvider/CreateAuthProvider/AuthProviderHelperText.js.map +1 -0
  33. package/dist/src/components/AuthProvider/CreateAuthProvider/CreateAuthProvider.d.ts +4 -0
  34. package/dist/src/components/AuthProvider/CreateAuthProvider/CreateAuthProvider.d.ts.map +1 -0
  35. package/dist/src/components/AuthProvider/CreateAuthProvider/CreateAuthProvider.js +94 -0
  36. package/dist/src/components/AuthProvider/CreateAuthProvider/CreateAuthProvider.js.map +1 -0
  37. package/dist/src/components/AuthProvider/CreateAuthProvider/CreateAuthProviderForm.d.ts +13 -0
  38. package/dist/src/components/AuthProvider/CreateAuthProvider/CreateAuthProviderForm.d.ts.map +1 -0
  39. package/dist/src/components/AuthProvider/CreateAuthProvider/CreateAuthProviderForm.js +161 -0
  40. package/dist/src/components/AuthProvider/CreateAuthProvider/CreateAuthProviderForm.js.map +1 -0
  41. package/dist/src/components/AuthProvider/CreateAuthProvider/Oauth2ProviderFields.d.ts +4 -0
  42. package/dist/src/components/AuthProvider/CreateAuthProvider/Oauth2ProviderFields.d.ts.map +1 -0
  43. package/dist/src/components/AuthProvider/CreateAuthProvider/Oauth2ProviderFields.js +19 -0
  44. package/dist/src/components/AuthProvider/CreateAuthProvider/Oauth2ProviderFields.js.map +1 -0
  45. package/dist/src/components/AuthProvider/CreateAuthProvider/RoleAssignmentSection.d.ts +4 -0
  46. package/dist/src/components/AuthProvider/CreateAuthProvider/RoleAssignmentSection.d.ts.map +1 -0
  47. package/dist/src/components/AuthProvider/CreateAuthProvider/RoleAssignmentSection.js +71 -0
  48. package/dist/src/components/AuthProvider/CreateAuthProvider/RoleAssignmentSection.js.map +1 -0
  49. package/dist/src/components/AuthProvider/CreateAuthProvider/types.d.ts +57 -0
  50. package/dist/src/components/AuthProvider/CreateAuthProvider/types.d.ts.map +1 -0
  51. package/dist/src/components/AuthProvider/CreateAuthProvider/types.js +33 -0
  52. package/dist/src/components/AuthProvider/CreateAuthProvider/types.js.map +1 -0
  53. package/dist/src/components/AuthProvider/CreateAuthProvider/utils.d.ts +15 -0
  54. package/dist/src/components/AuthProvider/CreateAuthProvider/utils.d.ts.map +1 -0
  55. package/dist/src/components/AuthProvider/CreateAuthProvider/utils.js +466 -0
  56. package/dist/src/components/AuthProvider/CreateAuthProvider/utils.js.map +1 -0
  57. package/dist/src/components/AuthProvider/TestConnectionModal/TestConnectionModal.d.ts +9 -0
  58. package/dist/src/components/AuthProvider/TestConnectionModal/TestConnectionModal.d.ts.map +1 -0
  59. package/dist/src/components/AuthProvider/TestConnectionModal/TestConnectionModal.js +67 -0
  60. package/dist/src/components/AuthProvider/TestConnectionModal/TestConnectionModal.js.map +1 -0
  61. package/dist/src/components/AuthProvider/useAuthProviders.d.ts +8 -0
  62. package/dist/src/components/AuthProvider/useAuthProviders.d.ts.map +1 -0
  63. package/dist/src/components/AuthProvider/useAuthProviders.js +19 -0
  64. package/dist/src/components/AuthProvider/useAuthProviders.js.map +1 -0
  65. package/dist/src/components/DetailsPage/DetailsPage.d.ts +1 -1
  66. package/dist/src/components/DetailsPage/DetailsPage.d.ts.map +1 -1
  67. package/dist/src/components/DetailsPage/DetailsPageActions.d.ts.map +1 -1
  68. package/dist/src/components/DetailsPage/DetailsPageActions.js +1 -1
  69. package/dist/src/components/DetailsPage/DetailsPageActions.js.map +1 -1
  70. package/dist/src/components/DetailsPage/Tables/ApplicationsTable.d.ts +1 -7
  71. package/dist/src/components/DetailsPage/Tables/ApplicationsTable.d.ts.map +1 -1
  72. package/dist/src/components/DetailsPage/Tables/ApplicationsTable.js +26 -81
  73. package/dist/src/components/DetailsPage/Tables/ApplicationsTable.js.map +1 -1
  74. package/dist/src/components/DetailsPage/Tables/SystemdUnitsTable.d.ts +8 -0
  75. package/dist/src/components/DetailsPage/Tables/SystemdUnitsTable.d.ts.map +1 -0
  76. package/dist/src/components/DetailsPage/Tables/SystemdUnitsTable.js +67 -0
  77. package/dist/src/components/DetailsPage/Tables/SystemdUnitsTable.js.map +1 -0
  78. package/dist/src/components/Device/DeviceDetails/DeviceApplications.d.ts +1 -3
  79. package/dist/src/components/Device/DeviceDetails/DeviceApplications.d.ts.map +1 -1
  80. package/dist/src/components/Device/DeviceDetails/DeviceApplications.js +5 -49
  81. package/dist/src/components/Device/DeviceDetails/DeviceApplications.js.map +1 -1
  82. package/dist/src/components/Device/DeviceDetails/DeviceDetailsPage.d.ts.map +1 -1
  83. package/dist/src/components/Device/DeviceDetails/DeviceDetailsPage.js +15 -9
  84. package/dist/src/components/Device/DeviceDetails/DeviceDetailsPage.js.map +1 -1
  85. package/dist/src/components/Device/DeviceDetails/DeviceDetailsTab.d.ts.map +1 -1
  86. package/dist/src/components/Device/DeviceDetails/DeviceDetailsTab.js +5 -2
  87. package/dist/src/components/Device/DeviceDetails/DeviceDetailsTab.js.map +1 -1
  88. package/dist/src/components/Device/DeviceDetails/DeviceSystemdUnits.d.ts +8 -0
  89. package/dist/src/components/Device/DeviceDetails/DeviceSystemdUnits.d.ts.map +1 -0
  90. package/dist/src/components/Device/DeviceDetails/DeviceSystemdUnits.js +19 -0
  91. package/dist/src/components/Device/DeviceDetails/DeviceSystemdUnits.js.map +1 -0
  92. package/dist/src/components/Device/DeviceDetails/TerminalTab.d.ts.map +1 -1
  93. package/dist/src/components/Device/DeviceDetails/TerminalTab.js +3 -2
  94. package/dist/src/components/Device/DeviceDetails/TerminalTab.js.map +1 -1
  95. package/dist/src/components/Device/DevicesPage/DecommissionedDevicesTable.d.ts.map +1 -1
  96. package/dist/src/components/Device/DevicesPage/DecommissionedDevicesTable.js +7 -3
  97. package/dist/src/components/Device/DevicesPage/DecommissionedDevicesTable.js.map +1 -1
  98. package/dist/src/components/Device/DevicesPage/DevicesEmptyStates.d.ts.map +1 -1
  99. package/dist/src/components/Device/DevicesPage/DevicesEmptyStates.js +3 -2
  100. package/dist/src/components/Device/DevicesPage/DevicesEmptyStates.js.map +1 -1
  101. package/dist/src/components/Device/DevicesPage/DevicesPage.d.ts.map +1 -1
  102. package/dist/src/components/Device/DevicesPage/DevicesPage.js +9 -15
  103. package/dist/src/components/Device/DevicesPage/DevicesPage.js.map +1 -1
  104. package/dist/src/components/Device/DevicesPage/EnrolledDevicesTable.d.ts.map +1 -1
  105. package/dist/src/components/Device/DevicesPage/EnrolledDevicesTable.js +8 -4
  106. package/dist/src/components/Device/DevicesPage/EnrolledDevicesTable.js.map +1 -1
  107. package/dist/src/components/Device/EditDeviceWizard/EditDeviceWizard.d.ts.map +1 -1
  108. package/dist/src/components/Device/EditDeviceWizard/EditDeviceWizard.js +4 -3
  109. package/dist/src/components/Device/EditDeviceWizard/EditDeviceWizard.js.map +1 -1
  110. package/dist/src/components/Device/EditDeviceWizard/deviceSpecUtils.d.ts +2 -1
  111. package/dist/src/components/Device/EditDeviceWizard/deviceSpecUtils.d.ts.map +1 -1
  112. package/dist/src/components/Device/EditDeviceWizard/deviceSpecUtils.js +230 -54
  113. package/dist/src/components/Device/EditDeviceWizard/deviceSpecUtils.js.map +1 -1
  114. package/dist/src/components/Device/EditDeviceWizard/steps/ApplicationContainerForm.css +5 -0
  115. package/dist/src/components/Device/EditDeviceWizard/steps/ApplicationContainerForm.d.ts +10 -0
  116. package/dist/src/components/Device/EditDeviceWizard/steps/ApplicationContainerForm.d.ts.map +1 -0
  117. package/dist/src/components/Device/EditDeviceWizard/steps/ApplicationContainerForm.js +169 -0
  118. package/dist/src/components/Device/EditDeviceWizard/steps/ApplicationContainerForm.js.map +1 -0
  119. package/dist/src/components/Device/EditDeviceWizard/steps/ApplicationImageForm.d.ts +2 -2
  120. package/dist/src/components/Device/EditDeviceWizard/steps/ApplicationImageForm.d.ts.map +1 -1
  121. package/dist/src/components/Device/EditDeviceWizard/steps/ApplicationInlineForm.d.ts +2 -2
  122. package/dist/src/components/Device/EditDeviceWizard/steps/ApplicationInlineForm.d.ts.map +1 -1
  123. package/dist/src/components/Device/EditDeviceWizard/steps/ApplicationTemplates.d.ts.map +1 -1
  124. package/dist/src/components/Device/EditDeviceWizard/steps/ApplicationTemplates.js +95 -37
  125. package/dist/src/components/Device/EditDeviceWizard/steps/ApplicationTemplates.js.map +1 -1
  126. package/dist/src/components/Device/EditDeviceWizard/steps/ApplicationVolumeForm.d.ts +11 -0
  127. package/dist/src/components/Device/EditDeviceWizard/steps/ApplicationVolumeForm.d.ts.map +1 -0
  128. package/dist/src/components/Device/EditDeviceWizard/steps/ApplicationVolumeForm.js +99 -0
  129. package/dist/src/components/Device/EditDeviceWizard/steps/ApplicationVolumeForm.js.map +1 -0
  130. package/dist/src/components/Device/EditDeviceWizard/steps/ConfigurationTemplates.d.ts.map +1 -1
  131. package/dist/src/components/Device/EditDeviceWizard/steps/ConfigurationTemplates.js +6 -4
  132. package/dist/src/components/Device/EditDeviceWizard/steps/ConfigurationTemplates.js.map +1 -1
  133. package/dist/src/components/Device/EditDeviceWizard/steps/DeviceTemplateStep.js +1 -1
  134. package/dist/src/components/Device/EditDeviceWizard/steps/DeviceTemplateStep.js.map +1 -1
  135. package/dist/src/components/Device/EditDeviceWizard/steps/ReviewApplications.d.ts.map +1 -1
  136. package/dist/src/components/Device/EditDeviceWizard/steps/ReviewApplications.js +21 -10
  137. package/dist/src/components/Device/EditDeviceWizard/steps/ReviewApplications.js.map +1 -1
  138. package/dist/src/components/Device/EditDeviceWizard/utils.d.ts +41 -3
  139. package/dist/src/components/Device/EditDeviceWizard/utils.d.ts.map +1 -1
  140. package/dist/src/components/Device/EditDeviceWizard/utils.js +5 -2
  141. package/dist/src/components/Device/EditDeviceWizard/utils.js.map +1 -1
  142. package/dist/src/components/EnrollmentRequest/EnrollmentRequestDetails/EnrollmentRequestDetails.d.ts.map +1 -1
  143. package/dist/src/components/EnrollmentRequest/EnrollmentRequestDetails/EnrollmentRequestDetails.js +9 -4
  144. package/dist/src/components/EnrollmentRequest/EnrollmentRequestDetails/EnrollmentRequestDetails.js.map +1 -1
  145. package/dist/src/components/EnrollmentRequest/EnrollmentRequestList.d.ts +1 -3
  146. package/dist/src/components/EnrollmentRequest/EnrollmentRequestList.d.ts.map +1 -1
  147. package/dist/src/components/EnrollmentRequest/EnrollmentRequestList.js +8 -9
  148. package/dist/src/components/EnrollmentRequest/EnrollmentRequestList.js.map +1 -1
  149. package/dist/src/components/Fleet/CreateFleet/CreateFleetWizard.d.ts.map +1 -1
  150. package/dist/src/components/Fleet/CreateFleet/CreateFleetWizard.js +10 -5
  151. package/dist/src/components/Fleet/CreateFleet/CreateFleetWizard.js.map +1 -1
  152. package/dist/src/components/Fleet/CreateFleet/utils.d.ts.map +1 -1
  153. package/dist/src/components/Fleet/CreateFleet/utils.js +2 -5
  154. package/dist/src/components/Fleet/CreateFleet/utils.js.map +1 -1
  155. package/dist/src/components/Fleet/FleetDetails/FleetDetailsPage.d.ts.map +1 -1
  156. package/dist/src/components/Fleet/FleetDetails/FleetDetailsPage.js +11 -6
  157. package/dist/src/components/Fleet/FleetDetails/FleetDetailsPage.js.map +1 -1
  158. package/dist/src/components/Fleet/FleetDetails/FleetYaml.d.ts +9 -0
  159. package/dist/src/components/Fleet/FleetDetails/FleetYaml.d.ts.map +1 -0
  160. package/dist/src/components/Fleet/FleetDetails/FleetYaml.js +13 -0
  161. package/dist/src/components/Fleet/FleetDetails/FleetYaml.js.map +1 -0
  162. package/dist/src/components/Fleet/FleetResourceSyncs.d.ts.map +1 -1
  163. package/dist/src/components/Fleet/FleetResourceSyncs.js +3 -2
  164. package/dist/src/components/Fleet/FleetResourceSyncs.js.map +1 -1
  165. package/dist/src/components/Fleet/FleetsPage.d.ts.map +1 -1
  166. package/dist/src/components/Fleet/FleetsPage.js +22 -13
  167. package/dist/src/components/Fleet/FleetsPage.js.map +1 -1
  168. package/dist/src/components/Fleet/ImportFleetWizard/ImportFleetWizard.d.ts.map +1 -1
  169. package/dist/src/components/Fleet/ImportFleetWizard/ImportFleetWizard.js +9 -2
  170. package/dist/src/components/Fleet/ImportFleetWizard/ImportFleetWizard.js.map +1 -1
  171. package/dist/src/components/Fleet/ImportFleetWizard/steps/RepositoryStep.d.ts.map +1 -1
  172. package/dist/src/components/Fleet/ImportFleetWizard/steps/RepositoryStep.js +3 -2
  173. package/dist/src/components/Fleet/ImportFleetWizard/steps/RepositoryStep.js.map +1 -1
  174. package/dist/src/components/ListPage/ListPage.d.ts +0 -1
  175. package/dist/src/components/ListPage/ListPage.d.ts.map +1 -1
  176. package/dist/src/components/ListPage/ListPage.js +2 -5
  177. package/dist/src/components/ListPage/ListPage.js.map +1 -1
  178. package/dist/src/components/Login/ProviderSelector.d.ts +11 -0
  179. package/dist/src/components/Login/ProviderSelector.d.ts.map +1 -0
  180. package/dist/src/components/Login/ProviderSelector.js +66 -0
  181. package/dist/src/components/Login/ProviderSelector.js.map +1 -0
  182. package/dist/src/components/Login/TokenLoginForm.d.ts +9 -0
  183. package/dist/src/components/Login/TokenLoginForm.d.ts.map +1 -0
  184. package/dist/src/components/Login/TokenLoginForm.js +107 -0
  185. package/dist/src/components/Login/TokenLoginForm.js.map +1 -0
  186. package/dist/src/components/Masthead/CommandLineToolsPage.d.ts.map +1 -1
  187. package/dist/src/components/Masthead/CommandLineToolsPage.js +1 -6
  188. package/dist/src/components/Masthead/CommandLineToolsPage.js.map +1 -1
  189. package/dist/src/components/OverviewPage/Cards/Alerts/AlertsCard.d.ts.map +1 -1
  190. package/dist/src/components/OverviewPage/Cards/Alerts/AlertsCard.js +2 -0
  191. package/dist/src/components/OverviewPage/Cards/Alerts/AlertsCard.js.map +1 -1
  192. package/dist/src/components/OverviewPage/Overview.d.ts.map +1 -1
  193. package/dist/src/components/OverviewPage/Overview.js +8 -4
  194. package/dist/src/components/OverviewPage/Overview.js.map +1 -1
  195. package/dist/src/components/OverviewPage/OverviewPage.d.ts.map +1 -1
  196. package/dist/src/components/OverviewPage/OverviewPage.js +3 -8
  197. package/dist/src/components/OverviewPage/OverviewPage.js.map +1 -1
  198. package/dist/src/components/Repository/CreateRepository/CreateRepository.d.ts.map +1 -1
  199. package/dist/src/components/Repository/CreateRepository/CreateRepository.js +3 -2
  200. package/dist/src/components/Repository/CreateRepository/CreateRepository.js.map +1 -1
  201. package/dist/src/components/Repository/CreateRepository/CreateRepositoryForm.d.ts.map +1 -1
  202. package/dist/src/components/Repository/CreateRepository/CreateRepositoryForm.js +3 -2
  203. package/dist/src/components/Repository/CreateRepository/CreateRepositoryForm.js.map +1 -1
  204. package/dist/src/components/Repository/RepositoryDetails/RepositoryDetails.d.ts.map +1 -1
  205. package/dist/src/components/Repository/RepositoryDetails/RepositoryDetails.js +11 -6
  206. package/dist/src/components/Repository/RepositoryDetails/RepositoryDetails.js.map +1 -1
  207. package/dist/src/components/Repository/RepositoryList.d.ts.map +1 -1
  208. package/dist/src/components/Repository/RepositoryList.js +11 -5
  209. package/dist/src/components/Repository/RepositoryList.js.map +1 -1
  210. package/dist/src/components/ResourceSync/RepositoryResourceSyncList.d.ts.map +1 -1
  211. package/dist/src/components/ResourceSync/RepositoryResourceSyncList.js +7 -3
  212. package/dist/src/components/ResourceSync/RepositoryResourceSyncList.js.map +1 -1
  213. package/dist/src/components/common/CodeEditor/YamlEditor.d.ts +7 -5
  214. package/dist/src/components/common/CodeEditor/YamlEditor.d.ts.map +1 -1
  215. package/dist/src/components/common/CodeEditor/YamlEditor.js +142 -10
  216. package/dist/src/components/common/CodeEditor/YamlEditor.js.map +1 -1
  217. package/dist/src/components/common/CodeEditor/YamlEditorBase.d.ts +7 -1
  218. package/dist/src/components/common/CodeEditor/YamlEditorBase.d.ts.map +1 -1
  219. package/dist/src/components/common/CodeEditor/YamlEditorBase.js +16 -8
  220. package/dist/src/components/common/CodeEditor/YamlEditorBase.js.map +1 -1
  221. package/dist/src/components/common/OrganizationGuard.d.ts.map +1 -1
  222. package/dist/src/components/common/OrganizationGuard.js +11 -19
  223. package/dist/src/components/common/OrganizationGuard.js.map +1 -1
  224. package/dist/src/components/common/PageNavigation.css +9 -0
  225. package/dist/src/components/common/PageNavigation.d.ts +4 -1
  226. package/dist/src/components/common/PageNavigation.d.ts.map +1 -1
  227. package/dist/src/components/common/PageNavigation.js +25 -10
  228. package/dist/src/components/common/PageNavigation.js.map +1 -1
  229. package/dist/src/components/common/PermissionsContext.d.ts +14 -0
  230. package/dist/src/components/common/PermissionsContext.d.ts.map +1 -0
  231. package/dist/src/components/common/PermissionsContext.js +84 -0
  232. package/dist/src/components/common/PermissionsContext.js.map +1 -0
  233. package/dist/src/components/form/FilterSelect.d.ts.map +1 -1
  234. package/dist/src/components/form/FilterSelect.js +1 -1
  235. package/dist/src/components/form/FilterSelect.js.map +1 -1
  236. package/dist/src/components/form/FormSelect.d.ts.map +1 -1
  237. package/dist/src/components/form/FormSelect.js +1 -1
  238. package/dist/src/components/form/FormSelect.js.map +1 -1
  239. package/dist/src/components/form/FormSelectTypeahead.d.ts.map +1 -1
  240. package/dist/src/components/form/FormSelectTypeahead.js +84 -4
  241. package/dist/src/components/form/FormSelectTypeahead.js.map +1 -1
  242. package/dist/src/components/form/ListItemField.d.ts +12 -0
  243. package/dist/src/components/form/ListItemField.d.ts.map +1 -0
  244. package/dist/src/components/form/ListItemField.js +67 -0
  245. package/dist/src/components/form/ListItemField.js.map +1 -0
  246. package/dist/src/components/form/NameField.d.ts +1 -1
  247. package/dist/src/components/form/NameField.d.ts.map +1 -1
  248. package/dist/src/components/form/NameField.js +4 -2
  249. package/dist/src/components/form/NameField.js.map +1 -1
  250. package/dist/src/components/form/SwitchField.d.ts +2 -1
  251. package/dist/src/components/form/SwitchField.d.ts.map +1 -1
  252. package/dist/src/components/form/SwitchField.js +2 -2
  253. package/dist/src/components/form/SwitchField.js.map +1 -1
  254. package/dist/src/components/form/validations.d.ts +50 -4
  255. package/dist/src/components/form/validations.d.ts.map +1 -1
  256. package/dist/src/components/form/validations.js +332 -41
  257. package/dist/src/components/form/validations.js.map +1 -1
  258. package/dist/src/constants.d.ts +1 -1
  259. package/dist/src/constants.d.ts.map +1 -1
  260. package/dist/src/constants.js +1 -1
  261. package/dist/src/constants.js.map +1 -1
  262. package/dist/src/hooks/useAlertsEnabled.d.ts.map +1 -1
  263. package/dist/src/hooks/useAlertsEnabled.js +10 -4
  264. package/dist/src/hooks/useAlertsEnabled.js.map +1 -1
  265. package/dist/src/hooks/useAppContext.d.ts +4 -2
  266. package/dist/src/hooks/useAppContext.d.ts.map +1 -1
  267. package/dist/src/hooks/useAppContext.js +4 -1
  268. package/dist/src/hooks/useAppContext.js.map +1 -1
  269. package/dist/src/hooks/useFetch.d.ts +0 -1
  270. package/dist/src/hooks/useFetch.d.ts.map +1 -1
  271. package/dist/src/hooks/useNavigate.d.ts +6 -2
  272. package/dist/src/hooks/useNavigate.d.ts.map +1 -1
  273. package/dist/src/hooks/useNavigate.js +4 -0
  274. package/dist/src/hooks/useNavigate.js.map +1 -1
  275. package/dist/src/hooks/usePendingEnrollmentRequestsCount.d.ts.map +1 -1
  276. package/dist/src/hooks/usePendingEnrollmentRequestsCount.js +9 -1
  277. package/dist/src/hooks/usePendingEnrollmentRequestsCount.js.map +1 -1
  278. package/dist/src/hooks/useSystemRestoreContext.d.ts.map +1 -1
  279. package/dist/src/hooks/useSystemRestoreContext.js +3 -2
  280. package/dist/src/hooks/useSystemRestoreContext.js.map +1 -1
  281. package/dist/src/types/deviceSpec.d.ts +56 -15
  282. package/dist/src/types/deviceSpec.d.ts.map +1 -1
  283. package/dist/src/types/deviceSpec.js +23 -8
  284. package/dist/src/types/deviceSpec.js.map +1 -1
  285. package/dist/src/types/extraTypes.d.ts +14 -2
  286. package/dist/src/types/extraTypes.d.ts.map +1 -1
  287. package/dist/src/types/extraTypes.js +11 -1
  288. package/dist/src/types/extraTypes.js.map +1 -1
  289. package/dist/src/types/rbac.d.ts +2 -1
  290. package/dist/src/types/rbac.d.ts.map +1 -1
  291. package/dist/src/types/rbac.js +1 -0
  292. package/dist/src/types/rbac.js.map +1 -1
  293. package/dist/src/utils/authProvider.d.ts +4 -0
  294. package/dist/src/utils/authProvider.d.ts.map +1 -0
  295. package/dist/src/utils/authProvider.js +22 -0
  296. package/dist/src/utils/authProvider.js.map +1 -0
  297. package/dist/src/utils/error.d.ts +1 -0
  298. package/dist/src/utils/error.d.ts.map +1 -1
  299. package/dist/src/utils/error.js +6 -1
  300. package/dist/src/utils/error.js.map +1 -1
  301. package/dist/src/utils/k8sProvider.d.ts +3 -0
  302. package/dist/src/utils/k8sProvider.d.ts.map +1 -0
  303. package/dist/src/utils/k8sProvider.js +18 -0
  304. package/dist/src/utils/k8sProvider.js.map +1 -0
  305. package/dist/src/utils/patch.d.ts.map +1 -1
  306. package/dist/src/utils/patch.js +3 -1
  307. package/dist/src/utils/patch.js.map +1 -1
  308. package/dist/src/utils/status/applications.d.ts.map +1 -1
  309. package/dist/src/utils/status/applications.js +7 -0
  310. package/dist/src/utils/status/applications.js.map +1 -1
  311. package/package.json +1 -1
  312. package/src/components/AuthProvider/AuthProviderDetails/AuthProviderDetails.tsx +111 -0
  313. package/src/components/AuthProvider/AuthProviderDetails/AuthProviderDetailsTab.tsx +239 -0
  314. package/src/components/AuthProvider/AuthProviderDetails/DeleteAuthProviderModal.tsx +95 -0
  315. package/src/components/AuthProvider/AuthProviderDetails/RoleAssigmentDetails.tsx +53 -0
  316. package/src/components/AuthProvider/AuthProviderRow.tsx +84 -0
  317. package/src/components/AuthProvider/AuthProvidersPage.tsx +168 -0
  318. package/src/components/AuthProvider/CreateAuthProvider/AuthOrganizationAssignment.tsx +102 -0
  319. package/src/components/AuthProvider/CreateAuthProvider/AuthProviderHelperText.tsx +78 -0
  320. package/src/components/AuthProvider/CreateAuthProvider/CreateAuthProvider.tsx +145 -0
  321. package/src/components/AuthProvider/CreateAuthProvider/CreateAuthProviderForm.tsx +284 -0
  322. package/src/components/AuthProvider/CreateAuthProvider/Oauth2ProviderFields.tsx +24 -0
  323. package/src/components/AuthProvider/CreateAuthProvider/RoleAssignmentSection.tsx +165 -0
  324. package/src/components/AuthProvider/CreateAuthProvider/types.ts +96 -0
  325. package/src/components/AuthProvider/CreateAuthProvider/utils.ts +557 -0
  326. package/src/components/AuthProvider/TestConnectionModal/TestConnectionModal.tsx +136 -0
  327. package/src/components/AuthProvider/useAuthProviders.ts +18 -0
  328. package/src/components/DetailsPage/DetailsPage.tsx +1 -1
  329. package/src/components/DetailsPage/DetailsPageActions.tsx +2 -0
  330. package/src/components/DetailsPage/Tables/ApplicationsTable.tsx +29 -132
  331. package/src/components/DetailsPage/Tables/SystemdUnitsTable.tsx +98 -0
  332. package/src/components/Device/DeviceDetails/DeviceApplications.tsx +3 -73
  333. package/src/components/Device/DeviceDetails/DeviceDetailsPage.tsx +19 -9
  334. package/src/components/Device/DeviceDetails/DeviceDetailsTab.tsx +6 -2
  335. package/src/components/Device/DeviceDetails/DeviceSystemdUnits.tsx +30 -0
  336. package/src/components/Device/DeviceDetails/TerminalTab.tsx +3 -2
  337. package/src/components/Device/DevicesPage/DecommissionedDevicesTable.tsx +8 -3
  338. package/src/components/Device/DevicesPage/DevicesEmptyStates.tsx +3 -2
  339. package/src/components/Device/DevicesPage/DevicesPage.tsx +9 -15
  340. package/src/components/Device/DevicesPage/EnrolledDevicesTable.tsx +9 -4
  341. package/src/components/Device/EditDeviceWizard/EditDeviceWizard.tsx +10 -4
  342. package/src/components/Device/EditDeviceWizard/deviceSpecUtils.ts +291 -59
  343. package/src/components/Device/EditDeviceWizard/steps/ApplicationContainerForm.css +5 -0
  344. package/src/components/Device/EditDeviceWizard/steps/ApplicationContainerForm.tsx +319 -0
  345. package/src/components/Device/EditDeviceWizard/steps/ApplicationImageForm.tsx +2 -2
  346. package/src/components/Device/EditDeviceWizard/steps/ApplicationInlineForm.tsx +3 -3
  347. package/src/components/Device/EditDeviceWizard/steps/ApplicationTemplates.tsx +186 -80
  348. package/src/components/Device/EditDeviceWizard/steps/ApplicationVolumeForm.tsx +202 -0
  349. package/src/components/Device/EditDeviceWizard/steps/ConfigurationTemplates.tsx +6 -4
  350. package/src/components/Device/EditDeviceWizard/steps/DeviceTemplateStep.tsx +1 -1
  351. package/src/components/Device/EditDeviceWizard/steps/ReviewApplications.tsx +26 -10
  352. package/src/components/Device/EditDeviceWizard/utils.ts +15 -1
  353. package/src/components/EnrollmentRequest/EnrollmentRequestDetails/EnrollmentRequestDetails.tsx +10 -4
  354. package/src/components/EnrollmentRequest/EnrollmentRequestList.tsx +9 -13
  355. package/src/components/Fleet/CreateFleet/CreateFleetWizard.tsx +11 -8
  356. package/src/components/Fleet/CreateFleet/utils.ts +2 -4
  357. package/src/components/Fleet/FleetDetails/FleetDetailsPage.tsx +11 -6
  358. package/src/components/Fleet/FleetDetails/FleetYaml.tsx +13 -0
  359. package/src/components/Fleet/FleetResourceSyncs.tsx +3 -2
  360. package/src/components/Fleet/FleetsPage.tsx +34 -27
  361. package/src/components/Fleet/ImportFleetWizard/ImportFleetWizard.tsx +10 -2
  362. package/src/components/Fleet/ImportFleetWizard/steps/RepositoryStep.tsx +3 -2
  363. package/src/components/ListPage/ListPage.tsx +1 -8
  364. package/src/components/Login/ProviderSelector.tsx +114 -0
  365. package/src/components/Login/TokenLoginForm.tsx +202 -0
  366. package/src/components/Masthead/CommandLineToolsPage.tsx +1 -11
  367. package/src/components/OverviewPage/Cards/Alerts/AlertsCard.tsx +2 -0
  368. package/src/components/OverviewPage/Overview.tsx +9 -4
  369. package/src/components/OverviewPage/OverviewPage.tsx +6 -13
  370. package/src/components/Repository/CreateRepository/CreateRepository.tsx +3 -2
  371. package/src/components/Repository/CreateRepository/CreateRepositoryForm.tsx +3 -2
  372. package/src/components/Repository/RepositoryDetails/RepositoryDetails.tsx +11 -9
  373. package/src/components/Repository/RepositoryList.tsx +11 -5
  374. package/src/components/ResourceSync/RepositoryResourceSyncList.tsx +8 -3
  375. package/src/components/common/CodeEditor/YamlEditor.tsx +195 -15
  376. package/src/components/common/CodeEditor/YamlEditorBase.tsx +42 -8
  377. package/src/components/common/OrganizationGuard.tsx +13 -22
  378. package/src/components/common/PageNavigation.css +9 -0
  379. package/src/components/common/PageNavigation.tsx +42 -14
  380. package/src/components/common/PermissionsContext.tsx +108 -0
  381. package/src/components/form/FilterSelect.tsx +2 -0
  382. package/src/components/form/FormSelect.tsx +2 -0
  383. package/src/components/form/FormSelectTypeahead.tsx +97 -4
  384. package/src/components/form/ListItemField.tsx +123 -0
  385. package/src/components/form/NameField.tsx +3 -1
  386. package/src/components/form/SwitchField.tsx +3 -2
  387. package/src/components/form/validations.ts +413 -64
  388. package/src/constants.ts +1 -1
  389. package/src/hooks/useAlertsEnabled.ts +10 -5
  390. package/src/hooks/useAppContext.tsx +4 -3
  391. package/src/hooks/useNavigate.tsx +7 -1
  392. package/src/hooks/usePendingEnrollmentRequestsCount.ts +13 -1
  393. package/src/hooks/useSystemRestoreContext.tsx +3 -2
  394. package/src/types/deviceSpec.ts +78 -21
  395. package/src/types/extraTypes.ts +19 -1
  396. package/src/types/rbac.ts +1 -0
  397. package/src/utils/authProvider.ts +20 -0
  398. package/src/utils/error.ts +5 -0
  399. package/src/utils/k8sProvider.ts +11 -0
  400. package/src/utils/patch.ts +3 -1
  401. package/src/utils/status/applications.ts +7 -0
  402. package/dist/src/components/DetailsPage/Tables/ApplicationsTable.css +0 -7
  403. package/dist/src/components/common/ButtonWithPermissions.d.ts +0 -8
  404. package/dist/src/components/common/ButtonWithPermissions.d.ts.map +0 -1
  405. package/dist/src/components/common/ButtonWithPermissions.js +0 -12
  406. package/dist/src/components/common/ButtonWithPermissions.js.map +0 -1
  407. package/dist/src/components/common/TechPreviewBadge.d.ts +0 -4
  408. package/dist/src/components/common/TechPreviewBadge.d.ts.map +0 -1
  409. package/dist/src/components/common/TechPreviewBadge.js +0 -24
  410. package/dist/src/components/common/TechPreviewBadge.js.map +0 -1
  411. package/dist/src/hooks/useAccessReview.d.ts +0 -4
  412. package/dist/src/hooks/useAccessReview.d.ts.map +0 -1
  413. package/dist/src/hooks/useAccessReview.js +0 -46
  414. package/dist/src/hooks/useAccessReview.js.map +0 -1
  415. package/dist/src/hooks/useFleetImportAccessReview.d.ts +0 -3
  416. package/dist/src/hooks/useFleetImportAccessReview.d.ts.map +0 -1
  417. package/dist/src/hooks/useFleetImportAccessReview.js +0 -12
  418. package/dist/src/hooks/useFleetImportAccessReview.js.map +0 -1
  419. package/src/components/DetailsPage/Tables/ApplicationsTable.css +0 -7
  420. package/src/components/common/ButtonWithPermissions.tsx +0 -14
  421. package/src/components/common/TechPreviewBadge.tsx +0 -45
  422. package/src/hooks/useAccessReview.ts +0 -49
  423. package/src/hooks/useFleetImportAccessReview.ts +0 -8
@@ -0,0 +1,39 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const tslib_1 = require("tslib");
4
+ const React = tslib_1.__importStar(require("react"));
5
+ const react_core_1 = require("@patternfly/react-core");
6
+ const formik_1 = require("formik");
7
+ const useTranslation_1 = require("../../../hooks/useTranslation");
8
+ const RadioField_1 = tslib_1.__importDefault(require("../../form/RadioField"));
9
+ const TextField_1 = tslib_1.__importDefault(require("../../form/TextField"));
10
+ const ListItemField_1 = tslib_1.__importDefault(require("../../form/ListItemField"));
11
+ const types_1 = require("./types");
12
+ const OrganizationAssignmentSection = () => {
13
+ const { t } = (0, useTranslation_1.useTranslation)();
14
+ const { values } = (0, formik_1.useFormikContext)();
15
+ return (React.createElement(react_core_1.FormSection, { title: t('Organization assignment'), className: "pf-v5-u-mt-md" },
16
+ React.createElement(react_core_1.Split, { hasGutter: true },
17
+ React.createElement(react_core_1.SplitItem, null,
18
+ React.createElement(RadioField_1.default, { id: "orgAssignmentStatic", name: "orgAssignmentType", label: t('Static'), checkedValue: types_1.OrgAssignmentType.Static })),
19
+ React.createElement(react_core_1.SplitItem, null,
20
+ React.createElement(RadioField_1.default, { id: "orgAssignmentDynamic", name: "orgAssignmentType", label: t('Dynamic'), checkedValue: types_1.OrgAssignmentType.Dynamic })),
21
+ React.createElement(react_core_1.SplitItem, null,
22
+ React.createElement(RadioField_1.default, { id: "orgAssignmentPerUser", name: "orgAssignmentType", label: t('Per user'), checkedValue: types_1.OrgAssignmentType.PerUser }))),
23
+ values.orgAssignmentType === types_1.OrgAssignmentType.Static && (React.createElement(react_core_1.FormGroup, { label: t('External organization name'), isRequired: true },
24
+ React.createElement(TextField_1.default, { name: "orgName", "aria-label": t('External organization name'), helperText: t('Users from this provider will be assigned to this organization') }))),
25
+ values.orgAssignmentType === types_1.OrgAssignmentType.Dynamic && (React.createElement(React.Fragment, null,
26
+ React.createElement(react_core_1.FormGroup, { label: t('Claim path'), isRequired: true },
27
+ React.createElement(ListItemField_1.default, { name: "claimPath", helperText: t('Enter the path segments to the claim (e.g., ["groups"], ["custom_claims", "org_id"])'), addButtonText: t('Add path segment') })),
28
+ React.createElement(react_core_1.FormGroup, { label: t('Organization name prefix') },
29
+ React.createElement(TextField_1.default, { name: "orgNamePrefix", "aria-label": t('Organization name prefix'), helperText: t('Optional prefix for the organization name') })),
30
+ React.createElement(react_core_1.FormGroup, { label: t('Organization name suffix') },
31
+ React.createElement(TextField_1.default, { name: "orgNameSuffix", "aria-label": t('Organization name suffix'), helperText: t('Optional suffix for the organization name') })))),
32
+ values.orgAssignmentType === types_1.OrgAssignmentType.PerUser && (React.createElement(React.Fragment, null,
33
+ React.createElement(react_core_1.FormGroup, { label: t('Organization name prefix') },
34
+ React.createElement(TextField_1.default, { name: "orgNamePrefix", "aria-label": t('Organization name prefix'), helperText: t('Optional prefix for the user-specific organization name') })),
35
+ React.createElement(react_core_1.FormGroup, { label: t('Organization name suffix') },
36
+ React.createElement(TextField_1.default, { name: "orgNameSuffix", "aria-label": t('Organization name suffix'), helperText: t('Optional suffix for the user-specific organization name') }))))));
37
+ };
38
+ exports.default = OrganizationAssignmentSection;
39
+ //# sourceMappingURL=AuthOrganizationAssignment.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AuthOrganizationAssignment.js","sourceRoot":"","sources":["../../../../../src/components/AuthProvider/CreateAuthProvider/AuthOrganizationAssignment.tsx"],"names":[],"mappings":";;;AAAA,qDAA+B;AAC/B,uDAAkF;AAClF,mCAA0C;AAE1C,kEAA+D;AAC/D,+EAA+C;AAC/C,6EAA6C;AAC7C,qFAAqD;AACrD,mCAAoE;AAEpE,MAAM,6BAA6B,GAAG,GAAG,EAAE;IACzC,MAAM,EAAE,CAAC,EAAE,GAAG,IAAA,+BAAc,GAAE,CAAC;IAC/B,MAAM,EAAE,MAAM,EAAE,GAAG,IAAA,yBAAgB,GAA0B,CAAC;IAE9D,OAAO,CACL,oBAAC,wBAAW,IAAC,KAAK,EAAE,CAAC,CAAC,yBAAyB,CAAC,EAAE,SAAS,EAAC,eAAe;QACzE,oBAAC,kBAAK,IAAC,SAAS;YACd,oBAAC,sBAAS;gBACR,oBAAC,oBAAU,IACT,EAAE,EAAC,qBAAqB,EACxB,IAAI,EAAC,mBAAmB,EACxB,KAAK,EAAE,CAAC,CAAC,QAAQ,CAAC,EAClB,YAAY,EAAE,yBAAiB,CAAC,MAAM,GACtC,CACQ;YACZ,oBAAC,sBAAS;gBACR,oBAAC,oBAAU,IACT,EAAE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EACzC,UAAU,EAAE,CAAC,CAAC,2CAA2C,CAAC,GAC1D,CACQ,CACX,CACJ;QAEA,MAAM,CAAC,iBAAiB,KAAK,yBAAiB,CAAC,OAAO,IAAI,CACzD;YACE,oBAAC,sBAAS,IAAC,KAAK,EAAE,CAAC,CAAC,0BAA0B,CAAC;gBAC7C,oBAAC,mBAAS,IACR,IAAI,EAAC,eAAe,gBACR,CAAC,CAAC,0BAA0B,CAAC,EACzC,UAAU,EAAE,CAAC,CAAC,yDAAyD,CAAC,GACxE,CACQ;YACZ,oBAAC,sBAAS,IAAC,KAAK,EAAE,CAAC,CAAC,0BAA0B,CAAC;gBAC7C,oBAAC,mBAAS,IACR,IAAI,EAAC,eAAe,gBACR,CAAC,CAAC,0BAA0B,CAAC,EACzC,UAAU,EAAE,CAAC,CAAC,yDAAyD,CAAC,GACxE,CACQ,CACX,CACJ,CACW,CACf,CAAC;AACJ,CAAC,CAAC;AAEF,kBAAe,6BAA6B,CAAC"}
@@ -0,0 +1,6 @@
1
+ import * as React from 'react';
2
+ export declare const ScopesHelperText: () => React.JSX.Element;
3
+ export declare const UsernameClaimHelperText: () => React.JSX.Element;
4
+ export declare const RoleClaimHelperText: () => React.JSX.Element;
5
+ export declare const RoleSeparatorHelperText: () => React.JSX.Element;
6
+ //# sourceMappingURL=AuthProviderHelperText.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AuthProviderHelperText.d.ts","sourceRoot":"","sources":["../../../../../src/components/AuthProvider/CreateAuthProvider/AuthProviderHelperText.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAG/B,eAAO,MAAM,gBAAgB,yBAgB5B,CAAC;AAEF,eAAO,MAAM,uBAAuB,yBAqBnC,CAAC;AAEF,eAAO,MAAM,mBAAmB,yBAoB/B,CAAC;AAEF,eAAO,MAAM,uBAAuB,yBAWnC,CAAC"}
@@ -0,0 +1,87 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.RoleSeparatorHelperText = exports.RoleClaimHelperText = exports.UsernameClaimHelperText = exports.ScopesHelperText = void 0;
4
+ const tslib_1 = require("tslib");
5
+ const React = tslib_1.__importStar(require("react"));
6
+ const useTranslation_1 = require("../../../hooks/useTranslation");
7
+ const ScopesHelperText = () => {
8
+ const { t } = (0, useTranslation_1.useTranslation)();
9
+ return (React.createElement("div", null,
10
+ React.createElement("p", null,
11
+ React.createElement("strong", null,
12
+ t('Purpose'),
13
+ ":"),
14
+ t('Scopes define the permissions your application requests from the provider.')),
15
+ React.createElement("p", null,
16
+ React.createElement("strong", null,
17
+ t('Configuration'),
18
+ ":"),
19
+ " ",
20
+ t("Check your provider's documentation for required scopes.")),
21
+ React.createElement("p", null,
22
+ React.createElement("strong", null,
23
+ t('Common examples'),
24
+ ":"),
25
+ " ",
26
+ t('openid, profile, email, groups.'))));
27
+ };
28
+ exports.ScopesHelperText = ScopesHelperText;
29
+ const UsernameClaimHelperText = () => {
30
+ const { t } = (0, useTranslation_1.useTranslation)();
31
+ return (React.createElement("div", null,
32
+ React.createElement("p", null,
33
+ React.createElement("strong", null,
34
+ t('Purpose'),
35
+ ":"),
36
+ " ",
37
+ t('The claim field that contains the username.')),
38
+ React.createElement("p", null,
39
+ React.createElement("strong", null,
40
+ t('Format'),
41
+ ":"),
42
+ ' ',
43
+ t('Enter each segment of the claim path as a separate item. Simple claims like "email" require only one segment. For nested claims like "user.name", add multiple segments in order: first "user", then "name".')),
44
+ React.createElement("p", null,
45
+ React.createElement("strong", null,
46
+ t('Requirements'),
47
+ ":"),
48
+ ' ',
49
+ t('Each segment must start with a letter or underscore and contain only letters, numbers, dots or underscores.'))));
50
+ };
51
+ exports.UsernameClaimHelperText = UsernameClaimHelperText;
52
+ const RoleClaimHelperText = () => {
53
+ const { t } = (0, useTranslation_1.useTranslation)();
54
+ return (React.createElement("div", null,
55
+ React.createElement("p", null,
56
+ React.createElement("strong", null,
57
+ t('Purpose'),
58
+ ":"),
59
+ ' ',
60
+ t('The claim field that contains user roles or group memberships for authorization.')),
61
+ React.createElement("p", null,
62
+ React.createElement("strong", null,
63
+ t('Configuration'),
64
+ ":"),
65
+ " ",
66
+ t("Refer to your provider's documentation for the correct claim path.")),
67
+ React.createElement("p", null,
68
+ React.createElement("strong", null,
69
+ t('Format'),
70
+ ":"),
71
+ ' ',
72
+ t('Use an array of path segments (e.g., ["groups"], ["roles"], ["realm_access", "roles"]).')),
73
+ React.createElement("p", null,
74
+ React.createElement("strong", null,
75
+ t('Common examples'),
76
+ ":"),
77
+ " ",
78
+ t('["groups"], ["roles"], ["authorities"]'))));
79
+ };
80
+ exports.RoleClaimHelperText = RoleClaimHelperText;
81
+ const RoleSeparatorHelperText = () => {
82
+ const { t } = (0, useTranslation_1.useTranslation)();
83
+ return (React.createElement("div", null,
84
+ React.createElement("p", null, t('Separator for org:role format (default: ":"). Roles containing the separator are split into organization-scoped roles. Roles without separator are global and apply to all organizations. Example: "org1:admin" becomes org-scoped role "admin" for organization "org1", while "admin" becomes a global role.'))));
85
+ };
86
+ exports.RoleSeparatorHelperText = RoleSeparatorHelperText;
87
+ //# sourceMappingURL=AuthProviderHelperText.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AuthProviderHelperText.js","sourceRoot":"","sources":["../../../../../src/components/AuthProvider/CreateAuthProvider/AuthProviderHelperText.tsx"],"names":[],"mappings":";;;;AAAA,qDAA+B;AAC/B,kEAA+D;AAExD,MAAM,gBAAgB,GAAG,GAAG,EAAE;IACnC,MAAM,EAAE,CAAC,EAAE,GAAG,IAAA,+BAAc,GAAE,CAAC;IAC/B,OAAO,CACL;QACE;YACE;gBAAS,CAAC,CAAC,SAAS,CAAC;oBAAW;YAC/B,CAAC,CAAC,4EAA4E,CAAC,CAC9E;QACJ;YACE;gBAAS,CAAC,CAAC,eAAe,CAAC;oBAAW;;YAAE,CAAC,CAAC,0DAA0D,CAAC,CACnG;QACJ;YACE;gBAAS,CAAC,CAAC,iBAAiB,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A,+BAAc,GAAE,CAAC;IAC/B,OAAO,CACL;QACE,+BACG,CAAC,CACA,+SAA+S,CAChT,CACC,CACA,CACP,CAAC;AACJ,CAAC,CAAC;AAXW,QAAA,uBAAuB,2BAWlC"}
@@ -0,0 +1,4 @@
1
+ import * as React from 'react';
2
+ declare const CreateAuthProviderWithPermissions: () => React.JSX.Element;
3
+ export default CreateAuthProviderWithPermissions;
4
+ //# sourceMappingURL=CreateAuthProvider.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CreateAuthProvider.d.ts","sourceRoot":"","sources":["../../../../../src/components/AuthProvider/CreateAuthProvider/CreateAuthProvider.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAkI/B,QAAA,MAAM,iCAAiC,yBAYtC,CAAC;AAEF,eAAe,iCAAiC,CAAC"}
@@ -0,0 +1,94 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const tslib_1 = require("tslib");
4
+ const React = tslib_1.__importStar(require("react"));
5
+ const react_core_1 = require("@patternfly/react-core");
6
+ const useTranslation_1 = require("../../../hooks/useTranslation");
7
+ const useFetch_1 = require("../../../hooks/useFetch");
8
+ const useNavigate_1 = require("../../../hooks/useNavigate");
9
+ const useAppContext_1 = require("../../../hooks/useAppContext");
10
+ const rbac_1 = require("../../../types/rbac");
11
+ const extraTypes_1 = require("../../../types/extraTypes");
12
+ const error_1 = require("../../../utils/error");
13
+ const PageWithPermissions_1 = tslib_1.__importDefault(require("../../common/PageWithPermissions"));
14
+ const PermissionsContext_1 = require("../../common/PermissionsContext");
15
+ const CreateAuthProviderForm_1 = tslib_1.__importDefault(require("./CreateAuthProviderForm"));
16
+ const CreateAuthProvider = ({ authProviderId }) => {
17
+ const { t } = (0, useTranslation_1.useTranslation)();
18
+ const { get } = (0, useFetch_1.useFetch)();
19
+ const [error, setError] = React.useState();
20
+ const [isLoading, setIsLoading] = React.useState(!!authProviderId);
21
+ const [authProviderDetails, setAuthProviderDetails] = React.useState();
22
+ const navigate = (0, useNavigate_1.useNavigate)();
23
+ React.useEffect(() => {
24
+ const fetchAuthProvider = () => tslib_1.__awaiter(void 0, void 0, void 0, function* () {
25
+ setIsLoading(true);
26
+ try {
27
+ const provider = yield get(`authproviders/${authProviderId}`);
28
+ // API should not return non-dynamic providers, but we add the check for safety
29
+ if (!(0, extraTypes_1.isDynamicAuthProvider)(provider)) {
30
+ throw new Error('Authentication providers of type ' + provider.spec.providerType + ' cannot be modified');
31
+ }
32
+ setAuthProviderDetails(provider);
33
+ }
34
+ catch (e) {
35
+ setError((0, error_1.getErrorMessage)(e));
36
+ }
37
+ finally {
38
+ setIsLoading(false);
39
+ }
40
+ });
41
+ if (authProviderId) {
42
+ void fetchAuthProvider();
43
+ }
44
+ }, [get, authProviderId]);
45
+ let content;
46
+ if (error) {
47
+ content = (React.createElement(react_core_1.Alert, { isInline: true, variant: "danger", title: t('An error occurred') },
48
+ React.createElement("div", null,
49
+ t('Failed to retrieve authentication provider details'),
50
+ ": ",
51
+ error)));
52
+ }
53
+ else if (isLoading) {
54
+ content = (React.createElement(react_core_1.Bullseye, null,
55
+ React.createElement(react_core_1.Spinner, null)));
56
+ }
57
+ else {
58
+ content = (React.createElement(CreateAuthProviderForm_1.default, { authProvider: authProviderDetails, onClose: () => navigate(useNavigate_1.ROUTE.AUTH_PROVIDERS), onSuccess: (authProvider) => navigate({ route: useNavigate_1.ROUTE.AUTH_PROVIDER_DETAILS, postfix: authProvider.metadata.name }) }));
59
+ }
60
+ let title;
61
+ if (!!authProviderDetails) {
62
+ title = t('Edit authentication provider');
63
+ }
64
+ else {
65
+ title = t('Add authentication provider');
66
+ }
67
+ return (React.createElement(React.Fragment, null,
68
+ React.createElement(react_core_1.PageSection, { variant: "light", type: "breadcrumb" },
69
+ React.createElement(react_core_1.Breadcrumb, null,
70
+ React.createElement(react_core_1.BreadcrumbItem, null,
71
+ React.createElement(useNavigate_1.Link, { to: useNavigate_1.ROUTE.AUTH_PROVIDERS }, t('Authentication providers'))),
72
+ authProviderId && (React.createElement(react_core_1.BreadcrumbItem, null,
73
+ React.createElement(useNavigate_1.Link, { to: { route: useNavigate_1.ROUTE.AUTH_PROVIDER_DETAILS, postfix: authProviderId } }, authProviderId))),
74
+ React.createElement(react_core_1.BreadcrumbItem, { isActive: true }, title))),
75
+ React.createElement(react_core_1.PageSection, { variant: react_core_1.PageSectionVariants.light },
76
+ React.createElement(react_core_1.Title, { headingLevel: "h1", size: "3xl" }, title),
77
+ React.createElement(react_core_1.TextContent, null,
78
+ React.createElement(react_core_1.Text, { component: react_core_1.TextVariants.small }, t("Set up how users will sign in and which organization they'll be assigned to.")))),
79
+ React.createElement(react_core_1.PageSection, { variant: react_core_1.PageSectionVariants.light, className: "pf-v5-u-pt-0" }, content)));
80
+ };
81
+ const createAuthProviderPermissions = [
82
+ { kind: rbac_1.RESOURCE.AUTH_PROVIDER, verb: rbac_1.VERB.CREATE },
83
+ { kind: rbac_1.RESOURCE.AUTH_PROVIDER, verb: rbac_1.VERB.PATCH },
84
+ ];
85
+ const CreateAuthProviderWithPermissions = () => {
86
+ const { router: { useParams }, } = (0, useAppContext_1.useAppContext)();
87
+ const { authProviderId } = useParams();
88
+ const { checkPermissions, loading } = (0, PermissionsContext_1.usePermissionsContext)();
89
+ const [createAllowed, patchAllowed] = checkPermissions(createAuthProviderPermissions);
90
+ return (React.createElement(PageWithPermissions_1.default, { allowed: authProviderId ? patchAllowed : createAllowed, loading: loading },
91
+ React.createElement(CreateAuthProvider, { authProviderId: authProviderId })));
92
+ };
93
+ exports.default = CreateAuthProviderWithPermissions;
94
+ //# sourceMappingURL=CreateAuthProvider.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CreateAuthProvider.js","sourceRoot":"","sources":["../../../../../src/components/AuthProvider/CreateAuthProvider/CreateAuthProvider.tsx"],"names":[],"mappings":";;;AAAA,qDAA+B;AAC/B,uDAYgC;AAIhC,kEAA+D;AAC/D,sDAA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E,CAAC;IAC9D,MAAM,CAAC,aAAa,EAAE,YAAY,CAAC,GAAG,gBAAgB,CAAC,6BAA6B,CAAC,CAAC;IACtF,OAAO,CACL,oBAAC,6BAAmB,IAAC,OAAO,EAAE,cAAc,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,aAAa,EAAE,OAAO,EAAE,OAAO;QAC3F,oBAAC,kBAAkB,IAAC,cAAc,EAAE,cAAc,GAAI,CAClC,CACvB,CAAC;AACJ,CAAC,CAAC;AAEF,kBAAe,iCAAiC,CAAC"}
@@ -0,0 +1,13 @@
1
+ import * as React from 'react';
2
+ import { AuthProvider } from '@flightctl/types';
3
+ export declare const AuthProviderForm: ({ isEdit }: {
4
+ isEdit?: boolean | undefined;
5
+ }) => React.JSX.Element;
6
+ export type CreateAuthProviderFormProps = {
7
+ onClose: VoidFunction;
8
+ onSuccess: (authProvider: AuthProvider) => void;
9
+ authProvider?: AuthProvider;
10
+ };
11
+ declare const CreateAuthProviderForm: ({ authProvider, onClose, onSuccess }: CreateAuthProviderFormProps) => React.JSX.Element;
12
+ export default CreateAuthProviderForm;
13
+ //# sourceMappingURL=CreateAuthProviderForm.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CreateAuthProviderForm.d.ts","sourceRoot":"","sources":["../../../../../src/components/AuthProvider/CreateAuthProvider/CreateAuthProviderForm.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAM/B,OAAO,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AA2EhD,eAAO,MAAM,gBAAgB;;uBAsE5B,CAAC;AAmFF,MAAM,MAAM,2BAA2B,GAAG;IACxC,OAAO,EAAE,YAAY,CAAC;IACtB,SAAS,EAAE,CAAC,YAAY,EAAE,YAAY,KAAK,IAAI,CAAC;IAChD,YAAY,CAAC,EAAE,YAAY,CAAC;CAC7B,CAAC;AAEF,QAAA,MAAM,sBAAsB,yCAA0C,2BAA2B,sBAyChG,CAAC;AAEF,eAAe,sBAAsB,CAAC"}
@@ -0,0 +1,161 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.AuthProviderForm = void 0;
4
+ const tslib_1 = require("tslib");
5
+ const React = tslib_1.__importStar(require("react"));
6
+ const react_core_1 = require("@patternfly/react-core");
7
+ const outlined_question_circle_icon_1 = require("@patternfly/react-icons/dist/js/icons/outlined-question-circle-icon");
8
+ const formik_1 = require("formik");
9
+ const Yup = tslib_1.__importStar(require("yup"));
10
+ const useTranslation_1 = require("../../../hooks/useTranslation");
11
+ const useFetch_1 = require("../../../hooks/useFetch");
12
+ const NameField_1 = tslib_1.__importDefault(require("../../form/NameField"));
13
+ const TextField_1 = tslib_1.__importDefault(require("../../form/TextField"));
14
+ const RadioField_1 = tslib_1.__importDefault(require("../../form/RadioField"));
15
+ const SwitchField_1 = tslib_1.__importDefault(require("../../form/SwitchField"));
16
+ const ListItemField_1 = tslib_1.__importDefault(require("../../form/ListItemField"));
17
+ const FlightCtlForm_1 = tslib_1.__importDefault(require("../../form/FlightCtlForm"));
18
+ const FlightCtlActionGroup_1 = tslib_1.__importDefault(require("../../form/FlightCtlActionGroup"));
19
+ const validations_1 = require("../../form/validations");
20
+ const extraTypes_1 = require("../../../types/extraTypes");
21
+ const utils_1 = require("./utils");
22
+ const error_1 = require("../../../utils/error");
23
+ const LeaveFormConfirmation_1 = tslib_1.__importDefault(require("../../common/LeaveFormConfirmation"));
24
+ const WithHelperText_1 = require("../../common/WithHelperText");
25
+ const Oauth2ProviderFields_1 = tslib_1.__importDefault(require("./Oauth2ProviderFields"));
26
+ const AuthOrganizationAssignment_1 = tslib_1.__importDefault(require("./AuthOrganizationAssignment"));
27
+ const RoleAssignmentSection_1 = tslib_1.__importDefault(require("./RoleAssignmentSection"));
28
+ const TestConnectionModal_1 = tslib_1.__importDefault(require("../TestConnectionModal/TestConnectionModal"));
29
+ const AuthProviderHelperText_1 = require("./AuthProviderHelperText");
30
+ const ProviderTypeSection = () => {
31
+ const { t } = (0, useTranslation_1.useTranslation)();
32
+ return (React.createElement(react_core_1.Split, { hasGutter: true },
33
+ React.createElement(react_core_1.SplitItem, null,
34
+ React.createElement(RadioField_1.default, { id: "oidc-provider-radio", name: "providerType", label: t('OIDC'), checkedValue: extraTypes_1.ProviderType.OIDC })),
35
+ React.createElement(react_core_1.SplitItem, null,
36
+ React.createElement(RadioField_1.default, { id: "oauth2-provider-radio", name: "providerType", label: t('OAuth2'), checkedValue: extraTypes_1.ProviderType.OAuth2 }))));
37
+ };
38
+ const EnabledHelpText = () => {
39
+ const { t } = (0, useTranslation_1.useTranslation)();
40
+ return (React.createElement(react_core_1.Popover, { bodyContent: React.createElement("div", null,
41
+ React.createElement("p", null, t('Turn this on to let users sign in with this provider.')),
42
+ React.createElement("p", null, t('You can turn it off anytime without losing your settings.'))), withFocusTrap: true, triggerAction: "click" },
43
+ React.createElement(react_core_1.Button, { component: "a", className: "fctl-helper-text__icon", isInline: true, variant: "plain", onClick: (ev) => {
44
+ ev.preventDefault();
45
+ ev.stopPropagation();
46
+ }, "aria-label": "Enabled help text" },
47
+ React.createElement(outlined_question_circle_icon_1.OutlinedQuestionCircleIcon, null))));
48
+ };
49
+ const AuthProviderForm = ({ isEdit }) => {
50
+ const { t } = (0, useTranslation_1.useTranslation)();
51
+ const { values } = (0, formik_1.useFormikContext)();
52
+ const isOidcProvider = values.providerType === extraTypes_1.ProviderType.OIDC;
53
+ return (React.createElement(React.Fragment, null,
54
+ React.createElement(SwitchField_1.default, { name: "enabled", label: t('Enabled'), "aria-label": t('Enabled provider'), labelIcon: React.createElement(EnabledHelpText, null) }),
55
+ React.createElement(NameField_1.default, { name: "name", "aria-label": t('Provider name'), isRequired: true, isDisabled: isEdit, resourceType: "authproviders", validations: (0, validations_1.getDnsSubdomainValidations)(t), helperText: t("You can't change the provider name after it's created") }),
56
+ React.createElement(react_core_1.FormGroup, { label: t('Display name') },
57
+ React.createElement(TextField_1.default, { name: "displayName", "aria-label": t('Display name'), helperText: t('Display name for this provider') })),
58
+ React.createElement(ProviderTypeSection, null),
59
+ values.providerType === extraTypes_1.ProviderType.OAuth2 && React.createElement(Oauth2ProviderFields_1.default, null),
60
+ React.createElement(react_core_1.FormGroup, { label: t('Issuer URL'), isRequired: isOidcProvider },
61
+ React.createElement(TextField_1.default, { name: "issuer", "aria-label": t('Issuer URL') })),
62
+ React.createElement(react_core_1.FormGroup, { label: t('Client ID'), isRequired: true },
63
+ React.createElement(TextField_1.default, { name: "clientId", "aria-label": t('Client ID') })),
64
+ React.createElement(react_core_1.FormGroup, { label: t('Client secret'), isRequired: true },
65
+ React.createElement(TextField_1.default, { name: "clientSecret", "aria-label": t('Client secret'), type: "password" })),
66
+ React.createElement(react_core_1.FormSection, { title: t('User identity & authorization') },
67
+ React.createElement(WithHelperText_1.FormGroupWithHelperText, { label: t('Scopes'), content: React.createElement(AuthProviderHelperText_1.ScopesHelperText, null) },
68
+ React.createElement(ListItemField_1.default, { name: "scopes", helperText: t('Add scopes required to access username and role claims from your authentication provider.'), addButtonText: t('Add scope') })),
69
+ React.createElement(WithHelperText_1.FormGroupWithHelperText, { label: t('Username claim path'), content: React.createElement(AuthProviderHelperText_1.UsernameClaimHelperText, null) },
70
+ React.createElement(ListItemField_1.default, { name: "usernameClaim", helperText: t('Enter the path segments to the username claim'), addButtonText: t('Add path segment'), resolvedValue: (items) => items.join('.'), resolvedLabel: t('Resulting username claim') }))),
71
+ React.createElement(RoleAssignmentSection_1.default, null),
72
+ React.createElement(AuthOrganizationAssignment_1.default, null)));
73
+ };
74
+ exports.AuthProviderForm = AuthProviderForm;
75
+ const CreateAuthProviderFormContent = ({ isEdit, onClose, children, }) => {
76
+ const { t } = (0, useTranslation_1.useTranslation)();
77
+ const { isValid, dirty, submitForm, isSubmitting, values } = (0, formik_1.useFormikContext)();
78
+ const { proxyFetch } = (0, useFetch_1.useFetch)();
79
+ const [isTesting, setIsTesting] = React.useState(false);
80
+ const [testResults, setTestResults] = React.useState(null);
81
+ const [testError, setTestError] = React.useState();
82
+ const isSubmitDisabled = isSubmitting || !isValid || !dirty;
83
+ const isTestingDisabled = isSubmitting || !isValid || isTesting || (!isEdit && !dirty);
84
+ const handleTestConnection = () => tslib_1.__awaiter(void 0, void 0, void 0, function* () {
85
+ setIsTesting(true);
86
+ setTestError(undefined);
87
+ try {
88
+ const requestBody = {
89
+ providerType: values.providerType,
90
+ issuer: values.issuer,
91
+ authorizationUrl: values.authorizationUrl,
92
+ tokenUrl: values.tokenUrl,
93
+ userinfoUrl: values.userinfoUrl,
94
+ clientId: values.clientId,
95
+ };
96
+ const response = yield proxyFetch('test-auth-provider-connection', {
97
+ method: 'POST',
98
+ headers: {
99
+ 'Content-Type': 'application/json',
100
+ },
101
+ body: JSON.stringify(requestBody),
102
+ });
103
+ if (!response.ok) {
104
+ const errorText = yield response.text();
105
+ throw new Error(errorText || `HTTP ${response.status}`);
106
+ }
107
+ const data = (yield response.json());
108
+ setTestResults(data.results);
109
+ }
110
+ catch (err) {
111
+ setTestError((0, error_1.getErrorMessage)(err));
112
+ }
113
+ finally {
114
+ setIsTesting(false);
115
+ }
116
+ });
117
+ return (React.createElement(FlightCtlForm_1.default, null,
118
+ React.createElement(react_core_1.Grid, { hasGutter: true, span: 8 },
119
+ React.createElement(exports.AuthProviderForm, { isEdit: isEdit })),
120
+ children,
121
+ testError && (React.createElement(react_core_1.Alert, { isInline: true, variant: "danger", title: t('Test connection failed') }, testError)),
122
+ React.createElement(FlightCtlActionGroup_1.default, null,
123
+ React.createElement(react_core_1.Button, { variant: "primary", onClick: submitForm, isLoading: isSubmitting, isDisabled: isSubmitDisabled }, isEdit ? t('Save') : t('Create authentication provider')),
124
+ React.createElement(react_core_1.Button, { variant: "secondary", onClick: handleTestConnection, isLoading: isTesting, isDisabled: isTestingDisabled }, t('Test connection')),
125
+ React.createElement(react_core_1.Button, { variant: "link", isDisabled: isSubmitting, onClick: onClose }, t('Cancel'))),
126
+ testResults && React.createElement(TestConnectionModal_1.default, { onClose: () => setTestResults(null), results: testResults })));
127
+ };
128
+ const CreateAuthProviderForm = ({ authProvider, onClose, onSuccess }) => {
129
+ const { t } = (0, useTranslation_1.useTranslation)();
130
+ const { patch, post } = (0, useFetch_1.useFetch)();
131
+ const [error, setError] = React.useState();
132
+ return (React.createElement(formik_1.Formik, { initialValues: (0, utils_1.getInitValues)(authProvider), validationSchema: Yup.lazy((0, utils_1.authProviderSchema)(t)), onSubmit: (values) => tslib_1.__awaiter(void 0, void 0, void 0, function* () {
133
+ setError(undefined);
134
+ if (authProvider) {
135
+ const patches = (0, utils_1.getAuthProviderPatches)(values, authProvider);
136
+ try {
137
+ if (patches.length) {
138
+ yield patch(`authproviders/${authProvider.metadata.name}`, patches);
139
+ onSuccess(authProvider);
140
+ }
141
+ }
142
+ catch (e) {
143
+ setError((0, error_1.getErrorMessage)(e));
144
+ }
145
+ }
146
+ else {
147
+ try {
148
+ const provider = yield post('authproviders', (0, utils_1.getAuthProvider)(values));
149
+ onSuccess(provider);
150
+ }
151
+ catch (e) {
152
+ setError((0, error_1.getErrorMessage)(e));
153
+ }
154
+ }
155
+ }) },
156
+ React.createElement(CreateAuthProviderFormContent, { isEdit: !!authProvider, onClose: onClose },
157
+ error && (React.createElement(react_core_1.Alert, { isInline: true, variant: "danger", title: t('An error occurred') }, error)),
158
+ React.createElement(LeaveFormConfirmation_1.default, null))));
159
+ };
160
+ exports.default = CreateAuthProviderForm;
161
+ //# sourceMappingURL=CreateAuthProviderForm.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CreateAuthProviderForm.js","sourceRoot":"","sources":["../../../../../src/components/AuthProvider/CreateAuthProvider/CreateAuthProviderForm.tsx"],"names":[],"mappings":";;;;AAAA,qDAA+B;AAC/B,uDAAgH;AAChH,uHAAiH;AACjH,mCAAkD;AAClD,iDAA2B;AAG3B,kEAA+D;AAC/D,sDAAmD;AACnD,6EAA6C;AAC7C,6EAA6C;AAC7C,+EAA+C;AAC/C,iFAAi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AAI,EAAE,EAAE,OAAO,CAAC,CAAC;wBAClF,SAAS,CAAC,YAAY,CAAC,CAAC;oBAC1B,CAAC;gBACH,CAAC;gBAAC,OAAO,CAAC,EAAE,CAAC;oBACX,QAAQ,CAAC,IAAA,uBAAe,EAAC,CAAC,CAAC,CAAC,CAAC;gBAC/B,CAAC;YACH,CAAC;iBAAM,CAAC;gBACN,IAAI,CAAC;oBACH,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAe,eAAe,EAAE,IAAA,uBAAe,EAAC,MAAM,CAAC,CAAC,CAAC;oBACpF,SAAS,CAAC,QAAQ,CAAC,CAAC;gBACtB,CAAC;gBAAC,OAAO,CAAC,EAAE,CAAC;oBACX,QAAQ,CAAC,IAAA,uBAAe,EAAC,CAAC,CAAC,CAAC,CAAC;gBAC/B,CAAC;YACH,CAAC;QACH,CAAC,CAAA;QAED,oBAAC,6BAA6B,IAAC,MAAM,EAAE,CAAC,CAAC,YAAY,EAAE,OAAO,EAAE,OAAO;YACpE,KAAK,IAAI,CACR,oBAAC,kBAAK,IAAC,QAAQ,QAAC,OAAO,EAAC,QAAQ,EAAC,KAAK,EAAE,CAAC,CAAC,mBAAmB,CAAC,IAC3D,KAAK,CACA,CACT;YACD,oBAAC,+BAAqB,OAAG,CACK,CACzB,CACV,CAAC;AACJ,CAAC,CAAC;AAEF,kBAAe,sBAAsB,CAAC"}
@@ -0,0 +1,4 @@
1
+ import * as React from 'react';
2
+ declare const OAuth2ProviderFields: () => React.JSX.Element;
3
+ export default OAuth2ProviderFields;
4
+ //# sourceMappingURL=Oauth2ProviderFields.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Oauth2ProviderFields.d.ts","sourceRoot":"","sources":["../../../../../src/components/AuthProvider/CreateAuthProvider/Oauth2ProviderFields.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAM/B,QAAA,MAAM,oBAAoB,yBAezB,CAAC;AAEF,eAAe,oBAAoB,CAAC"}
@@ -0,0 +1,19 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const tslib_1 = require("tslib");
4
+ const React = tslib_1.__importStar(require("react"));
5
+ const react_core_1 = require("@patternfly/react-core");
6
+ const useTranslation_1 = require("../../../hooks/useTranslation");
7
+ const TextField_1 = tslib_1.__importDefault(require("../../form/TextField"));
8
+ const OAuth2ProviderFields = () => {
9
+ const { t } = (0, useTranslation_1.useTranslation)();
10
+ return (React.createElement(React.Fragment, null,
11
+ React.createElement(react_core_1.FormGroup, { label: t('Authorization URL'), isRequired: true },
12
+ React.createElement(TextField_1.default, { name: "authorizationUrl", "aria-label": t('Authorization URL') })),
13
+ React.createElement(react_core_1.FormGroup, { label: t('Token URL'), isRequired: true },
14
+ React.createElement(TextField_1.default, { name: "tokenUrl", "aria-label": t('Token URL') })),
15
+ React.createElement(react_core_1.FormGroup, { label: t('Userinfo URL'), isRequired: true },
16
+ React.createElement(TextField_1.default, { name: "userinfoUrl", "aria-label": t('Userinfo URL') }))));
17
+ };
18
+ exports.default = OAuth2ProviderFields;
19
+ //# sourceMappingURL=Oauth2ProviderFields.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Oauth2ProviderFields.js","sourceRoot":"","sources":["../../../../../src/components/AuthProvider/CreateAuthProvider/Oauth2ProviderFields.tsx"],"names":[],"mappings":";;;AAAA,qDAA+B;AAC/B,uDAAmD;AAEnD,kEAA+D;AAC/D,6EAA6C;AAE7C,MAAM,oBAAoB,GAAG,GAAG,EAAE;IAChC,MAAM,EAAE,CAAC,EAAE,GAAG,IAAA,+BAAc,GAAE,CAAC;IAC/B,OAAO,CACL;QACE,oBAAC,sBAAS,IAAC,KAAK,EAAE,CAAC,CAAC,mBAAmB,CAAC,EAAE,UAAU;YAClD,oBAAC,mBAAS,IAAC,IAAI,EAAC,kBAAkB,gBAAa,CAAC,CAAC,mBAAmB,CAAC,GAAI,CAC/D;QACZ,oBAAC,sBAAS,IAAC,KAAK,EAAE,CAAC,CAAC,WAAW,CAAC,EAAE,UAAU;YAC1C,oBAAC,mBAAS,IAAC,IAAI,EAAC,UAAU,gBAAa,CAAC,CAAC,WAAW,CAAC,GAAI,CAC/C;QACZ,oBAAC,sBAAS,IAAC,KAAK,EAAE,CAAC,CAAC,cAAc,CAAC,EAAE,UAAU;YAC7C,oBAAC,mBAAS,IAAC,IAAI,EAAC,aAAa,gBAAa,CAAC,CAAC,cAAc,CAAC,GAAI,CACrD,CACX,CACJ,CAAC;AACJ,CAAC,CAAC;AAEF,kBAAe,oBAAoB,CAAC"}
@@ -0,0 +1,4 @@
1
+ import * as React from 'react';
2
+ declare const RoleAssignmentSection: () => React.JSX.Element;
3
+ export default RoleAssignmentSection;
4
+ //# sourceMappingURL=RoleAssignmentSection.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"RoleAssignmentSection.d.ts","sourceRoot":"","sources":["../../../../../src/components/AuthProvider/CreateAuthProvider/RoleAssignmentSection.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAgH/B,QAAA,MAAM,qBAAqB,yBAkD1B,CAAC;AAEF,eAAe,qBAAqB,CAAC"}
@@ -0,0 +1,71 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const tslib_1 = require("tslib");
4
+ const React = tslib_1.__importStar(require("react"));
5
+ const react_core_1 = require("@patternfly/react-core");
6
+ const formik_1 = require("formik");
7
+ const useTranslation_1 = require("../../../hooks/useTranslation");
8
+ const RadioField_1 = tslib_1.__importDefault(require("../../form/RadioField"));
9
+ const ListItemField_1 = tslib_1.__importDefault(require("../../form/ListItemField"));
10
+ const TextField_1 = tslib_1.__importDefault(require("../../form/TextField"));
11
+ const FieldHelperText_1 = tslib_1.__importStar(require("../../form/FieldHelperText"));
12
+ const types_1 = require("./types");
13
+ const WithHelperText_1 = require("../../common/WithHelperText");
14
+ const AuthProviderHelperText_1 = require("./AuthProviderHelperText");
15
+ const getAvailableRoles = (t) => ({
16
+ admin: t('System administrator'),
17
+ 'org-admin': t('Organization administrator'),
18
+ operator: t('Operator'),
19
+ installer: t('Installer'),
20
+ viewer: t('Viewer'),
21
+ });
22
+ const RoleSelector = () => {
23
+ const { t } = (0, useTranslation_1.useTranslation)();
24
+ const [{ value: roles }, meta, { setValue }] = (0, formik_1.useField)('staticRoles');
25
+ const [isOpen, setIsOpen] = React.useState(false);
26
+ const allRoles = React.useMemo(() => {
27
+ return getAvailableRoles(t);
28
+ }, [t]);
29
+ const availableRoles = React.useMemo(() => {
30
+ return Object.entries(allRoles)
31
+ .filter(([roleCode]) => !roles.includes(roleCode))
32
+ .map(([roleCode, roleLabel]) => ({
33
+ value: roleCode,
34
+ label: roleLabel,
35
+ }));
36
+ }, [roles, allRoles]);
37
+ const onAddRole = (role) => {
38
+ if (!roles.includes(role)) {
39
+ setValue([...roles, role], true);
40
+ }
41
+ setIsOpen(false);
42
+ };
43
+ const onDelete = (role) => {
44
+ setValue(roles.filter((r) => r !== role), true);
45
+ };
46
+ const hasAvailableRoles = availableRoles.length > 0;
47
+ return (React.createElement(React.Fragment, null,
48
+ React.createElement(FieldHelperText_1.DefaultHelperText, { helperText: t('List of roles to assign to all users from this provider') }),
49
+ React.createElement(react_core_1.LabelGroup, { numLabels: 5, isEditable: true, addLabelControl: React.createElement(react_core_1.Select, { isOpen: isOpen, onOpenChange: setIsOpen, onSelect: (_, value) => onAddRole(value), toggle: (toggleRef) => (React.createElement(react_core_1.MenuToggle, { ref: toggleRef, isDisabled: !hasAvailableRoles, onClick: () => setIsOpen(!isOpen), isExpanded: isOpen, className: "pf-v5-u-ml-xs" }, t('Add role'))), shouldFocusToggleOnSelect: true },
50
+ React.createElement(react_core_1.SelectList, null, availableRoles.map((role) => (React.createElement(react_core_1.SelectOption, { key: role.value, value: role.value }, role.label))))) }, roles.map((roleCode) => (React.createElement(react_core_1.Label, { key: roleCode, onClose: () => onDelete(roleCode), textMaxWidth: "18ch", isEditable: true }, allRoles[roleCode])))),
51
+ React.createElement(FieldHelperText_1.default, { meta: meta, touchRequired: false })));
52
+ };
53
+ const RoleAssignmentSection = () => {
54
+ const { t } = (0, useTranslation_1.useTranslation)();
55
+ const { values } = (0, formik_1.useFormikContext)();
56
+ return (React.createElement(react_core_1.FormSection, { title: t('Role assignment'), className: "pf-v5-u-mt-md" },
57
+ React.createElement(react_core_1.Split, { hasGutter: true },
58
+ React.createElement(react_core_1.SplitItem, null,
59
+ React.createElement(RadioField_1.default, { id: "roleAssignmentStatic", name: "roleAssignmentType", label: t('Static'), checkedValue: types_1.RoleAssignmentType.Static })),
60
+ React.createElement(react_core_1.SplitItem, null,
61
+ React.createElement(RadioField_1.default, { id: "roleAssignmentDynamic", name: "roleAssignmentType", label: t('Dynamic'), checkedValue: types_1.RoleAssignmentType.Dynamic }))),
62
+ values.roleAssignmentType === types_1.RoleAssignmentType.Static && (React.createElement(react_core_1.FormGroup, { label: t('Roles'), isRequired: true },
63
+ React.createElement(RoleSelector, null))),
64
+ values.roleAssignmentType === types_1.RoleAssignmentType.Dynamic && (React.createElement(React.Fragment, null,
65
+ React.createElement(WithHelperText_1.FormGroupWithHelperText, { label: t('Role claim path'), content: React.createElement(AuthProviderHelperText_1.RoleClaimHelperText, null) },
66
+ React.createElement(ListItemField_1.default, { name: "roleClaimPath", helperText: t('Path segments to the role/group claim (e.g., ["groups"], ["roles"], ["realm_access", "roles"])'), addButtonText: t('Add path segment') })),
67
+ React.createElement(WithHelperText_1.FormGroupWithHelperText, { label: t('Separator'), content: React.createElement(AuthProviderHelperText_1.RoleSeparatorHelperText, null) },
68
+ React.createElement(TextField_1.default, { name: "roleSeparator", id: "roleSeparator", "aria-label": t('Separator'), placeholder: ":" }))))));
69
+ };
70
+ exports.default = RoleAssignmentSection;
71
+ //# sourceMappingURL=RoleAssignmentSection.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"RoleAssignmentSection.js","sourceRoot":"","sources":["../../../../../src/components/AuthProvider/C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