@salesforcedevs/docs-components 1.3.18 → 1.3.19
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.3.
|
|
3
|
+
"version": "1.3.19",
|
|
4
4
|
"description": "Docs Lightning web components for DSC",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"main": "index.js",
|
|
@@ -24,5 +24,5 @@
|
|
|
24
24
|
"@types/lodash.orderby": "^4.6.7",
|
|
25
25
|
"@types/lodash.uniqby": "^4.7.7"
|
|
26
26
|
},
|
|
27
|
-
"gitHead": "
|
|
27
|
+
"gitHead": "bbeea73fe1ce336f60e304b3edcc0ff7afd5b99d"
|
|
28
28
|
}
|
|
@@ -37,7 +37,9 @@
|
|
|
37
37
|
<div style={docContentStyle}>
|
|
38
38
|
<slot onslotchange={onSlotChange}></slot>
|
|
39
39
|
</div>
|
|
40
|
-
<doc-sprig-survey
|
|
40
|
+
<doc-sprig-survey
|
|
41
|
+
if:true={shouldDisplayFeedback}
|
|
42
|
+
></doc-sprig-survey>
|
|
41
43
|
</div>
|
|
42
44
|
<div class="right-nav-bar is-sticky">
|
|
43
45
|
<dx-toc
|
|
@@ -7,6 +7,8 @@ import { track as sendGtm } from "dxUtils/analytics";
|
|
|
7
7
|
|
|
8
8
|
type AnchorMap = { [key: string]: { intersect: boolean; id: string } };
|
|
9
9
|
|
|
10
|
+
declare const Sprig: (eventType: string, eventNme: string) => void;
|
|
11
|
+
|
|
10
12
|
const TOC_HEADER_TAG = "DOC-HEADING";
|
|
11
13
|
const HIGHLIGHTABLE_SELECTOR = [
|
|
12
14
|
"p",
|
|
@@ -80,6 +82,11 @@ export default class ContentLayout extends LightningElement {
|
|
|
80
82
|
private lastScrollPosition: number;
|
|
81
83
|
private observer?: IntersectionObserver;
|
|
82
84
|
private hasRendered: boolean = false;
|
|
85
|
+
private contentLoaded: boolean = false;
|
|
86
|
+
|
|
87
|
+
get shouldDisplayFeedback() {
|
|
88
|
+
return this.contentLoaded && typeof Sprig !== "undefined";
|
|
89
|
+
}
|
|
83
90
|
|
|
84
91
|
private searchSyncer = new SearchSyncer({
|
|
85
92
|
callbacks: {
|
|
@@ -286,6 +293,7 @@ export default class ContentLayout extends LightningElement {
|
|
|
286
293
|
).assignedElements();
|
|
287
294
|
|
|
288
295
|
if (slotElements.length) {
|
|
296
|
+
this.contentLoaded = true;
|
|
289
297
|
const slotContentElement = slotElements[0];
|
|
290
298
|
const headingElements =
|
|
291
299
|
slotContentElement.ownerDocument?.getElementsByTagName(
|