@salesforcedevs/docs-components 1.3.345-spPage-alpha → 1.3.345-spPage-alpha1
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
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import { LightningElement, track, api } from "lwc";
|
|
2
2
|
|
|
3
|
-
/* The actual URL is as follows:
|
|
4
|
-
* http://api.salesforce.com/doc-platform/developer/v1-alpha/components/{type}/{component-name}
|
|
5
|
-
* Until the API integration is ready, we will go ahead with localhost.
|
|
6
|
-
*/
|
|
7
|
-
const localURL: string = "https://cx-mock-router-f02597c1b3da.herokuapp.com";
|
|
8
|
-
const ROUTER_URL: string =
|
|
9
|
-
localURL || "https://api.salesforce.com/doc-platform/developer/v1";
|
|
10
|
-
|
|
11
3
|
export default class SpecificationContent extends LightningElement {
|
|
12
4
|
@track data: any;
|
|
13
5
|
@api component: string = "button";
|
|
14
|
-
@api type: string = "
|
|
6
|
+
@api type: string = "lwc";
|
|
7
|
+
@api subType: string = "lightning";
|
|
8
|
+
|
|
9
|
+
/* The actual URL is as follows:
|
|
10
|
+
* http://api.salesforce.com/doc-platform/developer/v1/{type}/{sub-type}/{component-name}
|
|
11
|
+
* Until the API integration is ready, we will go ahead with mocked-router-url.
|
|
12
|
+
*/
|
|
13
|
+
@api routerUrl: string =
|
|
14
|
+
"https://cx-mock-router-internal-07a18d7b3f61.herokuapp.com";
|
|
15
15
|
|
|
16
16
|
private attributes = [];
|
|
17
17
|
private methods = [];
|
|
@@ -23,7 +23,7 @@ export default class SpecificationContent extends LightningElement {
|
|
|
23
23
|
}
|
|
24
24
|
|
|
25
25
|
async fetchComponentMetadata() {
|
|
26
|
-
const url = `${
|
|
26
|
+
const url = `${this.routerUrl}/${this.type}/${this.subType}/${this.component}`;
|
|
27
27
|
|
|
28
28
|
try {
|
|
29
29
|
const response = await fetch(url);
|