@salesforcedevs/docs-components 1.27.19 → 1.27.21
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 +2 -2
- package/src/modules/doc/amfReference/amfReference.html +1 -0
- package/src/modules/doc/amfReference/amfReference.ts +3 -0
- package/src/modules/doc/contentLayout/contentLayout.html +4 -1
- package/src/modules/doc/contentLayout/contentLayout.ts +19 -2
- package/src/modules/doc/xmlContent/xmlContent.html +1 -0
- package/src/modules/doc/xmlContent/xmlContent.ts +3 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@salesforcedevs/docs-components",
|
|
3
|
-
"version": "1.27.
|
|
3
|
+
"version": "1.27.21",
|
|
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": "bb47c49e52267b9068ff826a16f39364f49e3086"
|
|
29
29
|
}
|
|
@@ -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;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/* eslint-disable @lwc/lwc/no-document-query */
|
|
2
2
|
import { LightningElement, api, track } from "lwc";
|
|
3
3
|
import { closest } from "kagekiri";
|
|
4
|
-
import { toJson } from "dxUtils/normalizers";
|
|
4
|
+
import { toJson, normalizeBoolean } from "dxUtils/normalizers";
|
|
5
5
|
import { highlightTerms } from "dxUtils/highlight";
|
|
6
6
|
import { SearchSyncer } from "docUtils/searchSyncer";
|
|
7
7
|
import type { OptionWithLink } from "typings/custom";
|
|
@@ -43,7 +43,14 @@ export default class ContentLayout extends LightningElement {
|
|
|
43
43
|
@api emptyStateMessage?: string;
|
|
44
44
|
|
|
45
45
|
// This is needed for now to prevent failing snapshot tests due to links in the footer
|
|
46
|
-
@api
|
|
46
|
+
@api
|
|
47
|
+
get showFooter() {
|
|
48
|
+
return this._showFooter;
|
|
49
|
+
}
|
|
50
|
+
set showFooter(value) {
|
|
51
|
+
this._showFooter = normalizeBoolean(value);
|
|
52
|
+
}
|
|
53
|
+
private _showFooter = false;
|
|
47
54
|
|
|
48
55
|
@api readingTime?: number;
|
|
49
56
|
|
|
@@ -56,6 +63,9 @@ export default class ContentLayout extends LightningElement {
|
|
|
56
63
|
/** Optional Twitter "via" handle (e.g. SalesforceDevs) passed through to doc-social-share. */
|
|
57
64
|
@api shareTwitterVia: string | null = null;
|
|
58
65
|
|
|
66
|
+
/** Optional origin URL for the footer MFE (e.g. wp-json endpoint). Passed through to dx-footer. */
|
|
67
|
+
@api origin: string | null = null;
|
|
68
|
+
|
|
59
69
|
@api
|
|
60
70
|
get breadcrumbs() {
|
|
61
71
|
return this._breadcrumbs;
|
|
@@ -163,6 +173,13 @@ export default class ContentLayout extends LightningElement {
|
|
|
163
173
|
return this.readingTime != null && this.readingTime > 1;
|
|
164
174
|
}
|
|
165
175
|
|
|
176
|
+
/** When origin is provided, pass it to the footer; otherwise use dx-footer's default. */
|
|
177
|
+
get effectiveFooterOrigin(): string {
|
|
178
|
+
return (
|
|
179
|
+
this.origin ?? `${window.location.origin}/developer/en-us/wp-json`
|
|
180
|
+
);
|
|
181
|
+
}
|
|
182
|
+
|
|
166
183
|
connectedCallback(): void {
|
|
167
184
|
const hasParentHighlightListener = closest(
|
|
168
185
|
"doc-xml-content",
|
|
@@ -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;
|