@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
|
@@ -4,29 +4,26 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.getChangedDay = getChangedDay;
|
|
7
|
-
|
|
8
7
|
var _index = require("./index");
|
|
9
|
-
|
|
10
8
|
var _Common = require("../../utils/Common");
|
|
11
|
-
|
|
12
9
|
/** * Methods ** */
|
|
10
|
+
|
|
13
11
|
function getChangedDay(values, event, focusOrders, keyActions) {
|
|
14
12
|
var keyCode = event.keyCode,
|
|
15
|
-
|
|
13
|
+
which = event.which;
|
|
16
14
|
var _values$day = values.day,
|
|
17
|
-
|
|
15
|
+
day = _values$day === void 0 ? '' : _values$day;
|
|
18
16
|
var isChanged = false;
|
|
19
|
-
var newDay = Number.parseInt(day) || 0;
|
|
17
|
+
var newDay = Number.parseInt(day) || 0;
|
|
18
|
+
// const newMonth = Number.parseInt(month) || 0;
|
|
20
19
|
// const newYear = Number.parseInt(year) || 0;
|
|
21
20
|
|
|
22
21
|
var focusOrder = focusOrders.focusOrder;
|
|
23
22
|
var newFocusOrder = focusOrder;
|
|
24
23
|
var isNewType = (0, _index.getIsNewValueType)(focusOrders, keyActions);
|
|
25
|
-
|
|
26
24
|
var _getDayDetails = (0, _index.getDayDetails)(),
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
25
|
+
startPoint = _getDayDetails.startPoint,
|
|
26
|
+
endPoint = _getDayDetails.endPoint;
|
|
30
27
|
if (keyCode === 38) {
|
|
31
28
|
//up arrow
|
|
32
29
|
if (newDay === endPoint || !newDay) {
|
|
@@ -49,19 +46,15 @@ function getChangedDay(values, event, focusOrders, keyActions) {
|
|
|
49
46
|
var keyString = (0, _Common.getKeyValue)(event);
|
|
50
47
|
var newValue = isNewType ? keyString : day.toString() + keyString;
|
|
51
48
|
newValue = Number.parseInt(newValue);
|
|
52
|
-
|
|
53
49
|
if (isNewType) {
|
|
54
50
|
isChanged = true;
|
|
55
|
-
|
|
56
51
|
if (newValue * 10 > endPoint) {
|
|
57
52
|
newFocusOrder += 1;
|
|
58
53
|
}
|
|
59
|
-
|
|
60
54
|
newDay = newValue;
|
|
61
55
|
} else {
|
|
62
56
|
isChanged = true;
|
|
63
57
|
newFocusOrder += 1;
|
|
64
|
-
|
|
65
58
|
if (newValue > endPoint) {
|
|
66
59
|
newDay = endPoint;
|
|
67
60
|
} else if (!newValue) {
|
|
@@ -74,7 +67,6 @@ function getChangedDay(values, event, focusOrders, keyActions) {
|
|
|
74
67
|
isChanged = true;
|
|
75
68
|
newDay = '';
|
|
76
69
|
}
|
|
77
|
-
|
|
78
70
|
return {
|
|
79
71
|
day: newDay,
|
|
80
72
|
isChanged: isChanged,
|
|
@@ -26,27 +26,22 @@ exports.getMonthDetails = getMonthDetails;
|
|
|
26
26
|
exports.getNoonDetails = getNoonDetails;
|
|
27
27
|
exports.getYearDetails = getYearDetails;
|
|
28
28
|
exports.removeYearPattern = removeYearPattern;
|
|
29
|
-
|
|
30
29
|
var _common = require("../../utils/datetime/common");
|
|
31
|
-
|
|
32
30
|
var _constants = require("../constants");
|
|
33
|
-
|
|
34
31
|
var _dateFormat = require("./dateFormat");
|
|
35
|
-
|
|
36
32
|
/* eslint-disable no-param-reassign */
|
|
37
33
|
|
|
38
34
|
/** * Methods ** */
|
|
39
35
|
|
|
40
36
|
/** * Constants ** */
|
|
37
|
+
|
|
41
38
|
function convertYearToTwoDigit(year) {
|
|
42
39
|
return parseInt(year.toString().slice(-2));
|
|
43
40
|
}
|
|
44
|
-
|
|
45
41
|
function addZero() {
|
|
46
42
|
var value = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
|
|
47
43
|
var length = arguments.length > 1 ? arguments[1] : undefined;
|
|
48
44
|
var newValue = value.toString();
|
|
49
|
-
|
|
50
45
|
for (var i = 0; i < length; i++) {
|
|
51
46
|
if (newValue.length < length) {
|
|
52
47
|
newValue = "0".concat(newValue);
|
|
@@ -54,70 +49,56 @@ function addZero() {
|
|
|
54
49
|
break;
|
|
55
50
|
}
|
|
56
51
|
}
|
|
57
|
-
|
|
58
52
|
return newValue;
|
|
59
53
|
}
|
|
60
|
-
|
|
61
54
|
function getDayEnd(month, year) {
|
|
62
55
|
month -= 1;
|
|
63
56
|
var monthend = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];
|
|
64
|
-
|
|
65
57
|
if (month && year) {
|
|
66
58
|
return (0, _common.getMonthEnd)(month, year);
|
|
67
59
|
} else if (month) {
|
|
68
60
|
return monthend[month];
|
|
69
61
|
}
|
|
70
|
-
|
|
71
62
|
return 31;
|
|
72
63
|
}
|
|
73
|
-
|
|
74
64
|
function getIsNumberTyped(event) {
|
|
75
65
|
var keyCode = event.keyCode,
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
66
|
+
ctrlKey = event.ctrlKey,
|
|
67
|
+
metaKey = event.metaKey,
|
|
68
|
+
shiftKey = event.shiftKey;
|
|
80
69
|
if ((keyCode >= 48 && keyCode <= 57 || keyCode >= 96 && keyCode <= 105) && !ctrlKey && !metaKey && !shiftKey) {
|
|
81
70
|
return true;
|
|
82
71
|
}
|
|
83
|
-
|
|
84
72
|
return false;
|
|
85
73
|
}
|
|
86
|
-
|
|
87
74
|
function getIsDeleteTyped(keyCode) {
|
|
88
75
|
if (keyCode === 8) {
|
|
89
76
|
return true;
|
|
90
77
|
}
|
|
91
|
-
|
|
92
78
|
return false;
|
|
93
79
|
}
|
|
94
|
-
|
|
95
80
|
function getIsNewValueType(focusOrders, keyActions) {
|
|
96
81
|
var focusOrder = focusOrders.focusOrder,
|
|
97
|
-
|
|
82
|
+
oldFocusOrder = focusOrders.oldFocusOrder;
|
|
98
83
|
var oldKeyAction = keyActions.oldKeyAction,
|
|
99
|
-
|
|
84
|
+
keyAction = keyActions.keyAction;
|
|
100
85
|
return focusOrder !== oldFocusOrder || oldKeyAction !== keyAction;
|
|
101
86
|
}
|
|
102
|
-
|
|
103
87
|
function getDayDetails() {
|
|
104
88
|
return {
|
|
105
89
|
startPoint: 1,
|
|
106
90
|
endPoint: 31
|
|
107
91
|
};
|
|
108
92
|
}
|
|
109
|
-
|
|
110
93
|
function getMonthDetails() {
|
|
111
94
|
return {
|
|
112
95
|
startPoint: 1,
|
|
113
96
|
endPoint: 12
|
|
114
97
|
};
|
|
115
98
|
}
|
|
116
|
-
|
|
117
99
|
function getYearDetails(yearLength) {
|
|
118
100
|
var dateObj = new Date();
|
|
119
101
|
var year = dateObj.getFullYear();
|
|
120
|
-
|
|
121
102
|
if (yearLength === 2) {
|
|
122
103
|
return {
|
|
123
104
|
startPoint: 0,
|
|
@@ -125,14 +106,12 @@ function getYearDetails(yearLength) {
|
|
|
125
106
|
currentYear: year
|
|
126
107
|
};
|
|
127
108
|
}
|
|
128
|
-
|
|
129
109
|
return {
|
|
130
110
|
startPoint: 1850,
|
|
131
111
|
endPoint: 9999,
|
|
132
112
|
currentYear: year
|
|
133
113
|
};
|
|
134
114
|
}
|
|
135
|
-
|
|
136
115
|
function convertTwoDigitToYear() {
|
|
137
116
|
var digitValue = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
|
|
138
117
|
var selectedYear = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '';
|
|
@@ -140,139 +119,106 @@ function convertTwoDigitToYear() {
|
|
|
140
119
|
var year = dateObj.getFullYear();
|
|
141
120
|
var digitValueStr = addZero(digitValue.toString(), 2);
|
|
142
121
|
year = selectedYear ? selectedYear : year;
|
|
143
|
-
|
|
144
122
|
if (digitValueStr && digitValueStr.length <= 2) {
|
|
145
123
|
return parseInt(year.toString().slice(0, 2) + digitValueStr);
|
|
146
124
|
}
|
|
147
|
-
|
|
148
125
|
return digitValue;
|
|
149
126
|
}
|
|
150
|
-
|
|
151
127
|
function getHourDetails(is24Hour) {
|
|
152
128
|
return {
|
|
153
129
|
startPoint: is24Hour ? 0 : 1,
|
|
154
130
|
endPoint: is24Hour ? 23 : 12
|
|
155
131
|
};
|
|
156
132
|
}
|
|
157
|
-
|
|
158
133
|
function getHourSuggestions(is24Hour) {
|
|
159
134
|
var _getHourDetails = getHourDetails(is24Hour),
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
135
|
+
startPoint = _getHourDetails.startPoint,
|
|
136
|
+
endPoint = _getHourDetails.endPoint;
|
|
163
137
|
var hourArr = [];
|
|
164
|
-
|
|
165
138
|
for (var hour = startPoint; hour <= endPoint; hour++) {
|
|
166
139
|
var htxt = addZeroIfNeeded(hour);
|
|
167
140
|
hourArr.push(htxt);
|
|
168
141
|
}
|
|
169
|
-
|
|
170
142
|
return hourArr;
|
|
171
143
|
}
|
|
172
|
-
|
|
173
144
|
function getMinuteDetails() {
|
|
174
145
|
return {
|
|
175
146
|
startPoint: 0,
|
|
176
147
|
endPoint: 59
|
|
177
148
|
};
|
|
178
149
|
}
|
|
179
|
-
|
|
180
150
|
function getMinuteSuggestions() {
|
|
181
151
|
var _getMinuteDetails = getMinuteDetails(),
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
152
|
+
startPoint = _getMinuteDetails.startPoint,
|
|
153
|
+
endPoint = _getMinuteDetails.endPoint;
|
|
185
154
|
var minArr = [];
|
|
186
|
-
|
|
187
155
|
for (var minute = startPoint; minute <= endPoint; minute++) {
|
|
188
156
|
var mtxt = addZeroIfNeeded(minute);
|
|
189
157
|
minArr.push(mtxt);
|
|
190
158
|
}
|
|
191
|
-
|
|
192
159
|
return minArr;
|
|
193
160
|
}
|
|
194
|
-
|
|
195
161
|
function addZeroIfNeeded(value) {
|
|
196
162
|
return value < 10 ? "0".concat(value) : value;
|
|
197
163
|
}
|
|
198
|
-
|
|
199
164
|
function getIsNoonValueTyped(event) {
|
|
200
165
|
var keyCode = event.keyCode;
|
|
201
|
-
|
|
202
166
|
if (keyCode === 65 || keyCode === 77 || keyCode === 80) {
|
|
203
167
|
//A -65
|
|
204
168
|
//M -77
|
|
205
169
|
//P -80
|
|
206
170
|
return true;
|
|
207
171
|
}
|
|
208
|
-
|
|
209
172
|
return false;
|
|
210
173
|
}
|
|
211
|
-
|
|
212
174
|
function getNoonDetails() {
|
|
213
175
|
return {
|
|
214
176
|
allowedValues: ['AM', 'PM']
|
|
215
177
|
};
|
|
216
178
|
}
|
|
217
|
-
|
|
218
179
|
function getIsArrowTyped(keyCode) {
|
|
219
180
|
var arrowKeycodes = [37, 38, 39, 40];
|
|
220
|
-
|
|
221
181
|
if (arrowKeycodes.indexOf(keyCode) >= 0) {
|
|
222
182
|
return true;
|
|
223
183
|
}
|
|
224
|
-
|
|
225
184
|
return false;
|
|
226
185
|
}
|
|
227
|
-
|
|
228
186
|
function getIsSupportedKey(event) {
|
|
229
187
|
var keyCode = event.keyCode;
|
|
230
|
-
|
|
231
188
|
if (getIsArrowTyped(keyCode) || getIsDeleteTyped(keyCode) || getIsNumberTyped(event) || getIsNoonValueTyped(event)) {
|
|
232
189
|
return true;
|
|
233
190
|
}
|
|
234
|
-
|
|
235
191
|
return false;
|
|
236
192
|
}
|
|
237
|
-
|
|
238
193
|
function arrayIsNotEqual(a, b) {
|
|
239
194
|
return a.some(function (val, index) {
|
|
240
195
|
return val !== b[index];
|
|
241
196
|
});
|
|
242
197
|
}
|
|
243
|
-
|
|
244
198
|
function getIsEmptyValue(value, startPoint, endPoint) {
|
|
245
199
|
var newValue = parseInt(value) || 0;
|
|
246
|
-
|
|
247
200
|
if (newValue >= startPoint && newValue <= endPoint) {
|
|
248
201
|
return false;
|
|
249
202
|
}
|
|
250
|
-
|
|
251
203
|
return true;
|
|
252
204
|
}
|
|
253
|
-
|
|
254
205
|
function getIsEmptyHour(value, is24Hour) {
|
|
255
206
|
var _getHourDetails2 = getHourDetails(is24Hour),
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
207
|
+
startPoint = _getHourDetails2.startPoint,
|
|
208
|
+
endPoint = _getHourDetails2.endPoint;
|
|
259
209
|
return getIsEmptyValue(value, startPoint, endPoint);
|
|
260
210
|
}
|
|
261
|
-
|
|
262
211
|
function getIsEmptyYear(value, yearLength) {
|
|
263
212
|
var _getYearDetails = getYearDetails(yearLength),
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
213
|
+
startPoint = _getYearDetails.startPoint,
|
|
214
|
+
endPoint = _getYearDetails.endPoint;
|
|
267
215
|
return getIsEmptyValue(value, startPoint, endPoint);
|
|
268
216
|
}
|
|
269
|
-
|
|
270
217
|
function getIsCurrentYear(_ref) {
|
|
271
218
|
var isDateTime = _ref.isDateTime,
|
|
272
|
-
|
|
273
|
-
|
|
219
|
+
value = _ref.value,
|
|
220
|
+
timeZone = _ref.timeZone;
|
|
274
221
|
var isCurrentYear = false;
|
|
275
|
-
|
|
276
222
|
if (value && value !== _constants.INVALID_DATE) {
|
|
277
223
|
var dateObj = (0, _dateFormat.getDateText)(value, isDateTime, timeZone);
|
|
278
224
|
var currentDateObj = new Date();
|
|
@@ -280,19 +226,16 @@ function getIsCurrentYear(_ref) {
|
|
|
280
226
|
var selectedYear = dateObj.getFullYear();
|
|
281
227
|
isCurrentYear = currentYear === selectedYear;
|
|
282
228
|
}
|
|
283
|
-
|
|
284
229
|
return {
|
|
285
230
|
isCurrentYear: isCurrentYear
|
|
286
231
|
};
|
|
287
232
|
}
|
|
288
|
-
|
|
289
233
|
function removeYearPattern(dateFormatArr, patternArr) {
|
|
290
234
|
var newDateFormatArr = [];
|
|
291
235
|
var newPatternArr = [];
|
|
292
236
|
var yearIndex = '';
|
|
293
237
|
dateFormatArr.forEach(function (val, index) {
|
|
294
238
|
var type = _constants.flags[val].type;
|
|
295
|
-
|
|
296
239
|
if (type === 'year') {
|
|
297
240
|
yearIndex = index;
|
|
298
241
|
} else {
|
|
@@ -4,21 +4,19 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.getChangedMonth = getChangedMonth;
|
|
7
|
-
|
|
8
7
|
var _index = require("./index");
|
|
9
|
-
|
|
10
8
|
var _Common = require("../../utils/Common");
|
|
11
|
-
|
|
12
9
|
/** * Methods ** */
|
|
10
|
+
|
|
13
11
|
function getChangedMonth(values, event, focusOrders, keyActions) {
|
|
14
12
|
var keyCode = event.keyCode,
|
|
15
|
-
|
|
13
|
+
which = event.which;
|
|
16
14
|
var _values$day = values.day,
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
15
|
+
day = _values$day === void 0 ? '' : _values$day,
|
|
16
|
+
_values$month = values.month,
|
|
17
|
+
month = _values$month === void 0 ? '' : _values$month,
|
|
18
|
+
_values$year = values.year,
|
|
19
|
+
year = _values$year === void 0 ? '' : _values$year;
|
|
22
20
|
var isChanged = false;
|
|
23
21
|
var newDay = Number.parseInt(day) || 0;
|
|
24
22
|
var newMonth = Number.parseInt(month) || 0;
|
|
@@ -26,11 +24,9 @@ function getChangedMonth(values, event, focusOrders, keyActions) {
|
|
|
26
24
|
var focusOrder = focusOrders.focusOrder;
|
|
27
25
|
var newFocusOrder = focusOrder;
|
|
28
26
|
var isNewType = (0, _index.getIsNewValueType)(focusOrders, keyActions);
|
|
29
|
-
|
|
30
27
|
var _getMonthDetails = (0, _index.getMonthDetails)(),
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
28
|
+
startPoint = _getMonthDetails.startPoint,
|
|
29
|
+
endPoint = _getMonthDetails.endPoint;
|
|
34
30
|
if (keyCode === 38) {
|
|
35
31
|
//up arrow
|
|
36
32
|
if (newMonth === endPoint || !newMonth) {
|
|
@@ -53,19 +49,15 @@ function getChangedMonth(values, event, focusOrders, keyActions) {
|
|
|
53
49
|
var keyString = (0, _Common.getKeyValue)(event);
|
|
54
50
|
var newValue = isNewType ? keyString : month.toString() + keyString;
|
|
55
51
|
newValue = Number.parseInt(newValue);
|
|
56
|
-
|
|
57
52
|
if (isNewType) {
|
|
58
53
|
isChanged = true;
|
|
59
|
-
|
|
60
54
|
if (newValue * 10 > endPoint) {
|
|
61
55
|
newFocusOrder += 1;
|
|
62
56
|
}
|
|
63
|
-
|
|
64
57
|
newMonth = newValue;
|
|
65
58
|
} else {
|
|
66
59
|
isChanged = true;
|
|
67
60
|
newFocusOrder += 1;
|
|
68
|
-
|
|
69
61
|
if (newValue > endPoint) {
|
|
70
62
|
newMonth = endPoint;
|
|
71
63
|
} else if (!newValue) {
|
|
@@ -78,15 +70,12 @@ function getChangedMonth(values, event, focusOrders, keyActions) {
|
|
|
78
70
|
isChanged = true;
|
|
79
71
|
newMonth = '';
|
|
80
72
|
}
|
|
81
|
-
|
|
82
73
|
var dayEnd = (0, _index.getDayEnd)(newMonth, newYear);
|
|
83
74
|
var dayChanged = false;
|
|
84
|
-
|
|
85
75
|
if (newDay && newDay > dayEnd) {
|
|
86
76
|
dayChanged = true;
|
|
87
77
|
newDay = dayEnd;
|
|
88
78
|
}
|
|
89
|
-
|
|
90
79
|
return {
|
|
91
80
|
day: dayChanged ? newDay : day,
|
|
92
81
|
month: newMonth,
|
|
@@ -6,42 +6,30 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports.getChangedHour = getChangedHour;
|
|
7
7
|
exports.getChangedMinute = getChangedMinute;
|
|
8
8
|
exports.getChangedNoon = getChangedNoon;
|
|
9
|
-
|
|
10
9
|
var _index = require("./index");
|
|
11
|
-
|
|
12
10
|
var _Common = require("../../utils/Common");
|
|
13
|
-
|
|
14
11
|
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
15
|
-
|
|
16
12
|
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
17
|
-
|
|
18
13
|
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
19
|
-
|
|
20
|
-
function
|
|
21
|
-
|
|
22
|
-
function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
|
|
23
|
-
|
|
14
|
+
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
|
15
|
+
function _iterableToArrayLimit(arr, i) { var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"]; if (null != _i) { var _s, _e, _x, _r, _arr = [], _n = !0, _d = !1; try { if (_x = (_i = _i.call(arr)).next, 0 === i) { if (Object(_i) !== _i) return; _n = !1; } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0); } catch (err) { _d = !0, _e = err; } finally { try { if (!_n && null != _i["return"] && (_r = _i["return"](), Object(_r) !== _r)) return; } finally { if (_d) throw _e; } } return _arr; } }
|
|
24
16
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
25
|
-
|
|
26
17
|
function getChangedHour(values, event, focusOrders, keyActions) {
|
|
27
18
|
var _ref = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : {},
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
19
|
+
_ref$is24Hour = _ref.is24Hour,
|
|
20
|
+
is24Hour = _ref$is24Hour === void 0 ? false : _ref$is24Hour;
|
|
31
21
|
var keyCode = event.keyCode,
|
|
32
|
-
|
|
22
|
+
which = event.which;
|
|
33
23
|
var _values$hour = values.hour,
|
|
34
|
-
|
|
24
|
+
hour = _values$hour === void 0 ? '' : _values$hour;
|
|
35
25
|
var isChanged = false;
|
|
36
26
|
var newHour = Number.parseInt(hour) || 0;
|
|
37
27
|
var focusOrder = focusOrders.focusOrder;
|
|
38
28
|
var newFocusOrder = focusOrder;
|
|
39
29
|
var isNewType = (0, _index.getIsNewValueType)(focusOrders, keyActions);
|
|
40
|
-
|
|
41
30
|
var _getHourDetails = (0, _index.getHourDetails)(is24Hour),
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
31
|
+
startPoint = _getHourDetails.startPoint,
|
|
32
|
+
endPoint = _getHourDetails.endPoint;
|
|
45
33
|
if (keyCode === 38) {
|
|
46
34
|
//up arrow
|
|
47
35
|
if (newHour === endPoint || (0, _index.getIsEmptyHour)(newHour, is24Hour)) {
|
|
@@ -64,19 +52,15 @@ function getChangedHour(values, event, focusOrders, keyActions) {
|
|
|
64
52
|
var keyString = (0, _Common.getKeyValue)(event);
|
|
65
53
|
var newValue = isNewType ? keyString : hour.toString() + keyString;
|
|
66
54
|
newValue = Number.parseInt(newValue);
|
|
67
|
-
|
|
68
55
|
if (isNewType) {
|
|
69
56
|
isChanged = true;
|
|
70
|
-
|
|
71
57
|
if (newValue * 10 > endPoint) {
|
|
72
58
|
newFocusOrder += 1;
|
|
73
59
|
}
|
|
74
|
-
|
|
75
60
|
newHour = newValue;
|
|
76
61
|
} else {
|
|
77
62
|
isChanged = true;
|
|
78
63
|
newFocusOrder += 1;
|
|
79
|
-
|
|
80
64
|
if (newValue > endPoint) {
|
|
81
65
|
newHour = endPoint;
|
|
82
66
|
} else if (!newValue) {
|
|
@@ -89,30 +73,26 @@ function getChangedHour(values, event, focusOrders, keyActions) {
|
|
|
89
73
|
isChanged = true;
|
|
90
74
|
newHour = '';
|
|
91
75
|
}
|
|
92
|
-
|
|
93
76
|
return {
|
|
94
77
|
hour: newHour,
|
|
95
78
|
isChanged: isChanged,
|
|
96
79
|
focusOrder: newFocusOrder
|
|
97
80
|
};
|
|
98
81
|
}
|
|
99
|
-
|
|
100
82
|
function getChangedMinute(values, event, focusOrders, keyActions) {
|
|
101
83
|
var keyCode = event.keyCode,
|
|
102
|
-
|
|
84
|
+
which = event.which;
|
|
103
85
|
var _values$minute = values.minute,
|
|
104
|
-
|
|
86
|
+
minute = _values$minute === void 0 ? '' : _values$minute;
|
|
105
87
|
var isChanged = false;
|
|
106
88
|
var isEmptyMinute = (0, _Common.getIsEmptyValue)(minute);
|
|
107
89
|
var newMinute = isEmptyMinute ? '' : Number.parseInt(minute);
|
|
108
90
|
var focusOrder = focusOrders.focusOrder;
|
|
109
91
|
var newFocusOrder = focusOrder;
|
|
110
92
|
var isNewType = (0, _index.getIsNewValueType)(focusOrders, keyActions);
|
|
111
|
-
|
|
112
93
|
var _getMinuteDetails = (0, _index.getMinuteDetails)(),
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
94
|
+
startPoint = _getMinuteDetails.startPoint,
|
|
95
|
+
endPoint = _getMinuteDetails.endPoint;
|
|
116
96
|
if (keyCode === 38) {
|
|
117
97
|
//up arrow
|
|
118
98
|
if (newMinute === endPoint || isEmptyMinute) {
|
|
@@ -135,19 +115,15 @@ function getChangedMinute(values, event, focusOrders, keyActions) {
|
|
|
135
115
|
var keyString = (0, _Common.getKeyValue)(event);
|
|
136
116
|
var newValue = isNewType ? keyString : minute.toString() + keyString;
|
|
137
117
|
newValue = Number.parseInt(newValue);
|
|
138
|
-
|
|
139
118
|
if (isNewType) {
|
|
140
119
|
isChanged = true;
|
|
141
|
-
|
|
142
120
|
if (newValue * 10 > endPoint) {
|
|
143
121
|
newFocusOrder += 1;
|
|
144
122
|
}
|
|
145
|
-
|
|
146
123
|
newMinute = newValue;
|
|
147
124
|
} else {
|
|
148
125
|
isChanged = true;
|
|
149
126
|
newFocusOrder += 1;
|
|
150
|
-
|
|
151
127
|
if (newValue > endPoint) {
|
|
152
128
|
newMinute = endPoint;
|
|
153
129
|
} else {
|
|
@@ -158,35 +134,30 @@ function getChangedMinute(values, event, focusOrders, keyActions) {
|
|
|
158
134
|
isChanged = true;
|
|
159
135
|
newMinute = '';
|
|
160
136
|
}
|
|
161
|
-
|
|
162
137
|
return {
|
|
163
138
|
minute: newMinute,
|
|
164
139
|
isChanged: isChanged,
|
|
165
140
|
focusOrder: newFocusOrder
|
|
166
141
|
};
|
|
167
142
|
}
|
|
168
|
-
|
|
169
|
-
function getChangedNoon(values, event, focusOrders
|
|
170
|
-
/*keyActions*/
|
|
171
|
-
) {
|
|
143
|
+
function getChangedNoon(values, event, focusOrders /*keyActions*/) {
|
|
172
144
|
var keyCode = event.keyCode,
|
|
173
|
-
|
|
145
|
+
which = event.which;
|
|
174
146
|
var _values$noon = values.noon,
|
|
175
|
-
|
|
147
|
+
noon = _values$noon === void 0 ? '' : _values$noon;
|
|
176
148
|
var isChanged = false;
|
|
177
149
|
var newNoon = noon;
|
|
178
150
|
var focusOrder = focusOrders.focusOrder;
|
|
179
|
-
var newFocusOrder = focusOrder;
|
|
151
|
+
var newFocusOrder = focusOrder;
|
|
180
152
|
|
|
181
|
-
|
|
182
|
-
allowedValues = _getNoonDetails.allowedValues;
|
|
153
|
+
// const isNewType = getIsNewValueType(focusOrders, keyActions);
|
|
183
154
|
|
|
155
|
+
var _getNoonDetails = (0, _index.getNoonDetails)(),
|
|
156
|
+
allowedValues = _getNoonDetails.allowedValues;
|
|
184
157
|
var _allowedValues = _slicedToArray(allowedValues, 1),
|
|
185
|
-
|
|
186
|
-
|
|
158
|
+
startPoint = _allowedValues[0];
|
|
187
159
|
var endPoint = allowedValues[allowedValues.length - 1];
|
|
188
160
|
var currentNoonIndex = allowedValues.indexOf(newNoon);
|
|
189
|
-
|
|
190
161
|
if (keyCode === 38) {
|
|
191
162
|
//up arrow
|
|
192
163
|
if (newNoon === endPoint || !newNoon) {
|
|
@@ -206,11 +177,11 @@ function getChangedNoon(values, event, focusOrders
|
|
|
206
177
|
newNoon = allowedValues[currentNoonIndex - 1];
|
|
207
178
|
}
|
|
208
179
|
} else if ((0, _index.getIsNoonValueTyped)(event)) {
|
|
209
|
-
var keyString = (0, _Common.getKeyValue)(event).toUpperCase();
|
|
180
|
+
var keyString = (0, _Common.getKeyValue)(event).toUpperCase();
|
|
210
181
|
|
|
182
|
+
// let newValue = isNewType ? keyString : noon.toString() + keyString;
|
|
211
183
|
var newValue = keyString;
|
|
212
184
|
var needChangeNoon = newNoon.indexOf(newValue) === -1 ? true : false;
|
|
213
|
-
|
|
214
185
|
if (needChangeNoon) {
|
|
215
186
|
var newValueIndex = currentNoonIndex;
|
|
216
187
|
allowedValues.some(function (val, index) {
|
|
@@ -218,10 +189,8 @@ function getChangedNoon(values, event, focusOrders
|
|
|
218
189
|
newValueIndex = index;
|
|
219
190
|
return true;
|
|
220
191
|
}
|
|
221
|
-
|
|
222
192
|
return false;
|
|
223
193
|
});
|
|
224
|
-
|
|
225
194
|
if (currentNoonIndex !== newValueIndex) {
|
|
226
195
|
isChanged = true;
|
|
227
196
|
newNoon = allowedValues[newValueIndex];
|
|
@@ -231,7 +200,6 @@ function getChangedNoon(values, event, focusOrders
|
|
|
231
200
|
isChanged = true;
|
|
232
201
|
newNoon = '';
|
|
233
202
|
}
|
|
234
|
-
|
|
235
203
|
return {
|
|
236
204
|
noon: newNoon,
|
|
237
205
|
isChanged: isChanged,
|