@salesforcedevs/docs-components 1.3.127 → 1.3.130
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.3.
|
|
3
|
+
"version": "1.3.130",
|
|
4
4
|
"description": "Docs Lightning web components for DSC",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"main": "index.js",
|
|
@@ -24,5 +24,5 @@
|
|
|
24
24
|
"@types/lodash.orderby": "^4.6.7",
|
|
25
25
|
"@types/lodash.uniqby": "^4.7.7"
|
|
26
26
|
},
|
|
27
|
-
"gitHead": "
|
|
27
|
+
"gitHead": "cd52db111aee7bb881d15862490c5c07463acb3b"
|
|
28
28
|
}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
/* eslint-disable @lwc/lwc/no-document-query */
|
|
1
2
|
import { LightningElement, api, track } from "lwc";
|
|
2
3
|
import { closest } from "kagekiri";
|
|
3
4
|
import { toJson } from "dxUtils/normalizers";
|
|
@@ -204,7 +205,10 @@ export default class ContentLayout extends LightningElement {
|
|
|
204
205
|
const docHeaderEl = document.querySelector(
|
|
205
206
|
".sticky-doc-header"
|
|
206
207
|
) as HTMLElement;
|
|
207
|
-
|
|
208
|
+
|
|
209
|
+
const docPhaseEl = this.template
|
|
210
|
+
.querySelector("[name=doc-phase]")!
|
|
211
|
+
.assignedElements()[0] as HTMLSlotElement;
|
|
208
212
|
|
|
209
213
|
if (!sidebarEl || !globalNavEl || !contextNavEl || !docHeaderEl) {
|
|
210
214
|
console.warn("One or more required elements are missing.");
|
|
@@ -237,6 +241,30 @@ export default class ContentLayout extends LightningElement {
|
|
|
237
241
|
: globalNavHeight + docHeaderHeight
|
|
238
242
|
}px`
|
|
239
243
|
);
|
|
244
|
+
|
|
245
|
+
// Adjust scroll margin for doc headings when doc phase is present
|
|
246
|
+
const docHeadingEls = Array.from(
|
|
247
|
+
document.querySelectorAll("doc-heading")
|
|
248
|
+
);
|
|
249
|
+
docHeadingEls.forEach((docHeadingEl) => {
|
|
250
|
+
docHeadingEl.style.scrollMarginTop = `${
|
|
251
|
+
globalNavHeight +
|
|
252
|
+
docHeaderHeight +
|
|
253
|
+
docPhaseEl.offsetHeight
|
|
254
|
+
}px`;
|
|
255
|
+
});
|
|
256
|
+
|
|
257
|
+
// Adjust right nav bar position when doc phase is present
|
|
258
|
+
const rightNavBarEl =
|
|
259
|
+
this.template.querySelector(".right-nav-bar");
|
|
260
|
+
|
|
261
|
+
if (rightNavBarEl) {
|
|
262
|
+
rightNavBarEl.style.top = `${
|
|
263
|
+
globalNavHeight +
|
|
264
|
+
docHeaderHeight +
|
|
265
|
+
docPhaseEl.offsetHeight
|
|
266
|
+
}px`;
|
|
267
|
+
}
|
|
240
268
|
}
|
|
241
269
|
});
|
|
242
270
|
};
|
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
:host {
|
|
6
6
|
--doc-c-phase-top: 0;
|
|
7
|
+
--doc-c-phase-container-align-items: flex-start;
|
|
7
8
|
|
|
8
9
|
position: sticky;
|
|
9
10
|
top: var(--doc-c-phase-top);
|
|
@@ -15,32 +16,25 @@
|
|
|
15
16
|
.doc-phase-container {
|
|
16
17
|
display: flex;
|
|
17
18
|
flex-direction: column;
|
|
18
|
-
align-items:
|
|
19
|
+
align-items: var(--doc-c-phase-container-align-items);
|
|
19
20
|
padding-left: var(--dx-g-global-header-padding-horizontal);
|
|
20
21
|
padding-right: var(--dx-g-global-header-padding-horizontal);
|
|
21
22
|
width: 100%;
|
|
22
23
|
border: none;
|
|
23
24
|
}
|
|
24
25
|
|
|
25
|
-
.max-width-container {
|
|
26
|
-
max-width: var(--dx-g-doc-content-body-max-width);
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
.doc-phase-max-width-large .max-width-container {
|
|
30
|
-
max-width: var(--dx-g-doc-content-max-width);
|
|
31
|
-
}
|
|
32
|
-
|
|
33
26
|
.doc-phase-title-container {
|
|
34
27
|
display: flex;
|
|
35
28
|
flex-direction: row;
|
|
36
29
|
align-items: center;
|
|
30
|
+
width: 100%;
|
|
37
31
|
}
|
|
38
32
|
|
|
39
33
|
dx-button {
|
|
40
34
|
margin-left: auto;
|
|
41
35
|
}
|
|
42
36
|
|
|
43
|
-
/*
|
|
37
|
+
/*
|
|
44
38
|
NOTE: Here we are assuming that indicator height won't go beyond 1000px.
|
|
45
39
|
|
|
46
40
|
It's one of the suggested way to achieve the expand/collapse animation
|
|
@@ -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
|
|