@tesouro/embedded-components-react 0.4.14 → 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 (125) 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/cards-widget/feature/dist/index3.js +15 -3
  108. package/dist/libs/tesouro-embedded-components-react/cards-widget/feature/dist/index9.js +63 -65
  109. package/dist/libs/tesouro-embedded-components-react/cards-widget/ui/dist/lib/CardsList/CardsList.js +4 -2
  110. package/dist/libs/tesouro-embedded-components-react/cards-widget/ui/dist/lib/CardsList/CardsListDetailsSheet.js +6 -5
  111. package/dist/libs/tesouro-embedded-components-react/cards-widget/ui/dist/lib/CardsList/CardsListRow.js +1 -1
  112. package/dist/libs/tesouro-embedded-components-react/counterparts-widget/feature/dist/index4.js +8 -8
  113. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index9.js +4 -4
  114. package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/data-access/dist/index.js +5 -5
  115. package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/feature/dist/index.js +19 -19
  116. package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/feature/dist/lib/helpers.js +39 -33
  117. package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/feature/dist/lib/subEntityForms.js +15 -15
  118. package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/feature/dist/lib/useAddressForm.js +9 -9
  119. package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/feature/dist/lib/useCounterpartDetails.js +7 -7
  120. package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/feature/dist/lib/useCounterpartForm.js +37 -37
  121. package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/feature/dist/lib/useCounterpartSelector.js +15 -15
  122. package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/feature/dist/lib/usePayableAchInstructions.js +7 -7
  123. package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/analytics/build-info.js +1 -1
  124. package/package.json +1 -1
  125. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index76.js +0 -2
@@ -5,77 +5,75 @@
5
5
  import { WidgetProvider as e } from "../../../shared/feature/dist/lib/WidgetProvider/WidgetProvider.js";
6
6
  import "../../../shared/feature/dist/index.js";
7
7
  import { WIDGET_NAME as t } from "./index2.js";
8
- import { cardsWidgetTestIds as n } from "./index3.js";
9
- import { resolveCardsListLabels as r } from "../../ui/dist/lib/CardsList/labels.js";
10
- import { CardsList as i } from "../../ui/dist/lib/CardsList/CardsList.js";
11
- import { CardsListDetailsSheet as a } from "../../ui/dist/lib/CardsList/CardsListDetailsSheet.js";
8
+ import { cardsListDetailsSheetTestIds as n, cardsListTestIds as r } from "./index3.js";
9
+ import { resolveCardsListLabels as i } from "../../ui/dist/lib/CardsList/labels.js";
10
+ import { CardsList as a } from "../../ui/dist/lib/CardsList/CardsList.js";
11
+ import { CardsListDetailsSheet as o } from "../../ui/dist/lib/CardsList/CardsListDetailsSheet.js";
12
12
  import "../../ui/dist/index.js";
13
- import { useCardsWidget as o } from "./index8.js";
14
- import { CardDetailsWidget as s } from "../../../card-details-widget/feature/dist/index13.js";
13
+ import { useCardsWidget as s } from "./index8.js";
14
+ import { CardDetailsWidget as c } from "../../../card-details-widget/feature/dist/index13.js";
15
15
  import "../../../card-details-widget/feature/dist/index.js";
16
- import { CreateCardWidget as c } from "../../../create-card-widget/feature/dist/index8.js";
16
+ import { CreateCardWidget as l } from "../../../create-card-widget/feature/dist/index8.js";
17
17
  import "../../../create-card-widget/feature/dist/index.js";
18
- import { useCallback as l, useMemo as u, useState as d } from "react";
19
- import { Fragment as f, jsx as p, jsxs as m } from "react/jsx-runtime";
18
+ import { useCallback as u, useMemo as d, useState as f } from "react";
19
+ import { Fragment as p, jsx as m, jsxs as h } from "react/jsx-runtime";
20
20
  //#region ../../libs/tesouro-embedded-components-react/cards-widget/feature/dist/index9.js
