@tesouro/embedded-components-react 0.5.28 → 0.5.31

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 (118) hide show
  1. package/README.md +14 -13
  2. package/dist/index.css +15 -0
  3. package/dist/index.d.ts +9 -0
  4. package/dist/index.js +1 -1
  5. package/dist/lib/BankAccountOnboardingWidget.d.ts +9 -0
  6. package/dist/lib/BillPayWidget.js +1 -1
  7. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/index18.js +155 -151
  8. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index.js +5 -5
  9. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index14.js +2 -44
  10. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index.js +7 -7
  11. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index12.js +1 -1
  12. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index15.js +1 -1
  13. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index25.js +2 -2
  14. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index27.js +2 -2
  15. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index43.js +52 -67
  16. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index46.js +15 -12
  17. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index48.js +57 -62
  18. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index49.js +1 -1
  19. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index51.js +68 -207
  20. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index52.js +278 -175
  21. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index53.js +13 -126
  22. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index54.js +47 -12
  23. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index55.js +53 -47
  24. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index56.js +204 -49
  25. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index57.js +32 -202
  26. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index58.js +234 -32
  27. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index59.js +21 -240
  28. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index60.js +532 -19
  29. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index61.js +4 -436
  30. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index62.js +42 -4
  31. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index63.js +230 -35
  32. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index64.js +3 -233
  33. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index65.js +4 -3
  34. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index66.js +44 -2
  35. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index67.js +1 -46
  36. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index68.js +8 -1
  37. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index69.js +11 -6
  38. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index70.js +127 -11
  39. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index71.js +3 -129
  40. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index72.js +127 -3
  41. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index73.js +8 -124
  42. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index74.js +7 -8
  43. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index75.js +46 -8
  44. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index76.js +18 -43
  45. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index77.js +28 -20
  46. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index78.js +82 -27
  47. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index79.js +47 -83
  48. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index80.js +250 -47
  49. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index81.js +122 -241
  50. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index82.js +206 -126
  51. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index83.js +3 -213
  52. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index84.js +8 -4
  53. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index85.js +113 -6
  54. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index86.js +1 -115
  55. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index87.js +24 -0
  56. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index.js +39 -33
  57. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index101.js +10 -11
  58. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index102.js +123 -8
  59. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index103.js +2 -170
  60. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index104.js +18 -2
  61. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index105.js +7 -11
  62. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index106.js +158 -96
  63. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index107.js +1 -1
  64. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index108.js +11 -7
  65. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index109.js +100 -44
  66. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index111.js +10 -0
  67. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index112.js +52 -0
  68. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index113.js +2 -0
  69. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index13.js +1 -1
  70. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index26.js +20 -22
  71. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index27.js +4 -9
  72. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index28.js +103 -146
  73. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index30.js +3 -2
  74. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index31.js +93 -88
  75. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index46.js +15 -16
  76. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index48.js +1 -0
  77. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index50.js +43 -29
  78. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index65.js +55 -51
  79. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index66.js +9 -2
  80. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index67.js +33 -1
  81. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index68.js +2 -8
  82. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index69.js +2 -39
  83. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index70.js +0 -1
  84. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index71.js +6 -2
  85. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index72.js +34 -31
  86. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index74.js +2 -37
  87. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index75.js +34 -10
  88. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index76.js +2 -201
  89. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index77.js +39 -3
  90. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index78.js +3 -8
  91. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index79.js +187 -350
  92. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index80.js +3 -10
  93. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index81.js +13 -5
  94. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index82.js +356 -85
  95. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index83.js +10 -0
  96. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index84.js +9 -2
  97. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index85.js +87 -119
  98. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index87.js +2 -94
  99. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index88.js +125 -2
  100. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index89.js +25 -4
  101. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index90.js +90 -26
  102. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index92.js +3 -3
  103. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index93.js +26 -30
  104. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index95.js +4 -9
  105. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index96.js +30 -102
  106. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index98.js +9 -14
  107. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index99.js +85 -104
  108. package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/data-access/dist/index.js +5 -5
  109. package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/feature/dist/index.js +17 -17
  110. package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/feature/dist/lib/useCounterpartDetails.js +4 -0
  111. package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/feature/dist/lib/useCounterpartForm.js +92 -87
  112. package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/analytics/build-info.js +1 -1
  113. package/dist/libs/tesouro-embedded-components-react/shared/ui/dist/lib/OnboardingShell/OnboardingShell.js +126 -105
  114. package/dist/libs/tesouro-embedded-components-react/shared/ui/dist/lib/OnboardingShell/OnboardingShellOverlayPortal.js +13 -6
  115. package/dist/libs/tesouro-embedded-components-react/widget-suite/feature/dist/index8.js +1 -1
  116. package/package.json +1 -1
  117. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index88.js +0 -25
  118. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index86.js +0 -28
