@saasquatch/mint-components 1.12.0-0 → 1.12.0-10

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 (158) 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 +91 -72
  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 +76 -20
  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/useUserInfoForm.js +16 -11
  47. package/dist/esm/{ShadowViewAddon-65c8679e.js → ShadowViewAddon-69b61037.js} +6 -3
  48. package/dist/esm/extractProps-ae1afbb3.js +19 -0
  49. package/dist/esm/{keys-a1496e39.js → keys-db1897ae.js} +1 -1
  50. package/dist/esm/loader.js +1 -1
  51. package/dist/esm/mint-components.js +1 -1
  52. package/dist/esm/sqm-banking-info-form_16.entry.js +91 -72
  53. package/dist/esm/sqm-big-stat_39.entry.js +127 -62
  54. package/dist/esm/sqm-code-verification.entry.js +69 -79
  55. package/dist/esm/sqm-email-verification.entry.js +159 -13
  56. package/dist/esm/{sqm-invoice-table-view-08c03ba7.js → sqm-invoice-table-view-d1cfdaf4.js} +79 -0
  57. package/dist/esm/sqm-stencilbook.entry.js +56 -14
  58. package/dist/esm/sqm-widget-verification-internal.entry.js +84 -14
  59. package/dist/esm/sqm-widget-verification.entry.js +104 -21
  60. package/dist/esm/usePayoutStatus-1a635054.js +67 -0
  61. package/dist/esm/useVerificationEmail-c32696ba.js +167 -0
  62. package/dist/esm-es5/ShadowViewAddon-69b61037.js +1 -0
  63. package/dist/esm-es5/extractProps-ae1afbb3.js +1 -0
  64. package/dist/esm-es5/{keys-a1496e39.js → keys-db1897ae.js} +1 -1
  65. package/dist/esm-es5/loader.js +1 -1
  66. package/dist/esm-es5/mint-components.js +1 -1
  67. package/dist/esm-es5/sqm-banking-info-form_16.entry.js +1 -1
  68. package/dist/esm-es5/sqm-big-stat_39.entry.js +1 -1
  69. package/dist/esm-es5/sqm-code-verification.entry.js +1 -1
  70. package/dist/esm-es5/sqm-email-verification.entry.js +1 -1
  71. package/dist/esm-es5/sqm-invoice-table-view-d1cfdaf4.js +1 -0
  72. package/dist/esm-es5/sqm-stencilbook.entry.js +1 -1
  73. package/dist/esm-es5/sqm-widget-verification-internal.entry.js +1 -1
  74. package/dist/esm-es5/sqm-widget-verification.entry.js +1 -1
  75. package/dist/esm-es5/usePayoutStatus-1a635054.js +1 -0
  76. package/dist/esm-es5/useVerificationEmail-c32696ba.js +1 -0
  77. package/dist/mint-components/mint-components.esm.js +1 -1
  78. package/dist/mint-components/p-15c7a1d2.system.entry.js +1 -0
  79. package/dist/mint-components/p-1712a9fd.entry.js +11 -0
  80. package/dist/mint-components/p-1e616d45.system.js +1 -0
  81. package/dist/mint-components/{p-721a89c6.entry.js → p-24092973.entry.js} +2 -2
  82. package/dist/mint-components/p-26468242.js +1 -0
  83. package/dist/mint-components/p-331d060e.entry.js +223 -0
  84. package/dist/mint-components/p-39840341.js +1 -0
  85. package/dist/mint-components/p-4364001c.entry.js +12 -0
  86. package/dist/mint-components/p-4bd7a472.js +1 -0
  87. package/dist/mint-components/p-517224ef.js +19 -0
  88. package/dist/mint-components/p-5a23b560.system.entry.js +1 -0
  89. package/dist/mint-components/p-8300d8c8.system.js +1 -0
  90. package/dist/mint-components/p-8bddb468.system.entry.js +1 -0
  91. package/dist/mint-components/p-9596e97c.system.entry.js +1 -0
  92. package/dist/mint-components/p-974070c4.system.entry.js +1 -0
  93. package/dist/mint-components/{p-b651706a.js → p-9eae245f.js} +6 -3
  94. package/dist/mint-components/p-a8645c1b.system.js +1 -0
  95. package/dist/mint-components/p-b2a99637.system.js +1 -0
  96. package/dist/mint-components/{p-66a04cca.system.entry.js → p-b62faaa5.system.entry.js} +1 -1
  97. package/dist/mint-components/p-c41e1df8.entry.js +195 -0
  98. package/dist/mint-components/p-c510fb88.entry.js +1 -0
  99. package/dist/mint-components/p-ca809fdd.system.js +1 -1
  100. package/dist/mint-components/p-d7806f31.js +48 -0
  101. package/dist/mint-components/p-e01ac27c.system.js +1 -0
  102. package/dist/mint-components/p-e45a8501.system.entry.js +1 -0
  103. package/dist/mint-components/p-e990dc21.system.js +1 -0
  104. package/dist/mint-components/p-f340214f.entry.js +25 -0
  105. package/dist/types/components/sqm-payout-button-scroll/PayoutButtonScroll.stories.d.ts +0 -1
  106. package/dist/types/components/sqm-payout-button-scroll/sqm-payout-button-scroll.d.ts +7 -0
  107. package/dist/types/components/sqm-widget-verification/sqm-code-verification/WidgetCodeVerification.stories.d.ts +1 -0
  108. package/dist/types/components/sqm-widget-verification/sqm-code-verification/sqm-code-verification-view.d.ts +3 -3
  109. package/dist/types/components/sqm-widget-verification/sqm-code-verification/sqm-code-verification.d.ts +4 -10
  110. package/dist/types/components/sqm-widget-verification/sqm-code-verification/useCodeVerification.d.ts +2 -0
  111. package/dist/types/components/sqm-widget-verification/sqm-email-verification/WidgetEmailVerification.stories.d.ts +4 -1
  112. package/dist/types/components/sqm-widget-verification/sqm-email-verification/sqm-email-verification-view.d.ts +6 -1
  113. package/dist/types/components/sqm-widget-verification/sqm-email-verification/sqm-email-verification.d.ts +10 -2
  114. package/dist/types/components/sqm-widget-verification/sqm-email-verification/useEmailVerification.d.ts +3 -2
  115. package/dist/types/components/sqm-widget-verification/sqm-widget-verification-internal.d.ts +15 -0
  116. package/dist/types/components/sqm-widget-verification/sqm-widget-verification.d.ts +79 -0
  117. package/dist/types/components/sqm-widget-verification/useVerificationEmail.d.ts +14 -0
  118. package/dist/types/components/tax-and-cash/TaxForm.stories.d.ts +1 -0
  119. package/dist/types/components/tax-and-cash/sqm-banking-info-form/sqm-banking-info-form-view.d.ts +1 -0
  120. package/dist/types/components/tax-and-cash/sqm-payout-status-alert/PayoutStatusAlert.stories.d.ts +2 -0
  121. package/dist/types/components/tax-and-cash/sqm-payout-status-alert/sqm-payout-status-alert-view.d.ts +12 -0
  122. package/dist/types/components/tax-and-cash/sqm-payout-status-alert/sqm-payout-status-alert.d.ts +41 -0
  123. package/dist/types/components/tax-and-cash/sqm-payout-status-alert/usePayoutStatus.d.ts +12 -0
  124. package/dist/types/components/tax-and-cash/sqm-tax-and-cash/data.d.ts +6 -0
  125. package/dist/types/components/tax-and-cash/sqm-tax-and-cash/sqm-tax-and-cash.d.ts +2 -2
  126. package/dist/types/components/tax-and-cash/sqm-tax-and-cash-dashboard/sqm-tax-and-cash-dashboard-view.d.ts +10 -3
  127. package/dist/types/components/tax-and-cash/sqm-tax-and-cash-dashboard/sqm-tax-and-cash-dashboard.d.ts +19 -18
  128. package/dist/types/components.d.ts +366 -92
  129. package/docs/docs.docx +0 -0
  130. package/docs/raisins.json +1 -1
  131. package/grapesjs/grapesjs.js +1 -1
  132. package/package.json +1 -1
  133. package/dist/cjs/useEmailVerification-30a1c7f6.js +0 -75
  134. package/dist/collection/components/sqm-widget-verification/useWidgetVerification.js +0 -3
  135. package/dist/esm/useEmailVerification-7135732c.js +0 -72
  136. package/dist/esm-es5/ShadowViewAddon-65c8679e.js +0 -1
  137. package/dist/esm-es5/sqm-invoice-table-view-08c03ba7.js +0 -1
  138. package/dist/esm-es5/useEmailVerification-7135732c.js +0 -1
  139. package/dist/mint-components/p-117b4705.system.js +0 -1
  140. package/dist/mint-components/p-1bd0cda8.system.entry.js +0 -1
  141. package/dist/mint-components/p-1ee62d9f.system.entry.js +0 -1
  142. package/dist/mint-components/p-1f9a9b70.system.entry.js +0 -1
  143. package/dist/mint-components/p-23fdd44e.entry.js +0 -1
  144. package/dist/mint-components/p-36f7caec.system.entry.js +0 -1
  145. package/dist/mint-components/p-39397731.entry.js +0 -1
  146. package/dist/mint-components/p-39af4acd.entry.js +0 -240
  147. package/dist/mint-components/p-4c9b6fbe.system.js +0 -1
  148. package/dist/mint-components/p-65e2c043.system.js +0 -1
  149. package/dist/mint-components/p-663303b7.entry.js +0 -8
  150. package/dist/mint-components/p-6cae44d7.js +0 -1
  151. package/dist/mint-components/p-7f5c7bf7.system.entry.js +0 -1
  152. package/dist/mint-components/p-8a337864.js +0 -7
  153. package/dist/mint-components/p-a02afa72.system.js +0 -1
  154. package/dist/mint-components/p-a5a9aa07.entry.js +0 -189
  155. package/dist/mint-components/p-c763c0b2.js +0 -1
  156. package/dist/mint-components/p-e93e5740.entry.js +0 -1
  157. package/dist/mint-components/p-e9ca48fc.system.entry.js +0 -1
  158. package/dist/types/components/sqm-widget-verification/useWidgetVerification.d.ts +0 -1
