@zohodesk/components 1.4.11 → 1.4.13
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/README.md +13 -0
- package/package.json +4 -3
- package/es/Accordion/Accordion.js +0 -85
- package/es/Accordion/AccordionItem.js +0 -63
- package/es/Accordion/__tests__/Accordion.spec.js +0 -11
- package/es/Accordion/__tests__/AccordionItem.spec.js +0 -16
- package/es/Accordion/__tests__/__snapshots__/Accordion.spec.js.snap +0 -12
- package/es/Accordion/__tests__/__snapshots__/AccordionItem.spec.js.snap +0 -23
- package/es/Accordion/index.js +0 -2
- package/es/Accordion/props/defaultProps.js +0 -12
- package/es/Accordion/props/propTypes.js +0 -33
- package/es/Animation/Animation.js +0 -52
- package/es/Animation/__tests__/Animation.spec.js +0 -14
- package/es/Animation/__tests__/__snapshots__/Animation.spec.js.snap +0 -11
- package/es/Animation/props/defaultProps.js +0 -7
- package/es/Animation/props/propTypes.js +0 -12
- package/es/Animation/utils.js +0 -83
- package/es/AppContainer/AppContainer.js +0 -139
- package/es/AppContainer/AppContainer.module.css +0 -18
- package/es/AppContainer/__tests__/AppContainer.spec.js +0 -82
- package/es/AppContainer/__tests__/__snapshots__/AppContainer.spec.js.snap +0 -201
- package/es/AppContainer/props/defaultProps.js +0 -10
- package/es/AppContainer/props/propTypes.js +0 -17
- package/es/Avatar/Avatar.js +0 -195
- package/es/Avatar/Avatar.module.css +0 -176
- package/es/Avatar/__tests__/Avatar.spec.js +0 -181
- package/es/Avatar/__tests__/__snapshots__/Avatar.spec.js.snap +0 -591
- package/es/Avatar/props/defaultProps.js +0 -17
- package/es/Avatar/props/propTypes.js +0 -26
- package/es/AvatarTeam/AvatarTeam.js +0 -84
- package/es/AvatarTeam/AvatarTeam.module.css +0 -189
- package/es/AvatarTeam/__tests__/AvatarTeam.spec.js +0 -138
- package/es/AvatarTeam/__tests__/__snapshots__/AvatarTeam.spec.js.snap +0 -705
- package/es/AvatarTeam/props/defaultProps.js +0 -17
- package/es/AvatarTeam/props/propTypes.js +0 -28
- package/es/Button/Button.js +0 -76
- package/es/Button/__tests__/Button.spec.js +0 -242
- package/es/Button/__tests__/__snapshots__/Button.spec.js.snap +0 -412
- package/es/Button/css/Button.module.css +0 -613
- package/es/Button/css/cssJSLogic.js +0 -58
- package/es/Button/index.js +0 -2
- package/es/Button/props/defaultProps.js +0 -18
- package/es/Button/props/propTypes.js +0 -28
- package/es/Buttongroup/Buttongroup.js +0 -50
- package/es/Buttongroup/Buttongroup.module.css +0 -105
- package/es/Buttongroup/__tests__/Buttongroup.spec.js +0 -37
- package/es/Buttongroup/__tests__/__snapshots__/Buttongroup.spec.js.snap +0 -191
- package/es/Buttongroup/props/defaultProps.js +0 -6
- package/es/Buttongroup/props/propTypes.js +0 -9
- package/es/Card/Card.js +0 -305
- package/es/Card/Card.module.css +0 -20
- package/es/Card/__tests__/Card.spec.js +0 -90
- package/es/Card/__tests__/__snapshots__/Card.spec.js.snap +0 -56
- package/es/Card/index.js +0 -4
- package/es/Card/props/defaultProps.js +0 -26
- package/es/Card/props/propTypes.js +0 -49
- package/es/CheckBox/CheckBox.js +0 -172
- package/es/CheckBox/CheckBox.module.css +0 -160
- package/es/CheckBox/__tests__/CheckBox.spec.js +0 -240
- package/es/CheckBox/__tests__/__snapshots__/CheckBox.spec.js.snap +0 -1878
- package/es/CheckBox/props/defaultProps.js +0 -18
- package/es/CheckBox/props/propTypes.js +0 -42
- package/es/DateTime/CalendarView.js +0 -223
- package/es/DateTime/DateTime.js +0 -779
- package/es/DateTime/DateTime.module.css +0 -249
- package/es/DateTime/DateTimePopupFooter.js +0 -47
- package/es/DateTime/DateTimePopupHeader.js +0 -105
- package/es/DateTime/DateWidget.js +0 -1142
- package/es/DateTime/DateWidget.module.css +0 -39
- package/es/DateTime/DaysRow.js +0 -32
- package/es/DateTime/Time.js +0 -181
- package/es/DateTime/YearView.js +0 -264
- package/es/DateTime/YearView.module.css +0 -99
- package/es/DateTime/__tests__/CalendarView.spec.js +0 -13
- package/es/DateTime/__tests__/DateTime.spec.js +0 -21
- package/es/DateTime/__tests__/DateTimePopupFooter.spec.js +0 -11
- package/es/DateTime/__tests__/DateTimePopupHeader.spec.js +0 -11
- package/es/DateTime/__tests__/DateWidget.spec.js +0 -11
- package/es/DateTime/__tests__/DaysRow.spec.js +0 -13
- package/es/DateTime/__tests__/Time.spec.js +0 -11
- package/es/DateTime/__tests__/YearView.spec.js +0 -10
- package/es/DateTime/__tests__/__snapshots__/CalendarView.spec.js.snap +0 -312
- package/es/DateTime/__tests__/__snapshots__/DateTime.spec.js.snap +0 -938
- package/es/DateTime/__tests__/__snapshots__/DateTimePopupFooter.spec.js.snap +0 -34
- package/es/DateTime/__tests__/__snapshots__/DateTimePopupHeader.spec.js.snap +0 -72
- package/es/DateTime/__tests__/__snapshots__/DateWidget.spec.js.snap +0 -79
- package/es/DateTime/__tests__/__snapshots__/DaysRow.spec.js.snap +0 -12
- package/es/DateTime/__tests__/__snapshots__/Time.spec.js.snap +0 -310
- package/es/DateTime/common.js +0 -25
- package/es/DateTime/constants.js +0 -57
- package/es/DateTime/dateFormatUtils/dateFormat.js +0 -616
- package/es/DateTime/dateFormatUtils/dateFormats.js +0 -42
- package/es/DateTime/dateFormatUtils/dayChange.js +0 -83
- package/es/DateTime/dateFormatUtils/index.js +0 -267
- package/es/DateTime/dateFormatUtils/monthChange.js +0 -90
- package/es/DateTime/dateFormatUtils/timeChange.js +0 -228
- package/es/DateTime/dateFormatUtils/yearChange.js +0 -121
- package/es/DateTime/index.js +0 -1
- package/es/DateTime/objectUtils.js +0 -55
- package/es/DateTime/props/defaultProps.js +0 -65
- package/es/DateTime/props/propTypes.js +0 -203
- package/es/DateTime/typeChecker.js +0 -19
- package/es/DateTime/validator.js +0 -327
- package/es/DropBox/DropBox.js +0 -80
- package/es/DropBox/DropBoxElement/DropBoxElement.js +0 -137
- package/es/DropBox/DropBoxElement/__tests__/DropBoxElement.spec.js +0 -28
- package/es/DropBox/DropBoxElement/__tests__/__snapshots__/DropBoxElement.spec.js.snap +0 -95
- package/es/DropBox/DropBoxElement/css/DropBoxElement.module.css +0 -442
- package/es/DropBox/DropBoxElement/css/cssJSLogic.js +0 -91
- package/es/DropBox/DropBoxElement/props/defaultProps.js +0 -18
- package/es/DropBox/DropBoxElement/props/propTypes.js +0 -51
- package/es/DropBox/DropBoxElement/useDropboxPosCalc.js +0 -54
- package/es/DropBox/DropBoxPositionMapping.js +0 -142
- package/es/DropBox/__tests__/DropBox.spec.js +0 -11
- package/es/DropBox/__tests__/__snapshots__/DropBox.spec.js.snap +0 -36
- package/es/DropBox/css/DropBox.module.css +0 -59
- package/es/DropBox/css/cssJSLogic.js +0 -14
- package/es/DropBox/props/defaultProps.js +0 -14
- package/es/DropBox/props/propTypes.js +0 -16
- package/es/DropBox/utils/isMobilePopover.js +0 -17
- package/es/DropDown/DropDown.js +0 -76
- package/es/DropDown/DropDown.module.css +0 -5
- package/es/DropDown/DropDownHeading.js +0 -44
- package/es/DropDown/DropDownHeading.module.css +0 -53
- package/es/DropDown/DropDownItem.js +0 -76
- package/es/DropDown/DropDownItem.module.css +0 -94
- package/es/DropDown/DropDownSearch.js +0 -68
- package/es/DropDown/DropDownSearch.module.css +0 -14
- package/es/DropDown/DropDownSeparator.js +0 -15
- package/es/DropDown/DropDownSeparator.module.css +0 -7
- package/es/DropDown/__tests__/DropDown.spec.js +0 -11
- package/es/DropDown/__tests__/DropDownHeading.spec.js +0 -11
- package/es/DropDown/__tests__/DropDownItem.spec.js +0 -11
- package/es/DropDown/__tests__/DropDownSearch.spec.js +0 -11
- package/es/DropDown/__tests__/DropDownSeparator.spec.js +0 -11
- package/es/DropDown/__tests__/__snapshots__/DropDown.spec.js.snap +0 -54
- package/es/DropDown/__tests__/__snapshots__/DropDownHeading.spec.js.snap +0 -12
- package/es/DropDown/__tests__/__snapshots__/DropDownItem.spec.js.snap +0 -11
- package/es/DropDown/__tests__/__snapshots__/DropDownSearch.spec.js.snap +0 -20
- package/es/DropDown/__tests__/__snapshots__/DropDownSeparator.spec.js.snap +0 -9
- package/es/DropDown/index.js +0 -7
- package/es/DropDown/props/defaultProps.js +0 -21
- package/es/DropDown/props/propTypes.js +0 -66
- package/es/Heading/Heading.js +0 -38
- package/es/Heading/Heading.module.css +0 -5
- package/es/Heading/__tests__/Heading.spec.js +0 -20
- package/es/Heading/__tests__/__snapshots__/Heading.spec.js.snap +0 -63
- package/es/Heading/props/defaultProps.js +0 -5
- package/es/Heading/props/propTypes.js +0 -12
- package/es/Label/Label.js +0 -51
- package/es/Label/Label.module.css +0 -57
- package/es/Label/LabelColors.module.css +0 -21
- package/es/Label/__tests__/Label.spec.js +0 -99
- package/es/Label/__tests__/__snapshots__/Label.spec.js.snap +0 -312
- package/es/Label/props/defaultProps.js +0 -11
- package/es/Label/props/propTypes.js +0 -19
- package/es/Layout/Box.js +0 -115
- package/es/Layout/Container.js +0 -132
- package/es/Layout/Layout.module.css +0 -336
- package/es/Layout/__tests__/Box.spec.js +0 -11
- package/es/Layout/__tests__/Container.spec.js +0 -11
- package/es/Layout/__tests__/__snapshots__/Box.spec.js.snap +0 -16
- package/es/Layout/__tests__/__snapshots__/Container.spec.js.snap +0 -16
- package/es/Layout/index.js +0 -10
- package/es/Layout/props/defaultProps.js +0 -16
- package/es/Layout/props/propTypes.js +0 -46
- package/es/Layout/utils.js +0 -30
- package/es/ListItem/ListContainer.js +0 -105
- package/es/ListItem/ListItem.js +0 -151
- package/es/ListItem/ListItem.module.css +0 -261
- package/es/ListItem/ListItemWithAvatar.js +0 -178
- package/es/ListItem/ListItemWithCheckBox.js +0 -134
- package/es/ListItem/ListItemWithIcon.js +0 -158
- package/es/ListItem/ListItemWithRadio.js +0 -137
- package/es/ListItem/__tests__/ListContainer.spec.js +0 -19
- package/es/ListItem/__tests__/ListItem.spec.js +0 -11
- package/es/ListItem/__tests__/ListItemWithAvatar.spec.js +0 -46
- package/es/ListItem/__tests__/ListItemWithCheckBox.spec.js +0 -46
- package/es/ListItem/__tests__/ListItemWithIcon.spec.js +0 -46
- package/es/ListItem/__tests__/ListItemWithRadio.spec.js +0 -46
- package/es/ListItem/__tests__/__snapshots__/ListContainer.spec.js.snap +0 -27
- package/es/ListItem/__tests__/__snapshots__/ListItem.spec.js.snap +0 -29
- package/es/ListItem/__tests__/__snapshots__/ListItemWithAvatar.spec.js.snap +0 -222
- package/es/ListItem/__tests__/__snapshots__/ListItemWithCheckBox.spec.js.snap +0 -492
- package/es/ListItem/__tests__/__snapshots__/ListItemWithIcon.spec.js.snap +0 -222
- package/es/ListItem/__tests__/__snapshots__/ListItemWithRadio.spec.js.snap +0 -487
- package/es/ListItem/index.js +0 -6
- package/es/ListItem/props/defaultProps.js +0 -105
- package/es/ListItem/props/propTypes.js +0 -220
- package/es/Modal/Modal.js +0 -174
- package/es/Modal/Portal/Portal.js +0 -33
- package/es/Modal/Portal/__tests__/Portal.spec.js +0 -28
- package/es/Modal/Portal/__tests__/__snapshots__/Portal.spec.js.snap +0 -30
- package/es/Modal/Portal/props/defaultProps.js +0 -3
- package/es/Modal/Portal/props/propTypes.js +0 -5
- package/es/Modal/__tests__/Modal.spec.js +0 -15
- package/es/Modal/__tests__/__snapshots__/Modal.spec.js.snap +0 -26
- package/es/Modal/props/defaultProps.js +0 -3
- package/es/Modal/props/propTypes.js +0 -7
- package/es/MultiSelect/AdvancedGroupMultiSelect.js +0 -1109
- package/es/MultiSelect/AdvancedMultiSelect.js +0 -604
- package/es/MultiSelect/EmptyState.js +0 -65
- package/es/MultiSelect/MobileHeader/MobileHeader.js +0 -50
- package/es/MultiSelect/MobileHeader/MobileHeader.module.css +0 -16
- package/es/MultiSelect/MobileHeader/__tests__/MobileHeader.spec.js +0 -11
- package/es/MultiSelect/MobileHeader/__tests__/__snapshots__/MobileHeader.spec.js.snap +0 -39
- package/es/MultiSelect/MobileHeader/props/defaultProps.js +0 -7
- package/es/MultiSelect/MobileHeader/props/propTypes.js +0 -7
- package/es/MultiSelect/MultiSelect.js +0 -1186
- package/es/MultiSelect/MultiSelect.module.css +0 -216
- package/es/MultiSelect/MultiSelectHeader.js +0 -32
- package/es/MultiSelect/MultiSelectWithAvatar.js +0 -218
- package/es/MultiSelect/SelectedOptions.js +0 -86
- package/es/MultiSelect/SelectedOptions.module.css +0 -15
- package/es/MultiSelect/Suggestions.js +0 -225
- package/es/MultiSelect/__tests__/AdvancedGroupMultiSelect.spec.js +0 -12
- package/es/MultiSelect/__tests__/AdvancedMultiSelect.spec.js +0 -47
- package/es/MultiSelect/__tests__/EmptyState.spec.js +0 -15
- package/es/MultiSelect/__tests__/MultiSelect.spec.js +0 -36
- package/es/MultiSelect/__tests__/MultiSelectHeader.spec.js +0 -21
- package/es/MultiSelect/__tests__/MultiSelectWithAvatar.spec.js +0 -11
- package/es/MultiSelect/__tests__/SelectedOptions.spec.js +0 -28
- package/es/MultiSelect/__tests__/Suggestions.spec.js +0 -71
- package/es/MultiSelect/__tests__/__snapshots__/AdvancedGroupMultiSelect.spec.js.snap +0 -74
- package/es/MultiSelect/__tests__/__snapshots__/AdvancedMultiSelect.spec.js.snap +0 -534
- package/es/MultiSelect/__tests__/__snapshots__/EmptyState.spec.js.snap +0 -12
- package/es/MultiSelect/__tests__/__snapshots__/MultiSelect.spec.js.snap +0 -339
- package/es/MultiSelect/__tests__/__snapshots__/MultiSelectHeader.spec.js.snap +0 -63
- package/es/MultiSelect/__tests__/__snapshots__/MultiSelectWithAvatar.spec.js.snap +0 -85
- package/es/MultiSelect/__tests__/__snapshots__/SelectedOptions.spec.js.snap +0 -80
- package/es/MultiSelect/__tests__/__snapshots__/Suggestions.spec.js.snap +0 -363
- package/es/MultiSelect/constants.js +0 -6
- package/es/MultiSelect/index.js +0 -4
- package/es/MultiSelect/props/defaultProps.js +0 -173
- package/es/MultiSelect/props/propTypes.js +0 -300
- package/es/PopOver/PopOver.js +0 -211
- package/es/PopOver/PopOver.module.css +0 -9
- package/es/PopOver/__tests__/PopOver.spec.js +0 -11
- package/es/PopOver/__tests__/__snapshots__/PopOver.spec.js.snap +0 -13
- package/es/PopOver/index.js +0 -3
- package/es/PopOver/props/defaultProps.js +0 -7
- package/es/PopOver/props/propTypes.js +0 -53
- package/es/Popup/Popup.js +0 -1049
- package/es/Popup/PositionMapping.js +0 -72
- package/es/Popup/Registry.js +0 -36
- package/es/Popup/intersectionObserver.js +0 -49
- package/es/Popup/props/propTypes.js +0 -30
- package/es/Popup/viewPort.js +0 -373
- package/es/Provider/AvatarSize.js +0 -13
- package/es/Provider/Config.js +0 -21
- package/es/Provider/CssProvider.js +0 -16
- package/es/Provider/IdProvider.js +0 -66
- package/es/Provider/LibraryContext.js +0 -57
- package/es/Provider/LibraryContextInit.js +0 -3
- package/es/Provider/NumberGenerator/NumberGenerator.js +0 -136
- package/es/Provider/ZindexProvider.js +0 -57
- package/es/Provider/index.js +0 -4
- package/es/Radio/Radio.js +0 -138
- package/es/Radio/Radio.module.css +0 -115
- package/es/Radio/__tests__/Radio.spec.js +0 -238
- package/es/Radio/__tests__/__snapshots__/Radio.spec.js.snap +0 -1916
- package/es/Radio/props/defaultProps.js +0 -15
- package/es/Radio/props/propTypes.js +0 -41
- package/es/Responsive/CustomResponsive.js +0 -195
- package/es/Responsive/RefWrapper.js +0 -38
- package/es/Responsive/ResizeComponent.js +0 -197
- package/es/Responsive/ResizeObserver.js +0 -76
- package/es/Responsive/ResizeObserverWithPolyfill.js +0 -140
- package/es/Responsive/Responsive.js +0 -194
- package/es/Responsive/index.js +0 -9
- package/es/Responsive/props/defaultProps.js +0 -13
- package/es/Responsive/props/propTypes.js +0 -25
- package/es/Responsive/sizeObservers.js +0 -141
- package/es/Responsive/utils/index.js +0 -52
- package/es/Responsive/utils/shallowCompare.js +0 -28
- package/es/Responsive/windowResizeObserver.js +0 -51
- package/es/ResponsiveDropBox/ResponsiveDropBox.js +0 -65
- package/es/ResponsiveDropBox/ResponsiveDropBox.module.css +0 -6
- package/es/ResponsiveDropBox/__tests__/ResponsiveDropBox.spec.js +0 -11
- package/es/ResponsiveDropBox/__tests__/__snapshots__/ResponsiveDropBox.spec.js.snap +0 -42
- package/es/ResponsiveDropBox/props/defaultProps.js +0 -4
- package/es/ResponsiveDropBox/props/propTypes.js +0 -8
- package/es/Ribbon/Ribbon.js +0 -51
- package/es/Ribbon/Ribbon.module.css +0 -500
- package/es/Ribbon/__tests__/Ribbon.spec.js +0 -52
- package/es/Ribbon/__tests__/__snapshots__/Ribbon.spec.js.snap +0 -374
- package/es/Ribbon/props/defaultProps.js +0 -9
- package/es/Ribbon/props/propTypes.js +0 -11
- package/es/RippleEffect/RippleEffect.js +0 -30
- package/es/RippleEffect/RippleEffect.module.css +0 -109
- package/es/RippleEffect/__tests__/RippleEffect.spec.js +0 -69
- package/es/RippleEffect/__tests__/__snapshots__/RippleEffect.spec.js.snap +0 -161
- package/es/RippleEffect/props/defaultProps.js +0 -10
- package/es/RippleEffect/props/propTypes.js +0 -12
- package/es/Select/GroupSelect.js +0 -825
- package/es/Select/Select.js +0 -1016
- package/es/Select/Select.module.css +0 -138
- package/es/Select/SelectWithAvatar.js +0 -358
- package/es/Select/SelectWithIcon.js +0 -563
- package/es/Select/__tests__/GroupSelect.spec.js +0 -19
- package/es/Select/__tests__/Select.spec.js +0 -1153
- package/es/Select/__tests__/SelectWithAvatar.spec.js +0 -12
- package/es/Select/__tests__/SelectWithIcon.spec.js +0 -12
- package/es/Select/__tests__/__snapshots__/GroupSelect.spec.js.snap +0 -90
- package/es/Select/__tests__/__snapshots__/Select.spec.js.snap +0 -10446
- package/es/Select/__tests__/__snapshots__/SelectWithAvatar.spec.js.snap +0 -45
- package/es/Select/__tests__/__snapshots__/SelectWithIcon.spec.js.snap +0 -108
- package/es/Select/index.js +0 -4
- package/es/Select/props/defaultProps.js +0 -131
- package/es/Select/props/propTypes.js +0 -311
- package/es/Stencils/Stencils.js +0 -24
- package/es/Stencils/Stencils.module.css +0 -100
- package/es/Stencils/__tests__/Stencils.spec.js +0 -54
- package/es/Stencils/__tests__/__snapshots__/Stencils.spec.js.snap +0 -105
- package/es/Stencils/props/defaultProps.js +0 -7
- package/es/Stencils/props/propTypes.js +0 -8
- package/es/Switch/Switch.js +0 -99
- package/es/Switch/Switch.module.css +0 -128
- package/es/Switch/__tests__/Switch.spec.js +0 -156
- package/es/Switch/__tests__/__snapshots__/Switch.spec.js.snap +0 -831
- package/es/Switch/props/defaultProps.js +0 -11
- package/es/Switch/props/propTypes.js +0 -28
- package/es/Tab/Tab.js +0 -110
- package/es/Tab/Tab.module.css +0 -100
- package/es/Tab/TabContent.js +0 -30
- package/es/Tab/TabContent.module.css +0 -4
- package/es/Tab/TabContentWrapper.js +0 -33
- package/es/Tab/TabWrapper.js +0 -56
- package/es/Tab/Tabs.js +0 -723
- package/es/Tab/Tabs.module.css +0 -167
- package/es/Tab/__tests__/Tab.spec.js +0 -11
- package/es/Tab/__tests__/TabContent.spec.js +0 -11
- package/es/Tab/__tests__/TabContentWrapper.spec.js +0 -11
- package/es/Tab/__tests__/TabLayout.spec.js +0 -34
- package/es/Tab/__tests__/TabWrapper.spec.js +0 -11
- package/es/Tab/__tests__/Tabs.spec.js +0 -11
- package/es/Tab/__tests__/__snapshots__/Tab.spec.js.snap +0 -22
- package/es/Tab/__tests__/__snapshots__/TabContent.spec.js.snap +0 -19
- package/es/Tab/__tests__/__snapshots__/TabContentWrapper.spec.js.snap +0 -12
- package/es/Tab/__tests__/__snapshots__/TabLayout.spec.js.snap +0 -341
- package/es/Tab/__tests__/__snapshots__/TabWrapper.spec.js.snap +0 -20
- package/es/Tab/__tests__/__snapshots__/Tabs.spec.js.snap +0 -33
- package/es/Tab/index.js +0 -5
- package/es/Tab/props/defaultProps.js +0 -51
- package/es/Tab/props/propTypes.js +0 -117
- package/es/Tab/utils/tabConfigs.js +0 -18
- package/es/Tag/Tag.js +0 -163
- package/es/Tag/Tag.module.css +0 -254
- package/es/Tag/__tests__/Tag.spec.js +0 -252
- package/es/Tag/__tests__/__snapshots__/Tag.spec.js.snap +0 -3074
- package/es/Tag/props/defaultProps.js +0 -16
- package/es/Tag/props/propTypes.js +0 -42
- package/es/TextBox/TextBox.js +0 -189
- package/es/TextBox/TextBox.module.css +0 -197
- package/es/TextBox/__tests__/TextBox.spec.js +0 -327
- package/es/TextBox/__tests__/__snapshots__/TextBox.spec.js.snap +0 -615
- package/es/TextBox/props/defaultProps.js +0 -20
- package/es/TextBox/props/propTypes.js +0 -53
- package/es/TextBoxIcon/TextBoxIcon.js +0 -203
- package/es/TextBoxIcon/TextBoxIcon.module.css +0 -79
- package/es/TextBoxIcon/__tests__/TextBoxIcon.spec.js +0 -268
- package/es/TextBoxIcon/__tests__/__snapshots__/TextBoxIcon.spec.js.snap +0 -1784
- package/es/TextBoxIcon/props/defaultProps.js +0 -24
- package/es/TextBoxIcon/props/propTypes.js +0 -55
- package/es/Textarea/Textarea.js +0 -125
- package/es/Textarea/Textarea.module.css +0 -148
- package/es/Textarea/__tests__/Textarea.spec.js +0 -266
- package/es/Textarea/__tests__/__snapshots__/Textarea.spec.js.snap +0 -525
- package/es/Textarea/props/defaultProps.js +0 -18
- package/es/Textarea/props/propTypes.js +0 -35
- package/es/Tooltip/Tooltip.js +0 -530
- package/es/Tooltip/Tooltip.module.css +0 -133
- package/es/Tooltip/props/defaultProps.js +0 -4
- package/es/Tooltip/props/propTypes.js +0 -5
- package/es/Typography/Typography.js +0 -38
- package/es/Typography/css/Typography.module.css +0 -489
- package/es/Typography/css/cssJSLogic.js +0 -56
- package/es/Typography/props/defaultProps.js +0 -8
- package/es/Typography/props/propTypes.js +0 -27
- package/es/Typography/utils/index.js +0 -50
- package/es/VelocityAnimation/VelocityAnimation/VelocityAnimation.js +0 -77
- package/es/VelocityAnimation/VelocityAnimation/__tests__/VelocityAnimation.spec.js +0 -11
- package/es/VelocityAnimation/VelocityAnimation/__tests__/__snapshots__/VelocityAnimation.spec.js.snap +0 -9
- package/es/VelocityAnimation/VelocityAnimation/props/defaultProps.js +0 -7
- package/es/VelocityAnimation/VelocityAnimation/props/propTypes.js +0 -12
- package/es/VelocityAnimation/VelocityAnimationGroup/VelocityAnimationGroup.js +0 -144
- package/es/VelocityAnimation/VelocityAnimationGroup/__tests__/VelocityAnimationGroup.spec.js +0 -19
- package/es/VelocityAnimation/VelocityAnimationGroup/__tests__/__snapshots__/VelocityAnimationGroup.spec.js.snap +0 -11
- package/es/VelocityAnimation/VelocityAnimationGroup/props/defaultProps.js +0 -15
- package/es/VelocityAnimation/VelocityAnimationGroup/props/propTypes.js +0 -22
- package/es/VelocityAnimation/index.js +0 -2
- package/es/common/a11y.module.css +0 -4
- package/es/common/animation.module.css +0 -624
- package/es/common/avatarsizes.module.css +0 -49
- package/es/common/basic.module.css +0 -31
- package/es/common/basicReset.module.css +0 -40
- package/es/common/boxShadow.module.css +0 -34
- package/es/common/common.module.css +0 -559
- package/es/common/customscroll.module.css +0 -142
- package/es/common/reset.module.css +0 -13
- package/es/common/transition.module.css +0 -146
- package/es/components_layer.module.css +0 -1
- package/es/css.js +0 -41
- package/es/deprecated/PortalLayer/PortalLayer.js +0 -108
- package/es/deprecated/PortalLayer/props/defaultProps.js +0 -5
- package/es/deprecated/PortalLayer/props/propTypes.js +0 -20
- package/es/deprecated/Switch/Switch.js +0 -94
- package/es/deprecated/Switch/props/defaultProps.js +0 -11
- package/es/deprecated/Switch/props/propTypes.js +0 -28
- package/es/index.js +0 -42
- package/es/semantic/Button/Button.js +0 -60
- package/es/semantic/Button/__tests__/Button.spec.js +0 -11
- package/es/semantic/Button/__tests__/__snapshots__/Button.spec.js.snap +0 -15
- package/es/semantic/Button/props/defaultProps.js +0 -12
- package/es/semantic/Button/props/propTypes.js +0 -22
- package/es/semantic/Button/semanticButton.module.css +0 -9
- package/es/semantic/index.js +0 -1
- package/es/utils/Common.js +0 -417
- package/es/utils/ContextOptimizer.js +0 -38
- package/es/utils/constant.js +0 -2
- package/es/utils/constructFullName.js +0 -13
- package/es/utils/cssUtils.js +0 -11
- package/es/utils/datetime/GMTZones.js +0 -48
- package/es/utils/datetime/common.js +0 -204
- package/es/utils/debounce.js +0 -23
- package/es/utils/dropDownUtils.js +0 -510
- package/es/utils/dummyFunction.js +0 -1
- package/es/utils/getHTMLFontSize.js +0 -4
- package/es/utils/getInitial.js +0 -24
- package/es/utils/index.js +0 -1
- package/es/utils/scrollTo.js +0 -13
- package/es/utils/shallowEqual.js +0 -32
- package/es/v1/Accordion/Accordion.js +0 -66
- package/es/v1/Accordion/AccordionItem.js +0 -57
- package/es/v1/Accordion/index.js +0 -2
- package/es/v1/Accordion/props/defaultProps.js +0 -12
- package/es/v1/Accordion/props/propTypes.js +0 -33
- package/es/v1/Animation/Animation.js +0 -45
- package/es/v1/Animation/props/defaultProps.js +0 -7
- package/es/v1/Animation/props/propTypes.js +0 -12
- package/es/v1/Animation/utils.js +0 -83
- package/es/v1/AppContainer/AppContainer.js +0 -115
- package/es/v1/AppContainer/props/defaultProps.js +0 -10
- package/es/v1/AppContainer/props/propTypes.js +0 -17
- package/es/v1/Avatar/Avatar.js +0 -139
- package/es/v1/Avatar/props/defaultProps.js +0 -17
- package/es/v1/Avatar/props/propTypes.js +0 -26
- package/es/v1/AvatarTeam/AvatarTeam.js +0 -70
- package/es/v1/AvatarTeam/props/defaultProps.js +0 -17
- package/es/v1/AvatarTeam/props/propTypes.js +0 -27
- package/es/v1/Button/Button.js +0 -67
- package/es/v1/Button/props/defaultProps.js +0 -18
- package/es/v1/Button/props/propTypes.js +0 -28
- package/es/v1/Buttongroup/Buttongroup.js +0 -31
- package/es/v1/Buttongroup/props/defaultProps.js +0 -6
- package/es/v1/Buttongroup/props/propTypes.js +0 -9
- package/es/v1/Card/Card.js +0 -237
- package/es/v1/Card/index.js +0 -4
- package/es/v1/Card/props/defaultProps.js +0 -25
- package/es/v1/Card/props/propTypes.js +0 -48
- package/es/v1/CheckBox/CheckBox.js +0 -161
- package/es/v1/CheckBox/props/defaultProps.js +0 -18
- package/es/v1/CheckBox/props/propTypes.js +0 -41
- package/es/v1/DateTime/CalendarView.js +0 -254
- package/es/v1/DateTime/DateTime.js +0 -779
- package/es/v1/DateTime/DateTimePopupFooter.js +0 -47
- package/es/v1/DateTime/DateTimePopupHeader.js +0 -105
- package/es/v1/DateTime/DateWidget.js +0 -1134
- package/es/v1/DateTime/DaysRow.js +0 -32
- package/es/v1/DateTime/Time.js +0 -181
- package/es/v1/DateTime/YearView.js +0 -264
- package/es/v1/DateTime/index.js +0 -1
- package/es/v1/DateTime/props/defaultProps.js +0 -63
- package/es/v1/DateTime/props/propTypes.js +0 -206
- package/es/v1/DropBox/DropBox.js +0 -79
- package/es/v1/DropBox/DropBoxElement/DropBoxElement.js +0 -133
- package/es/v1/DropBox/DropBoxElement/props/defaultProps.js +0 -18
- package/es/v1/DropBox/DropBoxElement/props/propTypes.js +0 -51
- package/es/v1/DropBox/props/defaultProps.js +0 -14
- package/es/v1/DropBox/props/propTypes.js +0 -16
- package/es/v1/DropBox/utils/isMobilePopover.js +0 -17
- package/es/v1/DropDown/DropDown.js +0 -53
- package/es/v1/DropDown/DropDownHeading.js +0 -36
- package/es/v1/DropDown/DropDownItem.js +0 -56
- package/es/v1/DropDown/DropDownSearch.js +0 -58
- package/es/v1/DropDown/DropDownSeparator.js +0 -12
- package/es/v1/DropDown/props/defaultProps.js +0 -21
- package/es/v1/DropDown/props/propTypes.js +0 -66
- package/es/v1/Heading/Heading.js +0 -35
- package/es/v1/Heading/props/defaultProps.js +0 -5
- package/es/v1/Heading/props/propTypes.js +0 -12
- package/es/v1/Label/Label.js +0 -40
- package/es/v1/Label/props/defaultProps.js +0 -11
- package/es/v1/Label/props/propTypes.js +0 -19
- package/es/v1/Layout/Box.js +0 -115
- package/es/v1/Layout/Container.js +0 -132
- package/es/v1/Layout/index.js +0 -2
- package/es/v1/Layout/props/defaultProps.js +0 -16
- package/es/v1/Layout/props/propTypes.js +0 -46
- package/es/v1/ListItem/ListContainer.js +0 -104
- package/es/v1/ListItem/ListItem.js +0 -123
- package/es/v1/ListItem/ListItemWithAvatar.js +0 -143
- package/es/v1/ListItem/ListItemWithCheckBox.js +0 -104
- package/es/v1/ListItem/ListItemWithIcon.js +0 -126
- package/es/v1/ListItem/ListItemWithRadio.js +0 -105
- package/es/v1/ListItem/index.js +0 -6
- package/es/v1/ListItem/props/defaultProps.js +0 -97
- package/es/v1/ListItem/props/propTypes.js +0 -202
- package/es/v1/Modal/Modal.js +0 -125
- package/es/v1/Modal/props/defaultProps.js +0 -3
- package/es/v1/Modal/props/propTypes.js +0 -7
- package/es/v1/MultiSelect/AdvancedGroupMultiSelect.js +0 -1092
- package/es/v1/MultiSelect/AdvancedMultiSelect.js +0 -583
- package/es/v1/MultiSelect/EmptyState.js +0 -64
- package/es/v1/MultiSelect/MobileHeader/MobileHeader.js +0 -50
- package/es/v1/MultiSelect/MobileHeader/props/defaultProps.js +0 -7
- package/es/v1/MultiSelect/MobileHeader/props/propTypes.js +0 -7
- package/es/v1/MultiSelect/MultiSelect.js +0 -1119
- package/es/v1/MultiSelect/MultiSelectHeader.js +0 -32
- package/es/v1/MultiSelect/MultiSelectWithAvatar.js +0 -208
- package/es/v1/MultiSelect/SelectedOptions.js +0 -84
- package/es/v1/MultiSelect/Suggestions.js +0 -141
- package/es/v1/MultiSelect/index.js +0 -4
- package/es/v1/MultiSelect/props/defaultProps.js +0 -165
- package/es/v1/MultiSelect/props/propTypes.js +0 -322
- package/es/v1/PopOver/PopOver.js +0 -176
- package/es/v1/PopOver/props/defaultProps.js +0 -7
- package/es/v1/PopOver/props/propTypes.js +0 -53
- package/es/v1/Popup/Popup.js +0 -644
- package/es/v1/Radio/Radio.js +0 -130
- package/es/v1/Radio/props/defaultProps.js +0 -15
- package/es/v1/Radio/props/propTypes.js +0 -40
- package/es/v1/ResponsiveDropBox/ResponsiveDropBox.js +0 -56
- package/es/v1/ResponsiveDropBox/props/defaultProps.js +0 -4
- package/es/v1/ResponsiveDropBox/props/propTypes.js +0 -8
- package/es/v1/Ribbon/Ribbon.js +0 -33
- package/es/v1/Ribbon/props/defaultProps.js +0 -9
- package/es/v1/Ribbon/props/propTypes.js +0 -11
- package/es/v1/RippleEffect/RippleEffect.js +0 -25
- package/es/v1/RippleEffect/props/defaultProps.js +0 -10
- package/es/v1/RippleEffect/props/propTypes.js +0 -12
- package/es/v1/Select/GroupSelect.js +0 -818
- package/es/v1/Select/Select.js +0 -975
- package/es/v1/Select/SelectWithAvatar.js +0 -356
- package/es/v1/Select/SelectWithIcon.js +0 -545
- package/es/v1/Select/index.js +0 -4
- package/es/v1/Select/props/defaultProps.js +0 -126
- package/es/v1/Select/props/propTypes.js +0 -297
- package/es/v1/Stencils/Stencils.js +0 -26
- package/es/v1/Stencils/props/defaultProps.js +0 -6
- package/es/v1/Stencils/props/propTypes.js +0 -7
- package/es/v1/Switch/Switch.js +0 -138
- package/es/v1/Switch/__tests__/Switch.spec.js +0 -30
- package/es/v1/Switch/__tests__/__snapshots__/Switch.spec.js.snap +0 -135
- package/es/v1/Switch/contants/index.js +0 -24
- package/es/v1/Switch/css/Switch_v1.module.css +0 -134
- package/es/v1/Switch/css/cssJSLogic.js +0 -48
- package/es/v1/Switch/props/defaultProps.js +0 -11
- package/es/v1/Switch/props/propTypes.js +0 -36
- package/es/v1/Switch/useSwitch.js +0 -33
- package/es/v1/Tab/Tab.js +0 -106
- package/es/v1/Tab/TabContent.js +0 -30
- package/es/v1/Tab/TabContentWrapper.js +0 -33
- package/es/v1/Tab/TabWrapper.js +0 -55
- package/es/v1/Tab/Tabs.js +0 -619
- package/es/v1/Tab/index.js +0 -5
- package/es/v1/Tab/props/defaultProps.js +0 -51
- package/es/v1/Tab/props/propTypes.js +0 -117
- package/es/v1/Tab/v1Tab.module.css +0 -100
- package/es/v1/Tab/v1TabContent.module.css +0 -4
- package/es/v1/Tab/v1Tabs.module.css +0 -167
- package/es/v1/Tag/Tag.js +0 -140
- package/es/v1/Tag/props/defaultProps.js +0 -15
- package/es/v1/Tag/props/propTypes.js +0 -36
- package/es/v1/TextBox/TextBox.js +0 -160
- package/es/v1/TextBox/props/defaultProps.js +0 -20
- package/es/v1/TextBox/props/propTypes.js +0 -56
- package/es/v1/TextBoxIcon/TextBoxIcon.js +0 -166
- package/es/v1/TextBoxIcon/props/defaultProps.js +0 -24
- package/es/v1/TextBoxIcon/props/propTypes.js +0 -53
- package/es/v1/Textarea/Textarea.js +0 -100
- package/es/v1/Textarea/props/defaultProps.js +0 -17
- package/es/v1/Textarea/props/propTypes.js +0 -31
- package/es/v1/Tooltip/Tooltip.js +0 -530
- package/es/v1/Tooltip/props/defaultProps.js +0 -4
- package/es/v1/Tooltip/props/propTypes.js +0 -5
- package/es/v1/Typography/Typography.js +0 -38
- package/es/v1/Typography/css/cssJSLogic.js +0 -56
- package/es/v1/Typography/css/v1_Typography.module.css +0 -380
- package/es/v1/Typography/props/defaultProps.js +0 -8
- package/es/v1/Typography/props/propTypes.js +0 -27
- package/es/v1/Typography/utils/index.js +0 -50
- package/es/v1/VelocityAnimation/VelocityAnimation/VelocityAnimation.js +0 -69
- package/es/v1/VelocityAnimation/VelocityAnimation/props/defaultProps.js +0 -7
- package/es/v1/VelocityAnimation/VelocityAnimation/props/propTypes.js +0 -12
- package/es/v1/VelocityAnimation/VelocityAnimationGroup/VelocityAnimationGroup.js +0 -99
- package/es/v1/VelocityAnimation/VelocityAnimationGroup/props/defaultProps.js +0 -15
- package/es/v1/VelocityAnimation/VelocityAnimationGroup/props/propTypes.js +0 -19
- package/es/v1/semantic/Button/Button.js +0 -53
- package/es/v1/semantic/Button/props/defaultProps.js +0 -12
- package/es/v1/semantic/Button/props/propTypes.js +0 -22
- package/es/v1/semantic/index.js +0 -1
- package/lib/Accordion/Accordion.js +0 -134
- package/lib/Accordion/AccordionItem.js +0 -111
- package/lib/Accordion/__tests__/Accordion.spec.js +0 -18
- package/lib/Accordion/__tests__/AccordionItem.spec.js +0 -24
- package/lib/Accordion/__tests__/__snapshots__/Accordion.spec.js.snap +0 -12
- package/lib/Accordion/__tests__/__snapshots__/AccordionItem.spec.js.snap +0 -23
- package/lib/Accordion/index.js +0 -23
- package/lib/Accordion/props/defaultProps.js +0 -20
- package/lib/Accordion/props/propTypes.js +0 -45
- package/lib/Animation/Animation.js +0 -102
- package/lib/Animation/__tests__/Animation.spec.js +0 -21
- package/lib/Animation/__tests__/__snapshots__/Animation.spec.js.snap +0 -11
- package/lib/Animation/props/defaultProps.js +0 -14
- package/lib/Animation/props/propTypes.js +0 -23
- package/lib/Animation/utils.js +0 -94
- package/lib/AppContainer/AppContainer.js +0 -210
- package/lib/AppContainer/AppContainer.module.css +0 -18
- package/lib/AppContainer/__tests__/AppContainer.spec.js +0 -90
- package/lib/AppContainer/__tests__/__snapshots__/AppContainer.spec.js.snap +0 -201
- package/lib/AppContainer/props/defaultProps.js +0 -17
- package/lib/AppContainer/props/propTypes.js +0 -28
- package/lib/Avatar/Avatar.js +0 -253
- package/lib/Avatar/Avatar.module.css +0 -176
- package/lib/Avatar/__tests__/Avatar.spec.js +0 -188
- package/lib/Avatar/__tests__/__snapshots__/Avatar.spec.js.snap +0 -591
- package/lib/Avatar/props/defaultProps.js +0 -24
- package/lib/Avatar/props/propTypes.js +0 -37
- package/lib/AvatarTeam/AvatarTeam.js +0 -133
- package/lib/AvatarTeam/AvatarTeam.module.css +0 -189
- package/lib/AvatarTeam/__tests__/AvatarTeam.spec.js +0 -145
- package/lib/AvatarTeam/__tests__/__snapshots__/AvatarTeam.spec.js.snap +0 -705
- package/lib/AvatarTeam/props/defaultProps.js +0 -24
- package/lib/AvatarTeam/props/propTypes.js +0 -40
- package/lib/Button/Button.js +0 -91
- package/lib/Button/__tests__/Button.spec.js +0 -256
- package/lib/Button/__tests__/__snapshots__/Button.spec.js.snap +0 -412
- package/lib/Button/css/Button.module.css +0 -613
- package/lib/Button/css/cssJSLogic.js +0 -45
- package/lib/Button/index.js +0 -23
- package/lib/Button/props/defaultProps.js +0 -27
- package/lib/Button/props/propTypes.js +0 -40
- package/lib/Buttongroup/Buttongroup.js +0 -100
- package/lib/Buttongroup/Buttongroup.module.css +0 -105
- package/lib/Buttongroup/__tests__/Buttongroup.spec.js +0 -44
- package/lib/Buttongroup/__tests__/__snapshots__/Buttongroup.spec.js.snap +0 -191
- package/lib/Buttongroup/props/defaultProps.js +0 -13
- package/lib/Buttongroup/props/propTypes.js +0 -20
- package/lib/Card/Card.js +0 -399
- package/lib/Card/Card.module.css +0 -20
- package/lib/Card/__tests__/Card.spec.js +0 -135
- package/lib/Card/__tests__/__snapshots__/Card.spec.js.snap +0 -56
- package/lib/Card/index.js +0 -37
- package/lib/Card/props/defaultProps.js +0 -36
- package/lib/Card/props/propTypes.js +0 -63
- package/lib/CheckBox/CheckBox.js +0 -223
- package/lib/CheckBox/CheckBox.module.css +0 -160
- package/lib/CheckBox/__tests__/CheckBox.spec.js +0 -248
- package/lib/CheckBox/__tests__/__snapshots__/CheckBox.spec.js.snap +0 -1878
- package/lib/CheckBox/props/defaultProps.js +0 -25
- package/lib/CheckBox/props/propTypes.js +0 -53
- package/lib/DateTime/CalendarView.js +0 -290
- package/lib/DateTime/DateTime.js +0 -879
- package/lib/DateTime/DateTime.module.css +0 -249
- package/lib/DateTime/DateTimePopupFooter.js +0 -96
- package/lib/DateTime/DateTimePopupHeader.js +0 -166
- package/lib/DateTime/DateWidget.js +0 -1173
- package/lib/DateTime/DateWidget.module.css +0 -39
- package/lib/DateTime/DaysRow.js +0 -81
- package/lib/DateTime/Time.js +0 -270
- package/lib/DateTime/YearView.js +0 -325
- package/lib/DateTime/YearView.module.css +0 -99
- package/lib/DateTime/__tests__/CalendarView.spec.js +0 -20
- package/lib/DateTime/__tests__/DateTime.spec.js +0 -28
- package/lib/DateTime/__tests__/DateTimePopupFooter.spec.js +0 -18
- package/lib/DateTime/__tests__/DateTimePopupHeader.spec.js +0 -18
- package/lib/DateTime/__tests__/DateWidget.spec.js +0 -18
- package/lib/DateTime/__tests__/DaysRow.spec.js +0 -20
- package/lib/DateTime/__tests__/Time.spec.js +0 -18
- package/lib/DateTime/__tests__/YearView.spec.js +0 -17
- package/lib/DateTime/__tests__/__snapshots__/CalendarView.spec.js.snap +0 -312
- package/lib/DateTime/__tests__/__snapshots__/DateTime.spec.js.snap +0 -938
- package/lib/DateTime/__tests__/__snapshots__/DateTimePopupFooter.spec.js.snap +0 -34
- package/lib/DateTime/__tests__/__snapshots__/DateTimePopupHeader.spec.js.snap +0 -72
- package/lib/DateTime/__tests__/__snapshots__/DateWidget.spec.js.snap +0 -79
- package/lib/DateTime/__tests__/__snapshots__/DaysRow.spec.js.snap +0 -12
- package/lib/DateTime/__tests__/__snapshots__/Time.spec.js.snap +0 -310
- package/lib/DateTime/common.js +0 -36
- package/lib/DateTime/constants.js +0 -77
- package/lib/DateTime/dateFormatUtils/dateFormat.js +0 -627
- package/lib/DateTime/dateFormatUtils/dateFormats.js +0 -50
- package/lib/DateTime/dateFormatUtils/dayChange.js +0 -83
- package/lib/DateTime/dateFormatUtils/index.js +0 -307
- package/lib/DateTime/dateFormatUtils/monthChange.js +0 -96
- package/lib/DateTime/dateFormatUtils/timeChange.js +0 -240
- package/lib/DateTime/dateFormatUtils/yearChange.js +0 -121
- package/lib/DateTime/index.js +0 -15
- package/lib/DateTime/objectUtils.js +0 -76
- package/lib/DateTime/props/defaultProps.js +0 -78
- package/lib/DateTime/props/propTypes.js +0 -235
- package/lib/DateTime/typeChecker.js +0 -26
- package/lib/DateTime/validator.js +0 -353
- package/lib/DropBox/DropBox.js +0 -109
- package/lib/DropBox/DropBoxElement/DropBoxElement.js +0 -150
- package/lib/DropBox/DropBoxElement/__tests__/DropBoxElement.spec.js +0 -35
- package/lib/DropBox/DropBoxElement/__tests__/__snapshots__/DropBoxElement.spec.js.snap +0 -95
- package/lib/DropBox/DropBoxElement/css/DropBoxElement.module.css +0 -442
- package/lib/DropBox/DropBoxElement/css/cssJSLogic.js +0 -81
- package/lib/DropBox/DropBoxElement/props/defaultProps.js +0 -25
- package/lib/DropBox/DropBoxElement/props/propTypes.js +0 -62
- package/lib/DropBox/DropBoxElement/useDropboxPosCalc.js +0 -60
- package/lib/DropBox/DropBoxPositionMapping.js +0 -149
- package/lib/DropBox/__tests__/DropBox.spec.js +0 -18
- package/lib/DropBox/__tests__/__snapshots__/DropBox.spec.js.snap +0 -36
- package/lib/DropBox/css/DropBox.module.css +0 -59
- package/lib/DropBox/css/cssJSLogic.js +0 -20
- package/lib/DropBox/props/defaultProps.js +0 -30
- package/lib/DropBox/props/propTypes.js +0 -35
- package/lib/DropBox/utils/isMobilePopover.js +0 -25
- package/lib/DropDown/DropDown.js +0 -171
- package/lib/DropDown/DropDown.module.css +0 -5
- package/lib/DropDown/DropDownHeading.js +0 -93
- package/lib/DropDown/DropDownHeading.module.css +0 -53
- package/lib/DropDown/DropDownItem.js +0 -127
- package/lib/DropDown/DropDownItem.module.css +0 -94
- package/lib/DropDown/DropDownSearch.js +0 -117
- package/lib/DropDown/DropDownSearch.module.css +0 -14
- package/lib/DropDown/DropDownSeparator.js +0 -64
- package/lib/DropDown/DropDownSeparator.module.css +0 -7
- package/lib/DropDown/__tests__/DropDown.spec.js +0 -18
- package/lib/DropDown/__tests__/DropDownHeading.spec.js +0 -18
- package/lib/DropDown/__tests__/DropDownItem.spec.js +0 -18
- package/lib/DropDown/__tests__/DropDownSearch.spec.js +0 -18
- package/lib/DropDown/__tests__/DropDownSeparator.spec.js +0 -18
- package/lib/DropDown/__tests__/__snapshots__/DropDown.spec.js.snap +0 -54
- package/lib/DropDown/__tests__/__snapshots__/DropDownHeading.spec.js.snap +0 -12
- package/lib/DropDown/__tests__/__snapshots__/DropDownItem.spec.js.snap +0 -11
- package/lib/DropDown/__tests__/__snapshots__/DropDownSearch.spec.js.snap +0 -20
- package/lib/DropDown/__tests__/__snapshots__/DropDownSeparator.spec.js.snap +0 -9
- package/lib/DropDown/index.js +0 -65
- package/lib/DropDown/props/defaultProps.js +0 -31
- package/lib/DropDown/props/propTypes.js +0 -87
- package/lib/Heading/Heading.js +0 -94
- package/lib/Heading/Heading.module.css +0 -5
- package/lib/Heading/__tests__/Heading.spec.js +0 -27
- package/lib/Heading/__tests__/__snapshots__/Heading.spec.js.snap +0 -63
- package/lib/Heading/props/defaultProps.js +0 -12
- package/lib/Heading/props/propTypes.js +0 -23
- package/lib/Label/Label.js +0 -97
- package/lib/Label/Label.module.css +0 -57
- package/lib/Label/LabelColors.module.css +0 -21
- package/lib/Label/__tests__/Label.spec.js +0 -106
- package/lib/Label/__tests__/__snapshots__/Label.spec.js.snap +0 -312
- package/lib/Label/props/defaultProps.js +0 -18
- package/lib/Label/props/propTypes.js +0 -30
- package/lib/Layout/Box.js +0 -128
- package/lib/Layout/Container.js +0 -145
- package/lib/Layout/Layout.module.css +0 -336
- package/lib/Layout/__tests__/Box.spec.js +0 -18
- package/lib/Layout/__tests__/Container.spec.js +0 -18
- package/lib/Layout/__tests__/__snapshots__/Box.spec.js.snap +0 -16
- package/lib/Layout/__tests__/__snapshots__/Container.spec.js.snap +0 -16
- package/lib/Layout/index.js +0 -23
- package/lib/Layout/props/defaultProps.js +0 -24
- package/lib/Layout/props/propTypes.js +0 -58
- package/lib/Layout/utils.js +0 -59
- package/lib/ListItem/ListContainer.js +0 -129
- package/lib/ListItem/ListItem.js +0 -204
- package/lib/ListItem/ListItem.module.css +0 -261
- package/lib/ListItem/ListItemWithAvatar.js +0 -234
- package/lib/ListItem/ListItemWithCheckBox.js +0 -195
- package/lib/ListItem/ListItemWithIcon.js +0 -213
- package/lib/ListItem/ListItemWithRadio.js +0 -198
- package/lib/ListItem/__tests__/ListContainer.spec.js +0 -26
- package/lib/ListItem/__tests__/ListItem.spec.js +0 -18
- package/lib/ListItem/__tests__/ListItemWithAvatar.spec.js +0 -53
- package/lib/ListItem/__tests__/ListItemWithCheckBox.spec.js +0 -53
- package/lib/ListItem/__tests__/ListItemWithIcon.spec.js +0 -53
- package/lib/ListItem/__tests__/ListItemWithRadio.spec.js +0 -53
- package/lib/ListItem/__tests__/__snapshots__/ListContainer.spec.js.snap +0 -27
- package/lib/ListItem/__tests__/__snapshots__/ListItem.spec.js.snap +0 -29
- package/lib/ListItem/__tests__/__snapshots__/ListItemWithAvatar.spec.js.snap +0 -222
- package/lib/ListItem/__tests__/__snapshots__/ListItemWithCheckBox.spec.js.snap +0 -492
- package/lib/ListItem/__tests__/__snapshots__/ListItemWithIcon.spec.js.snap +0 -222
- package/lib/ListItem/__tests__/__snapshots__/ListItemWithRadio.spec.js.snap +0 -487
- package/lib/ListItem/index.js +0 -55
- package/lib/ListItem/props/defaultProps.js +0 -117
- package/lib/ListItem/props/propTypes.js +0 -214
- package/lib/Modal/Modal.js +0 -236
- package/lib/Modal/Portal/Portal.js +0 -46
- package/lib/Modal/Portal/__tests__/Portal.spec.js +0 -37
- package/lib/Modal/Portal/__tests__/__snapshots__/Portal.spec.js.snap +0 -30
- package/lib/Modal/Portal/props/defaultProps.js +0 -10
- package/lib/Modal/Portal/props/propTypes.js +0 -16
- package/lib/Modal/__tests__/Modal.spec.js +0 -22
- package/lib/Modal/__tests__/__snapshots__/Modal.spec.js.snap +0 -26
- package/lib/Modal/props/defaultProps.js +0 -10
- package/lib/Modal/props/propTypes.js +0 -18
- package/lib/MultiSelect/AdvancedGroupMultiSelect.js +0 -1198
- package/lib/MultiSelect/AdvancedMultiSelect.js +0 -673
- package/lib/MultiSelect/EmptyState.js +0 -114
- package/lib/MultiSelect/MobileHeader/MobileHeader.js +0 -62
- package/lib/MultiSelect/MobileHeader/MobileHeader.module.css +0 -16
- package/lib/MultiSelect/MobileHeader/__tests__/MobileHeader.spec.js +0 -18
- package/lib/MultiSelect/MobileHeader/__tests__/__snapshots__/MobileHeader.spec.js.snap +0 -39
- package/lib/MultiSelect/MobileHeader/props/defaultProps.js +0 -14
- package/lib/MultiSelect/MobileHeader/props/propTypes.js +0 -18
- package/lib/MultiSelect/MultiSelect.js +0 -1269
- package/lib/MultiSelect/MultiSelect.module.css +0 -216
- package/lib/MultiSelect/MultiSelectHeader.js +0 -78
- package/lib/MultiSelect/MultiSelectWithAvatar.js +0 -276
- package/lib/MultiSelect/SelectedOptions.js +0 -132
- package/lib/MultiSelect/SelectedOptions.module.css +0 -15
- package/lib/MultiSelect/Suggestions.js +0 -279
- package/lib/MultiSelect/__tests__/AdvancedGroupMultiSelect.spec.js +0 -20
- package/lib/MultiSelect/__tests__/AdvancedMultiSelect.spec.js +0 -56
- package/lib/MultiSelect/__tests__/EmptyState.spec.js +0 -22
- package/lib/MultiSelect/__tests__/MultiSelect.spec.js +0 -43
- package/lib/MultiSelect/__tests__/MultiSelectHeader.spec.js +0 -28
- package/lib/MultiSelect/__tests__/MultiSelectWithAvatar.spec.js +0 -18
- package/lib/MultiSelect/__tests__/SelectedOptions.spec.js +0 -35
- package/lib/MultiSelect/__tests__/Suggestions.spec.js +0 -78
- package/lib/MultiSelect/__tests__/__snapshots__/AdvancedGroupMultiSelect.spec.js.snap +0 -74
- package/lib/MultiSelect/__tests__/__snapshots__/AdvancedMultiSelect.spec.js.snap +0 -534
- package/lib/MultiSelect/__tests__/__snapshots__/EmptyState.spec.js.snap +0 -12
- package/lib/MultiSelect/__tests__/__snapshots__/MultiSelect.spec.js.snap +0 -339
- package/lib/MultiSelect/__tests__/__snapshots__/MultiSelectHeader.spec.js.snap +0 -63
- package/lib/MultiSelect/__tests__/__snapshots__/MultiSelectWithAvatar.spec.js.snap +0 -85
- package/lib/MultiSelect/__tests__/__snapshots__/SelectedOptions.spec.js.snap +0 -80
- package/lib/MultiSelect/__tests__/__snapshots__/Suggestions.spec.js.snap +0 -363
- package/lib/MultiSelect/constants.js +0 -13
- package/lib/MultiSelect/index.js +0 -39
- package/lib/MultiSelect/props/defaultProps.js +0 -189
- package/lib/MultiSelect/props/propTypes.js +0 -325
- package/lib/PopOver/PopOver.js +0 -293
- package/lib/PopOver/PopOver.module.css +0 -9
- package/lib/PopOver/__tests__/PopOver.spec.js +0 -18
- package/lib/PopOver/__tests__/__snapshots__/PopOver.spec.js.snap +0 -13
- package/lib/PopOver/index.js +0 -31
- package/lib/PopOver/props/defaultProps.js +0 -15
- package/lib/PopOver/props/propTypes.js +0 -66
- package/lib/Popup/Popup.js +0 -1169
- package/lib/Popup/PositionMapping.js +0 -81
- package/lib/Popup/Registry.js +0 -46
- package/lib/Popup/intersectionObserver.js +0 -72
- package/lib/Popup/props/propTypes.js +0 -51
- package/lib/Popup/viewPort.js +0 -367
- package/lib/Provider/AvatarSize.js +0 -24
- package/lib/Provider/Config.js +0 -30
- package/lib/Provider/CssProvider.js +0 -27
- package/lib/Provider/IdProvider.js +0 -80
- package/lib/Provider/LibraryContext.js +0 -94
- package/lib/Provider/LibraryContextInit.js +0 -15
- package/lib/Provider/NumberGenerator/NumberGenerator.js +0 -174
- package/lib/Provider/ZindexProvider.js +0 -69
- package/lib/Provider/index.js +0 -81
- package/lib/Radio/Radio.js +0 -189
- package/lib/Radio/Radio.module.css +0 -115
- package/lib/Radio/__tests__/Radio.spec.js +0 -246
- package/lib/Radio/__tests__/__snapshots__/Radio.spec.js.snap +0 -1916
- package/lib/Radio/props/defaultProps.js +0 -22
- package/lib/Radio/props/propTypes.js +0 -52
- package/lib/Responsive/CustomResponsive.js +0 -242
- package/lib/Responsive/RefWrapper.js +0 -56
- package/lib/Responsive/ResizeComponent.js +0 -268
- package/lib/Responsive/ResizeObserver.js +0 -100
- package/lib/Responsive/ResizeObserverWithPolyfill.js +0 -168
- package/lib/Responsive/Responsive.js +0 -274
- package/lib/Responsive/index.js +0 -55
- package/lib/Responsive/props/defaultProps.js +0 -23
- package/lib/Responsive/props/propTypes.js +0 -39
- package/lib/Responsive/sizeObservers.js +0 -214
- package/lib/Responsive/utils/index.js +0 -70
- package/lib/Responsive/utils/shallowCompare.js +0 -38
- package/lib/Responsive/windowResizeObserver.js +0 -63
- package/lib/ResponsiveDropBox/ResponsiveDropBox.js +0 -124
- package/lib/ResponsiveDropBox/ResponsiveDropBox.module.css +0 -6
- package/lib/ResponsiveDropBox/__tests__/ResponsiveDropBox.spec.js +0 -18
- package/lib/ResponsiveDropBox/__tests__/__snapshots__/ResponsiveDropBox.spec.js.snap +0 -42
- package/lib/ResponsiveDropBox/props/defaultProps.js +0 -11
- package/lib/ResponsiveDropBox/props/propTypes.js +0 -27
- package/lib/Ribbon/Ribbon.js +0 -98
- package/lib/Ribbon/Ribbon.module.css +0 -500
- package/lib/Ribbon/__tests__/Ribbon.spec.js +0 -59
- package/lib/Ribbon/__tests__/__snapshots__/Ribbon.spec.js.snap +0 -374
- package/lib/Ribbon/props/defaultProps.js +0 -16
- package/lib/Ribbon/props/propTypes.js +0 -22
- package/lib/RippleEffect/RippleEffect.js +0 -45
- package/lib/RippleEffect/RippleEffect.module.css +0 -109
- package/lib/RippleEffect/__tests__/RippleEffect.spec.js +0 -76
- package/lib/RippleEffect/__tests__/__snapshots__/RippleEffect.spec.js.snap +0 -161
- package/lib/RippleEffect/props/defaultProps.js +0 -17
- package/lib/RippleEffect/props/propTypes.js +0 -23
- package/lib/Select/GroupSelect.js +0 -901
- package/lib/Select/Select.js +0 -1067
- package/lib/Select/Select.module.css +0 -138
- package/lib/Select/SelectWithAvatar.js +0 -408
- package/lib/Select/SelectWithIcon.js +0 -632
- package/lib/Select/__tests__/GroupSelect.spec.js +0 -27
- package/lib/Select/__tests__/Select.spec.js +0 -1398
- package/lib/Select/__tests__/SelectWithAvatar.spec.js +0 -20
- package/lib/Select/__tests__/SelectWithIcon.spec.js +0 -20
- package/lib/Select/__tests__/__snapshots__/GroupSelect.spec.js.snap +0 -90
- package/lib/Select/__tests__/__snapshots__/Select.spec.js.snap +0 -10446
- package/lib/Select/__tests__/__snapshots__/SelectWithAvatar.spec.js.snap +0 -45
- package/lib/Select/__tests__/__snapshots__/SelectWithIcon.spec.js.snap +0 -108
- package/lib/Select/index.js +0 -39
- package/lib/Select/props/defaultProps.js +0 -129
- package/lib/Select/props/propTypes.js +0 -333
- package/lib/Stencils/Stencils.js +0 -72
- package/lib/Stencils/Stencils.module.css +0 -100
- package/lib/Stencils/__tests__/Stencils.spec.js +0 -61
- package/lib/Stencils/__tests__/__snapshots__/Stencils.spec.js.snap +0 -105
- package/lib/Stencils/props/defaultProps.js +0 -14
- package/lib/Stencils/props/propTypes.js +0 -19
- package/lib/Switch/Switch.js +0 -152
- package/lib/Switch/Switch.module.css +0 -128
- package/lib/Switch/__tests__/Switch.spec.js +0 -163
- package/lib/Switch/__tests__/__snapshots__/Switch.spec.js.snap +0 -831
- package/lib/Switch/props/defaultProps.js +0 -18
- package/lib/Switch/props/propTypes.js +0 -39
- package/lib/Tab/Tab.js +0 -134
- package/lib/Tab/Tab.module.css +0 -100
- package/lib/Tab/TabContent.js +0 -42
- package/lib/Tab/TabContent.module.css +0 -4
- package/lib/Tab/TabContentWrapper.js +0 -47
- package/lib/Tab/TabWrapper.js +0 -91
- package/lib/Tab/Tabs.js +0 -787
- package/lib/Tab/Tabs.module.css +0 -167
- package/lib/Tab/__tests__/Tab.spec.js +0 -18
- package/lib/Tab/__tests__/TabContent.spec.js +0 -18
- package/lib/Tab/__tests__/TabContentWrapper.spec.js +0 -18
- package/lib/Tab/__tests__/TabLayout.spec.js +0 -41
- package/lib/Tab/__tests__/TabWrapper.spec.js +0 -18
- package/lib/Tab/__tests__/Tabs.spec.js +0 -18
- package/lib/Tab/__tests__/__snapshots__/Tab.spec.js.snap +0 -22
- package/lib/Tab/__tests__/__snapshots__/TabContent.spec.js.snap +0 -19
- package/lib/Tab/__tests__/__snapshots__/TabContentWrapper.spec.js.snap +0 -12
- package/lib/Tab/__tests__/__snapshots__/TabLayout.spec.js.snap +0 -341
- package/lib/Tab/__tests__/__snapshots__/TabWrapper.spec.js.snap +0 -20
- package/lib/Tab/__tests__/__snapshots__/Tabs.spec.js.snap +0 -33
- package/lib/Tab/index.js +0 -47
- package/lib/Tab/props/defaultProps.js +0 -62
- package/lib/Tab/props/propTypes.js +0 -132
- package/lib/Tab/utils/tabConfigs.js +0 -27
- package/lib/Tag/Tag.js +0 -219
- package/lib/Tag/Tag.module.css +0 -254
- package/lib/Tag/__tests__/Tag.spec.js +0 -270
- package/lib/Tag/__tests__/__snapshots__/Tag.spec.js.snap +0 -3074
- package/lib/Tag/props/defaultProps.js +0 -23
- package/lib/Tag/props/propTypes.js +0 -55
- package/lib/TextBox/TextBox.js +0 -233
- package/lib/TextBox/TextBox.module.css +0 -197
- package/lib/TextBox/__tests__/TextBox.spec.js +0 -334
- package/lib/TextBox/__tests__/__snapshots__/TextBox.spec.js.snap +0 -615
- package/lib/TextBox/props/defaultProps.js +0 -27
- package/lib/TextBox/props/propTypes.js +0 -64
- package/lib/TextBoxIcon/TextBoxIcon.js +0 -253
- package/lib/TextBoxIcon/TextBoxIcon.module.css +0 -79
- package/lib/TextBoxIcon/__tests__/TextBoxIcon.spec.js +0 -279
- package/lib/TextBoxIcon/__tests__/__snapshots__/TextBoxIcon.spec.js.snap +0 -1784
- package/lib/TextBoxIcon/props/defaultProps.js +0 -31
- package/lib/TextBoxIcon/props/propTypes.js +0 -74
- package/lib/Textarea/Textarea.js +0 -168
- package/lib/Textarea/Textarea.module.css +0 -148
- package/lib/Textarea/__tests__/Textarea.spec.js +0 -273
- package/lib/Textarea/__tests__/__snapshots__/Textarea.spec.js.snap +0 -525
- package/lib/Textarea/props/defaultProps.js +0 -25
- package/lib/Textarea/props/propTypes.js +0 -46
- package/lib/Tooltip/Tooltip.js +0 -599
- package/lib/Tooltip/Tooltip.module.css +0 -133
- package/lib/Tooltip/props/defaultProps.js +0 -11
- package/lib/Tooltip/props/propTypes.js +0 -16
- package/lib/Typography/Typography.js +0 -56
- package/lib/Typography/css/Typography.module.css +0 -489
- package/lib/Typography/css/cssJSLogic.js +0 -48
- package/lib/Typography/props/defaultProps.js +0 -15
- package/lib/Typography/props/propTypes.js +0 -38
- package/lib/Typography/utils/index.js +0 -59
- package/lib/VelocityAnimation/VelocityAnimation/VelocityAnimation.js +0 -126
- package/lib/VelocityAnimation/VelocityAnimation/__tests__/VelocityAnimation.spec.js +0 -18
- package/lib/VelocityAnimation/VelocityAnimation/__tests__/__snapshots__/VelocityAnimation.spec.js.snap +0 -9
- package/lib/VelocityAnimation/VelocityAnimation/props/defaultProps.js +0 -14
- package/lib/VelocityAnimation/VelocityAnimation/props/propTypes.js +0 -23
- package/lib/VelocityAnimation/VelocityAnimationGroup/VelocityAnimationGroup.js +0 -216
- package/lib/VelocityAnimation/VelocityAnimationGroup/__tests__/VelocityAnimationGroup.spec.js +0 -26
- package/lib/VelocityAnimation/VelocityAnimationGroup/__tests__/__snapshots__/VelocityAnimationGroup.spec.js.snap +0 -11
- package/lib/VelocityAnimation/VelocityAnimationGroup/props/defaultProps.js +0 -22
- package/lib/VelocityAnimation/VelocityAnimationGroup/props/propTypes.js +0 -33
- package/lib/VelocityAnimation/index.js +0 -23
- package/lib/common/a11y.module.css +0 -4
- package/lib/common/animation.module.css +0 -624
- package/lib/common/avatarsizes.module.css +0 -49
- package/lib/common/basic.module.css +0 -31
- package/lib/common/basicReset.module.css +0 -40
- package/lib/common/boxShadow.module.css +0 -34
- package/lib/common/common.module.css +0 -559
- package/lib/common/customscroll.module.css +0 -142
- package/lib/common/reset.module.css +0 -13
- package/lib/common/transition.module.css +0 -146
- package/lib/components_layer.module.css +0 -1
- package/lib/css.js +0 -83
- package/lib/deprecated/PortalLayer/PortalLayer.js +0 -153
- package/lib/deprecated/PortalLayer/props/defaultProps.js +0 -12
- package/lib/deprecated/PortalLayer/props/propTypes.js +0 -32
- package/lib/deprecated/Switch/Switch.js +0 -108
- package/lib/deprecated/Switch/props/defaultProps.js +0 -18
- package/lib/deprecated/Switch/props/propTypes.js +0 -39
- package/lib/index.js +0 -417
- package/lib/semantic/Button/Button.js +0 -104
- package/lib/semantic/Button/__tests__/Button.spec.js +0 -18
- package/lib/semantic/Button/__tests__/__snapshots__/Button.spec.js.snap +0 -15
- package/lib/semantic/Button/props/defaultProps.js +0 -19
- package/lib/semantic/Button/props/propTypes.js +0 -33
- package/lib/semantic/Button/semanticButton.module.css +0 -9
- package/lib/semantic/index.js +0 -15
- package/lib/utils/Common.js +0 -521
- package/lib/utils/ContextOptimizer.js +0 -49
- package/lib/utils/constant.js +0 -10
- package/lib/utils/constructFullName.js +0 -34
- package/lib/utils/cssUtils.js +0 -22
- package/lib/utils/datetime/GMTZones.js +0 -55
- package/lib/utils/datetime/common.js +0 -251
- package/lib/utils/debounce.js +0 -30
- package/lib/utils/dropDownUtils.js +0 -691
- package/lib/utils/dummyFunction.js +0 -10
- package/lib/utils/getHTMLFontSize.js +0 -11
- package/lib/utils/getInitial.js +0 -33
- package/lib/utils/index.js +0 -103
- package/lib/utils/scrollTo.js +0 -22
- package/lib/utils/shallowEqual.js +0 -41
- package/lib/v1/Accordion/Accordion.js +0 -98
- package/lib/v1/Accordion/AccordionItem.js +0 -68
- package/lib/v1/Accordion/index.js +0 -23
- package/lib/v1/Accordion/props/defaultProps.js +0 -20
- package/lib/v1/Accordion/props/propTypes.js +0 -45
- package/lib/v1/Animation/Animation.js +0 -61
- package/lib/v1/Animation/props/defaultProps.js +0 -14
- package/lib/v1/Animation/props/propTypes.js +0 -23
- package/lib/v1/Animation/utils.js +0 -94
- package/lib/v1/AppContainer/AppContainer.js +0 -146
- package/lib/v1/AppContainer/props/defaultProps.js +0 -17
- package/lib/v1/AppContainer/props/propTypes.js +0 -28
- package/lib/v1/Avatar/Avatar.js +0 -191
- package/lib/v1/Avatar/props/defaultProps.js +0 -24
- package/lib/v1/Avatar/props/propTypes.js +0 -37
- package/lib/v1/AvatarTeam/AvatarTeam.js +0 -81
- package/lib/v1/AvatarTeam/props/defaultProps.js +0 -24
- package/lib/v1/AvatarTeam/props/propTypes.js +0 -38
- package/lib/v1/Button/Button.js +0 -82
- package/lib/v1/Button/props/defaultProps.js +0 -27
- package/lib/v1/Button/props/propTypes.js +0 -40
- package/lib/v1/Buttongroup/Buttongroup.js +0 -44
- package/lib/v1/Buttongroup/props/defaultProps.js +0 -13
- package/lib/v1/Buttongroup/props/propTypes.js +0 -20
- package/lib/v1/Card/Card.js +0 -269
- package/lib/v1/Card/index.js +0 -37
- package/lib/v1/Card/props/defaultProps.js +0 -35
- package/lib/v1/Card/props/propTypes.js +0 -62
- package/lib/v1/CheckBox/CheckBox.js +0 -172
- package/lib/v1/CheckBox/props/defaultProps.js +0 -25
- package/lib/v1/CheckBox/props/propTypes.js +0 -52
- package/lib/v1/DateTime/CalendarView.js +0 -322
- package/lib/v1/DateTime/DateTime.js +0 -877
- package/lib/v1/DateTime/DateTimePopupFooter.js +0 -96
- package/lib/v1/DateTime/DateTimePopupHeader.js +0 -166
- package/lib/v1/DateTime/DateWidget.js +0 -1163
- package/lib/v1/DateTime/DaysRow.js +0 -81
- package/lib/v1/DateTime/Time.js +0 -270
- package/lib/v1/DateTime/YearView.js +0 -325
- package/lib/v1/DateTime/index.js +0 -15
- package/lib/v1/DateTime/props/defaultProps.js +0 -76
- package/lib/v1/DateTime/props/propTypes.js +0 -238
- package/lib/v1/DropBox/DropBox.js +0 -109
- package/lib/v1/DropBox/DropBoxElement/DropBoxElement.js +0 -146
- package/lib/v1/DropBox/DropBoxElement/props/defaultProps.js +0 -25
- package/lib/v1/DropBox/DropBoxElement/props/propTypes.js +0 -62
- package/lib/v1/DropBox/props/defaultProps.js +0 -30
- package/lib/v1/DropBox/props/propTypes.js +0 -35
- package/lib/v1/DropBox/utils/isMobilePopover.js +0 -25
- package/lib/v1/DropDown/DropDown.js +0 -74
- package/lib/v1/DropDown/DropDownHeading.js +0 -47
- package/lib/v1/DropDown/DropDownItem.js +0 -75
- package/lib/v1/DropDown/DropDownSearch.js +0 -77
- package/lib/v1/DropDown/DropDownSeparator.js +0 -24
- package/lib/v1/DropDown/props/defaultProps.js +0 -31
- package/lib/v1/DropDown/props/propTypes.js +0 -87
- package/lib/v1/Heading/Heading.js +0 -53
- package/lib/v1/Heading/props/defaultProps.js +0 -12
- package/lib/v1/Heading/props/propTypes.js +0 -23
- package/lib/v1/Label/Label.js +0 -51
- package/lib/v1/Label/props/defaultProps.js +0 -18
- package/lib/v1/Label/props/propTypes.js +0 -30
- package/lib/v1/Layout/Box.js +0 -128
- package/lib/v1/Layout/Container.js +0 -145
- package/lib/v1/Layout/index.js +0 -23
- package/lib/v1/Layout/props/defaultProps.js +0 -24
- package/lib/v1/Layout/props/propTypes.js +0 -58
- package/lib/v1/ListItem/ListContainer.js +0 -128
- package/lib/v1/ListItem/ListItem.js +0 -138
- package/lib/v1/ListItem/ListItemWithAvatar.js +0 -167
- package/lib/v1/ListItem/ListItemWithCheckBox.js +0 -126
- package/lib/v1/ListItem/ListItemWithIcon.js +0 -143
- package/lib/v1/ListItem/ListItemWithRadio.js +0 -127
- package/lib/v1/ListItem/index.js +0 -55
- package/lib/v1/ListItem/props/defaultProps.js +0 -109
- package/lib/v1/ListItem/props/propTypes.js +0 -196
- package/lib/v1/Modal/Modal.js +0 -166
- package/lib/v1/Modal/props/defaultProps.js +0 -10
- package/lib/v1/Modal/props/propTypes.js +0 -18
- package/lib/v1/MultiSelect/AdvancedGroupMultiSelect.js +0 -1180
- package/lib/v1/MultiSelect/AdvancedMultiSelect.js +0 -649
- package/lib/v1/MultiSelect/EmptyState.js +0 -112
- package/lib/v1/MultiSelect/MobileHeader/MobileHeader.js +0 -62
- package/lib/v1/MultiSelect/MobileHeader/props/defaultProps.js +0 -14
- package/lib/v1/MultiSelect/MobileHeader/props/propTypes.js +0 -18
- package/lib/v1/MultiSelect/MultiSelect.js +0 -1202
- package/lib/v1/MultiSelect/MultiSelectHeader.js +0 -78
- package/lib/v1/MultiSelect/MultiSelectWithAvatar.js +0 -262
- package/lib/v1/MultiSelect/SelectedOptions.js +0 -130
- package/lib/v1/MultiSelect/Suggestions.js +0 -196
- package/lib/v1/MultiSelect/index.js +0 -39
- package/lib/v1/MultiSelect/props/defaultProps.js +0 -181
- package/lib/v1/MultiSelect/props/propTypes.js +0 -350
- package/lib/v1/PopOver/PopOver.js +0 -197
- package/lib/v1/PopOver/props/defaultProps.js +0 -15
- package/lib/v1/PopOver/props/propTypes.js +0 -66
- package/lib/v1/Popup/Popup.js +0 -715
- package/lib/v1/Radio/Radio.js +0 -141
- package/lib/v1/Radio/props/defaultProps.js +0 -22
- package/lib/v1/Radio/props/propTypes.js +0 -51
- package/lib/v1/ResponsiveDropBox/ResponsiveDropBox.js +0 -79
- package/lib/v1/ResponsiveDropBox/props/defaultProps.js +0 -11
- package/lib/v1/ResponsiveDropBox/props/propTypes.js +0 -27
- package/lib/v1/Ribbon/Ribbon.js +0 -44
- package/lib/v1/Ribbon/props/defaultProps.js +0 -16
- package/lib/v1/Ribbon/props/propTypes.js +0 -22
- package/lib/v1/RippleEffect/RippleEffect.js +0 -40
- package/lib/v1/RippleEffect/props/defaultProps.js +0 -17
- package/lib/v1/RippleEffect/props/propTypes.js +0 -23
- package/lib/v1/Select/GroupSelect.js +0 -894
- package/lib/v1/Select/Select.js +0 -1025
- package/lib/v1/Select/SelectWithAvatar.js +0 -406
- package/lib/v1/Select/SelectWithIcon.js +0 -607
- package/lib/v1/Select/index.js +0 -39
- package/lib/v1/Select/props/defaultProps.js +0 -125
- package/lib/v1/Select/props/propTypes.js +0 -319
- package/lib/v1/Stencils/Stencils.js +0 -43
- package/lib/v1/Stencils/props/defaultProps.js +0 -13
- package/lib/v1/Stencils/props/propTypes.js +0 -18
- package/lib/v1/Switch/Switch.js +0 -159
- package/lib/v1/Switch/__tests__/Switch.spec.js +0 -37
- package/lib/v1/Switch/__tests__/__snapshots__/Switch.spec.js.snap +0 -135
- package/lib/v1/Switch/contants/index.js +0 -34
- package/lib/v1/Switch/css/Switch_v1.module.css +0 -134
- package/lib/v1/Switch/css/cssJSLogic.js +0 -37
- package/lib/v1/Switch/props/defaultProps.js +0 -18
- package/lib/v1/Switch/props/propTypes.js +0 -47
- package/lib/v1/Switch/useSwitch.js +0 -56
- package/lib/v1/Tab/Tab.js +0 -132
- package/lib/v1/Tab/TabContent.js +0 -42
- package/lib/v1/Tab/TabContentWrapper.js +0 -47
- package/lib/v1/Tab/TabWrapper.js +0 -89
- package/lib/v1/Tab/Tabs.js +0 -688
- package/lib/v1/Tab/index.js +0 -47
- package/lib/v1/Tab/props/defaultProps.js +0 -62
- package/lib/v1/Tab/props/propTypes.js +0 -132
- package/lib/v1/Tab/v1Tab.module.css +0 -100
- package/lib/v1/Tab/v1TabContent.module.css +0 -4
- package/lib/v1/Tab/v1Tabs.module.css +0 -167
- package/lib/v1/Tag/Tag.js +0 -160
- package/lib/v1/Tag/props/defaultProps.js +0 -22
- package/lib/v1/Tag/props/propTypes.js +0 -47
- package/lib/v1/TextBox/TextBox.js +0 -175
- package/lib/v1/TextBox/props/defaultProps.js +0 -27
- package/lib/v1/TextBox/props/propTypes.js +0 -62
- package/lib/v1/TextBoxIcon/TextBoxIcon.js +0 -206
- package/lib/v1/TextBoxIcon/props/defaultProps.js +0 -31
- package/lib/v1/TextBoxIcon/props/propTypes.js +0 -72
- package/lib/v1/Textarea/Textarea.js +0 -118
- package/lib/v1/Textarea/props/defaultProps.js +0 -24
- package/lib/v1/Textarea/props/propTypes.js +0 -42
- package/lib/v1/Tooltip/Tooltip.js +0 -599
- package/lib/v1/Tooltip/props/defaultProps.js +0 -11
- package/lib/v1/Tooltip/props/propTypes.js +0 -16
- package/lib/v1/Typography/Typography.js +0 -56
- package/lib/v1/Typography/css/cssJSLogic.js +0 -48
- package/lib/v1/Typography/css/v1_Typography.module.css +0 -380
- package/lib/v1/Typography/props/defaultProps.js +0 -15
- package/lib/v1/Typography/props/propTypes.js +0 -38
- package/lib/v1/Typography/utils/index.js +0 -59
- package/lib/v1/VelocityAnimation/VelocityAnimation/VelocityAnimation.js +0 -90
- package/lib/v1/VelocityAnimation/VelocityAnimation/props/defaultProps.js +0 -14
- package/lib/v1/VelocityAnimation/VelocityAnimation/props/propTypes.js +0 -23
- package/lib/v1/VelocityAnimation/VelocityAnimationGroup/VelocityAnimationGroup.js +0 -126
- package/lib/v1/VelocityAnimation/VelocityAnimationGroup/props/defaultProps.js +0 -22
- package/lib/v1/VelocityAnimation/VelocityAnimationGroup/props/propTypes.js +0 -30
- package/lib/v1/semantic/Button/Button.js +0 -63
- package/lib/v1/semantic/Button/props/defaultProps.js +0 -19
- package/lib/v1/semantic/Button/props/propTypes.js +0 -33
- package/lib/v1/semantic/index.js +0 -15
package/lib/Popup/Popup.js
DELETED
|
@@ -1,1169 +0,0 @@
|
|
|
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 _hoistNonReactStatics = _interopRequireDefault(require("hoist-non-react-statics"));
|
|
13
|
-
|
|
14
|
-
var _propTypes = require("./props/propTypes");
|
|
15
|
-
|
|
16
|
-
var _Common = require("../utils/Common.js");
|
|
17
|
-
|
|
18
|
-
var _viewPort = _interopRequireDefault(require("./viewPort"));
|
|
19
|
-
|
|
20
|
-
var _PositionMapping = require("./PositionMapping.js");
|
|
21
|
-
|
|
22
|
-
var _ResizeObserver = _interopRequireDefault(require("@zohodesk/virtualizer/lib/commons/ResizeObserver.js"));
|
|
23
|
-
|
|
24
|
-
var _intersectionObserver = require("./intersectionObserver");
|
|
25
|
-
|
|
26
|
-
var _DropBoxPositionMapping = require("../DropBox/DropBoxPositionMapping.js");
|
|
27
|
-
|
|
28
|
-
var _isMobilePopover = _interopRequireDefault(require("../DropBox/utils/isMobilePopover.js"));
|
|
29
|
-
|
|
30
|
-
var _selectn = _interopRequireDefault(require("selectn"));
|
|
31
|
-
|
|
32
|
-
var _Registry = _interopRequireDefault(require("./Registry.js"));
|
|
33
|
-
|
|
34
|
-
var _excluded = ["isMobile"];
|
|
35
|
-
|
|
36
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
37
|
-
|
|
38
|
-
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
39
|
-
|
|
40
|
-
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
41
|
-
|
|
42
|
-
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
43
|
-
|
|
44
|
-
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
|
|
45
|
-
|
|
46
|
-
function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
47
|
-
|
|
48
|
-
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); }
|
|
49
|
-
|
|
50
|
-
function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
51
|
-
|
|
52
|
-
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
|
|
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 _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
57
|
-
|
|
58
|
-
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); } }
|
|
59
|
-
|
|
60
|
-
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
|
61
|
-
|
|
62
|
-
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); }
|
|
63
|
-
|
|
64
|
-
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
65
|
-
|
|
66
|
-
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); }; }
|
|
67
|
-
|
|
68
|
-
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); }
|
|
69
|
-
|
|
70
|
-
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
71
|
-
|
|
72
|
-
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; } }
|
|
73
|
-
|
|
74
|
-
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
75
|
-
|
|
76
|
-
global.closeGroupPopups = function (groupName) {
|
|
77
|
-
var groupPopups = _Registry["default"].popups[groupName] || [];
|
|
78
|
-
groupPopups.forEach(function (popup) {
|
|
79
|
-
popup.state.isPopupOpen && popup.setState({
|
|
80
|
-
isPopupOpen: false,
|
|
81
|
-
isPopupReady: false
|
|
82
|
-
});
|
|
83
|
-
});
|
|
84
|
-
};
|
|
85
|
-
|
|
86
|
-
var defaultState = {
|
|
87
|
-
position: 'bottomCenter',
|
|
88
|
-
height: '0px',
|
|
89
|
-
positions: {},
|
|
90
|
-
//{bottomCenter: true, bottomLeft: false, ...}
|
|
91
|
-
positionsOffset: {},
|
|
92
|
-
//{bottomCenter: {left: ‘’,top: ‘’ }, .....}
|
|
93
|
-
targetOffset: {},
|
|
94
|
-
//{height: ‘’, width: ‘’,}
|
|
95
|
-
popupOffset: {},
|
|
96
|
-
//{height: ‘’, width: ‘’,}
|
|
97
|
-
isAbsolutePositioningNeeded: true
|
|
98
|
-
};
|
|
99
|
-
var SCROLL_BLOCK_EVENTS = Object.freeze([{
|
|
100
|
-
name: 'wheel',
|
|
101
|
-
handlerName: 'handleBlockScroll',
|
|
102
|
-
options: {
|
|
103
|
-
capture: true,
|
|
104
|
-
passive: false
|
|
105
|
-
}
|
|
106
|
-
}, {
|
|
107
|
-
name: 'touchmove',
|
|
108
|
-
handlerName: 'handleBlockScroll',
|
|
109
|
-
options: {
|
|
110
|
-
capture: true,
|
|
111
|
-
passive: false
|
|
112
|
-
}
|
|
113
|
-
}, {
|
|
114
|
-
name: 'scroll',
|
|
115
|
-
handlerName: 'handlePositionChange',
|
|
116
|
-
options: {
|
|
117
|
-
capture: true,
|
|
118
|
-
passive: false
|
|
119
|
-
}
|
|
120
|
-
}, {
|
|
121
|
-
name: 'keydown',
|
|
122
|
-
handlerName: 'preventKeyboardScroll',
|
|
123
|
-
options: {
|
|
124
|
-
capture: true,
|
|
125
|
-
passive: false
|
|
126
|
-
}
|
|
127
|
-
}]);
|
|
128
|
-
var IFRAME_SCROLL_BLOCK_EVENTS = Object.freeze(SCROLL_BLOCK_EVENTS.filter(function (event) {
|
|
129
|
-
return event.name !== 'keydown';
|
|
130
|
-
}));
|
|
131
|
-
var CLICK_EVENTS = Object.freeze([{
|
|
132
|
-
name: 'click',
|
|
133
|
-
handlerName: 'documentClickHandler',
|
|
134
|
-
options: {
|
|
135
|
-
capture: false,
|
|
136
|
-
passive: false
|
|
137
|
-
}
|
|
138
|
-
}, {
|
|
139
|
-
name: 'click',
|
|
140
|
-
handlerName: 'documentClickHandler1',
|
|
141
|
-
options: {
|
|
142
|
-
capture: true,
|
|
143
|
-
passive: false
|
|
144
|
-
}
|
|
145
|
-
}]);
|
|
146
|
-
/* eslint-disable react/no-deprecated */
|
|
147
|
-
|
|
148
|
-
/* eslint-disable react/prop-types */
|
|
149
|
-
|
|
150
|
-
var Popup = function Popup(Component) {
|
|
151
|
-
var group = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'global';
|
|
152
|
-
var needResizeHandling = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true;
|
|
153
|
-
|
|
154
|
-
var _ref = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {},
|
|
155
|
-
_ref$isAbsolutePositi = _ref.isAbsolutePositioningNeeded,
|
|
156
|
-
isAbsolutePopup = _ref$isAbsolutePositi === void 0 ? true : _ref$isAbsolutePositi,
|
|
157
|
-
_ref$isArrow = _ref.isArrow,
|
|
158
|
-
needPopupArrow = _ref$isArrow === void 0 ? false : _ref$isArrow,
|
|
159
|
-
_ref$customOrder = _ref.customOrder,
|
|
160
|
-
customPositionOrder = _ref$customOrder === void 0 ? [] : _ref$customOrder,
|
|
161
|
-
_ref$scrollDebounceTi = _ref.scrollDebounceTime,
|
|
162
|
-
popupScrollDebounceTime = _ref$scrollDebounceTi === void 0 ? 0 : _ref$scrollDebounceTi,
|
|
163
|
-
_ref$closeOnScroll = _ref.closeOnScroll,
|
|
164
|
-
closeOnScrollPopup = _ref$closeOnScroll === void 0 ? false : _ref$closeOnScroll,
|
|
165
|
-
_ref$isOutsideScrollB = _ref.isOutsideScrollBlocked,
|
|
166
|
-
isOutsideScrollBlock = _ref$isOutsideScrollB === void 0 ? false : _ref$isOutsideScrollB;
|
|
167
|
-
|
|
168
|
-
var Popup = /*#__PURE__*/function (_React$Component) {
|
|
169
|
-
_inherits(Popup, _React$Component);
|
|
170
|
-
|
|
171
|
-
var _super = _createSuper(Popup);
|
|
172
|
-
|
|
173
|
-
function Popup(props) {
|
|
174
|
-
var _this;
|
|
175
|
-
|
|
176
|
-
_classCallCheck(this, Popup);
|
|
177
|
-
|
|
178
|
-
_this = _super.call(this, props);
|
|
179
|
-
_this.state = {
|
|
180
|
-
isPopupOpen: props.isPopupOpen || false,
|
|
181
|
-
position: 'bottomCenter',
|
|
182
|
-
height: '0px',
|
|
183
|
-
isPopupReady: props.isPopupOpen || false,
|
|
184
|
-
positions: {},
|
|
185
|
-
//{bottomCenter: true, bottomLeft: false, ...}
|
|
186
|
-
positionsOffset: {},
|
|
187
|
-
//{bottomCenter: {left: ‘’,top: ‘’ }, .....}
|
|
188
|
-
targetOffset: {},
|
|
189
|
-
//{height: ‘’, width: ‘’,}
|
|
190
|
-
popupOffset: {},
|
|
191
|
-
//{height: ‘’, width: ‘’,}
|
|
192
|
-
isAbsolutePositioningNeeded: true,
|
|
193
|
-
isMobile: false
|
|
194
|
-
};
|
|
195
|
-
_this.togglePopup = _this.togglePopup.bind(_assertThisInitialized(_this));
|
|
196
|
-
_this.documentClickHandler = _this.documentClickHandler.bind(_assertThisInitialized(_this));
|
|
197
|
-
_this.documentClickHandler1 = _this.documentClickHandler1.bind(_assertThisInitialized(_this));
|
|
198
|
-
_this.removeClose = _this.removeClose.bind(_assertThisInitialized(_this));
|
|
199
|
-
_this.documentKeyupHandler = _this.documentKeyupHandler.bind(_assertThisInitialized(_this));
|
|
200
|
-
_this.openPopupOnly = _this.openPopupOnly.bind(_assertThisInitialized(_this));
|
|
201
|
-
_this.closePopupOnly = _this.closePopupOnly.bind(_assertThisInitialized(_this));
|
|
202
|
-
_this.getTargetRef = _this.getTargetRef.bind(_assertThisInitialized(_this));
|
|
203
|
-
_this.getContainerRef = _this.getContainerRef.bind(_assertThisInitialized(_this));
|
|
204
|
-
_this.handlePopupPosition = _this.handlePopupPosition.bind(_assertThisInitialized(_this));
|
|
205
|
-
_this.handleResize = (0, _Common.debounce)(_this.handleResize.bind(_assertThisInitialized(_this)), 300);
|
|
206
|
-
_this.handlePopupResize = _this.handlePopupResize.bind(_assertThisInitialized(_this));
|
|
207
|
-
_this.getIsAbsolutePopup = _this.getIsAbsolutePopup.bind(_assertThisInitialized(_this));
|
|
208
|
-
_this.getIsOutsideScrollBlocked = _this.getIsOutsideScrollBlocked.bind(_assertThisInitialized(_this));
|
|
209
|
-
_this.getNeedArrow = _this.getNeedArrow.bind(_assertThisInitialized(_this));
|
|
210
|
-
_this.getCustomPositionOrder = _this.getCustomPositionOrder.bind(_assertThisInitialized(_this));
|
|
211
|
-
_this.handleOpenPopupPositionChange = _this.handleOpenPopupPositionChange.bind(_assertThisInitialized(_this));
|
|
212
|
-
_this.getScrollDebounceTime = _this.getScrollDebounceTime.bind(_assertThisInitialized(_this));
|
|
213
|
-
_this.getCloseOnScrollPopup = _this.getCloseOnScrollPopup.bind(_assertThisInitialized(_this));
|
|
214
|
-
_this.handleCloseLastOpenedGroup = _this.handleCloseLastOpenedGroup.bind(_assertThisInitialized(_this));
|
|
215
|
-
_this.handleDocumentMouseDown = _this.handleDocumentMouseDown.bind(_assertThisInitialized(_this));
|
|
216
|
-
_this.handleDocumentFocus = _this.handleDocumentFocus.bind(_assertThisInitialized(_this));
|
|
217
|
-
_this.handleGetNeedPrevent = _this.handleGetNeedPrevent.bind(_assertThisInitialized(_this));
|
|
218
|
-
_this.handleBlockScroll = _this.handleBlockScroll.bind(_assertThisInitialized(_this));
|
|
219
|
-
_this.handlePositionChange = _this.handlePositionChange.bind(_assertThisInitialized(_this));
|
|
220
|
-
_this.preventKeyboardScroll = _this.preventKeyboardScroll.bind(_assertThisInitialized(_this));
|
|
221
|
-
_this.updateListeners = _this.updateListeners.bind(_assertThisInitialized(_this));
|
|
222
|
-
_this.addScrollBlockListeners = _this.addScrollBlockListeners.bind(_assertThisInitialized(_this));
|
|
223
|
-
_this.removeScrollBlockListeners = _this.removeScrollBlockListeners.bind(_assertThisInitialized(_this));
|
|
224
|
-
_this.addScrollToUpdateListeners = _this.addScrollToUpdateListeners.bind(_assertThisInitialized(_this));
|
|
225
|
-
_this.removeScrollToUpdateListeners = _this.removeScrollToUpdateListeners.bind(_assertThisInitialized(_this));
|
|
226
|
-
_this.handleAddingScrollBlock = _this.handleAddingScrollBlock.bind(_assertThisInitialized(_this));
|
|
227
|
-
_this.handleRemovingScrollBlock = _this.handleRemovingScrollBlock.bind(_assertThisInitialized(_this));
|
|
228
|
-
_this.handleIntersectionObserver = _this.handleIntersectionObserver.bind(_assertThisInitialized(_this));
|
|
229
|
-
_this.updateVisibilityOnIntersection = _this.updateVisibilityOnIntersection.bind(_assertThisInitialized(_this));
|
|
230
|
-
_this.handleAddingScrollToUpdatePosition = _this.handleAddingScrollToUpdatePosition.bind(_assertThisInitialized(_this));
|
|
231
|
-
_this.handleRemovingScrollToUpdatePosition = _this.handleRemovingScrollToUpdatePosition.bind(_assertThisInitialized(_this));
|
|
232
|
-
_this.setContainerDynamicPositioning = _this.setContainerDynamicPositioning.bind(_assertThisInitialized(_this));
|
|
233
|
-
_this.updatePopupState = _this.updatePopupState.bind(_assertThisInitialized(_this));
|
|
234
|
-
_this.handleScrollAndBlockEvents = _this.handleScrollAndBlockEvents.bind(_assertThisInitialized(_this));
|
|
235
|
-
_this.handleIframeEventListeners = _this.handleIframeEventListeners.bind(_assertThisInitialized(_this));
|
|
236
|
-
_this.handleDropElementStyleUpdate = _this.handleDropElementStyleUpdate.bind(_assertThisInitialized(_this));
|
|
237
|
-
_this.positionRef = /*#__PURE__*/_react["default"].createRef();
|
|
238
|
-
_this.rootElement = _Registry["default"].getRootElement();
|
|
239
|
-
_this.popupObserver = new _ResizeObserver["default"](_this.handlePopupResize);
|
|
240
|
-
_this.cancelRaf = _this.cancelRaf.bind(_assertThisInitialized(_this));
|
|
241
|
-
_this.cancelPendingAnimationFrames = _this.cancelPendingAnimationFrames.bind(_assertThisInitialized(_this));
|
|
242
|
-
_this.setPositionRafId = null;
|
|
243
|
-
_this.resizePositionRafId = null; //dropBoxSize
|
|
244
|
-
|
|
245
|
-
_this.size = null;
|
|
246
|
-
_this.isTargetElementVisible = false;
|
|
247
|
-
_this.isAbsolutePopup = isAbsolutePopup;
|
|
248
|
-
_this.needPopupArrow = needPopupArrow;
|
|
249
|
-
_this.customPositionOrder = customPositionOrder;
|
|
250
|
-
_this.scrollDebounceTime = popupScrollDebounceTime;
|
|
251
|
-
_this.closeOnScroll = closeOnScrollPopup;
|
|
252
|
-
_this.isOutsideScrollBlock = isOutsideScrollBlock;
|
|
253
|
-
|
|
254
|
-
var scrollDebounceTime = _this.getScrollDebounceTime(_assertThisInitialized(_this));
|
|
255
|
-
|
|
256
|
-
_this.updatePositionOnScroll = scrollDebounceTime > 0 ? (0, _Common.debounce)(_this.updatePositionOnScroll.bind(_assertThisInitialized(_this)), scrollDebounceTime) : _this.updatePositionOnScroll.bind(_assertThisInitialized(_this)); // this.handleScroll = debounce(this.handleScroll.bind(this), scrollDebounceTime);
|
|
257
|
-
|
|
258
|
-
return _this;
|
|
259
|
-
}
|
|
260
|
-
|
|
261
|
-
_createClass(Popup, [{
|
|
262
|
-
key: "componentDidMount",
|
|
263
|
-
value: function componentDidMount() {
|
|
264
|
-
var group = this.getGroup();
|
|
265
|
-
var groupPopups = _Registry["default"].popups[group] || [];
|
|
266
|
-
groupPopups.push(this);
|
|
267
|
-
_Registry["default"].popups[group] = groupPopups;
|
|
268
|
-
|
|
269
|
-
if (Object.keys(_Registry["default"].popups).length === 1 && groupPopups.length === 1 && _Registry["default"].listenerPopupRef === undefined) {
|
|
270
|
-
_Registry["default"].listenerPopupRef = this;
|
|
271
|
-
|
|
272
|
-
_Registry["default"].listenerPopupRef.updateListeners(true, CLICK_EVENTS, document);
|
|
273
|
-
|
|
274
|
-
document.addEventListener('keyup', _Registry["default"].listenerPopupRef.documentKeyupHandler, false); // document.addEventListener('scroll', Registry.listenerPopupRef.handleScroll, true);
|
|
275
|
-
|
|
276
|
-
window.addEventListener('resize', _Registry["default"].listenerPopupRef.handleResize);
|
|
277
|
-
document.addEventListener('mousedown', _Registry["default"].listenerPopupRef.handleDocumentMouseDown, true);
|
|
278
|
-
document.addEventListener('focus', _Registry["default"].listenerPopupRef.handleDocumentFocus, true);
|
|
279
|
-
}
|
|
280
|
-
}
|
|
281
|
-
}, {
|
|
282
|
-
key: "UNSAFE_componentWillReceiveProps",
|
|
283
|
-
value: function UNSAFE_componentWillReceiveProps(nextProps) {
|
|
284
|
-
var isPopupOpen = this.state.isPopupOpen;
|
|
285
|
-
|
|
286
|
-
if (typeof nextProps.isPopupOpen !== 'undefined' && nextProps.isPopupOpen !== isPopupOpen) {
|
|
287
|
-
this.setState({
|
|
288
|
-
isPopupOpen: nextProps.isPopupOpen,
|
|
289
|
-
isPopupReady: nextProps.isPopupOpen
|
|
290
|
-
});
|
|
291
|
-
}
|
|
292
|
-
}
|
|
293
|
-
}, {
|
|
294
|
-
key: "handleScrollAndBlockEvents",
|
|
295
|
-
value: function handleScrollAndBlockEvents(shouldAdd) {
|
|
296
|
-
if (shouldAdd) {
|
|
297
|
-
this.handleAddingScrollBlock();
|
|
298
|
-
this.handleAddingScrollToUpdatePosition();
|
|
299
|
-
} else {
|
|
300
|
-
this.handleRemovingScrollBlock();
|
|
301
|
-
this.handleRemovingScrollToUpdatePosition();
|
|
302
|
-
}
|
|
303
|
-
}
|
|
304
|
-
}, {
|
|
305
|
-
key: "handleIframeEventListeners",
|
|
306
|
-
value: function handleIframeEventListeners(shouldAdd, eventList) {
|
|
307
|
-
var _this2 = this;
|
|
308
|
-
|
|
309
|
-
this.rootElement.querySelectorAll('iframe').forEach(function (frame) {
|
|
310
|
-
var frameDocument = frame.contentDocument;
|
|
311
|
-
|
|
312
|
-
if (frameDocument) {
|
|
313
|
-
_this2.updateListeners(shouldAdd, eventList, frameDocument);
|
|
314
|
-
}
|
|
315
|
-
});
|
|
316
|
-
}
|
|
317
|
-
}, {
|
|
318
|
-
key: "componentDidUpdate",
|
|
319
|
-
value: function componentDidUpdate(prevProps, prevState) {
|
|
320
|
-
var _this$state = this.state,
|
|
321
|
-
isPopupReady = _this$state.isPopupReady,
|
|
322
|
-
isMobile = _this$state.isMobile;
|
|
323
|
-
|
|
324
|
-
var _ref2 = prevState || {},
|
|
325
|
-
_ref2$isPopupReady = _ref2.isPopupReady,
|
|
326
|
-
oldStateOpen = _ref2$isPopupReady === void 0 ? false : _ref2$isPopupReady,
|
|
327
|
-
oldIsMobileState = _ref2.isMobile;
|
|
328
|
-
|
|
329
|
-
var dropElement = this.dropElement;
|
|
330
|
-
var propResizeHandling = this.props.needResizeHandling;
|
|
331
|
-
|
|
332
|
-
if (oldStateOpen !== isPopupReady) {
|
|
333
|
-
if (isPopupReady && dropElement && (propResizeHandling !== undefined ? propResizeHandling : needResizeHandling)) {
|
|
334
|
-
this.popupObserver.replaceObservationElement(dropElement);
|
|
335
|
-
} else if (!isPopupReady) {
|
|
336
|
-
this.size = null;
|
|
337
|
-
this.popupObserver.disconnect();
|
|
338
|
-
}
|
|
339
|
-
}
|
|
340
|
-
|
|
341
|
-
if (oldStateOpen !== isPopupReady && !isMobile || oldIsMobileState !== isMobile) {
|
|
342
|
-
var shouldAdd = isPopupReady && !isMobile;
|
|
343
|
-
this.handleScrollAndBlockEvents(shouldAdd);
|
|
344
|
-
this.handleIframeEventListeners(shouldAdd, CLICK_EVENTS);
|
|
345
|
-
}
|
|
346
|
-
}
|
|
347
|
-
}, {
|
|
348
|
-
key: "cancelRaf",
|
|
349
|
-
value: function cancelRaf(refName) {
|
|
350
|
-
var id = this[refName];
|
|
351
|
-
|
|
352
|
-
if (id) {
|
|
353
|
-
cancelAnimationFrame(id);
|
|
354
|
-
this[refName] = null;
|
|
355
|
-
}
|
|
356
|
-
}
|
|
357
|
-
}, {
|
|
358
|
-
key: "cancelPendingAnimationFrames",
|
|
359
|
-
value: function cancelPendingAnimationFrames() {
|
|
360
|
-
this.cancelRaf('setPositionRafId');
|
|
361
|
-
this.cancelRaf('resizePositionRafId');
|
|
362
|
-
}
|
|
363
|
-
}, {
|
|
364
|
-
key: "componentWillUnmount",
|
|
365
|
-
value: function componentWillUnmount() {
|
|
366
|
-
var _this3 = this;
|
|
367
|
-
|
|
368
|
-
var group = this.getGroup();
|
|
369
|
-
_Registry["default"].popups = Object.keys(_Registry["default"].popups).reduce(function (res, groupName) {
|
|
370
|
-
if (groupName === group) {
|
|
371
|
-
var groupPopups = _Registry["default"].popups[group];
|
|
372
|
-
var newGroupPopups = groupPopups.filter(function (popup) {
|
|
373
|
-
return popup !== _this3;
|
|
374
|
-
});
|
|
375
|
-
newGroupPopups.length === 0 && _Registry["default"].lastOpenedGroup.indexOf(group) >= 0 && _Registry["default"].lastOpenedGroup.splice(_Registry["default"].lastOpenedGroup.indexOf(group), 1);
|
|
376
|
-
res[group] = newGroupPopups;
|
|
377
|
-
}
|
|
378
|
-
|
|
379
|
-
return res;
|
|
380
|
-
}, _Registry["default"].popups);
|
|
381
|
-
this.handleRemovingScrollBlock();
|
|
382
|
-
this.handleRemovingScrollToUpdatePosition();
|
|
383
|
-
this.handleIframeEventListeners(false, CLICK_EVENTS);
|
|
384
|
-
var noPopups = true;
|
|
385
|
-
|
|
386
|
-
for (var i in _Registry["default"].popups) {
|
|
387
|
-
if (_Registry["default"].popups[i].length >= 1) {
|
|
388
|
-
noPopups = false;
|
|
389
|
-
break;
|
|
390
|
-
}
|
|
391
|
-
}
|
|
392
|
-
|
|
393
|
-
if (this.popupObserver) {
|
|
394
|
-
this.popupObserver.disconnect();
|
|
395
|
-
}
|
|
396
|
-
|
|
397
|
-
if (noPopups && _Registry["default"].listenerPopupRef !== undefined) {
|
|
398
|
-
_Registry["default"].listenerPopupRef.updateListeners(false, CLICK_EVENTS, document);
|
|
399
|
-
|
|
400
|
-
document.removeEventListener('keyup', _Registry["default"].listenerPopupRef.documentKeyupHandler); // document.removeEventListener('scroll', Registry.listenerPopupRef.handleScroll);
|
|
401
|
-
|
|
402
|
-
window.removeEventListener('resize', _Registry["default"].listenerPopupRef.handleResize);
|
|
403
|
-
document.removeEventListener('mousedown', _Registry["default"].listenerPopupRef.handleDocumentMouseDown, true);
|
|
404
|
-
document.removeEventListener('focus', _Registry["default"].listenerPopupRef.handleDocumentFocus, true);
|
|
405
|
-
_Registry["default"].listenerPopupRef = undefined;
|
|
406
|
-
}
|
|
407
|
-
|
|
408
|
-
this.cancelPendingAnimationFrames();
|
|
409
|
-
}
|
|
410
|
-
}, {
|
|
411
|
-
key: "handleAddingScrollBlock",
|
|
412
|
-
value: function handleAddingScrollBlock() {
|
|
413
|
-
var isAbsolutePositioningNeeded = this.getIsAbsolutePopup(this);
|
|
414
|
-
var isOutsideScrollBlocked = this.getIsOutsideScrollBlocked(this);
|
|
415
|
-
|
|
416
|
-
if (isOutsideScrollBlocked && !isAbsolutePositioningNeeded) {
|
|
417
|
-
(0, _intersectionObserver.addIntersectionObserver)(this.placeHolderElement, this.handleIntersectionObserver);
|
|
418
|
-
this.addScrollBlockListeners();
|
|
419
|
-
}
|
|
420
|
-
}
|
|
421
|
-
}, {
|
|
422
|
-
key: "handleRemovingScrollBlock",
|
|
423
|
-
value: function handleRemovingScrollBlock() {
|
|
424
|
-
var isAbsolutePositioningNeeded = this.getIsAbsolutePopup(this);
|
|
425
|
-
var isOutsideScrollBlocked = this.getIsOutsideScrollBlocked(this);
|
|
426
|
-
|
|
427
|
-
if (isOutsideScrollBlocked && !isAbsolutePositioningNeeded) {
|
|
428
|
-
(0, _intersectionObserver.removeIntersectionObserver)(this.placeHolderElement, this.handleIntersectionObserver);
|
|
429
|
-
this.removeScrollBlockListeners();
|
|
430
|
-
}
|
|
431
|
-
}
|
|
432
|
-
}, {
|
|
433
|
-
key: "handleAddingScrollToUpdatePosition",
|
|
434
|
-
value: function handleAddingScrollToUpdatePosition() {
|
|
435
|
-
var isAbsolutePositioningNeeded = this.getIsAbsolutePopup(this);
|
|
436
|
-
var isOutsideScrollBlocked = this.getIsOutsideScrollBlocked(this);
|
|
437
|
-
|
|
438
|
-
if (!isOutsideScrollBlocked && !isAbsolutePositioningNeeded) {
|
|
439
|
-
(0, _intersectionObserver.addIntersectionObserver)(this.placeHolderElement, this.updateVisibilityOnIntersection);
|
|
440
|
-
var shouldAddScrollToUpdatePositionListeners = _Registry["default"].getOpenedScrollableFixedPopups().length === 1 && _Registry["default"].scrollableListenerPopupRef === undefined;
|
|
441
|
-
|
|
442
|
-
if (shouldAddScrollToUpdatePositionListeners) {
|
|
443
|
-
_Registry["default"].scrollableListenerPopupRef = this;
|
|
444
|
-
|
|
445
|
-
_Registry["default"].scrollableListenerPopupRef.addScrollToUpdateListeners();
|
|
446
|
-
}
|
|
447
|
-
}
|
|
448
|
-
}
|
|
449
|
-
}, {
|
|
450
|
-
key: "handleRemovingScrollToUpdatePosition",
|
|
451
|
-
value: function handleRemovingScrollToUpdatePosition() {
|
|
452
|
-
var isAbsolutePositioningNeeded = this.getIsAbsolutePopup(this);
|
|
453
|
-
var isOutsideScrollBlocked = this.getIsOutsideScrollBlocked(this);
|
|
454
|
-
|
|
455
|
-
if (!isOutsideScrollBlocked && !isAbsolutePositioningNeeded) {
|
|
456
|
-
(0, _intersectionObserver.removeIntersectionObserver)(this.placeHolderElement, this.updateVisibilityOnIntersection);
|
|
457
|
-
var shouldRemoveScrollToUpdatePositionListeners = _Registry["default"].getOpenedScrollableFixedPopups().length === 0 && _Registry["default"].scrollableListenerPopupRef !== undefined;
|
|
458
|
-
|
|
459
|
-
if (shouldRemoveScrollToUpdatePositionListeners) {
|
|
460
|
-
_Registry["default"].scrollableListenerPopupRef.removeScrollToUpdateListeners();
|
|
461
|
-
|
|
462
|
-
_Registry["default"].scrollableListenerPopupRef = undefined;
|
|
463
|
-
}
|
|
464
|
-
}
|
|
465
|
-
}
|
|
466
|
-
}, {
|
|
467
|
-
key: "handleDropElementStyleUpdate",
|
|
468
|
-
value: function handleDropElementStyleUpdate(_ref3) {
|
|
469
|
-
var _ref3$top = _ref3.top,
|
|
470
|
-
top = _ref3$top === void 0 ? '' : _ref3$top,
|
|
471
|
-
_ref3$left = _ref3.left,
|
|
472
|
-
left = _ref3$left === void 0 ? '' : _ref3$left,
|
|
473
|
-
_ref3$bottom = _ref3.bottom,
|
|
474
|
-
bottom = _ref3$bottom === void 0 ? '' : _ref3$bottom,
|
|
475
|
-
_ref3$right = _ref3.right,
|
|
476
|
-
right = _ref3$right === void 0 ? '' : _ref3$right;
|
|
477
|
-
var dropElement = this.dropElement;
|
|
478
|
-
Object.assign(dropElement.style, {
|
|
479
|
-
top: top ? "".concat(top, "px") : '',
|
|
480
|
-
left: left ? "".concat(left, "px") : '',
|
|
481
|
-
right: right ? "".concat(right, "px") : '',
|
|
482
|
-
bottom: bottom ? "".concat(bottom, "px") : ''
|
|
483
|
-
});
|
|
484
|
-
}
|
|
485
|
-
}, {
|
|
486
|
-
key: "setContainerDynamicPositioning",
|
|
487
|
-
value: function setContainerDynamicPositioning(betterPosition, needArrow) {
|
|
488
|
-
var dropElement = this.dropElement;
|
|
489
|
-
var isMobile = this.state.isMobile;
|
|
490
|
-
|
|
491
|
-
var _ref4 = betterPosition || _Common.DUMMY_OBJECT,
|
|
492
|
-
view = _ref4.view,
|
|
493
|
-
viewsOffset = _ref4.viewsOffset;
|
|
494
|
-
|
|
495
|
-
var styleToApply = (0, _selectn["default"])("".concat(view), viewsOffset);
|
|
496
|
-
|
|
497
|
-
if (isMobile) {
|
|
498
|
-
this.handleDropElementStyleUpdate({
|
|
499
|
-
top: '',
|
|
500
|
-
left: '',
|
|
501
|
-
right: '',
|
|
502
|
-
bottom: ''
|
|
503
|
-
});
|
|
504
|
-
} else {
|
|
505
|
-
this.handleDropElementStyleUpdate(styleToApply);
|
|
506
|
-
|
|
507
|
-
if (this.positionRef.current !== view) {
|
|
508
|
-
dropElement.setAttribute('data-position', "".concat(view));
|
|
509
|
-
dropElement.setAttribute('data-box-direction', (0, _selectn["default"])("".concat(view, ".direction"), _DropBoxPositionMapping.positionMapping));
|
|
510
|
-
|
|
511
|
-
if (needArrow) {
|
|
512
|
-
dropElement.setAttribute('data-arrow-position', (0, _selectn["default"])("".concat(view, ".arrowPosition"), _DropBoxPositionMapping.positionMapping));
|
|
513
|
-
}
|
|
514
|
-
|
|
515
|
-
this.positionRef.current = view;
|
|
516
|
-
}
|
|
517
|
-
}
|
|
518
|
-
}
|
|
519
|
-
}, {
|
|
520
|
-
key: "updatePositionOnScroll",
|
|
521
|
-
value: function updatePositionOnScroll(e) {
|
|
522
|
-
var scrollablePopups = _Registry["default"].getOpenedScrollableFixedPopups(); // Check if the event target is outside all dropElements
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
scrollablePopups.forEach(function (_ref5) {
|
|
526
|
-
var placeHolderElement = _ref5.placeHolderElement,
|
|
527
|
-
defaultPosition = _ref5.defaultPosition,
|
|
528
|
-
isTargetElementVisible = _ref5.isTargetElementVisible,
|
|
529
|
-
handlePopupPosition = _ref5.handlePopupPosition;
|
|
530
|
-
|
|
531
|
-
if (e.target.contains(placeHolderElement) && isTargetElementVisible) {
|
|
532
|
-
handlePopupPosition(defaultPosition, true);
|
|
533
|
-
}
|
|
534
|
-
});
|
|
535
|
-
}
|
|
536
|
-
}, {
|
|
537
|
-
key: "updateListeners",
|
|
538
|
-
value: function updateListeners() {
|
|
539
|
-
var _this4 = this;
|
|
540
|
-
|
|
541
|
-
var add = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true;
|
|
542
|
-
var eventList = arguments.length > 1 ? arguments[1] : undefined;
|
|
543
|
-
var element = arguments.length > 2 ? arguments[2] : undefined;
|
|
544
|
-
var method = add ? 'addEventListener' : 'removeEventListener';
|
|
545
|
-
eventList.forEach(function (_ref6) {
|
|
546
|
-
var name = _ref6.name,
|
|
547
|
-
handlerName = _ref6.handlerName,
|
|
548
|
-
options = _ref6.options;
|
|
549
|
-
var handler = _this4[handlerName];
|
|
550
|
-
|
|
551
|
-
if (handler) {
|
|
552
|
-
element[method](name, handler, options);
|
|
553
|
-
}
|
|
554
|
-
});
|
|
555
|
-
}
|
|
556
|
-
}, {
|
|
557
|
-
key: "addScrollBlockListeners",
|
|
558
|
-
value: function addScrollBlockListeners() {
|
|
559
|
-
// Only add scroll block listeners if at least one open popup needs outside scroll blocked
|
|
560
|
-
var shouldAddScrollBlockListeners = _Registry["default"].getOpenedScrollBlockedFixedPopups().length === 1 && _Registry["default"].scrollBlockedListenerPopupRef === undefined;
|
|
561
|
-
|
|
562
|
-
if (shouldAddScrollBlockListeners) {
|
|
563
|
-
_Registry["default"].scrollBlockedListenerPopupRef = this; // Main document
|
|
564
|
-
|
|
565
|
-
_Registry["default"].scrollBlockedListenerPopupRef.updateListeners(true, SCROLL_BLOCK_EVENTS, document); // Attach event listeners to all iframes within rootElement
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
_Registry["default"].scrollBlockedListenerPopupRef.handleIframeEventListeners(true, IFRAME_SCROLL_BLOCK_EVENTS);
|
|
569
|
-
}
|
|
570
|
-
}
|
|
571
|
-
}, {
|
|
572
|
-
key: "removeScrollBlockListeners",
|
|
573
|
-
value: function removeScrollBlockListeners() {
|
|
574
|
-
// Only remove scroll block listeners if at least one open popup needs outside scroll blocked
|
|
575
|
-
var shouldRemoveScrollBlockListeners = _Registry["default"].getOpenedScrollBlockedFixedPopups().length === 0 && _Registry["default"].scrollBlockedListenerPopupRef !== undefined;
|
|
576
|
-
|
|
577
|
-
if (shouldRemoveScrollBlockListeners) {
|
|
578
|
-
_Registry["default"].scrollBlockedListenerPopupRef.updateListeners(false, SCROLL_BLOCK_EVENTS, document);
|
|
579
|
-
|
|
580
|
-
_Registry["default"].scrollBlockedListenerPopupRef.handleIframeEventListeners(false, IFRAME_SCROLL_BLOCK_EVENTS);
|
|
581
|
-
|
|
582
|
-
_Registry["default"].scrollBlockedListenerPopupRef = undefined;
|
|
583
|
-
}
|
|
584
|
-
}
|
|
585
|
-
}, {
|
|
586
|
-
key: "addScrollToUpdateListeners",
|
|
587
|
-
value: function addScrollToUpdateListeners() {
|
|
588
|
-
document.addEventListener('scroll', this.updatePositionOnScroll, {
|
|
589
|
-
capture: true,
|
|
590
|
-
passive: false
|
|
591
|
-
});
|
|
592
|
-
}
|
|
593
|
-
}, {
|
|
594
|
-
key: "removeScrollToUpdateListeners",
|
|
595
|
-
value: function removeScrollToUpdateListeners() {
|
|
596
|
-
document.removeEventListener('scroll', this.updatePositionOnScroll, {
|
|
597
|
-
capture: true,
|
|
598
|
-
passive: false
|
|
599
|
-
});
|
|
600
|
-
}
|
|
601
|
-
}, {
|
|
602
|
-
key: "handleBlockScroll",
|
|
603
|
-
value: function handleBlockScroll(event) {
|
|
604
|
-
var scrollBlockedPopups = _Registry["default"].getOpenedScrollBlockedFixedPopups(); // Check if the event target is outside all dropElements
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
var isOutsideAllDropElements = scrollBlockedPopups.every(function (_ref7) {
|
|
608
|
-
var dropElement = _ref7.dropElement;
|
|
609
|
-
return dropElement && dropElement !== event.target && !dropElement.contains(event.target);
|
|
610
|
-
});
|
|
611
|
-
|
|
612
|
-
if (isOutsideAllDropElements) {
|
|
613
|
-
event.preventDefault();
|
|
614
|
-
}
|
|
615
|
-
}
|
|
616
|
-
}, {
|
|
617
|
-
key: "handlePositionChange",
|
|
618
|
-
value: function handlePositionChange(event) {
|
|
619
|
-
var scrollBlockedPopups = _Registry["default"].getOpenedScrollBlockedFixedPopups();
|
|
620
|
-
|
|
621
|
-
scrollBlockedPopups.forEach(function (_ref8) {
|
|
622
|
-
var placeHolderElement = _ref8.placeHolderElement,
|
|
623
|
-
dropElement = _ref8.dropElement,
|
|
624
|
-
handlePopupPosition = _ref8.handlePopupPosition,
|
|
625
|
-
state = _ref8.state;
|
|
626
|
-
|
|
627
|
-
if (dropElement && dropElement !== event.target && !dropElement.contains(event.target) && placeHolderElement && placeHolderElement !== event.target && !placeHolderElement.contains(event.target) && event.target.contains(placeHolderElement)) {
|
|
628
|
-
handlePopupPosition(state.position, true);
|
|
629
|
-
}
|
|
630
|
-
});
|
|
631
|
-
}
|
|
632
|
-
}, {
|
|
633
|
-
key: "preventKeyboardScroll",
|
|
634
|
-
value: function preventKeyboardScroll(event) {
|
|
635
|
-
var keys = [32, 37, 38, 39, 40]; // Space, Arrow keys
|
|
636
|
-
|
|
637
|
-
var scrollBlockedPopups = _Registry["default"].getOpenedScrollBlockedFixedPopups(); // Check if the event target is outside all dropElements
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
var isOutsideAllDropElements = scrollBlockedPopups.every(function (_ref9) {
|
|
641
|
-
var dropElement = _ref9.dropElement;
|
|
642
|
-
return dropElement && dropElement !== event.target && !dropElement.contains(event.target) && keys.includes(event.keyCode);
|
|
643
|
-
});
|
|
644
|
-
|
|
645
|
-
if (isOutsideAllDropElements) {
|
|
646
|
-
event.preventDefault();
|
|
647
|
-
}
|
|
648
|
-
}
|
|
649
|
-
}, {
|
|
650
|
-
key: "handleIntersectionObserver",
|
|
651
|
-
value: function handleIntersectionObserver(entry) {
|
|
652
|
-
if (entry.intersectionRatio === 0 && entry.isIntersecting === false) {
|
|
653
|
-
this.closePopupOnly();
|
|
654
|
-
}
|
|
655
|
-
}
|
|
656
|
-
}, {
|
|
657
|
-
key: "updateVisibilityOnIntersection",
|
|
658
|
-
value: function updateVisibilityOnIntersection(entry) {
|
|
659
|
-
var dropElement = this.dropElement;
|
|
660
|
-
if (!dropElement) return;
|
|
661
|
-
|
|
662
|
-
if (entry.isIntersecting === true) {
|
|
663
|
-
this.isTargetElementVisible = true;
|
|
664
|
-
dropElement.setAttribute('data-visible', 'visible');
|
|
665
|
-
} else if (entry.intersectionRatio === 0 && entry.isIntersecting === false) {
|
|
666
|
-
this.isTargetElementVisible = false;
|
|
667
|
-
dropElement.setAttribute('data-visible', 'hidden');
|
|
668
|
-
}
|
|
669
|
-
}
|
|
670
|
-
}, {
|
|
671
|
-
key: "getGroup",
|
|
672
|
-
value: function getGroup() {
|
|
673
|
-
var popupGroup = this.props.popupGroup;
|
|
674
|
-
return popupGroup || group;
|
|
675
|
-
}
|
|
676
|
-
}, {
|
|
677
|
-
key: "getNeedArrow",
|
|
678
|
-
value: function getNeedArrow(popup) {
|
|
679
|
-
var isArrow = popup.props.isArrow;
|
|
680
|
-
var needPopupArrow = popup.needPopupArrow;
|
|
681
|
-
return isArrow !== undefined ? isArrow : needPopupArrow;
|
|
682
|
-
}
|
|
683
|
-
}, {
|
|
684
|
-
key: "getScrollDebounceTime",
|
|
685
|
-
value: function getScrollDebounceTime(popup) {
|
|
686
|
-
var scrollDebounceTime = popup.props.scrollDebounceTime;
|
|
687
|
-
var popupScrollDebounceTime = popup.scrollDebounceTime;
|
|
688
|
-
return scrollDebounceTime !== undefined ? scrollDebounceTime : popupScrollDebounceTime;
|
|
689
|
-
}
|
|
690
|
-
}, {
|
|
691
|
-
key: "getCloseOnScrollPopup",
|
|
692
|
-
value: function getCloseOnScrollPopup(popup) {
|
|
693
|
-
var closeOnScroll = popup.props.closeOnScroll;
|
|
694
|
-
var closeOnScrollPopup = popup.closeOnScroll;
|
|
695
|
-
return closeOnScroll !== undefined ? closeOnScroll : closeOnScrollPopup;
|
|
696
|
-
}
|
|
697
|
-
}, {
|
|
698
|
-
key: "getIsAbsolutePopup",
|
|
699
|
-
value: function getIsAbsolutePopup(popup) {
|
|
700
|
-
var isAbsolutePositioningNeeded = popup.props.isAbsolutePositioningNeeded;
|
|
701
|
-
var isAbsolutePopup = popup.isAbsolutePopup;
|
|
702
|
-
return isAbsolutePositioningNeeded !== undefined ? isAbsolutePositioningNeeded : isAbsolutePopup;
|
|
703
|
-
}
|
|
704
|
-
}, {
|
|
705
|
-
key: "getIsOutsideScrollBlocked",
|
|
706
|
-
value: function getIsOutsideScrollBlocked(popup) {
|
|
707
|
-
var isOutsideScrollBlocked = popup.props.isOutsideScrollBlocked;
|
|
708
|
-
var isOutsideScrollBlock = popup.isOutsideScrollBlock;
|
|
709
|
-
return isOutsideScrollBlocked !== undefined ? isOutsideScrollBlocked : isOutsideScrollBlock;
|
|
710
|
-
}
|
|
711
|
-
}, {
|
|
712
|
-
key: "getCustomPositionOrder",
|
|
713
|
-
value: function getCustomPositionOrder(popup) {
|
|
714
|
-
var _popup$props$customOr = popup.props.customOrder,
|
|
715
|
-
customOrder = _popup$props$customOr === void 0 ? [] : _popup$props$customOr;
|
|
716
|
-
var customPositionOrder = popup.customPositionOrder;
|
|
717
|
-
return customOrder.length !== 0 ? customOrder : customPositionOrder;
|
|
718
|
-
}
|
|
719
|
-
}, {
|
|
720
|
-
key: "togglePopup",
|
|
721
|
-
value: function togglePopup(e, defaultPosition) {
|
|
722
|
-
var _this5 = this;
|
|
723
|
-
|
|
724
|
-
var group = this.getGroup();
|
|
725
|
-
this.removeClose(e);
|
|
726
|
-
var isPopupOpen = this.state.isPopupOpen;
|
|
727
|
-
var groupPopups = _Registry["default"].popups[group] || [];
|
|
728
|
-
_Registry["default"].lastOpenedGroup = !isPopupOpen && _Registry["default"].lastOpenedGroup.indexOf(group) === -1 ? [group].concat(_toConsumableArray(_Registry["default"].lastOpenedGroup)) : _Registry["default"].lastOpenedGroup;
|
|
729
|
-
isPopupOpen && _Registry["default"].lastOpenedGroup.splice(0, 1);
|
|
730
|
-
groupPopups.forEach(function (popup) {
|
|
731
|
-
if (popup !== _this5 && popup.state.isPopupOpen) {
|
|
732
|
-
popup.setState({
|
|
733
|
-
isPopupOpen: false,
|
|
734
|
-
isPopupReady: false
|
|
735
|
-
});
|
|
736
|
-
}
|
|
737
|
-
});
|
|
738
|
-
|
|
739
|
-
if (isPopupOpen) {
|
|
740
|
-
this.setState({
|
|
741
|
-
isPopupOpen: false,
|
|
742
|
-
isPopupReady: false
|
|
743
|
-
});
|
|
744
|
-
} else {
|
|
745
|
-
this.handlePopupPosition(defaultPosition);
|
|
746
|
-
}
|
|
747
|
-
}
|
|
748
|
-
}, {
|
|
749
|
-
key: "openPopupOnly",
|
|
750
|
-
value: function openPopupOnly(e, defaultPosition) {
|
|
751
|
-
var group = this.getGroup();
|
|
752
|
-
this.removeClose(e);
|
|
753
|
-
_Registry["default"].lastOpenedGroup = _Registry["default"].lastOpenedGroup.indexOf(group) === -1 ? [group].concat(_toConsumableArray(_Registry["default"].lastOpenedGroup)) : _Registry["default"].lastOpenedGroup;
|
|
754
|
-
this.handlePopupPosition(defaultPosition);
|
|
755
|
-
}
|
|
756
|
-
}, {
|
|
757
|
-
key: "closePopupOnly",
|
|
758
|
-
value: function closePopupOnly(e) {
|
|
759
|
-
this.removeClose(e);
|
|
760
|
-
var isPopupOpen = this.state.isPopupOpen;
|
|
761
|
-
|
|
762
|
-
if (isPopupOpen) {
|
|
763
|
-
_Registry["default"].lastOpenedGroup.splice(0, 1);
|
|
764
|
-
|
|
765
|
-
this.setState({
|
|
766
|
-
isPopupOpen: false,
|
|
767
|
-
isPopupReady: false
|
|
768
|
-
});
|
|
769
|
-
}
|
|
770
|
-
}
|
|
771
|
-
}, {
|
|
772
|
-
key: "handleCloseLastOpenedGroup",
|
|
773
|
-
value: function handleCloseLastOpenedGroup() {
|
|
774
|
-
var groupPopups = _Registry["default"].lastOpenedGroup.length ? _Registry["default"].popups[_Registry["default"].lastOpenedGroup[0]] || [] : [];
|
|
775
|
-
|
|
776
|
-
_Registry["default"].lastOpenedGroup.splice(0, 1);
|
|
777
|
-
|
|
778
|
-
groupPopups.forEach(function (popup) {
|
|
779
|
-
popup.state.isPopupOpen && popup.setState({
|
|
780
|
-
isPopupOpen: false,
|
|
781
|
-
isPopupReady: false
|
|
782
|
-
});
|
|
783
|
-
});
|
|
784
|
-
}
|
|
785
|
-
}, {
|
|
786
|
-
key: "handleDocumentMouseDown",
|
|
787
|
-
value: function handleDocumentMouseDown(e) {
|
|
788
|
-
var needPrevent = this.handleGetNeedPrevent(e);
|
|
789
|
-
|
|
790
|
-
if (needPrevent) {
|
|
791
|
-
this.removeClose(e);
|
|
792
|
-
}
|
|
793
|
-
}
|
|
794
|
-
}, {
|
|
795
|
-
key: "handleDocumentFocus",
|
|
796
|
-
value: function handleDocumentFocus(e) {
|
|
797
|
-
var needPrevent = this.handleGetNeedPrevent(e);
|
|
798
|
-
|
|
799
|
-
if (needPrevent) {
|
|
800
|
-
this.removeClose(e);
|
|
801
|
-
}
|
|
802
|
-
}
|
|
803
|
-
}, {
|
|
804
|
-
key: "handleGetNeedPrevent",
|
|
805
|
-
value: function handleGetNeedPrevent(e) {
|
|
806
|
-
var needPrevent = false;
|
|
807
|
-
|
|
808
|
-
if (_Registry["default"].lastOpenedGroup.length > 1) {
|
|
809
|
-
var target = e.target;
|
|
810
|
-
var groupPopups = _Registry["default"].lastOpenedGroup.length ? _Registry["default"].popups[_Registry["default"].lastOpenedGroup[0]] : [];
|
|
811
|
-
var openedPopup = null; // eslint-disable-next-line guard-for-in
|
|
812
|
-
|
|
813
|
-
for (var i in groupPopups) {
|
|
814
|
-
var isPopupOpen = groupPopups[i].state.isPopupOpen;
|
|
815
|
-
|
|
816
|
-
if (isPopupOpen) {
|
|
817
|
-
openedPopup = groupPopups[i];
|
|
818
|
-
break;
|
|
819
|
-
}
|
|
820
|
-
}
|
|
821
|
-
|
|
822
|
-
if (openedPopup) {
|
|
823
|
-
var _openedPopup = openedPopup,
|
|
824
|
-
dropElement = _openedPopup.dropElement,
|
|
825
|
-
placeHolderElement = _openedPopup.placeHolderElement;
|
|
826
|
-
var isDropBoxChild = (0, _Common.isDescendant)(dropElement, target);
|
|
827
|
-
var isTargetChild = (0, _Common.isDescendant)(placeHolderElement, target); // const isPopupMassUpdateChild = isDescendant(
|
|
828
|
-
// massUpdateParent,
|
|
829
|
-
// dropElement
|
|
830
|
-
// );
|
|
831
|
-
|
|
832
|
-
if (!isDropBoxChild && !isTargetChild // && isPopupMassUpdateChild
|
|
833
|
-
) {
|
|
834
|
-
needPrevent = true;
|
|
835
|
-
}
|
|
836
|
-
}
|
|
837
|
-
}
|
|
838
|
-
|
|
839
|
-
return needPrevent;
|
|
840
|
-
}
|
|
841
|
-
}, {
|
|
842
|
-
key: "documentClickHandler1",
|
|
843
|
-
value: function documentClickHandler1(e) {
|
|
844
|
-
var needPrevent = this.handleGetNeedPrevent(e);
|
|
845
|
-
|
|
846
|
-
if (needPrevent) {
|
|
847
|
-
this.removeClose(e);
|
|
848
|
-
this.handleCloseLastOpenedGroup();
|
|
849
|
-
}
|
|
850
|
-
}
|
|
851
|
-
}, {
|
|
852
|
-
key: "documentClickHandler",
|
|
853
|
-
value: function documentClickHandler() {
|
|
854
|
-
try {
|
|
855
|
-
Object.keys(_Registry["default"].popups).forEach(function (groupName) {
|
|
856
|
-
var groupPopups = _Registry["default"].popups[groupName] || [];
|
|
857
|
-
groupPopups.forEach(function (popup) {
|
|
858
|
-
popup.state.isPopupOpen && (!popup.props.checkBeforeClose || popup.props.checkBeforeClose && popup.props.checkBeforeClose()) && !(0, _Common.isTextSelected)() && popup.setState({
|
|
859
|
-
isPopupOpen: false,
|
|
860
|
-
isPopupReady: false
|
|
861
|
-
});
|
|
862
|
-
});
|
|
863
|
-
});
|
|
864
|
-
_Registry["default"].lastOpenedGroup = [];
|
|
865
|
-
} catch (e) {// eslint-disable-next-line no-console
|
|
866
|
-
//console.error('popup component not unmounted properly', e);
|
|
867
|
-
}
|
|
868
|
-
}
|
|
869
|
-
}, {
|
|
870
|
-
key: "documentKeyupHandler",
|
|
871
|
-
value: function documentKeyupHandler(e) {
|
|
872
|
-
try {
|
|
873
|
-
if (e.keyCode === 27) {
|
|
874
|
-
this.handleCloseLastOpenedGroup();
|
|
875
|
-
}
|
|
876
|
-
} catch (e) {// eslint-disable-next-line no-console
|
|
877
|
-
//console.log('error', e);
|
|
878
|
-
}
|
|
879
|
-
}
|
|
880
|
-
}, {
|
|
881
|
-
key: "removeClose",
|
|
882
|
-
value: function removeClose(e) {
|
|
883
|
-
// e && e.preventDefault && e.preventDefault();
|
|
884
|
-
(0, _Common.cancelBubblingEffect)(e);
|
|
885
|
-
}
|
|
886
|
-
}, {
|
|
887
|
-
key: "updatePopupState",
|
|
888
|
-
value: function updatePopupState(view, views, viewsOffset, targetOffset, popupOffset, isAbsolute) {
|
|
889
|
-
var isMobile = (0, _isMobilePopover["default"])(true);
|
|
890
|
-
this.setState({
|
|
891
|
-
isPopupReady: true,
|
|
892
|
-
position: view,
|
|
893
|
-
positions: views,
|
|
894
|
-
positionsOffset: viewsOffset,
|
|
895
|
-
targetOffset: targetOffset,
|
|
896
|
-
popupOffset: popupOffset,
|
|
897
|
-
isAbsolutePositioningNeeded: isAbsolute,
|
|
898
|
-
isMobile: isMobile
|
|
899
|
-
});
|
|
900
|
-
}
|
|
901
|
-
}, {
|
|
902
|
-
key: "handlePopupPosition",
|
|
903
|
-
value: function handlePopupPosition() {
|
|
904
|
-
var _this6 = this;
|
|
905
|
-
|
|
906
|
-
var defaultPosition = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'bottomCenter';
|
|
907
|
-
var isUpdatePosition = arguments.length > 1 ? arguments[1] : undefined;
|
|
908
|
-
|
|
909
|
-
// isUpdatePosition --->>> Window resize and dropBox resize and to update the position
|
|
910
|
-
var _ref10 = this.context || {},
|
|
911
|
-
direction = _ref10.direction;
|
|
912
|
-
|
|
913
|
-
var placeHolderElement = this.placeHolderElement,
|
|
914
|
-
dropElement = this.dropElement;
|
|
915
|
-
var needArrow = this.getNeedArrow(this);
|
|
916
|
-
var isAbsolute = this.getIsAbsolutePopup(this);
|
|
917
|
-
var customOrder = this.getCustomPositionOrder(this);
|
|
918
|
-
|
|
919
|
-
if (direction === 'rtl') {
|
|
920
|
-
defaultPosition = isAbsolute ? _PositionMapping.rtlAbsolutePositionMapping[defaultPosition] : _PositionMapping.rtlFixedPositionMapping[defaultPosition];
|
|
921
|
-
} else {
|
|
922
|
-
defaultPosition = isAbsolute ? _PositionMapping.absolutePositionMapping[defaultPosition] : defaultPosition;
|
|
923
|
-
}
|
|
924
|
-
|
|
925
|
-
if (!placeHolderElement && !dropElement) {
|
|
926
|
-
var isMobile = (0, _isMobilePopover["default"])(true);
|
|
927
|
-
this.setState({
|
|
928
|
-
isPopupOpen: true,
|
|
929
|
-
isPopupReady: true,
|
|
930
|
-
isMobile: isMobile
|
|
931
|
-
});
|
|
932
|
-
return;
|
|
933
|
-
}
|
|
934
|
-
|
|
935
|
-
var setPosition = function setPosition() {
|
|
936
|
-
_this6.cancelRaf('setPositionRafId');
|
|
937
|
-
|
|
938
|
-
_this6.setPositionRafId = requestAnimationFrame(function () {
|
|
939
|
-
var placeHolderElement = _this6.placeHolderElement,
|
|
940
|
-
dropElement = _this6.dropElement;
|
|
941
|
-
var _this6$state = _this6.state,
|
|
942
|
-
position = _this6$state.position,
|
|
943
|
-
isPopupReady = _this6$state.isPopupReady;
|
|
944
|
-
var scrollContainer = placeHolderElement ? placeHolderElement.closest('[data-scroll=true]') || document.body : document.body;
|
|
945
|
-
|
|
946
|
-
var betterPosition = _viewPort["default"].betterView(dropElement, placeHolderElement, defaultPosition, scrollContainer, {
|
|
947
|
-
needArrow: needArrow,
|
|
948
|
-
isAbsolute: isAbsolute,
|
|
949
|
-
customOrder: customOrder
|
|
950
|
-
});
|
|
951
|
-
|
|
952
|
-
var _ref11 = betterPosition || _Common.DUMMY_OBJECT,
|
|
953
|
-
view = _ref11.view,
|
|
954
|
-
views = _ref11.views,
|
|
955
|
-
viewsOffset = _ref11.viewsOffset,
|
|
956
|
-
targetOffset = _ref11.targetOffset,
|
|
957
|
-
popupOffset = _ref11.popupOffset;
|
|
958
|
-
|
|
959
|
-
if (!isAbsolute) {
|
|
960
|
-
if (!isPopupReady) {
|
|
961
|
-
_this6.updatePopupState(view, views, viewsOffset, targetOffset, popupOffset, isAbsolute);
|
|
962
|
-
}
|
|
963
|
-
|
|
964
|
-
if (!dropElement) {
|
|
965
|
-
return;
|
|
966
|
-
}
|
|
967
|
-
|
|
968
|
-
_this6.setContainerDynamicPositioning(betterPosition, needArrow);
|
|
969
|
-
} else {
|
|
970
|
-
if (position !== view || !isPopupReady) {
|
|
971
|
-
_this6.updatePopupState(view, views, viewsOffset, targetOffset, popupOffset, isAbsolute);
|
|
972
|
-
}
|
|
973
|
-
}
|
|
974
|
-
|
|
975
|
-
_this6.setPositionRafId = null;
|
|
976
|
-
});
|
|
977
|
-
};
|
|
978
|
-
|
|
979
|
-
if (isUpdatePosition) {
|
|
980
|
-
setPosition();
|
|
981
|
-
} else {
|
|
982
|
-
this.defaultPosition = defaultPosition;
|
|
983
|
-
this.setState({
|
|
984
|
-
isPopupOpen: true,
|
|
985
|
-
isPopupReady: false
|
|
986
|
-
}, setPosition);
|
|
987
|
-
}
|
|
988
|
-
}
|
|
989
|
-
}, {
|
|
990
|
-
key: "handleOpenPopupPositionChange",
|
|
991
|
-
value: function handleOpenPopupPositionChange() {
|
|
992
|
-
var _this7 = this;
|
|
993
|
-
|
|
994
|
-
Object.keys(_Registry["default"].popups).forEach(function (groupName) {
|
|
995
|
-
var groupPopups = _Registry["default"].popups[groupName] || [];
|
|
996
|
-
groupPopups.forEach(function (popup) {
|
|
997
|
-
if (popup.state.isPopupOpen) {
|
|
998
|
-
var placeHolderElement = popup.placeHolderElement,
|
|
999
|
-
dropElement = popup.dropElement,
|
|
1000
|
-
defaultPosition = popup.defaultPosition;
|
|
1001
|
-
var _popup$state = popup.state,
|
|
1002
|
-
position = _popup$state.position,
|
|
1003
|
-
_popup$state$position = _popup$state.positionsOffset,
|
|
1004
|
-
positionsOffset = _popup$state$position === void 0 ? {} : _popup$state$position;
|
|
1005
|
-
|
|
1006
|
-
if (placeHolderElement && dropElement) {
|
|
1007
|
-
var scrollContainer = placeHolderElement.closest('[data-scroll=true]') || document.body;
|
|
1008
|
-
|
|
1009
|
-
_this7.cancelRaf('resizePositionRafId');
|
|
1010
|
-
|
|
1011
|
-
_this7.resizePositionRafId = requestAnimationFrame(function () {
|
|
1012
|
-
var needArrow = _this7.getNeedArrow(popup);
|
|
1013
|
-
|
|
1014
|
-
var isAbsolute = _this7.getIsAbsolutePopup(popup);
|
|
1015
|
-
|
|
1016
|
-
var customOrder = _this7.getCustomPositionOrder(popup);
|
|
1017
|
-
|
|
1018
|
-
var isMobile = (0, _isMobilePopover["default"])(true);
|
|
1019
|
-
|
|
1020
|
-
var betterPosition = _viewPort["default"].betterView(dropElement, placeHolderElement, defaultPosition, scrollContainer, {
|
|
1021
|
-
needArrow: needArrow,
|
|
1022
|
-
isAbsolute: isAbsolute,
|
|
1023
|
-
customOrder: customOrder
|
|
1024
|
-
});
|
|
1025
|
-
|
|
1026
|
-
var _ref12 = betterPosition || {},
|
|
1027
|
-
view = _ref12.view,
|
|
1028
|
-
views = _ref12.views,
|
|
1029
|
-
_ref12$viewsOffset = _ref12.viewsOffset,
|
|
1030
|
-
viewsOffset = _ref12$viewsOffset === void 0 ? {} : _ref12$viewsOffset,
|
|
1031
|
-
targetOffset = _ref12.targetOffset,
|
|
1032
|
-
popupOffset = _ref12.popupOffset;
|
|
1033
|
-
|
|
1034
|
-
var _ref13 = positionsOffset[position] || {},
|
|
1035
|
-
_ref13$left = _ref13.left,
|
|
1036
|
-
oldLeft = _ref13$left === void 0 ? '' : _ref13$left,
|
|
1037
|
-
_ref13$top = _ref13.top,
|
|
1038
|
-
oldTop = _ref13$top === void 0 ? '' : _ref13$top,
|
|
1039
|
-
_ref13$bottom = _ref13.bottom,
|
|
1040
|
-
oldBottom = _ref13$bottom === void 0 ? '' : _ref13$bottom,
|
|
1041
|
-
_ref13$right = _ref13.right,
|
|
1042
|
-
oldRight = _ref13$right === void 0 ? '' : _ref13$right;
|
|
1043
|
-
|
|
1044
|
-
var _ref14 = viewsOffset[view] || {},
|
|
1045
|
-
_ref14$left = _ref14.left,
|
|
1046
|
-
left = _ref14$left === void 0 ? '' : _ref14$left,
|
|
1047
|
-
_ref14$top = _ref14.top,
|
|
1048
|
-
top = _ref14$top === void 0 ? '' : _ref14$top,
|
|
1049
|
-
_ref14$bottom = _ref14.bottom,
|
|
1050
|
-
bottom = _ref14$bottom === void 0 ? '' : _ref14$bottom,
|
|
1051
|
-
_ref14$right = _ref14.right,
|
|
1052
|
-
right = _ref14$right === void 0 ? '' : _ref14$right;
|
|
1053
|
-
|
|
1054
|
-
var changeState = isAbsolute ? position !== view : oldLeft !== left || oldTop !== top || oldBottom !== bottom || oldRight !== right; // let isInViewPort = viewPort.isInViewPort(
|
|
1055
|
-
// placeHolderElement,
|
|
1056
|
-
// scrollContainer
|
|
1057
|
-
// );
|
|
1058
|
-
|
|
1059
|
-
if (changeState) {
|
|
1060
|
-
popup.setState({
|
|
1061
|
-
position: view,
|
|
1062
|
-
positions: views,
|
|
1063
|
-
positionsOffset: viewsOffset,
|
|
1064
|
-
targetOffset: targetOffset,
|
|
1065
|
-
popupOffset: popupOffset,
|
|
1066
|
-
isAbsolutePositioningNeeded: isAbsolute,
|
|
1067
|
-
isMobile: isMobile
|
|
1068
|
-
});
|
|
1069
|
-
} // if (!isInViewPort && !isAbsolute) {
|
|
1070
|
-
// popup.setState({ isPopupOpen: false, isPopupReady: false });
|
|
1071
|
-
// } else if (view && changeState) {
|
|
1072
|
-
// popup.setState({
|
|
1073
|
-
// position: view,
|
|
1074
|
-
// positions: views,
|
|
1075
|
-
// positionsOffset: viewsOffset,
|
|
1076
|
-
// targetOffset,
|
|
1077
|
-
// popupOffset,
|
|
1078
|
-
// isAbsolutePositioningNeeded: isAbsolute
|
|
1079
|
-
// });
|
|
1080
|
-
// }
|
|
1081
|
-
|
|
1082
|
-
|
|
1083
|
-
_this7.resizePositionRafId = null;
|
|
1084
|
-
});
|
|
1085
|
-
}
|
|
1086
|
-
}
|
|
1087
|
-
});
|
|
1088
|
-
});
|
|
1089
|
-
}
|
|
1090
|
-
}, {
|
|
1091
|
-
key: "handleResize",
|
|
1092
|
-
value: function handleResize() {
|
|
1093
|
-
this.handleOpenPopupPositionChange();
|
|
1094
|
-
} // handleScroll(e) {
|
|
1095
|
-
// // this.handleOpenPopupPositionChange();
|
|
1096
|
-
// const { closeOnScroll } = this.getCloseOnScrollPopup(this);
|
|
1097
|
-
// const { isPopupReady } = this.state;
|
|
1098
|
-
// if (isPopupReady) {
|
|
1099
|
-
// console.log('onscrollPopupREady');
|
|
1100
|
-
// }
|
|
1101
|
-
// if (isPopupReady && closeOnScroll) {
|
|
1102
|
-
// console.log(this, 'handle Scroll');
|
|
1103
|
-
// this.togglePopup(e);
|
|
1104
|
-
// }
|
|
1105
|
-
// }
|
|
1106
|
-
|
|
1107
|
-
}, {
|
|
1108
|
-
key: "handlePopupResize",
|
|
1109
|
-
value: function handlePopupResize(popupSize) {
|
|
1110
|
-
var height = popupSize.height,
|
|
1111
|
-
width = popupSize.width;
|
|
1112
|
-
|
|
1113
|
-
var _ref15 = this.size || {},
|
|
1114
|
-
_ref15$height = _ref15.height,
|
|
1115
|
-
oldHeight = _ref15$height === void 0 ? 0 : _ref15$height,
|
|
1116
|
-
_ref15$width = _ref15.width,
|
|
1117
|
-
oldWidth = _ref15$width === void 0 ? 0 : _ref15$width;
|
|
1118
|
-
|
|
1119
|
-
var _this$state2 = this.state,
|
|
1120
|
-
isPopupReady = _this$state2.isPopupReady,
|
|
1121
|
-
position = _this$state2.position;
|
|
1122
|
-
|
|
1123
|
-
if (isPopupReady && this.size && (oldHeight !== height || width !== oldWidth)) {
|
|
1124
|
-
this.handlePopupPosition(position, true);
|
|
1125
|
-
}
|
|
1126
|
-
|
|
1127
|
-
this.size = popupSize;
|
|
1128
|
-
}
|
|
1129
|
-
}, {
|
|
1130
|
-
key: "getTargetRef",
|
|
1131
|
-
value: function getTargetRef(el) {
|
|
1132
|
-
this.placeHolderElement = el;
|
|
1133
|
-
}
|
|
1134
|
-
}, {
|
|
1135
|
-
key: "getContainerRef",
|
|
1136
|
-
value: function getContainerRef(el) {
|
|
1137
|
-
this.dropElement = el;
|
|
1138
|
-
}
|
|
1139
|
-
}, {
|
|
1140
|
-
key: "render",
|
|
1141
|
-
value: function render() {
|
|
1142
|
-
// const { isPopupReady, isPopupOpen } = this.state;
|
|
1143
|
-
var _this$state3 = this.state,
|
|
1144
|
-
isMobile = _this$state3.isMobile,
|
|
1145
|
-
restState = _objectWithoutProperties(_this$state3, _excluded); // const localState = isPopupReady ? this.state : {};
|
|
1146
|
-
|
|
1147
|
-
|
|
1148
|
-
return /*#__PURE__*/_react["default"].createElement(Component, _extends({}, this.props, restState, {
|
|
1149
|
-
openPopupOnly: this.openPopupOnly,
|
|
1150
|
-
closePopupOnly: this.closePopupOnly,
|
|
1151
|
-
togglePopup: this.togglePopup,
|
|
1152
|
-
removeClose: this.removeClose,
|
|
1153
|
-
getTargetRef: this.getTargetRef,
|
|
1154
|
-
getContainerRef: this.getContainerRef
|
|
1155
|
-
}));
|
|
1156
|
-
}
|
|
1157
|
-
}]);
|
|
1158
|
-
|
|
1159
|
-
return Popup;
|
|
1160
|
-
}(_react["default"].Component);
|
|
1161
|
-
|
|
1162
|
-
Popup.displayName = Component.displayName || Component.name || Popup.name;
|
|
1163
|
-
Popup.contextTypes = _propTypes.ContextTypes;
|
|
1164
|
-
Popup.propTypes = _propTypes.PopupPropTypes;
|
|
1165
|
-
return (0, _hoistNonReactStatics["default"])(Popup, Component);
|
|
1166
|
-
};
|
|
1167
|
-
|
|
1168
|
-
var _default = Popup;
|
|
1169
|
-
exports["default"] = _default;
|