@saasquatch/mint-components 1.15.5-5 → 1.15.6

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 (125) hide show
  1. package/dist/cjs/{ShadowViewAddon-28865623.js → ShadowViewAddon-e9dc77e3.js} +2 -2
  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_17.cjs.entry.js +234 -384
  5. package/dist/cjs/{sqm-base-registration-form-view-8029d30e.js → sqm-base-registration-form-view-66f99821.js} +9 -4
  6. package/dist/cjs/sqm-big-stat_43.cjs.entry.js +10 -150
  7. package/dist/cjs/sqm-header-logo.cjs.entry.js +1 -8
  8. package/dist/cjs/{sqm-invoice-table-view-3f60fba9.js → sqm-invoice-table-view-5c74607f.js} +0 -1
  9. package/dist/cjs/sqm-portal-google-registration-form.cjs.entry.js +25 -18
  10. package/dist/cjs/sqm-stencilbook.cjs.entry.js +8 -5
  11. package/dist/cjs/{usePayoutStatus-7892433f.js → usePayoutStatus-1ffd1cd4.js} +4 -176
  12. package/dist/collection/components/sqm-base-registration/BaseRegistrationForm.stories.js +2 -2
  13. package/dist/collection/components/sqm-base-registration/sqm-base-registration-form-view.js +9 -4
  14. package/dist/collection/components/sqm-checkbox-field/sqm-checkbox-field.js +1 -1
  15. package/dist/collection/components/sqm-dropdown-field/sqm-dropdown-field.js +1 -1
  16. package/dist/collection/components/sqm-header-logo/sqm-header-logo.js +3 -73
  17. package/dist/collection/components/sqm-input-field/sqm-input-field.js +1 -1
  18. package/dist/collection/components/sqm-marketing-emails-checkbox/sqm-marketing-emails-checkbox.js +1 -1
  19. package/dist/collection/components/sqm-name-fields/NameFields.stories.js +2 -0
  20. package/dist/collection/components/sqm-name-fields/sqm-name-fields-view.js +3 -3
  21. package/dist/collection/components/sqm-name-fields/sqm-name-fields.js +31 -1
  22. package/dist/collection/components/sqm-name-fields/useNameFields.js +1 -0
  23. package/dist/collection/components/sqm-password-field/sqm-password-field.js +2 -2
  24. package/dist/collection/components/sqm-portal-google-registration-form/PortalGoogleRegistrationForm.stories.js +1 -0
  25. package/dist/collection/components/sqm-portal-google-registration-form/sqm-portal-google-registration-form.js +4 -4
  26. package/dist/collection/components/sqm-portal-google-registration-form/usePortalGoogleRegistrationForm.js +22 -15
  27. package/dist/collection/components/tax-and-cash/TaxForm.stories.js +0 -1
  28. package/dist/collection/components/tax-and-cash/sqm-indirect-tax-form/useIndirectTaxForm.js +40 -46
  29. package/dist/collection/components/tax-and-cash/sqm-payout-status-alert/sqm-payout-status-alert-view.js +2 -90
  30. package/dist/collection/components/tax-and-cash/sqm-payout-status-alert/sqm-payout-status-alert.js +0 -353
  31. package/dist/collection/components/tax-and-cash/sqm-payout-status-alert/usePayoutStatus.js +5 -36
  32. package/dist/collection/components/tax-and-cash/sqm-tax-and-cash/sqm-tax-and-cash.js +0 -300
  33. package/dist/collection/components/tax-and-cash/sqm-tax-and-cash-dashboard/sqm-tax-and-cash-dashboard-view.js +2 -92
  34. package/dist/collection/components/tax-and-cash/sqm-tax-and-cash-dashboard/sqm-tax-and-cash-dashboard.js +0 -300
  35. package/dist/collection/components/tax-and-cash/sqm-user-info-form/sqm-user-info-form-view.js +12 -23
  36. package/dist/collection/components/tax-and-cash/sqm-user-info-form/sqm-user-info-form.js +1 -1
  37. package/dist/collection/components/tax-and-cash/sqm-user-info-form/useUserInfoForm.js +9 -92
  38. package/dist/esm/{ShadowViewAddon-f2176779.js → ShadowViewAddon-e0d5f1c9.js} +2 -2
  39. package/dist/esm/loader.js +1 -1
  40. package/dist/esm/mint-components.js +1 -1
  41. package/dist/esm/sqm-banking-info-form_17.entry.js +189 -339
  42. package/dist/esm/{sqm-base-registration-form-view-dafba287.js → sqm-base-registration-form-view-d81e316a.js} +9 -4
  43. package/dist/esm/sqm-big-stat_43.entry.js +11 -151
  44. package/dist/esm/sqm-header-logo.entry.js +1 -8
  45. package/dist/esm/{sqm-invoice-table-view-01453fa3.js → sqm-invoice-table-view-3491dd80.js} +0 -1
  46. package/dist/esm/sqm-portal-google-registration-form.entry.js +25 -18
  47. package/dist/esm/sqm-stencilbook.entry.js +8 -5
  48. package/dist/esm/{usePayoutStatus-c21ef382.js → usePayoutStatus-f09f2ec8.js} +6 -163
  49. package/dist/esm-es5/{ShadowViewAddon-f2176779.js → ShadowViewAddon-e0d5f1c9.js} +1 -1
  50. package/dist/esm-es5/loader.js +1 -1
  51. package/dist/esm-es5/mint-components.js +1 -1
  52. package/dist/esm-es5/sqm-banking-info-form_17.entry.js +1 -1
  53. package/dist/esm-es5/sqm-base-registration-form-view-d81e316a.js +1 -0
  54. package/dist/esm-es5/sqm-big-stat_43.entry.js +1 -1
  55. package/dist/esm-es5/sqm-header-logo.entry.js +1 -1
  56. package/dist/esm-es5/sqm-invoice-table-view-3491dd80.js +1 -0
  57. package/dist/esm-es5/sqm-portal-google-registration-form.entry.js +1 -1
  58. package/dist/esm-es5/sqm-stencilbook.entry.js +1 -1
  59. package/dist/esm-es5/usePayoutStatus-f09f2ec8.js +6 -0
  60. package/dist/mint-components/mint-components.esm.js +1 -1
  61. package/dist/mint-components/p-15364635.entry.js +273 -0
  62. package/dist/mint-components/{p-4a731079.entry.js → p-1edebab1.entry.js} +2 -2
  63. package/dist/mint-components/p-2d8045c2.entry.js +220 -0
  64. package/dist/mint-components/p-3439af2f.system.entry.js +1 -0
  65. package/dist/mint-components/p-37996351.system.js +1 -1
  66. package/dist/mint-components/{p-02832118.system.entry.js → p-3ac8613d.system.entry.js} +1 -1
  67. package/dist/mint-components/{p-c1b074b6.js → p-3b6dccec.js} +1 -1
  68. package/dist/mint-components/p-3df72337.js +46 -0
  69. package/dist/mint-components/p-43e274e9.entry.js +1 -0
  70. package/dist/mint-components/p-49932f12.system.js +1 -0
  71. package/dist/mint-components/p-5cda9960.system.entry.js +1 -0
  72. package/dist/mint-components/p-7dabdca6.system.entry.js +1 -0
  73. package/dist/mint-components/p-8db18561.system.entry.js +1 -0
  74. package/dist/mint-components/p-9308221f.js +1 -0
  75. package/dist/mint-components/p-bc021969.system.js +1 -0
  76. package/dist/mint-components/{p-0d939b73.system.js → p-d15b642f.system.js} +1 -1
  77. package/dist/mint-components/p-e8e48982.js +1 -0
  78. package/dist/mint-components/p-f82e3152.system.js +6 -0
  79. package/dist/mint-components/p-faba3198.entry.js +1 -0
  80. package/dist/types/components/sqm-base-registration/sqm-base-registration-form-view.d.ts +2 -1
  81. package/dist/types/components/sqm-checkbox-field/sqm-checkbox-field.d.ts +1 -1
  82. package/dist/types/components/sqm-dropdown-field/sqm-dropdown-field.d.ts +1 -1
  83. package/dist/types/components/sqm-header-logo/sqm-header-logo.d.ts +1 -14
  84. package/dist/types/components/sqm-input-field/sqm-input-field.d.ts +1 -1
  85. package/dist/types/components/sqm-marketing-emails-checkbox/sqm-marketing-emails-checkbox.d.ts +1 -1
  86. package/dist/types/components/sqm-name-fields/sqm-name-fields-view.d.ts +1 -0
  87. package/dist/types/components/sqm-name-fields/sqm-name-fields.d.ts +5 -0
  88. package/dist/types/components/sqm-name-fields/useNameFields.d.ts +1 -0
  89. package/dist/types/components/sqm-password-field/sqm-password-field.d.ts +1 -1
  90. package/dist/types/components/sqm-portal-google-registration-form/usePortalGoogleRegistrationForm.d.ts +2 -1
  91. package/dist/types/components/tax-and-cash/sqm-indirect-tax-form/useIndirectTaxForm.d.ts +0 -23
  92. package/dist/types/components/tax-and-cash/sqm-payout-status-alert/sqm-payout-status-alert-view.d.ts +0 -16
  93. package/dist/types/components/tax-and-cash/sqm-payout-status-alert/sqm-payout-status-alert.d.ts +0 -57
  94. package/dist/types/components/tax-and-cash/sqm-payout-status-alert/usePayoutStatus.d.ts +1 -3
  95. package/dist/types/components/tax-and-cash/sqm-tax-and-cash/sqm-tax-and-cash.d.ts +0 -48
  96. package/dist/types/components/tax-and-cash/sqm-tax-and-cash-dashboard/sqm-tax-and-cash-dashboard-view.d.ts +0 -12
  97. package/dist/types/components/tax-and-cash/sqm-tax-and-cash-dashboard/sqm-tax-and-cash-dashboard.d.ts +0 -48
  98. package/dist/types/components/tax-and-cash/sqm-user-info-form/sqm-user-info-form-view.d.ts +0 -2
  99. package/dist/types/components/tax-and-cash/sqm-user-info-form/useUserInfoForm.d.ts +0 -1
  100. package/dist/types/components.d.ts +11 -331
  101. package/dist/types/global/android.d.ts +7 -0
  102. package/dist/types/global/demo.d.ts +2 -0
  103. package/dist/types/stories/features.d.ts +4 -0
  104. package/dist/types/stories/templates.d.ts +4 -0
  105. package/docs/docs.docx +0 -0
  106. package/docs/raisins.json +1 -1
  107. package/grapesjs/grapesjs.js +1 -1
  108. package/package.json +1 -1
  109. package/dist/esm-es5/sqm-base-registration-form-view-dafba287.js +0 -1
  110. package/dist/esm-es5/sqm-invoice-table-view-01453fa3.js +0 -1
  111. package/dist/esm-es5/usePayoutStatus-c21ef382.js +0 -6
  112. package/dist/mint-components/p-2651ef99.system.js +0 -1
  113. package/dist/mint-components/p-35701119.js +0 -1
  114. package/dist/mint-components/p-48552798.system.entry.js +0 -1
  115. package/dist/mint-components/p-498bbce7.system.entry.js +0 -1
  116. package/dist/mint-components/p-59fe6066.js +0 -1
  117. package/dist/mint-components/p-67035b70.system.entry.js +0 -1
  118. package/dist/mint-components/p-86a5db85.system.js +0 -1
  119. package/dist/mint-components/p-9c4f4cd6.entry.js +0 -1
  120. package/dist/mint-components/p-a3647f70.system.entry.js +0 -1
  121. package/dist/mint-components/p-aa595246.system.js +0 -6
  122. package/dist/mint-components/p-bdbf26da.entry.js +0 -273
  123. package/dist/mint-components/p-cb87eadd.entry.js +0 -1
  124. package/dist/mint-components/p-d289d251.entry.js +0 -109
  125. package/dist/mint-components/p-d9da598f.js +0 -157
