@saasquatch/mint-components 2.0.2-7 → 2.0.2-8

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.
@@ -19,7 +19,7 @@ const useReferralTable = require('./useReferralTable-90d4d6e9.js');
19
19
  const IndirectTaxDetailsView = require('./IndirectTaxDetailsView-e5f70b8b.js');
20
20
  const utils$1 = require('./utils-83d125fa.js');
21
21
  const keys = require('./keys-cff24974.js');
22
- const usePayoutStatus = require('./usePayoutStatus-95874989.js');
22
+ const usePayoutStatus = require('./usePayoutStatus-9abe2de8.js');
23
23
 
24
24
  function getFormMap({ props, getValidationErrorMessage, bankCountry, }) {
25
25
  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;
@@ -31,7 +31,7 @@ const ShadowViewAddon = require('./ShadowViewAddon-925a8fa6.js');
31
31
  require('./sqm-portal-container-view-07e4343f.js');
32
32
  const utils$1 = require('./utils-83d125fa.js');
33
33
  const extractProps = require('./extractProps-e9c55ba8.js');
34
- const usePayoutStatus = require('./usePayoutStatus-95874989.js');
34
+ const usePayoutStatus = require('./usePayoutStatus-9abe2de8.js');
35
35
 
36
36
  /**
37
37
  *
@@ -1129,7 +1129,7 @@ const GET_TAX_SETTING = index_module.dist.gql `
1129
1129
  }
1130
1130
  `;
1131
1131
  function getStatus(data) {
1132
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w;
1132
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x;
1133
1133
  const account = (_b = (_a = data.user.impactConnection) === null || _a === void 0 ? void 0 : _a.publisher) === null || _b === void 0 ? void 0 : _b.payoutsAccount;
1134
1134
  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) => reward.statuses.includes("REDEEMED") &&
1135
1135
  reward.partnerFundsTransfer.status === "TRANSFERRED");
@@ -1146,19 +1146,22 @@ function getStatus(data) {
1146
1146
  return "VERIFICATION:REVIEW";
1147
1147
  if ((_p = account.holdReasons) === null || _p === void 0 ? void 0 : _p.includes("IDV_CHECK_FAILED_INTERNAL"))
1148
1148
  return "VERIFICATION:FAILED";
1149
+ // only show banner for NEW_PAYEE_REVIEW if a PFT was created
1149
1150
  if (((_q = account.holdReasons) === null || _q === void 0 ? void 0 : _q.includes("NEW_PAYEE_REVIEW")) && hasTransferredReward)
1150
1151
  return "NEW_PAYEE_REVIEW";
1151
- if ((_r = account.holdReasons) === null || _r === void 0 ? void 0 : _r.includes("PAYMENT_HOLD_ON_CHANGE"))
1152
+ if ((_r = account.holdReasons) === null || _r === void 0 ? void 0 : _r.includes("NEW_PAYEE_REVIEW"))
1153
+ return "DONE";
1154
+ if ((_s = account.holdReasons) === null || _s === void 0 ? void 0 : _s.includes("PAYMENT_HOLD_ON_CHANGE"))
1152
1155
  return "PAYMENT_HOLD_ON_CHANGE";
1153
- if ((_s = account.holdReasons) === null || _s === void 0 ? void 0 : _s.includes("BENEFICIARY_NAME_INVALID"))
1156
+ if ((_t = account.holdReasons) === null || _t === void 0 ? void 0 : _t.includes("BENEFICIARY_NAME_INVALID"))
1154
1157
  return "BENEFICIARY_NAME_INVALID";
1155
- if ((_t = account.holdReasons) === null || _t === void 0 ? void 0 : _t.includes("BENEFICIARY_NAME_MISMATCH"))
1158
+ if ((_u = account.holdReasons) === null || _u === void 0 ? void 0 : _u.includes("BENEFICIARY_NAME_MISMATCH"))
1156
1159
  return "BENEFICIARY_NAME_MISMATCH";
1157
- if ((_u = account.holdReasons) === null || _u === void 0 ? void 0 : _u.includes("BANK_TAX_NAME_MISMATCH"))
1160
+ if ((_v = account.holdReasons) === null || _v === void 0 ? void 0 : _v.includes("BANK_TAX_NAME_MISMATCH"))
1158
1161
  return "BANK_TAX_NAME_MISMATCH";
1159
- if ((_v = account.holdReasons) === null || _v === void 0 ? void 0 : _v.includes("WITHDRAWAL_SETTINGS_INVALID"))
1162
+ if ((_w = account.holdReasons) === null || _w === void 0 ? void 0 : _w.includes("WITHDRAWAL_SETTINGS_INVALID"))
1160
1163
  return "WITHDRAWAL_SETTINGS_INVALID";
1161
- if ((_w = account.holdReasons) === null || _w === void 0 ? void 0 : _w.includes("PAYMENT_RETURNED"))
1164
+ if ((_x = account.holdReasons) === null || _x === void 0 ? void 0 : _x.includes("PAYMENT_RETURNED"))
1162
1165
  return "PAYMENT_RETURNED";
1163
1166
  if (account.hold)
1164
1167
  return "HOLD";
@@ -40,7 +40,7 @@ const GET_TAX_SETTING = gql `
40
40
  }
41
41
  `;
42
42
  export function getStatus(data) {
43
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w;
43
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x;
44
44
  const account = (_b = (_a = data.user.impactConnection) === null || _a === void 0 ? void 0 : _a.publisher) === null || _b === void 0 ? void 0 : _b.payoutsAccount;
45
45
  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) => reward.statuses.includes("REDEEMED") &&
46
46
  reward.partnerFundsTransfer.status === "TRANSFERRED");
@@ -57,19 +57,22 @@ export function getStatus(data) {
57
57
  return "VERIFICATION:REVIEW";
58
58
  if ((_p = account.holdReasons) === null || _p === void 0 ? void 0 : _p.includes("IDV_CHECK_FAILED_INTERNAL"))
59
59
  return "VERIFICATION:FAILED";
60
+ // only show banner for NEW_PAYEE_REVIEW if a PFT was created
60
61
  if (((_q = account.holdReasons) === null || _q === void 0 ? void 0 : _q.includes("NEW_PAYEE_REVIEW")) && hasTransferredReward)
61
62
  return "NEW_PAYEE_REVIEW";
62
- if ((_r = account.holdReasons) === null || _r === void 0 ? void 0 : _r.includes("PAYMENT_HOLD_ON_CHANGE"))
63
+ if ((_r = account.holdReasons) === null || _r === void 0 ? void 0 : _r.includes("NEW_PAYEE_REVIEW"))
64
+ return "DONE";
65
+ if ((_s = account.holdReasons) === null || _s === void 0 ? void 0 : _s.includes("PAYMENT_HOLD_ON_CHANGE"))
63
66
  return "PAYMENT_HOLD_ON_CHANGE";
64
- if ((_s = account.holdReasons) === null || _s === void 0 ? void 0 : _s.includes("BENEFICIARY_NAME_INVALID"))
67
+ if ((_t = account.holdReasons) === null || _t === void 0 ? void 0 : _t.includes("BENEFICIARY_NAME_INVALID"))
65
68
  return "BENEFICIARY_NAME_INVALID";
66
- if ((_t = account.holdReasons) === null || _t === void 0 ? void 0 : _t.includes("BENEFICIARY_NAME_MISMATCH"))
69
+ if ((_u = account.holdReasons) === null || _u === void 0 ? void 0 : _u.includes("BENEFICIARY_NAME_MISMATCH"))
67
70
  return "BENEFICIARY_NAME_MISMATCH";
68
- if ((_u = account.holdReasons) === null || _u === void 0 ? void 0 : _u.includes("BANK_TAX_NAME_MISMATCH"))
71
+ if ((_v = account.holdReasons) === null || _v === void 0 ? void 0 : _v.includes("BANK_TAX_NAME_MISMATCH"))
69
72
  return "BANK_TAX_NAME_MISMATCH";
70
- if ((_v = account.holdReasons) === null || _v === void 0 ? void 0 : _v.includes("WITHDRAWAL_SETTINGS_INVALID"))
73
+ if ((_w = account.holdReasons) === null || _w === void 0 ? void 0 : _w.includes("WITHDRAWAL_SETTINGS_INVALID"))
71
74
  return "WITHDRAWAL_SETTINGS_INVALID";
72
- if ((_w = account.holdReasons) === null || _w === void 0 ? void 0 : _w.includes("PAYMENT_RETURNED"))
75
+ if ((_x = account.holdReasons) === null || _x === void 0 ? void 0 : _x.includes("PAYMENT_RETURNED"))
73
76
  return "PAYMENT_RETURNED";
74
77
  if (account.hold)
75
78
  return "HOLD";
@@ -15,7 +15,7 @@ import { g as generateUserError } from './useReferralTable-909ccb28.js';
15
15
  import { a as INDIRECT_TAX_SPAIN_REGIONS, b as INDIRECT_TAX_PROVINCES, O as OtherRegionSlotView, I as InvoiceTableView, v as vatLabels, A as ADDRESS_REGIONS } from './IndirectTaxDetailsView-0a57b622.js';
16
16
  import { t as taxTypeToName, v as validTaxDocument, g as getCountryObj, L as LoadingView, f as formatErrorMessage, a as validateBillingField, o as objectIsFull } from './utils-6122971b.js';
17
17
  import { b as VERIFICATION_EVENT_KEY } from './keys-406491dc.js';
18
- import { i as FORM_STEPS, a as TAX_FORM_CONTEXT_NAMESPACE, S as SORTED_COUNTRIES_NAMESPACE, c as USER_QUERY_NAMESPACE, T as TAX_CONTEXT_NAMESPACE, F as FINANCE_NETWORK_SETTINGS_NAMESPACE, j as TAX_FORM_UPDATED_EVENT_KEY, U as USER_FORM_CONTEXT_NAMESPACE, d as COUNTRIES_QUERY_NAMESPACE, k as useVeriffApp, l as getStatus, V as VERIFF_COMPLETE_EVENT_KEY, C as CURRENCIES_NAMESPACE } from './usePayoutStatus-c515b24b.js';
18
+ import { i as FORM_STEPS, a as TAX_FORM_CONTEXT_NAMESPACE, S as SORTED_COUNTRIES_NAMESPACE, c as USER_QUERY_NAMESPACE, T as TAX_CONTEXT_NAMESPACE, F as FINANCE_NETWORK_SETTINGS_NAMESPACE, j as TAX_FORM_UPDATED_EVENT_KEY, U as USER_FORM_CONTEXT_NAMESPACE, d as COUNTRIES_QUERY_NAMESPACE, k as useVeriffApp, l as getStatus, V as VERIFF_COMPLETE_EVENT_KEY, C as CURRENCIES_NAMESPACE } from './usePayoutStatus-e0ef2374.js';
19
19
 
20
20
  function getFormMap({ props, getValidationErrorMessage, bankCountry, }) {
21
21
  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;
@@ -27,7 +27,7 @@ import { u as useDemoBigStat, W as useBigStat, B as BigStatView, C as CardFeedVi
27
27
  import './sqm-portal-container-view-176e92e3.js';
28
28
  import { g as getCountryObj, L as LoadingView } from './utils-6122971b.js';
29
29
  import { p as parseStates, e as extractProps } from './extractProps-54064fb0.js';
30
- import { u as usePayoutStatus, 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, f as GET_FINANCE_NETWORK_SETTINGS, g as CURRENCIES_QUERY_NAMESPACE, h as GET_CURRENCIES } from './usePayoutStatus-c515b24b.js';
30
+ import { u as usePayoutStatus, 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, f as GET_FINANCE_NETWORK_SETTINGS, g as CURRENCIES_QUERY_NAMESPACE, h as GET_CURRENCIES } from './usePayoutStatus-e0ef2374.js';
31
31
 
32
32
  /**
33
33
  *
@@ -1127,7 +1127,7 @@ const GET_TAX_SETTING = dist.gql `
1127
1127
  }
1128
1128
  `;
1129
1129
  function getStatus(data) {
1130
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w;
1130
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x;
1131
1131
  const account = (_b = (_a = data.user.impactConnection) === null || _a === void 0 ? void 0 : _a.publisher) === null || _b === void 0 ? void 0 : _b.payoutsAccount;
1132
1132
  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) => reward.statuses.includes("REDEEMED") &&
1133
1133
  reward.partnerFundsTransfer.status === "TRANSFERRED");
@@ -1144,19 +1144,22 @@ function getStatus(data) {
1144
1144
  return "VERIFICATION:REVIEW";
1145
1145
  if ((_p = account.holdReasons) === null || _p === void 0 ? void 0 : _p.includes("IDV_CHECK_FAILED_INTERNAL"))
1146
1146
  return "VERIFICATION:FAILED";
1147
+ // only show banner for NEW_PAYEE_REVIEW if a PFT was created
1147
1148
  if (((_q = account.holdReasons) === null || _q === void 0 ? void 0 : _q.includes("NEW_PAYEE_REVIEW")) && hasTransferredReward)
1148
1149
  return "NEW_PAYEE_REVIEW";
1149
- if ((_r = account.holdReasons) === null || _r === void 0 ? void 0 : _r.includes("PAYMENT_HOLD_ON_CHANGE"))
1150
+ if ((_r = account.holdReasons) === null || _r === void 0 ? void 0 : _r.includes("NEW_PAYEE_REVIEW"))
1151
+ return "DONE";
1152
+ if ((_s = account.holdReasons) === null || _s === void 0 ? void 0 : _s.includes("PAYMENT_HOLD_ON_CHANGE"))
1150
1153
  return "PAYMENT_HOLD_ON_CHANGE";
1151
- if ((_s = account.holdReasons) === null || _s === void 0 ? void 0 : _s.includes("BENEFICIARY_NAME_INVALID"))
1154
+ if ((_t = account.holdReasons) === null || _t === void 0 ? void 0 : _t.includes("BENEFICIARY_NAME_INVALID"))
1152
1155
  return "BENEFICIARY_NAME_INVALID";
1153
- if ((_t = account.holdReasons) === null || _t === void 0 ? void 0 : _t.includes("BENEFICIARY_NAME_MISMATCH"))
1156
+ if ((_u = account.holdReasons) === null || _u === void 0 ? void 0 : _u.includes("BENEFICIARY_NAME_MISMATCH"))
1154
1157
  return "BENEFICIARY_NAME_MISMATCH";
1155
- if ((_u = account.holdReasons) === null || _u === void 0 ? void 0 : _u.includes("BANK_TAX_NAME_MISMATCH"))
1158
+ if ((_v = account.holdReasons) === null || _v === void 0 ? void 0 : _v.includes("BANK_TAX_NAME_MISMATCH"))
1156
1159
  return "BANK_TAX_NAME_MISMATCH";
1157
- if ((_v = account.holdReasons) === null || _v === void 0 ? void 0 : _v.includes("WITHDRAWAL_SETTINGS_INVALID"))
1160
+ if ((_w = account.holdReasons) === null || _w === void 0 ? void 0 : _w.includes("WITHDRAWAL_SETTINGS_INVALID"))
1158
1161
  return "WITHDRAWAL_SETTINGS_INVALID";
1159
- if ((_w = account.holdReasons) === null || _w === void 0 ? void 0 : _w.includes("PAYMENT_RETURNED"))
1162
+ if ((_x = account.holdReasons) === null || _x === void 0 ? void 0 : _x.includes("PAYMENT_RETURNED"))
1160
1163
  return "PAYMENT_RETURNED";
1161
1164
  if (account.hold)
1162
1165
  return "HOLD";