@saasquatch/mint-components 2.0.3-2 → 2.0.3

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 (89) hide show
  1. package/dist/cjs/{ShadowViewAddon-ae3a32c3.js → ShadowViewAddon-fbc33c53.js} +3 -3
  2. package/dist/cjs/{data-44260010.js → data-16106637.js} +2 -29
  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_10.cjs.entry.js +76 -341
  6. package/dist/cjs/sqm-big-stat_47.cjs.entry.js +12 -213
  7. package/dist/cjs/sqm-header-logo.cjs.entry.js +2 -15
  8. package/dist/cjs/sqm-stencilbook.cjs.entry.js +3 -24
  9. package/dist/collection/components/sqm-header-logo/sqm-header-logo.js +5 -85
  10. package/dist/collection/components/sqm-hero-image/sqm-hero-image.js +1 -1
  11. package/dist/collection/components/sqm-image/sqm-image.js +1 -1
  12. package/dist/collection/components/sqm-portal-footer/sqm-portal-footer-view.js +3 -3
  13. package/dist/collection/components/tax-and-cash/TaxForm.stories.js +0 -1
  14. package/dist/collection/components/tax-and-cash/sqm-banking-info-form/useBankingInfoForm.js +5 -10
  15. package/dist/collection/components/tax-and-cash/sqm-docusign-form/useDocusignForm.js +5 -11
  16. package/dist/collection/components/tax-and-cash/sqm-indirect-tax-form/useIndirectTaxForm.js +40 -46
  17. package/dist/collection/components/tax-and-cash/sqm-payout-status-alert/PayoutStatusAlert.stories.js +0 -13
  18. package/dist/collection/components/tax-and-cash/sqm-payout-status-alert/sqm-payout-status-alert-view.js +1 -95
  19. package/dist/collection/components/tax-and-cash/sqm-payout-status-alert/sqm-payout-status-alert.js +7 -360
  20. package/dist/collection/components/tax-and-cash/sqm-payout-status-alert/usePayoutStatus.js +2 -29
  21. package/dist/collection/components/tax-and-cash/sqm-tax-and-cash/sqm-tax-and-cash.js +11 -311
  22. package/dist/collection/components/tax-and-cash/sqm-tax-and-cash-dashboard/sqm-tax-and-cash-dashboard-view.js +1 -96
  23. package/dist/collection/components/tax-and-cash/sqm-tax-and-cash-dashboard/sqm-tax-and-cash-dashboard.js +10 -310
  24. package/dist/collection/components/tax-and-cash/sqm-tax-and-cash-dashboard/useTaxAndCashDashboard.js +1 -7
  25. package/dist/collection/components/tax-and-cash/sqm-user-info-form/sqm-user-info-form-view.js +12 -23
  26. package/dist/collection/components/tax-and-cash/sqm-user-info-form/sqm-user-info-form.js +1 -1
  27. package/dist/collection/components/tax-and-cash/sqm-user-info-form/useUserInfoForm.js +9 -100
  28. package/dist/esm/{ShadowViewAddon-78a1c35c.js → ShadowViewAddon-7a242b65.js} +3 -3
  29. package/dist/esm/{data-68816061.js → data-acdb790f.js} +2 -29
  30. package/dist/esm/loader.js +1 -1
  31. package/dist/esm/mint-components.js +1 -1
  32. package/dist/esm/sqm-banking-info-form_10.entry.js +76 -341
  33. package/dist/esm/sqm-big-stat_47.entry.js +12 -213
  34. package/dist/esm/sqm-header-logo.entry.js +2 -15
  35. package/dist/esm/sqm-stencilbook.entry.js +3 -24
  36. package/dist/esm-es5/{ShadowViewAddon-78a1c35c.js → ShadowViewAddon-7a242b65.js} +1 -1
  37. package/dist/esm-es5/{data-68816061.js → data-acdb790f.js} +2 -2
  38. package/dist/esm-es5/loader.js +1 -1
  39. package/dist/esm-es5/mint-components.js +1 -1
  40. package/dist/esm-es5/sqm-banking-info-form_10.entry.js +1 -1
  41. package/dist/esm-es5/sqm-big-stat_47.entry.js +1 -1
  42. package/dist/esm-es5/sqm-header-logo.entry.js +1 -1
  43. package/dist/esm-es5/sqm-stencilbook.entry.js +1 -1
  44. package/dist/mint-components/mint-components.esm.js +1 -1
  45. package/dist/mint-components/p-012d31bc.entry.js +99 -0
  46. package/dist/mint-components/p-2ea6e2fa.entry.js +273 -0
  47. package/dist/mint-components/p-303b84d7.system.entry.js +1 -0
  48. package/dist/mint-components/p-469a6450.system.js +6 -0
  49. package/dist/mint-components/p-6976099f.entry.js +9 -0
  50. package/dist/mint-components/p-752ede25.system.entry.js +1 -0
  51. package/dist/mint-components/p-947bacd1.system.js +1 -1
  52. package/dist/mint-components/p-97747228.system.entry.js +1 -0
  53. package/dist/mint-components/p-a7ee19dc.entry.js +1 -0
  54. package/dist/mint-components/{p-e3ee8c37.system.js → p-d7635535.system.js} +1 -1
  55. package/dist/mint-components/p-e1e7d01c.js +157 -0
  56. package/dist/mint-components/p-eea87fdc.system.entry.js +1 -0
  57. package/dist/mint-components/{p-ee83de0e.js → p-ffc3cd7c.js} +1 -1
  58. package/dist/types/components/sqm-header-logo/sqm-header-logo.d.ts +2 -17
  59. package/dist/types/components/sqm-hero-image/sqm-hero-image.d.ts +1 -1
  60. package/dist/types/components/sqm-image/sqm-image.d.ts +1 -1
  61. package/dist/types/components/tax-and-cash/sqm-indirect-tax-form/useIndirectTaxForm.d.ts +0 -24
  62. package/dist/types/components/tax-and-cash/sqm-payout-status-alert/PayoutStatusAlert.stories.d.ts +0 -7
  63. package/dist/types/components/tax-and-cash/sqm-payout-status-alert/sqm-payout-status-alert-view.d.ts +0 -16
  64. package/dist/types/components/tax-and-cash/sqm-payout-status-alert/sqm-payout-status-alert.d.ts +0 -57
  65. package/dist/types/components/tax-and-cash/sqm-payout-status-alert/usePayoutStatus.d.ts +1 -3
  66. package/dist/types/components/tax-and-cash/sqm-tax-and-cash/sqm-tax-and-cash.d.ts +0 -48
  67. package/dist/types/components/tax-and-cash/sqm-tax-and-cash-dashboard/sqm-tax-and-cash-dashboard-view.d.ts +0 -12
  68. package/dist/types/components/tax-and-cash/sqm-tax-and-cash-dashboard/sqm-tax-and-cash-dashboard.d.ts +0 -48
  69. package/dist/types/components/tax-and-cash/sqm-user-info-form/sqm-user-info-form-view.d.ts +0 -2
  70. package/dist/types/components/tax-and-cash/sqm-user-info-form/useUserInfoForm.d.ts +0 -1
  71. package/dist/types/components.d.ts +43 -335
  72. package/docs/docs.docx +0 -0
  73. package/docs/raisins.json +1 -1
  74. package/grapesjs/grapesjs.js +1 -1
  75. package/package.json +1 -1
  76. package/dist/mint-components/p-18790f90.entry.js +0 -106
  77. package/dist/mint-components/p-38a100b4.system.entry.js +0 -1
  78. package/dist/mint-components/p-3f661133.system.entry.js +0 -1
  79. package/dist/mint-components/p-775214ef.entry.js +0 -273
  80. package/dist/mint-components/p-7e550c3b.system.entry.js +0 -1
  81. package/dist/mint-components/p-92b5c376.js +0 -157
  82. package/dist/mint-components/p-9a3ff9b9.entry.js +0 -9
  83. package/dist/mint-components/p-a2dbc9ad.system.js +0 -6
  84. package/dist/mint-components/p-bdb6194c.entry.js +0 -1
  85. package/dist/mint-components/p-c7ac295d.system.entry.js +0 -1
  86. package/dist/types/global/android.d.ts +0 -7
  87. package/dist/types/global/demo.d.ts +0 -2
  88. package/dist/types/stories/features.d.ts +0 -4
  89. package/dist/types/stories/templates.d.ts +0 -4
