@salesforcedevs/docs-components 1.3.2 → 1.3.4-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.
Files changed (74) hide show
  1. package/lwc.config.json +8 -1
  2. package/package.json +13 -13
  3. package/src/modules/doc/{amfReference/utils.ts → amfModelParser/amfModelParser.ts} +10 -5
  4. package/src/modules/doc/amfReference/amfReference.css +23 -3
  5. package/src/modules/doc/amfReference/amfReference.html +34 -21
  6. package/src/modules/doc/amfReference/amfReference.ts +225 -92
  7. package/src/modules/doc/amfReference/types.ts +3 -11
  8. package/src/modules/doc/amfTopic/amfTopic.css +20 -0
  9. package/src/modules/doc/amfTopic/amfTopic.ts +35 -18
  10. package/src/modules/doc/amfTopic/types.ts +15 -13
  11. package/src/modules/doc/amfTopic/utils.ts +12 -6
  12. package/src/modules/doc/breadcrumbItem/breadcrumbItem.ts +17 -10
  13. package/src/modules/doc/breadcrumbs/breadcrumbs.html +7 -9
  14. package/src/modules/doc/breadcrumbs/breadcrumbs.ts +30 -34
  15. package/src/modules/doc/componentPlayground/componentPlayground.css +22 -0
  16. package/src/modules/doc/componentPlayground/componentPlayground.html +15 -0
  17. package/src/modules/doc/componentPlayground/componentPlayground.ts +20 -0
  18. package/src/modules/doc/content/content.css +70 -76
  19. package/src/modules/doc/content/content.ts +18 -14
  20. package/src/modules/doc/contentCallout/contentCallout.css +12 -1
  21. package/src/modules/doc/contentCallout/contentCallout.html +11 -4
  22. package/src/modules/doc/contentCallout/contentCallout.ts +8 -1
  23. package/src/modules/doc/contentLayout/contentLayout.css +1 -98
  24. package/src/modules/doc/contentLayout/contentLayout.html +25 -11
  25. package/src/modules/doc/contentLayout/contentLayout.ts +296 -89
  26. package/src/modules/doc/doDont/doDont.css +47 -0
  27. package/src/modules/doc/doDont/doDont.html +27 -0
  28. package/src/modules/doc/doDont/doDont.ts +17 -0
  29. package/src/modules/doc/header/header.css +65 -36
  30. package/src/modules/doc/header/header.html +40 -146
  31. package/src/modules/doc/header/header.ts +32 -81
  32. package/src/modules/doc/heading/heading.css +16 -37
  33. package/src/modules/doc/heading/heading.html +4 -4
  34. package/src/modules/doc/heading/heading.ts +12 -10
  35. package/src/modules/doc/headingAnchor/headingAnchor.css +2 -2
  36. package/src/modules/doc/headingAnchor/headingAnchor.ts +2 -2
  37. package/src/modules/doc/headingContent/headingContent.css +1 -1
  38. package/src/modules/doc/headingContent/headingContent.html +2 -2
  39. package/src/modules/doc/headingContent/headingContent.ts +2 -2
  40. package/src/modules/doc/lwcContentLayout/lwcContentLayout.css +1 -0
  41. package/src/modules/doc/lwcContentLayout/lwcContentLayout.html +64 -0
  42. package/src/modules/doc/lwcContentLayout/lwcContentLayout.ts +168 -0
  43. package/src/modules/doc/overview/overview.css +40 -0
  44. package/src/modules/doc/overview/overview.html +34 -0
  45. package/src/modules/doc/overview/overview.ts +12 -0
  46. package/src/modules/doc/phase/phase.css +18 -3
  47. package/src/modules/doc/phase/phase.html +12 -2
  48. package/src/modules/doc/phase/phase.ts +44 -8
  49. package/src/modules/doc/specificationContent/specificationContent.css +31 -0
  50. package/src/modules/doc/specificationContent/specificationContent.html +164 -0
  51. package/src/modules/doc/specificationContent/specificationContent.ts +114 -0
  52. package/src/modules/doc/sprigSurvey/sprigSurvey.html +20 -0
  53. package/src/modules/doc/sprigSurvey/sprigSurvey.scoped.css +16 -0
  54. package/src/modules/doc/sprigSurvey/sprigSurvey.ts +16 -0
  55. package/src/modules/doc/toc/toc.html +1 -3
  56. package/src/modules/doc/toc/toc.ts +1 -1
  57. package/src/modules/doc/toolbar/toolbar.ts +6 -6
  58. package/src/modules/doc/versionPicker/versionPicker.css +64 -0
  59. package/src/modules/doc/versionPicker/versionPicker.html +38 -0
  60. package/src/modules/doc/versionPicker/versionPicker.ts +65 -0
  61. package/src/modules/doc/xmlContent/types.ts +9 -3
  62. package/src/modules/doc/xmlContent/utils.ts +3 -1
  63. package/src/modules/doc/xmlContent/xmlContent.css +25 -3
  64. package/src/modules/doc/xmlContent/xmlContent.html +29 -17
  65. package/src/modules/doc/xmlContent/xmlContent.ts +197 -75
  66. package/src/modules/docHelpers/amfStyle/amfStyle.css +6 -6
  67. package/src/modules/docHelpers/contentLayoutStyle/contentLayoutStyle.css +131 -0
  68. package/src/modules/docHelpers/imgStyle/imgStyle.css +59 -0
  69. package/src/modules/docHelpers/status/status.css +1 -1
  70. package/src/modules/docUtils/{SearchSyncer/SearchSyncer.ts → searchSyncer/searchSyncer.ts} +1 -0
  71. package/src/modules/docUtils/utils/utils.ts +32 -0
  72. package/LICENSE +0 -12
  73. package/src/modules/docBaseElements/lightningElementWithState/lightningElementWithState.ts +0 -93
  74. package/src/modules/docHelpers/phaseContentLayout/phaseContentLayout.css +0 -39
