@openshift-assisted/ui-lib 2.16.4-cim → 2.17.0-cim
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.
- package/build/@types/cim/components/Agent/tableUtils.d.ts +4 -1
- package/build/@types/cim/components/Agent/tableUtils.d.ts.map +1 -1
- package/build/@types/cim/components/ClusterDeployment/ClusterDeploymentWizard.d.ts.map +1 -1
- package/build/@types/cim/components/ClusterDeployment/{ACMClusterDeploymentDetailsStep.d.ts → clusterDetails/ACMClusterDeploymentDetailsStep.d.ts} +5 -5
- package/build/@types/cim/components/ClusterDeployment/clusterDetails/ACMClusterDeploymentDetailsStep.d.ts.map +1 -0
- package/build/@types/cim/components/ClusterDeployment/{ClusterDeploymentDetailsForm.d.ts → clusterDetails/ClusterDeploymentDetailsForm.d.ts} +4 -4
- package/build/@types/cim/components/ClusterDeployment/clusterDetails/ClusterDeploymentDetailsForm.d.ts.map +1 -0
- package/build/@types/cim/components/ClusterDeployment/{ClusterDeploymentDetailsStep.d.ts → clusterDetails/ClusterDeploymentDetailsStep.d.ts} +5 -5
- package/build/@types/cim/components/ClusterDeployment/clusterDetails/ClusterDeploymentDetailsStep.d.ts.map +1 -0
- package/build/@types/cim/components/ClusterDeployment/{ClusterDetailsFormFields.d.ts → clusterDetails/ClusterDetailsFormFields.d.ts} +1 -1
- package/build/@types/cim/components/ClusterDeployment/clusterDetails/ClusterDetailsFormFields.d.ts.map +1 -0
- package/build/@types/cim/components/ClusterDeployment/clusterDetails/index.d.ts +5 -0
- package/build/@types/cim/components/ClusterDeployment/clusterDetails/index.d.ts.map +1 -0
- package/build/@types/cim/components/ClusterDeployment/components/AdditionalNTPSourcesDialogToggle.d.ts.map +1 -0
- package/build/@types/cim/components/ClusterDeployment/components/index.d.ts +2 -0
- package/build/@types/cim/components/ClusterDeployment/components/index.d.ts.map +1 -0
- package/build/@types/cim/components/ClusterDeployment/constants.d.ts +1 -0
- package/build/@types/cim/components/ClusterDeployment/constants.d.ts.map +1 -1
- package/build/@types/cim/components/ClusterDeployment/customManifests/ClusterDeploymentCustomManifestsStep.d.ts +6 -0
- package/build/@types/cim/components/ClusterDeployment/customManifests/ClusterDeploymentCustomManifestsStep.d.ts.map +1 -0
- package/build/@types/cim/components/ClusterDeployment/customManifests/ConfigMapDetail.d.ts +10 -0
- package/build/@types/cim/components/ClusterDeployment/customManifests/ConfigMapDetail.d.ts.map +1 -0
- package/build/@types/cim/components/ClusterDeployment/customManifests/ConfigMapForm.d.ts +12 -0
- package/build/@types/cim/components/ClusterDeployment/customManifests/ConfigMapForm.d.ts.map +1 -0
- package/build/@types/cim/components/ClusterDeployment/customManifests/index.d.ts +2 -0
- package/build/@types/cim/components/ClusterDeployment/customManifests/index.d.ts.map +1 -0
- package/build/@types/cim/components/ClusterDeployment/{ClusterDeploymentHostDiscoveryTable.d.ts → hostDiscovery/ClusterDeploymentHostDiscoveryTable.d.ts} +1 -1
- package/build/@types/cim/components/ClusterDeployment/hostDiscovery/ClusterDeploymentHostDiscoveryTable.d.ts.map +1 -0
- package/build/@types/cim/components/ClusterDeployment/{ClusterDeploymentHostsDiscovery.d.ts → hostDiscovery/ClusterDeploymentHostsDiscovery.d.ts} +1 -1
- package/build/@types/cim/components/ClusterDeployment/hostDiscovery/ClusterDeploymentHostsDiscovery.d.ts.map +1 -0
- package/build/@types/cim/components/ClusterDeployment/hostDiscovery/ClusterDeploymentHostsDiscoveryStep.d.ts +4 -0
- package/build/@types/cim/components/ClusterDeployment/hostDiscovery/ClusterDeploymentHostsDiscoveryStep.d.ts.map +1 -0
- package/build/@types/cim/components/ClusterDeployment/hostDiscovery/index.d.ts +2 -0
- package/build/@types/cim/components/ClusterDeployment/hostDiscovery/index.d.ts.map +1 -0
- package/build/@types/cim/components/ClusterDeployment/{ClusterDeploymentHostSelectionStep.d.ts → hostSelection/ClusterDeploymentHostSelectionStep.d.ts} +4 -4
- package/build/@types/cim/components/ClusterDeployment/hostSelection/ClusterDeploymentHostSelectionStep.d.ts.map +1 -0
- package/build/@types/cim/components/ClusterDeployment/{ClusterDeploymentHostsSelection.d.ts → hostSelection/ClusterDeploymentHostsSelection.d.ts} +1 -1
- package/build/@types/cim/components/ClusterDeployment/hostSelection/ClusterDeploymentHostsSelection.d.ts.map +1 -0
- package/build/@types/cim/components/ClusterDeployment/{ClusterDeploymentHostsSelectionAdvanced.d.ts → hostSelection/ClusterDeploymentHostsSelectionAdvanced.d.ts} +6 -6
- package/build/@types/cim/components/ClusterDeployment/hostSelection/ClusterDeploymentHostsSelectionAdvanced.d.ts.map +1 -0
- package/build/@types/cim/components/ClusterDeployment/{ClusterDeploymentHostsSelectionBasic.d.ts → hostSelection/ClusterDeploymentHostsSelectionBasic.d.ts} +1 -1
- package/build/@types/cim/components/ClusterDeployment/hostSelection/ClusterDeploymentHostsSelectionBasic.d.ts.map +1 -0
- package/build/@types/cim/components/ClusterDeployment/hostSelection/index.d.ts +3 -0
- package/build/@types/cim/components/ClusterDeployment/hostSelection/index.d.ts.map +1 -0
- package/build/@types/cim/components/ClusterDeployment/index.d.ts +2 -2
- package/build/@types/cim/components/ClusterDeployment/index.d.ts.map +1 -1
- package/build/@types/cim/components/ClusterDeployment/{ClusterDeploymentHostsNetworkTable.d.ts → networking/ClusterDeploymentHostsNetworkTable.d.ts} +2 -2
- package/build/@types/cim/components/ClusterDeployment/networking/ClusterDeploymentHostsNetworkTable.d.ts.map +1 -0
- package/build/@types/cim/components/ClusterDeployment/{ClusterDeploymentNetworkingForm.d.ts → networking/ClusterDeploymentNetworkingForm.d.ts} +2 -4
- package/build/@types/cim/components/ClusterDeployment/networking/ClusterDeploymentNetworkingForm.d.ts.map +1 -0
- package/build/@types/cim/components/ClusterDeployment/{ClusterDeploymentNetworkingStep.d.ts → networking/ClusterDeploymentNetworkingStep.d.ts} +4 -4
- package/build/@types/cim/components/ClusterDeployment/networking/ClusterDeploymentNetworkingStep.d.ts.map +1 -0
- package/build/@types/cim/components/ClusterDeployment/networking/index.d.ts +2 -0
- package/build/@types/cim/components/ClusterDeployment/networking/index.d.ts.map +1 -0
- package/build/@types/cim/components/ClusterDeployment/{ClusterDeploymentReviewStep.d.ts → review/ClusterDeploymentReviewStep.d.ts} +3 -3
- package/build/@types/cim/components/ClusterDeployment/review/ClusterDeploymentReviewStep.d.ts.map +1 -0
- package/build/@types/cim/components/ClusterDeployment/review/ReviewConfigMapsTable.d.ts +6 -0
- package/build/@types/cim/components/ClusterDeployment/review/ReviewConfigMapsTable.d.ts.map +1 -0
- package/build/@types/cim/components/ClusterDeployment/review/index.d.ts +2 -0
- package/build/@types/cim/components/ClusterDeployment/review/index.d.ts.map +1 -0
- package/build/@types/cim/components/ClusterDeployment/types.d.ts +2 -1
- package/build/@types/cim/components/ClusterDeployment/types.d.ts.map +1 -1
- package/build/@types/cim/components/ClusterDeployment/wizardTransition.d.ts +1 -1
- package/build/@types/cim/components/ClusterDeployment/wizardTransition.d.ts.map +1 -1
- package/build/@types/cim/components/Hypershift/HostedClusterWizard/DetailsStep/DetailsForm.d.ts.map +1 -1
- package/build/@types/cim/components/Hypershift/HostedClusterWizard/DetailsStep/types.d.ts +1 -1
- package/build/@types/cim/components/Hypershift/HostedClusterWizard/DetailsStep/types.d.ts.map +1 -1
- package/build/@types/cim/components/InfraEnv/InfraEnvAgentTable.d.ts.map +1 -1
- package/build/@types/cim/components/InfraEnv/InfraTableToolbar.d.ts +5 -0
- package/build/@types/cim/components/InfraEnv/InfraTableToolbar.d.ts.map +1 -1
- package/build/@types/cim/components/helpers/agentClusterInstall.d.ts +1 -0
- package/build/@types/cim/components/helpers/agentClusterInstall.d.ts.map +1 -1
- package/build/@types/cim/components/helpers/agents.d.ts +1 -1
- package/build/@types/cim/components/helpers/agents.d.ts.map +1 -1
- package/build/@types/cim/components/helpers/toAssisted.d.ts.map +1 -1
- package/build/@types/cim/components/helpers/versions.d.ts.map +1 -1
- package/build/@types/cim/components/modals/AddHostModal.d.ts.map +1 -1
- package/build/@types/cim/components/modals/CimConfiguration/CimConfigurationFormFields.d.ts +4 -0
- package/build/@types/cim/components/modals/CimConfiguration/CimConfigurationFormFields.d.ts.map +1 -0
- package/build/@types/cim/components/modals/CimConfiguration/CimConfigurationModal.d.ts +0 -1
- package/build/@types/cim/components/modals/CimConfiguration/CimConfigurationModal.d.ts.map +1 -1
- package/build/@types/cim/components/modals/CimConfiguration/persist.d.ts +4 -7
- package/build/@types/cim/components/modals/CimConfiguration/persist.d.ts.map +1 -1
- package/build/@types/cim/components/modals/CimConfiguration/types.d.ts +7 -16
- package/build/@types/cim/components/modals/CimConfiguration/types.d.ts.map +1 -1
- package/build/@types/cim/hooks/index.d.ts +3 -0
- package/build/@types/cim/hooks/index.d.ts.map +1 -0
- package/build/@types/cim/hooks/types.d.ts +4 -0
- package/build/@types/cim/hooks/types.d.ts.map +1 -0
- package/build/@types/cim/hooks/useAgentServiceConfig.d.ts +4 -0
- package/build/@types/cim/hooks/useAgentServiceConfig.d.ts.map +1 -0
- package/build/@types/cim/hooks/useConfigMaps.d.ts +4 -0
- package/build/@types/cim/hooks/useConfigMaps.d.ts.map +1 -0
- package/build/@types/cim/hooks/useK8sWatchResource.d.ts +8 -0
- package/build/@types/cim/hooks/useK8sWatchResource.d.ts.map +1 -0
- package/build/@types/cim/types/index.d.ts +1 -1
- package/build/@types/cim/types/index.d.ts.map +1 -1
- package/build/@types/cim/types/k8s/agent-cluster-install.d.ts +3 -0
- package/build/@types/cim/types/k8s/agent-cluster-install.d.ts.map +1 -1
- package/build/@types/cim/types/models.d.ts +7 -0
- package/build/@types/cim/types/models.d.ts.map +1 -0
- package/build/@types/cim/utils.d.ts +2 -0
- package/build/@types/cim/utils.d.ts.map +1 -1
- package/build/@types/common/components/clusterConfiguration/ControlPlaneNodesDropdown.d.ts.map +1 -1
- package/build/@types/common/components/clusterConfiguration/DownloadIso.d.ts +2 -1
- package/build/@types/common/components/clusterConfiguration/DownloadIso.d.ts.map +1 -1
- package/build/@types/common/components/clusterConfiguration/ExternalPlatformsDropdown.d.ts +14 -0
- package/build/@types/common/components/clusterConfiguration/ExternalPlatformsDropdown.d.ts.map +1 -0
- package/build/@types/common/components/clusterConfiguration/SecurityFields.d.ts +3 -1
- package/build/@types/common/components/clusterConfiguration/SecurityFields.d.ts.map +1 -1
- package/build/@types/common/components/clusterConfiguration/index.d.ts +1 -0
- package/build/@types/common/components/clusterConfiguration/index.d.ts.map +1 -1
- package/build/@types/common/components/clusterWizard/types.d.ts +1 -2
- package/build/@types/common/components/clusterWizard/types.d.ts.map +1 -1
- package/build/@types/common/components/hosts/status.d.ts.map +1 -1
- package/build/@types/common/components/hosts/tableUtils.d.ts +2 -0
- package/build/@types/common/components/hosts/tableUtils.d.ts.map +1 -1
- package/build/@types/common/components/hosts/utils.d.ts +3 -0
- package/build/@types/common/components/hosts/utils.d.ts.map +1 -1
- package/build/@types/common/components/ui/OpenShiftSelectWithSearch.d.ts +1 -2
- package/build/@types/common/components/ui/OpenShiftSelectWithSearch.d.ts.map +1 -1
- package/build/@types/common/components/ui/OpenShiftVersionDropdown.d.ts +3 -3
- package/build/@types/common/components/ui/OpenShiftVersionDropdown.d.ts.map +1 -1
- package/build/@types/common/components/ui/OpenShiftVersionModal.d.ts.map +1 -1
- package/build/@types/common/components/ui/formik/InputField.d.ts.map +1 -1
- package/build/@types/common/components/ui/formik/SelectFieldWithSearch.d.ts +16 -0
- package/build/@types/common/components/ui/formik/SelectFieldWithSearch.d.ts.map +1 -0
- package/build/@types/common/components/ui/formik/index.d.ts +1 -0
- package/build/@types/common/components/ui/formik/index.d.ts.map +1 -1
- package/build/@types/common/components/ui/formik/types.d.ts +2 -2
- package/build/@types/common/components/ui/formik/types.d.ts.map +1 -1
- package/build/@types/common/components/ui/formik/validationSchemas.d.ts.map +1 -1
- package/build/@types/common/config/docs_links.d.ts +1 -1
- package/build/@types/common/config/docs_links.d.ts.map +1 -1
- package/build/@types/common/utils.d.ts +1 -0
- package/build/@types/common/utils.d.ts.map +1 -1
- package/build/@types/ocm/components/Routes.d.ts +6 -4
- package/build/@types/ocm/components/Routes.d.ts.map +1 -1
- package/build/@types/ocm/components/clusterConfiguration/OcmClusterDetailsFormFields.d.ts.map +1 -1
- package/build/@types/ocm/components/clusterConfiguration/OcmOpenShiftVersionSelect.d.ts.map +1 -1
- package/build/@types/ocm/components/clusterConfiguration/OpenshiftVersionHelperText.d.ts +1 -1
- package/build/@types/ocm/components/clusterConfiguration/OpenshiftVersionHelperText.d.ts.map +1 -1
- package/build/cjs/cim/components/Agent/AgentStatus.js +2 -2
- package/build/cjs/cim/components/Agent/AgentStatus.js.map +1 -1
- package/build/cjs/cim/components/Agent/tableUtils.js +31 -12
- package/build/cjs/cim/components/Agent/tableUtils.js.map +1 -1
- package/build/cjs/cim/components/ClusterDeployment/ClusterDeploymentWizard.js +12 -9
- package/build/cjs/cim/components/ClusterDeployment/ClusterDeploymentWizard.js.map +1 -1
- package/build/cjs/cim/components/ClusterDeployment/ScaleUpForm.js +2 -2
- package/build/cjs/cim/components/ClusterDeployment/ScaleUpForm.js.map +1 -1
- package/build/cjs/cim/components/ClusterDeployment/{ACMClusterDeploymentDetailsStep.js → clusterDetails/ACMClusterDeploymentDetailsStep.js} +6 -5
- package/build/cjs/cim/components/ClusterDeployment/clusterDetails/ACMClusterDeploymentDetailsStep.js.map +1 -0
- package/build/cjs/cim/components/ClusterDeployment/{ClusterDeploymentDetailsForm.js → clusterDetails/ClusterDeploymentDetailsForm.js} +8 -8
- package/build/cjs/cim/components/ClusterDeployment/clusterDetails/ClusterDeploymentDetailsForm.js.map +1 -0
- package/build/cjs/cim/components/ClusterDeployment/{ClusterDeploymentDetailsStep.js → clusterDetails/ClusterDeploymentDetailsStep.js} +8 -8
- package/build/cjs/cim/components/ClusterDeployment/clusterDetails/ClusterDeploymentDetailsStep.js.map +1 -0
- package/build/cjs/cim/components/ClusterDeployment/{ClusterDetailsFormFields.js → clusterDetails/ClusterDetailsFormFields.js} +20 -25
- package/build/cjs/cim/components/ClusterDeployment/clusterDetails/ClusterDetailsFormFields.js.map +1 -0
- package/build/cjs/cim/components/ClusterDeployment/clusterDetails/index.js +8 -0
- package/build/cjs/cim/components/ClusterDeployment/clusterDetails/index.js.map +1 -0
- package/build/cjs/cim/components/ClusterDeployment/{AdditionalNTPSourcesDialogToggle.js → components/AdditionalNTPSourcesDialogToggle.js} +1 -1
- package/build/cjs/cim/components/ClusterDeployment/components/AdditionalNTPSourcesDialogToggle.js.map +1 -0
- package/build/cjs/cim/components/ClusterDeployment/components/index.js +5 -0
- package/build/cjs/cim/components/ClusterDeployment/components/index.js.map +1 -0
- package/build/cjs/cim/components/ClusterDeployment/constants.js +1 -0
- package/build/cjs/cim/components/ClusterDeployment/constants.js.map +1 -1
- package/build/cjs/cim/components/ClusterDeployment/customManifests/ClusterDeploymentCustomManifestsStep.js +71 -0
- package/build/cjs/cim/components/ClusterDeployment/customManifests/ClusterDeploymentCustomManifestsStep.js.map +1 -0
- package/build/cjs/cim/components/ClusterDeployment/customManifests/ConfigMapDetail.js +64 -0
- package/build/cjs/cim/components/ClusterDeployment/customManifests/ConfigMapDetail.js.map +1 -0
- package/build/cjs/cim/components/ClusterDeployment/customManifests/ConfigMapForm.js +134 -0
- package/build/cjs/cim/components/ClusterDeployment/customManifests/ConfigMapForm.js.map +1 -0
- package/build/cjs/cim/components/ClusterDeployment/customManifests/index.js +5 -0
- package/build/cjs/cim/components/ClusterDeployment/customManifests/index.js.map +1 -0
- package/build/cjs/cim/components/ClusterDeployment/{ClusterDeploymentHostDiscoveryTable.js → hostDiscovery/ClusterDeploymentHostDiscoveryTable.js} +20 -13
- package/build/cjs/cim/components/ClusterDeployment/hostDiscovery/ClusterDeploymentHostDiscoveryTable.js.map +1 -0
- package/build/cjs/cim/components/ClusterDeployment/{ClusterDeploymentHostsDiscovery.js → hostDiscovery/ClusterDeploymentHostsDiscovery.js} +6 -6
- package/build/cjs/cim/components/ClusterDeployment/hostDiscovery/ClusterDeploymentHostsDiscovery.js.map +1 -0
- package/build/cjs/cim/components/ClusterDeployment/{ClusterDeploymentHostsDiscoveryStep.js → hostDiscovery/ClusterDeploymentHostsDiscoveryStep.js} +10 -9
- package/build/cjs/cim/components/ClusterDeployment/hostDiscovery/ClusterDeploymentHostsDiscoveryStep.js.map +1 -0
- package/build/cjs/cim/components/ClusterDeployment/hostDiscovery/index.js +5 -0
- package/build/cjs/cim/components/ClusterDeployment/hostDiscovery/index.js.map +1 -0
- package/build/cjs/cim/components/ClusterDeployment/{ClusterDeploymentHostSelectionStep.js → hostSelection/ClusterDeploymentHostSelectionStep.js} +15 -14
- package/build/cjs/cim/components/ClusterDeployment/hostSelection/ClusterDeploymentHostSelectionStep.js.map +1 -0
- package/build/cjs/cim/components/ClusterDeployment/{ClusterDeploymentHostsSelection.js → hostSelection/ClusterDeploymentHostsSelection.js} +23 -14
- package/build/cjs/cim/components/ClusterDeployment/hostSelection/ClusterDeploymentHostsSelection.js.map +1 -0
- package/build/cjs/cim/components/ClusterDeployment/{ClusterDeploymentHostsSelectionAdvanced.js → hostSelection/ClusterDeploymentHostsSelectionAdvanced.js} +7 -6
- package/build/cjs/cim/components/ClusterDeployment/hostSelection/ClusterDeploymentHostsSelectionAdvanced.js.map +1 -0
- package/build/cjs/cim/components/ClusterDeployment/{ClusterDeploymentHostsSelectionBasic.js → hostSelection/ClusterDeploymentHostsSelectionBasic.js} +7 -7
- package/build/cjs/cim/components/ClusterDeployment/hostSelection/ClusterDeploymentHostsSelectionBasic.js.map +1 -0
- package/build/cjs/cim/components/ClusterDeployment/hostSelection/index.js +6 -0
- package/build/cjs/cim/components/ClusterDeployment/hostSelection/index.js.map +1 -0
- package/build/cjs/cim/components/ClusterDeployment/index.js +4 -4
- package/build/cjs/cim/components/ClusterDeployment/index.js.map +1 -1
- package/build/cjs/cim/components/ClusterDeployment/{ClusterDeploymentHostsNetworkTable.js → networking/ClusterDeploymentHostsNetworkTable.js} +10 -10
- package/build/cjs/cim/components/ClusterDeployment/networking/ClusterDeploymentHostsNetworkTable.js.map +1 -0
- package/build/cjs/cim/components/ClusterDeployment/{ClusterDeploymentNetworkingForm.js → networking/ClusterDeploymentNetworkingForm.js} +7 -10
- package/build/cjs/cim/components/ClusterDeployment/networking/ClusterDeploymentNetworkingForm.js.map +1 -0
- package/build/cjs/cim/components/ClusterDeployment/{ClusterDeploymentNetworkingStep.js → networking/ClusterDeploymentNetworkingStep.js} +10 -10
- package/build/cjs/cim/components/ClusterDeployment/networking/ClusterDeploymentNetworkingStep.js.map +1 -0
- package/build/cjs/cim/components/ClusterDeployment/networking/index.js +5 -0
- package/build/cjs/cim/components/ClusterDeployment/networking/index.js.map +1 -0
- package/build/cjs/cim/components/ClusterDeployment/{ClusterDeploymentReviewStep.js → review/ClusterDeploymentReviewStep.js} +21 -16
- package/build/cjs/cim/components/ClusterDeployment/review/ClusterDeploymentReviewStep.js.map +1 -0
- package/build/cjs/cim/components/ClusterDeployment/review/ReviewConfigMapsTable.js +51 -0
- package/build/cjs/cim/components/ClusterDeployment/review/ReviewConfigMapsTable.js.map +1 -0
- package/build/cjs/cim/components/ClusterDeployment/review/index.js +5 -0
- package/build/cjs/cim/components/ClusterDeployment/review/index.js.map +1 -0
- package/build/cjs/cim/components/ClusterDeployment/use-networking-formik.js +2 -3
- package/build/cjs/cim/components/ClusterDeployment/use-networking-formik.js.map +1 -1
- package/build/cjs/cim/components/ClusterDeployment/wizardTransition.js +1 -0
- package/build/cjs/cim/components/ClusterDeployment/wizardTransition.js.map +1 -1
- package/build/cjs/cim/components/Hypershift/HostedClusterWizard/DetailsStep/DetailsForm.js +7 -12
- package/build/cjs/cim/components/Hypershift/HostedClusterWizard/DetailsStep/DetailsForm.js.map +1 -1
- package/build/cjs/cim/components/Hypershift/modals/ManageHostsModal.js +2 -2
- package/build/cjs/cim/components/Hypershift/modals/ManageHostsModal.js.map +1 -1
- package/build/cjs/cim/components/InfraEnv/InfraEnvAgentTable.js +5 -2
- package/build/cjs/cim/components/InfraEnv/InfraEnvAgentTable.js.map +1 -1
- package/build/cjs/cim/components/InfraEnv/InfraTableToolbar.js +25 -3
- package/build/cjs/cim/components/InfraEnv/InfraTableToolbar.js.map +1 -1
- package/build/cjs/cim/components/helpers/agentClusterInstall.js +7 -1
- package/build/cjs/cim/components/helpers/agentClusterInstall.js.map +1 -1
- package/build/cjs/cim/components/helpers/agents.js +4 -1
- package/build/cjs/cim/components/helpers/agents.js.map +1 -1
- package/build/cjs/cim/components/helpers/toAssisted.js +43 -25
- package/build/cjs/cim/components/helpers/toAssisted.js.map +1 -1
- package/build/cjs/cim/components/helpers/versions.js +5 -1
- package/build/cjs/cim/components/helpers/versions.js.map +1 -1
- package/build/cjs/cim/components/modals/AddHostModal.js +10 -5
- package/build/cjs/cim/components/modals/AddHostModal.js.map +1 -1
- package/build/cjs/cim/components/modals/CimConfiguration/CimConfigurationFormFields.js +91 -0
- package/build/cjs/cim/components/modals/CimConfiguration/CimConfigurationFormFields.js.map +1 -0
- package/build/cjs/cim/components/modals/CimConfiguration/CimConfigurationModal.js +77 -121
- package/build/cjs/cim/components/modals/CimConfiguration/CimConfigurationModal.js.map +1 -1
- package/build/cjs/cim/components/modals/CimConfiguration/persist.js +44 -95
- package/build/cjs/cim/components/modals/CimConfiguration/persist.js.map +1 -1
- package/build/cjs/cim/components/modals/EditProxyModal.js +1 -1
- package/build/cjs/cim/components/modals/EditProxyModal.js.map +1 -1
- package/build/cjs/cim/components/modals/EditSSHKeyModal.js +1 -1
- package/build/cjs/cim/components/modals/EditSSHKeyModal.js.map +1 -1
- package/build/cjs/cim/components/modals/MassApproveAgentModal.js +3 -3
- package/build/cjs/cim/components/modals/MassApproveAgentModal.js.map +1 -1
- package/build/cjs/cim/hooks/index.js +6 -0
- package/build/cjs/cim/hooks/index.js.map +1 -0
- package/build/cjs/cim/hooks/types.js +3 -0
- package/build/cjs/cim/hooks/types.js.map +1 -0
- package/build/cjs/cim/hooks/useAgentServiceConfig.js +13 -0
- package/build/cjs/cim/hooks/useAgentServiceConfig.js.map +1 -0
- package/build/cjs/cim/hooks/useConfigMaps.js +12 -0
- package/build/cjs/cim/hooks/useConfigMaps.js.map +1 -0
- package/build/cjs/cim/hooks/useK8sWatchResource.js +12 -0
- package/build/cjs/cim/hooks/useK8sWatchResource.js.map +1 -0
- package/build/cjs/cim/types/index.js +1 -1
- package/build/cjs/cim/types/index.js.map +1 -1
- package/build/cjs/cim/types/models.js +54 -0
- package/build/cjs/cim/types/models.js.map +1 -0
- package/build/cjs/cim/utils.js +12 -1
- package/build/cjs/cim/utils.js.map +1 -1
- package/build/cjs/common/components/clusterConfiguration/ControlPlaneNodesDropdown.js +10 -1
- package/build/cjs/common/components/clusterConfiguration/ControlPlaneNodesDropdown.js.map +1 -1
- package/build/cjs/common/components/clusterConfiguration/DownloadIso.js +2 -2
- package/build/cjs/common/components/clusterConfiguration/DownloadIso.js.map +1 -1
- package/build/cjs/common/components/clusterConfiguration/ExternalPlatformsDropdown.js +49 -0
- package/build/cjs/common/components/clusterConfiguration/ExternalPlatformsDropdown.js.map +1 -0
- package/build/cjs/common/components/clusterConfiguration/SecurityFields.js +6 -4
- package/build/cjs/common/components/clusterConfiguration/SecurityFields.js.map +1 -1
- package/build/cjs/common/components/clusterConfiguration/index.js +1 -0
- package/build/cjs/common/components/clusterConfiguration/index.js.map +1 -1
- package/build/cjs/common/components/clusterWizard/clusterDetailsValidation.js +7 -7
- package/build/cjs/common/components/clusterWizard/clusterDetailsValidation.js.map +1 -1
- package/build/cjs/common/components/hosts/status.js +1 -2
- package/build/cjs/common/components/hosts/status.js.map +1 -1
- package/build/cjs/common/components/hosts/tableUtils.js +41 -1
- package/build/cjs/common/components/hosts/tableUtils.js.map +1 -1
- package/build/cjs/common/components/hosts/utils.js +5 -1
- package/build/cjs/common/components/hosts/utils.js.map +1 -1
- package/build/cjs/common/components/ui/OpenShiftSelectWithSearch.js +20 -139
- package/build/cjs/common/components/ui/OpenShiftSelectWithSearch.js.map +1 -1
- package/build/cjs/common/components/ui/OpenShiftVersionDropdown.js +10 -15
- package/build/cjs/common/components/ui/OpenShiftVersionDropdown.js.map +1 -1
- package/build/cjs/common/components/ui/OpenShiftVersionModal.js +8 -12
- package/build/cjs/common/components/ui/OpenShiftVersionModal.js.map +1 -1
- package/build/cjs/common/components/ui/formik/InputField.js +4 -5
- package/build/cjs/common/components/ui/formik/InputField.js.map +1 -1
- package/build/cjs/common/components/ui/formik/SelectFieldWithSearch.js +153 -0
- package/build/cjs/common/components/ui/formik/SelectFieldWithSearch.js.map +1 -0
- package/build/cjs/common/components/ui/formik/index.js +3 -1
- package/build/cjs/common/components/ui/formik/index.js.map +1 -1
- package/build/cjs/common/components/ui/formik/validationSchemas.js +4 -8
- package/build/cjs/common/components/ui/formik/validationSchemas.js.map +1 -1
- package/build/cjs/common/config/docs_links.js +9 -3
- package/build/cjs/common/config/docs_links.js.map +1 -1
- package/build/cjs/common/utils.js +4 -3
- package/build/cjs/common/utils.js.map +1 -1
- package/build/cjs/ocm/components/Routes.js.map +1 -1
- package/build/cjs/ocm/components/clusterConfiguration/OcmClusterDetailsFormFields.js +2 -1
- package/build/cjs/ocm/components/clusterConfiguration/OcmClusterDetailsFormFields.js.map +1 -1
- package/build/cjs/ocm/components/clusterConfiguration/OcmDiscoveryImageConfigForm.js +1 -1
- package/build/cjs/ocm/components/clusterConfiguration/OcmDiscoveryImageConfigForm.js.map +1 -1
- package/build/cjs/ocm/components/clusterConfiguration/OcmOpenShiftVersionSelect.js +10 -15
- package/build/cjs/ocm/components/clusterConfiguration/OcmOpenShiftVersionSelect.js.map +1 -1
- package/build/cjs/ocm/components/clusterConfiguration/OpenshiftVersionHelperText.js.map +1 -1
- package/build/cjs/ocm/components/clusterConfiguration/networkConfiguration/networkConfigurationValidation.js +1 -1
- package/build/cjs/ocm/components/clusterConfiguration/networkConfiguration/networkConfigurationValidation.js.map +1 -1
- package/build/cjs/ocm/components/clusterWizard/OperatorsBundle.js +2 -2
- package/build/cjs/ocm/components/clusterWizard/OperatorsBundle.js.map +1 -1
- package/build/cjs/ocm/components/clusterWizard/disconnected/ReviewStep.js +1 -1
- package/build/cjs/ocm/components/clusterWizard/disconnected/ReviewStep.js.map +1 -1
- package/lib/cim/components/Agent/AgentStatus.tsx +1 -1
- package/lib/cim/components/Agent/tableUtils.tsx +43 -13
- package/lib/cim/components/ClusterDeployment/ClusterDeploymentWizard.tsx +15 -5
- package/lib/cim/components/ClusterDeployment/ScaleUpForm.tsx +1 -1
- package/lib/cim/components/ClusterDeployment/{ACMClusterDeploymentDetailsStep.tsx → clusterDetails/ACMClusterDeploymentDetailsStep.tsx} +6 -8
- package/lib/cim/components/ClusterDeployment/{ClusterDeploymentDetailsForm.tsx → clusterDetails/ClusterDeploymentDetailsForm.tsx} +17 -11
- package/lib/cim/components/ClusterDeployment/{ClusterDeploymentDetailsStep.tsx → clusterDetails/ClusterDeploymentDetailsStep.tsx} +9 -10
- package/lib/cim/components/ClusterDeployment/{ClusterDetailsFormFields.tsx → clusterDetails/ClusterDetailsFormFields.tsx} +22 -24
- package/lib/cim/components/ClusterDeployment/clusterDetails/index.tsx +4 -0
- package/lib/cim/components/ClusterDeployment/{AdditionalNTPSourcesDialogToggle.tsx → components/AdditionalNTPSourcesDialogToggle.tsx} +1 -1
- package/lib/cim/components/ClusterDeployment/components/index.tsx +1 -0
- package/lib/cim/components/ClusterDeployment/constants.ts +1 -0
- package/lib/cim/components/ClusterDeployment/customManifests/ClusterDeploymentCustomManifestsStep.tsx +128 -0
- package/lib/cim/components/ClusterDeployment/customManifests/ConfigMapDetail.tsx +191 -0
- package/lib/cim/components/ClusterDeployment/customManifests/ConfigMapForm.tsx +247 -0
- package/lib/cim/components/ClusterDeployment/customManifests/index.tsx +1 -0
- package/lib/cim/components/ClusterDeployment/{ClusterDeploymentHostDiscoveryTable.tsx → hostDiscovery/ClusterDeploymentHostDiscoveryTable.tsx} +23 -14
- package/lib/cim/components/ClusterDeployment/{ClusterDeploymentHostsDiscovery.tsx → hostDiscovery/ClusterDeploymentHostsDiscovery.tsx} +8 -8
- package/lib/cim/components/ClusterDeployment/{ClusterDeploymentHostsDiscoveryStep.tsx → hostDiscovery/ClusterDeploymentHostsDiscoveryStep.tsx} +10 -11
- package/lib/cim/components/ClusterDeployment/hostDiscovery/index.tsx +1 -0
- package/lib/cim/components/ClusterDeployment/{ClusterDeploymentHostSelectionStep.tsx → hostSelection/ClusterDeploymentHostSelectionStep.tsx} +17 -16
- package/lib/cim/components/ClusterDeployment/{ClusterDeploymentHostsSelection.tsx → hostSelection/ClusterDeploymentHostsSelection.tsx} +33 -17
- package/lib/cim/components/ClusterDeployment/{ClusterDeploymentHostsSelectionAdvanced.tsx → hostSelection/ClusterDeploymentHostsSelectionAdvanced.tsx} +10 -12
- package/lib/cim/components/ClusterDeployment/{ClusterDeploymentHostsSelectionBasic.tsx → hostSelection/ClusterDeploymentHostsSelectionBasic.tsx} +9 -9
- package/lib/cim/components/ClusterDeployment/hostSelection/index.tsx +2 -0
- package/lib/cim/components/ClusterDeployment/index.ts +2 -2
- package/lib/cim/components/ClusterDeployment/{ClusterDeploymentHostsNetworkTable.tsx → networking/ClusterDeploymentHostsNetworkTable.tsx} +12 -12
- package/lib/cim/components/ClusterDeployment/{ClusterDeploymentNetworkingForm.tsx → networking/ClusterDeploymentNetworkingForm.tsx} +9 -13
- package/lib/cim/components/ClusterDeployment/{ClusterDeploymentNetworkingStep.tsx → networking/ClusterDeploymentNetworkingStep.tsx} +11 -13
- package/lib/cim/components/ClusterDeployment/networking/index.tsx +1 -0
- package/lib/cim/components/ClusterDeployment/{ClusterDeploymentReviewStep.tsx → review/ClusterDeploymentReviewStep.tsx} +36 -15
- package/lib/cim/components/ClusterDeployment/review/ReviewConfigMapsTable.tsx +70 -0
- package/lib/cim/components/ClusterDeployment/review/index.tsx +1 -0
- package/lib/cim/components/ClusterDeployment/types.ts +2 -0
- package/lib/cim/components/ClusterDeployment/use-networking-formik.ts +4 -4
- package/lib/cim/components/ClusterDeployment/wizardTransition.ts +2 -0
- package/lib/cim/components/Hypershift/HostedClusterWizard/DetailsStep/DetailsForm.tsx +7 -12
- package/lib/cim/components/Hypershift/HostedClusterWizard/DetailsStep/types.ts +1 -1
- package/lib/cim/components/Hypershift/modals/ManageHostsModal.tsx +2 -2
- package/lib/cim/components/InfraEnv/InfraEnvAgentTable.tsx +11 -0
- package/lib/cim/components/InfraEnv/InfraTableToolbar.tsx +77 -1
- package/lib/cim/components/helpers/agentClusterInstall.ts +4 -0
- package/lib/cim/components/helpers/agents.ts +5 -1
- package/lib/cim/components/helpers/toAssisted.ts +27 -2
- package/lib/cim/components/helpers/versions.ts +7 -3
- package/lib/cim/components/modals/AddHostModal.tsx +13 -1
- package/lib/cim/components/modals/CimConfiguration/CimConfigurationFormFields.tsx +259 -0
- package/lib/cim/components/modals/CimConfiguration/CimConfigurationModal.tsx +170 -193
- package/lib/cim/components/modals/CimConfiguration/persist.ts +62 -125
- package/lib/cim/components/modals/CimConfiguration/types.ts +7 -22
- package/lib/cim/components/modals/EditProxyModal.tsx +1 -1
- package/lib/cim/components/modals/EditSSHKeyModal.tsx +1 -1
- package/lib/cim/components/modals/MassApproveAgentModal.tsx +2 -2
- package/lib/cim/hooks/index.tsx +2 -0
- package/lib/cim/hooks/types.tsx +8 -0
- package/lib/cim/hooks/useAgentServiceConfig.tsx +15 -0
- package/lib/cim/hooks/useConfigMaps.tsx +14 -0
- package/lib/cim/hooks/useK8sWatchResource.tsx +27 -0
- package/lib/cim/types/index.ts +1 -1
- package/lib/cim/types/k8s/agent-cluster-install.ts +1 -0
- package/lib/cim/types/models.tsx +56 -0
- package/lib/cim/utils.ts +12 -0
- package/lib/common/components/clusterConfiguration/ControlPlaneNodesDropdown.tsx +10 -1
- package/lib/common/components/clusterConfiguration/DownloadIso.tsx +3 -1
- package/lib/common/components/clusterConfiguration/ExternalPlatformsDropdown.tsx +88 -0
- package/lib/common/components/clusterConfiguration/SecurityFields.tsx +12 -5
- package/lib/common/components/clusterConfiguration/index.ts +1 -0
- package/lib/common/components/clusterWizard/clusterDetailsValidation.ts +7 -7
- package/lib/common/components/clusterWizard/types.ts +1 -2
- package/lib/common/components/hosts/status.tsx +1 -2
- package/lib/common/components/hosts/tableUtils.tsx +48 -0
- package/lib/common/components/hosts/utils.ts +4 -0
- package/lib/common/components/ui/OpenShiftSelectWithSearch.tsx +38 -239
- package/lib/common/components/ui/OpenShiftVersionDropdown.tsx +14 -23
- package/lib/common/components/ui/OpenShiftVersionModal.tsx +12 -16
- package/lib/common/components/ui/formik/InputField.tsx +16 -12
- package/lib/common/components/ui/formik/SelectFieldWithSearch.tsx +278 -0
- package/lib/common/components/ui/formik/index.tsx +1 -0
- package/lib/common/components/ui/formik/types.ts +2 -2
- package/lib/common/components/ui/formik/validationSchemas.ts +7 -9
- package/lib/common/config/docs_links.ts +9 -6
- package/lib/common/utils.ts +1 -1
- package/lib/ocm/components/Routes.tsx +9 -7
- package/lib/ocm/components/clusterConfiguration/OcmClusterDetailsFormFields.tsx +17 -16
- package/lib/ocm/components/clusterConfiguration/OcmDiscoveryImageConfigForm.tsx +2 -2
- package/lib/ocm/components/clusterConfiguration/OcmOpenShiftVersionSelect.tsx +13 -18
- package/lib/ocm/components/clusterConfiguration/OpenshiftVersionHelperText.tsx +1 -1
- package/lib/ocm/components/clusterConfiguration/networkConfiguration/networkConfigurationValidation.ts +2 -2
- package/lib/ocm/components/clusterWizard/OperatorsBundle.tsx +2 -2
- package/lib/ocm/components/clusterWizard/disconnected/ReviewStep.tsx +1 -1
- package/package.json +4 -4
- package/build/@types/cim/components/ClusterDeployment/ACMClusterDeploymentDetailsStep.d.ts.map +0 -1
- package/build/@types/cim/components/ClusterDeployment/AdditionalNTPSourcesDialogToggle.d.ts.map +0 -1
- package/build/@types/cim/components/ClusterDeployment/ClusterDeploymentDetailsForm.d.ts.map +0 -1
- package/build/@types/cim/components/ClusterDeployment/ClusterDeploymentDetailsStep.d.ts.map +0 -1
- package/build/@types/cim/components/ClusterDeployment/ClusterDeploymentHostDiscoveryTable.d.ts.map +0 -1
- package/build/@types/cim/components/ClusterDeployment/ClusterDeploymentHostSelectionStep.d.ts.map +0 -1
- package/build/@types/cim/components/ClusterDeployment/ClusterDeploymentHostsDiscovery.d.ts.map +0 -1
- package/build/@types/cim/components/ClusterDeployment/ClusterDeploymentHostsDiscoveryStep.d.ts +0 -5
- package/build/@types/cim/components/ClusterDeployment/ClusterDeploymentHostsDiscoveryStep.d.ts.map +0 -1
- package/build/@types/cim/components/ClusterDeployment/ClusterDeploymentHostsNetworkTable.d.ts.map +0 -1
- package/build/@types/cim/components/ClusterDeployment/ClusterDeploymentHostsSelection.d.ts.map +0 -1
- package/build/@types/cim/components/ClusterDeployment/ClusterDeploymentHostsSelectionAdvanced.d.ts.map +0 -1
- package/build/@types/cim/components/ClusterDeployment/ClusterDeploymentHostsSelectionBasic.d.ts.map +0 -1
- package/build/@types/cim/components/ClusterDeployment/ClusterDeploymentNetworkingForm.d.ts.map +0 -1
- package/build/@types/cim/components/ClusterDeployment/ClusterDeploymentNetworkingStep.d.ts.map +0 -1
- package/build/@types/cim/components/ClusterDeployment/ClusterDeploymentReviewStep.d.ts.map +0 -1
- package/build/@types/cim/components/ClusterDeployment/ClusterDetailsFormFields.d.ts.map +0 -1
- package/build/@types/cim/components/modals/CimConfiguration/CimConfigurationForm.d.ts +0 -5
- package/build/@types/cim/components/modals/CimConfiguration/CimConfigurationForm.d.ts.map +0 -1
- package/build/@types/cim/types/resources.d.ts +0 -45
- package/build/@types/cim/types/resources.d.ts.map +0 -1
- package/build/cjs/cim/components/ClusterDeployment/ACMClusterDeploymentDetailsStep.js.map +0 -1
- package/build/cjs/cim/components/ClusterDeployment/AdditionalNTPSourcesDialogToggle.js.map +0 -1
- package/build/cjs/cim/components/ClusterDeployment/ClusterDeploymentDetailsForm.js.map +0 -1
- package/build/cjs/cim/components/ClusterDeployment/ClusterDeploymentDetailsStep.js.map +0 -1
- package/build/cjs/cim/components/ClusterDeployment/ClusterDeploymentHostDiscoveryTable.js.map +0 -1
- package/build/cjs/cim/components/ClusterDeployment/ClusterDeploymentHostSelectionStep.js.map +0 -1
- package/build/cjs/cim/components/ClusterDeployment/ClusterDeploymentHostsDiscovery.js.map +0 -1
- package/build/cjs/cim/components/ClusterDeployment/ClusterDeploymentHostsDiscoveryStep.js.map +0 -1
- package/build/cjs/cim/components/ClusterDeployment/ClusterDeploymentHostsNetworkTable.js.map +0 -1
- package/build/cjs/cim/components/ClusterDeployment/ClusterDeploymentHostsSelection.js.map +0 -1
- package/build/cjs/cim/components/ClusterDeployment/ClusterDeploymentHostsSelectionAdvanced.js.map +0 -1
- package/build/cjs/cim/components/ClusterDeployment/ClusterDeploymentHostsSelectionBasic.js.map +0 -1
- package/build/cjs/cim/components/ClusterDeployment/ClusterDeploymentNetworkingForm.js.map +0 -1
- package/build/cjs/cim/components/ClusterDeployment/ClusterDeploymentNetworkingStep.js.map +0 -1
- package/build/cjs/cim/components/ClusterDeployment/ClusterDeploymentReviewStep.js.map +0 -1
- package/build/cjs/cim/components/ClusterDeployment/ClusterDetailsFormFields.js.map +0 -1
- package/build/cjs/cim/components/modals/CimConfiguration/CimConfigurationForm.css +0 -23
- package/build/cjs/cim/components/modals/CimConfiguration/CimConfigurationForm.js +0 -85
- package/build/cjs/cim/components/modals/CimConfiguration/CimConfigurationForm.js.map +0 -1
- package/build/cjs/cim/components/modals/CimConfiguration/CimConfigurationModal.css +0 -3
- package/build/cjs/cim/types/resources.js +0 -10
- package/build/cjs/cim/types/resources.js.map +0 -1
- package/lib/cim/components/modals/CimConfiguration/CimConfigurationForm.css +0 -23
- package/lib/cim/components/modals/CimConfiguration/CimConfigurationForm.tsx +0 -290
- package/lib/cim/components/modals/CimConfiguration/CimConfigurationModal.css +0 -3
- package/lib/cim/types/resources.ts +0 -50
- /package/build/@types/cim/components/ClusterDeployment/{AdditionalNTPSourcesDialogToggle.d.ts → components/AdditionalNTPSourcesDialogToggle.d.ts} +0 -0
|
@@ -3,30 +3,21 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.OpenShiftSelectWithSearch = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const react_1 = tslib_1.__importDefault(require("react"));
|
|
6
|
-
const
|
|
7
|
-
const
|
|
8
|
-
const
|
|
9
|
-
const OpenShiftSelectWithSearch = ({ versions, getHelperText,
|
|
6
|
+
const formik_1 = require("formik");
|
|
7
|
+
const hooks_1 = require("../../hooks");
|
|
8
|
+
const formik_2 = require("./formik");
|
|
9
|
+
const OpenShiftSelectWithSearch = ({ versions, getHelperText, }) => {
|
|
10
|
+
const { t } = (0, hooks_1.useTranslation)();
|
|
11
|
+
const [{ value }] = (0, formik_1.useField)('customOpenshiftSelect');
|
|
10
12
|
const initialSelectOptions = react_1.default.useMemo(() => versions.map((version) => ({
|
|
11
13
|
children: version.supportLevel === 'beta'
|
|
12
14
|
? version.label + ' - ' + 'Developer preview release'
|
|
13
15
|
: version.label,
|
|
14
16
|
value: version.value,
|
|
15
17
|
})), [versions]);
|
|
16
|
-
const [isOpen, setIsOpen] = react_1.default.useState(false);
|
|
17
|
-
const [selected, setSelected] = react_1.default.useState('');
|
|
18
|
-
const [inputValue, setInputValue] = react_1.default.useState('');
|
|
19
18
|
const [filterValue, setFilterValue] = react_1.default.useState('');
|
|
20
19
|
const [selectOptions, setSelectOptions] = react_1.default.useState(initialSelectOptions);
|
|
21
|
-
const
|
|
22
|
-
const [activeItem, setActiveItem] = react_1.default.useState(null);
|
|
23
|
-
const textInputRef = react_1.default.useRef();
|
|
24
|
-
const { t } = (0, use_translation_wrapper_1.useTranslation)();
|
|
25
|
-
react_1.default.useEffect(() => {
|
|
26
|
-
if (textInputRef.current) {
|
|
27
|
-
textInputRef.current.maxLength = 30;
|
|
28
|
-
}
|
|
29
|
-
}, []);
|
|
20
|
+
const helperText = getHelperText && getHelperText(value, true);
|
|
30
21
|
react_1.default.useEffect(() => {
|
|
31
22
|
let newSelectOptions = initialSelectOptions;
|
|
32
23
|
// Filter menu items based on the text input value when one exists
|
|
@@ -37,133 +28,23 @@ const OpenShiftSelectWithSearch = ({ versions, getHelperText, setCustomOpenshift
|
|
|
37
28
|
newSelectOptions = [
|
|
38
29
|
{
|
|
39
30
|
isDisabled: true,
|
|
40
|
-
children:
|
|
41
|
-
value: '
|
|
31
|
+
children: t('ai:No results found for {{filter}}', { filter: filterValue }),
|
|
32
|
+
value: 'no_results',
|
|
42
33
|
},
|
|
43
34
|
];
|
|
44
35
|
}
|
|
45
|
-
// Open the menu when the input value changes and the new value is not empty
|
|
46
|
-
if (!isOpen) {
|
|
47
|
-
setIsOpen(true);
|
|
48
|
-
}
|
|
49
|
-
}
|
|
50
|
-
setSelectOptions(newSelectOptions);
|
|
51
|
-
setActiveItem(null);
|
|
52
|
-
setFocusedItemIndex(null);
|
|
53
|
-
}, [filterValue, initialSelectOptions, isOpen]);
|
|
54
|
-
const onToggleClick = () => {
|
|
55
|
-
setIsOpen(!isOpen);
|
|
56
|
-
};
|
|
57
|
-
const onSelect = (_event, value) => {
|
|
58
|
-
// Check if the specific value exists in newSelectOptions
|
|
59
|
-
const foundItem = selectOptions.find((menuItem) => String(menuItem.value) === String(value));
|
|
60
|
-
const newLabel = foundItem === null || foundItem === void 0 ? void 0 : foundItem.children;
|
|
61
|
-
if (value && value !== 'no results') {
|
|
62
|
-
setInputValue(newLabel);
|
|
63
|
-
setFilterValue('');
|
|
64
|
-
setSelected(value);
|
|
65
|
-
const filteredVersions = versions.filter((version) => version.value === value);
|
|
66
|
-
setCustomOpenshiftSelect({
|
|
67
|
-
label: filteredVersions[0].supportLevel === 'beta'
|
|
68
|
-
? filteredVersions[0].label + ' - ' + t('ai:Developer preview release')
|
|
69
|
-
: filteredVersions[0].label,
|
|
70
|
-
value: filteredVersions[0].value,
|
|
71
|
-
version: filteredVersions[0].version,
|
|
72
|
-
default: filteredVersions[0].default,
|
|
73
|
-
supportLevel: filteredVersions[0].supportLevel,
|
|
74
|
-
});
|
|
75
|
-
}
|
|
76
|
-
setIsOpen(false);
|
|
77
|
-
setFocusedItemIndex(null);
|
|
78
|
-
setActiveItem(null);
|
|
79
|
-
};
|
|
80
|
-
const onTextInputChange = (_event, value) => {
|
|
81
|
-
setInputValue(value);
|
|
82
|
-
setFilterValue(value);
|
|
83
|
-
};
|
|
84
|
-
const handleMenuArrowKeys = (key) => {
|
|
85
|
-
let indexToFocus;
|
|
86
|
-
if (isOpen) {
|
|
87
|
-
if (key === 'ArrowUp') {
|
|
88
|
-
// When no index is set or at the first index, focus to the last, otherwise decrement focus index
|
|
89
|
-
if (focusedItemIndex === null || focusedItemIndex === 0) {
|
|
90
|
-
indexToFocus = selectOptions.length - 1;
|
|
91
|
-
}
|
|
92
|
-
else {
|
|
93
|
-
indexToFocus = focusedItemIndex - 1;
|
|
94
|
-
}
|
|
95
|
-
}
|
|
96
|
-
if (key === 'ArrowDown') {
|
|
97
|
-
// When no index is set or at the last index, focus to the first, otherwise increment focus index
|
|
98
|
-
if (focusedItemIndex === null || focusedItemIndex === selectOptions.length - 1) {
|
|
99
|
-
indexToFocus = 0;
|
|
100
|
-
}
|
|
101
|
-
else {
|
|
102
|
-
indexToFocus = focusedItemIndex + 1;
|
|
103
|
-
}
|
|
104
|
-
}
|
|
105
|
-
setFocusedItemIndex(indexToFocus !== null && indexToFocus !== void 0 ? indexToFocus : 0);
|
|
106
|
-
const focusedItem = selectOptions.filter((option) => !option.isDisabled)[indexToFocus !== null && indexToFocus !== void 0 ? indexToFocus : 0];
|
|
107
|
-
setActiveItem(`select-typeahead-${focusedItem.value.replace(' ', '-')}`);
|
|
108
|
-
}
|
|
109
|
-
};
|
|
110
|
-
const onInputKeyDown = (event) => {
|
|
111
|
-
const enabledMenuItems = selectOptions.filter((option) => !option.isDisabled);
|
|
112
|
-
const [firstMenuItem] = enabledMenuItems;
|
|
113
|
-
const focusedItem = focusedItemIndex ? enabledMenuItems[focusedItemIndex] : firstMenuItem;
|
|
114
|
-
switch (event.key) {
|
|
115
|
-
// Select the first available option
|
|
116
|
-
case 'Enter':
|
|
117
|
-
if (isOpen && focusedItem.value !== 'no results') {
|
|
118
|
-
setInputValue(String(focusedItem.children));
|
|
119
|
-
setFilterValue('');
|
|
120
|
-
setSelected(String(focusedItem.children));
|
|
121
|
-
}
|
|
122
|
-
setIsOpen((prevIsOpen) => !prevIsOpen);
|
|
123
|
-
setFocusedItemIndex(null);
|
|
124
|
-
setActiveItem(null);
|
|
125
|
-
break;
|
|
126
|
-
case 'Tab':
|
|
127
|
-
case 'Escape':
|
|
128
|
-
setIsOpen(false);
|
|
129
|
-
setActiveItem(null);
|
|
130
|
-
break;
|
|
131
|
-
case 'ArrowUp':
|
|
132
|
-
case 'ArrowDown':
|
|
133
|
-
event.preventDefault();
|
|
134
|
-
handleMenuArrowKeys(event.key);
|
|
135
|
-
break;
|
|
136
36
|
}
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
const helperText = getHelperText && getHelperText(selected, true);
|
|
149
|
-
return (react_1.default.createElement(react_1.default.Fragment, null,
|
|
150
|
-
react_1.default.createElement(react_core_1.Select, { id: "customOpenshiftSelect", isOpen: isOpen, selected: selected, onSelect: onSelect, onOpenChange: () => {
|
|
151
|
-
setIsOpen(false);
|
|
152
|
-
}, toggle: toggle, isScrollable: true },
|
|
153
|
-
react_1.default.createElement(react_core_1.SelectList, { id: "select-typeahead-listbox" }, selectOptions.reverse().map((option, index) => {
|
|
154
|
-
const match = option.value.match(/\d+\.(\d+)\.\d+/);
|
|
155
|
-
const y = match ? match[1] : null;
|
|
156
|
-
const previousY = index > 0
|
|
157
|
-
? (selectOptions[index - 1].value.match(/\d+\.(\d+)\.\d+/) || [])[1]
|
|
158
|
-
: null;
|
|
159
|
-
const showDivider = previousY !== null && y !== previousY;
|
|
160
|
-
return (react_1.default.createElement(react_1.default.Fragment, { key: index },
|
|
161
|
-
showDivider && (react_1.default.createElement(react_core_1.Divider, { component: "li", id: `divider-${option.value}`, key: `divider-${option.value}` })),
|
|
162
|
-
react_1.default.createElement(react_core_1.SelectOption, Object.assign({ key: option.value, isFocused: focusedItemIndex === index, className: option.className, onClick: () => setSelected(option.value), id: `select-typeahead-${option.value.replace(' ', '-')}` }, option, { ref: null }))));
|
|
163
|
-
}))),
|
|
164
|
-
react_1.default.createElement(react_core_1.FormHelperText, null,
|
|
165
|
-
react_1.default.createElement(react_core_1.HelperText, null,
|
|
166
|
-
react_1.default.createElement(react_core_1.HelperTextItem, { variant: "default", "data-testid": "openshift-select-with-search-helper-text" }, helperText !== null && helperText !== void 0 ? helperText : 'Select an OpenShift version from the list or use the type ahead to narrow down the list.')))));
|
|
37
|
+
const selectOptionsWithDividers = newSelectOptions.map((option, index) => {
|
|
38
|
+
const match = option.value.match(/\d+\.(\d+)\.\d+/);
|
|
39
|
+
const y = match ? match[1] : null;
|
|
40
|
+
const previousY = index > 0
|
|
41
|
+
? (newSelectOptions[index - 1].value.match(/\d+\.(\d+)\.\d+/) || [])[1]
|
|
42
|
+
: null;
|
|
43
|
+
return Object.assign(Object.assign({}, option), { showDivider: previousY !== null && y !== previousY });
|
|
44
|
+
});
|
|
45
|
+
setSelectOptions(selectOptionsWithDividers);
|
|
46
|
+
}, [filterValue, initialSelectOptions, t]);
|
|
47
|
+
return (react_1.default.createElement(formik_2.SelectFieldWithSearch, { selectOptions: selectOptions, filterValue: filterValue, setFilterValue: setFilterValue, name: 'customOpenshiftSelect', helperText: helperText !== null && helperText !== void 0 ? helperText : t('ai:Select an OpenShift version from the list or use the type ahead to narrow down the list.') }));
|
|
167
48
|
};
|
|
168
49
|
exports.OpenShiftSelectWithSearch = OpenShiftSelectWithSearch;
|
|
169
50
|
//# sourceMappingURL=OpenShiftSelectWithSearch.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"OpenShiftSelectWithSearch.js","sourceRoot":"","sources":["../../../../../lib/common/components/ui/OpenShiftSelectWithSearch.tsx"],"names":[],"mappings":";;;;AAAA,
|
|
1
|
+
{"version":3,"file":"OpenShiftSelectWithSearch.js","sourceRoot":"","sources":["../../../../../lib/common/components/ui/OpenShiftSelectWithSearch.tsx"],"names":[],"mappings":";;;;AAAA,0DAA0B;AAE1B,mCAAkC;AAGlC,uCAA6C;AAC7C,qCAAiD;AAQ1C,MAAM,yBAAyB,GAA4D,CAAC,EACjG,QAAQ,EACR,aAAa,GACkB,EAAE,EAAE;IACnC,MAAM,EAAE,CAAC,EAAE,GAAG,IAAA,sBAAc,GAAE,CAAC;IAC/B,MAAM,CAAC,EAAE,KAAK,EAAE,CAAC,GACf,IAAA,iBAAQ,EAAgD,uBAAuB,CAAC,CAAC;IACnF,MAAM,oBAAoB,GAAG,eAAK,CAAC,OAAO,CACxC,GAAG,EAAE,CACH,QAAQ,CAAC,GAAG,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,CAAC;QACzB,QAAQ,EACN,OAAO,CAAC,YAAY,KAAK,MAAM;YAC7B,CAAC,CAAC,OAAO,CAAC,KAAK,GAAG,KAAK,GAAG,2BAA2B;YACrD,CAAC,CAAC,OAAO,CAAC,KAAK;QACnB,KAAK,EAAE,OAAO,CAAC,KAAK;KACrB,CAAC,CAAC,EACL,CAAC,QAAQ,CAAC,CACX,CAAC;IAEF,MAAM,CAAC,WAAW,EAAE,cAAc,CAAC,GAAG,eAAK,CAAC,QAAQ,CAAS,EAAE,CAAC,CAAC;IACjE,MAAM,CAAC,aAAa,EAAE,gBAAgB,CAAC,GACrC,eAAK,CAAC,QAAQ,CAAsB,oBAAoB,CAAC,CAAC;IAE5D,MAAM,UAAU,GAAG,aAAa,IAAI,aAAa,CAAC,KAAK,EAAE,IAAI,CAAC,CAAC;IAE/D,eAAK,CAAC,SAAS,CAAC,GAAG,EAAE;QACnB,IAAI,gBAAgB,GAAwB,oBAAoB,CAAC;QAEjE,kEAAkE;QAClE,IAAI,WAAW,EAAE;YACf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E,WAAW,EACxB,cAAc,EAAE,cAAc,EAC9B,IAAI,EAAE,uBAAuB,EAC7B,UAAU,EACR,UAAU,aAAV,UAAU,cAAV,UAAU,GACV,CAAC,CACC,6FAA6F,CAC9F,GAEH,CACH,CAAC;AACJ,CAAC,CAAC;AA9EW,QAAA,yBAAyB,6BA8EpC"}
|
|
@@ -17,7 +17,7 @@ const getParsedVersions = (items) => {
|
|
|
17
17
|
}));
|
|
18
18
|
return { parsedVersions: parsedVersions.reverse() };
|
|
19
19
|
};
|
|
20
|
-
const OpenShiftVersionDropdown = ({ name, items, versions, getHelperText, showReleasesLink, showOpenshiftVersionModal,
|
|
20
|
+
const OpenShiftVersionDropdown = ({ name, items, versions, getHelperText, showReleasesLink, showOpenshiftVersionModal, customItem, }) => {
|
|
21
21
|
const [field, , { setValue }] = (0, formik_1.useField)(name);
|
|
22
22
|
const [isOpen, setOpen] = react_1.default.useState(false);
|
|
23
23
|
const { t } = (0, use_translation_wrapper_1.useTranslation)();
|
|
@@ -25,9 +25,13 @@ const OpenShiftVersionDropdown = ({ name, items, versions, getHelperText, showRe
|
|
|
25
25
|
const { values: { customOpenshiftSelect }, } = (0, formik_1.useFormikContext)();
|
|
26
26
|
const [current, setCurrent] = react_1.default.useState();
|
|
27
27
|
react_1.default.useEffect(() => {
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
28
|
+
let defaultVersion = versions.find((item) => item.default);
|
|
29
|
+
if (customOpenshiftSelect && customItem) {
|
|
30
|
+
defaultVersion = customItem;
|
|
31
|
+
}
|
|
32
|
+
else if (customOpenshiftSelect) {
|
|
33
|
+
defaultVersion = versions.find((item) => item.value === customOpenshiftSelect);
|
|
34
|
+
}
|
|
31
35
|
setCurrent((defaultVersion === null || defaultVersion === void 0 ? void 0 : defaultVersion.label) || '');
|
|
32
36
|
setValue((defaultVersion === null || defaultVersion === void 0 ? void 0 : defaultVersion.value) || '');
|
|
33
37
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
@@ -42,19 +46,10 @@ const OpenShiftVersionDropdown = ({ name, items, versions, getHelperText, showRe
|
|
|
42
46
|
lastY = y;
|
|
43
47
|
return items;
|
|
44
48
|
});
|
|
45
|
-
const parsedVersionsForCustomItems = getParsedVersions(customItems);
|
|
46
|
-
let lastCustomY = '';
|
|
47
|
-
const customDropdownItems = parsedVersionsForCustomItems.parsedVersions.map(({ y, versions }) => {
|
|
48
|
-
const customItems = versions.map(({ value, label }) => (react_1.default.createElement(react_core_1.DropdownItem, { key: value, id: value, value: value }, label)));
|
|
49
|
-
if (lastCustomY !== null && y !== lastCustomY) {
|
|
50
|
-
customItems.push(react_1.default.createElement(react_core_1.Divider, { key: `separator-${y || ''}` }));
|
|
51
|
-
}
|
|
52
|
-
lastCustomY = y;
|
|
53
|
-
return customItems;
|
|
54
|
-
});
|
|
55
49
|
const dropdownGroup = [
|
|
56
50
|
dropdownItems.length && (react_1.default.createElement(react_core_1.DropdownGroup, { label: "Latest releases", key: "latest-releases" }, dropdownItems)),
|
|
57
|
-
|
|
51
|
+
customItem && (react_1.default.createElement(react_core_1.DropdownGroup, { label: "Custom releases", key: "custom-releases" },
|
|
52
|
+
react_1.default.createElement(react_core_1.DropdownItem, { key: customItem.value, id: customItem.value, value: customItem.value }, customItem.label))),
|
|
58
53
|
react_1.default.createElement(react_core_1.DropdownGroup, { key: "all-available-versions" },
|
|
59
54
|
react_1.default.createElement(react_core_1.DropdownItem, { key: "all-versions", id: "all-versions", onSelect: (e) => e.preventDefault() },
|
|
60
55
|
react_1.default.createElement(react_core_1.Button, { variant: "link", isInline: true, onClick: () => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"OpenShiftVersionDropdown.js","sourceRoot":"","sources":["../../../../../lib/common/components/ui/OpenShiftVersionDropdown.tsx"],"names":[],"mappings":";;;;AAAA,0DAA0B;AAC1B,uDAYgC;AAGhC,iFAAqE;AACrE,mCAAoD;AACpD,qCAAsC;AACtC,0EAA0C;AAC1C,yCAAiD;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IAAI,0BAAiB,EAAE;gBAClE,wDAAmB,yBAAyB,IACzC,CAAC,CAAC,wCAAwC,CAAC,CACvC,CACM,CACX,CACP,CACS,CACb,CAAC;AACJ,CAAC,CAAC;AAlJW,QAAA,wBAAwB,4BAkJnC"}
|
|
@@ -2,29 +2,25 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.OpenShiftVersionModal = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
|
-
const react_1 = tslib_1.
|
|
5
|
+
const react_1 = tslib_1.__importDefault(require("react"));
|
|
6
6
|
const react_core_1 = require("@patternfly/react-core");
|
|
7
7
|
const OpenShiftSelectWithSearch_1 = require("./OpenShiftSelectWithSearch");
|
|
8
8
|
const formik_1 = require("formik");
|
|
9
9
|
require("./OpenShiftVersionModal.css");
|
|
10
10
|
const OpenShiftVersionModal = ({ allVersions, setOpenshiftVersionModalOpen, getHelperText, }) => {
|
|
11
11
|
const { setFieldValue } = (0, formik_1.useFormikContext)();
|
|
12
|
-
const
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
if (customOpenshiftSelect) {
|
|
16
|
-
setFieldValue('customOpenshiftSelect', customOpenshiftSelect);
|
|
17
|
-
}
|
|
18
|
-
onClose();
|
|
12
|
+
const onCancel = () => {
|
|
13
|
+
setFieldValue('customOpenshiftSelect', null);
|
|
14
|
+
setOpenshiftVersionModalOpen(false);
|
|
19
15
|
};
|
|
20
|
-
return (react_1.default.createElement(react_core_1.Modal, { id: "available-openshift-versions-modal", isOpen: true, onClose:
|
|
16
|
+
return (react_1.default.createElement(react_core_1.Modal, { id: "available-openshift-versions-modal", isOpen: true, onClose: () => setOpenshiftVersionModalOpen(false), variant: react_core_1.ModalVariant.small },
|
|
21
17
|
react_1.default.createElement(react_core_1.ModalHeader, { title: "Available OpenShift Versions" }),
|
|
22
18
|
react_1.default.createElement(react_core_1.ModalBody, null,
|
|
23
19
|
react_1.default.createElement(react_core_1.FormGroup, { id: `form-control__customOpenshiftSelect`, fieldId: 'customOpenshiftSelect', label: 'OpenShift version', isRequired: true },
|
|
24
|
-
react_1.default.createElement(OpenShiftSelectWithSearch_1.OpenShiftSelectWithSearch, { versions: allVersions, getHelperText: getHelperText
|
|
20
|
+
react_1.default.createElement(OpenShiftSelectWithSearch_1.OpenShiftSelectWithSearch, { versions: allVersions, getHelperText: getHelperText }))),
|
|
25
21
|
react_1.default.createElement(react_core_1.ModalFooter, null,
|
|
26
|
-
react_1.default.createElement(react_core_1.Button, { key: "select-custom-ocp", variant: react_core_1.ButtonVariant.primary, onClick:
|
|
27
|
-
react_1.default.createElement(react_core_1.Button, { key: "close-custom-ocp", variant: react_core_1.ButtonVariant.link, onClick:
|
|
22
|
+
react_1.default.createElement(react_core_1.Button, { key: "select-custom-ocp", variant: react_core_1.ButtonVariant.primary, onClick: () => setOpenshiftVersionModalOpen(false) }, "Select"),
|
|
23
|
+
react_1.default.createElement(react_core_1.Button, { key: "close-custom-ocp", variant: react_core_1.ButtonVariant.link, onClick: onCancel }, "Cancel"))));
|
|
28
24
|
};
|
|
29
25
|
exports.OpenShiftVersionModal = OpenShiftVersionModal;
|
|
30
26
|
//# sourceMappingURL=OpenShiftVersionModal.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"OpenShiftVersionModal.js","sourceRoot":"","sources":["../../../../../lib/common/components/ui/OpenShiftVersionModal.tsx"],"names":[],"mappings":";;;;AAAA,
|
|
1
|
+
{"version":3,"file":"OpenShiftVersionModal.js","sourceRoot":"","sources":["../../../../../lib/common/components/ui/OpenShiftVersionModal.tsx"],"names":[],"mappings":";;;;AAAA,0DAA0B;AAC1B,uDASgC;AAChC,2EAAwE;AAExE,mCAA0C;AAE1C,uCAAqC;AAQ9B,MAAM,qBAAqB,GAAG,CAAC,EACpC,WAAW,EACX,4BAA4B,EAC5B,aAAa,GACc,EAAE,EAAE;IAC/B,MAAM,EAAE,aAAa,EAAE,GAAG,IAAA,yBAAgB,GAAwB,CAAC;IAEnE,MAAM,QAAQ,GAAG,GAAG,EAAE;QACpB,aAAa,CAAC,uBAAuB,EAAE,IAAI,CAAC,CAAC;QAC7C,4BAA4B,CAAC,KAAK,CAAC,CAAC;IACtC,CAAC,CAAC;IAEF,OAAO,CACL,8BAAC,kBAAK,IACJ,EAAE,EAAC,oCAAoC,EACvC,MAAM,QACN,OAAO,EAAE,GAAG,EAAE,CAAC,4BAA4B,CAAC,KAAK,CAAC,EAClD,OAAO,EAAE,yBAAY,CAAC,KAAK;QAE3B,8BAAC,wBAAW,IAAC,KAAK,EAAC,8BAA8B,GAAG;QACpD,8BAAC,sBAAS;YACR,8BAAC,sBAAS,IACR,EAAE,EAAE,qCAAqC,EACzC,OAAO,EAAE,uBAAuB,EAChC,KAAK,EAAE,mBAAmB,EAC1B,UAAU;gBAEV,8BAAC,qDAAyB,IAAC,QAAQ,EAAE,WAAW,EAAE,aAAa,EAAE,aAAa,GAAI,CACxE,CACF;QACZ,8BAAC,wBAAW;YACV,8BAAC,mBAAM,IACL,GAAG,EAAC,mBAAmB,EACvB,OAAO,EAAE,0BAAa,CAAC,OAAO,EAC9B,OAAO,EAAE,GAAG,EAAE,CAAC,4BAA4B,CAAC,KAAK,CAAC,aAG3C;YACT,8BAAC,mBAAM,IAAC,GAAG,EAAC,kBAAkB,EAAC,OAAO,EAAE,0BAAa,CAAC,IAAI,EAAE,OAAO,EAAE,QAAQ,aAEpE,CACG,CACR,CACT,CAAC;AACJ,CAAC,CAAC;AA5CW,QAAA,qBAAqB,yBA4ChC"}
|
|
@@ -8,7 +8,7 @@ const utils_1 = require("./utils");
|
|
|
8
8
|
const useFieldErrorMsg_1 = tslib_1.__importDefault(require("../../../hooks/useFieldErrorMsg"));
|
|
9
9
|
const exclamation_circle_icon_1 = tslib_1.__importDefault(require("@patternfly/react-icons/dist/js/icons/exclamation-circle-icon"));
|
|
10
10
|
const InputField = React.forwardRef((_a, ref) => {
|
|
11
|
-
var { label, labelIcon, helperText, isRequired, onChange, validate, idPostfix, children, noDefaultOnChange, description, labelInfo, showErrorMessage = true } = _a, props = tslib_1.__rest(_a, ["label", "labelIcon", "helperText", "isRequired", "onChange", "validate", "idPostfix", "children", "noDefaultOnChange", "description", "labelInfo", "showErrorMessage"]);
|
|
11
|
+
var { label, labelIcon, helperText, isRequired, onChange, validate, idPostfix, children, noDefaultOnChange, description, labelInfo, showErrorMessage = true, type = 'text' } = _a, props = tslib_1.__rest(_a, ["label", "labelIcon", "helperText", "isRequired", "onChange", "validate", "idPostfix", "children", "noDefaultOnChange", "description", "labelInfo", "showErrorMessage", "type"]);
|
|
12
12
|
const [field, { error, touched }] = (0, formik_1.useField)({
|
|
13
13
|
name: props.name,
|
|
14
14
|
validate,
|
|
@@ -26,13 +26,12 @@ const InputField = React.forwardRef((_a, ref) => {
|
|
|
26
26
|
!noDefaultOnChange && field.onChange(event);
|
|
27
27
|
onChange && onChange(event);
|
|
28
28
|
}
|
|
29
|
-
} }))),
|
|
29
|
+
}, type: type }))),
|
|
30
30
|
React.createElement(react_core_1.SplitItem, null, children)),
|
|
31
31
|
((showErrorMessage && !isValid) || helperText) && (React.createElement(react_core_1.FormHelperText, null,
|
|
32
32
|
React.createElement(react_core_1.HelperText, null,
|
|
33
|
-
React.createElement(react_core_1.HelperTextItem, { icon:
|
|
34
|
-
|
|
35
|
-
: `${fieldId}-helper`, "data-testid": `input-field-${fieldId}-helper-text` }, showErrorMessage ? errorMessage : helperText))))));
|
|
33
|
+
showErrorMessage && !isValid && (React.createElement(react_core_1.HelperTextItem, { icon: React.createElement(exclamation_circle_icon_1.default, null), variant: 'error', id: `${fieldId}-helper-error` }, errorMessage)),
|
|
34
|
+
helperText && (React.createElement(react_core_1.HelperTextItem, { variant: 'default', id: `${fieldId}-helper` }, helperText)))))));
|
|
36
35
|
});
|
|
37
36
|
exports.default = InputField;
|
|
38
37
|
//# sourceMappingURL=InputField.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"InputField.js","sourceRoot":"","sources":["../../../../../../lib/common/components/ui/formik/InputField.tsx"],"names":[],"mappings":";;;AAAA,qDAA+B;AAC/B,mCAAkC;AAClC,uDAQgC;AAEhC,mCAAqC;AACrC,+FAA+D;AAC/D,oIAAkG;AAElG,MAAM,UAAU,GAGZ,KAAK,CAAC,UAAU,CAClB,CACE,
|
|
1
|
+
{"version":3,"file":"InputField.js","sourceRoot":"","sources":["../../../../../../lib/common/components/ui/formik/InputField.tsx"],"names":[],"mappings":";;;AAAA,qDAA+B;AAC/B,mCAAkC;AAClC,uDAQgC;AAEhC,mCAAqC;AACrC,+FAA+D;AAC/D,oIAAkG;AAElG,MAAM,UAAU,GAGZ,KAAK,CAAC,UAAU,CAClB,CACE,EAeC,EACD,GAAgC,EAChC,EAAE;QAjBF,EACE,KAAK,EACL,SAAS,EACT,UAAU,EACV,UAAU,EACV,QAAQ,EACR,QAAQ,EACR,SAAS,EACT,QAAQ,EACR,iBAAiB,EACjB,WAAW,EACX,SAAS,EACT,gBAAgB,GAAG,IAAI,EACvB,IAAI,GAAG,MAAM,OAEd,EADI,KAAK,sBAdV,gLAeC,CADS;IAIV,MAAM,CAAC,KAAK,EAAE,EAAE,KAAK,EAAE,OAAO,EAAE,CAAC,GAAG,IAAA,iBAAQ,EAAC;QAC3C,IAAI,EAAE,KAAK,CAAC,IAAI;QAChB,QAAQ;KACT,CAAC,CAAC;IAEH,MAAM,OAAO,GAAG,IAAA,kBAAU,EAAC,KAAK,CAAC,IAAI,EAAE,OAAO,EAAE,SAAS,CAAC,CAAC;IAC3D,MAAM,YAAY,GAAG,IAAA,0BAAgB,EAAC,EAAE,IAAI,EAAE,KAAK,CAAC,IAAI,EAAE,UAAU,EAAE,KAAK,EAAE,QAAQ,EAAE,CAAC,CAAC;IACzF,MAAM,OAAO,GAAG,CAAC,CAAC,OAAO,IAAI,KAAK,CAAC,CAAC;IAEpC,OAAO,CACL,oBAAC,sBAAS,IACR,EAAE,EAAE,iBAAiB,OAAO,EAA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I,CAClB,CACU,CACE,CAClB,CACS,CACb,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,kBAAe,UAAU,CAAC"}
|
|
@@ -0,0 +1,153 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const tslib_1 = require("tslib");
|
|
4
|
+
const react_1 = tslib_1.__importDefault(require("react"));
|
|
5
|
+
const react_core_1 = require("@patternfly/react-core");
|
|
6
|
+
const times_icon_1 = tslib_1.__importDefault(require("@patternfly/react-icons/dist/esm/icons/times-icon"));
|
|
7
|
+
const formik_1 = require("formik");
|
|
8
|
+
const lodash_es_1 = require("lodash-es");
|
|
9
|
+
const NO_RESULTS = 'no_results';
|
|
10
|
+
const createItemId = (val) => `select-multi-typeahead-${val.replace(' ', '-')}`;
|
|
11
|
+
const SelectFieldWithSearch = ({ name, label, isRequired, selectOptions, filterValue, setFilterValue, isMultiSelect = false, isLoading = false, placeholder, helperText, }) => {
|
|
12
|
+
const [isOpen, setIsOpen] = react_1.default.useState(false);
|
|
13
|
+
const [{ value }, , { setValue }] = (0, formik_1.useField)(name);
|
|
14
|
+
const [focusedItemIndex, setFocusedItemIndex] = react_1.default.useState(null);
|
|
15
|
+
const [activeItemId, setActiveItemId] = react_1.default.useState(null);
|
|
16
|
+
const textInputRef = react_1.default.useRef();
|
|
17
|
+
const setActiveAndFocusedItem = (itemIndex) => {
|
|
18
|
+
setFocusedItemIndex(itemIndex);
|
|
19
|
+
const focusedItem = selectOptions[itemIndex];
|
|
20
|
+
setActiveItemId(createItemId(focusedItem.value));
|
|
21
|
+
};
|
|
22
|
+
const resetActiveAndFocusedItem = () => {
|
|
23
|
+
setFocusedItemIndex(null);
|
|
24
|
+
setActiveItemId(null);
|
|
25
|
+
};
|
|
26
|
+
const closeMenu = () => {
|
|
27
|
+
setIsOpen(false);
|
|
28
|
+
resetActiveAndFocusedItem();
|
|
29
|
+
};
|
|
30
|
+
const onInputClick = () => {
|
|
31
|
+
if (!isOpen) {
|
|
32
|
+
setIsOpen(true);
|
|
33
|
+
}
|
|
34
|
+
else if (!filterValue) {
|
|
35
|
+
closeMenu();
|
|
36
|
+
}
|
|
37
|
+
};
|
|
38
|
+
const handleMenuArrowKeys = (key) => {
|
|
39
|
+
let indexToFocus = 0;
|
|
40
|
+
if (!isOpen) {
|
|
41
|
+
setIsOpen(true);
|
|
42
|
+
}
|
|
43
|
+
if (selectOptions.every((option) => option.isDisabled)) {
|
|
44
|
+
return;
|
|
45
|
+
}
|
|
46
|
+
if (key === 'ArrowUp') {
|
|
47
|
+
// When no index is set or at the first index, focus to the last, otherwise decrement focus index
|
|
48
|
+
if (focusedItemIndex === null || focusedItemIndex === 0) {
|
|
49
|
+
indexToFocus = selectOptions.length - 1;
|
|
50
|
+
}
|
|
51
|
+
else {
|
|
52
|
+
indexToFocus = focusedItemIndex - 1;
|
|
53
|
+
}
|
|
54
|
+
// Skip disabled options
|
|
55
|
+
while (selectOptions[indexToFocus].isDisabled) {
|
|
56
|
+
indexToFocus--;
|
|
57
|
+
if (indexToFocus === -1) {
|
|
58
|
+
indexToFocus = selectOptions.length - 1;
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
if (key === 'ArrowDown') {
|
|
63
|
+
// When no index is set or at the last index, focus to the first, otherwise increment focus index
|
|
64
|
+
if (focusedItemIndex === null || focusedItemIndex === selectOptions.length - 1) {
|
|
65
|
+
indexToFocus = 0;
|
|
66
|
+
}
|
|
67
|
+
else {
|
|
68
|
+
indexToFocus = focusedItemIndex + 1;
|
|
69
|
+
}
|
|
70
|
+
// Skip disabled options
|
|
71
|
+
while (selectOptions[indexToFocus].isDisabled) {
|
|
72
|
+
indexToFocus++;
|
|
73
|
+
if (indexToFocus === selectOptions.length) {
|
|
74
|
+
indexToFocus = 0;
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
setActiveAndFocusedItem(indexToFocus);
|
|
79
|
+
};
|
|
80
|
+
const onInputKeyDown = (event) => {
|
|
81
|
+
const focusedItem = focusedItemIndex !== null ? selectOptions[focusedItemIndex] : null;
|
|
82
|
+
switch (event.key) {
|
|
83
|
+
case 'Enter':
|
|
84
|
+
if (isOpen &&
|
|
85
|
+
focusedItem &&
|
|
86
|
+
focusedItem.value !== NO_RESULTS &&
|
|
87
|
+
!focusedItem.isAriaDisabled) {
|
|
88
|
+
onSelect(focusedItem.value);
|
|
89
|
+
}
|
|
90
|
+
if (!isOpen) {
|
|
91
|
+
setIsOpen(true);
|
|
92
|
+
}
|
|
93
|
+
break;
|
|
94
|
+
case 'ArrowUp':
|
|
95
|
+
case 'ArrowDown':
|
|
96
|
+
event.preventDefault();
|
|
97
|
+
handleMenuArrowKeys(event.key);
|
|
98
|
+
break;
|
|
99
|
+
}
|
|
100
|
+
};
|
|
101
|
+
const onToggleClick = () => {
|
|
102
|
+
var _a;
|
|
103
|
+
setIsOpen(!isOpen);
|
|
104
|
+
(_a = textInputRef === null || textInputRef === void 0 ? void 0 : textInputRef.current) === null || _a === void 0 ? void 0 : _a.focus();
|
|
105
|
+
};
|
|
106
|
+
const onTextInputChange = (_event, value) => {
|
|
107
|
+
setFilterValue(value);
|
|
108
|
+
resetActiveAndFocusedItem();
|
|
109
|
+
};
|
|
110
|
+
const onSelect = react_1.default.useCallback((val) => {
|
|
111
|
+
var _a, _b;
|
|
112
|
+
if (val && val !== NO_RESULTS) {
|
|
113
|
+
if (isMultiSelect && Array.isArray(value)) {
|
|
114
|
+
setValue(value.some((v) => (0, lodash_es_1.isEqual)(v, val))
|
|
115
|
+
? value.filter((v) => !(0, lodash_es_1.isEqual)(v, val))
|
|
116
|
+
: [...value, val]);
|
|
117
|
+
}
|
|
118
|
+
else {
|
|
119
|
+
setValue(val);
|
|
120
|
+
setFilterValue((_a = selectOptions.find((option) => option.value === val)) === null || _a === void 0 ? void 0 : _a.children);
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
(_b = textInputRef.current) === null || _b === void 0 ? void 0 : _b.focus();
|
|
124
|
+
}, [isMultiSelect, setValue, setFilterValue, selectOptions, value]);
|
|
125
|
+
const onClearButtonClick = () => {
|
|
126
|
+
var _a;
|
|
127
|
+
setFilterValue('');
|
|
128
|
+
resetActiveAndFocusedItem();
|
|
129
|
+
(_a = textInputRef === null || textInputRef === void 0 ? void 0 : textInputRef.current) === null || _a === void 0 ? void 0 : _a.focus();
|
|
130
|
+
};
|
|
131
|
+
const toggle = (toggleRef) => (react_1.default.createElement(react_core_1.MenuToggle, { variant: "typeahead", "aria-label": "Multi typeahead checkbox menu toggle", onClick: onToggleClick, innerRef: toggleRef, isExpanded: isOpen, isFullWidth: true },
|
|
132
|
+
react_1.default.createElement(react_core_1.TextInputGroup, { isPlain: true },
|
|
133
|
+
react_1.default.createElement(react_core_1.TextInputGroupMain, Object.assign({ isExpanded: isOpen, value: filterValue, placeholder: placeholder, onClick: onInputClick, onChange: onTextInputChange, onKeyDown: onInputKeyDown, innerRef: textInputRef, autoComplete: "off", role: "combobox", id: "typeahead-select-input", "aria-controls": "typeahead-select-listbox" }, (activeItemId && { 'aria-activedescendant': activeItemId }))),
|
|
134
|
+
react_1.default.createElement(react_core_1.TextInputGroupUtilities, Object.assign({}, (!filterValue ? { style: { display: 'none' } } : {})),
|
|
135
|
+
react_1.default.createElement(react_core_1.Button, { variant: "plain", onClick: onClearButtonClick, "aria-label": "Clear input value" },
|
|
136
|
+
react_1.default.createElement(times_icon_1.default, { "aria-hidden": true }))))));
|
|
137
|
+
return (react_1.default.createElement(react_core_1.FormGroup, { label: label, isRequired: isRequired },
|
|
138
|
+
react_1.default.createElement(react_core_1.Select, { role: "menu", id: "typeahead-select", isOpen: isOpen, selected: value, onSelect: (_event, selection) => onSelect(selection), onOpenChange: (isOpen) => {
|
|
139
|
+
!isOpen && closeMenu();
|
|
140
|
+
}, toggle: toggle, isScrollable: true },
|
|
141
|
+
react_1.default.createElement(react_core_1.SelectList, { isAriaMultiselectable: true, id: "select-typeahead-listbox" }, isLoading ? (react_1.default.createElement(react_core_1.SelectOption, { key: 'loader' },
|
|
142
|
+
react_1.default.createElement(react_core_1.Bullseye, null,
|
|
143
|
+
react_1.default.createElement(react_core_1.Spinner, { size: "lg" })))) : (selectOptions.map((option, index) => (react_1.default.createElement(react_1.default.Fragment, null,
|
|
144
|
+
option.showDivider && react_1.default.createElement(react_core_1.Divider, { component: "li", key: `divider-${index}` }),
|
|
145
|
+
react_1.default.createElement(react_core_1.SelectOption, Object.assign({ hasCheckbox: isMultiSelect && !option.isAriaDisabled, isSelected: isMultiSelect && Array.isArray(value)
|
|
146
|
+
? value.some((v) => (0, lodash_es_1.isEqual)(v, option.value))
|
|
147
|
+
: value === option.value, key: `option-${index}`, isFocused: focusedItemIndex === index, ref: null }, option)))))))),
|
|
148
|
+
helperText && (react_1.default.createElement(react_core_1.FormHelperText, null,
|
|
149
|
+
react_1.default.createElement(react_core_1.HelperText, null,
|
|
150
|
+
react_1.default.createElement(react_core_1.HelperTextItem, null, helperText))))));
|
|
151
|
+
};
|
|
152
|
+
exports.default = SelectFieldWithSearch;
|
|
153
|
+
//# sourceMappingURL=SelectFieldWithSearch.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SelectFieldWithSearch.js","sourceRoot":"","sources":["../../../../../../lib/common/components/ui/formik/SelectFieldWithSearch.tsx"],"names":[],"mappings":";;;AAAA,0DAA0B;AAC1B,uDAkBgC;AAChC,2GAA0E;AAC1E,mCAAkC;AAClC,yCAAoC;AAGpC,MAAM,UAAU,GAAG,YAAY,CAAC;AAEhC,MAAM,YAAY,GAAG,CAAC,GAAW,EAAE,EAAE,CAAC,0BAA0B,GAAG,CAAC,OAAO,CAAC,GAAG,EAAE,GAAG,CAAC,EAAE,CAAC;AAExF,MAAM,qBAAqB,GAAG,CAAC,EAC7B,IAAI,EACJ,KAAK,EACL,UAAU,EACV,aAAa,EACb,WAAW,EACX,cAAc,EACd,aAAa,GAAG,KAAK,EAC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,yBAAY,kBACX,WAAW,EAAE,aAAa,IAAI,CAAC,MAAM,CAAC,cAAc,EACpD,UAAU,EACR,aAAa,IAAI,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC;wBACnC,CAAC,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,IAAA,mBAAO,EAAC,CAAC,EAAE,MAAM,CAAC,KAAK,CAAC,CAAC;wBAC7C,CAAC,CAAC,KAAK,KAAK,MAAM,CAAC,KAAK,EAE5B,GAAG,EAAE,UAAU,KAAK,EAAE,EACtB,SAAS,EAAE,gBAAgB,KAAK,KAAK,EACrC,GAAG,EAAE,IAAI,IACL,MAAM,EACV,CACD,CACJ,CAAC,CACH,CACU,CACN;QACR,UAAU,IAAI,CACb,8BAAC,2BAAc;YACb,8BAAC,uBAAU;gBACT,8BAAC,2BAAc,QAAE,UAAU,CAAkB,CAClC,CACE,CAClB,CACS,CACb,CAAC;AACJ,CAAC,CAAC;AAEF,kBAAe,qBAAqB,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.AlertFormikError = exports.PencilEditField = exports.AddButton = exports.RemovableField = exports.AdditionalNTPSourcesField = exports.RichInputField = exports.CodeField = exports.NumberInputField = exports.RadioField = exports.PullSecretField = exports.useFormikAutoSave = exports.FormikAutoSave = exports.SwitchField = exports.UploadField = exports.TextAreaSecretField = exports.MultiSelectField = exports.SelectField = exports.TextAreaField = exports.CheckboxField = exports.InputField = void 0;
|
|
3
|
+
exports.SelectFieldWithSearch = exports.AlertFormikError = exports.PencilEditField = exports.AddButton = exports.RemovableField = exports.AdditionalNTPSourcesField = exports.RichInputField = exports.CodeField = exports.NumberInputField = exports.RadioField = exports.PullSecretField = exports.useFormikAutoSave = exports.FormikAutoSave = exports.SwitchField = exports.UploadField = exports.TextAreaSecretField = exports.MultiSelectField = exports.SelectField = exports.TextAreaField = exports.CheckboxField = exports.InputField = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
var InputField_1 = require("./InputField");
|
|
6
6
|
Object.defineProperty(exports, "InputField", { enumerable: true, get: function () { return tslib_1.__importDefault(InputField_1).default; } });
|
|
@@ -41,6 +41,8 @@ var PencilEditField_1 = require("./PencilEditField");
|
|
|
41
41
|
Object.defineProperty(exports, "PencilEditField", { enumerable: true, get: function () { return tslib_1.__importDefault(PencilEditField_1).default; } });
|
|
42
42
|
var AlertFormikError_1 = require("./AlertFormikError");
|
|
43
43
|
Object.defineProperty(exports, "AlertFormikError", { enumerable: true, get: function () { return tslib_1.__importDefault(AlertFormikError_1).default; } });
|
|
44
|
+
var SelectFieldWithSearch_1 = require("./SelectFieldWithSearch");
|
|
45
|
+
Object.defineProperty(exports, "SelectFieldWithSearch", { enumerable: true, get: function () { return tslib_1.__importDefault(SelectFieldWithSearch_1).default; } });
|
|
44
46
|
tslib_1.__exportStar(require("./utils"), exports);
|
|
45
47
|
tslib_1.__exportStar(require("./PullSecretField"), exports);
|
|
46
48
|
tslib_1.__exportStar(require("./validationSchemas"), exports);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../lib/common/components/ui/formik/index.tsx"],"names":[],"mappings":";;;;AAAA,2CAAqD;AAA5C,iIAAA,OAAO,OAAc;AAC9B,iDAA2D;AAAlD,uIAAA,OAAO,OAAiB;AACjC,iDAA2D;AAAlD,uIAAA,OAAO,OAAiB;AACjC,6CAAuD;AAA9C,mIAAA,OAAO,OAAe;AAC/B,uDAAiE;AAAxD,6IAAA,OAAO,OAAoB;AACpC,6DAAuE;AAA9D,mJAAA,OAAO,OAAuB;AACvC,6CAAuD;AAA9C,mIAAA,OAAO,OAAe;AAC/B,6CAAuD;AAA9C,mIAAA,OAAO,OAAe;AAC/B,mDAAgF;AAAvE,yIAAA,OAAO,OAAkB;AAAE,mHAAA,iBAAiB,OAAA;AACrD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HAAA,OAAO,OAAa;AAC7B,qDAA+D;AAAtD,2IAAA,OAAO,OAAmB;AACnC,uDAAiE;AAAxD,6IAAA,OAAO,OAAoB;AACpC,iEAA2E;AAAlE,uJAAA,OAAO,OAAyB;AAEzC,kDAAwB;AACxB,4DAAkC;AAClC,8DAAoC;AACpC,uDAA6B;AAC7B,sDAA4B"}
|
|
@@ -31,7 +31,7 @@ const LOCATION_CHARS_REGEX = /^[a-zA-Z0-9-._]*$/;
|
|
|
31
31
|
const nameValidationSchema = (t, usedClusterNames, baseDnsDomain = '', validateUniqueName, isOcm = false) => {
|
|
32
32
|
const clusterNameValidationMessagesList = (0, constants_2.clusterNameValidationMessages)(t);
|
|
33
33
|
return Yup.string()
|
|
34
|
-
.required('Required')
|
|
34
|
+
.required(t('ai:Required field'))
|
|
35
35
|
.matches(CLUSTER_NAME_VALID_CHARS_REGEX, {
|
|
36
36
|
message: clusterNameValidationMessagesList.INVALID_VALUE,
|
|
37
37
|
excludeEmptyString: true,
|
|
@@ -70,13 +70,9 @@ exports.sshPublicKeyListValidationSchema = Yup.string()
|
|
|
70
70
|
if (!value) {
|
|
71
71
|
return true;
|
|
72
72
|
}
|
|
73
|
-
return
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
// trimSshPublicKey(value)
|
|
77
|
-
// .split('\n')
|
|
78
|
-
// .find((line: string) => !line.match(SSH_PUBLIC_KEY_REGEX)) === undefined
|
|
79
|
-
// );
|
|
73
|
+
return ((0, utils_2.trimSshPublicKey)(value)
|
|
74
|
+
.split('\n')
|
|
75
|
+
.find((line) => !line.match(SSH_PUBLIC_KEY_REGEX)) === undefined);
|
|
80
76
|
})
|
|
81
77
|
.test('ssh-public-keys-unique', 'SSH public keys must be unique.', (value) => {
|
|
82
78
|
if (!value) {
|