@saasquatch/mint-components 1.12.0-1 → 1.12.0-11

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 (159) hide show
  1. package/dist/cjs/{ShadowViewAddon-88821c64.js → ShadowViewAddon-040cffad.js} +6 -3
  2. package/dist/cjs/extractProps-fd93ba62.js +21 -0
  3. package/dist/cjs/loader.cjs.js +1 -1
  4. package/dist/cjs/mint-components.cjs.js +1 -1
  5. package/dist/cjs/sqm-banking-info-form_16.cjs.entry.js +92 -78
  6. package/dist/cjs/sqm-big-stat_39.cjs.entry.js +128 -63
  7. package/dist/cjs/sqm-code-verification.cjs.entry.js +67 -77
  8. package/dist/cjs/sqm-email-verification.cjs.entry.js +158 -12
  9. package/dist/cjs/{sqm-invoice-table-view-ce9a34ac.js → sqm-invoice-table-view-c58966f8.js} +79 -0
  10. package/dist/cjs/sqm-stencilbook.cjs.entry.js +56 -14
  11. package/dist/cjs/sqm-widget-verification-internal.cjs.entry.js +81 -11
  12. package/dist/cjs/sqm-widget-verification.cjs.entry.js +102 -19
  13. package/dist/cjs/usePayoutStatus-b9fb7399.js +70 -0
  14. package/dist/cjs/useVerificationEmail-6aacdb71.js +169 -0
  15. package/dist/collection/collection-manifest.json +1 -1
  16. package/dist/collection/components/sqm-big-stat/useBigStat.js +6 -3
  17. package/dist/collection/components/sqm-payout-button-scroll/PayoutButtonScroll.stories.js +1 -2
  18. package/dist/collection/components/sqm-payout-button-scroll/sqm-payout-button-scroll-view.js +1 -0
  19. package/dist/collection/components/sqm-payout-button-scroll/sqm-payout-button-scroll.js +16 -3
  20. package/dist/collection/components/sqm-widget-verification/sqm-code-verification/WidgetCodeVerification.stories.js +9 -2
  21. package/dist/collection/components/sqm-widget-verification/sqm-code-verification/sqm-code-verification-view.js +20 -10
  22. package/dist/collection/components/sqm-widget-verification/sqm-code-verification/sqm-code-verification.js +34 -63
  23. package/dist/collection/components/sqm-widget-verification/sqm-code-verification/useCodeVerification.js +38 -29
  24. package/dist/collection/components/sqm-widget-verification/sqm-email-verification/WidgetEmailVerification.stories.js +23 -3
  25. package/dist/collection/components/sqm-widget-verification/sqm-email-verification/sqm-email-verification-view.js +17 -4
  26. package/dist/collection/components/sqm-widget-verification/sqm-email-verification/sqm-email-verification.js +65 -11
  27. package/dist/collection/components/sqm-widget-verification/sqm-email-verification/useEmailVerification.js +77 -21
  28. package/dist/collection/components/sqm-widget-verification/sqm-widget-verification-internal.js +327 -15
  29. package/dist/collection/components/sqm-widget-verification/sqm-widget-verification.js +447 -22
  30. package/dist/collection/components/sqm-widget-verification/useVerificationEmail.js +165 -0
  31. package/dist/collection/components/tax-and-cash/BankingForm.stories.js +1 -0
  32. package/dist/collection/components/tax-and-cash/TaxForm.stories.js +78 -0
  33. package/dist/collection/components/tax-and-cash/sqm-banking-info-form/sqm-banking-info-form.js +2 -1
  34. package/dist/collection/components/tax-and-cash/sqm-banking-info-form/useBankingInfoForm.js +7 -0
  35. package/dist/collection/components/tax-and-cash/sqm-docusign-form/docusign-iframe/DocusignIframe.js +0 -1
  36. package/dist/collection/components/tax-and-cash/sqm-payout-status-alert/PayoutStatusAlert.stories.js +10 -0
  37. package/dist/collection/components/tax-and-cash/sqm-payout-status-alert/sqm-payout-status-alert-view.js +72 -13
  38. package/dist/collection/components/tax-and-cash/sqm-payout-status-alert/sqm-payout-status-alert.js +146 -9
  39. package/dist/collection/components/tax-and-cash/sqm-payout-status-alert/usePayoutStatus.js +30 -15
  40. package/dist/collection/components/tax-and-cash/sqm-tax-and-cash/data.js +6 -0
  41. package/dist/collection/components/tax-and-cash/sqm-tax-and-cash/sqm-tax-and-cash.js +8 -8
  42. package/dist/collection/components/tax-and-cash/sqm-tax-and-cash/useTaxAndCash.js +2 -2
  43. package/dist/collection/components/tax-and-cash/sqm-tax-and-cash-dashboard/sqm-tax-and-cash-dashboard-view.js +22 -16
  44. package/dist/collection/components/tax-and-cash/sqm-tax-and-cash-dashboard/sqm-tax-and-cash-dashboard.js +99 -88
  45. package/dist/collection/components/tax-and-cash/sqm-tax-and-cash-dashboard/useTaxAndCashDashboard.js +8 -1
  46. package/dist/collection/components/tax-and-cash/sqm-user-info-form/sqm-user-info-form-view.js +1 -6
  47. package/dist/collection/components/tax-and-cash/sqm-user-info-form/useUserInfoForm.js +16 -11
  48. package/dist/esm/{ShadowViewAddon-65c8679e.js → ShadowViewAddon-69b61037.js} +6 -3
  49. package/dist/esm/extractProps-ae1afbb3.js +19 -0
  50. package/dist/esm/{keys-a1496e39.js → keys-db1897ae.js} +1 -1
  51. package/dist/esm/loader.js +1 -1
  52. package/dist/esm/mint-components.js +1 -1
  53. package/dist/esm/sqm-banking-info-form_16.entry.js +92 -78
  54. package/dist/esm/sqm-big-stat_39.entry.js +127 -62
  55. package/dist/esm/sqm-code-verification.entry.js +69 -79
  56. package/dist/esm/sqm-email-verification.entry.js +159 -13
  57. package/dist/esm/{sqm-invoice-table-view-08c03ba7.js → sqm-invoice-table-view-d1cfdaf4.js} +79 -0
  58. package/dist/esm/sqm-stencilbook.entry.js +56 -14
  59. package/dist/esm/sqm-widget-verification-internal.entry.js +84 -14
  60. package/dist/esm/sqm-widget-verification.entry.js +104 -21
  61. package/dist/esm/usePayoutStatus-1a635054.js +67 -0
  62. package/dist/esm/useVerificationEmail-c32696ba.js +167 -0
  63. package/dist/esm-es5/ShadowViewAddon-69b61037.js +1 -0
  64. package/dist/esm-es5/extractProps-ae1afbb3.js +1 -0
  65. package/dist/esm-es5/{keys-a1496e39.js → keys-db1897ae.js} +1 -1
  66. package/dist/esm-es5/loader.js +1 -1
  67. package/dist/esm-es5/mint-components.js +1 -1
  68. package/dist/esm-es5/sqm-banking-info-form_16.entry.js +1 -1
  69. package/dist/esm-es5/sqm-big-stat_39.entry.js +1 -1
  70. package/dist/esm-es5/sqm-code-verification.entry.js +1 -1
  71. package/dist/esm-es5/sqm-email-verification.entry.js +1 -1
  72. package/dist/esm-es5/sqm-invoice-table-view-d1cfdaf4.js +1 -0
  73. package/dist/esm-es5/sqm-stencilbook.entry.js +1 -1
  74. package/dist/esm-es5/sqm-widget-verification-internal.entry.js +1 -1
  75. package/dist/esm-es5/sqm-widget-verification.entry.js +1 -1
  76. package/dist/esm-es5/usePayoutStatus-1a635054.js +1 -0
  77. package/dist/esm-es5/useVerificationEmail-c32696ba.js +1 -0
  78. package/dist/mint-components/mint-components.esm.js +1 -1
  79. package/dist/mint-components/p-0e45bc0e.system.entry.js +1 -0
  80. package/dist/mint-components/p-1712a9fd.entry.js +11 -0
  81. package/dist/mint-components/p-1e616d45.system.js +1 -0
  82. package/dist/mint-components/{p-721a89c6.entry.js → p-24092973.entry.js} +2 -2
  83. package/dist/mint-components/p-26468242.js +1 -0
  84. package/dist/mint-components/p-282a7d85.entry.js +195 -0
  85. package/dist/mint-components/p-331d060e.entry.js +223 -0
  86. package/dist/mint-components/p-39840341.js +1 -0
  87. package/dist/mint-components/p-4364001c.entry.js +12 -0
  88. package/dist/mint-components/p-4bd7a472.js +1 -0
  89. package/dist/mint-components/p-517224ef.js +19 -0
  90. package/dist/mint-components/p-5f766d09.entry.js +25 -0
  91. package/dist/mint-components/p-8300d8c8.system.js +1 -0
  92. package/dist/mint-components/p-8bddb468.system.entry.js +1 -0
  93. package/dist/mint-components/p-9596e97c.system.entry.js +1 -0
  94. package/dist/mint-components/p-974070c4.system.entry.js +1 -0
  95. package/dist/mint-components/{p-b651706a.js → p-9eae245f.js} +6 -3
  96. package/dist/mint-components/p-a8645c1b.system.js +1 -0
  97. package/dist/mint-components/p-aabab609.system.entry.js +1 -0
  98. package/dist/mint-components/p-b2a99637.system.js +1 -0
  99. package/dist/mint-components/{p-66a04cca.system.entry.js → p-b62faaa5.system.entry.js} +1 -1
  100. package/dist/mint-components/p-c510fb88.entry.js +1 -0
  101. package/dist/mint-components/p-ca809fdd.system.js +1 -1
  102. package/dist/mint-components/p-d7806f31.js +48 -0
  103. package/dist/mint-components/p-e01ac27c.system.js +1 -0
  104. package/dist/mint-components/p-e45a8501.system.entry.js +1 -0
  105. package/dist/mint-components/p-e990dc21.system.js +1 -0
  106. package/dist/types/components/sqm-payout-button-scroll/PayoutButtonScroll.stories.d.ts +0 -1
  107. package/dist/types/components/sqm-payout-button-scroll/sqm-payout-button-scroll.d.ts +7 -0
  108. package/dist/types/components/sqm-widget-verification/sqm-code-verification/WidgetCodeVerification.stories.d.ts +1 -0
  109. package/dist/types/components/sqm-widget-verification/sqm-code-verification/sqm-code-verification-view.d.ts +3 -3
  110. package/dist/types/components/sqm-widget-verification/sqm-code-verification/sqm-code-verification.d.ts +4 -10
  111. package/dist/types/components/sqm-widget-verification/sqm-code-verification/useCodeVerification.d.ts +2 -0
  112. package/dist/types/components/sqm-widget-verification/sqm-email-verification/WidgetEmailVerification.stories.d.ts +4 -1
  113. package/dist/types/components/sqm-widget-verification/sqm-email-verification/sqm-email-verification-view.d.ts +6 -1
  114. package/dist/types/components/sqm-widget-verification/sqm-email-verification/sqm-email-verification.d.ts +10 -2
  115. package/dist/types/components/sqm-widget-verification/sqm-email-verification/useEmailVerification.d.ts +3 -2
  116. package/dist/types/components/sqm-widget-verification/sqm-widget-verification-internal.d.ts +15 -0
  117. package/dist/types/components/sqm-widget-verification/sqm-widget-verification.d.ts +79 -0
  118. package/dist/types/components/sqm-widget-verification/useVerificationEmail.d.ts +14 -0
  119. package/dist/types/components/tax-and-cash/TaxForm.stories.d.ts +1 -0
  120. package/dist/types/components/tax-and-cash/sqm-banking-info-form/sqm-banking-info-form-view.d.ts +1 -0
  121. package/dist/types/components/tax-and-cash/sqm-payout-status-alert/PayoutStatusAlert.stories.d.ts +2 -0
  122. package/dist/types/components/tax-and-cash/sqm-payout-status-alert/sqm-payout-status-alert-view.d.ts +12 -0
  123. package/dist/types/components/tax-and-cash/sqm-payout-status-alert/sqm-payout-status-alert.d.ts +41 -0
  124. package/dist/types/components/tax-and-cash/sqm-payout-status-alert/usePayoutStatus.d.ts +12 -0
  125. package/dist/types/components/tax-and-cash/sqm-tax-and-cash/data.d.ts +6 -0
  126. package/dist/types/components/tax-and-cash/sqm-tax-and-cash/sqm-tax-and-cash.d.ts +2 -2
  127. package/dist/types/components/tax-and-cash/sqm-tax-and-cash-dashboard/sqm-tax-and-cash-dashboard-view.d.ts +10 -3
  128. package/dist/types/components/tax-and-cash/sqm-tax-and-cash-dashboard/sqm-tax-and-cash-dashboard.d.ts +19 -18
  129. package/dist/types/components.d.ts +366 -92
  130. package/docs/docs.docx +0 -0
  131. package/docs/raisins.json +1 -1
  132. package/grapesjs/grapesjs.js +1 -1
  133. package/package.json +1 -1
  134. package/dist/cjs/useEmailVerification-30a1c7f6.js +0 -75
  135. package/dist/collection/components/sqm-widget-verification/useWidgetVerification.js +0 -3
  136. package/dist/esm/useEmailVerification-7135732c.js +0 -72
  137. package/dist/esm-es5/ShadowViewAddon-65c8679e.js +0 -1
  138. package/dist/esm-es5/sqm-invoice-table-view-08c03ba7.js +0 -1
  139. package/dist/esm-es5/useEmailVerification-7135732c.js +0 -1
  140. package/dist/mint-components/p-117b4705.system.js +0 -1
  141. package/dist/mint-components/p-1bd0cda8.system.entry.js +0 -1
  142. package/dist/mint-components/p-1ee62d9f.system.entry.js +0 -1
  143. package/dist/mint-components/p-1f9a9b70.system.entry.js +0 -1
  144. package/dist/mint-components/p-23fdd44e.entry.js +0 -1
  145. package/dist/mint-components/p-36f7caec.system.entry.js +0 -1
  146. package/dist/mint-components/p-39397731.entry.js +0 -1
  147. package/dist/mint-components/p-39af4acd.entry.js +0 -240
  148. package/dist/mint-components/p-4c9b6fbe.system.js +0 -1
  149. package/dist/mint-components/p-65e2c043.system.js +0 -1
  150. package/dist/mint-components/p-663303b7.entry.js +0 -8
  151. package/dist/mint-components/p-6cae44d7.js +0 -1
  152. package/dist/mint-components/p-7f5c7bf7.system.entry.js +0 -1
  153. package/dist/mint-components/p-8a337864.js +0 -7
  154. package/dist/mint-components/p-a02afa72.system.js +0 -1
  155. package/dist/mint-components/p-a5a9aa07.entry.js +0 -189
  156. package/dist/mint-components/p-c763c0b2.js +0 -1
  157. package/dist/mint-components/p-e93e5740.entry.js +0 -1
  158. package/dist/mint-components/p-e9ca48fc.system.entry.js +0 -1
  159. package/dist/types/components/sqm-widget-verification/useWidgetVerification.d.ts +0 -1
