@tesouro/embedded-components-react 0.4.15 → 0.4.16

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 (120) hide show
  1. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index.js +5 -4
  2. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index14.js +47 -21
  3. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index15.js +20 -77
  4. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index16.js +75 -24
  5. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index17.js +36 -0
  6. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index11.js +1 -1
  7. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index14.js +1 -1
  8. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index23.js +2 -2
  9. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index25.js +2 -2
  10. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index39.js +64 -48
  11. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index43.js +10 -2
  12. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index44.js +1 -1
  13. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index46.js +141 -118
  14. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index47.js +93 -93
  15. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index48.js +83 -67
  16. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index56.js +235 -218
  17. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index58.js +1 -1
  18. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index59.js +5 -5
  19. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index6.js +9 -6
  20. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index66.js +1 -1
  21. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index68.js +1 -1
  22. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index72.js +1 -1
  23. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index76.js +17 -17
  24. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index77.js +1 -1
  25. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index78.js +1 -1
  26. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index81.js +2 -2
  27. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index9.js +1 -1
  28. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index.js +39 -39
  29. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index100.js +2 -10
  30. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index101.js +8 -50
  31. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index102.js +52 -2
  32. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index103.js +2 -0
  33. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index25.js +26 -49
  34. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index26.js +19 -306
  35. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index27.js +154 -2
  36. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index28.js +2 -9
  37. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index29.js +60 -45
  38. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index30.js +251 -1
  39. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index31.js +2 -18
  40. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index32.js +7 -48
  41. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index33.js +49 -2
  42. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index34.js +2 -23
  43. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index35.js +15 -337
  44. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index36.js +50 -2
  45. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index37.js +2 -16
  46. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index38.js +21 -118
  47. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index39.js +340 -2
  48. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index40.js +2 -12
  49. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index41.js +10 -97
  50. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index42.js +99 -2
  51. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index43.js +1 -12
  52. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index44.js +11 -57
  53. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index45.js +58 -1
  54. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index46.js +1 -54
  55. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index47.js +52 -10
  56. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index48.js +10 -179
  57. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index49.js +181 -1
  58. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index50.js +2 -4
  59. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index51.js +2 -39
  60. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index52.js +41 -2
  61. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index53.js +2 -7
  62. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index54.js +5 -90
  63. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index55.js +92 -2
  64. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index56.js +2 -4
  65. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index57.js +2 -14
  66. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index58.js +16 -2
  67. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index59.js +1 -87
  68. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index60.js +83 -291
  69. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index61.js +292 -9
  70. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index62.js +13 -1
  71. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index63.js +1 -8
  72. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index64.js +6 -37
  73. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index65.js +39 -2
  74. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index66.js +2 -39
  75. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index67.js +36 -9
  76. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index68.js +10 -199
  77. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index69.js +201 -3
  78. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index70.js +3 -17
  79. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index71.js +15 -345
  80. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index72.js +345 -8
  81. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index73.js +6 -4
  82. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index74.js +6 -91
  83. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index75.js +93 -0
  84. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index77.js +2 -127
  85. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index78.js +124 -25
  86. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index79.js +26 -87
  87. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index80.js +89 -2
  88. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index81.js +2 -7
  89. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index82.js +5 -28
  90. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index83.js +30 -2
  91. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index84.js +2 -7
  92. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index85.js +5 -32
  93. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index86.js +34 -2
  94. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index87.js +2 -12
  95. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index88.js +10 -104
  96. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index89.js +105 -1
  97. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index90.js +2 -17
  98. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index91.js +15 -123
  99. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index92.js +125 -2
  100. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index93.js +2 -18
  101. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index94.js +14 -6
  102. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index95.js +7 -167
  103. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index96.js +170 -2
  104. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index97.js +2 -14
  105. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index98.js +11 -105
  106. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index99.js +108 -2
  107. package/dist/libs/tesouro-embedded-components-react/counterparts-widget/feature/dist/index4.js +8 -8
  108. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index9.js +4 -4
  109. package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/data-access/dist/index.js +5 -5
  110. package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/feature/dist/index.js +19 -19
  111. package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/feature/dist/lib/helpers.js +39 -33
  112. package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/feature/dist/lib/subEntityForms.js +15 -15
  113. package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/feature/dist/lib/useAddressForm.js +9 -9
  114. package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/feature/dist/lib/useCounterpartDetails.js +7 -7
  115. package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/feature/dist/lib/useCounterpartForm.js +37 -37
  116. package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/feature/dist/lib/useCounterpartSelector.js +15 -15
  117. package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/feature/dist/lib/usePayableAchInstructions.js +7 -7
  118. package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/analytics/build-info.js +1 -1
  119. package/package.json +1 -1
  120. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index76.js +0 -2
@@ -1,7 +1,7 @@
1
- import "./index2.js";
2
- import { useCounterpartQuery as e, useCounterpartsQuery as t, useCreateCounterpartMutation as n, useDeleteCounterpartMutation as r, useUpdateCounterpartMutation as i } from "./index3.js";
1
+ import { counterpartBankAccountsInvalidationKey as e } from "./index2.js";
2
+ import { useCounterpartQuery as t, useCounterpartsQuery as n, useCreateCounterpartMutation as r, useDeleteCounterpartMutation as i, useUpdateCounterpartMutation as a } from "./index3.js";
3
3
  import "./index4.js";
4
- import { useCounterpartBankAccountsQuery as a, useCreateCounterpartBankAccountMutation as o, useDeleteCounterpartBankAccountMutation as s, useMakeCounterpartBankAccountDefaultMutation as c, useUpdateCounterpartBankAccountMutation as l } from "./index5.js";
4
+ import { useCounterpartBankAccountsQuery as o, useCreateCounterpartBankAccountMutation as s, useDeleteCounterpartBankAccountMutation as c, useMakeCounterpartBankAccountDefaultMutation as l, useUpdateCounterpartBankAccountMutation as u } from "./index5.js";
5
5
  import "./index6.js";
