@salesforcedevs/docs-components 1.3.139-coveo-alpha → 1.3.139-coveo-fix-test2

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": "1.3.139-coveo-alpha",
3
+ "version": "1.3.139-coveo-fix-test2",
4
4
  "description": "Docs Lightning web components for DSC",
5
5
  "license": "MIT",
6
6
  "main": "index.js",
@@ -122,22 +122,28 @@ export default class AmfReference extends LightningElement {
122
122
  }
123
123
  }
124
124
 
125
- set coveoAdvancedQueryConfig(config) {
126
- this._coveoAdvancedQueryConfig = config;
127
- }
128
- private get coveoAdvancedQueryConfig(): CoveoAdvancedQueryXMLConfig {
125
+ @api
126
+ set coveoAdvancedQueryConfig(config : CoveoAdvancedQueryXMLConfig) {
129
127
  try {
130
- if(this.showVersionBanner) {
131
- this._coveoAdvancedQueryConfig.version = this.getSelectedVersion().id;
132
- } else {
133
- this._coveoAdvancedQueryConfig.version = "latest";
134
- }
135
-
136
- return this._coveoAdvancedQueryConfig;
137
- } catch (error) {
138
- console.log(`Error during version implementation.`)
128
+ const coveoConfig =
129
+ typeof config === "string" ? JSON.parse(config) : config;
130
+ this._coveoAdvancedQueryConfig = coveoConfig;
131
+ } catch (e) {
132
+ this._coveoAdvancedQueryConfig = {
133
+ locale: "en-us",
134
+ version: "latest",
135
+ topicid: this._currentReferenceId
136
+ };
137
+ }
138
+
139
+ if(this.showVersionBanner) {
140
+ this._coveoAdvancedQueryConfig.version = this.getSelectedVersion().id;
139
141
  }
140
142
  }
143
+
144
+ private get coveoAdvancedQueryConfig(): CoveoAdvancedQueryXMLConfig {
145
+ return this._coveoAdvancedQueryConfig;
146
+ }
141
147
 
142
148
  @api
143
149
  get docPhaseInfo() {