@saasquatch/mint-components 1.12.0-1 → 1.12.0-10
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 +91 -72
- 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 +76 -20
- 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/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 +91 -72
- 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-15c7a1d2.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-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-5a23b560.system.entry.js +1 -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-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-c41e1df8.entry.js +195 -0
- 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/mint-components/p-f340214f.entry.js +25 -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
|
@@ -16,8 +16,10 @@ const useChildElements = require('./useChildElements-410d2435.js');
|
|
|
16
16
|
const luxon = require('./luxon-05098e19.js');
|
|
17
17
|
const useReferralTable = require('./useReferralTable-824ac152.js');
|
|
18
18
|
const utils = require('./utils-6847bc06.js');
|
|
19
|
-
const sqmInvoiceTableView = require('./sqm-invoice-table-view-
|
|
19
|
+
const sqmInvoiceTableView = require('./sqm-invoice-table-view-c58966f8.js');
|
|
20
20
|
const keys = require('./keys-cff24974.js');
|
|
21
|
+
const usePayoutStatus = require('./usePayoutStatus-b9fb7399.js');
|
|
22
|
+
const extractProps = require('./extractProps-fd93ba62.js');
|
|
21
23
|
|
|
22
24
|
const TAX_CONTEXT_NAMESPACE = "sq:tax-and-cash";
|
|
23
25
|
const TAX_FORM_CONTEXT_NAMESPACE = "sq:tax-form-context";
|
|
@@ -39,6 +41,11 @@ const GET_USER = index_module.dist.gql `
|
|
|
39
41
|
email
|
|
40
42
|
countryCode
|
|
41
43
|
customFields
|
|
44
|
+
managedIdentity {
|
|
45
|
+
uid
|
|
46
|
+
email
|
|
47
|
+
emailVerified
|
|
48
|
+
}
|
|
42
49
|
impactConnection {
|
|
43
50
|
connected
|
|
44
51
|
user {
|
|
@@ -82,6 +89,7 @@ const GET_USER = index_module.dist.gql `
|
|
|
82
89
|
}
|
|
83
90
|
payoutsAccount {
|
|
84
91
|
hold
|
|
92
|
+
holdReasons
|
|
85
93
|
balance
|
|
86
94
|
}
|
|
87
95
|
}
|
|
@@ -1182,6 +1190,12 @@ function useBankingInfoForm(props) {
|
|
|
1182
1190
|
}
|
|
1183
1191
|
await runMutation(formData, token);
|
|
1184
1192
|
};
|
|
1193
|
+
const onVerification = async (token) => {
|
|
1194
|
+
host.dispatchEvent(new CustomEvent(keys.VERIFICATION_EVENT_KEY, {
|
|
1195
|
+
detail: { token },
|
|
1196
|
+
bubbles: false,
|
|
1197
|
+
}));
|
|
1198
|
+
};
|
|
1185
1199
|
function setPaymentMethodChecked(paymentMethod) {
|
|
1186
1200
|
_setPaymentMethodChecked(paymentMethod);
|
|
1187
1201
|
if (paymentMethod === "toPayPalAccount") {
|
|
@@ -1206,6 +1220,7 @@ function useBankingInfoForm(props) {
|
|
|
1206
1220
|
setPaymentScheduleChecked,
|
|
1207
1221
|
onBack: () => setStep("/dashboard"),
|
|
1208
1222
|
setCountrySearch,
|
|
1223
|
+
onVerification,
|
|
1209
1224
|
},
|
|
1210
1225
|
states: {
|
|
1211
1226
|
showVerification,
|
|
@@ -1545,7 +1560,7 @@ const BankingInfoForm = class {
|
|
|
1545
1560
|
},
|
|
1546
1561
|
};
|
|
1547
1562
|
if (props.states.isPartner && props.states.showVerification) {
|
|
1548
|
-
return index.h("sqm-code-verification",
|
|
1563
|
+
return (index.h("sqm-code-verification", { onVerification: props.callbacks.onVerification }));
|
|
1549
1564
|
}
|
|
1550
1565
|
return (index.h(index.Host, null, index.h(BankingInfoFormView, { callbacks: props.callbacks, text: props.text, states: props.states, refs: props.refs, slots: {
|
|
1551
1566
|
formInputsSlot: inputFields === null || inputFields === void 0 ? void 0 : inputFields.map(({ input }) => input),
|
|
@@ -1679,6 +1694,7 @@ function useDemoBankingInfoForm(props) {
|
|
|
1679
1694
|
setPaymentScheduleChecked,
|
|
1680
1695
|
setCountrySearch: () => { },
|
|
1681
1696
|
onBack: async () => setStep("/dashboard"),
|
|
1697
|
+
onVerification: () => { },
|
|
1682
1698
|
},
|
|
1683
1699
|
text: props.getTextProps(),
|
|
1684
1700
|
refs: {
|
|
@@ -1920,7 +1936,6 @@ const DocusignIframe = ({ states, data, callbacks, text, }) => {
|
|
|
1920
1936
|
const allowed = allowedDomains.some((d) => { var _a; return (_a = e.origin) === null || _a === void 0 ? void 0 : _a.includes(d); });
|
|
1921
1937
|
if (!allowed)
|
|
1922
1938
|
return;
|
|
1923
|
-
console.log(e);
|
|
1924
1939
|
if (typeof e.data === "number") {
|
|
1925
1940
|
setiFrameHeight(e.data + "px");
|
|
1926
1941
|
}
|
|
@@ -3779,27 +3794,9 @@ const TableRow = class {
|
|
|
3779
3794
|
}
|
|
3780
3795
|
};
|
|
3781
3796
|
|
|
3782
|
-
/**
|
|
3783
|
-
* Util function for getting just the props with a certain prefix.
|
|
3784
|
-
* @param props Text props on stencil component
|
|
3785
|
-
* @param prefix Prefix denoting which group the text prop belongs to
|
|
3786
|
-
* @returns A new object with all keys with the prefix provided. The prefix is removed from each key.
|
|
3787
|
-
*/
|
|
3788
|
-
function extractProps(props, prefix) {
|
|
3789
|
-
const keys = Object.keys(props).filter((k) => k.startsWith(prefix));
|
|
3790
|
-
const formattedProps = keys.reduce((prev, k) => {
|
|
3791
|
-
const key = k.replace(prefix, "");
|
|
3792
|
-
return {
|
|
3793
|
-
...prev,
|
|
3794
|
-
[key]: props[k],
|
|
3795
|
-
};
|
|
3796
|
-
}, {});
|
|
3797
|
-
return formattedProps;
|
|
3798
|
-
}
|
|
3799
|
-
|
|
3800
3797
|
function getCurrentStep(user) {
|
|
3801
|
-
var _a;
|
|
3802
|
-
if (!((_a = user.impactConnection) === null || _a === void 0 ? void 0 : _a.connected)) {
|
|
3798
|
+
var _a, _b;
|
|
3799
|
+
if (!((_a = user.impactConnection) === null || _a === void 0 ? void 0 : _a.connected) || !((_b = user.impactConnection) === null || _b === void 0 ? void 0 : _b.publisher)) {
|
|
3803
3800
|
return "/1";
|
|
3804
3801
|
}
|
|
3805
3802
|
const { requiredTaxDocumentType, currentTaxDocument, withdrawalSettings, brandedSignup, } = user.impactConnection.publisher;
|
|
@@ -4693,14 +4690,14 @@ const TaxAndCashMonolith = class {
|
|
|
4693
4690
|
* @uiGroup Dashboard Properties
|
|
4694
4691
|
* @uiWidget textArea
|
|
4695
4692
|
*/
|
|
4696
|
-
this.
|
|
4693
|
+
this.payoutHoldAlertHeader = "Your payout is on hold";
|
|
4697
4694
|
/**
|
|
4698
4695
|
* Part of the alert displayed at the top of the page when there’s been an issue preventing payouts.
|
|
4699
4696
|
* @uiName Payout error message description
|
|
4700
4697
|
* @uiGroup Dashboard Properties
|
|
4701
4698
|
* @uiWidget textArea
|
|
4702
4699
|
*/
|
|
4703
|
-
this.
|
|
4700
|
+
this.payoutHoldAlertDescription = "Please contact Support or check your inbox for an email from our referral program provider, impact.com.";
|
|
4704
4701
|
/**
|
|
4705
4702
|
* Text displayed for existing publishers that do not have saved banking information.
|
|
4706
4703
|
* @uiName Payout missing information subtext
|
|
@@ -4850,7 +4847,7 @@ const TaxAndCashMonolith = class {
|
|
|
4850
4847
|
getGeneralStepTextProps(prefix) {
|
|
4851
4848
|
const props = utils.getProps(this);
|
|
4852
4849
|
return {
|
|
4853
|
-
...extractProps(props, prefix),
|
|
4850
|
+
...extractProps.extractProps(props, prefix),
|
|
4854
4851
|
generalErrorTitle: props.generalErrorTitle,
|
|
4855
4852
|
generalErrorDescription: props.generalErrorDescription,
|
|
4856
4853
|
fieldRequiredError: props.fieldRequiredError,
|
|
@@ -4915,6 +4912,12 @@ const style$5 = {
|
|
|
4915
4912
|
borderTop: "none",
|
|
4916
4913
|
},
|
|
4917
4914
|
},
|
|
4915
|
+
HoldAlertContainer: {
|
|
4916
|
+
"&::part(base)": {
|
|
4917
|
+
border: "none",
|
|
4918
|
+
backgroundColor: "transparent",
|
|
4919
|
+
},
|
|
4920
|
+
},
|
|
4918
4921
|
ExpiringSoonAlertContainer: {
|
|
4919
4922
|
"&::part(base)": {
|
|
4920
4923
|
backgroundColor: "var(--sl-color-yellow-100)",
|
|
@@ -5154,22 +5157,22 @@ const TaxAndCashDashboardView = (props) => {
|
|
|
5154
5157
|
index.h("strong", null, text.error.generalTitle),
|
|
5155
5158
|
index.h("br", null),
|
|
5156
5159
|
text.error.generalDescription)),
|
|
5157
|
-
states.
|
|
5158
|
-
index.h("sl-
|
|
5159
|
-
|
|
5160
|
-
|
|
5161
|
-
|
|
5162
|
-
|
|
5163
|
-
|
|
5164
|
-
|
|
5165
|
-
|
|
5166
|
-
|
|
5167
|
-
|
|
5168
|
-
|
|
5169
|
-
|
|
5170
|
-
|
|
5171
|
-
|
|
5172
|
-
|
|
5160
|
+
states.hasHold && (index.h("sl-alert", { exportparts: "base: alert-base, icon:alert-icon", type: "warning", open: true, class: sheet$4.classes.HoldAlertContainer },
|
|
5161
|
+
index.h("sl-icon", { slot: "icon", name: "exclamation-triangle" }),
|
|
5162
|
+
index.h("strong", null, text.payoutHoldAlertHeader),
|
|
5163
|
+
index.h("br", null),
|
|
5164
|
+
text.payoutHoldAlertDescription)),
|
|
5165
|
+
states.payoutStatus === "VERIFICATION_NEEDED" && (index.h("sl-alert", { exportparts: "base: alert-base, icon:alert-icon", type: "warning", open: true, class: sheet$4.classes.HoldAlertContainer },
|
|
5166
|
+
index.h("sl-icon", { slot: "icon", name: "exclamation-triangle" }),
|
|
5167
|
+
index.h("strong", null, text.verificationRequiredHeader),
|
|
5168
|
+
index.h("p", { style: { margin: "0" } }, text.verificationRequiredDescription),
|
|
5169
|
+
index.h("sl-button", { style: { marginTop: "var(--sl-spacing-x-small)" }, type: "default", loading: states.loading,
|
|
5170
|
+
//AL: TODO hooks
|
|
5171
|
+
onClick: () => callbacks.onClick }, text.verificationRequiredButtonText))),
|
|
5172
|
+
index.h("sl-dialog", { noDismiss: true, class: sheet$4.classes.Dialog, open: states.showVerifyIdentity, "onSl-hide": callbacks.onVerifyIdentityCancel },
|
|
5173
|
+
index.h("iframe", {
|
|
5174
|
+
// AL: TODO replace iframe URL with verification url when available
|
|
5175
|
+
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" })),
|
|
5173
5176
|
index.h("sl-dialog", { label: text.replaceTaxFormModalHeader, class: sheet$4.classes.Dialog, open: states.showNewFormDialog, "onSl-hide": callbacks.onNewFormCancel },
|
|
5174
5177
|
index.h("p", null, text.replaceTaxFormModalBodyText),
|
|
5175
5178
|
index.h("sl-button", { slot: "footer", type: "primary", class: sheet$4.classes.DialogButton, onClick: callbacks.onNewFormClick }, text.newFormButton),
|
|
@@ -5275,10 +5278,11 @@ function getIndirectTaxType(taxInformation) {
|
|
|
5275
5278
|
return "Indirect Tax";
|
|
5276
5279
|
}
|
|
5277
5280
|
const useTaxAndCashDashboard = (props) => {
|
|
5278
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
|
|
5281
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
|
|
5279
5282
|
const setStep = index_module.Sn(TAX_CONTEXT_NAMESPACE);
|
|
5280
5283
|
const setContext = index_module.Sn(TAX_FORM_CONTEXT_NAMESPACE);
|
|
5281
5284
|
const [showDialog, setShowDialog] = stencilHooks_module.useState(false);
|
|
5285
|
+
const [showVerification, setShowVerification] = stencilHooks_module.useState(false);
|
|
5282
5286
|
const locale = index_module.Q();
|
|
5283
5287
|
stencilHooks_module.useEffect(() => {
|
|
5284
5288
|
// Clear override context once on submitted
|
|
@@ -5309,6 +5313,7 @@ const useTaxAndCashDashboard = (props) => {
|
|
|
5309
5313
|
setStep("/3");
|
|
5310
5314
|
};
|
|
5311
5315
|
const provinceName = (_d = sqmInvoiceTableView.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;
|
|
5316
|
+
const payoutStatus = usePayoutStatus.getStatus(data);
|
|
5312
5317
|
return {
|
|
5313
5318
|
states: {
|
|
5314
5319
|
dateSubmitted,
|
|
@@ -5330,12 +5335,16 @@ const useTaxAndCashDashboard = (props) => {
|
|
|
5330
5335
|
loading,
|
|
5331
5336
|
loadingError: !!(userError === null || userError === void 0 ? void 0 : userError.message),
|
|
5332
5337
|
showNewFormDialog: showDialog,
|
|
5338
|
+
hasHold: !!((_m = publisher === null || publisher === void 0 ? void 0 : publisher.payoutsAccount) === null || _m === void 0 ? void 0 : _m.hold),
|
|
5339
|
+
payoutStatus,
|
|
5340
|
+
showVerifyIdentity: showVerification,
|
|
5333
5341
|
},
|
|
5334
5342
|
callbacks: {
|
|
5335
5343
|
onClick: () => setShowDialog(true),
|
|
5336
5344
|
onEditPayoutInfo,
|
|
5337
5345
|
onNewFormCancel: () => setShowDialog(false),
|
|
5338
5346
|
onNewFormClick,
|
|
5347
|
+
onVerifyIdentityCancel: () => setShowVerification(false),
|
|
5339
5348
|
},
|
|
5340
5349
|
text: props.getTextProps(),
|
|
5341
5350
|
};
|
|
@@ -5403,18 +5412,6 @@ const TaxAndCashDashboard = class {
|
|
|
5403
5412
|
* @uiName Inactive W-8 error message description
|
|
5404
5413
|
*/
|
|
5405
5414
|
this.taxAlertNotActiveMessageW8 = "Your tax form may have expired or has personal information that doesn’t match your profile. Please submit a new {documentType} form.";
|
|
5406
|
-
/**
|
|
5407
|
-
* Part of the alert displayed at the top of the page.
|
|
5408
|
-
*
|
|
5409
|
-
* @uiName Verify identity warning message header
|
|
5410
|
-
*/
|
|
5411
|
-
this.verifyIdentityAlertHeader = "Verify your identity";
|
|
5412
|
-
/**
|
|
5413
|
-
* Part of the alert displayed at the top of the page.
|
|
5414
|
-
*
|
|
5415
|
-
* @uiName Verify identity warning message description
|
|
5416
|
-
*/
|
|
5417
|
-
this.verifyIdentityAlertMessage = "Complete your verification to start receiving your cash rewards. It should only take a few minutes verify.";
|
|
5418
5415
|
/**
|
|
5419
5416
|
* Additional text displayed next to the tax form's status badge.
|
|
5420
5417
|
*
|
|
@@ -5519,18 +5516,35 @@ const TaxAndCashDashboard = class {
|
|
|
5519
5516
|
* @uiName Payout error message title
|
|
5520
5517
|
* @uiWidget textArea
|
|
5521
5518
|
*/
|
|
5522
|
-
this.
|
|
5519
|
+
this.payoutHoldAlertHeader = "Your payout is on hold";
|
|
5523
5520
|
/**
|
|
5524
5521
|
* Part of the alert displayed at the top of the page when there’s been an issue preventing payouts.
|
|
5525
5522
|
* @uiName Payout error message description
|
|
5526
5523
|
* @uiWidget textArea
|
|
5527
5524
|
*/
|
|
5528
|
-
this.
|
|
5525
|
+
this.payoutHoldAlertDescription = "Please contact Support or check your inbox for an email from our referral program provider, impact.com.";
|
|
5529
5526
|
/**
|
|
5530
5527
|
* Text displayed for existing publishers that do not have saved banking information.
|
|
5531
5528
|
* @uiName Payout missing information subtext
|
|
5532
5529
|
*/
|
|
5533
5530
|
this.payoutMissingInformationText = "Missing banking information, go to Impact.com to resolve.";
|
|
5531
|
+
/**
|
|
5532
|
+
* Part of the alert displayed at the top of the page when the user needs to verify their identity.
|
|
5533
|
+
* @uiName Verification required alert message title
|
|
5534
|
+
* @uiWidget textArea
|
|
5535
|
+
*/
|
|
5536
|
+
this.verificationRequiredHeader = "Verify your identity";
|
|
5537
|
+
/**
|
|
5538
|
+
* Part of the alert displayed at the top of the page when the user needs to verify their identity
|
|
5539
|
+
* @uiName Verification required alert message description
|
|
5540
|
+
* @uiWidget textArea
|
|
5541
|
+
*/
|
|
5542
|
+
this.verificationRequiredDescription = "Complete your verification to start receiving your cash rewards. It should only take a few minutes verify.";
|
|
5543
|
+
/**
|
|
5544
|
+
* Part of the alert displayed at the top of the page when the user needs to verify their identity.
|
|
5545
|
+
* @uiName Verification required alert button text
|
|
5546
|
+
*/
|
|
5547
|
+
this.verificationRequiredButtonText = "Start Verification";
|
|
5534
5548
|
/**
|
|
5535
5549
|
* Part of the alert displayed at the top of the page.
|
|
5536
5550
|
* @uiName Form submission error message title
|
|
@@ -5615,10 +5629,6 @@ const TaxAndCashDashboard = class {
|
|
|
5615
5629
|
* @uiName Cancel button label
|
|
5616
5630
|
*/
|
|
5617
5631
|
this.cancelButton = "Cancel";
|
|
5618
|
-
/**
|
|
5619
|
-
* @uiName Verify button label
|
|
5620
|
-
*/
|
|
5621
|
-
this.verifyIdentityButton = "Start Verification";
|
|
5622
5632
|
stencilHooks_module.h$1(this);
|
|
5623
5633
|
}
|
|
5624
5634
|
disconnectedCallback() { }
|
|
@@ -5657,12 +5667,16 @@ function useDemoTaxAndCashDashboard(props) {
|
|
|
5657
5667
|
disabled: false,
|
|
5658
5668
|
loading: false,
|
|
5659
5669
|
showNewFormDialog: false,
|
|
5670
|
+
hasHold: false,
|
|
5671
|
+
showVerifyIdentity: false,
|
|
5672
|
+
payoutStatus: "DONE",
|
|
5660
5673
|
},
|
|
5661
5674
|
callbacks: {
|
|
5662
5675
|
onClick: () => console.debug("check step"),
|
|
5663
5676
|
onEditPayoutInfo: () => console.debug("payout info"),
|
|
5664
5677
|
onNewFormCancel: () => console.log("hide"),
|
|
5665
5678
|
onNewFormClick: () => console.log("show"),
|
|
5679
|
+
onVerifyIdentityCancel: () => console.log("hide"),
|
|
5666
5680
|
},
|
|
5667
5681
|
text: props.getTextProps(),
|
|
5668
5682
|
}, props.demoData || {}, { arrayMerge: (_, a) => a });
|
|
@@ -6952,17 +6966,20 @@ function useUserInfoForm(props) {
|
|
|
6952
6966
|
const [filteredCurrencies, setFilteredCurrencies] = stencilHooks_module.useState(currencies || []);
|
|
6953
6967
|
const [formErrors, setErrors] = stencilHooks_module.useState({});
|
|
6954
6968
|
stencilHooks_module.useEffect(() => {
|
|
6955
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
6969
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
6956
6970
|
const user = data === null || data === void 0 ? void 0 : data.user;
|
|
6957
6971
|
if (!user || step !== "/1")
|
|
6958
6972
|
return;
|
|
6959
6973
|
// If form already filled out, skip initialising it
|
|
6960
6974
|
if (sqmInvoiceTableView.objectIsFull(userFormContext))
|
|
6961
6975
|
return;
|
|
6962
|
-
|
|
6976
|
+
// Prefer MI email if it was verified before this
|
|
6977
|
+
const email = ((_a = user.managedIdentity) === null || _a === void 0 ? void 0 : _a.emailVerified) ? user.managedIdentity.email
|
|
6978
|
+
: user.email;
|
|
6979
|
+
if (((_b = user.impactConnection) === null || _b === void 0 ? void 0 : _b.publisher) && ((_c = user.impactConnection) === null || _c === void 0 ? void 0 : _c.user)) {
|
|
6963
6980
|
// Initialise with partner information
|
|
6964
6981
|
setUserFormContext({
|
|
6965
|
-
email
|
|
6982
|
+
email,
|
|
6966
6983
|
firstName: user.impactConnection.user.firstName,
|
|
6967
6984
|
lastName: user.impactConnection.user.lastName,
|
|
6968
6985
|
countryCode: user.impactConnection.publisher.countryCode,
|
|
@@ -6978,17 +6995,17 @@ function useUserInfoForm(props) {
|
|
|
6978
6995
|
else if (!(userFormContext === null || userFormContext === void 0 ? void 0 : userFormContext.email)) {
|
|
6979
6996
|
// Initialise with user information
|
|
6980
6997
|
setUserFormContext({
|
|
6981
|
-
email
|
|
6998
|
+
email,
|
|
6982
6999
|
firstName: user.firstName,
|
|
6983
7000
|
lastName: user.lastName,
|
|
6984
7001
|
countryCode: user.countryCode || "US",
|
|
6985
|
-
currency: (
|
|
6986
|
-
phoneNumberCountryCode: ((
|
|
6987
|
-
phoneNumber: (
|
|
6988
|
-
address: (
|
|
6989
|
-
city: (
|
|
6990
|
-
state: (
|
|
6991
|
-
postalCode: (
|
|
7002
|
+
currency: (_d = user.customFields) === null || _d === void 0 ? void 0 : _d.currency,
|
|
7003
|
+
phoneNumberCountryCode: ((_e = user.customFields) === null || _e === void 0 ? void 0 : _e.phoneNumberCountryCode) || "US",
|
|
7004
|
+
phoneNumber: (_f = user.customFields) === null || _f === void 0 ? void 0 : _f.phoneNumber,
|
|
7005
|
+
address: (_g = user.customFields) === null || _g === void 0 ? void 0 : _g.address,
|
|
7006
|
+
city: (_h = user.customFields) === null || _h === void 0 ? void 0 : _h.city,
|
|
7007
|
+
state: (_j = user.customFields) === null || _j === void 0 ? void 0 : _j.state,
|
|
7008
|
+
postalCode: (_k = user.customFields) === null || _k === void 0 ? void 0 : _k.postalCode,
|
|
6992
7009
|
});
|
|
6993
7010
|
}
|
|
6994
7011
|
}, [data, step, userFormContext]);
|
|
@@ -7067,6 +7084,8 @@ function useUserInfoForm(props) {
|
|
|
7067
7084
|
const { allowBankingCollection, ...userData } = formData;
|
|
7068
7085
|
setUserFormContext({
|
|
7069
7086
|
...userFormContext,
|
|
7087
|
+
firstName: userData.firstName,
|
|
7088
|
+
lastName: userData.lastName,
|
|
7070
7089
|
phoneNumberCountryCode: userData.phoneNumberCountryCode,
|
|
7071
7090
|
phoneNumber: userData.phoneNumber,
|
|
7072
7091
|
countryCode: userData.countryCode,
|
|
@@ -19,8 +19,9 @@ const index$1 = require('./index-8c6255f5.js');
|
|
|
19
19
|
const useRegistrationFormState = require('./useRegistrationFormState-f9ce55be.js');
|
|
20
20
|
const utilities = require('./utilities-f7de6c04.js');
|
|
21
21
|
const AsYouType = require('./AsYouType-6788393a.js');
|
|
22
|
-
const ShadowViewAddon = require('./ShadowViewAddon-
|
|
22
|
+
const ShadowViewAddon = require('./ShadowViewAddon-040cffad.js');
|
|
23
23
|
require('./sqm-portal-container-view-990a85a3.js');
|
|
24
|
+
const usePayoutStatus = require('./usePayoutStatus-b9fb7399.js');
|
|
24
25
|
|
|
25
26
|
const BigStat = class {
|
|
26
27
|
constructor(hostRef) {
|
|
@@ -1727,6 +1728,7 @@ const style$2 = {
|
|
|
1727
1728
|
PayoutButtonDescription: {
|
|
1728
1729
|
color: "var(--sl-color-neutral-500)",
|
|
1729
1730
|
fontSize: "var(--sl-font-size-small)",
|
|
1731
|
+
margin: "0",
|
|
1730
1732
|
},
|
|
1731
1733
|
};
|
|
1732
1734
|
const sheet$2 = JSS.createStyleSheet(style$2);
|
|
@@ -1744,7 +1746,14 @@ function PayoutButtonScrollView(props) {
|
|
|
1744
1746
|
const PayoutButtonScroll = class {
|
|
1745
1747
|
constructor(hostRef) {
|
|
1746
1748
|
index.registerInstance(this, hostRef);
|
|
1749
|
+
/**
|
|
1750
|
+
* @uiName Payout button text
|
|
1751
|
+
*/
|
|
1747
1752
|
this.payoutButtonText = "Payouts & Tax Settings";
|
|
1753
|
+
/**
|
|
1754
|
+
* Description text under payout button
|
|
1755
|
+
* @uiName Payout button description text
|
|
1756
|
+
*/
|
|
1748
1757
|
this.payoutButtonDescription = "Check your payout settings to see when you’ll get paid out next";
|
|
1749
1758
|
this.ignored = true;
|
|
1750
1759
|
stencilHooks_module.h$1(this);
|
|
@@ -1776,12 +1785,53 @@ const style$3 = {
|
|
|
1776
1785
|
margin: "0",
|
|
1777
1786
|
marginBottom: "var(--sl-spacing-small)",
|
|
1778
1787
|
},
|
|
1788
|
+
ErrorAlertContainer: {
|
|
1789
|
+
"&::part(base)": {
|
|
1790
|
+
backgroundColor: "var(--sl-color-red-100)",
|
|
1791
|
+
borderTop: "none",
|
|
1792
|
+
},
|
|
1793
|
+
"& sl-icon::part(base)": {
|
|
1794
|
+
color: "var(--sl-color-danger-500)",
|
|
1795
|
+
},
|
|
1796
|
+
},
|
|
1797
|
+
WarningAlertContainer: {
|
|
1798
|
+
"&::part(base)": {
|
|
1799
|
+
backgroundColor: "var(--sl-color-yellow-100)",
|
|
1800
|
+
borderTop: "none",
|
|
1801
|
+
},
|
|
1802
|
+
"& sl-icon::part(base)": {
|
|
1803
|
+
color: "var(--sl-color-danger-500)",
|
|
1804
|
+
},
|
|
1805
|
+
},
|
|
1806
|
+
InfoAlertContainer: {
|
|
1807
|
+
"&::part(base)": {
|
|
1808
|
+
backgroundColor: "var(--sl-color-sky-100)",
|
|
1809
|
+
borderTop: "none",
|
|
1810
|
+
},
|
|
1811
|
+
"& sl-icon::part(base)": {
|
|
1812
|
+
color: "var(--sl-color-blue-500)",
|
|
1813
|
+
},
|
|
1814
|
+
},
|
|
1815
|
+
Dialog: {
|
|
1816
|
+
"&::part(panel)": {
|
|
1817
|
+
height: "600px",
|
|
1818
|
+
},
|
|
1819
|
+
"&::part(close-button)": {
|
|
1820
|
+
marginBottom: "var(--sl-spacing-xx-large)",
|
|
1821
|
+
},
|
|
1822
|
+
"&::part(title)": {
|
|
1823
|
+
display: "none",
|
|
1824
|
+
},
|
|
1825
|
+
"&::part(header)": {},
|
|
1826
|
+
"&::part(body)": { padding: "0" },
|
|
1827
|
+
"&::part(footer)": {},
|
|
1828
|
+
},
|
|
1779
1829
|
};
|
|
1780
1830
|
const sheet$3 = JSS.createStyleSheet(style$3);
|
|
1781
1831
|
const styleString$3 = sheet$3.toString();
|
|
1782
1832
|
function PayoutStatusAlertView(props) {
|
|
1783
|
-
var _a, _b, _c, _d;
|
|
1784
|
-
const { text, states } = props;
|
|
1833
|
+
var _a, _b, _c, _d, _e;
|
|
1834
|
+
const { text, states, data, callbacks } = props;
|
|
1785
1835
|
if (states.loading) {
|
|
1786
1836
|
return index.h("sl-skeleton", { class: sheet$3.classes.SkeletonOne });
|
|
1787
1837
|
}
|
|
@@ -1789,14 +1839,24 @@ function PayoutStatusAlertView(props) {
|
|
|
1789
1839
|
return index.h("div", null);
|
|
1790
1840
|
}
|
|
1791
1841
|
function getAlert(status) {
|
|
1842
|
+
if (states.error)
|
|
1843
|
+
return {
|
|
1844
|
+
header: text.errorHeader,
|
|
1845
|
+
description: text.errorDescription,
|
|
1846
|
+
buttonText: null,
|
|
1847
|
+
alertType: "critical",
|
|
1848
|
+
icon: "exclamation-triangle",
|
|
1849
|
+
class: sheet$3.classes.ErrorAlertContainer,
|
|
1850
|
+
};
|
|
1792
1851
|
switch (status) {
|
|
1793
1852
|
case "INFORMATION_REQUIRED":
|
|
1794
1853
|
return {
|
|
1795
1854
|
header: text.informationRequiredHeader,
|
|
1796
1855
|
description: text.informationRequiredDescription,
|
|
1797
|
-
buttonText: text.
|
|
1856
|
+
buttonText: text.informationRequiredButtonText,
|
|
1798
1857
|
alertType: "info",
|
|
1799
|
-
icon: "
|
|
1858
|
+
icon: "info-circle",
|
|
1859
|
+
class: sheet$3.classes.InfoAlertContainer,
|
|
1800
1860
|
};
|
|
1801
1861
|
case "VERIFICATION_NEEDED":
|
|
1802
1862
|
return {
|
|
@@ -1804,7 +1864,8 @@ function PayoutStatusAlertView(props) {
|
|
|
1804
1864
|
description: text.verificationRequiredDescription,
|
|
1805
1865
|
buttonText: text.verificationRequiredButtonText,
|
|
1806
1866
|
alertType: "warning",
|
|
1807
|
-
icon: "exclamation-
|
|
1867
|
+
icon: "exclamation-triangle",
|
|
1868
|
+
class: sheet$3.classes.WarningAlertContainer,
|
|
1808
1869
|
};
|
|
1809
1870
|
case "HOLD":
|
|
1810
1871
|
return {
|
|
@@ -1812,7 +1873,8 @@ function PayoutStatusAlertView(props) {
|
|
|
1812
1873
|
description: text.holdDescription,
|
|
1813
1874
|
buttonText: null,
|
|
1814
1875
|
alertType: "warning",
|
|
1815
|
-
icon: "exclamation-
|
|
1876
|
+
icon: "exclamation-triangle",
|
|
1877
|
+
class: sheet$3.classes.WarningAlertContainer,
|
|
1816
1878
|
};
|
|
1817
1879
|
default:
|
|
1818
1880
|
return;
|
|
@@ -1822,81 +1884,75 @@ function PayoutStatusAlertView(props) {
|
|
|
1822
1884
|
function getButton(status) {
|
|
1823
1885
|
switch (status) {
|
|
1824
1886
|
case "INFORMATION_REQUIRED":
|
|
1825
|
-
return (index.h("sqm-scroll", { "scroll-tag-name": "sqm-tabs", "button-text": "
|
|
1887
|
+
return data.type === "SquatchJS2" ? (index.h("sqm-scroll", { "scroll-tag-name": "sqm-tabs", "button-text": text.informationRequiredButtonText, "scroll-animation": "smooth" })) : data.type === "SquatchPortal" ? (index.h("sl-button", { type: "default", onClick: callbacks.onTermsClick }, text.informationRequiredButtonText)) : (index.h("sl-button", { type: "default" }, text.informationRequiredButtonText));
|
|
1826
1888
|
case "VERIFICATION_NEEDED":
|
|
1827
|
-
return (index.h("sl-button", { type: "default", loading: states.loading
|
|
1889
|
+
return (index.h("sl-button", { type: "default", loading: states.loading,
|
|
1890
|
+
//AL: TODO callback to open verification form
|
|
1891
|
+
onClick: () => callbacks.onClick }, text.verificationRequiredButtonText));
|
|
1828
1892
|
default:
|
|
1829
1893
|
return;
|
|
1830
1894
|
}
|
|
1831
1895
|
}
|
|
1832
1896
|
return (index.h("div", { part: "sqm-base" },
|
|
1833
1897
|
index.h("style", { type: "text/css" }, styleString$3),
|
|
1834
|
-
index.h("
|
|
1835
|
-
index.h("sl-icon", { slot: "icon", name: (
|
|
1836
|
-
index.h("strong", null, (
|
|
1837
|
-
index.h("p", { class: sheet$3.classes.AlertDescriptionText }, (
|
|
1838
|
-
getButton(states.status))
|
|
1839
|
-
}
|
|
1840
|
-
|
|
1841
|
-
|
|
1842
|
-
|
|
1843
|
-
user: viewer {
|
|
1844
|
-
... on User {
|
|
1845
|
-
id
|
|
1846
|
-
impactConnection {
|
|
1847
|
-
connected
|
|
1848
|
-
publisher {
|
|
1849
|
-
id
|
|
1850
|
-
payoutsAccount {
|
|
1851
|
-
hold
|
|
1852
|
-
}
|
|
1853
|
-
}
|
|
1854
|
-
}
|
|
1855
|
-
}
|
|
1856
|
-
}
|
|
1857
|
-
}
|
|
1858
|
-
`;
|
|
1859
|
-
function usePayoutStatus(props) {
|
|
1860
|
-
const { loading, data, errors, refetch } = index_module.En(GET_USER_STATUS, {});
|
|
1861
|
-
const [status, setStatus] = stencilHooks_module.useState(undefined);
|
|
1862
|
-
stencilHooks_module.useEffect(() => {
|
|
1863
|
-
if (!data)
|
|
1864
|
-
return;
|
|
1865
|
-
function getStatus(data) {
|
|
1866
|
-
var _a, _b;
|
|
1867
|
-
const account = (_b = (_a = data.user.impactConnection) === null || _a === void 0 ? void 0 : _a.publisher) === null || _b === void 0 ? void 0 : _b.payoutsAccount;
|
|
1868
|
-
if (!account)
|
|
1869
|
-
return "INFORMATION_REQUIRED";
|
|
1870
|
-
if (account.hold)
|
|
1871
|
-
return "HOLD";
|
|
1872
|
-
// @ts-ignore, TODO: add check for account verification
|
|
1873
|
-
if (!account.verified)
|
|
1874
|
-
return "VERIFICATION_NEEDED";
|
|
1875
|
-
return "DONE";
|
|
1876
|
-
}
|
|
1877
|
-
const s = getStatus(data);
|
|
1878
|
-
setStatus(s);
|
|
1879
|
-
}, [data]);
|
|
1880
|
-
stencilHooks_module.useEffect(() => {
|
|
1881
|
-
const cb = () => refetch();
|
|
1882
|
-
window.addEventListener("sqm:tax-form-updated", cb);
|
|
1883
|
-
return () => window.removeEventListener("sqm:tax-form-updated", cb);
|
|
1884
|
-
}, []);
|
|
1885
|
-
console.log({ data });
|
|
1886
|
-
return { states: { loading, status }, text: props.getTextProps() };
|
|
1898
|
+
index.h("sl-alert", { exportparts: "base: alert-base, icon:alert-icon", type: (_a = getAlert(states.status)) === null || _a === void 0 ? void 0 : _a.alertType, class: (_b = getAlert(states.status)) === null || _b === void 0 ? void 0 : _b.class, open: true },
|
|
1899
|
+
index.h("sl-icon", { slot: "icon", name: (_c = getAlert(states.status)) === null || _c === void 0 ? void 0 : _c.icon }),
|
|
1900
|
+
index.h("strong", null, (_d = getAlert(states.status)) === null || _d === void 0 ? void 0 : _d.header),
|
|
1901
|
+
index.h("p", { class: sheet$3.classes.AlertDescriptionText }, (_e = getAlert(states.status)) === null || _e === void 0 ? void 0 : _e.description),
|
|
1902
|
+
getButton(states.status)),
|
|
1903
|
+
index.h("sl-dialog", { noDismiss: true, class: sheet$3.classes.Dialog, open: states.showVerifyIdentity, "onSl-hide": callbacks.onCancel },
|
|
1904
|
+
index.h("iframe", {
|
|
1905
|
+
// AL: TODO replace iframe URL with verification url when available
|
|
1906
|
+
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" }))));
|
|
1887
1907
|
}
|
|
1888
1908
|
|
|
1889
1909
|
const PayoutStatusAlert = class {
|
|
1890
1910
|
constructor(hostRef) {
|
|
1891
1911
|
index.registerInstance(this, hostRef);
|
|
1912
|
+
/**
|
|
1913
|
+
* @uiName Info required alert header
|
|
1914
|
+
*/
|
|
1892
1915
|
this.informationRequiredHeader = "Payout and tax information required";
|
|
1916
|
+
/**
|
|
1917
|
+
* @uiName Info required alert description
|
|
1918
|
+
*/
|
|
1893
1919
|
this.informationRequiredDescription = "Submit your banking details and tax documents to receive your rewards.";
|
|
1920
|
+
/**
|
|
1921
|
+
* @uiName Info required alert button text
|
|
1922
|
+
*/
|
|
1894
1923
|
this.informationRequiredButtonText = "Payouts & Tax Settings";
|
|
1924
|
+
/**
|
|
1925
|
+
* @uiName Verification required alert header
|
|
1926
|
+
*/
|
|
1895
1927
|
this.verificationRequiredHeader = "Verify your identity";
|
|
1928
|
+
/**
|
|
1929
|
+
* @uiName Verification required alert description
|
|
1930
|
+
*/
|
|
1896
1931
|
this.verificationRequiredDescription = "Complete your verification to start receiving your cash rewards. It should only take a few minutes verify.";
|
|
1932
|
+
/**
|
|
1933
|
+
* @uiName Verification required alert button text
|
|
1934
|
+
*/
|
|
1897
1935
|
this.verificationRequiredButtonText = "Start Verification";
|
|
1936
|
+
/**
|
|
1937
|
+
* @uiName Payout on hold alert header
|
|
1938
|
+
*/
|
|
1898
1939
|
this.holdHeader = "Your payouts and account are on hold";
|
|
1940
|
+
/**
|
|
1941
|
+
* @uiName Payout on hold alert description
|
|
1942
|
+
*/
|
|
1899
1943
|
this.holdDescription = "Please check your inbox for an email from our referral provider, impact.com. It contains details on how to resolve this issue. If you need further assistance, feel free to reach out to {support email}.";
|
|
1944
|
+
/**
|
|
1945
|
+
* @uiName Cash & Payouts Terms and Conditions url
|
|
1946
|
+
*/
|
|
1947
|
+
this.termsUrl = "https://terms.advocate.impact.com/PayoutTermsAndConditions.html";
|
|
1948
|
+
/**
|
|
1949
|
+
* @uiName Error header
|
|
1950
|
+
*/
|
|
1951
|
+
this.errorHeader = "Could not determine payout status.";
|
|
1952
|
+
/**
|
|
1953
|
+
* @uiName Error description
|
|
1954
|
+
*/
|
|
1955
|
+
this.errorDescription = "There was an error with determining your payout status.";
|
|
1900
1956
|
stencilHooks_module.h$1(this);
|
|
1901
1957
|
}
|
|
1902
1958
|
disconnectedCallback() { }
|
|
@@ -1906,17 +1962,26 @@ const PayoutStatusAlert = class {
|
|
|
1906
1962
|
render() {
|
|
1907
1963
|
const props = index_module.isDemo()
|
|
1908
1964
|
? useDemoPayoutStatusAlert(this)
|
|
1909
|
-
: usePayoutStatus(this);
|
|
1965
|
+
: usePayoutStatus.usePayoutStatus(this);
|
|
1966
|
+
console.log({ props });
|
|
1910
1967
|
return index.h(PayoutStatusAlertView, Object.assign({}, props));
|
|
1911
1968
|
}
|
|
1912
1969
|
};
|
|
1913
1970
|
function useDemoPayoutStatusAlert(props) {
|
|
1914
1971
|
return cjs.cjs({
|
|
1915
1972
|
states: {
|
|
1973
|
+
error: false,
|
|
1916
1974
|
status: "INFORMATION_REQUIRED",
|
|
1917
1975
|
loading: false,
|
|
1976
|
+
showVerifyIdentity: false,
|
|
1918
1977
|
},
|
|
1978
|
+
data: { type: "SquatchAdmin" },
|
|
1919
1979
|
text: props.getTextProps(),
|
|
1980
|
+
callbacks: {
|
|
1981
|
+
onTermsClick: () => { },
|
|
1982
|
+
onClick: () => console.log("show"),
|
|
1983
|
+
onCancel: () => console.log("hide"),
|
|
1984
|
+
},
|
|
1920
1985
|
}, props.demoData || {}, { arrayMerge: (_, a) => a });
|
|
1921
1986
|
}
|
|
1922
1987
|
|