@saasquatch/mint-components 2.4.4 → 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.
Files changed (97) hide show
  1. package/dist/cjs/{data-89ac73dd.js → data-04ef5511.js} +2 -0
  2. package/dist/cjs/loader.cjs.js +1 -1
  3. package/dist/cjs/mint-components.cjs.js +1 -1
  4. package/dist/cjs/sqm-banking-info-form_10.cjs.entry.js +35 -21
  5. package/dist/cjs/sqm-big-stat_47.cjs.entry.js +33 -3
  6. package/dist/cjs/sqm-email-verification_2.cjs.entry.js +1 -1
  7. package/dist/cjs/sqm-stencilbook.cjs.entry.js +74 -7
  8. package/dist/cjs/{sqm-user-info-form-view-ec41191c.js → sqm-user-info-form-view-9745956d.js} +29 -26
  9. package/dist/cjs/{subregions-3d27e279.js → subregions-d12829d6.js} +28 -0
  10. package/dist/cjs/{useIndirectTaxForm-5211013b.js → useIndirectTaxForm-0969e194.js} +26 -3
  11. package/dist/collection/components/tax-and-cash/TaxForm.stories.js +19 -0
  12. package/dist/collection/components/tax-and-cash/data.js +2 -0
  13. package/dist/collection/components/tax-and-cash/sqm-payout-details-card/PayoutDetailsCard.stories.js +25 -0
  14. package/dist/collection/components/tax-and-cash/sqm-payout-details-card/sqm-payout-details-card-view.js +12 -8
  15. package/dist/collection/components/tax-and-cash/sqm-payout-details-card/sqm-payout-details-card.js +1 -0
  16. package/dist/collection/components/tax-and-cash/sqm-payout-details-card/usePayoutDetailsCard.js +10 -9
  17. package/dist/collection/components/tax-and-cash/sqm-payout-status-alert/PayoutStatusAlert.stories.js +7 -0
  18. package/dist/collection/components/tax-and-cash/sqm-payout-status-alert/sqm-payout-status-alert-view.js +11 -0
  19. package/dist/collection/components/tax-and-cash/sqm-payout-status-alert/sqm-payout-status-alert.js +51 -1
  20. package/dist/collection/components/tax-and-cash/sqm-payout-status-alert/usePayoutStatus.js +25 -1
  21. package/dist/collection/components/tax-and-cash/sqm-tax-and-cash/sqm-tax-and-cash.js +63 -1
  22. package/dist/collection/components/tax-and-cash/sqm-tax-and-cash-dashboard/TaxAndCashDashboardView.stories.js +11 -3
  23. package/dist/collection/components/tax-and-cash/sqm-tax-and-cash-dashboard/sqm-tax-and-cash-dashboard-view.js +27 -24
  24. package/dist/collection/components/tax-and-cash/sqm-tax-and-cash-dashboard/sqm-tax-and-cash-dashboard.js +51 -1
  25. package/dist/collection/components/tax-and-cash/sqm-tax-and-cash-dashboard/useTaxAndCashDashboard.js +2 -1
  26. package/dist/collection/components/tax-and-cash/sqm-user-info-form/UserInfoFormView.stories.js +3 -1
  27. package/dist/collection/components/tax-and-cash/utils.js +26 -0
  28. package/dist/esm/{data-8698cbc6.js → data-0be04430.js} +2 -0
  29. package/dist/esm/loader.js +1 -1
  30. package/dist/esm/mint-components.js +1 -1
  31. package/dist/esm/sqm-banking-info-form_10.entry.js +35 -21
  32. package/dist/esm/sqm-big-stat_47.entry.js +33 -3
  33. package/dist/esm/sqm-email-verification_2.entry.js +1 -1
  34. package/dist/esm/sqm-stencilbook.entry.js +74 -7
  35. package/dist/esm/{sqm-user-info-form-view-b43a1729.js → sqm-user-info-form-view-81526655.js} +29 -26
  36. package/dist/esm/{subregions-810a5c2d.js → subregions-98789b46.js} +27 -1
  37. package/dist/esm/{useIndirectTaxForm-4dc576f0.js → useIndirectTaxForm-bbe8779d.js} +26 -3
  38. package/dist/esm-es5/data-0be04430.js +1 -0
  39. package/dist/esm-es5/loader.js +1 -1
  40. package/dist/esm-es5/mint-components.js +1 -1
  41. package/dist/esm-es5/sqm-banking-info-form_10.entry.js +1 -1
  42. package/dist/esm-es5/sqm-big-stat_47.entry.js +1 -1
  43. package/dist/esm-es5/sqm-email-verification_2.entry.js +1 -1
  44. package/dist/esm-es5/sqm-stencilbook.entry.js +1 -1
  45. package/dist/esm-es5/sqm-user-info-form-view-81526655.js +1 -0
  46. package/dist/esm-es5/subregions-98789b46.js +1 -0
  47. package/dist/esm-es5/useIndirectTaxForm-bbe8779d.js +6 -0
  48. package/dist/mint-components/mint-components.esm.js +1 -1
  49. package/dist/mint-components/p-07b989a3.system.js +6 -0
  50. package/dist/mint-components/{p-484817ed.entry.js → p-0d89ef44.entry.js} +3 -3
  51. package/dist/mint-components/p-14f4cce8.js +1 -0
  52. package/dist/mint-components/{p-26126144.entry.js → p-1e9c339f.entry.js} +2 -2
  53. package/dist/mint-components/p-227ca8d4.system.js +1 -0
  54. package/dist/mint-components/p-231926a3.system.entry.js +1 -0
  55. package/dist/mint-components/{p-e8aaf90f.system.entry.js → p-288249ae.system.entry.js} +1 -1
  56. package/dist/mint-components/p-53575d04.js +1 -0
  57. package/dist/mint-components/p-549d60ee.system.entry.js +1 -0
  58. package/dist/mint-components/{p-83099738.entry.js → p-654cdee8.entry.js} +1 -1
  59. package/dist/mint-components/{p-5c52100b.js → p-7aa89fa8.js} +2 -0
  60. package/dist/mint-components/p-826e3db0.system.js +1 -0
  61. package/dist/mint-components/p-a1b655ba.system.js +1 -0
  62. package/dist/mint-components/p-b1feb0f1.js +108 -0
  63. package/dist/mint-components/p-bfb00685.system.js +1 -1
  64. package/dist/mint-components/{p-0a0d8788.system.entry.js → p-cf12347b.system.entry.js} +1 -1
  65. package/dist/mint-components/p-e1b917ff.entry.js +83 -0
  66. package/dist/types/components/tax-and-cash/TaxForm.stories.d.ts +1 -0
  67. package/dist/types/components/tax-and-cash/data.d.ts +2 -0
  68. package/dist/types/components/tax-and-cash/sqm-payout-details-card/PayoutDetailsCard.stories.d.ts +3 -0
  69. package/dist/types/components/tax-and-cash/sqm-payout-details-card/sqm-payout-details-card-view.d.ts +1 -0
  70. package/dist/types/components/tax-and-cash/sqm-payout-status-alert/PayoutStatusAlert.stories.d.ts +1 -0
  71. package/dist/types/components/tax-and-cash/sqm-payout-status-alert/sqm-payout-status-alert-view.d.ts +3 -0
  72. package/dist/types/components/tax-and-cash/sqm-payout-status-alert/sqm-payout-status-alert.d.ts +8 -0
  73. package/dist/types/components/tax-and-cash/sqm-payout-status-alert/usePayoutStatus.d.ts +2 -1
  74. package/dist/types/components/tax-and-cash/sqm-tax-and-cash/sqm-tax-and-cash.d.ts +11 -0
  75. package/dist/types/components/tax-and-cash/sqm-tax-and-cash-dashboard/TaxAndCashDashboardView.stories.d.ts +1 -0
  76. package/dist/types/components/tax-and-cash/sqm-tax-and-cash-dashboard/sqm-tax-and-cash-dashboard-view.d.ts +3 -0
  77. package/dist/types/components/tax-and-cash/sqm-tax-and-cash-dashboard/sqm-tax-and-cash-dashboard.d.ts +8 -0
  78. package/dist/types/components/tax-and-cash/utils.d.ts +5 -1
  79. package/dist/types/components.d.ts +54 -0
  80. package/docs/docs.docx +0 -0
  81. package/docs/raisins.json +1 -1
  82. package/grapesjs/grapesjs.js +1 -1
  83. package/package.json +1 -1
  84. package/dist/esm-es5/data-8698cbc6.js +0 -1
  85. package/dist/esm-es5/sqm-user-info-form-view-b43a1729.js +0 -1
  86. package/dist/esm-es5/subregions-810a5c2d.js +0 -1
  87. package/dist/esm-es5/useIndirectTaxForm-4dc576f0.js +0 -6
  88. package/dist/mint-components/p-0ad64881.js +0 -101
  89. package/dist/mint-components/p-13379201.system.entry.js +0 -1
  90. package/dist/mint-components/p-3090d391.system.js +0 -1
  91. package/dist/mint-components/p-4fd803e7.entry.js +0 -83
  92. package/dist/mint-components/p-6cd93ea3.system.js +0 -6
  93. package/dist/mint-components/p-92f520c9.js +0 -1
  94. package/dist/mint-components/p-9c1f5317.system.js +0 -1
  95. package/dist/mint-components/p-ae19027d.js +0 -1
  96. package/dist/mint-components/p-ef695105.system.entry.js +0 -1
  97. package/dist/mint-components/p-fd231c49.system.js +0 -1
