@zohodesk/components 1.2.21 → 1.2.23
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/.DS_Store +0 -0
- package/.cli/PropLessFiles.html +1 -1
- package/.cli/propValidation_report.html +1 -1
- package/.cli/stringContains.js +1 -0
- package/README.md +10 -0
- package/assets/Appearance/dark/themes/blue/blue_CTA_DarkModifyCategory.module.css +15 -0
- package/assets/Appearance/dark/themes/blue/blue_CTA_DarkTheme.module.css +1 -0
- package/assets/Appearance/dark/themes/green/green_CTA_DarkModifyCategory.module.css +15 -0
- package/assets/Appearance/dark/themes/green/green_CTA_DarkTheme.module.css +1 -0
- package/assets/Appearance/dark/themes/orange/orange_CTA_DarkModifyCategory.module.css +15 -0
- package/assets/Appearance/dark/themes/orange/orange_CTA_DarkTheme.module.css +1 -0
- package/assets/Appearance/dark/themes/red/red_CTA_DarkModifyCategory.module.css +15 -0
- package/assets/Appearance/dark/themes/red/red_CTA_DarkTheme.module.css +1 -0
- package/assets/Appearance/dark/themes/yellow/yellow_CTA_DarkModifyCategory.module.css +15 -0
- package/assets/Appearance/dark/themes/yellow/yellow_CTA_DarkTheme.module.css +1 -0
- package/assets/Appearance/light/themes/blue/blue_CTA_LightModifyCategory.module.css +15 -0
- package/assets/Appearance/light/themes/blue/blue_CTA_LightTheme.module.css +1 -0
- package/assets/Appearance/light/themes/green/green_CTA_LightModifyCategory.module.css +15 -0
- package/assets/Appearance/light/themes/green/green_CTA_LightTheme.module.css +1 -0
- package/assets/Appearance/light/themes/orange/orange_CTA_LightModifyCategory.module.css +15 -0
- package/assets/Appearance/light/themes/orange/orange_CTA_LightTheme.module.css +1 -0
- package/assets/Appearance/light/themes/red/red_CTA_LightModifyCategory.module.css +15 -0
- package/assets/Appearance/light/themes/red/red_CTA_LightTheme.module.css +1 -0
- package/assets/Appearance/light/themes/yellow/yellow_CTA_LightModifyCategory.module.css +15 -0
- package/assets/Appearance/light/themes/yellow/yellow_CTA_LightTheme.module.css +1 -0
- package/assets/Appearance/pureDark/themes/blue/blue_CTA_PureDarkModifyCategory.module.css +15 -0
- package/assets/Appearance/pureDark/themes/blue/blue_CTA_PureDarkTheme.module.css +1 -0
- package/assets/Appearance/pureDark/themes/green/green_CTA_PureDarkModifyCategory.module.css +15 -0
- package/assets/Appearance/pureDark/themes/green/green_CTA_PureDarkTheme.module.css +1 -0
- package/assets/Appearance/pureDark/themes/orange/orange_CTA_PureDarkModifyCategory.module.css +15 -0
- package/assets/Appearance/pureDark/themes/orange/orange_CTA_PureDarkTheme.module.css +1 -0
- package/assets/Appearance/pureDark/themes/red/red_CTA_PureDarkModifyCategory.module.css +15 -0
- package/assets/Appearance/pureDark/themes/red/red_CTA_PureDarkTheme.module.css +1 -0
- package/assets/Appearance/pureDark/themes/yellow/yellow_CTA_PureDarkModifyCategory.module.css +15 -0
- package/assets/Appearance/pureDark/themes/yellow/yellow_CTA_PureDarkTheme.module.css +1 -0
- package/es/Accordion/Accordion.js +3 -7
- package/es/Accordion/AccordionItem.js +2 -4
- package/es/Animation/Animation.js +3 -3
- package/es/AppContainer/AppContainer.js +3 -14
- package/es/AppContainer/AppContainer.module.css +2 -2
- package/es/Avatar/Avatar.js +11 -23
- package/es/Avatar/Avatar.module.css +18 -18
- package/es/AvatarTeam/AvatarTeam.js +3 -3
- package/es/AvatarTeam/AvatarTeam.module.css +37 -35
- package/es/AvatarTeam/__tests__/AvatarTeam.spec.js +2 -1
- package/es/Button/Button.js +3 -4
- package/es/Button/css/Button.module.css +70 -70
- package/es/Buttongroup/Buttongroup.js +3 -3
- package/es/Buttongroup/Buttongroup.module.css +15 -13
- package/es/Card/Card.js +10 -21
- package/es/CheckBox/CheckBox.js +3 -5
- package/es/CheckBox/CheckBox.module.css +16 -16
- package/es/DateTime/CalendarView.js +20 -32
- package/es/DateTime/DateTime.js +6 -69
- package/es/DateTime/DateTime.module.css +40 -40
- package/es/DateTime/DateTimePopupFooter.js +1 -4
- package/es/DateTime/DateTimePopupHeader.js +2 -8
- package/es/DateTime/DateWidget.js +35 -98
- package/es/DateTime/DateWidget.module.css +5 -5
- package/es/DateTime/DaysRow.js +1 -4
- package/es/DateTime/Time.js +1 -10
- package/es/DateTime/YearView.js +4 -28
- package/es/DateTime/YearView.module.css +15 -15
- package/es/DateTime/common.js +0 -3
- package/es/DateTime/constants.js +0 -1
- package/es/DateTime/dateFormatUtils/dateFormat.js +30 -65
- package/es/DateTime/dateFormatUtils/dateFormats.js +1 -0
- package/es/DateTime/dateFormatUtils/dayChange.js +4 -13
- package/es/DateTime/dateFormatUtils/index.js +1 -31
- package/es/DateTime/dateFormatUtils/monthChange.js +0 -8
- package/es/DateTime/dateFormatUtils/timeChange.js +6 -22
- package/es/DateTime/dateFormatUtils/yearChange.js +2 -11
- package/es/DateTime/objectUtils.js +20 -14
- package/es/DateTime/typeChecker.js +0 -3
- package/es/DateTime/validator.js +6 -58
- package/es/DropBox/DropBox.js +2 -6
- package/es/DropBox/DropBoxElement/DropBoxElement.js +2 -8
- package/es/DropBox/DropBoxElement/css/DropBoxElement.module.css +76 -73
- package/es/DropBox/DropBoxElement/css/cssJSLogic.js +3 -5
- package/es/DropBox/DropBoxElement/useDropboxPosCalc.js +0 -3
- package/es/DropBox/css/DropBox.module.css +6 -6
- package/es/DropBox/props/defaultProps.js +2 -1
- package/es/DropBox/props/propTypes.js +2 -1
- package/es/DropDown/DropDown.js +1 -7
- package/es/DropDown/DropDown.module.css +2 -2
- package/es/DropDown/DropDownHeading.js +5 -4
- package/es/DropDown/DropDownHeading.module.css +6 -6
- package/es/DropDown/DropDownItem.js +0 -6
- package/es/DropDown/DropDownItem.module.css +12 -12
- package/es/DropDown/DropDownSearch.js +0 -4
- package/es/DropDown/DropDownSearch.module.css +3 -3
- package/es/DropDown/DropDownSeparator.js +0 -1
- package/es/DropDown/DropDownSeparator.module.css +2 -2
- package/es/DropDown/props/propTypes.js +2 -1
- package/es/Heading/Heading.js +3 -2
- package/es/Heading/Heading.module.css +2 -2
- package/es/Label/Label.js +3 -2
- package/es/Label/Label.module.css +5 -5
- package/es/Label/__tests__/Label.spec.js +2 -1
- package/es/Layout/Box.js +2 -15
- package/es/Layout/Container.js +3 -14
- package/es/Layout/Layout.module.css +15 -15
- package/es/Layout/index.js +2 -1
- package/es/Layout/utils.js +0 -1
- package/es/ListItem/ListContainer.js +3 -8
- package/es/ListItem/ListItem.js +3 -9
- package/es/ListItem/ListItem.module.css +38 -27
- package/es/ListItem/ListItemWithAvatar.js +3 -9
- package/es/ListItem/ListItemWithCheckBox.js +2 -7
- package/es/ListItem/ListItemWithIcon.js +3 -8
- package/es/ListItem/ListItemWithRadio.js +3 -7
- package/es/Modal/Modal.js +11 -28
- package/es/MultiSelect/AdvancedGroupMultiSelect.js +13 -89
- package/es/MultiSelect/AdvancedMultiSelect.js +9 -32
- package/es/MultiSelect/EmptyState.js +0 -2
- package/es/MultiSelect/MobileHeader/MobileHeader.module.css +5 -5
- package/es/MultiSelect/MultiSelect.js +30 -99
- package/es/MultiSelect/MultiSelect.module.css +31 -31
- package/es/MultiSelect/MultiSelectHeader.js +0 -3
- package/es/MultiSelect/MultiSelectWithAvatar.js +3 -10
- package/es/MultiSelect/SelectedOptions.js +3 -6
- package/es/MultiSelect/SelectedOptions.module.css +5 -5
- package/es/MultiSelect/Suggestions.js +3 -7
- package/es/MultiSelect/props/propTypes.js +2 -2
- package/es/PopOver/PopOver.js +0 -16
- package/es/Popup/Popup.js +24 -77
- package/es/Popup/viewPort.js +4 -16
- package/es/Provider/IdProvider.js +5 -10
- package/es/Provider/LibraryContext.js +4 -6
- package/es/Provider/NumberGenerator/NumberGenerator.js +7 -21
- package/es/Provider/ZindexProvider.js +2 -9
- package/es/Radio/Radio.js +0 -3
- package/es/Radio/Radio.module.css +9 -9
- package/es/Responsive/CustomResponsive.js +18 -30
- package/es/Responsive/RefWrapper.js +7 -6
- package/es/Responsive/ResizeComponent.js +25 -35
- package/es/Responsive/ResizeObserver.js +6 -26
- package/es/Responsive/Responsive.js +20 -34
- package/es/Responsive/index.js +3 -1
- package/es/Responsive/sizeObservers.js +7 -28
- package/es/Responsive/utils/index.js +5 -7
- package/es/Responsive/utils/shallowCompare.js +2 -7
- package/es/Responsive/windowResizeObserver.js +0 -7
- package/es/ResponsiveDropBox/ResponsiveDropBox.js +0 -4
- package/es/ResponsiveDropBox/ResponsiveDropBox.module.css +2 -2
- package/es/ResponsiveDropBox/props/propTypes.js +2 -1
- package/es/Ribbon/Ribbon.js +2 -3
- package/es/Ribbon/Ribbon.module.css +48 -45
- package/es/RippleEffect/RippleEffect.js +3 -1
- package/es/Select/GroupSelect.js +14 -58
- package/es/Select/Select.js +34 -80
- package/es/Select/Select.module.css +23 -23
- package/es/Select/SelectWithAvatar.js +4 -17
- package/es/Select/SelectWithIcon.js +5 -46
- package/es/Select/props/propTypes.js +2 -2
- package/es/Stencils/Stencils.js +3 -3
- package/es/Stencils/Stencils.module.css +11 -11
- package/es/Switch/Switch.js +3 -5
- package/es/Switch/Switch.module.css +23 -23
- package/es/Tab/Tab.js +4 -4
- package/es/Tab/Tab.module.css +14 -14
- package/es/Tab/TabContent.js +0 -1
- package/es/Tab/TabContentWrapper.js +8 -6
- package/es/Tab/TabWrapper.js +2 -5
- package/es/Tab/Tabs.js +7 -54
- package/es/Tab/Tabs.module.css +22 -22
- package/es/Tab/props/defaultProps.js +2 -1
- package/es/Tab/props/propTypes.js +3 -1
- package/es/Tag/Tag.js +3 -6
- package/es/Tag/Tag.module.css +26 -25
- package/es/TextBox/TextBox.js +3 -16
- package/es/TextBox/TextBox.module.css +10 -10
- package/es/TextBoxIcon/TextBoxIcon.js +2 -9
- package/es/TextBoxIcon/TextBoxIcon.module.css +7 -7
- package/es/TextBoxIcon/props/propTypes.js +2 -1
- package/es/Textarea/Textarea.js +3 -12
- package/es/Textarea/Textarea.module.css +22 -22
- package/es/Tooltip/Tooltip.js +14 -58
- package/es/Tooltip/Tooltip.module.css +5 -9
- package/es/VelocityAnimation/VelocityAnimation/VelocityAnimation.js +2 -3
- package/es/VelocityAnimation/VelocityAnimationGroup/VelocityAnimationGroup.js +5 -7
- package/es/common/animation.module.css +8 -8
- package/es/common/avatarsizes.module.css +16 -16
- package/es/common/basicReset.module.css +3 -3
- package/es/common/common.module.css +24 -24
- package/es/common/customscroll.module.css +2 -12
- package/es/deprecated/PortalLayer/PortalLayer.js +20 -25
- package/es/semantic/Button/Button.js +2 -3
- package/es/semantic/Button/semanticButton.module.css +1 -1
- package/es/utils/Common.js +9 -54
- package/es/utils/ContextOptimizer.js +5 -4
- package/es/utils/constructFullName.js +0 -2
- package/es/utils/datetime/common.js +5 -16
- package/es/utils/debounce.js +1 -5
- package/es/utils/dropDownUtils.js +11 -68
- package/es/utils/getInitial.js +0 -4
- package/es/utils/shallowEqual.js +0 -6
- package/es/v1/Accordion/Accordion.js +3 -4
- package/es/v1/Accordion/AccordionItem.js +2 -4
- package/es/v1/Animation/Animation.js +3 -1
- package/es/v1/AppContainer/AppContainer.js +3 -9
- package/es/v1/Avatar/Avatar.js +6 -18
- package/es/v1/AvatarTeam/AvatarTeam.js +0 -1
- package/es/v1/Button/Button.js +3 -3
- package/es/v1/Card/Card.js +8 -16
- package/es/v1/CheckBox/CheckBox.js +3 -6
- package/es/v1/DateTime/CalendarView.js +20 -32
- package/es/v1/DateTime/DateTime.js +6 -69
- package/es/v1/DateTime/DateTimePopupFooter.js +1 -4
- package/es/v1/DateTime/DateTimePopupHeader.js +2 -8
- package/es/v1/DateTime/DateWidget.js +35 -98
- package/es/v1/DateTime/DaysRow.js +1 -4
- package/es/v1/DateTime/Time.js +1 -10
- package/es/v1/DateTime/YearView.js +4 -28
- package/es/v1/DropBox/DropBox.js +2 -6
- package/es/v1/DropBox/DropBoxElement/DropBoxElement.js +2 -8
- package/es/v1/DropBox/props/defaultProps.js +2 -1
- package/es/v1/DropBox/props/propTypes.js +2 -1
- package/es/v1/DropDown/DropDown.js +0 -3
- package/es/v1/DropDown/DropDownHeading.js +2 -2
- package/es/v1/DropDown/DropDownItem.js +0 -5
- package/es/v1/DropDown/DropDownSearch.js +2 -3
- package/es/v1/DropDown/props/propTypes.js +2 -1
- package/es/v1/Heading/Heading.js +3 -1
- package/es/v1/Layout/Box.js +2 -15
- package/es/v1/Layout/Container.js +3 -14
- package/es/v1/ListItem/ListContainer.js +3 -8
- package/es/v1/ListItem/ListItem.js +3 -10
- package/es/v1/ListItem/ListItemWithAvatar.js +1 -9
- package/es/v1/ListItem/ListItemWithCheckBox.js +2 -8
- package/es/v1/ListItem/ListItemWithIcon.js +3 -9
- package/es/v1/ListItem/ListItemWithRadio.js +3 -8
- package/es/v1/Modal/Modal.js +1 -17
- package/es/v1/MultiSelect/AdvancedGroupMultiSelect.js +15 -90
- package/es/v1/MultiSelect/AdvancedMultiSelect.js +9 -32
- package/es/v1/MultiSelect/EmptyState.js +0 -2
- package/es/v1/MultiSelect/MultiSelect.js +31 -100
- package/es/v1/MultiSelect/MultiSelectHeader.js +0 -3
- package/es/v1/MultiSelect/MultiSelectWithAvatar.js +3 -11
- package/es/v1/MultiSelect/SelectedOptions.js +3 -6
- package/es/v1/MultiSelect/Suggestions.js +3 -7
- package/es/v1/MultiSelect/props/propTypes.js +2 -2
- package/es/v1/PopOver/PopOver.js +0 -11
- package/es/v1/Popup/Popup.js +24 -77
- package/es/v1/Provider/IdProvider.js +5 -10
- package/es/v1/Provider/LibraryContext.js +4 -6
- package/es/v1/Provider/NumberGenerator/NumberGenerator.js +7 -21
- package/es/v1/Provider/ZindexProvider.js +2 -9
- package/es/v1/Radio/Radio.js +2 -5
- package/es/v1/Responsive/CustomResponsive.js +18 -30
- package/es/v1/Responsive/RefWrapper.js +7 -6
- package/es/v1/Responsive/ResizeComponent.js +25 -35
- package/es/v1/Responsive/ResizeObserver.js +6 -26
- package/es/v1/Responsive/Responsive.js +20 -34
- package/es/v1/Responsive/index.js +3 -1
- package/es/v1/ResponsiveDropBox/ResponsiveDropBox.js +0 -1
- package/es/v1/ResponsiveDropBox/props/propTypes.js +2 -1
- package/es/v1/Select/GroupSelect.js +14 -58
- package/es/v1/Select/Select.js +38 -82
- package/es/v1/Select/SelectWithAvatar.js +4 -17
- package/es/v1/Select/SelectWithIcon.js +5 -46
- package/es/v1/Select/props/propTypes.js +2 -2
- package/es/v1/Stencils/Stencils.js +0 -2
- package/es/v1/Switch/Switch.js +3 -6
- package/es/v1/Tab/Tab.js +3 -3
- package/es/v1/Tab/TabContent.js +0 -1
- package/es/v1/Tab/TabContentWrapper.js +8 -6
- package/es/v1/Tab/TabWrapper.js +2 -5
- package/es/v1/Tab/Tabs.js +9 -54
- package/es/v1/Tab/props/defaultProps.js +2 -1
- package/es/v1/Tab/props/propTypes.js +3 -1
- package/es/v1/Tab/v1Tab.module.css +14 -14
- package/es/v1/Tab/v1Tabs.module.css +22 -22
- package/es/v1/Tag/Tag.js +1 -5
- package/es/v1/TextBox/TextBox.js +0 -14
- package/es/v1/TextBoxIcon/TextBoxIcon.js +2 -6
- package/es/v1/TextBoxIcon/props/propTypes.js +2 -1
- package/es/v1/Textarea/Textarea.js +3 -10
- package/es/v1/Tooltip/Tooltip.js +14 -58
- package/es/v1/Typography/Typography.js +0 -2
- package/es/v1/Typography/css/Typography.module.css +31 -31
- package/es/v1/Typography/css/cssJSLogic.js +0 -3
- package/es/v1/VelocityAnimation/VelocityAnimation/VelocityAnimation.js +2 -1
- package/es/v1/VelocityAnimation/VelocityAnimationGroup/VelocityAnimationGroup.js +4 -5
- package/es/v1/semantic/Button/Button.js +2 -1
- package/lib/Accordion/Accordion.js +18 -42
- package/lib/Accordion/AccordionItem.js +18 -40
- package/lib/Accordion/index.js +0 -3
- package/lib/Accordion/props/propTypes.js +0 -3
- package/lib/Animation/Animation.js +18 -38
- package/lib/Animation/props/propTypes.js +0 -3
- package/lib/AppContainer/AppContainer.js +20 -58
- package/lib/AppContainer/AppContainer.module.css +2 -2
- package/lib/AppContainer/props/propTypes.js +0 -3
- package/lib/Avatar/Avatar.js +38 -78
- package/lib/Avatar/Avatar.module.css +18 -18
- package/lib/Avatar/__tests__/Avatar.spec.js +71 -95
- package/lib/Avatar/props/propTypes.js +0 -3
- package/lib/AvatarTeam/AvatarTeam.js +30 -52
- package/lib/AvatarTeam/AvatarTeam.module.css +37 -35
- package/lib/AvatarTeam/__tests__/AvatarTeam.spec.js +61 -77
- package/lib/AvatarTeam/props/propTypes.js +0 -3
- package/lib/Button/Button.js +22 -33
- package/lib/Button/__tests__/Button.spec.js +48 -65
- package/lib/Button/css/Button.module.css +70 -70
- package/lib/Button/css/cssJSLogic.js +17 -18
- package/lib/Button/index.js +0 -3
- package/lib/Button/props/defaultProps.js +0 -2
- package/lib/Button/props/propTypes.js +0 -3
- package/lib/Buttongroup/Buttongroup.js +12 -32
- package/lib/Buttongroup/Buttongroup.module.css +15 -13
- package/lib/Buttongroup/__tests__/Buttongroup.spec.js +10 -18
- package/lib/Buttongroup/props/propTypes.js +0 -3
- package/lib/Card/Card.js +46 -102
- package/lib/Card/index.js +0 -4
- package/lib/Card/props/propTypes.js +0 -3
- package/lib/CheckBox/CheckBox.js +47 -71
- package/lib/CheckBox/CheckBox.module.css +16 -16
- package/lib/CheckBox/props/propTypes.js +0 -3
- package/lib/DateTime/CalendarView.js +42 -82
- package/lib/DateTime/DateTime.js +156 -244
- package/lib/DateTime/DateTime.module.css +40 -40
- package/lib/DateTime/DateTimePopupFooter.js +8 -33
- package/lib/DateTime/DateTimePopupHeader.js +17 -49
- package/lib/DateTime/DateWidget.js +249 -350
- package/lib/DateTime/DateWidget.module.css +5 -5
- package/lib/DateTime/DaysRow.js +5 -28
- package/lib/DateTime/Time.js +32 -75
- package/lib/DateTime/YearView.js +27 -76
- package/lib/DateTime/YearView.module.css +15 -15
- package/lib/DateTime/common.js +0 -6
- package/lib/DateTime/constants.js +0 -1
- package/lib/DateTime/dateFormatUtils/dateFormat.js +122 -187
- package/lib/DateTime/dateFormatUtils/dateFormats.js +1 -0
- package/lib/DateTime/dateFormatUtils/dayChange.js +7 -15
- package/lib/DateTime/dateFormatUtils/index.js +16 -73
- package/lib/DateTime/dateFormatUtils/monthChange.js +9 -20
- package/lib/DateTime/dateFormatUtils/timeChange.js +22 -54
- package/lib/DateTime/dateFormatUtils/yearChange.js +11 -23
- package/lib/DateTime/index.js +0 -2
- package/lib/DateTime/objectUtils.js +20 -24
- package/lib/DateTime/props/propTypes.js +1 -11
- package/lib/DateTime/typeChecker.js +0 -4
- package/lib/DateTime/validator.js +10 -73
- package/lib/DropBox/DropBox.js +21 -45
- package/lib/DropBox/DropBoxElement/DropBoxElement.js +40 -60
- package/lib/DropBox/DropBoxElement/css/DropBoxElement.module.css +76 -73
- package/lib/DropBox/DropBoxElement/css/cssJSLogic.js +34 -42
- package/lib/DropBox/DropBoxElement/props/propTypes.js +0 -3
- package/lib/DropBox/DropBoxElement/useDropboxPosCalc.js +9 -14
- package/lib/DropBox/css/DropBox.module.css +6 -6
- package/lib/DropBox/css/cssJSLogic.js +1 -3
- package/lib/DropBox/props/defaultProps.js +4 -8
- package/lib/DropBox/props/propTypes.js +4 -10
- package/lib/DropDown/DropDown.js +5 -51
- package/lib/DropDown/DropDown.module.css +2 -2
- package/lib/DropDown/DropDownHeading.js +20 -39
- package/lib/DropDown/DropDownHeading.module.css +6 -6
- package/lib/DropDown/DropDownItem.js +20 -42
- package/lib/DropDown/DropDownItem.module.css +12 -12
- package/lib/DropDown/DropDownSearch.js +17 -40
- package/lib/DropDown/DropDownSearch.module.css +3 -3
- package/lib/DropDown/DropDownSeparator.js +4 -24
- package/lib/DropDown/DropDownSeparator.module.css +2 -2
- package/lib/DropDown/index.js +0 -9
- package/lib/DropDown/props/propTypes.js +4 -10
- package/lib/Heading/Heading.js +15 -37
- package/lib/Heading/Heading.module.css +2 -2
- package/lib/Heading/props/propTypes.js +0 -3
- package/lib/Label/Label.js +21 -41
- package/lib/Label/Label.module.css +5 -5
- package/lib/Label/__tests__/Label.spec.js +34 -48
- package/lib/Label/props/propTypes.js +0 -3
- package/lib/Layout/Box.js +15 -35
- package/lib/Layout/Container.js +14 -33
- package/lib/Layout/Layout.module.css +15 -15
- package/lib/Layout/index.js +0 -3
- package/lib/Layout/props/propTypes.js +0 -3
- package/lib/Layout/utils.js +0 -11
- package/lib/ListItem/ListContainer.js +30 -55
- package/lib/ListItem/ListItem.js +45 -74
- package/lib/ListItem/ListItem.module.css +38 -27
- package/lib/ListItem/ListItemWithAvatar.js +48 -80
- package/lib/ListItem/ListItemWithCheckBox.js +40 -70
- package/lib/ListItem/ListItemWithIcon.js +44 -73
- package/lib/ListItem/ListItemWithRadio.js +42 -71
- package/lib/ListItem/index.js +0 -7
- package/lib/ListItem/props/propTypes.js +4 -6
- package/lib/Modal/Modal.js +10 -45
- package/lib/Modal/props/propTypes.js +0 -3
- package/lib/MultiSelect/AdvancedGroupMultiSelect.js +166 -293
- package/lib/MultiSelect/AdvancedMultiSelect.js +125 -202
- package/lib/MultiSelect/EmptyState.js +24 -45
- package/lib/MultiSelect/MobileHeader/MobileHeader.js +5 -14
- package/lib/MultiSelect/MobileHeader/MobileHeader.module.css +5 -5
- package/lib/MultiSelect/MobileHeader/props/propTypes.js +0 -3
- package/lib/MultiSelect/MultiSelect.js +214 -333
- package/lib/MultiSelect/MultiSelect.module.css +31 -31
- package/lib/MultiSelect/MultiSelectHeader.js +7 -29
- package/lib/MultiSelect/MultiSelectWithAvatar.js +43 -85
- package/lib/MultiSelect/SelectedOptions.js +17 -43
- package/lib/MultiSelect/SelectedOptions.module.css +5 -5
- package/lib/MultiSelect/Suggestions.js +32 -64
- package/lib/MultiSelect/index.js +0 -5
- package/lib/MultiSelect/props/defaultProps.js +0 -2
- package/lib/MultiSelect/props/propTypes.js +4 -14
- package/lib/PopOver/PopOver.js +47 -94
- package/lib/PopOver/index.js +0 -4
- package/lib/PopOver/props/propTypes.js +0 -3
- package/lib/Popup/Popup.js +81 -158
- package/lib/Popup/viewPort.js +14 -28
- package/lib/Provider/AvatarSize.js +0 -4
- package/lib/Provider/Config.js +0 -2
- package/lib/Provider/CssProvider.js +0 -4
- package/lib/Provider/IdProvider.js +6 -17
- package/lib/Provider/LibraryContext.js +15 -35
- package/lib/Provider/LibraryContextInit.js +0 -4
- package/lib/Provider/NumberGenerator/NumberGenerator.js +15 -44
- package/lib/Provider/ZindexProvider.js +3 -15
- package/lib/Provider/index.js +0 -5
- package/lib/Radio/Radio.js +36 -60
- package/lib/Radio/Radio.module.css +9 -9
- package/lib/Radio/__tests__/Radio.spec.js +103 -134
- package/lib/Radio/props/propTypes.js +0 -3
- package/lib/Responsive/CustomResponsive.js +29 -73
- package/lib/Responsive/RefWrapper.js +11 -17
- package/lib/Responsive/ResizeComponent.js +36 -62
- package/lib/Responsive/ResizeObserver.js +10 -24
- package/lib/Responsive/Responsive.js +30 -80
- package/lib/Responsive/index.js +0 -4
- package/lib/Responsive/props/propTypes.js +0 -3
- package/lib/Responsive/sizeObservers.js +17 -53
- package/lib/Responsive/utils/index.js +3 -11
- package/lib/Responsive/utils/shallowCompare.js +2 -11
- package/lib/Responsive/windowResizeObserver.js +0 -8
- package/lib/ResponsiveDropBox/ResponsiveDropBox.js +17 -45
- package/lib/ResponsiveDropBox/ResponsiveDropBox.module.css +2 -2
- package/lib/ResponsiveDropBox/props/propTypes.js +4 -9
- package/lib/Ribbon/Ribbon.js +13 -33
- package/lib/Ribbon/Ribbon.module.css +48 -45
- package/lib/Ribbon/__tests__/Ribbon.spec.js +14 -24
- package/lib/Ribbon/props/propTypes.js +0 -3
- package/lib/RippleEffect/RippleEffect.js +10 -18
- package/lib/RippleEffect/__tests__/RippleEffect.spec.js +22 -34
- package/lib/RippleEffect/props/propTypes.js +0 -3
- package/lib/Select/GroupSelect.js +130 -229
- package/lib/Select/Select.js +212 -296
- package/lib/Select/Select.module.css +23 -23
- package/lib/Select/SelectWithAvatar.js +56 -102
- package/lib/Select/SelectWithIcon.js +76 -131
- package/lib/Select/index.js +0 -5
- package/lib/Select/props/defaultProps.js +4 -5
- package/lib/Select/props/propTypes.js +4 -10
- package/lib/Stencils/Stencils.js +10 -29
- package/lib/Stencils/Stencils.module.css +11 -11
- package/lib/Stencils/__tests__/Stencils.spec.js +13 -22
- package/lib/Stencils/props/propTypes.js +0 -3
- package/lib/Switch/Switch.js +34 -57
- package/lib/Switch/Switch.module.css +23 -23
- package/lib/Switch/__tests__/Switch.spec.js +72 -91
- package/lib/Switch/props/propTypes.js +0 -3
- package/lib/Tab/Tab.js +27 -40
- package/lib/Tab/Tab.module.css +14 -14
- package/lib/Tab/TabContent.js +5 -12
- package/lib/Tab/TabContentWrapper.js +13 -16
- package/lib/Tab/TabWrapper.js +19 -37
- package/lib/Tab/Tabs.js +91 -171
- package/lib/Tab/Tabs.module.css +22 -22
- package/lib/Tab/index.js +0 -6
- package/lib/Tab/props/defaultProps.js +2 -1
- package/lib/Tab/props/propTypes.js +3 -4
- package/lib/Tag/Tag.js +43 -72
- package/lib/Tag/Tag.module.css +26 -25
- package/lib/Tag/props/propTypes.js +0 -3
- package/lib/TextBox/TextBox.js +60 -86
- package/lib/TextBox/TextBox.module.css +10 -10
- package/lib/TextBox/props/propTypes.js +4 -6
- package/lib/TextBoxIcon/TextBoxIcon.js +53 -80
- package/lib/TextBoxIcon/TextBoxIcon.module.css +7 -7
- package/lib/TextBoxIcon/props/propTypes.js +4 -9
- package/lib/Textarea/Textarea.js +29 -54
- package/lib/Textarea/Textarea.module.css +22 -22
- package/lib/Textarea/props/propTypes.js +0 -3
- package/lib/Tooltip/Tooltip.js +31 -94
- package/lib/Tooltip/Tooltip.module.css +5 -9
- package/lib/Tooltip/props/propTypes.js +0 -3
- package/lib/VelocityAnimation/VelocityAnimation/VelocityAnimation.js +16 -40
- package/lib/VelocityAnimation/VelocityAnimation/props/propTypes.js +0 -3
- package/lib/VelocityAnimation/VelocityAnimationGroup/VelocityAnimationGroup.js +25 -53
- package/lib/VelocityAnimation/VelocityAnimationGroup/props/propTypes.js +0 -3
- package/lib/VelocityAnimation/index.js +0 -3
- package/lib/common/animation.module.css +8 -8
- package/lib/common/avatarsizes.module.css +16 -16
- package/lib/common/basicReset.module.css +3 -3
- package/lib/common/common.module.css +24 -24
- package/lib/common/customscroll.module.css +2 -12
- package/lib/css.js +0 -40
- package/lib/deprecated/PortalLayer/PortalLayer.js +23 -46
- package/lib/deprecated/PortalLayer/props/propTypes.js +0 -3
- package/lib/index.js +0 -58
- package/lib/semantic/Button/Button.js +22 -42
- package/lib/semantic/Button/props/propTypes.js +0 -3
- package/lib/semantic/Button/semanticButton.module.css +1 -1
- package/lib/semantic/index.js +0 -2
- package/lib/utils/Common.js +18 -111
- package/lib/utils/ContextOptimizer.js +10 -16
- package/lib/utils/constructFullName.js +4 -13
- package/lib/utils/datetime/common.js +5 -34
- package/lib/utils/debounce.js +1 -6
- package/lib/utils/dropDownUtils.js +59 -175
- package/lib/utils/dummyFunction.js +0 -2
- package/lib/utils/getHTMLFontSize.js +0 -1
- package/lib/utils/getInitial.js +0 -6
- package/lib/utils/index.js +0 -1
- package/lib/utils/scrollTo.js +0 -2
- package/lib/utils/shallowEqual.js +0 -8
- package/lib/v1/Accordion/Accordion.js +19 -38
- package/lib/v1/Accordion/AccordionItem.js +13 -23
- package/lib/v1/Accordion/index.js +0 -3
- package/lib/v1/Accordion/props/propTypes.js +0 -3
- package/lib/v1/Animation/Animation.js +14 -20
- package/lib/v1/Animation/props/propTypes.js +0 -3
- package/lib/v1/AppContainer/AppContainer.js +17 -46
- package/lib/v1/AppContainer/props/propTypes.js +0 -3
- package/lib/v1/Avatar/Avatar.js +32 -68
- package/lib/v1/Avatar/props/propTypes.js +0 -3
- package/lib/v1/AvatarTeam/AvatarTeam.js +24 -32
- package/lib/v1/AvatarTeam/props/propTypes.js +0 -3
- package/lib/v1/Button/Button.js +22 -32
- package/lib/v1/Button/props/defaultProps.js +0 -2
- package/lib/v1/Button/props/propTypes.js +0 -3
- package/lib/v1/Buttongroup/Buttongroup.js +5 -13
- package/lib/v1/Buttongroup/props/propTypes.js +0 -3
- package/lib/v1/Card/Card.js +44 -78
- package/lib/v1/Card/index.js +0 -4
- package/lib/v1/Card/props/propTypes.js +0 -3
- package/lib/v1/CheckBox/CheckBox.js +41 -52
- package/lib/v1/CheckBox/props/propTypes.js +0 -3
- package/lib/v1/DateTime/CalendarView.js +48 -89
- package/lib/v1/DateTime/DateTime.js +158 -246
- package/lib/v1/DateTime/DateTimePopupFooter.js +8 -33
- package/lib/v1/DateTime/DateTimePopupHeader.js +17 -49
- package/lib/v1/DateTime/DateWidget.js +251 -352
- package/lib/v1/DateTime/DaysRow.js +5 -28
- package/lib/v1/DateTime/Time.js +32 -75
- package/lib/v1/DateTime/YearView.js +27 -76
- package/lib/v1/DateTime/index.js +0 -2
- package/lib/v1/DateTime/props/propTypes.js +1 -11
- package/lib/v1/DropBox/DropBox.js +21 -45
- package/lib/v1/DropBox/DropBoxElement/DropBoxElement.js +40 -60
- package/lib/v1/DropBox/DropBoxElement/props/propTypes.js +0 -3
- package/lib/v1/DropBox/props/defaultProps.js +4 -8
- package/lib/v1/DropBox/props/propTypes.js +4 -10
- package/lib/v1/DropDown/DropDown.js +3 -23
- package/lib/v1/DropDown/DropDownHeading.js +13 -20
- package/lib/v1/DropDown/DropDownItem.js +11 -26
- package/lib/v1/DropDown/DropDownSearch.js +16 -28
- package/lib/v1/DropDown/DropDownSeparator.js +1 -7
- package/lib/v1/DropDown/props/propTypes.js +4 -10
- package/lib/v1/Heading/Heading.js +14 -19
- package/lib/v1/Heading/props/propTypes.js +0 -3
- package/lib/v1/Label/Label.js +14 -22
- package/lib/v1/Label/props/propTypes.js +0 -3
- package/lib/v1/Layout/Box.js +15 -35
- package/lib/v1/Layout/Container.js +14 -33
- package/lib/v1/Layout/index.js +0 -3
- package/lib/v1/Layout/props/propTypes.js +0 -3
- package/lib/v1/ListItem/ListContainer.js +30 -55
- package/lib/v1/ListItem/ListItem.js +38 -53
- package/lib/v1/ListItem/ListItemWithAvatar.js +39 -62
- package/lib/v1/ListItem/ListItemWithCheckBox.js +34 -49
- package/lib/v1/ListItem/ListItemWithIcon.js +37 -52
- package/lib/v1/ListItem/ListItemWithRadio.js +35 -49
- package/lib/v1/ListItem/index.js +0 -7
- package/lib/v1/ListItem/props/propTypes.js +4 -6
- package/lib/v1/Modal/Modal.js +9 -46
- package/lib/v1/Modal/props/propTypes.js +0 -3
- package/lib/v1/MultiSelect/AdvancedGroupMultiSelect.js +168 -294
- package/lib/v1/MultiSelect/AdvancedMultiSelect.js +125 -202
- package/lib/v1/MultiSelect/EmptyState.js +24 -45
- package/lib/v1/MultiSelect/MobileHeader/MobileHeader.js +5 -14
- package/lib/v1/MultiSelect/MobileHeader/props/propTypes.js +0 -3
- package/lib/v1/MultiSelect/MultiSelect.js +216 -335
- package/lib/v1/MultiSelect/MultiSelectHeader.js +7 -29
- package/lib/v1/MultiSelect/MultiSelectWithAvatar.js +43 -86
- package/lib/v1/MultiSelect/SelectedOptions.js +17 -43
- package/lib/v1/MultiSelect/Suggestions.js +32 -64
- package/lib/v1/MultiSelect/index.js +0 -5
- package/lib/v1/MultiSelect/props/defaultProps.js +0 -2
- package/lib/v1/MultiSelect/props/propTypes.js +4 -14
- package/lib/v1/PopOver/PopOver.js +40 -71
- package/lib/v1/PopOver/props/propTypes.js +0 -3
- package/lib/v1/Popup/Popup.js +81 -158
- package/lib/v1/Provider/AvatarSize.js +0 -4
- package/lib/v1/Provider/Config.js +0 -2
- package/lib/v1/Provider/CssProvider.js +0 -4
- package/lib/v1/Provider/IdProvider.js +6 -17
- package/lib/v1/Provider/LibraryContext.js +15 -35
- package/lib/v1/Provider/LibraryContextInit.js +0 -4
- package/lib/v1/Provider/NumberGenerator/NumberGenerator.js +15 -44
- package/lib/v1/Provider/ZindexProvider.js +3 -15
- package/lib/v1/Provider/index.js +0 -5
- package/lib/v1/Radio/Radio.js +32 -42
- package/lib/v1/Radio/props/propTypes.js +0 -3
- package/lib/v1/Responsive/CustomResponsive.js +29 -73
- package/lib/v1/Responsive/RefWrapper.js +11 -17
- package/lib/v1/Responsive/ResizeComponent.js +36 -62
- package/lib/v1/Responsive/ResizeObserver.js +10 -24
- package/lib/v1/Responsive/Responsive.js +30 -80
- package/lib/v1/Responsive/index.js +0 -4
- package/lib/v1/Responsive/props/propTypes.js +0 -3
- package/lib/v1/ResponsiveDropBox/ResponsiveDropBox.js +13 -27
- package/lib/v1/ResponsiveDropBox/props/propTypes.js +4 -9
- package/lib/v1/Ribbon/Ribbon.js +7 -14
- package/lib/v1/Ribbon/props/propTypes.js +0 -3
- package/lib/v1/RippleEffect/RippleEffect.js +7 -17
- package/lib/v1/RippleEffect/props/propTypes.js +0 -3
- package/lib/v1/Select/GroupSelect.js +130 -229
- package/lib/v1/Select/Select.js +215 -298
- package/lib/v1/Select/SelectWithAvatar.js +56 -102
- package/lib/v1/Select/SelectWithIcon.js +76 -131
- package/lib/v1/Select/index.js +0 -5
- package/lib/v1/Select/props/defaultProps.js +4 -5
- package/lib/v1/Select/props/propTypes.js +4 -10
- package/lib/v1/Stencils/Stencils.js +3 -13
- package/lib/v1/Stencils/props/propTypes.js +0 -3
- package/lib/v1/Switch/Switch.js +25 -38
- package/lib/v1/Switch/props/propTypes.js +0 -3
- package/lib/v1/Tab/Tab.js +27 -40
- package/lib/v1/Tab/TabContent.js +5 -12
- package/lib/v1/Tab/TabContentWrapper.js +13 -16
- package/lib/v1/Tab/TabWrapper.js +19 -37
- package/lib/v1/Tab/Tabs.js +83 -170
- package/lib/v1/Tab/index.js +0 -6
- package/lib/v1/Tab/props/defaultProps.js +2 -1
- package/lib/v1/Tab/props/propTypes.js +3 -4
- package/lib/v1/Tab/v1Tab.module.css +14 -14
- package/lib/v1/Tab/v1Tabs.module.css +22 -22
- package/lib/v1/Tag/Tag.js +32 -50
- package/lib/v1/Tag/props/propTypes.js +0 -3
- package/lib/v1/TextBox/TextBox.js +47 -70
- package/lib/v1/TextBox/props/propTypes.js +4 -6
- package/lib/v1/TextBoxIcon/TextBoxIcon.js +55 -80
- package/lib/v1/TextBoxIcon/props/propTypes.js +4 -9
- package/lib/v1/Textarea/Textarea.js +28 -45
- package/lib/v1/Textarea/props/propTypes.js +0 -3
- package/lib/v1/Tooltip/Tooltip.js +31 -94
- package/lib/v1/Tooltip/props/propTypes.js +0 -3
- package/lib/v1/Typography/Typography.js +15 -26
- package/lib/v1/Typography/css/Typography.module.css +31 -31
- package/lib/v1/Typography/css/cssJSLogic.js +20 -25
- package/lib/v1/Typography/props/propTypes.js +0 -3
- package/lib/v1/Typography/utils/index.js +0 -1
- package/lib/v1/VelocityAnimation/VelocityAnimation/VelocityAnimation.js +12 -25
- package/lib/v1/VelocityAnimation/VelocityAnimation/props/propTypes.js +0 -3
- package/lib/v1/VelocityAnimation/VelocityAnimationGroup/VelocityAnimationGroup.js +22 -38
- package/lib/v1/VelocityAnimation/VelocityAnimationGroup/props/propTypes.js +0 -3
- package/lib/v1/semantic/Button/Button.js +18 -24
- package/lib/v1/semantic/Button/props/propTypes.js +0 -3
- package/lib/v1/semantic/index.js +0 -2
- package/package.json +13 -12
- package/propValidationArg.json +2 -2
- package/result.json +1 -1
- /package/.cli/{AppearanceThemeValidationExcludeFiles.js → ThemeValidationExcludeFiles.js} +0 -0
|
@@ -1,85 +1,50 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
4
|
-
|
|
5
4
|
Object.defineProperty(exports, "__esModule", {
|
|
6
5
|
value: true
|
|
7
6
|
});
|
|
8
7
|
exports["default"] = void 0;
|
|
9
|
-
|
|
10
8
|
var _react = _interopRequireDefault(require("react"));
|
|
11
|
-
|
|
12
9
|
var _propTypes = require("./props/propTypes");
|
|
13
|
-
|
|
14
10
|
var _defaultProps = require("./props/defaultProps");
|
|
15
|
-
|
|
16
11
|
var _DateTime = _interopRequireDefault(require("./DateTime"));
|
|
17
|
-
|
|
18
12
|
var _Popup = _interopRequireDefault(require("../Popup/Popup"));
|
|
19
|
-
|
|
20
13
|
var _icons = require("@zohodesk/icons");
|
|
21
|
-
|
|
22
14
|
var _Layout = require("../Layout");
|
|
23
|
-
|
|
24
15
|
var _TextBoxIcon = _interopRequireDefault(require("../TextBoxIcon/TextBoxIcon"));
|
|
25
|
-
|
|
26
16
|
var _DateWidgetModule = _interopRequireDefault(require("./DateWidget.module.css"));
|
|
27
|
-
|
|
28
17
|
var _validator = _interopRequireDefault(require("./validator"));
|
|
29
|
-
|
|
30
18
|
var _common = require("../utils/datetime/common");
|
|
31
|
-
|
|
32
19
|
var _dateFormatUtils = require("./dateFormatUtils");
|
|
33
|
-
|
|
34
20
|
var _dateFormat = require("./dateFormatUtils/dateFormat");
|
|
35
|
-
|
|
36
21
|
var _dayChange = require("./dateFormatUtils/dayChange");
|
|
37
|
-
|
|
38
22
|
var _monthChange = require("./dateFormatUtils/monthChange");
|
|
39
|
-
|
|
40
23
|
var _yearChange = require("./dateFormatUtils/yearChange");
|
|
41
|
-
|
|
42
24
|
var _timeChange = require("./dateFormatUtils/timeChange");
|
|
43
|
-
|
|
44
25
|
var _Common = require("../utils/Common");
|
|
45
|
-
|
|
46
26
|
var _constants = require("./constants");
|
|
47
|
-
|
|
48
27
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
49
|
-
|
|
50
28
|
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
51
|
-
|
|
52
|
-
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
|
|
53
|
-
|
|
29
|
+
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }
|
|
54
30
|
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
|
55
|
-
|
|
31
|
+
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
32
|
+
function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
56
33
|
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
|
|
57
|
-
|
|
58
34
|
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
59
|
-
|
|
60
35
|
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
61
|
-
|
|
62
36
|
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return _assertThisInitialized(self); }
|
|
63
|
-
|
|
64
37
|
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
65
|
-
|
|
66
38
|
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; } }
|
|
67
|
-
|
|
68
39
|
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
69
|
-
|
|
70
40
|
/* eslint-disable react/no-unused-prop-types */
|
|
71
|
-
|
|
72
41
|
/* eslint css-modules/no-unused-class: [0, { markAsUsed: 'inputLine'] }] */
|
|
73
42
|
var DateWidgetComponent = /*#__PURE__*/function (_React$Component) {
|
|
74
43
|
_inherits(DateWidgetComponent, _React$Component);
|
|
75
|
-
|
|
76
44
|
var _super = _createSuper(DateWidgetComponent);
|
|
77
|
-
|
|
78
45
|
function DateWidgetComponent(props) {
|
|
79
46
|
var _this;
|
|
80
|
-
|
|
81
47
|
_classCallCheck(this, DateWidgetComponent);
|
|
82
|
-
|
|
83
48
|
_this = _super.call(this, props);
|
|
84
49
|
_this.handleSelect = _this.handleSelect.bind(_assertThisInitialized(_this));
|
|
85
50
|
_this.handleTogglePopup = _this.handleTogglePopup.bind(_assertThisInitialized(_this));
|
|
@@ -119,27 +84,21 @@ var DateWidgetComponent = /*#__PURE__*/function (_React$Component) {
|
|
|
119
84
|
_this.oldFocusOrder = '';
|
|
120
85
|
_this.focusOrder = '';
|
|
121
86
|
_this.oldKeyDownAction = ''; //'Arrow' || 'valueTyped'
|
|
122
|
-
|
|
123
87
|
_this.keyDownAction = ''; //'Arrow' || 'valueTyped'
|
|
124
|
-
|
|
125
88
|
_this.isMouseDown = false;
|
|
126
89
|
return _this;
|
|
127
90
|
}
|
|
128
|
-
|
|
129
91
|
_createClass(DateWidgetComponent, [{
|
|
130
92
|
key: "componentDidMount",
|
|
131
93
|
value: function componentDidMount() {
|
|
132
94
|
var validation = this.props.validation;
|
|
133
95
|
var selected = this.state.selected;
|
|
134
|
-
|
|
135
96
|
if (validation && validation.validate) {
|
|
136
97
|
this.validateOnSelect(selected, this.props);
|
|
137
98
|
}
|
|
138
|
-
|
|
139
99
|
var _this$handleGetDispla = this.handleGetDisplayText(this.props),
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
100
|
+
displayText = _this$handleGetDispla.displayText,
|
|
101
|
+
newSelected = _this$handleGetDispla.selected;
|
|
143
102
|
this.setState({
|
|
144
103
|
displayText: displayText,
|
|
145
104
|
selected: newSelected
|
|
@@ -150,39 +109,35 @@ var DateWidgetComponent = /*#__PURE__*/function (_React$Component) {
|
|
|
150
109
|
key: "componentDidUpdate",
|
|
151
110
|
value: function componentDidUpdate(prevProps, prevState) {
|
|
152
111
|
var _this$state = this.state,
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
112
|
+
selected = _this$state.selected,
|
|
113
|
+
day = _this$state.day,
|
|
114
|
+
month = _this$state.month,
|
|
115
|
+
year = _this$state.year,
|
|
116
|
+
hour = _this$state.hour,
|
|
117
|
+
minute = _this$state.minute,
|
|
118
|
+
noon = _this$state.noon,
|
|
119
|
+
isDateEdited = _this$state.isDateEdited,
|
|
120
|
+
stateFocusOrder = _this$state.stateFocusOrder,
|
|
121
|
+
isFocused = _this$state.isFocused;
|
|
163
122
|
var _this$props = this.props,
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
123
|
+
value = _this$props.value,
|
|
124
|
+
validation = _this$props.validation,
|
|
125
|
+
isPopupReady = _this$props.isPopupReady,
|
|
126
|
+
_this$props$dateForma = _this$props.dateFormat,
|
|
127
|
+
dateFormat = _this$props$dateForma === void 0 ? '' : _this$props$dateForma,
|
|
128
|
+
is24Hour = _this$props.is24Hour,
|
|
129
|
+
isHideCurrentYear = _this$props.isHideCurrentYear;
|
|
172
130
|
if (validation && validation.validate) {
|
|
173
131
|
this.validateOnSelect(selected, this.props);
|
|
174
132
|
}
|
|
175
|
-
|
|
176
133
|
if (value !== prevProps.value || dateFormat !== prevProps.dateFormat || is24Hour !== prevProps.is24Hour || isHideCurrentYear !== prevProps.isHideCurrentYear) {
|
|
177
134
|
var _this$handleGetDispla2 = this.handleGetDisplayText(this.props),
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
135
|
+
displayText = _this$handleGetDispla2.displayText,
|
|
136
|
+
_selected = _this$handleGetDispla2.selected;
|
|
181
137
|
this.setState({
|
|
182
138
|
selected: _selected,
|
|
183
139
|
displayText: displayText
|
|
184
140
|
});
|
|
185
|
-
|
|
186
141
|
if (value !== _constants.INVALID_DATE) {
|
|
187
142
|
this.setState({
|
|
188
143
|
day: '',
|
|
@@ -196,30 +151,29 @@ var DateWidgetComponent = /*#__PURE__*/function (_React$Component) {
|
|
|
196
151
|
});
|
|
197
152
|
}
|
|
198
153
|
}
|
|
199
|
-
|
|
200
154
|
if (prevProps.isPopupReady !== isPopupReady) {
|
|
201
155
|
if (isPopupReady) {
|
|
202
156
|
this.resetLocalDate && this.resetLocalDate();
|
|
203
157
|
}
|
|
204
158
|
}
|
|
205
|
-
|
|
206
159
|
var haveLocalValue = [day, month, year, hour, minute, noon].some(function (value) {
|
|
207
160
|
return !(0, _Common.getIsEmptyValue)(value);
|
|
208
161
|
});
|
|
209
|
-
|
|
210
162
|
if (isDateEdited !== haveLocalValue) {
|
|
211
163
|
this.setState({
|
|
212
164
|
isDateEdited: haveLocalValue
|
|
213
165
|
});
|
|
214
166
|
}
|
|
215
|
-
|
|
216
167
|
if (value !== prevProps.value || dateFormat !== prevProps.dateFormat || is24Hour !== prevProps.is24Hour || (0, _dateFormatUtils.arrayIsNotEqual)([day, month, year, hour, minute, noon], [prevState.day, prevState.month, prevState.year, prevState.hour, prevState.minute, prevState.noon])) {
|
|
217
168
|
this.handleSelectionRangeDetails(this.props);
|
|
218
|
-
}
|
|
169
|
+
}
|
|
219
170
|
|
|
171
|
+
// if (stateFocusOrder !== prevState.stateFocusOrder) {
|
|
220
172
|
|
|
221
173
|
isFocused && !(0, _Common.getIsEmptyValue)(stateFocusOrder) && this.handleSelection(stateFocusOrder);
|
|
222
|
-
this.handleBlurSelectionRange(stateFocusOrder, prevState.stateFocusOrder);
|
|
174
|
+
this.handleBlurSelectionRange(stateFocusOrder, prevState.stateFocusOrder);
|
|
175
|
+
// }
|
|
176
|
+
|
|
223
177
|
// if (prevProps.isPopupOpen !== isPopupOpen) {
|
|
224
178
|
// if (!isPopupOpen) {
|
|
225
179
|
// this.valueInput && this.valueInput.focus({preventScroll:true});
|
|
@@ -230,16 +184,14 @@ var DateWidgetComponent = /*#__PURE__*/function (_React$Component) {
|
|
|
230
184
|
key: "handleSelect",
|
|
231
185
|
value: function handleSelect(userZoneSelectedTime, fotmattedValue, e) {
|
|
232
186
|
var _this$props2 = this.props,
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
187
|
+
id = _this$props2.id,
|
|
188
|
+
onSelect = _this$props2.onSelect,
|
|
189
|
+
closePopupOnly = _this$props2.closePopupOnly,
|
|
190
|
+
validation = _this$props2.validation;
|
|
238
191
|
if (validation && validation.validateOn) {
|
|
239
192
|
var selected = this.state.selected;
|
|
240
193
|
this.validateOnSelect(selected, this.props);
|
|
241
194
|
}
|
|
242
|
-
|
|
243
195
|
onSelect && onSelect(userZoneSelectedTime, id);
|
|
244
196
|
this.valueInput && this.valueInput.focus({
|
|
245
197
|
preventScroll: true
|
|
@@ -253,20 +205,17 @@ var DateWidgetComponent = /*#__PURE__*/function (_React$Component) {
|
|
|
253
205
|
var defaultValidateRules = ['required'];
|
|
254
206
|
var defaultType = 'onegroup';
|
|
255
207
|
var validation = props.validation,
|
|
256
|
-
|
|
257
|
-
|
|
208
|
+
onPassValidation = props.onPassValidation,
|
|
209
|
+
onFailValidation = props.onFailValidation;
|
|
258
210
|
var targetTag = this.elementRef;
|
|
259
|
-
|
|
260
211
|
if (validation) {
|
|
261
212
|
//validateOn won't work here ...
|
|
262
213
|
var newValidation = _validator["default"].combinePropsValidation(this.props, defaultType, 'onSelect', validation, defaultCheckPropsRules, defaultValidateRules);
|
|
263
|
-
|
|
264
214
|
var validationObj = {
|
|
265
215
|
validation: newValidation,
|
|
266
216
|
onPassValidation: onPassValidation,
|
|
267
217
|
onFailValidation: onFailValidation
|
|
268
218
|
};
|
|
269
|
-
|
|
270
219
|
_validator["default"].executeValidation(value, targetTag, validationObj, defaultType);
|
|
271
220
|
} else {
|
|
272
221
|
onPassValidation && onPassValidation(value, targetTag);
|
|
@@ -276,12 +225,11 @@ var DateWidgetComponent = /*#__PURE__*/function (_React$Component) {
|
|
|
276
225
|
key: "handleTogglePopup",
|
|
277
226
|
value: function handleTogglePopup(e, isOpenOnly) {
|
|
278
227
|
var _this$props3 = this.props,
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
228
|
+
togglePopup = _this$props3.togglePopup,
|
|
229
|
+
_this$props3$defaultP = _this$props3.defaultPosition,
|
|
230
|
+
defaultPosition = _this$props3$defaultP === void 0 ? 'bottom' : _this$props3$defaultP,
|
|
231
|
+
isPopupOpen = _this$props3.isPopupOpen,
|
|
232
|
+
removeClose = _this$props3.removeClose;
|
|
285
233
|
if (isOpenOnly) {
|
|
286
234
|
if (!isPopupOpen) {
|
|
287
235
|
togglePopup(e, "".concat(defaultPosition, "Right"));
|
|
@@ -289,26 +237,26 @@ var DateWidgetComponent = /*#__PURE__*/function (_React$Component) {
|
|
|
289
237
|
removeClose(e);
|
|
290
238
|
}
|
|
291
239
|
}
|
|
292
|
-
|
|
293
240
|
!isOpenOnly && togglePopup(e, "".concat(defaultPosition, "Right"));
|
|
294
241
|
}
|
|
295
242
|
}, {
|
|
296
243
|
key: "handleSelectionRangeDetails",
|
|
297
244
|
value: function handleSelectionRangeDetails(props) {
|
|
298
245
|
var timeZone = props.timeZone,
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
246
|
+
dateFormat = props.dateFormat,
|
|
247
|
+
isDateTime = props.isDateTime,
|
|
248
|
+
value = props.value,
|
|
249
|
+
is24Hour = props.is24Hour;
|
|
303
250
|
var _this$state2 = this.state,
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
var selected = value === _constants.INVALID_DATE ? '' : value;
|
|
251
|
+
day = _this$state2.day,
|
|
252
|
+
month = _this$state2.month,
|
|
253
|
+
year = _this$state2.year,
|
|
254
|
+
hour = _this$state2.hour,
|
|
255
|
+
minute = _this$state2.minute,
|
|
256
|
+
noon = _this$state2.noon;
|
|
257
|
+
var selected = value === _constants.INVALID_DATE ? '' : value;
|
|
311
258
|
|
|
259
|
+
//New UI Changes
|
|
312
260
|
var dateFormatDetails = (0, _dateFormat.getDateFormatDetails)(dateFormat, {
|
|
313
261
|
isHideCurrentYear: false,
|
|
314
262
|
value: value,
|
|
@@ -339,11 +287,11 @@ var DateWidgetComponent = /*#__PURE__*/function (_React$Component) {
|
|
|
339
287
|
key: "handleGetDisplayText",
|
|
340
288
|
value: function handleGetDisplayText(props) {
|
|
341
289
|
var timeZone = props.timeZone,
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
290
|
+
dateFormat = props.dateFormat,
|
|
291
|
+
isDateTime = props.isDateTime,
|
|
292
|
+
value = props.value,
|
|
293
|
+
is24Hour = props.is24Hour,
|
|
294
|
+
isHideCurrentYear = props.isHideCurrentYear;
|
|
347
295
|
var dateFormatDetails = (0, _dateFormat.getDateFormatDetails)(dateFormat, {
|
|
348
296
|
isHideCurrentYear: isHideCurrentYear,
|
|
349
297
|
value: value,
|
|
@@ -353,18 +301,14 @@ var DateWidgetComponent = /*#__PURE__*/function (_React$Component) {
|
|
|
353
301
|
var newDateFormat = dateFormatDetails.dateFormat;
|
|
354
302
|
var displayText = '';
|
|
355
303
|
var selected = value === _constants.INVALID_DATE ? '' : value;
|
|
356
|
-
|
|
357
304
|
if (selected) {
|
|
358
305
|
var format = newDateFormat,
|
|
359
|
-
|
|
360
|
-
|
|
306
|
+
convertedValue = (0, _dateFormat.getDateText)(value, isDateTime, timeZone);
|
|
361
307
|
if (isDateTime) {
|
|
362
308
|
format = "".concat(newDateFormat, " ").concat(is24Hour ? 'HH:mm' : 'hh:mm A');
|
|
363
309
|
}
|
|
364
|
-
|
|
365
310
|
displayText = (0, _common.formatDate)(convertedValue, format);
|
|
366
311
|
}
|
|
367
|
-
|
|
368
312
|
return {
|
|
369
313
|
displayText: displayText,
|
|
370
314
|
selected: selected
|
|
@@ -375,20 +319,18 @@ var DateWidgetComponent = /*#__PURE__*/function (_React$Component) {
|
|
|
375
319
|
value: function handleKeyDown(e) {
|
|
376
320
|
var keyCode = e.keyCode;
|
|
377
321
|
var _this$props4 = this.props,
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
322
|
+
isPopupOpen = _this$props4.isPopupOpen,
|
|
323
|
+
isPopupOpenOnEnter = _this$props4.isPopupOpenOnEnter,
|
|
324
|
+
onKeyDown = _this$props4.onKeyDown,
|
|
325
|
+
closePopupOnly = _this$props4.closePopupOnly,
|
|
326
|
+
cantEditOnPopupOpen = _this$props4.cantEditOnPopupOpen;
|
|
383
327
|
var isAllowedDateType = this.handleGetAllowedType();
|
|
384
|
-
|
|
385
328
|
if (isPopupOpen) {
|
|
386
329
|
if (keyCode === 9 && !isAllowedDateType) {
|
|
387
330
|
//on tab click popup close
|
|
388
331
|
closePopupOnly(e);
|
|
389
|
-
}
|
|
390
|
-
|
|
391
|
-
|
|
332
|
+
}
|
|
333
|
+
// ~~~~~~~ handle date navigation in dateTime popup ~~~~~
|
|
392
334
|
if (isAllowedDateType) {
|
|
393
335
|
cantEditOnPopupOpen && this.handleDateType(e);
|
|
394
336
|
}
|
|
@@ -416,13 +358,12 @@ var DateWidgetComponent = /*#__PURE__*/function (_React$Component) {
|
|
|
416
358
|
value: function handleFocus() {
|
|
417
359
|
var isAllowedDateType = this.handleGetAllowedType();
|
|
418
360
|
var isMouseDown = this.isMouseDown;
|
|
419
|
-
|
|
420
361
|
if (isAllowedDateType && !isMouseDown) {
|
|
421
362
|
var dateFormatSelection = this.state.dateFormatSelection;
|
|
422
363
|
var focusedIndex = dateFormatSelection.focusedIndex;
|
|
423
364
|
var _this$valueInput = this.valueInput,
|
|
424
|
-
|
|
425
|
-
|
|
365
|
+
newSelectionStart = _this$valueInput.selectionStart,
|
|
366
|
+
newSelectionEnd = _this$valueInput.selectionEnd;
|
|
426
367
|
var focusedOrder = focusedIndex["".concat(newSelectionStart, "_").concat(newSelectionEnd)] || 0;
|
|
427
368
|
isAllowedDateType && this.setState({
|
|
428
369
|
stateFocusOrder: focusedOrder,
|
|
@@ -436,7 +377,6 @@ var DateWidgetComponent = /*#__PURE__*/function (_React$Component) {
|
|
|
436
377
|
isFocused: true
|
|
437
378
|
});
|
|
438
379
|
}
|
|
439
|
-
|
|
440
380
|
var onFocus = this.props.onFocus;
|
|
441
381
|
onFocus && onFocus();
|
|
442
382
|
}
|
|
@@ -449,7 +389,9 @@ var DateWidgetComponent = /*#__PURE__*/function (_React$Component) {
|
|
|
449
389
|
this.keyDownAction = '';
|
|
450
390
|
this.setState({
|
|
451
391
|
isFocused: false
|
|
452
|
-
});
|
|
392
|
+
});
|
|
393
|
+
|
|
394
|
+
// const { valueInput } = this;
|
|
453
395
|
// document.getSelection().removeAllRanges();
|
|
454
396
|
// valueInput && valueInput.setSelectionRange(0, 0);
|
|
455
397
|
|
|
@@ -461,8 +403,8 @@ var DateWidgetComponent = /*#__PURE__*/function (_React$Component) {
|
|
|
461
403
|
value: function handleGetMethods(methods) {
|
|
462
404
|
var getMethods = this.props.getMethods;
|
|
463
405
|
var resetLocalDate = methods.resetLocalDate,
|
|
464
|
-
|
|
465
|
-
|
|
406
|
+
getStateValues = methods.getStateValues,
|
|
407
|
+
toggleYearView = methods.toggleYearView;
|
|
466
408
|
this.resetLocalDate = resetLocalDate;
|
|
467
409
|
this.getDateTimeStateValues = getStateValues;
|
|
468
410
|
this.DateTimeYearViewToggle = toggleYearView;
|
|
@@ -472,75 +414,67 @@ var DateWidgetComponent = /*#__PURE__*/function (_React$Component) {
|
|
|
472
414
|
key: "handleDateType",
|
|
473
415
|
value: function handleDateType(e) {
|
|
474
416
|
var _this2 = this;
|
|
475
|
-
|
|
476
417
|
var keyCode = e.keyCode,
|
|
477
|
-
|
|
418
|
+
shiftKey = e.shiftKey;
|
|
478
419
|
var input = e.target;
|
|
479
|
-
|
|
480
420
|
if ((0, _dateFormatUtils.getIsSupportedKey)(e)) {
|
|
481
421
|
e.preventDefault();
|
|
482
422
|
}
|
|
483
|
-
|
|
484
423
|
var _this$props5 = this.props,
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
424
|
+
isDateTime = _this$props5.isDateTime,
|
|
425
|
+
timeZone = _this$props5.timeZone,
|
|
426
|
+
value = _this$props5.value,
|
|
427
|
+
onSelect = _this$props5.onSelect,
|
|
428
|
+
id = _this$props5.id,
|
|
429
|
+
min = _this$props5.min,
|
|
430
|
+
max = _this$props5.max,
|
|
431
|
+
minErrorText = _this$props5.minErrorText,
|
|
432
|
+
maxErrorText = _this$props5.maxErrorText,
|
|
433
|
+
onError = _this$props5.onError,
|
|
434
|
+
closePopupOnly = _this$props5.closePopupOnly,
|
|
435
|
+
is24Hour = _this$props5.is24Hour;
|
|
497
436
|
var _this$state3 = this.state,
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
437
|
+
dateFormatSelection = _this$state3.dateFormatSelection,
|
|
438
|
+
day = _this$state3.day,
|
|
439
|
+
month = _this$state3.month,
|
|
440
|
+
year = _this$state3.year,
|
|
441
|
+
hour = _this$state3.hour,
|
|
442
|
+
minute = _this$state3.minute,
|
|
443
|
+
noon = _this$state3.noon,
|
|
444
|
+
selected = _this$state3.selected,
|
|
445
|
+
dateFormatDetails = _this$state3.dateFormatDetails;
|
|
507
446
|
var focusedIndex = dateFormatSelection.focusedIndex,
|
|
508
|
-
|
|
447
|
+
order = dateFormatSelection.order;
|
|
509
448
|
var yearInfo = dateFormatDetails.yearInfo;
|
|
510
|
-
|
|
511
449
|
var _getDateDetails = (0, _dateFormat.getDateDetails)(selected, {
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
450
|
+
day: day,
|
|
451
|
+
month: month,
|
|
452
|
+
year: year,
|
|
453
|
+
hour: hour,
|
|
454
|
+
minute: minute,
|
|
455
|
+
noon: noon
|
|
456
|
+
}, isDateTime, timeZone, {
|
|
457
|
+
is24Hour: is24Hour
|
|
458
|
+
}),
|
|
459
|
+
_getDateDetails$day = _getDateDetails.day,
|
|
460
|
+
selectedDay = _getDateDetails$day === void 0 ? '' : _getDateDetails$day,
|
|
461
|
+
_getDateDetails$month = _getDateDetails.month,
|
|
462
|
+
selectedMonth = _getDateDetails$month === void 0 ? '' : _getDateDetails$month,
|
|
463
|
+
_getDateDetails$year = _getDateDetails.year,
|
|
464
|
+
selectedYear = _getDateDetails$year === void 0 ? '' : _getDateDetails$year,
|
|
465
|
+
_getDateDetails$hour = _getDateDetails.hour,
|
|
466
|
+
selectedHour = _getDateDetails$hour === void 0 ? '' : _getDateDetails$hour,
|
|
467
|
+
_getDateDetails$minut = _getDateDetails.minute,
|
|
468
|
+
selectedMinute = _getDateDetails$minut === void 0 ? '' : _getDateDetails$minut,
|
|
469
|
+
_getDateDetails$noon = _getDateDetails.noon,
|
|
470
|
+
selectedNoon = _getDateDetails$noon === void 0 ? '' : _getDateDetails$noon;
|
|
534
471
|
var newSelectionStart = input.selectionStart,
|
|
535
|
-
|
|
472
|
+
newSelectionEnd = input.selectionEnd;
|
|
536
473
|
var focusedOrder = focusedIndex["".concat(newSelectionStart, "_").concat(newSelectionEnd)];
|
|
537
|
-
|
|
538
474
|
var _ref = order[focusedOrder] || {},
|
|
539
|
-
|
|
540
|
-
|
|
475
|
+
type = _ref.type;
|
|
541
476
|
this.oldFocusOrder = this.focusOrder;
|
|
542
477
|
this.focusOrder = focusedOrder;
|
|
543
|
-
|
|
544
478
|
if (keyCode === 38 || keyCode === 40) {
|
|
545
479
|
//up arrow && down arrow
|
|
546
480
|
this.oldKeyDownAction = this.keyDownAction;
|
|
@@ -549,7 +483,6 @@ var DateWidgetComponent = /*#__PURE__*/function (_React$Component) {
|
|
|
549
483
|
this.oldKeyDownAction = this.keyDownAction;
|
|
550
484
|
this.keyDownAction = 'valueTyped';
|
|
551
485
|
}
|
|
552
|
-
|
|
553
486
|
var focusedOrders = {
|
|
554
487
|
focusOrder: this.focusOrder,
|
|
555
488
|
oldFocusOrder: this.oldFocusOrder
|
|
@@ -559,14 +492,13 @@ var DateWidgetComponent = /*#__PURE__*/function (_React$Component) {
|
|
|
559
492
|
keyAction: this.keyDownAction
|
|
560
493
|
};
|
|
561
494
|
var newDay = selectedDay,
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
495
|
+
newMonth = selectedMonth,
|
|
496
|
+
newYear = selectedYear,
|
|
497
|
+
newHour = selectedHour,
|
|
498
|
+
newMinute = selectedMinute,
|
|
499
|
+
newNoon = selectedNoon,
|
|
500
|
+
isValueChanged = false,
|
|
501
|
+
newFocusOrder = focusedOrder;
|
|
570
502
|
if (keyCode === 9 && shiftKey && !(0, _Common.getIsEmptyValue)(focusedOrder) && focusedOrder !== 0) {
|
|
571
503
|
e.preventDefault();
|
|
572
504
|
this.setState({
|
|
@@ -600,7 +532,6 @@ var DateWidgetComponent = /*#__PURE__*/function (_React$Component) {
|
|
|
600
532
|
month: selectedMonth,
|
|
601
533
|
year: selectedYear
|
|
602
534
|
}, e, focusedOrders, keyActions);
|
|
603
|
-
|
|
604
535
|
newDay = _getChangedDay.day;
|
|
605
536
|
isValueChanged = _getChangedDay.isChanged;
|
|
606
537
|
newFocusOrder = _getChangedDay.focusOrder;
|
|
@@ -610,7 +541,6 @@ var DateWidgetComponent = /*#__PURE__*/function (_React$Component) {
|
|
|
610
541
|
month: selectedMonth,
|
|
611
542
|
year: selectedYear
|
|
612
543
|
}, e, focusedOrders, keyActions);
|
|
613
|
-
|
|
614
544
|
newMonth = _getChangedMonth.month;
|
|
615
545
|
isValueChanged = _getChangedMonth.isChanged;
|
|
616
546
|
newFocusOrder = _getChangedMonth.focusOrder;
|
|
@@ -622,7 +552,6 @@ var DateWidgetComponent = /*#__PURE__*/function (_React$Component) {
|
|
|
622
552
|
}, e, focusedOrders, keyActions, {
|
|
623
553
|
yearInfo: yearInfo
|
|
624
554
|
});
|
|
625
|
-
|
|
626
555
|
newYear = _getChangedYear.year;
|
|
627
556
|
isValueChanged = _getChangedYear.isChanged;
|
|
628
557
|
newFocusOrder = _getChangedYear.focusOrder;
|
|
@@ -632,7 +561,6 @@ var DateWidgetComponent = /*#__PURE__*/function (_React$Component) {
|
|
|
632
561
|
}, e, focusedOrders, keyActions, {
|
|
633
562
|
is24Hour: is24Hour
|
|
634
563
|
});
|
|
635
|
-
|
|
636
564
|
newHour = _getChangedHour.hour;
|
|
637
565
|
isValueChanged = _getChangedHour.isChanged;
|
|
638
566
|
newFocusOrder = _getChangedHour.focusOrder;
|
|
@@ -640,7 +568,6 @@ var DateWidgetComponent = /*#__PURE__*/function (_React$Component) {
|
|
|
640
568
|
var _getChangedMinute = (0, _timeChange.getChangedMinute)({
|
|
641
569
|
minute: selectedMinute
|
|
642
570
|
}, e, focusedOrders, keyActions);
|
|
643
|
-
|
|
644
571
|
newMinute = _getChangedMinute.minute;
|
|
645
572
|
isValueChanged = _getChangedMinute.isChanged;
|
|
646
573
|
newFocusOrder = _getChangedMinute.focusOrder;
|
|
@@ -648,12 +575,10 @@ var DateWidgetComponent = /*#__PURE__*/function (_React$Component) {
|
|
|
648
575
|
var _getChangedNoon = (0, _timeChange.getChangedNoon)({
|
|
649
576
|
noon: selectedNoon
|
|
650
577
|
}, e, focusedOrders, keyActions);
|
|
651
|
-
|
|
652
578
|
newNoon = _getChangedNoon.noon;
|
|
653
579
|
isValueChanged = _getChangedNoon.isChanged;
|
|
654
580
|
newFocusOrder = _getChangedNoon.focusOrder;
|
|
655
581
|
}
|
|
656
|
-
|
|
657
582
|
if (isValueChanged) {
|
|
658
583
|
var currentValue = {
|
|
659
584
|
day: newDay,
|
|
@@ -663,7 +588,6 @@ var DateWidgetComponent = /*#__PURE__*/function (_React$Component) {
|
|
|
663
588
|
minute: newMinute,
|
|
664
589
|
noon: newNoon
|
|
665
590
|
};
|
|
666
|
-
|
|
667
591
|
var errorCaseHandle = function errorCaseHandle(isEmptyValError) {
|
|
668
592
|
_this2.setState(function () {
|
|
669
593
|
return {
|
|
@@ -678,38 +602,33 @@ var DateWidgetComponent = /*#__PURE__*/function (_React$Component) {
|
|
|
678
602
|
isError: !isEmptyValError
|
|
679
603
|
};
|
|
680
604
|
});
|
|
681
|
-
|
|
682
605
|
var newSelected = isEmptyValError ? '' : _constants.INVALID_DATE;
|
|
683
606
|
value !== newSelected && onSelect && onSelect(newSelected, id);
|
|
684
607
|
};
|
|
685
|
-
|
|
686
608
|
var _getIsValidDate = (0, _dateFormat.getIsValidDate)(currentValue, isDateTime, {
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
609
|
+
is24Hour: is24Hour
|
|
610
|
+
}),
|
|
611
|
+
isError = _getIsValidDate.isError,
|
|
612
|
+
isEmptyValError = _getIsValidDate.isEmptyValError;
|
|
692
613
|
if (isError) {
|
|
693
614
|
errorCaseHandle(isEmptyValError);
|
|
694
615
|
} else {
|
|
695
616
|
var _getSelectedDate = (0, _dateFormat.getSelectedDate)(currentValue, {
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
617
|
+
min: min,
|
|
618
|
+
max: max,
|
|
619
|
+
timeZone: timeZone,
|
|
620
|
+
isDateTime: isDateTime,
|
|
621
|
+
is24Hour: is24Hour
|
|
622
|
+
}),
|
|
623
|
+
selectedValue = _getSelectedDate.selectedValue,
|
|
624
|
+
selectedDateError = _getSelectedDate.isError,
|
|
625
|
+
errorType = _getSelectedDate.errorType;
|
|
706
626
|
if (selectedDateError) {
|
|
707
627
|
if (errorType === 'MIN') {
|
|
708
628
|
onError && onError(minErrorText, true);
|
|
709
629
|
} else if (errorType === 'MAX') {
|
|
710
630
|
onError && onError(maxErrorText, true);
|
|
711
631
|
}
|
|
712
|
-
|
|
713
632
|
errorCaseHandle();
|
|
714
633
|
} else {
|
|
715
634
|
this.setState(function () {
|
|
@@ -735,23 +654,17 @@ var DateWidgetComponent = /*#__PURE__*/function (_React$Component) {
|
|
|
735
654
|
value: function handleSelection() {
|
|
736
655
|
var focusOrder = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0;
|
|
737
656
|
var isAllowedDateType = this.handleGetAllowedType();
|
|
738
|
-
|
|
739
657
|
if (isAllowedDateType) {
|
|
740
658
|
var dateFormatSelection = this.state.dateFormatSelection;
|
|
741
659
|
var _dateFormatSelection$ = dateFormatSelection.order,
|
|
742
|
-
|
|
743
|
-
|
|
660
|
+
order = _dateFormatSelection$ === void 0 ? {} : _dateFormatSelection$;
|
|
744
661
|
var _ref2 = order[focusOrder] || {},
|
|
745
|
-
|
|
746
|
-
|
|
662
|
+
index = _ref2.index;
|
|
747
663
|
if (!index) {
|
|
748
664
|
focusOrder = 0;
|
|
749
|
-
|
|
750
665
|
var _ref3 = order[focusOrder] || {};
|
|
751
|
-
|
|
752
666
|
index = _ref3.index;
|
|
753
667
|
}
|
|
754
|
-
|
|
755
668
|
if (index && this.valueInput) {
|
|
756
669
|
document.getSelection().removeAllRanges();
|
|
757
670
|
this.valueInput.setSelectionRange(index[0], index[1]);
|
|
@@ -769,31 +682,26 @@ var DateWidgetComponent = /*#__PURE__*/function (_React$Component) {
|
|
|
769
682
|
var clickIndex = dateFormatSelection.clickIndex;
|
|
770
683
|
var focusOrder = clickIndex[selectionEnd] || clickIndex[selectionEnd - 1] || 0;
|
|
771
684
|
var isAllowedDateType = this.handleGetAllowedType();
|
|
772
|
-
|
|
773
685
|
if (isAllowedDateType) {
|
|
774
686
|
this.setState({
|
|
775
687
|
stateFocusOrder: focusOrder,
|
|
776
688
|
isFocused: true
|
|
777
689
|
});
|
|
778
690
|
}
|
|
779
|
-
|
|
780
691
|
if (!isAllowedDateType) {
|
|
781
692
|
this.handleTogglePopup(e);
|
|
782
693
|
} else {
|
|
783
694
|
var _this$props6 = this.props,
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
|
|
695
|
+
isPopupOpenOnClick = _this$props6.isPopupOpenOnClick,
|
|
696
|
+
isReadOnly = _this$props6.isReadOnly,
|
|
697
|
+
isDisabled = _this$props6.isDisabled;
|
|
788
698
|
if (isPopupOpenOnClick && (!isReadOnly || !isDisabled)) {
|
|
789
699
|
this.handleTogglePopup(e, true);
|
|
790
700
|
}
|
|
791
|
-
|
|
792
701
|
var _this$props7 = this.props,
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
|
|
702
|
+
isPopupCloseOnClick = _this$props7.isPopupCloseOnClick,
|
|
703
|
+
isPopupOpen = _this$props7.isPopupOpen,
|
|
704
|
+
closePopupOnly = _this$props7.closePopupOnly;
|
|
797
705
|
if (isPopupCloseOnClick && !isPopupOpen) {
|
|
798
706
|
closePopupOnly && closePopupOnly(e);
|
|
799
707
|
}
|
|
@@ -808,49 +716,47 @@ var DateWidgetComponent = /*#__PURE__*/function (_React$Component) {
|
|
|
808
716
|
key: "handleGetShowValue",
|
|
809
717
|
value: function handleGetShowValue() {
|
|
810
718
|
var _this$state4 = this.state,
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
|
|
719
|
+
day = _this$state4.day,
|
|
720
|
+
month = _this$state4.month,
|
|
721
|
+
year = _this$state4.year,
|
|
722
|
+
hour = _this$state4.hour,
|
|
723
|
+
minute = _this$state4.minute,
|
|
724
|
+
noon = _this$state4.noon,
|
|
725
|
+
dateFormatDetails = _this$state4.dateFormatDetails,
|
|
726
|
+
displayText = _this$state4.displayText,
|
|
727
|
+
newDateFormat = _this$state4.newDateFormat,
|
|
728
|
+
isDateEdited = _this$state4.isDateEdited,
|
|
729
|
+
isFocused = _this$state4.isFocused,
|
|
730
|
+
selected = _this$state4.selected;
|
|
823
731
|
var _this$props8 = this.props,
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
|
|
827
|
-
|
|
828
|
-
|
|
829
|
-
|
|
732
|
+
isDateTime = _this$props8.isDateTime,
|
|
733
|
+
is24Hour = _this$props8.is24Hour,
|
|
734
|
+
isPopupReady = _this$props8.isPopupReady,
|
|
735
|
+
timeZone = _this$props8.timeZone,
|
|
736
|
+
isPopupOpen = _this$props8.isPopupOpen;
|
|
830
737
|
if (isDateEdited || isFocused || isPopupReady || isPopupOpen) {
|
|
831
738
|
var _getDateDetails2 = (0, _dateFormat.getDateDetails)(selected, {
|
|
832
|
-
|
|
833
|
-
|
|
834
|
-
|
|
835
|
-
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
|
|
839
|
-
|
|
840
|
-
|
|
841
|
-
|
|
842
|
-
|
|
843
|
-
|
|
844
|
-
|
|
845
|
-
|
|
846
|
-
|
|
847
|
-
|
|
848
|
-
|
|
849
|
-
|
|
850
|
-
|
|
851
|
-
|
|
852
|
-
|
|
853
|
-
|
|
739
|
+
day: day,
|
|
740
|
+
month: month,
|
|
741
|
+
year: year,
|
|
742
|
+
hour: hour,
|
|
743
|
+
minute: minute,
|
|
744
|
+
noon: noon
|
|
745
|
+
}, isDateTime, timeZone, {
|
|
746
|
+
is24Hour: is24Hour
|
|
747
|
+
}),
|
|
748
|
+
_getDateDetails2$day = _getDateDetails2.day,
|
|
749
|
+
selectedDay = _getDateDetails2$day === void 0 ? '' : _getDateDetails2$day,
|
|
750
|
+
_getDateDetails2$mont = _getDateDetails2.month,
|
|
751
|
+
selectedMonth = _getDateDetails2$mont === void 0 ? '' : _getDateDetails2$mont,
|
|
752
|
+
_getDateDetails2$year = _getDateDetails2.year,
|
|
753
|
+
selectedYear = _getDateDetails2$year === void 0 ? '' : _getDateDetails2$year,
|
|
754
|
+
_getDateDetails2$hour = _getDateDetails2.hour,
|
|
755
|
+
selectedHour = _getDateDetails2$hour === void 0 ? '' : _getDateDetails2$hour,
|
|
756
|
+
_getDateDetails2$minu = _getDateDetails2.minute,
|
|
757
|
+
selectedMinute = _getDateDetails2$minu === void 0 ? '' : _getDateDetails2$minu,
|
|
758
|
+
_getDateDetails2$noon = _getDateDetails2.noon,
|
|
759
|
+
selectedNoon = _getDateDetails2$noon === void 0 ? '' : _getDateDetails2$noon;
|
|
854
760
|
var dateTimeString = (0, _dateFormat.getDateTimeString)({
|
|
855
761
|
day: selectedDay,
|
|
856
762
|
month: selectedMonth,
|
|
@@ -867,7 +773,6 @@ var DateWidgetComponent = /*#__PURE__*/function (_React$Component) {
|
|
|
867
773
|
} else if (displayText) {
|
|
868
774
|
return displayText;
|
|
869
775
|
}
|
|
870
|
-
|
|
871
776
|
var timeFormat = is24Hour ? ' HH:mm' : ' hh:mm --';
|
|
872
777
|
var dateTimeFormat = isDateTime ? "".concat(newDateFormat).concat(timeFormat) : newDateFormat;
|
|
873
778
|
return dateTimeFormat || '';
|
|
@@ -876,27 +781,24 @@ var DateWidgetComponent = /*#__PURE__*/function (_React$Component) {
|
|
|
876
781
|
key: "handleGetAllowedType",
|
|
877
782
|
value: function handleGetAllowedType() {
|
|
878
783
|
var _this$props9 = this.props,
|
|
879
|
-
|
|
880
|
-
|
|
881
|
-
|
|
882
|
-
|
|
784
|
+
isReadOnly = _this$props9.isReadOnly,
|
|
785
|
+
isDisabled = _this$props9.isDisabled,
|
|
786
|
+
isEditable = _this$props9.isEditable;
|
|
883
787
|
if (isEditable) {
|
|
884
788
|
if (isReadOnly || isDisabled) {
|
|
885
789
|
return false;
|
|
886
790
|
}
|
|
887
|
-
|
|
888
791
|
return true;
|
|
889
792
|
}
|
|
890
|
-
|
|
891
793
|
return false;
|
|
892
794
|
}
|
|
893
795
|
}, {
|
|
894
796
|
key: "handleDateClear",
|
|
895
797
|
value: function handleDateClear() {
|
|
896
798
|
var _this$props10 = this.props,
|
|
897
|
-
|
|
898
|
-
|
|
899
|
-
|
|
799
|
+
id = _this$props10.id,
|
|
800
|
+
onSelect = _this$props10.onSelect,
|
|
801
|
+
value = _this$props10.value;
|
|
900
802
|
this.setState({
|
|
901
803
|
day: '',
|
|
902
804
|
month: '',
|
|
@@ -908,7 +810,8 @@ var DateWidgetComponent = /*#__PURE__*/function (_React$Component) {
|
|
|
908
810
|
stateFocusOrder: 0,
|
|
909
811
|
isError: false
|
|
910
812
|
});
|
|
911
|
-
value && onSelect && onSelect('', id);
|
|
813
|
+
value && onSelect && onSelect('', id);
|
|
814
|
+
// this.valueInput && this.valueInput.focus({ preventScroll: true });
|
|
912
815
|
}
|
|
913
816
|
}, {
|
|
914
817
|
key: "handleDateTimeClear",
|
|
@@ -931,85 +834,82 @@ var DateWidgetComponent = /*#__PURE__*/function (_React$Component) {
|
|
|
931
834
|
var focusOrder = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
|
|
932
835
|
var oldFocusOrder = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '';
|
|
933
836
|
var isAllowedDateType = this.handleGetAllowedType();
|
|
934
|
-
|
|
935
837
|
if (isAllowedDateType) {
|
|
936
838
|
// if (focusOrder !== oldFocusOrder) {
|
|
937
839
|
var _this$state$dateForma = this.state.dateFormatSelection,
|
|
938
|
-
|
|
840
|
+
dateFormatSelection = _this$state$dateForma === void 0 ? {} : _this$state$dateForma;
|
|
939
841
|
var _dateFormatSelection$2 = dateFormatSelection.order,
|
|
940
|
-
|
|
941
|
-
var isPopupOpen = this.props.isPopupOpen;
|
|
842
|
+
order = _dateFormatSelection$2 === void 0 ? [] : _dateFormatSelection$2;
|
|
843
|
+
var isPopupOpen = this.props.isPopupOpen;
|
|
942
844
|
|
|
845
|
+
// const { type: oldFocusedType = '' } = order[oldFocusOrder] || {};
|
|
943
846
|
var _ref4 = order[focusOrder] || {},
|
|
944
|
-
|
|
945
|
-
|
|
946
|
-
|
|
847
|
+
_ref4$type = _ref4.type,
|
|
848
|
+
focusedType = _ref4$type === void 0 ? '' : _ref4$type;
|
|
947
849
|
var _this$getDateTimeStat = this.getDateTimeStateValues(),
|
|
948
|
-
|
|
949
|
-
|
|
950
|
-
|
|
850
|
+
isYearView = _this$getDateTimeStat.isYearView,
|
|
851
|
+
oldIsMonthOpen = _this$getDateTimeStat.isMonthOpen;
|
|
951
852
|
var yearViewTypes = ['month', 'year'];
|
|
952
853
|
var isMonthOpen = focusedType === 'month';
|
|
953
|
-
|
|
954
854
|
if (isPopupOpen) {
|
|
955
855
|
if (yearViewTypes.indexOf(focusedType) >= 0 && (!isYearView || isMonthOpen !== oldIsMonthOpen)) {
|
|
956
856
|
this.DateTimeYearViewToggle(true, isMonthOpen);
|
|
957
857
|
} else if (yearViewTypes.indexOf(focusedType) === -1 && isYearView) {
|
|
958
858
|
this.DateTimeYearViewToggle(false, false);
|
|
959
859
|
}
|
|
960
|
-
}
|
|
961
|
-
|
|
860
|
+
}
|
|
861
|
+
// }
|
|
962
862
|
}
|
|
963
863
|
}
|
|
964
864
|
}, {
|
|
965
865
|
key: "render",
|
|
966
866
|
value: function render() {
|
|
967
867
|
var _this$props11 = this.props,
|
|
968
|
-
|
|
969
|
-
|
|
970
|
-
|
|
971
|
-
|
|
972
|
-
|
|
973
|
-
|
|
974
|
-
|
|
975
|
-
|
|
976
|
-
|
|
977
|
-
|
|
978
|
-
|
|
979
|
-
|
|
980
|
-
|
|
981
|
-
|
|
982
|
-
|
|
983
|
-
|
|
984
|
-
|
|
985
|
-
|
|
986
|
-
|
|
987
|
-
|
|
988
|
-
|
|
989
|
-
|
|
990
|
-
|
|
991
|
-
|
|
992
|
-
|
|
993
|
-
|
|
994
|
-
|
|
995
|
-
|
|
996
|
-
|
|
997
|
-
|
|
998
|
-
|
|
999
|
-
|
|
1000
|
-
|
|
1001
|
-
|
|
1002
|
-
|
|
1003
|
-
|
|
1004
|
-
|
|
1005
|
-
|
|
1006
|
-
|
|
868
|
+
removeClose = _this$props11.removeClose,
|
|
869
|
+
minErrorText = _this$props11.minErrorText,
|
|
870
|
+
maxErrorText = _this$props11.maxErrorText,
|
|
871
|
+
min = _this$props11.min,
|
|
872
|
+
max = _this$props11.max,
|
|
873
|
+
placeholder = _this$props11.placeholder,
|
|
874
|
+
isPopupOpen = _this$props11.isPopupOpen,
|
|
875
|
+
isPopupReady = _this$props11.isPopupReady,
|
|
876
|
+
isDateTime = _this$props11.isDateTime,
|
|
877
|
+
position = _this$props11.position,
|
|
878
|
+
textBoxVariant = _this$props11.textBoxVariant,
|
|
879
|
+
textBoxSize = _this$props11.textBoxSize,
|
|
880
|
+
_this$props11$childre = _this$props11.children,
|
|
881
|
+
children = _this$props11$childre === void 0 ? null : _this$props11$childre,
|
|
882
|
+
isDisabled = _this$props11.isDisabled,
|
|
883
|
+
getContainerRef = _this$props11.getContainerRef,
|
|
884
|
+
getTargetRef = _this$props11.getTargetRef,
|
|
885
|
+
timeZone = _this$props11.timeZone,
|
|
886
|
+
isReadOnly = _this$props11.isReadOnly,
|
|
887
|
+
dataId = _this$props11.dataId,
|
|
888
|
+
needResponsive = _this$props11.needResponsive,
|
|
889
|
+
className = _this$props11.className,
|
|
890
|
+
needBorder = _this$props11.needBorder,
|
|
891
|
+
defaultTime = _this$props11.defaultTime,
|
|
892
|
+
needDefaultTime = _this$props11.needDefaultTime,
|
|
893
|
+
borderColor = _this$props11.borderColor,
|
|
894
|
+
i18nKeys = _this$props11.i18nKeys,
|
|
895
|
+
needErrorOnBlur = _this$props11.needErrorOnBlur,
|
|
896
|
+
htmlId = _this$props11.htmlId,
|
|
897
|
+
iconOnHover = _this$props11.iconOnHover,
|
|
898
|
+
is24Hour = _this$props11.is24Hour,
|
|
899
|
+
isAbsolutePositioningNeeded = _this$props11.isAbsolutePositioningNeeded,
|
|
900
|
+
positionsOffset = _this$props11.positionsOffset,
|
|
901
|
+
targetOffset = _this$props11.targetOffset,
|
|
902
|
+
isRestrictScroll = _this$props11.isRestrictScroll,
|
|
903
|
+
dropBoxPortalId = _this$props11.dropBoxPortalId,
|
|
904
|
+
a11y = _this$props11.a11y,
|
|
905
|
+
boxSize = _this$props11.boxSize,
|
|
906
|
+
onError = _this$props11.onError;
|
|
1007
907
|
var _this$state5 = this.state,
|
|
1008
|
-
|
|
1009
|
-
|
|
1010
|
-
|
|
1011
|
-
|
|
1012
|
-
|
|
908
|
+
_this$state5$selected = _this$state5.selected,
|
|
909
|
+
value = _this$state5$selected === void 0 ? '' : _this$state5$selected,
|
|
910
|
+
isError = _this$state5.isError,
|
|
911
|
+
isDateEdited = _this$state5.isDateEdited,
|
|
912
|
+
isFocused = _this$state5.isFocused;
|
|
1013
913
|
var showValue = this.handleGetShowValue();
|
|
1014
914
|
var isAllowedDateType = this.handleGetAllowedType();
|
|
1015
915
|
var showClear = !(isDisabled || isReadOnly) && (isDateEdited || value) ? true : false;
|
|
@@ -1096,15 +996,15 @@ var DateWidgetComponent = /*#__PURE__*/function (_React$Component) {
|
|
|
1096
996
|
}));
|
|
1097
997
|
}
|
|
1098
998
|
}]);
|
|
1099
|
-
|
|
1100
999
|
return DateWidgetComponent;
|
|
1101
1000
|
}(_react["default"].Component);
|
|
1102
|
-
|
|
1103
1001
|
DateWidgetComponent.defaultProps = _defaultProps.DateWidget_defaultProps;
|
|
1104
1002
|
DateWidgetComponent.propTypes = _propTypes.DateWidget_propTypes;
|
|
1105
1003
|
var DateWidget = (0, _Popup["default"])(DateWidgetComponent);
|
|
1106
1004
|
DateWidget.defaultProps = DateWidgetComponent.defaultProps;
|
|
1107
|
-
DateWidget.propTypes = DateWidgetComponent.propTypes;
|
|
1005
|
+
DateWidget.propTypes = DateWidgetComponent.propTypes;
|
|
1006
|
+
|
|
1007
|
+
// eslint-disable-next-line no-undef
|
|
1108
1008
|
// if (__DOCS__) {
|
|
1109
1009
|
// DateWidgetComponent.docs = {
|
|
1110
1010
|
// componentGroup: 'Form Elements',
|
|
@@ -1115,6 +1015,5 @@ DateWidget.propTypes = DateWidgetComponent.propTypes; // eslint-disable-next-lin
|
|
|
1115
1015
|
// // eslint-disable-next-line react/forbid-foreign-prop-types
|
|
1116
1016
|
// DateWidget.propTypes = DateWidgetComponent.propTypes;
|
|
1117
1017
|
// }
|
|
1118
|
-
|
|
1119
1018
|
var _default = DateWidget;
|
|
1120
1019
|
exports["default"] = _default;
|