@salesforcedevs/docs-components 1.3.139-coveo-fix-test6 → 1.3.139-coveo-fix-test7

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-test6",
3
+ "version": "1.3.139-coveo-fix-test7",
4
4
  "description": "Docs Lightning web components for DSC",
5
5
  "license": "MIT",
6
6
  "main": "index.js",
@@ -14,7 +14,7 @@
14
14
  onexpandcollapse={onExpandCollapse}
15
15
  toc-title={tocTitle}
16
16
  toc-options={tocOptions}
17
- selected-version={curSelectedVersion}
17
+ current-version={currentVersion}
18
18
  enable-slot-change="true"
19
19
  >
20
20
  <doc-phase
@@ -42,6 +42,7 @@ export default class AmfReference extends LightningElement {
42
42
  @track navigation = [];
43
43
  @track versions: Array<ReferenceVersion> = [];
44
44
  @track showVersionBanner = false;
45
+ @api currentVersion: string = "something";
45
46
 
46
47
  // Update this to update what component gets rendered in the content block
47
48
  @track
@@ -110,7 +111,6 @@ export default class AmfReference extends LightningElement {
110
111
  this.oldVersionInfo
111
112
  ) {
112
113
  this.showVersionBanner = true;
113
- this.setCurrentSelectedVersion();
114
114
  }
115
115
  }
116
116
 
@@ -156,7 +156,6 @@ export default class AmfReference extends LightningElement {
156
156
  protected metadata: { [key: string]: AmfMetadataTopic } = {};
157
157
  protected selectedTopic?: AmfMetaTopicType = undefined;
158
158
  protected selectedSidebarValue = undefined;
159
- protected curSelectedVersion = "latest";
160
159
 
161
160
  protected selectedVersion: ReferenceVersion | null = null;
162
161
 
@@ -343,12 +342,6 @@ export default class AmfReference extends LightningElement {
343
342
  return selectedVersion || (versions.length && versions[0]);
344
343
  }
345
344
 
346
- private setCurrentSelectedVersion() {
347
- if (this.showVersionBanner) {
348
- this.curSelectedVersion = this.getSelectedVersion().id;
349
- }
350
- }
351
-
352
345
  private updateAmfConfigInView(): void {
353
346
  if (this._amfConfigList && this._amfConfigList.length) {
354
347
  // fetch AMF Json as soon as config is set
@@ -1265,7 +1258,6 @@ export default class AmfReference extends LightningElement {
1265
1258
  this.versions = this.getVersions();
1266
1259
  if (this.oldVersionInfo) {
1267
1260
  this.showVersionBanner = true;
1268
- this.setCurrentSelectedVersion();
1269
1261
  }
1270
1262
  this.updateDocPhase();
1271
1263
  this.selectedSidebarValue = window.location.pathname;
@@ -22,7 +22,7 @@
22
22
  coveo-search-hub={coveoSearchHub}
23
23
  coveo-advanced-query-config={coveoAdvancedQueryConfig}
24
24
  ontogglesidebar={onToggleSidebar}
25
- selected-version={selectedVersion}
25
+ current-version={currentVersion}
26
26
  >
27
27
  <slot name="sidebar-header" slot="header"></slot>
28
28
  </dx-sidebar>
@@ -35,7 +35,7 @@ export default class ContentLayout extends LightningElement {
35
35
  @api coveoSearchHub!: string;
36
36
  @api coveoAdvancedQueryConfig!: string;
37
37
  @api useOldSidebar?: boolean = false;
38
- @api selectedVersion?: string;
38
+ @api currentVersion?: string;
39
39
 
40
40
  @api
41
41
  get breadcrumbs() {