@zohodesk/components 1.0.0-temp-444 → 1.0.0-temp-667
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 +16 -0
- package/assets/Appearance/dark/mode/darkMode.module.css +3 -18
- package/assets/Appearance/default/mode/defaultMode.module.css +2 -17
- package/assets/Appearance/pureDark/mode/pureDarkMode.module.css +5 -20
- package/es/AppContainer/AppContainer.js +1 -1
- package/es/Avatar/Avatar.js +1 -1
- package/es/Avatar/Avatar.module.css +11 -9
- package/es/AvatarTeam/AvatarTeam.js +1 -1
- package/es/AvatarTeam/AvatarTeam.module.css +21 -7
- package/es/Button/Button.module.css +97 -24
- package/es/Buttongroup/Buttongroup.module.css +37 -8
- package/es/CheckBox/CheckBox.js +1 -1
- package/es/CheckBox/CheckBox.module.css +29 -19
- package/es/DateTime/DateTime.js +4 -2
- package/es/DateTime/DateTime.module.css +40 -13
- package/es/DateTime/DateWidget.js +4 -2
- package/es/DateTime/DateWidget.module.css +9 -5
- package/es/DateTime/YearView.module.css +17 -6
- package/es/DropBox/DropBox.js +1 -1
- package/es/DropBox/DropBox.module.css +47 -11
- package/es/DropDown/DropDownHeading.module.css +7 -3
- package/es/DropDown/DropDownItem.module.css +32 -6
- package/es/LightNightMode/Colors.json +496 -397
- package/es/LightNightMode/docs/AlternativeColors.docs.js +21 -1
- package/es/ListItem/ListContainer.js +1 -1
- package/es/ListItem/ListItem.js +1 -1
- package/es/ListItem/ListItem.module.css +69 -33
- package/es/ListItem/ListItemWithAvatar.js +1 -1
- package/es/ListItem/ListItemWithCheckBox.js +1 -1
- package/es/ListItem/ListItemWithIcon.js +1 -1
- package/es/ListItem/ListItemWithRadio.js +1 -1
- package/es/Modal/Modal.js +1 -1
- package/es/MultiSelect/AdvancedGroupMultiSelect.js +14 -7
- package/es/MultiSelect/AdvancedMultiSelect.js +20 -8
- package/es/MultiSelect/MultiSelect.module.css +36 -11
- package/es/MultiSelect/SelectedOptions.js +1 -1
- package/es/MultiSelect/SelectedOptions.module.css +8 -2
- package/es/MultiSelect/Suggestions.js +1 -1
- package/es/PopOver/PopOver.module.css +1 -1
- package/es/Popup/Popup.js +1 -1
- package/es/Radio/Radio.module.css +18 -10
- package/es/Responsive/ResizeComponent.js +15 -73
- package/es/Responsive/ResizeObserver.js +2 -6
- package/es/Responsive/docs/style.module.css +17 -8
- package/es/ResponsiveDropBox/ResponsiveDropBox.js +1 -1
- package/es/Ribbon/Ribbon.module.css +93 -28
- package/es/RippleEffect/RippleEffect.module.css +37 -44
- package/es/Select/Select.js +30 -8
- package/es/Select/Select.module.css +12 -2
- package/es/Select/docs/Select__default.docs.js +1 -1
- package/es/Stencils/Stencils.module.css +21 -3
- package/es/Switch/Switch.js +1 -1
- package/es/Switch/Switch.module.css +9 -9
- package/es/Tab/Tab.js +1 -1
- package/es/Tab/Tab.module.css +16 -7
- package/es/Tab/TabWrapper.js +1 -1
- package/es/Tab/Tabs.js +1 -1
- package/es/Tab/Tabs.module.css +42 -8
- package/es/Tab/docs/tabdocs.module.css +1 -1
- package/es/Tag/Tag.module.css +36 -14
- package/es/TextBox/TextBox.js +1 -1
- package/es/TextBox/TextBox.module.css +7 -11
- package/es/TextBoxIcon/TextBoxIcon.js +1 -1
- package/es/TextBoxIcon/TextBoxIcon.module.css +12 -5
- package/es/Textarea/Textarea.js +1 -1
- package/es/Textarea/Textarea.module.css +6 -7
- package/es/Tooltip/Tooltip.module.css +9 -8
- package/es/VelocityAnimation/VelocityAnimationGroup/VelocityAnimationGroup.js +1 -1
- package/es/beta/FocusRing/FocusRing.module.css +51 -26
- package/es/common/animation.module.css +219 -21
- package/es/common/basicReset.module.css +2 -12
- package/es/common/common.module.css +62 -18
- package/es/common/customscroll.module.css +17 -21
- package/es/common/docStyle.module.css +79 -32
- package/es/common/transition.module.css +50 -10
- package/es/css.js +0 -1
- package/{lib/MultiSelect → es/deprecated}/AdvancedMultiSelect.module.css +1 -1
- package/es/deprecated/advancedMultiSelectVariableJson.js +80 -0
- package/es/semantic/Button/semanticButton.module.css +3 -3
- package/lib/Accordion/Accordion.js +2 -2
- package/lib/Accordion/AccordionItem.js +2 -2
- package/lib/Accordion/docs/Accordion__Demo.docs.js +2 -2
- package/lib/Animation/Animation.js +2 -2
- package/lib/Animation/docs/Animation__default.docs.js +2 -2
- package/lib/Animation/docs/Animation__fadeIn.docs.js +2 -2
- package/lib/Animation/docs/Animation__scaleIn.docs.js +2 -2
- package/lib/Animation/docs/Animation__skewIn.docs.js +2 -2
- package/lib/Animation/docs/Animation__slideDown.docs.js +2 -2
- package/lib/Animation/docs/Animation__slideLeft.docs.js +2 -2
- package/lib/Animation/docs/Animation__zoomIn.docs.js +2 -2
- package/lib/AppContainer/AppContainer.js +11 -4
- package/lib/AppContainer/docs/AppContainer__default.docs.js +2 -2
- package/lib/Avatar/Avatar.js +3 -3
- package/lib/Avatar/docs/Avatar__custom.docs.js +2 -2
- package/lib/Avatar/docs/Avatar__default.docs.js +2 -2
- package/lib/Avatar/docs/Avatar__palette.docs.js +2 -2
- package/lib/Avatar/docs/Avatar__text.docs.js +2 -2
- package/lib/AvatarTeam/AvatarTeam.js +3 -3
- package/lib/AvatarTeam/docs/AvatarTeam__custom.docs.js +2 -2
- package/lib/AvatarTeam/docs/AvatarTeam__default.docs.js +2 -2
- package/lib/AvatarTeam/docs/AvatarTeam__palette.docs.js +2 -2
- package/lib/AvatarTeam/docs/AvatarTeam__size.docs.js +2 -2
- package/lib/Button/Button.js +2 -2
- package/lib/Button/docs/Button__custom.docs.js +2 -2
- package/lib/Button/docs/Button__default.docs.js +2 -2
- package/lib/Buttongroup/Buttongroup.js +2 -2
- package/lib/Buttongroup/docs/Buttongroup__custom.docs.js +2 -2
- package/lib/Buttongroup/docs/Buttongroup__footer.docs.js +2 -2
- package/lib/Buttongroup/docs/Buttongroup__header.docs.js +2 -2
- package/lib/Card/Card.js +2 -2
- package/lib/Card/docs/Card__Custom.docs.js +2 -2
- package/lib/Card/docs/Card__Default.docs.js +2 -2
- package/lib/Card/docs/Card__Scroll.docs.js +2 -2
- package/lib/CheckBox/CheckBox.js +5 -4
- package/lib/CheckBox/CheckBox.module.css +12 -8
- package/lib/CheckBox/docs/CheckBox__custom.docs.js +2 -2
- package/lib/CheckBox/docs/CheckBox__default.docs.js +2 -2
- package/lib/DateTime/CalendarView.js +2 -2
- package/lib/DateTime/DateTime.js +50 -22
- package/lib/DateTime/DateTime.module.css +1 -1
- package/lib/DateTime/DateTimePopupFooter.js +2 -2
- package/lib/DateTime/DateTimePopupHeader.js +2 -2
- package/lib/DateTime/DateWidget.js +14 -4
- package/lib/DateTime/DateWidget.module.css +0 -4
- package/lib/DateTime/DaysRow.js +2 -2
- package/lib/DateTime/Time.js +2 -2
- package/lib/DateTime/YearView.js +2 -2
- package/lib/DateTime/YearView.module.css +1 -0
- package/lib/DateTime/docs/DateTime__default.docs.js +2 -2
- package/lib/DateTime/docs/DateWidget__default.docs.js +2 -2
- package/lib/DropBox/DropBox.js +4 -4
- package/lib/DropBox/docs/DropBox__custom.docs.js +2 -2
- package/lib/DropBox/docs/DropBox__customOrder.docs.js +2 -2
- package/lib/DropBox/docs/DropBox__fixedPosition.docs.js +2 -2
- package/lib/DropBox/docs/DropBox__position.docs.js +2 -2
- package/lib/DropBox/docs/DropBox__size.docs.js +2 -2
- package/lib/DropDown/DropDown.js +2 -2
- package/lib/DropDown/DropDownHeading.js +2 -2
- package/lib/DropDown/DropDownItem.js +2 -2
- package/lib/DropDown/DropDownSearch.js +2 -2
- package/lib/DropDown/DropDownSeparator.js +2 -2
- package/lib/DropDown/docs/DropDownHeading__custom.docs.js +2 -2
- package/lib/DropDown/docs/DropDownHeading__default.docs.js +2 -2
- package/lib/Label/Label.js +2 -2
- package/lib/Label/docs/Label__clipped.docs.js +2 -2
- package/lib/Label/docs/Label__custom.docs.js +2 -2
- package/lib/Label/docs/Label__palette.docs.js +2 -2
- package/lib/Label/docs/Label__size.docs.js +2 -2
- package/lib/Label/docs/Label__type.docs.js +2 -2
- package/lib/Layout/docs/Layout__Hidden.docs.js +2 -2
- package/lib/Layout/docs/Layout__default.docs.js +2 -2
- package/lib/Layout/docs/Layout__four_Column.docs.js +2 -2
- package/lib/Layout/docs/Layout__three_Column.docs.js +2 -2
- package/lib/Layout/docs/Layout__two_Column.docs.js +2 -2
- package/lib/LightNightMode/Colors.json +496 -397
- package/lib/LightNightMode/docs/AlternativeColors.docs.js +25 -3
- package/lib/ListItem/ListContainer.js +8 -5
- package/lib/ListItem/ListItem.js +4 -4
- package/lib/ListItem/ListItem.module.css +18 -19
- package/lib/ListItem/ListItemWithAvatar.js +4 -4
- package/lib/ListItem/ListItemWithCheckBox.js +4 -4
- package/lib/ListItem/ListItemWithIcon.js +4 -4
- package/lib/ListItem/ListItemWithRadio.js +4 -4
- package/lib/ListItem/docs/ListItemWithAvatar__custom.docs.js +2 -2
- package/lib/ListItem/docs/ListItemWithAvatar__default.docs.js +2 -2
- package/lib/ListItem/docs/ListItemWithCheckBox__custom.docs.js +2 -2
- package/lib/ListItem/docs/ListItemWithCheckBox__default.docs.js +2 -2
- package/lib/ListItem/docs/ListItemWithIcon__custom.docs.js +2 -2
- package/lib/ListItem/docs/ListItemWithIcon__default.docs.js +2 -2
- package/lib/ListItem/docs/ListItemWithRadio__custom.docs.js +2 -2
- package/lib/ListItem/docs/ListItemWithRadio__default.docs.js +2 -2
- package/lib/ListItem/docs/ListItem__custom.docs.js +2 -2
- package/lib/ListItem/docs/ListItem__default.docs.js +2 -2
- package/lib/Modal/Modal.js +3 -3
- package/lib/Modal/__docs__/Modal__default.docs.js +2 -2
- package/lib/MultiSelect/AdvancedGroupMultiSelect.js +120 -88
- package/lib/MultiSelect/AdvancedMultiSelect.js +99 -62
- package/lib/MultiSelect/EmptyState.js +2 -2
- package/lib/MultiSelect/MultiSelect.js +90 -64
- package/lib/MultiSelect/MultiSelect.module.css +15 -2
- package/lib/MultiSelect/MultiSelectHeader.js +2 -2
- package/lib/MultiSelect/MultiSelectWithAvatar.js +80 -55
- package/lib/MultiSelect/SelectedOptions.js +3 -3
- package/lib/MultiSelect/Suggestions.js +3 -3
- package/lib/MultiSelect/docs/AdvancedGroupMultiSelect__default.docs.js +2 -2
- package/lib/MultiSelect/docs/AdvancedMultiSelect__default.docs.js +2 -2
- package/lib/MultiSelect/docs/MultiSelectWithAvatar__default.docs.js +2 -2
- package/lib/MultiSelect/docs/MultiSelect__default.docs.js +2 -2
- package/lib/PopOver/PopOver.js +13 -6
- package/lib/PopOver/docs/PopOver__default.docs.js +2 -2
- package/lib/Popup/Popup.js +3 -3
- package/lib/Popup/__tests__/Popup.spec.js +2 -2
- package/lib/Provider/Config.js +3 -1
- package/lib/Provider/docs/Provider_Id__Class.docs.js +2 -2
- package/lib/Provider/docs/Provider_Zindex__Class.docs.js +2 -2
- package/lib/Provider.js +34 -100
- package/lib/Radio/Radio.js +2 -2
- package/lib/Radio/Radio.module.css +8 -6
- package/lib/Radio/docs/Radio__custom.docs.js +2 -2
- package/lib/Radio/docs/Radio__default.docs.js +2 -2
- package/lib/Responsive/ResizeComponent.js +2 -2
- package/lib/Responsive/Responsive.js +2 -2
- package/lib/Responsive/docs/Responsive__Custom.docs.js +2 -2
- package/lib/Responsive/docs/Responsive__default.docs.js +2 -2
- package/lib/Responsive/sizeObservers.js +3 -3
- package/lib/ResponsiveDropBox/ResponsiveDropBox.js +130 -0
- package/lib/ResponsiveDropBox/ResponsiveDropBox.module.css +6 -0
- package/lib/Ribbon/Ribbon.js +2 -2
- package/lib/Ribbon/docs/Ribbon__custom.docs.js +2 -2
- package/lib/Ribbon/docs/Ribbon__default.docs.js +2 -2
- package/lib/RippleEffect/RippleEffect.module.css +37 -15
- package/lib/RippleEffect/docs/RippleEffect__default.docs.js +2 -2
- package/lib/Select/GroupSelect.js +102 -79
- package/lib/Select/Select.js +142 -87
- package/lib/Select/Select.module.css +6 -0
- package/lib/Select/SelectWithAvatar.js +98 -73
- package/lib/Select/SelectWithIcon.js +99 -76
- package/lib/Select/docs/GroupSelect__default.docs.js +2 -2
- package/lib/Select/docs/SelectWithAvatar__default.docs.js +2 -2
- package/lib/Select/docs/SelectWithIcon__default.docs.js +2 -2
- package/lib/Select/docs/Select__default.docs.js +3 -3
- package/lib/Stencils/Stencils.js +2 -2
- package/lib/Stencils/docs/Stencils__custom.docs.js +2 -2
- package/lib/Stencils/docs/Stencils__default.docs.js +2 -2
- package/lib/Switch/Switch.js +3 -3
- package/lib/Switch/Switch.module.css +3 -2
- package/lib/Switch/docs/Switch__custom.docs.js +2 -2
- package/lib/Switch/docs/Switch__default.docs.js +2 -2
- package/lib/Tab/Tab.js +1 -1
- package/lib/Tab/TabWrapper.js +1 -1
- package/lib/Tab/Tabs.js +70 -47
- package/lib/Tab/Tabs.module.css +2 -1
- package/lib/Tab/docs/Tab__default.docs.js +2 -2
- package/lib/Tag/Tag.js +3 -3
- package/lib/Tag/Tag.module.css +6 -2
- package/lib/Tag/docs/Tag__custom.docs.js +2 -2
- package/lib/Tag/docs/Tag__default.docs.js +2 -2
- package/lib/TextBox/TextBox.js +3 -3
- package/lib/TextBox/docs/TextBox__custom.docs.js +2 -2
- package/lib/TextBox/docs/TextBox__default.docs.js +2 -2
- package/lib/TextBox/docs/TextBox__size.docs.js +2 -2
- package/lib/TextBox/docs/TextBox__variant.docs.js +2 -2
- package/lib/TextBoxIcon/TextBoxIcon.js +3 -3
- package/lib/TextBoxIcon/docs/TextBoxIcon__custom.docs.js +2 -2
- package/lib/TextBoxIcon/docs/TextBoxIcon__default.docs.js +2 -2
- package/lib/Textarea/Textarea.js +3 -3
- package/lib/Textarea/docs/Textarea__animated.docs.js +2 -2
- package/lib/Textarea/docs/Textarea__custom.docs.js +2 -2
- package/lib/Textarea/docs/Textarea__default.docs.js +2 -2
- package/lib/Textarea/docs/Textarea__disabled.docs.js +2 -2
- package/lib/Tooltip/Tooltip.js +62 -10
- package/lib/Tooltip/Tooltip.module.css +6 -1
- package/lib/Tooltip/__tests__/Tooltip.spec.js +2 -2
- package/lib/Tooltip/docs/Tooltip__default.docs.js +52 -13
- package/lib/VelocityAnimation/VelocityAnimation/VelocityAnimation.js +2 -2
- package/lib/VelocityAnimation/VelocityAnimation/docs/VelocityAnimation__demo.docs.js +2 -2
- package/lib/VelocityAnimation/VelocityAnimationGroup/VelocityAnimationGroup.js +3 -3
- package/lib/VelocityAnimation/VelocityAnimationGroup/docs/VelocityAnimationGroup__demo.docs.js +2 -2
- package/lib/a11y/FocusScope/docs/FocusScope__default.docs.js +2 -2
- package/lib/beta/FocusRing/docs/FocusRing__default.docs.js +2 -2
- package/lib/common/docStyle.module.css +6 -2
- package/lib/css.js +0 -2
- package/{es/MultiSelect → lib/deprecated}/AdvancedMultiSelect.module.css +23 -9
- package/lib/deprecated/PortalLayer/PortalLayer.js +2 -2
- package/lib/deprecated/PortalLayer/docs/PortalLayer__default.docs.js +2 -2
- package/lib/deprecated/advancedMultiSelectVariableJson.js +82 -0
- package/lib/index.js +10 -1
- package/lib/semantic/Button/Button.js +2 -2
- package/lib/semantic/Button/docs/Button__default.docs.js +2 -2
- package/package.json +4 -4
|
@@ -21,7 +21,7 @@ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _d
|
|
|
21
21
|
|
|
22
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
|
-
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf
|
|
24
|
+
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
25
25
|
|
|
26
26
|
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
27
27
|
|
|
@@ -31,7 +31,7 @@ function _assertThisInitialized(self) { if (self === void 0) { throw new Referen
|
|
|
31
31
|
|
|
32
32
|
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
33
33
|
|
|
34
|
-
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
34
|
+
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
35
35
|
|
|
36
36
|
var Modal__default = /*#__PURE__*/function (_React$Component) {
|
|
37
37
|
_inherits(Modal__default, _React$Component);
|
|
@@ -15,9 +15,7 @@ var _Loader = _interopRequireDefault(require("@zohodesk/svg/lib/svg/Loader"));
|
|
|
15
15
|
|
|
16
16
|
var _Popup = _interopRequireDefault(require("../Popup/Popup"));
|
|
17
17
|
|
|
18
|
-
var
|
|
19
|
-
|
|
20
|
-
var _TextBox = _interopRequireDefault(require("../TextBox/TextBox"));
|
|
18
|
+
var _TextBoxIcon = _interopRequireDefault(require("../TextBoxIcon/TextBoxIcon"));
|
|
21
19
|
|
|
22
20
|
var _Layout = require("../Layout");
|
|
23
21
|
|
|
@@ -35,6 +33,10 @@ var _Card = _interopRequireWildcard(require("../Card/Card"));
|
|
|
35
33
|
|
|
36
34
|
var _IdProvider = require("../Provider/IdProvider");
|
|
37
35
|
|
|
36
|
+
var _ResponsiveDropBox = _interopRequireDefault(require("../ResponsiveDropBox/ResponsiveDropBox"));
|
|
37
|
+
|
|
38
|
+
var _CustomResponsive = require("../Responsive/CustomResponsive");
|
|
39
|
+
|
|
38
40
|
var _Icon = _interopRequireDefault(require("@zohodesk/icons/lib/Icon"));
|
|
39
41
|
|
|
40
42
|
var _MultiSelectModule = _interopRequireDefault(require("./MultiSelect.module.css"));
|
|
@@ -43,6 +45,8 @@ var _Common = require("../utils/Common.js");
|
|
|
43
45
|
|
|
44
46
|
var _dropDownUtils = require("../utils/dropDownUtils");
|
|
45
47
|
|
|
48
|
+
var _Config = require("../Provider/Config");
|
|
49
|
+
|
|
46
50
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
47
51
|
|
|
48
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; }
|
|
@@ -79,7 +83,7 @@ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _d
|
|
|
79
83
|
|
|
80
84
|
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
85
|
|
|
82
|
-
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf
|
|
86
|
+
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
83
87
|
|
|
84
88
|
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
85
89
|
|
|
@@ -89,7 +93,7 @@ function _assertThisInitialized(self) { if (self === void 0) { throw new Referen
|
|
|
89
93
|
|
|
90
94
|
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
91
95
|
|
|
92
|
-
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
96
|
+
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
93
97
|
|
|
94
98
|
/* eslint-disable react/forbid-component-props */
|
|
95
99
|
|
|
@@ -903,6 +907,16 @@ var AdvancedGroupMultiSelect = /*#__PURE__*/function (_React$Component) {
|
|
|
903
907
|
notifyPopupToggle && notifyPopupToggle(isPopupOpen);
|
|
904
908
|
}
|
|
905
909
|
}
|
|
910
|
+
}, {
|
|
911
|
+
key: "responsiveFunc",
|
|
912
|
+
value: function responsiveFunc(_ref5) {
|
|
913
|
+
var mediaQueryOR = _ref5.mediaQueryOR;
|
|
914
|
+
return {
|
|
915
|
+
tabletMode: mediaQueryOR([{
|
|
916
|
+
maxWidth: 700
|
|
917
|
+
}])
|
|
918
|
+
};
|
|
919
|
+
}
|
|
906
920
|
}, {
|
|
907
921
|
key: "render",
|
|
908
922
|
value: function render() {
|
|
@@ -920,8 +934,7 @@ var AdvancedGroupMultiSelect = /*#__PURE__*/function (_React$Component) {
|
|
|
920
934
|
isPopupReady = _this$props8.isPopupReady,
|
|
921
935
|
defaultDropBoxPosition = _this$props8.defaultDropBoxPosition,
|
|
922
936
|
removeClose = _this$props8.removeClose,
|
|
923
|
-
|
|
924
|
-
needResponsive = _this$props8$needResp === void 0 ? false : _this$props8$needResp,
|
|
937
|
+
needResponsive = _this$props8.needResponsive,
|
|
925
938
|
animationStyle = _this$props8.animationStyle,
|
|
926
939
|
needSelectAll = _this$props8.needSelectAll,
|
|
927
940
|
selectAllText = _this$props8.selectAllText,
|
|
@@ -944,9 +957,9 @@ var AdvancedGroupMultiSelect = /*#__PURE__*/function (_React$Component) {
|
|
|
944
957
|
htmlId = _this$props8.htmlId,
|
|
945
958
|
i18nKeys = _this$props8.i18nKeys,
|
|
946
959
|
a11y = _this$props8.a11y,
|
|
947
|
-
isSearchClearOnSelect = _this$props8.isSearchClearOnSelect,
|
|
948
960
|
palette = _this$props8.palette,
|
|
949
|
-
needEffect = _this$props8.needEffect
|
|
961
|
+
needEffect = _this$props8.needEffect,
|
|
962
|
+
autoComplete = _this$props8.autoComplete;
|
|
950
963
|
var _i18nKeys = i18nKeys,
|
|
951
964
|
_i18nKeys$clearText = _i18nKeys.clearText,
|
|
952
965
|
clearText = _i18nKeys$clearText === void 0 ? 'Clear all' : _i18nKeys$clearText;
|
|
@@ -973,6 +986,7 @@ var AdvancedGroupMultiSelect = /*#__PURE__*/function (_React$Component) {
|
|
|
973
986
|
|
|
974
987
|
var setAriaId = this.getNextAriaId();
|
|
975
988
|
var ariaErrorId = this.getNextAriaId();
|
|
989
|
+
var isShowClearIcon = !isReadOnly && !isDisabled && selectedGroupOptions.length > 1;
|
|
976
990
|
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
977
991
|
className: "".concat(_MultiSelectModule["default"].wrapper, " ").concat(isDisabled ? _MultiSelectModule["default"].disabled : '', " ").concat(needEffect && !(isDisabled || isReadOnly) ? _MultiSelectModule["default"].effect : ''),
|
|
978
992
|
"data-id": "".concat(isDisabled ? "".concat(dataId, "_disabled") : isReadOnly ? "".concat(dataId, "_readOnly") : dataId),
|
|
@@ -1003,8 +1017,8 @@ var AdvancedGroupMultiSelect = /*#__PURE__*/function (_React$Component) {
|
|
|
1003
1017
|
adjust: true,
|
|
1004
1018
|
shrink: true
|
|
1005
1019
|
}, /*#__PURE__*/_react["default"].createElement("span", {
|
|
1006
|
-
className: " ".concat(_MultiSelectModule["default"].custmSpan, " ").concat(textBoxSize
|
|
1007
|
-
}, searchStr), /*#__PURE__*/_react["default"].createElement(
|
|
1020
|
+
className: " ".concat(_MultiSelectModule["default"].custmSpan, " ").concat(textBoxSize === 'xmedium' ? _MultiSelectModule["default"].custmSpanXmedium : _MultiSelectModule["default"].custmSpanMedium, " ").concat(isShowClearIcon ? _MultiSelectModule["default"].clearIconSpace : '', "\n ")
|
|
1021
|
+
}, searchStr), /*#__PURE__*/_react["default"].createElement(_TextBoxIcon["default"], {
|
|
1008
1022
|
isDisabled: isDisabled,
|
|
1009
1023
|
inputRef: this.searchInputRef,
|
|
1010
1024
|
needBorder: false,
|
|
@@ -1019,7 +1033,9 @@ var AdvancedGroupMultiSelect = /*#__PURE__*/function (_React$Component) {
|
|
|
1019
1033
|
variant: variant,
|
|
1020
1034
|
dataId: "".concat(dataId, "_textBox"),
|
|
1021
1035
|
isReadOnly: isReadOnly,
|
|
1022
|
-
customClass:
|
|
1036
|
+
customClass: {
|
|
1037
|
+
customTBoxWrap: _MultiSelectModule["default"].custmInputWrapper
|
|
1038
|
+
},
|
|
1023
1039
|
tabindex: isDisabled && '-1',
|
|
1024
1040
|
htmlId: htmlId,
|
|
1025
1041
|
a11y: {
|
|
@@ -1030,9 +1046,12 @@ var AdvancedGroupMultiSelect = /*#__PURE__*/function (_React$Component) {
|
|
|
1030
1046
|
ariaOwns: setAriaId,
|
|
1031
1047
|
ariaDescribedby: ariaErrorId
|
|
1032
1048
|
},
|
|
1033
|
-
autoComplete:
|
|
1034
|
-
}
|
|
1035
|
-
|
|
1049
|
+
autoComplete: autoComplete
|
|
1050
|
+
}, isShowClearIcon ? /*#__PURE__*/_react["default"].createElement(_Layout.Container, {
|
|
1051
|
+
alignBox: "row",
|
|
1052
|
+
align: "vertical"
|
|
1053
|
+
}, /*#__PURE__*/_react["default"].createElement(_Layout.Box, {
|
|
1054
|
+
className: "".concat(_MultiSelectModule["default"]["delete"], " ").concat(_MultiSelectModule["default"]["".concat(palette, "Delete")]),
|
|
1036
1055
|
dataId: "".concat(dataId, "_clearIcon"),
|
|
1037
1056
|
"data-title": clearText,
|
|
1038
1057
|
onClick: this.handleDeselectAll,
|
|
@@ -1041,79 +1060,89 @@ var AdvancedGroupMultiSelect = /*#__PURE__*/function (_React$Component) {
|
|
|
1041
1060
|
}, /*#__PURE__*/_react["default"].createElement(_Icon["default"], {
|
|
1042
1061
|
name: "ZD-delete",
|
|
1043
1062
|
size: "15"
|
|
1044
|
-
})) : null), !isReadOnly && !isDisabled && isPopupOpen ? /*#__PURE__*/_react["default"].createElement(
|
|
1045
|
-
|
|
1046
|
-
|
|
1047
|
-
|
|
1048
|
-
|
|
1049
|
-
|
|
1050
|
-
|
|
1051
|
-
|
|
1052
|
-
|
|
1053
|
-
|
|
1054
|
-
|
|
1055
|
-
|
|
1056
|
-
|
|
1057
|
-
|
|
1058
|
-
|
|
1059
|
-
|
|
1060
|
-
|
|
1061
|
-
customClass: "".concat(_MultiSelectModule["default"].box, " ").concat(_MultiSelectModule["default"]["".concat(palette, "Box")]),
|
|
1062
|
-
onScroll: this.handleScroll
|
|
1063
|
-
}, /*#__PURE__*/_react["default"].createElement(_Card.CardHeader, null, /*#__PURE__*/_react["default"].createElement(_MultiSelectHeader["default"], {
|
|
1064
|
-
needSelectAll: needSelectAll,
|
|
1065
|
-
onSelect: this.handleSelectAll,
|
|
1066
|
-
selectAllText: selectAllText,
|
|
1067
|
-
suggestions: suggestionOptionIds,
|
|
1068
|
-
dataId: dataId
|
|
1069
|
-
})), isDataLoaded ? /*#__PURE__*/_react["default"].createElement(_Card.CardContent, {
|
|
1070
|
-
customClass: dropBoxSize ? _MultiSelectModule["default"][dropBoxSize] : '',
|
|
1071
|
-
eleRef: this.suggestionContainerRef
|
|
1072
|
-
}, /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, {
|
|
1073
|
-
key: 'SuggestonsParent'
|
|
1074
|
-
}, suggestionGroups.length ? suggestionGroups.map(function (group) {
|
|
1075
|
-
var _group$options = group.options,
|
|
1076
|
-
suggestions = _group$options === void 0 ? [] : _group$options;
|
|
1077
|
-
var groupId = group.id;
|
|
1078
|
-
var groupName = group.name;
|
|
1079
|
-
var hoverId = suggestionOptionIds[hoverIndex];
|
|
1080
|
-
return /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, {
|
|
1081
|
-
key: groupId
|
|
1082
|
-
}, groupName && /*#__PURE__*/_react["default"].createElement("div", {
|
|
1083
|
-
className: _MultiSelectModule["default"].groupTitle
|
|
1084
|
-
}, /*#__PURE__*/_react["default"].createElement(_DropDownHeading["default"], {
|
|
1085
|
-
text: groupName,
|
|
1063
|
+
}))) : null))), !isReadOnly && !isDisabled && isPopupOpen ? /*#__PURE__*/_react["default"].createElement(_CustomResponsive.ResponsiveReceiver, {
|
|
1064
|
+
query: this.responsiveFunc,
|
|
1065
|
+
responsiveId: "Helmet"
|
|
1066
|
+
}, function (_ref6) {
|
|
1067
|
+
var tabletMode = _ref6.tabletMode;
|
|
1068
|
+
return /*#__PURE__*/_react["default"].createElement(_ResponsiveDropBox["default"], {
|
|
1069
|
+
animationStyle: animationStyle,
|
|
1070
|
+
boxPosition: position || "".concat(defaultDropBoxPosition, "Center"),
|
|
1071
|
+
getRef: getContainerRef,
|
|
1072
|
+
isActive: isPopupReady,
|
|
1073
|
+
isAnimate: true,
|
|
1074
|
+
isArrow: false,
|
|
1075
|
+
onClick: removeClose,
|
|
1076
|
+
needResponsive: needResponsive,
|
|
1077
|
+
isPadding: isPadding,
|
|
1078
|
+
isBoxPaddingNeed: !needSelectAll,
|
|
1079
|
+
htmlId: setAriaId,
|
|
1086
1080
|
a11y: {
|
|
1087
|
-
role: '
|
|
1088
|
-
|
|
1089
|
-
|
|
1090
|
-
|
|
1091
|
-
|
|
1092
|
-
|
|
1093
|
-
|
|
1094
|
-
|
|
1095
|
-
|
|
1096
|
-
|
|
1097
|
-
|
|
1098
|
-
|
|
1099
|
-
|
|
1100
|
-
|
|
1101
|
-
|
|
1102
|
-
|
|
1103
|
-
|
|
1104
|
-
|
|
1105
|
-
|
|
1106
|
-
|
|
1107
|
-
|
|
1108
|
-
|
|
1109
|
-
|
|
1110
|
-
|
|
1111
|
-
|
|
1112
|
-
|
|
1113
|
-
|
|
1114
|
-
|
|
1115
|
-
|
|
1116
|
-
|
|
1081
|
+
role: 'listbox',
|
|
1082
|
+
ariaMultiselectable: true
|
|
1083
|
+
},
|
|
1084
|
+
alignBox: "row"
|
|
1085
|
+
}, /*#__PURE__*/_react["default"].createElement(_Layout.Box, {
|
|
1086
|
+
flexible: true
|
|
1087
|
+
}, /*#__PURE__*/_react["default"].createElement(_Card["default"], {
|
|
1088
|
+
customClass: "".concat(_MultiSelectModule["default"].box, " ").concat(_MultiSelectModule["default"]["".concat(palette, "Box")]),
|
|
1089
|
+
onScroll: _this5.handleScroll
|
|
1090
|
+
}, /*#__PURE__*/_react["default"].createElement(_Card.CardHeader, null, /*#__PURE__*/_react["default"].createElement(_MultiSelectHeader["default"], {
|
|
1091
|
+
needSelectAll: needSelectAll,
|
|
1092
|
+
onSelect: _this5.handleSelectAll,
|
|
1093
|
+
selectAllText: selectAllText,
|
|
1094
|
+
suggestions: suggestionOptionIds,
|
|
1095
|
+
dataId: dataId
|
|
1096
|
+
})), isDataLoaded ? /*#__PURE__*/_react["default"].createElement(_Card.CardContent, {
|
|
1097
|
+
shrink: true,
|
|
1098
|
+
customClass: !tabletMode && dropBoxSize ? _MultiSelectModule["default"][dropBoxSize] : '',
|
|
1099
|
+
eleRef: _this5.suggestionContainerRef
|
|
1100
|
+
}, /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, {
|
|
1101
|
+
key: 'SuggestonsParent'
|
|
1102
|
+
}, suggestionGroups.length ? suggestionGroups.map(function (group) {
|
|
1103
|
+
var _group$options = group.options,
|
|
1104
|
+
suggestions = _group$options === void 0 ? [] : _group$options;
|
|
1105
|
+
var groupId = group.id;
|
|
1106
|
+
var groupName = group.name;
|
|
1107
|
+
var hoverId = suggestionOptionIds[hoverIndex];
|
|
1108
|
+
return /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, {
|
|
1109
|
+
key: groupId
|
|
1110
|
+
}, groupName && /*#__PURE__*/_react["default"].createElement("div", {
|
|
1111
|
+
className: _MultiSelectModule["default"].groupTitle
|
|
1112
|
+
}, /*#__PURE__*/_react["default"].createElement(_DropDownHeading["default"], {
|
|
1113
|
+
text: groupName,
|
|
1114
|
+
a11y: {
|
|
1115
|
+
role: 'heading'
|
|
1116
|
+
}
|
|
1117
|
+
})), /*#__PURE__*/_react["default"].createElement(_Suggestions["default"], {
|
|
1118
|
+
suggestions: suggestions,
|
|
1119
|
+
selectedOptions: selectedOptionIds,
|
|
1120
|
+
getRef: _this5.suggestionItemRef,
|
|
1121
|
+
hoverId: hoverId,
|
|
1122
|
+
onClick: _this5.handleSelectOption,
|
|
1123
|
+
onMouseEnter: _this5.handleMouseEnter,
|
|
1124
|
+
needTick: true,
|
|
1125
|
+
listItemSize: listItemSize,
|
|
1126
|
+
a11y: {
|
|
1127
|
+
role: 'option'
|
|
1128
|
+
}
|
|
1129
|
+
}));
|
|
1130
|
+
}) : /*#__PURE__*/_react["default"].createElement(_EmptyState["default"], {
|
|
1131
|
+
options: revampedGroups,
|
|
1132
|
+
searchString: searchStr,
|
|
1133
|
+
suggestions: suggestionGroups,
|
|
1134
|
+
dataId: dataId,
|
|
1135
|
+
isLoading: isFetchingOptions,
|
|
1136
|
+
i18nKeys: i18nKeys,
|
|
1137
|
+
htmlId: ariaErrorId
|
|
1138
|
+
}), isNextOptions && /*#__PURE__*/_react["default"].createElement("div", {
|
|
1139
|
+
className: _MultiSelectModule["default"].loader
|
|
1140
|
+
}, /*#__PURE__*/_react["default"].createElement(_Loader["default"], null)))) : /*#__PURE__*/_react["default"].createElement("div", {
|
|
1141
|
+
className: _MultiSelectModule["default"].loader
|
|
1142
|
+
}, /*#__PURE__*/_react["default"].createElement(_Loader["default"], null)), getFooter ? isDataLoaded ? /*#__PURE__*/_react["default"].createElement(_Card.CardFooter, null, getFooter()) : /*#__PURE__*/_react["default"].createElement("div", {
|
|
1143
|
+
className: _MultiSelectModule["default"].loader
|
|
1144
|
+
}, /*#__PURE__*/_react["default"].createElement(_Loader["default"], null)) : null)));
|
|
1145
|
+
}) : null);
|
|
1117
1146
|
}
|
|
1118
1147
|
}]);
|
|
1119
1148
|
|
|
@@ -1122,6 +1151,7 @@ var AdvancedGroupMultiSelect = /*#__PURE__*/function (_React$Component) {
|
|
|
1122
1151
|
|
|
1123
1152
|
AdvancedGroupMultiSelect.defaultProps = {
|
|
1124
1153
|
animationStyle: 'bounce',
|
|
1154
|
+
autoComplete: (0, _Config.getLibraryConfig)('autoComplete'),
|
|
1125
1155
|
dataId: 'multiSelect',
|
|
1126
1156
|
defaultDropBoxPosition: 'bottom',
|
|
1127
1157
|
dropBoxSize: 'small',
|
|
@@ -1152,10 +1182,12 @@ AdvancedGroupMultiSelect.defaultProps = {
|
|
|
1152
1182
|
i18nKeys: {},
|
|
1153
1183
|
a11y: {},
|
|
1154
1184
|
isSearchClearOnSelect: true,
|
|
1155
|
-
needEffect: _propTypes["default"].bool
|
|
1185
|
+
needEffect: _propTypes["default"].bool,
|
|
1186
|
+
palette: 'default'
|
|
1156
1187
|
};
|
|
1157
1188
|
AdvancedGroupMultiSelect.propTypes = {
|
|
1158
1189
|
animationStyle: _propTypes["default"].string,
|
|
1190
|
+
autoComplete: _propTypes["default"].bool,
|
|
1159
1191
|
borderColor: _propTypes["default"].oneOf(['transparent', 'default']),
|
|
1160
1192
|
customClass: _propTypes["default"].string,
|
|
1161
1193
|
dataId: _propTypes["default"].string,
|
|
@@ -23,9 +23,7 @@ var _MultiSelectHeader = _interopRequireDefault(require("./MultiSelectHeader"));
|
|
|
23
23
|
|
|
24
24
|
var _Popup = _interopRequireDefault(require("../Popup/Popup"));
|
|
25
25
|
|
|
26
|
-
var
|
|
27
|
-
|
|
28
|
-
var _TextBox = _interopRequireDefault(require("../TextBox/TextBox"));
|
|
26
|
+
var _TextBoxIcon = _interopRequireDefault(require("../TextBoxIcon/TextBoxIcon"));
|
|
29
27
|
|
|
30
28
|
var _Layout = require("../Layout");
|
|
31
29
|
|
|
@@ -35,7 +33,11 @@ var _Icon = _interopRequireDefault(require("@zohodesk/icons/lib/Icon"));
|
|
|
35
33
|
|
|
36
34
|
var _IdProvider = require("../Provider/IdProvider");
|
|
37
35
|
|
|
38
|
-
var
|
|
36
|
+
var _ResponsiveDropBox = _interopRequireDefault(require("../ResponsiveDropBox/ResponsiveDropBox"));
|
|
37
|
+
|
|
38
|
+
var _CustomResponsive = require("../Responsive/CustomResponsive");
|
|
39
|
+
|
|
40
|
+
var _MultiSelectModule = _interopRequireDefault(require("./MultiSelect.module.css"));
|
|
39
41
|
|
|
40
42
|
var _Common = require("../utils/Common.js");
|
|
41
43
|
|
|
@@ -47,7 +49,7 @@ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj &&
|
|
|
47
49
|
|
|
48
50
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
49
51
|
|
|
50
|
-
function _extends() { _extends = Object.assign
|
|
52
|
+
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); }
|
|
51
53
|
|
|
52
54
|
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
|
|
53
55
|
|
|
@@ -69,7 +71,7 @@ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _d
|
|
|
69
71
|
|
|
70
72
|
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
73
|
|
|
72
|
-
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf
|
|
74
|
+
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
73
75
|
|
|
74
76
|
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
75
77
|
|
|
@@ -79,7 +81,7 @@ function _assertThisInitialized(self) { if (self === void 0) { throw new Referen
|
|
|
79
81
|
|
|
80
82
|
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
81
83
|
|
|
82
|
-
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
84
|
+
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
83
85
|
|
|
84
86
|
/* eslint-disable react/sort-prop-types */
|
|
85
87
|
|
|
@@ -375,9 +377,21 @@ var AdvancedMultiSelectComponent = /*#__PURE__*/function (_MultiSelectComponent)
|
|
|
375
377
|
preventScroll: true
|
|
376
378
|
});
|
|
377
379
|
}
|
|
380
|
+
}, {
|
|
381
|
+
key: "responsiveFunc",
|
|
382
|
+
value: function responsiveFunc(_ref2) {
|
|
383
|
+
var mediaQueryOR = _ref2.mediaQueryOR;
|
|
384
|
+
return {
|
|
385
|
+
tabletMode: mediaQueryOR([{
|
|
386
|
+
maxWidth: 700
|
|
387
|
+
}])
|
|
388
|
+
};
|
|
389
|
+
}
|
|
378
390
|
}, {
|
|
379
391
|
key: "render",
|
|
380
392
|
value: function render() {
|
|
393
|
+
var _this4 = this;
|
|
394
|
+
|
|
381
395
|
var _this$props5 = this.props,
|
|
382
396
|
isReadOnly = _this$props5.isReadOnly,
|
|
383
397
|
needSelectAll = _this$props5.needSelectAll,
|
|
@@ -454,14 +468,14 @@ var AdvancedMultiSelectComponent = /*#__PURE__*/function (_MultiSelectComponent)
|
|
|
454
468
|
|
|
455
469
|
var isShowClearIcon = !isReadOnly && !isDisabled && isShowClear;
|
|
456
470
|
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
457
|
-
className: "".concat(
|
|
471
|
+
className: "".concat(_MultiSelectModule["default"].wrapper, " ").concat(isDisabled ? _MultiSelectModule["default"].disabled : '', " ").concat(borderColor === 'transparent' ? _MultiSelectModule["default"].transparentContainer : '', " ").concat(needEffect && !(isDisabled || isReadOnly) ? _MultiSelectModule["default"].effect : ''),
|
|
458
472
|
"data-id": dataIdMultiSelectComp,
|
|
459
473
|
"data-title": isDisabled ? title : null,
|
|
460
474
|
onClick: this.handleInputFocus
|
|
461
475
|
}, /*#__PURE__*/_react["default"].createElement(_Layout.Container, {
|
|
462
476
|
align: "vertical",
|
|
463
477
|
alignBox: "row",
|
|
464
|
-
className: "".concat(
|
|
478
|
+
className: "".concat(_MultiSelectModule["default"].container, " ").concat(_MultiSelectModule["default"][size], " ").concat(isActive && needBorder ? _MultiSelectModule["default"].active : '', " ").concat(needBorder ? _MultiSelectModule["default"].hasBorder : '', " ").concat(needBorder ? !isDisabled ? _MultiSelectModule["default"]["borderColor_".concat(borderColor)] : _MultiSelectModule["default"].borderColor_transparent : ''),
|
|
465
479
|
eleRef: this.selectedOptionContainerRef,
|
|
466
480
|
wrap: "wrap"
|
|
467
481
|
}, /*#__PURE__*/_react["default"].createElement(_SelectedOptions["default"], {
|
|
@@ -472,12 +486,17 @@ var AdvancedMultiSelectComponent = /*#__PURE__*/function (_MultiSelectComponent)
|
|
|
472
486
|
onRemove: this.handleRemoveOption,
|
|
473
487
|
onSelect: this.handleClickSelectedOption
|
|
474
488
|
}), moreCount > 0 ? /*#__PURE__*/_react["default"].createElement(_Layout.Box, {
|
|
475
|
-
className:
|
|
489
|
+
className: _MultiSelectModule["default"].more,
|
|
476
490
|
onClick: this.handleMoreClick,
|
|
477
491
|
tagName: "button"
|
|
478
492
|
}, "+ ".concat(moreCount, " More")) : null, /*#__PURE__*/_react["default"].createElement(_Layout.Box, {
|
|
479
|
-
flexible: true
|
|
480
|
-
|
|
493
|
+
flexible: true,
|
|
494
|
+
className: _MultiSelectModule["default"].wrapper,
|
|
495
|
+
adjust: true,
|
|
496
|
+
shrink: true
|
|
497
|
+
}, /*#__PURE__*/_react["default"].createElement("span", {
|
|
498
|
+
className: " ".concat(_MultiSelectModule["default"].custmSpan, " ").concat(textBoxSize === 'xmedium' ? _MultiSelectModule["default"].custmSpanXmedium : _MultiSelectModule["default"].custmSpanMedium, " ").concat(isShowClearIcon ? _MultiSelectModule["default"].clearIconSpace : '', "\n ")
|
|
499
|
+
}, searchStr), /*#__PURE__*/_react["default"].createElement(_TextBoxIcon["default"], {
|
|
481
500
|
isDisabled: isDisabled,
|
|
482
501
|
inputRef: this.searchInputRef,
|
|
483
502
|
needBorder: false,
|
|
@@ -492,6 +511,9 @@ var AdvancedMultiSelectComponent = /*#__PURE__*/function (_MultiSelectComponent)
|
|
|
492
511
|
variant: variant,
|
|
493
512
|
isReadOnly: isReadOnly,
|
|
494
513
|
tabindex: isDisabled && '-1',
|
|
514
|
+
customClass: {
|
|
515
|
+
customTBoxWrap: _MultiSelectModule["default"].custmInputWrapper
|
|
516
|
+
},
|
|
495
517
|
htmlId: htmlId,
|
|
496
518
|
a11y: {
|
|
497
519
|
role: 'combobox',
|
|
@@ -502,8 +524,11 @@ var AdvancedMultiSelectComponent = /*#__PURE__*/function (_MultiSelectComponent)
|
|
|
502
524
|
ariaDescribedby: ariaErrorId
|
|
503
525
|
},
|
|
504
526
|
autoComplete: false
|
|
505
|
-
}
|
|
506
|
-
|
|
527
|
+
}, isShowClearIcon ? /*#__PURE__*/_react["default"].createElement(_Layout.Container, {
|
|
528
|
+
alignBox: "row",
|
|
529
|
+
align: "vertical"
|
|
530
|
+
}, /*#__PURE__*/_react["default"].createElement(_Layout.Box, {
|
|
531
|
+
className: "".concat(_MultiSelectModule["default"]["delete"]),
|
|
507
532
|
dataId: dataIdClearIcon,
|
|
508
533
|
"data-title": clearText,
|
|
509
534
|
onClick: this.handleDeselectAll,
|
|
@@ -512,54 +537,66 @@ var AdvancedMultiSelectComponent = /*#__PURE__*/function (_MultiSelectComponent)
|
|
|
512
537
|
}, /*#__PURE__*/_react["default"].createElement(_Icon["default"], {
|
|
513
538
|
name: "ZD-delete",
|
|
514
539
|
size: "15"
|
|
515
|
-
})) : null), !isReadOnly && !isDisabled && isPopupOpen ? /*#__PURE__*/_react["default"].createElement(
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
}
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
540
|
+
}))) : null))), !isReadOnly && !isDisabled && isPopupOpen ? /*#__PURE__*/_react["default"].createElement(_CustomResponsive.ResponsiveReceiver, {
|
|
541
|
+
query: this.responsiveFunc,
|
|
542
|
+
responsiveId: "Helmet"
|
|
543
|
+
}, function (_ref3) {
|
|
544
|
+
var tabletMode = _ref3.tabletMode;
|
|
545
|
+
return /*#__PURE__*/_react["default"].createElement(_ResponsiveDropBox["default"], _extends({
|
|
546
|
+
animationStyle: animationStyle,
|
|
547
|
+
boxPosition: position || "".concat(defaultDropBoxPosition, "Center"),
|
|
548
|
+
getRef: getContainerRef,
|
|
549
|
+
isActive: isPopupReady,
|
|
550
|
+
isAnimate: isAnimate,
|
|
551
|
+
isArrow: false,
|
|
552
|
+
onClick: removeClose,
|
|
553
|
+
isPadding: false,
|
|
554
|
+
isBoxPaddingNeed: isBoxPaddingNeed,
|
|
555
|
+
htmlId: setAriaId,
|
|
556
|
+
a11y: {
|
|
557
|
+
role: 'listbox',
|
|
558
|
+
ariaMultiselectable: true
|
|
559
|
+
}
|
|
560
|
+
}, DropBoxProps, {
|
|
561
|
+
alignBox: "row",
|
|
562
|
+
isResponsivePadding: getFooter ? false : true
|
|
563
|
+
}), /*#__PURE__*/_react["default"].createElement(_Layout.Box, {
|
|
564
|
+
flexible: true
|
|
565
|
+
}, /*#__PURE__*/_react["default"].createElement(_Card["default"], {
|
|
566
|
+
customClass: _MultiSelectModule["default"].box,
|
|
567
|
+
onScroll: _this4.handleScroll
|
|
568
|
+
}, /*#__PURE__*/_react["default"].createElement(_Card.CardHeader, null, /*#__PURE__*/_react["default"].createElement(_MultiSelectHeader["default"], {
|
|
569
|
+
needSelectAll: needSelectAll,
|
|
570
|
+
onSelect: _this4.handleSelectAll,
|
|
571
|
+
selectAllText: selectAllText,
|
|
572
|
+
suggestions: suggestions,
|
|
573
|
+
dataId: dataIdSelectAllEle
|
|
574
|
+
})), /*#__PURE__*/_react["default"].createElement(_Card.CardContent, {
|
|
575
|
+
shrink: true,
|
|
576
|
+
customClass: !tabletMode && dropBoxSize ? _MultiSelectModule["default"][dropBoxSize] : '',
|
|
577
|
+
eleRef: _this4.suggestionContainerRef
|
|
578
|
+
}, suggestions.length ? /*#__PURE__*/_react["default"].createElement(_Suggestions["default"], _extends({
|
|
579
|
+
suggestions: suggestions,
|
|
580
|
+
selectedOptions: allselectedOptionIds,
|
|
581
|
+
getRef: _this4.suggestionItemRef,
|
|
582
|
+
hoverOption: hoverOption,
|
|
583
|
+
onClick: _this4.handleSelectOption,
|
|
584
|
+
onMouseEnter: _this4.handleMouseEnter,
|
|
585
|
+
needTick: true,
|
|
586
|
+
listItemSize: listItemSize,
|
|
587
|
+
a11y: {
|
|
588
|
+
role: 'option'
|
|
589
|
+
}
|
|
590
|
+
}, SuggestionsProps)) : /*#__PURE__*/_react["default"].createElement(_EmptyState["default"], {
|
|
591
|
+
isLoading: isFetchingOptions,
|
|
592
|
+
options: options,
|
|
593
|
+
searchString: searchStr,
|
|
594
|
+
suggestions: suggestions,
|
|
595
|
+
dataId: dataIdLoading,
|
|
596
|
+
i18nKeys: i18nKeys,
|
|
597
|
+
htmlId: ariaErrorId
|
|
598
|
+
})), getFooter ? /*#__PURE__*/_react["default"].createElement(_Card.CardFooter, null, getFooter()) : null)));
|
|
599
|
+
}) : null);
|
|
563
600
|
}
|
|
564
601
|
}]);
|
|
565
602
|
|
|
@@ -23,7 +23,7 @@ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _d
|
|
|
23
23
|
|
|
24
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
|
-
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf
|
|
26
|
+
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
27
27
|
|
|
28
28
|
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
29
29
|
|
|
@@ -33,7 +33,7 @@ function _assertThisInitialized(self) { if (self === void 0) { throw new Referen
|
|
|
33
33
|
|
|
34
34
|
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
35
35
|
|
|
36
|
-
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
36
|
+
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
37
37
|
|
|
38
38
|
var EmptyState = /*#__PURE__*/function (_React$PureComponent) {
|
|
39
39
|
_inherits(EmptyState, _React$PureComponent);
|