@zohodesk/components 1.0.0-alpha-227 → 1.0.0-alpha-230

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.
Files changed (99) hide show
  1. package/README.md +12 -0
  2. package/assets/Appearance/dark/mode/darkMode.module.css +2 -0
  3. package/assets/Appearance/default/mode/defaultMode.module.css +2 -0
  4. package/es/Animation/Animation.js +7 -8
  5. package/es/Avatar/Avatar.js +11 -11
  6. package/es/Button/Button.js +15 -16
  7. package/es/Button/Button.module.css +6 -2
  8. package/es/Card/Card.js +4 -5
  9. package/es/DropBox/DropBox.js +2 -2
  10. package/es/ListItem/ListContainer.js +3 -8
  11. package/es/ListItem/ListItem.module.css +0 -1
  12. package/es/MultiSelect/AdvancedGroupMultiSelect.js +1 -1
  13. package/es/MultiSelect/AdvancedMultiSelect.js +17 -6
  14. package/es/MultiSelect/MultiSelect.js +21 -11
  15. package/es/MultiSelect/MultiSelectWithAvatar.js +1 -1
  16. package/es/PopOver/PopOver.js +19 -20
  17. package/es/Popup/Popup.js +1 -1
  18. package/es/Responsive/sizeObservers.js +8 -1
  19. package/es/Ribbon/Ribbon.js +8 -8
  20. package/es/Select/GroupSelect.js +1 -1
  21. package/es/Select/Select.js +4 -5
  22. package/es/Select/SelectWithAvatar.js +1 -1
  23. package/es/Select/SelectWithIcon.js +1 -1
  24. package/es/Stencils/Stencils.js +5 -6
  25. package/es/TextBoxIcon/TextBoxIcon.js +1 -1
  26. package/es/VelocityAnimation/VelocityAnimation/VelocityAnimation.js +1 -1
  27. package/es/VelocityAnimation/VelocityAnimationGroup/VelocityAnimationGroup.js +1 -1
  28. package/es/utils/dropDownUtils.js +39 -1
  29. package/lib/Accordion/Accordion.js +1 -1
  30. package/lib/Accordion/AccordionItem.js +1 -1
  31. package/lib/Animation/Animation.js +8 -9
  32. package/lib/AppContainer/AppContainer.js +1 -1
  33. package/lib/Avatar/Avatar.js +12 -12
  34. package/lib/AvatarTeam/AvatarTeam.js +1 -1
  35. package/lib/Button/Button.js +16 -17
  36. package/lib/Button/Button.module.css +6 -2
  37. package/lib/Buttongroup/Buttongroup.js +1 -1
  38. package/lib/Card/Card.js +5 -6
  39. package/lib/CheckBox/CheckBox.js +1 -1
  40. package/lib/DateTime/CalendarView.js +1 -1
  41. package/lib/DateTime/DateTime.js +1 -1
  42. package/lib/DateTime/DateTimePopupFooter.js +1 -1
  43. package/lib/DateTime/DateTimePopupHeader.js +1 -1
  44. package/lib/DateTime/DateWidget.js +1 -1
  45. package/lib/DateTime/DaysRow.js +1 -1
  46. package/lib/DateTime/Time.js +1 -1
  47. package/lib/DateTime/YearView.js +1 -1
  48. package/lib/DropBox/DropBox.js +7 -3
  49. package/lib/DropDown/DropDown.js +1 -1
  50. package/lib/DropDown/DropDownHeading.js +1 -1
  51. package/lib/DropDown/DropDownItem.js +1 -1
  52. package/lib/DropDown/DropDownSearch.js +1 -1
  53. package/lib/DropDown/DropDownSeparator.js +1 -1
  54. package/lib/Label/Label.js +1 -1
  55. package/lib/ListItem/ListContainer.js +3 -8
  56. package/lib/ListItem/ListItem.js +1 -1
  57. package/lib/ListItem/ListItem.module.css +0 -1
  58. package/lib/ListItem/ListItemWithAvatar.js +1 -1
  59. package/lib/ListItem/ListItemWithCheckBox.js +1 -1
  60. package/lib/ListItem/ListItemWithIcon.js +1 -1
  61. package/lib/ListItem/ListItemWithRadio.js +1 -1
  62. package/lib/Modal/Modal.js +1 -1
  63. package/lib/Modal/__docs__/Modal__default.docs.js +1 -1
  64. package/lib/MultiSelect/AdvancedGroupMultiSelect.js +2 -2
  65. package/lib/MultiSelect/AdvancedMultiSelect.js +18 -6
  66. package/lib/MultiSelect/EmptyState.js +1 -1
  67. package/lib/MultiSelect/MultiSelect.js +22 -11
  68. package/lib/MultiSelect/MultiSelectHeader.js +1 -1
  69. package/lib/MultiSelect/MultiSelectWithAvatar.js +2 -2
  70. package/lib/MultiSelect/SelectedOptions.js +1 -1
  71. package/lib/MultiSelect/Suggestions.js +1 -1
  72. package/lib/PopOver/PopOver.js +20 -21
  73. package/lib/Popup/Popup.js +33 -30
  74. package/lib/Popup/__tests__/Popup.spec.js +1 -1
  75. package/lib/Provider.js +1 -1
  76. package/lib/Radio/Radio.js +1 -1
  77. package/lib/Responsive/ResizeComponent.js +1 -1
  78. package/lib/Responsive/Responsive.js +1 -1
  79. package/lib/Responsive/sizeObservers.js +9 -2
  80. package/lib/Ribbon/Ribbon.js +9 -9
  81. package/lib/Select/GroupSelect.js +2 -2
  82. package/lib/Select/Select.js +5 -6
  83. package/lib/Select/SelectWithAvatar.js +2 -2
  84. package/lib/Select/SelectWithIcon.js +2 -2
  85. package/lib/Stencils/Stencils.js +6 -7
  86. package/lib/Switch/Switch.js +1 -1
  87. package/lib/Tab/Tabs.js +1 -1
  88. package/lib/Tag/Tag.js +1 -1
  89. package/lib/TextBox/TextBox.js +1 -1
  90. package/lib/TextBoxIcon/TextBoxIcon.js +2 -2
  91. package/lib/Textarea/Textarea.js +1 -1
  92. package/lib/Tooltip/Tooltip.js +1 -1
  93. package/lib/Tooltip/__tests__/Tooltip.spec.js +1 -1
  94. package/lib/VelocityAnimation/VelocityAnimation/VelocityAnimation.js +6 -4
  95. package/lib/VelocityAnimation/VelocityAnimationGroup/VelocityAnimationGroup.js +6 -4
  96. package/lib/deprecated/PortalLayer/PortalLayer.js +1 -1
  97. package/lib/semantic/Button/Button.js +1 -1
  98. package/lib/utils/dropDownUtils.js +45 -2
  99. package/package.json +4 -4
