@zohodesk/components 1.2.3 → 1.2.5
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/.cli/PropLessFiles.html +1 -1
- package/.cli/PropValidationExcludeFilesArray.js +10 -2
- package/.cli/propValidation_report.html +1 -1
- package/README.md +8 -0
- package/coverage/Button/Button.js.html +1 -1
- package/coverage/Button/css/Button.module.css.html +1 -1
- package/coverage/Button/css/cssJSLogic.js.html +1 -1
- package/coverage/Button/css/index.html +1 -1
- package/coverage/Button/index.html +1 -1
- package/coverage/Button/props/defaultProps.js.html +1 -1
- package/coverage/Button/props/index.html +1 -1
- package/coverage/Button/props/propTypes.js.html +1 -1
- package/coverage/Buttongroup/Buttongroup.js.html +1 -1
- package/coverage/Buttongroup/Buttongroup.module.css.html +1 -1
- package/coverage/Buttongroup/index.html +1 -1
- package/coverage/Buttongroup/props/defaultProps.js.html +1 -1
- package/coverage/Buttongroup/props/index.html +1 -1
- package/coverage/Buttongroup/props/propTypes.js.html +1 -1
- package/coverage/index.html +1 -1
- package/coverage/utils/dummyFunction.js.html +1 -1
- package/coverage/utils/index.html +1 -1
- package/es/index.js +2 -1
- package/es/v1/Accordion/Accordion.js +65 -0
- package/es/v1/Accordion/AccordionItem.js +57 -0
- package/es/v1/Accordion/index.js +2 -0
- package/es/v1/Animation/Animation.js +127 -0
- package/es/v1/AppContainer/AppContainer.js +134 -0
- package/es/v1/Avatar/Avatar.js +189 -0
- package/es/v1/AvatarTeam/AvatarTeam.js +70 -0
- package/es/v1/Button/Button.js +68 -0
- package/es/v1/Buttongroup/Buttongroup.js +31 -0
- package/es/v1/Card/Card.js +271 -0
- package/es/v1/CheckBox/CheckBox.js +155 -0
- package/es/v1/DateTime/CalendarView.js +218 -0
- package/es/v1/DateTime/DateTime.js +783 -0
- package/es/v1/DateTime/DateTimePopupFooter.js +47 -0
- package/es/v1/DateTime/DateTimePopupHeader.js +105 -0
- package/es/v1/DateTime/DateWidget.js +1098 -0
- package/es/v1/DateTime/DaysRow.js +31 -0
- package/es/v1/DateTime/Time.js +166 -0
- package/es/v1/DateTime/YearView.js +264 -0
- package/es/v1/DateTime/index.js +1 -0
- package/es/v1/DropBox/DropBox.js +91 -0
- package/es/v1/DropBox/DropBoxElement/DropBoxElement.js +132 -0
- package/es/v1/DropDown/DropDown.js +73 -0
- package/es/v1/DropDown/DropDownHeading.js +44 -0
- package/es/v1/DropDown/DropDownItem.js +76 -0
- package/es/v1/DropDown/DropDownSearch.js +63 -0
- package/es/v1/DropDown/DropDownSeparator.js +15 -0
- package/es/v1/Heading/Heading.js +32 -0
- package/es/v1/Label/Label.js +40 -0
- package/es/v1/Layout/Box.js +115 -0
- package/es/v1/Layout/Container.js +132 -0
- package/es/v1/Layout/index.js +2 -0
- package/es/v1/ListItem/ListContainer.js +102 -0
- package/es/v1/ListItem/ListItem.js +124 -0
- package/es/v1/ListItem/ListItemWithAvatar.js +145 -0
- package/es/v1/ListItem/ListItemWithCheckBox.js +104 -0
- package/es/v1/ListItem/ListItemWithIcon.js +127 -0
- package/es/v1/ListItem/ListItemWithRadio.js +105 -0
- package/es/v1/ListItem/index.js +6 -0
- package/es/v1/Modal/Modal.js +154 -0
- package/es/v1/MultiSelect/AdvancedGroupMultiSelect.js +1079 -0
- package/es/v1/MultiSelect/AdvancedMultiSelect.js +568 -0
- package/es/v1/MultiSelect/EmptyState.js +64 -0
- package/es/v1/MultiSelect/MobileHeader/MobileHeader.js +50 -0
- package/es/v1/MultiSelect/MultiSelect.js +1120 -0
- package/es/v1/MultiSelect/MultiSelectHeader.js +32 -0
- package/es/v1/MultiSelect/MultiSelectWithAvatar.js +216 -0
- package/es/v1/MultiSelect/SelectedOptions.js +82 -0
- package/es/v1/MultiSelect/Suggestions.js +142 -0
- package/es/v1/MultiSelect/index.js +4 -0
- package/es/v1/PopOver/PopOver.js +211 -0
- package/es/v1/Popup/Popup.js +645 -0
- package/es/v1/Radio/Radio.js +115 -0
- package/es/v1/Responsive/CustomResponsive.js +195 -0
- package/es/v1/Responsive/RefWrapper.js +39 -0
- package/es/v1/Responsive/ResizeComponent.js +197 -0
- package/es/v1/Responsive/ResizeObserver.js +140 -0
- package/es/v1/Responsive/Responsive.js +194 -0
- package/es/v1/Responsive/index.js +9 -0
- package/es/v1/ResponsiveDropBox/ResponsiveDropBox.js +58 -0
- package/es/v1/Ribbon/Ribbon.js +33 -0
- package/es/v1/RippleEffect/RippleEffect.js +24 -0
- package/es/v1/Select/GroupSelect.js +803 -0
- package/es/v1/Select/Select.js +969 -0
- package/es/v1/Select/SelectWithAvatar.js +344 -0
- package/es/v1/Select/SelectWithIcon.js +535 -0
- package/es/v1/Select/index.js +4 -0
- package/es/v1/Stencils/Stencils.js +26 -0
- package/es/v1/Switch/Switch.js +94 -0
- package/es/v1/Tab/Tab.js +108 -0
- package/es/v1/Tab/TabContent.js +30 -0
- package/es/v1/Tab/TabContentWrapper.js +29 -0
- package/es/v1/Tab/TabWrapper.js +57 -0
- package/es/v1/Tab/Tabs.js +612 -0
- package/es/v1/Tab/index.js +5 -0
- package/es/v1/Tag/Tag.js +134 -0
- package/es/v1/TextBox/TextBox.js +154 -0
- package/es/v1/TextBoxIcon/TextBoxIcon.js +158 -0
- package/es/v1/Textarea/Textarea.js +102 -0
- package/es/v1/Tooltip/Tooltip.js +518 -0
- package/es/v1/Typography/Typography.js +38 -0
- package/es/v1/Typography/css/Typography.module.css +376 -0
- package/es/v1/Typography/css/cssJSLogic.js +46 -0
- package/es/v1/Typography/css/letterSpacingMap.js +12 -0
- package/es/v1/Typography/props/defaultProps.js +8 -0
- package/es/v1/Typography/props/propTypes.js +24 -0
- package/es/v1/VelocityAnimation/VelocityAnimation/VelocityAnimation.js +69 -0
- package/es/v1/VelocityAnimation/VelocityAnimationGroup/VelocityAnimationGroup.js +100 -0
- package/es/v1/semantic/Button/Button.js +53 -0
- package/es/v1/semantic/index.js +1 -0
- package/lib/index.js +10 -1
- package/lib/v1/Accordion/Accordion.js +96 -0
- package/lib/v1/Accordion/AccordionItem.js +68 -0
- package/lib/v1/Accordion/index.js +23 -0
- package/lib/v1/Animation/Animation.js +143 -0
- package/lib/v1/AppContainer/AppContainer.js +204 -0
- package/lib/v1/Avatar/Avatar.js +246 -0
- package/lib/v1/AvatarTeam/AvatarTeam.js +81 -0
- package/lib/v1/Button/Button.js +82 -0
- package/lib/v1/Buttongroup/Buttongroup.js +44 -0
- package/lib/v1/Card/Card.js +365 -0
- package/lib/v1/CheckBox/CheckBox.js +166 -0
- package/lib/v1/DateTime/CalendarView.js +285 -0
- package/lib/v1/DateTime/DateTime.js +872 -0
- package/lib/v1/DateTime/DateTimePopupFooter.js +96 -0
- package/lib/v1/DateTime/DateTimePopupHeader.js +166 -0
- package/lib/v1/DateTime/DateWidget.js +1125 -0
- package/lib/v1/DateTime/DaysRow.js +80 -0
- package/lib/v1/DateTime/Time.js +254 -0
- package/lib/v1/DateTime/YearView.js +325 -0
- package/lib/v1/DateTime/index.js +15 -0
- package/lib/v1/DropBox/DropBox.js +119 -0
- package/lib/v1/DropBox/DropBoxElement/DropBoxElement.js +145 -0
- package/lib/v1/DropDown/DropDown.js +170 -0
- package/lib/v1/DropDown/DropDownHeading.js +93 -0
- package/lib/v1/DropDown/DropDownItem.js +127 -0
- package/lib/v1/DropDown/DropDownSearch.js +113 -0
- package/lib/v1/DropDown/DropDownSeparator.js +64 -0
- package/lib/v1/Heading/Heading.js +49 -0
- package/lib/v1/Label/Label.js +51 -0
- package/lib/v1/Layout/Box.js +128 -0
- package/lib/v1/Layout/Container.js +145 -0
- package/lib/v1/Layout/index.js +23 -0
- package/lib/v1/ListItem/ListContainer.js +120 -0
- package/lib/v1/ListItem/ListItem.js +138 -0
- package/lib/v1/ListItem/ListItemWithAvatar.js +162 -0
- package/lib/v1/ListItem/ListItemWithCheckBox.js +125 -0
- package/lib/v1/ListItem/ListItemWithIcon.js +143 -0
- package/lib/v1/ListItem/ListItemWithRadio.js +126 -0
- package/lib/v1/ListItem/index.js +55 -0
- package/lib/v1/Modal/Modal.js +212 -0
- package/lib/v1/MultiSelect/AdvancedGroupMultiSelect.js +1167 -0
- package/lib/v1/MultiSelect/AdvancedMultiSelect.js +634 -0
- package/lib/v1/MultiSelect/EmptyState.js +112 -0
- package/lib/v1/MultiSelect/MobileHeader/MobileHeader.js +62 -0
- package/lib/v1/MultiSelect/MultiSelect.js +1201 -0
- package/lib/v1/MultiSelect/MultiSelectHeader.js +78 -0
- package/lib/v1/MultiSelect/MultiSelectWithAvatar.js +270 -0
- package/lib/v1/MultiSelect/SelectedOptions.js +126 -0
- package/lib/v1/MultiSelect/Suggestions.js +195 -0
- package/lib/v1/MultiSelect/index.js +39 -0
- package/lib/v1/PopOver/PopOver.js +293 -0
- package/lib/v1/Popup/Popup.js +715 -0
- package/lib/v1/Radio/Radio.js +126 -0
- package/lib/v1/Responsive/CustomResponsive.js +242 -0
- package/lib/v1/Responsive/RefWrapper.js +57 -0
- package/lib/v1/Responsive/ResizeComponent.js +268 -0
- package/lib/v1/Responsive/ResizeObserver.js +168 -0
- package/lib/v1/Responsive/Responsive.js +274 -0
- package/lib/v1/Responsive/index.js +55 -0
- package/lib/v1/ResponsiveDropBox/ResponsiveDropBox.js +79 -0
- package/lib/v1/Ribbon/Ribbon.js +44 -0
- package/lib/v1/RippleEffect/RippleEffect.js +39 -0
- package/lib/v1/Select/GroupSelect.js +877 -0
- package/lib/v1/Select/Select.js +1013 -0
- package/lib/v1/Select/SelectWithAvatar.js +394 -0
- package/lib/v1/Select/SelectWithIcon.js +597 -0
- package/lib/v1/Select/index.js +39 -0
- package/lib/v1/Stencils/Stencils.js +43 -0
- package/lib/v1/Switch/Switch.js +108 -0
- package/lib/v1/Tab/Tab.js +132 -0
- package/lib/v1/Tab/TabContent.js +42 -0
- package/lib/v1/Tab/TabContentWrapper.js +42 -0
- package/lib/v1/Tab/TabWrapper.js +89 -0
- package/lib/v1/Tab/Tabs.js +680 -0
- package/lib/v1/Tab/index.js +47 -0
- package/lib/v1/Tag/Tag.js +154 -0
- package/lib/v1/TextBox/TextBox.js +168 -0
- package/lib/v1/TextBoxIcon/TextBoxIcon.js +196 -0
- package/lib/v1/Textarea/Textarea.js +118 -0
- package/lib/v1/Tooltip/Tooltip.js +586 -0
- package/lib/v1/Typography/Typography.js +56 -0
- package/lib/v1/Typography/css/Typography.module.css +376 -0
- package/lib/v1/Typography/css/cssJSLogic.js +41 -0
- package/lib/v1/Typography/css/letterSpacingMap.js +20 -0
- package/lib/v1/Typography/props/defaultProps.js +15 -0
- package/lib/v1/Typography/props/propTypes.js +35 -0
- package/lib/v1/VelocityAnimation/VelocityAnimation/VelocityAnimation.js +90 -0
- package/lib/v1/VelocityAnimation/VelocityAnimationGroup/VelocityAnimationGroup.js +126 -0
- package/lib/v1/semantic/Button/Button.js +63 -0
- package/lib/v1/semantic/index.js +15 -0
- package/package.json +4 -4
- package/result.json +1 -1
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
4
|
+
|
|
5
|
+
Object.defineProperty(exports, "__esModule", {
|
|
6
|
+
value: true
|
|
7
|
+
});
|
|
8
|
+
exports["default"] = void 0;
|
|
9
|
+
|
|
10
|
+
var _react = _interopRequireDefault(require("react"));
|
|
11
|
+
|
|
12
|
+
var _propTypes = require("../../MultiSelect/props/propTypes");
|
|
13
|
+
|
|
14
|
+
var _defaultProps = require("../../MultiSelect/props/defaultProps");
|
|
15
|
+
|
|
16
|
+
var _ListItemWithIcon = _interopRequireDefault(require("../ListItem/ListItemWithIcon"));
|
|
17
|
+
|
|
18
|
+
var _MultiSelectModule = _interopRequireDefault(require("../../MultiSelect/MultiSelect.module.css"));
|
|
19
|
+
|
|
20
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
21
|
+
|
|
22
|
+
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
23
|
+
|
|
24
|
+
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
|
|
25
|
+
|
|
26
|
+
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
|
27
|
+
|
|
28
|
+
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
|
|
29
|
+
|
|
30
|
+
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
31
|
+
|
|
32
|
+
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); }; }
|
|
33
|
+
|
|
34
|
+
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return _assertThisInitialized(self); }
|
|
35
|
+
|
|
36
|
+
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
37
|
+
|
|
38
|
+
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; } }
|
|
39
|
+
|
|
40
|
+
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
41
|
+
|
|
42
|
+
var MultiSelectHeader = /*#__PURE__*/function (_React$PureComponent) {
|
|
43
|
+
_inherits(MultiSelectHeader, _React$PureComponent);
|
|
44
|
+
|
|
45
|
+
var _super = _createSuper(MultiSelectHeader);
|
|
46
|
+
|
|
47
|
+
function MultiSelectHeader() {
|
|
48
|
+
_classCallCheck(this, MultiSelectHeader);
|
|
49
|
+
|
|
50
|
+
return _super.apply(this, arguments);
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
_createClass(MultiSelectHeader, [{
|
|
54
|
+
key: "render",
|
|
55
|
+
value: function render() {
|
|
56
|
+
var _this$props = this.props,
|
|
57
|
+
dataId = _this$props.dataId,
|
|
58
|
+
onSelect = _this$props.onSelect,
|
|
59
|
+
selectAllText = _this$props.selectAllText,
|
|
60
|
+
suggestions = _this$props.suggestions;
|
|
61
|
+
return /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, suggestions.length > 1 ? /*#__PURE__*/_react["default"].createElement(_ListItemWithIcon["default"], {
|
|
62
|
+
autoHover: false,
|
|
63
|
+
value: selectAllText,
|
|
64
|
+
iconName: "ZD-androidd",
|
|
65
|
+
iconSize: "15",
|
|
66
|
+
onClick: onSelect,
|
|
67
|
+
dataId: "".concat(dataId, "_selectAll"),
|
|
68
|
+
customClass: _MultiSelectModule["default"].selectAll
|
|
69
|
+
}) : null);
|
|
70
|
+
}
|
|
71
|
+
}]);
|
|
72
|
+
|
|
73
|
+
return MultiSelectHeader;
|
|
74
|
+
}(_react["default"].PureComponent);
|
|
75
|
+
|
|
76
|
+
exports["default"] = MultiSelectHeader;
|
|
77
|
+
MultiSelectHeader.propTypes = _propTypes.MultiSelectHeader_propTypes;
|
|
78
|
+
MultiSelectHeader.defaultProps = _defaultProps.MultiSelectHeader_defaultProps;
|
|
@@ -0,0 +1,270 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
4
|
+
|
|
5
|
+
Object.defineProperty(exports, "__esModule", {
|
|
6
|
+
value: true
|
|
7
|
+
});
|
|
8
|
+
exports["default"] = void 0;
|
|
9
|
+
|
|
10
|
+
var _react = _interopRequireDefault(require("react"));
|
|
11
|
+
|
|
12
|
+
var _propTypes = require("../../MultiSelect/props/propTypes");
|
|
13
|
+
|
|
14
|
+
var _defaultProps = require("../../MultiSelect/props/defaultProps");
|
|
15
|
+
|
|
16
|
+
var _MultiSelect = require("./MultiSelect");
|
|
17
|
+
|
|
18
|
+
var _Popup = _interopRequireDefault(require("../Popup/Popup"));
|
|
19
|
+
|
|
20
|
+
var _Layout = require("../Layout");
|
|
21
|
+
|
|
22
|
+
var _Card = _interopRequireWildcard(require("../Card/Card"));
|
|
23
|
+
|
|
24
|
+
var _Suggestions = _interopRequireDefault(require("./Suggestions"));
|
|
25
|
+
|
|
26
|
+
var _EmptyState = _interopRequireDefault(require("./EmptyState"));
|
|
27
|
+
|
|
28
|
+
var _MobileHeader = _interopRequireDefault(require("./MobileHeader/MobileHeader"));
|
|
29
|
+
|
|
30
|
+
var _MultiSelectHeader = _interopRequireDefault(require("./MultiSelectHeader"));
|
|
31
|
+
|
|
32
|
+
var _CssProvider = _interopRequireDefault(require("../../Provider/CssProvider"));
|
|
33
|
+
|
|
34
|
+
var _IdProvider = require("../../Provider/IdProvider");
|
|
35
|
+
|
|
36
|
+
var _ResponsiveDropBox = _interopRequireDefault(require("../ResponsiveDropBox/ResponsiveDropBox"));
|
|
37
|
+
|
|
38
|
+
var _CustomResponsive = require("../Responsive/CustomResponsive");
|
|
39
|
+
|
|
40
|
+
var _Loader = _interopRequireDefault(require("@zohodesk/svg/lib/Loader/Loader"));
|
|
41
|
+
|
|
42
|
+
var _icons = require("@zohodesk/icons");
|
|
43
|
+
|
|
44
|
+
var _MultiSelectModule = _interopRequireDefault(require("../../MultiSelect/MultiSelect.module.css"));
|
|
45
|
+
|
|
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); }
|
|
47
|
+
|
|
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; }
|
|
49
|
+
|
|
50
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
51
|
+
|
|
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); }
|
|
53
|
+
|
|
54
|
+
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
55
|
+
|
|
56
|
+
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
|
|
57
|
+
|
|
58
|
+
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
|
59
|
+
|
|
60
|
+
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); }
|
|
61
|
+
|
|
62
|
+
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
63
|
+
|
|
64
|
+
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); }; }
|
|
65
|
+
|
|
66
|
+
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return _assertThisInitialized(self); }
|
|
67
|
+
|
|
68
|
+
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
69
|
+
|
|
70
|
+
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; } }
|
|
71
|
+
|
|
72
|
+
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
73
|
+
|
|
74
|
+
/*eslint-disable react/sort-prop-types*/
|
|
75
|
+
|
|
76
|
+
/* eslint-disable react/forbid-component-props */
|
|
77
|
+
|
|
78
|
+
/* eslint-disable react/no-unused-prop-types */
|
|
79
|
+
var MultiSelectWithAvatarComponent = /*#__PURE__*/function (_MultiSelectComponent) {
|
|
80
|
+
_inherits(MultiSelectWithAvatarComponent, _MultiSelectComponent);
|
|
81
|
+
|
|
82
|
+
var _super = _createSuper(MultiSelectWithAvatarComponent);
|
|
83
|
+
|
|
84
|
+
function MultiSelectWithAvatarComponent(props) {
|
|
85
|
+
var _this;
|
|
86
|
+
|
|
87
|
+
_classCallCheck(this, MultiSelectWithAvatarComponent);
|
|
88
|
+
|
|
89
|
+
_this = _super.call(this, props);
|
|
90
|
+
_this.handleFormatOptions = _this.handleFormatOptions.bind(_assertThisInitialized(_this));
|
|
91
|
+
_this.getNextAriaId = (0, _IdProvider.getUniqueId)(_assertThisInitialized(_this));
|
|
92
|
+
return _this;
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
_createClass(MultiSelectWithAvatarComponent, [{
|
|
96
|
+
key: "handleFormatOptions",
|
|
97
|
+
value: function handleFormatOptions(props) {
|
|
98
|
+
var options = props.options,
|
|
99
|
+
valueField = props.valueField,
|
|
100
|
+
textField = props.textField,
|
|
101
|
+
imageField = props.imageField,
|
|
102
|
+
disabledOptions = props.disabledOptions;
|
|
103
|
+
return this.formatOptions({
|
|
104
|
+
options: options,
|
|
105
|
+
valueField: valueField,
|
|
106
|
+
textField: textField,
|
|
107
|
+
imageField: imageField,
|
|
108
|
+
optionType: 'avatar',
|
|
109
|
+
disabledOptions: disabledOptions
|
|
110
|
+
});
|
|
111
|
+
}
|
|
112
|
+
}, {
|
|
113
|
+
key: "responsiveFunc",
|
|
114
|
+
value: function responsiveFunc(_ref) {
|
|
115
|
+
var mediaQueryOR = _ref.mediaQueryOR;
|
|
116
|
+
return {
|
|
117
|
+
tabletMode: mediaQueryOR([{
|
|
118
|
+
maxWidth: 700
|
|
119
|
+
}])
|
|
120
|
+
};
|
|
121
|
+
}
|
|
122
|
+
}, {
|
|
123
|
+
key: "render",
|
|
124
|
+
value: function render() {
|
|
125
|
+
var _this2 = this;
|
|
126
|
+
|
|
127
|
+
var _this$props = this.props,
|
|
128
|
+
isReadOnly = _this$props.isReadOnly,
|
|
129
|
+
needSelectAll = _this$props.needSelectAll,
|
|
130
|
+
searchEmptyMessage = _this$props.searchEmptyMessage,
|
|
131
|
+
emptyMessage = _this$props.emptyMessage,
|
|
132
|
+
noMoreOptionsMessage = _this$props.noMoreOptionsMessage,
|
|
133
|
+
dropBoxSize = _this$props.dropBoxSize,
|
|
134
|
+
isPopupOpen = _this$props.isPopupOpen,
|
|
135
|
+
isPopupReady = _this$props.isPopupReady,
|
|
136
|
+
position = _this$props.position,
|
|
137
|
+
defaultDropBoxPosition = _this$props.defaultDropBoxPosition,
|
|
138
|
+
selectAllText = _this$props.selectAllText,
|
|
139
|
+
getContainerRef = _this$props.getContainerRef,
|
|
140
|
+
removeClose = _this$props.removeClose,
|
|
141
|
+
isAnimate = _this$props.isAnimate,
|
|
142
|
+
animationStyle = _this$props.animationStyle,
|
|
143
|
+
isDisabled = _this$props.isDisabled,
|
|
144
|
+
title = _this$props.title,
|
|
145
|
+
dataId = _this$props.dataId,
|
|
146
|
+
dataSelectorId = _this$props.dataSelectorId,
|
|
147
|
+
needResponsive = _this$props.needResponsive,
|
|
148
|
+
borderColor = _this$props.borderColor,
|
|
149
|
+
disableAction = _this$props.disableAction,
|
|
150
|
+
palette = _this$props.palette,
|
|
151
|
+
i18nKeys = _this$props.i18nKeys,
|
|
152
|
+
isBoxPaddingNeed = _this$props.isBoxPaddingNeed,
|
|
153
|
+
needEffect = _this$props.needEffect,
|
|
154
|
+
isLoading = _this$props.isLoading,
|
|
155
|
+
keepSelectedOptions = _this$props.keepSelectedOptions,
|
|
156
|
+
customProps = _this$props.customProps;
|
|
157
|
+
var _customProps$Suggesti = customProps.SuggestionsProps,
|
|
158
|
+
SuggestionsProps = _customProps$Suggesti === void 0 ? {} : _customProps$Suggesti;
|
|
159
|
+
i18nKeys = Object.assign({}, MobileHeader_defaultProps.i18nKeys, i18nKeys, {
|
|
160
|
+
emptyText: i18nKeys.emptyText || emptyMessage,
|
|
161
|
+
searchEmptyText: i18nKeys.searchEmptyText || searchEmptyMessage,
|
|
162
|
+
noMoreText: i18nKeys.noMoreText || noMoreOptionsMessage
|
|
163
|
+
});
|
|
164
|
+
var _this$state = this.state,
|
|
165
|
+
selectedOptions = _this$state.selectedOptions,
|
|
166
|
+
searchStr = _this$state.searchStr,
|
|
167
|
+
hoverOption = _this$state.hoverOption,
|
|
168
|
+
options = _this$state.options,
|
|
169
|
+
isFetchingOptions = _this$state.isFetchingOptions,
|
|
170
|
+
selectedOptionIds = _this$state.selectedOptionIds;
|
|
171
|
+
var suggestions = this.handleFilterSuggestions();
|
|
172
|
+
var setAriaId = this.getNextAriaId();
|
|
173
|
+
var ariaErrorId = this.getNextAriaId();
|
|
174
|
+
var popUpState = !isReadOnly && !isDisabled && !disableAction && isPopupOpen;
|
|
175
|
+
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
176
|
+
className: " ".concat(_MultiSelectModule["default"].wrapper, " ").concat(isDisabled ? _MultiSelectModule["default"].disabled : '', " ").concat(isReadOnly ? _MultiSelectModule["default"].readOnly : '', " ").concat(disableAction ? (0, _CssProvider["default"])('isBlock') : '', " ").concat(borderColor === 'transparent' ? _MultiSelectModule["default"].transparentContainer : '', " ").concat(needEffect && !(isDisabled || isReadOnly) ? _MultiSelectModule["default"].effect : ''),
|
|
177
|
+
"data-id": "".concat(isDisabled ? "".concat(dataId, "_disabled") : isReadOnly ? "".concat(dataId, "_readOnly") : dataId),
|
|
178
|
+
"data-test-id": "".concat(isDisabled ? "".concat(dataId, "_disabled") : isReadOnly ? "".concat(dataId, "_readOnly") : dataId),
|
|
179
|
+
"data-title": isDisabled ? title : null,
|
|
180
|
+
onClick: this.handleInputFocus,
|
|
181
|
+
"data-selector-id": dataSelectorId
|
|
182
|
+
}, this.getSelectionUI(), popUpState ? /*#__PURE__*/_react["default"].createElement(_CustomResponsive.ResponsiveReceiver, {
|
|
183
|
+
query: this.responsiveFunc,
|
|
184
|
+
responsiveId: "Helmet"
|
|
185
|
+
}, function (_ref2) {
|
|
186
|
+
var tabletMode = _ref2.tabletMode;
|
|
187
|
+
return /*#__PURE__*/_react["default"].createElement(_ResponsiveDropBox["default"], {
|
|
188
|
+
animationStyle: animationStyle,
|
|
189
|
+
boxPosition: position || "".concat(defaultDropBoxPosition, "Center"),
|
|
190
|
+
getRef: getContainerRef,
|
|
191
|
+
isActive: isPopupReady,
|
|
192
|
+
isAnimate: isAnimate,
|
|
193
|
+
isArrow: false,
|
|
194
|
+
onClick: removeClose,
|
|
195
|
+
needResponsive: needResponsive,
|
|
196
|
+
isPadding: false,
|
|
197
|
+
isBoxPaddingNeed: isBoxPaddingNeed,
|
|
198
|
+
palette: palette,
|
|
199
|
+
htmlId: setAriaId,
|
|
200
|
+
a11y: {
|
|
201
|
+
ariaMultiselectable: true,
|
|
202
|
+
role: 'listbox'
|
|
203
|
+
},
|
|
204
|
+
isResponsivePadding: true,
|
|
205
|
+
alignBox: "row"
|
|
206
|
+
}, /*#__PURE__*/_react["default"].createElement(_Layout.Box, {
|
|
207
|
+
flexible: true
|
|
208
|
+
}, /*#__PURE__*/_react["default"].createElement(_Card["default"], {
|
|
209
|
+
customClass: "".concat(_MultiSelectModule["default"].box, " ").concat(_MultiSelectModule["default"]["".concat(palette, "Box")]),
|
|
210
|
+
onScroll: _this2.handleScroll
|
|
211
|
+
}, tabletMode && /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, /*#__PURE__*/_react["default"].createElement(_MobileHeader["default"], {
|
|
212
|
+
selectedOptions: selectedOptions,
|
|
213
|
+
i18nKeys: i18nKeys,
|
|
214
|
+
onClick: _this2.handlePopupClose
|
|
215
|
+
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
216
|
+
className: _MultiSelectModule["default"].effect
|
|
217
|
+
}, _this2.getSelectionUI(true)))), needSelectAll ? /*#__PURE__*/_react["default"].createElement(_Card.CardHeader, null, /*#__PURE__*/_react["default"].createElement(_MultiSelectHeader["default"], {
|
|
218
|
+
onSelect: _this2.handleSelectAll,
|
|
219
|
+
selectAllText: selectAllText,
|
|
220
|
+
suggestions: suggestions,
|
|
221
|
+
dataId: dataId
|
|
222
|
+
})) : null, isLoading ? /*#__PURE__*/_react["default"].createElement(_Layout.Container, {
|
|
223
|
+
align: "both",
|
|
224
|
+
className: _MultiSelectModule["default"].loader
|
|
225
|
+
}, /*#__PURE__*/_react["default"].createElement(_Loader["default"], null)) : /*#__PURE__*/_react["default"].createElement(_Card.CardContent, {
|
|
226
|
+
shrink: true,
|
|
227
|
+
customClass: !tabletMode && dropBoxSize ? _MultiSelectModule["default"][dropBoxSize] : '',
|
|
228
|
+
eleRef: _this2.suggestionContainerRef
|
|
229
|
+
}, suggestions.length ? /*#__PURE__*/_react["default"].createElement(_Suggestions["default"], _extends({
|
|
230
|
+
needTick: keepSelectedOptions,
|
|
231
|
+
suggestions: suggestions,
|
|
232
|
+
getRef: _this2.suggestionItemRef,
|
|
233
|
+
hoverOption: hoverOption,
|
|
234
|
+
onClick: _this2.handleSelectOption,
|
|
235
|
+
onMouseEnter: _this2.handleMouseEnter,
|
|
236
|
+
needBorder: false,
|
|
237
|
+
dataId: "".concat(dataId, "_Options"),
|
|
238
|
+
palette: palette,
|
|
239
|
+
selectedOptions: selectedOptionIds,
|
|
240
|
+
a11y: {
|
|
241
|
+
role: 'option'
|
|
242
|
+
}
|
|
243
|
+
}, SuggestionsProps)) : /*#__PURE__*/_react["default"].createElement(_EmptyState["default"], {
|
|
244
|
+
isLoading: isFetchingOptions,
|
|
245
|
+
options: options,
|
|
246
|
+
searchString: searchStr,
|
|
247
|
+
suggestions: suggestions,
|
|
248
|
+
dataId: dataId,
|
|
249
|
+
palette: palette,
|
|
250
|
+
i18nKeys: i18nKeys,
|
|
251
|
+
htmlId: ariaErrorId
|
|
252
|
+
}), isFetchingOptions && /*#__PURE__*/_react["default"].createElement(_Layout.Container, {
|
|
253
|
+
isCover: false,
|
|
254
|
+
align: "both"
|
|
255
|
+
}, /*#__PURE__*/_react["default"].createElement(_Loader["default"], null))))));
|
|
256
|
+
}) : null);
|
|
257
|
+
}
|
|
258
|
+
}]);
|
|
259
|
+
|
|
260
|
+
return MultiSelectWithAvatarComponent;
|
|
261
|
+
}(_MultiSelect.MultiSelectComponent);
|
|
262
|
+
|
|
263
|
+
MultiSelectWithAvatarComponent.propTypes = _propTypes.MultiSelectWithAvatar_propTypes;
|
|
264
|
+
MultiSelectWithAvatarComponent.defaultProps = _defaultProps.MultiSelectWithAvatar_defaultProps;
|
|
265
|
+
MultiSelectWithAvatarComponent.displayName = 'MultiSelectWithAvatar';
|
|
266
|
+
var MultiSelectWithAvatar = (0, _Popup["default"])(MultiSelectWithAvatarComponent);
|
|
267
|
+
MultiSelectWithAvatar.defaultProps = MultiSelectWithAvatarComponent.defaultProps;
|
|
268
|
+
MultiSelectWithAvatar.propTypes = MultiSelectWithAvatarComponent.propTypes;
|
|
269
|
+
var _default = MultiSelectWithAvatar;
|
|
270
|
+
exports["default"] = _default;
|
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
4
|
+
|
|
5
|
+
Object.defineProperty(exports, "__esModule", {
|
|
6
|
+
value: true
|
|
7
|
+
});
|
|
8
|
+
exports["default"] = void 0;
|
|
9
|
+
|
|
10
|
+
var _react = _interopRequireDefault(require("react"));
|
|
11
|
+
|
|
12
|
+
var _propTypes = require("../../MultiSelect/props/propTypes");
|
|
13
|
+
|
|
14
|
+
var _defaultProps = require("../../MultiSelect/props/defaultProps");
|
|
15
|
+
|
|
16
|
+
var _Tag = _interopRequireDefault(require("../Tag/Tag"));
|
|
17
|
+
|
|
18
|
+
var _Layout = require("../Layout");
|
|
19
|
+
|
|
20
|
+
var _SelectedOptionsModule = _interopRequireDefault(require("../../MultiSelect/SelectedOptions.module.css"));
|
|
21
|
+
|
|
22
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
23
|
+
|
|
24
|
+
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); }
|
|
25
|
+
|
|
26
|
+
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
27
|
+
|
|
28
|
+
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
|
|
29
|
+
|
|
30
|
+
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
|
31
|
+
|
|
32
|
+
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
|
|
33
|
+
|
|
34
|
+
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
35
|
+
|
|
36
|
+
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); }; }
|
|
37
|
+
|
|
38
|
+
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return _assertThisInitialized(self); }
|
|
39
|
+
|
|
40
|
+
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
41
|
+
|
|
42
|
+
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; } }
|
|
43
|
+
|
|
44
|
+
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
45
|
+
|
|
46
|
+
/* eslint-disable react/forbid-component-props */
|
|
47
|
+
var SelectedOptions = /*#__PURE__*/function (_React$PureComponent) {
|
|
48
|
+
_inherits(SelectedOptions, _React$PureComponent);
|
|
49
|
+
|
|
50
|
+
var _super = _createSuper(SelectedOptions);
|
|
51
|
+
|
|
52
|
+
function SelectedOptions() {
|
|
53
|
+
_classCallCheck(this, SelectedOptions);
|
|
54
|
+
|
|
55
|
+
return _super.apply(this, arguments);
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
_createClass(SelectedOptions, [{
|
|
59
|
+
key: "render",
|
|
60
|
+
value: function render() {
|
|
61
|
+
var _this$props = this.props,
|
|
62
|
+
selectedOptions = _this$props.selectedOptions,
|
|
63
|
+
highLightedSelectOptions = _this$props.highLightedSelectOptions,
|
|
64
|
+
isReadOnly = _this$props.isReadOnly,
|
|
65
|
+
getRef = _this$props.getRef,
|
|
66
|
+
onRemove = _this$props.onRemove,
|
|
67
|
+
onSelect = _this$props.onSelect,
|
|
68
|
+
size = _this$props.size,
|
|
69
|
+
palette = _this$props.palette;
|
|
70
|
+
var isDarkPalette = palette === 'dark' ? 'dark' : 'danger';
|
|
71
|
+
return /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, selectedOptions.map(function (option) {
|
|
72
|
+
var id = option.id,
|
|
73
|
+
value = option.value,
|
|
74
|
+
photoURL = option.photoURL,
|
|
75
|
+
icon = option.icon,
|
|
76
|
+
optionType = option.optionType,
|
|
77
|
+
iconSize = option.iconSize,
|
|
78
|
+
isDisabled = option.isDisabled;
|
|
79
|
+
var commonProps = {
|
|
80
|
+
disabled: isDisabled,
|
|
81
|
+
onRemove: isDisabled || isReadOnly ? null : onRemove,
|
|
82
|
+
text: value,
|
|
83
|
+
palette: isDarkPalette,
|
|
84
|
+
onSelectTag: isReadOnly ? null : onSelect,
|
|
85
|
+
getRef: getRef,
|
|
86
|
+
initial: value,
|
|
87
|
+
id: id,
|
|
88
|
+
isReadOnly: isReadOnly
|
|
89
|
+
};
|
|
90
|
+
|
|
91
|
+
if (optionType === 'avatar') {
|
|
92
|
+
return /*#__PURE__*/_react["default"].createElement(_Layout.Box, {
|
|
93
|
+
className: "".concat(_SelectedOptionsModule["default"].tag, " ").concat(_SelectedOptionsModule["default"][size]),
|
|
94
|
+
key: "".concat(id, "photoTag")
|
|
95
|
+
}, /*#__PURE__*/_react["default"].createElement(_Tag["default"], _extends({}, commonProps, {
|
|
96
|
+
active: highLightedSelectOptions.indexOf(id) >= 0,
|
|
97
|
+
hasAvatar: true,
|
|
98
|
+
imageURL: photoURL
|
|
99
|
+
})));
|
|
100
|
+
} else if (optionType === 'icon') {
|
|
101
|
+
return /*#__PURE__*/_react["default"].createElement(_Layout.Box, {
|
|
102
|
+
className: "".concat(_SelectedOptionsModule["default"].tag, " ").concat(_SelectedOptionsModule["default"][size]),
|
|
103
|
+
key: "".concat(id, "iconTag")
|
|
104
|
+
}, /*#__PURE__*/_react["default"].createElement(_Tag["default"], _extends({}, commonProps, {
|
|
105
|
+
active: highLightedSelectOptions.indexOf(id) >= 0,
|
|
106
|
+
iconName: icon,
|
|
107
|
+
iconSize: iconSize
|
|
108
|
+
})));
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
return /*#__PURE__*/_react["default"].createElement(_Layout.Box, {
|
|
112
|
+
className: "".concat(_SelectedOptionsModule["default"].tag, " ").concat(_SelectedOptionsModule["default"][size]),
|
|
113
|
+
key: "".concat(id, "tag")
|
|
114
|
+
}, /*#__PURE__*/_react["default"].createElement(_Tag["default"], _extends({}, commonProps, {
|
|
115
|
+
active: highLightedSelectOptions.indexOf(id) >= 0
|
|
116
|
+
})));
|
|
117
|
+
}));
|
|
118
|
+
}
|
|
119
|
+
}]);
|
|
120
|
+
|
|
121
|
+
return SelectedOptions;
|
|
122
|
+
}(_react["default"].PureComponent);
|
|
123
|
+
|
|
124
|
+
exports["default"] = SelectedOptions;
|
|
125
|
+
SelectedOptions.propTypes = _propTypes.SelectedOptions_propTypes;
|
|
126
|
+
SelectedOptions.defaultProps = _defaultProps.SelectedOptions_defaultProps;
|