@salesforcedevs/docs-components 1.3.139-coveo-fix-test3 → 1.3.139-coveo-fix-test4

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-fix-test3",
3
+ "version": "1.3.139-coveo-fix-test4",
4
4
  "description": "Docs Lightning web components for DSC",
5
5
  "license": "MIT",
6
6
  "main": "index.js",
@@ -110,6 +110,9 @@ export default class AmfReference extends LightningElement {
110
110
  this.oldVersionInfo
111
111
  ) {
112
112
  this.showVersionBanner = true;
113
+ const newCoveoQueryConfig = this._coveoAdvancedQueryConfig;
114
+ newCoveoQueryConfig.version = selectedVersion.id;
115
+ this._coveoAdvancedQueryConfig = newCoveoQueryConfig;
113
116
  }
114
117
  }
115
118
 
@@ -123,7 +126,7 @@ export default class AmfReference extends LightningElement {
123
126
  }
124
127
 
125
128
  @api
126
- set coveoAdvancedQueryConfig(config : CoveoAdvancedQueryXMLConfig) {
129
+ set coveoAdvancedQueryConfig(config: CoveoAdvancedQueryXMLConfig) {
127
130
  try {
128
131
  const coveoConfig =
129
132
  typeof config === "string" ? JSON.parse(config) : config;
@@ -135,12 +138,15 @@ export default class AmfReference extends LightningElement {
135
138
  topicid: this._currentReferenceId
136
139
  };
137
140
  }
141
+ console.log(
142
+ "Setting AQ: " + JSON.stringify(this._coveoAdvancedQueryConfig)
143
+ );
138
144
  }
139
-
145
+
140
146
  private get coveoAdvancedQueryConfig(): CoveoAdvancedQueryXMLConfig {
141
- if(this.showVersionBanner) {
142
- this._coveoAdvancedQueryConfig.version = this.getSelectedVersion().id;
143
- }
147
+ console.log(
148
+ "Getting AQ: " + JSON.stringify(this._coveoAdvancedQueryConfig)
149
+ );
144
150
  return this._coveoAdvancedQueryConfig;
145
151
  }
146
152
 
@@ -1280,6 +1286,9 @@ export default class AmfReference extends LightningElement {
1280
1286
  this.versions = this.getVersions();
1281
1287
  if (this.oldVersionInfo) {
1282
1288
  this.showVersionBanner = true;
1289
+ const newCoveoQueryConfig = this._coveoAdvancedQueryConfig;
1290
+ newCoveoQueryConfig.version = this.getSelectedVersion().id;
1291
+ this._coveoAdvancedQueryConfig = newCoveoQueryConfig;
1283
1292
  }
1284
1293
  this.updateDocPhase();
1285
1294
  this.selectedSidebarValue = window.location.pathname;