@saasquatch/mint-components 2.4.7 → 2.4.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.
Files changed (63) hide show
  1. package/dist/cjs/sqm-banking-info-form_10.cjs.entry.js +4 -3
  2. package/dist/cjs/sqm-big-stat_47.cjs.entry.js +12 -16
  3. package/dist/cjs/sqm-email-verification_2.cjs.entry.js +0 -1
  4. package/dist/cjs/sqm-stencilbook.cjs.entry.js +24 -5
  5. package/dist/cjs/{sqm-user-info-form-view-9745956d.js → sqm-user-info-form-view-bdb4794c.js} +7 -13
  6. package/dist/cjs/{subregions-d12829d6.js → subregions-cd5c7ad6.js} +9 -4
  7. package/dist/cjs/{useIndirectTaxForm-0969e194.js → useIndirectTaxForm-ed4df485.js} +23 -35
  8. package/dist/collection/components/sqm-partner-info-modal/usePartnerInfoModal.js +0 -1
  9. package/dist/collection/components/tax-and-cash/TaxForm.stories.js +2 -1
  10. package/dist/collection/components/tax-and-cash/sqm-payout-status-alert/PayoutStatusAlert.stories.js +10 -1
  11. package/dist/collection/components/tax-and-cash/sqm-payout-status-alert/sqm-payout-status-alert-view.js +10 -14
  12. package/dist/collection/components/tax-and-cash/sqm-payout-status-alert/sqm-payout-status-alert.js +1 -1
  13. package/dist/collection/components/tax-and-cash/sqm-payout-status-alert/usePayoutStatus.js +22 -34
  14. package/dist/collection/components/tax-and-cash/sqm-tax-and-cash-dashboard/TaxAndCashDashboardView.stories.js +8 -1
  15. package/dist/collection/components/tax-and-cash/sqm-tax-and-cash-dashboard/sqm-tax-and-cash-dashboard-view.js +6 -12
  16. package/dist/collection/components/tax-and-cash/sqm-tax-and-cash-dashboard/sqm-tax-and-cash-dashboard.js +1 -1
  17. package/dist/collection/components/tax-and-cash/sqm-tax-and-cash-dashboard/useTaxAndCashDashboard.js +2 -1
  18. package/dist/collection/components/tax-and-cash/utils.js +9 -4
  19. package/dist/esm/sqm-banking-info-form_10.entry.js +4 -3
  20. package/dist/esm/sqm-big-stat_47.entry.js +12 -16
  21. package/dist/esm/sqm-email-verification_2.entry.js +0 -1
  22. package/dist/esm/sqm-stencilbook.entry.js +24 -5
  23. package/dist/esm/{sqm-user-info-form-view-81526655.js → sqm-user-info-form-view-6c7919de.js} +7 -13
  24. package/dist/esm/{subregions-98789b46.js → subregions-8e84e5fa.js} +10 -5
  25. package/dist/esm/{useIndirectTaxForm-bbe8779d.js → useIndirectTaxForm-f622ba23.js} +23 -35
  26. package/dist/esm-es5/sqm-banking-info-form_10.entry.js +1 -1
  27. package/dist/esm-es5/sqm-big-stat_47.entry.js +1 -1
  28. package/dist/esm-es5/sqm-email-verification_2.entry.js +1 -1
  29. package/dist/esm-es5/sqm-stencilbook.entry.js +1 -1
  30. package/dist/esm-es5/sqm-user-info-form-view-6c7919de.js +1 -0
  31. package/dist/esm-es5/{subregions-98789b46.js → subregions-8e84e5fa.js} +1 -1
  32. package/dist/esm-es5/{useIndirectTaxForm-bbe8779d.js → useIndirectTaxForm-f622ba23.js} +2 -2
  33. package/dist/mint-components/mint-components.esm.js +1 -1
  34. package/dist/mint-components/{p-c006b11d.entry.js → p-097bd078.entry.js} +0 -1
  35. package/dist/mint-components/{p-549d60ee.system.entry.js → p-23d5b890.system.entry.js} +1 -1
  36. package/dist/mint-components/p-2e822db5.system.js +1 -0
  37. package/dist/mint-components/{p-53575d04.js → p-2ec539fc.js} +1 -1
  38. package/dist/mint-components/p-3ad23a4c.js +1 -0
  39. package/dist/mint-components/{p-e1b917ff.entry.js → p-49d6f45d.entry.js} +2 -2
  40. package/dist/mint-components/{p-db25e189.entry.js → p-74ca06a3.entry.js} +2 -2
  41. package/dist/mint-components/{p-3ebe63f8.system.entry.js → p-7b9a6c30.system.entry.js} +1 -1
  42. package/dist/mint-components/p-b13f6bb0.system.entry.js +1 -0
  43. package/dist/mint-components/p-b27f98f1.js +108 -0
  44. package/dist/mint-components/{p-c4ef1d04.entry.js → p-b8021805.entry.js} +8 -8
  45. package/dist/mint-components/p-b9793754.system.entry.js +1 -0
  46. package/dist/mint-components/p-bfb00685.system.js +1 -1
  47. package/dist/mint-components/{p-826e3db0.system.js → p-c5efdac3.system.js} +1 -1
  48. package/dist/mint-components/p-ea7218d3.system.js +6 -0
  49. package/dist/types/components/tax-and-cash/sqm-payout-status-alert/PayoutStatusAlert.stories.d.ts +1 -0
  50. package/dist/types/components/tax-and-cash/sqm-payout-status-alert/sqm-payout-status-alert-view.d.ts +1 -0
  51. package/dist/types/components/tax-and-cash/sqm-payout-status-alert/usePayoutStatus.d.ts +2 -1
  52. package/dist/types/components/tax-and-cash/sqm-tax-and-cash-dashboard/TaxAndCashDashboardView.stories.d.ts +1 -0
  53. package/dist/types/components/tax-and-cash/sqm-tax-and-cash-dashboard/sqm-tax-and-cash-dashboard-view.d.ts +1 -0
  54. package/dist/types/components/tax-and-cash/utils.d.ts +4 -1
  55. package/docs/docs.docx +0 -0
  56. package/package.json +1 -1
  57. package/dist/esm-es5/sqm-user-info-form-view-81526655.js +0 -1
  58. package/dist/mint-components/p-07b989a3.system.js +0 -6
  59. package/dist/mint-components/p-14f4cce8.js +0 -1
  60. package/dist/mint-components/p-a1b655ba.system.js +0 -1
  61. package/dist/mint-components/p-a5f2c7e3.system.entry.js +0 -1
  62. package/dist/mint-components/p-b1feb0f1.js +0 -108
  63. package/dist/mint-components/p-dc3634cc.system.entry.js +0 -1