6
- import { useCounterpartAddressesForRowsQuery as u, useCounterpartAddressesQuery as d, useCreateCounterpartAddressMutation as f, useUpdateCounterpartAddressMutation as p } from "./index7.js";
7
- export { u as useCounterpartAddressesForRowsQuery, d as useCounterpartAddressesQuery, a as useCounterpartBankAccountsQuery, e as useCounterpartQuery, t as useCounterpartsQuery, f as useCreateCounterpartAddressMutation, o as useCreateCounterpartBankAccountMutation, n as useCreateCounterpartMutation, s as useDeleteCounterpartBankAccountMutation, r as useDeleteCounterpartMutation, c as useMakeCounterpartBankAccountDefaultMutation, p as useUpdateCounterpartAddressMutation, l as useUpdateCounterpartBankAccountMutation, i as useUpdateCounterpartMutation };
6
+ import { useCounterpartAddressesForRowsQuery as d, useCounterpartAddressesQuery as f, useCreateCounterpartAddressMutation as p, useUpdateCounterpartAddressMutation as m } from "./index7.js";
7
+ export { e as counterpartBankAccountsInvalidationKey, d as useCounterpartAddressesForRowsQuery, f as useCounterpartAddressesQuery, o as useCounterpartBankAccountsQuery, t as useCounterpartQuery, n as useCounterpartsQuery, p as useCreateCounterpartAddressMutation, s as useCreateCounterpartBankAccountMutation, r as useCreateCounterpartMutation, c as useDeleteCounterpartBankAccountMutation, i as useDeleteCounterpartMutation, l as useMakeCounterpartBankAccountDefaultMutation, m as useUpdateCounterpartAddressMutation, u as useUpdateCounterpartBankAccountMutation, a as useUpdateCounterpartMutation };
@@ -1,23 +1,23 @@
1
1
  import "../../../util/dist/lib/apiErrors.js";
2
- import { AchFieldGroup as e } from "../../ui/dist/index5.js";
3
- import { CounterpartFormFields as t, CounterpartFormSheet as n, useFocusFirstInvalidField as r } from "../../ui/dist/index9.js";
4
- import { BankAccountFormSheet as i } from "../../ui/dist/index11.js";
5
- import { AddressFormSheet as a } from "../../ui/dist/index13.js";
6
- import { ConfirmDeleteDialog as o } from "../../ui/dist/index14.js";
7
- import "../../ui/dist/index.js";
8
- import { COUNTERPART_MESSAGE_LABELS_EN as s } from "./lib/labels.js";
9
- import { buildAnalyticsMap as c, buildCounterpartRows as l, counterpartFormBankAccountToCreatePayload as u, counterpartFormBankAccountToUpdatePayload as d, formatCounterpartDate as f, formatMoney as p, getAchInstructions as m, getCounterpartEmail as h, getCounterpartName as g, getPayableAchInstructions as _, hasAchFormValues as v, hasSelectedText as y, resolveCounterpartBankAccountWrite as b, validateAchFormValues as x } from "./lib/helpers.js";
10
- import { useCounterpartsQuery as S } from "../../data-access/dist/index3.js";
11
- import { useCounterpartBankAccountsQuery as C, useCreateCounterpartBankAccountMutation as w, useUpdateCounterpartBankAccountMutation as T } from "../../data-access/dist/index5.js";
12
- import { useCounterpartAddressesForRowsQuery as E, useCounterpartAddressesQuery as D } from "../../data-access/dist/index7.js";
2
+ import { useCounterpartsQuery as e } from "../../data-access/dist/index3.js";
3
+ import { useCounterpartBankAccountsQuery as t, useCreateCounterpartBankAccountMutation as n, useUpdateCounterpartBankAccountMutation as r } from "../../data-access/dist/index5.js";
4
+ import { useCounterpartAddressesForRowsQuery as i, useCounterpartAddressesQuery as a } from "../../data-access/dist/index7.js";
13
5
  import "../../data-access/dist/index.js";
14
- import { useAddressForm as O } from "./lib/useAddressForm.js";
15
- import { useCounterpartDetails as k } from "./lib/useCounterpartDetails.js";
16
- import { usePayableAchInstructions as A } from "./lib/usePayableAchInstructions.js";
17
- import { useCounterpartForm as j } from "./lib/useCounterpartForm.js";
6
+ import { AchFieldGroup as o } from "../../ui/dist/index5.js";
7
+ import { CounterpartFormFields as s, CounterpartFormSheet as c, useFocusFirstInvalidField as l } from "../../ui/dist/index9.js";
8
+ import { BankAccountFormSheet as u } from "../../ui/dist/index11.js";
9
+ import { AddressFormSheet as d } from "../../ui/dist/index13.js";
10
+ import { ConfirmDeleteDialog as f } from "../../ui/dist/index14.js";
11
+ import "../../ui/dist/index.js";
12
+ import { COUNTERPART_MESSAGE_LABELS_EN as p } from "./lib/labels.js";
13
+ import { buildAnalyticsMap as m, buildCounterpartRows as h, counterpartFormBankAccountToCreatePayload as g, counterpartFormBankAccountToUpdatePayload as _, formatCounterpartDate as v, formatMoney as y, getAchInstructions as b, getCounterpartEmail as x, getCounterpartName as S, getPayableAchInstructions as C, hasAchFormValues as w, hasSelectedText as T, isAchCompatibleBankAccount as E, resolveCounterpartBankAccountWrite as D, validateAchFormValues as O } from "./lib/helpers.js";
14
+ import { useAddressForm as k } from "./lib/useAddressForm.js";
15
+ import { useCounterpartDetails as A } from "./lib/useCounterpartDetails.js";
16
+ import { usePayableAchInstructions as j } from "./lib/usePayableAchInstructions.js";
17
+ import { useCounterpartForm as M } from "./lib/useCounterpartForm.js";
18
18
  import "./lib/useCounterpartSelector.js";
19
- import { CounterpartSelector as M } from "./lib/CounterpartSelector.js";
20
- import { useDeleteController as N } from "./lib/useDeleteController.js";
19
+ import { CounterpartSelector as N } from "./lib/CounterpartSelector.js";
20
+ import { useDeleteController as P } from "./lib/useDeleteController.js";
21
21
  import "./lib/useSubEntityForm.js";