@@ -0,0 +1,164 @@
1
+ <template>
2
+ <div class="specification-properties">
3
+ <template lwc:if={hasAttributes}>
4
+ <doc-heading
5
+ header="Attributes"
6
+ hash="attributes"
7
+ aria-level="2"
8
+ id="attributes"
9
+ ></doc-heading>
10
+ <table>
11
+ <thead>
12
+ <tr>
13
+ <th>Name</th>
14
+ <th>Description</th>
15
+ <th>Type</th>
16
+ <th>Default</th>
17
+ <th>Required</th>
18
+ </tr>
19
+ </thead>
20
+ <tbody>
21
+ <template for:each={attributes} for:item="attribute">
22
+ <tr key={attribute.name}>
23
+ <td>
24
+ <span class="code">
25
+ {attribute.nameInKebabCase}
26
+ </span>
27
+ </td>
28
+ <td>{attribute.description}</td>
29
+ <td>{attribute.type}</td>
30
+ <td>{attribute.default}</td>
31
+ <td class="icon-cell">
32
+ <template lwc:if={attribute.required}>
33
+ <dx-icon
34
+ symbol="success"
35
+ size="large"
36
+ color="green-vibrant-65"
37
+ class="icon"
38
+ ></dx-icon>
39
+ </template>
40
+ </td>
41
+ </tr>
42
+ </template>
43
+ </tbody>
44
+ </table>
45
+ </template>
46
+
47
+ <template lwc:if={hasMethods}>
48
+ <doc-heading
49
+ header="Methods"
50
+ hash="methods"
51
+ aria-level="2"
52
+ id="methods"
53
+ ></doc-heading>
54
+ <table>
55
+ <thead>
56
+ <tr>
57
+ <th>Name</th>
58
+ <th>Description</th>
59
+ <th>Argument Name</th>
60
+ <th>Argument Type</th>
61
+ <th>Argument Description</th>
62
+ </tr>
63
+ </thead>
64
+ <tbody>
65
+ <template for:each={processedMethods} for:item="method">
66
+ <template lwc:if={method.firstArgument}>
67
+ <tr key={method.name}>
68
+ <td rowspan={method.arguments.length}>
69
+ <span class="code">
70
+ {method.nameInKebabCase}
71
+ </span>
72
+ </td>
73
+ <td rowspan={method.arguments.length}>
74
+ {method.description}
75
+ </td>
76
+ <td class={method.cssForMultipleArguments}>
77
+ {method.firstArgument.name}
78
+ </td>
79
+ <td>{method.firstArgument.type}</td>
80
+ <td>{method.firstArgument.description}</td>
81
+ </tr>
82
+ <template
83
+ for:each={method.remainingArguments}
84
+ for:item="arg"
85
+ >
86
+ <tr key={arg.name}>
87
+ <td>{arg.name}</td>
88
+ <td>{arg.type}</td>
89
+ <td>{arg.description}</td>
90
+ </tr>
91
+ </template>
92
+ </template>
93
+ <template lwc:else>
94
+ <tr key={method.name}>
95
+ <td>
96
+ <span class="code">
97
+ {method.nameInKebabCase}
98
+ </span>
99
+ </td>
100
+ <td>{method.description}</td>
101
+ <td colspan="3"></td>
102
+ </tr>
103
+ </template>
104
+ </template>
105
+ </tbody>
106
+ </table>
107
+ </template>
108
+
109
+ <template lwc:if={hasSlots}>
110
+ <doc-heading
111
+ header="Slots"
112
+ hash="slots"
113
+ aria-level="2"
114
+ id="slots"
115
+ ></doc-heading>
116
+ <table>
117
+ <thead>
118
+ <tr>
119
+ <th>Name</th>
120
+ <th>Description</th>
121
+ </tr>
122
+ </thead>
123
+ <tbody>
124
+ <template for:each={slots} for:item="slot">
125
+ <tr key={slot.name}>
126
+ <td>
127
+ <span class="code">{slot.nameInKebabCase}</span>
128
+ </td>
129
+ <td>{slot.description}</td>
130
+ </tr>
131
+ </template>
132
+ </tbody>
133
+ </table>
134
+ </template>
135
+
136
+ <template lwc:if={hasEvents}>
137
+ <doc-heading
138
+ header="Events"
139
+ hash="events"
140
+ aria-level="2"
141
+ ></doc-heading>
142
+ <table>
143
+ <thead>
144
+ <tr>
145
+ <th>Name</th>
146
+ <th>Description</th>
147
+ </tr>
148
+ </thead>
149
+ <tbody>
150
+ <template for:each={events} for:item="event">
151
+ <tr key={event.name}>
152
+ <td>
153
+ <span class="code">
154
+ {event.nameInKebabCase}
155
+ </span>
156
+ </td>
157
+ <td>{event.description}</td>
158
+ </tr>
159
+ </template>
160
+ </tbody>
161
+ </table>
162
+ </template>
163
+ </div>
164
+ </template>
@@ -0,0 +1,114 @@
1
+ import { LightningElement, track, api } from "lwc";
2
+ import { Method, Specification } from "typings/custom";
3
+ import debounce from "debounce";
4
+
5
+ export default class SpecificationContent extends LightningElement {
6
+ @track data: any;
7
+ // TODO: added these default values for testing, will drop this once the backend is ready.
8
+ @api component: string = "button";
9
+ @api model: string = "lwc";
10
+ @api namespace: string = "lightning";
11
+
12
+ /* TODO: The actual URL is as follows:
13
+ * http://api.salesforce.com/doc-platform/developer/v1/{type}/{sub-type}/{component-name}
14
+ * Until the API integration is ready, we will go ahead with mocked-router-url.
15
+ */
16
+ @api apiBaseUrl: string =
17
+ "https://cx-mock-router-internal-07a18d7b3f61.herokuapp.com";
18
+
19
+ private attributes: Specification[] = [];
20
+ private methods: Method[] = [];
21
+ private slots: Specification[] = [];
22
+ private events: Specification[] = [];
23
+
24
+ /* TODO: For now setting the timeout to 300ms,
25
+ * post integration with CX-Router API will test and change if required.
26
+ */
27
+ private debouncedNotifyDataRendered = debounce(() => {
28
+ this.notifySpecificationDataRendered();
29
+ }, 300);
30
+
31
+ connectedCallback() {
32
+ this.fetchComponentMetadata();
33
+ }
34
+
35
+ async fetchComponentMetadata() {
36
+ const url = `${this.apiBaseUrl}/${this.model}/${this.namespace}/${this.component}`;
37
+
38
+ try {
39
+ const response = await fetch(url);
40
+
41
+ if (!response.ok) {
42
+ // TODO: Will add loader and show error as follow-up
43
+ throw new Error(`Failed to fetch: ${response.statusText}`);
44
+ }
45
+
46
+ const result = await response.json();
47
+ this.data = result;
48
+ ({
49
+ attributes: this.attributes,
50
+ methods: this.methods,
51
+ slots: this.slots,
52
+ events: this.events
53
+ } = this.data);
54
+ } catch (error) {
55
+ this.data = {};
56
+ console.error("fetchComponentMetadata() failed for:" + url);
57
+ }
58
+ }
59
+
60
+ /**
61
+ * This getter is to preprocess the methods for easier rendering in the template.
62
+ * Each method is augmented with additional properties:
63
+ * - `firstArgument`: The first argument (if any).
64
+ * - `remainingArguments`: All other arguments (if any).
65
+ * - `hasArguments`: A boolean indicating whether the method has arguments or not.
66
+ */
67
+ get processedMethods(): Method[] {
68
+ return this.methods.map((method) => {
69
+ const [firstArgument, ...remainingArguments] =
70
+ method.arguments || [];
71
+ return {
72
+ ...method,
73
+ firstArgument,
74
+ remainingArguments,
75
+ hasArguments: method.arguments && method.arguments.length > 0,
76
+ cssForMultipleArguments:
77
+ remainingArguments.length > 0 ? "left-border" : ""
78
+ };
79
+ });
80
+ }
81
+
82
+ get hasAttributes() {
83
+ return this.attributes?.length > 0;
84
+ }
85
+
86
+ get hasMethods() {
87
+ return this.methods?.length > 0;
88
+ }
89
+
90
+ get hasSlots() {
91
+ return this.slots?.length > 0;
92
+ }
93
+
94
+ get hasEvents() {
95
+ return this.events?.length > 0;
96
+ }
97
+
98
+ renderedCallback(): void {
99
+ if (this.data) {
100
+ this.debouncedNotifyDataRendered();
101
+ }
102
+ }
103
+
104
+ notifySpecificationDataRendered() {
105
+ // Dispatch a custom event to notify the specification tab has rendered.
106
+ this.dispatchEvent(
107
+ new CustomEvent("specificationdatarendered", {
108
+ detail: { name: "doc-specification-content" },
109
+ bubbles: true,
110
+ composed: true
111
+ })
112
+ );
113
+ }
114
+ }
@@ -0,0 +1,20 @@
1
+ <template lwc:render-mode="light">
2
+ <dx-hr no-padding spacing="md"></dx-hr>
3
+ <div class="survey-container">
4
+ <div class="text-container">
5
+ <b>DID THIS ARTICLE SOLVE YOUR ISSUE?</b>
6
+ <br />
7
+ Let us know so we can improve!
8
+ </div>
9
+ <div class="btn-container">
10
+ <dx-button
11
+ variant="secondary"
12
+ aria-label="Share Your Feedback"
13
+ onclick={openSurvey}
14
+ >
15
+ Share your feedback
16
+ </dx-button>
17
+ </div>
18
+ </div>
19
+ <dx-hr no-padding spacing="md"></dx-hr>
20
+ </template>
@@ -0,0 +1,16 @@
1
+ :host .survey-container {
2
+ align-items: center;
3
+ align-content: center;
4
+ width: 100%;
5
+ display: flex;
6
+ flex-direction: row;
7
+ margin: 20px 0;
8
+ }
9
+
10
+ dx-hr:first-of-type::part(hr) {
11
+ margin-top: var(--dx-g-spacing-2xl);
12
+ }
13
+
14
+ .text-container {
15
+ width: 100%;
16
+ }
@@ -0,0 +1,16 @@
1
+ import { LightningElement } from "lwc";
2
+ import cx from "classnames";
3
+
4
+ declare const Sprig: (eventType: string, eventNme: string) => void;
5
+
6
+ export default class Phase extends LightningElement {
7
+ static renderMode = "light";
8
+
9
+ get className() {
10
+ return cx("container");
11
+ }
12
+
13
+ openSurvey() {
14
+ Sprig("track", "ProvideFeedback");
15
+ }
16
+ }
@@ -96,9 +96,7 @@
96
96
  <a
