@salesforcedevs/dw-components 1.3.38 → 1.3.45
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/dw-components",
|
|
3
|
-
"version": "1.3.
|
|
3
|
+
"version": "1.3.45",
|
|
4
4
|
"description": "Lightning web components for https://developer.salesforce.com",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"engines": {
|
|
@@ -24,5 +24,5 @@
|
|
|
24
24
|
"@types/setimmediate": "^1.0.2",
|
|
25
25
|
"setimmediate": "^1.0.5"
|
|
26
26
|
},
|
|
27
|
-
"gitHead": "
|
|
27
|
+
"gitHead": "b2340b9de4e809097ee2f5c5d1bff87b5bc3aab6"
|
|
28
28
|
}
|
|
@@ -31,18 +31,6 @@ const DUPLICATE_USERNAME_MESSAGE =
|
|
|
31
31
|
const ACCEPTED = "accepted";
|
|
32
32
|
const SIGN_UP_LABEL = "Sign me Up";
|
|
33
33
|
|
|
34
|
-
const ANALYTICS_INFO = {
|
|
35
|
-
clickText: "Sign me Up",
|
|
36
|
-
itemTitle: "Dev Edition Sign Up Button",
|
|
37
|
-
formType: "Dev Edition Sign Up",
|
|
38
|
-
formName: "DEVELOPER:xx:signup:Developer-Edition",
|
|
39
|
-
method: "email",
|
|
40
|
-
clickUrl: "/signup/success",
|
|
41
|
-
elementType: "button",
|
|
42
|
-
destinationType: "internal",
|
|
43
|
-
ctaClick: true,
|
|
44
|
-
offerType: "Free Trial"
|
|
45
|
-
};
|
|
46
34
|
export default class DeSignupForm extends LightningElement {
|
|
47
35
|
@api
|
|
48
36
|
get countries() {
|
|
@@ -163,10 +151,12 @@ export default class DeSignupForm extends LightningElement {
|
|
|
163
151
|
submitForm(formData)
|
|
164
152
|
.then(() => {
|
|
165
153
|
trackGtm(event.target!, "custEv_signUp", {
|
|
166
|
-
|
|
167
|
-
|
|
154
|
+
authenticationMethod: "dev edition sign up form",
|
|
155
|
+
authenticationType: "dev edition",
|
|
156
|
+
userId: this.username,
|
|
157
|
+
newRegistration: true
|
|
168
158
|
});
|
|
169
|
-
window.location.href =
|
|
159
|
+
window.location.href = "/signup/success";
|
|
170
160
|
})
|
|
171
161
|
.catch((error) => {
|
|
172
162
|
if (error.message === ErrorCode.DUPLICATE) {
|
|
@@ -2,17 +2,6 @@ import { LightningElement, api } from "lwc";
|
|
|
2
2
|
import { track } from "dxUtils/analytics";
|
|
3
3
|
import { CountryOptions, CheckboxTextSet } from "typings/custom";
|
|
4
4
|
|
|
5
|
-
const ANALYTICS_INFO = {
|
|
6
|
-
itemTitle: "newsletter sign up submit",
|
|
7
|
-
formName: "newsletter",
|
|
8
|
-
formType: "newsletter",
|
|
9
|
-
method: "email",
|
|
10
|
-
destinationType: "internal",
|
|
11
|
-
clickText: "Subscribe Now",
|
|
12
|
-
clickUrl: "/newsletter/success",
|
|
13
|
-
elementType: "button",
|
|
14
|
-
ctaClick: true
|
|
15
|
-
};
|
|
16
5
|
const LOCAL_STORAGE_KEY = "subscriberEmail";
|
|
17
6
|
|
|
18
7
|
export default class Form extends LightningElement {
|
|
@@ -159,7 +148,17 @@ export default class Form extends LightningElement {
|
|
|
159
148
|
}
|
|
160
149
|
|
|
161
150
|
// GTM event
|
|
162
|
-
track(submitButtonEl, "custEv_formCompletion",
|
|
151
|
+
track(submitButtonEl, "custEv_formCompletion", {
|
|
152
|
+
itemTitle: "newsletter sign up submit",
|
|
153
|
+
formName: "newsletter",
|
|
154
|
+
formType: "newsletter",
|
|
155
|
+
method: "email",
|
|
156
|
+
destinationType: "internal",
|
|
157
|
+
clickText: "Subscribe Now",
|
|
158
|
+
clickUrl: "/newsletter/success",
|
|
159
|
+
elementType: "button",
|
|
160
|
+
ctaClick: true
|
|
161
|
+
});
|
|
163
162
|
|
|
164
163
|
window.location.assign("/newsletter/success");
|
|
165
164
|
} catch (error) {
|
|
@@ -109,40 +109,31 @@ export default class TbidLoginMenu extends LightningElement {
|
|
|
109
109
|
// Shared utility for tracking link clicks.
|
|
110
110
|
private trackMenuClick = (
|
|
111
111
|
target: HTMLAnchorElement | null,
|
|
112
|
-
eventName: string
|
|
113
|
-
navItemPrefix: string
|
|
112
|
+
eventName: string
|
|
114
113
|
) => {
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
trackingPayload.clickText = target.textContent?.trim() || "";
|
|
123
|
-
trackingPayload.clickUrl = target.href;
|
|
124
|
-
const [firstWord, ...remainingText] =
|
|
125
|
-
trackingPayload.clickText.split(" ");
|
|
126
|
-
trackingPayload.nav_item = `${navItemPrefix}${firstWord.toLowerCase()}${remainingText.join()}`;
|
|
127
|
-
}
|
|
128
|
-
|
|
129
|
-
track(target || document, eventName, trackingPayload);
|
|
114
|
+
track(target || document, eventName, {
|
|
115
|
+
clickText: target.textContent?.trim() || "",
|
|
116
|
+
clickUrl: target.href || "",
|
|
117
|
+
elementTitle: "a",
|
|
118
|
+
elementType: "link",
|
|
119
|
+
contentCategory: "tbid"
|
|
120
|
+
});
|
|
130
121
|
};
|
|
131
122
|
|
|
132
123
|
// Track link clicks on the "logged out" version of the dropdown.
|
|
133
124
|
private trackLoginMenuClick = (event: Event) => {
|
|
134
125
|
const target = event.currentTarget as HTMLAnchorElement | null;
|
|
135
|
-
this.trackMenuClick(target, "custEv_loginClick"
|
|
126
|
+
this.trackMenuClick(target, "custEv_loginClick");
|
|
136
127
|
};
|
|
137
128
|
|
|
138
129
|
// Track link clicks on the "logged in" version of the dropdown.
|
|
139
130
|
private trackLoggedInMenuClick = (event: Event) => {
|
|
140
131
|
const target = event.currentTarget as HTMLAnchorElement | null;
|
|
141
|
-
this.trackMenuClick(target, "custEv_loginMenuClick"
|
|
132
|
+
this.trackMenuClick(target, "custEv_loginMenuClick");
|
|
142
133
|
};
|
|
143
134
|
|
|
144
135
|
// Special tracking for clicking on "Logout" specifically
|
|
145
136
|
private trackLogoutClick = (target: HTMLAnchorElement | null) => {
|
|
146
|
-
this.trackMenuClick(target, "custEv_userLogout"
|
|
137
|
+
this.trackMenuClick(target, "custEv_userLogout");
|
|
147
138
|
};
|
|
148
139
|
}
|
|
@@ -48,14 +48,18 @@ export abstract class PostsGrid extends LightningElement {
|
|
|
48
48
|
track(e.target, "custEv_ctaLinkClick", {
|
|
49
49
|
...ANALYTICS_INFO,
|
|
50
50
|
clickText: "show more",
|
|
51
|
-
|
|
51
|
+
elementTitle: "dx-button",
|
|
52
|
+
elementType: "button",
|
|
53
|
+
contentCategory: "cta"
|
|
52
54
|
});
|
|
53
55
|
} else {
|
|
54
56
|
track(e.target, "custEv_ctaLinkClick", {
|
|
55
57
|
...ANALYTICS_INFO,
|
|
56
58
|
clickText: "view archives",
|
|
57
|
-
|
|
58
|
-
|
|
59
|
+
clickUrl: "https://developer.salesforce.com/content-archive",
|
|
60
|
+
elementTitle: "dx-button",
|
|
61
|
+
elementType: "button",
|
|
62
|
+
contentCategory: "cta"
|
|
59
63
|
});
|
|
60
64
|
}
|
|
61
65
|
}
|