@salesforcedevs/dx-components 1.3.194-langpicker18-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
|
@@ -80,11 +80,10 @@
|
|
|
80
80
|
size="small"
|
|
81
81
|
></dx-empty-state>
|
|
82
82
|
<div if:true={hasSidebarFooter} class="footer-nav">
|
|
83
|
-
<doc-footer-nav
|
|
83
|
+
<doc-sidebar-footer-nav
|
|
84
84
|
lang-value-path={langValuePath}
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
></doc-footer-nav>
|
|
85
|
+
sidebar-footer-content={sidebarFooterContent}
|
|
86
|
+
></doc-sidebar-footer-nav>
|
|
88
87
|
</div>
|
|
89
88
|
</div>
|
|
90
89
|
<div class="sidebar-content sidebar-content-tree">
|
|
@@ -102,13 +101,10 @@
|
|
|
102
101
|
|
|
103
102
|
<template if:true={hasSidebarFooter}>
|
|
104
103
|
<div class="footer-nav">
|
|
105
|
-
<doc-footer-nav
|
|
104
|
+
<doc-sidebar-footer-nav
|
|
106
105
|
lang-value-path={langValuePath}
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
bail-href={bailHref}
|
|
110
|
-
bail-label={bailLabel}
|
|
111
|
-
></doc-footer-nav>
|
|
106
|
+
sidebar-footer-content={sidebarFooterContent}
|
|
107
|
+
></doc-sidebar-footer-nav>
|
|
112
108
|
</div>
|
|
113
109
|
</template>
|
|
114
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
|
|
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
|
-
!!(
|
|
270
|
-
|
|
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 &&
|
|
275
|
-
|
|
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
|
-
|
|
74
|
-
|
|
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
|
-
|
|
84
|
-
|
|
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
|
|
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 !!(
|
|
198
|
+
return !!(
|
|
199
|
+
this.sidebarFooterContent?.languages &&
|
|
200
|
+
toJson(this.sidebarFooterContent?.languages).length > 1
|
|
201
|
+
);
|
|
203
202
|
}
|
|
204
203
|
return !!(
|
|
205
|
-
(this.languages &&
|
|
206
|
-
|
|
204
|
+
(this.sidebarFooterContent?.languages &&
|
|
205
|
+
toJson(this.sidebarFooterContent?.languages).length > 1) ||
|
|
206
|
+
Boolean(this.sidebarFooterContent?.bailHref)
|
|
207
207
|
);
|
|
208
208
|
}
|
|
209
209
|
}
|