@tesouro/embedded-components-react 0.7.45 → 0.7.47

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 (106) hide show
  1. package/dist/index.d.ts +33 -39
  2. package/dist/lib/CounterpartsWidget.d.ts +33 -22
  3. package/dist/lib/CounterpartsWidgetPublic.d.ts +33 -22
  4. package/dist/lib/CustomersWidget.d.ts +31 -22
  5. package/dist/lib/ReceivablesWidget.d.ts +3 -0
  6. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index24.js +12 -12
  7. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index25.js +15 -15
  8. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index31.js +1 -1
  9. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index32.js +40 -42
  10. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index33.js +1 -3
  11. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index42.js +9 -9
  12. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index5.js +30 -30
  13. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/ui/dist/index14.js +3 -2
  14. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/ui/dist/index15.js +7 -6
  15. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/ui/dist/index33.js +3 -2
  16. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/ui/dist/index34.js +9 -8
  17. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/ui/dist/index37.js +5 -4
  18. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/ui/dist/index48.js +1 -1
  19. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/ui/dist/index49.js +1 -1
  20. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/ui/dist/index5.js +3 -2
  21. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bills-list/feature/dist/index16.js +40 -40
  22. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bills-list/ui/dist/index18.js +3 -2
  23. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bills-list/ui/dist/index2.js +1 -1
  24. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bills-list/ui/dist/index20.js +8 -7
  25. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bills-list/ui/dist/index3.js +1 -1
  26. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/pay-bill/ui/dist/index5.js +1 -1
  27. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/pay-bill/ui/dist/index6.js +1 -1
  28. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index.js +9 -13
  29. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index12.js +7 -10
  30. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index13.js +76 -11
  31. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index15.js +1 -1
  32. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index16.js +27 -9
  33. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index17.js +2 -76
  34. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index18.js +30 -0
  35. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index19.js +1 -1
  36. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index20.js +5 -27
  37. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index21.js +32 -2
  38. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index22.js +2 -30
  39. package/dist/libs/tesouro-embedded-components-react/counterparts-widget/feature/dist/lib/CounterpartsWidget/viewModels.js +73 -77
  40. package/dist/libs/tesouro-embedded-components-react/counterparts-widget/ui/dist/index2.js +9 -26
  41. package/dist/libs/tesouro-embedded-components-react/counterparts-widget/ui/dist/index3.js +44 -44
  42. package/dist/libs/tesouro-embedded-components-react/counterparts-widget/ui/dist/index7.js +197 -208
  43. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/ReceivablesWidget.js +9 -9
  44. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/auditHistory/labels.js +2 -2
  45. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/useReceivableDetails.js +1 -1
  46. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/useReceivablesWidget.js +2 -2
  47. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index.js +22 -23
  48. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index14.js +10 -24
  49. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index25.js +53 -37
  50. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index26.js +21 -53
  51. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index27.js +8 -21
  52. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index28.js +77 -8
  53. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index29.js +31 -69
  54. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index30.js +17 -38
  55. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index31.js +40 -17
  56. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index32.js +26 -38
  57. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index33.js +18 -27
  58. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index34.js +8 -18
  59. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index35.js +35 -9
  60. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index36.js +14 -36
  61. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index37.js +26 -14
  62. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index38.js +84 -23
  63. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index39.js +487 -80
  64. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index40.js +2 -494
  65. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index41.js +48 -2
  66. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index42.js +62 -38
  67. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index43.js +438 -61
  68. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index44.js +207 -431
  69. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index45.js +20 -222
  70. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index46.js +6 -21
  71. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index48.js +265 -0
  72. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index49.js +2 -265
  73. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index50.js +131 -2
  74. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index51.js +22 -125
  75. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index52.js +235 -23
  76. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index53.js +3 -240
  77. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index54.js +249 -3
  78. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index55.js +54 -242
  79. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index56.js +221 -51
  80. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index57.js +38 -222
  81. package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/feature/dist/lib/helpers.js +13 -13
  82. package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/feature/dist/lib/labels.js +1 -1
  83. package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/feature/dist/lib/useCounterpartForm.js +85 -84
  84. package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/ui/dist/index10.js +238 -241
  85. package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/ui/dist/index11.js +2 -0
  86. package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/ui/dist/index2.js +6 -5
  87. package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/ui/dist/index5.js +2 -0
  88. package/dist/libs/tesouro-embedded-components-react/shared/document-status/ui/dist/index.js +8 -0
  89. package/dist/libs/tesouro-embedded-components-react/shared/document-status/ui/dist/index2.js +14 -0
  90. package/dist/libs/tesouro-embedded-components-react/shared/document-status/ui/dist/index3.js +13 -0
  91. package/dist/libs/tesouro-embedded-components-react/shared/document-status/ui/dist/index4.js +18 -0
  92. package/dist/libs/tesouro-embedded-components-react/shared/document-status/ui/dist/index5.js +2 -0
  93. package/dist/libs/tesouro-embedded-components-react/shared/document-status/ui/dist/index6.js +20 -0
  94. package/dist/libs/tesouro-embedded-components-react/shared/document-status/ui/dist/index7.js +32 -0
  95. package/dist/libs/tesouro-embedded-components-react/shared/document-status/ui/dist/index8.js +2 -0
  96. package/dist/libs/tesouro-embedded-components-react/{bill-pay-widget → shared/document-status}/util/dist/lib/derivePayableStatus.js +23 -10
  97. package/dist/libs/tesouro-embedded-components-react/shared/document-status/util/dist/lib/receivableFilledTone.js +22 -0
  98. package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/analytics/build-info.js +1 -1
  99. package/package.json +1 -1
  100. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index14.js +0 -18
  101. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index23.js +0 -2
  102. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index24.js +0 -7
  103. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index25.js +0 -34
  104. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index26.js +0 -2
  105. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index47.js +0 -8
  106. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index58.js +0 -45