@@ -29,7 +29,7 @@ function _defineProperties(target, props) { for (var i = 0; i < props.length; i+
29
29
 
30
30
  function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
31
31
 
32
- function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } Object.defineProperty(subClass, "prototype", { value: Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }), writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
32
+ 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); }
33
33
 
34
34
  function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
35
35
 
@@ -70,7 +70,6 @@
70
70
  [dir=rtl] .large {
71
71
  --listitem_padding: var(--zd_size10) var(--zd_size25) var(--zd_size10) var(--zd_size3);
72
72
  }
73
-
74
73
  .value,
75
74
  .children {
76
75
  composes: dotted from '../common/common.module.css';
@@ -37,7 +37,7 @@ function _defineProperties(target, props) { for (var i = 0; i < props.length; i+
37
37
 
38
38
  function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
39
39
 
40
- function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } Object.defineProperty(subClass, "prototype", { value: Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }), writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
40
+ 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); }
41
41
 
42
42
  function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
43
43
 
@@ -29,7 +29,7 @@ function _defineProperties(target, props) { for (var i = 0; i < props.length; i+
29
29
 
30
30
  function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
31
31
 
32
- function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } Object.defineProperty(subClass, "prototype", { value: Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }), writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
32
+ 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); }
33
33
 
34
34
  function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
35
35
 
@@ -29,7 +29,7 @@ function _defineProperties(target, props) { for (var i = 0; i < props.length; i+
29
29
 
30
30
  function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
31
31
 
32
- function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } Object.defineProperty(subClass, "prototype", { value: Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }), writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
32
+ 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); }
33
33
 
34
34
  function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
35
35
 
@@ -29,7 +29,7 @@ function _defineProperties(target, props) { for (var i = 0; i < props.length; i+
29
29
 
30
30
  function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
31
31
 
32
- function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } Object.defineProperty(subClass, "prototype", { value: Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }), writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
32
+ 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); }
33
33
 
34
34
  function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
35
35
 
@@ -25,7 +25,7 @@ function _defineProperties(target, props) { for (var i = 0; i < props.length; i+
25
25
 
26
26
  function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
27
27
 
28
- function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } Object.defineProperty(subClass, "prototype", { value: Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }), writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
28
+ 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); }
29
29
 
30
30
  function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