@@ -15,7 +15,7 @@ require('./mixins-4761d472.js');
15
15
  const copyTextView = require('./copy-text-view-bb2c0ea7.js');
16
16
  require('./sqm-text-span-view-b9e10f5d.js');
17
17
  const AsYouType = require('./AsYouType-d15caac8.js');
18
- const subregions = require('./subregions-3d27e279.js');
18
+ const subregions = require('./subregions-d12829d6.js');
19
19
  const useRegistrationFormState = require('./useRegistrationFormState-4fe5b770.js');
20
20
  const sqmPortalRegistrationFormView = require('./sqm-portal-registration-form-view-a45f7a52.js');
21
21
  const usePortalRegistrationForm = require('./usePortalRegistrationForm-8a3a14ac.js');
@@ -31,10 +31,10 @@ const utilities = require('./utilities-fcdb9504.js');
31
31
  const ErrorView = require('./ErrorView-ee7b0f36.js');
32
32
  const ShadowViewAddon = require('./ShadowViewAddon-331ac9e4.js');
33
33
  require('./sqm-portal-container-view-757f921b.js');
34
- const data = require('./data-89ac73dd.js');
34
+ const data = require('./data-04ef5511.js');
35
35
  const keys = require('./keys-5a2c9ed2.js');
36
36
  require('./eventKeys-7af4df4d.js');
