@salesforcedevs/dx-components 1.3.194-langpicker17-alpha → 1.3.194-langpicker19-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/dx-components",
3
- "version": "1.3.194-langpicker17-alpha",
3
+ "version": "1.3.194-langpicker19-alpha",
4
4
  "description": "DX Lightning web components",
5
5
  "license": "MIT",
6
6
  "engines": {
@@ -79,16 +79,11 @@
79
79
  title="No Results"
80
80
  size="small"
81
81
  ></dx-empty-state>
82
- <div
83
- if:true={expanded}
84
- if:true={hasSidebarFooter}
85
- class="footer-nav"
86
- >
87
- <doc-footer-nav
82
+ <div if:true={hasSidebarFooter} class="footer-nav">
83
+ <doc-sidebar-footer-nav
88
84
  lang-value-path={langValuePath}
89
- language={language}
90
- languages={languages}
91
- ></doc-footer-nav>
85
+ sidebar-footer-content={sidebarFooterContent}
86
+ ></doc-sidebar-footer-nav>
92
87
  </div>
93
88
  </div>
94
89
  <div class="sidebar-content sidebar-content-tree">
@@ -106,13 +101,10 @@
106
101
 
107
102
  <template if:true={hasSidebarFooter}>
108
103
  <div class="footer-nav">
109
- <doc-footer-nav
104
+ <doc-sidebar-footer-nav
110
105
  lang-value-path={langValuePath}
111
- language={language}
112
- languages={languages}
113
- bail-href={bailHref}
114
- bail-label={bailLabel}
115
- ></doc-footer-nav>
106
+ sidebar-footer-content={sidebarFooterContent}
107
+ ></doc-sidebar-footer-nav>
116
108
  </div>
117
109
  </template>
118
110
  </div>
@@ -1,11 +1,10 @@
1
1
  import cx from "classnames";
2
2
  import { api, track } from "lwc";
3
- import { TreeNode, SidebarSearchResult } from "typings/custom";
3
+ import { TreeNode, SidebarSearchResult, SidebarFooter } from "typings/custom";
4
4
  import { getSidebarSearchParams } from "dxUtils/coveo";
5
5
  import { toJson } from "dxUtils/normalizers";
6
6
  import SidebarSearch from "dx/sidebarSearch";
7
7
  import { SidebarBase } from "dxBaseElements/sidebarBase";
8
- import type { OptionWithLink } from "typings/custom";
9
8
 
10
9
  const MOBILE_SIZE_MATCH = "768px";
11
10
 
@@ -16,10 +15,7 @@ export default class Sidebar extends SidebarBase {
16
15
  @api coveoAdvancedQueryConfig!: string;
17
16
  @api header: string = "";
18
17
  @api langValuePath: string = "id";
19
- @api languages!: OptionWithLink[];
20
- @api language!: string;
21
- @api bailHref!: string;
22
- @api bailLabel!: string;
18
+ @api sidebarFooterContent!: SidebarFooter;
23
19
 
24
20
  @api
25
21
  get value() {
@@ -266,13 +262,16 @@ export default class Sidebar extends SidebarBase {
266
262
  private get hasSidebarFooter(): boolean {
267
263
  if (this.mobile) {
268
264
  return (
269
- !!(this.languages && toJson(this.languages).length > 1) &&
270
- this.expanded
265
+ !!(
266
+ this.sidebarFooterContent.languages &&
267
+ toJson(this.sidebarFooterContent.languages).length > 1
268
+ ) && this.expanded
271
269
  );
272
270
  }
273
271
  return !!(
274
- (this.languages && toJson(this.languages).length > 1) ||
275
- Boolean(this.bailHref)
272
+ (this.sidebarFooterContent.languages &&
273
+ toJson(this.sidebarFooterContent.languages).length > 1) ||
274
+ Boolean(this.sidebarFooterContent.bailHref)
276
275
  );
277
276
  }
278
277
  }
@@ -68,23 +68,19 @@
68
68
  if:false={anyResultMatch}
69
69
  ></dx-empty-state>
70
70
  <div if:true={hasSidebarFooter} class="footer-nav">
71
- <doc-footer-nav
71
+ <doc-sidebar-footer-nav
72
72
  lang-value-path={langValuePath}
73
- language={language}
74
- languages={languages}
75
- ></doc-footer-nav>
73
+ sidebar-footer-content={sidebarFooterContent}
74
+ ></doc-sidebar-footer-nav>
76
75
  </div>
77
76
  </template>
78
77
 
79
78
  <template if:true={hasSidebarFooter}>
80
79
  <div class="footer-nav">
81
- <doc-footer-nav
80
+ <doc-sidebar-footer-nav
82
81
  lang-value-path={langValuePath}
83
- language={language}
84
- languages={languages}
85
- bail-href={bailHref}
86
- bail-label={bailLabel}
87
- ></doc-footer-nav>
82
+ sidebar-footer-content={sidebarFooterContent}
83
+ ></doc-sidebar-footer-nav>
88
84
  </div>
89
85
  </template>
90
86
  </div>
@@ -1,10 +1,9 @@
1
1
  import cx from "classnames";
2
2
  import { api } from "lwc";
3
3
 
4
- import { TreeNode } from "typings/custom";
4
+ import { TreeNode, SidebarFooter } from "typings/custom";
5
5
  import { toJson } from "dxUtils/normalizers";
6
6
  import { SidebarBase } from "dxBaseElements/sidebarBase";
7
- import type { OptionWithLink } from "typings/custom";
8
7
 
9
8
  const WAIT_TIME = 500;
10
9
  const MOBILE_SIZE_MATCH = "768px";
@@ -12,10 +11,7 @@ const MOBILE_SIZE_MATCH = "768px";
12
11
  export default class Sidebar extends SidebarBase {
13
12
  @api header: string = "";
14
13
  @api langValuePath: string = "id";
15
- @api languages!: OptionWithLink[];
16
- @api language!: string;
17
- @api bailHref!: string;
18
- @api bailLabel!: string;
14
+ @api sidebarFooterContent!: SidebarFooter;
19
15
 
20
16
  @api
21
17
  get value() {
@@ -199,11 +195,15 @@ export default class Sidebar extends SidebarBase {
199
195
 
200
196
  private get hasSidebarFooter(): boolean {
201
197
  if (this.mobile) {
202
- return !!(this.languages && toJson(this.languages).length > 1);
198
+ return !!(
199
+ this.sidebarFooterContent?.languages &&
200
+ toJson(this.sidebarFooterContent?.languages).length > 1
201
+ );
203
202
  }
204
203
  return !!(
205
- (this.languages && toJson(this.languages).length > 1) ||
206
- Boolean(this.bailHref)
204
+ (this.sidebarFooterContent?.languages &&
205
+ toJson(this.sidebarFooterContent?.languages).length > 1) ||
206
+ Boolean(this.sidebarFooterContent?.bailHref)
207
207
  );
208
208
  }
209
209
  }