@salesforcedevs/docs-components 1.3.139-coveo-fix-test3 → 1.3.139-coveo-fix-test5
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
|
@@ -110,6 +110,7 @@ export default class AmfReference extends LightningElement {
|
|
|
110
110
|
this.oldVersionInfo
|
|
111
111
|
) {
|
|
112
112
|
this.showVersionBanner = true;
|
|
113
|
+
this.setCurrentSelectedVersion();
|
|
113
114
|
}
|
|
114
115
|
}
|
|
115
116
|
|
|
@@ -123,7 +124,7 @@ export default class AmfReference extends LightningElement {
|
|
|
123
124
|
}
|
|
124
125
|
|
|
125
126
|
@api
|
|
126
|
-
set coveoAdvancedQueryConfig(config
|
|
127
|
+
set coveoAdvancedQueryConfig(config: CoveoAdvancedQueryXMLConfig) {
|
|
127
128
|
try {
|
|
128
129
|
const coveoConfig =
|
|
129
130
|
typeof config === "string" ? JSON.parse(config) : config;
|
|
@@ -135,12 +136,15 @@ export default class AmfReference extends LightningElement {
|
|
|
135
136
|
topicid: this._currentReferenceId
|
|
136
137
|
};
|
|
137
138
|
}
|
|
139
|
+
console.log(
|
|
140
|
+
"Setting AQ: " + JSON.stringify(this._coveoAdvancedQueryConfig)
|
|
141
|
+
);
|
|
138
142
|
}
|
|
139
|
-
|
|
143
|
+
|
|
140
144
|
private get coveoAdvancedQueryConfig(): CoveoAdvancedQueryXMLConfig {
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
145
|
+
console.log(
|
|
146
|
+
"Getting AQ: " + JSON.stringify(this._coveoAdvancedQueryConfig)
|
|
147
|
+
);
|
|
144
148
|
return this._coveoAdvancedQueryConfig;
|
|
145
149
|
}
|
|
146
150
|
|
|
@@ -178,6 +182,7 @@ export default class AmfReference extends LightningElement {
|
|
|
178
182
|
protected metadata: { [key: string]: AmfMetadataTopic } = {};
|
|
179
183
|
protected selectedTopic?: AmfMetaTopicType = undefined;
|
|
180
184
|
protected selectedSidebarValue = undefined;
|
|
185
|
+
protected curSelectedVersion = "latest";
|
|
181
186
|
|
|
182
187
|
protected selectedVersion: ReferenceVersion | null = null;
|
|
183
188
|
|
|
@@ -364,6 +369,12 @@ export default class AmfReference extends LightningElement {
|
|
|
364
369
|
return selectedVersion || (versions.length && versions[0]);
|
|
365
370
|
}
|
|
366
371
|
|
|
372
|
+
private setCurrentSelectedVersion() {
|
|
373
|
+
if (this.showVersionBanner) {
|
|
374
|
+
this.curSelectedVersion = this.getSelectedVersion().id;
|
|
375
|
+
}
|
|
376
|
+
}
|
|
377
|
+
|
|
367
378
|
private updateAmfConfigInView(): void {
|
|
368
379
|
if (this._amfConfigList && this._amfConfigList.length) {
|
|
369
380
|
// fetch AMF Json as soon as config is set
|
|
@@ -1280,6 +1291,7 @@ export default class AmfReference extends LightningElement {
|
|
|
1280
1291
|
this.versions = this.getVersions();
|
|
1281
1292
|
if (this.oldVersionInfo) {
|
|
1282
1293
|
this.showVersionBanner = true;
|
|
1294
|
+
this.setCurrentSelectedVersion();
|
|
1283
1295
|
}
|
|
1284
1296
|
this.updateDocPhase();
|
|
1285
1297
|
this.selectedSidebarValue = window.location.pathname;
|