@salesforcedevs/docs-components 1.28.7-alpha.8 → 1.28.7-alpha.9
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.28.7-alpha.
|
|
3
|
+
"version": "1.28.7-alpha.9",
|
|
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": "c742ad7d26b81c3e78806e5dc0641c23c640f898"
|
|
29
29
|
}
|
|
@@ -1,32 +1,34 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div class="content">
|
|
3
|
-
<
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
3
|
+
<template lwc:if={showDataCloudSidebar}>
|
|
4
|
+
<dx-sidebar
|
|
5
|
+
class="is-sticky left-nav-bar"
|
|
6
|
+
trees={sidebarContent}
|
|
7
|
+
value={sidebarValue}
|
|
8
|
+
header={sidebarHeader}
|
|
9
|
+
ontogglesidebar={onToggleSidebar}
|
|
10
|
+
>
|
|
11
|
+
<slot name="sidebar-header" slot="version-picker"></slot>
|
|
12
|
+
</dx-sidebar>
|
|
13
|
+
</template>
|
|
14
|
+
<template lwc:if={showOldSidebar}>
|
|
15
|
+
<dx-sidebar-old
|
|
16
|
+
class="is-sticky left-nav-bar"
|
|
17
|
+
trees={sidebarContent}
|
|
18
|
+
value={sidebarValue}
|
|
19
|
+
header={sidebarHeader}
|
|
20
|
+
ontogglesidebar={onToggleSidebar}
|
|
21
|
+
languages={languages}
|
|
22
|
+
language={language}
|
|
23
|
+
bail-href={bailHref}
|
|
24
|
+
bail-label={bailLabel}
|
|
25
|
+
dev-center={devCenter}
|
|
26
|
+
brand={brand}
|
|
27
|
+
empty-state-message={emptyStateMessage}
|
|
28
|
+
>
|
|
29
|
+
<slot name="sidebar-header" slot="version-picker"></slot>
|
|
30
|
+
</dx-sidebar-old>
|
|
31
|
+
</template>
|
|
30
32
|
<div class="content-body-doc-phase-container">
|
|
31
33
|
<div class="doc-phase-wrapper">
|
|
32
34
|
<slot name="doc-phase"></slot>
|
|
@@ -114,6 +114,13 @@ export default class ContentLayout extends LightningElement {
|
|
|
114
114
|
return !this.useOldSidebar && this.hasDataCloudResults === true;
|
|
115
115
|
}
|
|
116
116
|
|
|
117
|
+
/** Show legacy sidebar when explicitly requested or when Data Cloud has no results. Don't show until we know (avoids flash). */
|
|
118
|
+
protected get showOldSidebar(): boolean {
|
|
119
|
+
return (
|
|
120
|
+
this.useOldSidebar === true || this.hasDataCloudResults === false
|
|
121
|
+
);
|
|
122
|
+
}
|
|
123
|
+
|
|
117
124
|
@track
|
|
118
125
|
protected _sidebarContent: unknown;
|
|
119
126
|
|
|
@@ -271,7 +278,9 @@ export default class ContentLayout extends LightningElement {
|
|
|
271
278
|
We have to account for the global nav changing height due to animations.
|
|
272
279
|
*/
|
|
273
280
|
adjustNavPosition = () => {
|
|
274
|
-
const sidebarEl =
|
|
281
|
+
const sidebarEl =
|
|
282
|
+
this.template.querySelector("dx-sidebar") ||
|
|
283
|
+
this.template.querySelector("dx-sidebar-old");
|
|
275
284
|
const globalNavEl = document.querySelector(
|
|
276
285
|
"hgf-c360nav"
|
|
277
286
|
) as HTMLElement;
|