@@ -15,7 +15,7 @@ import { g as generateUserError } from './useReferralTable-909ccb28.js';
15
15
  import { a as INDIRECT_TAX_SPAIN_REGIONS, b as INDIRECT_TAX_PROVINCES, O as OtherRegionSlotView, I as InvoiceTableView, v as vatLabels, A as ADDRESS_REGIONS } from './IndirectTaxDetailsView-8dec05e4.js';
16
16
  import { t as taxTypeToName, v as validTaxDocument, g as getCountryObj, L as LoadingView, f as formatErrorMessage, a as validateBillingField, o as objectIsFull } from './utils-2695a43e.js';
17
17
  import { b as VERIFICATION_EVENT_KEY } from './keys-406491dc.js';
18
- import { i as FORM_STEPS, a as TAX_FORM_CONTEXT_NAMESPACE, S as SORTED_COUNTRIES_NAMESPACE, c as USER_QUERY_NAMESPACE, T as TAX_CONTEXT_NAMESPACE, F as FINANCE_NETWORK_SETTINGS_NAMESPACE, j as TAX_FORM_UPDATED_EVENT_KEY, U as USER_FORM_CONTEXT_NAMESPACE, d as COUNTRIES_QUERY_NAMESPACE, k as useVeriffApp, l as getStatus, V as VERIFF_COMPLETE_EVENT_KEY, C as CURRENCIES_NAMESPACE } from './data-68816061.js';
18
+ import { i as FORM_STEPS, a as TAX_FORM_CONTEXT_NAMESPACE, S as SORTED_COUNTRIES_NAMESPACE, c as USER_QUERY_NAMESPACE, T as TAX_CONTEXT_NAMESPACE, F as FINANCE_NETWORK_SETTINGS_NAMESPACE, j as TAX_FORM_UPDATED_EVENT_KEY, U as USER_FORM_CONTEXT_NAMESPACE, d as COUNTRIES_QUERY_NAMESPACE, k as useVeriffApp, l as getStatus, V as VERIFF_COMPLETE_EVENT_KEY, C as CURRENCIES_NAMESPACE } from './data-acdb790f.js';
19
19
 
