@salesforcedevs/dx-components 0.18.1 → 0.18.5
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.
|
@@ -282,14 +282,24 @@ export default class SidebarSearch extends LightningElement {
|
|
|
282
282
|
uniqueId
|
|
283
283
|
}: Result): SidebarSearchResult => {
|
|
284
284
|
// discussion about this normalization here: https://salesforce-internal.slack.com/archives/C020S6784JX/p1639506238376600
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
const
|
|
285
|
+
|
|
286
|
+
const isOverview = clickUri.endsWith("/overview");
|
|
287
|
+
const isSfDocsRoot =
|
|
288
|
+
isOverview ||
|
|
289
|
+
clickUri.endsWith("/references") ||
|
|
290
|
+
clickUri.endsWith("/guide");
|
|
291
|
+
|
|
292
|
+
const query = isOverview ? "" : `?q=${this.value}`;
|
|
293
|
+
let pathname;
|
|
294
|
+
if (sfhtml_url__c) {
|
|
295
|
+
pathname = `/docs/${sfhtml_url__c}`;
|
|
296
|
+
} else {
|
|
297
|
+
const url = new URL(clickUri);
|
|
298
|
+
const extension = isSfDocsRoot ? "" : ".html";
|
|
299
|
+
pathname = `${url.pathname}${extension}`;
|
|
300
|
+
}
|
|
301
|
+
|
|
302
|
+
const href = `${pathname}${query}`;
|
|
293
303
|
|
|
294
304
|
return {
|
|
295
305
|
title,
|