@@ -1,4 +1,4 @@
1
- import { h, r as registerInstance, c as Host, g as getElement, F as Fragment } from './index-91e7729f.js';
1
+ import { h, r as registerInstance, c as Host, g as getElement } from './index-91e7729f.js';
2
2
  import { m as useRef, k as useState, f as useEffect, n as h$1, l, u as useMemo, b as browser, j as useReducer } from './stencil-hooks.module-4bc38af4.js';
3
3
  import { i as intl } from './global-be1f9992.js';
4
4
  import { d as dist, _, L, J, t as Pn, F as Fn, x as $n, $ as $e, i as isDemo, q as En, u as useCallback, R as Rn, M as Mn, I as In, S as Sn, w as wn } from './index.module-89a79f66.js';
@@ -14,12 +14,139 @@ import { l as luxon } from './luxon-8d51c92b.js';
14
14
  import { g as generateUserError } from './useReferralTable-b3876ed6.js';
15
15
  import { T as TextSpanView } from './sqm-text-span-view-ca32495e.js';
16
16
  import { E as ErrorView } from './ErrorView-48e2b969.js';
17
- 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, 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-01453fa3.js';
17
+ 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, 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-3491dd80.js';
18
18
  import { e as extractProps } from './extractProps-ae1afbb3.js';
