@zohodesk/components 1.0.0-temp-199.5 → 1.0.0-temp-214
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 +3 -0
- 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/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 +7 -7
- package/es/ListItem/ListItem.module.css +18 -85
- package/es/ListItem/ListItemWithAvatar.js +17 -13
- package/es/ListItem/ListItemWithCheckBox.js +6 -6
- package/es/ListItem/ListItemWithIcon.js +7 -7
- 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 +4 -1
- package/es/Modal/Modal.js +3 -3
- package/es/Modal/__tests__/Modal.spec.js +1 -1
- package/es/MultiSelect/AdvancedGroupMultiSelect.js +19 -24
- package/es/MultiSelect/AdvancedMultiSelect.js +18 -19
- 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 +22 -27
- 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 +10 -14
- 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 +5 -7
- package/es/MultiSelect/props/propTypes.js +3 -6
- 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 +37 -18
- package/es/Popup/intersectionObserver.js +33 -23
- 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 +5 -5
- package/es/Radio/__tests__/Radio.spec.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 +18 -23
- package/es/Select/Select.js +15 -15
- package/es/Select/SelectWithAvatar.js +19 -24
- package/es/Select/SelectWithIcon.js +15 -17
- 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 +3 -5
- package/es/Select/props/propTypes.js +2 -4
- 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/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/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 +18 -19
- package/es/v1/MultiSelect/EmptyState.js +3 -3
- package/es/v1/MultiSelect/MobileHeader/MobileHeader.js +5 -5
- package/es/v1/MultiSelect/MultiSelect.js +21 -26
- 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 +10 -14
- package/es/v1/MultiSelect/index.js +4 -4
- package/es/v1/MultiSelect/props/defaultProps.js +3 -5
- package/es/v1/MultiSelect/props/propTypes.js +2 -6
- 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/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 +18 -23
- package/es/v1/Select/Select.js +15 -15
- package/es/v1/Select/SelectWithAvatar.js +19 -24
- package/es/v1/Select/SelectWithIcon.js +13 -13
- package/es/v1/Select/index.js +4 -4
- package/es/v1/Select/props/defaultProps.js +3 -5
- package/es/v1/Select/props/propTypes.js +2 -6
- 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/ListItem/ListItem.js +2 -2
- package/lib/ListItem/ListItem.module.css +18 -85
- package/lib/ListItem/ListItemWithAvatar.js +11 -7
- package/lib/ListItem/ListItemWithIcon.js +2 -2
- package/lib/ListItem/props/propTypes.js +4 -1
- package/lib/MultiSelect/AdvancedGroupMultiSelect.js +3 -7
- package/lib/MultiSelect/AdvancedMultiSelect.js +1 -3
- package/lib/MultiSelect/MultiSelect.js +3 -6
- package/lib/MultiSelect/Suggestions.js +4 -8
- package/lib/MultiSelect/props/defaultProps.js +4 -6
- package/lib/MultiSelect/props/propTypes.js +6 -8
- package/lib/Popup/Popup.js +32 -14
- package/lib/Popup/intersectionObserver.js +35 -25
- package/lib/Select/GroupSelect.js +3 -8
- package/lib/Select/SelectWithAvatar.js +3 -8
- package/lib/Select/SelectWithIcon.js +3 -5
- package/lib/Select/props/defaultProps.js +2 -4
- package/lib/Select/props/propTypes.js +2 -4
- package/lib/v1/MultiSelect/AdvancedMultiSelect.js +1 -3
- package/lib/v1/MultiSelect/MultiSelect.js +3 -8
- package/lib/v1/MultiSelect/Suggestions.js +4 -8
- package/lib/v1/MultiSelect/props/defaultProps.js +2 -4
- package/lib/v1/MultiSelect/props/propTypes.js +2 -6
- package/lib/v1/Select/GroupSelect.js +3 -8
- package/lib/v1/Select/SelectWithAvatar.js +3 -8
- package/lib/v1/Select/props/defaultProps.js +2 -4
- package/lib/v1/Select/props/propTypes.js +2 -6
- package/package.json +2 -2
- package/result.json +1 -1
package/lib/Popup/Popup.js
CHANGED
|
@@ -158,6 +158,8 @@ var Popup = function Popup(Component) {
|
|
|
158
158
|
_this.preventKeyboardScroll = _this.preventKeyboardScroll.bind(_assertThisInitialized(_this));
|
|
159
159
|
_this.addScrollBlockListeners = _this.addScrollBlockListeners.bind(_assertThisInitialized(_this));
|
|
160
160
|
_this.removeScrollBlockListeners = _this.removeScrollBlockListeners.bind(_assertThisInitialized(_this));
|
|
161
|
+
_this.handleAddingScrollBlock = _this.handleAddingScrollBlock.bind(_assertThisInitialized(_this));
|
|
162
|
+
_this.handleRemovingScrollBlock = _this.handleRemovingScrollBlock.bind(_assertThisInitialized(_this));
|
|
161
163
|
_this.handleIntersectionObserver = _this.handleIntersectionObserver.bind(_assertThisInitialized(_this));
|
|
162
164
|
_this.popupObserver = new _ResizeObserver["default"](_this.handlePopupResize); //dropBoxSize
|
|
163
165
|
|
|
@@ -216,10 +218,7 @@ var Popup = function Popup(Component) {
|
|
|
216
218
|
oldStateOpen = _ref2$isPopupReady === void 0 ? false : _ref2$isPopupReady;
|
|
217
219
|
|
|
218
220
|
var dropElement = this.dropElement;
|
|
219
|
-
var
|
|
220
|
-
propResizeHandling = _this$props.needResizeHandling,
|
|
221
|
-
isAbsolutePositioningNeeded = _this$props.isAbsolutePositioningNeeded,
|
|
222
|
-
isOutsideScrollBlocked = _this$props.isOutsideScrollBlocked;
|
|
221
|
+
var propResizeHandling = this.props.needResizeHandling;
|
|
223
222
|
|
|
224
223
|
if (oldStateOpen !== isPopupReady) {
|
|
225
224
|
if (isPopupReady && dropElement && (propResizeHandling !== undefined ? propResizeHandling : needResizeHandling)) {
|
|
@@ -229,14 +228,10 @@ var Popup = function Popup(Component) {
|
|
|
229
228
|
this.popupObserver.disconnect();
|
|
230
229
|
}
|
|
231
230
|
|
|
232
|
-
if (
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
} else {
|
|
237
|
-
(0, _intersectionObserver.removeIntersectionObserver)(this.placeHolderElement, this.handleIntersectionObserver);
|
|
238
|
-
this.removeScrollBlockListeners();
|
|
239
|
-
}
|
|
231
|
+
if (isPopupReady) {
|
|
232
|
+
this.handleAddingScrollBlock();
|
|
233
|
+
} else {
|
|
234
|
+
this.handleRemovingScrollBlock();
|
|
240
235
|
}
|
|
241
236
|
}
|
|
242
237
|
}
|
|
@@ -258,8 +253,7 @@ var Popup = function Popup(Component) {
|
|
|
258
253
|
|
|
259
254
|
return res;
|
|
260
255
|
}, popups);
|
|
261
|
-
|
|
262
|
-
this.removeScrollBlockListeners();
|
|
256
|
+
this.handleRemovingScrollBlock();
|
|
263
257
|
var noPopups = true;
|
|
264
258
|
|
|
265
259
|
for (var i in popups) {
|
|
@@ -283,6 +277,30 @@ var Popup = function Popup(Component) {
|
|
|
283
277
|
document.removeEventListener('focus', this.handleDocumentFocus, true);
|
|
284
278
|
}
|
|
285
279
|
}
|
|
280
|
+
}, {
|
|
281
|
+
key: "handleAddingScrollBlock",
|
|
282
|
+
value: function handleAddingScrollBlock() {
|
|
283
|
+
var _this$props = this.props,
|
|
284
|
+
isAbsolutePositioningNeeded = _this$props.isAbsolutePositioningNeeded,
|
|
285
|
+
isOutsideScrollBlocked = _this$props.isOutsideScrollBlocked;
|
|
286
|
+
|
|
287
|
+
if (isOutsideScrollBlocked && !isAbsolutePositioningNeeded) {
|
|
288
|
+
(0, _intersectionObserver.addIntersectionObserver)(this.placeHolderElement, this.handleIntersectionObserver);
|
|
289
|
+
this.addScrollBlockListeners();
|
|
290
|
+
}
|
|
291
|
+
}
|
|
292
|
+
}, {
|
|
293
|
+
key: "handleRemovingScrollBlock",
|
|
294
|
+
value: function handleRemovingScrollBlock() {
|
|
295
|
+
var _this$props2 = this.props,
|
|
296
|
+
isAbsolutePositioningNeeded = _this$props2.isAbsolutePositioningNeeded,
|
|
297
|
+
isOutsideScrollBlocked = _this$props2.isOutsideScrollBlocked;
|
|
298
|
+
|
|
299
|
+
if (isOutsideScrollBlocked && !isAbsolutePositioningNeeded) {
|
|
300
|
+
(0, _intersectionObserver.removeIntersectionObserver)(this.placeHolderElement, this.handleIntersectionObserver);
|
|
301
|
+
this.removeScrollBlockListeners();
|
|
302
|
+
}
|
|
303
|
+
}
|
|
286
304
|
}, {
|
|
287
305
|
key: "addScrollBlockListeners",
|
|
288
306
|
value: function addScrollBlockListeners() {
|
|
@@ -22,41 +22,51 @@ var observerCallbacks = null;
|
|
|
22
22
|
var intersectionObserver = null;
|
|
23
23
|
|
|
24
24
|
function handleObserverCallbacks(entries) {
|
|
25
|
-
entries.
|
|
25
|
+
entries.forEach(function (entry) {
|
|
26
26
|
var oldCallbacks = observerCallbacks.get(entry.target);
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
27
|
+
|
|
28
|
+
if (Array.isArray(oldCallbacks) && oldCallbacks.length) {
|
|
29
|
+
oldCallbacks.forEach(function (callback) {
|
|
30
|
+
callback && callback(entry);
|
|
31
|
+
});
|
|
32
|
+
}
|
|
30
33
|
});
|
|
31
34
|
}
|
|
32
35
|
|
|
33
36
|
function addIntersectionObserver(element, callback, options) {
|
|
34
|
-
if (
|
|
35
|
-
intersectionObserver
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
37
|
+
if (!!element && typeof callback == 'function') {
|
|
38
|
+
if (intersectionObserver === null && observerCallbacks === null) {
|
|
39
|
+
intersectionObserver = new IntersectionObserver(function (entries) {
|
|
40
|
+
handleObserverCallbacks(entries);
|
|
41
|
+
}, options);
|
|
42
|
+
observerCallbacks = new Map();
|
|
43
|
+
}
|
|
40
44
|
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
45
|
+
intersectionObserver.observe(element);
|
|
46
|
+
var oldCallbacks = observerCallbacks.get(element) || [];
|
|
47
|
+
observerCallbacks.set(element, [].concat(_toConsumableArray(oldCallbacks), [callback]));
|
|
48
|
+
}
|
|
44
49
|
}
|
|
45
50
|
|
|
46
51
|
function removeIntersectionObserver(element, callback) {
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
return handler !== callback;
|
|
50
|
-
});
|
|
52
|
+
if (!!element && typeof callback == 'function') {
|
|
53
|
+
var oldCallbacks = observerCallbacks ? observerCallbacks.get(element) : null;
|
|
51
54
|
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
55
|
+
if (Array.isArray(oldCallbacks)) {
|
|
56
|
+
var callbacks = oldCallbacks.filter(function (handler) {
|
|
57
|
+
return handler !== callback;
|
|
58
|
+
});
|
|
59
|
+
|
|
60
|
+
if (intersectionObserver && callbacks.length === 0) {
|
|
61
|
+
observerCallbacks["delete"](element);
|
|
62
|
+
intersectionObserver.unobserve(element);
|
|
63
|
+
}
|
|
64
|
+
}
|
|
56
65
|
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
66
|
+
if (intersectionObserver && observerCallbacks && observerCallbacks.size === 0) {
|
|
67
|
+
intersectionObserver.disconnect();
|
|
68
|
+
intersectionObserver = null;
|
|
69
|
+
observerCallbacks = null;
|
|
70
|
+
}
|
|
61
71
|
}
|
|
62
72
|
}
|
|
@@ -51,8 +51,6 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "functio
|
|
|
51
51
|
|
|
52
52
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
53
53
|
|
|
54
|
-
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); }
|
|
55
|
-
|
|
56
54
|
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
57
55
|
|
|
58
56
|
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
@@ -666,10 +664,7 @@ var GroupSelectComponent = /*#__PURE__*/function (_PureComponent) {
|
|
|
666
664
|
htmlId = _this$props9.htmlId,
|
|
667
665
|
iconOnHover = _this$props9.iconOnHover,
|
|
668
666
|
isLoading = _this$props9.isLoading,
|
|
669
|
-
dataSelectorId = _this$props9.dataSelectorId
|
|
670
|
-
customProps = _this$props9.customProps;
|
|
671
|
-
var _customProps$suggesti = customProps.suggestionsProps,
|
|
672
|
-
suggestionsProps = _customProps$suggesti === void 0 ? {} : _customProps$suggesti;
|
|
667
|
+
dataSelectorId = _this$props9.dataSelectorId;
|
|
673
668
|
i18nKeys = Object.assign({}, i18nKeys, {
|
|
674
669
|
emptyText: i18nKeys.emptyText || emptyMessage,
|
|
675
670
|
searchEmptyText: i18nKeys.searchEmptyText || searchEmptyMessage
|
|
@@ -842,7 +837,7 @@ var GroupSelectComponent = /*#__PURE__*/function (_PureComponent) {
|
|
|
842
837
|
a11y: {
|
|
843
838
|
role: 'heading'
|
|
844
839
|
}
|
|
845
|
-
})), /*#__PURE__*/_react["default"].createElement(_Suggestions["default"],
|
|
840
|
+
})), /*#__PURE__*/_react["default"].createElement(_Suggestions["default"], {
|
|
846
841
|
activeId: selectedId,
|
|
847
842
|
suggestions: options,
|
|
848
843
|
getRef: _this7.suggestionItemRef,
|
|
@@ -858,7 +853,7 @@ var GroupSelectComponent = /*#__PURE__*/function (_PureComponent) {
|
|
|
858
853
|
role: 'option'
|
|
859
854
|
},
|
|
860
855
|
dataId: "".concat(dataId, "_Options")
|
|
861
|
-
}
|
|
856
|
+
}));
|
|
862
857
|
}) : /*#__PURE__*/_react["default"].createElement(_EmptyState["default"], {
|
|
863
858
|
options: revampedGroups,
|
|
864
859
|
searchString: searchStr,
|
|
@@ -51,8 +51,6 @@ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj &&
|
|
|
51
51
|
|
|
52
52
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
53
53
|
|
|
54
|
-
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); }
|
|
55
|
-
|
|
56
54
|
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
57
55
|
|
|
58
56
|
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); } }
|
|
@@ -215,10 +213,7 @@ var SelectWithAvatarComponent = /*#__PURE__*/function (_SelectComponent) {
|
|
|
215
213
|
needEffect = _this$props.needEffect,
|
|
216
214
|
isLoading = _this$props.isLoading,
|
|
217
215
|
dataSelectorId = _this$props.dataSelectorId,
|
|
218
|
-
getTargetRef = _this$props.getTargetRef
|
|
219
|
-
customProps = _this$props.customProps;
|
|
220
|
-
var _customProps$suggesti = customProps.suggestionsProps,
|
|
221
|
-
suggestionsProps = _customProps$suggesti === void 0 ? {} : _customProps$suggesti;
|
|
216
|
+
getTargetRef = _this$props.getTargetRef;
|
|
222
217
|
i18nKeys = Object.assign({}, i18nKeys, {
|
|
223
218
|
emptyText: i18nKeys.emptyText || emptyMessage,
|
|
224
219
|
searchEmptyText: i18nKeys.searchEmptyText || searchEmptyMessage
|
|
@@ -357,7 +352,7 @@ var SelectWithAvatarComponent = /*#__PURE__*/function (_SelectComponent) {
|
|
|
357
352
|
a11y: {
|
|
358
353
|
role: 'heading'
|
|
359
354
|
}
|
|
360
|
-
})) : null, suggestions.length ? /*#__PURE__*/_react["default"].createElement(_Suggestions["default"],
|
|
355
|
+
})) : null, suggestions.length ? /*#__PURE__*/_react["default"].createElement(_Suggestions["default"], {
|
|
361
356
|
dataId: "".concat(dataId, "_Options"),
|
|
362
357
|
activeId: selectedId,
|
|
363
358
|
suggestions: suggestions,
|
|
@@ -374,7 +369,7 @@ var SelectWithAvatarComponent = /*#__PURE__*/function (_SelectComponent) {
|
|
|
374
369
|
ariaParentRole: 'listbox',
|
|
375
370
|
role: 'option'
|
|
376
371
|
}
|
|
377
|
-
}
|
|
372
|
+
}) : /*#__PURE__*/_react["default"].createElement(_EmptyState["default"], {
|
|
378
373
|
isLoading: isFetchingOptions,
|
|
379
374
|
options: options,
|
|
380
375
|
searchString: searchStr,
|
|
@@ -440,9 +440,7 @@ var SelectWithIcon = /*#__PURE__*/function (_Component) {
|
|
|
440
440
|
_customProps$Dropdown = customProps.DropdownSearchTextBoxProps,
|
|
441
441
|
DropdownSearchTextBoxProps = _customProps$Dropdown === void 0 ? {} : _customProps$Dropdown,
|
|
442
442
|
_customProps$TextBoxI = customProps.TextBoxIconProps,
|
|
443
|
-
TextBoxIconProps = _customProps$TextBoxI === void 0 ? {} : _customProps$TextBoxI
|
|
444
|
-
_customProps$listItem = customProps.listItemProps,
|
|
445
|
-
listItemProps = _customProps$listItem === void 0 ? {} : _customProps$listItem;
|
|
443
|
+
TextBoxIconProps = _customProps$TextBoxI === void 0 ? {} : _customProps$TextBoxI;
|
|
446
444
|
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
447
445
|
className: "".concat(_SelectModule["default"].container, " ").concat(_SelectModule["default"]["box_".concat(size)], " ").concat(isReadOnly ? _SelectModule["default"].readonly : '', " ").concat(borderColor === 'transparent' ? _SelectModule["default"].transparentContainer : ''),
|
|
448
446
|
"data-title": isDisabled ? title : null,
|
|
@@ -575,7 +573,7 @@ var SelectWithIcon = /*#__PURE__*/function (_Component) {
|
|
|
575
573
|
var iconName = options.iconName,
|
|
576
574
|
iconSize = options.iconSize,
|
|
577
575
|
iconColor = options.iconColor;
|
|
578
|
-
return /*#__PURE__*/_react["default"].createElement(_ListItemWithIcon["default"],
|
|
576
|
+
return /*#__PURE__*/_react["default"].createElement(_ListItemWithIcon["default"], {
|
|
579
577
|
key: options[idKey],
|
|
580
578
|
value: options[valueKey],
|
|
581
579
|
size: "medium",
|
|
@@ -599,7 +597,7 @@ var SelectWithIcon = /*#__PURE__*/function (_Component) {
|
|
|
599
597
|
ariaSelected: selectedId === options[idKey],
|
|
600
598
|
ariaLabel: options[valueKey]
|
|
601
599
|
}
|
|
602
|
-
}
|
|
600
|
+
});
|
|
603
601
|
})) : /*#__PURE__*/_react["default"].createElement(_EmptyState["default"], {
|
|
604
602
|
isLoading: isFetchingOptions,
|
|
605
603
|
options: options,
|
|
@@ -82,8 +82,7 @@ var GroupSelect_defaultProps = {
|
|
|
82
82
|
isRestrictScroll: false,
|
|
83
83
|
i18nKeys: {},
|
|
84
84
|
iconOnHover: false,
|
|
85
|
-
isLoading: false
|
|
86
|
-
customProps: {}
|
|
85
|
+
isLoading: false
|
|
87
86
|
};
|
|
88
87
|
exports.GroupSelect_defaultProps = GroupSelect_defaultProps;
|
|
89
88
|
var SelectWithAvatar_defaultProps = {
|
|
@@ -110,8 +109,7 @@ var SelectWithAvatar_defaultProps = {
|
|
|
110
109
|
isRestrictScroll: false,
|
|
111
110
|
i18nKeys: {},
|
|
112
111
|
needEffect: true,
|
|
113
|
-
isLoading: false
|
|
114
|
-
customProps: {}
|
|
112
|
+
isLoading: false
|
|
115
113
|
};
|
|
116
114
|
exports.SelectWithAvatar_defaultProps = SelectWithAvatar_defaultProps;
|
|
117
115
|
var SelectWithIcon_defaultProps = (_SelectWithIcon_defau = {
|
|
@@ -191,8 +191,7 @@ var GroupSelect_propTypes = {
|
|
|
191
191
|
}),
|
|
192
192
|
isLoading: _propTypes["default"].bool,
|
|
193
193
|
dataSelectorId: _propTypes["default"].string,
|
|
194
|
-
isDefaultSelectValue: _propTypes["default"].bool
|
|
195
|
-
customProps: _propTypes["default"].string
|
|
194
|
+
isDefaultSelectValue: _propTypes["default"].bool
|
|
196
195
|
};
|
|
197
196
|
exports.GroupSelect_propTypes = GroupSelect_propTypes;
|
|
198
197
|
|
|
@@ -255,8 +254,7 @@ var SelectWithAvatar_propTypes = _objectSpread(_objectSpread({}, Select_propType
|
|
|
255
254
|
htmlId: _propTypes["default"].string,
|
|
256
255
|
needEffect: _propTypes["default"].bool,
|
|
257
256
|
isLoading: _propTypes["default"].bool,
|
|
258
|
-
dataSelectorId: _propTypes["default"].string
|
|
259
|
-
customProps: _propTypes["default"].string
|
|
257
|
+
dataSelectorId: _propTypes["default"].string
|
|
260
258
|
});
|
|
261
259
|
|
|
262
260
|
exports.SelectWithAvatar_propTypes = SelectWithAvatar_propTypes;
|
|
@@ -611,9 +611,7 @@ var AdvancedMultiSelectComponent = /*#__PURE__*/function (_MultiSelectComponent)
|
|
|
611
611
|
role: 'option'
|
|
612
612
|
},
|
|
613
613
|
dataId: "".concat(dataIdMultiSelectComp, "_Options")
|
|
614
|
-
}, SuggestionsProps, {
|
|
615
|
-
needMultiLineText: true
|
|
616
|
-
})) : /*#__PURE__*/_react["default"].createElement(_EmptyState["default"], {
|
|
614
|
+
}, SuggestionsProps)) : /*#__PURE__*/_react["default"].createElement(_EmptyState["default"], {
|
|
617
615
|
isLoading: isFetchingOptions,
|
|
618
616
|
options: options,
|
|
619
617
|
searchString: searchStr,
|
|
@@ -57,8 +57,6 @@ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj &&
|
|
|
57
57
|
|
|
58
58
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
59
59
|
|
|
60
|
-
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); }
|
|
61
|
-
|
|
62
60
|
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
63
61
|
|
|
64
62
|
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
@@ -1090,10 +1088,7 @@ var MultiSelectComponent = /*#__PURE__*/function (_React$Component) {
|
|
|
1090
1088
|
boxSize = _this$props15.boxSize,
|
|
1091
1089
|
isLoading = _this$props15.isLoading,
|
|
1092
1090
|
selectAllText = _this$props15.selectAllText,
|
|
1093
|
-
needSelectAll = _this$props15.needSelectAll
|
|
1094
|
-
customProps = _this$props15.customProps;
|
|
1095
|
-
var _customProps$suggesti = customProps.suggestionsProps,
|
|
1096
|
-
suggestionsProps = _customProps$suggesti === void 0 ? {} : _customProps$suggesti;
|
|
1091
|
+
needSelectAll = _this$props15.needSelectAll;
|
|
1097
1092
|
var _this$state9 = this.state,
|
|
1098
1093
|
selectedOptions = _this$state9.selectedOptions,
|
|
1099
1094
|
searchStr = _this$state9.searchStr,
|
|
@@ -1170,7 +1165,7 @@ var MultiSelectComponent = /*#__PURE__*/function (_React$Component) {
|
|
|
1170
1165
|
eleRef: this.suggestionContainerRef
|
|
1171
1166
|
}, isSearching ? /*#__PURE__*/_react["default"].createElement("div", {
|
|
1172
1167
|
className: _MultiSelectModule["default"][palette]
|
|
1173
|
-
}, searchText) : suggestions.length ? /*#__PURE__*/_react["default"].createElement(_Suggestions["default"],
|
|
1168
|
+
}, searchText) : suggestions.length ? /*#__PURE__*/_react["default"].createElement(_Suggestions["default"], {
|
|
1174
1169
|
suggestions: suggestions,
|
|
1175
1170
|
getRef: this.suggestionItemRef,
|
|
1176
1171
|
hoverOption: hoverOption,
|
|
@@ -1183,7 +1178,7 @@ var MultiSelectComponent = /*#__PURE__*/function (_React$Component) {
|
|
|
1183
1178
|
a11y: {
|
|
1184
1179
|
role: 'option'
|
|
1185
1180
|
}
|
|
1186
|
-
}
|
|
1181
|
+
}) : /*#__PURE__*/_react["default"].createElement(_EmptyState["default"], {
|
|
1187
1182
|
isLoading: isFetchingOptions,
|
|
1188
1183
|
options: options,
|
|
1189
1184
|
searchString: searchStr,
|
|
@@ -83,8 +83,7 @@ var Suggestions = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
83
83
|
avatarPalette = _this$props.avatarPalette,
|
|
84
84
|
palette = _this$props.palette,
|
|
85
85
|
htmlId = _this$props.htmlId,
|
|
86
|
-
a11y = _this$props.a11y
|
|
87
|
-
needMultiLineText = _this$props.needMultiLineText;
|
|
86
|
+
a11y = _this$props.a11y;
|
|
88
87
|
var ariaParentRole = a11y.ariaParentRole,
|
|
89
88
|
ariaMultiselectable = a11y.ariaMultiselectable;
|
|
90
89
|
return /*#__PURE__*/_react["default"].createElement(_Layout.Container, {
|
|
@@ -144,8 +143,7 @@ var Suggestions = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
144
143
|
size: listItemSize,
|
|
145
144
|
avatarPalette: avatarPalette,
|
|
146
145
|
palette: palette,
|
|
147
|
-
a11y: list_a11y
|
|
148
|
-
needMultiLineText: needMultiLineText
|
|
146
|
+
a11y: list_a11y
|
|
149
147
|
}));
|
|
150
148
|
} else if (optionType === 'icon') {
|
|
151
149
|
return /*#__PURE__*/_react["default"].createElement(_ListItemWithIcon["default"], _extends({}, commonProps, {
|
|
@@ -165,8 +163,7 @@ var Suggestions = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
165
163
|
iconSize: iconSize,
|
|
166
164
|
size: listItemSize,
|
|
167
165
|
palette: palette,
|
|
168
|
-
a11y: list_a11y
|
|
169
|
-
needMultiLineText: needMultiLineText
|
|
166
|
+
a11y: list_a11y
|
|
170
167
|
}));
|
|
171
168
|
}
|
|
172
169
|
|
|
@@ -185,8 +182,7 @@ var Suggestions = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
185
182
|
active: isActive,
|
|
186
183
|
size: listItemSize,
|
|
187
184
|
palette: palette,
|
|
188
|
-
a11y: list_a11y
|
|
189
|
-
needMultiLineText: needMultiLineText
|
|
185
|
+
a11y: list_a11y
|
|
190
186
|
}));
|
|
191
187
|
})));
|
|
192
188
|
}
|
|
@@ -128,8 +128,7 @@ var MultiSelect_defaultProps = {
|
|
|
128
128
|
keepSelectedOptions: false,
|
|
129
129
|
selectedOptionsCount: 0,
|
|
130
130
|
cardHeaderName: '',
|
|
131
|
-
needResponsive: true
|
|
132
|
-
customProps: {}
|
|
131
|
+
needResponsive: true
|
|
133
132
|
};
|
|
134
133
|
exports.MultiSelect_defaultProps = MultiSelect_defaultProps;
|
|
135
134
|
var MultiSelectHeader_defaultProps = {
|
|
@@ -177,7 +176,6 @@ var SelectedOptions_defaultProps = {
|
|
|
177
176
|
};
|
|
178
177
|
exports.SelectedOptions_defaultProps = SelectedOptions_defaultProps;
|
|
179
178
|
var Suggestions_defaultProps = {
|
|
180
|
-
a11y: {}
|
|
181
|
-
needMultiLineText: false
|
|
179
|
+
a11y: {}
|
|
182
180
|
};
|
|
183
181
|
exports.Suggestions_defaultProps = Suggestions_defaultProps;
|
|
@@ -125,10 +125,7 @@ var MultiSelect_propTypes = {
|
|
|
125
125
|
needSelectAll: _propTypes["default"].bool,
|
|
126
126
|
selectAllText: _propTypes["default"].string,
|
|
127
127
|
setAriaId: _propTypes["default"].string,
|
|
128
|
-
ariaErrorId: _propTypes["default"].string
|
|
129
|
-
customProps: {
|
|
130
|
-
suggestionsProps: _propTypes["default"].object
|
|
131
|
-
}
|
|
128
|
+
ariaErrorId: _propTypes["default"].string
|
|
132
129
|
};
|
|
133
130
|
exports.MultiSelect_propTypes = MultiSelect_propTypes;
|
|
134
131
|
var MultiSelectHeader_propTypes = {
|
|
@@ -198,8 +195,7 @@ var Suggestions_propTypes = {
|
|
|
198
195
|
logo: _propTypes["default"].string,
|
|
199
196
|
optionType: _propTypes["default"].string,
|
|
200
197
|
listItemProps: _propTypes["default"].object
|
|
201
|
-
}))
|
|
202
|
-
needMultiLineText: _propTypes["default"].bool
|
|
198
|
+
}))
|
|
203
199
|
};
|
|
204
200
|
exports.Suggestions_propTypes = Suggestions_propTypes;
|
|
205
201
|
|
|
@@ -51,8 +51,6 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "functio
|
|
|
51
51
|
|
|
52
52
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
53
53
|
|
|
54
|
-
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); }
|
|
55
|
-
|
|
56
54
|
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
57
55
|
|
|
58
56
|
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
@@ -668,10 +666,7 @@ var GroupSelectComponent = /*#__PURE__*/function (_PureComponent) {
|
|
|
668
666
|
htmlId = _this$props9.htmlId,
|
|
669
667
|
iconOnHover = _this$props9.iconOnHover,
|
|
670
668
|
isLoading = _this$props9.isLoading,
|
|
671
|
-
dataSelectorId = _this$props9.dataSelectorId
|
|
672
|
-
customProps = _this$props9.customProps;
|
|
673
|
-
var _customProps$suggesti = customProps.suggestionsProps,
|
|
674
|
-
suggestionsProps = _customProps$suggesti === void 0 ? {} : _customProps$suggesti;
|
|
669
|
+
dataSelectorId = _this$props9.dataSelectorId;
|
|
675
670
|
i18nKeys = Object.assign({}, i18nKeys, {
|
|
676
671
|
emptyText: i18nKeys.emptyText || emptyMessage,
|
|
677
672
|
searchEmptyText: i18nKeys.searchEmptyText || searchEmptyMessage
|
|
@@ -844,7 +839,7 @@ var GroupSelectComponent = /*#__PURE__*/function (_PureComponent) {
|
|
|
844
839
|
a11y: {
|
|
845
840
|
role: 'heading'
|
|
846
841
|
}
|
|
847
|
-
})), /*#__PURE__*/_react["default"].createElement(_Suggestions["default"],
|
|
842
|
+
})), /*#__PURE__*/_react["default"].createElement(_Suggestions["default"], {
|
|
848
843
|
activeId: selectedId,
|
|
849
844
|
suggestions: options,
|
|
850
845
|
getRef: _this7.suggestionItemRef,
|
|
@@ -860,7 +855,7 @@ var GroupSelectComponent = /*#__PURE__*/function (_PureComponent) {
|
|
|
860
855
|
role: 'option'
|
|
861
856
|
},
|
|
862
857
|
dataId: "".concat(dataId, "_Options")
|
|
863
|
-
}
|
|
858
|
+
}));
|
|
864
859
|
}) : /*#__PURE__*/_react["default"].createElement(_EmptyState["default"], {
|
|
865
860
|
options: revampedGroups,
|
|
866
861
|
searchString: searchStr,
|
|
@@ -51,8 +51,6 @@ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj &&
|
|
|
51
51
|
|
|
52
52
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
53
53
|
|
|
54
|
-
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); }
|
|
55
|
-
|
|
56
54
|
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
57
55
|
|
|
58
56
|
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); } }
|
|
@@ -215,10 +213,7 @@ var SelectWithAvatarComponent = /*#__PURE__*/function (_SelectComponent) {
|
|
|
215
213
|
needEffect = _this$props.needEffect,
|
|
216
214
|
isLoading = _this$props.isLoading,
|
|
217
215
|
dataSelectorId = _this$props.dataSelectorId,
|
|
218
|
-
getTargetRef = _this$props.getTargetRef
|
|
219
|
-
customProps = _this$props.customProps;
|
|
220
|
-
var _customProps$suggesti = customProps.suggestionsProps,
|
|
221
|
-
suggestionsProps = _customProps$suggesti === void 0 ? {} : _customProps$suggesti;
|
|
216
|
+
getTargetRef = _this$props.getTargetRef;
|
|
222
217
|
i18nKeys = Object.assign({}, i18nKeys, {
|
|
223
218
|
emptyText: i18nKeys.emptyText || emptyMessage,
|
|
224
219
|
searchEmptyText: i18nKeys.searchEmptyText || searchEmptyMessage
|
|
@@ -357,7 +352,7 @@ var SelectWithAvatarComponent = /*#__PURE__*/function (_SelectComponent) {
|
|
|
357
352
|
a11y: {
|
|
358
353
|
role: 'heading'
|
|
359
354
|
}
|
|
360
|
-
})) : null, suggestions.length ? /*#__PURE__*/_react["default"].createElement(_Suggestions["default"],
|
|
355
|
+
})) : null, suggestions.length ? /*#__PURE__*/_react["default"].createElement(_Suggestions["default"], {
|
|
361
356
|
dataId: "".concat(dataId, "_Options"),
|
|
362
357
|
activeId: selectedId,
|
|
363
358
|
suggestions: suggestions,
|
|
@@ -374,7 +369,7 @@ var SelectWithAvatarComponent = /*#__PURE__*/function (_SelectComponent) {
|
|
|
374
369
|
ariaParentRole: 'listbox',
|
|
375
370
|
role: 'option'
|
|
376
371
|
}
|
|
377
|
-
}
|
|
372
|
+
}) : /*#__PURE__*/_react["default"].createElement(_EmptyState["default"], {
|
|
378
373
|
isLoading: isFetchingOptions,
|
|
379
374
|
options: options,
|
|
380
375
|
searchString: searchStr,
|
|
@@ -82,8 +82,7 @@ var GroupSelect_defaultProps = {
|
|
|
82
82
|
isRestrictScroll: false,
|
|
83
83
|
i18nKeys: {},
|
|
84
84
|
iconOnHover: false,
|
|
85
|
-
isLoading: false
|
|
86
|
-
customProps: {}
|
|
85
|
+
isLoading: false
|
|
87
86
|
};
|
|
88
87
|
exports.GroupSelect_defaultProps = GroupSelect_defaultProps;
|
|
89
88
|
var SelectWithAvatar_defaultProps = {
|
|
@@ -110,8 +109,7 @@ var SelectWithAvatar_defaultProps = {
|
|
|
110
109
|
isRestrictScroll: false,
|
|
111
110
|
i18nKeys: {},
|
|
112
111
|
needEffect: true,
|
|
113
|
-
isLoading: false
|
|
114
|
-
customProps: {}
|
|
112
|
+
isLoading: false
|
|
115
113
|
};
|
|
116
114
|
exports.SelectWithAvatar_defaultProps = SelectWithAvatar_defaultProps;
|
|
117
115
|
var SelectWithIcon_defaultProps = (_SelectWithIcon_defau = {
|
|
@@ -191,10 +191,7 @@ var GroupSelect_propTypes = {
|
|
|
191
191
|
}),
|
|
192
192
|
isLoading: _propTypes["default"].bool,
|
|
193
193
|
dataSelectorId: _propTypes["default"].string,
|
|
194
|
-
isDefaultSelectValue: _propTypes["default"].bool
|
|
195
|
-
customProps: _propTypes["default"].shape({
|
|
196
|
-
suggestionsProps: _propTypes["default"].object
|
|
197
|
-
})
|
|
194
|
+
isDefaultSelectValue: _propTypes["default"].bool
|
|
198
195
|
};
|
|
199
196
|
exports.GroupSelect_propTypes = GroupSelect_propTypes;
|
|
200
197
|
|
|
@@ -257,8 +254,7 @@ var SelectWithAvatar_propTypes = _objectSpread(_objectSpread({}, Select_propType
|
|
|
257
254
|
htmlId: _propTypes["default"].string,
|
|
258
255
|
needEffect: _propTypes["default"].bool,
|
|
259
256
|
isLoading: _propTypes["default"].bool,
|
|
260
|
-
dataSelectorId: _propTypes["default"].string
|
|
261
|
-
customProps: _propTypes["default"].object
|
|
257
|
+
dataSelectorId: _propTypes["default"].string
|
|
262
258
|
});
|
|
263
259
|
|
|
264
260
|
exports.SelectWithAvatar_propTypes = SelectWithAvatar_propTypes;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zohodesk/components",
|
|
3
|
-
"version": "1.0.0-temp-
|
|
3
|
+
"version": "1.0.0-temp-214",
|
|
4
4
|
"main": "es/index.js",
|
|
5
5
|
"module": "es/index.js",
|
|
6
6
|
"private": false,
|
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
"build:css:umd": "npm run clean && npm run init && react-cli build:css:umd",
|
|
39
39
|
"coverage": "react-cli coverage",
|
|
40
40
|
"prepare": "npm run init && npm run build && npm run rtl && npm run cssVariableConvert ",
|
|
41
|
-
"prepublishOnly": "node prePublish.js && npm run download && npm run css:review",
|
|
41
|
+
"prepublishOnly": "node prePublish.js && npm run test && npm run download && npm run css:review && npm run review:props ",
|
|
42
42
|
"postpublish": "node postPublish.js",
|
|
43
43
|
"report": "react-cli publish:report",
|
|
44
44
|
"test": "react-cli test",
|