@hipay/hipay-material-ui 2.3.1-rc4 → 2.3.1-rc5
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/HiAlertModal/HiAlertModal.js +77 -48
- package/HiAlertModal/index.js +15 -1
- package/HiAppBar/HiAppBar.js +63 -34
- package/HiAppBar/index.js +15 -1
- package/HiBadge/HiBadge.js +29 -10
- package/HiBadge/index.js +15 -1
- package/HiBreadcrumb/HiBreadcrumb.js +41 -27
- package/HiBreadcrumb/HiStep.js +58 -35
- package/HiBreadcrumb/HiStepConnector.js +58 -33
- package/HiBreadcrumb/HiStepContent.js +47 -26
- package/HiBreadcrumb/HiStepIcon.js +47 -27
- package/HiBreadcrumb/HiStepLabel.js +62 -37
- package/HiBreadcrumb/HiStepper.js +44 -24
- package/HiBreadcrumb/index.js +15 -1
- package/HiButton/HiButton.js +27 -9
- package/HiButton/index.js +13 -2
- package/HiCell/CellAddress.js +39 -21
- package/HiCell/CellDate.js +44 -27
- package/HiCell/CellIcon.js +48 -29
- package/HiCell/CellImage.js +41 -24
- package/HiCell/CellNumeric.js +45 -26
- package/HiCell/CellPinToAction.js +41 -20
- package/HiCell/CellRate.js +56 -33
- package/HiCell/CellSentinel.js +41 -23
- package/HiCell/CellSentinelScore.js +43 -24
- package/HiCell/CellText.js +54 -37
- package/HiCell/CellTextStyled.js +21 -8
- package/HiCell/index.js +79 -9
- package/HiCheckbox/HiCheckbox.js +61 -36
- package/HiCheckbox/index.js +15 -1
- package/HiChip/HiChip.js +44 -24
- package/HiChip/HiChipSwitch.js +73 -47
- package/HiChip/index.js +23 -2
- package/HiColoredLabel/HiColoredLabel.js +52 -28
- package/HiColoredLabel/index.js +15 -1
- package/HiDatePicker/Caption.js +28 -11
- package/HiDatePicker/HiDatePicker.js +131 -101
- package/HiDatePicker/HiDatePickerMobile.js +54 -32
- package/HiDatePicker/HiDateRangePicker.js +168 -139
- package/HiDatePicker/HiDateRangeSelector.js +105 -71
- package/HiDatePicker/ListPicker.js +54 -34
- package/HiDatePicker/NavBar.js +45 -18
- package/HiDatePicker/Overlays/CustomOverlayLayout.js +40 -23
- package/HiDatePicker/Overlays/CustomOverlayLayoutWithoutFooter.js +39 -22
- package/HiDatePicker/Overlays/MonthPickerOverlay.js +44 -30
- package/HiDatePicker/Overlays/Overlay.js +35 -18
- package/HiDatePicker/Overlays/TimePickerOverlay.js +72 -48
- package/HiDatePicker/Overlays/YearPickerOverlay.js +44 -30
- package/HiDatePicker/Overlays/index.js +47 -5
- package/HiDatePicker/Weekday.js +13 -3
- package/HiDatePicker/hiLocaleUtils.js +8 -1
- package/HiDatePicker/index.js +15 -1
- package/HiDatePicker/stylesheet.js +22 -9
- package/HiDotsStepper/HiDot.js +56 -31
- package/HiDotsStepper/HiDotsStepper.js +47 -28
- package/HiDotsStepper/index.js +23 -2
- package/HiExpansionPanel/HiExpansionPanel.js +73 -43
- package/HiExpansionPanel/index.js +13 -2
- package/HiForm/HiAddressField.js +46 -29
- package/HiForm/HiEmailField.js +45 -27
- package/HiForm/HiFormControl.js +105 -72
- package/HiForm/HiFormLabel.js +53 -30
- package/HiForm/HiInput.js +89 -62
- package/HiForm/HiPasswordField.js +55 -29
- package/HiForm/HiSearchField.js +43 -28
- package/HiForm/HiSlider.js +64 -41
- package/HiForm/HiTextField.js +46 -29
- package/HiForm/HiUpload.js +76 -53
- package/HiForm/HiUploadField.js +40 -25
- package/HiForm/HiUploadInput.js +84 -56
- package/HiForm/index.js +95 -11
- package/HiIcon/HiIcon.js +44 -22
- package/HiIcon/index.js +15 -1
- package/HiIconButton/HiIconButton.js +40 -18
- package/HiIconButton/index.js +15 -1
- package/HiLoader/HiLoader.js +24 -9
- package/HiLoader/index.js +15 -1
- package/HiMap/HiMap.js +76 -51
- package/HiMap/HiMapExpand.js +64 -39
- package/HiMap/index.js +23 -2
- package/HiNotice/HiKPI.js +56 -33
- package/HiNotice/HiKPINotice.js +21 -7
- package/HiNotice/index.js +23 -2
- package/HiPaymentMeans/HiPaymentMeans.js +133 -112
- package/HiPaymentMeans/index.js +15 -1
- package/HiPdfReader/HiPdfReader.js +78 -52
- package/HiPdfReader/index.js +15 -1
- package/HiPin/HiPin.js +30 -9
- package/HiPin/index.js +15 -1
- package/HiRadio/HiRadio.js +24 -7
- package/HiRadio/index.js +15 -1
- package/HiSelect/HiDynamicSelect.js +58 -40
- package/HiSelect/HiDynamicSelectField.js +40 -22
- package/HiSelect/HiNestedSelect.js +85 -55
- package/HiSelect/HiNestedSelectContent.js +72 -46
- package/HiSelect/HiNestedSelectField.js +40 -22
- package/HiSelect/HiSelect.js +161 -123
- package/HiSelect/HiSelectContent.js +104 -73
- package/HiSelect/HiSelectField.js +40 -22
- package/HiSelect/HiSelectInput.js +94 -63
- package/HiSelect/HiSelectMobile.js +54 -35
- package/HiSelect/HiSuggestSelect.js +83 -56
- package/HiSelect/HiSuggestSelectField.js +40 -22
- package/HiSelect/index.js +85 -8
- package/HiSelectableList/HiSelectableList.js +80 -49
- package/HiSelectableList/HiSelectableListHierarchic.js +55 -35
- package/HiSelectableList/HiSelectableListItem.js +101 -66
- package/HiSelectableList/index.js +31 -3
- package/HiSwitch/HiSwitch.js +45 -20
- package/HiSwitch/HiSwitchState.js +36 -15
- package/HiSwitch/index.js +23 -2
- package/HiTable/HiCellBuilder.js +69 -43
- package/HiTable/HiTable.js +46 -28
- package/HiTable/HiTableBody.js +34 -19
- package/HiTable/HiTableHeader.js +50 -29
- package/HiTable/HiTableRow.js +56 -29
- package/HiTable/constants.js +94 -43
- package/HiTable/index.js +15 -1
- package/es/HiAlertModal/HiAlertModal.js +77 -48
- package/es/HiAlertModal/index.js +15 -1
- package/es/HiAppBar/HiAppBar.js +63 -34
- package/es/HiAppBar/index.js +15 -1
- package/es/HiBadge/HiBadge.js +29 -10
- package/es/HiBadge/index.js +15 -1
- package/es/HiBreadcrumb/HiBreadcrumb.js +41 -27
- package/es/HiBreadcrumb/HiStep.js +58 -35
- package/es/HiBreadcrumb/HiStepConnector.js +58 -33
- package/es/HiBreadcrumb/HiStepContent.js +47 -26
- package/es/HiBreadcrumb/HiStepIcon.js +47 -27
- package/es/HiBreadcrumb/HiStepLabel.js +62 -37
- package/es/HiBreadcrumb/HiStepper.js +44 -24
- package/es/HiBreadcrumb/index.js +15 -1
- package/es/HiButton/HiButton.js +27 -9
- package/es/HiButton/index.js +13 -2
- package/es/HiCell/CellAddress.js +39 -21
- package/es/HiCell/CellDate.js +44 -27
- package/es/HiCell/CellIcon.js +48 -29
- package/es/HiCell/CellImage.js +41 -24
- package/es/HiCell/CellNumeric.js +45 -26
- package/es/HiCell/CellPinToAction.js +41 -20
- package/es/HiCell/CellRate.js +56 -33
- package/es/HiCell/CellSentinel.js +41 -23
- package/es/HiCell/CellSentinelScore.js +43 -24
- package/es/HiCell/CellText.js +54 -37
- package/es/HiCell/CellTextStyled.js +21 -8
- package/es/HiCell/index.js +79 -9
- package/es/HiCheckbox/HiCheckbox.js +61 -36
- package/es/HiCheckbox/index.js +15 -1
- package/es/HiChip/HiChip.js +44 -24
- package/es/HiChip/HiChipSwitch.js +73 -47
- package/es/HiChip/index.js +23 -2
- package/es/HiColoredLabel/HiColoredLabel.js +52 -28
- package/es/HiColoredLabel/index.js +15 -1
- package/es/HiDatePicker/Caption.js +28 -11
- package/es/HiDatePicker/HiDatePicker.js +131 -101
- package/es/HiDatePicker/HiDatePickerMobile.js +54 -32
- package/es/HiDatePicker/HiDateRangePicker.js +168 -139
- package/es/HiDatePicker/HiDateRangeSelector.js +105 -71
- package/es/HiDatePicker/ListPicker.js +54 -34
- package/es/HiDatePicker/NavBar.js +45 -18
- package/es/HiDatePicker/Overlays/CustomOverlayLayout.js +40 -23
- package/es/HiDatePicker/Overlays/CustomOverlayLayoutWithoutFooter.js +39 -22
- package/es/HiDatePicker/Overlays/MonthPickerOverlay.js +44 -30
- package/es/HiDatePicker/Overlays/Overlay.js +35 -18
- package/es/HiDatePicker/Overlays/TimePickerOverlay.js +72 -48
- package/es/HiDatePicker/Overlays/YearPickerOverlay.js +44 -30
- package/es/HiDatePicker/Overlays/index.js +47 -5
- package/es/HiDatePicker/Weekday.js +13 -3
- package/es/HiDatePicker/hiLocaleUtils.js +8 -1
- package/es/HiDatePicker/index.js +15 -1
- package/es/HiDatePicker/stylesheet.js +22 -9
- package/es/HiDotsStepper/HiDot.js +56 -31
- package/es/HiDotsStepper/HiDotsStepper.js +47 -28
- package/es/HiDotsStepper/index.js +23 -2
- package/es/HiExpansionPanel/HiExpansionPanel.js +73 -43
- package/es/HiExpansionPanel/index.js +13 -2
- package/es/HiForm/HiAddressField.js +46 -29
- package/es/HiForm/HiEmailField.js +45 -27
- package/es/HiForm/HiFormControl.js +105 -72
- package/es/HiForm/HiFormLabel.js +53 -30
- package/es/HiForm/HiInput.js +89 -62
- package/es/HiForm/HiPasswordField.js +55 -29
- package/es/HiForm/HiSearchField.js +43 -28
- package/es/HiForm/HiSlider.js +64 -41
- package/es/HiForm/HiTextField.js +46 -29
- package/es/HiForm/HiUpload.js +76 -53
- package/es/HiForm/HiUploadField.js +40 -25
- package/es/HiForm/HiUploadInput.js +84 -56
- package/es/HiForm/index.js +95 -11
- package/es/HiIcon/HiIcon.js +44 -22
- package/es/HiIcon/index.js +15 -1
- package/es/HiIconButton/HiIconButton.js +40 -18
- package/es/HiIconButton/index.js +15 -1
- package/es/HiLoader/HiLoader.js +24 -9
- package/es/HiLoader/index.js +15 -1
- package/es/HiMap/HiMap.js +76 -51
- package/es/HiMap/HiMapExpand.js +64 -39
- package/es/HiMap/index.js +23 -2
- package/es/HiNotice/HiKPI.js +56 -33
- package/es/HiNotice/HiKPINotice.js +21 -7
- package/es/HiNotice/index.js +23 -2
- package/es/HiPaymentMeans/HiPaymentMeans.js +133 -112
- package/es/HiPaymentMeans/index.js +15 -1
- package/es/HiPdfReader/HiPdfReader.js +78 -52
- package/es/HiPdfReader/index.js +15 -1
- package/es/HiPin/HiPin.js +30 -9
- package/es/HiPin/index.js +15 -1
- package/es/HiRadio/HiRadio.js +24 -7
- package/es/HiRadio/index.js +15 -1
- package/es/HiSelect/HiDynamicSelect.js +58 -40
- package/es/HiSelect/HiDynamicSelectField.js +40 -22
- package/es/HiSelect/HiNestedSelect.js +85 -55
- package/es/HiSelect/HiNestedSelectContent.js +72 -46
- package/es/HiSelect/HiNestedSelectField.js +40 -22
- package/es/HiSelect/HiSelect.js +161 -123
- package/es/HiSelect/HiSelectContent.js +104 -73
- package/es/HiSelect/HiSelectField.js +40 -22
- package/es/HiSelect/HiSelectInput.js +94 -63
- package/es/HiSelect/HiSelectMobile.js +54 -35
- package/es/HiSelect/HiSuggestSelect.js +83 -56
- package/es/HiSelect/HiSuggestSelectField.js +40 -22
- package/es/HiSelect/index.js +85 -8
- package/es/HiSelectableList/HiSelectableList.js +80 -49
- package/es/HiSelectableList/HiSelectableListHierarchic.js +55 -35
- package/es/HiSelectableList/HiSelectableListItem.js +101 -66
- package/es/HiSelectableList/index.js +31 -3
- package/es/HiSwitch/HiSwitch.js +45 -20
- package/es/HiSwitch/HiSwitchState.js +36 -15
- package/es/HiSwitch/index.js +23 -2
- package/es/HiTable/HiCellBuilder.js +69 -43
- package/es/HiTable/HiTable.js +46 -28
- package/es/HiTable/HiTableBody.js +34 -19
- package/es/HiTable/HiTableHeader.js +50 -29
- package/es/HiTable/HiTableRow.js +56 -29
- package/es/HiTable/constants.js +94 -43
- package/es/HiTable/index.js +15 -1
- package/es/hi-svg-icons/HiAccount.js +36 -18
- package/es/hi-svg-icons/HiActivity.js +35 -17
- package/es/hi-svg-icons/HiAll.js +42 -22
- package/es/hi-svg-icons/HiBilling.js +36 -18
- package/es/hi-svg-icons/HiBriefcaseRescue.js +26 -10
- package/es/hi-svg-icons/HiCatalog.js +36 -18
- package/es/hi-svg-icons/HiCustomer.js +36 -18
- package/es/hi-svg-icons/HiDownload.js +25 -11
- package/es/hi-svg-icons/HiFinance.js +36 -18
- package/es/hi-svg-icons/HiPermission.js +35 -17
- package/es/hi-svg-icons/HiRoute.js +36 -18
- package/es/hi-svg-icons/HiSettlement.js +36 -18
- package/es/hi-svg-icons/HiSizeLarge.js +27 -12
- package/es/hi-svg-icons/HiSizeMedium.js +25 -11
- package/es/hi-svg-icons/HiSizeSmall.js +25 -11
- package/es/hi-svg-icons/HiTransaction.js +36 -18
- package/es/hi-svg-icons/HiUser.js +36 -18
- package/es/hi-svg-icons/HiWidget.js +42 -22
- package/es/hi-svg-icons/index.js +151 -18
- package/es/hi-svg-icons/index.text.js +21 -11
- package/es/styleguide/Wrapper.js +36 -19
- package/es/styles/MuiThemeProvider.js +57 -39
- package/es/styles/colorManipulator.js +44 -16
- package/es/styles/createBreakpoints.js +20 -6
- package/es/styles/createGenerateClassName.js +15 -5
- package/es/styles/createMixins.js +19 -8
- package/es/styles/createMuiTheme.js +53 -34
- package/es/styles/createPalette.js +50 -30
- package/es/styles/createStyles.js +8 -1
- package/es/styles/createTypography.js +30 -18
- package/es/styles/getStylesCreator.js +24 -11
- package/es/styles/getThemeProps.js +9 -1
- package/es/styles/index.js +47 -5
- package/es/styles/jssPreset.js +25 -9
- package/es/styles/mergeClasses.js +19 -7
- package/es/styles/shadows.js +8 -1
- package/es/styles/shape.js +8 -1
- package/es/styles/spacing.js +9 -1
- package/es/styles/themeListener.js +18 -5
- package/es/styles/transitions.js +38 -18
- package/es/styles/zIndex.js +8 -1
- package/es/test-utils/createMount.js +22 -11
- package/es/test-utils/createRender.js +19 -8
- package/es/test-utils/createShallow.js +23 -13
- package/es/test-utils/getClasses.js +11 -2
- package/es/test-utils/index.js +47 -5
- package/es/test-utils/until.js +16 -6
- package/es/test-utils/unwrap.js +8 -1
- package/es/theme/palette.js +10 -2
- package/es/theme/typography.js +11 -3
- package/es/theme.js +13 -4
- package/es/transitions/utils.js +13 -2
- package/es/utils/exactProp.js +18 -5
- package/es/utils/helpers.js +55 -18
- package/es/withMobileDialog/index.js +15 -1
- package/es/withMobileDialog/withMobileDialog.js +22 -7
- package/hi-svg-icons/HiAccount.js +36 -18
- package/hi-svg-icons/HiActivity.js +35 -17
- package/hi-svg-icons/HiAll.js +42 -22
- package/hi-svg-icons/HiBilling.js +36 -18
- package/hi-svg-icons/HiBriefcaseRescue.js +26 -10
- package/hi-svg-icons/HiCatalog.js +36 -18
- package/hi-svg-icons/HiCustomer.js +36 -18
- package/hi-svg-icons/HiDownload.js +25 -11
- package/hi-svg-icons/HiFinance.js +36 -18
- package/hi-svg-icons/HiPermission.js +35 -17
- package/hi-svg-icons/HiRoute.js +36 -18
- package/hi-svg-icons/HiSettlement.js +36 -18
- package/hi-svg-icons/HiSizeLarge.js +27 -12
- package/hi-svg-icons/HiSizeMedium.js +25 -11
- package/hi-svg-icons/HiSizeSmall.js +25 -11
- package/hi-svg-icons/HiTransaction.js +36 -18
- package/hi-svg-icons/HiUser.js +36 -18
- package/hi-svg-icons/HiWidget.js +42 -22
- package/hi-svg-icons/index.js +151 -18
- package/hi-svg-icons/index.text.js +21 -11
- package/package.json +2 -1
- package/styleguide/Wrapper.js +36 -19
- package/styles/MuiThemeProvider.js +57 -39
- package/styles/colorManipulator.js +44 -16
- package/styles/createBreakpoints.js +20 -6
- package/styles/createGenerateClassName.js +15 -5
- package/styles/createMixins.js +19 -8
- package/styles/createMuiTheme.js +53 -34
- package/styles/createPalette.js +50 -30
- package/styles/createStyles.js +8 -1
- package/styles/createTypography.js +30 -18
- package/styles/getStylesCreator.js +24 -11
- package/styles/getThemeProps.js +9 -1
- package/styles/index.js +47 -5
- package/styles/jssPreset.js +25 -9
- package/styles/mergeClasses.js +19 -7
- package/styles/shadows.js +8 -1
- package/styles/shape.js +8 -1
- package/styles/spacing.js +9 -1
- package/styles/themeListener.js +18 -5
- package/styles/transitions.js +38 -18
- package/styles/zIndex.js +8 -1
- package/test-utils/createMount.js +22 -11
- package/test-utils/createRender.js +19 -8
- package/test-utils/createShallow.js +23 -13
- package/test-utils/getClasses.js +11 -2
- package/test-utils/index.js +47 -5
- package/test-utils/until.js +16 -6
- package/test-utils/unwrap.js +8 -1
- package/theme/palette.js +10 -2
- package/theme/typography.js +11 -3
- package/theme.js +13 -4
- package/transitions/utils.js +13 -2
- package/utils/exactProp.js +18 -5
- package/utils/helpers.js +55 -18
- package/withMobileDialog/index.js +15 -1
- package/withMobileDialog/withMobileDialog.js +22 -7
- package/App.test.js +0 -8
- package/HiAlertModal/HiAlertModal.test.js +0 -189
- package/HiBadge/HiBadge.test.js +0 -49
- package/HiBreadcrumb/HiBreadcrumb.test.js +0 -44
- package/HiBreadcrumb/HiStep.test.js +0 -47
- package/HiBreadcrumb/HiStepConnector.test.js +0 -113
- package/HiBreadcrumb/HiStepContent.test.js +0 -32
- package/HiBreadcrumb/HiStepIcon.test.js +0 -65
- package/HiBreadcrumb/HiStepLabel.test.js +0 -30
- package/HiBreadcrumb/HiStepper.test.js +0 -33
- package/HiCell/CellAddress.test.js +0 -75
- package/HiCell/CellDate.test.js +0 -173
- package/HiCell/CellIcon.test.js +0 -57
- package/HiCell/CellImage.test.js +0 -49
- package/HiCell/CellNumeric.test.js +0 -46
- package/HiCell/CellRate.test.js +0 -73
- package/HiCell/CellSentinel.test.js +0 -48
- package/HiCell/CellText.test.js +0 -76
- package/HiCheckbox/HiCheckbox.test.js +0 -55
- package/HiChip/HiChip.test.js +0 -136
- package/HiChip/HiChipSwitch.test.js +0 -99
- package/HiColoredLabel/HiColoredLabel.test.js +0 -96
- package/HiDatePicker/Caption.test.js +0 -65
- package/HiDatePicker/HiDatePicker.test.js +0 -370
- package/HiDatePicker/HiDateRangePicker.test.js +0 -703
- package/HiDatePicker/HiDateRangeSelector.test.js +0 -193
- package/HiDatePicker/ListPicker.test.js +0 -53
- package/HiDatePicker/NavBar.test.js +0 -39
- package/HiDatePicker/Overlays/MonthPickerOverlay.test.js +0 -50
- package/HiDatePicker/Overlays/Overlay.test.js +0 -20
- package/HiDatePicker/Overlays/TimePickerOverlay.test.js +0 -48
- package/HiDatePicker/Overlays/YearPickerOverlay.test.js +0 -79
- package/HiDatePicker/hiLocaleUtils.test.js +0 -51
- package/HiDotsStepper/HiDot.test.js +0 -55
- package/HiDotsStepper/HiDotsStepper.test.js +0 -90
- package/HiForm/HiAddressField.test.js +0 -79
- package/HiForm/HiEmailField.test.js +0 -19
- package/HiForm/HiFormControl.test.js +0 -195
- package/HiForm/HiFormLabel.test.js +0 -66
- package/HiForm/HiInput.test.js +0 -202
- package/HiForm/HiPasswordField.test.js +0 -60
- package/HiForm/HiSearchField.test.js +0 -193
- package/HiForm/HiSlider.test.js +0 -99
- package/HiForm/HiTextField.test.js +0 -254
- package/HiForm/HiUpload.test.js +0 -241
- package/HiForm/HiUploadField.test.js +0 -55
- package/HiForm/HiUploadInput.test.js +0 -148
- package/HiIconButton/HiIconButton.test.js +0 -69
- package/HiLoader/HiLoader.test.js +0 -18
- package/HiMap/HiMap.test.js +0 -29
- package/HiMap/HiMapExpand.test.js +0 -48
- package/HiNotice/HiKPI.test.js +0 -171
- package/HiNotice/HiKPINotice.test.js +0 -88
- package/HiPaymentMeans/HiPaymentMeans.test.js +0 -162
- package/HiPin/HiPin.test.js +0 -61
- package/HiRadio/HiRadio.test.js +0 -57
- package/HiSelect/HiSelect.test.js +0 -1092
- package/HiSelect/HiSelectInput.test.js +0 -21
- package/HiSelectableList/HiSelectableList.test.js +0 -173
- package/HiSelectableList/HiSelectableListItem.test.js +0 -97
- package/HiSwitch/HiSwitch.test.js +0 -41
- package/HiSwitch/HiSwitchState.test.js +0 -76
- package/HiTable/HiTable.test.js +0 -29
- package/es/App.test.js +0 -8
- package/es/HiAlertModal/HiAlertModal.test.js +0 -189
- package/es/HiBadge/HiBadge.test.js +0 -49
- package/es/HiBreadcrumb/HiBreadcrumb.test.js +0 -44
- package/es/HiBreadcrumb/HiStep.test.js +0 -47
- package/es/HiBreadcrumb/HiStepConnector.test.js +0 -113
- package/es/HiBreadcrumb/HiStepContent.test.js +0 -32
- package/es/HiBreadcrumb/HiStepIcon.test.js +0 -65
- package/es/HiBreadcrumb/HiStepLabel.test.js +0 -30
- package/es/HiBreadcrumb/HiStepper.test.js +0 -33
- package/es/HiCell/CellAddress.test.js +0 -75
- package/es/HiCell/CellDate.test.js +0 -173
- package/es/HiCell/CellIcon.test.js +0 -57
- package/es/HiCell/CellImage.test.js +0 -49
- package/es/HiCell/CellNumeric.test.js +0 -46
- package/es/HiCell/CellRate.test.js +0 -73
- package/es/HiCell/CellSentinel.test.js +0 -48
- package/es/HiCell/CellText.test.js +0 -76
- package/es/HiCheckbox/HiCheckbox.test.js +0 -55
- package/es/HiChip/HiChip.test.js +0 -136
- package/es/HiChip/HiChipSwitch.test.js +0 -99
- package/es/HiColoredLabel/HiColoredLabel.test.js +0 -96
- package/es/HiDatePicker/Caption.test.js +0 -65
- package/es/HiDatePicker/HiDatePicker.test.js +0 -370
- package/es/HiDatePicker/HiDateRangePicker.test.js +0 -703
- package/es/HiDatePicker/HiDateRangeSelector.test.js +0 -193
- package/es/HiDatePicker/ListPicker.test.js +0 -53
- package/es/HiDatePicker/NavBar.test.js +0 -39
- package/es/HiDatePicker/Overlays/MonthPickerOverlay.test.js +0 -50
- package/es/HiDatePicker/Overlays/Overlay.test.js +0 -20
- package/es/HiDatePicker/Overlays/TimePickerOverlay.test.js +0 -48
- package/es/HiDatePicker/Overlays/YearPickerOverlay.test.js +0 -79
- package/es/HiDatePicker/hiLocaleUtils.test.js +0 -51
- package/es/HiDotsStepper/HiDot.test.js +0 -55
- package/es/HiDotsStepper/HiDotsStepper.test.js +0 -90
- package/es/HiForm/HiAddressField.test.js +0 -79
- package/es/HiForm/HiEmailField.test.js +0 -19
- package/es/HiForm/HiFormControl.test.js +0 -195
- package/es/HiForm/HiFormLabel.test.js +0 -66
- package/es/HiForm/HiInput.test.js +0 -202
- package/es/HiForm/HiPasswordField.test.js +0 -60
- package/es/HiForm/HiSearchField.test.js +0 -193
- package/es/HiForm/HiSlider.test.js +0 -99
- package/es/HiForm/HiTextField.test.js +0 -254
- package/es/HiForm/HiUpload.test.js +0 -241
- package/es/HiForm/HiUploadField.test.js +0 -55
- package/es/HiForm/HiUploadInput.test.js +0 -148
- package/es/HiIconButton/HiIconButton.test.js +0 -69
- package/es/HiLoader/HiLoader.test.js +0 -18
- package/es/HiMap/HiMap.test.js +0 -29
- package/es/HiMap/HiMapExpand.test.js +0 -48
- package/es/HiNotice/HiKPI.test.js +0 -171
- package/es/HiNotice/HiKPINotice.test.js +0 -88
- package/es/HiPaymentMeans/HiPaymentMeans.test.js +0 -162
- package/es/HiPin/HiPin.test.js +0 -61
- package/es/HiRadio/HiRadio.test.js +0 -57
- package/es/HiSelect/HiSelect.test.js +0 -1092
- package/es/HiSelect/HiSelectInput.test.js +0 -21
- package/es/HiSelectableList/HiSelectableList.test.js +0 -173
- package/es/HiSelectableList/HiSelectableListItem.test.js +0 -97
- package/es/HiSwitch/HiSwitch.test.js +0 -41
- package/es/HiSwitch/HiSwitchState.test.js +0 -76
- package/es/HiTable/HiTable.test.js +0 -29
- package/es/styles/colorManipulator.test.js +0 -242
- package/es/styles/createBreakpoints.test.js +0 -48
- package/es/styles/createGenerateClassName.test.js +0 -141
- package/es/styles/createMixins.test.js +0 -24
- package/es/styles/createMuiTheme.test.js +0 -67
- package/es/styles/createPalette.test.js +0 -159
- package/es/styles/createStyles.test.js +0 -8
- package/es/styles/createTypography.test.js +0 -60
- package/es/styles/getStylesCreator.test.js +0 -92
- package/es/styles/getThemeProps.test.js +0 -39
- package/es/styles/themeListener.test.js +0 -26
- package/es/styles/transitions.test.js +0 -208
- package/es/test-utils/until.test.js +0 -157
- package/es/withMobileDialog/withMobileDialog.test.js +0 -67
- package/styles/colorManipulator.test.js +0 -242
- package/styles/createBreakpoints.test.js +0 -48
- package/styles/createGenerateClassName.test.js +0 -141
- package/styles/createMixins.test.js +0 -24
- package/styles/createMuiTheme.test.js +0 -67
- package/styles/createPalette.test.js +0 -159
- package/styles/createStyles.test.js +0 -8
- package/styles/createTypography.test.js +0 -60
- package/styles/getStylesCreator.test.js +0 -92
- package/styles/getThemeProps.test.js +0 -39
- package/styles/themeListener.test.js +0 -26
- package/styles/transitions.test.js +0 -208
- package/test-utils/until.test.js +0 -157
- package/withMobileDialog/withMobileDialog.test.js +0 -67
|
@@ -1,193 +0,0 @@
|
|
|
1
|
-
/* eslint-disable */
|
|
2
|
-
import React from 'react';
|
|
3
|
-
import { assert } from 'chai';
|
|
4
|
-
import moment from 'moment';
|
|
5
|
-
import { spy, useFakeTimers } from 'sinon';
|
|
6
|
-
import { createMount, createShallow } from '../test-utils';
|
|
7
|
-
import HiDateRangeSelector from './HiDateRangeSelector';
|
|
8
|
-
import { HiSelectField } from '../HiSelect';
|
|
9
|
-
import HiDateRangePicker from './HiDateRangePicker';
|
|
10
|
-
import { HiInput } from '../HiForm';
|
|
11
|
-
describe('<HiDateRangeSelector />', function () {
|
|
12
|
-
var shallow;
|
|
13
|
-
var mount;
|
|
14
|
-
before(function () {
|
|
15
|
-
shallow = createShallow({
|
|
16
|
-
dive: true
|
|
17
|
-
});
|
|
18
|
-
mount = createMount();
|
|
19
|
-
});
|
|
20
|
-
after(function () {
|
|
21
|
-
mount.cleanUp();
|
|
22
|
-
}); //
|
|
23
|
-
// describe('shallow', () => {
|
|
24
|
-
// it('renders a div containing 1 HiSelectField & 1 DateRangePicker', () => {
|
|
25
|
-
// const wrapper = shallow(
|
|
26
|
-
// <HiDateRangeSelector
|
|
27
|
-
// idSelect="idSelect"
|
|
28
|
-
// idRange="idRange"
|
|
29
|
-
// onChange={() => {}}
|
|
30
|
-
// />,
|
|
31
|
-
// );
|
|
32
|
-
//
|
|
33
|
-
// assert.strictEqual(
|
|
34
|
-
// wrapper.find(HiSelectField).length,
|
|
35
|
-
// 1,
|
|
36
|
-
// 'should render a HiSelectField',
|
|
37
|
-
// );
|
|
38
|
-
// assert.strictEqual(
|
|
39
|
-
// wrapper.find(HiDateRangePicker).length,
|
|
40
|
-
// 1,
|
|
41
|
-
// 'should render a DateRangePicker',
|
|
42
|
-
// );
|
|
43
|
-
// });
|
|
44
|
-
//
|
|
45
|
-
// it('should handle 2 input day picker interface', () => {
|
|
46
|
-
// const from = new Date(2018, 1, 17);
|
|
47
|
-
// const to = new Date(2019, 2, 18);
|
|
48
|
-
// const handleChange = spy();
|
|
49
|
-
//
|
|
50
|
-
// moment.updateLocale('en', { week: { dow: 1 } });
|
|
51
|
-
//
|
|
52
|
-
// const wrapper = shallow(
|
|
53
|
-
// <HiDateRangeSelector
|
|
54
|
-
// idSelect="idSelect"
|
|
55
|
-
// idRange="idRange"
|
|
56
|
-
// from={from}
|
|
57
|
-
// to={to}
|
|
58
|
-
// labelFrom={'Start'}
|
|
59
|
-
// labelTo={'End'}
|
|
60
|
-
// onChange={handleChange}
|
|
61
|
-
// />,
|
|
62
|
-
// );
|
|
63
|
-
//
|
|
64
|
-
// wrapper
|
|
65
|
-
// .find(HiSelectField)
|
|
66
|
-
// .dive()
|
|
67
|
-
// .childAt(0)
|
|
68
|
-
// .props()
|
|
69
|
-
// .onChange('selectedPreset', 'pm');
|
|
70
|
-
//
|
|
71
|
-
// // OnChange is call twice because it set from and to date
|
|
72
|
-
// assert.strictEqual(
|
|
73
|
-
// handleChange.calledTwice,
|
|
74
|
-
// true,
|
|
75
|
-
// 'should call onChange callback twice',
|
|
76
|
-
// );
|
|
77
|
-
// assert.strictEqual(
|
|
78
|
-
// handleChange.calledWith(
|
|
79
|
-
// 'from',
|
|
80
|
-
// moment()
|
|
81
|
-
// .subtract(1, 'month')
|
|
82
|
-
// .startOf('month')
|
|
83
|
-
// .toDate(),
|
|
84
|
-
// ),
|
|
85
|
-
// true,
|
|
86
|
-
// 'should call onChange callback once',
|
|
87
|
-
// );
|
|
88
|
-
// assert.strictEqual(
|
|
89
|
-
// handleChange.calledWith(
|
|
90
|
-
// 'to',
|
|
91
|
-
// moment()
|
|
92
|
-
// .subtract(1, 'month')
|
|
93
|
-
// .endOf('month')
|
|
94
|
-
// .toDate(),
|
|
95
|
-
// ),
|
|
96
|
-
// true,
|
|
97
|
-
// 'should call onChange callback once',
|
|
98
|
-
// );
|
|
99
|
-
// });
|
|
100
|
-
//
|
|
101
|
-
// it('should ignore unknown options', () => {
|
|
102
|
-
// const handleChange = spy();
|
|
103
|
-
//
|
|
104
|
-
// moment.updateLocale('en', { week: { dow: 1 } });
|
|
105
|
-
//
|
|
106
|
-
// const wrapper = shallow(
|
|
107
|
-
// <HiDateRangeSelector
|
|
108
|
-
// idSelect="idSelect"
|
|
109
|
-
// idRange="idRange"
|
|
110
|
-
// labelFrom={'Start'}
|
|
111
|
-
// labelTo={'End'}
|
|
112
|
-
// onChange={handleChange}
|
|
113
|
-
// availableOptionKeys={['unknown']}
|
|
114
|
-
// />,
|
|
115
|
-
// );
|
|
116
|
-
//
|
|
117
|
-
// wrapper
|
|
118
|
-
// .find(HiSelectField)
|
|
119
|
-
// .dive()
|
|
120
|
-
// .childAt(0)
|
|
121
|
-
// .props()
|
|
122
|
-
// .onChange('selectedPreset', 'pm');
|
|
123
|
-
//
|
|
124
|
-
// // OnChange is call twice because it set from and to date
|
|
125
|
-
// assert.strictEqual(handleChange.callCount, 0, 'should not call onChange callback');
|
|
126
|
-
// });
|
|
127
|
-
// });
|
|
128
|
-
//
|
|
129
|
-
// describe('mount', () => {
|
|
130
|
-
// let clock;
|
|
131
|
-
//
|
|
132
|
-
// before(() => {
|
|
133
|
-
// clock = useFakeTimers();
|
|
134
|
-
// });
|
|
135
|
-
//
|
|
136
|
-
// after(() => {
|
|
137
|
-
// clock.restore();
|
|
138
|
-
// });
|
|
139
|
-
//
|
|
140
|
-
// it('should mount', () => {
|
|
141
|
-
// const handleChange = spy();
|
|
142
|
-
// const handleReset = spy();
|
|
143
|
-
// const wrapper = mount(
|
|
144
|
-
// <HiDateRangeSelector
|
|
145
|
-
// idSelect="idSelect"
|
|
146
|
-
// idRange="idRange"
|
|
147
|
-
// label={'Order date'}
|
|
148
|
-
// onChange={handleChange}
|
|
149
|
-
// />,
|
|
150
|
-
// );
|
|
151
|
-
//
|
|
152
|
-
// assert.strictEqual(
|
|
153
|
-
// wrapper.find(HiSelectField).length,
|
|
154
|
-
// 1,
|
|
155
|
-
// 'should render a HiSelectField',
|
|
156
|
-
// );
|
|
157
|
-
// assert.strictEqual(
|
|
158
|
-
// wrapper.find(HiDateRangePicker).length,
|
|
159
|
-
// 1,
|
|
160
|
-
// 'should render a DateRangePicker',
|
|
161
|
-
// );
|
|
162
|
-
//
|
|
163
|
-
// wrapper
|
|
164
|
-
// .find(HiSelectField)
|
|
165
|
-
// .props()
|
|
166
|
-
// .onChange('selectedPreset', 'pm');
|
|
167
|
-
//
|
|
168
|
-
// // OnChange is call twice because it set from and to date
|
|
169
|
-
// assert.strictEqual(
|
|
170
|
-
// handleChange.calledTwice,
|
|
171
|
-
// true,
|
|
172
|
-
// 'should call onChange callback twice',
|
|
173
|
-
// );
|
|
174
|
-
//
|
|
175
|
-
// wrapper
|
|
176
|
-
// .find(HiSelectField)
|
|
177
|
-
// .props()
|
|
178
|
-
// .onChange('selectedPreset', 'custom');
|
|
179
|
-
//
|
|
180
|
-
// assert.strictEqual(handleChange.calledTwice, true, 'should not call onChange callback');
|
|
181
|
-
//
|
|
182
|
-
// wrapper
|
|
183
|
-
// .find(HiInput)
|
|
184
|
-
// .at(0)
|
|
185
|
-
// .props()
|
|
186
|
-
// .onReset();
|
|
187
|
-
//
|
|
188
|
-
// assert.strictEqual(handleReset.callCount, 0);
|
|
189
|
-
// clock.tick(1);
|
|
190
|
-
// assert.strictEqual(handleChange.callCount, 3);
|
|
191
|
-
// });
|
|
192
|
-
// });
|
|
193
|
-
});
|
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { assert } from 'chai';
|
|
3
|
-
import { spy } from 'sinon';
|
|
4
|
-
import MenuList from '@material-ui/core/MenuList';
|
|
5
|
-
import MenuItem from '@material-ui/core/MenuItem';
|
|
6
|
-
import { createShallow, createMount } from '../test-utils/index';
|
|
7
|
-
import ListPicker from './ListPicker';
|
|
8
|
-
describe('<ListPicker />', function () {
|
|
9
|
-
var shallow;
|
|
10
|
-
var mount;
|
|
11
|
-
var itemList;
|
|
12
|
-
before(function () {
|
|
13
|
-
shallow = createShallow({
|
|
14
|
-
dive: true
|
|
15
|
-
});
|
|
16
|
-
itemList = [1, 2, 3, 4];
|
|
17
|
-
});
|
|
18
|
-
beforeEach(function () {
|
|
19
|
-
mount = createMount();
|
|
20
|
-
});
|
|
21
|
-
afterEach(function () {
|
|
22
|
-
mount.cleanUp();
|
|
23
|
-
});
|
|
24
|
-
describe('shallow', function () {
|
|
25
|
-
it('renders a Scrollable MenuList', function () {
|
|
26
|
-
var handlerClick = spy();
|
|
27
|
-
var wrapper = shallow(React.createElement(ListPicker, {
|
|
28
|
-
itemList: itemList,
|
|
29
|
-
onItemClick: handlerClick,
|
|
30
|
-
selectedItem: 2,
|
|
31
|
-
initAtMiddleScroll: true
|
|
32
|
-
}));
|
|
33
|
-
assert.strictEqual(wrapper.name(), 'Scrollbars', 'should render a Scrollbars container');
|
|
34
|
-
assert.strictEqual(wrapper.dive().find(MenuList).length, 1, 'should include a MenuList');
|
|
35
|
-
assert.strictEqual(wrapper.dive().find(MenuItem).length, 4, 'should include 4 MenuItem'); // Click on [4] item
|
|
36
|
-
|
|
37
|
-
wrapper.dive().find(MenuItem).at(3).props().onClick();
|
|
38
|
-
assert.strictEqual(handlerClick.calledOnce, true, 'should call onChange callback once');
|
|
39
|
-
assert.strictEqual(handlerClick.calledWith(4), true, 'should call onChange callback with selected item');
|
|
40
|
-
});
|
|
41
|
-
});
|
|
42
|
-
describe('mount', function () {
|
|
43
|
-
it('should mount', function () {
|
|
44
|
-
var wrapper = mount(React.createElement(ListPicker, {
|
|
45
|
-
itemList: itemList,
|
|
46
|
-
onItemClick: function onItemClick() {},
|
|
47
|
-
selectedItem: 2,
|
|
48
|
-
initAtMiddleScroll: true
|
|
49
|
-
}));
|
|
50
|
-
assert.strictEqual(wrapper.name(), 'WithStyles(ListPicker)');
|
|
51
|
-
});
|
|
52
|
-
});
|
|
53
|
-
});
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { assert } from 'chai';
|
|
3
|
-
import { spy } from 'sinon';
|
|
4
|
-
import MomentLocaleUtils from 'react-day-picker/moment';
|
|
5
|
-
import IconButton from '@material-ui/core/IconButton';
|
|
6
|
-
import { createShallow } from '../test-utils/index';
|
|
7
|
-
import NavBar from './NavBar';
|
|
8
|
-
describe('<NavBar />', function () {
|
|
9
|
-
var shallow;
|
|
10
|
-
before(function () {
|
|
11
|
-
shallow = createShallow({
|
|
12
|
-
dive: true
|
|
13
|
-
});
|
|
14
|
-
});
|
|
15
|
-
it('renders a Scrollable MenuList', function () {
|
|
16
|
-
var handlerNextClick = spy();
|
|
17
|
-
var handlerPreviousClick = spy();
|
|
18
|
-
var handlerClockClick = spy();
|
|
19
|
-
var nextMonth = new Date(2018, 3, 1);
|
|
20
|
-
var prevMonth = new Date(2018, 1, 1);
|
|
21
|
-
var wrapper = shallow(React.createElement(NavBar, {
|
|
22
|
-
nextMonth: nextMonth,
|
|
23
|
-
previousMonth: prevMonth,
|
|
24
|
-
onNextClick: handlerNextClick,
|
|
25
|
-
onPreviousClick: handlerPreviousClick,
|
|
26
|
-
onClockClick: handlerClockClick,
|
|
27
|
-
showClockButton: true,
|
|
28
|
-
localeUtils: MomentLocaleUtils
|
|
29
|
-
}));
|
|
30
|
-
assert.strictEqual(wrapper.find(IconButton).length, 3, 'should include 3 IconButtons'); // Click on [4] item
|
|
31
|
-
|
|
32
|
-
wrapper.find(IconButton).at(0).props().onClick();
|
|
33
|
-
wrapper.find(IconButton).at(1).props().onClick();
|
|
34
|
-
wrapper.find(IconButton).at(2).props().onClick();
|
|
35
|
-
assert.strictEqual(handlerPreviousClick.calledOnce, true, 'should call onPreviousClick callback once');
|
|
36
|
-
assert.strictEqual(handlerNextClick.calledOnce, true, 'should call onNextClick callback once');
|
|
37
|
-
assert.strictEqual(handlerClockClick.calledOnce, true, 'should call onClockClick callback once');
|
|
38
|
-
});
|
|
39
|
-
});
|
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
/* eslint-disable */
|
|
2
|
-
import React from 'react';
|
|
3
|
-
import { assert } from 'chai';
|
|
4
|
-
import { spy } from 'sinon';
|
|
5
|
-
import MomentLocaleUtils from 'react-day-picker/moment';
|
|
6
|
-
import { createShallow } from '../../test-utils/index';
|
|
7
|
-
import MonthPickerOverlay from './MonthPickerOverlay';
|
|
8
|
-
import ListPicker from '../ListPicker';
|
|
9
|
-
describe('<MonthPickerOverlay />', function () {
|
|
10
|
-
var shallow;
|
|
11
|
-
before(function () {
|
|
12
|
-
shallow = createShallow({
|
|
13
|
-
dive: true
|
|
14
|
-
});
|
|
15
|
-
});
|
|
16
|
-
it('renders a functional month ListPicker', function () {
|
|
17
|
-
var handlerChange = spy();
|
|
18
|
-
var aprilLabel = 'April';
|
|
19
|
-
var januaryDate = new Date(1992, 0, 9);
|
|
20
|
-
var aprilDate = new Date(1992, 3, 9);
|
|
21
|
-
var wrapper = shallow(React.createElement(MonthPickerOverlay, {
|
|
22
|
-
value: januaryDate,
|
|
23
|
-
onChange: handlerChange,
|
|
24
|
-
localeUtils: MomentLocaleUtils
|
|
25
|
-
}, React.createElement("span", null, "children")));
|
|
26
|
-
assert.strictEqual(wrapper.name(), 'CustomOverlayLayoutWithoutFooter', 'should render a CustomOverlayLayoutWithoutFooter');
|
|
27
|
-
assert.strictEqual(wrapper.dive().find(ListPicker).length, 1, 'should include a ListPicker');
|
|
28
|
-
wrapper.dive().find(ListPicker).props().onItemClick(aprilLabel);
|
|
29
|
-
assert.strictEqual(handlerChange.calledOnce, true, 'should call onChange callback once');
|
|
30
|
-
assert.strictEqual(handlerChange.calledWith(aprilDate), true, 'should call onChange callback with updated month');
|
|
31
|
-
});
|
|
32
|
-
it('check months', function () {
|
|
33
|
-
var handlerChange = spy();
|
|
34
|
-
var januaryDate = new Date(1992, 0, 9);
|
|
35
|
-
var localeUtils = {
|
|
36
|
-
getMonths: function getMonths() {
|
|
37
|
-
return ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December', 'Other'];
|
|
38
|
-
}
|
|
39
|
-
};
|
|
40
|
-
var wrapper = shallow(React.createElement(MonthPickerOverlay, {
|
|
41
|
-
value: januaryDate,
|
|
42
|
-
onChange: handlerChange,
|
|
43
|
-
localeUtils: localeUtils
|
|
44
|
-
}, React.createElement("span", null, "children")));
|
|
45
|
-
assert.strictEqual(wrapper.name(), 'CustomOverlayLayoutWithoutFooter', 'should render a CustomOverlayLayoutWithoutFooter');
|
|
46
|
-
assert.strictEqual(wrapper.dive().find(ListPicker).length, 1, 'should include a ListPicker');
|
|
47
|
-
wrapper.dive().find(ListPicker).props().onItemClick('Other');
|
|
48
|
-
assert.strictEqual(handlerChange.callCount, 0, 'should not call onChange with month index >= 12');
|
|
49
|
-
});
|
|
50
|
-
});
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
/* eslint-disable */
|
|
2
|
-
import React from 'react';
|
|
3
|
-
import { assert } from 'chai';
|
|
4
|
-
import { createShallow, getClasses } from '../../test-utils/index';
|
|
5
|
-
import Overlay from './Overlay';
|
|
6
|
-
describe('<Overlay />', function () {
|
|
7
|
-
var shallow;
|
|
8
|
-
var classes;
|
|
9
|
-
before(function () {
|
|
10
|
-
shallow = createShallow({
|
|
11
|
-
dive: true
|
|
12
|
-
});
|
|
13
|
-
classes = getClasses(React.createElement(Overlay, null));
|
|
14
|
-
});
|
|
15
|
-
it('renders a div containing a DayPickerInput', function () {
|
|
16
|
-
var wrapper = shallow(React.createElement(Overlay, null, React.createElement("span", null, "children")));
|
|
17
|
-
assert.strictEqual(wrapper.dive().name(), 'Paper', 'should render a Paper');
|
|
18
|
-
assert.strictEqual(wrapper.dive().hasClass(classes.paper), true, 'should render a Paper with paper class');
|
|
19
|
-
});
|
|
20
|
-
});
|
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
/* eslint-disable */
|
|
2
|
-
import React from 'react';
|
|
3
|
-
import { assert } from 'chai';
|
|
4
|
-
import { spy } from 'sinon';
|
|
5
|
-
import { createShallow } from '../../test-utils/index';
|
|
6
|
-
import TimePickerOverlay from './TimePickerOverlay';
|
|
7
|
-
import ListPicker from '../ListPicker';
|
|
8
|
-
describe('<TimePickerOverlay />', function () {
|
|
9
|
-
var shallow;
|
|
10
|
-
before(function () {
|
|
11
|
-
shallow = createShallow({
|
|
12
|
-
dive: true
|
|
13
|
-
});
|
|
14
|
-
});
|
|
15
|
-
it('renders a functional hour & minute ListPicker', function () {
|
|
16
|
-
var handlerChange = spy();
|
|
17
|
-
var handlerCalendarClick = spy();
|
|
18
|
-
var hour = 16;
|
|
19
|
-
var minute = 17;
|
|
20
|
-
var date = new Date(1992, 3, 9, 0, 0);
|
|
21
|
-
var dateHour = new Date(1992, 3, 9, hour, 0);
|
|
22
|
-
var dateMinute = new Date(1992, 3, 9, 0, minute);
|
|
23
|
-
var wrapper = shallow(React.createElement(TimePickerOverlay, {
|
|
24
|
-
value: date,
|
|
25
|
-
onChange: handlerChange,
|
|
26
|
-
onCalendarClick: handlerCalendarClick
|
|
27
|
-
}, React.createElement("span", null, "children")));
|
|
28
|
-
assert.strictEqual(wrapper.dive().name(), 'CustomOverlayLayout', 'should render a CustomOverlayLayout');
|
|
29
|
-
assert.strictEqual(wrapper.dive().find(ListPicker).length, 2, 'should include 2 ListPicker');
|
|
30
|
-
wrapper.dive().find(ListPicker).first().props().onItemClick(hour);
|
|
31
|
-
wrapper.dive().find(ListPicker).at(1).props().onItemClick(minute);
|
|
32
|
-
assert.strictEqual(handlerChange.calledTwice, true, 'should call onChange callback twice');
|
|
33
|
-
assert.strictEqual(handlerChange.calledWith(dateHour), true, 'should call onChange callback with updated hours');
|
|
34
|
-
assert.strictEqual(handlerChange.calledWith(dateMinute), true, 'should call onChange callback with updated minutes');
|
|
35
|
-
});
|
|
36
|
-
it('renders a functional hour & minute ListPicker without callbacks', function () {
|
|
37
|
-
var hour = 16;
|
|
38
|
-
var minute = 17;
|
|
39
|
-
var date = new Date(1992, 3, 9, 0, 0);
|
|
40
|
-
var wrapper = shallow(React.createElement(TimePickerOverlay, {
|
|
41
|
-
value: date
|
|
42
|
-
}, React.createElement("span", null, "children")));
|
|
43
|
-
assert.strictEqual(wrapper.dive().name(), 'CustomOverlayLayout', 'should render a CustomOverlayLayout');
|
|
44
|
-
assert.strictEqual(wrapper.dive().find(ListPicker).length, 2, 'should include 2 ListPicker');
|
|
45
|
-
wrapper.dive().find(ListPicker).first().props().onItemClick(hour);
|
|
46
|
-
wrapper.dive().find(ListPicker).at(1).props().onItemClick(minute);
|
|
47
|
-
});
|
|
48
|
-
});
|
|
@@ -1,79 +0,0 @@
|
|
|
1
|
-
/* eslint-disable */
|
|
2
|
-
import React from 'react';
|
|
3
|
-
import { assert } from 'chai';
|
|
4
|
-
import { spy } from 'sinon';
|
|
5
|
-
import { createShallow } from '../../test-utils/index';
|
|
6
|
-
import YearPickerOverlay from './YearPickerOverlay';
|
|
7
|
-
import ListPicker from '../ListPicker';
|
|
8
|
-
describe('<YearPickerOverlay />', function () {
|
|
9
|
-
var shallow;
|
|
10
|
-
before(function () {
|
|
11
|
-
shallow = createShallow({
|
|
12
|
-
dive: true
|
|
13
|
-
});
|
|
14
|
-
});
|
|
15
|
-
it('renders a functional year ListPicker', function () {
|
|
16
|
-
var handlerChange = spy();
|
|
17
|
-
var date = new Date(2018, 3, 9);
|
|
18
|
-
var dateUpYear = new Date(2022, 3, 9);
|
|
19
|
-
var dateDownYear = new Date(2014, 3, 9);
|
|
20
|
-
var wrapper = shallow(React.createElement(YearPickerOverlay, {
|
|
21
|
-
value: date,
|
|
22
|
-
onChange: handlerChange
|
|
23
|
-
}, React.createElement("span", null, "children")));
|
|
24
|
-
assert.strictEqual(wrapper.name(), 'CustomOverlayLayoutWithoutFooter', 'should render a CustomOverlayLayoutWithoutFooter');
|
|
25
|
-
assert.strictEqual(wrapper.dive().find(ListPicker).length, 1, 'should include 1 ListPicker'); // From 2013 to 2018 + 10
|
|
26
|
-
|
|
27
|
-
assert.strictEqual(wrapper.dive().find(ListPicker).props().itemList.length, 16, 'should include 1 ListPicker with 16 items');
|
|
28
|
-
wrapper.dive().find(ListPicker).props().onItemClick(2022);
|
|
29
|
-
assert.strictEqual(handlerChange.calledOnce, true, 'should call onChange callback once');
|
|
30
|
-
assert.strictEqual(handlerChange.calledWith(dateUpYear), true, 'should call onChange callback with updated year');
|
|
31
|
-
wrapper.dive().find(ListPicker).props().onItemClick(2014);
|
|
32
|
-
assert.strictEqual(handlerChange.calledTwice, true, 'should call onChange callback twice');
|
|
33
|
-
assert.strictEqual(handlerChange.calledWith(dateDownYear), true, 'should call onChange callback with updated year');
|
|
34
|
-
});
|
|
35
|
-
it('renders a functional year ListPicker with defaut date', function () {
|
|
36
|
-
var handlerChange = spy();
|
|
37
|
-
var wrapper = shallow(React.createElement(YearPickerOverlay, {
|
|
38
|
-
onChange: handlerChange
|
|
39
|
-
}, React.createElement("span", null, "children")));
|
|
40
|
-
assert.strictEqual(wrapper.name(), 'CustomOverlayLayoutWithoutFooter', 'should render a CustomOverlayLayoutWithoutFooter');
|
|
41
|
-
assert.strictEqual(wrapper.dive().find(ListPicker).length, 1, 'should include 1 ListPicker'); // From 2013 to 2018 + 10
|
|
42
|
-
|
|
43
|
-
assert.strictEqual(wrapper.dive().find(ListPicker).props().itemList.length, 16, 'should include 1 ListPicker with 16 items');
|
|
44
|
-
wrapper.dive().find(ListPicker).props().onItemClick(2022);
|
|
45
|
-
assert.strictEqual(handlerChange.calledOnce, true, 'should call onChange callback once');
|
|
46
|
-
assert.strictEqual(handlerChange.args[0][0].getFullYear(), 2022, 'should call onChange callback with updated year');
|
|
47
|
-
});
|
|
48
|
-
it('renders a functional year ListPicker without callbacks', function () {
|
|
49
|
-
var date = new Date(2018, 3, 9);
|
|
50
|
-
var wrapper = shallow(React.createElement(YearPickerOverlay, {
|
|
51
|
-
value: date
|
|
52
|
-
}, React.createElement("span", null, "children")));
|
|
53
|
-
assert.strictEqual(wrapper.name(), 'CustomOverlayLayoutWithoutFooter', 'should render a CustomOverlayLayoutWithoutFooter');
|
|
54
|
-
assert.strictEqual(wrapper.dive().find(ListPicker).length, 1, 'should include 1 ListPicker'); // From 2013 to 2018 + 10
|
|
55
|
-
|
|
56
|
-
assert.strictEqual(wrapper.dive().find(ListPicker).props().itemList.length, 16, 'should include 1 ListPicker with 16 items');
|
|
57
|
-
wrapper.dive().find(ListPicker).props().onItemClick(2022);
|
|
58
|
-
});
|
|
59
|
-
it('renders a functional year ListPicker with disabled past date', function () {
|
|
60
|
-
var handlerChange = spy();
|
|
61
|
-
var wrapper = shallow(React.createElement(YearPickerOverlay, {
|
|
62
|
-
onChange: handlerChange,
|
|
63
|
-
disablePastDays: true
|
|
64
|
-
}, React.createElement("span", null, "children")));
|
|
65
|
-
assert.strictEqual(wrapper.name(), 'CustomOverlayLayoutWithoutFooter', 'should render a CustomOverlayLayoutWithoutFooter');
|
|
66
|
-
assert.strictEqual(wrapper.dive().find(ListPicker).length, 1, 'should include 1 ListPicker'); // 2018 + 10 (disabled past days)
|
|
67
|
-
|
|
68
|
-
assert.strictEqual(wrapper.dive().find(ListPicker).props().itemList.length, 11, 'should include 1 ListPicker with 11 items');
|
|
69
|
-
});
|
|
70
|
-
it('renders a functional year ListPicker with disabled future date', function () {
|
|
71
|
-
var wrapper = shallow(React.createElement(YearPickerOverlay, {
|
|
72
|
-
disableFutureDays: true
|
|
73
|
-
}, React.createElement("span", null, "children")));
|
|
74
|
-
assert.strictEqual(wrapper.name(), 'CustomOverlayLayoutWithoutFooter', 'should render a CustomOverlayLayoutWithoutFooter');
|
|
75
|
-
assert.strictEqual(wrapper.dive().find(ListPicker).length, 1, 'should include 1 ListPicker'); // From 2013 to 2018 (disabled future days)
|
|
76
|
-
|
|
77
|
-
assert.strictEqual(wrapper.dive().find(ListPicker).props().itemList.length, 6, 'should include 1 ListPicker with 11 items');
|
|
78
|
-
});
|
|
79
|
-
});
|
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
import { assert } from 'chai';
|
|
2
|
-
import localeUtils from './hiLocaleUtils';
|
|
3
|
-
describe('HiDatePicker/HiLocaleUtils.js', function () {
|
|
4
|
-
describe('formatLocale', function () {
|
|
5
|
-
it('should work', function () {
|
|
6
|
-
assert.strictEqual(localeUtils.formatLocale('fr_FR'), 'fr_FR');
|
|
7
|
-
});
|
|
8
|
-
});
|
|
9
|
-
describe('formatDay', function () {
|
|
10
|
-
it('should work', function () {
|
|
11
|
-
var d = new Date('2018-11-23');
|
|
12
|
-
assert.strictEqual(localeUtils.formatDay(d), 'Friday, 23 November 2018');
|
|
13
|
-
assert.strictEqual(localeUtils.formatDay(d, 'fr_FR'), 'Vendredi, 23 Novembre 2018');
|
|
14
|
-
});
|
|
15
|
-
});
|
|
16
|
-
describe('formatMonthTitle', function () {
|
|
17
|
-
it('should work', function () {
|
|
18
|
-
var d = new Date('2018-11-23');
|
|
19
|
-
assert.strictEqual(localeUtils.formatMonthTitle(d), 'November 2018');
|
|
20
|
-
assert.strictEqual(localeUtils.formatMonthTitle(d, 'fr_FR'), 'Novembre 2018');
|
|
21
|
-
});
|
|
22
|
-
});
|
|
23
|
-
describe('formatWeekdayShort', function () {
|
|
24
|
-
it('should work', function () {
|
|
25
|
-
assert.strictEqual(localeUtils.formatWeekdayShort(0), 'Su');
|
|
26
|
-
assert.strictEqual(localeUtils.formatWeekdayShort(0, 'fr_FR'), 'Di');
|
|
27
|
-
});
|
|
28
|
-
});
|
|
29
|
-
describe('formatWeekdayLong', function () {
|
|
30
|
-
it('should work', function () {
|
|
31
|
-
assert.strictEqual(localeUtils.formatWeekdayLong(0), 'Sunday');
|
|
32
|
-
assert.strictEqual(localeUtils.formatWeekdayLong(0, 'fr_FR'), 'Dimanche');
|
|
33
|
-
});
|
|
34
|
-
});
|
|
35
|
-
describe('getFirstDayOfWeek', function () {
|
|
36
|
-
it('should work', function () {
|
|
37
|
-
assert.strictEqual(localeUtils.getFirstDayOfWeek(), 0);
|
|
38
|
-
assert.strictEqual(localeUtils.getFirstDayOfWeek('fr_FR'), 1);
|
|
39
|
-
});
|
|
40
|
-
});
|
|
41
|
-
describe('getMonths', function () {
|
|
42
|
-
it('should work', function () {
|
|
43
|
-
var actualJSONUS = JSON.stringify(localeUtils.getMonths());
|
|
44
|
-
var expectedJSONUS = JSON.stringify(['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December']);
|
|
45
|
-
assert.strictEqual(actualJSONUS, expectedJSONUS);
|
|
46
|
-
var actualJSONFR = JSON.stringify(localeUtils.getMonths('fr_FR'));
|
|
47
|
-
var expectedJSONFR = JSON.stringify(['Janvier', 'Février', 'Mars', 'Avril', 'Mai', 'Juin', 'Juillet', 'Août', 'Septembre', 'Octobre', 'Novembre', 'Décembre']);
|
|
48
|
-
assert.strictEqual(actualJSONFR, expectedJSONFR);
|
|
49
|
-
});
|
|
50
|
-
});
|
|
51
|
-
});
|
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { assert } from 'chai';
|
|
3
|
-
import { createShallow } from '../test-utils';
|
|
4
|
-
import HiDot from './HiDot';
|
|
5
|
-
import HiIcon from '../HiIcon';
|
|
6
|
-
describe('<HiDot />', function () {
|
|
7
|
-
var shallow;
|
|
8
|
-
before(function () {
|
|
9
|
-
shallow = createShallow();
|
|
10
|
-
});
|
|
11
|
-
describe('<HiDot />', function () {
|
|
12
|
-
it('should have its props correctly received', function () {
|
|
13
|
-
var wrapper = shallow(React.createElement(HiDot, {
|
|
14
|
-
active: true
|
|
15
|
-
}));
|
|
16
|
-
assert.strictEqual(wrapper.prop('active'), true);
|
|
17
|
-
});
|
|
18
|
-
it('should have good color applied : validated status', function () {
|
|
19
|
-
var wrapper = shallow(React.createElement(HiDot, {
|
|
20
|
-
status: "validated"
|
|
21
|
-
}));
|
|
22
|
-
assert.strictEqual(wrapper.dive().dive().props().color, 'positive');
|
|
23
|
-
});
|
|
24
|
-
it('should have good color applied : refused status', function () {
|
|
25
|
-
var wrapper = shallow(React.createElement(HiDot, {
|
|
26
|
-
status: "refused"
|
|
27
|
-
}));
|
|
28
|
-
assert.strictEqual(wrapper.dive().dive().props().color, 'negative');
|
|
29
|
-
});
|
|
30
|
-
it('should have good color applied : no status', function () {
|
|
31
|
-
var wrapper = shallow(React.createElement(HiDot, null));
|
|
32
|
-
assert.strictEqual(wrapper.dive().dive().props().color, 'default');
|
|
33
|
-
});
|
|
34
|
-
it('should have good size applied : active dot', function () {
|
|
35
|
-
var wrapper = shallow(React.createElement(HiDot, {
|
|
36
|
-
active: true
|
|
37
|
-
}));
|
|
38
|
-
assert.strictEqual(wrapper.dive().find(HiIcon).props().size, 24);
|
|
39
|
-
});
|
|
40
|
-
it('should have good size applied : default dot', function () {
|
|
41
|
-
var wrapper = shallow(React.createElement(HiDot, null));
|
|
42
|
-
assert.strictEqual(wrapper.dive().find(HiIcon).props().size, 12);
|
|
43
|
-
});
|
|
44
|
-
it('should have good icon applied : active dot', function () {
|
|
45
|
-
var wrapper = shallow(React.createElement(HiDot, {
|
|
46
|
-
active: true
|
|
47
|
-
}));
|
|
48
|
-
assert.strictEqual(wrapper.dive().find(HiIcon).props().children, 'radio_button_checked');
|
|
49
|
-
});
|
|
50
|
-
it('should have good icon applied : default dot', function () {
|
|
51
|
-
var wrapper = shallow(React.createElement(HiDot, null));
|
|
52
|
-
assert.strictEqual(wrapper.dive().find(HiIcon).props().children, 'lens');
|
|
53
|
-
});
|
|
54
|
-
});
|
|
55
|
-
});
|