@salesforcedevs/docs-components
Advanced tools
Comparing version 1.3.345-spPage-alpha to 1.3.345-spPage-alpha1
{ | ||
"name": "@salesforcedevs/docs-components", | ||
"version": "1.3.345-spPage-alpha", | ||
"version": "1.3.345-spPage-alpha1", | ||
"description": "Docs Lightning web components for DSC", | ||
@@ -5,0 +5,0 @@ "license": "MIT", |
import { LightningElement, track, api } from "lwc"; | ||
/* The actual URL is as follows: | ||
* http://api.salesforce.com/doc-platform/developer/v1-alpha/components/{type}/{component-name} | ||
* Until the API integration is ready, we will go ahead with localhost. | ||
*/ | ||
const localURL: string = "https://cx-mock-router-f02597c1b3da.herokuapp.com"; | ||
const ROUTER_URL: string = | ||
localURL || "https://api.salesforce.com/doc-platform/developer/v1"; | ||
export default class SpecificationContent extends LightningElement { | ||
@track data: any; | ||
@api component: string = "button"; | ||
@api type: string = "lightning"; | ||
@api type: string = "lwc"; | ||
@api subType: string = "lightning"; | ||
/* The actual URL is as follows: | ||
* http://api.salesforce.com/doc-platform/developer/v1/{type}/{sub-type}/{component-name} | ||
* Until the API integration is ready, we will go ahead with mocked-router-url. | ||
*/ | ||
@api routerUrl: string = | ||
"https://cx-mock-router-internal-07a18d7b3f61.herokuapp.com"; | ||
private attributes = []; | ||
@@ -26,3 +26,3 @@ private methods = []; | ||
async fetchComponentMetadata() { | ||
const url = `${ROUTER_URL}/components/${this.type}/${this.component}`; | ||
const url = `${this.routerUrl}/${this.type}/${this.subType}/${this.component}`; | ||
@@ -29,0 +29,0 @@ try { |
266580