@salesforcedevs/docs-components 1.3.209 → 1.3.219
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.219",
|
|
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": "c0f8f19b7bfc14f9a6ca02a2dc328f726d72270a"
|
|
28
28
|
}
|
|
@@ -207,9 +207,9 @@ export default class ContentLayout extends LightningElement {
|
|
|
207
207
|
".sticky-doc-header"
|
|
208
208
|
) as HTMLElement;
|
|
209
209
|
|
|
210
|
-
const docPhaseEl = (
|
|
211
|
-
"[name=doc-phase]"
|
|
212
|
-
)
|
|
210
|
+
const docPhaseEl = (
|
|
211
|
+
this.template.querySelector("[name=doc-phase]")! as any
|
|
212
|
+
).assignedElements()[0] as HTMLSlotElement;
|
|
213
213
|
|
|
214
214
|
if (!sidebarEl || !globalNavEl || !contextNavEl || !docHeaderEl) {
|
|
215
215
|
console.warn("One or more required elements are missing.");
|
|
@@ -259,9 +259,8 @@ export default class ContentLayout extends LightningElement {
|
|
|
259
259
|
});
|
|
260
260
|
|
|
261
261
|
// Adjust right nav bar position when doc phase is present
|
|
262
|
-
const rightNavBarEl =
|
|
263
|
-
".right-nav-bar"
|
|
264
|
-
);
|
|
262
|
+
const rightNavBarEl =
|
|
263
|
+
this.template.querySelector(".right-nav-bar");
|
|
265
264
|
|
|
266
265
|
if (rightNavBarEl) {
|
|
267
266
|
rightNavBarEl.style.top = `${
|
|
@@ -323,14 +322,17 @@ export default class ContentLayout extends LightningElement {
|
|
|
323
322
|
};
|
|
324
323
|
|
|
325
324
|
onSlotChange(event: Event): void {
|
|
326
|
-
const slotElements = (
|
|
325
|
+
const slotElements = (
|
|
326
|
+
event.target as HTMLSlotElement
|
|
327
|
+
).assignedElements();
|
|
327
328
|
|
|
328
329
|
if (slotElements.length) {
|
|
329
330
|
this.contentLoaded = true;
|
|
330
331
|
const slotContentElement = slotElements[0];
|
|
331
|
-
const headingElements =
|
|
332
|
-
|
|
333
|
-
|
|
332
|
+
const headingElements =
|
|
333
|
+
slotContentElement.ownerDocument?.getElementsByTagName(
|
|
334
|
+
TOC_HEADER_TAG
|
|
335
|
+
);
|
|
334
336
|
|
|
335
337
|
for (const headingElement of headingElements as any) {
|
|
336
338
|
// Sometimes elements hash is not being set when slot content is wrapped with div
|
|
@@ -390,9 +392,9 @@ export default class ContentLayout extends LightningElement {
|
|
|
390
392
|
globalNavEl?.offsetHeight +
|
|
391
393
|
contextNavEl?.offsetHeight;
|
|
392
394
|
|
|
393
|
-
const docPhaseEl = (
|
|
394
|
-
"[name=doc-phase]"
|
|
395
|
-
)
|
|
395
|
+
const docPhaseEl = (
|
|
396
|
+
this.template.querySelector("[name=doc-phase]")! as any
|
|
397
|
+
).assignedElements()[0] as HTMLSlotElement;
|
|
396
398
|
|
|
397
399
|
const offset = docPhaseEl
|
|
398
400
|
? headerHeight + docPhaseEl.offsetHeight
|