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