@salesforcedevs/docs-components 0.69.1-miles → 0.69.2-miles
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 +1 -1
- package/src/modules/doc/breadcrumbs/breadcrumbs.html +40 -40
- package/src/modules/doc/breadcrumbs/breadcrumbs.ts +1 -1
- package/src/modules/doc/contentLayout/contentLayout.html +3 -1
- package/src/modules/doc/contentLayout/contentLayout.ts +4 -0
- package/src/modules/doc/xmlContent/xmlContent.html +1 -0
- package/src/modules/doc/xmlContent/xmlContent.ts +6 -2
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<nav role="navigation" aria-label={ariaLabel}>
|
|
3
|
-
<template if:
|
|
4
|
-
<template if:
|
|
3
|
+
<template if:true={displayCrumbs}>
|
|
4
|
+
<template if:false={renderSmallVariant}>
|
|
5
5
|
<doc-breadcrumb-item
|
|
6
6
|
analytics-event={analyticsEventName}
|
|
7
7
|
analytics-base-payload={analyticsBasePayload}
|
|
@@ -9,50 +9,50 @@
|
|
|
9
9
|
label={firstCrumb.label}
|
|
10
10
|
></doc-breadcrumb-item>
|
|
11
11
|
<span class="breadcrumb-item_slash">/</span>
|
|
12
|
+
<template if:true={renderDropdown}>
|
|
13
|
+
<dx-dropdown
|
|
14
|
+
if:true={renderDropdown}
|
|
15
|
+
analytics-event={analyticsEventName}
|
|
16
|
+
analytics-base-payload={analyticsBasePayload}
|
|
17
|
+
options={dropdownOptions}
|
|
18
|
+
open-on-hover
|
|
19
|
+
placement="bottom"
|
|
20
|
+
suppress-gtm-nav-headings
|
|
21
|
+
variant="indented"
|
|
22
|
+
width="fit-content"
|
|
23
|
+
>
|
|
24
|
+
<dx-button
|
|
25
|
+
aria-label="Open Breadcrumbs Dropdown"
|
|
26
|
+
icon-size="large"
|
|
27
|
+
icon-symbol="threedots"
|
|
28
|
+
variant="tertiary"
|
|
29
|
+
></dx-button>
|
|
30
|
+
</dx-dropdown>
|
|
31
|
+
<span class="breadcrumb-item_slash">/</span>
|
|
32
|
+
</template>
|
|
33
|
+
<template for:each={breadcrumbItems} for:item="breadcrumb">
|
|
34
|
+
<doc-breadcrumb-item
|
|
35
|
+
analytics-event={analyticsEventName}
|
|
36
|
+
analytics-base-payload={analyticsBasePayload}
|
|
37
|
+
href={breadcrumb.href}
|
|
38
|
+
key={breadcrumb.id}
|
|
39
|
+
label={breadcrumb.label}
|
|
40
|
+
></doc-breadcrumb-item>
|
|
41
|
+
<span class="breadcrumb-item_slash" key={breadcrumb.label}>
|
|
42
|
+
/
|
|
43
|
+
</span>
|
|
44
|
+
</template>
|
|
45
|
+
<doc-breadcrumb-item label={lastCrumb.label}></doc-breadcrumb-item>
|
|
12
46
|
</template>
|
|
13
|
-
<template if:true={
|
|
14
|
-
<dx-dropdown
|
|
15
|
-
if:true={renderDropdown}
|
|
16
|
-
analytics-event={analyticsEventName}
|
|
17
|
-
analytics-base-payload={analyticsBasePayload}
|
|
18
|
-
options={dropdownOptions}
|
|
19
|
-
open-on-hover
|
|
20
|
-
placement="bottom"
|
|
21
|
-
suppress-gtm-nav-headings
|
|
22
|
-
variant="indented"
|
|
23
|
-
width="fit-content"
|
|
24
|
-
>
|
|
25
|
-
<dx-button
|
|
26
|
-
aria-label="Open Breadcrumbs Dropdown"
|
|
27
|
-
icon-size="large"
|
|
28
|
-
icon-symbol="threedots"
|
|
29
|
-
variant="tertiary"
|
|
30
|
-
></dx-button>
|
|
31
|
-
</dx-dropdown>
|
|
32
|
-
<span class="breadcrumb-item_slash">/</span>
|
|
33
|
-
</template>
|
|
34
|
-
<template for:each={breadcrumbItems} for:item="breadcrumb">
|
|
47
|
+
<template if:true={renderSmallVariant}>
|
|
35
48
|
<doc-breadcrumb-item
|
|
36
49
|
analytics-event={analyticsEventName}
|
|
37
50
|
analytics-base-payload={analyticsBasePayload}
|
|
38
|
-
href={
|
|
39
|
-
|
|
40
|
-
|
|
51
|
+
href={lastLinkCrump.href}
|
|
52
|
+
label={lastLinkCrump.label}
|
|
53
|
+
variant="back-arrow"
|
|
41
54
|
></doc-breadcrumb-item>
|
|
42
|
-
<span class="breadcrumb-item_slash" key={breadcrumb.label}>
|
|
43
|
-
/
|
|
44
|
-
</span>
|
|
45
55
|
</template>
|
|
46
|
-
<doc-breadcrumb-item label={lastCrumb.label}></doc-breadcrumb-item>
|
|
47
|
-
</template>
|
|
48
|
-
<template if:true={renderSmallVariant}>
|
|
49
|
-
<doc-breadcrumb-item
|
|
50
|
-
analytics-event={analyticsEventName}
|
|
51
|
-
analytics-base-payload={analyticsBasePayload}
|
|
52
|
-
href={lastLinkCrump.href}
|
|
53
|
-
label={lastLinkCrump.label}
|
|
54
|
-
variant="back-arrow"
|
|
55
|
-
></doc-breadcrumb-item>
|
|
56
56
|
</template>
|
|
57
57
|
</nav>
|
|
58
58
|
</template>
|
|
@@ -32,7 +32,9 @@
|
|
|
32
32
|
if:true={showBreadcrumbs}
|
|
33
33
|
breadcrumbs={breadcrumbs}
|
|
34
34
|
></doc-breadcrumbs>
|
|
35
|
-
<
|
|
35
|
+
<div style={docContentStyle}>
|
|
36
|
+
<slot onslotchange={onSlotChange}></slot>
|
|
37
|
+
</div>
|
|
36
38
|
</div>
|
|
37
39
|
<div class="right-nav-bar is-sticky">
|
|
38
40
|
<dx-toc
|
|
@@ -115,6 +115,10 @@ export default class ContentLayout extends LightningElement {
|
|
|
115
115
|
return this.breadcrumbs != null && (this.breadcrumbs as any[]).length > 1;
|
|
116
116
|
}
|
|
117
117
|
|
|
118
|
+
get docContentStyle(): string {
|
|
119
|
+
return this.showBreadcrumbs ? "" : "margin-top: 48px";
|
|
120
|
+
}
|
|
121
|
+
|
|
118
122
|
connectedCallback(): void {
|
|
119
123
|
const hasParentHighlightListener = closest(
|
|
120
124
|
"doc-xml-content",
|
|
@@ -577,7 +577,11 @@ export default class DocXmlContent extends LightningElementWithState<{
|
|
|
577
577
|
}
|
|
578
578
|
|
|
579
579
|
get showBreadcrumbs(): boolean {
|
|
580
|
-
return this.breadcrumbs && this.breadcrumbs.length >
|
|
580
|
+
return this.breadcrumbs && this.breadcrumbs.length > 1;
|
|
581
|
+
}
|
|
582
|
+
|
|
583
|
+
get docContentStyle(): string {
|
|
584
|
+
return this.showBreadcrumbs ? "" : "margin-top: 48px";
|
|
581
585
|
}
|
|
582
586
|
|
|
583
587
|
private buildBreadcrumbs(): void {
|
|
@@ -588,7 +592,7 @@ export default class DocXmlContent extends LightningElementWithState<{
|
|
|
588
592
|
|
|
589
593
|
const currentNode = this.tocMap[contentDocumentId];
|
|
590
594
|
|
|
591
|
-
if(currentNode
|
|
595
|
+
if(currentNode?.parent) {
|
|
592
596
|
this.breadcrumbs = this.nodeToBreadcrumb(currentNode);
|
|
593
597
|
} else {
|
|
594
598
|
this.breadcrumbs = [];
|