@@ -108,9 +108,12 @@ export function formatPayoutThreshold(publisher) {
108
108
  return undefined;
109
109
  return `${(_b = publisher === null || publisher === void 0 ? void 0 : publisher.currency) !== null && _b !== void 0 ? _b : ""}${threshold}`;
110
110
  }
111
- /** `payoutsAccount.balance` is a formatted string; only `balanceAmount` (minor units) is comparable. */
111
+ /**
112
+ * `payoutsAccount.balance` is a formatted string; only `balanceAmount` (minor units) is comparable.
113
+ * A zero balance gets no notice — there is nothing waiting to pay out.
114
+ */
112
115
  export function isBalanceUnderPayoutThreshold(publisher) {
113
- var _a;
116
+ var _a, _b;
114
117
  const rawThreshold = (_a = publisher === null || publisher === void 0 ? void 0 : publisher.withdrawalSettings) === null || _a === void 0 ? void 0 : _a.paymentThreshold;
115
118
  const account = publisher === null || publisher === void 0 ? void 0 : publisher.payoutsAccount;
116
119
  if (!rawThreshold || !account)
@@ -118,11 +121,13 @@ export function isBalanceUnderPayoutThreshold(publisher) {
118
121
  const threshold = Number(rawThreshold);
119
122
  if (!Number.isFinite(threshold) || !Number.isFinite(account.balanceAmount))
120
123
  return false;
124
+ if (account.balanceAmount <= 0)
125
+ return false;
121
126
  const currency = account.currencyCode || (publisher === null || publisher === void 0 ? void 0 : publisher.currency);
122
127
  if (!currency)
123
128
  return false;
124
129
  const scale = 10 **
125
- new Intl.NumberFormat("en-US", { style: "currency", currency })
126
- .resolvedOptions().maximumFractionDigits;
130
+ ((_b = new Intl.NumberFormat("en-US", { style: "currency", currency })
131
+ .resolvedOptions().maximumFractionDigits) !== null && _b !== void 0 ? _b : 2);
127
132
  return account.balanceAmount < Math.round(threshold * scale);
128
133
  }
@@ -8,17 +8,17 @@ import { g as getProps } from './utils-334c1e34.js';
8
8
  import { c as createStyleSheet } from './JSS-67b5cff8.js';
9
9
  import './mixins-f750863a.js';
10
10
  import './AsYouType-2d56519e.js';
11
- import { t as taxTypeToName, d as validTaxDocument, I as INDIRECT_TAX_SPAIN_REGIONS, a as INDIRECT_TAX_PROVINCES, b as formatPayoutThreshold, c as isBalanceUnderPayoutThreshold, o as objectIsFull, e as toDomesticNumber, A as ADDRESS_REGIONS } from './subregions-98789b46.js';
11
+ import { t as taxTypeToName, d as validTaxDocument, I as INDIRECT_TAX_SPAIN_REGIONS, a as INDIRECT_TAX_PROVINCES, c as formatPayoutThreshold, b as isBalanceUnderPayoutThreshold, o as objectIsFull, e as toDomesticNumber, A as ADDRESS_REGIONS } from './subregions-8e84e5fa.js';
12
12
  import { G as GenericTableView } from './GenericTableView-471a9386.js';
13
13
  import { u as useRerenderListener, a as useRequestRerender } from './re-render-bf46ba54.js';
14
14
  import { g as generateUserError, d as dropZoneColumnIndexes } from './useReferralTable-3aa4b527.js';
15
15
  import { u as useChildElements } from './useChildElements-06937df7.js';
16
16
  import { l as luxon } from './luxon-1be92a8e.js';
17
- import { O as OtherRegionSlotView, I as InvoiceTableView, v as vatLabels, T as TaxAndCashDashboardView, U as UserInfoFormView } from './sqm-user-info-form-view-81526655.js';
17
+ import { O as OtherRegionSlotView, I as InvoiceTableView, v as vatLabels, T as TaxAndCashDashboardView, U as UserInfoFormView } from './sqm-user-info-form-view-6c7919de.js';
18
18
  import { F as FORM_STEPS, a as TAX_FORM_CONTEXT_NAMESPACE, S as SORTED_COUNTRIES_NAMESPACE, f as FINANCE_NETWORK_SETTINGS_NAMESPACE, c as USER_QUERY_NAMESPACE, T as TAX_CONTEXT_NAMESPACE, C as CURRENCIES_NAMESPACE, U as USER_FORM_CONTEXT_NAMESPACE } from './data-0be04430.js';
19
19
  import { c as VERIFICATION_EVENT_KEY } from './keys-1054056a.js';
20
20
  import { T as TAX_FORM_UPDATED_EVENT_KEY } from './eventKeys-f76b6a03.js';
21
- import { a as useIndirectTaxForm, b as useVeriffApp, g as getStatus, V as VERIFF_COMPLETE_EVENT_KEY, c as CONNECT_PARTNER, C as COMPLETE_PARTNER } from './useIndirectTaxForm-bbe8779d.js';
21
+ import { a as useIndirectTaxForm, b as useVeriffApp, g as getStatus, V as VERIFF_COMPLETE_EVENT_KEY, c as CONNECT_PARTNER, C as COMPLETE_PARTNER } from './useIndirectTaxForm-f622ba23.js';
22
22
 
23
23
  function getFormMap({ props, getValidationErrorMessage, bankCountry, }) {
24
24
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63, _64, _65, _66, _67, _68, _69, _70, _71, _72, _73, _74, _75, _76;
@@ -3968,6 +3968,7 @@ const useTaxAndCashDashboard = (props) => {
3968
3968
  showNewFormDialog: showDialog,
3969
3969
  hasHold: !!((_o = publisher === null || publisher === void 0 ? void 0 : publisher.payoutsAccount) === null || _o === void 0 ? void 0 : _o.hold),
3970
3970
  payoutStatus,
3971
+ belowPayoutThreshold: isBalanceUnderPayoutThreshold(publisher),
3971
3972
  minPayoutAmount: formatPayoutThreshold(publisher),
3972
3973
  veriffLoading,
3973
3974
  enforceUsTaxComplianceOption,
@@ -11,7 +11,7 @@ import './mixins-f750863a.js';
11
11
  import { C as CopyTextView } from './copy-text-view-87259b11.js';
12
12
  import './sqm-text-span-view-72f43dff.js';
13
13
  import { A as AsYouType } from './AsYouType-2d56519e.js';
14
- import { g as getCountryObj, i as isValidI18nPhoneNumber, L as LoadingView } from './subregions-98789b46.js';
14
+ import { g as getCountryObj, i as isValidI18nPhoneNumber, L as LoadingView } from './subregions-8e84e5fa.js';
15
15
  import { R as REGISTRATION_FORM_STATE_CONTEXT, a as useRegistrationForm } from './useRegistrationFormState-aa44cfff.js';
16
16
  import { P as PortalRegistrationFormView } from './sqm-portal-registration-form-view-79265df5.js';
17
17
  import { u as usePortalRegistrationForm } from './usePortalRegistrationForm-78fdfd93.js';
@@ -30,7 +30,7 @@ import './sqm-portal-container-view-200c9df8.js';
30
30
  import { T as TAX_CONTEXT_NAMESPACE, a as TAX_FORM_CONTEXT_NAMESPACE, U as USER_FORM_CONTEXT_NAMESPACE, C as CURRENCIES_NAMESPACE, b as COUNTRIES_NAMESPACE, S as SORTED_COUNTRIES_NAMESPACE, c as USER_QUERY_NAMESPACE, G as GET_USER$2, d as COUNTRIES_QUERY_NAMESPACE, e as GET_COUNTRIES, f as FINANCE_NETWORK_SETTINGS_NAMESPACE, g as GET_FINANCE_NETWORK_SETTINGS, h as CURRENCIES_QUERY_NAMESPACE, i as GET_CURRENCIES } from './data-0be04430.js';
31
31
  import { S as SHOW_CODE_NAMESPACE, a as VERIFICATION_EMAIL_NAMESPACE, b as SHOW_PARTNER_MODAL_NAMESPACE, P as PARTNER_CREATED_NAMESPACE, V as VERIFICATION_PARENT_NAMESPACE } from './keys-1054056a.js';
32
32
  import './eventKeys-f76b6a03.js';
33
- import { u as usePayoutStatus, C as COMPLETE_PARTNER } from './useIndirectTaxForm-bbe8779d.js';
33
+ import { u as usePayoutStatus, C as COMPLETE_PARTNER } from './useIndirectTaxForm-f622ba23.js';
34
34
  import { p as parseStates } from './parseStates-ed75e224.js';
35
35
 
36
36
  /**
@@ -3078,17 +3078,6 @@ function PayoutStatusAlertView(props) {
3078
3078
  alertType: "warning",
3079
3079
  icon: "exclamation-triangle",
3080
3080
  };
3081
- case "BALANCE_UNDER_THRESHOLD":
3082
- return {
3083
- header: text.balanceUnderThresholdHeader,
3084
- description: intl.formatMessage({
3085
- id: "balanceUnderThresholdDescription",
3086
- defaultMessage: text.balanceUnderThresholdDescription,
3087
- }, { minPayoutAmount: states.minPayoutAmount }),
3088
- buttonText: null,
3089
- alertType: "info",
3090
- icon: "info-circle",
3091
- };
3092
3081
  case "PAYMENT_HOLD_ON_CHANGE":
3093
3082
  return {
3094
3083
  header: text.paymentHoldOnChangeHeader,
@@ -3216,16 +3205,23 @@ function PayoutStatusAlertView(props) {
3216
3205
  }
3217
3206
  }
3218
3207
  const alertDetails = getAlert(states.status);
3219
- if (states.status === "DONE" || !alertDetails) {
3208
+ const showHoldAlert = states.status !== "DONE" && !!alertDetails;
3209
+ if (!showHoldAlert && !states.belowPayoutThreshold) {
3220
3210
  return h$1("div", null);
3221
3211
  }
3222
3212
  return (h$1("div", { part: "sqm-base" },
3223
3213
  h$1("style", { type: "text/css" }, styleString$2),
3224
3214
  h$1("style", { type: "text/css" }, vanillaStyle$1),
3225
- h$1("sqm-form-message", { loading: states.loading, type: alertDetails.alertType },
3215
+ states.belowPayoutThreshold && (h$1("sqm-form-message", { loading: states.loading, type: "info" },
3216
+ h$1("p", { part: "alert-title" }, text.balanceUnderThresholdHeader),
3217
+ h$1("p", { part: "alert-description" }, intl.formatMessage({
3218
+ id: "balanceUnderThresholdDescription",
3219
+ defaultMessage: text.balanceUnderThresholdDescription,
3220
+ }, { minPayoutAmount: states.minPayoutAmount })))),
3221
+ showHoldAlert && (h$1("sqm-form-message", { loading: states.loading, type: alertDetails.alertType },
3226
3222
  h$1("p", { part: "alert-title" }, alertDetails.header),
3227
3223
  h$1("p", { part: "alert-description" }, alertDetails.description),
3228
- getButton(states.status))));
3224
+ getButton(states.status)))));
3229
3225
  }
3230
3226
 
3231
3227
  const PayoutStatusAlert = class {
@@ -472,7 +472,6 @@ const START_IMPACT_CONNECTION = dist.gql `
472
472
  mutation startImpactConnection($vars: ImpactConnectionInput!) {
473
473
  startImpactConnection(impactConnectionInput: $vars) {
474
474
  success
475
- errorCode
476
475
  validationErrors {
477
476
  field
478
477
  message
@@ -11,7 +11,7 @@ import { C as CopyTextView } from './copy-text-view-87259b11.js';
11
11
  import './sqm-text-span-view-72f43dff.js';
12
12
  import { b as PortalRegisterView, P as PortalForgotPasswordView, a as PortalLoginView, c as PortalVerifyEmailView } from './sqm-portal-verify-email-view-590f964b.js';
13
13
  import './AsYouType-2d56519e.js';
14
- import { t as taxTypeToName, L as LoadingView, I as INDIRECT_TAX_SPAIN_REGIONS, a as INDIRECT_TAX_PROVINCES } from './subregions-98789b46.js';
14
+ import { t as taxTypeToName, L as LoadingView, I as INDIRECT_TAX_SPAIN_REGIONS, a as INDIRECT_TAX_PROVINCES } from './subregions-8e84e5fa.js';
15
15
  import { P as PortalRegistrationFormView } from './sqm-portal-registration-form-view-79265df5.js';
16
16
  import { G as GenericTableView } from './GenericTableView-471a9386.js';
17
17
  import './useChildElements-06937df7.js';
@@ -33,7 +33,7 @@ import './ErrorView-74cb3af8.js';
33
33
  import { Q as QrCodeView } from './sqm-qr-code-view-ce476721.js';
34
34
  import { S as StatContainerView, B as BigStatView, a as ShareButtonView, P as PortalChangePasswordView, b as PoweredByImg$1, c as BaseRegistrationFormView, u as useDemoBigStat, T as TaskCardView, C as CardFeedView, d as CheckboxFieldView, e as CouponCodeView, D as DropdownFieldView, E as EditProfileView, L as LeaderboardView, H as HeroView, I as InputFieldView, N as NameFieldsView, f as ChangeMarktingView, g as PortalFooterView, h as PortalFrameView, R as ReferralIframeView, i as RewardExchangeView, r as rewardExchangeCustomErrorMsg, j as rewardExchangeLongText, k as rewardExchangeSelected, l as chooseAmountFixed, m as chooseAmountFixedNoDescription, n as chooseAmountVariable, o as chooseAmountVariableNoDescription, p as chooseAmountVariableDisabled, q as chooseAmountVariableUnavailable, s as confirmFixed, t as confirmVariable, v as redemptionError, w as queryError, x as success, y as successVariable, z as loading, A as empty$1, F as rewardExchange, G as useShareButton, J as ShareLinkView, K as useShareLink, M as ProgressBarView, O as ProgressBar$2, Q as LeadFormView, U as LeadDropdownFieldView, V as ShadowViewAddon } from './ShadowViewAddon-4ee8cc57.js';
35
35
  import { P as PortalContainerView, a as PortalSectionView } from './sqm-portal-container-view-200c9df8.js';
36
- import { I as InvoiceTableView, T as TaxAndCashDashboardView$1, O as OtherRegionSlotView, U as UserInfoFormView$1 } from './sqm-user-info-form-view-81526655.js';
36
+ import { I as InvoiceTableView, T as TaxAndCashDashboardView$1, O as OtherRegionSlotView, U as UserInfoFormView$1 } from './sqm-user-info-form-view-6c7919de.js';
37
37
  import { L as LeadInputFieldView } from './sqm-lead-input-field-view-671ff96f.js';
38
38
  import './data-0be04430.js';
39
39
  import { P as PartnerInfoModalView } from './sqm-partner-info-modal-view-7f301cd0.js';
@@ -16657,7 +16657,14 @@ const AccountUnderReview = () => (h(TaxAndCashDashboardView$1, { states: { ...ba
16657
16657
  const PaymentHoldOnChange = () => (h(TaxAndCashDashboardView$1, { states: { ...baseStates, payoutStatus: "PAYMENT_HOLD_ON_CHANGE" }, text: defaultText, callbacks: defaultCallbacks$1, slots: defaultSlots }));
16658
16658
  const BalanceUnderThreshold = () => (h(TaxAndCashDashboardView$1, { states: {
16659
16659
  ...baseStates,
16660
- payoutStatus: "BALANCE_UNDER_THRESHOLD",
16660
+ payoutStatus: "DONE",
16661
+ belowPayoutThreshold: true,
16662
+ minPayoutAmount: "USD50.00",
16663
+ }, text: defaultText, callbacks: defaultCallbacks$1, slots: buildSlots({ belowPayoutThreshold: true }) }));
16664
+ const BalanceUnderThresholdWithHold = () => (h(TaxAndCashDashboardView$1, { states: {
16665
+ ...baseStates,
16666
+ payoutStatus: "NEW_PAYEE_REVIEW",
16667
+ belowPayoutThreshold: true,
16661
16668
  minPayoutAmount: "USD50.00",
16662
16669
  }, text: defaultText, callbacks: defaultCallbacks$1, slots: buildSlots({ belowPayoutThreshold: true }) }));
16663
16670
  const BeneficiaryNameInvalid = () => (h(TaxAndCashDashboardView$1, { states: { ...baseStates, payoutStatus: "BENEFICIARY_NAME_INVALID" }, text: defaultText, callbacks: defaultCallbacks$1, slots: defaultSlots }));
@@ -16692,6 +16699,7 @@ const TaxAndCashDashboardView = /*#__PURE__*/Object.freeze({
16692
16699
  AccountUnderReview: AccountUnderReview,
16693
16700
  PaymentHoldOnChange: PaymentHoldOnChange,
16694
16701
  BalanceUnderThreshold: BalanceUnderThreshold,
16702
+ BalanceUnderThresholdWithHold: BalanceUnderThresholdWithHold,
16695
16703
  BeneficiaryNameInvalid: BeneficiaryNameInvalid,
16696
16704
  BeneficiaryNameMismatch: BeneficiaryNameMismatch,
16697
16705
  BankTaxNameMismatch: BankTaxNameMismatch,
@@ -17923,7 +17931,8 @@ const TaxAndCashDashboardBalanceUnderThreshold = () => {
17923
17931
  return (h("sqm-tax-and-cash-dashboard", { demoData: {
17924
17932
  ...dashboardProps,
17925
17933
  states: {
17926
- payoutStatus: "BALANCE_UNDER_THRESHOLD",
17934
+ payoutStatus: "DONE",
17935
+ belowPayoutThreshold: true,
17927
17936
  minPayoutAmount: "USD50.00",
17928
17937
  veriffLoading: false,
17929
17938
  canEditPayoutInfo: true,
@@ -18373,7 +18382,16 @@ const PaymentHoldOnChange$1 = () => (h("sqm-payout-status-alert", { demoData: {
18373
18382
  const BalanceUnderThreshold$1 = () => (h("sqm-payout-status-alert", { demoData: {
18374
18383
  states: {
18375
18384
  ...defaultProps$s,
18376
- status: "BALANCE_UNDER_THRESHOLD",
18385
+ status: "DONE",
18386
+ belowPayoutThreshold: true,
18387
+ minPayoutAmount: "USD50.00",
18388
+ },
18389
+ } }));
18390
+ const BalanceUnderThresholdWithHold$1 = () => (h("sqm-payout-status-alert", { demoData: {
18391
+ states: {
18392
+ ...defaultProps$s,
18393
+ status: "NEW_PAYEE_REVIEW",
18394
+ belowPayoutThreshold: true,
18377
18395
  minPayoutAmount: "USD50.00",
18378
18396
  },
18379
18397
  } }));
@@ -18404,6 +18422,7 @@ const PayoutStatusAlert = /*#__PURE__*/Object.freeze({
18404
18422
  NewPayeeReview: NewPayeeReview,
18405
18423
  PaymentHoldOnChange: PaymentHoldOnChange$1,
18406
18424
  BalanceUnderThreshold: BalanceUnderThreshold$1,
18425
+ BalanceUnderThresholdWithHold: BalanceUnderThresholdWithHold$1,
18407
18426
  BeneficiaryNameInvalid: BeneficiaryNameInvalid$1,
18408
18427
  BeneficiaryNameMismatch: BeneficiaryNameMismatch$1,
18409
18428
  BankTaxNameMismatch: BankTaxNameMismatch$1,
@@ -2,7 +2,7 @@ import { h } from './index-38ad4957.js';
2
2
  import { i as intl } from './global-32d00a6e.js';
3
3
  import { c as createStyleSheet } from './JSS-67b5cff8.js';
4
4
  import { A as AsYouType } from './AsYouType-2d56519e.js';
5
- import { f as formatErrorMessage, a as INDIRECT_TAX_PROVINCES, L as LoadingView, i as isValidI18nPhoneNumber, v as validateBillingField } from './subregions-98789b46.js';
5
+ import { f as formatErrorMessage, a as INDIRECT_TAX_PROVINCES, L as LoadingView, i as isValidI18nPhoneNumber, v as validateBillingField } from './subregions-8e84e5fa.js';
6
6
  import { F as FORM_STEPS } from './data-0be04430.js';
7
7
 
8
8
  const style = {
@@ -422,18 +422,6 @@ const TaxAndCashDashboardView = (props) => {
422
422
  icon: "exclamation-triangle",
423
423
  class: sheet.classes.WarningHoldAlertContainer,
424
424
  };
425
- case "BALANCE_UNDER_THRESHOLD":
426
- return {
427
- header: text.balanceUnderThresholdHeader,
428
- description: intl.formatMessage({
429
- id: "balanceUnderThresholdDescription",
430
- defaultMessage: text.balanceUnderThresholdDescription,
431
- }, { minPayoutAmount: states.minPayoutAmount }),
432
- buttonText: null,
433
- alertType: "info",
434
- icon: "info-circle",
435
- class: sheet.classes.InfoHoldAlertContainer,
436
- };
437
425
  case "PAYMENT_HOLD_ON_CHANGE":
438
426
  return {
439
427
  header: text.paymentHoldOnChangeHeader,
@@ -677,6 +665,12 @@ const TaxAndCashDashboardView = (props) => {
677
665
  }, {
678
666
  supportLink: (h("a", { target: "_blank", href: `mailto:advocate-payment-support@impact.com` }, text.supportLink)),
679
667
  }))),
668
+ states.belowPayoutThreshold && (h("sqm-form-message", { loading: states.loading, exportparts: "base: alert-base, icon:alert-icon", type: "info", class: sheet.classes.InfoHoldAlertContainer, icon: "info-circle", transparent: true },
669
+ h("strong", null, text.balanceUnderThresholdHeader),
670
+ h("p", { style: { margin: "0" } }, intl.formatMessage({
671
+ id: "balanceUnderThresholdDescription",
672
+ defaultMessage: text.balanceUnderThresholdDescription,
673
+ }, { minPayoutAmount: states.minPayoutAmount })))),
680
674
  alertInfo && (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 },
681
675
  h("strong", null, alertInfo.header),
682
676
  h("p", { style: { margin: "0" } }, alertInfo.description),
@@ -641,9 +641,12 @@ function formatPayoutThreshold(publisher) {
641
641
  return undefined;
642
642
  return `${(_b = publisher === null || publisher === void 0 ? void 0 : publisher.currency) !== null && _b !== void 0 ? _b : ""}${threshold}`;
643
643
  }
644
- /** `payoutsAccount.balance` is a formatted string; only `balanceAmount` (minor units) is comparable. */
644
+ /**
645
+ * `payoutsAccount.balance` is a formatted string; only `balanceAmount` (minor units) is comparable.
646
+ * A zero balance gets no notice — there is nothing waiting to pay out.
647
+ */
645
648
  function isBalanceUnderPayoutThreshold(publisher) {
646
- var _a;
649
+ var _a, _b;
647
650
  const rawThreshold = (_a = publisher === null || publisher === void 0 ? void 0 : publisher.withdrawalSettings) === null || _a === void 0 ? void 0 : _a.paymentThreshold;
648
651
  const account = publisher === null || publisher === void 0 ? void 0 : publisher.payoutsAccount;
649
652
  if (!rawThreshold || !account)
@@ -651,12 +654,14 @@ function isBalanceUnderPayoutThreshold(publisher) {
651
654
  const threshold = Number(rawThreshold);
652
655
  if (!Number.isFinite(threshold) || !Number.isFinite(account.balanceAmount))
653
656
  return false;
657
+ if (account.balanceAmount <= 0)
658
+ return false;
654
659
  const currency = account.currencyCode || (publisher === null || publisher === void 0 ? void 0 : publisher.currency);
655
660
  if (!currency)
656
661
  return false;
657
662
  const scale = 10 **
658
- new Intl.NumberFormat("en-US", { style: "currency", currency })
659
- .resolvedOptions().maximumFractionDigits;
663
+ ((_b = new Intl.NumberFormat("en-US", { style: "currency", currency })
664
+ .resolvedOptions().maximumFractionDigits) !== null && _b !== void 0 ? _b : 2);
660
665
  return account.balanceAmount < Math.round(threshold * scale);
661
666
  }
662
667
 
@@ -1078,4 +1083,4 @@ const ADDRESS_REGIONS = {
1078
1083
  },
1079
1084
  };
1080
1085
 
1081
- export { ADDRESS_REGIONS as A, INDIRECT_TAX_SPAIN_REGIONS as I, LoadingView as L, INDIRECT_TAX_PROVINCES as a, formatPayoutThreshold as b, isBalanceUnderPayoutThreshold as c, validTaxDocument as d, toDomesticNumber as e, formatErrorMessage as f, getCountryObj as g, isValidI18nPhoneNumber as i, objectIsFull as o, taxTypeToName as t, validateBillingField as v };
1086
+ export { ADDRESS_REGIONS as A, INDIRECT_TAX_SPAIN_REGIONS as I, LoadingView as L, INDIRECT_TAX_PROVINCES as a, isBalanceUnderPayoutThreshold as b, formatPayoutThreshold as c, validTaxDocument as d, toDomesticNumber as e, formatErrorMessage as f, getCountryObj as g, isValidI18nPhoneNumber as i, objectIsFull as o, taxTypeToName as t, validateBillingField as v };
@@ -1,7 +1,7 @@
1
1
  import { k as useState, f as useEffect, m as useRef, u as useMemo } from './dom-context-hooks.module-50442785.js';
2
2
  import { d as dist, J, $ as $e, g as getEnvironmentSDK, w as wn, L, F as Fn, q as Pn, r as $n } from './index.module-02cb914c.js';
3
3
  import { j as jsonpointer } from './jsonpointer-388a7082.js';
4
- import { b as formatPayoutThreshold, c as isBalanceUnderPayoutThreshold, I as INDIRECT_TAX_SPAIN_REGIONS, a as INDIRECT_TAX_PROVINCES, g as getCountryObj, d as validTaxDocument } from './subregions-98789b46.js';
4
+ import { b as isBalanceUnderPayoutThreshold, c as formatPayoutThreshold, I as INDIRECT_TAX_SPAIN_REGIONS, a as INDIRECT_TAX_PROVINCES, g as getCountryObj, d as validTaxDocument } from './subregions-8e84e5fa.js';
5
5
  import { a as TAX_FORM_CONTEXT_NAMESPACE, U as USER_FORM_CONTEXT_NAMESPACE, d as COUNTRIES_QUERY_NAMESPACE, T as TAX_CONTEXT_NAMESPACE, c as USER_QUERY_NAMESPACE } from './data-0be04430.js';
6
6
  import { T as TAX_FORM_UPDATED_EVENT_KEY } from './eventKeys-f76b6a03.js';
7
7
 
@@ -1011,23 +1011,8 @@ const GET_TAX_SETTING = dist.gql `
1011
1011
  }
1012
1012
  }
1013
1013
  `;
1014
- /** Transient holds that clear automatically, so a balance under the minimum explains the wait better. */
1015
- const DISPLACEABLE_STATUSES = [
1016
- "DONE",
1017
- "NEW_PAYEE_REVIEW",
1018
- "PAYMENT_HOLD_ON_CHANGE",
1019
- ];
1020
1014
  function getStatus(data) {
1021
- var _a;
1022
- const status = getHoldStatus(data);
1023
- const publisher = (_a = data.user.impactConnection) === null || _a === void 0 ? void 0 : _a.publisher;
1024
- return DISPLACEABLE_STATUSES.includes(status) &&
1025
- isBalanceUnderPayoutThreshold(publisher)
1026
- ? "BALANCE_UNDER_THRESHOLD"
1027
- : status;
1028
- }
1029
- function getHoldStatus(data) {
1030
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x;
1015
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
1031
1016
  const account = (_b = (_a = data.user.impactConnection) === null || _a === void 0 ? void 0 : _a.publisher) === null || _b === void 0 ? void 0 : _b.payoutsAccount;
1032
1017
  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) => {
1033
1018
  var _a;
@@ -1037,39 +1022,41 @@ function getHoldStatus(data) {
1037
1022
  if (!((_g = (_f = data.user) === null || _f === void 0 ? void 0 : _f.impactConnection) === null || _g === void 0 ? void 0 : _g.connected) || !account)
1038
1023
  return "INFORMATION_REQUIRED";
1039
1024
  const currentTaxDocument = (_j = (_h = data.user.impactConnection) === null || _h === void 0 ? void 0 : _h.publisher) === null || _j === void 0 ? void 0 : _j.currentTaxDocument;
1040
- if (((_k = account.holdReasons) === null || _k === void 0 ? void 0 : _k.includes("NO_W9_DOCUMENT")) && !currentTaxDocument)
1025
+ // A new-payee review only starts once funds reach Impact, so until then nobody can act on it
1026
+ const reviewIsLive = !!hasTransferredReward && account.balanceAmount > 0;
1027
+ const holdReasons = ((_k = account.holdReasons) !== null && _k !== void 0 ? _k : []).filter((reason) => reason !== "NEW_PAYEE_REVIEW" || reviewIsLive);
1028
+ if (holdReasons.includes("NO_W9_DOCUMENT") && !currentTaxDocument)
1041
1029
  return "OVER_W9_THRESHOLD";
1042
- if ((_l = account.holdReasons) === null || _l === void 0 ? void 0 : _l.includes("IDV_CHECK_REQUIRED"))
1030
+ if (holdReasons.includes("IDV_CHECK_REQUIRED"))
1043
1031
  return "VERIFICATION:REQUIRED";
1044
- if ((_m = account.holdReasons) === null || _m === void 0 ? void 0 : _m.includes("IDV_CHECK_REQUIRED_INTERNAL"))
1032
+ if (holdReasons.includes("IDV_CHECK_REQUIRED_INTERNAL"))
1045
1033
  return "VERIFICATION:INTERNAL";
1046
- if ((_o = account.holdReasons) === null || _o === void 0 ? void 0 : _o.includes("IDV_CHECK_REVIEW_INTERNAL"))
1034
+ if (holdReasons.includes("IDV_CHECK_REVIEW_INTERNAL"))
1047
1035
  return "VERIFICATION:REVIEW";
1048
- if ((_p = account.holdReasons) === null || _p === void 0 ? void 0 : _p.includes("IDV_CHECK_FAILED_INTERNAL"))
1036
+ if (holdReasons.includes("IDV_CHECK_FAILED_INTERNAL"))
1049
1037
  return "VERIFICATION:FAILED";
1050
- // only show banner for NEW_PAYEE_REVIEW if a PFT was created
1051
- if (((_q = account.holdReasons) === null || _q === void 0 ? void 0 : _q.includes("NEW_PAYEE_REVIEW")) && hasTransferredReward)
1038
+ if (holdReasons.includes("NEW_PAYEE_REVIEW"))
1052
1039
  return "NEW_PAYEE_REVIEW";
1053
- if ((_r = account.holdReasons) === null || _r === void 0 ? void 0 : _r.includes("NEW_PAYEE_REVIEW"))
1054
- return "DONE";
1055
- if ((_s = account.holdReasons) === null || _s === void 0 ? void 0 : _s.includes("PAYMENT_HOLD_ON_CHANGE"))
1040
+ if (holdReasons.includes("PAYMENT_HOLD_ON_CHANGE"))
1056
1041
  return "PAYMENT_HOLD_ON_CHANGE";
1057
- if ((_t = account.holdReasons) === null || _t === void 0 ? void 0 : _t.includes("BENEFICIARY_NAME_INVALID"))
1042
+ if (holdReasons.includes("BENEFICIARY_NAME_INVALID"))
1058
1043
  return "BENEFICIARY_NAME_INVALID";
1059
- if ((_u = account.holdReasons) === null || _u === void 0 ? void 0 : _u.includes("BENEFICIARY_NAME_MISMATCH"))
1044
+ if (holdReasons.includes("BENEFICIARY_NAME_MISMATCH"))
1060
1045
  return "BENEFICIARY_NAME_MISMATCH";
1061
- if ((_v = account.holdReasons) === null || _v === void 0 ? void 0 : _v.includes("BANK_TAX_NAME_MISMATCH"))
1046
+ if (holdReasons.includes("BANK_TAX_NAME_MISMATCH"))
1062
1047
  return "BANK_TAX_NAME_MISMATCH";
1063
- if ((_w = account.holdReasons) === null || _w === void 0 ? void 0 : _w.includes("WITHDRAWAL_SETTINGS_INVALID"))
1048
+ if (holdReasons.includes("WITHDRAWAL_SETTINGS_INVALID"))
1064
1049
  return "WITHDRAWAL_SETTINGS_INVALID";
1065
- if ((_x = account.holdReasons) === null || _x === void 0 ? void 0 : _x.includes("PAYMENT_RETURNED"))
1050
+ if (holdReasons.includes("PAYMENT_RETURNED"))
1066
1051
  return "PAYMENT_RETURNED";
1067
- if (account.hold)
1052
+ // A hold whose every reason was suppressed leaves nothing to report
1053
+ const unattributedHold = !((_l = account.holdReasons) === null || _l === void 0 ? void 0 : _l.length);
1054
+ if (account.hold && (holdReasons.length > 0 || unattributedHold))
1068
1055
  return "HOLD";
1069
1056
  return "DONE";
1070
1057
  }
1071
1058
  function usePayoutStatus(props) {
1072
- var _a, _b, _c;
1059
+ var _a, _b, _c, _d, _e;
1073
1060
  const { type } = getEnvironmentSDK();
1074
1061
  const { loading, data, errors, refetch } = wn(GET_USER_STATUS, {});
1075
1062
  const { data: taxSettingRes } = wn(GET_TAX_SETTING, {});
@@ -1119,7 +1106,8 @@ function usePayoutStatus(props) {
1119
1106
  status,
1120
1107
  error: !!errors,
1121
1108
  enforceUsTaxComplianceOption,
1122
- minPayoutAmount: 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),
1109
+ belowPayoutThreshold: isBalanceUnderPayoutThreshold((_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),
1110
+ minPayoutAmount: formatPayoutThreshold((_e = (_d = data === null || data === void 0 ? void 0 : data.user) === null || _d === void 0 ? void 0 : _d.impactConnection) === null || _e === void 0 ? void 0 : _e.publisher),
1123
1111
  },
1124
1112
  data: { type },
1125
1113
  text: props.getTextProps(),