@salesforcedevs/docs-components 1.27.19 → 1.27.20

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.27.19",
3
+ "version": "1.27.20",
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": "e8a07ec5b69da0c6e7f65c2da19e6d6a64573047"
28
+ "gitHead": "60eb447eed07d2493cf56436f267fab0d95e48fb"
29
29
  }
@@ -18,6 +18,7 @@
18
18
  language={language}
19
19
  show-footer={enableFooter}
20
20
  empty-state-message={emptyStateMessage}
21
+ origin={origin}
21
22
  >
22
23
  <doc-phase
23
24
  slot="doc-phase"
@@ -50,6 +50,9 @@ export default class AmfReference extends LightningElement {
50
50
  @api languages!: OptionWithLink[];
51
51
  @api language!: string;
52
52
  @api hideFooter = false;
53
+
54
+ /** Optional origin URL for the footer MFE (e.g. wp-json endpoint). Passed through to dx-footer-mfe. */
55
+ @api origin: string | null = null;
53
56
  @track navigation = [] as NavigationItem[];
54
57
  @track versions: Array<ReferenceVersion> = [];
55
58
  @track showVersionBanner = false;
@@ -66,7 +66,10 @@
66
66
  </div>
67
67
  </div>
68
68
  <div lwc:if={showFooter} class="footer-container">
69
- <dx-footer variant="no-signup"></dx-footer>
69
+ <dx-footer
70
+ variant="no-signup"
71
+ mfe-config-origin={effectiveFooterOrigin}
72
+ ></dx-footer>
70
73
  </div>
71
74
  </div>
72
75
  </div>
@@ -56,6 +56,9 @@ export default class ContentLayout extends LightningElement {
56
56
  /** Optional Twitter "via" handle (e.g. SalesforceDevs) passed through to doc-social-share. */
57
57
  @api shareTwitterVia: string | null = null;
58
58
 
59
+ /** Optional origin URL for the footer MFE (e.g. wp-json endpoint). Passed through to dx-footer. */
60
+ @api origin: string | null = null;
61
+
59
62
  @api
60
63
  get breadcrumbs() {
61
64
  return this._breadcrumbs;
@@ -163,6 +166,13 @@ export default class ContentLayout extends LightningElement {
163
166
  return this.readingTime != null && this.readingTime > 1;
164
167
  }
165
168
 
169
+ /** When origin is provided, pass it to the footer; otherwise use dx-footer's default. */
170
+ get effectiveFooterOrigin(): string {
171
+ return (
172
+ this.origin ?? `${window.location.origin}/developer/en-us/wp-json`
173
+ );
174
+ }
175
+
166
176
  connectedCallback(): void {
167
177
  const hasParentHighlightListener = closest(
168
178
  "doc-xml-content",
@@ -13,6 +13,7 @@
13
13
  bail-label={sidebarFooterContent.bailLabel}
14
14
  show-footer={enableFooter}
15
15
  reading-time={computedReadingTime}
16
+ origin={origin}
16
17
  >
17
18
  <doc-phase
18
19
  slot="version-banner"
@@ -45,6 +45,9 @@ export default class DocXmlContent extends LightningElementWithState<{
45
45
  /** Optional Twitter "via" handle (e.g. SalesforceDevs) for social share. */
46
46
  @api twitterVia: string | null = null;
47
47
 
48
+ /** Optional origin URL for the footer MFE (e.g. wp-json endpoint). Passed through to dx-footer-mfe. */
49
+ @api origin: string | null = null;
50
+
48
51
  @api
49
52
  get allLanguages(): Array<Language> {
50
53
  return this._allLanguages;