@saasquatch/mint-components 1.12.0-5 → 1.12.0-7
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/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 +47 -18
- package/dist/cjs/sqm-big-stat_39.cjs.entry.js +33 -6
- package/dist/cjs/sqm-code-verification.cjs.entry.js +34 -48
- package/dist/cjs/sqm-email-verification.cjs.entry.js +143 -21
- package/dist/cjs/{sqm-invoice-table-view-dbba9bb4.js → sqm-invoice-table-view-e530775f.js} +39 -0
- package/dist/cjs/sqm-stencilbook.cjs.entry.js +19 -1
- package/dist/cjs/sqm-widget-verification-internal.cjs.entry.js +55 -7
- package/dist/cjs/sqm-widget-verification.cjs.entry.js +15 -18
- package/dist/cjs/useVerificationEmail-35aea294.js +170 -0
- package/dist/collection/collection-manifest.json +1 -1
- package/dist/collection/components/sqm-widget-verification/sqm-code-verification/WidgetCodeVerification.stories.js +7 -0
- package/dist/collection/components/sqm-widget-verification/sqm-code-verification/sqm-code-verification-view.js +1 -1
- package/dist/collection/components/sqm-widget-verification/sqm-code-verification/sqm-code-verification.js +20 -2
- package/dist/collection/components/sqm-widget-verification/sqm-code-verification/useCodeVerification.js +33 -24
- package/dist/collection/components/sqm-widget-verification/sqm-email-verification/useEmailVerification.js +19 -42
- package/dist/collection/components/sqm-widget-verification/sqm-widget-verification-internal.js +56 -7
- package/dist/collection/components/sqm-widget-verification/sqm-widget-verification.js +17 -20
- 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 +38 -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-payout-status-alert/PayoutStatusAlert.stories.js +8 -0
- package/dist/collection/components/tax-and-cash/sqm-payout-status-alert/sqm-payout-status-alert-view.js +10 -5
- package/dist/collection/components/tax-and-cash/sqm-payout-status-alert/sqm-payout-status-alert.js +33 -1
- package/dist/collection/components/tax-and-cash/sqm-payout-status-alert/usePayoutStatus.js +13 -2
- package/dist/collection/components/tax-and-cash/sqm-tax-and-cash/data.js +5 -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-dashboard/sqm-tax-and-cash-dashboard-view.js +11 -0
- package/dist/collection/components/tax-and-cash/sqm-tax-and-cash-dashboard/sqm-tax-and-cash-dashboard.js +10 -9
- package/dist/collection/components/tax-and-cash/sqm-tax-and-cash-dashboard/useTaxAndCashDashboard.js +2 -1
- package/dist/collection/components/tax-and-cash/sqm-user-info-form/useUserInfoForm.js +14 -11
- 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 +48 -19
- package/dist/esm/sqm-big-stat_39.entry.js +34 -7
- package/dist/esm/sqm-code-verification.entry.js +36 -50
- package/dist/esm/sqm-email-verification.entry.js +127 -5
- package/dist/esm/{sqm-invoice-table-view-663674f2.js → sqm-invoice-table-view-22bb7240.js} +39 -0
- package/dist/esm/sqm-stencilbook.entry.js +19 -1
- package/dist/esm/sqm-widget-verification-internal.entry.js +55 -7
- package/dist/esm/sqm-widget-verification.entry.js +17 -20
- package/dist/esm/useVerificationEmail-02b78bd7.js +168 -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-22bb7240.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/useVerificationEmail-02b78bd7.js +1 -0
- package/dist/mint-components/mint-components.esm.js +1 -1
- package/dist/mint-components/{p-53d9df5e.entry.js → p-0aebee07.entry.js} +8 -3
- package/dist/mint-components/p-0e2d876d.entry.js +240 -0
- package/dist/mint-components/p-116c1809.entry.js +11 -0
- package/dist/mint-components/{p-99a09fab.entry.js → p-126a4f24.entry.js} +2 -2
- package/dist/mint-components/p-22b7bd75.system.entry.js +1 -0
- package/dist/mint-components/{p-d4138847.system.entry.js → p-28450e40.system.entry.js} +1 -1
- package/dist/mint-components/p-2b5b2586.system.js +1 -0
- package/dist/mint-components/p-39840341.js +1 -0
- package/dist/mint-components/p-4a43ffbd.js +1 -0
- package/dist/mint-components/p-55fe2ec0.system.entry.js +1 -0
- package/dist/mint-components/p-6fb496ac.entry.js +12 -0
- package/dist/mint-components/p-71b8adf7.system.js +1 -0
- package/dist/mint-components/p-7666cd3d.js +48 -0
- package/dist/mint-components/p-87bf9880.entry.js +25 -0
- package/dist/mint-components/p-8a7d2170.system.entry.js +1 -0
- package/dist/mint-components/p-a5eedbe2.system.entry.js +1 -0
- package/dist/mint-components/p-a60ec391.system.entry.js +1 -0
- package/dist/mint-components/p-b2a99637.system.js +1 -0
- package/dist/mint-components/p-ca423ca2.system.entry.js +1 -0
- package/dist/mint-components/p-e05ff098.system.js +1 -1
- package/dist/mint-components/p-e373b78a.entry.js +1 -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 +1 -0
- package/dist/types/components/sqm-widget-verification/sqm-code-verification/sqm-code-verification.d.ts +4 -0
- package/dist/types/components/sqm-widget-verification/sqm-code-verification/useCodeVerification.d.ts +2 -1
- package/dist/types/components/sqm-widget-verification/sqm-email-verification/useEmailVerification.d.ts +0 -6
- 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 +1 -0
- package/dist/types/components/tax-and-cash/sqm-payout-status-alert/sqm-payout-status-alert-view.d.ts +9 -0
- package/dist/types/components/tax-and-cash/sqm-payout-status-alert/sqm-payout-status-alert.d.ts +4 -0
- package/dist/types/components/tax-and-cash/sqm-payout-status-alert/usePayoutStatus.d.ts +9 -0
- package/dist/types/components/tax-and-cash/sqm-tax-and-cash/data.d.ts +5 -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 +3 -0
- package/dist/types/components/tax-and-cash/sqm-tax-and-cash-dashboard/sqm-tax-and-cash-dashboard.d.ts +2 -2
- package/dist/types/components.d.ts +68 -52
- 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-33465f36.js +0 -155
- package/dist/collection/components/sqm-widget-verification/useWidgetVerification.js +0 -3
- package/dist/esm/useEmailVerification-8f2dc2bd.js +0 -152
- package/dist/esm-es5/sqm-invoice-table-view-663674f2.js +0 -1
- package/dist/esm-es5/useEmailVerification-8f2dc2bd.js +0 -1
- package/dist/mint-components/p-158e9d3a.entry.js +0 -1
- package/dist/mint-components/p-20c5ce3d.system.entry.js +0 -1
- package/dist/mint-components/p-219be817.system.entry.js +0 -1
- package/dist/mint-components/p-2c03096f.system.entry.js +0 -1
- package/dist/mint-components/p-4c9b6fbe.system.js +0 -1
- package/dist/mint-components/p-4d060f15.js +0 -1
- package/dist/mint-components/p-5810e318.entry.js +0 -1
- package/dist/mint-components/p-6029c42d.entry.js +0 -8
- package/dist/mint-components/p-6cae44d7.js +0 -1
- package/dist/mint-components/p-78c1bd77.system.js +0 -1
- package/dist/mint-components/p-80a32fe9.system.entry.js +0 -1
- package/dist/mint-components/p-a2baff3e.entry.js +0 -1
- package/dist/mint-components/p-b52b7e60.system.entry.js +0 -1
- package/dist/mint-components/p-f4dff47a.system.entry.js +0 -1
- package/dist/mint-components/p-faf019cf.system.js +0 -1
- package/dist/mint-components/p-fcb224ab.js +0 -25
- package/dist/mint-components/p-ff77d11f.entry.js +0 -240
- package/dist/types/components/sqm-widget-verification/useWidgetVerification.d.ts +0 -1
|
@@ -32,7 +32,7 @@ const sheet = createStyleSheet(style);
|
|
|
32
32
|
const styleString = sheet.toString();
|
|
33
33
|
export function PayoutStatusAlertView(props) {
|
|
34
34
|
var _a, _b, _c, _d, _e;
|
|
35
|
-
const { text, states } = props;
|
|
35
|
+
const { text, states, data, callbacks } = props;
|
|
36
36
|
if (states.loading) {
|
|
37
37
|
return h("sl-skeleton", { class: sheet.classes.SkeletonOne });
|
|
38
38
|
}
|
|
@@ -45,7 +45,7 @@ export function PayoutStatusAlertView(props) {
|
|
|
45
45
|
return {
|
|
46
46
|
header: text.informationRequiredHeader,
|
|
47
47
|
description: text.informationRequiredDescription,
|
|
48
|
-
buttonText: text.
|
|
48
|
+
buttonText: text.informationRequiredButtonText,
|
|
49
49
|
alertType: "info",
|
|
50
50
|
icon: "info-circle",
|
|
51
51
|
class: sheet.classes.InfoAlertContainer,
|
|
@@ -76,9 +76,11 @@ export function PayoutStatusAlertView(props) {
|
|
|
76
76
|
function getButton(status) {
|
|
77
77
|
switch (status) {
|
|
78
78
|
case "INFORMATION_REQUIRED":
|
|
79
|
-
return (h("sqm-scroll", { "scroll-tag-name": "sqm-tabs", "button-text": "
|
|
79
|
+
return data.type === "SquatchJS2" ? (h("sqm-scroll", { "scroll-tag-name": "sqm-tabs", "button-text": text.informationRequiredButtonText, "scroll-animation": "smooth" })) : data.type === "SquatchPortal" ? (h("sl-button", { type: "default", onClick: callbacks.onTermsClick }, text.informationRequiredButtonText)) : (h("sl-button", { type: "default" }, text.informationRequiredButtonText));
|
|
80
80
|
case "VERIFICATION_NEEDED":
|
|
81
|
-
return (h("sl-button", { type: "default", loading: states.loading
|
|
81
|
+
return (h("sl-button", { type: "default", loading: states.loading,
|
|
82
|
+
//AL: TODO callback to open verification form
|
|
83
|
+
onClick: () => callbacks.onClick }, text.verificationRequiredButtonText));
|
|
82
84
|
default:
|
|
83
85
|
return;
|
|
84
86
|
}
|
|
@@ -89,5 +91,8 @@ export function PayoutStatusAlertView(props) {
|
|
|
89
91
|
h("sl-icon", { slot: "icon", name: (_c = getAlert(states.status)) === null || _c === void 0 ? void 0 : _c.icon }),
|
|
90
92
|
h("strong", null, (_d = getAlert(states.status)) === null || _d === void 0 ? void 0 : _d.header),
|
|
91
93
|
h("p", { class: sheet.classes.AlertDescriptionText }, (_e = getAlert(states.status)) === null || _e === void 0 ? void 0 : _e.description),
|
|
92
|
-
getButton(states.status))
|
|
94
|
+
getButton(states.status)),
|
|
95
|
+
h("sl-dialog", {
|
|
96
|
+
// class={sheet.classes.Dialog}
|
|
97
|
+
open: states.showVerifyIdentity, "onSl-hide": callbacks.onCancel }, "AL: TODO add IFRAME URL")));
|
|
93
98
|
}
|
package/dist/collection/components/tax-and-cash/sqm-payout-status-alert/sqm-payout-status-alert.js
CHANGED
|
@@ -44,6 +44,10 @@ export class PayoutStatusAlert {
|
|
|
44
44
|
* @uiName Payout on hold alert description
|
|
45
45
|
*/
|
|
46
46
|
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}.";
|
|
47
|
+
/**
|
|
48
|
+
* @uiName Cash & Payouts Terms and Conditions url
|
|
49
|
+
*/
|
|
50
|
+
this.termsUrl = "https://terms.advocate.impact.com/PayoutTermsAndConditions.html";
|
|
47
51
|
withHooks(this);
|
|
48
52
|
}
|
|
49
53
|
disconnectedCallback() { }
|
|
@@ -227,12 +231,33 @@ export class PayoutStatusAlert {
|
|
|
227
231
|
"reflect": false,
|
|
228
232
|
"defaultValue": "\"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}.\""
|
|
229
233
|
},
|
|
234
|
+
"termsUrl": {
|
|
235
|
+
"type": "string",
|
|
236
|
+
"mutable": false,
|
|
237
|
+
"complexType": {
|
|
238
|
+
"original": "string",
|
|
239
|
+
"resolved": "string",
|
|
240
|
+
"references": {}
|
|
241
|
+
},
|
|
242
|
+
"required": false,
|
|
243
|
+
"optional": false,
|
|
244
|
+
"docs": {
|
|
245
|
+
"tags": [{
|
|
246
|
+
"text": "Cash & Payouts Terms and Conditions url",
|
|
247
|
+
"name": "uiName"
|
|
248
|
+
}],
|
|
249
|
+
"text": ""
|
|
250
|
+
},
|
|
251
|
+
"attribute": "terms-url",
|
|
252
|
+
"reflect": false,
|
|
253
|
+
"defaultValue": "\"https://terms.advocate.impact.com/PayoutTermsAndConditions.html\""
|
|
254
|
+
},
|
|
230
255
|
"demoData": {
|
|
231
256
|
"type": "unknown",
|
|
232
257
|
"mutable": false,
|
|
233
258
|
"complexType": {
|
|
234
259
|
"original": "DemoData<PayoutStatusAlertViewProps>",
|
|
235
|
-
"resolved": "{ states?: { loading: boolean; status: PayoutStatus; }; }",
|
|
260
|
+
"resolved": "{ states?: { loading: boolean; status: PayoutStatus; showVerifyIdentity: boolean; }; data?: { type: \"SquatchJS2\" | \"SquatchAndroid\" | \"SquatchIOS\" | \"SquatchPortal\" | \"SquatchAdmin\" | \"None\"; }; }",
|
|
236
261
|
"references": {
|
|
237
262
|
"DemoData": {
|
|
238
263
|
"location": "import",
|
|
@@ -264,7 +289,14 @@ function useDemoPayoutStatusAlert(props) {
|
|
|
264
289
|
states: {
|
|
265
290
|
status: "INFORMATION_REQUIRED",
|
|
266
291
|
loading: false,
|
|
292
|
+
showVerifyIdentity: false,
|
|
267
293
|
},
|
|
294
|
+
data: { type: "SquatchAdmin" },
|
|
268
295
|
text: props.getTextProps(),
|
|
296
|
+
callbacks: {
|
|
297
|
+
onTermsClick: () => { },
|
|
298
|
+
onClick: () => console.log("show"),
|
|
299
|
+
onCancel: () => console.log("hide"),
|
|
300
|
+
},
|
|
269
301
|
}, props.demoData || {}, { arrayMerge: (_, a) => a });
|
|
270
302
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { useQuery } from "@saasquatch/component-boilerplate";
|
|
1
|
+
import { getEnvironmentSDK, useQuery } from "@saasquatch/component-boilerplate";
|
|
2
2
|
import { useState, useEffect } from "@saasquatch/stencil-hooks";
|
|
3
3
|
import { gql } from "graphql-request";
|
|
4
4
|
const GET_USER_STATUS = gql `
|
|
@@ -20,8 +20,10 @@ const GET_USER_STATUS = gql `
|
|
|
20
20
|
}
|
|
21
21
|
`;
|
|
22
22
|
export function usePayoutStatus(props) {
|
|
23
|
+
const { type } = getEnvironmentSDK();
|
|
23
24
|
const { loading, data, errors, refetch } = useQuery(GET_USER_STATUS, {});
|
|
24
25
|
const [status, setStatus] = useState(undefined);
|
|
26
|
+
const [showDialog, setShowDialog] = useState(false);
|
|
25
27
|
useEffect(() => {
|
|
26
28
|
if (!data)
|
|
27
29
|
return;
|
|
@@ -45,5 +47,14 @@ export function usePayoutStatus(props) {
|
|
|
45
47
|
window.addEventListener("sqm:tax-form-updated", cb);
|
|
46
48
|
return () => window.removeEventListener("sqm:tax-form-updated", cb);
|
|
47
49
|
}, []);
|
|
48
|
-
return {
|
|
50
|
+
return {
|
|
51
|
+
states: { loading, status, showVerifyIdentity: showDialog },
|
|
52
|
+
data: { type },
|
|
53
|
+
text: props.getTextProps(),
|
|
54
|
+
callbacks: {
|
|
55
|
+
onTermsClick: () => window.open(props.termsUrl, "_blank").focus(),
|
|
56
|
+
onClick: () => setShowDialog(true),
|
|
57
|
+
onCancel: () => setShowDialog(false),
|
|
58
|
+
},
|
|
59
|
+
};
|
|
49
60
|
}
|
|
@@ -748,14 +748,14 @@ export class TaxAndCashMonolith {
|
|
|
748
748
|
* @uiGroup Dashboard Properties
|
|
749
749
|
* @uiWidget textArea
|
|
750
750
|
*/
|
|
751
|
-
this.
|
|
751
|
+
this.payoutHoldAlertHeader = "Your payout is on hold";
|
|
752
752
|
/**
|
|
753
753
|
* Part of the alert displayed at the top of the page when there’s been an issue preventing payouts.
|
|
754
754
|
* @uiName Payout error message description
|
|
755
755
|
* @uiGroup Dashboard Properties
|
|
756
756
|
* @uiWidget textArea
|
|
757
757
|
*/
|
|
758
|
-
this.
|
|
758
|
+
this.payoutHoldAlertDescription = "Please contact Support or check your inbox for an email from our referral program provider, impact.com.";
|
|
759
759
|
/**
|
|
760
760
|
* Text displayed for existing publishers that do not have saved banking information.
|
|
761
761
|
* @uiName Payout missing information subtext
|
|
@@ -3972,7 +3972,7 @@ export class TaxAndCashMonolith {
|
|
|
3972
3972
|
"reflect": false,
|
|
3973
3973
|
"defaultValue": "\"Earnings after tax\""
|
|
3974
3974
|
},
|
|
3975
|
-
"
|
|
3975
|
+
"payoutHoldAlertHeader": {
|
|
3976
3976
|
"type": "string",
|
|
3977
3977
|
"mutable": false,
|
|
3978
3978
|
"complexType": {
|
|
@@ -3995,11 +3995,11 @@ export class TaxAndCashMonolith {
|
|
|
3995
3995
|
}],
|
|
3996
3996
|
"text": "Part of the alert displayed at the top of the page when there\u2019s been an issue preventing payouts."
|
|
3997
3997
|
},
|
|
3998
|
-
"attribute": "
|
|
3998
|
+
"attribute": "payout-hold-alert-header",
|
|
3999
3999
|
"reflect": false,
|
|
4000
|
-
"defaultValue": "\"Your payout is on hold
|
|
4000
|
+
"defaultValue": "\"Your payout is on hold\""
|
|
4001
4001
|
},
|
|
4002
|
-
"
|
|
4002
|
+
"payoutHoldAlertDescription": {
|
|
4003
4003
|
"type": "string",
|
|
4004
4004
|
"mutable": false,
|
|
4005
4005
|
"complexType": {
|
|
@@ -4022,9 +4022,9 @@ export class TaxAndCashMonolith {
|
|
|
4022
4022
|
}],
|
|
4023
4023
|
"text": "Part of the alert displayed at the top of the page when there\u2019s been an issue preventing payouts."
|
|
4024
4024
|
},
|
|
4025
|
-
"attribute": "
|
|
4025
|
+
"attribute": "payout-hold-alert-description",
|
|
4026
4026
|
"reflect": false,
|
|
4027
|
-
"defaultValue": "\"
|
|
4027
|
+
"defaultValue": "\"Please contact Support or check your inbox for an email from our referral program provider, impact.com.\""
|
|
4028
4028
|
},
|
|
4029
4029
|
"dashboard_payoutMissingInformationText": {
|
|
4030
4030
|
"type": "string",
|
|
@@ -8,6 +8,12 @@ const style = {
|
|
|
8
8
|
borderTop: "none",
|
|
9
9
|
},
|
|
10
10
|
},
|
|
11
|
+
HoldAlertContainer: {
|
|
12
|
+
"&::part(base)": {
|
|
13
|
+
border: "none",
|
|
14
|
+
backgroundColor: "transparent",
|
|
15
|
+
},
|
|
16
|
+
},
|
|
11
17
|
ExpiringSoonAlertContainer: {
|
|
12
18
|
"&::part(base)": {
|
|
13
19
|
backgroundColor: "var(--sl-color-yellow-100)",
|
|
@@ -247,6 +253,11 @@ export const TaxAndCashDashboardView = (props) => {
|
|
|
247
253
|
h("strong", null, text.error.generalTitle),
|
|
248
254
|
h("br", null),
|
|
249
255
|
text.error.generalDescription)),
|
|
256
|
+
states.hasHold && (h("sl-alert", { exportparts: "base: alert-base, icon:alert-icon", type: "warning", open: true, class: sheet.classes.HoldAlertContainer },
|
|
257
|
+
h("sl-icon", { slot: "icon", name: "exclamation-triangle" }),
|
|
258
|
+
h("strong", null, text.payoutHoldAlertHeader),
|
|
259
|
+
h("br", null),
|
|
260
|
+
text.payoutHoldAlertDescription)),
|
|
250
261
|
h("sl-dialog", { label: text.replaceTaxFormModalHeader, class: sheet.classes.Dialog, open: states.showNewFormDialog, "onSl-hide": callbacks.onNewFormCancel },
|
|
251
262
|
h("p", null, text.replaceTaxFormModalBodyText),
|
|
252
263
|
h("sl-button", { slot: "footer", type: "primary", class: sheet.classes.DialogButton, onClick: callbacks.onNewFormClick }, text.newFormButton),
|
|
@@ -173,13 +173,13 @@ export class TaxAndCashDashboard {
|
|
|
173
173
|
* @uiName Payout error message title
|
|
174
174
|
* @uiWidget textArea
|
|
175
175
|
*/
|
|
176
|
-
this.
|
|
176
|
+
this.payoutHoldAlertHeader = "Your payout is on hold";
|
|
177
177
|
/**
|
|
178
178
|
* Part of the alert displayed at the top of the page when there’s been an issue preventing payouts.
|
|
179
179
|
* @uiName Payout error message description
|
|
180
180
|
* @uiWidget textArea
|
|
181
181
|
*/
|
|
182
|
-
this.
|
|
182
|
+
this.payoutHoldAlertDescription = "Please contact Support or check your inbox for an email from our referral program provider, impact.com.";
|
|
183
183
|
/**
|
|
184
184
|
* Text displayed for existing publishers that do not have saved banking information.
|
|
185
185
|
* @uiName Payout missing information subtext
|
|
@@ -926,7 +926,7 @@ export class TaxAndCashDashboard {
|
|
|
926
926
|
"reflect": false,
|
|
927
927
|
"defaultValue": "\"Account\""
|
|
928
928
|
},
|
|
929
|
-
"
|
|
929
|
+
"payoutHoldAlertHeader": {
|
|
930
930
|
"type": "string",
|
|
931
931
|
"mutable": false,
|
|
932
932
|
"complexType": {
|
|
@@ -946,11 +946,11 @@ export class TaxAndCashDashboard {
|
|
|
946
946
|
}],
|
|
947
947
|
"text": "Part of the alert displayed at the top of the page when there\u2019s been an issue preventing payouts."
|
|
948
948
|
},
|
|
949
|
-
"attribute": "
|
|
949
|
+
"attribute": "payout-hold-alert-header",
|
|
950
950
|
"reflect": false,
|
|
951
|
-
"defaultValue": "\"Your payout is on hold
|
|
951
|
+
"defaultValue": "\"Your payout is on hold\""
|
|
952
952
|
},
|
|
953
|
-
"
|
|
953
|
+
"payoutHoldAlertDescription": {
|
|
954
954
|
"type": "string",
|
|
955
955
|
"mutable": false,
|
|
956
956
|
"complexType": {
|
|
@@ -970,9 +970,9 @@ export class TaxAndCashDashboard {
|
|
|
970
970
|
}],
|
|
971
971
|
"text": "Part of the alert displayed at the top of the page when there\u2019s been an issue preventing payouts."
|
|
972
972
|
},
|
|
973
|
-
"attribute": "
|
|
973
|
+
"attribute": "payout-hold-alert-description",
|
|
974
974
|
"reflect": false,
|
|
975
|
-
"defaultValue": "\"
|
|
975
|
+
"defaultValue": "\"Please contact Support or check your inbox for an email from our referral program provider, impact.com.\""
|
|
976
976
|
},
|
|
977
977
|
"payoutMissingInformationText": {
|
|
978
978
|
"type": "string",
|
|
@@ -1435,7 +1435,7 @@ export class TaxAndCashDashboard {
|
|
|
1435
1435
|
"mutable": false,
|
|
1436
1436
|
"complexType": {
|
|
1437
1437
|
"original": "DemoData<UseTaxAndCashDashboardResult>",
|
|
1438
|
-
"resolved": "{ states?: { status?: string; documentType: TaxDocumentType; documentTypeString: string; canEditPayoutInfo: boolean; disabled?: boolean; dateSubmitted?: string; noFormNeeded?: boolean; indirectTaxType?: string; qstNumber?: string; subRegionTaxNumber?: string; subRegion?: string; indirectTaxNumber?: string; province?: string; country?: string; notRegistered?: boolean; isBusinessEntity?: boolean; loading?: boolean; loadingError?: boolean; showNewFormDialog: boolean; showIdentityVerificationDialog?: boolean; identiyRequired?: boolean; errors?: { general?: boolean; }; }; }",
|
|
1438
|
+
"resolved": "{ states?: { status?: string; documentType: TaxDocumentType; documentTypeString: string; canEditPayoutInfo: boolean; disabled?: boolean; dateSubmitted?: string; noFormNeeded?: boolean; indirectTaxType?: string; qstNumber?: string; subRegionTaxNumber?: string; subRegion?: string; indirectTaxNumber?: string; province?: string; country?: string; notRegistered?: boolean; isBusinessEntity?: boolean; loading?: boolean; loadingError?: boolean; showNewFormDialog: boolean; showIdentityVerificationDialog?: boolean; identiyRequired?: boolean; hasHold: boolean; errors?: { general?: boolean; }; }; }",
|
|
1439
1439
|
"references": {
|
|
1440
1440
|
"DemoData": {
|
|
1441
1441
|
"location": "import",
|
|
@@ -1476,6 +1476,7 @@ function useDemoTaxAndCashDashboard(props) {
|
|
|
1476
1476
|
disabled: false,
|
|
1477
1477
|
loading: false,
|
|
1478
1478
|
showNewFormDialog: false,
|
|
1479
|
+
hasHold: false,
|
|
1479
1480
|
},
|
|
1480
1481
|
callbacks: {
|
|
1481
1482
|
onClick: () => console.debug("check step"),
|
package/dist/collection/components/tax-and-cash/sqm-tax-and-cash-dashboard/useTaxAndCashDashboard.js
CHANGED
|
@@ -40,7 +40,7 @@ function getIndirectTaxType(taxInformation) {
|
|
|
40
40
|
return "Indirect Tax";
|
|
41
41
|
}
|
|
42
42
|
export const useTaxAndCashDashboard = (props) => {
|
|
43
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
|
|
43
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
|
|
44
44
|
const setStep = useSetParent(TAX_CONTEXT_NAMESPACE);
|
|
45
45
|
const setContext = useSetParent(TAX_FORM_CONTEXT_NAMESPACE);
|
|
46
46
|
const [showDialog, setShowDialog] = useState(false);
|
|
@@ -95,6 +95,7 @@ export const useTaxAndCashDashboard = (props) => {
|
|
|
95
95
|
loading,
|
|
96
96
|
loadingError: !!(userError === null || userError === void 0 ? void 0 : userError.message),
|
|
97
97
|
showNewFormDialog: showDialog,
|
|
98
|
+
hasHold: !!((_m = publisher === null || publisher === void 0 ? void 0 : publisher.payoutsAccount) === null || _m === void 0 ? void 0 : _m.hold),
|
|
98
99
|
},
|
|
99
100
|
callbacks: {
|
|
100
101
|
onClick: () => setShowDialog(true),
|
|
@@ -24,17 +24,20 @@ export function useUserInfoForm(props) {
|
|
|
24
24
|
const [filteredCurrencies, setFilteredCurrencies] = useState(currencies || []);
|
|
25
25
|
const [formErrors, setErrors] = useState({});
|
|
26
26
|
useEffect(() => {
|
|
27
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
27
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
28
28
|
const user = data === null || data === void 0 ? void 0 : data.user;
|
|
29
29
|
if (!user || step !== "/1")
|
|
30
30
|
return;
|
|
31
31
|
// If form already filled out, skip initialising it
|
|
32
32
|
if (objectIsFull(userFormContext))
|
|
33
33
|
return;
|
|
34
|
-
|
|
34
|
+
// Prefer MI email if it was verified before this
|
|
35
|
+
const email = ((_a = user.managedIdentity) === null || _a === void 0 ? void 0 : _a.emailVerified) ? user.managedIdentity.email
|
|
36
|
+
: user.email;
|
|
37
|
+
if (((_b = user.impactConnection) === null || _b === void 0 ? void 0 : _b.publisher) && ((_c = user.impactConnection) === null || _c === void 0 ? void 0 : _c.user)) {
|
|
35
38
|
// Initialise with partner information
|
|
36
39
|
setUserFormContext({
|
|
37
|
-
email
|
|
40
|
+
email,
|
|
38
41
|
firstName: user.impactConnection.user.firstName,
|
|
39
42
|
lastName: user.impactConnection.user.lastName,
|
|
40
43
|
countryCode: user.impactConnection.publisher.countryCode,
|
|
@@ -50,17 +53,17 @@ export function useUserInfoForm(props) {
|
|
|
50
53
|
else if (!(userFormContext === null || userFormContext === void 0 ? void 0 : userFormContext.email)) {
|
|
51
54
|
// Initialise with user information
|
|
52
55
|
setUserFormContext({
|
|
53
|
-
email
|
|
56
|
+
email,
|
|
54
57
|
firstName: user.firstName,
|
|
55
58
|
lastName: user.lastName,
|
|
56
59
|
countryCode: user.countryCode || "US",
|
|
57
|
-
currency: (
|
|
58
|
-
phoneNumberCountryCode: ((
|
|
59
|
-
phoneNumber: (
|
|
60
|
-
address: (
|
|
61
|
-
city: (
|
|
62
|
-
state: (
|
|
63
|
-
postalCode: (
|
|
60
|
+
currency: (_d = user.customFields) === null || _d === void 0 ? void 0 : _d.currency,
|
|
61
|
+
phoneNumberCountryCode: ((_e = user.customFields) === null || _e === void 0 ? void 0 : _e.phoneNumberCountryCode) || "US",
|
|
62
|
+
phoneNumber: (_f = user.customFields) === null || _f === void 0 ? void 0 : _f.phoneNumber,
|
|
63
|
+
address: (_g = user.customFields) === null || _g === void 0 ? void 0 : _g.address,
|
|
64
|
+
city: (_h = user.customFields) === null || _h === void 0 ? void 0 : _h.city,
|
|
65
|
+
state: (_j = user.customFields) === null || _j === void 0 ? void 0 : _j.state,
|
|
66
|
+
postalCode: (_k = user.customFields) === null || _k === void 0 ? void 0 : _k.postalCode,
|
|
64
67
|
});
|
|
65
68
|
}
|
|
66
69
|
}, [data, step, userFormContext]);
|
|
@@ -3,4 +3,4 @@ const VERIFICATION_EMAIL_NAMESPACE = "sq:verification-email";
|
|
|
3
3
|
const VERIFICATION_PARENT_NAMESPACE = "sq:verification-context";
|
|
4
4
|
const VERIFICATION_EVENT_KEY = "sq:code-verified";
|
|
5
5
|
|
|
6
|
-
export { SHOW_CODE_NAMESPACE as S,
|
|
6
|
+
export { SHOW_CODE_NAMESPACE as S, VERIFICATION_PARENT_NAMESPACE as V, VERIFICATION_EMAIL_NAMESPACE as a, VERIFICATION_EVENT_KEY as b };
|