@social-mail/social-mail-hosted-web 1.2.11 → 1.2.13

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.
@@ -16496,21 +16496,24 @@ System.register(["tslib", "@web-atoms/core/dist/core/Bind", "@web-atoms/core/dis
16496
16496
  passwordAgain: "",
16497
16497
  phoneNumber: "",
16498
16498
  country: "US",
16499
- captchaID: "",
16500
- captchaCode: "",
16501
16499
  phoneNumberText: "",
16502
- phoneVerificationID: "",
16503
- phoneVerificationCode: ""
16500
+ captcha: {
16501
+ code: ""
16502
+ },
16503
+ phone: {
16504
+ code: ""
16505
+ }
16504
16506
  };
16505
16507
  }
16506
16508
  init() {
16507
16509
  return __awaiter(this, void 0, void 0, function* () {
16510
+ this.hideToolbar = true;
16508
16511
  this.element.className = css;
16509
16512
  this.title = "Social Mail Signup";
16510
16513
  const {
16511
16514
  id
16512
16515
  } = yield FetchBuilder.put("/api/users/captcha").responseAsJson();
16513
- this.model.captchaID = id;
16516
+ this.model.captcha.id = id;
16514
16517
  this.renderer = XNode.create("div", null, XNode.create("div", null, XNode.create("div", {
16515
16518
  "data-max-width": "size-large"
16516
16519
  }, XNode.create(Form, null, XNode.create(FormField, {
@@ -16551,7 +16554,7 @@ System.register(["tslib", "@web-atoms/core/dist/core/Bind", "@web-atoms/core/dis
16551
16554
  }), XNode.create(MaskedInput, {
16552
16555
  "data-mask": Bind.oneWayAsync(() => formatForCountry(this.model.country)),
16553
16556
  value: Bind.twoWaysImmediate(() => this.model.phoneNumberText)
16554
- }))), XNode.create("div", null, "We require phone numer verification to prevent misuse and fraud over the email. And it will also help you in setting up two factor authentication to prevent hackers from accessing your private emails."), XNode.create("br", null), XNode.create("br", null), XNode.create(FormField, {
16557
+ }))), XNode.create("div", null, "We require phone number verification to prevent misuse and fraud over the email. And it will also help you in setting up two factor authentication to prevent hackers from accessing your private emails."), XNode.create("br", null), XNode.create("br", null), XNode.create(FormField, {
16555
16558
  label: "Captcha"
16556
16559
  }, XNode.create("img", {
16557
16560
  src: `/api/users/captcha/${id}`
@@ -16559,7 +16562,7 @@ System.register(["tslib", "@web-atoms/core/dist/core/Bind", "@web-atoms/core/dis
16559
16562
  label: "Enter 5 Digit Code"
16560
16563
  }, XNode.create("input", {
16561
16564
  type: "tel",
16562
- value: Bind.twoWaysImmediate(() => this.model.captchaCode)
16565
+ value: Bind.twoWaysImmediate(() => this.model.captcha.code)
16563
16566
  })), XNode.create("div", null, XNode.create("button", {
16564
16567
  "data-layout": "go-button",
16565
16568
  "data-submit-event": "signup"
@@ -16589,14 +16592,21 @@ System.register(["tslib", "@web-atoms/core/dist/core/Bind", "@web-atoms/core/dis
16589
16592
  model.phoneNumber = isdCode.startsWith("+") ? isdCode + phoneNumber : `+${isdCode}${phoneNumber}`;
16590
16593
  const {
16591
16594
  userID,
16592
- phoneVerificationID
16595
+ phone = {},
16596
+ captcha = {}
16593
16597
  } = yield FetchBuilder.post("/api/users/signup").jsonBody(model).responseAsJson();
16594
16598
  if (userID) {
16595
16599
  location.href = "/";
16596
16600
  return;
16597
16601
  }
16598
- if (phoneVerificationID) {
16599
- model.phoneVerificationID = phoneVerificationID;
16602
+ if (captcha) {
16603
+ model.captcha.verified = captcha.verified;
16604
+ }
16605
+ if (phone === null || phone === void 0 ? void 0 : phone.verified) {
16606
+ model.phone.verified = phone.verified;
16607
+ }
16608
+ if (phone === null || phone === void 0 ? void 0 : phone.id) {
16609
+ model.phone.id = phone.id;
16600
16610
  yield this.askPhoneCode();
16601
16611
  }
16602
16612
  });
@@ -16610,7 +16620,7 @@ System.register(["tslib", "@web-atoms/core/dist/core/Bind", "@web-atoms/core/dis
16610
16620
  }, XNode.create("input", {
16611
16621
  type: "tel",
16612
16622
  autofocus: true,
16613
- value: Bind.twoWaysImmediate(() => this.model.phoneVerificationCode)
16623
+ value: Bind.twoWaysImmediate(() => this.model.phone.code)
16614
16624
  })), XNode.create("div", null, XNode.create("button", {
16615
16625
  "data-layout": "go-button",
16616
16626
  "data-submit-event": "signup"