@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
|
@@ -7,12 +7,11 @@ export function getChangedDay(values, event, focusOrders, keyActions) {
|
|
|
7
7
|
which
|
|
8
8
|
} = event;
|
|
9
9
|
const {
|
|
10
|
-
day = ''
|
|
11
|
-
/*month = '', year = ''*/
|
|
12
|
-
|
|
10
|
+
day = '' /*month = '', year = ''*/
|
|
13
11
|
} = values;
|
|
14
12
|
let isChanged = false;
|
|
15
|
-
let newDay = Number.parseInt(day) || 0;
|
|
13
|
+
let newDay = Number.parseInt(day) || 0;
|
|
14
|
+
// const newMonth = Number.parseInt(month) || 0;
|
|
16
15
|
// const newYear = Number.parseInt(year) || 0;
|
|
17
16
|
|
|
18
17
|
const {
|
|
@@ -22,11 +21,8 @@ export function getChangedDay(values, event, focusOrders, keyActions) {
|
|
|
22
21
|
const isNewType = getIsNewValueType(focusOrders, keyActions);
|
|
23
22
|
const {
|
|
24
23
|
startPoint,
|
|
25
|
-
endPoint
|
|
26
|
-
/*getDayEnd(newMonth, newYear);*/
|
|
27
|
-
|
|
24
|
+
endPoint /*getDayEnd(newMonth, newYear);*/
|
|
28
25
|
} = getDayDetails();
|
|
29
|
-
|
|
30
26
|
if (keyCode === 38) {
|
|
31
27
|
//up arrow
|
|
32
28
|
if (newDay === endPoint || !newDay) {
|
|
@@ -49,19 +45,15 @@ export function getChangedDay(values, event, focusOrders, keyActions) {
|
|
|
49
45
|
const keyString = getKeyValue(event);
|
|
50
46
|
let newValue = isNewType ? keyString : day.toString() + keyString;
|
|
51
47
|
newValue = Number.parseInt(newValue);
|
|
52
|
-
|
|
53
48
|
if (isNewType) {
|
|
54
49
|
isChanged = true;
|
|
55
|
-
|
|
56
50
|
if (newValue * 10 > endPoint) {
|
|
57
51
|
newFocusOrder += 1;
|
|
58
52
|
}
|
|
59
|
-
|
|
60
53
|
newDay = newValue;
|
|
61
54
|
} else {
|
|
62
55
|
isChanged = true;
|
|
63
56
|
newFocusOrder += 1;
|
|
64
|
-
|
|
65
57
|
if (newValue > endPoint) {
|
|
66
58
|
newDay = endPoint;
|
|
67
59
|
} else if (!newValue) {
|
|
@@ -74,7 +66,6 @@ export function getChangedDay(values, event, focusOrders, keyActions) {
|
|
|
74
66
|
isChanged = true;
|
|
75
67
|
newDay = '';
|
|
76
68
|
}
|
|
77
|
-
|
|
78
69
|
return {
|
|
79
70
|
day: newDay,
|
|
80
71
|
isChanged,
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
/** * Methods ** */
|
|
4
4
|
import { getMonthEnd } from '../../utils/datetime/common';
|
|
5
|
-
/** * Constants ** */
|
|
6
5
|
|
|
6
|
+
/** * Constants ** */
|
|
7
7
|
import { flags, INVALID_DATE } from '../constants';
|
|
8
8
|
import { getDateText } from './dateFormat';
|
|
9
9
|
export function convertYearToTwoDigit(year) {
|
|
@@ -13,7 +13,6 @@ export function addZero() {
|
|
|
13
13
|
let value = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
|
|
14
14
|
let length = arguments.length > 1 ? arguments[1] : undefined;
|
|
15
15
|
let newValue = value.toString();
|
|
16
|
-
|
|
17
16
|
for (let i = 0; i < length; i++) {
|
|
18
17
|
if (newValue.length < length) {
|
|
19
18
|
newValue = `0${newValue}`;
|
|
@@ -21,19 +20,16 @@ export function addZero() {
|
|
|
21
20
|
break;
|
|
22
21
|
}
|
|
23
22
|
}
|
|
24
|
-
|
|
25
23
|
return newValue;
|
|
26
24
|
}
|
|
27
25
|
export function getDayEnd(month, year) {
|
|
28
26
|
month -= 1;
|
|
29
27
|
const monthend = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];
|
|
30
|
-
|
|
31
28
|
if (month && year) {
|
|
32
29
|
return getMonthEnd(month, year);
|
|
33
30
|
} else if (month) {
|
|
34
31
|
return monthend[month];
|
|
35
32
|
}
|
|
36
|
-
|
|
37
33
|
return 31;
|
|
38
34
|
}
|
|
39
35
|
export function getIsNumberTyped(event) {
|
|
@@ -43,18 +39,15 @@ export function getIsNumberTyped(event) {
|
|
|
43
39
|
metaKey,
|
|
44
40
|
shiftKey
|
|
45
41
|
} = event;
|
|
46
|
-
|
|
47
42
|
if ((keyCode >= 48 && keyCode <= 57 || keyCode >= 96 && keyCode <= 105) && !ctrlKey && !metaKey && !shiftKey) {
|
|
48
43
|
return true;
|
|
49
44
|
}
|
|
50
|
-
|
|
51
45
|
return false;
|
|
52
46
|
}
|
|
53
47
|
export function getIsDeleteTyped(keyCode) {
|
|
54
48
|
if (keyCode === 8) {
|
|
55
49
|
return true;
|
|
56
50
|
}
|
|
57
|
-
|
|
58
51
|
return false;
|
|
59
52
|
}
|
|
60
53
|
export function getIsNewValueType(focusOrders, keyActions) {
|
|
@@ -83,7 +76,6 @@ export function getMonthDetails() {
|
|
|
83
76
|
export function getYearDetails(yearLength) {
|
|
84
77
|
const dateObj = new Date();
|
|
85
78
|
const year = dateObj.getFullYear();
|
|
86
|
-
|
|
87
79
|
if (yearLength === 2) {
|
|
88
80
|
return {
|
|
89
81
|
startPoint: 0,
|
|
@@ -91,7 +83,6 @@ export function getYearDetails(yearLength) {
|
|
|
91
83
|
currentYear: year
|
|
92
84
|
};
|
|
93
85
|
}
|
|
94
|
-
|
|
95
86
|
return {
|
|
96
87
|
startPoint: 1850,
|
|
97
88
|
endPoint: 9999,
|
|
@@ -105,11 +96,9 @@ export function convertTwoDigitToYear() {
|
|
|
105
96
|
let year = dateObj.getFullYear();
|
|
106
97
|
const digitValueStr = addZero(digitValue.toString(), 2);
|
|
107
98
|
year = selectedYear ? selectedYear : year;
|
|
108
|
-
|
|
109
99
|
if (digitValueStr && digitValueStr.length <= 2) {
|
|
110
100
|
return parseInt(year.toString().slice(0, 2) + digitValueStr);
|
|
111
101
|
}
|
|
112
|
-
|
|
113
102
|
return digitValue;
|
|
114
103
|
}
|
|
115
104
|
export function getHourDetails(is24Hour) {
|
|
@@ -124,12 +113,10 @@ export function getHourSuggestions(is24Hour) {
|
|
|
124
113
|
endPoint
|
|
125
114
|
} = getHourDetails(is24Hour);
|
|
126
115
|
const hourArr = [];
|
|
127
|
-
|
|
128
116
|
for (let hour = startPoint; hour <= endPoint; hour++) {
|
|
129
117
|
const htxt = addZeroIfNeeded(hour);
|
|
130
118
|
hourArr.push(htxt);
|
|
131
119
|
}
|
|
132
|
-
|
|
133
120
|
return hourArr;
|
|
134
121
|
}
|
|
135
122
|
export function getMinuteDetails() {
|
|
@@ -144,12 +131,10 @@ export function getMinuteSuggestions() {
|
|
|
144
131
|
endPoint
|
|
145
132
|
} = getMinuteDetails();
|
|
146
133
|
const minArr = [];
|
|
147
|
-
|
|
148
134
|
for (let minute = startPoint; minute <= endPoint; minute++) {
|
|
149
135
|
const mtxt = addZeroIfNeeded(minute);
|
|
150
136
|
minArr.push(mtxt);
|
|
151
137
|
}
|
|
152
|
-
|
|
153
138
|
return minArr;
|
|
154
139
|
}
|
|
155
140
|
export function addZeroIfNeeded(value) {
|
|
@@ -159,14 +144,12 @@ export function getIsNoonValueTyped(event) {
|
|
|
159
144
|
const {
|
|
160
145
|
keyCode
|
|
161
146
|
} = event;
|
|
162
|
-
|
|
163
147
|
if (keyCode === 65 || keyCode === 77 || keyCode === 80) {
|
|
164
148
|
//A -65
|
|
165
149
|
//M -77
|
|
166
150
|
//P -80
|
|
167
151
|
return true;
|
|
168
152
|
}
|
|
169
|
-
|
|
170
153
|
return false;
|
|
171
154
|
}
|
|
172
155
|
export function getNoonDetails() {
|
|
@@ -174,42 +157,32 @@ export function getNoonDetails() {
|
|
|
174
157
|
allowedValues: ['AM', 'PM']
|
|
175
158
|
};
|
|
176
159
|
}
|
|
177
|
-
|
|
178
160
|
function getIsArrowTyped(keyCode) {
|
|
179
161
|
const arrowKeycodes = [37, 38, 39, 40];
|
|
180
|
-
|
|
181
162
|
if (arrowKeycodes.indexOf(keyCode) >= 0) {
|
|
182
163
|
return true;
|
|
183
164
|
}
|
|
184
|
-
|
|
185
165
|
return false;
|
|
186
166
|
}
|
|
187
|
-
|
|
188
167
|
export function getIsSupportedKey(event) {
|
|
189
168
|
const {
|
|
190
169
|
keyCode
|
|
191
170
|
} = event;
|
|
192
|
-
|
|
193
171
|
if (getIsArrowTyped(keyCode) || getIsDeleteTyped(keyCode) || getIsNumberTyped(event) || getIsNoonValueTyped(event)) {
|
|
194
172
|
return true;
|
|
195
173
|
}
|
|
196
|
-
|
|
197
174
|
return false;
|
|
198
175
|
}
|
|
199
176
|
export function arrayIsNotEqual(a, b) {
|
|
200
177
|
return a.some((val, index) => val !== b[index]);
|
|
201
178
|
}
|
|
202
|
-
|
|
203
179
|
function getIsEmptyValue(value, startPoint, endPoint) {
|
|
204
180
|
const newValue = parseInt(value) || 0;
|
|
205
|
-
|
|
206
181
|
if (newValue >= startPoint && newValue <= endPoint) {
|
|
207
182
|
return false;
|
|
208
183
|
}
|
|
209
|
-
|
|
210
184
|
return true;
|
|
211
185
|
}
|
|
212
|
-
|
|
213
186
|
export function getIsEmptyHour(value, is24Hour) {
|
|
214
187
|
const {
|
|
215
188
|
startPoint,
|
|
@@ -231,7 +204,6 @@ export function getIsCurrentYear(_ref) {
|
|
|
231
204
|
timeZone
|
|
232
205
|
} = _ref;
|
|
233
206
|
let isCurrentYear = false;
|
|
234
|
-
|
|
235
207
|
if (value && value !== INVALID_DATE) {
|
|
236
208
|
const dateObj = getDateText(value, isDateTime, timeZone);
|
|
237
209
|
const currentDateObj = new Date();
|
|
@@ -239,7 +211,6 @@ export function getIsCurrentYear(_ref) {
|
|
|
239
211
|
const selectedYear = dateObj.getFullYear();
|
|
240
212
|
isCurrentYear = currentYear === selectedYear;
|
|
241
213
|
}
|
|
242
|
-
|
|
243
214
|
return {
|
|
244
215
|
isCurrentYear
|
|
245
216
|
};
|
|
@@ -252,7 +223,6 @@ export function removeYearPattern(dateFormatArr, patternArr) {
|
|
|
252
223
|
const {
|
|
253
224
|
type
|
|
254
225
|
} = flags[val];
|
|
255
|
-
|
|
256
226
|
if (type === 'year') {
|
|
257
227
|
yearIndex = index;
|
|
258
228
|
} else {
|
|
@@ -24,7 +24,6 @@ export function getChangedMonth(values, event, focusOrders, keyActions) {
|
|
|
24
24
|
startPoint,
|
|
25
25
|
endPoint
|
|
26
26
|
} = getMonthDetails();
|
|
27
|
-
|
|
28
27
|
if (keyCode === 38) {
|
|
29
28
|
//up arrow
|
|
30
29
|
if (newMonth === endPoint || !newMonth) {
|
|
@@ -47,19 +46,15 @@ export function getChangedMonth(values, event, focusOrders, keyActions) {
|
|
|
47
46
|
const keyString = getKeyValue(event);
|
|
48
47
|
let newValue = isNewType ? keyString : month.toString() + keyString;
|
|
49
48
|
newValue = Number.parseInt(newValue);
|
|
50
|
-
|
|
51
49
|
if (isNewType) {
|
|
52
50
|
isChanged = true;
|
|
53
|
-
|
|
54
51
|
if (newValue * 10 > endPoint) {
|
|
55
52
|
newFocusOrder += 1;
|
|
56
53
|
}
|
|
57
|
-
|
|
58
54
|
newMonth = newValue;
|
|
59
55
|
} else {
|
|
60
56
|
isChanged = true;
|
|
61
57
|
newFocusOrder += 1;
|
|
62
|
-
|
|
63
58
|
if (newValue > endPoint) {
|
|
64
59
|
newMonth = endPoint;
|
|
65
60
|
} else if (!newValue) {
|
|
@@ -72,15 +67,12 @@ export function getChangedMonth(values, event, focusOrders, keyActions) {
|
|
|
72
67
|
isChanged = true;
|
|
73
68
|
newMonth = '';
|
|
74
69
|
}
|
|
75
|
-
|
|
76
70
|
const dayEnd = getDayEnd(newMonth, newYear);
|
|
77
71
|
let dayChanged = false;
|
|
78
|
-
|
|
79
72
|
if (newDay && newDay > dayEnd) {
|
|
80
73
|
dayChanged = true;
|
|
81
74
|
newDay = dayEnd;
|
|
82
75
|
}
|
|
83
|
-
|
|
84
76
|
return {
|
|
85
77
|
day: dayChanged ? newDay : day,
|
|
86
78
|
month: newMonth,
|
|
@@ -23,7 +23,6 @@ export function getChangedHour(values, event, focusOrders, keyActions) {
|
|
|
23
23
|
startPoint,
|
|
24
24
|
endPoint
|
|
25
25
|
} = getHourDetails(is24Hour);
|
|
26
|
-
|
|
27
26
|
if (keyCode === 38) {
|
|
28
27
|
//up arrow
|
|
29
28
|
if (newHour === endPoint || getIsEmptyHour(newHour, is24Hour)) {
|
|
@@ -46,19 +45,15 @@ export function getChangedHour(values, event, focusOrders, keyActions) {
|
|
|
46
45
|
const keyString = getKeyValue(event);
|
|
47
46
|
let newValue = isNewType ? keyString : hour.toString() + keyString;
|
|
48
47
|
newValue = Number.parseInt(newValue);
|
|
49
|
-
|
|
50
48
|
if (isNewType) {
|
|
51
49
|
isChanged = true;
|
|
52
|
-
|
|
53
50
|
if (newValue * 10 > endPoint) {
|
|
54
51
|
newFocusOrder += 1;
|
|
55
52
|
}
|
|
56
|
-
|
|
57
53
|
newHour = newValue;
|
|
58
54
|
} else {
|
|
59
55
|
isChanged = true;
|
|
60
56
|
newFocusOrder += 1;
|
|
61
|
-
|
|
62
57
|
if (newValue > endPoint) {
|
|
63
58
|
newHour = endPoint;
|
|
64
59
|
} else if (!newValue) {
|
|
@@ -71,7 +66,6 @@ export function getChangedHour(values, event, focusOrders, keyActions) {
|
|
|
71
66
|
isChanged = true;
|
|
72
67
|
newHour = '';
|
|
73
68
|
}
|
|
74
|
-
|
|
75
69
|
return {
|
|
76
70
|
hour: newHour,
|
|
77
71
|
isChanged,
|
|
@@ -98,7 +92,6 @@ export function getChangedMinute(values, event, focusOrders, keyActions) {
|
|
|
98
92
|
startPoint,
|
|
99
93
|
endPoint
|
|
100
94
|
} = getMinuteDetails();
|
|
101
|
-
|
|
102
95
|
if (keyCode === 38) {
|
|
103
96
|
//up arrow
|
|
104
97
|
if (newMinute === endPoint || isEmptyMinute) {
|
|
@@ -121,19 +114,15 @@ export function getChangedMinute(values, event, focusOrders, keyActions) {
|
|
|
121
114
|
const keyString = getKeyValue(event);
|
|
122
115
|
let newValue = isNewType ? keyString : minute.toString() + keyString;
|
|
123
116
|
newValue = Number.parseInt(newValue);
|
|
124
|
-
|
|
125
117
|
if (isNewType) {
|
|
126
118
|
isChanged = true;
|
|
127
|
-
|
|
128
119
|
if (newValue * 10 > endPoint) {
|
|
129
120
|
newFocusOrder += 1;
|
|
130
121
|
}
|
|
131
|
-
|
|
132
122
|
newMinute = newValue;
|
|
133
123
|
} else {
|
|
134
124
|
isChanged = true;
|
|
135
125
|
newFocusOrder += 1;
|
|
136
|
-
|
|
137
126
|
if (newValue > endPoint) {
|
|
138
127
|
newMinute = endPoint;
|
|
139
128
|
} else {
|
|
@@ -144,16 +133,13 @@ export function getChangedMinute(values, event, focusOrders, keyActions) {
|
|
|
144
133
|
isChanged = true;
|
|
145
134
|
newMinute = '';
|
|
146
135
|
}
|
|
147
|
-
|
|
148
136
|
return {
|
|
149
137
|
minute: newMinute,
|
|
150
138
|
isChanged,
|
|
151
139
|
focusOrder: newFocusOrder
|
|
152
140
|
};
|
|
153
141
|
}
|
|
154
|
-
export function getChangedNoon(values, event, focusOrders
|
|
155
|
-
/*keyActions*/
|
|
156
|
-
) {
|
|
142
|
+
export function getChangedNoon(values, event, focusOrders /*keyActions*/) {
|
|
157
143
|
const {
|
|
158
144
|
keyCode,
|
|
159
145
|
which
|
|
@@ -166,7 +152,9 @@ export function getChangedNoon(values, event, focusOrders
|
|
|
166
152
|
const {
|
|
167
153
|
focusOrder
|
|
168
154
|
} = focusOrders;
|
|
169
|
-
const newFocusOrder = focusOrder;
|
|
155
|
+
const newFocusOrder = focusOrder;
|
|
156
|
+
|
|
157
|
+
// const isNewType = getIsNewValueType(focusOrders, keyActions);
|
|
170
158
|
|
|
171
159
|
const {
|
|
172
160
|
allowedValues
|
|
@@ -174,7 +162,6 @@ export function getChangedNoon(values, event, focusOrders
|
|
|
174
162
|
const [startPoint] = allowedValues;
|
|
175
163
|
const endPoint = allowedValues[allowedValues.length - 1];
|
|
176
164
|
const currentNoonIndex = allowedValues.indexOf(newNoon);
|
|
177
|
-
|
|
178
165
|
if (keyCode === 38) {
|
|
179
166
|
//up arrow
|
|
180
167
|
if (newNoon === endPoint || !newNoon) {
|
|
@@ -194,11 +181,11 @@ export function getChangedNoon(values, event, focusOrders
|
|
|
194
181
|
newNoon = allowedValues[currentNoonIndex - 1];
|
|
195
182
|
}
|
|
196
183
|
} else if (getIsNoonValueTyped(event)) {
|
|
197
|
-
const keyString = getKeyValue(event).toUpperCase();
|
|
184
|
+
const keyString = getKeyValue(event).toUpperCase();
|
|
198
185
|
|
|
186
|
+
// let newValue = isNewType ? keyString : noon.toString() + keyString;
|
|
199
187
|
const newValue = keyString;
|
|
200
188
|
const needChangeNoon = newNoon.indexOf(newValue) === -1 ? true : false;
|
|
201
|
-
|
|
202
189
|
if (needChangeNoon) {
|
|
203
190
|
let newValueIndex = currentNoonIndex;
|
|
204
191
|
allowedValues.some((val, index) => {
|
|
@@ -206,10 +193,8 @@ export function getChangedNoon(values, event, focusOrders
|
|
|
206
193
|
newValueIndex = index;
|
|
207
194
|
return true;
|
|
208
195
|
}
|
|
209
|
-
|
|
210
196
|
return false;
|
|
211
197
|
});
|
|
212
|
-
|
|
213
198
|
if (currentNoonIndex !== newValueIndex) {
|
|
214
199
|
isChanged = true;
|
|
215
200
|
newNoon = allowedValues[newValueIndex];
|
|
@@ -219,7 +204,6 @@ export function getChangedNoon(values, event, focusOrders
|
|
|
219
204
|
isChanged = true;
|
|
220
205
|
newNoon = '';
|
|
221
206
|
}
|
|
222
|
-
|
|
223
207
|
return {
|
|
224
208
|
noon: newNoon,
|
|
225
209
|
isChanged,
|
|
@@ -16,17 +16,16 @@ export function getChangedYear(values, event, focusOrders, keyActions, _ref) {
|
|
|
16
16
|
day = '',
|
|
17
17
|
month = ''
|
|
18
18
|
} = values;
|
|
19
|
-
let isChanged = false;
|
|
19
|
+
let isChanged = false;
|
|
20
20
|
|
|
21
|
+
//Year Two Digit case
|
|
21
22
|
const {
|
|
22
23
|
length: yearLength
|
|
23
24
|
} = yearInfo;
|
|
24
25
|
const oldYear = year; // For get Centuries
|
|
25
|
-
|
|
26
26
|
if (yearLength === 2) {
|
|
27
27
|
year = convertYearToTwoDigit(year).toString();
|
|
28
28
|
}
|
|
29
|
-
|
|
30
29
|
let newDay = Number.parseInt(day) || 0;
|
|
31
30
|
const newMonth = Number.parseInt(month) || 0;
|
|
32
31
|
let newYear = Number.parseInt(year) || 0;
|
|
@@ -40,7 +39,6 @@ export function getChangedYear(values, event, focusOrders, keyActions, _ref) {
|
|
|
40
39
|
endPoint,
|
|
41
40
|
currentYear
|
|
42
41
|
} = getYearDetails(yearLength);
|
|
43
|
-
|
|
44
42
|
if (keyCode === 38) {
|
|
45
43
|
//up arrow
|
|
46
44
|
if (newYear === endPoint) {
|
|
@@ -70,17 +68,14 @@ export function getChangedYear(values, event, focusOrders, keyActions, _ref) {
|
|
|
70
68
|
let newValue = isNewType ? keyString : year.toString() + keyString;
|
|
71
69
|
const newValueString = newValue || '';
|
|
72
70
|
newValue = Number.parseInt(newValue);
|
|
73
|
-
|
|
74
71
|
if (isNewType) {
|
|
75
72
|
isChanged = true;
|
|
76
73
|
newYear = newValue;
|
|
77
74
|
} else {
|
|
78
75
|
isChanged = true;
|
|
79
|
-
|
|
80
76
|
if (newValue * 10 > endPoint) {
|
|
81
77
|
newFocusOrder += 1;
|
|
82
78
|
}
|
|
83
|
-
|
|
84
79
|
if (newValue > endPoint) {
|
|
85
80
|
// newYear = endPoint;
|
|
86
81
|
newYear = currentYear;
|
|
@@ -99,19 +94,15 @@ export function getChangedYear(values, event, focusOrders, keyActions, _ref) {
|
|
|
99
94
|
isChanged = true;
|
|
100
95
|
newYear = '';
|
|
101
96
|
}
|
|
102
|
-
|
|
103
97
|
if (yearLength === 2) {
|
|
104
98
|
newYear = convertTwoDigitToYear(newYear, oldYear);
|
|
105
99
|
}
|
|
106
|
-
|
|
107
100
|
const dayEnd = getDayEnd(newMonth, newYear);
|
|
108
101
|
let dayChanged = false;
|
|
109
|
-
|
|
110
102
|
if (newDay && newDay > dayEnd) {
|
|
111
103
|
dayChanged = true;
|
|
112
104
|
newDay = dayEnd;
|
|
113
105
|
}
|
|
114
|
-
|
|
115
106
|
return {
|
|
116
107
|
day: dayChanged ? newDay : day,
|
|
117
108
|
year: newYear,
|
|
@@ -4,50 +4,56 @@ export const clone = (a, b, c, d, e, f) => {
|
|
|
4
4
|
};
|
|
5
5
|
export const extract = (obj, keys, target) => {
|
|
6
6
|
target = target || {};
|
|
7
|
-
|
|
8
7
|
for (var i in obj) {
|
|
9
8
|
if (keys.indexOf(i) < 0) continue;
|
|
10
9
|
if (!Object.prototype.hasOwnProperty.call(obj, i)) continue;
|
|
11
10
|
target[i] = obj[i];
|
|
12
11
|
}
|
|
13
|
-
|
|
14
12
|
return target;
|
|
15
13
|
};
|
|
16
14
|
export const omit = (obj, keys, target) => {
|
|
17
15
|
target = target || {};
|
|
18
|
-
|
|
19
16
|
for (var i in obj) {
|
|
20
17
|
if (keys.indexOf(i) >= 0) continue;
|
|
21
18
|
if (!Object.prototype.hasOwnProperty.call(obj, i)) continue;
|
|
22
19
|
target[i] = obj[i];
|
|
23
20
|
}
|
|
24
|
-
|
|
25
21
|
return target;
|
|
26
22
|
};
|
|
27
23
|
export const equals = (x, y) => {
|
|
28
|
-
if (x === y) return true;
|
|
24
|
+
if (x === y) return true;
|
|
25
|
+
// if both x and y are null or undefined and exactly the same
|
|
29
26
|
|
|
30
|
-
if (x == null && y != null || x != null && y == null) return false;
|
|
27
|
+
if (x == null && y != null || x != null && y == null) return false;
|
|
28
|
+
//break if not same null or undefined
|
|
31
29
|
|
|
32
|
-
if (!(x instanceof Object) || !(y instanceof Object)) return false;
|
|
30
|
+
if (!(x instanceof Object) || !(y instanceof Object)) return false;
|
|
31
|
+
// if they are not strictly equal, they both need to be Objects
|
|
33
32
|
|
|
34
|
-
if (x.constructor !== y.constructor) return false;
|
|
33
|
+
if (x.constructor !== y.constructor) return false;
|
|
34
|
+
// they must have the exact same prototype chain, the closest we can do is
|
|
35
35
|
// test there constructor.
|
|
36
36
|
|
|
37
37
|
for (var p in x) {
|
|
38
|
-
if (!x.hasOwnProperty(p)) continue;
|
|
38
|
+
if (!x.hasOwnProperty(p)) continue;
|
|
39
|
+
// other properties were tested using x.constructor === y.constructor
|
|
39
40
|
|
|
40
|
-
if (!y.hasOwnProperty(p)) return false;
|
|
41
|
+
if (!y.hasOwnProperty(p)) return false;
|
|
42
|
+
// allows to compare x[ p ] and y[ p ] when set to undefined
|
|
41
43
|
|
|
42
|
-
if (x[p] === y[p]) continue;
|
|
44
|
+
if (x[p] === y[p]) continue;
|
|
45
|
+
// if they have the same strict value or identity then they are equal
|
|
43
46
|
|
|
44
|
-
if (typeof x[p] !== 'object') return false;
|
|
47
|
+
if (typeof x[p] !== 'object') return false;
|
|
48
|
+
// Numbers, Strings, Functions, Booleans must be strictly equal
|
|
45
49
|
|
|
46
|
-
if (!equals(x[p], y[p])) return false;
|
|
50
|
+
if (!equals(x[p], y[p])) return false;
|
|
51
|
+
// Objects and Arrays must be tested recursively
|
|
47
52
|
}
|
|
48
53
|
|
|
49
54
|
for (p in y) {
|
|
50
|
-
if (y.hasOwnProperty(p) && !x.hasOwnProperty(p)) return false;
|
|
55
|
+
if (y.hasOwnProperty(p) && !x.hasOwnProperty(p)) return false;
|
|
56
|
+
// allows x[ p ] to be set to undefined
|
|
51
57
|
}
|
|
52
58
|
|
|
53
59
|
return true;
|
|
@@ -1,10 +1,8 @@
|
|
|
1
1
|
const exports = {};
|
|
2
2
|
let types = 'Array Object String Date RegExp Function Boolean Number Null Undefined'.split(' ');
|
|
3
|
-
|
|
4
3
|
let type = function () {
|
|
5
4
|
return Object.prototype.toString.call(this).slice(8, -1);
|
|
6
5
|
};
|
|
7
|
-
|
|
8
6
|
for (let i = types.length; i--;) {
|
|
9
7
|
/*eslint-disable */
|
|
10
8
|
exports['is' + types[i]] = function (self) {
|
|
@@ -15,5 +13,4 @@ for (let i = types.length; i--;) {
|
|
|
15
13
|
}
|
|
16
14
|
/*eslint-enable */
|
|
17
15
|
|
|
18
|
-
|
|
19
16
|
export default exports;
|