@salesforcedevs/docs-components 1.3.127-alpha.0 → 1.3.130-alpha.0
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
|
@@ -92,9 +92,6 @@ export default class ContentLayout extends LightningElement {
|
|
|
92
92
|
|
|
93
93
|
private searchSyncer = new SearchSyncer({
|
|
94
94
|
callbacks: {
|
|
95
|
-
onUrlChange: (nextSearchString: string): void => {
|
|
96
|
-
this.updateHighlightsAndSearch(nextSearchString);
|
|
97
|
-
},
|
|
98
95
|
onSearchChange: (nextSearchString: string): void => {
|
|
99
96
|
this.dispatchHighlightChange(
|
|
100
97
|
new URLSearchParams(nextSearchString).get("q") || ""
|
|
@@ -242,6 +239,19 @@ export default class ContentLayout extends LightningElement {
|
|
|
242
239
|
}px`
|
|
243
240
|
);
|
|
244
241
|
|
|
242
|
+
// Adjust scroll margin for doc headings when doc phase is present
|
|
243
|
+
const docHeadingEls = Array.from(
|
|
244
|
+
document.querySelectorAll("doc-heading")
|
|
245
|
+
);
|
|
246
|
+
docHeadingEls.forEach((docHeadingEl) => {
|
|
247
|
+
docHeadingEl.style.scrollMarginTop = `${
|
|
248
|
+
globalNavHeight +
|
|
249
|
+
docHeaderHeight +
|
|
250
|
+
docPhaseEl.offsetHeight
|
|
251
|
+
}px`;
|
|
252
|
+
});
|
|
253
|
+
|
|
254
|
+
// Adjust right nav bar position when doc phase is present
|
|
245
255
|
const rightNavBarEl =
|
|
246
256
|
this.template.querySelector(".right-nav-bar");
|
|
247
257
|
|
|
@@ -267,15 +277,25 @@ export default class ContentLayout extends LightningElement {
|
|
|
267
277
|
return;
|
|
268
278
|
}
|
|
269
279
|
this.disconnectObserver();
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
)
|
|
277
|
-
|
|
278
|
-
|
|
280
|
+
|
|
281
|
+
const globalNavOffset = `-${getComputedStyle(
|
|
282
|
+
document.documentElement
|
|
283
|
+
).getPropertyValue("--dx-g-doc-header-main-nav-height")}`;
|
|
284
|
+
|
|
285
|
+
this.observer = new IntersectionObserver(
|
|
286
|
+
(entries) => {
|
|
287
|
+
entries.forEach(
|
|
288
|
+
(entry) =>
|
|
289
|
+
(this.anchoredElements[
|
|
290
|
+
entry.target.getAttribute("id")
|
|
291
|
+
].intersect = entry.isIntersecting)
|
|
292
|
+
);
|
|
293
|
+
this.calculateActualSection();
|
|
294
|
+
},
|
|
295
|
+
{
|
|
296
|
+
rootMargin: globalNavOffset.trim()
|
|
297
|
+
}
|
|
298
|
+
);
|
|
279
299
|
|
|
280
300
|
// Note: We are doing document.querySelectorAll as a quick fix as we are not getting heading elements reference this.querySelectorAll
|
|
281
301
|
const headingElements = document.querySelectorAll(TOC_HEADER_TAG);
|
|
@@ -294,10 +314,6 @@ export default class ContentLayout extends LightningElement {
|
|
|
294
314
|
}
|
|
295
315
|
};
|
|
296
316
|
|
|
297
|
-
onSidebarClick() {
|
|
298
|
-
this.resetScrollThreshold();
|
|
299
|
-
}
|
|
300
|
-
|
|
301
317
|
onSlotChange(event: Event): void {
|
|
302
318
|
const slotElements = (
|
|
303
319
|
event.target as HTMLSlotElement
|
|
@@ -23,18 +23,11 @@
|
|
|
23
23
|
border: none;
|
|
24
24
|
}
|
|
25
25
|
|
|
26
|
-
.max-width-container {
|
|
27
|
-
max-width: var(--dx-g-doc-content-body-max-width);
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
.doc-phase-max-width-large .max-width-container {
|
|
31
|
-
max-width: var(--dx-g-doc-content-max-width);
|
|
32
|
-
}
|
|
33
|
-
|
|
34
26
|
.doc-phase-title-container {
|
|
35
27
|
display: flex;
|
|
36
28
|
flex-direction: row;
|
|
37
29
|
align-items: center;
|
|
30
|
+
width: 100%;
|
|
38
31
|
}
|
|
39
32
|
|
|
40
33
|
dx-button {
|
|
@@ -1,30 +1,28 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div class={className} part="container">
|
|
3
|
-
<div class="
|
|
4
|
-
<
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
<!--
|
|
3
|
+
<div class="doc-phase-title-container">
|
|
4
|
+
<dx-icon
|
|
5
|
+
class="doc-status-icon doc-phase-icon"
|
|
6
|
+
symbol="recipe"
|
|
7
|
+
size="large"
|
|
8
|
+
color="status-icon-color"
|
|
9
|
+
></dx-icon>
|
|
10
|
+
<p class="doc-status-title doc-phase-title dx-text-body-3">
|
|
11
|
+
{docPhaseTitle}
|
|
12
|
+
</p>
|
|
13
|
+
<dx-button
|
|
14
|
+
variant="inline"
|
|
15
|
+
onclick={onButtonClick}
|
|
16
|
+
aria-label={hideBodyText}
|
|
17
|
+
>
|
|
18
|
+
{hideBodyText}
|
|
19
|
+
</dx-button>
|
|
20
|
+
</div>
|
|
21
|
+
<!--
|
|
23
22
|
NOTE: Here we are rendering mark up using lwc:dom & innerHTML
|
|
24
23
|
option instead of slots because the html markup will come as a
|
|
25
24
|
property to the component from a configuration
|
|
26
25
|
-->
|
|
27
|
-
|
|
28
|
-
</div>
|
|
26
|
+
<span lwc:dom="manual" class={bodyClassName}></span>
|
|
29
27
|
</div>
|
|
30
28
|
</template>
|
|
@@ -9,9 +9,6 @@ export default class Phase extends LightningElement {
|
|
|
9
9
|
|
|
10
10
|
isBodyHidden = false;
|
|
11
11
|
|
|
12
|
-
@api
|
|
13
|
-
maxWidthSize: "small" | "large" = "small";
|
|
14
|
-
|
|
15
12
|
get docPhaseTitle() {
|
|
16
13
|
return this.docPhaseInfo?.title;
|
|
17
14
|
}
|
|
@@ -33,8 +30,7 @@ export default class Phase extends LightningElement {
|
|
|
33
30
|
return cx(
|
|
34
31
|
"doc-status-base",
|
|
35
32
|
"doc-status-container",
|
|
36
|
-
"doc-phase-container"
|
|
37
|
-
`doc-phase-max-width-${this.maxWidthSize}`
|
|
33
|
+
"doc-phase-container"
|
|
38
34
|
);
|
|
39
35
|
}
|
|
40
36
|
|