@saasquatch/mint-components 2.0.2-6 → 2.0.2-8
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-dce2a79b.js → IndirectTaxDetailsView-e5f70b8b.js} +2 -2
- package/dist/cjs/{ShadowViewAddon-357bc625.js → ShadowViewAddon-925a8fa6.js} +8 -8
- package/dist/cjs/{global-3d01d469.js → global-8bba5b3a.js} +1 -5
- 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 +345 -115
- package/dist/cjs/sqm-big-stat_47.cjs.entry.js +224 -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 +14 -1
- package/dist/cjs/{sqm-lead-checkbox-field-view-ebb9ead9.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-62debb73.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-c280139a.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-7bca5749.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-593f5d39.js → useLeadFormState-fd0445f9.js} +1 -1
- package/dist/cjs/{data-16106637.js → usePayoutStatus-9abe2de8.js} +158 -129
- package/dist/cjs/{utils-5167439f.js → utils-83d125fa.js} +1 -1
- package/dist/collection/components/sqm-header-logo/sqm-header-logo.js +80 -3
- package/dist/collection/components/sqm-portal-footer/sqm-portal-footer-view.js +3 -3
- package/dist/collection/components/sqm-reward-exchange-list/sqm-reward-exchange-list-view.js +4 -4
- package/dist/collection/components/tax-and-cash/TaxForm.stories.js +1 -0
- package/dist/collection/components/tax-and-cash/sqm-banking-info-form/useBankingInfoForm.js +2 -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-status-alert/sqm-payout-status-alert-view.js +90 -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 +33 -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 +302 -2
- 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/styles.js +1 -5
- package/dist/collection/global/styles.ts +1 -5
- package/dist/esm/{IndirectTaxDetailsView-b7fa596b.js → IndirectTaxDetailsView-0a57b622.js} +2 -2
- package/dist/esm/{ShadowViewAddon-32559cba.js → ShadowViewAddon-aae27c2e.js} +8 -8
- package/dist/esm/{global-55e73040.js → global-1099f20d.js} +1 -5
- 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 +296 -66
- package/dist/esm/sqm-big-stat_47.entry.js +202 -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 +14 -1
- package/dist/esm/{sqm-lead-checkbox-field-view-c359cc95.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-6fe71f32.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-176ddb91.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-6a53716b.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-d8667862.js → useLeadFormState-c379e5d7.js} +1 -1
- package/dist/esm/{data-acdb790f.js → usePayoutStatus-e0ef2374.js} +159 -130
- package/dist/esm/{utils-27fdc7d7.js → utils-6122971b.js} +1 -1
- package/dist/esm-es5/{IndirectTaxDetailsView-b7fa596b.js → IndirectTaxDetailsView-0a57b622.js} +1 -1
- package/dist/esm-es5/{ShadowViewAddon-32559cba.js → ShadowViewAddon-aae27c2e.js} +1 -1
- package/dist/esm-es5/{global-55e73040.js → global-1099f20d.js} +1 -1
- package/dist/esm-es5/loader.js +1 -1
- package/dist/esm-es5/mint-components.js +1 -1
- package/dist/esm-es5/sqm-banking-info-form_10.entry.js +1 -1
- package/dist/esm-es5/sqm-big-stat_47.entry.js +1 -1
- package/dist/esm-es5/sqm-code-verification.entry.js +1 -1
- package/dist/esm-es5/sqm-email-verification.entry.js +1 -1
- package/dist/esm-es5/sqm-empty_4.entry.js +1 -1
- package/dist/esm-es5/sqm-header-logo.entry.js +1 -1
- package/dist/esm-es5/{sqm-lead-checkbox-field-view-c359cc95.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-6fe71f32.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-176ddb91.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-6a53716b.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-d8667862.js → useLeadFormState-c379e5d7.js} +1 -1
- package/dist/esm-es5/usePayoutStatus-e0ef2374.js +6 -0
- package/dist/esm-es5/{utils-27fdc7d7.js → utils-6122971b.js} +1 -1
- package/dist/mint-components/global/styles.ts +1 -5
- package/dist/mint-components/mint-components.esm.js +1 -1
- package/dist/mint-components/mint-components.js +1 -1
- package/dist/mint-components/{p-c25e76f7.js → p-00bc7211.js} +1 -1
- package/dist/mint-components/p-0279c71d.system.entry.js +1 -0
- package/dist/mint-components/{p-3aba7c3a.system.entry.js → p-0649123a.system.entry.js} +1 -1
- package/dist/mint-components/p-09ab53fb.system.entry.js +1 -0
- package/dist/mint-components/{p-b9d63ca9.system.entry.js → p-14e813a7.system.entry.js} +1 -1
- package/dist/mint-components/{p-7a2375c3.system.entry.js → p-18720462.system.entry.js} +1 -1
- package/dist/mint-components/{p-6ec7b746.system.entry.js → p-22a9114f.system.entry.js} +1 -1
- package/dist/mint-components/p-27bc4daa.system.entry.js +1 -0
- package/dist/mint-components/{p-73fdd315.system.js → p-38f932ae.system.js} +1 -1
- package/dist/mint-components/{p-5a8911c7.entry.js → p-47c83656.entry.js} +1 -1
- package/dist/mint-components/{p-449314ca.entry.js → p-4c811d12.entry.js} +1 -1
- package/dist/mint-components/{p-745a27ee.system.entry.js → p-4ce51b1c.system.entry.js} +1 -1
- package/dist/mint-components/{p-9db05d78.js → p-4fed8672.js} +1 -1
- package/dist/mint-components/{p-b5905137.system.entry.js → p-511c87ce.system.entry.js} +1 -1
- package/dist/mint-components/{p-5b088b96.system.entry.js → p-56009bf0.system.entry.js} +1 -1
- package/dist/mint-components/{p-47b73018.js → p-57ce33dd.js} +2 -2
- package/dist/mint-components/p-59bb2d52.system.js +6 -0
- package/dist/mint-components/{p-da0a7fa5.entry.js → p-5d059c95.entry.js} +1 -1
- package/dist/mint-components/{p-2e0a3d84.entry.js → p-5f3eafd4.entry.js} +2 -2
- package/dist/mint-components/{p-4cfa1432.system.js → p-60465a2d.system.js} +1 -1
- package/dist/mint-components/{p-93f37676.entry.js → p-60c14cec.entry.js} +1 -1
- package/dist/mint-components/{p-709cdbf7.system.entry.js → p-6445e926.system.entry.js} +1 -1
- package/dist/mint-components/{p-c803eaed.entry.js → p-6c006998.entry.js} +1 -1
- package/dist/mint-components/{p-618d249d.js → p-6d5bd95a.js} +1 -1
- package/dist/mint-components/{p-757820a4.entry.js → p-6d9ce4e5.entry.js} +1 -1
- package/dist/mint-components/{p-959925bf.system.entry.js → p-717b6730.system.entry.js} +1 -1
- package/dist/mint-components/p-72bc9830.entry.js +273 -0
- package/dist/mint-components/{p-f9c3290d.system.js → p-74f43a08.system.js} +1 -1
- package/dist/mint-components/{p-ec0f9326.js → p-79a3344f.js} +1 -1
- package/dist/mint-components/{p-9504b639.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-bcb8532f.entry.js → p-a217cc8d.entry.js} +1 -1
- package/dist/mint-components/{p-b427cf9e.entry.js → p-a5c63310.entry.js} +1 -1
- package/dist/mint-components/{p-271c092c.system.js → p-aa08457e.system.js} +1 -1
- package/dist/mint-components/{p-887e3b03.js → p-aa8c6332.js} +1 -1
- package/dist/mint-components/p-ab111e29.entry.js +1 -0
- package/dist/mint-components/{p-e8661eaa.system.js → p-ad4348c3.system.js} +1 -1
- package/dist/mint-components/{p-130fd1d8.entry.js → p-aefaec37.entry.js} +1 -1
- package/dist/mint-components/{p-54154ed4.system.entry.js → p-bec87ac9.system.entry.js} +1 -1
- package/dist/mint-components/p-c41108ae.js +157 -0
- package/dist/mint-components/{p-52123353.system.js → p-c85f204b.system.js} +1 -1
- package/dist/mint-components/{p-aeea89b4.system.js → p-c994512c.system.js} +1 -1
- package/dist/mint-components/{p-84632241.system.entry.js → p-d3120982.system.entry.js} +1 -1
- package/dist/mint-components/{p-1b7900ed.js → p-db1a0db1.js} +1 -1
- package/dist/mint-components/p-e09c13e3.entry.js +99 -0
- package/dist/mint-components/{p-bcc61fbe.system.js → p-e0a724dd.system.js} +1 -1
- package/dist/mint-components/p-ea0bc627.entry.js +1 -0
- package/dist/mint-components/{p-23c21cf4.js → p-ed16b35a.js} +1 -1
- package/dist/mint-components/{p-0c6259b2.system.js → p-f0eae4e6.system.js} +1 -1
- package/dist/mint-components/{p-46a22d08.system.entry.js → p-f401ef19.system.entry.js} +1 -1
- 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 -41
- package/dist/types/global/android.d.ts +7 -0
- package/dist/types/global/demo.d.ts +2 -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/data-acdb790f.js +0 -6
- package/dist/mint-components/p-17e3f564.system.entry.js +0 -1
- package/dist/mint-components/p-469a6450.system.js +0 -6
- package/dist/mint-components/p-8a2ec966.entry.js +0 -1
- package/dist/mint-components/p-8a458176.entry.js +0 -273
- package/dist/mint-components/p-9d4f1401.system.entry.js +0 -1
- package/dist/mint-components/p-9ff60e10.system.js +0 -1
- package/dist/mint-components/p-a7ee19dc.entry.js +0 -1
- package/dist/mint-components/p-c8bbd212.entry.js +0 -99
- package/dist/mint-components/p-e1e7d01c.js +0 -157
- package/dist/mint-components/p-eea87fdc.system.entry.js +0 -1
- package/dist/mint-components/p-fac02d24.entry.js +0 -1
- package/shoelace/assets/icons/twitter-x.svg +0 -4
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
const index = require('./index-a43a63b4.js');
|
|
6
|
-
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-925a8fa6.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, _x;
|
|
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");
|
|
@@ -1019,8 +1146,23 @@ function getStatus(data) {
|
|
|
1019
1146
|
return "VERIFICATION:REVIEW";
|
|
1020
1147
|
if ((_p = account.holdReasons) === null || _p === void 0 ? void 0 : _p.includes("IDV_CHECK_FAILED_INTERNAL"))
|
|
1021
1148
|
return "VERIFICATION:FAILED";
|
|
1149
|
+
// only show banner for NEW_PAYEE_REVIEW if a PFT was created
|
|
1022
1150
|
if (((_q = account.holdReasons) === null || _q === void 0 ? void 0 : _q.includes("NEW_PAYEE_REVIEW")) && hasTransferredReward)
|
|
1023
|
-
return "
|
|
1151
|
+
return "NEW_PAYEE_REVIEW";
|
|
1152
|
+
if ((_r = account.holdReasons) === null || _r === void 0 ? void 0 : _r.includes("NEW_PAYEE_REVIEW"))
|
|
1153
|
+
return "DONE";
|
|
1154
|
+
if ((_s = account.holdReasons) === null || _s === void 0 ? void 0 : _s.includes("PAYMENT_HOLD_ON_CHANGE"))
|
|
1155
|
+
return "PAYMENT_HOLD_ON_CHANGE";
|
|
1156
|
+
if ((_t = account.holdReasons) === null || _t === void 0 ? void 0 : _t.includes("BENEFICIARY_NAME_INVALID"))
|
|
1157
|
+
return "BENEFICIARY_NAME_INVALID";
|
|
1158
|
+
if ((_u = account.holdReasons) === null || _u === void 0 ? void 0 : _u.includes("BENEFICIARY_NAME_MISMATCH"))
|
|
1159
|
+
return "BENEFICIARY_NAME_MISMATCH";
|
|
1160
|
+
if ((_v = account.holdReasons) === null || _v === void 0 ? void 0 : _v.includes("BANK_TAX_NAME_MISMATCH"))
|
|
1161
|
+
return "BANK_TAX_NAME_MISMATCH";
|
|
1162
|
+
if ((_w = account.holdReasons) === null || _w === void 0 ? void 0 : _w.includes("WITHDRAWAL_SETTINGS_INVALID"))
|
|
1163
|
+
return "WITHDRAWAL_SETTINGS_INVALID";
|
|
1164
|
+
if ((_x = account.holdReasons) === null || _x === void 0 ? void 0 : _x.includes("PAYMENT_RETURNED"))
|
|
1165
|
+
return "PAYMENT_RETURNED";
|
|
1024
1166
|
if (account.hold)
|
|
1025
1167
|
return "HOLD";
|
|
1026
1168
|
return "DONE";
|
|
@@ -1032,6 +1174,8 @@ function usePayoutStatus(props) {
|
|
|
1032
1174
|
const { data: taxSettingRes } = index_module.wn(GET_TAX_SETTING, {});
|
|
1033
1175
|
const { render, loading: veriffLoading, errors: veriffErrors, } = useVeriffApp();
|
|
1034
1176
|
const [status, setStatus] = domContextHooks_module.useState(undefined);
|
|
1177
|
+
const setContext = index_module.En(TAX_FORM_CONTEXT_NAMESPACE);
|
|
1178
|
+
const setStep = index_module.En(TAX_CONTEXT_NAMESPACE);
|
|
1035
1179
|
const enforceUsTaxComplianceOption = (_a = taxSettingRes === null || taxSettingRes === void 0 ? void 0 : taxSettingRes.tenantSettings) === null || _a === void 0 ? void 0 : _a.enforceUsTaxCompliance;
|
|
1036
1180
|
domContextHooks_module.useEffect(() => {
|
|
1037
1181
|
if (!data)
|
|
@@ -1059,6 +1203,16 @@ function usePayoutStatus(props) {
|
|
|
1059
1203
|
url += "#3";
|
|
1060
1204
|
window.history.pushState(null, "", url);
|
|
1061
1205
|
};
|
|
1206
|
+
const onPaymentInfoClick = () => {
|
|
1207
|
+
let url = props.cashPayoutsPageUrl;
|
|
1208
|
+
url += "#4";
|
|
1209
|
+
window.history.pushState(null, "", url);
|
|
1210
|
+
};
|
|
1211
|
+
const onNewFormClick = () => {
|
|
1212
|
+
let url = props.cashPayoutsPageUrl;
|
|
1213
|
+
url += "#3";
|
|
1214
|
+
window.history.pushState(null, "", url);
|
|
1215
|
+
};
|
|
1062
1216
|
return {
|
|
1063
1217
|
states: {
|
|
1064
1218
|
loading,
|
|
@@ -1072,137 +1226,12 @@ function usePayoutStatus(props) {
|
|
|
1072
1226
|
callbacks: {
|
|
1073
1227
|
onTermsClick,
|
|
1074
1228
|
onClick: render,
|
|
1229
|
+
onPaymentInfoClick,
|
|
1230
|
+
onNewFormClick,
|
|
1075
1231
|
},
|
|
1076
1232
|
};
|
|
1077
1233
|
}
|
|
1078
1234
|
|
|
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
1235
|
exports.COUNTRIES_NAMESPACE = COUNTRIES_NAMESPACE;
|
|
1207
1236
|
exports.COUNTRIES_QUERY_NAMESPACE = COUNTRIES_QUERY_NAMESPACE;
|
|
1208
1237
|
exports.CURRENCIES_NAMESPACE = CURRENCIES_NAMESPACE;
|
|
@@ -6,6 +6,15 @@ import { Component, h, Host, Prop } from "@stencil/core";
|
|
|
6
6
|
*/
|
|
7
7
|
export class HeroImage {
|
|
8
8
|
constructor() {
|
|
9
|
+
/**
|
|
10
|
+
* @uiName Logo text size
|
|
11
|
+
*/
|
|
12
|
+
this.logoTextSize = 32;
|
|
13
|
+
/**
|
|
14
|
+
* @uiWidget color
|
|
15
|
+
* @uiName Logo text color
|
|
16
|
+
*/
|
|
17
|
+
this.logoTextColor = "#555555";
|
|
9
18
|
/**
|
|
10
19
|
* Page participants are navigated to after clicking the header logo.
|
|
11
20
|
*
|
|
@@ -22,8 +31,11 @@ export class HeroImage {
|
|
|
22
31
|
disconnectedCallback() { }
|
|
23
32
|
render() {
|
|
24
33
|
return (h(Host, null,
|
|
25
|
-
h("a", { href: this.nextPage, part: "sqm-link" },
|
|
26
|
-
|
|
34
|
+
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: {
|
|
35
|
+
fontSize: `${this.logoTextSize}px`,
|
|
36
|
+
color: this.logoTextColor || "#555555",
|
|
37
|
+
textDecoration: "none",
|
|
38
|
+
} }, this.logoText)))));
|
|
27
39
|
}
|
|
28
40
|
static get is() { return "sqm-header-logo"; }
|
|
29
41
|
static get encapsulation() { return "shadow"; }
|
|
@@ -37,7 +49,7 @@ export class HeroImage {
|
|
|
37
49
|
"references": {}
|
|
38
50
|
},
|
|
39
51
|
"required": false,
|
|
40
|
-
"optional":
|
|
52
|
+
"optional": true,
|
|
41
53
|
"docs": {
|
|
42
54
|
"tags": [{
|
|
43
55
|
"text": "ImageUpload",
|
|
@@ -54,6 +66,71 @@ export class HeroImage {
|
|
|
54
66
|
"attribute": "image-url",
|
|
55
67
|
"reflect": false
|
|
56
68
|
},
|
|
69
|
+
"logoText": {
|
|
70
|
+
"type": "string",
|
|
71
|
+
"mutable": false,
|
|
72
|
+
"complexType": {
|
|
73
|
+
"original": "string",
|
|
74
|
+
"resolved": "string",
|
|
75
|
+
"references": {}
|
|
76
|
+
},
|
|
77
|
+
"required": false,
|
|
78
|
+
"optional": true,
|
|
79
|
+
"docs": {
|
|
80
|
+
"tags": [{
|
|
81
|
+
"text": "Logo text",
|
|
82
|
+
"name": "uiName"
|
|
83
|
+
}],
|
|
84
|
+
"text": ""
|
|
85
|
+
},
|
|
86
|
+
"attribute": "logo-text",
|
|
87
|
+
"reflect": false
|
|
88
|
+
},
|
|
89
|
+
"logoTextSize": {
|
|
90
|
+
"type": "number",
|
|
91
|
+
"mutable": false,
|
|
92
|
+
"complexType": {
|
|
93
|
+
"original": "number",
|
|
94
|
+
"resolved": "number",
|
|
95
|
+
"references": {}
|
|
96
|
+
},
|
|
97
|
+
"required": false,
|
|
98
|
+
"optional": true,
|
|
99
|
+
"docs": {
|
|
100
|
+
"tags": [{
|
|
101
|
+
"text": "Logo text size",
|
|
102
|
+
"name": "uiName"
|
|
103
|
+
}],
|
|
104
|
+
"text": ""
|
|
105
|
+
},
|
|
106
|
+
"attribute": "logo-text-size",
|
|
107
|
+
"reflect": false,
|
|
108
|
+
"defaultValue": "32"
|
|
109
|
+
},
|
|
110
|
+
"logoTextColor": {
|
|
111
|
+
"type": "string",
|
|
112
|
+
"mutable": false,
|
|
113
|
+
"complexType": {
|
|
114
|
+
"original": "string",
|
|
115
|
+
"resolved": "string",
|
|
116
|
+
"references": {}
|
|
117
|
+
},
|
|
118
|
+
"required": false,
|
|
119
|
+
"optional": true,
|
|
120
|
+
"docs": {
|
|
121
|
+
"tags": [{
|
|
122
|
+
"text": "color",
|
|
123
|
+
"name": "uiWidget"
|
|
124
|
+
}, {
|
|
125
|
+
"text": "Logo text color",
|
|
126
|
+
"name": "uiName"
|
|
127
|
+
}],
|
|
128
|
+
"text": ""
|
|
129
|
+
},
|
|
130
|
+
"attribute": "logo-text-color",
|
|
131
|
+
"reflect": false,
|
|
132
|
+
"defaultValue": "\"#555555\""
|
|
133
|
+
},
|
|
57
134
|
"nextPage": {
|
|
58
135
|
"type": "string",
|
|
59
136
|
"mutable": false,
|
|
@@ -3,14 +3,14 @@ import { createStyleSheet } from "../../styling/JSS";
|
|
|
3
3
|
import { intl } from "../../global/global";
|
|
4
4
|
import { PoweredByImg } from "./PoweredByImg";
|
|
5
5
|
const vanillaStyle = `
|
|
6
|
-
:host{
|
|
6
|
+
:host {
|
|
7
7
|
margin: 0 auto;
|
|
8
8
|
width: 100%;
|
|
9
9
|
}
|
|
10
|
-
a{
|
|
10
|
+
a {
|
|
11
11
|
cursor:pointer;
|
|
12
12
|
color: var(--sqm-text-subdued);
|
|
13
|
-
text-decoration: none
|
|
13
|
+
text-decoration: none;
|
|
14
14
|
}
|
|
15
15
|
`;
|
|
16
16
|
export function PortalFooterView(props) {
|
package/dist/collection/components/sqm-reward-exchange-list/sqm-reward-exchange-list-view.js
CHANGED
|
@@ -34,7 +34,7 @@ const style = {
|
|
|
34
34
|
},
|
|
35
35
|
"& sl-menu-item::part(base)": {
|
|
36
36
|
flexDirection: "column",
|
|
37
|
-
color: "var(--sqm-input-color)"
|
|
37
|
+
color: "var(--sqm-input-color)"
|
|
38
38
|
},
|
|
39
39
|
"& sl-menu-item::part(base):hover": {
|
|
40
40
|
backgroundColor: "var(--sqm-input-border-color-hover)",
|
|
@@ -205,14 +205,14 @@ const style = {
|
|
|
205
205
|
marginBottom: "var(--sl-spacing-xxx-large)",
|
|
206
206
|
},
|
|
207
207
|
"& sl-menu-item[disabled]::part(label)": {
|
|
208
|
-
color: "var(
|
|
208
|
+
color: "var(sqm-text-subdued)",
|
|
209
209
|
},
|
|
210
210
|
"& sl-menu-item[disabled]": {
|
|
211
211
|
"& .step-cost": {
|
|
212
|
-
color: "var(
|
|
212
|
+
color: "var(sqm-text-subdued)",
|
|
213
213
|
},
|
|
214
214
|
"& .step-value": {
|
|
215
|
-
color: "var(
|
|
215
|
+
color: "var(sqm-text-subdued)",
|
|
216
216
|
},
|
|
217
217
|
},
|
|
218
218
|
},
|
|
@@ -127,7 +127,8 @@ export function useBankingInfoForm(props) {
|
|
|
127
127
|
: _paymentMethodChecked;
|
|
128
128
|
useEffect(() => {
|
|
129
129
|
// reset redirect hash
|
|
130
|
-
window.location.hash
|
|
130
|
+
if (window.location.hash !== "#4")
|
|
131
|
+
window.location.hash = "";
|
|
131
132
|
}, []);
|
|
132
133
|
useEffect(() => {
|
|
133
134
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
@@ -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
|