@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,25 +1,10 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
exports.default = exports.styles = void 0;
|
|
9
|
-
|
|
10
|
-
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/defineProperty"));
|
|
11
|
-
|
|
12
|
-
var _react = _interopRequireDefault(require("react"));
|
|
13
|
-
|
|
14
|
-
var _classnames = _interopRequireDefault(require("classnames"));
|
|
15
|
-
|
|
16
|
-
var _HiButton = _interopRequireDefault(require("../HiButton"));
|
|
17
|
-
|
|
18
|
-
var _styles = require("@material-ui/core/styles");
|
|
19
|
-
|
|
20
|
-
var _helpers = require("../utils/helpers");
|
|
21
|
-
|
|
22
|
-
var styles = function styles(theme) {
|
|
1
|
+
import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import classNames from 'classnames';
|
|
4
|
+
import HiButton from '../HiButton';
|
|
5
|
+
import { withStyles } from '@material-ui/core/styles';
|
|
6
|
+
import { capitalize } from '../utils/helpers';
|
|
7
|
+
export var styles = function styles(theme) {
|
|
23
8
|
return {
|
|
24
9
|
root: {
|
|
25
10
|
display: 'inline-flex',
|
|
@@ -105,9 +90,6 @@ var styles = function styles(theme) {
|
|
|
105
90
|
* par défaut ON/OFF associé à true/false.
|
|
106
91
|
*/
|
|
107
92
|
|
|
108
|
-
|
|
109
|
-
exports.styles = styles;
|
|
110
|
-
|
|
111
93
|
function HiSwitchState(props) {
|
|
112
94
|
var _classNames, _classNames2;
|
|
113
95
|
|
|
@@ -122,11 +104,11 @@ function HiSwitchState(props) {
|
|
|
122
104
|
disabled = props.disabled,
|
|
123
105
|
onChange = props.onChange;
|
|
124
106
|
var isHiColor = ['primary', 'secondary', 'positive', 'negative', 'middle', 'neutral'].includes(color);
|
|
125
|
-
var buttonLeftClass = (
|
|
126
|
-
var buttonRightClass = (
|
|
127
|
-
return
|
|
128
|
-
className: (
|
|
129
|
-
},
|
|
107
|
+
var buttonLeftClass = classNames(classes.button, classes.buttonLeft, (_classNames = {}, _defineProperty(_classNames, classes.checked, checked === leftValue), _defineProperty(_classNames, classes.checkedNeutral, !disabled && checked === leftValue && !isHiColor), _defineProperty(_classNames, classes["checked".concat(capitalize(color))], !disabled && checked === leftValue && isHiColor), _defineProperty(_classNames, classes.disabled, disabled), _classNames));
|
|
108
|
+
var buttonRightClass = classNames(classes.button, classes.buttonRight, (_classNames2 = {}, _defineProperty(_classNames2, classes.checked, checked === rightValue), _defineProperty(_classNames2, classes.checkedNeutral, !disabled && checked === rightValue && !isHiColor), _defineProperty(_classNames2, classes["checked".concat(capitalize(color))], !disabled && checked === rightValue && isHiColor), _defineProperty(_classNames2, classes.disabled, disabled), _classNames2));
|
|
109
|
+
return React.createElement("div", {
|
|
110
|
+
className: classNames(classes.root, className)
|
|
111
|
+
}, React.createElement(HiButton, {
|
|
130
112
|
size: "small",
|
|
131
113
|
className: buttonLeftClass,
|
|
132
114
|
value: leftValue,
|
|
@@ -134,7 +116,7 @@ function HiSwitchState(props) {
|
|
|
134
116
|
return onChange(event, leftValue);
|
|
135
117
|
},
|
|
136
118
|
disabled: disabled
|
|
137
|
-
}, leftLabel),
|
|
119
|
+
}, leftLabel), React.createElement(HiButton, {
|
|
138
120
|
size: "small",
|
|
139
121
|
className: buttonRightClass,
|
|
140
122
|
value: rightValue,
|
|
@@ -154,10 +136,7 @@ HiSwitchState.defaultProps = {
|
|
|
154
136
|
rightValue: 'on',
|
|
155
137
|
disabled: false
|
|
156
138
|
};
|
|
157
|
-
|
|
158
|
-
var _default = (0, _styles.withStyles)(styles, {
|
|
139
|
+
export default withStyles(styles, {
|
|
159
140
|
hiComponent: true,
|
|
160
141
|
name: 'HmuiHiSwitchState'
|
|
161
|
-
})(HiSwitchState);
|
|
162
|
-
|
|
163
|
-
exports.default = _default;
|
|
142
|
+
})(HiSwitchState);
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { assert } from 'chai';
|
|
3
|
+
import { spy } from 'sinon';
|
|
4
|
+
import { createShallow, getClasses } from '../test-utils';
|
|
5
|
+
import HiSwitchState from './HiSwitchState';
|
|
6
|
+
describe('<HiSwitchState />', function () {
|
|
7
|
+
var shallow;
|
|
8
|
+
var classes;
|
|
9
|
+
before(function () {
|
|
10
|
+
shallow = createShallow({
|
|
11
|
+
untilSelector: 'div'
|
|
12
|
+
});
|
|
13
|
+
classes = getClasses(React.createElement(HiSwitchState, null));
|
|
14
|
+
});
|
|
15
|
+
describe('default HiSwitch export', function () {
|
|
16
|
+
var wrapper;
|
|
17
|
+
var handler;
|
|
18
|
+
beforeEach(function () {
|
|
19
|
+
handler = spy();
|
|
20
|
+
wrapper = shallow(React.createElement(HiSwitchState, {
|
|
21
|
+
className: "foo",
|
|
22
|
+
checked: "zou",
|
|
23
|
+
onChange: handler,
|
|
24
|
+
leftLabel: "Zin\xE9dine",
|
|
25
|
+
leftValue: "zi",
|
|
26
|
+
rightLabel: "Zidane",
|
|
27
|
+
rightValue: "zou"
|
|
28
|
+
}));
|
|
29
|
+
});
|
|
30
|
+
it('should render a div with the root and user classes', function () {
|
|
31
|
+
assert.strictEqual(wrapper.name(), 'div');
|
|
32
|
+
assert.strictEqual(wrapper.hasClass(classes.root), true);
|
|
33
|
+
assert.strictEqual(wrapper.hasClass('foo'), true);
|
|
34
|
+
});
|
|
35
|
+
it('should render 2 clickable buttons', function () {
|
|
36
|
+
var leftButton = wrapper.childAt(0).dive();
|
|
37
|
+
var rightButton = wrapper.childAt(1).dive();
|
|
38
|
+
assert.strictEqual(leftButton.name(), 'ForwardRef(HiButton)');
|
|
39
|
+
assert.strictEqual(leftButton.props().children, 'Zinédine');
|
|
40
|
+
assert.strictEqual(leftButton.hasClass(classes.checked), false);
|
|
41
|
+
assert.strictEqual(rightButton.name(), 'ForwardRef(HiButton)');
|
|
42
|
+
assert.strictEqual(rightButton.props().children, 'Zidane');
|
|
43
|
+
assert.strictEqual(rightButton.hasClass(classes.checked), true); // Simulate click and update props
|
|
44
|
+
|
|
45
|
+
leftButton.simulate('click');
|
|
46
|
+
assert.strictEqual(handler.calledOnce, true, 'should onChange callback be called once');
|
|
47
|
+
assert.strictEqual(handler.calledWith(undefined, 'zi'), true, 'should onChange callback be called with params');
|
|
48
|
+
rightButton.simulate('click');
|
|
49
|
+
assert.strictEqual(handler.calledTwice, true, 'should onChange callback be called twice');
|
|
50
|
+
assert.strictEqual(handler.calledWith(undefined, 'zou'), true, 'should onChange callback be called with params');
|
|
51
|
+
wrapper.setProps({
|
|
52
|
+
checked: 'zi'
|
|
53
|
+
});
|
|
54
|
+
wrapper.update();
|
|
55
|
+
leftButton = wrapper.childAt(0).dive();
|
|
56
|
+
rightButton = wrapper.childAt(1).dive();
|
|
57
|
+
assert.strictEqual(leftButton.hasClass(classes.checked), true);
|
|
58
|
+
assert.strictEqual(rightButton.hasClass(classes.checked), false);
|
|
59
|
+
});
|
|
60
|
+
});
|
|
61
|
+
it('should render disabled buttons', function () {
|
|
62
|
+
var wrapper = shallow(React.createElement(HiSwitchState, {
|
|
63
|
+
className: "foo",
|
|
64
|
+
checked: "zi",
|
|
65
|
+
leftLabel: "Zin\xE9dine",
|
|
66
|
+
leftValue: "zi",
|
|
67
|
+
rightLabel: "Zidane",
|
|
68
|
+
rightValue: "zou",
|
|
69
|
+
disabled: true
|
|
70
|
+
}));
|
|
71
|
+
var leftButton = wrapper.childAt(0).dive();
|
|
72
|
+
var rightButton = wrapper.childAt(1).dive();
|
|
73
|
+
assert.strictEqual(leftButton.hasClass(classes.disabled), true);
|
|
74
|
+
assert.strictEqual(rightButton.hasClass(classes.disabled), true);
|
|
75
|
+
});
|
|
76
|
+
});
|
package/es/HiSwitch/index.js
CHANGED
|
@@ -1,23 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
-
|
|
5
|
-
Object.defineProperty(exports, "__esModule", {
|
|
6
|
-
value: true
|
|
7
|
-
});
|
|
8
|
-
Object.defineProperty(exports, "default", {
|
|
9
|
-
enumerable: true,
|
|
10
|
-
get: function get() {
|
|
11
|
-
return _HiSwitch.default;
|
|
12
|
-
}
|
|
13
|
-
});
|
|
14
|
-
Object.defineProperty(exports, "HiSwitchState", {
|
|
15
|
-
enumerable: true,
|
|
16
|
-
get: function get() {
|
|
17
|
-
return _HiSwitchState.default;
|
|
18
|
-
}
|
|
19
|
-
});
|
|
20
|
-
|
|
21
|
-
var _HiSwitch = _interopRequireDefault(require("./HiSwitch"));
|
|
22
|
-
|
|
23
|
-
var _HiSwitchState = _interopRequireDefault(require("./HiSwitchState"));
|
|
1
|
+
export { default } from './HiSwitch';
|
|
2
|
+
export { default as HiSwitchState } from './HiSwitchState';
|
|
@@ -1,73 +1,44 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
value: true
|
|
9
|
-
});
|
|
10
|
-
exports.default = void 0;
|
|
11
|
-
|
|
12
|
-
var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/classCallCheck"));
|
|
13
|
-
|
|
14
|
-
var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/createClass"));
|
|
15
|
-
|
|
16
|
-
var _possibleConstructorReturn2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/possibleConstructorReturn"));
|
|
17
|
-
|
|
18
|
-
var _getPrototypeOf3 = _interopRequireDefault(require("@babel/runtime/helpers/esm/getPrototypeOf"));
|
|
19
|
-
|
|
20
|
-
var _assertThisInitialized2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/assertThisInitialized"));
|
|
21
|
-
|
|
22
|
-
var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/inherits"));
|
|
23
|
-
|
|
24
|
-
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/defineProperty"));
|
|
25
|
-
|
|
26
|
-
var _react = _interopRequireDefault(require("react"));
|
|
27
|
-
|
|
28
|
-
var _TableCell = _interopRequireDefault(require("@material-ui/core/TableCell"));
|
|
29
|
-
|
|
30
|
-
var _CellAddress = _interopRequireDefault(require("../HiCell/CellAddress"));
|
|
31
|
-
|
|
32
|
-
var _CellDate = _interopRequireDefault(require("../HiCell/CellDate"));
|
|
33
|
-
|
|
34
|
-
var _CellIcon = _interopRequireDefault(require("../HiCell/CellIcon"));
|
|
35
|
-
|
|
36
|
-
var _CellImage = _interopRequireDefault(require("../HiCell/CellImage"));
|
|
37
|
-
|
|
38
|
-
var _CellNumeric = _interopRequireDefault(require("../HiCell/CellNumeric"));
|
|
39
|
-
|
|
40
|
-
var _CellSentinel = _interopRequireDefault(require("../HiCell/CellSentinel"));
|
|
41
|
-
|
|
42
|
-
var _CellSentinelScore = _interopRequireDefault(require("../HiCell/CellSentinelScore"));
|
|
43
|
-
|
|
44
|
-
var _CellTextStyled = _interopRequireDefault(require("../HiCell/CellTextStyled"));
|
|
45
|
-
|
|
46
|
-
var _CellRate = _interopRequireDefault(require("../HiCell/CellRate"));
|
|
47
|
-
|
|
48
|
-
var _CellPinToAction = _interopRequireDefault(require("../HiCell/CellPinToAction"));
|
|
49
|
-
|
|
50
|
-
var cst = _interopRequireWildcard(require("./constants"));
|
|
51
|
-
|
|
1
|
+
import _classCallCheck from "@babel/runtime/helpers/esm/classCallCheck";
|
|
2
|
+
import _createClass from "@babel/runtime/helpers/esm/createClass";
|
|
3
|
+
import _possibleConstructorReturn from "@babel/runtime/helpers/esm/possibleConstructorReturn";
|
|
4
|
+
import _getPrototypeOf from "@babel/runtime/helpers/esm/getPrototypeOf";
|
|
5
|
+
import _assertThisInitialized from "@babel/runtime/helpers/esm/assertThisInitialized";
|
|
6
|
+
import _inherits from "@babel/runtime/helpers/esm/inherits";
|
|
7
|
+
import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
|
|
52
8
|
// @inheritedComponent CellBuilder
|
|
9
|
+
import React from 'react';
|
|
10
|
+
import TableCell from '@material-ui/core/TableCell';
|
|
11
|
+
import CellAddress from '../HiCell/CellAddress';
|
|
12
|
+
import CellDate from '../HiCell/CellDate';
|
|
13
|
+
import CellIcon from '../HiCell/CellIcon';
|
|
14
|
+
import CellImage from '../HiCell/CellImage';
|
|
15
|
+
import CellNumeric from '../HiCell/CellNumeric';
|
|
16
|
+
import CellSentinel from '../HiCell/CellSentinel';
|
|
17
|
+
import CellSentinelScore from '../HiCell/CellSentinelScore';
|
|
18
|
+
import CellTextStyled from '../HiCell/CellTextStyled';
|
|
19
|
+
import CellRate from '../HiCell/CellRate';
|
|
20
|
+
import CellPinToAction from '../HiCell/CellPinToAction';
|
|
21
|
+
import * as cst from './constants';
|
|
22
|
+
|
|
53
23
|
var HiCellBuilder =
|
|
54
24
|
/*#__PURE__*/
|
|
55
25
|
function (_React$PureComponent) {
|
|
56
|
-
(
|
|
26
|
+
_inherits(HiCellBuilder, _React$PureComponent);
|
|
57
27
|
|
|
58
28
|
function HiCellBuilder() {
|
|
59
29
|
var _getPrototypeOf2;
|
|
60
30
|
|
|
61
31
|
var _this;
|
|
62
32
|
|
|
63
|
-
(
|
|
33
|
+
_classCallCheck(this, HiCellBuilder);
|
|
64
34
|
|
|
65
35
|
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
66
36
|
args[_key] = arguments[_key];
|
|
67
37
|
}
|
|
68
38
|
|
|
69
|
-
_this = (
|
|
70
|
-
|
|
39
|
+
_this = _possibleConstructorReturn(this, (_getPrototypeOf2 = _getPrototypeOf(HiCellBuilder)).call.apply(_getPrototypeOf2, [this].concat(args)));
|
|
40
|
+
|
|
41
|
+
_defineProperty(_assertThisInitialized(_this), "createCell", function (cell, rowdata, locale) {
|
|
71
42
|
if (rowdata.datas[cell.colId]) {
|
|
72
43
|
var datacell = rowdata.datas[cell.colId];
|
|
73
44
|
|
|
@@ -88,7 +59,7 @@ function (_React$PureComponent) {
|
|
|
88
59
|
if (datacell) {
|
|
89
60
|
switch (cell.type) {
|
|
90
61
|
case cst.TYPE_NUMERIC:
|
|
91
|
-
return
|
|
62
|
+
return React.createElement(CellNumeric, {
|
|
92
63
|
value: datacell.value,
|
|
93
64
|
view: cell.view ? cell.view : cst.DEFAULT_VIEWS[cell.type],
|
|
94
65
|
precision: cell.precision,
|
|
@@ -97,7 +68,7 @@ function (_React$PureComponent) {
|
|
|
97
68
|
});
|
|
98
69
|
|
|
99
70
|
case cst.TYPE_COUNTRY:
|
|
100
|
-
return
|
|
71
|
+
return React.createElement(CellImage, {
|
|
101
72
|
label: datacell.label,
|
|
102
73
|
shortLabel: datacell.id,
|
|
103
74
|
path: datacell.img,
|
|
@@ -106,7 +77,7 @@ function (_React$PureComponent) {
|
|
|
106
77
|
});
|
|
107
78
|
|
|
108
79
|
case cst.TYPE_IMAGE:
|
|
109
|
-
return
|
|
80
|
+
return React.createElement(CellImage, {
|
|
110
81
|
label: datacell.label,
|
|
111
82
|
shortLabel: datacell.id,
|
|
112
83
|
path: datacell.img,
|
|
@@ -117,7 +88,7 @@ function (_React$PureComponent) {
|
|
|
117
88
|
});
|
|
118
89
|
|
|
119
90
|
case cst.TYPE_RATE:
|
|
120
|
-
return
|
|
91
|
+
return React.createElement(CellRate, {
|
|
121
92
|
indicator: datacell.indicator,
|
|
122
93
|
isPositive: datacell.isPositive,
|
|
123
94
|
locale: datacell.locale || cell.locale || locale,
|
|
@@ -127,7 +98,7 @@ function (_React$PureComponent) {
|
|
|
127
98
|
});
|
|
128
99
|
|
|
129
100
|
case cst.TYPE_ADDRESS:
|
|
130
|
-
return
|
|
101
|
+
return React.createElement(CellAddress, {
|
|
131
102
|
city: datacell.city,
|
|
132
103
|
country: datacell.country,
|
|
133
104
|
isoCountry: datacell.isoCountry,
|
|
@@ -138,7 +109,7 @@ function (_React$PureComponent) {
|
|
|
138
109
|
});
|
|
139
110
|
|
|
140
111
|
case cst.TYPE_DATE:
|
|
141
|
-
return
|
|
112
|
+
return React.createElement(CellDate, {
|
|
142
113
|
date: datacell.date,
|
|
143
114
|
displayTime: datacell.displayTime,
|
|
144
115
|
formatShort: datacell.formatShort,
|
|
@@ -147,7 +118,7 @@ function (_React$PureComponent) {
|
|
|
147
118
|
});
|
|
148
119
|
|
|
149
120
|
case cst.TYPE_ICON:
|
|
150
|
-
return
|
|
121
|
+
return React.createElement(CellIcon, {
|
|
151
122
|
align: cell.align,
|
|
152
123
|
color: datacell.color,
|
|
153
124
|
icon: datacell.icon,
|
|
@@ -158,7 +129,7 @@ function (_React$PureComponent) {
|
|
|
158
129
|
});
|
|
159
130
|
|
|
160
131
|
case cst.TYPE_THIRD_PARTY_SECURITY:
|
|
161
|
-
return
|
|
132
|
+
return React.createElement(CellIcon, {
|
|
162
133
|
color: datacell.color,
|
|
163
134
|
icon: datacell.icon,
|
|
164
135
|
label: datacell.label,
|
|
@@ -167,7 +138,7 @@ function (_React$PureComponent) {
|
|
|
167
138
|
});
|
|
168
139
|
|
|
169
140
|
case cst.TYPE_SENTINEL:
|
|
170
|
-
return
|
|
141
|
+
return React.createElement(CellSentinel, {
|
|
171
142
|
color: datacell.color,
|
|
172
143
|
label: datacell.label,
|
|
173
144
|
letter: datacell.label2,
|
|
@@ -177,14 +148,14 @@ function (_React$PureComponent) {
|
|
|
177
148
|
});
|
|
178
149
|
|
|
179
150
|
case cst.TYPE_SENTINEL_SCORE:
|
|
180
|
-
return
|
|
151
|
+
return React.createElement(CellSentinelScore, {
|
|
181
152
|
value: datacell.value,
|
|
182
153
|
result: datacell.result,
|
|
183
154
|
active: datacell.active
|
|
184
155
|
});
|
|
185
156
|
|
|
186
157
|
case cst.TYPE_PIN_TO_ACTION:
|
|
187
|
-
return
|
|
158
|
+
return React.createElement(CellPinToAction, {
|
|
188
159
|
number: datacell.number // eslint-disable-next-line react/jsx-handler-names
|
|
189
160
|
,
|
|
190
161
|
onClick: datacell.onClick
|
|
@@ -193,7 +164,7 @@ function (_React$PureComponent) {
|
|
|
193
164
|
case cst.TYPE_ACCOUNT_NUMBER:
|
|
194
165
|
case cst.TYPE_CUSTOMER_ACCOUNT_NUMBER:
|
|
195
166
|
default:
|
|
196
|
-
return
|
|
167
|
+
return React.createElement(CellTextStyled, {
|
|
197
168
|
active: datacell.active,
|
|
198
169
|
color: datacell.color,
|
|
199
170
|
label: datacell.label,
|
|
@@ -208,10 +179,11 @@ function (_React$PureComponent) {
|
|
|
208
179
|
|
|
209
180
|
return null;
|
|
210
181
|
});
|
|
182
|
+
|
|
211
183
|
return _this;
|
|
212
184
|
}
|
|
213
185
|
|
|
214
|
-
(
|
|
186
|
+
_createClass(HiCellBuilder, [{
|
|
215
187
|
key: "render",
|
|
216
188
|
value: function render() {
|
|
217
189
|
var _this$props = this.props,
|
|
@@ -219,13 +191,13 @@ function (_React$PureComponent) {
|
|
|
219
191
|
column = _this$props.column,
|
|
220
192
|
data = _this$props.data,
|
|
221
193
|
locale = _this$props.locale;
|
|
222
|
-
return
|
|
194
|
+
return React.createElement(TableCell, {
|
|
223
195
|
className: className
|
|
224
196
|
}, this.createCell(column, data, locale));
|
|
225
197
|
}
|
|
226
198
|
}]);
|
|
199
|
+
|
|
227
200
|
return HiCellBuilder;
|
|
228
|
-
}(
|
|
201
|
+
}(React.PureComponent);
|
|
229
202
|
|
|
230
|
-
|
|
231
|
-
exports.default = _default;
|
|
203
|
+
export default HiCellBuilder;
|
package/es/HiTable/HiTable.js
CHANGED
|
@@ -1,37 +1,17 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
exports.default = void 0;
|
|
9
|
-
|
|
10
|
-
var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/classCallCheck"));
|
|
11
|
-
|
|
12
|
-
var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/createClass"));
|
|
13
|
-
|
|
14
|
-
var _possibleConstructorReturn2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/possibleConstructorReturn"));
|
|
15
|
-
|
|
16
|
-
var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/getPrototypeOf"));
|
|
17
|
-
|
|
18
|
-
var _assertThisInitialized2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/assertThisInitialized"));
|
|
19
|
-
|
|
20
|
-
var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/inherits"));
|
|
21
|
-
|
|
22
|
-
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/defineProperty"));
|
|
23
|
-
|
|
24
|
-
var _react = _interopRequireDefault(require("react"));
|
|
25
|
-
|
|
26
|
-
var _styles = require("@material-ui/core/styles");
|
|
27
|
-
|
|
28
|
-
var _Table = _interopRequireDefault(require("@material-ui/core/Table"));
|
|
29
|
-
|
|
30
|
-
var _HiTableHeader = _interopRequireDefault(require("./HiTableHeader"));
|
|
31
|
-
|
|
32
|
-
var _HiTableBody = _interopRequireDefault(require("./HiTableBody"));
|
|
33
|
-
|
|
1
|
+
import _classCallCheck from "@babel/runtime/helpers/esm/classCallCheck";
|
|
2
|
+
import _createClass from "@babel/runtime/helpers/esm/createClass";
|
|
3
|
+
import _possibleConstructorReturn from "@babel/runtime/helpers/esm/possibleConstructorReturn";
|
|
4
|
+
import _getPrototypeOf from "@babel/runtime/helpers/esm/getPrototypeOf";
|
|
5
|
+
import _assertThisInitialized from "@babel/runtime/helpers/esm/assertThisInitialized";
|
|
6
|
+
import _inherits from "@babel/runtime/helpers/esm/inherits";
|
|
7
|
+
import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
|
|
34
8
|
// @inheritedComponent Table
|
|
9
|
+
import React from 'react';
|
|
10
|
+
import { withStyles } from '@material-ui/core/styles';
|
|
11
|
+
import Table from '@material-ui/core/Table';
|
|
12
|
+
import HiTableHeader from './HiTableHeader';
|
|
13
|
+
import HiTableBody from './HiTableBody';
|
|
14
|
+
|
|
35
15
|
var styles = function styles(theme) {
|
|
36
16
|
return {
|
|
37
17
|
root: {
|
|
@@ -43,23 +23,26 @@ var styles = function styles(theme) {
|
|
|
43
23
|
var HiTable =
|
|
44
24
|
/*#__PURE__*/
|
|
45
25
|
function (_React$PureComponent) {
|
|
46
|
-
(
|
|
26
|
+
_inherits(HiTable, _React$PureComponent);
|
|
47
27
|
|
|
48
28
|
function HiTable(props) {
|
|
49
29
|
var _this;
|
|
50
30
|
|
|
51
|
-
(
|
|
52
|
-
|
|
53
|
-
|
|
31
|
+
_classCallCheck(this, HiTable);
|
|
32
|
+
|
|
33
|
+
_this = _possibleConstructorReturn(this, _getPrototypeOf(HiTable).call(this, props));
|
|
34
|
+
|
|
35
|
+
_defineProperty(_assertThisInitialized(_this), "handleRequestSort", function (event, property) {
|
|
54
36
|
if (_this.props.onSort) {
|
|
55
37
|
_this.props.onSort(property);
|
|
56
38
|
}
|
|
57
39
|
});
|
|
58
|
-
|
|
40
|
+
|
|
41
|
+
_this.handleRequestSort = _this.handleRequestSort.bind(_assertThisInitialized(_this));
|
|
59
42
|
return _this;
|
|
60
43
|
}
|
|
61
44
|
|
|
62
|
-
(
|
|
45
|
+
_createClass(HiTable, [{
|
|
63
46
|
key: "render",
|
|
64
47
|
value: function render() {
|
|
65
48
|
var _this$props = this.props,
|
|
@@ -72,16 +55,16 @@ function (_React$PureComponent) {
|
|
|
72
55
|
dense = _this$props.dense,
|
|
73
56
|
order = _this$props.order,
|
|
74
57
|
orderBy = _this$props.orderBy;
|
|
75
|
-
return
|
|
58
|
+
return React.createElement(Table, {
|
|
76
59
|
className: classes.root
|
|
77
|
-
},
|
|
60
|
+
}, React.createElement(HiTableHeader, {
|
|
78
61
|
columns: columns,
|
|
79
62
|
order: order,
|
|
80
63
|
orderBy: orderBy,
|
|
81
64
|
onRequestSort: this.handleRequestSort,
|
|
82
65
|
sortable: sortable,
|
|
83
66
|
dense: dense
|
|
84
|
-
}),
|
|
67
|
+
}), React.createElement(HiTableBody, {
|
|
85
68
|
data: data,
|
|
86
69
|
columns: columns,
|
|
87
70
|
onClick: onRowClick,
|
|
@@ -90,12 +73,11 @@ function (_React$PureComponent) {
|
|
|
90
73
|
}));
|
|
91
74
|
}
|
|
92
75
|
}]);
|
|
76
|
+
|
|
93
77
|
return HiTable;
|
|
94
|
-
}(
|
|
78
|
+
}(React.PureComponent);
|
|
95
79
|
|
|
96
|
-
|
|
80
|
+
export default withStyles(styles, {
|
|
97
81
|
hiComponent: true,
|
|
98
82
|
name: 'HmuiHiTable'
|
|
99
|
-
})(HiTable);
|
|
100
|
-
|
|
101
|
-
exports.default = _default;
|
|
83
|
+
})(HiTable);
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { assert } from 'chai';
|
|
3
|
+
import { createShallow, getClasses } from '../test-utils';
|
|
4
|
+
import HiTable from './HiTable';
|
|
5
|
+
describe('<HiTable columns={columns} data={data}/>', function () {
|
|
6
|
+
var shallow;
|
|
7
|
+
var classes;
|
|
8
|
+
var columns = {};
|
|
9
|
+
var data = [];
|
|
10
|
+
before(function () {
|
|
11
|
+
shallow = createShallow({
|
|
12
|
+
untilSelector: 'table'
|
|
13
|
+
});
|
|
14
|
+
classes = getClasses(React.createElement(HiTable, {
|
|
15
|
+
columns: columns,
|
|
16
|
+
data: data
|
|
17
|
+
}));
|
|
18
|
+
});
|
|
19
|
+
describe('default HiTable export', function () {
|
|
20
|
+
it('should render a table with the root classes', function () {
|
|
21
|
+
var wrapper = shallow(React.createElement(HiTable, {
|
|
22
|
+
columns: columns,
|
|
23
|
+
data: data
|
|
24
|
+
}));
|
|
25
|
+
assert.strictEqual(wrapper.name(), 'table');
|
|
26
|
+
assert.strictEqual(wrapper.hasClass(classes.root), true);
|
|
27
|
+
});
|
|
28
|
+
});
|
|
29
|
+
});
|
|
@@ -1,40 +1,25 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
value: true
|
|
7
|
-
});
|
|
8
|
-
exports.default = void 0;
|
|
9
|
-
|
|
10
|
-
var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/classCallCheck"));
|
|
11
|
-
|
|
12
|
-
var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/createClass"));
|
|
13
|
-
|
|
14
|
-
var _possibleConstructorReturn2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/possibleConstructorReturn"));
|
|
15
|
-
|
|
16
|
-
var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/getPrototypeOf"));
|
|
17
|
-
|
|
18
|
-
var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/inherits"));
|
|
19
|
-
|
|
20
|
-
var _react = _interopRequireDefault(require("react"));
|
|
21
|
-
|
|
22
|
-
var _TableBody = _interopRequireDefault(require("@material-ui/core/TableBody/TableBody"));
|
|
23
|
-
|
|
24
|
-
var _HiTableRow = _interopRequireDefault(require("./HiTableRow"));
|
|
25
|
-
|
|
1
|
+
import _classCallCheck from "@babel/runtime/helpers/esm/classCallCheck";
|
|
2
|
+
import _createClass from "@babel/runtime/helpers/esm/createClass";
|
|
3
|
+
import _possibleConstructorReturn from "@babel/runtime/helpers/esm/possibleConstructorReturn";
|
|
4
|
+
import _getPrototypeOf from "@babel/runtime/helpers/esm/getPrototypeOf";
|
|
5
|
+
import _inherits from "@babel/runtime/helpers/esm/inherits";
|
|
26
6
|
// @inheritedComponent TableBody
|
|
7
|
+
import React from 'react';
|
|
8
|
+
import TableBody from '@material-ui/core/TableBody/TableBody';
|
|
9
|
+
import HiTableRow from './HiTableRow';
|
|
10
|
+
|
|
27
11
|
var HiTableBody =
|
|
28
12
|
/*#__PURE__*/
|
|
29
13
|
function (_React$PureComponent) {
|
|
30
|
-
(
|
|
14
|
+
_inherits(HiTableBody, _React$PureComponent);
|
|
31
15
|
|
|
32
16
|
function HiTableBody() {
|
|
33
|
-
(
|
|
34
|
-
|
|
17
|
+
_classCallCheck(this, HiTableBody);
|
|
18
|
+
|
|
19
|
+
return _possibleConstructorReturn(this, _getPrototypeOf(HiTableBody).apply(this, arguments));
|
|
35
20
|
}
|
|
36
21
|
|
|
37
|
-
(
|
|
22
|
+
_createClass(HiTableBody, [{
|
|
38
23
|
key: "render",
|
|
39
24
|
value: function render() {
|
|
40
25
|
var _this$props = this.props,
|
|
@@ -43,8 +28,8 @@ function (_React$PureComponent) {
|
|
|
43
28
|
dense = _this$props.dense,
|
|
44
29
|
locale = _this$props.locale,
|
|
45
30
|
onClick = _this$props.onClick;
|
|
46
|
-
return
|
|
47
|
-
return
|
|
31
|
+
return React.createElement(TableBody, null, data.map(function (n) {
|
|
32
|
+
return React.createElement(HiTableRow, {
|
|
48
33
|
columns: columns,
|
|
49
34
|
rowdata: n,
|
|
50
35
|
key: n.rowId,
|
|
@@ -55,8 +40,8 @@ function (_React$PureComponent) {
|
|
|
55
40
|
}));
|
|
56
41
|
}
|
|
57
42
|
}]);
|
|
43
|
+
|
|
58
44
|
return HiTableBody;
|
|
59
|
-
}(
|
|
45
|
+
}(React.PureComponent);
|
|
60
46
|
|
|
61
|
-
|
|
62
|
-
exports.default = _default;
|
|
47
|
+
export default HiTableBody;
|