@salesforcedevs/dw-components 1.3.188 → 1.3.191

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.188",
3
+ "version": "1.3.191",
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": "f0b1c1b1d73f174466f05835689705ad459ccce4"
27
+ "gitHead": "b7c44a3f1e91f2aec9c5241274e3c4b54d4ed73b"
28
28
  }
@@ -82,6 +82,22 @@ export default class DeSignupForm extends LightningElement {
82
82
  this.updateInnerHtml("span.legal-checkbox", this.privacyText);
83
83
  }
84
84
 
85
+ createUUID() {
86
+ if ("crypto" in window && "randomUUID" in crypto) {
87
+ return crypto.randomUUID();
88
+ }
89
+ let dt = new Date().getTime();
90
+ const uuid = "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(
91
+ /[xy]/g,
92
+ function (c) {
93
+ var r = (dt + Math.random() * 16) % 16 | 0;
94
+ dt = Math.floor(dt / 16);
95
+ return (c === "x" ? r : (r & 0x3) | 0x8).toString(16);
96
+ }
97
+ );
98
+ return uuid;
99
+ }
100
+
85
101
  handleSubmit(event: Event): void {
86
102
  event.preventDefault();
87
103
 
@@ -112,8 +128,10 @@ export default class DeSignupForm extends LightningElement {
112
128
  form_country: formData.user.country,
113
129
  form_name: "Dev Edition Signup",
114
130
  form_primary_product_interest: "Developer Edition",
131
+ offer_id: `form-builder|dev-edition-signup|${DEFAULT_DRIVER}AAA`,
115
132
  offer_type: "free trial",
116
- name_capture_campaign_id: `${DEFAULT_DRIVER}AAA`
133
+ name_capture_campaign_id: `${DEFAULT_DRIVER}AAA`,
134
+ form_join_id_unique: this.createUUID()
117
135
  });
118
136
  window.location.href = "/signup/success";
119
137
  })
@@ -245,6 +245,12 @@ export default class J2sCardSequence extends LightningElement {
245
245
  }
246
246
 
247
247
  handleStepSequenceChange({ detail }: CustomEvent) {
248
+ if (detail.stepIndex === 1 && this.currentSequenceStep === 2) {
249
+ // User is going back after submitting the form; ensure that `selectedCountry` is reset, since this impacts form behavior
250
+ this.selectedCountry =
251
+ this.formIncomingUserInfo.MailingCountry || "";
252
+ }
253
+
248
254
  this.currentSequenceStep = detail.stepIndex;
249
255
  this.resetCustomButtonColors();
250
256
 
@@ -314,8 +320,6 @@ export default class J2sCardSequence extends LightningElement {
314
320
  this.jumpToStepIndex(2, false);
315
321
  this.initialStepIndex = 0; // don't save final step in storage; rather, reset the starting step
316
322
  this.resetRecaptcha();
317
- this.selectedCountry =
318
- this.formIncomingUserInfo.MailingCountry || ""; // reset selected country after form submission since this impact's form behavior
319
323
  this.hasAlreadyRegistered = true;
320
324
  } else {
321
325
  throw new Error(