@saasquatch/mint-components 2.0.2-3 → 2.0.2-5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/{IndirectTaxDetailsView-e5f70b8b.js → IndirectTaxDetailsView-20d5b4c5.js} +2 -2
- package/dist/cjs/{ShadowViewAddon-925a8fa6.js → ShadowViewAddon-21e729d3.js} +8 -8
- package/dist/cjs/{usePayoutStatus-95874989.js → data-16106637.js} +129 -155
- package/dist/cjs/{global-8bba5b3a.js → global-560ac58f.js} +4 -0
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/mint-components.cjs.js +2 -2
- package/dist/cjs/sqm-banking-info-form_10.cjs.entry.js +114 -343
- package/dist/cjs/sqm-big-stat_47.cjs.entry.js +29 -224
- package/dist/cjs/sqm-code-verification.cjs.entry.js +1 -1
- package/dist/cjs/sqm-email-verification.cjs.entry.js +1 -1
- package/dist/cjs/sqm-empty_4.cjs.entry.js +1 -1
- package/dist/cjs/sqm-header-logo.cjs.entry.js +1 -14
- package/dist/cjs/{sqm-lead-checkbox-field-view-340acad0.js → sqm-lead-checkbox-field-view-f7910206.js} +1 -1
- package/dist/cjs/sqm-lead-checkbox-field.cjs.entry.js +3 -3
- package/dist/cjs/{sqm-lead-input-field-view-06ed3632.js → sqm-lead-input-field-view-4e2a0c1a.js} +1 -1
- package/dist/cjs/sqm-lead-input-field.cjs.entry.js +3 -3
- package/dist/cjs/sqm-leaderboard-rank.cjs.entry.js +1 -1
- package/dist/cjs/sqm-pagination_3.cjs.entry.js +1 -1
- package/dist/cjs/{sqm-portal-email-verification-view-5518eb0d.js → sqm-portal-email-verification-view-556c645c.js} +1 -1
- package/dist/cjs/sqm-portal-email-verification.cjs.entry.js +2 -2
- package/dist/cjs/{sqm-portal-profile-view-615e6975.js → sqm-portal-profile-view-4a41c680.js} +1 -1
- package/dist/cjs/sqm-portal-profile.cjs.entry.js +2 -2
- package/dist/cjs/sqm-referral-table_11.cjs.entry.js +1 -1
- package/dist/cjs/sqm-rewards-table_9.cjs.entry.js +1 -1
- package/dist/cjs/sqm-stencilbook.cjs.entry.js +8 -9
- package/dist/cjs/{useLeadFormState-fd0445f9.js → useLeadFormState-b916bf5d.js} +1 -1
- package/dist/cjs/{utils-83d125fa.js → utils-f6c4eed4.js} +1 -1
- package/dist/collection/components/sqm-header-logo/sqm-header-logo.js +3 -80
- package/dist/collection/components/sqm-portal-footer/sqm-portal-footer-view.js +3 -3
- package/dist/collection/components/sqm-reward-exchange-list/sqm-reward-exchange-list-view.js +4 -4
- package/dist/collection/components/tax-and-cash/TaxForm.stories.js +0 -1
- package/dist/collection/components/tax-and-cash/sqm-indirect-tax-form/useIndirectTaxForm.js +40 -46
- package/dist/collection/components/tax-and-cash/sqm-payout-status-alert/sqm-payout-status-alert-view.js +2 -90
- package/dist/collection/components/tax-and-cash/sqm-payout-status-alert/sqm-payout-status-alert.js +0 -353
- package/dist/collection/components/tax-and-cash/sqm-payout-status-alert/usePayoutStatus.js +3 -30
- package/dist/collection/components/tax-and-cash/sqm-tax-and-cash/sqm-tax-and-cash.js +1 -301
- package/dist/collection/components/tax-and-cash/sqm-tax-and-cash-dashboard/sqm-tax-and-cash-dashboard-view.js +2 -92
- package/dist/collection/components/tax-and-cash/sqm-tax-and-cash-dashboard/sqm-tax-and-cash-dashboard.js +0 -300
- package/dist/collection/components/tax-and-cash/sqm-user-info-form/sqm-user-info-form-view.js +14 -25
- 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 +9 -92
- package/dist/collection/global/styles.js +4 -0
- package/dist/collection/global/styles.ts +4 -0
- package/dist/esm/{IndirectTaxDetailsView-0a57b622.js → IndirectTaxDetailsView-d1816a57.js} +2 -2
- package/dist/esm/{ShadowViewAddon-aae27c2e.js → ShadowViewAddon-5ecab399.js} +8 -8
- package/dist/esm/{usePayoutStatus-c515b24b.js → data-acdb790f.js} +130 -156
- package/dist/esm/{global-1099f20d.js → global-80e8f351.js} +4 -0
- package/dist/esm/loader.js +2 -2
- package/dist/esm/mint-components.js +2 -2
- package/dist/esm/sqm-banking-info-form_10.entry.js +66 -295
- package/dist/esm/sqm-big-stat_47.entry.js +7 -202
- package/dist/esm/sqm-code-verification.entry.js +1 -1
- package/dist/esm/sqm-email-verification.entry.js +1 -1
- package/dist/esm/sqm-empty_4.entry.js +1 -1
- package/dist/esm/sqm-header-logo.entry.js +1 -14
- package/dist/esm/{sqm-lead-checkbox-field-view-cbafee07.js → sqm-lead-checkbox-field-view-babfef96.js} +1 -1
- package/dist/esm/sqm-lead-checkbox-field.entry.js +3 -3
- package/dist/esm/{sqm-lead-input-field-view-f3775c28.js → sqm-lead-input-field-view-5e9001b5.js} +1 -1
- package/dist/esm/sqm-lead-input-field.entry.js +3 -3
- package/dist/esm/sqm-leaderboard-rank.entry.js +1 -1
- package/dist/esm/sqm-pagination_3.entry.js +1 -1
- package/dist/esm/{sqm-portal-email-verification-view-7d86299c.js → sqm-portal-email-verification-view-2e84bb34.js} +1 -1
- package/dist/esm/sqm-portal-email-verification.entry.js +2 -2
- package/dist/esm/{sqm-portal-profile-view-3ed13e4d.js → sqm-portal-profile-view-87621310.js} +1 -1
- package/dist/esm/sqm-portal-profile.entry.js +2 -2
- package/dist/esm/sqm-referral-table_11.entry.js +1 -1
- package/dist/esm/sqm-rewards-table_9.entry.js +1 -1
- package/dist/esm/sqm-stencilbook.entry.js +8 -9
- package/dist/esm/{useLeadFormState-c379e5d7.js → useLeadFormState-53b556e3.js} +1 -1
- package/dist/esm/{utils-6122971b.js → utils-7e72d7ed.js} +1 -1
- package/dist/esm-es5/{IndirectTaxDetailsView-0a57b622.js → IndirectTaxDetailsView-d1816a57.js} +1 -1
- package/dist/esm-es5/{ShadowViewAddon-aae27c2e.js → ShadowViewAddon-5ecab399.js} +1 -1
- package/dist/esm-es5/data-acdb790f.js +6 -0
- package/dist/esm-es5/{global-1099f20d.js → global-80e8f351.js} +1 -1
- package/dist/esm-es5/loader.js +1 -1
- package/dist/esm-es5/mint-components.js +1 -1
- package/dist/esm-es5/sqm-banking-info-form_10.entry.js +1 -1
- package/dist/esm-es5/sqm-big-stat_47.entry.js +1 -1
- package/dist/esm-es5/sqm-code-verification.entry.js +1 -1
- package/dist/esm-es5/sqm-email-verification.entry.js +1 -1
- package/dist/esm-es5/sqm-empty_4.entry.js +1 -1
- package/dist/esm-es5/sqm-header-logo.entry.js +1 -1
- package/dist/esm-es5/{sqm-lead-checkbox-field-view-cbafee07.js → sqm-lead-checkbox-field-view-babfef96.js} +1 -1
- package/dist/esm-es5/sqm-lead-checkbox-field.entry.js +1 -1
- package/dist/esm-es5/{sqm-lead-input-field-view-f3775c28.js → sqm-lead-input-field-view-5e9001b5.js} +1 -1
- package/dist/esm-es5/sqm-lead-input-field.entry.js +1 -1
- package/dist/esm-es5/sqm-leaderboard-rank.entry.js +1 -1
- package/dist/esm-es5/sqm-pagination_3.entry.js +1 -1
- package/dist/esm-es5/{sqm-portal-email-verification-view-7d86299c.js → sqm-portal-email-verification-view-2e84bb34.js} +1 -1
- package/dist/esm-es5/sqm-portal-email-verification.entry.js +1 -1
- package/dist/esm-es5/{sqm-portal-profile-view-3ed13e4d.js → sqm-portal-profile-view-87621310.js} +1 -1
- package/dist/esm-es5/sqm-portal-profile.entry.js +1 -1
- package/dist/esm-es5/sqm-referral-table_11.entry.js +1 -1
- package/dist/esm-es5/sqm-rewards-table_9.entry.js +1 -1
- package/dist/esm-es5/sqm-stencilbook.entry.js +1 -1
- package/dist/esm-es5/{useLeadFormState-c379e5d7.js → useLeadFormState-53b556e3.js} +1 -1
- package/dist/esm-es5/{utils-6122971b.js → utils-7e72d7ed.js} +1 -1
- package/dist/mint-components/global/styles.ts +4 -0
- package/dist/mint-components/mint-components.esm.js +1 -1
- package/dist/mint-components/mint-components.js +1 -1
- package/dist/mint-components/{p-79a3344f.js → p-0605808e.js} +1 -1
- package/dist/mint-components/{p-aa8c6332.js → p-0d0cbf6a.js} +1 -1
- package/dist/mint-components/{p-60c14cec.entry.js → p-190407f1.entry.js} +1 -1
- package/dist/mint-components/{p-ed16b35a.js → p-21cb9d95.js} +1 -1
- package/dist/mint-components/p-27bb4223.system.js +1 -0
- package/dist/mint-components/{p-14e813a7.system.entry.js → p-2923b3b7.system.entry.js} +1 -1
- package/dist/mint-components/{p-56009bf0.system.entry.js → p-31d32dc8.system.entry.js} +1 -1
- package/dist/mint-components/{p-8b5b2acc.entry.js → p-35dd7d31.entry.js} +1 -1
- package/dist/mint-components/{p-18720462.system.entry.js → p-364e5ac9.system.entry.js} +1 -1
- package/dist/mint-components/{p-a217cc8d.entry.js → p-36d4d879.entry.js} +1 -1
- package/dist/mint-components/{p-db1a0db1.js → p-3dfd91d9.js} +1 -1
- package/dist/mint-components/p-469a6450.system.js +6 -0
- package/dist/mint-components/{p-6d5bd95a.js → p-4765a7b5.js} +1 -1
- package/dist/mint-components/{p-d3120982.system.entry.js → p-499c11c0.system.entry.js} +1 -1
- package/dist/mint-components/{p-0649123a.system.entry.js → p-4d5845ac.system.entry.js} +1 -1
- package/dist/mint-components/{p-511c87ce.system.entry.js → p-4deeebde.system.entry.js} +1 -1
- package/dist/mint-components/{p-4ce51b1c.system.entry.js → p-4f194ece.system.entry.js} +1 -1
- package/dist/mint-components/{p-aefaec37.entry.js → p-506f8db5.entry.js} +1 -1
- package/dist/mint-components/{p-00bc7211.js → p-51c8c4a3.js} +1 -1
- package/dist/mint-components/{p-ad4348c3.system.js → p-5eff6672.system.js} +1 -1
- package/dist/mint-components/{p-6c006998.entry.js → p-6483aea3.entry.js} +2 -2
- package/dist/mint-components/{p-c994512c.system.js → p-65bc35d5.system.js} +1 -1
- package/dist/mint-components/{p-c85f204b.system.js → p-6653236d.system.js} +1 -1
- package/dist/mint-components/{p-57ce33dd.js → p-6b287172.js} +2 -2
- package/dist/mint-components/{p-6d9ce4e5.entry.js → p-6c3f484f.entry.js} +1 -1
- package/dist/mint-components/{p-22a9114f.system.entry.js → p-70a53a17.system.entry.js} +1 -1
- package/dist/mint-components/{p-5d059c95.entry.js → p-70b14f52.entry.js} +1 -1
- package/dist/mint-components/{p-6445e926.system.entry.js → p-74bfa4d7.system.entry.js} +1 -1
- package/dist/mint-components/{p-47c83656.entry.js → p-84ec18aa.entry.js} +1 -1
- package/dist/mint-components/{p-f0eae4e6.system.js → p-8f07cca2.system.js} +1 -1
- package/dist/mint-components/{p-a5c63310.entry.js → p-909fe833.entry.js} +1 -1
- package/dist/mint-components/p-914e5b02.entry.js +99 -0
- package/dist/mint-components/{p-5f3eafd4.entry.js → p-9c235f83.entry.js} +2 -2
- package/dist/mint-components/{p-74f43a08.system.js → p-9dc453c2.system.js} +1 -1
- package/dist/mint-components/{p-60465a2d.system.js → p-9de8768b.system.js} +1 -1
- package/dist/mint-components/{p-4fed8672.js → p-a6264af4.js} +1 -1
- package/dist/mint-components/p-a7ee19dc.entry.js +1 -0
- package/dist/mint-components/{p-bec87ac9.system.entry.js → p-a9be3cea.system.entry.js} +1 -1
- package/dist/mint-components/{p-e0a724dd.system.js → p-abad7828.system.js} +1 -1
- package/dist/mint-components/{p-ea0bc627.entry.js → p-bffd1ff7.entry.js} +1 -1
- package/dist/mint-components/{p-aa08457e.system.js → p-c594cd6a.system.js} +1 -1
- package/dist/mint-components/{p-7a268047.js → p-d52d3dd7.js} +1 -1
- package/dist/mint-components/{p-38f932ae.system.js → p-d5db98bf.system.js} +1 -1
- package/dist/mint-components/p-db1e009d.system.entry.js +1 -0
- package/dist/mint-components/p-e1e7d01c.js +157 -0
- package/dist/mint-components/p-e8b74744.entry.js +273 -0
- package/dist/mint-components/p-ed5629ca.system.entry.js +1 -0
- package/dist/mint-components/{p-717b6730.system.entry.js → p-ee5fd8d3.system.entry.js} +1 -1
- package/dist/mint-components/p-eea87fdc.system.entry.js +1 -0
- package/dist/mint-components/{p-f401ef19.system.entry.js → p-f092162f.system.entry.js} +1 -1
- package/dist/mint-components/{p-4c811d12.entry.js → p-f5e9fa02.entry.js} +2 -2
- package/dist/types/components/sqm-header-logo/sqm-header-logo.d.ts +1 -14
- package/dist/types/components/tax-and-cash/sqm-indirect-tax-form/useIndirectTaxForm.d.ts +0 -24
- package/dist/types/components/tax-and-cash/sqm-payout-status-alert/sqm-payout-status-alert-view.d.ts +0 -16
- package/dist/types/components/tax-and-cash/sqm-payout-status-alert/sqm-payout-status-alert.d.ts +0 -57
- package/dist/types/components/tax-and-cash/sqm-payout-status-alert/usePayoutStatus.d.ts +1 -3
- package/dist/types/components/tax-and-cash/sqm-tax-and-cash/sqm-tax-and-cash.d.ts +0 -48
- package/dist/types/components/tax-and-cash/sqm-tax-and-cash-dashboard/sqm-tax-and-cash-dashboard-view.d.ts +0 -12
- package/dist/types/components/tax-and-cash/sqm-tax-and-cash-dashboard/sqm-tax-and-cash-dashboard.d.ts +0 -48
- package/dist/types/components/tax-and-cash/sqm-user-info-form/sqm-user-info-form-view.d.ts +0 -2
- package/dist/types/components/tax-and-cash/sqm-user-info-form/useUserInfoForm.d.ts +0 -1
- package/dist/types/components.d.ts +41 -331
- package/docs/docs.docx +0 -0
- package/docs/raisins.json +1 -1
- package/grapesjs/grapesjs.js +1 -1
- package/package.json +1 -1
- package/shoelace/assets/icons/twitter-x.svg +4 -0
- package/dist/esm-es5/usePayoutStatus-c515b24b.js +0 -6
- package/dist/mint-components/p-09ab53fb.system.entry.js +0 -1
- package/dist/mint-components/p-1c1ae908.system.js +0 -6
- package/dist/mint-components/p-363289da.system.entry.js +0 -1
- package/dist/mint-components/p-69ed04cc.entry.js +0 -273
- package/dist/mint-components/p-6eb050f1.system.entry.js +0 -1
- package/dist/mint-components/p-967a9040.system.js +0 -1
- package/dist/mint-components/p-ab111e29.entry.js +0 -1
- package/dist/mint-components/p-c9cceb05.js +0 -157
- package/dist/mint-components/p-eb1475a1.entry.js +0 -99
- 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
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
const index = require('./index-a43a63b4.js');
|
|
6
|
-
const global = require('./global-
|
|
6
|
+
const global = require('./global-560ac58f.js');
|
|
7
7
|
const domContextHooks_module = require('./dom-context-hooks.module-7fa676ae.js');
|
|
8
8
|
const index_module = require('./index.module-4f54e412.js');
|
|
9
9
|
const jsonpointer = require('./jsonpointer-11327262.js');
|
|
@@ -16,10 +16,10 @@ const reRender = require('./re-render-d516138a.js');
|
|
|
16
16
|
const useChildElements = require('./useChildElements-966c9041.js');
|
|
17
17
|
const luxon = require('./luxon-949beaf2.js');
|
|
18
18
|
const useReferralTable = require('./useReferralTable-90d4d6e9.js');
|
|
19
|
-
const IndirectTaxDetailsView = require('./IndirectTaxDetailsView-
|
|
20
|
-
const utils$1 = require('./utils-
|
|
19
|
+
const IndirectTaxDetailsView = require('./IndirectTaxDetailsView-20d5b4c5.js');
|
|
20
|
+
const utils$1 = require('./utils-f6c4eed4.js');
|
|
21
21
|
const keys = require('./keys-cff24974.js');
|
|
22
|
-
const
|
|
22
|
+
const data = require('./data-16106637.js');
|
|
23
23
|
|
|
24
24
|
function getFormMap({ props, getValidationErrorMessage, bankCountry, }) {
|
|
25
25
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32;
|
|
@@ -728,7 +728,7 @@ const BankingInfoFormView = (props) => {
|
|
|
728
728
|
!states.hideSteps && (index.h("p", null, global.intl.formatMessage({
|
|
729
729
|
id: "formStep",
|
|
730
730
|
defaultMessage: text.formStep,
|
|
731
|
-
}, { step: states.step, count:
|
|
731
|
+
}, { step: states.step, count: data.FORM_STEPS }))),
|
|
732
732
|
index.h("h3", { style: { fontSize: "24px" } }, text.taxAndPayouts),
|
|
733
733
|
index.h("p", { class: classes.PageDescriptionText }, text.taxAndPayoutsDescription)),
|
|
734
734
|
((_a = formState.errors) === null || _a === void 0 ? void 0 : _a.general) && (index.h("sqm-form-message", { type: "error" },
|
|
@@ -865,12 +865,12 @@ function useBankingInfoForm(props) {
|
|
|
865
865
|
const host = index_module._();
|
|
866
866
|
const locale = index_module.L();
|
|
867
867
|
const user = index_module.J();
|
|
868
|
-
const [step, setStep] = index_module.Pn(
|
|
869
|
-
const context = index_module.Fn(
|
|
870
|
-
const countries = index_module.Fn(
|
|
868
|
+
const [step, setStep] = index_module.Pn(data.TAX_CONTEXT_NAMESPACE);
|
|
869
|
+
const context = index_module.Fn(data.TAX_FORM_CONTEXT_NAMESPACE);
|
|
870
|
+
const countries = index_module.Fn(data.SORTED_COUNTRIES_NAMESPACE);
|
|
871
871
|
const formRef = domContextHooks_module.useRef(null);
|
|
872
|
-
const { data: paymentOptionsData, loading: paymentOptionsLoading, errors: paymentOptionsError, } = index_module.$n(
|
|
873
|
-
const { data: userData, refetch, errors: userError, } = index_module.$n(
|
|
872
|
+
const { data: paymentOptionsData, loading: paymentOptionsLoading, errors: paymentOptionsError, } = index_module.$n(data.FINANCE_NETWORK_SETTINGS_NAMESPACE);
|
|
873
|
+
const { data: userData, refetch, errors: userError, } = index_module.$n(data.USER_QUERY_NAMESPACE);
|
|
874
874
|
const [saveWithdrawalSettings] = index_module.$e(SAVE_WITHDRAWAL_SETTINGS);
|
|
875
875
|
const [updateWithdrawalSettings] = index_module.$e(UPDATE_WITHDRAWAL_SETTINGS);
|
|
876
876
|
const [showVerification, setShowVerification] = domContextHooks_module.useState(false);
|
|
@@ -1031,7 +1031,7 @@ function useBankingInfoForm(props) {
|
|
|
1031
1031
|
return;
|
|
1032
1032
|
}
|
|
1033
1033
|
// Fire form change event
|
|
1034
|
-
window.dispatchEvent(new Event(
|
|
1034
|
+
window.dispatchEvent(new Event(data.TAX_FORM_UPDATED_EVENT_KEY));
|
|
1035
1035
|
await refetch();
|
|
1036
1036
|
setStep("/dashboard");
|
|
1037
1037
|
}
|
|
@@ -1574,7 +1574,7 @@ function useDemoBankingInfoForm(props) {
|
|
|
1574
1574
|
const defaultPaymentScheduleChecked = (_f = (_e = (_d = props.demoData) === null || _d === void 0 ? void 0 : _d.states) === null || _e === void 0 ? void 0 : _e.formState) === null || _f === void 0 ? void 0 : _f.paymentScheduleChecked;
|
|
1575
1575
|
const defaultCurrency = (_h = (_g = props.demoData) === null || _g === void 0 ? void 0 : _g.states) === null || _h === void 0 ? void 0 : _h.currency;
|
|
1576
1576
|
const defaultCountry = (_l = (_k = (_j = props.demoData) === null || _j === void 0 ? void 0 : _j.states) === null || _k === void 0 ? void 0 : _k.formState) === null || _l === void 0 ? void 0 : _l.bankCountry;
|
|
1577
|
-
const setStep = index_module.En(
|
|
1577
|
+
const setStep = index_module.En(data.TAX_CONTEXT_NAMESPACE);
|
|
1578
1578
|
const [paymentMethodChecked, setPaymentMethodChecked] = domContextHooks_module.useState(undefined);
|
|
1579
1579
|
const [paymentScheduleChecked, setPaymentScheduleChecked] = domContextHooks_module.useState(undefined);
|
|
1580
1580
|
const [currency, setCurrency] = domContextHooks_module.useState(defaultCurrency);
|
|
@@ -1698,10 +1698,10 @@ const DOCUSIGN_EXPIRED_STATES = ["ttl_expired", "session_timeout"];
|
|
|
1698
1698
|
function useDocusignForm(props) {
|
|
1699
1699
|
var _a, _b, _c;
|
|
1700
1700
|
const user = index_module.J();
|
|
1701
|
-
const context = index_module.Fn(
|
|
1702
|
-
const [step, setStep] = index_module.Pn(
|
|
1703
|
-
const { data, loading: userLoading, refetch, } = index_module.$n(
|
|
1704
|
-
const publisher = (_b = (_a = data === null || data === void 0 ? void 0 : data.user) === null || _a === void 0 ? void 0 : _a.impactConnection) === null || _b === void 0 ? void 0 : _b.publisher;
|
|
1701
|
+
const context = index_module.Fn(data.TAX_FORM_CONTEXT_NAMESPACE);
|
|
1702
|
+
const [step, setStep] = index_module.Pn(data.TAX_CONTEXT_NAMESPACE);
|
|
1703
|
+
const { data: data$1, loading: userLoading, refetch, } = index_module.$n(data.USER_QUERY_NAMESPACE);
|
|
1704
|
+
const publisher = (_b = (_a = data$1 === null || data$1 === void 0 ? void 0 : data$1.user) === null || _a === void 0 ? void 0 : _a.impactConnection) === null || _b === void 0 ? void 0 : _b.publisher;
|
|
1705
1705
|
const [createTaxDocument, { loading: documentLoading, data: document, errors: documentErrors },] = index_module.$e(GET_TAX_DOCUMENT);
|
|
1706
1706
|
const [completeTaxDocument, { loading: completeDocumentLoading, data: completeData, errors: completeErrors, },] = index_module.$e(COMPLETE_TAX_DOCUMENT);
|
|
1707
1707
|
const [docusignStatus, setDocusignStatus] = domContextHooks_module.useState(undefined);
|
|
@@ -1769,7 +1769,7 @@ function useDocusignForm(props) {
|
|
|
1769
1769
|
if (!result.completeImpactPublisherTaxDocument.success)
|
|
1770
1770
|
throw new Error();
|
|
1771
1771
|
// Fire form change event
|
|
1772
|
-
window.dispatchEvent(new Event(
|
|
1772
|
+
window.dispatchEvent(new Event(data.TAX_FORM_UPDATED_EVENT_KEY));
|
|
1773
1773
|
setShowExitButton(true);
|
|
1774
1774
|
}
|
|
1775
1775
|
catch (e) {
|
|
@@ -2073,7 +2073,7 @@ const DocusignFormView = (props) => {
|
|
|
2073
2073
|
!states.hideSteps && (index.h("p", null, global.intl.formatMessage({
|
|
2074
2074
|
id: "formStep",
|
|
2075
2075
|
defaultMessage: text.formStep,
|
|
2076
|
-
}, { step: states.step, count:
|
|
2076
|
+
}, { step: states.step, count: data.FORM_STEPS }))),
|
|
2077
2077
|
index.h("h3", null, text.taxForm),
|
|
2078
2078
|
index.h("p", { class: classes.PageDescriptionText }, text.taxAndPayoutsDescription))),
|
|
2079
2079
|
states.loadingError && (index.h("div", null,
|
|
@@ -2266,7 +2266,7 @@ const DocusignForm = class {
|
|
|
2266
2266
|
get el() { return index.getElement(this); }
|
|
2267
2267
|
};
|
|
2268
2268
|
function useDocusignFormDemo(props) {
|
|
2269
|
-
const setStep = index_module.En(
|
|
2269
|
+
const setStep = index_module.En(data.TAX_CONTEXT_NAMESPACE);
|
|
2270
2270
|
return cjs.cjs({
|
|
2271
2271
|
text: props.getTextProps(),
|
|
2272
2272
|
states: {
|
|
@@ -2452,7 +2452,7 @@ const IndirectTaxFormView = (props) => {
|
|
|
2452
2452
|
global.intl.formatMessage({
|
|
2453
2453
|
id: "formStep",
|
|
2454
2454
|
defaultMessage: text.formStep,
|
|
2455
|
-
}, { step: states.step, count:
|
|
2455
|
+
}, { step: states.step, count: data.FORM_STEPS }))),
|
|
2456
2456
|
index.h("h3", null, text.indirectTax),
|
|
2457
2457
|
index.h("p", { class: classes.PageDescriptionText }, text.taxAndPayoutsDescription),
|
|
2458
2458
|
index.h("p", { class: classes.DescriptionText }, text.indirectTaxDescription)),
|
|
@@ -2547,12 +2547,12 @@ function useIndirectTaxForm(props) {
|
|
|
2547
2547
|
const user = index_module.J();
|
|
2548
2548
|
const locale = index_module.L();
|
|
2549
2549
|
const formRef = domContextHooks_module.useRef(null);
|
|
2550
|
-
const context = index_module.Fn(
|
|
2551
|
-
const [step, setStep] = index_module.Pn(
|
|
2550
|
+
const context = index_module.Fn(data.TAX_FORM_CONTEXT_NAMESPACE);
|
|
2551
|
+
const [step, setStep] = index_module.Pn(data.TAX_CONTEXT_NAMESPACE);
|
|
2552
2552
|
const [connectImpactPartner, { loading: connectLoading, errors: connectErrors },] = index_module.$e(CONNECT_PARTNER);
|
|
2553
|
-
const userForm = index_module.Fn(
|
|
2554
|
-
const { data: userData, refetch, errors: userError, } = index_module.$n(
|
|
2555
|
-
const { data: _countriesRes, loading: countriesLoading } = index_module.$n(
|
|
2553
|
+
const userForm = index_module.Fn(data.USER_FORM_CONTEXT_NAMESPACE);
|
|
2554
|
+
const { data: userData, refetch, errors: userError, } = index_module.$n(data.USER_QUERY_NAMESPACE);
|
|
2555
|
+
const { data: _countriesRes, loading: countriesLoading } = index_module.$n(data.COUNTRIES_QUERY_NAMESPACE);
|
|
2556
2556
|
const intlLocale = (locale === null || locale === void 0 ? void 0 : locale.replace("_", "-")) || "en";
|
|
2557
2557
|
const _countries = domContextHooks_module.useMemo(() => { var _a, _b; return (_b = (_a = _countriesRes === null || _countriesRes === void 0 ? void 0 : _countriesRes.impactPayoutCountries) === null || _a === void 0 ? void 0 : _a.data) === null || _b === void 0 ? void 0 : _b.map((country) => utils$1.getCountryObj({ countryCode: country.countryCode, locale: intlLocale })); }, [(_a = _countriesRes === null || _countriesRes === void 0 ? void 0 : _countriesRes.impactPayoutCountries) === null || _a === void 0 ? void 0 : _a.data]);
|
|
2558
2558
|
const [loading, setLoading] = domContextHooks_module.useState(false);
|
|
@@ -2611,51 +2611,8 @@ function useIndirectTaxForm(props) {
|
|
|
2611
2611
|
console.error("Could not detect select change");
|
|
2612
2612
|
setFormState((p) => ({ ...p, [field]: value }));
|
|
2613
2613
|
};
|
|
2614
|
-
async function connectPartner(formData) {
|
|
2615
|
-
var _a, _b, _c, _d, _e;
|
|
2616
|
-
const vars = {
|
|
2617
|
-
user: {
|
|
2618
|
-
id: user.id,
|
|
2619
|
-
accountId: user.accountId,
|
|
2620
|
-
},
|
|
2621
|
-
firstName: userForm.firstName,
|
|
2622
|
-
lastName: userForm.lastName,
|
|
2623
|
-
countryCode: userForm.countryCode,
|
|
2624
|
-
currency: userForm.currency,
|
|
2625
|
-
address: userForm.address,
|
|
2626
|
-
city: userForm.city,
|
|
2627
|
-
state: userForm.state,
|
|
2628
|
-
postalCode: userForm.postalCode,
|
|
2629
|
-
phoneNumber: userForm.phoneNumber,
|
|
2630
|
-
phoneNumberCountryCode: userForm.phoneNumberCountryCode,
|
|
2631
|
-
indirectTaxCountryCode: formData.selectedRegion,
|
|
2632
|
-
indirectTaxRegion: formData.province || formData.subRegion,
|
|
2633
|
-
indirectTaxId: formData.indirectTaxNumber,
|
|
2634
|
-
additionalTaxId: formData.qstNumber,
|
|
2635
|
-
withholdingTaxId: formData.subRegionTaxNumber,
|
|
2636
|
-
};
|
|
2637
|
-
const result = await connectImpactPartner({
|
|
2638
|
-
vars,
|
|
2639
|
-
});
|
|
2640
|
-
if (!result || ((_a = result) === null || _a === void 0 ? void 0 : _a.message))
|
|
2641
|
-
throw new Error();
|
|
2642
|
-
if (!((_b = result.createImpactConnection) === null || _b === void 0 ? void 0 : _b.success)) {
|
|
2643
|
-
// Output backend errors to console for now
|
|
2644
|
-
console.error("Failed to create Impact connection: ", result.createImpactConnection.validationErrors);
|
|
2645
|
-
throw new Error();
|
|
2646
|
-
}
|
|
2647
|
-
await refetch();
|
|
2648
|
-
const resultPublisher = (_e = (_d = (_c = result
|
|
2649
|
-
.createImpactConnection) === null || _c === void 0 ? void 0 : _c.user) === null || _d === void 0 ? void 0 : _d.impactConnection) === null || _e === void 0 ? void 0 : _e.publisher;
|
|
2650
|
-
const hasValidCurrentDocument = utils$1.validTaxDocument(resultPublisher === null || resultPublisher === void 0 ? void 0 : resultPublisher.requiredTaxDocumentType) && (resultPublisher === null || resultPublisher === void 0 ? void 0 : resultPublisher.currentTaxDocument);
|
|
2651
|
-
// Fire form change event
|
|
2652
|
-
window.dispatchEvent(new Event(usePayoutStatus.TAX_FORM_UPDATED_EVENT_KEY));
|
|
2653
|
-
return {
|
|
2654
|
-
resultPublisher,
|
|
2655
|
-
hasValidCurrentDocument,
|
|
2656
|
-
};
|
|
2657
|
-
}
|
|
2658
2614
|
const onSubmit = async (event) => {
|
|
2615
|
+
var _a, _b, _c, _d, _e;
|
|
2659
2616
|
if (!option) {
|
|
2660
2617
|
setErrors({ taxDetails: true });
|
|
2661
2618
|
return;
|
|
@@ -2681,7 +2638,44 @@ function useIndirectTaxForm(props) {
|
|
|
2681
2638
|
}
|
|
2682
2639
|
setLoading(true);
|
|
2683
2640
|
try {
|
|
2684
|
-
const
|
|
2641
|
+
const vars = {
|
|
2642
|
+
user: {
|
|
2643
|
+
id: user.id,
|
|
2644
|
+
accountId: user.accountId,
|
|
2645
|
+
},
|
|
2646
|
+
firstName: userForm.firstName,
|
|
2647
|
+
lastName: userForm.lastName,
|
|
2648
|
+
countryCode: userForm.countryCode,
|
|
2649
|
+
currency: userForm.currency,
|
|
2650
|
+
address: userForm.address,
|
|
2651
|
+
city: userForm.city,
|
|
2652
|
+
state: userForm.state,
|
|
2653
|
+
postalCode: userForm.postalCode,
|
|
2654
|
+
phoneNumber: userForm.phoneNumber,
|
|
2655
|
+
phoneNumberCountryCode: userForm.phoneNumberCountryCode,
|
|
2656
|
+
indirectTaxCountryCode: formData.selectedRegion,
|
|
2657
|
+
indirectTaxRegion: formData.province || formData.subRegion,
|
|
2658
|
+
indirectTaxId: formData.indirectTaxNumber,
|
|
2659
|
+
additionalTaxId: formData.qstNumber,
|
|
2660
|
+
withholdingTaxId: formData.subRegionTaxNumber,
|
|
2661
|
+
};
|
|
2662
|
+
const result = await connectImpactPartner({
|
|
2663
|
+
vars,
|
|
2664
|
+
});
|
|
2665
|
+
if (!result || ((_a = result) === null || _a === void 0 ? void 0 : _a.message))
|
|
2666
|
+
throw new Error();
|
|
2667
|
+
if (!((_b = result.createImpactConnection) === null || _b === void 0 ? void 0 : _b.success)) {
|
|
2668
|
+
// Output backend errors to console for now
|
|
2669
|
+
console.error("Failed to create Impact connection: ", result.createImpactConnection
|
|
2670
|
+
.validationErrors);
|
|
2671
|
+
throw new Error();
|
|
2672
|
+
}
|
|
2673
|
+
await refetch();
|
|
2674
|
+
const resultPublisher = (_e = (_d = (_c = result
|
|
2675
|
+
.createImpactConnection) === null || _c === void 0 ? void 0 : _c.user) === null || _d === void 0 ? void 0 : _d.impactConnection) === null || _e === void 0 ? void 0 : _e.publisher;
|
|
2676
|
+
const hasValidCurrentDocument = utils$1.validTaxDocument(resultPublisher === null || resultPublisher === void 0 ? void 0 : resultPublisher.requiredTaxDocumentType) && (resultPublisher === null || resultPublisher === void 0 ? void 0 : resultPublisher.currentTaxDocument);
|
|
2677
|
+
// Fire form change event
|
|
2678
|
+
window.dispatchEvent(new Event(data.TAX_FORM_UPDATED_EVENT_KEY));
|
|
2685
2679
|
if ((resultPublisher === null || resultPublisher === void 0 ? void 0 : resultPublisher.requiredTaxDocumentType) &&
|
|
2686
2680
|
!hasValidCurrentDocument) {
|
|
2687
2681
|
// Go to docusign form
|
|
@@ -2957,7 +2951,7 @@ const IndirectTaxForm = class {
|
|
|
2957
2951
|
}
|
|
2958
2952
|
};
|
|
2959
2953
|
function useDemoIndirectTaxForm(props) {
|
|
2960
|
-
const setStep = index_module.En(
|
|
2954
|
+
const setStep = index_module.En(data.TAX_CONTEXT_NAMESPACE);
|
|
2961
2955
|
const [option, setOption] = domContextHooks_module.useState("otherRegion");
|
|
2962
2956
|
const [demoFormState, setDemoFormState] = domContextHooks_module.useState({});
|
|
2963
2957
|
return cjs.cjs({
|
|
@@ -3592,8 +3586,8 @@ function PayoutDetailsCardView(props) {
|
|
|
3592
3586
|
|
|
3593
3587
|
function usePayoutDetailsCard(props) {
|
|
3594
3588
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
|
|
3595
|
-
const { data, loading } = index_module.$n(
|
|
3596
|
-
const publisher = (_b = (_a = data === null || data === void 0 ? void 0 : data.user) === null || _a === void 0 ? void 0 : _a.impactConnection) === null || _b === void 0 ? void 0 : _b.publisher;
|
|
3589
|
+
const { data: data$1, loading } = index_module.$n(data.USER_QUERY_NAMESPACE);
|
|
3590
|
+
const publisher = (_b = (_a = data$1 === null || data$1 === void 0 ? void 0 : data$1.user) === null || _a === void 0 ? void 0 : _a.impactConnection) === null || _b === void 0 ? void 0 : _b.publisher;
|
|
3597
3591
|
function getPayoutDetailedStatusText(paymentDay) {
|
|
3598
3592
|
var _a;
|
|
3599
3593
|
const currentDay = luxon.luxon.DateTime.now().day;
|
|
@@ -4034,7 +4028,7 @@ const TaxAndCashDashboardView = (props) => {
|
|
|
4034
4028
|
icon: "exclamation-octagon",
|
|
4035
4029
|
class: sheet$4.classes.ErrorHoldAlertContainer,
|
|
4036
4030
|
};
|
|
4037
|
-
case "
|
|
4031
|
+
case "ACCOUNT_REVIEW":
|
|
4038
4032
|
return {
|
|
4039
4033
|
header: text.accountReviewHeader,
|
|
4040
4034
|
description: global.intl.formatMessage({
|
|
@@ -4048,96 +4042,6 @@ const TaxAndCashDashboardView = (props) => {
|
|
|
4048
4042
|
icon: "exclamation-triangle",
|
|
4049
4043
|
class: sheet$4.classes.WarningHoldAlertContainer,
|
|
4050
4044
|
};
|
|
4051
|
-
case "PAYMENT_HOLD_ON_CHANGE":
|
|
4052
|
-
return {
|
|
4053
|
-
header: text.paymentHoldOnChangeHeader,
|
|
4054
|
-
description: global.intl.formatMessage({
|
|
4055
|
-
id: "accountReviewDescription",
|
|
4056
|
-
defaultMessage: text.paymentHoldOnChangeDescription,
|
|
4057
|
-
}, {
|
|
4058
|
-
supportLink: (index.h("a", { target: "_blank", href: `mailto:advocate-support@impact.com` }, text.supportLink)),
|
|
4059
|
-
}),
|
|
4060
|
-
buttonText: null,
|
|
4061
|
-
alertType: "warning",
|
|
4062
|
-
icon: "exclamation-triangle",
|
|
4063
|
-
class: sheet$4.classes.WarningHoldAlertContainer,
|
|
4064
|
-
};
|
|
4065
|
-
case "BENEFICIARY_NAME_INVALID":
|
|
4066
|
-
return {
|
|
4067
|
-
header: text.beneficiaryNameInvalidHeader,
|
|
4068
|
-
description: global.intl.formatMessage({
|
|
4069
|
-
id: "accountReviewDescription",
|
|
4070
|
-
defaultMessage: text.beneficiaryNameInvalidDescription,
|
|
4071
|
-
}, {
|
|
4072
|
-
supportLink: (index.h("a", { target: "_blank", href: `mailto:advocate-support@impact.com` }, text.supportLink)),
|
|
4073
|
-
}),
|
|
4074
|
-
button: (index.h(index.Fragment, null,
|
|
4075
|
-
index.h("sl-button", { disabled: states.disabled || states.loading, type: "primary", class: sheet$4.classes.EditBankDetailsButton, onClick: callbacks.onEditPayoutInfo }, text.editPaymentInformationButton),
|
|
4076
|
-
index.h("sl-button", { disabled: states.disabled || states.loading, type: "default", class: sheet$4.classes.EditBankDetailsButton, onClick: callbacks.onNewFormClick }, text.newFormButton))),
|
|
4077
|
-
alertType: "warning",
|
|
4078
|
-
icon: "exclamation-triangle",
|
|
4079
|
-
class: sheet$4.classes.WarningHoldAlertContainer,
|
|
4080
|
-
};
|
|
4081
|
-
case "BENEFICIARY_NAME_MISMATCH":
|
|
4082
|
-
return {
|
|
4083
|
-
header: text.beneficiaryNameMismatchHeader,
|
|
4084
|
-
description: global.intl.formatMessage({
|
|
4085
|
-
id: "accountReviewDescription",
|
|
4086
|
-
defaultMessage: text.beneficiaryNameMismatchDescription,
|
|
4087
|
-
}, {
|
|
4088
|
-
supportLink: (index.h("a", { target: "_blank", href: `mailto:advocate-support@impact.com` }, text.supportLink)),
|
|
4089
|
-
}),
|
|
4090
|
-
button: (index.h(index.Fragment, null,
|
|
4091
|
-
index.h("sl-button", { disabled: states.disabled || states.loading, type: "primary", class: sheet$4.classes.EditBankDetailsButton, onClick: callbacks.onEditPayoutInfo }, text.editPaymentInformationButton),
|
|
4092
|
-
index.h("sl-button", { disabled: states.disabled || states.loading, type: "default", class: sheet$4.classes.EditBankDetailsButton, onClick: callbacks.onNewFormClick }, text.newFormButton))),
|
|
4093
|
-
alertType: "warning",
|
|
4094
|
-
icon: "exclamation-triangle",
|
|
4095
|
-
class: sheet$4.classes.WarningHoldAlertContainer,
|
|
4096
|
-
};
|
|
4097
|
-
case "BANK_TAX_NAME_MISMATCH":
|
|
4098
|
-
return {
|
|
4099
|
-
header: text.bankTaxNameMismatchHeader,
|
|
4100
|
-
description: global.intl.formatMessage({
|
|
4101
|
-
id: "accountReviewDescription",
|
|
4102
|
-
defaultMessage: text.bankTaxNameMismatchDescription,
|
|
4103
|
-
}, {
|
|
4104
|
-
supportLink: (index.h("a", { target: "_blank", href: `mailto:advocate-support@impact.com` }, text.supportLink)),
|
|
4105
|
-
}),
|
|
4106
|
-
button: (index.h(index.Fragment, null,
|
|
4107
|
-
index.h("sl-button", { disabled: states.disabled || states.loading, type: "primary", class: sheet$4.classes.EditBankDetailsButton, onClick: callbacks.onEditPayoutInfo }, text.editPaymentInformationButton),
|
|
4108
|
-
index.h("sl-button", { disabled: states.disabled || states.loading, type: "default", class: sheet$4.classes.EditBankDetailsButton, onClick: callbacks.onNewFormClick }, text.newFormButton))),
|
|
4109
|
-
alertType: "warning",
|
|
4110
|
-
icon: "exclamation-triangle",
|
|
4111
|
-
class: sheet$4.classes.WarningHoldAlertContainer,
|
|
4112
|
-
};
|
|
4113
|
-
case "WITHDRAWAL_SETTINGS_INVALID":
|
|
4114
|
-
return {
|
|
4115
|
-
header: text.withdrawalSettingsInvalidHeader,
|
|
4116
|
-
description: global.intl.formatMessage({
|
|
4117
|
-
id: "accountReviewDescription",
|
|
4118
|
-
defaultMessage: text.withdrawalSettingsInvalidDescription,
|
|
4119
|
-
}, {
|
|
4120
|
-
supportLink: (index.h("a", { target: "_blank", href: `mailto:advocate-support@impact.com` }, text.supportLink)),
|
|
4121
|
-
}),
|
|
4122
|
-
button: (index.h("sl-button", { disabled: states.disabled || states.loading, type: "default", class: sheet$4.classes.EditBankDetailsButton, onClick: callbacks.onEditPayoutInfo }, text.editPaymentInformationButton)),
|
|
4123
|
-
alertType: "warning",
|
|
4124
|
-
icon: "exclamation-triangle",
|
|
4125
|
-
class: sheet$4.classes.WarningHoldAlertContainer,
|
|
4126
|
-
};
|
|
4127
|
-
case "PAYMENT_RETURNED":
|
|
4128
|
-
return {
|
|
4129
|
-
header: text.paymentReturnedHeader,
|
|
4130
|
-
description: global.intl.formatMessage({
|
|
4131
|
-
id: "accountReviewDescription",
|
|
4132
|
-
defaultMessage: text.paymentReturnedDescription,
|
|
4133
|
-
}, {
|
|
4134
|
-
supportLink: (index.h("a", { target: "_blank", href: `mailto:advocate-support@impact.com` }, text.supportLink)),
|
|
4135
|
-
}),
|
|
4136
|
-
button: (index.h("sl-button", { disabled: states.disabled || states.loading, type: "primary", class: sheet$4.classes.EditBankDetailsButton, onClick: callbacks.onEditPayoutInfo }, text.editPaymentInformationButton)),
|
|
4137
|
-
alertType: "warning",
|
|
4138
|
-
icon: "exclamation-triangle",
|
|
4139
|
-
class: sheet$4.classes.WarningHoldAlertContainer,
|
|
4140
|
-
};
|
|
4141
4045
|
case "HOLD":
|
|
4142
4046
|
return {
|
|
4143
4047
|
header: text.payoutHoldAlertHeader,
|
|
@@ -4385,10 +4289,10 @@ function getIndirectTaxType(taxInformation) {
|
|
|
4385
4289
|
}
|
|
4386
4290
|
const useTaxAndCashDashboard = (props) => {
|
|
4387
4291
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o;
|
|
4388
|
-
const setStep = index_module.En(
|
|
4389
|
-
const setContext = index_module.En(
|
|
4292
|
+
const setStep = index_module.En(data.TAX_CONTEXT_NAMESPACE);
|
|
4293
|
+
const setContext = index_module.En(data.TAX_FORM_CONTEXT_NAMESPACE);
|
|
4390
4294
|
const [showDialog, setShowDialog] = domContextHooks_module.useState(false);
|
|
4391
|
-
const { render, loading: veriffLoading, errors: veriffErrors, } =
|
|
4295
|
+
const { render, loading: veriffLoading, errors: veriffErrors, } = data.useVeriffApp();
|
|
4392
4296
|
const { data: taxSettingRes } = index_module.wn(GET_TAX_SETTING, {});
|
|
4393
4297
|
const locale = index_module.L();
|
|
4394
4298
|
domContextHooks_module.useEffect(() => {
|
|
@@ -4397,8 +4301,8 @@ const useTaxAndCashDashboard = (props) => {
|
|
|
4397
4301
|
if (window.location.hash)
|
|
4398
4302
|
setStep(`/${window.location.hash.replace("#", "")}`);
|
|
4399
4303
|
}, []);
|
|
4400
|
-
const { data, loading, errors: userError, refetch, } = index_module.$n(
|
|
4401
|
-
const publisher = (_b = (_a = data === null || data === void 0 ? void 0 : data.user) === null || _a === void 0 ? void 0 : _a.impactConnection) === null || _b === void 0 ? void 0 : _b.publisher;
|
|
4304
|
+
const { data: data$1, loading, errors: userError, refetch, } = index_module.$n(data.USER_QUERY_NAMESPACE);
|
|
4305
|
+
const publisher = (_b = (_a = data$1 === null || data$1 === void 0 ? void 0 : data$1.user) === null || _a === void 0 ? void 0 : _a.impactConnection) === null || _b === void 0 ? void 0 : _b.publisher;
|
|
4402
4306
|
const documentType = publisher === null || publisher === void 0 ? void 0 : publisher.requiredTaxDocumentType;
|
|
4403
4307
|
const submissionDate = (_c = publisher === null || publisher === void 0 ? void 0 : publisher.currentTaxDocument) === null || _c === void 0 ? void 0 : _c.dateCreated;
|
|
4404
4308
|
const dateSubmitted = submissionDate
|
|
@@ -4422,12 +4326,12 @@ const useTaxAndCashDashboard = (props) => {
|
|
|
4422
4326
|
setStep("/3");
|
|
4423
4327
|
};
|
|
4424
4328
|
const provinceName = (_d = IndirectTaxDetailsView.INDIRECT_TAX_PROVINCES.find((p) => { var _a; return p.regionCode === ((_a = publisher === null || publisher === void 0 ? void 0 : publisher.taxInformation) === null || _a === void 0 ? void 0 : _a.indirectTaxRegion); })) === null || _d === void 0 ? void 0 : _d.displayName;
|
|
4425
|
-
const payoutStatus = data ?
|
|
4329
|
+
const payoutStatus = data$1 ? data.getStatus(data$1) : null;
|
|
4426
4330
|
domContextHooks_module.useEffect(() => {
|
|
4427
4331
|
const cb = () => refetch();
|
|
4428
|
-
window.addEventListener(
|
|
4332
|
+
window.addEventListener(data.VERIFF_COMPLETE_EVENT_KEY, cb);
|
|
4429
4333
|
return () => {
|
|
4430
|
-
window.removeEventListener(
|
|
4334
|
+
window.removeEventListener(data.VERIFF_COMPLETE_EVENT_KEY, cb);
|
|
4431
4335
|
};
|
|
4432
4336
|
}, []);
|
|
4433
4337
|
const enforceUsTaxComplianceOption = (_e = taxSettingRes === null || taxSettingRes === void 0 ? void 0 : taxSettingRes.tenantSettings) === null || _e === void 0 ? void 0 : _e.enforceUsTaxCompliance;
|
|
@@ -4708,54 +4612,6 @@ const TaxAndCashDashboard = class {
|
|
|
4708
4612
|
* @uiName Account review alert description
|
|
4709
4613
|
*/
|
|
4710
4614
|
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}.";
|
|
4711
|
-
/**
|
|
4712
|
-
* @uiName Payment hold on change alert header
|
|
4713
|
-
*/
|
|
4714
|
-
this.paymentHoldOnChangeHeader = "We are reviewing your new payout settings";
|
|
4715
|
-
/**
|
|
4716
|
-
* @uiName Payment hold on change alert description
|
|
4717
|
-
*/
|
|
4718
|
-
this.paymentHoldOnChangeDescription = "Your payout is temporarily on hold while we review your new payment information, this process is usually resolved within 48 hours.";
|
|
4719
|
-
/**
|
|
4720
|
-
* @uiName Beneficiary name invalid alert header
|
|
4721
|
-
*/
|
|
4722
|
-
this.beneficiaryNameInvalidHeader = "Your payment information does not match your tax form";
|
|
4723
|
-
/**
|
|
4724
|
-
* @uiName Beneficiary name invalid description
|
|
4725
|
-
*/
|
|
4726
|
-
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.";
|
|
4727
|
-
/**
|
|
4728
|
-
* @uiName Beneficiary name mismatch alert header
|
|
4729
|
-
*/
|
|
4730
|
-
this.beneficiaryNameMismatchHeader = "Your payment information does not match your tax form";
|
|
4731
|
-
/**
|
|
4732
|
-
* @uiName Beneficiary name mismatch alert description
|
|
4733
|
-
*/
|
|
4734
|
-
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.";
|
|
4735
|
-
/**
|
|
4736
|
-
* @uiName Bank name mismatch alert header
|
|
4737
|
-
*/
|
|
4738
|
-
this.bankTaxNameMismatchHeader = "Your payment information does not match your tax form";
|
|
4739
|
-
/**
|
|
4740
|
-
* @uiName Bank name mismatch alert description
|
|
4741
|
-
*/
|
|
4742
|
-
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.";
|
|
4743
|
-
/**
|
|
4744
|
-
* @uiName Withdrawal settings invalid alert header
|
|
4745
|
-
*/
|
|
4746
|
-
this.withdrawalSettingsInvalidHeader = "Your payment information includes invalid characters";
|
|
4747
|
-
/**
|
|
4748
|
-
* @uiName Withdrawal settings invalid alert description
|
|
4749
|
-
*/
|
|
4750
|
-
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.";
|
|
4751
|
-
/**
|
|
4752
|
-
* @uiName Payment returned alert header
|
|
4753
|
-
*/
|
|
4754
|
-
this.paymentReturnedHeader = "Payout unsuccessful";
|
|
4755
|
-
/**
|
|
4756
|
-
* @uiName Payment returned alert description
|
|
4757
|
-
*/
|
|
4758
|
-
this.paymentReturnedDescription = "Our recent payment attempt for your earnings was unsuccessful. Please review your payment information and make sure it is correct.";
|
|
4759
4615
|
/**
|
|
4760
4616
|
* @uiName Terms and Conditions text
|
|
4761
4617
|
*/
|
|
@@ -6152,7 +6008,7 @@ const vanillaStyle$4 = `
|
|
|
6152
6008
|
`;
|
|
6153
6009
|
const UserInfoFormView = (props) => {
|
|
6154
6010
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u;
|
|
6155
|
-
const { states, states: { formState }, callbacks, text, refs, data, } = props;
|
|
6011
|
+
const { states, states: { formState }, callbacks, text, refs, data: data$1, } = props;
|
|
6156
6012
|
const { classes } = sheet$5;
|
|
6157
6013
|
const bankingCollectionText = global.intl.formatMessage({
|
|
6158
6014
|
id: "bankingCollectionText",
|
|
@@ -6161,7 +6017,7 @@ const UserInfoFormView = (props) => {
|
|
|
6161
6017
|
termsAndConditionsLink: (index.h("a", { href: text.termsAndConditionsLink, target: "_blank" }, text.termsAndConditionsLabel)),
|
|
6162
6018
|
});
|
|
6163
6019
|
let regionLabel = undefined;
|
|
6164
|
-
switch (data.regionLabelEnum) {
|
|
6020
|
+
switch (data$1.regionLabelEnum) {
|
|
6165
6021
|
case "STATE":
|
|
6166
6022
|
regionLabel = text.state;
|
|
6167
6023
|
break;
|
|
@@ -6174,12 +6030,6 @@ const UserInfoFormView = (props) => {
|
|
|
6174
6030
|
default:
|
|
6175
6031
|
regionLabel = text.state;
|
|
6176
6032
|
}
|
|
6177
|
-
function isDisabledInput(field) {
|
|
6178
|
-
var _a;
|
|
6179
|
-
if (states.isPartner && !!((_a = data.partnerData) === null || _a === void 0 ? void 0 : _a[field]))
|
|
6180
|
-
return true;
|
|
6181
|
-
return false;
|
|
6182
|
-
}
|
|
6183
6033
|
return (index.h("sl-form", { class: classes.FormWrapper, "onSl-submit": callbacks.onSubmit, ref: (el) => (refs.formRef.current = el), novalidate: true },
|
|
6184
6034
|
index.h("style", { type: "text/css" },
|
|
6185
6035
|
styleString$5,
|
|
@@ -6199,7 +6049,7 @@ const UserInfoFormView = (props) => {
|
|
|
6199
6049
|
!states.hideSteps && (index.h("p", null, global.intl.formatMessage({
|
|
6200
6050
|
id: "formStep",
|
|
6201
6051
|
defaultMessage: text.formStep,
|
|
6202
|
-
}, { step: states.step, count:
|
|
6052
|
+
}, { step: states.step, count: data.FORM_STEPS }))),
|
|
6203
6053
|
index.h("h3", null, text.personalInformation),
|
|
6204
6054
|
index.h("p", { class: classes.PageDescriptionText }, text.taxAndPayoutsDescription))),
|
|
6205
6055
|
((_a = formState.errors) === null || _a === void 0 ? void 0 : _a.general) && (index.h("sqm-form-message", { type: "error" },
|
|
@@ -6220,22 +6070,18 @@ const UserInfoFormView = (props) => {
|
|
|
6220
6070
|
})))),
|
|
6221
6071
|
index.h("div", null,
|
|
6222
6072
|
index.h("div", { class: classes.InputContainer },
|
|
6223
|
-
index.h("sl-input", Object.assign({ class: "ErrorInput", exportparts: "label: input-label, base: input-base", value: formState.firstName, label: text.firstName, disabled: states.disabled ||
|
|
6224
|
-
states.isUser ||
|
|
6225
|
-
isDisabledInput("firstName") }, (((_b = formState.errors) === null || _b === void 0 ? void 0 : _b.firstName) ? {
|
|
6073
|
+
index.h("sl-input", Object.assign({ class: "ErrorInput", exportparts: "label: input-label, base: input-base", value: formState.firstName, label: text.firstName, disabled: states.disabled || states.isUser || states.isPartner }, (((_b = formState.errors) === null || _b === void 0 ? void 0 : _b.firstName) ? {
|
|
6226
6074
|
class: classes.ErrorInput,
|
|
6227
6075
|
helpText: utils$1.formatErrorMessage(text.firstName, formState.errors.firstName),
|
|
6228
6076
|
}
|
|
6229
6077
|
: {}), { id: "firstName", name: "/firstName", required: true })),
|
|
6230
|
-
index.h("sl-input", Object.assign({ exportparts: "label: input-label, base: input-base", value: formState.lastName, label: text.lastName, disabled: states.disabled ||
|
|
6231
|
-
states.isUser ||
|
|
6232
|
-
isDisabledInput("lastName") }, (((_c = formState.errors) === null || _c === void 0 ? void 0 : _c.lastName) ? {
|
|
6078
|
+
index.h("sl-input", Object.assign({ exportparts: "label: input-label, base: input-base", value: formState.lastName, label: text.lastName, disabled: states.disabled || states.isUser || states.isPartner }, (((_c = formState.errors) === null || _c === void 0 ? void 0 : _c.lastName) ? {
|
|
6233
6079
|
class: classes.ErrorInput,
|
|
6234
6080
|
helpText: utils$1.formatErrorMessage(text.lastName, formState.errors.lastName),
|
|
6235
6081
|
}
|
|
6236
6082
|
: {}), { id: "lastName", name: "/lastName", required: true })),
|
|
6237
6083
|
index.h("sl-input", { exportparts: "label: input-label, base: input-base", value: formState.email, label: text.email, disabled: true, id: "email", name: "/email", required: true }),
|
|
6238
|
-
index.h("sl-select", Object.assign({ id: "countryCode", exportparts: "label: input-label, base: input-base", name: "/countryCode", label: text.country, value: formState.countryCode, disabled: states.disabled ||
|
|
6084
|
+
index.h("sl-select", Object.assign({ id: "countryCode", exportparts: "label: input-label, base: input-base", name: "/countryCode", label: text.country, value: formState.countryCode, disabled: states.disabled || states.isPartner }, (((_d = formState.errors) === null || _d === void 0 ? void 0 : _d.countryCode) ? {
|
|
6239
6085
|
class: classes.ErrorInput,
|
|
6240
6086
|
helpText: utils$1.formatErrorMessage(text.country, formState.errors.countryCode),
|
|
6241
6087
|
}
|
|
@@ -6245,14 +6091,13 @@ const UserInfoFormView = (props) => {
|
|
|
6245
6091
|
e.stopPropagation();
|
|
6246
6092
|
}, "onSl-input": (e) => {
|
|
6247
6093
|
callbacks.setCountrySearch(e.target.value);
|
|
6248
|
-
} }), (_e = data === null || data === void 0 ? void 0 : data.countries) === null || _e === void 0 ? void 0 :
|
|
6249
|
-
_e.map((c) => (index.h("sl-menu-item", { value: c.countryCode }, c.displayName))), (_f = data === null || data === void 0 ? void 0 : data.allCountries) === null || _f === void 0 ? void 0 :
|
|
6250
|
-
_f.map((c) => (index.h("sl-menu-item", { value: c.countryCode, style: { display: "none" } }, c.displayName)))),
|
|
6094
|
+
} }), (_e = data$1 === null || data$1 === void 0 ? void 0 : data$1.countries) === null || _e === void 0 ? void 0 :
|
|
6095
|
+
_e.map((c) => (index.h("sl-menu-item", { value: c.countryCode, exportparts: "base: menu-item-base" }, c.displayName))), (_f = data$1 === null || data$1 === void 0 ? void 0 : data$1.allCountries) === null || _f === void 0 ? void 0 :
|
|
6096
|
+
_f.map((c) => (index.h("sl-menu-item", { value: c.countryCode, style: { display: "none" }, exportparts: "base: menu-item-base" }, c.displayName)))),
|
|
6251
6097
|
index.h("div", { class: classes.PhoneInputsSection },
|
|
6252
6098
|
index.h("p", null, text.phoneNumber),
|
|
6253
6099
|
index.h("div", { class: classes.PhoneInputsContainer },
|
|
6254
|
-
index.h("sl-select", Object.assign({ id: "phoneNumberCountryCode", exportparts: "label: input-label, base: input-base", name: "/phoneNumberCountryCode", value: formState.phoneNumberCountryCode, disabled: states.disabled ||
|
|
6255
|
-
isDisabledInput("phoneNumberCountryCode"), ref: (el) => (refs.phoneCountryRef.current = el) }, (((_g = formState.errors) === null || _g === void 0 ? void 0 : _g.phoneNumberCountryCode) ? {
|
|
6100
|
+
index.h("sl-select", Object.assign({ id: "phoneNumberCountryCode", exportparts: "label: input-label, base: input-base", name: "/phoneNumberCountryCode", value: formState.phoneNumberCountryCode, disabled: states.disabled || states.isPartner, ref: (el) => (refs.phoneCountryRef.current = el) }, (((_g = formState.errors) === null || _g === void 0 ? void 0 : _g.phoneNumberCountryCode) ? {
|
|
6256
6101
|
class: classes.ErrorInput,
|
|
6257
6102
|
}
|
|
6258
6103
|
: {}), { required: true, "onSl-select": (e) => callbacks.onFormChange("phoneCountry", e) }),
|
|
@@ -6261,13 +6106,13 @@ const UserInfoFormView = (props) => {
|
|
|
6261
6106
|
e.stopPropagation();
|
|
6262
6107
|
}, "onSl-input": (e) => {
|
|
6263
6108
|
callbacks.setPhoneCountrySearch(e.target.value);
|
|
6264
|
-
} }), (_h = data === null || data === void 0 ? void 0 : data.phoneCountries) === null || _h === void 0 ? void 0 :
|
|
6109
|
+
} }), (_h = data$1 === null || data$1 === void 0 ? void 0 : data$1.phoneCountries) === null || _h === void 0 ? void 0 :
|
|
6265
6110
|
_h.map((c) => {
|
|
6266
6111
|
var _a, _b;
|
|
6267
6112
|
return (index.h("sl-menu-item", { value: c.countryCode },
|
|
6268
6113
|
index.h("div", { slot: "prefix" }, `${(_a = PHONE_EXTENSIONS[c.countryCode]) === null || _a === void 0 ? void 0 : _a.name} `), (_b = PHONE_EXTENSIONS[c.countryCode]) === null || _b === void 0 ? void 0 :
|
|
6269
6114
|
_b.dial_code));
|
|
6270
|
-
}), (_j = data === null || data === void 0 ? void 0 : data.allCountries) === null || _j === void 0 ? void 0 :
|
|
6115
|
+
}), (_j = data$1 === null || data$1 === void 0 ? void 0 : data$1.allCountries) === null || _j === void 0 ? void 0 :
|
|
6271
6116
|
_j.map((c) => {
|
|
6272
6117
|
var _a, _b;
|
|
6273
6118
|
return (index.h("sl-menu-item", { value: c.countryCode, style: { display: "none" } },
|
|
@@ -6278,7 +6123,7 @@ const UserInfoFormView = (props) => {
|
|
|
6278
6123
|
// Naive phone number validation
|
|
6279
6124
|
utils$1.validateBillingField(/[a-zA-Z]+/, value) &&
|
|
6280
6125
|
utils$1.formatErrorMessage(text.phoneNumber, text.error.fieldInvalidError);
|
|
6281
|
-
}, disabled: states.disabled ||
|
|
6126
|
+
}, disabled: states.disabled || states.isPartner }, (((_k = formState.errors) === null || _k === void 0 ? void 0 : _k.phoneNumber) ? {
|
|
6282
6127
|
class: classes.ErrorInput,
|
|
6283
6128
|
helpText: utils$1.formatErrorMessage(text.phoneNumber, formState.errors.phoneNumber),
|
|
6284
6129
|
}
|
|
@@ -6286,7 +6131,7 @@ const UserInfoFormView = (props) => {
|
|
|
6286
6131
|
index.h("sl-input", Object.assign({ exportparts: "label: input-label, base: input-base", label: text.address, id: "address", name: "/address", value: formState.address, validationError: ({ value }) =>
|
|
6287
6132
|
// Checks for non-ASCII characters
|
|
6288
6133
|
!utils$1.validateBillingField(/^[\x20-\xFF]+$/, value) &&
|
|
6289
|
-
utils$1.formatErrorMessage(text.address, text.error.invalidCharacterError), disabled: states.disabled ||
|
|
6134
|
+
utils$1.formatErrorMessage(text.address, text.error.invalidCharacterError), disabled: states.disabled || states.isPartner }, (((_l = formState.errors) === null || _l === void 0 ? void 0 : _l.address) ? {
|
|
6290
6135
|
class: classes.ErrorInput,
|
|
6291
6136
|
helpText: utils$1.formatErrorMessage(text.address, formState.errors.address),
|
|
6292
6137
|
}
|
|
@@ -6294,22 +6139,22 @@ const UserInfoFormView = (props) => {
|
|
|
6294
6139
|
index.h("sl-input", Object.assign({ exportparts: "label: input-label, base: input-base", label: text.city, id: "city", name: "/city", value: formState.city, validationError: ({ value }) =>
|
|
6295
6140
|
// Checks for non-ASCII characters
|
|
6296
6141
|
!utils$1.validateBillingField(/^[\x20-\xFF]+$/, value) &&
|
|
6297
|
-
utils$1.formatErrorMessage(text.city, text.error.invalidCharacterError), disabled: states.disabled ||
|
|
6142
|
+
utils$1.formatErrorMessage(text.city, text.error.invalidCharacterError), disabled: states.disabled || states.isPartner }, (((_m = formState.errors) === null || _m === void 0 ? void 0 : _m.city) ? {
|
|
6298
6143
|
class: classes.ErrorInput,
|
|
6299
6144
|
helpText: utils$1.formatErrorMessage(text.city, formState.errors.city),
|
|
6300
6145
|
}
|
|
6301
6146
|
: {}), { required: true })),
|
|
6302
|
-
!states.hideState && (index.h("sl-select", Object.assign({ label: regionLabel, exportparts: "label: input-label, base: input-base", id: "state", name: "/state", value: formState.state, disabled: states.disabled ||
|
|
6147
|
+
!states.hideState && (index.h("sl-select", Object.assign({ label: regionLabel, exportparts: "label: input-label, base: input-base", id: "state", name: "/state", value: formState.state, disabled: states.disabled || states.isPartner }, (((_o = formState.errors) === null || _o === void 0 ? void 0 : _o.state) ? {
|
|
6303
6148
|
class: classes.ErrorInput,
|
|
6304
6149
|
helpText: utils$1.formatErrorMessage(text.state, formState.errors.state),
|
|
6305
6150
|
}
|
|
6306
|
-
: {}), { required: true }), (_p = data.regions) === null || _p === void 0 ? void 0 : _p.map((r) => (index.h("sl-menu-item", { value: r.value }, r.label))))),
|
|
6307
|
-
index.h("sl-input", Object.assign({ label: text.postalCode, exportparts: "label: input-label, base: input-base", id: "postalCode", name: "/postalCode", value: formState.postalCode, disabled: states.disabled ||
|
|
6151
|
+
: {}), { required: true }), (_p = data$1.regions) === null || _p === void 0 ? void 0 : _p.map((r) => (index.h("sl-menu-item", { value: r.value }, r.label))))),
|
|
6152
|
+
index.h("sl-input", Object.assign({ label: text.postalCode, exportparts: "label: input-label, base: input-base", id: "postalCode", name: "/postalCode", value: formState.postalCode, disabled: states.disabled || states.isPartner }, (((_q = formState.errors) === null || _q === void 0 ? void 0 : _q.postalCode) ? {
|
|
6308
6153
|
class: classes.ErrorInput,
|
|
6309
6154
|
helpText: utils$1.formatErrorMessage(text.postalCode, formState.errors.postalCode),
|
|
6310
6155
|
}
|
|
6311
6156
|
: {}), { required: true })),
|
|
6312
|
-
index.h("sl-select", Object.assign({ id: "currency", exportparts: "label: input-label, base: input-base", name: "/currency", label: text.currency, menu: true, value: formState.currency, disabled: states.disabled ||
|
|
6157
|
+
index.h("sl-select", Object.assign({ id: "currency", exportparts: "label: input-label, base: input-base", name: "/currency", label: text.currency, menu: true, value: formState.currency, disabled: states.disabled || states.isPartner, helpText: text.currencyHelpText }, (((_r = formState.errors) === null || _r === void 0 ? void 0 : _r.currency) ? {
|
|
6313
6158
|
class: classes.ErrorInput,
|
|
6314
6159
|
helpText: utils$1.formatErrorMessage(text.currency, formState.errors.currency),
|
|
6315
6160
|
}
|
|
@@ -6319,11 +6164,11 @@ const UserInfoFormView = (props) => {
|
|
|
6319
6164
|
e.stopPropagation();
|
|
6320
6165
|
}, "onSl-input": (e) => {
|
|
6321
6166
|
callbacks.setCurrencySearch(e.target.value);
|
|
6322
|
-
} }), (_s = data === null || data === void 0 ? void 0 : data.currencies) === null || _s === void 0 ? void 0 :
|
|
6167
|
+
} }), (_s = data$1 === null || data$1 === void 0 ? void 0 : data$1.currencies) === null || _s === void 0 ? void 0 :
|
|
6323
6168
|
_s.map((c) => (index.h("sl-menu-item", { value: c.currencyCode },
|
|
6324
6169
|
c.currencyCode,
|
|
6325
6170
|
" - ",
|
|
6326
|
-
c.displayName))), (_t = data === null || data === void 0 ? void 0 : data.allCurrencies) === null || _t === void 0 ? void 0 :
|
|
6171
|
+
c.displayName))), (_t = data$1 === null || data$1 === void 0 ? void 0 : data$1.allCurrencies) === null || _t === void 0 ? void 0 :
|
|
6327
6172
|
_t.map((c) => (index.h("sl-menu-item", { value: c.currencyCode, style: { display: "none" } },
|
|
6328
6173
|
c.currencyCode,
|
|
6329
6174
|
" - ",
|
|
@@ -6331,24 +6176,22 @@ const UserInfoFormView = (props) => {
|
|
|
6331
6176
|
index.h("div", { class: classes.CheckboxWrapper },
|
|
6332
6177
|
index.h("sl-checkbox", { checked: formState.allowBankingCollection === true, "onSl-change": (e) => {
|
|
6333
6178
|
e.target.value = e.target.checked;
|
|
6334
|
-
}, disabled: states.disabled, required: true, value: formState.allowBankingCollection, id: "allowBankingCollection", name: "/allowBankingCollection" }, bankingCollectionText),
|
|
6179
|
+
}, disabled: states.isPartner ? false : states.disabled, required: true, value: formState.allowBankingCollection, id: "allowBankingCollection", name: "/allowBankingCollection" }, bankingCollectionText),
|
|
6335
6180
|
((_u = formState.errors) === null || _u === void 0 ? void 0 : _u.allowBankingCollection) && (index.h("p", { class: classes.ErrorText }, utils$1.formatErrorMessage(text.termsAndConditionsLabel, formState.errors.allowBankingCollection))))),
|
|
6336
|
-
index.h("sl-button", { type: "primary", disabled: states.disabled, submit: true, exportparts: "base: primarybutton-base" }, text.continueButton))))));
|
|
6181
|
+
index.h("sl-button", { type: "primary", disabled: states.isPartner ? false : states.disabled, submit: true, exportparts: "base: primarybutton-base" }, text.continueButton))))));
|
|
6337
6182
|
};
|
|
6338
6183
|
|
|
6339
6184
|
function useUserInfoForm(props) {
|
|
6340
|
-
var _a, _b, _c, _d
|
|
6185
|
+
var _a, _b, _c, _d;
|
|
6341
6186
|
const currencyRef = domContextHooks_module.useRef(undefined);
|
|
6342
6187
|
const phoneCountryRef = domContextHooks_module.useRef(undefined);
|
|
6343
6188
|
const formRef = domContextHooks_module.useRef(null);
|
|
6344
|
-
const context = index_module.Fn(
|
|
6345
|
-
const countries = index_module.Fn(
|
|
6346
|
-
const [step, setStep] = index_module.Pn(
|
|
6347
|
-
const [userFormContext, setUserFormContext] = index_module.Pn(
|
|
6348
|
-
const
|
|
6349
|
-
const
|
|
6350
|
-
const { data, loading, refetch, errors: userError, } = index_module.$n(usePayoutStatus.USER_QUERY_NAMESPACE);
|
|
6351
|
-
const _currencies = index_module.Fn(usePayoutStatus.CURRENCIES_NAMESPACE);
|
|
6189
|
+
const context = index_module.Fn(data.TAX_FORM_CONTEXT_NAMESPACE);
|
|
6190
|
+
const countries = index_module.Fn(data.SORTED_COUNTRIES_NAMESPACE);
|
|
6191
|
+
const [step, setStep] = index_module.Pn(data.TAX_CONTEXT_NAMESPACE);
|
|
6192
|
+
const [userFormContext, setUserFormContext] = index_module.Pn(data.USER_FORM_CONTEXT_NAMESPACE);
|
|
6193
|
+
const { data: data$1, loading, errors: userError, } = index_module.$n(data.USER_QUERY_NAMESPACE);
|
|
6194
|
+
const _currencies = index_module.Fn(data.CURRENCIES_NAMESPACE);
|
|
6352
6195
|
const currencies = domContextHooks_module.useMemo(() => [...(_currencies || [])].sort((a, b) => a.displayName.localeCompare(b.displayName)), [_currencies]);
|
|
6353
6196
|
const [countrySearch, setCountrySearch] = domContextHooks_module.useState("");
|
|
6354
6197
|
const [phoneCountrySearch, setPhoneCountrySearch] = domContextHooks_module.useState("");
|
|
@@ -6363,7 +6206,7 @@ function useUserInfoForm(props) {
|
|
|
6363
6206
|
}, []);
|
|
6364
6207
|
domContextHooks_module.useEffect(() => {
|
|
6365
6208
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
6366
|
-
const user = data === null || data === void 0 ? void 0 : data.user;
|
|
6209
|
+
const user = data$1 === null || data$1 === void 0 ? void 0 : data$1.user;
|
|
6367
6210
|
if (!user || step !== "/1")
|
|
6368
6211
|
return;
|
|
6369
6212
|
// If form already filled out, skip initialising it
|
|
@@ -6404,7 +6247,7 @@ function useUserInfoForm(props) {
|
|
|
6404
6247
|
postalCode: (_k = user.customFields) === null || _k === void 0 ? void 0 : _k.postalCode,
|
|
6405
6248
|
});
|
|
6406
6249
|
}
|
|
6407
|
-
}, [data, step, userFormContext]);
|
|
6250
|
+
}, [data$1, step, userFormContext]);
|
|
6408
6251
|
const onFormChange = (field, e) => {
|
|
6409
6252
|
var _a, _b;
|
|
6410
6253
|
const value = (_b = (_a = e.detail) === null || _a === void 0 ? void 0 : _a.item) === null || _b === void 0 ? void 0 : _b.__value;
|
|
@@ -6449,45 +6292,6 @@ function useUserInfoForm(props) {
|
|
|
6449
6292
|
setFilteredCurrencies(currencies.filter((c) => c.currencyCode.toLowerCase().includes(currencySearch.toLowerCase())) || []);
|
|
6450
6293
|
}
|
|
6451
6294
|
}, [currencySearch, currencies]);
|
|
6452
|
-
async function connectPartner(formData) {
|
|
6453
|
-
var _a, _b, _c, _d, _e;
|
|
6454
|
-
const vars = {
|
|
6455
|
-
user: {
|
|
6456
|
-
id: user.id,
|
|
6457
|
-
accountId: user.accountId,
|
|
6458
|
-
},
|
|
6459
|
-
firstName: formData.firstName,
|
|
6460
|
-
lastName: formData.lastName,
|
|
6461
|
-
countryCode: formData.countryCode,
|
|
6462
|
-
currency: formData.currency,
|
|
6463
|
-
address: formData.address,
|
|
6464
|
-
city: formData.city,
|
|
6465
|
-
state: formData.state,
|
|
6466
|
-
postalCode: formData.postalCode,
|
|
6467
|
-
phoneNumber: formData.phoneNumber,
|
|
6468
|
-
phoneNumberCountryCode: formData.phoneNumberCountryCode,
|
|
6469
|
-
};
|
|
6470
|
-
const result = await connectImpactPartner({
|
|
6471
|
-
vars,
|
|
6472
|
-
});
|
|
6473
|
-
if (!result || ((_a = result) === null || _a === void 0 ? void 0 : _a.message))
|
|
6474
|
-
throw new Error();
|
|
6475
|
-
if (!((_b = result.createImpactConnection) === null || _b === void 0 ? void 0 : _b.success)) {
|
|
6476
|
-
// Output backend errors to console for now
|
|
6477
|
-
console.error("Failed to create Impact connection: ", result.createImpactConnection.validationErrors);
|
|
6478
|
-
throw new Error();
|
|
6479
|
-
}
|
|
6480
|
-
await refetch();
|
|
6481
|
-
const resultPublisher = (_e = (_d = (_c = result
|
|
6482
|
-
.createImpactConnection) === null || _c === void 0 ? void 0 : _c.user) === null || _d === void 0 ? void 0 : _d.impactConnection) === null || _e === void 0 ? void 0 : _e.publisher;
|
|
6483
|
-
const hasValidCurrentDocument = utils$1.validTaxDocument(resultPublisher === null || resultPublisher === void 0 ? void 0 : resultPublisher.requiredTaxDocumentType) && (resultPublisher === null || resultPublisher === void 0 ? void 0 : resultPublisher.currentTaxDocument);
|
|
6484
|
-
// Fire form change event
|
|
6485
|
-
window.dispatchEvent(new Event(usePayoutStatus.TAX_FORM_UPDATED_EVENT_KEY));
|
|
6486
|
-
return {
|
|
6487
|
-
resultPublisher,
|
|
6488
|
-
hasValidCurrentDocument,
|
|
6489
|
-
};
|
|
6490
|
-
}
|
|
6491
6295
|
async function onSubmit(event) {
|
|
6492
6296
|
let formControls = event.target.getFormControls();
|
|
6493
6297
|
let formData = {};
|
|
@@ -6530,41 +6334,9 @@ function useUserInfoForm(props) {
|
|
|
6530
6334
|
postalCode: userData.postalCode,
|
|
6531
6335
|
currency: userData.currency,
|
|
6532
6336
|
});
|
|
6533
|
-
const
|
|
6534
|
-
console.log({ skipNextStep });
|
|
6535
|
-
if (skipNextStep) {
|
|
6536
|
-
try {
|
|
6537
|
-
const { resultPublisher, hasValidCurrentDocument } = await connectPartner(formData);
|
|
6538
|
-
if ((resultPublisher === null || resultPublisher === void 0 ? void 0 : resultPublisher.requiredTaxDocumentType) &&
|
|
6539
|
-
!hasValidCurrentDocument) {
|
|
6540
|
-
// Go to docusign form
|
|
6541
|
-
setStep("/3");
|
|
6542
|
-
}
|
|
6543
|
-
else {
|
|
6544
|
-
if (resultPublisher === null || resultPublisher === void 0 ? void 0 : resultPublisher.brandedSignup) {
|
|
6545
|
-
// Go to banking information form
|
|
6546
|
-
setStep("/4");
|
|
6547
|
-
}
|
|
6548
|
-
else {
|
|
6549
|
-
// Go right to the dashboard
|
|
6550
|
-
setStep("/dashboard");
|
|
6551
|
-
}
|
|
6552
|
-
}
|
|
6553
|
-
return;
|
|
6554
|
-
}
|
|
6555
|
-
catch (e) {
|
|
6556
|
-
setErrors({ general: true });
|
|
6557
|
-
return;
|
|
6558
|
-
}
|
|
6559
|
-
}
|
|
6560
|
-
const nextStep = context.overrideNextStep || skipNextStep ? "/3" : "/2";
|
|
6337
|
+
const nextStep = context.overrideNextStep || "/2";
|
|
6561
6338
|
setStep(nextStep);
|
|
6562
6339
|
}
|
|
6563
|
-
function getSkipNextStep(userData) {
|
|
6564
|
-
if (userData.countryCode === "US")
|
|
6565
|
-
return true;
|
|
6566
|
-
return true;
|
|
6567
|
-
}
|
|
6568
6340
|
const hasStates = ["ES", "AU", "US", "CA"].includes(userFormContext.countryCode);
|
|
6569
6341
|
const regionObj = hasStates
|
|
6570
6342
|
? IndirectTaxDetailsView.ADDRESS_REGIONS[userFormContext === null || userFormContext === void 0 ? void 0 : userFormContext.countryCode]
|
|
@@ -6592,17 +6364,16 @@ function useUserInfoForm(props) {
|
|
|
6592
6364
|
allCountries: countries,
|
|
6593
6365
|
regionLabelEnum: regionObj === null || regionObj === void 0 ? void 0 : regionObj.labelEnum,
|
|
6594
6366
|
regions: (regionObj === null || regionObj === void 0 ? void 0 : regionObj.regions) || [],
|
|
6595
|
-
partnerData: (_b = (_a = data === null || data === void 0 ? void 0 : data.user) === null || _a === void 0 ? void 0 : _a.impactConnection) === null || _b === void 0 ? void 0 : _b.publisher,
|
|
6596
6367
|
},
|
|
6597
6368
|
states: {
|
|
6598
6369
|
step: step === null || step === void 0 ? void 0 : step.replace("/", ""),
|
|
6599
6370
|
hideState: !hasStates,
|
|
6600
6371
|
hideSteps: !!context.hideSteps,
|
|
6601
|
-
disabled: loading
|
|
6372
|
+
disabled: loading,
|
|
6602
6373
|
loadingError: !!(userError === null || userError === void 0 ? void 0 : userError.message),
|
|
6603
|
-
loading: loading
|
|
6604
|
-
isPartner: !!((
|
|
6605
|
-
isUser: !!((
|
|
6374
|
+
loading: loading,
|
|
6375
|
+
isPartner: !!((_b = (_a = data$1 === null || data$1 === void 0 ? void 0 : data$1.user) === null || _a === void 0 ? void 0 : _a.impactConnection) === null || _b === void 0 ? void 0 : _b.publisher),
|
|
6376
|
+
isUser: !!((_d = (_c = data$1 === null || data$1 === void 0 ? void 0 : data$1.user) === null || _c === void 0 ? void 0 : _c.impactConnection) === null || _d === void 0 ? void 0 : _d.user),
|
|
6606
6377
|
formState: {
|
|
6607
6378
|
...userFormContext,
|
|
6608
6379
|
errors: formErrors,
|
|
@@ -6792,7 +6563,7 @@ const TaxForm = class {
|
|
|
6792
6563
|
}
|
|
6793
6564
|
};
|
|
6794
6565
|
function useDemoUserInfoForm(props) {
|
|
6795
|
-
const setStep = index_module.En(
|
|
6566
|
+
const setStep = index_module.En(data.TAX_CONTEXT_NAMESPACE);
|
|
6796
6567
|
return cjs.cjs({
|
|
6797
6568
|
setStep,
|
|
6798
6569
|
onSubmit: async () => {
|