intelicoreact 1.3.20 → 1.3.21
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.
|
@@ -435,7 +435,7 @@ var TagsDropdown = function TagsDropdown(_ref) {
|
|
|
435
435
|
}, [options]);
|
|
436
436
|
|
|
437
437
|
var getListMarkUp = function getListMarkUp() {
|
|
438
|
-
var _cn6, _cn7;
|
|
438
|
+
var _cn6, _filteredOptions$filt, _filteredOptions$filt2, _cn7;
|
|
439
439
|
|
|
440
440
|
var filteredOptions = getFilteredOptions(options);
|
|
441
441
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
@@ -483,7 +483,7 @@ var TagsDropdown = function TagsDropdown(_ref) {
|
|
|
483
483
|
}, headerContent)) : null, /*#__PURE__*/_react.default.createElement("div", {
|
|
484
484
|
ref: dropdownListRef,
|
|
485
485
|
className: "".concat(RC, "__list ").concat(headerContent || isMobile ? "".concat(RC, "__list--with-header") : '', " ").concat(footerContent ? "".concat(RC, "__list--with-footer") : '')
|
|
486
|
-
},
|
|
486
|
+
}, filteredOptions === null || filteredOptions === void 0 ? void 0 : filteredOptions.map(function (option) {
|
|
487
487
|
var _option$groupName, _option$groupName$toS, _option$list2;
|
|
488
488
|
|
|
489
489
|
return option.groupName ? /*#__PURE__*/_react.default.createElement("div", {
|
|
@@ -494,9 +494,15 @@ var TagsDropdown = function TagsDropdown(_ref) {
|
|
|
494
494
|
}, option.groupName), (_option$list2 = option.list) === null || _option$list2 === void 0 ? void 0 : _option$list2.map(function (item) {
|
|
495
495
|
return getMarkupForElement(item);
|
|
496
496
|
})) : getMarkupForElement(option);
|
|
497
|
-
})
|
|
497
|
+
}), ((_filteredOptions$filt = filteredOptions.filter(function (_ref7) {
|
|
498
|
+
var value = _ref7.value;
|
|
499
|
+
return value !== 'open_modal';
|
|
500
|
+
})) === null || _filteredOptions$filt === void 0 ? void 0 : _filteredOptions$filt.length) === 0 ? /*#__PURE__*/_react.default.createElement("div", {
|
|
498
501
|
className: "".concat(RC, "__no-options")
|
|
499
|
-
}, noOptionsText)), footerContent || isMobile
|
|
502
|
+
}, noOptionsText) : null), (footerContent || isMobile) && ((_filteredOptions$filt2 = filteredOptions.filter(function (_ref8) {
|
|
503
|
+
var value = _ref8.value;
|
|
504
|
+
return value !== 'open_modal';
|
|
505
|
+
})) === null || _filteredOptions$filt2 === void 0 ? void 0 : _filteredOptions$filt2.length) > 0 ? /*#__PURE__*/_react.default.createElement("div", {
|
|
500
506
|
className: (0, _classnames.default)("".concat(RC, "__footer"), (_cn7 = {}, (0, _defineProperty2.default)(_cn7, "".concat(RC, "__footer-with-shadow"), isMobile && isScrollableList), (0, _defineProperty2.default)(_cn7, "".concat(RC, "__footer-with-shadow-hidden"), scrollTop === scrollHeight), _cn7))
|
|
501
507
|
}, footerContent, isMobile && /*#__PURE__*/_react.default.createElement("button", {
|
|
502
508
|
onClick: function onClick() {
|
|
@@ -615,8 +621,8 @@ var TagsDropdown = function TagsDropdown(_ref) {
|
|
|
615
621
|
className: (0, _classnames.default)("".concat(RC, "__trigger"), {
|
|
616
622
|
'tags-dropdown__error': error
|
|
617
623
|
}),
|
|
618
|
-
onClick: function onClick(
|
|
619
|
-
var target =
|
|
624
|
+
onClick: function onClick(_ref9) {
|
|
625
|
+
var target = _ref9.target;
|
|
620
626
|
if ((target === null || target === void 0 ? void 0 : target.tagName) === 'INPUT') setIsOpen(true);else if (isTargetInParent(target)) {
|
|
621
627
|
setIsOpen(function (isOpen) {
|
|
622
628
|
return !isOpen;
|