@salesforcedevs/docs-components 1.18.6-dynamic-pg1 → 1.18.8-specfix-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/componentPlayground/componentPlayground.css +0 -14
- package/src/modules/doc/componentPlayground/componentPlayground.ts +0 -44
- package/src/modules/doc/specificationContent/specificationContent.html +11 -1
- package/src/modules/doc/specificationContent/specificationContent.ts +15 -0
- package/src/modules/docHelpers/amfStyle/amfStyle.css +0 -2
- package/src/modules/docHelpers/contentLayoutStyle/contentLayoutStyle.css +1 -0
package/package.json
CHANGED
|
@@ -10,27 +10,13 @@
|
|
|
10
10
|
* Total: 606px
|
|
11
11
|
**/
|
|
12
12
|
|
|
13
|
-
:host {
|
|
14
|
-
--playground-iframe-min-height: 500px;
|
|
15
|
-
--playground-iframe-max-height: 5000px;
|
|
16
|
-
}
|
|
17
|
-
|
|
18
13
|
iframe {
|
|
19
14
|
width: 100%;
|
|
20
15
|
height: 606px;
|
|
21
|
-
min-height: var(--playground-iframe-min-height);
|
|
22
|
-
max-height: var(--playground-iframe-max-height);
|
|
23
|
-
transition: height 0.3s ease, min-height 0.3s ease;
|
|
24
16
|
border-radius: var(--dx-g-spacing-sm);
|
|
25
17
|
border: 1px solid var(--dx-g-gray-90);
|
|
26
18
|
}
|
|
27
19
|
|
|
28
|
-
@media (prefers-reduced-motion: reduce) {
|
|
29
|
-
iframe {
|
|
30
|
-
transition: none;
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
|
-
|
|
34
20
|
.playground-container {
|
|
35
21
|
position: relative;
|
|
36
22
|
}
|
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
import { LightningElement, api } from "lwc";
|
|
2
2
|
|
|
3
|
-
const PLAYGROUND_HEIGHT_MESSAGE = "PLAYGROUND_HEIGHT_CHANGE";
|
|
4
|
-
|
|
5
3
|
export default class ComponentPlayground extends LightningElement {
|
|
6
4
|
@api model!: string;
|
|
7
5
|
@api namespace!: string;
|
|
@@ -38,49 +36,7 @@ export default class ComponentPlayground extends LightningElement {
|
|
|
38
36
|
}/${this.component.toLowerCase()}.html`;
|
|
39
37
|
}
|
|
40
38
|
|
|
41
|
-
connectedCallback() {
|
|
42
|
-
window.addEventListener("message", this.handleIframeMessage);
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
disconnectedCallback() {
|
|
46
|
-
window.removeEventListener("message", this.handleIframeMessage);
|
|
47
|
-
}
|
|
48
|
-
|
|
49
39
|
handleIframeLoad() {
|
|
50
40
|
this.isLoading = false;
|
|
51
41
|
}
|
|
52
|
-
|
|
53
|
-
handleIframeMessage = (event: MessageEvent) => {
|
|
54
|
-
// Only handle height change messages from our iframe
|
|
55
|
-
if (event.data?.type !== PLAYGROUND_HEIGHT_MESSAGE) {
|
|
56
|
-
return;
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
const iframe = this.template.querySelector(
|
|
60
|
-
"iframe"
|
|
61
|
-
) as HTMLIFrameElement;
|
|
62
|
-
if (!iframe || event.source !== iframe.contentWindow) {
|
|
63
|
-
return;
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
const height = event.data.height;
|
|
67
|
-
if (typeof height === "number" && height > 0) {
|
|
68
|
-
const minHeight = parseInt(
|
|
69
|
-
getComputedStyle(this.template.host).getPropertyValue(
|
|
70
|
-
"--playground-iframe-min-height"
|
|
71
|
-
),
|
|
72
|
-
10
|
|
73
|
-
);
|
|
74
|
-
const maxHeight = parseInt(
|
|
75
|
-
getComputedStyle(this.template.host).getPropertyValue(
|
|
76
|
-
"--playground-iframe-max-height"
|
|
77
|
-
),
|
|
78
|
-
10
|
|
79
|
-
);
|
|
80
|
-
|
|
81
|
-
const newHeight = Math.min(Math.max(height, minHeight), maxHeight);
|
|
82
|
-
iframe.style.height = `${newHeight}px`;
|
|
83
|
-
iframe.style.minHeight = `${newHeight}px`;
|
|
84
|
-
}
|
|
85
|
-
};
|
|
86
42
|
}
|
|
@@ -7,6 +7,11 @@
|
|
|
7
7
|
if:true={isLoading}
|
|
8
8
|
></dx-spinner>
|
|
9
9
|
<dx-error-fallback lwc:if={showError}></dx-error-fallback>
|
|
10
|
+
<dx-error-fallback
|
|
11
|
+
lwc:if={showNoSpecifications}
|
|
12
|
+
title="No specifications to show"
|
|
13
|
+
description="No specifications are available for this component or API module. When specifications are defined, they'll appear here."
|
|
14
|
+
></dx-error-fallback>
|
|
10
15
|
<template lwc:if={hasAttributes}>
|
|
11
16
|
<doc-heading
|
|
12
17
|
header="Attributes"
|
|
@@ -29,7 +34,12 @@
|
|
|
29
34
|
<tr key={attribute.name}>
|
|
30
35
|
<td>
|
|
31
36
|
<span class="code">
|
|
32
|
-
{
|
|
37
|
+
<template lwc:if={isModelAura}>
|
|
38
|
+
{attribute.name}
|
|
39
|
+
</template>
|
|
40
|
+
<template lwc:else>
|
|
41
|
+
{attribute.nameInKebabCase}
|
|
42
|
+
</template>
|
|
33
43
|
</span>
|
|
34
44
|
</td>
|
|
35
45
|
<td>{attribute.description}</td>
|
|
@@ -108,6 +108,21 @@ export default class SpecificationContent extends LightningElement {
|
|
|
108
108
|
return this.events?.length > 0;
|
|
109
109
|
}
|
|
110
110
|
|
|
111
|
+
get showNoSpecifications() {
|
|
112
|
+
return (
|
|
113
|
+
!this.showError &&
|
|
114
|
+
!this.isLoading &&
|
|
115
|
+
!this.hasAttributes &&
|
|
116
|
+
!this.hasMethods &&
|
|
117
|
+
!this.hasSlots &&
|
|
118
|
+
!this.hasEvents
|
|
119
|
+
);
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
get isModelAura() {
|
|
123
|
+
return this.model === "aura";
|
|
124
|
+
}
|
|
125
|
+
|
|
111
126
|
renderedCallback(): void {
|
|
112
127
|
if (this.data) {
|
|
113
128
|
this.debouncedNotifyDataRendered();
|