22
- import { useBankAccountForm as P } from "./lib/subEntityForms.js";
23
- export { e as AchFieldGroup, a as AddressFormSheet, i as BankAccountFormSheet, s as COUNTERPART_MESSAGE_LABELS_EN, o as ConfirmDeleteDialog, t as CounterpartFormFields, n as CounterpartFormSheet, M as CounterpartSelector, c as buildAnalyticsMap, l as buildCounterpartRows, u as counterpartFormBankAccountToCreatePayload, d as counterpartFormBankAccountToUpdatePayload, f as formatCounterpartDate, p as formatMoney, m as getAchInstructions, h as getCounterpartEmail, g as getCounterpartName, _ as getPayableAchInstructions, v as hasAchFormValues, y as hasSelectedText, b as resolveCounterpartBankAccountWrite, O as useAddressForm, P as useBankAccountForm, E as useCounterpartAddressesForRowsQuery, D as useCounterpartAddressesQuery, C as useCounterpartBankAccountsQuery, k as useCounterpartDetails, j as useCounterpartForm, S as useCounterpartsQuery, w as useCreateCounterpartBankAccountMutation, N as useDeleteController, r as useFocusFirstInvalidField, A as usePayableAchInstructions, T as useUpdateCounterpartBankAccountMutation, x as validateAchFormValues };
22
+ import { useBankAccountForm as F } from "./lib/subEntityForms.js";
23
+ export { o as AchFieldGroup, d as AddressFormSheet, u as BankAccountFormSheet, p as COUNTERPART_MESSAGE_LABELS_EN, f as ConfirmDeleteDialog, s as CounterpartFormFields, c as CounterpartFormSheet, N as CounterpartSelector, m as buildAnalyticsMap, h as buildCounterpartRows, g as counterpartFormBankAccountToCreatePayload, _ as counterpartFormBankAccountToUpdatePayload, v as formatCounterpartDate, y as formatMoney, b as getAchInstructions, x as getCounterpartEmail, S as getCounterpartName, C as getPayableAchInstructions, w as hasAchFormValues, T as hasSelectedText, E as isAchCompatibleBankAccount, D as resolveCounterpartBankAccountWrite, k as useAddressForm, F as useBankAccountForm, i as useCounterpartAddressesForRowsQuery, a as useCounterpartAddressesQuery, t as useCounterpartBankAccountsQuery, A as useCounterpartDetails, M as useCounterpartForm, e as useCounterpartsQuery, n as useCreateCounterpartBankAccountMutation, P as useDeleteController, l as useFocusFirstInvalidField, j as usePayableAchInstructions, r as useUpdateCounterpartBankAccountMutation, O as validateAchFormValues };
@@ -129,8 +129,8 @@ function b(e) {
129
129
  let t = (e ?? []).filter((e) => e.currency === "USD" && (!!e.routing_number || !!e.account_number));
130
130
  return t.find((e) => e.is_default_for_currency) ?? t[0];
131
131
  }
