@salesforcedevs/dw-components 1.6.0 → 1.7.0
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
|
+
"version": "1.7.0",
|
|
4
4
|
"description": "Lightning web components for https://developer.salesforce.com",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"engines": {
|
|
@@ -26,5 +26,5 @@
|
|
|
26
26
|
"@types/setimmediate": "1.0.4",
|
|
27
27
|
"setimmediate": "1.0.5"
|
|
28
28
|
},
|
|
29
|
-
"gitHead": "
|
|
29
|
+
"gitHead": "80c604385be4144f9e8325d9dd5a66c9ddeb5247"
|
|
30
30
|
}
|
|
@@ -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
|
|
@@ -160,6 +161,18 @@ export default class DeSignupForm extends LightningElement {
|
|
|
160
161
|
return;
|
|
161
162
|
}
|
|
162
163
|
|
|
164
|
+
if (
|
|
165
|
+
SANCTIONED_COUNTRY_EMAILS.some((emailEnding) => {
|
|
166
|
+
return formData.user.email.endsWith(emailEnding);
|
|
167
|
+
})
|
|
168
|
+
) {
|
|
169
|
+
// pretend to submit for 2 seconds, and then redirect
|
|
170
|
+
this.setSubmitButtonDisabled(true);
|
|
171
|
+
window.setTimeout(() => {
|
|
172
|
+
window.location.href = "https://www.salesforce.com/closed/";
|
|
173
|
+
}, 2000);
|
|
174
|
+
}
|
|
175
|
+
|
|
163
176
|
// Due to Heroku's non-configurable 30 second request timeout, the POST request that
|
|
164
177
|
// submits the form can "fail" even though org creation is actually succeeding (but
|
|
165
178
|
// taking longer than 30 seconds). The back-end only gives us a "generic" error in that
|