31
31
 
@@ -19,7 +19,7 @@ function _defineProperties(target, props) { for (var i = 0; i < props.length; i+
19
19
 
20
20
  function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
21
21
 
22
- function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } Object.defineProperty(subClass, "prototype", { value: Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }), writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
22
+ 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); }
23
23
 
24
24
  function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
25
25
 
@@ -77,7 +77,7 @@ function _defineProperties(target, props) { for (var i = 0; i < props.length; i+
77
77
 
78
78
  function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
79
79
 
80
- function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } Object.defineProperty(subClass, "prototype", { value: Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }), writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
80
+ 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); }
81
81
 
82
82
  function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
83
83
 
@@ -976,7 +976,7 @@ var AdvancedGroupMultiSelect = /*#__PURE__*/function (_React$Component) {
976
976
  return /*#__PURE__*/_react["default"].createElement("div", {
977
977
  className: "".concat(_MultiSelectModule["default"].wrapper, " ").concat(isDisabled ? _MultiSelectModule["default"].disabled : '', " ").concat(needEffect && !(isDisabled || isReadOnly) ? _MultiSelectModule["default"].effect : ''),
978
978
  "data-id": "".concat(isDisabled ? "".concat(dataId, "_disabled") : isReadOnly ? "".concat(dataId, "_readOnly") : dataId),
979
- "data-title": isDisabled ? title : '',
979
+ "data-title": isDisabled ? title : null,
980
980
  onClick: this.handleInputFocus
981
981
  }, children ? /*#__PURE__*/_react["default"].createElement(_Layout.Container, {
982
982
  align: "vertical",
@@ -67,7 +67,7 @@ function _defineProperties(target, props) { for (var i = 0; i < props.length; i+
67
67
 
68
68
  function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
69
69
 
70
- function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } Object.defineProperty(subClass, "prototype", { value: Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }), writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
70
+ 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); }
71
71
 
72
72
  function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
73
73
 
@@ -110,6 +110,7 @@ var AdvancedMultiSelectComponent = /*#__PURE__*/function (_MultiSelectComponent)
110
110
  _this.state = Object.assign({}, oldState, {
111
111
  showedSelectedOptionsCount: !(0, _Common.getIsEmptyValue)(selectedOptionsLimit) && selectedOptionsLen > selectedOptionsLimit ? selectedOptionsLimit : selectedOptionsLen
112
112
  });
113
+ _this.getIsShowClearIcon = (0, _dropDownUtils.makeGetIsShowClearIcon)();
113
114
  _this.handleFilterSuggestions = _this.handleFilterSuggestions.bind(_assertThisInitialized(_this));
114
115
  _this.handleChange = _this.handleChange.bind(_assertThisInitialized(_this));
115
116
  _this.handleSelectOption = _this.handleSelectOption.bind(_assertThisInitialized(_this));
@@ -257,7 +258,8 @@ var AdvancedMultiSelectComponent = /*#__PURE__*/function (_MultiSelectComponent)
257
258
  imageField = props.imageField,
258
259
  optionType = props.optionType,
259
260
  iconName = props.iconName,
260
- iconSize = props.iconSize;
261
+ iconSize = props.iconSize,
262
+ disabledOptions = props.disabledOptions;
261
263
  return this.formatSelectedOptions({
262
264
  options: selectedOptionDetails,
263
265
  valueField: valueField,
@@ -265,7 +267,8 @@ var AdvancedMultiSelectComponent = /*#__PURE__*/function (_MultiSelectComponent)
265
267
  imageField: imageField,
266
268
  optionType: optionType,
267
269
  iconName: iconName,
268
- iconSize: iconSize
270
+ iconSize: iconSize,
271
+ disabledOptions: disabledOptions
269
272
  });
270
273
  }
271
274
  }, {
@@ -412,7 +415,8 @@ var AdvancedMultiSelectComponent = /*#__PURE__*/function (_MultiSelectComponent)
412
415
  isBoxPaddingNeed = _this$props5.isBoxPaddingNeed,
413
416
  getFooter = _this$props5.getFooter,
414
417
  customProps = _this$props5.customProps,
415
- needEffect = _this$props5.needEffect;
418
+ needEffect = _this$props5.needEffect,
419
+ disabledOptions = _this$props5.disabledOptions;
416
420
  var _customProps$Suggesti = customProps.SuggestionsProps,
417
421
  SuggestionsProps = _customProps$Suggesti === void 0 ? {} : _customProps$Suggesti,
418
422
  _customProps$DropBoxP = customProps.DropBoxProps,
@@ -441,10 +445,18 @@ var AdvancedMultiSelectComponent = /*#__PURE__*/function (_MultiSelectComponent)
441
445
  var moreCount = allselectedOptionIdsLen - showedSelectedOptionsCount;
442
446
  var setAriaId = this.getNextAriaId();
443
447
  var ariaErrorId = this.getNextAriaId();
448
+
449
+ var _this$getIsShowClearI = this.getIsShowClearIcon({
450
+ selectedOptions: selectedOptions,
451
+ disabledOptions: disabledOptions
452
+ }),
453
+ isShowClear = _this$getIsShowClearI.isShowClearIcon;
454
+
455
+ var isShowClearIcon = !isReadOnly && !isDisabled && isShowClear;
444
456
  return /*#__PURE__*/_react["default"].createElement("div", {
445
457
  className: "".concat(_AdvancedMultiSelectModule["default"].wrapper, " ").concat(isDisabled ? _AdvancedMultiSelectModule["default"].disabled : '', " ").concat(borderColor === 'transparent' ? _AdvancedMultiSelectModule["default"].transparentContainer : '', " ").concat(needEffect && !(isDisabled || isReadOnly) ? _AdvancedMultiSelectModule["default"].effect : ''),
446
458
  "data-id": dataIdMultiSelectComp,
447
- "data-title": isDisabled ? title : '',
459
+ "data-title": isDisabled ? title : null,
448
460
  onClick: this.handleInputFocus
449
461
  }, /*#__PURE__*/_react["default"].createElement(_Layout.Container, {
450
462
  align: "vertical",
@@ -490,7 +502,7 @@ var AdvancedMultiSelectComponent = /*#__PURE__*/function (_MultiSelectComponent)
490
502
  ariaDescribedby: ariaErrorId
491
503
  },
492
504
  autoComplete: false
493
- })), !isReadOnly && !isDisabled && selectedOptions.length > 1 ? /*#__PURE__*/_react["default"].createElement(_Layout.Box, {
505
+ })), isShowClearIcon ? /*#__PURE__*/_react["default"].createElement(_Layout.Box, {
494
506
  className: _AdvancedMultiSelectModule["default"]["delete"],
495
507
  dataId: dataIdClearIcon,
496
508
  "data-title": clearText,
@@ -21,7 +21,7 @@ function _defineProperties(target, props) { for (var i = 0; i < props.length; i+
21
21
 
22
22
  function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
23
23
 
24
- function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } Object.defineProperty(subClass, "prototype", { value: Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }), writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
24
+ 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); }
25
25
 
26
26
  function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
27
27
 
@@ -73,7 +73,7 @@ function _defineProperties(target, props) { for (var i = 0; i < props.length; i+
73
73
 
74
74
  function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
75
75
 
76
- function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } Object.defineProperty(subClass, "prototype", { value: Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }), writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
76
+ 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); }
77
77
 
