@salesforcedevs/docs-components 1.3.139-coveo-fix-1 → 1.3.139-coveo-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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@salesforcedevs/docs-components",
3
- "version": "1.3.139-coveo-fix-1",
3
+ "version": "1.3.139-coveo-alpha",
4
4
  "description": "Docs Lightning web components for DSC",
5
5
  "license": "MIT",
6
6
  "main": "index.js",
@@ -16,7 +16,8 @@ import type {
16
16
  ReferenceSetConfig,
17
17
  AmfMetaTopicType,
18
18
  RouteMeta,
19
- ParsedMarkdownTopic
19
+ ParsedMarkdownTopic,
20
+ CoveoAdvancedQueryXMLConfig
20
21
  } from "./types";
21
22
 
22
23
  import {
@@ -121,16 +122,18 @@ export default class AmfReference extends LightningElement {
121
122
  }
122
123
  }
123
124
 
124
- private get coveoAdvancedQueryConfig(config: string): string {
125
+ set coveoAdvancedQueryConfig(config) {
126
+ this._coveoAdvancedQueryConfig = config;
127
+ }
128
+ private get coveoAdvancedQueryConfig(): CoveoAdvancedQueryXMLConfig {
125
129
  try {
126
- const coveoAgConfig = JSON.parse(config);
127
130
  if(this.showVersionBanner) {
128
- coveoAgConfig.version = this.getSelectedVersion();
131
+ this._coveoAdvancedQueryConfig.version = this.getSelectedVersion().id;
129
132
  } else {
130
- coveoAgConfig.version = "latest";
133
+ this._coveoAdvancedQueryConfig.version = "latest";
131
134
  }
132
135
 
133
- return JSON.stringify(coveoAgConfig);
136
+ return this._coveoAdvancedQueryConfig;
134
137
  } catch (error) {
135
138
  console.log(`Error during version implementation.`)
136
139
  }
@@ -162,6 +165,7 @@ export default class AmfReference extends LightningElement {
162
165
  protected _amfConfigMap: Map<string, AmfConfig> = new Map();
163
166
  protected _referenceSetConfig!: ReferenceSetConfig;
164
167
  protected _currentReferenceId = "";
168
+ protected _coveoAdvancedQueryConfig!: CoveoAdvancedQueryXMLConfig;
165
169
 
166
170
  protected parentReferenceUrls = [];
167
171
  protected amfMap: Record<string, AmfModelRecord> = {};
@@ -8,6 +8,12 @@ export interface AmfTopicType {
8
8
  type: string;
9
9
  }
10
10
 
11
+ export type CoveoAdvancedQueryXMLConfig = {
12
+ locale?: string;
13
+ version?: string;
14
+ topicid?: string;
15
+ };
16
+
11
17
  export interface AmfMetadataTopic extends AmfTopicType {
12
18
  meta: string;
13
19
  identifier: string;