intelicoreact 1.0.92 → 1.0.93
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.
|
@@ -101,25 +101,27 @@ var DropdownLiveSearch = function DropdownLiveSearch(_ref) {
|
|
|
101
101
|
};
|
|
102
102
|
|
|
103
103
|
var highlightedText = function highlightedText(text, postfix) {
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
104
|
+
if (!isSearchable) return text;else {
|
|
105
|
+
var _text;
|
|
106
|
+
|
|
107
|
+
var prepare = function prepare(text) {
|
|
108
|
+
return text === null || text === void 0 ? void 0 : text.replace(/[|\\{}()[\]^$+*?.]/g, '\\$&');
|
|
109
|
+
};
|
|
110
|
+
|
|
111
|
+
text = text.replace(/["&<>]/g, function (a) {
|
|
112
|
+
return {
|
|
113
|
+
'"': '"',
|
|
114
|
+
'&': '&',
|
|
115
|
+
'<': '<',
|
|
116
|
+
'>': '>'
|
|
117
|
+
}[a];
|
|
118
|
+
});
|
|
119
|
+
var main = searchValue ? (_text = text) === null || _text === void 0 ? void 0 : _text.replace(new RegExp(prepare(searchValue), 'i'), function (match) {
|
|
120
|
+
return "<span class=\"bg--yellow\">".concat(match, "</span>");
|
|
121
|
+
}) : text;
|
|
122
|
+
var postfixPart = postfix ? "<span class=\"dropdown__list-item-postfix\">".concat(postfix, "</span>") : '';
|
|
123
|
+
return main + postfixPart;
|
|
124
|
+
}
|
|
123
125
|
};
|
|
124
126
|
|
|
125
127
|
var getMarkupForElement = function getMarkupForElement(item, index, optTestId) {
|
|
@@ -138,7 +140,8 @@ var DropdownLiveSearch = function DropdownLiveSearch(_ref) {
|
|
|
138
140
|
className: (0, _classnames.default)("".concat(RC, "__list-item"), (_cn = {}, (0, _defineProperty2.default)(_cn, "".concat(RC, "__list-item_active"), item.value === value), (0, _defineProperty2.default)(_cn, "".concat(RC, "__list-item_disabled"), item.disabled), _cn), item.className)
|
|
139
141
|
}, /*#__PURE__*/_react.default.createElement("span", {
|
|
140
142
|
className: (0, _classnames.default)("".concat(RC, "__active-icon"), (0, _defineProperty2.default)({}, "".concat(RC, "__active-icon_active"), lowerLabel === lowerSearchValue))
|
|
141
|
-
}, /*#__PURE__*/_react.default.createElement(_reactFeather.Check, null)), /*#__PURE__*/_react.default.createElement("
|
|
143
|
+
}, /*#__PURE__*/_react.default.createElement(_reactFeather.Check, null)), /*#__PURE__*/_react.default.createElement("p", {
|
|
144
|
+
title: item.label,
|
|
142
145
|
className: item.labelClassName || '',
|
|
143
146
|
dangerouslySetInnerHTML: {
|
|
144
147
|
__html: highlightedText(item.label, item.postfix)
|
|
@@ -22,6 +22,7 @@
|
|
|
22
22
|
font-weight: 400;
|
|
23
23
|
|
|
24
24
|
.text {
|
|
25
|
+
display: block;
|
|
25
26
|
overflow: hidden;
|
|
26
27
|
max-width: calc(100% - 5px);
|
|
27
28
|
padding: 0 16px 0 8px;
|
|
@@ -136,6 +137,12 @@
|
|
|
136
137
|
&-postfix {
|
|
137
138
|
margin-left: 5px;
|
|
138
139
|
}
|
|
140
|
+
|
|
141
|
+
p {
|
|
142
|
+
text-overflow: ellipsis;
|
|
143
|
+
white-space: nowrap;
|
|
144
|
+
overflow: hidden;
|
|
145
|
+
}
|
|
139
146
|
}
|
|
140
147
|
|
|
141
148
|
&--with-label {
|
|
@@ -179,11 +186,11 @@
|
|
|
179
186
|
}
|
|
180
187
|
|
|
181
188
|
&__container {
|
|
182
|
-
position:
|
|
189
|
+
position: absolute;
|
|
183
190
|
z-index: 99999;
|
|
184
191
|
display: block;
|
|
185
192
|
box-sizing: border-box;
|
|
186
|
-
top:
|
|
193
|
+
top: 26px;
|
|
187
194
|
}
|
|
188
195
|
|
|
189
196
|
&.disabled {
|