@salesforcedevs/docs-components 1.3.138-coveo-fix7 → 1.3.138-coveoversion-alpha
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,25 @@ 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
|
+
if (this.versions.length > 1 && this.selectedVersion) {
|
|
149
|
+
const currentGAVersionRef = this.versions[0];
|
|
150
|
+
if (this.selectedVersion.id !== currentGAVersionRef.id) {
|
|
151
|
+
// Currently Coveo only supports query without "v"
|
|
152
|
+
const 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
|
+
}
|
|
163
|
+
|
|
148
164
|
// model
|
|
149
165
|
protected _amfConfigList: AmfConfig[] = [];
|
|
150
166
|
protected _amfConfigMap: Map<string, AmfConfig> = new Map();
|
|
@@ -165,7 +181,7 @@ export default class AmfReference extends LightningElement {
|
|
|
165
181
|
private isParentLevelDocPhaseEnabled = false;
|
|
166
182
|
private selectedReferenceDocPhase?: string | null = null;
|
|
167
183
|
private _expandChildren?: boolean = false;
|
|
168
|
-
private
|
|
184
|
+
private _coveoAdvancedQueryConfig!: { [key: string]: any };
|
|
169
185
|
|
|
170
186
|
/**
|
|
171
187
|
* Key for storing the currently selected reference url. This will be used to save the
|
|
@@ -1260,8 +1276,6 @@ export default class AmfReference extends LightningElement {
|
|
|
1260
1276
|
this.versions = this.getVersions();
|
|
1261
1277
|
if (this.oldVersionInfo) {
|
|
1262
1278
|
this.showVersionBanner = true;
|
|
1263
|
-
this.version = this.getSelectedVersion().id.replace("v", "");
|
|
1264
|
-
console.log("AMF Ref: " + this.version);
|
|
1265
1279
|
}
|
|
1266
1280
|
this.updateDocPhase();
|
|
1267
1281
|
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;
|