@salesforcedevs/dw-components 1.2.17-canary.0 → 1.2.17-canary.1
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
|
@@ -12,10 +12,12 @@
|
|
|
12
12
|
<img
|
|
13
13
|
src="/assets/svg/login-widget-bg.png"
|
|
14
14
|
class="header-img"
|
|
15
|
+
alt="Light blue background image showing line-drawn hills and trees"
|
|
15
16
|
/>
|
|
16
17
|
<img
|
|
17
18
|
src={userInfo.avatarImgSrc}
|
|
18
19
|
class="avatar avatar-medium"
|
|
20
|
+
alt="Medium user avatar image"
|
|
19
21
|
/>
|
|
20
22
|
<span class="heading">{userInfo.fullName}</span>
|
|
21
23
|
<span class="sub-heading">{userInfo.username}</span>
|
|
@@ -32,7 +34,13 @@
|
|
|
32
34
|
<span class="login-section-title">Trailblazer.me</span>
|
|
33
35
|
<ul>
|
|
34
36
|
<li class="login-list-item">
|
|
35
|
-
<a
|
|
37
|
+
<a
|
|
38
|
+
href={settingsUrl}
|
|
39
|
+
class="login-link"
|
|
40
|
+
target="_blank"
|
|
41
|
+
rel="noopener"
|
|
42
|
+
onclick={trackLoggedInMenuClick}
|
|
43
|
+
>
|
|
36
44
|
<span class="login-link-label">
|
|
37
45
|
Settings
|
|
38
46
|
</span>
|
|
@@ -44,7 +52,13 @@
|
|
|
44
52
|
</a>
|
|
45
53
|
</li>
|
|
46
54
|
<li class="login-list-item">
|
|
47
|
-
<a
|
|
55
|
+
<a
|
|
56
|
+
href={profileUrl}
|
|
57
|
+
class="login-link"
|
|
58
|
+
target="_blank"
|
|
59
|
+
rel="noopener"
|
|
60
|
+
onclick={trackLoggedInMenuClick}
|
|
61
|
+
>
|
|
48
62
|
<span class="login-link-label">
|
|
49
63
|
Profile
|
|
50
64
|
</span>
|
|
@@ -56,7 +70,13 @@
|
|
|
56
70
|
</a>
|
|
57
71
|
</li>
|
|
58
72
|
<li class="login-list-item">
|
|
59
|
-
<a
|
|
73
|
+
<a
|
|
74
|
+
href="https://trailhead.salesforce.com/trailblazer-community/groups/0F93A000000DJbJSAW"
|
|
75
|
+
class="login-link"
|
|
76
|
+
target="_blank"
|
|
77
|
+
rel="noopener"
|
|
78
|
+
onclick={trackLoggedInMenuClick}
|
|
79
|
+
>
|
|
60
80
|
<span class="login-link-label">
|
|
61
81
|
Developer Community
|
|
62
82
|
</span>
|
|
@@ -67,8 +87,8 @@
|
|
|
67
87
|
></dx-icon>
|
|
68
88
|
</a>
|
|
69
89
|
<div class="login-link-blurb">
|
|
70
|
-
Collaborate, network, build connections
|
|
71
|
-
|
|
90
|
+
Collaborate, network, build connections and
|
|
91
|
+
learn Salesforce development.
|
|
72
92
|
</div>
|
|
73
93
|
</li>
|
|
74
94
|
</ul>
|
|
@@ -82,7 +102,13 @@
|
|
|
82
102
|
<span class="login-section-title">Products</span>
|
|
83
103
|
<ul>
|
|
84
104
|
<li class="login-list-item">
|
|
85
|
-
<a
|
|
105
|
+
<a
|
|
106
|
+
href="https://www.salesforce.com"
|
|
107
|
+
class="login-link"
|
|
108
|
+
target="_blank"
|
|
109
|
+
rel="noopener"
|
|
110
|
+
onclick={trackLoginMenuClick}
|
|
111
|
+
>
|
|
86
112
|
<span class="login-link-label">
|
|
87
113
|
Salesforce
|
|
88
114
|
</span>
|
|
@@ -99,7 +125,13 @@
|
|
|
99
125
|
</a>
|
|
100
126
|
</li>
|
|
101
127
|
<li class="login-list-item">
|
|
102
|
-
<a
|
|
128
|
+
<a
|
|
129
|
+
href={marketingCloudUrl}
|
|
130
|
+
class="login-link"
|
|
131
|
+
target="_blank"
|
|
132
|
+
rel="noopener"
|
|
133
|
+
onclick={trackLoginMenuClick}
|
|
134
|
+
>
|
|
103
135
|
<span class="login-link-label">
|
|
104
136
|
Marketing Cloud
|
|
105
137
|
</span>
|
|
@@ -118,7 +150,11 @@
|
|
|
118
150
|
</span>
|
|
119
151
|
<ul>
|
|
120
152
|
<li class="login-list-item">
|
|
121
|
-
<a
|
|
153
|
+
<a
|
|
154
|
+
href={loginUrl}
|
|
155
|
+
class="login-link"
|
|
156
|
+
onclick={handleComponentLoginClick}
|
|
157
|
+
>
|
|
122
158
|
<span class="login-link-label">
|
|
123
159
|
Trailblazer.me
|
|
124
160
|
</span>
|
|
@@ -130,7 +166,13 @@
|
|
|
130
166
|
</div>
|
|
131
167
|
</li>
|
|
132
168
|
<li class="login-list-item">
|
|
133
|
-
<a
|
|
169
|
+
<a
|
|
170
|
+
href="https://developer.salesforce.com/forums"
|
|
171
|
+
class="login-link"
|
|
172
|
+
target="_blank"
|
|
173
|
+
rel="noopener"
|
|
174
|
+
onclick={trackLoginMenuClick}
|
|
175
|
+
>
|
|
134
176
|
<span class="login-link-label">
|
|
135
177
|
Developer Forums
|
|
136
178
|
</span>
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { LightningElement } from "lwc";
|
|
2
2
|
import { track } from "dxUtils/analytics";
|
|
3
|
-
import
|
|
3
|
+
import TbidAvatarButton from "dx/tbidAvatarButton";
|
|
4
4
|
|
|
5
5
|
const DSC_BASE_URL = process.env.BASE_URL || "https://developer.salesforce.com";
|
|
6
6
|
|
|
@@ -30,10 +30,10 @@ const trackableUserInfo = new Set([
|
|
|
30
30
|
// which this component uses.
|
|
31
31
|
export default class TbidLoginMenu extends LightningElement {
|
|
32
32
|
// URLs:
|
|
33
|
-
|
|
34
|
-
private
|
|
35
|
-
|
|
36
|
-
|
|
33
|
+
private tbidBaseUrl = process.env.TBID_BASE_URL || "";
|
|
34
|
+
private tbidApiBaseUrl = `${
|
|
35
|
+
process.env.TBID_API_BASE_URL || "https://developer.salesforce.com"
|
|
36
|
+
}/tbid`;
|
|
37
37
|
private settingsUrl = `${this.tbidBaseUrl}/settings`;
|
|
38
38
|
private profileUrl = `${this.tbidBaseUrl}/id`;
|
|
39
39
|
private logoutUrl = `${this.tbidApiBaseUrl}/logout`;
|
|
@@ -52,12 +52,20 @@ export default class TbidLoginMenu extends LightningElement {
|
|
|
52
52
|
private handleComponentLogoutClick = (event: Event) => {
|
|
53
53
|
event.preventDefault();
|
|
54
54
|
this.trackLogoutClick();
|
|
55
|
-
(
|
|
55
|
+
(
|
|
56
|
+
this.template.querySelector(
|
|
57
|
+
"dx-tbid-avatar-button"
|
|
58
|
+
) as unknown as TbidAvatarButton
|
|
59
|
+
).logout();
|
|
56
60
|
};
|
|
57
61
|
|
|
58
62
|
private handleComponentLoginClick = (event: Event) => {
|
|
59
63
|
this.trackLoginClick();
|
|
60
|
-
(
|
|
64
|
+
(
|
|
65
|
+
this.template.querySelector(
|
|
66
|
+
"dx-tbid-avatar-button"
|
|
67
|
+
) as unknown as TbidAvatarButton
|
|
68
|
+
).login(event);
|
|
61
69
|
};
|
|
62
70
|
|
|
63
71
|
private handleTbidLoginSuccess = (event: CustomEvent) => {
|
|
@@ -135,10 +143,8 @@ export default class TbidLoginMenu extends LightningElement {
|
|
|
135
143
|
if (target) {
|
|
136
144
|
trackingPayload.clickText = target.textContent?.trim() || "";
|
|
137
145
|
trackingPayload.clickUrl = target.href;
|
|
138
|
-
const [
|
|
139
|
-
|
|
140
|
-
...remainingText
|
|
141
|
-
] = trackingPayload.clickText.split(" ");
|
|
146
|
+
const [firstWord, ...remainingText] =
|
|
147
|
+
trackingPayload.clickText.split(" ");
|
|
142
148
|
trackingPayload.nav_item = `${navItemPrefix}${firstWord.toLowerCase()}${remainingText.join()}`;
|
|
143
149
|
}
|
|
144
150
|
|