@saasquatch/mint-components 1.12.0-9 → 1.12.1-1

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 (187) hide show
  1. package/dist/cjs/{ShadowViewAddon-040cffad.js → ShadowViewAddon-88821c64.js} +3 -6
  2. package/dist/cjs/loader.cjs.js +1 -1
  3. package/dist/cjs/mint-components.cjs.js +1 -1
  4. package/dist/cjs/sqm-banking-info-form_16.cjs.entry.js +79 -202
  5. package/dist/cjs/sqm-big-stat_39.cjs.entry.js +160 -281
  6. package/dist/cjs/{sqm-invoice-table-view-c58966f8.js → sqm-invoice-table-view-a9133a11.js} +0 -98
  7. package/dist/cjs/sqm-portal-registration-form-view-621348a6.js +85 -0
  8. package/dist/cjs/sqm-portal-registration-form.cjs.entry.js +12 -81
  9. package/dist/cjs/sqm-stencilbook.cjs.entry.js +323 -334
  10. package/dist/collection/collection-manifest.json +1 -6
  11. package/dist/collection/components/sqm-big-stat/useBigStat.js +3 -6
  12. package/dist/collection/components/sqm-checkbox-field/sqm-checkbox-field.js +5 -5
  13. package/dist/collection/components/sqm-marketing-emails-checkbox/MarketingEmailsCheckbox.stories.js +11 -0
  14. package/dist/collection/components/sqm-marketing-emails-checkbox/sqm-marketing-emails-checkbox.js +160 -0
  15. package/dist/collection/components/sqm-portal-registration-form/PortalRegistrationForm.stories.js +5 -1
  16. package/dist/collection/components/sqm-portal-registration-form/sqm-portal-registration-form-view.js +1 -1
  17. package/dist/collection/components/sqm-portal-registration-form/sqm-portal-registration-form.js +3 -2
  18. package/dist/collection/components/sqm-portal-registration-form/usePortalRegistrationForm.js +6 -0
  19. package/dist/collection/components/sqm-stencilbook/sqm-stencilbook.js +4 -8
  20. package/dist/collection/components/tax-and-cash/BankingForm.stories.js +0 -2
  21. package/dist/collection/components/tax-and-cash/TaxForm.stories.js +0 -96
  22. package/dist/collection/components/tax-and-cash/sqm-banking-info-form/sqm-banking-info-form.js +1 -5
  23. package/dist/collection/components/tax-and-cash/sqm-banking-info-form/useBankingInfoForm.js +38 -101
  24. package/dist/collection/components/tax-and-cash/sqm-docusign-form/docusign-iframe/DocusignIframe.js +2 -15
  25. package/dist/collection/components/tax-and-cash/sqm-tax-and-cash/data.js +0 -7
  26. package/dist/collection/components/tax-and-cash/sqm-tax-and-cash/sqm-tax-and-cash.js +8 -8
  27. package/dist/collection/components/tax-and-cash/sqm-tax-and-cash/useTaxAndCash.js +2 -2
  28. package/dist/collection/components/tax-and-cash/sqm-tax-and-cash-dashboard/sqm-tax-and-cash-dashboard-view.js +0 -22
  29. package/dist/collection/components/tax-and-cash/sqm-tax-and-cash-dashboard/sqm-tax-and-cash-dashboard.js +9 -99
  30. package/dist/collection/components/tax-and-cash/sqm-tax-and-cash-dashboard/useTaxAndCashDashboard.js +1 -8
  31. package/dist/collection/components/tax-and-cash/sqm-user-info-form/sqm-user-info-form-view.js +2 -2
  32. package/dist/collection/components/tax-and-cash/sqm-user-info-form/useUserInfoForm.js +11 -14
  33. package/dist/esm/{ShadowViewAddon-69b61037.js → ShadowViewAddon-65c8679e.js} +3 -6
  34. package/dist/esm/loader.js +1 -1
  35. package/dist/esm/mint-components.js +1 -1
  36. package/dist/esm/sqm-banking-info-form_16.entry.js +79 -202
  37. package/dist/esm/sqm-big-stat_39.entry.js +159 -280
  38. package/dist/esm/{sqm-invoice-table-view-d1cfdaf4.js → sqm-invoice-table-view-71915a5e.js} +0 -98
  39. package/dist/esm/sqm-portal-registration-form-view-1d3066e1.js +83 -0
  40. package/dist/esm/sqm-portal-registration-form.entry.js +18 -87
  41. package/dist/esm/sqm-stencilbook.entry.js +323 -334
  42. package/dist/esm/stencil-hooks.module-ac12ca1c.js +1 -1
  43. package/dist/esm-es5/ShadowViewAddon-65c8679e.js +1 -0
  44. package/dist/esm-es5/loader.js +1 -1
  45. package/dist/esm-es5/mint-components.js +1 -1
  46. package/dist/esm-es5/sqm-banking-info-form_16.entry.js +1 -1
  47. package/dist/esm-es5/sqm-big-stat_39.entry.js +1 -1
  48. package/dist/esm-es5/sqm-invoice-table-view-71915a5e.js +1 -0
  49. package/dist/esm-es5/sqm-portal-registration-form-view-1d3066e1.js +1 -0
  50. package/dist/esm-es5/sqm-portal-registration-form.entry.js +1 -1
  51. package/dist/esm-es5/sqm-stencilbook.entry.js +1 -1
  52. package/dist/esm-es5/stencil-hooks.module-ac12ca1c.js +1 -1
  53. package/dist/mint-components/mint-components.esm.js +1 -1
  54. package/dist/mint-components/p-1279f7a3.system.entry.js +1 -0
  55. package/dist/mint-components/p-15a64357.entry.js +13 -0
  56. package/dist/mint-components/p-17f56865.entry.js +9 -0
  57. package/dist/mint-components/p-2a414b2e.system.js +2 -2
  58. package/dist/mint-components/p-3cb18382.system.js +1 -0
  59. package/dist/mint-components/p-40b1de58.js +1 -0
  60. package/dist/mint-components/p-4112e198.system.js +1 -0
  61. package/dist/mint-components/p-5cd917db.js +1 -0
  62. package/dist/mint-components/p-6792c8d8.system.entry.js +1 -0
  63. package/dist/mint-components/p-a02afa72.system.js +1 -0
  64. package/dist/mint-components/p-acd77a6e.entry.js +223 -0
  65. package/dist/mint-components/p-b3e97f8a.system.entry.js +1 -0
  66. package/dist/mint-components/{p-9eae245f.js → p-b651706a.js} +3 -6
  67. package/dist/mint-components/p-b8233366.entry.js +174 -0
  68. package/dist/mint-components/p-ca809fdd.system.js +1 -1
  69. package/dist/mint-components/p-cb38b9b0.system.entry.js +1 -0
  70. package/dist/mint-components/p-fd2c5407.js +2 -2
  71. package/dist/types/components/sqm-checkbox-field/sqm-checkbox-field-view.d.ts +1 -1
  72. package/dist/types/components/sqm-checkbox-field/sqm-checkbox-field.d.ts +4 -4
  73. package/dist/types/components/sqm-marketing-emails-checkbox/MarketingEmailsCheckbox.stories.d.ts +8 -0
  74. package/dist/types/components/sqm-marketing-emails-checkbox/sqm-marketing-emails-checkbox.d.ts +34 -0
  75. package/dist/types/components/sqm-portal-registration-form/PortalRegistrationForm.stories.d.ts +1 -0
  76. package/dist/types/components/sqm-portal-registration-form/sqm-portal-registration-form-view.d.ts +1 -0
  77. package/dist/types/components/sqm-portal-registration-form/sqm-portal-registration-form.d.ts +1 -1
  78. package/dist/types/components/tax-and-cash/TaxForm.stories.d.ts +0 -2
  79. package/dist/types/components/tax-and-cash/sqm-banking-info-form/sqm-banking-info-form-view.d.ts +0 -2
  80. package/dist/types/components/tax-and-cash/sqm-docusign-form/useDocusignForm.d.ts +1 -1
  81. package/dist/types/components/tax-and-cash/sqm-tax-and-cash/data.d.ts +0 -6
  82. package/dist/types/components/tax-and-cash/sqm-tax-and-cash/sqm-tax-and-cash.d.ts +2 -2
  83. package/dist/types/components/tax-and-cash/sqm-tax-and-cash-dashboard/sqm-tax-and-cash-dashboard-view.d.ts +0 -12
  84. package/dist/types/components/tax-and-cash/sqm-tax-and-cash-dashboard/sqm-tax-and-cash-dashboard.d.ts +2 -19
  85. package/dist/types/components.d.ts +108 -625
  86. package/docs/docs.docx +0 -0
  87. package/docs/raisins.json +1 -1
  88. package/grapesjs/grapesjs.js +1 -1
  89. package/package.json +2 -2
  90. package/dist/cjs/extractProps-fd93ba62.js +0 -21
  91. package/dist/cjs/keys-cff24974.js +0 -11
  92. package/dist/cjs/sqm-code-verification.cjs.entry.js +0 -342
  93. package/dist/cjs/sqm-email-verification.cjs.entry.js +0 -283
  94. package/dist/cjs/sqm-scroll.cjs.entry.js +0 -109
  95. package/dist/cjs/sqm-widget-verification-internal.cjs.entry.js +0 -103
  96. package/dist/cjs/sqm-widget-verification.cjs.entry.js +0 -210
  97. package/dist/cjs/usePayoutStatus-b9fb7399.js +0 -70
  98. package/dist/cjs/useVerificationEmail-6aacdb71.js +0 -169
  99. package/dist/collection/components/sqm-payout-button-scroll/PayoutButtonScroll.stories.js +0 -8
  100. package/dist/collection/components/sqm-payout-button-scroll/sqm-payout-button-scroll-view.js +0 -23
  101. package/dist/collection/components/sqm-payout-button-scroll/sqm-payout-button-scroll.js +0 -118
  102. package/dist/collection/components/sqm-payout-button-scroll/usePayoutButton.js +0 -44
  103. package/dist/collection/components/sqm-widget-verification/keys.js +0 -4
  104. package/dist/collection/components/sqm-widget-verification/sqm-code-verification/WidgetCodeVerification.stories.js +0 -36
  105. package/dist/collection/components/sqm-widget-verification/sqm-code-verification/sqm-code-verification-view.js +0 -128
  106. package/dist/collection/components/sqm-widget-verification/sqm-code-verification/sqm-code-verification.js +0 -301
  107. package/dist/collection/components/sqm-widget-verification/sqm-code-verification/useCodeVerification.js +0 -153
  108. package/dist/collection/components/sqm-widget-verification/sqm-email-verification/WidgetEmailVerification.stories.js +0 -42
  109. package/dist/collection/components/sqm-widget-verification/sqm-email-verification/sqm-email-verification-view.js +0 -91
  110. package/dist/collection/components/sqm-widget-verification/sqm-email-verification/sqm-email-verification.js +0 -226
  111. package/dist/collection/components/sqm-widget-verification/sqm-email-verification/useEmailVerification.js +0 -126
  112. package/dist/collection/components/sqm-widget-verification/sqm-widget-verification-internal.js +0 -339
  113. package/dist/collection/components/sqm-widget-verification/sqm-widget-verification.js +0 -557
  114. package/dist/collection/components/sqm-widget-verification/useVerificationEmail.js +0 -165
  115. package/dist/collection/components/tax-and-cash/sqm-payout-status-alert/PayoutStatusAlert.stories.js +0 -22
  116. package/dist/collection/components/tax-and-cash/sqm-payout-status-alert/sqm-payout-status-alert-view.js +0 -131
  117. package/dist/collection/components/tax-and-cash/sqm-payout-status-alert/sqm-payout-status-alert.js +0 -354
  118. package/dist/collection/components/tax-and-cash/sqm-payout-status-alert/usePayoutStatus.js +0 -65
  119. package/dist/esm/extractProps-ae1afbb3.js +0 -19
  120. package/dist/esm/keys-db1897ae.js +0 -6
  121. package/dist/esm/sqm-code-verification.entry.js +0 -338
  122. package/dist/esm/sqm-email-verification.entry.js +0 -279
  123. package/dist/esm/sqm-scroll.entry.js +0 -105
  124. package/dist/esm/sqm-widget-verification-internal.entry.js +0 -99
  125. package/dist/esm/sqm-widget-verification.entry.js +0 -206
  126. package/dist/esm/usePayoutStatus-1a635054.js +0 -67
  127. package/dist/esm/useVerificationEmail-c32696ba.js +0 -167
  128. package/dist/esm-es5/ShadowViewAddon-69b61037.js +0 -1
  129. package/dist/esm-es5/extractProps-ae1afbb3.js +0 -1
  130. package/dist/esm-es5/keys-db1897ae.js +0 -1
  131. package/dist/esm-es5/sqm-code-verification.entry.js +0 -1
  132. package/dist/esm-es5/sqm-email-verification.entry.js +0 -1
  133. package/dist/esm-es5/sqm-invoice-table-view-d1cfdaf4.js +0 -1
  134. package/dist/esm-es5/sqm-scroll.entry.js +0 -1
  135. package/dist/esm-es5/sqm-widget-verification-internal.entry.js +0 -1
  136. package/dist/esm-es5/sqm-widget-verification.entry.js +0 -1
  137. package/dist/esm-es5/usePayoutStatus-1a635054.js +0 -1
  138. package/dist/esm-es5/useVerificationEmail-c32696ba.js +0 -1
  139. package/dist/mint-components/p-1712a9fd.entry.js +0 -11
  140. package/dist/mint-components/p-1e616d45.system.js +0 -1
  141. package/dist/mint-components/p-24092973.entry.js +0 -9
  142. package/dist/mint-components/p-26468242.js +0 -1
  143. package/dist/mint-components/p-331d060e.entry.js +0 -223
  144. package/dist/mint-components/p-3925bcd6.entry.js +0 -13
  145. package/dist/mint-components/p-39840341.js +0 -1
  146. package/dist/mint-components/p-4364001c.entry.js +0 -12
  147. package/dist/mint-components/p-4bd7a472.js +0 -1
  148. package/dist/mint-components/p-517224ef.js +0 -19
  149. package/dist/mint-components/p-5a23b560.system.entry.js +0 -1
  150. package/dist/mint-components/p-64491210.system.entry.js +0 -1
  151. package/dist/mint-components/p-8300d8c8.system.js +0 -1
  152. package/dist/mint-components/p-8bddb468.system.entry.js +0 -1
  153. package/dist/mint-components/p-9596e97c.system.entry.js +0 -1
  154. package/dist/mint-components/p-974070c4.system.entry.js +0 -1
  155. package/dist/mint-components/p-a85f57bb.entry.js +0 -1
  156. package/dist/mint-components/p-a8645c1b.system.js +0 -1
  157. package/dist/mint-components/p-b2a99637.system.js +0 -1
  158. package/dist/mint-components/p-b62faaa5.system.entry.js +0 -1
  159. package/dist/mint-components/p-c05e7b9f.entry.js +0 -195
  160. package/dist/mint-components/p-c510fb88.entry.js +0 -1
  161. package/dist/mint-components/p-c7057066.system.entry.js +0 -1
  162. package/dist/mint-components/p-d7806f31.js +0 -48
  163. package/dist/mint-components/p-e01ac27c.system.js +0 -1
  164. package/dist/mint-components/p-e45a8501.system.entry.js +0 -1
  165. package/dist/mint-components/p-e990dc21.system.js +0 -1
  166. package/dist/mint-components/p-ead27698.system.entry.js +0 -1
  167. package/dist/mint-components/p-f340214f.entry.js +0 -25
  168. package/dist/types/components/sqm-payout-button-scroll/PayoutButtonScroll.stories.d.ts +0 -5
  169. package/dist/types/components/sqm-payout-button-scroll/sqm-payout-button-scroll-view.d.ts +0 -10
  170. package/dist/types/components/sqm-payout-button-scroll/sqm-payout-button-scroll.d.ts +0 -26
  171. package/dist/types/components/sqm-payout-button-scroll/usePayoutButton.d.ts +0 -7
  172. package/dist/types/components/sqm-widget-verification/keys.d.ts +0 -4
  173. package/dist/types/components/sqm-widget-verification/sqm-code-verification/WidgetCodeVerification.stories.d.ts +0 -9
  174. package/dist/types/components/sqm-widget-verification/sqm-code-verification/sqm-code-verification-view.d.ts +0 -26
  175. package/dist/types/components/sqm-widget-verification/sqm-code-verification/sqm-code-verification.d.ts +0 -54
  176. package/dist/types/components/sqm-widget-verification/sqm-code-verification/useCodeVerification.d.ts +0 -25
  177. package/dist/types/components/sqm-widget-verification/sqm-email-verification/WidgetEmailVerification.stories.d.ts +0 -10
  178. package/dist/types/components/sqm-widget-verification/sqm-email-verification/sqm-email-verification-view.d.ts +0 -21
  179. package/dist/types/components/sqm-widget-verification/sqm-email-verification/sqm-email-verification.d.ts +0 -40
  180. package/dist/types/components/sqm-widget-verification/sqm-email-verification/useEmailVerification.d.ts +0 -10
  181. package/dist/types/components/sqm-widget-verification/sqm-widget-verification-internal.d.ts +0 -20
  182. package/dist/types/components/sqm-widget-verification/sqm-widget-verification.d.ts +0 -87
  183. package/dist/types/components/sqm-widget-verification/useVerificationEmail.d.ts +0 -14
  184. package/dist/types/components/tax-and-cash/sqm-payout-status-alert/PayoutStatusAlert.stories.d.ts +0 -10
  185. package/dist/types/components/tax-and-cash/sqm-payout-status-alert/sqm-payout-status-alert-view.d.ts +0 -30
  186. package/dist/types/components/tax-and-cash/sqm-payout-status-alert/sqm-payout-status-alert.d.ts +0 -62
  187. package/dist/types/components/tax-and-cash/sqm-payout-status-alert/usePayoutStatus.d.ts +0 -21
