@saasquatch/mint-components 1.15.4 → 1.15.5-2
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-e9dc77e3.js → ShadowViewAddon-28865623.js} +2 -2
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/mint-components.cjs.js +1 -1
- package/dist/cjs/sqm-banking-info-form_17.cjs.entry.js +377 -234
- package/dist/cjs/{sqm-base-registration-form-view-66f99821.js → sqm-base-registration-form-view-8029d30e.js} +4 -9
- package/dist/cjs/sqm-big-stat_43.cjs.entry.js +143 -10
- package/dist/cjs/{sqm-invoice-table-view-5c74607f.js → sqm-invoice-table-view-3f60fba9.js} +1 -0
- package/dist/cjs/sqm-portal-google-registration-form.cjs.entry.js +19 -28
- package/dist/cjs/sqm-stencilbook.cjs.entry.js +5 -8
- package/dist/cjs/{usePayoutStatus-733ef29a.js → usePayoutStatus-fc4e609e.js} +167 -2
- package/dist/collection/components/sqm-base-registration/BaseRegistrationForm.stories.js +2 -2
- package/dist/collection/components/sqm-base-registration/sqm-base-registration-form-view.js +4 -9
- package/dist/collection/components/sqm-checkbox-field/sqm-checkbox-field.js +1 -1
- package/dist/collection/components/sqm-dropdown-field/sqm-dropdown-field.js +1 -1
- package/dist/collection/components/sqm-input-field/sqm-input-field.js +1 -1
- package/dist/collection/components/sqm-marketing-emails-checkbox/sqm-marketing-emails-checkbox.js +1 -1
- package/dist/collection/components/sqm-name-fields/NameFields.stories.js +0 -2
- package/dist/collection/components/sqm-name-fields/sqm-name-fields-view.js +3 -3
- package/dist/collection/components/sqm-name-fields/sqm-name-fields.js +1 -31
- package/dist/collection/components/sqm-name-fields/useNameFields.js +0 -1
- package/dist/collection/components/sqm-password-field/sqm-password-field.js +2 -2
- package/dist/collection/components/sqm-portal-google-registration-form/PortalGoogleRegistrationForm.stories.js +0 -1
- package/dist/collection/components/sqm-portal-google-registration-form/sqm-portal-google-registration-form.js +5 -7
- package/dist/collection/components/sqm-portal-google-registration-form/usePortalGoogleRegistrationForm.js +15 -22
- 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 +47 -40
- package/dist/collection/components/tax-and-cash/sqm-payout-status-alert/sqm-payout-status-alert-view.js +87 -1
- package/dist/collection/components/tax-and-cash/sqm-payout-status-alert/sqm-payout-status-alert.js +327 -0
- package/dist/collection/components/tax-and-cash/sqm-payout-status-alert/usePayoutStatus.js +27 -3
- package/dist/collection/components/tax-and-cash/sqm-tax-and-cash/sqm-tax-and-cash.js +300 -0
- package/dist/collection/components/tax-and-cash/sqm-tax-and-cash-dashboard/sqm-tax-and-cash-dashboard-view.js +85 -1
- 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 +90 -9
- package/dist/esm/{ShadowViewAddon-e0d5f1c9.js → ShadowViewAddon-f2176779.js} +2 -2
- package/dist/esm/loader.js +1 -1
- package/dist/esm/mint-components.js +1 -1
- package/dist/esm/sqm-banking-info-form_17.entry.js +331 -188
- package/dist/esm/{sqm-base-registration-form-view-d81e316a.js → sqm-base-registration-form-view-dafba287.js} +4 -9
- package/dist/esm/sqm-big-stat_43.entry.js +143 -10
- package/dist/esm/{sqm-invoice-table-view-3491dd80.js → sqm-invoice-table-view-01453fa3.js} +1 -0
- package/dist/esm/sqm-portal-google-registration-form.entry.js +19 -28
- package/dist/esm/sqm-stencilbook.entry.js +5 -8
- package/dist/esm/{usePayoutStatus-b89e8c49.js → usePayoutStatus-b4bdbfa7.js} +154 -4
- package/dist/esm-es5/{ShadowViewAddon-e0d5f1c9.js → ShadowViewAddon-f2176779.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_17.entry.js +1 -1
- package/dist/esm-es5/sqm-base-registration-form-view-dafba287.js +1 -0
- package/dist/esm-es5/sqm-big-stat_43.entry.js +1 -1
- package/dist/esm-es5/sqm-invoice-table-view-01453fa3.js +1 -0
- package/dist/esm-es5/sqm-portal-google-registration-form.entry.js +1 -1
- package/dist/esm-es5/sqm-stencilbook.entry.js +1 -1
- package/dist/esm-es5/usePayoutStatus-b4bdbfa7.js +6 -0
- package/dist/mint-components/mint-components.esm.js +1 -1
- package/dist/mint-components/{p-3ac8613d.system.entry.js → p-02832118.system.entry.js} +1 -1
- package/dist/mint-components/{p-d15b642f.system.js → p-0d939b73.system.js} +1 -1
- package/dist/mint-components/p-2651ef99.system.js +1 -0
- package/dist/mint-components/p-35701119.js +1 -0
- package/dist/mint-components/p-37996351.system.js +1 -1
- package/dist/mint-components/{p-1edebab1.entry.js → p-4a731079.entry.js} +2 -2
- package/dist/mint-components/p-59fe6066.js +1 -0
- package/dist/mint-components/p-86a5db85.system.js +1 -0
- package/dist/mint-components/p-93db61eb.system.js +6 -0
- package/dist/mint-components/p-9c4f4cd6.entry.js +1 -0
- package/dist/mint-components/p-a3647f70.system.entry.js +1 -0
- package/dist/mint-components/p-a4f494ee.system.entry.js +1 -0
- package/dist/mint-components/p-ba14b5f7.system.entry.js +1 -0
- package/dist/mint-components/{p-3b6dccec.js → p-c1b074b6.js} +1 -1
- package/dist/mint-components/p-d0b404d5.entry.js +109 -0
- package/dist/mint-components/p-e3deed72.entry.js +273 -0
- package/dist/mint-components/p-fde41ad1.js +157 -0
- package/dist/types/components/sqm-base-registration/sqm-base-registration-form-view.d.ts +1 -2
- package/dist/types/components/sqm-checkbox-field/sqm-checkbox-field.d.ts +1 -1
- package/dist/types/components/sqm-dropdown-field/sqm-dropdown-field.d.ts +1 -1
- package/dist/types/components/sqm-input-field/sqm-input-field.d.ts +1 -1
- package/dist/types/components/sqm-marketing-emails-checkbox/sqm-marketing-emails-checkbox.d.ts +1 -1
- package/dist/types/components/sqm-name-fields/sqm-name-fields-view.d.ts +0 -1
- package/dist/types/components/sqm-name-fields/sqm-name-fields.d.ts +0 -5
- package/dist/types/components/sqm-name-fields/useNameFields.d.ts +0 -1
- package/dist/types/components/sqm-password-field/sqm-password-field.d.ts +1 -1
- package/dist/types/components/sqm-portal-google-registration-form/usePortalGoogleRegistrationForm.d.ts +1 -2
- package/dist/types/components/tax-and-cash/sqm-indirect-tax-form/useIndirectTaxForm.d.ts +31 -0
- package/dist/types/components/tax-and-cash/sqm-payout-status-alert/sqm-payout-status-alert-view.d.ts +14 -0
- package/dist/types/components/tax-and-cash/sqm-payout-status-alert/sqm-payout-status-alert.d.ts +53 -0
- package/dist/types/components/tax-and-cash/sqm-payout-status-alert/usePayoutStatus.d.ts +2 -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 +296 -10
- 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/sqm-base-registration-form-view-d81e316a.js +0 -1
- package/dist/esm-es5/sqm-invoice-table-view-3491dd80.js +0 -1
- package/dist/esm-es5/usePayoutStatus-b89e8c49.js +0 -6
- package/dist/mint-components/p-021b0540.js +0 -46
- package/dist/mint-components/p-3d73cd84.entry.js +0 -220
- package/dist/mint-components/p-49932f12.system.js +0 -1
- package/dist/mint-components/p-7176a952.entry.js +0 -1
- package/dist/mint-components/p-8d0393d9.system.entry.js +0 -1
- package/dist/mint-components/p-9308221f.js +0 -1
- package/dist/mint-components/p-959c42b2.system.entry.js +0 -1
- package/dist/mint-components/p-a6494752.system.js +0 -6
- package/dist/mint-components/p-bc021969.system.js +0 -1
- package/dist/mint-components/p-c78e6066.entry.js +0 -273
- package/dist/mint-components/p-e64e8354.system.entry.js +0 -1
- package/dist/mint-components/p-e8e48982.js +0 -1
- package/dist/types/global/android.d.ts +0 -7
- package/dist/types/global/demo.d.ts +0 -2
- package/dist/types/stories/features.d.ts +0 -4
- package/dist/types/stories/templates.d.ts +0 -4
|
@@ -38,7 +38,6 @@ sqm-portal-register {
|
|
|
38
38
|
const sheet = createStyleSheet(style);
|
|
39
39
|
const styleString = sheet.toString();
|
|
40
40
|
function BaseRegistrationFormView(props) {
|
|
41
|
-
var _a, _b;
|
|
42
41
|
const { states, content, callbacks } = props;
|
|
43
42
|
return (h("div", { class: sheet.classes.Wrapper },
|
|
44
43
|
h("style", { type: "text/css" },
|
|
@@ -46,8 +45,10 @@ function BaseRegistrationFormView(props) {
|
|
|
46
45
|
styleString),
|
|
47
46
|
h(TextSpanView, { type: "h3" }, content.pageLabel),
|
|
48
47
|
h("sl-form", { class: sheet.classes.Column, "onSl-submit": callbacks.handleEmailSubmit, novalidate: true },
|
|
48
|
+
states.error && (h("sqm-form-message", { type: "error", exportparts: "erroralert-icon" },
|
|
49
|
+
h("div", { part: "erroralert-text" }, props.states.error))),
|
|
49
50
|
content.formData,
|
|
50
|
-
h("sl-input",
|
|
51
|
+
h("sl-input", { exportparts: "label: input-label, base: input-base", type: "email", name: "/email", label: content.emailLabel || "Email", required: true, validationError: ({ value }) => {
|
|
51
52
|
if (!value) {
|
|
52
53
|
return content.requiredFieldErrorMessage;
|
|
53
54
|
}
|
|
@@ -55,13 +56,7 @@ function BaseRegistrationFormView(props) {
|
|
|
55
56
|
if (!value.includes("@")) {
|
|
56
57
|
return content.invalidEmailErrorMessage;
|
|
57
58
|
}
|
|
58
|
-
} },
|
|
59
|
-
class: sheet.classes.ErrorStyle,
|
|
60
|
-
helpText: ((_b = states === null || states === void 0 ? void 0 : states.validationErrors) === null || _b === void 0 ? void 0 : _b.email) ||
|
|
61
|
-
content.requiredFieldErrorMessage,
|
|
62
|
-
}
|
|
63
|
-
: []))),
|
|
64
|
-
content.terms,
|
|
59
|
+
} }),
|
|
65
60
|
h("div", { class: sheet.classes.ButtonsContainer },
|
|
66
61
|
h("sl-button", { submit: true, exportparts: "base: primarybutton-base", type: "primary", style: { margin: "0" } }, content.submitLabel || "Register"),
|
|
67
62
|
h("sl-menu-divider", { style: { margin: "0" } }),
|
|
@@ -20,9 +20,9 @@ import { P as PortalLoginView } from './sqm-portal-login-view-7e49609a.js';
|
|
|
20
20
|
import { u as usePortalLogin } from './usePortalLogin-ef647a50.js';
|
|
21
21
|
import { A as AsYouType } from './AsYouType-46f67d0d.js';
|
|
22
22
|
import { i as isEmpty } from './utilities-5b0ca040.js';
|
|
23
|
-
import { b as useDemoBigStat, W as useBigStat, B as BigStatView, U as autoColorScaleCss, J as CardFeedView, i as CheckboxFieldView, K as CouponCodeView, D as DropdownFieldView, E as EditProfileView, H as HeroView, I as InputFieldView, Q as LeadDropdownFieldView, O as LeadFormView, X as withShadowView, L as LeaderboardView, N as NameFieldsView, C as ChangeMarktingView, d as PortalChangePasswordView, h as PortalFooterView, P as PortalFrameView, e as PortalRegisterView, R as ReferralIframeView, Y as demoRewardExchange, j as RewardExchangeView, a as useShareButton, S as ShareButtonView, u as useShareLink, c as StatContainerView, T as TaskCardView } from './ShadowViewAddon-
|
|
23
|
+
import { b as useDemoBigStat, W as useBigStat, B as BigStatView, U as autoColorScaleCss, J as CardFeedView, i as CheckboxFieldView, K as CouponCodeView, D as DropdownFieldView, E as EditProfileView, H as HeroView, I as InputFieldView, Q as LeadDropdownFieldView, O as LeadFormView, X as withShadowView, L as LeaderboardView, N as NameFieldsView, C as ChangeMarktingView, d as PortalChangePasswordView, h as PortalFooterView, P as PortalFrameView, e as PortalRegisterView, R as ReferralIframeView, Y as demoRewardExchange, j as RewardExchangeView, a as useShareButton, S as ShareButtonView, u as useShareLink, c as StatContainerView, T as TaskCardView } from './ShadowViewAddon-f2176779.js';
|
|
24
24
|
import './sqm-portal-container-view-1683ae32.js';
|
|
25
|
-
import { u as usePayoutStatus } from './usePayoutStatus-
|
|
25
|
+
import { u as usePayoutStatus } from './usePayoutStatus-b4bdbfa7.js';
|
|
26
26
|
|
|
27
27
|
const BigStat = class {
|
|
28
28
|
constructor(hostRef) {
|
|
@@ -2025,7 +2025,6 @@ function useNameFields(props) {
|
|
|
2025
2025
|
const registrationFormState = d(REGISTRATION_FORM_STATE_CONTEXT);
|
|
2026
2026
|
return {
|
|
2027
2027
|
states: {
|
|
2028
|
-
optional: props.optional,
|
|
2029
2028
|
registrationFormState,
|
|
2030
2029
|
content: {
|
|
2031
2030
|
lastNameLabel: props.lastNameLabel,
|
|
@@ -2047,11 +2046,6 @@ const NameFields = class {
|
|
|
2047
2046
|
* @uiName Last name label
|
|
2048
2047
|
*/
|
|
2049
2048
|
this.lastNameLabel = "Last Name";
|
|
2050
|
-
/**
|
|
2051
|
-
* @uiName Optional
|
|
2052
|
-
* @uiWidget
|
|
2053
|
-
*/
|
|
2054
|
-
this.optional = false;
|
|
2055
2049
|
h(this);
|
|
2056
2050
|
}
|
|
2057
2051
|
disconnectedCallback() { }
|
|
@@ -2063,7 +2057,6 @@ const NameFields = class {
|
|
|
2063
2057
|
function useNameFieldsDemo(props) {
|
|
2064
2058
|
return cjs({
|
|
2065
2059
|
states: {
|
|
2066
|
-
optional: props.optional,
|
|
2067
2060
|
validationErrors: [],
|
|
2068
2061
|
content: {
|
|
2069
2062
|
firstNameLabel: props.firstNameLabel,
|
|
@@ -2397,7 +2390,7 @@ function PayoutStatusAlertView(props) {
|
|
|
2397
2390
|
class: sheet$2.classes.WarningAlertContainer,
|
|
2398
2391
|
};
|
|
2399
2392
|
}
|
|
2400
|
-
case "
|
|
2393
|
+
case "NEW_PAYEE_REVIEW":
|
|
2401
2394
|
return {
|
|
2402
2395
|
header: text.accountReviewHeader,
|
|
2403
2396
|
description: intl.formatMessage({
|
|
@@ -2411,6 +2404,90 @@ function PayoutStatusAlertView(props) {
|
|
|
2411
2404
|
icon: "exclamation-triangle",
|
|
2412
2405
|
class: sheet$2.classes.WarningAlertContainer,
|
|
2413
2406
|
};
|
|
2407
|
+
case "PAYMENT_HOLD_ON_CHANGE":
|
|
2408
|
+
return {
|
|
2409
|
+
header: text.paymentHoldOnChangeHeader,
|
|
2410
|
+
description: intl.formatMessage({
|
|
2411
|
+
id: "accountReviewDescription",
|
|
2412
|
+
defaultMessage: text.paymentHoldOnChangeDescription,
|
|
2413
|
+
}, {
|
|
2414
|
+
supportLink: (h$1("a", { target: "_blank", href: `mailto:advocate-support@impact.com` }, text.supportLink)),
|
|
2415
|
+
}),
|
|
2416
|
+
buttonText: null,
|
|
2417
|
+
alertType: "warning",
|
|
2418
|
+
icon: "exclamation-triangle",
|
|
2419
|
+
class: sheet$2.classes.WarningAlertContainer,
|
|
2420
|
+
};
|
|
2421
|
+
case "BENEFICIARY_NAME_INVALID":
|
|
2422
|
+
return {
|
|
2423
|
+
header: text.beneficiaryNameInvalidHeader,
|
|
2424
|
+
description: intl.formatMessage({
|
|
2425
|
+
id: "accountReviewDescription",
|
|
2426
|
+
defaultMessage: text.beneficiaryNameInvalidDescription,
|
|
2427
|
+
}, {
|
|
2428
|
+
supportLink: (h$1("a", { target: "_blank", href: `mailto:advocate-support@impact.com` }, text.supportLink)),
|
|
2429
|
+
}),
|
|
2430
|
+
buttonText: text.editPaymentInformationButton,
|
|
2431
|
+
alertType: "warning",
|
|
2432
|
+
icon: "exclamation-triangle",
|
|
2433
|
+
class: sheet$2.classes.WarningAlertContainer,
|
|
2434
|
+
};
|
|
2435
|
+
case "BENEFICIARY_NAME_MISMATCH":
|
|
2436
|
+
return {
|
|
2437
|
+
header: text.beneficiaryNameMismatchHeader,
|
|
2438
|
+
description: intl.formatMessage({
|
|
2439
|
+
id: "accountReviewDescription",
|
|
2440
|
+
defaultMessage: text.beneficiaryNameMismatchDescription,
|
|
2441
|
+
}, {
|
|
2442
|
+
supportLink: (h$1("a", { target: "_blank", href: `mailto:advocate-support@impact.com` }, text.supportLink)),
|
|
2443
|
+
}),
|
|
2444
|
+
buttonText: text.editPaymentInformationButton,
|
|
2445
|
+
alertType: "warning",
|
|
2446
|
+
icon: "exclamation-triangle",
|
|
2447
|
+
class: sheet$2.classes.WarningAlertContainer,
|
|
2448
|
+
};
|
|
2449
|
+
case "BANK_TAX_NAME_MISMATCH":
|
|
2450
|
+
return {
|
|
2451
|
+
header: text.bankTaxNameMismatchHeader,
|
|
2452
|
+
description: intl.formatMessage({
|
|
2453
|
+
id: "accountReviewDescription",
|
|
2454
|
+
defaultMessage: text.bankTaxNameMismatchDescription,
|
|
2455
|
+
}, {
|
|
2456
|
+
supportLink: (h$1("a", { target: "_blank", href: `mailto:advocate-support@impact.com` }, text.supportLink)),
|
|
2457
|
+
}),
|
|
2458
|
+
buttonText: text.editPaymentInformationButton,
|
|
2459
|
+
alertType: "warning",
|
|
2460
|
+
icon: "exclamation-triangle",
|
|
2461
|
+
class: sheet$2.classes.WarningAlertContainer,
|
|
2462
|
+
};
|
|
2463
|
+
case "WITHDRAWAL_SETTINGS_INVALID":
|
|
2464
|
+
return {
|
|
2465
|
+
header: text.withdrawalSettingsInvalidHeader,
|
|
2466
|
+
description: intl.formatMessage({
|
|
2467
|
+
id: "accountReviewDescription",
|
|
2468
|
+
defaultMessage: text.withdrawalSettingsInvalidDescription,
|
|
2469
|
+
}, {
|
|
2470
|
+
supportLink: (h$1("a", { target: "_blank", href: `mailto:advocate-support@impact.com` }, text.supportLink)),
|
|
2471
|
+
}),
|
|
2472
|
+
buttonText: text.editPaymentInformationButton,
|
|
2473
|
+
alertType: "warning",
|
|
2474
|
+
icon: "exclamation-triangle",
|
|
2475
|
+
class: sheet$2.classes.WarningAlertContainer,
|
|
2476
|
+
};
|
|
2477
|
+
case "PAYMENT_RETURNED":
|
|
2478
|
+
return {
|
|
2479
|
+
header: text.paymentReturnedHeader,
|
|
2480
|
+
description: intl.formatMessage({
|
|
2481
|
+
id: "accountReviewDescription",
|
|
2482
|
+
defaultMessage: text.paymentReturnedDescription,
|
|
2483
|
+
}, {
|
|
2484
|
+
supportLink: (h$1("a", { target: "_blank", href: `mailto:advocate-support@impact.com` }, text.supportLink)),
|
|
2485
|
+
}),
|
|
2486
|
+
buttonText: text.editPaymentInformationButton,
|
|
2487
|
+
alertType: "warning",
|
|
2488
|
+
icon: "exclamation-triangle",
|
|
2489
|
+
class: sheet$2.classes.WarningAlertContainer,
|
|
2490
|
+
};
|
|
2414
2491
|
case "HOLD":
|
|
2415
2492
|
return {
|
|
2416
2493
|
header: text.holdHeader,
|
|
@@ -2444,6 +2521,8 @@ function PayoutStatusAlertView(props) {
|
|
|
2444
2521
|
case "VERIFICATION:REQUIRED":
|
|
2445
2522
|
return (h$1("sl-button", { type: "default", loading: states.veriffLoading, onClick: callbacks.onClick }, text.verificationRequiredButtonText));
|
|
2446
2523
|
default:
|
|
2524
|
+
if (alertDetails.buttonText)
|
|
2525
|
+
return (h$1("sl-button", { type: "default", onClick: callbacks.onPaymentInfoClick }, alertDetails.buttonText));
|
|
2447
2526
|
return;
|
|
2448
2527
|
}
|
|
2449
2528
|
}
|
|
@@ -2470,6 +2549,11 @@ const PayoutStatusAlert = class {
|
|
|
2470
2549
|
* @uiName Info required alert header
|
|
2471
2550
|
*/
|
|
2472
2551
|
this.informationRequiredHeader = "Payout and tax information required";
|
|
2552
|
+
/**
|
|
2553
|
+
*
|
|
2554
|
+
* @uiName Edit payment info button label
|
|
2555
|
+
*/
|
|
2556
|
+
this.editPaymentInformationButton = "Edit Payout Information";
|
|
2473
2557
|
/**
|
|
2474
2558
|
* @uiName Info required alert description
|
|
2475
2559
|
*/
|
|
@@ -2522,6 +2606,54 @@ const PayoutStatusAlert = class {
|
|
|
2522
2606
|
* @uiName Account review alert description
|
|
2523
2607
|
*/
|
|
2524
2608
|
this.accountReviewDescription = "This process takes 48 hours, payouts are on hold until it's completed. You will receive an email from our referral provider, Impact.com, if any issues arise. It contains details on how to resolve this issue. If you need further assistance, please reach out to our {supportLink}.";
|
|
2609
|
+
/**
|
|
2610
|
+
* @uiName Payment on hold alert header
|
|
2611
|
+
*/
|
|
2612
|
+
this.paymentHoldOnChangeHeader = "We are reviewing your new payout settings";
|
|
2613
|
+
/**
|
|
2614
|
+
* @uiName Payment on hold alert description
|
|
2615
|
+
*/
|
|
2616
|
+
this.paymentHoldOnChangeDescription = "Your payout is temporarily on hold while we review your new payment information, this process is usually resolved within 48 hours.";
|
|
2617
|
+
/**
|
|
2618
|
+
* @uiName Beneficiary name invalid alert header
|
|
2619
|
+
*/
|
|
2620
|
+
this.beneficiaryNameInvalidHeader = "Your payment information does not match your tax form";
|
|
2621
|
+
/**
|
|
2622
|
+
* @uiName Beneficiary name invalid description
|
|
2623
|
+
*/
|
|
2624
|
+
this.beneficiaryNameInvalidDescription = "The beneficiary name in your payment information does not match what was submitted in your tax form. Please review and update your payment information or tax form so that they match exactly and do not include any invalid characters. Your payouts are on hold until this is resolved.";
|
|
2625
|
+
/**
|
|
2626
|
+
* @uiName Beneficiary name mismatch alert header
|
|
2627
|
+
*/
|
|
2628
|
+
this.beneficiaryNameMismatchHeader = "Your payment information does not match your tax form";
|
|
2629
|
+
/**
|
|
2630
|
+
* @uiName Beneficiary name mismatch alert description
|
|
2631
|
+
*/
|
|
2632
|
+
this.beneficiaryNameMismatchDescription = "The beneficiary name in your payment information does not match what was submitted in your tax form. Please review and update your payment information or tax form so that they match exactly and do not include any invalid characters. Your payouts are on hold until this is resolved.";
|
|
2633
|
+
/**
|
|
2634
|
+
* @uiName Bank name mismatch alert header
|
|
2635
|
+
*/
|
|
2636
|
+
this.bankTaxNameMismatchHeader = "Your payment information does not match your tax form";
|
|
2637
|
+
/**
|
|
2638
|
+
* @uiName Bank name mismatch alert description
|
|
2639
|
+
*/
|
|
2640
|
+
this.bankTaxNameMismatchDescription = "The bank name in your payment information does not match what was submitted in your tax form. Please review and update your payment information or tax form so that they match exactly and do not include any invalid characters. Your payouts are on hold until this is resolved.";
|
|
2641
|
+
/**
|
|
2642
|
+
* @uiName Withdrawal settings invalid alert header
|
|
2643
|
+
*/
|
|
2644
|
+
this.withdrawalSettingsInvalidHeader = "Your payment information includes invalid characters";
|
|
2645
|
+
/**
|
|
2646
|
+
* @uiName Withdrawal settings invalid alert description
|
|
2647
|
+
*/
|
|
2648
|
+
this.withdrawalSettingsInvalidDescription = "There are invalid characters in your payment information. Please review your information and make sure it is correct with no invalid characters. Your payouts are on hold until this is resolved.";
|
|
2649
|
+
/**
|
|
2650
|
+
* @uiName Payment returned alert header
|
|
2651
|
+
*/
|
|
2652
|
+
this.paymentReturnedHeader = "Payout unsuccessful";
|
|
2653
|
+
/**
|
|
2654
|
+
* @uiName Payment returned alert description
|
|
2655
|
+
*/
|
|
2656
|
+
this.paymentReturnedDescription = "Our recent payment attempt for your earnings was unsuccessful. Please review your payment information and make sure it is correct.";
|
|
2525
2657
|
/**
|
|
2526
2658
|
* @uiName W-9 payment threshold alert header
|
|
2527
2659
|
*/
|
|
@@ -2588,6 +2720,7 @@ function useDemoPayoutStatusAlert(props) {
|
|
|
2588
2720
|
callbacks: {
|
|
2589
2721
|
onTermsClick: () => { },
|
|
2590
2722
|
onClick: () => console.log("show"),
|
|
2723
|
+
onPaymentInfoClick: () => { },
|
|
2591
2724
|
},
|
|
2592
2725
|
}, props.demoData || {}, { arrayMerge: (_, a) => a });
|
|
2593
2726
|
}
|
|
@@ -7,7 +7,7 @@ import { c as createStyleSheet } from './JSS-67b5cff8.js';
|
|
|
7
7
|
import './mixins-83f90fa1.js';
|
|
8
8
|
import './sqm-text-span-view-ca32495e.js';
|
|
9
9
|
import { a as useRegistrationForm } from './useRegistrationFormState-d6f33135.js';
|
|
10
|
-
import { B as BaseRegistrationFormView } from './sqm-base-registration-form-view-
|
|
10
|
+
import { B as BaseRegistrationFormView } from './sqm-base-registration-form-view-dafba287.js';
|
|
11
11
|
import { P as PortalRegistrationFormView } from './sqm-portal-registration-form-view-3c1f6000.js';
|
|
12
12
|
import './AsYouType-46f67d0d.js';
|
|
13
13
|
import { u as usePortalRegistrationForm } from './usePortalRegistrationForm-4b35a357.js';
|
|
@@ -71,6 +71,7 @@ function jwtDecode(token, options) {
|
|
|
71
71
|
}
|
|
72
72
|
|
|
73
73
|
function usePortalGoogleRegistrationForm(props) {
|
|
74
|
+
const [emailValidationError, setEmailValidationError] = useState(null);
|
|
74
75
|
const [registrationFormState, setRegistrationFormState] = useRegistrationForm();
|
|
75
76
|
const [showRegistrationForm, setShowRegistrationForm] = useState({
|
|
76
77
|
mode: "base",
|
|
@@ -78,40 +79,33 @@ function usePortalGoogleRegistrationForm(props) {
|
|
|
78
79
|
const handleEmailSubmit = async (event) => {
|
|
79
80
|
const formControls = event.target.getFormControls();
|
|
80
81
|
let formData = {};
|
|
81
|
-
let
|
|
82
|
+
let errorMessage = null;
|
|
82
83
|
formControls.forEach((control) => {
|
|
83
84
|
if (!control.name)
|
|
84
85
|
return;
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
86
|
+
jsonpointer.set(formData, control.name, control.value);
|
|
87
|
+
// only validate email field
|
|
88
|
+
if (control.name !== "/email")
|
|
89
|
+
return;
|
|
90
|
+
if (control.required && !control.value)
|
|
91
|
+
errorMessage = props.requiredFieldErrorMessage;
|
|
91
92
|
if (typeof control.validationError === "function") {
|
|
92
93
|
const validate = control.validationError;
|
|
93
94
|
const validationError = validate({
|
|
94
95
|
control,
|
|
95
|
-
key,
|
|
96
|
-
value,
|
|
96
|
+
key: "email",
|
|
97
|
+
value: control.value,
|
|
97
98
|
});
|
|
98
99
|
if (validationError)
|
|
99
|
-
|
|
100
|
+
errorMessage = validationError;
|
|
100
101
|
}
|
|
101
102
|
});
|
|
102
|
-
if (
|
|
103
|
-
|
|
104
|
-
setRegistrationFormState({
|
|
105
|
-
...registrationFormState,
|
|
106
|
-
loading: false,
|
|
107
|
-
error: "",
|
|
108
|
-
validationErrors,
|
|
109
|
-
});
|
|
103
|
+
if (errorMessage) {
|
|
104
|
+
setEmailValidationError(errorMessage);
|
|
110
105
|
return;
|
|
111
106
|
}
|
|
112
107
|
setRegistrationFormState({
|
|
113
108
|
...registrationFormState,
|
|
114
|
-
validationErrors: {},
|
|
115
109
|
initialData: {
|
|
116
110
|
...registrationFormState === null || registrationFormState === void 0 ? void 0 : registrationFormState.initialData,
|
|
117
111
|
...formData,
|
|
@@ -141,9 +135,8 @@ function usePortalGoogleRegistrationForm(props) {
|
|
|
141
135
|
}
|
|
142
136
|
};
|
|
143
137
|
return {
|
|
144
|
-
registrationFormState,
|
|
145
138
|
showRegistrationForm,
|
|
146
|
-
|
|
139
|
+
emailValidationError,
|
|
147
140
|
handleGoogleInit,
|
|
148
141
|
handleEmailSubmit,
|
|
149
142
|
};
|
|
@@ -299,7 +292,7 @@ const PortalGoogleRegistrationForm = class {
|
|
|
299
292
|
};
|
|
300
293
|
const sheet = createStyleSheet(styles);
|
|
301
294
|
const styleString = sheet.toString();
|
|
302
|
-
const { handleGoogleInit, handleEmailSubmit, showRegistrationForm,
|
|
295
|
+
const { handleGoogleInit, handleEmailSubmit, showRegistrationForm, emailValidationError, } = isDemo() ? useGoogleDemo(this) : usePortalGoogleRegistrationForm(this);
|
|
303
296
|
const content = {
|
|
304
297
|
formData: h$1("slot", { name: "formData" }),
|
|
305
298
|
googleButton: (h$1("sqm-google-sign-in", { text: this.googleButtonText, onInitComplete: handleGoogleInit })),
|
|
@@ -324,16 +317,14 @@ const PortalGoogleRegistrationForm = class {
|
|
|
324
317
|
};
|
|
325
318
|
if (showRegistrationForm.mode === "base") {
|
|
326
319
|
return (h$1(BaseRegistrationFormView, { states: {
|
|
327
|
-
|
|
320
|
+
error: emailValidationError,
|
|
328
321
|
}, callbacks: { handleEmailSubmit }, content: content }));
|
|
329
322
|
}
|
|
330
323
|
return (h$1(PortalRegistrationFormView, { states: {
|
|
331
324
|
...states,
|
|
332
325
|
emailDisabled: true,
|
|
333
326
|
hidePasswords: showRegistrationForm.mode === "google",
|
|
334
|
-
}, callbacks: callbacks,
|
|
335
|
-
// Show terms only on first screen
|
|
336
|
-
content: { ...content, terms: null }, refs: refs }));
|
|
327
|
+
}, callbacks: callbacks, content: content, refs: refs }));
|
|
337
328
|
}
|
|
338
329
|
};
|
|
339
330
|
function useRegisterDemo(props) {
|
|
@@ -369,7 +360,7 @@ function useGoogleDemo(props) {
|
|
|
369
360
|
mode: "base",
|
|
370
361
|
});
|
|
371
362
|
return cjs({
|
|
372
|
-
|
|
363
|
+
emailValidationError: false,
|
|
373
364
|
handleEmailSubmit: () => setShowRegistrationForm({ mode: "manual" }),
|
|
374
365
|
showRegistrationForm,
|
|
375
366
|
handleGoogleInit: () => setShowRegistrationForm({ mode: "google" }),
|
|
@@ -24,7 +24,7 @@ import { N as NavigationSidebarItemView } from './sqm-navigation-sidebar-item-vi
|
|
|
24
24
|
import { P as PortalEmailVerificationView } from './sqm-portal-email-verification-view-35b4353b.js';
|
|
25
25
|
import { P as PortalForgotPasswordView } from './sqm-portal-forgot-password-view-3d3182f1.js';
|
|
26
26
|
import { P as PortalLoginView } from './sqm-portal-login-view-7e49609a.js';
|
|
27
|
-
import { B as BaseRegistrationFormView } from './sqm-base-registration-form-view-
|
|
27
|
+
import { B as BaseRegistrationFormView } from './sqm-base-registration-form-view-dafba287.js';
|
|
28
28
|
import { P as PortalRegistrationFormView } from './sqm-portal-registration-form-view-3c1f6000.js';
|
|
29
29
|
import { P as PortalProfileView } from './sqm-portal-profile-view-93003974.js';
|
|
30
30
|
import './utilities-5b0ca040.js';
|
|
@@ -32,9 +32,9 @@ import { P as PortalResetPasswordView } from './sqm-portal-reset-password-view-5
|
|
|
32
32
|
import { P as PortalVerifyEmailView } from './sqm-portal-verify-email-view-b12cb894.js';
|
|
33
33
|
import './ErrorView-48e2b969.js';
|
|
34
34
|
import { Q as QrCodeView } from './sqm-qr-code-view-f1d0763b.js';
|
|
35
|
-
import { S as ShareButtonView, L as LeaderboardView, B as BigStatView, P as PortalFrameView, E as EditProfileView, u as useShareLink, a as useShareButton, b as useDemoBigStat, c as StatContainerView, d as PortalChangePasswordView, e as PortalRegisterView, C as ChangeMarktingView, T as TaskCardView, f as ProgressBarView, g as PoweredByImg$1, h as PortalFooterView, H as HeroView, R as ReferralIframeView, N as NameFieldsView, i as CheckboxFieldView, D as DropdownFieldView, I as InputFieldView, j as RewardExchangeView, r as rewardExchangeCustomErrorMsg, k as rewardExchangeLongText, l as rewardExchangeSelected, m as chooseAmountFixed, n as chooseAmountFixedNoDescription, o as chooseAmountVariable, p as chooseAmountVariableNoDescription, q as chooseAmountVariableDisabled, s as chooseAmountVariableUnavailable, t as confirmFixed, v as confirmVariable, w as redemptionError, x as queryError, y as success, z as successVariable, A as loading, F as empty$1, G as rewardExchange, J as CardFeedView, K as CouponCodeView, M as ProgressBar$2, O as LeadFormView, Q as LeadDropdownFieldView, U as autoColorScaleCss, V as ShadowViewAddon } from './ShadowViewAddon-
|
|
35
|
+
import { S as ShareButtonView, L as LeaderboardView, B as BigStatView, P as PortalFrameView, E as EditProfileView, u as useShareLink, a as useShareButton, b as useDemoBigStat, c as StatContainerView, d as PortalChangePasswordView, e as PortalRegisterView, C as ChangeMarktingView, T as TaskCardView, f as ProgressBarView, g as PoweredByImg$1, h as PortalFooterView, H as HeroView, R as ReferralIframeView, N as NameFieldsView, i as CheckboxFieldView, D as DropdownFieldView, I as InputFieldView, j as RewardExchangeView, r as rewardExchangeCustomErrorMsg, k as rewardExchangeLongText, l as rewardExchangeSelected, m as chooseAmountFixed, n as chooseAmountFixedNoDescription, o as chooseAmountVariable, p as chooseAmountVariableNoDescription, q as chooseAmountVariableDisabled, s as chooseAmountVariableUnavailable, t as confirmFixed, v as confirmVariable, w as redemptionError, x as queryError, y as success, z as successVariable, A as loading, F as empty$1, G as rewardExchange, J as CardFeedView, K as CouponCodeView, M as ProgressBar$2, O as LeadFormView, Q as LeadDropdownFieldView, U as autoColorScaleCss, V as ShadowViewAddon } from './ShadowViewAddon-f2176779.js';
|
|
36
36
|
import { P as PortalContainerView, a as PortalSectionView } from './sqm-portal-container-view-1683ae32.js';
|
|
37
|
-
import { O as OtherRegionSlotView, I as InvoiceTableView, T as TaxForm } from './sqm-invoice-table-view-
|
|
37
|
+
import { O as OtherRegionSlotView, I as InvoiceTableView, T as TaxForm } from './sqm-invoice-table-view-01453fa3.js';
|
|
38
38
|
import { L as LeadInputFieldView } from './sqm-lead-input-field-view-4ede5d7f.js';
|
|
39
39
|
|
|
40
40
|
/**
|
|
@@ -10829,7 +10829,6 @@ const NameFields_stories = {
|
|
|
10829
10829
|
};
|
|
10830
10830
|
const props$1 = {
|
|
10831
10831
|
states: {
|
|
10832
|
-
optional: false,
|
|
10833
10832
|
registrationFormState: {
|
|
10834
10833
|
validationErrors: undefined,
|
|
10835
10834
|
},
|
|
@@ -10841,7 +10840,6 @@ const props$1 = {
|
|
|
10841
10840
|
};
|
|
10842
10841
|
const errorProps$9 = {
|
|
10843
10842
|
states: {
|
|
10844
|
-
optional: false,
|
|
10845
10843
|
registrationFormState: {
|
|
10846
10844
|
validationErrors: {
|
|
10847
10845
|
firstName: "Cannot be empty",
|
|
@@ -15638,7 +15636,7 @@ const BaseRegistrationForm_stories = {
|
|
|
15638
15636
|
};
|
|
15639
15637
|
const defaultProps$q = {
|
|
15640
15638
|
states: {
|
|
15641
|
-
|
|
15639
|
+
error: "",
|
|
15642
15640
|
},
|
|
15643
15641
|
callbacks: {
|
|
15644
15642
|
handleEmailSubmit: () => console.log("Submit!"),
|
|
@@ -15658,7 +15656,7 @@ const defaultProps$q = {
|
|
|
15658
15656
|
const errorProps$a = {
|
|
15659
15657
|
...defaultProps$q,
|
|
15660
15658
|
states: {
|
|
15661
|
-
|
|
15659
|
+
error: "Something went wrong. Please try again.",
|
|
15662
15660
|
},
|
|
15663
15661
|
};
|
|
15664
15662
|
const Default$o = () => {
|
|
@@ -15705,7 +15703,6 @@ const defaultProps$r = {
|
|
|
15705
15703
|
formData: (h("div", null,
|
|
15706
15704
|
" ",
|
|
15707
15705
|
h(NameFieldsView, { states: {
|
|
15708
|
-
optional: false,
|
|
15709
15706
|
registrationFormState: {
|
|
15710
15707
|
validationErrors: undefined,
|
|
15711
15708
|
disabled: true,
|
|
@@ -1,8 +1,135 @@
|
|
|
1
1
|
import { k as useState, f as useEffect } from './stencil-hooks.module-4bc38af4.js';
|
|
2
|
-
import { d as dist, J, $ as $e, g as getEnvironmentSDK, w as wn } from './index.module-89a79f66.js';
|
|
2
|
+
import { d as dist, J, $ as $e, g as getEnvironmentSDK, w as wn, q as En } from './index.module-89a79f66.js';
|
|
3
3
|
|
|
4
4
|
const TAX_FORM_UPDATED_EVENT_KEY = "sqm:tax-form-updated";
|
|
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 = 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 = dist.gql `
|
|
93
|
+
query getCountries {
|
|
94
|
+
impactPayoutCountries(limit: 1000) {
|
|
95
|
+
data {
|
|
96
|
+
countryCode
|
|
97
|
+
displayName
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
`;
|
|
102
|
+
const GET_CURRENCIES = 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 = 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
|
var toArray = function toArray(a) {
|
|
7
134
|
var ret = Array(a.length);
|
|
8
135
|
for (var i = 0; i < a.length; ++i) {
|
|
@@ -1000,7 +1127,7 @@ const GET_TAX_SETTING = dist.gql `
|
|
|
1000
1127
|
}
|
|
1001
1128
|
`;
|
|
1002
1129
|
function getStatus(data) {
|
|
1003
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q;
|
|
1130
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w;
|
|
1004
1131
|
const account = (_b = (_a = data.user.impactConnection) === null || _a === void 0 ? void 0 : _a.publisher) === null || _b === void 0 ? void 0 : _b.payoutsAccount;
|
|
1005
1132
|
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") &&
|
|
1006
1133
|
reward.partnerFundsTransfer.status === "TRANSFERRED");
|
|
@@ -1018,7 +1145,19 @@ function getStatus(data) {
|
|
|
1018
1145
|
if ((_p = account.holdReasons) === null || _p === void 0 ? void 0 : _p.includes("IDV_CHECK_FAILED_INTERNAL"))
|
|
1019
1146
|
return "VERIFICATION:FAILED";
|
|
1020
1147
|
if (((_q = account.holdReasons) === null || _q === void 0 ? void 0 : _q.includes("NEW_PAYEE_REVIEW")) && hasTransferredReward)
|
|
1021
|
-
return "
|
|
1148
|
+
return "NEW_PAYEE_REVIEW";
|
|
1149
|
+
if ((_r = account.holdReasons) === null || _r === void 0 ? void 0 : _r.includes("PAYMENT_HOLD_ON_CHANGE"))
|
|
1150
|
+
return "PAYMENT_HOLD_ON_CHANGE";
|
|
1151
|
+
if ((_s = account.holdReasons) === null || _s === void 0 ? void 0 : _s.includes("BENEFICIARY_NAME_INVALID"))
|
|
1152
|
+
return "BENEFICIARY_NAME_INVALID";
|
|
1153
|
+
if ((_t = account.holdReasons) === null || _t === void 0 ? void 0 : _t.includes("BENEFICIARY_NAME_MISMATCH"))
|
|
1154
|
+
return "BENEFICIARY_NAME_MISMATCH";
|
|
1155
|
+
if ((_u = account.holdReasons) === null || _u === void 0 ? void 0 : _u.includes("BANK_TAX_NAME_MISMATCH"))
|
|
1156
|
+
return "BANK_TAX_NAME_MISMATCH";
|
|
1157
|
+
if ((_v = account.holdReasons) === null || _v === void 0 ? void 0 : _v.includes("WITHDRAWAL_SETTINGS_INVALID"))
|
|
1158
|
+
return "WITHDRAWAL_SETTINGS_INVALID";
|
|
1159
|
+
if ((_w = account.holdReasons) === null || _w === void 0 ? void 0 : _w.includes("PAYMENT_RETURNED"))
|
|
1160
|
+
return "PAYMENT_RETURNED";
|
|
1022
1161
|
if (account.hold)
|
|
1023
1162
|
return "HOLD";
|
|
1024
1163
|
return "DONE";
|
|
@@ -1030,6 +1169,8 @@ function usePayoutStatus(props) {
|
|
|
1030
1169
|
const { data: taxSettingRes } = wn(GET_TAX_SETTING, {});
|
|
1031
1170
|
const { render, loading: veriffLoading, errors: veriffErrors, } = useVeriffApp();
|
|
1032
1171
|
const [status, setStatus] = useState(undefined);
|
|
1172
|
+
const setContext = En(TAX_FORM_CONTEXT_NAMESPACE);
|
|
1173
|
+
const setStep = En(TAX_CONTEXT_NAMESPACE);
|
|
1033
1174
|
const enforceUsTaxComplianceOption = (_a = taxSettingRes === null || taxSettingRes === void 0 ? void 0 : taxSettingRes.tenantSettings) === null || _a === void 0 ? void 0 : _a.enforceUsTaxCompliance;
|
|
1034
1175
|
useEffect(() => {
|
|
1035
1176
|
if (!data)
|
|
@@ -1057,6 +1198,14 @@ function usePayoutStatus(props) {
|
|
|
1057
1198
|
url += "#3";
|
|
1058
1199
|
window.history.pushState(null, "", url);
|
|
1059
1200
|
};
|
|
1201
|
+
const onPaymentInfoClick = () => {
|
|
1202
|
+
setContext({
|
|
1203
|
+
overrideNextStep: "/dashboard",
|
|
1204
|
+
overrideBackStep: "/dashboard",
|
|
1205
|
+
hideSteps: true,
|
|
1206
|
+
});
|
|
1207
|
+
setStep("/4");
|
|
1208
|
+
};
|
|
1060
1209
|
return {
|
|
1061
1210
|
states: {
|
|
1062
1211
|
loading,
|
|
@@ -1070,8 +1219,9 @@ function usePayoutStatus(props) {
|
|
|
1070
1219
|
callbacks: {
|
|
1071
1220
|
onTermsClick,
|
|
1072
1221
|
onClick: render,
|
|
1222
|
+
onPaymentInfoClick,
|
|
1073
1223
|
},
|
|
1074
1224
|
};
|
|
1075
1225
|
}
|
|
1076
1226
|
|
|
1077
|
-
export {
|
|
1227
|
+
export { COUNTRIES_QUERY_NAMESPACE as C, FORM_STEPS as F, GET_USER as G, SORTED_COUNTRIES_NAMESPACE as S, TAX_FORM_CONTEXT_NAMESPACE as T, USER_QUERY_NAMESPACE as U, VERIFF_COMPLETE_EVENT_KEY as V, TAX_CONTEXT_NAMESPACE as a, FINANCE_NETWORK_SETTINGS_NAMESPACE as b, TAX_FORM_UPDATED_EVENT_KEY as c, USER_FORM_CONTEXT_NAMESPACE as d, CURRENCIES_NAMESPACE as e, COUNTRIES_NAMESPACE as f, GET_COUNTRIES as g, GET_FINANCE_NETWORK_SETTINGS as h, CURRENCIES_QUERY_NAMESPACE as i, GET_CURRENCIES as j, useVeriffApp as k, getStatus as l, usePayoutStatus as u };
|