iguazio.dashboard-react-controls 2.2.25 → 3.0.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.
- package/dist/components/Backdrop/Backdrop.d.ts +14 -0
- package/dist/components/Backdrop/Backdrop.d.ts.map +1 -0
- package/dist/components/Backdrop/Backdrop.mjs +29 -0
- package/dist/components/Backdrop/Backdrop.mjs.map +1 -0
- package/dist/components/Button/Button.d.ts +28 -0
- package/dist/components/Button/Button.d.ts.map +1 -0
- package/dist/components/Button/Button.mjs +43 -0
- package/dist/components/Button/Button.mjs.map +1 -0
- package/dist/components/Button/Button.stories.d.ts +14 -0
- package/dist/components/Button/Button.stories.d.ts.map +1 -0
- package/dist/components/ConfirmDialog/ConfirmDialog.d.ts +33 -0
- package/dist/components/ConfirmDialog/ConfirmDialog.d.ts.map +1 -0
- package/dist/components/ConfirmDialog/ConfirmDialog.mjs +83 -0
- package/dist/components/ConfirmDialog/ConfirmDialog.mjs.map +1 -0
- package/dist/components/ConfirmDialog/ConfirmDialog.stories.d.ts +8 -0
- package/dist/components/ConfirmDialog/ConfirmDialog.stories.d.ts.map +1 -0
- package/dist/components/FormCheckBox/FormCheckBox.d.ts +21 -0
- package/dist/components/FormCheckBox/FormCheckBox.d.ts.map +1 -0
- package/dist/components/FormCheckBox/FormCheckBox.mjs +54 -0
- package/dist/components/FormCheckBox/FormCheckBox.mjs.map +1 -0
- package/dist/components/FormCheckBox/FormCheckbox.stories.d.ts +7 -0
- package/dist/components/FormCheckBox/FormCheckbox.stories.d.ts.map +1 -0
- package/dist/components/FormChipCell/FormChip/FormChip.d.ts +45 -0
- package/dist/components/FormChipCell/FormChip/FormChip.d.ts.map +1 -0
- package/dist/components/FormChipCell/FormChip/FormChip.mjs +78 -0
- package/dist/components/FormChipCell/FormChip/FormChip.mjs.map +1 -0
- package/dist/components/FormChipCell/FormChipCell.d.ts +44 -0
- package/dist/components/FormChipCell/FormChipCell.d.ts.map +1 -0
- package/dist/components/FormChipCell/FormChipCell.mjs +239 -0
- package/dist/components/FormChipCell/FormChipCell.mjs.map +1 -0
- package/dist/components/FormChipCell/FormChipCellView.d.ts +56 -0
- package/dist/components/FormChipCell/FormChipCellView.d.ts.map +1 -0
- package/dist/components/FormChipCell/FormChipCellView.mjs +169 -0
- package/dist/components/FormChipCell/FormChipCellView.mjs.map +1 -0
- package/dist/components/FormChipCell/HiddenChipsBlock/HiddenChipsBlock.d.ts +22 -0
- package/dist/components/FormChipCell/HiddenChipsBlock/HiddenChipsBlock.d.ts.map +1 -0
- package/dist/components/FormChipCell/HiddenChipsBlock/HiddenChipsBlock.mjs +72 -0
- package/dist/components/FormChipCell/HiddenChipsBlock/HiddenChipsBlock.mjs.map +1 -0
- package/dist/components/FormChipCell/NewChipForm/NewChipForm.d.ts +35 -0
- package/dist/components/FormChipCell/NewChipForm/NewChipForm.d.ts.map +1 -0
- package/dist/components/FormChipCell/NewChipForm/NewChipForm.mjs +270 -0
- package/dist/components/FormChipCell/NewChipForm/NewChipForm.mjs.map +1 -0
- package/dist/components/FormChipCell/NewChipInput/NewChipInput.d.ts +16 -0
- package/dist/components/FormChipCell/NewChipInput/NewChipInput.d.ts.map +1 -0
- package/dist/components/FormChipCell/NewChipInput/NewChipInput.mjs +36 -0
- package/dist/components/FormChipCell/NewChipInput/NewChipInput.mjs.map +1 -0
- package/dist/components/FormChipCell/formChipCell.util.d.ts +6 -0
- package/dist/components/FormChipCell/formChipCell.util.d.ts.map +1 -0
- package/dist/components/FormChipCell/formChipCell.util.mjs +24 -0
- package/dist/components/FormChipCell/formChipCell.util.mjs.map +1 -0
- package/dist/components/FormCombobox/FormCombobox.d.ts +56 -0
- package/dist/components/FormCombobox/FormCombobox.d.ts.map +1 -0
- package/dist/components/FormCombobox/FormCombobox.mjs +278 -0
- package/dist/components/FormCombobox/FormCombobox.mjs.map +1 -0
- package/dist/components/FormCombobox/FormCombobox.stories.d.ts +12 -0
- package/dist/components/FormCombobox/FormCombobox.stories.d.ts.map +1 -0
- package/dist/components/FormInput/FormInput.d.ts +3 -0
- package/dist/components/FormInput/FormInput.d.ts.map +1 -0
- package/dist/components/FormInput/FormInput.mjs +272 -0
- package/dist/components/FormInput/FormInput.mjs.map +1 -0
- package/dist/components/FormInput/FormInput.stories.d.ts +14 -0
- package/dist/components/FormInput/FormInput.stories.d.ts.map +1 -0
- package/dist/components/FormInput/InputNumberButtons/InputNumberButtons.d.ts +20 -0
- package/dist/components/FormInput/InputNumberButtons/InputNumberButtons.d.ts.map +1 -0
- package/dist/components/FormInput/InputNumberButtons/InputNumberButtons.mjs +61 -0
- package/dist/components/FormInput/InputNumberButtons/InputNumberButtons.mjs.map +1 -0
- package/dist/components/FormKeyValueTable/FormKeyValueTable.d.ts +49 -0
- package/dist/components/FormKeyValueTable/FormKeyValueTable.d.ts.map +1 -0
- package/dist/components/FormKeyValueTable/FormKeyValueTable.mjs +202 -0
- package/dist/components/FormKeyValueTable/FormKeyValueTable.mjs.map +1 -0
- package/dist/components/FormOnChange/FormOnChange.d.ts +12 -0
- package/dist/components/FormOnChange/FormOnChange.d.ts.map +1 -0
- package/dist/components/FormOnChange/FormOnChange.mjs +33 -0
- package/dist/components/FormOnChange/FormOnChange.mjs.map +1 -0
- package/dist/components/FormRadio/FormRadio.d.ts +19 -0
- package/dist/components/FormRadio/FormRadio.d.ts.map +1 -0
- package/dist/components/FormRadio/FormRadio.mjs +57 -0
- package/dist/components/FormRadio/FormRadio.mjs.map +1 -0
- package/dist/components/FormRadio/FormRadio.stories.d.ts +7 -0
- package/dist/components/FormRadio/FormRadio.stories.d.ts.map +1 -0
- package/dist/components/FormSelect/FormSelect.d.ts +43 -0
- package/dist/components/FormSelect/FormSelect.d.ts.map +1 -0
- package/dist/components/FormSelect/FormSelect.mjs +257 -0
- package/dist/components/FormSelect/FormSelect.mjs.map +1 -0
- package/dist/components/FormSelect/FormSelect.stories.d.ts +10 -0
- package/dist/components/FormSelect/FormSelect.stories.d.ts.map +1 -0
- package/dist/components/FormTextarea/FormTextarea.d.ts +40 -0
- package/dist/components/FormTextarea/FormTextarea.d.ts.map +1 -0
- package/dist/components/FormTextarea/FormTextarea.mjs +122 -0
- package/dist/components/FormTextarea/FormTextarea.mjs.map +1 -0
- package/dist/components/FormTextarea/FormTextarea.stories.d.ts +9 -0
- package/dist/components/FormTextarea/FormTextarea.stories.d.ts.map +1 -0
- package/dist/components/FormToggle/FormToggle.d.ts +18 -0
- package/dist/components/FormToggle/FormToggle.d.ts.map +1 -0
- package/dist/components/FormToggle/FormToggle.mjs +48 -0
- package/dist/components/FormToggle/FormToggle.mjs.map +1 -0
- package/dist/components/Modal/Modal.d.ts +29 -0
- package/dist/components/Modal/Modal.d.ts.map +1 -0
- package/dist/components/Modal/Modal.mjs +71 -0
- package/dist/components/Modal/Modal.mjs.map +1 -0
- package/dist/components/PopUpDialog/PopUpDialog.d.ts +28 -0
- package/dist/components/PopUpDialog/PopUpDialog.d.ts.map +1 -0
- package/dist/components/PopUpDialog/PopUpDialog.mjs +90 -0
- package/dist/components/PopUpDialog/PopUpDialog.mjs.map +1 -0
- package/dist/components/RoundedIcon/RoundedIcon.d.ts +23 -0
- package/dist/components/RoundedIcon/RoundedIcon.d.ts.map +1 -0
- package/dist/components/RoundedIcon/RoundedIcon.mjs +40 -0
- package/dist/components/RoundedIcon/RoundedIcon.mjs.map +1 -0
- package/dist/components/RoundedIcon/RoundedIcon.stories.d.ts +9 -0
- package/dist/components/RoundedIcon/RoundedIcon.stories.d.ts.map +1 -0
- package/dist/components/Tip/Tip.d.ts +14 -0
- package/dist/components/Tip/Tip.d.ts.map +1 -0
- package/dist/components/Tip/Tip.mjs +67 -0
- package/dist/components/Tip/Tip.mjs.map +1 -0
- package/dist/components/Tip/Tip.stories.d.ts +7 -0
- package/dist/components/Tip/Tip.stories.d.ts.map +1 -0
- package/dist/components/Tooltip/Tooltip.d.ts +22 -0
- package/dist/components/Tooltip/Tooltip.d.ts.map +1 -0
- package/dist/components/Tooltip/Tooltip.mjs +136 -0
- package/dist/components/Tooltip/Tooltip.mjs.map +1 -0
- package/dist/components/Tooltip/Tooltip.stories.d.ts +8 -0
- package/dist/components/Tooltip/Tooltip.stories.d.ts.map +1 -0
- package/dist/components/TooltipTemplate/ProducerTooltipTemplate.d.ts +12 -0
- package/dist/components/TooltipTemplate/ProducerTooltipTemplate.d.ts.map +1 -0
- package/dist/components/TooltipTemplate/TextTooltipTemplate.d.ts +12 -0
- package/dist/components/TooltipTemplate/TextTooltipTemplate.d.ts.map +1 -0
- package/dist/components/TooltipTemplate/TextTooltipTemplate.mjs +21 -0
- package/dist/components/TooltipTemplate/TextTooltipTemplate.mjs.map +1 -0
- package/dist/components/Wizard/Wizard.d.ts +33 -0
- package/dist/components/Wizard/Wizard.d.ts.map +1 -0
- package/dist/components/Wizard/Wizard.mjs +129 -0
- package/dist/components/Wizard/Wizard.mjs.map +1 -0
- package/dist/components/Wizard/WizardSteps/WizardSteps.d.ts +16 -0
- package/dist/components/Wizard/WizardSteps/WizardSteps.d.ts.map +1 -0
- package/dist/components/Wizard/WizardSteps/WizardSteps.mjs +41 -0
- package/dist/components/Wizard/WizardSteps/WizardSteps.mjs.map +1 -0
- package/dist/components/index.d.ts +21 -0
- package/dist/components/index.d.ts.map +1 -0
- package/dist/components/index.mjs +41 -0
- package/dist/components/index.mjs.map +1 -0
- package/dist/constants.d.ts +114 -0
- package/dist/constants.d.ts.map +1 -0
- package/dist/constants.mjs +44 -0
- package/dist/constants.mjs.map +1 -0
- package/dist/elements/FormActionButton/FormActionButton.d.ts +23 -0
- package/dist/elements/FormActionButton/FormActionButton.d.ts.map +1 -0
- package/dist/elements/FormActionButton/FormActionButton.mjs +43 -0
- package/dist/elements/FormActionButton/FormActionButton.mjs.map +1 -0
- package/dist/elements/FormRowActions/FormRowActions.d.ts +27 -0
- package/dist/elements/FormRowActions/FormRowActions.d.ts.map +1 -0
- package/dist/elements/FormRowActions/FormRowActions.mjs +87 -0
- package/dist/elements/FormRowActions/FormRowActions.mjs.map +1 -0
- package/dist/elements/OptionsMenu/OptionsMenu.d.ts +18 -0
- package/dist/elements/OptionsMenu/OptionsMenu.d.ts.map +1 -0
- package/dist/elements/OptionsMenu/OptionsMenu.mjs +47 -0
- package/dist/elements/OptionsMenu/OptionsMenu.mjs.map +1 -0
- package/dist/elements/SelectOption/SelectOption.d.ts +20 -0
- package/dist/elements/SelectOption/SelectOption.d.ts.map +1 -0
- package/dist/elements/SelectOption/SelectOption.mjs +84 -0
- package/dist/elements/SelectOption/SelectOption.mjs.map +1 -0
- package/dist/elements/ValidationTemplate/ValidationTemplate.d.ts +12 -0
- package/dist/elements/ValidationTemplate/ValidationTemplate.d.ts.map +1 -0
- package/dist/elements/ValidationTemplate/ValidationTemplate.mjs +22 -0
- package/dist/elements/ValidationTemplate/ValidationTemplate.mjs.map +1 -0
- package/dist/elements/index.d.ts +7 -0
- package/dist/elements/index.d.ts.map +1 -0
- package/dist/elements/index.mjs +13 -0
- package/dist/elements/index.mjs.map +1 -0
- package/dist/hooks/index.d.ts +6 -0
- package/dist/hooks/index.d.ts.map +1 -0
- package/dist/hooks/index.mjs +13 -0
- package/dist/hooks/index.mjs.map +1 -0
- package/dist/hooks/useChipCell.hook.d.ts +13 -0
- package/dist/hooks/useChipCell.hook.d.ts.map +1 -0
- package/dist/hooks/useChipCell.hook.mjs +58 -0
- package/dist/hooks/useChipCell.hook.mjs.map +1 -0
- package/dist/hooks/useDebounce.hook.d.ts +2 -0
- package/dist/hooks/useDebounce.hook.d.ts.map +1 -0
- package/dist/hooks/useDebounce.hook.mjs +19 -0
- package/dist/hooks/useDebounce.hook.mjs.map +1 -0
- package/dist/hooks/useDetectOutsideClick.hook.d.ts +2 -0
- package/dist/hooks/useDetectOutsideClick.hook.d.ts.map +1 -0
- package/dist/hooks/useDetectOutsideClick.hook.mjs +15 -0
- package/dist/hooks/useDetectOutsideClick.hook.mjs.map +1 -0
- package/dist/hooks/useFormTable.hook.d.ts +16 -0
- package/dist/hooks/useFormTable.hook.d.ts.map +1 -0
- package/dist/hooks/useFormTable.hook.mjs +128 -0
- package/dist/hooks/useFormTable.hook.mjs.map +1 -0
- package/dist/hooks/useHiddenChipsBlock.hook.d.ts +4 -0
- package/dist/hooks/useHiddenChipsBlock.hook.d.ts.map +1 -0
- package/dist/hooks/useHiddenChipsBlock.hook.mjs +51 -0
- package/dist/hooks/useHiddenChipsBlock.hook.mjs.map +1 -0
- package/dist/images/add.svg.mjs +6 -0
- package/dist/images/add.svg.mjs.map +1 -0
- package/dist/images/alerts-icon.svg +3 -0
- package/dist/images/arrow.svg.mjs +6 -0
- package/dist/images/arrow.svg.mjs.map +1 -0
- package/dist/images/back-arrow.svg.mjs +6 -0
- package/dist/images/back-arrow.svg.mjs.map +1 -0
- package/dist/images/checkmark.svg.mjs +6 -0
- package/dist/images/checkmark.svg.mjs.map +1 -0
- package/dist/images/checkmark2.svg.mjs +6 -0
- package/dist/images/checkmark2.svg.mjs.map +1 -0
- package/dist/images/close.svg.mjs +6 -0
- package/dist/images/close.svg.mjs.map +1 -0
- package/dist/images/delete.svg.mjs +6 -0
- package/dist/images/delete.svg.mjs.map +1 -0
- package/dist/images/documents-icon.svg +3 -0
- package/dist/images/dropdown.svg.mjs +6 -0
- package/dist/images/dropdown.svg.mjs.map +1 -0
- package/dist/images/edit.svg.mjs +6 -0
- package/dist/images/edit.svg.mjs.map +1 -0
- package/dist/images/exclamation-mark.svg.mjs +6 -0
- package/dist/images/exclamation-mark.svg.mjs.map +1 -0
- package/dist/images/llm-prompt-icon.svg +3 -0
- package/dist/images/mlrun-api-gateways.svg +8 -0
- package/dist/images/mlrun-artifacts.svg +11 -0
- package/dist/images/mlrun-datasets.svg +5 -0
- package/dist/images/mlrun-feature-store.svg +10 -0
- package/dist/images/mlrun-jobs-and-workflows.svg +5 -0
- package/dist/images/mlrun-ml-functions.svg +8 -0
- package/dist/images/mlrun-models.svg +5 -0
- package/dist/images/mlrun-project-home.svg +5 -0
- package/dist/images/mlrun-project-monitoring.svg +9 -0
- package/dist/images/mlrun-project-settings.svg +5 -0
- package/dist/images/mlrun-realtime-functions.svg +8 -0
- package/dist/images/model-monitoring.svg +3 -0
- package/dist/images/plus.svg.mjs +6 -0
- package/dist/images/plus.svg.mjs.map +1 -0
- package/dist/images/popout.svg.mjs +6 -0
- package/dist/images/popout.svg.mjs.map +1 -0
- package/dist/images/question-mark.svg.mjs +6 -0
- package/dist/images/question-mark.svg.mjs.map +1 -0
- package/dist/images/range-arrow-small.svg.mjs +6 -0
- package/dist/images/range-arrow-small.svg.mjs.map +1 -0
- package/dist/images/search.svg.mjs +6 -0
- package/dist/images/search.svg.mjs.map +1 -0
- package/dist/images/success_done.svg.mjs +6 -0
- package/dist/images/success_done.svg.mjs.map +1 -0
- package/dist/images/warning.svg.mjs +6 -0
- package/dist/images/warning.svg.mjs.map +1 -0
- package/dist/index.css +1 -0
- package/dist/index.d.ts +8 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.mjs +15 -0
- package/dist/index.mjs.map +1 -0
- package/dist/robots.txt +3 -0
- package/dist/scss/borders.scss +22 -22
- package/dist/scss/colors.scss +0 -11
- package/dist/scss/common.scss +48 -33
- package/dist/scss/fonts.scss +6 -0
- package/dist/scss/mixins.scss +117 -106
- package/dist/scss/shadows.scss +12 -12
- package/dist/scss/variables.scss +3 -3
- package/dist/types.d.ts +25 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/types.mjs +143 -0
- package/dist/types.mjs.map +1 -0
- package/dist/utils/common.util.d.ts +10 -0
- package/dist/utils/common.util.d.ts.map +1 -0
- package/dist/utils/common.util.mjs +60 -0
- package/dist/utils/common.util.mjs.map +1 -0
- package/dist/utils/form.util.d.ts +11 -0
- package/dist/utils/form.util.d.ts.map +1 -0
- package/dist/utils/form.util.mjs +26 -0
- package/dist/utils/form.util.mjs.map +1 -0
- package/dist/utils/generateChipsList.util.d.ts +10 -0
- package/dist/utils/generateChipsList.util.d.ts.map +1 -0
- package/dist/utils/generateChipsList.util.mjs +19 -0
- package/dist/utils/generateChipsList.util.mjs.map +1 -0
- package/dist/utils/getFirstScrollableParent.util.d.ts +2 -0
- package/dist/utils/getFirstScrollableParent.util.d.ts.map +1 -0
- package/dist/utils/getFirstScrollableParent.util.mjs +5 -0
- package/dist/utils/getFirstScrollableParent.util.mjs.map +1 -0
- package/dist/utils/index.d.ts +7 -0
- package/dist/utils/index.d.ts.map +1 -0
- package/dist/utils/index.mjs +15 -0
- package/dist/utils/index.mjs.map +1 -0
- package/dist/utils/math.util.d.ts +2 -0
- package/dist/utils/math.util.d.ts.map +1 -0
- package/dist/utils/math.util.mjs +18 -0
- package/dist/utils/math.util.mjs.map +1 -0
- package/dist/utils/validation.util.d.ts +6 -0
- package/dist/utils/validation.util.d.ts.map +1 -0
- package/dist/utils/validation.util.mjs +306 -0
- package/dist/utils/validation.util.mjs.map +1 -0
- package/package.json +48 -38
- package/dist/components/Backdrop/Backdrop.js +0 -56
- package/dist/components/Backdrop/Backdrop.scss +0 -32
- package/dist/components/Button/Button.js +0 -73
- package/dist/components/Button/Button.scss +0 -171
- package/dist/components/ConfirmDialog/ConfirmDialog.js +0 -101
- package/dist/components/ConfirmDialog/confirmDialog.scss +0 -23
- package/dist/components/FormCheckBox/FormCheckBox.js +0 -82
- package/dist/components/FormCheckBox/formCheckBox.scss +0 -91
- package/dist/components/FormChipCell/FormChip/FormChip.js +0 -103
- package/dist/components/FormChipCell/FormChip/formChip.scss +0 -68
- package/dist/components/FormChipCell/FormChipCell.js +0 -339
- package/dist/components/FormChipCell/FormChipCellView.js +0 -190
- package/dist/components/FormChipCell/HiddenChipsBlock/HiddenChipsBlock.js +0 -107
- package/dist/components/FormChipCell/NewChipForm/NewChipForm.js +0 -353
- package/dist/components/FormChipCell/NewChipForm/newChipForm.scss +0 -81
- package/dist/components/FormChipCell/NewChipInput/NewChipInput.js +0 -71
- package/dist/components/FormChipCell/formChipCell.scss +0 -64
- package/dist/components/FormChipCell/formChipCell.util.js +0 -52
- package/dist/components/FormCombobox/FormCombobox.js +0 -432
- package/dist/components/FormCombobox/formCombobox.scss +0 -134
- package/dist/components/FormInput/FormInput.js +0 -408
- package/dist/components/FormInput/InputNumberButtons/InputNumberButtons.js +0 -91
- package/dist/components/FormInput/InputNumberButtons/InputNumberButtons.scss +0 -123
- package/dist/components/FormInput/formInput.scss +0 -76
- package/dist/components/FormKeyValueTable/FormKeyValueTable.js +0 -221
- package/dist/components/FormOnChange/FormOnChange.js +0 -69
- package/dist/components/FormRadio/FormRadio.js +0 -85
- package/dist/components/FormRadio/FormRadio.scss +0 -41
- package/dist/components/FormSelect/FormSelect.js +0 -353
- package/dist/components/FormSelect/FormSelect.test.js +0 -138
- package/dist/components/FormSelect/formSelect.scss +0 -97
- package/dist/components/FormTextarea/FormTextarea.js +0 -184
- package/dist/components/FormTextarea/formTextarea.scss +0 -32
- package/dist/components/FormToggle/FormToggle.js +0 -82
- package/dist/components/FormToggle/formToggle.scss +0 -58
- package/dist/components/Modal/Modal.js +0 -116
- package/dist/components/Modal/Modal.scss +0 -149
- package/dist/components/PopUpDialog/PopUpDialog.js +0 -171
- package/dist/components/PopUpDialog/popUpDialog.scss +0 -83
- package/dist/components/RoundedIcon/RoundedIcon.js +0 -72
- package/dist/components/RoundedIcon/roundedIcon.scss +0 -57
- package/dist/components/Tip/Tip.js +0 -116
- package/dist/components/Tip/Tip.test.js +0 -64
- package/dist/components/Tip/tip.scss +0 -94
- package/dist/components/Tooltip/Tooltip.js +0 -180
- package/dist/components/Tooltip/Tooltip.test.js +0 -155
- package/dist/components/Tooltip/tooltip.scss +0 -29
- package/dist/components/TooltipTemplate/ProducerTooltipTemplate.js +0 -53
- package/dist/components/TooltipTemplate/TextTooltipTemplate.js +0 -53
- package/dist/components/TooltipTemplate/producerTooltipTemplate.scss +0 -23
- package/dist/components/TooltipTemplate/textTooltipTemplate.scss +0 -21
- package/dist/components/Wizard/Wizard.js +0 -192
- package/dist/components/Wizard/Wizard.scss +0 -53
- package/dist/components/Wizard/WizardSteps/WizardSteps.js +0 -74
- package/dist/components/Wizard/WizardSteps/WizardSteps.scss +0 -108
- package/dist/components/index.js +0 -139
- package/dist/constants.js +0 -120
- package/dist/elements/FormActionButton/FormActionButton.js +0 -64
- package/dist/elements/FormRowActions/FormRowActions.js +0 -99
- package/dist/elements/OptionsMenu/OptionsMenu.js +0 -75
- package/dist/elements/OptionsMenu/optionsMenu.scss +0 -45
- package/dist/elements/SelectOption/SelectOption.js +0 -107
- package/dist/elements/SelectOption/SelectOption.test.js +0 -98
- package/dist/elements/SelectOption/selectOption.scss +0 -98
- package/dist/elements/ValidationTemplate/ValidationTemplate.js +0 -56
- package/dist/elements/ValidationTemplate/ValidationTemplate.scss +0 -36
- package/dist/elements/index.js +0 -41
- package/dist/hooks/index.js +0 -40
- package/dist/hooks/useChipCell.hook.js +0 -129
- package/dist/hooks/useDebounce.hook.js +0 -52
- package/dist/hooks/useDetectOutsideClick.hook.js +0 -47
- package/dist/hooks/useFormTable.hook.js +0 -224
- package/dist/hooks/useHiddenChipsBlock.hook.js +0 -102
- package/dist/index.js +0 -18
- package/dist/types.js +0 -127
- package/dist/utils/common.util.js +0 -130
- package/dist/utils/form.util.js +0 -70
- package/dist/utils/generateChipsList.util.js +0 -39
- package/dist/utils/getFirstScrollableParent.util.js +0 -49
- package/dist/utils/math.util.js +0 -44
- package/dist/utils/validation.util.js +0 -401
|
@@ -1,432 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.default = void 0;
|
|
7
|
-
var _react = _interopRequireWildcard(require("react"));
|
|
8
|
-
var _reactFinalForm = require("react-final-form");
|
|
9
|
-
var _lodash = require("lodash");
|
|
10
|
-
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
11
|
-
var _classnames = _interopRequireDefault(require("classnames"));
|
|
12
|
-
var _elements = require("../../elements");
|
|
13
|
-
var _PopUpDialog = _interopRequireDefault(require("../PopUpDialog/PopUpDialog"));
|
|
14
|
-
var _TextTooltipTemplate = _interopRequireDefault(require("../TooltipTemplate/TextTooltipTemplate"));
|
|
15
|
-
var _Tooltip = _interopRequireDefault(require("../Tooltip/Tooltip"));
|
|
16
|
-
var _validation = require("../../utils/validation.util");
|
|
17
|
-
var _hooks = require("../../hooks");
|
|
18
|
-
var _types = require("../../types");
|
|
19
|
-
var _arrow = require("../../images/arrow.svg");
|
|
20
|
-
var _search = require("../../images/search.svg");
|
|
21
|
-
var _warning = require("../../images/warning.svg");
|
|
22
|
-
var _exclamationMark = require("../../images/exclamation-mark.svg");
|
|
23
|
-
require("./formCombobox.scss");
|
|
24
|
-
var _jsxRuntime = require("react/jsx-runtime");
|
|
25
|
-
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
26
|
-
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
|
|
27
|
-
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
28
|
-
/*
|
|
29
|
-
Copyright 2022 Iguazio Systems Ltd.
|
|
30
|
-
Licensed under the Apache License, Version 2.0 (the "License") with
|
|
31
|
-
an addition restriction as set forth herein. You may not use this
|
|
32
|
-
file except in compliance with the License. You may obtain a copy of
|
|
33
|
-
the License at http://www.apache.org/licenses/LICENSE-2.0.
|
|
34
|
-
Unless required by applicable law or agreed to in writing, software
|
|
35
|
-
distributed under the License is distributed on an "AS IS" BASIS,
|
|
36
|
-
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
37
|
-
implied. See the License for the specific language governing
|
|
38
|
-
permissions and limitations under the License.
|
|
39
|
-
In addition, you may not use the software for any purposes that are
|
|
40
|
-
illegal under applicable law, and the grant of the foregoing license
|
|
41
|
-
under the Apache 2.0 license is conditioned upon your compliance with
|
|
42
|
-
such restriction.
|
|
43
|
-
*/
|
|
44
|
-
|
|
45
|
-
const FormCombobox = _ref => {
|
|
46
|
-
let {
|
|
47
|
-
comboboxClassName = '',
|
|
48
|
-
density = 'normal',
|
|
49
|
-
disabled = false,
|
|
50
|
-
hideSearchInput = false,
|
|
51
|
-
inputDefaultValue = '',
|
|
52
|
-
inputPlaceholder = '',
|
|
53
|
-
invalidText,
|
|
54
|
-
label = '',
|
|
55
|
-
maxSuggestedMatches = 1,
|
|
56
|
-
name,
|
|
57
|
-
onBlur = null,
|
|
58
|
-
onChange = null,
|
|
59
|
-
onFocus = null,
|
|
60
|
-
required = false,
|
|
61
|
-
rules = [],
|
|
62
|
-
selectDefaultValue = {
|
|
63
|
-
label: '',
|
|
64
|
-
id: '',
|
|
65
|
-
className: ''
|
|
66
|
-
},
|
|
67
|
-
selectOptions,
|
|
68
|
-
selectPlaceholder = '',
|
|
69
|
-
suggestionList = [],
|
|
70
|
-
validator = null,
|
|
71
|
-
withoutBorder = false
|
|
72
|
-
} = _ref;
|
|
73
|
-
const {
|
|
74
|
-
input,
|
|
75
|
-
meta
|
|
76
|
-
} = (0, _reactFinalForm.useField)(name);
|
|
77
|
-
const [inputValue, setInputValue] = (0, _react.useState)(inputDefaultValue);
|
|
78
|
-
const [selectValue, setSelectValue] = (0, _react.useState)(selectDefaultValue);
|
|
79
|
-
const [dropdownStyle, setDropdownStyle] = (0, _react.useState)({
|
|
80
|
-
left: '0px'
|
|
81
|
-
});
|
|
82
|
-
const [showSelectDropdown, setShowSelectDropdown] = (0, _react.useState)(false);
|
|
83
|
-
const [showSuggestionList, setShowSuggestionList] = (0, _react.useState)(false);
|
|
84
|
-
const [dropdownList, setDropdownList] = (0, _react.useState)(suggestionList);
|
|
85
|
-
const [searchIsFocused, setSearchIsFocused] = (0, _react.useState)(false);
|
|
86
|
-
const [isInvalid, setIsInvalid] = (0, _react.useState)(false);
|
|
87
|
-
const [validationRules, setValidationRules] = (0, _react.useState)(rules);
|
|
88
|
-
const [showValidationRules, setShowValidationRules] = (0, _react.useState)(false);
|
|
89
|
-
const comboboxRef = (0, _react.useRef)();
|
|
90
|
-
const selectRef = (0, _react.useRef)();
|
|
91
|
-
const inputRef = (0, _react.useRef)();
|
|
92
|
-
const suggestionListRef = (0, _react.useRef)();
|
|
93
|
-
(0, _hooks.useDetectOutsideClick)(comboboxRef, () => setShowValidationRules(false));
|
|
94
|
-
const labelClassNames = (0, _classnames.default)('form-field__label', disabled && 'form-field__label-disabled');
|
|
95
|
-
const inputClassNames = (0, _classnames.default)('form-field-combobox__input', selectValue.id.length === 0 && 'form-field-combobox__input_hidden');
|
|
96
|
-
(0, _react.useEffect)(() => {
|
|
97
|
-
setValidationRules(prevState => prevState.map(rule => ({
|
|
98
|
-
...rule,
|
|
99
|
-
isValid: !meta.error || !Array.isArray(meta.error) ? true : !meta.error.some(err => err.name === rule.name)
|
|
100
|
-
})));
|
|
101
|
-
}, [meta.error]);
|
|
102
|
-
(0, _react.useEffect)(() => {
|
|
103
|
-
if (!searchIsFocused) {
|
|
104
|
-
if (JSON.stringify(dropdownList) !== JSON.stringify(suggestionList)) {
|
|
105
|
-
setDropdownList(suggestionList);
|
|
106
|
-
}
|
|
107
|
-
}
|
|
108
|
-
}, [dropdownList, suggestionList, searchIsFocused]);
|
|
109
|
-
(0, _react.useEffect)(() => {
|
|
110
|
-
setIsInvalid(meta.invalid && (meta.validating || meta.modified || meta.submitFailed && meta.touched));
|
|
111
|
-
}, [meta.invalid, meta.modified, meta.submitFailed, meta.touched, meta.validating]);
|
|
112
|
-
const handleOutsideClick = (0, _react.useCallback)(event => {
|
|
113
|
-
if (comboboxRef.current && !comboboxRef.current.contains(event.target) && suggestionListRef.current && !suggestionListRef.current.contains(event.target)) {
|
|
114
|
-
setSearchIsFocused(false);
|
|
115
|
-
setShowSelectDropdown(false);
|
|
116
|
-
setShowSuggestionList(false);
|
|
117
|
-
input.onBlur(new Event('blur'));
|
|
118
|
-
onBlur && onBlur(input.value);
|
|
119
|
-
}
|
|
120
|
-
}, [input, onBlur]);
|
|
121
|
-
const handleScroll = event => {
|
|
122
|
-
if (comboboxRef.current && comboboxRef.current.contains(event.target)) return;
|
|
123
|
-
if (!event.target.closest('.pop-up-dialog') && !event.target.classList.contains('form-field-combobox')) {
|
|
124
|
-
setShowValidationRules(false);
|
|
125
|
-
setShowSelectDropdown(false);
|
|
126
|
-
setShowSuggestionList(false);
|
|
127
|
-
inputRef.current.blur();
|
|
128
|
-
}
|
|
129
|
-
};
|
|
130
|
-
(0, _react.useEffect)(() => {
|
|
131
|
-
window.addEventListener('click', handleOutsideClick);
|
|
132
|
-
return () => {
|
|
133
|
-
window.removeEventListener('click', handleOutsideClick);
|
|
134
|
-
};
|
|
135
|
-
}, [handleOutsideClick]);
|
|
136
|
-
(0, _react.useEffect)(() => {
|
|
137
|
-
if (showValidationRules || showSelectDropdown || showSuggestionList) {
|
|
138
|
-
window.addEventListener('scroll', handleScroll, true);
|
|
139
|
-
}
|
|
140
|
-
return () => {
|
|
141
|
-
window.removeEventListener('scroll', handleScroll, true);
|
|
142
|
-
};
|
|
143
|
-
}, [showSelectDropdown, showSuggestionList, showValidationRules]);
|
|
144
|
-
const getValidationRules = () => {
|
|
145
|
-
return validationRules.map(_ref2 => {
|
|
146
|
-
let {
|
|
147
|
-
isValid = false,
|
|
148
|
-
label,
|
|
149
|
-
name
|
|
150
|
-
} = _ref2;
|
|
151
|
-
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_elements.ValidationTemplate, {
|
|
152
|
-
valid: isValid,
|
|
153
|
-
validationMessage: label
|
|
154
|
-
}, name);
|
|
155
|
-
});
|
|
156
|
-
};
|
|
157
|
-
const handleInputChange = event => {
|
|
158
|
-
const target = event.target;
|
|
159
|
-
setDropdownStyle({
|
|
160
|
-
left: `${target.selectionStart < 30 ? target.selectionStart : 30}ch`
|
|
161
|
-
});
|
|
162
|
-
if (searchIsFocused) {
|
|
163
|
-
setSearchIsFocused(false);
|
|
164
|
-
}
|
|
165
|
-
setInputValue(target.value);
|
|
166
|
-
input.onChange(`${selectValue.id}${target.value}`);
|
|
167
|
-
onChange && onChange(selectValue.id, target.value);
|
|
168
|
-
if (dropdownList.length > 0) {
|
|
169
|
-
setShowSuggestionList(true);
|
|
170
|
-
}
|
|
171
|
-
};
|
|
172
|
-
const handleSelectOptionClick = (selectedOption, option) => {
|
|
173
|
-
if (selectedOption.id !== selectValue.id) {
|
|
174
|
-
setSelectValue(selectedOption);
|
|
175
|
-
input.onChange(selectedOption.id);
|
|
176
|
-
setInputValue('');
|
|
177
|
-
onChange && onChange(selectedOption.id);
|
|
178
|
-
setShowSelectDropdown(false);
|
|
179
|
-
inputRef.current.disabled = false;
|
|
180
|
-
inputRef.current.focus();
|
|
181
|
-
}
|
|
182
|
-
};
|
|
183
|
-
const handleSuggestionListOptionClick = option => {
|
|
184
|
-
const inputValueItems = inputValue.split('/');
|
|
185
|
-
const valueIndex = inputValueItems.length - 1;
|
|
186
|
-
let formattedValue = option.customDelimiter ? inputValueItems[valueIndex].replace(new RegExp(`${option.customDelimiter}.*`), '') + option.id : option.id;
|
|
187
|
-
if (inputValueItems.length <= maxSuggestedMatches - 1) formattedValue += '/';
|
|
188
|
-
inputValueItems[valueIndex] = formattedValue;
|
|
189
|
-
if (searchIsFocused) {
|
|
190
|
-
setSearchIsFocused(false);
|
|
191
|
-
}
|
|
192
|
-
if (inputValueItems.join('/') !== inputValue) {
|
|
193
|
-
setInputValue(inputValueItems.join('/'));
|
|
194
|
-
input.onChange(`${selectValue.id}${inputValueItems.join('/')}`);
|
|
195
|
-
onChange && onChange(selectValue.id, inputValueItems.join('/'));
|
|
196
|
-
}
|
|
197
|
-
setShowSuggestionList(false);
|
|
198
|
-
inputRef.current.focus();
|
|
199
|
-
setDropdownStyle({
|
|
200
|
-
left: `${inputRef.current.selectionStart < 30 ? inputRef.current.selectionStart : 30}ch`
|
|
201
|
-
});
|
|
202
|
-
};
|
|
203
|
-
const inputOnFocus = () => {
|
|
204
|
-
onFocus && onFocus();
|
|
205
|
-
input.onFocus(new Event('focus'));
|
|
206
|
-
if (showSelectDropdown) {
|
|
207
|
-
setShowSelectDropdown(false);
|
|
208
|
-
}
|
|
209
|
-
setShowSuggestionList(true);
|
|
210
|
-
};
|
|
211
|
-
const suggestionListSearchChange = event => {
|
|
212
|
-
event.persist();
|
|
213
|
-
setDropdownList(() => suggestionList.filter(option => {
|
|
214
|
-
return option.id.startsWith(event.target.value);
|
|
215
|
-
}));
|
|
216
|
-
};
|
|
217
|
-
const toggleSelect = (0, _react.useCallback)(() => {
|
|
218
|
-
if (showSelectDropdown) {
|
|
219
|
-
setShowSelectDropdown(false);
|
|
220
|
-
input.onBlur(new Event('blur'));
|
|
221
|
-
onBlur && onBlur(input.value);
|
|
222
|
-
} else {
|
|
223
|
-
setShowSuggestionList(false);
|
|
224
|
-
setShowValidationRules(false);
|
|
225
|
-
setDropdownStyle({
|
|
226
|
-
left: '0px'
|
|
227
|
-
});
|
|
228
|
-
setShowSelectDropdown(true);
|
|
229
|
-
input.onFocus(new Event('focus'));
|
|
230
|
-
onFocus && onFocus(input.value);
|
|
231
|
-
}
|
|
232
|
-
}, [input, onBlur, onFocus, showSelectDropdown]);
|
|
233
|
-
const validateField = function () {
|
|
234
|
-
let value = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
|
|
235
|
-
let allValues = arguments.length > 1 ? arguments[1] : undefined;
|
|
236
|
-
const valueToValidate = value.startsWith(selectValue.id) ? value.substring(selectValue.id.length) : value ?? '';
|
|
237
|
-
let validationError = null;
|
|
238
|
-
if (!(0, _lodash.isEmpty)(validationRules)) {
|
|
239
|
-
const [newRules, isValidField] = (0, _validation.checkPatternsValidity)(rules, valueToValidate);
|
|
240
|
-
const invalidRules = newRules.filter(rule => !rule.isValid);
|
|
241
|
-
if (!isValidField) {
|
|
242
|
-
validationError = invalidRules.map(rule => ({
|
|
243
|
-
name: rule.name,
|
|
244
|
-
label: rule.label
|
|
245
|
-
}));
|
|
246
|
-
}
|
|
247
|
-
}
|
|
248
|
-
if ((0, _lodash.isEmpty)(validationError)) {
|
|
249
|
-
if (valueToValidate.startsWith(' ')) {
|
|
250
|
-
validationError = {
|
|
251
|
-
name: 'empty',
|
|
252
|
-
label: invalidText
|
|
253
|
-
};
|
|
254
|
-
} else if (required && valueToValidate.trim().length === 0) {
|
|
255
|
-
validationError = {
|
|
256
|
-
name: 'required',
|
|
257
|
-
label: 'This field is required'
|
|
258
|
-
};
|
|
259
|
-
}
|
|
260
|
-
}
|
|
261
|
-
if (!validationError && validator) {
|
|
262
|
-
validationError = validator(value, allValues);
|
|
263
|
-
}
|
|
264
|
-
return validationError;
|
|
265
|
-
};
|
|
266
|
-
const warningIconClick = () => {
|
|
267
|
-
setShowValidationRules(state => !state);
|
|
268
|
-
setShowSelectDropdown(false);
|
|
269
|
-
};
|
|
270
|
-
const comboboxClassNames = (0, _classnames.default)(comboboxClassName, 'form-field-combobox', 'form-field', isInvalid && 'form-field-combobox_invalid');
|
|
271
|
-
const iconClassNames = (0, _classnames.default)(showSelectDropdown && 'form-field-combobox__icon_open', 'form-field-combobox__icon');
|
|
272
|
-
const selectValueClassNames = (0, _classnames.default)(selectValue.className);
|
|
273
|
-
const wrapperClassNames = (0, _classnames.default)('form-field__wrapper', `form-field__wrapper-${density}`, disabled && 'form-field__wrapper-disabled', isInvalid && 'form-field__wrapper-invalid', withoutBorder && 'without-border');
|
|
274
|
-
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactFinalForm.Field, {
|
|
275
|
-
name: name,
|
|
276
|
-
validate: validateField,
|
|
277
|
-
children: _ref3 => {
|
|
278
|
-
let {
|
|
279
|
-
input,
|
|
280
|
-
meta
|
|
281
|
-
} = _ref3;
|
|
282
|
-
return /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
283
|
-
className: comboboxClassNames,
|
|
284
|
-
ref: comboboxRef,
|
|
285
|
-
"data-testid": name ? `${name}-form-combobox` : 'form-combobox',
|
|
286
|
-
children: [label && /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
287
|
-
className: labelClassNames,
|
|
288
|
-
children: /*#__PURE__*/(0, _jsxRuntime.jsxs)("label", {
|
|
289
|
-
"data-testid": "label",
|
|
290
|
-
htmlFor: input.name,
|
|
291
|
-
children: [label, (required || validationRules.find(rule => rule.name === 'required')) && /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
|
|
292
|
-
className: "form-field__label-mandatory",
|
|
293
|
-
children: " *"
|
|
294
|
-
})]
|
|
295
|
-
})
|
|
296
|
-
}), /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
297
|
-
className: wrapperClassNames,
|
|
298
|
-
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
299
|
-
className: "form-field__icons",
|
|
300
|
-
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_arrow.ReactComponent, {
|
|
301
|
-
className: iconClassNames,
|
|
302
|
-
onClick: toggleSelect
|
|
303
|
-
})
|
|
304
|
-
}), /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
305
|
-
className: "form-field-combobox__select form-field__control",
|
|
306
|
-
ref: selectRef,
|
|
307
|
-
children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
308
|
-
className: "form-field-combobox__select-header",
|
|
309
|
-
onClick: toggleSelect,
|
|
310
|
-
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
|
|
311
|
-
className: selectValueClassNames,
|
|
312
|
-
children: selectValue.id
|
|
313
|
-
}), selectValue.id.length === 0 && selectPlaceholder && /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
314
|
-
className: "form-field-combobox__placeholder",
|
|
315
|
-
children: /*#__PURE__*/(0, _jsxRuntime.jsx)("label", {
|
|
316
|
-
children: selectPlaceholder
|
|
317
|
-
})
|
|
318
|
-
})]
|
|
319
|
-
}), showSelectDropdown && /*#__PURE__*/(0, _jsxRuntime.jsx)(_PopUpDialog.default, {
|
|
320
|
-
headerIsHidden: true,
|
|
321
|
-
customPosition: {
|
|
322
|
-
element: selectRef,
|
|
323
|
-
position: 'bottom-right'
|
|
324
|
-
},
|
|
325
|
-
className: "form-field-combobox__dropdown form-field-combobox__dropdown-select",
|
|
326
|
-
children: /*#__PURE__*/(0, _jsxRuntime.jsx)("ul", {
|
|
327
|
-
className: "form-field-combobox__dropdown-list",
|
|
328
|
-
children: selectOptions.map(option => {
|
|
329
|
-
if (!option.hidden) {
|
|
330
|
-
const selectOptionClassNames = (0, _classnames.default)('form-field-combobox__dropdown-list-option', option.className);
|
|
331
|
-
return /*#__PURE__*/(0, _jsxRuntime.jsx)("li", {
|
|
332
|
-
className: selectOptionClassNames,
|
|
333
|
-
onClick: () => handleSelectOptionClick(option),
|
|
334
|
-
children: option.label
|
|
335
|
-
}, option.id);
|
|
336
|
-
}
|
|
337
|
-
})
|
|
338
|
-
})
|
|
339
|
-
})]
|
|
340
|
-
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("input", {
|
|
341
|
-
className: inputClassNames,
|
|
342
|
-
"data-testid": name ? `${name}-form-combobox-input` : 'form-combobox-input',
|
|
343
|
-
id: input.name,
|
|
344
|
-
onChange: handleInputChange,
|
|
345
|
-
onFocus: inputOnFocus,
|
|
346
|
-
placeholder: inputPlaceholder,
|
|
347
|
-
ref: inputRef,
|
|
348
|
-
required: required,
|
|
349
|
-
type: "text",
|
|
350
|
-
value: inputValue
|
|
351
|
-
}), showSuggestionList && (dropdownList.length > 0 || searchIsFocused) && /*#__PURE__*/(0, _jsxRuntime.jsx)(_PopUpDialog.default, {
|
|
352
|
-
headerIsHidden: true,
|
|
353
|
-
customPosition: {
|
|
354
|
-
element: selectRef,
|
|
355
|
-
position: 'bottom-right'
|
|
356
|
-
},
|
|
357
|
-
className: "form-field-combobox__dropdown form-field-combobox__dropdown-suggestions",
|
|
358
|
-
style: {
|
|
359
|
-
...dropdownStyle
|
|
360
|
-
},
|
|
361
|
-
children: /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
362
|
-
ref: suggestionListRef,
|
|
363
|
-
children: [!hideSearchInput && /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
364
|
-
className: "form-field-combobox__search-wrapper",
|
|
365
|
-
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("input", {
|
|
366
|
-
"data-testid": name ? `${name}-form-combobox-search` : 'form-combobox-search',
|
|
367
|
-
className: "form-field-combobox__search form-field__control",
|
|
368
|
-
onChange: suggestionListSearchChange,
|
|
369
|
-
onFocus: () => setSearchIsFocused(true),
|
|
370
|
-
placeholder: "Type to search",
|
|
371
|
-
type: "text"
|
|
372
|
-
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_search.ReactComponent, {})]
|
|
373
|
-
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("ul", {
|
|
374
|
-
className: "form-field-combobox__dropdown-list",
|
|
375
|
-
children: searchIsFocused && dropdownList.length === 0 ? /*#__PURE__*/(0, _jsxRuntime.jsx)("li", {
|
|
376
|
-
className: "form-field-combobox__dropdown-list-option",
|
|
377
|
-
children: "No data"
|
|
378
|
-
}, "no data") : dropdownList.map(value => /*#__PURE__*/(0, _jsxRuntime.jsx)("li", {
|
|
379
|
-
className: "form-field-combobox__dropdown-list-option",
|
|
380
|
-
onClick: () => handleSuggestionListOptionClick(value),
|
|
381
|
-
children: value.label
|
|
382
|
-
}, value.id))
|
|
383
|
-
})]
|
|
384
|
-
})
|
|
385
|
-
}), /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
386
|
-
className: "form-field__icons",
|
|
387
|
-
children: [isInvalid && !Array.isArray(meta.error) && /*#__PURE__*/(0, _jsxRuntime.jsx)(_Tooltip.default, {
|
|
388
|
-
className: "form-field__warning",
|
|
389
|
-
template: /*#__PURE__*/(0, _jsxRuntime.jsx)(_TextTooltipTemplate.default, {
|
|
390
|
-
text: meta.error?.label ?? invalidText,
|
|
391
|
-
warning: true
|
|
392
|
-
}),
|
|
393
|
-
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_exclamationMark.ReactComponent, {})
|
|
394
|
-
}), isInvalid && Array.isArray(meta.error) && /*#__PURE__*/(0, _jsxRuntime.jsx)("button", {
|
|
395
|
-
className: "form-field__warning",
|
|
396
|
-
onClick: warningIconClick,
|
|
397
|
-
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_warning.ReactComponent, {})
|
|
398
|
-
})]
|
|
399
|
-
}), !(0, _lodash.isEmpty)(validationRules) && /*#__PURE__*/(0, _jsxRuntime.jsx)(_elements.OptionsMenu, {
|
|
400
|
-
show: showValidationRules,
|
|
401
|
-
ref: comboboxRef,
|
|
402
|
-
children: getValidationRules()
|
|
403
|
-
})]
|
|
404
|
-
})]
|
|
405
|
-
});
|
|
406
|
-
}
|
|
407
|
-
});
|
|
408
|
-
};
|
|
409
|
-
FormCombobox.propTypes = {
|
|
410
|
-
comboboxClassName: _propTypes.default.string,
|
|
411
|
-
density: _propTypes.default.oneOf(['dense', 'normal', 'medium', 'chunky']),
|
|
412
|
-
disabled: _propTypes.default.bool,
|
|
413
|
-
hideSearchInput: _propTypes.default.bool,
|
|
414
|
-
inputDefaultValue: _propTypes.default.string,
|
|
415
|
-
inputPlaceholder: _propTypes.default.string,
|
|
416
|
-
invalidText: _propTypes.default.string,
|
|
417
|
-
label: _propTypes.default.string,
|
|
418
|
-
maxSuggestedMatches: _propTypes.default.number,
|
|
419
|
-
name: _propTypes.default.string.isRequired,
|
|
420
|
-
onBlur: _propTypes.default.func,
|
|
421
|
-
onChange: _propTypes.default.func,
|
|
422
|
-
onFocus: _propTypes.default.func,
|
|
423
|
-
required: _propTypes.default.bool,
|
|
424
|
-
rules: _propTypes.default.array,
|
|
425
|
-
selectDefaultValue: _propTypes.default.shape({}),
|
|
426
|
-
selectOptions: _types.COMBOBOX_SELECT_OPTIONS.isRequired,
|
|
427
|
-
selectPlaceholder: _propTypes.default.string,
|
|
428
|
-
suggestionList: _types.COMBOBOX_SUGGESTION_LIST,
|
|
429
|
-
validator: _propTypes.default.func,
|
|
430
|
-
withoutBorder: _propTypes.default.bool
|
|
431
|
-
};
|
|
432
|
-
var _default = exports.default = FormCombobox;
|
|
@@ -1,134 +0,0 @@
|
|
|
1
|
-
@import '../../scss/colors';
|
|
2
|
-
@import '../../scss/borders';
|
|
3
|
-
@import '../../scss/shadows';
|
|
4
|
-
@import '../../scss/mixins';
|
|
5
|
-
|
|
6
|
-
.form-field.form-field-combobox {
|
|
7
|
-
width: 100%;
|
|
8
|
-
|
|
9
|
-
.form-field {
|
|
10
|
-
@include inputSelectField;
|
|
11
|
-
|
|
12
|
-
&__icons {
|
|
13
|
-
.form-field-combobox__icon {
|
|
14
|
-
cursor: pointer;
|
|
15
|
-
padding: 0;
|
|
16
|
-
transition: transform 200ms linear;
|
|
17
|
-
|
|
18
|
-
&_open {
|
|
19
|
-
transform: rotate(90deg);
|
|
20
|
-
transform-origin: center center;
|
|
21
|
-
}
|
|
22
|
-
}
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
&-combobox {
|
|
26
|
-
&__placeholder {
|
|
27
|
-
color: $topaz;
|
|
28
|
-
font-size: 15px;
|
|
29
|
-
text-align: left;
|
|
30
|
-
text-transform: capitalize;
|
|
31
|
-
background-color: transparent;
|
|
32
|
-
|
|
33
|
-
label {
|
|
34
|
-
cursor: inherit;
|
|
35
|
-
}
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
&__select {
|
|
39
|
-
padding: 0;
|
|
40
|
-
overflow: visible;
|
|
41
|
-
|
|
42
|
-
&-header {
|
|
43
|
-
display: flex;
|
|
44
|
-
flex: 1;
|
|
45
|
-
align-items: center;
|
|
46
|
-
cursor: pointer;
|
|
47
|
-
height: 100%;
|
|
48
|
-
}
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
&__input {
|
|
52
|
-
width: 100%;
|
|
53
|
-
padding: 0 8px 0 0;
|
|
54
|
-
|
|
55
|
-
&_hidden {
|
|
56
|
-
flex: 0;
|
|
57
|
-
}
|
|
58
|
-
}
|
|
59
|
-
}
|
|
60
|
-
}
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
.form-field-combobox {
|
|
64
|
-
&__search {
|
|
65
|
-
width: 100%;
|
|
66
|
-
padding: 12px 0;
|
|
67
|
-
|
|
68
|
-
&-wrapper {
|
|
69
|
-
position: sticky;
|
|
70
|
-
top: 0;
|
|
71
|
-
display: flex;
|
|
72
|
-
align-items: center;
|
|
73
|
-
margin: 0 9px;
|
|
74
|
-
border-bottom: $dividerBorder;
|
|
75
|
-
background-color: $white;
|
|
76
|
-
}
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
&__dropdown {
|
|
80
|
-
&-select {
|
|
81
|
-
max-width: 220px;
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
&-suggestions {
|
|
85
|
-
max-width: 350px;
|
|
86
|
-
}
|
|
87
|
-
|
|
88
|
-
&-list {
|
|
89
|
-
margin: 0;
|
|
90
|
-
padding: 0;
|
|
91
|
-
min-width: 140px;
|
|
92
|
-
list-style-type: none;
|
|
93
|
-
|
|
94
|
-
&-option {
|
|
95
|
-
padding: 8px 15px;
|
|
96
|
-
word-break: break-all;
|
|
97
|
-
cursor: pointer;
|
|
98
|
-
|
|
99
|
-
&:hover {
|
|
100
|
-
background-color: $alabaster;
|
|
101
|
-
}
|
|
102
|
-
}
|
|
103
|
-
}
|
|
104
|
-
|
|
105
|
-
.pop-up-dialog {
|
|
106
|
-
width: 100%;
|
|
107
|
-
max-height: 250px;
|
|
108
|
-
padding: 0;
|
|
109
|
-
}
|
|
110
|
-
}
|
|
111
|
-
|
|
112
|
-
.path-type,
|
|
113
|
-
&__dropdown .path-type {
|
|
114
|
-
&-store {
|
|
115
|
-
color: $amethyst;
|
|
116
|
-
}
|
|
117
|
-
|
|
118
|
-
&-v3io {
|
|
119
|
-
color: $cornflowerBlueTwo;
|
|
120
|
-
}
|
|
121
|
-
|
|
122
|
-
&-az,
|
|
123
|
-
&-gs,
|
|
124
|
-
&-http,
|
|
125
|
-
&-https,
|
|
126
|
-
&-s3 {
|
|
127
|
-
color: $sorbus;
|
|
128
|
-
}
|
|
129
|
-
|
|
130
|
-
&-dbfs {
|
|
131
|
-
color: $chateauGreen;
|
|
132
|
-
}
|
|
133
|
-
}
|
|
134
|
-
}
|