@tesouro/embedded-components-react 0.7.21 → 0.7.24

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 (35) hide show
  1. package/dist/fixtures/index.d.ts +5 -1
  2. package/dist/index.d.ts +9 -1
  3. package/dist/lib/CounterpartsWidget.d.ts +9 -1
  4. package/dist/lib/CounterpartsWidgetPublic.d.ts +9 -1
  5. package/dist/lib/CustomersWidget.d.ts +9 -1
  6. package/dist/lib/ReceivablesWidget.d.ts +9 -1
  7. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index32.js +1 -1
  8. package/dist/libs/tesouro-embedded-components-react/counterparts-widget/feature/dist/lib/CounterpartsWidget/CounterpartDetailsContainer.js +1 -1
  9. package/dist/libs/tesouro-embedded-components-react/counterparts-widget/feature/dist/lib/CounterpartsWidget/CounterpartsWidget.js +50 -51
  10. package/dist/libs/tesouro-embedded-components-react/counterparts-widget/feature/dist/lib/CounterpartsWidget/viewModels.js +4 -2
  11. package/dist/libs/tesouro-embedded-components-react/counterparts-widget/ui/dist/index.js +1 -1
  12. package/dist/libs/tesouro-embedded-components-react/counterparts-widget/ui/dist/index2.js +1 -1
  13. package/dist/libs/tesouro-embedded-components-react/counterparts-widget/ui/dist/index4.js +72 -128
  14. package/dist/libs/tesouro-embedded-components-react/counterparts-widget/ui/dist/index5.js +183 -38
  15. package/dist/libs/tesouro-embedded-components-react/counterparts-widget/ui/dist/index6.js +503 -193
  16. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/ReceivablesWidget.js +57 -55
  17. package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/feature/dist/index.js +14 -14
  18. package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/feature/dist/lib/helpers.js +114 -102
  19. package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/ui/dist/index.js +12 -11
  20. package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/ui/dist/index10.js +534 -7
  21. package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/ui/dist/index11.js +7 -179
  22. package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/ui/dist/index12.js +179 -6
  23. package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/ui/dist/index13.js +3 -1
  24. package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/ui/dist/index14.js +4 -28
  25. package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/ui/dist/index15.js +28 -4
  26. package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/ui/dist/index16.js +4 -0
  27. package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/ui/dist/index2.js +10 -2
  28. package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/ui/dist/index7.js +140 -55
  29. package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/ui/dist/index8.js +53 -47
  30. package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/ui/dist/index9.js +51 -539
  31. package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/reference-data/useLedgerAccountsQuery.js +6 -3
  32. package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/rest/zod.gen.js +584 -549
  33. package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/analytics/build-info.js +1 -1
  34. package/package.json +1 -1
  35. package/dist/libs/tesouro-embedded-components-react/counterparts-widget/ui/dist/index7.js +0 -520
@@ -1,11 +1,12 @@
1
1
  import { formatMoneyExact as e } from "../../../../util/dist/lib/formatMoneyExact.js";
2
2
  import { getInitials as t } from "../../../../util/dist/lib/getInitials.js";
3
3
  import { isValidAchAccountNumber as n } from "../../../../util/dist/lib/isValidAchAccountNumber.js";
4
- import { EMPTY_ADDRESS_FORM_VALUES as r } from "../../../ui/dist/index6.js";
4
+ import { COUNTERPART_FORM_SHEET_LABELS_EN as r } from "../../../ui/dist/index2.js";
5
+ import { EMPTY_ADDRESS_FORM_VALUES as i } from "../../../ui/dist/index6.js";
5
6
  import "../../../ui/dist/index.js";
6
- import { COUNTERPART_MESSAGE_LABELS_EN as i } from "./labels.js";
7
+ import { COUNTERPART_MESSAGE_LABELS_EN as a } from "./labels.js";
7
8
  //#region ../../libs/tesouro-embedded-components-react/shared/counterpart-management/feature/dist/lib/helpers.js