78
78
  function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
79
79
 
@@ -106,7 +106,8 @@ var MultiSelectComponent = /*#__PURE__*/function (_React$Component) {
106
106
  _this.getNextAriaId = (0, _IdProvider.getUniqueId)(_assertThisInitialized(_this));
107
107
  _this.getFilterSuggestions = (0, _dropDownUtils.makeGetMultiSelectFilterSuggestions)();
108
108
  _this.formatOptions = (0, _dropDownUtils.makeFormatOptions)();
109
- _this.getSelectedOptions = (0, _dropDownUtils.makeGetMultiSelectSelectedOptions)(); //Use in AdvancedMultiSelect component
109
+ _this.getSelectedOptions = (0, _dropDownUtils.makeGetMultiSelectSelectedOptions)();
110
+ _this.getIsShowClearIcon = (0, _dropDownUtils.makeGetIsShowClearIcon)(); //Use in AdvancedMultiSelect component
110
111
 
111
112
  _this.objectConcat = (0, _dropDownUtils.makeObjectConcat)();
112
113
  _this.formatSelectedOptions = (0, _dropDownUtils.makeFormatOptions)();
@@ -814,7 +815,7 @@ var MultiSelectComponent = /*#__PURE__*/function (_React$Component) {
814
815
  togglePopup = _this$props10.togglePopup,
815
816
  defaultDropBoxPosition = _this$props10.defaultDropBoxPosition,
816
817
  isReadOnly = _this$props10.isReadOnly;
817
- !isReadOnly && togglePopup(e, defaultDropBoxPosition ? "".concat(defaultDropBoxPosition, "Center") : null);
818
+ !isReadOnly && togglePopup(e, defaultDropBoxPosition ? "".concat(defaultDropBoxPosition) : null);
818
819
  }
819
820
  }, {
820
821
  key: "handlePopupClose",
@@ -943,7 +944,9 @@ var MultiSelectComponent = /*#__PURE__*/function (_React$Component) {
943
944
  children = _this$props13.children,
944
945
  customChildrenClass = _this$props13.customChildrenClass,
945
946
  getFooter = _this$props13.getFooter,
946
- needEffect = _this$props13.needEffect;
947
+ needEffect = _this$props13.needEffect,
948
+ disabledOptions = _this$props13.disabledOptions,
949
+ boxSize = _this$props13.boxSize;
947
950
  var _i18nKeys = i18nKeys,
948
951
  _i18nKeys$clearText = _i18nKeys.clearText,
949
952
  clearText = _i18nKeys$clearText === void 0 ? 'Clear all' : _i18nKeys$clearText,
@@ -967,11 +970,18 @@ var MultiSelectComponent = /*#__PURE__*/function (_React$Component) {
967
970
  var suggestions = this.handleFilterSuggestions();
968
971
  var setAriaId = this.getNextAriaId();
969
972
  var ariaErrorId = this.getNextAriaId();
970
- var isShowClearIcon = !isReadOnly && !isDisabled && !disableAction && selectedOptions.length > 1;
973
+
974
+ var _this$getIsShowClearI = this.getIsShowClearIcon({
975
+ selectedOptions: selectedOptions,
976
+ disabledOptions: disabledOptions
977
+ }),
978
+ isShowClear = _this$getIsShowClearI.isShowClearIcon;
979
+
980
+ var isShowClearIcon = !isReadOnly && !isDisabled && !disableAction && isShowClear;
971
981
  return /*#__PURE__*/_react["default"].createElement("div", {
972
982
  className: "".concat(_MultiSelectModule["default"].wrapper, " ").concat(isDisabled ? _MultiSelectModule["default"].disabled : '', " ").concat(isReadOnly ? _MultiSelectModule["default"].readOnly : '', " ").concat(disableAction ? (0, _CssProvider["default"])('isBlock') : '', " ").concat(borderColor === 'transparent' ? _MultiSelectModule["default"].transparentContainer : '', " ").concat(needEffect && !(isDisabled || isReadOnly) ? _MultiSelectModule["default"].effect : ''),
973
983
  "data-id": "".concat(isDisabled ? "".concat(dataId, "_disabled") : isReadOnly ? "".concat(dataId, "_readOnly") : dataId),
974
- "data-title": isDisabled ? title : '',
984
+ "data-title": isDisabled ? title : null,
975
985
  onClick: this.handleInputFocus
976
986
  }, /*#__PURE__*/_react["default"].createElement(_Layout.Container, {
977
987
  align: "vertical",
@@ -1043,7 +1053,7 @@ var MultiSelectComponent = /*#__PURE__*/function (_React$Component) {
1043
1053
  dataId: "".concat(dataId, "_children")
1044
1054
  }, children) : null)))), !isReadOnly && !isDisabled && !disableAction && isPopupOpen ? /*#__PURE__*/_react["default"].createElement(_DropBox["default"], {
1045
1055
  animationStyle: animationStyle,
1046
- boxPosition: position || "".concat(defaultDropBoxPosition, "Center"),
1056
+ boxPosition: position || "".concat(defaultDropBoxPosition),
1047
1057
  getRef: getContainerRef,
1048
1058
  isActive: isPopupReady,
1049
1059
  isAnimate: isAnimate,
@@ -1057,7 +1067,8 @@ var MultiSelectComponent = /*#__PURE__*/function (_React$Component) {
1057
1067
  a11y: {
1058
1068
  role: 'listbox',
1059
1069
  ariaMultiselectable: true
1060
- }
1070
+ },
1071
+ size: boxSize
1061
1072
  }, /*#__PURE__*/_react["default"].createElement(_Card["default"], {
1062
1073
  customClass: "".concat(_MultiSelectModule["default"].box, " ").concat(_MultiSelectModule["default"]["".concat(palette, "Box")]),
1063
1074
  onScroll: this.handleScroll
@@ -1106,7 +1117,7 @@ MultiSelectComponent.propTypes = {
1106
1117
  borderColor: _propTypes["default"].oneOf(['transparent', 'default', 'dark']),
1107
1118
  closePopupOnly: _propTypes["default"].func,
1108
1119
  dataId: _propTypes["default"].string,
1109
- defaultDropBoxPosition: _propTypes["default"].oneOf(['bottom', 'top', 'left', 'right']),
1120
+ defaultDropBoxPosition: _propTypes["default"].string,
1110
1121
  disableAction: _propTypes["default"].bool,
1111
1122
  dropBoxSize: _propTypes["default"].oneOf(['small', 'medium', 'large']),
1112
1123
  emptyMessage: _propTypes["default"].string.isRequired,
@@ -1177,12 +1188,12 @@ MultiSelectComponent.propTypes = {
1177
1188
  customChildrenClass: _propTypes["default"].string,
1178
1189
  disabledOptions: _propTypes["default"].arrayOf(_propTypes["default"].string),
1179
1190
  getFooter: _propTypes["default"].func,
1180
- needEffect: _propTypes["default"].bool
1191
+ needEffect: _propTypes["default"].bool,
1192
+ boxSize: _propTypes["default"].string
1181
1193
  };
1182
1194
  MultiSelectComponent.defaultProps = {
1183
1195
  animationStyle: 'bounce',
1184
1196
  dataId: 'multiSelect',
1185
- defaultDropBoxPosition: 'bottom',
1186
1197
  dropBoxSize: 'small',
1187
1198
  isAnimate: true,
1188
1199
  isDisabled: false,
@@ -23,7 +23,7 @@ function _defineProperties(target, props) { for (var i = 0; i < props.length; i+
23
23
 
24
24
  function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
25
25
 
26
- function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } Object.defineProperty(subClass, "prototype", { value: Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }), writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
26
+ 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); }
27
27
 
28
28
  function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
29
29
 
@@ -51,7 +51,7 @@ function _defineProperties(target, props) { for (var i = 0; i < props.length; i+
51
51
 
52
52
  function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
53
53
 
54
- function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } Object.defineProperty(subClass, "prototype", { value: Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }), writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
54
+ 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); }
55
55
 
56
56
  function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
57
57
 
@@ -168,7 +168,7 @@ var MultiSelectWithAvatarComponent = /*#__PURE__*/function (_MultiSelectComponen
168
168
  return /*#__PURE__*/_react["default"].createElement("div", {
169
169
  className: " ".concat(_MultiSelectModule["default"].wrapper, " ").concat(isDisabled ? _MultiSelectModule["default"].disabled : '', " ").concat(isReadOnly ? _MultiSelectModule["default"].readOnly : '', " ").concat(disableAction ? (0, _CssProvider["default"])('isBlock') : '', " ").concat(borderColor === 'transparent' ? _MultiSelectModule["default"].transparentContainer : '', " ").concat(needEffect && !(isDisabled || isReadOnly) ? _MultiSelectModule["default"].effect : ''),
170
170
  "data-id": "".concat(isDisabled ? "".concat(dataId, "_disabled") : isReadOnly ? "".concat(dataId, "_readOnly") : dataId),
171
- "data-title": isDisabled ? title : '',
171
+ "data-title": isDisabled ? title : null,
172
172
  onClick: this.handleInputFocus
173
173
  }, /*#__PURE__*/_react["default"].createElement(_Layout.Container, {
174
174
  align: "vertical",
@@ -27,7 +27,7 @@ function _defineProperties(target, props) { for (var i = 0; i < props.length; i+
27
27
 
28
28
  function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
29
29
 
30
- function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } Object.defineProperty(subClass, "prototype", { value: Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }), writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
30
+ 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); }
31
31
 
32
32
  function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
33
33
 
@@ -35,7 +35,7 @@ function _defineProperties(target, props) { for (var i = 0; i < props.length; i+
35
35
 
36
36
  function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
37
37
 
38
- function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } Object.defineProperty(subClass, "prototype", { value: Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }), writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
38
+ 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); }
39
39
 
40
40
  function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
41
41
 
@@ -25,7 +25,7 @@ function _defineProperties(target, props) { for (var i = 0; i < props.length; i+
25
25
 
26
26
  function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
27
27
 
28
- function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } Object.defineProperty(subClass, "prototype", { value: Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }), writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
28
+ 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); }
29
29
 
30
30
  function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
31
31
 
@@ -184,26 +184,25 @@ PopOver.propTypes = {
184
184
  size: _propTypes["default"].string,
185
185
  togglePopup: _propTypes["default"].func,
186
186
  top: _propTypes["default"].string
187
- };
188
- PopOver.propTypesDescription = {
189
- right: ' ',
190
- left: ' ',
191
- top: ' ',
192
- bottom: ' ',
193
- arrowRight: ' ',
194
- arrowLeft: ' ',
195
- arrowTop: ' ',
196
- arrowBottom: ' ',
197
- arrowPosition: ' ',
198
- boxPosition: ' ',
199
- size: ' ',
200
- children: ' ',
201
- onPopupOpen: ' ',
202
- isPopupOpen: ' ',
203
- onPopupClose: ' ',
204
- getTargetRef: ' ',
205
- getContainerRef: ' '
206
- };
187
+ }; // PopOver.propTypesDescription = {
188
+ // right: ' ',
189
+ // left: ' ',
190
+ // top: ' ',
191
+ // bottom: ' ',
192
+ // arrowRight: ' ',
193
+ // arrowLeft: ' ',
194
+ // arrowTop: ' ',
195
+ // arrowBottom: ' ',
196
+ // arrowPosition: ' ',
197
+ // boxPosition: ' ',
198
+ // size: ' ',
199
+ // children: ' ',
200
+ // onPopupOpen: ' ',
201
+ // isPopupOpen: ' ',
202
+ // onPopupClose: ' ',
203
+ // getTargetRef: ' ',
204
+ // getContainerRef: ' '
205
+ // };
207
206
 
208
207
  if (false) {
209
208
  PopOver.docs = {
@@ -43,7 +43,7 @@ function _defineProperties(target, props) { for (var i = 0; i < props.length; i+
43
43
 
44
44
  function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
45
45
 
46
- function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } Object.defineProperty(subClass, "prototype", { value: Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }), writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
46
+ 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); }
47
47
 
48
48
  function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
49
49
 
@@ -476,8 +476,11 @@ var Popup = function Popup(Component) {
476
476
 
477
477
  var defaultPosition = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'bottomCenter';
478
478
  var isResizeHandling = arguments.length > 1 ? arguments[1] : undefined;
479
+
479
480
  // isResizeHandling --->>> Window resize and dropBox resize
480
- var direction = this.context.direction;
481
+ var _ref3 = this.context || {},
482
+ direction = _ref3.direction;
483
+
481
484
  var placeHolderElement = this.placeHolderElement,
482
485
  dropElement = this.dropElement;
483
486
  var needArrow = this.getNeedArrow(this);
@@ -513,12 +516,12 @@ var Popup = function Popup(Component) {
513
516
  customOrder: customOrder
514
517
  });
515
518
 
516
- var _ref3 = betterPosition || {},
517
- view = _ref3.view,
518
- views = _ref3.views,
519
- viewsOffset = _ref3.viewsOffset,
520
- targetOffset = _ref3.targetOffset,
521
- popupOffset = _ref3.popupOffset;
519
+ var _ref4 = betterPosition || {},
520
+ view = _ref4.view,
521
+ views = _ref4.views,
522
+ viewsOffset = _ref4.viewsOffset,
523
+ targetOffset = _ref4.targetOffset,
524
+ popupOffset = _ref4.popupOffset;
522
525
 
523
526
  if (position !== view || !isPopupReady) {
524
527
  _this4.setState({
@@ -576,25 +579,25 @@ var Popup = function Popup(Component) {
576
579
  customOrder: customOrder
577
580
  });
578
581
 
579
- var _ref4 = betterPosition || {},
580
- view = _ref4.view,
581
- views = _ref4.views,
582
- _ref4$viewsOffset = _ref4.viewsOffset,
583
- viewsOffset = _ref4$viewsOffset === void 0 ? {} : _ref4$viewsOffset,
584
- targetOffset = _ref4.targetOffset,
585
- popupOffset = _ref4.popupOffset;
586
-
587
- var _ref5 = positionsOffset[position] || {},
588
- _ref5$left = _ref5.left,
589
- oldLeft = _ref5$left === void 0 ? '' : _ref5$left,
590
- _ref5$top = _ref5.top,
591
- oldTop = _ref5$top === void 0 ? '' : _ref5$top;
592
-
593
- var _ref6 = viewsOffset[view] || {},
582
+ var _ref5 = betterPosition || {},
583
+ view = _ref5.view,
584
+ views = _ref5.views,
585
+ _ref5$viewsOffset = _ref5.viewsOffset,
586
+ viewsOffset = _ref5$viewsOffset === void 0 ? {} : _ref5$viewsOffset,
587
+ targetOffset = _ref5.targetOffset,
588
+ popupOffset = _ref5.popupOffset;
589
+
590
+ var _ref6 = positionsOffset[position] || {},
594
591
  _ref6$left = _ref6.left,
595
- left = _ref6$left === void 0 ? '' : _ref6$left,
592
+ oldLeft = _ref6$left === void 0 ? '' : _ref6$left,
596
593
  _ref6$top = _ref6.top,
597
- top = _ref6$top === void 0 ? '' : _ref6$top;
594
+ oldTop = _ref6$top === void 0 ? '' : _ref6$top;
595
+
596
+ var _ref7 = viewsOffset[view] || {},
597
+ _ref7$left = _ref7.left,
598
+ left = _ref7$left === void 0 ? '' : _ref7$left,
599
+ _ref7$top = _ref7.top,
600
+ top = _ref7$top === void 0 ? '' : _ref7$top;
598
601
 
599
602
  var changeState = isAbsolute ? position !== view : oldLeft !== left || oldTop !== top; // let isInViewPort = viewPort.isInViewPort(
600
603
  // placeHolderElement,
@@ -658,11 +661,11 @@ var Popup = function Popup(Component) {
658
661
  var height = popupSize.height,
659
662
  width = popupSize.width;
660
663
 
661
- var _ref7 = this.size || {},
662
- _ref7$height = _ref7.height,
663
- oldHeight = _ref7$height === void 0 ? 0 : _ref7$height,
664
- _ref7$width = _ref7.width,
665
- oldWidth = _ref7$width === void 0 ? 0 : _ref7$width;
664
+ var _ref8 = this.size || {},
665
+ _ref8$height = _ref8.height,
666
+ oldHeight = _ref8$height === void 0 ? 0 : _ref8$height,
667
+ _ref8$width = _ref8.width,
668
+ oldWidth = _ref8$width === void 0 ? 0 : _ref8$width;
666
669
 
667
670
  var _this$state = this.state,
668
671
  isPopupReady = _this$state.isPopupReady,
@@ -18,7 +18,7 @@ function _defineProperties(target, props) { for (var i = 0; i < props.length; i+
18
18
 
19
19
  function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
20
20
 
21
- function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } Object.defineProperty(subClass, "prototype", { value: Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }), writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
21
+ 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); }
22
22
 
23
23
  function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
24
24
 
package/lib/Provider.js CHANGED
@@ -71,7 +71,7 @@ function _defineProperties(target, props) { for (var i = 0; i < props.length; i+
71
71
 
72
72
  function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
73
73
 
74
- function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } Object.defineProperty(subClass, "prototype", { value: Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }), writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
74
+ 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); }
75
75
 
76
76
  function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
77
77
 
@@ -25,7 +25,7 @@ function _defineProperties(target, props) { for (var i = 0; i < props.length; i+
25
25
 
26
26
  function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
27
27
 
28
- function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } Object.defineProperty(subClass, "prototype", { value: Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }), writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
28
+ 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); }
29
29
 
30
30
  function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
31
31
 
@@ -29,7 +29,7 @@ function _defineProperties(target, props) { for (var i = 0; i < props.length; i+
29
29
 
30
30
  function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
31
31
 
32
- function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } Object.defineProperty(subClass, "prototype", { value: Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }), writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
32
+ 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); }
33
33
 
34
34
  function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
35
35
 
@@ -46,7 +46,7 @@ function _defineProperties(target, props) { for (var i = 0; i < props.length; i+
46
46
 
47
47
  function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
48
48
 
49
- function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } Object.defineProperty(subClass, "prototype", { value: Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }), writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
49
+ 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); }
50
50
 
51
51
  function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
52
52
 
@@ -13,7 +13,7 @@ function _get() { if (typeof Reflect !== "undefined" && Reflect.get) { _get = Re
13
13
 
14
14
  function _superPropBase(object, property) { while (!Object.prototype.hasOwnProperty.call(object, property)) { object = _getPrototypeOf(object); if (object === null) break; } return object; }
15
15
 
16
- function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } Object.defineProperty(subClass, "prototype", { value: Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }), writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
16
+ 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); }
17
17
 
18
18
  function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
19
19
 
@@ -62,7 +62,14 @@ function rangeCheck(minValue, maxValue, screenValue) {
62
62
  return minValue <= screenValue && maxValue >= screenValue;
63
63
  }
64
64
 
65
- var isTouchDevice = 'ontouchstart' in window && navigator.userAgent.match(/mobi/i) ? true : false;
65
+ function isTouchDeviceFunc() {
66
+ // return window.matchMedia("(pointer: coarse)").matches
67
+ return 'ontouchstart' in window || navigator.maxTouchPoints > 0 || navigator.msMaxTouchPoints > 0;
68
+ } // export const isTouchDevice =
69
+ // 'ontouchstart' in window && navigator.userAgent.match(/mobi/i) ? true : false;
70
+
71
+
72
+ var isTouchDevice = isTouchDeviceFunc();
66
73
  exports.isTouchDevice = isTouchDevice;
67
74
 
68
75
  function isBreackPointMatched(object, screen) {