@salesforcedevs/dx-components 0.10.1-alpha.133 → 0.10.1-alpha.134
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
|
@@ -36,9 +36,19 @@ export default class SidebarSearch extends LightningElement {
|
|
|
36
36
|
get coveoAdvancedQueryConfig(): { [key: string]: any } {
|
|
37
37
|
return this._coveoAdvancedQueryConfig;
|
|
38
38
|
}
|
|
39
|
-
set coveoAdvancedQueryConfig(value) {
|
|
40
|
-
console.log('set coveoAdvancedQueryConfig', value.sfrelease__c, value.sflanguage)
|
|
39
|
+
set coveoAdvancedQueryConfig(value: string) {
|
|
41
40
|
this._coveoAdvancedQueryConfig = toJson(value);
|
|
41
|
+
|
|
42
|
+
if (
|
|
43
|
+
this._coveoAdvancedQueryConfigValue &&
|
|
44
|
+
value !== this._coveoAdvancedQueryConfigValue &&
|
|
45
|
+
this.engine
|
|
46
|
+
) {
|
|
47
|
+
// set adnvanced filters needs access to the latest coveoAdvancedQueryConfig
|
|
48
|
+
this.setAdvancedFilters(this.engine);
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
this._coveoAdvancedQueryConfigValue = value;
|
|
42
52
|
}
|
|
43
53
|
|
|
44
54
|
@api
|
|
@@ -54,7 +64,8 @@ export default class SidebarSearch extends LightningElement {
|
|
|
54
64
|
this.value = searchTerm || "";
|
|
55
65
|
}
|
|
56
66
|
|
|
57
|
-
private
|
|
67
|
+
private _coveoAdvancedQueryConfigValue!: string;
|
|
68
|
+
private _coveoAdvancedQueryConfig!: { [key: string]: any };
|
|
58
69
|
private dropdownRequestedOpen: boolean = false;
|
|
59
70
|
private recentSearches: Option[] = [];
|
|
60
71
|
private resultList: ResultList | null = null;
|
|
@@ -117,16 +128,6 @@ export default class SidebarSearch extends LightningElement {
|
|
|
117
128
|
);
|
|
118
129
|
}
|
|
119
130
|
|
|
120
|
-
const queryConfigValue = JSON.stringify(this.coveoAdvancedQueryConfig);
|
|
121
|
-
console.log('query config value', queryConfigValue);
|
|
122
|
-
if (this.queryConfigValue !== queryConfigValue) {
|
|
123
|
-
if (this.queryConfigValue && this.engine) {
|
|
124
|
-
console.log('setting query config again')
|
|
125
|
-
this.setAdvancedFilters(this.engine);
|
|
126
|
-
}
|
|
127
|
-
this.queryConfigValue = queryConfigValue;
|
|
128
|
-
}
|
|
129
|
-
|
|
130
131
|
// If this is the first render and there is a search value, trigger
|
|
131
132
|
// term highlighting
|
|
132
133
|
if (!this.didRender && this.value) {
|
|
@@ -252,6 +253,7 @@ export default class SidebarSearch extends LightningElement {
|
|
|
252
253
|
};
|
|
253
254
|
|
|
254
255
|
private setAdvancedFilters(engine: SearchEngine) {
|
|
256
|
+
console.log('setting advanced filters')
|
|
255
257
|
const aq = Object.entries(this.coveoAdvancedQueryConfig).reduce(
|
|
256
258
|
(result, [key, value]) =>
|
|
257
259
|
`${result}(@${key}=="${normalizeCoveoAdvancedQueryValue(
|