@saasquatch/mint-components 1.12.0-8 → 1.12.0-9
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 +39 -1
- package/dist/cjs/sqm-big-stat_39.cjs.entry.js +20 -67
- package/dist/cjs/sqm-code-verification.cjs.entry.js +0 -3
- package/dist/cjs/{sqm-invoice-table-view-5d3a2d35.js → sqm-invoice-table-view-c58966f8.js} +40 -0
- package/dist/cjs/sqm-stencilbook.cjs.entry.js +1 -1
- package/dist/cjs/usePayoutStatus-b9fb7399.js +70 -0
- package/dist/collection/components/sqm-widget-verification/sqm-code-verification/useCodeVerification.js +0 -3
- package/dist/collection/components/tax-and-cash/TaxForm.stories.js +40 -0
- package/dist/collection/components/tax-and-cash/sqm-payout-status-alert/sqm-payout-status-alert-view.js +18 -3
- package/dist/collection/components/tax-and-cash/sqm-payout-status-alert/usePayoutStatus.js +12 -12
- package/dist/collection/components/tax-and-cash/sqm-tax-and-cash/data.js +1 -0
- 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 +90 -1
- package/dist/collection/components/tax-and-cash/sqm-tax-and-cash-dashboard/useTaxAndCashDashboard.js +6 -0
- 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 +39 -1
- package/dist/esm/sqm-big-stat_39.entry.js +20 -67
- package/dist/esm/sqm-code-verification.entry.js +0 -3
- package/dist/esm/{sqm-invoice-table-view-e9075c0b.js → sqm-invoice-table-view-d1cfdaf4.js} +40 -0
- package/dist/esm/sqm-stencilbook.entry.js +1 -1
- package/dist/esm/usePayoutStatus-1a635054.js +67 -0
- package/dist/esm-es5/loader.js +1 -1
- package/dist/esm-es5/mint-components.js +1 -1
- package/dist/esm-es5/sqm-banking-info-form_16.entry.js +1 -1
- package/dist/esm-es5/sqm-big-stat_39.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/usePayoutStatus-1a635054.js +1 -0
- package/dist/mint-components/mint-components.esm.js +1 -1
- package/dist/mint-components/{p-fffc3590.entry.js → p-24092973.entry.js} +1 -1
- package/dist/mint-components/p-331d060e.entry.js +223 -0
- package/dist/mint-components/p-4bd7a472.js +1 -0
- package/dist/mint-components/p-517224ef.js +19 -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-d238372a.system.entry.js → p-b62faaa5.system.entry.js} +1 -1
- package/dist/mint-components/{p-54ffae13.entry.js → p-c05e7b9f.entry.js} +12 -11
- package/dist/mint-components/p-c7057066.system.entry.js +1 -0
- package/dist/mint-components/p-ca809fdd.system.js +1 -1
- package/dist/mint-components/p-e990dc21.system.js +1 -0
- package/dist/types/components/tax-and-cash/sqm-payout-status-alert/usePayoutStatus.d.ts +2 -0
- package/dist/types/components/tax-and-cash/sqm-tax-and-cash/data.d.ts +1 -0
- package/dist/types/components/tax-and-cash/sqm-tax-and-cash-dashboard/sqm-tax-and-cash-dashboard-view.d.ts +7 -0
- package/dist/types/components/tax-and-cash/sqm-tax-and-cash-dashboard/sqm-tax-and-cash-dashboard.d.ts +17 -0
- package/dist/types/components.d.ts +34 -0
- package/docs/docs.docx +0 -0
- package/docs/raisins.json +1 -1
- package/grapesjs/grapesjs.js +1 -1
- package/package.json +1 -1
- package/dist/esm-es5/sqm-invoice-table-view-e9075c0b.js +0 -1
- package/dist/mint-components/p-1649ee1e.entry.js +0 -240
- package/dist/mint-components/p-39e412e8.system.entry.js +0 -1
- package/dist/mint-components/p-63ac51e1.system.entry.js +0 -1
- package/dist/mint-components/p-8690f682.system.js +0 -1
- package/dist/mint-components/p-f55060db.js +0 -1
|
@@ -751,6 +751,8 @@ const docusignFormProps = {
|
|
|
751
751
|
};
|
|
752
752
|
const dashboardProps = {
|
|
753
753
|
states: {
|
|
754
|
+
showVerifyIdentity: false,
|
|
755
|
+
payoutStatus: "DONE",
|
|
754
756
|
canEditPayoutInfo: true,
|
|
755
757
|
disabled: false,
|
|
756
758
|
status: "ACTIVE",
|
|
@@ -1269,6 +1271,8 @@ const TaxAndCashDashboardActiveW8BENForm = () => {
|
|
|
1269
1271
|
return (index.h("sqm-tax-and-cash-dashboard", { demoData: {
|
|
1270
1272
|
...dashboardProps,
|
|
1271
1273
|
states: {
|
|
1274
|
+
payoutStatus: "DONE",
|
|
1275
|
+
showVerifyIdentity: false,
|
|
1272
1276
|
noFormNeeded: false,
|
|
1273
1277
|
canEditPayoutInfo: true,
|
|
1274
1278
|
documentType: "W8BEN",
|
|
@@ -1285,6 +1289,8 @@ const TaxAndCashDashboardActiveW8BENEForm = () => {
|
|
|
1285
1289
|
return (index.h("sqm-tax-and-cash-dashboard", { demoData: {
|
|
1286
1290
|
...dashboardProps,
|
|
1287
1291
|
states: {
|
|
1292
|
+
payoutStatus: "DONE",
|
|
1293
|
+
showVerifyIdentity: false,
|
|
1288
1294
|
noFormNeeded: false,
|
|
1289
1295
|
canEditPayoutInfo: true,
|
|
1290
1296
|
documentType: "W8BENE",
|
|
@@ -1301,6 +1307,8 @@ const TaxAndCashDashboardNotActiveW9Form = () => {
|
|
|
1301
1307
|
return (index.h("sqm-tax-and-cash-dashboard", { demoData: {
|
|
1302
1308
|
...dashboardProps,
|
|
1303
1309
|
states: {
|
|
1310
|
+
payoutStatus: "DONE",
|
|
1311
|
+
showVerifyIdentity: false,
|
|
1304
1312
|
noFormNeeded: false,
|
|
1305
1313
|
canEditPayoutInfo: true,
|
|
1306
1314
|
status: "INACTIVE",
|
|
@@ -1318,6 +1326,8 @@ const TaxAndCashDashboardNotVerifiedW9Form = () => {
|
|
|
1318
1326
|
return (index.h("sqm-tax-and-cash-dashboard", { demoData: {
|
|
1319
1327
|
...dashboardProps,
|
|
1320
1328
|
states: {
|
|
1329
|
+
payoutStatus: "DONE",
|
|
1330
|
+
showVerifyIdentity: false,
|
|
1321
1331
|
canEditPayoutInfo: true,
|
|
1322
1332
|
disabled: false,
|
|
1323
1333
|
status: "NOT_VERIFIED",
|
|
@@ -1336,6 +1346,8 @@ const TaxAndCashDashboardNotVerifiedW8BENForm = () => {
|
|
|
1336
1346
|
return (index.h("sqm-tax-and-cash-dashboard", { demoData: {
|
|
1337
1347
|
...dashboardProps,
|
|
1338
1348
|
states: {
|
|
1349
|
+
payoutStatus: "DONE",
|
|
1350
|
+
showVerifyIdentity: false,
|
|
1339
1351
|
canEditPayoutInfo: true,
|
|
1340
1352
|
disabled: false,
|
|
1341
1353
|
status: "NOT_VERIFIED",
|
|
@@ -1355,6 +1367,8 @@ const TaxAndCashDashboardNotVerifiedW8BENEForm = () => {
|
|
|
1355
1367
|
return (index.h("sqm-tax-and-cash-dashboard", { demoData: {
|
|
1356
1368
|
...dashboardProps,
|
|
1357
1369
|
states: {
|
|
1370
|
+
payoutStatus: "DONE",
|
|
1371
|
+
showVerifyIdentity: false,
|
|
1358
1372
|
canEditPayoutInfo: true,
|
|
1359
1373
|
disabled: false,
|
|
1360
1374
|
status: "NOT_VERIFIED",
|
|
@@ -1374,6 +1388,8 @@ const TaxAndCashDashboardNotActiveW8BENEForm = () => {
|
|
|
1374
1388
|
return (index.h("sqm-tax-and-cash-dashboard", { demoData: {
|
|
1375
1389
|
...dashboardProps,
|
|
1376
1390
|
states: {
|
|
1391
|
+
payoutStatus: "DONE",
|
|
1392
|
+
showVerifyIdentity: false,
|
|
1377
1393
|
canEditPayoutInfo: true,
|
|
1378
1394
|
disabled: false,
|
|
1379
1395
|
status: "NOT_ACTIVE",
|
|
@@ -1393,6 +1409,8 @@ const TaxAndCashDashboardNoFormNeeded = () => {
|
|
|
1393
1409
|
return (index.h("sqm-tax-and-cash-dashboard", { demoData: {
|
|
1394
1410
|
...dashboardProps,
|
|
1395
1411
|
states: {
|
|
1412
|
+
payoutStatus: "DONE",
|
|
1413
|
+
showVerifyIdentity: false,
|
|
1396
1414
|
canEditPayoutInfo: true,
|
|
1397
1415
|
disabled: false,
|
|
1398
1416
|
documentType: "W9",
|
|
@@ -1412,6 +1430,8 @@ const TaxAndCashDashboardIndirectTaxCanada = () => {
|
|
|
1412
1430
|
return (index.h("sqm-tax-and-cash-dashboard", { demoData: {
|
|
1413
1431
|
...dashboardProps,
|
|
1414
1432
|
states: {
|
|
1433
|
+
payoutStatus: "DONE",
|
|
1434
|
+
showVerifyIdentity: false,
|
|
1415
1435
|
canEditPayoutInfo: true,
|
|
1416
1436
|
status: "ACTIVE",
|
|
1417
1437
|
disabled: false,
|
|
@@ -1432,6 +1452,8 @@ const TaxAndCashDashboardIndirectTaxCanadaQuebec = () => {
|
|
|
1432
1452
|
return (index.h("sqm-tax-and-cash-dashboard", { demoData: {
|
|
1433
1453
|
...dashboardProps,
|
|
1434
1454
|
states: {
|
|
1455
|
+
payoutStatus: "DONE",
|
|
1456
|
+
showVerifyIdentity: false,
|
|
1435
1457
|
canEditPayoutInfo: true,
|
|
1436
1458
|
status: "ACTIVE",
|
|
1437
1459
|
disabled: false,
|
|
@@ -1453,6 +1475,8 @@ const TaxAndCashDashboardIndirectTaxSpain = () => {
|
|
|
1453
1475
|
return (index.h("sqm-tax-and-cash-dashboard", { demoData: {
|
|
1454
1476
|
...dashboardProps,
|
|
1455
1477
|
states: {
|
|
1478
|
+
payoutStatus: "DONE",
|
|
1479
|
+
showVerifyIdentity: false,
|
|
1456
1480
|
canEditPayoutInfo: true,
|
|
1457
1481
|
status: "ACTIVE",
|
|
1458
1482
|
disabled: false,
|
|
@@ -1474,6 +1498,8 @@ const TaxAndCashDashboardIndirectTaxNotRegistered = () => {
|
|
|
1474
1498
|
return (index.h("sqm-tax-and-cash-dashboard", { demoData: {
|
|
1475
1499
|
...dashboardProps,
|
|
1476
1500
|
states: {
|
|
1501
|
+
payoutStatus: "DONE",
|
|
1502
|
+
showVerifyIdentity: false,
|
|
1477
1503
|
canEditPayoutInfo: true,
|
|
1478
1504
|
status: "ACTIVE",
|
|
1479
1505
|
documentType: "W8BEN",
|
|
@@ -1490,6 +1516,8 @@ const TaxAndCashDashboardIdentityVerifcationRequired = () => {
|
|
|
1490
1516
|
return (index.h("sqm-tax-and-cash-dashboard", { demoData: {
|
|
1491
1517
|
...dashboardProps,
|
|
1492
1518
|
states: {
|
|
1519
|
+
payoutStatus: "VERIFICATION_NEEDED",
|
|
1520
|
+
showVerifyIdentity: true,
|
|
1493
1521
|
showIdentityVerificationDialog: true,
|
|
1494
1522
|
identiyRequired: true,
|
|
1495
1523
|
canEditPayoutInfo: true,
|
|
@@ -1508,6 +1536,8 @@ const TaxAndCashDashboardNewTaxForm = () => {
|
|
|
1508
1536
|
return (index.h("sqm-tax-and-cash-dashboard", { demoData: {
|
|
1509
1537
|
...dashboardProps,
|
|
1510
1538
|
states: {
|
|
1539
|
+
payoutStatus: "DONE",
|
|
1540
|
+
showVerifyIdentity: false,
|
|
1511
1541
|
canEditPayoutInfo: true,
|
|
1512
1542
|
status: "ACTIVE",
|
|
1513
1543
|
documentType: "W8BEN",
|
|
@@ -1524,6 +1554,8 @@ const TaxAndCashDashboardPayoutsOnHold = () => {
|
|
|
1524
1554
|
return (index.h("sqm-tax-and-cash-dashboard", { demoData: {
|
|
1525
1555
|
...dashboardProps,
|
|
1526
1556
|
states: {
|
|
1557
|
+
payoutStatus: "DONE",
|
|
1558
|
+
showVerifyIdentity: false,
|
|
1527
1559
|
canEditPayoutInfo: true,
|
|
1528
1560
|
disabled: true,
|
|
1529
1561
|
status: "ACTIVE",
|
|
@@ -1542,6 +1574,8 @@ const TaxAndCashDashboardLoading = () => {
|
|
|
1542
1574
|
return (index.h("sqm-tax-and-cash-dashboard", { demoData: {
|
|
1543
1575
|
...dashboardProps,
|
|
1544
1576
|
states: {
|
|
1577
|
+
payoutStatus: "DONE",
|
|
1578
|
+
showVerifyIdentity: false,
|
|
1545
1579
|
canEditPayoutInfo: true,
|
|
1546
1580
|
disabled: false,
|
|
1547
1581
|
status: "ACTIVE",
|
|
@@ -1559,6 +1593,8 @@ const TaxAndCashDashboardWithLoadingError = () => {
|
|
|
1559
1593
|
return (index.h("sqm-tax-and-cash-dashboard", { demoData: {
|
|
1560
1594
|
...dashboardProps,
|
|
1561
1595
|
states: {
|
|
1596
|
+
payoutStatus: "DONE",
|
|
1597
|
+
showVerifyIdentity: false,
|
|
1562
1598
|
disabled: false,
|
|
1563
1599
|
canEditPayoutInfo: true,
|
|
1564
1600
|
status: "ACTIVE",
|
|
@@ -1577,6 +1613,8 @@ const TaxAndCashDashboardWithGeneralError = () => {
|
|
|
1577
1613
|
return (index.h("sqm-tax-and-cash-dashboard", { demoData: {
|
|
1578
1614
|
...dashboardProps,
|
|
1579
1615
|
states: {
|
|
1616
|
+
payoutStatus: "DONE",
|
|
1617
|
+
showVerifyIdentity: false,
|
|
1580
1618
|
canEditPayoutInfo: true,
|
|
1581
1619
|
disabled: false,
|
|
1582
1620
|
status: "ACTIVE",
|
|
@@ -1599,6 +1637,8 @@ const TaxAndCashDashboardDisabled = () => {
|
|
|
1599
1637
|
return (index.h("sqm-tax-and-cash-dashboard", { demoData: {
|
|
1600
1638
|
...dashboardProps,
|
|
1601
1639
|
states: {
|
|
1640
|
+
payoutStatus: "DONE",
|
|
1641
|
+
showVerifyIdentity: false,
|
|
1602
1642
|
canEditPayoutInfo: true,
|
|
1603
1643
|
disabled: true,
|
|
1604
1644
|
status: "ACTIVE",
|
|
@@ -30,7 +30,7 @@ const sqmPortalResetPasswordView = require('./sqm-portal-reset-password-view-96f
|
|
|
30
30
|
const sqmPortalVerifyEmailView = require('./sqm-portal-verify-email-view-7ffcc0d4.js');
|
|
31
31
|
const ShadowViewAddon = require('./ShadowViewAddon-040cffad.js');
|
|
32
32
|
const sqmPortalContainerView = require('./sqm-portal-container-view-990a85a3.js');
|
|
33
|
-
const sqmInvoiceTableView = require('./sqm-invoice-table-view-
|
|
33
|
+
const sqmInvoiceTableView = require('./sqm-invoice-table-view-c58966f8.js');
|
|
34
34
|
|
|
35
35
|
/**
|
|
36
36
|
* lodash (Custom Build) <https://lodash.com/>
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
const stencilHooks_module = require('./stencil-hooks.module-72742a0b.js');
|
|
4
|
+
const index_module = require('./index.module-b8d9d0ba.js');
|
|
5
|
+
|
|
6
|
+
const GET_USER_STATUS = index_module.dist.gql `
|
|
7
|
+
query getUserStatus {
|
|
8
|
+
user: viewer {
|
|
9
|
+
... on User {
|
|
10
|
+
id
|
|
11
|
+
impactConnection {
|
|
12
|
+
connected
|
|
13
|
+
publisher {
|
|
14
|
+
id
|
|
15
|
+
payoutsAccount {
|
|
16
|
+
hold
|
|
17
|
+
holdReasons
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
`;
|
|
25
|
+
function getStatus(data) {
|
|
26
|
+
var _a, _b, _c, _d, _e;
|
|
27
|
+
const account = (_b = (_a = data.user.impactConnection) === null || _a === void 0 ? void 0 : _a.publisher) === null || _b === void 0 ? void 0 : _b.payoutsAccount;
|
|
28
|
+
if (!((_d = (_c = data.user) === null || _c === void 0 ? void 0 : _c.impactConnection) === null || _d === void 0 ? void 0 : _d.connected) || !account)
|
|
29
|
+
return "INFORMATION_REQUIRED";
|
|
30
|
+
if ((_e = account.holdReasons) === null || _e === void 0 ? void 0 : _e.includes("IDV_CHECK_REQUIRED"))
|
|
31
|
+
return "VERIFICATION_NEEDED";
|
|
32
|
+
if (account.hold)
|
|
33
|
+
return "HOLD";
|
|
34
|
+
return "DONE";
|
|
35
|
+
}
|
|
36
|
+
function usePayoutStatus(props) {
|
|
37
|
+
const { type } = index_module.getEnvironmentSDK();
|
|
38
|
+
const { loading, data, errors, refetch } = index_module.En(GET_USER_STATUS, {});
|
|
39
|
+
const [status, setStatus] = stencilHooks_module.useState(undefined);
|
|
40
|
+
const [showDialog, setShowDialog] = stencilHooks_module.useState(false);
|
|
41
|
+
stencilHooks_module.useEffect(() => {
|
|
42
|
+
if (!data)
|
|
43
|
+
return;
|
|
44
|
+
const s = getStatus(data);
|
|
45
|
+
setStatus(s);
|
|
46
|
+
}, [data]);
|
|
47
|
+
stencilHooks_module.useEffect(() => {
|
|
48
|
+
const cb = () => refetch();
|
|
49
|
+
window.addEventListener("sqm:tax-form-updated", cb);
|
|
50
|
+
return () => window.removeEventListener("sqm:tax-form-updated", cb);
|
|
51
|
+
}, []);
|
|
52
|
+
return {
|
|
53
|
+
states: {
|
|
54
|
+
loading,
|
|
55
|
+
status,
|
|
56
|
+
showVerifyIdentity: showDialog,
|
|
57
|
+
error: !!errors,
|
|
58
|
+
},
|
|
59
|
+
data: { type },
|
|
60
|
+
text: props.getTextProps(),
|
|
61
|
+
callbacks: {
|
|
62
|
+
onTermsClick: () => window.open(props.termsUrl, "_blank").focus(),
|
|
63
|
+
onClick: () => setShowDialog(true),
|
|
64
|
+
onCancel: () => setShowDialog(false),
|
|
65
|
+
},
|
|
66
|
+
};
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
exports.getStatus = getStatus;
|
|
70
|
+
exports.usePayoutStatus = usePayoutStatus;
|
|
@@ -46,9 +46,6 @@ export function useWidgetCodeVerification(props) {
|
|
|
46
46
|
const [codeRef, setCodeRef] = useState(null);
|
|
47
47
|
const [validationError, setValidationError] = useState(false);
|
|
48
48
|
const [emailError, setEmailError] = useState(false);
|
|
49
|
-
// // TODO: Need to handle error states for these errors
|
|
50
|
-
// const [verifyUser, { loading: verifyLoading, errors: verifyErrors }] =
|
|
51
|
-
// useCodeVerificationMutation();
|
|
52
49
|
const { initialized, send: [sendEmail, { loading: sendLoading, errors: sendErrors }], verify: [verifyEmail, { loading: verifyLoading, errors: verifyErrors }], } = useVerificationEmail();
|
|
53
50
|
useEffect(() => {
|
|
54
51
|
if (!codeRef)
|
|
@@ -247,6 +247,8 @@ const docusignFormProps = {
|
|
|
247
247
|
};
|
|
248
248
|
const dashboardProps = {
|
|
249
249
|
states: {
|
|
250
|
+
showVerifyIdentity: false,
|
|
251
|
+
payoutStatus: "DONE",
|
|
250
252
|
canEditPayoutInfo: true,
|
|
251
253
|
disabled: false,
|
|
252
254
|
status: "ACTIVE",
|
|
@@ -765,6 +767,8 @@ export const TaxAndCashDashboardActiveW8BENForm = () => {
|
|
|
765
767
|
return (h("sqm-tax-and-cash-dashboard", { demoData: {
|
|
766
768
|
...dashboardProps,
|
|
767
769
|
states: {
|
|
770
|
+
payoutStatus: "DONE",
|
|
771
|
+
showVerifyIdentity: false,
|
|
768
772
|
noFormNeeded: false,
|
|
769
773
|
canEditPayoutInfo: true,
|
|
770
774
|
documentType: "W8BEN",
|
|
@@ -781,6 +785,8 @@ export const TaxAndCashDashboardActiveW8BENEForm = () => {
|
|
|
781
785
|
return (h("sqm-tax-and-cash-dashboard", { demoData: {
|
|
782
786
|
...dashboardProps,
|
|
783
787
|
states: {
|
|
788
|
+
payoutStatus: "DONE",
|
|
789
|
+
showVerifyIdentity: false,
|
|
784
790
|
noFormNeeded: false,
|
|
785
791
|
canEditPayoutInfo: true,
|
|
786
792
|
documentType: "W8BENE",
|
|
@@ -797,6 +803,8 @@ export const TaxAndCashDashboardNotActiveW9Form = () => {
|
|
|
797
803
|
return (h("sqm-tax-and-cash-dashboard", { demoData: {
|
|
798
804
|
...dashboardProps,
|
|
799
805
|
states: {
|
|
806
|
+
payoutStatus: "DONE",
|
|
807
|
+
showVerifyIdentity: false,
|
|
800
808
|
noFormNeeded: false,
|
|
801
809
|
canEditPayoutInfo: true,
|
|
802
810
|
status: "INACTIVE",
|
|
@@ -814,6 +822,8 @@ export const TaxAndCashDashboardNotVerifiedW9Form = () => {
|
|
|
814
822
|
return (h("sqm-tax-and-cash-dashboard", { demoData: {
|
|
815
823
|
...dashboardProps,
|
|
816
824
|
states: {
|
|
825
|
+
payoutStatus: "DONE",
|
|
826
|
+
showVerifyIdentity: false,
|
|
817
827
|
canEditPayoutInfo: true,
|
|
818
828
|
disabled: false,
|
|
819
829
|
status: "NOT_VERIFIED",
|
|
@@ -832,6 +842,8 @@ export const TaxAndCashDashboardNotVerifiedW8BENForm = () => {
|
|
|
832
842
|
return (h("sqm-tax-and-cash-dashboard", { demoData: {
|
|
833
843
|
...dashboardProps,
|
|
834
844
|
states: {
|
|
845
|
+
payoutStatus: "DONE",
|
|
846
|
+
showVerifyIdentity: false,
|
|
835
847
|
canEditPayoutInfo: true,
|
|
836
848
|
disabled: false,
|
|
837
849
|
status: "NOT_VERIFIED",
|
|
@@ -851,6 +863,8 @@ export const TaxAndCashDashboardNotVerifiedW8BENEForm = () => {
|
|
|
851
863
|
return (h("sqm-tax-and-cash-dashboard", { demoData: {
|
|
852
864
|
...dashboardProps,
|
|
853
865
|
states: {
|
|
866
|
+
payoutStatus: "DONE",
|
|
867
|
+
showVerifyIdentity: false,
|
|
854
868
|
canEditPayoutInfo: true,
|
|
855
869
|
disabled: false,
|
|
856
870
|
status: "NOT_VERIFIED",
|
|
@@ -870,6 +884,8 @@ export const TaxAndCashDashboardNotActiveW8BENEForm = () => {
|
|
|
870
884
|
return (h("sqm-tax-and-cash-dashboard", { demoData: {
|
|
871
885
|
...dashboardProps,
|
|
872
886
|
states: {
|
|
887
|
+
payoutStatus: "DONE",
|
|
888
|
+
showVerifyIdentity: false,
|
|
873
889
|
canEditPayoutInfo: true,
|
|
874
890
|
disabled: false,
|
|
875
891
|
status: "NOT_ACTIVE",
|
|
@@ -889,6 +905,8 @@ export const TaxAndCashDashboardNoFormNeeded = () => {
|
|
|
889
905
|
return (h("sqm-tax-and-cash-dashboard", { demoData: {
|
|
890
906
|
...dashboardProps,
|
|
891
907
|
states: {
|
|
908
|
+
payoutStatus: "DONE",
|
|
909
|
+
showVerifyIdentity: false,
|
|
892
910
|
canEditPayoutInfo: true,
|
|
893
911
|
disabled: false,
|
|
894
912
|
documentType: "W9",
|
|
@@ -908,6 +926,8 @@ export const TaxAndCashDashboardIndirectTaxCanada = () => {
|
|
|
908
926
|
return (h("sqm-tax-and-cash-dashboard", { demoData: {
|
|
909
927
|
...dashboardProps,
|
|
910
928
|
states: {
|
|
929
|
+
payoutStatus: "DONE",
|
|
930
|
+
showVerifyIdentity: false,
|
|
911
931
|
canEditPayoutInfo: true,
|
|
912
932
|
status: "ACTIVE",
|
|
913
933
|
disabled: false,
|
|
@@ -928,6 +948,8 @@ export const TaxAndCashDashboardIndirectTaxCanadaQuebec = () => {
|
|
|
928
948
|
return (h("sqm-tax-and-cash-dashboard", { demoData: {
|
|
929
949
|
...dashboardProps,
|
|
930
950
|
states: {
|
|
951
|
+
payoutStatus: "DONE",
|
|
952
|
+
showVerifyIdentity: false,
|
|
931
953
|
canEditPayoutInfo: true,
|
|
932
954
|
status: "ACTIVE",
|
|
933
955
|
disabled: false,
|
|
@@ -949,6 +971,8 @@ export const TaxAndCashDashboardIndirectTaxSpain = () => {
|
|
|
949
971
|
return (h("sqm-tax-and-cash-dashboard", { demoData: {
|
|
950
972
|
...dashboardProps,
|
|
951
973
|
states: {
|
|
974
|
+
payoutStatus: "DONE",
|
|
975
|
+
showVerifyIdentity: false,
|
|
952
976
|
canEditPayoutInfo: true,
|
|
953
977
|
status: "ACTIVE",
|
|
954
978
|
disabled: false,
|
|
@@ -970,6 +994,8 @@ export const TaxAndCashDashboardIndirectTaxNotRegistered = () => {
|
|
|
970
994
|
return (h("sqm-tax-and-cash-dashboard", { demoData: {
|
|
971
995
|
...dashboardProps,
|
|
972
996
|
states: {
|
|
997
|
+
payoutStatus: "DONE",
|
|
998
|
+
showVerifyIdentity: false,
|
|
973
999
|
canEditPayoutInfo: true,
|
|
974
1000
|
status: "ACTIVE",
|
|
975
1001
|
documentType: "W8BEN",
|
|
@@ -986,6 +1012,8 @@ export const TaxAndCashDashboardIdentityVerifcationRequired = () => {
|
|
|
986
1012
|
return (h("sqm-tax-and-cash-dashboard", { demoData: {
|
|
987
1013
|
...dashboardProps,
|
|
988
1014
|
states: {
|
|
1015
|
+
payoutStatus: "VERIFICATION_NEEDED",
|
|
1016
|
+
showVerifyIdentity: true,
|
|
989
1017
|
showIdentityVerificationDialog: true,
|
|
990
1018
|
identiyRequired: true,
|
|
991
1019
|
canEditPayoutInfo: true,
|
|
@@ -1004,6 +1032,8 @@ export const TaxAndCashDashboardNewTaxForm = () => {
|
|
|
1004
1032
|
return (h("sqm-tax-and-cash-dashboard", { demoData: {
|
|
1005
1033
|
...dashboardProps,
|
|
1006
1034
|
states: {
|
|
1035
|
+
payoutStatus: "DONE",
|
|
1036
|
+
showVerifyIdentity: false,
|
|
1007
1037
|
canEditPayoutInfo: true,
|
|
1008
1038
|
status: "ACTIVE",
|
|
1009
1039
|
documentType: "W8BEN",
|
|
@@ -1020,6 +1050,8 @@ export const TaxAndCashDashboardPayoutsOnHold = () => {
|
|
|
1020
1050
|
return (h("sqm-tax-and-cash-dashboard", { demoData: {
|
|
1021
1051
|
...dashboardProps,
|
|
1022
1052
|
states: {
|
|
1053
|
+
payoutStatus: "DONE",
|
|
1054
|
+
showVerifyIdentity: false,
|
|
1023
1055
|
canEditPayoutInfo: true,
|
|
1024
1056
|
disabled: true,
|
|
1025
1057
|
status: "ACTIVE",
|
|
@@ -1038,6 +1070,8 @@ export const TaxAndCashDashboardLoading = () => {
|
|
|
1038
1070
|
return (h("sqm-tax-and-cash-dashboard", { demoData: {
|
|
1039
1071
|
...dashboardProps,
|
|
1040
1072
|
states: {
|
|
1073
|
+
payoutStatus: "DONE",
|
|
1074
|
+
showVerifyIdentity: false,
|
|
1041
1075
|
canEditPayoutInfo: true,
|
|
1042
1076
|
disabled: false,
|
|
1043
1077
|
status: "ACTIVE",
|
|
@@ -1055,6 +1089,8 @@ export const TaxAndCashDashboardWithLoadingError = () => {
|
|
|
1055
1089
|
return (h("sqm-tax-and-cash-dashboard", { demoData: {
|
|
1056
1090
|
...dashboardProps,
|
|
1057
1091
|
states: {
|
|
1092
|
+
payoutStatus: "DONE",
|
|
1093
|
+
showVerifyIdentity: false,
|
|
1058
1094
|
disabled: false,
|
|
1059
1095
|
canEditPayoutInfo: true,
|
|
1060
1096
|
status: "ACTIVE",
|
|
@@ -1073,6 +1109,8 @@ export const TaxAndCashDashboardWithGeneralError = () => {
|
|
|
1073
1109
|
return (h("sqm-tax-and-cash-dashboard", { demoData: {
|
|
1074
1110
|
...dashboardProps,
|
|
1075
1111
|
states: {
|
|
1112
|
+
payoutStatus: "DONE",
|
|
1113
|
+
showVerifyIdentity: false,
|
|
1076
1114
|
canEditPayoutInfo: true,
|
|
1077
1115
|
disabled: false,
|
|
1078
1116
|
status: "ACTIVE",
|
|
@@ -1095,6 +1133,8 @@ export const TaxAndCashDashboardDisabled = () => {
|
|
|
1095
1133
|
return (h("sqm-tax-and-cash-dashboard", { demoData: {
|
|
1096
1134
|
...dashboardProps,
|
|
1097
1135
|
states: {
|
|
1136
|
+
payoutStatus: "DONE",
|
|
1137
|
+
showVerifyIdentity: false,
|
|
1098
1138
|
canEditPayoutInfo: true,
|
|
1099
1139
|
disabled: true,
|
|
1100
1140
|
status: "ACTIVE",
|
|
@@ -36,6 +36,20 @@ const style = {
|
|
|
36
36
|
color: "var(--sl-color-blue-500)",
|
|
37
37
|
},
|
|
38
38
|
},
|
|
39
|
+
Dialog: {
|
|
40
|
+
"&::part(panel)": {
|
|
41
|
+
height: "600px",
|
|
42
|
+
},
|
|
43
|
+
"&::part(close-button)": {
|
|
44
|
+
marginBottom: "var(--sl-spacing-xx-large)",
|
|
45
|
+
},
|
|
46
|
+
"&::part(title)": {
|
|
47
|
+
display: "none",
|
|
48
|
+
},
|
|
49
|
+
"&::part(header)": {},
|
|
50
|
+
"&::part(body)": { padding: "0" },
|
|
51
|
+
"&::part(footer)": {},
|
|
52
|
+
},
|
|
39
53
|
};
|
|
40
54
|
const sheet = createStyleSheet(style);
|
|
41
55
|
const styleString = sheet.toString();
|
|
@@ -110,7 +124,8 @@ export function PayoutStatusAlertView(props) {
|
|
|
110
124
|
h("strong", null, (_d = getAlert(states.status)) === null || _d === void 0 ? void 0 : _d.header),
|
|
111
125
|
h("p", { class: sheet.classes.AlertDescriptionText }, (_e = getAlert(states.status)) === null || _e === void 0 ? void 0 : _e.description),
|
|
112
126
|
getButton(states.status)),
|
|
113
|
-
h("sl-dialog", {
|
|
114
|
-
|
|
115
|
-
|
|
127
|
+
h("sl-dialog", { noDismiss: true, class: sheet.classes.Dialog, open: states.showVerifyIdentity, "onSl-hide": callbacks.onCancel },
|
|
128
|
+
h("iframe", {
|
|
129
|
+
// AL: TODO replace iframe URL with verification url when available
|
|
130
|
+
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" }))));
|
|
116
131
|
}
|
|
@@ -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,6 +20,17 @@ 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) {
|
|
23
35
|
const { type } = getEnvironmentSDK();
|
|
24
36
|
const { loading, data, errors, refetch } = useQuery(GET_USER_STATUS, {});
|
|
@@ -27,18 +39,6 @@ export function usePayoutStatus(props) {
|
|
|
27
39
|
useEffect(() => {
|
|
28
40
|
if (!data)
|
|
29
41
|
return;
|
|
30
|
-
function getStatus(data) {
|
|
31
|
-
var _a, _b;
|
|
32
|
-
const account = (_b = (_a = data.user.impactConnection) === null || _a === void 0 ? void 0 : _a.publisher) === null || _b === void 0 ? void 0 : _b.payoutsAccount;
|
|
33
|
-
if (!account)
|
|
34
|
-
return "INFORMATION_REQUIRED";
|
|
35
|
-
if (account.hold)
|
|
36
|
-
return "HOLD";
|
|
37
|
-
// @ts-ignore, TODO: add check for account verification
|
|
38
|
-
if (!account.verified)
|
|
39
|
-
return "VERIFICATION_NEEDED";
|
|
40
|
-
return "DONE";
|
|
41
|
-
}
|
|
42
42
|
const s = getStatus(data);
|
|
43
43
|
setStatus(s);
|
|
44
44
|
}, [data]);
|
|
@@ -258,6 +258,17 @@ export const TaxAndCashDashboardView = (props) => {
|
|
|
258
258
|
h("strong", null, text.payoutHoldAlertHeader),
|
|
259
259
|
h("br", null),
|
|
260
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" })),
|
|
261
272
|
h("sl-dialog", { label: text.replaceTaxFormModalHeader, class: sheet.classes.Dialog, open: states.showNewFormDialog, "onSl-hide": callbacks.onNewFormCancel },
|
|
262
273
|
h("p", null, text.replaceTaxFormModalBodyText),
|
|
263
274
|
h("sl-button", { slot: "footer", type: "primary", class: sheet.classes.DialogButton, onClick: callbacks.onNewFormClick }, text.newFormButton),
|
|
@@ -185,6 +185,23 @@ export class TaxAndCashDashboard {
|
|
|
185
185
|
* @uiName Payout missing information subtext
|
|
186
186
|
*/
|
|
187
187
|
this.payoutMissingInformationText = "Missing banking information, go to Impact.com to resolve.";
|
|
188
|
+
/**
|
|
189
|
+
* Part of the alert displayed at the top of the page when the user needs to verify their identity.
|
|
190
|
+
* @uiName Verification required alert message title
|
|
191
|
+
* @uiWidget textArea
|
|
192
|
+
*/
|
|
193
|
+
this.verificationRequiredHeader = "Verify your identity";
|
|
194
|
+
/**
|
|
195
|
+
* Part of the alert displayed at the top of the page when the user needs to verify their identity
|
|
196
|
+
* @uiName Verification required alert message description
|
|
197
|
+
* @uiWidget textArea
|
|
198
|
+
*/
|
|
199
|
+
this.verificationRequiredDescription = "Complete your verification to start receiving your cash rewards. It should only take a few minutes verify.";
|
|
200
|
+
/**
|
|
201
|
+
* Part of the alert displayed at the top of the page when the user needs to verify their identity.
|
|
202
|
+
* @uiName Verification required alert button text
|
|
203
|
+
*/
|
|
204
|
+
this.verificationRequiredButtonText = "Start Verification";
|
|
188
205
|
/**
|
|
189
206
|
* Part of the alert displayed at the top of the page.
|
|
190
207
|
* @uiName Form submission error message title
|
|
@@ -995,6 +1012,75 @@ export class TaxAndCashDashboard {
|
|
|
995
1012
|
"reflect": false,
|
|
996
1013
|
"defaultValue": "\"Missing banking information, go to Impact.com to resolve.\""
|
|
997
1014
|
},
|
|
1015
|
+
"verificationRequiredHeader": {
|
|
1016
|
+
"type": "string",
|
|
1017
|
+
"mutable": false,
|
|
1018
|
+
"complexType": {
|
|
1019
|
+
"original": "string",
|
|
1020
|
+
"resolved": "string",
|
|
1021
|
+
"references": {}
|
|
1022
|
+
},
|
|
1023
|
+
"required": false,
|
|
1024
|
+
"optional": false,
|
|
1025
|
+
"docs": {
|
|
1026
|
+
"tags": [{
|
|
1027
|
+
"text": "Verification required alert message title",
|
|
1028
|
+
"name": "uiName"
|
|
1029
|
+
}, {
|
|
1030
|
+
"text": "textArea",
|
|
1031
|
+
"name": "uiWidget"
|
|
1032
|
+
}],
|
|
1033
|
+
"text": "Part of the alert displayed at the top of the page when the user needs to verify their identity."
|
|
1034
|
+
},
|
|
1035
|
+
"attribute": "verification-required-header",
|
|
1036
|
+
"reflect": false,
|
|
1037
|
+
"defaultValue": "\"Verify your identity\""
|
|
1038
|
+
},
|
|
1039
|
+
"verificationRequiredDescription": {
|
|
1040
|
+
"type": "string",
|
|
1041
|
+
"mutable": false,
|
|
1042
|
+
"complexType": {
|
|
1043
|
+
"original": "string",
|
|
1044
|
+
"resolved": "string",
|
|
1045
|
+
"references": {}
|
|
1046
|
+
},
|
|
1047
|
+
"required": false,
|
|
1048
|
+
"optional": false,
|
|
1049
|
+
"docs": {
|
|
1050
|
+
"tags": [{
|
|
1051
|
+
"text": "Verification required alert message description",
|
|
1052
|
+
"name": "uiName"
|
|
1053
|
+
}, {
|
|
1054
|
+
"text": "textArea",
|
|
1055
|
+
"name": "uiWidget"
|
|
1056
|
+
}],
|
|
1057
|
+
"text": "Part of the alert displayed at the top of the page when the user needs to verify their identity"
|
|
1058
|
+
},
|
|
1059
|
+
"attribute": "verification-required-description",
|
|
1060
|
+
"reflect": false,
|
|
1061
|
+
"defaultValue": "\"Complete your verification to start receiving your cash rewards. It should only take a few minutes verify.\""
|
|
1062
|
+
},
|
|
1063
|
+
"verificationRequiredButtonText": {
|
|
1064
|
+
"type": "string",
|
|
1065
|
+
"mutable": false,
|
|
1066
|
+
"complexType": {
|
|
1067
|
+
"original": "string",
|
|
1068
|
+
"resolved": "string",
|
|
1069
|
+
"references": {}
|
|
1070
|
+
},
|
|
1071
|
+
"required": false,
|
|
1072
|
+
"optional": false,
|
|
1073
|
+
"docs": {
|
|
1074
|
+
"tags": [{
|
|
1075
|
+
"text": "Verification required alert button text",
|
|
1076
|
+
"name": "uiName"
|
|
1077
|
+
}],
|
|
1078
|
+
"text": "Part of the alert displayed at the top of the page when the user needs to verify their identity."
|
|
1079
|
+
},
|
|
1080
|
+
"attribute": "verification-required-button-text",
|
|
1081
|
+
"reflect": false,
|
|
1082
|
+
"defaultValue": "\"Start Verification\""
|
|
1083
|
+
},
|
|
998
1084
|
"generalErrorTitle": {
|
|
999
1085
|
"type": "string",
|
|
1000
1086
|
"mutable": false,
|
|
@@ -1435,7 +1521,7 @@ export class TaxAndCashDashboard {
|
|
|
1435
1521
|
"mutable": false,
|
|
1436
1522
|
"complexType": {
|
|
1437
1523
|
"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; hasHold: boolean; errors?: { general?: boolean; }; }; }",
|
|
1524
|
+
"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; payoutStatus: PayoutStatus; showVerifyIdentity: boolean; errors?: { general?: boolean; }; }; }",
|
|
1439
1525
|
"references": {
|
|
1440
1526
|
"DemoData": {
|
|
1441
1527
|
"location": "import",
|
|
@@ -1477,12 +1563,15 @@ function useDemoTaxAndCashDashboard(props) {
|
|
|
1477
1563
|
loading: false,
|
|
1478
1564
|
showNewFormDialog: false,
|
|
1479
1565
|
hasHold: false,
|
|
1566
|
+
showVerifyIdentity: false,
|
|
1567
|
+
payoutStatus: "DONE",
|
|
1480
1568
|
},
|
|
1481
1569
|
callbacks: {
|
|
1482
1570
|
onClick: () => console.debug("check step"),
|
|
1483
1571
|
onEditPayoutInfo: () => console.debug("payout info"),
|
|
1484
1572
|
onNewFormCancel: () => console.log("hide"),
|
|
1485
1573
|
onNewFormClick: () => console.log("show"),
|
|
1574
|
+
onVerifyIdentityCancel: () => console.log("hide"),
|
|
1486
1575
|
},
|
|
1487
1576
|
text: props.getTextProps(),
|
|
1488
1577
|
}, props.demoData || {}, { arrayMerge: (_, a) => a });
|