@tesouro/embedded-components-react 0.5.51 → 0.5.53

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 (38) hide show
  1. package/dist/index.d.ts +42 -1
  2. package/dist/lib/CounterpartsWidget.d.ts +41 -0
  3. package/dist/lib/ReceivablesWidget.d.ts +40 -1
  4. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index15.js +6 -9
  5. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index25.js +9 -12
  6. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index46.js +1 -2
  7. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index.js +8 -8
  8. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index101.js +18 -4
  9. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index102.js +91 -88
  10. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index104.js +18 -3
  11. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index106.js +113 -102
  12. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index28.js +5 -1
  13. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index30.js +28 -20
  14. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index31.js +148 -147
  15. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index33.js +15 -3
  16. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index34.js +39 -34
  17. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index39.js +16 -4
  18. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index40.js +203 -174
  19. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index42.js +15 -3
  20. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index43.js +52 -52
  21. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index45.js +22 -3
  22. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index46.js +2 -17
  23. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index48.js +31 -31
  24. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index50.js +97 -96
  25. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index55.js +15 -3
  26. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index56.js +57 -61
  27. package/dist/libs/tesouro-embedded-components-react/counterparts-widget/ui/dist/index4.js +189 -188
  28. package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/ui/dist/index10.js +1 -0
  29. package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/ui/dist/index12.js +1 -0
  30. package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/ui/dist/index13.js +54 -37
  31. package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/ui/dist/index2.js +23 -16
  32. package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/ui/dist/index3.js +1 -0
  33. package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/ui/dist/index5.js +54 -41
  34. package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/ui/dist/index6.js +88 -70
  35. package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/ui/dist/index9.js +333 -282
  36. package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/analytics/build-info.js +1 -1
  37. package/dist/packages/shared-ui-shadcn/dist/index.js +3757 -3705
  38. package/package.json +1 -1
@@ -1,165 +1,176 @@
1
- import { Badge as e, Button as t, Calendar as n, Dialog as r, DialogContent as i, DialogDescription as a, DialogFooter as ee, DialogHeader as o, DialogTitle as s, Label as c, Popover as l, PopoverContent as u, PopoverTrigger as d, Select as f, SelectContent as p, SelectItem as m, SelectTrigger as h, SelectValue as g, cn as _ } from "../../../../../packages/shared-ui-shadcn/dist/index.js";
2
- import { SCHEDULE_PAYMENT_DIALOG_LABELS_EN as v } from "./index104.js";
3
- import { TONE_TEXT_CLASS as y } from "./index105.js";
4
- import { useId as b } from "react";
5
- import { Fragment as te, jsx as x, jsxs as S } from "react/jsx-runtime";
6
- import { CalendarIcon as C } from "lucide-react";
1
+ import { Badge as e, Button as t, Calendar as n, Dialog as r, DialogContent as i, DialogDescription as ee, DialogFooter as te, DialogHeader as a, DialogTitle as o, FieldRequirement as s, Label as c, Popover as l, PopoverContent as u, PopoverTrigger as ne, RequiredFieldsLegend as d, Select as f, SelectContent as re, SelectItem as p, SelectTrigger as m, SelectValue as h, cn as g } from "../../../../../packages/shared-ui-shadcn/dist/index.js";
2
+ import { mergeSchedulePaymentDialogLabels as _ } from "./index104.js";
3
+ import { TONE_TEXT_CLASS as v } from "./index105.js";
4
+ import { useId as y } from "react";
5
+ import { Fragment as ie, jsx as b, jsxs as x } from "react/jsx-runtime";
6
+ import { CalendarIcon as S } from "lucide-react";
7
7
  //#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index106.js
