@salesforcedevs/dw-components 1.3.5-lightdom-3 → 1.3.10-sprig

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 CHANGED
@@ -13,7 +13,6 @@
13
13
  "dw/deSignupForm",
14
14
  "dw/docsGrid",
15
15
  "dw/eventsList",
16
- "dw/getStarted",
17
16
  "dw/instrumentation",
18
17
  "dw/newsletterForm",
19
18
  "dw/podcastSubscription",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@salesforcedevs/dw-components",
3
- "version": "1.3.5-lightdom-3",
3
+ "version": "1.3.10-sprig",
4
4
  "description": "Lightning web components for https://developer.salesforce.com",
5
5
  "license": "MIT",
6
6
  "engines": {
@@ -1,4 +1,4 @@
1
- <template lwc:render-mode="light">
1
+ <template>
2
2
  <div class={containerClass}>
3
3
  <h2 class="dx-text-heading-4"><slot></slot></h2>
4
4
 
@@ -3,8 +3,6 @@ import { SlackCtaBackgroundVariant } from "typings/custom";
3
3
  import cx from "classnames";
4
4
 
5
5
  export default class SlackAdd extends LightningElement {
6
- static renderMode = "light";
7
-
8
6
  @api innerText?: string = "Add to Slack";
9
7
  @api background?: SlackCtaBackgroundVariant;
10
8
 
@@ -23,7 +23,7 @@
23
23
  <span class="sub-heading">{userInfo.username}</span>
24
24
  <div class="heading-links">
25
25
  <a
26
- href="#"
26
+ href={logoutUrl}
27
27
  onclick={handleComponentLogoutClick}
28
28
  class="inline-link"
29
29
  >
@@ -45,17 +45,16 @@ export default class TbidLoginMenu extends LightningElement {
45
45
  private userInfo: UserInfo = {};
46
46
 
47
47
  private handleComponentLogoutClick = (event: Event) => {
48
- event.preventDefault();
49
- this.trackLogoutClick();
48
+ this.trackLogoutClick(event.currentTarget as HTMLAnchorElement);
50
49
  (
51
50
  this.template.querySelector(
52
51
  "dx-tbid-avatar-button"
53
52
  ) as unknown as TbidAvatarButton
54
- ).logout();
53
+ ).logout(event);
55
54
  };
56
55
 
57
56
  private handleComponentLoginClick = (event: Event) => {
58
- this.trackLoginClick();
57
+ this.trackLoginMenuClick(event);
59
58
  (
60
59
  this.template.querySelector(
61
60
  "dx-tbid-avatar-button"
@@ -66,22 +65,7 @@ export default class TbidLoginMenu extends LightningElement {
66
65
  private handleTbidLoginSuccess = (event: CustomEvent) => {
67
66
  event.stopPropagation();
68
67
  this.isLoggedIn = true;
69
-
70
- // Special tracking for this event only
71
- track(document, "custEv_userLogin", {
72
- authenticationMethod: "tbid",
73
- id: {
74
- tb: Object.entries(this.userInfo)
75
- .filter(([key]) => trackableUserInfo.has(key))
76
- .reduce(
77
- (infoToTrack, [key, value]) => ({
78
- ...infoToTrack,
79
- [key]: value
80
- }),
81
- {} as Record<string, string>
82
- )
83
- }
84
- });
68
+ this.trackLoginSuccess();
85
69
  };
86
70
 
87
71
  private handleTbidLogoutSuccess = (event: CustomEvent) => {
@@ -105,21 +89,20 @@ export default class TbidLoginMenu extends LightningElement {
105
89
  }
106
90
  };
107
91
 
108
- private trackLoginClick = () => {
92
+ private trackLoginSuccess = () => {
109
93
  track(document, "custEv_userLogin", {
110
- clickText: "Trailblazer.me",
111
- clickUrl: this.loginUrl,
112
- itemTitle: "TBID Login Link",
113
- elementType: "link"
114
- });
115
- };
116
-
117
- private trackLogoutClick = () => {
118
- track(document, "custEv_userLogout", {
119
- clickText: "Logout",
120
- clickUrl: this.logoutUrl,
121
- itemTitle: "TBID Logout Link",
122
- elementType: "link"
94
+ authenticationMethod: "tbid",
95
+ id: {
96
+ tb: Object.entries(this.userInfo)
97
+ .filter(([key]) => trackableUserInfo.has(key))
98
+ .reduce(
99
+ (infoToTrack, [key, value]) => ({
100
+ ...infoToTrack,
101
+ [key]: value
102
+ }),
103
+ {} as Record<string, string>
104
+ )
105
+ }
123
106
  });
124
107
  };
125
108
 
@@ -149,7 +132,7 @@ export default class TbidLoginMenu extends LightningElement {
149
132
  // Track link clicks on the "logged out" version of the dropdown.
150
133
  private trackLoginMenuClick = (event: Event) => {
151
134
  const target = event.currentTarget as HTMLAnchorElement | null;
152
- this.trackMenuClick(target, "custEv_userLogin", "login:salesforce:");
135
+ this.trackMenuClick(target, "custEv_loginClick", "login:salesforce:");
153
136
  };
154
137
 
155
138
  // Track link clicks on the "logged in" version of the dropdown.
@@ -157,4 +140,9 @@ export default class TbidLoginMenu extends LightningElement {
157
140
  const target = event.currentTarget as HTMLAnchorElement | null;
158
141
  this.trackMenuClick(target, "custEv_loginMenuClick", "login:tbid:");
159
142
  };
143
+
144
+ // Special tracking for clicking on "Logout" specifically
145
+ private trackLogoutClick = (target: HTMLAnchorElement | null) => {
146
+ this.trackMenuClick(target, "custEv_userLogout", "login:tbid:");
147
+ };
160
148
  }
@@ -1,44 +0,0 @@
1
- .home-banner-main {
2
- display: flex;
3
- flex-direction: column;
4
- justify-content: center;
5
- align-items: center;
6
- padding: var(--dx-g-spacing-lg) var(--dx-g-page-padding-horizontal);
7
- margin-bottom: var(--dx-g-spacing-3xl);
8
- width: 100%;
9
- height: 532px;
10
- text-align: center;
11
- background-position: center;
12
- background-size: cover;
13
- background-repeat: no-repeat;
14
- background-image: url("/assets/images/home-banner-main.svg");
15
- }
16
-
17
- /* WIDESCREEN */
18
-
19
- @media screen and (min-width: 1440px) {
20
- .home-banner-main {
21
- height: calc(100vw * 0.369444);
22
- }
23
- }
24
-
25
- /* TABLET */
26
-
27
- @media screen and (max-width: 1024px) {
28
- .home-banner-main {
29
- height: 380px;
30
- margin-bottom: var(--dx-g-spacing-xl);
31
- }
32
-
33
- .home-banner-main .home-banner_heading {
34
- font-size: 26px;
35
- }
36
- }
37
-
38
- @media screen and (max-width: 768px) {
39
- .home-banner-main {
40
- align-items: flex-start;
41
- text-align: left;
42
- margin-bottom: 0;
43
- }
44
- }
@@ -1,14 +0,0 @@
1
- <template lwc:render-mode="light">
2
- <div class="home-banner-main">
3
- <h1 class="home-banner_heading dx-text-heading-2">{headerText}</h1>
4
- <div class="home-banner_button">
5
- <dx-button
6
- onclick={trackClick}
7
- href={href}
8
- target="_blank"
9
- size="hero"
10
- button-text={buttonText}
11
- ></dx-button>
12
- </div>
13
- </div>
14
- </template>
@@ -1,26 +0,0 @@
1
- import { LightningElement, api } from "lwc";
2
- import { track } from "dxUtils/analytics";
3
-
4
- export default class GetStarted extends LightningElement {
5
- static renderMode = "light";
6
-
7
- @api
8
- buttonText = "Get Started";
9
-
10
- @api
11
- headerText = "innovation.start(here);";
12
-
13
- @api
14
- href = "/get-started";
15
-
16
- trackClick(event: Event): void {
17
- track(event.target!, "custEv_ctaButtonClick", {
18
- clickText: this.buttonText,
19
- itemTitle: this.headerText,
20
- clickUrl: this.href,
21
- elementType: "button",
22
- destinationType: "internal",
23
- ctaClick: true
24
- });
25
- }
26
- }