@salesforcedevs/dx-components 0.19.3-alpha.52 → 0.19.3-alpha.53

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.52",
3
+ "version": "0.19.3-alpha.53",
4
4
  "description": "DX Lightning web components",
5
5
  "license": "MIT",
6
6
  "engines": {
@@ -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: {
@@ -2,6 +2,6 @@ const escapeRegExp = (text: string) =>
2
2
  text.replace(/[-[\]{}()*+?.,\\^$|]/g, "\\$&");
3
3
 
4
4
  export const createSearchRegExp = (searchTerms: string[]): RegExp => {
5
- const escaped = searchTerms.map((term) => escapeRegExp(term.trim()));
5
+ const escaped = searchTerms.map((term) => escapeRegExp(`^${term.trim()}`));
6
6
  return new RegExp(`(?:${escaped.join("|")})(?![^<>]*>)`, "gi");
7
7
  };