@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
package/dist/collection/components/tax-and-cash/sqm-payout-status-alert/sqm-payout-status-alert.js
CHANGED
|
@@ -5,16 +5,57 @@ import { getProps } from "../../../utils/utils";
|
|
|
5
5
|
import { PayoutStatusAlertView, } from "./sqm-payout-status-alert-view";
|
|
6
6
|
import { usePayoutStatus } from "./usePayoutStatus";
|
|
7
7
|
import { isDemo } from "@saasquatch/component-boilerplate";
|
|
8
|
+
/**
|
|
9
|
+
* @uiName Payout Status Alert
|
|
10
|
+
* @exampleGroup Tax and Cash
|
|
11
|
+
* @example Payout Status Alert - <sqm-payout-status-alert></sqm-payout-status-alert>
|
|
12
|
+
*/
|
|
8
13
|
export class PayoutStatusAlert {
|
|
9
14
|
constructor() {
|
|
15
|
+
/**
|
|
16
|
+
* @uiName Info required alert header
|
|
17
|
+
*/
|
|
10
18
|
this.informationRequiredHeader = "Payout and tax information required";
|
|
19
|
+
/**
|
|
20
|
+
* @uiName Info required alert description
|
|
21
|
+
*/
|
|
11
22
|
this.informationRequiredDescription = "Submit your banking details and tax documents to receive your rewards.";
|
|
23
|
+
/**
|
|
24
|
+
* @uiName Info required alert button text
|
|
25
|
+
*/
|
|
12
26
|
this.informationRequiredButtonText = "Payouts & Tax Settings";
|
|
27
|
+
/**
|
|
28
|
+
* @uiName Verification required alert header
|
|
29
|
+
*/
|
|
13
30
|
this.verificationRequiredHeader = "Verify your identity";
|
|
31
|
+
/**
|
|
32
|
+
* @uiName Verification required alert description
|
|
33
|
+
*/
|
|
14
34
|
this.verificationRequiredDescription = "Complete your verification to start receiving your cash rewards. It should only take a few minutes verify.";
|
|
35
|
+
/**
|
|
36
|
+
* @uiName Verification required alert button text
|
|
37
|
+
*/
|
|
15
38
|
this.verificationRequiredButtonText = "Start Verification";
|
|
39
|
+
/**
|
|
40
|
+
* @uiName Payout on hold alert header
|
|
41
|
+
*/
|
|
16
42
|
this.holdHeader = "Your payouts and account are on hold";
|
|
43
|
+
/**
|
|
44
|
+
* @uiName Payout on hold alert description
|
|
45
|
+
*/
|
|
17
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";
|
|
51
|
+
/**
|
|
52
|
+
* @uiName Error header
|
|
53
|
+
*/
|
|
54
|
+
this.errorHeader = "Could not determine payout status.";
|
|
55
|
+
/**
|
|
56
|
+
* @uiName Error description
|
|
57
|
+
*/
|
|
58
|
+
this.errorDescription = "There was an error with determining your payout status.";
|
|
18
59
|
withHooks(this);
|
|
19
60
|
}
|
|
20
61
|
disconnectedCallback() { }
|
|
@@ -25,6 +66,7 @@ export class PayoutStatusAlert {
|
|
|
25
66
|
const props = isDemo()
|
|
26
67
|
? useDemoPayoutStatusAlert(this)
|
|
27
68
|
: usePayoutStatus(this);
|
|
69
|
+
console.log({ props });
|
|
28
70
|
return h(PayoutStatusAlertView, Object.assign({}, props));
|
|
29
71
|
}
|
|
30
72
|
static get is() { return "sqm-payout-status-alert"; }
|
|
@@ -41,7 +83,10 @@ export class PayoutStatusAlert {
|
|
|
41
83
|
"required": false,
|
|
42
84
|
"optional": false,
|
|
43
85
|
"docs": {
|
|
44
|
-
"tags": [
|
|
86
|
+
"tags": [{
|
|
87
|
+
"text": "Info required alert header",
|
|
88
|
+
"name": "uiName"
|
|
89
|
+
}],
|
|
45
90
|
"text": ""
|
|
46
91
|
},
|
|
47
92
|
"attribute": "information-required-header",
|
|
@@ -59,7 +104,10 @@ export class PayoutStatusAlert {
|
|
|
59
104
|
"required": false,
|
|
60
105
|
"optional": false,
|
|
61
106
|
"docs": {
|
|
62
|
-
"tags": [
|
|
107
|
+
"tags": [{
|
|
108
|
+
"text": "Info required alert description",
|
|
109
|
+
"name": "uiName"
|
|
110
|
+
}],
|
|
63
111
|
"text": ""
|
|
64
112
|
},
|
|
65
113
|
"attribute": "information-required-description",
|
|
@@ -77,7 +125,10 @@ export class PayoutStatusAlert {
|
|
|
77
125
|
"required": false,
|
|
78
126
|
"optional": false,
|
|
79
127
|
"docs": {
|
|
80
|
-
"tags": [
|
|
128
|
+
"tags": [{
|
|
129
|
+
"text": "Info required alert button text",
|
|
130
|
+
"name": "uiName"
|
|
131
|
+
}],
|
|
81
132
|
"text": ""
|
|
82
133
|
},
|
|
83
134
|
"attribute": "information-required-button-text",
|
|
@@ -95,7 +146,10 @@ export class PayoutStatusAlert {
|
|
|
95
146
|
"required": false,
|
|
96
147
|
"optional": false,
|
|
97
148
|
"docs": {
|
|
98
|
-
"tags": [
|
|
149
|
+
"tags": [{
|
|
150
|
+
"text": "Verification required alert header",
|
|
151
|
+
"name": "uiName"
|
|
152
|
+
}],
|
|
99
153
|
"text": ""
|
|
100
154
|
},
|
|
101
155
|
"attribute": "verification-required-header",
|
|
@@ -113,7 +167,10 @@ export class PayoutStatusAlert {
|
|
|
113
167
|
"required": false,
|
|
114
168
|
"optional": false,
|
|
115
169
|
"docs": {
|
|
116
|
-
"tags": [
|
|
170
|
+
"tags": [{
|
|
171
|
+
"text": "Verification required alert description",
|
|
172
|
+
"name": "uiName"
|
|
173
|
+
}],
|
|
117
174
|
"text": ""
|
|
118
175
|
},
|
|
119
176
|
"attribute": "verification-required-description",
|
|
@@ -131,7 +188,10 @@ export class PayoutStatusAlert {
|
|
|
131
188
|
"required": false,
|
|
132
189
|
"optional": false,
|
|
133
190
|
"docs": {
|
|
134
|
-
"tags": [
|
|
191
|
+
"tags": [{
|
|
192
|
+
"text": "Verification required alert button text",
|
|
193
|
+
"name": "uiName"
|
|
194
|
+
}],
|
|
135
195
|
"text": ""
|
|
136
196
|
},
|
|
137
197
|
"attribute": "verification-required-button-text",
|
|
@@ -149,7 +209,10 @@ export class PayoutStatusAlert {
|
|
|
149
209
|
"required": false,
|
|
150
210
|
"optional": false,
|
|
151
211
|
"docs": {
|
|
152
|
-
"tags": [
|
|
212
|
+
"tags": [{
|
|
213
|
+
"text": "Payout on hold alert header",
|
|
214
|
+
"name": "uiName"
|
|
215
|
+
}],
|
|
153
216
|
"text": ""
|
|
154
217
|
},
|
|
155
218
|
"attribute": "hold-header",
|
|
@@ -167,19 +230,85 @@ export class PayoutStatusAlert {
|
|
|
167
230
|
"required": false,
|
|
168
231
|
"optional": false,
|
|
169
232
|
"docs": {
|
|
170
|
-
"tags": [
|
|
233
|
+
"tags": [{
|
|
234
|
+
"text": "Payout on hold alert description",
|
|
235
|
+
"name": "uiName"
|
|
236
|
+
}],
|
|
171
237
|
"text": ""
|
|
172
238
|
},
|
|
173
239
|
"attribute": "hold-description",
|
|
174
240
|
"reflect": false,
|
|
175
241
|
"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}.\""
|
|
176
242
|
},
|
|
243
|
+
"termsUrl": {
|
|
244
|
+
"type": "string",
|
|
245
|
+
"mutable": false,
|
|
246
|
+
"complexType": {
|
|
247
|
+
"original": "string",
|
|
248
|
+
"resolved": "string",
|
|
249
|
+
"references": {}
|
|
250
|
+
},
|
|
251
|
+
"required": false,
|
|
252
|
+
"optional": false,
|
|
253
|
+
"docs": {
|
|
254
|
+
"tags": [{
|
|
255
|
+
"text": "Cash & Payouts Terms and Conditions url",
|
|
256
|
+
"name": "uiName"
|
|
257
|
+
}],
|
|
258
|
+
"text": ""
|
|
259
|
+
},
|
|
260
|
+
"attribute": "terms-url",
|
|
261
|
+
"reflect": false,
|
|
262
|
+
"defaultValue": "\"https://terms.advocate.impact.com/PayoutTermsAndConditions.html\""
|
|
263
|
+
},
|
|
264
|
+
"errorHeader": {
|
|
265
|
+
"type": "string",
|
|
266
|
+
"mutable": false,
|
|
267
|
+
"complexType": {
|
|
268
|
+
"original": "string",
|
|
269
|
+
"resolved": "string",
|
|
270
|
+
"references": {}
|
|
271
|
+
},
|
|
272
|
+
"required": false,
|
|
273
|
+
"optional": false,
|
|
274
|
+
"docs": {
|
|
275
|
+
"tags": [{
|
|
276
|
+
"text": "Error header",
|
|
277
|
+
"name": "uiName"
|
|
278
|
+
}],
|
|
279
|
+
"text": ""
|
|
280
|
+
},
|
|
281
|
+
"attribute": "error-header",
|
|
282
|
+
"reflect": false,
|
|
283
|
+
"defaultValue": "\"Could not determine payout status.\""
|
|
284
|
+
},
|
|
285
|
+
"errorDescription": {
|
|
286
|
+
"type": "string",
|
|
287
|
+
"mutable": false,
|
|
288
|
+
"complexType": {
|
|
289
|
+
"original": "string",
|
|
290
|
+
"resolved": "string",
|
|
291
|
+
"references": {}
|
|
292
|
+
},
|
|
293
|
+
"required": false,
|
|
294
|
+
"optional": false,
|
|
295
|
+
"docs": {
|
|
296
|
+
"tags": [{
|
|
297
|
+
"text": "Error description",
|
|
298
|
+
"name": "uiName"
|
|
299
|
+
}],
|
|
300
|
+
"text": ""
|
|
301
|
+
},
|
|
302
|
+
"attribute": "error-description",
|
|
303
|
+
"reflect": false,
|
|
304
|
+
"defaultValue": "\"There was an error with determining your payout status.\""
|
|
305
|
+
},
|
|
177
306
|
"demoData": {
|
|
178
307
|
"type": "unknown",
|
|
179
308
|
"mutable": false,
|
|
180
309
|
"complexType": {
|
|
181
310
|
"original": "DemoData<PayoutStatusAlertViewProps>",
|
|
182
|
-
"resolved": "{ states?: { loading: boolean; status: PayoutStatus; }; }",
|
|
311
|
+
"resolved": "{ states?: { error: boolean; loading: boolean; status: PayoutStatus; showVerifyIdentity: boolean; }; data?: { type: \"SquatchJS2\" | \"SquatchAndroid\" | \"SquatchIOS\" | \"SquatchPortal\" | \"SquatchAdmin\" | \"None\"; }; }",
|
|
183
312
|
"references": {
|
|
184
313
|
"DemoData": {
|
|
185
314
|
"location": "import",
|
|
@@ -209,9 +338,17 @@ export class PayoutStatusAlert {
|
|
|
209
338
|
function useDemoPayoutStatusAlert(props) {
|
|
210
339
|
return deepmerge({
|
|
211
340
|
states: {
|
|
341
|
+
error: false,
|
|
212
342
|
status: "INFORMATION_REQUIRED",
|
|
213
343
|
loading: false,
|
|
344
|
+
showVerifyIdentity: false,
|
|
214
345
|
},
|
|
346
|
+
data: { type: "SquatchAdmin" },
|
|
215
347
|
text: props.getTextProps(),
|
|
348
|
+
callbacks: {
|
|
349
|
+
onTermsClick: () => { },
|
|
350
|
+
onClick: () => console.log("show"),
|
|
351
|
+
onCancel: () => console.log("hide"),
|
|
352
|
+
},
|
|
216
353
|
}, props.demoData || {}, { arrayMerge: (_, a) => a });
|
|
217
354
|
}
|
|
@@ -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 `
|
|
@@ -12,6 +12,7 @@ const GET_USER_STATUS = gql `
|
|
|
12
12
|
id
|
|
13
13
|
payoutsAccount {
|
|
14
14
|
hold
|
|
15
|
+
holdReasons
|
|
15
16
|
}
|
|
16
17
|
}
|
|
17
18
|
}
|
|
@@ -19,24 +20,25 @@ const GET_USER_STATUS = gql `
|
|
|
19
20
|
}
|
|
20
21
|
}
|
|
21
22
|
`;
|
|
23
|
+
export function getStatus(data) {
|
|
24
|
+
var _a, _b, _c, _d, _e;
|
|
25
|
+
const account = (_b = (_a = data.user.impactConnection) === null || _a === void 0 ? void 0 : _a.publisher) === null || _b === void 0 ? void 0 : _b.payoutsAccount;
|
|
26
|
+
if (!((_d = (_c = data.user) === null || _c === void 0 ? void 0 : _c.impactConnection) === null || _d === void 0 ? void 0 : _d.connected) || !account)
|
|
27
|
+
return "INFORMATION_REQUIRED";
|
|
28
|
+
if ((_e = account.holdReasons) === null || _e === void 0 ? void 0 : _e.includes("IDV_CHECK_REQUIRED"))
|
|
29
|
+
return "VERIFICATION_NEEDED";
|
|
30
|
+
if (account.hold)
|
|
31
|
+
return "HOLD";
|
|
32
|
+
return "DONE";
|
|
33
|
+
}
|
|
22
34
|
export function usePayoutStatus(props) {
|
|
35
|
+
const { type } = getEnvironmentSDK();
|
|
23
36
|
const { loading, data, errors, refetch } = useQuery(GET_USER_STATUS, {});
|
|
24
37
|
const [status, setStatus] = useState(undefined);
|
|
38
|
+
const [showDialog, setShowDialog] = useState(false);
|
|
25
39
|
useEffect(() => {
|
|
26
40
|
if (!data)
|
|
27
41
|
return;
|
|
28
|
-
function getStatus(data) {
|
|
29
|
-
var _a, _b;
|
|
30
|
-
const account = (_b = (_a = data.user.impactConnection) === null || _a === void 0 ? void 0 : _a.publisher) === null || _b === void 0 ? void 0 : _b.payoutsAccount;
|
|
31
|
-
if (!account)
|
|
32
|
-
return "INFORMATION_REQUIRED";
|
|
33
|
-
if (account.hold)
|
|
34
|
-
return "HOLD";
|
|
35
|
-
// @ts-ignore, TODO: add check for account verification
|
|
36
|
-
if (!account.verified)
|
|
37
|
-
return "VERIFICATION_NEEDED";
|
|
38
|
-
return "DONE";
|
|
39
|
-
}
|
|
40
42
|
const s = getStatus(data);
|
|
41
43
|
setStatus(s);
|
|
42
44
|
}, [data]);
|
|
@@ -45,6 +47,19 @@ 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
|
-
|
|
49
|
-
|
|
50
|
+
return {
|
|
51
|
+
states: {
|
|
52
|
+
loading,
|
|
53
|
+
status,
|
|
54
|
+
showVerifyIdentity: showDialog,
|
|
55
|
+
error: !!errors,
|
|
56
|
+
},
|
|
57
|
+
data: { type },
|
|
58
|
+
text: props.getTextProps(),
|
|
59
|
+
callbacks: {
|
|
60
|
+
onTermsClick: () => window.open(props.termsUrl, "_blank").focus(),
|
|
61
|
+
onClick: () => setShowDialog(true),
|
|
62
|
+
onCancel: () => setShowDialog(false),
|
|
63
|
+
},
|
|
64
|
+
};
|
|
50
65
|
}
|
|
@@ -19,6 +19,11 @@ export const GET_USER = gql `
|
|
|
19
19
|
email
|
|
20
20
|
countryCode
|
|
21
21
|
customFields
|
|
22
|
+
managedIdentity {
|
|
23
|
+
uid
|
|
24
|
+
email
|
|
25
|
+
emailVerified
|
|
26
|
+
}
|
|
22
27
|
impactConnection {
|
|
23
28
|
connected
|
|
24
29
|
user {
|
|
@@ -62,6 +67,7 @@ export const GET_USER = gql `
|
|
|
62
67
|
}
|
|
63
68
|
payoutsAccount {
|
|
64
69
|
hold
|
|
70
|
+
holdReasons
|
|
65
71
|
balance
|
|
66
72
|
}
|
|
67
73
|
}
|
|
@@ -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",
|
|
@@ -3,8 +3,8 @@ import { useEffect, useMemo } from "@saasquatch/universal-hooks";
|
|
|
3
3
|
import { getCountryObj } from "../utils";
|
|
4
4
|
import { COUNTRIES_NAMESPACE, COUNTRIES_QUERY_NAMESPACE, CURRENCIES_NAMESPACE, CURRENCIES_QUERY_NAMESPACE, FINANCE_NETWORK_SETTINGS_NAMESPACE, GET_COUNTRIES, GET_CURRENCIES, GET_FINANCE_NETWORK_SETTINGS, GET_USER, SORTED_COUNTRIES_NAMESPACE, TAX_CONTEXT_NAMESPACE, TAX_FORM_CONTEXT_NAMESPACE, USER_FORM_CONTEXT_NAMESPACE, USER_QUERY_NAMESPACE, } from "./data";
|
|
5
5
|
function getCurrentStep(user) {
|
|
6
|
-
var _a;
|
|
7
|
-
if (!((_a = user.impactConnection) === null || _a === void 0 ? void 0 : _a.connected)) {
|
|
6
|
+
var _a, _b;
|
|
7
|
+
if (!((_a = user.impactConnection) === null || _a === void 0 ? void 0 : _a.connected) || !((_b = user.impactConnection) === null || _b === void 0 ? void 0 : _b.publisher)) {
|
|
8
8
|
return "/1";
|
|
9
9
|
}
|
|
10
10
|
const { requiredTaxDocumentType, currentTaxDocument, withdrawalSettings, brandedSignup, } = user.impactConnection.publisher;
|
|
@@ -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,22 +253,22 @@ export const TaxAndCashDashboardView = (props) => {
|
|
|
247
253
|
h("strong", null, text.error.generalTitle),
|
|
248
254
|
h("br", null),
|
|
249
255
|
text.error.generalDescription)),
|
|
250
|
-
states.
|
|
251
|
-
h("sl-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
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)),
|
|
261
|
+
states.payoutStatus === "VERIFICATION_NEEDED" && (h("sl-alert", { exportparts: "base: alert-base, icon:alert-icon", type: "warning", open: true, class: sheet.classes.HoldAlertContainer },
|
|
262
|
+
h("sl-icon", { slot: "icon", name: "exclamation-triangle" }),
|
|
263
|
+
h("strong", null, text.verificationRequiredHeader),
|
|
264
|
+
h("p", { style: { margin: "0" } }, text.verificationRequiredDescription),
|
|
265
|
+
h("sl-button", { style: { marginTop: "var(--sl-spacing-x-small)" }, type: "default", loading: states.loading,
|
|
266
|
+
//AL: TODO hooks
|
|
267
|
+
onClick: () => callbacks.onClick }, text.verificationRequiredButtonText))),
|
|
268
|
+
h("sl-dialog", { noDismiss: true, class: sheet.classes.Dialog, open: states.showVerifyIdentity, "onSl-hide": callbacks.onVerifyIdentityCancel },
|
|
269
|
+
h("iframe", {
|
|
270
|
+
// AL: TODO replace iframe URL with verification url when available
|
|
271
|
+
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" })),
|
|
266
272
|
h("sl-dialog", { label: text.replaceTaxFormModalHeader, class: sheet.classes.Dialog, open: states.showNewFormDialog, "onSl-hide": callbacks.onNewFormCancel },
|
|
267
273
|
h("p", null, text.replaceTaxFormModalBodyText),
|
|
268
274
|
h("sl-button", { slot: "footer", type: "primary", class: sheet.classes.DialogButton, onClick: callbacks.onNewFormClick }, text.newFormButton),
|