@salesforcedevs/docs-components 0.17.1 → 0.19.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": "0.17.1",
3
+ "version": "0.19.2",
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": "53a3b2f6fa7d61fee0305c6bfd272f4806a662fa"
17
+ "gitHead": "8bfc13904276093b75868ad2c4d9003d74873fbb"
18
18
  }
@@ -7,7 +7,7 @@ import ContentMedia from "doc/contentMedia";
7
7
  import Button from "dx/button";
8
8
  import { highlightTerms } from "utils/highlight";
9
9
 
10
- const ALLOWED_ELEMENTS = [
10
+ const HIGHLIGHTABLE_SELECTOR = [
11
11
  "p",
12
12
  ".p",
13
13
  ".shortdesc",
@@ -21,7 +21,7 @@ const ALLOWED_ELEMENTS = [
21
21
  "dl",
22
22
  "th",
23
23
  "td"
24
- ];
24
+ ].join(",");
25
25
 
26
26
  const LANGUAGE_MAP: { [key: string]: string } = {
27
27
  js: "javascript"
@@ -334,9 +334,7 @@ export default class Content extends LightningElement {
334
334
 
335
335
  updateHighlighted = (event: any) =>
336
336
  highlightTerms(
337
- Array.from(
338
- this.template.querySelectorAll(ALLOWED_ELEMENTS.join(","))
339
- ),
337
+ this.template.querySelectorAll(HIGHLIGHTABLE_SELECTOR),
340
338
  event.detail
341
339
  );
342
340
 
@@ -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
  }
@@ -1,7 +1,7 @@
1
1
  <template>
2
2
  <dx-brand-theme-provider brand={brand}>
3
3
  <header class={className}>
4
- <dx-banner
4
+ <dx-banner
5
5
  if:true={bannerMarkup}
6
6
  banner-markup={bannerMarkup}
7
7
  ></dx-banner>
@@ -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
  }