@salesforcedevs/dw-components
Advanced tools
Comparing version
{ | ||
"name": "@salesforcedevs/dw-components", | ||
"version": "1.5.0", | ||
"version": "1.6.0-alpha", | ||
"description": "Lightning web components for https://developer.salesforce.com", | ||
@@ -28,4 +28,3 @@ "license": "MIT", | ||
"setimmediate": "1.0.5" | ||
}, | ||
"gitHead": "1de8f6760c69a5b41cf6f22f0a0940914a3c15e0" | ||
} | ||
} |
@@ -21,2 +21,3 @@ import { LightningElement, api, track } from "lwc"; | ||
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 | ||
const SANCTIONED_COUNTRY_EMAILS = [".ir", ".cu", ".sy", ".kp", ".by", ".ru"]; | ||
@@ -138,3 +139,3 @@ export default class DeSignupForm extends LightningElement { | ||
converting_page: `SFDC:us:signup:${convertingPage}`, | ||
converting_page_url: `https://developer.salesforce.com/signup/${convertingPage}`, | ||
converting_page_url: `https://developer.salesforce.com/developer-legacy/signup/${convertingPage}`, | ||
form_country: formData.user.country, | ||
@@ -165,2 +166,17 @@ form_name: "Dev Edition Signup", | ||
let hasSanctionedCountryEmail = false; | ||
for (const sanctionedCountryEnding of SANCTIONED_COUNTRY_EMAILS) { | ||
if (formData.user.email.endsWith(sanctionedCountryEnding)) { | ||
hasSanctionedCountryEmail = true; | ||
} | ||
} | ||
if (hasSanctionedCountryEmail) { | ||
this.setSubmitButtonDisabled(true); | ||
window.setTimeout(() => { | ||
window.location.href = "https://www.salesforce.com/closed/"; | ||
}, 2000); | ||
return; | ||
} | ||
// Due to Heroku's non-configurable 30 second request timeout, the POST request that | ||
@@ -189,3 +205,3 @@ // submits the form can "fail" even though org creation is actually succeeding (but | ||
this.trackFormCompletion(event.target!, formData, "success"); | ||
window.location.href = "/signup/success"; | ||
window.location.href = "/developer-legacy/signup/success"; | ||
}) | ||
@@ -202,3 +218,4 @@ .catch((error) => { | ||
// so we navigate the user to an interim page that tells them to watch their email. | ||
window.location.href = "/signup/account-verification"; | ||
window.location.href = | ||
"/developer-legacy/signup/account-verification"; | ||
} else { | ||
@@ -205,0 +222,0 @@ this.setSubmitButtonDisabled(false); |
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
Mixed license
License(Experimental) Package contains multiple licenses.
Found 1 instance in 1 package
519697
1.68%0
-100%9644
2.31%2
100%