19
19
  import { b as VERIFICATION_EVENT_KEY, V as VERIFICATION_EMAIL_NAMESPACE, S as SHOW_CODE_NAMESPACE, a as VERIFICATION_PARENT_NAMESPACE } from './keys-406491dc.js';
20
- import { F as FORM_STEPS, T as TAX_FORM_CONTEXT_NAMESPACE, S as SORTED_COUNTRIES_NAMESPACE, U as USER_QUERY_NAMESPACE, a as TAX_CONTEXT_NAMESPACE, b as FINANCE_NETWORK_SETTINGS_NAMESPACE, c as TAX_FORM_UPDATED_EVENT_KEY, d as USER_FORM_CONTEXT_NAMESPACE, C as COUNTRIES_QUERY_NAMESPACE, e as CURRENCIES_NAMESPACE, f as COUNTRIES_NAMESPACE, G as GET_USER, g as GET_COUNTRIES, h as GET_FINANCE_NETWORK_SETTINGS, i as CURRENCIES_QUERY_NAMESPACE, j as GET_CURRENCIES, k as useVeriffApp, l as getStatus, V as VERIFF_COMPLETE_EVENT_KEY } from './usePayoutStatus-c21ef382.js';
20
+ import { T as TAX_FORM_UPDATED_EVENT_KEY, a as useVeriffApp, g as getStatus, V as VERIFF_COMPLETE_EVENT_KEY } from './usePayoutStatus-f09f2ec8.js';
21
21
  import { u as useVerificationEmail } from './useVerificationEmail-edc318cb.js';
22
22
 