8
- var a = [
9
+ var o = [
9
10
  "USD",
10
11
  "EUR",
11
12
  "GBP",
@@ -19,13 +20,13 @@ var a = [
19
20
  "MXN",
20
21
  "SGD"
21
22
  ];
22
- function o(e) {
23
- return Array.from(/* @__PURE__ */ new Set([...a, ...e ? [e] : []])).sort().map((e) => ({
23
+ function s(e) {
24
+ return Array.from(/* @__PURE__ */ new Set([...o, ...e ? [e] : []])).sort().map((e) => ({
24
25
  value: e,
25
26
  label: e
26
27
  }));
27
28
  }
28
- function s(e) {
29
+ function c(e) {
29
30
  try {
30
31
  return new Intl.NumberFormat("en-US", {
31
32
  style: "currency",
@@ -35,58 +36,58 @@ function s(e) {
35
36
  return 2;
36
37
  }
37
38
  }
38
- function c(e, t) {
39
- return e / 10 ** s(t);
39
+ function l(e, t) {
40
+ return e / 10 ** c(t);
40
41
  }
41
- function l(t, n = "USD") {
42
- return e(c(t, n), { currencyCode: n });
42
+ function u(t, n = "USD") {
43
+ return e(l(t, n), { currencyCode: n });
43
44
  }
44
- var u = new Intl.DateTimeFormat(void 0, {
45
+ var d = new Intl.DateTimeFormat(void 0, {
45
46
  year: "numeric",
46
47
  month: "short",
47
48
  day: "numeric"
48
49
  });
49
- function d(e) {
50
+ function f(e) {
50
51
  if (!e) return "";
51
52
  let t = new Date(e);
52
- return Number.isNaN(t.getTime()) ? "" : u.format(t);
53
+ return Number.isNaN(t.getTime()) ? "" : d.format(t);
53
54
  }
54
- function f(e) {
55
+ function p(e) {
55
56
  if ("organization" in e) return e.organization.legal_name;
56
57
  let { first_name: t, last_name: n } = e.individual;
57
58
  return [t, n].filter(Boolean).join(" ").trim();
58
59
  }
59
- function p(e) {
60
+ function m(e) {
60
61
  return "organization" in e ? e.organization.email ?? "" : e.individual.email ?? "";
61
62
  }
62
- function m(e) {
63
+ function h(e) {
63
64
  return "organization" in e ? e.organization.phone ?? "" : e.individual.phone ?? "";
64
65
  }
65
- function h(e) {
66
+ function g(e) {
66
67
  let t = /* @__PURE__ */ new Map();
67
68
  for (let n of e ?? []) n.dimension_value && t.set(n.dimension_value, Math.round(n.metric_value));
68
69
  return t;
69
70
  }
70
- var g = "-";
71
- function _({ counterparts: e, addresses: n, billedAmounts: r, dueOrOwedAmounts: i, isBilledAmountLoading: a = !1, isDueOrOwedAmountLoading: o = !1, isBilledAmountError: s = !1, isDueOrOwedAmountError: c = !1 }) {
71
+ var _ = "-";
72
+ function v({ counterparts: e, addresses: n, billedAmounts: r, dueOrOwedAmounts: i, isBilledAmountLoading: a = !1, isDueOrOwedAmountLoading: o = !1, isBilledAmountError: s = !1, isDueOrOwedAmountError: c = !1 }) {
72
73
  return e.map((e) => {
73
- let u = r?.get(e.id) ?? 0, d = i?.get(e.id) ?? 0, p = u - d, m = a || o, h = s || c, _ = f(e);
74
+ let l = r?.get(e.id) ?? 0, d = i?.get(e.id) ?? 0, f = l - d, m = a || o, h = s || c, g = p(e);
74
75
  return {
75
76
  id: e.id,
76
- name: _,
77
- initials: t(_),
77
+ name: g,
78
+ initials: t(g),
78
79
  entityType: e.type,
79
- locationLabel: y(n?.get(e.id)),
80
- billedAmountLabel: s ? g : r && !a ? l(u) : "",
81
- receivedOrPaidAmountLabel: h ? g : r && i && !m ? l(p) : "",
82
- dueOrOwedAmountLabel: c ? g : i && !o ? l(d) : "",
80
+ locationLabel: b(n?.get(e.id)),
81
+ billedAmountLabel: s ? _ : r && !a ? u(l) : "",
82
+ receivedOrPaidAmountLabel: h ? _ : r && i && !m ? u(f) : "",
83
+ dueOrOwedAmountLabel: c ? _ : i && !o ? u(d) : "",
83
84
  isBilledAmountLoading: a && !s,
84
85
  isReceivedOrPaidAmountLoading: m && !h,
85
86
  isDueOrOwedAmountLoading: o && !c
86
87
  };
87
88
  });
88
89
  }
89
- function v(e) {
90
+ function y(e) {
90
91
  if (!e) return [];
91
92
  let t = [
92
93
  e.city,
@@ -100,27 +101,27 @@ function v(e) {
100
101
  e.country
101
102
  ].filter((e) => !!(e && e.trim()));
102
103
  }
103
- function y(e) {
104
+ function b(e) {
104
105
  return e ? [e.country, e.city].filter(Boolean).join(" • ") : "";
105
106
  }
106
- function b({ counterpart: e, primaryAddress: t }) {
107
+ function x({ counterpart: e, primaryAddress: t }) {
107
108
  return {
108
- name: f(e),
109
+ name: p(e),
109
110
  entityType: e.type,
110
- email: p(e),
111
- phone: m(e),
111
+ email: m(e),
112
+ phone: h(e),
112
113
  taxId: e.tax_id ?? "",
113
- addressLines: v(t),
114
- createdAtLabel: d(e.created_at),
115
- updatedAtLabel: d(e.updated_at)
114
+ addressLines: y(t),
115
+ createdAtLabel: f(e.created_at),
116
+ updatedAtLabel: f(e.updated_at)
116
117
  };
117
118
  }
118
- function x(e) {
119
+ function S(e) {
119
120
  if (e) return `•••• ${e.slice(-4)}`;
120
121
  }
121
- function S(e) {
122
+ function C(e) {
122
123
  return (e ?? []).map((e) => {
123
- let t = x(e.iban || e.account_number || void 0), n = [e.currency, t].filter(Boolean).join(" · ");
124
+ let t = S(e.iban || e.account_number || void 0), n = [e.currency, t].filter(Boolean).join(" · ");
124
125
  return {
125
126
  id: e.id,
126
127
  primary: e.name || e.account_holder_name || e.currency,
@@ -129,17 +130,17 @@ function S(e) {
129
130
  };
130
131
  });
131
132
  }
132
- function C(e) {
133
+ function w(e) {
133
134
  let t = (e ?? []).filter((e) => e.currency === "USD" && (!!e.routing_number || !!e.account_number));
134
135
  return t.find((e) => e.is_default_for_currency) ?? t[0];
135
136
  }
136
- function w(e, t = "USD", n) {
137
- let r = n && (e ?? []).find((e) => e.id === n && V(e));
137
+ function T(e, t = "USD", n) {
138
+ let r = n && (e ?? []).find((e) => e.id === n && U(e));
138
139
  if (r) return r;
139
140
  let i = (e ?? []).filter((e) => e.currency === t && !!e.account_holder_name && !!e.routing_number && !!e.account_number);
140
141
  return i.find((e) => e.is_default_for_currency) ?? i[0];
141
142
  }
142
- function T(e, t = {}) {
143
+ function E(e, t = {}) {
143
144
  let n = e.line2.trim();
144
145
  return {
145
146
  line1: e.line1.trim(),
@@ -150,7 +151,7 @@ function T(e, t = {}) {
150
151
  country: "US"
151
152
  };
152
153
  }
153
- function E(e) {
154
+ function D(e) {
154
155
  return {
155
156
  line1: e.line1 ?? "",
156
157
  line2: e.line2 ?? "",
@@ -159,10 +160,10 @@ function E(e) {
159
160
  postalCode: e.postal_code ?? ""
160
161
  };
161
162
  }
162
- function D(e) {
163
- return T(e);
164
- }
165
163
  function O(e) {
164
+ return E(e);
165
+ }
166
+ function k(e) {
166
167
  return {
167
168
  line1: e.line1.trim(),
168
169
  line2: e.line2.trim(),
@@ -172,7 +173,7 @@ function O(e) {
172
173
  country: "US"
173
174
  };
174
175
  }
175
- function k(e = "organization", t) {
176
+ function A(e = "organization", t) {
176
177
  return {
177
178
  entityType: e,
178
179
  legalName: "",
@@ -183,7 +184,7 @@ function k(e = "organization", t) {
183
184
  phone: "",
184
185
  taxId: "",
185
186
  remindersEnabled: t === "customer",
186
- address: { ...r },
187
+ address: { ...i },
187
188
  bankAccount: {
188
189
  accountHolderName: "",
189
190
  routingNumber: "",
@@ -191,11 +192,11 @@ function k(e = "organization", t) {
191
192
  }
192
193
  };
193
194
  }
194
- function A(e, t) {
195
- let n = k(e.type);
196
- return n.email = p(e), n.phone = m(e), n.taxId = e.tax_id ?? "", n.remindersEnabled = !!e.reminders_enabled, t && (n.address = E(t)), "organization" in e ? n.legalName = e.organization.legal_name : (n.firstName = e.individual.first_name, n.lastName = e.individual.last_name), n;
195
+ function j(e, t) {
196
+ let n = A(e.type);
197
+ return n.email = m(e), n.phone = h(e), n.taxId = e.tax_id ?? "", n.remindersEnabled = !!e.reminders_enabled, t && (n.address = D(t)), "organization" in e ? n.legalName = e.organization.legal_name : (n.firstName = e.individual.first_name, n.lastName = e.individual.last_name), n;
197
198
  }
198
- function j(e) {
199
+ function M(e) {
199
200
  return [
200
201
  e.line1,
201
202
  e.line2,
@@ -204,11 +205,11 @@ function j(e) {
204
205
  e.postalCode
205
206
  ].some((e) => e.trim().length > 0);
206
207
  }
207
- function M(e) {
208
- return j(e) ? T(e) : void 0;
208
+ function N(e) {
209
+ return M(e) ? E(e) : void 0;
209
210
  }
210
- function N(e, t) {
211
- let n = t === "customer", r = t === "vendor", i = M(e.address), a = e.taxId.trim() || void 0, o = e.email.trim(), s = e.phone.trim() || void 0, c = {
211
+ function P(e, t) {
212
+ let n = t === "customer", r = t === "vendor", i = N(e.address), a = e.taxId.trim() || void 0, o = e.email.trim(), s = e.phone.trim() || void 0, c = {
212
213
  is_customer: n,
213
214
  is_vendor: r,
214
215
  language: "en",
@@ -237,7 +238,7 @@ function N(e, t) {
237
238
  }
238
239
  };
239
240
  }
240
- function P(e, t) {
241
+ function F(e, t) {
241
242
  let n = e.taxId.trim(), r = e.email.trim(), i = e.phone.trim(), a = {
242
243
  language: "en",
243
244
  reminders_enabled: t === "customer" ? e.remindersEnabled : void 0,
@@ -261,20 +262,31 @@ function P(e, t) {
261
262
  }
262
263
  };
263
264
  }
264
- function F(e) {
265
- return j(e.address);
265
+ function I(e, t, n) {
266
+ let i = {
267
+ ...r,
268
+ ...n
269
+ }, a = e === "individual";
270
+ return {
271
+ label: a ? n?.taxIdSsnLabel ?? n?.taxIdLabel ?? i.taxIdSsnLabel : n?.taxIdEinLabel ?? n?.taxIdLabel ?? i.taxIdEinLabel,
272
+ placeholder: a ? i.taxIdSsnPlaceholder : i.taxIdEinPlaceholder,
273
+ description: t === "vendor" ? i.vendorTaxIdHelp : i.customerTaxIdHelp
274
+ };
275
+ }
276
+ function L(e) {
277
+ return M(e.address);
266
278
  }
267
- function I(e) {
279
+ function R(e) {
268
280
  return [
269
281
  e.accountHolderName,
270
282
  e.routingNumber,
271
283
  e.accountNumber
272
284
  ].some((e) => e.trim().length > 0);
273
285
  }
274
- function L(e) {
275
- return I(e.bankAccount);
286
+ function z(e) {
287
+ return R(e.bankAccount);
276
288
  }
277
- function R(e, t = {}) {
289
+ function B(e, t = {}) {
278
290
  return {
279
291
  account_holder_name: e.accountHolderName.trim() || void 0,
280
292
  account_number: e.accountNumber.trim() || void 0,
@@ -284,7 +296,7 @@ function R(e, t = {}) {
284
296
  is_default_for_currency: t.isDefaultForCurrency ?? !0
285
297
  };
286
298
  }
287
- function z(e, t = {}) {
299
+ function V(e, t = {}) {
288
300
  return {
289
301
  account_holder_name: e.accountHolderName.trim() || void 0,
290
302
  account_number: e.accountNumber.trim() || void 0,
@@ -295,7 +307,7 @@ function z(e, t = {}) {
295
307
  } : {}
296
308
  };
297
309
  }
298
- function B(e) {
310
+ function H(e) {
299
311
  return [
300
312
  e.account_number,
301
313
  e.iban,
@@ -304,19 +316,19 @@ function B(e) {
304
316
  e.bic
305
317
  ].every((e) => !e);
306
318
  }
307
- function V(e) {
308
- return !!(B(e) || e.currency === "USD" && (e.routing_number || e.account_number));
319
+ function U(e) {
320
+ return !!(H(e) || e.currency === "USD" && (e.routing_number || e.account_number));
309
321
  }
310
- function H(e, t) {
322
+ function W(e, t) {
311
323
  if (t) {
312
324
  let n = e?.find((e) => e.id === t);
313
325
  return {
314
326
  kind: "update",
315
327
  bankAccountId: t,
316
- includeAchDefaults: n ? B(n) : !1
328
+ includeAchDefaults: n ? H(n) : !1
317
329
  };
318
330
  }
319
- let n = e?.find(B);
331
+ let n = e?.find(H);
320
332
  return n ? {
321
333
  kind: "update",
322
334
  bankAccountId: n.id,
@@ -326,7 +338,7 @@ function H(e, t) {
326
338
  isDefaultForCurrency: !(e ?? []).some((e) => e.currency === "USD" && e.is_default_for_currency)
327
339
  };
328
340
  }
329
- function U() {
341
+ function G() {
330
342
  return {
331
343
  name: "",
332
344
  accountHolderName: "",
@@ -339,7 +351,7 @@ function U() {
339
351
  isDefault: !1
340
352
  };
341
353
  }
342
- function W(e) {
354
+ function ee(e) {
343
355
  return {
344
356
  name: e.name ?? "",
345
357
  accountHolderName: e.account_holder_name ?? "",
@@ -352,7 +364,7 @@ function W(e) {
352
364
  isDefault: e.is_default_for_currency ?? !1
353
365
  };
354
366
  }
355
- function G(e) {
367
+ function K(e) {
356
368
  return {
357
369
  name: e.name.trim() || void 0,
358
370
  account_holder_name: e.accountHolderName.trim() || void 0,
@@ -366,7 +378,7 @@ function G(e) {
366
378
  is_default_for_currency: e.isDefault
367
379
  };
368
380
  }
369
- function K(e) {
381
+ function q(e) {
370
382
  return {
371
383
  name: e.name.trim(),
372
384
  account_holder_name: e.accountHolderName.trim(),
@@ -379,70 +391,70 @@ function K(e) {
379
391
  country: "US"
380
392
  };
381
393
  }
382
- function q(e) {
394
+ function J(e) {
383
395
  return /^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(e);
384
396
  }
385
- function J(e, t) {
397
+ function Y(e, t) {
386
398
  let n = {};
387
399
  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;
388
400
  }
389
- function Y(e) {
401
+ function X(e) {
390
402
  return Object.values(e).some(Boolean);
391
403
  }
392
- function X(e) {
404
+ function Z(e) {
393
405
  if (!/^\d{9}$/.test(e)) return !1;
394
406
  let t = [...e].map(Number);
395
407
  return (3 * (t[0] + t[3] + t[6]) + 7 * (t[1] + t[4] + t[7]) + (t[2] + t[5] + t[8])) % 10 == 0;
396
408
  }
397
- function Z(e, t = i) {
398
- let r = {}, a = e.accountHolderName.trim(), o = e.routingNumber.trim(), s = e.accountNumber.trim();
399
- return a.length === 0 && (r.accountHolderName = t.accountHolderNameRequired), (o.length === 0 || !X(o)) && (r.routingNumber = t.routingNumberInvalid), n(s) || (r.accountNumber = t.accountNumberInvalid), r;
409
+ function Q(e, t = a) {
410
+ let r = {}, i = e.accountHolderName.trim(), o = e.routingNumber.trim(), s = e.accountNumber.trim();
411
+ return i.length === 0 && (r.accountHolderName = t.accountHolderNameRequired), (o.length === 0 || !Z(o)) && (r.routingNumber = t.routingNumberInvalid), n(s) || (r.accountNumber = t.accountNumberInvalid), r;
400
412
  }
401
- function Q(e) {
413
+ function $(e) {
402
414
  let t = (/^(\+?[\d\s().-]+?)\s*(?:(?:x|ext\.?)\s*\d+)?$/i.exec(e)?.[1])?.replace(/\D/g, "").length ?? 0;
403
415
  return t >= 7 && t <= 15;
404
416
  }
405
- function $(e) {
417
+ function te(e) {
406
418
  return /^[\d\s-]+$/.test(e) && e.replace(/\D/g, "").length === 9;
407
419
  }
408
- function ee(e, t, n = i, r = "customer", a = !1) {
420
+ function ne(e, t, n = a, r = "customer", i = !1) {
409
421
  let o = {};
410
- e.entityType === "organization" ? e.legalName.trim().length === 0 && (o.legalName = n.legalNameRequired) : (e.firstName.trim().length === 0 && (o.firstName = n.firstNameRequired), e.lastName.trim().length === 0 && (o.lastName = n.lastNameRequired)), e.email.trim().length === 0 ? o.email = n.emailRequired : q(e.email.trim()) || (o.email = n.emailInvalid);
422
+ e.entityType === "organization" ? e.legalName.trim().length === 0 && (o.legalName = n.legalNameRequired) : (e.firstName.trim().length === 0 && (o.firstName = n.firstNameRequired), e.lastName.trim().length === 0 && (o.lastName = n.lastNameRequired)), e.email.trim().length === 0 ? o.email = n.emailRequired : J(e.email.trim()) || (o.email = n.emailInvalid);
411
423
  let s = e.phone.trim();
412
- s && !Q(s) && (o.phone = n.phoneInvalid);
424
+ s && !$(s) && (o.phone = n.phoneInvalid);
413
425
  let c = e.taxId.trim();
414
- if (c && !$(c) && (o.taxId = n.taxIdInvalid), t === "create" && r === "vendor" || j(e.address)) {
415
- let t = J(e.address, n);
416
- Y(t) && (o.address = t);
426
+ if (c && !te(c) && (o.taxId = n.taxIdInvalid), t === "create" && r === "vendor" || M(e.address)) {
427
+ let t = Y(e.address, n);
428
+ X(t) && (o.address = t);
417
429
  }
418
- if (r === "vendor" && (a || L(e))) {
419
- let t = Z(e.bankAccount, n);
420
- Y(t) && (o.bankAccount = t);
430
+ if (r === "vendor" && (i || z(e))) {
431
+ let t = Q(e.bankAccount, n);
432
+ X(t) && (o.bankAccount = t);
421
433
  }
422
434
  return o;
423
435
  }
424
- function te(e, t, n) {
436
+ function re(e, t, n) {
425
437
  if (!n) return e;
426
438
  let r = { ...e };
427
439
  return t.phone.trim() === n.phone.trim() && delete r.phone, t.taxId.trim() === n.taxId.trim() && delete r.taxId, r;
428
440
  }
429
- function ne(e) {
441
+ function ie(e) {
430
442
  let { address: t, bankAccount: n, ...r } = e;
431
- return Y(r) || (t ? Y(t) : !1) || (n ? Y(n) : !1);
443
+ return X(r) || (t ? X(t) : !1) || (n ? X(n) : !1);
432
444
  }
433
- function re(e, t = i) {
445
+ function ae(e, t = a) {
434
446
  let n = {};
435
447
  return e.accountNumber.trim().length === 0 && e.iban.trim().length === 0 && (n.accountNumber = t.bankAccountIdentifierRequired), e.currency.trim().length === 0 && (n.currency = t.bankAccountCurrencyRequired), n;
436
448
  }
437
- function ie(e) {
438
- return Y(e);
449
+ function oe(e) {
450
+ return X(e);
439
451
  }
440
- function ae(e, t = i) {
441
- return J(e, t);
452
+ function se(e, t = a) {
453
+ return Y(e, t);
442
454
  }
443
- function oe() {
455
+ function ce() {
444
456
  let e = globalThis.getSelection?.();
445
457
  return !!(e && e.toString().length > 0);
446
458
  }
447
459
  //#endregion
448
- export { D as addressFormToCreatePayload, O as addressFormToUpdatePayload, E as addressResponseToFormValues, G as bankAccountFormToCreatePayload, K as bankAccountFormToUpdatePayload, W as bankAccountToFormValues, h as buildAnalyticsMap, S as buildBankAccountItems, b as buildCounterpartDetailsView, _ as buildCounterpartRows, R as counterpartFormBankAccountToCreatePayload, z as counterpartFormBankAccountToUpdatePayload, N as counterpartFormToCreatePayload, P as counterpartFormToUpdatePayload, A as counterpartToFormValues, U as emptyBankAccountFormValues, k as emptyCounterpartFormValues, d as formatCounterpartDate, l as formatMoney, c as fromMinorUnits, C as getAchInstructions, p as getCounterpartEmail, f as getCounterpartName, o as getCurrencyOptions, w as getPayableAchInstructions, I as hasAchFormValues, ie as hasBankAccountFormErrors, F as hasCounterpartFormAddressValues, L as hasCounterpartFormBankAccountValues, ne as hasCounterpartFormErrors, oe as hasSelectedText, V as isAchCompatibleBankAccount, H as resolveCounterpartBankAccountWrite, Z as validateAchFormValues, ae as validateAddressForm, re as validateBankAccountForm, ee as validateCounterpartForm, te as withoutUnchangedContactErrors };
460
+ export { O as addressFormToCreatePayload, k as addressFormToUpdatePayload, D as addressResponseToFormValues, K as bankAccountFormToCreatePayload, q as bankAccountFormToUpdatePayload, ee as bankAccountToFormValues, g as buildAnalyticsMap, C as buildBankAccountItems, x as buildCounterpartDetailsView, I as buildCounterpartFormTaxIdField, v as buildCounterpartRows, B as counterpartFormBankAccountToCreatePayload, V as counterpartFormBankAccountToUpdatePayload, P as counterpartFormToCreatePayload, F as counterpartFormToUpdatePayload, j as counterpartToFormValues, G as emptyBankAccountFormValues, A as emptyCounterpartFormValues, f as formatCounterpartDate, u as formatMoney, l as fromMinorUnits, w as getAchInstructions, m as getCounterpartEmail, p as getCounterpartName, s as getCurrencyOptions, T as getPayableAchInstructions, R as hasAchFormValues, oe as hasBankAccountFormErrors, L as hasCounterpartFormAddressValues, z as hasCounterpartFormBankAccountValues, ie as hasCounterpartFormErrors, ce as hasSelectedText, U as isAchCompatibleBankAccount, W as resolveCounterpartBankAccountWrite, Q as validateAchFormValues, se as validateAddressForm, ae as validateBankAccountForm, ne as validateCounterpartForm, re as withoutUnchangedContactErrors };
@@ -1,13 +1,14 @@
1
- import { ACH_FIELD_GROUP_LABELS_EN as e } from "./index2.js";
1
+ import { ACH_FIELD_GROUP_LABELS_EN as e, COUNTERPART_FORM_SHEET_LABELS_EN as t } from "./index2.js";
2
2
  import "./index3.js";
3
- import { AchFieldGroup as t } from "./index5.js";
4
- import { EMPTY_ADDRESS_FORM_VALUES as n } from "./index6.js";
5
- import "./index7.js";
6
- import { CounterpartFormFields as r, CounterpartFormSheet as i, countErrors as a, useFocusFirstInvalidField as o } from "./index9.js";
7
- import "./index10.js";
8
- import { BankAccountFormSheet as s } from "./index11.js";
9
- import "./index12.js";
3
+ import { AchFieldGroup as n } from "./index5.js";
4
+ import { EMPTY_ADDRESS_FORM_VALUES as r } from "./index6.js";
5
+ import { CounterpartAddressFields as i } from "./index7.js";
6
+ import "./index8.js";
7
+ import { CounterpartFormFields as a, CounterpartFormSheet as o, countErrors as s, useFocusFirstInvalidField as c } from "./index10.js";
8
+ import "./index11.js";
9
+ import { BankAccountFormSheet as l } from "./index12.js";
10
10
  import "./index13.js";
11
- import { ConfirmDeleteDialog as c } from "./index14.js";
12
- import "./index15.js";
13
- export { e as ACH_FIELD_GROUP_LABELS_EN, t as AchFieldGroup, s as BankAccountFormSheet, c as ConfirmDeleteDialog, r as CounterpartFormFields, i as CounterpartFormSheet, n as EMPTY_ADDRESS_FORM_VALUES, a as countErrors, o as useFocusFirstInvalidField };
11
+ import "./index14.js";
12
+ import { ConfirmDeleteDialog as u } from "./index15.js";
13
+ import "./index16.js";
14
+ export { e as ACH_FIELD_GROUP_LABELS_EN, n as AchFieldGroup, l as BankAccountFormSheet, t as COUNTERPART_FORM_SHEET_LABELS_EN, u as ConfirmDeleteDialog, i as CounterpartAddressFields, a as CounterpartFormFields, o as CounterpartFormSheet, r as EMPTY_ADDRESS_FORM_VALUES, s as countErrors, c as useFocusFirstInvalidField };