@saasquatch/mint-components 2.0.2-9 → 2.0.3-1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/{IndirectTaxDetailsView-e5f70b8b.js → IndirectTaxDetailsView-659a139c.js} +2 -2
- package/dist/cjs/{ShadowViewAddon-925a8fa6.js → ShadowViewAddon-ae3a32c3.js} +5 -5
- package/dist/cjs/{usePayoutStatus-9abe2de8.js → data-44260010.js} +127 -129
- package/dist/cjs/{global-8bba5b3a.js → global-e862bfd4.js} +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/mint-components.cjs.js +1 -1
- package/dist/cjs/sqm-banking-info-form_10.cjs.entry.js +120 -85
- package/dist/cjs/sqm-big-stat_47.cjs.entry.js +44 -38
- package/dist/cjs/sqm-code-verification.cjs.entry.js +1 -1
- package/dist/cjs/sqm-email-verification.cjs.entry.js +1 -1
- package/dist/cjs/sqm-empty_4.cjs.entry.js +1 -1
- package/dist/cjs/sqm-header-logo.cjs.entry.js +2 -2
- package/dist/cjs/{sqm-lead-checkbox-field-view-340acad0.js → sqm-lead-checkbox-field-view-dca40eb4.js} +1 -1
- package/dist/cjs/sqm-lead-checkbox-field.cjs.entry.js +3 -3
- package/dist/cjs/{sqm-lead-input-field-view-06ed3632.js → sqm-lead-input-field-view-2006001f.js} +1 -1
- package/dist/cjs/sqm-lead-input-field.cjs.entry.js +3 -3
- package/dist/cjs/sqm-leaderboard-rank.cjs.entry.js +1 -1
- package/dist/cjs/sqm-pagination_3.cjs.entry.js +1 -1
- package/dist/cjs/{sqm-portal-email-verification-view-5518eb0d.js → sqm-portal-email-verification-view-1745d9a2.js} +1 -1
- package/dist/cjs/sqm-portal-email-verification.cjs.entry.js +2 -2
- package/dist/cjs/{sqm-portal-profile-view-615e6975.js → sqm-portal-profile-view-5c5e29b1.js} +1 -1
- package/dist/cjs/sqm-portal-profile.cjs.entry.js +2 -2
- package/dist/cjs/sqm-referral-table_11.cjs.entry.js +1 -1
- package/dist/cjs/sqm-rewards-table_9.cjs.entry.js +1 -1
- package/dist/cjs/sqm-stencilbook.cjs.entry.js +29 -9
- package/dist/cjs/{useLeadFormState-fd0445f9.js → useLeadFormState-91999606.js} +1 -1
- package/dist/cjs/{utils-83d125fa.js → utils-4eb18a29.js} +1 -1
- package/dist/collection/components/sqm-header-logo/sqm-header-logo.js +5 -2
- package/dist/collection/components/sqm-reward-exchange-list/sqm-reward-exchange-list-view.js +4 -4
- package/dist/collection/components/tax-and-cash/sqm-banking-info-form/useBankingInfoForm.js +10 -6
- package/dist/collection/components/tax-and-cash/sqm-docusign-form/useDocusignForm.js +11 -5
- package/dist/collection/components/tax-and-cash/sqm-payout-status-alert/PayoutStatusAlert.stories.js +13 -0
- package/dist/collection/components/tax-and-cash/sqm-payout-status-alert/sqm-payout-status-alert-view.js +12 -6
- package/dist/collection/components/tax-and-cash/sqm-payout-status-alert/sqm-payout-status-alert.js +5 -5
- package/dist/collection/components/tax-and-cash/sqm-payout-status-alert/usePayoutStatus.js +1 -4
- package/dist/collection/components/tax-and-cash/sqm-tax-and-cash/sqm-tax-and-cash.js +4 -4
- package/dist/collection/components/tax-and-cash/sqm-tax-and-cash-dashboard/sqm-tax-and-cash-dashboard-view.js +9 -4
- package/dist/collection/components/tax-and-cash/sqm-tax-and-cash-dashboard/sqm-tax-and-cash-dashboard.js +4 -4
- package/dist/collection/components/tax-and-cash/sqm-tax-and-cash-dashboard/useTaxAndCashDashboard.js +7 -1
- package/dist/collection/components/tax-and-cash/sqm-user-info-form/sqm-user-info-form-view.js +4 -4
- package/dist/collection/components/tax-and-cash/sqm-user-info-form/useUserInfoForm.js +20 -12
- package/dist/collection/global/styles.js +1 -1
- package/dist/collection/global/styles.ts +1 -1
- package/dist/esm/{IndirectTaxDetailsView-0a57b622.js → IndirectTaxDetailsView-8dec05e4.js} +2 -2
- package/dist/esm/{ShadowViewAddon-aae27c2e.js → ShadowViewAddon-78a1c35c.js} +5 -5
- package/dist/esm/{usePayoutStatus-e0ef2374.js → data-68816061.js} +128 -130
- package/dist/esm/{global-1099f20d.js → global-58a69018.js} +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/esm/mint-components.js +1 -1
- package/dist/esm/sqm-banking-info-form_10.entry.js +67 -32
- package/dist/esm/sqm-big-stat_47.entry.js +22 -16
- package/dist/esm/sqm-code-verification.entry.js +1 -1
- package/dist/esm/sqm-email-verification.entry.js +1 -1
- package/dist/esm/sqm-empty_4.entry.js +1 -1
- package/dist/esm/sqm-header-logo.entry.js +2 -2
- package/dist/esm/{sqm-lead-checkbox-field-view-cbafee07.js → sqm-lead-checkbox-field-view-81541e40.js} +1 -1
- package/dist/esm/sqm-lead-checkbox-field.entry.js +3 -3
- package/dist/esm/{sqm-lead-input-field-view-f3775c28.js → sqm-lead-input-field-view-d543d939.js} +1 -1
- package/dist/esm/sqm-lead-input-field.entry.js +3 -3
- package/dist/esm/sqm-leaderboard-rank.entry.js +1 -1
- package/dist/esm/sqm-pagination_3.entry.js +1 -1
- package/dist/esm/{sqm-portal-email-verification-view-7d86299c.js → sqm-portal-email-verification-view-5fb1a99e.js} +1 -1
- package/dist/esm/sqm-portal-email-verification.entry.js +2 -2
- package/dist/esm/{sqm-portal-profile-view-3ed13e4d.js → sqm-portal-profile-view-e3aef106.js} +1 -1
- package/dist/esm/sqm-portal-profile.entry.js +2 -2
- package/dist/esm/sqm-referral-table_11.entry.js +1 -1
- package/dist/esm/sqm-rewards-table_9.entry.js +1 -1
- package/dist/esm/sqm-stencilbook.entry.js +29 -9
- package/dist/esm/{useLeadFormState-c379e5d7.js → useLeadFormState-8d4b2620.js} +1 -1
- package/dist/esm/{utils-6122971b.js → utils-2695a43e.js} +1 -1
- package/dist/esm-es5/{IndirectTaxDetailsView-0a57b622.js → IndirectTaxDetailsView-8dec05e4.js} +1 -1
- package/dist/esm-es5/{ShadowViewAddon-aae27c2e.js → ShadowViewAddon-78a1c35c.js} +1 -1
- package/dist/esm-es5/data-68816061.js +6 -0
- package/dist/esm-es5/{global-1099f20d.js → global-58a69018.js} +1 -1
- package/dist/esm-es5/loader.js +1 -1
- package/dist/esm-es5/mint-components.js +1 -1
- package/dist/esm-es5/sqm-banking-info-form_10.entry.js +1 -1
- package/dist/esm-es5/sqm-big-stat_47.entry.js +1 -1
- package/dist/esm-es5/sqm-code-verification.entry.js +1 -1
- package/dist/esm-es5/sqm-email-verification.entry.js +1 -1
- package/dist/esm-es5/sqm-empty_4.entry.js +1 -1
- package/dist/esm-es5/sqm-header-logo.entry.js +1 -1
- package/dist/esm-es5/{sqm-lead-checkbox-field-view-cbafee07.js → sqm-lead-checkbox-field-view-81541e40.js} +1 -1
- package/dist/esm-es5/sqm-lead-checkbox-field.entry.js +1 -1
- package/dist/esm-es5/{sqm-lead-input-field-view-f3775c28.js → sqm-lead-input-field-view-d543d939.js} +1 -1
- package/dist/esm-es5/sqm-lead-input-field.entry.js +1 -1
- package/dist/esm-es5/sqm-leaderboard-rank.entry.js +1 -1
- package/dist/esm-es5/sqm-pagination_3.entry.js +1 -1
- package/dist/esm-es5/{sqm-portal-email-verification-view-7d86299c.js → sqm-portal-email-verification-view-5fb1a99e.js} +1 -1
- package/dist/esm-es5/sqm-portal-email-verification.entry.js +1 -1
- package/dist/esm-es5/{sqm-portal-profile-view-3ed13e4d.js → sqm-portal-profile-view-e3aef106.js} +1 -1
- package/dist/esm-es5/sqm-portal-profile.entry.js +1 -1
- package/dist/esm-es5/sqm-referral-table_11.entry.js +1 -1
- package/dist/esm-es5/sqm-rewards-table_9.entry.js +1 -1
- package/dist/esm-es5/sqm-stencilbook.entry.js +1 -1
- package/dist/esm-es5/{useLeadFormState-c379e5d7.js → useLeadFormState-8d4b2620.js} +1 -1
- package/dist/esm-es5/{utils-6122971b.js → utils-2695a43e.js} +1 -1
- package/dist/mint-components/global/styles.ts +1 -1
- package/dist/mint-components/mint-components.esm.js +1 -1
- package/dist/mint-components/mint-components.js +1 -1
- package/dist/mint-components/{p-717b6730.system.entry.js → p-011c0990.system.entry.js} +1 -1
- package/dist/mint-components/{p-db1a0db1.js → p-027c0b10.js} +1 -1
- package/dist/mint-components/{p-aa8c6332.js → p-088f082f.js} +1 -1
- package/dist/mint-components/{p-511c87ce.system.entry.js → p-0c024cf0.system.entry.js} +1 -1
- package/dist/mint-components/{p-60465a2d.system.js → p-1215518e.system.js} +1 -1
- package/dist/mint-components/{p-6c006998.entry.js → p-12e6cea7.entry.js} +2 -2
- package/dist/mint-components/{p-ad4348c3.system.js → p-13c6673e.system.js} +1 -1
- package/dist/mint-components/{p-ed16b35a.js → p-1aa9136c.js} +1 -1
- package/dist/mint-components/{p-a5c63310.entry.js → p-1b79b186.entry.js} +1 -1
- package/dist/mint-components/{p-6d5bd95a.js → p-1d8c5935.js} +1 -1
- package/dist/mint-components/{p-56009bf0.system.entry.js → p-2ea3eea9.system.entry.js} +1 -1
- package/dist/mint-components/{p-7a268047.js → p-325c5476.js} +1 -1
- package/dist/mint-components/{p-bec87ac9.system.entry.js → p-36a1fa33.system.entry.js} +1 -1
- package/dist/mint-components/p-42760067.system.entry.js +1 -0
- package/dist/mint-components/{p-aefaec37.entry.js → p-43ad51bc.entry.js} +1 -1
- package/dist/mint-components/{p-e0a724dd.system.js → p-4cc72a4e.system.js} +1 -1
- package/dist/mint-components/{p-47c83656.entry.js → p-58c79873.entry.js} +1 -1
- package/dist/mint-components/{p-c994512c.system.js → p-5fbe6356.system.js} +1 -1
- package/dist/mint-components/{p-6d9ce4e5.entry.js → p-6076dbaf.entry.js} +1 -1
- package/dist/mint-components/{p-74f43a08.system.js → p-78dda262.system.js} +1 -1
- package/dist/mint-components/p-7fb4470e.entry.js +1 -0
- package/dist/mint-components/{p-4ce51b1c.system.entry.js → p-829cb9ed.system.entry.js} +1 -1
- package/dist/mint-components/{p-c85f204b.system.js → p-8618e8f6.system.js} +1 -1
- package/dist/mint-components/{p-aa08457e.system.js → p-8d9fa981.system.js} +1 -1
- package/dist/mint-components/{p-09ab53fb.system.entry.js → p-8fa77acf.system.entry.js} +1 -1
- package/dist/mint-components/p-92b5c376.js +157 -0
- package/dist/mint-components/{p-967a9040.system.js → p-947bacd1.system.js} +1 -1
- package/dist/mint-components/{p-79a3344f.js → p-988f236f.js} +1 -1
- package/dist/mint-components/{p-22a9114f.system.entry.js → p-9d46f87f.system.entry.js} +1 -1
- package/dist/mint-components/p-a2dbc9ad.system.js +6 -0
- package/dist/mint-components/{p-4c811d12.entry.js → p-a470e203.entry.js} +2 -2
- package/dist/mint-components/{p-00bc7211.js → p-a974c549.js} +1 -1
- package/dist/mint-components/{p-5f3eafd4.entry.js → p-aabfb90f.entry.js} +2 -2
- package/dist/mint-components/p-ad3ebf4d.entry.js +1 -0
- package/dist/mint-components/{p-0649123a.system.entry.js → p-bbdf93b6.system.entry.js} +1 -1
- package/dist/mint-components/p-be0ca483.entry.js +273 -0
- package/dist/mint-components/{p-4fed8672.js → p-bf044217.js} +1 -1
- package/dist/mint-components/p-c0d60c61.entry.js +106 -0
- package/dist/mint-components/{p-d3120982.system.entry.js → p-c6e8086f.system.entry.js} +1 -1
- package/dist/mint-components/{p-ea0bc627.entry.js → p-d88d8ffe.entry.js} +1 -1
- package/dist/mint-components/{p-a217cc8d.entry.js → p-dc5bca55.entry.js} +1 -1
- package/dist/mint-components/{p-6445e926.system.entry.js → p-deecffd0.system.entry.js} +1 -1
- package/dist/mint-components/{p-60c14cec.entry.js → p-e19f0908.entry.js} +1 -1
- package/dist/mint-components/{p-38f932ae.system.js → p-e3ee8c37.system.js} +1 -1
- package/dist/mint-components/{p-14e813a7.system.entry.js → p-e8bda98a.system.entry.js} +1 -1
- package/dist/mint-components/{p-5d059c95.entry.js → p-ee3a7577.entry.js} +1 -1
- package/dist/mint-components/{p-57ce33dd.js → p-ee83de0e.js} +2 -2
- package/dist/mint-components/{p-f401ef19.system.entry.js → p-f5256738.system.entry.js} +1 -1
- package/dist/mint-components/p-f5820d03.system.js +1 -0
- package/dist/mint-components/{p-18720462.system.entry.js → p-fcf8bdbc.system.entry.js} +1 -1
- package/dist/mint-components/p-ffef3f95.system.entry.js +1 -0
- package/dist/types/components/sqm-header-logo/sqm-header-logo.d.ts +1 -0
- package/dist/types/components/tax-and-cash/sqm-payout-status-alert/PayoutStatusAlert.stories.d.ts +7 -0
- package/dist/types/components.d.ts +2 -0
- package/docs/docs.docx +0 -0
- package/docs/raisins.json +1 -1
- package/package.json +1 -1
- package/dist/esm-es5/usePayoutStatus-e0ef2374.js +0 -6
- package/dist/mint-components/p-35576752.system.entry.js +0 -1
- package/dist/mint-components/p-408a3798.entry.js +0 -273
- package/dist/mint-components/p-59bb2d52.system.js +0 -6
- package/dist/mint-components/p-60e35884.entry.js +0 -99
- package/dist/mint-components/p-680a7162.system.entry.js +0 -1
- package/dist/mint-components/p-8b5b2acc.entry.js +0 -1
- package/dist/mint-components/p-ab111e29.entry.js +0 -1
- package/dist/mint-components/p-c41108ae.js +0 -157
- package/dist/mint-components/p-f0eae4e6.system.js +0 -1
|
@@ -1,132 +1,5 @@
|
|
|
1
1
|
import { k as useState, f as useEffect } from './dom-context-hooks.module-63370afd.js';
|
|
2
|
-
import { d as dist, J, $ as $e, g as getEnvironmentSDK, w as wn
|
|
3
|
-
|
|
4
|
-
const TAX_CONTEXT_NAMESPACE = "sq:tax-and-cash";
|
|
5
|
-
const TAX_FORM_CONTEXT_NAMESPACE = "sq:tax-form-context";
|
|
6
|
-
const USER_QUERY_NAMESPACE = "sq:user-info-query";
|
|
7
|
-
const USER_FORM_CONTEXT_NAMESPACE = "sq:user-form-context";
|
|
8
|
-
const FINANCE_NETWORK_SETTINGS_NAMESPACE = "sq:finance-network-settings";
|
|
9
|
-
const COUNTRIES_NAMESPACE = "sq:countries:list";
|
|
10
|
-
const SORTED_COUNTRIES_NAMESPACE = "sq:countries:sorted";
|
|
11
|
-
const COUNTRIES_QUERY_NAMESPACE = "sq:countries:query";
|
|
12
|
-
const CURRENCIES_NAMESPACE = "sq:currencies:list";
|
|
13
|
-
const CURRENCIES_QUERY_NAMESPACE = "sq:currencies:query";
|
|
14
|
-
const GET_USER = dist.gql `
|
|
15
|
-
query getUserTaxInfo {
|
|
16
|
-
user: viewer {
|
|
17
|
-
... on User {
|
|
18
|
-
id
|
|
19
|
-
firstName
|
|
20
|
-
lastName
|
|
21
|
-
email
|
|
22
|
-
countryCode
|
|
23
|
-
customFields
|
|
24
|
-
rewards(limit: 1000) {
|
|
25
|
-
data {
|
|
26
|
-
statuses
|
|
27
|
-
partnerFundsTransfer {
|
|
28
|
-
id
|
|
29
|
-
status
|
|
30
|
-
}
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
|
-
managedIdentity {
|
|
34
|
-
uid
|
|
35
|
-
email
|
|
36
|
-
emailVerified
|
|
37
|
-
}
|
|
38
|
-
impactConnection {
|
|
39
|
-
connected
|
|
40
|
-
user {
|
|
41
|
-
firstName
|
|
42
|
-
lastName
|
|
43
|
-
}
|
|
44
|
-
publisher {
|
|
45
|
-
id
|
|
46
|
-
brandedSignup
|
|
47
|
-
countryCode
|
|
48
|
-
currency
|
|
49
|
-
billingAddress
|
|
50
|
-
billingCity
|
|
51
|
-
billingState
|
|
52
|
-
billingCountryCode
|
|
53
|
-
billingPostalCode
|
|
54
|
-
phoneNumberCountryCode
|
|
55
|
-
phoneNumber
|
|
56
|
-
taxInformation {
|
|
57
|
-
indirectTaxId
|
|
58
|
-
indirectTaxCountryCode
|
|
59
|
-
indirectTaxRegion
|
|
60
|
-
additionalTaxId
|
|
61
|
-
withholdingTaxId
|
|
62
|
-
withholdingTaxCountryCode
|
|
63
|
-
}
|
|
64
|
-
requiredTaxDocumentType
|
|
65
|
-
currentTaxDocument {
|
|
66
|
-
status
|
|
67
|
-
type
|
|
68
|
-
dateCreated
|
|
69
|
-
}
|
|
70
|
-
withdrawalSettings {
|
|
71
|
-
paymentMethod
|
|
72
|
-
paypalEmailAddress
|
|
73
|
-
bankCountry
|
|
74
|
-
bankAccountNumber
|
|
75
|
-
paymentSchedulingType
|
|
76
|
-
paymentThreshold
|
|
77
|
-
paymentDay
|
|
78
|
-
}
|
|
79
|
-
payoutsAccount {
|
|
80
|
-
hold
|
|
81
|
-
holdReasons
|
|
82
|
-
balance
|
|
83
|
-
}
|
|
84
|
-
}
|
|
85
|
-
}
|
|
86
|
-
}
|
|
87
|
-
}
|
|
88
|
-
}
|
|
89
|
-
`;
|
|
90
|
-
const GET_COUNTRIES = dist.gql `
|
|
91
|
-
query getCountries {
|
|
92
|
-
impactPayoutCountries(limit: 1000) {
|
|
93
|
-
data {
|
|
94
|
-
countryCode
|
|
95
|
-
displayName
|
|
96
|
-
}
|
|
97
|
-
}
|
|
98
|
-
}
|
|
99
|
-
`;
|
|
100
|
-
const GET_CURRENCIES = dist.gql `
|
|
101
|
-
query currencies($locale: RSLocale) {
|
|
102
|
-
currencies(limit: 300) {
|
|
103
|
-
data {
|
|
104
|
-
displayName(locale: $locale)
|
|
105
|
-
currencyCode
|
|
106
|
-
}
|
|
107
|
-
}
|
|
108
|
-
}
|
|
109
|
-
`;
|
|
110
|
-
const GET_FINANCE_NETWORK_SETTINGS = dist.gql `
|
|
111
|
-
query impactFinanceNetworkSettings(
|
|
112
|
-
$filter: ImpactFinanceNetworkSettingsFilterInput
|
|
113
|
-
) {
|
|
114
|
-
impactFinanceNetworkSettings(filter: $filter, limit: 1000) {
|
|
115
|
-
data {
|
|
116
|
-
countryCode
|
|
117
|
-
currency
|
|
118
|
-
defaultFinancePaymentMethodId
|
|
119
|
-
thresholdOptions
|
|
120
|
-
withdrawalSettingId
|
|
121
|
-
internationalEftFee
|
|
122
|
-
foreignFxFee
|
|
123
|
-
defaultFxFee
|
|
124
|
-
}
|
|
125
|
-
totalCount
|
|
126
|
-
}
|
|
127
|
-
}
|
|
128
|
-
`;
|
|
129
|
-
const FORM_STEPS = 4;
|
|
2
|
+
import { d as dist, J, $ as $e, g as getEnvironmentSDK, w as wn } from './index.module-c9811a48.js';
|
|
130
3
|
|
|
131
4
|
const TAX_FORM_UPDATED_EVENT_KEY = "sqm:tax-form-updated";
|
|
132
5
|
|
|
@@ -1172,8 +1045,6 @@ function usePayoutStatus(props) {
|
|
|
1172
1045
|
const { data: taxSettingRes } = wn(GET_TAX_SETTING, {});
|
|
1173
1046
|
const { render, loading: veriffLoading, errors: veriffErrors, } = useVeriffApp();
|
|
1174
1047
|
const [status, setStatus] = useState(undefined);
|
|
1175
|
-
const setContext = En(TAX_FORM_CONTEXT_NAMESPACE);
|
|
1176
|
-
const setStep = En(TAX_CONTEXT_NAMESPACE);
|
|
1177
1048
|
const enforceUsTaxComplianceOption = (_a = taxSettingRes === null || taxSettingRes === void 0 ? void 0 : taxSettingRes.tenantSettings) === null || _a === void 0 ? void 0 : _a.enforceUsTaxCompliance;
|
|
1178
1049
|
useEffect(() => {
|
|
1179
1050
|
if (!data)
|
|
@@ -1230,4 +1101,131 @@ function usePayoutStatus(props) {
|
|
|
1230
1101
|
};
|
|
1231
1102
|
}
|
|
1232
1103
|
|
|
1104
|
+
const TAX_CONTEXT_NAMESPACE = "sq:tax-and-cash";
|
|
1105
|
+
const TAX_FORM_CONTEXT_NAMESPACE = "sq:tax-form-context";
|
|
1106
|
+
const USER_QUERY_NAMESPACE = "sq:user-info-query";
|
|
1107
|
+
const USER_FORM_CONTEXT_NAMESPACE = "sq:user-form-context";
|
|
1108
|
+
const FINANCE_NETWORK_SETTINGS_NAMESPACE = "sq:finance-network-settings";
|
|
1109
|
+
const COUNTRIES_NAMESPACE = "sq:countries:list";
|
|
1110
|
+
const SORTED_COUNTRIES_NAMESPACE = "sq:countries:sorted";
|
|
1111
|
+
const COUNTRIES_QUERY_NAMESPACE = "sq:countries:query";
|
|
1112
|
+
const CURRENCIES_NAMESPACE = "sq:currencies:list";
|
|
1113
|
+
const CURRENCIES_QUERY_NAMESPACE = "sq:currencies:query";
|
|
1114
|
+
const GET_USER = dist.gql `
|
|
1115
|
+
query getUserTaxInfo {
|
|
1116
|
+
user: viewer {
|
|
1117
|
+
... on User {
|
|
1118
|
+
id
|
|
1119
|
+
firstName
|
|
1120
|
+
lastName
|
|
1121
|
+
email
|
|
1122
|
+
countryCode
|
|
1123
|
+
customFields
|
|
1124
|
+
rewards(limit: 1000) {
|
|
1125
|
+
data {
|
|
1126
|
+
statuses
|
|
1127
|
+
partnerFundsTransfer {
|
|
1128
|
+
id
|
|
1129
|
+
status
|
|
1130
|
+
}
|
|
1131
|
+
}
|
|
1132
|
+
}
|
|
1133
|
+
managedIdentity {
|
|
1134
|
+
uid
|
|
1135
|
+
email
|
|
1136
|
+
emailVerified
|
|
1137
|
+
}
|
|
1138
|
+
impactConnection {
|
|
1139
|
+
connected
|
|
1140
|
+
user {
|
|
1141
|
+
firstName
|
|
1142
|
+
lastName
|
|
1143
|
+
}
|
|
1144
|
+
publisher {
|
|
1145
|
+
id
|
|
1146
|
+
brandedSignup
|
|
1147
|
+
countryCode
|
|
1148
|
+
currency
|
|
1149
|
+
billingAddress
|
|
1150
|
+
billingCity
|
|
1151
|
+
billingState
|
|
1152
|
+
billingCountryCode
|
|
1153
|
+
billingPostalCode
|
|
1154
|
+
phoneNumberCountryCode
|
|
1155
|
+
phoneNumber
|
|
1156
|
+
taxInformation {
|
|
1157
|
+
indirectTaxId
|
|
1158
|
+
indirectTaxCountryCode
|
|
1159
|
+
indirectTaxRegion
|
|
1160
|
+
additionalTaxId
|
|
1161
|
+
withholdingTaxId
|
|
1162
|
+
withholdingTaxCountryCode
|
|
1163
|
+
}
|
|
1164
|
+
requiredTaxDocumentType
|
|
1165
|
+
currentTaxDocument {
|
|
1166
|
+
status
|
|
1167
|
+
type
|
|
1168
|
+
dateCreated
|
|
1169
|
+
}
|
|
1170
|
+
withdrawalSettings {
|
|
1171
|
+
paymentMethod
|
|
1172
|
+
paypalEmailAddress
|
|
1173
|
+
bankCountry
|
|
1174
|
+
bankAccountNumber
|
|
1175
|
+
paymentSchedulingType
|
|
1176
|
+
paymentThreshold
|
|
1177
|
+
paymentDay
|
|
1178
|
+
}
|
|
1179
|
+
payoutsAccount {
|
|
1180
|
+
hold
|
|
1181
|
+
holdReasons
|
|
1182
|
+
balance
|
|
1183
|
+
}
|
|
1184
|
+
}
|
|
1185
|
+
}
|
|
1186
|
+
}
|
|
1187
|
+
}
|
|
1188
|
+
}
|
|
1189
|
+
`;
|
|
1190
|
+
const GET_COUNTRIES = dist.gql `
|
|
1191
|
+
query getCountries {
|
|
1192
|
+
impactPayoutCountries(limit: 1000) {
|
|
1193
|
+
data {
|
|
1194
|
+
countryCode
|
|
1195
|
+
displayName
|
|
1196
|
+
}
|
|
1197
|
+
}
|
|
1198
|
+
}
|
|
1199
|
+
`;
|
|
1200
|
+
const GET_CURRENCIES = dist.gql `
|
|
1201
|
+
query currencies($locale: RSLocale) {
|
|
1202
|
+
currencies(limit: 300) {
|
|
1203
|
+
data {
|
|
1204
|
+
displayName(locale: $locale)
|
|
1205
|
+
currencyCode
|
|
1206
|
+
}
|
|
1207
|
+
}
|
|
1208
|
+
}
|
|
1209
|
+
`;
|
|
1210
|
+
const GET_FINANCE_NETWORK_SETTINGS = dist.gql `
|
|
1211
|
+
query impactFinanceNetworkSettings(
|
|
1212
|
+
$filter: ImpactFinanceNetworkSettingsFilterInput
|
|
1213
|
+
) {
|
|
1214
|
+
impactFinanceNetworkSettings(filter: $filter, limit: 1000) {
|
|
1215
|
+
data {
|
|
1216
|
+
countryCode
|
|
1217
|
+
currency
|
|
1218
|
+
defaultFinancePaymentMethodId
|
|
1219
|
+
thresholdOptions
|
|
1220
|
+
withdrawalSettingId
|
|
1221
|
+
internationalEftFee
|
|
1222
|
+
foreignFxFee
|
|
1223
|
+
defaultFxFee
|
|
1224
|
+
}
|
|
1225
|
+
totalCount
|
|
1226
|
+
}
|
|
1227
|
+
}
|
|
1228
|
+
`;
|
|
1229
|
+
const FORM_STEPS = 4;
|
|
1230
|
+
|
|
1233
1231
|
export { CURRENCIES_NAMESPACE as C, FINANCE_NETWORK_SETTINGS_NAMESPACE as F, GET_USER as G, SORTED_COUNTRIES_NAMESPACE as S, TAX_CONTEXT_NAMESPACE as T, USER_FORM_CONTEXT_NAMESPACE as U, VERIFF_COMPLETE_EVENT_KEY as V, TAX_FORM_CONTEXT_NAMESPACE as a, COUNTRIES_NAMESPACE as b, USER_QUERY_NAMESPACE as c, COUNTRIES_QUERY_NAMESPACE as d, GET_COUNTRIES as e, GET_FINANCE_NETWORK_SETTINGS as f, CURRENCIES_QUERY_NAMESPACE as g, GET_CURRENCIES as h, FORM_STEPS as i, TAX_FORM_UPDATED_EVENT_KEY as j, useVeriffApp as k, getStatus as l, usePayoutStatus as u };
|
|
@@ -26421,7 +26421,7 @@ html {
|
|
|
26421
26421
|
--sl-transition-fast: 150ms;
|
|
26422
26422
|
--sl-transition-x-fast: 50ms;
|
|
26423
26423
|
--sl-font-mono: SFMono-Regular, Consolas, "Liberation Mono", Menlo, monospace;
|
|
26424
|
-
--sl-font-sans:
|
|
26424
|
+
--sl-font-sans: var(--sqm-primary-font);
|
|
26425
26425
|
--sl-font-serif: Georgia, "Times New Roman", serif;
|
|
26426
26426
|
--sl-font-size-xx-small: 0.625rem;
|
|
26427
26427
|
--sl-font-size-x-small: 0.75rem;
|
package/dist/esm/loader.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { h, r as registerInstance, c as Host, g as getElement
|
|
2
|
-
import { i as intl } from './global-
|
|
1
|
+
import { h, r as registerInstance, c as Host, g as getElement } from './index-b3a06de8.js';
|
|
2
|
+
import { i as intl } from './global-58a69018.js';
|
|
3
3
|
import { m as useRef, k as useState, f as useEffect, n as h$1, u as useMemo, b as browser, j as useReducer } from './dom-context-hooks.module-63370afd.js';
|
|
4
4
|
import { d as dist, _, L, J, t as Pn, F as Fn, x as $n, $ as $e, i as isDemo, p as En, u as useCallback, R as Rn, w as wn } from './index.module-c9811a48.js';
|
|
5
5
|
import { j as jsonpointer } from './jsonpointer-388a7082.js';
|
|
@@ -12,10 +12,10 @@ import { u as useRerenderListener, a as useRequestRerender } from './re-render-7
|
|
|
12
12
|
import { u as useChildElements } from './useChildElements-3d872cef.js';
|
|
13
13
|
import { l as luxon } from './luxon-bbf75a9d.js';
|
|
14
14
|
import { g as generateUserError } from './useReferralTable-909ccb28.js';
|
|
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-
|
|
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-
|
|
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
|
+
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 './
|
|
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';
|
|
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,11 +899,6 @@ function useBankingInfoForm(props) {
|
|
|
899
899
|
const paymentMethodChecked = !hasPayPal
|
|
900
900
|
? "toBankAccount"
|
|
901
901
|
: _paymentMethodChecked;
|
|
902
|
-
useEffect(() => {
|
|
903
|
-
// reset redirect hash
|
|
904
|
-
if (window.location.hash !== "#4")
|
|
905
|
-
window.location.hash = "";
|
|
906
|
-
}, []);
|
|
907
902
|
useEffect(() => {
|
|
908
903
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
909
904
|
if (!userData)
|
|
@@ -1075,6 +1070,7 @@ function useBankingInfoForm(props) {
|
|
|
1075
1070
|
}
|
|
1076
1071
|
await runMutation(formData, token);
|
|
1077
1072
|
setShowModal(false);
|
|
1073
|
+
window.location.hash = "";
|
|
1078
1074
|
};
|
|
1079
1075
|
const onVerification = async (token) => {
|
|
1080
1076
|
host.dispatchEvent(new CustomEvent(VERIFICATION_EVENT_KEY, {
|
|
@@ -1104,7 +1100,15 @@ function useBankingInfoForm(props) {
|
|
|
1104
1100
|
setBankCountry: updateBankCountry,
|
|
1105
1101
|
setPaymentMethodChecked,
|
|
1106
1102
|
setPaymentScheduleChecked,
|
|
1107
|
-
onBack: () =>
|
|
1103
|
+
onBack: () => {
|
|
1104
|
+
// return to dashboard
|
|
1105
|
+
if (window.location.hash) {
|
|
1106
|
+
window.location.hash = "";
|
|
1107
|
+
}
|
|
1108
|
+
else {
|
|
1109
|
+
setStep("/dashboard");
|
|
1110
|
+
}
|
|
1111
|
+
},
|
|
1108
1112
|
setCountrySearch,
|
|
1109
1113
|
onVerification,
|
|
1110
1114
|
onVerificationHide: () => onVerification(null),
|
|
@@ -1777,11 +1781,17 @@ function useDocusignForm(props) {
|
|
|
1777
1781
|
}
|
|
1778
1782
|
};
|
|
1779
1783
|
const progressStep = () => {
|
|
1780
|
-
|
|
1781
|
-
|
|
1782
|
-
|
|
1783
|
-
|
|
1784
|
-
|
|
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
|
+
}
|
|
1785
1795
|
};
|
|
1786
1796
|
const allLoading = userLoading || documentLoading || loading;
|
|
1787
1797
|
return {
|
|
@@ -3919,6 +3929,11 @@ const style$5 = {
|
|
|
3919
3929
|
SubduedText: {
|
|
3920
3930
|
color: "var(--sqm-text-subdued)",
|
|
3921
3931
|
},
|
|
3932
|
+
ButtonContainer: {
|
|
3933
|
+
display: "flex",
|
|
3934
|
+
gap: "var(--sl-spacing-medium)",
|
|
3935
|
+
flexWrap: "wrap",
|
|
3936
|
+
},
|
|
3922
3937
|
};
|
|
3923
3938
|
const sheet$4 = createStyleSheet(style$5);
|
|
3924
3939
|
const styleString$4 = sheet$4.toString();
|
|
@@ -4068,7 +4083,7 @@ const TaxAndCashDashboardView = (props) => {
|
|
|
4068
4083
|
}, {
|
|
4069
4084
|
supportLink: (h("a", { target: "_blank", href: `mailto:advocate-support@impact.com` }, text.supportLink)),
|
|
4070
4085
|
}),
|
|
4071
|
-
button: (h(
|
|
4086
|
+
button: (h("div", { class: sheet$4.classes.ButtonContainer },
|
|
4072
4087
|
h("sl-button", { disabled: states.disabled || states.loading, type: "primary", class: sheet$4.classes.EditBankDetailsButton, onClick: callbacks.onEditPayoutInfo }, text.editPaymentInformationButton),
|
|
4073
4088
|
h("sl-button", { disabled: states.disabled || states.loading, type: "default", class: sheet$4.classes.EditBankDetailsButton, onClick: callbacks.onNewFormClick }, text.newFormButton))),
|
|
4074
4089
|
alertType: "warning",
|
|
@@ -4084,7 +4099,7 @@ const TaxAndCashDashboardView = (props) => {
|
|
|
4084
4099
|
}, {
|
|
4085
4100
|
supportLink: (h("a", { target: "_blank", href: `mailto:advocate-support@impact.com` }, text.supportLink)),
|
|
4086
4101
|
}),
|
|
4087
|
-
button: (h(
|
|
4102
|
+
button: (h("div", { class: sheet$4.classes.ButtonContainer },
|
|
4088
4103
|
h("sl-button", { disabled: states.disabled || states.loading, type: "primary", class: sheet$4.classes.EditBankDetailsButton, onClick: callbacks.onEditPayoutInfo }, text.editPaymentInformationButton),
|
|
4089
4104
|
h("sl-button", { disabled: states.disabled || states.loading, type: "default", class: sheet$4.classes.EditBankDetailsButton, onClick: callbacks.onNewFormClick }, text.newFormButton))),
|
|
4090
4105
|
alertType: "warning",
|
|
@@ -4100,7 +4115,7 @@ const TaxAndCashDashboardView = (props) => {
|
|
|
4100
4115
|
}, {
|
|
4101
4116
|
supportLink: (h("a", { target: "_blank", href: `mailto:advocate-support@impact.com` }, text.supportLink)),
|
|
4102
4117
|
}),
|
|
4103
|
-
button: (h(
|
|
4118
|
+
button: (h("div", { class: sheet$4.classes.ButtonContainer },
|
|
4104
4119
|
h("sl-button", { disabled: states.disabled || states.loading, type: "primary", class: sheet$4.classes.EditBankDetailsButton, onClick: callbacks.onEditPayoutInfo }, text.editPaymentInformationButton),
|
|
4105
4120
|
h("sl-button", { disabled: states.disabled || states.loading, type: "default", class: sheet$4.classes.EditBankDetailsButton, onClick: callbacks.onNewFormClick }, text.newFormButton))),
|
|
4106
4121
|
alertType: "warning",
|
|
@@ -4391,8 +4406,14 @@ const useTaxAndCashDashboard = (props) => {
|
|
|
4391
4406
|
useEffect(() => {
|
|
4392
4407
|
// Clear override context once on submitted
|
|
4393
4408
|
setContext({});
|
|
4394
|
-
if (window.location.hash)
|
|
4409
|
+
if (window.location.hash) {
|
|
4410
|
+
setContext({
|
|
4411
|
+
overrideNextStep: "/dashboard",
|
|
4412
|
+
overrideBackStep: "/dashboard",
|
|
4413
|
+
hideSteps: true,
|
|
4414
|
+
});
|
|
4395
4415
|
setStep(`/${window.location.hash.replace("#", "")}`);
|
|
4416
|
+
}
|
|
4396
4417
|
}, []);
|
|
4397
4418
|
const { data, loading, errors: userError, refetch, } = $n(USER_QUERY_NAMESPACE);
|
|
4398
4419
|
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;
|
|
@@ -4740,11 +4761,11 @@ const TaxAndCashDashboard = class {
|
|
|
4740
4761
|
/**
|
|
4741
4762
|
* @uiName Withdrawal settings invalid alert header
|
|
4742
4763
|
*/
|
|
4743
|
-
this.withdrawalSettingsInvalidHeader = "Your payment information includes invalid characters";
|
|
4764
|
+
this.withdrawalSettingsInvalidHeader = "Your payment information is incomplete or includes invalid characters";
|
|
4744
4765
|
/**
|
|
4745
4766
|
* @uiName Withdrawal settings invalid alert description
|
|
4746
4767
|
*/
|
|
4747
|
-
this.withdrawalSettingsInvalidDescription = "There are invalid characters in your payment information. Please review your information and make sure it is correct
|
|
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.";
|
|
4748
4769
|
/**
|
|
4749
4770
|
* @uiName Payment returned alert header
|
|
4750
4771
|
*/
|
|
@@ -6283,7 +6304,7 @@ const UserInfoFormView = (props) => {
|
|
|
6283
6304
|
h("sl-input", Object.assign({ exportparts: "label: input-label, base: input-base", label: text.address, id: "address", name: "/address", value: formState.address, validationError: ({ value }) =>
|
|
6284
6305
|
// Checks for non-ASCII characters
|
|
6285
6306
|
!validateBillingField(/^[\x20-\xFF]+$/, value) &&
|
|
6286
|
-
formatErrorMessage(text.address, text.error.invalidCharacterError), disabled: states.disabled || isDisabledInput("
|
|
6307
|
+
formatErrorMessage(text.address, text.error.invalidCharacterError), disabled: states.disabled || isDisabledInput("billingAddress") }, (((_l = formState.errors) === null || _l === void 0 ? void 0 : _l.address) ? {
|
|
6287
6308
|
class: classes.ErrorInput,
|
|
6288
6309
|
helpText: formatErrorMessage(text.address, formState.errors.address),
|
|
6289
6310
|
}
|
|
@@ -6291,17 +6312,17 @@ const UserInfoFormView = (props) => {
|
|
|
6291
6312
|
h("sl-input", Object.assign({ exportparts: "label: input-label, base: input-base", label: text.city, id: "city", name: "/city", value: formState.city, validationError: ({ value }) =>
|
|
6292
6313
|
// Checks for non-ASCII characters
|
|
6293
6314
|
!validateBillingField(/^[\x20-\xFF]+$/, value) &&
|
|
6294
|
-
formatErrorMessage(text.city, text.error.invalidCharacterError), disabled: states.disabled || isDisabledInput("
|
|
6315
|
+
formatErrorMessage(text.city, text.error.invalidCharacterError), disabled: states.disabled || isDisabledInput("billingCity") }, (((_m = formState.errors) === null || _m === void 0 ? void 0 : _m.city) ? {
|
|
6295
6316
|
class: classes.ErrorInput,
|
|
6296
6317
|
helpText: formatErrorMessage(text.city, formState.errors.city),
|
|
6297
6318
|
}
|
|
6298
6319
|
: {}), { required: true })),
|
|
6299
|
-
!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("
|
|
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) ? {
|
|
6300
6321
|
class: classes.ErrorInput,
|
|
6301
6322
|
helpText: formatErrorMessage(text.state, formState.errors.state),
|
|
6302
6323
|
}
|
|
6303
6324
|
: {}), { required: true }), (_p = data.regions) === null || _p === void 0 ? void 0 : _p.map((r) => (h("sl-menu-item", { value: r.value }, r.label))))),
|
|
6304
|
-
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("
|
|
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) ? {
|
|
6305
6326
|
class: classes.ErrorInput,
|
|
6306
6327
|
helpText: formatErrorMessage(text.postalCode, formState.errors.postalCode),
|
|
6307
6328
|
}
|
|
@@ -6333,8 +6354,16 @@ const UserInfoFormView = (props) => {
|
|
|
6333
6354
|
h("sl-button", { type: "primary", disabled: states.disabled, submit: true, exportparts: "base: primarybutton-base" }, text.continueButton))))));
|
|
6334
6355
|
};
|
|
6335
6356
|
|
|
6357
|
+
const GET_INDIRECT_TAX_COUNTRY_CODE = dist.gql `
|
|
6358
|
+
query getIndirectTaxCountryCode {
|
|
6359
|
+
tenantSettings {
|
|
6360
|
+
impactBrandCountryCode
|
|
6361
|
+
impactBrandIndirectTaxCountryCode
|
|
6362
|
+
}
|
|
6363
|
+
}
|
|
6364
|
+
`;
|
|
6336
6365
|
function useUserInfoForm(props) {
|
|
6337
|
-
var _a, _b, _c, _d, _e, _f;
|
|
6366
|
+
var _a, _b, _c, _d, _e, _f, _g;
|
|
6338
6367
|
const currencyRef = useRef(undefined);
|
|
6339
6368
|
const phoneCountryRef = useRef(undefined);
|
|
6340
6369
|
const formRef = useRef(null);
|
|
@@ -6344,6 +6373,7 @@ function useUserInfoForm(props) {
|
|
|
6344
6373
|
const [userFormContext, setUserFormContext] = Pn(USER_FORM_CONTEXT_NAMESPACE);
|
|
6345
6374
|
const user = J();
|
|
6346
6375
|
const [connectImpactPartner, { loading: connectLoading, errors: connectErrors },] = $e(CONNECT_PARTNER);
|
|
6376
|
+
const { data: tenantData } = wn(GET_INDIRECT_TAX_COUNTRY_CODE, {});
|
|
6347
6377
|
const { data, loading, refetch, errors: userError, } = $n(USER_QUERY_NAMESPACE);
|
|
6348
6378
|
const _currencies = Fn(CURRENCIES_NAMESPACE);
|
|
6349
6379
|
const currencies = useMemo(() => [...(_currencies || [])].sort((a, b) => a.displayName.localeCompare(b.displayName)), [_currencies]);
|
|
@@ -6528,7 +6558,6 @@ function useUserInfoForm(props) {
|
|
|
6528
6558
|
currency: userData.currency,
|
|
6529
6559
|
});
|
|
6530
6560
|
const skipNextStep = getSkipNextStep(userData);
|
|
6531
|
-
console.log({ skipNextStep });
|
|
6532
6561
|
if (skipNextStep) {
|
|
6533
6562
|
try {
|
|
6534
6563
|
const { resultPublisher, hasValidCurrentDocument } = await connectPartner(formData);
|
|
@@ -6557,10 +6586,16 @@ function useUserInfoForm(props) {
|
|
|
6557
6586
|
const nextStep = context.overrideNextStep || skipNextStep ? "/3" : "/2";
|
|
6558
6587
|
setStep(nextStep);
|
|
6559
6588
|
}
|
|
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;
|
|
6560
6591
|
function getSkipNextStep(userData) {
|
|
6592
|
+
if (!hasIndirectTax)
|
|
6593
|
+
return true;
|
|
6561
6594
|
if (userData.countryCode === "US")
|
|
6562
6595
|
return true;
|
|
6563
|
-
|
|
6596
|
+
if (hasIndirectTax && userData.countryCode !== indirectTaxCountry)
|
|
6597
|
+
return true;
|
|
6598
|
+
return false;
|
|
6564
6599
|
}
|
|
6565
6600
|
const hasStates = ["ES", "AU", "US", "CA"].includes(userFormContext.countryCode);
|
|
6566
6601
|
const regionObj = hasStates
|
|
@@ -6589,7 +6624,7 @@ function useUserInfoForm(props) {
|
|
|
6589
6624
|
allCountries: countries,
|
|
6590
6625
|
regionLabelEnum: regionObj === null || regionObj === void 0 ? void 0 : regionObj.labelEnum,
|
|
6591
6626
|
regions: (regionObj === null || regionObj === void 0 ? void 0 : regionObj.regions) || [],
|
|
6592
|
-
partnerData: (
|
|
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,
|
|
6593
6628
|
},
|
|
6594
6629
|
states: {
|
|
6595
6630
|
step: step === null || step === void 0 ? void 0 : step.replace("/", ""),
|
|
@@ -6598,8 +6633,8 @@ function useUserInfoForm(props) {
|
|
|
6598
6633
|
disabled: loading || connectLoading,
|
|
6599
6634
|
loadingError: !!(userError === null || userError === void 0 ? void 0 : userError.message),
|
|
6600
6635
|
loading: loading || connectLoading,
|
|
6601
|
-
isPartner: !!((
|
|
6602
|
-
isUser: !!((
|
|
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),
|
|
6603
6638
|
formState: {
|
|
6604
6639
|
...userFormContext,
|
|
6605
6640
|
errors: formErrors,
|