@saasquatch/mint-components 2.5.10-0 → 2.5.10
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 +18 -20
- package/dist/cjs/sqm-big-stat_47.cjs.entry.js +2 -2
- package/dist/cjs/sqm-stencilbook.cjs.entry.js +3 -2
- package/dist/cjs/{sqm-user-info-form-view-df5b95be.js → sqm-user-info-form-view-9b773a7c.js} +1 -1
- package/dist/cjs/{subregions-fd4e4ee2.js → subregions-77aac151.js} +8 -0
- package/dist/cjs/{useIndirectTaxForm-76b94531.js → useIndirectTaxForm-102d5c24.js} +3 -3
- package/dist/collection/components/tax-and-cash/TaxForm.stories.js +1 -0
- package/dist/collection/components/tax-and-cash/sqm-banking-info-form/sqm-banking-info-form-view.js +2 -2
- package/dist/collection/components/tax-and-cash/sqm-banking-info-form/sqm-banking-info-form.js +1 -1
- package/dist/collection/components/tax-and-cash/sqm-banking-info-form/useBankingInfoForm.js +2 -0
- package/dist/collection/components/tax-and-cash/sqm-indirect-tax-form/useIndirectTaxForm.js +3 -3
- package/dist/collection/components/tax-and-cash/sqm-user-info-form/useUserInfoForm.js +13 -16
- package/dist/collection/components/tax-and-cash/utils.js +7 -0
- package/dist/esm/sqm-banking-info-form_10.entry.js +18 -20
- package/dist/esm/sqm-big-stat_47.entry.js +2 -2
- package/dist/esm/sqm-stencilbook.entry.js +3 -2
- package/dist/esm/{sqm-user-info-form-view-d35324ba.js → sqm-user-info-form-view-0d95c791.js} +1 -1
- package/dist/esm/{subregions-c7df98a1.js → subregions-ec4682c7.js} +8 -1
- package/dist/esm/{useIndirectTaxForm-6ea561e4.js → useIndirectTaxForm-09809605.js} +3 -3
- 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-stencilbook.entry.js +1 -1
- package/dist/esm-es5/{sqm-user-info-form-view-d35324ba.js → sqm-user-info-form-view-0d95c791.js} +1 -1
- package/dist/esm-es5/{subregions-c7df98a1.js → subregions-ec4682c7.js} +1 -1
- package/dist/esm-es5/{useIndirectTaxForm-6ea561e4.js → useIndirectTaxForm-09809605.js} +2 -2
- package/dist/mint-components/mint-components.esm.js +1 -1
- package/dist/mint-components/{p-aaf05ef1.entry.js → p-24d56265.entry.js} +1 -1
- package/dist/mint-components/p-2bd3f2ac.system.js +6 -0
- package/dist/mint-components/{p-477fe6fa.system.entry.js → p-363bf460.system.entry.js} +1 -1
- package/dist/mint-components/{p-98659a12.system.js → p-3dc446ec.system.js} +1 -1
- package/dist/mint-components/{p-089c0803.js → p-461a068d.js} +1 -1
- package/dist/mint-components/{p-9e90f38e.entry.js → p-71b1cd71.entry.js} +8 -8
- package/dist/mint-components/p-99d4ddee.js +107 -0
- package/dist/mint-components/p-b1d6a6f2.system.js +1 -0
- package/dist/mint-components/{p-4314e5c9.entry.js → p-c0e26b94.entry.js} +2 -2
- package/dist/mint-components/{p-615dbc66.system.entry.js → p-df62cb1b.system.entry.js} +1 -1
- package/dist/mint-components/p-e78ec46b.system.js +1 -1
- package/dist/mint-components/p-ec78006c.system.entry.js +1 -0
- package/dist/mint-components/{p-2401753b.js → p-f15ad5b6.js} +1 -1
- package/dist/types/components/tax-and-cash/sqm-banking-info-form/sqm-banking-info-form-view.d.ts +1 -0
- package/dist/types/components/tax-and-cash/utils.d.ts +3 -1
- package/docs/docs.docx +0 -0
- package/docs/stats.json +209 -208
- package/package.json +1 -1
- package/dist/mint-components/p-1cb0fc65.system.js +0 -6
- package/dist/mint-components/p-59f9d9bb.js +0 -107
- package/dist/mint-components/p-db8e74e0.system.entry.js +0 -1
- package/dist/mint-components/p-ed18f6a0.system.js +0 -1
|
@@ -13,9 +13,9 @@ const data = require('./data-7ea0e395.js');
|
|
|
13
13
|
const jsonpointer = require('./jsonpointer-0db21316.js');
|
|
14
14
|
const keys = require('./keys-5a2c9ed2.js');
|
|
15
15
|
const parseStates = require('./parseStates-35013ba4.js');
|
|
16
|
-
const subregions = require('./subregions-
|
|
17
|
-
const sqmUserInfoFormView = require('./sqm-user-info-form-view-
|
|
18
|
-
const useIndirectTaxForm = require('./useIndirectTaxForm-
|
|
16
|
+
const subregions = require('./subregions-77aac151.js');
|
|
17
|
+
const sqmUserInfoFormView = require('./sqm-user-info-form-view-9b773a7c.js');
|
|
18
|
+
const useIndirectTaxForm = require('./useIndirectTaxForm-102d5c24.js');
|
|
19
19
|
const GenericTableView = require('./GenericTableView-12d35117.js');
|
|
20
20
|
const reRender = require('./re-render-65869eb3.js');
|
|
21
21
|
const useReferralTable = require('./useReferralTable-21a2e1a4.js');
|
|
@@ -802,12 +802,12 @@ const BankingInfoFormView = (props) => {
|
|
|
802
802
|
index.h("p", { part: "alert-title" }, global.intl.formatMessage({
|
|
803
803
|
id: "isPartnerAlertHeader",
|
|
804
804
|
defaultMessage: text.isPartnerAlertHeader,
|
|
805
|
-
}, { emailAddress: states.
|
|
805
|
+
}, { emailAddress: states.partnerEmail || "" })),
|
|
806
806
|
index.h("p", null, global.intl.formatMessage({
|
|
807
807
|
id: "isPartnerAlertDescription",
|
|
808
808
|
defaultMessage: text.isPartnerAlertDescription,
|
|
809
809
|
}, {
|
|
810
|
-
emailAddress: states.
|
|
810
|
+
emailAddress: states.partnerEmail || "",
|
|
811
811
|
supportLink: (index.h("a", { target: "_blank", href: `mailto:advocate-payment-support@impact.com` }, text.supportLink)),
|
|
812
812
|
})))),
|
|
813
813
|
index.h("div", null,
|
|
@@ -1309,6 +1309,7 @@ function useBankingInfoForm(props) {
|
|
|
1309
1309
|
bankCountry: formState.bankCountry,
|
|
1310
1310
|
countrySearch,
|
|
1311
1311
|
email: (_j = userData === null || userData === void 0 ? void 0 : userData.user) === null || _j === void 0 ? void 0 : _j.email,
|
|
1312
|
+
partnerEmail: subregions.getParticipantEmail(userData === null || userData === void 0 ? void 0 : userData.user),
|
|
1312
1313
|
showModal,
|
|
1313
1314
|
},
|
|
1314
1315
|
refs: {
|
|
@@ -3618,18 +3619,15 @@ function useUserInfoForm(props) {
|
|
|
3618
3619
|
window.location.hash = "";
|
|
3619
3620
|
}, []);
|
|
3620
3621
|
domContextHooks_module.useEffect(() => {
|
|
3621
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o
|
|
3622
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o;
|
|
3622
3623
|
const user = data$1 === null || data$1 === void 0 ? void 0 : data$1.user;
|
|
3623
3624
|
if (!user || step !== "/1")
|
|
3624
3625
|
return;
|
|
3625
3626
|
// If form already filled out, skip initialising it
|
|
3626
3627
|
if (subregions.objectIsFull(userFormContext))
|
|
3627
3628
|
return;
|
|
3628
|
-
|
|
3629
|
-
|
|
3630
|
-
? user.managedIdentity.email
|
|
3631
|
-
: user.email;
|
|
3632
|
-
if (((_b = user.impactConnection) === null || _b === void 0 ? void 0 : _b.publisher) && ((_c = user.impactConnection) === null || _c === void 0 ? void 0 : _c.user)) {
|
|
3629
|
+
const email = subregions.getParticipantEmail(user);
|
|
3630
|
+
if (((_a = user.impactConnection) === null || _a === void 0 ? void 0 : _a.publisher) && ((_b = user.impactConnection) === null || _b === void 0 ? void 0 : _b.user)) {
|
|
3633
3631
|
// Initialise with partner information
|
|
3634
3632
|
setUserFormContext({
|
|
3635
3633
|
email,
|
|
@@ -3654,16 +3652,16 @@ function useUserInfoForm(props) {
|
|
|
3654
3652
|
// Initialise with user information
|
|
3655
3653
|
setUserFormContext({
|
|
3656
3654
|
email,
|
|
3657
|
-
firstName: ((
|
|
3658
|
-
lastName: ((
|
|
3655
|
+
firstName: ((_d = (_c = user.impactConnection) === null || _c === void 0 ? void 0 : _c.user) === null || _d === void 0 ? void 0 : _d.firstName) || user.firstName,
|
|
3656
|
+
lastName: ((_f = (_e = user.impactConnection) === null || _e === void 0 ? void 0 : _e.user) === null || _f === void 0 ? void 0 : _f.lastName) || user.lastName,
|
|
3659
3657
|
countryCode: user.countryCode || "US",
|
|
3660
|
-
currency: (
|
|
3661
|
-
phoneNumberCountryCode: ((
|
|
3662
|
-
phoneNumber: (
|
|
3663
|
-
address: (
|
|
3664
|
-
city: (
|
|
3665
|
-
state: (
|
|
3666
|
-
postalCode: (
|
|
3658
|
+
currency: (_g = user.customFields) === null || _g === void 0 ? void 0 : _g.currency,
|
|
3659
|
+
phoneNumberCountryCode: ((_h = user.customFields) === null || _h === void 0 ? void 0 : _h.phoneNumberCountryCode) || "US",
|
|
3660
|
+
phoneNumber: (_j = user.customFields) === null || _j === void 0 ? void 0 : _j.phoneNumber,
|
|
3661
|
+
address: (_k = user.customFields) === null || _k === void 0 ? void 0 : _k.address,
|
|
3662
|
+
city: (_l = user.customFields) === null || _l === void 0 ? void 0 : _l.city,
|
|
3663
|
+
state: (_m = user.customFields) === null || _m === void 0 ? void 0 : _m.state,
|
|
3664
|
+
postalCode: (_o = user.customFields) === null || _o === void 0 ? void 0 : _o.postalCode,
|
|
3667
3665
|
});
|
|
3668
3666
|
}
|
|
3669
3667
|
}, [data$1, step, userFormContext]);
|
|
@@ -16,7 +16,7 @@ const utilities = require('./utilities-4995dc8f.js');
|
|
|
16
16
|
const imageUrl = require('./imageUrl-a7880cab.js');
|
|
17
17
|
const jsonpointer = require('./jsonpointer-0db21316.js');
|
|
18
18
|
const AsYouType = require('./AsYouType-5f15a922.js');
|
|
19
|
-
const useIndirectTaxForm = require('./useIndirectTaxForm-
|
|
19
|
+
const useIndirectTaxForm = require('./useIndirectTaxForm-102d5c24.js');
|
|
20
20
|
const parseStates = require('./parseStates-35013ba4.js');
|
|
21
21
|
const sqmPortalRegistrationFormView = require('./sqm-portal-registration-form-view-5473e24d.js');
|
|
22
22
|
const usePortalRegistrationForm = require('./usePortalRegistrationForm-671d2863.js');
|
|
@@ -26,7 +26,7 @@ const emailRegistrationView = require('./email-registration-view-36a74293.js');
|
|
|
26
26
|
const index$2 = require('./index-f1dd6136.js');
|
|
27
27
|
const copyTextView = require('./copy-text-view-49517b2a.js');
|
|
28
28
|
const ErrorView = require('./ErrorView-8f6cf1cb.js');
|
|
29
|
-
const subregions = require('./subregions-
|
|
29
|
+
const subregions = require('./subregions-77aac151.js');
|
|
30
30
|
const data = require('./data-7ea0e395.js');
|
|
31
31
|
const reRender = require('./re-render-65869eb3.js');
|
|
32
32
|
const luxon = require('./luxon-d3612a3d.js');
|
|
@@ -15,7 +15,7 @@ const index = require('./index-88a40938.js');
|
|
|
15
15
|
const sqmPortalVerifyEmailView = require('./sqm-portal-verify-email-view-08be7dec.js');
|
|
16
16
|
const sqmCloseButtonView = require('./sqm-close-button-view-74e5e1e9.js');
|
|
17
17
|
const GenericTableView = require('./GenericTableView-12d35117.js');
|
|
18
|
-
const sqmUserInfoFormView = require('./sqm-user-info-form-view-
|
|
18
|
+
const sqmUserInfoFormView = require('./sqm-user-info-form-view-9b773a7c.js');
|
|
19
19
|
const sqmLeaderboardRankView = require('./sqm-leaderboard-rank-view-e992762c.js');
|
|
20
20
|
const sqmLogoutCurrentUserView = require('./sqm-logout-current-user-view-ebee238e.js');
|
|
21
21
|
const sqmPortalEmailVerificationView = require('./sqm-portal-email-verification-view-ff5e33b9.js');
|
|
@@ -23,7 +23,7 @@ const sqmPortalRegistrationFormView = require('./sqm-portal-registration-form-vi
|
|
|
23
23
|
const sqmPortalResetPasswordView = require('./sqm-portal-reset-password-view-7a6f55c5.js');
|
|
24
24
|
const sqmQrCodeView = require('./sqm-qr-code-view-70da70f9.js');
|
|
25
25
|
const luxon = require('./luxon-d3612a3d.js');
|
|
26
|
-
const subregions = require('./subregions-
|
|
26
|
+
const subregions = require('./subregions-77aac151.js');
|
|
27
27
|
const emailRegistrationView = require('./email-registration-view-36a74293.js');
|
|
28
28
|
const sqmLeadInputFieldView = require('./sqm-lead-input-field-view-67aaabf7.js');
|
|
29
29
|
const sqmLeadCheckboxFieldView = require('./sqm-lead-checkbox-field-view-e12e8cb6.js');
|
|
@@ -36859,6 +36859,7 @@ const stepFourProps = {
|
|
|
36859
36859
|
thresholds: [],
|
|
36860
36860
|
loadingError: false,
|
|
36861
36861
|
email: "test@example.com",
|
|
36862
|
+
partnerEmail: "test@example.com",
|
|
36862
36863
|
formState: {
|
|
36863
36864
|
paymentMethodChecked: "toBankAccount",
|
|
36864
36865
|
},
|
package/dist/cjs/{sqm-user-info-form-view-df5b95be.js → sqm-user-info-form-view-9b773a7c.js}
RENAMED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
const index = require('./index-d41c2c94.js');
|
|
4
4
|
const JSS = require('./JSS-bf8078e9.js');
|
|
5
5
|
const global = require('./global-0316d9f8.js');
|
|
6
|
-
const subregions = require('./subregions-
|
|
6
|
+
const subregions = require('./subregions-77aac151.js');
|
|
7
7
|
const data = require('./data-7ea0e395.js');
|
|
8
8
|
const AsYouType = require('./AsYouType-5f15a922.js');
|
|
9
9
|
|
|
@@ -900,6 +900,13 @@ function parsePhoneNumber() {
|
|
|
900
900
|
return withMetadataArgument(parsePhoneNumber$1, arguments)
|
|
901
901
|
}
|
|
902
902
|
|
|
903
|
+
/** Managed identity email once verified, else the profile email. */
|
|
904
|
+
function getParticipantEmail(user) {
|
|
905
|
+
var _a;
|
|
906
|
+
return ((_a = user === null || user === void 0 ? void 0 : user.managedIdentity) === null || _a === void 0 ? void 0 : _a.emailVerified)
|
|
907
|
+
? user.managedIdentity.email
|
|
908
|
+
: user === null || user === void 0 ? void 0 : user.email;
|
|
909
|
+
}
|
|
903
910
|
/**
|
|
904
911
|
* Normalize user input to the domestic form Impact stores: digits only,
|
|
905
912
|
* with the country dial code and trunk-zero prefix removed.
|
|
@@ -1458,6 +1465,7 @@ exports.LoadingView = LoadingView;
|
|
|
1458
1465
|
exports.formatErrorMessage = formatErrorMessage;
|
|
1459
1466
|
exports.formatPayoutThreshold = formatPayoutThreshold;
|
|
1460
1467
|
exports.getCountryObj = getCountryObj;
|
|
1468
|
+
exports.getParticipantEmail = getParticipantEmail;
|
|
1461
1469
|
exports.isBalanceUnderPayoutThreshold = isBalanceUnderPayoutThreshold;
|
|
1462
1470
|
exports.isValidI18nPhoneNumber = isValidI18nPhoneNumber;
|
|
1463
1471
|
exports.objectIsFull = objectIsFull;
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
const index = require('./index-88a40938.js');
|
|
4
4
|
const domContextHooks_module = require('./dom-context-hooks.module-735c3942.js');
|
|
5
5
|
const parseStates = require('./parseStates-35013ba4.js');
|
|
6
|
-
const subregions = require('./subregions-
|
|
6
|
+
const subregions = require('./subregions-77aac151.js');
|
|
7
7
|
const jsonpointer = require('./jsonpointer-0db21316.js');
|
|
8
8
|
const data = require('./data-7ea0e395.js');
|
|
9
9
|
|
|
@@ -1181,7 +1181,7 @@ function getOption(countries, countryCode) {
|
|
|
1181
1181
|
}
|
|
1182
1182
|
}
|
|
1183
1183
|
function useIndirectTaxForm(props) {
|
|
1184
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j
|
|
1184
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
1185
1185
|
const user = index.useUserIdentity();
|
|
1186
1186
|
const locale = index.useLocale();
|
|
1187
1187
|
const formRef = domContextHooks_module.useRef(null);
|
|
@@ -1372,7 +1372,7 @@ function useIndirectTaxForm(props) {
|
|
|
1372
1372
|
isPartner: !!((_e = (_d = userData === null || userData === void 0 ? void 0 : userData.user) === null || _d === void 0 ? void 0 : _d.impactConnection) === null || _e === void 0 ? void 0 : _e.publisher),
|
|
1373
1373
|
isPartnerLegacy: !!((_g = (_f = userData === null || userData === void 0 ? void 0 : userData.user) === null || _f === void 0 ? void 0 : _f.impactConnection) === null || _g === void 0 ? void 0 : _g.publisher) &&
|
|
1374
1374
|
((_j = (_h = userData === null || userData === void 0 ? void 0 : userData.user) === null || _h === void 0 ? void 0 : _h.impactConnection) === null || _j === void 0 ? void 0 : _j.connectionStatus) !== "STARTED",
|
|
1375
|
-
email: (userForm === null || userForm === void 0 ? void 0 : userForm.email) || (
|
|
1375
|
+
email: (userForm === null || userForm === void 0 ? void 0 : userForm.email) || subregions.getParticipantEmail(userData === null || userData === void 0 ? void 0 : userData.user),
|
|
1376
1376
|
loadingError: !!(userError === null || userError === void 0 ? void 0 : userError.message),
|
|
1377
1377
|
formState: {
|
|
1378
1378
|
checked: option,
|
package/dist/collection/components/tax-and-cash/sqm-banking-info-form/sqm-banking-info-form-view.js
CHANGED
|
@@ -188,11 +188,11 @@ export const BankingInfoFormView = (props) => {
|
|
|
188
188
|
}))), states.isPartner && !states.hideSteps && (h("sqm-form-message", { type: "info", transparent: true }, h("p", { part: "alert-title" }, intl.formatMessage({
|
|
189
189
|
id: "isPartnerAlertHeader",
|
|
190
190
|
defaultMessage: text.isPartnerAlertHeader,
|
|
191
|
-
}, { emailAddress: states.
|
|
191
|
+
}, { emailAddress: states.partnerEmail || "" })), h("p", null, intl.formatMessage({
|
|
192
192
|
id: "isPartnerAlertDescription",
|
|
193
193
|
defaultMessage: text.isPartnerAlertDescription,
|
|
194
194
|
}, {
|
|
195
|
-
emailAddress: states.
|
|
195
|
+
emailAddress: states.partnerEmail || "",
|
|
196
196
|
supportLink: (h("a", { target: "_blank", href: `mailto:advocate-payment-support@impact.com` }, text.supportLink)),
|
|
197
197
|
})))), h("div", null, h("h4", null, text.paymentMethod), h("p", { class: classes.DescriptionText }, text.paymentMethodSubtext))), h("div", null, h("div", { class: classes.CheckboxContainer }, states.loading && formState.paymentMethodChecked === undefined ? (getLoadingSkeleton(undefined)) : (h("div", { class: classes.RadioContainer }, states.hasPayPal && (h("sl-radio", { class: classes.Checkbox, exportparts: "base: radio-base", checked: formState.paymentMethodChecked === "toBankAccount", onInput: () => callbacks.setPaymentMethodChecked("toBankAccount"), disabled: states.disabled, id: "toBankAccount", name: "/toBankAccount" }, text.directlyToBankAccount)), formState.paymentMethodChecked === "toBankAccount" && (h("div", { class: classes.InputContainer, style: states.hideBanking ? { display: "none" } : {} }, states.loading
|
|
198
198
|
? getLoadingSkeleton("toBankAccount", slots.formInputsSlot.length + 3)
|
package/dist/collection/components/tax-and-cash/sqm-banking-info-form/sqm-banking-info-form.js
CHANGED
|
@@ -2098,7 +2098,7 @@ export class BankingInfoForm {
|
|
|
2098
2098
|
"mutable": false,
|
|
2099
2099
|
"complexType": {
|
|
2100
2100
|
"original": "DemoData<BankingInfoFormViewProps>",
|
|
2101
|
-
"resolved": "{ states?: { showVerification: boolean; step?: string; locale?: string; loading: boolean; saveLoading?: boolean; disabled: boolean; saveDisabled: boolean; hideSteps?: boolean; hasPayPal: boolean; hideBanking?: boolean; hidePayPal?: boolean; hideBalanceThreshold?: boolean; hideFixedDay?: boolean; hideBackButton: boolean; feeCap?: string; isPartner: boolean; paymentMethodFeeLabel?: string; loadingError: boolean; formState: BankingInfoFormData & { paymentMethodChecked?: \"toPayPalAccount\" | \"toBankAccount\"; paymentScheduleChecked?: \"BALANCE_THRESHOLD\" | \"FIXED_DAY\"; errors?: { general?: boolean; inputErrors?: { [field: string]: { type: \"invalid\" | \"required\"; errorCode?: string; }; }; }; }; bitset?: number; currency?: string; thresholds: string[]; countries?: { countryCode: string; displayName: string; }[]; allCountries?: { countryCode: string; displayName: string; }[]; currentPaymentOption?: any; showInputs?: boolean; bankCountry?: string; countrySearch?: string; email?: string; showModal: boolean; }; slots?: { verificationDialogSlot?: VNode; formInputsSlot?: VNode[]; countryInputSlot?: VNode; paymentMethodSlot?: VNode; paymentThresholdSelectSlot?: VNode; paymentFixedDaySelectSlot?: VNode; paypalInputSlot?: VNode; }; refs?: { formRef: any; }; }",
|
|
2101
|
+
"resolved": "{ states?: { showVerification: boolean; step?: string; locale?: string; loading: boolean; saveLoading?: boolean; disabled: boolean; saveDisabled: boolean; hideSteps?: boolean; hasPayPal: boolean; hideBanking?: boolean; hidePayPal?: boolean; hideBalanceThreshold?: boolean; hideFixedDay?: boolean; hideBackButton: boolean; feeCap?: string; isPartner: boolean; paymentMethodFeeLabel?: string; loadingError: boolean; formState: BankingInfoFormData & { paymentMethodChecked?: \"toPayPalAccount\" | \"toBankAccount\"; paymentScheduleChecked?: \"BALANCE_THRESHOLD\" | \"FIXED_DAY\"; errors?: { general?: boolean; inputErrors?: { [field: string]: { type: \"invalid\" | \"required\"; errorCode?: string; }; }; }; }; bitset?: number; currency?: string; thresholds: string[]; countries?: { countryCode: string; displayName: string; }[]; allCountries?: { countryCode: string; displayName: string; }[]; currentPaymentOption?: any; showInputs?: boolean; bankCountry?: string; countrySearch?: string; email?: string; partnerEmail?: string; showModal: boolean; }; slots?: { verificationDialogSlot?: VNode; formInputsSlot?: VNode[]; countryInputSlot?: VNode; paymentMethodSlot?: VNode; paymentThresholdSelectSlot?: VNode; paymentFixedDaySelectSlot?: VNode; paypalInputSlot?: VNode; }; refs?: { formRef: any; }; }",
|
|
2102
2102
|
"references": {
|
|
2103
2103
|
"DemoData": {
|
|
2104
2104
|
"location": "import",
|
|
@@ -6,6 +6,7 @@ import { intl } from "../../../global/global";
|
|
|
6
6
|
import { VERIFICATION_EVENT_KEY } from "../../sqm-widget-verification/keys";
|
|
7
7
|
import { FINANCE_NETWORK_SETTINGS_NAMESPACE, SORTED_COUNTRIES_NAMESPACE, TAX_CONTEXT_NAMESPACE, TAX_FORM_CONTEXT_NAMESPACE, USER_QUERY_NAMESPACE, } from "../data";
|
|
8
8
|
import { TAX_FORM_UPDATED_EVENT_KEY } from "../eventKeys";
|
|
9
|
+
import { getParticipantEmail } from "../utils";
|
|
9
10
|
// Hardcoded in Impact backend
|
|
10
11
|
export const paypalFeeMap = {
|
|
11
12
|
USD: "USD20.00",
|
|
@@ -468,6 +469,7 @@ export function useBankingInfoForm(props) {
|
|
|
468
469
|
bankCountry: formState.bankCountry,
|
|
469
470
|
countrySearch,
|
|
470
471
|
email: (_j = userData === null || userData === void 0 ? void 0 : userData.user) === null || _j === void 0 ? void 0 : _j.email,
|
|
472
|
+
partnerEmail: getParticipantEmail(userData === null || userData === void 0 ? void 0 : userData.user),
|
|
471
473
|
showModal,
|
|
472
474
|
},
|
|
473
475
|
refs: {
|
|
@@ -5,7 +5,7 @@ import JSONPointer from "jsonpointer";
|
|
|
5
5
|
import { COUNTRIES_QUERY_NAMESPACE, TAX_CONTEXT_NAMESPACE, TAX_FORM_CONTEXT_NAMESPACE, USER_FORM_CONTEXT_NAMESPACE, USER_QUERY_NAMESPACE, } from "../data";
|
|
6
6
|
import { TAX_FORM_UPDATED_EVENT_KEY } from "../eventKeys";
|
|
7
7
|
import { INDIRECT_TAX_PROVINCES, INDIRECT_TAX_SPAIN_REGIONS, } from "../subregions";
|
|
8
|
-
import { getCountryObj, validTaxDocument } from "../utils";
|
|
8
|
+
import { getCountryObj, getParticipantEmail, validTaxDocument } from "../utils";
|
|
9
9
|
export const CONNECT_PARTNER = gql `
|
|
10
10
|
mutation createImpactConnection($vars: ImpactConnectionInput!) {
|
|
11
11
|
createImpactConnection(impactConnectionInput: $vars) {
|
|
@@ -71,7 +71,7 @@ function getOption(countries, countryCode) {
|
|
|
71
71
|
}
|
|
72
72
|
}
|
|
73
73
|
export function useIndirectTaxForm(props) {
|
|
74
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j
|
|
74
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
75
75
|
const user = useUserIdentity();
|
|
76
76
|
const locale = useLocale();
|
|
77
77
|
const formRef = useRef(null);
|
|
@@ -262,7 +262,7 @@ export function useIndirectTaxForm(props) {
|
|
|
262
262
|
isPartner: !!((_e = (_d = userData === null || userData === void 0 ? void 0 : userData.user) === null || _d === void 0 ? void 0 : _d.impactConnection) === null || _e === void 0 ? void 0 : _e.publisher),
|
|
263
263
|
isPartnerLegacy: !!((_g = (_f = userData === null || userData === void 0 ? void 0 : userData.user) === null || _f === void 0 ? void 0 : _f.impactConnection) === null || _g === void 0 ? void 0 : _g.publisher) &&
|
|
264
264
|
((_j = (_h = userData === null || userData === void 0 ? void 0 : userData.user) === null || _h === void 0 ? void 0 : _h.impactConnection) === null || _j === void 0 ? void 0 : _j.connectionStatus) !== "STARTED",
|
|
265
|
-
email: (userForm === null || userForm === void 0 ? void 0 : userForm.email) || (
|
|
265
|
+
email: (userForm === null || userForm === void 0 ? void 0 : userForm.email) || getParticipantEmail(userData === null || userData === void 0 ? void 0 : userData.user),
|
|
266
266
|
loadingError: !!(userError === null || userError === void 0 ? void 0 : userError.message),
|
|
267
267
|
formState: {
|
|
268
268
|
checked: option,
|
|
@@ -3,7 +3,7 @@ import { useEffect, useMemo, useRef, useState, } from "@saasquatch/universal-hoo
|
|
|
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";
|
|
5
5
|
import { ADDRESS_REGIONS } from "../subregions";
|
|
6
|
-
import { objectIsFull, toDomesticNumber, validTaxDocument } from "../utils";
|
|
6
|
+
import { getParticipantEmail, objectIsFull, toDomesticNumber, validTaxDocument, } from "../utils";
|
|
7
7
|
import { TAX_FORM_UPDATED_EVENT_KEY } from "../eventKeys";
|
|
8
8
|
import { CONNECT_PARTNER, COMPLETE_PARTNER, } from "../sqm-indirect-tax-form/useIndirectTaxForm";
|
|
9
9
|
import { gql } from "graphql-request";
|
|
@@ -43,18 +43,15 @@ export function useUserInfoForm(props) {
|
|
|
43
43
|
window.location.hash = "";
|
|
44
44
|
}, []);
|
|
45
45
|
useEffect(() => {
|
|
46
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o
|
|
46
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o;
|
|
47
47
|
const user = data === null || data === void 0 ? void 0 : data.user;
|
|
48
48
|
if (!user || step !== "/1")
|
|
49
49
|
return;
|
|
50
50
|
// If form already filled out, skip initialising it
|
|
51
51
|
if (objectIsFull(userFormContext))
|
|
52
52
|
return;
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
? user.managedIdentity.email
|
|
56
|
-
: user.email;
|
|
57
|
-
if (((_b = user.impactConnection) === null || _b === void 0 ? void 0 : _b.publisher) && ((_c = user.impactConnection) === null || _c === void 0 ? void 0 : _c.user)) {
|
|
53
|
+
const email = getParticipantEmail(user);
|
|
54
|
+
if (((_a = user.impactConnection) === null || _a === void 0 ? void 0 : _a.publisher) && ((_b = user.impactConnection) === null || _b === void 0 ? void 0 : _b.user)) {
|
|
58
55
|
// Initialise with partner information
|
|
59
56
|
setUserFormContext({
|
|
60
57
|
email,
|
|
@@ -79,16 +76,16 @@ export function useUserInfoForm(props) {
|
|
|
79
76
|
// Initialise with user information
|
|
80
77
|
setUserFormContext({
|
|
81
78
|
email,
|
|
82
|
-
firstName: ((
|
|
83
|
-
lastName: ((
|
|
79
|
+
firstName: ((_d = (_c = user.impactConnection) === null || _c === void 0 ? void 0 : _c.user) === null || _d === void 0 ? void 0 : _d.firstName) || user.firstName,
|
|
80
|
+
lastName: ((_f = (_e = user.impactConnection) === null || _e === void 0 ? void 0 : _e.user) === null || _f === void 0 ? void 0 : _f.lastName) || user.lastName,
|
|
84
81
|
countryCode: user.countryCode || "US",
|
|
85
|
-
currency: (
|
|
86
|
-
phoneNumberCountryCode: ((
|
|
87
|
-
phoneNumber: (
|
|
88
|
-
address: (
|
|
89
|
-
city: (
|
|
90
|
-
state: (
|
|
91
|
-
postalCode: (
|
|
82
|
+
currency: (_g = user.customFields) === null || _g === void 0 ? void 0 : _g.currency,
|
|
83
|
+
phoneNumberCountryCode: ((_h = user.customFields) === null || _h === void 0 ? void 0 : _h.phoneNumberCountryCode) || "US",
|
|
84
|
+
phoneNumber: (_j = user.customFields) === null || _j === void 0 ? void 0 : _j.phoneNumber,
|
|
85
|
+
address: (_k = user.customFields) === null || _k === void 0 ? void 0 : _k.address,
|
|
86
|
+
city: (_l = user.customFields) === null || _l === void 0 ? void 0 : _l.city,
|
|
87
|
+
state: (_m = user.customFields) === null || _m === void 0 ? void 0 : _m.state,
|
|
88
|
+
postalCode: (_o = user.customFields) === null || _o === void 0 ? void 0 : _o.postalCode,
|
|
92
89
|
});
|
|
93
90
|
}
|
|
94
91
|
}, [data, step, userFormContext]);
|
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
import { parsePhoneNumberFromString } from "libphonenumber-js";
|
|
2
2
|
import { intl } from "../../global/global";
|
|
3
|
+
/** Managed identity email once verified, else the profile email. */
|
|
4
|
+
export function getParticipantEmail(user) {
|
|
5
|
+
var _a;
|
|
6
|
+
return ((_a = user === null || user === void 0 ? void 0 : user.managedIdentity) === null || _a === void 0 ? void 0 : _a.emailVerified)
|
|
7
|
+
? user.managedIdentity.email
|
|
8
|
+
: user === null || user === void 0 ? void 0 : user.email;
|
|
9
|
+
}
|
|
3
10
|
/**
|
|
4
11
|
* Normalize user input to the domestic form Impact stores: digits only,
|
|
5
12
|
* with the country dial code and trunk-zero prefix removed.
|
|
@@ -9,9 +9,9 @@ import { F as FORM_STEPS, T as TAX_CONTEXT_NAMESPACE, a as TAX_FORM_CONTEXT_NAME
|
|
|
9
9
|
import { j as jsonpointer } from './jsonpointer-c5423376.js';
|
|
10
10
|
import { c as VERIFICATION_EVENT_KEY } from './keys-1054056a.js';
|
|
11
11
|
import { T as TAX_FORM_UPDATED_EVENT_KEY, p as parseStates } from './parseStates-0c27f2de.js';
|
|
12
|
-
import { t as taxTypeToName,
|
|
13
|
-
import { O as OtherRegionSlotView, I as InvoiceTableView, v as vatLabels, T as TaxAndCashDashboardView, U as UserInfoFormView } from './sqm-user-info-form-view-
|
|
14
|
-
import { a as useIndirectTaxForm, b as useVeriffApp, g as getStatus, V as VERIFF_COMPLETE_EVENT_KEY, c as CONNECT_PARTNER, C as COMPLETE_PARTNER } from './useIndirectTaxForm-
|
|
12
|
+
import { d as getParticipantEmail, t as taxTypeToName, e as validTaxDocument, I as INDIRECT_TAX_SPAIN_REGIONS, a as INDIRECT_TAX_PROVINCES, c as formatPayoutThreshold, b as isBalanceUnderPayoutThreshold, o as objectIsFull, h as toDomesticNumber, A as ADDRESS_REGIONS } from './subregions-ec4682c7.js';
|
|
13
|
+
import { O as OtherRegionSlotView, I as InvoiceTableView, v as vatLabels, T as TaxAndCashDashboardView, U as UserInfoFormView } from './sqm-user-info-form-view-0d95c791.js';
|
|
14
|
+
import { a as useIndirectTaxForm, b as useVeriffApp, g as getStatus, V as VERIFF_COMPLETE_EVENT_KEY, c as CONNECT_PARTNER, C as COMPLETE_PARTNER } from './useIndirectTaxForm-09809605.js';
|
|
15
15
|
import { G as GenericTableView } from './GenericTableView-4f7ac63d.js';
|
|
16
16
|
import { u as useRerenderListener, a as useRequestRerender } from './re-render-fa467bec.js';
|
|
17
17
|
import { g as generateUserError, d as dropZoneColumnIndexes } from './useReferralTable-91d9edb4.js';
|
|
@@ -798,12 +798,12 @@ const BankingInfoFormView = (props) => {
|
|
|
798
798
|
h("p", { part: "alert-title" }, intl.formatMessage({
|
|
799
799
|
id: "isPartnerAlertHeader",
|
|
800
800
|
defaultMessage: text.isPartnerAlertHeader,
|
|
801
|
-
}, { emailAddress: states.
|
|
801
|
+
}, { emailAddress: states.partnerEmail || "" })),
|
|
802
802
|
h("p", null, intl.formatMessage({
|
|
803
803
|
id: "isPartnerAlertDescription",
|
|
804
804
|
defaultMessage: text.isPartnerAlertDescription,
|
|
805
805
|
}, {
|
|
806
|
-
emailAddress: states.
|
|
806
|
+
emailAddress: states.partnerEmail || "",
|
|
807
807
|
supportLink: (h("a", { target: "_blank", href: `mailto:advocate-payment-support@impact.com` }, text.supportLink)),
|
|
808
808
|
})))),
|
|
809
809
|
h("div", null,
|
|
@@ -1305,6 +1305,7 @@ function useBankingInfoForm(props) {
|
|
|
1305
1305
|
bankCountry: formState.bankCountry,
|
|
1306
1306
|
countrySearch,
|
|
1307
1307
|
email: (_j = userData === null || userData === void 0 ? void 0 : userData.user) === null || _j === void 0 ? void 0 : _j.email,
|
|
1308
|
+
partnerEmail: getParticipantEmail(userData === null || userData === void 0 ? void 0 : userData.user),
|
|
1308
1309
|
showModal,
|
|
1309
1310
|
},
|
|
1310
1311
|
refs: {
|
|
@@ -3614,18 +3615,15 @@ function useUserInfoForm(props) {
|
|
|
3614
3615
|
window.location.hash = "";
|
|
3615
3616
|
}, []);
|
|
3616
3617
|
useEffect(() => {
|
|
3617
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o
|
|
3618
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o;
|
|
3618
3619
|
const user = data === null || data === void 0 ? void 0 : data.user;
|
|
3619
3620
|
if (!user || step !== "/1")
|
|
3620
3621
|
return;
|
|
3621
3622
|
// If form already filled out, skip initialising it
|
|
3622
3623
|
if (objectIsFull(userFormContext))
|
|
3623
3624
|
return;
|
|
3624
|
-
|
|
3625
|
-
|
|
3626
|
-
? user.managedIdentity.email
|
|
3627
|
-
: user.email;
|
|
3628
|
-
if (((_b = user.impactConnection) === null || _b === void 0 ? void 0 : _b.publisher) && ((_c = user.impactConnection) === null || _c === void 0 ? void 0 : _c.user)) {
|
|
3625
|
+
const email = getParticipantEmail(user);
|
|
3626
|
+
if (((_a = user.impactConnection) === null || _a === void 0 ? void 0 : _a.publisher) && ((_b = user.impactConnection) === null || _b === void 0 ? void 0 : _b.user)) {
|
|
3629
3627
|
// Initialise with partner information
|
|
3630
3628
|
setUserFormContext({
|
|
3631
3629
|
email,
|
|
@@ -3650,16 +3648,16 @@ function useUserInfoForm(props) {
|
|
|
3650
3648
|
// Initialise with user information
|
|
3651
3649
|
setUserFormContext({
|
|
3652
3650
|
email,
|
|
3653
|
-
firstName: ((
|
|
3654
|
-
lastName: ((
|
|
3651
|
+
firstName: ((_d = (_c = user.impactConnection) === null || _c === void 0 ? void 0 : _c.user) === null || _d === void 0 ? void 0 : _d.firstName) || user.firstName,
|
|
3652
|
+
lastName: ((_f = (_e = user.impactConnection) === null || _e === void 0 ? void 0 : _e.user) === null || _f === void 0 ? void 0 : _f.lastName) || user.lastName,
|
|
3655
3653
|
countryCode: user.countryCode || "US",
|
|
3656
|
-
currency: (
|
|
3657
|
-
phoneNumberCountryCode: ((
|
|
3658
|
-
phoneNumber: (
|
|
3659
|
-
address: (
|
|
3660
|
-
city: (
|
|
3661
|
-
state: (
|
|
3662
|
-
postalCode: (
|
|
3654
|
+
currency: (_g = user.customFields) === null || _g === void 0 ? void 0 : _g.currency,
|
|
3655
|
+
phoneNumberCountryCode: ((_h = user.customFields) === null || _h === void 0 ? void 0 : _h.phoneNumberCountryCode) || "US",
|
|
3656
|
+
phoneNumber: (_j = user.customFields) === null || _j === void 0 ? void 0 : _j.phoneNumber,
|
|
3657
|
+
address: (_k = user.customFields) === null || _k === void 0 ? void 0 : _k.address,
|
|
3658
|
+
city: (_l = user.customFields) === null || _l === void 0 ? void 0 : _l.city,
|
|
3659
|
+
state: (_m = user.customFields) === null || _m === void 0 ? void 0 : _m.state,
|
|
3660
|
+
postalCode: (_o = user.customFields) === null || _o === void 0 ? void 0 : _o.postalCode,
|
|
3663
3661
|
});
|
|
3664
3662
|
}
|
|
3665
3663
|
}, [data, step, userFormContext]);
|
|
@@ -12,7 +12,7 @@ import { i as isEmpty } from './utilities-937c375d.js';
|
|
|
12
12
|
import { o as optimizeCloudinaryUrl } from './imageUrl-4775f17b.js';
|
|
13
13
|
import { j as jsonpointer } from './jsonpointer-c5423376.js';
|
|
14
14
|
import { A as AsYouType } from './AsYouType-cc09fa68.js';
|
|
15
|
-
import { u as usePayoutStatus, C as COMPLETE_PARTNER } from './useIndirectTaxForm-
|
|
15
|
+
import { u as usePayoutStatus, C as COMPLETE_PARTNER } from './useIndirectTaxForm-09809605.js';
|
|
16
16
|
import { p as parseStates } from './parseStates-0c27f2de.js';
|
|
17
17
|
import { P as PortalRegistrationFormView } from './sqm-portal-registration-form-view-113e1969.js';
|
|
18
18
|
import { u as usePortalRegistrationForm } from './usePortalRegistrationForm-751b1f36.js';
|
|
@@ -22,7 +22,7 @@ import { E as EmailRegistrationView } from './email-registration-view-7a63a912.j
|
|
|
22
22
|
import { p as pathToRegexp } from './index-e6f5153e.js';
|
|
23
23
|
import { C as CopyTextView } from './copy-text-view-e1c3f2cd.js';
|
|
24
24
|
import { E as ErrorView } from './ErrorView-19af8137.js';
|
|
25
|
-
import { g as getCountryObj, i as isValidI18nPhoneNumber, L as LoadingView } from './subregions-
|
|
25
|
+
import { g as getCountryObj, i as isValidI18nPhoneNumber, L as LoadingView } from './subregions-ec4682c7.js';
|
|
26
26
|
import { T as TAX_CONTEXT_NAMESPACE, a as TAX_FORM_CONTEXT_NAMESPACE, U as USER_FORM_CONTEXT_NAMESPACE, C as CURRENCIES_NAMESPACE, b as COUNTRIES_NAMESPACE, S as SORTED_COUNTRIES_NAMESPACE, c as USER_QUERY_NAMESPACE, G as GET_USER$2, d as COUNTRIES_QUERY_NAMESPACE, e as GET_COUNTRIES, f as FINANCE_NETWORK_SETTINGS_NAMESPACE, g as GET_FINANCE_NETWORK_SETTINGS, h as CURRENCIES_QUERY_NAMESPACE, i as GET_CURRENCIES } from './data-91756a72.js';
|
|
27
27
|
import { a as useRequestRerender } from './re-render-fa467bec.js';
|
|
28
28
|
import { l as luxon } from './luxon-40b943cb.js';
|
|
@@ -11,7 +11,7 @@ import { K as inspect, L as GraphQLError, M as devAssert, N as Kind, O as invari
|
|
|
11
11
|
import { b as PortalRegisterView, P as PortalForgotPasswordView, a as PortalLoginView, c as PortalVerifyEmailView } from './sqm-portal-verify-email-view-0c421bd0.js';
|
|
12
12
|
import { C as CloseButtonView } from './sqm-close-button-view-1deb12b1.js';
|
|
13
13
|
import { G as GenericTableView } from './GenericTableView-4f7ac63d.js';
|
|
14
|
-
import { I as InvoiceTableView, T as TaxAndCashDashboardView$1, O as OtherRegionSlotView, U as UserInfoFormView$1 } from './sqm-user-info-form-view-
|
|
14
|
+
import { I as InvoiceTableView, T as TaxAndCashDashboardView$1, O as OtherRegionSlotView, U as UserInfoFormView$1 } from './sqm-user-info-form-view-0d95c791.js';
|
|
15
15
|
import { L as LeaderboardRankView } from './sqm-leaderboard-rank-view-cd52cc80.js';
|
|
16
16
|
import { L as LogoutCurrentUserView } from './sqm-logout-current-user-view-9bda187a.js';
|
|
17
17
|
import { P as PortalEmailVerificationView } from './sqm-portal-email-verification-view-1a2d6650.js';
|
|
@@ -19,7 +19,7 @@ import { P as PortalRegistrationFormView } from './sqm-portal-registration-form-
|
|
|
19
19
|
import { P as PortalResetPasswordView } from './sqm-portal-reset-password-view-f9fb6355.js';
|
|
20
20
|
import { Q as QrCodeView } from './sqm-qr-code-view-f8de4606.js';
|
|
21
21
|
import { l as luxon } from './luxon-40b943cb.js';
|
|
22
|
-
import { t as taxTypeToName, L as LoadingView, I as INDIRECT_TAX_SPAIN_REGIONS, a as INDIRECT_TAX_PROVINCES } from './subregions-
|
|
22
|
+
import { t as taxTypeToName, L as LoadingView, I as INDIRECT_TAX_SPAIN_REGIONS, a as INDIRECT_TAX_PROVINCES } from './subregions-ec4682c7.js';
|
|
23
23
|
import { E as EmailRegistrationView } from './email-registration-view-7a63a912.js';
|
|
24
24
|
import { L as LeadInputFieldView } from './sqm-lead-input-field-view-f9be9365.js';
|
|
25
25
|
import { L as LeadCheckboxFieldView } from './sqm-lead-checkbox-field-view-84103484.js';
|
|
@@ -36855,6 +36855,7 @@ const stepFourProps = {
|
|
|
36855
36855
|
thresholds: [],
|
|
36856
36856
|
loadingError: false,
|
|
36857
36857
|
email: "test@example.com",
|
|
36858
|
+
partnerEmail: "test@example.com",
|
|
36858
36859
|
formState: {
|
|
36859
36860
|
paymentMethodChecked: "toBankAccount",
|
|
36860
36861
|
},
|
package/dist/esm/{sqm-user-info-form-view-d35324ba.js → sqm-user-info-form-view-0d95c791.js}
RENAMED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { h } from './index-7a8b0c0b.js';
|
|
2
2
|
import { c as createStyleSheet } from './JSS-e97b34f4.js';
|
|
3
3
|
import { i as intl } from './global-11396707.js';
|
|
4
|
-
import { f as formatErrorMessage, a as INDIRECT_TAX_PROVINCES, L as LoadingView, i as isValidI18nPhoneNumber, v as validateBillingField } from './subregions-
|
|
4
|
+
import { f as formatErrorMessage, a as INDIRECT_TAX_PROVINCES, L as LoadingView, i as isValidI18nPhoneNumber, v as validateBillingField } from './subregions-ec4682c7.js';
|
|
5
5
|
import { F as FORM_STEPS } from './data-91756a72.js';
|
|
6
6
|
import { A as AsYouType } from './AsYouType-cc09fa68.js';
|
|
7
7
|
|
|
@@ -898,6 +898,13 @@ function parsePhoneNumber() {
|
|
|
898
898
|
return withMetadataArgument(parsePhoneNumber$1, arguments)
|
|
899
899
|
}
|
|
900
900
|
|
|
901
|
+
/** Managed identity email once verified, else the profile email. */
|
|
902
|
+
function getParticipantEmail(user) {
|
|
903
|
+
var _a;
|
|
904
|
+
return ((_a = user === null || user === void 0 ? void 0 : user.managedIdentity) === null || _a === void 0 ? void 0 : _a.emailVerified)
|
|
905
|
+
? user.managedIdentity.email
|
|
906
|
+
: user === null || user === void 0 ? void 0 : user.email;
|
|
907
|
+
}
|
|
901
908
|
/**
|
|
902
909
|
* Normalize user input to the domestic form Impact stores: digits only,
|
|
903
910
|
* with the country dial code and trunk-zero prefix removed.
|
|
@@ -1449,4 +1456,4 @@ const ADDRESS_REGIONS = {
|
|
|
1449
1456
|
},
|
|
1450
1457
|
};
|
|
1451
1458
|
|
|
1452
|
-
export { ADDRESS_REGIONS as A, INDIRECT_TAX_SPAIN_REGIONS as I, LoadingView as L, INDIRECT_TAX_PROVINCES as a, isBalanceUnderPayoutThreshold as b, formatPayoutThreshold as c,
|
|
1459
|
+
export { ADDRESS_REGIONS as A, INDIRECT_TAX_SPAIN_REGIONS as I, LoadingView as L, INDIRECT_TAX_PROVINCES as a, isBalanceUnderPayoutThreshold as b, formatPayoutThreshold as c, getParticipantEmail as d, validTaxDocument as e, formatErrorMessage as f, getCountryObj as g, toDomesticNumber as h, isValidI18nPhoneNumber as i, objectIsFull as o, taxTypeToName as t, validateBillingField as v };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { d as dist, b as useUserIdentity, f as useMutation, g as getEnvironmentSDK, e as useQuery, v as useLocale, u as useParentValue, ac as useParent, ad as useParentQueryValue } from './index-ebb35768.js';
|
|
2
2
|
import { k as useState, j as useEffect, m as useRef, u as useMemo } from './dom-context-hooks.module-f88a3e54.js';
|
|
3
3
|
import { T as TAX_FORM_UPDATED_EVENT_KEY } from './parseStates-0c27f2de.js';
|
|
4
|
-
import { b as isBalanceUnderPayoutThreshold, c as formatPayoutThreshold, I as INDIRECT_TAX_SPAIN_REGIONS, a as INDIRECT_TAX_PROVINCES, g as getCountryObj,
|
|
4
|
+
import { b as isBalanceUnderPayoutThreshold, c as formatPayoutThreshold, d as getParticipantEmail, I as INDIRECT_TAX_SPAIN_REGIONS, a as INDIRECT_TAX_PROVINCES, g as getCountryObj, e as validTaxDocument } from './subregions-ec4682c7.js';
|
|
5
5
|
import { j as jsonpointer } from './jsonpointer-c5423376.js';
|
|
6
6
|
import { a as TAX_FORM_CONTEXT_NAMESPACE, T as TAX_CONTEXT_NAMESPACE, U as USER_FORM_CONTEXT_NAMESPACE, c as USER_QUERY_NAMESPACE, d as COUNTRIES_QUERY_NAMESPACE } from './data-91756a72.js';
|
|
7
7
|
|
|
@@ -1179,7 +1179,7 @@ function getOption(countries, countryCode) {
|
|
|
1179
1179
|
}
|
|
1180
1180
|
}
|
|
1181
1181
|
function useIndirectTaxForm(props) {
|
|
1182
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j
|
|
1182
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
1183
1183
|
const user = useUserIdentity();
|
|
1184
1184
|
const locale = useLocale();
|
|
1185
1185
|
const formRef = useRef(null);
|
|
@@ -1370,7 +1370,7 @@ function useIndirectTaxForm(props) {
|
|
|
1370
1370
|
isPartner: !!((_e = (_d = userData === null || userData === void 0 ? void 0 : userData.user) === null || _d === void 0 ? void 0 : _d.impactConnection) === null || _e === void 0 ? void 0 : _e.publisher),
|
|
1371
1371
|
isPartnerLegacy: !!((_g = (_f = userData === null || userData === void 0 ? void 0 : userData.user) === null || _f === void 0 ? void 0 : _f.impactConnection) === null || _g === void 0 ? void 0 : _g.publisher) &&
|
|
1372
1372
|
((_j = (_h = userData === null || userData === void 0 ? void 0 : userData.user) === null || _h === void 0 ? void 0 : _h.impactConnection) === null || _j === void 0 ? void 0 : _j.connectionStatus) !== "STARTED",
|
|
1373
|
-
email: (userForm === null || userForm === void 0 ? void 0 : userForm.email) || (
|
|
1373
|
+
email: (userForm === null || userForm === void 0 ? void 0 : userForm.email) || getParticipantEmail(userData === null || userData === void 0 ? void 0 : userData.user),
|
|
1374
1374
|
loadingError: !!(userError === null || userError === void 0 ? void 0 : userError.message),
|
|
1375
1375
|
formState: {
|
|
1376
1376
|
checked: option,
|