@openshift-assisted/ui-lib 2.41.2 → 2.42.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (217) hide show
  1. package/build/@types/cim/components/ClusterDeployment/ClusterDeploymentDetailsForm.d.ts.map +1 -1
  2. package/build/@types/cim/components/ClusterDeployment/ClusterDeploymentHostsDiscovery.d.ts.map +1 -1
  3. package/build/@types/cim/components/ClusterDeployment/LabelsSelector.d.ts.map +1 -1
  4. package/build/@types/cim/components/ClusterDeployment/ScaleUpForm.d.ts +1 -0
  5. package/build/@types/cim/components/ClusterDeployment/ScaleUpForm.d.ts.map +1 -1
  6. package/build/@types/cim/components/InfraEnv/AddHostDropdown.d.ts.map +1 -1
  7. package/build/@types/cim/components/InfraEnv/EnvironmentDetails.d.ts.map +1 -1
  8. package/build/@types/cim/components/InfraEnv/InfraEnvOpenShiftVersionDropdown.d.ts.map +1 -1
  9. package/build/@types/cim/components/common/CpuArchitectureDropdown.d.ts.map +1 -1
  10. package/build/@types/cim/components/helpers/versions.d.ts.map +1 -1
  11. package/build/@types/cim/components/modals/ScaleUpModal.d.ts +1 -0
  12. package/build/@types/cim/components/modals/ScaleUpModal.d.ts.map +1 -1
  13. package/build/@types/common/components/clusterConfiguration/ControlPlaneNodesDropdown.d.ts.map +1 -1
  14. package/build/@types/common/components/clusterConfiguration/DiskEncryptionFields/DiskEncryptionControlGroup.d.ts.map +1 -1
  15. package/build/@types/common/components/clusterConfiguration/DiskEncryptionFields/DiskEncryptionValues.d.ts +1 -0
  16. package/build/@types/common/components/clusterConfiguration/DiskEncryptionFields/DiskEncryptionValues.d.ts.map +1 -1
  17. package/build/@types/common/components/clusterWizard/clusterDetailsValidation.d.ts.map +1 -1
  18. package/build/@types/common/components/clusterWizard/types.d.ts +1 -0
  19. package/build/@types/common/components/clusterWizard/types.d.ts.map +1 -1
  20. package/build/@types/common/components/hosts/DiskRole.d.ts.map +1 -1
  21. package/build/@types/common/components/hosts/TableToolbar.d.ts.map +1 -1
  22. package/build/@types/common/components/newFeatureSupportLevels/types.d.ts +1 -1
  23. package/build/@types/common/components/newFeatureSupportLevels/types.d.ts.map +1 -1
  24. package/build/@types/common/components/operators/operatorDescriptions.d.ts +23 -0
  25. package/build/@types/common/components/operators/operatorDescriptions.d.ts.map +1 -0
  26. package/build/@types/common/components/operators/operatorSpecs.d.ts +25 -4
  27. package/build/@types/common/components/operators/operatorSpecs.d.ts.map +1 -1
  28. package/build/@types/common/components/ui/ClusterEventsToolbar.d.ts.map +1 -1
  29. package/build/@types/common/components/ui/OpenShiftVersionDropdown.d.ts +0 -1
  30. package/build/@types/common/components/ui/OpenShiftVersionDropdown.d.ts.map +1 -1
  31. package/build/@types/common/components/ui/SimpleDropdown.d.ts +2 -2
  32. package/build/@types/common/components/ui/SimpleDropdown.d.ts.map +1 -1
  33. package/build/@types/common/config/constants.d.ts.map +1 -1
  34. package/build/@types/common/config/docs_links.d.ts +1 -2
  35. package/build/@types/common/config/docs_links.d.ts.map +1 -1
  36. package/build/@types/common/index.d.ts +1 -0
  37. package/build/@types/common/index.d.ts.map +1 -1
  38. package/build/@types/common/types/ui-settings.d.ts +1 -0
  39. package/build/@types/common/types/ui-settings.d.ts.map +1 -1
  40. package/build/@types/common/utils.d.ts +8 -0
  41. package/build/@types/common/utils.d.ts.map +1 -1
  42. package/build/@types/ocm/components/clusterConfiguration/ControlPlaneNodesDropdown.d.ts +2 -0
  43. package/build/@types/ocm/components/clusterConfiguration/ControlPlaneNodesDropdown.d.ts.map +1 -1
  44. package/build/@types/ocm/components/clusterConfiguration/CpuArchitectureDropdown.d.ts.map +1 -1
  45. package/build/@types/ocm/components/clusterConfiguration/DiscoveryImageTypeDropdown.d.ts.map +1 -1
  46. package/build/@types/ocm/components/clusterConfiguration/OcmBaseDomainField.d.ts.map +1 -1
  47. package/build/@types/ocm/components/clusterConfiguration/OcmClusterDetailsFormFields.d.ts.map +1 -1
  48. package/build/@types/ocm/components/clusterConfiguration/OcmTNADisclaimer.d.ts +4 -0
  49. package/build/@types/ocm/components/clusterConfiguration/OcmTNADisclaimer.d.ts.map +1 -0
  50. package/build/@types/ocm/components/clusterConfiguration/manifestsConfiguration/components/FolderDropdown.d.ts.map +1 -1
  51. package/build/@types/ocm/components/clusterConfiguration/networkConfiguration/SubnetsDropdown.d.ts.map +1 -1
  52. package/build/@types/ocm/components/clusterConfiguration/operators/utils.d.ts.map +1 -1
  53. package/build/@types/ocm/components/clusterConfiguration/platformIntegration/ExternalPlatformDropdown.d.ts.map +1 -1
  54. package/build/@types/ocm/components/clusterConfiguration/review/ReviewOperatorsTable.d.ts.map +1 -1
  55. package/build/@types/ocm/components/clusterConfiguration/staticIp/commonValidationSchemas.d.ts.map +1 -1
  56. package/build/@types/ocm/components/clusterWizard/ClusterDetails.d.ts.map +1 -1
  57. package/build/@types/ocm/components/clusterWizard/OperatorsBundle.d.ts.map +1 -1
  58. package/build/@types/ocm/components/clusterWizard/OperatorsSelect.d.ts.map +1 -1
  59. package/build/@types/ocm/components/featureSupportLevels/featureStateUtils.d.ts.map +1 -1
  60. package/build/@types/ocm/components/hosts/use-hosts-table.d.ts.map +1 -1
  61. package/build/@types/ocm/services/DiskEncryptionService.d.ts +1 -1
  62. package/build/@types/ocm/services/DiskEncryptionService.d.ts.map +1 -1
  63. package/build/@types/ocm/store/slices/current-cluster/slice.d.ts +1 -1
  64. package/build/cjs/cim/components/ClusterDeployment/ClusterDeploymentDetailsForm.js +2 -2
  65. package/build/cjs/cim/components/ClusterDeployment/ClusterDeploymentDetailsForm.js.map +1 -1
  66. package/build/cjs/cim/components/ClusterDeployment/ClusterDeploymentHostsDiscovery.js +2 -1
  67. package/build/cjs/cim/components/ClusterDeployment/ClusterDeploymentHostsDiscovery.js.map +1 -1
  68. package/build/cjs/cim/components/ClusterDeployment/LabelsSelector.js +5 -5
  69. package/build/cjs/cim/components/ClusterDeployment/LabelsSelector.js.map +1 -1
  70. package/build/cjs/cim/components/ClusterDeployment/ScaleUpForm.js +2 -2
  71. package/build/cjs/cim/components/ClusterDeployment/ScaleUpForm.js.map +1 -1
  72. package/build/cjs/cim/components/InfraEnv/AddHostDropdown.js +29 -28
  73. package/build/cjs/cim/components/InfraEnv/AddHostDropdown.js.map +1 -1
  74. package/build/cjs/cim/components/InfraEnv/EnvironmentDetails.js +16 -14
  75. package/build/cjs/cim/components/InfraEnv/EnvironmentDetails.js.map +1 -1
  76. package/build/cjs/cim/components/InfraEnv/InfraEnvAgentTable.js +2 -2
  77. package/build/cjs/cim/components/InfraEnv/InfraEnvAgentTable.js.map +1 -1
  78. package/build/cjs/cim/components/InfraEnv/InfraEnvOpenShiftVersionDropdown.js +4 -8
  79. package/build/cjs/cim/components/InfraEnv/InfraEnvOpenShiftVersionDropdown.js.map +1 -1
  80. package/build/cjs/cim/components/common/CpuArchitectureDropdown.js +3 -3
  81. package/build/cjs/cim/components/common/CpuArchitectureDropdown.js.map +1 -1
  82. package/build/cjs/cim/components/helpers/versions.js +1 -1
  83. package/build/cjs/cim/components/helpers/versions.js.map +1 -1
  84. package/build/cjs/cim/components/modals/MassApproveAction.js +2 -2
  85. package/build/cjs/cim/components/modals/MassApproveAction.js.map +1 -1
  86. package/build/cjs/cim/components/modals/ScaleUpModal.js +3 -3
  87. package/build/cjs/cim/components/modals/ScaleUpModal.js.map +1 -1
  88. package/build/cjs/common/components/clusterConfiguration/ControlPlaneNodesDropdown.js +5 -6
  89. package/build/cjs/common/components/clusterConfiguration/ControlPlaneNodesDropdown.js.map +1 -1
  90. package/build/cjs/common/components/clusterConfiguration/DiskEncryptionFields/DiskEncryptionControlGroup.js +11 -6
  91. package/build/cjs/common/components/clusterConfiguration/DiskEncryptionFields/DiskEncryptionControlGroup.js.map +1 -1
  92. package/build/cjs/common/components/clusterDetail/OperatorsProgressItem.js +1 -1
  93. package/build/cjs/common/components/clusterDetail/OperatorsProgressItem.js.map +1 -1
  94. package/build/cjs/common/components/clusterWizard/clusterDetailsValidation.js +2 -1
  95. package/build/cjs/common/components/clusterWizard/clusterDetailsValidation.js.map +1 -1
  96. package/build/cjs/common/components/hosts/DiskRole.js +5 -5
  97. package/build/cjs/common/components/hosts/DiskRole.js.map +1 -1
  98. package/build/cjs/common/components/hosts/HostToolbarActions.js +3 -3
  99. package/build/cjs/common/components/hosts/HostToolbarActions.js.map +1 -1
  100. package/build/cjs/common/components/hosts/TableToolbar.js +15 -15
  101. package/build/cjs/common/components/hosts/TableToolbar.js.map +1 -1
  102. package/build/cjs/common/components/operators/operatorDescriptions.js +26 -0
  103. package/build/cjs/common/components/operators/operatorDescriptions.js.map +1 -0
  104. package/build/cjs/common/components/operators/operatorSpecs.js +332 -189
  105. package/build/cjs/common/components/operators/operatorSpecs.js.map +1 -1
  106. package/build/cjs/common/components/ui/ClusterEventsToolbar.js +1 -1
  107. package/build/cjs/common/components/ui/ClusterEventsToolbar.js.map +1 -1
  108. package/build/cjs/common/components/ui/OpenShiftVersionDropdown.js +13 -16
  109. package/build/cjs/common/components/ui/OpenShiftVersionDropdown.js.map +1 -1
  110. package/build/cjs/common/components/ui/SimpleDropdown.js +4 -5
  111. package/build/cjs/common/components/ui/SimpleDropdown.js.map +1 -1
  112. package/build/cjs/common/config/constants.js +10 -0
  113. package/build/cjs/common/config/constants.js.map +1 -1
  114. package/build/cjs/common/config/docs_links.js +41 -25
  115. package/build/cjs/common/config/docs_links.js.map +1 -1
  116. package/build/cjs/common/index.js +1 -0
  117. package/build/cjs/common/index.js.map +1 -1
  118. package/build/cjs/common/utils.js +27 -1
  119. package/build/cjs/common/utils.js.map +1 -1
  120. package/build/cjs/ocm/components/clusterConfiguration/ControlPlaneNodesDropdown.js +23 -13
  121. package/build/cjs/ocm/components/clusterConfiguration/ControlPlaneNodesDropdown.js.map +1 -1
  122. package/build/cjs/ocm/components/clusterConfiguration/CpuArchitectureDropdown.js +3 -5
  123. package/build/cjs/ocm/components/clusterConfiguration/CpuArchitectureDropdown.js.map +1 -1
  124. package/build/cjs/ocm/components/clusterConfiguration/DiscoveryImageTypeDropdown.js +15 -17
  125. package/build/cjs/ocm/components/clusterConfiguration/DiscoveryImageTypeDropdown.js.map +1 -1
  126. package/build/cjs/ocm/components/clusterConfiguration/OcmBaseDomainField.js +5 -7
  127. package/build/cjs/ocm/components/clusterConfiguration/OcmBaseDomainField.js.map +1 -1
  128. package/build/cjs/ocm/components/clusterConfiguration/OcmClusterDetailsFormFields.js +16 -0
  129. package/build/cjs/ocm/components/clusterConfiguration/OcmClusterDetailsFormFields.js.map +1 -1
  130. package/build/cjs/ocm/components/clusterConfiguration/OcmOperatorProgressItem.js +1 -1
  131. package/build/cjs/ocm/components/clusterConfiguration/OcmOperatorProgressItem.js.map +1 -1
  132. package/build/cjs/ocm/components/clusterConfiguration/OcmTNADisclaimer.js +14 -0
  133. package/build/cjs/ocm/components/clusterConfiguration/OcmTNADisclaimer.js.map +1 -0
  134. package/build/cjs/ocm/components/clusterConfiguration/manifestsConfiguration/components/FolderDropdown.js +6 -8
  135. package/build/cjs/ocm/components/clusterConfiguration/manifestsConfiguration/components/FolderDropdown.js.map +1 -1
  136. package/build/cjs/ocm/components/clusterConfiguration/networkConfiguration/SubnetsDropdown.js +7 -10
  137. package/build/cjs/ocm/components/clusterConfiguration/networkConfiguration/SubnetsDropdown.js.map +1 -1
  138. package/build/cjs/ocm/components/clusterConfiguration/operators/OperatorCheckbox.js +1 -1
  139. package/build/cjs/ocm/components/clusterConfiguration/operators/OperatorCheckbox.js.map +1 -1
  140. package/build/cjs/ocm/components/clusterConfiguration/operators/utils.js +2 -1
  141. package/build/cjs/ocm/components/clusterConfiguration/operators/utils.js.map +1 -1
  142. package/build/cjs/ocm/components/clusterConfiguration/platformIntegration/ExternalPlatformDropdown.js +11 -13
  143. package/build/cjs/ocm/components/clusterConfiguration/platformIntegration/ExternalPlatformDropdown.js.map +1 -1
  144. package/build/cjs/ocm/components/clusterConfiguration/review/ReviewOperatorsTable.js +1 -1
  145. package/build/cjs/ocm/components/clusterConfiguration/review/ReviewOperatorsTable.js.map +1 -1
  146. package/build/cjs/ocm/components/clusterConfiguration/staticIp/commonValidationSchemas.js +4 -0
  147. package/build/cjs/ocm/components/clusterConfiguration/staticIp/commonValidationSchemas.js.map +1 -1
  148. package/build/cjs/ocm/components/clusterDetail/ProgressBarAlerts.js +1 -1
  149. package/build/cjs/ocm/components/clusterDetail/ProgressBarAlerts.js.map +1 -1
  150. package/build/cjs/ocm/components/clusterWizard/ClusterDetails.js +7 -4
  151. package/build/cjs/ocm/components/clusterWizard/ClusterDetails.js.map +1 -1
  152. package/build/cjs/ocm/components/clusterWizard/OperatorsBundle.js +14 -10
  153. package/build/cjs/ocm/components/clusterWizard/OperatorsBundle.js.map +1 -1
  154. package/build/cjs/ocm/components/clusterWizard/OperatorsSelect.js +13 -15
  155. package/build/cjs/ocm/components/clusterWizard/OperatorsSelect.js.map +1 -1
  156. package/build/cjs/ocm/components/featureSupportLevels/featureStateUtils.js +5 -15
  157. package/build/cjs/ocm/components/featureSupportLevels/featureStateUtils.js.map +1 -1
  158. package/build/cjs/ocm/components/hosts/use-hosts-table.js +9 -2
  159. package/build/cjs/ocm/components/hosts/use-hosts-table.js.map +1 -1
  160. package/build/cjs/ocm/services/DiskEncryptionService.js +11 -3
  161. package/build/cjs/ocm/services/DiskEncryptionService.js.map +1 -1
  162. package/lib/cim/components/ClusterDeployment/ClusterDeploymentDetailsForm.tsx +4 -2
  163. package/lib/cim/components/ClusterDeployment/ClusterDeploymentHostsDiscovery.tsx +8 -6
  164. package/lib/cim/components/ClusterDeployment/LabelsSelector.tsx +27 -14
  165. package/lib/cim/components/ClusterDeployment/ScaleUpForm.tsx +3 -0
  166. package/lib/cim/components/InfraEnv/AddHostDropdown.tsx +60 -47
  167. package/lib/cim/components/InfraEnv/EnvironmentDetails.tsx +7 -10
  168. package/lib/cim/components/InfraEnv/InfraEnvAgentTable.tsx +1 -1
  169. package/lib/cim/components/InfraEnv/InfraEnvOpenShiftVersionDropdown.tsx +34 -22
  170. package/lib/cim/components/common/CpuArchitectureDropdown.tsx +6 -3
  171. package/lib/cim/components/helpers/versions.ts +2 -2
  172. package/lib/cim/components/modals/MassApproveAction.tsx +1 -1
  173. package/lib/cim/components/modals/ScaleUpModal.tsx +5 -2
  174. package/lib/common/components/clusterConfiguration/ControlPlaneNodesDropdown.tsx +30 -17
  175. package/lib/common/components/clusterConfiguration/DiskEncryptionFields/DiskEncryptionControlGroup.tsx +20 -5
  176. package/lib/common/components/clusterConfiguration/DiskEncryptionFields/DiskEncryptionValues.ts +1 -0
  177. package/lib/common/components/clusterDetail/OperatorsProgressItem.tsx +1 -1
  178. package/lib/common/components/clusterWizard/clusterDetailsValidation.ts +3 -0
  179. package/lib/common/components/clusterWizard/types.ts +1 -0
  180. package/lib/common/components/hosts/DiskRole.tsx +23 -17
  181. package/lib/common/components/hosts/HostToolbarActions.tsx +1 -1
  182. package/lib/common/components/hosts/TableToolbar.tsx +54 -48
  183. package/lib/common/components/newFeatureSupportLevels/types.ts +1 -0
  184. package/lib/common/components/operators/operatorDescriptions.tsx +58 -0
  185. package/lib/common/components/operators/operatorSpecs.tsx +425 -257
  186. package/lib/common/components/ui/ClusterEventsToolbar.tsx +1 -0
  187. package/lib/common/components/ui/OpenShiftVersionDropdown.tsx +38 -44
  188. package/lib/common/components/ui/SimpleDropdown.tsx +23 -22
  189. package/lib/common/config/constants.ts +11 -0
  190. package/lib/common/config/docs_links.ts +44 -30
  191. package/lib/common/index.ts +1 -0
  192. package/lib/common/types/ui-settings.ts +1 -0
  193. package/lib/common/utils.ts +30 -0
  194. package/lib/ocm/components/clusterConfiguration/ControlPlaneNodesDropdown.tsx +46 -15
  195. package/lib/ocm/components/clusterConfiguration/CpuArchitectureDropdown.tsx +26 -20
  196. package/lib/ocm/components/clusterConfiguration/DiscoveryImageTypeDropdown.tsx +47 -46
  197. package/lib/ocm/components/clusterConfiguration/OcmBaseDomainField.tsx +16 -13
  198. package/lib/ocm/components/clusterConfiguration/OcmClusterDetailsFormFields.tsx +33 -1
  199. package/lib/ocm/components/clusterConfiguration/OcmOperatorProgressItem.tsx +1 -1
  200. package/lib/ocm/components/clusterConfiguration/OcmTNADisclaimer.tsx +23 -0
  201. package/lib/ocm/components/clusterConfiguration/manifestsConfiguration/components/FolderDropdown.tsx +26 -26
  202. package/lib/ocm/components/clusterConfiguration/networkConfiguration/SubnetsDropdown.tsx +26 -30
  203. package/lib/ocm/components/clusterConfiguration/operators/OperatorCheckbox.tsx +1 -1
  204. package/lib/ocm/components/clusterConfiguration/operators/utils.tsx +2 -1
  205. package/lib/ocm/components/clusterConfiguration/platformIntegration/ExternalPlatformDropdown.tsx +34 -33
  206. package/lib/ocm/components/clusterConfiguration/review/ReviewOperatorsTable.tsx +2 -1
  207. package/lib/ocm/components/clusterConfiguration/staticIp/commonValidationSchemas.tsx +4 -0
  208. package/lib/ocm/components/clusterDetail/ProgressBarAlerts.tsx +1 -1
  209. package/lib/ocm/components/clusterWizard/ClusterDetails.tsx +15 -5
  210. package/lib/ocm/components/clusterWizard/OperatorsBundle.tsx +15 -17
  211. package/lib/ocm/components/clusterWizard/OperatorsSelect.tsx +33 -27
  212. package/lib/ocm/components/featureSupportLevels/featureStateUtils.ts +7 -18
  213. package/lib/ocm/components/hosts/use-hosts-table.tsx +9 -3
  214. package/lib/ocm/services/DiskEncryptionService.ts +7 -1
  215. package/package.json +3 -3
  216. package/build/cjs/common/components/ui/OpenShiftVersionDropdown.css +0 -9
  217. package/lib/common/components/ui/OpenShiftVersionDropdown.css +0 -9