@@ -3,24 +3,24 @@
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, bankAccountToAchFormValues as i, counterpartFormBankAccountToCreatePayload as a, counterpartFormBankAccountToUpdatePayload as o, counterpartFormToCreatePayload as s, counterpartFormToUpdatePayload as ee, counterpartToFormValues as c, emptyCounterpartFormValues as l, getAchInstructions as u, hasCounterpartFormAddressValues as d, hasCounterpartFormBankAccountValues as f, hasCounterpartFormErrors as p, resolveCounterpartBankAccountWrite as m, validateCounterpartForm as h, withoutUnchangedContactErrors as g } from "./helpers.js";
7
- import { useCreateCounterpartMutation as _, useUpdateCounterpartMutation as te } from "../../../data-access/dist/index3.js";
8
- import { useCreateCounterpartBankAccountMutation as v, useUpdateCounterpartBankAccountMutation as y } from "../../../data-access/dist/index4.js";
6
+ import { addressFormToCreatePayload as t, addressFormToUpdatePayload as n, addressResponseToFormValues as r, bankAccountToAchFormValues as i, counterpartFormBankAccountToCreatePayload as a, counterpartFormBankAccountToUpdatePayload as o, counterpartFormToCreatePayload as s, counterpartFormToUpdatePayload as c, counterpartToFormValues as l, emptyCounterpartFormValues as u, getAchInstructions as d, hasCounterpartFormAddressValues as f, hasCounterpartFormBankAccountValues as p, hasCounterpartFormErrors as m, resolveCounterpartBankAccountWrite as h, validateCounterpartForm as g, withoutUnchangedContactErrors as ee } from "./helpers.js";
7
+ import { useCreateCounterpartMutation as _, useUpdateCounterpartMutation as v } from "../../../data-access/dist/index3.js";
8
+ import { useCreateCounterpartBankAccountMutation as y, useUpdateCounterpartBankAccountMutation as te } from "../../../data-access/dist/index4.js";
9
9
  import { useCreateCounterpartAddressMutation as ne, useUpdateCounterpartAddressMutation as re } from "../../../data-access/dist/index5.js";
10
10
  import "../../../data-access/dist/index.js";
11
- import { useCallback as b, useLayoutEffect as ie, useState as x } from "react";
11
+ import { useCallback as b, useLayoutEffect as x, useState as S } from "react";
12
12
  //#region ../../libs/tesouro-embedded-components-react/shared/counterpart-management/feature/dist/lib/useCounterpartForm.js
