@salesforcedevs/docs-components 1.14.8-ldh-alpha6 → 1.14.8-ldh-alpha7

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.14.8-ldh-alpha6",
3
+ "version": "1.14.8-ldh-alpha7",
4
4
  "description": "Docs Lightning web components for DSC",
5
5
  "license": "MIT",
6
6
  "main": "index.js",
@@ -6,6 +6,7 @@
6
6
  lwc:if={showBanner}
7
7
  banner-markup={bannerMarkup}
8
8
  ></dx-banner>
9
+ <!-- To-Do: Move the devCenter as a new component and use it here, as devCenter is also used in Sidebar now -->
9
10
  <div lwc:if={devCenter} class="dev-center-link">
10
11
  <a href={devCenter.link} class="dev-center-content">
11
12
  <dx-icon symbol="back"></dx-icon>
@@ -1,6 +1,6 @@
1
1
  import { api } from "lwc";
2
2
  import cx from "classnames";
3
- import type { OptionWithNested } from "typings/custom";
3
+ import type { OptionWithNested, DevCenterConfig } from "typings/custom";
4
4
  import { HeaderBase } from "dxBaseElements/headerBase";
5
5
  import { toJson, normalizeBoolean } from "dxUtils/normalizers";
6
6
 
@@ -37,7 +37,7 @@ export default class Header extends HeaderBase {
37
37
  }
38
38
 
39
39
  @api
40
- get devCenter() {
40
+ get devCenter(): DevCenterConfig {
41
41
  return this._devCenter;
42
42
  }
43
43
 
@@ -50,7 +50,7 @@ export default class Header extends HeaderBase {
50
50
  private tabletMatchMedia!: MediaQueryList;
51
51
  private shouldRender: boolean = false;
52
52
  private showDocDivider: boolean = false;
53
- private _devCenter: any;
53
+ private _devCenter!: DevCenterConfig;
54
54
  private _hideDocHeader: boolean = false;
55
55
 
56
56
  protected mobileBreakpoint(): string {
@@ -65,6 +65,10 @@ export default class Header extends HeaderBase {
65
65
  );
66
66
  }
67
67
 
68
+ /**
69
+ * This function returns true if the hideDocHeader is true and the view is not mobile.
70
+ * Also we need to show the header border in case the doc is hidden or if the brand information doesn't exists.
71
+ */
68
72
  private get isHideHeader(): boolean {
69
73
  return (this.hideDocHeader && !this.mobile) || this.showDocDivider;
70
74
  }