37
- const useIndirectTaxForm = require('./useIndirectTaxForm-5211013b.js');
37
+ const useIndirectTaxForm = require('./useIndirectTaxForm-0969e194.js');
38
38
  const parseStates = require('./parseStates-d1effc19.js');
39
39
 
40
40
  /**
@@ -3082,6 +3082,17 @@ function PayoutStatusAlertView(props) {
3082
3082
  alertType: "warning",
3083
3083
  icon: "exclamation-triangle",
3084
3084
  };
3085
+ case "BALANCE_UNDER_THRESHOLD":
3086
+ return {
3087
+ header: text.balanceUnderThresholdHeader,
3088
+ description: global.intl.formatMessage({
3089
+ id: "balanceUnderThresholdDescription",
3090
+ defaultMessage: text.balanceUnderThresholdDescription,
3091
+ }, { minPayoutAmount: states.minPayoutAmount }),
3092
+ buttonText: null,
3093
+ alertType: "info",
3094
+ icon: "info-circle",
3095
+ };
3085
3096
  case "PAYMENT_HOLD_ON_CHANGE":
3086
3097
  return {
3087
3098
  header: text.paymentHoldOnChangeHeader,
@@ -3289,6 +3300,14 @@ const PayoutStatusAlert = class {
3289
3300
  * @uiName Account review alert description
3290
3301
  */
