@saasquatch/mint-components 2.0.2-11 → 2.0.2-13
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/sqm-banking-info-form_10.cjs.entry.js +24 -7
- package/dist/cjs/sqm-big-stat_47.cjs.entry.js +4 -4
- package/dist/collection/components/tax-and-cash/sqm-payout-status-alert/sqm-payout-status-alert.js +4 -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.js +4 -4
- package/dist/collection/components/tax-and-cash/sqm-user-info-form/useUserInfoForm.js +19 -8
- package/dist/esm/sqm-banking-info-form_10.entry.js +24 -7
- package/dist/esm/sqm-big-stat_47.entry.js +4 -4
- 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/mint-components/mint-components.esm.js +1 -1
- package/dist/mint-components/p-967a9040.system.js +1 -1
- package/dist/mint-components/{p-65808084.entry.js → p-98f3db14.entry.js} +10 -1
- package/dist/mint-components/p-a3323ecb.system.entry.js +1 -0
- package/dist/mint-components/{p-ebb22a4a.system.entry.js → p-b79a8cf9.system.entry.js} +1 -1
- package/dist/mint-components/{p-408a3798.entry.js → p-e4f6a6c8.entry.js} +2 -2
- package/docs/docs.docx +0 -0
- package/docs/raisins.json +1 -1
- package/package.json +1 -1
- package/dist/mint-components/p-35576752.system.entry.js +0 -1
|
@@ -4744,11 +4744,11 @@ const TaxAndCashDashboard = class {
|
|
|
4744
4744
|
/**
|
|
4745
4745
|
* @uiName Withdrawal settings invalid alert header
|
|
4746
4746
|
*/
|
|
4747
|
-
this.withdrawalSettingsInvalidHeader = "Your payment information includes invalid characters";
|
|
4747
|
+
this.withdrawalSettingsInvalidHeader = "Your payment information is incomplete or includes invalid characters";
|
|
4748
4748
|
/**
|
|
4749
4749
|
* @uiName Withdrawal settings invalid alert description
|
|
4750
4750
|
*/
|
|
4751
|
-
this.withdrawalSettingsInvalidDescription = "There are invalid characters in your payment information. Please review your information and make sure it is correct
|
|
4751
|
+
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.";
|
|
4752
4752
|
/**
|
|
4753
4753
|
* @uiName Payment returned alert header
|
|
4754
4754
|
*/
|
|
@@ -6337,8 +6337,18 @@ const UserInfoFormView = (props) => {
|
|
|
6337
6337
|
index.h("sl-button", { type: "primary", disabled: states.disabled, submit: true, exportparts: "base: primarybutton-base" }, text.continueButton))))));
|
|
6338
6338
|
};
|
|
6339
6339
|
|
|
6340
|
+
const GET_INDIRECT_TAX_COUNTRY_CODE = index_module.dist.gql `
|
|
6341
|
+
query getIndirectTaxCountryCode {
|
|
6342
|
+
tenant {
|
|
6343
|
+
tenantSettings {
|
|
6344
|
+
impactBrandCountryCode
|
|
6345
|
+
impactBrandIndirectTaxCountryCode
|
|
6346
|
+
}
|
|
6347
|
+
}
|
|
6348
|
+
}
|
|
6349
|
+
`;
|
|
6340
6350
|
function useUserInfoForm(props) {
|
|
6341
|
-
var _a, _b, _c, _d, _e, _f;
|
|
6351
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
6342
6352
|
const currencyRef = domContextHooks_module.useRef(undefined);
|
|
6343
6353
|
const phoneCountryRef = domContextHooks_module.useRef(undefined);
|
|
6344
6354
|
const formRef = domContextHooks_module.useRef(null);
|
|
@@ -6348,6 +6358,7 @@ function useUserInfoForm(props) {
|
|
|
6348
6358
|
const [userFormContext, setUserFormContext] = index_module.Pn(usePayoutStatus.USER_FORM_CONTEXT_NAMESPACE);
|
|
6349
6359
|
const user = index_module.J();
|
|
6350
6360
|
const [connectImpactPartner, { loading: connectLoading, errors: connectErrors },] = index_module.$e(CONNECT_PARTNER);
|
|
6361
|
+
const { data: tenantData } = index_module.wn(GET_INDIRECT_TAX_COUNTRY_CODE, {});
|
|
6351
6362
|
const { data, loading, refetch, errors: userError, } = index_module.$n(usePayoutStatus.USER_QUERY_NAMESPACE);
|
|
6352
6363
|
const _currencies = index_module.Fn(usePayoutStatus.CURRENCIES_NAMESPACE);
|
|
6353
6364
|
const currencies = domContextHooks_module.useMemo(() => [...(_currencies || [])].sort((a, b) => a.displayName.localeCompare(b.displayName)), [_currencies]);
|
|
@@ -6561,10 +6572,16 @@ function useUserInfoForm(props) {
|
|
|
6561
6572
|
const nextStep = context.overrideNextStep || skipNextStep ? "/3" : "/2";
|
|
6562
6573
|
setStep(nextStep);
|
|
6563
6574
|
}
|
|
6575
|
+
const brandCountry = (_b = (_a = tenantData === null || tenantData === void 0 ? void 0 : tenantData.tenant) === null || _a === void 0 ? void 0 : _a.tenantSettings) === null || _b === void 0 ? void 0 : _b.impactBrandCountryCode;
|
|
6576
|
+
const hasIndirectTax = !!((_d = (_c = tenantData === null || tenantData === void 0 ? void 0 : tenantData.tenant) === null || _c === void 0 ? void 0 : _c.tenantSettings) === null || _d === void 0 ? void 0 : _d.impactBrandIndirectTaxCountryCode);
|
|
6564
6577
|
function getSkipNextStep(userData) {
|
|
6565
6578
|
if (userData.countryCode === "US")
|
|
6566
6579
|
return true;
|
|
6567
|
-
|
|
6580
|
+
if (!hasIndirectTax)
|
|
6581
|
+
return true;
|
|
6582
|
+
if (hasIndirectTax && userData.countryCode !== brandCountry)
|
|
6583
|
+
return true;
|
|
6584
|
+
return false;
|
|
6568
6585
|
}
|
|
6569
6586
|
const hasStates = ["ES", "AU", "US", "CA"].includes(userFormContext.countryCode);
|
|
6570
6587
|
const regionObj = hasStates
|
|
@@ -6593,7 +6610,7 @@ function useUserInfoForm(props) {
|
|
|
6593
6610
|
allCountries: countries,
|
|
6594
6611
|
regionLabelEnum: regionObj === null || regionObj === void 0 ? void 0 : regionObj.labelEnum,
|
|
6595
6612
|
regions: (regionObj === null || regionObj === void 0 ? void 0 : regionObj.regions) || [],
|
|
6596
|
-
partnerData: (
|
|
6613
|
+
partnerData: (_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.publisher,
|
|
6597
6614
|
},
|
|
6598
6615
|
states: {
|
|
6599
6616
|
step: step === null || step === void 0 ? void 0 : step.replace("/", ""),
|
|
@@ -6602,8 +6619,8 @@ function useUserInfoForm(props) {
|
|
|
6602
6619
|
disabled: loading || connectLoading,
|
|
6603
6620
|
loadingError: !!(userError === null || userError === void 0 ? void 0 : userError.message),
|
|
6604
6621
|
loading: loading || connectLoading,
|
|
6605
|
-
isPartner: !!((
|
|
6606
|
-
isUser: !!((
|
|
6622
|
+
isPartner: !!((_h = (_g = data === null || data === void 0 ? void 0 : data.user) === null || _g === void 0 ? void 0 : _g.impactConnection) === null || _h === void 0 ? void 0 : _h.publisher),
|
|
6623
|
+
isUser: !!((_k = (_j = data === null || data === void 0 ? void 0 : data.user) === null || _j === void 0 ? void 0 : _j.impactConnection) === null || _k === void 0 ? void 0 : _k.user),
|
|
6607
6624
|
formState: {
|
|
6608
6625
|
...userFormContext,
|
|
6609
6626
|
errors: formErrors,
|
|
@@ -3285,11 +3285,11 @@ const PayoutStatusAlert = class {
|
|
|
3285
3285
|
/**
|
|
3286
3286
|
* @uiName Withdrawal settings invalid alert header
|
|
3287
3287
|
*/
|
|
3288
|
-
this.withdrawalSettingsInvalidHeader = "Your payment information includes invalid characters";
|
|
3288
|
+
this.withdrawalSettingsInvalidHeader = "Your payment information is incomplete or includes invalid characters";
|
|
3289
3289
|
/**
|
|
3290
3290
|
* @uiName Withdrawal settings invalid alert description
|
|
3291
3291
|
*/
|
|
3292
|
-
this.withdrawalSettingsInvalidDescription = "There are invalid characters in your payment information. Please review your information and make sure it is correct
|
|
3292
|
+
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.";
|
|
3293
3293
|
/**
|
|
3294
3294
|
* @uiName Payment returned alert header
|
|
3295
3295
|
*/
|
|
@@ -7665,11 +7665,11 @@ const TaxAndCashMonolith = class {
|
|
|
7665
7665
|
/**
|
|
7666
7666
|
* @uiName Withdrawal settings invalid alert header
|
|
7667
7667
|
*/
|
|
7668
|
-
this.dashboard_withdrawalSettingsInvalidHeader = "Your payment information includes invalid characters";
|
|
7668
|
+
this.dashboard_withdrawalSettingsInvalidHeader = "Your payment information is incomplete or includes invalid characters";
|
|
7669
7669
|
/**
|
|
7670
7670
|
* @uiName Withdrawal settings invalid alert description
|
|
7671
7671
|
*/
|
|
7672
|
-
this.dashboard_withdrawalSettingsInvalidDescription = "There are invalid characters in your payment information. Please review your information and make sure it is correct
|
|
7672
|
+
this.dashboard_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.";
|
|
7673
7673
|
/**
|
|
7674
7674
|
* @uiName Payment returned alert header
|
|
7675
7675
|
*/
|
package/dist/collection/components/tax-and-cash/sqm-payout-status-alert/sqm-payout-status-alert.js
CHANGED
|
@@ -114,11 +114,11 @@ export class PayoutStatusAlert {
|
|
|
114
114
|
/**
|
|
115
115
|
* @uiName Withdrawal settings invalid alert header
|
|
116
116
|
*/
|
|
117
|
-
this.withdrawalSettingsInvalidHeader = "Your payment information includes invalid characters";
|
|
117
|
+
this.withdrawalSettingsInvalidHeader = "Your payment information is incomplete or includes invalid characters";
|
|
118
118
|
/**
|
|
119
119
|
* @uiName Withdrawal settings invalid alert description
|
|
120
120
|
*/
|
|
121
|
-
this.withdrawalSettingsInvalidDescription = "There are invalid characters in your payment information. Please review your information and make sure it is correct
|
|
121
|
+
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.";
|
|
122
122
|
/**
|
|
123
123
|
* @uiName Payment returned alert header
|
|
124
124
|
*/
|
|
@@ -713,7 +713,7 @@ export class PayoutStatusAlert {
|
|
|
713
713
|
},
|
|
714
714
|
"attribute": "withdrawal-settings-invalid-header",
|
|
715
715
|
"reflect": false,
|
|
716
|
-
"defaultValue": "\"Your payment information includes invalid characters\""
|
|
716
|
+
"defaultValue": "\"Your payment information is incomplete or includes invalid characters\""
|
|
717
717
|
},
|
|
718
718
|
"withdrawalSettingsInvalidDescription": {
|
|
719
719
|
"type": "string",
|
|
@@ -734,7 +734,7 @@ export class PayoutStatusAlert {
|
|
|
734
734
|
},
|
|
735
735
|
"attribute": "withdrawal-settings-invalid-description",
|
|
736
736
|
"reflect": false,
|
|
737
|
-
"defaultValue": "\"There are invalid characters in your payment information. Please review your information and make sure it is correct
|
|
737
|
+
"defaultValue": "\"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.\""
|
|
738
738
|
},
|
|
739
739
|
"paymentReturnedHeader": {
|
|
740
740
|
"type": "string",
|
|
@@ -977,11 +977,11 @@ export class TaxAndCashMonolith {
|
|
|
977
977
|
/**
|
|
978
978
|
* @uiName Withdrawal settings invalid alert header
|
|
979
979
|
*/
|
|
980
|
-
this.dashboard_withdrawalSettingsInvalidHeader = "Your payment information includes invalid characters";
|
|
980
|
+
this.dashboard_withdrawalSettingsInvalidHeader = "Your payment information is incomplete or includes invalid characters";
|
|
981
981
|
/**
|
|
982
982
|
* @uiName Withdrawal settings invalid alert description
|
|
983
983
|
*/
|
|
984
|
-
this.dashboard_withdrawalSettingsInvalidDescription = "There are invalid characters in your payment information. Please review your information and make sure it is correct
|
|
984
|
+
this.dashboard_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.";
|
|
985
985
|
/**
|
|
986
986
|
* @uiName Payment returned alert header
|
|
987
987
|
*/
|
|
@@ -5255,7 +5255,7 @@ export class TaxAndCashMonolith {
|
|
|
5255
5255
|
},
|
|
5256
5256
|
"attribute": "dashboard_withdrawal-settings-invalid-header",
|
|
5257
5257
|
"reflect": false,
|
|
5258
|
-
"defaultValue": "\"Your payment information includes invalid characters\""
|
|
5258
|
+
"defaultValue": "\"Your payment information is incomplete or includes invalid characters\""
|
|
5259
5259
|
},
|
|
5260
5260
|
"dashboard_withdrawalSettingsInvalidDescription": {
|
|
5261
5261
|
"type": "string",
|
|
@@ -5276,7 +5276,7 @@ export class TaxAndCashMonolith {
|
|
|
5276
5276
|
},
|
|
5277
5277
|
"attribute": "dashboard_withdrawal-settings-invalid-description",
|
|
5278
5278
|
"reflect": false,
|
|
5279
|
-
"defaultValue": "\"There are invalid characters in your payment information. Please review your information and make sure it is correct
|
|
5279
|
+
"defaultValue": "\"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.\""
|
|
5280
5280
|
},
|
|
5281
5281
|
"dashboard_paymentReturnedHeader": {
|
|
5282
5282
|
"type": "string",
|
|
@@ -282,11 +282,11 @@ export class TaxAndCashDashboard {
|
|
|
282
282
|
/**
|
|
283
283
|
* @uiName Withdrawal settings invalid alert header
|
|
284
284
|
*/
|
|
285
|
-
this.withdrawalSettingsInvalidHeader = "Your payment information includes invalid characters";
|
|
285
|
+
this.withdrawalSettingsInvalidHeader = "Your payment information is incomplete or includes invalid characters";
|
|
286
286
|
/**
|
|
287
287
|
* @uiName Withdrawal settings invalid alert description
|
|
288
288
|
*/
|
|
289
|
-
this.withdrawalSettingsInvalidDescription = "There are invalid characters in your payment information. Please review your information and make sure it is correct
|
|
289
|
+
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.";
|
|
290
290
|
/**
|
|
291
291
|
* @uiName Payment returned alert header
|
|
292
292
|
*/
|
|
@@ -1601,7 +1601,7 @@ export class TaxAndCashDashboard {
|
|
|
1601
1601
|
},
|
|
1602
1602
|
"attribute": "withdrawal-settings-invalid-header",
|
|
1603
1603
|
"reflect": false,
|
|
1604
|
-
"defaultValue": "\"Your payment information includes invalid characters\""
|
|
1604
|
+
"defaultValue": "\"Your payment information is incomplete or includes invalid characters\""
|
|
1605
1605
|
},
|
|
1606
1606
|
"withdrawalSettingsInvalidDescription": {
|
|
1607
1607
|
"type": "string",
|
|
@@ -1622,7 +1622,7 @@ export class TaxAndCashDashboard {
|
|
|
1622
1622
|
},
|
|
1623
1623
|
"attribute": "withdrawal-settings-invalid-description",
|
|
1624
1624
|
"reflect": false,
|
|
1625
|
-
"defaultValue": "\"There are invalid characters in your payment information. Please review your information and make sure it is correct
|
|
1625
|
+
"defaultValue": "\"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.\""
|
|
1626
1626
|
},
|
|
1627
1627
|
"paymentReturnedHeader": {
|
|
1628
1628
|
"type": "string",
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { useMutation, useParent, useParentQueryValue, useParentValue, useUserIdentity, } from "@saasquatch/component-boilerplate";
|
|
1
|
+
import { useMutation, useParent, useParentQueryValue, useParentValue, useQuery, useUserIdentity, } from "@saasquatch/component-boilerplate";
|
|
2
2
|
import { useEffect, useMemo, useRef, useState, } from "@saasquatch/universal-hooks";
|
|
3
3
|
import jsonpointer from "jsonpointer";
|
|
4
4
|
import { CURRENCIES_NAMESPACE, SORTED_COUNTRIES_NAMESPACE, TAX_CONTEXT_NAMESPACE, TAX_FORM_CONTEXT_NAMESPACE, USER_FORM_CONTEXT_NAMESPACE, USER_QUERY_NAMESPACE, } from "../data";
|
|
@@ -6,8 +6,19 @@ import { ADDRESS_REGIONS } from "../subregions";
|
|
|
6
6
|
import { objectIsFull, validTaxDocument } from "../utils";
|
|
7
7
|
import { TAX_FORM_UPDATED_EVENT_KEY } from "../eventKeys";
|
|
8
8
|
import { CONNECT_PARTNER, } from "../sqm-indirect-tax-form/useIndirectTaxForm";
|
|
9
|
+
import { gql } from "graphql-request";
|
|
10
|
+
const GET_INDIRECT_TAX_COUNTRY_CODE = gql `
|
|
11
|
+
query getIndirectTaxCountryCode {
|
|
12
|
+
tenant {
|
|
13
|
+
tenantSettings {
|
|
14
|
+
impactBrandCountryCode
|
|
15
|
+
impactBrandIndirectTaxCountryCode
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
`;
|
|
9
20
|
export function useUserInfoForm(props) {
|
|
10
|
-
var _a, _b, _c, _d, _e, _f;
|
|
21
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
11
22
|
const currencyRef = useRef(undefined);
|
|
12
23
|
const phoneCountryRef = useRef(undefined);
|
|
13
24
|
const formRef = useRef(null);
|
|
@@ -17,6 +28,7 @@ export function useUserInfoForm(props) {
|
|
|
17
28
|
const [userFormContext, setUserFormContext] = useParent(USER_FORM_CONTEXT_NAMESPACE);
|
|
18
29
|
const user = useUserIdentity();
|
|
19
30
|
const [connectImpactPartner, { loading: connectLoading, errors: connectErrors },] = useMutation(CONNECT_PARTNER);
|
|
31
|
+
const { data: tenantData } = useQuery(GET_INDIRECT_TAX_COUNTRY_CODE, {});
|
|
20
32
|
const { data, loading, refetch, errors: userError, } = useParentQueryValue(USER_QUERY_NAMESPACE);
|
|
21
33
|
const _currencies = useParentValue(CURRENCIES_NAMESPACE);
|
|
22
34
|
const currencies = useMemo(() => [...(_currencies || [])].sort((a, b) => a.displayName.localeCompare(b.displayName)), [_currencies]);
|
|
@@ -230,9 +242,8 @@ export function useUserInfoForm(props) {
|
|
|
230
242
|
const nextStep = context.overrideNextStep || skipNextStep ? "/3" : "/2";
|
|
231
243
|
setStep(nextStep);
|
|
232
244
|
}
|
|
233
|
-
|
|
234
|
-
const hasIndirectTax =
|
|
235
|
-
const brandCountry = "";
|
|
245
|
+
const brandCountry = (_b = (_a = tenantData === null || tenantData === void 0 ? void 0 : tenantData.tenant) === null || _a === void 0 ? void 0 : _a.tenantSettings) === null || _b === void 0 ? void 0 : _b.impactBrandCountryCode;
|
|
246
|
+
const hasIndirectTax = !!((_d = (_c = tenantData === null || tenantData === void 0 ? void 0 : tenantData.tenant) === null || _c === void 0 ? void 0 : _c.tenantSettings) === null || _d === void 0 ? void 0 : _d.impactBrandIndirectTaxCountryCode);
|
|
236
247
|
function getSkipNextStep(userData) {
|
|
237
248
|
if (userData.countryCode === "US")
|
|
238
249
|
return true;
|
|
@@ -269,7 +280,7 @@ export function useUserInfoForm(props) {
|
|
|
269
280
|
allCountries: countries,
|
|
270
281
|
regionLabelEnum: regionObj === null || regionObj === void 0 ? void 0 : regionObj.labelEnum,
|
|
271
282
|
regions: (regionObj === null || regionObj === void 0 ? void 0 : regionObj.regions) || [],
|
|
272
|
-
partnerData: (
|
|
283
|
+
partnerData: (_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.publisher,
|
|
273
284
|
},
|
|
274
285
|
states: {
|
|
275
286
|
step: step === null || step === void 0 ? void 0 : step.replace("/", ""),
|
|
@@ -278,8 +289,8 @@ export function useUserInfoForm(props) {
|
|
|
278
289
|
disabled: loading || connectLoading,
|
|
279
290
|
loadingError: !!(userError === null || userError === void 0 ? void 0 : userError.message),
|
|
280
291
|
loading: loading || connectLoading,
|
|
281
|
-
isPartner: !!((
|
|
282
|
-
isUser: !!((
|
|
292
|
+
isPartner: !!((_h = (_g = data === null || data === void 0 ? void 0 : data.user) === null || _g === void 0 ? void 0 : _g.impactConnection) === null || _h === void 0 ? void 0 : _h.publisher),
|
|
293
|
+
isUser: !!((_k = (_j = data === null || data === void 0 ? void 0 : data.user) === null || _j === void 0 ? void 0 : _j.impactConnection) === null || _k === void 0 ? void 0 : _k.user),
|
|
283
294
|
formState: {
|
|
284
295
|
...userFormContext,
|
|
285
296
|
errors: formErrors,
|
|
@@ -4740,11 +4740,11 @@ const TaxAndCashDashboard = class {
|
|
|
4740
4740
|
/**
|
|
4741
4741
|
* @uiName Withdrawal settings invalid alert header
|
|
4742
4742
|
*/
|
|
4743
|
-
this.withdrawalSettingsInvalidHeader = "Your payment information includes invalid characters";
|
|
4743
|
+
this.withdrawalSettingsInvalidHeader = "Your payment information is incomplete or includes invalid characters";
|
|
4744
4744
|
/**
|
|
4745
4745
|
* @uiName Withdrawal settings invalid alert description
|
|
4746
4746
|
*/
|
|
4747
|
-
this.withdrawalSettingsInvalidDescription = "There are invalid characters in your payment information. Please review your information and make sure it is correct
|
|
4747
|
+
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
4748
|
/**
|
|
4749
4749
|
* @uiName Payment returned alert header
|
|
4750
4750
|
*/
|
|
@@ -6333,8 +6333,18 @@ const UserInfoFormView = (props) => {
|
|
|
6333
6333
|
h("sl-button", { type: "primary", disabled: states.disabled, submit: true, exportparts: "base: primarybutton-base" }, text.continueButton))))));
|
|
6334
6334
|
};
|
|
6335
6335
|
|
|
6336
|
+
const GET_INDIRECT_TAX_COUNTRY_CODE = dist.gql `
|
|
6337
|
+
query getIndirectTaxCountryCode {
|
|
6338
|
+
tenant {
|
|
6339
|
+
tenantSettings {
|
|
6340
|
+
impactBrandCountryCode
|
|
6341
|
+
impactBrandIndirectTaxCountryCode
|
|
6342
|
+
}
|
|
6343
|
+
}
|
|
6344
|
+
}
|
|
6345
|
+
`;
|
|
6336
6346
|
function useUserInfoForm(props) {
|
|
6337
|
-
var _a, _b, _c, _d, _e, _f;
|
|
6347
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
6338
6348
|
const currencyRef = useRef(undefined);
|
|
6339
6349
|
const phoneCountryRef = useRef(undefined);
|
|
6340
6350
|
const formRef = useRef(null);
|
|
@@ -6344,6 +6354,7 @@ function useUserInfoForm(props) {
|
|
|
6344
6354
|
const [userFormContext, setUserFormContext] = Pn(USER_FORM_CONTEXT_NAMESPACE);
|
|
6345
6355
|
const user = J();
|
|
6346
6356
|
const [connectImpactPartner, { loading: connectLoading, errors: connectErrors },] = $e(CONNECT_PARTNER);
|
|
6357
|
+
const { data: tenantData } = wn(GET_INDIRECT_TAX_COUNTRY_CODE, {});
|
|
6347
6358
|
const { data, loading, refetch, errors: userError, } = $n(USER_QUERY_NAMESPACE);
|
|
6348
6359
|
const _currencies = Fn(CURRENCIES_NAMESPACE);
|
|
6349
6360
|
const currencies = useMemo(() => [...(_currencies || [])].sort((a, b) => a.displayName.localeCompare(b.displayName)), [_currencies]);
|
|
@@ -6557,10 +6568,16 @@ function useUserInfoForm(props) {
|
|
|
6557
6568
|
const nextStep = context.overrideNextStep || skipNextStep ? "/3" : "/2";
|
|
6558
6569
|
setStep(nextStep);
|
|
6559
6570
|
}
|
|
6571
|
+
const brandCountry = (_b = (_a = tenantData === null || tenantData === void 0 ? void 0 : tenantData.tenant) === null || _a === void 0 ? void 0 : _a.tenantSettings) === null || _b === void 0 ? void 0 : _b.impactBrandCountryCode;
|
|
6572
|
+
const hasIndirectTax = !!((_d = (_c = tenantData === null || tenantData === void 0 ? void 0 : tenantData.tenant) === null || _c === void 0 ? void 0 : _c.tenantSettings) === null || _d === void 0 ? void 0 : _d.impactBrandIndirectTaxCountryCode);
|
|
6560
6573
|
function getSkipNextStep(userData) {
|
|
6561
6574
|
if (userData.countryCode === "US")
|
|
6562
6575
|
return true;
|
|
6563
|
-
|
|
6576
|
+
if (!hasIndirectTax)
|
|
6577
|
+
return true;
|
|
6578
|
+
if (hasIndirectTax && userData.countryCode !== brandCountry)
|
|
6579
|
+
return true;
|
|
6580
|
+
return false;
|
|
6564
6581
|
}
|
|
6565
6582
|
const hasStates = ["ES", "AU", "US", "CA"].includes(userFormContext.countryCode);
|
|
6566
6583
|
const regionObj = hasStates
|
|
@@ -6589,7 +6606,7 @@ function useUserInfoForm(props) {
|
|
|
6589
6606
|
allCountries: countries,
|
|
6590
6607
|
regionLabelEnum: regionObj === null || regionObj === void 0 ? void 0 : regionObj.labelEnum,
|
|
6591
6608
|
regions: (regionObj === null || regionObj === void 0 ? void 0 : regionObj.regions) || [],
|
|
6592
|
-
partnerData: (
|
|
6609
|
+
partnerData: (_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.publisher,
|
|
6593
6610
|
},
|
|
6594
6611
|
states: {
|
|
6595
6612
|
step: step === null || step === void 0 ? void 0 : step.replace("/", ""),
|
|
@@ -6598,8 +6615,8 @@ function useUserInfoForm(props) {
|
|
|
6598
6615
|
disabled: loading || connectLoading,
|
|
6599
6616
|
loadingError: !!(userError === null || userError === void 0 ? void 0 : userError.message),
|
|
6600
6617
|
loading: loading || connectLoading,
|
|
6601
|
-
isPartner: !!((
|
|
6602
|
-
isUser: !!((
|
|
6618
|
+
isPartner: !!((_h = (_g = data === null || data === void 0 ? void 0 : data.user) === null || _g === void 0 ? void 0 : _g.impactConnection) === null || _h === void 0 ? void 0 : _h.publisher),
|
|
6619
|
+
isUser: !!((_k = (_j = data === null || data === void 0 ? void 0 : data.user) === null || _j === void 0 ? void 0 : _j.impactConnection) === null || _k === void 0 ? void 0 : _k.user),
|
|
6603
6620
|
formState: {
|
|
6604
6621
|
...userFormContext,
|
|
6605
6622
|
errors: formErrors,
|
|
@@ -3281,11 +3281,11 @@ const PayoutStatusAlert = class {
|
|
|
3281
3281
|
/**
|
|
3282
3282
|
* @uiName Withdrawal settings invalid alert header
|
|
3283
3283
|
*/
|
|
3284
|
-
this.withdrawalSettingsInvalidHeader = "Your payment information includes invalid characters";
|
|
3284
|
+
this.withdrawalSettingsInvalidHeader = "Your payment information is incomplete or includes invalid characters";
|
|
3285
3285
|
/**
|
|
3286
3286
|
* @uiName Withdrawal settings invalid alert description
|
|
3287
3287
|
*/
|
|
3288
|
-
this.withdrawalSettingsInvalidDescription = "There are invalid characters in your payment information. Please review your information and make sure it is correct
|
|
3288
|
+
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.";
|
|
3289
3289
|
/**
|
|
3290
3290
|
* @uiName Payment returned alert header
|
|
3291
3291
|
*/
|
|
@@ -7661,11 +7661,11 @@ const TaxAndCashMonolith = class {
|
|
|
7661
7661
|
/**
|
|
7662
7662
|
* @uiName Withdrawal settings invalid alert header
|
|
7663
7663
|
*/
|
|
7664
|
-
this.dashboard_withdrawalSettingsInvalidHeader = "Your payment information includes invalid characters";
|
|
7664
|
+
this.dashboard_withdrawalSettingsInvalidHeader = "Your payment information is incomplete or includes invalid characters";
|
|
7665
7665
|
/**
|
|
7666
7666
|
* @uiName Withdrawal settings invalid alert description
|
|
7667
7667
|
*/
|
|
7668
|
-
this.dashboard_withdrawalSettingsInvalidDescription = "There are invalid characters in your payment information. Please review your information and make sure it is correct
|
|
7668
|
+
this.dashboard_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.";
|
|
7669
7669
|
/**
|
|
7670
7670
|
* @uiName Payment returned alert header
|
|
7671
7671
|
*/
|