@salesforcedevs/dx-components 1.3.29 → 1.3.32
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/lwc.config.json +1 -0
- package/package.json +2 -2
- package/src/modules/dx/dropdownOption/dropdownOption.html +2 -2
- package/src/modules/dx/mainContentHeader/mainContentHeader.css +90 -0
- package/src/modules/dx/mainContentHeader/mainContentHeader.html +16 -0
- package/src/modules/dx/mainContentHeader/mainContentHeader.ts +26 -0
- package/src/modules/dx/sidebar/sidebar.css +4 -0
- package/src/modules/dx/sidebar/sidebar.html +1 -0
- package/src/modules/dx/sidebar/sidebar.ts +6 -0
- package/src/modules/dx/sidebarSearch/sidebarSearch.ts +5 -0
- package/src/modules/dx/treeItem/treeItem.html +2 -2
package/lwc.config.json
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@salesforcedevs/dx-components",
|
|
3
|
-
"version": "1.3.
|
|
3
|
+
"version": "1.3.32",
|
|
4
4
|
"description": "DX Lightning web components",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"engines": {
|
|
@@ -38,5 +38,5 @@
|
|
|
38
38
|
"eventsourcemock": "^2.0.0",
|
|
39
39
|
"luxon": "^3.1.0"
|
|
40
40
|
},
|
|
41
|
-
"gitHead": "
|
|
41
|
+
"gitHead": "550125540ec042bed34b7643f50548ffcc774093"
|
|
42
42
|
}
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
target={option.link.target}
|
|
7
7
|
key={option.id}
|
|
8
8
|
role="menuitem"
|
|
9
|
-
tabindex="
|
|
9
|
+
tabindex="0"
|
|
10
10
|
data-index={indexPosition}
|
|
11
11
|
onclick={onClick}
|
|
12
12
|
>
|
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
if:false={option.link}
|
|
36
36
|
class={className}
|
|
37
37
|
role="menuitem"
|
|
38
|
-
tabindex="
|
|
38
|
+
tabindex="0"
|
|
39
39
|
data-index={indexPosition}
|
|
40
40
|
onclick={onClick}
|
|
41
41
|
>
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
@import "dxHelpers/reset";
|
|
2
|
+
@import "dxHelpers/text";
|
|
3
|
+
|
|
4
|
+
.container {
|
|
5
|
+
display: flex;
|
|
6
|
+
flex-direction: row;
|
|
7
|
+
padding: 0 var(--dx-g-page-padding-horizontal);
|
|
8
|
+
overflow: hidden;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
.container > * {
|
|
12
|
+
width: 50%;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
.text-container {
|
|
16
|
+
display: flex;
|
|
17
|
+
flex-direction: column;
|
|
18
|
+
justify-content: center;
|
|
19
|
+
align-items: flex-start;
|
|
20
|
+
padding: var(--dx-g-spacing-lg) 0;
|
|
21
|
+
min-height: 460px;
|
|
22
|
+
text-align: left;
|
|
23
|
+
background-position: center;
|
|
24
|
+
background-size: cover;
|
|
25
|
+
background-repeat: no-repeat;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
.image-container {
|
|
29
|
+
display: flex;
|
|
30
|
+
flex-direction: row;
|
|
31
|
+
justify-content: flex-start;
|
|
32
|
+
overflow: visible;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
img {
|
|
36
|
+
width: 100%;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
img.desktop {
|
|
40
|
+
height: fit-content;
|
|
41
|
+
min-width: 876px;
|
|
42
|
+
margin-left: var(--dx-g-spacing-lg);
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
img.mobile {
|
|
46
|
+
display: none;
|
|
47
|
+
min-width: 1024px;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
.text-container > *:not(:last-child) {
|
|
51
|
+
margin-bottom: var(--dx-g-spacing-smd);
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
dx-button {
|
|
55
|
+
margin-top: var(--dx-g-spacing-smd);
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
@media screen and (max-width: 1024px) {
|
|
59
|
+
.container {
|
|
60
|
+
flex-direction: column;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
.container > * {
|
|
64
|
+
width: 100%;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
.text-container {
|
|
68
|
+
align-items: center;
|
|
69
|
+
text-align: center;
|
|
70
|
+
padding-top: var(--dx-g-spacing-4xl);
|
|
71
|
+
padding-bottom: 0;
|
|
72
|
+
min-height: unset;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
.text-container > * {
|
|
76
|
+
max-width: 700px;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
.image-container {
|
|
80
|
+
justify-content: center;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
img.desktop {
|
|
84
|
+
display: none;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
img.mobile {
|
|
88
|
+
display: block;
|
|
89
|
+
}
|
|
90
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="container">
|
|
3
|
+
<div class="text-container" style={style}>
|
|
4
|
+
<h1 class="heading dx-text-heading-2">{title}</h1>
|
|
5
|
+
<span class="body dx-text-body-1">{body}</span>
|
|
6
|
+
<span class="subtitle dx-text-heading-4b">{subtitle}</span>
|
|
7
|
+
<dx-button href={ctaHref} target={ctaTarget} size="hero">
|
|
8
|
+
{ctaLabel}
|
|
9
|
+
</dx-button>
|
|
10
|
+
</div>
|
|
11
|
+
<div class="image-container">
|
|
12
|
+
<img class="desktop" src={imgSrc} />
|
|
13
|
+
<img class="mobile" src={imgSrcMobile} />
|
|
14
|
+
</div>
|
|
15
|
+
</div>
|
|
16
|
+
</template>
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { LightningElement, api } from "lwc";
|
|
2
|
+
import { track } from "dxUtils/analytics";
|
|
3
|
+
|
|
4
|
+
export default class MainContentHeader extends LightningElement {
|
|
5
|
+
@api title!: string;
|
|
6
|
+
@api subtitle!: string;
|
|
7
|
+
@api body!: string;
|
|
8
|
+
@api ctaLabel!: string;
|
|
9
|
+
@api ctaHref!: string;
|
|
10
|
+
@api imgSrc!: string;
|
|
11
|
+
@api imgSrcMobile!: string;
|
|
12
|
+
@api ctaTarget?: string | null = null;
|
|
13
|
+
|
|
14
|
+
private onCtaClick(e: Event) {
|
|
15
|
+
if (e.currentTarget) {
|
|
16
|
+
track(e.currentTarget, "custEv_ctaButtonClick", {
|
|
17
|
+
clickText: this.ctaLabel,
|
|
18
|
+
itemTitle: this.title,
|
|
19
|
+
clickUrl: this.ctaHref,
|
|
20
|
+
elementType: "button",
|
|
21
|
+
destinationType: "internal",
|
|
22
|
+
ctaClick: true
|
|
23
|
+
});
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
}
|
|
@@ -257,4 +257,10 @@ export default class Sidebar extends SidebarBase {
|
|
|
257
257
|
node.children.forEach((child) => this.assignValueToLabel(child));
|
|
258
258
|
}
|
|
259
259
|
}
|
|
260
|
+
|
|
261
|
+
private onItemsFocused(): void {
|
|
262
|
+
this.template
|
|
263
|
+
.querySelector("dx-sidebar-search")
|
|
264
|
+
?.requestOpenDropdown(false);
|
|
265
|
+
}
|
|
260
266
|
}
|
|
@@ -78,6 +78,11 @@ export default class SidebarSearch extends LightningElement {
|
|
|
78
78
|
}
|
|
79
79
|
}
|
|
80
80
|
|
|
81
|
+
@api
|
|
82
|
+
requestOpenDropdown(value: boolean) {
|
|
83
|
+
this.dropdownRequestedOpen = value;
|
|
84
|
+
}
|
|
85
|
+
|
|
81
86
|
private _coveoAdvancedQueryConfig!: { [key: string]: any };
|
|
82
87
|
private dropdownRequestedOpen: boolean = false;
|
|
83
88
|
private recentSearches: Option[] = [];
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<a href={href} target={target} onclick={onLinkClick}>
|
|
2
|
+
<a href={href} target={target} onclick={onLinkClick} tabindex="-1">
|
|
3
3
|
<dx-tree-tile
|
|
4
4
|
href={href}
|
|
5
5
|
is-root={isRoot}
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
src="/assets/svg/sidebar-item-loading.svg"
|
|
19
19
|
alt="childrenLoading"
|
|
20
20
|
/>
|
|
21
|
-
<template if:true={showChildren}>
|
|
21
|
+
<template if:true={showChildren} tabindex="0">
|
|
22
22
|
<template for:each={treeNode.children} for:item="child">
|
|
23
23
|
<dx-tree-item
|
|
24
24
|
key={child.key}
|