3291
3302
  this.accountReviewDescription = "This process takes 48 hours, payouts are on hold until it's completed. You will receive an email from our referral provider, Impact.com, if any issues arise. It contains details on how to resolve this issue. If you need further assistance, please reach out to our {supportLink}.";
3303
+ /**
3304
+ * @uiName Balance under payout minimum alert header
3305
+ */
3306
+ this.balanceUnderThresholdHeader = "Your balance is under the minimum payout";
3307
+ /**
3308
+ * @uiName Balance under payout minimum alert description
3309
+ */
3310
+ this.balanceUnderThresholdDescription = "Your total balance is under {minPayoutAmount}, the minimum required for payout.";
3292
3311
  /**
3293
3312
  * @uiName Payment on hold alert header
3294
3313
  */
@@ -7816,6 +7835,17 @@ const TaxAndCashMonolith = class {
7816
7835
  * @uiName Account review alert description
7817
7836
  */
7818
7837
  this.dashboard_accountReviewDescription = "This process takes 48 hours, payouts are on hold until it's completed. You will receive an email from our referral provider, Impact.com, if any issues arise. It contains details on how to resolve this issue. If you need further assistance, please reach out to our {supportLink}.";
7838
+ /**
7839
+ * @uiName Balance under payout minimum alert header
7840
+ * @uiGroup Dashboard Properties
7841
+ */
7842
+ this.dashboard_balanceUnderThresholdHeader = "Your balance is under the minimum payout";
7843
+ /**
7844
+ * @uiName Balance under payout minimum alert description
7845
+ * @uiGroup Dashboard Properties
7846
+ * @uiWidget textArea
7847
+ */
7848
+ this.dashboard_balanceUnderThresholdDescription = "Your total balance is under {minPayoutAmount}, the minimum required for payout.";
7819
7849
  /**
7820
7850
  * @uiName Payment on hold alert header
7821
7851
  */
@@ -10,7 +10,7 @@ const cjs = require('./cjs-1066ec21.js');
10
10
  const utils = require('./utils-6847bc06.js');
11
11
  const JSS = require('./JSS-8503a151.js');
12
12
  const sqmTextSpanView = require('./sqm-text-span-view-b9e10f5d.js');
13
- const data = require('./data-89ac73dd.js');
13
+ const data = require('./data-04ef5511.js');
14
14
  const sqmPartnerInfoModalView = require('./sqm-partner-info-modal-view-d9b61d54.js');
15
15
  const keys = require('./keys-5a2c9ed2.js');
16
16
  const eventKeys = require('./eventKeys-7af4df4d.js');
@@ -15,7 +15,7 @@ const copyTextView = require('./copy-text-view-bb2c0ea7.js');
15
15
  require('./sqm-text-span-view-b9e10f5d.js');
16
16
  const sqmPortalVerifyEmailView = require('./sqm-portal-verify-email-view-717d0633.js');
17
17
  require('./AsYouType-d15caac8.js');
18
- const subregions = require('./subregions-3d27e279.js');
18
+ const subregions = require('./subregions-d12829d6.js');
19
19
  const sqmPortalRegistrationFormView = require('./sqm-portal-registration-form-view-a45f7a52.js');
20
20
  const GenericTableView = require('./GenericTableView-4c48c630.js');
21
21
  require('./useChildElements-041127d7.js');
@@ -37,9 +37,9 @@ require('./ErrorView-ee7b0f36.js');
37
37
  const sqmQrCodeView = require('./sqm-qr-code-view-1f2daa76.js');
38
38
  const ShadowViewAddon = require('./ShadowViewAddon-331ac9e4.js');
39
39
  const sqmPortalContainerView = require('./sqm-portal-container-view-757f921b.js');
40
- const sqmUserInfoFormView = require('./sqm-user-info-form-view-ec41191c.js');
40
+ const sqmUserInfoFormView = require('./sqm-user-info-form-view-9745956d.js');
41
41
  const sqmLeadInputFieldView = require('./sqm-lead-input-field-view-88de1b78.js');
42
- require('./data-89ac73dd.js');
42
+ require('./data-04ef5511.js');
43
43
  const sqmPartnerInfoModalView = require('./sqm-partner-info-modal-view-d9b61d54.js');
44
44
 
45
45
  /**
@@ -16586,6 +16586,8 @@ const defaultText = {
16586
16586
  w9RequiredButtonText: "Submit W-9",
16587
16587
  accountReviewHeader: "Your account is under review",
16588
16588
  accountReviewDescription: "This process takes 48 hours, payouts are on hold until it's completed. You will receive an email from our referral provider, Impact.com, if any issues arise. It contains details on how to resolve this issue. If you need further assistance, please reach out to our {supportLink}.",
16589
+ balanceUnderThresholdHeader: "Your balance is under the minimum payout",
16590
+ balanceUnderThresholdDescription: "Your total balance is under {minPayoutAmount}, the minimum required for payout.",
16589
16591
  paymentHoldOnChangeHeader: "We are reviewing your new payout settings",
16590
16592
  paymentHoldOnChangeDescription: "Your payout is temporarily on hold while we review your new payment information, this process is usually resolved within 48 hours.",
16591
16593
  beneficiaryNameInvalidHeader: "Your payment information does not match your tax form",
@@ -16613,9 +16615,10 @@ const defaultCallbacks$1 = {
16613
16615
  onNewFormCancel: () => { },
16614
16616
  onNewFormClick: () => { },
16615
16617
  };
16616
- const defaultSlots = {
16617
- payoutDetailsCardSlot: (index.h("sqm-payout-details-card", { demoData: { states: { badgeStatus: "nextPayout" } } })),
16618
- };
16618
+ const buildSlots = (cardStates = {}) => ({
16619
+ payoutDetailsCardSlot: (index.h("sqm-payout-details-card", { demoData: { states: { badgeStatus: "nextPayout", ...cardStates } } })),
16620
+ });
16621
+ const defaultSlots = buildSlots();
16619
16622
  const baseStates = {
16620
16623
  payoutStatus: "DONE",
16621
16624
  veriffLoading: false,
@@ -16647,6 +16650,11 @@ const TaxFormRequired = () => (index.h(sqmUserInfoFormView.TaxAndCashDashboardVi
16647
16650
  // ─── Payout hold statuses not in TaxForm.stories.tsx ─────────────────────────
16648
16651
  const AccountUnderReview = () => (index.h(sqmUserInfoFormView.TaxAndCashDashboardView, { states: { ...baseStates, payoutStatus: "NEW_PAYEE_REVIEW" }, text: defaultText, callbacks: defaultCallbacks$1, slots: defaultSlots }));
16649
16652
  const PaymentHoldOnChange = () => (index.h(sqmUserInfoFormView.TaxAndCashDashboardView, { states: { ...baseStates, payoutStatus: "PAYMENT_HOLD_ON_CHANGE" }, text: defaultText, callbacks: defaultCallbacks$1, slots: defaultSlots }));
16653
+ const BalanceUnderThreshold = () => (index.h(sqmUserInfoFormView.TaxAndCashDashboardView, { states: {
16654
+ ...baseStates,
16655
+ payoutStatus: "BALANCE_UNDER_THRESHOLD",
16656
+ minPayoutAmount: "USD50.00",
16657
+ }, text: defaultText, callbacks: defaultCallbacks$1, slots: buildSlots({ belowPayoutThreshold: true }) }));
16650
16658
  const BeneficiaryNameInvalid = () => (index.h(sqmUserInfoFormView.TaxAndCashDashboardView, { states: { ...baseStates, payoutStatus: "BENEFICIARY_NAME_INVALID" }, text: defaultText, callbacks: defaultCallbacks$1, slots: defaultSlots }));
16651
16659
  const BeneficiaryNameMismatch = () => (index.h(sqmUserInfoFormView.TaxAndCashDashboardView, { states: { ...baseStates, payoutStatus: "BENEFICIARY_NAME_MISMATCH" }, text: defaultText, callbacks: defaultCallbacks$1, slots: defaultSlots }));
16652
16660
  const BankTaxNameMismatch = () => (index.h(sqmUserInfoFormView.TaxAndCashDashboardView, { states: { ...baseStates, payoutStatus: "BANK_TAX_NAME_MISMATCH" }, text: defaultText, callbacks: defaultCallbacks$1, slots: defaultSlots }));
@@ -16678,6 +16686,7 @@ const TaxAndCashDashboardView = /*#__PURE__*/Object.freeze({
16678
16686
  TaxFormRequired: TaxFormRequired,
16679
16687
  AccountUnderReview: AccountUnderReview,
16680
16688
  PaymentHoldOnChange: PaymentHoldOnChange,
16689
+ BalanceUnderThreshold: BalanceUnderThreshold,
16681
16690
  BeneficiaryNameInvalid: BeneficiaryNameInvalid,
16682
16691
  BeneficiaryNameMismatch: BeneficiaryNameMismatch,
16683
16692
  BankTaxNameMismatch: BankTaxNameMismatch,
@@ -17905,6 +17914,25 @@ const TaxAndCashDashboardPayoutsOnHold = () => {
17905
17914
  },
17906
17915
  } }));
