@zohodesk/components 1.0.0-temp-220.2 → 1.0.0-temp-221
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/es/Accordion/Accordion.js +2 -2
- package/es/Accordion/AccordionItem.js +4 -4
- package/es/Accordion/__tests__/Accordion.spec.js +1 -1
- package/es/Accordion/__tests__/AccordionItem.spec.js +1 -1
- package/es/Accordion/index.js +2 -2
- package/es/Animation/Animation.js +3 -3
- package/es/Animation/__tests__/Animation.spec.js +1 -1
- package/es/Animation/utils.js +1 -1
- package/es/AppContainer/AppContainer.js +9 -9
- package/es/AppContainer/__tests__/AppContainer.spec.js +1 -1
- package/es/Avatar/Avatar.js +5 -5
- package/es/Avatar/__tests__/Avatar.spec.js +1 -1
- package/es/AvatarTeam/AvatarTeam.js +4 -4
- package/es/AvatarTeam/__tests__/AvatarTeam.spec.js +1 -1
- package/es/AvatarTeam/props/propTypes.js +1 -1
- package/es/Button/Button.js +4 -4
- package/es/Button/__tests__/Button.spec.js +1 -1
- package/es/Button/index.js +2 -2
- package/es/Button/props/defaultProps.js +1 -1
- package/es/Buttongroup/Buttongroup.js +3 -3
- package/es/Buttongroup/__tests__/Buttongroup.spec.js +1 -1
- package/es/Card/Card.js +5 -5
- package/es/Card/__tests__/Card.spec.js +1 -1
- package/es/Card/index.js +4 -4
- package/es/CheckBox/CheckBox.js +6 -6
- package/es/CheckBox/__tests__/CheckBox.spec.js +1 -1
- package/es/DateTime/CalendarView.js +6 -6
- package/es/DateTime/DateTime.js +15 -15
- package/es/DateTime/DateTimePopupFooter.js +5 -5
- package/es/DateTime/DateTimePopupHeader.js +4 -4
- package/es/DateTime/DateWidget.js +17 -17
- package/es/DateTime/DaysRow.js +3 -3
- package/es/DateTime/Time.js +5 -5
- package/es/DateTime/YearView.js +6 -6
- package/es/DateTime/__tests__/CalendarView.spec.js +1 -1
- package/es/DateTime/__tests__/DateTime.spec.js +1 -1
- package/es/DateTime/__tests__/DateTimePopupFooter.spec.js +1 -1
- package/es/DateTime/__tests__/DateTimePopupHeader.spec.js +1 -1
- package/es/DateTime/__tests__/DateWidget.spec.js +1 -1
- package/es/DateTime/__tests__/DaysRow.spec.js +1 -1
- package/es/DateTime/__tests__/Time.spec.js +1 -1
- package/es/DateTime/__tests__/YearView.spec.js +1 -1
- package/es/DateTime/dateFormatUtils/dateFormat.js +4 -4
- package/es/DateTime/dateFormatUtils/dayChange.js +2 -2
- package/es/DateTime/dateFormatUtils/index.js +3 -3
- package/es/DateTime/dateFormatUtils/monthChange.js +2 -2
- package/es/DateTime/dateFormatUtils/timeChange.js +2 -2
- package/es/DateTime/dateFormatUtils/yearChange.js +2 -2
- package/es/DateTime/index.js +1 -1
- package/es/DateTime/props/propTypes.js +1 -1
- package/es/DateTime/validator.js +2 -2
- package/es/DropBox/DropBox.js +9 -9
- package/es/DropBox/DropBoxElement/DropBoxElement.js +6 -6
- package/es/DropBox/DropBoxElement/__tests__/DropBoxElement.spec.js +1 -1
- package/es/DropBox/DropBoxElement/css/cssJSLogic.js +1 -1
- package/es/DropBox/DropBoxElement/useDropboxPosCalc.js +1 -1
- package/es/DropBox/__tests__/DropBox.spec.js +1 -1
- package/es/DropBox/css/cssJSLogic.js +1 -1
- package/es/DropBox/props/defaultProps.js +1 -1
- package/es/DropBox/props/propTypes.js +1 -1
- package/es/DropBox/utils/isMobilePopover.js +1 -1
- package/es/DropDown/DropDown.js +4 -4
- package/es/DropDown/DropDownHeading.js +3 -3
- package/es/DropDown/DropDownItem.js +3 -3
- package/es/DropDown/DropDownSearch.js +4 -4
- package/es/DropDown/DropDownSeparator.js +2 -2
- package/es/DropDown/__tests__/DropDown.spec.js +1 -1
- package/es/DropDown/__tests__/DropDownHeading.spec.js +1 -1
- package/es/DropDown/__tests__/DropDownItem.spec.js +1 -1
- package/es/DropDown/__tests__/DropDownSearch.spec.js +1 -1
- package/es/DropDown/__tests__/DropDownSeparator.spec.js +1 -1
- package/es/DropDown/index.js +7 -7
- package/es/DropDown/props/propTypes.js +1 -1
- package/es/Heading/Heading.js +4 -4
- package/es/Heading/__tests__/Heading.spec.js +1 -1
- package/es/Label/Label.js +4 -4
- package/es/Label/__tests__/Label.spec.js +1 -1
- package/es/Layout/Box.js +4 -4
- package/es/Layout/Container.js +4 -4
- package/es/Layout/__tests__/Box.spec.js +1 -1
- package/es/Layout/__tests__/Container.spec.js +1 -1
- package/es/Layout/index.js +2 -2
- package/es/ListItem/ListContainer.js +6 -6
- package/es/ListItem/ListItem.js +5 -5
- package/es/ListItem/ListItemWithAvatar.js +7 -7
- package/es/ListItem/ListItemWithCheckBox.js +6 -6
- package/es/ListItem/ListItemWithIcon.js +5 -5
- package/es/ListItem/ListItemWithRadio.js +6 -6
- package/es/ListItem/__tests__/ListContainer.spec.js +1 -1
- package/es/ListItem/__tests__/ListItem.spec.js +1 -1
- package/es/ListItem/__tests__/ListItemWithAvatar.spec.js +1 -1
- package/es/ListItem/__tests__/ListItemWithCheckBox.spec.js +1 -1
- package/es/ListItem/__tests__/ListItemWithIcon.spec.js +1 -1
- package/es/ListItem/__tests__/ListItemWithRadio.spec.js +1 -1
- package/es/ListItem/index.js +6 -6
- package/es/ListItem/props/propTypes.js +2 -2
- package/es/Modal/Modal.js +3 -3
- package/es/Modal/__tests__/Modal.spec.js +1 -1
- package/es/MultiSelect/AdvancedGroupMultiSelect.js +17 -17
- package/es/MultiSelect/AdvancedMultiSelect.js +17 -17
- package/es/MultiSelect/EmptyState.js +3 -3
- package/es/MultiSelect/MobileHeader/MobileHeader.js +5 -5
- package/es/MultiSelect/MobileHeader/__tests__/MobileHeader.spec.js +1 -1
- package/es/MultiSelect/MultiSelect.js +20 -20
- package/es/MultiSelect/MultiSelectHeader.js +4 -4
- package/es/MultiSelect/MultiSelectWithAvatar.js +16 -16
- package/es/MultiSelect/SelectedOptions.js +5 -5
- package/es/MultiSelect/Suggestions.js +6 -6
- package/es/MultiSelect/__tests__/AdvancedGroupMultiSelect.spec.js +1 -1
- package/es/MultiSelect/__tests__/AdvancedMultiSelect.spec.js +1 -1
- package/es/MultiSelect/__tests__/EmptyState.spec.js +1 -1
- package/es/MultiSelect/__tests__/MultiSelect.spec.js +1 -1
- package/es/MultiSelect/__tests__/MultiSelectHeader.spec.js +1 -1
- package/es/MultiSelect/__tests__/MultiSelectWithAvatar.spec.js +1 -1
- package/es/MultiSelect/__tests__/SelectedOptions.spec.js +1 -1
- package/es/MultiSelect/__tests__/Suggestions.spec.js +1 -1
- package/es/MultiSelect/index.js +4 -4
- package/es/MultiSelect/props/defaultProps.js +1 -1
- package/es/PopOver/PopOver.js +6 -6
- package/es/PopOver/__tests__/PopOver.spec.js +1 -1
- package/es/PopOver/index.js +3 -3
- package/es/Popup/Popup.js +39 -70
- package/es/Provider/AvatarSize.js +1 -1
- package/es/Provider/CssProvider.js +1 -1
- package/es/Provider/IdProvider.js +2 -2
- package/es/Provider/LibraryContext.js +2 -2
- package/es/Provider/ZindexProvider.js +2 -2
- package/es/Provider/index.js +4 -4
- package/es/Radio/Radio.js +6 -6
- package/es/Radio/__tests__/Radio.spec.js +1 -1
- package/es/Radio/props/propTypes.js +1 -1
- package/es/Responsive/CustomResponsive.js +7 -7
- package/es/Responsive/ResizeComponent.js +2 -2
- package/es/Responsive/Responsive.js +6 -6
- package/es/Responsive/index.js +3 -3
- package/es/Responsive/utils/index.js +1 -1
- package/es/Responsive/windowResizeObserver.js +1 -1
- package/es/ResponsiveDropBox/ResponsiveDropBox.js +6 -6
- package/es/ResponsiveDropBox/__tests__/ResponsiveDropBox.spec.js +1 -1
- package/es/ResponsiveDropBox/props/propTypes.js +1 -1
- package/es/Ribbon/Ribbon.js +3 -3
- package/es/Ribbon/__tests__/Ribbon.spec.js +1 -1
- package/es/RippleEffect/RippleEffect.js +4 -4
- package/es/RippleEffect/__tests__/RippleEffect.spec.js +1 -1
- package/es/Select/GroupSelect.js +16 -16
- package/es/Select/Select.js +15 -15
- package/es/Select/SelectWithAvatar.js +17 -17
- package/es/Select/SelectWithIcon.js +13 -13
- package/es/Select/__tests__/GroupSelect.spec.js +1 -1
- package/es/Select/__tests__/Select.spec.js +1 -1
- package/es/Select/__tests__/SelectWithAvatar.spec.js +1 -1
- package/es/Select/__tests__/SelectWithIcon.spec.js +1 -1
- package/es/Select/index.js +4 -4
- package/es/Select/props/defaultProps.js +1 -1
- package/es/Stencils/Stencils.js +3 -3
- package/es/Stencils/__tests__/Stencils.spec.js +1 -1
- package/es/Switch/Switch.js +5 -5
- package/es/Switch/__tests__/Switch.spec.js +1 -1
- package/es/Tab/Tab.js +5 -5
- package/es/Tab/TabContent.js +4 -4
- package/es/Tab/TabContentWrapper.js +3 -3
- package/es/Tab/TabWrapper.js +3 -3
- package/es/Tab/Tabs.js +13 -13
- package/es/Tab/__tests__/Tab.spec.js +1 -1
- package/es/Tab/__tests__/TabContent.spec.js +1 -1
- package/es/Tab/__tests__/TabContentWrapper.spec.js +1 -1
- package/es/Tab/__tests__/TabWrapper.spec.js +1 -1
- package/es/Tab/__tests__/Tabs.spec.js +1 -1
- package/es/Tab/index.js +5 -5
- package/es/Tag/Tag.js +7 -7
- package/es/Tag/__tests__/Tag.spec.js +1 -1
- package/es/Tag/props/propTypes.js +1 -1
- package/es/TextBox/TextBox.js +3 -3
- package/es/TextBox/__tests__/TextBox.spec.js +1 -1
- package/es/TextBoxIcon/TextBoxIcon.js +6 -6
- package/es/TextBoxIcon/__tests__/TextBoxIcon.spec.js +1 -1
- package/es/TextBoxIcon/props/propTypes.js +1 -1
- package/es/Textarea/Textarea.js +3 -3
- package/es/Textarea/__tests__/Textarea.spec.js +1 -1
- package/es/Tooltip/Tooltip.js +6 -6
- package/es/Typography/Typography.js +4 -4
- package/es/Typography/css/cssJSLogic.js +1 -1
- package/es/VelocityAnimation/VelocityAnimation/VelocityAnimation.js +3 -3
- package/es/VelocityAnimation/VelocityAnimation/__tests__/VelocityAnimation.spec.js +1 -1
- package/es/VelocityAnimation/VelocityAnimationGroup/VelocityAnimationGroup.js +3 -3
- package/es/VelocityAnimation/VelocityAnimationGroup/__tests__/VelocityAnimationGroup.spec.js +1 -1
- package/es/VelocityAnimation/index.js +2 -2
- package/es/css.js +37 -37
- package/es/deprecated/PortalLayer/PortalLayer.js +3 -3
- package/es/index.js +39 -39
- package/es/semantic/Button/Button.js +3 -3
- package/es/semantic/Button/__tests__/Button.spec.js +1 -1
- package/es/semantic/index.js +1 -1
- package/es/utils/Common.js +1 -1
- package/es/utils/ContextOptimizer.js +1 -1
- package/es/utils/cssUtils.js +1 -1
- package/es/utils/datetime/common.js +1 -1
- package/es/utils/dropDownUtils.js +1 -1
- package/es/utils/index.js +1 -1
- package/es/v1/Accordion/Accordion.js +2 -2
- package/es/v1/Accordion/AccordionItem.js +4 -4
- package/es/v1/Accordion/index.js +2 -2
- package/es/v1/Animation/Animation.js +3 -3
- package/es/v1/Animation/utils.js +1 -1
- package/es/v1/AppContainer/AppContainer.js +8 -8
- package/es/v1/Avatar/Avatar.js +5 -5
- package/es/v1/AvatarTeam/AvatarTeam.js +4 -4
- package/es/v1/Button/Button.js +4 -4
- package/es/v1/Button/props/defaultProps.js +1 -1
- package/es/v1/Buttongroup/Buttongroup.js +3 -3
- package/es/v1/Card/Card.js +5 -5
- package/es/v1/Card/index.js +4 -4
- package/es/v1/CheckBox/CheckBox.js +6 -6
- package/es/v1/DateTime/CalendarView.js +7 -7
- package/es/v1/DateTime/DateTime.js +15 -15
- package/es/v1/DateTime/DateTimePopupFooter.js +5 -5
- package/es/v1/DateTime/DateTimePopupHeader.js +4 -4
- package/es/v1/DateTime/DateWidget.js +17 -17
- package/es/v1/DateTime/DaysRow.js +3 -3
- package/es/v1/DateTime/Time.js +5 -5
- package/es/v1/DateTime/YearView.js +6 -6
- package/es/v1/DateTime/index.js +1 -1
- package/es/v1/DateTime/props/propTypes.js +1 -1
- package/es/v1/DropBox/DropBox.js +9 -9
- package/es/v1/DropBox/DropBoxElement/DropBoxElement.js +6 -6
- package/es/v1/DropBox/props/defaultProps.js +1 -1
- package/es/v1/DropBox/props/propTypes.js +1 -1
- package/es/v1/DropBox/utils/isMobilePopover.js +1 -1
- package/es/v1/DropDown/DropDown.js +4 -4
- package/es/v1/DropDown/DropDownHeading.js +3 -3
- package/es/v1/DropDown/DropDownItem.js +3 -3
- package/es/v1/DropDown/DropDownSearch.js +4 -4
- package/es/v1/DropDown/DropDownSeparator.js +2 -2
- package/es/v1/DropDown/props/propTypes.js +1 -1
- package/es/v1/Heading/Heading.js +4 -4
- package/es/v1/Label/Label.js +4 -4
- package/es/v1/Layout/Box.js +4 -4
- package/es/v1/Layout/Container.js +4 -4
- package/es/v1/Layout/index.js +2 -2
- package/es/v1/ListItem/ListContainer.js +6 -6
- package/es/v1/ListItem/ListItem.js +5 -5
- package/es/v1/ListItem/ListItemWithAvatar.js +7 -7
- package/es/v1/ListItem/ListItemWithCheckBox.js +6 -6
- package/es/v1/ListItem/ListItemWithIcon.js +5 -5
- package/es/v1/ListItem/ListItemWithRadio.js +6 -6
- package/es/v1/ListItem/index.js +6 -6
- package/es/v1/Modal/Modal.js +3 -3
- package/es/v1/MultiSelect/AdvancedGroupMultiSelect.js +17 -17
- package/es/v1/MultiSelect/AdvancedMultiSelect.js +17 -17
- package/es/v1/MultiSelect/EmptyState.js +3 -3
- package/es/v1/MultiSelect/MobileHeader/MobileHeader.js +5 -5
- package/es/v1/MultiSelect/MultiSelect.js +19 -19
- package/es/v1/MultiSelect/MultiSelectHeader.js +4 -4
- package/es/v1/MultiSelect/MultiSelectWithAvatar.js +16 -16
- package/es/v1/MultiSelect/SelectedOptions.js +5 -5
- package/es/v1/MultiSelect/Suggestions.js +6 -6
- package/es/v1/MultiSelect/index.js +4 -4
- package/es/v1/MultiSelect/props/defaultProps.js +1 -1
- package/es/v1/PopOver/PopOver.js +6 -6
- package/es/v1/Popup/Popup.js +3 -3
- package/es/v1/Radio/Radio.js +5 -5
- package/es/v1/Radio/props/propTypes.js +1 -1
- package/es/v1/ResponsiveDropBox/ResponsiveDropBox.js +6 -6
- package/es/v1/ResponsiveDropBox/props/propTypes.js +1 -1
- package/es/v1/Ribbon/Ribbon.js +3 -3
- package/es/v1/RippleEffect/RippleEffect.js +4 -4
- package/es/v1/Select/GroupSelect.js +16 -16
- package/es/v1/Select/Select.js +15 -15
- package/es/v1/Select/SelectWithAvatar.js +17 -17
- package/es/v1/Select/SelectWithIcon.js +13 -13
- package/es/v1/Select/index.js +4 -4
- package/es/v1/Select/props/defaultProps.js +1 -1
- package/es/v1/Stencils/Stencils.js +3 -3
- package/es/v1/Switch/Switch.js +5 -5
- package/es/v1/Tab/Tab.js +5 -5
- package/es/v1/Tab/TabContent.js +4 -4
- package/es/v1/Tab/TabContentWrapper.js +3 -3
- package/es/v1/Tab/TabWrapper.js +3 -3
- package/es/v1/Tab/Tabs.js +13 -13
- package/es/v1/Tab/index.js +5 -5
- package/es/v1/Tag/Tag.js +7 -7
- package/es/v1/TextBox/TextBox.js +3 -3
- package/es/v1/TextBoxIcon/TextBoxIcon.js +6 -6
- package/es/v1/TextBoxIcon/props/propTypes.js +1 -1
- package/es/v1/Textarea/Textarea.js +3 -3
- package/es/v1/Tooltip/Tooltip.js +6 -6
- package/es/v1/Typography/Typography.js +4 -4
- package/es/v1/Typography/css/cssJSLogic.js +1 -1
- package/es/v1/VelocityAnimation/VelocityAnimation/VelocityAnimation.js +3 -3
- package/es/v1/VelocityAnimation/VelocityAnimationGroup/VelocityAnimationGroup.js +3 -3
- package/es/v1/semantic/Button/Button.js +3 -3
- package/es/v1/semantic/index.js +1 -1
- package/lib/AvatarTeam/AvatarTeam.js +1 -1
- package/lib/ListItem/ListItemWithAvatar.js +2 -2
- package/lib/ListItem/ListItemWithCheckBox.js +1 -1
- package/lib/ListItem/ListItemWithRadio.js +1 -1
- package/lib/Popup/Popup.js +83 -115
- package/lib/Radio/props/propTypes.js +1 -1
- package/lib/v1/Radio/props/propTypes.js +1 -1
- package/package.json +1 -1
- package/result.json +1 -1
|
@@ -9,7 +9,7 @@ exports["default"] = void 0;
|
|
|
9
9
|
|
|
10
10
|
var _react = _interopRequireDefault(require("react"));
|
|
11
11
|
|
|
12
|
-
var _Radio = _interopRequireDefault(require("
|
|
12
|
+
var _Radio = _interopRequireDefault(require("@zohodesk/components/es/Radio/Radio"));
|
|
13
13
|
|
|
14
14
|
var _Layout = require("../Layout");
|
|
15
15
|
|
package/lib/Popup/Popup.js
CHANGED
|
@@ -97,35 +97,6 @@ var defaultState = {
|
|
|
97
97
|
//{height: ‘’, width: ‘’,}
|
|
98
98
|
isAbsolutePositioningNeeded: true
|
|
99
99
|
};
|
|
100
|
-
var SCROLL_BLOCK_EVENTS = Object.freeze([{
|
|
101
|
-
name: 'wheel',
|
|
102
|
-
handlerName: 'handleBlockScroll',
|
|
103
|
-
options: {
|
|
104
|
-
capture: true,
|
|
105
|
-
passive: false
|
|
106
|
-
}
|
|
107
|
-
}, {
|
|
108
|
-
name: 'touchmove',
|
|
109
|
-
handlerName: 'handleBlockScroll',
|
|
110
|
-
options: {
|
|
111
|
-
capture: true,
|
|
112
|
-
passive: false
|
|
113
|
-
}
|
|
114
|
-
}, {
|
|
115
|
-
name: 'scroll',
|
|
116
|
-
handlerName: 'handlePositionChange',
|
|
117
|
-
options: {
|
|
118
|
-
capture: true,
|
|
119
|
-
passive: false
|
|
120
|
-
}
|
|
121
|
-
}, {
|
|
122
|
-
name: 'keydown',
|
|
123
|
-
handlerName: 'preventKeyboardScroll',
|
|
124
|
-
options: {
|
|
125
|
-
capture: true,
|
|
126
|
-
passive: false
|
|
127
|
-
}
|
|
128
|
-
}]);
|
|
129
100
|
/* eslint-disable react/no-deprecated */
|
|
130
101
|
|
|
131
102
|
/* eslint-disable react/prop-types */
|
|
@@ -201,7 +172,6 @@ var Popup = function Popup(Component) {
|
|
|
201
172
|
_this.handleBlockScroll = _this.handleBlockScroll.bind(_assertThisInitialized(_this));
|
|
202
173
|
_this.handlePositionChange = _this.handlePositionChange.bind(_assertThisInitialized(_this));
|
|
203
174
|
_this.preventKeyboardScroll = _this.preventKeyboardScroll.bind(_assertThisInitialized(_this));
|
|
204
|
-
_this.updateListeners = _this.updateListeners.bind(_assertThisInitialized(_this));
|
|
205
175
|
_this.addScrollBlockListeners = _this.addScrollBlockListeners.bind(_assertThisInitialized(_this));
|
|
206
176
|
_this.removeScrollBlockListeners = _this.removeScrollBlockListeners.bind(_assertThisInitialized(_this));
|
|
207
177
|
_this.handleAddingScrollBlock = _this.handleAddingScrollBlock.bind(_assertThisInitialized(_this));
|
|
@@ -457,47 +427,45 @@ var Popup = function Popup(Component) {
|
|
|
457
427
|
this.handlePopupPosition(defaultPosition, true);
|
|
458
428
|
}
|
|
459
429
|
}
|
|
460
|
-
}, {
|
|
461
|
-
key: "updateListeners",
|
|
462
|
-
value: function updateListeners() {
|
|
463
|
-
var _this3 = this;
|
|
464
|
-
|
|
465
|
-
var add = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true;
|
|
466
|
-
var method = add ? 'addEventListener' : 'removeEventListener';
|
|
467
|
-
|
|
468
|
-
var applyListeners = function applyListeners(target) {
|
|
469
|
-
SCROLL_BLOCK_EVENTS.forEach(function (_ref5) {
|
|
470
|
-
var name = _ref5.name,
|
|
471
|
-
handlerName = _ref5.handlerName,
|
|
472
|
-
options = _ref5.options;
|
|
473
|
-
var handler = _this3[handlerName];
|
|
474
|
-
|
|
475
|
-
if (handler) {
|
|
476
|
-
target[method](name, handler, options);
|
|
477
|
-
}
|
|
478
|
-
});
|
|
479
|
-
}; // Main document
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
applyListeners(document); // Attach event listeners to all iframes within elements that have the attribute data-scroll=true
|
|
483
|
-
|
|
484
|
-
document.querySelectorAll('[data-scroll=true] iframe').forEach(function (frame) {
|
|
485
|
-
var frameDocument = frame.contentDocument;
|
|
486
|
-
|
|
487
|
-
if (frameDocument) {
|
|
488
|
-
applyListeners(frameDocument);
|
|
489
|
-
}
|
|
490
|
-
});
|
|
491
|
-
}
|
|
492
430
|
}, {
|
|
493
431
|
key: "addScrollBlockListeners",
|
|
494
432
|
value: function addScrollBlockListeners() {
|
|
495
|
-
this.
|
|
433
|
+
document.addEventListener('wheel', this.handleBlockScroll, {
|
|
434
|
+
capture: true,
|
|
435
|
+
passive: false
|
|
436
|
+
});
|
|
437
|
+
document.addEventListener('touchmove', this.handleBlockScroll, {
|
|
438
|
+
capture: true,
|
|
439
|
+
passive: false
|
|
440
|
+
});
|
|
441
|
+
document.addEventListener('scroll', this.handlePositionChange, {
|
|
442
|
+
capture: true,
|
|
443
|
+
passive: false
|
|
444
|
+
});
|
|
445
|
+
document.addEventListener('keydown', this.preventKeyboardScroll, {
|
|
446
|
+
capture: true,
|
|
447
|
+
passive: false
|
|
448
|
+
});
|
|
496
449
|
}
|
|
497
450
|
}, {
|
|
498
451
|
key: "removeScrollBlockListeners",
|
|
499
452
|
value: function removeScrollBlockListeners() {
|
|
500
|
-
this.
|
|
453
|
+
document.removeEventListener('wheel', this.handleBlockScroll, {
|
|
454
|
+
capture: true,
|
|
455
|
+
passive: false
|
|
456
|
+
});
|
|
457
|
+
document.removeEventListener('touchmove', this.handleBlockScroll, {
|
|
458
|
+
capture: true,
|
|
459
|
+
passive: false
|
|
460
|
+
});
|
|
461
|
+
document.removeEventListener('scroll', this.handlePositionChange, {
|
|
462
|
+
capture: true,
|
|
463
|
+
passive: false
|
|
464
|
+
});
|
|
465
|
+
document.removeEventListener('keydown', this.preventKeyboardScroll, {
|
|
466
|
+
capture: true,
|
|
467
|
+
passive: false
|
|
468
|
+
});
|
|
501
469
|
}
|
|
502
470
|
}, {
|
|
503
471
|
key: "handleBlockScroll",
|
|
@@ -604,7 +572,7 @@ var Popup = function Popup(Component) {
|
|
|
604
572
|
}, {
|
|
605
573
|
key: "togglePopup",
|
|
606
574
|
value: function togglePopup(e, defaultPosition) {
|
|
607
|
-
var
|
|
575
|
+
var _this3 = this;
|
|
608
576
|
|
|
609
577
|
var group = this.getGroup();
|
|
610
578
|
this.removeClose(e);
|
|
@@ -613,7 +581,7 @@ var Popup = function Popup(Component) {
|
|
|
613
581
|
lastOpenedGroup = !isPopupOpen && lastOpenedGroup.indexOf(group) === -1 ? [group].concat(_toConsumableArray(lastOpenedGroup)) : lastOpenedGroup;
|
|
614
582
|
isPopupOpen && lastOpenedGroup.splice(0, 1);
|
|
615
583
|
groupPopups.forEach(function (popup) {
|
|
616
|
-
if (popup !==
|
|
584
|
+
if (popup !== _this3 && popup.state.isPopupOpen) {
|
|
617
585
|
popup.setState({
|
|
618
586
|
isPopupOpen: false,
|
|
619
587
|
isPopupReady: false
|
|
@@ -783,14 +751,14 @@ var Popup = function Popup(Component) {
|
|
|
783
751
|
}, {
|
|
784
752
|
key: "handlePopupPosition",
|
|
785
753
|
value: function handlePopupPosition() {
|
|
786
|
-
var
|
|
754
|
+
var _this4 = this;
|
|
787
755
|
|
|
788
756
|
var defaultPosition = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'bottomCenter';
|
|
789
757
|
var isUpdatePosition = arguments.length > 1 ? arguments[1] : undefined;
|
|
790
758
|
|
|
791
759
|
// isUpdatePosition --->>> Window resize and dropBox resize and to update the position
|
|
792
|
-
var
|
|
793
|
-
direction =
|
|
760
|
+
var _ref5 = this.context || {},
|
|
761
|
+
direction = _ref5.direction;
|
|
794
762
|
|
|
795
763
|
var placeHolderElement = this.placeHolderElement,
|
|
796
764
|
dropElement = this.dropElement;
|
|
@@ -816,11 +784,11 @@ var Popup = function Popup(Component) {
|
|
|
816
784
|
|
|
817
785
|
var setPosition = function setPosition() {
|
|
818
786
|
requestAnimationFrame(function () {
|
|
819
|
-
var placeHolderElement =
|
|
820
|
-
dropElement =
|
|
821
|
-
var
|
|
822
|
-
position =
|
|
823
|
-
isPopupReady =
|
|
787
|
+
var placeHolderElement = _this4.placeHolderElement,
|
|
788
|
+
dropElement = _this4.dropElement;
|
|
789
|
+
var _this4$state = _this4.state,
|
|
790
|
+
position = _this4$state.position,
|
|
791
|
+
isPopupReady = _this4$state.isPopupReady;
|
|
824
792
|
var scrollContainer = placeHolderElement.closest('[data-scroll=true]') || document.body;
|
|
825
793
|
|
|
826
794
|
var betterPosition = _viewPort["default"].betterView(dropElement, placeHolderElement, defaultPosition, scrollContainer, {
|
|
@@ -829,26 +797,26 @@ var Popup = function Popup(Component) {
|
|
|
829
797
|
customOrder: customOrder
|
|
830
798
|
});
|
|
831
799
|
|
|
832
|
-
var
|
|
833
|
-
view =
|
|
834
|
-
views =
|
|
835
|
-
viewsOffset =
|
|
836
|
-
targetOffset =
|
|
837
|
-
popupOffset =
|
|
800
|
+
var _ref6 = betterPosition || _Common.DUMMY_OBJECT,
|
|
801
|
+
view = _ref6.view,
|
|
802
|
+
views = _ref6.views,
|
|
803
|
+
viewsOffset = _ref6.viewsOffset,
|
|
804
|
+
targetOffset = _ref6.targetOffset,
|
|
805
|
+
popupOffset = _ref6.popupOffset;
|
|
838
806
|
|
|
839
807
|
if (!isAbsolute) {
|
|
840
808
|
if (!isPopupReady) {
|
|
841
|
-
|
|
809
|
+
_this4.updatePopupState(view, views, viewsOffset, targetOffset, popupOffset, isAbsolute);
|
|
842
810
|
}
|
|
843
811
|
|
|
844
812
|
if (!dropElement) {
|
|
845
813
|
return;
|
|
846
814
|
}
|
|
847
815
|
|
|
848
|
-
|
|
816
|
+
_this4.setContainerDynamicPositioning(betterPosition, needArrow);
|
|
849
817
|
} else {
|
|
850
818
|
if (position !== view || !isPopupReady) {
|
|
851
|
-
|
|
819
|
+
_this4.updatePopupState(view, views, viewsOffset, targetOffset, popupOffset, isAbsolute);
|
|
852
820
|
}
|
|
853
821
|
}
|
|
854
822
|
});
|
|
@@ -867,7 +835,7 @@ var Popup = function Popup(Component) {
|
|
|
867
835
|
}, {
|
|
868
836
|
key: "handleOpenPopupPositionChange",
|
|
869
837
|
value: function handleOpenPopupPositionChange() {
|
|
870
|
-
var
|
|
838
|
+
var _this5 = this;
|
|
871
839
|
|
|
872
840
|
Object.keys(popups).forEach(function (groupName) {
|
|
873
841
|
var groupPopups = popups[groupName] || [];
|
|
@@ -884,11 +852,11 @@ var Popup = function Popup(Component) {
|
|
|
884
852
|
if (placeHolderElement && dropElement) {
|
|
885
853
|
var scrollContainer = placeHolderElement.closest('[data-scroll=true]') || document.body;
|
|
886
854
|
requestAnimationFrame(function () {
|
|
887
|
-
var needArrow =
|
|
855
|
+
var needArrow = _this5.getNeedArrow(popup);
|
|
888
856
|
|
|
889
|
-
var isAbsolute =
|
|
857
|
+
var isAbsolute = _this5.getIsAbsolutePopup(popup);
|
|
890
858
|
|
|
891
|
-
var customOrder =
|
|
859
|
+
var customOrder = _this5.getCustomPositionOrder(popup);
|
|
892
860
|
|
|
893
861
|
var isMobile = (0, _isMobilePopover["default"])(true);
|
|
894
862
|
|
|
@@ -898,33 +866,33 @@ var Popup = function Popup(Component) {
|
|
|
898
866
|
customOrder: customOrder
|
|
899
867
|
});
|
|
900
868
|
|
|
901
|
-
var
|
|
902
|
-
view =
|
|
903
|
-
views =
|
|
904
|
-
|
|
905
|
-
viewsOffset =
|
|
906
|
-
targetOffset =
|
|
907
|
-
popupOffset =
|
|
908
|
-
|
|
909
|
-
var
|
|
869
|
+
var _ref7 = betterPosition || {},
|
|
870
|
+
view = _ref7.view,
|
|
871
|
+
views = _ref7.views,
|
|
872
|
+
_ref7$viewsOffset = _ref7.viewsOffset,
|
|
873
|
+
viewsOffset = _ref7$viewsOffset === void 0 ? {} : _ref7$viewsOffset,
|
|
874
|
+
targetOffset = _ref7.targetOffset,
|
|
875
|
+
popupOffset = _ref7.popupOffset;
|
|
876
|
+
|
|
877
|
+
var _ref8 = positionsOffset[position] || {},
|
|
878
|
+
_ref8$left = _ref8.left,
|
|
879
|
+
oldLeft = _ref8$left === void 0 ? '' : _ref8$left,
|
|
880
|
+
_ref8$top = _ref8.top,
|
|
881
|
+
oldTop = _ref8$top === void 0 ? '' : _ref8$top,
|
|
882
|
+
_ref8$bottom = _ref8.bottom,
|
|
883
|
+
oldBottom = _ref8$bottom === void 0 ? '' : _ref8$bottom,
|
|
884
|
+
_ref8$right = _ref8.right,
|
|
885
|
+
oldRight = _ref8$right === void 0 ? '' : _ref8$right;
|
|
886
|
+
|
|
887
|
+
var _ref9 = viewsOffset[view] || {},
|
|
910
888
|
_ref9$left = _ref9.left,
|
|
911
|
-
|
|
889
|
+
left = _ref9$left === void 0 ? '' : _ref9$left,
|
|
912
890
|
_ref9$top = _ref9.top,
|
|
913
|
-
|
|
891
|
+
top = _ref9$top === void 0 ? '' : _ref9$top,
|
|
914
892
|
_ref9$bottom = _ref9.bottom,
|
|
915
|
-
|
|
893
|
+
bottom = _ref9$bottom === void 0 ? '' : _ref9$bottom,
|
|
916
894
|
_ref9$right = _ref9.right,
|
|
917
|
-
|
|
918
|
-
|
|
919
|
-
var _ref10 = viewsOffset[view] || {},
|
|
920
|
-
_ref10$left = _ref10.left,
|
|
921
|
-
left = _ref10$left === void 0 ? '' : _ref10$left,
|
|
922
|
-
_ref10$top = _ref10.top,
|
|
923
|
-
top = _ref10$top === void 0 ? '' : _ref10$top,
|
|
924
|
-
_ref10$bottom = _ref10.bottom,
|
|
925
|
-
bottom = _ref10$bottom === void 0 ? '' : _ref10$bottom,
|
|
926
|
-
_ref10$right = _ref10.right,
|
|
927
|
-
right = _ref10$right === void 0 ? '' : _ref10$right;
|
|
895
|
+
right = _ref9$right === void 0 ? '' : _ref9$right;
|
|
928
896
|
|
|
929
897
|
var changeState = isAbsolute ? position !== view : oldLeft !== left || oldTop !== top || oldBottom !== bottom || oldRight !== right; // let isInViewPort = viewPort.isInViewPort(
|
|
930
898
|
// placeHolderElement,
|
|
@@ -983,11 +951,11 @@ var Popup = function Popup(Component) {
|
|
|
983
951
|
var height = popupSize.height,
|
|
984
952
|
width = popupSize.width;
|
|
985
953
|
|
|
986
|
-
var
|
|
987
|
-
|
|
988
|
-
oldHeight =
|
|
989
|
-
|
|
990
|
-
oldWidth =
|
|
954
|
+
var _ref10 = this.size || {},
|
|
955
|
+
_ref10$height = _ref10.height,
|
|
956
|
+
oldHeight = _ref10$height === void 0 ? 0 : _ref10$height,
|
|
957
|
+
_ref10$width = _ref10.width,
|
|
958
|
+
oldWidth = _ref10$width === void 0 ? 0 : _ref10$width;
|
|
991
959
|
|
|
992
960
|
var _this$state2 = this.state,
|
|
993
961
|
isPopupReady = _this$state2.isPopupReady,
|
|
@@ -39,7 +39,7 @@ var propTypes = {
|
|
|
39
39
|
ariaChecked: _propTypes["default"].bool,
|
|
40
40
|
ariaHidden: _propTypes["default"].bool,
|
|
41
41
|
role: _propTypes["default"].string,
|
|
42
|
-
tabIndex: _propTypes["default"].oneOfType(_propTypes["default"].string, _propTypes["default"].number),
|
|
42
|
+
tabIndex: _propTypes["default"].oneOfType([_propTypes["default"].string, _propTypes["default"].number]),
|
|
43
43
|
ariaLabelledby: _propTypes["default"].string,
|
|
44
44
|
ariaLabel: _propTypes["default"].string,
|
|
45
45
|
ariaReadonly: _propTypes["default"].bool
|
|
@@ -39,7 +39,7 @@ var propTypes = {
|
|
|
39
39
|
ariaChecked: _propTypes["default"].bool,
|
|
40
40
|
ariaHidden: _propTypes["default"].bool,
|
|
41
41
|
role: _propTypes["default"].string,
|
|
42
|
-
tabIndex: _propTypes["default"].oneOfType(_propTypes["default"].string, _propTypes["default"].number),
|
|
42
|
+
tabIndex: _propTypes["default"].oneOfType([_propTypes["default"].string, _propTypes["default"].number]),
|
|
43
43
|
ariaLabelledby: _propTypes["default"].string,
|
|
44
44
|
ariaLabel: _propTypes["default"].string,
|
|
45
45
|
ariaReadonly: _propTypes["default"].bool
|