@salesforcedevs/docs-components 1.27.22-banner0 → 1.27.22-banner01
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/lwc.config.json
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@salesforcedevs/docs-components",
|
|
3
|
-
"version": "1.27.22-
|
|
3
|
+
"version": "1.27.22-banner01",
|
|
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": "9302d6aa4fcebf9c496cf28688fd76e3392c31a7"
|
|
29
29
|
}
|
|
@@ -280,9 +280,6 @@ export default class ContentLayout extends LightningElement {
|
|
|
280
280
|
".sticky-doc-header"
|
|
281
281
|
) as HTMLElement;
|
|
282
282
|
|
|
283
|
-
const localeBannerWrapper = this.template.querySelector(
|
|
284
|
-
".locale-notification-wrapper"
|
|
285
|
-
) as HTMLElement;
|
|
286
283
|
const docPhaseWrapper = this.template.querySelector(
|
|
287
284
|
".doc-phase-wrapper"
|
|
288
285
|
) as HTMLElement;
|
|
@@ -290,12 +287,6 @@ export default class ContentLayout extends LightningElement {
|
|
|
290
287
|
".version-wrapper"
|
|
291
288
|
) as HTMLElement;
|
|
292
289
|
|
|
293
|
-
const localeBannerSlot = localeBannerWrapper?.querySelector(
|
|
294
|
-
"[name=locale-banner]"
|
|
295
|
-
) as HTMLSlotElement | null;
|
|
296
|
-
const localeBannerEl = localeBannerSlot?.assignedElements?.()[0] as
|
|
297
|
-
| HTMLElement
|
|
298
|
-
| undefined;
|
|
299
290
|
const docPhaseEl = (
|
|
300
291
|
docPhaseWrapper.querySelector("[name=doc-phase]")! as any
|
|
301
292
|
).assignedElements()[0] as HTMLSlotElement;
|
|
@@ -318,12 +309,6 @@ export default class ContentLayout extends LightningElement {
|
|
|
318
309
|
const docHeaderHeight = docHeaderEl.getBoundingClientRect().height;
|
|
319
310
|
const totalHeaderHeight = globalNavHeight + docHeaderHeight;
|
|
320
311
|
|
|
321
|
-
const localeBannerHeight = localeBannerEl?.offsetHeight ?? 0;
|
|
322
|
-
const docPhaseElHeight =
|
|
323
|
-
(docPhaseEl?.getBoundingClientRect?.()?.height ?? 0) +
|
|
324
|
-
(verBannerEl?.getBoundingClientRect?.()?.height ?? 0);
|
|
325
|
-
const totalBannerHeight = localeBannerHeight + docPhaseElHeight;
|
|
326
|
-
|
|
327
312
|
// Selecting the doc section heading and RNB here.
|
|
328
313
|
const docHeadingEls = Array.from(
|
|
329
314
|
document.querySelectorAll("doc-heading")
|
|
@@ -340,10 +325,15 @@ export default class ContentLayout extends LightningElement {
|
|
|
340
325
|
`${globalNavHeight}px`
|
|
341
326
|
);
|
|
342
327
|
|
|
328
|
+
const docPhaseElHeight =
|
|
329
|
+
docPhaseEl || verBannerEl
|
|
330
|
+
? (docPhaseEl || verBannerEl).getBoundingClientRect().height
|
|
331
|
+
: 0;
|
|
332
|
+
|
|
343
333
|
// Adjusting the doc section heading on scroll.
|
|
344
334
|
docHeadingEls.forEach((docHeadingEl) => {
|
|
345
335
|
(docHeadingEl as any).style.scrollMarginTop = `${
|
|
346
|
-
totalHeaderHeight +
|
|
336
|
+
totalHeaderHeight + docPhaseElHeight + 40
|
|
347
337
|
}px`;
|
|
348
338
|
});
|
|
349
339
|
|
|
@@ -353,10 +343,10 @@ export default class ContentLayout extends LightningElement {
|
|
|
353
343
|
const viewportHeight = window.innerHeight;
|
|
354
344
|
const maxHeight =
|
|
355
345
|
viewportHeight -
|
|
356
|
-
(
|
|
346
|
+
(docPhaseElHeight + totalHeaderHeight + 24); //added some margin of dx-toc
|
|
357
347
|
|
|
358
348
|
rightNavBarEl.style.top = `${
|
|
359
|
-
totalHeaderHeight +
|
|
349
|
+
totalHeaderHeight + docPhaseElHeight
|
|
360
350
|
}px`;
|
|
361
351
|
|
|
362
352
|
const toc = rightNavBarEl.querySelector("dx-toc");
|
|
@@ -534,22 +524,13 @@ export default class ContentLayout extends LightningElement {
|
|
|
534
524
|
globalNavEl?.offsetHeight +
|
|
535
525
|
contextNavEl?.offsetHeight;
|
|
536
526
|
|
|
537
|
-
const localeBannerWrapper = this.template.querySelector(
|
|
538
|
-
".locale-notification-wrapper"
|
|
539
|
-
) as HTMLElement;
|
|
540
|
-
const localeBannerSlot = localeBannerWrapper?.querySelector(
|
|
541
|
-
"[name=locale-banner]"
|
|
542
|
-
) as HTMLSlotElement | null;
|
|
543
|
-
const localeBannerEl = localeBannerSlot?.assignedElements?.()[0] as
|
|
544
|
-
| HTMLElement
|
|
545
|
-
| undefined;
|
|
546
527
|
const docPhaseEl = (
|
|
547
528
|
this.template.querySelector("[name=doc-phase]")! as any
|
|
548
529
|
).assignedElements()[0] as HTMLSlotElement;
|
|
549
530
|
|
|
550
|
-
const
|
|
551
|
-
|
|
552
|
-
|
|
531
|
+
const offset = docPhaseEl
|
|
532
|
+
? headerHeight + docPhaseEl.offsetHeight
|
|
533
|
+
: headerHeight;
|
|
553
534
|
|
|
554
535
|
for (const headingElement of headingElements as any) {
|
|
555
536
|
if (headingElement.getAttribute("id") === hash) {
|