132
- function x(e, t = "USD") {
133
- return (e ?? []).find((e) => e.currency === t && e.is_default_for_currency && !!e.account_holder_name && !!e.routing_number && !!e.account_number);
132
+ function x(e, t = "USD", n) {
133
+ return n && (e ?? []).find((e) => e.id === n && R(e)) || (e ?? []).find((e) => e.currency === t && e.is_default_for_currency && !!e.account_holder_name && !!e.routing_number && !!e.account_number);
134
134
  }
135
135
  function S(e, t = {}) {
136
136
  let n = e.line2.trim();
@@ -297,12 +297,18 @@ function L(e) {
297
297
  e.bic
298
298
  ].every((e) => !e);
299
299
  }
300
- function R(e, t) {
301
- if (t) return {
302
- kind: "update",
303
- bankAccountId: t,
304
- includeAchDefaults: !1
305
- };
300
+ function R(e) {
301
+ return !!(L(e) || e.currency === "USD" && (e.routing_number || e.account_number));
302
+ }
303
+ function z(e, t) {
304
+ if (t) {
305
+ let n = e?.find((e) => e.id === t);
306
+ return {
307
+ kind: "update",
308
+ bankAccountId: t,
309
+ includeAchDefaults: n ? L(n) : !1
310
+ };
311
+ }
306
312
  let n = e?.find(L);
307
313
  return n ? {
308
314
  kind: "update",
@@ -313,7 +319,7 @@ function R(e, t) {
313
319
  isDefaultForCurrency: !(e ?? []).some((e) => e.currency === "USD" && e.is_default_for_currency)
314
320
  };
315
321
  }
316
- function z() {
322
+ function B() {
317
323
  return {
318
324
  name: "",
319
325
  accountHolderName: "",
@@ -326,7 +332,7 @@ function z() {
326
332
  isDefault: !1
327
333
  };
328
334
  }
329
- function B(e) {
335
+ function V(e) {
330
336
  return {
331
337
  name: e.name ?? "",
332
338
  accountHolderName: e.account_holder_name ?? "",
@@ -339,7 +345,7 @@ function B(e) {
339
345
  isDefault: e.is_default_for_currency ?? !1
340
346
  };
341
347
  }
342
- function V(e) {
348
+ function H(e) {
343
349
  return {
344
350
  name: e.name.trim() || void 0,
345
351
  account_holder_name: e.accountHolderName.trim() || void 0,
@@ -353,7 +359,7 @@ function V(e) {
353
359
  is_default_for_currency: e.isDefault
354
360
  };
355
361
  }
356
- function H(e) {
362
+ function U(e) {
357
363
  return {
358
364
  name: e.name.trim(),
359
365
  account_holder_name: e.accountHolderName.trim(),
@@ -366,54 +372,54 @@ function H(e) {
366
372
  country: "US"
367
373
  };
368
374
  }
369
- function U(e) {
375
+ function W(e) {
370
376
  return /^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(e);
371
377
  }
372
- function W(e, t) {
378
+ function G(e, t) {
373
379
  let n = {};
374
380
  return e.line1.trim().length === 0 && (n.line1 = t.addressLine1Required), e.city.trim().length === 0 && (n.city = t.cityRequired), e.state.trim().length === 0 && (n.state = t.stateRequired), e.postalCode.trim().length === 0 && (n.postalCode = t.postalCodeRequired), n;
375
381
  }
376
- function G(e) {
382
+ function K(e) {
377
383
  return Object.values(e).some(Boolean);
378
384
  }
379
- function K(e) {
385
+ function q(e) {
380
386
  if (!/^\d{9}$/.test(e)) return !1;
381
387
  let t = [...e].map(Number);
382
388
  return (3 * (t[0] + t[3] + t[6]) + 7 * (t[1] + t[4] + t[7]) + (t[2] + t[5] + t[8])) % 10 == 0;
383
389
  }
384
- function q(e, t = n) {
390
+ function J(e, t = n) {
385
391
  let r = {}, i = e.accountHolderName.trim(), a = e.routingNumber.trim(), o = e.accountNumber.trim();
386
- return i.length === 0 && (r.accountHolderName = t.accountHolderNameRequired), (a.length === 0 || !K(a)) && (r.routingNumber = t.routingNumberInvalid), (o.length === 0 || !/^\d{9,12}$/.test(o)) && (r.accountNumber = t.accountNumberInvalid), r;
392
+ return i.length === 0 && (r.accountHolderName = t.accountHolderNameRequired), (a.length === 0 || !q(a)) && (r.routingNumber = t.routingNumberInvalid), (o.length === 0 || !/^\d{9,12}$/.test(o)) && (r.accountNumber = t.accountNumberInvalid), r;
387
393
  }
388
- function J(e, t, r = n, i = "customer", a = !1) {
394
+ function Y(e, t, r = n, i = "customer", a = !1) {
389
395
  let o = {};
390
- if (e.entityType === "organization" ? e.legalName.trim().length === 0 && (o.legalName = r.legalNameRequired) : (e.firstName.trim().length === 0 && (o.firstName = r.firstNameRequired), e.lastName.trim().length === 0 && (o.lastName = r.lastNameRequired)), e.email.trim().length === 0 ? o.email = r.emailRequired : U(e.email.trim()) || (o.email = r.emailInvalid), t === "create" && i === "vendor" || O(e.address)) {
391
- let t = W(e.address, r);
392
- G(t) && (o.address = t);
396
+ if (e.entityType === "organization" ? e.legalName.trim().length === 0 && (o.legalName = r.legalNameRequired) : (e.firstName.trim().length === 0 && (o.firstName = r.firstNameRequired), e.lastName.trim().length === 0 && (o.lastName = r.lastNameRequired)), e.email.trim().length === 0 ? o.email = r.emailRequired : W(e.email.trim()) || (o.email = r.emailInvalid), t === "create" && i === "vendor" || O(e.address)) {
397
+ let t = G(e.address, r);
398
+ K(t) && (o.address = t);
393
399
  }
394
400
  if (i === "vendor" && (a || P(e))) {
395
- let t = q(e.bankAccount, r);
396
- G(t) && (o.bankAccount = t);
401
+ let t = J(e.bankAccount, r);
402
+ K(t) && (o.bankAccount = t);
397
403
  }
398
404
  return o;
399
405
  }
400
- function Y(e) {
406
+ function X(e) {
401
407
  let { address: t, bankAccount: n, ...r } = e;
402
- return G(r) || (t ? G(t) : !1) || (n ? G(n) : !1);
408
+ return K(r) || (t ? K(t) : !1) || (n ? K(n) : !1);
403
409
  }
404
- function X(e, t = n) {
410
+ function Z(e, t = n) {
405
411
  let r = {};
406
412
  return e.name.trim().length === 0 && (r.name = t.bankAccountNameRequired), e.accountNumber.trim().length === 0 && e.iban.trim().length === 0 && (r.accountNumber = t.bankAccountIdentifierRequired), e.currency.trim().length === 0 && (r.currency = t.bankAccountCurrencyRequired), r;
407
413
  }
408
- function Z(e) {
409
- return G(e);
414
+ function Q(e) {
415
+ return K(e);
410
416
  }
411
- function Q(e, t = n) {
412
- return W(e, t);
417
+ function $(e, t = n) {
418
+ return G(e, t);
413
419
  }
414
- function $() {
420
+ function ee() {
415
421
  let e = globalThis.getSelection?.();
416
422
  return !!(e && e.toString().length > 0);
417
423
  }
418
424
  //#endregion
419
- export { w as addressFormToCreatePayload, T as addressFormToUpdatePayload, C as addressResponseToFormValues, V as bankAccountFormToCreatePayload, H as bankAccountFormToUpdatePayload, B as bankAccountToFormValues, p as buildAnalyticsMap, y as buildBankAccountItems, _ as buildCounterpartDetailsView, m as buildCounterpartRows, F as counterpartFormBankAccountToCreatePayload, I as counterpartFormBankAccountToUpdatePayload, A as counterpartFormToCreatePayload, j as counterpartFormToUpdatePayload, D as counterpartToFormValues, z as emptyBankAccountFormValues, E as emptyCounterpartFormValues, l as formatCounterpartDate, s as formatMoney, o as fromMinorUnits, b as getAchInstructions, d as getCounterpartEmail, u as getCounterpartName, i as getCurrencyOptions, x as getPayableAchInstructions, N as hasAchFormValues, Z as hasBankAccountFormErrors, M as hasCounterpartFormAddressValues, P as hasCounterpartFormBankAccountValues, Y as hasCounterpartFormErrors, $ as hasSelectedText, R as resolveCounterpartBankAccountWrite, q as validateAchFormValues, Q as validateAddressForm, X as validateBankAccountForm, J as validateCounterpartForm };
425
+ export { w as addressFormToCreatePayload, T as addressFormToUpdatePayload, C as addressResponseToFormValues, H as bankAccountFormToCreatePayload, U as bankAccountFormToUpdatePayload, V as bankAccountToFormValues, p as buildAnalyticsMap, y as buildBankAccountItems, _ as buildCounterpartDetailsView, m as buildCounterpartRows, F as counterpartFormBankAccountToCreatePayload, I as counterpartFormBankAccountToUpdatePayload, A as counterpartFormToCreatePayload, j as counterpartFormToUpdatePayload, D as counterpartToFormValues, B as emptyBankAccountFormValues, E as emptyCounterpartFormValues, l as formatCounterpartDate, s as formatMoney, o as fromMinorUnits, b as getAchInstructions, d as getCounterpartEmail, u as getCounterpartName, i as getCurrencyOptions, x as getPayableAchInstructions, N as hasAchFormValues, Q as hasBankAccountFormErrors, M as hasCounterpartFormAddressValues, P as hasCounterpartFormBankAccountValues, X as hasCounterpartFormErrors, ee as hasSelectedText, R as isAchCompatibleBankAccount, z as resolveCounterpartBankAccountWrite, J as validateAchFormValues, $ as validateAddressForm, Z as validateBankAccountForm, Y as validateCounterpartForm };
@@ -2,38 +2,38 @@
2
2
  "use client";
3
3
  "use client";
4
4
  "use client";
5
- import { bankAccountFormToCreatePayload as e, bankAccountFormToUpdatePayload as t, bankAccountToFormValues as n, emptyBankAccountFormValues as r, getCurrencyOptions as i, hasBankAccountFormErrors as a, validateBankAccountForm as o } from "./helpers.js";
6
- import { useCreateCounterpartBankAccountMutation as s, useMakeCounterpartBankAccountDefaultMutation as c, useUpdateCounterpartBankAccountMutation as l } from "../../../data-access/dist/index5.js";
5
+ import { useCreateCounterpartBankAccountMutation as e, useMakeCounterpartBankAccountDefaultMutation as t, useUpdateCounterpartBankAccountMutation as n } from "../../../data-access/dist/index5.js";
7
6
  import "../../../data-access/dist/index.js";
7
+ import { bankAccountFormToCreatePayload as r, bankAccountFormToUpdatePayload as i, bankAccountToFormValues as a, emptyBankAccountFormValues as o, getCurrencyOptions as s, hasBankAccountFormErrors as c, validateBankAccountForm as l } from "./helpers.js";
8
8
  import { useSubEntityForm as u } from "./useSubEntityForm.js";
9
9
  import { useMemo as d } from "react";
10
10
  //#region ../../libs/tesouro-embedded-components-react/shared/counterpart-management/feature/dist/lib/subEntityForms.js
11
11
  function f({ items: f, selectedId: p, messages: m }) {
12
- let h = s(), g = l(), _ = c(), v = u({
12
+ let h = e(), g = n(), _ = t(), v = u({
13
13
  items: f,
14
- empty: r,
15
- toFormValues: n,
16
- validate: (e) => o(e, m),
17
- hasErrors: a,
14
+ empty: o,
15
+ toFormValues: a,
16
+ validate: (e) => l(e, m),
17
+ hasErrors: c,
18
18
  genericError: m.genericError,
19
- onSubmit: async ({ mode: n, id: r, values: i, existing: a }) => {
19
+ onSubmit: async ({ mode: e, id: t, values: n, existing: a }) => {
20
20
  if (!p) return;
21
- let o = r;
22
- n === "edit" && r ? await g.mutateAsync({
21
+ let o = t;
22
+ e === "edit" && t ? await g.mutateAsync({
23
23
  path: {
24
24
  counterpart_id: p,
25
- bank_account_id: r
25
+ bank_account_id: t
26
26
  },
27
- body: t(i)
27
+ body: i(n)
28
28
  }) : o = (await h.mutateAsync({
29
29
  path: { counterpart_id: p },
30
- body: e(i)
31
- }))?.id, i.isDefault && !a?.is_default_for_currency && o && await _.mutateAsync({ path: {
30
+ body: r(n)
31
+ }))?.id, n.isDefault && !a?.is_default_for_currency && o && await _.mutateAsync({ path: {
32
32
  counterpart_id: p,
33
33
  bank_account_id: o
34
34
  } });
35
35
  }
36
- }), y = d(() => i(v.values.currency), [v.values.currency]);
36
+ }), y = d(() => s(v.values.currency), [v.values.currency]);
37
37
  return {
38
38
  form: v,
39
39
  inProgress: h.isPending || g.isPending || _.isPending,
@@ -3,20 +3,20 @@
3
3
  "use client";
4
4
  "use client";
5
5
  import { extractApiErrorMessage as e } from "../../../../util/dist/lib/apiErrors.js";
6
- import { addressFormToCreatePayload as t, addressFormToUpdatePayload as n, addressResponseToFormValues as r, validateAddressForm as i } from "./helpers.js";
7
- import { useCreateCounterpartAddressMutation as a, useUpdateCounterpartAddressMutation as o } from "../../../data-access/dist/index7.js";
6
+ import { useCreateCounterpartAddressMutation as t, useUpdateCounterpartAddressMutation as n } from "../../../data-access/dist/index7.js";
8
7
  import "../../../data-access/dist/index.js";
8
+ import { addressFormToCreatePayload as r, addressFormToUpdatePayload as i, addressResponseToFormValues as a, validateAddressForm as o } from "./helpers.js";
9
9
  import { useCallback as s, useState as c } from "react";
10
10
  //#region ../../libs/tesouro-embedded-components-react/shared/counterpart-management/feature/dist/lib/useAddressForm.js
11
11
  function l({ selectedId: l, primaryAddress: u, messages: d }) {
12
- let f = a(), p = o(), [m, h] = c(!1), [g, _] = c(() => ({
12
+ let f = t(), p = n(), [m, h] = c(!1), [g, _] = c(() => ({
13
13
  line1: "",
14
14
  line2: "",
15
15
  city: "",
16
16
  state: "",
17
17
  postalCode: ""
18
18
  })), [v, y] = c({}), [b, x] = c(), S = s(() => {
19
- u && (_(r(u)), y({}), x(void 0), h(!0));
19
+ u && (_(a(u)), y({}), x(void 0), h(!0));
20
20
  }, [u]), C = s(() => {
21
21
  _({
22
22
  line1: "",
@@ -27,9 +27,9 @@ function l({ selectedId: l, primaryAddress: u, messages: d }) {
27
27
  }), y({}), x(void 0), h(!0);
28
28
  }, []), w = s(() => h(!1), []), T = s(async () => {
29
29
  if (!l) return;
30
- let r = i(g, d);
31
- if (Object.values(r).some(Boolean)) {
32
- y(r);
30
+ let t = o(g, d);
31
+ if (Object.values(t).some(Boolean)) {
32
+ y(t);
33
33
  return;
34
34
  }
35
35
  y({});
@@ -39,10 +39,10 @@ function l({ selectedId: l, primaryAddress: u, messages: d }) {
39
39
  counterpart_id: l,
40
40
  address_id: u.id
41
41
  },
42
- body: n(g)
42
+ body: i(g)
43
43
  }) : await f.mutateAsync({
44
44
  path: { counterpart_id: l },
45
- body: t(g)
45
+ body: r(g)
46
46
  }), h(!1);
47
47
  } catch (t) {
48
48
  x(e(t) ?? d.genericError);
@@ -2,15 +2,15 @@
2
2
  "use client";
3
3
  "use client";
4
4
  "use client";
5
- import { buildBankAccountItems as e, buildCounterpartDetailsView as t } from "./helpers.js";
6
- import { useCounterpartQuery as n } from "../../../data-access/dist/index3.js";
7
- import { useCounterpartBankAccountsQuery as r } from "../../../data-access/dist/index5.js";
8
- import { useCounterpartAddressesQuery as i } from "../../../data-access/dist/index7.js";
5
+ import { useCounterpartQuery as e } from "../../../data-access/dist/index3.js";
6
+ import { useCounterpartBankAccountsQuery as t } from "../../../data-access/dist/index5.js";
7
+ import { useCounterpartAddressesQuery as n } from "../../../data-access/dist/index7.js";
9
8
  import "../../../data-access/dist/index.js";
9
+ import { buildBankAccountItems as r, buildCounterpartDetailsView as i } from "./helpers.js";
10
10
  import { useMemo as a } from "react";
11
11
  //#region ../../libs/tesouro-embedded-components-react/shared/counterpart-management/feature/dist/lib/useCounterpartDetails.js
12
12
  function o({ selectedId: o, enabled: s = !0 }) {
13
- let c = s ? o : void 0, l = n(c), u = l.data, d = u?.type === "organization", f = c ?? null, p = i(f), m = r(f), h = p.data?.data, g = a(() => {
13
+ let c = s ? o : void 0, l = e(c), u = l.data, d = u?.type === "organization", f = c ?? null, p = n(f), m = t(f), h = p.data?.data, g = a(() => {
14
14
  if (!(!h || h.length === 0)) {
15
15
  if (u?.default_billing_address_id) {
16
16
  let e = h.find((e) => e.id === u.default_billing_address_id);
@@ -18,10 +18,10 @@ function o({ selectedId: o, enabled: s = !0 }) {
18
18
  }
19
19
  return h[0];
20
20
  }
21
- }, [h, u?.default_billing_address_id]), _ = a(() => u ? t({
21
+ }, [h, u?.default_billing_address_id]), _ = a(() => u ? i({
22
22
  counterpart: u,
23
23
  primaryAddress: g
24
- }) : void 0, [u, g]), v = a(() => e(m.data?.data), [m.data]);
24
+ }) : void 0, [u, g]), v = a(() => r(m.data?.data), [m.data]);
25
25
  return {
26
26
  counterpart: u,
27
27
  isOrganization: d,
@@ -3,16 +3,16 @@
3
3
  "use client";
4
4
  "use client";
5
5
  import { extractApiErrorMessage as e } from "../../../../util/dist/lib/apiErrors.js";
6
- import { addressFormToCreatePayload as t, addressFormToUpdatePayload as n, addressResponseToFormValues as r, counterpartFormBankAccountToCreatePayload as i, counterpartFormBankAccountToUpdatePayload as a, counterpartFormToCreatePayload as o, counterpartFormToUpdatePayload as s, counterpartToFormValues as c, emptyCounterpartFormValues as l, getAchInstructions as u, hasCounterpartFormAddressValues as d, hasCounterpartFormBankAccountValues as f, hasCounterpartFormErrors as p, resolveCounterpartBankAccountWrite as m, validateCounterpartForm as h } from "./helpers.js";
7
- import { useCreateCounterpartMutation as g, useUpdateCounterpartMutation as _ } from "../../../data-access/dist/index3.js";
8
- import { useCreateCounterpartBankAccountMutation as v, useUpdateCounterpartBankAccountMutation as y } from "../../../data-access/dist/index5.js";
9
- import { useCreateCounterpartAddressMutation as b, useUpdateCounterpartAddressMutation as x } from "../../../data-access/dist/index7.js";
6
+ import { useCreateCounterpartMutation as t, useUpdateCounterpartMutation as n } from "../../../data-access/dist/index3.js";
7
+ import { useCreateCounterpartBankAccountMutation as r, useUpdateCounterpartBankAccountMutation as i } from "../../../data-access/dist/index5.js";
8
+ import { useCreateCounterpartAddressMutation as a, useUpdateCounterpartAddressMutation as o } from "../../../data-access/dist/index7.js";
10
9
  import "../../../data-access/dist/index.js";
10
+ import { addressFormToCreatePayload as s, addressFormToUpdatePayload as c, addressResponseToFormValues as l, counterpartFormBankAccountToCreatePayload as u, counterpartFormBankAccountToUpdatePayload as d, counterpartFormToCreatePayload as f, counterpartFormToUpdatePayload as p, counterpartToFormValues as m, emptyCounterpartFormValues as h, getAchInstructions as g, hasCounterpartFormAddressValues as _, hasCounterpartFormBankAccountValues as v, hasCounterpartFormErrors as y, resolveCounterpartBankAccountWrite as b, validateCounterpartForm as x } from "./helpers.js";
11
11
  import { useCallback as S, useState as C } from "react";
12
12
  //#region ../../libs/tesouro-embedded-components-react/shared/counterpart-management/feature/dist/lib/useCounterpartForm.js
13
13
  function w(e, t) {
14
- if (!t) return d(e);
15
- let n = r(t);
14
+ if (!t) return _(e);
15
+ let n = l(t);
16
16
  return e.address.line1.trim() !== n.line1.trim() || e.address.line2.trim() !== n.line2.trim() || e.address.city.trim() !== n.city.trim() || e.address.state.trim() !== n.state.trim() || e.address.postalCode.trim() !== n.postalCode.trim();
17
17
  }
18
18
  function T(e) {
@@ -23,28 +23,28 @@ function T(e) {
23
23
  };
24
24
  }
25
25
  function E(e, t) {
26
- if (!t) return f(e);
26
+ if (!t) return v(e);
27
27
  let n = T(t);
28
28
  return e.bankAccount.accountHolderName.trim() !== n.accountHolderName.trim() || e.bankAccount.routingNumber.trim() !== n.routingNumber.trim() || e.bankAccount.accountNumber.trim() !== n.accountNumber.trim();
29
29
  }
30
- function D({ view: r, setView: D, selectedId: O, setSelectedId: k, messages: A, counterpartType: j, counterpart: M, primaryAddress: N, bankAccounts: P, isBankAccountsLoading: F, isBankAccountsError: I }) {
31
- let L = g(), R = b(), z = v(), B = _(), V = x(), H = y(), [U, W] = C(() => l()), [G, K] = C({}), [q, J] = C({
30
+ function D({ view: l, setView: D, selectedId: O, setSelectedId: k, messages: A, counterpartType: j, counterpart: M, primaryAddress: N, bankAccounts: P, isBankAccountsLoading: F, isBankAccountsError: I }) {
31
+ let L = t(), R = a(), z = r(), B = n(), V = o(), H = i(), [U, W] = C(() => h()), [G, K] = C({}), [q, J] = C({
32
32
  address: !1,
33
33
  bankAccount: !1
34
34
  }), [Y, X] = C(), [Z, Q] = C(), $ = L.isPending || R.isPending || z.isPending || H.isPending || B.isPending || V.isPending, ee = S(() => {
35
35
  k(void 0), Q(void 0), X(void 0), J({
36
36
  address: j === "vendor",
37
37
  bankAccount: !1
38
- }), W(l("organization", j)), K({}), D("create");
38
+ }), W(h("organization", j)), K({}), D("create");
39
39
  }, [
40
40
  j,
41
41
  k,
42
42
  D
43
43
  ]), te = S(() => {
44
44
  if (!M || j === "vendor" && (F || I)) return;
45
- let e = u(P), t = c(M, N);
45
+ let e = g(P), t = m(M, N);
46
46
  Q(void 0), X(e?.id), J({
47
- address: d(t),
47
+ address: _(t),
48
48
  bankAccount: !1
49
49
  }), W({
50
50
  ...t,
@@ -77,11 +77,11 @@ function D({ view: r, setView: D, selectedId: O, setSelectedId: k, messages: A,
77
77
  openEdit: te,
78
78
  close: ne,
79
79
  submit: S(async () => {
80
- let c = r === "edit" ? "edit" : "create", l = h(U, c, A, j, c === "edit" && j === "vendor" && !!Y);
81
- if (p(l)) {
82
- K(l), J((e) => ({
83
- address: e.address || !!l.address,
84
- bankAccount: e.bankAccount || !!l.bankAccount
80
+ let t = l === "edit" ? "edit" : "create", n = x(U, t, A, j, t === "edit" && j === "vendor" && !!Y);
81
+ if (y(n)) {
82
+ K(n), J((e) => ({
83
+ address: e.address || !!n.address,
84
+ bankAccount: e.bankAccount || !!n.bankAccount
85
85
  }));
86
86
  return;
87
87
  }
@@ -89,44 +89,44 @@ function D({ view: r, setView: D, selectedId: O, setSelectedId: k, messages: A,
89
89
  address: !1,
90
90
  bankAccount: !1
91
91
  });
92
- let g = Z;
92
+ let r = Z;
93
93
  try {
94
- if (r === "edit" && O) {
94
+ if (l === "edit" && O) {
95
95
  Q(void 0), await B.mutateAsync({
96
96
  path: { counterpart_id: O },
97
- body: s(U, j)
97
+ body: p(U, j)
98
98
  });
99
99
  let e = N ? w(U, N) ? V.mutateAsync({
100
100
  path: {
101
101
  counterpart_id: O,
102
102
  address_id: N.id
103
103
  },
104
- body: n(U.address)
105
- }) : void 0 : d(U) ? R.mutateAsync({
104
+ body: c(U.address)
105
+ }) : void 0 : _(U) ? R.mutateAsync({
106
106
  path: { counterpart_id: O },
107
- body: t(U.address)
108
- }) : void 0, r = j === "vendor" && E(U, u(P)) ? m(P, Y) : void 0, o = r?.kind === "update" ? H.mutateAsync({
107
+ body: s(U.address)
108
+ }) : void 0, t = j === "vendor" && E(U, g(P)) ? b(P, Y) : void 0, n = t?.kind === "update" ? H.mutateAsync({
109
109
  path: {
110
110
  counterpart_id: O,
111
- bank_account_id: r.bankAccountId
111
+ bank_account_id: t.bankAccountId
112
112
  },
113
- body: a(U.bankAccount, { includeAchDefaults: r.includeAchDefaults })
114
- }) : r?.kind === "create" ? z.mutateAsync({
113
+ body: d(U.bankAccount, { includeAchDefaults: t.includeAchDefaults })
114
+ }) : t?.kind === "create" ? z.mutateAsync({
115
115
  path: { counterpart_id: O },
116
- body: i(U.bankAccount, { isDefaultForCurrency: r.isDefaultForCurrency })
117
- }) : void 0, [c, l] = await Promise.allSettled([e, o]);
118
- if (r?.kind === "create" && l.status === "fulfilled" && X(l.value?.id), c.status === "rejected") throw c.reason;
119
- if (l.status === "rejected") throw l.reason;
116
+ body: u(U.bankAccount, { isDefaultForCurrency: t.isDefaultForCurrency })
117
+ }) : void 0, [r, i] = await Promise.allSettled([e, n]);
118
+ if (t?.kind === "create" && i.status === "fulfilled" && X(i.value?.id), r.status === "rejected") throw r.reason;
119
+ if (i.status === "rejected") throw i.reason;
120
120
  D("none");
121
- } else g ||= (await L.mutateAsync({ body: o(U, j) }))?.id, g && j === "vendor" && f(U) && (Q(g), await z.mutateAsync({
122
- path: { counterpart_id: g },
123
- body: i(U.bankAccount)
124
- })), Q(void 0), D("none"), g && k(g);
121
+ } else r ||= (await L.mutateAsync({ body: f(U, j) }))?.id, r && j === "vendor" && v(U) && (Q(r), await z.mutateAsync({
122
+ path: { counterpart_id: r },
123
+ body: u(U.bankAccount)
124
+ })), Q(void 0), D("none"), r && k(r);
125
125
  } catch (t) {
126
- g && (Q(g), k(g)), K({ form: e(t) ?? A.genericError });
126
+ r && (Q(r), k(r)), K({ form: e(t) ?? A.genericError });
127
127
  }
128
128
  }, [
129
- r,
129
+ l,
130
130
  U,
131
131
  O,
132
132
  Z,
@@ -2,44 +2,44 @@
2
2
  "use client";
3
3
  "use client";
4
4
  "use client";
5
- import { COUNTERPART_TYPE_BADGE_LABELS_EN as e } from "../../../ui/dist/index2.js";
6
- import "../../../ui/dist/index.js";
7
- import { getCounterpartName as t } from "./helpers.js";
8
- import { useCounterpartsQuery as n } from "../../../data-access/dist/index3.js";
5
+ import { useCounterpartsQuery as e } from "../../../data-access/dist/index3.js";
9
6
  import "../../../data-access/dist/index.js";
7
+ import { COUNTERPART_TYPE_BADGE_LABELS_EN as t } from "../../../ui/dist/index2.js";
8
+ import "../../../ui/dist/index.js";
9
+ import { getCounterpartName as n } from "./helpers.js";
10
10
  import { useCallback as r, useEffect as i, useMemo as a, useState as o } from "react";
11
11
  //#region ../../libs/tesouro-embedded-components-react/shared/counterpart-management/feature/dist/lib/useCounterpartSelector.js
12
12
  var s = 25, c = 300;
13
- function l(n, r) {
13
+ function l(e, r) {
14
14
  let i = {
15
- ...e,
15
+ ...t,
16
16
  ...r
17
17
  };
18
- return (n ?? []).map((e) => ({
18
+ return (e ?? []).map((e) => ({
19
19
  value: e.id,
20
- label: t(e),
20
+ label: n(e),
21
21
  supportingLabel: e.type === "organization" ? i.organization : i.individual
22
22
  }));
23
23
  }
24
- function u({ value: e, onValueChange: t, mode: u = "customer", limit: d = s, debounceMs: f = c, typeLabels: p } = {}) {
25
- let [m, h] = o(e ?? ""), [g, _] = o(""), [v, y] = o("");
24
+ function u({ value: t, onValueChange: n, mode: u = "customer", limit: d = s, debounceMs: f = c, typeLabels: p } = {}) {
25
+ let [m, h] = o(t ?? ""), [g, _] = o(""), [v, y] = o("");
26
26
  i(() => {
27
- h(e ?? "");
28
- }, [e]), i(() => {
27
+ h(t ?? "");
28
+ }, [t]), i(() => {
29
29
  let e = setTimeout(() => {
30
30
  y(g.trim());
31
31
  }, f);
32
32
  return () => clearTimeout(e);
33
33
  }, [f, g]);
34
- let b = n({
34
+ let b = e({
35
35
  sort: "counterpart_name",
36
36
  order: "asc",
37
37
  limit: d,
38
38
  counterpart_name__icontains: v || void 0,
39
39
  ...u === "customer" ? { is_customer: !0 } : { is_vendor: !0 }
40
40
  }), x = a(() => l(b.data?.data, p), [b.data, p]), S = r((e) => {
41
- h(e), t?.(e);
42
- }, [t]), C = r(() => {
41
+ h(e), n?.(e);
42
+ }, [n]), C = r(() => {
43
43
  b.refetch();
44
44
  }, [b]);
45
45
  return {
@@ -2,16 +2,16 @@
2
2
  "use client";
3
3
  "use client";
4
4
  "use client";
5
- import { getPayableAchInstructions as e } from "./helpers.js";
6
- import { useCounterpartBankAccountsQuery as t } from "../../../data-access/dist/index5.js";
5
+ import { useCounterpartBankAccountsQuery as e } from "../../../data-access/dist/index5.js";
7
6
  import "../../../data-access/dist/index.js";
7
+ import { getPayableAchInstructions as t } from "./helpers.js";
8
8
  //#region ../../libs/tesouro-embedded-components-react/shared/counterpart-management/feature/dist/lib/usePayableAchInstructions.js
9
- function n({ counterpartId: n, currency: r, enabled: i = !0 } = {}) {
10
- let a = t(n, { enabled: i });
9
+ function n({ counterpartId: n, currency: r, currentBankAccountId: i, enabled: a = !0 } = {}) {
10
+ let o = e(n, { enabled: a });
11
11
  return {
12
- achInstructions: e(a.data?.data, r ?? void 0),
13
- isLoading: a.isLoading,
14
- isError: a.isError
12
+ achInstructions: t(o.data?.data, r ?? void 0, i ?? void 0),
13
+ isLoading: o.isLoading,
14
+ isError: o.isError
15
15
  };
16
16
  }
17
17
  //#endregion
@@ -1,5 +1,5 @@
1
1
  //#region ../../libs/tesouro-embedded-components-react/shared/feature/dist/lib/analytics/build-info.js
2
- var e = "@tesouro/embedded-components-react", t = "0.4.15", n = "a15437f1c29a0b2963f6e4505115338ae1a6198c", r = Object.freeze({
2
+ var e = "@tesouro/embedded-components-react", t = "0.4.16", n = "5e5e363c58ea4925cb54e59e4954ff26bdead369", r = Object.freeze({
3
3
  library_name: e,
4
4
  library_version: t,
5
5
  library_sha: n
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tesouro/embedded-components-react",
3
- "version": "0.4.15",
3
+ "version": "0.4.16",
4
4
  "license": "Apache-2.0",
5
5
  "type": "module",
6
6
  "packageDepSync": {
@@ -1,2 +0,0 @@
1
- import "./index72.js";
2
- import "./index74.js";