@hipay/hipay-material-ui 2.3.1-rc3 → 2.3.1-rc4
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/App.test.js +8 -0
- package/HiAlertModal/HiAlertModal.js +48 -77
- package/HiAlertModal/HiAlertModal.test.js +189 -0
- package/HiAlertModal/index.js +1 -15
- package/HiAppBar/HiAppBar.js +34 -63
- package/HiAppBar/index.js +1 -15
- package/HiBadge/HiBadge.js +10 -29
- package/HiBadge/HiBadge.test.js +49 -0
- package/HiBadge/index.js +1 -15
- package/HiBreadcrumb/HiBreadcrumb.js +27 -43
- package/HiBreadcrumb/HiBreadcrumb.test.js +44 -0
- package/HiBreadcrumb/HiStep.js +35 -57
- package/HiBreadcrumb/HiStep.test.js +47 -0
- package/HiBreadcrumb/HiStepConnector.js +32 -57
- package/HiBreadcrumb/HiStepConnector.test.js +113 -0
- package/HiBreadcrumb/HiStepContent.js +25 -46
- package/HiBreadcrumb/HiStepContent.test.js +32 -0
- package/HiBreadcrumb/HiStepIcon.js +26 -46
- package/HiBreadcrumb/HiStepIcon.test.js +65 -0
- package/HiBreadcrumb/HiStepLabel.js +36 -61
- package/HiBreadcrumb/HiStepLabel.test.js +30 -0
- package/HiBreadcrumb/HiStepper.js +23 -45
- package/HiBreadcrumb/HiStepper.test.js +33 -0
- package/HiBreadcrumb/index.js +1 -15
- package/HiButton/HiButton.js +9 -27
- package/HiButton/index.js +2 -13
- package/HiCell/CellAddress.js +20 -40
- package/HiCell/CellAddress.test.js +75 -0
- package/HiCell/CellDate.js +26 -47
- package/HiCell/CellDate.test.js +173 -0
- package/HiCell/CellIcon.js +28 -49
- package/HiCell/CellIcon.test.js +57 -0
- package/HiCell/CellImage.js +23 -42
- package/HiCell/CellImage.test.js +49 -0
- package/HiCell/CellNumeric.js +25 -46
- package/HiCell/CellNumeric.test.js +46 -0
- package/HiCell/CellPinToAction.js +20 -41
- package/HiCell/CellRate.js +32 -55
- package/HiCell/CellRate.test.js +73 -0
- package/HiCell/CellSentinel.js +22 -42
- package/HiCell/CellSentinel.test.js +48 -0
- package/HiCell/CellSentinelScore.js +23 -44
- package/HiCell/CellText.js +37 -56
- package/HiCell/CellText.test.js +76 -0
- package/HiCell/CellTextStyled.js +8 -21
- package/HiCell/index.js +9 -79
- package/HiCheckbox/HiCheckbox.js +35 -60
- package/HiCheckbox/HiCheckbox.test.js +55 -0
- package/HiCheckbox/index.js +1 -15
- package/HiChip/HiChip.js +24 -44
- package/HiChip/HiChip.test.js +136 -0
- package/HiChip/HiChipSwitch.js +47 -70
- package/HiChip/HiChipSwitch.test.js +99 -0
- package/HiChip/index.js +2 -23
- package/HiColoredLabel/HiColoredLabel.js +28 -52
- package/HiColoredLabel/HiColoredLabel.test.js +96 -0
- package/HiColoredLabel/index.js +1 -15
- package/HiDatePicker/Caption.js +11 -28
- package/HiDatePicker/Caption.test.js +65 -0
- package/HiDatePicker/HiDatePicker.js +100 -115
- package/HiDatePicker/HiDatePicker.test.js +370 -0
- package/HiDatePicker/HiDatePickerMobile.js +32 -54
- package/HiDatePicker/HiDateRangePicker.js +138 -149
- package/HiDatePicker/HiDateRangePicker.test.js +703 -0
- package/HiDatePicker/HiDateRangeSelector.js +71 -103
- package/HiDatePicker/HiDateRangeSelector.test.js +193 -0
- package/HiDatePicker/ListPicker.js +33 -55
- package/HiDatePicker/ListPicker.test.js +53 -0
- package/HiDatePicker/NavBar.js +18 -45
- package/HiDatePicker/NavBar.test.js +39 -0
- package/HiDatePicker/Overlays/CustomOverlayLayout.js +23 -40
- package/HiDatePicker/Overlays/CustomOverlayLayoutWithoutFooter.js +22 -39
- package/HiDatePicker/Overlays/MonthPickerOverlay.js +29 -45
- package/HiDatePicker/Overlays/MonthPickerOverlay.test.js +50 -0
- package/HiDatePicker/Overlays/Overlay.js +18 -35
- package/HiDatePicker/Overlays/Overlay.test.js +20 -0
- package/HiDatePicker/Overlays/TimePickerOverlay.js +47 -73
- package/HiDatePicker/Overlays/TimePickerOverlay.test.js +48 -0
- package/HiDatePicker/Overlays/YearPickerOverlay.js +29 -45
- package/HiDatePicker/Overlays/YearPickerOverlay.test.js +79 -0
- package/HiDatePicker/Overlays/index.js +5 -47
- package/HiDatePicker/Weekday.js +3 -13
- package/HiDatePicker/hiLocaleUtils.js +1 -8
- package/HiDatePicker/hiLocaleUtils.test.js +51 -0
- package/HiDatePicker/index.js +1 -15
- package/HiDatePicker/stylesheet.js +9 -22
- package/HiDotsStepper/HiDot.js +30 -57
- package/HiDotsStepper/HiDot.test.js +55 -0
- package/HiDotsStepper/HiDotsStepper.js +29 -47
- package/HiDotsStepper/HiDotsStepper.test.js +90 -0
- package/HiDotsStepper/index.js +2 -23
- package/HiExpansionPanel/HiExpansionPanel.js +42 -72
- package/HiExpansionPanel/index.js +2 -13
- package/HiForm/HiAddressField.js +30 -47
- package/HiForm/HiAddressField.test.js +79 -0
- package/HiForm/HiEmailField.js +28 -46
- package/HiForm/HiEmailField.test.js +19 -0
- package/HiForm/HiFormControl.js +72 -100
- package/HiForm/HiFormControl.test.js +195 -0
- package/HiForm/HiFormLabel.js +29 -54
- package/HiForm/HiFormLabel.test.js +66 -0
- package/HiForm/HiInput.js +62 -86
- package/HiForm/HiInput.test.js +202 -0
- package/HiForm/HiPasswordField.js +29 -55
- package/HiForm/HiPasswordField.test.js +60 -0
- package/HiForm/HiSearchField.js +27 -44
- package/HiForm/HiSearchField.test.js +193 -0
- package/HiForm/HiSlider.js +42 -64
- package/HiForm/HiSlider.test.js +99 -0
- package/HiForm/HiTextField.js +29 -46
- package/HiForm/HiTextField.test.js +254 -0
- package/HiForm/HiUpload.js +54 -70
- package/HiForm/HiUpload.test.js +241 -0
- package/HiForm/HiUploadField.js +24 -41
- package/HiForm/HiUploadField.test.js +55 -0
- package/HiForm/HiUploadInput.js +56 -77
- package/HiForm/HiUploadInput.test.js +148 -0
- package/HiForm/index.js +11 -95
- package/HiIcon/HiIcon.js +22 -44
- package/HiIcon/index.js +1 -15
- package/HiIconButton/HiIconButton.js +18 -40
- package/HiIconButton/HiIconButton.test.js +69 -0
- package/HiIconButton/index.js +1 -15
- package/HiLoader/HiLoader.js +9 -24
- package/HiLoader/HiLoader.test.js +18 -0
- package/HiLoader/index.js +1 -15
- package/HiMap/HiMap.js +50 -77
- package/HiMap/HiMap.test.js +29 -0
- package/HiMap/HiMapExpand.js +39 -64
- package/HiMap/HiMapExpand.test.js +48 -0
- package/HiMap/index.js +2 -23
- package/HiNotice/HiKPI.js +33 -54
- package/HiNotice/HiKPI.test.js +171 -0
- package/HiNotice/HiKPINotice.js +7 -21
- package/HiNotice/HiKPINotice.test.js +88 -0
- package/HiNotice/index.js +2 -23
- package/HiPaymentMeans/HiPaymentMeans.js +112 -131
- package/HiPaymentMeans/HiPaymentMeans.test.js +162 -0
- package/HiPaymentMeans/index.js +1 -15
- package/HiPdfReader/HiPdfReader.js +51 -76
- package/HiPdfReader/index.js +1 -15
- package/HiPin/HiPin.js +9 -30
- package/HiPin/HiPin.test.js +61 -0
- package/HiPin/index.js +1 -15
- package/HiRadio/HiRadio.js +7 -24
- package/HiRadio/HiRadio.test.js +57 -0
- package/HiRadio/index.js +1 -15
- package/HiSelect/HiDynamicSelect.js +40 -56
- package/HiSelect/HiDynamicSelectField.js +22 -40
- package/HiSelect/HiNestedSelect.js +55 -84
- package/HiSelect/HiNestedSelectContent.js +46 -73
- package/HiSelect/HiNestedSelectField.js +22 -40
- package/HiSelect/HiSelect.js +123 -139
- package/HiSelect/HiSelect.test.js +1092 -0
- package/HiSelect/HiSelectContent.js +73 -95
- package/HiSelect/HiSelectField.js +22 -40
- package/HiSelect/HiSelectInput.js +63 -87
- package/HiSelect/HiSelectInput.test.js +21 -0
- package/HiSelect/HiSelectMobile.js +35 -54
- package/HiSelect/HiSuggestSelect.js +56 -78
- package/HiSelect/HiSuggestSelectField.js +22 -40
- package/HiSelect/index.js +8 -85
- package/HiSelectableList/HiSelectableList.js +49 -77
- package/HiSelectableList/HiSelectableList.test.js +173 -0
- package/HiSelectableList/HiSelectableListHierarchic.js +35 -56
- package/HiSelectableList/HiSelectableListItem.js +66 -98
- package/HiSelectableList/HiSelectableListItem.test.js +97 -0
- package/HiSelectableList/index.js +3 -31
- package/HiSwitch/HiSwitch.js +20 -45
- package/HiSwitch/HiSwitch.test.js +41 -0
- package/HiSwitch/HiSwitchState.js +15 -36
- package/HiSwitch/HiSwitchState.test.js +76 -0
- package/HiSwitch/index.js +2 -23
- package/HiTable/HiCellBuilder.js +44 -72
- package/HiTable/HiTable.js +29 -47
- package/HiTable/HiTable.test.js +29 -0
- package/HiTable/HiTableBody.js +19 -34
- package/HiTable/HiTableHeader.js +30 -53
- package/HiTable/HiTableRow.js +29 -56
- package/HiTable/constants.js +43 -94
- package/HiTable/index.js +1 -15
- package/es/App.test.js +8 -0
- package/es/HiAlertModal/HiAlertModal.js +48 -77
- package/es/HiAlertModal/HiAlertModal.test.js +189 -0
- package/es/HiAlertModal/index.js +1 -15
- package/es/HiAppBar/HiAppBar.js +34 -63
- package/es/HiAppBar/index.js +1 -15
- package/es/HiBadge/HiBadge.js +10 -29
- package/es/HiBadge/HiBadge.test.js +49 -0
- package/es/HiBadge/index.js +1 -15
- package/es/HiBreadcrumb/HiBreadcrumb.js +27 -43
- package/es/HiBreadcrumb/HiBreadcrumb.test.js +44 -0
- package/es/HiBreadcrumb/HiStep.js +35 -57
- package/es/HiBreadcrumb/HiStep.test.js +47 -0
- package/es/HiBreadcrumb/HiStepConnector.js +32 -57
- package/es/HiBreadcrumb/HiStepConnector.test.js +113 -0
- package/es/HiBreadcrumb/HiStepContent.js +25 -46
- package/es/HiBreadcrumb/HiStepContent.test.js +32 -0
- package/es/HiBreadcrumb/HiStepIcon.js +26 -46
- package/es/HiBreadcrumb/HiStepIcon.test.js +65 -0
- package/es/HiBreadcrumb/HiStepLabel.js +36 -61
- package/es/HiBreadcrumb/HiStepLabel.test.js +30 -0
- package/es/HiBreadcrumb/HiStepper.js +23 -45
- package/es/HiBreadcrumb/HiStepper.test.js +33 -0
- package/es/HiBreadcrumb/index.js +1 -15
- package/es/HiButton/HiButton.js +9 -27
- package/es/HiButton/index.js +2 -13
- package/es/HiCell/CellAddress.js +20 -40
- package/es/HiCell/CellAddress.test.js +75 -0
- package/es/HiCell/CellDate.js +26 -47
- package/es/HiCell/CellDate.test.js +173 -0
- package/es/HiCell/CellIcon.js +28 -49
- package/es/HiCell/CellIcon.test.js +57 -0
- package/es/HiCell/CellImage.js +23 -42
- package/es/HiCell/CellImage.test.js +49 -0
- package/es/HiCell/CellNumeric.js +25 -46
- package/es/HiCell/CellNumeric.test.js +46 -0
- package/es/HiCell/CellPinToAction.js +20 -41
- package/es/HiCell/CellRate.js +32 -55
- package/es/HiCell/CellRate.test.js +73 -0
- package/es/HiCell/CellSentinel.js +22 -42
- package/es/HiCell/CellSentinel.test.js +48 -0
- package/es/HiCell/CellSentinelScore.js +23 -44
- package/es/HiCell/CellText.js +37 -56
- package/es/HiCell/CellText.test.js +76 -0
- package/es/HiCell/CellTextStyled.js +8 -21
- package/es/HiCell/index.js +9 -79
- package/es/HiCheckbox/HiCheckbox.js +35 -60
- package/es/HiCheckbox/HiCheckbox.test.js +55 -0
- package/es/HiCheckbox/index.js +1 -15
- package/es/HiChip/HiChip.js +24 -44
- package/es/HiChip/HiChip.test.js +136 -0
- package/es/HiChip/HiChipSwitch.js +47 -70
- package/es/HiChip/HiChipSwitch.test.js +99 -0
- package/es/HiChip/index.js +2 -23
- package/es/HiColoredLabel/HiColoredLabel.js +28 -52
- package/es/HiColoredLabel/HiColoredLabel.test.js +96 -0
- package/es/HiColoredLabel/index.js +1 -15
- package/es/HiDatePicker/Caption.js +11 -28
- package/es/HiDatePicker/Caption.test.js +65 -0
- package/es/HiDatePicker/HiDatePicker.js +100 -115
- package/es/HiDatePicker/HiDatePicker.test.js +370 -0
- package/es/HiDatePicker/HiDatePickerMobile.js +32 -54
- package/es/HiDatePicker/HiDateRangePicker.js +138 -149
- package/es/HiDatePicker/HiDateRangePicker.test.js +703 -0
- package/es/HiDatePicker/HiDateRangeSelector.js +71 -103
- package/es/HiDatePicker/HiDateRangeSelector.test.js +193 -0
- package/es/HiDatePicker/ListPicker.js +33 -55
- package/es/HiDatePicker/ListPicker.test.js +53 -0
- package/es/HiDatePicker/NavBar.js +18 -45
- package/es/HiDatePicker/NavBar.test.js +39 -0
- package/es/HiDatePicker/Overlays/CustomOverlayLayout.js +23 -40
- package/es/HiDatePicker/Overlays/CustomOverlayLayoutWithoutFooter.js +22 -39
- package/es/HiDatePicker/Overlays/MonthPickerOverlay.js +29 -45
- package/es/HiDatePicker/Overlays/MonthPickerOverlay.test.js +50 -0
- package/es/HiDatePicker/Overlays/Overlay.js +18 -35
- package/es/HiDatePicker/Overlays/Overlay.test.js +20 -0
- package/es/HiDatePicker/Overlays/TimePickerOverlay.js +47 -73
- package/es/HiDatePicker/Overlays/TimePickerOverlay.test.js +48 -0
- package/es/HiDatePicker/Overlays/YearPickerOverlay.js +29 -45
- package/es/HiDatePicker/Overlays/YearPickerOverlay.test.js +79 -0
- package/es/HiDatePicker/Overlays/index.js +5 -47
- package/es/HiDatePicker/Weekday.js +3 -13
- package/es/HiDatePicker/hiLocaleUtils.js +1 -8
- package/es/HiDatePicker/hiLocaleUtils.test.js +51 -0
- package/es/HiDatePicker/index.js +1 -15
- package/es/HiDatePicker/stylesheet.js +9 -22
- package/es/HiDotsStepper/HiDot.js +30 -57
- package/es/HiDotsStepper/HiDot.test.js +55 -0
- package/es/HiDotsStepper/HiDotsStepper.js +29 -47
- package/es/HiDotsStepper/HiDotsStepper.test.js +90 -0
- package/es/HiDotsStepper/index.js +2 -23
- package/es/HiExpansionPanel/HiExpansionPanel.js +42 -72
- package/es/HiExpansionPanel/index.js +2 -13
- package/es/HiForm/HiAddressField.js +30 -47
- package/es/HiForm/HiAddressField.test.js +79 -0
- package/es/HiForm/HiEmailField.js +28 -46
- package/es/HiForm/HiEmailField.test.js +19 -0
- package/es/HiForm/HiFormControl.js +72 -100
- package/es/HiForm/HiFormControl.test.js +195 -0
- package/es/HiForm/HiFormLabel.js +29 -54
- package/es/HiForm/HiFormLabel.test.js +66 -0
- package/es/HiForm/HiInput.js +62 -86
- package/es/HiForm/HiInput.test.js +202 -0
- package/es/HiForm/HiPasswordField.js +29 -55
- package/es/HiForm/HiPasswordField.test.js +60 -0
- package/es/HiForm/HiSearchField.js +27 -44
- package/es/HiForm/HiSearchField.test.js +193 -0
- package/es/HiForm/HiSlider.js +42 -64
- package/es/HiForm/HiSlider.test.js +99 -0
- package/es/HiForm/HiTextField.js +29 -46
- package/es/HiForm/HiTextField.test.js +254 -0
- package/es/HiForm/HiUpload.js +54 -70
- package/es/HiForm/HiUpload.test.js +241 -0
- package/es/HiForm/HiUploadField.js +24 -41
- package/es/HiForm/HiUploadField.test.js +55 -0
- package/es/HiForm/HiUploadInput.js +56 -77
- package/es/HiForm/HiUploadInput.test.js +148 -0
- package/es/HiForm/index.js +11 -95
- package/es/HiIcon/HiIcon.js +22 -44
- package/es/HiIcon/index.js +1 -15
- package/es/HiIconButton/HiIconButton.js +18 -40
- package/es/HiIconButton/HiIconButton.test.js +69 -0
- package/es/HiIconButton/index.js +1 -15
- package/es/HiLoader/HiLoader.js +9 -24
- package/es/HiLoader/HiLoader.test.js +18 -0
- package/es/HiLoader/index.js +1 -15
- package/es/HiMap/HiMap.js +50 -77
- package/es/HiMap/HiMap.test.js +29 -0
- package/es/HiMap/HiMapExpand.js +39 -64
- package/es/HiMap/HiMapExpand.test.js +48 -0
- package/es/HiMap/index.js +2 -23
- package/es/HiNotice/HiKPI.js +33 -54
- package/es/HiNotice/HiKPI.test.js +171 -0
- package/es/HiNotice/HiKPINotice.js +7 -21
- package/es/HiNotice/HiKPINotice.test.js +88 -0
- package/es/HiNotice/index.js +2 -23
- package/es/HiPaymentMeans/HiPaymentMeans.js +112 -131
- package/es/HiPaymentMeans/HiPaymentMeans.test.js +162 -0
- package/es/HiPaymentMeans/index.js +1 -15
- package/es/HiPdfReader/HiPdfReader.js +51 -76
- package/es/HiPdfReader/index.js +1 -15
- package/es/HiPin/HiPin.js +9 -30
- package/es/HiPin/HiPin.test.js +61 -0
- package/es/HiPin/index.js +1 -15
- package/es/HiRadio/HiRadio.js +7 -24
- package/es/HiRadio/HiRadio.test.js +57 -0
- package/es/HiRadio/index.js +1 -15
- package/es/HiSelect/HiDynamicSelect.js +40 -56
- package/es/HiSelect/HiDynamicSelectField.js +22 -40
- package/es/HiSelect/HiNestedSelect.js +55 -84
- package/es/HiSelect/HiNestedSelectContent.js +46 -73
- package/es/HiSelect/HiNestedSelectField.js +22 -40
- package/es/HiSelect/HiSelect.js +123 -139
- package/es/HiSelect/HiSelect.test.js +1092 -0
- package/es/HiSelect/HiSelectContent.js +73 -95
- package/es/HiSelect/HiSelectField.js +22 -40
- package/es/HiSelect/HiSelectInput.js +63 -87
- package/es/HiSelect/HiSelectInput.test.js +21 -0
- package/es/HiSelect/HiSelectMobile.js +35 -54
- package/es/HiSelect/HiSuggestSelect.js +56 -78
- package/es/HiSelect/HiSuggestSelectField.js +22 -40
- package/es/HiSelect/index.js +8 -85
- package/es/HiSelectableList/HiSelectableList.js +49 -77
- package/es/HiSelectableList/HiSelectableList.test.js +173 -0
- package/es/HiSelectableList/HiSelectableListHierarchic.js +35 -56
- package/es/HiSelectableList/HiSelectableListItem.js +66 -98
- package/es/HiSelectableList/HiSelectableListItem.test.js +97 -0
- package/es/HiSelectableList/index.js +3 -31
- package/es/HiSwitch/HiSwitch.js +20 -45
- package/es/HiSwitch/HiSwitch.test.js +41 -0
- package/es/HiSwitch/HiSwitchState.js +15 -36
- package/es/HiSwitch/HiSwitchState.test.js +76 -0
- package/es/HiSwitch/index.js +2 -23
- package/es/HiTable/HiCellBuilder.js +44 -72
- package/es/HiTable/HiTable.js +29 -47
- package/es/HiTable/HiTable.test.js +29 -0
- package/es/HiTable/HiTableBody.js +19 -34
- package/es/HiTable/HiTableHeader.js +30 -53
- package/es/HiTable/HiTableRow.js +29 -56
- package/es/HiTable/constants.js +43 -94
- package/es/HiTable/index.js +1 -15
- package/es/hi-svg-icons/HiAccount.js +18 -36
- package/es/hi-svg-icons/HiActivity.js +17 -35
- package/es/hi-svg-icons/HiAll.js +22 -42
- package/es/hi-svg-icons/HiBilling.js +18 -36
- package/es/hi-svg-icons/HiBriefcaseRescue.js +10 -26
- package/es/hi-svg-icons/HiCatalog.js +18 -36
- package/es/hi-svg-icons/HiCustomer.js +18 -36
- package/es/hi-svg-icons/HiDownload.js +11 -25
- package/es/hi-svg-icons/HiFinance.js +18 -36
- package/es/hi-svg-icons/HiPermission.js +17 -35
- package/es/hi-svg-icons/HiRoute.js +18 -36
- package/es/hi-svg-icons/HiSettlement.js +18 -36
- package/es/hi-svg-icons/HiSizeLarge.js +12 -27
- package/es/hi-svg-icons/HiSizeMedium.js +11 -25
- package/es/hi-svg-icons/HiSizeSmall.js +11 -25
- package/es/hi-svg-icons/HiTransaction.js +18 -36
- package/es/hi-svg-icons/HiUser.js +18 -36
- package/es/hi-svg-icons/HiWidget.js +22 -42
- package/es/hi-svg-icons/index.js +18 -151
- package/es/hi-svg-icons/index.text.js +11 -21
- package/es/styleguide/Wrapper.js +19 -36
- package/es/styles/MuiThemeProvider.js +39 -59
- package/es/styles/colorManipulator.js +16 -44
- package/es/styles/colorManipulator.test.js +242 -0
- package/es/styles/createBreakpoints.js +6 -20
- package/es/styles/createBreakpoints.test.js +48 -0
- package/es/styles/createGenerateClassName.js +5 -15
- package/es/styles/createGenerateClassName.test.js +141 -0
- package/es/styles/createMixins.js +8 -19
- package/es/styles/createMixins.test.js +24 -0
- package/es/styles/createMuiTheme.js +34 -53
- package/es/styles/createMuiTheme.test.js +67 -0
- package/es/styles/createPalette.js +30 -50
- package/es/styles/createPalette.test.js +159 -0
- package/es/styles/createStyles.js +1 -8
- package/es/styles/createStyles.test.js +8 -0
- package/es/styles/createTypography.js +18 -30
- package/es/styles/createTypography.test.js +60 -0
- package/es/styles/getStylesCreator.js +11 -24
- package/es/styles/getStylesCreator.test.js +92 -0
- package/es/styles/getThemeProps.js +1 -9
- package/es/styles/getThemeProps.test.js +39 -0
- package/es/styles/index.js +5 -47
- package/es/styles/jssPreset.js +9 -25
- package/es/styles/mergeClasses.js +7 -19
- package/es/styles/shadows.js +1 -8
- package/es/styles/shape.js +1 -8
- package/es/styles/spacing.js +1 -9
- package/es/styles/themeListener.js +5 -18
- package/es/styles/themeListener.test.js +26 -0
- package/es/styles/transitions.js +18 -38
- package/es/styles/transitions.test.js +208 -0
- package/es/styles/zIndex.js +1 -8
- package/es/test-utils/createMount.js +11 -22
- package/es/test-utils/createRender.js +8 -19
- package/es/test-utils/createShallow.js +13 -23
- package/es/test-utils/getClasses.js +2 -11
- package/es/test-utils/index.js +5 -47
- package/es/test-utils/until.js +6 -16
- package/es/test-utils/until.test.js +157 -0
- package/es/test-utils/unwrap.js +1 -8
- package/es/theme/palette.js +2 -10
- package/es/theme/typography.js +2 -10
- package/es/theme.js +2 -11
- package/es/transitions/utils.js +2 -13
- package/es/utils/exactProp.js +5 -18
- package/es/utils/helpers.js +18 -55
- package/es/withMobileDialog/index.js +1 -15
- package/es/withMobileDialog/withMobileDialog.js +7 -22
- package/es/withMobileDialog/withMobileDialog.test.js +67 -0
- package/hi-svg-icons/HiAccount.js +18 -36
- package/hi-svg-icons/HiActivity.js +17 -35
- package/hi-svg-icons/HiAll.js +22 -42
- package/hi-svg-icons/HiBilling.js +18 -36
- package/hi-svg-icons/HiBriefcaseRescue.js +10 -26
- package/hi-svg-icons/HiCatalog.js +18 -36
- package/hi-svg-icons/HiCustomer.js +18 -36
- package/hi-svg-icons/HiDownload.js +11 -25
- package/hi-svg-icons/HiFinance.js +18 -36
- package/hi-svg-icons/HiPermission.js +17 -35
- package/hi-svg-icons/HiRoute.js +18 -36
- package/hi-svg-icons/HiSettlement.js +18 -36
- package/hi-svg-icons/HiSizeLarge.js +12 -27
- package/hi-svg-icons/HiSizeMedium.js +11 -25
- package/hi-svg-icons/HiSizeSmall.js +11 -25
- package/hi-svg-icons/HiTransaction.js +18 -36
- package/hi-svg-icons/HiUser.js +18 -36
- package/hi-svg-icons/HiWidget.js +22 -42
- package/hi-svg-icons/index.js +18 -151
- package/hi-svg-icons/index.text.js +11 -21
- package/package.json +1 -1
- package/styleguide/Wrapper.js +19 -36
- package/styles/MuiThemeProvider.js +39 -59
- package/styles/colorManipulator.js +16 -44
- package/styles/colorManipulator.test.js +242 -0
- package/styles/createBreakpoints.js +6 -20
- package/styles/createBreakpoints.test.js +48 -0
- package/styles/createGenerateClassName.js +5 -15
- package/styles/createGenerateClassName.test.js +141 -0
- package/styles/createMixins.js +8 -19
- package/styles/createMixins.test.js +24 -0
- package/styles/createMuiTheme.js +34 -53
- package/styles/createMuiTheme.test.js +67 -0
- package/styles/createPalette.js +30 -50
- package/styles/createPalette.test.js +159 -0
- package/styles/createStyles.js +1 -8
- package/styles/createStyles.test.js +8 -0
- package/styles/createTypography.js +18 -30
- package/styles/createTypography.test.js +60 -0
- package/styles/getStylesCreator.js +11 -24
- package/styles/getStylesCreator.test.js +92 -0
- package/styles/getThemeProps.js +1 -9
- package/styles/getThemeProps.test.js +39 -0
- package/styles/index.js +5 -47
- package/styles/jssPreset.js +9 -25
- package/styles/mergeClasses.js +7 -19
- package/styles/shadows.js +1 -8
- package/styles/shape.js +1 -8
- package/styles/spacing.js +1 -9
- package/styles/themeListener.js +5 -18
- package/styles/themeListener.test.js +26 -0
- package/styles/transitions.js +18 -38
- package/styles/transitions.test.js +208 -0
- package/styles/zIndex.js +1 -8
- package/test-utils/createMount.js +11 -22
- package/test-utils/createRender.js +8 -19
- package/test-utils/createShallow.js +13 -23
- package/test-utils/getClasses.js +2 -11
- package/test-utils/index.js +5 -47
- package/test-utils/until.js +6 -16
- package/test-utils/until.test.js +157 -0
- package/test-utils/unwrap.js +1 -8
- package/theme/palette.js +2 -10
- package/theme/typography.js +2 -10
- package/theme.js +2 -11
- package/transitions/utils.js +2 -13
- package/utils/exactProp.js +5 -18
- package/utils/helpers.js +18 -55
- package/withMobileDialog/index.js +1 -15
- package/withMobileDialog/withMobileDialog.js +7 -22
- package/withMobileDialog/withMobileDialog.test.js +67 -0
|
@@ -1,40 +1,16 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/objectSpread2"));
|
|
13
|
-
|
|
14
|
-
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/objectWithoutProperties"));
|
|
15
|
-
|
|
16
|
-
var _toConsumableArray2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/toConsumableArray"));
|
|
17
|
-
|
|
18
|
-
var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/classCallCheck"));
|
|
19
|
-
|
|
20
|
-
var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/createClass"));
|
|
21
|
-
|
|
22
|
-
var _possibleConstructorReturn2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/possibleConstructorReturn"));
|
|
23
|
-
|
|
24
|
-
var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/getPrototypeOf"));
|
|
25
|
-
|
|
26
|
-
var _assertThisInitialized2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/assertThisInitialized"));
|
|
27
|
-
|
|
28
|
-
var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/inherits"));
|
|
29
|
-
|
|
30
|
-
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/defineProperty"));
|
|
31
|
-
|
|
32
|
-
var _react = _interopRequireDefault(require("react"));
|
|
33
|
-
|
|
34
|
-
var _HiSelect = _interopRequireDefault(require("./HiSelect"));
|
|
35
|
-
|
|
1
|
+
import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
|
2
|
+
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
|
3
|
+
import _toConsumableArray from "@babel/runtime/helpers/esm/toConsumableArray";
|
|
4
|
+
import _classCallCheck from "@babel/runtime/helpers/esm/classCallCheck";
|
|
5
|
+
import _createClass from "@babel/runtime/helpers/esm/createClass";
|
|
6
|
+
import _possibleConstructorReturn from "@babel/runtime/helpers/esm/possibleConstructorReturn";
|
|
7
|
+
import _getPrototypeOf from "@babel/runtime/helpers/esm/getPrototypeOf";
|
|
8
|
+
import _assertThisInitialized from "@babel/runtime/helpers/esm/assertThisInitialized";
|
|
9
|
+
import _inherits from "@babel/runtime/helpers/esm/inherits";
|
|
10
|
+
import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
|
|
36
11
|
// @inheritedComponent HiSelect
|
|
37
|
-
|
|
12
|
+
import React from 'react';
|
|
13
|
+
import HiSelect from './HiSelect';
|
|
38
14
|
/**
|
|
39
15
|
* HiDynamicSelect hérite du composant HiSelect
|
|
40
16
|
*
|
|
@@ -46,22 +22,26 @@ var _HiSelect = _interopRequireDefault(require("./HiSelect"));
|
|
|
46
22
|
* - auto: (ex infinity scroll) nouvelle demande lorsqu'on atteint le bas de scroll vertical
|
|
47
23
|
* - manual: ajoute un bouton en bas de la liste.
|
|
48
24
|
*/
|
|
25
|
+
|
|
49
26
|
var HiDynamicSelect =
|
|
50
27
|
/*#__PURE__*/
|
|
51
28
|
function (_React$PureComponent) {
|
|
52
|
-
(
|
|
29
|
+
_inherits(HiDynamicSelect, _React$PureComponent);
|
|
53
30
|
|
|
54
31
|
function HiDynamicSelect(props) {
|
|
55
32
|
var _this;
|
|
56
33
|
|
|
57
|
-
(
|
|
58
|
-
|
|
59
|
-
(
|
|
34
|
+
_classCallCheck(this, HiDynamicSelect);
|
|
35
|
+
|
|
36
|
+
_this = _possibleConstructorReturn(this, _getPrototypeOf(HiDynamicSelect).call(this, props));
|
|
37
|
+
|
|
38
|
+
_defineProperty(_assertThisInitialized(_this), "handleScrollReachBottom", function () {
|
|
60
39
|
if (!_this.props.loading && _this.props.nextPage === 'auto' && _this.props.onNextPage) {
|
|
61
40
|
_this.props.onNextPage();
|
|
62
41
|
}
|
|
63
42
|
});
|
|
64
|
-
|
|
43
|
+
|
|
44
|
+
_defineProperty(_assertThisInitialized(_this), "handleSelect", function (event, item) {
|
|
65
45
|
var _this$props = _this.props,
|
|
66
46
|
multiple = _this$props.multiple,
|
|
67
47
|
onChange = _this$props.onChange,
|
|
@@ -80,30 +60,31 @@ function (_React$PureComponent) {
|
|
|
80
60
|
return id !== item.id;
|
|
81
61
|
}), item);
|
|
82
62
|
} else {
|
|
83
|
-
onChange(event, [].concat((
|
|
63
|
+
onChange(event, [].concat(_toConsumableArray(value), [item.id]), item);
|
|
84
64
|
}
|
|
85
65
|
});
|
|
86
|
-
|
|
66
|
+
|
|
67
|
+
_defineProperty(_assertThisInitialized(_this), "buildSelectProps", function (options) {
|
|
87
68
|
var value = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];
|
|
88
69
|
var search = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : '';
|
|
89
70
|
var loading = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : false;
|
|
90
71
|
var _this$props2 = _this.props,
|
|
91
72
|
nextPage = _this$props2.nextPage,
|
|
92
73
|
translations = _this$props2.translations;
|
|
93
|
-
var itemList = [].concat((
|
|
74
|
+
var itemList = [].concat(_toConsumableArray(options.length === 0 && !loading ? [{
|
|
94
75
|
id: '_no_result',
|
|
95
76
|
type: 'text',
|
|
96
77
|
disabled: true,
|
|
97
78
|
centered: true,
|
|
98
79
|
hideCheckbox: true,
|
|
99
80
|
label: translations.no_result_match
|
|
100
|
-
}] : []), (
|
|
81
|
+
}] : []), _toConsumableArray(options), _toConsumableArray(!loading && nextPage === 'manual' ? [{
|
|
101
82
|
id: '_next_page',
|
|
102
83
|
type: 'button',
|
|
103
84
|
centered: true,
|
|
104
85
|
hideCheckbox: true,
|
|
105
86
|
label: translations.next_page
|
|
106
|
-
}] : []), (
|
|
87
|
+
}] : []), _toConsumableArray(loading ? [{
|
|
107
88
|
id: '_loading',
|
|
108
89
|
type: 'loader',
|
|
109
90
|
disabled: true,
|
|
@@ -115,12 +96,13 @@ function (_React$PureComponent) {
|
|
|
115
96
|
itemList: itemList
|
|
116
97
|
};
|
|
117
98
|
});
|
|
118
|
-
|
|
119
|
-
_this.
|
|
99
|
+
|
|
100
|
+
_this.handleScrollReachBottom = _this.handleScrollReachBottom.bind(_assertThisInitialized(_this));
|
|
101
|
+
_this.handleSelect = _this.handleSelect.bind(_assertThisInitialized(_this));
|
|
120
102
|
return _this;
|
|
121
103
|
}
|
|
122
104
|
|
|
123
|
-
(
|
|
105
|
+
_createClass(HiDynamicSelect, [{
|
|
124
106
|
key: "render",
|
|
125
107
|
value: function render() {
|
|
126
108
|
var _this$props3 = this.props,
|
|
@@ -130,10 +112,11 @@ function (_React$PureComponent) {
|
|
|
130
112
|
options = _this$props3.options,
|
|
131
113
|
translations = _this$props3.translations,
|
|
132
114
|
value = _this$props3.value,
|
|
133
|
-
other = (
|
|
134
|
-
|
|
115
|
+
other = _objectWithoutProperties(_this$props3, ["hiSelectableListProps", "multiple", "nextPage", "options", "translations", "value"]);
|
|
116
|
+
|
|
117
|
+
return React.createElement(HiSelect, Object.assign({
|
|
135
118
|
buildSelectProps: this.buildSelectProps,
|
|
136
|
-
hiSelectableListProps: (
|
|
119
|
+
hiSelectableListProps: _objectSpread({}, hiSelectableListProps),
|
|
137
120
|
multiple: multiple,
|
|
138
121
|
options: options,
|
|
139
122
|
searchable: true,
|
|
@@ -144,10 +127,11 @@ function (_React$PureComponent) {
|
|
|
144
127
|
}, other));
|
|
145
128
|
}
|
|
146
129
|
}]);
|
|
130
|
+
|
|
147
131
|
return HiDynamicSelect;
|
|
148
|
-
}(
|
|
132
|
+
}(React.PureComponent);
|
|
149
133
|
|
|
150
|
-
(
|
|
134
|
+
_defineProperty(HiDynamicSelect, "defaultProps", {
|
|
151
135
|
loading: false,
|
|
152
136
|
multiple: false,
|
|
153
137
|
nextPage: 'none',
|
|
@@ -161,5 +145,5 @@ function (_React$PureComponent) {
|
|
|
161
145
|
next_page: 'Load more'
|
|
162
146
|
}
|
|
163
147
|
});
|
|
164
|
-
|
|
165
|
-
|
|
148
|
+
|
|
149
|
+
export default HiDynamicSelect;
|
|
@@ -1,48 +1,29 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
});
|
|
8
|
-
exports.default = void 0;
|
|
9
|
-
|
|
10
|
-
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/extends"));
|
|
11
|
-
|
|
12
|
-
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/objectWithoutProperties"));
|
|
13
|
-
|
|
14
|
-
var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/classCallCheck"));
|
|
15
|
-
|
|
16
|
-
var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/createClass"));
|
|
17
|
-
|
|
18
|
-
var _possibleConstructorReturn2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/possibleConstructorReturn"));
|
|
19
|
-
|
|
20
|
-
var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/getPrototypeOf"));
|
|
21
|
-
|
|
22
|
-
var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/inherits"));
|
|
23
|
-
|
|
24
|
-
var _react = _interopRequireDefault(require("react"));
|
|
25
|
-
|
|
26
|
-
var _HiFormControl = _interopRequireDefault(require("../HiForm/HiFormControl"));
|
|
27
|
-
|
|
28
|
-
var _HiDynamicSelect = _interopRequireDefault(require("./HiDynamicSelect"));
|
|
29
|
-
|
|
1
|
+
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
|
2
|
+
import _classCallCheck from "@babel/runtime/helpers/esm/classCallCheck";
|
|
3
|
+
import _createClass from "@babel/runtime/helpers/esm/createClass";
|
|
4
|
+
import _possibleConstructorReturn from "@babel/runtime/helpers/esm/possibleConstructorReturn";
|
|
5
|
+
import _getPrototypeOf from "@babel/runtime/helpers/esm/getPrototypeOf";
|
|
6
|
+
import _inherits from "@babel/runtime/helpers/esm/inherits";
|
|
30
7
|
// @inheritedComponent HiDynamicSelect
|
|
31
|
-
|
|
8
|
+
import React from 'react';
|
|
9
|
+
import HiFormControl from '../HiForm/HiFormControl';
|
|
10
|
+
import HiDynamicSelect from './HiDynamicSelect';
|
|
32
11
|
/**
|
|
33
12
|
* Champs input pour formulaire
|
|
34
13
|
*/
|
|
14
|
+
|
|
35
15
|
var HiDynamicSelectField =
|
|
36
16
|
/*#__PURE__*/
|
|
37
17
|
function (_React$PureComponent) {
|
|
38
|
-
(
|
|
18
|
+
_inherits(HiDynamicSelectField, _React$PureComponent);
|
|
39
19
|
|
|
40
20
|
function HiDynamicSelectField() {
|
|
41
|
-
(
|
|
42
|
-
|
|
21
|
+
_classCallCheck(this, HiDynamicSelectField);
|
|
22
|
+
|
|
23
|
+
return _possibleConstructorReturn(this, _getPrototypeOf(HiDynamicSelectField).apply(this, arguments));
|
|
43
24
|
}
|
|
44
25
|
|
|
45
|
-
(
|
|
26
|
+
_createClass(HiDynamicSelectField, [{
|
|
46
27
|
key: "render",
|
|
47
28
|
value: function render() {
|
|
48
29
|
var _this$props = this.props,
|
|
@@ -64,8 +45,9 @@ function (_React$PureComponent) {
|
|
|
64
45
|
searchable = _this$props.searchable,
|
|
65
46
|
translations = _this$props.translations,
|
|
66
47
|
className = _this$props.className,
|
|
67
|
-
others = (
|
|
68
|
-
|
|
48
|
+
others = _objectWithoutProperties(_this$props, ["label", "required", "disabled", "error", "errorText", "helperText", "helperIcon", "id", "name", "value", "options", "type", "multiple", "iconAll", "checkbox", "searchable", "translations", "className"]);
|
|
49
|
+
|
|
50
|
+
return React.createElement(HiFormControl, {
|
|
69
51
|
id: id,
|
|
70
52
|
label: label,
|
|
71
53
|
required: required,
|
|
@@ -75,7 +57,7 @@ function (_React$PureComponent) {
|
|
|
75
57
|
helperText: helperText,
|
|
76
58
|
helperIcon: helperIcon,
|
|
77
59
|
className: className
|
|
78
|
-
},
|
|
60
|
+
}, React.createElement(HiDynamicSelect, Object.assign({
|
|
79
61
|
id: id,
|
|
80
62
|
name: name,
|
|
81
63
|
value: value,
|
|
@@ -91,8 +73,8 @@ function (_React$PureComponent) {
|
|
|
91
73
|
}, others)));
|
|
92
74
|
}
|
|
93
75
|
}]);
|
|
76
|
+
|
|
94
77
|
return HiDynamicSelectField;
|
|
95
|
-
}(
|
|
78
|
+
}(React.PureComponent);
|
|
96
79
|
|
|
97
|
-
|
|
98
|
-
exports.default = _default;
|
|
80
|
+
export default HiDynamicSelectField;
|
|
@@ -1,60 +1,34 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/objectWithoutProperties"));
|
|
13
|
-
|
|
14
|
-
var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/classCallCheck"));
|
|
15
|
-
|
|
16
|
-
var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/createClass"));
|
|
17
|
-
|
|
18
|
-
var _possibleConstructorReturn2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/possibleConstructorReturn"));
|
|
19
|
-
|
|
20
|
-
var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/getPrototypeOf"));
|
|
21
|
-
|
|
22
|
-
var _assertThisInitialized2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/assertThisInitialized"));
|
|
23
|
-
|
|
24
|
-
var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/inherits"));
|
|
25
|
-
|
|
26
|
-
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/defineProperty"));
|
|
27
|
-
|
|
28
|
-
var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/objectSpread2"));
|
|
29
|
-
|
|
30
|
-
var _toConsumableArray2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/toConsumableArray"));
|
|
31
|
-
|
|
32
|
-
var _react = _interopRequireDefault(require("react"));
|
|
33
|
-
|
|
34
|
-
var _HiSelect = _interopRequireDefault(require("./HiSelect"));
|
|
35
|
-
|
|
36
|
-
var _HiIcon = _interopRequireDefault(require("../HiIcon"));
|
|
37
|
-
|
|
38
|
-
var _styles = require("@material-ui/core/styles");
|
|
39
|
-
|
|
40
|
-
var _helpers = require("../utils/helpers");
|
|
41
|
-
|
|
1
|
+
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
|
2
|
+
import _classCallCheck from "@babel/runtime/helpers/esm/classCallCheck";
|
|
3
|
+
import _createClass from "@babel/runtime/helpers/esm/createClass";
|
|
4
|
+
import _possibleConstructorReturn from "@babel/runtime/helpers/esm/possibleConstructorReturn";
|
|
5
|
+
import _getPrototypeOf from "@babel/runtime/helpers/esm/getPrototypeOf";
|
|
6
|
+
import _assertThisInitialized from "@babel/runtime/helpers/esm/assertThisInitialized";
|
|
7
|
+
import _inherits from "@babel/runtime/helpers/esm/inherits";
|
|
8
|
+
import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
|
|
9
|
+
import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
|
10
|
+
import _toConsumableArray from "@babel/runtime/helpers/esm/toConsumableArray";
|
|
42
11
|
// @inheritedComponent HiSelect
|
|
43
|
-
|
|
12
|
+
import React from 'react';
|
|
13
|
+
import HiSelect from './HiSelect';
|
|
14
|
+
import HiIcon from '../HiIcon';
|
|
15
|
+
import { withStyles } from '@material-ui/core/styles';
|
|
16
|
+
import { foldAccents } from '../utils/helpers';
|
|
44
17
|
/**
|
|
45
18
|
* Return array of final item id in nested list (via props chlidren)
|
|
46
19
|
* @param itemList
|
|
47
20
|
* @param finalItemIdList
|
|
48
21
|
* @returns {*[]}
|
|
49
22
|
*/
|
|
23
|
+
|
|
50
24
|
function getRecursiveFinalItemIdList(itemList) {
|
|
51
25
|
var finalItemIdList = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];
|
|
52
|
-
return [].concat((
|
|
26
|
+
return [].concat(_toConsumableArray(finalItemIdList), _toConsumableArray(itemList.reduce(function (memo, item) {
|
|
53
27
|
if (item.children) {
|
|
54
28
|
return getRecursiveFinalItemIdList(item.children, memo);
|
|
55
29
|
}
|
|
56
30
|
|
|
57
|
-
return [].concat((
|
|
31
|
+
return [].concat(_toConsumableArray(memo), [item.id]);
|
|
58
32
|
}, [])));
|
|
59
33
|
}
|
|
60
34
|
/**
|
|
@@ -79,8 +53,8 @@ function findFinalItemRecursively(itemList, searchId) {
|
|
|
79
53
|
return foundItem;
|
|
80
54
|
}
|
|
81
55
|
|
|
82
|
-
var filterValue = function filterValue(item, searchValue) {
|
|
83
|
-
return searchValue === '' ||
|
|
56
|
+
export var filterValue = function filterValue(item, searchValue) {
|
|
57
|
+
return searchValue === '' || foldAccents(item.label.toString().toLowerCase()).search(foldAccents(searchValue.toLowerCase())) !== -1;
|
|
84
58
|
};
|
|
85
59
|
/**
|
|
86
60
|
* Build item list by settings item props relative to the nested parent/child situation
|
|
@@ -99,9 +73,6 @@ var filterValue = function filterValue(item, searchValue) {
|
|
|
99
73
|
* @returns {*}
|
|
100
74
|
*/
|
|
101
75
|
|
|
102
|
-
|
|
103
|
-
exports.filterValue = filterValue;
|
|
104
|
-
|
|
105
76
|
function buildFilteredItemList(itemList) {
|
|
106
77
|
var selectedItemIdList = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];
|
|
107
78
|
var searchValue = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : '';
|
|
@@ -130,7 +101,7 @@ function buildFilteredItemList(itemList) {
|
|
|
130
101
|
}
|
|
131
102
|
|
|
132
103
|
return {
|
|
133
|
-
l: [].concat((
|
|
104
|
+
l: [].concat(_toConsumableArray(memoItemList), [_objectSpread({}, item, {}, disabledParent && {
|
|
134
105
|
disabled: true,
|
|
135
106
|
hideCheckbox: true // don't display checkbox on disabled parent
|
|
136
107
|
|
|
@@ -149,7 +120,7 @@ function buildFilteredItemList(itemList) {
|
|
|
149
120
|
|
|
150
121
|
var itemSelected = selectedItemIdList.includes(item.id);
|
|
151
122
|
return {
|
|
152
|
-
l: [].concat((
|
|
123
|
+
l: [].concat(_toConsumableArray(memoItemList), [_objectSpread({
|
|
153
124
|
displayed: itemVisible || visibleParent
|
|
154
125
|
}, item)]),
|
|
155
126
|
s: itemSelected && memoSelected,
|
|
@@ -164,7 +135,7 @@ function buildFilteredItemList(itemList) {
|
|
|
164
135
|
});
|
|
165
136
|
}
|
|
166
137
|
|
|
167
|
-
var styles = function styles(theme) {
|
|
138
|
+
export var styles = function styles(theme) {
|
|
168
139
|
return {
|
|
169
140
|
root: {
|
|
170
141
|
backgroundColor: theme.palette.background2,
|
|
@@ -187,7 +158,7 @@ var styles = function styles(theme) {
|
|
|
187
158
|
margin: '0 4px',
|
|
188
159
|
verticalAlign: 'middle'
|
|
189
160
|
},
|
|
190
|
-
selectIconLabel: (
|
|
161
|
+
selectIconLabel: _objectSpread({
|
|
191
162
|
whiteSpace: 'nowrap',
|
|
192
163
|
overflow: 'hidden',
|
|
193
164
|
textOverflow: 'ellipsis',
|
|
@@ -196,7 +167,7 @@ var styles = function styles(theme) {
|
|
|
196
167
|
display: 'inline-flex',
|
|
197
168
|
width: '100%'
|
|
198
169
|
}),
|
|
199
|
-
selectImgLabel: (
|
|
170
|
+
selectImgLabel: _objectSpread({
|
|
200
171
|
whiteSpace: 'nowrap',
|
|
201
172
|
overflow: 'hidden',
|
|
202
173
|
textOverflow: 'ellipsis',
|
|
@@ -220,20 +191,19 @@ var styles = function styles(theme) {
|
|
|
220
191
|
* - si aucun enfant n'est sélectionné, le parent est affiché "unselected".
|
|
221
192
|
*/
|
|
222
193
|
|
|
223
|
-
|
|
224
|
-
exports.styles = styles;
|
|
225
|
-
|
|
226
194
|
var HiNestedSelect =
|
|
227
195
|
/*#__PURE__*/
|
|
228
196
|
function (_React$PureComponent) {
|
|
229
|
-
(
|
|
197
|
+
_inherits(HiNestedSelect, _React$PureComponent);
|
|
230
198
|
|
|
231
199
|
function HiNestedSelect(props) {
|
|
232
200
|
var _this;
|
|
233
201
|
|
|
234
|
-
(
|
|
235
|
-
|
|
236
|
-
|
|
202
|
+
_classCallCheck(this, HiNestedSelect);
|
|
203
|
+
|
|
204
|
+
_this = _possibleConstructorReturn(this, _getPrototypeOf(HiNestedSelect).call(this, props));
|
|
205
|
+
|
|
206
|
+
_defineProperty(_assertThisInitialized(_this), "handleSelect", function (event, item) {
|
|
237
207
|
var _this$props = _this.props,
|
|
238
208
|
hasAll = _this$props.hasAll,
|
|
239
209
|
multiple = _this$props.multiple,
|
|
@@ -267,9 +237,9 @@ function (_React$PureComponent) {
|
|
|
267
237
|
}), item);
|
|
268
238
|
} else {
|
|
269
239
|
// select parent > add each selectable child without duplicates.
|
|
270
|
-
onChange(event, [].concat((
|
|
240
|
+
onChange(event, [].concat(_toConsumableArray(value.filter(function (vid) {
|
|
271
241
|
return !parentSelectableItemIdList.includes(vid);
|
|
272
|
-
})), (
|
|
242
|
+
})), _toConsumableArray(parentSelectableItemIdList)), item);
|
|
273
243
|
}
|
|
274
244
|
} else if (value.includes(item.id)) {
|
|
275
245
|
// unselect item
|
|
@@ -277,10 +247,11 @@ function (_React$PureComponent) {
|
|
|
277
247
|
return id !== item.id;
|
|
278
248
|
}), item);
|
|
279
249
|
} else {
|
|
280
|
-
onChange(event, [].concat((
|
|
250
|
+
onChange(event, [].concat(_toConsumableArray(value), [item.id]), item);
|
|
281
251
|
}
|
|
282
252
|
});
|
|
283
|
-
|
|
253
|
+
|
|
254
|
+
_defineProperty(_assertThisInitialized(_this), "buildSelectProps", function (options) {
|
|
284
255
|
var value = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];
|
|
285
256
|
var search = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : '';
|
|
286
257
|
var loading = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : false;
|
|
@@ -301,7 +272,7 @@ function (_React$PureComponent) {
|
|
|
301
272
|
allUnselected = _buildFilteredItemLis2.u,
|
|
302
273
|
visible = _buildFilteredItemLis2.v;
|
|
303
274
|
|
|
304
|
-
var itemList = !visible ? (
|
|
275
|
+
var itemList = !visible ? _toConsumableArray(loading ? [{
|
|
305
276
|
id: '_loading',
|
|
306
277
|
type: 'loader',
|
|
307
278
|
disabled: true,
|
|
@@ -315,21 +286,21 @@ function (_React$PureComponent) {
|
|
|
315
286
|
centered: true,
|
|
316
287
|
hideCheckbox: true,
|
|
317
288
|
label: translations.no_result_match
|
|
318
|
-
}]) : [].concat((
|
|
289
|
+
}]) : [].concat(_toConsumableArray(loading ? [{
|
|
319
290
|
id: '_loading',
|
|
320
291
|
type: 'loader',
|
|
321
292
|
disabled: true,
|
|
322
293
|
centered: true,
|
|
323
294
|
hideCheckbox: true,
|
|
324
295
|
label: 'loading'
|
|
325
|
-
}] : []), (
|
|
296
|
+
}] : []), _toConsumableArray(hasAll ? [{
|
|
326
297
|
id: '_all',
|
|
327
298
|
iconAll: iconAll,
|
|
328
299
|
label: translations.all,
|
|
329
300
|
selected: allSelected,
|
|
330
301
|
indeterminate: !allSelected && !allUnselected,
|
|
331
302
|
displayed: search === ''
|
|
332
|
-
}] : []), (
|
|
303
|
+
}] : []), _toConsumableArray(filteredItemList)); // build input value
|
|
333
304
|
|
|
334
305
|
var inputValue = '';
|
|
335
306
|
|
|
@@ -343,16 +314,16 @@ function (_React$PureComponent) {
|
|
|
343
314
|
if (selectedItem === false) {
|
|
344
315
|
inputValue = translations.one_item_selected;
|
|
345
316
|
} else if (selectedItem.type === 'icon') {
|
|
346
|
-
inputValue =
|
|
317
|
+
inputValue = React.createElement("span", {
|
|
347
318
|
className: classes.selectIconLabel
|
|
348
|
-
},
|
|
319
|
+
}, React.createElement(HiIcon, {
|
|
349
320
|
className: classes.labelIcon,
|
|
350
321
|
icon: selectedItem.icon
|
|
351
322
|
}), selectedItem.label);
|
|
352
323
|
} else if (selectedItem.type === 'image') {
|
|
353
|
-
inputValue =
|
|
324
|
+
inputValue = React.createElement("span", {
|
|
354
325
|
className: classes.selectImgLabel
|
|
355
|
-
},
|
|
326
|
+
}, React.createElement("img", {
|
|
356
327
|
className: classes.labelImg,
|
|
357
328
|
src: selectedItem.img,
|
|
358
329
|
alt: selectedItem.label
|
|
@@ -367,7 +338,8 @@ function (_React$PureComponent) {
|
|
|
367
338
|
inputValue: inputValue
|
|
368
339
|
};
|
|
369
340
|
});
|
|
370
|
-
|
|
341
|
+
|
|
342
|
+
_this.handleSelect = _this.handleSelect.bind(_assertThisInitialized(_this));
|
|
371
343
|
return _this;
|
|
372
344
|
}
|
|
373
345
|
/**
|
|
@@ -382,7 +354,7 @@ function (_React$PureComponent) {
|
|
|
382
354
|
*/
|
|
383
355
|
|
|
384
356
|
|
|
385
|
-
(
|
|
357
|
+
_createClass(HiNestedSelect, [{
|
|
386
358
|
key: "render",
|
|
387
359
|
value: function render() {
|
|
388
360
|
var _this$props3 = this.props,
|
|
@@ -393,7 +365,7 @@ function (_React$PureComponent) {
|
|
|
393
365
|
searchable = _this$props3.searchable,
|
|
394
366
|
translations = _this$props3.translations,
|
|
395
367
|
value = _this$props3.value,
|
|
396
|
-
other = (
|
|
368
|
+
other = _objectWithoutProperties(_this$props3, ["hasAll", "hiSelectableListProps", "multiple", "options", "searchable", "translations", "value"]);
|
|
397
369
|
|
|
398
370
|
if (multiple) {
|
|
399
371
|
if (!Array.isArray(value)) {
|
|
@@ -401,10 +373,10 @@ function (_React$PureComponent) {
|
|
|
401
373
|
}
|
|
402
374
|
}
|
|
403
375
|
|
|
404
|
-
return
|
|
376
|
+
return React.createElement(HiSelect, Object.assign({
|
|
405
377
|
buildSelectProps: this.buildSelectProps,
|
|
406
378
|
hasAll: hasAll,
|
|
407
|
-
hiSelectableListProps: (
|
|
379
|
+
hiSelectableListProps: _objectSpread({
|
|
408
380
|
onSelect: this.handleSelect
|
|
409
381
|
}, hiSelectableListProps),
|
|
410
382
|
multiple: multiple,
|
|
@@ -415,10 +387,11 @@ function (_React$PureComponent) {
|
|
|
415
387
|
}, other));
|
|
416
388
|
}
|
|
417
389
|
}]);
|
|
390
|
+
|
|
418
391
|
return HiNestedSelect;
|
|
419
|
-
}(
|
|
392
|
+
}(React.PureComponent);
|
|
420
393
|
|
|
421
|
-
(
|
|
394
|
+
_defineProperty(HiNestedSelect, "defaultProps", {
|
|
422
395
|
disabledParent: false,
|
|
423
396
|
displayAsChip: false,
|
|
424
397
|
hasAll: false,
|
|
@@ -437,9 +410,7 @@ function (_React$PureComponent) {
|
|
|
437
410
|
filterFunc: filterValue
|
|
438
411
|
});
|
|
439
412
|
|
|
440
|
-
|
|
413
|
+
export default withStyles(styles, {
|
|
441
414
|
hiComponent: true,
|
|
442
415
|
name: 'HmuiHiNestedSelect'
|
|
443
|
-
})(HiNestedSelect);
|
|
444
|
-
|
|
445
|
-
exports.default = _default;
|
|
416
|
+
})(HiNestedSelect);
|