@hipay/hipay-material-ui 4.0.1-beta5 → 4.1.0
Sign up to get free protection for your applications and to get access to all the features.
- package/HiAccordion/HiAccordion.js +8 -26
- package/HiAccordion/index.js +1 -5
- package/HiAccordionActions/HiAccordionActions.js +1 -14
- package/HiAccordionActions/index.js +1 -5
- package/HiAccordionSummary/HiAccordionSummary.js +1 -15
- package/HiAccordionSummary/index.js +1 -5
- package/HiAlertModal/HiAlertModal.js +7 -22
- package/HiAlertModal/index.js +1 -5
- package/HiAppBar/HiAppBar.js +17 -51
- package/HiAppBar/index.js +0 -2
- package/HiAvatar/HiAvatar.js +3 -12
- package/HiAvatar/index.js +0 -2
- package/HiBadge/HiBadge.js +8 -24
- package/HiBadge/index.js +0 -2
- package/HiBreadcrumb/HiBreadcrumb.js +12 -38
- package/HiBreadcrumb/HiStep.js +19 -53
- package/HiBreadcrumb/HiStepConnector.js +20 -59
- package/HiBreadcrumb/HiStepContent.js +12 -38
- package/HiBreadcrumb/HiStepIcon.js +16 -43
- package/HiBreadcrumb/HiStepLabel.js +20 -52
- package/HiBreadcrumb/HiStepper.js +12 -38
- package/HiBreadcrumb/index.js +0 -2
- package/HiButton/HiButton.js +8 -33
- package/HiButton/index.js +1 -5
- package/HiCell/CellAddress.js +18 -41
- package/HiCell/CellDate.js +16 -44
- package/HiCell/CellHiddenContent.js +8 -30
- package/HiCell/CellIcon.js +18 -44
- package/HiCell/CellImage.js +18 -42
- package/HiCell/CellNumeric.js +19 -48
- package/HiCell/CellPinToAction.js +15 -41
- package/HiCell/CellRate.js +19 -55
- package/HiCell/CellSentinel.js +18 -41
- package/HiCell/CellSentinelScore.js +15 -39
- package/HiCell/CellText.js +23 -62
- package/HiCell/CellTextStyled.js +13 -24
- package/HiCell/index.js +0 -10
- package/HiCheckbox/HiCheckbox.js +21 -61
- package/HiCheckbox/index.js +0 -2
- package/HiChip/HiChip.js +24 -47
- package/HiChip/HiChipSwitch.js +25 -71
- package/HiChip/index.js +0 -3
- package/HiColoredLabel/HiColoredLabel.js +15 -49
- package/HiColoredLabel/index.js +0 -2
- package/HiDatePicker/Caption.js +9 -21
- package/HiDatePicker/HiDatePicker.js +22 -96
- package/HiDatePicker/HiDatePickerMobile.js +24 -51
- package/HiDatePicker/HiDateRangePicker.js +44 -142
- package/HiDatePicker/HiDateRangeSelector.js +55 -138
- package/HiDatePicker/ListPicker.js +14 -46
- package/HiDatePicker/NavBar.js +12 -31
- package/HiDatePicker/Overlays/CustomOverlayLayout.js +11 -28
- package/HiDatePicker/Overlays/CustomOverlayLayoutWithoutFooter.js +11 -28
- package/HiDatePicker/Overlays/MonthPickerOverlay.js +11 -36
- package/HiDatePicker/Overlays/Overlay.js +8 -25
- package/HiDatePicker/Overlays/TimePickerOverlay.js +16 -50
- package/HiDatePicker/Overlays/YearPickerOverlay.js +15 -42
- package/HiDatePicker/Overlays/index.js +0 -6
- package/HiDatePicker/Weekday.js +4 -9
- package/HiDatePicker/hiLocaleUtils.js +8 -20
- package/HiDatePicker/index.js +0 -2
- package/HiDatePicker/stylesheet.js +6 -13
- package/HiDialog/HiDialog.js +7 -19
- package/HiDialog/index.js +0 -2
- package/HiDotsStepper/HiDot.js +14 -45
- package/HiDotsStepper/HiDotsStepper.js +18 -48
- package/HiDotsStepper/index.js +0 -3
- package/HiExpansionPanel/HiExpansionPanel.js +16 -38
- package/HiExpansionPanel/index.js +1 -5
- package/HiForm/HiAddressField.js +20 -49
- package/HiForm/HiEmailField.js +11 -38
- package/HiForm/HiFormControl.js +37 -86
- package/HiForm/HiFormLabel.js +20 -48
- package/HiForm/HiInput.js +47 -109
- package/HiForm/HiPasswordField.js +18 -57
- package/HiForm/HiSearchField.js +12 -46
- package/HiForm/HiSlider.js +28 -65
- package/HiForm/HiTextField.js +30 -58
- package/HiForm/HiUpload.js +35 -97
- package/HiForm/HiUploadField.js +16 -40
- package/HiForm/HiUploadInput.js +27 -84
- package/HiForm/index.js +0 -12
- package/HiIcon/HiIcon.js +9 -34
- package/HiIcon/index.js +0 -2
- package/HiIconButton/HiIconButton.js +6 -21
- package/HiIconButton/index.js +0 -2
- package/HiListItemLink/HiListItemLink.js +6 -19
- package/HiListItemLink/index.js +0 -2
- package/HiLoader/HiLoader.js +6 -16
- package/HiLoader/index.js +0 -2
- package/HiNotice/HiKPI.js +23 -57
- package/HiNotice/HiKPINotice.js +6 -16
- package/HiNotice/index.js +0 -3
- package/HiPagination/HiPagination.js +1 -11
- package/HiPagination/index.js +0 -2
- package/HiPaymentMeans/HiPaymentMeans.js +31 -72
- package/HiPaymentMeans/index.js +0 -2
- package/HiPdfReader/HiPdfReader.js +29 -64
- package/HiPdfReader/index.js +0 -2
- package/HiPin/HiPin.js +7 -19
- package/HiPin/index.js +0 -2
- package/HiRadio/HiRadio.js +11 -22
- package/HiRadio/index.js +0 -2
- package/HiScrollStepper/HiScrollStepper.js +29 -67
- package/HiScrollStepper/index.js +0 -2
- package/HiSelect/HiDynamicSelect.js +39 -52
- package/HiSelect/HiDynamicSelectField.js +29 -55
- package/HiSelect/HiNestedSelect.js +71 -120
- package/HiSelect/HiNestedSelectContent.js +65 -93
- package/HiSelect/HiNestedSelectField.js +29 -55
- package/HiSelect/HiSelect.js +95 -195
- package/HiSelect/HiSelectContent.js +72 -110
- package/HiSelect/HiSelectField.js +30 -56
- package/HiSelect/HiSelectInput.js +27 -84
- package/HiSelect/HiSelectMobile.js +13 -52
- package/HiSelect/HiSuggestSelect.js +30 -88
- package/HiSelect/HiSuggestSelectField.js +20 -46
- package/HiSelect/index.js +2 -14
- package/HiSelectableList/HiSelectableList.js +40 -98
- package/HiSelectableList/HiSelectableListHierarchic.js +40 -68
- package/HiSelectableList/HiSelectableListItem.js +45 -88
- package/HiSelectableList/index.js +0 -4
- package/HiStepper/DefaultIndicator.js +1 -10
- package/HiStepper/HiStep.js +18 -48
- package/HiStepper/HiStepper.js +2 -15
- package/HiStepper/index.js +0 -3
- package/HiSwitch/HiSwitch.js +9 -33
- package/HiSwitch/HiSwitchState.js +15 -32
- package/HiSwitch/index.js +0 -3
- package/HiTable/HiCellBuilder.js +15 -72
- package/HiTable/HiTable.js +20 -48
- package/HiTable/HiTableBody.js +12 -31
- package/HiTable/HiTableHeader.js +23 -58
- package/HiTable/HiTableRow.js +18 -55
- package/HiTable/constants.js +48 -98
- package/HiTable/index.js +0 -2
- package/es/HiAccordion/HiAccordion.js +8 -26
- package/es/HiAccordion/index.js +1 -5
- package/es/HiAccordionActions/HiAccordionActions.js +1 -14
- package/es/HiAccordionActions/index.js +1 -5
- package/es/HiAccordionSummary/HiAccordionSummary.js +1 -15
- package/es/HiAccordionSummary/index.js +1 -5
- package/es/HiAlertModal/HiAlertModal.js +7 -22
- package/es/HiAlertModal/index.js +1 -5
- package/es/HiAppBar/HiAppBar.js +17 -51
- package/es/HiAppBar/index.js +0 -2
- package/es/HiAvatar/HiAvatar.js +3 -12
- package/es/HiAvatar/index.js +0 -2
- package/es/HiBadge/HiBadge.js +8 -24
- package/es/HiBadge/index.js +0 -2
- package/es/HiBreadcrumb/HiBreadcrumb.js +12 -38
- package/es/HiBreadcrumb/HiStep.js +19 -53
- package/es/HiBreadcrumb/HiStepConnector.js +20 -59
- package/es/HiBreadcrumb/HiStepContent.js +12 -38
- package/es/HiBreadcrumb/HiStepIcon.js +16 -43
- package/es/HiBreadcrumb/HiStepLabel.js +20 -52
- package/es/HiBreadcrumb/HiStepper.js +12 -38
- package/es/HiBreadcrumb/index.js +0 -2
- package/es/HiButton/HiButton.js +8 -33
- package/es/HiButton/index.js +1 -5
- package/es/HiCell/CellAddress.js +18 -41
- package/es/HiCell/CellDate.js +16 -44
- package/es/HiCell/CellHiddenContent.js +8 -30
- package/es/HiCell/CellIcon.js +18 -44
- package/es/HiCell/CellImage.js +18 -42
- package/es/HiCell/CellNumeric.js +19 -48
- package/es/HiCell/CellPinToAction.js +15 -41
- package/es/HiCell/CellRate.js +19 -55
- package/es/HiCell/CellSentinel.js +18 -41
- package/es/HiCell/CellSentinelScore.js +15 -39
- package/es/HiCell/CellText.js +23 -62
- package/es/HiCell/CellTextStyled.js +13 -24
- package/es/HiCell/index.js +0 -10
- package/es/HiCheckbox/HiCheckbox.js +21 -61
- package/es/HiCheckbox/index.js +0 -2
- package/es/HiChip/HiChip.js +24 -47
- package/es/HiChip/HiChipSwitch.js +25 -71
- package/es/HiChip/index.js +0 -3
- package/es/HiColoredLabel/HiColoredLabel.js +15 -49
- package/es/HiColoredLabel/index.js +0 -2
- package/es/HiDatePicker/Caption.js +9 -21
- package/es/HiDatePicker/HiDatePicker.js +22 -96
- package/es/HiDatePicker/HiDatePickerMobile.js +24 -51
- package/es/HiDatePicker/HiDateRangePicker.js +44 -142
- package/es/HiDatePicker/HiDateRangeSelector.js +55 -138
- package/es/HiDatePicker/ListPicker.js +14 -46
- package/es/HiDatePicker/NavBar.js +12 -31
- package/es/HiDatePicker/Overlays/CustomOverlayLayout.js +11 -28
- package/es/HiDatePicker/Overlays/CustomOverlayLayoutWithoutFooter.js +11 -28
- package/es/HiDatePicker/Overlays/MonthPickerOverlay.js +11 -36
- package/es/HiDatePicker/Overlays/Overlay.js +8 -25
- package/es/HiDatePicker/Overlays/TimePickerOverlay.js +16 -50
- package/es/HiDatePicker/Overlays/YearPickerOverlay.js +15 -42
- package/es/HiDatePicker/Overlays/index.js +0 -6
- package/es/HiDatePicker/Weekday.js +4 -9
- package/es/HiDatePicker/hiLocaleUtils.js +8 -20
- package/es/HiDatePicker/index.js +0 -2
- package/es/HiDatePicker/stylesheet.js +6 -13
- package/es/HiDialog/HiDialog.js +7 -19
- package/es/HiDialog/index.js +0 -2
- package/es/HiDotsStepper/HiDot.js +14 -45
- package/es/HiDotsStepper/HiDotsStepper.js +18 -48
- package/es/HiDotsStepper/index.js +0 -3
- package/es/HiExpansionPanel/HiExpansionPanel.js +16 -38
- package/es/HiExpansionPanel/index.js +1 -5
- package/es/HiForm/HiAddressField.js +20 -49
- package/es/HiForm/HiEmailField.js +11 -38
- package/es/HiForm/HiFormControl.js +37 -86
- package/es/HiForm/HiFormLabel.js +20 -48
- package/es/HiForm/HiInput.js +47 -109
- package/es/HiForm/HiPasswordField.js +18 -57
- package/es/HiForm/HiSearchField.js +12 -46
- package/es/HiForm/HiSlider.js +28 -65
- package/es/HiForm/HiTextField.js +30 -58
- package/es/HiForm/HiUpload.js +35 -97
- package/es/HiForm/HiUploadField.js +16 -40
- package/es/HiForm/HiUploadInput.js +27 -84
- package/es/HiForm/index.js +0 -12
- package/es/HiIcon/HiIcon.js +9 -34
- package/es/HiIcon/index.js +0 -2
- package/es/HiIconButton/HiIconButton.js +6 -21
- package/es/HiIconButton/index.js +0 -2
- package/es/HiListItemLink/HiListItemLink.js +6 -19
- package/es/HiListItemLink/index.js +0 -2
- package/es/HiLoader/HiLoader.js +6 -16
- package/es/HiLoader/index.js +0 -2
- package/es/HiNotice/HiKPI.js +23 -57
- package/es/HiNotice/HiKPINotice.js +6 -16
- package/es/HiNotice/index.js +0 -3
- package/es/HiPagination/HiPagination.js +1 -11
- package/es/HiPagination/index.js +0 -2
- package/es/HiPaymentMeans/HiPaymentMeans.js +31 -72
- package/es/HiPaymentMeans/index.js +0 -2
- package/es/HiPdfReader/HiPdfReader.js +29 -64
- package/es/HiPdfReader/index.js +0 -2
- package/es/HiPin/HiPin.js +7 -19
- package/es/HiPin/index.js +0 -2
- package/es/HiRadio/HiRadio.js +11 -22
- package/es/HiRadio/index.js +0 -2
- package/es/HiScrollStepper/HiScrollStepper.js +29 -67
- package/es/HiScrollStepper/index.js +0 -2
- package/es/HiSelect/HiDynamicSelect.js +39 -52
- package/es/HiSelect/HiDynamicSelectField.js +29 -55
- package/es/HiSelect/HiNestedSelect.js +71 -120
- package/es/HiSelect/HiNestedSelectContent.js +65 -93
- package/es/HiSelect/HiNestedSelectField.js +29 -55
- package/es/HiSelect/HiSelect.js +95 -195
- package/es/HiSelect/HiSelectContent.js +72 -110
- package/es/HiSelect/HiSelectField.js +30 -56
- package/es/HiSelect/HiSelectInput.js +27 -84
- package/es/HiSelect/HiSelectMobile.js +13 -52
- package/es/HiSelect/HiSuggestSelect.js +30 -88
- package/es/HiSelect/HiSuggestSelectField.js +20 -46
- package/es/HiSelect/index.js +2 -14
- package/es/HiSelectableList/HiSelectableList.js +40 -98
- package/es/HiSelectableList/HiSelectableListHierarchic.js +40 -68
- package/es/HiSelectableList/HiSelectableListItem.js +45 -88
- package/es/HiSelectableList/index.js +0 -4
- package/es/HiStepper/DefaultIndicator.js +1 -10
- package/es/HiStepper/HiStep.js +18 -48
- package/es/HiStepper/HiStepper.js +2 -15
- package/es/HiStepper/index.js +0 -3
- package/es/HiSwitch/HiSwitch.js +9 -33
- package/es/HiSwitch/HiSwitchState.js +15 -32
- package/es/HiSwitch/index.js +0 -3
- package/es/HiTable/HiCellBuilder.js +15 -72
- package/es/HiTable/HiTable.js +20 -48
- package/es/HiTable/HiTableBody.js +12 -31
- package/es/HiTable/HiTableHeader.js +23 -58
- package/es/HiTable/HiTableRow.js +18 -55
- package/es/HiTable/constants.js +48 -98
- package/es/HiTable/index.js +0 -2
- package/es/hi-svg-icons/HiAccount.js +4 -14
- package/es/hi-svg-icons/HiActivity.js +4 -14
- package/es/hi-svg-icons/HiAll.js +7 -18
- package/es/hi-svg-icons/HiBilling.js +4 -14
- package/es/hi-svg-icons/HiBriefcaseRescue.js +4 -14
- package/es/hi-svg-icons/HiBusiness.js +4 -14
- package/es/hi-svg-icons/HiCatalog.js +4 -14
- package/es/hi-svg-icons/HiCustomer.js +4 -14
- package/es/hi-svg-icons/HiDownload.js +4 -14
- package/es/hi-svg-icons/HiFinance.js +4 -14
- package/es/hi-svg-icons/HiFinanceMenu.js +4 -14
- package/es/hi-svg-icons/HiHostedPaymentPage.js +4 -14
- package/es/hi-svg-icons/HiHostedPaymentPageMenu.js +4 -14
- package/es/hi-svg-icons/HiIntegration.js +4 -14
- package/es/hi-svg-icons/HiIntegrationMenu.js +4 -14
- package/es/hi-svg-icons/HiIntelligence.js +4 -14
- package/es/hi-svg-icons/HiIntelligenceMenu.js +4 -14
- package/es/hi-svg-icons/HiInvoice.js +4 -14
- package/es/hi-svg-icons/HiInvoiceMenu.js +4 -14
- package/es/hi-svg-icons/HiLogoRounded.js +6 -17
- package/es/hi-svg-icons/HiOrder.js +4 -14
- package/es/hi-svg-icons/HiPaymentOrder.js +4 -14
- package/es/hi-svg-icons/HiPermission.js +4 -14
- package/es/hi-svg-icons/HiPriceGrid.js +4 -14
- package/es/hi-svg-icons/HiPrivate.js +4 -14
- package/es/hi-svg-icons/HiRoute.js +4 -14
- package/es/hi-svg-icons/HiRouteMenu.js +4 -14
- package/es/hi-svg-icons/HiRouteSwitch.js +7 -19
- package/es/hi-svg-icons/HiRouteSwitchMenu.js +7 -19
- package/es/hi-svg-icons/HiSettlement.js +4 -14
- package/es/hi-svg-icons/HiSizeLarge.js +4 -14
- package/es/hi-svg-icons/HiSizeMedium.js +4 -14
- package/es/hi-svg-icons/HiSizeSmall.js +4 -14
- package/es/hi-svg-icons/HiStore.js +4 -14
- package/es/hi-svg-icons/HiStoreMenu.js +4 -14
- package/es/hi-svg-icons/HiTransaction.js +4 -14
- package/es/hi-svg-icons/HiTransactionMenu.js +4 -14
- package/es/hi-svg-icons/HiUser.js +4 -14
- package/es/hi-svg-icons/HiVendor.js +4 -14
- package/es/hi-svg-icons/HiWidget.js +4 -14
- package/es/hi-svg-icons/index.js +0 -41
- package/es/hi-svg-images/HiLogo.js +4 -12
- package/es/hi-svg-images/HiLogoWhite.js +4 -12
- package/es/hi-svg-images/index.js +0 -3
- package/es/setupTest.js +2 -13
- package/es/styleguide/Wrapper.js +0 -6
- package/es/styles/MuiThemeProvider.js +20 -56
- package/es/styles/colorManipulator.js +15 -50
- package/es/styles/createBreakpoints.js +14 -29
- package/es/styles/createGenerateClassName.js +14 -24
- package/es/styles/createMixins.js +4 -10
- package/es/styles/createMuiTheme.js +11 -28
- package/es/styles/createPalette.js +66 -89
- package/es/styles/createStyles.js +0 -1
- package/es/styles/createTypography.js +15 -24
- package/es/styles/getStylesCreator.js +2 -14
- package/es/styles/getThemeProps.js +2 -7
- package/es/styles/index.js +0 -6
- package/es/styles/jssPreset.js +1 -11
- package/es/styles/makeStyles.js +2 -9
- package/es/styles/mergeClasses.js +5 -16
- package/es/styles/shadows.js +1 -4
- package/es/styles/shape.js +1 -2
- package/es/styles/spacing.js +1 -4
- package/es/styles/themeListener.js +2 -10
- package/es/styles/transitions.js +20 -35
- package/es/styles/withStyles.js +2 -9
- package/es/styles/zIndex.js +1 -2
- package/es/test-utils/createMount.js +2 -12
- package/es/test-utils/createRender.js +2 -9
- package/es/test-utils/createShallow.js +6 -17
- package/es/test-utils/getClasses.js +1 -4
- package/es/test-utils/index.js +0 -6
- package/es/test-utils/until.js +3 -14
- package/es/test-utils/unwrap.js +0 -1
- package/es/theme/palette.js +2 -7
- package/es/theme/typography.js +7 -15
- package/es/theme.js +2 -8
- package/es/transitions/utils.js +3 -7
- package/es/utils/exactProp.js +3 -13
- package/es/utils/helpers.js +19 -58
- package/es/withMobileDialog/index.js +0 -2
- package/es/withMobileDialog/withMobileDialog.js +3 -12
- package/hi-svg-icons/HiAccount.js +4 -14
- package/hi-svg-icons/HiActivity.js +4 -14
- package/hi-svg-icons/HiAll.js +7 -18
- package/hi-svg-icons/HiBilling.js +4 -14
- package/hi-svg-icons/HiBriefcaseRescue.js +4 -14
- package/hi-svg-icons/HiBusiness.js +4 -14
- package/hi-svg-icons/HiCatalog.js +4 -14
- package/hi-svg-icons/HiCustomer.js +4 -14
- package/hi-svg-icons/HiDownload.js +4 -14
- package/hi-svg-icons/HiFinance.js +4 -14
- package/hi-svg-icons/HiFinanceMenu.js +4 -14
- package/hi-svg-icons/HiHostedPaymentPage.js +4 -14
- package/hi-svg-icons/HiHostedPaymentPageMenu.js +4 -14
- package/hi-svg-icons/HiIntegration.js +4 -14
- package/hi-svg-icons/HiIntegrationMenu.js +4 -14
- package/hi-svg-icons/HiIntelligence.js +4 -14
- package/hi-svg-icons/HiIntelligenceMenu.js +4 -14
- package/hi-svg-icons/HiInvoice.js +4 -14
- package/hi-svg-icons/HiInvoiceMenu.js +4 -14
- package/hi-svg-icons/HiLogoRounded.js +6 -17
- package/hi-svg-icons/HiOrder.js +4 -14
- package/hi-svg-icons/HiPaymentOrder.js +4 -14
- package/hi-svg-icons/HiPermission.js +4 -14
- package/hi-svg-icons/HiPriceGrid.js +4 -14
- package/hi-svg-icons/HiPrivate.js +4 -14
- package/hi-svg-icons/HiRoute.js +4 -14
- package/hi-svg-icons/HiRouteMenu.js +4 -14
- package/hi-svg-icons/HiRouteSwitch.js +7 -19
- package/hi-svg-icons/HiRouteSwitchMenu.js +7 -19
- package/hi-svg-icons/HiSettlement.js +4 -14
- package/hi-svg-icons/HiSizeLarge.js +4 -14
- package/hi-svg-icons/HiSizeMedium.js +4 -14
- package/hi-svg-icons/HiSizeSmall.js +4 -14
- package/hi-svg-icons/HiStore.js +4 -14
- package/hi-svg-icons/HiStoreMenu.js +4 -14
- package/hi-svg-icons/HiTransaction.js +4 -14
- package/hi-svg-icons/HiTransactionMenu.js +4 -14
- package/hi-svg-icons/HiUser.js +4 -14
- package/hi-svg-icons/HiVendor.js +4 -14
- package/hi-svg-icons/HiWidget.js +4 -14
- package/hi-svg-icons/index.js +0 -41
- package/hi-svg-images/HiLogo.js +4 -12
- package/hi-svg-images/HiLogoWhite.js +4 -12
- package/hi-svg-images/index.js +0 -3
- package/package.json +184 -80
- package/setupTest.js +2 -13
- package/styleguide/Wrapper.js +0 -6
- package/styles/MuiThemeProvider.js +20 -56
- package/styles/colorManipulator.js +15 -50
- package/styles/createBreakpoints.js +14 -29
- package/styles/createGenerateClassName.js +14 -24
- package/styles/createMixins.js +4 -10
- package/styles/createMuiTheme.js +11 -28
- package/styles/createPalette.js +66 -89
- package/styles/createStyles.js +0 -1
- package/styles/createTypography.js +15 -24
- package/styles/getStylesCreator.js +2 -14
- package/styles/getThemeProps.js +2 -7
- package/styles/index.js +0 -6
- package/styles/jssPreset.js +1 -11
- package/styles/makeStyles.js +2 -9
- package/styles/mergeClasses.js +5 -16
- package/styles/shadows.js +1 -4
- package/styles/shape.js +1 -2
- package/styles/spacing.js +1 -4
- package/styles/themeListener.js +2 -10
- package/styles/transitions.js +20 -35
- package/styles/withStyles.js +2 -9
- package/styles/zIndex.js +1 -2
- package/test-utils/createMount.js +2 -12
- package/test-utils/createRender.js +2 -9
- package/test-utils/createShallow.js +6 -17
- package/test-utils/getClasses.js +1 -4
- package/test-utils/index.js +0 -6
- package/test-utils/until.js +3 -14
- package/test-utils/unwrap.js +0 -1
- package/theme/palette.js +2 -7
- package/theme/typography.js +7 -15
- package/theme.js +2 -8
- package/transitions/utils.js +3 -7
- package/utils/exactProp.js +3 -13
- package/utils/helpers.js +19 -58
- package/withMobileDialog/index.js +0 -2
- package/withMobileDialog/withMobileDialog.js +3 -12
@@ -1,7 +1,6 @@
|
|
1
1
|
"use strict";
|
2
2
|
|
3
3
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
4
|
-
|
5
4
|
Object.defineProperty(exports, "__esModule", {
|
6
5
|
value: true
|
7
6
|
});
|
@@ -12,52 +11,29 @@ exports.findSeparator = findSeparator;
|
|
12
11
|
exports.styles = void 0;
|
13
12
|
exports.yearAndMonth = yearAndMonth;
|
14
13
|
exports.yearAndQuarter = yearAndQuarter;
|
15
|
-
|
16
14
|
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/extends"));
|
17
|
-
|
18
15
|
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/objectWithoutProperties"));
|
19
|
-
|
20
16
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/defineProperty"));
|
21
|
-
|
22
17
|
var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/classCallCheck"));
|
23
|
-
|
24
18
|
var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/createClass"));
|
25
|
-
|
26
|
-
var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/inherits"));
|
27
|
-
|
28
19
|
var _possibleConstructorReturn2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/possibleConstructorReturn"));
|
29
|
-
|
30
20
|
var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/getPrototypeOf"));
|
31
|
-
|
21
|
+
var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/inherits"));
|
32
22
|
var _react = _interopRequireDefault(require("react"));
|
33
|
-
|
34
23
|
var _momentTimezone = _interopRequireDefault(require("moment-timezone"));
|
35
|
-
|
36
24
|
var _reactDom = require("react-dom");
|
37
|
-
|
38
25
|
var _withStyles = _interopRequireDefault(require("@mui/styles/withStyles"));
|
39
|
-
|
40
26
|
var _HiSelectField = _interopRequireDefault(require("../HiSelect/HiSelectField"));
|
41
|
-
|
42
27
|
var _HiDateRangePicker = _interopRequireDefault(require("./HiDateRangePicker"));
|
43
|
-
|
44
28
|
var _HiFormControl = _interopRequireDefault(require("../HiForm/HiFormControl"));
|
45
|
-
|
46
29
|
var _reactDeviceDetect = require("react-device-detect");
|
47
|
-
|
48
30
|
var _Calendar = _interopRequireDefault(require("mdi-material-ui/Calendar"));
|
49
|
-
|
50
31
|
var _CalendarBlank = _interopRequireDefault(require("mdi-material-ui/CalendarBlank"));
|
51
|
-
|
52
32
|
var _CalendarArrowRight = _interopRequireDefault(require("mdi-material-ui/CalendarArrowRight"));
|
53
|
-
|
54
|
-
function
|
55
|
-
|
56
|
-
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
57
|
-
|
33
|
+
function _callSuper(t, o, e) { return o = (0, _getPrototypeOf2.default)(o), (0, _possibleConstructorReturn2.default)(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], (0, _getPrototypeOf2.default)(t).constructor) : o.apply(t, e)); }
|
34
|
+
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
58
35
|
function findSeparator(format) {
|
59
36
|
var str = '';
|
60
|
-
|
61
37
|
if (format.search('[/]') >= 0) {
|
62
38
|
str = '/';
|
63
39
|
} else if (format.search('[-]') >= 0) {
|
@@ -65,100 +41,87 @@ function findSeparator(format) {
|
|
65
41
|
} else if (format.search('[.]') >= 0) {
|
66
42
|
str = '.';
|
67
43
|
}
|
68
|
-
|
69
44
|
return str;
|
70
45
|
}
|
71
|
-
|
72
46
|
function yearAndMonth(format, date) {
|
73
47
|
var findY = function findY(el) {
|
74
48
|
return el.toUpperCase().search('Y') >= 0;
|
75
49
|
};
|
76
|
-
|
77
50
|
var findM = function findM(el) {
|
78
51
|
return el.toUpperCase().search('M') >= 0;
|
79
52
|
};
|
80
|
-
|
81
53
|
var s = findSeparator(format);
|
82
54
|
var split = format.split(s);
|
83
55
|
var indexY = split.findIndex(findY);
|
84
56
|
var indexM = split.findIndex(findM);
|
85
57
|
return indexY < indexM ? date.format(split[indexY] + s + split[indexM]) : date.format(split[indexM] + s + split[indexY]);
|
86
58
|
}
|
87
|
-
|
88
59
|
function yearAndQuarter(format, date, t) {
|
89
60
|
var findY = function findY(el) {
|
90
61
|
return el.toUpperCase().search('Y') >= 0;
|
91
62
|
};
|
92
|
-
|
93
63
|
var findM = function findM(el) {
|
94
64
|
return el.toUpperCase().search('M') >= 0;
|
95
65
|
};
|
96
|
-
|
97
66
|
var s = findSeparator(format);
|
98
67
|
var split = format.split(s);
|
99
68
|
var indexY = split.findIndex(findY);
|
100
69
|
var indexM = split.findIndex(findM);
|
101
70
|
return indexY < indexM ? date.format("".concat(split[indexY]).concat(s, "[").concat(t.short_quarter, "]Q")) : date.format("[".concat(t.short_quarter, "]Q").concat(s).concat(split[indexY]));
|
102
71
|
}
|
103
|
-
|
104
72
|
function buildDateRangeInfo(t, from, to, format) {
|
105
73
|
var options = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : {};
|
106
74
|
var _options$prefix = options.prefix,
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
75
|
+
prefix = _options$prefix === void 0 ? null : _options$prefix,
|
76
|
+
_options$toNow = options.toNow,
|
77
|
+
toNow = _options$toNow === void 0 ? false : _options$toNow,
|
78
|
+
_options$toToday = options.toToday,
|
79
|
+
toToday = _options$toToday === void 0 ? false : _options$toToday,
|
80
|
+
_options$displayDays = options.displayDays,
|
81
|
+
displayDays = _options$displayDays === void 0 ? true : _options$displayDays,
|
82
|
+
_options$displayDayNa = options.displayDayName,
|
83
|
+
displayDayName = _options$displayDayNa === void 0 ? false : _options$displayDayNa; // From
|
84
|
+
var info = "".concat(t.from, " ").concat(from.format(format), " ");
|
85
|
+
|
86
|
+
// Display day name
|
119
87
|
if (displayDayName) {
|
120
88
|
info = "".concat(t.from, " ").concat(from.format('dddd'), " ").concat(from.format(format), " ");
|
121
|
-
}
|
122
|
-
|
89
|
+
}
|
123
90
|
|
91
|
+
// To
|
124
92
|
if (toToday) {
|
125
93
|
info += "".concat(t.to_today);
|
126
94
|
} else if (toNow) {
|
127
95
|
info += "".concat(t.to_now);
|
128
96
|
} else {
|
129
97
|
info += "".concat(t.to, " ").concat(to.format(format));
|
130
|
-
}
|
131
|
-
|
98
|
+
}
|
132
99
|
|
100
|
+
// Prefix
|
133
101
|
switch (prefix) {
|
134
102
|
case 'week':
|
135
103
|
info = "".concat(t.short_week).concat(from.format('w'), ", ").concat(info);
|
136
104
|
break;
|
137
|
-
|
138
105
|
case 'quarter':
|
139
106
|
info = "".concat(t.short_quarter).concat(from.format('Q'), ", ").concat(info);
|
140
107
|
break;
|
141
|
-
|
142
108
|
default:
|
143
109
|
break;
|
144
|
-
}
|
145
|
-
|
110
|
+
}
|
146
111
|
|
112
|
+
// Display number of days
|
147
113
|
if (displayDays) {
|
148
114
|
var days = Math.ceil(to.diff(from, 'days', true));
|
149
115
|
info = "".concat(days, " ").concat(days === 1 ? t.day : t.days, ", ").concat(info);
|
150
116
|
}
|
151
|
-
|
152
117
|
return info;
|
153
118
|
}
|
154
|
-
|
155
119
|
function buildDateRangeOptionByKey(key, t, format) {
|
156
120
|
var from;
|
157
121
|
var label;
|
158
122
|
var info;
|
159
123
|
var to;
|
160
124
|
var days;
|
161
|
-
|
162
125
|
switch (key) {
|
163
126
|
case 'custom':
|
164
127
|
label = t.custom_period;
|
@@ -166,21 +129,18 @@ function buildDateRangeOptionByKey(key, t, format) {
|
|
166
129
|
to = (0, _momentTimezone.default)().endOf('day');
|
167
130
|
info = t.custom_period_info;
|
168
131
|
break;
|
169
|
-
|
170
132
|
case 'cd':
|
171
133
|
label = t.today;
|
172
134
|
from = (0, _momentTimezone.default)().startOf('day');
|
173
135
|
to = (0, _momentTimezone.default)();
|
174
136
|
info = "".concat(from.format(format));
|
175
137
|
break;
|
176
|
-
|
177
138
|
case 'pd':
|
178
139
|
label = t.yesterday;
|
179
140
|
from = (0, _momentTimezone.default)().subtract(1, 'day').startOf('day');
|
180
141
|
to = (0, _momentTimezone.default)().subtract(1, 'day').endOf('day');
|
181
142
|
info = "".concat(from.format(format));
|
182
143
|
break;
|
183
|
-
|
184
144
|
case 'cw':
|
185
145
|
label = t.current_week;
|
186
146
|
from = (0, _momentTimezone.default)().startOf('week');
|
@@ -191,7 +151,6 @@ function buildDateRangeOptionByKey(key, t, format) {
|
|
191
151
|
displayDays: true
|
192
152
|
});
|
193
153
|
break;
|
194
|
-
|
195
154
|
case 'pw':
|
196
155
|
label = t.previous_week;
|
197
156
|
from = (0, _momentTimezone.default)().subtract(1, 'week').startOf('week');
|
@@ -202,7 +161,6 @@ function buildDateRangeOptionByKey(key, t, format) {
|
|
202
161
|
displayDays: true
|
203
162
|
});
|
204
163
|
break;
|
205
|
-
|
206
164
|
case 'cm':
|
207
165
|
label = t.current_month;
|
208
166
|
from = (0, _momentTimezone.default)().startOf('month');
|
@@ -213,7 +171,6 @@ function buildDateRangeOptionByKey(key, t, format) {
|
|
213
171
|
displayDays: true
|
214
172
|
});
|
215
173
|
break;
|
216
|
-
|
217
174
|
case 'pm':
|
218
175
|
label = t.previous_month;
|
219
176
|
from = (0, _momentTimezone.default)().subtract(1, 'month').startOf('month');
|
@@ -221,7 +178,6 @@ function buildDateRangeOptionByKey(key, t, format) {
|
|
221
178
|
days = from.daysInMonth();
|
222
179
|
info = "".concat(days, " ").concat(days === 1 ? t.day : t.days, ", ").concat(yearAndMonth(format, from));
|
223
180
|
break;
|
224
|
-
|
225
181
|
case 'cq':
|
226
182
|
label = t.current_quarter;
|
227
183
|
from = (0, _momentTimezone.default)().startOf('quarter');
|
@@ -232,7 +188,6 @@ function buildDateRangeOptionByKey(key, t, format) {
|
|
232
188
|
displayDays: true
|
233
189
|
});
|
234
190
|
break;
|
235
|
-
|
236
191
|
case 'pq':
|
237
192
|
label = t.previous_quarter;
|
238
193
|
from = (0, _momentTimezone.default)().subtract(1, 'quarter').startOf('quarter');
|
@@ -243,7 +198,6 @@ function buildDateRangeOptionByKey(key, t, format) {
|
|
243
198
|
displayDays: true
|
244
199
|
});
|
245
200
|
break;
|
246
|
-
|
247
201
|
case 'cy':
|
248
202
|
label = t.current_year;
|
249
203
|
from = (0, _momentTimezone.default)().startOf('year');
|
@@ -254,14 +208,12 @@ function buildDateRangeOptionByKey(key, t, format) {
|
|
254
208
|
displayDays: true
|
255
209
|
});
|
256
210
|
break;
|
257
|
-
|
258
211
|
case '1':
|
259
212
|
label = '24h';
|
260
213
|
from = (0, _momentTimezone.default)().subtract(1, 'day');
|
261
214
|
to = (0, _momentTimezone.default)();
|
262
215
|
info = "".concat(t.from, " ").concat(from.format('HH:mm'), " ").concat(t.yesterday.toLowerCase(), " ").concat(t.to_now);
|
263
216
|
break;
|
264
|
-
|
265
217
|
default:
|
266
218
|
if (parseInt(key) > 0) {
|
267
219
|
label = "".concat(key, " ").concat(key === 1 ? t.day : t.days);
|
@@ -275,10 +227,8 @@ function buildDateRangeOptionByKey(key, t, format) {
|
|
275
227
|
displayDayName: true
|
276
228
|
});
|
277
229
|
}
|
278
|
-
|
279
230
|
break;
|
280
231
|
}
|
281
|
-
|
282
232
|
return {
|
283
233
|
id: key,
|
284
234
|
from: from,
|
@@ -287,8 +237,7 @@ function buildDateRangeOptionByKey(key, t, format) {
|
|
287
237
|
to: to
|
288
238
|
};
|
289
239
|
}
|
290
|
-
|
291
|
-
var styles = function styles(theme) {
|
240
|
+
var styles = exports.styles = function styles(theme) {
|
292
241
|
return {
|
293
242
|
root: {
|
294
243
|
maxWidth: 500,
|
@@ -331,54 +280,35 @@ var styles = function styles(theme) {
|
|
331
280
|
}
|
332
281
|
};
|
333
282
|
};
|
334
|
-
|
335
|
-
exports.styles = styles;
|
336
283
|
var PRESET_PERIOD_LIST = ['cd', 'pd', 'cw', 'pw', 'cm', 'pm', 'cq', 'pq', 'cy'];
|
337
284
|
var SLIDING_PERIOD_LIST = ['1', '7', '30', '365'];
|
338
285
|
var CUSTOM_PERIOD_LIST = ['custom'];
|
339
|
-
|
340
286
|
var _ref2 = /*#__PURE__*/_react.default.createElement(_CalendarBlank.default, null);
|
341
|
-
|
342
287
|
var _ref3 = /*#__PURE__*/_react.default.createElement(_Calendar.default, null);
|
343
|
-
|
344
288
|
var _ref4 = /*#__PURE__*/_react.default.createElement(_CalendarArrowRight.default, null);
|
345
|
-
|
346
289
|
var HiDateRangeSelector = /*#__PURE__*/function (_React$Component) {
|
347
|
-
(0, _inherits2.default)(HiDateRangeSelector, _React$Component);
|
348
|
-
|
349
|
-
var _super = _createSuper(HiDateRangeSelector);
|
350
|
-
|
351
290
|
function HiDateRangeSelector(props) {
|
352
291
|
var _this;
|
353
|
-
|
354
292
|
(0, _classCallCheck2.default)(this, HiDateRangeSelector);
|
355
|
-
_this =
|
293
|
+
_this = _callSuper(this, HiDateRangeSelector, [props]);
|
356
294
|
_this.options = [];
|
357
|
-
|
358
295
|
_this.handleBlur = function (event) {
|
359
296
|
if (event instanceof Object && _this.props.onblur) {
|
360
297
|
_this.props.onBlur(event);
|
361
298
|
}
|
362
299
|
};
|
363
|
-
|
364
300
|
_this.handleReset = function (name) {
|
365
301
|
_this.props.onChange(name, undefined);
|
366
|
-
|
367
302
|
_this.props.onChange("".concat(name, "Error"), undefined);
|
368
303
|
};
|
369
|
-
|
370
304
|
_this.handleSelectChange = function (name) {
|
371
305
|
return function (event, value) {
|
372
306
|
_this.setState(function (prevState) {
|
373
|
-
|
374
|
-
|
375
|
-
return _ref = {}, (0, _defineProperty2.default)(_ref, name, value), (0, _defineProperty2.default)(_ref, "key", prevState.key === 1 ? 2 : 1), _ref;
|
307
|
+
return (0, _defineProperty2.default)((0, _defineProperty2.default)({}, name, value), "key", prevState.key === 1 ? 2 : 1);
|
376
308
|
});
|
377
|
-
|
378
309
|
_this.updateDates(value);
|
379
310
|
};
|
380
311
|
};
|
381
|
-
|
382
312
|
_this.options = props.availableOptionKeys.map(function (key) {
|
383
313
|
return buildDateRangeOptionByKey(key, props.translations, props.format);
|
384
314
|
});
|
@@ -388,8 +318,8 @@ var HiDateRangeSelector = /*#__PURE__*/function (_React$Component) {
|
|
388
318
|
};
|
389
319
|
return _this;
|
390
320
|
}
|
391
|
-
|
392
|
-
(0, _createClass2.default)(HiDateRangeSelector, [{
|
321
|
+
(0, _inherits2.default)(HiDateRangeSelector, _React$Component);
|
322
|
+
return (0, _createClass2.default)(HiDateRangeSelector, [{
|
393
323
|
key: "componentDidMount",
|
394
324
|
value: function componentDidMount() {
|
395
325
|
if (this.container) {
|
@@ -409,14 +339,12 @@ var HiDateRangeSelector = /*#__PURE__*/function (_React$Component) {
|
|
409
339
|
var selectedOption = this.options.find(function (option) {
|
410
340
|
return option.id === value;
|
411
341
|
});
|
412
|
-
|
413
342
|
if (selectedOption) {
|
414
343
|
this.props.onChange('from', selectedOption.from.toDate());
|
415
344
|
this.props.onChange('to', selectedOption.to.toDate());
|
416
345
|
this.props.onChange('fromError', false);
|
417
346
|
this.props.onChange('toError', false);
|
418
347
|
}
|
419
|
-
|
420
348
|
if (this.props.returnSelectValue === true) {
|
421
349
|
this.props.onChange('period', value);
|
422
350
|
}
|
@@ -425,8 +353,8 @@ var HiDateRangeSelector = /*#__PURE__*/function (_React$Component) {
|
|
425
353
|
key: "buildOptions",
|
426
354
|
value: function buildOptions() {
|
427
355
|
var _this$props = this.props,
|
428
|
-
|
429
|
-
|
356
|
+
availableOptionKeys = _this$props.availableOptionKeys,
|
357
|
+
translations = _this$props.translations;
|
430
358
|
var selectedPreset = this.state.selectedPreset;
|
431
359
|
var options = [];
|
432
360
|
var presetOptionsAvailable = availableOptionKeys.filter(function (option) {
|
@@ -438,7 +366,6 @@ var HiDateRangeSelector = /*#__PURE__*/function (_React$Component) {
|
|
438
366
|
var customOptionsAvailable = availableOptionKeys.filter(function (option) {
|
439
367
|
return CUSTOM_PERIOD_LIST.includes(option);
|
440
368
|
});
|
441
|
-
|
442
369
|
if (customOptionsAvailable.length) {
|
443
370
|
options.push({
|
444
371
|
id: 'custom_periods_subheader',
|
@@ -451,7 +378,6 @@ var HiDateRangeSelector = /*#__PURE__*/function (_React$Component) {
|
|
451
378
|
collapseParent: true
|
452
379
|
});
|
453
380
|
}
|
454
|
-
|
455
381
|
if (presetOptionsAvailable.length) {
|
456
382
|
options.push({
|
457
383
|
id: 'preset_periods_subheader',
|
@@ -464,7 +390,6 @@ var HiDateRangeSelector = /*#__PURE__*/function (_React$Component) {
|
|
464
390
|
collapseParent: true
|
465
391
|
});
|
466
392
|
}
|
467
|
-
|
468
393
|
if (slidingOptionsAvailable.length) {
|
469
394
|
options.push({
|
470
395
|
id: 'sliding_periods_subheader',
|
@@ -477,41 +402,39 @@ var HiDateRangeSelector = /*#__PURE__*/function (_React$Component) {
|
|
477
402
|
collapseParent: true
|
478
403
|
});
|
479
404
|
}
|
480
|
-
|
481
405
|
return options;
|
482
406
|
}
|
483
407
|
}, {
|
484
408
|
key: "render",
|
485
409
|
value: function render() {
|
486
410
|
var _this2 = this;
|
487
|
-
|
488
411
|
var _this$props2 = this.props,
|
489
|
-
|
490
|
-
|
491
|
-
|
492
|
-
|
493
|
-
|
494
|
-
|
495
|
-
|
496
|
-
|
497
|
-
|
498
|
-
|
499
|
-
|
500
|
-
|
501
|
-
|
502
|
-
|
503
|
-
|
504
|
-
|
505
|
-
|
506
|
-
|
507
|
-
|
508
|
-
|
509
|
-
|
510
|
-
|
511
|
-
|
412
|
+
availableOptionKeys = _this$props2.availableOptionKeys,
|
413
|
+
disabled = _this$props2.disabled,
|
414
|
+
enableTime = _this$props2.enableTime,
|
415
|
+
errorText = _this$props2.errorText,
|
416
|
+
fromError = _this$props2.fromError,
|
417
|
+
toError = _this$props2.toError,
|
418
|
+
helperIcon = _this$props2.helperIcon,
|
419
|
+
helperText = _this$props2.helperText,
|
420
|
+
idRange = _this$props2.idRange,
|
421
|
+
idSelect = _this$props2.idSelect,
|
422
|
+
minimumDate = _this$props2.minimumDate,
|
423
|
+
disableFutureDays = _this$props2.disableFutureDays,
|
424
|
+
label = _this$props2.label,
|
425
|
+
from = _this$props2.from,
|
426
|
+
onChange = _this$props2.onChange,
|
427
|
+
required = _this$props2.required,
|
428
|
+
to = _this$props2.to,
|
429
|
+
translations = _this$props2.translations,
|
430
|
+
classes = _this$props2.classes,
|
431
|
+
selectProps = _this$props2.selectProps,
|
432
|
+
staticPosition = _this$props2.staticPosition,
|
433
|
+
className = _this$props2.className,
|
434
|
+
props = (0, _objectWithoutProperties2.default)(_this$props2, ["availableOptionKeys", "disabled", "enableTime", "errorText", "fromError", "toError", "helperIcon", "helperText", "idRange", "idSelect", "minimumDate", "disableFutureDays", "label", "from", "onChange", "required", "to", "translations", "classes", "selectProps", "staticPosition", "className"]);
|
512
435
|
var _this$state = this.state,
|
513
|
-
|
514
|
-
|
436
|
+
selectedPreset = _this$state.selectedPreset,
|
437
|
+
containerWidth = _this$state.containerWidth;
|
515
438
|
var hiSelectableListProps = {
|
516
439
|
secondaryInline: false,
|
517
440
|
hideCheckbox: true,
|
@@ -597,13 +520,10 @@ var HiDateRangeSelector = /*#__PURE__*/function (_React$Component) {
|
|
597
520
|
selectedPreset: props.defaultPreset
|
598
521
|
};
|
599
522
|
}
|
600
|
-
|
601
523
|
return null;
|
602
524
|
}
|
603
525
|
}]);
|
604
|
-
return HiDateRangeSelector;
|
605
526
|
}(_react.default.Component);
|
606
|
-
|
607
527
|
HiDateRangeSelector.defaultProps = {
|
608
528
|
availableOptionKeys: [].concat(PRESET_PERIOD_LIST, CUSTOM_PERIOD_LIST),
|
609
529
|
disableFutureDays: true,
|
@@ -654,9 +574,6 @@ HiDateRangeSelector.defaultProps = {
|
|
654
574
|
sliding_periods: 'Sliding periods'
|
655
575
|
}
|
656
576
|
};
|
657
|
-
|
658
|
-
var _default = (0, _withStyles.default)(styles, {
|
577
|
+
var _default = exports.default = (0, _withStyles.default)(styles, {
|
659
578
|
name: 'HmuiHiDateRangeSelector'
|
660
|
-
})(HiDateRangeSelector);
|
661
|
-
|
662
|
-
exports.default = _default;
|
579
|
+
})(HiDateRangeSelector);
|
@@ -1,41 +1,25 @@
|
|
1
1
|
"use strict";
|
2
2
|
|
3
3
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
4
|
-
|
5
4
|
Object.defineProperty(exports, "__esModule", {
|
6
5
|
value: true
|
7
6
|
});
|
8
7
|
exports.styles = exports.default = void 0;
|
9
|
-
|
10
8
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/defineProperty"));
|
11
|
-
|
12
9
|
var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/classCallCheck"));
|
13
|
-
|
14
10
|
var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/createClass"));
|
15
|
-
|
16
|
-
var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/inherits"));
|
17
|
-
|
18
11
|
var _possibleConstructorReturn2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/possibleConstructorReturn"));
|
19
|
-
|
20
12
|
var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/getPrototypeOf"));
|
21
|
-
|
13
|
+
var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/inherits"));
|
22
14
|
var _react = _interopRequireDefault(require("react"));
|
23
|
-
|
24
15
|
var _classnames = _interopRequireDefault(require("classnames"));
|
25
|
-
|
26
16
|
var _reactCustomScrollbars = require("react-custom-scrollbars");
|
27
|
-
|
28
17
|
var _MenuList = _interopRequireDefault(require("@mui/material/MenuList"));
|
29
|
-
|
30
18
|
var _MenuItem = _interopRequireDefault(require("@mui/material/MenuItem"));
|
31
|
-
|
32
19
|
var _withStyles = _interopRequireDefault(require("@mui/styles/withStyles"));
|
33
|
-
|
34
|
-
function
|
35
|
-
|
36
|
-
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
37
|
-
|
38
|
-
var styles = function styles(theme) {
|
20
|
+
function _callSuper(t, o, e) { return o = (0, _getPrototypeOf2.default)(o), (0, _possibleConstructorReturn2.default)(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], (0, _getPrototypeOf2.default)(t).constructor) : o.apply(t, e)); }
|
21
|
+
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
22
|
+
var styles = exports.styles = function styles(theme) {
|
39
23
|
return {
|
40
24
|
itemRoot: {
|
41
25
|
'&:hover': {
|
@@ -54,30 +38,20 @@ var styles = function styles(theme) {
|
|
54
38
|
}
|
55
39
|
};
|
56
40
|
};
|
57
|
-
|
58
|
-
exports.styles = styles;
|
59
|
-
|
60
41
|
var ListPicker = /*#__PURE__*/function (_React$PureComponent) {
|
61
|
-
(0, _inherits2.default)(ListPicker, _React$PureComponent);
|
62
|
-
|
63
|
-
var _super = _createSuper(ListPicker);
|
64
|
-
|
65
42
|
function ListPicker() {
|
66
43
|
var _this;
|
67
|
-
|
68
44
|
(0, _classCallCheck2.default)(this, ListPicker);
|
69
|
-
|
70
45
|
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
71
46
|
args[_key] = arguments[_key];
|
72
47
|
}
|
73
|
-
|
74
|
-
_this = _super.call.apply(_super, [this].concat(args));
|
48
|
+
_this = _callSuper(this, ListPicker, [].concat(args));
|
75
49
|
_this.scrollbars = void 0;
|
76
50
|
_this.position = void 0;
|
77
51
|
return _this;
|
78
52
|
}
|
79
|
-
|
80
|
-
(0, _createClass2.default)(ListPicker, [{
|
53
|
+
(0, _inherits2.default)(ListPicker, _React$PureComponent);
|
54
|
+
return (0, _createClass2.default)(ListPicker, [{
|
81
55
|
key: "componentDidMount",
|
82
56
|
value: function componentDidMount() {
|
83
57
|
if (this.position && this.scrollbars) {
|
@@ -90,13 +64,12 @@ var ListPicker = /*#__PURE__*/function (_React$PureComponent) {
|
|
90
64
|
key: "render",
|
91
65
|
value: function render() {
|
92
66
|
var _this2 = this;
|
93
|
-
|
94
67
|
var _this$props = this.props,
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
68
|
+
classes = _this$props.classes,
|
69
|
+
itemList = _this$props.itemList,
|
70
|
+
onItemClick = _this$props.onItemClick,
|
71
|
+
selectedItem = _this$props.selectedItem,
|
72
|
+
type = _this$props.type;
|
100
73
|
this.position = itemList.indexOf(selectedItem);
|
101
74
|
var now = new Date();
|
102
75
|
return /*#__PURE__*/_react.default.createElement(_reactCustomScrollbars.Scrollbars, {
|
@@ -122,15 +95,10 @@ var ListPicker = /*#__PURE__*/function (_React$PureComponent) {
|
|
122
95
|
})));
|
123
96
|
}
|
124
97
|
}]);
|
125
|
-
return ListPicker;
|
126
98
|
}(_react.default.PureComponent);
|
127
|
-
|
128
99
|
ListPicker.defaultProps = {
|
129
100
|
initAtMiddleScroll: true
|
130
101
|
};
|
131
|
-
|
132
|
-
var _default = (0, _withStyles.default)(styles, {
|
102
|
+
var _default = exports.default = (0, _withStyles.default)(styles, {
|
133
103
|
name: 'HmuiListPicker'
|
134
|
-
})(ListPicker);
|
135
|
-
|
136
|
-
exports.default = _default;
|
104
|
+
})(ListPicker);
|