@salesforcedevs/docs-components 1.20.14 → 1.20.16
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/docs-components",
|
|
3
|
-
"version": "1.20.
|
|
3
|
+
"version": "1.20.16",
|
|
4
4
|
"description": "Docs Lightning web components for DSC",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"main": "index.js",
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
"@types/lodash.orderby": "4.6.9",
|
|
26
26
|
"@types/lodash.uniqby": "4.7.9"
|
|
27
27
|
},
|
|
28
|
-
"gitHead": "
|
|
28
|
+
"gitHead": "07815cdf681065e2c2f967ab36c2482ed4819662",
|
|
29
29
|
"volta": {
|
|
30
30
|
"node": "20.19.0",
|
|
31
31
|
"yarn": "1.22.19"
|
|
@@ -104,8 +104,11 @@ export default class AmfTopic extends LightningElement {
|
|
|
104
104
|
|
|
105
105
|
// Add click handler for all links in the dynamically loaded content
|
|
106
106
|
if (container) {
|
|
107
|
-
|
|
108
|
-
|
|
107
|
+
if (this.isLinkTrackingHandledByAncestor()) {
|
|
108
|
+
container.removeEventListener("click", this.handleLinkClick);
|
|
109
|
+
} else {
|
|
110
|
+
container.addEventListener("click", this.handleLinkClick);
|
|
111
|
+
}
|
|
109
112
|
}
|
|
110
113
|
|
|
111
114
|
const isTabletOrDesktop = window.matchMedia(
|
|
@@ -124,4 +127,9 @@ export default class AmfTopic extends LightningElement {
|
|
|
124
127
|
console.error(error);
|
|
125
128
|
}
|
|
126
129
|
}
|
|
130
|
+
|
|
131
|
+
private isLinkTrackingHandledByAncestor(): boolean {
|
|
132
|
+
const host = this.template.host as HTMLElement | undefined;
|
|
133
|
+
return !!host?.closest?.("doc-content-layout");
|
|
134
|
+
}
|
|
127
135
|
}
|
|
@@ -6,8 +6,6 @@ import Button from "dx/button";
|
|
|
6
6
|
import { highlightTerms } from "dxUtils/highlight";
|
|
7
7
|
import ContentCallout from "doc/contentCallout";
|
|
8
8
|
import ContentMedia from "doc/contentMedia";
|
|
9
|
-
import { buildDocLinkClickHandler } from "dxUtils/analytics";
|
|
10
|
-
|
|
11
9
|
const HIGHLIGHTABLE_SELECTOR = [
|
|
12
10
|
"p",
|
|
13
11
|
".p",
|
|
@@ -161,8 +159,6 @@ export default class Content extends LightningElement {
|
|
|
161
159
|
const anchorEls = divEl.querySelectorAll("a:not([href^='#'])");
|
|
162
160
|
|
|
163
161
|
anchorEls.forEach((anchorEl: any) => {
|
|
164
|
-
// Add click handler to track link clicks
|
|
165
|
-
anchorEl.addEventListener("click", buildDocLinkClickHandler());
|
|
166
162
|
if (
|
|
167
163
|
anchorEl.textContent!.includes("Next →") ||
|
|
168
164
|
anchorEl.textContent!.includes("← Previous")
|
|
@@ -45,7 +45,7 @@
|
|
|
45
45
|
</doc-content-layout>
|
|
46
46
|
<div lwc:if={display404}>
|
|
47
47
|
<dx-error
|
|
48
|
-
image="https://a.sfdcstatic.com/developer-website/images/404.svg"
|
|
48
|
+
image="https://a.sfdcstatic.com/developer-website/prod/images/404.svg"
|
|
49
49
|
code="404"
|
|
50
50
|
header="Beep boop. That did not compute."
|
|
51
51
|
subtitle="The document you're looking for doesn't seem to exist."
|