20
20
  function getFormMap({ props, getValidationErrorMessage, bankCountry, }) {
21
21
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32;
@@ -899,6 +899,10 @@ function useBankingInfoForm(props) {
899
899
  const paymentMethodChecked = !hasPayPal
900
900
  ? "toBankAccount"
901
901
  : _paymentMethodChecked;
902
+ useEffect(() => {
903
+ // reset redirect hash
904
+ window.location.hash = "";
905
+ }, []);
902
906
  useEffect(() => {
903
907
  var _a, _b, _c, _d, _e, _f, _g, _h, _j;
904
908
  if (!userData)
@@ -1070,7 +1074,6 @@ function useBankingInfoForm(props) {
1070
1074
  }
1071
1075
  await runMutation(formData, token);
1072
1076
  setShowModal(false);
1073
- window.location.hash = "";
1074
1077
  };
1075
1078
  const onVerification = async (token) => {
1076
1079
  host.dispatchEvent(new CustomEvent(VERIFICATION_EVENT_KEY, {
@@ -1100,15 +1103,7 @@ function useBankingInfoForm(props) {
1100
1103
  setBankCountry: updateBankCountry,
1101
1104
  setPaymentMethodChecked,
1102
1105
  setPaymentScheduleChecked,
1103
- onBack: () => {
1104
- // return to dashboard
1105
- if (window.location.hash) {
1106
- window.location.hash = "";
1107
- }
1108
- else {
1109
- setStep("/dashboard");
1110
- }
1111
- },
1106
+ onBack: () => setStep("/dashboard"),
1112
1107
  setCountrySearch,
1113
1108
  onVerification,
1114
1109
  onVerificationHide: () => onVerification(null),
@@ -1781,17 +1776,11 @@ function useDocusignForm(props) {
1781
1776
  }
1782
1777
  };
1783
1778
  const progressStep = () => {
1784
- // return to dashboard
1785
- if (window.location.hash) {
1786
- window.location.hash = "";
1787
- }
1788
- else {
1789
- setStep(context.overrideNextStep ||
1790
- !!(publisher === null || publisher === void 0 ? void 0 : publisher.withdrawalSettings) ||
1791
- !(publisher === null || publisher === void 0 ? void 0 : publisher.brandedSignup)
1792
- ? "/dashboard"
1793
- : "/4");
1794
- }
1779
+ setStep(context.overrideNextStep ||
1780
+ !!(publisher === null || publisher === void 0 ? void 0 : publisher.withdrawalSettings) ||
1781
+ !(publisher === null || publisher === void 0 ? void 0 : publisher.brandedSignup)
1782
+ ? "/dashboard"
1783
+ : "/4");
1795
1784
  };
1796
1785
  const allLoading = userLoading || documentLoading || loading;
1797
1786
  return {
@@ -2618,51 +2607,8 @@ function useIndirectTaxForm(props) {
2618
2607
  console.error("Could not detect select change");
2619
2608
  setFormState((p) => ({ ...p, [field]: value }));
2620
2609
  };
2621
- async function connectPartner(formData) {
2622
- var _a, _b, _c, _d, _e;
2623
- const vars = {
2624
- user: {
2625
- id: user.id,
2626
- accountId: user.accountId,
2627
- },
2628
- firstName: userForm.firstName,
2629
- lastName: userForm.lastName,
2630
- countryCode: userForm.countryCode,
2631
- currency: userForm.currency,
2632
- address: userForm.address,
2633
- city: userForm.city,
2634
- state: userForm.state,
2635
- postalCode: userForm.postalCode,
2636
- phoneNumber: userForm.phoneNumber,
2637
- phoneNumberCountryCode: userForm.phoneNumberCountryCode,
2638
- indirectTaxCountryCode: formData.selectedRegion,
2639
- indirectTaxRegion: formData.province || formData.subRegion,
2640
- indirectTaxId: formData.indirectTaxNumber,
2641
- additionalTaxId: formData.qstNumber,
2642
- withholdingTaxId: formData.subRegionTaxNumber,
2643
- };
2644
- const result = await connectImpactPartner({
2645
- vars,
2646
- });
2647
- if (!result || ((_a = result) === null || _a === void 0 ? void 0 : _a.message))
2648
- throw new Error();
2649
- if (!((_b = result.createImpactConnection) === null || _b === void 0 ? void 0 : _b.success)) {
2650
- // Output backend errors to console for now
2651
- console.error("Failed to create Impact connection: ", result.createImpactConnection.validationErrors);
2652
- throw new Error();
2653
- }
2654
- await refetch();
2655
- const resultPublisher = (_e = (_d = (_c = result
2656
- .createImpactConnection) === null || _c === void 0 ? void 0 : _c.user) === null || _d === void 0 ? void 0 : _d.impactConnection) === null || _e === void 0 ? void 0 : _e.publisher;
2657
- const hasValidCurrentDocument = validTaxDocument(resultPublisher === null || resultPublisher === void 0 ? void 0 : resultPublisher.requiredTaxDocumentType) && (resultPublisher === null || resultPublisher === void 0 ? void 0 : resultPublisher.currentTaxDocument);
2658
- // Fire form change event
2659
- window.dispatchEvent(new Event(TAX_FORM_UPDATED_EVENT_KEY));
2660
- return {
2661
- resultPublisher,
2662
- hasValidCurrentDocument,
2663
- };
2664
- }
2665
2610
  const onSubmit = async (event) => {
2611
+ var _a, _b, _c, _d, _e;
2666
2612
  if (!option) {
2667
2613
  setErrors({ taxDetails: true });
2668
2614
  return;
@@ -2688,7 +2634,44 @@ function useIndirectTaxForm(props) {
2688
2634
  }
2689
2635
  setLoading(true);
2690
2636
  try {
2691
- const { resultPublisher, hasValidCurrentDocument } = await connectPartner(formData);
2637
+ const vars = {
2638
+ user: {
2639
+ id: user.id,
2640
+ accountId: user.accountId,
2641
+ },
2642
+ firstName: userForm.firstName,
2643
+ lastName: userForm.lastName,
2644
+ countryCode: userForm.countryCode,
2645
+ currency: userForm.currency,
2646
+ address: userForm.address,
2647
+ city: userForm.city,
2648
+ state: userForm.state,
2649
+ postalCode: userForm.postalCode,
2650
+ phoneNumber: userForm.phoneNumber,
2651
+ phoneNumberCountryCode: userForm.phoneNumberCountryCode,
2652
+ indirectTaxCountryCode: formData.selectedRegion,
2653
+ indirectTaxRegion: formData.province || formData.subRegion,
2654
+ indirectTaxId: formData.indirectTaxNumber,
2655
+ additionalTaxId: formData.qstNumber,
2656
+ withholdingTaxId: formData.subRegionTaxNumber,
2657
+ };
2658
+ const result = await connectImpactPartner({
2659
+ vars,
2660
+ });
2661
+ if (!result || ((_a = result) === null || _a === void 0 ? void 0 : _a.message))
2662
+ throw new Error();
2663
+ if (!((_b = result.createImpactConnection) === null || _b === void 0 ? void 0 : _b.success)) {
2664
+ // Output backend errors to console for now
2665
+ console.error("Failed to create Impact connection: ", result.createImpactConnection
2666
+ .validationErrors);
2667
+ throw new Error();
2668
+ }
2669
+ await refetch();
2670
+ const resultPublisher = (_e = (_d = (_c = result
2671
+ .createImpactConnection) === null || _c === void 0 ? void 0 : _c.user) === null || _d === void 0 ? void 0 : _d.impactConnection) === null || _e === void 0 ? void 0 : _e.publisher;
2672
+ const hasValidCurrentDocument = validTaxDocument(resultPublisher === null || resultPublisher === void 0 ? void 0 : resultPublisher.requiredTaxDocumentType) && (resultPublisher === null || resultPublisher === void 0 ? void 0 : resultPublisher.currentTaxDocument);
2673
+ // Fire form change event
2674
+ window.dispatchEvent(new Event(TAX_FORM_UPDATED_EVENT_KEY));
2692
2675
  if ((resultPublisher === null || resultPublisher === void 0 ? void 0 : resultPublisher.requiredTaxDocumentType) &&
2693
2676
  !hasValidCurrentDocument) {
2694
2677
  // Go to docusign form
@@ -3929,11 +3912,6 @@ const style$5 = {
3929
3912
  SubduedText: {
3930
3913
  color: "var(--sqm-text-subdued)",
3931
3914
  },
3932
- ButtonContainer: {
3933
- display: "flex",
3934
- gap: "var(--sl-spacing-medium)",
3935
- flexWrap: "wrap",
3936
- },
3937
3915
  };
3938
3916
  const sheet$4 = createStyleSheet(style$5);
3939
3917
  const styleString$4 = sheet$4.toString();
@@ -4046,7 +4024,7 @@ const TaxAndCashDashboardView = (props) => {
4046
4024
  icon: "exclamation-octagon",
4047
4025
  class: sheet$4.classes.ErrorHoldAlertContainer,
4048
4026
  };
4049
- case "NEW_PAYEE_REVIEW":
4027
+ case "ACCOUNT_REVIEW":
4050
4028
  return {
4051
4029
  header: text.accountReviewHeader,
4052
4030
  description: intl.formatMessage({
@@ -4060,96 +4038,6 @@ const TaxAndCashDashboardView = (props) => {
4060
4038
  icon: "exclamation-triangle",
4061
4039
  class: sheet$4.classes.WarningHoldAlertContainer,
4062
4040
  };
4063
- case "PAYMENT_HOLD_ON_CHANGE":
4064
- return {
4065
- header: text.paymentHoldOnChangeHeader,
4066
- description: intl.formatMessage({
4067
- id: "accountReviewDescription",
4068
- defaultMessage: text.paymentHoldOnChangeDescription,
4069
- }, {
4070
- supportLink: (h("a", { target: "_blank", href: `mailto:advocate-support@impact.com` }, text.supportLink)),
4071
- }),
4072
- buttonText: null,
4073
- alertType: "warning",
4074
- icon: "exclamation-triangle",
4075
- class: sheet$4.classes.WarningHoldAlertContainer,
4076
- };
4077
- case "BENEFICIARY_NAME_INVALID":
4078
- return {
4079
- header: text.beneficiaryNameInvalidHeader,
4080
- description: intl.formatMessage({
4081
- id: "accountReviewDescription",
4082
- defaultMessage: text.beneficiaryNameInvalidDescription,
4083
- }, {
4084
- supportLink: (h("a", { target: "_blank", href: `mailto:advocate-support@impact.com` }, text.supportLink)),
4085
- }),
4086
- button: (h("div", { class: sheet$4.classes.ButtonContainer },
4087
- h("sl-button", { disabled: states.disabled || states.loading, type: "primary", class: sheet$4.classes.EditBankDetailsButton, onClick: callbacks.onEditPayoutInfo }, text.editPaymentInformationButton),
4088
- h("sl-button", { disabled: states.disabled || states.loading, type: "default", class: sheet$4.classes.EditBankDetailsButton, onClick: callbacks.onNewFormClick }, text.newFormButton))),
4089
- alertType: "warning",
4090
- icon: "exclamation-triangle",
4091
- class: sheet$4.classes.WarningHoldAlertContainer,
4092
- };
4093
- case "BENEFICIARY_NAME_MISMATCH":
4094
- return {
4095
- header: text.beneficiaryNameMismatchHeader,
4096
- description: intl.formatMessage({
4097
- id: "accountReviewDescription",
4098
- defaultMessage: text.beneficiaryNameMismatchDescription,
4099
- }, {
4100
- supportLink: (h("a", { target: "_blank", href: `mailto:advocate-support@impact.com` }, text.supportLink)),
4101
- }),
4102
- button: (h("div", { class: sheet$4.classes.ButtonContainer },
4103
- h("sl-button", { disabled: states.disabled || states.loading, type: "primary", class: sheet$4.classes.EditBankDetailsButton, onClick: callbacks.onEditPayoutInfo }, text.editPaymentInformationButton),
4104
- h("sl-button", { disabled: states.disabled || states.loading, type: "default", class: sheet$4.classes.EditBankDetailsButton, onClick: callbacks.onNewFormClick }, text.newFormButton))),
4105
- alertType: "warning",
4106
- icon: "exclamation-triangle",
4107
- class: sheet$4.classes.WarningHoldAlertContainer,
4108
- };
4109
- case "BANK_TAX_NAME_MISMATCH":
4110
- return {
4111
- header: text.bankTaxNameMismatchHeader,
4112
- description: intl.formatMessage({
4113
- id: "accountReviewDescription",
4114
- defaultMessage: text.bankTaxNameMismatchDescription,
4115
- }, {
4116
- supportLink: (h("a", { target: "_blank", href: `mailto:advocate-support@impact.com` }, text.supportLink)),
4117
- }),
4118
- button: (h("div", { class: sheet$4.classes.ButtonContainer },
4119
- h("sl-button", { disabled: states.disabled || states.loading, type: "primary", class: sheet$4.classes.EditBankDetailsButton, onClick: callbacks.onEditPayoutInfo }, text.editPaymentInformationButton),
4120
- h("sl-button", { disabled: states.disabled || states.loading, type: "default", class: sheet$4.classes.EditBankDetailsButton, onClick: callbacks.onNewFormClick }, text.newFormButton))),
4121
- alertType: "warning",
4122
- icon: "exclamation-triangle",
4123
- class: sheet$4.classes.WarningHoldAlertContainer,
4124
- };
4125
- case "WITHDRAWAL_SETTINGS_INVALID":
4126
- return {
4127
- header: text.withdrawalSettingsInvalidHeader,
4128
- description: intl.formatMessage({
4129
- id: "accountReviewDescription",
4130
- defaultMessage: text.withdrawalSettingsInvalidDescription,
4131
- }, {
4132
- supportLink: (h("a", { target: "_blank", href: `mailto:advocate-support@impact.com` }, text.supportLink)),
4133
- }),
4134
- button: (h("sl-button", { disabled: states.disabled || states.loading, type: "default", class: sheet$4.classes.EditBankDetailsButton, onClick: callbacks.onEditPayoutInfo }, text.editPaymentInformationButton)),
4135
- alertType: "warning",
4136
- icon: "exclamation-triangle",
4137
- class: sheet$4.classes.WarningHoldAlertContainer,
4138
- };
4139
- case "PAYMENT_RETURNED":
4140
- return {
4141
- header: text.paymentReturnedHeader,
4142
- description: intl.formatMessage({
4143
- id: "accountReviewDescription",
4144
- defaultMessage: text.paymentReturnedDescription,
4145
- }, {
4146
- supportLink: (h("a", { target: "_blank", href: `mailto:advocate-support@impact.com` }, text.supportLink)),
4147
- }),
4148
- button: (h("sl-button", { disabled: states.disabled || states.loading, type: "primary", class: sheet$4.classes.EditBankDetailsButton, onClick: callbacks.onEditPayoutInfo }, text.editPaymentInformationButton)),
4149
- alertType: "error",
4150
- icon: "exclamation-triangle",
4151
- class: sheet$4.classes.WarningHoldAlertContainer,
4152
- };
4153
4041
  case "HOLD":
4154
4042
  return {
4155
4043
  header: text.payoutHoldAlertHeader,
@@ -4406,14 +4294,8 @@ const useTaxAndCashDashboard = (props) => {
4406
4294
  useEffect(() => {
4407
4295
  // Clear override context once on submitted
4408
4296
  setContext({});
4409
- if (window.location.hash) {
4410
- setContext({
4411
- overrideNextStep: "/dashboard",
4412
- overrideBackStep: "/dashboard",
4413
- hideSteps: true,
4414
- });
4297
+ if (window.location.hash)
4415
4298
  setStep(`/${window.location.hash.replace("#", "")}`);
4416
- }
4417
4299
  }, []);
4418
4300
  const { data, loading, errors: userError, refetch, } = $n(USER_QUERY_NAMESPACE);
4419
4301
  const publisher = (_b = (_a = data === null || data === void 0 ? void 0 : data.user) === null || _a === void 0 ? void 0 : _a.impactConnection) === null || _b === void 0 ? void 0 : _b.publisher;
@@ -4618,12 +4500,12 @@ const TaxAndCashDashboard = class {
4618
4500
  /**
4619
4501
  * @uiName Submit new tax form button label
4620
4502
  */
4621
- this.newFormButton = "Submit new tax form";
4503
+ this.newFormButton = "Submit new form";
4622
4504
  /**
4623
4505
  *
4624
4506
  * @uiName Edit payment info button label
4625
4507
  */
4626
- this.editPaymentInformationButton = "Edit payout information";
4508
+ this.editPaymentInformationButton = "Edit Payout Information";
4627
4509
  /**
4628
4510
  * @uiName Not registered for indirect tax text
4629
4511
  * @uiWidget textArea
@@ -4684,7 +4566,7 @@ const TaxAndCashDashboard = class {
4684
4566
  /**
4685
4567
  * @uiName Verification required internal alert header
4686
4568
  */
4687
- this.verificationRequiredInternalHeader = "Identity verification in progress";
4569
+ this.verificationRequiredInternalHeader = "Identity Verification in Progress";
4688
4570
  /**
4689
4571
  * @uiName Verification required internal alert description
4690
4572
  */
@@ -4692,7 +4574,7 @@ const TaxAndCashDashboard = class {
4692
4574
  /**
4693
4575
  * @uiName Verification review internal alert header
4694
4576
  */
4695
- this.verificationReviewInternalHeader = "Identity verification under review";
4577
+ this.verificationReviewInternalHeader = "Identity Verification Under Review";
4696
4578
  /**
4697
4579
  * @uiName Verification review internal alert description
4698
4580
  */
@@ -4700,7 +4582,7 @@ const TaxAndCashDashboard = class {
4700
4582
  /**
4701
4583
  * @uiName Verification failed internal alert header
4702
4584
  */
4703
- this.verificationFailedInternalHeader = "Identity verification unsuccessful";
4585
+ this.verificationFailedInternalHeader = "Identity Verification Unsuccessful";
4704
4586
  /**
4705
4587
  * @uiName Verification failed internal alert description
4706
4588
  */
@@ -4726,54 +4608,6 @@ const TaxAndCashDashboard = class {
4726
4608
  * @uiName Account review alert description
4727
4609
  */
4728
4610
  this.accountReviewDescription = "This process takes 48 hours, payouts are on hold until it's completed. You will receive an email from our referral provider, Impact.com, if any issues arise. It contains details on how to resolve this issue. If you need further assistance, please reach out to our {supportLink}.";
4729
- /**
4730
- * @uiName Payment hold on change alert header
4731
- */
4732
- this.paymentHoldOnChangeHeader = "We are reviewing your new payout settings";
4733
- /**
4734
- * @uiName Payment hold on change alert description
4735
- */
4736
- this.paymentHoldOnChangeDescription = "Your payout is temporarily on hold while we review your new payment information, this process is usually resolved within 48 hours.";
4737
- /**
4738
- * @uiName Beneficiary name invalid alert header
4739
- */
4740
- this.beneficiaryNameInvalidHeader = "Your payment information does not match your tax form";
4741
- /**
4742
- * @uiName Beneficiary name invalid description
4743
- */
4744
- this.beneficiaryNameInvalidDescription = "The account holder (beneficiary) name in your payment information does not match what was submitted in your tax form. Please review and update your payment information or tax form so that they match exactly and do not include any invalid characters. Your payouts are on hold until this is resolved.";
4745
- /**
4746
- * @uiName Beneficiary name mismatch alert header
4747
- */
4748
- this.beneficiaryNameMismatchHeader = "Your payment information does not match your tax form";
4749
- /**
4750
- * @uiName Beneficiary name mismatch alert description
4751
- */
4752
- this.beneficiaryNameMismatchDescription = "The account holder (beneficiary) name in your payment information does not match what was submitted in your tax form. Please review and update your payment information or tax form so that they match exactly and do not include any invalid characters. Your payouts are on hold until this is resolved.";
4753
- /**
4754
- * @uiName Bank name mismatch alert header
4755
- */
4756
- this.bankTaxNameMismatchHeader = "Your payment information does not match your tax form";
4757
- /**
4758
- * @uiName Bank name mismatch alert description
4759
- */
4760
- this.bankTaxNameMismatchDescription = "The bank account (beneficiary) name in your payment information does not match what was submitted in your tax form. Please review and update your payment information or tax form so that they match exactly and do not include any invalid characters. Your payouts are on hold until this is resolved.";
4761
- /**
4762
- * @uiName Withdrawal settings invalid alert header
4763
- */
4764
- this.withdrawalSettingsInvalidHeader = "Your payment information is incomplete or includes invalid characters";
4765
- /**
4766
- * @uiName Withdrawal settings invalid alert description
4767
- */
4768
- this.withdrawalSettingsInvalidDescription = "There are missing fields or invalid characters in your payment information. Please review your information and make sure it is correct. Your payouts are on hold until this is resolved.";
4769
- /**
4770
- * @uiName Payment returned alert header
4771
- */
4772
- this.paymentReturnedHeader = "Payout unsuccessful";
4773
- /**
4774
- * @uiName Payment returned alert description
4775
- */
4776
- this.paymentReturnedDescription = "Our recent payment attempt for your earnings was unsuccessful. Please review your payment information and make sure it is correct.";
4777
4611
  /**
4778
4612
  * @uiName Terms and Conditions text
4779
4613
  */
@@ -6192,12 +6026,6 @@ const UserInfoFormView = (props) => {
6192
6026
  default:
6193
6027
  regionLabel = text.state;
6194
6028
  }
6195
- function isDisabledInput(field) {
6196
- var _a;
6197
- if (states.isPartner && !!((_a = data.partnerData) === null || _a === void 0 ? void 0 : _a[field]))
6198
- return true;
6199
- return false;
6200
- }
6201
6029
  return (h("sl-form", { class: classes.FormWrapper, "onSl-submit": callbacks.onSubmit, ref: (el) => (refs.formRef.current = el), novalidate: true },
6202
6030
  h("style", { type: "text/css" },
6203
6031
  styleString$5,
@@ -6238,22 +6066,18 @@ const UserInfoFormView = (props) => {
6238
6066
  })))),
6239
6067
  h("div", null,
6240
6068
  h("div", { class: classes.InputContainer },
6241
- h("sl-input", Object.assign({ class: "ErrorInput", exportparts: "label: input-label, base: input-base", value: formState.firstName, label: text.firstName, disabled: states.disabled ||
6242
- states.isUser ||
6243
- isDisabledInput("firstName") }, (((_b = formState.errors) === null || _b === void 0 ? void 0 : _b.firstName) ? {
6069
+ h("sl-input", Object.assign({ class: "ErrorInput", exportparts: "label: input-label, base: input-base", value: formState.firstName, label: text.firstName, disabled: states.disabled || states.isUser || states.isPartner }, (((_b = formState.errors) === null || _b === void 0 ? void 0 : _b.firstName) ? {
6244
6070
  class: classes.ErrorInput,
6245
6071
  helpText: formatErrorMessage(text.firstName, formState.errors.firstName),
6246
6072
  }
6247
6073
  : {}), { id: "firstName", name: "/firstName", required: true })),
6248
- h("sl-input", Object.assign({ exportparts: "label: input-label, base: input-base", value: formState.lastName, label: text.lastName, disabled: states.disabled ||
6249
- states.isUser ||
6250
- isDisabledInput("lastName") }, (((_c = formState.errors) === null || _c === void 0 ? void 0 : _c.lastName) ? {
6074
+ h("sl-input", Object.assign({ exportparts: "label: input-label, base: input-base", value: formState.lastName, label: text.lastName, disabled: states.disabled || states.isUser || states.isPartner }, (((_c = formState.errors) === null || _c === void 0 ? void 0 : _c.lastName) ? {
6251
6075
  class: classes.ErrorInput,
6252
6076
  helpText: formatErrorMessage(text.lastName, formState.errors.lastName),
6253
6077
  }
6254
6078
  : {}), { id: "lastName", name: "/lastName", required: true })),
6255
6079
  h("sl-input", { exportparts: "label: input-label, base: input-base", value: formState.email, label: text.email, disabled: true, id: "email", name: "/email", required: true }),
6256
- h("sl-select", Object.assign({ id: "countryCode", exportparts: "label: input-label, base: input-base", name: "/countryCode", label: text.country, value: formState.countryCode, disabled: states.disabled || isDisabledInput("countryCode") }, (((_d = formState.errors) === null || _d === void 0 ? void 0 : _d.countryCode) ? {
6080
+ h("sl-select", Object.assign({ id: "countryCode", exportparts: "label: input-label, base: input-base", name: "/countryCode", label: text.country, value: formState.countryCode, disabled: states.disabled || states.isPartner }, (((_d = formState.errors) === null || _d === void 0 ? void 0 : _d.countryCode) ? {
6257
6081
  class: classes.ErrorInput,
6258
6082
  helpText: formatErrorMessage(text.country, formState.errors.countryCode),
6259
6083
  }
@@ -6269,8 +6093,7 @@ const UserInfoFormView = (props) => {
6269
6093
  h("div", { class: classes.PhoneInputsSection },
6270
6094
  h("p", null, text.phoneNumber),
6271
6095
  h("div", { class: classes.PhoneInputsContainer },
6272
- h("sl-select", Object.assign({ id: "phoneNumberCountryCode", exportparts: "label: input-label, base: input-base", name: "/phoneNumberCountryCode", value: formState.phoneNumberCountryCode, disabled: states.disabled ||
6273
- isDisabledInput("phoneNumberCountryCode"), ref: (el) => (refs.phoneCountryRef.current = el) }, (((_g = formState.errors) === null || _g === void 0 ? void 0 : _g.phoneNumberCountryCode) ? {
6096
+ h("sl-select", Object.assign({ id: "phoneNumberCountryCode", exportparts: "label: input-label, base: input-base", name: "/phoneNumberCountryCode", value: formState.phoneNumberCountryCode, disabled: states.disabled || states.isPartner, ref: (el) => (refs.phoneCountryRef.current = el) }, (((_g = formState.errors) === null || _g === void 0 ? void 0 : _g.phoneNumberCountryCode) ? {
6274
6097
  class: classes.ErrorInput,
6275
6098
  }
6276
6099
  : {}), { required: true, "onSl-select": (e) => callbacks.onFormChange("phoneCountry", e) }),
@@ -6296,7 +6119,7 @@ const UserInfoFormView = (props) => {
6296
6119
  // Naive phone number validation
6297
6120
  validateBillingField(/[a-zA-Z]+/, value) &&
6298
6121
  formatErrorMessage(text.phoneNumber, text.error.fieldInvalidError);
6299
- }, disabled: states.disabled || isDisabledInput("phoneNumber") }, (((_k = formState.errors) === null || _k === void 0 ? void 0 : _k.phoneNumber) ? {
6122
+ }, disabled: states.disabled || states.isPartner }, (((_k = formState.errors) === null || _k === void 0 ? void 0 : _k.phoneNumber) ? {
6300
6123
  class: classes.ErrorInput,
6301
6124
  helpText: formatErrorMessage(text.phoneNumber, formState.errors.phoneNumber),
6302
6125
  }
@@ -6304,7 +6127,7 @@ const UserInfoFormView = (props) => {
6304
6127
  h("sl-input", Object.assign({ exportparts: "label: input-label, base: input-base", label: text.address, id: "address", name: "/address", value: formState.address, validationError: ({ value }) =>
6305
6128
  // Checks for non-ASCII characters
6306
6129
  !validateBillingField(/^[\x20-\xFF]+$/, value) &&
6307
- formatErrorMessage(text.address, text.error.invalidCharacterError), disabled: states.disabled || isDisabledInput("billingAddress") }, (((_l = formState.errors) === null || _l === void 0 ? void 0 : _l.address) ? {
6130
+ formatErrorMessage(text.address, text.error.invalidCharacterError), disabled: states.disabled || states.isPartner }, (((_l = formState.errors) === null || _l === void 0 ? void 0 : _l.address) ? {
6308
6131
  class: classes.ErrorInput,
6309
6132
  helpText: formatErrorMessage(text.address, formState.errors.address),
6310
6133
  }
@@ -6312,22 +6135,22 @@ const UserInfoFormView = (props) => {
6312
6135
  h("sl-input", Object.assign({ exportparts: "label: input-label, base: input-base", label: text.city, id: "city", name: "/city", value: formState.city, validationError: ({ value }) =>
6313
6136
  // Checks for non-ASCII characters
6314
6137
  !validateBillingField(/^[\x20-\xFF]+$/, value) &&
6315
- formatErrorMessage(text.city, text.error.invalidCharacterError), disabled: states.disabled || isDisabledInput("billingCity") }, (((_m = formState.errors) === null || _m === void 0 ? void 0 : _m.city) ? {
6138
+ formatErrorMessage(text.city, text.error.invalidCharacterError), disabled: states.disabled || states.isPartner }, (((_m = formState.errors) === null || _m === void 0 ? void 0 : _m.city) ? {
6316
6139
  class: classes.ErrorInput,
6317
6140
  helpText: formatErrorMessage(text.city, formState.errors.city),
6318
6141
  }
6319
6142
  : {}), { required: true })),
6320
- !states.hideState && (h("sl-select", Object.assign({ label: regionLabel, exportparts: "label: input-label, base: input-base", id: "state", name: "/state", value: formState.state, disabled: states.disabled || isDisabledInput("billingState") }, (((_o = formState.errors) === null || _o === void 0 ? void 0 : _o.state) ? {
6143
+ !states.hideState && (h("sl-select", Object.assign({ label: regionLabel, exportparts: "label: input-label, base: input-base", id: "state", name: "/state", value: formState.state, disabled: states.disabled || states.isPartner }, (((_o = formState.errors) === null || _o === void 0 ? void 0 : _o.state) ? {
6321
6144
  class: classes.ErrorInput,
6322
6145
  helpText: formatErrorMessage(text.state, formState.errors.state),
6323
6146
  }
6324
6147
  : {}), { required: true }), (_p = data.regions) === null || _p === void 0 ? void 0 : _p.map((r) => (h("sl-menu-item", { value: r.value }, r.label))))),
6325
- h("sl-input", Object.assign({ label: text.postalCode, exportparts: "label: input-label, base: input-base", id: "postalCode", name: "/postalCode", value: formState.postalCode, disabled: states.disabled || isDisabledInput("billingPostalCode") }, (((_q = formState.errors) === null || _q === void 0 ? void 0 : _q.postalCode) ? {
6148
+ h("sl-input", Object.assign({ label: text.postalCode, exportparts: "label: input-label, base: input-base", id: "postalCode", name: "/postalCode", value: formState.postalCode, disabled: states.disabled || states.isPartner }, (((_q = formState.errors) === null || _q === void 0 ? void 0 : _q.postalCode) ? {
6326
6149
  class: classes.ErrorInput,
6327
6150
  helpText: formatErrorMessage(text.postalCode, formState.errors.postalCode),
6328
6151
  }
6329
6152
  : {}), { required: true })),
6330
- h("sl-select", Object.assign({ id: "currency", exportparts: "label: input-label, base: input-base", name: "/currency", label: text.currency, menu: true, value: formState.currency, disabled: states.disabled || isDisabledInput("currency"), helpText: text.currencyHelpText }, (((_r = formState.errors) === null || _r === void 0 ? void 0 : _r.currency) ? {
6153
+ h("sl-select", Object.assign({ id: "currency", exportparts: "label: input-label, base: input-base", name: "/currency", label: text.currency, menu: true, value: formState.currency, disabled: states.disabled || states.isPartner, helpText: text.currencyHelpText }, (((_r = formState.errors) === null || _r === void 0 ? void 0 : _r.currency) ? {
6331
6154
  class: classes.ErrorInput,
6332
6155
  helpText: formatErrorMessage(text.currency, formState.errors.currency),
6333
6156
  }
@@ -6349,21 +6172,13 @@ const UserInfoFormView = (props) => {
6349
6172
  h("div", { class: classes.CheckboxWrapper },
6350
6173
  h("sl-checkbox", { checked: formState.allowBankingCollection === true, "onSl-change": (e) => {
6351
6174
  e.target.value = e.target.checked;
6352
- }, disabled: states.disabled, required: true, value: formState.allowBankingCollection, id: "allowBankingCollection", name: "/allowBankingCollection" }, bankingCollectionText),
6175
+ }, disabled: states.isPartner ? false : states.disabled, required: true, value: formState.allowBankingCollection, id: "allowBankingCollection", name: "/allowBankingCollection" }, bankingCollectionText),
6353
6176
  ((_u = formState.errors) === null || _u === void 0 ? void 0 : _u.allowBankingCollection) && (h("p", { class: classes.ErrorText }, formatErrorMessage(text.termsAndConditionsLabel, formState.errors.allowBankingCollection))))),
6354
- h("sl-button", { type: "primary", disabled: states.disabled, submit: true, exportparts: "base: primarybutton-base" }, text.continueButton))))));
6177
+ h("sl-button", { type: "primary", disabled: states.isPartner ? false : states.disabled, submit: true, exportparts: "base: primarybutton-base" }, text.continueButton))))));
6355
6178
  };
6356
6179
 
6357
- const GET_INDIRECT_TAX_COUNTRY_CODE = dist.gql `
6358
- query getIndirectTaxCountryCode {
6359
- tenantSettings {
6360
- impactBrandCountryCode
6361
- impactBrandIndirectTaxCountryCode
6362
- }
6363
- }
6364
- `;
6365
6180
  function useUserInfoForm(props) {
6366
- var _a, _b, _c, _d, _e, _f, _g;
6181
+ var _a, _b, _c, _d;
6367
6182
  const currencyRef = useRef(undefined);
6368
6183
  const phoneCountryRef = useRef(undefined);
6369
6184
  const formRef = useRef(null);
@@ -6371,10 +6186,7 @@ function useUserInfoForm(props) {
6371
6186
  const countries = Fn(SORTED_COUNTRIES_NAMESPACE);
6372
6187
  const [step, setStep] = Pn(TAX_CONTEXT_NAMESPACE);
6373
6188
  const [userFormContext, setUserFormContext] = Pn(USER_FORM_CONTEXT_NAMESPACE);
6374
- const user = J();
6375
- const [connectImpactPartner, { loading: connectLoading, errors: connectErrors },] = $e(CONNECT_PARTNER);
6376
- const { data: tenantData } = wn(GET_INDIRECT_TAX_COUNTRY_CODE, {});
6377
- const { data, loading, refetch, errors: userError, } = $n(USER_QUERY_NAMESPACE);
6189
+ const { data, loading, errors: userError, } = $n(USER_QUERY_NAMESPACE);
6378
6190
  const _currencies = Fn(CURRENCIES_NAMESPACE);
6379
6191
  const currencies = useMemo(() => [...(_currencies || [])].sort((a, b) => a.displayName.localeCompare(b.displayName)), [_currencies]);
6380
6192
  const [countrySearch, setCountrySearch] = useState("");
@@ -6476,45 +6288,6 @@ function useUserInfoForm(props) {
6476
6288
  setFilteredCurrencies(currencies.filter((c) => c.currencyCode.toLowerCase().includes(currencySearch.toLowerCase())) || []);
6477
6289
  }
6478
6290
  }, [currencySearch, currencies]);
6479
- async function connectPartner(formData) {
6480
- var _a, _b, _c, _d, _e;
6481
- const vars = {
6482
- user: {
6483
- id: user.id,
6484
- accountId: user.accountId,
6485
- },
6486
- firstName: formData.firstName,
6487
- lastName: formData.lastName,
6488
- countryCode: formData.countryCode,
6489
- currency: formData.currency,
6490
- address: formData.address,
6491
- city: formData.city,
6492
- state: formData.state,
6493
- postalCode: formData.postalCode,
6494
- phoneNumber: formData.phoneNumber,
6495
- phoneNumberCountryCode: formData.phoneNumberCountryCode,
6496
- };
6497
- const result = await connectImpactPartner({
6498
- vars,
6499
- });
6500
- if (!result || ((_a = result) === null || _a === void 0 ? void 0 : _a.message))
6501
- throw new Error();
6502
- if (!((_b = result.createImpactConnection) === null || _b === void 0 ? void 0 : _b.success)) {
6503
- // Output backend errors to console for now
6504
- console.error("Failed to create Impact connection: ", result.createImpactConnection.validationErrors);
6505
- throw new Error();
6506
- }
6507
- await refetch();
6508
- const resultPublisher = (_e = (_d = (_c = result
6509
- .createImpactConnection) === null || _c === void 0 ? void 0 : _c.user) === null || _d === void 0 ? void 0 : _d.impactConnection) === null || _e === void 0 ? void 0 : _e.publisher;
6510
- const hasValidCurrentDocument = validTaxDocument(resultPublisher === null || resultPublisher === void 0 ? void 0 : resultPublisher.requiredTaxDocumentType) && (resultPublisher === null || resultPublisher === void 0 ? void 0 : resultPublisher.currentTaxDocument);
6511
- // Fire form change event
6512
- window.dispatchEvent(new Event(TAX_FORM_UPDATED_EVENT_KEY));
6513
- return {
6514
- resultPublisher,
6515
- hasValidCurrentDocument,
6516
- };
6517
- }
6518
6291
  async function onSubmit(event) {
6519
6292
  let formControls = event.target.getFormControls();
6520
6293
  let formData = {};
@@ -6557,46 +6330,9 @@ function useUserInfoForm(props) {
6557
6330
  postalCode: userData.postalCode,
6558
6331
  currency: userData.currency,
6559
6332
  });
6560
- const skipNextStep = getSkipNextStep(userData);
6561
- if (skipNextStep) {
6562
- try {
6563
- const { resultPublisher, hasValidCurrentDocument } = await connectPartner(formData);
6564
- if ((resultPublisher === null || resultPublisher === void 0 ? void 0 : resultPublisher.requiredTaxDocumentType) &&
6565
- !hasValidCurrentDocument) {
6566
- // Go to docusign form
6567
- setStep("/3");
6568
- }
6569
- else {
6570
- if (resultPublisher === null || resultPublisher === void 0 ? void 0 : resultPublisher.brandedSignup) {
6571
- // Go to banking information form
6572
- setStep("/4");
6573
- }
6574
- else {
6575
- // Go right to the dashboard
6576
- setStep("/dashboard");
6577
- }
6578
- }
6579
- return;
6580
- }
6581
- catch (e) {
6582
- setErrors({ general: true });
6583
- return;
6584
- }
6585
- }
6586
- const nextStep = context.overrideNextStep || skipNextStep ? "/3" : "/2";
6333
+ const nextStep = context.overrideNextStep || "/2";
6587
6334
  setStep(nextStep);
6588
6335
  }
6589
- const indirectTaxCountry = (_a = tenantData === null || tenantData === void 0 ? void 0 : tenantData.tenantSettings) === null || _a === void 0 ? void 0 : _a.impactBrandIndirectTaxCountryCode;
6590
- const hasIndirectTax = !!indirectTaxCountry;
6591
- function getSkipNextStep(userData) {
6592
- if (!hasIndirectTax)
6593
- return true;
6594
- if (userData.countryCode === "US")
6595
- return true;
6596
- if (hasIndirectTax && userData.countryCode !== indirectTaxCountry)
6597
- return true;
6598
- return false;
6599
- }
6600
6336
  const hasStates = ["ES", "AU", "US", "CA"].includes(userFormContext.countryCode);
6601
6337
  const regionObj = hasStates
6602
6338
  ? ADDRESS_REGIONS[userFormContext === null || userFormContext === void 0 ? void 0 : userFormContext.countryCode]
@@ -6624,17 +6360,16 @@ function useUserInfoForm(props) {
6624
6360
  allCountries: countries,
6625
6361
  regionLabelEnum: regionObj === null || regionObj === void 0 ? void 0 : regionObj.labelEnum,
6626
6362
  regions: (regionObj === null || regionObj === void 0 ? void 0 : regionObj.regions) || [],
6627
- partnerData: (_c = (_b = data === null || data === void 0 ? void 0 : data.user) === null || _b === void 0 ? void 0 : _b.impactConnection) === null || _c === void 0 ? void 0 : _c.publisher,
6628
6363
  },
6629
6364
  states: {
6630
6365
  step: step === null || step === void 0 ? void 0 : step.replace("/", ""),
6631
6366
  hideState: !hasStates,
6632
6367
  hideSteps: !!context.hideSteps,
6633
- disabled: loading || connectLoading,
6368
+ disabled: loading,
6634
6369
  loadingError: !!(userError === null || userError === void 0 ? void 0 : userError.message),
6635
- loading: loading || connectLoading,
6636
- isPartner: !!((_e = (_d = data === null || data === void 0 ? void 0 : data.user) === null || _d === void 0 ? void 0 : _d.impactConnection) === null || _e === void 0 ? void 0 : _e.publisher),
6637
- isUser: !!((_g = (_f = data === null || data === void 0 ? void 0 : data.user) === null || _f === void 0 ? void 0 : _f.impactConnection) === null || _g === void 0 ? void 0 : _g.user),
6370
+ loading: loading,
6371
+ isPartner: !!((_b = (_a = data === null || data === void 0 ? void 0 : data.user) === null || _a === void 0 ? void 0 : _a.impactConnection) === null || _b === void 0 ? void 0 : _b.publisher),
6372
+ isUser: !!((_d = (_c = data === null || data === void 0 ? void 0 : data.user) === null || _c === void 0 ? void 0 : _c.impactConnection) === null || _d === void 0 ? void 0 : _d.user),
6638
6373
  formState: {
6639
6374
  ...userFormContext,
6640
6375
  errors: formErrors,