@salesforcedevs/docs-components 1.3.139-coveo-fix-test2 → 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-test2",
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,13 +138,15 @@ export default class AmfReference extends LightningElement {
135
138
  topicid: this._currentReferenceId
136
139
  };
137
140
  }
138
-
139
- if(this.showVersionBanner) {
140
- this._coveoAdvancedQueryConfig.version = this.getSelectedVersion().id;
141
- }
141
+ console.log(
142
+ "Setting AQ: " + JSON.stringify(this._coveoAdvancedQueryConfig)
143
+ );
142
144
  }
143
-
145
+
144
146
  private get coveoAdvancedQueryConfig(): CoveoAdvancedQueryXMLConfig {
147
+ console.log(
148
+ "Getting AQ: " + JSON.stringify(this._coveoAdvancedQueryConfig)
149
+ );
145
150
  return this._coveoAdvancedQueryConfig;
146
151
  }
147
152
 
@@ -1281,6 +1286,9 @@ export default class AmfReference extends LightningElement {
1281
1286
  this.versions = this.getVersions();
1282
1287
  if (this.oldVersionInfo) {
1283
1288
  this.showVersionBanner = true;
1289
+ const newCoveoQueryConfig = this._coveoAdvancedQueryConfig;
1290
+ newCoveoQueryConfig.version = this.getSelectedVersion().id;
1291
+ this._coveoAdvancedQueryConfig = newCoveoQueryConfig;
1284
1292
  }
1285
1293
  this.updateDocPhase();
1286
1294
  this.selectedSidebarValue = window.location.pathname;