@@ -16,10 +16,7 @@ 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-c58966f8.js');
20
- const keys = require('./keys-cff24974.js');
21
- const usePayoutStatus = require('./usePayoutStatus-b9fb7399.js');
22
- const extractProps = require('./extractProps-fd93ba62.js');
19
+ const sqmInvoiceTableView = require('./sqm-invoice-table-view-a9133a11.js');
23
20
 
24
21
  const TAX_CONTEXT_NAMESPACE = "sq:tax-and-cash";
25
22
  const TAX_FORM_CONTEXT_NAMESPACE = "sq:tax-form-context";
@@ -35,17 +32,11 @@ const GET_USER = index_module.dist.gql `
35
32
  query getUserTaxInfo {
36
33
  user: viewer {
37
34
  ... on User {
38
- id
39
35
  firstName
40
36
  lastName
41
37
  email
42
38
  countryCode
43
39
  customFields
44
- managedIdentity {
45
- uid
46
- email
47
- emailVerified
48
- }
49
40
  impactConnection {
50
41
  connected
51
42
  user {
@@ -89,7 +80,6 @@ const GET_USER = index_module.dist.gql `
89
80
  }
90
81
  payoutsAccount {
91
82
  hold
92
- holdReasons
93
83
  balance
94
84
  }
95
85
  }
