@salesforcedevs/dw-components 1.17.7 → 1.18.0
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/dw-components",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.18.0",
|
|
4
4
|
"description": "Lightning web components for https://developer.salesforce.com",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"engines": {
|
|
@@ -26,5 +26,5 @@
|
|
|
26
26
|
"@types/setimmediate": "1.0.4",
|
|
27
27
|
"setimmediate": "1.0.5"
|
|
28
28
|
},
|
|
29
|
-
"gitHead": "
|
|
29
|
+
"gitHead": "356246059688070ad1c23baf2a84839ab4e27b6a"
|
|
30
30
|
}
|
|
@@ -6,6 +6,7 @@ import uniqBy from "lodash.uniqby";
|
|
|
6
6
|
import orderBy from "lodash.orderby";
|
|
7
7
|
import { isGivenLanguageSupported } from "dxUtils/language";
|
|
8
8
|
import { track } from "dxUtils/analytics";
|
|
9
|
+
import { escapeRegExp } from "dxUtils/regexps";
|
|
9
10
|
|
|
10
11
|
const DSC_API_URL = {
|
|
11
12
|
"en-us": "/docs/get_index/en-us/000.0/false/All%20Services/all",
|
|
@@ -476,7 +477,9 @@ export default class DocsGrid extends LightningElement {
|
|
|
476
477
|
}
|
|
477
478
|
|
|
478
479
|
findWithRegex(baseString: string, searchWord: string) {
|
|
479
|
-
|
|
480
|
+
// Escape special regex characters to prevent invalid regex patterns
|
|
481
|
+
const escapedSearchWord = escapeRegExp(searchWord);
|
|
482
|
+
const regex = new RegExp(escapedSearchWord.replace(/\s/, ".*"));
|
|
480
483
|
return !!baseString.match(regex);
|
|
481
484
|
}
|
|
482
485
|
|