@@ -1,6 +1,11 @@
1
1
  import React from 'react';
2
- import { Dropdown, DropdownItem, DropdownToggle } from '@patternfly/react-core/deprecated';
3
- import { CaretDownIcon } from '@patternfly/react-icons/dist/js/icons/caret-down-icon';
2
+ import {
3
+ Dropdown,
4
+ DropdownItem,
5
+ DropdownList,
6
+ MenuToggle,
7
+ MenuToggleElement,
8
+ } from '@patternfly/react-core';
4
9
  import {
5
10
  Disk,
6
11
  DiskRole as DiskRoleValue,
@@ -83,7 +88,7 @@ const DiskRoleDropdown: React.FC<DiskRoleDropdownProps> = ({
83
88
  ];
84
89
 
85
90
  const onSelect = React.useCallback(
86
- (event?: React.SyntheticEvent<HTMLDivElement>) => {
91
+ (event?: React.MouseEvent<Element, MouseEvent>) => {
87
92
  const asyncFunc = async () => {
88
93
  if (event?.currentTarget.id) {
89
94
  setDisabled(true);
@@ -98,28 +103,29 @@ const DiskRoleDropdown: React.FC<DiskRoleDropdownProps> = ({
98
103
  );
99
104
 
100
105
  const currentRoleLabel = getCurrentDiskRoleLabel(disk, installationDiskId, t);
101
- const toggle = React.useMemo(
102
- () => (
103
- <DropdownToggle
104
- onToggle={(_event, val) => setOpen(val)}
105
- toggleIndicator={CaretDownIcon}
106
- isDisabled={isDisabled}
107
- className="pf-v5-c-button pf-m-link pf-m-inline"
108
- >
109
- {currentRoleLabel}
110
- </DropdownToggle>
111
- ),
112
- [setOpen, currentRoleLabel, isDisabled],
106
+ const toggle = (toggleRef: React.Ref<MenuToggleElement>) => (
107
+ <MenuToggle
108
+ variant="plainText"
109
+ ref={toggleRef}
110
+ isFullWidth
111
+ onClick={() => setOpen(!isOpen)}
112
+ isExpanded={isOpen}
113
+ isDisabled={isDisabled}
114
+ >
115
+ {currentRoleLabel}
116
+ </MenuToggle>
113
117
  );
114
118
 
115
119
  return (
116
120
  <Dropdown
121
+ onOpenChange={() => setOpen(!isOpen)}
117
122
  onSelect={onSelect}
118
- dropdownItems={dropdownItems}
119
123
  toggle={toggle}
120
124
  isOpen={isOpen}
121
125
  isPlain
122
- />
126
+ >
127
+ <DropdownList>{dropdownItems}</DropdownList>
128
+ </Dropdown>
123
129
  );
124
130
  };
125
131
 
@@ -1,5 +1,5 @@
1
1
  import * as React from 'react';
2
- import { DropdownItem } from '@patternfly/react-core/deprecated';
2
+ import { DropdownItem } from '@patternfly/react-core';
3
3
  import { useTranslation } from '../../hooks/use-translation-wrapper';
4
4
 
5
5
  type ChangeHostnameActionProps = {
@@ -11,14 +11,13 @@ import {
11
11
  ToolbarItem,
12
12
  ToolbarProps,
13
13
  Tooltip,
14
- } from '@patternfly/react-core';
15
- import {
16
14
  Dropdown,
17
15
  DropdownItem,
18
- DropdownToggle,
19
- DropdownToggleCheckbox,
20
- } from '@patternfly/react-core/deprecated';
21
- import { CaretDownIcon } from '@patternfly/react-icons/dist/js/icons/caret-down-icon';
16
+ MenuToggle,
17
+ MenuToggleElement,
18
+ DropdownList,
19
+ MenuToggleCheckbox,
20
+ } from '@patternfly/react-core';
22
21
  import { useTranslation } from '../../hooks/use-translation-wrapper';
23
22
 
24
23
  import './TableToolbar.css';
@@ -52,6 +51,8 @@ const TableToolbar: React.FC<TableToolbarProps> = ({
52
51
  const [selectOpen, setSelectOpen] = React.useState(false);
53
52
  const onSelectToggle = React.useCallback(() => setSelectOpen(!selectOpen), [selectOpen]);
54
53
  const onActionsToggle = React.useCallback(() => setActionsOpen(!actionsOpen), [actionsOpen]);
54
+ const onSelectAll = () => setSelectedIDs(itemIDs);
55
+ const onSelectNone = () => setSelectedIDs([]);
55
56
 
56
57
  React.useEffect(() => {
57
58
  if (!selectedIDs.every((id) => itemIDs.includes(id))) {
@@ -72,57 +73,62 @@ const TableToolbar: React.FC<TableToolbarProps> = ({
72
73
  const actionsDropdown = (
73
74
  <Dropdown
74
75
  onSelect={onActionsToggle}
75
- toggle={
76
- <DropdownToggle
77
- onToggle={onActionsToggle}
78
- toggleIndicator={CaretDownIcon}
79
- isDisabled={isDisabled}
80
- >
76
+ onOpenChange={onActionsToggle}
77
+ toggle={(toggleRef: React.Ref<MenuToggleElement>) => (
78
+ <MenuToggle ref={toggleRef} isFullWidth onClick={onActionsToggle} isExpanded={actionsOpen}>
81
79
  {t('ai:Actions')}
82
- </DropdownToggle>
83
- }
80
+ </MenuToggle>
81
+ )}
84
82
  isOpen={actionsOpen}
85
- dropdownItems={actions}
86
- />
83
+ >
84
+ {actions}
85
+ </Dropdown>
86
+ );
87
+
88
+ const SelectDropdown = (
89
+ <Dropdown
90
+ onSelect={onSelectToggle}
91
+ onOpenChange={onSelectToggle}
92
+ toggle={(toggleRef: React.Ref<MenuToggleElement>) => (
93
+ <MenuToggle
94
+ ref={toggleRef}
95
+ isFullWidth
96
+ onClick={onSelectToggle}
97
+ isExpanded={selectOpen}
98
+ splitButtonOptions={{
99
+ items: [
100
+ <MenuToggleCheckbox
101
+ id="select-checkbox"
102
+ key="select-checkbox"
103
+ aria-label="Select all"
104
+ onChange={(checked, _event) => (checked ? onSelectAll() : onSelectNone())}
105
+ isChecked={isChecked}
106
+ >
107
+ {selectedIDs.length} {t('ai:selected')}
108
+ </MenuToggleCheckbox>,
109
+ ],
110
+ }}
111
+ />
112
+ )}
113
+ isOpen={selectOpen}
114
+ >
115
+ <DropdownList>
116
+ <DropdownItem id={'select-all'} key="select-all" onClick={onSelectAll}>
117
+ {t('ai:Select all')}
118
+ </DropdownItem>
119
+ <DropdownItem id={'select-none'} key="select-none" onClick={onSelectNone}>
120
+ {t('ai:Select none')}
121
+ </DropdownItem>
122
+ </DropdownList>
123
+ </Dropdown>
87
124
  );
88
125
 
89
- const onSelectAll = () => setSelectedIDs(itemIDs);
90
- const onSelectNone = () => setSelectedIDs([]);
91
126
  return (
92
127
  <Split hasGutter>
93
128
  <SplitItem isFilled>
94
129
  <Toolbar className="table-toolbar" clearAllFilters={clearAllFilters}>
95
130
  <ToolbarContent className="table-toolbar__content">
96
- <ToolbarItem>
97
- <Dropdown
98
- onSelect={onSelectToggle}
99
- toggle={
100
- <DropdownToggle
101
- splitButtonItems={[
102
- <DropdownToggleCheckbox
103
- id="select-checkbox"
104
- key="select-checkbox"
105
- aria-label={t('ai:Select all')}
106
- onChange={(_event, checked) => (checked ? onSelectAll() : onSelectNone())}
107
- isChecked={isChecked}
108
- >
109
- {selectedIDs.length} {t('ai:selected')}
110
- </DropdownToggleCheckbox>,
111
- ]}
112
- onToggle={onSelectToggle}
113
- />
114
- }
115
- isOpen={selectOpen}
116
- dropdownItems={[
117
- <DropdownItem key="select-all" onClick={onSelectAll}>
118
- {t('ai:Select all')}
119
- </DropdownItem>,
120
- <DropdownItem key="select-none" onClick={onSelectNone}>
121
- {t('ai:Select none')}
122
- </DropdownItem>,
123
- ]}
124
- />
125
- </ToolbarItem>
131
+ <ToolbarItem>{SelectDropdown}</ToolbarItem>
126
132
  {children}
127
133
  <ToolbarItem>
128
134
  {isDisabled ? (
@@ -19,6 +19,7 @@ export type GetFeatureDisabledReason = (
19
19
  supportLevelData?: NewFeatureSupportLevelMap,
20
20
  cpuArchitecture?: SupportedCpuArchitecture,
21
21
  platformType?: PlatformType,
22
+ title?: string,
22
23
  ) => string | undefined;
23
24
 
24
25
  export type GetFeatureSupportLevel = (
@@ -0,0 +1,58 @@
1
+ export const DESCRIPTION_MTV =
2
+ 'This Toolkit (MTV) enables you to migrate virtual machines from VMware vSphere, Red Hat Virtualization, or OpenStack to OpenShift Virtualization running on Red Hat OpenShift.';
3
+
4
+ export const DESCRIPTION_AMD_GPU =
5
+ 'Automate the management of AMD software components needed to provision and monitor GPUs.';
6
+
7
+ export const DESCRIPTION_LSO = 'Allows provisioning of persistent storage by using local volumes.';
8
+
9
+ export const DESCRIPTION_AUTHORINO =
10
+ 'Lightweight external authorization service for tailor-made Zero Trust API security.';
11
+
12
+ export const DESCRIPTION_CNV = 'Run virtual machines alongside containers on one platform.';
13
+
14
+ export const DESCRIPTION_FENCE_AGENTS_REMEDIATION =
15
+ 'Externally fences failed nodes using power controllers.';
16
+
17
+ export const DESCRIPTION_KMM = 'Management of kernel modules.';
18
+
19
+ export const DESCRIPTION_KUBE_DESCHEDULER =
20
+ 'Evicts pods to reschedule them onto more suitable nodes.';
21
+
22
+ export const DESCRIPTION_MCE = 'Create, import, and manage multiple clusters from this cluster.';
23
+
24
+ export const DESCRIPTION_NMSTATE =
25
+ 'Provides users with functionality to configure various network interface types, DNS, and routing on cluster nodes.';
26
+
27
+ export const DESCRIPTION_NODE_FEATURE_DISCOVERY =
28
+ 'Manage the detection of hardware features and configuration by labeling nodes with hardware-specific information.';
29
+
30
+ export const DESCRIPTION_NODE_HEALTHCHECK = 'Identify Unhealthy Nodes.';
31
+
32
+ export const DESCRIPTION_NODE_MAINTENANCE = 'Place nodes in maintenance mode.';
33
+
34
+ export const DESCRIPTION_NVIDIA_GPU =
35
+ 'Automate the management of NVIDIA software components needed to provision and monitor GPUs.';
36
+
37
+ export const DESCRIPTION_ODF = 'Persistent software-defined storage for hybrid applications.';
38
+
39
+ export const DESCRIPTION_OPENSHIFT_AI =
40
+ 'Train, serve, monitor and manage AI/ML models and applications.';
41
+
42
+ export const DESCRIPTION_OSC =
43
+ 'OpenShift sandboxed containers support for OpenShift Container Platform provides users with built-in support for running Kata Containers as an additional optional runtime. It provides an additional virtualization machine(VM) isolation layer for pods.';
44
+
45
+ export const DESCRIPTION_PIPELINES =
46
+ 'Cloud-native continuous integration and delivery (CI/CD) solution for building pipelines using Tekton.';
47
+
48
+ export const DESCRIPTION_SELF_NODE_REMEDIATION =
49
+ 'Allows nodes to reboot themselves when they become unhealthy.';
50
+
51
+ export const DESCRIPTION_SERVERLESS =
52
+ 'Deploy workflow applications based on the CNCF Serverless Workflow specification.';
53
+
54
+ export const DESCRIPTION_SERVICEMESH =
55
+ 'Platform that provides behavioral insight and operational control over a service mesh.';
56
+
57
+ export const DESCRIPTION_LVM =
58
+ 'Storage virtualization that offers a more flexible approach for disk space management.';