@@ -16,8 +16,10 @@ const useChildElements = require('./useChildElements-410d2435.js');
16
16
  const luxon = require('./luxon-05098e19.js');
17
17
  const useReferralTable = require('./useReferralTable-824ac152.js');
18
18
  const utils = require('./utils-6847bc06.js');
19
- const sqmInvoiceTableView = require('./sqm-invoice-table-view-ce9a34ac.js');
19
+ const sqmInvoiceTableView = require('./sqm-invoice-table-view-c58966f8.js');
20
20
  const keys = require('./keys-cff24974.js');
21
+ const usePayoutStatus = require('./usePayoutStatus-b9fb7399.js');
22
+ const extractProps = require('./extractProps-fd93ba62.js');
21
23
 
22
24
  const TAX_CONTEXT_NAMESPACE = "sq:tax-and-cash";
23
25
  const TAX_FORM_CONTEXT_NAMESPACE = "sq:tax-form-context";
@@ -39,6 +41,11 @@ const GET_USER = index_module.dist.gql `
39
41
  email
40
42
  countryCode
41
43
  customFields
44
+ managedIdentity {
45
+ uid
46
+ email
47
+ emailVerified
48
+ }
42
49
  impactConnection {
43
50
  connected
44
51
  user {
@@ -82,6 +89,7 @@ const GET_USER = index_module.dist.gql `
82
89
  }