@@ -12,8 +12,10 @@ import { u as useChildElements } from './useChildElements-fc84e640.js';
12
12
  import { l as luxon } from './luxon-7600be8d.js';
13
13
  import { g as generateUserError } from './useReferralTable-f6ffa103.js';
14
14
  import { g as getProps, l as luxonLocale } from './utils-334c1e34.js';
15
- import { t as taxTypeToName, v as validTaxDocument, a as INDIRECT_TAX_SPAIN_REGIONS, b as INDIRECT_TAX_PROVINCES, g as getCountryObj, O as OtherRegionSlotView, I as InvoiceTableView, E as ErrorView, L as LoadingView, c as vatLabels, G as GeneralLoadingView, f as formatErrorMessage, d as validateBillingField, o as objectIsFull, A as ADDRESS_REGIONS } from './sqm-invoice-table-view-08c03ba7.js';
16
- import { V as VERIFICATION_EVENT_KEY } from './keys-a1496e39.js';
15
+ import { t as taxTypeToName, v as validTaxDocument, a as INDIRECT_TAX_SPAIN_REGIONS, b as INDIRECT_TAX_PROVINCES, g as getCountryObj, O as OtherRegionSlotView, I as InvoiceTableView, E as ErrorView, L as LoadingView, c as vatLabels, G as GeneralLoadingView, f as formatErrorMessage, d as validateBillingField, o as objectIsFull, A as ADDRESS_REGIONS } from './sqm-invoice-table-view-d1cfdaf4.js';
16
+ import { b as VERIFICATION_EVENT_KEY } from './keys-db1897ae.js';
17
+ import { g as getStatus } from './usePayoutStatus-1a635054.js';
18
+ import { e as extractProps } from './extractProps-ae1afbb3.js';
17
19
 
