@salesforcedevs/docs-components 1.3.138-coveo-fix7 → 1.3.138-coveo1
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
|
@@ -3,7 +3,7 @@ import { noCase } from "no-case";
|
|
|
3
3
|
import { sentenceCase } from "sentence-case";
|
|
4
4
|
import qs from "query-string";
|
|
5
5
|
import { AmfModelParser } from "./utils";
|
|
6
|
-
import { normalizeBoolean } from "dxUtils/normalizers";
|
|
6
|
+
import { normalizeBoolean, toJson } from "dxUtils/normalizers";
|
|
7
7
|
import type {
|
|
8
8
|
AmfConfig,
|
|
9
9
|
AmfMetadataTopic,
|
|
@@ -34,7 +34,6 @@ export default class AmfReference extends LightningElement {
|
|
|
34
34
|
@api sidebarHeader!: string;
|
|
35
35
|
@api coveoOrganizationId!: string;
|
|
36
36
|
@api coveoPublicAccessToken!: string;
|
|
37
|
-
@api coveoAdvancedQueryConfig!: string;
|
|
38
37
|
@api coveoSearchHub!: string;
|
|
39
38
|
@api useOldSidebar?: boolean = false;
|
|
40
39
|
@api tocTitle?: string;
|
|
@@ -110,8 +109,6 @@ export default class AmfReference extends LightningElement {
|
|
|
110
109
|
this.oldVersionInfo
|
|
111
110
|
) {
|
|
112
111
|
this.showVersionBanner = true;
|
|
113
|
-
this.version = this.selectedVersion.id.replace("v", "");
|
|
114
|
-
console.log("AMF Ref: " + this.version);
|
|
115
112
|
}
|
|
116
113
|
}
|
|
117
114
|
|
|
@@ -145,6 +142,24 @@ export default class AmfReference extends LightningElement {
|
|
|
145
142
|
this._expandChildren = normalizeBoolean(value);
|
|
146
143
|
}
|
|
147
144
|
|
|
145
|
+
@api
|
|
146
|
+
get coveoAdvancedQueryConfig(): { [key: string]: any } {
|
|
147
|
+
const coveoConfig = this._coveoAdvancedQueryConfig;
|
|
148
|
+
let version = "latest";
|
|
149
|
+
if (this.versions.length > 1 && this.selectedVersion) {
|
|
150
|
+
const currentGAVersionRef = this.versions[0];
|
|
151
|
+
if (this.selectedVersion.id !== currentGAVersionRef.id) {
|
|
152
|
+
version = this.selectedVersion.id.replace("v", "");
|
|
153
|
+
coveoConfig.version = version;
|
|
154
|
+
this._coveoAdvancedQueryConfig = coveoConfig;
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
return this._coveoAdvancedQueryConfig;
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
set coveoAdvancedQueryConfig(config) {
|
|
161
|
+
this._coveoAdvancedQueryConfig = toJson(config);
|
|
162
|
+
}
|
|
148
163
|
// model
|
|
149
164
|
protected _amfConfigList: AmfConfig[] = [];
|
|
150
165
|
protected _amfConfigMap: Map<string, AmfConfig> = new Map();
|
|
@@ -165,7 +180,7 @@ export default class AmfReference extends LightningElement {
|
|
|
165
180
|
private isParentLevelDocPhaseEnabled = false;
|
|
166
181
|
private selectedReferenceDocPhase?: string | null = null;
|
|
167
182
|
private _expandChildren?: boolean = false;
|
|
168
|
-
private
|
|
183
|
+
private _coveoAdvancedQueryConfig!: { [key: string]: any };
|
|
169
184
|
|
|
170
185
|
/**
|
|
171
186
|
* Key for storing the currently selected reference url. This will be used to save the
|
|
@@ -1260,8 +1275,6 @@ export default class AmfReference extends LightningElement {
|
|
|
1260
1275
|
this.versions = this.getVersions();
|
|
1261
1276
|
if (this.oldVersionInfo) {
|
|
1262
1277
|
this.showVersionBanner = true;
|
|
1263
|
-
this.version = this.getSelectedVersion().id.replace("v", "");
|
|
1264
|
-
console.log("AMF Ref: " + this.version);
|
|
1265
1278
|
}
|
|
1266
1279
|
this.updateDocPhase();
|
|
1267
1280
|
this.selectedSidebarValue = window.location.pathname;
|
|
@@ -29,7 +29,6 @@ export default class ContentLayout extends LightningElement {
|
|
|
29
29
|
@api sidebarValue: string;
|
|
30
30
|
@api sidebarHeader: string;
|
|
31
31
|
@api tocTitle: string;
|
|
32
|
-
@api version!: string;
|
|
33
32
|
@api enableSlotChange = false;
|
|
34
33
|
@api coveoOrganizationId!: string;
|
|
35
34
|
@api coveoPublicAccessToken!: string;
|