@salesforcedevs/dx-components 1.13.0 → 1.14.2
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,16 +1,16 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@salesforcedevs/dx-components",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.14.2",
|
|
4
4
|
"description": "DX Lightning web components",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"engines": {
|
|
7
|
-
"node": "
|
|
7
|
+
"node": "20.x"
|
|
8
8
|
},
|
|
9
9
|
"publishConfig": {
|
|
10
10
|
"access": "public"
|
|
11
11
|
},
|
|
12
12
|
"dependencies": {
|
|
13
|
-
"@coveo/headless": "
|
|
13
|
+
"@coveo/headless": "3.22.2",
|
|
14
14
|
"@floating-ui/dom": "1.5.1",
|
|
15
15
|
"@optimizely/optimizely-sdk": "5.3.0",
|
|
16
16
|
"@salesforcedevs/sfdocs-wires": "0.6.98",
|
|
@@ -44,7 +44,7 @@
|
|
|
44
44
|
"luxon": "3.4.4"
|
|
45
45
|
},
|
|
46
46
|
"volta": {
|
|
47
|
-
"node": "
|
|
47
|
+
"node": "20.19.0"
|
|
48
48
|
},
|
|
49
|
-
"gitHead": "
|
|
49
|
+
"gitHead": "5ceecca5be7104a277cacc732f83b8cc734c4754"
|
|
50
50
|
}
|
|
@@ -50,10 +50,7 @@ const isTrailheadDomain = (domain: string) =>
|
|
|
50
50
|
domain === "trailhead.salesforce.com" ||
|
|
51
51
|
domain === "dev.trailhead.salesforce.com";
|
|
52
52
|
|
|
53
|
-
const buildTemplateHelperBadge = (
|
|
54
|
-
value: keyof typeof CONTENT_TYPE_LABELS
|
|
55
|
-
) => {
|
|
56
|
-
|
|
53
|
+
const buildTemplateHelperBadge = (value: keyof typeof CONTENT_TYPE_LABELS) => {
|
|
57
54
|
const style = getContentTypeColorVariables(value);
|
|
58
55
|
const label = CONTENT_TYPE_LABELS[value];
|
|
59
56
|
const { iconSprite, iconSymbol } = CONTENT_TYPE_ICONS[value];
|
|
@@ -310,7 +307,17 @@ export default class SearchResults extends LightningElement {
|
|
|
310
307
|
});
|
|
311
308
|
});
|
|
312
309
|
|
|
313
|
-
|
|
310
|
+
// Note that this logic means that if someone clicks a search result before
|
|
311
|
+
// onetrust has loaded, and thus navigates away from the page, we will lose the tracking
|
|
312
|
+
if (document.readyState === "complete") {
|
|
313
|
+
this.trackSearchResults(event, this.query, this.totalResults);
|
|
314
|
+
} else {
|
|
315
|
+
const query = this.query;
|
|
316
|
+
const totalResults = this.totalResults;
|
|
317
|
+
window.addEventListener("load", () => {
|
|
318
|
+
this.trackSearchResults(event, query, totalResults);
|
|
319
|
+
});
|
|
320
|
+
}
|
|
314
321
|
});
|
|
315
322
|
|
|
316
323
|
Coveo.$$(root).on(Coveo.QueryEvents.deferredQuerySuccess, async () => {
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
buildSearchEngine as _buildSearchEngine,
|
|
3
3
|
SearchAppState,
|
|
4
|
-
SearchEngineOptions
|
|
5
|
-
getOrganizationEndpoints
|
|
4
|
+
SearchEngineOptions
|
|
6
5
|
} from "@coveo/headless";
|
|
7
6
|
|
|
8
7
|
export const buildSearchEngine = ({
|
|
@@ -25,8 +24,7 @@ export const buildSearchEngine = ({
|
|
|
25
24
|
const configuration = {
|
|
26
25
|
accessToken: publicAccessToken,
|
|
27
26
|
organizationId,
|
|
28
|
-
search
|
|
29
|
-
organizationEndpoints: getOrganizationEndpoints(organizationId)
|
|
27
|
+
search
|
|
30
28
|
};
|
|
31
29
|
|
|
32
30
|
const engineConfiguration: SearchEngineOptions = preloadedState
|