@saasquatch/mint-components 1.7.3-0 → 1.7.3-2

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.
Files changed (166) hide show
  1. package/dist/cjs/{ShadowViewAddon-496b2f3d.js → ShadowViewAddon-250836ad.js} +4 -4
  2. package/dist/cjs/{global-a1394707.js → global-6785de71.js} +1 -1
  3. package/dist/cjs/loader.cjs.js +2 -2
  4. package/dist/cjs/mint-components.cjs.js +2 -2
  5. package/dist/cjs/sqm-big-stat_39.cjs.entry.js +68 -2
  6. package/dist/cjs/sqm-leaderboard-rank.cjs.entry.js +1 -1
  7. package/dist/cjs/sqm-password-field.cjs.entry.js +41 -16
  8. package/dist/cjs/{sqm-portal-email-verification-view-f76bcd38.js → sqm-portal-email-verification-view-0bd4a2c2.js} +3 -3
  9. package/dist/cjs/sqm-portal-email-verification.cjs.entry.js +8 -2
  10. package/dist/cjs/{sqm-portal-profile-view-f9daa7c4.js → sqm-portal-profile-view-13a1229f.js} +1 -1
  11. package/dist/cjs/sqm-portal-profile.cjs.entry.js +2 -2
  12. package/dist/cjs/sqm-portal-registration-form.cjs.entry.js +39 -1
  13. package/dist/cjs/{sqm-portal-reset-password-view-d5bc7afc.js → sqm-portal-reset-password-view-7680fc87.js} +1 -1
  14. package/dist/cjs/sqm-portal-reset-password.cjs.entry.js +37 -1
  15. package/dist/cjs/{sqm-portal-verify-email-view-f6c7287e.js → sqm-portal-verify-email-view-200752cb.js} +4 -4
  16. package/dist/cjs/sqm-portal-verify-email.cjs.entry.js +31 -6
  17. package/dist/cjs/sqm-referral-table_11.cjs.entry.js +1 -1
  18. package/dist/cjs/sqm-rewards-table_9.cjs.entry.js +1 -1
  19. package/dist/cjs/sqm-stencilbook.cjs.entry.js +37 -30
  20. package/dist/collection/components/sqm-password-field/passwordValidation.js +11 -11
  21. package/dist/collection/components/sqm-password-field/sqm-password-field.js +155 -4
  22. package/dist/collection/components/sqm-password-field/usePasswordField.js +1 -1
  23. package/dist/collection/components/sqm-portal-change-password/sqm-portal-change-password-view.js +1 -1
  24. package/dist/collection/components/sqm-portal-change-password/sqm-portal-change-password.js +157 -1
  25. package/dist/collection/components/sqm-portal-change-password/usePortalChangePassword.js +6 -0
  26. package/dist/collection/components/sqm-portal-container/PortalContainer.stories.js +7 -7
  27. package/dist/collection/components/sqm-portal-email-verification/sqm-portal-email-verification-view.js +2 -2
  28. package/dist/collection/components/sqm-portal-email-verification/sqm-portal-email-verification.js +31 -1
  29. package/dist/collection/components/sqm-portal-register/sqm-portal-register-view.js +1 -1
  30. package/dist/collection/components/sqm-portal-register/sqm-portal-register.js +157 -1
  31. package/dist/collection/components/sqm-portal-registration-form/sqm-portal-registration-form-view.js +1 -1
  32. package/dist/collection/components/sqm-portal-registration-form/sqm-portal-registration-form.js +184 -1
  33. package/dist/collection/components/sqm-portal-registration-form/usePortalRegistrationForm.js +3 -1
  34. package/dist/collection/components/sqm-portal-reset-password/sqm-portal-reset-password-view.js +2 -2
  35. package/dist/collection/components/sqm-portal-reset-password/sqm-portal-reset-password.js +157 -1
  36. package/dist/collection/components/sqm-portal-reset-password/usePortalResetPassword.js +6 -0
  37. package/dist/collection/components/sqm-portal-verify-email/PortalVerifyEmail.stories.js +6 -0
  38. package/dist/collection/components/sqm-portal-verify-email/sqm-portal-verify-email-view.js +4 -4
  39. package/dist/collection/components/sqm-portal-verify-email/sqm-portal-verify-email.js +98 -5
  40. package/dist/collection/components/sqm-portal-verify-email/usePortalVerifyEmail.js +6 -1
  41. package/dist/collection/components/sqm-referral-card/ReferralCard.stories.js +1 -1
  42. package/dist/collection/components/sqm-share-button/ShareButton.stories.js +2 -1
  43. package/dist/collection/components/sqm-share-button/sqm-share-button-view.js +1 -1
  44. package/dist/collection/global/global.js +1 -1
  45. package/dist/collection/stories/NewPortal.stories.js +1 -1
  46. package/dist/esm/{ShadowViewAddon-e72b97e8.js → ShadowViewAddon-6dc295a1.js} +4 -4
  47. package/dist/esm/{global-f52ccc56.js → global-91edfca0.js} +1 -1
  48. package/dist/esm/loader.js +2 -2
  49. package/dist/esm/mint-components.js +2 -2
  50. package/dist/esm/sqm-big-stat_39.entry.js +68 -2
  51. package/dist/esm/sqm-leaderboard-rank.entry.js +1 -1
  52. package/dist/esm/sqm-password-field.entry.js +41 -16
  53. package/dist/esm/{sqm-portal-email-verification-view-5a91d65e.js → sqm-portal-email-verification-view-97097335.js} +3 -3
  54. package/dist/esm/sqm-portal-email-verification.entry.js +8 -2
  55. package/dist/esm/{sqm-portal-profile-view-8ba6a73e.js → sqm-portal-profile-view-efa44888.js} +1 -1
  56. package/dist/esm/sqm-portal-profile.entry.js +2 -2
  57. package/dist/esm/sqm-portal-registration-form.entry.js +40 -2
  58. package/dist/esm/{sqm-portal-reset-password-view-0df781f6.js → sqm-portal-reset-password-view-cdbf99dc.js} +1 -1
  59. package/dist/esm/sqm-portal-reset-password.entry.js +37 -1
  60. package/dist/esm/{sqm-portal-verify-email-view-1db4fae6.js → sqm-portal-verify-email-view-723687ca.js} +4 -4
  61. package/dist/esm/sqm-portal-verify-email.entry.js +32 -7
  62. package/dist/esm/sqm-referral-table_11.entry.js +1 -1
  63. package/dist/esm/sqm-rewards-table_9.entry.js +1 -1
  64. package/dist/esm/sqm-stencilbook.entry.js +37 -30
  65. package/dist/esm-es5/ShadowViewAddon-6dc295a1.js +1 -0
  66. package/dist/esm-es5/{global-f52ccc56.js → global-91edfca0.js} +1 -1
  67. package/dist/esm-es5/loader.js +1 -1
  68. package/dist/esm-es5/mint-components.js +1 -1
  69. package/dist/esm-es5/sqm-big-stat_39.entry.js +1 -1
  70. package/dist/esm-es5/sqm-leaderboard-rank.entry.js +1 -1
  71. package/dist/esm-es5/sqm-password-field.entry.js +1 -1
  72. package/dist/esm-es5/{sqm-portal-email-verification-view-5a91d65e.js → sqm-portal-email-verification-view-97097335.js} +1 -1
  73. package/dist/esm-es5/sqm-portal-email-verification.entry.js +1 -1
  74. package/dist/esm-es5/{sqm-portal-profile-view-8ba6a73e.js → sqm-portal-profile-view-efa44888.js} +1 -1
  75. package/dist/esm-es5/sqm-portal-profile.entry.js +1 -1
  76. package/dist/esm-es5/sqm-portal-registration-form.entry.js +1 -1
  77. package/dist/esm-es5/{sqm-portal-reset-password-view-0df781f6.js → sqm-portal-reset-password-view-cdbf99dc.js} +1 -1
  78. package/dist/esm-es5/sqm-portal-reset-password.entry.js +1 -1
  79. package/dist/esm-es5/sqm-portal-verify-email-view-723687ca.js +1 -0
  80. package/dist/esm-es5/sqm-portal-verify-email.entry.js +1 -1
  81. package/dist/esm-es5/sqm-referral-table_11.entry.js +1 -1
  82. package/dist/esm-es5/sqm-rewards-table_9.entry.js +1 -1
  83. package/dist/esm-es5/sqm-stencilbook.entry.js +1 -1
  84. package/dist/mint-components/mint-components.esm.js +1 -1
  85. package/dist/mint-components/mint-components.js +1 -1
  86. package/dist/mint-components/p-03c4d81a.js +1 -0
  87. package/dist/mint-components/{p-d76926d9.entry.js → p-05f069ce.entry.js} +2 -2
  88. package/dist/mint-components/p-061d90bc.system.entry.js +1 -0
  89. package/dist/mint-components/p-0943b547.system.js +1 -0
  90. package/dist/mint-components/p-418362a9.entry.js +9 -0
  91. package/dist/mint-components/{p-ef3d226e.js → p-42844992.js} +1 -1
  92. package/dist/mint-components/p-4dae1dcc.system.js +1 -0
  93. package/dist/mint-components/p-4eca24af.js +1 -0
  94. package/dist/mint-components/p-50daed57.entry.js +13 -0
  95. package/dist/mint-components/p-59a505e1.entry.js +1 -0
  96. package/dist/mint-components/p-59e4c214.system.entry.js +1 -0
  97. package/dist/mint-components/p-5e9e9a29.system.entry.js +1 -0
  98. package/dist/mint-components/p-6354c559.system.entry.js +1 -0
  99. package/dist/mint-components/{p-4d182391.system.entry.js → p-66e3cb0c.system.entry.js} +1 -1
  100. package/dist/mint-components/p-69a7558a.system.entry.js +1 -0
  101. package/dist/mint-components/p-6d1a2821.system.entry.js +1 -0
  102. package/dist/mint-components/p-72c9fbf6.system.entry.js +1 -0
  103. package/dist/mint-components/p-78027dd0.system.js +1 -0
  104. package/dist/mint-components/p-9142d62b.entry.js +1 -0
  105. package/dist/mint-components/p-97519743.entry.js +1 -0
  106. package/dist/mint-components/{p-1d09e590.system.js → p-9f3a0252.system.js} +1 -1
  107. package/dist/mint-components/p-a40b01d5.js +1 -0
  108. package/dist/mint-components/p-af302aa3.entry.js +1 -0
  109. package/dist/mint-components/{p-c23d7c11.entry.js → p-b0ef4f17.entry.js} +1 -1
  110. package/dist/mint-components/{p-f61e80c2.entry.js → p-b0f3c6c5.entry.js} +3 -3
  111. package/dist/mint-components/p-ce922d94.system.entry.js +1 -0
  112. package/dist/mint-components/p-d29c820c.system.js +1 -0
  113. package/dist/mint-components/{p-2c9e0e83.entry.js → p-dc72e7e9.entry.js} +10 -10
  114. package/dist/mint-components/{p-77c999fb.system.entry.js → p-e49392c3.system.entry.js} +1 -1
  115. package/dist/mint-components/{p-10106ee1.js → p-eab33344.js} +1 -1
  116. package/dist/mint-components/{p-5303ae94.system.entry.js → p-ed9374ef.system.entry.js} +1 -1
  117. package/dist/mint-components/{p-c434bfdf.entry.js → p-ef6a3ff3.entry.js} +2 -2
  118. package/dist/mint-components/{p-3475b8a5.system.js → p-f63961b4.system.js} +1 -1
  119. package/dist/mint-components/p-f8f278e9.js +379 -0
  120. package/dist/mint-components/p-fc51a087.system.js +1 -0
  121. package/dist/types/components/sqm-password-field/passwordValidation.d.ts +1 -1
  122. package/dist/types/components/sqm-password-field/sqm-password-field.d.ts +24 -0
  123. package/dist/types/components/sqm-portal-change-password/sqm-portal-change-password-view.d.ts +6 -0
  124. package/dist/types/components/sqm-portal-change-password/sqm-portal-change-password.d.ts +24 -0
  125. package/dist/types/components/sqm-portal-change-password/usePortalChangePassword.d.ts +6 -0
  126. package/dist/types/components/sqm-portal-email-verification/sqm-portal-email-verification-view.d.ts +1 -0
  127. package/dist/types/components/sqm-portal-email-verification/sqm-portal-email-verification.d.ts +5 -0
  128. package/dist/types/components/sqm-portal-register/sqm-portal-register-view.d.ts +6 -0
  129. package/dist/types/components/sqm-portal-register/sqm-portal-register.d.ts +24 -0
  130. package/dist/types/components/sqm-portal-registration-form/sqm-portal-registration-form-view.d.ts +6 -0
  131. package/dist/types/components/sqm-portal-registration-form/sqm-portal-registration-form.d.ts +30 -0
  132. package/dist/types/components/sqm-portal-reset-password/sqm-portal-reset-password-view.d.ts +6 -0
  133. package/dist/types/components/sqm-portal-reset-password/sqm-portal-reset-password.d.ts +24 -0
  134. package/dist/types/components/sqm-portal-verify-email/sqm-portal-verify-email-view.d.ts +5 -0
  135. package/dist/types/components/sqm-portal-verify-email/sqm-portal-verify-email.d.ts +15 -0
  136. package/dist/types/components/sqm-portal-verify-email/usePortalVerifyEmail.d.ts +9 -1
  137. package/dist/types/components.d.ts +290 -0
  138. package/docs/docs.docx +0 -0
  139. package/docs/raisins.json +1 -1
  140. package/grapesjs/grapesjs.js +1 -1
  141. package/package.json +1 -1
  142. package/dist/esm-es5/ShadowViewAddon-e72b97e8.js +0 -1
  143. package/dist/esm-es5/sqm-portal-verify-email-view-1db4fae6.js +0 -1
  144. package/dist/mint-components/p-13570402.system.entry.js +0 -1
  145. package/dist/mint-components/p-1bd0df11.system.entry.js +0 -1
  146. package/dist/mint-components/p-1ec9f519.system.entry.js +0 -1
  147. package/dist/mint-components/p-1edee42d.system.js +0 -1
  148. package/dist/mint-components/p-1fca04d5.system.js +0 -1
  149. package/dist/mint-components/p-3b96c230.system.js +0 -1
  150. package/dist/mint-components/p-46be1518.system.js +0 -1
  151. package/dist/mint-components/p-54a0c1df.entry.js +0 -1
  152. package/dist/mint-components/p-56525896.system.js +0 -1
  153. package/dist/mint-components/p-57a89487.entry.js +0 -1
  154. package/dist/mint-components/p-75ddf3ca.js +0 -1
  155. package/dist/mint-components/p-82e8eae6.system.entry.js +0 -1
  156. package/dist/mint-components/p-8488d11d.js +0 -1
  157. package/dist/mint-components/p-84ee5462.system.entry.js +0 -1
  158. package/dist/mint-components/p-8ab5b0bc.js +0 -379
  159. package/dist/mint-components/p-9a74f167.entry.js +0 -13
  160. package/dist/mint-components/p-abfb3897.system.entry.js +0 -1
  161. package/dist/mint-components/p-b9c7b7ef.entry.js +0 -1
  162. package/dist/mint-components/p-cd52f14d.system.entry.js +0 -1
  163. package/dist/mint-components/p-e058ba88.entry.js +0 -1
  164. package/dist/mint-components/p-efd129de.js +0 -1
  165. package/dist/mint-components/p-f60d9f3e.system.entry.js +0 -1
  166. package/dist/mint-components/p-fc0da6f7.entry.js +0 -9
