@zohodesk/components 1.1.0 → 1.2.0-temp-195
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/.cli/MissedPropType_Keys.html +101 -0
- package/.cli/PropLessFiles.html +101 -0
- package/.cli/PropUnificationExcludeFilesArray.js +231 -0
- package/.cli/PropValidationExcludeFilesArray.js +1 -0
- package/.cli/ThemeValidationExcludeFiles.js +1 -0
- package/.cli/UnValidatedFiles.html +101 -0
- package/.cli/propValidation_report.html +182 -0
- package/.cli/stringContains.js +1 -0
- package/PropValidationExcludeFilesArray.js +1 -0
- package/README.md +1418 -1266
- package/assets/Appearance/dark/mode/Component_DarkMode.module.css +174 -169
- package/assets/Appearance/dark/themes/blue/blue_CTA_DarkModifyCategory.module.css +465 -450
- package/assets/Appearance/dark/themes/blue/blue_CTA_DarkTheme.module.css +31 -30
- package/assets/Appearance/dark/themes/blue/blue_ComponentTheme_DarkTheme.module.css +24 -24
- package/assets/Appearance/dark/themes/green/green_CTA_DarkModifyCategory.module.css +465 -450
- package/assets/Appearance/dark/themes/green/green_CTA_DarkTheme.module.css +31 -30
- package/assets/Appearance/dark/themes/green/green_ComponentTheme_DarkTheme.module.css +24 -24
- package/assets/Appearance/dark/themes/orange/orange_CTA_DarkModifyCategory.module.css +465 -450
- package/assets/Appearance/dark/themes/orange/orange_CTA_DarkTheme.module.css +31 -30
- package/assets/Appearance/dark/themes/orange/orange_ComponentTheme_DarkTheme.module.css +24 -24
- package/assets/Appearance/dark/themes/red/red_CTA_DarkModifyCategory.module.css +465 -450
- package/assets/Appearance/dark/themes/red/red_CTA_DarkTheme.module.css +31 -30
- package/assets/Appearance/dark/themes/red/red_ComponentTheme_DarkTheme.module.css +24 -24
- package/assets/Appearance/dark/themes/yellow/yellow_CTA_DarkModifyCategory.module.css +465 -450
- package/assets/Appearance/dark/themes/yellow/yellow_CTA_DarkTheme.module.css +31 -30
- package/assets/Appearance/dark/themes/yellow/yellow_ComponentTheme_DarkTheme.module.css +24 -24
- package/assets/Appearance/light/mode/Component_LightMode.module.css +173 -168
- package/assets/Appearance/light/themes/blue/blue_CTA_LightModifyCategory.module.css +465 -450
- package/assets/Appearance/light/themes/blue/blue_CTA_LightTheme.module.css +31 -30
- package/assets/Appearance/light/themes/blue/blue_ComponentTheme_LightTheme.module.css +24 -24
- package/assets/Appearance/light/themes/green/green_CTA_LightModifyCategory.module.css +465 -450
- package/assets/Appearance/light/themes/green/green_CTA_LightTheme.module.css +31 -30
- package/assets/Appearance/light/themes/green/green_ComponentTheme_LightTheme.module.css +24 -24
- package/assets/Appearance/light/themes/orange/orange_CTA_LightModifyCategory.module.css +465 -450
- package/assets/Appearance/light/themes/orange/orange_CTA_LightTheme.module.css +31 -30
- package/assets/Appearance/light/themes/orange/orange_ComponentTheme_LightTheme.module.css +24 -24
- package/assets/Appearance/light/themes/red/red_CTA_LightModifyCategory.module.css +465 -450
- package/assets/Appearance/light/themes/red/red_CTA_LightTheme.module.css +31 -30
- package/assets/Appearance/light/themes/red/red_ComponentTheme_LightTheme.module.css +24 -24
- package/assets/Appearance/light/themes/yellow/yellow_CTA_LightModifyCategory.module.css +465 -450
- package/assets/Appearance/light/themes/yellow/yellow_CTA_LightTheme.module.css +31 -30
- package/assets/Appearance/light/themes/yellow/yellow_ComponentTheme_LightTheme.module.css +24 -24
- package/assets/Appearance/pureDark/mode/Component_PureDarkMode.module.css +174 -169
- package/assets/Appearance/pureDark/themes/blue/blue_CTA_PureDarkModifyCategory.module.css +465 -450
- package/assets/Appearance/pureDark/themes/blue/blue_CTA_PureDarkTheme.module.css +31 -30
- package/assets/Appearance/pureDark/themes/blue/blue_ComponentTheme_PureDarkTheme.module.css +24 -24
- package/assets/Appearance/pureDark/themes/green/green_CTA_PureDarkModifyCategory.module.css +465 -450
- package/assets/Appearance/pureDark/themes/green/green_CTA_PureDarkTheme.module.css +31 -30
- package/assets/Appearance/pureDark/themes/green/green_ComponentTheme_PureDarkTheme.module.css +24 -24
- package/assets/Appearance/pureDark/themes/orange/orange_CTA_PureDarkModifyCategory.module.css +465 -450
- package/assets/Appearance/pureDark/themes/orange/orange_CTA_PureDarkTheme.module.css +31 -30
- package/assets/Appearance/pureDark/themes/orange/orange_ComponentTheme_PureDarkTheme.module.css +24 -24
- package/assets/Appearance/pureDark/themes/red/red_CTA_PureDarkModifyCategory.module.css +465 -450
- package/assets/Appearance/pureDark/themes/red/red_CTA_PureDarkTheme.module.css +31 -30
- package/assets/Appearance/pureDark/themes/red/red_ComponentTheme_PureDarkTheme.module.css +24 -24
- package/assets/Appearance/pureDark/themes/yellow/yellow_CTA_PureDarkModifyCategory.module.css +465 -450
- package/assets/Appearance/pureDark/themes/yellow/yellow_CTA_PureDarkTheme.module.css +31 -30
- package/assets/Appearance/pureDark/themes/yellow/yellow_ComponentTheme_PureDarkTheme.module.css +24 -24
- package/assets/Contrast/darkContrastLightness.module.css +34 -34
- package/assets/Contrast/lightContrastLightness.module.css +34 -34
- package/assets/Contrast/pureDarkContrastLightness.module.css +34 -34
- package/es/Animation/Animation.js +4 -86
- package/es/Animation/utils.js +83 -0
- package/es/AppContainer/AppContainer.js +13 -9
- package/es/AppContainer/AppContainer.module.css +18 -18
- package/es/Avatar/Avatar.js +14 -14
- package/es/Avatar/Avatar.module.css +175 -175
- package/es/Avatar/__tests__/Avatar.spec.js +178 -158
- package/es/Avatar/__tests__/__snapshots__/Avatar.spec.js.snap +591 -288
- package/es/AvatarTeam/AvatarTeam.js +14 -14
- package/es/AvatarTeam/AvatarTeam.module.css +189 -189
- package/es/AvatarTeam/__tests__/AvatarTeam.spec.js +118 -56
- package/es/AvatarTeam/__tests__/__snapshots__/AvatarTeam.spec.js.snap +705 -226
- package/es/Button/Button.js +14 -11
- package/es/Button/__tests__/Button.spec.js +122 -0
- package/es/Button/__tests__/__snapshots__/Button.spec.js.snap +440 -0
- package/es/Button/css/Button.module.css +528 -526
- package/es/Button/css/cssJSLogic.js +1 -1
- package/es/Button/props/defaultProps.js +2 -1
- package/es/Button/props/propTypes.js +3 -2
- package/es/Buttongroup/Buttongroup.js +1 -1
- package/es/Buttongroup/Buttongroup.module.css +104 -105
- package/es/Buttongroup/__tests__/Buttongroup.spec.js +37 -0
- package/es/Buttongroup/__tests__/__snapshots__/Buttongroup.spec.js.snap +191 -0
- package/es/Card/Card.js +4 -4
- package/es/Card/Card.module.css +20 -20
- package/es/Card/props/propTypes.js +9 -4
- package/es/CheckBox/CheckBox.js +18 -8
- package/es/CheckBox/CheckBox.module.css +157 -157
- package/es/CheckBox/props/propTypes.js +1 -2
- package/es/DateTime/CalendarView.js +0 -0
- package/es/DateTime/DateTime.js +2 -29
- package/es/DateTime/DateTime.module.css +248 -235
- package/es/DateTime/DateTimePopupFooter.js +5 -1
- package/es/DateTime/DateTimePopupHeader.js +3 -1
- package/es/DateTime/DateWidget.js +17 -12
- package/es/DateTime/DateWidget.module.css +38 -38
- package/es/DateTime/DaysRow.js +3 -1
- package/es/DateTime/Time.js +4 -0
- package/es/DateTime/YearView.js +0 -1
- package/es/DateTime/YearView.module.css +98 -98
- package/es/DateTime/common.js +0 -0
- package/es/DateTime/dateFormatUtils/dateFormat.js +14 -2
- package/es/DateTime/dateFormatUtils/dayChange.js +2 -1
- package/es/DateTime/dateFormatUtils/index.js +3 -5
- package/es/DateTime/dateFormatUtils/monthChange.js +2 -1
- package/es/DateTime/dateFormatUtils/timeChange.js +4 -4
- package/es/DateTime/dateFormatUtils/yearChange.js +2 -1
- package/es/DateTime/index.js +0 -0
- package/es/DateTime/objectUtils.js +0 -0
- package/es/DateTime/props/defaultProps.js +6 -0
- package/es/DateTime/props/propTypes.js +58 -6
- package/es/DateTime/typeChecker.js +0 -0
- package/es/DateTime/validator.js +0 -0
- package/es/DropBox/DropBox.js +24 -35
- package/es/DropBox/DropBoxElement/DropBoxElement.js +3 -2
- package/es/DropBox/DropBoxElement/css/DropBoxElement.module.css +431 -434
- package/es/DropBox/DropBoxElement/css/cssJSLogic.js +1 -1
- package/es/DropBox/DropBoxElement/props/propTypes.js +7 -1
- package/es/DropBox/DropBoxPositionMapping.json +144 -144
- package/es/DropBox/css/DropBox.module.css +58 -58
- package/es/DropBox/props/propTypes.js +2 -1
- package/es/DropBox/utils/isMobilePopover.js +17 -0
- package/es/DropDown/DropDown.js +3 -8
- package/es/DropDown/DropDown.module.css +5 -5
- package/es/DropDown/DropDownHeading.js +0 -0
- package/es/DropDown/DropDownHeading.module.css +53 -53
- package/es/DropDown/DropDownItem.js +0 -0
- package/es/DropDown/DropDownItem.module.css +94 -94
- package/es/DropDown/DropDownSearch.js +0 -0
- package/es/DropDown/DropDownSearch.module.css +14 -14
- package/es/DropDown/DropDownSeparator.js +0 -0
- package/es/DropDown/DropDownSeparator.module.css +7 -7
- package/es/DropDown/props/propTypes.js +5 -18
- package/es/Heading/Heading.module.css +4 -4
- package/es/Label/Label.js +9 -4
- package/es/Label/Label.module.css +57 -52
- package/es/Label/LabelColors.module.css +20 -20
- package/es/Label/__tests__/Label.spec.js +76 -97
- package/es/Label/__tests__/__snapshots__/Label.spec.js.snap +312 -101
- package/es/Label/props/propTypes.js +5 -1
- package/es/Layout/Box.js +2 -1
- package/es/Layout/Container.js +2 -1
- package/es/Layout/Layout.module.css +335 -335
- package/es/Layout/utils.js +0 -0
- package/es/ListItem/ListContainer.js +8 -6
- package/es/ListItem/ListItem.js +4 -5
- package/es/ListItem/ListItem.module.css +205 -216
- package/es/ListItem/ListItemWithAvatar.js +4 -5
- package/es/ListItem/ListItemWithCheckBox.js +4 -5
- package/es/ListItem/ListItemWithIcon.js +4 -5
- package/es/ListItem/ListItemWithRadio.js +4 -5
- package/es/ListItem/props/propTypes.js +9 -4
- package/es/Modal/Modal.js +4 -5
- package/es/Modal/props/propTypes.js +2 -1
- package/es/MultiSelect/AdvancedGroupMultiSelect.js +12 -10
- package/es/MultiSelect/AdvancedMultiSelect.js +12 -13
- package/es/MultiSelect/MobileHeader/MobileHeader.js +50 -0
- package/es/MultiSelect/MobileHeader/MobileHeader.module.css +16 -0
- package/es/MultiSelect/MobileHeader/props/defaultProps.js +7 -0
- package/es/MultiSelect/MobileHeader/props/propTypes.js +7 -0
- package/es/MultiSelect/MultiSelect.js +183 -179
- package/es/MultiSelect/MultiSelect.module.css +204 -207
- package/es/MultiSelect/MultiSelectHeader.js +1 -2
- package/es/MultiSelect/MultiSelectWithAvatar.js +75 -190
- package/es/MultiSelect/SelectedOptions.js +6 -8
- package/es/MultiSelect/SelectedOptions.module.css +15 -15
- package/es/MultiSelect/Suggestions.js +8 -9
- package/es/MultiSelect/props/defaultProps.js +6 -2
- package/es/MultiSelect/props/propTypes.js +149 -211
- package/es/PopOver/PopOver.js +1 -9
- package/es/PopOver/PopOver.module.css +9 -8
- package/es/Popup/Popup.js +3 -4
- package/es/Popup/PositionMapping.json +73 -73
- package/es/Radio/Radio.js +26 -12
- package/es/Radio/Radio.module.css +115 -112
- package/es/Radio/__tests__/Radio.spec.js +241 -0
- package/es/Radio/__tests__/__snapshots__/Radio.spec.js.snap +1837 -0
- package/es/Radio/props/defaultProps.js +1 -0
- package/es/Radio/props/propTypes.js +10 -2
- package/es/Responsive/CustomResponsive.js +0 -0
- package/es/Responsive/RefWrapper.js +2 -1
- package/es/ResponsiveDropBox/ResponsiveDropBox.js +2 -4
- package/es/ResponsiveDropBox/ResponsiveDropBox.module.css +6 -6
- package/es/ResponsiveDropBox/props/propTypes.js +2 -1
- package/es/Ribbon/Ribbon.js +0 -0
- package/es/Ribbon/Ribbon.module.css +499 -454
- package/es/Ribbon/__tests__/Ribbon.spec.js +49 -165
- package/es/Ribbon/__tests__/__snapshots__/Ribbon.spec.js.snap +374 -163
- package/es/RippleEffect/RippleEffect.js +3 -2
- package/es/RippleEffect/RippleEffect.module.css +92 -92
- package/es/RippleEffect/__tests__/RippleEffect.spec.js +69 -0
- package/es/RippleEffect/__tests__/__snapshots__/RippleEffect.spec.js.snap +171 -0
- package/es/RippleEffect/props/defaultProps.js +1 -0
- package/es/RippleEffect/props/propTypes.js +1 -0
- package/es/Select/GroupSelect.js +14 -11
- package/es/Select/Select.js +20 -16
- package/es/Select/Select.module.css +134 -108
- package/es/Select/SelectWithAvatar.js +2 -1
- package/es/Select/SelectWithIcon.js +5 -2
- package/es/Select/props/defaultProps.js +1 -0
- package/es/Select/props/propTypes.js +20 -7
- package/es/Stencils/Stencils.js +0 -0
- package/es/Stencils/Stencils.module.css +96 -96
- package/es/Stencils/__tests__/Stencils.spec.js +43 -66
- package/es/Stencils/__tests__/__snapshots__/Stencils.spec.js.snap +89 -49
- package/es/Switch/Switch.js +10 -10
- package/es/Switch/Switch.module.css +127 -127
- package/es/Switch/__tests__/Switch.spec.js +156 -0
- package/es/Switch/__tests__/__snapshots__/Switch.spec.js.snap +831 -0
- package/es/Tab/Tab.js +4 -5
- package/es/Tab/Tab.module.css +100 -100
- package/es/Tab/TabContent.module.css +4 -4
- package/es/Tab/TabContentWrapper.js +6 -2
- package/es/Tab/TabWrapper.js +2 -4
- package/es/Tab/Tabs.js +33 -33
- package/es/Tab/Tabs.module.css +136 -136
- package/es/Tab/props/defaultProps.js +2 -1
- package/es/Tab/props/propTypes.js +3 -2
- package/es/Tag/Tag.js +12 -11
- package/es/Tag/Tag.module.css +253 -254
- package/es/Tag/props/propTypes.js +2 -1
- package/es/TextBox/TextBox.js +16 -9
- package/es/TextBox/TextBox.module.css +197 -158
- package/es/TextBox/props/defaultProps.js +1 -1
- package/es/TextBox/props/propTypes.js +3 -1
- package/es/TextBoxIcon/TextBoxIcon.js +4 -4
- package/es/TextBoxIcon/TextBoxIcon.module.css +79 -79
- package/es/TextBoxIcon/props/defaultProps.js +1 -0
- package/es/TextBoxIcon/props/propTypes.js +3 -1
- package/es/Textarea/Textarea.js +4 -6
- package/es/Textarea/Textarea.module.css +140 -139
- package/es/Textarea/props/propTypes.js +0 -1
- package/es/Tooltip/Tooltip.js +4 -2
- package/es/Tooltip/Tooltip.module.css +140 -140
- package/es/Tooltip/props/propTypes.js +0 -3
- package/es/VelocityAnimation/VelocityAnimationGroup/VelocityAnimationGroup.js +4 -5
- package/es/common/a11y.module.css +3 -3
- package/es/common/animation.module.css +624 -624
- package/es/common/avatarsizes.module.css +48 -48
- package/es/common/basic.module.css +33 -33
- package/es/common/basicReset.module.css +40 -40
- package/es/common/boxShadow.module.css +33 -33
- package/es/common/common.module.css +524 -524
- package/es/common/customscroll.module.css +142 -91
- package/es/common/reset.module.css +13 -13
- package/es/common/transition.module.css +146 -146
- package/es/deprecated/PortalLayer/PortalLayer.js +11 -8
- package/es/deprecated/PortalLayer/props/propTypes.js +10 -1
- package/es/index.js +2 -1
- package/es/semantic/Button/props/propTypes.js +1 -5
- package/es/semantic/Button/semanticButton.module.css +9 -9
- package/es/utils/Common.js +3 -0
- package/es/utils/dropDownUtils.js +0 -0
- package/es/utils/index.js +0 -2
- package/es/v1/Accordion/Accordion.js +66 -0
- package/es/v1/Accordion/AccordionItem.js +57 -0
- package/es/v1/Accordion/index.js +2 -0
- package/es/v1/Accordion/props/defaultProps.js +12 -0
- package/es/v1/Accordion/props/propTypes.js +33 -0
- package/es/v1/Animation/Animation.js +45 -0
- package/es/v1/Animation/props/defaultProps.js +7 -0
- package/es/v1/Animation/props/propTypes.js +12 -0
- package/es/v1/Animation/utils.js +83 -0
- package/es/v1/AppContainer/AppContainer.js +121 -0
- package/es/v1/AppContainer/props/defaultProps.js +10 -0
- package/es/v1/AppContainer/props/propTypes.js +17 -0
- package/es/v1/Avatar/Avatar.js +139 -0
- package/es/v1/Avatar/props/defaultProps.js +17 -0
- package/es/v1/Avatar/props/propTypes.js +26 -0
- package/es/v1/AvatarTeam/AvatarTeam.js +70 -0
- package/es/v1/AvatarTeam/props/defaultProps.js +17 -0
- package/es/v1/AvatarTeam/props/propTypes.js +27 -0
- package/es/v1/Button/Button.js +67 -0
- package/es/v1/Button/props/defaultProps.js +18 -0
- package/es/v1/Button/props/propTypes.js +27 -0
- package/es/v1/Buttongroup/Buttongroup.js +31 -0
- package/es/v1/Buttongroup/props/defaultProps.js +6 -0
- package/es/v1/Buttongroup/props/propTypes.js +9 -0
- package/es/v1/Card/Card.js +237 -0
- package/es/v1/Card/index.js +4 -0
- package/es/v1/Card/props/defaultProps.js +25 -0
- package/es/v1/Card/props/propTypes.js +48 -0
- package/es/v1/CheckBox/CheckBox.js +161 -0
- package/es/v1/CheckBox/props/defaultProps.js +18 -0
- package/es/v1/CheckBox/props/propTypes.js +41 -0
- package/es/v1/DateTime/CalendarView.js +251 -0
- package/es/v1/DateTime/DateTime.js +760 -0
- package/es/v1/DateTime/DateTimePopupFooter.js +47 -0
- package/es/v1/DateTime/DateTimePopupHeader.js +105 -0
- package/es/v1/DateTime/DateWidget.js +1107 -0
- package/es/v1/DateTime/DaysRow.js +31 -0
- package/es/v1/DateTime/Time.js +166 -0
- package/es/v1/DateTime/YearView.js +264 -0
- package/es/v1/DateTime/index.js +1 -0
- package/es/v1/DateTime/props/defaultProps.js +57 -0
- package/es/v1/DateTime/props/propTypes.js +195 -0
- package/es/v1/DropBox/DropBox.js +79 -0
- package/es/v1/DropBox/DropBoxElement/DropBoxElement.js +133 -0
- package/es/v1/DropBox/DropBoxElement/props/defaultProps.js +18 -0
- package/es/v1/DropBox/DropBoxElement/props/propTypes.js +51 -0
- package/es/v1/DropBox/props/defaultProps.js +14 -0
- package/es/v1/DropBox/props/propTypes.js +16 -0
- package/es/v1/DropBox/utils/isMobilePopover.js +17 -0
- package/es/v1/DropDown/DropDown.js +53 -0
- package/es/v1/DropDown/DropDownHeading.js +36 -0
- package/es/v1/DropDown/DropDownItem.js +56 -0
- package/es/v1/DropDown/DropDownSearch.js +55 -0
- package/es/v1/DropDown/DropDownSeparator.js +12 -0
- package/es/v1/DropDown/props/defaultProps.js +20 -0
- package/es/v1/DropDown/props/propTypes.js +65 -0
- package/es/v1/Heading/Heading.js +32 -0
- package/es/v1/Heading/props/defaultProps.js +5 -0
- package/es/v1/Heading/props/propTypes.js +11 -0
- package/es/v1/Label/Label.js +40 -0
- package/es/v1/Label/props/defaultProps.js +11 -0
- package/es/v1/Label/props/propTypes.js +19 -0
- package/es/v1/Layout/Box.js +115 -0
- package/es/v1/Layout/Container.js +132 -0
- package/es/v1/Layout/index.js +2 -0
- package/es/v1/Layout/props/defaultProps.js +16 -0
- package/es/v1/Layout/props/propTypes.js +46 -0
- package/es/v1/ListItem/ListContainer.js +104 -0
- package/es/v1/ListItem/ListItem.js +123 -0
- package/es/v1/ListItem/ListItemWithAvatar.js +143 -0
- package/es/v1/ListItem/ListItemWithCheckBox.js +103 -0
- package/es/v1/ListItem/ListItemWithIcon.js +126 -0
- package/es/v1/ListItem/ListItemWithRadio.js +104 -0
- package/es/v1/ListItem/index.js +6 -0
- package/es/v1/ListItem/props/defaultProps.js +97 -0
- package/es/v1/ListItem/props/propTypes.js +202 -0
- package/es/v1/Modal/Modal.js +125 -0
- package/es/v1/Modal/props/defaultProps.js +3 -0
- package/es/v1/Modal/props/propTypes.js +7 -0
- package/es/v1/MultiSelect/AdvancedGroupMultiSelect.js +1079 -0
- package/es/v1/MultiSelect/AdvancedMultiSelect.js +567 -0
- package/es/v1/MultiSelect/EmptyState.js +64 -0
- package/es/v1/MultiSelect/MobileHeader/MobileHeader.js +50 -0
- package/es/v1/MultiSelect/MobileHeader/props/defaultProps.js +7 -0
- package/es/v1/MultiSelect/MobileHeader/props/propTypes.js +7 -0
- package/es/v1/MultiSelect/MultiSelect.js +1103 -0
- package/es/v1/MultiSelect/MultiSelectHeader.js +32 -0
- package/es/v1/MultiSelect/MultiSelectWithAvatar.js +199 -0
- package/es/v1/MultiSelect/SelectedOptions.js +80 -0
- package/es/v1/MultiSelect/Suggestions.js +141 -0
- package/es/v1/MultiSelect/index.js +4 -0
- package/es/v1/MultiSelect/props/defaultProps.js +155 -0
- package/es/v1/MultiSelect/props/propTypes.js +312 -0
- package/es/v1/PopOver/PopOver.js +176 -0
- package/es/v1/PopOver/props/defaultProps.js +7 -0
- package/es/v1/PopOver/props/propTypes.js +53 -0
- package/es/v1/Popup/Popup.js +644 -0
- package/es/v1/Radio/Radio.js +130 -0
- package/es/v1/Radio/props/defaultProps.js +15 -0
- package/es/v1/Radio/props/propTypes.js +40 -0
- package/es/v1/ResponsiveDropBox/ResponsiveDropBox.js +56 -0
- package/es/v1/ResponsiveDropBox/props/defaultProps.js +4 -0
- package/es/v1/ResponsiveDropBox/props/propTypes.js +8 -0
- package/es/v1/Ribbon/Ribbon.js +33 -0
- package/es/v1/Ribbon/props/defaultProps.js +9 -0
- package/es/v1/Ribbon/props/propTypes.js +11 -0
- package/es/v1/RippleEffect/RippleEffect.js +25 -0
- package/es/v1/RippleEffect/props/defaultProps.js +10 -0
- package/es/v1/RippleEffect/props/propTypes.js +12 -0
- package/es/v1/Select/GroupSelect.js +805 -0
- package/es/v1/Select/Select.js +973 -0
- package/es/v1/Select/SelectWithAvatar.js +344 -0
- package/es/v1/Select/SelectWithIcon.js +535 -0
- package/es/v1/Select/index.js +4 -0
- package/es/v1/Select/props/defaultProps.js +120 -0
- package/es/v1/Select/props/propTypes.js +288 -0
- package/es/v1/Stencils/Stencils.js +26 -0
- package/es/v1/Stencils/props/defaultProps.js +6 -0
- package/es/v1/Stencils/props/propTypes.js +7 -0
- package/es/v1/Switch/Switch.js +94 -0
- package/es/v1/Switch/props/defaultProps.js +11 -0
- package/es/v1/Switch/props/propTypes.js +28 -0
- package/es/v1/Tab/Tab.js +106 -0
- package/es/v1/Tab/TabContent.js +30 -0
- package/es/v1/Tab/TabContentWrapper.js +33 -0
- package/es/v1/Tab/TabWrapper.js +55 -0
- package/es/v1/Tab/Tabs.js +523 -0
- package/es/v1/Tab/index.js +5 -0
- package/es/v1/Tab/props/defaultProps.js +45 -0
- package/es/v1/Tab/props/propTypes.js +108 -0
- package/es/v1/Tab/v1Tab.module.css +100 -0
- package/es/v1/Tab/v1TabContent.module.css +4 -0
- package/es/v1/Tab/v1Tabs.module.css +137 -0
- package/es/v1/Tag/Tag.js +138 -0
- package/es/v1/Tag/props/defaultProps.js +14 -0
- package/es/v1/Tag/props/propTypes.js +35 -0
- package/es/v1/TextBox/TextBox.js +160 -0
- package/es/v1/TextBox/props/defaultProps.js +20 -0
- package/es/v1/TextBox/props/propTypes.js +56 -0
- package/es/v1/TextBoxIcon/TextBoxIcon.js +158 -0
- package/es/v1/TextBoxIcon/props/defaultProps.js +23 -0
- package/es/v1/TextBoxIcon/props/propTypes.js +52 -0
- package/es/v1/Textarea/Textarea.js +100 -0
- package/es/v1/Textarea/props/defaultProps.js +17 -0
- package/es/v1/Textarea/props/propTypes.js +31 -0
- package/es/v1/Tooltip/Tooltip.js +520 -0
- package/es/v1/Tooltip/props/defaultProps.js +4 -0
- package/es/v1/Tooltip/props/propTypes.js +5 -0
- package/es/v1/Typography/Typography.js +38 -0
- package/es/v1/Typography/css/Typography.module.css +380 -0
- package/es/v1/Typography/css/cssJSLogic.js +56 -0
- package/es/v1/Typography/props/defaultProps.js +8 -0
- package/es/v1/Typography/props/propTypes.js +27 -0
- package/es/v1/Typography/utils/index.js +50 -0
- package/es/v1/VelocityAnimation/VelocityAnimation/VelocityAnimation.js +69 -0
- package/es/v1/VelocityAnimation/VelocityAnimation/props/defaultProps.js +7 -0
- package/es/v1/VelocityAnimation/VelocityAnimation/props/propTypes.js +12 -0
- package/es/v1/VelocityAnimation/VelocityAnimationGroup/VelocityAnimationGroup.js +99 -0
- package/es/v1/VelocityAnimation/VelocityAnimationGroup/props/defaultProps.js +15 -0
- package/es/v1/VelocityAnimation/VelocityAnimationGroup/props/propTypes.js +19 -0
- package/es/v1/semantic/Button/Button.js +53 -0
- package/es/v1/semantic/Button/props/defaultProps.js +12 -0
- package/es/v1/semantic/Button/props/propTypes.js +22 -0
- package/es/v1/semantic/index.js +1 -0
- package/install.md +10 -10
- package/lib/Animation/Animation.js +4 -86
- package/lib/Animation/utils.js +94 -0
- package/lib/AppContainer/AppContainer.js +5 -0
- package/lib/AppContainer/AppContainer.module.css +18 -18
- package/lib/Avatar/Avatar.js +11 -10
- package/lib/Avatar/Avatar.module.css +175 -175
- package/lib/Avatar/__tests__/Avatar.spec.js +156 -176
- package/lib/Avatar/__tests__/__snapshots__/Avatar.spec.js.snap +591 -288
- package/lib/AvatarTeam/AvatarTeam.js +7 -7
- package/lib/AvatarTeam/AvatarTeam.module.css +189 -189
- package/lib/AvatarTeam/__tests__/AvatarTeam.spec.js +125 -72
- package/lib/AvatarTeam/__tests__/__snapshots__/AvatarTeam.spec.js.snap +705 -226
- package/lib/Button/Button.js +11 -7
- package/lib/Button/__tests__/Button.spec.js +129 -0
- package/lib/Button/__tests__/__snapshots__/Button.spec.js.snap +440 -0
- package/lib/Button/css/Button.module.css +528 -526
- package/lib/Button/css/cssJSLogic.js +1 -1
- package/lib/Button/props/defaultProps.js +2 -1
- package/lib/Button/props/propTypes.js +3 -2
- package/lib/Buttongroup/Buttongroup.js +1 -1
- package/lib/Buttongroup/Buttongroup.module.css +104 -105
- package/lib/Buttongroup/__tests__/Buttongroup.spec.js +44 -0
- package/lib/Buttongroup/__tests__/__snapshots__/Buttongroup.spec.js.snap +191 -0
- package/lib/Card/Card.js +4 -4
- package/lib/Card/Card.module.css +20 -20
- package/lib/Card/props/propTypes.js +9 -4
- package/lib/CheckBox/CheckBox.js +34 -24
- package/lib/CheckBox/CheckBox.module.css +157 -157
- package/lib/CheckBox/props/propTypes.js +1 -2
- package/lib/DateTime/CalendarView.js +0 -0
- package/lib/DateTime/DateTime.js +3 -30
- package/lib/DateTime/DateTime.module.css +248 -235
- package/lib/DateTime/DateTimePopupFooter.js +7 -1
- package/lib/DateTime/DateTimePopupHeader.js +4 -1
- package/lib/DateTime/DateWidget.js +24 -19
- package/lib/DateTime/DateWidget.module.css +38 -38
- package/lib/DateTime/DaysRow.js +4 -1
- package/lib/DateTime/Time.js +6 -0
- package/lib/DateTime/YearView.js +0 -1
- package/lib/DateTime/YearView.module.css +98 -98
- package/lib/DateTime/common.js +0 -0
- package/lib/DateTime/dateFormatUtils/dateFormat.js +16 -2
- package/lib/DateTime/dateFormatUtils/dayChange.js +3 -1
- package/lib/DateTime/dateFormatUtils/index.js +3 -7
- package/lib/DateTime/dateFormatUtils/monthChange.js +3 -1
- package/lib/DateTime/dateFormatUtils/timeChange.js +3 -3
- package/lib/DateTime/dateFormatUtils/yearChange.js +3 -1
- package/lib/DateTime/index.js +0 -0
- package/lib/DateTime/objectUtils.js +0 -0
- package/lib/DateTime/props/defaultProps.js +10 -2
- package/lib/DateTime/props/propTypes.js +64 -8
- package/lib/DateTime/typeChecker.js +0 -0
- package/lib/DateTime/validator.js +0 -0
- package/lib/DropBox/DropBox.js +18 -28
- package/lib/DropBox/DropBoxElement/DropBoxElement.js +3 -2
- package/lib/DropBox/DropBoxElement/css/DropBoxElement.module.css +431 -434
- package/lib/DropBox/DropBoxElement/css/cssJSLogic.js +1 -1
- package/lib/DropBox/DropBoxElement/props/propTypes.js +7 -1
- package/lib/DropBox/DropBoxPositionMapping.json +144 -144
- package/lib/DropBox/css/DropBox.module.css +58 -58
- package/lib/DropBox/props/propTypes.js +2 -1
- package/lib/DropBox/utils/isMobilePopover.js +25 -0
- package/lib/DropDown/DropDown.js +1 -6
- package/lib/DropDown/DropDown.module.css +5 -5
- package/lib/DropDown/DropDownHeading.js +0 -0
- package/lib/DropDown/DropDownHeading.module.css +53 -53
- package/lib/DropDown/DropDownItem.js +0 -0
- package/lib/DropDown/DropDownItem.module.css +94 -94
- package/lib/DropDown/DropDownSearch.js +0 -0
- package/lib/DropDown/DropDownSearch.module.css +14 -14
- package/lib/DropDown/DropDownSeparator.js +0 -0
- package/lib/DropDown/DropDownSeparator.module.css +7 -7
- package/lib/DropDown/props/propTypes.js +11 -19
- package/lib/Heading/Heading.module.css +4 -4
- package/lib/Label/Label.js +6 -2
- package/lib/Label/Label.module.css +57 -52
- package/lib/Label/LabelColors.module.css +20 -20
- package/lib/Label/__tests__/Label.spec.js +86 -117
- package/lib/Label/__tests__/__snapshots__/Label.spec.js.snap +312 -101
- package/lib/Label/props/propTypes.js +5 -1
- package/lib/Layout/Box.js +0 -1
- package/lib/Layout/Container.js +0 -1
- package/lib/Layout/Layout.module.css +335 -335
- package/lib/Layout/utils.js +0 -0
- package/lib/ListItem/ListContainer.js +10 -2
- package/lib/ListItem/ListItem.js +0 -0
- package/lib/ListItem/ListItem.module.css +205 -216
- package/lib/ListItem/props/propTypes.js +9 -4
- package/lib/Modal/props/propTypes.js +2 -1
- package/lib/MultiSelect/AdvancedGroupMultiSelect.js +12 -11
- package/lib/MultiSelect/AdvancedMultiSelect.js +4 -4
- package/lib/MultiSelect/MobileHeader/MobileHeader.js +62 -0
- package/lib/MultiSelect/MobileHeader/MobileHeader.module.css +16 -0
- package/lib/MultiSelect/MobileHeader/props/defaultProps.js +14 -0
- package/lib/MultiSelect/MobileHeader/props/propTypes.js +18 -0
- package/lib/MultiSelect/MultiSelect.js +183 -180
- package/lib/MultiSelect/MultiSelect.module.css +204 -207
- package/lib/MultiSelect/MultiSelectHeader.js +1 -2
- package/lib/MultiSelect/MultiSelectWithAvatar.js +76 -188
- package/lib/MultiSelect/SelectedOptions.module.css +15 -15
- package/lib/MultiSelect/Suggestions.js +2 -1
- package/lib/MultiSelect/props/defaultProps.js +6 -2
- package/lib/MultiSelect/props/propTypes.js +163 -215
- package/lib/PopOver/PopOver.js +1 -8
- package/lib/PopOver/PopOver.module.css +9 -8
- package/lib/Popup/Popup.js +0 -0
- package/lib/Popup/PositionMapping.json +73 -73
- package/lib/Radio/Radio.js +46 -32
- package/lib/Radio/Radio.module.css +115 -112
- package/lib/Radio/__tests__/Radio.spec.js +250 -0
- package/lib/Radio/__tests__/__snapshots__/Radio.spec.js.snap +1837 -0
- package/lib/Radio/props/defaultProps.js +1 -0
- package/lib/Radio/props/propTypes.js +10 -2
- package/lib/Responsive/CustomResponsive.js +0 -0
- package/lib/Responsive/RefWrapper.js +2 -1
- package/lib/ResponsiveDropBox/ResponsiveDropBox.module.css +6 -6
- package/lib/ResponsiveDropBox/props/propTypes.js +11 -2
- package/lib/Ribbon/Ribbon.js +0 -0
- package/lib/Ribbon/Ribbon.module.css +499 -454
- package/lib/Ribbon/__tests__/Ribbon.spec.js +38 -172
- package/lib/Ribbon/__tests__/__snapshots__/Ribbon.spec.js.snap +374 -163
- package/lib/RippleEffect/RippleEffect.js +5 -4
- package/lib/RippleEffect/RippleEffect.module.css +92 -92
- package/lib/RippleEffect/__tests__/RippleEffect.spec.js +76 -0
- package/lib/RippleEffect/__tests__/__snapshots__/RippleEffect.spec.js.snap +171 -0
- package/lib/RippleEffect/props/defaultProps.js +1 -0
- package/lib/RippleEffect/props/propTypes.js +1 -0
- package/lib/Select/GroupSelect.js +13 -8
- package/lib/Select/Select.js +19 -9
- package/lib/Select/Select.module.css +134 -108
- package/lib/Select/SelectWithAvatar.js +2 -1
- package/lib/Select/SelectWithIcon.js +5 -3
- package/lib/Select/props/defaultProps.js +1 -0
- package/lib/Select/props/propTypes.js +29 -8
- package/lib/Stencils/Stencils.js +0 -0
- package/lib/Stencils/Stencils.module.css +96 -96
- package/lib/Stencils/__tests__/Stencils.spec.js +34 -65
- package/lib/Stencils/__tests__/__snapshots__/Stencils.spec.js.snap +89 -49
- package/lib/Switch/Switch.js +2 -2
- package/lib/Switch/Switch.module.css +127 -127
- package/lib/Switch/__tests__/Switch.spec.js +163 -0
- package/lib/Switch/__tests__/__snapshots__/Switch.spec.js.snap +831 -0
- package/lib/Tab/Tab.module.css +100 -100
- package/lib/Tab/TabContent.module.css +4 -4
- package/lib/Tab/TabContentWrapper.js +9 -4
- package/lib/Tab/Tabs.js +11 -11
- package/lib/Tab/Tabs.module.css +136 -136
- package/lib/Tab/props/defaultProps.js +2 -1
- package/lib/Tab/props/propTypes.js +3 -2
- package/lib/Tag/Tag.js +12 -11
- package/lib/Tag/Tag.module.css +253 -254
- package/lib/Tag/props/propTypes.js +2 -1
- package/lib/TextBox/TextBox.js +19 -11
- package/lib/TextBox/TextBox.module.css +197 -158
- package/lib/TextBox/props/defaultProps.js +1 -1
- package/lib/TextBox/props/propTypes.js +1 -1
- package/lib/TextBoxIcon/TextBoxIcon.js +2 -0
- package/lib/TextBoxIcon/TextBoxIcon.module.css +79 -79
- package/lib/TextBoxIcon/props/defaultProps.js +1 -0
- package/lib/TextBoxIcon/props/propTypes.js +12 -2
- package/lib/Textarea/Textarea.js +0 -0
- package/lib/Textarea/Textarea.module.css +140 -139
- package/lib/Textarea/props/propTypes.js +0 -1
- package/lib/Tooltip/Tooltip.js +4 -2
- package/lib/Tooltip/Tooltip.module.css +140 -140
- package/lib/Tooltip/props/propTypes.js +0 -3
- package/lib/common/a11y.module.css +3 -3
- package/lib/common/animation.module.css +624 -624
- package/lib/common/avatarsizes.module.css +48 -48
- package/lib/common/basic.module.css +33 -33
- package/lib/common/basicReset.module.css +40 -40
- package/lib/common/boxShadow.module.css +33 -33
- package/lib/common/common.module.css +524 -524
- package/lib/common/customscroll.module.css +142 -91
- package/lib/common/reset.module.css +13 -13
- package/lib/common/transition.module.css +146 -146
- package/lib/deprecated/PortalLayer/PortalLayer.js +2 -1
- package/lib/deprecated/PortalLayer/props/propTypes.js +13 -3
- package/lib/index.js +10 -1
- package/lib/semantic/Button/props/propTypes.js +1 -5
- package/lib/semantic/Button/semanticButton.module.css +9 -9
- package/lib/utils/Common.js +5 -0
- package/lib/utils/dropDownUtils.js +0 -0
- package/lib/utils/index.js +1 -19
- package/lib/v1/Accordion/Accordion.js +98 -0
- package/lib/v1/Accordion/AccordionItem.js +68 -0
- package/lib/v1/Accordion/index.js +23 -0
- package/lib/v1/Accordion/props/defaultProps.js +20 -0
- package/lib/v1/Accordion/props/propTypes.js +45 -0
- package/lib/v1/Animation/Animation.js +61 -0
- package/lib/v1/Animation/props/defaultProps.js +14 -0
- package/lib/v1/Animation/props/propTypes.js +23 -0
- package/lib/v1/Animation/utils.js +94 -0
- package/lib/v1/AppContainer/AppContainer.js +158 -0
- package/lib/v1/AppContainer/props/defaultProps.js +17 -0
- package/lib/v1/AppContainer/props/propTypes.js +28 -0
- package/lib/v1/Avatar/Avatar.js +191 -0
- package/lib/v1/Avatar/props/defaultProps.js +24 -0
- package/lib/v1/Avatar/props/propTypes.js +37 -0
- package/lib/v1/AvatarTeam/AvatarTeam.js +81 -0
- package/lib/v1/AvatarTeam/props/defaultProps.js +24 -0
- package/lib/v1/AvatarTeam/props/propTypes.js +38 -0
- package/lib/v1/Button/Button.js +82 -0
- package/lib/v1/Button/props/defaultProps.js +27 -0
- package/lib/v1/Button/props/propTypes.js +39 -0
- package/lib/v1/Buttongroup/Buttongroup.js +44 -0
- package/lib/v1/Buttongroup/props/defaultProps.js +13 -0
- package/lib/v1/Buttongroup/props/propTypes.js +20 -0
- package/lib/v1/Card/Card.js +269 -0
- package/lib/v1/Card/index.js +37 -0
- package/lib/v1/Card/props/defaultProps.js +35 -0
- package/lib/v1/Card/props/propTypes.js +62 -0
- package/lib/v1/CheckBox/CheckBox.js +172 -0
- package/lib/v1/CheckBox/props/defaultProps.js +25 -0
- package/lib/v1/CheckBox/props/propTypes.js +52 -0
- package/lib/v1/DateTime/CalendarView.js +319 -0
- package/lib/v1/DateTime/DateTime.js +849 -0
- package/lib/v1/DateTime/DateTimePopupFooter.js +96 -0
- package/lib/v1/DateTime/DateTimePopupHeader.js +166 -0
- package/lib/v1/DateTime/DateWidget.js +1134 -0
- package/lib/v1/DateTime/DaysRow.js +80 -0
- package/lib/v1/DateTime/Time.js +254 -0
- package/lib/v1/DateTime/YearView.js +325 -0
- package/lib/v1/DateTime/index.js +15 -0
- package/lib/v1/DateTime/props/defaultProps.js +70 -0
- package/lib/v1/DateTime/props/propTypes.js +227 -0
- package/lib/v1/DropBox/DropBox.js +109 -0
- package/lib/v1/DropBox/DropBoxElement/DropBoxElement.js +146 -0
- package/lib/v1/DropBox/DropBoxElement/props/defaultProps.js +25 -0
- package/lib/v1/DropBox/DropBoxElement/props/propTypes.js +62 -0
- package/lib/v1/DropBox/props/defaultProps.js +30 -0
- package/lib/v1/DropBox/props/propTypes.js +35 -0
- package/lib/v1/DropBox/utils/isMobilePopover.js +25 -0
- package/lib/v1/DropDown/DropDown.js +74 -0
- package/lib/v1/DropDown/DropDownHeading.js +47 -0
- package/lib/v1/DropDown/DropDownItem.js +75 -0
- package/lib/v1/DropDown/DropDownSearch.js +74 -0
- package/lib/v1/DropDown/DropDownSeparator.js +24 -0
- package/lib/v1/DropDown/props/defaultProps.js +30 -0
- package/lib/v1/DropDown/props/propTypes.js +87 -0
- package/lib/v1/Heading/Heading.js +49 -0
- package/lib/v1/Heading/props/defaultProps.js +12 -0
- package/lib/v1/Heading/props/propTypes.js +22 -0
- package/lib/v1/Label/Label.js +51 -0
- package/lib/v1/Label/props/defaultProps.js +18 -0
- package/lib/v1/Label/props/propTypes.js +30 -0
- package/lib/v1/Layout/Box.js +128 -0
- package/lib/v1/Layout/Container.js +145 -0
- package/lib/v1/Layout/index.js +23 -0
- package/lib/v1/Layout/props/defaultProps.js +24 -0
- package/lib/v1/Layout/props/propTypes.js +58 -0
- package/lib/v1/ListItem/ListContainer.js +128 -0
- package/lib/v1/ListItem/ListItem.js +138 -0
- package/lib/v1/ListItem/ListItemWithAvatar.js +167 -0
- package/lib/v1/ListItem/ListItemWithCheckBox.js +125 -0
- package/lib/v1/ListItem/ListItemWithIcon.js +143 -0
- package/lib/v1/ListItem/ListItemWithRadio.js +126 -0
- package/lib/v1/ListItem/index.js +55 -0
- package/lib/v1/ListItem/props/defaultProps.js +109 -0
- package/lib/v1/ListItem/props/propTypes.js +196 -0
- package/lib/v1/Modal/Modal.js +166 -0
- package/lib/v1/Modal/props/defaultProps.js +10 -0
- package/lib/v1/Modal/props/propTypes.js +18 -0
- package/lib/v1/MultiSelect/AdvancedGroupMultiSelect.js +1167 -0
- package/lib/v1/MultiSelect/AdvancedMultiSelect.js +634 -0
- package/lib/v1/MultiSelect/EmptyState.js +112 -0
- package/lib/v1/MultiSelect/MobileHeader/MobileHeader.js +62 -0
- package/lib/v1/MultiSelect/MobileHeader/props/defaultProps.js +14 -0
- package/lib/v1/MultiSelect/MobileHeader/props/propTypes.js +18 -0
- package/lib/v1/MultiSelect/MultiSelect.js +1186 -0
- package/lib/{Tooltip/__tests__/Tooltip.spec.js → v1/MultiSelect/MultiSelectHeader.js} +38 -58
- package/lib/v1/MultiSelect/MultiSelectWithAvatar.js +253 -0
- package/lib/v1/MultiSelect/SelectedOptions.js +126 -0
- package/lib/v1/MultiSelect/Suggestions.js +196 -0
- package/lib/v1/MultiSelect/index.js +39 -0
- package/lib/v1/MultiSelect/props/defaultProps.js +171 -0
- package/lib/v1/MultiSelect/props/propTypes.js +340 -0
- package/lib/v1/PopOver/PopOver.js +197 -0
- package/lib/v1/PopOver/props/defaultProps.js +15 -0
- package/lib/v1/PopOver/props/propTypes.js +66 -0
- package/lib/v1/Popup/Popup.js +715 -0
- package/lib/v1/Radio/Radio.js +141 -0
- package/lib/v1/Radio/props/defaultProps.js +22 -0
- package/lib/v1/Radio/props/propTypes.js +51 -0
- package/lib/v1/ResponsiveDropBox/ResponsiveDropBox.js +79 -0
- package/lib/v1/ResponsiveDropBox/props/defaultProps.js +11 -0
- package/lib/v1/ResponsiveDropBox/props/propTypes.js +27 -0
- package/lib/v1/Ribbon/Ribbon.js +44 -0
- package/lib/v1/Ribbon/props/defaultProps.js +16 -0
- package/lib/v1/Ribbon/props/propTypes.js +22 -0
- package/lib/v1/RippleEffect/RippleEffect.js +40 -0
- package/lib/v1/RippleEffect/props/defaultProps.js +17 -0
- package/lib/v1/RippleEffect/props/propTypes.js +23 -0
- package/lib/v1/Select/GroupSelect.js +881 -0
- package/lib/v1/Select/Select.js +1023 -0
- package/lib/v1/Select/SelectWithAvatar.js +394 -0
- package/lib/v1/Select/SelectWithIcon.js +597 -0
- package/lib/v1/Select/index.js +39 -0
- package/lib/v1/Select/props/defaultProps.js +121 -0
- package/lib/v1/Select/props/propTypes.js +310 -0
- package/lib/{DateTime/__tests__/CalendarView.spec.js → v1/Stencils/Stencils.js} +30 -32
- package/lib/v1/Stencils/props/defaultProps.js +13 -0
- package/lib/v1/Stencils/props/propTypes.js +18 -0
- package/lib/v1/Switch/Switch.js +108 -0
- package/lib/v1/Switch/props/defaultProps.js +18 -0
- package/lib/v1/Switch/props/propTypes.js +39 -0
- package/lib/v1/Tab/Tab.js +132 -0
- package/lib/v1/Tab/TabContent.js +42 -0
- package/lib/v1/Tab/TabContentWrapper.js +47 -0
- package/lib/v1/Tab/TabWrapper.js +89 -0
- package/lib/v1/Tab/Tabs.js +591 -0
- package/lib/v1/Tab/index.js +47 -0
- package/lib/v1/Tab/props/defaultProps.js +56 -0
- package/lib/v1/Tab/props/propTypes.js +123 -0
- package/lib/v1/Tab/v1Tab.module.css +100 -0
- package/lib/v1/Tab/v1TabContent.module.css +4 -0
- package/lib/v1/Tab/v1Tabs.module.css +137 -0
- package/lib/v1/Tag/Tag.js +157 -0
- package/lib/v1/Tag/props/defaultProps.js +21 -0
- package/lib/v1/Tag/props/propTypes.js +46 -0
- package/lib/v1/TextBox/TextBox.js +175 -0
- package/lib/v1/TextBox/props/defaultProps.js +27 -0
- package/lib/v1/TextBox/props/propTypes.js +62 -0
- package/lib/v1/TextBoxIcon/TextBoxIcon.js +198 -0
- package/lib/v1/TextBoxIcon/props/defaultProps.js +30 -0
- package/lib/v1/TextBoxIcon/props/propTypes.js +71 -0
- package/lib/v1/Textarea/Textarea.js +118 -0
- package/lib/v1/Textarea/props/defaultProps.js +24 -0
- package/lib/v1/Textarea/props/propTypes.js +42 -0
- package/lib/v1/Tooltip/Tooltip.js +588 -0
- package/lib/v1/Tooltip/props/defaultProps.js +11 -0
- package/lib/v1/Tooltip/props/propTypes.js +16 -0
- package/lib/v1/Typography/Typography.js +56 -0
- package/lib/v1/Typography/css/Typography.module.css +380 -0
- package/lib/v1/Typography/css/cssJSLogic.js +48 -0
- package/lib/v1/Typography/props/defaultProps.js +15 -0
- package/lib/v1/Typography/props/propTypes.js +38 -0
- package/lib/v1/Typography/utils/index.js +59 -0
- package/lib/v1/VelocityAnimation/VelocityAnimation/VelocityAnimation.js +90 -0
- package/lib/v1/VelocityAnimation/VelocityAnimation/props/defaultProps.js +14 -0
- package/lib/v1/VelocityAnimation/VelocityAnimation/props/propTypes.js +23 -0
- package/lib/v1/VelocityAnimation/VelocityAnimationGroup/VelocityAnimationGroup.js +126 -0
- package/lib/v1/VelocityAnimation/VelocityAnimationGroup/props/defaultProps.js +22 -0
- package/lib/v1/VelocityAnimation/VelocityAnimationGroup/props/propTypes.js +30 -0
- package/lib/v1/semantic/Button/Button.js +63 -0
- package/lib/v1/semantic/Button/props/defaultProps.js +19 -0
- package/lib/v1/semantic/Button/props/propTypes.js +33 -0
- package/lib/v1/semantic/index.js +15 -0
- package/package.json +98 -117
- package/postPublish.js +8 -8
- package/prePublish.js +70 -70
- package/propValidationArg.json +12 -0
- package/react-cli.config.js +24 -0
- package/result.json +1 -0
- package/es/Accordion/__tests__/Accordion.spec.js +0 -79
- package/es/Animation/__tests__/Animation.spec.js +0 -17
- package/es/Buttongroup/__test__/Buttongroup.spec.js +0 -73
- package/es/Buttongroup/__test__/__snapshots__/Buttongroup.spec.js.snap +0 -146
- package/es/Card/__tests__/Card.spec.js +0 -36
- package/es/CheckBox/__tests__/CheckBox.spec.js +0 -12
- package/es/DateTime/__tests__/CalendarView.spec.js +0 -33
- package/es/DateTime/__tests__/DateTime.spec.js +0 -115
- package/es/DateTime/__tests__/DateWidget.spec.js +0 -75
- package/es/DropBox/__tests__/DropBox.spec.js +0 -81
- package/es/DropDown/__tests__/DropDown.spec.js +0 -44
- package/es/DropDown/__tests__/DropDownItem.spec.js +0 -45
- package/es/DropDown/__tests__/DropDownSearch.spec.js +0 -11
- package/es/Layout/__tests__/Box.spec.js +0 -114
- package/es/Layout/__tests__/Container.spec.js +0 -120
- package/es/MultiSelect/__tests__/MultiSelect.spec.js +0 -160
- package/es/PopOver/__tests__/PopOver.spec.js +0 -14
- package/es/Popup/__tests__/Popup.spec.js +0 -134
- package/es/Radio/__tests__/Radiospec.js +0 -23
- package/es/Select/__tests__/Select.spec.js +0 -345
- package/es/Tab/__tests__/Tab.spec.js +0 -117
- package/es/Tab/__tests__/TabContent.spec.js +0 -16
- package/es/Tab/__tests__/TabContentWrapper.spec.js +0 -50
- package/es/Tab/__tests__/TabWrapper.spec.js +0 -86
- package/es/Tab/__tests__/Tabs.spec.js +0 -115
- package/es/Tag/__tests__/Tag.spec.js +0 -28
- package/es/TextBox/__tests__/TextBox.spec.js +0 -189
- package/es/TextBox/__tests__/__snapshots__/TextBox.spec.js.snap +0 -127
- package/es/TextBoxIcon/__tests__/TextBoxIcon.spec.js +0 -212
- package/es/TextBoxIcon/__tests__/__snapshots__/TextBoxIcon.spec.js.snap +0 -334
- package/es/Textarea/__tests__/Textarea.spec.js +0 -171
- package/es/Textarea/__tests__/__snapshots__/Textarea.spec.js.snap +0 -97
- package/es/Tooltip/__tests__/Tooltip.spec.js +0 -52
- package/es/deprecated/AdvancedMultiSelect.module.css +0 -127
- package/es/deprecated/advancedMultiSelectVariableJson.js +0 -80
- package/es/utils/__tests__/constructFullName.spec.js +0 -9
- package/es/utils/__tests__/debounce.spec.js +0 -37
- package/es/utils/__tests__/getInitial.spec.js +0 -23
- package/es/utils/css/compileClassNames.js +0 -28
- package/es/utils/css/mergeStyle.js +0 -57
- package/es/utils/css/utils.js +0 -24
- package/lib/Accordion/__tests__/Accordion.spec.js +0 -85
- package/lib/Animation/__tests__/Animation.spec.js +0 -23
- package/lib/Buttongroup/__test__/Buttongroup.spec.js +0 -86
- package/lib/Buttongroup/__test__/__snapshots__/Buttongroup.spec.js.snap +0 -146
- package/lib/Card/__tests__/Card.spec.js +0 -56
- package/lib/CheckBox/__tests__/CheckBox.spec.js +0 -18
- package/lib/DateTime/__tests__/DateTime.spec.js +0 -127
- package/lib/DateTime/__tests__/DateWidget.spec.js +0 -81
- package/lib/DropBox/__tests__/DropBox.spec.js +0 -87
- package/lib/DropDown/__tests__/DropDown.spec.js +0 -50
- package/lib/DropDown/__tests__/DropDownItem.spec.js +0 -51
- package/lib/DropDown/__tests__/DropDownSearch.spec.js +0 -17
- package/lib/Layout/__tests__/Box.spec.js +0 -121
- package/lib/Layout/__tests__/Container.spec.js +0 -127
- package/lib/MultiSelect/__tests__/MultiSelect.spec.js +0 -170
- package/lib/PopOver/__tests__/PopOver.spec.js +0 -20
- package/lib/Popup/__tests__/Popup.spec.js +0 -192
- package/lib/Radio/__tests__/Radiospec.js +0 -29
- package/lib/Select/__tests__/Select.spec.js +0 -383
- package/lib/Tab/__tests__/Tab.spec.js +0 -123
- package/lib/Tab/__tests__/TabContent.spec.js +0 -22
- package/lib/Tab/__tests__/TabContentWrapper.spec.js +0 -59
- package/lib/Tab/__tests__/TabWrapper.spec.js +0 -100
- package/lib/Tab/__tests__/Tabs.spec.js +0 -123
- package/lib/Tag/__tests__/Tag.spec.js +0 -35
- package/lib/TextBox/__tests__/TextBox.spec.js +0 -205
- package/lib/TextBox/__tests__/__snapshots__/TextBox.spec.js.snap +0 -127
- package/lib/TextBoxIcon/__tests__/TextBoxIcon.spec.js +0 -228
- package/lib/TextBoxIcon/__tests__/__snapshots__/TextBoxIcon.spec.js.snap +0 -334
- package/lib/Textarea/__tests__/Textarea.spec.js +0 -186
- package/lib/Textarea/__tests__/__snapshots__/Textarea.spec.js.snap +0 -97
- package/lib/deprecated/AdvancedMultiSelect.module.css +0 -127
- package/lib/deprecated/advancedMultiSelectVariableJson.js +0 -82
- package/lib/utils/__tests__/constructFullName.spec.js +0 -12
- package/lib/utils/__tests__/debounce.spec.js +0 -40
- package/lib/utils/__tests__/getInitial.spec.js +0 -26
- package/lib/utils/css/compileClassNames.js +0 -37
- package/lib/utils/css/mergeStyle.js +0 -69
- package/lib/utils/css/utils.js +0 -41
|
@@ -0,0 +1,849 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
4
|
+
|
|
5
|
+
Object.defineProperty(exports, "__esModule", {
|
|
6
|
+
value: true
|
|
7
|
+
});
|
|
8
|
+
exports["default"] = void 0;
|
|
9
|
+
|
|
10
|
+
var _react = _interopRequireDefault(require("react"));
|
|
11
|
+
|
|
12
|
+
var _propTypes = require("./props/propTypes");
|
|
13
|
+
|
|
14
|
+
var _defaultProps = require("./props/defaultProps");
|
|
15
|
+
|
|
16
|
+
var _datetimejs = _interopRequireDefault(require("@zohodesk/datetimejs"));
|
|
17
|
+
|
|
18
|
+
var _CalendarView = _interopRequireDefault(require("./CalendarView"));
|
|
19
|
+
|
|
20
|
+
var _YearView = _interopRequireDefault(require("./YearView"));
|
|
21
|
+
|
|
22
|
+
var _DateTimePopupHeader = _interopRequireDefault(require("./DateTimePopupHeader"));
|
|
23
|
+
|
|
24
|
+
var _DateTimePopupFooter = _interopRequireDefault(require("./DateTimePopupFooter"));
|
|
25
|
+
|
|
26
|
+
var _Time = _interopRequireDefault(require("./Time"));
|
|
27
|
+
|
|
28
|
+
var _DateTimeModule = _interopRequireDefault(require("../../DateTime/DateTime.module.css"));
|
|
29
|
+
|
|
30
|
+
var _common = require("../../utils/datetime/common");
|
|
31
|
+
|
|
32
|
+
var _Common = require("../../utils/Common");
|
|
33
|
+
|
|
34
|
+
var _constants = require("../../DateTime/constants");
|
|
35
|
+
|
|
36
|
+
var _ResponsiveDropBox = _interopRequireDefault(require("../ResponsiveDropBox/ResponsiveDropBox"));
|
|
37
|
+
|
|
38
|
+
var _Layout = require("../Layout");
|
|
39
|
+
|
|
40
|
+
var _dateFormatUtils = require("../../DateTime/dateFormatUtils");
|
|
41
|
+
|
|
42
|
+
var _dateFormat = require("./../../DateTime/dateFormatUtils/dateFormat");
|
|
43
|
+
|
|
44
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
45
|
+
|
|
46
|
+
function _construct(Parent, args, Class) { if (_isNativeReflectConstruct()) { _construct = Reflect.construct.bind(); } else { _construct = function _construct(Parent, args, Class) { var a = [null]; a.push.apply(a, args); var Constructor = Function.bind.apply(Parent, a); var instance = new Constructor(); if (Class) _setPrototypeOf(instance, Class.prototype); return instance; }; } return _construct.apply(null, arguments); }
|
|
47
|
+
|
|
48
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
49
|
+
|
|
50
|
+
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."); }
|
|
51
|
+
|
|
52
|
+
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); }
|
|
53
|
+
|
|
54
|
+
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; }
|
|
55
|
+
|
|
56
|
+
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; }
|
|
57
|
+
|
|
58
|
+
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
59
|
+
|
|
60
|
+
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
61
|
+
|
|
62
|
+
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
|
|
63
|
+
|
|
64
|
+
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
|
65
|
+
|
|
66
|
+
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
|
|
67
|
+
|
|
68
|
+
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
69
|
+
|
|
70
|
+
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
71
|
+
|
|
72
|
+
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return _assertThisInitialized(self); }
|
|
73
|
+
|
|
74
|
+
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
75
|
+
|
|
76
|
+
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
77
|
+
|
|
78
|
+
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
79
|
+
|
|
80
|
+
function title(date, year, month) {
|
|
81
|
+
var monthNames = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : [];
|
|
82
|
+
var HeadingText = "".concat(monthNames[month] || '', " ").concat(year);
|
|
83
|
+
return HeadingText;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
var DateTime = /*#__PURE__*/function (_React$PureComponent) {
|
|
87
|
+
_inherits(DateTime, _React$PureComponent);
|
|
88
|
+
|
|
89
|
+
var _super = _createSuper(DateTime);
|
|
90
|
+
|
|
91
|
+
function DateTime(props) {
|
|
92
|
+
var _this;
|
|
93
|
+
|
|
94
|
+
_classCallCheck(this, DateTime);
|
|
95
|
+
|
|
96
|
+
_this = _super.call(this, props);
|
|
97
|
+
_this.getHours = _this.getHours.bind(_assertThisInitialized(_this));
|
|
98
|
+
_this.amPmSelect = _this.amPmSelect.bind(_assertThisInitialized(_this));
|
|
99
|
+
_this.hoursSelect = _this.hoursSelect.bind(_assertThisInitialized(_this));
|
|
100
|
+
_this.dateSelect = _this.dateSelect.bind(_assertThisInitialized(_this));
|
|
101
|
+
_this.handleClear = _this.handleClear.bind(_assertThisInitialized(_this));
|
|
102
|
+
_this.handleSelect = _this.handleSelect.bind(_assertThisInitialized(_this));
|
|
103
|
+
_this.minutesSelect = _this.minutesSelect.bind(_assertThisInitialized(_this));
|
|
104
|
+
_this.modifyCalendar = _this.modifyCalendar.bind(_assertThisInitialized(_this));
|
|
105
|
+
_this.handleGetSelectedDate = _this.handleGetSelectedDate.bind(_assertThisInitialized(_this));
|
|
106
|
+
_this.handleChange = _this.handleChange.bind(_assertThisInitialized(_this));
|
|
107
|
+
_this.handleCalendarNavigation = _this.handleCalendarNavigation.bind(_assertThisInitialized(_this));
|
|
108
|
+
_this.handleExposeMethods = _this.handleExposeMethods.bind(_assertThisInitialized(_this));
|
|
109
|
+
_this.handleDateReset = _this.handleDateReset.bind(_assertThisInitialized(_this));
|
|
110
|
+
_this.handleOpenYearView = _this.handleOpenYearView.bind(_assertThisInitialized(_this));
|
|
111
|
+
_this.handleSelectMonth = _this.handleSelectMonth.bind(_assertThisInitialized(_this));
|
|
112
|
+
_this.handleSelectYear = _this.handleSelectYear.bind(_assertThisInitialized(_this));
|
|
113
|
+
_this.handleSelectMonthViaYearView = _this.handleSelectMonthViaYearView.bind(_assertThisInitialized(_this));
|
|
114
|
+
_this.handleGetStateValues = _this.handleGetStateValues.bind(_assertThisInitialized(_this));
|
|
115
|
+
_this.handleYearViewToggle = _this.handleYearViewToggle.bind(_assertThisInitialized(_this));
|
|
116
|
+
var _props$i18nKeys$ampmT = props.i18nKeys.ampmText,
|
|
117
|
+
ampmText = _props$i18nKeys$ampmT === void 0 ? _constants.ampmTextDefault : _props$i18nKeys$ampmT;
|
|
118
|
+
|
|
119
|
+
_this.ampmSuggestions = function () {
|
|
120
|
+
var ampmSuggestions = [];
|
|
121
|
+
ampmText.forEach(function (text, index) {
|
|
122
|
+
if (index === 0) {
|
|
123
|
+
ampmSuggestions.push({
|
|
124
|
+
text: text,
|
|
125
|
+
id: 'AM'
|
|
126
|
+
});
|
|
127
|
+
} else if (index === 1) {
|
|
128
|
+
ampmSuggestions.push({
|
|
129
|
+
text: text,
|
|
130
|
+
id: 'PM'
|
|
131
|
+
});
|
|
132
|
+
}
|
|
133
|
+
});
|
|
134
|
+
return ampmSuggestions;
|
|
135
|
+
}();
|
|
136
|
+
|
|
137
|
+
var initalStateObj = _this.getStateFromProps(props);
|
|
138
|
+
|
|
139
|
+
_this.state = Object.assign({}, initalStateObj, {
|
|
140
|
+
isYearView: false,
|
|
141
|
+
isMonthOpen: false
|
|
142
|
+
});
|
|
143
|
+
return _this;
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
_createClass(DateTime, [{
|
|
147
|
+
key: "componentDidMount",
|
|
148
|
+
value: function componentDidMount() {
|
|
149
|
+
this.handleExposeMethods(true);
|
|
150
|
+
}
|
|
151
|
+
}, {
|
|
152
|
+
key: "componentDidUpdate",
|
|
153
|
+
value: function componentDidUpdate(prevProps) {
|
|
154
|
+
var _this$props = this.props,
|
|
155
|
+
value = _this$props.value,
|
|
156
|
+
isActive = _this$props.isActive,
|
|
157
|
+
is24Hour = _this$props.is24Hour;
|
|
158
|
+
|
|
159
|
+
if (prevProps.value !== value || is24Hour !== prevProps.is24Hour) {
|
|
160
|
+
this.setState(this.getStateFromProps(this.props));
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
if (prevProps.isActive !== isActive && !isActive) {
|
|
164
|
+
this.setState({
|
|
165
|
+
isYearView: false,
|
|
166
|
+
isMonthOpen: false
|
|
167
|
+
});
|
|
168
|
+
}
|
|
169
|
+
}
|
|
170
|
+
}, {
|
|
171
|
+
key: "componentWillUnmount",
|
|
172
|
+
value: function componentWillUnmount() {
|
|
173
|
+
this.handleExposeMethods(false);
|
|
174
|
+
}
|
|
175
|
+
}, {
|
|
176
|
+
key: "getStateFromProps",
|
|
177
|
+
value: function getStateFromProps(props) {
|
|
178
|
+
var date, month, year, hours, mins, amPm;
|
|
179
|
+
var value = props.value,
|
|
180
|
+
timeZone = props.timeZone,
|
|
181
|
+
defaultTime = props.defaultTime,
|
|
182
|
+
needDefaultTime = props.needDefaultTime,
|
|
183
|
+
isDateTimeField = props.isDateTimeField,
|
|
184
|
+
is24Hour = props.is24Hour; //defaultTime --> 12:00:PM
|
|
185
|
+
|
|
186
|
+
defaultTime = needDefaultTime ? defaultTime ? defaultTime : '12:00:PM' : '';
|
|
187
|
+
var defaultHour, defaultMin, defaultAmPm;
|
|
188
|
+
var todayObj = new Date();
|
|
189
|
+
var todayDate = todayObj.getDate();
|
|
190
|
+
var todayMonth = todayObj.getMonth();
|
|
191
|
+
var todayYear = todayObj.getFullYear();
|
|
192
|
+
|
|
193
|
+
if (!value) {
|
|
194
|
+
var _ref = defaultTime ? defaultTime.split(':') : [];
|
|
195
|
+
|
|
196
|
+
var _ref2 = _slicedToArray(_ref, 3);
|
|
197
|
+
|
|
198
|
+
defaultHour = _ref2[0];
|
|
199
|
+
defaultMin = _ref2[1];
|
|
200
|
+
defaultAmPm = _ref2[2];
|
|
201
|
+
defaultHour = parseInt(defaultHour);
|
|
202
|
+
defaultMin = parseInt(defaultMin);
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
var dateObj = (0, _dateFormat.getDateText)(value, timeZone, isDateTimeField);
|
|
206
|
+
date = dateObj.getDate();
|
|
207
|
+
month = dateObj.getMonth();
|
|
208
|
+
year = dateObj.getFullYear();
|
|
209
|
+
hours = defaultHour ? defaultHour : dateObj.getHours();
|
|
210
|
+
mins = !(0, _Common.getIsEmptyValue)(defaultMin) ? defaultMin : dateObj.getMinutes();
|
|
211
|
+
mins = (0, _dateFormatUtils.addZeroIfNeeded)(mins);
|
|
212
|
+
amPm = defaultAmPm ? defaultAmPm : hours < 12 ? 'AM' : 'PM';
|
|
213
|
+
hours = this.getHours(hours, is24Hour);
|
|
214
|
+
return {
|
|
215
|
+
date: date,
|
|
216
|
+
month: month,
|
|
217
|
+
year: year,
|
|
218
|
+
mins: mins,
|
|
219
|
+
hours: hours,
|
|
220
|
+
amPm: amPm,
|
|
221
|
+
todayDate: todayDate,
|
|
222
|
+
todayMonth: todayMonth,
|
|
223
|
+
todayYear: todayYear
|
|
224
|
+
};
|
|
225
|
+
}
|
|
226
|
+
}, {
|
|
227
|
+
key: "getHours",
|
|
228
|
+
value: function getHours(hoursParam, is24Hour) {
|
|
229
|
+
var hours = hoursParam;
|
|
230
|
+
|
|
231
|
+
if (!is24Hour) {
|
|
232
|
+
if (hours === 0) {
|
|
233
|
+
hours = 12;
|
|
234
|
+
} else if (hours > 12) {
|
|
235
|
+
hours -= 12;
|
|
236
|
+
}
|
|
237
|
+
}
|
|
238
|
+
|
|
239
|
+
hours = (0, _dateFormatUtils.addZeroIfNeeded)(hours);
|
|
240
|
+
return hours;
|
|
241
|
+
}
|
|
242
|
+
}, {
|
|
243
|
+
key: "handleGetSelectedDate",
|
|
244
|
+
value: function handleGetSelectedDate() {
|
|
245
|
+
var selectedInfo = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
246
|
+
var _this$props2 = this.props,
|
|
247
|
+
min = _this$props2.min,
|
|
248
|
+
max = _this$props2.max,
|
|
249
|
+
timeZone = _this$props2.timeZone,
|
|
250
|
+
isDateTimeField = _this$props2.isDateTimeField,
|
|
251
|
+
dateFormat = _this$props2.dateFormat,
|
|
252
|
+
is24Hour = _this$props2.is24Hour,
|
|
253
|
+
customDateFormat = _this$props2.customDateFormat;
|
|
254
|
+
var year = selectedInfo.year,
|
|
255
|
+
month = selectedInfo.month,
|
|
256
|
+
date = selectedInfo.date,
|
|
257
|
+
hours = selectedInfo.hours,
|
|
258
|
+
mins = selectedInfo.mins,
|
|
259
|
+
amPm = selectedInfo.amPm;
|
|
260
|
+
|
|
261
|
+
if (!is24Hour) {
|
|
262
|
+
if (parseInt(hours) === 12) {
|
|
263
|
+
hours = amPm === 'AM' ? 0 : 12;
|
|
264
|
+
}
|
|
265
|
+
|
|
266
|
+
if (amPm === 'PM') {
|
|
267
|
+
if (hours < 12) {
|
|
268
|
+
hours = parseInt(hours) + 12;
|
|
269
|
+
}
|
|
270
|
+
}
|
|
271
|
+
}
|
|
272
|
+
|
|
273
|
+
var minInMillis = min ? _datetimejs["default"].millis(min) : null,
|
|
274
|
+
maxInMillis = max ? _datetimejs["default"].millis(max) : null,
|
|
275
|
+
selectedInMillis,
|
|
276
|
+
selectedValue = '',
|
|
277
|
+
formattedValue;
|
|
278
|
+
var currentDate = new Date();
|
|
279
|
+
var sec = currentDate.getSeconds();
|
|
280
|
+
var milliSec = currentDate.getMilliseconds();
|
|
281
|
+
|
|
282
|
+
if (isDateTimeField || customDateFormat) {
|
|
283
|
+
var dateArgs = [year, month, date, hours, mins];
|
|
284
|
+
|
|
285
|
+
if (customDateFormat) {
|
|
286
|
+
dateArgs.push(sec, milliSec);
|
|
287
|
+
}
|
|
288
|
+
|
|
289
|
+
selectedInMillis = timeZone ? _datetimejs["default"].tz.tzToUtc(Date.UTC.apply(Date, dateArgs), timeZone) : Date.UTC.apply(Date, dateArgs);
|
|
290
|
+
selectedValue = _datetimejs["default"].ISO(selectedInMillis);
|
|
291
|
+
formattedValue = (0, _common.formatDate)(_construct(Date, dateArgs), customDateFormat == null ? is24Hour ? "".concat(dateFormat, " HH:mm:ss") : "".concat(dateFormat, " hh:mm:ss A") : "".concat(customDateFormat));
|
|
292
|
+
} else {
|
|
293
|
+
selectedInMillis = Date.UTC(year, month, date);
|
|
294
|
+
selectedValue = (0, _common.formatDate)(new Date(year, month, date), 'YYYY-MM-DD');
|
|
295
|
+
formattedValue = (0, _common.formatDate)(new Date(year, month, date), dateFormat);
|
|
296
|
+
}
|
|
297
|
+
|
|
298
|
+
var isError = false;
|
|
299
|
+
var errorType = '';
|
|
300
|
+
|
|
301
|
+
if (minInMillis && minInMillis > selectedInMillis) {
|
|
302
|
+
isError = true;
|
|
303
|
+
errorType = 'MIN';
|
|
304
|
+
} else if (maxInMillis && maxInMillis < selectedInMillis) {
|
|
305
|
+
isError = true;
|
|
306
|
+
errorType = 'MAX';
|
|
307
|
+
}
|
|
308
|
+
|
|
309
|
+
return {
|
|
310
|
+
isError: isError,
|
|
311
|
+
errorType: errorType,
|
|
312
|
+
selectedValue: selectedValue,
|
|
313
|
+
formattedValue: formattedValue
|
|
314
|
+
};
|
|
315
|
+
}
|
|
316
|
+
}, {
|
|
317
|
+
key: "handleSelect",
|
|
318
|
+
value: function handleSelect(e) {
|
|
319
|
+
e && e.preventDefault();
|
|
320
|
+
var _this$props3 = this.props,
|
|
321
|
+
onError = _this$props3.onError,
|
|
322
|
+
onSelect = _this$props3.onSelect,
|
|
323
|
+
minErrorText = _this$props3.minErrorText,
|
|
324
|
+
maxErrorText = _this$props3.maxErrorText;
|
|
325
|
+
var _this$state = this.state,
|
|
326
|
+
year = _this$state.year,
|
|
327
|
+
month = _this$state.month,
|
|
328
|
+
date = _this$state.date,
|
|
329
|
+
hours = _this$state.hours,
|
|
330
|
+
mins = _this$state.mins,
|
|
331
|
+
amPm = _this$state.amPm;
|
|
332
|
+
|
|
333
|
+
var _this$handleGetSelect = this.handleGetSelectedDate({
|
|
334
|
+
year: year,
|
|
335
|
+
month: month,
|
|
336
|
+
date: date,
|
|
337
|
+
hours: hours,
|
|
338
|
+
mins: mins,
|
|
339
|
+
amPm: amPm
|
|
340
|
+
}),
|
|
341
|
+
isError = _this$handleGetSelect.isError,
|
|
342
|
+
errorType = _this$handleGetSelect.errorType,
|
|
343
|
+
selectedValue = _this$handleGetSelect.selectedValue,
|
|
344
|
+
formattedValue = _this$handleGetSelect.formattedValue;
|
|
345
|
+
|
|
346
|
+
if (isError) {
|
|
347
|
+
if (errorType === 'MIN') {
|
|
348
|
+
onError && onError(minErrorText, true);
|
|
349
|
+
} else if (errorType === 'MAX') {
|
|
350
|
+
onError && onError(maxErrorText, true);
|
|
351
|
+
}
|
|
352
|
+
} else {
|
|
353
|
+
onSelect(selectedValue, formattedValue, e);
|
|
354
|
+
}
|
|
355
|
+
}
|
|
356
|
+
}, {
|
|
357
|
+
key: "handleChange",
|
|
358
|
+
value: function handleChange() {
|
|
359
|
+
var selectedInfo = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
360
|
+
var _this$props4 = this.props,
|
|
361
|
+
onError = _this$props4.onError,
|
|
362
|
+
onChange = _this$props4.onChange,
|
|
363
|
+
minErrorText = _this$props4.minErrorText,
|
|
364
|
+
maxErrorText = _this$props4.maxErrorText;
|
|
365
|
+
var _this$state2 = this.state,
|
|
366
|
+
oldYear = _this$state2.year,
|
|
367
|
+
oldMonth = _this$state2.month,
|
|
368
|
+
oldDate = _this$state2.date,
|
|
369
|
+
oldHours = _this$state2.hours,
|
|
370
|
+
oldMins = _this$state2.mins,
|
|
371
|
+
oldAMPM = _this$state2.amPm;
|
|
372
|
+
var year = selectedInfo.year,
|
|
373
|
+
month = selectedInfo.month,
|
|
374
|
+
date = selectedInfo.date,
|
|
375
|
+
hours = selectedInfo.hours,
|
|
376
|
+
mins = selectedInfo.mins,
|
|
377
|
+
amPm = selectedInfo.amPm;
|
|
378
|
+
var newSelectedInfo = {
|
|
379
|
+
year: (0, _Common.getIsEmptyValue)(year) ? oldYear : year,
|
|
380
|
+
month: (0, _Common.getIsEmptyValue)(month) ? oldMonth : month,
|
|
381
|
+
date: (0, _Common.getIsEmptyValue)(date) ? oldDate : date,
|
|
382
|
+
hours: (0, _Common.getIsEmptyValue)(hours) ? oldHours : hours,
|
|
383
|
+
mins: (0, _Common.getIsEmptyValue)(mins) ? oldMins : mins,
|
|
384
|
+
amPm: (0, _Common.getIsEmptyValue)(amPm) ? oldAMPM : amPm
|
|
385
|
+
};
|
|
386
|
+
|
|
387
|
+
if (onChange) {
|
|
388
|
+
var _this$handleGetSelect2 = this.handleGetSelectedDate(newSelectedInfo),
|
|
389
|
+
isError = _this$handleGetSelect2.isError,
|
|
390
|
+
errorType = _this$handleGetSelect2.errorType,
|
|
391
|
+
selectedValue = _this$handleGetSelect2.selectedValue,
|
|
392
|
+
formattedValue = _this$handleGetSelect2.formattedValue;
|
|
393
|
+
|
|
394
|
+
if (isError) {
|
|
395
|
+
if (errorType === 'MIN') {
|
|
396
|
+
onError && onError(minErrorText, true);
|
|
397
|
+
} else if (errorType === 'MAX') {
|
|
398
|
+
onError && onError(maxErrorText, true);
|
|
399
|
+
}
|
|
400
|
+
} else {
|
|
401
|
+
this.setState(newSelectedInfo);
|
|
402
|
+
onChange(selectedValue, formattedValue);
|
|
403
|
+
}
|
|
404
|
+
} else {
|
|
405
|
+
this.setState(newSelectedInfo);
|
|
406
|
+
}
|
|
407
|
+
}
|
|
408
|
+
}, {
|
|
409
|
+
key: "handleClear",
|
|
410
|
+
value: function handleClear(e) {
|
|
411
|
+
var _this$props5 = this.props,
|
|
412
|
+
onSelect = _this$props5.onSelect,
|
|
413
|
+
onClear = _this$props5.onClear;
|
|
414
|
+
|
|
415
|
+
if (onClear) {
|
|
416
|
+
onClear(e);
|
|
417
|
+
} else {
|
|
418
|
+
onSelect('', '', e);
|
|
419
|
+
}
|
|
420
|
+
}
|
|
421
|
+
}, {
|
|
422
|
+
key: "dateSelect",
|
|
423
|
+
value: function dateSelect(date, month, year, e) {
|
|
424
|
+
this.handleChange({
|
|
425
|
+
date: date,
|
|
426
|
+
month: month,
|
|
427
|
+
year: year
|
|
428
|
+
});
|
|
429
|
+
e && e.preventDefault();
|
|
430
|
+
var _this$props6 = this.props,
|
|
431
|
+
onError = _this$props6.onError,
|
|
432
|
+
onDateSelect = _this$props6.onDateSelect,
|
|
433
|
+
minErrorText = _this$props6.minErrorText,
|
|
434
|
+
maxErrorText = _this$props6.maxErrorText;
|
|
435
|
+
var _this$state3 = this.state,
|
|
436
|
+
hours = _this$state3.hours,
|
|
437
|
+
mins = _this$state3.mins,
|
|
438
|
+
amPm = _this$state3.amPm;
|
|
439
|
+
|
|
440
|
+
var _this$handleGetSelect3 = this.handleGetSelectedDate({
|
|
441
|
+
year: year,
|
|
442
|
+
month: month,
|
|
443
|
+
date: date,
|
|
444
|
+
hours: hours,
|
|
445
|
+
mins: mins,
|
|
446
|
+
amPm: amPm
|
|
447
|
+
}),
|
|
448
|
+
isError = _this$handleGetSelect3.isError,
|
|
449
|
+
errorType = _this$handleGetSelect3.errorType,
|
|
450
|
+
selectedValue = _this$handleGetSelect3.selectedValue,
|
|
451
|
+
formattedValue = _this$handleGetSelect3.formattedValue;
|
|
452
|
+
|
|
453
|
+
if (isError) {
|
|
454
|
+
if (errorType === 'MIN') {
|
|
455
|
+
onError && onError(minErrorText, true);
|
|
456
|
+
} else if (errorType === 'MAX') {
|
|
457
|
+
onError && onError(maxErrorText, true);
|
|
458
|
+
}
|
|
459
|
+
} else {
|
|
460
|
+
onDateSelect && onDateSelect(selectedValue, formattedValue, e);
|
|
461
|
+
}
|
|
462
|
+
}
|
|
463
|
+
}, {
|
|
464
|
+
key: "hoursSelect",
|
|
465
|
+
value: function hoursSelect(hours) {
|
|
466
|
+
this.handleChange({
|
|
467
|
+
hours: hours
|
|
468
|
+
});
|
|
469
|
+
}
|
|
470
|
+
}, {
|
|
471
|
+
key: "minutesSelect",
|
|
472
|
+
value: function minutesSelect(mins) {
|
|
473
|
+
this.handleChange({
|
|
474
|
+
mins: mins
|
|
475
|
+
});
|
|
476
|
+
}
|
|
477
|
+
}, {
|
|
478
|
+
key: "amPmSelect",
|
|
479
|
+
value: function amPmSelect(amPm) {
|
|
480
|
+
this.handleChange({
|
|
481
|
+
amPm: amPm
|
|
482
|
+
});
|
|
483
|
+
}
|
|
484
|
+
/*global closeGroupPopups*/
|
|
485
|
+
|
|
486
|
+
}, {
|
|
487
|
+
key: "closePopup",
|
|
488
|
+
value: function closePopup() {
|
|
489
|
+
closeGroupPopups('calender');
|
|
490
|
+
}
|
|
491
|
+
}, {
|
|
492
|
+
key: "handleCalendarNavigation",
|
|
493
|
+
value: function handleCalendarNavigation(type, selectedInfo) {
|
|
494
|
+
var stateYear = selectedInfo.year,
|
|
495
|
+
stateMonth = selectedInfo.month,
|
|
496
|
+
stateDate = selectedInfo.date;
|
|
497
|
+
var date = stateDate;
|
|
498
|
+
var month = stateMonth;
|
|
499
|
+
var year = stateYear;
|
|
500
|
+
|
|
501
|
+
var getDate = function getDate(month, year) {
|
|
502
|
+
var monthEnd = (0, _common.getMonthEnd)(month, year);
|
|
503
|
+
return monthEnd >= parseInt(date) ? date : monthEnd;
|
|
504
|
+
};
|
|
505
|
+
|
|
506
|
+
var modifyCalendarRecursion = function modifyCalendarRecursion(recursionType) {
|
|
507
|
+
if (recursionType === 'nextYear') {
|
|
508
|
+
//Click next year icon
|
|
509
|
+
var newYear = year + 1;
|
|
510
|
+
return {
|
|
511
|
+
date: getDate(month, newYear),
|
|
512
|
+
month: month,
|
|
513
|
+
year: newYear
|
|
514
|
+
};
|
|
515
|
+
} else if (recursionType === 'previousYear') {
|
|
516
|
+
//Click previous year icon
|
|
517
|
+
var _newYear = year - 1;
|
|
518
|
+
|
|
519
|
+
return {
|
|
520
|
+
date: getDate(month, _newYear),
|
|
521
|
+
month: month,
|
|
522
|
+
year: _newYear
|
|
523
|
+
};
|
|
524
|
+
} else if (recursionType === 'nextMonth') {
|
|
525
|
+
//Click next month icon
|
|
526
|
+
if (month === 11) {
|
|
527
|
+
month = 0;
|
|
528
|
+
return modifyCalendarRecursion('nextYear');
|
|
529
|
+
}
|
|
530
|
+
|
|
531
|
+
var newMonth = month + 1;
|
|
532
|
+
return {
|
|
533
|
+
date: getDate(newMonth, year),
|
|
534
|
+
month: newMonth,
|
|
535
|
+
year: year
|
|
536
|
+
};
|
|
537
|
+
} else if (recursionType === 'previousMonth') {
|
|
538
|
+
//Click previous month icon
|
|
539
|
+
if (month === 0) {
|
|
540
|
+
month = 11;
|
|
541
|
+
return modifyCalendarRecursion('previousYear');
|
|
542
|
+
}
|
|
543
|
+
|
|
544
|
+
var _newMonth = month - 1;
|
|
545
|
+
|
|
546
|
+
return {
|
|
547
|
+
date: getDate(_newMonth, year),
|
|
548
|
+
month: _newMonth,
|
|
549
|
+
year: year
|
|
550
|
+
};
|
|
551
|
+
} else if (recursionType === 'nextDate') {
|
|
552
|
+
var monthEnd = (0, _common.getMonthEnd)(month, year);
|
|
553
|
+
|
|
554
|
+
if (date === monthEnd) {
|
|
555
|
+
date = 1;
|
|
556
|
+
return modifyCalendarRecursion('nextMonth');
|
|
557
|
+
}
|
|
558
|
+
|
|
559
|
+
var newDate = parseInt(date) + 1;
|
|
560
|
+
return {
|
|
561
|
+
date: newDate,
|
|
562
|
+
month: month,
|
|
563
|
+
year: year
|
|
564
|
+
};
|
|
565
|
+
} else if (recursionType === 'previousDate') {
|
|
566
|
+
if (date === 1) {
|
|
567
|
+
date = month === 0 ? (0, _common.getMonthEnd)(11, year - 1) : (0, _common.getMonthEnd)(month - 1, year);
|
|
568
|
+
return modifyCalendarRecursion('previousMonth');
|
|
569
|
+
}
|
|
570
|
+
|
|
571
|
+
var _newDate = parseInt(date) - 1;
|
|
572
|
+
|
|
573
|
+
return {
|
|
574
|
+
date: _newDate,
|
|
575
|
+
month: month,
|
|
576
|
+
year: year
|
|
577
|
+
};
|
|
578
|
+
}
|
|
579
|
+
};
|
|
580
|
+
|
|
581
|
+
return modifyCalendarRecursion(type);
|
|
582
|
+
}
|
|
583
|
+
}, {
|
|
584
|
+
key: "modifyCalendar",
|
|
585
|
+
value: function modifyCalendar(type) {
|
|
586
|
+
var _this$state4 = this.state,
|
|
587
|
+
year = _this$state4.year,
|
|
588
|
+
month = _this$state4.month,
|
|
589
|
+
date = _this$state4.date;
|
|
590
|
+
return this.handleChange(this.handleCalendarNavigation(type, {
|
|
591
|
+
year: year,
|
|
592
|
+
month: month,
|
|
593
|
+
date: date
|
|
594
|
+
}));
|
|
595
|
+
}
|
|
596
|
+
}, {
|
|
597
|
+
key: "handleDateReset",
|
|
598
|
+
value: function handleDateReset() {
|
|
599
|
+
this.setState(this.getStateFromProps(this.props));
|
|
600
|
+
}
|
|
601
|
+
}, {
|
|
602
|
+
key: "handleGetStateValues",
|
|
603
|
+
value: function handleGetStateValues() {
|
|
604
|
+
var isActive = this.props.isActive;
|
|
605
|
+
var _this$state5 = this.state,
|
|
606
|
+
isYearView = _this$state5.isYearView,
|
|
607
|
+
isMonthOpen = _this$state5.isMonthOpen;
|
|
608
|
+
return {
|
|
609
|
+
isActive: isActive,
|
|
610
|
+
isYearView: isYearView,
|
|
611
|
+
isMonthOpen: isMonthOpen
|
|
612
|
+
};
|
|
613
|
+
}
|
|
614
|
+
}, {
|
|
615
|
+
key: "handleYearViewToggle",
|
|
616
|
+
value: function handleYearViewToggle(isYearOpen, isMonthOpen) {
|
|
617
|
+
this.setState({
|
|
618
|
+
isYearView: isYearOpen,
|
|
619
|
+
isMonthOpen: isMonthOpen
|
|
620
|
+
});
|
|
621
|
+
}
|
|
622
|
+
}, {
|
|
623
|
+
key: "handleExposeMethods",
|
|
624
|
+
value: function handleExposeMethods(isMount) {
|
|
625
|
+
var getMethods = this.props.getMethods;
|
|
626
|
+
var methods = {};
|
|
627
|
+
|
|
628
|
+
if (isMount) {
|
|
629
|
+
methods = {
|
|
630
|
+
resetLocalDate: this.handleDateReset,
|
|
631
|
+
getStateValues: this.handleGetStateValues,
|
|
632
|
+
toggleYearView: this.handleYearViewToggle
|
|
633
|
+
};
|
|
634
|
+
} else {
|
|
635
|
+
methods = {
|
|
636
|
+
resetLocalDate: null,
|
|
637
|
+
getStateValues: null,
|
|
638
|
+
toggleYearView: null
|
|
639
|
+
};
|
|
640
|
+
}
|
|
641
|
+
|
|
642
|
+
getMethods && getMethods(methods);
|
|
643
|
+
}
|
|
644
|
+
}, {
|
|
645
|
+
key: "handleOpenYearView",
|
|
646
|
+
value: function handleOpenYearView() {
|
|
647
|
+
var _this$state6 = this.state,
|
|
648
|
+
isYearView = _this$state6.isYearView,
|
|
649
|
+
isMonthOpen = _this$state6.isMonthOpen;
|
|
650
|
+
this.setState({
|
|
651
|
+
isYearView: !isYearView,
|
|
652
|
+
isMonthOpen: !isMonthOpen
|
|
653
|
+
});
|
|
654
|
+
}
|
|
655
|
+
}, {
|
|
656
|
+
key: "handleSelectYear",
|
|
657
|
+
value: function handleSelectYear(year) {
|
|
658
|
+
this.setState({
|
|
659
|
+
year: year,
|
|
660
|
+
isMonthOpen: true
|
|
661
|
+
});
|
|
662
|
+
}
|
|
663
|
+
}, {
|
|
664
|
+
key: "handleSelectMonth",
|
|
665
|
+
value: function handleSelectMonth(month) {
|
|
666
|
+
var _this$state7 = this.state,
|
|
667
|
+
date = _this$state7.date,
|
|
668
|
+
year = _this$state7.year;
|
|
669
|
+
var monthEnd = (0, _common.getMonthEnd)(month, year);
|
|
670
|
+
var newDate = date;
|
|
671
|
+
|
|
672
|
+
if (date > monthEnd) {
|
|
673
|
+
newDate = monthEnd;
|
|
674
|
+
}
|
|
675
|
+
|
|
676
|
+
this.setState({
|
|
677
|
+
month: month,
|
|
678
|
+
date: newDate
|
|
679
|
+
});
|
|
680
|
+
}
|
|
681
|
+
}, {
|
|
682
|
+
key: "handleSelectMonthViaYearView",
|
|
683
|
+
value: function handleSelectMonthViaYearView(month) {
|
|
684
|
+
this.handleSelectMonth(month);
|
|
685
|
+
this.setState({
|
|
686
|
+
isYearView: false,
|
|
687
|
+
isMonthOpen: false
|
|
688
|
+
});
|
|
689
|
+
}
|
|
690
|
+
}, {
|
|
691
|
+
key: "render",
|
|
692
|
+
value: function render() {
|
|
693
|
+
var _this$state8 = this.state,
|
|
694
|
+
date = _this$state8.date,
|
|
695
|
+
month = _this$state8.month,
|
|
696
|
+
year = _this$state8.year,
|
|
697
|
+
hours = _this$state8.hours,
|
|
698
|
+
mins = _this$state8.mins,
|
|
699
|
+
amPm = _this$state8.amPm,
|
|
700
|
+
isYearView = _this$state8.isYearView,
|
|
701
|
+
isMonthOpen = _this$state8.isMonthOpen,
|
|
702
|
+
todayDate = _this$state8.todayDate,
|
|
703
|
+
todayMonth = _this$state8.todayMonth,
|
|
704
|
+
todayYear = _this$state8.todayYear;
|
|
705
|
+
var _this$props7 = this.props,
|
|
706
|
+
isDateTimeField = _this$props7.isDateTimeField,
|
|
707
|
+
isActive = _this$props7.isActive,
|
|
708
|
+
position = _this$props7.position,
|
|
709
|
+
isReady = _this$props7.isReady,
|
|
710
|
+
getRef = _this$props7.getRef,
|
|
711
|
+
onClick = _this$props7.onClick,
|
|
712
|
+
dataId = _this$props7.dataId,
|
|
713
|
+
needResponsive = _this$props7.needResponsive,
|
|
714
|
+
isAbsolute = _this$props7.isAbsolute,
|
|
715
|
+
isAnimate = _this$props7.isAnimate,
|
|
716
|
+
needAction = _this$props7.needAction,
|
|
717
|
+
boxSize = _this$props7.boxSize,
|
|
718
|
+
className = _this$props7.className,
|
|
719
|
+
innerClass = _this$props7.innerClass,
|
|
720
|
+
isPadding = _this$props7.isPadding,
|
|
721
|
+
i18nKeys = _this$props7.i18nKeys,
|
|
722
|
+
is24Hour = _this$props7.is24Hour,
|
|
723
|
+
isDefaultPosition = _this$props7.isDefaultPosition,
|
|
724
|
+
positionsOffset = _this$props7.positionsOffset,
|
|
725
|
+
targetOffset = _this$props7.targetOffset,
|
|
726
|
+
isRestrictScroll = _this$props7.isRestrictScroll,
|
|
727
|
+
dropBoxPortalId = _this$props7.dropBoxPortalId,
|
|
728
|
+
startDate = _this$props7.startDate,
|
|
729
|
+
endDate = _this$props7.endDate;
|
|
730
|
+
var _i18nKeys$timeText = i18nKeys.timeText,
|
|
731
|
+
timeText = _i18nKeys$timeText === void 0 ? 'Time' : _i18nKeys$timeText,
|
|
732
|
+
_i18nKeys$submitText = i18nKeys.submitText,
|
|
733
|
+
submitText = _i18nKeys$submitText === void 0 ? 'Set' : _i18nKeys$submitText,
|
|
734
|
+
_i18nKeys$cancelText = i18nKeys.cancelText,
|
|
735
|
+
cancelText = _i18nKeys$cancelText === void 0 ? 'Clear' : _i18nKeys$cancelText,
|
|
736
|
+
_i18nKeys$hourEmptyTe = i18nKeys.hourEmptyText,
|
|
737
|
+
hourEmptyText = _i18nKeys$hourEmptyTe === void 0 ? 'No search results' : _i18nKeys$hourEmptyTe,
|
|
738
|
+
_i18nKeys$minuteEmpty = i18nKeys.minuteEmptyText,
|
|
739
|
+
minuteEmptyText = _i18nKeys$minuteEmpty === void 0 ? 'No search results' : _i18nKeys$minuteEmpty,
|
|
740
|
+
_i18nKeys$nextMonthTi = i18nKeys.nextMonthTitleText,
|
|
741
|
+
nextMonthTitleText = _i18nKeys$nextMonthTi === void 0 ? 'Next month' : _i18nKeys$nextMonthTi,
|
|
742
|
+
_i18nKeys$prevMonthTi = i18nKeys.prevMonthTitleText,
|
|
743
|
+
prevMonthTitleText = _i18nKeys$prevMonthTi === void 0 ? 'Prev month' : _i18nKeys$prevMonthTi,
|
|
744
|
+
_i18nKeys$monthNames = i18nKeys.monthNames,
|
|
745
|
+
monthNames = _i18nKeys$monthNames === void 0 ? _constants.monthNamesDefault : _i18nKeys$monthNames,
|
|
746
|
+
_i18nKeys$monthNamesS = i18nKeys.monthNamesShort,
|
|
747
|
+
monthNamesShort = _i18nKeys$monthNamesS === void 0 ? _constants.monthNamesShortDefault : _i18nKeys$monthNamesS,
|
|
748
|
+
_i18nKeys$dayNames = i18nKeys.dayNames,
|
|
749
|
+
dayNames = _i18nKeys$dayNames === void 0 ? _constants.dayNamesDefault : _i18nKeys$dayNames,
|
|
750
|
+
_i18nKeys$dayNamesSho = i18nKeys.dayNamesShort,
|
|
751
|
+
dayNamesShort = _i18nKeys$dayNamesSho === void 0 ? _constants.dayNamesShortDefault : _i18nKeys$dayNamesSho;
|
|
752
|
+
var showmonthtxt = title(date, year, month, monthNames);
|
|
753
|
+
|
|
754
|
+
var childEle = /*#__PURE__*/_react["default"].createElement("div", {
|
|
755
|
+
className: "".concat(_DateTimeModule["default"].container, " ").concat(innerClass),
|
|
756
|
+
"data-id": "".concat(dataId, "_Calendar"),
|
|
757
|
+
"data-test-id": "".concat(dataId, "_Calendar"),
|
|
758
|
+
onClick: this.closePopup
|
|
759
|
+
}, /*#__PURE__*/_react["default"].createElement(_DateTimePopupHeader["default"], {
|
|
760
|
+
onOpenYearView: this.handleOpenYearView,
|
|
761
|
+
showMonthTxt: showmonthtxt,
|
|
762
|
+
isYearView: isYearView,
|
|
763
|
+
prevMonthTitleText: prevMonthTitleText,
|
|
764
|
+
nextMonthTitleText: nextMonthTitleText,
|
|
765
|
+
onModifyCalendar: this.modifyCalendar
|
|
766
|
+
}), /*#__PURE__*/_react["default"].createElement("div", {
|
|
767
|
+
className: _DateTimeModule["default"].subContainer
|
|
768
|
+
}, /*#__PURE__*/_react["default"].createElement(_CalendarView["default"], {
|
|
769
|
+
needBorder: isDateTimeField || needAction,
|
|
770
|
+
dataId: dataId,
|
|
771
|
+
date: date,
|
|
772
|
+
year: year,
|
|
773
|
+
month: month,
|
|
774
|
+
onSelect: this.dateSelect,
|
|
775
|
+
dayNames: dayNames,
|
|
776
|
+
dayNamesShort: dayNamesShort,
|
|
777
|
+
todayDate: todayDate,
|
|
778
|
+
todayMonth: todayMonth,
|
|
779
|
+
todayYear: todayYear,
|
|
780
|
+
startDate: startDate,
|
|
781
|
+
endDate: endDate
|
|
782
|
+
}), isDateTimeField ? /*#__PURE__*/_react["default"].createElement(_Time["default"], {
|
|
783
|
+
timeText: timeText,
|
|
784
|
+
dataId: dataId,
|
|
785
|
+
hourSuggestions: (0, _dateFormatUtils.getHourSuggestions)(is24Hour),
|
|
786
|
+
onHourSelect: this.hoursSelect,
|
|
787
|
+
hours: hours,
|
|
788
|
+
hourEmptyText: hourEmptyText,
|
|
789
|
+
needResponsive: needResponsive,
|
|
790
|
+
minSuggestions: (0, _dateFormatUtils.getMinuteSuggestions)(),
|
|
791
|
+
onMinutesSelect: this.minutesSelect,
|
|
792
|
+
mins: mins,
|
|
793
|
+
minuteEmptyText: minuteEmptyText,
|
|
794
|
+
ampmSuggestions: this.ampmSuggestions,
|
|
795
|
+
onAmPmSelect: this.amPmSelect,
|
|
796
|
+
amPm: amPm,
|
|
797
|
+
is24Hour: is24Hour
|
|
798
|
+
}) : null, needAction ? /*#__PURE__*/_react["default"].createElement(_DateTimePopupFooter["default"], {
|
|
799
|
+
submitText: submitText,
|
|
800
|
+
onSubmit: this.handleSelect,
|
|
801
|
+
cancelText: cancelText,
|
|
802
|
+
onCancel: this.handleClear,
|
|
803
|
+
dataId: dataId
|
|
804
|
+
}) : null, isYearView ? /*#__PURE__*/_react["default"].createElement("div", {
|
|
805
|
+
className: _DateTimeModule["default"].yearContainer
|
|
806
|
+
}, /*#__PURE__*/_react["default"].createElement(_YearView["default"], {
|
|
807
|
+
onSelectYear: this.handleSelectYear,
|
|
808
|
+
onSelectMonth: this.handleSelectMonthViaYearView,
|
|
809
|
+
viewedYear: year,
|
|
810
|
+
viewedMonth: month,
|
|
811
|
+
monthNames: monthNames,
|
|
812
|
+
monthNamesShort: monthNamesShort,
|
|
813
|
+
isMonthOpen: isMonthOpen
|
|
814
|
+
})) : null));
|
|
815
|
+
|
|
816
|
+
return isDefaultPosition ? /*#__PURE__*/_react["default"].createElement("div", {
|
|
817
|
+
className: "".concat(_DateTimeModule["default"].dropBox, " ").concat(className),
|
|
818
|
+
"data-id": "".concat(dataId, "_dateBoxContainer"),
|
|
819
|
+
"data-test-id": "".concat(dataId, "_dateBoxContainer")
|
|
820
|
+
}, childEle) : isReady ? /*#__PURE__*/_react["default"].createElement(_ResponsiveDropBox["default"], {
|
|
821
|
+
size: boxSize,
|
|
822
|
+
boxPosition: position,
|
|
823
|
+
isActive: isActive,
|
|
824
|
+
isArrow: false,
|
|
825
|
+
isAnimate: isAnimate,
|
|
826
|
+
animationStyle: "bounce",
|
|
827
|
+
getRef: getRef,
|
|
828
|
+
onClick: onClick,
|
|
829
|
+
dataId: "".concat(dataId, "_dateBoxContainer"),
|
|
830
|
+
needResponsive: needResponsive,
|
|
831
|
+
isAbsolutePositioningNeeded: isAbsolute,
|
|
832
|
+
customClass: {
|
|
833
|
+
customDropBoxWrap: className
|
|
834
|
+
},
|
|
835
|
+
isPadding: isPadding,
|
|
836
|
+
positionsOffset: positionsOffset,
|
|
837
|
+
targetOffset: targetOffset,
|
|
838
|
+
isRestrictScroll: isRestrictScroll,
|
|
839
|
+
portalId: dropBoxPortalId
|
|
840
|
+
}, /*#__PURE__*/_react["default"].createElement(_Layout.Box, null, childEle)) : null;
|
|
841
|
+
}
|
|
842
|
+
}]);
|
|
843
|
+
|
|
844
|
+
return DateTime;
|
|
845
|
+
}(_react["default"].PureComponent);
|
|
846
|
+
|
|
847
|
+
exports["default"] = DateTime;
|
|
848
|
+
DateTime.propTypes = _propTypes.DateTime_propTypes;
|
|
849
|
+
DateTime.defaultProps = _defaultProps.DateTime_defaultProps;
|