@@ -7,144 +7,149 @@ import { useCreateCounterpartMutation as t, useUpdateCounterpartMutation as n }
7
7
  import { useCreateCounterpartBankAccountMutation as r, useUpdateCounterpartBankAccountMutation as i } from "../../../data-access/dist/index5.js";
8
8
  import { useCreateCounterpartAddressMutation as a, useUpdateCounterpartAddressMutation as o } from "../../../data-access/dist/index7.js";
9
9
  import "../../../data-access/dist/index.js";
10
- import { addressFormToCreatePayload as s, addressFormToUpdatePayload as c, addressResponseToFormValues as l, counterpartFormBankAccountToCreatePayload as u, counterpartFormBankAccountToUpdatePayload as d, counterpartFormToCreatePayload as f, counterpartFormToUpdatePayload as p, counterpartToFormValues as m, emptyCounterpartFormValues as h, getAchInstructions as g, hasCounterpartFormAddressValues as _, hasCounterpartFormBankAccountValues as v, hasCounterpartFormErrors as y, resolveCounterpartBankAccountWrite as b, validateCounterpartForm as x } from "./helpers.js";
11
- import { useCallback as S, useState as C } from "react";
10
+ import { addressFormToCreatePayload as s, addressFormToUpdatePayload as c, addressResponseToFormValues as l, counterpartFormBankAccountToCreatePayload as u, counterpartFormBankAccountToUpdatePayload as d, counterpartFormToCreatePayload as f, counterpartFormToUpdatePayload as p, counterpartToFormValues as m, emptyCounterpartFormValues as h, getAchInstructions as g, hasCounterpartFormAddressValues as _, hasCounterpartFormBankAccountValues as v, hasCounterpartFormErrors as ee, resolveCounterpartBankAccountWrite as y, validateCounterpartForm as b } from "./helpers.js";
11
+ import { useCallback 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 w(e, t) {
13
+ function C(e, t) {
14
14
  if (!t) return _(e);
15
15
  let n = l(t);
16
16
  return e.address.line1.trim() !== n.line1.trim() || e.address.line2.trim() !== n.line2.trim() || e.address.city.trim() !== n.city.trim() || e.address.state.trim() !== n.state.trim() || e.address.postalCode.trim() !== n.postalCode.trim();
17
17
  }
18
- function T(e) {
18
+ function w(e) {
19
19
  return {
20
20
  accountHolderName: e.account_holder_name ?? "",
21
21
  routingNumber: e.routing_number ?? "",
22
22
  accountNumber: e.account_number ?? ""
23
23
  };
24
24
  }
25
- function E(e, t) {
25
+ function T(e, t) {
26
26
  if (!t) return v(e);
27
- let n = T(t);
27
+ let n = w(t);
28
28
  return e.bankAccount.accountHolderName.trim() !== n.accountHolderName.trim() || e.bankAccount.routingNumber.trim() !== n.routingNumber.trim() || e.bankAccount.accountNumber.trim() !== n.accountNumber.trim();
29
29
  }
30
- function D({ view: l, setView: D, selectedId: O, setSelectedId: k, messages: A, counterpartType: j, counterpart: M, primaryAddress: N, bankAccounts: P, isBankAccountsLoading: F, isBankAccountsError: I }) {
31
- let L = t(), R = a(), z = r(), B = n(), V = o(), H = i(), [U, W] = C(() => h()), [G, K] = C({}), [q, J] = C({
30
+ function E({ view: l, setView: E, selectedId: D, setSelectedId: O, messages: k, counterpartType: A, counterpart: j, primaryAddress: M, bankAccounts: N, isBankAccountsLoading: P, isBankAccountsError: F, includeBankAccount: I = !0 }) {
31
+ let L = A === "vendor" && I, R = t(), z = a(), B = r(), V = n(), H = o(), U = i(), [W, G] = S(() => h()), [K, q] = S({}), [J, Y] = S({
32
32
  address: !1,
33
33
  bankAccount: !1
34
- }), [Y, X] = C(), [Z, Q] = C(), $ = L.isPending || R.isPending || z.isPending || H.isPending || B.isPending || V.isPending, ee = S(() => {
35
- k(void 0), Q(void 0), X(void 0), J({
36
- address: j === "vendor",
34
+ }), [X, Z] = S(), [Q, $] = S(), te = R.isPending || z.isPending || B.isPending || U.isPending || V.isPending || H.isPending, ne = x(() => {
35
+ O(void 0), $(void 0), Z(void 0), Y({
36
+ address: A === "vendor",
37
37
  bankAccount: !1
38
- }), W(h("organization", j)), K({}), D("create");
38
+ }), G(h("organization", A)), q({}), E("create");
39
39
  }, [
40
- j,
41
- k,
42
- D
43
- ]), te = S(() => {
44
- if (!M || j === "vendor" && (F || I)) return;
45
- let e = g(P), t = m(M, N);
46
- Q(void 0), X(e?.id), J({
40
+ A,
41
+ O,
42
+ E
43
+ ]), re = x(() => {
44
+ if (!j || L && (P || F)) return;
45
+ let e = L ? g(N) : void 0, t = m(j, M);
46
+ $(void 0), Z(e?.id), Y({
47
47
  address: _(t),
48
48
  bankAccount: !1
49
- }), W({
49
+ }), G({
50
50
  ...t,
51
- ...e ? { bankAccount: T(e) } : {}
52
- }), K({}), D("edit");
51
+ ...e ? { bankAccount: w(e) } : {}
52
+ }), q({}), E("edit");
53
53
  }, [
54
- P,
55
- M,
54
+ N,
56
55
  j,
57
- I,
58
56
  F,
59
- N,
60
- D
61
- ]), ne = S(() => {
62
- D("none");
63
- }, [D]);
57
+ P,
58
+ M,
59
+ E,
60
+ L
61
+ ]), ie = x(() => {
62
+ E("none");
63
+ }, [E]);
64
64
  return {
65
- values: U,
66
- errors: G,
67
- setValues: W,
68
- isSubmitting: $,
69
- sectionsToExpand: q,
70
- expandAddress: S(() => {
71
- J((e) => ({
65
+ values: W,
66
+ errors: K,
67
+ setValues: G,
68
+ isSubmitting: te,
69
+ sectionsToExpand: J,
70
+ expandAddress: x(() => {
71
+ Y((e) => ({
72
72
  ...e,
73
73
  address: !0
74
74
  }));
75
75
  }, []),
76
- openCreate: ee,
77
- openEdit: te,
78
- close: ne,
79
- submit: S(async () => {
80
- let t = l === "edit" ? "edit" : "create", n = x(U, t, A, j, t === "edit" && j === "vendor" && !!Y);
81
- if (y(n)) {
82
- K(n), J((e) => ({
83
- address: e.address || !!n.address,
84
- bankAccount: e.bankAccount || !!n.bankAccount
85
- }));
86
- return;
87
- }
88
- K({}), J({
76
+ openCreate: ne,
77
+ openEdit: re,
78
+ close: ie,
79
+ submit: x(async () => {
80
+ let t = l === "edit" ? "edit" : "create", n = b(W, t, k, A, t === "edit" && L && !!X);
81
+ if (ee(n)) return q(n), Y((e) => ({
82
+ address: e.address || !!n.address,
83
+ bankAccount: e.bankAccount || !!n.bankAccount
84
+ })), { ok: !1 };
85
+ q({}), Y({
89
86
  address: !1,
90
87
  bankAccount: !1
91
88
  });
92
- let r = Z;
89
+ let r = Q;
93
90
  try {
94
- if (l === "edit" && O) {
95
- Q(void 0), await B.mutateAsync({
96
- path: { counterpart_id: O },
97
- body: p(U, j)
91
+ if (l === "edit" && D) {
92
+ $(void 0), await V.mutateAsync({
93
+ path: { counterpart_id: D },
94
+ body: p(W, A)
98
95
  });
99
- let e = N ? w(U, N) ? V.mutateAsync({
96
+ let e = M ? C(W, M) ? H.mutateAsync({
100
97
  path: {
101
- counterpart_id: O,
102
- address_id: N.id
98
+ counterpart_id: D,
99
+ address_id: M.id
103
100
  },
104
- body: c(U.address)
105
- }) : void 0 : _(U) ? R.mutateAsync({
106
- path: { counterpart_id: O },
107
- body: s(U.address)
108
- }) : void 0, t = j === "vendor" && E(U, g(P)) ? b(P, Y) : void 0, n = t?.kind === "update" ? H.mutateAsync({
101
+ body: c(W.address)
102
+ }) : void 0 : _(W) ? z.mutateAsync({
103
+ path: { counterpart_id: D },
104
+ body: s(W.address)
105
+ }) : void 0, t = L && T(W, g(N)) ? y(N, X) : void 0, n = t?.kind === "update" ? U.mutateAsync({
109
106
  path: {
110
- counterpart_id: O,
107
+ counterpart_id: D,
111
108
  bank_account_id: t.bankAccountId
112
109
  },
113
- body: d(U.bankAccount, { includeAchDefaults: t.includeAchDefaults })
114
- }) : t?.kind === "create" ? z.mutateAsync({
115
- path: { counterpart_id: O },
116
- body: u(U.bankAccount, { isDefaultForCurrency: t.isDefaultForCurrency })
110
+ body: d(W.bankAccount, { includeAchDefaults: t.includeAchDefaults })
111
+ }) : t?.kind === "create" ? B.mutateAsync({
112
+ path: { counterpart_id: D },
113
+ body: u(W.bankAccount, { isDefaultForCurrency: t.isDefaultForCurrency })
117
114
  }) : void 0, [r, i] = await Promise.allSettled([e, n]);
118
- if (t?.kind === "create" && i.status === "fulfilled" && X(i.value?.id), r.status === "rejected") throw r.reason;
115
+ if (t?.kind === "create" && i.status === "fulfilled" && Z(i.value?.id), r.status === "rejected") throw r.reason;
119
116
  if (i.status === "rejected") throw i.reason;
120
- D("none");
121
- } else r ||= (await L.mutateAsync({ body: f(U, j) }))?.id, r && j === "vendor" && v(U) && (Q(r), await z.mutateAsync({
117
+ return E("none"), {
118
+ ok: !0,
119
+ counterpartId: D
120
+ };
121
+ }
122
+ return r ||= (await R.mutateAsync({ body: f(W, A) }))?.id, r && L && v(W) && ($(r), await B.mutateAsync({
122
123
  path: { counterpart_id: r },
123
- body: u(U.bankAccount)
124
- })), Q(void 0), D("none"), r && k(r);
124
+ body: u(W.bankAccount)
125
+ })), $(void 0), E("none"), r && O(r), {
126
+ ok: !0,
127
+ counterpartId: r
128
+ };
125
129
  } catch (t) {
126
- r && (Q(r), k(r)), K({ form: e(t) ?? A.genericError });
130
+ return r && ($(r), O(r)), q({ form: e(t) ?? k.genericError }), { ok: !1 };
127
131
  }
128
132
  }, [
129
133
  l,
130
- U,
131
- O,
132
- Z,
134
+ W,
135
+ D,
136
+ Q,
137
+ k,
133
138
  A,
134
- j,
139
+ M,
135
140
  N,
136
- P,
137
- Y,
138
- R,
141
+ X,
139
142
  z,
140
- L,
141
- V,
142
- H,
143
143
  B,
144
- D,
145
- k
144
+ R,
145
+ H,
146
+ U,
147
+ V,
148
+ E,
149
+ O,
150
+ L
146
151
  ])
147
152
  };
148
153
  }
149
154
  //#endregion
150
- export { D as useCounterpartForm };
155
+ export { E as useCounterpartForm };
@@ -1,5 +1,5 @@
1
1
  //#region ../../libs/tesouro-embedded-components-react/shared/feature/dist/lib/analytics/build-info.js
2
- var e = "@tesouro/embedded-components-react", t = "0.5.28", n = "28face4054157f426e8305d0f9e915185165803c", r = Object.freeze({
2
+ var e = "@tesouro/embedded-components-react", t = "0.5.31", n = "c07219435de2aa7cc613f43fc993c42d9f6c739d", r = Object.freeze({
3
3
  library_name: e,
4
4
  library_version: t,
5
5
  library_sha: n
@@ -10,120 +10,141 @@ import { jsx as m, jsxs as h } from "react/jsx-runtime";
10
10
  import { useControllableState as g } from "@radix-ui/react-use-controllable-state";
11
11
  import { Check as _, X as v } from "lucide-react";
12
12
  //#region ../../libs/tesouro-embedded-components-react/shared/ui/dist/lib/OnboardingShell/OnboardingShell.js
13
- function y({ open: y, defaultOpen: b = !0, onOpenChange: x, title: S, subtitle: C, stepLabels: w, activeStep: T, disclaimerText: E, onBack: D, onNext: O, onCancel: k, isBackDisabled: A = !1, showDismissButton: j = !0, isNextDisabled: M = !1, isNextLoading: N = !1, nextLabel: P, nextIcon: F, errorMessage: I, children: L, labels: R, testIds: z }) {
14
- let B = {
13
+ function y({ isFullScreenInline: e, className: t, children: n }) {
14
+ return m(e ? "h2" : a, {
15
+ className: t,
16
+ children: n
17
+ });
18
+ }
19
+ function b({ isFullScreenInline: e, className: t, children: n }) {
20
+ return m(e ? "p" : i, {
21
+ className: t,
22
+ children: n
23
+ });
24
+ }
25
+ function x({ open: i, defaultOpen: a = !0, onOpenChange: x, isFullScreenInline: S = !1, title: C, subtitle: w, stepLabels: T, activeStep: E, disclaimerText: D, onBack: O, onNext: k, onCancel: A, isBackDisabled: j = !1, showDismissButton: M = !0, isNextDisabled: N = !1, isNextLoading: P = !1, nextLabel: F, nextIcon: I, errorMessage: L, children: R, labels: z, testIds: B }) {
26
+ let V = {
15
27
  ...c,
16
- ...R
17
- }, [V, H] = g({
18
- prop: y,
19
- defaultProp: b,
28
+ ...z
29
+ }, [H, U] = g({
30
+ prop: i,
31
+ defaultProp: a,
20
32
  onChange: x
21
- }), [U, W] = p.useState(null), G = p.useCallback((e) => {
22
- W(e);
23
- }, []), K = !N && (F === void 0 ? /* @__PURE__ */ m(_, {
33
+ }), [W, G] = p.useState(null), K = p.useCallback((e) => {
34
+ G(e);
35
+ }, []), q = p.useMemo(() => ({
36
+ container: W,
37
+ isFullScreenInline: S
38
+ }), [W, S]), J = !P && (I === void 0 ? /* @__PURE__ */ m(_, {
24
39
  className: "ttw:size-5",
25
40
  "aria-hidden": !0
26
- }) : F);
27
- return /* @__PURE__ */ m(t, {
28
- open: V,
29
- onOpenChange: H,
41
+ }) : I), Y = M && !S, X = /* @__PURE__ */ h("div", {
42
+ ref: K,
43
+ className: S ? "ttw:relative ttw:grid ttw:h-full ttw:w-full ttw:min-h-0 ttw:grid-rows-[auto_1fr_auto] ttw:gap-0 ttw:overflow-hidden ttw:bg-background" : "ttw:relative ttw:grid ttw:max-h-[95vh] ttw:min-h-0 ttw:grid-rows-[auto_1fr_auto] ttw:gap-0",
44
+ "data-testid": S ? B?.root : void 0,
45
+ children: [
46
+ Y ? /* @__PURE__ */ h(n, {
47
+ className: "ttw:absolute ttw:right-4 ttw:top-4 ttw:cursor-pointer ttw:rounded-sm ttw:opacity-70 ttw:ring-offset-background ttw:transition-opacity ttw:hover:opacity-100 ttw:focus:outline-hidden ttw:focus:ring-2 ttw:focus:ring-ring ttw:focus:ring-offset-2 ttw:disabled:pointer-events-none ttw:data-[state=open]:bg-accent ttw:data-[state=open]:text-muted-foreground",
48
+ "data-testid": B?.dismiss,
49
+ children: [/* @__PURE__ */ m(v, {
50
+ className: "ttw:size-4",
51
+ "aria-hidden": !0
52
+ }), /* @__PURE__ */ m("span", {
53
+ className: "ttw:sr-only",
54
+ children: V.dismissAriaLabel
55
+ })]
56
+ }) : null,
57
+ /* @__PURE__ */ h("header", {
58
+ className: Y ? "ttw:px-8 ttw:pt-8 ttw:pr-14" : "ttw:px-8 ttw:pt-8",
59
+ children: [
60
+ /* @__PURE__ */ m(y, {
61
+ isFullScreenInline: S,
62
+ className: "ttw:text-2xl ttw:font-bold ttw:leading-tight ttw:text-foreground",
63
+ children: C
64
+ }),
65
+ /* @__PURE__ */ m(b, {
66
+ isFullScreenInline: S,
67
+ className: "ttw:mt-1 ttw:mb-4 ttw:text-sm ttw:text-muted-foreground",
68
+ children: w
69
+ }),
70
+ /* @__PURE__ */ m(l, {
71
+ stepLabels: T,
72
+ activeStep: E,
73
+ labels: z
74
+ })
75
+ ]
76
+ }),
77
+ /* @__PURE__ */ m(f, {
78
+ activeStep: E,
79
+ scrollForMoreLabel: V.scrollForMore,
80
+ testIds: B?.scrollRegion,
81
+ children: R
82
+ }),
83
+ /* @__PURE__ */ h("footer", {
84
+ className: "ttw:px-8 ttw:pb-8",
85
+ children: [
86
+ /* @__PURE__ */ m(o, { className: "ttw:mb-3" }),
87
+ /* @__PURE__ */ h("div", {
88
+ className: "ttw:mb-4 ttw:flex ttw:items-center ttw:gap-1",
89
+ children: [/* @__PURE__ */ m("p", {
90
+ className: "ttw:text-sm ttw:text-muted-foreground",
91
+ children: D
92
+ }), /* @__PURE__ */ m(d, {})]
93
+ }),
94
+ L ? /* @__PURE__ */ m(s, {
95
+ className: "ttw:mb-3",
96
+ children: L
97
+ }) : null,
98
+ /* @__PURE__ */ h("div", {
99
+ className: "ttw:flex ttw:items-center ttw:justify-between ttw:gap-3",
100
+ children: [/* @__PURE__ */ m(e, {
101
+ type: "button",
102
+ variant: "outline",
103
+ disabled: j || P,
104
+ onClick: O,
105
+ className: "ttw:h-auto ttw:rounded-2xl ttw:border-border ttw:px-5 ttw:py-3 ttw:text-base ttw:font-medium ttw:text-foreground ttw:hover:bg-muted ttw:hover:text-foreground",
106
+ "data-testid": B?.back,
107
+ children: V.backButton
108
+ }), /* @__PURE__ */ h("div", {
109
+ className: "ttw:flex ttw:items-center ttw:gap-3",
110
+ children: [A ? /* @__PURE__ */ m(e, {
111
+ type: "button",
112
+ variant: "outline",
113
+ disabled: P,
114
+ onClick: A,
115
+ className: "ttw:h-auto ttw:rounded-2xl ttw:border-border ttw:px-5 ttw:py-3 ttw:text-base ttw:font-medium ttw:text-foreground ttw:hover:bg-muted ttw:hover:text-foreground",
116
+ "data-testid": B?.cancel,
117
+ children: V.cancelButton
118
+ }) : null, /* @__PURE__ */ h(e, {
119
+ type: "button",
120
+ disabled: N || P,
121
+ loading: P,
122
+ onClick: k,
123
+ className: "ttw:h-auto ttw:rounded-2xl ttw:px-5 ttw:py-3 ttw:text-base ttw:font-medium",
124
+ "data-testid": B?.next,
125
+ children: [F, J]
126
+ })]
127
+ })]
128
+ })
129
+ ]
130
+ })
131
+ ]
132
+ });
133
+ return S ? /* @__PURE__ */ m(u.Provider, {
134
+ value: q,
135
+ children: X
136
+ }) : /* @__PURE__ */ m(t, {
137
+ open: H,
138
+ onOpenChange: U,
30
139
  children: /* @__PURE__ */ m(u.Provider, {
31
- value: U,
140
+ value: q,
32
141
  children: /* @__PURE__ */ m(r, {
33
142
  className: "ttw:max-h-[95vh] ttw:w-[720px] ttw:max-w-[calc(100vw-2rem)] ttw:overflow-hidden ttw:rounded-2xl ttw:p-0",
34
- "data-testid": z?.root,
35
- children: /* @__PURE__ */ h("div", {
36
- ref: G,
37
- className: "ttw:relative ttw:grid ttw:max-h-[95vh] ttw:min-h-0 ttw:grid-rows-[auto_1fr_auto] ttw:gap-0",
38
- children: [
39
- j ? /* @__PURE__ */ h(n, {
40
- className: "ttw:absolute ttw:right-4 ttw:top-4 ttw:cursor-pointer ttw:rounded-sm ttw:opacity-70 ttw:ring-offset-background ttw:transition-opacity ttw:hover:opacity-100 ttw:focus:outline-hidden ttw:focus:ring-2 ttw:focus:ring-ring ttw:focus:ring-offset-2 ttw:disabled:pointer-events-none ttw:data-[state=open]:bg-accent ttw:data-[state=open]:text-muted-foreground",
41
- "data-testid": z?.dismiss,
42
- children: [/* @__PURE__ */ m(v, {
43
- className: "ttw:size-4",
44
- "aria-hidden": !0
45
- }), /* @__PURE__ */ m("span", {
46
- className: "ttw:sr-only",
47
- children: B.dismissAriaLabel
48
- })]
49
- }) : null,
50
- /* @__PURE__ */ h("header", {
51
- className: j ? "ttw:px-8 ttw:pt-8 ttw:pr-14" : "ttw:px-8 ttw:pt-8",
52
- children: [
53
- /* @__PURE__ */ m(a, {
54
- className: "ttw:text-2xl ttw:font-bold ttw:leading-tight ttw:text-foreground",
55
- children: S
56
- }),
57
- /* @__PURE__ */ m(i, {
58
- className: "ttw:mt-1 ttw:mb-4 ttw:text-sm ttw:text-muted-foreground",
59
- children: C
60
- }),
61
- /* @__PURE__ */ m(l, {
62
- stepLabels: w,
63
- activeStep: T,
64
- labels: R
65
- })
66
- ]
67
- }),
68
- /* @__PURE__ */ m(f, {
69
- activeStep: T,
70
- scrollForMoreLabel: B.scrollForMore,
71
- testIds: z?.scrollRegion,
72
- children: L
73
- }),
74
- /* @__PURE__ */ h("footer", {
75
- className: "ttw:px-8 ttw:pb-8",
76
- children: [
77
- /* @__PURE__ */ m(o, { className: "ttw:mb-3" }),
78
- /* @__PURE__ */ h("div", {
79
- className: "ttw:mb-4 ttw:flex ttw:items-center ttw:gap-1",
80
- children: [/* @__PURE__ */ m("p", {
81
- className: "ttw:text-sm ttw:text-muted-foreground",
82
- children: E
83
- }), /* @__PURE__ */ m(d, {})]
84
- }),
85
- I ? /* @__PURE__ */ m(s, {
86
- className: "ttw:mb-3",
87
- children: I
88
- }) : null,
89
- /* @__PURE__ */ h("div", {
90
- className: "ttw:flex ttw:items-center ttw:justify-between ttw:gap-3",
91
- children: [/* @__PURE__ */ m(e, {
92
- type: "button",
93
- variant: "outline",
94
- disabled: A || N,
95
- onClick: D,
96
- className: "ttw:h-auto ttw:rounded-2xl ttw:border-border ttw:px-5 ttw:py-3 ttw:text-base ttw:font-medium ttw:text-foreground ttw:hover:bg-muted ttw:hover:text-foreground",
97
- "data-testid": z?.back,
98
- children: B.backButton
99
- }), /* @__PURE__ */ h("div", {
100
- className: "ttw:flex ttw:items-center ttw:gap-3",
101
- children: [k ? /* @__PURE__ */ m(e, {
102
- type: "button",
103
- variant: "outline",
104
- disabled: N,
105
- onClick: k,
106
- className: "ttw:h-auto ttw:rounded-2xl ttw:border-border ttw:px-5 ttw:py-3 ttw:text-base ttw:font-medium ttw:text-foreground ttw:hover:bg-muted ttw:hover:text-foreground",
107
- "data-testid": z?.cancel,
108
- children: B.cancelButton
109
- }) : null, /* @__PURE__ */ h(e, {
110
- type: "button",
111
- disabled: M || N,
112
- loading: N,
113
- onClick: O,
114
- className: "ttw:h-auto ttw:rounded-2xl ttw:px-5 ttw:py-3 ttw:text-base ttw:font-medium",
115
- "data-testid": z?.next,
116
- children: [P, K]
117
- })]
118
- })]
119
- })
120
- ]
121
- })
122
- ]
123
- })
143
+ "data-testid": B?.root,
144
+ children: X
124
145
  })
125
146
  })
126
147
  });
127
148
  }
128
149
  //#endregion
129
- export { c as ONBOARDING_SHELL_LABELS_EN, y as OnboardingShell, l as OnboardingShellStepper };
150
+ export { c as ONBOARDING_SHELL_LABELS_EN, x as OnboardingShell, l as OnboardingShellStepper };
@@ -6,22 +6,29 @@ import * as e from "react";
6
6
  import { createPortal as t } from "react-dom";
7
7
  import { jsx as n } from "react/jsx-runtime";
8
8
  //#region ../../libs/tesouro-embedded-components-react/shared/ui/dist/lib/OnboardingShell/OnboardingShellOverlayPortal.js
9
- var r = e.createContext(null);
9
+ var r = e.createContext({
10
+ container: null,
11
+ isFullScreenInline: !1
12
+ });
10
13
  function i({ children: i, expandContainer: a = !1, testIds: o }) {
11
- let s = e.useContext(r);
14
+ let { container: s, isFullScreenInline: c } = e.useContext(r);
12
15
  e.useEffect(() => {
13
- if (!s || !a) return;
16
+ if (!s || !a || c) return;
14
17
  let e = s.style.minHeight;
15
18
  return s.style.minHeight = "min(840px, 92vh)", () => {
16
19
  s.style.minHeight = e;
17
20
  };
18
- }, [s, a]);
19
- let c = /* @__PURE__ */ n("div", {
21
+ }, [
22
+ s,
23
+ a,
24
+ c
25
+ ]);
26
+ let l = /* @__PURE__ */ n("div", {
20
27
  className: "ttw:absolute ttw:inset-0 ttw:z-20 ttw:flex ttw:flex-col ttw:overflow-hidden ttw:rounded-2xl ttw:bg-background",
21
28
  "data-testid": o?.root,
22
29
  children: i
23
30
  });
24
- return s ? t(c, s) : c;
31
+ return s ? t(l, s) : l;
25
32
  }
26
33
  //#endregion
27
34
  export { r as OnboardingShellOverlayContainerContext, i as OnboardingShellOverlayPortal };
@@ -4,7 +4,7 @@
4
4
  "use client";
5
5
  import { Scope as e } from "../../../shared/data-access/dist/lib/scopes.js";
6
6
  import "../../../shared/data-access/dist/index.js";
7
- import { BillPayWidget as t } from "../../../bill-pay-widget/feature/dist/index88.js";
7
+ import { BillPayWidget as t } from "../../../bill-pay-widget/feature/dist/index87.js";
8
8
  import "../../../bill-pay-widget/feature/dist/index.js";
9
9
  import { jsx as n } from "react/jsx-runtime";
10
10
  //#region ../../libs/tesouro-embedded-components-react/widget-suite/feature/dist/index8.js
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tesouro/embedded-components-react",
3
- "version": "0.5.28",
3
+ "version": "0.5.31",
4
4
  "license": "Apache-2.0",
5
5
  "type": "module",
6
6
  "packageDepSync": {
@@ -1,25 +0,0 @@
1
- "use client";
2
- "use client";
3
- "use client";
4
- "use client";
5
- import { Implementation as e } from "../../../shared/feature/dist/lib/WidgetProvider/types.js";
6
- import { useWidgetConfig as t } from "../../../shared/feature/dist/lib/WidgetProvider/hooks.js";
7
- import "../../../shared/feature/dist/index.js";
8
- import { BillPayWidgetMonite as n } from "./index67.js";
9
- import "./index68.js";
10
- import { BillPayWidgetNative as r } from "./index86.js";
11
- import "./index87.js";
12
- import { jsx as i } from "react/jsx-runtime";
13
- //#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index88.js
14
- function a({ implementation: a, ...o }) {
15
- let s = t().implementation, c = a ?? s ?? e.Monite;
16
- return c === e.Native ? /* @__PURE__ */ i(r, {
17
- implementation: c,
18
- ...o
19
- }) : /* @__PURE__ */ i(n, {
20
- implementation: c,
21
- ...o
22
- });
23
- }
24
- //#endregion
25
- export { a as BillPayWidget, a as default };
@@ -1,28 +0,0 @@
1
- import { BILL_STATUS_BADGE_LABELS_EN as e } from "./index18.js";
2
- import "./index20.js";
3
- //#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index86.js
4
- var t = {
5
- title: "Possible duplicate files",
6
- descriptionFirstLine: "The following bills may be duplicates of each other.",
7
- descriptionSecondLine: "You can keep or remove duplicates, or view them for more detail before making a decision.",
8
- columnInvoiceNumber: "Invoice number",
9
- columnAmount: "Amount",
10
- columnStatus: "Status",
11
- columnDueDate: "Due date",
12
- columnAddedOn: "Added on",
13
- columnActions: "Actions",
14
- statusBadge: e,
15
- removalHelperBeforeUnsubmitted: "Removing duplicates deletes ",
16
- removalHelperUnsubmitted: "bills not yet submitted",
17
- removalHelperBetween: ", and cancels ",
18
- removalHelperSubmitted: "ones already submitted",
19
- removalHelperAfterSubmitted: ". This action cannot be undone.",
20
- removalOutcomeDelete: "Deletes this bill",
21
- removalOutcomeCancel: "Cancels this bill",
22
- keepSelectedButton: "Keep selected files as their own file",
23
- removeDuplicatesButton: "Remove selected duplicates",
24
- emptyState: "No possible duplicates left to review.",
25
- errorState: "Couldn't load the possible duplicates. Try again shortly."
26
- };
27
- //#endregion
28
- export { t as DUPLICATE_BILLS_DIALOG_LABELS_EN };