@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 +2 -2
- package/src/modules/doc/content/content.ts +3 -5
- package/src/modules/doc/header/__tests__/coveoConfig.ts +2 -8
- package/src/modules/doc/header/__tests__/mockProps.ts +1 -1
- package/src/modules/doc/header/header.css +2 -1
- package/src/modules/doc/header/header.html +1 -1
- package/src/modules/doc/phase/phase.ts +5 -5
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@salesforcedevs/docs-components",
|
|
3
|
-
"version": "0.
|
|
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": "
|
|
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
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
...
|
|
5
|
+
...coveoHeaderConfig
|
|
12
6
|
};
|
|
@@ -12,7 +12,7 @@ import {
|
|
|
12
12
|
mockNavService,
|
|
13
13
|
mockNavAnalytics
|
|
14
14
|
} from "./mockNavs";
|
|
15
|
-
import
|
|
15
|
+
import coveoConfig from "./coveoConfig";
|
|
16
16
|
import mockNavDevelopers from "./mockNavDevelopers";
|
|
17
17
|
import { Option } from "typings/custom";
|
|
18
18
|
|
|
@@ -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
|
|
8
|
+
_docPhaseInfo: DocPhaseInfo | null = null;
|
|
9
9
|
|
|
10
10
|
isBodyHidden = false;
|
|
11
11
|
|
|
12
12
|
get docPhaseTitle() {
|
|
13
|
-
return this.docPhaseInfo
|
|
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
|
}
|