intelicoreact 0.3.36 → 0.3.37
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.
|
@@ -170,7 +170,16 @@ var Dropdown = function Dropdown(_ref) {
|
|
|
170
170
|
};
|
|
171
171
|
|
|
172
172
|
var hightlightedText = function hightlightedText(text, postfix) {
|
|
173
|
-
var
|
|
173
|
+
var _text;
|
|
174
|
+
|
|
175
|
+
text = text.replace(/["<>]/g, function (a) {
|
|
176
|
+
return {
|
|
177
|
+
'"': '"',
|
|
178
|
+
'<': '<',
|
|
179
|
+
'>': '>'
|
|
180
|
+
}[a];
|
|
181
|
+
});
|
|
182
|
+
var main = searchValue ? (_text = text) === null || _text === void 0 ? void 0 : _text.replace(new RegExp(searchValue, 'i'), function (match) {
|
|
174
183
|
return "<span class=\"bg--yellow\">".concat(match, "</span>");
|
|
175
184
|
}) : text;
|
|
176
185
|
var postfixPart = postfix ? "<span class=\"dropdown__list-item-postfix\">".concat(postfix, "</span>") : '';
|
|
@@ -194,7 +203,7 @@ var Dropdown = function Dropdown(_ref) {
|
|
|
194
203
|
}, /*#__PURE__*/_react.default.createElement(_reactFeather.Check, null)), /*#__PURE__*/_react.default.createElement("div", {
|
|
195
204
|
className: item.className || '',
|
|
196
205
|
dangerouslySetInnerHTML: {
|
|
197
|
-
__html: hightlightedText(
|
|
206
|
+
__html: hightlightedText(item.label, item.postfix)
|
|
198
207
|
}
|
|
199
208
|
})) : null;
|
|
200
209
|
};
|