@salesforcedevs/docs-components 0.55.6 → 0.55.7

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.55.6",
3
+ "version": "0.55.7",
4
4
  "description": "Docs Lightning web components for DSC",
5
5
  "license": "MIT",
6
6
  "main": "index.js",
@@ -24,5 +24,5 @@
24
24
  "@types/lodash.orderby": "^4.6.7",
25
25
  "@types/lodash.uniqby": "^4.7.7"
26
26
  },
27
- "gitHead": "1282a111935db22cc38409dd247f72cba86fa131"
27
+ "gitHead": "91a0fb158be75ba597dc240fce61784cd0cb74af"
28
28
  }
@@ -1,5 +1,5 @@
1
1
  import { api, track } from "lwc";
2
- import { toJson } from "dxUtils/normalizers";
2
+ import { normalizeBoolean, toJson } from "dxUtils/normalizers";
3
3
  import { FetchContent } from "./utils";
4
4
  import {
5
5
  CoveoAdvancedQueryXMLConfig,
@@ -35,6 +35,15 @@ export default class DocXmlContent extends LightningElementWithState<{
35
35
  this._labels = toJson(value);
36
36
  }
37
37
 
38
+ @api
39
+ get enableCoveo() {
40
+ return this._enableCoveo;
41
+ }
42
+
43
+ set enableCoveo(value) {
44
+ this._enableCoveo = normalizeBoolean(value);
45
+ }
46
+
38
47
  private _labels: Labels = null;
39
48
  private availableLanguages: Array<DocLanguage> = [];
40
49
  private availableVersions: Array<DocVersion> = [];
@@ -51,6 +60,8 @@ export default class DocXmlContent extends LightningElementWithState<{
51
60
  private _pathName = "";
52
61
  private _pageHeader?: Header;
53
62
  private listenerAttached = false;
63
+ private _enableCoveo?: boolean = false;
64
+
54
65
  private searchSyncer = new SearchSyncer({
55
66
  callbacks: {
56
67
  onSearchChange: (nextSearchString: string): void => {
@@ -184,8 +195,9 @@ export default class DocXmlContent extends LightningElementWithState<{
184
195
  // Coveo is enabled and the version is greater than 51 (within the latest 3 versions)
185
196
  // TODO: we need a better fix for version number check
186
197
  return !(
187
- process.env.COVEO_ORGANIZATION_ID &&
188
- process.env.COVEO_PUBLIC_ACCESS_TOKEN &&
198
+ this.enableCoveo &&
199
+ this.coveoOrganizationId &&
200
+ this.coveoPublicAccessToken &&
189
201
  (!this.version?.releaseVersion ||
190
202
  (this.version?.releaseVersion &&
191
203
  parseInt(this.version.releaseVersion.replace("v", ""), 10) >