17907
17916
  };
17917
+ const TaxAndCashDashboardBalanceUnderThreshold = () => {
17918
+ return (index.h("sqm-tax-and-cash-dashboard", { demoData: {
17919
+ ...dashboardProps,
17920
+ states: {
17921
+ payoutStatus: "BALANCE_UNDER_THRESHOLD",
17922
+ minPayoutAmount: "USD50.00",
17923
+ veriffLoading: false,
17924
+ canEditPayoutInfo: true,
17925
+ status: "ACTIVE",
17926
+ documentType: "W8BEN",
17927
+ documentTypeString: subregions.taxTypeToName("W8BEN"),
17928
+ dateSubmitted: "Jan 18th, 2025",
17929
+ noFormNeeded: false,
17930
+ indirectTaxNumber: "123456",
17931
+ showNewFormDialog: false,
17932
+ hasHold: false,
17933
+ },
17934
+ } }));
17935
+ };
17908
17936
  const TaxAndCashDashboardNoTaxFormRequiredAndBeneficiaryNameInvalid = () => {
17909
17937
  return (index.h("sqm-tax-and-cash-dashboard", { demoData: {
17910
17938
  ...dashboardProps,
@@ -18206,6 +18234,7 @@ const TaxForm = /*#__PURE__*/Object.freeze({
18206
18234
  TaxAndCashDashboardW9ThresholdReached: TaxAndCashDashboardW9ThresholdReached,
18207
18235
  TaxAndCashDashboardNewTaxForm: TaxAndCashDashboardNewTaxForm,
18208
18236
  TaxAndCashDashboardPayoutsOnHold: TaxAndCashDashboardPayoutsOnHold,
18237
+ TaxAndCashDashboardBalanceUnderThreshold: TaxAndCashDashboardBalanceUnderThreshold,
18209
18238
  TaxAndCashDashboardNoTaxFormRequiredAndBeneficiaryNameInvalid: TaxAndCashDashboardNoTaxFormRequiredAndBeneficiaryNameInvalid,
18210
18239
  TaxAndCashDashboardNoTaxFormRequiredAndBeneficiaryNameInvalidUS: TaxAndCashDashboardNoTaxFormRequiredAndBeneficiaryNameInvalidUS,
18211
18240
  TaxAndCashDashboardNoDocumentType: TaxAndCashDashboardNoDocumentType,
@@ -18252,6 +18281,31 @@ const ThresholdPayout = () => {
18252
18281
  },
18253
18282
  } }));
18254
18283
  };
18284
+ const BelowPayoutThresholdFixedDay = () => {
18285
+ return (index.h("sqm-payout-details-card", { demoData: {
18286
+ states: {
18287
+ badgeStatus: "nextPayout",
18288
+ belowPayoutThreshold: true,
18289
+ },
18290
+ } }));
18291
+ };
18292
+ const BelowPayoutThresholdPayoutToday = () => {
18293
+ return (index.h("sqm-payout-details-card", { demoData: {
18294
+ states: {
18295
+ badgeStatus: "payoutToday",
18296
+ belowPayoutThreshold: true,
18297
+ },
18298
+ } }));
18299
+ };
18300
+ const BelowPayoutThresholdBalanceThreshold = () => {
18301
+ return (index.h("sqm-payout-details-card", { demoData: {
18302
+ states: {
18303
+ thresholdBalance: "50 USD",
18304
+ badgeStatus: "thresholdPayout",
18305
+ belowPayoutThreshold: true,
18306
+ },
18307
+ } }));
18308
+ };
18255
18309
  const PaypalPayout = () => {
18256
18310
  return (index.h("sqm-payout-details-card", { demoData: {
18257
18311
  states: {
@@ -18273,6 +18327,9 @@ const PayoutDetailsCard = /*#__PURE__*/Object.freeze({
18273
18327
  NextPayout: NextPayout,
18274
18328
  PayoutToday: PayoutToday,
18275
18329
  ThresholdPayout: ThresholdPayout,
18330
+ BelowPayoutThresholdFixedDay: BelowPayoutThresholdFixedDay,
18331
+ BelowPayoutThresholdPayoutToday: BelowPayoutThresholdPayoutToday,
18332
+ BelowPayoutThresholdBalanceThreshold: BelowPayoutThresholdBalanceThreshold,
18276
18333
  PaypalPayout: PaypalPayout,
18277
18334
  BadgeTextICUParsing: BadgeTextICUParsing
18278
18335
  });
@@ -18308,6 +18365,13 @@ const Loading$e = () => (index.h("sqm-payout-status-alert", { demoData: { states
18308
18365
  const Error$b = () => (index.h("sqm-payout-status-alert", { demoData: { states: { ...defaultProps$s, error: true } } }));
18309
18366
  const NewPayeeReview = () => (index.h("sqm-payout-status-alert", { demoData: { states: { ...defaultProps$s, status: "NEW_PAYEE_REVIEW" } } }));
18310
18367
  const PaymentHoldOnChange$1 = () => (index.h("sqm-payout-status-alert", { demoData: { states: { ...defaultProps$s, status: "PAYMENT_HOLD_ON_CHANGE" } } }));
18368
+ const BalanceUnderThreshold$1 = () => (index.h("sqm-payout-status-alert", { demoData: {
18369
+ states: {
18370
+ ...defaultProps$s,
18371
+ status: "BALANCE_UNDER_THRESHOLD",
18372
+ minPayoutAmount: "USD50.00",
18373
+ },
18374
+ } }));
18311
18375
  const BeneficiaryNameInvalid$1 = () => (index.h("sqm-payout-status-alert", { demoData: {
18312
18376
  states: { ...defaultProps$s, status: "BENEFICIARY_NAME_INVALID" },
18313
18377
  } }));
@@ -18334,6 +18398,7 @@ const PayoutStatusAlert = /*#__PURE__*/Object.freeze({
18334
18398
  Error: Error$b,
18335
18399
  NewPayeeReview: NewPayeeReview,
18336
18400
  PaymentHoldOnChange: PaymentHoldOnChange$1,
18401
+ BalanceUnderThreshold: BalanceUnderThreshold$1,
18337
18402
  BeneficiaryNameInvalid: BeneficiaryNameInvalid$1,
18338
18403
  BeneficiaryNameMismatch: BeneficiaryNameMismatch$1,
18339
18404
  BankTaxNameMismatch: BankTaxNameMismatch$1,
@@ -18934,7 +18999,9 @@ const mockPartnerData = {
18934
18999
  payoutsAccount: {
18935
19000
  hold: false,
18936
19001
  holdReasons: [],
18937
- balance: "0",
19002
+ balance: "$0.00",
19003
+ balanceAmount: 0,
19004
+ currencyCode: "USD",
18938
19005
  },
18939
19006
  };
18940
19007
  const defaultText$1 = {
@@ -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-3d27e279.js');
8
- const data = require('./data-89ac73dd.js');
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
- marginLeft: "-20px",
80
- "&::part(base)": {
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)",
@@ -433,6 +424,18 @@ const TaxAndCashDashboardView = (props) => {
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,
@@ -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-3d27e279.js');
7
- const data = require('./data-89ac73dd.js');
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(),
@@ -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,
@@ -83,6 +83,8 @@ export const GET_USER = gql `
83
83
  hold
84
84
  holdReasons
85
85
  balance
86
+ balanceAmount
87
+ currencyCode
86
88
  }
87
89
  }
88
90
  }
@@ -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 }, states.badgeStatus === "thresholdPayout"
180
- ? states.thresholdBalance
181
- ? thresholdText
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),
@@ -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",
@@ -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, _k, _l;
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: ((_d = publisher === null || publisher === void 0 ? void 0 : publisher.withdrawalSettings) === null || _d === void 0 ? void 0 : _d.paymentThreshold) ? `${publisher === null || publisher === void 0 ? void 0 : publisher.currency}${(_e = publisher === null || publisher === void 0 ? void 0 : publisher.withdrawalSettings) === null || _e === void 0 ? void 0 : _e.paymentThreshold}`
46
- : undefined,
47
- balance: (_f = publisher === null || publisher === void 0 ? void 0 : publisher.payoutsAccount) === null || _f === void 0 ? void 0 : _f.balance,
48
- badgeStatus: ((_g = publisher === null || publisher === void 0 ? void 0 : publisher.withdrawalSettings) === null || _g === void 0 ? void 0 : _g.paymentSchedulingType) !== "FIXED_DAY"
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: (_h = publisher === null || publisher === void 0 ? void 0 : publisher.withdrawalSettings) === null || _h === void 0 ? void 0 : _h.paymentMethod,
54
- error: (_j = publisher === null || publisher === void 0 ? void 0 : publisher.payoutsAccount) === null || _j === void 0 ? void 0 : _j.hold,
55
- paypalEmailAddress: (_k = publisher === null || publisher === void 0 ? void 0 : publisher.withdrawalSettings) === null || _k === void 0 ? void 0 : _k.paypalEmailAddress,
56
- cardNumberPreview: (_l = publisher === null || publisher === void 0 ? void 0 : publisher.withdrawalSettings) === null || _l === void 0 ? void 0 : _l.bankAccountNumber,
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(),
@@ -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
  } }));
@@ -145,6 +145,17 @@ export function PayoutStatusAlertView(props) {
145
145
  alertType: "warning",
146
146
  icon: "exclamation-triangle",
147
147
  };
148
+ case "BALANCE_UNDER_THRESHOLD":
149
+ return {
150
+ header: text.balanceUnderThresholdHeader,
151
+ description: intl.formatMessage({
152
+ id: "balanceUnderThresholdDescription",
153
+ defaultMessage: text.balanceUnderThresholdDescription,
154
+ }, { minPayoutAmount: states.minPayoutAmount }),
155
+ buttonText: null,
156
+ alertType: "info",
157
+ icon: "info-circle",
158
+ };
148
159
  case "PAYMENT_HOLD_ON_CHANGE":
149
160
  return {
150
161
  header: text.paymentHoldOnChangeHeader,