@saasquatch/mint-components 2.3.0-11 → 2.3.0-12
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/{usePortalRegistrationForm-23ee2d62.js → AsYouType-d15caac8.js} +265 -223
- package/dist/cjs/sqm-banking-info-form_10.cjs.entry.js +14 -6
- package/dist/cjs/sqm-big-stat_47.cjs.entry.js +17 -13
- package/dist/cjs/sqm-portal-forgot-password_6.cjs.entry.js +3 -2
- package/dist/cjs/sqm-stencilbook.cjs.entry.js +5 -2
- package/dist/cjs/{sqm-user-info-form-view-8f7186b8.js → sqm-user-info-form-view-c2cad72c.js} +994 -8
- package/dist/cjs/subregions-3542b0b8.js +1068 -0
- package/dist/cjs/{useIndirectTaxForm-112914a0.js → useIndirectTaxForm-64c0231c.js} +3 -1
- package/dist/cjs/usePortalRegistrationForm-8a3a14ac.js +215 -0
- package/dist/collection/components/tax-and-cash/phoneExtensions.js +12 -0
- package/dist/collection/components/tax-and-cash/sqm-indirect-tax-form/useIndirectTaxForm.js +2 -0
- package/dist/collection/components/tax-and-cash/sqm-tax-and-cash/useTaxAndCash.js +12 -9
- package/dist/collection/components/tax-and-cash/sqm-user-info-form/UserInfoFormView.stories.js +2 -0
- package/dist/collection/components/tax-and-cash/sqm-user-info-form/sqm-user-info-form-view.js +8 -5
- package/dist/collection/components/tax-and-cash/sqm-user-info-form/useUserInfoForm.js +9 -5
- package/dist/collection/components/tax-and-cash/utils.js +30 -27
- package/dist/esm/{usePortalRegistrationForm-3a1f36a2.js → AsYouType-2d56519e.js} +248 -223
- package/dist/esm/sqm-banking-info-form_10.entry.js +14 -6
- package/dist/esm/sqm-big-stat_47.entry.js +16 -12
- package/dist/esm/sqm-portal-forgot-password_6.entry.js +2 -1
- package/dist/esm/sqm-stencilbook.entry.js +5 -2
- package/dist/esm/{sqm-user-info-form-view-599a6922.js → sqm-user-info-form-view-5051c1d0.js} +992 -6
- package/dist/esm/subregions-7c5112e8.js +1055 -0
- package/dist/esm/{useIndirectTaxForm-a6ac7e7e.js → useIndirectTaxForm-d7d6be39.js} +3 -1
- package/dist/esm/usePortalRegistrationForm-78fdfd93.js +213 -0
- package/dist/esm-es5/AsYouType-2d56519e.js +1 -0
- 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-portal-forgot-password_6.entry.js +1 -1
- package/dist/esm-es5/sqm-stencilbook.entry.js +1 -1
- package/dist/esm-es5/sqm-user-info-form-view-5051c1d0.js +1 -0
- package/dist/esm-es5/subregions-7c5112e8.js +1 -0
- package/dist/esm-es5/{useIndirectTaxForm-a6ac7e7e.js → useIndirectTaxForm-d7d6be39.js} +2 -2
- package/dist/esm-es5/usePortalRegistrationForm-78fdfd93.js +1 -0
- package/dist/mint-components/mint-components.esm.js +1 -1
- package/dist/mint-components/p-0c6bd136.system.entry.js +1 -0
- package/dist/mint-components/{p-2d4132fb.js → p-1e1b03fa.js} +7 -5
- package/dist/mint-components/p-1e699fb8.entry.js +9 -0
- package/dist/mint-components/p-1f387c7b.system.js +1 -1
- package/dist/mint-components/p-29b267a9.system.entry.js +1 -0
- package/dist/mint-components/p-5959ebdb.system.js +1 -0
- package/dist/mint-components/p-5c3bff99.entry.js +1 -0
- package/dist/mint-components/p-5f8fa87c.js +1 -0
- package/dist/mint-components/p-6c9f7515.system.entry.js +1 -0
- package/dist/mint-components/p-769166a5.system.js +1 -0
- package/dist/mint-components/p-7c72eeb5.js +1 -0
- package/dist/mint-components/p-8dcd72fe.system.entry.js +1 -0
- package/dist/mint-components/p-a08157c4.js +1 -0
- package/dist/mint-components/p-a779e577.js +13 -0
- package/dist/mint-components/{p-339ce676.entry.js → p-aed3c69d.entry.js} +11 -11
- package/dist/mint-components/{p-86231add.entry.js → p-d0ed1c1b.entry.js} +8 -8
- package/dist/mint-components/p-d463fa82.system.js +1 -0
- package/dist/mint-components/{p-6ef373ed.system.js → p-d67f8e0f.system.js} +2 -2
- package/dist/mint-components/p-ee91aeac.system.js +1 -0
- package/dist/types/components/tax-and-cash/phoneExtensions.d.ts +12 -0
- package/dist/types/components/tax-and-cash/utils.d.ts +8 -2
- package/docs/docs.docx +0 -0
- package/package.json +1 -1
- package/dist/cjs/subregions-984e30d7.js +0 -1505
- package/dist/esm/subregions-7c9778d0.js +0 -1492
- package/dist/esm-es5/sqm-user-info-form-view-599a6922.js +0 -1
- package/dist/esm-es5/subregions-7c9778d0.js +0 -1
- package/dist/esm-es5/usePortalRegistrationForm-3a1f36a2.js +0 -1
- package/dist/mint-components/p-26a4ebfd.js +0 -1
- package/dist/mint-components/p-335a5736.entry.js +0 -1
- package/dist/mint-components/p-3a41b39c.js +0 -13
- package/dist/mint-components/p-40894343.entry.js +0 -9
- package/dist/mint-components/p-5fdf0286.system.js +0 -1
- package/dist/mint-components/p-7f29622d.js +0 -1
- package/dist/mint-components/p-81270b9f.system.js +0 -1
- package/dist/mint-components/p-b62d8b95.system.entry.js +0 -1
- package/dist/mint-components/p-bd03efe0.system.js +0 -1
- package/dist/mint-components/p-c9d2ccfc.system.entry.js +0 -1
- package/dist/mint-components/p-db6bf7cf.system.entry.js +0 -1
- package/dist/mint-components/p-f0ef09a0.system.entry.js +0 -1
|
@@ -11,17 +11,18 @@ const cjs = require('./cjs-1066ec21.js');
|
|
|
11
11
|
const utils = require('./utils-6847bc06.js');
|
|
12
12
|
const JSS = require('./JSS-8503a151.js');
|
|
13
13
|
require('./mixins-4761d472.js');
|
|
14
|
+
require('./AsYouType-d15caac8.js');
|
|
15
|
+
const subregions = require('./subregions-3542b0b8.js');
|
|
14
16
|
const GenericTableView = require('./GenericTableView-be5648e4.js');
|
|
15
17
|
const reRender = require('./re-render-72a0ef45.js');
|
|
16
18
|
const useChildElements = require('./useChildElements-041127d7.js');
|
|
17
19
|
const luxon = require('./luxon-c1ad356a.js');
|
|
18
20
|
const useReferralTable = require('./useReferralTable-6e9de0d5.js');
|
|
19
|
-
const sqmUserInfoFormView = require('./sqm-user-info-form-view-
|
|
20
|
-
const subregions = require('./subregions-984e30d7.js');
|
|
21
|
+
const sqmUserInfoFormView = require('./sqm-user-info-form-view-c2cad72c.js');
|
|
21
22
|
const data = require('./data-89ac73dd.js');
|
|
22
23
|
const keys = require('./keys-5a2c9ed2.js');
|
|
23
24
|
const eventKeys = require('./eventKeys-7af4df4d.js');
|
|
24
|
-
const useIndirectTaxForm = require('./useIndirectTaxForm-
|
|
25
|
+
const useIndirectTaxForm = require('./useIndirectTaxForm-64c0231c.js');
|
|
25
26
|
|
|
26
27
|
function getFormMap({ props, getValidationErrorMessage, bankCountry, }) {
|
|
27
28
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63, _64, _65, _66, _67, _68, _69, _70, _71, _72, _73, _74, _75, _76;
|
|
@@ -4569,9 +4570,12 @@ function useUserInfoForm(props) {
|
|
|
4569
4570
|
city: formData.city,
|
|
4570
4571
|
state: formData.state,
|
|
4571
4572
|
postalCode: formData.postalCode,
|
|
4572
|
-
phoneNumber: formData.phoneNumber,
|
|
4573
|
+
phoneNumber: subregions.toDomesticNumber(formData.phoneNumberCountryCode, formData.phoneNumber),
|
|
4573
4574
|
phoneNumberCountryCode: formData.phoneNumberCountryCode,
|
|
4574
4575
|
};
|
|
4576
|
+
// If the partner has already been started call completeImpactPartner to
|
|
4577
|
+
// update the remaining details. Otherwise create a new connection.
|
|
4578
|
+
// const userData = data?.user;
|
|
4575
4579
|
let result = null;
|
|
4576
4580
|
let connectionResult;
|
|
4577
4581
|
result = await completeImpactPartner({
|
|
@@ -4636,12 +4640,13 @@ function useUserInfoForm(props) {
|
|
|
4636
4640
|
return;
|
|
4637
4641
|
}
|
|
4638
4642
|
const { allowBankingCollection, ...userData } = formData;
|
|
4643
|
+
const normalizedPhoneNumber = subregions.toDomesticNumber(userData.phoneNumberCountryCode, userData.phoneNumber);
|
|
4639
4644
|
setUserFormContext({
|
|
4640
4645
|
...userFormContext,
|
|
4641
4646
|
firstName: userData.firstName,
|
|
4642
4647
|
lastName: userData.lastName,
|
|
4643
4648
|
phoneNumberCountryCode: userData.phoneNumberCountryCode,
|
|
4644
|
-
phoneNumber:
|
|
4649
|
+
phoneNumber: normalizedPhoneNumber,
|
|
4645
4650
|
countryCode: userData.countryCode,
|
|
4646
4651
|
address: userData.address,
|
|
4647
4652
|
city: userData.city,
|
|
@@ -4652,7 +4657,10 @@ function useUserInfoForm(props) {
|
|
|
4652
4657
|
const skipNextStep = getSkipNextStep(userData);
|
|
4653
4658
|
if (skipNextStep) {
|
|
4654
4659
|
try {
|
|
4655
|
-
const { resultPublisher, hasValidCurrentDocument } = await connectPartner(
|
|
4660
|
+
const { resultPublisher, hasValidCurrentDocument } = await connectPartner({
|
|
4661
|
+
...formData,
|
|
4662
|
+
phoneNumber: normalizedPhoneNumber,
|
|
4663
|
+
});
|
|
4656
4664
|
if ((resultPublisher === null || resultPublisher === void 0 ? void 0 : resultPublisher.requiredTaxDocumentType) &&
|
|
4657
4665
|
!hasValidCurrentDocument) {
|
|
4658
4666
|
// Go to docusign form
|
|
@@ -14,9 +14,11 @@ require('./useReferralCodes-0f7948af.js');
|
|
|
14
14
|
require('./mixins-4761d472.js');
|
|
15
15
|
const copyTextView = require('./copy-text-view-bb2c0ea7.js');
|
|
16
16
|
require('./sqm-text-span-view-b9e10f5d.js');
|
|
17
|
-
const
|
|
17
|
+
const AsYouType = require('./AsYouType-d15caac8.js');
|
|
18
|
+
const subregions = require('./subregions-3542b0b8.js');
|
|
18
19
|
const useRegistrationFormState = require('./useRegistrationFormState-4fe5b770.js');
|
|
19
20
|
const sqmPortalRegistrationFormView = require('./sqm-portal-registration-form-view-a45f7a52.js');
|
|
21
|
+
const usePortalRegistrationForm = require('./usePortalRegistrationForm-8a3a14ac.js');
|
|
20
22
|
const reRender = require('./re-render-72a0ef45.js');
|
|
21
23
|
const useChildElements = require('./useChildElements-041127d7.js');
|
|
22
24
|
const luxon = require('./luxon-c1ad356a.js');
|
|
@@ -29,11 +31,10 @@ const utilities = require('./utilities-fcdb9504.js');
|
|
|
29
31
|
const ErrorView = require('./ErrorView-ee7b0f36.js');
|
|
30
32
|
const ShadowViewAddon = require('./ShadowViewAddon-3b477e58.js');
|
|
31
33
|
require('./sqm-portal-container-view-757f921b.js');
|
|
32
|
-
const subregions = require('./subregions-984e30d7.js');
|
|
33
34
|
const data = require('./data-89ac73dd.js');
|
|
34
35
|
const keys = require('./keys-5a2c9ed2.js');
|
|
35
36
|
require('./eventKeys-7af4df4d.js');
|
|
36
|
-
const useIndirectTaxForm = require('./useIndirectTaxForm-
|
|
37
|
+
const useIndirectTaxForm = require('./useIndirectTaxForm-64c0231c.js');
|
|
37
38
|
const parseStates = require('./parseStates-d1effc19.js');
|
|
38
39
|
|
|
39
40
|
/**
|
|
@@ -2145,7 +2146,7 @@ function useLeadForm(props) {
|
|
|
2145
2146
|
const name = (_b = (_a = e.target) === null || _a === void 0 ? void 0 : _a.type) === null || _b === void 0 ? void 0 : _b.toLowerCase();
|
|
2146
2147
|
if (name !== "tel")
|
|
2147
2148
|
return;
|
|
2148
|
-
const asYouType = new
|
|
2149
|
+
const asYouType = new AsYouType.AsYouType("US");
|
|
2149
2150
|
e.target.value = asYouType.input(e.target.value);
|
|
2150
2151
|
}, []);
|
|
2151
2152
|
function resetForm() {
|
|
@@ -6662,15 +6663,18 @@ function getCurrentStep(user) {
|
|
|
6662
6663
|
return "/1";
|
|
6663
6664
|
}
|
|
6664
6665
|
const { requiredTaxDocumentType, currentTaxDocument, withdrawalSettings, brandedSignup, payoutsAccount, billingAddress, billingCity, billingCountryCode, billingPostalCode, phoneNumber, phoneNumberCountryCode, } = user.impactConnection.publisher;
|
|
6665
|
-
const
|
|
6666
|
-
|
|
6667
|
-
|
|
6668
|
-
|
|
6669
|
-
|
|
6670
|
-
|
|
6671
|
-
|
|
6672
|
-
|
|
6673
|
-
|
|
6666
|
+
const isCompleted = user.impactConnection.connectionStatus === "COMPLETED";
|
|
6667
|
+
if (!isCompleted) {
|
|
6668
|
+
const hasBillingInfo = billingAddress &&
|
|
6669
|
+
billingCity &&
|
|
6670
|
+
billingCountryCode &&
|
|
6671
|
+
billingPostalCode &&
|
|
6672
|
+
phoneNumberCountryCode &&
|
|
6673
|
+
phoneNumber &&
|
|
6674
|
+
subregions.isValidI18nPhoneNumber(phoneNumberCountryCode, phoneNumber);
|
|
6675
|
+
if (!hasBillingInfo) {
|
|
6676
|
+
return "/1";
|
|
6677
|
+
}
|
|
6674
6678
|
}
|
|
6675
6679
|
// If they do have a required document, look at current document
|
|
6676
6680
|
if (requiredTaxDocumentType && !currentTaxDocument) {
|
|
@@ -12,9 +12,10 @@ const JSS = require('./JSS-8503a151.js');
|
|
|
12
12
|
require('./mixins-4761d472.js');
|
|
13
13
|
require('./sqm-text-span-view-b9e10f5d.js');
|
|
14
14
|
const sqmPortalVerifyEmailView = require('./sqm-portal-verify-email-view-717d0633.js');
|
|
15
|
-
const
|
|
15
|
+
const AsYouType = require('./AsYouType-d15caac8.js');
|
|
16
16
|
const useRegistrationFormState = require('./useRegistrationFormState-4fe5b770.js');
|
|
17
17
|
const sqmPortalRegistrationFormView = require('./sqm-portal-registration-form-view-a45f7a52.js');
|
|
18
|
+
const usePortalRegistrationForm = require('./usePortalRegistrationForm-8a3a14ac.js');
|
|
18
19
|
|
|
19
20
|
function usePortalForgotPassword(props) {
|
|
20
21
|
var _a, _b, _c, _d, _e, _f, _g;
|
|
@@ -534,7 +535,7 @@ function usePortalRegister(props) {
|
|
|
534
535
|
const name = (_b = (_a = e.target) === null || _a === void 0 ? void 0 : _a.type) === null || _b === void 0 ? void 0 : _b.toLowerCase();
|
|
535
536
|
if (name !== "tel")
|
|
536
537
|
return;
|
|
537
|
-
const asYouType = new
|
|
538
|
+
const asYouType = new AsYouType.AsYouType("US");
|
|
538
539
|
e.target.value = asYouType.input(e.target.value);
|
|
539
540
|
}, []);
|
|
540
541
|
let errorMessage = "";
|
|
@@ -14,6 +14,8 @@ require('./mixins-4761d472.js');
|
|
|
14
14
|
const copyTextView = require('./copy-text-view-bb2c0ea7.js');
|
|
15
15
|
require('./sqm-text-span-view-b9e10f5d.js');
|
|
16
16
|
const sqmPortalVerifyEmailView = require('./sqm-portal-verify-email-view-717d0633.js');
|
|
17
|
+
require('./AsYouType-d15caac8.js');
|
|
18
|
+
const subregions = require('./subregions-3542b0b8.js');
|
|
17
19
|
const sqmPortalRegistrationFormView = require('./sqm-portal-registration-form-view-a45f7a52.js');
|
|
18
20
|
const GenericTableView = require('./GenericTableView-be5648e4.js');
|
|
19
21
|
require('./useChildElements-041127d7.js');
|
|
@@ -35,8 +37,7 @@ require('./ErrorView-ee7b0f36.js');
|
|
|
35
37
|
const sqmQrCodeView = require('./sqm-qr-code-view-1f2daa76.js');
|
|
36
38
|
const ShadowViewAddon = require('./ShadowViewAddon-3b477e58.js');
|
|
37
39
|
const sqmPortalContainerView = require('./sqm-portal-container-view-757f921b.js');
|
|
38
|
-
const sqmUserInfoFormView = require('./sqm-user-info-form-view-
|
|
39
|
-
const subregions = require('./subregions-984e30d7.js');
|
|
40
|
+
const sqmUserInfoFormView = require('./sqm-user-info-form-view-c2cad72c.js');
|
|
40
41
|
const sqmLeadInputFieldView = require('./sqm-lead-input-field-view-0cd7ebdb.js');
|
|
41
42
|
require('./data-89ac73dd.js');
|
|
42
43
|
const sqmPartnerInfoModalView = require('./sqm-partner-info-modal-view-2b6fee0f.js');
|
|
@@ -18883,6 +18884,8 @@ const mockCountries = [
|
|
|
18883
18884
|
{ countryCode: "DE", displayName: "Germany" },
|
|
18884
18885
|
{ countryCode: "FR", displayName: "France" },
|
|
18885
18886
|
{ countryCode: "ES", displayName: "Spain" },
|
|
18887
|
+
// Show handling of long country names
|
|
18888
|
+
{ countryCode: "CD", displayName: "Congo, The Democratic Republic of the Congo" },
|
|
18886
18889
|
];
|
|
18887
18890
|
const mockCurrencies = [
|
|
18888
18891
|
{ currencyCode: "USD", displayName: "US Dollar" },
|