@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
|
@@ -7,17 +7,18 @@ import { c as cjs } from './cjs-bdfb4486.js';
|
|
|
7
7
|
import { g as getProps } from './utils-334c1e34.js';
|
|
8
8
|
import { c as createStyleSheet } from './JSS-67b5cff8.js';
|
|
9
9
|
import './mixins-f750863a.js';
|
|
10
|
+
import './AsYouType-2d56519e.js';
|
|
11
|
+
import { t as taxTypeToName, b as validTaxDocument, I as INDIRECT_TAX_SPAIN_REGIONS, a as INDIRECT_TAX_PROVINCES, o as objectIsFull, c as toDomesticNumber, A as ADDRESS_REGIONS } from './subregions-7c5112e8.js';
|
|
10
12
|
import { G as GenericTableView } from './GenericTableView-8c72ac30.js';
|
|
11
13
|
import { u as useRerenderListener, a as useRequestRerender } from './re-render-bf46ba54.js';
|
|
12
14
|
import { u as useChildElements } from './useChildElements-06937df7.js';
|
|
13
15
|
import { l as luxon } from './luxon-1be92a8e.js';
|
|
14
16
|
import { g as generateUserError } from './useReferralTable-03d32c6f.js';
|
|
15
|
-
import { O as OtherRegionSlotView, I as InvoiceTableView, v as vatLabels, T as TaxAndCashDashboardView, U as UserInfoFormView } from './sqm-user-info-form-view-
|
|
16
|
-
import { t as taxTypeToName, b as validTaxDocument, I as INDIRECT_TAX_SPAIN_REGIONS, a as INDIRECT_TAX_PROVINCES, o as objectIsFull, A as ADDRESS_REGIONS } from './subregions-7c9778d0.js';
|
|
17
|
+
import { O as OtherRegionSlotView, I as InvoiceTableView, v as vatLabels, T as TaxAndCashDashboardView, U as UserInfoFormView } from './sqm-user-info-form-view-5051c1d0.js';
|
|
17
18
|
import { F as FORM_STEPS, a as TAX_FORM_CONTEXT_NAMESPACE, S as SORTED_COUNTRIES_NAMESPACE, f as FINANCE_NETWORK_SETTINGS_NAMESPACE, c as USER_QUERY_NAMESPACE, T as TAX_CONTEXT_NAMESPACE, C as CURRENCIES_NAMESPACE, U as USER_FORM_CONTEXT_NAMESPACE } from './data-8698cbc6.js';
|
|
18
19
|
import { c as VERIFICATION_EVENT_KEY } from './keys-1054056a.js';
|
|
19
20
|
import { T as TAX_FORM_UPDATED_EVENT_KEY } from './eventKeys-f76b6a03.js';
|
|
20
|
-
import { a as useIndirectTaxForm, b as useVeriffApp, g as getStatus, V as VERIFF_COMPLETE_EVENT_KEY, c as CONNECT_PARTNER, C as COMPLETE_PARTNER } from './useIndirectTaxForm-
|
|
21
|
+
import { a as useIndirectTaxForm, b as useVeriffApp, g as getStatus, V as VERIFF_COMPLETE_EVENT_KEY, c as CONNECT_PARTNER, C as COMPLETE_PARTNER } from './useIndirectTaxForm-d7d6be39.js';
|
|
21
22
|
|
|
22
23
|
function getFormMap({ props, getValidationErrorMessage, bankCountry, }) {
|
|
23
24
|
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;
|
|
@@ -4565,9 +4566,12 @@ function useUserInfoForm(props) {
|
|
|
4565
4566
|
city: formData.city,
|
|
4566
4567
|
state: formData.state,
|
|
4567
4568
|
postalCode: formData.postalCode,
|
|
4568
|
-
phoneNumber: formData.phoneNumber,
|
|
4569
|
+
phoneNumber: toDomesticNumber(formData.phoneNumberCountryCode, formData.phoneNumber),
|
|
4569
4570
|
phoneNumberCountryCode: formData.phoneNumberCountryCode,
|
|
4570
4571
|
};
|
|
4572
|
+
// If the partner has already been started call completeImpactPartner to
|
|
4573
|
+
// update the remaining details. Otherwise create a new connection.
|
|
4574
|
+
// const userData = data?.user;
|
|
4571
4575
|
let result = null;
|
|
4572
4576
|
let connectionResult;
|
|
4573
4577
|
result = await completeImpactPartner({
|
|
@@ -4632,12 +4636,13 @@ function useUserInfoForm(props) {
|
|
|
4632
4636
|
return;
|
|
4633
4637
|
}
|
|
4634
4638
|
const { allowBankingCollection, ...userData } = formData;
|
|
4639
|
+
const normalizedPhoneNumber = toDomesticNumber(userData.phoneNumberCountryCode, userData.phoneNumber);
|
|
4635
4640
|
setUserFormContext({
|
|
4636
4641
|
...userFormContext,
|
|
4637
4642
|
firstName: userData.firstName,
|
|
4638
4643
|
lastName: userData.lastName,
|
|
4639
4644
|
phoneNumberCountryCode: userData.phoneNumberCountryCode,
|
|
4640
|
-
phoneNumber:
|
|
4645
|
+
phoneNumber: normalizedPhoneNumber,
|
|
4641
4646
|
countryCode: userData.countryCode,
|
|
4642
4647
|
address: userData.address,
|
|
4643
4648
|
city: userData.city,
|
|
@@ -4648,7 +4653,10 @@ function useUserInfoForm(props) {
|
|
|
4648
4653
|
const skipNextStep = getSkipNextStep(userData);
|
|
4649
4654
|
if (skipNextStep) {
|
|
4650
4655
|
try {
|
|
4651
|
-
const { resultPublisher, hasValidCurrentDocument } = await connectPartner(
|
|
4656
|
+
const { resultPublisher, hasValidCurrentDocument } = await connectPartner({
|
|
4657
|
+
...formData,
|
|
4658
|
+
phoneNumber: normalizedPhoneNumber,
|
|
4659
|
+
});
|
|
4652
4660
|
if ((resultPublisher === null || resultPublisher === void 0 ? void 0 : resultPublisher.requiredTaxDocumentType) &&
|
|
4653
4661
|
!hasValidCurrentDocument) {
|
|
4654
4662
|
// Go to docusign form
|
|
@@ -10,9 +10,11 @@ import './useReferralCodes-25f8b792.js';
|
|
|
10
10
|
import './mixins-f750863a.js';
|
|
11
11
|
import { C as CopyTextView } from './copy-text-view-87259b11.js';
|
|
12
12
|
import './sqm-text-span-view-72f43dff.js';
|
|
13
|
-
import { A as AsYouType
|
|
13
|
+
import { A as AsYouType } from './AsYouType-2d56519e.js';
|
|
14
|
+
import { g as getCountryObj, i as isValidI18nPhoneNumber, L as LoadingView } from './subregions-7c5112e8.js';
|
|
14
15
|
import { R as REGISTRATION_FORM_STATE_CONTEXT, a as useRegistrationForm } from './useRegistrationFormState-aa44cfff.js';
|
|
15
16
|
import { P as PortalRegistrationFormView } from './sqm-portal-registration-form-view-79265df5.js';
|
|
17
|
+
import { u as usePortalRegistrationForm } from './usePortalRegistrationForm-78fdfd93.js';
|
|
16
18
|
import { a as useRequestRerender } from './re-render-bf46ba54.js';
|
|
17
19
|
import { u as useChildElements } from './useChildElements-06937df7.js';
|
|
18
20
|
import { l as luxon } from './luxon-1be92a8e.js';
|
|
@@ -25,11 +27,10 @@ import { i as isEmpty } from './utilities-cbd8f2eb.js';
|
|
|
25
27
|
import { E as ErrorView } from './ErrorView-74cb3af8.js';
|
|
26
28
|
import { u as useDemoBigStat, W as useBigStat, B as BigStatView, C as CardFeedView, d as CheckboxFieldView, e as CouponCodeView, D as DropdownFieldView, E as EditProfileView, H as HeroView, I as InputFieldView, U as LeadDropdownFieldView, Q as LeadFormView, X as withShadowView, L as LeaderboardView, N as NameFieldsView, f as ChangeMarktingView, P as PortalChangePasswordView, g as PortalFooterView, h as PortalFrameView, c as BaseRegistrationFormView, R as ReferralIframeView, i as RewardExchangeView, Y as demoRewardExchange, G as useShareButton, a as ShareButtonView, K as useShareLink, J as ShareLinkView, S as StatContainerView, T as TaskCardView } from './ShadowViewAddon-e115fa1c.js';
|
|
27
29
|
import './sqm-portal-container-view-200c9df8.js';
|
|
28
|
-
import { g as getCountryObj, i as isValidI18nPhoneNumber, L as LoadingView } from './subregions-7c9778d0.js';
|
|
29
30
|
import { T as TAX_CONTEXT_NAMESPACE, a as TAX_FORM_CONTEXT_NAMESPACE, U as USER_FORM_CONTEXT_NAMESPACE, C as CURRENCIES_NAMESPACE, b as COUNTRIES_NAMESPACE, S as SORTED_COUNTRIES_NAMESPACE, c as USER_QUERY_NAMESPACE, G as GET_USER$2, d as COUNTRIES_QUERY_NAMESPACE, e as GET_COUNTRIES, f as FINANCE_NETWORK_SETTINGS_NAMESPACE, g as GET_FINANCE_NETWORK_SETTINGS, h as CURRENCIES_QUERY_NAMESPACE, i as GET_CURRENCIES } from './data-8698cbc6.js';
|
|
30
31
|
import { S as SHOW_CODE_NAMESPACE, a as VERIFICATION_EMAIL_NAMESPACE, b as SHOW_PARTNER_MODAL_NAMESPACE, P as PARTNER_CREATED_NAMESPACE, V as VERIFICATION_PARENT_NAMESPACE } from './keys-1054056a.js';
|
|
31
32
|
import './eventKeys-f76b6a03.js';
|
|
32
|
-
import { u as usePayoutStatus, C as COMPLETE_PARTNER } from './useIndirectTaxForm-
|
|
33
|
+
import { u as usePayoutStatus, C as COMPLETE_PARTNER } from './useIndirectTaxForm-d7d6be39.js';
|
|
33
34
|
import { p as parseStates } from './parseStates-ed75e224.js';
|
|
34
35
|
|
|
35
36
|
/**
|
|
@@ -6658,15 +6659,18 @@ function getCurrentStep(user) {
|
|
|
6658
6659
|
return "/1";
|
|
6659
6660
|
}
|
|
6660
6661
|
const { requiredTaxDocumentType, currentTaxDocument, withdrawalSettings, brandedSignup, payoutsAccount, billingAddress, billingCity, billingCountryCode, billingPostalCode, phoneNumber, phoneNumberCountryCode, } = user.impactConnection.publisher;
|
|
6661
|
-
const
|
|
6662
|
-
|
|
6663
|
-
|
|
6664
|
-
|
|
6665
|
-
|
|
6666
|
-
|
|
6667
|
-
|
|
6668
|
-
|
|
6669
|
-
|
|
6662
|
+
const isCompleted = user.impactConnection.connectionStatus === "COMPLETED";
|
|
6663
|
+
if (!isCompleted) {
|
|
6664
|
+
const hasBillingInfo = billingAddress &&
|
|
6665
|
+
billingCity &&
|
|
6666
|
+
billingCountryCode &&
|
|
6667
|
+
billingPostalCode &&
|
|
6668
|
+
phoneNumberCountryCode &&
|
|
6669
|
+
phoneNumber &&
|
|
6670
|
+
isValidI18nPhoneNumber(phoneNumberCountryCode, phoneNumber);
|
|
6671
|
+
if (!hasBillingInfo) {
|
|
6672
|
+
return "/1";
|
|
6673
|
+
}
|
|
6670
6674
|
}
|
|
6671
6675
|
// If they do have a required document, look at current document
|
|
6672
6676
|
if (requiredTaxDocumentType && !currentTaxDocument) {
|
|
@@ -8,9 +8,10 @@ import { c as createStyleSheet } from './JSS-67b5cff8.js';
|
|
|
8
8
|
import './mixins-f750863a.js';
|
|
9
9
|
import './sqm-text-span-view-72f43dff.js';
|
|
10
10
|
import { P as PortalForgotPasswordView, a as PortalLoginView, b as PortalRegisterView, c as PortalVerifyEmailView } from './sqm-portal-verify-email-view-590f964b.js';
|
|
11
|
-
import { A as AsYouType
|
|
11
|
+
import { A as AsYouType } from './AsYouType-2d56519e.js';
|
|
12
12
|
import { u as useRegistrationFormState } from './useRegistrationFormState-aa44cfff.js';
|
|
13
13
|
import { P as PortalRegistrationFormView } from './sqm-portal-registration-form-view-79265df5.js';
|
|
14
|
+
import { u as usePortalRegistrationForm } from './usePortalRegistrationForm-78fdfd93.js';
|
|
14
15
|
|
|
15
16
|
function usePortalForgotPassword(props) {
|
|
16
17
|
var _a, _b, _c, _d, _e, _f, _g;
|
|
@@ -10,6 +10,8 @@ import './mixins-f750863a.js';
|
|
|
10
10
|
import { C as CopyTextView } from './copy-text-view-87259b11.js';
|
|
11
11
|
import './sqm-text-span-view-72f43dff.js';
|
|
12
12
|
import { b as PortalRegisterView, P as PortalForgotPasswordView, a as PortalLoginView, c as PortalVerifyEmailView } from './sqm-portal-verify-email-view-590f964b.js';
|
|
13
|
+
import './AsYouType-2d56519e.js';
|
|
14
|
+
import { t as taxTypeToName, L as LoadingView, I as INDIRECT_TAX_SPAIN_REGIONS, a as INDIRECT_TAX_PROVINCES } from './subregions-7c5112e8.js';
|
|
13
15
|
import { P as PortalRegistrationFormView } from './sqm-portal-registration-form-view-79265df5.js';
|
|
14
16
|
import { G as GenericTableView } from './GenericTableView-8c72ac30.js';
|
|
15
17
|
import './useChildElements-06937df7.js';
|
|
@@ -31,8 +33,7 @@ import './ErrorView-74cb3af8.js';
|
|
|
31
33
|
import { Q as QrCodeView } from './sqm-qr-code-view-ce476721.js';
|
|
32
34
|
import { S as StatContainerView, B as BigStatView, a as ShareButtonView, P as PortalChangePasswordView, b as PoweredByImg$1, c as BaseRegistrationFormView, u as useDemoBigStat, T as TaskCardView, C as CardFeedView, d as CheckboxFieldView, e as CouponCodeView, D as DropdownFieldView, E as EditProfileView, L as LeaderboardView, H as HeroView, I as InputFieldView, N as NameFieldsView, f as ChangeMarktingView, g as PortalFooterView, h as PortalFrameView, R as ReferralIframeView, i as RewardExchangeView, r as rewardExchangeCustomErrorMsg, j as rewardExchangeLongText, k as rewardExchangeSelected, l as chooseAmountFixed, m as chooseAmountFixedNoDescription, n as chooseAmountVariable, o as chooseAmountVariableNoDescription, p as chooseAmountVariableDisabled, q as chooseAmountVariableUnavailable, s as confirmFixed, t as confirmVariable, v as redemptionError, w as queryError, x as success, y as successVariable, z as loading, A as empty$1, F as rewardExchange, G as useShareButton, J as ShareLinkView, K as useShareLink, M as ProgressBarView, O as ProgressBar$2, Q as LeadFormView, U as LeadDropdownFieldView, V as ShadowViewAddon } from './ShadowViewAddon-e115fa1c.js';
|
|
33
35
|
import { P as PortalContainerView, a as PortalSectionView } from './sqm-portal-container-view-200c9df8.js';
|
|
34
|
-
import { I as InvoiceTableView, T as TaxAndCashDashboardView$1, O as OtherRegionSlotView, U as UserInfoFormView$1 } from './sqm-user-info-form-view-
|
|
35
|
-
import { t as taxTypeToName, L as LoadingView, I as INDIRECT_TAX_SPAIN_REGIONS, a as INDIRECT_TAX_PROVINCES } from './subregions-7c9778d0.js';
|
|
36
|
+
import { I as InvoiceTableView, T as TaxAndCashDashboardView$1, O as OtherRegionSlotView, U as UserInfoFormView$1 } from './sqm-user-info-form-view-5051c1d0.js';
|
|
36
37
|
import { L as LeadInputFieldView } from './sqm-lead-input-field-view-b945edf4.js';
|
|
37
38
|
import './data-8698cbc6.js';
|
|
38
39
|
import { P as PartnerInfoModalView } from './sqm-partner-info-modal-view-bc843d7d.js';
|
|
@@ -18879,6 +18880,8 @@ const mockCountries = [
|
|
|
18879
18880
|
{ countryCode: "DE", displayName: "Germany" },
|
|
18880
18881
|
{ countryCode: "FR", displayName: "France" },
|
|
18881
18882
|
{ countryCode: "ES", displayName: "Spain" },
|
|
18883
|
+
// Show handling of long country names
|
|
18884
|
+
{ countryCode: "CD", displayName: "Congo, The Democratic Republic of the Congo" },
|
|
18882
18885
|
];
|
|
18883
18886
|
const mockCurrencies = [
|
|
18884
18887
|
{ currencyCode: "USD", displayName: "US Dollar" },
|