18
20
  const TAX_CONTEXT_NAMESPACE = "sq:tax-and-cash";
19
21
  const TAX_FORM_CONTEXT_NAMESPACE = "sq:tax-form-context";
@@ -35,6 +37,11 @@ const GET_USER = dist.gql `
35
37
  email
36
38
  countryCode
37
39
  customFields
40
+ managedIdentity {
41
+ uid
42
+ email
43
+ emailVerified
44
+ }
38
45
  impactConnection {
39
46
  connected
40
47
  user {
@@ -78,6 +85,7 @@ const GET_USER = dist.gql `
78
85
  }
79
86
  payoutsAccount {
80
87
  hold
88
+ holdReasons
81
89
  balance
82
90
  }
83
91
  }
@@ -1178,6 +1186,12 @@ function useBankingInfoForm(props) {
1178
1186
  }
1179
1187
  await runMutation(formData, token);
1180
1188
  };
1189
+ const onVerification = async (token) => {
1190
+ host.dispatchEvent(new CustomEvent(VERIFICATION_EVENT_KEY, {
1191
+ detail: { token },
1192
+ bubbles: false,
1193
+ }));
1194
+ };
1181
1195
  function setPaymentMethodChecked(paymentMethod) {
1182
1196
  _setPaymentMethodChecked(paymentMethod);
1183
1197
  if (paymentMethod === "toPayPalAccount") {
@@ -1202,6 +1216,7 @@ function useBankingInfoForm(props) {
1202
1216
  setPaymentScheduleChecked,
1203
1217
  onBack: () => setStep("/dashboard"),
1204
1218
  setCountrySearch,
1219
+ onVerification,
1205
1220
  },
1206
1221
  states: {
1207
1222
  showVerification,
@@ -1541,7 +1556,7 @@ const BankingInfoForm = class {
1541
1556
  },
1542
1557
  };
1543
1558
  if (props.states.isPartner && props.states.showVerification) {
1544
- return h("sqm-code-verification", null);
1559
+ return (h("sqm-code-verification", { onVerification: props.callbacks.onVerification }));
1545
1560
  }
1546
1561
  return (h(Host, null, h(BankingInfoFormView, { callbacks: props.callbacks, text: props.text, states: props.states, refs: props.refs, slots: {
1547
1562
  formInputsSlot: inputFields === null || inputFields === void 0 ? void 0 : inputFields.map(({ input }) => input),
@@ -1675,6 +1690,7 @@ function useDemoBankingInfoForm(props) {
1675
1690
  setPaymentScheduleChecked,
1676
1691
  setCountrySearch: () => { },
1677
1692
  onBack: async () => setStep("/dashboard"),
1693
+ onVerification: () => { },
1678
1694
  },
1679
1695
  text: props.getTextProps(),
1680
1696
  refs: {
@@ -1916,7 +1932,6 @@ const DocusignIframe = ({ states, data, callbacks, text, }) => {
1916
1932
  const allowed = allowedDomains.some((d) => { var _a; return (_a = e.origin) === null || _a === void 0 ? void 0 : _a.includes(d); });
1917
1933
  if (!allowed)
1918
1934
  return;
1919
- console.log(e);
1920
1935
  if (typeof e.data === "number") {
1921
1936
  setiFrameHeight(e.data + "px");
1922
1937
  }
@@ -3775,27 +3790,9 @@ const TableRow = class {
3775
3790
  }
3776
3791
  };
3777
3792
 
3778
- /**
3779
- * Util function for getting just the props with a certain prefix.
3780
- * @param props Text props on stencil component
3781
- * @param prefix Prefix denoting which group the text prop belongs to
3782
- * @returns A new object with all keys with the prefix provided. The prefix is removed from each key.
3783
- */
3784
- function extractProps(props, prefix) {
3785
- const keys = Object.keys(props).filter((k) => k.startsWith(prefix));
3786
- const formattedProps = keys.reduce((prev, k) => {
3787
- const key = k.replace(prefix, "");
3788
- return {
3789
- ...prev,
3790
- [key]: props[k],
3791
- };
3792
- }, {});
3793
- return formattedProps;
3794
- }
3795
-
3796
3793
  function getCurrentStep(user) {
3797
- var _a;
3798
- if (!((_a = user.impactConnection) === null || _a === void 0 ? void 0 : _a.connected)) {
3794
+ var _a, _b;
3795
+ if (!((_a = user.impactConnection) === null || _a === void 0 ? void 0 : _a.connected) || !((_b = user.impactConnection) === null || _b === void 0 ? void 0 : _b.publisher)) {
3799
3796
  return "/1";
3800
3797
  }
3801
3798
  const { requiredTaxDocumentType, currentTaxDocument, withdrawalSettings, brandedSignup, } = user.impactConnection.publisher;
@@ -4689,14 +4686,14 @@ const TaxAndCashMonolith = class {
4689
4686
  * @uiGroup Dashboard Properties
4690
4687
  * @uiWidget textArea
4691
4688
  */
4692
- this.dashboard_errorTitleText = "Your payout is on hold ";
4689
+ this.payoutHoldAlertHeader = "Your payout is on hold";
4693
4690
  /**
4694
4691
  * Part of the alert displayed at the top of the page when there’s been an issue preventing payouts.
4695
4692
  * @uiName Payout error message description
4696
4693
  * @uiGroup Dashboard Properties
4697
4694
  * @uiWidget textArea
4698
4695
  */
4699
- 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.";
4696
+ this.payoutHoldAlertDescription = "Please contact Support or check your inbox for an email from our referral program provider, impact.com.";
4700
4697
  /**
4701
4698
  * Text displayed for existing publishers that do not have saved banking information.
4702
4699
  * @uiName Payout missing information subtext
@@ -4911,6 +4908,12 @@ const style$5 = {
4911
4908
  borderTop: "none",
4912
4909
  },
4913
4910
  },
4911
+ HoldAlertContainer: {
4912
+ "&::part(base)": {
4913
+ border: "none",
4914
+ backgroundColor: "transparent",
4915
+ },
4916
+ },
4914
4917
  ExpiringSoonAlertContainer: {
4915
4918
  "&::part(base)": {
4916
4919
  backgroundColor: "var(--sl-color-yellow-100)",
@@ -5150,22 +5153,22 @@ const TaxAndCashDashboardView = (props) => {
5150
5153
  h("strong", null, text.error.generalTitle),
5151
5154
  h("br", null),
5152
5155
  text.error.generalDescription)),
5153
- states.identiyRequired && (h("div", null,
5154
- h("sl-alert", { exportparts: "base: alert-base, icon:alert-icon", type: "warning", open: true, class: sheet$4.classes.ExpiringSoonAlertContainer },
5155
- h("sl-icon", { slot: "icon", name: "exclamation-triangle" }),
5156
- h("strong", null, text.verifyIdentityAlertHeader),
5157
- h("br", null),
5158
- text.verifyIdentityAlertMessage,
5159
- h("br", null),
5160
- h("sl-button", null, text.verifyIdentityButton)))),
5161
- h("sl-dialog", {
5162
- // AL: todo plugin open dialog
5163
- label: " verify Identity iframe", class: sheet$4.classes.Dialog, open: states.showIdentityVerificationDialog },
5164
- h("div", { style: {
5165
- width: "420px",
5166
- height: "420px",
5167
- border: "1px dotted black",
5168
- } })),
5156
+ states.hasHold && (h("sl-alert", { exportparts: "base: alert-base, icon:alert-icon", type: "warning", open: true, class: sheet$4.classes.HoldAlertContainer },
5157
+ h("sl-icon", { slot: "icon", name: "exclamation-triangle" }),
5158
+ h("strong", null, text.payoutHoldAlertHeader),
5159
+ h("br", null),
5160
+ text.payoutHoldAlertDescription)),
5161
+ states.payoutStatus === "VERIFICATION_NEEDED" && (h("sl-alert", { exportparts: "base: alert-base, icon:alert-icon", type: "warning", open: true, class: sheet$4.classes.HoldAlertContainer },
5162
+ h("sl-icon", { slot: "icon", name: "exclamation-triangle" }),
5163
+ h("strong", null, text.verificationRequiredHeader),
5164
+ h("p", { style: { margin: "0" } }, text.verificationRequiredDescription),
5165
+ h("sl-button", { style: { marginTop: "var(--sl-spacing-x-small)" }, type: "default", loading: states.loading,
5166
+ //AL: TODO hooks
5167
+ onClick: () => callbacks.onClick }, text.verificationRequiredButtonText))),
5168
+ h("sl-dialog", { noDismiss: true, class: sheet$4.classes.Dialog, open: states.showVerifyIdentity, "onSl-hide": callbacks.onVerifyIdentityCancel },
5169
+ h("iframe", {
5170
+ // AL: TODO replace iframe URL with verification url when available
5171
+ 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" })),
5169
5172
  h("sl-dialog", { label: text.replaceTaxFormModalHeader, class: sheet$4.classes.Dialog, open: states.showNewFormDialog, "onSl-hide": callbacks.onNewFormCancel },
5170
5173
  h("p", null, text.replaceTaxFormModalBodyText),
5171
5174
  h("sl-button", { slot: "footer", type: "primary", class: sheet$4.classes.DialogButton, onClick: callbacks.onNewFormClick }, text.newFormButton),
@@ -5271,10 +5274,11 @@ function getIndirectTaxType(taxInformation) {
5271
5274
  return "Indirect Tax";
5272
5275
  }
5273
5276
  const useTaxAndCashDashboard = (props) => {
5274
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
5277
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
5275
5278
  const setStep = Sn(TAX_CONTEXT_NAMESPACE);
5276
5279
  const setContext = Sn(TAX_FORM_CONTEXT_NAMESPACE);
5277
5280
  const [showDialog, setShowDialog] = useState(false);
5281
+ const [showVerification, setShowVerification] = useState(false);
5278
5282
  const locale = Q();
5279
5283
  useEffect(() => {
5280
5284
  // Clear override context once on submitted
@@ -5305,6 +5309,7 @@ const useTaxAndCashDashboard = (props) => {
5305
5309
  setStep("/3");
5306
5310
  };
5307
5311
  const provinceName = (_d = 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;
5312
+ const payoutStatus = getStatus(data);
5308
5313
  return {
5309
5314
  states: {
5310
5315
  dateSubmitted,
@@ -5326,12 +5331,16 @@ const useTaxAndCashDashboard = (props) => {
5326
5331
  loading,
5327
5332
  loadingError: !!(userError === null || userError === void 0 ? void 0 : userError.message),
5328
5333
  showNewFormDialog: showDialog,
5334
+ hasHold: !!((_m = publisher === null || publisher === void 0 ? void 0 : publisher.payoutsAccount) === null || _m === void 0 ? void 0 : _m.hold),
5335
+ payoutStatus,
5336
+ showVerifyIdentity: showVerification,
5329
5337
  },
5330
5338
  callbacks: {
5331
5339
  onClick: () => setShowDialog(true),
5332
5340
  onEditPayoutInfo,
5333
5341
  onNewFormCancel: () => setShowDialog(false),
5334
5342
  onNewFormClick,
5343
+ onVerifyIdentityCancel: () => setShowVerification(false),
5335
5344
  },
5336
5345
  text: props.getTextProps(),
5337
5346
  };
@@ -5399,18 +5408,6 @@ const TaxAndCashDashboard = class {
5399
5408
  * @uiName Inactive W-8 error message description
5400
5409
  */
5401
5410
  this.taxAlertNotActiveMessageW8 = "Your tax form may have expired or has personal information that doesn’t match your profile. Please submit a new {documentType} form.";
5402
- /**
5403
- * Part of the alert displayed at the top of the page.
5404
- *
5405
- * @uiName Verify identity warning message header
5406
- */
5407
- this.verifyIdentityAlertHeader = "Verify your identity";
5408
- /**
5409
- * Part of the alert displayed at the top of the page.
5410
- *
5411
- * @uiName Verify identity warning message description
5412
- */
5413
- this.verifyIdentityAlertMessage = "Complete your verification to start receiving your cash rewards. It should only take a few minutes verify.";
5414
5411
  /**
5415
5412
  * Additional text displayed next to the tax form's status badge.
5416
5413
  *
@@ -5515,18 +5512,35 @@ const TaxAndCashDashboard = class {
5515
5512
  * @uiName Payout error message title
5516
5513
  * @uiWidget textArea
5517
5514
  */
5518
- this.errorTitleText = "Your payout is on hold ";
5515
+ this.payoutHoldAlertHeader = "Your payout is on hold";
5519
5516
  /**
5520
5517
  * Part of the alert displayed at the top of the page when there’s been an issue preventing payouts.
5521
5518
  * @uiName Payout error message description
5522
5519
  * @uiWidget textArea
5523
5520
  */
5524
- 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.";
5521
+ this.payoutHoldAlertDescription = "Please contact Support or check your inbox for an email from our referral program provider, impact.com.";
5525
5522
  /**
5526
5523
  * Text displayed for existing publishers that do not have saved banking information.
5527
5524
  * @uiName Payout missing information subtext
5528
5525
  */
5529
5526
  this.payoutMissingInformationText = "Missing banking information, go to Impact.com to resolve.";
5527
+ /**
5528
+ * Part of the alert displayed at the top of the page when the user needs to verify their identity.
5529
+ * @uiName Verification required alert message title
5530
+ * @uiWidget textArea
5531
+ */
5532
+ this.verificationRequiredHeader = "Verify your identity";
5533
+ /**
5534
+ * Part of the alert displayed at the top of the page when the user needs to verify their identity
5535
+ * @uiName Verification required alert message description
5536
+ * @uiWidget textArea
5537
+ */
5538
+ this.verificationRequiredDescription = "Complete your verification to start receiving your cash rewards. It should only take a few minutes verify.";
5539
+ /**
5540
+ * Part of the alert displayed at the top of the page when the user needs to verify their identity.
5541
+ * @uiName Verification required alert button text
5542
+ */
5543
+ this.verificationRequiredButtonText = "Start Verification";
5530
5544
  /**
5531
5545
  * Part of the alert displayed at the top of the page.
5532
5546
  * @uiName Form submission error message title
@@ -5611,10 +5625,6 @@ const TaxAndCashDashboard = class {
5611
5625
  * @uiName Cancel button label
5612
5626
  */
5613
5627
  this.cancelButton = "Cancel";
5614
- /**
5615
- * @uiName Verify button label
5616
- */
5617
- this.verifyIdentityButton = "Start Verification";
5618
5628
  h$1(this);
5619
5629
  }
5620
5630
  disconnectedCallback() { }
@@ -5653,12 +5663,16 @@ function useDemoTaxAndCashDashboard(props) {
5653
5663
  disabled: false,
5654
5664
  loading: false,
5655
5665
  showNewFormDialog: false,
5666
+ hasHold: false,
5667
+ showVerifyIdentity: false,
5668
+ payoutStatus: "DONE",
5656
5669
  },
5657
5670
  callbacks: {
5658
5671
  onClick: () => console.debug("check step"),
5659
5672
  onEditPayoutInfo: () => console.debug("payout info"),
5660
5673
  onNewFormCancel: () => console.log("hide"),
5661
5674
  onNewFormClick: () => console.log("show"),
5675
+ onVerifyIdentityCancel: () => console.log("hide"),
5662
5676
  },
5663
5677
  text: props.getTextProps(),
5664
5678
  }, props.demoData || {}, { arrayMerge: (_, a) => a });
@@ -6948,17 +6962,20 @@ function useUserInfoForm(props) {
6948
6962
  const [filteredCurrencies, setFilteredCurrencies] = useState(currencies || []);
6949
6963
  const [formErrors, setErrors] = useState({});
6950
6964
  useEffect(() => {
6951
- var _a, _b, _c, _d, _e, _f, _g, _h, _j;
6965
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
6952
6966
  const user = data === null || data === void 0 ? void 0 : data.user;
6953
6967
  if (!user || step !== "/1")
6954
6968
  return;
6955
6969
  // If form already filled out, skip initialising it
6956
6970
  if (objectIsFull(userFormContext))
6957
6971
  return;
6958
- if (((_a = user.impactConnection) === null || _a === void 0 ? void 0 : _a.publisher) && ((_b = user.impactConnection) === null || _b === void 0 ? void 0 : _b.user)) {
6972
+ // Prefer MI email if it was verified before this
6973
+ const email = ((_a = user.managedIdentity) === null || _a === void 0 ? void 0 : _a.emailVerified) ? user.managedIdentity.email
6974
+ : user.email;
6975
+ if (((_b = user.impactConnection) === null || _b === void 0 ? void 0 : _b.publisher) && ((_c = user.impactConnection) === null || _c === void 0 ? void 0 : _c.user)) {
6959
6976
  // Initialise with partner information
6960
6977
  setUserFormContext({
6961
- email: user.email,
6978
+ email,
6962
6979
  firstName: user.impactConnection.user.firstName,
6963
6980
  lastName: user.impactConnection.user.lastName,
6964
6981
  countryCode: user.impactConnection.publisher.countryCode,
@@ -6974,17 +6991,17 @@ function useUserInfoForm(props) {
6974
6991
  else if (!(userFormContext === null || userFormContext === void 0 ? void 0 : userFormContext.email)) {
6975
6992
  // Initialise with user information
6976
6993
  setUserFormContext({
6977
- email: user.email,
6994
+ email,
6978
6995
  firstName: user.firstName,
6979
6996
  lastName: user.lastName,
6980
6997
  countryCode: user.countryCode || "US",
6981
- currency: (_c = user.customFields) === null || _c === void 0 ? void 0 : _c.currency,
6982
- phoneNumberCountryCode: ((_d = user.customFields) === null || _d === void 0 ? void 0 : _d.phoneNumberCountryCode) || "US",
6983
- phoneNumber: (_e = user.customFields) === null || _e === void 0 ? void 0 : _e.phoneNumber,
6984
- address: (_f = user.customFields) === null || _f === void 0 ? void 0 : _f.address,
6985
- city: (_g = user.customFields) === null || _g === void 0 ? void 0 : _g.city,
6986
- state: (_h = user.customFields) === null || _h === void 0 ? void 0 : _h.state,
6987
- postalCode: (_j = user.customFields) === null || _j === void 0 ? void 0 : _j.postalCode,
6998
+ currency: (_d = user.customFields) === null || _d === void 0 ? void 0 : _d.currency,
6999
+ phoneNumberCountryCode: ((_e = user.customFields) === null || _e === void 0 ? void 0 : _e.phoneNumberCountryCode) || "US",
7000
+ phoneNumber: (_f = user.customFields) === null || _f === void 0 ? void 0 : _f.phoneNumber,
7001
+ address: (_g = user.customFields) === null || _g === void 0 ? void 0 : _g.address,
7002
+ city: (_h = user.customFields) === null || _h === void 0 ? void 0 : _h.city,
7003
+ state: (_j = user.customFields) === null || _j === void 0 ? void 0 : _j.state,
7004
+ postalCode: (_k = user.customFields) === null || _k === void 0 ? void 0 : _k.postalCode,
6988
7005
  });
6989
7006
  }
6990
7007
  }, [data, step, userFormContext]);
@@ -7063,6 +7080,8 @@ function useUserInfoForm(props) {
7063
7080
  const { allowBankingCollection, ...userData } = formData;
7064
7081
  setUserFormContext({
7065
7082
  ...userFormContext,
7083
+ firstName: userData.firstName,
7084
+ lastName: userData.lastName,
7066
7085
  phoneNumberCountryCode: userData.phoneNumberCountryCode,
7067
7086
  phoneNumber: userData.phoneNumber,
7068
7087
  countryCode: userData.countryCode,
@@ -15,8 +15,9 @@ import { p as pathToRegexp } from './index-ffa26b43.js';
15
15
  import { R as REGISTRATION_FORM_STATE_CONTEXT, u as useRegistrationFormState } from './useRegistrationFormState-849e27f7.js';
16
16
  import { i as isEmpty } from './utilities-443732be.js';
17
17
  import { A as AsYouType } from './AsYouType-46f67d0d.js';
18
- import { b as useDemoBigStat, V as useBigStat, B as BigStatView, Q as autoColorScaleCss, K as CardFeedView, j as CheckboxFieldView, M as CouponCodeView, D as DropdownFieldView, E as EditProfileView, H as HeroView, I as InputFieldView, W as withShadowView, L as LeaderboardView, N as NameFieldsView, d as PortalChangePasswordView, i as PortalFooterView, P as PortalFrameView, e as PortalLoginView, f as PortalRegisterView, R as ReferralIframeView, X as demoRewardExchange, k as RewardExchangeView, a as useShareButton, S as ShareButtonView, C as CopyTextView, u as useShareLink, c as StatContainerView, T as TaskCardView } from './ShadowViewAddon-65c8679e.js';
18
+ import { b as useDemoBigStat, V as useBigStat, B as BigStatView, Q as autoColorScaleCss, K as CardFeedView, j as CheckboxFieldView, M as CouponCodeView, D as DropdownFieldView, E as EditProfileView, H as HeroView, I as InputFieldView, W as withShadowView, L as LeaderboardView, N as NameFieldsView, d as PortalChangePasswordView, i as PortalFooterView, P as PortalFrameView, e as PortalLoginView, f as PortalRegisterView, R as ReferralIframeView, X as demoRewardExchange, k as RewardExchangeView, a as useShareButton, S as ShareButtonView, C as CopyTextView, u as useShareLink, c as StatContainerView, T as TaskCardView } from './ShadowViewAddon-69b61037.js';
19
19
  import './sqm-portal-container-view-6c582684.js';
20
+ import { u as usePayoutStatus } from './usePayoutStatus-1a635054.js';
20
21
 
21
22
  const BigStat = class {
22
23
  constructor(hostRef) {
@@ -1723,6 +1724,7 @@ const style$2 = {
1723
1724
  PayoutButtonDescription: {
1724
1725
  color: "var(--sl-color-neutral-500)",
1725
1726
  fontSize: "var(--sl-font-size-small)",
1727
+ margin: "0",
1726
1728
  },
1727
1729
  };
1728
1730
  const sheet$2 = createStyleSheet(style$2);
@@ -1740,7 +1742,14 @@ function PayoutButtonScrollView(props) {
1740
1742
  const PayoutButtonScroll = class {
1741
1743
  constructor(hostRef) {
1742
1744
  registerInstance(this, hostRef);
1745
+ /**
1746
+ * @uiName Payout button text
1747
+ */
1743
1748
  this.payoutButtonText = "Payouts & Tax Settings";
1749
+ /**
1750
+ * Description text under payout button
1751
+ * @uiName Payout button description text
1752
+ */
1744
1753
  this.payoutButtonDescription = "Check your payout settings to see when you’ll get paid out next";
1745
1754
  this.ignored = true;
1746
1755
  h(this);
@@ -1772,12 +1781,53 @@ const style$3 = {
1772
1781
  margin: "0",
1773
1782
  marginBottom: "var(--sl-spacing-small)",
1774
1783
  },
1784
+ ErrorAlertContainer: {
1785
+ "&::part(base)": {
1786
+ backgroundColor: "var(--sl-color-red-100)",
1787
+ borderTop: "none",
1788
+ },
1789
+ "& sl-icon::part(base)": {
1790
+ color: "var(--sl-color-danger-500)",
1791
+ },
1792
+ },
1793
+ WarningAlertContainer: {
1794
+ "&::part(base)": {
1795
+ backgroundColor: "var(--sl-color-yellow-100)",
1796
+ borderTop: "none",
1797
+ },
1798
+ "& sl-icon::part(base)": {
1799
+ color: "var(--sl-color-danger-500)",
1800
+ },
1801
+ },
1802
+ InfoAlertContainer: {
1803
+ "&::part(base)": {
1804
+ backgroundColor: "var(--sl-color-sky-100)",
1805
+ borderTop: "none",
1806
+ },
1807
+ "& sl-icon::part(base)": {
1808
+ color: "var(--sl-color-blue-500)",
1809
+ },
1810
+ },
1811
+ Dialog: {
1812
+ "&::part(panel)": {
1813
+ height: "600px",
1814
+ },
1815
+ "&::part(close-button)": {
1816
+ marginBottom: "var(--sl-spacing-xx-large)",
1817
+ },
1818
+ "&::part(title)": {
1819
+ display: "none",
1820
+ },
1821
+ "&::part(header)": {},
1822
+ "&::part(body)": { padding: "0" },
1823
+ "&::part(footer)": {},
1824
+ },
1775
1825
  };
1776
1826
  const sheet$3 = createStyleSheet(style$3);
1777
1827
  const styleString$3 = sheet$3.toString();
1778
1828
  function PayoutStatusAlertView(props) {
1779
- var _a, _b, _c, _d;
1780
- const { text, states } = props;
1829
+ var _a, _b, _c, _d, _e;
1830
+ const { text, states, data, callbacks } = props;
1781
1831
  if (states.loading) {
1782
1832
  return h$1("sl-skeleton", { class: sheet$3.classes.SkeletonOne });
1783
1833
  }
@@ -1785,14 +1835,24 @@ function PayoutStatusAlertView(props) {
1785
1835
  return h$1("div", null);
1786
1836
  }
1787
1837
  function getAlert(status) {
1838
+ if (states.error)
1839
+ return {
1840
+ header: text.errorHeader,
1841
+ description: text.errorDescription,
1842
+ buttonText: null,
1843
+ alertType: "critical",
1844
+ icon: "exclamation-triangle",
1845
+ class: sheet$3.classes.ErrorAlertContainer,
1846
+ };
1788
1847
  switch (status) {
1789
1848
  case "INFORMATION_REQUIRED":
1790
1849
  return {
1791
1850
  header: text.informationRequiredHeader,
1792
1851
  description: text.informationRequiredDescription,
1793
- buttonText: text.verificationRequiredButtonText,
1852
+ buttonText: text.informationRequiredButtonText,
1794
1853
  alertType: "info",
1795
- icon: "exclamation-octagon",
1854
+ icon: "info-circle",
1855
+ class: sheet$3.classes.InfoAlertContainer,
1796
1856
  };
1797
1857
  case "VERIFICATION_NEEDED":
1798
1858
  return {
@@ -1800,7 +1860,8 @@ function PayoutStatusAlertView(props) {
1800
1860
  description: text.verificationRequiredDescription,
1801
1861
  buttonText: text.verificationRequiredButtonText,
1802
1862
  alertType: "warning",
1803
- icon: "exclamation-octagon",
1863
+ icon: "exclamation-triangle",
1864
+ class: sheet$3.classes.WarningAlertContainer,
1804
1865
  };
1805
1866
  case "HOLD":
1806
1867
  return {
@@ -1808,7 +1869,8 @@ function PayoutStatusAlertView(props) {
1808
1869
  description: text.holdDescription,
1809
1870
  buttonText: null,
1810
1871
  alertType: "warning",
1811
- icon: "exclamation-octagon",
1872
+ icon: "exclamation-triangle",
1873
+ class: sheet$3.classes.WarningAlertContainer,
1812
1874
  };
1813
1875
  default:
1814
1876
  return;
@@ -1818,81 +1880,75 @@ function PayoutStatusAlertView(props) {
1818
1880
  function getButton(status) {
1819
1881
  switch (status) {
1820
1882
  case "INFORMATION_REQUIRED":
1821
- return (h$1("sqm-scroll", { "scroll-tag-name": "sqm-tabs", "button-text": "Payout and tax settings", "scroll-animation": "smooth" }));
1883
+ return data.type === "SquatchJS2" ? (h$1("sqm-scroll", { "scroll-tag-name": "sqm-tabs", "button-text": text.informationRequiredButtonText, "scroll-animation": "smooth" })) : data.type === "SquatchPortal" ? (h$1("sl-button", { type: "default", onClick: callbacks.onTermsClick }, text.informationRequiredButtonText)) : (h$1("sl-button", { type: "default" }, text.informationRequiredButtonText));
1822
1884
  case "VERIFICATION_NEEDED":
1823
- return (h$1("sl-button", { type: "default", loading: states.loading }, text.verificationRequiredButtonText));
1885
+ return (h$1("sl-button", { type: "default", loading: states.loading,
1886
+ //AL: TODO callback to open verification form
1887
+ onClick: () => callbacks.onClick }, text.verificationRequiredButtonText));
1824
1888
  default:
1825
1889
  return;
1826
1890
  }
1827
1891
  }
1828
1892
  return (h$1("div", { part: "sqm-base" },
1829
1893
  h$1("style", { type: "text/css" }, styleString$3),
1830
- h$1("sqm-form-message", { style: { display: "flex", gap: "2px" }, exportparts: "base: alert-base, icon:alert-icon", type: (_a = getAlert(states.status)) === null || _a === void 0 ? void 0 : _a.alertType },
1831
- h$1("sl-icon", { slot: "icon", name: (_b = getAlert(states.status)) === null || _b === void 0 ? void 0 : _b.icon }),
1832
- h$1("strong", null, (_c = getAlert(states.status)) === null || _c === void 0 ? void 0 : _c.header),
1833
- h$1("p", { class: sheet$3.classes.AlertDescriptionText }, (_d = getAlert(states.status)) === null || _d === void 0 ? void 0 : _d.description),
1834
- getButton(states.status))));
1835
- }
1836
-
1837
- const GET_USER_STATUS = dist.gql `
1838
- query getUserStatus {
1839
- user: viewer {
1840
- ... on User {
1841
- id
1842
- impactConnection {
1843
- connected
1844
- publisher {
1845
- id
1846
- payoutsAccount {
1847
- hold
1848
- }
1849
- }
1850
- }
1851
- }
1852
- }
1853
- }
1854
- `;
1855
- function usePayoutStatus(props) {
1856
- const { loading, data, errors, refetch } = En(GET_USER_STATUS, {});
1857
- const [status, setStatus] = useState(undefined);
1858
- useEffect(() => {
1859
- if (!data)
1860
- return;
1861
- function getStatus(data) {
1862
- var _a, _b;
1863
- const account = (_b = (_a = data.user.impactConnection) === null || _a === void 0 ? void 0 : _a.publisher) === null || _b === void 0 ? void 0 : _b.payoutsAccount;
1864
- if (!account)
1865
- return "INFORMATION_REQUIRED";
1866
- if (account.hold)
1867
- return "HOLD";
1868
- // @ts-ignore, TODO: add check for account verification
1869
- if (!account.verified)
1870
- return "VERIFICATION_NEEDED";
1871
- return "DONE";
1872
- }
1873
- const s = getStatus(data);
1874
- setStatus(s);
1875
- }, [data]);
1876
- useEffect(() => {
1877
- const cb = () => refetch();
1878
- window.addEventListener("sqm:tax-form-updated", cb);
1879
- return () => window.removeEventListener("sqm:tax-form-updated", cb);
1880
- }, []);
1881
- console.log({ data });
1882
- return { states: { loading, status }, text: props.getTextProps() };
1894
+ h$1("sl-alert", { exportparts: "base: alert-base, icon:alert-icon", type: (_a = getAlert(states.status)) === null || _a === void 0 ? void 0 : _a.alertType, class: (_b = getAlert(states.status)) === null || _b === void 0 ? void 0 : _b.class, open: true },
1895
+ h$1("sl-icon", { slot: "icon", name: (_c = getAlert(states.status)) === null || _c === void 0 ? void 0 : _c.icon }),
1896
+ h$1("strong", null, (_d = getAlert(states.status)) === null || _d === void 0 ? void 0 : _d.header),
1897
+ h$1("p", { class: sheet$3.classes.AlertDescriptionText }, (_e = getAlert(states.status)) === null || _e === void 0 ? void 0 : _e.description),
1898
+ getButton(states.status)),
1899
+ h$1("sl-dialog", { noDismiss: true, class: sheet$3.classes.Dialog, open: states.showVerifyIdentity, "onSl-hide": callbacks.onCancel },
1900
+ h$1("iframe", {
1901
+ // AL: TODO replace iframe URL with verification url when available
1902
+ 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" }))));
1883
1903
  }
1884
1904
 
1885
1905
  const PayoutStatusAlert = class {
1886
1906
  constructor(hostRef) {
1887
1907
  registerInstance(this, hostRef);
1908
+ /**
1909
+ * @uiName Info required alert header
1910
+ */
1888
1911
  this.informationRequiredHeader = "Payout and tax information required";
1912
+ /**
1913
+ * @uiName Info required alert description
1914
+ */
1889
1915
  this.informationRequiredDescription = "Submit your banking details and tax documents to receive your rewards.";
1916
+ /**
1917
+ * @uiName Info required alert button text
1918
+ */
1890
1919
  this.informationRequiredButtonText = "Payouts & Tax Settings";
1920
+ /**
1921
+ * @uiName Verification required alert header
1922
+ */
1891
1923
  this.verificationRequiredHeader = "Verify your identity";
1924
+ /**
1925
+ * @uiName Verification required alert description
1926
+ */
1892
1927
  this.verificationRequiredDescription = "Complete your verification to start receiving your cash rewards. It should only take a few minutes verify.";
1928
+ /**
1929
+ * @uiName Verification required alert button text
1930
+ */
1893
1931
  this.verificationRequiredButtonText = "Start Verification";
1932
+ /**
1933
+ * @uiName Payout on hold alert header
1934
+ */
1894
1935
  this.holdHeader = "Your payouts and account are on hold";
1936
+ /**
1937
+ * @uiName Payout on hold alert description
1938
+ */
1895
1939
  this.holdDescription = "Please check your inbox for an email from our referral provider, impact.com. It contains details on how to resolve this issue. If you need further assistance, feel free to reach out to {support email}.";
1940
+ /**
1941
+ * @uiName Cash & Payouts Terms and Conditions url
1942
+ */
1943
+ this.termsUrl = "https://terms.advocate.impact.com/PayoutTermsAndConditions.html";
1944
+ /**
1945
+ * @uiName Error header
1946
+ */
1947
+ this.errorHeader = "Could not determine payout status.";
1948
+ /**
1949
+ * @uiName Error description
1950
+ */
1951
+ this.errorDescription = "There was an error with determining your payout status.";
1896
1952
  h(this);
1897
1953
  }
1898
1954
  disconnectedCallback() { }
@@ -1903,16 +1959,25 @@ const PayoutStatusAlert = class {
1903
1959
  const props = isDemo()
1904
1960
  ? useDemoPayoutStatusAlert(this)
1905
1961
  : usePayoutStatus(this);
1962
+ console.log({ props });
1906
1963
  return h$1(PayoutStatusAlertView, Object.assign({}, props));
1907
1964
  }
1908
1965
  };
1909
1966
  function useDemoPayoutStatusAlert(props) {
1910
1967
  return cjs({
1911
1968
  states: {
1969
+ error: false,
1912
1970
  status: "INFORMATION_REQUIRED",
1913
1971
  loading: false,
1972
+ showVerifyIdentity: false,
1914
1973
  },
1974
+ data: { type: "SquatchAdmin" },
1915
1975
  text: props.getTextProps(),
1976
+ callbacks: {
1977
+ onTermsClick: () => { },
1978
+ onClick: () => console.log("show"),
1979
+ onCancel: () => console.log("hide"),
1980
+ },
1916
1981
  }, props.demoData || {}, { arrayMerge: (_, a) => a });
1917
1982
  }
1918
1983