@saasquatch/mint-components 2.3.0-11 → 2.3.0-13
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 +46 -27
- 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 +59 -2
- package/dist/cjs/{sqm-user-info-form-view-8f7186b8.js → sqm-user-info-form-view-60e09262.js} +1004 -8
- package/dist/cjs/subregions-3542b0b8.js +1068 -0
- package/dist/cjs/{useIndirectTaxForm-112914a0.js → useIndirectTaxForm-c439eb81.js} +6 -2
- package/dist/cjs/usePortalRegistrationForm-8a3a14ac.js +215 -0
- package/dist/collection/components/tax-and-cash/TaxForm.stories.js +3 -0
- package/dist/collection/components/tax-and-cash/phoneExtensions.js +12 -0
- package/dist/collection/components/tax-and-cash/sqm-indirect-tax-form/sqm-indirect-tax-form-view.js +8 -0
- package/dist/collection/components/tax-and-cash/sqm-indirect-tax-form/sqm-indirect-tax-form.js +2 -1
- package/dist/collection/components/tax-and-cash/sqm-indirect-tax-form/useIndirectTaxForm.js +5 -1
- 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 +52 -0
- package/dist/collection/components/tax-and-cash/sqm-user-info-form/sqm-user-info-form-view.js +18 -5
- package/dist/collection/components/tax-and-cash/sqm-user-info-form/sqm-user-info-form.js +3 -1
- package/dist/collection/components/tax-and-cash/sqm-user-info-form/useUserInfoForm.js +31 -27
- 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 +46 -27
- 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 +59 -2
- package/dist/esm/{sqm-user-info-form-view-599a6922.js → sqm-user-info-form-view-647a2bd5.js} +1002 -6
- package/dist/esm/subregions-7c5112e8.js +1055 -0
- package/dist/esm/{useIndirectTaxForm-a6ac7e7e.js → useIndirectTaxForm-38cd984e.js} +6 -2
- 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-647a2bd5.js +1 -0
- package/dist/esm-es5/subregions-7c5112e8.js +1 -0
- package/dist/esm-es5/{useIndirectTaxForm-a6ac7e7e.js → useIndirectTaxForm-38cd984e.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-1f387c7b.system.js +1 -1
- package/dist/mint-components/p-34179541.system.js +1 -0
- package/dist/mint-components/p-4065ae93.entry.js +9 -0
- package/dist/mint-components/p-5c3bff99.entry.js +1 -0
- package/dist/mint-components/p-6fd8981d.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-8d30945a.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-2d4132fb.js → p-aa2c6585.js} +7 -5
- package/dist/mint-components/{p-6ef373ed.system.js → p-aab8a207.system.js} +2 -2
- package/dist/mint-components/p-af8b8c06.system.entry.js +1 -0
- package/dist/mint-components/{p-86231add.entry.js → p-b3f25c0e.entry.js} +8 -8
- package/dist/mint-components/p-c31966e3.system.entry.js +1 -0
- package/dist/mint-components/p-d463fa82.system.js +1 -0
- package/dist/mint-components/{p-339ce676.entry.js → p-dd5c1db9.entry.js} +11 -11
- 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/sqm-indirect-tax-form/sqm-indirect-tax-form-view.d.ts +1 -0
- package/dist/types/components/tax-and-cash/sqm-indirect-tax-form/useIndirectTaxForm.d.ts +1 -0
- package/dist/types/components/tax-and-cash/sqm-user-info-form/UserInfoFormView.stories.d.ts +1 -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 +2 -0
- package/dist/types/components/tax-and-cash/utils.d.ts +8 -2
- package/docs/docs.docx +0 -0
- package/grapesjs/grapesjs.js +1 -1
- 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-647a2bd5.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-38cd984e.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;
|
|
@@ -2835,6 +2836,14 @@ const IndirectTaxFormView = (props) => {
|
|
|
2835
2836
|
}, {
|
|
2836
2837
|
supportLink: (h("a", { target: "_blank", href: `mailto:advocate-support@impact.com` }, text.supportLink)),
|
|
2837
2838
|
}))),
|
|
2839
|
+
states.isPartnerLegacy && (h("sqm-form-message", { loading: states.loading, type: "info" },
|
|
2840
|
+
h("p", { part: "alert-title" }, text.isPartnerAlertHeader),
|
|
2841
|
+
intl.formatMessage({
|
|
2842
|
+
id: "isPartnerAlertDescription",
|
|
2843
|
+
defaultMessage: text.isPartnerAlertDescription,
|
|
2844
|
+
}, {
|
|
2845
|
+
supportLink: (h("a", { target: "_blank", href: `mailto:advocate-support@impact.com` }, text.supportLink)),
|
|
2846
|
+
}))),
|
|
2838
2847
|
h("div", null,
|
|
2839
2848
|
h("h4", null, text.indirectTaxDetails))),
|
|
2840
2849
|
states.loading ? (h("sl-spinner", { style: { fontSize: "50px", margin: "40px" } })) : (h("div", null,
|
|
@@ -3074,6 +3083,7 @@ function useDemoIndirectTaxForm(props) {
|
|
|
3074
3083
|
disabled: false,
|
|
3075
3084
|
loading: false,
|
|
3076
3085
|
isPartner: false,
|
|
3086
|
+
isPartnerLegacy: false,
|
|
3077
3087
|
loadingError: false,
|
|
3078
3088
|
errors: {},
|
|
3079
3089
|
formState: {
|
|
@@ -4431,7 +4441,7 @@ const GET_INDIRECT_TAX_COUNTRY_CODE = dist.gql `
|
|
|
4431
4441
|
}
|
|
4432
4442
|
`;
|
|
4433
4443
|
function useUserInfoForm(props) {
|
|
4434
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
4444
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s;
|
|
4435
4445
|
const currencyRef = useRef(undefined);
|
|
4436
4446
|
const phoneCountryRef = useRef(undefined);
|
|
4437
4447
|
const formRef = useRef(null);
|
|
@@ -4551,7 +4561,7 @@ function useUserInfoForm(props) {
|
|
|
4551
4561
|
}
|
|
4552
4562
|
}, [currencySearch, currencies]);
|
|
4553
4563
|
async function connectPartner(formData) {
|
|
4554
|
-
var _a, _b, _c, _d;
|
|
4564
|
+
var _a, _b, _c, _d, _e, _f;
|
|
4555
4565
|
const vars = {
|
|
4556
4566
|
user: {
|
|
4557
4567
|
id: user.id,
|
|
@@ -4565,36 +4575,34 @@ function useUserInfoForm(props) {
|
|
|
4565
4575
|
city: formData.city,
|
|
4566
4576
|
state: formData.state,
|
|
4567
4577
|
postalCode: formData.postalCode,
|
|
4568
|
-
phoneNumber: formData.phoneNumber,
|
|
4578
|
+
phoneNumber: toDomesticNumber(formData.phoneNumberCountryCode, formData.phoneNumber),
|
|
4569
4579
|
phoneNumberCountryCode: formData.phoneNumberCountryCode,
|
|
4570
4580
|
};
|
|
4581
|
+
// if user went through early partner creation, connectionStatus === "STARTED"
|
|
4582
|
+
// otherwise trigger legacy partner creation
|
|
4583
|
+
const userData = data === null || data === void 0 ? void 0 : data.user;
|
|
4571
4584
|
let result = null;
|
|
4572
4585
|
let connectionResult;
|
|
4573
|
-
|
|
4574
|
-
|
|
4575
|
-
|
|
4576
|
-
|
|
4577
|
-
|
|
4578
|
-
|
|
4579
|
-
|
|
4580
|
-
|
|
4581
|
-
|
|
4582
|
-
|
|
4583
|
-
|
|
4584
|
-
|
|
4585
|
-
|
|
4586
|
-
// });
|
|
4587
|
-
// connectionResult = (result as ConnectPartnerResult)
|
|
4588
|
-
// ?.createImpactConnection;
|
|
4589
|
-
// }
|
|
4590
|
-
if (!result || ((_b = result) === null || _b === void 0 ? void 0 : _b.message))
|
|
4586
|
+
if (((_a = userData === null || userData === void 0 ? void 0 : userData.impactConnection) === null || _a === void 0 ? void 0 : _a.connectionStatus) === "STARTED") {
|
|
4587
|
+
result = await completeImpactPartner({
|
|
4588
|
+
vars,
|
|
4589
|
+
});
|
|
4590
|
+
connectionResult = (_b = result) === null || _b === void 0 ? void 0 : _b.completeImpactConnection;
|
|
4591
|
+
}
|
|
4592
|
+
else {
|
|
4593
|
+
result = await connectImpactPartner({
|
|
4594
|
+
vars,
|
|
4595
|
+
});
|
|
4596
|
+
connectionResult = (_c = result) === null || _c === void 0 ? void 0 : _c.createImpactConnection;
|
|
4597
|
+
}
|
|
4598
|
+
if (!result || ((_d = result) === null || _d === void 0 ? void 0 : _d.message))
|
|
4591
4599
|
throw new Error();
|
|
4592
4600
|
if (!(connectionResult === null || connectionResult === void 0 ? void 0 : connectionResult.success)) {
|
|
4593
4601
|
console.error("Failed to create Impact connection: ", connectionResult === null || connectionResult === void 0 ? void 0 : connectionResult.validationErrors);
|
|
4594
4602
|
throw new Error();
|
|
4595
4603
|
}
|
|
4596
4604
|
await refetch();
|
|
4597
|
-
const resultPublisher = (
|
|
4605
|
+
const resultPublisher = (_f = (_e = connectionResult === null || connectionResult === void 0 ? void 0 : connectionResult.user) === null || _e === void 0 ? void 0 : _e.impactConnection) === null || _f === void 0 ? void 0 : _f.publisher;
|
|
4598
4606
|
const hasValidCurrentDocument = validTaxDocument(resultPublisher === null || resultPublisher === void 0 ? void 0 : resultPublisher.requiredTaxDocumentType) && (resultPublisher === null || resultPublisher === void 0 ? void 0 : resultPublisher.currentTaxDocument);
|
|
4599
4607
|
// Fire form change event
|
|
4600
4608
|
window.dispatchEvent(new Event(TAX_FORM_UPDATED_EVENT_KEY));
|
|
@@ -4632,12 +4640,13 @@ function useUserInfoForm(props) {
|
|
|
4632
4640
|
return;
|
|
4633
4641
|
}
|
|
4634
4642
|
const { allowBankingCollection, ...userData } = formData;
|
|
4643
|
+
const normalizedPhoneNumber = toDomesticNumber(userData.phoneNumberCountryCode, userData.phoneNumber);
|
|
4635
4644
|
setUserFormContext({
|
|
4636
4645
|
...userFormContext,
|
|
4637
4646
|
firstName: userData.firstName,
|
|
4638
4647
|
lastName: userData.lastName,
|
|
4639
4648
|
phoneNumberCountryCode: userData.phoneNumberCountryCode,
|
|
4640
|
-
phoneNumber:
|
|
4649
|
+
phoneNumber: normalizedPhoneNumber,
|
|
4641
4650
|
countryCode: userData.countryCode,
|
|
4642
4651
|
address: userData.address,
|
|
4643
4652
|
city: userData.city,
|
|
@@ -4648,7 +4657,10 @@ function useUserInfoForm(props) {
|
|
|
4648
4657
|
const skipNextStep = getSkipNextStep(userData);
|
|
4649
4658
|
if (skipNextStep) {
|
|
4650
4659
|
try {
|
|
4651
|
-
const { resultPublisher, hasValidCurrentDocument } = await connectPartner(
|
|
4660
|
+
const { resultPublisher, hasValidCurrentDocument } = await connectPartner({
|
|
4661
|
+
...formData,
|
|
4662
|
+
phoneNumber: normalizedPhoneNumber,
|
|
4663
|
+
});
|
|
4652
4664
|
if ((resultPublisher === null || resultPublisher === void 0 ? void 0 : resultPublisher.requiredTaxDocumentType) &&
|
|
4653
4665
|
!hasValidCurrentDocument) {
|
|
4654
4666
|
// Go to docusign form
|
|
@@ -4724,6 +4736,11 @@ function useUserInfoForm(props) {
|
|
|
4724
4736
|
loading: loading || connectLoading || completeLoading,
|
|
4725
4737
|
isPartner: !!((_g = (_f = data === null || data === void 0 ? void 0 : data.user) === null || _f === void 0 ? void 0 : _f.impactConnection) === null || _g === void 0 ? void 0 : _g.publisher),
|
|
4726
4738
|
isUser: !!((_j = (_h = data === null || data === void 0 ? void 0 : data.user) === null || _h === void 0 ? void 0 : _h.impactConnection) === null || _j === void 0 ? void 0 : _j.user),
|
|
4739
|
+
// Show banner when pre-existing partner is created with legacy mutation createImpactConnection
|
|
4740
|
+
isUserLegacy: !!((_l = (_k = data === null || data === void 0 ? void 0 : data.user) === null || _k === void 0 ? void 0 : _k.impactConnection) === null || _l === void 0 ? void 0 : _l.user) &&
|
|
4741
|
+
((_o = (_m = data === null || data === void 0 ? void 0 : data.user) === null || _m === void 0 ? void 0 : _m.impactConnection) === null || _o === void 0 ? void 0 : _o.connectionStatus) !== "STARTED",
|
|
4742
|
+
isPartnerLegacy: !!((_q = (_p = data === null || data === void 0 ? void 0 : data.user) === null || _p === void 0 ? void 0 : _p.impactConnection) === null || _q === void 0 ? void 0 : _q.publisher) &&
|
|
4743
|
+
((_s = (_r = data === null || data === void 0 ? void 0 : data.user) === null || _r === void 0 ? void 0 : _r.impactConnection) === null || _s === void 0 ? void 0 : _s.connectionStatus) !== "STARTED",
|
|
4727
4744
|
formState: {
|
|
4728
4745
|
...userFormContext,
|
|
4729
4746
|
errors: formErrors,
|
|
@@ -4941,6 +4958,8 @@ function useDemoUserInfoForm(props) {
|
|
|
4941
4958
|
loading: false,
|
|
4942
4959
|
isPartner: false,
|
|
4943
4960
|
isUser: false,
|
|
4961
|
+
isPartnerLegacy: false,
|
|
4962
|
+
isUserLegacy: false,
|
|
4944
4963
|
loadingError: false,
|
|
4945
4964
|
formState: {
|
|
4946
4965
|
errors: {
|
|
@@ -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-38cd984e.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-647a2bd5.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';
|
|
@@ -16698,6 +16699,8 @@ const stepOneProps = {
|
|
|
16698
16699
|
disabled: false,
|
|
16699
16700
|
isPartner: false,
|
|
16700
16701
|
isUser: false,
|
|
16702
|
+
isPartnerLegacy: false,
|
|
16703
|
+
isUserLegacy: false,
|
|
16701
16704
|
loadingError: false,
|
|
16702
16705
|
formState: {
|
|
16703
16706
|
firstName: "Bob",
|
|
@@ -16818,6 +16821,7 @@ const stepTwoProps = {
|
|
|
16818
16821
|
disabled: false,
|
|
16819
16822
|
loading: false,
|
|
16820
16823
|
isPartner: false,
|
|
16824
|
+
isPartnerLegacy: false,
|
|
16821
16825
|
loadingError: false,
|
|
16822
16826
|
formState: {
|
|
16823
16827
|
checked: undefined,
|
|
@@ -18879,6 +18883,11 @@ const mockCountries = [
|
|
|
18879
18883
|
{ countryCode: "DE", displayName: "Germany" },
|
|
18880
18884
|
{ countryCode: "FR", displayName: "France" },
|
|
18881
18885
|
{ countryCode: "ES", displayName: "Spain" },
|
|
18886
|
+
// Show handling of long country names
|
|
18887
|
+
{
|
|
18888
|
+
countryCode: "CD",
|
|
18889
|
+
displayName: "Congo, The Democratic Republic of the Congo",
|
|
18890
|
+
},
|
|
18882
18891
|
];
|
|
18883
18892
|
const mockCurrencies = [
|
|
18884
18893
|
{ currencyCode: "USD", displayName: "US Dollar" },
|
|
@@ -18969,6 +18978,8 @@ const baseProps = {
|
|
|
18969
18978
|
loading: false,
|
|
18970
18979
|
isPartner: false,
|
|
18971
18980
|
isUser: false,
|
|
18981
|
+
isPartnerLegacy: false,
|
|
18982
|
+
isUserLegacy: false,
|
|
18972
18983
|
formState: {
|
|
18973
18984
|
firstName: "",
|
|
18974
18985
|
lastName: "",
|
|
@@ -19081,6 +19092,7 @@ const PartnerAccount = () => {
|
|
|
19081
19092
|
return (h(UserInfoFormView$1, Object.assign({}, baseProps, { states: {
|
|
19082
19093
|
...baseProps.states,
|
|
19083
19094
|
isPartner: true,
|
|
19095
|
+
isPartnerLegacy: true,
|
|
19084
19096
|
formState: {
|
|
19085
19097
|
...baseProps.states.formState,
|
|
19086
19098
|
firstName: "Jane",
|
|
@@ -19100,10 +19112,53 @@ const PartnerAccount = () => {
|
|
|
19100
19112
|
partnerData: mockPartnerData,
|
|
19101
19113
|
} })));
|
|
19102
19114
|
};
|
|
19115
|
+
// Early partner created via <sqm-partner-info-modal>: connectionStatus is "STARTED",
|
|
19116
|
+
// publisher has only countryCode + currency populated. Banner must NOT show; only
|
|
19117
|
+
// country + currency disabled; firstName/lastName disabled via userData; everything
|
|
19118
|
+
// else (phone, address, city, state, postalCode) stays editable.
|
|
19119
|
+
const EarlyPartnerFromModal = () => {
|
|
19120
|
+
return (h(UserInfoFormView$1, Object.assign({}, baseProps, { states: {
|
|
19121
|
+
...baseProps.states,
|
|
19122
|
+
isPartner: true,
|
|
19123
|
+
isUser: true,
|
|
19124
|
+
isPartnerLegacy: false,
|
|
19125
|
+
isUserLegacy: false,
|
|
19126
|
+
formState: {
|
|
19127
|
+
...baseProps.states.formState,
|
|
19128
|
+
firstName: "Jane",
|
|
19129
|
+
lastName: "Smith",
|
|
19130
|
+
email: "jane.smith@example.com",
|
|
19131
|
+
countryCode: "US",
|
|
19132
|
+
currency: "USD",
|
|
19133
|
+
phoneNumberCountryCode: undefined,
|
|
19134
|
+
phoneNumber: undefined,
|
|
19135
|
+
address: undefined,
|
|
19136
|
+
city: undefined,
|
|
19137
|
+
state: undefined,
|
|
19138
|
+
postalCode: undefined,
|
|
19139
|
+
},
|
|
19140
|
+
}, data: {
|
|
19141
|
+
...baseProps.data,
|
|
19142
|
+
partnerData: {
|
|
19143
|
+
...mockPartnerData,
|
|
19144
|
+
billingAddress: undefined,
|
|
19145
|
+
billingCity: undefined,
|
|
19146
|
+
billingState: undefined,
|
|
19147
|
+
billingPostalCode: undefined,
|
|
19148
|
+
phoneNumber: undefined,
|
|
19149
|
+
phoneNumberCountryCode: undefined,
|
|
19150
|
+
},
|
|
19151
|
+
userData: {
|
|
19152
|
+
firstName: "Jane",
|
|
19153
|
+
lastName: "Smith",
|
|
19154
|
+
},
|
|
19155
|
+
} })));
|
|
19156
|
+
};
|
|
19103
19157
|
const UserAccount = () => {
|
|
19104
19158
|
return (h(UserInfoFormView$1, Object.assign({}, baseProps, { states: {
|
|
19105
19159
|
...baseProps.states,
|
|
19106
19160
|
isUser: true,
|
|
19161
|
+
isUserLegacy: true,
|
|
19107
19162
|
formState: {
|
|
19108
19163
|
...baseProps.states.formState,
|
|
19109
19164
|
firstName: "Bob",
|
|
@@ -19122,6 +19177,7 @@ const UserAccountMissingLastName = () => {
|
|
|
19122
19177
|
return (h(UserInfoFormView$1, Object.assign({}, baseProps, { states: {
|
|
19123
19178
|
...baseProps.states,
|
|
19124
19179
|
isUser: true,
|
|
19180
|
+
isUserLegacy: true,
|
|
19125
19181
|
formState: {
|
|
19126
19182
|
...baseProps.states.formState,
|
|
19127
19183
|
firstName: "Bob",
|
|
@@ -19201,6 +19257,7 @@ const UserInfoFormView = /*#__PURE__*/Object.freeze({
|
|
|
19201
19257
|
WithValidationErrors: WithValidationErrors,
|
|
19202
19258
|
WithGeneralError: WithGeneralError,
|
|
19203
19259
|
PartnerAccount: PartnerAccount,
|
|
19260
|
+
EarlyPartnerFromModal: EarlyPartnerFromModal,
|
|
19204
19261
|
UserAccount: UserAccount,
|
|
19205
19262
|
UserAccountMissingLastName: UserAccountMissingLastName,
|
|
19206
19263
|
CanadianAddress: CanadianAddress,
|