@salesforcedevs/docs-components 1.27.19 → 1.27.21-alpha
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 +28 -28
- 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/LICENSE +0 -12
package/package.json
CHANGED
|
@@ -1,29 +1,29 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
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
|
-
}
|
|
2
|
+
"name": "@salesforcedevs/docs-components",
|
|
3
|
+
"version": "1.27.21-alpha",
|
|
4
|
+
"description": "Docs Lightning web components for DSC",
|
|
5
|
+
"license": "MIT",
|
|
6
|
+
"main": "index.js",
|
|
7
|
+
"engines": {
|
|
8
|
+
"node": "20.x"
|
|
9
|
+
},
|
|
10
|
+
"publishConfig": {
|
|
11
|
+
"access": "public"
|
|
12
|
+
},
|
|
13
|
+
"dependencies": {
|
|
14
|
+
"@api-components/amf-helper-mixin": "4.5.29",
|
|
15
|
+
"classnames": "2.5.1",
|
|
16
|
+
"dompurify": "3.2.4",
|
|
17
|
+
"kagekiri": "1.4.2",
|
|
18
|
+
"lodash.orderby": "4.6.0",
|
|
19
|
+
"lodash.uniqby": "4.7.0",
|
|
20
|
+
"query-string": "7.1.3",
|
|
21
|
+
"sentence-case": "3.0.4"
|
|
22
|
+
},
|
|
23
|
+
"devDependencies": {
|
|
24
|
+
"@types/classnames": "2.3.1",
|
|
25
|
+
"@types/lodash.orderby": "4.6.9",
|
|
26
|
+
"@types/lodash.uniqby": "4.7.9"
|
|
27
|
+
},
|
|
28
|
+
"gitHead": "4629fdd9ca18a13480044ad43515b91945d16aad"
|
|
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;
|
package/LICENSE
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
Copyright (c) 2020, Salesforce.com, Inc.
|
|
2
|
-
All rights reserved.
|
|
3
|
-
|
|
4
|
-
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
|
|
5
|
-
|
|
6
|
-
* Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
|
|
7
|
-
|
|
8
|
-
* Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
|
|
9
|
-
|
|
10
|
-
* Neither the name of Salesforce.com nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
|
|
11
|
-
|
|
12
|
-
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|