@salesforcedevs/docs-components 1.3.345-refactor-tab-alpha → 1.3.345-refactor-tab-alpha1
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,5 +1,3 @@
|
|
|
1
|
-
/* eslint-disable @lwc/lwc/no-document-query */
|
|
2
|
-
import { closest } from "kagekiri";
|
|
3
1
|
import ContentLayout from "doc/contentLayout";
|
|
4
2
|
|
|
5
3
|
const TOC_HEADER_TAG = "doc-heading";
|
|
@@ -103,17 +101,6 @@ export default class LwcContentLayout extends ContentLayout {
|
|
|
103
101
|
};
|
|
104
102
|
|
|
105
103
|
connectedCallback(): void {
|
|
106
|
-
const hasParentHighlightListener = closest(
|
|
107
|
-
"doc-xml-content",
|
|
108
|
-
this.template.host
|
|
109
|
-
);
|
|
110
|
-
if (!hasParentHighlightListener) {
|
|
111
|
-
window.addEventListener(
|
|
112
|
-
"highlightedtermchange",
|
|
113
|
-
this.updateHighlighted
|
|
114
|
-
);
|
|
115
|
-
this.searchSyncer.init();
|
|
116
|
-
}
|
|
117
104
|
window.addEventListener("popstate", this.handlePopState);
|
|
118
105
|
}
|
|
119
106
|
|
|
@@ -156,25 +143,18 @@ export default class LwcContentLayout extends ContentLayout {
|
|
|
156
143
|
}
|
|
157
144
|
|
|
158
145
|
renderedCallback(): void {
|
|
159
|
-
/**
|
|
160
|
-
* Note: We are adding timeout because chrome is optimizing and not triggering recent renderedCallback though elements reference is changed
|
|
161
|
-
* Also we are considering recent renderedCallback
|
|
162
|
-
*/
|
|
163
|
-
this.clearRenderObserverTimer();
|
|
164
|
-
this.observerTimerId = setTimeout(
|
|
165
|
-
this.attachInteractionObserver,
|
|
166
|
-
OBSERVER_ATTACH_WAIT_TIME
|
|
167
|
-
);
|
|
168
|
-
|
|
169
|
-
this.adjustNavPosition();
|
|
170
|
-
window.addEventListener("scroll", this.adjustNavPosition);
|
|
171
|
-
window.addEventListener("resize", this.adjustNavPosition);
|
|
172
|
-
|
|
173
146
|
if (!this.hasRendered) {
|
|
174
147
|
this.hasRendered = true;
|
|
175
148
|
this.setRNBByTab();
|
|
176
149
|
if (this.showTabBasedRNB) {
|
|
177
150
|
window.addEventListener("tabchanged", this.onTabChanged);
|
|
151
|
+
window.addEventListener(
|
|
152
|
+
"specificationdatarendered",
|
|
153
|
+
this.onTabChanged
|
|
154
|
+
);
|
|
155
|
+
window.addEventListener("selectedcontent", (event) =>
|
|
156
|
+
this.onRNBClick(event as CustomEvent)
|
|
157
|
+
);
|
|
178
158
|
this.restoreTabSelection();
|
|
179
159
|
}
|
|
180
160
|
this.restoreScroll();
|