@@ -953,21 +943,6 @@ const SAVE_WITHDRAWAL_SETTINGS = index_module.dist.gql `
953
943
  }
954
944
  }
955
945
  `;
956
- const UPDATE_WITHDRAWAL_SETTINGS = index_module.dist.gql `
957
- mutation updateImpactPublisherWithdrawalSettings(
958
- $updateImpactPublisherWithdrawalSettingsInput: UpdateImpactPublisherWithdrawalSettingsInput!
959
- ) {
960
- updateImpactPublisherWithdrawalSettings(
961
- updateImpactPublisherWithdrawalSettingsInput: $updateImpactPublisherWithdrawalSettingsInput
962
- ) {
963
- success
964
- validationErrors {
965
- field
966
- message
967
- }
968
- }
969
- }
970
- `;
971
946
  function getPaymentMethod(paymentOption) {
972
947
  if (paymentOption.defaultFinancePaymentMethodId === 3 ||
973
948
  paymentOption.defaultFinancePaymentMethodId === 5)
@@ -985,7 +960,6 @@ function parseImpactThreshold(threshold) {
985
960
  }
986
961
  function useBankingInfoForm(props) {
987
962
  var _a, _b, _c, _d, _e, _f, _g, _h;
988
- const host = index_module.T();
989
963
  const locale = index_module.Q();
990
964
  const user = index_module.K();
991
965
  const [step, setStep] = index_module.Mn(TAX_CONTEXT_NAMESPACE);
@@ -995,9 +969,6 @@ function useBankingInfoForm(props) {
995
969
  const { data: paymentOptionsData, loading: paymentOptionsLoading, errors: paymentOptionsError, } = index_module.qn(FINANCE_NETWORK_SETTINGS_NAMESPACE);
996
970
  const { data: userData, refetch, errors: userError, } = index_module.qn(USER_QUERY_NAMESPACE);
997
971
  const [saveWithdrawalSettings] = index_module.xe(SAVE_WITHDRAWAL_SETTINGS);
998
- const [updateWithdrawalSettings] = index_module.xe(UPDATE_WITHDRAWAL_SETTINGS);
999
- const [showVerification, setShowVerification] = stencilHooks_module.useState(false);
1000
- const [currentFormData, setCurrentFormData] = stencilHooks_module.useState(null);
1001
972
  const [formState, setFormState] = stencilHooks_module.useState({});
1002
973
  const [currentPaymentOption, setCurrentPaymentOption] = stencilHooks_module.useState(null);
1003
974
  const [loading, setLoading] = stencilHooks_module.useState(false);
@@ -1007,9 +978,8 @@ function useBankingInfoForm(props) {
1007
978
  const [countrySearch, setCountrySearch] = stencilHooks_module.useState("");
1008
979
  const [filteredCountries, setFilteredCountries] = stencilHooks_module.useState(countries || []);
1009
980
  const currency = ((_c = (_b = (_a = userData === null || userData === void 0 ? void 0 : userData.user) === null || _a === void 0 ? void 0 : _a.impactConnection) === null || _b === void 0 ? void 0 : _b.publisher) === null || _c === void 0 ? void 0 : _c.currency) || "";
1010
- const isPartner = !!((_f = (_e = (_d = userData === null || userData === void 0 ? void 0 : userData.user) === null || _d === void 0 ? void 0 : _d.impactConnection) === null || _e === void 0 ? void 0 : _e.publisher) === null || _f === void 0 ? void 0 : _f.withdrawalSettings);
1011
981
  const feeCap = paypalFeeMap[currency] || "";
1012
- const paymentOptions = (_g = paymentOptionsData === null || paymentOptionsData === void 0 ? void 0 : paymentOptionsData.impactFinanceNetworkSettings) === null || _g === void 0 ? void 0 : _g.data;
982
+ const paymentOptions = (_d = paymentOptionsData === null || paymentOptionsData === void 0 ? void 0 : paymentOptionsData.impactFinanceNetworkSettings) === null || _d === void 0 ? void 0 : _d.data;
1013
983
  const paymentMethodFeeMap = {
1014
984
  [ACH_PAYMENT_METHOD]: props.eftWithdrawalLabel,
1015
985
  [WIRE_PAYMENT_METHOD]: global.intl.formatMessage({
@@ -1088,50 +1058,49 @@ function useBankingInfoForm(props) {
1088
1058
  setFormState((p) => ({ ...p, bankCountry }));
1089
1059
  setCurrentPaymentOption(currentPaymentOption);
1090
1060
  };
1091
- const runMutation = async (formData, token) => {
1092
- var _a, _b, _c, _d, _e, _f, _g, _h, _j;
1061
+ const onSubmit = async (event) => {
1062
+ var _a, _b, _c, _d;
1063
+ let formData = {};
1064
+ let validationErrors = {};
1065
+ const controls = event.target.getFormControls();
1066
+ controls.forEach((control) => {
1067
+ if (!control.name || !control.id)
1068
+ return;
1069
+ const key = control.name;
1070
+ const value = control.value;
1071
+ jsonpointer.jsonpointer.set(formData, key, value);
1072
+ if (control.required && !value) {
1073
+ jsonpointer.jsonpointer.set(validationErrors, key, { type: "required" });
1074
+ }
1075
+ });
1076
+ setErrors({ inputErrors: validationErrors });
1077
+ if (Object.keys(validationErrors).length) {
1078
+ return;
1079
+ }
1093
1080
  setLoading(true);
1094
1081
  try {
1095
1082
  if (!currentPaymentOption)
1096
1083
  throw new Error("No currentPaymentOption");
1097
- const body = {
1098
- user: {
1099
- id: user.id,
1100
- accountId: user.accountId,
1084
+ const input = {
1085
+ setImpactPublisherWithdrawalSettingsInput: {
1086
+ user: {
1087
+ id: user.id,
1088
+ accountId: user.accountId,
1089
+ },
1090
+ ...formData,
1091
+ paymentMethod: getPaymentMethod(currentPaymentOption),
1092
+ paymentSchedulingType: paymentScheduleChecked,
1101
1093
  },
1102
- ...formData,
1103
- paymentMethod: getPaymentMethod(currentPaymentOption),
1104
- paymentSchedulingType: paymentScheduleChecked,
1105
1094
  };
1106
- let response = null;
1107
- let success = null;
1108
- let validationErrors = null;
1109
- // Call difference mutations based on whether the user is updating
1110
- // the info for setting it for the first time
1111
- if (isPartner) {
1112
- response = await updateWithdrawalSettings({
1113
- updateImpactPublisherWithdrawalSettingsInput: {
1114
- ...body,
1115
- accessKey: token,
1116
- },
1117
- });
1118
- success = (_b = (_a = response) === null || _a === void 0 ? void 0 : _a.updateImpactPublisherWithdrawalSettings) === null || _b === void 0 ? void 0 : _b.success;
1119
- validationErrors = (_d = (_c = response) === null || _c === void 0 ? void 0 : _c.updateImpactPublisherWithdrawalSettings) === null || _d === void 0 ? void 0 : _d.validationErrors;
1120
- }
1121
- else {
1122
- response = await saveWithdrawalSettings({
1123
- setImpactPublisherWithdrawalSettingsInput: {
1124
- ...body,
1125
- },
1126
- });
1127
- success = (_f = (_e = response) === null || _e === void 0 ? void 0 : _e.setImpactPublisherWithdrawalSettings) === null || _f === void 0 ? void 0 : _f.success;
1128
- validationErrors = (_h = (_g = response) === null || _g === void 0 ? void 0 : _g.setImpactPublisherWithdrawalSettings) === null || _h === void 0 ? void 0 : _h.validationErrors;
1129
- }
1130
- if (!response || ((_j = response) === null || _j === void 0 ? void 0 : _j.message)) {
1095
+ const response = await saveWithdrawalSettings(input);
1096
+ if (!response || ((_a = response) === null || _a === void 0 ? void 0 : _a.message)) {
1131
1097
  throw new Error();
1132
1098
  }
1133
- else if (!success) {
1134
- console.error("Validation failed: ", validationErrors);
1099
+ else if (!((_b = response
1100
+ .setImpactPublisherWithdrawalSettings) === null || _b === void 0 ? void 0 : _b.success)) {
1101
+ console.error("Validation failed: ", (_c = response
1102
+ .setImpactPublisherWithdrawalSettings) === null || _c === void 0 ? void 0 : _c.validationErrors);
1103
+ const validationErrors = (_d = response.setImpactPublisherWithdrawalSettings) === null || _d === void 0 ? void 0 : _d.validationErrors;
1135
1104
  const mappedValidationErrors = validationErrors === null || validationErrors === void 0 ? void 0 : validationErrors.reduce((agg, error) => {
1136
1105
  return {
1137
1106
  ...agg,
@@ -1157,45 +1126,6 @@ function useBankingInfoForm(props) {
1157
1126
  setLoading(false);
1158
1127
  }
1159
1128
  };
1160
- const onSubmit = async (event) => {
1161
- let formData = {};
1162
- let validationErrors = {};
1163
- const controls = event.target.getFormControls();
1164
- controls.forEach((control) => {
1165
- if (!control.name || !control.id)
1166
- return;
1167
- const key = control.name;
1168
- const value = control.value;
1169
- jsonpointer.jsonpointer.set(formData, key, value);
1170
- if (control.required && !value) {
1171
- jsonpointer.jsonpointer.set(validationErrors, key, { type: "required" });
1172
- }
1173
- });
1174
- setErrors({ inputErrors: validationErrors });
1175
- if (Object.keys(validationErrors).length) {
1176
- return;
1177
- }
1178
- let token = undefined;
1179
- if (isPartner) {
1180
- setShowVerification(true);
1181
- token = await new Promise((res) => {
1182
- const cb = (e) => {
1183
- e.stopPropagation();
1184
- host.removeEventListener(keys.VERIFICATION_EVENT_KEY, cb);
1185
- res(e.detail.token);
1186
- };
1187
- host.addEventListener(keys.VERIFICATION_EVENT_KEY, cb);
1188
- });
1189
- setShowVerification(false);
1190
- }
1191
- await runMutation(formData, token);
1192
- };
1193
- const onVerification = async (token) => {
1194
- host.dispatchEvent(new CustomEvent(keys.VERIFICATION_EVENT_KEY, {
1195
- detail: { token },
1196
- bubbles: false,
1197
- }));
1198
- };
1199
1129
  function setPaymentMethodChecked(paymentMethod) {
1200
1130
  _setPaymentMethodChecked(paymentMethod);
1201
1131
  if (paymentMethod === "toPayPalAccount") {
@@ -1220,15 +1150,13 @@ function useBankingInfoForm(props) {
1220
1150
  setPaymentScheduleChecked,
1221
1151
  onBack: () => setStep("/dashboard"),
1222
1152
  setCountrySearch,
1223
- onVerification,
1224
1153
  },
1225
1154
  states: {
1226
- showVerification,
1227
1155
  step: step === null || step === void 0 ? void 0 : step.replace("/", ""),
1228
1156
  hideSteps: !!context.hideSteps,
1229
1157
  saveDisabled: !paymentMethodChecked || !paymentScheduleChecked,
1230
1158
  locale,
1231
- isPartner,
1159
+ isPartner: !!((_g = (_f = (_e = userData === null || userData === void 0 ? void 0 : userData.user) === null || _e === void 0 ? void 0 : _e.impactConnection) === null || _f === void 0 ? void 0 : _f.publisher) === null || _g === void 0 ? void 0 : _g.withdrawalSettings),
1232
1160
  feeCap,
1233
1161
  paymentMethodFeeLabel,
1234
1162
  disabled: loading,
@@ -1559,9 +1487,6 @@ const BankingInfoForm = class {
1559
1487
  padding: "var(--sl-spacing-x-small)",
1560
1488
  },
1561
1489
  };
1562
- if (props.states.isPartner && props.states.showVerification) {
1563
- return (index.h("sqm-code-verification", { onVerification: props.callbacks.onVerification }));
1564
- }
1565
1490
  return (index.h(index.Host, null, index.h(BankingInfoFormView, { callbacks: props.callbacks, text: props.text, states: props.states, refs: props.refs, slots: {
1566
1491
  formInputsSlot: inputFields === null || inputFields === void 0 ? void 0 : inputFields.map(({ input }) => input),
1567
1492
  countryInputSlot: (index.h("sl-select", Object.assign({ label: props.text.bankLocationLabel, required: true, name: "/bankCountry", id: "bankCountry", value: props.states.formState.bankCountry || "", "onSl-select": (e) => { var _a, _b; return props.callbacks.setBankCountry((_b = (_a = e.detail) === null || _a === void 0 ? void 0 : _a.item) === null || _b === void 0 ? void 0 : _b.value); } }, (((_a = errors === null || errors === void 0 ? void 0 : errors.inputErrors) === null || _a === void 0 ? void 0 : _a.bankCountry) && {
@@ -1694,7 +1619,6 @@ function useDemoBankingInfoForm(props) {
1694
1619
  setPaymentScheduleChecked,
1695
1620
  setCountrySearch: () => { },
1696
1621
  onBack: async () => setStep("/dashboard"),
1697
- onVerification: () => { },
1698
1622
  },
1699
1623
  text: props.getTextProps(),
1700
1624
  refs: {
@@ -1876,14 +1800,6 @@ const style$1 = {
1876
1800
  MessageContainer: {
1877
1801
  maxWidth: "400px",
1878
1802
  },
1879
- IFrameContainer: {
1880
- "@media screen and (max-width: 440px)": {
1881
- position: "absolute",
1882
- width: "100vw",
1883
- left: "-30px",
1884
- zIndex: "9999",
1885
- },
1886
- },
1887
1803
  };
1888
1804
  const sheet$1 = JSS.createStyleSheet(style$1);
1889
1805
  const styleString$1 = sheet$1.toString();
@@ -1925,7 +1841,6 @@ const DocusignLoadingView = () => {
1925
1841
  index.h("sl-spinner", { style: { fontSize: "50px", margin: "40px" } }))));
1926
1842
  };
1927
1843
  const DocusignIframe = ({ states, data, callbacks, text, }) => {
1928
- const { classes } = sheet$1;
1929
1844
  const [iFrameHeight, setiFrameHeight] = stencilHooks_module.useState("100%");
1930
1845
  const allowedDomains = [
1931
1846
  "referralsaasquatch.com",
@@ -1948,7 +1863,7 @@ const DocusignIframe = ({ states, data, callbacks, text, }) => {
1948
1863
  return () => {
1949
1864
  window.removeEventListener("message", callback, false);
1950
1865
  };
1951
- }, [iFrameHeight]);
1866
+ }, []);
1952
1867
  if (states.urlLoading)
1953
1868
  return index.h(DocusignLoadingView, null);
1954
1869
  if (DOCUSIGN_ERROR_STATES.includes(states.status)) {
@@ -1956,11 +1871,7 @@ const DocusignIframe = ({ states, data, callbacks, text, }) => {
1956
1871
  }
1957
1872
  if (DOCUSIGN_EXPIRED_STATES.includes(states.status))
1958
1873
  return index.h(DocusignExpiredView, { text: text });
1959
- // Wrap iFrame with container that shares the same height to push other elements down when absolute positioned
1960
- return (index.h("div", { style: { height: iFrameHeight } },
1961
- index.h("style", { type: "text/css" }, styleString$1),
1962
- index.h("div", { class: classes.IFrameContainer },
1963
- index.h("iframe", { scrolling: "yes", frameBorder: "0", width: "100%", src: data.documentUrl, height: iFrameHeight }))));
1874
+ return (index.h("iframe", { scrolling: "yes", frameBorder: "0", src: data.documentUrl, width: "100%", height: iFrameHeight }));
1964
1875
  };
1965
1876
 
1966
1877
  const style$2 = {
@@ -3794,9 +3705,27 @@ const TableRow = class {
3794
3705
  }
3795
3706
  };
3796
3707
 
3708
+ /**
3709
+ * Util function for getting just the props with a certain prefix.
3710
+ * @param props Text props on stencil component
3711
+ * @param prefix Prefix denoting which group the text prop belongs to
3712
+ * @returns A new object with all keys with the prefix provided. The prefix is removed from each key.
3713
+ */
3714
+ function extractProps(props, prefix) {
3715
+ const keys = Object.keys(props).filter((k) => k.startsWith(prefix));
3716
+ const formattedProps = keys.reduce((prev, k) => {
3717
+ const key = k.replace(prefix, "");
3718
+ return {
3719
+ ...prev,
3720
+ [key]: props[k],
3721
+ };
3722
+ }, {});
3723
+ return formattedProps;
3724
+ }
3725
+
3797
3726
  function getCurrentStep(user) {
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)) {
3727
+ var _a;
3728
+ if (!((_a = user.impactConnection) === null || _a === void 0 ? void 0 : _a.connected)) {
3800
3729
  return "/1";
3801
3730
  }
3802
3731
  const { requiredTaxDocumentType, currentTaxDocument, withdrawalSettings, brandedSignup, } = user.impactConnection.publisher;
@@ -4690,14 +4619,14 @@ const TaxAndCashMonolith = class {
4690
4619
  * @uiGroup Dashboard Properties
4691
4620
  * @uiWidget textArea
4692
4621
  */
4693
- this.payoutHoldAlertHeader = "Your payout is on hold";
4622
+ this.dashboard_errorTitleText = "Your payout is on hold ";
4694
4623
  /**
4695
4624
  * Part of the alert displayed at the top of the page when there’s been an issue preventing payouts.
4696
4625
  * @uiName Payout error message description
4697
4626
  * @uiGroup Dashboard Properties
4698
4627
  * @uiWidget textArea
4699
4628
  */
4700
- this.payoutHoldAlertDescription = "Please contact Support or check your inbox for an email from our referral program provider, impact.com.";
4629
+ 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.";
4701
4630
  /**
4702
4631
  * Text displayed for existing publishers that do not have saved banking information.
4703
4632
  * @uiName Payout missing information subtext
@@ -4847,7 +4776,7 @@ const TaxAndCashMonolith = class {
4847
4776
  getGeneralStepTextProps(prefix) {
4848
4777
  const props = utils.getProps(this);
4849
4778
  return {
4850
- ...extractProps.extractProps(props, prefix),
4779
+ ...extractProps(props, prefix),
4851
4780
  generalErrorTitle: props.generalErrorTitle,
4852
4781
  generalErrorDescription: props.generalErrorDescription,
4853
4782
  fieldRequiredError: props.fieldRequiredError,
@@ -4912,12 +4841,6 @@ const style$5 = {
4912
4841
  borderTop: "none",
4913
4842
  },
4914
4843
  },
4915
- HoldAlertContainer: {
4916
- "&::part(base)": {
4917
- border: "none",
4918
- backgroundColor: "transparent",
4919
- },
4920
- },
4921
4844
  ExpiringSoonAlertContainer: {
4922
4845
  "&::part(base)": {
4923
4846
  backgroundColor: "var(--sl-color-yellow-100)",
@@ -5157,22 +5080,6 @@ const TaxAndCashDashboardView = (props) => {
5157
5080
  index.h("strong", null, text.error.generalTitle),
5158
5081
  index.h("br", null),
5159
5082
  text.error.generalDescription)),
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" })),
5176
5083
  index.h("sl-dialog", { label: text.replaceTaxFormModalHeader, class: sheet$4.classes.Dialog, open: states.showNewFormDialog, "onSl-hide": callbacks.onNewFormCancel },
5177
5084
  index.h("p", null, text.replaceTaxFormModalBodyText),
5178
5085
  index.h("sl-button", { slot: "footer", type: "primary", class: sheet$4.classes.DialogButton, onClick: callbacks.onNewFormClick }, text.newFormButton),
@@ -5278,11 +5185,10 @@ function getIndirectTaxType(taxInformation) {
5278
5185
  return "Indirect Tax";
5279
5186
  }
5280
5187
  const useTaxAndCashDashboard = (props) => {
5281
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
5188
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
5282
5189
  const setStep = index_module.Sn(TAX_CONTEXT_NAMESPACE);
5283
5190
  const setContext = index_module.Sn(TAX_FORM_CONTEXT_NAMESPACE);
5284
5191
  const [showDialog, setShowDialog] = stencilHooks_module.useState(false);
5285
- const [showVerification, setShowVerification] = stencilHooks_module.useState(false);
5286
5192
  const locale = index_module.Q();
5287
5193
  stencilHooks_module.useEffect(() => {
5288
5194
  // Clear override context once on submitted
@@ -5313,7 +5219,6 @@ const useTaxAndCashDashboard = (props) => {
5313
5219
  setStep("/3");
5314
5220
  };
5315
5221
  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);
5317
5222
  return {
5318
5223
  states: {
5319
5224
  dateSubmitted,
@@ -5335,16 +5240,12 @@ const useTaxAndCashDashboard = (props) => {
5335
5240
  loading,
5336
5241
  loadingError: !!(userError === null || userError === void 0 ? void 0 : userError.message),
5337
5242
  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,
5341
5243
  },
5342
5244
  callbacks: {
5343
5245
  onClick: () => setShowDialog(true),
5344
5246
  onEditPayoutInfo,
5345
5247
  onNewFormCancel: () => setShowDialog(false),
5346
5248
  onNewFormClick,
5347
- onVerifyIdentityCancel: () => setShowVerification(false),
5348
5249
  },
5349
5250
  text: props.getTextProps(),
5350
5251
  };
@@ -5516,35 +5417,18 @@ const TaxAndCashDashboard = class {
5516
5417
  * @uiName Payout error message title
5517
5418
  * @uiWidget textArea
5518
5419
  */
5519
- this.payoutHoldAlertHeader = "Your payout is on hold";
5420
+ this.errorTitleText = "Your payout is on hold ";
5520
5421
  /**
5521
5422
  * Part of the alert displayed at the top of the page when there’s been an issue preventing payouts.
5522
5423
  * @uiName Payout error message description
5523
5424
  * @uiWidget textArea
5524
5425
  */
5525
- this.payoutHoldAlertDescription = "Please contact Support or check your inbox for an email from our referral program provider, impact.com.";
5426
+ 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.";
5526
5427
  /**
5527
5428
  * Text displayed for existing publishers that do not have saved banking information.
5528
5429
  * @uiName Payout missing information subtext
5529
5430
  */
5530
5431
  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";
5548
5432
  /**
5549
5433
  * Part of the alert displayed at the top of the page.
5550
5434
  * @uiName Form submission error message title
@@ -5667,16 +5551,12 @@ function useDemoTaxAndCashDashboard(props) {
5667
5551
  disabled: false,
5668
5552
  loading: false,
5669
5553
  showNewFormDialog: false,
5670
- hasHold: false,
5671
- showVerifyIdentity: false,
5672
- payoutStatus: "DONE",
5673
5554
  },
5674
5555
  callbacks: {
5675
5556
  onClick: () => console.debug("check step"),
5676
5557
  onEditPayoutInfo: () => console.debug("payout info"),
5677
5558
  onNewFormCancel: () => console.log("hide"),
5678
5559
  onNewFormClick: () => console.log("show"),
5679
- onVerifyIdentityCancel: () => console.log("hide"),
5680
5560
  },
5681
5561
  text: props.getTextProps(),
5682
5562
  }, props.demoData || {}, { arrayMerge: (_, a) => a });
@@ -6733,7 +6613,7 @@ const style$6 = {
6733
6613
  },
6734
6614
  PhoneInputsSection: {
6735
6615
  display: "flex",
6736
- alignItems: "flex-end",
6616
+ alignItems: "flex-start",
6737
6617
  flexDirection: "column",
6738
6618
  gap: "4px",
6739
6619
  "& p": {
@@ -6744,7 +6624,7 @@ const style$6 = {
6744
6624
  },
6745
6625
  PhoneInputsContainer: {
6746
6626
  display: "flex",
6747
- alignItems: "flex-end",
6627
+ alignItems: "flex-start",
6748
6628
  gap: "4px",
6749
6629
  width: "100%",
6750
6630
  "& #phoneNumber": {
@@ -6966,20 +6846,17 @@ function useUserInfoForm(props) {
6966
6846
  const [filteredCurrencies, setFilteredCurrencies] = stencilHooks_module.useState(currencies || []);
6967
6847
  const [formErrors, setErrors] = stencilHooks_module.useState({});
6968
6848
  stencilHooks_module.useEffect(() => {
6969
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
6849
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j;
6970
6850
  const user = data === null || data === void 0 ? void 0 : data.user;
6971
6851
  if (!user || step !== "/1")
6972
6852
  return;
6973
6853
  // If form already filled out, skip initialising it
6974
6854
  if (sqmInvoiceTableView.objectIsFull(userFormContext))
6975
6855
  return;
6976
- // Prefer MI email if it was verified before this
6977
- const email = ((_a = user.managedIdentity) === null || _a === void 0 ? void 0 : _a.emailVerified) ? user.managedIdentity.email
6978
- : user.email;
6979
- if (((_b = user.impactConnection) === null || _b === void 0 ? void 0 : _b.publisher) && ((_c = user.impactConnection) === null || _c === void 0 ? void 0 : _c.user)) {
6856
+ if (((_a = user.impactConnection) === null || _a === void 0 ? void 0 : _a.publisher) && ((_b = user.impactConnection) === null || _b === void 0 ? void 0 : _b.user)) {
6980
6857
  // Initialise with partner information
6981
6858
  setUserFormContext({
6982
- email,
6859
+ email: user.email,
6983
6860
  firstName: user.impactConnection.user.firstName,
6984
6861
  lastName: user.impactConnection.user.lastName,
6985
6862
  countryCode: user.impactConnection.publisher.countryCode,
@@ -6995,17 +6872,17 @@ function useUserInfoForm(props) {
6995
6872
  else if (!(userFormContext === null || userFormContext === void 0 ? void 0 : userFormContext.email)) {
6996
6873
  // Initialise with user information
6997
6874
  setUserFormContext({
6998
- email,
6875
+ email: user.email,
6999
6876
  firstName: user.firstName,
7000
6877
  lastName: user.lastName,
7001
6878
  countryCode: user.countryCode || "US",
7002
- currency: (_d = user.customFields) === null || _d === void 0 ? void 0 : _d.currency,
7003
- phoneNumberCountryCode: ((_e = user.customFields) === null || _e === void 0 ? void 0 : _e.phoneNumberCountryCode) || "US",
7004
- phoneNumber: (_f = user.customFields) === null || _f === void 0 ? void 0 : _f.phoneNumber,
7005
- address: (_g = user.customFields) === null || _g === void 0 ? void 0 : _g.address,
7006
- city: (_h = user.customFields) === null || _h === void 0 ? void 0 : _h.city,
7007
- state: (_j = user.customFields) === null || _j === void 0 ? void 0 : _j.state,
7008
- postalCode: (_k = user.customFields) === null || _k === void 0 ? void 0 : _k.postalCode,
6879
+ currency: (_c = user.customFields) === null || _c === void 0 ? void 0 : _c.currency,
6880
+ phoneNumberCountryCode: ((_d = user.customFields) === null || _d === void 0 ? void 0 : _d.phoneNumberCountryCode) || "US",
6881
+ phoneNumber: (_e = user.customFields) === null || _e === void 0 ? void 0 : _e.phoneNumber,
6882
+ address: (_f = user.customFields) === null || _f === void 0 ? void 0 : _f.address,
6883
+ city: (_g = user.customFields) === null || _g === void 0 ? void 0 : _g.city,
6884
+ state: (_h = user.customFields) === null || _h === void 0 ? void 0 : _h.state,
6885
+ postalCode: (_j = user.customFields) === null || _j === void 0 ? void 0 : _j.postalCode,
7009
6886
  });
7010
6887
  }
7011
6888
  }, [data, step, userFormContext]);