@saasquatch/mint-components 1.8.5-8 → 1.9.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.
Files changed (135) hide show
  1. package/dist/cjs/{ShadowViewAddon-89ba2ab0.js → ShadowViewAddon-1e2f6f9b.js} +17 -17
  2. package/dist/cjs/{email-registration-view-a6b6430e.js → email-registration-view-5170d9f1.js} +3 -3
  3. package/dist/cjs/sqm-banking-info-form_16.cjs.entry.js +17 -17
  4. package/dist/cjs/sqm-big-stat_38.cjs.entry.js +1 -1
  5. package/dist/cjs/sqm-empty_4.cjs.entry.js +2 -2
  6. package/dist/cjs/sqm-instant-access-registration.cjs.entry.js +1 -1
  7. package/dist/cjs/{sqm-invoice-table-view-501f8985.js → sqm-invoice-table-view-cae2a67d.js} +8 -8
  8. package/dist/cjs/sqm-password-field.cjs.entry.js +1 -1
  9. package/dist/cjs/{sqm-portal-forgot-password-view-ca5f6db9.js → sqm-portal-forgot-password-view-969c49ed.js} +1 -1
  10. package/dist/cjs/sqm-portal-forgot-password.cjs.entry.js +1 -1
  11. package/dist/cjs/{sqm-portal-profile-view-d8697f23.js → sqm-portal-profile-view-851a020f.js} +4 -4
  12. package/dist/cjs/sqm-portal-profile.cjs.entry.js +1 -1
  13. package/dist/cjs/sqm-portal-registration-form.cjs.entry.js +2 -2
  14. package/dist/cjs/{sqm-portal-reset-password-view-07a13210.js → sqm-portal-reset-password-view-96f329ed.js} +1 -1
  15. package/dist/cjs/sqm-portal-reset-password.cjs.entry.js +1 -1
  16. package/dist/cjs/sqm-portal-verify-email.cjs.entry.js +19 -24
  17. package/dist/cjs/sqm-referred-registration.cjs.entry.js +1 -1
  18. package/dist/cjs/sqm-stencilbook.cjs.entry.js +8 -8
  19. package/dist/collection/components/sqm-checkbox-field/sqm-checkbox-field-view.js +1 -1
  20. package/dist/collection/components/sqm-dropdown-field/sqm-dropdown-field-view.js +1 -1
  21. package/dist/collection/components/sqm-edit-profile/sqm-edit-profile-view.js +3 -3
  22. package/dist/collection/components/sqm-empty/sqm-empty-view.js +2 -2
  23. package/dist/collection/components/sqm-input-field/sqm-input-field-view.js +1 -1
  24. package/dist/collection/components/sqm-name-fields/sqm-name-fields-view.js +2 -2
  25. package/dist/collection/components/sqm-password-field/sqm-password-field-view.js +1 -1
  26. package/dist/collection/components/sqm-portal-change-password/sqm-portal-change-password-view.js +1 -1
  27. package/dist/collection/components/sqm-portal-forgot-password/sqm-portal-forgot-password-view.js +1 -1
  28. package/dist/collection/components/sqm-portal-login/sqm-portal-login-view.js +2 -2
  29. package/dist/collection/components/sqm-portal-profile/sqm-portal-profile-view.js +4 -4
  30. package/dist/collection/components/sqm-portal-register/PortalRegister.stories.js +2 -2
  31. package/dist/collection/components/sqm-portal-register/sqm-portal-register-view.js +2 -2
  32. package/dist/collection/components/sqm-portal-registration-form/PortalRegistrationForm.stories.js +2 -2
  33. package/dist/collection/components/sqm-portal-registration-form/sqm-portal-registration-form-view.js +2 -2
  34. package/dist/collection/components/sqm-portal-reset-password/sqm-portal-reset-password-view.js +1 -1
  35. package/dist/collection/components/sqm-portal-verify-email/usePortalVerifyEmail.js +20 -25
  36. package/dist/collection/components/sqm-reward-exchange-list/sqm-reward-exchange-list-view.js +4 -4
  37. package/dist/collection/components/tax-and-cash/sqm-banking-info-form/sqm-banking-info-form-view.js +4 -4
  38. package/dist/collection/components/tax-and-cash/sqm-user-info-form/small-views/IndirectTaxDetailsView.js +8 -8
  39. package/dist/collection/components/tax-and-cash/sqm-user-info-form/sqm-user-info-form-view.js +12 -12
  40. package/dist/collection/components/views/email-registration-view.js +3 -3
  41. package/dist/esm/{ShadowViewAddon-c22043d9.js → ShadowViewAddon-8fd4f148.js} +17 -17
  42. package/dist/esm/{email-registration-view-4a4202e7.js → email-registration-view-07d80492.js} +3 -3
  43. package/dist/esm/sqm-banking-info-form_16.entry.js +17 -17
  44. package/dist/esm/sqm-big-stat_38.entry.js +1 -1
  45. package/dist/esm/sqm-empty_4.entry.js +2 -2
  46. package/dist/esm/sqm-instant-access-registration.entry.js +1 -1
  47. package/dist/esm/{sqm-invoice-table-view-d00894ce.js → sqm-invoice-table-view-c905071b.js} +8 -8
  48. package/dist/esm/sqm-password-field.entry.js +1 -1
  49. package/dist/esm/{sqm-portal-forgot-password-view-a764ad67.js → sqm-portal-forgot-password-view-c2ed8fed.js} +1 -1
  50. package/dist/esm/sqm-portal-forgot-password.entry.js +1 -1
  51. package/dist/esm/{sqm-portal-profile-view-13f0ef79.js → sqm-portal-profile-view-eeff5fa0.js} +4 -4
  52. package/dist/esm/sqm-portal-profile.entry.js +1 -1
  53. package/dist/esm/sqm-portal-registration-form.entry.js +2 -2
  54. package/dist/esm/{sqm-portal-reset-password-view-d3e726a9.js → sqm-portal-reset-password-view-79a85e02.js} +1 -1
  55. package/dist/esm/sqm-portal-reset-password.entry.js +1 -1
  56. package/dist/esm/sqm-portal-verify-email.entry.js +20 -25
  57. package/dist/esm/sqm-referred-registration.entry.js +1 -1
  58. package/dist/esm/sqm-stencilbook.entry.js +8 -8
  59. package/dist/esm-es5/ShadowViewAddon-8fd4f148.js +1 -0
  60. package/dist/esm-es5/{email-registration-view-4a4202e7.js → email-registration-view-07d80492.js} +1 -1
  61. package/dist/esm-es5/sqm-banking-info-form_16.entry.js +1 -1
  62. package/dist/esm-es5/sqm-big-stat_38.entry.js +1 -1
  63. package/dist/esm-es5/sqm-empty_4.entry.js +1 -1
  64. package/dist/esm-es5/sqm-instant-access-registration.entry.js +1 -1
  65. package/dist/esm-es5/{sqm-invoice-table-view-d00894ce.js → sqm-invoice-table-view-c905071b.js} +1 -1
  66. package/dist/esm-es5/sqm-password-field.entry.js +1 -1
  67. package/dist/esm-es5/{sqm-portal-forgot-password-view-a764ad67.js → sqm-portal-forgot-password-view-c2ed8fed.js} +1 -1
  68. package/dist/esm-es5/sqm-portal-forgot-password.entry.js +1 -1
  69. package/dist/esm-es5/sqm-portal-profile-view-eeff5fa0.js +1 -0
  70. package/dist/esm-es5/sqm-portal-profile.entry.js +1 -1
  71. package/dist/esm-es5/sqm-portal-registration-form.entry.js +1 -1
  72. package/dist/esm-es5/{sqm-portal-reset-password-view-d3e726a9.js → sqm-portal-reset-password-view-79a85e02.js} +1 -1
  73. package/dist/esm-es5/sqm-portal-reset-password.entry.js +1 -1
  74. package/dist/esm-es5/sqm-portal-verify-email.entry.js +1 -1
  75. package/dist/esm-es5/sqm-referred-registration.entry.js +1 -1
  76. package/dist/esm-es5/sqm-stencilbook.entry.js +1 -1
  77. package/dist/mint-components/mint-components.esm.js +1 -1
  78. package/dist/mint-components/p-0382167f.entry.js +1 -0
  79. package/dist/mint-components/{p-3539d14d.js → p-03cfceb5.js} +1 -1
  80. package/dist/mint-components/p-10036f16.js +1 -0
  81. package/dist/mint-components/{p-18ccb4ad.system.entry.js → p-11858d60.system.entry.js} +1 -1
  82. package/dist/mint-components/{p-da99e3c7.system.entry.js → p-1403b1f1.system.entry.js} +1 -1
  83. package/dist/mint-components/{p-ea6a7135.js → p-1b9e6fc6.js} +1 -1
  84. package/dist/mint-components/{p-cd45b39f.system.js → p-2020caa1.system.js} +1 -1
  85. package/dist/mint-components/p-3652236f.system.entry.js +1 -0
  86. package/dist/mint-components/p-3e096e73.entry.js +1 -0
  87. package/dist/mint-components/{p-d3cd5ec5.entry.js → p-41e2a408.entry.js} +1 -1
  88. package/dist/mint-components/p-44b12b2e.system.js +1 -1
  89. package/dist/mint-components/p-4a3a0014.entry.js +9 -0
  90. package/dist/mint-components/{p-561262cd.entry.js → p-4b3fff57.entry.js} +1 -1
  91. package/dist/mint-components/{p-f710f9d7.entry.js → p-4d964945.entry.js} +3 -3
  92. package/dist/mint-components/{p-fca0dc98.system.js → p-4e48267b.system.js} +1 -1
  93. package/dist/mint-components/{p-1a8a8795.entry.js → p-5c750437.entry.js} +1 -1
  94. package/dist/mint-components/p-5e1366ac.system.js +1 -0
  95. package/dist/mint-components/{p-4e513c81.entry.js → p-6868667d.entry.js} +1 -1
  96. package/dist/mint-components/{p-907c3344.system.entry.js → p-6a6b1966.system.entry.js} +1 -1
  97. package/dist/mint-components/p-6bf41e0d.system.js +1 -0
  98. package/dist/mint-components/{p-be96cc00.system.entry.js → p-6d95589e.system.entry.js} +1 -1
  99. package/dist/mint-components/{p-7487f23c.system.js → p-7d5e0645.system.js} +1 -1
  100. package/dist/mint-components/p-8c5a6603.js +1 -0
  101. package/dist/mint-components/{p-dd5ca1b2.entry.js → p-9891a965.entry.js} +2 -2
  102. package/dist/mint-components/p-9bdccddd.system.entry.js +1 -0
  103. package/dist/mint-components/{p-20e2037d.system.entry.js → p-a61430ad.system.entry.js} +1 -1
  104. package/dist/mint-components/p-ab174fe6.system.entry.js +1 -0
  105. package/dist/mint-components/p-abc6cb26.system.js +1 -0
  106. package/dist/mint-components/{p-fd3dacb9.system.entry.js → p-b2e34063.system.entry.js} +1 -1
  107. package/dist/mint-components/p-ccb7d32e.system.entry.js +1 -0
  108. package/dist/mint-components/{p-46ef82ed.js → p-d49e2f7a.js} +1 -1
  109. package/dist/mint-components/p-d60b15e7.js +391 -0
  110. package/dist/mint-components/p-da718618.system.entry.js +1 -0
  111. package/dist/mint-components/{p-2f2b220a.entry.js → p-e0f374e2.entry.js} +1 -1
  112. package/dist/mint-components/p-e1253472.system.entry.js +1 -0
  113. package/dist/mint-components/{p-11be93f5.entry.js → p-ebbcc7c5.entry.js} +1 -1
  114. package/dist/mint-components/{p-2a6133dc.entry.js → p-f3be6d20.entry.js} +1 -1
  115. package/docs/docs.docx +0 -0
  116. package/docs/picklesdoc--2024-01-15--11-20-00.xlsx +0 -0
  117. package/docs/picklesdoc--2024-01-15--11-24-04.xlsx +0 -0
  118. package/package.json +3 -1
  119. package/dist/esm-es5/ShadowViewAddon-c22043d9.js +0 -1
  120. package/dist/esm-es5/sqm-portal-profile-view-13f0ef79.js +0 -1
  121. package/dist/mint-components/p-05bfb3bf.js +0 -391
  122. package/dist/mint-components/p-0c04454c.system.entry.js +0 -1
  123. package/dist/mint-components/p-3a5d82b7.system.entry.js +0 -1
  124. package/dist/mint-components/p-5cd6d4ed.system.entry.js +0 -1
  125. package/dist/mint-components/p-7f6a6657.system.js +0 -1
  126. package/dist/mint-components/p-9b400b7e.system.entry.js +0 -1
  127. package/dist/mint-components/p-b153fc0c.system.js +0 -1
  128. package/dist/mint-components/p-b2b22a2a.entry.js +0 -9
  129. package/dist/mint-components/p-b5ee2781.js +0 -1
  130. package/dist/mint-components/p-b67f5743.system.js +0 -1
  131. package/dist/mint-components/p-be584089.system.entry.js +0 -1
  132. package/dist/mint-components/p-c74a8f95.entry.js +0 -1
  133. package/dist/mint-components/p-cef64e28.system.entry.js +0 -1
  134. package/dist/mint-components/p-e55a10f3.entry.js +0 -1
  135. package/dist/mint-components/p-f5f25aba.js +0 -1
