@salesforcedevs/dx-components 0.59.0 → 0.61.1
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.
|
|
3
|
+
"version": "0.61.1",
|
|
4
4
|
"description": "DX Lightning web components",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"engines": {
|
|
@@ -25,5 +25,5 @@
|
|
|
25
25
|
"@types/lodash.get": "^4.4.6",
|
|
26
26
|
"@types/vimeo__player": "^2.16.2"
|
|
27
27
|
},
|
|
28
|
-
"gitHead": "
|
|
28
|
+
"gitHead": "6e9bf005600ca7a99a22b99cf5d5e0618590d9ce"
|
|
29
29
|
}
|
|
@@ -307,10 +307,26 @@ export default class SidebarSearch extends LightningElement {
|
|
|
307
307
|
}
|
|
308
308
|
|
|
309
309
|
let href;
|
|
310
|
-
|
|
310
|
+
let isSelected = false;
|
|
311
|
+
const isReferenceUrl = clickUri.includes("/references/");
|
|
312
|
+
if (isReferenceUrl) {
|
|
311
313
|
href = `${pathname}${queryParam}&q=${this.value}`;
|
|
314
|
+
|
|
315
|
+
//NOTE: This is specific to references related comparison
|
|
316
|
+
const resultHrefWithMetaQuery = `${pathname}${queryParam}`;
|
|
317
|
+
|
|
318
|
+
const urlParams = new URLSearchParams(window.location.search);
|
|
319
|
+
const metaQueryParam = urlParams.get("meta");
|
|
320
|
+
|
|
321
|
+
let currentUrlPathWithQuery = window.location.pathname;
|
|
322
|
+
if (metaQueryParam) {
|
|
323
|
+
currentUrlPathWithQuery = `${currentUrlPathWithQuery}?meta=${metaQueryParam}`;
|
|
324
|
+
}
|
|
325
|
+
|
|
326
|
+
isSelected = resultHrefWithMetaQuery === currentUrlPathWithQuery;
|
|
312
327
|
} else {
|
|
313
328
|
href = `${pathname}?q=${this.value}`;
|
|
329
|
+
isSelected = pathname === window.location.pathname;
|
|
314
330
|
}
|
|
315
331
|
|
|
316
332
|
return {
|
|
@@ -320,7 +336,7 @@ export default class SidebarSearch extends LightningElement {
|
|
|
320
336
|
excerptHighlights,
|
|
321
337
|
uniqueId,
|
|
322
338
|
href,
|
|
323
|
-
selected:
|
|
339
|
+
selected: isSelected
|
|
324
340
|
};
|
|
325
341
|
};
|
|
326
342
|
|