@zohodesk/components 1.0.0-temp-667 → 1.0.0-temp-999
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 +7 -0
- package/assets/Appearance/default/themes/blue/blueDefaultCTATheme.module.css +1 -1
- package/assets/Appearance/default/themes/green/greenDefaultCTATheme.module.css +1 -1
- package/assets/Appearance/default/themes/orange/orangeDefaultCTATheme.module.css +1 -1
- package/assets/Appearance/default/themes/red/redDefaultCTATheme.module.css +1 -1
- package/assets/Appearance/default/themes/yellow/yellowDefaultCTATheme.module.css +1 -1
- package/es/AppContainer/AppContainer.js +1 -1
- package/es/Avatar/Avatar.js +1 -1
- package/es/Avatar/Avatar.module.css +9 -11
- package/es/AvatarTeam/AvatarTeam.js +1 -1
- package/es/AvatarTeam/AvatarTeam.module.css +7 -21
- package/es/Button/Button.module.css +24 -97
- package/es/Buttongroup/Buttongroup.module.css +8 -37
- package/es/CheckBox/CheckBox.js +1 -1
- package/es/CheckBox/CheckBox.module.css +19 -29
- package/es/DateTime/DateTime.module.css +12 -39
- package/es/DateTime/DateWidget.module.css +5 -9
- package/es/DateTime/YearView.module.css +7 -17
- package/es/DropBox/DropBox.js +1 -1
- package/es/DropBox/DropBox.module.css +11 -47
- package/es/DropDown/DropDownHeading.module.css +3 -7
- package/es/DropDown/DropDownItem.module.css +6 -32
- package/es/ListItem/ListContainer.js +1 -1
- package/es/ListItem/ListItem.js +1 -1
- package/es/ListItem/ListItem.module.css +33 -69
- 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/AdvancedMultiSelect.js +1 -1
- package/es/MultiSelect/AdvancedMultiSelect.module.css +113 -0
- package/es/MultiSelect/MultiSelect.module.css +11 -28
- package/es/MultiSelect/SelectedOptions.js +1 -1
- package/es/MultiSelect/SelectedOptions.module.css +2 -8
- 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 +10 -18
- package/es/Responsive/ResizeComponent.js +82 -15
- package/es/Responsive/ResizeObserver.js +6 -2
- package/es/Responsive/docs/style.module.css +8 -17
- package/es/ResponsiveDropBox/ResponsiveDropBox.js +1 -1
- package/es/Ribbon/Ribbon.module.css +28 -93
- package/es/RippleEffect/RippleEffect.module.css +44 -37
- package/es/Select/Select.js +8 -30
- package/es/Select/Select.module.css +2 -12
- package/es/Select/docs/Select__default.docs.js +1 -1
- package/es/Stencils/Stencils.module.css +3 -21
- 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 +7 -16
- package/es/Tab/TabWrapper.js +1 -1
- package/es/Tab/Tabs.js +1 -1
- package/es/Tab/Tabs.module.css +8 -42
- package/es/Tab/docs/tabdocs.module.css +1 -1
- package/es/Tag/Tag.module.css +14 -36
- package/es/TextBox/TextBox.js +1 -1
- package/es/TextBox/TextBox.module.css +11 -7
- package/es/TextBoxIcon/TextBoxIcon.js +1 -1
- package/es/TextBoxIcon/TextBoxIcon.module.css +5 -12
- package/es/Textarea/Textarea.js +1 -1
- package/es/Textarea/Textarea.module.css +7 -6
- package/es/Tooltip/Tooltip.module.css +8 -9
- package/es/VelocityAnimation/VelocityAnimationGroup/VelocityAnimationGroup.js +1 -1
- package/es/beta/FocusRing/FocusRing.module.css +26 -51
- package/es/common/animation.module.css +21 -219
- package/es/common/basicReset.module.css +12 -2
- package/es/common/common.module.css +18 -62
- package/es/common/customscroll.module.css +21 -17
- package/es/common/docStyle.module.css +32 -79
- package/es/common/transition.module.css +10 -50
- package/es/deprecated/AdvancedMultiSelect.module.css +8 -22
- 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 +4 -11
- 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 +4 -5
- package/lib/CheckBox/CheckBox.module.css +8 -12
- 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 +22 -50
- 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 +4 -14
- package/lib/DateTime/DateWidget.module.css +4 -0
- 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 +0 -1
- 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 +397 -496
- package/lib/LightNightMode/docs/AlternativeColors.docs.js +3 -25
- package/lib/ListItem/ListContainer.js +5 -8
- package/lib/ListItem/ListItem.js +4 -4
- package/lib/ListItem/ListItem.module.css +19 -18
- 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 +88 -120
- package/lib/MultiSelect/AdvancedMultiSelect.js +62 -99
- package/lib/{deprecated → MultiSelect}/AdvancedMultiSelect.module.css +1 -1
- package/lib/MultiSelect/EmptyState.js +2 -2
- package/lib/MultiSelect/MultiSelect.js +64 -90
- package/lib/MultiSelect/MultiSelect.module.css +2 -15
- package/lib/MultiSelect/MultiSelectHeader.js +2 -2
- package/lib/MultiSelect/MultiSelectWithAvatar.js +55 -80
- 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 +6 -13
- 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 +1 -3
- 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 +100 -34
- package/lib/Radio/Radio.js +2 -2
- package/lib/Radio/Radio.module.css +6 -8
- 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/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 +15 -37
- package/lib/RippleEffect/docs/RippleEffect__default.docs.js +2 -2
- package/lib/Select/GroupSelect.js +79 -102
- package/lib/Select/Select.js +87 -142
- package/lib/Select/Select.module.css +0 -6
- package/lib/Select/SelectWithAvatar.js +73 -98
- package/lib/Select/SelectWithIcon.js +76 -99
- 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 +2 -3
- 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 +47 -70
- package/lib/Tab/Tabs.module.css +1 -2
- package/lib/Tab/docs/Tab__default.docs.js +2 -2
- package/lib/Tag/Tag.js +3 -3
- package/lib/Tag/Tag.module.css +2 -6
- 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 +10 -62
- package/lib/Tooltip/Tooltip.module.css +1 -6
- package/lib/Tooltip/__tests__/Tooltip.spec.js +2 -2
- package/lib/Tooltip/docs/Tooltip__default.docs.js +13 -52
- 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 +2 -6
- package/lib/css.js +2 -0
- package/lib/deprecated/PortalLayer/PortalLayer.js +2 -2
- package/lib/deprecated/PortalLayer/docs/PortalLayer__default.docs.js +2 -2
- package/lib/index.js +1 -10
- package/lib/semantic/Button/Button.js +2 -2
- package/lib/semantic/Button/docs/Button__default.docs.js +2 -2
- package/package.json +6 -5
- package/lib/ResponsiveDropBox/ResponsiveDropBox.js +0 -130
- package/lib/ResponsiveDropBox/ResponsiveDropBox.module.css +0 -6
- package/lib/deprecated/advancedMultiSelectVariableJson.js +0 -82
package/lib/Select/Select.js
CHANGED
|
@@ -13,6 +13,8 @@ var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
|
13
13
|
|
|
14
14
|
var _Popup = _interopRequireDefault(require("../Popup/Popup"));
|
|
15
15
|
|
|
16
|
+
var _DropBox = _interopRequireDefault(require("../DropBox/DropBox"));
|
|
17
|
+
|
|
16
18
|
var _TextBoxIcon = _interopRequireDefault(require("../TextBoxIcon/TextBoxIcon"));
|
|
17
19
|
|
|
18
20
|
var _Layout = require("../Layout");
|
|
@@ -29,25 +31,19 @@ var _IdProvider = require("../Provider/IdProvider");
|
|
|
29
31
|
|
|
30
32
|
var _Icon = _interopRequireDefault(require("@zohodesk/icons/lib/Icon"));
|
|
31
33
|
|
|
32
|
-
var _ResponsiveDropBox = _interopRequireDefault(require("../ResponsiveDropBox/ResponsiveDropBox"));
|
|
33
|
-
|
|
34
|
-
var _CustomResponsive = require("../Responsive/CustomResponsive");
|
|
35
|
-
|
|
36
34
|
var _dropDownUtils = require("../utils/dropDownUtils");
|
|
37
35
|
|
|
38
36
|
var _Common = require("../utils/Common.js");
|
|
39
37
|
|
|
40
38
|
var _SelectModule = _interopRequireDefault(require("./Select.module.css"));
|
|
41
39
|
|
|
42
|
-
var _Config = require("../Provider/Config");
|
|
43
|
-
|
|
44
40
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
45
41
|
|
|
46
42
|
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
43
|
|
|
48
44
|
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; }
|
|
49
45
|
|
|
50
|
-
function _extends() { _extends = Object.assign
|
|
46
|
+
function _extends() { _extends = Object.assign || 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
47
|
|
|
52
48
|
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
53
49
|
|
|
@@ -57,7 +53,7 @@ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _d
|
|
|
57
53
|
|
|
58
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); }
|
|
59
55
|
|
|
60
|
-
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf
|
|
56
|
+
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
61
57
|
|
|
62
58
|
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); }; }
|
|
63
59
|
|
|
@@ -67,7 +63,7 @@ function _assertThisInitialized(self) { if (self === void 0) { throw new Referen
|
|
|
67
63
|
|
|
68
64
|
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; } }
|
|
69
65
|
|
|
70
|
-
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf
|
|
66
|
+
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
71
67
|
|
|
72
68
|
/* eslint-disable react/no-deprecated */
|
|
73
69
|
|
|
@@ -131,7 +127,6 @@ var SelectComponent = /*#__PURE__*/function (_Component) {
|
|
|
131
127
|
searchStr: '',
|
|
132
128
|
isFetchingOptions: false,
|
|
133
129
|
selectedId: selectedId,
|
|
134
|
-
isFocused: false,
|
|
135
130
|
selectedValueIndex: hoverIndex
|
|
136
131
|
};
|
|
137
132
|
_this.optionsOrder = optionsOrder;
|
|
@@ -139,7 +134,6 @@ var SelectComponent = /*#__PURE__*/function (_Component) {
|
|
|
139
134
|
_this.normalizedFormatOptions = normalizedFormatOptions;
|
|
140
135
|
_this.allSelectedOptions = selectedValueDetails;
|
|
141
136
|
_this.handleChange = _this.handleChange.bind(_assertThisInitialized(_this));
|
|
142
|
-
_this.onBlur = _this.onBlur.bind(_assertThisInitialized(_this));
|
|
143
137
|
_this.handleKeyDown = _this.handleKeyDown.bind(_assertThisInitialized(_this));
|
|
144
138
|
_this.handleSearch = _this.handleSearch.bind(_assertThisInitialized(_this));
|
|
145
139
|
_this.handleFilterSuggestions = _this.handleFilterSuggestions.bind(_assertThisInitialized(_this));
|
|
@@ -325,16 +319,6 @@ var SelectComponent = /*#__PURE__*/function (_Component) {
|
|
|
325
319
|
|
|
326
320
|
needCloseOnSelect && this.handlePopupClose(e);
|
|
327
321
|
}
|
|
328
|
-
}, {
|
|
329
|
-
key: "responsiveFunc",
|
|
330
|
-
value: function responsiveFunc(_ref) {
|
|
331
|
-
var mediaQueryOR = _ref.mediaQueryOR;
|
|
332
|
-
return {
|
|
333
|
-
tabletMode: mediaQueryOR([{
|
|
334
|
-
maxWidth: 700
|
|
335
|
-
}])
|
|
336
|
-
};
|
|
337
|
-
}
|
|
338
322
|
}, {
|
|
339
323
|
key: "handleKeyDown",
|
|
340
324
|
value: function handleKeyDown(e) {
|
|
@@ -387,8 +371,8 @@ var SelectComponent = /*#__PURE__*/function (_Component) {
|
|
|
387
371
|
} else if (keyCode === 13) {
|
|
388
372
|
var option = options[hoverIndex];
|
|
389
373
|
|
|
390
|
-
var
|
|
391
|
-
id =
|
|
374
|
+
var _ref = option || {},
|
|
375
|
+
id = _ref.id;
|
|
392
376
|
|
|
393
377
|
if (isPopupOpen && !(0, _Common.getIsEmptyValue)(id) && onChange) {
|
|
394
378
|
onChange(id, optionsNormalize[id]);
|
|
@@ -405,8 +389,8 @@ var SelectComponent = /*#__PURE__*/function (_Component) {
|
|
|
405
389
|
} else if (keyCode === 9) {
|
|
406
390
|
var _option = options[hoverIndex];
|
|
407
391
|
|
|
408
|
-
var
|
|
409
|
-
_id =
|
|
392
|
+
var _ref2 = _option || {},
|
|
393
|
+
_id = _ref2.id;
|
|
410
394
|
|
|
411
395
|
if (isPopupOpen && !(0, _Common.getIsEmptyValue)(_id)) {
|
|
412
396
|
onChange && onChange(_id, optionsNormalize[_id]);
|
|
@@ -437,7 +421,6 @@ var SelectComponent = /*#__PURE__*/function (_Component) {
|
|
|
437
421
|
var searchStrRegex = (0, _Common.getSearchString)(searchStr);
|
|
438
422
|
var valueStrRegex = (0, _Common.getSearchString)(value);
|
|
439
423
|
var isSearch = searchStrRegex !== valueStrRegex ? true : false;
|
|
440
|
-
console.log(value, "valuevalue");
|
|
441
424
|
this.setState({
|
|
442
425
|
searchStr: value,
|
|
443
426
|
hoverIndex: 0
|
|
@@ -582,13 +565,6 @@ var SelectComponent = /*#__PURE__*/function (_Component) {
|
|
|
582
565
|
value: function suggestionItemRef(el, index, id) {
|
|
583
566
|
this["suggestion_".concat(id)] = el;
|
|
584
567
|
}
|
|
585
|
-
}, {
|
|
586
|
-
key: "onBlur",
|
|
587
|
-
value: function onBlur() {
|
|
588
|
-
this.setState({
|
|
589
|
-
isFocused: false
|
|
590
|
-
});
|
|
591
|
-
}
|
|
592
568
|
}, {
|
|
593
569
|
key: "searchInputRef",
|
|
594
570
|
value: function searchInputRef(el) {
|
|
@@ -606,10 +582,6 @@ var SelectComponent = /*#__PURE__*/function (_Component) {
|
|
|
606
582
|
value: function handleSelectFocus() {
|
|
607
583
|
var valueInput = this.valueInput;
|
|
608
584
|
valueInput && valueInput.setSelectionRange(valueInput, 0);
|
|
609
|
-
this.setState({
|
|
610
|
-
isFocused: true
|
|
611
|
-
});
|
|
612
|
-
thi.handleSearch(selected);
|
|
613
585
|
}
|
|
614
586
|
}, {
|
|
615
587
|
key: "handleClearSearch",
|
|
@@ -653,8 +625,8 @@ var SelectComponent = /*#__PURE__*/function (_Component) {
|
|
|
653
625
|
var changeValue = function changeValue() {
|
|
654
626
|
var optionDetails = _this6.autoSelectSuggestions[_this6.autoSelectIndex];
|
|
655
627
|
|
|
656
|
-
var
|
|
657
|
-
id =
|
|
628
|
+
var _ref3 = optionDetails || {},
|
|
629
|
+
id = _ref3.id;
|
|
658
630
|
|
|
659
631
|
if (!(0, _Common.getIsEmptyValue)(id)) {
|
|
660
632
|
_this6.handleChange(id);
|
|
@@ -738,8 +710,6 @@ var SelectComponent = /*#__PURE__*/function (_Component) {
|
|
|
738
710
|
}, {
|
|
739
711
|
key: "render",
|
|
740
712
|
value: function render() {
|
|
741
|
-
var _this7 = this;
|
|
742
|
-
|
|
743
713
|
var _this$props11 = this.props,
|
|
744
714
|
needSearch = _this$props11.needSearch,
|
|
745
715
|
dropBoxSize = _this$props11.dropBoxSize,
|
|
@@ -781,8 +751,7 @@ var SelectComponent = /*#__PURE__*/function (_Component) {
|
|
|
781
751
|
htmlId = _this$props11.htmlId,
|
|
782
752
|
children = _this$props11.children,
|
|
783
753
|
iconOnHover = _this$props11.iconOnHover,
|
|
784
|
-
customProps = _this$props11.customProps
|
|
785
|
-
autoComplete = _this$props11.autoComplete;
|
|
754
|
+
customProps = _this$props11.customProps;
|
|
786
755
|
var _i18nKeys = i18nKeys,
|
|
787
756
|
TextBoxIcon_i18n = _i18nKeys.TextBoxIcon_i18n,
|
|
788
757
|
_i18nKeys$TextBox_all = _i18nKeys.TextBox_ally_label,
|
|
@@ -797,7 +766,6 @@ var SelectComponent = /*#__PURE__*/function (_Component) {
|
|
|
797
766
|
searchStr = _this$state4.searchStr,
|
|
798
767
|
isFetchingOptions = _this$state4.isFetchingOptions,
|
|
799
768
|
selectedId = _this$state4.selectedId,
|
|
800
|
-
isFocused = _this$state4.isFocused,
|
|
801
769
|
options = _this$state4.options;
|
|
802
770
|
var suggestions = this.handleFilterSuggestions();
|
|
803
771
|
var setAriaId = this.getNextAriaId();
|
|
@@ -833,14 +801,11 @@ var SelectComponent = /*#__PURE__*/function (_Component) {
|
|
|
833
801
|
maxLength: maxLength,
|
|
834
802
|
needBorder: needBorder,
|
|
835
803
|
onFocus: this.handleSelectFocus,
|
|
836
|
-
onChange: this.handleSearch,
|
|
837
804
|
onKeyDown: this.handleKeyDown,
|
|
838
|
-
placeHolder: placeHolder
|
|
839
|
-
,
|
|
805
|
+
placeHolder: placeHolder,
|
|
806
|
+
isReadOnly: true,
|
|
840
807
|
size: textBoxSize,
|
|
841
|
-
value:
|
|
842
|
-
onBlur: this.onBlur // defaultValue={selected}
|
|
843
|
-
,
|
|
808
|
+
value: selected,
|
|
844
809
|
variant: textBoxVariant,
|
|
845
810
|
needReadOnlyStyle: isReadOnly ? true : false,
|
|
846
811
|
dataId: "".concat(dataId, "_textBox"),
|
|
@@ -850,11 +815,10 @@ var SelectComponent = /*#__PURE__*/function (_Component) {
|
|
|
850
815
|
},
|
|
851
816
|
needEffect: isReadOnly || isDisabled ? false : true,
|
|
852
817
|
onKeyPress: this.handleValueInputChange,
|
|
853
|
-
onClear: this.handleClearSearch,
|
|
854
818
|
borderColor: borderColor,
|
|
855
819
|
htmlId: htmlId,
|
|
856
820
|
isFocus: isPopupReady,
|
|
857
|
-
autoComplete:
|
|
821
|
+
autoComplete: false,
|
|
858
822
|
customProps: {
|
|
859
823
|
TextBoxProps: TextBoxProps
|
|
860
824
|
}
|
|
@@ -888,16 +852,12 @@ var SelectComponent = /*#__PURE__*/function (_Component) {
|
|
|
888
852
|
maxLength: maxLength,
|
|
889
853
|
needBorder: needBorder,
|
|
890
854
|
onFocus: this.handleSelectFocus,
|
|
891
|
-
onChange: this.handleSearch,
|
|
892
855
|
onKeyDown: getChildren && this.handleKeyDown,
|
|
893
|
-
|
|
894
|
-
|
|
895
|
-
,
|
|
856
|
+
placeHolder: placeHolder,
|
|
857
|
+
isReadOnly: true,
|
|
896
858
|
needEffect: isReadOnly || isDisabled ? false : true,
|
|
897
859
|
size: textBoxSize,
|
|
898
|
-
value:
|
|
899
|
-
onBlur: this.onBlur // defaultValue={selected}
|
|
900
|
-
,
|
|
860
|
+
value: selected,
|
|
901
861
|
variant: textBoxVariant,
|
|
902
862
|
needReadOnlyStyle: isReadOnly ? true : false,
|
|
903
863
|
dataId: "".concat(dataId, "_textBox"),
|
|
@@ -905,89 +865,76 @@ var SelectComponent = /*#__PURE__*/function (_Component) {
|
|
|
905
865
|
onKeyPress: this.handleValueInputChange,
|
|
906
866
|
borderColor: borderColor,
|
|
907
867
|
htmlId: htmlId,
|
|
908
|
-
autoComplete:
|
|
868
|
+
autoComplete: false,
|
|
909
869
|
isFocus: isPopupReady,
|
|
910
870
|
customProps: TextBoxProps
|
|
911
|
-
})), !isReadOnly && !isDisabled && isPopupOpen ? /*#__PURE__*/_react["default"].createElement(
|
|
912
|
-
|
|
913
|
-
|
|
914
|
-
|
|
915
|
-
|
|
916
|
-
|
|
917
|
-
|
|
918
|
-
|
|
919
|
-
|
|
920
|
-
|
|
921
|
-
|
|
922
|
-
|
|
923
|
-
|
|
924
|
-
|
|
925
|
-
|
|
926
|
-
|
|
927
|
-
|
|
928
|
-
|
|
929
|
-
|
|
930
|
-
|
|
931
|
-
|
|
932
|
-
},
|
|
933
|
-
|
|
934
|
-
|
|
935
|
-
|
|
936
|
-
|
|
937
|
-
|
|
938
|
-
|
|
939
|
-
|
|
940
|
-
|
|
941
|
-
|
|
942
|
-
|
|
943
|
-
|
|
944
|
-
|
|
945
|
-
|
|
946
|
-
|
|
947
|
-
|
|
948
|
-
|
|
949
|
-
|
|
950
|
-
|
|
951
|
-
|
|
952
|
-
|
|
953
|
-
|
|
954
|
-
|
|
955
|
-
|
|
956
|
-
|
|
957
|
-
|
|
958
|
-
|
|
959
|
-
|
|
960
|
-
|
|
961
|
-
|
|
962
|
-
|
|
963
|
-
|
|
964
|
-
|
|
965
|
-
|
|
966
|
-
|
|
967
|
-
|
|
968
|
-
|
|
969
|
-
|
|
970
|
-
|
|
971
|
-
|
|
972
|
-
|
|
973
|
-
|
|
974
|
-
|
|
975
|
-
|
|
976
|
-
|
|
977
|
-
|
|
978
|
-
}, SuggestionsProps)) : /*#__PURE__*/_react["default"].createElement(_EmptyState["default"], {
|
|
979
|
-
isLoading: isFetchingOptions,
|
|
980
|
-
options: options,
|
|
981
|
-
searchString: searchStr,
|
|
982
|
-
suggestions: suggestions,
|
|
983
|
-
dataId: dataId,
|
|
984
|
-
getCustomEmptyState: getCustomEmptyState ? _this7.handleGetAddNewOptionText : null,
|
|
985
|
-
i18nKeys: i18nKeys,
|
|
986
|
-
htmlId: ariaErrorId
|
|
987
|
-
})), getFooter ? /*#__PURE__*/_react["default"].createElement(_Card.CardFooter, null, getFooter()) : null)) : /*#__PURE__*/_react["default"].createElement(_Layout.Box, {
|
|
988
|
-
flexible: true
|
|
989
|
-
}, getChildren()));
|
|
990
|
-
}) : null);
|
|
871
|
+
})), !isReadOnly && !isDisabled && isPopupOpen ? /*#__PURE__*/_react["default"].createElement(_DropBox["default"], {
|
|
872
|
+
animationStyle: animationStyle,
|
|
873
|
+
boxPosition: position || "".concat(defaultDropBoxPosition),
|
|
874
|
+
getRef: getContainerRef,
|
|
875
|
+
isActive: isPopupReady,
|
|
876
|
+
isAnimate: true,
|
|
877
|
+
isArrow: false,
|
|
878
|
+
onClick: removeClose,
|
|
879
|
+
needResponsive: needResponsive,
|
|
880
|
+
dataId: "".concat(dataId, "_suggestions"),
|
|
881
|
+
size: boxSize,
|
|
882
|
+
isPadding: false
|
|
883
|
+
}, !getChildren ? /*#__PURE__*/_react["default"].createElement(_Card["default"], {
|
|
884
|
+
onScroll: this.handleScroll
|
|
885
|
+
}, needSearch ? /*#__PURE__*/_react["default"].createElement(_Card.CardHeader, null, /*#__PURE__*/_react["default"].createElement("div", {
|
|
886
|
+
className: "".concat(_SelectModule["default"].search, " ").concat(_SelectModule["default"][size])
|
|
887
|
+
}, /*#__PURE__*/_react["default"].createElement(_TextBoxIcon["default"], {
|
|
888
|
+
a11y: {
|
|
889
|
+
ariaControls: setAriaId,
|
|
890
|
+
ariaAutocomplete: 'list',
|
|
891
|
+
ariaDescribedby: ariaErrorId
|
|
892
|
+
},
|
|
893
|
+
inputRef: this.searchInputRef,
|
|
894
|
+
maxLength: maxLength,
|
|
895
|
+
onChange: this.handleSearch,
|
|
896
|
+
onKeyDown: this.handleKeyDown,
|
|
897
|
+
placeHolder: searchBoxPlaceHolder,
|
|
898
|
+
size: searchBoxSize,
|
|
899
|
+
value: searchStr,
|
|
900
|
+
onClear: this.handleClearSearch,
|
|
901
|
+
dataId: "".concat(dataId, "_search"),
|
|
902
|
+
i18nKeys: TextBoxIcon_i18n,
|
|
903
|
+
autoComplete: false,
|
|
904
|
+
customProps: {
|
|
905
|
+
TextBoxProps: DropdownSearchTextBoxProps
|
|
906
|
+
}
|
|
907
|
+
}))) : null, /*#__PURE__*/_react["default"].createElement(_Card.CardContent, {
|
|
908
|
+
customClass: dropBoxSize ? _SelectModule["default"][dropBoxSize] : '',
|
|
909
|
+
eleRef: this.suggestionContainerRef
|
|
910
|
+
}, suggestions.length ? /*#__PURE__*/_react["default"].createElement(_Suggestions["default"], _extends({
|
|
911
|
+
activeId: selectedId,
|
|
912
|
+
suggestions: suggestions,
|
|
913
|
+
getRef: this.suggestionItemRef,
|
|
914
|
+
hoverOption: hoverIndex,
|
|
915
|
+
onClick: this.handleChange,
|
|
916
|
+
onMouseEnter: this.handleMouseEnter,
|
|
917
|
+
dataId: "".concat(dataId, "_Options"),
|
|
918
|
+
needTick: needTick,
|
|
919
|
+
needBorder: needListBorder,
|
|
920
|
+
selectedOptions: [selectedId],
|
|
921
|
+
className: _SelectModule["default"].listItemContainer,
|
|
922
|
+
listItemSize: listItemSize,
|
|
923
|
+
htmlId: setAriaId,
|
|
924
|
+
a11y: {
|
|
925
|
+
ariaParentRole: 'listbox',
|
|
926
|
+
role: 'option'
|
|
927
|
+
}
|
|
928
|
+
}, SuggestionsProps)) : /*#__PURE__*/_react["default"].createElement(_EmptyState["default"], {
|
|
929
|
+
isLoading: isFetchingOptions,
|
|
930
|
+
options: options,
|
|
931
|
+
searchString: searchStr,
|
|
932
|
+
suggestions: suggestions,
|
|
933
|
+
dataId: dataId,
|
|
934
|
+
getCustomEmptyState: getCustomEmptyState ? this.handleGetAddNewOptionText : null,
|
|
935
|
+
i18nKeys: i18nKeys,
|
|
936
|
+
htmlId: ariaErrorId
|
|
937
|
+
})), getFooter ? /*#__PURE__*/_react["default"].createElement(_Card.CardFooter, null, getFooter()) : null) : getChildren()) : null);
|
|
991
938
|
}
|
|
992
939
|
}]);
|
|
993
940
|
|
|
@@ -997,7 +944,6 @@ var SelectComponent = /*#__PURE__*/function (_Component) {
|
|
|
997
944
|
exports.SelectComponent = SelectComponent;
|
|
998
945
|
SelectComponent.propTypes = {
|
|
999
946
|
animationStyle: _propTypes["default"].string,
|
|
1000
|
-
autoComplete: _propTypes["default"].bool,
|
|
1001
947
|
autoSelectDebouneTime: _propTypes["default"].number,
|
|
1002
948
|
autoSelectOnType: _propTypes["default"].bool,
|
|
1003
949
|
borderColor: _propTypes["default"].oneOf(['transparent', 'default']),
|
|
@@ -1083,7 +1029,6 @@ SelectComponent.propTypes = {
|
|
|
1083
1029
|
};
|
|
1084
1030
|
SelectComponent.defaultProps = {
|
|
1085
1031
|
animationStyle: 'bounce',
|
|
1086
|
-
autoComplete: (0, _Config.getLibraryConfig)('autoComplete'),
|
|
1087
1032
|
autoSelectOnType: true,
|
|
1088
1033
|
dataId: 'selectComponent',
|
|
1089
1034
|
dropBoxSize: 'small',
|
|
@@ -46,9 +46,6 @@
|
|
|
46
46
|
.listItemContainer {
|
|
47
47
|
padding: var(--zd_size10) 0;
|
|
48
48
|
}
|
|
49
|
-
.responsivelistItemContainer {
|
|
50
|
-
padding: var(--zd_size10) 0 0;
|
|
51
|
-
}
|
|
52
49
|
.readonly {
|
|
53
50
|
--textboxicon_icon_cursor: not-allowed;
|
|
54
51
|
}
|
|
@@ -88,9 +85,6 @@
|
|
|
88
85
|
.dropBoxList {
|
|
89
86
|
padding: var(--zd_size10) 0;
|
|
90
87
|
}
|
|
91
|
-
.responsivedropBoxList{
|
|
92
|
-
padding: var(--zd_size10) 0 0 0;
|
|
93
|
-
}
|
|
94
88
|
.rotate {
|
|
95
89
|
transform: rotateX(180deg);
|
|
96
90
|
}
|
|
@@ -15,6 +15,8 @@ var _Select = require("./Select");
|
|
|
15
15
|
|
|
16
16
|
var _Popup = _interopRequireDefault(require("../Popup/Popup"));
|
|
17
17
|
|
|
18
|
+
var _DropBox = _interopRequireDefault(require("../DropBox/DropBox"));
|
|
19
|
+
|
|
18
20
|
var _Tag = _interopRequireDefault(require("../Tag/Tag"));
|
|
19
21
|
|
|
20
22
|
var _TextBox = _interopRequireDefault(require("../TextBox/TextBox"));
|
|
@@ -33,10 +35,6 @@ var _DropDownHeading = _interopRequireDefault(require("../DropDown/DropDownHeadi
|
|
|
33
35
|
|
|
34
36
|
var _IdProvider = require("../Provider/IdProvider");
|
|
35
37
|
|
|
36
|
-
var _ResponsiveDropBox = _interopRequireDefault(require("../ResponsiveDropBox/ResponsiveDropBox"));
|
|
37
|
-
|
|
38
|
-
var _CustomResponsive = require("../Responsive/CustomResponsive");
|
|
39
|
-
|
|
40
38
|
var _MultiSelectModule = _interopRequireDefault(require("../MultiSelect/MultiSelect.module.css"));
|
|
41
39
|
|
|
42
40
|
var _SelectModule = _interopRequireDefault(require("./Select.module.css"));
|
|
@@ -55,7 +53,7 @@ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _d
|
|
|
55
53
|
|
|
56
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); }
|
|
57
55
|
|
|
58
|
-
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf
|
|
56
|
+
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
59
57
|
|
|
60
58
|
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); }; }
|
|
61
59
|
|
|
@@ -65,7 +63,7 @@ function _assertThisInitialized(self) { if (self === void 0) { throw new Referen
|
|
|
65
63
|
|
|
66
64
|
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; } }
|
|
67
65
|
|
|
68
|
-
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf
|
|
66
|
+
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
69
67
|
|
|
70
68
|
var SelectWithAvatarComponent = /*#__PURE__*/function (_SelectComponent) {
|
|
71
69
|
_inherits(SelectWithAvatarComponent, _SelectComponent);
|
|
@@ -153,21 +151,9 @@ var SelectWithAvatarComponent = /*#__PURE__*/function (_SelectComponent) {
|
|
|
153
151
|
this.handleKeyDown(e);
|
|
154
152
|
}
|
|
155
153
|
}
|
|
156
|
-
}, {
|
|
157
|
-
key: "responsiveFunc",
|
|
158
|
-
value: function responsiveFunc(_ref2) {
|
|
159
|
-
var mediaQueryOR = _ref2.mediaQueryOR;
|
|
160
|
-
return {
|
|
161
|
-
tabletMode: mediaQueryOR([{
|
|
162
|
-
maxWidth: 700
|
|
163
|
-
}])
|
|
164
|
-
};
|
|
165
|
-
}
|
|
166
154
|
}, {
|
|
167
155
|
key: "render",
|
|
168
156
|
value: function render() {
|
|
169
|
-
var _this2 = this;
|
|
170
|
-
|
|
171
157
|
var _this$props = this.props,
|
|
172
158
|
dropBoxSize = _this$props.dropBoxSize,
|
|
173
159
|
emptyMessage = _this$props.emptyMessage,
|
|
@@ -216,10 +202,10 @@ var SelectWithAvatarComponent = /*#__PURE__*/function (_SelectComponent) {
|
|
|
216
202
|
options = _this$state.options;
|
|
217
203
|
var suggestions = this.handleFilterSuggestions();
|
|
218
204
|
|
|
219
|
-
var
|
|
220
|
-
id =
|
|
221
|
-
text =
|
|
222
|
-
photoURL =
|
|
205
|
+
var _ref2 = this.normalizedFormatOptions[selectedId] || {},
|
|
206
|
+
id = _ref2.id,
|
|
207
|
+
text = _ref2.value,
|
|
208
|
+
photoURL = _ref2.photoURL;
|
|
223
209
|
|
|
224
210
|
var setAriaId = this.getNextAriaId();
|
|
225
211
|
var ariaErrorId = this.getNextAriaId();
|
|
@@ -279,82 +265,71 @@ var SelectWithAvatarComponent = /*#__PURE__*/function (_SelectComponent) {
|
|
|
279
265
|
borderColor: borderColor,
|
|
280
266
|
htmlId: htmlId,
|
|
281
267
|
autoComplete: false
|
|
282
|
-
}))), !isReadOnly && !isDisabled && isPopupOpen ? /*#__PURE__*/_react["default"].createElement(
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
}
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
}
|
|
348
|
-
}) : /*#__PURE__*/_react["default"].createElement(_EmptyState["default"], {
|
|
349
|
-
isLoading: isFetchingOptions,
|
|
350
|
-
options: options,
|
|
351
|
-
searchString: searchStr,
|
|
352
|
-
suggestions: suggestions,
|
|
353
|
-
dataId: dataId,
|
|
354
|
-
i18nKeys: i18nKeys,
|
|
355
|
-
htmlId: ariaErrorId
|
|
356
|
-
})))));
|
|
357
|
-
}) : null);
|
|
268
|
+
}))), !isReadOnly && !isDisabled && isPopupOpen ? /*#__PURE__*/_react["default"].createElement(_DropBox["default"], {
|
|
269
|
+
animationStyle: animationStyle,
|
|
270
|
+
boxPosition: position || "".concat(defaultDropBoxPosition, "Center"),
|
|
271
|
+
getRef: getContainerRef,
|
|
272
|
+
isActive: isPopupReady,
|
|
273
|
+
isAnimate: true,
|
|
274
|
+
isArrow: false,
|
|
275
|
+
onClick: removeClose,
|
|
276
|
+
needResponsive: needResponsive,
|
|
277
|
+
isPadding: false
|
|
278
|
+
}, /*#__PURE__*/_react["default"].createElement(_Card["default"], {
|
|
279
|
+
onScroll: this.handleScroll
|
|
280
|
+
}, needSearch ? /*#__PURE__*/_react["default"].createElement(_Card.CardHeader, null, /*#__PURE__*/_react["default"].createElement("div", {
|
|
281
|
+
className: "".concat(_SelectModule["default"].search, " ").concat(_SelectModule["default"][size])
|
|
282
|
+
}, /*#__PURE__*/_react["default"].createElement(_TextBoxIcon["default"], {
|
|
283
|
+
inputRef: this.searchInputRef,
|
|
284
|
+
maxLength: maxLength,
|
|
285
|
+
onChange: this.handleSearch,
|
|
286
|
+
onKeyDown: this.handleKeyDown,
|
|
287
|
+
placeHolder: searchBoxPlaceHolder,
|
|
288
|
+
size: searchBoxSize,
|
|
289
|
+
value: searchStr,
|
|
290
|
+
onClear: this.handleClearSearch,
|
|
291
|
+
dataId: "".concat(dataId, "_search"),
|
|
292
|
+
a11y: {
|
|
293
|
+
ariaAutocomplete: 'list',
|
|
294
|
+
ariaControls: setAriaId,
|
|
295
|
+
ariaDescribedby: ariaErrorId
|
|
296
|
+
},
|
|
297
|
+
autoComplete: false
|
|
298
|
+
}))) : null, /*#__PURE__*/_react["default"].createElement(_Card.CardContent, {
|
|
299
|
+
customClass: dropBoxSize ? _MultiSelectModule["default"][dropBoxSize] : '',
|
|
300
|
+
eleRef: this.suggestionContainerRef
|
|
301
|
+
}, groupName ? /*#__PURE__*/_react["default"].createElement("div", {
|
|
302
|
+
className: _MultiSelectModule["default"].title
|
|
303
|
+
}, /*#__PURE__*/_react["default"].createElement(_DropDownHeading["default"], {
|
|
304
|
+
text: groupName,
|
|
305
|
+
a11y: {
|
|
306
|
+
role: 'heading'
|
|
307
|
+
}
|
|
308
|
+
})) : null, suggestions.length ? /*#__PURE__*/_react["default"].createElement(_Suggestions["default"], {
|
|
309
|
+
activeId: selectedId,
|
|
310
|
+
suggestions: suggestions,
|
|
311
|
+
getRef: this.suggestionItemRef,
|
|
312
|
+
hoverOption: hoverIndex,
|
|
313
|
+
onClick: this.handleChange,
|
|
314
|
+
onMouseEnter: this.handleMouseEnter,
|
|
315
|
+
needTick: true,
|
|
316
|
+
needBorder: false,
|
|
317
|
+
selectedOptions: [selectedId],
|
|
318
|
+
className: _SelectModule["default"].listItemContainer,
|
|
319
|
+
htmlId: setAriaId,
|
|
320
|
+
a11y: {
|
|
321
|
+
ariaParentRole: 'listbox',
|
|
322
|
+
role: 'option'
|
|
323
|
+
}
|
|
324
|
+
}) : /*#__PURE__*/_react["default"].createElement(_EmptyState["default"], {
|
|
325
|
+
isLoading: isFetchingOptions,
|
|
326
|
+
options: options,
|
|
327
|
+
searchString: searchStr,
|
|
328
|
+
suggestions: suggestions,
|
|
329
|
+
dataId: dataId,
|
|
330
|
+
i18nKeys: i18nKeys,
|
|
331
|
+
htmlId: ariaErrorId
|
|
332
|
+
})))) : null);
|
|
358
333
|
}
|
|
359
334
|
}]);
|
|
360
335
|
|