@saasquatch/mint-components 2.4.3 → 2.4.5
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/{data-89ac73dd.js → data-04ef5511.js} +2 -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_10.cjs.entry.js +43 -29
- package/dist/cjs/sqm-big-stat_47.cjs.entry.js +47 -17
- package/dist/cjs/sqm-email-verification_2.cjs.entry.js +3 -3
- package/dist/cjs/{sqm-partner-info-modal-view-431100ad.js → sqm-partner-info-modal-view-d9b61d54.js} +1 -1
- package/dist/cjs/sqm-stencilbook.cjs.entry.js +75 -8
- package/dist/cjs/{sqm-user-info-form-view-c5f9b79b.js → sqm-user-info-form-view-9745956d.js} +49 -46
- package/dist/cjs/{subregions-3d27e279.js → subregions-d12829d6.js} +28 -0
- package/dist/cjs/{useIndirectTaxForm-5211013b.js → useIndirectTaxForm-0969e194.js} +26 -3
- package/dist/collection/components/sqm-partner-info-modal/sqm-partner-info-modal-view.js +1 -1
- package/dist/collection/components/sqm-widget-verification/sqm-email-verification/sqm-email-verification-view.js +1 -1
- package/dist/collection/components/tax-and-cash/TaxForm.stories.js +19 -0
- package/dist/collection/components/tax-and-cash/data.js +2 -0
- package/dist/collection/components/tax-and-cash/sqm-banking-info-form/sqm-banking-info-form-view.js +2 -2
- package/dist/collection/components/tax-and-cash/sqm-docusign-form/sqm-docusign-form-view.js +2 -2
- package/dist/collection/components/tax-and-cash/sqm-indirect-tax-form/sqm-indirect-tax-form-view.js +4 -4
- package/dist/collection/components/tax-and-cash/sqm-payout-details-card/PayoutDetailsCard.stories.js +25 -0
- package/dist/collection/components/tax-and-cash/sqm-payout-details-card/sqm-payout-details-card-view.js +12 -8
- package/dist/collection/components/tax-and-cash/sqm-payout-details-card/sqm-payout-details-card.js +1 -0
- package/dist/collection/components/tax-and-cash/sqm-payout-details-card/usePayoutDetailsCard.js +10 -9
- package/dist/collection/components/tax-and-cash/sqm-payout-status-alert/PayoutStatusAlert.stories.js +7 -0
- package/dist/collection/components/tax-and-cash/sqm-payout-status-alert/sqm-payout-status-alert-view.js +24 -13
- package/dist/collection/components/tax-and-cash/sqm-payout-status-alert/sqm-payout-status-alert.js +51 -1
- package/dist/collection/components/tax-and-cash/sqm-payout-status-alert/usePayoutStatus.js +25 -1
- package/dist/collection/components/tax-and-cash/sqm-tax-and-cash/sqm-tax-and-cash.js +64 -2
- package/dist/collection/components/tax-and-cash/sqm-tax-and-cash-dashboard/TaxAndCashDashboardView.stories.js +11 -3
- package/dist/collection/components/tax-and-cash/sqm-tax-and-cash-dashboard/sqm-tax-and-cash-dashboard-view.js +44 -41
- package/dist/collection/components/tax-and-cash/sqm-tax-and-cash-dashboard/sqm-tax-and-cash-dashboard.js +51 -1
- 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/UserInfoFormView.stories.js +3 -1
- package/dist/collection/components/tax-and-cash/sqm-user-info-form/sqm-user-info-form-view.js +3 -3
- package/dist/collection/components/tax-and-cash/utils.js +26 -0
- package/dist/esm/{data-8698cbc6.js → data-0be04430.js} +2 -0
- package/dist/esm/loader.js +1 -1
- package/dist/esm/mint-components.js +1 -1
- package/dist/esm/sqm-banking-info-form_10.entry.js +43 -29
- package/dist/esm/sqm-big-stat_47.entry.js +47 -17
- package/dist/esm/sqm-email-verification_2.entry.js +3 -3
- package/dist/esm/{sqm-partner-info-modal-view-34d4be5b.js → sqm-partner-info-modal-view-b921fed1.js} +1 -1
- package/dist/esm/sqm-stencilbook.entry.js +75 -8
- package/dist/esm/{sqm-user-info-form-view-ceb3917a.js → sqm-user-info-form-view-81526655.js} +49 -46
- package/dist/esm/{subregions-810a5c2d.js → subregions-98789b46.js} +27 -1
- package/dist/esm/{useIndirectTaxForm-4dc576f0.js → useIndirectTaxForm-bbe8779d.js} +26 -3
- package/dist/esm-es5/data-0be04430.js +1 -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_10.entry.js +1 -1
- package/dist/esm-es5/sqm-big-stat_47.entry.js +1 -1
- package/dist/esm-es5/sqm-email-verification_2.entry.js +1 -1
- package/dist/esm-es5/sqm-partner-info-modal-view-b921fed1.js +1 -0
- package/dist/esm-es5/sqm-stencilbook.entry.js +1 -1
- package/dist/esm-es5/sqm-user-info-form-view-81526655.js +1 -0
- package/dist/esm-es5/subregions-98789b46.js +1 -0
- package/dist/esm-es5/useIndirectTaxForm-bbe8779d.js +6 -0
- package/dist/mint-components/mint-components.esm.js +1 -1
- package/dist/mint-components/p-07b989a3.system.js +6 -0
- package/dist/mint-components/{p-05466678.entry.js → p-0d89ef44.entry.js} +3 -3
- package/dist/mint-components/p-14f4cce8.js +1 -0
- package/dist/mint-components/{p-8bdabf61.entry.js → p-1e9c339f.entry.js} +2 -2
- package/dist/mint-components/p-227ca8d4.system.js +1 -0
- package/dist/mint-components/p-231926a3.system.entry.js +1 -0
- package/dist/mint-components/p-288249ae.system.entry.js +1 -0
- package/dist/mint-components/p-53575d04.js +1 -0
- package/dist/mint-components/p-549d60ee.system.entry.js +1 -0
- package/dist/mint-components/{p-7468e5b8.entry.js → p-654cdee8.entry.js} +2 -2
- package/dist/mint-components/{p-5c52100b.js → p-7aa89fa8.js} +2 -0
- package/dist/mint-components/p-826e3db0.system.js +1 -0
- package/dist/mint-components/p-a1b655ba.system.js +1 -0
- package/dist/mint-components/p-b1feb0f1.js +108 -0
- package/dist/mint-components/p-bfb00685.system.js +1 -1
- package/dist/mint-components/{p-ee6700a3.system.entry.js → p-cf12347b.system.entry.js} +1 -1
- package/dist/mint-components/p-db73312a.system.js +1 -0
- package/dist/mint-components/p-e1b917ff.entry.js +83 -0
- package/dist/mint-components/p-f75ead20.js +1 -0
- package/dist/types/components/tax-and-cash/TaxForm.stories.d.ts +1 -0
- package/dist/types/components/tax-and-cash/data.d.ts +2 -0
- package/dist/types/components/tax-and-cash/sqm-payout-details-card/PayoutDetailsCard.stories.d.ts +3 -0
- package/dist/types/components/tax-and-cash/sqm-payout-details-card/sqm-payout-details-card-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 +3 -0
- package/dist/types/components/tax-and-cash/sqm-payout-status-alert/sqm-payout-status-alert.d.ts +8 -0
- package/dist/types/components/tax-and-cash/sqm-payout-status-alert/usePayoutStatus.d.ts +2 -1
- package/dist/types/components/tax-and-cash/sqm-tax-and-cash/sqm-tax-and-cash.d.ts +11 -0
- package/dist/types/components/tax-and-cash/sqm-tax-and-cash-dashboard/TaxAndCashDashboardView.stories.d.ts +1 -0
- 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 +8 -0
- package/dist/types/components/tax-and-cash/utils.d.ts +5 -1
- package/dist/types/components.d.ts +54 -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/data-8698cbc6.js +0 -1
- package/dist/esm-es5/sqm-partner-info-modal-view-34d4be5b.js +0 -1
- package/dist/esm-es5/sqm-user-info-form-view-ceb3917a.js +0 -1
- package/dist/esm-es5/subregions-810a5c2d.js +0 -1
- package/dist/esm-es5/useIndirectTaxForm-4dc576f0.js +0 -6
- package/dist/mint-components/p-0ad64881.js +0 -101
- package/dist/mint-components/p-41e1547d.system.entry.js +0 -1
- package/dist/mint-components/p-4481f259.entry.js +0 -83
- package/dist/mint-components/p-6c31a79b.system.entry.js +0 -1
- package/dist/mint-components/p-6cd93ea3.system.js +0 -6
- package/dist/mint-components/p-765e3379.js +0 -1
- package/dist/mint-components/p-92f520c9.js +0 -1
- package/dist/mint-components/p-93f1e26a.system.entry.js +0 -1
- package/dist/mint-components/p-9c1f5317.system.js +0 -1
- package/dist/mint-components/p-ad90628d.system.js +0 -1
- package/dist/mint-components/p-aef2db59.system.js +0 -1
- package/dist/mint-components/p-c36fedea.js +0 -1
- package/dist/mint-components/p-fd231c49.system.js +0 -1
package/dist/cjs/{sqm-user-info-form-view-c5f9b79b.js → sqm-user-info-form-view-9745956d.js}
RENAMED
|
@@ -4,8 +4,8 @@ const index = require('./index-8277cbb3.js');
|
|
|
4
4
|
const global = require('./global-258c36b8.js');
|
|
5
5
|
const JSS = require('./JSS-8503a151.js');
|
|
6
6
|
const AsYouType = require('./AsYouType-d15caac8.js');
|
|
7
|
-
const subregions = require('./subregions-
|
|
8
|
-
const data = require('./data-
|
|
7
|
+
const subregions = require('./subregions-d12829d6.js');
|
|
8
|
+
const data = require('./data-04ef5511.js');
|
|
9
9
|
|
|
10
10
|
const style = {
|
|
11
11
|
Description: {
|
|
@@ -61,6 +61,18 @@ function InvoiceTableView(props, children) {
|
|
|
61
61
|
children))));
|
|
62
62
|
}
|
|
63
63
|
|
|
64
|
+
const holdAlertContainer = (iconColor) => ({
|
|
65
|
+
marginLeft: "-20px",
|
|
66
|
+
"&::part(base)": {
|
|
67
|
+
maxWidth: "850px",
|
|
68
|
+
border: "none",
|
|
69
|
+
backgroundColor: "transparent",
|
|
70
|
+
color: "var(--sqm-text)",
|
|
71
|
+
},
|
|
72
|
+
"& sl-icon::part(base)": {
|
|
73
|
+
color: iconColor,
|
|
74
|
+
},
|
|
75
|
+
});
|
|
64
76
|
const style$1 = {
|
|
65
77
|
ErrorAlertContainer: {
|
|
66
78
|
"&::part(base)": {
|
|
@@ -75,30 +87,9 @@ const style$1 = {
|
|
|
75
87
|
maxWidth: "600px",
|
|
76
88
|
},
|
|
77
89
|
},
|
|
78
|
-
WarningHoldAlertContainer:
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
maxWidth: "850px",
|
|
82
|
-
border: "none",
|
|
83
|
-
backgroundColor: "transparent",
|
|
84
|
-
color: "var(--sqm-text)",
|
|
85
|
-
},
|
|
86
|
-
"& sl-icon::part(base)": {
|
|
87
|
-
color: "var(--sqm-warning-color-icon)",
|
|
88
|
-
},
|
|
89
|
-
},
|
|
90
|
-
ErrorHoldAlertContainer: {
|
|
91
|
-
marginLeft: "-20px",
|
|
92
|
-
"&::part(base)": {
|
|
93
|
-
maxWidth: "850px",
|
|
94
|
-
border: "none",
|
|
95
|
-
backgroundColor: "transparent",
|
|
96
|
-
color: "var(--sqm-text)",
|
|
97
|
-
},
|
|
98
|
-
"& sl-icon::part(base)": {
|
|
99
|
-
color: "var(--sqm-danger-color-icon)",
|
|
100
|
-
},
|
|
101
|
-
},
|
|
90
|
+
WarningHoldAlertContainer: holdAlertContainer("var(--sqm-warning-color-icon)"),
|
|
91
|
+
ErrorHoldAlertContainer: holdAlertContainer("var(--sqm-danger-color-icon)"),
|
|
92
|
+
InfoHoldAlertContainer: holdAlertContainer("var(--sqm-informative-color-icon)"),
|
|
102
93
|
ExpiringSoonAlertContainer: {
|
|
103
94
|
"&::part(base)": {
|
|
104
95
|
backgroundColor: "var(--sl-color-yellow-100)",
|
|
@@ -358,7 +349,7 @@ const TaxAndCashDashboardView = (props) => {
|
|
|
358
349
|
id: "payoutHoldAlertDescription",
|
|
359
350
|
defaultMessage: text.payoutHoldAlertDescription,
|
|
360
351
|
}, {
|
|
361
|
-
supportLink: (index.h("a", { target: "_blank", href: `mailto:advocate-support@impact.com` }, text.supportLink)),
|
|
352
|
+
supportLink: (index.h("a", { target: "_blank", href: `mailto:advocate-payment-support@impact.com` }, text.supportLink)),
|
|
362
353
|
}),
|
|
363
354
|
buttonText: null,
|
|
364
355
|
alertType: "warning",
|
|
@@ -373,7 +364,7 @@ const TaxAndCashDashboardView = (props) => {
|
|
|
373
364
|
id: "verificationRequiredDescription",
|
|
374
365
|
defaultMessage: text.verificationRequiredDescription,
|
|
375
366
|
}, {
|
|
376
|
-
supportLink: (index.h("a", { target: "_blank", href: `mailto:advocate-support@impact.com` }, text.supportLink)),
|
|
367
|
+
supportLink: (index.h("a", { target: "_blank", href: `mailto:advocate-payment-support@impact.com` }, text.supportLink)),
|
|
377
368
|
}),
|
|
378
369
|
buttonText: text.verificationRequiredButtonText,
|
|
379
370
|
alertType: "warning",
|
|
@@ -387,7 +378,7 @@ const TaxAndCashDashboardView = (props) => {
|
|
|
387
378
|
id: "verificationRequiredInternalDescription",
|
|
388
379
|
defaultMessage: text.verificationRequiredInternalDescription,
|
|
389
380
|
}, {
|
|
390
|
-
supportLink: (index.h("a", { target: "_blank", href: `mailto:advocate-support@impact.com` }, text.supportLink)),
|
|
381
|
+
supportLink: (index.h("a", { target: "_blank", href: `mailto:advocate-payment-support@impact.com` }, text.supportLink)),
|
|
391
382
|
}),
|
|
392
383
|
alertType: "warning",
|
|
393
384
|
icon: "exclamation-triangle",
|
|
@@ -400,7 +391,7 @@ const TaxAndCashDashboardView = (props) => {
|
|
|
400
391
|
id: "verificationReviewInternalDescription",
|
|
401
392
|
defaultMessage: text.verificationReviewInternalDescription,
|
|
402
393
|
}, {
|
|
403
|
-
supportLink: (index.h("a", { target: "_blank", href: `mailto:advocate-support@impact.com` }, text.supportLink)),
|
|
394
|
+
supportLink: (index.h("a", { target: "_blank", href: `mailto:advocate-payment-support@impact.com` }, text.supportLink)),
|
|
404
395
|
}),
|
|
405
396
|
alertType: "warning",
|
|
406
397
|
icon: "exclamation-triangle",
|
|
@@ -413,7 +404,7 @@ const TaxAndCashDashboardView = (props) => {
|
|
|
413
404
|
id: "verificationFailedInternalDescription",
|
|
414
405
|
defaultMessage: text.verificationFailedInternalDescription,
|
|
415
406
|
}, {
|
|
416
|
-
supportLink: (index.h("a", { target: "_blank", href: `mailto:advocate-support@impact.com` }, text.supportLink)),
|
|
407
|
+
supportLink: (index.h("a", { target: "_blank", href: `mailto:advocate-payment-support@impact.com` }, text.supportLink)),
|
|
417
408
|
}),
|
|
418
409
|
alertType: "error",
|
|
419
410
|
icon: "exclamation-octagon",
|
|
@@ -426,13 +417,25 @@ const TaxAndCashDashboardView = (props) => {
|
|
|
426
417
|
id: "accountReviewDescription",
|
|
427
418
|
defaultMessage: text.accountReviewDescription,
|
|
428
419
|
}, {
|
|
429
|
-
supportLink: (index.h("a", { target: "_blank", href: `mailto:advocate-support@impact.com` }, text.supportLink)),
|
|
420
|
+
supportLink: (index.h("a", { target: "_blank", href: `mailto:advocate-payment-support@impact.com` }, text.supportLink)),
|
|
430
421
|
}),
|
|
431
422
|
buttonText: null,
|
|
432
423
|
alertType: "warning",
|
|
433
424
|
icon: "exclamation-triangle",
|
|
434
425
|
class: sheet.classes.WarningHoldAlertContainer,
|
|
435
426
|
};
|
|
427
|
+
case "BALANCE_UNDER_THRESHOLD":
|
|
428
|
+
return {
|
|
429
|
+
header: text.balanceUnderThresholdHeader,
|
|
430
|
+
description: global.intl.formatMessage({
|
|
431
|
+
id: "balanceUnderThresholdDescription",
|
|
432
|
+
defaultMessage: text.balanceUnderThresholdDescription,
|
|
433
|
+
}, { minPayoutAmount: states.minPayoutAmount }),
|
|
434
|
+
buttonText: null,
|
|
435
|
+
alertType: "info",
|
|
436
|
+
icon: "info-circle",
|
|
437
|
+
class: sheet.classes.InfoHoldAlertContainer,
|
|
438
|
+
};
|
|
436
439
|
case "PAYMENT_HOLD_ON_CHANGE":
|
|
437
440
|
return {
|
|
438
441
|
header: text.paymentHoldOnChangeHeader,
|
|
@@ -440,7 +443,7 @@ const TaxAndCashDashboardView = (props) => {
|
|
|
440
443
|
id: "accountReviewDescription",
|
|
441
444
|
defaultMessage: text.paymentHoldOnChangeDescription,
|
|
442
445
|
}, {
|
|
443
|
-
supportLink: (index.h("a", { target: "_blank", href: `mailto:advocate-support@impact.com` }, text.supportLink)),
|
|
446
|
+
supportLink: (index.h("a", { target: "_blank", href: `mailto:advocate-payment-support@impact.com` }, text.supportLink)),
|
|
444
447
|
}),
|
|
445
448
|
buttonText: null,
|
|
446
449
|
alertType: "warning",
|
|
@@ -454,7 +457,7 @@ const TaxAndCashDashboardView = (props) => {
|
|
|
454
457
|
id: "accountReviewDescription",
|
|
455
458
|
defaultMessage: text.beneficiaryNameInvalidDescription,
|
|
456
459
|
}, {
|
|
457
|
-
supportLink: (index.h("a", { target: "_blank", href: `mailto:advocate-support@impact.com` }, text.supportLink)),
|
|
460
|
+
supportLink: (index.h("a", { target: "_blank", href: `mailto:advocate-payment-support@impact.com` }, text.supportLink)),
|
|
458
461
|
}),
|
|
459
462
|
button: (index.h("div", { class: sheet.classes.ButtonContainer },
|
|
460
463
|
index.h("sl-button", { disabled: states.disabled || states.loading, type: "primary", class: sheet.classes.EditBankDetailsButton, onClick: callbacks.onEditPayoutInfo }, text.editPaymentInformationButton),
|
|
@@ -470,7 +473,7 @@ const TaxAndCashDashboardView = (props) => {
|
|
|
470
473
|
id: "accountReviewDescription",
|
|
471
474
|
defaultMessage: text.beneficiaryNameMismatchDescription,
|
|
472
475
|
}, {
|
|
473
|
-
supportLink: (index.h("a", { target: "_blank", href: `mailto:advocate-support@impact.com` }, text.supportLink)),
|
|
476
|
+
supportLink: (index.h("a", { target: "_blank", href: `mailto:advocate-payment-support@impact.com` }, text.supportLink)),
|
|
474
477
|
}),
|
|
475
478
|
button: (index.h("div", { class: sheet.classes.ButtonContainer },
|
|
476
479
|
index.h("sl-button", { disabled: states.disabled || states.loading, type: "primary", class: sheet.classes.EditBankDetailsButton, onClick: callbacks.onEditPayoutInfo }, text.editPaymentInformationButton),
|
|
@@ -486,7 +489,7 @@ const TaxAndCashDashboardView = (props) => {
|
|
|
486
489
|
id: "accountReviewDescription",
|
|
487
490
|
defaultMessage: text.bankTaxNameMismatchDescription,
|
|
488
491
|
}, {
|
|
489
|
-
supportLink: (index.h("a", { target: "_blank", href: `mailto:advocate-support@impact.com` }, text.supportLink)),
|
|
492
|
+
supportLink: (index.h("a", { target: "_blank", href: `mailto:advocate-payment-support@impact.com` }, text.supportLink)),
|
|
490
493
|
}),
|
|
491
494
|
button: (index.h("div", { class: sheet.classes.ButtonContainer },
|
|
492
495
|
index.h("sl-button", { disabled: states.disabled || states.loading, type: "primary", class: sheet.classes.EditBankDetailsButton, onClick: callbacks.onEditPayoutInfo }, text.editPaymentInformationButton),
|
|
@@ -502,7 +505,7 @@ const TaxAndCashDashboardView = (props) => {
|
|
|
502
505
|
id: "accountReviewDescription",
|
|
503
506
|
defaultMessage: text.withdrawalSettingsInvalidDescription,
|
|
504
507
|
}, {
|
|
505
|
-
supportLink: (index.h("a", { target: "_blank", href: `mailto:advocate-support@impact.com` }, text.supportLink)),
|
|
508
|
+
supportLink: (index.h("a", { target: "_blank", href: `mailto:advocate-payment-support@impact.com` }, text.supportLink)),
|
|
506
509
|
}),
|
|
507
510
|
button: (index.h("sl-button", { disabled: states.disabled || states.loading, type: "default", class: sheet.classes.EditBankDetailsButton, onClick: callbacks.onEditPayoutInfo }, text.editPaymentInformationButton)),
|
|
508
511
|
alertType: "warning",
|
|
@@ -516,7 +519,7 @@ const TaxAndCashDashboardView = (props) => {
|
|
|
516
519
|
id: "accountReviewDescription",
|
|
517
520
|
defaultMessage: text.paymentReturnedDescription,
|
|
518
521
|
}, {
|
|
519
|
-
supportLink: (index.h("a", { target: "_blank", href: `mailto:advocate-support@impact.com` }, text.supportLink)),
|
|
522
|
+
supportLink: (index.h("a", { target: "_blank", href: `mailto:advocate-payment-support@impact.com` }, text.supportLink)),
|
|
520
523
|
}),
|
|
521
524
|
button: (index.h("sl-button", { disabled: states.disabled || states.loading, type: "primary", class: sheet.classes.EditBankDetailsButton, onClick: callbacks.onEditPayoutInfo }, text.editPaymentInformationButton)),
|
|
522
525
|
alertType: "error",
|
|
@@ -530,7 +533,7 @@ const TaxAndCashDashboardView = (props) => {
|
|
|
530
533
|
id: "payoutHoldAlertDescription",
|
|
531
534
|
defaultMessage: text.payoutHoldAlertDescription,
|
|
532
535
|
}, {
|
|
533
|
-
supportLink: (index.h("a", { target: "_blank", href: `mailto:advocate-support@impact.com` }, text.supportLink)),
|
|
536
|
+
supportLink: (index.h("a", { target: "_blank", href: `mailto:advocate-payment-support@impact.com` }, text.supportLink)),
|
|
534
537
|
}),
|
|
535
538
|
buttonText: null,
|
|
536
539
|
alertType: "warning",
|
|
@@ -664,7 +667,7 @@ const TaxAndCashDashboardView = (props) => {
|
|
|
664
667
|
id: "loadingErrorAlertDescription",
|
|
665
668
|
defaultMessage: text.error.loadingErrorAlertDescription,
|
|
666
669
|
}, {
|
|
667
|
-
supportLink: (index.h("a", { target: "_blank", href: `mailto:advocate-support@impact.com` }, text.supportLink)),
|
|
670
|
+
supportLink: (index.h("a", { target: "_blank", href: `mailto:advocate-payment-support@impact.com` }, text.supportLink)),
|
|
668
671
|
})))),
|
|
669
672
|
((_a = states.errors) === null || _a === void 0 ? void 0 : _a.general) && (index.h("sl-alert", { exportparts: "base: alert-base, icon:alert-icon", type: "danger", open: true, class: sheet.classes.ErrorAlertContainer },
|
|
670
673
|
index.h("sl-icon", { slot: "icon", name: "exclamation-octagon" }),
|
|
@@ -674,7 +677,7 @@ const TaxAndCashDashboardView = (props) => {
|
|
|
674
677
|
id: "generalDescription",
|
|
675
678
|
defaultMessage: text.error.generalDescription,
|
|
676
679
|
}, {
|
|
677
|
-
supportLink: (index.h("a", { target: "_blank", href: `mailto:advocate-support@impact.com` }, text.supportLink)),
|
|
680
|
+
supportLink: (index.h("a", { target: "_blank", href: `mailto:advocate-payment-support@impact.com` }, text.supportLink)),
|
|
678
681
|
}))),
|
|
679
682
|
alertInfo && (index.h("sqm-form-message", { loading: states.loading, exportparts: "base: alert-base, icon:alert-icon", type: alertInfo === null || alertInfo === void 0 ? void 0 : alertInfo.alertType, class: alertInfo === null || alertInfo === void 0 ? void 0 : alertInfo.class, icon: alertInfo === null || alertInfo === void 0 ? void 0 : alertInfo.icon, transparent: true },
|
|
680
683
|
index.h("strong", null, alertInfo.header),
|
|
@@ -723,14 +726,14 @@ const TaxAndCashDashboardView = (props) => {
|
|
|
723
726
|
id: "indirectTaxTooltipSupport",
|
|
724
727
|
defaultMessage: text.indirectTaxTooltipSupport,
|
|
725
728
|
}, {
|
|
726
|
-
supportLink: (index.h("a", { target: "_blank", href: `mailto:advocate-support@impact.com`, class: sheet.classes.DropdownLink }, text.supportLink)),
|
|
729
|
+
supportLink: (index.h("a", { target: "_blank", href: `mailto:advocate-payment-support@impact.com`, class: sheet.classes.DropdownLink }, text.supportLink)),
|
|
727
730
|
})))),
|
|
728
731
|
index.h("div", { class: sheet.classes.IndirectTaxPreviewDetails },
|
|
729
732
|
index.h("span", null, states.notRegistered ? (index.h("span", { class: sheet.classes.NotRegisteredIndirectTaxText }, global.intl.formatMessage({
|
|
730
733
|
id: "notRegisteredForTax",
|
|
731
734
|
defaultMessage: text.notRegisteredForTax,
|
|
732
735
|
}, {
|
|
733
|
-
supportLink: (index.h("a", { target: "_blank", href: `mailto:advocate-support@impact.com` }, text.supportLink)),
|
|
736
|
+
supportLink: (index.h("a", { target: "_blank", href: `mailto:advocate-payment-support@impact.com` }, text.supportLink)),
|
|
734
737
|
}))) : (getIndirectTaxRegisteredIn())),
|
|
735
738
|
!states.notRegistered && (index.h("div", { class: sheet.classes.TaxNumberContainer },
|
|
736
739
|
index.h("span", null, global.intl.formatMessage({
|
|
@@ -2268,7 +2271,7 @@ const UserInfoFormView = (props) => {
|
|
|
2268
2271
|
id: "loadingErrorAlertDescription",
|
|
2269
2272
|
defaultMessage: text.error.loadingErrorAlertDescription,
|
|
2270
2273
|
}, {
|
|
2271
|
-
supportLink: (index.h("a", { target: "_blank", href: `mailto:advocate-support@impact.com` }, text.supportLink)),
|
|
2274
|
+
supportLink: (index.h("a", { target: "_blank", href: `mailto:advocate-payment-support@impact.com` }, text.supportLink)),
|
|
2272
2275
|
}))))),
|
|
2273
2276
|
states.loading ? (index.h(subregions.LoadingView, null)) : (index.h("div", null,
|
|
2274
2277
|
index.h("div", { class: classes.TextContainer },
|
|
@@ -2285,7 +2288,7 @@ const UserInfoFormView = (props) => {
|
|
|
2285
2288
|
id: "generalDescription",
|
|
2286
2289
|
defaultMessage: text.error.generalDescription,
|
|
2287
2290
|
}, {
|
|
2288
|
-
supportLink: (index.h("a", { target: "_blank", href: `mailto:advocate-support@impact.com` }, text.supportLink)),
|
|
2291
|
+
supportLink: (index.h("a", { target: "_blank", href: `mailto:advocate-payment-support@impact.com` }, text.supportLink)),
|
|
2289
2292
|
})))),
|
|
2290
2293
|
(states.isPartnerLegacy || states.isUserLegacy) && (index.h("sqm-form-message", { loading: states.loading, type: "info" },
|
|
2291
2294
|
index.h("p", { part: "alert-title" }, text.isPartnerAlertHeader),
|
|
@@ -2293,7 +2296,7 @@ const UserInfoFormView = (props) => {
|
|
|
2293
2296
|
id: "isPartnerAlertDescription",
|
|
2294
2297
|
defaultMessage: text.isPartnerAlertDescription,
|
|
2295
2298
|
}, {
|
|
2296
|
-
supportLink: (index.h("a", { target: "_blank", href: `mailto:advocate-support@impact.com` }, text.supportLink)),
|
|
2299
|
+
supportLink: (index.h("a", { target: "_blank", href: `mailto:advocate-payment-support@impact.com` }, text.supportLink)),
|
|
2297
2300
|
})))),
|
|
2298
2301
|
index.h("div", null,
|
|
2299
2302
|
index.h("div", { class: classes.InputContainer },
|
|
@@ -635,6 +635,32 @@ function getCountryObj({ countryCode, locale, }) {
|
|
|
635
635
|
displayName,
|
|
636
636
|
};
|
|
637
637
|
}
|
|
638
|
+
/** The minimum balance Impact requires before it will issue a payout, e.g. "USD50.00". */
|
|
639
|
+
function formatPayoutThreshold(publisher) {
|
|
640
|
+
var _a, _b;
|
|
641
|
+
const threshold = (_a = publisher === null || publisher === void 0 ? void 0 : publisher.withdrawalSettings) === null || _a === void 0 ? void 0 : _a.paymentThreshold;
|
|
642
|
+
if (!threshold)
|
|
643
|
+
return undefined;
|
|
644
|
+
return `${(_b = publisher === null || publisher === void 0 ? void 0 : publisher.currency) !== null && _b !== void 0 ? _b : ""}${threshold}`;
|
|
645
|
+
}
|
|
646
|
+
/** `payoutsAccount.balance` is a formatted string; only `balanceAmount` (minor units) is comparable. */
|
|
647
|
+
function isBalanceUnderPayoutThreshold(publisher) {
|
|
648
|
+
var _a;
|
|
649
|
+
const rawThreshold = (_a = publisher === null || publisher === void 0 ? void 0 : publisher.withdrawalSettings) === null || _a === void 0 ? void 0 : _a.paymentThreshold;
|
|
650
|
+
const account = publisher === null || publisher === void 0 ? void 0 : publisher.payoutsAccount;
|
|
651
|
+
if (!rawThreshold || !account)
|
|
652
|
+
return false;
|
|
653
|
+
const threshold = Number(rawThreshold);
|
|
654
|
+
if (!Number.isFinite(threshold) || !Number.isFinite(account.balanceAmount))
|
|
655
|
+
return false;
|
|
656
|
+
const currency = account.currencyCode || (publisher === null || publisher === void 0 ? void 0 : publisher.currency);
|
|
657
|
+
if (!currency)
|
|
658
|
+
return false;
|
|
659
|
+
const scale = 10 **
|
|
660
|
+
new Intl.NumberFormat("en-US", { style: "currency", currency })
|
|
661
|
+
.resolvedOptions().maximumFractionDigits;
|
|
662
|
+
return account.balanceAmount < Math.round(threshold * scale);
|
|
663
|
+
}
|
|
638
664
|
|
|
639
665
|
const style = {
|
|
640
666
|
Container: {
|
|
@@ -1059,7 +1085,9 @@ exports.INDIRECT_TAX_PROVINCES = INDIRECT_TAX_PROVINCES;
|
|
|
1059
1085
|
exports.INDIRECT_TAX_SPAIN_REGIONS = INDIRECT_TAX_SPAIN_REGIONS;
|
|
1060
1086
|
exports.LoadingView = LoadingView;
|
|
1061
1087
|
exports.formatErrorMessage = formatErrorMessage;
|
|
1088
|
+
exports.formatPayoutThreshold = formatPayoutThreshold;
|
|
1062
1089
|
exports.getCountryObj = getCountryObj;
|
|
1090
|
+
exports.isBalanceUnderPayoutThreshold = isBalanceUnderPayoutThreshold;
|
|
1063
1091
|
exports.isValidI18nPhoneNumber = isValidI18nPhoneNumber;
|
|
1064
1092
|
exports.objectIsFull = objectIsFull;
|
|
1065
1093
|
exports.taxTypeToName = taxTypeToName;
|
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
const domContextHooks_module = require('./dom-context-hooks.module-e7b6727c.js');
|
|
4
4
|
const index_module = require('./index.module-f8c8495f.js');
|
|
5
5
|
const jsonpointer = require('./jsonpointer-11327262.js');
|
|
6
|
-
const subregions = require('./subregions-
|
|
7
|
-
const data = require('./data-
|
|
6
|
+
const subregions = require('./subregions-d12829d6.js');
|
|
7
|
+
const data = require('./data-04ef5511.js');
|
|
8
8
|
const eventKeys = require('./eventKeys-7af4df4d.js');
|
|
9
9
|
|
|
10
10
|
var toArray = function toArray(a) {
|
|
@@ -977,9 +977,16 @@ const GET_USER_STATUS = index_module.dist.gql `
|
|
|
977
977
|
connected
|
|
978
978
|
publisher {
|
|
979
979
|
id
|
|
980
|
+
currency
|
|
981
|
+
withdrawalSettings {
|
|
982
|
+
paymentThreshold
|
|
983
|
+
}
|
|
980
984
|
payoutsAccount {
|
|
981
985
|
hold
|
|
982
986
|
holdReasons
|
|
987
|
+
balance
|
|
988
|
+
balanceAmount
|
|
989
|
+
currencyCode
|
|
983
990
|
}
|
|
984
991
|
}
|
|
985
992
|
}
|
|
@@ -1006,7 +1013,22 @@ const GET_TAX_SETTING = index_module.dist.gql `
|
|
|
1006
1013
|
}
|
|
1007
1014
|
}
|
|
1008
1015
|
`;
|
|
1016
|
+
/** Transient holds that clear automatically, so a balance under the minimum explains the wait better. */
|
|
1017
|
+
const DISPLACEABLE_STATUSES = [
|
|
1018
|
+
"DONE",
|
|
1019
|
+
"NEW_PAYEE_REVIEW",
|
|
1020
|
+
"PAYMENT_HOLD_ON_CHANGE",
|
|
1021
|
+
];
|
|
1009
1022
|
function getStatus(data) {
|
|
1023
|
+
var _a;
|
|
1024
|
+
const status = getHoldStatus(data);
|
|
1025
|
+
const publisher = (_a = data.user.impactConnection) === null || _a === void 0 ? void 0 : _a.publisher;
|
|
1026
|
+
return DISPLACEABLE_STATUSES.includes(status) &&
|
|
1027
|
+
subregions.isBalanceUnderPayoutThreshold(publisher)
|
|
1028
|
+
? "BALANCE_UNDER_THRESHOLD"
|
|
1029
|
+
: status;
|
|
1030
|
+
}
|
|
1031
|
+
function getHoldStatus(data) {
|
|
1010
1032
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x;
|
|
1011
1033
|
const account = (_b = (_a = data.user.impactConnection) === null || _a === void 0 ? void 0 : _a.publisher) === null || _b === void 0 ? void 0 : _b.payoutsAccount;
|
|
1012
1034
|
const hasTransferredReward = (_e = (_d = (_c = data === null || data === void 0 ? void 0 : data.user) === null || _c === void 0 ? void 0 : _c.rewards) === null || _d === void 0 ? void 0 : _d.data) === null || _e === void 0 ? void 0 : _e.find((reward) => {
|
|
@@ -1049,7 +1071,7 @@ function getStatus(data) {
|
|
|
1049
1071
|
return "DONE";
|
|
1050
1072
|
}
|
|
1051
1073
|
function usePayoutStatus(props) {
|
|
1052
|
-
var _a;
|
|
1074
|
+
var _a, _b, _c;
|
|
1053
1075
|
const { type } = index_module.getEnvironmentSDK();
|
|
1054
1076
|
const { loading, data, errors, refetch } = index_module.wn(GET_USER_STATUS, {});
|
|
1055
1077
|
const { data: taxSettingRes } = index_module.wn(GET_TAX_SETTING, {});
|
|
@@ -1099,6 +1121,7 @@ function usePayoutStatus(props) {
|
|
|
1099
1121
|
status,
|
|
1100
1122
|
error: !!errors,
|
|
1101
1123
|
enforceUsTaxComplianceOption,
|
|
1124
|
+
minPayoutAmount: subregions.formatPayoutThreshold((_c = (_b = data === null || data === void 0 ? void 0 : data.user) === null || _b === void 0 ? void 0 : _b.impactConnection) === null || _c === void 0 ? void 0 : _c.publisher),
|
|
1102
1125
|
},
|
|
1103
1126
|
data: { type },
|
|
1104
1127
|
text: props.getTextProps(),
|
|
@@ -85,7 +85,7 @@ export function PartnerInfoModalContentView(props) {
|
|
|
85
85
|
id: "supportDescriptionExistingPartner",
|
|
86
86
|
defaultMessage: text.supportDescriptionExistingPartner,
|
|
87
87
|
}, {
|
|
88
|
-
supportLink: (h("a", { target: "_blank", href: `mailto:advocate-support@impact.com` }, text.supportLink)),
|
|
88
|
+
supportLink: (h("a", { target: "_blank", href: `mailto:advocate-payment-support@impact.com` }, text.supportLink)),
|
|
89
89
|
});
|
|
90
90
|
const description = states.isExistingPartner ? (h("span", { class: sheet.classes.DescriptionContainer },
|
|
91
91
|
h("p", null, text.descriptionExistingPartner),
|
|
@@ -204,7 +204,7 @@ export function WidgetEmailVerificationView(props) {
|
|
|
204
204
|
id: "sendCodeErrorDescription",
|
|
205
205
|
defaultMessage: text.sendCodeErrorDescription,
|
|
206
206
|
}, {
|
|
207
|
-
supportLink: (h("a", { target: "_blank", href: `mailto:advocate-support@impact.com` }, text.supportLink)),
|
|
207
|
+
supportLink: (h("a", { target: "_blank", href: `mailto:advocate-payment-support@impact.com` }, text.supportLink)),
|
|
208
208
|
}))),
|
|
209
209
|
states.initialLoading ? (renderLoadingSkeleton()) : (h("div", { class: sheet.classes.Wrapper },
|
|
210
210
|
h(TextSpanView, { type: "p" }, text.verifyEmailHeaderText),
|
|
@@ -1216,6 +1216,25 @@ export const TaxAndCashDashboardPayoutsOnHold = () => {
|
|
|
1216
1216
|
},
|
|
1217
1217
|
} }));
|
|
1218
1218
|
};
|
|
1219
|
+
export const TaxAndCashDashboardBalanceUnderThreshold = () => {
|
|
1220
|
+
return (h("sqm-tax-and-cash-dashboard", { demoData: {
|
|
1221
|
+
...dashboardProps,
|
|
1222
|
+
states: {
|
|
1223
|
+
payoutStatus: "BALANCE_UNDER_THRESHOLD",
|
|
1224
|
+
minPayoutAmount: "USD50.00",
|
|
1225
|
+
veriffLoading: false,
|
|
1226
|
+
canEditPayoutInfo: true,
|
|
1227
|
+
status: "ACTIVE",
|
|
1228
|
+
documentType: "W8BEN",
|
|
1229
|
+
documentTypeString: taxTypeToName("W8BEN"),
|
|
1230
|
+
dateSubmitted: "Jan 18th, 2025",
|
|
1231
|
+
noFormNeeded: false,
|
|
1232
|
+
indirectTaxNumber: "123456",
|
|
1233
|
+
showNewFormDialog: false,
|
|
1234
|
+
hasHold: false,
|
|
1235
|
+
},
|
|
1236
|
+
} }));
|
|
1237
|
+
};
|
|
1219
1238
|
export const TaxAndCashDashboardNoTaxFormRequiredAndBeneficiaryNameInvalid = () => {
|
|
1220
1239
|
return (h("sqm-tax-and-cash-dashboard", { demoData: {
|
|
1221
1240
|
...dashboardProps,
|
package/dist/collection/components/tax-and-cash/sqm-banking-info-form/sqm-banking-info-form-view.js
CHANGED
|
@@ -212,7 +212,7 @@ export const BankingInfoFormView = (props) => {
|
|
|
212
212
|
id: "generalDescription",
|
|
213
213
|
defaultMessage: text.error.generalDescription,
|
|
214
214
|
}, {
|
|
215
|
-
supportLink: (h("a", { target: "_blank", href: `mailto:advocate-support@impact.com` }, text.supportLink)),
|
|
215
|
+
supportLink: (h("a", { target: "_blank", href: `mailto:advocate-payment-support@impact.com` }, text.supportLink)),
|
|
216
216
|
}))),
|
|
217
217
|
states.isPartner && !states.hideSteps && (h("sqm-form-message", { type: "info" },
|
|
218
218
|
h("p", { part: "alert-title" }, text.isPartnerAlertHeader),
|
|
@@ -220,7 +220,7 @@ export const BankingInfoFormView = (props) => {
|
|
|
220
220
|
id: "isPartnerAlertDescription",
|
|
221
221
|
defaultMessage: text.isPartnerAlertDescription,
|
|
222
222
|
}, {
|
|
223
|
-
supportLink: (h("a", { target: "_blank", href: `mailto:advocate-support@impact.com` }, text.supportLink)),
|
|
223
|
+
supportLink: (h("a", { target: "_blank", href: `mailto:advocate-payment-support@impact.com` }, text.supportLink)),
|
|
224
224
|
}))),
|
|
225
225
|
h("div", null,
|
|
226
226
|
h("h4", null, text.paymentMethod),
|
|
@@ -149,7 +149,7 @@ export const DocusignFormView = (props) => {
|
|
|
149
149
|
id: "loadingErrorAlertDescription",
|
|
150
150
|
defaultMessage: text.error.loadingErrorAlertDescription,
|
|
151
151
|
}, {
|
|
152
|
-
supportLink: (h("a", { target: "_blank", href: `mailto:advocate-support@impact.com` }, text.supportLink)),
|
|
152
|
+
supportLink: (h("a", { target: "_blank", href: `mailto:advocate-payment-support@impact.com` }, text.supportLink)),
|
|
153
153
|
})))),
|
|
154
154
|
((_a = formState.errors) === null || _a === void 0 ? void 0 : _a.general) && (h("sqm-form-message", { type: "error" },
|
|
155
155
|
h("p", { part: "alert-title" }, text.error.generalTitle),
|
|
@@ -157,7 +157,7 @@ export const DocusignFormView = (props) => {
|
|
|
157
157
|
id: "generalDescription",
|
|
158
158
|
defaultMessage: text.error.generalDescription,
|
|
159
159
|
}, {
|
|
160
|
-
supportLink: (h("a", { target: "_blank", href: `mailto:advocate-support@impact.com` }, text.supportLink)),
|
|
160
|
+
supportLink: (h("a", { target: "_blank", href: `mailto:advocate-payment-support@impact.com` }, text.supportLink)),
|
|
161
161
|
}))),
|
|
162
162
|
h("div", null,
|
|
163
163
|
h("div", null,
|
package/dist/collection/components/tax-and-cash/sqm-indirect-tax-form/sqm-indirect-tax-form-view.js
CHANGED
|
@@ -147,7 +147,7 @@ export const IndirectTaxFormView = (props) => {
|
|
|
147
147
|
id: "loadingErrorAlertDescription",
|
|
148
148
|
defaultMessage: text.error.loadingErrorAlertDescription,
|
|
149
149
|
}, {
|
|
150
|
-
supportLink: (h("a", { target: "_blank", href: `mailto:advocate-support@impact.com` }, text.supportLink)),
|
|
150
|
+
supportLink: (h("a", { target: "_blank", href: `mailto:advocate-payment-support@impact.com` }, text.supportLink)),
|
|
151
151
|
})))),
|
|
152
152
|
((_a = formState.errors) === null || _a === void 0 ? void 0 : _a.general) && (h("sqm-form-message", { type: "error" },
|
|
153
153
|
h("p", { part: "alert-title" }, text.error.generalTitle),
|
|
@@ -155,7 +155,7 @@ export const IndirectTaxFormView = (props) => {
|
|
|
155
155
|
id: "generalDescription",
|
|
156
156
|
defaultMessage: text.error.generalDescription,
|
|
157
157
|
}, {
|
|
158
|
-
supportLink: (h("a", { target: "_blank", href: `mailto:advocate-support@impact.com` }, text.supportLink)),
|
|
158
|
+
supportLink: (h("a", { target: "_blank", href: `mailto:advocate-payment-support@impact.com` }, text.supportLink)),
|
|
159
159
|
}))),
|
|
160
160
|
states.isPartnerLegacy && (h("sqm-form-message", { loading: states.loading, type: "info" },
|
|
161
161
|
h("p", { part: "alert-title" }, text.isPartnerAlertHeader),
|
|
@@ -163,7 +163,7 @@ export const IndirectTaxFormView = (props) => {
|
|
|
163
163
|
id: "isPartnerAlertDescription",
|
|
164
164
|
defaultMessage: text.isPartnerAlertDescription,
|
|
165
165
|
}, {
|
|
166
|
-
supportLink: (h("a", { target: "_blank", href: `mailto:advocate-support@impact.com` }, text.supportLink)),
|
|
166
|
+
supportLink: (h("a", { target: "_blank", href: `mailto:advocate-payment-support@impact.com` }, text.supportLink)),
|
|
167
167
|
}))),
|
|
168
168
|
h("div", null,
|
|
169
169
|
h("h4", null, text.indirectTaxDetails))),
|
|
@@ -183,7 +183,7 @@ export const IndirectTaxFormView = (props) => {
|
|
|
183
183
|
id: "cannotChangeInfoAlert",
|
|
184
184
|
defaultMessage: text.cannotChangeInfoAlert,
|
|
185
185
|
}, {
|
|
186
|
-
supportLink: (h("a", { target: "_blank", href: `mailto:advocate-support@impact.com` }, text.supportLink)),
|
|
186
|
+
supportLink: (h("a", { target: "_blank", href: `mailto:advocate-payment-support@impact.com` }, text.supportLink)),
|
|
187
187
|
})),
|
|
188
188
|
h("div", { class: classes.BtnContainer },
|
|
189
189
|
h("sl-button", { class: classes.PrimaryButton, type: "primary", disabled: states.disabled, submit: true, exportparts: "base: primarybutton-base" }, text.continueButton),
|
package/dist/collection/components/tax-and-cash/sqm-payout-details-card/PayoutDetailsCard.stories.js
CHANGED
|
@@ -31,6 +31,31 @@ export const ThresholdPayout = () => {
|
|
|
31
31
|
},
|
|
32
32
|
} }));
|
|
33
33
|
};
|
|
34
|
+
export const BelowPayoutThresholdFixedDay = () => {
|
|
35
|
+
return (h("sqm-payout-details-card", { demoData: {
|
|
36
|
+
states: {
|
|
37
|
+
badgeStatus: "nextPayout",
|
|
38
|
+
belowPayoutThreshold: true,
|
|
39
|
+
},
|
|
40
|
+
} }));
|
|
41
|
+
};
|
|
42
|
+
export const BelowPayoutThresholdPayoutToday = () => {
|
|
43
|
+
return (h("sqm-payout-details-card", { demoData: {
|
|
44
|
+
states: {
|
|
45
|
+
badgeStatus: "payoutToday",
|
|
46
|
+
belowPayoutThreshold: true,
|
|
47
|
+
},
|
|
48
|
+
} }));
|
|
49
|
+
};
|
|
50
|
+
export const BelowPayoutThresholdBalanceThreshold = () => {
|
|
51
|
+
return (h("sqm-payout-details-card", { demoData: {
|
|
52
|
+
states: {
|
|
53
|
+
thresholdBalance: "50 USD",
|
|
54
|
+
badgeStatus: "thresholdPayout",
|
|
55
|
+
belowPayoutThreshold: true,
|
|
56
|
+
},
|
|
57
|
+
} }));
|
|
58
|
+
};
|
|
34
59
|
export const PaypalPayout = () => {
|
|
35
60
|
return (h("sqm-payout-details-card", { demoData: {
|
|
36
61
|
states: {
|
|
@@ -172,18 +172,22 @@ export function PayoutDetailsCardView(props) {
|
|
|
172
172
|
}, {
|
|
173
173
|
thresholdBalance: states.thresholdBalance,
|
|
174
174
|
});
|
|
175
|
+
// No payout is scheduled while the balance sits under the minimum
|
|
176
|
+
const scheduleText = states.badgeStatus === "thresholdPayout"
|
|
177
|
+
? states.thresholdBalance
|
|
178
|
+
? thresholdText
|
|
179
|
+
: ""
|
|
180
|
+
: states.belowPayoutThreshold
|
|
181
|
+
? ""
|
|
182
|
+
: states.nextPayoutDate;
|
|
183
|
+
const showBadge = states.badgeStatus !== "thresholdPayout" && !states.belowPayoutThreshold;
|
|
175
184
|
return (h("div", { class: classes.Container },
|
|
176
185
|
h("style", { type: "text/css" }, styleString),
|
|
177
186
|
states.loading ? (renderLoadingSkeleton()) : (h("div", { class: classes.CardContainer },
|
|
178
187
|
h("div", { class: classes.StatusContainer },
|
|
179
|
-
h("p", { class: classes.SubduedRegularText },
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
: ""
|
|
183
|
-
: states.nextPayoutDate),
|
|
184
|
-
states.badgeStatus === "thresholdPayout"
|
|
185
|
-
? null
|
|
186
|
-
: renderStatusBadge(states.badgeStatus, text.statusBadgeText)),
|
|
188
|
+
h("p", { class: classes.SubduedRegularText }, scheduleText),
|
|
189
|
+
showBadge &&
|
|
190
|
+
renderStatusBadge(states.badgeStatus, text.statusBadgeText)),
|
|
187
191
|
h("h1", { class: classes.MainCurrency }, states.balance),
|
|
188
192
|
states.payoutType === "PAYPAL" ? (h("div", { class: classes.PaypalDetailsContainer },
|
|
189
193
|
h("span", { class: classes.PaypalEmail }, states.paypalEmailAddress),
|
package/dist/collection/components/tax-and-cash/sqm-payout-details-card/sqm-payout-details-card.js
CHANGED
|
@@ -190,6 +190,7 @@ function useDemoPayoutDetailsCard(props) {
|
|
|
190
190
|
loading: false,
|
|
191
191
|
error: false,
|
|
192
192
|
thresholdBalance: "$50",
|
|
193
|
+
belowPayoutThreshold: false,
|
|
193
194
|
mainCurrency: { currencyText: "USD", amountText: "100.00" },
|
|
194
195
|
badgeStatus: "nextPayout",
|
|
195
196
|
payoutType: "BANK_TRANSFER",
|
package/dist/collection/components/tax-and-cash/sqm-payout-details-card/usePayoutDetailsCard.js
CHANGED
|
@@ -2,8 +2,9 @@ import { useParentQueryValue } from "@saasquatch/component-boilerplate";
|
|
|
2
2
|
import { DateTime } from "luxon";
|
|
3
3
|
import { intl } from "../../../global/global";
|
|
4
4
|
import { USER_QUERY_NAMESPACE } from "../data";
|
|
5
|
+
import { formatPayoutThreshold, isBalanceUnderPayoutThreshold, } from "../utils";
|
|
5
6
|
export function usePayoutDetailsCard(props) {
|
|
6
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j
|
|
7
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
7
8
|
const { data, loading } = useParentQueryValue(USER_QUERY_NAMESPACE);
|
|
8
9
|
const publisher = (_b = (_a = data === null || data === void 0 ? void 0 : data.user) === null || _a === void 0 ? void 0 : _a.impactConnection) === null || _b === void 0 ? void 0 : _b.publisher;
|
|
9
10
|
function getPayoutDetailedStatusText(paymentDay) {
|
|
@@ -42,18 +43,18 @@ export function usePayoutDetailsCard(props) {
|
|
|
42
43
|
return {
|
|
43
44
|
states: {
|
|
44
45
|
loading,
|
|
45
|
-
thresholdBalance: (
|
|
46
|
-
|
|
47
|
-
balance: (
|
|
48
|
-
badgeStatus: ((
|
|
46
|
+
thresholdBalance: formatPayoutThreshold(publisher),
|
|
47
|
+
belowPayoutThreshold: isBalanceUnderPayoutThreshold(publisher),
|
|
48
|
+
balance: (_d = publisher === null || publisher === void 0 ? void 0 : publisher.payoutsAccount) === null || _d === void 0 ? void 0 : _d.balance,
|
|
49
|
+
badgeStatus: ((_e = publisher === null || publisher === void 0 ? void 0 : publisher.withdrawalSettings) === null || _e === void 0 ? void 0 : _e.paymentSchedulingType) !== "FIXED_DAY"
|
|
49
50
|
? "thresholdPayout"
|
|
50
51
|
: isPayoutToday
|
|
51
52
|
? "payoutToday"
|
|
52
53
|
: "nextPayout",
|
|
53
|
-
payoutType: (
|
|
54
|
-
error: (
|
|
55
|
-
paypalEmailAddress: (
|
|
56
|
-
cardNumberPreview: (
|
|
54
|
+
payoutType: (_f = publisher === null || publisher === void 0 ? void 0 : publisher.withdrawalSettings) === null || _f === void 0 ? void 0 : _f.paymentMethod,
|
|
55
|
+
error: (_g = publisher === null || publisher === void 0 ? void 0 : publisher.payoutsAccount) === null || _g === void 0 ? void 0 : _g.hold,
|
|
56
|
+
paypalEmailAddress: (_h = publisher === null || publisher === void 0 ? void 0 : publisher.withdrawalSettings) === null || _h === void 0 ? void 0 : _h.paypalEmailAddress,
|
|
57
|
+
cardNumberPreview: (_j = publisher === null || publisher === void 0 ? void 0 : publisher.withdrawalSettings) === null || _j === void 0 ? void 0 : _j.bankAccountNumber,
|
|
57
58
|
nextPayoutDate: paymentDay,
|
|
58
59
|
},
|
|
59
60
|
text: props.getTextProps(),
|
package/dist/collection/components/tax-and-cash/sqm-payout-status-alert/PayoutStatusAlert.stories.js
CHANGED
|
@@ -30,6 +30,13 @@ export const Loading = () => (h("sqm-payout-status-alert", { demoData: { states:
|
|
|
30
30
|
export const Error = () => (h("sqm-payout-status-alert", { demoData: { states: { ...defaultProps, error: true } } }));
|
|
31
31
|
export const NewPayeeReview = () => (h("sqm-payout-status-alert", { demoData: { states: { ...defaultProps, status: "NEW_PAYEE_REVIEW" } } }));
|
|
32
32
|
export const PaymentHoldOnChange = () => (h("sqm-payout-status-alert", { demoData: { states: { ...defaultProps, status: "PAYMENT_HOLD_ON_CHANGE" } } }));
|
|
33
|
+
export const BalanceUnderThreshold = () => (h("sqm-payout-status-alert", { demoData: {
|
|
34
|
+
states: {
|
|
35
|
+
...defaultProps,
|
|
36
|
+
status: "BALANCE_UNDER_THRESHOLD",
|
|
37
|
+
minPayoutAmount: "USD50.00",
|
|
38
|
+
},
|
|
39
|
+
} }));
|
|
33
40
|
export const BeneficiaryNameInvalid = () => (h("sqm-payout-status-alert", { demoData: {
|
|
34
41
|
states: { ...defaultProps, status: "BENEFICIARY_NAME_INVALID" },
|
|
35
42
|
} }));
|