@salesforcedevs/docs-components 1.3.194-docfooter9-alpha → 1.3.194-langpicker2-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 +1 -1
- package/src/modules/doc/amfReference/amfReference.html +2 -0
- package/src/modules/doc/amfReference/amfReference.ts +3 -0
- package/src/modules/doc/contentLayout/contentLayout.css +3 -1
- package/src/modules/doc/contentLayout/contentLayout.html +2 -0
- package/src/modules/doc/contentLayout/contentLayout.ts +23 -0
package/package.json
CHANGED
|
@@ -4,6 +4,7 @@ import { sentenceCase } from "sentence-case";
|
|
|
4
4
|
import qs from "query-string";
|
|
5
5
|
import { AmfModelParser } from "doc/amfModelParser";
|
|
6
6
|
import { normalizeBoolean } from "dxUtils/normalizers";
|
|
7
|
+
import type { OptionWithLink } from "typings/custom";
|
|
7
8
|
import type {
|
|
8
9
|
AmfConfig,
|
|
9
10
|
AmfMetadataTopic,
|
|
@@ -48,6 +49,8 @@ export default class AmfReference extends LightningElement {
|
|
|
48
49
|
@api useOldSidebar: boolean = false;
|
|
49
50
|
@api tocTitle?: string;
|
|
50
51
|
@api tocOptions?: string;
|
|
52
|
+
@api languages!: OptionWithLink[];
|
|
53
|
+
@api language!: string;
|
|
51
54
|
@track navigation = [] as NavigationItem[];
|
|
52
55
|
@track versions: Array<ReferenceVersion> = [];
|
|
53
56
|
@track showVersionBanner = false;
|
|
@@ -61,7 +61,9 @@ dx-toc {
|
|
|
61
61
|
flex-direction: row;
|
|
62
62
|
justify-content: center;
|
|
63
63
|
max-width: var(--dx-g-doc-content-max-width);
|
|
64
|
-
|
|
64
|
+
|
|
65
|
+
/* Derived this manually by substracting (topHeader, doc header, banner and the content). */
|
|
66
|
+
min-height: 62vh;
|
|
65
67
|
margin: auto;
|
|
66
68
|
padding: 0 var(--dx-g-global-header-padding-horizontal);
|
|
67
69
|
margin-bottom: calc(2 * (var(--dx-g-spacing-5xl) + 4px));
|
|
@@ -4,6 +4,7 @@ import { closest } from "kagekiri";
|
|
|
4
4
|
import { toJson } from "dxUtils/normalizers";
|
|
5
5
|
import { highlightTerms } from "dxUtils/highlight";
|
|
6
6
|
import { SearchSyncer } from "docUtils/searchSyncer";
|
|
7
|
+
import type { OptionWithLink } from "typings/custom";
|
|
7
8
|
|
|
8
9
|
type AnchorMap = { [key: string]: { intersect: boolean; id: string } };
|
|
9
10
|
|
|
@@ -73,6 +74,26 @@ export default class ContentLayout extends LightningElement {
|
|
|
73
74
|
);
|
|
74
75
|
}
|
|
75
76
|
|
|
77
|
+
@api
|
|
78
|
+
get languages() {
|
|
79
|
+
return this._languages;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
set languages(value) {
|
|
83
|
+
this._languages = toJson(value);
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
@api
|
|
87
|
+
get language() {
|
|
88
|
+
return this._language;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
set language(value) {
|
|
92
|
+
if (this._language !== value) {
|
|
93
|
+
this._language = value;
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
|
|
76
97
|
@track
|
|
77
98
|
private _sidebarContent: unknown;
|
|
78
99
|
|
|
@@ -88,6 +109,8 @@ export default class ContentLayout extends LightningElement {
|
|
|
88
109
|
private hasRendered: boolean = false;
|
|
89
110
|
private contentLoaded: boolean = false;
|
|
90
111
|
private sidebarOpen: boolean = false;
|
|
112
|
+
private _languages!: OptionWithLink[];
|
|
113
|
+
private _language: string | null = null;
|
|
91
114
|
|
|
92
115
|
get shouldDisplayFeedback() {
|
|
93
116
|
return this.contentLoaded && typeof Sprig !== "undefined";
|