@salesforcedevs/docs-components 1.3.345-sppage-alpha1 → 1.3.359-test
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 +0 -1
- package/package.json +1 -1
- package/src/modules/doc/componentPlayground/componentPlayground.css +12 -0
- package/src/modules/doc/componentPlayground/componentPlayground.html +9 -0
- package/src/modules/doc/componentPlayground/componentPlayground.ts +20 -0
- package/src/modules/doc/specificationContent/specificationContent.css +0 -3
- package/src/modules/doc/specificationContent/specificationContent.html +0 -99
- package/src/modules/doc/specificationContent/specificationContent.ts +0 -56
package/lwc.config.json
CHANGED
package/package.json
CHANGED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { LightningElement, api, track } 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
|
+
@track isLoading = true;
|
|
10
|
+
|
|
11
|
+
get playgroundSrc(): string {
|
|
12
|
+
return `${this.playgroundAppUrl}/playground/${this.model}/${
|
|
13
|
+
this.namespace
|
|
14
|
+
}/${this.component.toLowerCase()}.html`;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
handleIframeLoad() {
|
|
18
|
+
this.isLoading = false;
|
|
19
|
+
}
|
|
20
|
+
}
|
|
@@ -1,99 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div title="properties">
|
|
3
|
-
<template if:true={hasAttributes}>
|
|
4
|
-
<doc-heading
|
|
5
|
-
header="Attributes"
|
|
6
|
-
hash="attributes"
|
|
7
|
-
aria-level="2"
|
|
8
|
-
></doc-heading>
|
|
9
|
-
<table>
|
|
10
|
-
<thead>
|
|
11
|
-
<tr>
|
|
12
|
-
<th>Name</th>
|
|
13
|
-
<th>Description</th>
|
|
14
|
-
</tr>
|
|
15
|
-
</thead>
|
|
16
|
-
<tbody>
|
|
17
|
-
<template for:each={attributes} for:item="attribute">
|
|
18
|
-
<tr key={attribute.name}>
|
|
19
|
-
<td>{attribute.nameInKebabCase}</td>
|
|
20
|
-
<td>{attribute.description}</td>
|
|
21
|
-
</tr>
|
|
22
|
-
</template>
|
|
23
|
-
</tbody>
|
|
24
|
-
</table>
|
|
25
|
-
</template>
|
|
26
|
-
|
|
27
|
-
<template if:true={hasMethods}>
|
|
28
|
-
<doc-heading
|
|
29
|
-
header="Methods"
|
|
30
|
-
hash="methods"
|
|
31
|
-
aria-level="2"
|
|
32
|
-
></doc-heading>
|
|
33
|
-
<table>
|
|
34
|
-
<thead>
|
|
35
|
-
<tr>
|
|
36
|
-
<th>Name</th>
|
|
37
|
-
<th>Description</th>
|
|
38
|
-
</tr>
|
|
39
|
-
</thead>
|
|
40
|
-
<tbody>
|
|
41
|
-
<template for:each={methods} for:item="method">
|
|
42
|
-
<tr key={method.name}>
|
|
43
|
-
<td>{method.nameInKebabCase}</td>
|
|
44
|
-
<td>{method.description}</td>
|
|
45
|
-
</tr>
|
|
46
|
-
</template>
|
|
47
|
-
</tbody>
|
|
48
|
-
</table>
|
|
49
|
-
</template>
|
|
50
|
-
|
|
51
|
-
<template if:true={hasSlots}>
|
|
52
|
-
<doc-heading
|
|
53
|
-
header="Slots"
|
|
54
|
-
hash="slots"
|
|
55
|
-
aria-level="2"
|
|
56
|
-
></doc-heading>
|
|
57
|
-
<table>
|
|
58
|
-
<thead>
|
|
59
|
-
<tr>
|
|
60
|
-
<th>Name</th>
|
|
61
|
-
<th>Description</th>
|
|
62
|
-
</tr>
|
|
63
|
-
</thead>
|
|
64
|
-
<tbody>
|
|
65
|
-
<template for:each={slots} for:item="slot">
|
|
66
|
-
<tr key={slot.name}>
|
|
67
|
-
<td>{slot.nameInKebabCase}</td>
|
|
68
|
-
<td>{slot.description}</td>
|
|
69
|
-
</tr>
|
|
70
|
-
</template>
|
|
71
|
-
</tbody>
|
|
72
|
-
</table>
|
|
73
|
-
</template>
|
|
74
|
-
|
|
75
|
-
<template if:true={hasEvents}>
|
|
76
|
-
<doc-heading
|
|
77
|
-
header="Events"
|
|
78
|
-
hash="events"
|
|
79
|
-
aria-level="2"
|
|
80
|
-
></doc-heading>
|
|
81
|
-
<table>
|
|
82
|
-
<thead>
|
|
83
|
-
<tr>
|
|
84
|
-
<th>Name</th>
|
|
85
|
-
<th>Description</th>
|
|
86
|
-
</tr>
|
|
87
|
-
</thead>
|
|
88
|
-
<tbody>
|
|
89
|
-
<template for:each={slots} for:item="slot">
|
|
90
|
-
<tr key={slot.name}>
|
|
91
|
-
<td>{slot.nameInKebabCase}</td>
|
|
92
|
-
<td>{slot.description}</td>
|
|
93
|
-
</tr>
|
|
94
|
-
</template>
|
|
95
|
-
</tbody>
|
|
96
|
-
</table>
|
|
97
|
-
</template>
|
|
98
|
-
</div>
|
|
99
|
-
</template>
|
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
import { LightningElement, track, api } from "lwc";
|
|
2
|
-
|
|
3
|
-
export default class SpecificationContent extends LightningElement {
|
|
4
|
-
@track data: any;
|
|
5
|
-
@api component: string = "button";
|
|
6
|
-
@api type: string = "lightning";
|
|
7
|
-
|
|
8
|
-
private attributes = [];
|
|
9
|
-
private methods = [];
|
|
10
|
-
private slots = [];
|
|
11
|
-
private events = [];
|
|
12
|
-
|
|
13
|
-
connectedCallback() {
|
|
14
|
-
this.fetchPropertiesData();
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
async fetchPropertiesData() {
|
|
18
|
-
const url = `http://localhost:3002/get-properties?component=${this.component}&type=${this.type}`;
|
|
19
|
-
|
|
20
|
-
try {
|
|
21
|
-
const response = await fetch(url);
|
|
22
|
-
|
|
23
|
-
if (!response.ok) {
|
|
24
|
-
throw new Error(`Failed to fetch: ${response.statusText}`);
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
const result = await response.json();
|
|
28
|
-
this.data = result;
|
|
29
|
-
({
|
|
30
|
-
attributes: this.attributes,
|
|
31
|
-
methods: this.methods,
|
|
32
|
-
slots: this.slots,
|
|
33
|
-
events: this.events
|
|
34
|
-
} = this.data);
|
|
35
|
-
} catch (error) {
|
|
36
|
-
this.data = {};
|
|
37
|
-
console.error("fetchPropertiesData() failed for:" + url);
|
|
38
|
-
}
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
get hasAttributes() {
|
|
42
|
-
return this.attributes;
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
get hasMethods() {
|
|
46
|
-
return this.methods;
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
get hasSlots() {
|
|
50
|
-
return this.slots;
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
get hasEvents() {
|
|
54
|
-
return this.events;
|
|
55
|
-
}
|
|
56
|
-
}
|