@salesforcedevs/docs-components 0.18.0 → 0.19.4

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": "0.18.0",
3
+ "version": "0.19.4",
4
4
  "description": "Docs Lightning web components for DSC",
5
5
  "license": "MIT",
6
6
  "main": "index.js",
@@ -14,5 +14,5 @@
14
14
  "publishConfig": {
15
15
  "access": "public"
16
16
  },
17
- "gitHead": "d211c35163de06a1f77f0450391639278661a481"
17
+ "gitHead": "39c2b11a0335b375a640ee0c5dcd9bf778bf89bb"
18
18
  }
@@ -170,6 +170,7 @@ export default class Content extends LightningElement {
170
170
  // Modify links to work with any domain, links that start with "#" are excluded
171
171
  const anchorEls =
172
172
  templateEl.content.querySelectorAll("a:not([href^='#'])");
173
+
173
174
  anchorEls.forEach((anchorEl) => {
174
175
  if (
175
176
  anchorEl.textContent.includes("Next →") ||
@@ -182,6 +183,10 @@ export default class Content extends LightningElement {
182
183
  }
183
184
  }
184
185
 
186
+ if (!anchorEl.href.includes("/docs/")) {
187
+ anchorEl.href = "/docs/" + anchorEl.href;
188
+ }
189
+
185
190
  const href = anchorEl.href.split("/");
186
191
  if (
187
192
  (href[3] === this.pageReference.docId && this.isStorybook) ||
@@ -1,12 +1,6 @@
1
- // TODO: Move coveoConfig to a specific module to share it.
2
- export const coveoConfig = {
3
- coveoOrganizationId: "coveosalesforcetestakshatha",
4
- coveoPublicAccessToken: "xx8d9c92ef-1018-4d92-a3c7-647dff01c21c",
5
- coveoSearchPipeline: "salesforcedevdoc",
6
- coveoSearchHub: "salesforcedevdoc"
7
- };
1
+ import { coveoHeaderConfig } from "../../../../../../dx-components/src/modules/utils/coveo/coveo";
8
2
 
9
3
  export default {
10
4
  mobile: false,
11
- ...coveoConfig
5
+ ...coveoHeaderConfig
12
6
  };
@@ -12,7 +12,7 @@ import {
12
12
  mockNavService,
13
13
  mockNavAnalytics
14
14
  } from "./mockNavs";
15
- import { coveoConfig } from "./coveoConfig";
15
+ import coveoConfig from "./coveoConfig";
16
16
  import mockNavDevelopers from "./mockNavDevelopers";
17
17
  import { Option } from "typings/custom";
18
18
 
@@ -57,7 +57,8 @@ header:not(.has-brand) > .header_l2 {
57
57
  }
58
58
 
59
59
  @media (max-width: 740px) {
60
- .header_l2 {
60
+ .has-nav-items .header_l2 {
61
+ height: initial;
61
62
  padding: 0;
62
63
  flex-wrap: wrap;
63
64
  }
@@ -5,16 +5,16 @@ import { DocPhaseInfo } from "typings/custom";
5
5
  import { toJson } from "utils/normalizers";
6
6
 
7
7
  export default class Phase extends LightningElement {
8
- _docPhaseInfo!: DocPhaseInfo;
8
+ _docPhaseInfo: DocPhaseInfo | null = null;
9
9
 
10
10
  isBodyHidden = false;
11
11
 
12
12
  get docPhaseTitle() {
13
- return this.docPhaseInfo.title;
13
+ return this.docPhaseInfo?.title;
14
14
  }
15
15
 
16
16
  @api
17
- get docPhaseInfo(): DocPhaseInfo {
17
+ get docPhaseInfo(): DocPhaseInfo | null {
18
18
  return this._docPhaseInfo;
19
19
  }
20
20
 
@@ -23,7 +23,7 @@ export default class Phase extends LightningElement {
23
23
  }
24
24
 
25
25
  get hideBodyText() {
26
- return this.isBodyHidden ? "Show" : "Hide"
26
+ return this.isBodyHidden ? "Show" : "Hide";
27
27
  }
28
28
 
29
29
  get className() {
@@ -45,7 +45,7 @@ export default class Phase extends LightningElement {
45
45
  renderedCallback() {
46
46
  const phaseBodyContainer =
47
47
  this.template.querySelector(".doc-phase-body");
48
- if (phaseBodyContainer) {
48
+ if (phaseBodyContainer && this.docPhaseInfo) {
49
49
  // eslint-disable-next-line @lwc/lwc/no-inner-html
50
50
  phaseBodyContainer.innerHTML = this.docPhaseInfo.body;
51
51
  }