23
+ const TAX_CONTEXT_NAMESPACE = "sq:tax-and-cash";
24
+ const TAX_FORM_CONTEXT_NAMESPACE = "sq:tax-form-context";
25
+ const USER_QUERY_NAMESPACE = "sq:user-info-query";
26
+ const USER_FORM_CONTEXT_NAMESPACE = "sq:user-form-context";
27
+ const FINANCE_NETWORK_SETTINGS_NAMESPACE = "sq:finance-network-settings";
28
+ const COUNTRIES_NAMESPACE = "sq:countries:list";
29
+ const SORTED_COUNTRIES_NAMESPACE = "sq:countries:sorted";
30
+ const COUNTRIES_QUERY_NAMESPACE = "sq:countries:query";
31
+ const CURRENCIES_NAMESPACE = "sq:currencies:list";
32
+ const CURRENCIES_QUERY_NAMESPACE = "sq:currencies:query";
33
+ const GET_USER = dist.gql `
34
+ query getUserTaxInfo {
35
+ user: viewer {
36
+ ... on User {
37
+ id
38
+ firstName
39
+ lastName
40
+ email
41
+ countryCode
42
+ customFields
43
+ rewards(limit: 1000) {
44
+ data {
45
+ statuses
46
+ partnerFundsTransfer {
47
+ id
48
+ status
49
+ }
50
+ }
51
+ }
52
+ managedIdentity {
53
+ uid
54
+ email
55
+ emailVerified
56
+ }
57
+ impactConnection {
58
+ connected
59
+ user {
60
+ firstName
61
+ lastName
62
+ }
63
+ publisher {
64
+ id
65
+ brandedSignup
66
+ countryCode
67
+ currency
68
+ billingAddress
69
+ billingCity
70
+ billingState
71
+ billingCountryCode
72
+ billingPostalCode
73
+ phoneNumberCountryCode
74
+ phoneNumber
75
+ taxInformation {
76
+ indirectTaxId
77
+ indirectTaxCountryCode
78
+ indirectTaxRegion
79
+ additionalTaxId
80
+ withholdingTaxId
81
+ withholdingTaxCountryCode
82
+ }
83
+ requiredTaxDocumentType
84
+ currentTaxDocument {
85
+ status
86
+ type
87
+ dateCreated
88
+ }
89
+ withdrawalSettings {
90
+ paymentMethod
91
+ paypalEmailAddress
92
+ bankCountry
93
+ bankAccountNumber
94
+ paymentSchedulingType
95
+ paymentThreshold
96
+ paymentDay
97
+ }
98
+ payoutsAccount {
99
+ hold
100
+ holdReasons
101
+ balance
102
+ }
103
+ }
104
+ }
105
+ }
106
+ }
107
+ }
108
+ `;
109
+ const GET_COUNTRIES = dist.gql `
110
+ query getCountries {
111
+ impactPayoutCountries(limit: 1000) {
112
+ data {
113
+ countryCode
114
+ displayName
115
+ }
116
+ }
117
+ }
118
+ `;
119
+ const GET_CURRENCIES = dist.gql `
120
+ query currencies($locale: RSLocale) {
121
+ currencies(limit: 300) {
122
+ data {
123
+ displayName(locale: $locale)
124
+ currencyCode
125
+ }
126
+ }
127
+ }
128
+ `;
129
+ const GET_FINANCE_NETWORK_SETTINGS = dist.gql `
130
+ query impactFinanceNetworkSettings(
131
+ $filter: ImpactFinanceNetworkSettingsFilterInput
132
+ ) {
133
+ impactFinanceNetworkSettings(filter: $filter, limit: 1000) {
134
+ data {
135
+ countryCode
136
+ currency
137
+ defaultFinancePaymentMethodId
138
+ thresholdOptions
139
+ withdrawalSettingId
140
+ internationalEftFee
141
+ foreignFxFee
142
+ defaultFxFee
143
+ }
144
+ totalCount
145
+ }
146
+ }
147
+ `;
148
+ const FORM_STEPS = 4;
149
+
23
150
  function getFormMap({ props, getValidationErrorMessage, bankCountry, }) {
24
151
  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;
25
152
  const { errors, ...formState } = props.states.formState;
@@ -3045,51 +3172,8 @@ function useIndirectTaxForm(props) {
3045
3172
  console.error("Could not detect select change");
3046
3173
  setFormState((p) => ({ ...p, [field]: value }));
3047
3174
  };
3048
- async function connectPartner(formData) {
3049
- var _a, _b, _c, _d, _e;
3050
- const vars = {
3051
- user: {
3052
- id: user.id,
3053
- accountId: user.accountId,
3054
- },
3055
- firstName: userForm.firstName,
3056
- lastName: userForm.lastName,
3057
- countryCode: userForm.countryCode,
3058
- currency: userForm.currency,
3059
- address: userForm.address,
3060
- city: userForm.city,
3061
- state: userForm.state,
3062
- postalCode: userForm.postalCode,
3063
- phoneNumber: userForm.phoneNumber,
3064
- phoneNumberCountryCode: userForm.phoneNumberCountryCode,
3065
- indirectTaxCountryCode: formData.selectedRegion,
3066
- indirectTaxRegion: formData.province || formData.subRegion,
3067
- indirectTaxId: formData.indirectTaxNumber,
3068
- additionalTaxId: formData.qstNumber,
3069
- withholdingTaxId: formData.subRegionTaxNumber,
3070
- };
3071
- const result = await connectImpactPartner({
3072
- vars,
3073
- });
3074
- if (!result || ((_a = result) === null || _a === void 0 ? void 0 : _a.message))
3075
- throw new Error();
3076
- if (!((_b = result.createImpactConnection) === null || _b === void 0 ? void 0 : _b.success)) {
3077
- // Output backend errors to console for now
3078
- console.error("Failed to create Impact connection: ", result.createImpactConnection.validationErrors);
3079
- throw new Error();
3080
- }
3081
- await refetch();
3082
- const resultPublisher = (_e = (_d = (_c = result
3083
- .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;
3084
- const hasValidCurrentDocument = validTaxDocument(resultPublisher === null || resultPublisher === void 0 ? void 0 : resultPublisher.requiredTaxDocumentType) && (resultPublisher === null || resultPublisher === void 0 ? void 0 : resultPublisher.currentTaxDocument);
3085
- // Fire form change event
3086
- window.dispatchEvent(new Event(TAX_FORM_UPDATED_EVENT_KEY));
3087
- return {
3088
- resultPublisher,
3089
- hasValidCurrentDocument,
3090
- };
3091
- }
3092
3175
  const onSubmit = async (event) => {
3176
+ var _a, _b, _c, _d, _e;
3093
3177
  if (!option) {
3094
3178
  setErrors({ taxDetails: true });
3095
3179
  return;
@@ -3115,7 +3199,44 @@ function useIndirectTaxForm(props) {
3115
3199
  }
3116
3200
  setLoading(true);
3117
3201
  try {
3118
- const { resultPublisher, hasValidCurrentDocument } = await connectPartner(formData);
3202
+ const vars = {
3203
+ user: {
3204
+ id: user.id,
3205
+ accountId: user.accountId,
3206
+ },
3207
+ firstName: userForm.firstName,
3208
+ lastName: userForm.lastName,
3209
+ countryCode: userForm.countryCode,
3210
+ currency: userForm.currency,
3211
+ address: userForm.address,
3212
+ city: userForm.city,
3213
+ state: userForm.state,
3214
+ postalCode: userForm.postalCode,
3215
+ phoneNumber: userForm.phoneNumber,
3216
+ phoneNumberCountryCode: userForm.phoneNumberCountryCode,
3217
+ indirectTaxCountryCode: formData.selectedRegion,
3218
+ indirectTaxRegion: formData.province || formData.subRegion,
3219
+ indirectTaxId: formData.indirectTaxNumber,
3220
+ additionalTaxId: formData.qstNumber,
3221
+ withholdingTaxId: formData.subRegionTaxNumber,
3222
+ };
3223
+ const result = await connectImpactPartner({
3224
+ vars,
3225
+ });
3226
+ if (!result || ((_a = result) === null || _a === void 0 ? void 0 : _a.message))
3227
+ throw new Error();
3228
+ if (!((_b = result.createImpactConnection) === null || _b === void 0 ? void 0 : _b.success)) {
3229
+ // Output backend errors to console for now
3230
+ console.error("Failed to create Impact connection: ", result.createImpactConnection
3231
+ .validationErrors);
3232
+ throw new Error();
3233
+ }
3234
+ await refetch();
3235
+ const resultPublisher = (_e = (_d = (_c = result
3236
+ .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;
3237
+ const hasValidCurrentDocument = validTaxDocument(resultPublisher === null || resultPublisher === void 0 ? void 0 : resultPublisher.requiredTaxDocumentType) && (resultPublisher === null || resultPublisher === void 0 ? void 0 : resultPublisher.currentTaxDocument);
3238
+ // Fire form change event
3239
+ window.dispatchEvent(new Event(TAX_FORM_UPDATED_EVENT_KEY));
3119
3240
  if ((resultPublisher === null || resultPublisher === void 0 ? void 0 : resultPublisher.requiredTaxDocumentType) &&
3120
3241
  !hasValidCurrentDocument) {
3121
3242
  // Go to docusign form
@@ -5307,54 +5428,6 @@ const TaxAndCashMonolith = class {
5307
5428
  * @uiName Account review alert description
5308
5429
  */
5309
5430
  this.dashboard_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}.";
5310
- /**
5311
- * @uiName Payment on hold alert header
5312
- */
5313
- this.dashboard_paymentOnHoldHeader = "We are reviewing your new payout settings";
5314
- /**
5315
- * @uiName Payment on hold alert description
5316
- */
5317
- this.dashboard_paymentOnHoldDescription = "Your payout is temporarily on hold while we review your new payment information, this process is usually resolved within 48 hours.";
5318
- /**
5319
- * @uiName Beneficiary name invalid alert header
5320
- */
5321
- this.dashboard_beneficiaryNameInvalidHeader = "Your payment information does not match your tax form";
5322
- /**
5323
- * @uiName Beneficiary name invalid description
5324
- */
5325
- this.dashboard_beneficiaryNameInvalidDescription = "The 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.";
5326
- /**
5327
- * @uiName Beneficiary name mismatch alert header
5328
- */
5329
- this.dashboard_beneficiaryNameMismatchHeader = "Your payment information does not match your tax form";
5330
- /**
5331
- * @uiName Beneficiary name mismatch alert description
5332
- */
5333
- this.dashboard_beneficiaryNameMismatchDescription = "The 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.";
5334
- /**
5335
- * @uiName Bank name mismatch alert header
5336
- */
5337
- this.dashboard_bankNameMismatchHeader = "Your payment information does not match your tax form";
5338
- /**
5339
- * @uiName Bank name mismatch alert description
5340
- */
5341
- this.dashboard_bankNameMismatchDescription = "The bank 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.";
5342
- /**
5343
- * @uiName Withdrawal settings invalid alert header
5344
- */
5345
- this.dashboard_withdrawalSettingsInvalidHeader = "Your payment information includes invalid characters";
5346
- /**
5347
- * @uiName Withdrawal settings invalid alert description
5348
- */
5349
- this.dashboard_withdrawalSettingsInvalidDescription = "There are invalid characters in your payment information. Please review your information and make sure it is correct with no invalid characters. Your payouts are on hold until this is resolved.";
5350
- /**
5351
- * @uiName Payment returned alert header
5352
- */
5353
- this.dashboard_paymentReturnedHeader = "Payout unsuccessful";
5354
- /**
5355
- * @uiName Payment returned alert description
5356
- */
5357
- this.dashboard_paymentReturnedDescription = "Our recent payment attempt for your earnings was unsuccessful. Please review your payment information and make sure it is correct.";
5358
5431
  /**
5359
5432
  * @uiName Terms and Conditions text
5360
5433
  * @uiGroup Dashboard Properties
@@ -5826,7 +5899,7 @@ const TaxAndCashDashboardView = (props) => {
5826
5899
  icon: "exclamation-octagon",
5827
5900
  class: sheet$5.classes.ErrorHoldAlertContainer,
5828
5901
  };
5829
- case "NEW_PAYEE_REVIEW":
5902
+ case "ACCOUNT_REVIEW":
5830
5903
  return {
5831
5904
  header: text.accountReviewHeader,
5832
5905
  description: intl.formatMessage({
@@ -5840,96 +5913,6 @@ const TaxAndCashDashboardView = (props) => {
5840
5913
  icon: "exclamation-triangle",
5841
5914
  class: sheet$5.classes.WarningHoldAlertContainer,
5842
5915
  };
5843
- case "PAYMENT_HOLD_ON_CHANGE":
5844
- return {
5845
- header: text.paymentHoldOnChangeHeader,
5846
- description: intl.formatMessage({
5847
- id: "accountReviewDescription",
5848
- defaultMessage: text.paymentHoldOnChangeDescription,
5849
- }, {
5850
- supportLink: (h("a", { target: "_blank", href: `mailto:advocate-support@impact.com` }, text.supportLink)),
5851
- }),
5852
- buttonText: null,
5853
- alertType: "warning",
5854
- icon: "exclamation-triangle",
5855
- class: sheet$5.classes.WarningHoldAlertContainer,
5856
- };
5857
- case "BENEFICIARY_NAME_INVALID":
5858
- return {
5859
- header: text.beneficiaryNameInvalidHeader,
5860
- description: intl.formatMessage({
5861
- id: "accountReviewDescription",
5862
- defaultMessage: text.beneficiaryNameInvalidDescription,
5863
- }, {
5864
- supportLink: (h("a", { target: "_blank", href: `mailto:advocate-support@impact.com` }, text.supportLink)),
5865
- }),
5866
- button: (h(Fragment, null,
5867
- h("sl-button", { disabled: states.disabled || states.loading, type: "default", class: sheet$5.classes.EditBankDetailsButton, onClick: callbacks.onEditPayoutInfo }, text.editPaymentInformationButton),
5868
- h("sl-button", { disabled: states.disabled || states.loading, type: "default", class: sheet$5.classes.EditBankDetailsButton, onClick: callbacks.onNewFormClick }, text.newFormButton))),
5869
- alertType: "warning",
5870
- icon: "exclamation-triangle",
5871
- class: sheet$5.classes.WarningHoldAlertContainer,
5872
- };
5873
- case "BENEFICIARY_NAME_MISMATCH":
5874
- return {
5875
- header: text.beneficiaryNameMismatchHeader,
5876
- description: intl.formatMessage({
5877
- id: "accountReviewDescription",
5878
- defaultMessage: text.beneficiaryNameMismatchDescription,
5879
- }, {
5880
- supportLink: (h("a", { target: "_blank", href: `mailto:advocate-support@impact.com` }, text.supportLink)),
5881
- }),
5882
- button: (h(Fragment, null,
5883
- h("sl-button", { disabled: states.disabled || states.loading, type: "default", class: sheet$5.classes.EditBankDetailsButton, onClick: callbacks.onEditPayoutInfo }, text.editPaymentInformationButton),
5884
- h("sl-button", { disabled: states.disabled || states.loading, type: "default", class: sheet$5.classes.EditBankDetailsButton, onClick: callbacks.onNewFormClick }, text.newFormButton))),
5885
- alertType: "warning",
5886
- icon: "exclamation-triangle",
5887
- class: sheet$5.classes.WarningHoldAlertContainer,
5888
- };
5889
- case "BANK_TAX_NAME_MISMATCH":
5890
- return {
5891
- header: text.bankTaxNameMismatchHeader,
5892
- description: intl.formatMessage({
5893
- id: "accountReviewDescription",
5894
- defaultMessage: text.bankTaxNameMismatchDescription,
5895
- }, {
5896
- supportLink: (h("a", { target: "_blank", href: `mailto:advocate-support@impact.com` }, text.supportLink)),
5897
- }),
5898
- button: (h(Fragment, null,
5899
- h("sl-button", { disabled: states.disabled || states.loading, type: "default", class: sheet$5.classes.EditBankDetailsButton, onClick: callbacks.onEditPayoutInfo }, text.editPaymentInformationButton),
5900
- h("sl-button", { disabled: states.disabled || states.loading, type: "default", class: sheet$5.classes.EditBankDetailsButton, onClick: callbacks.onNewFormClick }, text.newFormButton))),
5901
- alertType: "warning",
5902
- icon: "exclamation-triangle",
5903
- class: sheet$5.classes.WarningHoldAlertContainer,
5904
- };
5905
- case "WITHDRAWAL_SETTINGS_INVALID":
5906
- return {
5907
- header: text.withdrawalSettingsInvalidHeader,
5908
- description: intl.formatMessage({
5909
- id: "accountReviewDescription",
5910
- defaultMessage: text.withdrawalSettingsInvalidDescription,
5911
- }, {
5912
- supportLink: (h("a", { target: "_blank", href: `mailto:advocate-support@impact.com` }, text.supportLink)),
5913
- }),
5914
- button: (h("sl-button", { disabled: states.disabled || states.loading, type: "default", class: sheet$5.classes.EditBankDetailsButton, onClick: callbacks.onEditPayoutInfo }, text.editPaymentInformationButton)),
5915
- alertType: "warning",
5916
- icon: "exclamation-triangle",
5917
- class: sheet$5.classes.WarningHoldAlertContainer,
5918
- };
5919
- case "PAYMENT_RETURNED":
5920
- return {
5921
- header: text.paymentReturnedHeader,
5922
- description: intl.formatMessage({
5923
- id: "accountReviewDescription",
5924
- defaultMessage: text.paymentReturnedDescription,
5925
- }, {
5926
- supportLink: (h("a", { target: "_blank", href: `mailto:advocate-support@impact.com` }, text.supportLink)),
5927
- }),
5928
- button: (h("sl-button", { disabled: states.disabled || states.loading, type: "default", class: sheet$5.classes.EditBankDetailsButton, onClick: callbacks.onEditPayoutInfo }, text.editPaymentInformationButton)),
5929
- alertType: "warning",
5930
- icon: "exclamation-triangle",
5931
- class: sheet$5.classes.WarningHoldAlertContainer,
5932
- };
5933
5916
  case "HOLD":
5934
5917
  return {
5935
5918
  header: text.payoutHoldAlertHeader,
@@ -6499,54 +6482,6 @@ const TaxAndCashDashboard = class {
6499
6482
  * @uiName Account review alert description
6500
6483
  */
6501
6484
  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}.";
6502
- /**
6503
- * @uiName Payment hold on change alert header
6504
- */
6505
- this.paymentHoldOnChangeHeader = "We are reviewing your new payout settings";
6506
- /**
6507
- * @uiName Payment hold on change alert description
6508
- */
6509
- this.paymentHoldOnChangeDescription = "Your payout is temporarily on hold while we review your new payment information, this process is usually resolved within 48 hours.";
6510
- /**
6511
- * @uiName Beneficiary name invalid alert header
6512
- */
6513
- this.beneficiaryNameInvalidHeader = "Your payment information does not match your tax form";
6514
- /**
6515
- * @uiName Beneficiary name invalid description
6516
- */
6517
- this.beneficiaryNameInvalidDescription = "The 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.";
6518
- /**
6519
- * @uiName Beneficiary name mismatch alert header
6520
- */
6521
- this.beneficiaryNameMismatchHeader = "Your payment information does not match your tax form";
6522
- /**
6523
- * @uiName Beneficiary name mismatch alert description
6524
- */
6525
- this.beneficiaryNameMismatchDescription = "The 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.";
6526
- /**
6527
- * @uiName Bank name mismatch alert header
6528
- */
6529
- this.bankTaxNameMismatchHeader = "Your payment information does not match your tax form";
6530
- /**
6531
- * @uiName Bank name mismatch alert description
6532
- */
6533
- this.bankTaxNameMismatchDescription = "The bank 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.";
6534
- /**
6535
- * @uiName Withdrawal settings invalid alert header
6536
- */
6537
- this.withdrawalSettingsInvalidHeader = "Your payment information includes invalid characters";
6538
- /**
6539
- * @uiName Withdrawal settings invalid alert description
6540
- */
6541
- this.withdrawalSettingsInvalidDescription = "There are invalid characters in your payment information. Please review your information and make sure it is correct with no invalid characters. Your payouts are on hold until this is resolved.";
6542
- /**
6543
- * @uiName Payment returned alert header
6544
- */
6545
- this.paymentReturnedHeader = "Payout unsuccessful";
6546
- /**
6547
- * @uiName Payment returned alert description
6548
- */
6549
- this.paymentReturnedDescription = "Our recent payment attempt for your earnings was unsuccessful. Please review your payment information and make sure it is correct.";
6550
6485
  /**
6551
6486
  * @uiName Terms and Conditions text
6552
6487
  */
@@ -7812,12 +7747,6 @@ const UserInfoFormView = (props) => {
7812
7747
  default:
7813
7748
  regionLabel = text.state;
7814
7749
  }
7815
- function isDisabledInput(field) {
7816
- var _a;
7817
- if (states.isPartner && !!((_a = data.partnerData) === null || _a === void 0 ? void 0 : _a[field]))
7818
- return true;
7819
- return false;
7820
- }
7821
7750
  return (h("sl-form", { class: classes.FormWrapper, "onSl-submit": callbacks.onSubmit, ref: (el) => (refs.formRef.current = el), novalidate: true },
7822
7751
  h("style", { type: "text/css" },
7823
7752
  styleString$6,
@@ -7865,22 +7794,18 @@ const UserInfoFormView = (props) => {
7865
7794
  }))),
7866
7795
  h("div", null,
7867
7796
  h("div", { class: classes.InputContainer },
7868
- h("sl-input", Object.assign({ exportparts: "label: input-label, base: input-base", value: formState.firstName, label: text.firstName, disabled: states.disabled ||
7869
- states.isUser ||
7870
- isDisabledInput("firstName") }, (((_b = formState.errors) === null || _b === void 0 ? void 0 : _b.firstName) ? {
7797
+ h("sl-input", Object.assign({ 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) ? {
7871
7798
  class: classes.ErrorInput,
7872
7799
  helpText: formatErrorMessage(text.firstName, formState.errors.firstName),
7873
7800
  }
7874
7801
  : {}), { id: "firstName", name: "/firstName", required: true })),
7875
- h("sl-input", Object.assign({ exportparts: "label: input-label, base: input-base", value: formState.lastName, label: text.lastName, disabled: states.disabled ||
7876
- states.isUser ||
7877
- isDisabledInput("lastName") }, (((_c = formState.errors) === null || _c === void 0 ? void 0 : _c.lastName) ? {
7802
+ 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) ? {
7878
7803
  class: classes.ErrorInput,
7879
7804
  helpText: formatErrorMessage(text.lastName, formState.errors.lastName),
7880
7805
  }
7881
7806
  : {}), { id: "lastName", name: "/lastName", required: true })),
7882
7807
  h("sl-input", { exportparts: "label: input-label, base: input-base", value: formState.email, label: text.email, disabled: true, id: "email", name: "/email", required: true }),
7883
- 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) ? {
7808
+ 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) ? {
7884
7809
  class: classes.ErrorInput,
7885
7810
  helpText: formatErrorMessage(text.country, formState.errors.countryCode),
7886
7811
  }
@@ -7896,8 +7821,7 @@ const UserInfoFormView = (props) => {
7896
7821
  h("div", { class: classes.PhoneInputsSection },
7897
7822
  h("p", null, text.phoneNumber),
7898
7823
  h("div", { class: classes.PhoneInputsContainer },
7899
- h("sl-select", Object.assign({ id: "phoneNumberCountryCode", exportparts: "label: input-label, base: input-base", name: "/phoneNumberCountryCode", value: formState.phoneNumberCountryCode, disabled: states.disabled ||
7900
- isDisabledInput("phoneNumberCountryCode"), ref: (el) => (refs.phoneCountryRef.current = el) }, (((_g = formState.errors) === null || _g === void 0 ? void 0 : _g.phoneNumberCountryCode) ? {
7824
+ 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) ? {
7901
7825
  class: classes.ErrorInput,
7902
7826
  }
7903
7827
  : {}), { required: true, "onSl-select": (e) => callbacks.onFormChange("phoneCountry", e) }),
@@ -7923,7 +7847,7 @@ const UserInfoFormView = (props) => {
7923
7847
  // Naive phone number validation
7924
7848
  validateBillingField(/[a-zA-Z]+/, value) &&
7925
7849
  formatErrorMessage(text.phoneNumber, text.error.fieldInvalidError);
7926
- }, disabled: states.disabled || isDisabledInput("phoneNumber") }, (((_k = formState.errors) === null || _k === void 0 ? void 0 : _k.phoneNumber) ? {
7850
+ }, disabled: states.disabled || states.isPartner }, (((_k = formState.errors) === null || _k === void 0 ? void 0 : _k.phoneNumber) ? {
7927
7851
  class: classes.ErrorInput,
7928
7852
  helpText: formatErrorMessage(text.phoneNumber, formState.errors.phoneNumber),
7929
7853
  }
@@ -7931,7 +7855,7 @@ const UserInfoFormView = (props) => {
7931
7855
  h("sl-input", Object.assign({ exportparts: "label: input-label, base: input-base", label: text.address, id: "address", name: "/address", value: formState.address, validationError: ({ value }) =>
7932
7856
  // Checks for non-ASCII characters
7933
7857
  !validateBillingField(/^[\x20-\xFF]+$/, value) &&
7934
- formatErrorMessage(text.address, text.error.invalidCharacterError), disabled: states.disabled || isDisabledInput("address") }, (((_l = formState.errors) === null || _l === void 0 ? void 0 : _l.address) ? {
7858
+ formatErrorMessage(text.address, text.error.invalidCharacterError), disabled: states.disabled || states.isPartner }, (((_l = formState.errors) === null || _l === void 0 ? void 0 : _l.address) ? {
7935
7859
  class: classes.ErrorInput,
7936
7860
  helpText: formatErrorMessage(text.address, formState.errors.address),
7937
7861
  }
@@ -7939,22 +7863,22 @@ const UserInfoFormView = (props) => {
7939
7863
  h("sl-input", Object.assign({ exportparts: "label: input-label, base: input-base", label: text.city, id: "city", name: "/city", value: formState.city, validationError: ({ value }) =>
7940
7864
  // Checks for non-ASCII characters
7941
7865
  !validateBillingField(/^[\x20-\xFF]+$/, value) &&
7942
- formatErrorMessage(text.city, text.error.invalidCharacterError), disabled: states.disabled || isDisabledInput("city") }, (((_m = formState.errors) === null || _m === void 0 ? void 0 : _m.city) ? {
7866
+ formatErrorMessage(text.city, text.error.invalidCharacterError), disabled: states.disabled || states.isPartner }, (((_m = formState.errors) === null || _m === void 0 ? void 0 : _m.city) ? {
7943
7867
  class: classes.ErrorInput,
7944
7868
  helpText: formatErrorMessage(text.city, formState.errors.city),
7945
7869
  }
7946
7870
  : {}), { required: true })),
7947
- !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("state") }, (((_o = formState.errors) === null || _o === void 0 ? void 0 : _o.state) ? {
7871
+ !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) ? {
7948
7872
  class: classes.ErrorInput,
7949
7873
  helpText: formatErrorMessage(text.state, formState.errors.state),
7950
7874
  }
7951
7875
  : {}), { required: true }), (_p = data.regions) === null || _p === void 0 ? void 0 : _p.map((r) => (h("sl-menu-item", { value: r.value }, r.label))))),
7952
- 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("postalCode") }, (((_q = formState.errors) === null || _q === void 0 ? void 0 : _q.postalCode) ? {
7876
+ 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) ? {
7953
7877
  class: classes.ErrorInput,
7954
7878
  helpText: formatErrorMessage(text.postalCode, formState.errors.postalCode),
7955
7879
  }
7956
7880
  : {}), { required: true })),
7957
- 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) ? {
7881
+ 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) ? {
7958
7882
  class: classes.ErrorInput,
7959
7883
  helpText: formatErrorMessage(text.currency, formState.errors.currency),
7960
7884
  }
@@ -7976,13 +7900,13 @@ const UserInfoFormView = (props) => {
7976
7900
  h("div", { class: classes.CheckboxWrapper },
7977
7901
  h("sl-checkbox", { exportparts: "label: input-label, base: input-base", checked: formState.allowBankingCollection === true, "onSl-change": (e) => {
7978
7902
  e.target.value = e.target.checked;
7979
- }, disabled: states.disabled, required: true, value: formState.allowBankingCollection, id: "allowBankingCollection", name: "/allowBankingCollection" }, bankingCollectionText),
7903
+ }, disabled: states.isPartner ? false : states.disabled, required: true, value: formState.allowBankingCollection, id: "allowBankingCollection", name: "/allowBankingCollection" }, bankingCollectionText),
7980
7904
  ((_u = formState.errors) === null || _u === void 0 ? void 0 : _u.allowBankingCollection) && (h("p", { class: classes.ErrorText }, formatErrorMessage(text.termsAndConditionsLabel, formState.errors.allowBankingCollection))))),
7981
- h("sl-button", { type: "primary", disabled: states.disabled, submit: true, exportparts: "base: primarybutton-base" }, text.continueButton))))));
7905
+ h("sl-button", { type: "primary", disabled: states.isPartner ? false : states.disabled, submit: true, exportparts: "base: primarybutton-base" }, text.continueButton))))));
7982
7906
  };
7983
7907
 
7984
7908
  function useUserInfoForm(props) {
7985
- var _a, _b, _c, _d, _e, _f;
7909
+ var _a, _b, _c, _d;
7986
7910
  const currencyRef = useRef(undefined);
7987
7911
  const phoneCountryRef = useRef(undefined);
7988
7912
  const formRef = useRef(null);
@@ -7990,9 +7914,7 @@ function useUserInfoForm(props) {
7990
7914
  const countries = Fn(SORTED_COUNTRIES_NAMESPACE);
7991
7915
  const [step, setStep] = Pn(TAX_CONTEXT_NAMESPACE);
7992
7916
  const [userFormContext, setUserFormContext] = Pn(USER_FORM_CONTEXT_NAMESPACE);
7993
- const user = J();
7994
- const [connectImpactPartner, { loading: connectLoading, errors: connectErrors },] = $e(CONNECT_PARTNER);
7995
- const { data, loading, refetch, errors: userError, } = $n(USER_QUERY_NAMESPACE);
7917
+ const { data, loading, errors: userError, } = $n(USER_QUERY_NAMESPACE);
7996
7918
  const _currencies = Fn(CURRENCIES_NAMESPACE);
7997
7919
  const currencies = useMemo(() => [...(_currencies || [])].sort((a, b) => a.displayName.localeCompare(b.displayName)), [_currencies]);
7998
7920
  const [countrySearch, setCountrySearch] = useState("");
@@ -8094,45 +8016,6 @@ function useUserInfoForm(props) {
8094
8016
  setFilteredCurrencies(currencies.filter((c) => c.currencyCode.toLowerCase().includes(currencySearch.toLowerCase())) || []);
8095
8017
  }
8096
8018
  }, [currencySearch, currencies]);
8097
- async function connectPartner(formData) {
8098
- var _a, _b, _c, _d, _e;
8099
- const vars = {
8100
- user: {
8101
- id: user.id,
8102
- accountId: user.accountId,
8103
- },
8104
- firstName: formData.firstName,
8105
- lastName: formData.lastName,
8106
- countryCode: formData.countryCode,
8107
- currency: formData.currency,
8108
- address: formData.address,
8109
- city: formData.city,
8110
- state: formData.state,
8111
- postalCode: formData.postalCode,
8112
- phoneNumber: formData.phoneNumber,
8113
- phoneNumberCountryCode: formData.phoneNumberCountryCode,
8114
- };
8115
- const result = await connectImpactPartner({
8116
- vars,
8117
- });
8118
- if (!result || ((_a = result) === null || _a === void 0 ? void 0 : _a.message))
8119
- throw new Error();
8120
- if (!((_b = result.createImpactConnection) === null || _b === void 0 ? void 0 : _b.success)) {
8121
- // Output backend errors to console for now
8122
- console.error("Failed to create Impact connection: ", result.createImpactConnection.validationErrors);
8123
- throw new Error();
8124
- }
8125
- await refetch();
8126
- const resultPublisher = (_e = (_d = (_c = result
8127
- .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;
8128
- const hasValidCurrentDocument = validTaxDocument(resultPublisher === null || resultPublisher === void 0 ? void 0 : resultPublisher.requiredTaxDocumentType) && (resultPublisher === null || resultPublisher === void 0 ? void 0 : resultPublisher.currentTaxDocument);
8129
- // Fire form change event
8130
- window.dispatchEvent(new Event(TAX_FORM_UPDATED_EVENT_KEY));
8131
- return {
8132
- resultPublisher,
8133
- hasValidCurrentDocument,
8134
- };
8135
- }
8136
8019
  async function onSubmit(event) {
8137
8020
  let formControls = event.target.getFormControls();
8138
8021
  let formData = {};
@@ -8175,41 +8058,9 @@ function useUserInfoForm(props) {
8175
8058
  postalCode: userData.postalCode,
8176
8059
  currency: userData.currency,
8177
8060
  });
8178
- const skipNextStep = getSkipNextStep(userData);
8179
- console.log({ skipNextStep });
8180
- if (skipNextStep) {
8181
- try {
8182
- const { resultPublisher, hasValidCurrentDocument } = await connectPartner(formData);
8183
- if ((resultPublisher === null || resultPublisher === void 0 ? void 0 : resultPublisher.requiredTaxDocumentType) &&
8184
- !hasValidCurrentDocument) {
8185
- // Go to docusign form
8186
- setStep("/3");
8187
- }
8188
- else {
8189
- if (resultPublisher === null || resultPublisher === void 0 ? void 0 : resultPublisher.brandedSignup) {
8190
- // Go to banking information form
8191
- setStep("/4");
8192
- }
8193
- else {
8194
- // Go right to the dashboard
8195
- setStep("/dashboard");
8196
- }
8197
- }
8198
- return;
8199
- }
8200
- catch (e) {
8201
- setErrors({ general: true });
8202
- return;
8203
- }
8204
- }
8205
- const nextStep = context.overrideNextStep || skipNextStep ? "/3" : "/2";
8061
+ const nextStep = context.overrideNextStep || "/2";
8206
8062
  setStep(nextStep);
8207
8063
  }
8208
- function getSkipNextStep(userData) {
8209
- if (userData.countryCode === "US")
8210
- return true;
8211
- return true;
8212
- }
8213
8064
  const hasStates = ["ES", "AU", "US", "CA"].includes(userFormContext.countryCode);
8214
8065
  const regionObj = hasStates
8215
8066
  ? ADDRESS_REGIONS[userFormContext === null || userFormContext === void 0 ? void 0 : userFormContext.countryCode]
@@ -8237,17 +8088,16 @@ function useUserInfoForm(props) {
8237
8088
  allCountries: countries,
8238
8089
  regionLabelEnum: regionObj === null || regionObj === void 0 ? void 0 : regionObj.labelEnum,
8239
8090
  regions: (regionObj === null || regionObj === void 0 ? void 0 : regionObj.regions) || [],
8240
- partnerData: (_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,
8241
8091
  },
8242
8092
  states: {
8243
8093
  step: step === null || step === void 0 ? void 0 : step.replace("/", ""),
8244
8094
  hideState: !hasStates,
8245
8095
  hideSteps: !!context.hideSteps,
8246
- disabled: loading || connectLoading,
8096
+ disabled: loading,
8247
8097
  loadingError: !!(userError === null || userError === void 0 ? void 0 : userError.message),
8248
- loading: loading || connectLoading,
8249
- isPartner: !!((_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.publisher),
8250
- isUser: !!((_f = (_e = data === null || data === void 0 ? void 0 : data.user) === null || _e === void 0 ? void 0 : _e.impactConnection) === null || _f === void 0 ? void 0 : _f.user),
8098
+ loading: loading,
8099
+ 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),
8100
+ 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),
8251
8101
  formState: {
8252
8102
  ...userFormContext,
8253
8103
  errors: formErrors,