@salesforcedevs/dw-components 1.3.176-canary.1 → 1.3.180-canary.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 +1 -1
- package/src/modules/dw/j2sCardSequence/j2sCardSequence.html +1 -0
- package/src/modules/dw/j2sCardSequence/j2sCardSequence.ts +4 -1
- package/src/modules/dw/j2sCardSequenceStep/j2sCardSequenceStep.html +1 -0
- package/src/modules/dw/j2sCardSequenceStep/j2sCardSequenceStep.ts +5 -1
- package/src/modules/dw/j2sForm/j2sForm.html +7 -0
- package/src/modules/dw/j2sForm/j2sForm.ts +5 -0
- package/src/modules/dw/j2sForm/mockProps.ts +0 -1
- package/src/modules/dw/j2sCardSequence/mockProps.ts +0 -61
package/package.json
CHANGED
|
@@ -13,7 +13,6 @@ export type StepDatum = {
|
|
|
13
13
|
};
|
|
14
14
|
formData?: {
|
|
15
15
|
countriesWithReferralInput?: string[];
|
|
16
|
-
countriesWithRequiredJobRole?: string[];
|
|
17
16
|
formId?: string;
|
|
18
17
|
j2sTerms?: string;
|
|
19
18
|
notAvailableAlertInfo?: {
|
|
@@ -111,6 +110,7 @@ export default class J2sCardSequence extends LightningElement {
|
|
|
111
110
|
|
|
112
111
|
private countries: any[] = [];
|
|
113
112
|
private currentSequenceStep = 0;
|
|
113
|
+
private hasAlreadyRegistered = false;
|
|
114
114
|
private forceInitiallyVisible = false;
|
|
115
115
|
private formSubmissionFailureState: Partial<DrmFormData> | null = null;
|
|
116
116
|
private recaptchaToken = "";
|
|
@@ -308,6 +308,9 @@ export default class J2sCardSequence extends LightningElement {
|
|
|
308
308
|
this.jumpToStepIndex(2, false);
|
|
309
309
|
this.initialStepIndex = 0; // don't save final step in storage; rather, reset the starting step
|
|
310
310
|
this.resetRecaptcha();
|
|
311
|
+
this.selectedCountry =
|
|
312
|
+
this.formIncomingUserInfo.MailingCountry || ""; // reset selected country after form submission since this impact's form behavior
|
|
313
|
+
this.hasAlreadyRegistered = true;
|
|
311
314
|
} else {
|
|
312
315
|
throw new Error(
|
|
313
316
|
`Form submission failed. (status: ${resOutput.status}, message: ${resOutput.errorMessage})`
|
|
@@ -24,6 +24,7 @@
|
|
|
24
24
|
id={stepDatum.formData.formId}
|
|
25
25
|
countries={countryOptions}
|
|
26
26
|
form-metadata={stepDatum.formData}
|
|
27
|
+
has-already-registered={hasAlreadyRegistered}
|
|
27
28
|
incoming-user-info={userInfo}
|
|
28
29
|
onformvaliditychange={handleFormValidityChange}
|
|
29
30
|
recaptcha-token={recaptchaToken}
|
|
@@ -5,6 +5,7 @@ import J2sForm from "dw/j2sForm";
|
|
|
5
5
|
|
|
6
6
|
export default class J2sCardSequenceStep extends LightningElement {
|
|
7
7
|
@api countryOptions: any[] = [];
|
|
8
|
+
@api hasAlreadyRegistered = false;
|
|
8
9
|
@api isLoading = false;
|
|
9
10
|
@api recaptchaToken = "";
|
|
10
11
|
@api selectedCountry = "";
|
|
@@ -29,7 +30,10 @@ export default class J2sCardSequenceStep extends LightningElement {
|
|
|
29
30
|
}
|
|
30
31
|
|
|
31
32
|
private get isJ2sFormInvalid() {
|
|
32
|
-
return
|
|
33
|
+
return (
|
|
34
|
+
this.hasAlreadyRegistered ||
|
|
35
|
+
(this.stepIndex === 1 && this._isJ2sFormInvalid)
|
|
36
|
+
);
|
|
33
37
|
}
|
|
34
38
|
private set isJ2sFormInvalid(value: boolean) {
|
|
35
39
|
this._isJ2sFormInvalid = value;
|
|
@@ -132,6 +132,13 @@
|
|
|
132
132
|
variant="accented"
|
|
133
133
|
></dx-alert>
|
|
134
134
|
</div>
|
|
135
|
+
<div class="form-row" if:true={hasAlreadyRegistered}>
|
|
136
|
+
<dx-alert
|
|
137
|
+
alert-info={alreadyRegisteredAlertInfo}
|
|
138
|
+
type="danger"
|
|
139
|
+
variant="accented"
|
|
140
|
+
></dx-alert>
|
|
141
|
+
</div>
|
|
135
142
|
<div class="form-row" if:true={isSalesforceEmployee}>
|
|
136
143
|
<dx-alert
|
|
137
144
|
alert-info={salesforceEmployeeAlertInfo}
|
|
@@ -42,6 +42,7 @@ export default class J2sForm extends LightningElementWithState<J2sFormState> {
|
|
|
42
42
|
private _isInitialRender = true;
|
|
43
43
|
private _recaptchaToken = "";
|
|
44
44
|
|
|
45
|
+
@api hasAlreadyRegistered = false;
|
|
45
46
|
@api formMetadata: any = {};
|
|
46
47
|
@api id = "";
|
|
47
48
|
@api incomingUserInfo = {} as DrmFormData;
|
|
@@ -118,6 +119,10 @@ export default class J2sForm extends LightningElementWithState<J2sFormState> {
|
|
|
118
119
|
return this.state.RelationshipToSalesforce === "Salesforce Employee";
|
|
119
120
|
}
|
|
120
121
|
|
|
122
|
+
get alreadyRegisteredAlertInfo() {
|
|
123
|
+
return this.formMetadata.alreadyRegisteredAlertInfo;
|
|
124
|
+
}
|
|
125
|
+
|
|
121
126
|
get notAvailableAlertInfo() {
|
|
122
127
|
return this.formMetadata.notAvailableAlertInfo;
|
|
123
128
|
}
|
|
@@ -3075,7 +3075,6 @@ const tbidUserInfo = {
|
|
|
3075
3075
|
|
|
3076
3076
|
export const formMetadata = {
|
|
3077
3077
|
countriesWithReferralInput: ["IN"],
|
|
3078
|
-
countriewWithRequiredJobRole: ["CA"],
|
|
3079
3078
|
j2sTerms:
|
|
3080
3079
|
'I agree to the Journey to Salesforce Program Terms, subject to the <a href="http://www.google.com">Salesforce Program Agreement</a>.',
|
|
3081
3080
|
notAvailableAlertInfo: {
|
|
@@ -1,61 +0,0 @@
|
|
|
1
|
-
export const stepSequenceData = {
|
|
2
|
-
animateTransitions: "true",
|
|
3
|
-
stepsData: [
|
|
4
|
-
{
|
|
5
|
-
bodyHtml:
|
|
6
|
-
'<p class="dx-text-display-7">Register for Journey to Salesforce and you\'ll be on your way to becoming a Salesforce Developer.</p><ul class="dx-text-display-8"><li>Step 1: Log in or sign up for a free Trailblazer.me account</li><li>Step 2: Confirm your program registration</li><li>Step 3: Begin your journey!</li></ul>',
|
|
7
|
-
primaryAction: {
|
|
8
|
-
text: "Get Started"
|
|
9
|
-
},
|
|
10
|
-
showStepNumber: "true",
|
|
11
|
-
stepTitle: "Get started now."
|
|
12
|
-
},
|
|
13
|
-
{
|
|
14
|
-
bodyHtml:
|
|
15
|
-
'<p class="dx-text-display-7">You\'re almost done! Please review your information and agree to the Journey to Salesforce program terms and conditions.</p>',
|
|
16
|
-
formData: {
|
|
17
|
-
countriesWithReferralInput: ["IN"],
|
|
18
|
-
countriesWithRequiredJobRole: ["CA"],
|
|
19
|
-
formId: "j2s-form",
|
|
20
|
-
j2sTerms:
|
|
21
|
-
'I agree to the Journey to Salesforce Program Terms, subject to the <a href="http://www.google.com">Salesforce Program Agreement</a>.',
|
|
22
|
-
notAvailableAlertInfo: {
|
|
23
|
-
title: "Not Available",
|
|
24
|
-
body:
|
|
25
|
-
'The Journey to Salesforce program is not currently available in your country. See the <a href="https://www.google.com/">program FAQs</a> for a list of participating countries.'
|
|
26
|
-
},
|
|
27
|
-
participatingCountryCodes: ["US", "CA", "IN"]
|
|
28
|
-
},
|
|
29
|
-
primaryAction: {
|
|
30
|
-
text: "Complete Registration"
|
|
31
|
-
},
|
|
32
|
-
secondaryActionHtml:
|
|
33
|
-
'<span class="required-notice">* Required to participate in Journey to Salesforce</span>',
|
|
34
|
-
showStepNumber: "true",
|
|
35
|
-
stepTitle: "Complete your registration."
|
|
36
|
-
},
|
|
37
|
-
{
|
|
38
|
-
bodyHtml:
|
|
39
|
-
'<div class="dx-text-display-8"><p>Welcome to Journey to Salesforce! Congratulations on taking this step in your journey towards becoming a Salesforce Developer. Through this program you\'ll gain the knowledge, experience, and skills to help you excel in the Salesforce ecosystem.</p><p>To get started, click the button below to join the Journey to Salesforce community, and make sure to check your email for links to bookmark!</p></div>',
|
|
40
|
-
headerData: {
|
|
41
|
-
backgroundColor: "green-vibrant-95",
|
|
42
|
-
iconSymbol: "check-circle",
|
|
43
|
-
iconSprite: "general",
|
|
44
|
-
iconColor: "green-vibrant-65",
|
|
45
|
-
textColor: "indigo-vibrant-20"
|
|
46
|
-
},
|
|
47
|
-
primaryAction: {
|
|
48
|
-
iconSprite: "utility",
|
|
49
|
-
iconSymbol: "new_window",
|
|
50
|
-
link:
|
|
51
|
-
"https://salesforce-external.slack.com/archives/C05HJK4PGJV",
|
|
52
|
-
text: "Join Slack",
|
|
53
|
-
variant: "custom"
|
|
54
|
-
},
|
|
55
|
-
secondaryActionHtml:
|
|
56
|
-
'<span class="dx-text-display-7">Ready to jump in?</span>',
|
|
57
|
-
showStepNumber: "true",
|
|
58
|
-
stepTitle: "Your Registration is Confirmed"
|
|
59
|
-
}
|
|
60
|
-
]
|
|
61
|
-
};
|