@salesforcedevs/docs-components 1.3.49-heading-styles5 → 1.3.49-mulesoft-lwc-2

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.3.49-heading-styles5",
3
+ "version": "1.3.49-mulesoft-lwc-2",
4
4
  "description": "Docs Lightning web components for DSC",
5
5
  "license": "MIT",
6
6
  "main": "index.js",
@@ -36,9 +36,14 @@
36
36
  <slot></slot>
37
37
  </template>
38
38
  <template if:true={showSpecBasedReference}>
39
- <div class="container">
39
+ <div class="container" if:true={topicModel}>
40
40
  <div class="api-documentation">
41
- <doc-amf-topic model={topicModel}></doc-amf-topic>
41
+ <arc-api-documentation
42
+ amf={topicModel.amf}
43
+ selected={topicModel.id}
44
+ selected-type={topicModel.type}
45
+ no-try-it
46
+ ></arc-api-documentation>
42
47
  </div>
43
48
  </div>
44
49
  </template>
@@ -175,7 +175,7 @@ export default class AmfReference extends LightningElement {
175
175
 
176
176
  connectedCallback(): void {
177
177
  this.addEventListener(
178
- "api-navigation-selection-changed",
178
+ "api_navigation_selection_changed",
179
179
  this._boundOnApiNavigationChanged
180
180
  );
181
181
  window.addEventListener(
@@ -1,12 +1,4 @@
1
1
  import { LightningElement, api } from "lwc";
2
- import {
3
- createDocumentationElement,
4
- createEndpointElement,
5
- createMethodElement,
6
- createSecurityElement,
7
- createSummaryElement,
8
- createTypeElement
9
- } from "./utils";
10
2
  import type { TopicModel } from "./types";
11
3
 
12
4
  export default class AmfTopic extends LightningElement {
@@ -43,43 +35,21 @@ export default class AmfTopic extends LightningElement {
43
35
  update(): void {
44
36
  const container = this.template.querySelector("div.topic-container");
45
37
  const { id } = this.model;
46
- const type = this.type;
47
- const amf = this.amf;
48
- const { parser } = this.model;
49
- let element;
50
38
 
51
- if (type === "summary") {
52
- element = createSummaryElement(amf);
53
- } else if (type === "endpoint") {
54
- const endpointModel = parser.computeEndpointApiModel(amf, id);
55
- element = createEndpointElement(amf, endpointModel, id);
56
- } else if (type === "method") {
57
- const endpointMethodModel = parser.computeEndpointApiMethodModel(
58
- amf,
59
- id
60
- );
61
- const methodModel = parser.computeMethodApiModel(amf, id);
62
- element = createMethodElement(
63
- amf,
64
- endpointMethodModel,
65
- methodModel
66
- );
67
- } else if (type === "security") {
68
- const securityModel = parser.computeSecurityApiModel(amf, id);
69
- element = createSecurityElement(amf, securityModel);
70
- } else if (type === "type") {
71
- const mediaTypes = parser.computeApiMediaTypes(amf);
72
- const typeModel = parser.computeTypeApiModel(amf, id);
73
- element = createTypeElement(amf, typeModel, mediaTypes);
74
- } else if (type === "documentation") {
75
- const docsModel = parser.computeDocsApiModel(amf, id);
76
- element = createDocumentationElement(amf, docsModel);
77
- }
39
+ const element: any = document.createElement("arc-api-documentation");
40
+ element.amf = this.amf;
41
+ element.selected = id;
42
+ element.selectedType = this.type;
43
+ element.noTryIt = true;
44
+ element.inlineMethods = false;
45
+ element.noNavigation = true;
78
46
 
79
- if (container.firstChild) {
80
- container.firstChild.remove();
47
+ if (container) {
48
+ if (container.firstChild) {
49
+ container.firstChild.remove();
50
+ }
51
+ container.appendChild(element);
81
52
  }
82
- container.appendChild(element);
83
53
  }
84
54
  }
85
55
 
@@ -78,8 +78,7 @@ h1 {
78
78
  }
79
79
 
80
80
  h2 {
81
- /* Could not find 32px in typography.css, But P.O wants 32px as per design */
82
- font-size: 32px;
81
+ font-size: var(--dx-g-text-2xl);
83
82
  letter-spacing: -0.6px;
84
83
  line-height: var(--dx-g-spacing-2xl);
85
84
  margin: var(--dx-g-spacing-2xl) 0 var(--dx-g-spacing-md) 0;
@@ -21,15 +21,14 @@ h6 {
21
21
  }
22
22
 
23
23
  .display-4 {
24
- /* Could not find 32px in typography.css, But P.O wants 32px as per design */
25
- font-size: 32px;
24
+ font-size: var(--dx-g-text-2xl);
26
25
  letter-spacing: -0.6px;
27
26
  line-height: var(--dx-g-spacing-2xl);
28
27
  margin: var(--dx-g-spacing-2xl) 0 var(--dx-g-spacing-md) 0;
29
28
  }
30
29
 
31
30
  .display-4 doc-heading-content {
32
- --doc-c-heading-anchor-button-bottom: 4.5px;
31
+ --doc-c-heading-anchor-button-bottom: 3px;
33
32
  }
34
33
 
35
34
  .display-5 {