13
- function ae(e, t) {
14
- if (!t) return d(e);
13
+ function C(e, t) {
14
+ if (!t) return f(e);
15
15
  let n = r(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
- function S(e, t) {
19
- if (!t) return f(e);
18
+ function w(e, t) {
19
+ if (!t) return p(e);
20
20
  let n = i(t);
21
21
  return e.bankAccount.accountHolderName.trim() !== n.accountHolderName.trim() || e.bankAccount.routingNumber.trim() !== n.routingNumber.trim() || e.bankAccount.accountNumber.trim() !== n.accountNumber.trim();
22
22
  }
23
- function C(e, t) {
23
+ function T(e, t) {
24
24
  let n = { ...e };
25
25
  if ([
26
26
  "legalName",
@@ -45,146 +45,147 @@ function C(e, t) {
45
45
  }
46
46
  return JSON.stringify(n) === JSON.stringify(e) ? e : n;
47
47
  }
48
- function w({ view: r, setView: w, selectedId: T, setSelectedId: E, messages: D, counterpartType: O, counterpart: k, primaryAddress: A, bankAccounts: j, isBankAccountsLoading: M, isBankAccountsError: N, includeBankAccount: P = !0 }) {
49
- let F = O === "vendor" && P, I = _(), L = ne(), R = v(), z = te(), B = re(), V = y(), [H, U] = x(() => l()), [W, G] = x({}), [K, q] = x({
48
+ function E({ view: r, setView: E, selectedId: D, setSelectedId: O, messages: k, counterpartType: A, counterpart: j, primaryAddress: M, bankAccounts: N, isBankAccountsLoading: P, isBankAccountsError: F, includeBankAccount: I = !0 }) {
49
+ let L = A === "vendor" && I, R = _(), z = ne(), B = y(), V = v(), H = re(), U = te(), [W, G] = S(() => u()), [ie, K] = S({}), [ae, q] = S({
50
50
  address: !1,
51
51
  bankAccount: !1
52
- }), [J, Y] = x(), [X, Z] = x(), oe = I.isPending || L.isPending || R.isPending || V.isPending || z.isPending || B.isPending, se = b(() => {
53
- E(void 0), Z(void 0), Y(void 0), q({
54
- address: O === "vendor",
52
+ }), [J, Y] = S(), [X, Z] = S(), oe = R.isPending || z.isPending || B.isPending || U.isPending || V.isPending || H.isPending, se = b(() => {
53
+ O(void 0), Z(void 0), Y(void 0), q({
54
+ address: A === "vendor",
55
55
  bankAccount: !1
56
- }), U(l("organization", O)), G({}), w("create");
56
+ }), G(u("organization", A)), K({}), E("create");
57
57
  }, [
58
+ A,
58
59
  O,
59
- E,
60
- w
60
+ E
61
61
  ]), ce = b(() => {
62
- if (!k || F && (M || N)) return;
63
- let e = F ? u(j) : void 0, t = c(k, A);
62
+ if (!j || L && (P || F)) return;
63
+ let e = L ? d(N) : void 0, t = l(j, M);
64
64
  Z(void 0), Y(e?.id), q({
65
- address: d(t),
65
+ address: A === "vendor" || f(t),
66
66
  bankAccount: !1
67
- }), U({
67
+ }), G({
68
68
  ...t,
69
69
  ...e ? { bankAccount: i(e) } : {}
70
- }), G({}), w("edit");
70
+ }), K({}), E("edit");
71
71
  }, [
72
- j,
73
- k,
74
72
  N,
75
- M,
73
+ j,
76
74
  A,
77
- w,
78
- F
75
+ F,
76
+ P,
77
+ M,
78
+ E,
79
+ L
79
80
  ]), le = b(() => {
80
- w("none");
81
- }, [w]), ue = b(() => {
81
+ E("none");
82
+ }, [E]), ue = b(() => {
82
83
  q((e) => ({
83
84
  ...e,
84
85
  address: !0
85
86
  }));
86
- }, []), [Q, $] = x(!1), de = b(() => $(!0), []);
87
- return ie(() => {
88
- let e = r === "edit" ? "edit" : "create", t = h(H, e, D, O, e === "edit" && F && !!J);
87
+ }, []), [Q, $] = S(!1), de = b(() => $(!0), []);
88
+ return x(() => {
89
+ let e = g(W, k, A, (r === "edit" ? "edit" : "create") == "edit" && L && !!J);
89
90
  if (Q) {
90
- $(!1), G(t);
91
+ $(!1), K(e);
91
92
  return;
92
93
  }
93
- G((e) => p(e) ? C(e, t) : e);
94
+ K((t) => m(t) ? T(t, e) : t);
94
95
  }, [
95
96
  J,
96
- O,
97
+ A,
97
98
  Q,
98
- D,
99
- H,
99
+ k,
100
+ W,
100
101
  r,
101
- F
102
+ L
102
103
  ]), {
103
- values: H,
104
- errors: W,
105
- setValues: U,
104
+ values: W,
105
+ errors: ie,
106
+ setValues: G,
106
107
  isSubmitting: oe,
107
- sectionsToExpand: K,
108
+ sectionsToExpand: ae,
108
109
  expandAddress: ue,
109
110
  openCreate: se,
110
111
  openEdit: ce,
111
112
  close: le,
112
113
  submit: b(async () => {
113
- let i = r === "edit" ? "edit" : "create", l = g(h(H, i, D, O, i === "edit" && F && !!J), H, i === "edit" && k ? c(k, A) : void 0);
114
- if (p(l)) return G(l), q((e) => ({
115
- address: e.address || !!l.address,
116
- bankAccount: e.bankAccount || !!l.bankAccount
114
+ let i = r === "edit" ? "edit" : "create", u = ee(g(W, k, A, i === "edit" && L && !!J), W, i === "edit" && j ? l(j, M) : void 0);
115
+ if (m(u)) return K(u), q((e) => ({
116
+ address: e.address || !!u.address,
117
+ bankAccount: e.bankAccount || !!u.bankAccount
117
118
  })), { ok: !1 };
118
- G({}), q({
119
+ K({}), q({
119
120
  address: !1,
120
121
  bankAccount: !1
121
122
  });
122
123
  let _ = X;
123
124
  try {
124
- if (r === "edit" && T) {
125
- Z(void 0), await z.mutateAsync({
126
- path: { counterpart_id: T },
127
- body: ee(H, O)
125
+ if (r === "edit" && D) {
126
+ Z(void 0), await V.mutateAsync({
127
+ path: { counterpart_id: D },
128
+ body: c(W, A)
128
129
  });
129
- let e = A ? ae(H, A) ? B.mutateAsync({
130
+ let e = M ? C(W, M) ? H.mutateAsync({
130
131
  path: {
131
- counterpart_id: T,
132
- address_id: A.id
132
+ counterpart_id: D,
133
+ address_id: M.id
133
134
  },
134
- body: n(H.address)
135
- }) : void 0 : d(H) ? L.mutateAsync({
136
- path: { counterpart_id: T },
137
- body: t(H.address)
138
- }) : void 0, r = F && S(H, u(j)) ? m(j, J) : void 0, i = r?.kind === "update" ? V.mutateAsync({
135
+ body: n(W.address)
136
+ }) : void 0 : f(W) ? z.mutateAsync({
137
+ path: { counterpart_id: D },
138
+ body: t(W.address)
139
+ }) : void 0, r = L && w(W, d(N)) ? h(N, J) : void 0, i = r?.kind === "update" ? U.mutateAsync({
139
140
  path: {
140
- counterpart_id: T,
141
+ counterpart_id: D,
141
142
  bank_account_id: r.bankAccountId
142
143
  },
143
- body: o(H.bankAccount, { includeAchDefaults: r.includeAchDefaults })
144
- }) : r?.kind === "create" ? R.mutateAsync({
145
- path: { counterpart_id: T },
146
- body: a(H.bankAccount, { isDefaultForCurrency: r.isDefaultForCurrency })
147
- }) : void 0, [s, c] = await Promise.allSettled([e, i]);
148
- if (r?.kind === "create" && c.status === "fulfilled" && Y(c.value?.id), s.status === "rejected") throw s.reason;
149
- if (c.status === "rejected") throw c.reason;
150
- return w("none"), {
144
+ body: o(W.bankAccount, { includeAchDefaults: r.includeAchDefaults })
145
+ }) : r?.kind === "create" ? B.mutateAsync({
146
+ path: { counterpart_id: D },
147
+ body: a(W.bankAccount, { isDefaultForCurrency: r.isDefaultForCurrency })
148
+ }) : void 0, [s, l] = await Promise.allSettled([e, i]);
149
+ if (r?.kind === "create" && l.status === "fulfilled" && Y(l.value?.id), s.status === "rejected") throw s.reason;
150
+ if (l.status === "rejected") throw l.reason;
151
+ return E("none"), {
151
152
  ok: !0,
152
- counterpartId: T
153
+ counterpartId: D
153
154
  };
154
155
  }
155
- return _ ||= (await I.mutateAsync({ body: s(H, O) }))?.id, _ && F && f(H) && (Z(_), await R.mutateAsync({
156
+ return _ ||= (await R.mutateAsync({ body: s(W, A) }))?.id, _ && L && p(W) && (Z(_), await B.mutateAsync({
156
157
  path: { counterpart_id: _ },
157
- body: a(H.bankAccount)
158
- })), Z(void 0), w("none"), _ && E(_), {
158
+ body: a(W.bankAccount)
159
+ })), Z(void 0), E("none"), _ && O(_), {
159
160
  ok: !0,
160
161
  counterpartId: _
161
162
  };
162
163
  } catch (t) {
163
- return _ && (Z(_), E(_)), G({ form: e(t) ?? D.genericError }), { ok: !1 };
164
+ return _ && (Z(_), O(_)), K({ form: e(t) ?? k.genericError }), { ok: !1 };
164
165
  }
165
166
  }, [
166
167
  r,
167
- H,
168
- T,
169
- X,
168
+ W,
170
169
  D,
171
- O,
170
+ X,
172
171
  k,
173
172
  A,
174
173
  j,
174
+ M,
175
+ N,
175
176
  J,
176
- L,
177
- R,
178
- I,
177
+ z,
179
178
  B,
179
+ R,
180
+ H,
181
+ U,
180
182
  V,
181
- z,
182
- w,
183
183
  E,
184
- F
184
+ O,
185
+ L
185
186
  ]),
186
187
  revealErrors: de
187
188
  };
188
189
  }
189
190
  //#endregion
190
- export { w as useCounterpartForm };
191
+ export { E as useCounterpartForm };