@salesforcedevs/docs-components 1.20.1 → 1.20.3
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.3",
|
|
4
4
|
"description": "Docs Lightning web components for DSC",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"main": "index.js",
|
|
@@ -25,5 +25,5 @@
|
|
|
25
25
|
"@types/lodash.orderby": "4.6.9",
|
|
26
26
|
"@types/lodash.uniqby": "4.7.9"
|
|
27
27
|
},
|
|
28
|
-
"gitHead": "
|
|
28
|
+
"gitHead": "53341fe3e51cffb3368cbf3fbea5ef382250ce9e"
|
|
29
29
|
}
|
|
@@ -269,13 +269,28 @@ export default class ContentLayout extends LightningElement {
|
|
|
269
269
|
});
|
|
270
270
|
|
|
271
271
|
// Adjusting the right nav bar on scroll.
|
|
272
|
+
// setting maxheight to make the RNB scrollable based on different parent elements
|
|
272
273
|
if (rightNavBarEl) {
|
|
273
|
-
|
|
274
|
-
?
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
274
|
+
const docPhaseElHeight = docPhaseEl
|
|
275
|
+
? docPhaseEl.getBoundingClientRect().height
|
|
276
|
+
: 0;
|
|
277
|
+
const viewportHeight = window.innerHeight;
|
|
278
|
+
const maxHeight =
|
|
279
|
+
viewportHeight -
|
|
280
|
+
(docPhaseElHeight + totalHeaderHeight + 24); //added some margin of dx-toc
|
|
281
|
+
|
|
282
|
+
rightNavBarEl.style.top = `${
|
|
283
|
+
totalHeaderHeight + docPhaseElHeight
|
|
284
|
+
}px`;
|
|
285
|
+
|
|
286
|
+
const toc = rightNavBarEl.querySelector("dx-toc");
|
|
287
|
+
const listContainer = toc?.shadowRoot?.querySelector(
|
|
288
|
+
".toc"
|
|
289
|
+
) as HTMLElement;
|
|
290
|
+
|
|
291
|
+
if (listContainer) {
|
|
292
|
+
listContainer.style.maxHeight = `${maxHeight}px`;
|
|
293
|
+
}
|
|
279
294
|
}
|
|
280
295
|
|
|
281
296
|
// If doc phase element exists, we need to account for its sticky position. Mobile should include the sidebar height (since it becomes sticky aswell).
|