@salesforcedevs/docs-components 1.14.8-alpha3 → 1.14.8-alpha5

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,6 +1,6 @@
1
1
  {
2
2
  "name": "@salesforcedevs/docs-components",
3
- "version": "1.14.8-alpha3",
3
+ "version": "1.14.8-alpha5",
4
4
  "description": "Docs Lightning web components for DSC",
5
5
  "license": "MIT",
6
6
  "main": "index.js",
@@ -21,6 +21,7 @@ export default class Nav extends LightningElement {
21
21
  @api pageReference!: PageReference;
22
22
 
23
23
  handleSelected(event: CustomEvent) {
24
+ event.preventDefault();
24
25
  event.stopPropagation();
25
26
  const newPageReference = { ...this.pageReference };
26
27
  const target = event.detail.name.split("-");
@@ -72,8 +72,8 @@ export class FetchContent {
72
72
  deliverable: string,
73
73
  contentId: string,
74
74
  options: ContentApiOptions
75
- ): Promise<ContentData> {
76
- return await this.fetchResource<ContentData>(
75
+ ): Promise<String> {
76
+ return this.fetchResource<String>(
77
77
  `/cx-router/dsc/topic?projectId=sfdocs-asl_dev_guide&projectVersion=254-7-dev&locale=en-us&topic=${contentId}`
78
78
  );
79
79
  }
@@ -369,10 +369,11 @@ export default class DocXmlContent extends LightningElementWithState<{
369
369
  }
370
370
 
371
371
  handleNavClick(event: CustomEvent<{ pageReference: PageReference }>): void {
372
+ event.preventDefault();
372
373
  event.stopPropagation();
373
374
  const { pageReference } = event.detail;
374
375
  this.updatePageReference(pageReference);
375
- this.updateUrl();
376
+ this.updateUrl(HistoryState.PUSH_STATE);
376
377
  }
377
378
 
378
379
  handleLanguageChange = (event: any) => {
@@ -543,7 +544,7 @@ export default class DocXmlContent extends LightningElementWithState<{
543
544
  );
544
545
 
545
546
  if (data) {
546
- this.docContent = data.content;
547
+ this.docContent = JSON.parse(data).content;
547
548
  this.addMetatags();
548
549
 
549
550
  if (!this.pageReference.hash) {