@salesforcedevs/dx-components 0.18.5 → 0.18.9
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.18.
|
|
3
|
+
"version": "0.18.9",
|
|
4
4
|
"description": "DX Lightning web components",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"engines": {
|
|
@@ -29,5 +29,5 @@
|
|
|
29
29
|
"@types/debounce": "^1.2.0",
|
|
30
30
|
"@types/lodash.get": "^4.4.6"
|
|
31
31
|
},
|
|
32
|
-
"gitHead": "
|
|
32
|
+
"gitHead": "3eeeec8f8c61cb36d1bc99ba065f2321074f951b"
|
|
33
33
|
}
|
|
@@ -69,8 +69,10 @@ export default class SidebarSearch extends LightningElement {
|
|
|
69
69
|
|
|
70
70
|
@api
|
|
71
71
|
setInputValue(searchTerm: string) {
|
|
72
|
-
this.value
|
|
73
|
-
|
|
72
|
+
if (searchTerm !== this.value) {
|
|
73
|
+
this.value = searchTerm || "";
|
|
74
|
+
this.handleValueChange(true);
|
|
75
|
+
}
|
|
74
76
|
}
|
|
75
77
|
|
|
76
78
|
private _coveoAdvancedQueryConfig!: { [key: string]: any };
|
|
@@ -283,22 +285,22 @@ export default class SidebarSearch extends LightningElement {
|
|
|
283
285
|
}: Result): SidebarSearchResult => {
|
|
284
286
|
// discussion about this normalization here: https://salesforce-internal.slack.com/archives/C020S6784JX/p1639506238376600
|
|
285
287
|
|
|
286
|
-
const
|
|
287
|
-
const
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
clickUri.endsWith("/guide");
|
|
288
|
+
const isNestedGuide = clickUri.includes("/guide/");
|
|
289
|
+
const isGuide = clickUri.endsWith("/guide") || isNestedGuide;
|
|
290
|
+
const isReference = clickUri.endsWith("/references");
|
|
291
|
+
const isApex = !!sfhtml_url__c;
|
|
291
292
|
|
|
292
|
-
const query = isOverview ? "" : `?q=${this.value}`;
|
|
293
293
|
let pathname;
|
|
294
|
-
if (
|
|
294
|
+
if (isApex) {
|
|
295
295
|
pathname = `/docs/${sfhtml_url__c}`;
|
|
296
296
|
} else {
|
|
297
297
|
const url = new URL(clickUri);
|
|
298
|
-
const extension =
|
|
298
|
+
const extension = isNestedGuide ? ".html" : "";
|
|
299
299
|
pathname = `${url.pathname}${extension}`;
|
|
300
300
|
}
|
|
301
301
|
|
|
302
|
+
const query =
|
|
303
|
+
isGuide || isReference || isApex ? `?q=${this.value}` : "";
|
|
302
304
|
const href = `${pathname}${query}`;
|
|
303
305
|
|
|
304
306
|
return {
|