@saasquatch/mint-components 2.0.0 → 2.0.2-0
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-3e88d710.js → IndirectTaxDetailsView-e5f70b8b.js} +2 -2
- package/dist/cjs/{ShadowViewAddon-646dec73.js → ShadowViewAddon-1b38dcfc.js} +1 -1
- package/dist/cjs/{global-39cb0afc.js → global-8bba5b3a.js} +2 -745
- 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 +342 -113
- package/dist/cjs/sqm-big-stat_47.cjs.entry.js +218 -29
- package/dist/cjs/sqm-code-verification.cjs.entry.js +1 -1
- package/dist/cjs/sqm-email-verification.cjs.entry.js +1 -1
- package/dist/cjs/sqm-empty_4.cjs.entry.js +1 -1
- package/dist/cjs/sqm-header-logo.cjs.entry.js +8 -1
- package/dist/cjs/{sqm-lead-checkbox-field-view-f1c46d4b.js → sqm-lead-checkbox-field-view-340acad0.js} +1 -1
- package/dist/cjs/sqm-lead-checkbox-field.cjs.entry.js +3 -3
- package/dist/cjs/{sqm-lead-input-field-view-6d388092.js → sqm-lead-input-field-view-06ed3632.js} +1 -1
- package/dist/cjs/sqm-lead-input-field.cjs.entry.js +3 -3
- package/dist/cjs/sqm-leaderboard-rank.cjs.entry.js +1 -1
- package/dist/cjs/sqm-pagination_3.cjs.entry.js +1 -1
- package/dist/cjs/{sqm-portal-email-verification-view-6b17e545.js → sqm-portal-email-verification-view-5518eb0d.js} +1 -1
- package/dist/cjs/sqm-portal-email-verification.cjs.entry.js +2 -2
- package/dist/cjs/{sqm-portal-profile-view-845367bb.js → sqm-portal-profile-view-615e6975.js} +1 -1
- package/dist/cjs/sqm-portal-profile.cjs.entry.js +2 -2
- package/dist/cjs/sqm-referral-table_11.cjs.entry.js +1 -1
- package/dist/cjs/sqm-rewards-table_9.cjs.entry.js +1 -1
- package/dist/cjs/sqm-stencilbook.cjs.entry.js +9 -8
- package/dist/cjs/{useLeadFormState-b355759b.js → useLeadFormState-fd0445f9.js} +1 -1
- package/dist/cjs/{data-16106637.js → usePayoutStatus-67c78085.js} +161 -129
- package/dist/cjs/{utils-ac82f977.js → utils-83d125fa.js} +1 -1
- package/dist/collection/components/sqm-header-logo/sqm-header-logo.js +73 -3
- package/dist/collection/components/tax-and-cash/TaxForm.stories.js +1 -0
- package/dist/collection/components/tax-and-cash/sqm-indirect-tax-form/useIndirectTaxForm.js +46 -40
- package/dist/collection/components/tax-and-cash/sqm-payout-status-alert/sqm-payout-status-alert-view.js +84 -2
- package/dist/collection/components/tax-and-cash/sqm-payout-status-alert/sqm-payout-status-alert.js +353 -0
- package/dist/collection/components/tax-and-cash/sqm-payout-status-alert/usePayoutStatus.js +36 -3
- package/dist/collection/components/tax-and-cash/sqm-tax-and-cash/sqm-tax-and-cash.js +301 -1
- package/dist/collection/components/tax-and-cash/sqm-tax-and-cash-dashboard/sqm-tax-and-cash-dashboard-view.js +92 -2
- package/dist/collection/components/tax-and-cash/sqm-tax-and-cash-dashboard/sqm-tax-and-cash-dashboard.js +300 -0
- package/dist/collection/components/tax-and-cash/sqm-user-info-form/sqm-user-info-form-view.js +23 -12
- package/dist/collection/components/tax-and-cash/sqm-user-info-form/sqm-user-info-form.js +1 -1
- package/dist/collection/components/tax-and-cash/sqm-user-info-form/useUserInfoForm.js +92 -9
- package/dist/collection/global/global.js +3 -14
- package/dist/esm/{IndirectTaxDetailsView-e5d8767d.js → IndirectTaxDetailsView-0a57b622.js} +2 -2
- package/dist/esm/{ShadowViewAddon-5928ca9d.js → ShadowViewAddon-1adaf077.js} +1 -1
- package/dist/esm/{global-943536b9.js → global-1099f20d.js} +2 -745
- 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 +293 -64
- package/dist/esm/sqm-big-stat_47.entry.js +196 -7
- package/dist/esm/sqm-code-verification.entry.js +1 -1
- package/dist/esm/sqm-email-verification.entry.js +1 -1
- package/dist/esm/sqm-empty_4.entry.js +1 -1
- package/dist/esm/sqm-header-logo.entry.js +8 -1
- package/dist/esm/{sqm-lead-checkbox-field-view-adcc49c0.js → sqm-lead-checkbox-field-view-cbafee07.js} +1 -1
- package/dist/esm/sqm-lead-checkbox-field.entry.js +3 -3
- package/dist/esm/{sqm-lead-input-field-view-c0b5aed5.js → sqm-lead-input-field-view-f3775c28.js} +1 -1
- package/dist/esm/sqm-lead-input-field.entry.js +3 -3
- package/dist/esm/sqm-leaderboard-rank.entry.js +1 -1
- package/dist/esm/sqm-pagination_3.entry.js +1 -1
- package/dist/esm/{sqm-portal-email-verification-view-8ceb6302.js → sqm-portal-email-verification-view-7d86299c.js} +1 -1
- package/dist/esm/sqm-portal-email-verification.entry.js +2 -2
- package/dist/esm/{sqm-portal-profile-view-2ec60449.js → sqm-portal-profile-view-3ed13e4d.js} +1 -1
- package/dist/esm/sqm-portal-profile.entry.js +2 -2
- package/dist/esm/sqm-referral-table_11.entry.js +1 -1
- package/dist/esm/sqm-rewards-table_9.entry.js +1 -1
- package/dist/esm/sqm-stencilbook.entry.js +9 -8
- package/dist/esm/{useLeadFormState-9a652a42.js → useLeadFormState-c379e5d7.js} +1 -1
- package/dist/esm/{data-acdb790f.js → usePayoutStatus-f064247b.js} +162 -130
- package/dist/esm/{utils-f27e62dc.js → utils-6122971b.js} +1 -1
- package/dist/esm-es5/{IndirectTaxDetailsView-e5d8767d.js → IndirectTaxDetailsView-0a57b622.js} +1 -1
- package/dist/esm-es5/{ShadowViewAddon-5928ca9d.js → ShadowViewAddon-1adaf077.js} +1 -1
- package/dist/esm-es5/{global-943536b9.js → global-1099f20d.js} +4 -4
- package/dist/esm-es5/loader.js +1 -1
- package/dist/esm-es5/mint-components.js +1 -1
- package/dist/esm-es5/sqm-banking-info-form_10.entry.js +1 -1
- package/dist/esm-es5/sqm-big-stat_47.entry.js +1 -1
- package/dist/esm-es5/sqm-code-verification.entry.js +1 -1
- package/dist/esm-es5/sqm-email-verification.entry.js +1 -1
- package/dist/esm-es5/sqm-empty_4.entry.js +1 -1
- package/dist/esm-es5/sqm-header-logo.entry.js +1 -1
- package/dist/esm-es5/{sqm-lead-checkbox-field-view-adcc49c0.js → sqm-lead-checkbox-field-view-cbafee07.js} +1 -1
- package/dist/esm-es5/sqm-lead-checkbox-field.entry.js +1 -1
- package/dist/esm-es5/{sqm-lead-input-field-view-c0b5aed5.js → sqm-lead-input-field-view-f3775c28.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-8ceb6302.js → sqm-portal-email-verification-view-7d86299c.js} +1 -1
- package/dist/esm-es5/sqm-portal-email-verification.entry.js +1 -1
- package/dist/esm-es5/{sqm-portal-profile-view-2ec60449.js → sqm-portal-profile-view-3ed13e4d.js} +1 -1
- package/dist/esm-es5/sqm-portal-profile.entry.js +1 -1
- package/dist/esm-es5/sqm-referral-table_11.entry.js +1 -1
- package/dist/esm-es5/sqm-rewards-table_9.entry.js +1 -1
- package/dist/esm-es5/sqm-stencilbook.entry.js +1 -1
- package/dist/esm-es5/{useLeadFormState-9a652a42.js → useLeadFormState-c379e5d7.js} +1 -1
- package/dist/esm-es5/usePayoutStatus-f064247b.js +6 -0
- package/dist/esm-es5/{utils-f27e62dc.js → utils-6122971b.js} +1 -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-a1b3f61a.js → p-00bc7211.js} +1 -1
- package/dist/mint-components/p-014dc2be.entry.js +1 -0
- package/dist/mint-components/p-09707418.system.entry.js +1 -0
- package/dist/mint-components/{p-58b668a0.js → p-0e1a1b14.js} +1 -1
- package/dist/mint-components/{p-0cb51ea1.system.entry.js → p-14e813a7.system.entry.js} +1 -1
- package/dist/mint-components/{p-c67ffd25.system.entry.js → p-18720462.system.entry.js} +1 -1
- package/dist/mint-components/{p-a30d7069.system.entry.js → p-22a9114f.system.entry.js} +1 -1
- package/dist/mint-components/p-2c86af62.system.entry.js +1 -0
- package/dist/mint-components/p-3219fdbe.entry.js +99 -0
- package/dist/mint-components/p-333d5597.system.entry.js +1 -0
- package/dist/mint-components/p-40e0251f.system.js +6 -0
- package/dist/mint-components/{p-bef123be.entry.js → p-47c83656.entry.js} +1 -1
- package/dist/mint-components/{p-5a3e2966.entry.js → p-4c811d12.entry.js} +1 -1
- package/dist/mint-components/{p-1e406d04.system.entry.js → p-4ce51b1c.system.entry.js} +1 -1
- package/dist/mint-components/{p-dbb79392.js → p-4fed8672.js} +1 -1
- package/dist/mint-components/{p-3fa99fea.system.entry.js → p-511c87ce.system.entry.js} +1 -1
- package/dist/mint-components/{p-9f57e731.system.entry.js → p-56009bf0.system.entry.js} +1 -1
- package/dist/mint-components/{p-8677688c.entry.js → p-5d059c95.entry.js} +1 -1
- package/dist/mint-components/{p-c90fcb02.system.js → p-60465a2d.system.js} +1 -1
- package/dist/mint-components/{p-58f4bf7a.entry.js → p-60c14cec.entry.js} +1 -1
- package/dist/mint-components/{p-c5f92183.system.entry.js → p-612062cd.system.entry.js} +1 -1
- package/dist/mint-components/{p-0ac84da5.system.entry.js → p-6445e926.system.entry.js} +1 -1
- package/dist/mint-components/{p-db64c957.entry.js → p-6c006998.entry.js} +2 -2
- package/dist/mint-components/{p-252465eb.js → p-6d5bd95a.js} +1 -1
- package/dist/mint-components/{p-e4017ba5.entry.js → p-6d9ce4e5.entry.js} +1 -1
- package/dist/mint-components/{p-fc86ba65.system.entry.js → p-717b6730.system.entry.js} +1 -1
- package/dist/mint-components/{p-a275725a.system.js → p-74f43a08.system.js} +1 -1
- package/dist/mint-components/{p-c44b3725.js → p-79a3344f.js} +1 -1
- package/dist/mint-components/{p-d181b17c.js → p-7a268047.js} +1 -1
- package/dist/mint-components/p-8b5b2acc.entry.js +1 -0
- package/dist/mint-components/p-967a9040.system.js +1 -0
- package/dist/mint-components/{p-ee3d2ae4.system.js → p-9f8d34d1.system.js} +1 -1
- package/dist/mint-components/{p-8e913ce5.entry.js → p-a217cc8d.entry.js} +1 -1
- package/dist/mint-components/{p-124af9d6.entry.js → p-a5c63310.entry.js} +1 -1
- package/dist/mint-components/{p-08b373b9.system.js → p-aa08457e.system.js} +1 -1
- package/dist/mint-components/{p-38c4653d.js → p-aa8c6332.js} +1 -1
- package/dist/mint-components/{p-ee290b30.system.js → p-ad4348c3.system.js} +1 -1
- package/dist/mint-components/{p-2fd2f22b.entry.js → p-aefaec37.entry.js} +1 -1
- package/dist/mint-components/{p-5bb24669.system.entry.js → p-bec87ac9.system.entry.js} +1 -1
- package/dist/mint-components/{p-6b55555b.system.js → p-c85f204b.system.js} +1 -1
- package/dist/mint-components/{p-b5fd4fb6.system.js → p-c994512c.system.js} +1 -1
- package/dist/mint-components/{p-19de8749.system.entry.js → p-d3120982.system.entry.js} +1 -1
- package/dist/mint-components/p-db1a0db1.js +1233 -0
- package/dist/mint-components/{p-f3ccba80.system.js → p-e0a724dd.system.js} +19 -19
- package/dist/mint-components/{p-94ae86fc.entry.js → p-ea0bc627.entry.js} +1 -1
- package/dist/mint-components/{p-946f8a2c.js → p-ed16b35a.js} +1 -1
- package/dist/mint-components/p-ef8c9f73.entry.js +273 -0
- package/dist/mint-components/{p-6dd86003.system.js → p-f0eae4e6.system.js} +1 -1
- package/dist/mint-components/p-f17b6de6.js +157 -0
- package/dist/mint-components/{p-54c250de.system.entry.js → p-f401ef19.system.entry.js} +1 -1
- package/dist/mint-components/{p-735c9185.entry.js → p-f6a7d4d3.entry.js} +2 -2
- package/dist/types/components/sqm-header-logo/sqm-header-logo.d.ts +14 -1
- 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/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 +331 -1
- 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/collection/global/styles.v1.js +0 -733
- package/dist/collection/global/styles.v1.ts +0 -735
- package/dist/esm-es5/data-acdb790f.js +0 -6
- package/dist/mint-components/global/styles.v1.ts +0 -735
- package/dist/mint-components/p-06b4fa6a.entry.js +0 -273
- package/dist/mint-components/p-11927355.system.entry.js +0 -1
- package/dist/mint-components/p-20f8e7ca.entry.js +0 -99
- package/dist/mint-components/p-37ef2ce1.entry.js +0 -1
- package/dist/mint-components/p-469a6450.system.js +0 -6
- package/dist/mint-components/p-53b49d27.system.js +0 -1
- package/dist/mint-components/p-8ea16fb6.js +0 -1233
- package/dist/mint-components/p-a7ee19dc.entry.js +0 -1
- package/dist/mint-components/p-c4f275db.system.entry.js +0 -1
- package/dist/mint-components/p-e1e7d01c.js +0 -157
- package/dist/mint-components/p-eea87fdc.system.entry.js +0 -1
- package/dist/types/global/styles.v1.d.ts +0 -2
- /package/dist/collection/global/{styles.v2.js → styles.js} +0 -0
- /package/dist/collection/global/{styles.v2.ts → styles.ts} +0 -0
- /package/dist/mint-components/global/{styles.v2.ts → styles.ts} +0 -0
- /package/dist/types/global/{styles.v2.d.ts → styles.d.ts} +0 -0
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
const index = require('./index-a43a63b4.js');
|
|
6
|
-
require('./global-
|
|
6
|
+
require('./global-8bba5b3a.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
|
require('./cjs-1066ec21.js');
|
|
@@ -19,26 +19,26 @@ require('./sqm-text-span-view-7a61ae4c.js');
|
|
|
19
19
|
const sqmCloseButtonView = require('./sqm-close-button-view-5e85ac51.js');
|
|
20
20
|
require('./index-8c6255f5.js');
|
|
21
21
|
const emailRegistrationView = require('./email-registration-view-ace50780.js');
|
|
22
|
-
const sqmLeadCheckboxFieldView = require('./sqm-lead-checkbox-field-view-
|
|
22
|
+
const sqmLeadCheckboxFieldView = require('./sqm-lead-checkbox-field-view-340acad0.js');
|
|
23
23
|
const sqmLeaderboardRankView = require('./sqm-leaderboard-rank-view-6a1e63de.js');
|
|
24
24
|
const sqmLogoutCurrentUserView = require('./sqm-logout-current-user-view-b61c8bdf.js');
|
|
25
25
|
const sqmNavigationSidebarView = require('./sqm-navigation-sidebar-view-de90ef03.js');
|
|
26
26
|
const sqmNavigationSidebarItemView = require('./sqm-navigation-sidebar-item-view-4e88f774.js');
|
|
27
|
-
const sqmPortalEmailVerificationView = require('./sqm-portal-email-verification-view-
|
|
27
|
+
const sqmPortalEmailVerificationView = require('./sqm-portal-email-verification-view-5518eb0d.js');
|
|
28
28
|
const sqmPortalLoginView = require('./sqm-portal-login-view-bb50304c.js');
|
|
29
29
|
const sqmBaseRegistrationFormView = require('./sqm-base-registration-form-view-69a4b615.js');
|
|
30
30
|
const sqmPortalRegistrationFormView = require('./sqm-portal-registration-form-view-5a96c2f5.js');
|
|
31
|
-
const sqmPortalProfileView = require('./sqm-portal-profile-view-
|
|
31
|
+
const sqmPortalProfileView = require('./sqm-portal-profile-view-615e6975.js');
|
|
32
32
|
require('./utilities-9a0c5e91.js');
|
|
33
33
|
const sqmPortalResetPasswordView = require('./sqm-portal-reset-password-view-25eb2099.js');
|
|
34
34
|
const sqmPortalVerifyEmailView = require('./sqm-portal-verify-email-view-1c4e781f.js');
|
|
35
35
|
require('./ErrorView-3f91e5ab.js');
|
|
36
36
|
const sqmQrCodeView = require('./sqm-qr-code-view-4ccf89da.js');
|
|
37
|
-
const ShadowViewAddon = require('./ShadowViewAddon-
|
|
37
|
+
const ShadowViewAddon = require('./ShadowViewAddon-1b38dcfc.js');
|
|
38
38
|
const sqmPortalContainerView = require('./sqm-portal-container-view-07e4343f.js');
|
|
39
|
-
const IndirectTaxDetailsView = require('./IndirectTaxDetailsView-
|
|
40
|
-
const utils = require('./utils-
|
|
41
|
-
const sqmLeadInputFieldView = require('./sqm-lead-input-field-view-
|
|
39
|
+
const IndirectTaxDetailsView = require('./IndirectTaxDetailsView-e5f70b8b.js');
|
|
40
|
+
const utils = require('./utils-83d125fa.js');
|
|
41
|
+
const sqmLeadInputFieldView = require('./sqm-lead-input-field-view-06ed3632.js');
|
|
42
42
|
|
|
43
43
|
/**
|
|
44
44
|
* lodash (Custom Build) <https://lodash.com/>
|
|
@@ -15650,6 +15650,7 @@ const stepOneProps = {
|
|
|
15650
15650
|
},
|
|
15651
15651
|
},
|
|
15652
15652
|
data: {
|
|
15653
|
+
partnerData: {},
|
|
15653
15654
|
regionLabelEnum: "STATE",
|
|
15654
15655
|
regions: [],
|
|
15655
15656
|
phoneCountries: [
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
const index = require('./index-a43a63b4.js');
|
|
4
|
-
const global = require('./global-
|
|
4
|
+
const global = require('./global-8bba5b3a.js');
|
|
5
5
|
const domContextHooks_module = require('./dom-context-hooks.module-7fa676ae.js');
|
|
6
6
|
const index_module = require('./index.module-4f54e412.js');
|
|
7
7
|
const JSS = require('./JSS-8503a151.js');
|
|
@@ -3,6 +3,133 @@
|
|
|
3
3
|
const domContextHooks_module = require('./dom-context-hooks.module-7fa676ae.js');
|
|
4
4
|
const index_module = require('./index.module-4f54e412.js');
|
|
5
5
|
|
|
6
|
+
const TAX_CONTEXT_NAMESPACE = "sq:tax-and-cash";
|
|
7
|
+
const TAX_FORM_CONTEXT_NAMESPACE = "sq:tax-form-context";
|
|
8
|
+
const USER_QUERY_NAMESPACE = "sq:user-info-query";
|
|
9
|
+
const USER_FORM_CONTEXT_NAMESPACE = "sq:user-form-context";
|
|
10
|
+
const FINANCE_NETWORK_SETTINGS_NAMESPACE = "sq:finance-network-settings";
|
|
11
|
+
const COUNTRIES_NAMESPACE = "sq:countries:list";
|
|
12
|
+
const SORTED_COUNTRIES_NAMESPACE = "sq:countries:sorted";
|
|
13
|
+
const COUNTRIES_QUERY_NAMESPACE = "sq:countries:query";
|
|
14
|
+
const CURRENCIES_NAMESPACE = "sq:currencies:list";
|
|
15
|
+
const CURRENCIES_QUERY_NAMESPACE = "sq:currencies:query";
|
|
16
|
+
const GET_USER = index_module.dist.gql `
|
|
17
|
+
query getUserTaxInfo {
|
|
18
|
+
user: viewer {
|
|
19
|
+
... on User {
|
|
20
|
+
id
|
|
21
|
+
firstName
|
|
22
|
+
lastName
|
|
23
|
+
email
|
|
24
|
+
countryCode
|
|
25
|
+
customFields
|
|
26
|
+
rewards(limit: 1000) {
|
|
27
|
+
data {
|
|
28
|
+
statuses
|
|
29
|
+
partnerFundsTransfer {
|
|
30
|
+
id
|
|
31
|
+
status
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
managedIdentity {
|
|
36
|
+
uid
|
|
37
|
+
email
|
|
38
|
+
emailVerified
|
|
39
|
+
}
|
|
40
|
+
impactConnection {
|
|
41
|
+
connected
|
|
42
|
+
user {
|
|
43
|
+
firstName
|
|
44
|
+
lastName
|
|
45
|
+
}
|
|
46
|
+
publisher {
|
|
47
|
+
id
|
|
48
|
+
brandedSignup
|
|
49
|
+
countryCode
|
|
50
|
+
currency
|
|
51
|
+
billingAddress
|
|
52
|
+
billingCity
|
|
53
|
+
billingState
|
|
54
|
+
billingCountryCode
|
|
55
|
+
billingPostalCode
|
|
56
|
+
phoneNumberCountryCode
|
|
57
|
+
phoneNumber
|
|
58
|
+
taxInformation {
|
|
59
|
+
indirectTaxId
|
|
60
|
+
indirectTaxCountryCode
|
|
61
|
+
indirectTaxRegion
|
|
62
|
+
additionalTaxId
|
|
63
|
+
withholdingTaxId
|
|
64
|
+
withholdingTaxCountryCode
|
|
65
|
+
}
|
|
66
|
+
requiredTaxDocumentType
|
|
67
|
+
currentTaxDocument {
|
|
68
|
+
status
|
|
69
|
+
type
|
|
70
|
+
dateCreated
|
|
71
|
+
}
|
|
72
|
+
withdrawalSettings {
|
|
73
|
+
paymentMethod
|
|
74
|
+
paypalEmailAddress
|
|
75
|
+
bankCountry
|
|
76
|
+
bankAccountNumber
|
|
77
|
+
paymentSchedulingType
|
|
78
|
+
paymentThreshold
|
|
79
|
+
paymentDay
|
|
80
|
+
}
|
|
81
|
+
payoutsAccount {
|
|
82
|
+
hold
|
|
83
|
+
holdReasons
|
|
84
|
+
balance
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
`;
|
|
92
|
+
const GET_COUNTRIES = index_module.dist.gql `
|
|
93
|
+
query getCountries {
|
|
94
|
+
impactPayoutCountries(limit: 1000) {
|
|
95
|
+
data {
|
|
96
|
+
countryCode
|
|
97
|
+
displayName
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
`;
|
|
102
|
+
const GET_CURRENCIES = index_module.dist.gql `
|
|
103
|
+
query currencies($locale: RSLocale) {
|
|
104
|
+
currencies(limit: 300) {
|
|
105
|
+
data {
|
|
106
|
+
displayName(locale: $locale)
|
|
107
|
+
currencyCode
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
`;
|
|
112
|
+
const GET_FINANCE_NETWORK_SETTINGS = index_module.dist.gql `
|
|
113
|
+
query impactFinanceNetworkSettings(
|
|
114
|
+
$filter: ImpactFinanceNetworkSettingsFilterInput
|
|
115
|
+
) {
|
|
116
|
+
impactFinanceNetworkSettings(filter: $filter, limit: 1000) {
|
|
117
|
+
data {
|
|
118
|
+
countryCode
|
|
119
|
+
currency
|
|
120
|
+
defaultFinancePaymentMethodId
|
|
121
|
+
thresholdOptions
|
|
122
|
+
withdrawalSettingId
|
|
123
|
+
internationalEftFee
|
|
124
|
+
foreignFxFee
|
|
125
|
+
defaultFxFee
|
|
126
|
+
}
|
|
127
|
+
totalCount
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
`;
|
|
131
|
+
const FORM_STEPS = 4;
|
|
132
|
+
|
|
6
133
|
const TAX_FORM_UPDATED_EVENT_KEY = "sqm:tax-form-updated";
|
|
7
134
|
|
|
8
135
|
var toArray = function toArray(a) {
|
|
@@ -1002,7 +1129,7 @@ const GET_TAX_SETTING = index_module.dist.gql `
|
|
|
1002
1129
|
}
|
|
1003
1130
|
`;
|
|
1004
1131
|
function getStatus(data) {
|
|
1005
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q;
|
|
1132
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w;
|
|
1006
1133
|
const account = (_b = (_a = data.user.impactConnection) === null || _a === void 0 ? void 0 : _a.publisher) === null || _b === void 0 ? void 0 : _b.payoutsAccount;
|
|
1007
1134
|
const hasTransferredReward = (_e = (_d = (_c = data === null || data === void 0 ? void 0 : data.user) === null || _c === void 0 ? void 0 : _c.rewards) === null || _d === void 0 ? void 0 : _d.data) === null || _e === void 0 ? void 0 : _e.find((reward) => reward.statuses.includes("REDEEMED") &&
|
|
1008
1135
|
reward.partnerFundsTransfer.status === "TRANSFERRED");
|
|
@@ -1020,7 +1147,19 @@ function getStatus(data) {
|
|
|
1020
1147
|
if ((_p = account.holdReasons) === null || _p === void 0 ? void 0 : _p.includes("IDV_CHECK_FAILED_INTERNAL"))
|
|
1021
1148
|
return "VERIFICATION:FAILED";
|
|
1022
1149
|
if (((_q = account.holdReasons) === null || _q === void 0 ? void 0 : _q.includes("NEW_PAYEE_REVIEW")) && hasTransferredReward)
|
|
1023
|
-
return "
|
|
1150
|
+
return "NEW_PAYEE_REVIEW";
|
|
1151
|
+
if ((_r = account.holdReasons) === null || _r === void 0 ? void 0 : _r.includes("PAYMENT_HOLD_ON_CHANGE"))
|
|
1152
|
+
return "PAYMENT_HOLD_ON_CHANGE";
|
|
1153
|
+
if ((_s = account.holdReasons) === null || _s === void 0 ? void 0 : _s.includes("BENEFICIARY_NAME_INVALID"))
|
|
1154
|
+
return "BENEFICIARY_NAME_INVALID";
|
|
1155
|
+
if ((_t = account.holdReasons) === null || _t === void 0 ? void 0 : _t.includes("BENEFICIARY_NAME_MISMATCH"))
|
|
1156
|
+
return "BENEFICIARY_NAME_MISMATCH";
|
|
1157
|
+
if ((_u = account.holdReasons) === null || _u === void 0 ? void 0 : _u.includes("BANK_TAX_NAME_MISMATCH"))
|
|
1158
|
+
return "BANK_TAX_NAME_MISMATCH";
|
|
1159
|
+
if ((_v = account.holdReasons) === null || _v === void 0 ? void 0 : _v.includes("WITHDRAWAL_SETTINGS_INVALID"))
|
|
1160
|
+
return "WITHDRAWAL_SETTINGS_INVALID";
|
|
1161
|
+
if ((_w = account.holdReasons) === null || _w === void 0 ? void 0 : _w.includes("PAYMENT_RETURNED"))
|
|
1162
|
+
return "PAYMENT_RETURNED";
|
|
1024
1163
|
if (account.hold)
|
|
1025
1164
|
return "HOLD";
|
|
1026
1165
|
return "DONE";
|
|
@@ -1032,6 +1171,8 @@ function usePayoutStatus(props) {
|
|
|
1032
1171
|
const { data: taxSettingRes } = index_module.wn(GET_TAX_SETTING, {});
|
|
1033
1172
|
const { render, loading: veriffLoading, errors: veriffErrors, } = useVeriffApp();
|
|
1034
1173
|
const [status, setStatus] = domContextHooks_module.useState(undefined);
|
|
1174
|
+
const setContext = index_module.En(TAX_FORM_CONTEXT_NAMESPACE);
|
|
1175
|
+
const setStep = index_module.En(TAX_CONTEXT_NAMESPACE);
|
|
1035
1176
|
const enforceUsTaxComplianceOption = (_a = taxSettingRes === null || taxSettingRes === void 0 ? void 0 : taxSettingRes.tenantSettings) === null || _a === void 0 ? void 0 : _a.enforceUsTaxCompliance;
|
|
1036
1177
|
domContextHooks_module.useEffect(() => {
|
|
1037
1178
|
if (!data)
|
|
@@ -1059,6 +1200,22 @@ function usePayoutStatus(props) {
|
|
|
1059
1200
|
url += "#3";
|
|
1060
1201
|
window.history.pushState(null, "", url);
|
|
1061
1202
|
};
|
|
1203
|
+
const onPaymentInfoClick = () => {
|
|
1204
|
+
setContext({
|
|
1205
|
+
overrideNextStep: "/dashboard",
|
|
1206
|
+
overrideBackStep: "/dashboard",
|
|
1207
|
+
hideSteps: true,
|
|
1208
|
+
});
|
|
1209
|
+
setStep("/4");
|
|
1210
|
+
};
|
|
1211
|
+
const onNewFormClick = () => {
|
|
1212
|
+
setContext({
|
|
1213
|
+
overrideNextStep: "/dashboard",
|
|
1214
|
+
overrideBackStep: "/dashboard",
|
|
1215
|
+
hideSteps: true,
|
|
1216
|
+
});
|
|
1217
|
+
setStep("/3");
|
|
1218
|
+
};
|
|
1062
1219
|
return {
|
|
1063
1220
|
states: {
|
|
1064
1221
|
loading,
|
|
@@ -1072,137 +1229,12 @@ function usePayoutStatus(props) {
|
|
|
1072
1229
|
callbacks: {
|
|
1073
1230
|
onTermsClick,
|
|
1074
1231
|
onClick: render,
|
|
1232
|
+
onPaymentInfoClick,
|
|
1233
|
+
onNewFormClick,
|
|
1075
1234
|
},
|
|
1076
1235
|
};
|
|
1077
1236
|
}
|
|
1078
1237
|
|
|
1079
|
-
const TAX_CONTEXT_NAMESPACE = "sq:tax-and-cash";
|
|
1080
|
-
const TAX_FORM_CONTEXT_NAMESPACE = "sq:tax-form-context";
|
|
1081
|
-
const USER_QUERY_NAMESPACE = "sq:user-info-query";
|
|
1082
|
-
const USER_FORM_CONTEXT_NAMESPACE = "sq:user-form-context";
|
|
1083
|
-
const FINANCE_NETWORK_SETTINGS_NAMESPACE = "sq:finance-network-settings";
|
|
1084
|
-
const COUNTRIES_NAMESPACE = "sq:countries:list";
|
|
1085
|
-
const SORTED_COUNTRIES_NAMESPACE = "sq:countries:sorted";
|
|
1086
|
-
const COUNTRIES_QUERY_NAMESPACE = "sq:countries:query";
|
|
1087
|
-
const CURRENCIES_NAMESPACE = "sq:currencies:list";
|
|
1088
|
-
const CURRENCIES_QUERY_NAMESPACE = "sq:currencies:query";
|
|
1089
|
-
const GET_USER = index_module.dist.gql `
|
|
1090
|
-
query getUserTaxInfo {
|
|
1091
|
-
user: viewer {
|
|
1092
|
-
... on User {
|
|
1093
|
-
id
|
|
1094
|
-
firstName
|
|
1095
|
-
lastName
|
|
1096
|
-
email
|
|
1097
|
-
countryCode
|
|
1098
|
-
customFields
|
|
1099
|
-
rewards(limit: 1000) {
|
|
1100
|
-
data {
|
|
1101
|
-
statuses
|
|
1102
|
-
partnerFundsTransfer {
|
|
1103
|
-
id
|
|
1104
|
-
status
|
|
1105
|
-
}
|
|
1106
|
-
}
|
|
1107
|
-
}
|
|
1108
|
-
managedIdentity {
|
|
1109
|
-
uid
|
|
1110
|
-
email
|
|
1111
|
-
emailVerified
|
|
1112
|
-
}
|
|
1113
|
-
impactConnection {
|
|
1114
|
-
connected
|
|
1115
|
-
user {
|
|
1116
|
-
firstName
|
|
1117
|
-
lastName
|
|
1118
|
-
}
|
|
1119
|
-
publisher {
|
|
1120
|
-
id
|
|
1121
|
-
brandedSignup
|
|
1122
|
-
countryCode
|
|
1123
|
-
currency
|
|
1124
|
-
billingAddress
|
|
1125
|
-
billingCity
|
|
1126
|
-
billingState
|
|
1127
|
-
billingCountryCode
|
|
1128
|
-
billingPostalCode
|
|
1129
|
-
phoneNumberCountryCode
|
|
1130
|
-
phoneNumber
|
|
1131
|
-
taxInformation {
|
|
1132
|
-
indirectTaxId
|
|
1133
|
-
indirectTaxCountryCode
|
|
1134
|
-
indirectTaxRegion
|
|
1135
|
-
additionalTaxId
|
|
1136
|
-
withholdingTaxId
|
|
1137
|
-
withholdingTaxCountryCode
|
|
1138
|
-
}
|
|
1139
|
-
requiredTaxDocumentType
|
|
1140
|
-
currentTaxDocument {
|
|
1141
|
-
status
|
|
1142
|
-
type
|
|
1143
|
-
dateCreated
|
|
1144
|
-
}
|
|
1145
|
-
withdrawalSettings {
|
|
1146
|
-
paymentMethod
|
|
1147
|
-
paypalEmailAddress
|
|
1148
|
-
bankCountry
|
|
1149
|
-
bankAccountNumber
|
|
1150
|
-
paymentSchedulingType
|
|
1151
|
-
paymentThreshold
|
|
1152
|
-
paymentDay
|
|
1153
|
-
}
|
|
1154
|
-
payoutsAccount {
|
|
1155
|
-
hold
|
|
1156
|
-
holdReasons
|
|
1157
|
-
balance
|
|
1158
|
-
}
|
|
1159
|
-
}
|
|
1160
|
-
}
|
|
1161
|
-
}
|
|
1162
|
-
}
|
|
1163
|
-
}
|
|
1164
|
-
`;
|
|
1165
|
-
const GET_COUNTRIES = index_module.dist.gql `
|
|
1166
|
-
query getCountries {
|
|
1167
|
-
impactPayoutCountries(limit: 1000) {
|
|
1168
|
-
data {
|
|
1169
|
-
countryCode
|
|
1170
|
-
displayName
|
|
1171
|
-
}
|
|
1172
|
-
}
|
|
1173
|
-
}
|
|
1174
|
-
`;
|
|
1175
|
-
const GET_CURRENCIES = index_module.dist.gql `
|
|
1176
|
-
query currencies($locale: RSLocale) {
|
|
1177
|
-
currencies(limit: 300) {
|
|
1178
|
-
data {
|
|
1179
|
-
displayName(locale: $locale)
|
|
1180
|
-
currencyCode
|
|
1181
|
-
}
|
|
1182
|
-
}
|
|
1183
|
-
}
|
|
1184
|
-
`;
|
|
1185
|
-
const GET_FINANCE_NETWORK_SETTINGS = index_module.dist.gql `
|
|
1186
|
-
query impactFinanceNetworkSettings(
|
|
1187
|
-
$filter: ImpactFinanceNetworkSettingsFilterInput
|
|
1188
|
-
) {
|
|
1189
|
-
impactFinanceNetworkSettings(filter: $filter, limit: 1000) {
|
|
1190
|
-
data {
|
|
1191
|
-
countryCode
|
|
1192
|
-
currency
|
|
1193
|
-
defaultFinancePaymentMethodId
|
|
1194
|
-
thresholdOptions
|
|
1195
|
-
withdrawalSettingId
|
|
1196
|
-
internationalEftFee
|
|
1197
|
-
foreignFxFee
|
|
1198
|
-
defaultFxFee
|
|
1199
|
-
}
|
|
1200
|
-
totalCount
|
|
1201
|
-
}
|
|
1202
|
-
}
|
|
1203
|
-
`;
|
|
1204
|
-
const FORM_STEPS = 4;
|
|
1205
|
-
|
|
1206
1238
|
exports.COUNTRIES_NAMESPACE = COUNTRIES_NAMESPACE;
|
|
1207
1239
|
exports.COUNTRIES_QUERY_NAMESPACE = COUNTRIES_QUERY_NAMESPACE;
|
|
1208
1240
|
exports.CURRENCIES_NAMESPACE = CURRENCIES_NAMESPACE;
|
|
@@ -6,6 +6,10 @@ import { Component, h, Host, Prop } from "@stencil/core";
|
|
|
6
6
|
*/
|
|
7
7
|
export class HeroImage {
|
|
8
8
|
constructor() {
|
|
9
|
+
/**
|
|
10
|
+
* @uiName Logo text
|
|
11
|
+
*/
|
|
12
|
+
this.logoTextSize = "24px";
|
|
9
13
|
/**
|
|
10
14
|
* Page participants are navigated to after clicking the header logo.
|
|
11
15
|
*
|
|
@@ -22,8 +26,10 @@ export class HeroImage {
|
|
|
22
26
|
disconnectedCallback() { }
|
|
23
27
|
render() {
|
|
24
28
|
return (h(Host, null,
|
|
25
|
-
h("a", { href: this.nextPage, part: "sqm-link" },
|
|
26
|
-
|
|
29
|
+
h("a", { href: this.nextPage, part: "sqm-link" }, this.imageUrl ? (h("img", { style: { height: `${this === null || this === void 0 ? void 0 : this.height}px` }, src: this === null || this === void 0 ? void 0 : this.imageUrl })) : (h("h3", { style: {
|
|
30
|
+
fontSize: this.logoTextSize,
|
|
31
|
+
color: this.logoTextColor || "inherit",
|
|
32
|
+
} }, this.logoText)))));
|
|
27
33
|
}
|
|
28
34
|
static get is() { return "sqm-header-logo"; }
|
|
29
35
|
static get encapsulation() { return "shadow"; }
|
|
@@ -37,7 +43,7 @@ export class HeroImage {
|
|
|
37
43
|
"references": {}
|
|
38
44
|
},
|
|
39
45
|
"required": false,
|
|
40
|
-
"optional":
|
|
46
|
+
"optional": true,
|
|
41
47
|
"docs": {
|
|
42
48
|
"tags": [{
|
|
43
49
|
"text": "ImageUpload",
|
|
@@ -54,6 +60,70 @@ export class HeroImage {
|
|
|
54
60
|
"attribute": "image-url",
|
|
55
61
|
"reflect": false
|
|
56
62
|
},
|
|
63
|
+
"logoText": {
|
|
64
|
+
"type": "string",
|
|
65
|
+
"mutable": false,
|
|
66
|
+
"complexType": {
|
|
67
|
+
"original": "string",
|
|
68
|
+
"resolved": "string",
|
|
69
|
+
"references": {}
|
|
70
|
+
},
|
|
71
|
+
"required": false,
|
|
72
|
+
"optional": true,
|
|
73
|
+
"docs": {
|
|
74
|
+
"tags": [{
|
|
75
|
+
"text": "Logo text",
|
|
76
|
+
"name": "uiName"
|
|
77
|
+
}],
|
|
78
|
+
"text": ""
|
|
79
|
+
},
|
|
80
|
+
"attribute": "logo-text",
|
|
81
|
+
"reflect": false
|
|
82
|
+
},
|
|
83
|
+
"logoTextSize": {
|
|
84
|
+
"type": "string",
|
|
85
|
+
"mutable": false,
|
|
86
|
+
"complexType": {
|
|
87
|
+
"original": "string",
|
|
88
|
+
"resolved": "string",
|
|
89
|
+
"references": {}
|
|
90
|
+
},
|
|
91
|
+
"required": false,
|
|
92
|
+
"optional": true,
|
|
93
|
+
"docs": {
|
|
94
|
+
"tags": [{
|
|
95
|
+
"text": "Logo text",
|
|
96
|
+
"name": "uiName"
|
|
97
|
+
}],
|
|
98
|
+
"text": ""
|
|
99
|
+
},
|
|
100
|
+
"attribute": "logo-text-size",
|
|
101
|
+
"reflect": false,
|
|
102
|
+
"defaultValue": "\"24px\""
|
|
103
|
+
},
|
|
104
|
+
"logoTextColor": {
|
|
105
|
+
"type": "string",
|
|
106
|
+
"mutable": false,
|
|
107
|
+
"complexType": {
|
|
108
|
+
"original": "string",
|
|
109
|
+
"resolved": "string",
|
|
110
|
+
"references": {}
|
|
111
|
+
},
|
|
112
|
+
"required": false,
|
|
113
|
+
"optional": true,
|
|
114
|
+
"docs": {
|
|
115
|
+
"tags": [{
|
|
116
|
+
"text": "color",
|
|
117
|
+
"name": "uiWidget"
|
|
118
|
+
}, {
|
|
119
|
+
"text": "Logo text",
|
|
120
|
+
"name": "uiName"
|
|
121
|
+
}],
|
|
122
|
+
"text": ""
|
|
123
|
+
},
|
|
124
|
+
"attribute": "logo-text-color",
|
|
125
|
+
"reflect": false
|
|
126
|
+
},
|
|
57
127
|
"nextPage": {
|
|
58
128
|
"type": "string",
|
|
59
129
|
"mutable": false,
|
|
@@ -6,7 +6,7 @@ import { COUNTRIES_QUERY_NAMESPACE, TAX_CONTEXT_NAMESPACE, TAX_FORM_CONTEXT_NAME
|
|
|
6
6
|
import { TAX_FORM_UPDATED_EVENT_KEY } from "../eventKeys";
|
|
7
7
|
import { INDIRECT_TAX_PROVINCES, INDIRECT_TAX_SPAIN_REGIONS, } from "../subregions";
|
|
8
8
|
import { getCountryObj, validTaxDocument } from "../utils";
|
|
9
|
-
const CONNECT_PARTNER = gql `
|
|
9
|
+
export const CONNECT_PARTNER = gql `
|
|
10
10
|
mutation createImpactConnection($vars: ImpactConnectionInput!) {
|
|
11
11
|
createImpactConnection(impactConnectionInput: $vars) {
|
|
12
12
|
success
|
|
@@ -111,8 +111,51 @@ export function useIndirectTaxForm(props) {
|
|
|
111
111
|
console.error("Could not detect select change");
|
|
112
112
|
setFormState((p) => ({ ...p, [field]: value }));
|
|
113
113
|
};
|
|
114
|
-
|
|
114
|
+
async function connectPartner(formData) {
|
|
115
115
|
var _a, _b, _c, _d, _e;
|
|
116
|
+
const vars = {
|
|
117
|
+
user: {
|
|
118
|
+
id: user.id,
|
|
119
|
+
accountId: user.accountId,
|
|
120
|
+
},
|
|
121
|
+
firstName: userForm.firstName,
|
|
122
|
+
lastName: userForm.lastName,
|
|
123
|
+
countryCode: userForm.countryCode,
|
|
124
|
+
currency: userForm.currency,
|
|
125
|
+
address: userForm.address,
|
|
126
|
+
city: userForm.city,
|
|
127
|
+
state: userForm.state,
|
|
128
|
+
postalCode: userForm.postalCode,
|
|
129
|
+
phoneNumber: userForm.phoneNumber,
|
|
130
|
+
phoneNumberCountryCode: userForm.phoneNumberCountryCode,
|
|
131
|
+
indirectTaxCountryCode: formData.selectedRegion,
|
|
132
|
+
indirectTaxRegion: formData.province || formData.subRegion,
|
|
133
|
+
indirectTaxId: formData.indirectTaxNumber,
|
|
134
|
+
additionalTaxId: formData.qstNumber,
|
|
135
|
+
withholdingTaxId: formData.subRegionTaxNumber,
|
|
136
|
+
};
|
|
137
|
+
const result = await connectImpactPartner({
|
|
138
|
+
vars,
|
|
139
|
+
});
|
|
140
|
+
if (!result || ((_a = result) === null || _a === void 0 ? void 0 : _a.message))
|
|
141
|
+
throw new Error();
|
|
142
|
+
if (!((_b = result.createImpactConnection) === null || _b === void 0 ? void 0 : _b.success)) {
|
|
143
|
+
// Output backend errors to console for now
|
|
144
|
+
console.error("Failed to create Impact connection: ", result.createImpactConnection.validationErrors);
|
|
145
|
+
throw new Error();
|
|
146
|
+
}
|
|
147
|
+
await refetch();
|
|
148
|
+
const resultPublisher = (_e = (_d = (_c = result
|
|
149
|
+
.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;
|
|
150
|
+
const hasValidCurrentDocument = validTaxDocument(resultPublisher === null || resultPublisher === void 0 ? void 0 : resultPublisher.requiredTaxDocumentType) && (resultPublisher === null || resultPublisher === void 0 ? void 0 : resultPublisher.currentTaxDocument);
|
|
151
|
+
// Fire form change event
|
|
152
|
+
window.dispatchEvent(new Event(TAX_FORM_UPDATED_EVENT_KEY));
|
|
153
|
+
return {
|
|
154
|
+
resultPublisher,
|
|
155
|
+
hasValidCurrentDocument,
|
|
156
|
+
};
|
|
157
|
+
}
|
|
158
|
+
const onSubmit = async (event) => {
|
|
116
159
|
if (!option) {
|
|
117
160
|
setErrors({ taxDetails: true });
|
|
118
161
|
return;
|
|
@@ -138,44 +181,7 @@ export function useIndirectTaxForm(props) {
|
|
|
138
181
|
}
|
|
139
182
|
setLoading(true);
|
|
140
183
|
try {
|
|
141
|
-
const
|
|
142
|
-
user: {
|
|
143
|
-
id: user.id,
|
|
144
|
-
accountId: user.accountId,
|
|
145
|
-
},
|
|
146
|
-
firstName: userForm.firstName,
|
|
147
|
-
lastName: userForm.lastName,
|
|
148
|
-
countryCode: userForm.countryCode,
|
|
149
|
-
currency: userForm.currency,
|
|
150
|
-
address: userForm.address,
|
|
151
|
-
city: userForm.city,
|
|
152
|
-
state: userForm.state,
|
|
153
|
-
postalCode: userForm.postalCode,
|
|
154
|
-
phoneNumber: userForm.phoneNumber,
|
|
155
|
-
phoneNumberCountryCode: userForm.phoneNumberCountryCode,
|
|
156
|
-
indirectTaxCountryCode: formData.selectedRegion,
|
|
157
|
-
indirectTaxRegion: formData.province || formData.subRegion,
|
|
158
|
-
indirectTaxId: formData.indirectTaxNumber,
|
|
159
|
-
additionalTaxId: formData.qstNumber,
|
|
160
|
-
withholdingTaxId: formData.subRegionTaxNumber,
|
|
161
|
-
};
|
|
162
|
-
const result = await connectImpactPartner({
|
|
163
|
-
vars,
|
|
164
|
-
});
|
|
165
|
-
if (!result || ((_a = result) === null || _a === void 0 ? void 0 : _a.message))
|
|
166
|
-
throw new Error();
|
|
167
|
-
if (!((_b = result.createImpactConnection) === null || _b === void 0 ? void 0 : _b.success)) {
|
|
168
|
-
// Output backend errors to console for now
|
|
169
|
-
console.error("Failed to create Impact connection: ", result.createImpactConnection
|
|
170
|
-
.validationErrors);
|
|
171
|
-
throw new Error();
|
|
172
|
-
}
|
|
173
|
-
await refetch();
|
|
174
|
-
const resultPublisher = (_e = (_d = (_c = result
|
|
175
|
-
.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;
|
|
176
|
-
const hasValidCurrentDocument = validTaxDocument(resultPublisher === null || resultPublisher === void 0 ? void 0 : resultPublisher.requiredTaxDocumentType) && (resultPublisher === null || resultPublisher === void 0 ? void 0 : resultPublisher.currentTaxDocument);
|
|
177
|
-
// Fire form change event
|
|
178
|
-
window.dispatchEvent(new Event(TAX_FORM_UPDATED_EVENT_KEY));
|
|
184
|
+
const { resultPublisher, hasValidCurrentDocument } = await connectPartner(formData);
|
|
179
185
|
if ((resultPublisher === null || resultPublisher === void 0 ? void 0 : resultPublisher.requiredTaxDocumentType) &&
|
|
180
186
|
!hasValidCurrentDocument) {
|
|
181
187
|
// Go to docusign form
|