@saasquatch/mint-components 2.0.3 → 2.0.4-10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/{IndirectTaxDetailsView-659a139c.js → IndirectTaxDetailsView-d39b895d.js} +2 -2
- package/dist/cjs/{ShadowViewAddon-fbc33c53.js → ShadowViewAddon-7066fae7.js} +25 -27
- package/dist/cjs/{data-16106637.js → data-44260010.js} +29 -2
- package/dist/cjs/{global-e862bfd4.js → global-94f36ad7.js} +55 -54
- 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 +355 -102
- package/dist/cjs/sqm-big-stat_47.cjs.entry.js +232 -22
- package/dist/cjs/sqm-code-verification.cjs.entry.js +1 -1
- package/dist/cjs/sqm-email-verification.cjs.entry.js +7 -4
- package/dist/cjs/sqm-empty_4.cjs.entry.js +1 -1
- package/dist/cjs/{sqm-form-message.cjs.entry.js → sqm-form-message_2.cjs.entry.js} +50 -0
- package/dist/cjs/sqm-header-logo.cjs.entry.js +15 -2
- package/dist/cjs/{sqm-lead-checkbox-field-view-dca40eb4.js → sqm-lead-checkbox-field-view-c0123bfa.js} +1 -1
- package/dist/cjs/sqm-lead-checkbox-field.cjs.entry.js +3 -3
- package/dist/cjs/{sqm-lead-input-field-view-2006001f.js → sqm-lead-input-field-view-6983eaa1.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 +2 -2
- package/dist/cjs/{sqm-portal-email-verification-view-1745d9a2.js → sqm-portal-email-verification-view-d968178a.js} +4 -6
- package/dist/cjs/sqm-portal-email-verification.cjs.entry.js +2 -2
- package/dist/cjs/{sqm-portal-profile-view-5c5e29b1.js → sqm-portal-profile-view-f74b8d6c.js} +1 -1
- package/dist/cjs/sqm-portal-profile.cjs.entry.js +2 -2
- package/dist/cjs/{sqm-qr-code-view-4ccf89da.js → sqm-qr-code-view-a2889aee.js} +1 -5
- package/dist/cjs/sqm-qr-code.cjs.entry.js +1 -1
- package/dist/cjs/sqm-referral-table_11.cjs.entry.js +2 -2
- package/dist/cjs/sqm-rewards-table_9.cjs.entry.js +2 -2
- package/dist/cjs/sqm-stencilbook.cjs.entry.js +108 -54
- package/dist/cjs/{useLeadFormState-91999606.js → useLeadFormState-f8b33c07.js} +1 -1
- package/dist/cjs/{utils-4eb18a29.js → utils-5ecfecd9.js} +18 -30
- package/dist/collection/collection-manifest.json +1 -0
- package/dist/collection/components/sqm-edit-profile/sqm-edit-profile-view.js +1 -1
- package/dist/collection/components/sqm-empty/EmptyState.stories.js +1 -1
- package/dist/collection/components/sqm-form-message/FormMessage.stories.js +5 -0
- package/dist/collection/components/sqm-form-message/sqm-form-message.js +30 -0
- package/dist/collection/components/sqm-header-logo/sqm-header-logo.js +85 -5
- package/dist/collection/components/sqm-invoice-table/InvoiceTable.stories.js +5 -5
- package/dist/collection/components/sqm-invoice-table/sqm-invoice-table.js +1 -1
- package/dist/collection/components/sqm-lead-form/sqm-lead-form-view.js +5 -7
- package/dist/collection/components/sqm-leaderboard/sqm-leaderboard-view.js +2 -2
- package/dist/collection/components/sqm-portal-email-verification/PortalEmailVerification.stories.js +1 -0
- package/dist/collection/components/sqm-portal-email-verification/sqm-portal-email-verification-view.js +3 -5
- package/dist/collection/components/sqm-portal-footer/sqm-portal-footer-view.js +3 -3
- package/dist/collection/components/sqm-qr-code/sqm-qr-code-view.js +1 -5
- package/dist/collection/components/sqm-referral-codes/sqm-referral-codes.js +1 -1
- package/dist/collection/components/sqm-referral-table/ReferralTable.stories.js +5 -5
- package/dist/collection/components/sqm-referral-table/sqm-referral-table.js +1 -1
- package/dist/collection/components/sqm-reward-exchange-list/sqm-reward-exchange-list-view.js +8 -8
- package/dist/collection/components/sqm-rewards-table/RewardsTable.stories.js +5 -5
- package/dist/collection/components/sqm-rewards-table/sqm-rewards-table.js +1 -1
- package/dist/collection/components/sqm-skeleton/Skeleton.stories.js +16 -0
- package/dist/collection/components/sqm-skeleton/sqm-skeleton.js +90 -0
- package/dist/collection/components/sqm-stencilbook/Themes.js +12 -0
- package/dist/collection/components/sqm-stencilbook/sqm-stencilbook.js +2 -0
- package/dist/collection/components/sqm-task-card/sqm-task-card-view.js +5 -5
- package/dist/collection/components/sqm-widget-verification/sqm-email-verification/sqm-email-verification-view.js +6 -3
- package/dist/collection/components/tax-and-cash/TaxForm.stories.js +1 -0
- package/dist/collection/components/tax-and-cash/sqm-banking-info-form/useBankingInfoForm.js +10 -5
- package/dist/collection/components/tax-and-cash/sqm-docusign-form/useDocusignForm.js +11 -5
- package/dist/collection/components/tax-and-cash/sqm-indirect-tax-form/sqm-indirect-tax-form-view.js +1 -1
- package/dist/collection/components/tax-and-cash/sqm-indirect-tax-form/useIndirectTaxForm.js +46 -40
- package/dist/collection/components/tax-and-cash/sqm-payout-details-card/sqm-payout-details-card-view.js +5 -5
- package/dist/collection/components/tax-and-cash/sqm-payout-status-alert/PayoutStatusAlert.stories.js +13 -0
- package/dist/collection/components/tax-and-cash/sqm-payout-status-alert/sqm-payout-status-alert-view.js +98 -7
- package/dist/collection/components/tax-and-cash/sqm-payout-status-alert/sqm-payout-status-alert.js +361 -8
- package/dist/collection/components/tax-and-cash/sqm-payout-status-alert/usePayoutStatus.js +29 -2
- package/dist/collection/components/tax-and-cash/sqm-tax-and-cash/LoadingView.js +17 -29
- package/dist/collection/components/tax-and-cash/sqm-tax-and-cash/sqm-tax-and-cash.js +311 -11
- package/dist/collection/components/tax-and-cash/sqm-tax-and-cash-dashboard/sqm-tax-and-cash-dashboard-view.js +101 -16
- package/dist/collection/components/tax-and-cash/sqm-tax-and-cash-dashboard/sqm-tax-and-cash-dashboard.js +310 -10
- package/dist/collection/components/tax-and-cash/sqm-tax-and-cash-dashboard/useTaxAndCashDashboard.js +7 -1
- package/dist/collection/components/tax-and-cash/sqm-user-info-form/sqm-user-info-form-view.js +22 -13
- 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 +100 -9
- package/dist/collection/global/styles.js +55 -54
- package/dist/collection/global/styles.ts +6 -1
- package/dist/collection/tables/TableSlots.js +6 -6
- package/dist/esm/{IndirectTaxDetailsView-8dec05e4.js → IndirectTaxDetailsView-a7dd6e4c.js} +2 -2
- package/dist/esm/{ShadowViewAddon-7a242b65.js → ShadowViewAddon-fe2896cb.js} +25 -27
- package/dist/esm/{data-acdb790f.js → data-68816061.js} +29 -2
- package/dist/esm/{global-58a69018.js → global-536c422d.js} +55 -54
- 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 +355 -102
- package/dist/esm/sqm-big-stat_47.entry.js +232 -22
- package/dist/esm/sqm-code-verification.entry.js +1 -1
- package/dist/esm/sqm-email-verification.entry.js +7 -4
- package/dist/esm/sqm-empty_4.entry.js +1 -1
- package/dist/esm/{sqm-form-message.entry.js → sqm-form-message_2.entry.js} +50 -1
- package/dist/esm/sqm-header-logo.entry.js +15 -2
- package/dist/esm/{sqm-lead-checkbox-field-view-81541e40.js → sqm-lead-checkbox-field-view-5c387852.js} +1 -1
- package/dist/esm/sqm-lead-checkbox-field.entry.js +3 -3
- package/dist/esm/{sqm-lead-input-field-view-d543d939.js → sqm-lead-input-field-view-fa2488c9.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 +2 -2
- package/dist/esm/{sqm-portal-email-verification-view-5fb1a99e.js → sqm-portal-email-verification-view-8bbe5fcf.js} +4 -6
- package/dist/esm/sqm-portal-email-verification.entry.js +2 -2
- package/dist/esm/{sqm-portal-profile-view-e3aef106.js → sqm-portal-profile-view-9848caf1.js} +1 -1
- package/dist/esm/sqm-portal-profile.entry.js +2 -2
- package/dist/esm/{sqm-qr-code-view-ea505213.js → sqm-qr-code-view-804b8bb6.js} +1 -5
- package/dist/esm/sqm-qr-code.entry.js +1 -1
- package/dist/esm/sqm-referral-table_11.entry.js +2 -2
- package/dist/esm/sqm-rewards-table_9.entry.js +2 -2
- package/dist/esm/sqm-stencilbook.entry.js +108 -54
- package/dist/esm/{useLeadFormState-8d4b2620.js → useLeadFormState-5a6188da.js} +1 -1
- package/dist/esm/{utils-2695a43e.js → utils-fafc712f.js} +18 -30
- package/dist/esm-es5/{IndirectTaxDetailsView-8dec05e4.js → IndirectTaxDetailsView-a7dd6e4c.js} +1 -1
- package/dist/esm-es5/{ShadowViewAddon-7a242b65.js → ShadowViewAddon-fe2896cb.js} +1 -1
- package/dist/esm-es5/{data-acdb790f.js → data-68816061.js} +2 -2
- package/dist/esm-es5/{global-58a69018.js → global-536c422d.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-form-message_2.entry.js +1 -0
- package/dist/esm-es5/sqm-header-logo.entry.js +1 -1
- package/dist/esm-es5/{sqm-lead-checkbox-field-view-81541e40.js → sqm-lead-checkbox-field-view-5c387852.js} +1 -1
- package/dist/esm-es5/sqm-lead-checkbox-field.entry.js +1 -1
- package/dist/esm-es5/{sqm-lead-input-field-view-d543d939.js → sqm-lead-input-field-view-fa2488c9.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-8bbe5fcf.js +1 -0
- package/dist/esm-es5/sqm-portal-email-verification.entry.js +1 -1
- package/dist/esm-es5/{sqm-portal-profile-view-e3aef106.js → sqm-portal-profile-view-9848caf1.js} +1 -1
- package/dist/esm-es5/sqm-portal-profile.entry.js +1 -1
- package/dist/esm-es5/{sqm-qr-code-view-ea505213.js → sqm-qr-code-view-804b8bb6.js} +1 -1
- package/dist/esm-es5/sqm-qr-code.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-8d4b2620.js → useLeadFormState-5a6188da.js} +1 -1
- package/dist/esm-es5/utils-fafc712f.js +1 -0
- package/dist/mint-components/global/styles.ts +6 -1
- package/dist/mint-components/mint-components.esm.js +1 -1
- package/dist/mint-components/mint-components.js +1 -1
- package/dist/mint-components/{p-c6e8086f.system.entry.js → p-000dc98f.system.entry.js} +1 -1
- package/dist/mint-components/{p-988f236f.js → p-005ee5bf.js} +1 -1
- package/dist/mint-components/{p-0c024cf0.system.entry.js → p-05e8620f.system.entry.js} +1 -1
- package/dist/mint-components/p-0d3803a2.js +1 -0
- package/dist/mint-components/p-10aea972.system.js +1 -0
- package/dist/mint-components/{p-13c6673e.system.js → p-19e407bd.system.js} +1 -1
- package/dist/mint-components/{p-4cc72a4e.system.js → p-1e156272.system.js} +1 -1
- package/dist/mint-components/{p-a470e203.entry.js → p-2192a6d7.entry.js} +2 -2
- package/dist/mint-components/p-28973c9b.entry.js +144 -0
- package/dist/mint-components/{p-6076dbaf.entry.js → p-30f37386.entry.js} +2 -2
- package/dist/mint-components/{p-1215518e.system.js → p-33fff374.system.js} +1 -1
- package/dist/mint-components/p-397a5adf.system.entry.js +1 -0
- package/dist/mint-components/p-3ad8e1af.system.js +1 -0
- package/dist/mint-components/{p-1aa9136c.js → p-4130caec.js} +1 -1
- package/dist/mint-components/p-438a0c91.system.entry.js +1 -0
- package/dist/mint-components/{p-5fbe6356.system.js → p-48bc3283.system.js} +1 -1
- package/dist/mint-components/{p-36a1fa33.system.entry.js → p-4b595fc3.system.entry.js} +1 -1
- package/dist/mint-components/{p-9d46f87f.system.entry.js → p-4e3303a8.system.entry.js} +1 -1
- package/dist/mint-components/p-566d837b.system.js +1 -0
- package/dist/mint-components/p-59332a30.entry.js +1 -0
- package/dist/mint-components/p-5d39d345.system.entry.js +1 -0
- package/dist/mint-components/{p-d7635535.system.js → p-648f881e.system.js} +1 -1
- package/dist/mint-components/{p-43ad51bc.entry.js → p-66effbef.entry.js} +1 -1
- package/dist/mint-components/p-69bd9de3.entry.js +106 -0
- package/dist/mint-components/{p-bf044217.js → p-78968e5f.js} +1 -1
- package/dist/mint-components/p-7c9520b7.system.js +1 -0
- package/dist/mint-components/p-7e550c3b.system.entry.js +1 -0
- package/dist/mint-components/{p-ad3ebf4d.entry.js → p-80196216.entry.js} +1 -1
- package/dist/mint-components/{p-58c79873.entry.js → p-8a24b9a9.entry.js} +1 -1
- package/dist/mint-components/p-8af550b9.system.entry.js +1 -0
- package/dist/mint-components/{p-deecffd0.system.entry.js → p-8f6b3391.system.entry.js} +1 -1
- package/dist/mint-components/{p-011c0990.system.entry.js → p-902b919d.system.entry.js} +1 -1
- package/dist/mint-components/p-92b5c376.js +157 -0
- package/dist/mint-components/p-a115c57a.system.entry.js +1 -0
- package/dist/mint-components/p-a2dbc9ad.system.js +6 -0
- package/dist/mint-components/{p-f5256738.system.entry.js → p-a45124c1.system.entry.js} +1 -1
- package/dist/mint-components/p-a6198c55.entry.js +273 -0
- package/dist/mint-components/{p-1b79b186.entry.js → p-a65610e3.entry.js} +1 -1
- package/dist/mint-components/{p-f7e49c12.entry.js → p-a7157ef3.entry.js} +2 -2
- package/dist/mint-components/{p-4965dae4.system.js → p-a71edffc.system.js} +1 -1
- package/dist/mint-components/p-a92c692b.js +448 -0
- package/dist/mint-components/p-ab4c0642.js +1 -0
- package/dist/mint-components/{p-8618e8f6.system.js → p-af02f28c.system.js} +1 -1
- package/dist/mint-components/p-af758193.entry.js +1 -0
- package/dist/mint-components/{p-12e6cea7.entry.js → p-b8878552.entry.js} +2 -2
- package/dist/mint-components/p-bdb6194c.entry.js +1 -0
- package/dist/mint-components/p-c37744c7.entry.js +1 -0
- package/dist/mint-components/{p-1d8c5935.js → p-ceb79149.js} +1 -1
- package/dist/mint-components/{p-2ea3eea9.system.entry.js → p-d07a46c6.system.entry.js} +1 -1
- package/dist/mint-components/{p-027c0b10.js → p-d6d31505.js} +32 -32
- package/dist/mint-components/{p-fcf8bdbc.system.entry.js → p-d8d818d9.system.entry.js} +1 -1
- package/dist/mint-components/p-dcdd959e.entry.js +9 -0
- package/dist/mint-components/p-e0c7640f.js +1 -0
- package/dist/mint-components/{p-e19f0908.entry.js → p-e712a01d.entry.js} +2 -2
- package/dist/mint-components/p-ede77156.system.entry.js +1 -0
- package/dist/mint-components/{p-f3613921.system.entry.js → p-f380bcd9.system.entry.js} +1 -1
- package/dist/mint-components/{p-088f082f.js → p-f6305644.js} +1 -1
- package/dist/types/components/sqm-form-message/FormMessage.stories.d.ts +1 -0
- package/dist/types/components/sqm-form-message/sqm-form-message.d.ts +6 -0
- package/dist/types/components/sqm-header-logo/sqm-header-logo.d.ts +17 -2
- package/dist/types/components/sqm-skeleton/Skeleton.stories.d.ts +8 -0
- package/dist/types/components/sqm-skeleton/sqm-skeleton.d.ts +14 -0
- package/dist/types/components/tax-and-cash/sqm-indirect-tax-form/useIndirectTaxForm.d.ts +24 -0
- package/dist/types/components/tax-and-cash/sqm-payout-status-alert/PayoutStatusAlert.stories.d.ts +7 -0
- package/dist/types/components/tax-and-cash/sqm-payout-status-alert/sqm-payout-status-alert-view.d.ts +16 -0
- package/dist/types/components/tax-and-cash/sqm-payout-status-alert/sqm-payout-status-alert.d.ts +57 -0
- package/dist/types/components/tax-and-cash/sqm-payout-status-alert/usePayoutStatus.d.ts +3 -1
- package/dist/types/components/tax-and-cash/sqm-tax-and-cash/sqm-tax-and-cash.d.ts +48 -0
- package/dist/types/components/tax-and-cash/sqm-tax-and-cash-dashboard/sqm-tax-and-cash-dashboard-view.d.ts +12 -0
- package/dist/types/components/tax-and-cash/sqm-tax-and-cash-dashboard/sqm-tax-and-cash-dashboard.d.ts +48 -0
- package/dist/types/components/tax-and-cash/sqm-user-info-form/sqm-user-info-form-view.d.ts +2 -0
- package/dist/types/components/tax-and-cash/sqm-user-info-form/useUserInfoForm.d.ts +1 -0
- package/dist/types/components.d.ts +376 -43
- package/dist/types/global/android.d.ts +7 -0
- package/dist/types/global/demo.d.ts +2 -0
- package/dist/types/saasquatch.d.ts +4 -0
- package/dist/types/stories/features.d.ts +4 -0
- package/dist/types/stories/templates.d.ts +4 -0
- 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-form-message.entry.js +0 -1
- package/dist/esm-es5/sqm-portal-email-verification-view-5fb1a99e.js +0 -1
- package/dist/esm-es5/utils-2695a43e.js +0 -1
- package/dist/mint-components/p-012d31bc.entry.js +0 -99
- package/dist/mint-components/p-0d71303d.js +0 -1
- package/dist/mint-components/p-2ea6e2fa.entry.js +0 -273
- package/dist/mint-components/p-303b84d7.system.entry.js +0 -1
- package/dist/mint-components/p-325c5476.js +0 -1
- package/dist/mint-components/p-469a6450.system.js +0 -6
- package/dist/mint-components/p-478ad7c8.system.entry.js +0 -1
- package/dist/mint-components/p-6976099f.entry.js +0 -9
- package/dist/mint-components/p-752ede25.system.entry.js +0 -1
- package/dist/mint-components/p-78dda262.system.js +0 -1
- package/dist/mint-components/p-829cb9ed.system.entry.js +0 -1
- package/dist/mint-components/p-8d9fa981.system.js +0 -1
- package/dist/mint-components/p-947bacd1.system.js +0 -1
- package/dist/mint-components/p-97747228.system.entry.js +0 -1
- package/dist/mint-components/p-a7ee19dc.entry.js +0 -1
- package/dist/mint-components/p-a974c549.js +0 -1
- package/dist/mint-components/p-ac9138fd.entry.js +0 -1
- package/dist/mint-components/p-d88d8ffe.entry.js +0 -1
- package/dist/mint-components/p-dc5bca55.entry.js +0 -1
- package/dist/mint-components/p-e1e7d01c.js +0 -157
- package/dist/mint-components/p-e8bda98a.system.entry.js +0 -1
- package/dist/mint-components/p-ee3a7577.entry.js +0 -144
- package/dist/mint-components/p-eea87fdc.system.entry.js +0 -1
- package/dist/mint-components/p-f5820d03.system.js +0 -1
- package/dist/mint-components/p-ffc3cd7c.js +0 -448
|
@@ -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-94f36ad7.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-d39b895d.js');
|
|
20
|
+
const utils$1 = require('./utils-5ecfecd9.js');
|
|
21
21
|
const keys = require('./keys-cff24974.js');
|
|
22
|
-
const data = require('./data-
|
|
22
|
+
const data = require('./data-44260010.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;
|
|
@@ -903,10 +903,6 @@ function useBankingInfoForm(props) {
|
|
|
903
903
|
const paymentMethodChecked = !hasPayPal
|
|
904
904
|
? "toBankAccount"
|
|
905
905
|
: _paymentMethodChecked;
|
|
906
|
-
domContextHooks_module.useEffect(() => {
|
|
907
|
-
// reset redirect hash
|
|
908
|
-
window.location.hash = "";
|
|
909
|
-
}, []);
|
|
910
906
|
domContextHooks_module.useEffect(() => {
|
|
911
907
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
912
908
|
if (!userData)
|
|
@@ -1078,6 +1074,7 @@ function useBankingInfoForm(props) {
|
|
|
1078
1074
|
}
|
|
1079
1075
|
await runMutation(formData, token);
|
|
1080
1076
|
setShowModal(false);
|
|
1077
|
+
window.location.hash = "";
|
|
1081
1078
|
};
|
|
1082
1079
|
const onVerification = async (token) => {
|
|
1083
1080
|
host.dispatchEvent(new CustomEvent(keys.VERIFICATION_EVENT_KEY, {
|
|
@@ -1107,7 +1104,15 @@ function useBankingInfoForm(props) {
|
|
|
1107
1104
|
setBankCountry: updateBankCountry,
|
|
1108
1105
|
setPaymentMethodChecked,
|
|
1109
1106
|
setPaymentScheduleChecked,
|
|
1110
|
-
onBack: () =>
|
|
1107
|
+
onBack: () => {
|
|
1108
|
+
// return to dashboard
|
|
1109
|
+
if (window.location.hash) {
|
|
1110
|
+
window.location.hash = "";
|
|
1111
|
+
}
|
|
1112
|
+
else {
|
|
1113
|
+
setStep("/dashboard");
|
|
1114
|
+
}
|
|
1115
|
+
},
|
|
1111
1116
|
setCountrySearch,
|
|
1112
1117
|
onVerification,
|
|
1113
1118
|
onVerificationHide: () => onVerification(null),
|
|
@@ -1780,11 +1785,17 @@ function useDocusignForm(props) {
|
|
|
1780
1785
|
}
|
|
1781
1786
|
};
|
|
1782
1787
|
const progressStep = () => {
|
|
1783
|
-
|
|
1784
|
-
|
|
1785
|
-
|
|
1786
|
-
|
|
1787
|
-
|
|
1788
|
+
// return to dashboard
|
|
1789
|
+
if (window.location.hash) {
|
|
1790
|
+
window.location.hash = "";
|
|
1791
|
+
}
|
|
1792
|
+
else {
|
|
1793
|
+
setStep(context.overrideNextStep ||
|
|
1794
|
+
!!(publisher === null || publisher === void 0 ? void 0 : publisher.withdrawalSettings) ||
|
|
1795
|
+
!(publisher === null || publisher === void 0 ? void 0 : publisher.brandedSignup)
|
|
1796
|
+
? "/dashboard"
|
|
1797
|
+
: "/4");
|
|
1798
|
+
}
|
|
1788
1799
|
};
|
|
1789
1800
|
const allLoading = userLoading || documentLoading || loading;
|
|
1790
1801
|
return {
|
|
@@ -2473,7 +2484,7 @@ const IndirectTaxFormView = (props) => {
|
|
|
2473
2484
|
}, {
|
|
2474
2485
|
supportLink: (index.h("a", { target: "_blank", href: `mailto:advocate-support@impact.com` }, text.supportLink)),
|
|
2475
2486
|
}))),
|
|
2476
|
-
states.isPartner && (index.h("sqm-form-message", { type: "info" },
|
|
2487
|
+
states.isPartner && (index.h("sqm-form-message", { loading: states.loading, type: "info" },
|
|
2477
2488
|
index.h("p", { part: "alert-title" }, text.isPartnerAlertHeader),
|
|
2478
2489
|
global.intl.formatMessage({
|
|
2479
2490
|
id: "isPartnerAlertDescription",
|
|
@@ -2611,8 +2622,51 @@ function useIndirectTaxForm(props) {
|
|
|
2611
2622
|
console.error("Could not detect select change");
|
|
2612
2623
|
setFormState((p) => ({ ...p, [field]: value }));
|
|
2613
2624
|
};
|
|
2614
|
-
|
|
2625
|
+
async function connectPartner(formData) {
|
|
2615
2626
|
var _a, _b, _c, _d, _e;
|
|
2627
|
+
const vars = {
|
|
2628
|
+
user: {
|
|
2629
|
+
id: user.id,
|
|
2630
|
+
accountId: user.accountId,
|
|
2631
|
+
},
|
|
2632
|
+
firstName: userForm.firstName,
|
|
2633
|
+
lastName: userForm.lastName,
|
|
2634
|
+
countryCode: userForm.countryCode,
|
|
2635
|
+
currency: userForm.currency,
|
|
2636
|
+
address: userForm.address,
|
|
2637
|
+
city: userForm.city,
|
|
2638
|
+
state: userForm.state,
|
|
2639
|
+
postalCode: userForm.postalCode,
|
|
2640
|
+
phoneNumber: userForm.phoneNumber,
|
|
2641
|
+
phoneNumberCountryCode: userForm.phoneNumberCountryCode,
|
|
2642
|
+
indirectTaxCountryCode: formData.selectedRegion,
|
|
2643
|
+
indirectTaxRegion: formData.province || formData.subRegion,
|
|
2644
|
+
indirectTaxId: formData.indirectTaxNumber,
|
|
2645
|
+
additionalTaxId: formData.qstNumber,
|
|
2646
|
+
withholdingTaxId: formData.subRegionTaxNumber,
|
|
2647
|
+
};
|
|
2648
|
+
const result = await connectImpactPartner({
|
|
2649
|
+
vars,
|
|
2650
|
+
});
|
|
2651
|
+
if (!result || ((_a = result) === null || _a === void 0 ? void 0 : _a.message))
|
|
2652
|
+
throw new Error();
|
|
2653
|
+
if (!((_b = result.createImpactConnection) === null || _b === void 0 ? void 0 : _b.success)) {
|
|
2654
|
+
// Output backend errors to console for now
|
|
2655
|
+
console.error("Failed to create Impact connection: ", result.createImpactConnection.validationErrors);
|
|
2656
|
+
throw new Error();
|
|
2657
|
+
}
|
|
2658
|
+
await refetch();
|
|
2659
|
+
const resultPublisher = (_e = (_d = (_c = result
|
|
2660
|
+
.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;
|
|
2661
|
+
const hasValidCurrentDocument = utils$1.validTaxDocument(resultPublisher === null || resultPublisher === void 0 ? void 0 : resultPublisher.requiredTaxDocumentType) && (resultPublisher === null || resultPublisher === void 0 ? void 0 : resultPublisher.currentTaxDocument);
|
|
2662
|
+
// Fire form change event
|
|
2663
|
+
window.dispatchEvent(new Event(data.TAX_FORM_UPDATED_EVENT_KEY));
|
|
2664
|
+
return {
|
|
2665
|
+
resultPublisher,
|
|
2666
|
+
hasValidCurrentDocument,
|
|
2667
|
+
};
|
|
2668
|
+
}
|
|
2669
|
+
const onSubmit = async (event) => {
|
|
2616
2670
|
if (!option) {
|
|
2617
2671
|
setErrors({ taxDetails: true });
|
|
2618
2672
|
return;
|
|
@@ -2638,44 +2692,7 @@ function useIndirectTaxForm(props) {
|
|
|
2638
2692
|
}
|
|
2639
2693
|
setLoading(true);
|
|
2640
2694
|
try {
|
|
2641
|
-
const
|
|
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));
|
|
2695
|
+
const { resultPublisher, hasValidCurrentDocument } = await connectPartner(formData);
|
|
2679
2696
|
if ((resultPublisher === null || resultPublisher === void 0 ? void 0 : resultPublisher.requiredTaxDocumentType) &&
|
|
2680
2697
|
!hasValidCurrentDocument) {
|
|
2681
2698
|
// Go to docusign form
|
|
@@ -3254,7 +3271,7 @@ function LoadingSlot() {
|
|
|
3254
3271
|
return (index.h("slot", { name: "loading" }, index.h(LoadingRow, null), index.h(LoadingRow, null), index.h(LoadingRow, null), index.h(LoadingRow, null)));
|
|
3255
3272
|
}
|
|
3256
3273
|
function LoadingRow() {
|
|
3257
|
-
return (index.h("sqm-table-row", null, index.h("sqm-table-cell", { colspan: 6 }, index.h("
|
|
3274
|
+
return (index.h("sqm-table-row", null, index.h("sqm-table-cell", { colspan: 6 }, index.h("sqm-skeleton", null))));
|
|
3258
3275
|
}
|
|
3259
3276
|
function useInvoiceTableDemo(props, emptyElement, loadingElement) {
|
|
3260
3277
|
const [content, setContent] = domContextHooks_module.useReducer((state, next) => ({
|
|
@@ -3540,11 +3557,11 @@ function PayoutDetailsCardView(props) {
|
|
|
3540
3557
|
const { states, text } = props;
|
|
3541
3558
|
const renderLoadingSkeleton = () => {
|
|
3542
3559
|
return (index.h("div", { class: classes.CardContainer },
|
|
3543
|
-
index.h("div", { class: classes.StatusContainer },
|
|
3544
|
-
index.h("
|
|
3545
|
-
index.h("
|
|
3546
|
-
index.h("
|
|
3547
|
-
index.h("
|
|
3560
|
+
index.h("div", { class: classes.StatusContainer, style: { display: "block" } },
|
|
3561
|
+
index.h("sqm-skeleton", { style: { marginBottom: "var(--sl-spacing-medium)" }, width: "25%", height: "16px" }),
|
|
3562
|
+
index.h("sqm-skeleton", { width: "25%", height: "24px" })),
|
|
3563
|
+
index.h("sqm-skeleton", { width: "50%", height: "34px" }),
|
|
3564
|
+
index.h("sqm-skeleton", { width: "25%", height: "16px" })));
|
|
3548
3565
|
};
|
|
3549
3566
|
const renderStatusBadge = (status, statusBadgeText) => {
|
|
3550
3567
|
const badgeType = status === "nextPayout" ? "success" : "primary";
|
|
@@ -3817,16 +3834,6 @@ const style$5 = {
|
|
|
3817
3834
|
EditBankDetailsButton: {
|
|
3818
3835
|
marginTop: "var(--sl-spacing-large)",
|
|
3819
3836
|
},
|
|
3820
|
-
SkeletonOne: {
|
|
3821
|
-
width: "15%",
|
|
3822
|
-
height: "10px",
|
|
3823
|
-
},
|
|
3824
|
-
SkeletonTwo: {
|
|
3825
|
-
width: "25%",
|
|
3826
|
-
height: "24px",
|
|
3827
|
-
top: "var(--sl-spacing-small)",
|
|
3828
|
-
marginBottom: "var(--sl-spacing-x-small)",
|
|
3829
|
-
},
|
|
3830
3837
|
TaxSectionSkeletonContainer: {
|
|
3831
3838
|
display: "flex",
|
|
3832
3839
|
flexDirection: "column",
|
|
@@ -3916,6 +3923,11 @@ const style$5 = {
|
|
|
3916
3923
|
SubduedText: {
|
|
3917
3924
|
color: "var(--sqm-text-subdued)",
|
|
3918
3925
|
},
|
|
3926
|
+
ButtonContainer: {
|
|
3927
|
+
display: "flex",
|
|
3928
|
+
gap: "var(--sl-spacing-medium)",
|
|
3929
|
+
flexWrap: "wrap",
|
|
3930
|
+
},
|
|
3919
3931
|
};
|
|
3920
3932
|
const sheet$4 = JSS.createStyleSheet(style$5);
|
|
3921
3933
|
const styleString$4 = sheet$4.toString();
|
|
@@ -4028,7 +4040,7 @@ const TaxAndCashDashboardView = (props) => {
|
|
|
4028
4040
|
icon: "exclamation-octagon",
|
|
4029
4041
|
class: sheet$4.classes.ErrorHoldAlertContainer,
|
|
4030
4042
|
};
|
|
4031
|
-
case "
|
|
4043
|
+
case "NEW_PAYEE_REVIEW":
|
|
4032
4044
|
return {
|
|
4033
4045
|
header: text.accountReviewHeader,
|
|
4034
4046
|
description: global.intl.formatMessage({
|
|
@@ -4042,6 +4054,96 @@ const TaxAndCashDashboardView = (props) => {
|
|
|
4042
4054
|
icon: "exclamation-triangle",
|
|
4043
4055
|
class: sheet$4.classes.WarningHoldAlertContainer,
|
|
4044
4056
|
};
|
|
4057
|
+
case "PAYMENT_HOLD_ON_CHANGE":
|
|
4058
|
+
return {
|
|
4059
|
+
header: text.paymentHoldOnChangeHeader,
|
|
4060
|
+
description: global.intl.formatMessage({
|
|
4061
|
+
id: "accountReviewDescription",
|
|
4062
|
+
defaultMessage: text.paymentHoldOnChangeDescription,
|
|
4063
|
+
}, {
|
|
4064
|
+
supportLink: (index.h("a", { target: "_blank", href: `mailto:advocate-support@impact.com` }, text.supportLink)),
|
|
4065
|
+
}),
|
|
4066
|
+
buttonText: null,
|
|
4067
|
+
alertType: "warning",
|
|
4068
|
+
icon: "exclamation-triangle",
|
|
4069
|
+
class: sheet$4.classes.WarningHoldAlertContainer,
|
|
4070
|
+
};
|
|
4071
|
+
case "BENEFICIARY_NAME_INVALID":
|
|
4072
|
+
return {
|
|
4073
|
+
header: text.beneficiaryNameInvalidHeader,
|
|
4074
|
+
description: global.intl.formatMessage({
|
|
4075
|
+
id: "accountReviewDescription",
|
|
4076
|
+
defaultMessage: text.beneficiaryNameInvalidDescription,
|
|
4077
|
+
}, {
|
|
4078
|
+
supportLink: (index.h("a", { target: "_blank", href: `mailto:advocate-support@impact.com` }, text.supportLink)),
|
|
4079
|
+
}),
|
|
4080
|
+
button: (index.h("div", { class: sheet$4.classes.ButtonContainer },
|
|
4081
|
+
index.h("sl-button", { disabled: states.disabled || states.loading, type: "primary", class: sheet$4.classes.EditBankDetailsButton, onClick: callbacks.onEditPayoutInfo }, text.editPaymentInformationButton),
|
|
4082
|
+
index.h("sl-button", { disabled: states.disabled || states.loading, type: "default", class: sheet$4.classes.EditBankDetailsButton, onClick: callbacks.onNewFormClick }, text.newFormButton))),
|
|
4083
|
+
alertType: "warning",
|
|
4084
|
+
icon: "exclamation-triangle",
|
|
4085
|
+
class: sheet$4.classes.WarningHoldAlertContainer,
|
|
4086
|
+
};
|
|
4087
|
+
case "BENEFICIARY_NAME_MISMATCH":
|
|
4088
|
+
return {
|
|
4089
|
+
header: text.beneficiaryNameMismatchHeader,
|
|
4090
|
+
description: global.intl.formatMessage({
|
|
4091
|
+
id: "accountReviewDescription",
|
|
4092
|
+
defaultMessage: text.beneficiaryNameMismatchDescription,
|
|
4093
|
+
}, {
|
|
4094
|
+
supportLink: (index.h("a", { target: "_blank", href: `mailto:advocate-support@impact.com` }, text.supportLink)),
|
|
4095
|
+
}),
|
|
4096
|
+
button: (index.h("div", { class: sheet$4.classes.ButtonContainer },
|
|
4097
|
+
index.h("sl-button", { disabled: states.disabled || states.loading, type: "primary", class: sheet$4.classes.EditBankDetailsButton, onClick: callbacks.onEditPayoutInfo }, text.editPaymentInformationButton),
|
|
4098
|
+
index.h("sl-button", { disabled: states.disabled || states.loading, type: "default", class: sheet$4.classes.EditBankDetailsButton, onClick: callbacks.onNewFormClick }, text.newFormButton))),
|
|
4099
|
+
alertType: "warning",
|
|
4100
|
+
icon: "exclamation-triangle",
|
|
4101
|
+
class: sheet$4.classes.WarningHoldAlertContainer,
|
|
4102
|
+
};
|
|
4103
|
+
case "BANK_TAX_NAME_MISMATCH":
|
|
4104
|
+
return {
|
|
4105
|
+
header: text.bankTaxNameMismatchHeader,
|
|
4106
|
+
description: global.intl.formatMessage({
|
|
4107
|
+
id: "accountReviewDescription",
|
|
4108
|
+
defaultMessage: text.bankTaxNameMismatchDescription,
|
|
4109
|
+
}, {
|
|
4110
|
+
supportLink: (index.h("a", { target: "_blank", href: `mailto:advocate-support@impact.com` }, text.supportLink)),
|
|
4111
|
+
}),
|
|
4112
|
+
button: (index.h("div", { class: sheet$4.classes.ButtonContainer },
|
|
4113
|
+
index.h("sl-button", { disabled: states.disabled || states.loading, type: "primary", class: sheet$4.classes.EditBankDetailsButton, onClick: callbacks.onEditPayoutInfo }, text.editPaymentInformationButton),
|
|
4114
|
+
index.h("sl-button", { disabled: states.disabled || states.loading, type: "default", class: sheet$4.classes.EditBankDetailsButton, onClick: callbacks.onNewFormClick }, text.newFormButton))),
|
|
4115
|
+
alertType: "warning",
|
|
4116
|
+
icon: "exclamation-triangle",
|
|
4117
|
+
class: sheet$4.classes.WarningHoldAlertContainer,
|
|
4118
|
+
};
|
|
4119
|
+
case "WITHDRAWAL_SETTINGS_INVALID":
|
|
4120
|
+
return {
|
|
4121
|
+
header: text.withdrawalSettingsInvalidHeader,
|
|
4122
|
+
description: global.intl.formatMessage({
|
|
4123
|
+
id: "accountReviewDescription",
|
|
4124
|
+
defaultMessage: text.withdrawalSettingsInvalidDescription,
|
|
4125
|
+
}, {
|
|
4126
|
+
supportLink: (index.h("a", { target: "_blank", href: `mailto:advocate-support@impact.com` }, text.supportLink)),
|
|
4127
|
+
}),
|
|
4128
|
+
button: (index.h("sl-button", { disabled: states.disabled || states.loading, type: "default", class: sheet$4.classes.EditBankDetailsButton, onClick: callbacks.onEditPayoutInfo }, text.editPaymentInformationButton)),
|
|
4129
|
+
alertType: "warning",
|
|
4130
|
+
icon: "exclamation-triangle",
|
|
4131
|
+
class: sheet$4.classes.WarningHoldAlertContainer,
|
|
4132
|
+
};
|
|
4133
|
+
case "PAYMENT_RETURNED":
|
|
4134
|
+
return {
|
|
4135
|
+
header: text.paymentReturnedHeader,
|
|
4136
|
+
description: global.intl.formatMessage({
|
|
4137
|
+
id: "accountReviewDescription",
|
|
4138
|
+
defaultMessage: text.paymentReturnedDescription,
|
|
4139
|
+
}, {
|
|
4140
|
+
supportLink: (index.h("a", { target: "_blank", href: `mailto:advocate-support@impact.com` }, text.supportLink)),
|
|
4141
|
+
}),
|
|
4142
|
+
button: (index.h("sl-button", { disabled: states.disabled || states.loading, type: "primary", class: sheet$4.classes.EditBankDetailsButton, onClick: callbacks.onEditPayoutInfo }, text.editPaymentInformationButton)),
|
|
4143
|
+
alertType: "error",
|
|
4144
|
+
icon: "exclamation-triangle",
|
|
4145
|
+
class: sheet$4.classes.WarningHoldAlertContainer,
|
|
4146
|
+
};
|
|
4045
4147
|
case "HOLD":
|
|
4046
4148
|
return {
|
|
4047
4149
|
header: text.payoutHoldAlertHeader,
|
|
@@ -4167,7 +4269,7 @@ const TaxAndCashDashboardView = (props) => {
|
|
|
4167
4269
|
}, {
|
|
4168
4270
|
supportLink: (index.h("a", { target: "_blank", href: `mailto:advocate-support@impact.com` }, text.supportLink)),
|
|
4169
4271
|
}))),
|
|
4170
|
-
alertInfo && (index.h("sqm-form-message", { exportparts: "base: alert-base, icon:alert-icon", type: alertInfo === null || alertInfo === void 0 ? void 0 : alertInfo.alertType, class: alertInfo === null || alertInfo === void 0 ? void 0 : alertInfo.class, icon: alertInfo === null || alertInfo === void 0 ? void 0 : alertInfo.icon, transparent: true },
|
|
4272
|
+
alertInfo && (index.h("sqm-form-message", { loading: states.loading, exportparts: "base: alert-base, icon:alert-icon", type: alertInfo === null || alertInfo === void 0 ? void 0 : alertInfo.alertType, class: alertInfo === null || alertInfo === void 0 ? void 0 : alertInfo.class, icon: alertInfo === null || alertInfo === void 0 ? void 0 : alertInfo.icon, transparent: true },
|
|
4171
4273
|
index.h("strong", null, alertInfo.header),
|
|
4172
4274
|
index.h("p", { style: { margin: "0" } }, alertInfo.description),
|
|
4173
4275
|
alertInfo.buttonText && (index.h("sl-button", { style: { marginTop: "var(--sl-spacing-x-small)" }, type: "default", loading: states.veriffLoading, onClick: () => callbacks.onVerifyClick() }, alertInfo.buttonText)),
|
|
@@ -4185,8 +4287,8 @@ const TaxAndCashDashboardView = (props) => {
|
|
|
4185
4287
|
states.canEditPayoutInfo && (index.h("sl-button", { disabled: states.disabled || states.loading, exportparts: "base: secondarybutton-base", type: "secondary", class: sheet$4.classes.EditBankDetailsButton, onClick: callbacks.onEditPayoutInfo }, text.editPaymentInformationButton)))),
|
|
4186
4288
|
(!states.noFormNeeded || states.status === "NOT_VERIFIED") && (index.h("div", { class: sheet$4.classes.TaxDocumentsContainer },
|
|
4187
4289
|
index.h("div", null, states.loading ? (index.h("div", { class: sheet$4.classes.TaxSectionSkeletonContainer },
|
|
4188
|
-
index.h("
|
|
4189
|
-
index.h("
|
|
4290
|
+
index.h("sqm-skeleton", { width: "15%", height: "10px" }),
|
|
4291
|
+
index.h("sqm-skeleton", { width: "25%", height: "24px" }))) : (index.h("div", null,
|
|
4190
4292
|
index.h("div", null,
|
|
4191
4293
|
index.h("span", { class: sheet$4.classes.TaxFormDetailsContainer },
|
|
4192
4294
|
index.h("div", { class: sheet$4.classes.StatusContainer },
|
|
@@ -4200,8 +4302,8 @@ const TaxAndCashDashboardView = (props) => {
|
|
|
4200
4302
|
states.noFormNeeded &&
|
|
4201
4303
|
states.status !== "NOT_VERIFIED" && (index.h("sl-button", { disabled: states.disabled || states.loading, onClick: callbacks.onClick, type: "default", class: sheet$4.classes.NewFormButton, exportparts: "base: primarybutton-base" }, text.newFormButton)))))))),
|
|
4202
4304
|
index.h("div", { class: sheet$4.classes.IndirectTaxPreviewContainer }, states.loading ? (index.h("div", { class: sheet$4.classes.TaxSectionSkeletonContainer },
|
|
4203
|
-
index.h("
|
|
4204
|
-
index.h("
|
|
4305
|
+
index.h("sqm-skeleton", { width: "15%", height: "10px" }),
|
|
4306
|
+
index.h("sqm-skeleton", { width: "25%", height: "24px" }))) : (index.h("div", null,
|
|
4205
4307
|
index.h("h3", { class: sheet$4.classes.IndirectTaxPreviewHeaderContainer },
|
|
4206
4308
|
text.indirectTaxInfoSectionHeader,
|
|
4207
4309
|
index.h("sl-tooltip", { trigger: "hover", placement: "right", content: text.indirectTaxTooltipSupport, class: sheet$4.classes.TooltipContainer },
|
|
@@ -4298,8 +4400,14 @@ const useTaxAndCashDashboard = (props) => {
|
|
|
4298
4400
|
domContextHooks_module.useEffect(() => {
|
|
4299
4401
|
// Clear override context once on submitted
|
|
4300
4402
|
setContext({});
|
|
4301
|
-
if (window.location.hash)
|
|
4403
|
+
if (window.location.hash) {
|
|
4404
|
+
setContext({
|
|
4405
|
+
overrideNextStep: "/dashboard",
|
|
4406
|
+
overrideBackStep: "/dashboard",
|
|
4407
|
+
hideSteps: true,
|
|
4408
|
+
});
|
|
4302
4409
|
setStep(`/${window.location.hash.replace("#", "")}`);
|
|
4410
|
+
}
|
|
4303
4411
|
}, []);
|
|
4304
4412
|
const { data: data$1, loading, errors: userError, refetch, } = index_module.$n(data.USER_QUERY_NAMESPACE);
|
|
4305
4413
|
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;
|
|
@@ -4504,12 +4612,12 @@ const TaxAndCashDashboard = class {
|
|
|
4504
4612
|
/**
|
|
4505
4613
|
* @uiName Submit new tax form button label
|
|
4506
4614
|
*/
|
|
4507
|
-
this.newFormButton = "Submit new form";
|
|
4615
|
+
this.newFormButton = "Submit new tax form";
|
|
4508
4616
|
/**
|
|
4509
4617
|
*
|
|
4510
4618
|
* @uiName Edit payment info button label
|
|
4511
4619
|
*/
|
|
4512
|
-
this.editPaymentInformationButton = "Edit
|
|
4620
|
+
this.editPaymentInformationButton = "Edit payout information";
|
|
4513
4621
|
/**
|
|
4514
4622
|
* @uiName Not registered for indirect tax text
|
|
4515
4623
|
* @uiWidget textArea
|
|
@@ -4570,7 +4678,7 @@ const TaxAndCashDashboard = class {
|
|
|
4570
4678
|
/**
|
|
4571
4679
|
* @uiName Verification required internal alert header
|
|
4572
4680
|
*/
|
|
4573
|
-
this.verificationRequiredInternalHeader = "Identity
|
|
4681
|
+
this.verificationRequiredInternalHeader = "Identity verification in progress";
|
|
4574
4682
|
/**
|
|
4575
4683
|
* @uiName Verification required internal alert description
|
|
4576
4684
|
*/
|
|
@@ -4578,7 +4686,7 @@ const TaxAndCashDashboard = class {
|
|
|
4578
4686
|
/**
|
|
4579
4687
|
* @uiName Verification review internal alert header
|
|
4580
4688
|
*/
|
|
4581
|
-
this.verificationReviewInternalHeader = "Identity
|
|
4689
|
+
this.verificationReviewInternalHeader = "Identity verification under review";
|
|
4582
4690
|
/**
|
|
4583
4691
|
* @uiName Verification review internal alert description
|
|
4584
4692
|
*/
|
|
@@ -4586,7 +4694,7 @@ const TaxAndCashDashboard = class {
|
|
|
4586
4694
|
/**
|
|
4587
4695
|
* @uiName Verification failed internal alert header
|
|
4588
4696
|
*/
|
|
4589
|
-
this.verificationFailedInternalHeader = "Identity
|
|
4697
|
+
this.verificationFailedInternalHeader = "Identity verification unsuccessful";
|
|
4590
4698
|
/**
|
|
4591
4699
|
* @uiName Verification failed internal alert description
|
|
4592
4700
|
*/
|
|
@@ -4612,6 +4720,54 @@ const TaxAndCashDashboard = class {
|
|
|
4612
4720
|
* @uiName Account review alert description
|
|
4613
4721
|
*/
|
|
4614
4722
|
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}.";
|
|
4723
|
+
/**
|
|
4724
|
+
* @uiName Payment hold on change alert header
|
|
4725
|
+
*/
|
|
4726
|
+
this.paymentHoldOnChangeHeader = "We are reviewing your new payout settings";
|
|
4727
|
+
/**
|
|
4728
|
+
* @uiName Payment hold on change alert description
|
|
4729
|
+
*/
|
|
4730
|
+
this.paymentHoldOnChangeDescription = "Your payout is temporarily on hold while we review your new payment information, this process is usually resolved within 48 hours.";
|
|
4731
|
+
/**
|
|
4732
|
+
* @uiName Beneficiary name invalid alert header
|
|
4733
|
+
*/
|
|
4734
|
+
this.beneficiaryNameInvalidHeader = "Your payment information does not match your tax form";
|
|
4735
|
+
/**
|
|
4736
|
+
* @uiName Beneficiary name invalid description
|
|
4737
|
+
*/
|
|
4738
|
+
this.beneficiaryNameInvalidDescription = "The account holder (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.";
|
|
4739
|
+
/**
|
|
4740
|
+
* @uiName Beneficiary name mismatch alert header
|
|
4741
|
+
*/
|
|
4742
|
+
this.beneficiaryNameMismatchHeader = "Your payment information does not match your tax form";
|
|
4743
|
+
/**
|
|
4744
|
+
* @uiName Beneficiary name mismatch alert description
|
|
4745
|
+
*/
|
|
4746
|
+
this.beneficiaryNameMismatchDescription = "The account holder (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.";
|
|
4747
|
+
/**
|
|
4748
|
+
* @uiName Bank name mismatch alert header
|
|
4749
|
+
*/
|
|
4750
|
+
this.bankTaxNameMismatchHeader = "Your payment information does not match your tax form";
|
|
4751
|
+
/**
|
|
4752
|
+
* @uiName Bank name mismatch alert description
|
|
4753
|
+
*/
|
|
4754
|
+
this.bankTaxNameMismatchDescription = "The bank account (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.";
|
|
4755
|
+
/**
|
|
4756
|
+
* @uiName Withdrawal settings invalid alert header
|
|
4757
|
+
*/
|
|
4758
|
+
this.withdrawalSettingsInvalidHeader = "Your payment information is incomplete or includes invalid characters";
|
|
4759
|
+
/**
|
|
4760
|
+
* @uiName Withdrawal settings invalid alert description
|
|
4761
|
+
*/
|
|
4762
|
+
this.withdrawalSettingsInvalidDescription = "There are missing fields or invalid characters in your payment information. Please review your information and make sure it is correct. Your payouts are on hold until this is resolved.";
|
|
4763
|
+
/**
|
|
4764
|
+
* @uiName Payment returned alert header
|
|
4765
|
+
*/
|
|
4766
|
+
this.paymentReturnedHeader = "Payout unsuccessful";
|
|
4767
|
+
/**
|
|
4768
|
+
* @uiName Payment returned alert description
|
|
4769
|
+
*/
|
|
4770
|
+
this.paymentReturnedDescription = "Our recent payment attempt for your earnings was unsuccessful. Please review your payment information and make sure it is correct.";
|
|
4615
4771
|
/**
|
|
4616
4772
|
* @uiName Terms and Conditions text
|
|
4617
4773
|
*/
|
|
@@ -6030,6 +6186,10 @@ const UserInfoFormView = (props) => {
|
|
|
6030
6186
|
default:
|
|
6031
6187
|
regionLabel = text.state;
|
|
6032
6188
|
}
|
|
6189
|
+
function isDisabledInput(field) {
|
|
6190
|
+
var _a;
|
|
6191
|
+
return states.isPartner && !!((_a = data$1.partnerData) === null || _a === void 0 ? void 0 : _a[field]);
|
|
6192
|
+
}
|
|
6033
6193
|
return (index.h("sl-form", { class: classes.FormWrapper, "onSl-submit": callbacks.onSubmit, ref: (el) => (refs.formRef.current = el), novalidate: true },
|
|
6034
6194
|
index.h("style", { type: "text/css" },
|
|
6035
6195
|
styleString$5,
|
|
@@ -6060,7 +6220,7 @@ const UserInfoFormView = (props) => {
|
|
|
6060
6220
|
}, {
|
|
6061
6221
|
supportLink: (index.h("a", { target: "_blank", href: `mailto:advocate-support@impact.com` }, text.supportLink)),
|
|
6062
6222
|
})))),
|
|
6063
|
-
(states.isPartner || states.isUser) && (index.h("sqm-form-message", { type: "info" },
|
|
6223
|
+
(states.isPartner || states.isUser) && (index.h("sqm-form-message", { loading: states.loading, type: "info" },
|
|
6064
6224
|
index.h("p", { part: "alert-title" }, text.isPartnerAlertHeader),
|
|
6065
6225
|
index.h("p", { part: "alert-description" }, global.intl.formatMessage({
|
|
6066
6226
|
id: "isPartnerAlertDescription",
|
|
@@ -6070,18 +6230,22 @@ const UserInfoFormView = (props) => {
|
|
|
6070
6230
|
})))),
|
|
6071
6231
|
index.h("div", null,
|
|
6072
6232
|
index.h("div", { class: classes.InputContainer },
|
|
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 ||
|
|
6233
|
+
index.h("sl-input", Object.assign({ class: "ErrorInput", exportparts: "label: input-label, base: input-base", value: formState.firstName, label: text.firstName, disabled: states.disabled ||
|
|
6234
|
+
states.isUser ||
|
|
6235
|
+
isDisabledInput("firstName") }, (((_b = formState.errors) === null || _b === void 0 ? void 0 : _b.firstName) ? {
|
|
6074
6236
|
class: classes.ErrorInput,
|
|
6075
6237
|
helpText: utils$1.formatErrorMessage(text.firstName, formState.errors.firstName),
|
|
6076
6238
|
}
|
|
6077
6239
|
: {}), { id: "firstName", name: "/firstName", required: true })),
|
|
6078
|
-
index.h("sl-input", Object.assign({ exportparts: "label: input-label, base: input-base", value: formState.lastName, label: text.lastName, disabled: states.disabled ||
|
|
6240
|
+
index.h("sl-input", Object.assign({ exportparts: "label: input-label, base: input-base", value: formState.lastName, label: text.lastName, disabled: states.disabled ||
|
|
6241
|
+
states.isUser ||
|
|
6242
|
+
isDisabledInput("lastName") }, (((_c = formState.errors) === null || _c === void 0 ? void 0 : _c.lastName) ? {
|
|
6079
6243
|
class: classes.ErrorInput,
|
|
6080
6244
|
helpText: utils$1.formatErrorMessage(text.lastName, formState.errors.lastName),
|
|
6081
6245
|
}
|
|
6082
6246
|
: {}), { id: "lastName", name: "/lastName", required: true })),
|
|
6083
6247
|
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 }),
|
|
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 ||
|
|
6248
|
+
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 || isDisabledInput("countryCode") }, (((_d = formState.errors) === null || _d === void 0 ? void 0 : _d.countryCode) ? {
|
|
6085
6249
|
class: classes.ErrorInput,
|
|
6086
6250
|
helpText: utils$1.formatErrorMessage(text.country, formState.errors.countryCode),
|
|
6087
6251
|
}
|
|
@@ -6097,7 +6261,8 @@ const UserInfoFormView = (props) => {
|
|
|
6097
6261
|
index.h("div", { class: classes.PhoneInputsSection },
|
|
6098
6262
|
index.h("p", null, text.phoneNumber),
|
|
6099
6263
|
index.h("div", { class: classes.PhoneInputsContainer },
|
|
6100
|
-
index.h("sl-select", Object.assign({ id: "phoneNumberCountryCode", exportparts: "label: input-label, base: input-base", name: "/phoneNumberCountryCode", value: formState.phoneNumberCountryCode, disabled: states.disabled ||
|
|
6264
|
+
index.h("sl-select", Object.assign({ id: "phoneNumberCountryCode", exportparts: "label: input-label, base: input-base", name: "/phoneNumberCountryCode", value: formState.phoneNumberCountryCode, disabled: states.disabled ||
|
|
6265
|
+
isDisabledInput("phoneNumberCountryCode"), ref: (el) => (refs.phoneCountryRef.current = el) }, (((_g = formState.errors) === null || _g === void 0 ? void 0 : _g.phoneNumberCountryCode) ? {
|
|
6101
6266
|
class: classes.ErrorInput,
|
|
6102
6267
|
}
|
|
6103
6268
|
: {}), { required: true, "onSl-select": (e) => callbacks.onFormChange("phoneCountry", e) }),
|
|
@@ -6123,7 +6288,7 @@ const UserInfoFormView = (props) => {
|
|
|
6123
6288
|
// Naive phone number validation
|
|
6124
6289
|
utils$1.validateBillingField(/[a-zA-Z]+/, value) &&
|
|
6125
6290
|
utils$1.formatErrorMessage(text.phoneNumber, text.error.fieldInvalidError);
|
|
6126
|
-
}, disabled: states.disabled ||
|
|
6291
|
+
}, disabled: states.disabled || isDisabledInput("phoneNumber") }, (((_k = formState.errors) === null || _k === void 0 ? void 0 : _k.phoneNumber) ? {
|
|
6127
6292
|
class: classes.ErrorInput,
|
|
6128
6293
|
helpText: utils$1.formatErrorMessage(text.phoneNumber, formState.errors.phoneNumber),
|
|
6129
6294
|
}
|
|
@@ -6131,7 +6296,7 @@ const UserInfoFormView = (props) => {
|
|
|
6131
6296
|
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 }) =>
|
|
6132
6297
|
// Checks for non-ASCII characters
|
|
6133
6298
|
!utils$1.validateBillingField(/^[\x20-\xFF]+$/, value) &&
|
|
6134
|
-
utils$1.formatErrorMessage(text.address, text.error.invalidCharacterError), disabled: states.disabled ||
|
|
6299
|
+
utils$1.formatErrorMessage(text.address, text.error.invalidCharacterError), disabled: states.disabled || isDisabledInput("billingAddress") }, (((_l = formState.errors) === null || _l === void 0 ? void 0 : _l.address) ? {
|
|
6135
6300
|
class: classes.ErrorInput,
|
|
6136
6301
|
helpText: utils$1.formatErrorMessage(text.address, formState.errors.address),
|
|
6137
6302
|
}
|
|
@@ -6139,22 +6304,22 @@ const UserInfoFormView = (props) => {
|
|
|
6139
6304
|
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 }) =>
|
|
6140
6305
|
// Checks for non-ASCII characters
|
|
6141
6306
|
!utils$1.validateBillingField(/^[\x20-\xFF]+$/, value) &&
|
|
6142
|
-
utils$1.formatErrorMessage(text.city, text.error.invalidCharacterError), disabled: states.disabled ||
|
|
6307
|
+
utils$1.formatErrorMessage(text.city, text.error.invalidCharacterError), disabled: states.disabled || isDisabledInput("billingCity") }, (((_m = formState.errors) === null || _m === void 0 ? void 0 : _m.city) ? {
|
|
6143
6308
|
class: classes.ErrorInput,
|
|
6144
6309
|
helpText: utils$1.formatErrorMessage(text.city, formState.errors.city),
|
|
6145
6310
|
}
|
|
6146
6311
|
: {}), { required: true })),
|
|
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 ||
|
|
6312
|
+
!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 || isDisabledInput("billingState") }, (((_o = formState.errors) === null || _o === void 0 ? void 0 : _o.state) ? {
|
|
6148
6313
|
class: classes.ErrorInput,
|
|
6149
6314
|
helpText: utils$1.formatErrorMessage(text.state, formState.errors.state),
|
|
6150
6315
|
}
|
|
6151
6316
|
: {}), { 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 ||
|
|
6317
|
+
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 || isDisabledInput("billingPostalCode") }, (((_q = formState.errors) === null || _q === void 0 ? void 0 : _q.postalCode) ? {
|
|
6153
6318
|
class: classes.ErrorInput,
|
|
6154
6319
|
helpText: utils$1.formatErrorMessage(text.postalCode, formState.errors.postalCode),
|
|
6155
6320
|
}
|
|
6156
6321
|
: {}), { required: true })),
|
|
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 ||
|
|
6322
|
+
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 || isDisabledInput("currency"), helpText: text.currencyHelpText }, (((_r = formState.errors) === null || _r === void 0 ? void 0 : _r.currency) ? {
|
|
6158
6323
|
class: classes.ErrorInput,
|
|
6159
6324
|
helpText: utils$1.formatErrorMessage(text.currency, formState.errors.currency),
|
|
6160
6325
|
}
|
|
@@ -6176,13 +6341,21 @@ const UserInfoFormView = (props) => {
|
|
|
6176
6341
|
index.h("div", { class: classes.CheckboxWrapper },
|
|
6177
6342
|
index.h("sl-checkbox", { checked: formState.allowBankingCollection === true, "onSl-change": (e) => {
|
|
6178
6343
|
e.target.value = e.target.checked;
|
|
6179
|
-
}, disabled: states.
|
|
6344
|
+
}, disabled: states.disabled, required: true, value: formState.allowBankingCollection, id: "allowBankingCollection", name: "/allowBankingCollection" }, bankingCollectionText),
|
|
6180
6345
|
((_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))))),
|
|
6181
|
-
index.h("sl-button", { type: "primary", disabled: states.
|
|
6346
|
+
index.h("sl-button", { type: "primary", disabled: states.disabled, submit: true, exportparts: "base: primarybutton-base" }, text.continueButton))))));
|
|
6182
6347
|
};
|
|
6183
6348
|
|
|
6349
|
+
const GET_INDIRECT_TAX_COUNTRY_CODE = index_module.dist.gql `
|
|
6350
|
+
query getIndirectTaxCountryCode {
|
|
6351
|
+
tenantSettings {
|
|
6352
|
+
impactBrandCountryCode
|
|
6353
|
+
impactBrandIndirectTaxCountryCode
|
|
6354
|
+
}
|
|
6355
|
+
}
|
|
6356
|
+
`;
|
|
6184
6357
|
function useUserInfoForm(props) {
|
|
6185
|
-
var _a, _b, _c, _d;
|
|
6358
|
+
var _a, _b, _c, _d, _e, _f, _g;
|
|
6186
6359
|
const currencyRef = domContextHooks_module.useRef(undefined);
|
|
6187
6360
|
const phoneCountryRef = domContextHooks_module.useRef(undefined);
|
|
6188
6361
|
const formRef = domContextHooks_module.useRef(null);
|
|
@@ -6190,7 +6363,10 @@ function useUserInfoForm(props) {
|
|
|
6190
6363
|
const countries = index_module.Fn(data.SORTED_COUNTRIES_NAMESPACE);
|
|
6191
6364
|
const [step, setStep] = index_module.Pn(data.TAX_CONTEXT_NAMESPACE);
|
|
6192
6365
|
const [userFormContext, setUserFormContext] = index_module.Pn(data.USER_FORM_CONTEXT_NAMESPACE);
|
|
6193
|
-
const
|
|
6366
|
+
const user = index_module.J();
|
|
6367
|
+
const [connectImpactPartner, { loading: connectLoading, errors: connectErrors },] = index_module.$e(CONNECT_PARTNER);
|
|
6368
|
+
const { data: tenantData } = index_module.wn(GET_INDIRECT_TAX_COUNTRY_CODE, {});
|
|
6369
|
+
const { data: data$1, loading, refetch, errors: userError, } = index_module.$n(data.USER_QUERY_NAMESPACE);
|
|
6194
6370
|
const _currencies = index_module.Fn(data.CURRENCIES_NAMESPACE);
|
|
6195
6371
|
const currencies = domContextHooks_module.useMemo(() => [...(_currencies || [])].sort((a, b) => a.displayName.localeCompare(b.displayName)), [_currencies]);
|
|
6196
6372
|
const [countrySearch, setCountrySearch] = domContextHooks_module.useState("");
|
|
@@ -6292,6 +6468,45 @@ function useUserInfoForm(props) {
|
|
|
6292
6468
|
setFilteredCurrencies(currencies.filter((c) => c.currencyCode.toLowerCase().includes(currencySearch.toLowerCase())) || []);
|
|
6293
6469
|
}
|
|
6294
6470
|
}, [currencySearch, currencies]);
|
|
6471
|
+
async function connectPartner(formData) {
|
|
6472
|
+
var _a, _b, _c, _d, _e;
|
|
6473
|
+
const vars = {
|
|
6474
|
+
user: {
|
|
6475
|
+
id: user.id,
|
|
6476
|
+
accountId: user.accountId,
|
|
6477
|
+
},
|
|
6478
|
+
firstName: formData.firstName,
|
|
6479
|
+
lastName: formData.lastName,
|
|
6480
|
+
countryCode: formData.countryCode,
|
|
6481
|
+
currency: formData.currency,
|
|
6482
|
+
address: formData.address,
|
|
6483
|
+
city: formData.city,
|
|
6484
|
+
state: formData.state,
|
|
6485
|
+
postalCode: formData.postalCode,
|
|
6486
|
+
phoneNumber: formData.phoneNumber,
|
|
6487
|
+
phoneNumberCountryCode: formData.phoneNumberCountryCode,
|
|
6488
|
+
};
|
|
6489
|
+
const result = await connectImpactPartner({
|
|
6490
|
+
vars,
|
|
6491
|
+
});
|
|
6492
|
+
if (!result || ((_a = result) === null || _a === void 0 ? void 0 : _a.message))
|
|
6493
|
+
throw new Error();
|
|
6494
|
+
if (!((_b = result.createImpactConnection) === null || _b === void 0 ? void 0 : _b.success)) {
|
|
6495
|
+
// Output backend errors to console for now
|
|
6496
|
+
console.error("Failed to create Impact connection: ", result.createImpactConnection.validationErrors);
|
|
6497
|
+
throw new Error();
|
|
6498
|
+
}
|
|
6499
|
+
await refetch();
|
|
6500
|
+
const resultPublisher = (_e = (_d = (_c = result
|
|
6501
|
+
.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;
|
|
6502
|
+
const hasValidCurrentDocument = utils$1.validTaxDocument(resultPublisher === null || resultPublisher === void 0 ? void 0 : resultPublisher.requiredTaxDocumentType) && (resultPublisher === null || resultPublisher === void 0 ? void 0 : resultPublisher.currentTaxDocument);
|
|
6503
|
+
// Fire form change event
|
|
6504
|
+
window.dispatchEvent(new Event(data.TAX_FORM_UPDATED_EVENT_KEY));
|
|
6505
|
+
return {
|
|
6506
|
+
resultPublisher,
|
|
6507
|
+
hasValidCurrentDocument,
|
|
6508
|
+
};
|
|
6509
|
+
}
|
|
6295
6510
|
async function onSubmit(event) {
|
|
6296
6511
|
let formControls = event.target.getFormControls();
|
|
6297
6512
|
let formData = {};
|
|
@@ -6334,9 +6549,46 @@ function useUserInfoForm(props) {
|
|
|
6334
6549
|
postalCode: userData.postalCode,
|
|
6335
6550
|
currency: userData.currency,
|
|
6336
6551
|
});
|
|
6337
|
-
const
|
|
6552
|
+
const skipNextStep = getSkipNextStep(userData);
|
|
6553
|
+
if (skipNextStep) {
|
|
6554
|
+
try {
|
|
6555
|
+
const { resultPublisher, hasValidCurrentDocument } = await connectPartner(formData);
|
|
6556
|
+
if ((resultPublisher === null || resultPublisher === void 0 ? void 0 : resultPublisher.requiredTaxDocumentType) &&
|
|
6557
|
+
!hasValidCurrentDocument) {
|
|
6558
|
+
// Go to docusign form
|
|
6559
|
+
setStep("/3");
|
|
6560
|
+
}
|
|
6561
|
+
else {
|
|
6562
|
+
if (resultPublisher === null || resultPublisher === void 0 ? void 0 : resultPublisher.brandedSignup) {
|
|
6563
|
+
// Go to banking information form
|
|
6564
|
+
setStep("/4");
|
|
6565
|
+
}
|
|
6566
|
+
else {
|
|
6567
|
+
// Go right to the dashboard
|
|
6568
|
+
setStep("/dashboard");
|
|
6569
|
+
}
|
|
6570
|
+
}
|
|
6571
|
+
return;
|
|
6572
|
+
}
|
|
6573
|
+
catch (e) {
|
|
6574
|
+
setErrors({ general: true });
|
|
6575
|
+
return;
|
|
6576
|
+
}
|
|
6577
|
+
}
|
|
6578
|
+
const nextStep = context.overrideNextStep || skipNextStep ? "/3" : "/2";
|
|
6338
6579
|
setStep(nextStep);
|
|
6339
6580
|
}
|
|
6581
|
+
const indirectTaxCountry = (_a = tenantData === null || tenantData === void 0 ? void 0 : tenantData.tenantSettings) === null || _a === void 0 ? void 0 : _a.impactBrandIndirectTaxCountryCode;
|
|
6582
|
+
const hasIndirectTax = !!indirectTaxCountry;
|
|
6583
|
+
function getSkipNextStep(userData) {
|
|
6584
|
+
if (!hasIndirectTax)
|
|
6585
|
+
return true;
|
|
6586
|
+
if (userData.countryCode === "US")
|
|
6587
|
+
return true;
|
|
6588
|
+
if (hasIndirectTax && userData.countryCode !== indirectTaxCountry)
|
|
6589
|
+
return true;
|
|
6590
|
+
return false;
|
|
6591
|
+
}
|
|
6340
6592
|
const hasStates = ["ES", "AU", "US", "CA"].includes(userFormContext.countryCode);
|
|
6341
6593
|
const regionObj = hasStates
|
|
6342
6594
|
? IndirectTaxDetailsView.ADDRESS_REGIONS[userFormContext === null || userFormContext === void 0 ? void 0 : userFormContext.countryCode]
|
|
@@ -6364,16 +6616,17 @@ function useUserInfoForm(props) {
|
|
|
6364
6616
|
allCountries: countries,
|
|
6365
6617
|
regionLabelEnum: regionObj === null || regionObj === void 0 ? void 0 : regionObj.labelEnum,
|
|
6366
6618
|
regions: (regionObj === null || regionObj === void 0 ? void 0 : regionObj.regions) || [],
|
|
6619
|
+
partnerData: (_c = (_b = data$1 === null || data$1 === void 0 ? void 0 : data$1.user) === null || _b === void 0 ? void 0 : _b.impactConnection) === null || _c === void 0 ? void 0 : _c.publisher,
|
|
6367
6620
|
},
|
|
6368
6621
|
states: {
|
|
6369
6622
|
step: step === null || step === void 0 ? void 0 : step.replace("/", ""),
|
|
6370
6623
|
hideState: !hasStates,
|
|
6371
6624
|
hideSteps: !!context.hideSteps,
|
|
6372
|
-
disabled: loading,
|
|
6625
|
+
disabled: loading || connectLoading,
|
|
6373
6626
|
loadingError: !!(userError === null || userError === void 0 ? void 0 : userError.message),
|
|
6374
|
-
loading: loading,
|
|
6375
|
-
isPartner: !!((
|
|
6376
|
-
isUser: !!((
|
|
6627
|
+
loading: loading || connectLoading,
|
|
6628
|
+
isPartner: !!((_e = (_d = data$1 === null || data$1 === void 0 ? void 0 : data$1.user) === null || _d === void 0 ? void 0 : _d.impactConnection) === null || _e === void 0 ? void 0 : _e.publisher),
|
|
6629
|
+
isUser: !!((_g = (_f = data$1 === null || data$1 === void 0 ? void 0 : data$1.user) === null || _f === void 0 ? void 0 : _f.impactConnection) === null || _g === void 0 ? void 0 : _g.user),
|
|
6377
6630
|
formState: {
|
|
6378
6631
|
...userFormContext,
|
|
6379
6632
|
errors: formErrors,
|