@saasquatch/mint-components 2.1.11-0 → 2.2.0-1
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/{keys-cff24974.js → keys-5a2c9ed2.js} +4 -0
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/mint-components.cjs.js +1 -1
- package/dist/cjs/sqm-banking-info-form_10.cjs.entry.js +12 -16
- package/dist/cjs/sqm-big-stat_46.cjs.entry.js +22 -26
- package/dist/cjs/sqm-code-verification.cjs.entry.js +1 -1
- package/dist/cjs/sqm-email-verification_2.cjs.entry.js +14 -35
- package/dist/cjs/{sqm-partner-info-modal-view-464c52c9.js → sqm-partner-info-modal-view-431ff976.js} +20 -12
- package/dist/cjs/sqm-stencilbook.cjs.entry.js +17 -7
- package/dist/cjs/{sqm-user-info-form-view-01bf2f41.js → sqm-user-info-form-view-f1127a60.js} +2 -2
- package/dist/cjs/sqm-widget-verification-controller.cjs.entry.js +1 -1
- package/dist/collection/components/sqm-partner-info-modal/PartnerInfoModal.stories.js +14 -4
- package/dist/collection/components/sqm-partner-info-modal/sqm-partner-info-modal-view.js +20 -12
- package/dist/collection/components/sqm-partner-info-modal/sqm-partner-info-modal.js +1 -30
- package/dist/collection/components/sqm-partner-info-modal/usePartnerInfoModal.js +13 -26
- package/dist/collection/components/sqm-widget-verification/keys.js +2 -0
- package/dist/collection/components/sqm-widget-verification/sqm-widget-verification.js +0 -59
- package/dist/collection/components/sqm-widget-verification/useWidgetVerification.js +23 -10
- package/dist/collection/components/tax-and-cash/sqm-indirect-tax-form/useIndirectTaxForm.js +5 -4
- package/dist/collection/components/tax-and-cash/sqm-tax-and-cash/sqm-tax-and-cash.js +1 -30
- package/dist/collection/components/tax-and-cash/sqm-tax-and-cash/useTaxAndCash.js +0 -1
- package/dist/collection/components/tax-and-cash/sqm-user-info-form/UserInfoFormView.stories.js +0 -1
- package/dist/collection/components/tax-and-cash/sqm-user-info-form/sqm-user-info-form-view.js +2 -2
- package/dist/collection/components/tax-and-cash/sqm-user-info-form/sqm-user-info-form.js +0 -25
- package/dist/collection/components/tax-and-cash/sqm-user-info-form/useUserInfoForm.js +5 -6
- package/dist/esm/keys-d7c5c851.js +8 -0
- package/dist/esm/loader.js +1 -1
- package/dist/esm/mint-components.js +1 -1
- package/dist/esm/sqm-banking-info-form_10.entry.js +12 -16
- package/dist/esm/sqm-big-stat_46.entry.js +22 -26
- package/dist/esm/sqm-code-verification.entry.js +1 -1
- package/dist/esm/sqm-email-verification_2.entry.js +14 -35
- package/dist/esm/{sqm-partner-info-modal-view-a6324934.js → sqm-partner-info-modal-view-b3c33bc3.js} +20 -12
- package/dist/esm/sqm-stencilbook.entry.js +17 -7
- package/dist/esm/{sqm-user-info-form-view-365cef98.js → sqm-user-info-form-view-e732dc4d.js} +2 -2
- package/dist/esm/sqm-widget-verification-controller.entry.js +1 -1
- package/dist/esm-es5/keys-d7c5c851.js +1 -0
- package/dist/esm-es5/loader.js +1 -1
- package/dist/esm-es5/mint-components.js +1 -1
- package/dist/esm-es5/sqm-banking-info-form_10.entry.js +1 -1
- package/dist/esm-es5/sqm-big-stat_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-b3c33bc3.js +1 -0
- package/dist/esm-es5/sqm-stencilbook.entry.js +1 -1
- package/dist/esm-es5/{sqm-user-info-form-view-365cef98.js → sqm-user-info-form-view-e732dc4d.js} +1 -1
- package/dist/esm-es5/sqm-widget-verification-controller.entry.js +1 -1
- package/dist/mint-components/mint-components.esm.js +1 -1
- package/dist/mint-components/{p-f9671d6a.system.entry.js → p-0b2a428f.system.entry.js} +1 -1
- package/dist/mint-components/p-16416781.system.entry.js +1 -0
- package/dist/mint-components/p-1bff74c0.js +1 -0
- package/dist/mint-components/p-1c413a06.system.js +1 -1
- package/dist/mint-components/{p-2d3a12f2.entry.js → p-36b91873.entry.js} +2 -2
- package/dist/mint-components/{p-038d0b8f.entry.js → p-440d3788.entry.js} +3 -3
- package/dist/mint-components/p-4c47beb0.system.js +1 -0
- package/dist/mint-components/{p-647933ac.entry.js → p-63102c04.entry.js} +7 -13
- package/dist/mint-components/p-6d15ce09.system.entry.js +1 -0
- package/dist/mint-components/{p-a0986077.system.entry.js → p-70a90ad8.system.entry.js} +1 -1
- package/dist/mint-components/{p-aa319fbe.entry.js → p-7a744cb2.entry.js} +2 -2
- package/dist/mint-components/p-837c4cf8.js +1 -0
- package/dist/mint-components/p-987a54e2.system.js +1 -0
- package/dist/mint-components/{p-88c9cc1b.entry.js → p-a67f2ccf.entry.js} +1 -1
- package/dist/mint-components/{p-64041ee1.entry.js → p-d43c728e.entry.js} +22 -22
- package/dist/mint-components/{p-52eca331.js → p-dd5d8095.js} +1 -1
- package/dist/mint-components/{p-6194855b.system.entry.js → p-ecdbe09b.system.entry.js} +1 -1
- package/dist/mint-components/{p-a2db4345.system.js → p-ed3ae5ba.system.js} +1 -1
- package/dist/mint-components/{p-037c1a4f.system.entry.js → p-fe944f94.system.entry.js} +1 -1
- package/dist/types/components/sqm-partner-info-modal/PartnerInfoModal.stories.d.ts +1 -0
- package/dist/types/components/sqm-partner-info-modal/sqm-partner-info-modal-view.d.ts +0 -2
- package/dist/types/components/sqm-partner-info-modal/sqm-partner-info-modal.d.ts +0 -6
- package/dist/types/components/sqm-widget-verification/keys.d.ts +2 -0
- package/dist/types/components/sqm-widget-verification/sqm-widget-verification.d.ts +0 -10
- package/dist/types/components/tax-and-cash/sqm-tax-and-cash/sqm-tax-and-cash.d.ts +0 -5
- package/dist/types/components/tax-and-cash/sqm-user-info-form/sqm-user-info-form-view.d.ts +0 -1
- package/dist/types/components/tax-and-cash/sqm-user-info-form/sqm-user-info-form.d.ts +0 -4
- package/dist/types/components.d.ts +0 -48
- package/docs/docs.docx +0 -0
- package/docs/raisins.json +1 -1
- package/grapesjs/grapesjs.js +1 -1
- package/package.json +1 -1
- package/dist/esm/keys-db1897ae.js +0 -6
- package/dist/esm-es5/keys-db1897ae.js +0 -1
- package/dist/esm-es5/sqm-partner-info-modal-view-a6324934.js +0 -1
- package/dist/mint-components/p-1e35f151.system.js +0 -1
- package/dist/mint-components/p-39840341.js +0 -1
- package/dist/mint-components/p-6562cbec.system.entry.js +0 -1
- package/dist/mint-components/p-7d5956ec.system.entry.js +0 -1
- package/dist/mint-components/p-a1e1c42a.js +0 -1
- package/dist/mint-components/p-b2a99637.system.js +0 -1
|
@@ -27,7 +27,7 @@ import { u as useDemoBigStat, V as useBigStat, B as BigStatView, C as CardFeedVi
|
|
|
27
27
|
import './sqm-portal-container-view-a8c708cd.js';
|
|
28
28
|
import { g as getCountryObj, L as LoadingView } from './utils-8267d3d8.js';
|
|
29
29
|
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-33c16dff.js';
|
|
30
|
-
import { S as SHOW_CODE_NAMESPACE, a as
|
|
30
|
+
import { S as SHOW_CODE_NAMESPACE, a as SHOW_PARTNER_MODAL_NAMESPACE, P as PARTNER_CREATED_NAMESPACE, V as VERIFICATION_PARENT_NAMESPACE, b as VERIFICATION_EMAIL_NAMESPACE } from './keys-d7c5c851.js';
|
|
31
31
|
import './eventKeys-f76b6a03.js';
|
|
32
32
|
import { u as usePayoutStatus } from './usePayoutStatus-fa504d49.js';
|
|
33
33
|
import { p as parseStates } from './parseStates-ed75e224.js';
|
|
@@ -6415,7 +6415,6 @@ function getCurrentStep(user) {
|
|
|
6415
6415
|
return "/1";
|
|
6416
6416
|
}
|
|
6417
6417
|
const { requiredTaxDocumentType, currentTaxDocument, withdrawalSettings, brandedSignup, payoutsAccount, } = user.impactConnection.publisher;
|
|
6418
|
-
console.log(user.impactConnection, "publisher data in useTaxAndCash to determine step new new");
|
|
6419
6418
|
if (user.impactConnection.connectionStatus === "STARTED") {
|
|
6420
6419
|
return "/1";
|
|
6421
6420
|
}
|
|
@@ -6647,11 +6646,6 @@ const TaxAndCashMonolith = class {
|
|
|
6647
6646
|
* @uiGroup Step 1 Properties
|
|
6648
6647
|
*/
|
|
6649
6648
|
this.step1_currency = "Currency";
|
|
6650
|
-
/**
|
|
6651
|
-
* @uiName Currency field help text
|
|
6652
|
-
* @uiGroup Step 1 Properties
|
|
6653
|
-
*/
|
|
6654
|
-
this.step1_currencyHelpText = "Choose your preferred payout currency";
|
|
6655
6649
|
/**
|
|
6656
6650
|
* Edit the property called terms and conditions text to change what's displayed for {termsAndConditionsLink}.
|
|
6657
6651
|
* @uiName Terms and conditions checkbox
|
|
@@ -7971,18 +7965,20 @@ const USER_LOOKUP = dist.gql `
|
|
|
7971
7965
|
}
|
|
7972
7966
|
`;
|
|
7973
7967
|
function useWidgetVerification() {
|
|
7974
|
-
const
|
|
7975
|
-
const [showCode, setShowCode] = In({
|
|
7968
|
+
const [showCode] = In({
|
|
7976
7969
|
namespace: SHOW_CODE_NAMESPACE,
|
|
7977
7970
|
initialValue: false,
|
|
7978
7971
|
});
|
|
7979
|
-
const [email, setEmail] = In({
|
|
7980
|
-
namespace: VERIFICATION_EMAIL_NAMESPACE,
|
|
7981
|
-
initialValue: userIdentity === null || userIdentity === void 0 ? void 0 : userIdentity.email,
|
|
7982
|
-
});
|
|
7983
7972
|
const setContext = En(VERIFICATION_PARENT_NAMESPACE);
|
|
7984
7973
|
const [loading, setLoading] = useState(true);
|
|
7985
|
-
const [showPartnerModal, setShowPartnerModal] =
|
|
7974
|
+
const [showPartnerModal, setShowPartnerModal] = In({
|
|
7975
|
+
namespace: SHOW_PARTNER_MODAL_NAMESPACE,
|
|
7976
|
+
initialValue: false,
|
|
7977
|
+
});
|
|
7978
|
+
const [partnerCreated, setPartnerCreated] = In({
|
|
7979
|
+
namespace: PARTNER_CREATED_NAMESPACE,
|
|
7980
|
+
initialValue: false,
|
|
7981
|
+
});
|
|
7986
7982
|
const [fetch] = Xe(USER_LOOKUP);
|
|
7987
7983
|
useEffect(() => {
|
|
7988
7984
|
const checkUser = async () => {
|
|
@@ -8017,9 +8013,20 @@ function useWidgetVerification() {
|
|
|
8017
8013
|
};
|
|
8018
8014
|
const onPartnerModalComplete = () => {
|
|
8019
8015
|
setShowPartnerModal(false);
|
|
8016
|
+
setPartnerCreated(false);
|
|
8020
8017
|
setContext(true);
|
|
8021
8018
|
};
|
|
8022
|
-
|
|
8019
|
+
useEffect(() => {
|
|
8020
|
+
if (partnerCreated)
|
|
8021
|
+
onPartnerModalComplete();
|
|
8022
|
+
}, [partnerCreated]);
|
|
8023
|
+
return {
|
|
8024
|
+
showCode,
|
|
8025
|
+
showPartnerModal,
|
|
8026
|
+
onVerification,
|
|
8027
|
+
onPartnerModalComplete,
|
|
8028
|
+
loading,
|
|
8029
|
+
};
|
|
8023
8030
|
}
|
|
8024
8031
|
|
|
8025
8032
|
const style$3 = {
|
|
@@ -8062,16 +8069,6 @@ const WidgetVerification = class {
|
|
|
8062
8069
|
* @uiGroup General Text
|
|
8063
8070
|
*/
|
|
8064
8071
|
this.general_widgetHeaderWithPartnerCreation = "Let's get you ready for rewards";
|
|
8065
|
-
/**
|
|
8066
|
-
* @uiName General verify widget header text
|
|
8067
|
-
* @uiGroup General Text
|
|
8068
|
-
*/
|
|
8069
|
-
this.general_verifyEmailHeader = "Verify your email";
|
|
8070
|
-
/**
|
|
8071
|
-
* @uiName General verify widget description text
|
|
8072
|
-
* @uiGroup General Text
|
|
8073
|
-
*/
|
|
8074
|
-
this.general_verifyEmailDescription = "To get your cash paid out directly to your bank account, please complete your account setup";
|
|
8075
8072
|
/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
8076
8073
|
EMAIL STEP PROPS
|
|
8077
8074
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
|
|
@@ -8256,7 +8253,6 @@ const WidgetVerification = class {
|
|
|
8256
8253
|
if (props.showPartnerModal && ((_a = partnerState === null || partnerState === void 0 ? void 0 : partnerState.states) === null || _a === void 0 ? void 0 : _a.open) === false) {
|
|
8257
8254
|
return h$1("div", null);
|
|
8258
8255
|
}
|
|
8259
|
-
// const generalText = this.getStepTextProps("general_");
|
|
8260
8256
|
const partnerText = this.getStepTextProps("createPartnerStep_");
|
|
8261
8257
|
const dialogLabel = this.general_widgetHeaderWithPartnerCreation;
|
|
8262
8258
|
const renderStepContent = () => {
|
|
@@ -7,7 +7,7 @@ import { g as getProps } from './utils-334c1e34.js';
|
|
|
7
7
|
import { c as createStyleSheet } from './JSS-67b5cff8.js';
|
|
8
8
|
import { E as ErrorStyles } from './mixins-f750863a.js';
|
|
9
9
|
import { T as TextSpanView } from './sqm-text-span-view-4db9e33f.js';
|
|
10
|
-
import {
|
|
10
|
+
import { b as VERIFICATION_EMAIL_NAMESPACE, S as SHOW_CODE_NAMESPACE, V as VERIFICATION_PARENT_NAMESPACE } from './keys-d7c5c851.js';
|
|
11
11
|
import { u as useVerificationEmail } from './useVerificationEmail-cb3d51e3.js';
|
|
12
12
|
|
|
13
13
|
const style = {
|
|
@@ -7,8 +7,8 @@ import { g as getProps } from './utils-334c1e34.js';
|
|
|
7
7
|
import { c as createStyleSheet } from './JSS-67b5cff8.js';
|
|
8
8
|
import { T as TextSpanView } from './sqm-text-span-view-4db9e33f.js';
|
|
9
9
|
import { g as GET_FINANCE_NETWORK_SETTINGS } from './data-33c16dff.js';
|
|
10
|
-
import { a as PartnerInfoModalContentView, P as PartnerInfoModalView } from './sqm-partner-info-modal-view-
|
|
11
|
-
import { S as SHOW_CODE_NAMESPACE,
|
|
10
|
+
import { a as PartnerInfoModalContentView, P as PartnerInfoModalView } from './sqm-partner-info-modal-view-b3c33bc3.js';
|
|
11
|
+
import { S as SHOW_CODE_NAMESPACE, b as VERIFICATION_EMAIL_NAMESPACE, P as PARTNER_CREATED_NAMESPACE } from './keys-d7c5c851.js';
|
|
12
12
|
import { T as TAX_FORM_UPDATED_EVENT_KEY } from './eventKeys-f76b6a03.js';
|
|
13
13
|
import { p as parseStates } from './parseStates-ed75e224.js';
|
|
14
14
|
import { u as useVerificationEmail } from './useVerificationEmail-cb3d51e3.js';
|
|
@@ -413,7 +413,6 @@ function useDemoWidgetEmailVerification(props) {
|
|
|
413
413
|
}, props.demoData || {}, { arrayMerge: (_, a) => a });
|
|
414
414
|
}
|
|
415
415
|
|
|
416
|
-
// new field under impactConnection:{ resolvedByEmail: boolean } - determines if connection came from managed identity
|
|
417
416
|
const GET_USER_PARTNER_INFO = dist.gql `
|
|
418
417
|
query getUserPartnerInfo {
|
|
419
418
|
user: viewer {
|
|
@@ -510,30 +509,22 @@ const START_IMPACT_CONNECTION = dist.gql `
|
|
|
510
509
|
}
|
|
511
510
|
}
|
|
512
511
|
`;
|
|
513
|
-
const GET_BRAND_NAME = dist.gql `
|
|
514
|
-
query getTenantSettings {
|
|
515
|
-
tenantSettings {
|
|
516
|
-
companyName
|
|
517
|
-
}
|
|
518
|
-
}
|
|
519
|
-
`;
|
|
520
512
|
function usePartnerInfoModal(props) {
|
|
521
|
-
var _a, _b, _c, _d, _e, _f
|
|
513
|
+
var _a, _b, _c, _d, _e, _f;
|
|
522
514
|
const locale = L();
|
|
523
|
-
const
|
|
515
|
+
const setPartnerCreated = En(PARTNER_CREATED_NAMESPACE);
|
|
524
516
|
const { data: userData, loading: userLoading, refetch, } = wn(GET_USER_PARTNER_INFO, {});
|
|
525
517
|
const user = userData === null || userData === void 0 ? void 0 : userData.user;
|
|
526
518
|
const { data: currenciesData, loading: currenciesLoading } = wn(GET_CURRENCIES, { variables: { locale } });
|
|
527
519
|
const { data: countriesData, loading: countriesLoading } = wn(GET_COUNTRIES, {});
|
|
528
|
-
const { data: tenantSettingsData } = wn(GET_BRAND_NAME, {});
|
|
529
520
|
const { data: financeNetworkData } = wn(GET_FINANCE_NETWORK_SETTINGS, {
|
|
530
521
|
variables: { filter: {} },
|
|
531
522
|
});
|
|
532
|
-
const [startImpactConnection, { loading: connectLoading
|
|
523
|
+
const [startImpactConnection, { loading: connectLoading }] = $e(START_IMPACT_CONNECTION);
|
|
533
524
|
const [allowBankingCollection, setAllowBankingCollection] = useState(false);
|
|
534
|
-
const [checkboxError, setCheckboxError] = useState("");
|
|
535
525
|
// No pre-filled country, use locale to determine countryCode instead
|
|
536
|
-
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) ||
|
|
526
|
+
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) ||
|
|
527
|
+
locale.replace(/^.*_/, ""));
|
|
537
528
|
const [currency, setCurrency] = useState(((_d = (_c = user === null || user === void 0 ? void 0 : user.impactConnection) === null || _c === void 0 ? void 0 : _c.publisher) === null || _d === void 0 ? void 0 : _d.currency) || "");
|
|
538
529
|
const countries = ((_e = countriesData === null || countriesData === void 0 ? void 0 : countriesData.impactPayoutCountries) === null || _e === void 0 ? void 0 : _e.data) || [];
|
|
539
530
|
// copied from useTaxAndCash for displaying currencies based on country - could be in helper?
|
|
@@ -607,13 +598,11 @@ function usePartnerInfoModal(props) {
|
|
|
607
598
|
function onCheckboxChange(e) {
|
|
608
599
|
const checked = e.target.checked;
|
|
609
600
|
setAllowBankingCollection(checked);
|
|
610
|
-
if (checked)
|
|
611
|
-
setCheckboxError("");
|
|
612
601
|
}
|
|
613
602
|
async function onSubmit() {
|
|
614
603
|
var _a, _b;
|
|
615
604
|
if (!allowBankingCollection) {
|
|
616
|
-
|
|
605
|
+
setError(props.missingFieldsErrorText);
|
|
617
606
|
return;
|
|
618
607
|
}
|
|
619
608
|
if (!countryCode || !currency) {
|
|
@@ -621,7 +610,10 @@ function usePartnerInfoModal(props) {
|
|
|
621
610
|
return;
|
|
622
611
|
}
|
|
623
612
|
setError("");
|
|
624
|
-
|
|
613
|
+
if (!user) {
|
|
614
|
+
setError(props.networkErrorText);
|
|
615
|
+
return;
|
|
616
|
+
}
|
|
625
617
|
try {
|
|
626
618
|
const vars = {
|
|
627
619
|
user: {
|
|
@@ -630,8 +622,6 @@ function usePartnerInfoModal(props) {
|
|
|
630
622
|
},
|
|
631
623
|
firstName: user.firstName,
|
|
632
624
|
lastName: user.lastName,
|
|
633
|
-
// phoneNumber: null,
|
|
634
|
-
// phoneNumberCountryCode: null,
|
|
635
625
|
countryCode,
|
|
636
626
|
currency,
|
|
637
627
|
};
|
|
@@ -642,7 +632,6 @@ function usePartnerInfoModal(props) {
|
|
|
642
632
|
}
|
|
643
633
|
const connectionResult = result
|
|
644
634
|
.startImpactConnection;
|
|
645
|
-
console.log(result, connectionResult, "result and connectionResult from creating partner from modal");
|
|
646
635
|
if (!(connectionResult === null || connectionResult === void 0 ? void 0 : connectionResult.success)) {
|
|
647
636
|
const validationMsg = (_b = connectionResult === null || connectionResult === void 0 ? void 0 : connectionResult.validationErrors) === null || _b === void 0 ? void 0 : _b.map((e) => e.message).join(". ");
|
|
648
637
|
setError(validationMsg || props.networkErrorText);
|
|
@@ -651,8 +640,8 @@ function usePartnerInfoModal(props) {
|
|
|
651
640
|
}
|
|
652
641
|
window.dispatchEvent(new Event(TAX_FORM_UPDATED_EVENT_KEY));
|
|
653
642
|
await refetch();
|
|
643
|
+
setPartnerCreated === null || setPartnerCreated === void 0 ? void 0 : setPartnerCreated(true);
|
|
654
644
|
setSuccess(true);
|
|
655
|
-
setVerificationContext(true);
|
|
656
645
|
}
|
|
657
646
|
catch (e) {
|
|
658
647
|
console.error("Partner creation error:", e);
|
|
@@ -667,16 +656,14 @@ function usePartnerInfoModal(props) {
|
|
|
667
656
|
open: showModal,
|
|
668
657
|
loading: userLoading || countriesLoading || currenciesLoading,
|
|
669
658
|
submitting: connectLoading,
|
|
670
|
-
isExistingPartner: impactConnection === null || impactConnection === void 0 ? void 0 : impactConnection.publisher,
|
|
659
|
+
isExistingPartner: !!(impactConnection === null || impactConnection === void 0 ? void 0 : impactConnection.publisher),
|
|
671
660
|
countryCode,
|
|
672
661
|
currency,
|
|
673
662
|
error,
|
|
674
663
|
success,
|
|
675
|
-
brandName: ((_g = tenantSettingsData === null || tenantSettingsData === void 0 ? void 0 : tenantSettingsData.tenantSettings) === null || _g === void 0 ? void 0 : _g.companyName) || "",
|
|
676
664
|
filteredCountries: filteredCountries || [],
|
|
677
665
|
filteredCurrencies: filteredCurrencies || [],
|
|
678
666
|
allowBankingCollection,
|
|
679
|
-
checkboxError,
|
|
680
667
|
disabled: userLoading || connectLoading,
|
|
681
668
|
},
|
|
682
669
|
callbacks: {
|
|
@@ -695,12 +682,6 @@ function usePartnerInfoModal(props) {
|
|
|
695
682
|
const PartnerInfoModal = class {
|
|
696
683
|
constructor(hostRef) {
|
|
697
684
|
registerInstance(this, hostRef);
|
|
698
|
-
/**
|
|
699
|
-
* Brand name shown in the modal header
|
|
700
|
-
*
|
|
701
|
-
* @uiName Brand name
|
|
702
|
-
*/
|
|
703
|
-
this.brandName = "";
|
|
704
685
|
/**
|
|
705
686
|
* Header text when user has no existing partner
|
|
706
687
|
*
|
|
@@ -824,7 +805,6 @@ function useDemoPartnerInfoModal(props) {
|
|
|
824
805
|
// @ts-ignore
|
|
825
806
|
return cjs({
|
|
826
807
|
states: {
|
|
827
|
-
brandName: "Test Brand",
|
|
828
808
|
open: false,
|
|
829
809
|
loading: false,
|
|
830
810
|
submitting: false,
|
|
@@ -836,7 +816,6 @@ function useDemoPartnerInfoModal(props) {
|
|
|
836
816
|
filteredCountries: [],
|
|
837
817
|
filteredCurrencies: [],
|
|
838
818
|
allowBankingCollection,
|
|
839
|
-
checkboxError: "",
|
|
840
819
|
disabled: false,
|
|
841
820
|
},
|
|
842
821
|
callbacks: {
|
package/dist/esm/{sqm-partner-info-modal-view-a6324934.js → sqm-partner-info-modal-view-b3c33bc3.js}
RENAMED
|
@@ -29,8 +29,6 @@ const style = {
|
|
|
29
29
|
marginTop: "var(--sl-spacing-large)",
|
|
30
30
|
},
|
|
31
31
|
ErrorMessage: {
|
|
32
|
-
color: "var(--sqm-danger-color-text, #d32f2f)",
|
|
33
|
-
fontSize: "var(--sl-font-size-small)",
|
|
34
32
|
marginTop: "var(--sl-spacing-x-small)",
|
|
35
33
|
},
|
|
36
34
|
SearchInput: {
|
|
@@ -40,6 +38,9 @@ const style = {
|
|
|
40
38
|
borderRadius: "0",
|
|
41
39
|
},
|
|
42
40
|
},
|
|
41
|
+
SelectMenu: {
|
|
42
|
+
maxHeight: "300px",
|
|
43
|
+
},
|
|
43
44
|
DescriptionContainer: {
|
|
44
45
|
display: "flex",
|
|
45
46
|
flexDirection: "column",
|
|
@@ -54,6 +55,11 @@ const style = {
|
|
|
54
55
|
justifyContent: "flex-start",
|
|
55
56
|
flexDirection: "column",
|
|
56
57
|
},
|
|
58
|
+
Checkbox: {
|
|
59
|
+
"&::part(label)": {
|
|
60
|
+
fontSize: "var(--sl-font-size-small)",
|
|
61
|
+
},
|
|
62
|
+
},
|
|
57
63
|
SubmitButton: {
|
|
58
64
|
width: "100%",
|
|
59
65
|
marginTop: "var(--sl-spacing-large)",
|
|
@@ -82,22 +88,24 @@ function PartnerInfoModalContentView(props) {
|
|
|
82
88
|
styleString),
|
|
83
89
|
h("div", { class: sheet.classes.FormFields },
|
|
84
90
|
description,
|
|
85
|
-
h("sl-select", { exportparts: "label: input-label, base: input-base", label: text.countryLabel, value: states.countryCode, disabled: states.submitting ||
|
|
91
|
+
h("sl-select", { exportparts: "label: input-label, base: input-base, menu: select-menu", label: text.countryLabel, value: states.countryCode, disabled: states.submitting ||
|
|
92
|
+
(!!states.countryCode && states.isExistingPartner), required: true, hoist: true, "onSl-select": callbacks.onCountryChange },
|
|
86
93
|
h("sl-input", { class: sheet.classes.SearchInput, placeholder: text.searchCountryPlaceholder, onKeyDown: (e) => e.stopPropagation(), "onSl-input": (e) => {
|
|
87
94
|
var _a;
|
|
88
95
|
callbacks.setCountrySearch((_a = e.target) === null || _a === void 0 ? void 0 : _a.value);
|
|
89
|
-
} }),
|
|
90
|
-
_a.map((c) => (h("sl-menu-item", { value: c.countryCode }, c.displayName)))),
|
|
91
|
-
h("sl-select", { exportparts: "label: input-label, base: input-base", label: text.currencyLabel, value: states.currency, disabled: states.submitting || !!states.
|
|
92
|
-
h("sl-input", { class: sheet.classes.SearchInput, placeholder: text.searchCurrencyPlaceholder, onKeyDown: (e) => e.stopPropagation(), "onSl-input": (e) => { var _a; return callbacks.setCurrencySearch((_a = e.target) === null || _a === void 0 ? void 0 : _a.value); } }),
|
|
93
|
-
_b.map((c) => (h("sl-menu-item", { value: c.currencyCode },
|
|
96
|
+
} }),
|
|
97
|
+
h("div", { class: sheet.classes.SelectMenu }, (_a = states.filteredCountries) === null || _a === void 0 ? void 0 : _a.map((c) => (h("sl-menu-item", { value: c.countryCode }, c.displayName))))),
|
|
98
|
+
h("sl-select", { exportparts: "label: input-label, base: input-base", label: text.currencyLabel, value: states.currency, disabled: states.submitting || !!states.currency, required: true, hoist: true, "onSl-select": callbacks.onCurrencyChange },
|
|
99
|
+
h("sl-input", { class: sheet.classes.SearchInput, placeholder: text.searchCurrencyPlaceholder, onKeyDown: (e) => e.stopPropagation(), "onSl-input": (e) => { var _a; return callbacks.setCurrencySearch((_a = e.target) === null || _a === void 0 ? void 0 : _a.value); } }),
|
|
100
|
+
h("div", { class: sheet.classes.SelectMenu }, (_b = states.filteredCurrencies) === null || _b === void 0 ? void 0 : _b.map((c) => (h("sl-menu-item", { value: c.currencyCode },
|
|
94
101
|
c.currencyCode,
|
|
95
102
|
" - ",
|
|
96
|
-
c.displayName)))),
|
|
103
|
+
c.displayName))))),
|
|
97
104
|
h("div", { class: sheet.classes.CheckboxWrapper },
|
|
98
|
-
h("sl-checkbox", { checked: states.allowBankingCollection === true, "onSl-change": callbacks.onCheckboxChange, disabled: states.submitting, required: true, value: states.allowBankingCollection, id: "allowBankingCollection", name: "/allowBankingCollection" }, bankingCollectionText),
|
|
99
|
-
|
|
100
|
-
|
|
105
|
+
h("sl-checkbox", { class: sheet.classes.Checkbox, checked: states.allowBankingCollection === true, "onSl-change": callbacks.onCheckboxChange, disabled: states.submitting, required: true, value: states.allowBankingCollection, id: "allowBankingCollection", name: "/allowBankingCollection" }, bankingCollectionText))),
|
|
106
|
+
states.error && (h("div", { class: sheet.classes.ErrorMessage },
|
|
107
|
+
h("sqm-form-message", { class: sheet.classes.ErrorMessage, type: "error" },
|
|
108
|
+
h("p", { part: "alert-description" }, states.error)))),
|
|
101
109
|
h("sl-button", { slot: "footer", type: "primary", loading: states.submitting, disabled: states.submitting ||
|
|
102
110
|
!states.countryCode ||
|
|
103
111
|
!states.currency ||
|
|
@@ -31,11 +31,11 @@ import './ErrorView-74cb3af8.js';
|
|
|
31
31
|
import { Q as QrCodeView } from './sqm-qr-code-view-ce476721.js';
|
|
32
32
|
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 useShareLink, K as ProgressBarView, M as ProgressBar$2, O as LeadFormView, Q as LeadDropdownFieldView, U as ShadowViewAddon } from './ShadowViewAddon-78b791d2.js';
|
|
33
33
|
import { P as PortalContainerView, a as PortalSectionView } from './sqm-portal-container-view-a8c708cd.js';
|
|
34
|
-
import { I as InvoiceTableView, a as INDIRECT_TAX_SPAIN_REGIONS, b as INDIRECT_TAX_PROVINCES, O as OtherRegionSlotView, U as UserInfoFormView$1 } from './sqm-user-info-form-view-
|
|
34
|
+
import { I as InvoiceTableView, a as INDIRECT_TAX_SPAIN_REGIONS, b as INDIRECT_TAX_PROVINCES, O as OtherRegionSlotView, U as UserInfoFormView$1 } from './sqm-user-info-form-view-e732dc4d.js';
|
|
35
35
|
import { t as taxTypeToName, L as LoadingView } from './utils-8267d3d8.js';
|
|
36
36
|
import { L as LeadInputFieldView } from './sqm-lead-input-field-view-11a4f9a9.js';
|
|
37
37
|
import './data-33c16dff.js';
|
|
38
|
-
import { P as PartnerInfoModalView } from './sqm-partner-info-modal-view-
|
|
38
|
+
import { P as PartnerInfoModalView } from './sqm-partner-info-modal-view-b3c33bc3.js';
|
|
39
39
|
|
|
40
40
|
/**
|
|
41
41
|
* lodash (Custom Build) <https://lodash.com/>
|
|
@@ -18451,7 +18451,6 @@ const defaultText = {
|
|
|
18451
18451
|
region: "Region",
|
|
18452
18452
|
postalCode: "Postal Code",
|
|
18453
18453
|
currency: "Currency",
|
|
18454
|
-
currencyHelpText: "Select your preferred currency for payouts",
|
|
18455
18454
|
allowBankingCollection: "I agree to the {termsAndConditionsLink}",
|
|
18456
18455
|
personalInformation: "Personal Information",
|
|
18457
18456
|
continueButton: "Continue",
|
|
@@ -18774,15 +18773,13 @@ const defaultProps$y = {
|
|
|
18774
18773
|
loading: false,
|
|
18775
18774
|
submitting: false,
|
|
18776
18775
|
isExistingPartner: false,
|
|
18777
|
-
countryCode:
|
|
18778
|
-
currency:
|
|
18776
|
+
countryCode: null,
|
|
18777
|
+
currency: null,
|
|
18779
18778
|
error: "",
|
|
18780
18779
|
success: false,
|
|
18781
|
-
brandName: "Test Brand",
|
|
18782
18780
|
filteredCountries: demoCountries,
|
|
18783
18781
|
filteredCurrencies: demoCurrencies,
|
|
18784
18782
|
allowBankingCollection: false,
|
|
18785
|
-
checkboxError: "",
|
|
18786
18783
|
disabled: false,
|
|
18787
18784
|
},
|
|
18788
18785
|
callbacks: noopCallbacks,
|
|
@@ -18825,6 +18822,18 @@ const ExistingPartnerConfirm = () => {
|
|
|
18825
18822
|
};
|
|
18826
18823
|
return h(PartnerInfoModalView, Object.assign({}, props));
|
|
18827
18824
|
};
|
|
18825
|
+
const ExistingPartnerEmpty = () => {
|
|
18826
|
+
const props = {
|
|
18827
|
+
...defaultProps$y,
|
|
18828
|
+
states: {
|
|
18829
|
+
...defaultProps$y.states,
|
|
18830
|
+
isExistingPartner: true,
|
|
18831
|
+
countryCode: "",
|
|
18832
|
+
currency: "",
|
|
18833
|
+
},
|
|
18834
|
+
};
|
|
18835
|
+
return h(PartnerInfoModalView, Object.assign({}, props));
|
|
18836
|
+
};
|
|
18828
18837
|
const Submitting = () => {
|
|
18829
18838
|
const props = {
|
|
18830
18839
|
...defaultProps$y,
|
|
@@ -18879,6 +18888,7 @@ const PartnerInfoModal = /*#__PURE__*/Object.freeze({
|
|
|
18879
18888
|
NewPartnerPrefilled: NewPartnerPrefilled,
|
|
18880
18889
|
NewPartnerFullySelected: NewPartnerFullySelected,
|
|
18881
18890
|
ExistingPartnerConfirm: ExistingPartnerConfirm,
|
|
18891
|
+
ExistingPartnerEmpty: ExistingPartnerEmpty,
|
|
18882
18892
|
Submitting: Submitting,
|
|
18883
18893
|
WithError: WithError$3,
|
|
18884
18894
|
ValidationError: ValidationError$1,
|
package/dist/esm/{sqm-user-info-form-view-365cef98.js → sqm-user-info-form-view-e732dc4d.js}
RENAMED
|
@@ -1904,7 +1904,7 @@ const UserInfoFormView = (props) => {
|
|
|
1904
1904
|
default:
|
|
1905
1905
|
regionLabel = text.state;
|
|
1906
1906
|
}
|
|
1907
|
-
// when creating an impact connection without sending phoneNumber data, the impactAPI defaults the value to "
|
|
1907
|
+
// when creating an impact connection without sending phoneNumber data, the impactAPI defaults the value to "0000000" and the phoneNumberCountryCode to "DZ"
|
|
1908
1908
|
function isDisabledPartnerInput(field) {
|
|
1909
1909
|
var _a, _b;
|
|
1910
1910
|
if (((_a = data.partnerData) === null || _a === void 0 ? void 0 : _a.phoneNumber) === "0000000" &&
|
|
@@ -2034,7 +2034,7 @@ const UserInfoFormView = (props) => {
|
|
|
2034
2034
|
helpText: formatErrorMessage(text.postalCode, formState.errors.postalCode),
|
|
2035
2035
|
}
|
|
2036
2036
|
: {}), { required: true })),
|
|
2037
|
-
h("sl-select", Object.assign({ id: "currency", exportparts: "label: input-label, base: input-base", name: "/currency", label: text.currency, menu: true, value: formState.currency, disabled: states.disabled || isDisabledPartnerInput("currency")
|
|
2037
|
+
h("sl-select", Object.assign({ id: "currency", exportparts: "label: input-label, base: input-base", name: "/currency", label: text.currency, menu: true, value: formState.currency, disabled: states.disabled || isDisabledPartnerInput("currency") }, (((_r = formState.errors) === null || _r === void 0 ? void 0 : _r.currency) ? {
|
|
2038
2038
|
class: classes.ErrorInput,
|
|
2039
2039
|
helpText: formatErrorMessage(text.currency, formState.errors.currency),
|
|
2040
2040
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { r as registerInstance, h as h$1, c as Host } from './index-38ad4957.js';
|
|
2
2
|
import { b as browser, n as h, k as useState, f as useEffect } from './dom-context-hooks.module-50442785.js';
|
|
3
3
|
import { I as In, b as useCallback, i as isDemo } from './index.module-cede12c6.js';
|
|
4
|
-
import { V as VERIFICATION_PARENT_NAMESPACE } from './keys-
|
|
4
|
+
import { V as VERIFICATION_PARENT_NAMESPACE } from './keys-d7c5c851.js';
|
|
5
5
|
|
|
6
6
|
const debug = browser("sq:widget-verification");
|
|
7
7
|
function useTemplateChildren({ parent, callback }) {
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var SHOW_CODE_NAMESPACE="sq:code-verification";var SHOW_PARTNER_MODAL_NAMESPACE="sq:show-partner-modal";var PARTNER_CREATED_NAMESPACE="sq:partner-created";var VERIFICATION_EMAIL_NAMESPACE="sq:verification-email";var VERIFICATION_PARENT_NAMESPACE="sq:verification-context";var VERIFICATION_EVENT_KEY="sq:code-verified";export{PARTNER_CREATED_NAMESPACE as P,SHOW_CODE_NAMESPACE as S,VERIFICATION_PARENT_NAMESPACE as V,SHOW_PARTNER_MODAL_NAMESPACE as a,VERIFICATION_EMAIL_NAMESPACE as b,VERIFICATION_EVENT_KEY as c};
|