@salesforcedevs/docs-components 1.3.72-canary.1 → 1.3.74-lwc-example

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 CHANGED
@@ -2,7 +2,9 @@
2
2
  "modules": [
3
3
  { "dir": "src/modules" },
4
4
  { "npm": "@salesforcedevs/dx-components" },
5
- { "npm": "@salesforcedevs/dw-components" }
5
+ { "npm": "@salesforcedevs/dw-components" },
6
+ { "npm": "lightning-base-components" },
7
+ { "npm": "@mulesoft/api-console-lwc" }
6
8
  ],
7
9
  "expose": [
8
10
  "doc/amfReference",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@salesforcedevs/docs-components",
3
- "version": "1.3.72-canary.1",
3
+ "version": "1.3.74-lwc-example",
4
4
  "description": "Docs Lightning web components for DSC",
5
5
  "license": "MIT",
6
6
  "main": "index.js",
@@ -12,14 +12,18 @@
12
12
  },
13
13
  "dependencies": {
14
14
  "@api-components/amf-helper-mixin": "^4.5.17",
15
+ "@mulesoft/api-console-lwc": "^0.2.28",
15
16
  "classnames": "^2.2.6",
17
+ "cpx": "^1.5.0",
16
18
  "kagekiri": "^1.4.1",
19
+ "lightning-base-components": "1.15.4-alpha",
17
20
  "lodash.orderby": "^4.6.0",
18
21
  "lodash.uniqby": "^4.7.0",
19
22
  "query-string": "^7.1.1",
20
23
  "sentence-case": "^3.0.4"
21
24
  },
22
25
  "devDependencies": {
26
+ "@salesforce-ux/design-system": "^2.19.0",
23
27
  "@types/classnames": "^2.2.10",
24
28
  "@types/lodash.orderby": "^4.6.7",
25
29
  "@types/lodash.uniqby": "^4.7.7"
@@ -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>
@@ -177,7 +177,7 @@ export default class AmfReference extends LightningElement {
177
177
 
178
178
  connectedCallback(): void {
179
179
  this.addEventListener(
180
- "api-navigation-selection-changed",
180
+ "api_navigation_selection_changed",
181
181
  this._boundOnApiNavigationChanged
182
182
  );
183
183
  window.addEventListener(
@@ -188,7 +188,7 @@ export default class AmfReference extends LightningElement {
188
188
 
189
189
  disconnectedCallback(): void {
190
190
  this.removeEventListener(
191
- "api-navigation-selection-changed",
191
+ "api_navigation_selection_changed",
192
192
  this._boundOnApiNavigationChanged
193
193
  );
194
194
  window.removeEventListener(
@@ -42,7 +42,10 @@
42
42
  class="header-tbid-login"
43
43
  onclick={closeMobileNavMenu}
44
44
  >
45
- <dw-tbid-login-menu tbid-api-base-url={tbidApiBaseUrl} tbid-base-url={tbidBaseUrl}></dw-tbid-login-menu>
45
+ <dw-tbid-login-menu
46
+ tbid-api-base-url={tbidApiBaseUrl}
47
+ tbid-base-url={tbidBaseUrl}
48
+ ></dw-tbid-login-menu>
46
49
  </div>
47
50
  <div if:true={showSignup} class="header-login-signup">
48
51
  <dx-button
@@ -685,5 +685,30 @@ export default class DocXmlContent extends LightningElementWithState<{
685
685
  );
686
686
  }
687
687
  }
688
+
689
+ this.addNoIndexMetaForOlderDocVersions();
690
+ }
691
+
692
+ /**
693
+ * Method adds noindex, follow meta tag to the older Couch DB doc pages.
694
+ * Fixes W-12547462.
695
+ */
696
+ private addNoIndexMetaForOlderDocVersions() {
697
+ // eslint-disable-next-line @lwc/lwc/no-document-query
698
+ const headTag = document.getElementsByTagName("head");
699
+ // this checks if the selected version is not the latest version,
700
+ // then it adds the noindex, follow meta tag to the older version pages.
701
+ // assumption is that first version in the availableVersions array is the latest.
702
+ if (
703
+ headTag.length &&
704
+ this.version &&
705
+ this.availableVersions.length &&
706
+ this.version.id !== this.availableVersions[0].id
707
+ ) {
708
+ const robotsMeta = document.createElement("meta");
709
+ robotsMeta.setAttribute("name", "robots");
710
+ robotsMeta.setAttribute("content", "noindex, follow");
711
+ headTag[0].appendChild(robotsMeta);
712
+ }
688
713
  }
689
714
  }