@salesforcedevs/docs-components 0.17.0 → 0.17.12-search-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/lwc.config.json +18 -3
- package/package.json +18 -7
- package/src/modules/README.md +41 -0
- package/src/modules/doc/amfModelParser/amfModelParser.ts +674 -0
- package/src/modules/doc/amfReference/amfReference.css +25 -0
- package/src/modules/doc/amfReference/amfReference.html +55 -0
- package/src/modules/doc/amfReference/amfReference.ts +1467 -0
- package/src/modules/doc/amfReference/constants.ts +76 -0
- package/src/modules/doc/amfReference/types.ts +125 -0
- package/src/modules/doc/amfTopic/amfTopic.css +21 -0
- package/src/modules/doc/amfTopic/amfTopic.html +3 -0
- package/src/modules/doc/amfTopic/amfTopic.ts +111 -0
- package/src/modules/doc/amfTopic/types.ts +56 -0
- package/src/modules/doc/amfTopic/utils.ts +136 -0
- package/src/modules/doc/breadcrumbItem/breadcrumbItem.css +51 -0
- package/src/modules/doc/breadcrumbItem/breadcrumbItem.html +5 -0
- package/src/modules/doc/breadcrumbItem/breadcrumbItem.ts +71 -0
- package/src/modules/doc/breadcrumbs/breadcrumbs.css +27 -0
- package/src/modules/doc/breadcrumbs/breadcrumbs.html +58 -0
- package/src/modules/doc/breadcrumbs/breadcrumbs.ts +183 -0
- package/src/modules/doc/componentPlayground/componentPlayground.css +22 -0
- package/src/modules/doc/componentPlayground/componentPlayground.html +20 -0
- package/src/modules/doc/componentPlayground/componentPlayground.ts +42 -0
- package/src/modules/doc/content/content.css +89 -70
- package/src/modules/doc/content/content.html +1 -0
- package/src/modules/doc/content/content.ts +188 -195
- package/src/modules/doc/contentCallout/contentCallout.css +17 -23
- package/src/modules/doc/contentCallout/contentCallout.html +13 -4
- package/src/modules/doc/contentCallout/contentCallout.ts +16 -3
- package/src/modules/doc/contentLayout/contentLayout.css +1 -0
- package/src/modules/doc/contentLayout/contentLayout.html +46 -0
- package/src/modules/doc/contentLayout/contentLayout.ts +524 -0
- package/src/modules/doc/doDont/doDont.css +47 -0
- package/src/modules/doc/doDont/doDont.html +27 -0
- package/src/modules/doc/doDont/doDont.ts +17 -0
- package/src/modules/doc/header/header.css +70 -37
- package/src/modules/doc/header/header.html +41 -138
- package/src/modules/doc/header/header.ts +56 -78
- package/src/modules/doc/heading/heading.css +33 -0
- package/src/modules/doc/heading/heading.html +14 -0
- package/src/modules/doc/heading/heading.ts +67 -0
- package/src/modules/doc/headingAnchor/headingAnchor.css +3 -3
- package/src/modules/doc/headingAnchor/headingAnchor.ts +2 -2
- package/src/modules/doc/headingContent/headingContent.css +53 -0
- package/src/modules/doc/headingContent/headingContent.html +13 -0
- package/src/modules/doc/headingContent/headingContent.ts +30 -0
- package/src/modules/doc/lwcContentLayout/lwcContentLayout.css +1 -0
- package/src/modules/doc/lwcContentLayout/lwcContentLayout.html +45 -0
- package/src/modules/doc/lwcContentLayout/lwcContentLayout.ts +256 -0
- package/src/modules/doc/overview/overview.css +40 -0
- package/src/modules/doc/overview/overview.html +34 -0
- package/src/modules/doc/overview/overview.ts +12 -0
- package/src/modules/doc/phase/phase.css +70 -0
- package/src/modules/doc/phase/phase.html +38 -0
- package/src/modules/doc/phase/phase.ts +93 -0
- package/src/modules/doc/specificationContent/specificationContent.css +36 -0
- package/src/modules/doc/specificationContent/specificationContent.html +167 -0
- package/src/modules/doc/specificationContent/specificationContent.ts +127 -0
- package/src/modules/doc/sprigSurvey/sprigSurvey.html +20 -0
- package/src/modules/doc/sprigSurvey/sprigSurvey.scoped.css +16 -0
- package/src/modules/doc/sprigSurvey/sprigSurvey.ts +16 -0
- package/src/modules/doc/toc/toc.ts +1 -1
- package/src/modules/doc/versionPicker/versionPicker.css +64 -0
- package/src/modules/doc/versionPicker/versionPicker.html +38 -0
- package/src/modules/doc/versionPicker/versionPicker.ts +65 -0
- package/src/modules/doc/xmlContent/types.ts +120 -0
- package/src/modules/doc/xmlContent/utils.ts +163 -0
- package/src/modules/doc/xmlContent/xmlContent.css +54 -0
- package/src/modules/doc/xmlContent/xmlContent.html +54 -0
- package/src/modules/doc/xmlContent/xmlContent.ts +763 -0
- package/src/modules/docHelpers/amfStyle/amfStyle.css +355 -0
- package/src/modules/docHelpers/contentLayoutStyle/contentLayoutStyle.css +131 -0
- package/src/modules/docHelpers/imgStyle/imgStyle.css +59 -0
- package/src/modules/docHelpers/status/status.css +22 -0
- package/src/modules/docUtils/searchSyncer/searchSyncer.ts +86 -0
- package/src/modules/docUtils/utils/__mocks__/coveo.analytics.ts +16 -0
- package/src/modules/docUtils/utils/coveo.analytics.d.ts +10 -0
- package/src/modules/docUtils/utils/utils.ts +32 -0
- package/LICENSE +0 -12
- package/src/modules/doc/content/__tests__/content.test.ts +0 -312
- package/src/modules/doc/content/__tests__/mockDocContent.ts +0 -348
- package/src/modules/doc/content/__tests__/mockPageReference.ts +0 -8
- package/src/modules/doc/content/__tests__/mockSidebar.ts +0 -81
- package/src/modules/doc/content/content.stories.ts +0 -148
- package/src/modules/doc/contentCallout/__tests__/contentCallout.test.ts +0 -80
- package/src/modules/doc/contentCallout/__tests__/mockProps.ts +0 -14
- package/src/modules/doc/contentCallout/contentCallout.stories.ts +0 -29
- package/src/modules/doc/contentMedia/__tests__/contentMedia.test.ts +0 -97
- package/src/modules/doc/contentMedia/contentMedia.stories.ts +0 -113
- package/src/modules/doc/header/__tests__/coveoConfig.ts +0 -12
- package/src/modules/doc/header/__tests__/header.test.ts +0 -445
- package/src/modules/doc/header/__tests__/mockNavDevelopers.ts +0 -427
- package/src/modules/doc/header/__tests__/mockNavs.ts +0 -115
- package/src/modules/doc/header/__tests__/mockProps.ts +0 -152
- package/src/modules/doc/header/header.stories.ts +0 -190
- package/src/modules/doc/headingAnchor/__tests__/headingAnchor.test.ts +0 -111
- package/src/modules/doc/headingAnchor/headingAnchor.stories.ts +0 -33
- package/src/modules/doc/nav/__tests__/mockAvailableLanguages.ts +0 -8
- package/src/modules/doc/nav/__tests__/mockAvailableVersions.ts +0 -122
- package/src/modules/doc/nav/__tests__/mockPageReference.ts +0 -8
- package/src/modules/doc/nav/__tests__/mockPdfUrl.ts +0 -1
- package/src/modules/doc/nav/__tests__/mockSelectedLanguage.ts +0 -8
- package/src/modules/doc/nav/__tests__/mockSelectedVersion.ts +0 -8
- package/src/modules/doc/nav/__tests__/mockToc.ts +0 -146
- package/src/modules/doc/nav/__tests__/nav.test.ts +0 -58
- package/src/modules/doc/toc/__tests__/mockPageReference.ts +0 -8
- package/src/modules/doc/toc/__tests__/mockToc.ts +0 -146
- package/src/modules/doc/toc/__tests__/toc.test.ts +0 -29
- package/src/modules/doc/toolbar/__tests__/mockAvailableLanguages.ts +0 -8
- package/src/modules/doc/toolbar/__tests__/mockAvailableVersions.ts +0 -122
- package/src/modules/doc/toolbar/__tests__/mockPdfUrl.ts +0 -1
- package/src/modules/doc/toolbar/__tests__/mockSelectedLanguage.ts +0 -8
- package/src/modules/doc/toolbar/__tests__/mockSelectedVersion.ts +0 -8
- package/src/modules/doc/toolbar/__tests__/toolbar.test.ts +0 -44
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<nav role="navigation" aria-label={ariaLabel}>
|
|
3
|
+
<template if:true={displayCrumbs}>
|
|
4
|
+
<template if:false={renderSmallVariant}>
|
|
5
|
+
<doc-breadcrumb-item
|
|
6
|
+
href={firstCrumb.href}
|
|
7
|
+
label={firstCrumb.label}
|
|
8
|
+
breadcrumb-labels={breadcrumbLabels}
|
|
9
|
+
></doc-breadcrumb-item>
|
|
10
|
+
<span class="breadcrumb-item_slash">/</span>
|
|
11
|
+
<template if:true={renderDropdown}>
|
|
12
|
+
<dx-dropdown
|
|
13
|
+
analytics-event="custEv_breadcrumbClick"
|
|
14
|
+
analytics-payload={ANALYTICS_PAYLOAD}
|
|
15
|
+
if:true={renderDropdown}
|
|
16
|
+
options={dropdownOptions}
|
|
17
|
+
open-on-hover
|
|
18
|
+
placement="bottom"
|
|
19
|
+
variant="indented"
|
|
20
|
+
width="fit-content"
|
|
21
|
+
>
|
|
22
|
+
<dx-button
|
|
23
|
+
aria-label="Open Breadcrumbs Dropdown"
|
|
24
|
+
icon-size="large"
|
|
25
|
+
icon-symbol="threedots"
|
|
26
|
+
variant="tertiary"
|
|
27
|
+
></dx-button>
|
|
28
|
+
</dx-dropdown>
|
|
29
|
+
<span class="breadcrumb-item_slash">/</span>
|
|
30
|
+
</template>
|
|
31
|
+
<template for:each={breadcrumbItems} for:item="breadcrumb">
|
|
32
|
+
<doc-breadcrumb-item
|
|
33
|
+
href={breadcrumb.href}
|
|
34
|
+
key={breadcrumb.id}
|
|
35
|
+
label={breadcrumb.label}
|
|
36
|
+
level={breadcrumb.level}
|
|
37
|
+
breadcrumb-labels={breadcrumbLabels}
|
|
38
|
+
></doc-breadcrumb-item>
|
|
39
|
+
<span class="breadcrumb-item_slash" key={breadcrumb.label}>
|
|
40
|
+
/
|
|
41
|
+
</span>
|
|
42
|
+
</template>
|
|
43
|
+
<doc-breadcrumb-item
|
|
44
|
+
label={lastCrumb.label}
|
|
45
|
+
breadcrumb-labels={breadcrumbLabels}
|
|
46
|
+
></doc-breadcrumb-item>
|
|
47
|
+
</template>
|
|
48
|
+
<template if:true={renderSmallVariant}>
|
|
49
|
+
<doc-breadcrumb-item
|
|
50
|
+
href={lastLinkCrump.href}
|
|
51
|
+
label={lastLinkCrump.label}
|
|
52
|
+
breadcrumb-labels={breadcrumbLabels}
|
|
53
|
+
variant="back-arrow"
|
|
54
|
+
></doc-breadcrumb-item>
|
|
55
|
+
</template>
|
|
56
|
+
</template>
|
|
57
|
+
</nav>
|
|
58
|
+
</template>
|
|
@@ -0,0 +1,183 @@
|
|
|
1
|
+
import { LightningElement, api } from "lwc";
|
|
2
|
+
import { Breadcrumb, OptionWithLink } from "typings/custom";
|
|
3
|
+
import { toJson } from "dxUtils/normalizers";
|
|
4
|
+
|
|
5
|
+
type BreadcrumbConfig = {
|
|
6
|
+
minWidth: number;
|
|
7
|
+
crumbsInDropdown: number;
|
|
8
|
+
};
|
|
9
|
+
|
|
10
|
+
const GAP = 8;
|
|
11
|
+
|
|
12
|
+
// Unit in pixels based on Salesforce Sans font-family.
|
|
13
|
+
const CONSTANTS = {
|
|
14
|
+
pixelPerCharacter: 7.7,
|
|
15
|
+
pixelPerCrumbSpace: GAP * 2 + 8.6,
|
|
16
|
+
minWidthPerCrumb: 200,
|
|
17
|
+
dropdownWidth: 32
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
export default class Breadcrumbs extends LightningElement {
|
|
21
|
+
@api ariaLabel: string = "Documentation Breadcrumbs";
|
|
22
|
+
|
|
23
|
+
@api
|
|
24
|
+
get breadcrumbs(): Breadcrumb[] {
|
|
25
|
+
return this._breadcrumbs;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
set breadcrumbs(value) {
|
|
29
|
+
this.normalizeAndAssignBreadcrumbs(value);
|
|
30
|
+
this.calculateBreadcrumbsConfigs();
|
|
31
|
+
if (this.isRendered) {
|
|
32
|
+
this.onWidthOrContentChange();
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
@api
|
|
37
|
+
get pixelPerCharacter(): number {
|
|
38
|
+
return this._pixelPerCharacter;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
set pixelPerCharacter(value: number | string) {
|
|
42
|
+
this._pixelPerCharacter = +value;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
private _breadcrumbs: Breadcrumb[] = [];
|
|
46
|
+
private _pixelPerCharacter = CONSTANTS.pixelPerCharacter;
|
|
47
|
+
private navWidth = 0;
|
|
48
|
+
private breadcrumbConfigs: BreadcrumbConfig[] = [];
|
|
49
|
+
private dropdownOptionAmount? = 0;
|
|
50
|
+
private isRendered = false;
|
|
51
|
+
|
|
52
|
+
private get renderSmallVariant(): boolean {
|
|
53
|
+
return (
|
|
54
|
+
!this.dropdownOptionAmount &&
|
|
55
|
+
this.dropdownOptionAmount !== 0 &&
|
|
56
|
+
!!this.lastLinkCrump
|
|
57
|
+
);
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
private get lastLinkCrump(): Breadcrumb {
|
|
61
|
+
return this.breadcrumbs[this.breadcrumbs.length - 2];
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
private get hasInternalBreadcrumbs(): boolean {
|
|
65
|
+
return this.breadcrumbs.length > 2;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
private get breadcrumbItems(): Breadcrumb[] {
|
|
69
|
+
return this.breadcrumbs!.slice(
|
|
70
|
+
this.dropdownOptionAmount! + 1,
|
|
71
|
+
this._breadcrumbs.length - 1
|
|
72
|
+
);
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
private get renderDropdown(): boolean {
|
|
76
|
+
return this.hasInternalBreadcrumbs && !!this.dropdownOptionAmount;
|
|
77
|
+
}
|
|
78
|
+
private get dropdownOptions(): OptionWithLink[] {
|
|
79
|
+
return this.breadcrumbs!.slice(1, this.dropdownOptionAmount! + 1).map(
|
|
80
|
+
(link) => ({
|
|
81
|
+
id: link.id!,
|
|
82
|
+
label: link.label,
|
|
83
|
+
link: { href: link.href! }
|
|
84
|
+
})
|
|
85
|
+
);
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
private get displayCrumbs(): boolean {
|
|
89
|
+
return this.breadcrumbs.length > 1;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
private get firstCrumb(): Breadcrumb {
|
|
93
|
+
return this.breadcrumbs[0];
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
private get breadcrumbLabels(): string {
|
|
97
|
+
return this.breadcrumbs.map((crumb) => crumb.label).join(":");
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
private get lastCrumb(): Breadcrumb {
|
|
101
|
+
return this.breadcrumbs[this.breadcrumbs.length - 1];
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
// this payload is only used for breadcrumb dropdown
|
|
105
|
+
private get ANALYTICS_PAYLOAD() {
|
|
106
|
+
return {
|
|
107
|
+
element_type: "link",
|
|
108
|
+
nav_type: "breadcrumb",
|
|
109
|
+
nav_level: 1
|
|
110
|
+
};
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
private onWidthOrContentChange = () => {
|
|
114
|
+
this.navWidth = this.template
|
|
115
|
+
.querySelector("nav")!
|
|
116
|
+
.getBoundingClientRect().width;
|
|
117
|
+
this.updateDropdownOptionAmount();
|
|
118
|
+
};
|
|
119
|
+
|
|
120
|
+
renderedCallback(): void {
|
|
121
|
+
this.isRendered = true;
|
|
122
|
+
this.onWidthOrContentChange();
|
|
123
|
+
window.addEventListener("resize", this.onWidthOrContentChange);
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
disconnectedCallback(): void {
|
|
127
|
+
window.removeEventListener("resize", this.onWidthOrContentChange);
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
private normalizeAndAssignBreadcrumbs(breadcrumbs?: Breadcrumb[] | string) {
|
|
131
|
+
if (!breadcrumbs) {
|
|
132
|
+
return;
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
this._breadcrumbs = toJson(breadcrumbs).map(
|
|
136
|
+
(crumb: Breadcrumb, index: number) => ({
|
|
137
|
+
...crumb,
|
|
138
|
+
id: crumb.id || crumb.href,
|
|
139
|
+
level: index
|
|
140
|
+
})
|
|
141
|
+
);
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
private updateDropdownOptionAmount(): void {
|
|
145
|
+
this.dropdownOptionAmount = this.breadcrumbConfigs.find(
|
|
146
|
+
({ minWidth }) => minWidth <= this.navWidth
|
|
147
|
+
)?.crumbsInDropdown;
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
private calculateBreadcrumbsConfigs(): void {
|
|
151
|
+
this.breadcrumbConfigs = [
|
|
152
|
+
...Array(this._breadcrumbs.length - 1).keys()
|
|
153
|
+
].map((optionsAmount) => {
|
|
154
|
+
const breadcrumbs = [...this._breadcrumbs];
|
|
155
|
+
breadcrumbs.splice(1, optionsAmount);
|
|
156
|
+
return {
|
|
157
|
+
crumbsInDropdown: optionsAmount,
|
|
158
|
+
minWidth: this.reduceBreadcrumbs(
|
|
159
|
+
breadcrumbs,
|
|
160
|
+
optionsAmount
|
|
161
|
+
? CONSTANTS.dropdownWidth + CONSTANTS.pixelPerCrumbSpace
|
|
162
|
+
: 0
|
|
163
|
+
)
|
|
164
|
+
};
|
|
165
|
+
});
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
private reduceBreadcrumbs(
|
|
169
|
+
breadcrumbs: Breadcrumb[],
|
|
170
|
+
offset: number = 0
|
|
171
|
+
): number {
|
|
172
|
+
return breadcrumbs.reduce(
|
|
173
|
+
(previousValue, element) =>
|
|
174
|
+
previousValue +
|
|
175
|
+
Math.min(
|
|
176
|
+
element.label.length *
|
|
177
|
+
(this.pixelPerCharacter || CONSTANTS.pixelPerCharacter),
|
|
178
|
+
CONSTANTS.minWidthPerCrumb
|
|
179
|
+
),
|
|
180
|
+
(breadcrumbs.length - 1) * CONSTANTS.pixelPerCrumbSpace + offset
|
|
181
|
+
);
|
|
182
|
+
}
|
|
183
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
@import "dxHelpers/reset";
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Designs link - https://www.figma.com/design/9SalRPlJmtRDZHq03o8dL1/One-Doc-Site-Visionary-Mocks?node-id=9968-366397&m=dev
|
|
5
|
+
* Preview padding: 24px
|
|
6
|
+
* Example Selector height: 122px
|
|
7
|
+
* Example Preview min height: 150px
|
|
8
|
+
* Tab height with border: 46px(45px height and 1px border)
|
|
9
|
+
* Codeblock height: 264px(224px for codeblock and 40px for panel)
|
|
10
|
+
* Total: 606px
|
|
11
|
+
**/
|
|
12
|
+
|
|
13
|
+
iframe {
|
|
14
|
+
width: 100%;
|
|
15
|
+
height: 606px;
|
|
16
|
+
border-radius: var(--dx-g-spacing-sm);
|
|
17
|
+
border: 1px solid var(--dx-g-gray-90);
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
.playground-container {
|
|
21
|
+
position: relative;
|
|
22
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="playground-container" lwc:if={playgroundAvailable}>
|
|
3
|
+
<dx-spinner
|
|
4
|
+
size="large"
|
|
5
|
+
variant="brand"
|
|
6
|
+
if:true={isLoading}
|
|
7
|
+
></dx-spinner>
|
|
8
|
+
<iframe
|
|
9
|
+
src={playgroundSrc}
|
|
10
|
+
onload={handleIframeLoad}
|
|
11
|
+
title={playgroundTitle}
|
|
12
|
+
allow="clipboard-write"
|
|
13
|
+
></iframe>
|
|
14
|
+
</div>
|
|
15
|
+
<dx-error-fallback
|
|
16
|
+
lwc:else
|
|
17
|
+
title="Code Examples Unavailable"
|
|
18
|
+
description="This component's code examples are currently unavailable. Please check again later."
|
|
19
|
+
></dx-error-fallback>
|
|
20
|
+
</template>
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { LightningElement, api } from "lwc";
|
|
2
|
+
|
|
3
|
+
export default class ComponentPlayground extends LightningElement {
|
|
4
|
+
@api model!: string;
|
|
5
|
+
@api namespace!: string;
|
|
6
|
+
@api component!: string;
|
|
7
|
+
@api playgroundAppUrl!: string;
|
|
8
|
+
|
|
9
|
+
isLoading = true;
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* Returns a formatted title for the component playground
|
|
13
|
+
* Maps 'aura' model to 'Aura' and 'lwc' model to 'Lightning'
|
|
14
|
+
* Capitalizes the first letter of the component name
|
|
15
|
+
* @returns {string} Formatted playground title
|
|
16
|
+
*/
|
|
17
|
+
get playgroundTitle() {
|
|
18
|
+
const modelName = this.model === "aura" ? "Aura" : "Lightning";
|
|
19
|
+
const componentName =
|
|
20
|
+
this.component.charAt(0).toUpperCase() + this.component.slice(1);
|
|
21
|
+
return `Example previews and code for ${modelName} ${componentName} component`;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
get playgroundAvailable() {
|
|
25
|
+
return (
|
|
26
|
+
this.playgroundAppUrl &&
|
|
27
|
+
this.model &&
|
|
28
|
+
this.namespace &&
|
|
29
|
+
this.component
|
|
30
|
+
);
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
get playgroundSrc(): string {
|
|
34
|
+
return `${this.playgroundAppUrl}/playground/${this.model}/${
|
|
35
|
+
this.namespace
|
|
36
|
+
}/${this.component.toLowerCase()}.html`;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
handleIframeLoad() {
|
|
40
|
+
this.isLoading = false;
|
|
41
|
+
}
|
|
42
|
+
}
|
|
@@ -4,10 +4,10 @@
|
|
|
4
4
|
* pattern validation cannot be applied
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
|
-
@import "
|
|
8
|
-
@import "
|
|
9
|
-
@import "
|
|
10
|
-
@import "
|
|
7
|
+
@import "dxHelpers/text";
|
|
8
|
+
@import "dxHelpers/reset";
|
|
9
|
+
@import "dxHelpers/table";
|
|
10
|
+
@import "docHelpers/imgStyle";
|
|
11
11
|
|
|
12
12
|
.doc-content {
|
|
13
13
|
width: 100%;
|
|
@@ -31,11 +31,6 @@
|
|
|
31
31
|
margin-bottom: var(--dx-g-spacing-md);
|
|
32
32
|
}
|
|
33
33
|
|
|
34
|
-
.helpHead2 {
|
|
35
|
-
margin-top: 36px;
|
|
36
|
-
margin-bottom: var(--dx-g-spacing-md);
|
|
37
|
-
}
|
|
38
|
-
|
|
39
34
|
.relinfo {
|
|
40
35
|
padding-top: var(--dx-g-spacing-sm);
|
|
41
36
|
padding-bottom: var(--dx-g-spacing-sm);
|
|
@@ -46,17 +41,10 @@
|
|
|
46
41
|
padding-bottom: var(--dx-g-spacing-sm);
|
|
47
42
|
}
|
|
48
43
|
|
|
49
|
-
img.content-image {
|
|
50
|
-
height: auto;
|
|
51
|
-
display: unset;
|
|
52
|
-
}
|
|
53
|
-
|
|
54
44
|
.image-block .content-image {
|
|
55
45
|
margin-top: var(--dx-g-spacing-lg);
|
|
56
46
|
margin-bottom: var(--dx-g-spacing-sm);
|
|
57
47
|
display: block;
|
|
58
|
-
margin-left: auto;
|
|
59
|
-
margin-right: auto;
|
|
60
48
|
}
|
|
61
49
|
|
|
62
50
|
td > img.content-image:first-child:last-child[alt="Yes"],
|
|
@@ -64,45 +52,61 @@ td > img.content-image:first-child:last-child[alt="No"] {
|
|
|
64
52
|
width: var(--dx-g-spacing-md);
|
|
65
53
|
}
|
|
66
54
|
|
|
67
|
-
h1
|
|
55
|
+
h1,
|
|
56
|
+
h2,
|
|
57
|
+
h3,
|
|
58
|
+
h4,
|
|
59
|
+
h5,
|
|
60
|
+
h6 {
|
|
61
|
+
color: var(--dx-g-blue-vibrant-20);
|
|
68
62
|
font-family: var(--dx-g-font-display);
|
|
69
|
-
font-
|
|
63
|
+
font-weight: var(--dx-g-font-demi);
|
|
64
|
+
}
|
|
70
65
|
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
letter-spacing: -0.
|
|
74
|
-
line-height:
|
|
66
|
+
h1 {
|
|
67
|
+
font-size: var(--dx-g-text-3xl);
|
|
68
|
+
letter-spacing: -0.8px;
|
|
69
|
+
line-height: var(--dx-g-spacing-3xl);
|
|
70
|
+
margin: var(--dx-g-spacing-2xl) 0 var(--dx-g-spacing-md) 0;
|
|
75
71
|
}
|
|
76
72
|
|
|
77
73
|
h2 {
|
|
78
|
-
font-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
line-height: var(--dx-g-spacing-lg);
|
|
74
|
+
font-size: var(--dx-g-text-2xl);
|
|
75
|
+
letter-spacing: -0.4px;
|
|
76
|
+
line-height: var(--dx-g-spacing-2xl);
|
|
77
|
+
margin: var(--dx-g-spacing-2xl) 0 var(--dx-g-spacing-md) 0;
|
|
83
78
|
}
|
|
84
79
|
|
|
85
80
|
h3 {
|
|
86
|
-
font-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
line-height: var(--dx-g-spacing-lg);
|
|
81
|
+
font-size: var(--dx-g-text-xl);
|
|
82
|
+
letter-spacing: -0.4px;
|
|
83
|
+
line-height: var(--dx-g-spacing-xl);
|
|
84
|
+
margin: var(--dx-g-spacing-xl) 0 var(--dx-g-spacing-md) 0;
|
|
91
85
|
}
|
|
92
86
|
|
|
93
87
|
h4 {
|
|
94
|
-
font-family: var(--dx-g-font-display);
|
|
95
88
|
font-size: var(--dx-g-text-base);
|
|
96
|
-
|
|
97
|
-
|
|
89
|
+
letter-spacing: -0.5px;
|
|
90
|
+
line-height: var(--dx-g-spacing-lg);
|
|
91
|
+
margin: var(--dx-g-spacing-lg) 0 var(--dx-g-spacing-sm) 0;
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
h5 {
|
|
95
|
+
font-size: var(--dx-g-text-sm);
|
|
96
|
+
letter-spacing: -0.3px;
|
|
98
97
|
line-height: var(--dx-g-spacing-mlg);
|
|
98
|
+
margin: var(--dx-g-spacing-md) 0 var(--dx-g-spacing-sm) 0;
|
|
99
99
|
}
|
|
100
100
|
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
101
|
+
h6 {
|
|
102
|
+
font-size: var(--dx-g-text-xs);
|
|
103
|
+
letter-spacing: -0.3px;
|
|
104
|
+
line-height: var(--dx-g-spacing-md);
|
|
105
|
+
margin: var(--dx-g-spacing-sm) 0 var(--dx-g-spacing-sm) 0;
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
img {
|
|
109
|
+
image-rendering: optimize-contrast;
|
|
106
110
|
}
|
|
107
111
|
|
|
108
112
|
p,
|
|
@@ -116,6 +120,12 @@ p,
|
|
|
116
120
|
margin-bottom: var(--dx-g-spacing-md);
|
|
117
121
|
}
|
|
118
122
|
|
|
123
|
+
dd > p,
|
|
124
|
+
dd > .p {
|
|
125
|
+
margin-top: 0;
|
|
126
|
+
margin-bottom: 0;
|
|
127
|
+
}
|
|
128
|
+
|
|
119
129
|
.li {
|
|
120
130
|
font-family: var(--dx-g-font-sans);
|
|
121
131
|
font-size: var(--dx-g-text-base);
|
|
@@ -143,10 +153,6 @@ a,
|
|
|
143
153
|
color: var(--dx-g-blue-vibrant-50);
|
|
144
154
|
}
|
|
145
155
|
|
|
146
|
-
.helpHead1 {
|
|
147
|
-
margin-bottom: var(--dx-g-spacing-lg);
|
|
148
|
-
}
|
|
149
|
-
|
|
150
156
|
.shortdesc {
|
|
151
157
|
font-family: var(--dx-g-font-sans);
|
|
152
158
|
font-size: var(--dx-g-text-base);
|
|
@@ -175,7 +181,8 @@ a,
|
|
|
175
181
|
margin-right: var(--dx-g-spacing-lg);
|
|
176
182
|
}
|
|
177
183
|
|
|
178
|
-
.codeph
|
|
184
|
+
.codeph,
|
|
185
|
+
.filepath {
|
|
179
186
|
font-family: var(--dx-g-font-mono);
|
|
180
187
|
font-size: var(--dx-g-text-sm);
|
|
181
188
|
line-height: var(--dx-g-text-lg);
|
|
@@ -239,10 +246,16 @@ dd {
|
|
|
239
246
|
letter-spacing: 0;
|
|
240
247
|
line-height: var(--dx-g-spacing-lg);
|
|
241
248
|
margin-left: var(--dx-g-spacing-smd);
|
|
249
|
+
margin-bottom: var(--dx-g-spacing-md);
|
|
242
250
|
}
|
|
243
251
|
|
|
244
252
|
li {
|
|
245
|
-
margin
|
|
253
|
+
margin: var(--dx-g-spacing-sm) 0 var(--dx-g-spacing-sm)
|
|
254
|
+
var(--dx-g-spacing-lg);
|
|
255
|
+
}
|
|
256
|
+
|
|
257
|
+
li table {
|
|
258
|
+
margin-bottom: var(--dx-g-spacing-lg);
|
|
246
259
|
}
|
|
247
260
|
|
|
248
261
|
li > li {
|
|
@@ -258,27 +271,6 @@ a:hover,
|
|
|
258
271
|
text-decoration: underline;
|
|
259
272
|
}
|
|
260
273
|
|
|
261
|
-
@media (max-width: 640px) {
|
|
262
|
-
/* Mobile */
|
|
263
|
-
img.content-image {
|
|
264
|
-
max-width: 95vw;
|
|
265
|
-
}
|
|
266
|
-
}
|
|
267
|
-
|
|
268
|
-
@media (min-width: 641px) {
|
|
269
|
-
/* Tablet (medium) */
|
|
270
|
-
img.content-image {
|
|
271
|
-
max-width: 80vw;
|
|
272
|
-
}
|
|
273
|
-
}
|
|
274
|
-
|
|
275
|
-
@media (min-width: 769px) {
|
|
276
|
-
/* Desktop */
|
|
277
|
-
img.content-image {
|
|
278
|
-
max-width: min(60vw, 650px);
|
|
279
|
-
}
|
|
280
|
-
}
|
|
281
|
-
|
|
282
274
|
ul,
|
|
283
275
|
ol {
|
|
284
276
|
margin-left: var(--dx-g-spacing-lg);
|
|
@@ -351,13 +343,30 @@ ul ul ul ul ul ul {
|
|
|
351
343
|
margin: var(--dx-g-spacing-lg) 0;
|
|
352
344
|
}
|
|
353
345
|
|
|
354
|
-
figure
|
|
346
|
+
figure,
|
|
347
|
+
.fig {
|
|
355
348
|
margin: var(--dx-g-spacing-lg) 0;
|
|
349
|
+
text-align: left;
|
|
350
|
+
display: flex;
|
|
351
|
+
flex-direction: column;
|
|
352
|
+
align-items: left;
|
|
353
|
+
justify-content: left;
|
|
356
354
|
}
|
|
357
355
|
|
|
358
|
-
figcaption
|
|
356
|
+
figcaption,
|
|
357
|
+
.figcap {
|
|
358
|
+
display: block;
|
|
359
359
|
font-size: var(--dx-g-text-xs);
|
|
360
|
-
margin
|
|
360
|
+
margin: var(--dx-g-spacing-sm) 0;
|
|
361
|
+
order: 2;
|
|
362
|
+
}
|
|
363
|
+
|
|
364
|
+
.figcap .image {
|
|
365
|
+
order: 1;
|
|
366
|
+
}
|
|
367
|
+
|
|
368
|
+
.fig.fig-centered {
|
|
369
|
+
text-align: center;
|
|
361
370
|
}
|
|
362
371
|
|
|
363
372
|
code,
|
|
@@ -372,3 +381,13 @@ samp,
|
|
|
372
381
|
mark {
|
|
373
382
|
background-color: var(--dx-g-yellow-vibrant-90);
|
|
374
383
|
}
|
|
384
|
+
|
|
385
|
+
/* offset page jump link due to fixed header */
|
|
386
|
+
[id] {
|
|
387
|
+
--dx-c-content-scroll-margin-top: calc(
|
|
388
|
+
var(--dx-g-global-header-height) + var(--dx-g-doc-header-height) +
|
|
389
|
+
var(--dx-g-spacing-2xl)
|
|
390
|
+
);
|
|
391
|
+
|
|
392
|
+
scroll-margin-top: var(--dx-c-content-scroll-margin-top);
|
|
393
|
+
}
|