@salesforcedevs/docs-components 1.3.122 → 1.3.123

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.122",
3
+ "version": "1.3.123",
4
4
  "description": "Docs Lightning web components for DSC",
5
5
  "license": "MIT",
6
6
  "main": "index.js",
@@ -24,5 +24,5 @@
24
24
  "@types/lodash.orderby": "^4.6.7",
25
25
  "@types/lodash.uniqby": "^4.7.7"
26
26
  },
27
- "gitHead": "9741a2ed52c5106459cb1bd807bafac9aff25ff3"
27
+ "gitHead": "3422495fd1b10fb79493d4c5c599c27ba238f7ff"
28
28
  }
@@ -6,6 +6,7 @@
6
6
  trees={sidebarContent}
7
7
  value={sidebarValue}
8
8
  header={sidebarHeader}
9
+ ontogglesidebar={onToggleSidebar}
9
10
  >
10
11
  <slot name="sidebar-header" slot="header"></slot>
11
12
  </dx-sidebar-old>
@@ -20,6 +21,7 @@
20
21
  coveo-public-access-token={coveoPublicAccessToken}
21
22
  coveo-search-hub={coveoSearchHub}
22
23
  coveo-advanced-query-config={coveoAdvancedQueryConfig}
24
+ ontogglesidebar={onToggleSidebar}
23
25
  >
24
26
  <slot name="sidebar-header" slot="header"></slot>
25
27
  </dx-sidebar>
@@ -83,6 +83,7 @@ export default class ContentLayout extends LightningElement {
83
83
  private observer?: IntersectionObserver;
84
84
  private hasRendered: boolean = false;
85
85
  private contentLoaded: boolean = false;
86
+ private sidebarOpen: boolean = false;
86
87
 
87
88
  get shouldDisplayFeedback() {
88
89
  return this.contentLoaded && typeof Sprig !== "undefined";
@@ -185,7 +186,7 @@ export default class ContentLayout extends LightningElement {
185
186
  }
186
187
  };
187
188
 
188
- /*
189
+ /*
189
190
  This is a workaround for the global nav sticky header being decoupled from the doc header & doc phase.
190
191
  We have to account for the global nav changing height due to animations.
191
192
  */
@@ -391,4 +392,15 @@ export default class ContentLayout extends LightningElement {
391
392
  this.setSidebarInputValue(nextSearchParam);
392
393
  this.dispatchHighlightChange(nextSearchParam);
393
394
  }
395
+
396
+ private onToggleSidebar(e: CustomEvent): void {
397
+ this.sidebarOpen = e.detail.open;
398
+
399
+ // eslint-disable-next-line @lwc/lwc/no-document-query
400
+ const footer = document.querySelector("dx-footer") as HTMLElement;
401
+
402
+ if (footer) {
403
+ footer.style.display = this.sidebarOpen ? "none" : "block";
404
+ }
405
+ }
394
406
  }