@salesforcedevs/dx-components 0.19.3-alpha.32 → 0.19.3-alpha.36

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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@salesforcedevs/dx-components",
3
- "version": "0.19.3-alpha.32",
3
+ "version": "0.19.3-alpha.36",
4
4
  "description": "DX Lightning web components",
5
5
  "license": "MIT",
6
6
  "engines": {
@@ -338,9 +338,11 @@ export default class SidebarSearch extends LightningElement {
338
338
  const normalizedTermsToHighlight = Array.from(
339
339
  new Set(
340
340
  [
341
+ this.value,
342
+ Object.keys(termsToHighlight),
343
+ Object.keys(phrasesToHighlight),
341
344
  Object.values(termsToHighlight),
342
- Object.values(phrasesToHighlight),
343
- this.value
345
+ Object.values(phrasesToHighlight)
344
346
  ].flat(2)
345
347
  )
346
348
  );
@@ -31,9 +31,10 @@ export const highlightTerms = (
31
31
  innerHtml = innerHtml.replace(searchExp, "<mark>$&</mark>");
32
32
  }
33
33
 
34
+ console.log(element)
34
35
  element.innerHTML = innerHtml;
35
36
  } catch (e) {
36
- console.error(e, element);
37
+ console.error(`${element} could not be parsed by the highlight utility: ${e}`);
37
38
  }
38
39
 
39
40
  // element