83
90
  payoutsAccount {
84
91
  hold
92
+ holdReasons
85
93
  balance
86
94
  }
87
95
  }
@@ -1182,6 +1190,12 @@ function useBankingInfoForm(props) {
1182
1190
  }
1183
1191
  await runMutation(formData, token);
1184
1192
  };
1193
+ const onVerification = async (token) => {
1194
+ host.dispatchEvent(new CustomEvent(keys.VERIFICATION_EVENT_KEY, {
1195
+ detail: { token },
1196
+ bubbles: false,
1197
+ }));
1198
+ };
1185
1199
  function setPaymentMethodChecked(paymentMethod) {
1186
1200
  _setPaymentMethodChecked(paymentMethod);
1187
1201
  if (paymentMethod === "toPayPalAccount") {
@@ -1206,6 +1220,7 @@ function useBankingInfoForm(props) {
1206
1220
  setPaymentScheduleChecked,
1207
1221
  onBack: () => setStep("/dashboard"),
1208
1222
  setCountrySearch,
1223
+ onVerification,
1209
1224
  },
1210
1225
  states: {
1211
1226
  showVerification,
@@ -1545,7 +1560,7 @@ const BankingInfoForm = class {
1545
1560
  },
1546
1561
  };
1547
1562
  if (props.states.isPartner && props.states.showVerification) {
1548
- return index.h("sqm-code-verification", null);
1563
+ return (index.h("sqm-code-verification", { onVerification: props.callbacks.onVerification }));
1549
1564
  }
1550
1565
  return (index.h(index.Host, null, index.h(BankingInfoFormView, { callbacks: props.callbacks, text: props.text, states: props.states, refs: props.refs, slots: {
1551
1566
  formInputsSlot: inputFields === null || inputFields === void 0 ? void 0 : inputFields.map(({ input }) => input),
@@ -1679,6 +1694,7 @@ function useDemoBankingInfoForm(props) {
1679
1694
  setPaymentScheduleChecked,
1680
1695
  setCountrySearch: () => { },
1681
1696
  onBack: async () => setStep("/dashboard"),
1697
+ onVerification: () => { },
1682
1698
  },
1683
1699
  text: props.getTextProps(),
1684
1700
  refs: {
@@ -1920,7 +1936,6 @@ const DocusignIframe = ({ states, data, callbacks, text, }) => {
1920
1936
  const allowed = allowedDomains.some((d) => { var _a; return (_a = e.origin) === null || _a === void 0 ? void 0 : _a.includes(d); });
1921
1937
  if (!allowed)
1922
1938
  return;
1923
- console.log(e);
1924
1939
  if (typeof e.data === "number") {
1925
1940
  setiFrameHeight(e.data + "px");
1926
1941
  }
@@ -3779,27 +3794,9 @@ const TableRow = class {
3779
3794
  }
3780
3795
  };
3781
3796
 
3782
- /**
3783
- * Util function for getting just the props with a certain prefix.
3784
- * @param props Text props on stencil component
3785
- * @param prefix Prefix denoting which group the text prop belongs to
3786
- * @returns A new object with all keys with the prefix provided. The prefix is removed from each key.
3787
- */
3788
- function extractProps(props, prefix) {
3789
- const keys = Object.keys(props).filter((k) => k.startsWith(prefix));
3790
- const formattedProps = keys.reduce((prev, k) => {
3791
- const key = k.replace(prefix, "");
3792
- return {
3793
- ...prev,
3794
- [key]: props[k],
3795
- };
3796
- }, {});
3797
- return formattedProps;
3798
- }
3799
-
3800
3797
  function getCurrentStep(user) {
3801
- var _a;
3802
- if (!((_a = user.impactConnection) === null || _a === void 0 ? void 0 : _a.connected)) {
3798
+ var _a, _b;
3799
+ if (!((_a = user.impactConnection) === null || _a === void 0 ? void 0 : _a.connected) || !((_b = user.impactConnection) === null || _b === void 0 ? void 0 : _b.publisher)) {
3803
3800
  return "/1";
3804
3801
  }
3805
3802
  const { requiredTaxDocumentType, currentTaxDocument, withdrawalSettings, brandedSignup, } = user.impactConnection.publisher;
@@ -4693,14 +4690,14 @@ const TaxAndCashMonolith = class {
4693
4690
  * @uiGroup Dashboard Properties
4694
4691
  * @uiWidget textArea
4695
4692
  */
4696
- this.dashboard_errorTitleText = "Your payout is on hold ";
4693
+ this.payoutHoldAlertHeader = "Your payout is on hold";
4697
4694
  /**
4698
4695
  * Part of the alert displayed at the top of the page when there’s been an issue preventing payouts.
4699
4696
  * @uiName Payout error message description
4700
4697
  * @uiGroup Dashboard Properties
4701
4698
  * @uiWidget textArea
4702
4699
  */
4703
- this.dashboard_errorDescriptionText = "If you’ve recently added your payout information, please wait while we verify your information. If it’s still on hold after a few days, please contact Support or check your inbox for an email from our referral program provider, impact.com.";
4700
+ this.payoutHoldAlertDescription = "Please contact Support or check your inbox for an email from our referral program provider, impact.com.";
4704
4701
  /**
4705
4702
  * Text displayed for existing publishers that do not have saved banking information.
4706
4703
  * @uiName Payout missing information subtext
@@ -4850,7 +4847,7 @@ const TaxAndCashMonolith = class {
4850
4847
  getGeneralStepTextProps(prefix) {
4851
4848
  const props = utils.getProps(this);
4852
4849
  return {
4853
- ...extractProps(props, prefix),
4850
+ ...extractProps.extractProps(props, prefix),
4854
4851
  generalErrorTitle: props.generalErrorTitle,
4855
4852
  generalErrorDescription: props.generalErrorDescription,
4856
4853
  fieldRequiredError: props.fieldRequiredError,
@@ -4915,6 +4912,12 @@ const style$5 = {
4915
4912
  borderTop: "none",
4916
4913
  },
4917
4914
  },
4915
+ HoldAlertContainer: {
4916
+ "&::part(base)": {
4917
+ border: "none",
4918
+ backgroundColor: "transparent",
4919
+ },
4920
+ },
4918
4921
  ExpiringSoonAlertContainer: {
4919
4922
  "&::part(base)": {
4920
4923
  backgroundColor: "var(--sl-color-yellow-100)",
@@ -5154,22 +5157,22 @@ const TaxAndCashDashboardView = (props) => {
5154
5157
  index.h("strong", null, text.error.generalTitle),
5155
5158
  index.h("br", null),
5156
5159
  text.error.generalDescription)),
5157
- states.identiyRequired && (index.h("div", null,
5158
- index.h("sl-alert", { exportparts: "base: alert-base, icon:alert-icon", type: "warning", open: true, class: sheet$4.classes.ExpiringSoonAlertContainer },
5159
- index.h("sl-icon", { slot: "icon", name: "exclamation-triangle" }),
5160
- index.h("strong", null, text.verifyIdentityAlertHeader),
5161
- index.h("br", null),
5162
- text.verifyIdentityAlertMessage,
5163
- index.h("br", null),
5164
- index.h("sl-button", null, text.verifyIdentityButton)))),
5165
- index.h("sl-dialog", {
5166
- // AL: todo plugin open dialog
5167
- label: " verify Identity iframe", class: sheet$4.classes.Dialog, open: states.showIdentityVerificationDialog },
5168
- index.h("div", { style: {
5169
- width: "420px",
5170
- height: "420px",
5171
- border: "1px dotted black",
5172
- } })),
5160
+ states.hasHold && (index.h("sl-alert", { exportparts: "base: alert-base, icon:alert-icon", type: "warning", open: true, class: sheet$4.classes.HoldAlertContainer },
5161
+ index.h("sl-icon", { slot: "icon", name: "exclamation-triangle" }),
5162
+ index.h("strong", null, text.payoutHoldAlertHeader),
5163
+ index.h("br", null),
5164
+ text.payoutHoldAlertDescription)),
5165
+ states.payoutStatus === "VERIFICATION_NEEDED" && (index.h("sl-alert", { exportparts: "base: alert-base, icon:alert-icon", type: "warning", open: true, class: sheet$4.classes.HoldAlertContainer },
5166
+ index.h("sl-icon", { slot: "icon", name: "exclamation-triangle" }),
5167
+ index.h("strong", null, text.verificationRequiredHeader),
5168
+ index.h("p", { style: { margin: "0" } }, text.verificationRequiredDescription),
5169
+ index.h("sl-button", { style: { marginTop: "var(--sl-spacing-x-small)" }, type: "default", loading: states.loading,
5170
+ //AL: TODO hooks
5171
+ onClick: () => callbacks.onClick }, text.verificationRequiredButtonText))),
5172
+ index.h("sl-dialog", { noDismiss: true, class: sheet$4.classes.Dialog, open: states.showVerifyIdentity, "onSl-hide": callbacks.onVerifyIdentityCancel },
5173
+ index.h("iframe", {
5174
+ // AL: TODO replace iframe URL with verification url when available
5175
+ scrolling: "yes", frameBorder: "0", width: "100%", height: "100%", src: "https://impacttech.complytaxforms.com/ServiceRedirect.aspx?Language=eng&Param1=UxBORV4bOIrqNb4gbpNmtvW3wjdZJyx4gPElIGMJNR8=&UUID=B576EA3E-80FD-4D85-AA59-653D23A7CCE8" })),
5173
5176
  index.h("sl-dialog", { label: text.replaceTaxFormModalHeader, class: sheet$4.classes.Dialog, open: states.showNewFormDialog, "onSl-hide": callbacks.onNewFormCancel },
5174
5177
  index.h("p", null, text.replaceTaxFormModalBodyText),
5175
5178
  index.h("sl-button", { slot: "footer", type: "primary", class: sheet$4.classes.DialogButton, onClick: callbacks.onNewFormClick }, text.newFormButton),
@@ -5275,10 +5278,11 @@ function getIndirectTaxType(taxInformation) {
5275
5278
  return "Indirect Tax";
5276
5279
  }
5277
5280
  const useTaxAndCashDashboard = (props) => {
5278
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
5281
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
5279
5282
  const setStep = index_module.Sn(TAX_CONTEXT_NAMESPACE);
5280
5283
  const setContext = index_module.Sn(TAX_FORM_CONTEXT_NAMESPACE);
5281
5284
  const [showDialog, setShowDialog] = stencilHooks_module.useState(false);
5285
+ const [showVerification, setShowVerification] = stencilHooks_module.useState(false);
5282
5286
  const locale = index_module.Q();
5283
5287
  stencilHooks_module.useEffect(() => {
5284
5288
  // Clear override context once on submitted
@@ -5309,6 +5313,7 @@ const useTaxAndCashDashboard = (props) => {
5309
5313
  setStep("/3");
5310
5314
  };
5311
5315
  const provinceName = (_d = sqmInvoiceTableView.INDIRECT_TAX_PROVINCES.find((p) => { var _a; return p.regionCode === ((_a = publisher === null || publisher === void 0 ? void 0 : publisher.taxInformation) === null || _a === void 0 ? void 0 : _a.indirectTaxRegion); })) === null || _d === void 0 ? void 0 : _d.displayName;
5316
+ const payoutStatus = usePayoutStatus.getStatus(data);
5312
5317
  return {
5313
5318
  states: {
5314
5319
  dateSubmitted,
@@ -5330,12 +5335,16 @@ const useTaxAndCashDashboard = (props) => {
5330
5335
  loading,
5331
5336
  loadingError: !!(userError === null || userError === void 0 ? void 0 : userError.message),
5332
5337
  showNewFormDialog: showDialog,
5338
+ hasHold: !!((_m = publisher === null || publisher === void 0 ? void 0 : publisher.payoutsAccount) === null || _m === void 0 ? void 0 : _m.hold),
5339
+ payoutStatus,
5340
+ showVerifyIdentity: showVerification,
5333
5341
  },
5334
5342
  callbacks: {
5335
5343
  onClick: () => setShowDialog(true),
5336
5344
  onEditPayoutInfo,
5337
5345
  onNewFormCancel: () => setShowDialog(false),
5338
5346
  onNewFormClick,
5347
+ onVerifyIdentityCancel: () => setShowVerification(false),
5339
5348
  },
5340
5349
  text: props.getTextProps(),
5341
5350
  };
@@ -5403,18 +5412,6 @@ const TaxAndCashDashboard = class {
5403
5412
  * @uiName Inactive W-8 error message description
5404
5413
  */
5405
5414
  this.taxAlertNotActiveMessageW8 = "Your tax form may have expired or has personal information that doesn’t match your profile. Please submit a new {documentType} form.";
5406
- /**
5407
- * Part of the alert displayed at the top of the page.
5408
- *
5409
- * @uiName Verify identity warning message header
5410
- */
5411
- this.verifyIdentityAlertHeader = "Verify your identity";
5412
- /**
5413
- * Part of the alert displayed at the top of the page.
5414
- *
5415
- * @uiName Verify identity warning message description
5416
- */
5417
- this.verifyIdentityAlertMessage = "Complete your verification to start receiving your cash rewards. It should only take a few minutes verify.";
5418
5415
  /**
5419
5416
  * Additional text displayed next to the tax form's status badge.
5420
5417
  *
@@ -5519,18 +5516,35 @@ const TaxAndCashDashboard = class {
5519
5516
  * @uiName Payout error message title
5520
5517
  * @uiWidget textArea
5521
5518
  */
5522
- this.errorTitleText = "Your payout is on hold ";
5519
+ this.payoutHoldAlertHeader = "Your payout is on hold";
5523
5520
  /**
5524
5521
  * Part of the alert displayed at the top of the page when there’s been an issue preventing payouts.
5525
5522
  * @uiName Payout error message description
5526
5523
  * @uiWidget textArea
5527
5524
  */
5528
- this.errorDescriptionText = "If you’ve recently added your payout information, please wait while we verify your information. If it’s still on hold after a few days, please contact Support or check your inbox for an email from our referral program provider, impact.com.";
5525
+ this.payoutHoldAlertDescription = "Please contact Support or check your inbox for an email from our referral program provider, impact.com.";
5529
5526
  /**
5530
5527
  * Text displayed for existing publishers that do not have saved banking information.
5531
5528
  * @uiName Payout missing information subtext
5532
5529
  */
5533
5530
  this.payoutMissingInformationText = "Missing banking information, go to Impact.com to resolve.";
5531
+ /**
5532
+ * Part of the alert displayed at the top of the page when the user needs to verify their identity.
5533
+ * @uiName Verification required alert message title
5534
+ * @uiWidget textArea
5535
+ */
5536
+ this.verificationRequiredHeader = "Verify your identity";
5537
+ /**
5538
+ * Part of the alert displayed at the top of the page when the user needs to verify their identity
5539
+ * @uiName Verification required alert message description
5540
+ * @uiWidget textArea
5541
+ */
5542
+ this.verificationRequiredDescription = "Complete your verification to start receiving your cash rewards. It should only take a few minutes verify.";
5543
+ /**
5544
+ * Part of the alert displayed at the top of the page when the user needs to verify their identity.
5545
+ * @uiName Verification required alert button text
5546
+ */
5547
+ this.verificationRequiredButtonText = "Start Verification";
5534
5548
  /**
5535
5549
  * Part of the alert displayed at the top of the page.
5536
5550
  * @uiName Form submission error message title
@@ -5615,10 +5629,6 @@ const TaxAndCashDashboard = class {
5615
5629
  * @uiName Cancel button label
5616
5630
  */
5617
5631
  this.cancelButton = "Cancel";
5618
- /**
5619
- * @uiName Verify button label
5620
- */
5621
- this.verifyIdentityButton = "Start Verification";
5622
5632
  stencilHooks_module.h$1(this);
5623
5633
  }
5624
5634
  disconnectedCallback() { }
@@ -5657,12 +5667,16 @@ function useDemoTaxAndCashDashboard(props) {
5657
5667
  disabled: false,
5658
5668
  loading: false,
5659
5669
  showNewFormDialog: false,
5670
+ hasHold: false,
5671
+ showVerifyIdentity: false,
5672
+ payoutStatus: "DONE",
5660
5673
  },
5661
5674
  callbacks: {
5662
5675
  onClick: () => console.debug("check step"),
5663
5676
  onEditPayoutInfo: () => console.debug("payout info"),
5664
5677
  onNewFormCancel: () => console.log("hide"),
5665
5678
  onNewFormClick: () => console.log("show"),
5679
+ onVerifyIdentityCancel: () => console.log("hide"),
5666
5680
  },
5667
5681
  text: props.getTextProps(),
5668
5682
  }, props.demoData || {}, { arrayMerge: (_, a) => a });
@@ -6719,7 +6733,6 @@ const style$6 = {
6719
6733
  },
6720
6734
  PhoneInputsSection: {
6721
6735
  display: "flex",
6722
- alignItems: "flex-end",
6723
6736
  flexDirection: "column",
6724
6737
  gap: "4px",
6725
6738
  "& p": {
@@ -6730,7 +6743,6 @@ const style$6 = {
6730
6743
  },
6731
6744
  PhoneInputsContainer: {
6732
6745
  display: "flex",
6733
- alignItems: "flex-end",
6734
6746
  gap: "4px",
6735
6747
  width: "100%",
6736
6748
  "& #phoneNumber": {
@@ -6871,10 +6883,7 @@ const UserInfoFormView = (props) => {
6871
6883
  index.h("div", { slot: "prefix" }, `${(_a = PHONE_EXTENSIONS[c.countryCode]) === null || _a === void 0 ? void 0 : _a.name} `), (_b = PHONE_EXTENSIONS[c.countryCode]) === null || _b === void 0 ? void 0 :
6872
6884
  _b.dial_code));
6873
6885
  })),
6874
- index.h("sl-input", Object.assign({ exportparts: "label: input-label, base: input-base", id: "phoneNumber", name: "/phoneNumber", value: formState.phoneNumber, validationError: ({ value }) =>
6875
- // Naive phone number validation
6876
- sqmInvoiceTableView.validateBillingField(/[a-zA-Z]+/, value) &&
6877
- sqmInvoiceTableView.formatErrorMessage(text.phoneNumber, text.error.fieldInvalidError), disabled: states.disabled || states.isPartner }, (((_k = formState.errors) === null || _k === void 0 ? void 0 : _k.phoneNumber) ? {
6886
+ index.h("sl-input", Object.assign({ exportparts: "label: input-label, base: input-base", id: "phoneNumber", name: "/phoneNumber", value: formState.phoneNumber, validationError: true, disabled: states.disabled || states.isPartner }, (((_k = formState.errors) === null || _k === void 0 ? void 0 : _k.phoneNumber) ? {
6878
6887
  class: classes.ErrorInput,
6879
6888
  helpText: sqmInvoiceTableView.formatErrorMessage(text.phoneNumber, formState.errors.phoneNumber),
6880
6889
  }
@@ -6952,17 +6961,20 @@ function useUserInfoForm(props) {
6952
6961
  const [filteredCurrencies, setFilteredCurrencies] = stencilHooks_module.useState(currencies || []);
6953
6962
  const [formErrors, setErrors] = stencilHooks_module.useState({});
6954
6963
  stencilHooks_module.useEffect(() => {
6955
- var _a, _b, _c, _d, _e, _f, _g, _h, _j;
6964
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
6956
6965
  const user = data === null || data === void 0 ? void 0 : data.user;
6957
6966
  if (!user || step !== "/1")
6958
6967
  return;
6959
6968
  // If form already filled out, skip initialising it
6960
6969
  if (sqmInvoiceTableView.objectIsFull(userFormContext))
6961
6970
  return;
6962
- if (((_a = user.impactConnection) === null || _a === void 0 ? void 0 : _a.publisher) && ((_b = user.impactConnection) === null || _b === void 0 ? void 0 : _b.user)) {
6971
+ // Prefer MI email if it was verified before this
6972
+ const email = ((_a = user.managedIdentity) === null || _a === void 0 ? void 0 : _a.emailVerified) ? user.managedIdentity.email
6973
+ : user.email;
6974
+ if (((_b = user.impactConnection) === null || _b === void 0 ? void 0 : _b.publisher) && ((_c = user.impactConnection) === null || _c === void 0 ? void 0 : _c.user)) {
6963
6975
  // Initialise with partner information
6964
6976
  setUserFormContext({
6965
- email: user.email,
6977
+ email,
6966
6978
  firstName: user.impactConnection.user.firstName,
6967
6979
  lastName: user.impactConnection.user.lastName,
6968
6980
  countryCode: user.impactConnection.publisher.countryCode,
@@ -6978,17 +6990,17 @@ function useUserInfoForm(props) {
6978
6990
  else if (!(userFormContext === null || userFormContext === void 0 ? void 0 : userFormContext.email)) {
6979
6991
  // Initialise with user information
6980
6992
  setUserFormContext({
6981
- email: user.email,
6993
+ email,
6982
6994
  firstName: user.firstName,
6983
6995
  lastName: user.lastName,
6984
6996
  countryCode: user.countryCode || "US",
6985
- currency: (_c = user.customFields) === null || _c === void 0 ? void 0 : _c.currency,
6986
- phoneNumberCountryCode: ((_d = user.customFields) === null || _d === void 0 ? void 0 : _d.phoneNumberCountryCode) || "US",
6987
- phoneNumber: (_e = user.customFields) === null || _e === void 0 ? void 0 : _e.phoneNumber,
6988
- address: (_f = user.customFields) === null || _f === void 0 ? void 0 : _f.address,
6989
- city: (_g = user.customFields) === null || _g === void 0 ? void 0 : _g.city,
6990
- state: (_h = user.customFields) === null || _h === void 0 ? void 0 : _h.state,
6991
- postalCode: (_j = user.customFields) === null || _j === void 0 ? void 0 : _j.postalCode,
6997
+ currency: (_d = user.customFields) === null || _d === void 0 ? void 0 : _d.currency,
6998
+ phoneNumberCountryCode: ((_e = user.customFields) === null || _e === void 0 ? void 0 : _e.phoneNumberCountryCode) || "US",
6999
+ phoneNumber: (_f = user.customFields) === null || _f === void 0 ? void 0 : _f.phoneNumber,
7000
+ address: (_g = user.customFields) === null || _g === void 0 ? void 0 : _g.address,
7001
+ city: (_h = user.customFields) === null || _h === void 0 ? void 0 : _h.city,
7002
+ state: (_j = user.customFields) === null || _j === void 0 ? void 0 : _j.state,
7003
+ postalCode: (_k = user.customFields) === null || _k === void 0 ? void 0 : _k.postalCode,
6992
7004
  });
6993
7005
  }
6994
7006
  }, [data, step, userFormContext]);
@@ -7067,6 +7079,8 @@ function useUserInfoForm(props) {
7067
7079
  const { allowBankingCollection, ...userData } = formData;
7068
7080
  setUserFormContext({
7069
7081
  ...userFormContext,
7082
+ firstName: userData.firstName,
7083
+ lastName: userData.lastName,
7070
7084
  phoneNumberCountryCode: userData.phoneNumberCountryCode,
7071
7085
  phoneNumber: userData.phoneNumber,
7072
7086
  countryCode: userData.countryCode,