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