97
97
  href={child5.a_attr.href}
98
98
  data-id={child5.id}
99
- class="
100
- nav1
101
- "
99
+ class="nav1"
102
100
  onclick={handleNavClick}
103
101
  >
104
102
  {child5.text}
@@ -11,7 +11,7 @@ export default class Toc extends LightningElement {
11
11
  const newPageReference = { ...this.pageReference };
12
12
  // When moving to the new navigation component
13
13
  //const target = event.detail.name.split('-')
14
- const target = event.currentTarget.dataset.id.split("-");
14
+ const target = (event.currentTarget as any).dataset.id.split("-");
15
15
  newPageReference.contentDocumentId = target[0] + ".htm";
16
16
  newPageReference.hash = target[1];
17
17
  this.dispatchEvent(
@@ -40,9 +40,9 @@ export default class Toolbar extends LightningElement {
40
40
  "select[name=languages]"
41
41
  ) as HTMLSelectElement;
42
42
  if (languageEl) {
43
- const languageValue = (
44
- languageEl[languageEl.selectedIndex] as HTMLOptionElement
45
- ).value;
43
+ const languageValue = (languageEl[
44
+ languageEl.selectedIndex
45
+ ] as HTMLOptionElement).value;
46
46
  this.dispatchEvent(
47
47
  new CustomEvent("languageselected", {
48
48
  detail: {
@@ -61,9 +61,9 @@ export default class Toolbar extends LightningElement {
61
61
  "select[name=versions]"
62
62
  ) as HTMLSelectElement;
63
63
  if (versionEl) {
64
- const versionValue = (
65
- versionEl[versionEl.selectedIndex] as HTMLOptionElement
66
- ).value;
64
+ const versionValue = (versionEl[
65
+ versionEl.selectedIndex
66
+ ] as HTMLOptionElement).value;
67
67
  this.dispatchEvent(
68
68
  new CustomEvent("versionselected", {
69
69
  detail: {
@@ -0,0 +1,64 @@
1
+ @import "dxHelpers/reset";
2
+
3
+ /* NOTE: doc-version-picker-width width variable is used by both dx-button and dx-dropdown to maintain a consistent width. */
4
+ :host {
5
+ --dx-c-dropdown-option-font-weight: normal;
6
+ --dx-c-dropdown-option-label-color: var(--dx-g-gray-10);
7
+ --popover-container-open-transform: translateY(4px);
8
+ }
9
+
10
+ .version-picker-container {
11
+ padding: 8px var(--dx-g-spacing-lg) 8px
12
+ var(--dx-g-global-header-padding-horizontal);
13
+ border-top: 1px solid var(--dx-g-gray-90);
14
+ border-bottom: 1px solid var(--dx-g-gray-90);
15
+ }
16
+
17
+ .version-picker-button {
18
+ display: flex;
19
+ width: var(--doc-version-picker-width, 296px);
20
+ }
21
+
22
+ .version-picker-button:hover,
23
+ .version-picker-button:active,
24
+ .version-picker-button:focus {
25
+ --dx-c-button-secondary-color-hover: var(--dx-g-cloud-blue-vibrant-95);
26
+ --dx-c-button-primary-color: var(--dx-g-blue-vibrant-40);
27
+ }
28
+
29
+ /**
30
+ * NOTE: This CSS ensures the span inside the button stays within the parent's width, avoiding overflow.
31
+ * Not keeping this in common component to ensure that existing functionality works as it is.
32
+ */
33
+ dx-button::part(content) {
34
+ width: inherit;
35
+ overflow: hidden;
36
+ }
37
+
38
+ .selected-version {
39
+ display: flex;
40
+ flex-direction: row;
41
+ align-items: center;
42
+ }
43
+
44
+ .selected-version-label {
45
+ flex: 1;
46
+ overflow: hidden;
47
+ text-align: left;
48
+ text-overflow: ellipsis;
49
+ white-space: nowrap;
50
+ }
51
+
52
+ dx-type-badge.latest-badge {
53
+ --dx-c-type-badge-color: var(--dx-g-green-vibrant-40);
54
+ --dx-c-type-badge-background: var(--dx-g-green-vibrant-95);
55
+
56
+ margin-left: var(--dx-g-spacing-sm);
57
+ }
58
+
59
+ dx-type-badge.not-latest-badge {
60
+ --dx-c-type-badge-color: var(--dx-g-red-vibrant-40);
61
+ --dx-c-type-badge-background: var(--dx-g-red-vibrant-95);
62
+
63
+ margin-left: var(--dx-g-spacing-sm);
64
+ }
@@ -0,0 +1,38 @@
1
+ <template>
2
+ <div lwc:if={showVersionPicker} class="version-picker-container">
3
+ <dx-dropdown
4
+ options={versions}
5
+ value={selectedVersion.id}
6
+ width="var(--doc-version-picker-width)"
7
+ onchange={onVersionChange}
8
+ >
9
+ <dx-button
10
+ class="version-picker-button"
11
+ variant="tertiary"
12
+ size="small"
13
+ icon-symbol="chevrondown"
14
+ icon-size="medium"
15
+ >
16
+ <div class="selected-version">
17
+ <p class="selected-version-label">
18
+ {selectedVersion.label}
19
+ </p>
20
+ <template lwc:if={showLatestTag}>
21
+ <dx-type-badge
22
+ class="latest-badge"
23
+ lwc:if={latestVersion}
24
+ value="Latest"
25
+ size="small"
26
+ ></dx-type-badge>
27
+ <dx-type-badge
28
+ class="not-latest-badge"
29
+ lwc:else
30
+ value="Not Latest"
31
+ size="small"
32
+ ></dx-type-badge>
33
+ </template>
34
+ </div>
35
+ </dx-button>
36
+ </dx-dropdown>
37
+ </div>
38
+ </template>
@@ -0,0 +1,65 @@
1
+ import { LightningElement, api, track } from "lwc";
2
+
3
+ import { AnalyticsPayload, OptionWithNested } from "typings/custom";
4
+
5
+ import { toJson, normalizeBoolean } from "dxUtils/normalizers";
6
+
7
+ export default class VersionPicker extends LightningElement {
8
+ @api analyticsEvent?: string;
9
+ @api analyticsPayload?: AnalyticsPayload;
10
+
11
+ @track private _versions!: OptionWithNested[];
12
+ private _selectedVersion?: OptionWithNested;
13
+ private _latestVersion: boolean = false;
14
+ private _hideBadge: boolean = false;
15
+
16
+ @api
17
+ get versions() {
18
+ return this._versions;
19
+ }
20
+
21
+ set versions(value: OptionWithNested[]) {
22
+ this._versions = toJson(value);
23
+ }
24
+
25
+ @api
26
+ get selectedVersion(): OptionWithNested | undefined {
27
+ return this._selectedVersion || this.versions[0];
28
+ }
29
+
30
+ set selectedVersion(value: OptionWithNested) {
31
+ if (value) {
32
+ this._selectedVersion = toJson(value);
33
+ }
34
+ }
35
+
36
+ @api
37
+ get latestVersion() {
38
+ return this._latestVersion;
39
+ }
40
+
41
+ set latestVersion(value) {
42
+ this._latestVersion = normalizeBoolean(value);
43
+ }
44
+
45
+ @api
46
+ get hideBadge() {
47
+ return this._hideBadge;
48
+ }
49
+
50
+ set hideBadge(value) {
51
+ this._hideBadge = normalizeBoolean(value);
52
+ }
53
+
54
+ private get showVersionPicker() {
55
+ return this._versions && this._versions.length !== 0;
56
+ }
57
+
58
+ private get showLatestTag(): boolean {
59
+ return !this.hideBadge;
60
+ }
61
+
62
+ private onVersionChange(e: CustomEvent) {
63
+ this.dispatchEvent(new CustomEvent("change", { detail: e.detail }));
64
+ }
65
+ }
@@ -35,6 +35,9 @@ type DropdownOption = {
35
35
  export type DocVersion = DropdownOption & {
36
36
  releaseVersion: string;
37
37
  url: string;
38
+ link?: {
39
+ href: string;
40
+ };
38
41
  };
39
42
 
40
43
  export type DocLanguage = DropdownOption & {
@@ -58,12 +61,15 @@ export type ApiDocLanguage = {
58
61
 
59
62
  export interface Header extends Element {
60
63
  subtitle: string;
64
+ headerHref: string;
65
+ }
66
+
67
+ export type SiderbarFooter = {
61
68
  bailHref: string;
62
69
  bailLabel: string;
63
70
  languages: Array<DocLanguage>;
64
- language: string;
65
- headerHref: string;
66
- }
71
+ language?: string;
72
+ };
67
73
 
68
74
  export type ApiNavItem = {
69
75
  children: Array<ApiNavItem>;
@@ -87,7 +87,9 @@ export class FetchContent {
87
87
  return json;
88
88
  }
89
89
 
90
- private normalizeToc(apiToc: Array<ApiNavItem>): {
90
+ private normalizeToc(
91
+ apiToc: Array<ApiNavItem>
92
+ ): {
91
93
  tocMap: { [key: string]: TreeNode };
92
94
  normalizedToc: Array<TreeNode>;
93
95
  } {
@@ -3,6 +3,11 @@
3
3
  --button-primary-color-hover: var(--dx-g-blue-vibrant-40);
4
4
  }
5
5
 
6
+ doc-content-layout {
7
+ --dx-c-content-sidebar-sticky-top: var(--dx-g-global-header-height);
8
+ --dx-c-sidebar-height: calc(100vh - var(--dx-g-global-header-height));
9
+ }
10
+
6
11
  doc-breadcrumbs {
7
12
  --dx-c-popover-z-index: 5;
8
13
 
@@ -26,7 +31,24 @@ dx-dropdown > dx-button:hover {
26
31
  --border-color: var(--button-primary-color-hover);
27
32
  }
28
33
 
29
- .document-pickers {
30
- margin-left: auto;
31
- margin-right: var(--dx-g-spacing-sm);
34
+ doc-phase {
35
+ --doc-c-phase-top: var(--dx-g-global-header-height);
36
+ }
37
+
38
+ @media screen and (max-width: 768px) {
39
+ doc-content-layout {
40
+ --dx-g-doc-header-main-nav-height: 41px;
41
+ --dx-g-doc-header-height: calc(
42
+ var(--dx-g-doc-header-main-nav-height) + 40px
43
+ );
44
+ --dx-c-content-sidebar-sticky-top: calc(
45
+ var(--dx-g-global-header-height) + var(--dx-g-doc-header-height)
46
+ );
47
+ }
48
+
49
+ doc-phase {
50
+ --doc-c-phase-top: calc(
51
+ var(--dx-g-global-header-height) + var(--dx-g-doc-header-height)
52
+ );
53
+ }
32
54
  }