@saasquatch/mint-components 2.0.1 → 2.0.2-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/{ShadowViewAddon-1b38dcfc.js → ShadowViewAddon-925a8fa6.js} +3 -3
- 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 +339 -110
- package/dist/cjs/sqm-big-stat_47.cjs.entry.js +215 -26
- package/dist/cjs/sqm-header-logo.cjs.entry.js +14 -1
- package/dist/cjs/sqm-stencilbook.cjs.entry.js +2 -1
- package/dist/cjs/{data-16106637.js → usePayoutStatus-67c78085.js} +161 -129
- package/dist/collection/components/sqm-header-logo/sqm-header-logo.js +80 -3
- package/dist/collection/components/sqm-portal-footer/sqm-portal-footer-view.js +3 -3
- package/dist/collection/components/tax-and-cash/TaxForm.stories.js +1 -0
- package/dist/collection/components/tax-and-cash/sqm-indirect-tax-form/useIndirectTaxForm.js +46 -40
- package/dist/collection/components/tax-and-cash/sqm-payout-status-alert/sqm-payout-status-alert-view.js +84 -2
- package/dist/collection/components/tax-and-cash/sqm-payout-status-alert/sqm-payout-status-alert.js +353 -0
- package/dist/collection/components/tax-and-cash/sqm-payout-status-alert/usePayoutStatus.js +36 -3
- package/dist/collection/components/tax-and-cash/sqm-tax-and-cash/sqm-tax-and-cash.js +301 -1
- package/dist/collection/components/tax-and-cash/sqm-tax-and-cash-dashboard/sqm-tax-and-cash-dashboard-view.js +92 -2
- package/dist/collection/components/tax-and-cash/sqm-tax-and-cash-dashboard/sqm-tax-and-cash-dashboard.js +300 -0
- package/dist/collection/components/tax-and-cash/sqm-user-info-form/sqm-user-info-form-view.js +23 -12
- package/dist/collection/components/tax-and-cash/sqm-user-info-form/sqm-user-info-form.js +1 -1
- package/dist/collection/components/tax-and-cash/sqm-user-info-form/useUserInfoForm.js +92 -9
- package/dist/esm/{ShadowViewAddon-1adaf077.js → ShadowViewAddon-aae27c2e.js} +3 -3
- 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 +290 -61
- package/dist/esm/sqm-big-stat_47.entry.js +193 -4
- package/dist/esm/sqm-header-logo.entry.js +14 -1
- package/dist/esm/sqm-stencilbook.entry.js +2 -1
- package/dist/esm/{data-acdb790f.js → usePayoutStatus-f064247b.js} +162 -130
- package/dist/esm-es5/{ShadowViewAddon-1adaf077.js → ShadowViewAddon-aae27c2e.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-header-logo.entry.js +1 -1
- package/dist/esm-es5/sqm-stencilbook.entry.js +1 -1
- package/dist/esm-es5/usePayoutStatus-f064247b.js +6 -0
- package/dist/mint-components/mint-components.esm.js +1 -1
- package/dist/mint-components/{p-662ed116.system.entry.js → p-0649123a.system.entry.js} +1 -1
- package/dist/mint-components/p-2933bbe9.system.entry.js +1 -0
- package/dist/mint-components/p-2c86af62.system.entry.js +1 -0
- package/dist/mint-components/p-2e87159a.system.entry.js +1 -0
- package/dist/mint-components/p-2ed300e9.entry.js +1 -0
- package/dist/mint-components/p-3219fdbe.entry.js +99 -0
- package/dist/mint-components/{p-9f8d34d1.system.js → p-38f932ae.system.js} +1 -1
- package/dist/mint-components/p-40e0251f.system.js +6 -0
- package/dist/mint-components/{p-0e1a1b14.js → p-57ce33dd.js} +1 -1
- package/dist/mint-components/{p-31bba357.entry.js → p-5f3eafd4.entry.js} +2 -2
- package/dist/mint-components/p-967a9040.system.js +1 -1
- package/dist/mint-components/p-b1c4500e.entry.js +273 -0
- package/dist/mint-components/p-f17b6de6.js +157 -0
- package/dist/types/components/sqm-header-logo/sqm-header-logo.d.ts +14 -1
- package/dist/types/components/tax-and-cash/sqm-indirect-tax-form/useIndirectTaxForm.d.ts +24 -0
- package/dist/types/components/tax-and-cash/sqm-payout-status-alert/sqm-payout-status-alert-view.d.ts +16 -0
- package/dist/types/components/tax-and-cash/sqm-payout-status-alert/sqm-payout-status-alert.d.ts +57 -0
- package/dist/types/components/tax-and-cash/sqm-payout-status-alert/usePayoutStatus.d.ts +3 -1
- package/dist/types/components/tax-and-cash/sqm-tax-and-cash/sqm-tax-and-cash.d.ts +48 -0
- package/dist/types/components/tax-and-cash/sqm-tax-and-cash-dashboard/sqm-tax-and-cash-dashboard-view.d.ts +12 -0
- package/dist/types/components/tax-and-cash/sqm-tax-and-cash-dashboard/sqm-tax-and-cash-dashboard.d.ts +48 -0
- package/dist/types/components/tax-and-cash/sqm-user-info-form/sqm-user-info-form-view.d.ts +2 -0
- package/dist/types/components/tax-and-cash/sqm-user-info-form/useUserInfoForm.d.ts +1 -0
- package/dist/types/components.d.ts +331 -1
- package/docs/docs.docx +0 -0
- package/docs/raisins.json +1 -1
- package/grapesjs/grapesjs.js +1 -1
- package/package.json +1 -1
- package/dist/esm-es5/data-acdb790f.js +0 -6
- package/dist/mint-components/p-010957a1.entry.js +0 -99
- package/dist/mint-components/p-469a6450.system.js +0 -6
- package/dist/mint-components/p-720341b1.entry.js +0 -273
- package/dist/mint-components/p-a7ee19dc.entry.js +0 -1
- package/dist/mint-components/p-d2bb770d.system.entry.js +0 -1
- package/dist/mint-components/p-e1e7d01c.js +0 -157
- package/dist/mint-components/p-eea87fdc.system.entry.js +0 -1
- package/dist/mint-components/p-fedb9ab8.system.entry.js +0 -1
|
@@ -3,6 +3,133 @@
|
|
|
3
3
|
const domContextHooks_module = require('./dom-context-hooks.module-7fa676ae.js');
|
|
4
4
|
const index_module = require('./index.module-4f54e412.js');
|
|
5
5
|
|
|
6
|
+
const TAX_CONTEXT_NAMESPACE = "sq:tax-and-cash";
|
|
7
|
+
const TAX_FORM_CONTEXT_NAMESPACE = "sq:tax-form-context";
|
|
8
|
+
const USER_QUERY_NAMESPACE = "sq:user-info-query";
|
|
9
|
+
const USER_FORM_CONTEXT_NAMESPACE = "sq:user-form-context";
|
|
10
|
+
const FINANCE_NETWORK_SETTINGS_NAMESPACE = "sq:finance-network-settings";
|
|
11
|
+
const COUNTRIES_NAMESPACE = "sq:countries:list";
|
|
12
|
+
const SORTED_COUNTRIES_NAMESPACE = "sq:countries:sorted";
|
|
13
|
+
const COUNTRIES_QUERY_NAMESPACE = "sq:countries:query";
|
|
14
|
+
const CURRENCIES_NAMESPACE = "sq:currencies:list";
|
|
15
|
+
const CURRENCIES_QUERY_NAMESPACE = "sq:currencies:query";
|
|
16
|
+
const GET_USER = index_module.dist.gql `
|
|
17
|
+
query getUserTaxInfo {
|
|
18
|
+
user: viewer {
|
|
19
|
+
... on User {
|
|
20
|
+
id
|
|
21
|
+
firstName
|
|
22
|
+
lastName
|
|
23
|
+
email
|
|
24
|
+
countryCode
|
|
25
|
+
customFields
|
|
26
|
+
rewards(limit: 1000) {
|
|
27
|
+
data {
|
|
28
|
+
statuses
|
|
29
|
+
partnerFundsTransfer {
|
|
30
|
+
id
|
|
31
|
+
status
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
managedIdentity {
|
|
36
|
+
uid
|
|
37
|
+
email
|
|
38
|
+
emailVerified
|
|
39
|
+
}
|
|
40
|
+
impactConnection {
|
|
41
|
+
connected
|
|
42
|
+
user {
|
|
43
|
+
firstName
|
|
44
|
+
lastName
|
|
45
|
+
}
|
|
46
|
+
publisher {
|
|
47
|
+
id
|
|
48
|
+
brandedSignup
|
|
49
|
+
countryCode
|
|
50
|
+
currency
|
|
51
|
+
billingAddress
|
|
52
|
+
billingCity
|
|
53
|
+
billingState
|
|
54
|
+
billingCountryCode
|
|
55
|
+
billingPostalCode
|
|
56
|
+
phoneNumberCountryCode
|
|
57
|
+
phoneNumber
|
|
58
|
+
taxInformation {
|
|
59
|
+
indirectTaxId
|
|
60
|
+
indirectTaxCountryCode
|
|
61
|
+
indirectTaxRegion
|
|
62
|
+
additionalTaxId
|
|
63
|
+
withholdingTaxId
|
|
64
|
+
withholdingTaxCountryCode
|
|
65
|
+
}
|
|
66
|
+
requiredTaxDocumentType
|
|
67
|
+
currentTaxDocument {
|
|
68
|
+
status
|
|
69
|
+
type
|
|
70
|
+
dateCreated
|
|
71
|
+
}
|
|
72
|
+
withdrawalSettings {
|
|
73
|
+
paymentMethod
|
|
74
|
+
paypalEmailAddress
|
|
75
|
+
bankCountry
|
|
76
|
+
bankAccountNumber
|
|
77
|
+
paymentSchedulingType
|
|
78
|
+
paymentThreshold
|
|
79
|
+
paymentDay
|
|
80
|
+
}
|
|
81
|
+
payoutsAccount {
|
|
82
|
+
hold
|
|
83
|
+
holdReasons
|
|
84
|
+
balance
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
`;
|
|
92
|
+
const GET_COUNTRIES = index_module.dist.gql `
|
|
93
|
+
query getCountries {
|
|
94
|
+
impactPayoutCountries(limit: 1000) {
|
|
95
|
+
data {
|
|
96
|
+
countryCode
|
|
97
|
+
displayName
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
`;
|
|
102
|
+
const GET_CURRENCIES = index_module.dist.gql `
|
|
103
|
+
query currencies($locale: RSLocale) {
|
|
104
|
+
currencies(limit: 300) {
|
|
105
|
+
data {
|
|
106
|
+
displayName(locale: $locale)
|
|
107
|
+
currencyCode
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
`;
|
|
112
|
+
const GET_FINANCE_NETWORK_SETTINGS = index_module.dist.gql `
|
|
113
|
+
query impactFinanceNetworkSettings(
|
|
114
|
+
$filter: ImpactFinanceNetworkSettingsFilterInput
|
|
115
|
+
) {
|
|
116
|
+
impactFinanceNetworkSettings(filter: $filter, limit: 1000) {
|
|
117
|
+
data {
|
|
118
|
+
countryCode
|
|
119
|
+
currency
|
|
120
|
+
defaultFinancePaymentMethodId
|
|
121
|
+
thresholdOptions
|
|
122
|
+
withdrawalSettingId
|
|
123
|
+
internationalEftFee
|
|
124
|
+
foreignFxFee
|
|
125
|
+
defaultFxFee
|
|
126
|
+
}
|
|
127
|
+
totalCount
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
`;
|
|
131
|
+
const FORM_STEPS = 4;
|
|
132
|
+
|
|
6
133
|
const TAX_FORM_UPDATED_EVENT_KEY = "sqm:tax-form-updated";
|
|
7
134
|
|
|
8
135
|
var toArray = function toArray(a) {
|
|
@@ -1002,7 +1129,7 @@ const GET_TAX_SETTING = index_module.dist.gql `
|
|
|
1002
1129
|
}
|
|
1003
1130
|
`;
|
|
1004
1131
|
function getStatus(data) {
|
|
1005
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q;
|
|
1132
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w;
|
|
1006
1133
|
const account = (_b = (_a = data.user.impactConnection) === null || _a === void 0 ? void 0 : _a.publisher) === null || _b === void 0 ? void 0 : _b.payoutsAccount;
|
|
1007
1134
|
const hasTransferredReward = (_e = (_d = (_c = data === null || data === void 0 ? void 0 : data.user) === null || _c === void 0 ? void 0 : _c.rewards) === null || _d === void 0 ? void 0 : _d.data) === null || _e === void 0 ? void 0 : _e.find((reward) => reward.statuses.includes("REDEEMED") &&
|
|
1008
1135
|
reward.partnerFundsTransfer.status === "TRANSFERRED");
|
|
@@ -1020,7 +1147,19 @@ function getStatus(data) {
|
|
|
1020
1147
|
if ((_p = account.holdReasons) === null || _p === void 0 ? void 0 : _p.includes("IDV_CHECK_FAILED_INTERNAL"))
|
|
1021
1148
|
return "VERIFICATION:FAILED";
|
|
1022
1149
|
if (((_q = account.holdReasons) === null || _q === void 0 ? void 0 : _q.includes("NEW_PAYEE_REVIEW")) && hasTransferredReward)
|
|
1023
|
-
return "
|
|
1150
|
+
return "NEW_PAYEE_REVIEW";
|
|
1151
|
+
if ((_r = account.holdReasons) === null || _r === void 0 ? void 0 : _r.includes("PAYMENT_HOLD_ON_CHANGE"))
|
|
1152
|
+
return "PAYMENT_HOLD_ON_CHANGE";
|
|
1153
|
+
if ((_s = account.holdReasons) === null || _s === void 0 ? void 0 : _s.includes("BENEFICIARY_NAME_INVALID"))
|
|
1154
|
+
return "BENEFICIARY_NAME_INVALID";
|
|
1155
|
+
if ((_t = account.holdReasons) === null || _t === void 0 ? void 0 : _t.includes("BENEFICIARY_NAME_MISMATCH"))
|
|
1156
|
+
return "BENEFICIARY_NAME_MISMATCH";
|
|
1157
|
+
if ((_u = account.holdReasons) === null || _u === void 0 ? void 0 : _u.includes("BANK_TAX_NAME_MISMATCH"))
|
|
1158
|
+
return "BANK_TAX_NAME_MISMATCH";
|
|
1159
|
+
if ((_v = account.holdReasons) === null || _v === void 0 ? void 0 : _v.includes("WITHDRAWAL_SETTINGS_INVALID"))
|
|
1160
|
+
return "WITHDRAWAL_SETTINGS_INVALID";
|
|
1161
|
+
if ((_w = account.holdReasons) === null || _w === void 0 ? void 0 : _w.includes("PAYMENT_RETURNED"))
|
|
1162
|
+
return "PAYMENT_RETURNED";
|
|
1024
1163
|
if (account.hold)
|
|
1025
1164
|
return "HOLD";
|
|
1026
1165
|
return "DONE";
|
|
@@ -1032,6 +1171,8 @@ function usePayoutStatus(props) {
|
|
|
1032
1171
|
const { data: taxSettingRes } = index_module.wn(GET_TAX_SETTING, {});
|
|
1033
1172
|
const { render, loading: veriffLoading, errors: veriffErrors, } = useVeriffApp();
|
|
1034
1173
|
const [status, setStatus] = domContextHooks_module.useState(undefined);
|
|
1174
|
+
const setContext = index_module.En(TAX_FORM_CONTEXT_NAMESPACE);
|
|
1175
|
+
const setStep = index_module.En(TAX_CONTEXT_NAMESPACE);
|
|
1035
1176
|
const enforceUsTaxComplianceOption = (_a = taxSettingRes === null || taxSettingRes === void 0 ? void 0 : taxSettingRes.tenantSettings) === null || _a === void 0 ? void 0 : _a.enforceUsTaxCompliance;
|
|
1036
1177
|
domContextHooks_module.useEffect(() => {
|
|
1037
1178
|
if (!data)
|
|
@@ -1059,6 +1200,22 @@ function usePayoutStatus(props) {
|
|
|
1059
1200
|
url += "#3";
|
|
1060
1201
|
window.history.pushState(null, "", url);
|
|
1061
1202
|
};
|
|
1203
|
+
const onPaymentInfoClick = () => {
|
|
1204
|
+
setContext({
|
|
1205
|
+
overrideNextStep: "/dashboard",
|
|
1206
|
+
overrideBackStep: "/dashboard",
|
|
1207
|
+
hideSteps: true,
|
|
1208
|
+
});
|
|
1209
|
+
setStep("/4");
|
|
1210
|
+
};
|
|
1211
|
+
const onNewFormClick = () => {
|
|
1212
|
+
setContext({
|
|
1213
|
+
overrideNextStep: "/dashboard",
|
|
1214
|
+
overrideBackStep: "/dashboard",
|
|
1215
|
+
hideSteps: true,
|
|
1216
|
+
});
|
|
1217
|
+
setStep("/3");
|
|
1218
|
+
};
|
|
1062
1219
|
return {
|
|
1063
1220
|
states: {
|
|
1064
1221
|
loading,
|
|
@@ -1072,137 +1229,12 @@ function usePayoutStatus(props) {
|
|
|
1072
1229
|
callbacks: {
|
|
1073
1230
|
onTermsClick,
|
|
1074
1231
|
onClick: render,
|
|
1232
|
+
onPaymentInfoClick,
|
|
1233
|
+
onNewFormClick,
|
|
1075
1234
|
},
|
|
1076
1235
|
};
|
|
1077
1236
|
}
|
|
1078
1237
|
|
|
1079
|
-
const TAX_CONTEXT_NAMESPACE = "sq:tax-and-cash";
|
|
1080
|
-
const TAX_FORM_CONTEXT_NAMESPACE = "sq:tax-form-context";
|
|
1081
|
-
const USER_QUERY_NAMESPACE = "sq:user-info-query";
|
|
1082
|
-
const USER_FORM_CONTEXT_NAMESPACE = "sq:user-form-context";
|
|
1083
|
-
const FINANCE_NETWORK_SETTINGS_NAMESPACE = "sq:finance-network-settings";
|
|
1084
|
-
const COUNTRIES_NAMESPACE = "sq:countries:list";
|
|
1085
|
-
const SORTED_COUNTRIES_NAMESPACE = "sq:countries:sorted";
|
|
1086
|
-
const COUNTRIES_QUERY_NAMESPACE = "sq:countries:query";
|
|
1087
|
-
const CURRENCIES_NAMESPACE = "sq:currencies:list";
|
|
1088
|
-
const CURRENCIES_QUERY_NAMESPACE = "sq:currencies:query";
|
|
1089
|
-
const GET_USER = index_module.dist.gql `
|
|
1090
|
-
query getUserTaxInfo {
|
|
1091
|
-
user: viewer {
|
|
1092
|
-
... on User {
|
|
1093
|
-
id
|
|
1094
|
-
firstName
|
|
1095
|
-
lastName
|
|
1096
|
-
email
|
|
1097
|
-
countryCode
|
|
1098
|
-
customFields
|
|
1099
|
-
rewards(limit: 1000) {
|
|
1100
|
-
data {
|
|
1101
|
-
statuses
|
|
1102
|
-
partnerFundsTransfer {
|
|
1103
|
-
id
|
|
1104
|
-
status
|
|
1105
|
-
}
|
|
1106
|
-
}
|
|
1107
|
-
}
|
|
1108
|
-
managedIdentity {
|
|
1109
|
-
uid
|
|
1110
|
-
email
|
|
1111
|
-
emailVerified
|
|
1112
|
-
}
|
|
1113
|
-
impactConnection {
|
|
1114
|
-
connected
|
|
1115
|
-
user {
|
|
1116
|
-
firstName
|
|
1117
|
-
lastName
|
|
1118
|
-
}
|
|
1119
|
-
publisher {
|
|
1120
|
-
id
|
|
1121
|
-
brandedSignup
|
|
1122
|
-
countryCode
|
|
1123
|
-
currency
|
|
1124
|
-
billingAddress
|
|
1125
|
-
billingCity
|
|
1126
|
-
billingState
|
|
1127
|
-
billingCountryCode
|
|
1128
|
-
billingPostalCode
|
|
1129
|
-
phoneNumberCountryCode
|
|
1130
|
-
phoneNumber
|
|
1131
|
-
taxInformation {
|
|
1132
|
-
indirectTaxId
|
|
1133
|
-
indirectTaxCountryCode
|
|
1134
|
-
indirectTaxRegion
|
|
1135
|
-
additionalTaxId
|
|
1136
|
-
withholdingTaxId
|
|
1137
|
-
withholdingTaxCountryCode
|
|
1138
|
-
}
|
|
1139
|
-
requiredTaxDocumentType
|
|
1140
|
-
currentTaxDocument {
|
|
1141
|
-
status
|
|
1142
|
-
type
|
|
1143
|
-
dateCreated
|
|
1144
|
-
}
|
|
1145
|
-
withdrawalSettings {
|
|
1146
|
-
paymentMethod
|
|
1147
|
-
paypalEmailAddress
|
|
1148
|
-
bankCountry
|
|
1149
|
-
bankAccountNumber
|
|
1150
|
-
paymentSchedulingType
|
|
1151
|
-
paymentThreshold
|
|
1152
|
-
paymentDay
|
|
1153
|
-
}
|
|
1154
|
-
payoutsAccount {
|
|
1155
|
-
hold
|
|
1156
|
-
holdReasons
|
|
1157
|
-
balance
|
|
1158
|
-
}
|
|
1159
|
-
}
|
|
1160
|
-
}
|
|
1161
|
-
}
|
|
1162
|
-
}
|
|
1163
|
-
}
|
|
1164
|
-
`;
|
|
1165
|
-
const GET_COUNTRIES = index_module.dist.gql `
|
|
1166
|
-
query getCountries {
|
|
1167
|
-
impactPayoutCountries(limit: 1000) {
|
|
1168
|
-
data {
|
|
1169
|
-
countryCode
|
|
1170
|
-
displayName
|
|
1171
|
-
}
|
|
1172
|
-
}
|
|
1173
|
-
}
|
|
1174
|
-
`;
|
|
1175
|
-
const GET_CURRENCIES = index_module.dist.gql `
|
|
1176
|
-
query currencies($locale: RSLocale) {
|
|
1177
|
-
currencies(limit: 300) {
|
|
1178
|
-
data {
|
|
1179
|
-
displayName(locale: $locale)
|
|
1180
|
-
currencyCode
|
|
1181
|
-
}
|
|
1182
|
-
}
|
|
1183
|
-
}
|
|
1184
|
-
`;
|
|
1185
|
-
const GET_FINANCE_NETWORK_SETTINGS = index_module.dist.gql `
|
|
1186
|
-
query impactFinanceNetworkSettings(
|
|
1187
|
-
$filter: ImpactFinanceNetworkSettingsFilterInput
|
|
1188
|
-
) {
|
|
1189
|
-
impactFinanceNetworkSettings(filter: $filter, limit: 1000) {
|
|
1190
|
-
data {
|
|
1191
|
-
countryCode
|
|
1192
|
-
currency
|
|
1193
|
-
defaultFinancePaymentMethodId
|
|
1194
|
-
thresholdOptions
|
|
1195
|
-
withdrawalSettingId
|
|
1196
|
-
internationalEftFee
|
|
1197
|
-
foreignFxFee
|
|
1198
|
-
defaultFxFee
|
|
1199
|
-
}
|
|
1200
|
-
totalCount
|
|
1201
|
-
}
|
|
1202
|
-
}
|
|
1203
|
-
`;
|
|
1204
|
-
const FORM_STEPS = 4;
|
|
1205
|
-
|
|
1206
1238
|
exports.COUNTRIES_NAMESPACE = COUNTRIES_NAMESPACE;
|
|
1207
1239
|
exports.COUNTRIES_QUERY_NAMESPACE = COUNTRIES_QUERY_NAMESPACE;
|
|
1208
1240
|
exports.CURRENCIES_NAMESPACE = CURRENCIES_NAMESPACE;
|
|
@@ -6,6 +6,15 @@ import { Component, h, Host, Prop } from "@stencil/core";
|
|
|
6
6
|
*/
|
|
7
7
|
export class HeroImage {
|
|
8
8
|
constructor() {
|
|
9
|
+
/**
|
|
10
|
+
* @uiName Logo text
|
|
11
|
+
*/
|
|
12
|
+
this.logoTextSize = 24;
|
|
13
|
+
/**
|
|
14
|
+
* @uiWidget color
|
|
15
|
+
* @uiName Logo text
|
|
16
|
+
*/
|
|
17
|
+
this.logoTextColor = "#555555";
|
|
9
18
|
/**
|
|
10
19
|
* Page participants are navigated to after clicking the header logo.
|
|
11
20
|
*
|
|
@@ -22,8 +31,11 @@ export class HeroImage {
|
|
|
22
31
|
disconnectedCallback() { }
|
|
23
32
|
render() {
|
|
24
33
|
return (h(Host, null,
|
|
25
|
-
h("a", { href: this.nextPage, part: "sqm-link" },
|
|
26
|
-
|
|
34
|
+
h("a", { href: this.nextPage, part: "sqm-link" }, this.imageUrl ? (h("img", { style: { height: `${this === null || this === void 0 ? void 0 : this.height}px` }, src: this === null || this === void 0 ? void 0 : this.imageUrl })) : (h("h3", { style: {
|
|
35
|
+
fontSize: `${this.logoTextSize}px`,
|
|
36
|
+
color: this.logoTextColor || "#555555",
|
|
37
|
+
textDecoration: "none",
|
|
38
|
+
} }, this.logoText)))));
|
|
27
39
|
}
|
|
28
40
|
static get is() { return "sqm-header-logo"; }
|
|
29
41
|
static get encapsulation() { return "shadow"; }
|
|
@@ -37,7 +49,7 @@ export class HeroImage {
|
|
|
37
49
|
"references": {}
|
|
38
50
|
},
|
|
39
51
|
"required": false,
|
|
40
|
-
"optional":
|
|
52
|
+
"optional": true,
|
|
41
53
|
"docs": {
|
|
42
54
|
"tags": [{
|
|
43
55
|
"text": "ImageUpload",
|
|
@@ -54,6 +66,71 @@ export class HeroImage {
|
|
|
54
66
|
"attribute": "image-url",
|
|
55
67
|
"reflect": false
|
|
56
68
|
},
|
|
69
|
+
"logoText": {
|
|
70
|
+
"type": "string",
|
|
71
|
+
"mutable": false,
|
|
72
|
+
"complexType": {
|
|
73
|
+
"original": "string",
|
|
74
|
+
"resolved": "string",
|
|
75
|
+
"references": {}
|
|
76
|
+
},
|
|
77
|
+
"required": false,
|
|
78
|
+
"optional": true,
|
|
79
|
+
"docs": {
|
|
80
|
+
"tags": [{
|
|
81
|
+
"text": "Logo text",
|
|
82
|
+
"name": "uiName"
|
|
83
|
+
}],
|
|
84
|
+
"text": ""
|
|
85
|
+
},
|
|
86
|
+
"attribute": "logo-text",
|
|
87
|
+
"reflect": false
|
|
88
|
+
},
|
|
89
|
+
"logoTextSize": {
|
|
90
|
+
"type": "number",
|
|
91
|
+
"mutable": false,
|
|
92
|
+
"complexType": {
|
|
93
|
+
"original": "number",
|
|
94
|
+
"resolved": "number",
|
|
95
|
+
"references": {}
|
|
96
|
+
},
|
|
97
|
+
"required": false,
|
|
98
|
+
"optional": true,
|
|
99
|
+
"docs": {
|
|
100
|
+
"tags": [{
|
|
101
|
+
"text": "Logo text",
|
|
102
|
+
"name": "uiName"
|
|
103
|
+
}],
|
|
104
|
+
"text": ""
|
|
105
|
+
},
|
|
106
|
+
"attribute": "logo-text-size",
|
|
107
|
+
"reflect": false,
|
|
108
|
+
"defaultValue": "24"
|
|
109
|
+
},
|
|
110
|
+
"logoTextColor": {
|
|
111
|
+
"type": "string",
|
|
112
|
+
"mutable": false,
|
|
113
|
+
"complexType": {
|
|
114
|
+
"original": "string",
|
|
115
|
+
"resolved": "string",
|
|
116
|
+
"references": {}
|
|
117
|
+
},
|
|
118
|
+
"required": false,
|
|
119
|
+
"optional": true,
|
|
120
|
+
"docs": {
|
|
121
|
+
"tags": [{
|
|
122
|
+
"text": "color",
|
|
123
|
+
"name": "uiWidget"
|
|
124
|
+
}, {
|
|
125
|
+
"text": "Logo text",
|
|
126
|
+
"name": "uiName"
|
|
127
|
+
}],
|
|
128
|
+
"text": ""
|
|
129
|
+
},
|
|
130
|
+
"attribute": "logo-text-color",
|
|
131
|
+
"reflect": false,
|
|
132
|
+
"defaultValue": "\"#555555\""
|
|
133
|
+
},
|
|
57
134
|
"nextPage": {
|
|
58
135
|
"type": "string",
|
|
59
136
|
"mutable": false,
|
|
@@ -3,14 +3,14 @@ import { createStyleSheet } from "../../styling/JSS";
|
|
|
3
3
|
import { intl } from "../../global/global";
|
|
4
4
|
import { PoweredByImg } from "./PoweredByImg";
|
|
5
5
|
const vanillaStyle = `
|
|
6
|
-
:host{
|
|
6
|
+
:host {
|
|
7
7
|
margin: 0 auto;
|
|
8
8
|
width: 100%;
|
|
9
9
|
}
|
|
10
|
-
a{
|
|
10
|
+
a {
|
|
11
11
|
cursor:pointer;
|
|
12
12
|
color: var(--sqm-text-subdued);
|
|
13
|
-
text-decoration: none
|
|
13
|
+
text-decoration: none;
|
|
14
14
|
}
|
|
15
15
|
`;
|
|
16
16
|
export function PortalFooterView(props) {
|
|
@@ -6,7 +6,7 @@ import { COUNTRIES_QUERY_NAMESPACE, TAX_CONTEXT_NAMESPACE, TAX_FORM_CONTEXT_NAME
|
|
|
6
6
|
import { TAX_FORM_UPDATED_EVENT_KEY } from "../eventKeys";
|
|
7
7
|
import { INDIRECT_TAX_PROVINCES, INDIRECT_TAX_SPAIN_REGIONS, } from "../subregions";
|
|
8
8
|
import { getCountryObj, validTaxDocument } from "../utils";
|
|
9
|
-
const CONNECT_PARTNER = gql `
|
|
9
|
+
export const CONNECT_PARTNER = gql `
|
|
10
10
|
mutation createImpactConnection($vars: ImpactConnectionInput!) {
|
|
11
11
|
createImpactConnection(impactConnectionInput: $vars) {
|
|
12
12
|
success
|
|
@@ -111,8 +111,51 @@ export function useIndirectTaxForm(props) {
|
|
|
111
111
|
console.error("Could not detect select change");
|
|
112
112
|
setFormState((p) => ({ ...p, [field]: value }));
|
|
113
113
|
};
|
|
114
|
-
|
|
114
|
+
async function connectPartner(formData) {
|
|
115
115
|
var _a, _b, _c, _d, _e;
|
|
116
|
+
const vars = {
|
|
117
|
+
user: {
|
|
118
|
+
id: user.id,
|
|
119
|
+
accountId: user.accountId,
|
|
120
|
+
},
|
|
121
|
+
firstName: userForm.firstName,
|
|
122
|
+
lastName: userForm.lastName,
|
|
123
|
+
countryCode: userForm.countryCode,
|
|
124
|
+
currency: userForm.currency,
|
|
125
|
+
address: userForm.address,
|
|
126
|
+
city: userForm.city,
|
|
127
|
+
state: userForm.state,
|
|
128
|
+
postalCode: userForm.postalCode,
|
|
129
|
+
phoneNumber: userForm.phoneNumber,
|
|
130
|
+
phoneNumberCountryCode: userForm.phoneNumberCountryCode,
|
|
131
|
+
indirectTaxCountryCode: formData.selectedRegion,
|
|
132
|
+
indirectTaxRegion: formData.province || formData.subRegion,
|
|
133
|
+
indirectTaxId: formData.indirectTaxNumber,
|
|
134
|
+
additionalTaxId: formData.qstNumber,
|
|
135
|
+
withholdingTaxId: formData.subRegionTaxNumber,
|
|
136
|
+
};
|
|
137
|
+
const result = await connectImpactPartner({
|
|
138
|
+
vars,
|
|
139
|
+
});
|
|
140
|
+
if (!result || ((_a = result) === null || _a === void 0 ? void 0 : _a.message))
|
|
141
|
+
throw new Error();
|
|
142
|
+
if (!((_b = result.createImpactConnection) === null || _b === void 0 ? void 0 : _b.success)) {
|
|
143
|
+
// Output backend errors to console for now
|
|
144
|
+
console.error("Failed to create Impact connection: ", result.createImpactConnection.validationErrors);
|
|
145
|
+
throw new Error();
|
|
146
|
+
}
|
|
147
|
+
await refetch();
|
|
148
|
+
const resultPublisher = (_e = (_d = (_c = result
|
|
149
|
+
.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;
|
|
150
|
+
const hasValidCurrentDocument = validTaxDocument(resultPublisher === null || resultPublisher === void 0 ? void 0 : resultPublisher.requiredTaxDocumentType) && (resultPublisher === null || resultPublisher === void 0 ? void 0 : resultPublisher.currentTaxDocument);
|
|
151
|
+
// Fire form change event
|
|
152
|
+
window.dispatchEvent(new Event(TAX_FORM_UPDATED_EVENT_KEY));
|
|
153
|
+
return {
|
|
154
|
+
resultPublisher,
|
|
155
|
+
hasValidCurrentDocument,
|
|
156
|
+
};
|
|
157
|
+
}
|
|
158
|
+
const onSubmit = async (event) => {
|
|
116
159
|
if (!option) {
|
|
117
160
|
setErrors({ taxDetails: true });
|
|
118
161
|
return;
|
|
@@ -138,44 +181,7 @@ export function useIndirectTaxForm(props) {
|
|
|
138
181
|
}
|
|
139
182
|
setLoading(true);
|
|
140
183
|
try {
|
|
141
|
-
const
|
|
142
|
-
user: {
|
|
143
|
-
id: user.id,
|
|
144
|
-
accountId: user.accountId,
|
|
145
|
-
},
|
|
146
|
-
firstName: userForm.firstName,
|
|
147
|
-
lastName: userForm.lastName,
|
|
148
|
-
countryCode: userForm.countryCode,
|
|
149
|
-
currency: userForm.currency,
|
|
150
|
-
address: userForm.address,
|
|
151
|
-
city: userForm.city,
|
|
152
|
-
state: userForm.state,
|
|
153
|
-
postalCode: userForm.postalCode,
|
|
154
|
-
phoneNumber: userForm.phoneNumber,
|
|
155
|
-
phoneNumberCountryCode: userForm.phoneNumberCountryCode,
|
|
156
|
-
indirectTaxCountryCode: formData.selectedRegion,
|
|
157
|
-
indirectTaxRegion: formData.province || formData.subRegion,
|
|
158
|
-
indirectTaxId: formData.indirectTaxNumber,
|
|
159
|
-
additionalTaxId: formData.qstNumber,
|
|
160
|
-
withholdingTaxId: formData.subRegionTaxNumber,
|
|
161
|
-
};
|
|
162
|
-
const result = await connectImpactPartner({
|
|
163
|
-
vars,
|
|
164
|
-
});
|
|
165
|
-
if (!result || ((_a = result) === null || _a === void 0 ? void 0 : _a.message))
|
|
166
|
-
throw new Error();
|
|
167
|
-
if (!((_b = result.createImpactConnection) === null || _b === void 0 ? void 0 : _b.success)) {
|
|
168
|
-
// Output backend errors to console for now
|
|
169
|
-
console.error("Failed to create Impact connection: ", result.createImpactConnection
|
|
170
|
-
.validationErrors);
|
|
171
|
-
throw new Error();
|
|
172
|
-
}
|
|
173
|
-
await refetch();
|
|
174
|
-
const resultPublisher = (_e = (_d = (_c = result
|
|
175
|
-
.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;
|
|
176
|
-
const hasValidCurrentDocument = validTaxDocument(resultPublisher === null || resultPublisher === void 0 ? void 0 : resultPublisher.requiredTaxDocumentType) && (resultPublisher === null || resultPublisher === void 0 ? void 0 : resultPublisher.currentTaxDocument);
|
|
177
|
-
// Fire form change event
|
|
178
|
-
window.dispatchEvent(new Event(TAX_FORM_UPDATED_EVENT_KEY));
|
|
184
|
+
const { resultPublisher, hasValidCurrentDocument } = await connectPartner(formData);
|
|
179
185
|
if ((resultPublisher === null || resultPublisher === void 0 ? void 0 : resultPublisher.requiredTaxDocumentType) &&
|
|
180
186
|
!hasValidCurrentDocument) {
|
|
181
187
|
// Go to docusign form
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { h } from "@stencil/core";
|
|
1
|
+
import { Fragment, h } from "@stencil/core";
|
|
2
2
|
import { intl } from "../../../global/global";
|
|
3
3
|
import { createStyleSheet } from "../../../styling/JSS";
|
|
4
4
|
const style = {
|
|
@@ -126,7 +126,7 @@ export function PayoutStatusAlertView(props) {
|
|
|
126
126
|
icon: "exclamation-triangle",
|
|
127
127
|
};
|
|
128
128
|
}
|
|
129
|
-
case "
|
|
129
|
+
case "NEW_PAYEE_REVIEW":
|
|
130
130
|
return {
|
|
131
131
|
header: text.accountReviewHeader,
|
|
132
132
|
description: intl.formatMessage({
|
|
@@ -139,6 +139,86 @@ export function PayoutStatusAlertView(props) {
|
|
|
139
139
|
alertType: "warning",
|
|
140
140
|
icon: "exclamation-triangle",
|
|
141
141
|
};
|
|
142
|
+
case "PAYMENT_HOLD_ON_CHANGE":
|
|
143
|
+
return {
|
|
144
|
+
header: text.paymentHoldOnChangeHeader,
|
|
145
|
+
description: intl.formatMessage({
|
|
146
|
+
id: "accountReviewDescription",
|
|
147
|
+
defaultMessage: text.paymentHoldOnChangeDescription,
|
|
148
|
+
}, {
|
|
149
|
+
supportLink: (h("a", { target: "_blank", href: `mailto:advocate-support@impact.com` }, text.supportLink)),
|
|
150
|
+
}),
|
|
151
|
+
buttonText: null,
|
|
152
|
+
alertType: "warning",
|
|
153
|
+
icon: "exclamation-triangle",
|
|
154
|
+
};
|
|
155
|
+
case "BENEFICIARY_NAME_INVALID":
|
|
156
|
+
return {
|
|
157
|
+
header: text.beneficiaryNameInvalidHeader,
|
|
158
|
+
description: intl.formatMessage({
|
|
159
|
+
id: "accountReviewDescription",
|
|
160
|
+
defaultMessage: text.beneficiaryNameInvalidDescription,
|
|
161
|
+
}, {
|
|
162
|
+
supportLink: (h("a", { target: "_blank", href: `mailto:advocate-support@impact.com` }, text.supportLink)),
|
|
163
|
+
}),
|
|
164
|
+
buttonText: text.editPaymentInformationButton,
|
|
165
|
+
alertType: "warning",
|
|
166
|
+
icon: "exclamation-triangle",
|
|
167
|
+
};
|
|
168
|
+
case "BENEFICIARY_NAME_MISMATCH":
|
|
169
|
+
return {
|
|
170
|
+
header: text.beneficiaryNameMismatchHeader,
|
|
171
|
+
description: intl.formatMessage({
|
|
172
|
+
id: "accountReviewDescription",
|
|
173
|
+
defaultMessage: text.beneficiaryNameMismatchDescription,
|
|
174
|
+
}, {
|
|
175
|
+
supportLink: (h("a", { target: "_blank", href: `mailto:advocate-support@impact.com` }, text.supportLink)),
|
|
176
|
+
}),
|
|
177
|
+
buttonText: text.editPaymentInformationButton,
|
|
178
|
+
alertType: "warning",
|
|
179
|
+
icon: "exclamation-triangle",
|
|
180
|
+
};
|
|
181
|
+
case "BANK_TAX_NAME_MISMATCH":
|
|
182
|
+
return {
|
|
183
|
+
header: text.bankTaxNameMismatchHeader,
|
|
184
|
+
description: intl.formatMessage({
|
|
185
|
+
id: "accountReviewDescription",
|
|
186
|
+
defaultMessage: text.bankTaxNameMismatchDescription,
|
|
187
|
+
}, {
|
|
188
|
+
supportLink: (h("a", { target: "_blank", href: `mailto:advocate-support@impact.com` }, text.supportLink)),
|
|
189
|
+
}),
|
|
190
|
+
buttonText: text.editPaymentInformationButton,
|
|
191
|
+
alertType: "warning",
|
|
192
|
+
icon: "exclamation-triangle",
|
|
193
|
+
};
|
|
194
|
+
case "WITHDRAWAL_SETTINGS_INVALID":
|
|
195
|
+
return {
|
|
196
|
+
header: text.withdrawalSettingsInvalidHeader,
|
|
197
|
+
description: intl.formatMessage({
|
|
198
|
+
id: "accountReviewDescription",
|
|
199
|
+
defaultMessage: text.withdrawalSettingsInvalidDescription,
|
|
200
|
+
}, {
|
|
201
|
+
supportLink: (h("a", { target: "_blank", href: `mailto:advocate-support@impact.com` }, text.supportLink)),
|
|
202
|
+
}),
|
|
203
|
+
buttonText: text.editPaymentInformationButton,
|
|
204
|
+
alertType: "warning",
|
|
205
|
+
icon: "exclamation-triangle",
|
|
206
|
+
};
|
|
207
|
+
case "PAYMENT_RETURNED":
|
|
208
|
+
return {
|
|
209
|
+
header: text.paymentReturnedHeader,
|
|
210
|
+
description: intl.formatMessage({
|
|
211
|
+
id: "accountReviewDescription",
|
|
212
|
+
defaultMessage: text.paymentReturnedDescription,
|
|
213
|
+
}, {
|
|
214
|
+
supportLink: (h("a", { target: "_blank", href: `mailto:advocate-support@impact.com` }, text.supportLink)),
|
|
215
|
+
}),
|
|
216
|
+
button: (h(Fragment, null,
|
|
217
|
+
h("sl-button", { disabled: states.loading, type: "default", onClick: callbacks.onPaymentInfoClick }, text.editPaymentInformationButton),
|
|
218
|
+
h("sl-button", { disabled: states.loading, type: "default", onClick: callbacks.onNewFormClick }, text.newFormButton))),
|
|
219
|
+
alertType: "warning",
|
|
220
|
+
icon: "exclamation-triangle",
|
|
221
|
+
};
|
|
142
222
|
case "HOLD":
|
|
143
223
|
return {
|
|
144
224
|
header: text.holdHeader,
|
|
@@ -174,6 +254,8 @@ export function PayoutStatusAlertView(props) {
|
|
|
174
254
|
return (h("div", { style: { paddingTop: "10px" } },
|
|
175
255
|
h("sl-button", { type: "secondary", exportparts: "base: secondarybutton-base", loading: states.veriffLoading, onClick: callbacks.onClick }, text.verificationRequiredButtonText)));
|
|
176
256
|
default:
|
|
257
|
+
if (alertDetails.button)
|
|
258
|
+
return alertDetails.button;
|
|
177
259
|
return;
|
|
178
260
|
}
|
|
179
261
|
}
|