@salesforcedevs/dw-components 1.5.0 → 1.6.0-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-lock.json +203 -0
- package/package.json +2 -3
- package/src/modules/dw/deSignupForm/deSignupForm.ts +20 -3
- package/LICENSE +0 -12
|
@@ -0,0 +1,203 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@salesforcedevs/dw-components",
|
|
3
|
+
"version": "1.5.0",
|
|
4
|
+
"lockfileVersion": 3,
|
|
5
|
+
"requires": true,
|
|
6
|
+
"packages": {
|
|
7
|
+
"": {
|
|
8
|
+
"name": "@salesforcedevs/dw-components",
|
|
9
|
+
"version": "1.5.0",
|
|
10
|
+
"license": "MIT",
|
|
11
|
+
"dependencies": {
|
|
12
|
+
"@types/youtube-player": "5.5.11",
|
|
13
|
+
"classnames": "2.5.1",
|
|
14
|
+
"lodash.clonedeep": "4.5.0",
|
|
15
|
+
"lodash.orderby": "4.6.0",
|
|
16
|
+
"lodash.uniqby": "4.7.0",
|
|
17
|
+
"query-string": "7.1.3",
|
|
18
|
+
"youtube-player": "5.6.0"
|
|
19
|
+
},
|
|
20
|
+
"devDependencies": {
|
|
21
|
+
"@types/classnames": "2.3.1",
|
|
22
|
+
"@types/lodash.clonedeep": "4.5.9",
|
|
23
|
+
"@types/lodash.orderby": "4.6.9",
|
|
24
|
+
"@types/lodash.uniqby": "4.7.9",
|
|
25
|
+
"@types/setimmediate": "1.0.4",
|
|
26
|
+
"setimmediate": "1.0.5"
|
|
27
|
+
},
|
|
28
|
+
"engines": {
|
|
29
|
+
"node": "18.x"
|
|
30
|
+
}
|
|
31
|
+
},
|
|
32
|
+
"node_modules/@types/classnames": {
|
|
33
|
+
"version": "2.3.1",
|
|
34
|
+
"resolved": "https://registry.npmjs.org/@types/classnames/-/classnames-2.3.1.tgz",
|
|
35
|
+
"integrity": "sha512-zeOWb0JGBoVmlQoznvqXbE0tEC/HONsnoUNH19Hc96NFsTAwTXbTqb8FMYkru1F/iqp7a18Ws3nWJvtA1sHD1A==",
|
|
36
|
+
"deprecated": "This is a stub types definition. classnames provides its own type definitions, so you do not need this installed.",
|
|
37
|
+
"dev": true,
|
|
38
|
+
"dependencies": {
|
|
39
|
+
"classnames": "*"
|
|
40
|
+
}
|
|
41
|
+
},
|
|
42
|
+
"node_modules/@types/lodash": {
|
|
43
|
+
"version": "4.17.12",
|
|
44
|
+
"resolved": "https://registry.npmjs.org/@types/lodash/-/lodash-4.17.12.tgz",
|
|
45
|
+
"integrity": "sha512-sviUmCE8AYdaF/KIHLDJBQgeYzPBI0vf/17NaYehBJfYD1j6/L95Slh07NlyK2iNyBNaEkb3En2jRt+a8y3xZQ==",
|
|
46
|
+
"dev": true
|
|
47
|
+
},
|
|
48
|
+
"node_modules/@types/lodash.clonedeep": {
|
|
49
|
+
"version": "4.5.9",
|
|
50
|
+
"resolved": "https://registry.npmjs.org/@types/lodash.clonedeep/-/lodash.clonedeep-4.5.9.tgz",
|
|
51
|
+
"integrity": "sha512-19429mWC+FyaAhOLzsS8kZUsI+/GmBAQ0HFiCPsKGU+7pBXOQWhyrY6xNNDwUSX8SMZMJvuFVMF9O5dQOlQK9Q==",
|
|
52
|
+
"dev": true,
|
|
53
|
+
"dependencies": {
|
|
54
|
+
"@types/lodash": "*"
|
|
55
|
+
}
|
|
56
|
+
},
|
|
57
|
+
"node_modules/@types/lodash.orderby": {
|
|
58
|
+
"version": "4.6.9",
|
|
59
|
+
"resolved": "https://registry.npmjs.org/@types/lodash.orderby/-/lodash.orderby-4.6.9.tgz",
|
|
60
|
+
"integrity": "sha512-T9o2wkIJOmxXwVTPTmwJ59W6eTi2FseiLR369fxszG649Po/xe9vqFNhf/MtnvT5jrbDiyWKxPFPZbpSVK0SVQ==",
|
|
61
|
+
"dev": true,
|
|
62
|
+
"dependencies": {
|
|
63
|
+
"@types/lodash": "*"
|
|
64
|
+
}
|
|
65
|
+
},
|
|
66
|
+
"node_modules/@types/lodash.uniqby": {
|
|
67
|
+
"version": "4.7.9",
|
|
68
|
+
"resolved": "https://registry.npmjs.org/@types/lodash.uniqby/-/lodash.uniqby-4.7.9.tgz",
|
|
69
|
+
"integrity": "sha512-rjrXji/seS6BZJRgXrU2h6FqxRVufsbq/HE0Tx0SdgbtlWr2YmD/M64BlYEYYlaMcpZwy32IYVkMfUMYlPuv0w==",
|
|
70
|
+
"dev": true,
|
|
71
|
+
"dependencies": {
|
|
72
|
+
"@types/lodash": "*"
|
|
73
|
+
}
|
|
74
|
+
},
|
|
75
|
+
"node_modules/@types/setimmediate": {
|
|
76
|
+
"version": "1.0.4",
|
|
77
|
+
"resolved": "https://registry.npmjs.org/@types/setimmediate/-/setimmediate-1.0.4.tgz",
|
|
78
|
+
"integrity": "sha512-rWPw1drMVf5zInxNpgH3nn/h6KkWqwgLT2y/ciAYQ16RAsbXOXe0AmtZ/HyzwPNw+r4GMJuI7IV7YNKO7Fs/xA==",
|
|
79
|
+
"dev": true
|
|
80
|
+
},
|
|
81
|
+
"node_modules/@types/youtube-player": {
|
|
82
|
+
"version": "5.5.11",
|
|
83
|
+
"resolved": "https://registry.npmjs.org/@types/youtube-player/-/youtube-player-5.5.11.tgz",
|
|
84
|
+
"integrity": "sha512-pM41CDBqJqBmTeJWnF7NOGz82IQoYOhqzMYXv5vKCXBqGiYSLldxMtpCk6KAEtADTy49S45AriYaCaZyeUX38Q=="
|
|
85
|
+
},
|
|
86
|
+
"node_modules/classnames": {
|
|
87
|
+
"version": "2.5.1",
|
|
88
|
+
"resolved": "https://registry.npmjs.org/classnames/-/classnames-2.5.1.tgz",
|
|
89
|
+
"integrity": "sha512-saHYOzhIQs6wy2sVxTM6bUDsQO4F50V9RQ22qBpEdCW+I+/Wmke2HOl6lS6dTpdxVhb88/I6+Hs+438c3lfUow=="
|
|
90
|
+
},
|
|
91
|
+
"node_modules/debug": {
|
|
92
|
+
"version": "4.3.7",
|
|
93
|
+
"resolved": "https://registry.npmjs.org/debug/-/debug-4.3.7.tgz",
|
|
94
|
+
"integrity": "sha512-Er2nc/H7RrMXZBFCEim6TCmMk02Z8vLC2Rbi1KEBggpo0fS6l0S1nnapwmIi3yW/+GOJap1Krg4w0Hg80oCqgQ==",
|
|
95
|
+
"dependencies": {
|
|
96
|
+
"ms": "^2.1.3"
|
|
97
|
+
},
|
|
98
|
+
"engines": {
|
|
99
|
+
"node": ">=6.0"
|
|
100
|
+
},
|
|
101
|
+
"peerDependenciesMeta": {
|
|
102
|
+
"supports-color": {
|
|
103
|
+
"optional": true
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
},
|
|
107
|
+
"node_modules/decode-uri-component": {
|
|
108
|
+
"version": "0.2.2",
|
|
109
|
+
"resolved": "https://registry.npmjs.org/decode-uri-component/-/decode-uri-component-0.2.2.tgz",
|
|
110
|
+
"integrity": "sha512-FqUYQ+8o158GyGTrMFJms9qh3CqTKvAqgqsTnkLI8sKu0028orqBhxNMFkFen0zGyg6epACD32pjVk58ngIErQ==",
|
|
111
|
+
"engines": {
|
|
112
|
+
"node": ">=0.10"
|
|
113
|
+
}
|
|
114
|
+
},
|
|
115
|
+
"node_modules/filter-obj": {
|
|
116
|
+
"version": "1.1.0",
|
|
117
|
+
"resolved": "https://registry.npmjs.org/filter-obj/-/filter-obj-1.1.0.tgz",
|
|
118
|
+
"integrity": "sha512-8rXg1ZnX7xzy2NGDVkBVaAy+lSlPNwad13BtgSlLuxfIslyt5Vg64U7tFcCt4WS1R0hvtnQybT/IyCkGZ3DpXQ==",
|
|
119
|
+
"engines": {
|
|
120
|
+
"node": ">=0.10.0"
|
|
121
|
+
}
|
|
122
|
+
},
|
|
123
|
+
"node_modules/load-script": {
|
|
124
|
+
"version": "1.0.0",
|
|
125
|
+
"resolved": "https://registry.npmjs.org/load-script/-/load-script-1.0.0.tgz",
|
|
126
|
+
"integrity": "sha512-kPEjMFtZvwL9TaZo0uZ2ml+Ye9HUMmPwbYRJ324qF9tqMejwykJ5ggTyvzmrbBeapCAbk98BSbTeovHEEP1uCA=="
|
|
127
|
+
},
|
|
128
|
+
"node_modules/lodash.clonedeep": {
|
|
129
|
+
"version": "4.5.0",
|
|
130
|
+
"resolved": "https://registry.npmjs.org/lodash.clonedeep/-/lodash.clonedeep-4.5.0.tgz",
|
|
131
|
+
"integrity": "sha512-H5ZhCF25riFd9uB5UCkVKo61m3S/xZk1x4wA6yp/L3RFP6Z/eHH1ymQcGLo7J3GMPfm0V/7m1tryHuGVxpqEBQ=="
|
|
132
|
+
},
|
|
133
|
+
"node_modules/lodash.orderby": {
|
|
134
|
+
"version": "4.6.0",
|
|
135
|
+
"resolved": "https://registry.npmjs.org/lodash.orderby/-/lodash.orderby-4.6.0.tgz",
|
|
136
|
+
"integrity": "sha512-T0rZxKmghOOf5YPnn8EY5iLYeWCpZq8G41FfqoVHH5QDTAFaghJRmAdLiadEDq+ztgM2q5PjA+Z1fOwGrLgmtg=="
|
|
137
|
+
},
|
|
138
|
+
"node_modules/lodash.uniqby": {
|
|
139
|
+
"version": "4.7.0",
|
|
140
|
+
"resolved": "https://registry.npmjs.org/lodash.uniqby/-/lodash.uniqby-4.7.0.tgz",
|
|
141
|
+
"integrity": "sha512-e/zcLx6CSbmaEgFHCA7BnoQKyCtKMxnuWrJygbwPs/AIn+IMKl66L8/s+wBUn5LRw2pZx3bUHibiV1b6aTWIww=="
|
|
142
|
+
},
|
|
143
|
+
"node_modules/ms": {
|
|
144
|
+
"version": "2.1.3",
|
|
145
|
+
"resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz",
|
|
146
|
+
"integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA=="
|
|
147
|
+
},
|
|
148
|
+
"node_modules/query-string": {
|
|
149
|
+
"version": "7.1.3",
|
|
150
|
+
"resolved": "https://registry.npmjs.org/query-string/-/query-string-7.1.3.tgz",
|
|
151
|
+
"integrity": "sha512-hh2WYhq4fi8+b+/2Kg9CEge4fDPvHS534aOOvOZeQ3+Vf2mCFsaFBYj0i+iXcAq6I9Vzp5fjMFBlONvayDC1qg==",
|
|
152
|
+
"dependencies": {
|
|
153
|
+
"decode-uri-component": "^0.2.2",
|
|
154
|
+
"filter-obj": "^1.1.0",
|
|
155
|
+
"split-on-first": "^1.0.0",
|
|
156
|
+
"strict-uri-encode": "^2.0.0"
|
|
157
|
+
},
|
|
158
|
+
"engines": {
|
|
159
|
+
"node": ">=6"
|
|
160
|
+
},
|
|
161
|
+
"funding": {
|
|
162
|
+
"url": "https://github.com/sponsors/sindresorhus"
|
|
163
|
+
}
|
|
164
|
+
},
|
|
165
|
+
"node_modules/setimmediate": {
|
|
166
|
+
"version": "1.0.5",
|
|
167
|
+
"resolved": "https://registry.npmjs.org/setimmediate/-/setimmediate-1.0.5.tgz",
|
|
168
|
+
"integrity": "sha512-MATJdZp8sLqDl/68LfQmbP8zKPLQNV6BIZoIgrscFDQ+RsvK/BxeDQOgyxKKoh0y/8h3BqVFnCqQ/gd+reiIXA==",
|
|
169
|
+
"dev": true
|
|
170
|
+
},
|
|
171
|
+
"node_modules/sister": {
|
|
172
|
+
"version": "3.0.2",
|
|
173
|
+
"resolved": "https://registry.npmjs.org/sister/-/sister-3.0.2.tgz",
|
|
174
|
+
"integrity": "sha512-p19rtTs+NksBRKW9qn0UhZ8/TUI9BPw9lmtHny+Y3TinWlOa9jWh9xB0AtPSdmOy49NJJJSSe0Ey4C7h0TrcYA=="
|
|
175
|
+
},
|
|
176
|
+
"node_modules/split-on-first": {
|
|
177
|
+
"version": "1.1.0",
|
|
178
|
+
"resolved": "https://registry.npmjs.org/split-on-first/-/split-on-first-1.1.0.tgz",
|
|
179
|
+
"integrity": "sha512-43ZssAJaMusuKWL8sKUBQXHWOpq8d6CfN/u1p4gUzfJkM05C8rxTmYrkIPTXapZpORA6LkkzcUulJ8FqA7Uudw==",
|
|
180
|
+
"engines": {
|
|
181
|
+
"node": ">=6"
|
|
182
|
+
}
|
|
183
|
+
},
|
|
184
|
+
"node_modules/strict-uri-encode": {
|
|
185
|
+
"version": "2.0.0",
|
|
186
|
+
"resolved": "https://registry.npmjs.org/strict-uri-encode/-/strict-uri-encode-2.0.0.tgz",
|
|
187
|
+
"integrity": "sha512-QwiXZgpRcKkhTj2Scnn++4PKtWsH0kpzZ62L2R6c/LUVYv7hVnZqcg2+sMuT6R7Jusu1vviK/MFsu6kNJfWlEQ==",
|
|
188
|
+
"engines": {
|
|
189
|
+
"node": ">=4"
|
|
190
|
+
}
|
|
191
|
+
},
|
|
192
|
+
"node_modules/youtube-player": {
|
|
193
|
+
"version": "5.6.0",
|
|
194
|
+
"resolved": "https://registry.npmjs.org/youtube-player/-/youtube-player-5.6.0.tgz",
|
|
195
|
+
"integrity": "sha512-x95fBbxV7eZ1ZsFtMLMcSGX0Jb/GPPj69RsooyEDVa9bzvvNZ4d5VjnBVBYoY85008VefkLvtaV+b+l38R/LMQ==",
|
|
196
|
+
"dependencies": {
|
|
197
|
+
"debug": "^4.3.4",
|
|
198
|
+
"load-script": "^1.0.0",
|
|
199
|
+
"sister": "^3.0.0"
|
|
200
|
+
}
|
|
201
|
+
}
|
|
202
|
+
}
|
|
203
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@salesforcedevs/dw-components",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.6.0-alpha",
|
|
4
4
|
"description": "Lightning web components for https://developer.salesforce.com",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"engines": {
|
|
@@ -25,6 +25,5 @@
|
|
|
25
25
|
"@types/lodash.uniqby": "4.7.9",
|
|
26
26
|
"@types/setimmediate": "1.0.4",
|
|
27
27
|
"setimmediate": "1.0.5"
|
|
28
|
-
}
|
|
29
|
-
"gitHead": "1de8f6760c69a5b41cf6f22f0a0940914a3c15e0"
|
|
28
|
+
}
|
|
30
29
|
}
|
|
@@ -18,6 +18,7 @@ const DUPLICATE_USERNAME_MESSAGE =
|
|
|
18
18
|
"You are already using that username in another Salesforce login credential. Your username needs to be unique and in the form of an email address.";
|
|
19
19
|
const SIGN_UP_LABEL = "Sign me Up";
|
|
20
20
|
const SIGN_UP_FORM_TIMEOUT_MS = 18.5 * 1000; // Something in trialforce/DRM's backend (still under investigation) is causing requests to timeout around 20 seconds; we use 18.5 here in case it's sometimes a little faster than that
|
|
21
|
+
const SANCTIONED_COUNTRY_EMAILS = [".ir", ".cu", ".sy", ".kp", ".by", ".ru"];
|
|
21
22
|
|
|
22
23
|
export default class DeSignupForm extends LightningElement {
|
|
23
24
|
@api
|
|
@@ -134,7 +135,7 @@ export default class DeSignupForm extends LightningElement {
|
|
|
134
135
|
) {
|
|
135
136
|
trackGtm(target!, "custEv_formCompletion", {
|
|
136
137
|
converting_page: `SFDC:us:signup:${convertingPage}`,
|
|
137
|
-
converting_page_url: `https://developer.salesforce.com/signup/${convertingPage}`,
|
|
138
|
+
converting_page_url: `https://developer.salesforce.com/developer-legacy/signup/${convertingPage}`,
|
|
138
139
|
form_country: formData.user.country,
|
|
139
140
|
form_name: "Dev Edition Signup",
|
|
140
141
|
form_primary_product_interest: "Developer Edition",
|
|
@@ -160,6 +161,21 @@ export default class DeSignupForm extends LightningElement {
|
|
|
160
161
|
return;
|
|
161
162
|
}
|
|
162
163
|
|
|
164
|
+
let hasSanctionedCountryEmail = false;
|
|
165
|
+
for (const sanctionedCountryEnding of SANCTIONED_COUNTRY_EMAILS) {
|
|
166
|
+
if (formData.user.email.endsWith(sanctionedCountryEnding)) {
|
|
167
|
+
hasSanctionedCountryEmail = true;
|
|
168
|
+
}
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
if (hasSanctionedCountryEmail) {
|
|
172
|
+
this.setSubmitButtonDisabled(true);
|
|
173
|
+
window.setTimeout(() => {
|
|
174
|
+
window.location.href = "https://www.salesforce.com/closed/";
|
|
175
|
+
}, 2000);
|
|
176
|
+
return;
|
|
177
|
+
}
|
|
178
|
+
|
|
163
179
|
// Due to Heroku's non-configurable 30 second request timeout, the POST request that
|
|
164
180
|
// submits the form can "fail" even though org creation is actually succeeding (but
|
|
165
181
|
// taking longer than 30 seconds). The back-end only gives us a "generic" error in that
|
|
@@ -183,7 +199,7 @@ export default class DeSignupForm extends LightningElement {
|
|
|
183
199
|
new_registration: true
|
|
184
200
|
});
|
|
185
201
|
this.trackFormCompletion(event.target!, formData, "success");
|
|
186
|
-
window.location.href = "/signup/success";
|
|
202
|
+
window.location.href = "/developer-legacy/signup/success";
|
|
187
203
|
})
|
|
188
204
|
.catch((error) => {
|
|
189
205
|
if (error.message === ErrorCode.GENERIC && didSubmitTimeout) {
|
|
@@ -195,7 +211,8 @@ export default class DeSignupForm extends LightningElement {
|
|
|
195
211
|
// If the timeout time has passed at the point of error, and the error code is simply "GENERIC",
|
|
196
212
|
// we do not know whether the org will ultimately be created (and we have no current way of confirming),
|
|
197
213
|
// so we navigate the user to an interim page that tells them to watch their email.
|
|
198
|
-
window.location.href =
|
|
214
|
+
window.location.href =
|
|
215
|
+
"/developer-legacy/signup/account-verification";
|
|
199
216
|
} else {
|
|
200
217
|
this.setSubmitButtonDisabled(false);
|
|
201
218
|
this.recaptchaComponent?.reset();
|
package/LICENSE
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
Copyright (c) 2020, Salesforce.com, Inc.
|
|
2
|
-
All rights reserved.
|
|
3
|
-
|
|
4
|
-
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
|
|
5
|
-
|
|
6
|
-
* Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
|
|
7
|
-
|
|
8
|
-
* Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
|
|
9
|
-
|
|
10
|
-
* Neither the name of Salesforce.com nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
|
|
11
|
-
|
|
12
|
-
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|