@saasquatch/mint-components 2.1.9-19 → 2.1.9-20
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/{ShadowViewAddon-d679ec76.js → ShadowViewAddon-2b3f51be.js} +1 -1
- package/dist/cjs/{data-34bc7549.js → data-6b5095f8.js} +1 -0
- package/dist/cjs/sqm-banking-info-form_10.cjs.entry.js +3 -3
- package/dist/cjs/sqm-big-stat_46.cjs.entry.js +7 -13
- package/dist/cjs/sqm-code-verification.cjs.entry.js +1 -1
- package/dist/cjs/sqm-email-verification_2.cjs.entry.js +40 -25
- package/dist/cjs/{sqm-partner-info-modal-view-ac5e3e60.js → sqm-partner-info-modal-view-d5c997e6.js} +0 -1
- package/dist/cjs/{sqm-portal-email-verification-view-2b4b92da.js → sqm-portal-email-verification-view-60f8e0a7.js} +1 -1
- package/dist/cjs/sqm-portal-email-verification.cjs.entry.js +2 -2
- package/dist/cjs/sqm-portal-forgot-password_6.cjs.entry.js +3 -3
- package/dist/cjs/{sqm-portal-profile-view-bfdbb98d.js → sqm-portal-profile-view-2bfd7afd.js} +1 -1
- package/dist/cjs/sqm-portal-profile.cjs.entry.js +2 -2
- package/dist/cjs/{sqm-portal-registration-form-view-020f661c.js → sqm-portal-registration-form-view-fd48f1d3.js} +1 -1
- package/dist/cjs/{sqm-portal-reset-password-view-6b1acd90.js → sqm-portal-reset-password-view-d90d77f9.js} +1 -1
- package/dist/cjs/sqm-portal-reset-password.cjs.entry.js +2 -2
- package/dist/cjs/{sqm-portal-verify-email-view-90cd89e3.js → sqm-portal-verify-email-view-b31638f8.js} +1 -1
- package/dist/cjs/sqm-referral-table_11.cjs.entry.js +1 -1
- package/dist/cjs/sqm-rewards-table-customer-note-cell.cjs.entry.js +1 -1
- package/dist/cjs/sqm-stencilbook.cjs.entry.js +11 -15
- package/dist/cjs/{sqm-text-span-view-f274fdf2.js → sqm-text-span-view-8a32dd8c.js} +1 -1
- package/dist/cjs/sqm-text-span.cjs.entry.js +1 -1
- package/dist/cjs/{sqm-user-info-form-view-d89bdc04.js → sqm-user-info-form-view-db47a968.js} +1 -1
- package/dist/collection/components/sqm-partner-info-modal/PartnerInfoModal.stories.js +0 -3
- package/dist/collection/components/sqm-partner-info-modal/sqm-partner-info-modal-view.js +0 -1
- package/dist/collection/components/sqm-partner-info-modal/usePartnerInfoModal.js +37 -22
- package/dist/collection/components/sqm-text-span/sqm-text-span-view.js +1 -1
- package/dist/collection/components/tax-and-cash/data.js +1 -0
- package/dist/collection/components/tax-and-cash/sqm-tax-and-cash/useTaxAndCash.js +3 -9
- package/dist/collection/components/tax-and-cash/sqm-user-info-form/useUserInfoForm.js +1 -1
- package/dist/esm/{ShadowViewAddon-657d18f0.js → ShadowViewAddon-78b791d2.js} +1 -1
- package/dist/esm/{data-2380309a.js → data-33c16dff.js} +1 -0
- package/dist/esm/sqm-banking-info-form_10.entry.js +3 -3
- package/dist/esm/sqm-big-stat_46.entry.js +7 -13
- package/dist/esm/sqm-code-verification.entry.js +1 -1
- package/dist/esm/sqm-email-verification_2.entry.js +40 -25
- package/dist/esm/{sqm-partner-info-modal-view-68479829.js → sqm-partner-info-modal-view-08b7c5f6.js} +0 -1
- package/dist/esm/{sqm-portal-email-verification-view-80736644.js → sqm-portal-email-verification-view-33f5c108.js} +1 -1
- package/dist/esm/sqm-portal-email-verification.entry.js +2 -2
- package/dist/esm/sqm-portal-forgot-password_6.entry.js +3 -3
- package/dist/esm/{sqm-portal-profile-view-a6be8558.js → sqm-portal-profile-view-88fd6a93.js} +1 -1
- package/dist/esm/sqm-portal-profile.entry.js +2 -2
- package/dist/esm/{sqm-portal-registration-form-view-2f4936ef.js → sqm-portal-registration-form-view-9bf30b56.js} +1 -1
- package/dist/esm/{sqm-portal-reset-password-view-cfbc0eb0.js → sqm-portal-reset-password-view-f8d1689c.js} +1 -1
- package/dist/esm/sqm-portal-reset-password.entry.js +2 -2
- package/dist/esm/{sqm-portal-verify-email-view-92297506.js → sqm-portal-verify-email-view-0b70c1b1.js} +1 -1
- package/dist/esm/sqm-referral-table_11.entry.js +1 -1
- package/dist/esm/sqm-rewards-table-customer-note-cell.entry.js +1 -1
- package/dist/esm/sqm-stencilbook.entry.js +11 -15
- package/dist/esm/{sqm-text-span-view-738acfb3.js → sqm-text-span-view-4db9e33f.js} +1 -1
- package/dist/esm/sqm-text-span.entry.js +1 -1
- package/dist/esm/{sqm-user-info-form-view-ff8e47ad.js → sqm-user-info-form-view-712cd51b.js} +1 -1
- package/dist/esm-es5/{ShadowViewAddon-657d18f0.js → ShadowViewAddon-78b791d2.js} +1 -1
- package/dist/esm-es5/data-33c16dff.js +1 -0
- package/dist/esm-es5/sqm-banking-info-form_10.entry.js +1 -1
- package/dist/esm-es5/sqm-big-stat_46.entry.js +1 -1
- package/dist/esm-es5/sqm-code-verification.entry.js +1 -1
- package/dist/esm-es5/sqm-email-verification_2.entry.js +1 -1
- package/dist/esm-es5/{sqm-partner-info-modal-view-68479829.js → sqm-partner-info-modal-view-08b7c5f6.js} +1 -1
- package/dist/esm-es5/{sqm-portal-email-verification-view-80736644.js → sqm-portal-email-verification-view-33f5c108.js} +1 -1
- package/dist/esm-es5/sqm-portal-email-verification.entry.js +1 -1
- package/dist/esm-es5/sqm-portal-forgot-password_6.entry.js +1 -1
- package/dist/esm-es5/{sqm-portal-profile-view-a6be8558.js → sqm-portal-profile-view-88fd6a93.js} +1 -1
- package/dist/esm-es5/sqm-portal-profile.entry.js +1 -1
- package/dist/esm-es5/{sqm-portal-registration-form-view-2f4936ef.js → sqm-portal-registration-form-view-9bf30b56.js} +1 -1
- package/dist/esm-es5/{sqm-portal-reset-password-view-cfbc0eb0.js → sqm-portal-reset-password-view-f8d1689c.js} +1 -1
- package/dist/esm-es5/sqm-portal-reset-password.entry.js +1 -1
- package/dist/esm-es5/{sqm-portal-verify-email-view-92297506.js → sqm-portal-verify-email-view-0b70c1b1.js} +1 -1
- package/dist/esm-es5/sqm-referral-table_11.entry.js +1 -1
- package/dist/esm-es5/sqm-rewards-table-customer-note-cell.entry.js +1 -1
- package/dist/esm-es5/sqm-stencilbook.entry.js +1 -1
- package/dist/esm-es5/{sqm-text-span-view-738acfb3.js → sqm-text-span-view-4db9e33f.js} +1 -1
- package/dist/esm-es5/sqm-text-span.entry.js +1 -1
- package/dist/esm-es5/{sqm-user-info-form-view-ff8e47ad.js → sqm-user-info-form-view-712cd51b.js} +1 -1
- package/dist/mint-components/mint-components.esm.js +1 -1
- package/dist/mint-components/{p-31dde9fc.system.js → p-00463c83.system.js} +1 -1
- package/dist/mint-components/{p-dac1f2cb.system.entry.js → p-037c1a4f.system.entry.js} +1 -1
- package/dist/mint-components/{p-896390f9.js → p-0553e659.js} +1 -1
- package/dist/mint-components/{p-a9ff6601.system.entry.js → p-0a126d1b.system.entry.js} +1 -1
- package/dist/mint-components/{p-860541f2.entry.js → p-0dc17c6a.entry.js} +2 -2
- package/dist/mint-components/{p-d798004f.system.js → p-0fec43e8.system.js} +1 -1
- package/dist/mint-components/{p-8139fdec.entry.js → p-19293c16.entry.js} +1 -1
- package/dist/mint-components/{p-ff91e6fd.system.entry.js → p-1b7dfd6f.system.entry.js} +1 -1
- package/dist/mint-components/p-1c413a06.system.js +1 -1
- package/dist/mint-components/{p-ba953c21.entry.js → p-1d49dddc.entry.js} +1 -1
- package/dist/mint-components/{p-15a703c7.system.entry.js → p-247cfbdc.system.entry.js} +1 -1
- package/dist/mint-components/{p-098d134a.system.entry.js → p-28fe7357.system.entry.js} +1 -1
- package/dist/mint-components/{p-e5ee6cf5.entry.js → p-2d3a12f2.entry.js} +1 -1
- package/dist/mint-components/{p-fb5c9802.entry.js → p-3218bb1d.entry.js} +1 -1
- package/dist/mint-components/{p-f18a6658.js → p-370e0d75.js} +1 -1
- package/dist/mint-components/{p-7b909aa5.system.js → p-379cb9f1.system.js} +1 -1
- package/dist/mint-components/{p-bba694e4.entry.js → p-38dc2f60.entry.js} +1 -1
- package/dist/mint-components/{p-56ca7e3c.js → p-45e2a83a.js} +1 -1
- package/dist/mint-components/{p-79e4ec63.system.entry.js → p-45e72bed.system.entry.js} +1 -1
- package/dist/mint-components/{p-a7ee6531.js → p-4723526d.js} +1 -1
- package/dist/mint-components/{p-cabf6326.js → p-50d959bd.js} +1 -1
- package/dist/mint-components/{p-93c5c8ec.entry.js → p-55627a5c.entry.js} +1 -1
- package/dist/mint-components/{p-b5f57914.js → p-567a5ded.js} +1 -1
- package/dist/mint-components/p-5e26014d.system.js +1 -0
- package/dist/mint-components/{p-de793f38.entry.js → p-64041ee1.entry.js} +2 -2
- package/dist/mint-components/{p-71545bfd.system.entry.js → p-691d34f1.system.entry.js} +1 -1
- package/dist/mint-components/{p-be63f29b.system.js → p-6b1a6b0c.system.js} +1 -1
- package/dist/mint-components/{p-b9f57e84.system.entry.js → p-71561bb2.system.entry.js} +1 -1
- package/dist/mint-components/{p-d65991d0.entry.js → p-731c4d33.entry.js} +1 -1
- package/dist/mint-components/{p-b297016f.system.entry.js → p-7a08d288.system.entry.js} +1 -1
- package/dist/mint-components/{p-1bb8ab0e.system.entry.js → p-7d5956ec.system.entry.js} +1 -1
- package/dist/mint-components/{p-37541f60.js → p-842f45b9.js} +1 -1
- package/dist/mint-components/{p-74aac245.system.js → p-8b258a3e.system.js} +1 -1
- package/dist/mint-components/{p-8ebd2081.system.js → p-8e1acd9a.system.js} +1 -1
- package/dist/mint-components/{p-0152122e.js → p-8ecc8875.js} +1 -0
- package/dist/mint-components/{p-4015a90b.entry.js → p-91a00693.entry.js} +34 -18
- package/dist/mint-components/p-9d6984e7.entry.js +33 -0
- package/dist/mint-components/{p-669d52c4.js → p-a7f72a66.js} +1 -1
- package/dist/mint-components/{p-f686a911.js → p-b077d478.js} +1 -1
- package/dist/mint-components/{p-66c0100c.system.entry.js → p-d01949f7.system.entry.js} +1 -1
- package/dist/mint-components/{p-22a4b4a6.system.js → p-da6c5d98.system.js} +1 -1
- package/dist/mint-components/{p-3c46b4dd.system.js → p-df88dcaa.system.js} +1 -1
- package/dist/mint-components/{p-18133026.system.entry.js → p-e1292288.system.entry.js} +1 -1
- package/dist/mint-components/{p-dac20392.system.js → p-f368f04a.system.js} +1 -1
- package/dist/mint-components/{p-0305331c.entry.js → p-fc783749.entry.js} +2 -2
- package/dist/types/components/sqm-partner-info-modal/PartnerInfoModal.stories.d.ts +0 -1
- package/dist/types/components/tax-and-cash/data.d.ts +1 -0
- package/dist/types/components/tax-and-cash/sqm-indirect-tax-form/useIndirectTaxForm.d.ts +3 -0
- package/docs/docs.docx +0 -0
- package/package.json +1 -1
- package/dist/esm-es5/data-2380309a.js +0 -1
- package/dist/mint-components/p-0e05ab3b.system.js +0 -1
- package/dist/mint-components/p-bfbfde38.entry.js +0 -33
|
@@ -10,7 +10,7 @@ const JSS = require('./JSS-8503a151.js');
|
|
|
10
10
|
const useReferralCodes = require('./useReferralCodes-89c2b972.js');
|
|
11
11
|
const mixins = require('./mixins-4761d472.js');
|
|
12
12
|
const copyTextView = require('./copy-text-view-bb2c0ea7.js');
|
|
13
|
-
const sqmTextSpanView = require('./sqm-text-span-view-
|
|
13
|
+
const sqmTextSpanView = require('./sqm-text-span-view-8a32dd8c.js');
|
|
14
14
|
const useChildElements = require('./useChildElements-89bc50a9.js');
|
|
15
15
|
const luxon = require('./luxon-c1ad356a.js');
|
|
16
16
|
const index$1 = require('./index-8c6255f5.js');
|
|
@@ -16,9 +16,9 @@ const reRender = require('./re-render-69bde9ee.js');
|
|
|
16
16
|
const useChildElements = require('./useChildElements-89bc50a9.js');
|
|
17
17
|
const luxon = require('./luxon-c1ad356a.js');
|
|
18
18
|
const useReferralTable = require('./useReferralTable-d3ddfd05.js');
|
|
19
|
-
const sqmUserInfoFormView = require('./sqm-user-info-form-view-
|
|
19
|
+
const sqmUserInfoFormView = require('./sqm-user-info-form-view-db47a968.js');
|
|
20
20
|
const utils$1 = require('./utils-a8e0bd9b.js');
|
|
21
|
-
const data = require('./data-
|
|
21
|
+
const data = require('./data-6b5095f8.js');
|
|
22
22
|
const keys = require('./keys-cff24974.js');
|
|
23
23
|
const eventKeys = require('./eventKeys-7af4df4d.js');
|
|
24
24
|
const usePayoutStatus = require('./usePayoutStatus-cf050a03.js');
|
|
@@ -5538,7 +5538,7 @@ function useUserInfoForm(props) {
|
|
|
5538
5538
|
const userData = data$1 === null || data$1 === void 0 ? void 0 : data$1.user;
|
|
5539
5539
|
let result = null;
|
|
5540
5540
|
let connectionResult;
|
|
5541
|
-
if ((_a = userData === null || userData === void 0 ? void 0 : userData.impactConnection) === null || _a === void 0 ? void 0 : _a.
|
|
5541
|
+
if (((_a = userData === null || userData === void 0 ? void 0 : userData.impactConnection) === null || _a === void 0 ? void 0 : _a.connectionStatus) === "STARTED") {
|
|
5542
5542
|
console.log(vars, "values for completeImpactPartner");
|
|
5543
5543
|
result = await completeImpactPartner({
|
|
5544
5544
|
vars,
|
|
@@ -13,10 +13,10 @@ const JSS = require('./JSS-8503a151.js');
|
|
|
13
13
|
require('./useReferralCodes-89c2b972.js');
|
|
14
14
|
require('./mixins-4761d472.js');
|
|
15
15
|
const copyTextView = require('./copy-text-view-bb2c0ea7.js');
|
|
16
|
-
require('./sqm-text-span-view-
|
|
16
|
+
require('./sqm-text-span-view-8a32dd8c.js');
|
|
17
17
|
const usePortalRegistrationForm = require('./usePortalRegistrationForm-31822dc4.js');
|
|
18
18
|
const useRegistrationFormState = require('./useRegistrationFormState-a223f597.js');
|
|
19
|
-
const sqmPortalRegistrationFormView = require('./sqm-portal-registration-form-view-
|
|
19
|
+
const sqmPortalRegistrationFormView = require('./sqm-portal-registration-form-view-fd48f1d3.js');
|
|
20
20
|
const reRender = require('./re-render-69bde9ee.js');
|
|
21
21
|
const useChildElements = require('./useChildElements-89bc50a9.js');
|
|
22
22
|
require('./luxon-c1ad356a.js');
|
|
@@ -27,10 +27,10 @@ const useInstantAccessRegistration = require('./useInstantAccessRegistration-651
|
|
|
27
27
|
const useLeadFormState = require('./useLeadFormState-76d3b511.js');
|
|
28
28
|
const utilities = require('./utilities-096934ea.js');
|
|
29
29
|
const ErrorView = require('./ErrorView-ee7b0f36.js');
|
|
30
|
-
const ShadowViewAddon = require('./ShadowViewAddon-
|
|
30
|
+
const ShadowViewAddon = require('./ShadowViewAddon-2b3f51be.js');
|
|
31
31
|
require('./sqm-portal-container-view-70a47420.js');
|
|
32
32
|
const utils$1 = require('./utils-a8e0bd9b.js');
|
|
33
|
-
const data = require('./data-
|
|
33
|
+
const data = require('./data-6b5095f8.js');
|
|
34
34
|
const keys = require('./keys-cff24974.js');
|
|
35
35
|
require('./eventKeys-7af4df4d.js');
|
|
36
36
|
const usePayoutStatus = require('./usePayoutStatus-cf050a03.js');
|
|
@@ -6418,15 +6418,9 @@ function getCurrentStep(user) {
|
|
|
6418
6418
|
if (!((_a = user.impactConnection) === null || _a === void 0 ? void 0 : _a.connected) || !((_b = user.impactConnection) === null || _b === void 0 ? void 0 : _b.publisher)) {
|
|
6419
6419
|
return "/1";
|
|
6420
6420
|
}
|
|
6421
|
-
const { requiredTaxDocumentType, currentTaxDocument, withdrawalSettings, brandedSignup, payoutsAccount,
|
|
6422
|
-
console.log(user.impactConnection
|
|
6423
|
-
|
|
6424
|
-
const stateRequired = ["ES", "AU", "US", "CA"].includes(countryCode);
|
|
6425
|
-
if (!billingAddress ||
|
|
6426
|
-
!billingCity ||
|
|
6427
|
-
!billingPostalCode ||
|
|
6428
|
-
(stateRequired && !billingState) ||
|
|
6429
|
-
!phoneNumber) {
|
|
6421
|
+
const { requiredTaxDocumentType, currentTaxDocument, withdrawalSettings, brandedSignup, payoutsAccount, } = user.impactConnection.publisher;
|
|
6422
|
+
console.log(user.impactConnection, "publisher data in useTaxAndCash to determine step new new");
|
|
6423
|
+
if (user.impactConnection.connectionStatus === "STARTED") {
|
|
6430
6424
|
return "/1";
|
|
6431
6425
|
}
|
|
6432
6426
|
// If they do have a required document, look at current document
|
|
@@ -10,7 +10,7 @@ const cjs = require('./cjs-1066ec21.js');
|
|
|
10
10
|
const utils = require('./utils-6847bc06.js');
|
|
11
11
|
const JSS = require('./JSS-8503a151.js');
|
|
12
12
|
const mixins = require('./mixins-4761d472.js');
|
|
13
|
-
const sqmTextSpanView = require('./sqm-text-span-view-
|
|
13
|
+
const sqmTextSpanView = require('./sqm-text-span-view-8a32dd8c.js');
|
|
14
14
|
const keys = require('./keys-cff24974.js');
|
|
15
15
|
const useVerificationEmail = require('./useVerificationEmail-994bc32f.js');
|
|
16
16
|
|
|
@@ -9,9 +9,9 @@ const index_module = require('./index.module-42d413d9.js');
|
|
|
9
9
|
const cjs = require('./cjs-1066ec21.js');
|
|
10
10
|
const utils = require('./utils-6847bc06.js');
|
|
11
11
|
const JSS = require('./JSS-8503a151.js');
|
|
12
|
-
const sqmTextSpanView = require('./sqm-text-span-view-
|
|
13
|
-
const data = require('./data-
|
|
14
|
-
const sqmPartnerInfoModalView = require('./sqm-partner-info-modal-view-
|
|
12
|
+
const sqmTextSpanView = require('./sqm-text-span-view-8a32dd8c.js');
|
|
13
|
+
const data = require('./data-6b5095f8.js');
|
|
14
|
+
const sqmPartnerInfoModalView = require('./sqm-partner-info-modal-view-d5c997e6.js');
|
|
15
15
|
const keys = require('./keys-cff24974.js');
|
|
16
16
|
const eventKeys = require('./eventKeys-7af4df4d.js');
|
|
17
17
|
const parseStates = require('./parseStates-d1effc19.js');
|
|
@@ -431,20 +431,11 @@ const GET_USER_PARTNER_INFO = index_module.dist.gql `
|
|
|
431
431
|
customFields
|
|
432
432
|
impactConnection {
|
|
433
433
|
connected
|
|
434
|
+
connectionStatus
|
|
434
435
|
publisher {
|
|
435
436
|
id
|
|
436
|
-
phoneNumber
|
|
437
|
-
phoneNumberCountryCode
|
|
438
437
|
countryCode
|
|
439
438
|
currency
|
|
440
|
-
requiredTaxDocumentType
|
|
441
|
-
currentTaxDocument {
|
|
442
|
-
type
|
|
443
|
-
status
|
|
444
|
-
}
|
|
445
|
-
withdrawalSettings {
|
|
446
|
-
paymentMethod
|
|
447
|
-
}
|
|
448
439
|
}
|
|
449
440
|
}
|
|
450
441
|
}
|
|
@@ -497,6 +488,32 @@ const CONNECT_PARTNER = index_module.dist.gql `
|
|
|
497
488
|
}
|
|
498
489
|
}
|
|
499
490
|
`;
|
|
491
|
+
const START_IMPACT_CONNECTION = index_module.dist.gql `
|
|
492
|
+
mutation startImpactConnection($vars: ImpactConnectionInput!) {
|
|
493
|
+
startImpactConnection(impactConnectionInput: $vars) {
|
|
494
|
+
success
|
|
495
|
+
validationErrors {
|
|
496
|
+
field
|
|
497
|
+
message
|
|
498
|
+
}
|
|
499
|
+
user {
|
|
500
|
+
id
|
|
501
|
+
accountId
|
|
502
|
+
impactConnection {
|
|
503
|
+
connected
|
|
504
|
+
publisher {
|
|
505
|
+
brandedSignup
|
|
506
|
+
requiredTaxDocumentType
|
|
507
|
+
currentTaxDocument {
|
|
508
|
+
type
|
|
509
|
+
status
|
|
510
|
+
}
|
|
511
|
+
}
|
|
512
|
+
}
|
|
513
|
+
}
|
|
514
|
+
}
|
|
515
|
+
}
|
|
516
|
+
`;
|
|
500
517
|
const GET_BRAND_NAME = index_module.dist.gql `
|
|
501
518
|
query getTenantSettings {
|
|
502
519
|
tenantSettings {
|
|
@@ -516,7 +533,7 @@ function usePartnerInfoModal(props) {
|
|
|
516
533
|
const { data: financeNetworkData } = index_module.wn(data.GET_FINANCE_NETWORK_SETTINGS, {
|
|
517
534
|
variables: { filter: {} },
|
|
518
535
|
});
|
|
519
|
-
const [
|
|
536
|
+
const [startImpactConnection, { loading: connectLoading, errors: connectErrors },] = index_module.$e(START_IMPACT_CONNECTION);
|
|
520
537
|
// No pre-filled country, use locale to determine countryCode instead
|
|
521
538
|
const [countryCode, setCountryCode] = domContextHooks_module.useState(((_b = (_a = user === null || user === void 0 ? void 0 : user.impactConnection) === null || _a === void 0 ? void 0 : _a.publisher) === null || _b === void 0 ? void 0 : _b.countryCode) ||
|
|
522
539
|
locale.replace(/^.*_/, ""));
|
|
@@ -538,7 +555,6 @@ function usePartnerInfoModal(props) {
|
|
|
538
555
|
}, []);
|
|
539
556
|
return (allValidCurrencies || []).sort((a, b) => a.displayName.localeCompare(b.displayName));
|
|
540
557
|
}, [financeNetworkData, currenciesData, countryCode]);
|
|
541
|
-
console.log(countryCode, currency, "initial country and currency state"); // TEMP
|
|
542
558
|
const [countrySearch, setCountrySearch] = domContextHooks_module.useState("");
|
|
543
559
|
const [currencySearch, setCurrencySearch] = domContextHooks_module.useState("");
|
|
544
560
|
const [filteredCountries, setFilteredCountries] = domContextHooks_module.useState(((_f = countriesData === null || countriesData === void 0 ? void 0 : countriesData.impactPayoutCountries) === null || _f === void 0 ? void 0 : _f.data) || []);
|
|
@@ -548,11 +564,12 @@ function usePartnerInfoModal(props) {
|
|
|
548
564
|
const [success, setSuccess] = domContextHooks_module.useState(false);
|
|
549
565
|
domContextHooks_module.useEffect(() => {
|
|
550
566
|
var _a;
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
567
|
+
const publisher = (_a = user === null || user === void 0 ? void 0 : user.impactConnection) === null || _a === void 0 ? void 0 : _a.publisher;
|
|
568
|
+
if (!userData || !publisher)
|
|
569
|
+
return;
|
|
570
|
+
setCountryCode(publisher.countryCode);
|
|
571
|
+
setCurrency(publisher.currency);
|
|
572
|
+
}, [userData, user]);
|
|
556
573
|
domContextHooks_module.useEffect(() => {
|
|
557
574
|
if (!(countries === null || countries === void 0 ? void 0 : countries.length))
|
|
558
575
|
return;
|
|
@@ -611,13 +628,13 @@ function usePartnerInfoModal(props) {
|
|
|
611
628
|
countryCode,
|
|
612
629
|
currency,
|
|
613
630
|
};
|
|
614
|
-
const result = await
|
|
631
|
+
const result = await startImpactConnection({ vars });
|
|
615
632
|
if (!result || ((_a = result) === null || _a === void 0 ? void 0 : _a.message)) {
|
|
616
633
|
setError(props.networkErrorText);
|
|
617
634
|
return;
|
|
618
635
|
}
|
|
619
636
|
const connectionResult = result
|
|
620
|
-
.
|
|
637
|
+
.startImpactConnection;
|
|
621
638
|
console.log(result, connectionResult, "result and connectionResult from creating partner from modal");
|
|
622
639
|
if (!(connectionResult === null || connectionResult === void 0 ? void 0 : connectionResult.success)) {
|
|
623
640
|
const validationMsg = (_b = connectionResult === null || connectionResult === void 0 ? void 0 : connectionResult.validationErrors) === null || _b === void 0 ? void 0 : _b.map((e) => e.message).join(". ");
|
|
@@ -637,9 +654,7 @@ function usePartnerInfoModal(props) {
|
|
|
637
654
|
}
|
|
638
655
|
const showModal = !success &&
|
|
639
656
|
!userLoading &&
|
|
640
|
-
(
|
|
641
|
-
console.log(showModal, "showModal condition in partner info modal"); // TEMP
|
|
642
|
-
console.log(filteredCurrencies, "filtered curricneis");
|
|
657
|
+
(impactConnection === null || impactConnection === void 0 ? void 0 : impactConnection.connectionStatus) === "NOT_STARTED";
|
|
643
658
|
return {
|
|
644
659
|
states: {
|
|
645
660
|
open: showModal,
|
package/dist/cjs/{sqm-partner-info-modal-view-ac5e3e60.js → sqm-partner-info-modal-view-d5c997e6.js}
RENAMED
|
@@ -91,7 +91,6 @@ function PartnerInfoModalView(props) {
|
|
|
91
91
|
const { states, text, callbacks } = props;
|
|
92
92
|
const sheet = JSS.createStyleSheet(style);
|
|
93
93
|
const styleString = sheet.toString();
|
|
94
|
-
console.log(states, "partner info modal states"); // TEMP
|
|
95
94
|
if (!states.open)
|
|
96
95
|
return index.h("div", null);
|
|
97
96
|
return (index.h("div", null,
|
|
@@ -4,7 +4,7 @@ const index = require('./index-8277cbb3.js');
|
|
|
4
4
|
const global = require('./global-0f8b1267.js');
|
|
5
5
|
const JSS = require('./JSS-8503a151.js');
|
|
6
6
|
const mixins = require('./mixins-4761d472.js');
|
|
7
|
-
const sqmTextSpanView = require('./sqm-text-span-view-
|
|
7
|
+
const sqmTextSpanView = require('./sqm-text-span-view-8a32dd8c.js');
|
|
8
8
|
|
|
9
9
|
const style = {
|
|
10
10
|
Wrapper: mixins.AuthWrapper,
|
|
@@ -9,8 +9,8 @@ const index_module = require('./index.module-42d413d9.js');
|
|
|
9
9
|
const cjs = require('./cjs-1066ec21.js');
|
|
10
10
|
require('./JSS-8503a151.js');
|
|
11
11
|
require('./mixins-4761d472.js');
|
|
12
|
-
require('./sqm-text-span-view-
|
|
13
|
-
const sqmPortalEmailVerificationView = require('./sqm-portal-email-verification-view-
|
|
12
|
+
require('./sqm-text-span-view-8a32dd8c.js');
|
|
13
|
+
const sqmPortalEmailVerificationView = require('./sqm-portal-email-verification-view-60f8e0a7.js');
|
|
14
14
|
|
|
15
15
|
function usePortalEmailVerification(props) {
|
|
16
16
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
@@ -10,11 +10,11 @@ const cjs = require('./cjs-1066ec21.js');
|
|
|
10
10
|
const utils = require('./utils-6847bc06.js');
|
|
11
11
|
const JSS = require('./JSS-8503a151.js');
|
|
12
12
|
require('./mixins-4761d472.js');
|
|
13
|
-
require('./sqm-text-span-view-
|
|
14
|
-
const sqmPortalVerifyEmailView = require('./sqm-portal-verify-email-view-
|
|
13
|
+
require('./sqm-text-span-view-8a32dd8c.js');
|
|
14
|
+
const sqmPortalVerifyEmailView = require('./sqm-portal-verify-email-view-b31638f8.js');
|
|
15
15
|
const usePortalRegistrationForm = require('./usePortalRegistrationForm-31822dc4.js');
|
|
16
16
|
const useRegistrationFormState = require('./useRegistrationFormState-a223f597.js');
|
|
17
|
-
const sqmPortalRegistrationFormView = require('./sqm-portal-registration-form-view-
|
|
17
|
+
const sqmPortalRegistrationFormView = require('./sqm-portal-registration-form-view-fd48f1d3.js');
|
|
18
18
|
|
|
19
19
|
function usePortalForgotPassword(props) {
|
|
20
20
|
var _a, _b, _c, _d, _e, _f, _g;
|
package/dist/cjs/{sqm-portal-profile-view-bfdbb98d.js → sqm-portal-profile-view-2bfd7afd.js}
RENAMED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
const index = require('./index-8277cbb3.js');
|
|
4
4
|
const global = require('./global-0f8b1267.js');
|
|
5
5
|
const JSS = require('./JSS-8503a151.js');
|
|
6
|
-
const sqmTextSpanView = require('./sqm-text-span-view-
|
|
6
|
+
const sqmTextSpanView = require('./sqm-text-span-view-8a32dd8c.js');
|
|
7
7
|
|
|
8
8
|
function PortalProfileView(props) {
|
|
9
9
|
var _a, _b, _c, _d, _e;
|
|
@@ -9,8 +9,8 @@ const index_module = require('./index.module-42d413d9.js');
|
|
|
9
9
|
const cjs = require('./cjs-1066ec21.js');
|
|
10
10
|
const utils = require('./utils-6847bc06.js');
|
|
11
11
|
require('./JSS-8503a151.js');
|
|
12
|
-
require('./sqm-text-span-view-
|
|
13
|
-
const sqmPortalProfileView = require('./sqm-portal-profile-view-
|
|
12
|
+
require('./sqm-text-span-view-8a32dd8c.js');
|
|
13
|
+
const sqmPortalProfileView = require('./sqm-portal-profile-view-2bfd7afd.js');
|
|
14
14
|
const utilities = require('./utilities-096934ea.js');
|
|
15
15
|
|
|
16
16
|
const GET_USER = index_module.dist.gql `
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
const index = require('./index-8277cbb3.js');
|
|
4
4
|
const JSS = require('./JSS-8503a151.js');
|
|
5
5
|
const mixins = require('./mixins-4761d472.js');
|
|
6
|
-
const sqmTextSpanView = require('./sqm-text-span-view-
|
|
6
|
+
const sqmTextSpanView = require('./sqm-text-span-view-8a32dd8c.js');
|
|
7
7
|
|
|
8
8
|
const style = {
|
|
9
9
|
Wrapper: mixins.AuthWrapper,
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
const index = require('./index-8277cbb3.js');
|
|
4
4
|
const JSS = require('./JSS-8503a151.js');
|
|
5
5
|
const mixins = require('./mixins-4761d472.js');
|
|
6
|
-
const sqmTextSpanView = require('./sqm-text-span-view-
|
|
6
|
+
const sqmTextSpanView = require('./sqm-text-span-view-8a32dd8c.js');
|
|
7
7
|
|
|
8
8
|
const style = {
|
|
9
9
|
Wrapper: mixins.AuthWrapper,
|
|
@@ -10,8 +10,8 @@ const cjs = require('./cjs-1066ec21.js');
|
|
|
10
10
|
const utils = require('./utils-6847bc06.js');
|
|
11
11
|
require('./JSS-8503a151.js');
|
|
12
12
|
require('./mixins-4761d472.js');
|
|
13
|
-
require('./sqm-text-span-view-
|
|
14
|
-
const sqmPortalResetPasswordView = require('./sqm-portal-reset-password-view-
|
|
13
|
+
require('./sqm-text-span-view-8a32dd8c.js');
|
|
14
|
+
const sqmPortalResetPasswordView = require('./sqm-portal-reset-password-view-d90d77f9.js');
|
|
15
15
|
|
|
16
16
|
function usePortalResetPassword(props) {
|
|
17
17
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
@@ -4,7 +4,7 @@ const index = require('./index-8277cbb3.js');
|
|
|
4
4
|
const index_module = require('./index.module-42d413d9.js');
|
|
5
5
|
const JSS = require('./JSS-8503a151.js');
|
|
6
6
|
const mixins = require('./mixins-4761d472.js');
|
|
7
|
-
const sqmTextSpanView = require('./sqm-text-span-view-
|
|
7
|
+
const sqmTextSpanView = require('./sqm-text-span-view-8a32dd8c.js');
|
|
8
8
|
|
|
9
9
|
const vanillaStyle = `
|
|
10
10
|
:host {
|
|
@@ -10,7 +10,7 @@ const cjs = require('./cjs-1066ec21.js');
|
|
|
10
10
|
const utils = require('./utils-6847bc06.js');
|
|
11
11
|
const JSS = require('./JSS-8503a151.js');
|
|
12
12
|
require('./mixins-4761d472.js');
|
|
13
|
-
const sqmTextSpanView = require('./sqm-text-span-view-
|
|
13
|
+
const sqmTextSpanView = require('./sqm-text-span-view-8a32dd8c.js');
|
|
14
14
|
const GenericTableView = require('./GenericTableView-be5648e4.js');
|
|
15
15
|
const reRender = require('./re-render-69bde9ee.js');
|
|
16
16
|
const useChildElements = require('./useChildElements-89bc50a9.js');
|
|
@@ -5,7 +5,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
5
5
|
const index = require('./index-8277cbb3.js');
|
|
6
6
|
const domContextHooks_module = require('./dom-context-hooks.module-e7b6727c.js');
|
|
7
7
|
require('./JSS-8503a151.js');
|
|
8
|
-
const sqmTextSpanView = require('./sqm-text-span-view-
|
|
8
|
+
const sqmTextSpanView = require('./sqm-text-span-view-8a32dd8c.js');
|
|
9
9
|
|
|
10
10
|
const RewardTableCustomerNoteCell = class {
|
|
11
11
|
constructor(hostRef) {
|
|
@@ -12,9 +12,9 @@ const JSS = require('./JSS-8503a151.js');
|
|
|
12
12
|
require('./useReferralCodes-89c2b972.js');
|
|
13
13
|
require('./mixins-4761d472.js');
|
|
14
14
|
const copyTextView = require('./copy-text-view-bb2c0ea7.js');
|
|
15
|
-
require('./sqm-text-span-view-
|
|
16
|
-
const sqmPortalVerifyEmailView = require('./sqm-portal-verify-email-view-
|
|
17
|
-
const sqmPortalRegistrationFormView = require('./sqm-portal-registration-form-view-
|
|
15
|
+
require('./sqm-text-span-view-8a32dd8c.js');
|
|
16
|
+
const sqmPortalVerifyEmailView = require('./sqm-portal-verify-email-view-b31638f8.js');
|
|
17
|
+
const sqmPortalRegistrationFormView = require('./sqm-portal-registration-form-view-fd48f1d3.js');
|
|
18
18
|
const GenericTableView = require('./GenericTableView-be5648e4.js');
|
|
19
19
|
require('./useChildElements-89bc50a9.js');
|
|
20
20
|
const luxon = require('./luxon-c1ad356a.js');
|
|
@@ -27,19 +27,19 @@ const sqmLeaderboardRankView = require('./sqm-leaderboard-rank-view-67fd7934.js'
|
|
|
27
27
|
const sqmLogoutCurrentUserView = require('./sqm-logout-current-user-view-f330d641.js');
|
|
28
28
|
const sqmNavigationSidebarView = require('./sqm-navigation-sidebar-view-6616e3e0.js');
|
|
29
29
|
const sqmNavigationSidebarItemView = require('./sqm-navigation-sidebar-item-view-20693e59.js');
|
|
30
|
-
const sqmPortalEmailVerificationView = require('./sqm-portal-email-verification-view-
|
|
31
|
-
const sqmPortalProfileView = require('./sqm-portal-profile-view-
|
|
30
|
+
const sqmPortalEmailVerificationView = require('./sqm-portal-email-verification-view-60f8e0a7.js');
|
|
31
|
+
const sqmPortalProfileView = require('./sqm-portal-profile-view-2bfd7afd.js');
|
|
32
32
|
require('./utilities-096934ea.js');
|
|
33
|
-
const sqmPortalResetPasswordView = require('./sqm-portal-reset-password-view-
|
|
33
|
+
const sqmPortalResetPasswordView = require('./sqm-portal-reset-password-view-d90d77f9.js');
|
|
34
34
|
require('./ErrorView-ee7b0f36.js');
|
|
35
35
|
const sqmQrCodeView = require('./sqm-qr-code-view-1f2daa76.js');
|
|
36
|
-
const ShadowViewAddon = require('./ShadowViewAddon-
|
|
36
|
+
const ShadowViewAddon = require('./ShadowViewAddon-2b3f51be.js');
|
|
37
37
|
const sqmPortalContainerView = require('./sqm-portal-container-view-70a47420.js');
|
|
38
|
-
const sqmUserInfoFormView = require('./sqm-user-info-form-view-
|
|
38
|
+
const sqmUserInfoFormView = require('./sqm-user-info-form-view-db47a968.js');
|
|
39
39
|
const utils = require('./utils-a8e0bd9b.js');
|
|
40
40
|
const sqmLeadInputFieldView = require('./sqm-lead-input-field-view-818d9e9a.js');
|
|
41
|
-
require('./data-
|
|
42
|
-
const sqmPartnerInfoModalView = require('./sqm-partner-info-modal-view-
|
|
41
|
+
require('./data-6b5095f8.js');
|
|
42
|
+
const sqmPartnerInfoModalView = require('./sqm-partner-info-modal-view-d5c997e6.js');
|
|
43
43
|
|
|
44
44
|
/**
|
|
45
45
|
* lodash (Custom Build) <https://lodash.com/>
|
|
@@ -18842,9 +18842,6 @@ const Closed = () => {
|
|
|
18842
18842
|
};
|
|
18843
18843
|
return index.h(sqmPartnerInfoModalView.PartnerInfoModalView, Object.assign({}, props));
|
|
18844
18844
|
};
|
|
18845
|
-
const FullStackDemo = () => {
|
|
18846
|
-
return (index.h("sqm-partner-info-modal", { "brand-name": "Acme", "header-new-partner": "Welcome to {brandName} Program!", "description-new-partner": "We just need a bit more information about you before you start earning cash!", "submit-button-label": "Submit" }));
|
|
18847
|
-
};
|
|
18848
18845
|
|
|
18849
18846
|
const PartnerInfoModal = /*#__PURE__*/Object.freeze({
|
|
18850
18847
|
__proto__: null,
|
|
@@ -18856,8 +18853,7 @@ const PartnerInfoModal = /*#__PURE__*/Object.freeze({
|
|
|
18856
18853
|
Submitting: Submitting,
|
|
18857
18854
|
WithError: WithError$3,
|
|
18858
18855
|
ValidationError: ValidationError$1,
|
|
18859
|
-
Closed: Closed
|
|
18860
|
-
FullStackDemo: FullStackDemo
|
|
18856
|
+
Closed: Closed
|
|
18861
18857
|
});
|
|
18862
18858
|
|
|
18863
18859
|
const WidgetVerification_stories = {
|
|
@@ -53,7 +53,7 @@ function TextSpanView(props, children) {
|
|
|
53
53
|
display: inline;
|
|
54
54
|
}
|
|
55
55
|
`;
|
|
56
|
-
return (index.h("span", { class: sheet.classes[type], part: "sqm-base" },
|
|
56
|
+
return (index.h("span", { class: sheet.classes[type], part: "sqm-text-span-base" },
|
|
57
57
|
index.h("style", { type: "text/css" },
|
|
58
58
|
vanillaStyle,
|
|
59
59
|
styleString),
|
|
@@ -5,7 +5,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
5
5
|
const index = require('./index-8277cbb3.js');
|
|
6
6
|
const domContextHooks_module = require('./dom-context-hooks.module-e7b6727c.js');
|
|
7
7
|
require('./JSS-8503a151.js');
|
|
8
|
-
const sqmTextSpanView = require('./sqm-text-span-view-
|
|
8
|
+
const sqmTextSpanView = require('./sqm-text-span-view-8a32dd8c.js');
|
|
9
9
|
|
|
10
10
|
const TextSpan = class {
|
|
11
11
|
constructor(hostRef) {
|
package/dist/cjs/{sqm-user-info-form-view-d89bdc04.js → sqm-user-info-form-view-db47a968.js}
RENAMED
|
@@ -4,7 +4,7 @@ const index = require('./index-8277cbb3.js');
|
|
|
4
4
|
const global = require('./global-0f8b1267.js');
|
|
5
5
|
const JSS = require('./JSS-8503a151.js');
|
|
6
6
|
const utils = require('./utils-a8e0bd9b.js');
|
|
7
|
-
const data = require('./data-
|
|
7
|
+
const data = require('./data-6b5095f8.js');
|
|
8
8
|
|
|
9
9
|
const style = {
|
|
10
10
|
Description: {
|
|
@@ -140,6 +140,3 @@ export const Closed = () => {
|
|
|
140
140
|
};
|
|
141
141
|
return h(PartnerInfoModalView, Object.assign({}, props));
|
|
142
142
|
};
|
|
143
|
-
export const FullStackDemo = () => {
|
|
144
|
-
return (h("sqm-partner-info-modal", { "brand-name": "Acme", "header-new-partner": "Welcome to {brandName} Program!", "description-new-partner": "We just need a bit more information about you before you start earning cash!", "submit-button-label": "Submit" }));
|
|
145
|
-
};
|
|
@@ -88,7 +88,6 @@ export function PartnerInfoModalView(props) {
|
|
|
88
88
|
const { states, text, callbacks } = props;
|
|
89
89
|
const sheet = createStyleSheet(style);
|
|
90
90
|
const styleString = sheet.toString();
|
|
91
|
-
console.log(states, "partner info modal states"); // TEMP
|
|
92
91
|
if (!states.open)
|
|
93
92
|
return h("div", null);
|
|
94
93
|
return (h("div", null,
|
|
@@ -18,20 +18,11 @@ export const GET_USER_PARTNER_INFO = gql `
|
|
|
18
18
|
customFields
|
|
19
19
|
impactConnection {
|
|
20
20
|
connected
|
|
21
|
+
connectionStatus
|
|
21
22
|
publisher {
|
|
22
23
|
id
|
|
23
|
-
phoneNumber
|
|
24
|
-
phoneNumberCountryCode
|
|
25
24
|
countryCode
|
|
26
25
|
currency
|
|
27
|
-
requiredTaxDocumentType
|
|
28
|
-
currentTaxDocument {
|
|
29
|
-
type
|
|
30
|
-
status
|
|
31
|
-
}
|
|
32
|
-
withdrawalSettings {
|
|
33
|
-
paymentMethod
|
|
34
|
-
}
|
|
35
26
|
}
|
|
36
27
|
}
|
|
37
28
|
}
|
|
@@ -84,6 +75,32 @@ export const CONNECT_PARTNER = gql `
|
|
|
84
75
|
}
|
|
85
76
|
}
|
|
86
77
|
`;
|
|
78
|
+
const START_IMPACT_CONNECTION = gql `
|
|
79
|
+
mutation startImpactConnection($vars: ImpactConnectionInput!) {
|
|
80
|
+
startImpactConnection(impactConnectionInput: $vars) {
|
|
81
|
+
success
|
|
82
|
+
validationErrors {
|
|
83
|
+
field
|
|
84
|
+
message
|
|
85
|
+
}
|
|
86
|
+
user {
|
|
87
|
+
id
|
|
88
|
+
accountId
|
|
89
|
+
impactConnection {
|
|
90
|
+
connected
|
|
91
|
+
publisher {
|
|
92
|
+
brandedSignup
|
|
93
|
+
requiredTaxDocumentType
|
|
94
|
+
currentTaxDocument {
|
|
95
|
+
type
|
|
96
|
+
status
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
`;
|
|
87
104
|
const GET_BRAND_NAME = gql `
|
|
88
105
|
query getTenantSettings {
|
|
89
106
|
tenantSettings {
|
|
@@ -103,7 +120,7 @@ export function usePartnerInfoModal(props) {
|
|
|
103
120
|
const { data: financeNetworkData } = useQuery(GET_FINANCE_NETWORK_SETTINGS, {
|
|
104
121
|
variables: { filter: {} },
|
|
105
122
|
});
|
|
106
|
-
const [
|
|
123
|
+
const [startImpactConnection, { loading: connectLoading, errors: connectErrors },] = useMutation(START_IMPACT_CONNECTION);
|
|
107
124
|
// No pre-filled country, use locale to determine countryCode instead
|
|
108
125
|
const [countryCode, setCountryCode] = useState(((_b = (_a = user === null || user === void 0 ? void 0 : user.impactConnection) === null || _a === void 0 ? void 0 : _a.publisher) === null || _b === void 0 ? void 0 : _b.countryCode) ||
|
|
109
126
|
locale.replace(/^.*_/, ""));
|
|
@@ -125,7 +142,6 @@ export function usePartnerInfoModal(props) {
|
|
|
125
142
|
}, []);
|
|
126
143
|
return (allValidCurrencies || []).sort((a, b) => a.displayName.localeCompare(b.displayName));
|
|
127
144
|
}, [financeNetworkData, currenciesData, countryCode]);
|
|
128
|
-
console.log(countryCode, currency, "initial country and currency state"); // TEMP
|
|
129
145
|
const [countrySearch, setCountrySearch] = useState("");
|
|
130
146
|
const [currencySearch, setCurrencySearch] = useState("");
|
|
131
147
|
const [filteredCountries, setFilteredCountries] = useState(((_f = countriesData === null || countriesData === void 0 ? void 0 : countriesData.impactPayoutCountries) === null || _f === void 0 ? void 0 : _f.data) || []);
|
|
@@ -135,11 +151,12 @@ export function usePartnerInfoModal(props) {
|
|
|
135
151
|
const [success, setSuccess] = useState(false);
|
|
136
152
|
useEffect(() => {
|
|
137
153
|
var _a;
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
154
|
+
const publisher = (_a = user === null || user === void 0 ? void 0 : user.impactConnection) === null || _a === void 0 ? void 0 : _a.publisher;
|
|
155
|
+
if (!userData || !publisher)
|
|
156
|
+
return;
|
|
157
|
+
setCountryCode(publisher.countryCode);
|
|
158
|
+
setCurrency(publisher.currency);
|
|
159
|
+
}, [userData, user]);
|
|
143
160
|
useEffect(() => {
|
|
144
161
|
if (!(countries === null || countries === void 0 ? void 0 : countries.length))
|
|
145
162
|
return;
|
|
@@ -198,13 +215,13 @@ export function usePartnerInfoModal(props) {
|
|
|
198
215
|
countryCode,
|
|
199
216
|
currency,
|
|
200
217
|
};
|
|
201
|
-
const result = await
|
|
218
|
+
const result = await startImpactConnection({ vars });
|
|
202
219
|
if (!result || ((_a = result) === null || _a === void 0 ? void 0 : _a.message)) {
|
|
203
220
|
setError(props.networkErrorText);
|
|
204
221
|
return;
|
|
205
222
|
}
|
|
206
223
|
const connectionResult = result
|
|
207
|
-
.
|
|
224
|
+
.startImpactConnection;
|
|
208
225
|
console.log(result, connectionResult, "result and connectionResult from creating partner from modal");
|
|
209
226
|
if (!(connectionResult === null || connectionResult === void 0 ? void 0 : connectionResult.success)) {
|
|
210
227
|
const validationMsg = (_b = connectionResult === null || connectionResult === void 0 ? void 0 : connectionResult.validationErrors) === null || _b === void 0 ? void 0 : _b.map((e) => e.message).join(". ");
|
|
@@ -224,9 +241,7 @@ export function usePartnerInfoModal(props) {
|
|
|
224
241
|
}
|
|
225
242
|
const showModal = !success &&
|
|
226
243
|
!userLoading &&
|
|
227
|
-
(
|
|
228
|
-
console.log(showModal, "showModal condition in partner info modal"); // TEMP
|
|
229
|
-
console.log(filteredCurrencies, "filtered curricneis");
|
|
244
|
+
(impactConnection === null || impactConnection === void 0 ? void 0 : impactConnection.connectionStatus) === "NOT_STARTED";
|
|
230
245
|
return {
|
|
231
246
|
states: {
|
|
232
247
|
open: showModal,
|
|
@@ -50,7 +50,7 @@ export function TextSpanView(props, children) {
|
|
|
50
50
|
display: inline;
|
|
51
51
|
}
|
|
52
52
|
`;
|
|
53
|
-
return (h("span", { class: sheet.classes[type], part: "sqm-base" },
|
|
53
|
+
return (h("span", { class: sheet.classes[type], part: "sqm-text-span-base" },
|
|
54
54
|
h("style", { type: "text/css" },
|
|
55
55
|
vanillaStyle,
|
|
56
56
|
styleString),
|
|
@@ -7,15 +7,9 @@ function getCurrentStep(user) {
|
|
|
7
7
|
if (!((_a = user.impactConnection) === null || _a === void 0 ? void 0 : _a.connected) || !((_b = user.impactConnection) === null || _b === void 0 ? void 0 : _b.publisher)) {
|
|
8
8
|
return "/1";
|
|
9
9
|
}
|
|
10
|
-
const { requiredTaxDocumentType, currentTaxDocument, withdrawalSettings, brandedSignup, payoutsAccount,
|
|
11
|
-
console.log(user.impactConnection
|
|
12
|
-
|
|
13
|
-
const stateRequired = ["ES", "AU", "US", "CA"].includes(countryCode);
|
|
14
|
-
if (!billingAddress ||
|
|
15
|
-
!billingCity ||
|
|
16
|
-
!billingPostalCode ||
|
|
17
|
-
(stateRequired && !billingState) ||
|
|
18
|
-
!phoneNumber) {
|
|
10
|
+
const { requiredTaxDocumentType, currentTaxDocument, withdrawalSettings, brandedSignup, payoutsAccount, } = user.impactConnection.publisher;
|
|
11
|
+
console.log(user.impactConnection, "publisher data in useTaxAndCash to determine step new new");
|
|
12
|
+
if (user.impactConnection.connectionStatus === "STARTED") {
|
|
19
13
|
return "/1";
|
|
20
14
|
}
|
|
21
15
|
// If they do have a required document, look at current document
|
|
@@ -160,7 +160,7 @@ export function useUserInfoForm(props) {
|
|
|
160
160
|
const userData = data === null || data === void 0 ? void 0 : data.user;
|
|
161
161
|
let result = null;
|
|
162
162
|
let connectionResult;
|
|
163
|
-
if ((_a = userData === null || userData === void 0 ? void 0 : userData.impactConnection) === null || _a === void 0 ? void 0 : _a.
|
|
163
|
+
if (((_a = userData === null || userData === void 0 ? void 0 : userData.impactConnection) === null || _a === void 0 ? void 0 : _a.connectionStatus) === "STARTED") {
|
|
164
164
|
console.log(vars, "values for completeImpactPartner");
|
|
165
165
|
result = await completeImpactPartner({
|
|
166
166
|
vars,
|