@@ -18,19 +18,17 @@ function setSubmitted(submitted) {
18
18
  window[SUBMITTED_CONTEXT] = submitted;
19
19
  }
20
20
  function usePortalVerifyEmail({ nextPage, failedPage, verifySuccessText, verifyEmailText, verifyInvalidText, networkErrorMessage, continueText, }) {
21
- var _a, _b, _c, _d, _e, _f, _g, _h, _j;
21
+ var _a, _b, _c, _d, _e, _f, _g, _h;
22
22
  const submitted = window[SUBMITTED_CONTEXT];
23
23
  const userIdent = index_module.Q();
24
- const email = (_a = userIdent === null || userIdent === void 0 ? void 0 : userIdent.managedIdentity) === null || _a === void 0 ? void 0 : _a.email;
25
24
  const [request, { loading, data, errors }] = index_module.an();
26
25
  const urlParams = new URLSearchParams(index_module.$n.location.search);
27
26
  const oobCode = urlParams.get("oobCode");
28
- const oobEmail = urlParams.get("email");
29
27
  const nextPageOverride = urlParams.get("nextPage");
30
28
  // derived from useMutation in component boilerplate initialState
31
29
  const disableContinue = data === undefined && errors === undefined && !!oobCode;
32
30
  // if logged out, userIdent?.managedIdentity?.emailVerified will be falsey, even if verification was successful
33
- const verified = !!(((_b = userIdent === null || userIdent === void 0 ? void 0 : userIdent.managedIdentity) === null || _b === void 0 ? void 0 : _b.emailVerified) || (data === null || data === void 0 ? void 0 : data.verifyManagedIdentityEmail.success));
31
+ const verified = !!(((_a = userIdent === null || userIdent === void 0 ? void 0 : userIdent.managedIdentity) === null || _a === void 0 ? void 0 : _a.emailVerified) || (data === null || data === void 0 ? void 0 : data.verifyManagedIdentityEmail.success));
34
32
  const failed = () => {
35
33
  return index_module.$n.push({
36
34
  pathname: failedPage,
@@ -42,42 +40,39 @@ function usePortalVerifyEmail({ nextPage, failedPage, verifySuccessText, verifyE
42
40
  const url = utils.sanitizeUrlPath(nextPageOverride || nextPage);
43
41
  index_module.$n.push(url.href);
44
42
  };
45
- const submit = () => {
46
- console.debug("Submit called");
47
- setSubmitted(true);
48
- request({ oobCode });
49
- };
50
- console.log({ email, oobEmail, data, userIdent });
51
- stencilHooks_module.useEffect(() => {
43
+ const submit = async () => {
52
44
  var _a;
53
- // verification successful but user in context is not verified
54
- // or mismatch between logged in user and user associated with oobCode
55
- if ((data === null || data === void 0 ? void 0 : data.verifyManagedIdentityEmail.success) &&
56
- (!((_a = userIdent === null || userIdent === void 0 ? void 0 : userIdent.managedIdentity) === null || _a === void 0 ? void 0 : _a.emailVerified) || email !== oobEmail)) {
57
- console.debug("MISMATCH");
45
+ setSubmitted(true);
46
+ if (oobCode) {
47
+ const result = await request({ oobCode });
48
+ if ((result instanceof Error ||
49
+ !result.verifyManagedIdentityEmail.success) &&
50
+ !((_a = userIdent === null || userIdent === void 0 ? void 0 : userIdent.managedIdentity) === null || _a === void 0 ? void 0 : _a.emailVerified)) {
51
+ // pause on error if logged out/unverified
52
+ return;
53
+ }
58
54
  setTimeout(() => {
59
55
  gotoNextPage();
60
- index_module.setUserIdentity(undefined);
61
56
  setSubmitted(false);
62
57
  }, 3000);
63
- return;
64
- // Already verified, begin redirect
65
58
  }
66
- else if (verified) {
67
- console.debug("VERIFIED");
59
+ };
60
+ stencilHooks_module.useEffect(() => {
61
+ // Already verified, begin redirect
62
+ if (verified) {
68
63
  setTimeout(() => {
69
64
  gotoNextPage();
70
65
  setSubmitted(false);
71
66
  }, 3000);
72
67
  return;
73
68
  }
74
- if (userIdent && !data && !submitted && oobCode)
69
+ if (userIdent && !data && !submitted)
75
70
  submit();
76
- }, [verified, submitted, data, userIdent]);
71
+ }, [verified, submitted, data, userIdent, submitted]);
77
72
  return {
78
73
  states: {
79
74
  loading: loading || disableContinue,
80
- error: ((_f = (_e = (_d = (_c = errors === null || errors === void 0 ? void 0 : errors.response) === null || _c === void 0 ? void 0 : _c.errors) === null || _d === void 0 ? void 0 : _d[0]) === null || _e === void 0 ? void 0 : _e.extensions) === null || _f === void 0 ? void 0 : _f.message) || ((_j = (_h = (_g = errors === null || errors === void 0 ? void 0 : errors.response) === null || _g === void 0 ? void 0 : _g.errors) === null || _h === void 0 ? void 0 : _h[0]) === null || _j === void 0 ? void 0 : _j.message) ||
75
+ error: ((_e = (_d = (_c = (_b = errors === null || errors === void 0 ? void 0 : errors.response) === null || _b === void 0 ? void 0 : _b.errors) === null || _c === void 0 ? void 0 : _c[0]) === null || _d === void 0 ? void 0 : _d.extensions) === null || _e === void 0 ? void 0 : _e.message) || ((_h = (_g = (_f = errors === null || errors === void 0 ? void 0 : errors.response) === null || _f === void 0 ? void 0 : _f.errors) === null || _g === void 0 ? void 0 : _g[0]) === null || _h === void 0 ? void 0 : _h.message) ||
81
76
  ((errors === null || errors === void 0 ? void 0 : errors.message) && networkErrorMessage),
82
77
  verified,
83
78
  },
@@ -9,7 +9,7 @@ require('./jsonpointer-11327262.js');
9
9
  const cjs = require('./cjs-1066ec21.js');
10
10
  require('./mixins-fe9d4112.js');
11
11
  require('./JSS-8503a151.js');
12
- const emailRegistrationView = require('./email-registration-view-a6b6430e.js');
12
+ const emailRegistrationView = require('./email-registration-view-5170d9f1.js');
13
13
  require('./useRegistrationFormState-ad3190c9.js');
14
14
  const useInstantAccessRegistration = require('./useInstantAccessRegistration-fe258c50.js');
15
15
 
@@ -17,20 +17,20 @@ require('./sqm-text-span-view-e1cd9bd3.js');
17
17
  const sqmAssetCardView = require('./sqm-asset-card-view-a0e33f21.js');
18
18
  const sqmCloseButtonView = require('./sqm-close-button-view-fd6e8f60.js');
19
19
  require('./index-8c6255f5.js');
20
- const emailRegistrationView = require('./email-registration-view-a6b6430e.js');
20
+ const emailRegistrationView = require('./email-registration-view-5170d9f1.js');
21
21
  const sqmLeaderboardRankView = require('./sqm-leaderboard-rank-view-5a3d4a88.js');
22
22
  const sqmLogoutCurrentUserView = require('./sqm-logout-current-user-view-c9f18d96.js');
23
23
  const sqmNavigationSidebarView = require('./sqm-navigation-sidebar-view-dd53f947.js');
24
24
  const sqmNavigationSidebarItemView = require('./sqm-navigation-sidebar-item-view-7f79627b.js');
25
25
  const sqmPortalEmailVerificationView = require('./sqm-portal-email-verification-view-8f15bace.js');
26
- const sqmPortalForgotPasswordView = require('./sqm-portal-forgot-password-view-ca5f6db9.js');
27
- const sqmPortalProfileView = require('./sqm-portal-profile-view-d8697f23.js');
26
+ const sqmPortalForgotPasswordView = require('./sqm-portal-forgot-password-view-969c49ed.js');
27
+ const sqmPortalProfileView = require('./sqm-portal-profile-view-851a020f.js');
28
28
  require('./utilities-73df97e1.js');
29
- const sqmPortalResetPasswordView = require('./sqm-portal-reset-password-view-07a13210.js');
29
+ const sqmPortalResetPasswordView = require('./sqm-portal-reset-password-view-96f329ed.js');
30
30
  const sqmPortalVerifyEmailView = require('./sqm-portal-verify-email-view-ce552bbc.js');
31
- const ShadowViewAddon = require('./ShadowViewAddon-89ba2ab0.js');
31
+ const ShadowViewAddon = require('./ShadowViewAddon-1e2f6f9b.js');
32
32
  const sqmPortalContainerView = require('./sqm-portal-container-view-5fb2ad49.js');
33
- const sqmInvoiceTableView = require('./sqm-invoice-table-view-501f8985.js');
33
+ const sqmInvoiceTableView = require('./sqm-invoice-table-view-cae2a67d.js');
34
34
 
35
35
  /**
36
36
  * lodash (Custom Build) <https://lodash.com/>
@@ -7239,8 +7239,8 @@ const slottedProps = {
7239
7239
  requiredFieldErrorMessage: "Cannot be empty",
7240
7240
  invalidEmailErrorMessage: "Must be a valid email address",
7241
7241
  formData: (index.h("div", null,
7242
- index.h("sl-input", { style: { marginBottom: "var(--sl-spacing-x-large)" }, exportparts: "label: input-label", label: "Slotted Input", required: true }),
7243
- index.h("sl-input", { exportparts: "label: input-label", label: "Slotted Input 2", required: true }))),
7242
+ index.h("sl-input", { style: { marginBottom: "var(--sl-spacing-x-large)" }, exportparts: "label: input-label, base: input-base", label: "Slotted Input", required: true }),
7243
+ index.h("sl-input", { exportparts: "label: input-label, base: input-base", label: "Slotted Input 2", required: true }))),
7244
7244
  },
7245
7245
  };
7246
7246
  const Default$3 = () => index.h(ShadowViewAddon.PortalRegisterView, Object.assign({}, defaultProps$3));
@@ -51,7 +51,7 @@ export function CheckboxFieldView(props) {
51
51
  h("style", { type: "text/css" },
52
52
  vanillaStyle,
53
53
  styleString),
54
- h("sl-checkbox", Object.assign({ exportparts: "label: input-label", name: `/${content.checkboxName}`, checked: states.checked, "onSl-change": (e) => {
54
+ h("sl-checkbox", Object.assign({ exportparts: "label: input-label, base: input-base", name: `/${content.checkboxName}`, checked: states.checked, "onSl-change": (e) => {
55
55
  e.target.value = e.target.checked;
56
56
  callbacks.setChecked(e.target.value);
57
57
  } }, (!content.checkboxOptional ? { required: true } : []), { disabled: ((_b = states.registrationFormState) === null || _b === void 0 ? void 0 : _b.loading) || ((_c = states.registrationFormState) === null || _c === void 0 ? void 0 : _c.disabled) }, (!states.checked && (validationErrors === null || validationErrors === void 0 ? void 0 : validationErrors[content.checkboxName])
@@ -40,7 +40,7 @@ export function DropdownFieldView(props) {
40
40
  h("style", { type: "text/css" },
41
41
  vanillaStyle,
42
42
  styleString),
43
- h("sl-select", Object.assign({ exportparts: "label: input-label", label: content.dropdownLabel, name: `/${content.dropdownName}` }, (!content.dropdownOptional ? { required: true } : []), { disabled: ((_b = states.registrationFormState) === null || _b === void 0 ? void 0 : _b.loading) || ((_c = states.registrationFormState) === null || _c === void 0 ? void 0 : _c.disabled) }, (((_e = (_d = states.registrationFormState) === null || _d === void 0 ? void 0 : _d.initialData) === null || _e === void 0 ? void 0 : _e[content.dropdownName]) ? {
43
+ h("sl-select", Object.assign({ exportparts: "label: input-label, base: input-base", label: content.dropdownLabel, name: `/${content.dropdownName}` }, (!content.dropdownOptional ? { required: true } : []), { disabled: ((_b = states.registrationFormState) === null || _b === void 0 ? void 0 : _b.loading) || ((_c = states.registrationFormState) === null || _c === void 0 ? void 0 : _c.disabled) }, (((_e = (_d = states.registrationFormState) === null || _d === void 0 ? void 0 : _d.initialData) === null || _e === void 0 ? void 0 : _e[content.dropdownName]) ? {
44
44
  value: (_g = (_f = states.registrationFormState) === null || _f === void 0 ? void 0 : _f.initialData) === null || _g === void 0 ? void 0 : _g[content.dropdownName],
45
45
  }
46
46
  : {}), ((validationErrors === null || validationErrors === void 0 ? void 0 : validationErrors[content.dropdownName]) ? {
@@ -15,17 +15,17 @@ const EditProfileView = (props) => {
15
15
  h("div", { class: "FormSection" },
16
16
  states.formState.error && (h("sqm-form-message", { type: "error", exportparts: "erroralert-icon" },
17
17
  h("div", { part: "erroralert-text" }, states.formState.error))),
18
- h("sl-input", Object.assign({ exportparts: "label: input-label", value: states.formState.firstName, onInput: callbacks.onChange, label: text.firstnametext, disabled: states.loading }, (errors.firstName && errors.firstName.status !== "valid"
18
+ h("sl-input", Object.assign({ exportparts: "label: input-label, base: input-base", value: states.formState.firstName, onInput: callbacks.onChange, label: text.firstnametext, disabled: states.loading }, (errors.firstName && errors.firstName.status !== "valid"
19
19
  ? { class: "ErrorStyles", helpText: text.fieldEmptyText }
20
20
  : []), { id: "firstName", name: "firstName", error: errors.firstName && errors.firstName.status !== "valid"
21
21
  ? errors.firstName.message
22
22
  : undefined })),
23
- h("sl-input", Object.assign({ exportparts: "label: input-label", value: states.formState.lastName, onInput: callbacks.onChange, label: text.lastnametext, disabled: states.loading, id: "lastName", name: "lastName" }, (errors.lastName && errors.lastName.status !== "valid"
23
+ h("sl-input", Object.assign({ exportparts: "label: input-label, base: input-base", value: states.formState.lastName, onInput: callbacks.onChange, label: text.lastnametext, disabled: states.loading, id: "lastName", name: "lastName" }, (errors.lastName && errors.lastName.status !== "valid"
24
24
  ? { class: "ErrorStyles", helpText: text.fieldEmptyText }
25
25
  : []), { error: errors.lastName && errors.lastName.status !== "valid"
26
26
  ? errors.lastName.message
27
27
  : undefined }))),
28
- text.showregion && states.formState.currentRegion && (h("sl-input", { exportparts: "label: input-label", disabled: true, value: states.formState.currentRegion, label: text.currentregiontext, id: "currentRegion", name: "currentRegion" })),
28
+ text.showregion && states.formState.currentRegion && (h("sl-input", { exportparts: "label: input-label, base: input-base", disabled: true, value: states.formState.currentRegion, label: text.currentregiontext, id: "currentRegion", name: "currentRegion" })),
29
29
  h("div", { class: "ButtonWrapper" },
30
30
  h("sl-button", { type: "primary", loading: states.loading, disabled: states.submitDisabled, onClick: (e) => {
31
31
  callbacks.onSubmit(e);
@@ -5,7 +5,7 @@ export function EmptyStateView(props) {
5
5
  h("img", { style: { height: "100px", margin: "auto" }, src: emptyStateImage }),
6
6
  h("sqm-titled-section", { style: { maxHeight: "400px" }, "label-margin": "xxx-small", "text-align": "center" },
7
7
  h("sqm-text", { slot: "label" },
8
- h("p", null, emptyStateHeader)),
8
+ h("p", { part: "header-text" }, emptyStateHeader)),
9
9
  h("sqm-text", { slot: "content" },
10
- h("p", { style: { color: "var(--sl-color-gray-500)" } }, emptyStateText)))));
10
+ h("p", { part: "description-text", style: { color: "var(--sl-color-gray-500)" } }, emptyStateText)))));
11
11
  }
@@ -27,7 +27,7 @@ export function InputFieldView(props) {
27
27
  h("style", { type: "text/css" },
28
28
  vanillaStyle,
29
29
  styleString),
30
- h("sl-input", Object.assign({ exportparts: "label: input-label", name: `/${content.fieldName}`, type: content.fieldType, label: content.fieldLabel }, (!content.fieldOptional ? { required: true } : []), { disabled: ((_b = states.registrationFormState) === null || _b === void 0 ? void 0 : _b.loading) || ((_c = states.registrationFormState) === null || _c === void 0 ? void 0 : _c.disabled) }, (((_e = (_d = states.registrationFormState) === null || _d === void 0 ? void 0 : _d.initialData) === null || _e === void 0 ? void 0 : _e[content.fieldName]) ? {
30
+ h("sl-input", Object.assign({ exportparts: "label: input-label, base: input-base", name: `/${content.fieldName}`, type: content.fieldType, label: content.fieldLabel }, (!content.fieldOptional ? { required: true } : []), { disabled: ((_b = states.registrationFormState) === null || _b === void 0 ? void 0 : _b.loading) || ((_c = states.registrationFormState) === null || _c === void 0 ? void 0 : _c.disabled) }, (((_e = (_d = states.registrationFormState) === null || _d === void 0 ? void 0 : _d.initialData) === null || _e === void 0 ? void 0 : _e[content.fieldName]) ? {
31
31
  value: (_g = (_f = states.registrationFormState) === null || _f === void 0 ? void 0 : _f.initialData) === null || _g === void 0 ? void 0 : _g[content.fieldName],
32
32
  }
33
33
  : {}), ((validationErrors === null || validationErrors === void 0 ? void 0 : validationErrors[content.fieldName]) ? {
@@ -31,7 +31,7 @@ export function NameFieldsView(props) {
31
31
  h("style", { type: "text/css" },
32
32
  vanillaStyle,
33
33
  styleString),
34
- h("sl-input", Object.assign({ exportparts: "label: input-label", name: "/firstName", type: "text", label: states.content.firstNameLabel, required: true, disabled: ((_b = states.registrationFormState) === null || _b === void 0 ? void 0 : _b.loading) || ((_c = states.registrationFormState) === null || _c === void 0 ? void 0 : _c.disabled) }, (((_e = (_d = states.registrationFormState) === null || _d === void 0 ? void 0 : _d.initialData) === null || _e === void 0 ? void 0 : _e.firstName) ? {
34
+ h("sl-input", Object.assign({ exportparts: "label: input-label, base: input-base", name: "/firstName", type: "text", label: states.content.firstNameLabel, required: true, disabled: ((_b = states.registrationFormState) === null || _b === void 0 ? void 0 : _b.loading) || ((_c = states.registrationFormState) === null || _c === void 0 ? void 0 : _c.disabled) }, (((_e = (_d = states.registrationFormState) === null || _d === void 0 ? void 0 : _d.initialData) === null || _e === void 0 ? void 0 : _e.firstName) ? {
35
35
  value: (_g = (_f = states.registrationFormState) === null || _f === void 0 ? void 0 : _f.initialData) === null || _g === void 0 ? void 0 : _g.firstName,
36
36
  }
37
37
  : {}), ((validationErrors === null || validationErrors === void 0 ? void 0 : validationErrors.firstName) ? {
@@ -39,7 +39,7 @@ export function NameFieldsView(props) {
39
39
  helpText: (validationErrors === null || validationErrors === void 0 ? void 0 : validationErrors.firstName) || "Cannot be empty",
40
40
  }
41
41
  : []))),
42
- h("sl-input", Object.assign({ exportparts: "label: input-label", name: "/lastName", type: "text", label: states.content.lastNameLabel, required: true, disabled: ((_h = states.registrationFormState) === null || _h === void 0 ? void 0 : _h.loading) || ((_j = states.registrationFormState) === null || _j === void 0 ? void 0 : _j.disabled) }, (((_l = (_k = states.registrationFormState) === null || _k === void 0 ? void 0 : _k.initialData) === null || _l === void 0 ? void 0 : _l.lastName) ? {
42
+ h("sl-input", Object.assign({ exportparts: "label: input-label, base: input-base", name: "/lastName", type: "text", label: states.content.lastNameLabel, required: true, disabled: ((_h = states.registrationFormState) === null || _h === void 0 ? void 0 : _h.loading) || ((_j = states.registrationFormState) === null || _j === void 0 ? void 0 : _j.disabled) }, (((_l = (_k = states.registrationFormState) === null || _k === void 0 ? void 0 : _k.initialData) === null || _l === void 0 ? void 0 : _l.lastName) ? {
43
43
  value: (_o = (_m = states.registrationFormState) === null || _m === void 0 ? void 0 : _m.initialData) === null || _o === void 0 ? void 0 : _o.lastName,
44
44
  }
45
45
  : {}), ((validationErrors === null || validationErrors === void 0 ? void 0 : validationErrors.lastName) ? {
@@ -28,7 +28,7 @@ export function PortalResetPasswordView(props) {
28
28
  h("style", { type: "text/css" },
29
29
  vanillaStyle,
30
30
  styleString),
31
- h("sl-input", Object.assign({ exportparts: "label: input-label", type: "password", name: "/password", label: states.content.fieldLabel || "Password", required: true, disabled: ((_a = states.registrationFormState) === null || _a === void 0 ? void 0 : _a.loading) || ((_b = states.registrationFormState) === null || _b === void 0 ? void 0 : _b.disabled), validationError: ({ value }) => {
31
+ h("sl-input", Object.assign({ exportparts: "label: input-label, base: input-base", type: "password", name: "/password", label: states.content.fieldLabel || "Password", required: true, disabled: ((_a = states.registrationFormState) === null || _a === void 0 ? void 0 : _a.loading) || ((_b = states.registrationFormState) === null || _b === void 0 ? void 0 : _b.disabled), validationError: ({ value }) => {
32
32
  if (!value) {
33
33
  return "Cannot be empty";
34
34
  }
@@ -59,7 +59,7 @@ export function PortalChangePasswordView(props) {
59
59
  h("sl-form", { "onSl-submit": callbacks.submit },
60
60
  h("div", { class: sheet.classes.InputContainer },
61
61
  h("sqm-password-field", { exportparts: "input-label: input-label", class: sheet.classes.PasswordField, fieldLabel: states.content.passwordFieldLabel, meetsRequirementsText: states.content.meetsRequirementsText, doesNotMeetRequirementsText: states.content.doesNotMeetRequirementsText, minErrorText: states.content.minErrorText, uppercaseErrorText: states.content.uppercaseErrorText, lowercaseErrorText: states.content.lowercaseErrorText, hasErrorText: states.content.hasErrorText }),
62
- h("sl-input", { exportparts: "label: input-label", name: "/confirmPassword", label: states.content.confirmPasswordFieldLabel, required: true, togglePassword: true, disabled: states.loading, type: "password" })),
62
+ h("sl-input", { exportparts: "label: input-label, base: input-base", name: "/confirmPassword", label: states.content.confirmPasswordFieldLabel, required: true, togglePassword: true, disabled: states.loading, type: "password" })),
63
63
  h(PortalContainerView, Object.assign({}, { direction: "row", padding: "none", gap: "20px" }),
64
64
  h("sl-button", { class: sheet.classes.ChangePasswordButton, type: "primary", submit: true, loading: states.loading }, states.content.changePasswordButtonText),
65
65
  h("sl-button", { class: sheet.classes.CancelButton, type: "text", onClick: () => callbacks.setOpen(false) }, states.content.cancelText))))),
@@ -33,7 +33,7 @@ export function PortalForgotPasswordView(props) {
33
33
  h("div", { part: "erroralert-text" }, props.states.error))),
34
34
  props.states.success && (h("sqm-form-message", { type: "success", exportparts: "successalert-icon" },
35
35
  h("div", { part: "successalert-text" }, content.successAlertText))),
36
- h("sl-input", { exportparts: "label: input-label", type: "email", name: "/email", label: content.emailLabel || "Email", disabled: states.loading, required: true }),
36
+ h("sl-input", { exportparts: "label: input-label, base: input-base", type: "email", name: "/email", label: content.emailLabel || "Email", disabled: states.loading, required: true }),
37
37
  h("div", { class: sheet.classes.ButtonsContainer },
38
38
  h("sl-button", { submit: true, loading: states.loading, exportparts: "base: primarybutton-base", type: "primary" }, content.submitLabel || "Reset Password"),
39
39
  h("div", { class: sheet.classes.SecondaryButton }, content.secondaryButton)))));
@@ -35,9 +35,9 @@ export function PortalLoginView(props) {
35
35
  h("sl-form", { class: sheet.classes.Column, "onSl-submit": callbacks.submit },
36
36
  props.states.error && (h("sqm-form-message", { type: "error", exportparts: "erroralert-icon" },
37
37
  h("div", { part: "erroralert-text" }, props.states.error))),
38
- h("sl-input", { exportparts: "label: input-label", type: "email", name: "/email", label: content.emailLabel || "Email", disabled: states.loading, required: true }),
38
+ h("sl-input", { exportparts: "label: input-label, base: input-base", type: "email", name: "/email", label: content.emailLabel || "Email", disabled: states.loading, required: true }),
39
39
  h("div", null,
40
- h("sl-input", { exportparts: "label: input-label", type: "password", name: "/password", label: content.passwordLabel || "Password", disabled: states.loading, required: true }),
40
+ h("sl-input", { exportparts: "label: input-label, base: input-base", type: "password", name: "/password", label: content.passwordLabel || "Password", disabled: states.loading, required: true }),
41
41
  h("div", { class: sheet.classes.ForgotButtonContainer }, content.forgotPasswordButton)),
42
42
  h("div", { class: sheet.classes.ButtonsContainer },
43
43
  h("sl-button", { submit: true, loading: states.loading, exportparts: "base: primarybutton-base", type: "primary" }, content.submitLabel || "Login"),
@@ -66,16 +66,16 @@ export function PortalProfileView(props) {
66
66
  error && (h("sqm-form-message", { class: sheet.classes.Error, type: "error", exportparts: "erroralert-icon" },
67
67
  h("div", { part: "erroralert-text" }, error))),
68
68
  h("div", { class: sheet.classes.NameInputContainer },
69
- h("sl-input", Object.assign({ class: sheet.classes.NameInputStyle, exportparts: "label: input-label", value: (_c = states.user) === null || _c === void 0 ? void 0 : _c.firstName, onInput: callbacks.onChange, label: text.firstnametext, disabled: states.loading }, ((errors === null || errors === void 0 ? void 0 : errors.firstName) && (errors === null || errors === void 0 ? void 0 : errors.firstName.status) !== "valid"
69
+ h("sl-input", Object.assign({ class: sheet.classes.NameInputStyle, exportparts: "label: input-label, base: input-base", value: (_c = states.user) === null || _c === void 0 ? void 0 : _c.firstName, onInput: callbacks.onChange, label: text.firstnametext, disabled: states.loading }, ((errors === null || errors === void 0 ? void 0 : errors.firstName) && (errors === null || errors === void 0 ? void 0 : errors.firstName.status) !== "valid"
70
70
  ? { class: "ErrorStyles", helpText: text.fieldEmptyText }
71
71
  : []), { id: "firstName", name: "firstName", error: (errors === null || errors === void 0 ? void 0 : errors.firstName) && (errors === null || errors === void 0 ? void 0 : errors.firstName.status) !== "valid"
72
72
  ? errors === null || errors === void 0 ? void 0 : errors.firstName.message : undefined })),
73
- h("sl-input", Object.assign({ class: sheet.classes.NameInputStyle, exportparts: "label: input-label", value: (_d = states.user) === null || _d === void 0 ? void 0 : _d.lastName, onInput: callbacks.onChange, label: text.lastnametext, disabled: states.loading, id: "lastName", name: "lastName" }, ((errors === null || errors === void 0 ? void 0 : errors.lastName) && (errors === null || errors === void 0 ? void 0 : errors.lastName.status) !== "valid"
73
+ h("sl-input", Object.assign({ class: sheet.classes.NameInputStyle, exportparts: "label: input-label, base: input-base", value: (_d = states.user) === null || _d === void 0 ? void 0 : _d.lastName, onInput: callbacks.onChange, label: text.lastnametext, disabled: states.loading, id: "lastName", name: "lastName" }, ((errors === null || errors === void 0 ? void 0 : errors.lastName) && (errors === null || errors === void 0 ? void 0 : errors.lastName.status) !== "valid"
74
74
  ? { class: "ErrorStyles", helpText: text.fieldEmptyText }
75
75
  : []), { error: (errors === null || errors === void 0 ? void 0 : errors.lastName) && (errors === null || errors === void 0 ? void 0 : errors.lastName.status) !== "valid"
76
76
  ? errors === null || errors === void 0 ? void 0 : errors.lastName.message : undefined }))),
77
- h("sl-input", { label: text.emailtext, value: (_e = states.user) === null || _e === void 0 ? void 0 : _e.email, exportparts: "label: input-label", disabled: true }),
78
- states.showCountry && (h("sl-input", { label: text.countrytext, value: country, exportparts: "label: input-label", disabled: true })),
77
+ h("sl-input", { label: text.emailtext, value: (_e = states.user) === null || _e === void 0 ? void 0 : _e.email, exportparts: "label: input-label, base: input-base", disabled: true }),
78
+ states.showCountry && (h("sl-input", { label: text.countrytext, value: country, exportparts: "label: input-label, base: input-base", disabled: true })),
79
79
  h("sl-button", { type: "primary", loading: states.loading, disabled: states.submitDisabled, onClick: (e) => {
80
80
  callbacks.onSubmit(e);
81
81
  }, submit: true }, text.submitChangeButtonText))));
@@ -94,8 +94,8 @@ const slottedProps = {
94
94
  requiredFieldErrorMessage: "Cannot be empty",
95
95
  invalidEmailErrorMessage: "Must be a valid email address",
96
96
  formData: (h("div", null,
97
- h("sl-input", { style: { marginBottom: "var(--sl-spacing-x-large)" }, exportparts: "label: input-label", label: "Slotted Input", required: true }),
98
- h("sl-input", { exportparts: "label: input-label", label: "Slotted Input 2", required: true }))),
97
+ h("sl-input", { style: { marginBottom: "var(--sl-spacing-x-large)" }, exportparts: "label: input-label, base: input-base", label: "Slotted Input", required: true }),
98
+ h("sl-input", { exportparts: "label: input-label, base: input-base", label: "Slotted Input 2", required: true }))),
99
99
  },
100
100
  };
101
101
  export const Default = () => h(PortalRegisterView, Object.assign({}, defaultProps));
@@ -45,7 +45,7 @@ export function PortalRegisterView(props) {
45
45
  states.error && (h("sqm-form-message", { type: "error", exportparts: "erroralert-icon" },
46
46
  h("div", { part: "erroralert-text" }, props.states.error))),
47
47
  content.formData,
48
- !states.hideInputs && (h("sl-input", Object.assign({ exportparts: "label: input-label", type: "email", name: "/email", label: content.emailLabel || "Email", disabled: states.loading, required: true, validationError: ({ value }) => {
48
+ !states.hideInputs && (h("sl-input", Object.assign({ exportparts: "label: input-label, base: input-base", type: "email", name: "/email", label: content.emailLabel || "Email", disabled: states.loading, required: true, validationError: ({ value }) => {
49
49
  if (!value) {
50
50
  return content.requiredFieldErrorMessage;
51
51
  }
@@ -61,7 +61,7 @@ export function PortalRegisterView(props) {
61
61
  : [])))),
62
62
  !states.hideInputs && (h("sqm-password-field", { fieldLabel: content.passwordLabel, "disable-validation": states.disablePasswordValidation, meetsRequirementsText: content.meetsRequirementsText, doesNotMeetRequirementsText: content.doesNotMeetRequirementsText, minErrorText: content.minErrorText, uppercaseErrorText: content.uppercaseErrorText, lowercaseErrorText: content.lowercaseErrorText, hasErrorText: content.hasErrorText })),
63
63
  content.passwordField,
64
- !states.hideInputs && states.confirmPassword && (h("sl-input", Object.assign({ exportparts: "label: input-label", type: "password", name: "/confirmPassword", label: content.confirmPasswordLabel, disabled: states.loading, required: true }, (((_f = (_e = states.registrationFormState) === null || _e === void 0 ? void 0 : _e.validationErrors) === null || _f === void 0 ? void 0 : _f.confirmPassword) ? {
64
+ !states.hideInputs && states.confirmPassword && (h("sl-input", Object.assign({ exportparts: "label: input-label, base: input-base", type: "password", name: "/confirmPassword", label: content.confirmPasswordLabel, disabled: states.loading, required: true }, (((_f = (_e = states.registrationFormState) === null || _e === void 0 ? void 0 : _e.validationErrors) === null || _f === void 0 ? void 0 : _f.confirmPassword) ? {
65
65
  class: sheet.classes.ErrorStyle,
66
66
  helpText: ((_h = (_g = states.registrationFormState) === null || _g === void 0 ? void 0 : _g.validationErrors) === null || _h === void 0 ? void 0 : _h.confirmPassword) || content.requiredFieldErrorMessage,
67
67
  }
@@ -76,8 +76,8 @@ const slottedProps = {
76
76
  pageLabel: "Register",
77
77
  confirmPasswordLabel: "Confirm Password",
78
78
  formData: (h("div", null,
79
- h("sl-input", { style: { marginBottom: "var(--sl-spacing-x-large)" }, exportparts: "label: input-label", label: "Slotted Input", required: true }),
80
- h("sl-input", { exportparts: "label: input-label", label: "Slotted Input 2", required: true }))),
79
+ h("sl-input", { style: { marginBottom: "var(--sl-spacing-x-large)" }, exportparts: "label: input-label, base: input-base", label: "Slotted Input", required: true }),
80
+ h("sl-input", { exportparts: "label: input-label, base: input-base", label: "Slotted Input 2", required: true }))),
81
81
  },
82
82
  };
83
83
  export const Default = () => h(PortalRegistrationFormView, Object.assign({}, defaultProps));
@@ -46,7 +46,7 @@ export function PortalRegistrationFormView(props) {
46
46
  h("div", { part: "erroralert-text" }, states.registrationFormState.disabledMessage))) : (states.error && (h("sqm-form-message", { type: "error", exportparts: "erroralert-icon" },
47
47
  h("div", { part: "erroralert-text" }, props.states.error)))),
48
48
  content.formData,
49
- !states.hideInputs && (h("sl-input", Object.assign({ exportparts: "label: input-label", type: "email", name: "/email", label: content.emailLabel || "Email", disabled: states.loading || ((_b = states.registrationFormState) === null || _b === void 0 ? void 0 : _b.disabled), required: true, validationError: ({ value }) => {
49
+ !states.hideInputs && (h("sl-input", Object.assign({ exportparts: "label: input-label, base: input-base", type: "email", name: "/email", label: content.emailLabel || "Email", disabled: states.loading || ((_b = states.registrationFormState) === null || _b === void 0 ? void 0 : _b.disabled), required: true, validationError: ({ value }) => {
50
50
  if (!value) {
51
51
  return content.requiredFieldErrorMessage;
52
52
  }
@@ -65,7 +65,7 @@ export function PortalRegistrationFormView(props) {
65
65
  : [])))),
66
66
  !states.hideInputs && (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 })),
67
67
  content.passwordField,
68
- !states.hideInputs && states.confirmPassword && (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) ? {
68
+ !states.hideInputs && states.confirmPassword && (h("sl-input", Object.assign({ exportparts: "label: input-label, base: input-base", 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) ? {
69
69
  value: (_q = (_p = states.registrationFormState) === null || _p === void 0 ? void 0 : _p.initialData) === null || _q === void 0 ? void 0 : _q.confirmPassword,
70
70
  }
71
71
  : {}), (((_s = (_r = states.registrationFormState) === null || _r === void 0 ? void 0 : _r.validationErrors) === null || _s === void 0 ? void 0 : _s.confirmPassword) ? {
@@ -68,7 +68,7 @@ export function PortalResetPasswordView(props) {
68
68
  props.states.error && (h("sqm-form-message", { type: "error", class: sheet.classes.Banner, exportparts: "erroralert-icon" },
69
69
  h("div", { part: "erroralert-text" }, props.states.error))),
70
70
  !states.reset && (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 })),
71
- !states.reset && states.confirmPassword && (h("sl-input", { exportparts: "label: input-label", type: "password", name: "/confirmPassword", label: states.content.confirmPasswordFieldLabel, disabled: states.loading, required: true })),
71
+ !states.reset && states.confirmPassword && (h("sl-input", { exportparts: "label: input-label, base: input-base", type: "password", name: "/confirmPassword", label: states.content.confirmPasswordFieldLabel, disabled: states.loading, required: true })),
72
72
  h("div", { class: sheet.classes.ButtonsContainer },
73
73
  h("sl-button", { class: sheet.classes.ContinueButton, submit: true, loading: states.loading, exportparts: "base: primarybutton-base", type: "primary" }, states.reset
74
74
  ? states.content.continueButtonText
@@ -1,4 +1,4 @@
1
- import { navigation, setUserIdentity, useUserIdentity, useVerifyEmailMutation, } from "@saasquatch/component-boilerplate";
1
+ import { navigation, useUserIdentity, useVerifyEmailMutation, } from "@saasquatch/component-boilerplate";
2
2
  import { useEffect } from "@saasquatch/universal-hooks";
3
3
  import { sanitizeUrlPath } from "../../utils/utils";
4
4
  const SUBMITTED_CONTEXT = "sq:verify-submitted";
@@ -7,19 +7,17 @@ function setSubmitted(submitted) {
7
7
  window[SUBMITTED_CONTEXT] = submitted;
8
8
  }
9
9
  export function usePortalVerifyEmail({ nextPage, failedPage, verifySuccessText, verifyEmailText, verifyInvalidText, networkErrorMessage, continueText, }) {
10
- var _a, _b, _c, _d, _e, _f, _g, _h, _j;
10
+ var _a, _b, _c, _d, _e, _f, _g, _h;
11
11
  const submitted = window[SUBMITTED_CONTEXT];
12
12
  const userIdent = useUserIdentity();
13
- const email = (_a = userIdent === null || userIdent === void 0 ? void 0 : userIdent.managedIdentity) === null || _a === void 0 ? void 0 : _a.email;
14
13
  const [request, { loading, data, errors }] = useVerifyEmailMutation();
15
14
  const urlParams = new URLSearchParams(navigation.location.search);
16
15
  const oobCode = urlParams.get("oobCode");
17
- const oobEmail = urlParams.get("email");
18
16
  const nextPageOverride = urlParams.get("nextPage");
19
17
  // derived from useMutation in component boilerplate initialState
20
18
  const disableContinue = data === undefined && errors === undefined && !!oobCode;
21
19
  // if logged out, userIdent?.managedIdentity?.emailVerified will be falsey, even if verification was successful
22
- const verified = !!(((_b = userIdent === null || userIdent === void 0 ? void 0 : userIdent.managedIdentity) === null || _b === void 0 ? void 0 : _b.emailVerified) || (data === null || data === void 0 ? void 0 : data.verifyManagedIdentityEmail.success));
20
+ const verified = !!(((_a = userIdent === null || userIdent === void 0 ? void 0 : userIdent.managedIdentity) === null || _a === void 0 ? void 0 : _a.emailVerified) || (data === null || data === void 0 ? void 0 : data.verifyManagedIdentityEmail.success));
23
21
  const failed = () => {
24
22
  return navigation.push({
25
23
  pathname: failedPage,
@@ -31,42 +29,39 @@ export function usePortalVerifyEmail({ nextPage, failedPage, verifySuccessText,
31
29
  const url = sanitizeUrlPath(nextPageOverride || nextPage);
32
30
  navigation.push(url.href);
33
31
  };
34
- const submit = () => {
35
- console.debug("Submit called");
36
- setSubmitted(true);
37
- request({ oobCode });
38
- };
39
- console.log({ email, oobEmail, data, userIdent });
40
- useEffect(() => {
32
+ const submit = async () => {
41
33
  var _a;
42
- // verification successful but user in context is not verified
43
- // or mismatch between logged in user and user associated with oobCode
44
- if ((data === null || data === void 0 ? void 0 : data.verifyManagedIdentityEmail.success) &&
45
- (!((_a = userIdent === null || userIdent === void 0 ? void 0 : userIdent.managedIdentity) === null || _a === void 0 ? void 0 : _a.emailVerified) || email !== oobEmail)) {
46
- console.debug("MISMATCH");
34
+ setSubmitted(true);
35
+ if (oobCode) {
36
+ const result = await request({ oobCode });
37
+ if ((result instanceof Error ||
38
+ !result.verifyManagedIdentityEmail.success) &&
39
+ !((_a = userIdent === null || userIdent === void 0 ? void 0 : userIdent.managedIdentity) === null || _a === void 0 ? void 0 : _a.emailVerified)) {
40
+ // pause on error if logged out/unverified
41
+ return;
42
+ }
47
43
  setTimeout(() => {
48
44
  gotoNextPage();
49
- setUserIdentity(undefined);
50
45
  setSubmitted(false);
51
46
  }, 3000);
52
- return;
53
- // Already verified, begin redirect
54
47
  }
55
- else if (verified) {
56
- console.debug("VERIFIED");
48
+ };
49
+ useEffect(() => {
50
+ // Already verified, begin redirect
51
+ if (verified) {
57
52
  setTimeout(() => {
58
53
  gotoNextPage();
59
54
  setSubmitted(false);
60
55
  }, 3000);
61
56
  return;
62
57
  }
63
- if (userIdent && !data && !submitted && oobCode)
58
+ if (userIdent && !data && !submitted)
64
59
  submit();
65
- }, [verified, submitted, data, userIdent]);
60
+ }, [verified, submitted, data, userIdent, submitted]);
66
61
  return {
67
62
  states: {
68
63
  loading: loading || disableContinue,
69
- error: ((_f = (_e = (_d = (_c = errors === null || errors === void 0 ? void 0 : errors.response) === null || _c === void 0 ? void 0 : _c.errors) === null || _d === void 0 ? void 0 : _d[0]) === null || _e === void 0 ? void 0 : _e.extensions) === null || _f === void 0 ? void 0 : _f.message) || ((_j = (_h = (_g = errors === null || errors === void 0 ? void 0 : errors.response) === null || _g === void 0 ? void 0 : _g.errors) === null || _h === void 0 ? void 0 : _h[0]) === null || _j === void 0 ? void 0 : _j.message) ||
64
+ error: ((_e = (_d = (_c = (_b = errors === null || errors === void 0 ? void 0 : errors.response) === null || _b === void 0 ? void 0 : _b.errors) === null || _c === void 0 ? void 0 : _c[0]) === null || _d === void 0 ? void 0 : _d.extensions) === null || _e === void 0 ? void 0 : _e.message) || ((_h = (_g = (_f = errors === null || errors === void 0 ? void 0 : errors.response) === null || _f === void 0 ? void 0 : _f.errors) === null || _g === void 0 ? void 0 : _g[0]) === null || _h === void 0 ? void 0 : _h.message) ||
70
65
  ((errors === null || errors === void 0 ? void 0 : errors.message) && networkErrorMessage),
71
66
  verified,
72
67
  },
@@ -417,7 +417,7 @@ export function RewardExchangeView(props) {
417
417
  borderRadius: "4px",
418
418
  };
419
419
  return (h("div", { key: item.key, style: style },
420
- h("sl-card", { class: sheet.classes.Card, style: {
420
+ h("sl-card", { exportparts: "base: exchange-card-container", class: sheet.classes.Card, style: {
421
421
  cursor: item.unavailableReasonCode
422
422
  ? "not-allowed"
423
423
  : "pointer",
@@ -475,7 +475,7 @@ export function RewardExchangeView(props) {
475
475
  }))))))));
476
476
  }))),
477
477
  h("div", { class: sheet.classes.Button },
478
- h("sl-button", { class: "continue right", size: "large", onClick: () => callbacks.setStage("chooseAmount"), loading: states.loading, disabled: !states.selectedItem }, states.content.text.continueText))),
478
+ h("sl-button", { exportparts: "base: primarybutton-base", class: "continue right", size: "large", onClick: () => callbacks.setStage("chooseAmount"), loading: states.loading, disabled: !states.selectedItem }, states.content.text.continueText))),
479
479
  ];
480
480
  }
481
481
  function chooseAmount() {
@@ -495,8 +495,8 @@ export function RewardExchangeView(props) {
495
495
  ((_d = states.selectedItem) === null || _d === void 0 ? void 0 : _d.ruleType) === "FIXED_GLOBAL_REWARD" ? (h("div", { class: "description" }, selectedItem === null || selectedItem === void 0 ? void 0 : selectedItem.description)) : (h("div", null, input)),
496
496
  h("div", { class: "space" }))),
497
497
  h("div", { class: sheet.classes.Button },
498
- h("sl-button", { class: "cancel", size: "large", type: "text", onClick: () => callbacks.resetState() }, states.content.text.cancelText),
499
- h("sl-button", { class: "continue", size: "large", onClick: () => callbacks.setStage("confirmation"), disabled: isDisabled }, states.content.text.continueToConfirmationText)))));
498
+ h("sl-button", { exportparts: "base: secondarybutton-base", class: "cancel", size: "large", type: "text", onClick: () => callbacks.resetState() }, states.content.text.cancelText),
499
+ h("sl-button", { exportparts: "base: primarybutton-base", class: "continue", size: "large", onClick: () => callbacks.setStage("confirmation"), disabled: isDisabled }, states.content.text.continueToConfirmationText)))));
500
500
  }
501
501
  function confirmation() {
502
502
  const cost = (selectedStep === null || selectedStep === void 0 ? void 0 : selectedStep.prettySourceValue) || selectedItem.prettySourceValue;
@@ -234,7 +234,7 @@ export const BankingInfoFormView = (props) => {
234
234
  h("p", { class: classes.DescriptionText }, text.paymentMethodSubtext))),
235
235
  h("div", null,
236
236
  h("div", { class: classes.CheckboxContainer }, states.loading && formState.paymentMethodChecked === undefined ? (getLoadingSkeleton(undefined)) : (h("div", { class: classes.RadioContainer },
237
- states.hasPayPal && (h("sl-radio", { class: classes.Checkbox, exportparts: "label: input-label", checked: formState.paymentMethodChecked === "toBankAccount", onInput: () => callbacks.setPaymentMethodChecked("toBankAccount"), disabled: states.disabled, id: "toBankAccount", name: "/toBankAccount" }, text.directlyToBankAccount)),
237
+ states.hasPayPal && (h("sl-radio", { class: classes.Checkbox, exportparts: "label: input-label, base: input-base", checked: formState.paymentMethodChecked === "toBankAccount", onInput: () => callbacks.setPaymentMethodChecked("toBankAccount"), disabled: states.disabled, id: "toBankAccount", name: "/toBankAccount" }, text.directlyToBankAccount)),
238
238
  formState.paymentMethodChecked === "toBankAccount" && (h("div", { class: classes.InputContainer, style: states.hideBanking ? { display: "none" } : {} }, states.loading
239
239
  ? getLoadingSkeleton("toBankAccount", slots.formInputsSlot.length + 3)
240
240
  : [
@@ -242,7 +242,7 @@ export const BankingInfoFormView = (props) => {
242
242
  slots.paymentMethodSlot,
243
243
  slots.formInputsSlot,
244
244
  ])),
245
- states.hasPayPal && (h("sl-radio", { class: classes.Checkbox, exportparts: "label: input-label", checked: formState.paymentMethodChecked === "toPayPalAccount", onInput: () => callbacks.setPaymentMethodChecked("toPayPalAccount"), disabled: states.disabled, id: "toPayPalAccount", name: "/toPayPalAccount" }, intl.formatMessage({
245
+ states.hasPayPal && (h("sl-radio", { class: classes.Checkbox, exportparts: "label: input-label, base: input-base", checked: formState.paymentMethodChecked === "toPayPalAccount", onInput: () => callbacks.setPaymentMethodChecked("toPayPalAccount"), disabled: states.disabled, id: "toPayPalAccount", name: "/toPayPalAccount" }, intl.formatMessage({
246
246
  id: "paypal-input-label",
247
247
  defaultMessage: text.toPayPalAccount,
248
248
  }, { feeCap: states.feeCap }))),
@@ -251,11 +251,11 @@ export const BankingInfoFormView = (props) => {
251
251
  : slots.paypalInputSlot)),
252
252
  h("div", { style: { paddingTop: "24px", paddingBottom: "12px" } },
253
253
  h("h4", null, text.paymentSchedule)),
254
- h("sl-radio", { class: classes.Checkbox, exportparts: "label: input-label", checked: formState.paymentScheduleChecked === "BALANCE_THRESHOLD", onInput: () => callbacks.setPaymentScheduleChecked("BALANCE_THRESHOLD"), disabled: states.disabled, id: "paymentSchedulingType", name: "/paymentSchedulingType", value: "BALANCE_THRESHOLD" }, text.paymentScheduleBalanceThreshold),
254
+ h("sl-radio", { class: classes.Checkbox, exportparts: "label: input-label, base: input-base", checked: formState.paymentScheduleChecked === "BALANCE_THRESHOLD", onInput: () => callbacks.setPaymentScheduleChecked("BALANCE_THRESHOLD"), disabled: states.disabled, id: "paymentSchedulingType", name: "/paymentSchedulingType", value: "BALANCE_THRESHOLD" }, text.paymentScheduleBalanceThreshold),
255
255
  formState.paymentScheduleChecked === "BALANCE_THRESHOLD" && (h("div", { class: classes.InputContainer, style: states.hideBalanceThreshold ? { display: "none" } : {} }, states.loading
256
256
  ? getLoadingSkeleton("toPayPalAccount")
257
257
  : slots.paymentThresholdSelectSlot)),
258
- h("sl-radio", { class: classes.Checkbox, exportparts: "label: input-label", checked: formState.paymentScheduleChecked === "FIXED_DAY", onInput: () => callbacks.setPaymentScheduleChecked("FIXED_DAY"), disabled: states.disabled, id: "paymentSchedulingType", name: "/paymentSchedulingType", value: "FIXED_DAY" }, text.paymentScheduleFixedDay),
258
+ h("sl-radio", { class: classes.Checkbox, exportparts: "label: input-label, base: input-base", checked: formState.paymentScheduleChecked === "FIXED_DAY", onInput: () => callbacks.setPaymentScheduleChecked("FIXED_DAY"), disabled: states.disabled, id: "paymentSchedulingType", name: "/paymentSchedulingType", value: "FIXED_DAY" }, text.paymentScheduleFixedDay),
259
259
  formState.paymentScheduleChecked === "FIXED_DAY" && (h("div", { class: classes.InputContainer, style: states.hideFixedDay ? { display: "none" } : {} }, states.loading
260
260
  ? getLoadingSkeleton("toPayPalAccount")
261
261
  : slots.paymentFixedDaySelectSlot))))),