intelicoreact 1.4.33 → 1.4.35
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.
|
@@ -625,7 +625,7 @@ const Dropdown = _ref => {
|
|
|
625
625
|
className: (0, _classnames.default)(RC, className, {
|
|
626
626
|
disabled,
|
|
627
627
|
["".concat(RC, "-mobile")]: isMobile,
|
|
628
|
-
["".concat(RC, "--focused")]: isOpen,
|
|
628
|
+
["".concat(RC, "--focused")]: isOpen && !isMobile,
|
|
629
629
|
["".concat(RC, "--with-custom-trigger")]: Boolean(customTrigger)
|
|
630
630
|
}),
|
|
631
631
|
ref: dropdownRef,
|
|
@@ -675,7 +675,7 @@ const TagsDropdown = _ref => {
|
|
|
675
675
|
className: (0, _classnames.default)("".concat(RC, "__list-item-title"), item.labelClassName)
|
|
676
676
|
}, hightlightSearchValue(title)), description && /*#__PURE__*/_react.default.createElement("span", {
|
|
677
677
|
className: (0, _classnames.default)("".concat(RC, "__list-item-description"))
|
|
678
|
-
}, description)), !isMobile && (item === null || item === void 0 ? void 0 : item.isEditable) && /*#__PURE__*/_react.default.createElement("div", {
|
|
678
|
+
}, description)), !isMobile && (item === null || item === void 0 ? void 0 : item.isEditable) && onOptionEdit && onOptionDelete && /*#__PURE__*/_react.default.createElement("div", {
|
|
679
679
|
id: "editTrigger".concat(item === null || item === void 0 ? void 0 : item.value),
|
|
680
680
|
className: (0, _classnames.default)("".concat(RC, "__list-item-edit-trigger")),
|
|
681
681
|
onClick: e => onOptionEditClick(e, item)
|
|
@@ -737,7 +737,7 @@ const TagsDropdown = _ref => {
|
|
|
737
737
|
className: (0, _classnames.default)("".concat(RC, "__header-row"))
|
|
738
738
|
}, headerContent)) : null, withSearchInputInList && /*#__PURE__*/_react.default.createElement("div", {
|
|
739
739
|
className: (0, _classnames.default)("".concat(RC, "__input-list-wrapper"))
|
|
740
|
-
}, renderSearchInput()), withCreateLogic && searchValue && filteredOptions.length && singleLevelOptions.every(_ref11 => {
|
|
740
|
+
}, renderSearchInput()), withCreateLogic && onOptionCreate && searchValue && filteredOptions.length && singleLevelOptions.every(_ref11 => {
|
|
741
741
|
let {
|
|
742
742
|
label
|
|
743
743
|
} = _ref11;
|
|
@@ -775,7 +775,7 @@ const TagsDropdown = _ref => {
|
|
|
775
775
|
})
|
|
776
776
|
}, footerContent, isMobile && /*#__PURE__*/_react.default.createElement("button", {
|
|
777
777
|
onClick: () => setIsOpen(false)
|
|
778
|
-
}, "Apply", chosenOptions !== null && chosenOptions !== void 0 && chosenOptions.length ? "(".concat(chosenOptions === null || chosenOptions === void 0 ? void 0 : chosenOptions.length, ")") : "")) : null, editingOption && /*#__PURE__*/(0, _reactDom.createPortal)(renderEditOptionModal(), (_document$getElementB5 = document.getElementById("app")) !== null && _document$getElementB5 !== void 0 ? _document$getElementB5 : document.body), withCreateLogic && searchValue && singleLevelOptions.every(_ref14 => {
|
|
778
|
+
}, "Apply", chosenOptions !== null && chosenOptions !== void 0 && chosenOptions.length ? "(".concat(chosenOptions === null || chosenOptions === void 0 ? void 0 : chosenOptions.length, ")") : "")) : null, editingOption && /*#__PURE__*/(0, _reactDom.createPortal)(renderEditOptionModal(), (_document$getElementB5 = document.getElementById("app")) !== null && _document$getElementB5 !== void 0 ? _document$getElementB5 : document.body), withCreateLogic && onOptionCreate && searchValue && singleLevelOptions.every(_ref14 => {
|
|
779
779
|
let {
|
|
780
780
|
label
|
|
781
781
|
} = _ref14;
|
|
@@ -803,7 +803,7 @@ const TagsDropdown = _ref => {
|
|
|
803
803
|
placeholder: placeholder || "Select from list",
|
|
804
804
|
attributesOfNativeInput: { ...attributesOfNativeInput,
|
|
805
805
|
onKeyDown: e => {
|
|
806
|
-
if (e.keyCode === 13 && withCreateLogic && singleLevelOptions.every(_ref15 => {
|
|
806
|
+
if (e.keyCode === 13 && withCreateLogic && onOptionCreate && singleLevelOptions.every(_ref15 => {
|
|
807
807
|
let {
|
|
808
808
|
label
|
|
809
809
|
} = _ref15;
|
|
@@ -960,14 +960,23 @@ const TagsDropdown = _ref => {
|
|
|
960
960
|
unselectAllButtonRef === null || unselectAllButtonRef === void 0 ? void 0 : (_unselectAllButtonRef = unselectAllButtonRef.current) === null || _unselectAllButtonRef === void 0 ? void 0 : _unselectAllButtonRef[fn]("click", unselectAllItems, true);
|
|
961
961
|
|
|
962
962
|
if (isOpen) {
|
|
963
|
-
var _getListContainer5
|
|
963
|
+
var _getListContainer5;
|
|
964
964
|
|
|
965
965
|
if (customTriggerRef !== null && customTriggerRef !== void 0 && customTriggerRef.current) {
|
|
966
966
|
customTriggerRef.current.style.pointerEvents = "none";
|
|
967
967
|
}
|
|
968
968
|
|
|
969
969
|
(_getListContainer5 = getListContainer()) === null || _getListContainer5 === void 0 ? void 0 : _getListContainer5.classList.add("tags-dropdown__container--opened");
|
|
970
|
-
|
|
970
|
+
|
|
971
|
+
if (!isMobile) {
|
|
972
|
+
var _inputRef$current2, _inputRef$current2$fo;
|
|
973
|
+
|
|
974
|
+
inputRef === null || inputRef === void 0 ? void 0 : (_inputRef$current2 = inputRef.current) === null || _inputRef$current2 === void 0 ? void 0 : (_inputRef$current2$fo = _inputRef$current2.focus) === null || _inputRef$current2$fo === void 0 ? void 0 : _inputRef$current2$fo.call(_inputRef$current2);
|
|
975
|
+
} else {
|
|
976
|
+
var _inputRef$current3, _inputRef$current3$bl;
|
|
977
|
+
|
|
978
|
+
inputRef === null || inputRef === void 0 ? void 0 : (_inputRef$current3 = inputRef.current) === null || _inputRef$current3 === void 0 ? void 0 : (_inputRef$current3$bl = _inputRef$current3.blur) === null || _inputRef$current3$bl === void 0 ? void 0 : _inputRef$current3$bl.call(_inputRef$current3);
|
|
979
|
+
}
|
|
971
980
|
} else {
|
|
972
981
|
var _getListContainer6;
|
|
973
982
|
|
|
@@ -1037,7 +1046,7 @@ const TagsDropdown = _ref => {
|
|
|
1037
1046
|
className: (0, _classnames.default)(RC, className, {
|
|
1038
1047
|
["".concat(RC, "_disabled")]: disabled,
|
|
1039
1048
|
["".concat(RC, "-mobile")]: isMobile,
|
|
1040
|
-
["".concat(RC, "--focused")]: isOpen && !(customTriggerRef !== null && customTriggerRef !== void 0 && customTriggerRef.current),
|
|
1049
|
+
["".concat(RC, "--focused")]: isOpen && !(customTriggerRef !== null && customTriggerRef !== void 0 && customTriggerRef.current) && !isMobile,
|
|
1041
1050
|
["".concat(RC, "--custom-trigger")]: Boolean(customTriggerRef === null || customTriggerRef === void 0 ? void 0 : customTriggerRef.current)
|
|
1042
1051
|
}),
|
|
1043
1052
|
ref: dropdownRef
|