@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
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { h, r as registerInstance, c as Host, g as getElement } from './index-b3a06de8.js';
|
|
2
|
-
import { i as intl } from './global-
|
|
2
|
+
import { i as intl } from './global-536c422d.js';
|
|
3
3
|
import { m as useRef, k as useState, f as useEffect, n as h$1, u as useMemo, b as browser, j as useReducer } from './dom-context-hooks.module-63370afd.js';
|
|
4
4
|
import { d as dist, _, L, J, t as Pn, F as Fn, x as $n, $ as $e, i as isDemo, p as En, u as useCallback, R as Rn, w as wn } from './index.module-c9811a48.js';
|
|
5
5
|
import { j as jsonpointer } from './jsonpointer-388a7082.js';
|
|
@@ -12,10 +12,10 @@ import { u as useRerenderListener, a as useRequestRerender } from './re-render-7
|
|
|
12
12
|
import { u as useChildElements } from './useChildElements-3d872cef.js';
|
|
13
13
|
import { l as luxon } from './luxon-bbf75a9d.js';
|
|
14
14
|
import { g as generateUserError } from './useReferralTable-909ccb28.js';
|
|
15
|
-
import { a as INDIRECT_TAX_SPAIN_REGIONS, b as INDIRECT_TAX_PROVINCES, O as OtherRegionSlotView, I as InvoiceTableView, v as vatLabels, A as ADDRESS_REGIONS } from './IndirectTaxDetailsView-
|
|
16
|
-
import { t as taxTypeToName, v as validTaxDocument, g as getCountryObj, L as LoadingView, f as formatErrorMessage, a as validateBillingField, o as objectIsFull } from './utils-
|
|
15
|
+
import { a as INDIRECT_TAX_SPAIN_REGIONS, b as INDIRECT_TAX_PROVINCES, O as OtherRegionSlotView, I as InvoiceTableView, v as vatLabels, A as ADDRESS_REGIONS } from './IndirectTaxDetailsView-a7dd6e4c.js';
|
|
16
|
+
import { t as taxTypeToName, v as validTaxDocument, g as getCountryObj, L as LoadingView, f as formatErrorMessage, a as validateBillingField, o as objectIsFull } from './utils-fafc712f.js';
|
|
17
17
|
import { b as VERIFICATION_EVENT_KEY } from './keys-406491dc.js';
|
|
18
|
-
import { i as FORM_STEPS, a as TAX_FORM_CONTEXT_NAMESPACE, S as SORTED_COUNTRIES_NAMESPACE, c as USER_QUERY_NAMESPACE, T as TAX_CONTEXT_NAMESPACE, F as FINANCE_NETWORK_SETTINGS_NAMESPACE, j as TAX_FORM_UPDATED_EVENT_KEY, U as USER_FORM_CONTEXT_NAMESPACE, d as COUNTRIES_QUERY_NAMESPACE, k as useVeriffApp, l as getStatus, V as VERIFF_COMPLETE_EVENT_KEY, C as CURRENCIES_NAMESPACE } from './data-
|
|
18
|
+
import { i as FORM_STEPS, a as TAX_FORM_CONTEXT_NAMESPACE, S as SORTED_COUNTRIES_NAMESPACE, c as USER_QUERY_NAMESPACE, T as TAX_CONTEXT_NAMESPACE, F as FINANCE_NETWORK_SETTINGS_NAMESPACE, j as TAX_FORM_UPDATED_EVENT_KEY, U as USER_FORM_CONTEXT_NAMESPACE, d as COUNTRIES_QUERY_NAMESPACE, k as useVeriffApp, l as getStatus, V as VERIFF_COMPLETE_EVENT_KEY, C as CURRENCIES_NAMESPACE } from './data-68816061.js';
|
|
19
19
|
|
|
20
20
|
function getFormMap({ props, getValidationErrorMessage, bankCountry, }) {
|
|
21
21
|
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;
|
|
@@ -899,10 +899,6 @@ function useBankingInfoForm(props) {
|
|
|
899
899
|
const paymentMethodChecked = !hasPayPal
|
|
900
900
|
? "toBankAccount"
|
|
901
901
|
: _paymentMethodChecked;
|
|
902
|
-
useEffect(() => {
|
|
903
|
-
// reset redirect hash
|
|
904
|
-
window.location.hash = "";
|
|
905
|
-
}, []);
|
|
906
902
|
useEffect(() => {
|
|
907
903
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
908
904
|
if (!userData)
|
|
@@ -1074,6 +1070,7 @@ function useBankingInfoForm(props) {
|
|
|
1074
1070
|
}
|
|
1075
1071
|
await runMutation(formData, token);
|
|
1076
1072
|
setShowModal(false);
|
|
1073
|
+
window.location.hash = "";
|
|
1077
1074
|
};
|
|
1078
1075
|
const onVerification = async (token) => {
|
|
1079
1076
|
host.dispatchEvent(new CustomEvent(VERIFICATION_EVENT_KEY, {
|
|
@@ -1103,7 +1100,15 @@ function useBankingInfoForm(props) {
|
|
|
1103
1100
|
setBankCountry: updateBankCountry,
|
|
1104
1101
|
setPaymentMethodChecked,
|
|
1105
1102
|
setPaymentScheduleChecked,
|
|
1106
|
-
onBack: () =>
|
|
1103
|
+
onBack: () => {
|
|
1104
|
+
// return to dashboard
|
|
1105
|
+
if (window.location.hash) {
|
|
1106
|
+
window.location.hash = "";
|
|
1107
|
+
}
|
|
1108
|
+
else {
|
|
1109
|
+
setStep("/dashboard");
|
|
1110
|
+
}
|
|
1111
|
+
},
|
|
1107
1112
|
setCountrySearch,
|
|
1108
1113
|
onVerification,
|
|
1109
1114
|
onVerificationHide: () => onVerification(null),
|
|
@@ -1776,11 +1781,17 @@ function useDocusignForm(props) {
|
|
|
1776
1781
|
}
|
|
1777
1782
|
};
|
|
1778
1783
|
const progressStep = () => {
|
|
1779
|
-
|
|
1780
|
-
|
|
1781
|
-
|
|
1782
|
-
|
|
1783
|
-
|
|
1784
|
+
// return to dashboard
|
|
1785
|
+
if (window.location.hash) {
|
|
1786
|
+
window.location.hash = "";
|
|
1787
|
+
}
|
|
1788
|
+
else {
|
|
1789
|
+
setStep(context.overrideNextStep ||
|
|
1790
|
+
!!(publisher === null || publisher === void 0 ? void 0 : publisher.withdrawalSettings) ||
|
|
1791
|
+
!(publisher === null || publisher === void 0 ? void 0 : publisher.brandedSignup)
|
|
1792
|
+
? "/dashboard"
|
|
1793
|
+
: "/4");
|
|
1794
|
+
}
|
|
1784
1795
|
};
|
|
1785
1796
|
const allLoading = userLoading || documentLoading || loading;
|
|
1786
1797
|
return {
|
|
@@ -2469,7 +2480,7 @@ const IndirectTaxFormView = (props) => {
|
|
|
2469
2480
|
}, {
|
|
2470
2481
|
supportLink: (h("a", { target: "_blank", href: `mailto:advocate-support@impact.com` }, text.supportLink)),
|
|
2471
2482
|
}))),
|
|
2472
|
-
states.isPartner && (h("sqm-form-message", { type: "info" },
|
|
2483
|
+
states.isPartner && (h("sqm-form-message", { loading: states.loading, type: "info" },
|
|
2473
2484
|
h("p", { part: "alert-title" }, text.isPartnerAlertHeader),
|
|
2474
2485
|
intl.formatMessage({
|
|
2475
2486
|
id: "isPartnerAlertDescription",
|
|
@@ -2607,8 +2618,51 @@ function useIndirectTaxForm(props) {
|
|
|
2607
2618
|
console.error("Could not detect select change");
|
|
2608
2619
|
setFormState((p) => ({ ...p, [field]: value }));
|
|
2609
2620
|
};
|
|
2610
|
-
|
|
2621
|
+
async function connectPartner(formData) {
|
|
2611
2622
|
var _a, _b, _c, _d, _e;
|
|
2623
|
+
const vars = {
|
|
2624
|
+
user: {
|
|
2625
|
+
id: user.id,
|
|
2626
|
+
accountId: user.accountId,
|
|
2627
|
+
},
|
|
2628
|
+
firstName: userForm.firstName,
|
|
2629
|
+
lastName: userForm.lastName,
|
|
2630
|
+
countryCode: userForm.countryCode,
|
|
2631
|
+
currency: userForm.currency,
|
|
2632
|
+
address: userForm.address,
|
|
2633
|
+
city: userForm.city,
|
|
2634
|
+
state: userForm.state,
|
|
2635
|
+
postalCode: userForm.postalCode,
|
|
2636
|
+
phoneNumber: userForm.phoneNumber,
|
|
2637
|
+
phoneNumberCountryCode: userForm.phoneNumberCountryCode,
|
|
2638
|
+
indirectTaxCountryCode: formData.selectedRegion,
|
|
2639
|
+
indirectTaxRegion: formData.province || formData.subRegion,
|
|
2640
|
+
indirectTaxId: formData.indirectTaxNumber,
|
|
2641
|
+
additionalTaxId: formData.qstNumber,
|
|
2642
|
+
withholdingTaxId: formData.subRegionTaxNumber,
|
|
2643
|
+
};
|
|
2644
|
+
const result = await connectImpactPartner({
|
|
2645
|
+
vars,
|
|
2646
|
+
});
|
|
2647
|
+
if (!result || ((_a = result) === null || _a === void 0 ? void 0 : _a.message))
|
|
2648
|
+
throw new Error();
|
|
2649
|
+
if (!((_b = result.createImpactConnection) === null || _b === void 0 ? void 0 : _b.success)) {
|
|
2650
|
+
// Output backend errors to console for now
|
|
2651
|
+
console.error("Failed to create Impact connection: ", result.createImpactConnection.validationErrors);
|
|
2652
|
+
throw new Error();
|
|
2653
|
+
}
|
|
2654
|
+
await refetch();
|
|
2655
|
+
const resultPublisher = (_e = (_d = (_c = result
|
|
2656
|
+
.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;
|
|
2657
|
+
const hasValidCurrentDocument = validTaxDocument(resultPublisher === null || resultPublisher === void 0 ? void 0 : resultPublisher.requiredTaxDocumentType) && (resultPublisher === null || resultPublisher === void 0 ? void 0 : resultPublisher.currentTaxDocument);
|
|
2658
|
+
// Fire form change event
|
|
2659
|
+
window.dispatchEvent(new Event(TAX_FORM_UPDATED_EVENT_KEY));
|
|
2660
|
+
return {
|
|
2661
|
+
resultPublisher,
|
|
2662
|
+
hasValidCurrentDocument,
|
|
2663
|
+
};
|
|
2664
|
+
}
|
|
2665
|
+
const onSubmit = async (event) => {
|
|
2612
2666
|
if (!option) {
|
|
2613
2667
|
setErrors({ taxDetails: true });
|
|
2614
2668
|
return;
|
|
@@ -2634,44 +2688,7 @@ function useIndirectTaxForm(props) {
|
|
|
2634
2688
|
}
|
|
2635
2689
|
setLoading(true);
|
|
2636
2690
|
try {
|
|
2637
|
-
const
|
|
2638
|
-
user: {
|
|
2639
|
-
id: user.id,
|
|
2640
|
-
accountId: user.accountId,
|
|
2641
|
-
},
|
|
2642
|
-
firstName: userForm.firstName,
|
|
2643
|
-
lastName: userForm.lastName,
|
|
2644
|
-
countryCode: userForm.countryCode,
|
|
2645
|
-
currency: userForm.currency,
|
|
2646
|
-
address: userForm.address,
|
|
2647
|
-
city: userForm.city,
|
|
2648
|
-
state: userForm.state,
|
|
2649
|
-
postalCode: userForm.postalCode,
|
|
2650
|
-
phoneNumber: userForm.phoneNumber,
|
|
2651
|
-
phoneNumberCountryCode: userForm.phoneNumberCountryCode,
|
|
2652
|
-
indirectTaxCountryCode: formData.selectedRegion,
|
|
2653
|
-
indirectTaxRegion: formData.province || formData.subRegion,
|
|
2654
|
-
indirectTaxId: formData.indirectTaxNumber,
|
|
2655
|
-
additionalTaxId: formData.qstNumber,
|
|
2656
|
-
withholdingTaxId: formData.subRegionTaxNumber,
|
|
2657
|
-
};
|
|
2658
|
-
const result = await connectImpactPartner({
|
|
2659
|
-
vars,
|
|
2660
|
-
});
|
|
2661
|
-
if (!result || ((_a = result) === null || _a === void 0 ? void 0 : _a.message))
|
|
2662
|
-
throw new Error();
|
|
2663
|
-
if (!((_b = result.createImpactConnection) === null || _b === void 0 ? void 0 : _b.success)) {
|
|
2664
|
-
// Output backend errors to console for now
|
|
2665
|
-
console.error("Failed to create Impact connection: ", result.createImpactConnection
|
|
2666
|
-
.validationErrors);
|
|
2667
|
-
throw new Error();
|
|
2668
|
-
}
|
|
2669
|
-
await refetch();
|
|
2670
|
-
const resultPublisher = (_e = (_d = (_c = result
|
|
2671
|
-
.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;
|
|
2672
|
-
const hasValidCurrentDocument = validTaxDocument(resultPublisher === null || resultPublisher === void 0 ? void 0 : resultPublisher.requiredTaxDocumentType) && (resultPublisher === null || resultPublisher === void 0 ? void 0 : resultPublisher.currentTaxDocument);
|
|
2673
|
-
// Fire form change event
|
|
2674
|
-
window.dispatchEvent(new Event(TAX_FORM_UPDATED_EVENT_KEY));
|
|
2691
|
+
const { resultPublisher, hasValidCurrentDocument } = await connectPartner(formData);
|
|
2675
2692
|
if ((resultPublisher === null || resultPublisher === void 0 ? void 0 : resultPublisher.requiredTaxDocumentType) &&
|
|
2676
2693
|
!hasValidCurrentDocument) {
|
|
2677
2694
|
// Go to docusign form
|
|
@@ -3250,7 +3267,7 @@ function LoadingSlot() {
|
|
|
3250
3267
|
return (h("slot", { name: "loading" }, h(LoadingRow, null), h(LoadingRow, null), h(LoadingRow, null), h(LoadingRow, null)));
|
|
3251
3268
|
}
|
|
3252
3269
|
function LoadingRow() {
|
|
3253
|
-
return (h("sqm-table-row", null, h("sqm-table-cell", { colspan: 6 }, h("
|
|
3270
|
+
return (h("sqm-table-row", null, h("sqm-table-cell", { colspan: 6 }, h("sqm-skeleton", null))));
|
|
3254
3271
|
}
|
|
3255
3272
|
function useInvoiceTableDemo(props, emptyElement, loadingElement) {
|
|
3256
3273
|
const [content, setContent] = useReducer((state, next) => ({
|
|
@@ -3536,11 +3553,11 @@ function PayoutDetailsCardView(props) {
|
|
|
3536
3553
|
const { states, text } = props;
|
|
3537
3554
|
const renderLoadingSkeleton = () => {
|
|
3538
3555
|
return (h("div", { class: classes.CardContainer },
|
|
3539
|
-
h("div", { class: classes.StatusContainer },
|
|
3540
|
-
h("
|
|
3541
|
-
h("
|
|
3542
|
-
h("
|
|
3543
|
-
h("
|
|
3556
|
+
h("div", { class: classes.StatusContainer, style: { display: "block" } },
|
|
3557
|
+
h("sqm-skeleton", { style: { marginBottom: "var(--sl-spacing-medium)" }, width: "25%", height: "16px" }),
|
|
3558
|
+
h("sqm-skeleton", { width: "25%", height: "24px" })),
|
|
3559
|
+
h("sqm-skeleton", { width: "50%", height: "34px" }),
|
|
3560
|
+
h("sqm-skeleton", { width: "25%", height: "16px" })));
|
|
3544
3561
|
};
|
|
3545
3562
|
const renderStatusBadge = (status, statusBadgeText) => {
|
|
3546
3563
|
const badgeType = status === "nextPayout" ? "success" : "primary";
|
|
@@ -3813,16 +3830,6 @@ const style$5 = {
|
|
|
3813
3830
|
EditBankDetailsButton: {
|
|
3814
3831
|
marginTop: "var(--sl-spacing-large)",
|
|
3815
3832
|
},
|
|
3816
|
-
SkeletonOne: {
|
|
3817
|
-
width: "15%",
|
|
3818
|
-
height: "10px",
|
|
3819
|
-
},
|
|
3820
|
-
SkeletonTwo: {
|
|
3821
|
-
width: "25%",
|
|
3822
|
-
height: "24px",
|
|
3823
|
-
top: "var(--sl-spacing-small)",
|
|
3824
|
-
marginBottom: "var(--sl-spacing-x-small)",
|
|
3825
|
-
},
|
|
3826
3833
|
TaxSectionSkeletonContainer: {
|
|
3827
3834
|
display: "flex",
|
|
3828
3835
|
flexDirection: "column",
|
|
@@ -3912,6 +3919,11 @@ const style$5 = {
|
|
|
3912
3919
|
SubduedText: {
|
|
3913
3920
|
color: "var(--sqm-text-subdued)",
|
|
3914
3921
|
},
|
|
3922
|
+
ButtonContainer: {
|
|
3923
|
+
display: "flex",
|
|
3924
|
+
gap: "var(--sl-spacing-medium)",
|
|
3925
|
+
flexWrap: "wrap",
|
|
3926
|
+
},
|
|
3915
3927
|
};
|
|
3916
3928
|
const sheet$4 = createStyleSheet(style$5);
|
|
3917
3929
|
const styleString$4 = sheet$4.toString();
|
|
@@ -4024,7 +4036,7 @@ const TaxAndCashDashboardView = (props) => {
|
|
|
4024
4036
|
icon: "exclamation-octagon",
|
|
4025
4037
|
class: sheet$4.classes.ErrorHoldAlertContainer,
|
|
4026
4038
|
};
|
|
4027
|
-
case "
|
|
4039
|
+
case "NEW_PAYEE_REVIEW":
|
|
4028
4040
|
return {
|
|
4029
4041
|
header: text.accountReviewHeader,
|
|
4030
4042
|
description: intl.formatMessage({
|
|
@@ -4038,6 +4050,96 @@ const TaxAndCashDashboardView = (props) => {
|
|
|
4038
4050
|
icon: "exclamation-triangle",
|
|
4039
4051
|
class: sheet$4.classes.WarningHoldAlertContainer,
|
|
4040
4052
|
};
|
|
4053
|
+
case "PAYMENT_HOLD_ON_CHANGE":
|
|
4054
|
+
return {
|
|
4055
|
+
header: text.paymentHoldOnChangeHeader,
|
|
4056
|
+
description: intl.formatMessage({
|
|
4057
|
+
id: "accountReviewDescription",
|
|
4058
|
+
defaultMessage: text.paymentHoldOnChangeDescription,
|
|
4059
|
+
}, {
|
|
4060
|
+
supportLink: (h("a", { target: "_blank", href: `mailto:advocate-support@impact.com` }, text.supportLink)),
|
|
4061
|
+
}),
|
|
4062
|
+
buttonText: null,
|
|
4063
|
+
alertType: "warning",
|
|
4064
|
+
icon: "exclamation-triangle",
|
|
4065
|
+
class: sheet$4.classes.WarningHoldAlertContainer,
|
|
4066
|
+
};
|
|
4067
|
+
case "BENEFICIARY_NAME_INVALID":
|
|
4068
|
+
return {
|
|
4069
|
+
header: text.beneficiaryNameInvalidHeader,
|
|
4070
|
+
description: intl.formatMessage({
|
|
4071
|
+
id: "accountReviewDescription",
|
|
4072
|
+
defaultMessage: text.beneficiaryNameInvalidDescription,
|
|
4073
|
+
}, {
|
|
4074
|
+
supportLink: (h("a", { target: "_blank", href: `mailto:advocate-support@impact.com` }, text.supportLink)),
|
|
4075
|
+
}),
|
|
4076
|
+
button: (h("div", { class: sheet$4.classes.ButtonContainer },
|
|
4077
|
+
h("sl-button", { disabled: states.disabled || states.loading, type: "primary", class: sheet$4.classes.EditBankDetailsButton, onClick: callbacks.onEditPayoutInfo }, text.editPaymentInformationButton),
|
|
4078
|
+
h("sl-button", { disabled: states.disabled || states.loading, type: "default", class: sheet$4.classes.EditBankDetailsButton, onClick: callbacks.onNewFormClick }, text.newFormButton))),
|
|
4079
|
+
alertType: "warning",
|
|
4080
|
+
icon: "exclamation-triangle",
|
|
4081
|
+
class: sheet$4.classes.WarningHoldAlertContainer,
|
|
4082
|
+
};
|
|
4083
|
+
case "BENEFICIARY_NAME_MISMATCH":
|
|
4084
|
+
return {
|
|
4085
|
+
header: text.beneficiaryNameMismatchHeader,
|
|
4086
|
+
description: intl.formatMessage({
|
|
4087
|
+
id: "accountReviewDescription",
|
|
4088
|
+
defaultMessage: text.beneficiaryNameMismatchDescription,
|
|
4089
|
+
}, {
|
|
4090
|
+
supportLink: (h("a", { target: "_blank", href: `mailto:advocate-support@impact.com` }, text.supportLink)),
|
|
4091
|
+
}),
|
|
4092
|
+
button: (h("div", { class: sheet$4.classes.ButtonContainer },
|
|
4093
|
+
h("sl-button", { disabled: states.disabled || states.loading, type: "primary", class: sheet$4.classes.EditBankDetailsButton, onClick: callbacks.onEditPayoutInfo }, text.editPaymentInformationButton),
|
|
4094
|
+
h("sl-button", { disabled: states.disabled || states.loading, type: "default", class: sheet$4.classes.EditBankDetailsButton, onClick: callbacks.onNewFormClick }, text.newFormButton))),
|
|
4095
|
+
alertType: "warning",
|
|
4096
|
+
icon: "exclamation-triangle",
|
|
4097
|
+
class: sheet$4.classes.WarningHoldAlertContainer,
|
|
4098
|
+
};
|
|
4099
|
+
case "BANK_TAX_NAME_MISMATCH":
|
|
4100
|
+
return {
|
|
4101
|
+
header: text.bankTaxNameMismatchHeader,
|
|
4102
|
+
description: intl.formatMessage({
|
|
4103
|
+
id: "accountReviewDescription",
|
|
4104
|
+
defaultMessage: text.bankTaxNameMismatchDescription,
|
|
4105
|
+
}, {
|
|
4106
|
+
supportLink: (h("a", { target: "_blank", href: `mailto:advocate-support@impact.com` }, text.supportLink)),
|
|
4107
|
+
}),
|
|
4108
|
+
button: (h("div", { class: sheet$4.classes.ButtonContainer },
|
|
4109
|
+
h("sl-button", { disabled: states.disabled || states.loading, type: "primary", class: sheet$4.classes.EditBankDetailsButton, onClick: callbacks.onEditPayoutInfo }, text.editPaymentInformationButton),
|
|
4110
|
+
h("sl-button", { disabled: states.disabled || states.loading, type: "default", class: sheet$4.classes.EditBankDetailsButton, onClick: callbacks.onNewFormClick }, text.newFormButton))),
|
|
4111
|
+
alertType: "warning",
|
|
4112
|
+
icon: "exclamation-triangle",
|
|
4113
|
+
class: sheet$4.classes.WarningHoldAlertContainer,
|
|
4114
|
+
};
|
|
4115
|
+
case "WITHDRAWAL_SETTINGS_INVALID":
|
|
4116
|
+
return {
|
|
4117
|
+
header: text.withdrawalSettingsInvalidHeader,
|
|
4118
|
+
description: intl.formatMessage({
|
|
4119
|
+
id: "accountReviewDescription",
|
|
4120
|
+
defaultMessage: text.withdrawalSettingsInvalidDescription,
|
|
4121
|
+
}, {
|
|
4122
|
+
supportLink: (h("a", { target: "_blank", href: `mailto:advocate-support@impact.com` }, text.supportLink)),
|
|
4123
|
+
}),
|
|
4124
|
+
button: (h("sl-button", { disabled: states.disabled || states.loading, type: "default", class: sheet$4.classes.EditBankDetailsButton, onClick: callbacks.onEditPayoutInfo }, text.editPaymentInformationButton)),
|
|
4125
|
+
alertType: "warning",
|
|
4126
|
+
icon: "exclamation-triangle",
|
|
4127
|
+
class: sheet$4.classes.WarningHoldAlertContainer,
|
|
4128
|
+
};
|
|
4129
|
+
case "PAYMENT_RETURNED":
|
|
4130
|
+
return {
|
|
4131
|
+
header: text.paymentReturnedHeader,
|
|
4132
|
+
description: intl.formatMessage({
|
|
4133
|
+
id: "accountReviewDescription",
|
|
4134
|
+
defaultMessage: text.paymentReturnedDescription,
|
|
4135
|
+
}, {
|
|
4136
|
+
supportLink: (h("a", { target: "_blank", href: `mailto:advocate-support@impact.com` }, text.supportLink)),
|
|
4137
|
+
}),
|
|
4138
|
+
button: (h("sl-button", { disabled: states.disabled || states.loading, type: "primary", class: sheet$4.classes.EditBankDetailsButton, onClick: callbacks.onEditPayoutInfo }, text.editPaymentInformationButton)),
|
|
4139
|
+
alertType: "error",
|
|
4140
|
+
icon: "exclamation-triangle",
|
|
4141
|
+
class: sheet$4.classes.WarningHoldAlertContainer,
|
|
4142
|
+
};
|
|
4041
4143
|
case "HOLD":
|
|
4042
4144
|
return {
|
|
4043
4145
|
header: text.payoutHoldAlertHeader,
|
|
@@ -4163,7 +4265,7 @@ const TaxAndCashDashboardView = (props) => {
|
|
|
4163
4265
|
}, {
|
|
4164
4266
|
supportLink: (h("a", { target: "_blank", href: `mailto:advocate-support@impact.com` }, text.supportLink)),
|
|
4165
4267
|
}))),
|
|
4166
|
-
alertInfo && (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 },
|
|
4268
|
+
alertInfo && (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 },
|
|
4167
4269
|
h("strong", null, alertInfo.header),
|
|
4168
4270
|
h("p", { style: { margin: "0" } }, alertInfo.description),
|
|
4169
4271
|
alertInfo.buttonText && (h("sl-button", { style: { marginTop: "var(--sl-spacing-x-small)" }, type: "default", loading: states.veriffLoading, onClick: () => callbacks.onVerifyClick() }, alertInfo.buttonText)),
|
|
@@ -4181,8 +4283,8 @@ const TaxAndCashDashboardView = (props) => {
|
|
|
4181
4283
|
states.canEditPayoutInfo && (h("sl-button", { disabled: states.disabled || states.loading, exportparts: "base: secondarybutton-base", type: "secondary", class: sheet$4.classes.EditBankDetailsButton, onClick: callbacks.onEditPayoutInfo }, text.editPaymentInformationButton)))),
|
|
4182
4284
|
(!states.noFormNeeded || states.status === "NOT_VERIFIED") && (h("div", { class: sheet$4.classes.TaxDocumentsContainer },
|
|
4183
4285
|
h("div", null, states.loading ? (h("div", { class: sheet$4.classes.TaxSectionSkeletonContainer },
|
|
4184
|
-
h("
|
|
4185
|
-
h("
|
|
4286
|
+
h("sqm-skeleton", { width: "15%", height: "10px" }),
|
|
4287
|
+
h("sqm-skeleton", { width: "25%", height: "24px" }))) : (h("div", null,
|
|
4186
4288
|
h("div", null,
|
|
4187
4289
|
h("span", { class: sheet$4.classes.TaxFormDetailsContainer },
|
|
4188
4290
|
h("div", { class: sheet$4.classes.StatusContainer },
|
|
@@ -4196,8 +4298,8 @@ const TaxAndCashDashboardView = (props) => {
|
|
|
4196
4298
|
states.noFormNeeded &&
|
|
4197
4299
|
states.status !== "NOT_VERIFIED" && (h("sl-button", { disabled: states.disabled || states.loading, onClick: callbacks.onClick, type: "default", class: sheet$4.classes.NewFormButton, exportparts: "base: primarybutton-base" }, text.newFormButton)))))))),
|
|
4198
4300
|
h("div", { class: sheet$4.classes.IndirectTaxPreviewContainer }, states.loading ? (h("div", { class: sheet$4.classes.TaxSectionSkeletonContainer },
|
|
4199
|
-
h("
|
|
4200
|
-
h("
|
|
4301
|
+
h("sqm-skeleton", { width: "15%", height: "10px" }),
|
|
4302
|
+
h("sqm-skeleton", { width: "25%", height: "24px" }))) : (h("div", null,
|
|
4201
4303
|
h("h3", { class: sheet$4.classes.IndirectTaxPreviewHeaderContainer },
|
|
4202
4304
|
text.indirectTaxInfoSectionHeader,
|
|
4203
4305
|
h("sl-tooltip", { trigger: "hover", placement: "right", content: text.indirectTaxTooltipSupport, class: sheet$4.classes.TooltipContainer },
|
|
@@ -4294,8 +4396,14 @@ const useTaxAndCashDashboard = (props) => {
|
|
|
4294
4396
|
useEffect(() => {
|
|
4295
4397
|
// Clear override context once on submitted
|
|
4296
4398
|
setContext({});
|
|
4297
|
-
if (window.location.hash)
|
|
4399
|
+
if (window.location.hash) {
|
|
4400
|
+
setContext({
|
|
4401
|
+
overrideNextStep: "/dashboard",
|
|
4402
|
+
overrideBackStep: "/dashboard",
|
|
4403
|
+
hideSteps: true,
|
|
4404
|
+
});
|
|
4298
4405
|
setStep(`/${window.location.hash.replace("#", "")}`);
|
|
4406
|
+
}
|
|
4299
4407
|
}, []);
|
|
4300
4408
|
const { data, loading, errors: userError, refetch, } = $n(USER_QUERY_NAMESPACE);
|
|
4301
4409
|
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;
|
|
@@ -4500,12 +4608,12 @@ const TaxAndCashDashboard = class {
|
|
|
4500
4608
|
/**
|
|
4501
4609
|
* @uiName Submit new tax form button label
|
|
4502
4610
|
*/
|
|
4503
|
-
this.newFormButton = "Submit new form";
|
|
4611
|
+
this.newFormButton = "Submit new tax form";
|
|
4504
4612
|
/**
|
|
4505
4613
|
*
|
|
4506
4614
|
* @uiName Edit payment info button label
|
|
4507
4615
|
*/
|
|
4508
|
-
this.editPaymentInformationButton = "Edit
|
|
4616
|
+
this.editPaymentInformationButton = "Edit payout information";
|
|
4509
4617
|
/**
|
|
4510
4618
|
* @uiName Not registered for indirect tax text
|
|
4511
4619
|
* @uiWidget textArea
|
|
@@ -4566,7 +4674,7 @@ const TaxAndCashDashboard = class {
|
|
|
4566
4674
|
/**
|
|
4567
4675
|
* @uiName Verification required internal alert header
|
|
4568
4676
|
*/
|
|
4569
|
-
this.verificationRequiredInternalHeader = "Identity
|
|
4677
|
+
this.verificationRequiredInternalHeader = "Identity verification in progress";
|
|
4570
4678
|
/**
|
|
4571
4679
|
* @uiName Verification required internal alert description
|
|
4572
4680
|
*/
|
|
@@ -4574,7 +4682,7 @@ const TaxAndCashDashboard = class {
|
|
|
4574
4682
|
/**
|
|
4575
4683
|
* @uiName Verification review internal alert header
|
|
4576
4684
|
*/
|
|
4577
|
-
this.verificationReviewInternalHeader = "Identity
|
|
4685
|
+
this.verificationReviewInternalHeader = "Identity verification under review";
|
|
4578
4686
|
/**
|
|
4579
4687
|
* @uiName Verification review internal alert description
|
|
4580
4688
|
*/
|
|
@@ -4582,7 +4690,7 @@ const TaxAndCashDashboard = class {
|
|
|
4582
4690
|
/**
|
|
4583
4691
|
* @uiName Verification failed internal alert header
|
|
4584
4692
|
*/
|
|
4585
|
-
this.verificationFailedInternalHeader = "Identity
|
|
4693
|
+
this.verificationFailedInternalHeader = "Identity verification unsuccessful";
|
|
4586
4694
|
/**
|
|
4587
4695
|
* @uiName Verification failed internal alert description
|
|
4588
4696
|
*/
|
|
@@ -4608,6 +4716,54 @@ const TaxAndCashDashboard = class {
|
|
|
4608
4716
|
* @uiName Account review alert description
|
|
4609
4717
|
*/
|
|
4610
4718
|
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}.";
|
|
4719
|
+
/**
|
|
4720
|
+
* @uiName Payment hold on change alert header
|
|
4721
|
+
*/
|
|
4722
|
+
this.paymentHoldOnChangeHeader = "We are reviewing your new payout settings";
|
|
4723
|
+
/**
|
|
4724
|
+
* @uiName Payment hold on change alert description
|
|
4725
|
+
*/
|
|
4726
|
+
this.paymentHoldOnChangeDescription = "Your payout is temporarily on hold while we review your new payment information, this process is usually resolved within 48 hours.";
|
|
4727
|
+
/**
|
|
4728
|
+
* @uiName Beneficiary name invalid alert header
|
|
4729
|
+
*/
|
|
4730
|
+
this.beneficiaryNameInvalidHeader = "Your payment information does not match your tax form";
|
|
4731
|
+
/**
|
|
4732
|
+
* @uiName Beneficiary name invalid description
|
|
4733
|
+
*/
|
|
4734
|
+
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.";
|
|
4735
|
+
/**
|
|
4736
|
+
* @uiName Beneficiary name mismatch alert header
|
|
4737
|
+
*/
|
|
4738
|
+
this.beneficiaryNameMismatchHeader = "Your payment information does not match your tax form";
|
|
4739
|
+
/**
|
|
4740
|
+
* @uiName Beneficiary name mismatch alert description
|
|
4741
|
+
*/
|
|
4742
|
+
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.";
|
|
4743
|
+
/**
|
|
4744
|
+
* @uiName Bank name mismatch alert header
|
|
4745
|
+
*/
|
|
4746
|
+
this.bankTaxNameMismatchHeader = "Your payment information does not match your tax form";
|
|
4747
|
+
/**
|
|
4748
|
+
* @uiName Bank name mismatch alert description
|
|
4749
|
+
*/
|
|
4750
|
+
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.";
|
|
4751
|
+
/**
|
|
4752
|
+
* @uiName Withdrawal settings invalid alert header
|
|
4753
|
+
*/
|
|
4754
|
+
this.withdrawalSettingsInvalidHeader = "Your payment information is incomplete or includes invalid characters";
|
|
4755
|
+
/**
|
|
4756
|
+
* @uiName Withdrawal settings invalid alert description
|
|
4757
|
+
*/
|
|
4758
|
+
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.";
|
|
4759
|
+
/**
|
|
4760
|
+
* @uiName Payment returned alert header
|
|
4761
|
+
*/
|
|
4762
|
+
this.paymentReturnedHeader = "Payout unsuccessful";
|
|
4763
|
+
/**
|
|
4764
|
+
* @uiName Payment returned alert description
|
|
4765
|
+
*/
|
|
4766
|
+
this.paymentReturnedDescription = "Our recent payment attempt for your earnings was unsuccessful. Please review your payment information and make sure it is correct.";
|
|
4611
4767
|
/**
|
|
4612
4768
|
* @uiName Terms and Conditions text
|
|
4613
4769
|
*/
|
|
@@ -6026,6 +6182,10 @@ const UserInfoFormView = (props) => {
|
|
|
6026
6182
|
default:
|
|
6027
6183
|
regionLabel = text.state;
|
|
6028
6184
|
}
|
|
6185
|
+
function isDisabledInput(field) {
|
|
6186
|
+
var _a;
|
|
6187
|
+
return states.isPartner && !!((_a = data.partnerData) === null || _a === void 0 ? void 0 : _a[field]);
|
|
6188
|
+
}
|
|
6029
6189
|
return (h("sl-form", { class: classes.FormWrapper, "onSl-submit": callbacks.onSubmit, ref: (el) => (refs.formRef.current = el), novalidate: true },
|
|
6030
6190
|
h("style", { type: "text/css" },
|
|
6031
6191
|
styleString$5,
|
|
@@ -6056,7 +6216,7 @@ const UserInfoFormView = (props) => {
|
|
|
6056
6216
|
}, {
|
|
6057
6217
|
supportLink: (h("a", { target: "_blank", href: `mailto:advocate-support@impact.com` }, text.supportLink)),
|
|
6058
6218
|
})))),
|
|
6059
|
-
(states.isPartner || states.isUser) && (h("sqm-form-message", { type: "info" },
|
|
6219
|
+
(states.isPartner || states.isUser) && (h("sqm-form-message", { loading: states.loading, type: "info" },
|
|
6060
6220
|
h("p", { part: "alert-title" }, text.isPartnerAlertHeader),
|
|
6061
6221
|
h("p", { part: "alert-description" }, intl.formatMessage({
|
|
6062
6222
|
id: "isPartnerAlertDescription",
|
|
@@ -6066,18 +6226,22 @@ const UserInfoFormView = (props) => {
|
|
|
6066
6226
|
})))),
|
|
6067
6227
|
h("div", null,
|
|
6068
6228
|
h("div", { class: classes.InputContainer },
|
|
6069
|
-
h("sl-input", Object.assign({ class: "ErrorInput", exportparts: "label: input-label, base: input-base", value: formState.firstName, label: text.firstName, disabled: states.disabled ||
|
|
6229
|
+
h("sl-input", Object.assign({ class: "ErrorInput", exportparts: "label: input-label, base: input-base", value: formState.firstName, label: text.firstName, disabled: states.disabled ||
|
|
6230
|
+
states.isUser ||
|
|
6231
|
+
isDisabledInput("firstName") }, (((_b = formState.errors) === null || _b === void 0 ? void 0 : _b.firstName) ? {
|
|
6070
6232
|
class: classes.ErrorInput,
|
|
6071
6233
|
helpText: formatErrorMessage(text.firstName, formState.errors.firstName),
|
|
6072
6234
|
}
|
|
6073
6235
|
: {}), { id: "firstName", name: "/firstName", required: true })),
|
|
6074
|
-
h("sl-input", Object.assign({ exportparts: "label: input-label, base: input-base", value: formState.lastName, label: text.lastName, disabled: states.disabled ||
|
|
6236
|
+
h("sl-input", Object.assign({ exportparts: "label: input-label, base: input-base", value: formState.lastName, label: text.lastName, disabled: states.disabled ||
|
|
6237
|
+
states.isUser ||
|
|
6238
|
+
isDisabledInput("lastName") }, (((_c = formState.errors) === null || _c === void 0 ? void 0 : _c.lastName) ? {
|
|
6075
6239
|
class: classes.ErrorInput,
|
|
6076
6240
|
helpText: formatErrorMessage(text.lastName, formState.errors.lastName),
|
|
6077
6241
|
}
|
|
6078
6242
|
: {}), { id: "lastName", name: "/lastName", required: true })),
|
|
6079
6243
|
h("sl-input", { exportparts: "label: input-label, base: input-base", value: formState.email, label: text.email, disabled: true, id: "email", name: "/email", required: true }),
|
|
6080
|
-
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 ||
|
|
6244
|
+
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) ? {
|
|
6081
6245
|
class: classes.ErrorInput,
|
|
6082
6246
|
helpText: formatErrorMessage(text.country, formState.errors.countryCode),
|
|
6083
6247
|
}
|
|
@@ -6093,7 +6257,8 @@ const UserInfoFormView = (props) => {
|
|
|
6093
6257
|
h("div", { class: classes.PhoneInputsSection },
|
|
6094
6258
|
h("p", null, text.phoneNumber),
|
|
6095
6259
|
h("div", { class: classes.PhoneInputsContainer },
|
|
6096
|
-
h("sl-select", Object.assign({ id: "phoneNumberCountryCode", exportparts: "label: input-label, base: input-base", name: "/phoneNumberCountryCode", value: formState.phoneNumberCountryCode, disabled: states.disabled ||
|
|
6260
|
+
h("sl-select", Object.assign({ id: "phoneNumberCountryCode", exportparts: "label: input-label, base: input-base", name: "/phoneNumberCountryCode", value: formState.phoneNumberCountryCode, disabled: states.disabled ||
|
|
6261
|
+
isDisabledInput("phoneNumberCountryCode"), ref: (el) => (refs.phoneCountryRef.current = el) }, (((_g = formState.errors) === null || _g === void 0 ? void 0 : _g.phoneNumberCountryCode) ? {
|
|
6097
6262
|
class: classes.ErrorInput,
|
|
6098
6263
|
}
|
|
6099
6264
|
: {}), { required: true, "onSl-select": (e) => callbacks.onFormChange("phoneCountry", e) }),
|
|
@@ -6119,7 +6284,7 @@ const UserInfoFormView = (props) => {
|
|
|
6119
6284
|
// Naive phone number validation
|
|
6120
6285
|
validateBillingField(/[a-zA-Z]+/, value) &&
|
|
6121
6286
|
formatErrorMessage(text.phoneNumber, text.error.fieldInvalidError);
|
|
6122
|
-
}, disabled: states.disabled ||
|
|
6287
|
+
}, disabled: states.disabled || isDisabledInput("phoneNumber") }, (((_k = formState.errors) === null || _k === void 0 ? void 0 : _k.phoneNumber) ? {
|
|
6123
6288
|
class: classes.ErrorInput,
|
|
6124
6289
|
helpText: formatErrorMessage(text.phoneNumber, formState.errors.phoneNumber),
|
|
6125
6290
|
}
|
|
@@ -6127,7 +6292,7 @@ const UserInfoFormView = (props) => {
|
|
|
6127
6292
|
h("sl-input", Object.assign({ exportparts: "label: input-label, base: input-base", label: text.address, id: "address", name: "/address", value: formState.address, validationError: ({ value }) =>
|
|
6128
6293
|
// Checks for non-ASCII characters
|
|
6129
6294
|
!validateBillingField(/^[\x20-\xFF]+$/, value) &&
|
|
6130
|
-
formatErrorMessage(text.address, text.error.invalidCharacterError), disabled: states.disabled ||
|
|
6295
|
+
formatErrorMessage(text.address, text.error.invalidCharacterError), disabled: states.disabled || isDisabledInput("billingAddress") }, (((_l = formState.errors) === null || _l === void 0 ? void 0 : _l.address) ? {
|
|
6131
6296
|
class: classes.ErrorInput,
|
|
6132
6297
|
helpText: formatErrorMessage(text.address, formState.errors.address),
|
|
6133
6298
|
}
|
|
@@ -6135,22 +6300,22 @@ const UserInfoFormView = (props) => {
|
|
|
6135
6300
|
h("sl-input", Object.assign({ exportparts: "label: input-label, base: input-base", label: text.city, id: "city", name: "/city", value: formState.city, validationError: ({ value }) =>
|
|
6136
6301
|
// Checks for non-ASCII characters
|
|
6137
6302
|
!validateBillingField(/^[\x20-\xFF]+$/, value) &&
|
|
6138
|
-
formatErrorMessage(text.city, text.error.invalidCharacterError), disabled: states.disabled ||
|
|
6303
|
+
formatErrorMessage(text.city, text.error.invalidCharacterError), disabled: states.disabled || isDisabledInput("billingCity") }, (((_m = formState.errors) === null || _m === void 0 ? void 0 : _m.city) ? {
|
|
6139
6304
|
class: classes.ErrorInput,
|
|
6140
6305
|
helpText: formatErrorMessage(text.city, formState.errors.city),
|
|
6141
6306
|
}
|
|
6142
6307
|
: {}), { required: true })),
|
|
6143
|
-
!states.hideState && (h("sl-select", Object.assign({ label: regionLabel, exportparts: "label: input-label, base: input-base", id: "state", name: "/state", value: formState.state, disabled: states.disabled ||
|
|
6308
|
+
!states.hideState && (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) ? {
|
|
6144
6309
|
class: classes.ErrorInput,
|
|
6145
6310
|
helpText: formatErrorMessage(text.state, formState.errors.state),
|
|
6146
6311
|
}
|
|
6147
6312
|
: {}), { required: true }), (_p = data.regions) === null || _p === void 0 ? void 0 : _p.map((r) => (h("sl-menu-item", { value: r.value }, r.label))))),
|
|
6148
|
-
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 ||
|
|
6313
|
+
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) ? {
|
|
6149
6314
|
class: classes.ErrorInput,
|
|
6150
6315
|
helpText: formatErrorMessage(text.postalCode, formState.errors.postalCode),
|
|
6151
6316
|
}
|
|
6152
6317
|
: {}), { required: true })),
|
|
6153
|
-
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 ||
|
|
6318
|
+
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) ? {
|
|
6154
6319
|
class: classes.ErrorInput,
|
|
6155
6320
|
helpText: formatErrorMessage(text.currency, formState.errors.currency),
|
|
6156
6321
|
}
|
|
@@ -6172,13 +6337,21 @@ const UserInfoFormView = (props) => {
|
|
|
6172
6337
|
h("div", { class: classes.CheckboxWrapper },
|
|
6173
6338
|
h("sl-checkbox", { checked: formState.allowBankingCollection === true, "onSl-change": (e) => {
|
|
6174
6339
|
e.target.value = e.target.checked;
|
|
6175
|
-
}, disabled: states.
|
|
6340
|
+
}, disabled: states.disabled, required: true, value: formState.allowBankingCollection, id: "allowBankingCollection", name: "/allowBankingCollection" }, bankingCollectionText),
|
|
6176
6341
|
((_u = formState.errors) === null || _u === void 0 ? void 0 : _u.allowBankingCollection) && (h("p", { class: classes.ErrorText }, formatErrorMessage(text.termsAndConditionsLabel, formState.errors.allowBankingCollection))))),
|
|
6177
|
-
h("sl-button", { type: "primary", disabled: states.
|
|
6342
|
+
h("sl-button", { type: "primary", disabled: states.disabled, submit: true, exportparts: "base: primarybutton-base" }, text.continueButton))))));
|
|
6178
6343
|
};
|
|
6179
6344
|
|
|
6345
|
+
const GET_INDIRECT_TAX_COUNTRY_CODE = dist.gql `
|
|
6346
|
+
query getIndirectTaxCountryCode {
|
|
6347
|
+
tenantSettings {
|
|
6348
|
+
impactBrandCountryCode
|
|
6349
|
+
impactBrandIndirectTaxCountryCode
|
|
6350
|
+
}
|
|
6351
|
+
}
|
|
6352
|
+
`;
|
|
6180
6353
|
function useUserInfoForm(props) {
|
|
6181
|
-
var _a, _b, _c, _d;
|
|
6354
|
+
var _a, _b, _c, _d, _e, _f, _g;
|
|
6182
6355
|
const currencyRef = useRef(undefined);
|
|
6183
6356
|
const phoneCountryRef = useRef(undefined);
|
|
6184
6357
|
const formRef = useRef(null);
|
|
@@ -6186,7 +6359,10 @@ function useUserInfoForm(props) {
|
|
|
6186
6359
|
const countries = Fn(SORTED_COUNTRIES_NAMESPACE);
|
|
6187
6360
|
const [step, setStep] = Pn(TAX_CONTEXT_NAMESPACE);
|
|
6188
6361
|
const [userFormContext, setUserFormContext] = Pn(USER_FORM_CONTEXT_NAMESPACE);
|
|
6189
|
-
const
|
|
6362
|
+
const user = J();
|
|
6363
|
+
const [connectImpactPartner, { loading: connectLoading, errors: connectErrors },] = $e(CONNECT_PARTNER);
|
|
6364
|
+
const { data: tenantData } = wn(GET_INDIRECT_TAX_COUNTRY_CODE, {});
|
|
6365
|
+
const { data, loading, refetch, errors: userError, } = $n(USER_QUERY_NAMESPACE);
|
|
6190
6366
|
const _currencies = Fn(CURRENCIES_NAMESPACE);
|
|
6191
6367
|
const currencies = useMemo(() => [...(_currencies || [])].sort((a, b) => a.displayName.localeCompare(b.displayName)), [_currencies]);
|
|
6192
6368
|
const [countrySearch, setCountrySearch] = useState("");
|
|
@@ -6288,6 +6464,45 @@ function useUserInfoForm(props) {
|
|
|
6288
6464
|
setFilteredCurrencies(currencies.filter((c) => c.currencyCode.toLowerCase().includes(currencySearch.toLowerCase())) || []);
|
|
6289
6465
|
}
|
|
6290
6466
|
}, [currencySearch, currencies]);
|
|
6467
|
+
async function connectPartner(formData) {
|
|
6468
|
+
var _a, _b, _c, _d, _e;
|
|
6469
|
+
const vars = {
|
|
6470
|
+
user: {
|
|
6471
|
+
id: user.id,
|
|
6472
|
+
accountId: user.accountId,
|
|
6473
|
+
},
|
|
6474
|
+
firstName: formData.firstName,
|
|
6475
|
+
lastName: formData.lastName,
|
|
6476
|
+
countryCode: formData.countryCode,
|
|
6477
|
+
currency: formData.currency,
|
|
6478
|
+
address: formData.address,
|
|
6479
|
+
city: formData.city,
|
|
6480
|
+
state: formData.state,
|
|
6481
|
+
postalCode: formData.postalCode,
|
|
6482
|
+
phoneNumber: formData.phoneNumber,
|
|
6483
|
+
phoneNumberCountryCode: formData.phoneNumberCountryCode,
|
|
6484
|
+
};
|
|
6485
|
+
const result = await connectImpactPartner({
|
|
6486
|
+
vars,
|
|
6487
|
+
});
|
|
6488
|
+
if (!result || ((_a = result) === null || _a === void 0 ? void 0 : _a.message))
|
|
6489
|
+
throw new Error();
|
|
6490
|
+
if (!((_b = result.createImpactConnection) === null || _b === void 0 ? void 0 : _b.success)) {
|
|
6491
|
+
// Output backend errors to console for now
|
|
6492
|
+
console.error("Failed to create Impact connection: ", result.createImpactConnection.validationErrors);
|
|
6493
|
+
throw new Error();
|
|
6494
|
+
}
|
|
6495
|
+
await refetch();
|
|
6496
|
+
const resultPublisher = (_e = (_d = (_c = result
|
|
6497
|
+
.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;
|
|
6498
|
+
const hasValidCurrentDocument = validTaxDocument(resultPublisher === null || resultPublisher === void 0 ? void 0 : resultPublisher.requiredTaxDocumentType) && (resultPublisher === null || resultPublisher === void 0 ? void 0 : resultPublisher.currentTaxDocument);
|
|
6499
|
+
// Fire form change event
|
|
6500
|
+
window.dispatchEvent(new Event(TAX_FORM_UPDATED_EVENT_KEY));
|
|
6501
|
+
return {
|
|
6502
|
+
resultPublisher,
|
|
6503
|
+
hasValidCurrentDocument,
|
|
6504
|
+
};
|
|
6505
|
+
}
|
|
6291
6506
|
async function onSubmit(event) {
|
|
6292
6507
|
let formControls = event.target.getFormControls();
|
|
6293
6508
|
let formData = {};
|
|
@@ -6330,9 +6545,46 @@ function useUserInfoForm(props) {
|
|
|
6330
6545
|
postalCode: userData.postalCode,
|
|
6331
6546
|
currency: userData.currency,
|
|
6332
6547
|
});
|
|
6333
|
-
const
|
|
6548
|
+
const skipNextStep = getSkipNextStep(userData);
|
|
6549
|
+
if (skipNextStep) {
|
|
6550
|
+
try {
|
|
6551
|
+
const { resultPublisher, hasValidCurrentDocument } = await connectPartner(formData);
|
|
6552
|
+
if ((resultPublisher === null || resultPublisher === void 0 ? void 0 : resultPublisher.requiredTaxDocumentType) &&
|
|
6553
|
+
!hasValidCurrentDocument) {
|
|
6554
|
+
// Go to docusign form
|
|
6555
|
+
setStep("/3");
|
|
6556
|
+
}
|
|
6557
|
+
else {
|
|
6558
|
+
if (resultPublisher === null || resultPublisher === void 0 ? void 0 : resultPublisher.brandedSignup) {
|
|
6559
|
+
// Go to banking information form
|
|
6560
|
+
setStep("/4");
|
|
6561
|
+
}
|
|
6562
|
+
else {
|
|
6563
|
+
// Go right to the dashboard
|
|
6564
|
+
setStep("/dashboard");
|
|
6565
|
+
}
|
|
6566
|
+
}
|
|
6567
|
+
return;
|
|
6568
|
+
}
|
|
6569
|
+
catch (e) {
|
|
6570
|
+
setErrors({ general: true });
|
|
6571
|
+
return;
|
|
6572
|
+
}
|
|
6573
|
+
}
|
|
6574
|
+
const nextStep = context.overrideNextStep || skipNextStep ? "/3" : "/2";
|
|
6334
6575
|
setStep(nextStep);
|
|
6335
6576
|
}
|
|
6577
|
+
const indirectTaxCountry = (_a = tenantData === null || tenantData === void 0 ? void 0 : tenantData.tenantSettings) === null || _a === void 0 ? void 0 : _a.impactBrandIndirectTaxCountryCode;
|
|
6578
|
+
const hasIndirectTax = !!indirectTaxCountry;
|
|
6579
|
+
function getSkipNextStep(userData) {
|
|
6580
|
+
if (!hasIndirectTax)
|
|
6581
|
+
return true;
|
|
6582
|
+
if (userData.countryCode === "US")
|
|
6583
|
+
return true;
|
|
6584
|
+
if (hasIndirectTax && userData.countryCode !== indirectTaxCountry)
|
|
6585
|
+
return true;
|
|
6586
|
+
return false;
|
|
6587
|
+
}
|
|
6336
6588
|
const hasStates = ["ES", "AU", "US", "CA"].includes(userFormContext.countryCode);
|
|
6337
6589
|
const regionObj = hasStates
|
|
6338
6590
|
? ADDRESS_REGIONS[userFormContext === null || userFormContext === void 0 ? void 0 : userFormContext.countryCode]
|
|
@@ -6360,16 +6612,17 @@ function useUserInfoForm(props) {
|
|
|
6360
6612
|
allCountries: countries,
|
|
6361
6613
|
regionLabelEnum: regionObj === null || regionObj === void 0 ? void 0 : regionObj.labelEnum,
|
|
6362
6614
|
regions: (regionObj === null || regionObj === void 0 ? void 0 : regionObj.regions) || [],
|
|
6615
|
+
partnerData: (_c = (_b = data === null || data === void 0 ? void 0 : data.user) === null || _b === void 0 ? void 0 : _b.impactConnection) === null || _c === void 0 ? void 0 : _c.publisher,
|
|
6363
6616
|
},
|
|
6364
6617
|
states: {
|
|
6365
6618
|
step: step === null || step === void 0 ? void 0 : step.replace("/", ""),
|
|
6366
6619
|
hideState: !hasStates,
|
|
6367
6620
|
hideSteps: !!context.hideSteps,
|
|
6368
|
-
disabled: loading,
|
|
6621
|
+
disabled: loading || connectLoading,
|
|
6369
6622
|
loadingError: !!(userError === null || userError === void 0 ? void 0 : userError.message),
|
|
6370
|
-
loading: loading,
|
|
6371
|
-
isPartner: !!((
|
|
6372
|
-
isUser: !!((
|
|
6623
|
+
loading: loading || connectLoading,
|
|
6624
|
+
isPartner: !!((_e = (_d = data === null || data === void 0 ? void 0 : data.user) === null || _d === void 0 ? void 0 : _d.impactConnection) === null || _e === void 0 ? void 0 : _e.publisher),
|
|
6625
|
+
isUser: !!((_g = (_f = data === null || data === void 0 ? void 0 : data.user) === null || _f === void 0 ? void 0 : _f.impactConnection) === null || _g === void 0 ? void 0 : _g.user),
|
|
6373
6626
|
formState: {
|
|
6374
6627
|
...userFormContext,
|
|
6375
6628
|
errors: formErrors,
|