@@ -8,6 +8,7 @@ const index_module = require('./index.module-02576958.js');
8
8
  const cjs = require('./cjs-1066ec21.js');
9
9
  const mixins = require('./mixins-fe9d4112.js');
10
10
  const JSS = require('./JSS-8503a151.js');
11
+ const utils = require('./utils-6847bc06.js');
11
12
  const useRegistrationFormState = require('./useRegistrationFormState-01d63bda.js');
12
13
 
13
14
  var constants = {
@@ -400,21 +401,15 @@ const passwordSchema = new src()
400
401
  .lowercase() // Must have lowercase letters
401
402
  .has(/([\d`~\!@#\$%\^\&\*\(\)\-_\=\+\[\{\}\]\\\|;:'",<.>\/\?€£¥₹§±].*){1,}/); // Must contain at least 1 digit or symbol
402
403
  // Taken from combining https://github.com/tarunbatra/password-validator/blob/40184970e4f65efa8aed7a64185a011a3b5d0e54/src/constants.js#L9
403
- const validateNewPassword = (password) => {
404
+ const validateNewPassword = (password, validationText) => {
404
405
  const errors = passwordSchema.validate(password, { list: true });
405
- const message = getErrorMessage(errors, password);
406
+ const message = getErrorMessage(errors, password, validationText);
406
407
  return message;
407
408
  };
408
409
  const Valid = () => (index.h("svg", { xmlns: "http://www.w3.org/2000/svg", width: "12", height: "12", viewBox: "0 0 12 12", fill: "none" },
409
410
  index.h("path", { d: "M6 0C2.688 0 0 2.688 0 6C0 9.312 2.688 12 6 12C9.312 12 12 9.312 12 6C12 2.688 9.312 0 6 0ZM4.8 9L1.8 6L2.646 5.154L4.8 7.302L9.354 2.748L10.2 3.6L4.8 9Z", fill: "#259053" })));
410
411
  const Invalid = () => (index.h("svg", { width: "12", height: "12", viewBox: "0 0 12 12", fill: "none", xmlns: "http://www.w3.org/2000/svg" },
411
412
  index.h("path", { d: "M6 0C2.688 0 0 2.688 0 6C0 9.312 2.688 12 6 12C9.312 12 12 9.312 12 6C12 2.688 9.312 0 6 0ZM6 10.8C3.354 10.8 1.2 8.646 1.2 6C1.2 3.354 3.354 1.2 6 1.2C8.646 1.2 10.8 3.354 10.8 6C10.8 8.646 8.646 10.8 6 10.8ZM8.754 3.348L4.8 7.302L3.246 5.754L2.4 6.6L4.8 9L9.6 4.2L8.754 3.348Z", fill: "#555555" })));
412
- const validationMessages = {
413
- min: "be a minimum of 8 characters",
414
- uppercase: "contain at least 1 uppercase character",
415
- lowercase: "contain at least 1 lowercase character",
416
- has: "contain at least 1 number or symbol",
417
- };
418
413
  const baseItem = {
419
414
  display: "flex",
420
415
  alignItems: "center",
@@ -446,16 +441,22 @@ const style = {
446
441
  };
447
442
  const sheet = JSS.createStyleSheet(style);
448
443
  const styleString = sheet.toString();
449
- const getErrorMessage = (errorKeys, password) => {
444
+ const getErrorMessage = (errorKeys, password, validationText) => {
445
+ const validationMessages = {
446
+ min: validationText.minErrorText,
447
+ uppercase: validationText.uppercaseErrorText,
448
+ lowercase: validationText.lowercaseErrorText,
449
+ has: validationText.hasErrorText,
450
+ };
450
451
  if (!errorKeys.length && password)
451
452
  return (index.h("div", { class: sheet.classes.ValidationItemValid, style: { paddingBottom: "var(--sl-spacing-x-large)" } },
452
453
  index.h("style", { type: "text/css" }, styleString),
453
454
  index.h(Valid, null),
454
455
  " ",
455
- index.h("span", null, "Password has met all requirements")));
456
+ index.h("span", null, validationText.meetsRequirementsText)));
456
457
  return (index.h("div", { class: sheet.classes.Base },
457
458
  index.h("style", { type: "text/css" }, styleString),
458
- "Password must meet the following requirements:",
459
+ validationText.doesNotMeetRequirementsText,
459
460
  index.h("ul", { class: sheet.classes.ValidationList }, Object.keys(validationMessages).map((errorKey) => errorKeys.includes(errorKey) ? (index.h("li", { class: sheet.classes.ValidationItemInvalid },
460
461
  index.h(Invalid, null),
461
462
  " ",
@@ -512,7 +513,7 @@ function usePasswordField(props) {
512
513
  const registrationFormState = stencilHooks_module.d(useRegistrationFormState.REGISTRATION_FORM_STATE_CONTEXT);
513
514
  const [dynamicValidation, setDynamicValidation] = stencilHooks_module.useState("");
514
515
  function onInput(input) {
515
- const validation = validateNewPassword(input.target.value);
516
+ const validation = validateNewPassword(input.target.value, props);
516
517
  setDynamicValidation(validation);
517
518
  }
518
519
  return {
@@ -545,13 +546,37 @@ const PortalPasswordField = class {
545
546
  * @uiName Disable validation
546
547
  */
547
548
  this.disableValidation = false;
549
+ /**
550
+ * @uiName Meets requirements text
551
+ */
552
+ this.meetsRequirementsText = "Password has met all requirements";
553
+ /**
554
+ * @uiName Fails requirements text
555
+ */
556
+ this.doesNotMeetRequirementsText = "Password must meet the following requirements:";
557
+ /**
558
+ * @uiName Minimum length text
559
+ */
560
+ this.minErrorText = "be a minimum of 8 characters";
561
+ /**
562
+ * @uiName Missing uppercase text
563
+ */
564
+ this.uppercaseErrorText = "contain at least 1 uppercase character";
565
+ /**
566
+ * @uiName Missing lowercase text
567
+ */
568
+ this.lowercaseErrorText = "contain at least 1 lowercase character";
569
+ /**
570
+ * @uiName Missing number or symbol error text
571
+ */
572
+ this.hasErrorText = "contain at least 1 number or symbol";
548
573
  stencilHooks_module.h$1(this);
549
574
  }
550
575
  disconnectedCallback() { }
551
576
  render() {
552
577
  const { states, callbacks } = index_module.isDemo()
553
- ? usePasswordFieldDemo(this)
554
- : usePasswordField(this);
578
+ ? usePasswordFieldDemo(utils.getProps(this))
579
+ : usePasswordField(utils.getProps(this));
555
580
  return index.h(PortalResetPasswordView, { states: states, callbacks: callbacks });
556
581
  }
557
582
  };
@@ -560,12 +585,12 @@ function usePasswordFieldDemo(props) {
560
585
  const [dynamicValidation, setDynamicValidation] = stencilHooks_module.useState("");
561
586
  const [lastValidated, setLastValidated] = stencilHooks_module.useState("");
562
587
  if (props.demoData && lastValidated != ((_a = props === null || props === void 0 ? void 0 : props.demoData) === null || _a === void 0 ? void 0 : _a.initValue)) {
563
- const validation = validateNewPassword(((_b = props === null || props === void 0 ? void 0 : props.demoData) === null || _b === void 0 ? void 0 : _b.initValue) || "");
588
+ const validation = validateNewPassword(((_b = props === null || props === void 0 ? void 0 : props.demoData) === null || _b === void 0 ? void 0 : _b.initValue) || "", props);
564
589
  setDynamicValidation(((_c = props === null || props === void 0 ? void 0 : props.demoData) === null || _c === void 0 ? void 0 : _c.initValue) === "" ? "" : validation);
565
590
  setLastValidated((_d = props === null || props === void 0 ? void 0 : props.demoData) === null || _d === void 0 ? void 0 : _d.initValue);
566
591
  }
567
592
  function onInput(input) {
568
- const validation = validateNewPassword(input.target.value);
593
+ const validation = validateNewPassword(input.target.value, props);
569
594
  setDynamicValidation(validation);
570
595
  }
571
596
  return cjs.cjs({
@@ -1,7 +1,7 @@
1
1
  'use strict';
2
2
 
3
3
  const index = require('./index-b0129cd6.js');
4
- const global = require('./global-a1394707.js');
4
+ const global = require('./global-6785de71.js');
5
5
  const mixins = require('./mixins-fe9d4112.js');
6
6
  const JSS = require('./JSS-8503a151.js');
7
7
  const sqmTextSpanView = require('./sqm-text-span-view-e1cd9bd3.js');
@@ -40,7 +40,7 @@ const vanillaStyle = `
40
40
  const sheet = JSS.createStyleSheet(style);
41
41
  const styleString = sheet.toString();
42
42
  function PortalEmailVerificationView(props) {
43
- const { states, callbacks, content: { email, verifyMessage, emailVerificationHeader, resendEmailButtonText, verificationStatusMessage, verificationLoadingMessage, }, } = props;
43
+ const { states, callbacks, content: { email, verifyMessage, emailVerificationHeader, resendEmailButtonText, verificationStatusMessage, verificationLoadingMessage, verificationResentMessage, }, } = props;
44
44
  return (index.h("div", { class: sheet.classes.Wrapper },
45
45
  index.h("style", { type: "text/css" },
46
46
  vanillaStyle,
@@ -50,7 +50,7 @@ function PortalEmailVerificationView(props) {
50
50
  props.states.error && (index.h("sqm-form-message", { type: "error", exportparts: "erroralert-icon" },
51
51
  index.h("div", { part: "erroralert-text" }, props.states.error))),
52
52
  props.states.success && (index.h("sqm-form-message", { type: "success", exportparts: "successalert-icon" },
53
- index.h("div", { part: "successalert-text" }, "Your verification email has been resent successfully"))),
53
+ index.h("div", { part: "successalert-text" }, verificationResentMessage))),
54
54
  index.h(sqmTextSpanView.TextSpanView, { type: "p" }, global.intl.formatMessage({
55
55
  id: "verifyMessage",
56
56
  defaultMessage: verifyMessage,
@@ -4,13 +4,13 @@ Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  const index = require('./index-b0129cd6.js');
6
6
  const stencilHooks_module = require('./stencil-hooks.module-e4bf7f2d.js');
7
- require('./global-a1394707.js');
7
+ require('./global-6785de71.js');
8
8
  const index_module = require('./index.module-02576958.js');
9
9
  const cjs = require('./cjs-1066ec21.js');
10
10
  require('./mixins-fe9d4112.js');
11
11
  require('./JSS-8503a151.js');
12
12
  require('./sqm-text-span-view-e1cd9bd3.js');
13
- const sqmPortalEmailVerificationView = require('./sqm-portal-email-verification-view-f76bcd38.js');
13
+ const sqmPortalEmailVerificationView = require('./sqm-portal-email-verification-view-0bd4a2c2.js');
14
14
 
15
15
  function usePortalEmailVerification(props) {
16
16
  var _a, _b, _c, _d, _e, _f, _g, _h, _j;
@@ -155,6 +155,11 @@ const PortalEmailVerification = class {
155
155
  * @uiWidget textArea
156
156
  */
157
157
  this.verificationLoadingMessage = "Checking verification status";
158
+ /**
159
+ * @uiName Email verification resent text
160
+ * @uiWidget textArea
161
+ */
162
+ this.verificationResentMessage = "Your verification email has been resent successfully";
158
163
  stencilHooks_module.h$1(this);
159
164
  }
160
165
  disconnectedCallback() { }
@@ -178,6 +183,7 @@ function usePortalEmailVerificationDemo(props) {
178
183
  resendEmailButtonText: props.resendEmailButtonText,
179
184
  verificationLoadingMessage: props.verificationLoadingMessage,
180
185
  verificationStatusMessage: props.verificationStatusMessage,
186
+ verificationResentMessage: props.verificationResentMessage,
181
187
  },
182
188
  }, props.demoData || {}, { arrayMerge: (_, a) => a });
183
189
  }
@@ -1,7 +1,7 @@
1
1
  'use strict';
2
2
 
3
3
  const index = require('./index-b0129cd6.js');
4
- const global = require('./global-a1394707.js');
4
+ const global = require('./global-6785de71.js');
5
5
  const JSS = require('./JSS-8503a151.js');
6
6
  const sqmTextSpanView = require('./sqm-text-span-view-e1cd9bd3.js');
7
7
 
@@ -4,13 +4,13 @@ Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  const index = require('./index-b0129cd6.js');
6
6
  const stencilHooks_module = require('./stencil-hooks.module-e4bf7f2d.js');
7
- require('./global-a1394707.js');
7
+ require('./global-6785de71.js');
8
8
  const index_module = require('./index.module-02576958.js');
9
9
  const cjs = require('./cjs-1066ec21.js');
10
10
  require('./JSS-8503a151.js');
11
11
  const utils = require('./utils-6847bc06.js');
12
12
  require('./sqm-text-span-view-e1cd9bd3.js');
13
- const sqmPortalProfileView = require('./sqm-portal-profile-view-f9daa7c4.js');
13
+ const sqmPortalProfileView = require('./sqm-portal-profile-view-13a1229f.js');
14
14
 
15
15
  const GET_USER = index_module.dist.gql `
16
16
  query {
@@ -74,7 +74,7 @@ function PortalRegistrationFormView(props) {
74
74
  content.requiredFieldErrorMessage,
75
75
  }
76
76
  : [])))),
77
- !states.hideInputs && (index.h("sqm-password-field", { fieldLabel: content.passwordLabel, "disable-validation": !states.enablePasswordValidation })),
77
+ !states.hideInputs && (index.h("sqm-password-field", { fieldLabel: content.passwordLabel, "disable-validation": !states.enablePasswordValidation, meetsRequirementsText: content.meetsRequirementsText, doesNotMeetRequirementsText: content.doesNotMeetRequirementsText, minErrorText: content.minErrorText, uppercaseErrorText: content.uppercaseErrorText, lowercaseErrorText: content.lowercaseErrorText, hasErrorText: content.hasErrorText })),
78
78
  content.passwordField,
79
79
  !states.hideInputs && states.confirmPassword && (index.h("sl-input", Object.assign({ exportparts: "label: input-label", type: "password", name: "/confirmPassword", label: content.confirmPasswordLabel, disabled: states.loading || ((_l = states.registrationFormState) === null || _l === void 0 ? void 0 : _l.disabled), required: true }, (((_o = (_m = states.registrationFormState) === null || _m === void 0 ? void 0 : _m.initialData) === null || _o === void 0 ? void 0 : _o.confirmPassword) ? {
80
80
  value: (_q = (_p = states.registrationFormState) === null || _p === void 0 ? void 0 : _p.initialData) === null || _q === void 0 ? void 0 : _q.confirmPassword,
@@ -106,6 +106,7 @@ const RegistrationFormQuery = index_module.dist.gql `
106
106
  function usePortalRegistrationForm(props) {
107
107
  var _a, _b, _c, _d, _e, _f, _g, _h, _j;
108
108
  const formRef = stencilHooks_module.useRef(null);
109
+ const locale = index_module.O();
109
110
  const { registrationFormState, setRegistrationFormState } = useRegistrationFormState.useRegistrationFormState({});
110
111
  const [request, { loading, errors, data, formError }] = index_module.qe();
111
112
  const queryResponse = index_module.mn(RegistrationFormQuery, { key: props.formKey });
@@ -188,6 +189,7 @@ function usePortalRegistrationForm(props) {
188
189
  const variables = {
189
190
  key: props.formKey,
190
191
  formData: {
192
+ ...(props.useBrowserLocale ? { locale } : {}),
191
193
  email,
192
194
  password,
193
195
  redirectPath,
@@ -310,6 +312,12 @@ const PortalRegistrationForm = class {
310
312
  * @uiWidget pageSelect
311
313
  */
312
314
  this.redirectPath = "/verifyEmail";
315
+ /**
316
+ * Saves the browser locale on the new user
317
+ *
318
+ * @uiName Use browser locale
319
+ */
320
+ this.useBrowserLocale = false;
313
321
  /**
314
322
  * @uiName Email field label
315
323
  */
@@ -390,6 +398,30 @@ const PortalRegistrationForm = class {
390
398
  * @uiWidget textArea
391
399
  */
392
400
  this.formDisabledErrorMessage = "The registration form is currently disabled.";
401
+ /**
402
+ * @uiName Meets requirements text
403
+ */
404
+ this.meetsRequirementsText = "Password has met all requirements";
405
+ /**
406
+ * @uiName Fails requirements text
407
+ */
408
+ this.doesNotMeetRequirementsText = "Password must meet the following requirements:";
409
+ /**
410
+ * @uiName Minimum length text
411
+ */
412
+ this.minErrorText = "be a minimum of 8 characters";
413
+ /**
414
+ * @uiName Missing uppercase text
415
+ */
416
+ this.uppercaseErrorText = "contain at least 1 uppercase character";
417
+ /**
418
+ * @uiName Missing lowercase text
419
+ */
420
+ this.lowercaseErrorText = "contain at least 1 lowercase character";
421
+ /**
422
+ * @uiName Missing number or symbol error text
423
+ */
424
+ this.hasErrorText = "contain at least 1 number or symbol";
393
425
  stencilHooks_module.h$1(this);
394
426
  }
395
427
  disconnectedCallback() { }
@@ -411,6 +443,12 @@ const PortalRegistrationForm = class {
411
443
  invalidEmailErrorMessage: this.invalidEmailErrorMessage,
412
444
  formDisabledErrorMessage: this.formDisabledErrorMessage,
413
445
  requiredFieldErrorMessage: this.requiredFieldErrorMessage,
446
+ meetsRequirementsText: this.meetsRequirementsText,
447
+ doesNotMeetRequirementsText: this.doesNotMeetRequirementsText,
448
+ minErrorText: this.minErrorText,
449
+ uppercaseErrorText: this.uppercaseErrorText,
450
+ lowercaseErrorText: this.lowercaseErrorText,
451
+ hasErrorText: this.hasErrorText,
414
452
  };
415
453
  return (index.h(PortalRegistrationFormView, { states: states, callbacks: callbacks, content: content, refs: refs }));
416
454
  }
@@ -70,7 +70,7 @@ function PortalResetPasswordView(props) {
70
70
  index.h("sl-form", { class: sheet.classes.Column, "onSl-submit": callbacks.submit },
71
71
  props.states.error && (index.h("sqm-form-message", { type: "error", class: sheet.classes.Banner, exportparts: "erroralert-icon" },
72
72
  index.h("div", { part: "erroralert-text" }, props.states.error))),
73
- !states.reset && (index.h("sqm-password-field", { fieldLabel: states.content.passwordFieldLabel, demoData: states.passwordDemoData })),
73
+ !states.reset && (index.h("sqm-password-field", { fieldLabel: states.content.passwordFieldLabel, demoData: states.passwordDemoData, meetsRequirementsText: states.content.meetsRequirementsText, doesNotMeetRequirementsText: states.content.doesNotMeetRequirementsText, minErrorText: states.content.minErrorText, uppercaseErrorText: states.content.uppercaseErrorText, lowercaseErrorText: states.content.lowercaseErrorText, hasErrorText: states.content.hasErrorText })),
74
74
  !states.reset && states.confirmPassword && (index.h("sl-input", { exportparts: "label: input-label", type: "password", name: "/confirmPassword", label: states.content.confirmPasswordFieldLabel, disabled: states.loading, required: true })),
75
75
  index.h("div", { class: sheet.classes.ButtonsContainer },
76
76
  index.h("sl-button", { class: sheet.classes.ContinueButton, submit: true, loading: states.loading, exportparts: "base: primarybutton-base", type: "primary" }, states.reset
@@ -11,7 +11,7 @@ require('./mixins-fe9d4112.js');
11
11
  require('./JSS-8503a151.js');
12
12
  const utils = require('./utils-6847bc06.js');
13
13
  require('./sqm-text-span-view-e1cd9bd3.js');
14
- const sqmPortalResetPasswordView = require('./sqm-portal-reset-password-view-d5bc7afc.js');
14
+ const sqmPortalResetPasswordView = require('./sqm-portal-reset-password-view-7680fc87.js');
15
15
 
16
16
  function usePortalResetPassword(props) {
17
17
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
@@ -81,6 +81,12 @@ function usePortalResetPassword(props) {
81
81
  resetPasswordButtonText: props.resetPasswordButtonText,
82
82
  confirmPasswordFieldLabel: props.confirmPasswordFieldLabel,
83
83
  passwordFieldLabel: props.passwordFieldLabel,
84
+ meetsRequirementsText: props.meetsRequirementsText,
85
+ doesNotMeetRequirementsText: props.doesNotMeetRequirementsText,
86
+ minErrorText: props.minErrorText,
87
+ uppercaseErrorText: props.uppercaseErrorText,
88
+ lowercaseErrorText: props.lowercaseErrorText,
89
+ hasErrorText: props.hasErrorText,
84
90
  },
85
91
  },
86
92
  callbacks: { submit, failed, gotoNextPage },
@@ -138,6 +144,30 @@ const PortalResetPassword = class {
138
144
  * @uiName Password field label
139
145
  */
140
146
  this.passwordFieldLabel = "New Password";
147
+ /**
148
+ * @uiName Meets requirements text
149
+ */
150
+ this.meetsRequirementsText = "Password has met all requirements";
151
+ /**
152
+ * @uiName Fails requirements text
153
+ */
154
+ this.doesNotMeetRequirementsText = "Password must meet the following requirements:";
155
+ /**
156
+ * @uiName Minimum length text
157
+ */
158
+ this.minErrorText = "be a minimum of 8 characters";
159
+ /**
160
+ * @uiName Missing uppercase text
161
+ */
162
+ this.uppercaseErrorText = "contain at least 1 uppercase character";
163
+ /**
164
+ * @uiName Missing lowercase text
165
+ */
166
+ this.lowercaseErrorText = "contain at least 1 lowercase character";
167
+ /**
168
+ * @uiName Missing number or symbol error text
169
+ */
170
+ this.hasErrorText = "contain at least 1 number or symbol";
141
171
  stencilHooks_module.h$1(this);
142
172
  }
143
173
  disconnectedCallback() { }
@@ -164,6 +194,12 @@ function usePortalResetPasswordDemo(props) {
164
194
  resetPasswordButtonText: props.resetPasswordButtonText,
165
195
  confirmPasswordFieldLabel: props.confirmPasswordFieldLabel,
166
196
  passwordFieldLabel: props.passwordFieldLabel,
197
+ meetsRequirementsText: props.meetsRequirementsText,
198
+ doesNotMeetRequirementsText: props.doesNotMeetRequirementsText,
199
+ minErrorText: props.minErrorText,
200
+ uppercaseErrorText: props.uppercaseErrorText,
201
+ lowercaseErrorText: props.lowercaseErrorText,
202
+ hasErrorText: props.hasErrorText,
167
203
  },
168
204
  },
169
205
  callbacks: {
@@ -23,15 +23,15 @@ const vanillaStyle = `
23
23
  const sheet = JSS.createStyleSheet(style);
24
24
  const styleString = sheet.toString();
25
25
  function PortalVerifyEmailView(props) {
26
- const { states, data, callbacks } = props;
26
+ const { states, data, callbacks, content } = props;
27
27
  if (states.verified) {
28
28
  return (index.h("div", { class: sheet.classes.Wrapper, part: "sqm-base" },
29
29
  index.h("style", { type: "text/css" },
30
30
  vanillaStyle,
31
31
  styleString),
32
- index.h(sqmTextSpanView.TextSpanView, { type: "h3" }, "Verify your email"),
32
+ index.h(sqmTextSpanView.TextSpanView, { type: "h3" }, content.verifyEmailText),
33
33
  index.h("sqm-form-message", { exportparts: "success-icon" },
34
- index.h("div", { part: "successalert-text" }, "Your email has been verified and you are being redirected. If you are not redirected, please click Continue.")),
34
+ index.h("div", { part: "successalert-text" }, content.verifySuccessText)),
35
35
  index.h("sl-button", { class: sheet.classes.ContinueButton, onClick: callbacks.gotoNextPage, loading: states.loading, exportparts: "base: primarybutton-base", type: "primary" }, "Continue")));
36
36
  }
37
37
  if (states.error || !data.oobCode) {
@@ -39,7 +39,7 @@ function PortalVerifyEmailView(props) {
39
39
  index.h("style", { type: "text/css" }, styleString),
40
40
  index.h(sqmTextSpanView.TextSpanView, { type: "h3" }, "Verify your email"),
41
41
  index.h("sqm-form-message", { type: "error", exportparts: "erroralert-icon" },
42
- index.h("div", { part: "erroralert-text" }, "The email verification code is invalid or has expired, please try again.")),
42
+ index.h("div", { part: "erroralert-text" }, content.verifyInvalidText)),
43
43
  index.h("sl-button", { class: sheet.classes.ContinueButton, onClick: callbacks.failed, loading: states.loading, exportparts: "base: primarybutton-base", type: "primary" }, "Continue")));
44
44
  }
45
45
  }
@@ -10,9 +10,9 @@ require('./mixins-fe9d4112.js');
10
10
  require('./JSS-8503a151.js');
11
11
  const utils = require('./utils-6847bc06.js');
12
12
  require('./sqm-text-span-view-e1cd9bd3.js');
13
- const sqmPortalVerifyEmailView = require('./sqm-portal-verify-email-view-f6c7287e.js');
13
+ const sqmPortalVerifyEmailView = require('./sqm-portal-verify-email-view-200752cb.js');
14
14
 
15
- function usePortalVerifyEmail({ nextPage, failedPage }) {
15
+ function usePortalVerifyEmail({ nextPage, failedPage, verifySuccessText, verifyEmailText, verifyInvalidText, }) {
16
16
  var _a, _b, _c, _d, _e, _f, _g, _h;
17
17
  const userIdent = index_module.H();
18
18
  const [request, { loading, data, errors }] = index_module.Ye();
@@ -72,6 +72,11 @@ function usePortalVerifyEmail({ nextPage, failedPage }) {
72
72
  failed,
73
73
  gotoNextPage,
74
74
  },
75
+ content: {
76
+ verifySuccessText,
77
+ verifyEmailText,
78
+ verifyInvalidText,
79
+ },
75
80
  };
76
81
  }
77
82
 
@@ -93,14 +98,29 @@ const PortalVerifyEmail = class {
93
98
  * @uiWidget pageSelect
94
99
  */
95
100
  this.failedPage = "/";
101
+ /**
102
+ * @uiName Verify email text
103
+ * @uiWidget textArea
104
+ */
105
+ this.verifyEmailText = "Verify your email";
106
+ /**
107
+ * @uiName Email verification success text
108
+ * @uiWidget textArea
109
+ */
110
+ this.verifySuccessText = "Your email has been verified and you are being redirected. If you are not redirected, please click Continue.";
111
+ /**
112
+ * @uiName Email verification invalid text
113
+ * @uiWidget textArea
114
+ */
115
+ this.verifyInvalidText = "The email verification code is invalid or has expired, please try again.";
96
116
  stencilHooks_module.h$1(this);
97
117
  }
98
118
  disconnectedCallback() { }
99
119
  render() {
100
- const { states, data, callbacks } = index_module.isDemo()
101
- ? usePortalVerifyEmailDemo(this)
102
- : usePortalVerifyEmail(this);
103
- return (index.h(sqmPortalVerifyEmailView.PortalVerifyEmailView, { states: states, data: data, callbacks: callbacks }));
120
+ const { states, data, callbacks, content } = index_module.isDemo()
121
+ ? usePortalVerifyEmailDemo(utils.getProps(this))
122
+ : usePortalVerifyEmail(utils.getProps(this));
123
+ return (index.h(sqmPortalVerifyEmailView.PortalVerifyEmailView, { states: states, data: data, callbacks: callbacks, content: content }));
104
124
  }
105
125
  };
106
126
  function usePortalVerifyEmailDemo(props) {
@@ -115,6 +135,11 @@ function usePortalVerifyEmailDemo(props) {
115
135
  },
116
136
  gotoNextPage: () => { },
117
137
  },
138
+ content: {
139
+ verifySuccessText: props.verifySuccessText,
140
+ verifyEmailText: props.verifyEmailText,
141
+ verifyInvalidText: props.verifyInvalidText,
142
+ },
118
143
  }, props.demoData || {}, { arrayMerge: (_, a) => a });
119
144
  }
120
145
 
@@ -4,7 +4,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  const index = require('./index-b0129cd6.js');
6
6
  const stencilHooks_module = require('./stencil-hooks.module-e4bf7f2d.js');
7
- const global = require('./global-a1394707.js');
7
+ const global = require('./global-6785de71.js');
8
8
  const index_module = require('./index.module-02576958.js');
9
9
  const cjs = require('./cjs-1066ec21.js');
10
10
  require('./mixins-fe9d4112.js');
@@ -4,7 +4,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  const index = require('./index-b0129cd6.js');
6
6
  const stencilHooks_module = require('./stencil-hooks.module-e4bf7f2d.js');
7
- const global = require('./global-a1394707.js');
7
+ const global = require('./global-6785de71.js');
8
8
  const index_module = require('./index.module-02576958.js');
9
9
  const cjs = require('./cjs-1066ec21.js');
10
10
  require('./mixins-fe9d4112.js');