@salesforcedevs/dx-components 0.18.4 → 0.18.8

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.4",
3
+ "version": "0.18.8",
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": "070ef3fc124d8120431027c36bc88faa81bd6df2"
32
+ "gitHead": "4e4e55a3a3bd327d3d96b03ec560c3081f12ce3b"
33
33
  }
@@ -283,20 +283,22 @@ export default class SidebarSearch extends LightningElement {
283
283
  }: Result): SidebarSearchResult => {
284
284
  // discussion about this normalization here: https://salesforce-internal.slack.com/archives/C020S6784JX/p1639506238376600
285
285
 
286
- const isOverview = clickUri.endsWith("/overview");
287
- const isReferenceOrOverview =
288
- isOverview || clickUri.endsWith("/references");
286
+ const isNestedGuide = clickUri.includes("/guide/");
287
+ const isGuide = clickUri.endsWith("/guide") || isNestedGuide;
288
+ const isReference = clickUri.endsWith("/references");
289
+ const isApex = !!sfhtml_url__c;
289
290
 
290
- const query = isOverview ? "" : `?q=${this.value}`;
291
291
  let pathname;
292
- if (sfhtml_url__c) {
292
+ if (isApex) {
293
293
  pathname = `/docs/${sfhtml_url__c}`;
294
294
  } else {
295
295
  const url = new URL(clickUri);
296
- const extension = isReferenceOrOverview ? "" : ".html";
296
+ const extension = isNestedGuide ? ".html" : "";
297
297
  pathname = `${url.pathname}${extension}`;
298
298
  }
299
299
 
300
+ const query =
301
+ isGuide || isReference || isApex ? `?q=${this.value}` : "";
300
302
  const href = `${pathname}${query}`;
301
303
 
302
304
  return {