8
- var w = {
9
- sufficient: y.muted,
10
- warning: y.warning,
11
- error: y.error
8
+ var C = {
9
+ sufficient: v.muted,
10
+ warning: v.warning,
11
+ error: v.error
12
12
  };
13
- function T({ open: y, onOpenChange: T, amountDueLabel: E, amountDue: D, dueDateSuffix: O, paymentAmountLabel: k, paymentAmount: A, selectedDate: j, selectedDateLabel: M, calendarDisabled: N, isToday: P, selectedAccountId: F, accounts: I, poweredByBankName: L, funds: R, isAccountsLoading: z, isAccountsError: B, isSubmitting: V, onDateChange: H, onAccountChange: U, onReview: W, onCancel: G, testId: K, labels: q }) {
14
- let J = {
15
- ...v,
16
- ...q
17
- }, Y = b(), X = b(), Z = b(), Q = z || B || I.length === 0, $ = I.find((e) => e.id === F);
18
- return /* @__PURE__ */ x(r, {
19
- open: y,
20
- onOpenChange: (e) => e ? T(e) : G(),
21
- children: /* @__PURE__ */ S(i, {
22
- "data-testid": K,
13
+ function w({ open: v, onOpenChange: w, amountDueLabel: T, amountDue: E, dueDateSuffix: D, paymentAmountLabel: O, paymentAmount: k, selectedDate: A, selectedDateLabel: j, calendarDisabled: M, isToday: N, selectedAccountId: P, accounts: F, poweredByBankName: I, funds: L, isAccountsLoading: R, isAccountsError: z, isSubmitting: B, onDateChange: V, onAccountChange: H, onReview: U, onCancel: W, testId: G, labels: K }) {
14
+ let q = _(K), J = y(), Y = y(), X = y(), Z = y(), Q = R || z || F.length === 0, $ = F.find((e) => e.id === P);
15
+ return /* @__PURE__ */ b(r, {
16
+ open: v,
17
+ onOpenChange: (e) => e ? w(e) : W(),
18
+ children: /* @__PURE__ */ x(i, {
19
+ "data-testid": G,
23
20
  className: "ttw:flex ttw:max-w-lg ttw:flex-col ttw:gap-3",
24
21
  children: [
25
- /* @__PURE__ */ S(o, { children: [/* @__PURE__ */ x(s, { children: J.title }), /* @__PURE__ */ x(a, {
22
+ /* @__PURE__ */ x(a, { children: [/* @__PURE__ */ b(o, { children: q.title }), /* @__PURE__ */ b(ee, {
26
23
  className: "ttw:sr-only",
27
- children: J.hiddenDescription
24
+ children: q.hiddenDescription
28
25
  })] }),
29
- /* @__PURE__ */ S("div", {
26
+ /* @__PURE__ */ x("div", {
30
27
  className: "ttw:flex ttw:flex-col ttw:gap-3",
31
28
  children: [
32
- /* @__PURE__ */ S("div", {
29
+ /* @__PURE__ */ x("div", {
33
30
  className: "ttw:flex ttw:flex-col ttw:gap-1.5",
34
- children: [/* @__PURE__ */ x("p", {
31
+ children: [/* @__PURE__ */ b("p", {
35
32
  className: "ttw:text-base ttw:text-muted-foreground",
36
- children: E
37
- }), /* @__PURE__ */ S("div", {
33
+ children: T
34
+ }), /* @__PURE__ */ x("div", {
38
35
  className: "ttw:flex ttw:flex-wrap ttw:items-end ttw:gap-2",
39
- children: [/* @__PURE__ */ x("p", {
36
+ children: [/* @__PURE__ */ b("p", {
40
37
  className: "ttw:text-4xl ttw:font-semibold ttw:text-foreground",
41
- children: D
42
- }), O ? /* @__PURE__ */ x("p", {
38
+ children: E
39
+ }), D ? /* @__PURE__ */ b("p", {
43
40
  className: "ttw:pb-1 ttw:text-xs ttw:text-muted-foreground",
44
- children: O
41
+ children: D
45
42
  }) : null]
46
43
  })]
47
44
  }),
48
- /* @__PURE__ */ S("div", {
45
+ /* @__PURE__ */ b(d, { labels: q.requiredFieldsLegend }),
46
+ /* @__PURE__ */ x("div", {
49
47
  className: "ttw:grid ttw:grid-cols-2 ttw:gap-4",
50
- children: [/* @__PURE__ */ S("div", {
48
+ children: [/* @__PURE__ */ x("div", {
51
49
  className: "ttw:grid ttw:gap-2.5",
52
- children: [/* @__PURE__ */ x(c, { children: k }), /* @__PURE__ */ x("div", {
50
+ children: [/* @__PURE__ */ b(c, { children: O }), /* @__PURE__ */ b("div", {
53
51
  "aria-disabled": !0,
54
52
  className: "ttw:flex ttw:h-9 ttw:items-center ttw:rounded-md ttw:border ttw:border-border ttw:bg-muted ttw:px-3 ttw:text-sm ttw:font-medium ttw:text-muted-foreground",
55
- children: A
53
+ children: k
56
54
  })]
57
- }), /* @__PURE__ */ S("div", {
55
+ }), /* @__PURE__ */ x("div", {
58
56
  className: "ttw:grid ttw:gap-2.5",
59
- children: [/* @__PURE__ */ x(c, {
60
- id: Y,
61
- children: J.paymentDate
62
- }), /* @__PURE__ */ S(l, { children: [/* @__PURE__ */ x(d, {
63
- asChild: !0,
64
- children: /* @__PURE__ */ S(t, {
65
- type: "button",
66
- variant: "outline",
67
- className: "ttw:justify-start ttw:gap-2",
68
- "aria-labelledby": `${Y} ${X}`,
69
- children: [
70
- /* @__PURE__ */ x(C, { className: "ttw:size-4" }),
71
- /* @__PURE__ */ x("span", {
72
- id: X,
73
- children: M ?? J.paymentDatePlaceholder
74
- }),
75
- P ? /* @__PURE__ */ x(e, {
76
- variant: "secondary",
77
- children: J.today
78
- }) : null
79
- ]
80
- })
81
- }), /* @__PURE__ */ x(u, {
82
- align: "start",
83
- className: "ttw:w-auto ttw:p-0",
84
- children: /* @__PURE__ */ x(n, {
85
- mode: "single",
86
- selected: j,
87
- onSelect: H,
88
- disabled: N
89
- })
90
- })] })]
57
+ children: [
58
+ /* @__PURE__ */ b(c, {
59
+ id: J,
60
+ requirement: s.Required,
61
+ labels: q.fieldMarkers,
62
+ children: q.paymentDate
63
+ }),
64
+ /* @__PURE__ */ b("span", {
65
+ id: X,
66
+ className: "ttw:sr-only",
67
+ children: q.fieldMarkers.requiredAccessibleText
68
+ }),
69
+ /* @__PURE__ */ x(l, { children: [/* @__PURE__ */ b(ne, {
70
+ asChild: !0,
71
+ children: /* @__PURE__ */ x(t, {
72
+ type: "button",
73
+ variant: "outline",
74
+ className: "ttw:justify-start ttw:gap-2",
75
+ "aria-labelledby": `${J} ${Y} ${X}`,
76
+ children: [
77
+ /* @__PURE__ */ b(S, { className: "ttw:size-4" }),
78
+ /* @__PURE__ */ b("span", {
79
+ id: Y,
80
+ children: j ?? q.paymentDatePlaceholder
81
+ }),
82
+ N ? /* @__PURE__ */ b(e, {
83
+ variant: "secondary",
84
+ children: q.today
85
+ }) : null
86
+ ]
87
+ })
88
+ }), /* @__PURE__ */ b(u, {
89
+ align: "start",
90
+ className: "ttw:w-auto ttw:p-0",
91
+ children: /* @__PURE__ */ b(n, {
92
+ mode: "single",
93
+ selected: A,
94
+ onSelect: V,
95
+ disabled: M
96
+ })
97
+ })] })
98
+ ]
91
99
  })]
92
100
  }),
93
- /* @__PURE__ */ S("div", {
101
+ /* @__PURE__ */ x("div", {
94
102
  className: "ttw:grid ttw:gap-2.5",
95
103
  children: [
96
- /* @__PURE__ */ x(c, {
104
+ /* @__PURE__ */ b(c, {
97
105
  id: Z,
98
- children: J.payFrom
106
+ requirement: s.Required,
107
+ labels: q.fieldMarkers,
108
+ children: q.payFrom
99
109
  }),
100
- /* @__PURE__ */ S(f, {
101
- value: F,
110
+ /* @__PURE__ */ x(f, {
111
+ value: P,
102
112
  disabled: Q,
103
- onValueChange: U,
104
- children: [/* @__PURE__ */ x(h, {
113
+ onValueChange: H,
114
+ children: [/* @__PURE__ */ b(m, {
105
115
  className: "ttw:w-full ttw:data-[size=default]:h-14 ttw:*:data-[slot=select-value]:min-w-0 ttw:*:data-[slot=select-value]:flex-1",
106
116
  "aria-labelledby": Z,
107
- children: /* @__PURE__ */ x(g, {
108
- placeholder: J.payFromPlaceholder,
109
- children: $ ? /* @__PURE__ */ S(te, { children: [/* @__PURE__ */ S("span", {
117
+ "aria-required": !0,
118
+ children: /* @__PURE__ */ b(h, {
119
+ placeholder: q.payFromPlaceholder,
120
+ children: $ ? /* @__PURE__ */ x(ie, { children: [/* @__PURE__ */ x("span", {
110
121
  className: "ttw:flex ttw:min-w-0 ttw:flex-1 ttw:flex-col ttw:text-left",
111
- children: [/* @__PURE__ */ x("span", {
122
+ children: [/* @__PURE__ */ b("span", {
112
123
  className: "ttw:truncate",
113
124
  children: $.primaryLabel
114
- }), $.secondaryLabel ? /* @__PURE__ */ x("span", {
125
+ }), $.secondaryLabel ? /* @__PURE__ */ b("span", {
115
126
  className: "ttw:truncate ttw:text-xs ttw:text-muted-foreground",
116
127
  children: $.secondaryLabel
117
128
  }) : null]
118
- }), L ? /* @__PURE__ */ x(e, {
129
+ }), I ? /* @__PURE__ */ b(e, {
119
130
  variant: "secondary",
120
131
  className: "ttw:shrink-0",
121
- children: J.poweredByBank(L)
132
+ children: q.poweredByBank(I)
122
133
  }) : null] }) : null
123
134
  })
124
- }), /* @__PURE__ */ x(p, { children: I.map((e) => /* @__PURE__ */ x(m, {
135
+ }), /* @__PURE__ */ b(re, { children: F.map((e) => /* @__PURE__ */ b(p, {
125
136
  value: e.id,
126
- children: /* @__PURE__ */ S("span", {
137
+ children: /* @__PURE__ */ x("span", {
127
138
  className: "ttw:flex ttw:min-w-0 ttw:flex-1 ttw:flex-col",
128
- children: [/* @__PURE__ */ x("span", {
139
+ children: [/* @__PURE__ */ b("span", {
129
140
  className: "ttw:truncate",
130
141
  children: e.primaryLabel
131
- }), e.secondaryLabel ? /* @__PURE__ */ x("span", {
142
+ }), e.secondaryLabel ? /* @__PURE__ */ b("span", {
132
143
  className: "ttw:truncate ttw:text-xs ttw:text-muted-foreground",
133
144
  children: e.secondaryLabel
134
145
  }) : null]
135
146
  })
136
147
  }, e.id)) })]
137
148
  }),
138
- Q ? /* @__PURE__ */ x("p", {
139
- className: _("ttw:text-sm", B ? "ttw:text-destructive" : "ttw:text-muted-foreground"),
140
- role: B ? "alert" : void 0,
141
- children: z ? J.loadingAccounts : B ? J.accountsError : J.noAccounts
149
+ Q ? /* @__PURE__ */ b("p", {
150
+ className: g("ttw:text-sm", z ? "ttw:text-destructive" : "ttw:text-muted-foreground"),
151
+ role: z ? "alert" : void 0,
152
+ children: R ? q.loadingAccounts : z ? q.accountsError : q.noAccounts
142
153
  }) : null
143
154
  ]
144
155
  }),
145
- R.message ? /* @__PURE__ */ x("p", {
146
- className: _("ttw:text-sm", w[R.state]),
147
- children: R.message
156
+ L.message ? /* @__PURE__ */ b("p", {
157
+ className: g("ttw:text-sm", C[L.state]),
158
+ children: L.message
148
159
  }) : null
149
160
  ]
150
161
  }),
151
- /* @__PURE__ */ S(ee, {
162
+ /* @__PURE__ */ x(te, {
152
163
  className: "ttw:pt-4 ttw:sm:gap-3",
153
- children: [/* @__PURE__ */ x(t, {
164
+ children: [/* @__PURE__ */ b(t, {
154
165
  type: "button",
155
166
  variant: "outline",
156
- onClick: G,
157
- children: J.cancelButton
158
- }), /* @__PURE__ */ x(t, {
159
- type: "button",
160
- loading: V,
161
167
  onClick: W,
162
- children: J.reviewButton
168
+ children: q.cancelButton
169
+ }), /* @__PURE__ */ b(t, {
170
+ type: "button",
171
+ loading: B,
172
+ onClick: U,
173
+ children: q.reviewButton
163
174
  })]
164
175
  })
165
176
  ]
@@ -167,4 +178,4 @@ function T({ open: y, onOpenChange: T, amountDueLabel: E, amountDue: D, dueDateS
167
178
  });
168
179
  }
169
180
  //#endregion
170
- export { T as SchedulePaymentDialog, T as default };
181
+ export { w as SchedulePaymentDialog, w as default };
@@ -12,7 +12,11 @@ function f({ summary: f, onEdit: p, paymentInstructions: m, testId: h, labels: g
12
12
  ...g,
13
13
  ach: {
14
14
  ...t.ach,
15
- ...g?.ach
15
+ ...g?.ach,
16
+ fieldMarkers: {
17
+ ...t.ach.fieldMarkers,
18
+ ...g?.ach?.fieldMarkers
19
+ }
16
20
  }
17
21
  }), [g]), v = !!m?.isOpen, y = !!m?.canEditExisting && f.hasPaymentInstructions, b = /* @__PURE__ */ a("div", {
18
22
  className: "ttw:flex ttw:flex-col ttw:gap-0.5",
@@ -1,13 +1,14 @@
1
- import { APPROVAL_POLICY_CARD_LABELS_EN as e } from "./index12.js";
1
+ import { REQUIRED_FIELDS_LEGEND_LABELS_EN as e, mergeRequiredFieldsLegendLabels as t } from "../../../../../packages/shared-ui-shadcn/dist/index.js";
2
+ import { APPROVAL_POLICY_CARD_LABELS_EN as n } from "./index12.js";
2
3
  import "./index14.js";
3
- import { BILL_STATUS_BADGE_LABELS_EN as t } from "./index18.js";
4
+ import { BILL_STATUS_BADGE_LABELS_EN as r } from "./index18.js";
4
5
  import "./index20.js";
5
- import { DUE_DATE_VALUE_LABELS_EN as n } from "./index21.js";
6
+ import { DUE_DATE_VALUE_LABELS_EN as i } from "./index21.js";
6
7
  import "./index23.js";
7
- import { VENDOR_SUMMARY_CARD_LABELS_EN as r } from "./index27.js";
8
+ import { VENDOR_SUMMARY_CARD_LABELS_EN as a } from "./index27.js";
8
9
  import "./index29.js";
9
10
  //#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index30.js
10
- var i = {
11
+ var o = {
11
12
  errorTitle: "Couldn't load this bill",
12
13
  errorDescription: "Something went wrong. Try again.",
13
14
  amountDueHeading: "Amount due",
@@ -28,39 +29,46 @@ var i = {
28
29
  paymentHistoryHeading: "Payment history",
29
30
  paymentHistoryErrorDescription: "Couldn't load payment history.",
30
31
  historyHeading: "Audit history",
31
- statusBadge: t,
32
- approvalPolicy: e,
33
- dueDate: n,
32
+ statusBadge: r,
33
+ approvalPolicy: n,
34
+ dueDate: i,
34
35
  payToCard: {
35
- ...r,
36
+ ...a,
36
37
  editAction: "Edit vendor"
37
- }
38
+ },
39
+ requiredFieldsLegend: e
38
40
  };
39
- function a(e) {
41
+ function s(e) {
42
+ let n = {
43
+ ...o.payToCard.ach.fieldMarkers,
44
+ ...e?.payToCard?.ach?.fieldMarkers
45
+ };
40
46
  return {
41
- ...i,
47
+ ...o,
42
48
  ...e,
43
49
  statusBadge: {
44
- ...i.statusBadge,
50
+ ...o.statusBadge,
45
51
  ...e?.statusBadge
46
52
  },
47
53
  approvalPolicy: {
48
- ...i.approvalPolicy,
54
+ ...o.approvalPolicy,
49
55
  ...e?.approvalPolicy
50
56
  },
51
57
  dueDate: {
52
- ...i.dueDate,
58
+ ...o.dueDate,
53
59
  ...e?.dueDate
54
60
  },
55
61
  payToCard: {
56
- ...i.payToCard,
62
+ ...o.payToCard,
57
63
  ...e?.payToCard,
58
64
  ach: {
59
- ...i.payToCard.ach,
60
- ...e?.payToCard?.ach
65
+ ...o.payToCard.ach,
66
+ ...e?.payToCard?.ach,
67
+ fieldMarkers: n
61
68
  }
62
- }
69
+ },
70
+ requiredFieldsLegend: t(n, e?.requiredFieldsLegend)
63
71
  };
64
72
  }
65
73
  //#endregion
66
- export { i as BILL_DETAIL_BODY_LABELS_EN, a as mergeBillDetailBodyLabels };
74
+ export { o as BILL_DETAIL_BODY_LABELS_EN, s as mergeBillDetailBodyLabels };