@salesforcedevs/docs-components 1.3.138-coveo-alpha2 → 1.3.138-coveo-alpha3

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.138-coveo-alpha2",
3
+ "version": "1.3.138-coveo-alpha3",
4
4
  "description": "Docs Lightning web components for DSC",
5
5
  "license": "MIT",
6
6
  "main": "index.js",
@@ -5,8 +5,8 @@
5
5
  coveo-organization-id={coveoOrganizationId}
6
6
  coveo-public-access-token={coveoPublicAccessToken}
7
7
  coveo-search-hub={coveoSearchHub}
8
- coveo-advanced-query-config={coveoAdvancedQueryConfig}
9
8
  version={versionForCoveo}
9
+ coveo-advanced-query-config={coveoAdvancedQueryConfig}
10
10
  breadcrumbs={breadcrumbs}
11
11
  sidebar-header={sidebarHeader}
12
12
  sidebar-value={selectedSidebarValue}
@@ -17,7 +17,7 @@
17
17
  trees={sidebarContent}
18
18
  value={sidebarValue}
19
19
  header={sidebarHeader}
20
- coveo-organization-id={coveoOrganizationId}
20
+ coveo-organization-id={getUpdateCoveoQuery}
21
21
  coveo-public-access-token={coveoPublicAccessToken}
22
22
  coveo-search-hub={coveoSearchHub}
23
23
  coveo-advanced-query-config={coveoAdvancedQueryConfig}
@@ -83,18 +83,10 @@ export default class ContentLayout extends LightningElement {
83
83
 
84
84
  @api
85
85
  set coveoAdvancedQueryConfig(config) {
86
- const coveoConfig = toJson(config);
87
- if (this._newVersion !== "latest") {
88
- coveoConfig.version = this._newVersion;
89
- }
90
- this._coveoAdvancedQueryConfig = coveoConfig;
86
+ this._coveoAdvancedQueryConfig = config;
91
87
  }
92
88
 
93
89
  get coveoAdvancedQueryConfig() {
94
- console.log(
95
- "AQ Content Layout: " +
96
- JSON.stringify(this._coveoAdvancedQueryConfig)
97
- );
98
90
  return this._coveoAdvancedQueryConfig;
99
91
  }
100
92
 
@@ -154,6 +146,23 @@ export default class ContentLayout extends LightningElement {
154
146
  );
155
147
  }
156
148
 
149
+ private getUpdateCoveoQuery() {
150
+ console.log(
151
+ "Content-Layout Before: " +
152
+ JSON.stringify(this._coveoAdvancedQueryConfig)
153
+ );
154
+ const coveoConfig = toJson(this._coveoAdvancedQueryConfig);
155
+ if (this._newVersion !== "latest") {
156
+ coveoConfig.version = this._newVersion;
157
+ }
158
+ this._coveoAdvancedQueryConfig = coveoConfig;
159
+ console.log(
160
+ "After Content-Layout: " +
161
+ JSON.stringify(this._coveoAdvancedQueryConfig)
162
+ );
163
+ return this._coveoAdvancedQueryConfig;
164
+ }
165
+
157
166
  connectedCallback(): void {
158
167
  const hasParentHighlightListener = closest(
159
168
  "doc-xml-content",