@salesforcedevs/dx-components 0.19.3-alpha.51 → 0.19.3-alpha.56
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.
package/package.json
CHANGED
|
@@ -350,7 +350,6 @@ export default class SidebarSearch extends LightningElement {
|
|
|
350
350
|
|
|
351
351
|
private dispatchHighlightedTermChange = () => {
|
|
352
352
|
if (this.termsToHighlight) {
|
|
353
|
-
console.log('dispatching terms to highlight')
|
|
354
353
|
this.dispatchEvent(
|
|
355
354
|
new CustomEvent("highlightedtermchange", {
|
|
356
355
|
detail: {
|
|
@@ -13,7 +13,6 @@ export const highlightTerms = (
|
|
|
13
13
|
let scrolled = false;
|
|
14
14
|
console.log({ elements, query, termsToHighlight, searchExp });
|
|
15
15
|
elements.forEach((element) => {
|
|
16
|
-
console.log(element, element.innerHTML)
|
|
17
16
|
if (
|
|
18
17
|
element?.innerHTML.includes("<dx-") ||
|
|
19
18
|
element?.innerHTML.includes("<doc-")
|
|
@@ -3,5 +3,5 @@ const escapeRegExp = (text: string) =>
|
|
|
3
3
|
|
|
4
4
|
export const createSearchRegExp = (searchTerms: string[]): RegExp => {
|
|
5
5
|
const escaped = searchTerms.map((term) => escapeRegExp(term.trim()));
|
|
6
|
-
return new RegExp(
|
|
6
|
+
return new RegExp(`\\b(?:${escaped.join("|")})(?![^<>]*>)\\b`, "gi");
|
|
7
7
|
};
|