@salesforcedevs/docs-components 1.27.24 → 1.28.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
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@salesforcedevs/docs-components",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.28.0",
|
|
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": "4027270163b2eb9610b911a09bfa31f536061fe4"
|
|
29
29
|
}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { api } from "lwc";
|
|
1
2
|
import ContentLayout from "doc/contentLayout";
|
|
2
3
|
import cx from "classnames";
|
|
3
4
|
|
|
@@ -15,6 +16,16 @@ export default class LwcContentLayout extends ContentLayout {
|
|
|
15
16
|
private allTabsCache: any[] | null = null;
|
|
16
17
|
private mainSlotCache: any = null;
|
|
17
18
|
|
|
19
|
+
/** Optional origin URL for the footer MFE (e.g. wp-json endpoint). Passed through to dx-footer. */
|
|
20
|
+
@api origin: string | null = null;
|
|
21
|
+
|
|
22
|
+
/** When origin is provided, pass it to the footer; otherwise use dx-footer's default. */
|
|
23
|
+
get effectiveFooterOrigin(): string {
|
|
24
|
+
return (
|
|
25
|
+
this.origin ?? `${window.location.origin}/developer/en-us/wp-json`
|
|
26
|
+
);
|
|
27
|
+
}
|
|
28
|
+
|
|
18
29
|
private setRNBByTab() {
|
|
19
30
|
const tabPanelListItem = this.getTabPanelList();
|
|
20
31
|
this.rnbByTab = tabPanelListItem?.id === RNB_BY_TAB;
|
|
@@ -68,6 +68,16 @@ export default class RedocReference extends LightningElement {
|
|
|
68
68
|
this._parentDocPhaseInfo = value;
|
|
69
69
|
}
|
|
70
70
|
|
|
71
|
+
/** Optional origin URL for the footer MFE (e.g. wp-json endpoint). Passed through to dx-footer. */
|
|
72
|
+
@api origin: string | null = null;
|
|
73
|
+
|
|
74
|
+
/** When origin is provided, pass it to the footer; otherwise use dx-footer's default. */
|
|
75
|
+
get effectiveFooterOrigin(): string {
|
|
76
|
+
return (
|
|
77
|
+
this.origin ?? `${window.location.origin}/developer/en-us/wp-json`
|
|
78
|
+
);
|
|
79
|
+
}
|
|
80
|
+
|
|
71
81
|
connectedCallback(): void {
|
|
72
82
|
window.addEventListener("scroll", this.handleScrollAndResize);
|
|
73
83
|
window.addEventListener("resize", this.handleScrollAndResize);
|
|
@@ -338,7 +348,7 @@ export default class RedocReference extends LightningElement {
|
|
|
338
348
|
// Appends footer component to container
|
|
339
349
|
private insertFooter(container: HTMLElement): void {
|
|
340
350
|
const footerElement = createElement("dx-footer", { is: DxFooter });
|
|
341
|
-
Object.assign(footerElement, { variant: "no-signup" });
|
|
351
|
+
Object.assign(footerElement, { variant: "no-signup", mfeConfigOrigin: this.effectiveFooterOrigin });
|
|
342
352
|
container.appendChild(footerElement);
|
|
343
353
|
}
|
|
344
354
|
|