@saasquatch/mint-components 1.12.0-1 → 1.12.0-11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/{ShadowViewAddon-88821c64.js → ShadowViewAddon-040cffad.js} +6 -3
- package/dist/cjs/extractProps-fd93ba62.js +21 -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_16.cjs.entry.js +92 -78
- package/dist/cjs/sqm-big-stat_39.cjs.entry.js +128 -63
- package/dist/cjs/sqm-code-verification.cjs.entry.js +67 -77
- package/dist/cjs/sqm-email-verification.cjs.entry.js +158 -12
- package/dist/cjs/{sqm-invoice-table-view-ce9a34ac.js → sqm-invoice-table-view-c58966f8.js} +79 -0
- package/dist/cjs/sqm-stencilbook.cjs.entry.js +56 -14
- package/dist/cjs/sqm-widget-verification-internal.cjs.entry.js +81 -11
- package/dist/cjs/sqm-widget-verification.cjs.entry.js +102 -19
- package/dist/cjs/usePayoutStatus-b9fb7399.js +70 -0
- package/dist/cjs/useVerificationEmail-6aacdb71.js +169 -0
- package/dist/collection/collection-manifest.json +1 -1
- package/dist/collection/components/sqm-big-stat/useBigStat.js +6 -3
- package/dist/collection/components/sqm-payout-button-scroll/PayoutButtonScroll.stories.js +1 -2
- package/dist/collection/components/sqm-payout-button-scroll/sqm-payout-button-scroll-view.js +1 -0
- package/dist/collection/components/sqm-payout-button-scroll/sqm-payout-button-scroll.js +16 -3
- package/dist/collection/components/sqm-widget-verification/sqm-code-verification/WidgetCodeVerification.stories.js +9 -2
- package/dist/collection/components/sqm-widget-verification/sqm-code-verification/sqm-code-verification-view.js +20 -10
- package/dist/collection/components/sqm-widget-verification/sqm-code-verification/sqm-code-verification.js +34 -63
- package/dist/collection/components/sqm-widget-verification/sqm-code-verification/useCodeVerification.js +38 -29
- package/dist/collection/components/sqm-widget-verification/sqm-email-verification/WidgetEmailVerification.stories.js +23 -3
- package/dist/collection/components/sqm-widget-verification/sqm-email-verification/sqm-email-verification-view.js +17 -4
- package/dist/collection/components/sqm-widget-verification/sqm-email-verification/sqm-email-verification.js +65 -11
- package/dist/collection/components/sqm-widget-verification/sqm-email-verification/useEmailVerification.js +77 -21
- package/dist/collection/components/sqm-widget-verification/sqm-widget-verification-internal.js +327 -15
- package/dist/collection/components/sqm-widget-verification/sqm-widget-verification.js +447 -22
- package/dist/collection/components/sqm-widget-verification/useVerificationEmail.js +165 -0
- package/dist/collection/components/tax-and-cash/BankingForm.stories.js +1 -0
- package/dist/collection/components/tax-and-cash/TaxForm.stories.js +78 -0
- package/dist/collection/components/tax-and-cash/sqm-banking-info-form/sqm-banking-info-form.js +2 -1
- package/dist/collection/components/tax-and-cash/sqm-banking-info-form/useBankingInfoForm.js +7 -0
- package/dist/collection/components/tax-and-cash/sqm-docusign-form/docusign-iframe/DocusignIframe.js +0 -1
- package/dist/collection/components/tax-and-cash/sqm-payout-status-alert/PayoutStatusAlert.stories.js +10 -0
- package/dist/collection/components/tax-and-cash/sqm-payout-status-alert/sqm-payout-status-alert-view.js +72 -13
- package/dist/collection/components/tax-and-cash/sqm-payout-status-alert/sqm-payout-status-alert.js +146 -9
- package/dist/collection/components/tax-and-cash/sqm-payout-status-alert/usePayoutStatus.js +30 -15
- package/dist/collection/components/tax-and-cash/sqm-tax-and-cash/data.js +6 -0
- package/dist/collection/components/tax-and-cash/sqm-tax-and-cash/sqm-tax-and-cash.js +8 -8
- package/dist/collection/components/tax-and-cash/sqm-tax-and-cash/useTaxAndCash.js +2 -2
- package/dist/collection/components/tax-and-cash/sqm-tax-and-cash-dashboard/sqm-tax-and-cash-dashboard-view.js +22 -16
- package/dist/collection/components/tax-and-cash/sqm-tax-and-cash-dashboard/sqm-tax-and-cash-dashboard.js +99 -88
- package/dist/collection/components/tax-and-cash/sqm-tax-and-cash-dashboard/useTaxAndCashDashboard.js +8 -1
- package/dist/collection/components/tax-and-cash/sqm-user-info-form/sqm-user-info-form-view.js +1 -6
- package/dist/collection/components/tax-and-cash/sqm-user-info-form/useUserInfoForm.js +16 -11
- package/dist/esm/{ShadowViewAddon-65c8679e.js → ShadowViewAddon-69b61037.js} +6 -3
- package/dist/esm/extractProps-ae1afbb3.js +19 -0
- package/dist/esm/{keys-a1496e39.js → keys-db1897ae.js} +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/esm/mint-components.js +1 -1
- package/dist/esm/sqm-banking-info-form_16.entry.js +92 -78
- package/dist/esm/sqm-big-stat_39.entry.js +127 -62
- package/dist/esm/sqm-code-verification.entry.js +69 -79
- package/dist/esm/sqm-email-verification.entry.js +159 -13
- package/dist/esm/{sqm-invoice-table-view-08c03ba7.js → sqm-invoice-table-view-d1cfdaf4.js} +79 -0
- package/dist/esm/sqm-stencilbook.entry.js +56 -14
- package/dist/esm/sqm-widget-verification-internal.entry.js +84 -14
- package/dist/esm/sqm-widget-verification.entry.js +104 -21
- package/dist/esm/usePayoutStatus-1a635054.js +67 -0
- package/dist/esm/useVerificationEmail-c32696ba.js +167 -0
- package/dist/esm-es5/ShadowViewAddon-69b61037.js +1 -0
- package/dist/esm-es5/extractProps-ae1afbb3.js +1 -0
- package/dist/esm-es5/{keys-a1496e39.js → keys-db1897ae.js} +1 -1
- 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_16.entry.js +1 -1
- package/dist/esm-es5/sqm-big-stat_39.entry.js +1 -1
- package/dist/esm-es5/sqm-code-verification.entry.js +1 -1
- package/dist/esm-es5/sqm-email-verification.entry.js +1 -1
- package/dist/esm-es5/sqm-invoice-table-view-d1cfdaf4.js +1 -0
- package/dist/esm-es5/sqm-stencilbook.entry.js +1 -1
- package/dist/esm-es5/sqm-widget-verification-internal.entry.js +1 -1
- package/dist/esm-es5/sqm-widget-verification.entry.js +1 -1
- package/dist/esm-es5/usePayoutStatus-1a635054.js +1 -0
- package/dist/esm-es5/useVerificationEmail-c32696ba.js +1 -0
- package/dist/mint-components/mint-components.esm.js +1 -1
- package/dist/mint-components/p-0e45bc0e.system.entry.js +1 -0
- package/dist/mint-components/p-1712a9fd.entry.js +11 -0
- package/dist/mint-components/p-1e616d45.system.js +1 -0
- package/dist/mint-components/{p-721a89c6.entry.js → p-24092973.entry.js} +2 -2
- package/dist/mint-components/p-26468242.js +1 -0
- package/dist/mint-components/p-282a7d85.entry.js +195 -0
- package/dist/mint-components/p-331d060e.entry.js +223 -0
- package/dist/mint-components/p-39840341.js +1 -0
- package/dist/mint-components/p-4364001c.entry.js +12 -0
- package/dist/mint-components/p-4bd7a472.js +1 -0
- package/dist/mint-components/p-517224ef.js +19 -0
- package/dist/mint-components/p-5f766d09.entry.js +25 -0
- package/dist/mint-components/p-8300d8c8.system.js +1 -0
- package/dist/mint-components/p-8bddb468.system.entry.js +1 -0
- package/dist/mint-components/p-9596e97c.system.entry.js +1 -0
- package/dist/mint-components/p-974070c4.system.entry.js +1 -0
- package/dist/mint-components/{p-b651706a.js → p-9eae245f.js} +6 -3
- package/dist/mint-components/p-a8645c1b.system.js +1 -0
- package/dist/mint-components/p-aabab609.system.entry.js +1 -0
- package/dist/mint-components/p-b2a99637.system.js +1 -0
- package/dist/mint-components/{p-66a04cca.system.entry.js → p-b62faaa5.system.entry.js} +1 -1
- package/dist/mint-components/p-c510fb88.entry.js +1 -0
- package/dist/mint-components/p-ca809fdd.system.js +1 -1
- package/dist/mint-components/p-d7806f31.js +48 -0
- package/dist/mint-components/p-e01ac27c.system.js +1 -0
- package/dist/mint-components/p-e45a8501.system.entry.js +1 -0
- package/dist/mint-components/p-e990dc21.system.js +1 -0
- package/dist/types/components/sqm-payout-button-scroll/PayoutButtonScroll.stories.d.ts +0 -1
- package/dist/types/components/sqm-payout-button-scroll/sqm-payout-button-scroll.d.ts +7 -0
- package/dist/types/components/sqm-widget-verification/sqm-code-verification/WidgetCodeVerification.stories.d.ts +1 -0
- package/dist/types/components/sqm-widget-verification/sqm-code-verification/sqm-code-verification-view.d.ts +3 -3
- package/dist/types/components/sqm-widget-verification/sqm-code-verification/sqm-code-verification.d.ts +4 -10
- package/dist/types/components/sqm-widget-verification/sqm-code-verification/useCodeVerification.d.ts +2 -0
- package/dist/types/components/sqm-widget-verification/sqm-email-verification/WidgetEmailVerification.stories.d.ts +4 -1
- package/dist/types/components/sqm-widget-verification/sqm-email-verification/sqm-email-verification-view.d.ts +6 -1
- package/dist/types/components/sqm-widget-verification/sqm-email-verification/sqm-email-verification.d.ts +10 -2
- package/dist/types/components/sqm-widget-verification/sqm-email-verification/useEmailVerification.d.ts +3 -2
- package/dist/types/components/sqm-widget-verification/sqm-widget-verification-internal.d.ts +15 -0
- package/dist/types/components/sqm-widget-verification/sqm-widget-verification.d.ts +79 -0
- package/dist/types/components/sqm-widget-verification/useVerificationEmail.d.ts +14 -0
- package/dist/types/components/tax-and-cash/TaxForm.stories.d.ts +1 -0
- package/dist/types/components/tax-and-cash/sqm-banking-info-form/sqm-banking-info-form-view.d.ts +1 -0
- package/dist/types/components/tax-and-cash/sqm-payout-status-alert/PayoutStatusAlert.stories.d.ts +2 -0
- package/dist/types/components/tax-and-cash/sqm-payout-status-alert/sqm-payout-status-alert-view.d.ts +12 -0
- package/dist/types/components/tax-and-cash/sqm-payout-status-alert/sqm-payout-status-alert.d.ts +41 -0
- package/dist/types/components/tax-and-cash/sqm-payout-status-alert/usePayoutStatus.d.ts +12 -0
- package/dist/types/components/tax-and-cash/sqm-tax-and-cash/data.d.ts +6 -0
- package/dist/types/components/tax-and-cash/sqm-tax-and-cash/sqm-tax-and-cash.d.ts +2 -2
- package/dist/types/components/tax-and-cash/sqm-tax-and-cash-dashboard/sqm-tax-and-cash-dashboard-view.d.ts +10 -3
- package/dist/types/components/tax-and-cash/sqm-tax-and-cash-dashboard/sqm-tax-and-cash-dashboard.d.ts +19 -18
- package/dist/types/components.d.ts +366 -92
- 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/cjs/useEmailVerification-30a1c7f6.js +0 -75
- package/dist/collection/components/sqm-widget-verification/useWidgetVerification.js +0 -3
- package/dist/esm/useEmailVerification-7135732c.js +0 -72
- package/dist/esm-es5/ShadowViewAddon-65c8679e.js +0 -1
- package/dist/esm-es5/sqm-invoice-table-view-08c03ba7.js +0 -1
- package/dist/esm-es5/useEmailVerification-7135732c.js +0 -1
- package/dist/mint-components/p-117b4705.system.js +0 -1
- package/dist/mint-components/p-1bd0cda8.system.entry.js +0 -1
- package/dist/mint-components/p-1ee62d9f.system.entry.js +0 -1
- package/dist/mint-components/p-1f9a9b70.system.entry.js +0 -1
- package/dist/mint-components/p-23fdd44e.entry.js +0 -1
- package/dist/mint-components/p-36f7caec.system.entry.js +0 -1
- package/dist/mint-components/p-39397731.entry.js +0 -1
- package/dist/mint-components/p-39af4acd.entry.js +0 -240
- package/dist/mint-components/p-4c9b6fbe.system.js +0 -1
- package/dist/mint-components/p-65e2c043.system.js +0 -1
- package/dist/mint-components/p-663303b7.entry.js +0 -8
- package/dist/mint-components/p-6cae44d7.js +0 -1
- package/dist/mint-components/p-7f5c7bf7.system.entry.js +0 -1
- package/dist/mint-components/p-8a337864.js +0 -7
- package/dist/mint-components/p-a02afa72.system.js +0 -1
- package/dist/mint-components/p-a5a9aa07.entry.js +0 -189
- package/dist/mint-components/p-c763c0b2.js +0 -1
- package/dist/mint-components/p-e93e5740.entry.js +0 -1
- package/dist/mint-components/p-e9ca48fc.system.entry.js +0 -1
- package/dist/types/components/sqm-widget-verification/useWidgetVerification.d.ts +0 -1
|
@@ -12,8 +12,10 @@ import { u as useChildElements } from './useChildElements-fc84e640.js';
|
|
|
12
12
|
import { l as luxon } from './luxon-7600be8d.js';
|
|
13
13
|
import { g as generateUserError } from './useReferralTable-f6ffa103.js';
|
|
14
14
|
import { g as getProps, l as luxonLocale } from './utils-334c1e34.js';
|
|
15
|
-
import { t as taxTypeToName, v as validTaxDocument, a as INDIRECT_TAX_SPAIN_REGIONS, b as INDIRECT_TAX_PROVINCES, g as getCountryObj, O as OtherRegionSlotView, I as InvoiceTableView, E as ErrorView, L as LoadingView, c as vatLabels, G as GeneralLoadingView, f as formatErrorMessage, d as validateBillingField, o as objectIsFull, A as ADDRESS_REGIONS } from './sqm-invoice-table-view-
|
|
16
|
-
import {
|
|
15
|
+
import { t as taxTypeToName, v as validTaxDocument, a as INDIRECT_TAX_SPAIN_REGIONS, b as INDIRECT_TAX_PROVINCES, g as getCountryObj, O as OtherRegionSlotView, I as InvoiceTableView, E as ErrorView, L as LoadingView, c as vatLabels, G as GeneralLoadingView, f as formatErrorMessage, d as validateBillingField, o as objectIsFull, A as ADDRESS_REGIONS } from './sqm-invoice-table-view-d1cfdaf4.js';
|
|
16
|
+
import { b as VERIFICATION_EVENT_KEY } from './keys-db1897ae.js';
|
|
17
|
+
import { g as getStatus } from './usePayoutStatus-1a635054.js';
|
|
18
|
+
import { e as extractProps } from './extractProps-ae1afbb3.js';
|
|
17
19
|
|
|
18
20
|
const TAX_CONTEXT_NAMESPACE = "sq:tax-and-cash";
|
|
19
21
|
const TAX_FORM_CONTEXT_NAMESPACE = "sq:tax-form-context";
|
|
@@ -35,6 +37,11 @@ const GET_USER = dist.gql `
|
|
|
35
37
|
email
|
|
36
38
|
countryCode
|
|
37
39
|
customFields
|
|
40
|
+
managedIdentity {
|
|
41
|
+
uid
|
|
42
|
+
email
|
|
43
|
+
emailVerified
|
|
44
|
+
}
|
|
38
45
|
impactConnection {
|
|
39
46
|
connected
|
|
40
47
|
user {
|
|
@@ -78,6 +85,7 @@ const GET_USER = dist.gql `
|
|
|
78
85
|
}
|
|
79
86
|
payoutsAccount {
|
|
80
87
|
hold
|
|
88
|
+
holdReasons
|
|
81
89
|
balance
|
|
82
90
|
}
|
|
83
91
|
}
|
|
@@ -1178,6 +1186,12 @@ function useBankingInfoForm(props) {
|
|
|
1178
1186
|
}
|
|
1179
1187
|
await runMutation(formData, token);
|
|
1180
1188
|
};
|
|
1189
|
+
const onVerification = async (token) => {
|
|
1190
|
+
host.dispatchEvent(new CustomEvent(VERIFICATION_EVENT_KEY, {
|
|
1191
|
+
detail: { token },
|
|
1192
|
+
bubbles: false,
|
|
1193
|
+
}));
|
|
1194
|
+
};
|
|
1181
1195
|
function setPaymentMethodChecked(paymentMethod) {
|
|
1182
1196
|
_setPaymentMethodChecked(paymentMethod);
|
|
1183
1197
|
if (paymentMethod === "toPayPalAccount") {
|
|
@@ -1202,6 +1216,7 @@ function useBankingInfoForm(props) {
|
|
|
1202
1216
|
setPaymentScheduleChecked,
|
|
1203
1217
|
onBack: () => setStep("/dashboard"),
|
|
1204
1218
|
setCountrySearch,
|
|
1219
|
+
onVerification,
|
|
1205
1220
|
},
|
|
1206
1221
|
states: {
|
|
1207
1222
|
showVerification,
|
|
@@ -1541,7 +1556,7 @@ const BankingInfoForm = class {
|
|
|
1541
1556
|
},
|
|
1542
1557
|
};
|
|
1543
1558
|
if (props.states.isPartner && props.states.showVerification) {
|
|
1544
|
-
return h("sqm-code-verification",
|
|
1559
|
+
return (h("sqm-code-verification", { onVerification: props.callbacks.onVerification }));
|
|
1545
1560
|
}
|
|
1546
1561
|
return (h(Host, null, h(BankingInfoFormView, { callbacks: props.callbacks, text: props.text, states: props.states, refs: props.refs, slots: {
|
|
1547
1562
|
formInputsSlot: inputFields === null || inputFields === void 0 ? void 0 : inputFields.map(({ input }) => input),
|
|
@@ -1675,6 +1690,7 @@ function useDemoBankingInfoForm(props) {
|
|
|
1675
1690
|
setPaymentScheduleChecked,
|
|
1676
1691
|
setCountrySearch: () => { },
|
|
1677
1692
|
onBack: async () => setStep("/dashboard"),
|
|
1693
|
+
onVerification: () => { },
|
|
1678
1694
|
},
|
|
1679
1695
|
text: props.getTextProps(),
|
|
1680
1696
|
refs: {
|
|
@@ -1916,7 +1932,6 @@ const DocusignIframe = ({ states, data, callbacks, text, }) => {
|
|
|
1916
1932
|
const allowed = allowedDomains.some((d) => { var _a; return (_a = e.origin) === null || _a === void 0 ? void 0 : _a.includes(d); });
|
|
1917
1933
|
if (!allowed)
|
|
1918
1934
|
return;
|
|
1919
|
-
console.log(e);
|
|
1920
1935
|
if (typeof e.data === "number") {
|
|
1921
1936
|
setiFrameHeight(e.data + "px");
|
|
1922
1937
|
}
|
|
@@ -3775,27 +3790,9 @@ const TableRow = class {
|
|
|
3775
3790
|
}
|
|
3776
3791
|
};
|
|
3777
3792
|
|
|
3778
|
-
/**
|
|
3779
|
-
* Util function for getting just the props with a certain prefix.
|
|
3780
|
-
* @param props Text props on stencil component
|
|
3781
|
-
* @param prefix Prefix denoting which group the text prop belongs to
|
|
3782
|
-
* @returns A new object with all keys with the prefix provided. The prefix is removed from each key.
|
|
3783
|
-
*/
|
|
3784
|
-
function extractProps(props, prefix) {
|
|
3785
|
-
const keys = Object.keys(props).filter((k) => k.startsWith(prefix));
|
|
3786
|
-
const formattedProps = keys.reduce((prev, k) => {
|
|
3787
|
-
const key = k.replace(prefix, "");
|
|
3788
|
-
return {
|
|
3789
|
-
...prev,
|
|
3790
|
-
[key]: props[k],
|
|
3791
|
-
};
|
|
3792
|
-
}, {});
|
|
3793
|
-
return formattedProps;
|
|
3794
|
-
}
|
|
3795
|
-
|
|
3796
3793
|
function getCurrentStep(user) {
|
|
3797
|
-
var _a;
|
|
3798
|
-
if (!((_a = user.impactConnection) === null || _a === void 0 ? void 0 : _a.connected)) {
|
|
3794
|
+
var _a, _b;
|
|
3795
|
+
if (!((_a = user.impactConnection) === null || _a === void 0 ? void 0 : _a.connected) || !((_b = user.impactConnection) === null || _b === void 0 ? void 0 : _b.publisher)) {
|
|
3799
3796
|
return "/1";
|
|
3800
3797
|
}
|
|
3801
3798
|
const { requiredTaxDocumentType, currentTaxDocument, withdrawalSettings, brandedSignup, } = user.impactConnection.publisher;
|
|
@@ -4689,14 +4686,14 @@ const TaxAndCashMonolith = class {
|
|
|
4689
4686
|
* @uiGroup Dashboard Properties
|
|
4690
4687
|
* @uiWidget textArea
|
|
4691
4688
|
*/
|
|
4692
|
-
this.
|
|
4689
|
+
this.payoutHoldAlertHeader = "Your payout is on hold";
|
|
4693
4690
|
/**
|
|
4694
4691
|
* Part of the alert displayed at the top of the page when there’s been an issue preventing payouts.
|
|
4695
4692
|
* @uiName Payout error message description
|
|
4696
4693
|
* @uiGroup Dashboard Properties
|
|
4697
4694
|
* @uiWidget textArea
|
|
4698
4695
|
*/
|
|
4699
|
-
this.
|
|
4696
|
+
this.payoutHoldAlertDescription = "Please contact Support or check your inbox for an email from our referral program provider, impact.com.";
|
|
4700
4697
|
/**
|
|
4701
4698
|
* Text displayed for existing publishers that do not have saved banking information.
|
|
4702
4699
|
* @uiName Payout missing information subtext
|
|
@@ -4911,6 +4908,12 @@ const style$5 = {
|
|
|
4911
4908
|
borderTop: "none",
|
|
4912
4909
|
},
|
|
4913
4910
|
},
|
|
4911
|
+
HoldAlertContainer: {
|
|
4912
|
+
"&::part(base)": {
|
|
4913
|
+
border: "none",
|
|
4914
|
+
backgroundColor: "transparent",
|
|
4915
|
+
},
|
|
4916
|
+
},
|
|
4914
4917
|
ExpiringSoonAlertContainer: {
|
|
4915
4918
|
"&::part(base)": {
|
|
4916
4919
|
backgroundColor: "var(--sl-color-yellow-100)",
|
|
@@ -5150,22 +5153,22 @@ const TaxAndCashDashboardView = (props) => {
|
|
|
5150
5153
|
h("strong", null, text.error.generalTitle),
|
|
5151
5154
|
h("br", null),
|
|
5152
5155
|
text.error.generalDescription)),
|
|
5153
|
-
states.
|
|
5154
|
-
h("sl-
|
|
5155
|
-
|
|
5156
|
-
|
|
5157
|
-
|
|
5158
|
-
|
|
5159
|
-
|
|
5160
|
-
|
|
5161
|
-
|
|
5162
|
-
|
|
5163
|
-
|
|
5164
|
-
|
|
5165
|
-
|
|
5166
|
-
|
|
5167
|
-
|
|
5168
|
-
|
|
5156
|
+
states.hasHold && (h("sl-alert", { exportparts: "base: alert-base, icon:alert-icon", type: "warning", open: true, class: sheet$4.classes.HoldAlertContainer },
|
|
5157
|
+
h("sl-icon", { slot: "icon", name: "exclamation-triangle" }),
|
|
5158
|
+
h("strong", null, text.payoutHoldAlertHeader),
|
|
5159
|
+
h("br", null),
|
|
5160
|
+
text.payoutHoldAlertDescription)),
|
|
5161
|
+
states.payoutStatus === "VERIFICATION_NEEDED" && (h("sl-alert", { exportparts: "base: alert-base, icon:alert-icon", type: "warning", open: true, class: sheet$4.classes.HoldAlertContainer },
|
|
5162
|
+
h("sl-icon", { slot: "icon", name: "exclamation-triangle" }),
|
|
5163
|
+
h("strong", null, text.verificationRequiredHeader),
|
|
5164
|
+
h("p", { style: { margin: "0" } }, text.verificationRequiredDescription),
|
|
5165
|
+
h("sl-button", { style: { marginTop: "var(--sl-spacing-x-small)" }, type: "default", loading: states.loading,
|
|
5166
|
+
//AL: TODO hooks
|
|
5167
|
+
onClick: () => callbacks.onClick }, text.verificationRequiredButtonText))),
|
|
5168
|
+
h("sl-dialog", { noDismiss: true, class: sheet$4.classes.Dialog, open: states.showVerifyIdentity, "onSl-hide": callbacks.onVerifyIdentityCancel },
|
|
5169
|
+
h("iframe", {
|
|
5170
|
+
// AL: TODO replace iframe URL with verification url when available
|
|
5171
|
+
scrolling: "yes", frameBorder: "0", width: "100%", height: "100%", src: "https://impacttech.complytaxforms.com/ServiceRedirect.aspx?Language=eng&Param1=UxBORV4bOIrqNb4gbpNmtvW3wjdZJyx4gPElIGMJNR8=&UUID=B576EA3E-80FD-4D85-AA59-653D23A7CCE8" })),
|
|
5169
5172
|
h("sl-dialog", { label: text.replaceTaxFormModalHeader, class: sheet$4.classes.Dialog, open: states.showNewFormDialog, "onSl-hide": callbacks.onNewFormCancel },
|
|
5170
5173
|
h("p", null, text.replaceTaxFormModalBodyText),
|
|
5171
5174
|
h("sl-button", { slot: "footer", type: "primary", class: sheet$4.classes.DialogButton, onClick: callbacks.onNewFormClick }, text.newFormButton),
|
|
@@ -5271,10 +5274,11 @@ function getIndirectTaxType(taxInformation) {
|
|
|
5271
5274
|
return "Indirect Tax";
|
|
5272
5275
|
}
|
|
5273
5276
|
const useTaxAndCashDashboard = (props) => {
|
|
5274
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
|
|
5277
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
|
|
5275
5278
|
const setStep = Sn(TAX_CONTEXT_NAMESPACE);
|
|
5276
5279
|
const setContext = Sn(TAX_FORM_CONTEXT_NAMESPACE);
|
|
5277
5280
|
const [showDialog, setShowDialog] = useState(false);
|
|
5281
|
+
const [showVerification, setShowVerification] = useState(false);
|
|
5278
5282
|
const locale = Q();
|
|
5279
5283
|
useEffect(() => {
|
|
5280
5284
|
// Clear override context once on submitted
|
|
@@ -5305,6 +5309,7 @@ const useTaxAndCashDashboard = (props) => {
|
|
|
5305
5309
|
setStep("/3");
|
|
5306
5310
|
};
|
|
5307
5311
|
const provinceName = (_d = INDIRECT_TAX_PROVINCES.find((p) => { var _a; return p.regionCode === ((_a = publisher === null || publisher === void 0 ? void 0 : publisher.taxInformation) === null || _a === void 0 ? void 0 : _a.indirectTaxRegion); })) === null || _d === void 0 ? void 0 : _d.displayName;
|
|
5312
|
+
const payoutStatus = getStatus(data);
|
|
5308
5313
|
return {
|
|
5309
5314
|
states: {
|
|
5310
5315
|
dateSubmitted,
|
|
@@ -5326,12 +5331,16 @@ const useTaxAndCashDashboard = (props) => {
|
|
|
5326
5331
|
loading,
|
|
5327
5332
|
loadingError: !!(userError === null || userError === void 0 ? void 0 : userError.message),
|
|
5328
5333
|
showNewFormDialog: showDialog,
|
|
5334
|
+
hasHold: !!((_m = publisher === null || publisher === void 0 ? void 0 : publisher.payoutsAccount) === null || _m === void 0 ? void 0 : _m.hold),
|
|
5335
|
+
payoutStatus,
|
|
5336
|
+
showVerifyIdentity: showVerification,
|
|
5329
5337
|
},
|
|
5330
5338
|
callbacks: {
|
|
5331
5339
|
onClick: () => setShowDialog(true),
|
|
5332
5340
|
onEditPayoutInfo,
|
|
5333
5341
|
onNewFormCancel: () => setShowDialog(false),
|
|
5334
5342
|
onNewFormClick,
|
|
5343
|
+
onVerifyIdentityCancel: () => setShowVerification(false),
|
|
5335
5344
|
},
|
|
5336
5345
|
text: props.getTextProps(),
|
|
5337
5346
|
};
|
|
@@ -5399,18 +5408,6 @@ const TaxAndCashDashboard = class {
|
|
|
5399
5408
|
* @uiName Inactive W-8 error message description
|
|
5400
5409
|
*/
|
|
5401
5410
|
this.taxAlertNotActiveMessageW8 = "Your tax form may have expired or has personal information that doesn’t match your profile. Please submit a new {documentType} form.";
|
|
5402
|
-
/**
|
|
5403
|
-
* Part of the alert displayed at the top of the page.
|
|
5404
|
-
*
|
|
5405
|
-
* @uiName Verify identity warning message header
|
|
5406
|
-
*/
|
|
5407
|
-
this.verifyIdentityAlertHeader = "Verify your identity";
|
|
5408
|
-
/**
|
|
5409
|
-
* Part of the alert displayed at the top of the page.
|
|
5410
|
-
*
|
|
5411
|
-
* @uiName Verify identity warning message description
|
|
5412
|
-
*/
|
|
5413
|
-
this.verifyIdentityAlertMessage = "Complete your verification to start receiving your cash rewards. It should only take a few minutes verify.";
|
|
5414
5411
|
/**
|
|
5415
5412
|
* Additional text displayed next to the tax form's status badge.
|
|
5416
5413
|
*
|
|
@@ -5515,18 +5512,35 @@ const TaxAndCashDashboard = class {
|
|
|
5515
5512
|
* @uiName Payout error message title
|
|
5516
5513
|
* @uiWidget textArea
|
|
5517
5514
|
*/
|
|
5518
|
-
this.
|
|
5515
|
+
this.payoutHoldAlertHeader = "Your payout is on hold";
|
|
5519
5516
|
/**
|
|
5520
5517
|
* Part of the alert displayed at the top of the page when there’s been an issue preventing payouts.
|
|
5521
5518
|
* @uiName Payout error message description
|
|
5522
5519
|
* @uiWidget textArea
|
|
5523
5520
|
*/
|
|
5524
|
-
this.
|
|
5521
|
+
this.payoutHoldAlertDescription = "Please contact Support or check your inbox for an email from our referral program provider, impact.com.";
|
|
5525
5522
|
/**
|
|
5526
5523
|
* Text displayed for existing publishers that do not have saved banking information.
|
|
5527
5524
|
* @uiName Payout missing information subtext
|
|
5528
5525
|
*/
|
|
5529
5526
|
this.payoutMissingInformationText = "Missing banking information, go to Impact.com to resolve.";
|
|
5527
|
+
/**
|
|
5528
|
+
* Part of the alert displayed at the top of the page when the user needs to verify their identity.
|
|
5529
|
+
* @uiName Verification required alert message title
|
|
5530
|
+
* @uiWidget textArea
|
|
5531
|
+
*/
|
|
5532
|
+
this.verificationRequiredHeader = "Verify your identity";
|
|
5533
|
+
/**
|
|
5534
|
+
* Part of the alert displayed at the top of the page when the user needs to verify their identity
|
|
5535
|
+
* @uiName Verification required alert message description
|
|
5536
|
+
* @uiWidget textArea
|
|
5537
|
+
*/
|
|
5538
|
+
this.verificationRequiredDescription = "Complete your verification to start receiving your cash rewards. It should only take a few minutes verify.";
|
|
5539
|
+
/**
|
|
5540
|
+
* Part of the alert displayed at the top of the page when the user needs to verify their identity.
|
|
5541
|
+
* @uiName Verification required alert button text
|
|
5542
|
+
*/
|
|
5543
|
+
this.verificationRequiredButtonText = "Start Verification";
|
|
5530
5544
|
/**
|
|
5531
5545
|
* Part of the alert displayed at the top of the page.
|
|
5532
5546
|
* @uiName Form submission error message title
|
|
@@ -5611,10 +5625,6 @@ const TaxAndCashDashboard = class {
|
|
|
5611
5625
|
* @uiName Cancel button label
|
|
5612
5626
|
*/
|
|
5613
5627
|
this.cancelButton = "Cancel";
|
|
5614
|
-
/**
|
|
5615
|
-
* @uiName Verify button label
|
|
5616
|
-
*/
|
|
5617
|
-
this.verifyIdentityButton = "Start Verification";
|
|
5618
5628
|
h$1(this);
|
|
5619
5629
|
}
|
|
5620
5630
|
disconnectedCallback() { }
|
|
@@ -5653,12 +5663,16 @@ function useDemoTaxAndCashDashboard(props) {
|
|
|
5653
5663
|
disabled: false,
|
|
5654
5664
|
loading: false,
|
|
5655
5665
|
showNewFormDialog: false,
|
|
5666
|
+
hasHold: false,
|
|
5667
|
+
showVerifyIdentity: false,
|
|
5668
|
+
payoutStatus: "DONE",
|
|
5656
5669
|
},
|
|
5657
5670
|
callbacks: {
|
|
5658
5671
|
onClick: () => console.debug("check step"),
|
|
5659
5672
|
onEditPayoutInfo: () => console.debug("payout info"),
|
|
5660
5673
|
onNewFormCancel: () => console.log("hide"),
|
|
5661
5674
|
onNewFormClick: () => console.log("show"),
|
|
5675
|
+
onVerifyIdentityCancel: () => console.log("hide"),
|
|
5662
5676
|
},
|
|
5663
5677
|
text: props.getTextProps(),
|
|
5664
5678
|
}, props.demoData || {}, { arrayMerge: (_, a) => a });
|
|
@@ -6715,7 +6729,6 @@ const style$6 = {
|
|
|
6715
6729
|
},
|
|
6716
6730
|
PhoneInputsSection: {
|
|
6717
6731
|
display: "flex",
|
|
6718
|
-
alignItems: "flex-end",
|
|
6719
6732
|
flexDirection: "column",
|
|
6720
6733
|
gap: "4px",
|
|
6721
6734
|
"& p": {
|
|
@@ -6726,7 +6739,6 @@ const style$6 = {
|
|
|
6726
6739
|
},
|
|
6727
6740
|
PhoneInputsContainer: {
|
|
6728
6741
|
display: "flex",
|
|
6729
|
-
alignItems: "flex-end",
|
|
6730
6742
|
gap: "4px",
|
|
6731
6743
|
width: "100%",
|
|
6732
6744
|
"& #phoneNumber": {
|
|
@@ -6867,10 +6879,7 @@ const UserInfoFormView = (props) => {
|
|
|
6867
6879
|
h("div", { slot: "prefix" }, `${(_a = PHONE_EXTENSIONS[c.countryCode]) === null || _a === void 0 ? void 0 : _a.name} `), (_b = PHONE_EXTENSIONS[c.countryCode]) === null || _b === void 0 ? void 0 :
|
|
6868
6880
|
_b.dial_code));
|
|
6869
6881
|
})),
|
|
6870
|
-
h("sl-input", Object.assign({ exportparts: "label: input-label, base: input-base", id: "phoneNumber", name: "/phoneNumber", value: formState.phoneNumber, validationError: (
|
|
6871
|
-
// Naive phone number validation
|
|
6872
|
-
validateBillingField(/[a-zA-Z]+/, value) &&
|
|
6873
|
-
formatErrorMessage(text.phoneNumber, text.error.fieldInvalidError), disabled: states.disabled || states.isPartner }, (((_k = formState.errors) === null || _k === void 0 ? void 0 : _k.phoneNumber) ? {
|
|
6882
|
+
h("sl-input", Object.assign({ exportparts: "label: input-label, base: input-base", id: "phoneNumber", name: "/phoneNumber", value: formState.phoneNumber, validationError: true, disabled: states.disabled || states.isPartner }, (((_k = formState.errors) === null || _k === void 0 ? void 0 : _k.phoneNumber) ? {
|
|
6874
6883
|
class: classes.ErrorInput,
|
|
6875
6884
|
helpText: formatErrorMessage(text.phoneNumber, formState.errors.phoneNumber),
|
|
6876
6885
|
}
|
|
@@ -6948,17 +6957,20 @@ function useUserInfoForm(props) {
|
|
|
6948
6957
|
const [filteredCurrencies, setFilteredCurrencies] = useState(currencies || []);
|
|
6949
6958
|
const [formErrors, setErrors] = useState({});
|
|
6950
6959
|
useEffect(() => {
|
|
6951
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
6960
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
6952
6961
|
const user = data === null || data === void 0 ? void 0 : data.user;
|
|
6953
6962
|
if (!user || step !== "/1")
|
|
6954
6963
|
return;
|
|
6955
6964
|
// If form already filled out, skip initialising it
|
|
6956
6965
|
if (objectIsFull(userFormContext))
|
|
6957
6966
|
return;
|
|
6958
|
-
|
|
6967
|
+
// Prefer MI email if it was verified before this
|
|
6968
|
+
const email = ((_a = user.managedIdentity) === null || _a === void 0 ? void 0 : _a.emailVerified) ? user.managedIdentity.email
|
|
6969
|
+
: user.email;
|
|
6970
|
+
if (((_b = user.impactConnection) === null || _b === void 0 ? void 0 : _b.publisher) && ((_c = user.impactConnection) === null || _c === void 0 ? void 0 : _c.user)) {
|
|
6959
6971
|
// Initialise with partner information
|
|
6960
6972
|
setUserFormContext({
|
|
6961
|
-
email
|
|
6973
|
+
email,
|
|
6962
6974
|
firstName: user.impactConnection.user.firstName,
|
|
6963
6975
|
lastName: user.impactConnection.user.lastName,
|
|
6964
6976
|
countryCode: user.impactConnection.publisher.countryCode,
|
|
@@ -6974,17 +6986,17 @@ function useUserInfoForm(props) {
|
|
|
6974
6986
|
else if (!(userFormContext === null || userFormContext === void 0 ? void 0 : userFormContext.email)) {
|
|
6975
6987
|
// Initialise with user information
|
|
6976
6988
|
setUserFormContext({
|
|
6977
|
-
email
|
|
6989
|
+
email,
|
|
6978
6990
|
firstName: user.firstName,
|
|
6979
6991
|
lastName: user.lastName,
|
|
6980
6992
|
countryCode: user.countryCode || "US",
|
|
6981
|
-
currency: (
|
|
6982
|
-
phoneNumberCountryCode: ((
|
|
6983
|
-
phoneNumber: (
|
|
6984
|
-
address: (
|
|
6985
|
-
city: (
|
|
6986
|
-
state: (
|
|
6987
|
-
postalCode: (
|
|
6993
|
+
currency: (_d = user.customFields) === null || _d === void 0 ? void 0 : _d.currency,
|
|
6994
|
+
phoneNumberCountryCode: ((_e = user.customFields) === null || _e === void 0 ? void 0 : _e.phoneNumberCountryCode) || "US",
|
|
6995
|
+
phoneNumber: (_f = user.customFields) === null || _f === void 0 ? void 0 : _f.phoneNumber,
|
|
6996
|
+
address: (_g = user.customFields) === null || _g === void 0 ? void 0 : _g.address,
|
|
6997
|
+
city: (_h = user.customFields) === null || _h === void 0 ? void 0 : _h.city,
|
|
6998
|
+
state: (_j = user.customFields) === null || _j === void 0 ? void 0 : _j.state,
|
|
6999
|
+
postalCode: (_k = user.customFields) === null || _k === void 0 ? void 0 : _k.postalCode,
|
|
6988
7000
|
});
|
|
6989
7001
|
}
|
|
6990
7002
|
}, [data, step, userFormContext]);
|
|
@@ -7063,6 +7075,8 @@ function useUserInfoForm(props) {
|
|
|
7063
7075
|
const { allowBankingCollection, ...userData } = formData;
|
|
7064
7076
|
setUserFormContext({
|
|
7065
7077
|
...userFormContext,
|
|
7078
|
+
firstName: userData.firstName,
|
|
7079
|
+
lastName: userData.lastName,
|
|
7066
7080
|
phoneNumberCountryCode: userData.phoneNumberCountryCode,
|
|
7067
7081
|
phoneNumber: userData.phoneNumber,
|
|
7068
7082
|
countryCode: userData.countryCode,
|