21
- function h({ cardProgram: e, pagination: t, defaultPagination: h, onPaginationChange: g, labels: _, featureLabels: v, selectedCardId: y, defaultSelectedCardId: b, onSelectedCardIdChange: x, cardDetailsLabels: S, cardDetailsFeatureLabels: C, cardDetailsActivateLabels: w, bankLogoSrc: T, bankLogoAlt: E, cardArtSrc: D, createCardLabels: O, createCardFeatureLabels: k, onCreateCard: A, onActivateCard: j }) {
22
- let { selectedCardId: M, onSelectCard: N, onCreateCardClick: P, canCreateCard: F, canReadCards: I, ...L } = o({
21
+ function g({ cardProgram: e, pagination: t, defaultPagination: g, onPaginationChange: _, labels: v, featureLabels: y, selectedCardId: b, defaultSelectedCardId: x, onSelectedCardIdChange: S, cardDetailsLabels: C, cardDetailsFeatureLabels: w, cardDetailsActivateLabels: T, bankLogoSrc: E, bankLogoAlt: D, cardArtSrc: O, createCardLabels: k, createCardFeatureLabels: A, onCreateCard: j, onActivateCard: M }) {
22
+ let { selectedCardId: N, onSelectCard: P, onCreateCardClick: F, canCreateCard: I, canReadCards: L, ...R } = s({
23
23
  cardProgram: e,
24
24
  pagination: t,
25
- defaultPagination: h,
26
- onPaginationChange: g,
27
- featureLabels: v,
28
- selectedCardId: y,
29
- defaultSelectedCardId: b,
30
- onSelectedCardIdChange: x,
31
- onCreateCard: A,
32
- onActivateCard: j,
33
- cardArtSrc: D
34
- }), R = u(() => r(_), [_]), [z, B] = d(!1), [V, H] = d(0), [U, W] = d(M), [G, K] = d(null), q = l(() => {
35
- M !== null && N(null), H((e) => e + 1), B(!0);
36
- }, [M, N]), J = l(() => {
37
- B(!1), M !== null && N(null);
38
- }, [M, N]), Y = l((e) => {
39
- B(!1), N(e);
40
- }, [N]), X = e === "debit" && !!D && !!F && P === void 0, Z = z && M === null && X;
41
- z && (M !== null || !X) && B(!1), Z ? G !== "create" && K("create") : M !== null && (G !== "details" && K("details"), M !== U && W(M));
42
- let Q = G === "create", $ = M !== null || Z;
43
- return /* @__PURE__ */ m(f, { children: [/* @__PURE__ */ p(i, {
44
- ...L,
45
- canCreateCard: F,
46
- onCreateCardClick: P ?? q,
47
- labels: R,
48
- testIds: {
49
- root: n.list,
50
- row: { cardFaceSwatch: { root: n.cardFaceSwatch } }
51
- }
52
- }), /* @__PURE__ */ p(a, {
53
- isOpen: $,
54
- labels: Q ? R.createSheet : R.detailsSheet,
55
- contentClassName: Q ? "ttw:overflow-hidden ttw:p-0 ttw:min-h-0" : void 0,
56
- onClose: J,
57
- children: Q && X && D ? /* @__PURE__ */ p(c, {
58
- cardArtSrc: D,
59
- labels: O,
60
- featureLabels: k,
61
- onClose: J,
62
- onCancel: J,
63
- onViewCard: I ? Y : void 0,
25
+ defaultPagination: g,
26
+ onPaginationChange: _,
27
+ featureLabels: y,
28
+ selectedCardId: b,
29
+ defaultSelectedCardId: x,
30
+ onSelectedCardIdChange: S,
31
+ onCreateCard: j,
32
+ onActivateCard: M,
33
+ cardArtSrc: O
34
+ }), z = d(() => i(v), [v]), [B, V] = f(!1), [H, U] = f(0), [W, G] = f(N), [K, q] = f(null), J = u(() => {
35
+ N !== null && P(null), U((e) => e + 1), V(!0);
36
+ }, [N, P]), Y = u(() => {
37
+ V(!1), N !== null && P(null);
38
+ }, [N, P]), X = u((e) => {
39
+ V(!1), P(e);
40
+ }, [P]), Z = e === "debit" && !!O && !!I && F === void 0, Q = B && N === null && Z;
41
+ B && (N !== null || !Z) && V(!1), Q ? K !== "create" && q("create") : N !== null && (K !== "details" && q("details"), N !== W && G(N));
42
+ let $ = K === "create", ee = N !== null || Q;
43
+ return /* @__PURE__ */ h(p, { children: [/* @__PURE__ */ m(a, {
44
+ ...R,
45
+ canCreateCard: I,
46
+ onCreateCardClick: F ?? J,
47
+ labels: z,
48
+ testIds: r
49
+ }), /* @__PURE__ */ m(o, {
50
+ isOpen: ee,
51
+ labels: $ ? z.createSheet : z.detailsSheet,
52
+ contentClassName: $ ? "ttw:overflow-hidden ttw:p-0 ttw:min-h-0" : void 0,
53
+ onClose: Y,
54
+ testIds: n,
55
+ children: $ && Z && O ? /* @__PURE__ */ m(l, {
56
+ cardArtSrc: O,
57
+ labels: k,
58
+ featureLabels: A,
59
+ onClose: Y,
60
+ onCancel: Y,
61
+ onViewCard: L ? X : void 0,
64
62
  className: "ttw:min-h-0 ttw:flex-1"
65
- }, V) : U === null ? null : /* @__PURE__ */ p(s, {
66
- cardId: U,
63
+ }, H) : W === null ? null : /* @__PURE__ */ m(c, {
64
+ cardId: W,
67
65
  cardProgram: e,
68
- labels: S,
69
- activateLabels: w,
70
- featureLabels: C,
71
- bankLogoSrc: T,
72
- bankLogoAlt: E,
73
- onClose: J
74
- }, U)
66
+ labels: C,
67
+ activateLabels: T,
68
+ featureLabels: w,
69
+ bankLogoSrc: E,
70
+ bankLogoAlt: D,
71
+ onClose: Y
72
+ }, W)
75
73
  })] });
76
74
  }
77
- function g({ baseUrl: n, widgetToken: r, organizationId: i, configClient: a, gatewayRouting: o, linkComponent: s, implementation: c, uiFramework: l, errorFallback: u, onError: d, analytics: f, disclosuresAcceptance: m, providerLabels: g, ..._ }) {
78
- return /* @__PURE__ */ p(e, {
75
+ function _({ baseUrl: n, widgetToken: r, organizationId: i, configClient: a, gatewayRouting: o, linkComponent: s, implementation: c, uiFramework: l, errorFallback: u, onError: d, analytics: f, disclosuresAcceptance: p, providerLabels: h, ..._ }) {
76
+ return /* @__PURE__ */ m(e, {
79
77
  widgetName: t,
80
78
  baseUrl: n,
81
79
  widgetToken: r,
@@ -88,10 +86,10 @@ function g({ baseUrl: n, widgetToken: r, organizationId: i, configClient: a, gat
88
86
  errorFallback: u,
89
87
  onError: d,
90
88
  analytics: f,
91
- disclosuresAcceptance: m,
92
- providerLabels: g,
93
- children: /* @__PURE__ */ p(h, { ..._ })
89
+ disclosuresAcceptance: p,
90
+ providerLabels: h,
91
+ children: /* @__PURE__ */ m(g, { ..._ })
94
92
  });
95
93
  }
96
94
  //#endregion
97
- export { g as CardsWidget, g as default };
95
+ export { _ as CardsWidget, _ as default };
@@ -88,7 +88,8 @@ function w({ rows: t, columns: g, isLoading: S = !1, isError: w = !1, canToggleS
88
88
  title: U.errorTitle,
89
89
  description: U.errorDescription,
90
90
  retryLabel: U.retryButton,
91
- onRetry: A
91
+ onRetry: A,
92
+ testId: V?.error
92
93
  })
93
94
  })
94
95
  }) : S ? /* @__PURE__ */ _(C, { columnCount: K }) : t.length === 0 ? /* @__PURE__ */ _(c, {
@@ -105,7 +106,8 @@ function w({ rows: t, columns: g, isLoading: S = !1, isError: w = !1, canToggleS
105
106
  "aria-hidden": !0,
106
107
  className: "ttw:size-4"
107
108
  }),
108
- onAction: W ? k : void 0
109
+ onAction: W ? k : void 0,
110
+ testId: V?.empty
109
111
  })
110
112
  })
111
113
  }) : t.map((e) => /* @__PURE__ */ _(p, {
@@ -7,8 +7,8 @@ import { CARDS_LIST_LABELS_EN as a } from "./labels.js";
7
7
  import { useMemo as o } from "react";
8
8
  import { jsx as s, jsxs as c } from "react/jsx-runtime";
9
9
  //#region ../../libs/tesouro-embedded-components-react/cards-widget/ui/dist/lib/CardsList/CardsListDetailsSheet.js
10
- function l({ isOpen: l, onClose: u, labels: d, contentClassName: f, children: p }) {
11
- let m = o(() => ({
10
+ function l({ isOpen: l, onClose: u, labels: d, contentClassName: f, testIds: p, children: m }) {
11
+ let h = o(() => ({
12
12
  ...a.detailsSheet,
13
13
  ...d
14
14
  }), [d]);
@@ -19,17 +19,18 @@ function l({ isOpen: l, onClose: u, labels: d, contentClassName: f, children: p
19
19
  },
20
20
  children: /* @__PURE__ */ c(t, {
21
21
  showCloseButton: !1,
22
+ "data-testid": p?.root,
22
23
  className: i("ttw:w-168 ttw:sm:max-w-168", "ttw:!gap-0", f ?? "ttw:overflow-y-auto"),
23
24
  children: [
24
25
  /* @__PURE__ */ s(r, {
25
26
  className: "ttw:sr-only",
26
- children: m.title
27
+ children: h.title
27
28
  }),
28
29
  /* @__PURE__ */ s(n, {
29
30
  className: "ttw:sr-only",
30
- children: m.description
31
+ children: h.description
31
32
  }),
32
- p
33
+ m
33
34
  ]
34
35
  })
35
36
  });
@@ -80,7 +80,7 @@ function l({ row: i, columns: a, labels: l, testIds: u }) {
80
80
  })
81
81
  };
82
82
  return /* @__PURE__ */ s(n, {
83
- "data-testid": `cards-list-row-${i.key}`,
83
+ "data-testid": u?.rootPrefix ? `${u.rootPrefix}-${i.key}` : void 0,
84
84
  className: f ? "ttw:relative ttw:h-18 ttw:cursor-pointer" : "ttw:h-18",
85
85
  children: [a.map((e, n) => /* @__PURE__ */ s(t, { children: [n === 0 && f ? /* @__PURE__ */ o("button", {
86
86
  type: "button",
@@ -2,9 +2,9 @@
2
2
  "use client";
3
3
  "use client";
4
4
  "use client";
5
- import { buildAnalyticsMap as e, buildCounterpartRows as t } from "../../../shared/counterpart-management/feature/dist/lib/helpers.js";
6
- import { useCounterpartsQuery as n } from "../../../shared/counterpart-management/data-access/dist/index3.js";
7
- import { useCounterpartAddressesForRowsQuery as r } from "../../../shared/counterpart-management/data-access/dist/index7.js";
5
+ import { useCounterpartsQuery as e } from "../../../shared/counterpart-management/data-access/dist/index3.js";
6
+ import { useCounterpartAddressesForRowsQuery as t } from "../../../shared/counterpart-management/data-access/dist/index7.js";
7
+ import { buildAnalyticsMap as n, buildCounterpartRows as r } from "../../../shared/counterpart-management/feature/dist/lib/helpers.js";
8
8
  import "../../../shared/counterpart-management/feature/dist/index.js";
9
9
  import { PAYABLES_BILLED_STATUSES as i, PAYABLES_OWED_STATUSES as a, RECEIVABLES_BILLED_STATUSES as o, RECEIVABLES_DUE_STATUSES as s } from "./index3.js";
10
10
  import { usePayablesAnalyticsByCounterpartQuery as c, useReceivablesAnalyticsByCounterpartQuery as l } from "../../data-access/dist/index2.js";
@@ -19,7 +19,7 @@ function m({ isCustomer: m, enabled: h = !0 }) {
19
19
  }, 400);
20
20
  return () => clearTimeout(e);
21
21
  }, [S]);
22
- let O = g[0]?.desc ? "desc" : "asc", k = n({
22
+ let O = g[0]?.desc ? "desc" : "asc", k = e({
23
23
  sort: "counterpart_name",
24
24
  order: O,
25
25
  limit: v,
@@ -28,7 +28,7 @@ function m({ isCustomer: m, enabled: h = !0 }) {
28
28
  type: E === "all" ? void 0 : E,
29
29
  ...m ? { is_customer: !0 } : { is_vendor: !0 },
30
30
  enabled: h
31
- }), A = f(() => k.data?.data.map((e) => e.id) ?? [], [k.data?.data]), j = A.length > 0, M = r({
31
+ }), A = f(() => k.data?.data.map((e) => e.id) ?? [], [k.data?.data]), j = A.length > 0, M = t({
32
32
  counterpartIds: A,
33
33
  enabled: h && j
34
34
  }), N = l({
@@ -51,15 +51,15 @@ function m({ isCustomer: m, enabled: h = !0 }) {
51
51
  statusIn: [...a],
52
52
  counterpartIdIn: A,
53
53
  enabled: h && !m && j
54
- }), L = f(() => m ? N.data ? e(N.data.data) : void 0 : F.data ? e(F.data.data) : void 0, [
54
+ }), L = f(() => m ? N.data ? n(N.data.data) : void 0 : F.data ? n(F.data.data) : void 0, [
55
55
  m,
56
56
  N.data,
57
57
  F.data
58
- ]), R = f(() => m ? P.data ? e(P.data.data) : void 0 : I.data ? e(I.data.data) : void 0, [
58
+ ]), R = f(() => m ? P.data ? n(P.data.data) : void 0 : I.data ? n(I.data.data) : void 0, [
59
59
  m,
60
60
  P.data,
61
61
  I.data
62
- ]), z = f(() => new Map(A.map((e, t) => [e, M[t]?.data?.data?.[0]])), [A, M]), B = f(() => t({
62
+ ]), z = f(() => new Map(A.map((e, t) => [e, M[t]?.data?.data?.[0]])), [A, M]), B = f(() => r({
63
63
  counterparts: k.data?.data ?? [],
64
64
  addresses: z,
65
65
  billedAmounts: L,
@@ -5,8 +5,8 @@
5
5
  import { usePaymentTermsQuery as e } from "../../../shared/data-access/dist/lib/reference-data/usePaymentTermsQuery.js";
6
6
  import { getStateOptions as t } from "../../../shared/util/dist/lib/usStates.js";
7
7
  import { extractApiErrorMessage as n } from "../../../shared/util/dist/lib/apiErrors.js";
8
- import { COUNTERPART_MESSAGE_LABELS_EN as r } from "../../../shared/counterpart-management/feature/dist/lib/labels.js";
9
- import { useCounterpartAddressesQuery as i } from "../../../shared/counterpart-management/data-access/dist/index7.js";
8
+ import { useCounterpartAddressesQuery as r } from "../../../shared/counterpart-management/data-access/dist/index7.js";
9
+ import { COUNTERPART_MESSAGE_LABELS_EN as i } from "../../../shared/counterpart-management/feature/dist/lib/labels.js";
10
10
  import { useCounterpartForm as ee } from "../../../shared/counterpart-management/feature/dist/lib/useCounterpartForm.js";
11
11
  import "../../../shared/counterpart-management/feature/dist/index.js";
12
12
  import { createEmptyReceivableFormValues as a, createLineItem as o, getPaymentTermOptions as s, hasReceivableFormErrors as c, receivableFormValuesToCreatePayload as l, receivableFormValuesToLineItemsPayload as te, receivableFormValuesToUpdatePayload as u, receivableToFormValues as d, validateReceivableForm as f } from "./index5.js";
@@ -24,9 +24,9 @@ function x({ messages: x, productMessageLabels: S, counterpartMessageLabels: C,
24
24
  ...ie,
25
25
  ...S
26
26
  }), [S]), J = y(() => ({
27
- ...r,
27
+ ...i,
28
28
  ...C
29
- }), [C]), Y = i(F.customerId), ae = Y.data?.data?.[0], X = Y.data?.data?.[0]?.id, Z = _({
29
+ }), [C]), Y = r(F.customerId), ae = Y.data?.data?.[0], X = Y.data?.data?.[0]?.id, Z = _({
30
30
  view: z,
31
31
  setView: B,
32
32
  selectedProductId: U,
@@ -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);