@tesouro/embedded-components-react 0.4.11 → 0.4.13

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 (105) hide show
  1. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index12.js +1 -1
  2. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index21.js +2 -2
  3. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index23.js +2 -2
  4. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index39.js +1 -1
  5. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index42.js +1 -1
  6. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index43.js +1 -1
  7. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index55.js +127 -122
  8. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index57.js +1 -1
  9. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index58.js +4 -4
  10. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index67.js +1 -1
  11. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index71.js +1 -1
  12. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index75.js +1 -1
  13. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index77.js +1 -1
  14. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index80.js +2 -2
  15. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index9.js +1 -1
  16. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index.js +42 -41
  17. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index100.js +2 -0
  18. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index15.js +2 -5
  19. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index16.js +12 -62
  20. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index17.js +12 -1
  21. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index18.js +16 -12
  22. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index19.js +2 -12
  23. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index20.js +2 -16
  24. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index21.js +30 -2
  25. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index22.js +2 -4
  26. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index23.js +46 -26
  27. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index24.js +296 -1
  28. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index25.js +1 -50
  29. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index26.js +7 -300
  30. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index27.js +49 -2
  31. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index28.js +2 -9
  32. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index29.js +14 -45
  33. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index30.js +50 -2
  34. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index31.js +2 -23
  35. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index32.js +21 -338
  36. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index33.js +340 -2
  37. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index34.js +2 -16
  38. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index35.js +13 -117
  39. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index36.js +120 -2
  40. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index37.js +2 -12
  41. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index38.js +10 -97
  42. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index39.js +99 -2
  43. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index40.js +1 -12
  44. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index41.js +11 -57
  45. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index42.js +58 -1
  46. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index43.js +1 -54
  47. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index44.js +52 -10
  48. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index45.js +10 -157
  49. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index46.js +181 -1
  50. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index47.js +2 -4
  51. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index48.js +2 -39
  52. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index49.js +41 -2
  53. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index50.js +2 -7
  54. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index51.js +5 -90
  55. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index52.js +92 -2
  56. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index53.js +2 -4
  57. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index54.js +2 -14
  58. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index55.js +16 -2
  59. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index56.js +1 -85
  60. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index57.js +83 -284
  61. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index58.js +283 -9
  62. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index59.js +13 -1
  63. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index60.js +1 -8
  64. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index61.js +6 -37
  65. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index62.js +39 -2
  66. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index63.js +2 -39
  67. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index64.js +36 -9
  68. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index65.js +10 -199
  69. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index66.js +201 -3
  70. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index67.js +3 -17
  71. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index68.js +15 -345
  72. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index69.js +345 -8
  73. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index70.js +6 -4
  74. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index71.js +6 -91
  75. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index72.js +93 -0
  76. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index74.js +2 -127
  77. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index75.js +125 -26
  78. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index76.js +26 -87
  79. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index77.js +89 -2
  80. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index78.js +2 -7
  81. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index79.js +5 -28
  82. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index80.js +30 -2
  83. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index81.js +2 -7
  84. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index82.js +5 -32
  85. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index83.js +34 -2
  86. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index84.js +2 -12
  87. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index85.js +10 -104
  88. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index86.js +105 -1
  89. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index87.js +2 -17
  90. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index88.js +15 -123
  91. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index89.js +125 -2
  92. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index90.js +2 -18
  93. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index91.js +14 -6
  94. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index92.js +7 -167
  95. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index93.js +170 -2
  96. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index94.js +2 -14
  97. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index95.js +11 -105
  98. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index96.js +108 -2
  99. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index97.js +2 -10
  100. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index98.js +8 -50
  101. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index99.js +52 -2
  102. package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/rest/zod.gen.js +871 -862
  103. package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/analytics/build-info.js +1 -1
  104. package/package.json +1 -1
  105. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index73.js +0 -2
@@ -1,287 +1,86 @@
1
- import { Badge as e, Button as t, Collapsible as n, CollapsibleContent as r, CollapsibleTrigger as i, Sheet as a, SheetContent as o, SheetDescription as s, SheetHeader as c, SheetTitle as l, Skeleton as u, Typography as d } from "../../../../../packages/shared-ui-shadcn/dist/index.js";
2
- import { ApprovalPolicyCard as f } from "./index13.js";
1
+ import { DATA_TABLE_LABELS_EN as e } from "../../../../../packages/shared-ui-shadcn/dist/index.js";
2
+ import { ADD_BILL_PANEL_LABELS_EN as t } from "./index6.js";
3
+ import "./index8.js";
4
+ import { APPROVAL_POLICY_CARD_LABELS_EN as n } from "./index12.js";
3
5
  import "./index14.js";
4
- import { BillOverflowMenu as p } from "./index16.js";
5
- import "./index17.js";
6
- import { BillStatusBadge as m } from "./index20.js";
7
- import "./index21.js";
8
- import { DueDateValue as h } from "./index23.js";
9
- import "./index24.js";
10
- import { BillActionButtons as g, NO_BILL_ACTIONS as _ } from "./index15.js";
11
- import { BILL_DETAILS_SHEET_LABELS_EN as v } from "./index56.js";
12
- import { Fragment as y, jsx as b, jsxs as x } from "react/jsx-runtime";
13
- import { ChevronDownIcon as S, MoveDiagonal2Icon as C, XIcon as w } from "lucide-react";
6
+ import { BILL_STATUS_BADGE_LABELS_EN as r } from "./index16.js";
7
+ import "./index19.js";
8
+ import { DUE_DATE_VALUE_LABELS_EN as i } from "./index20.js";
9
+ import "./index22.js";
10
+ import { MISSING_VALUE_LABELS_EN as a } from "./index54.js";
11
+ import "./index56.js";
14
12
  //#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index57.js
15
- function T({ items: e }) {
16
- return /* @__PURE__ */ b("dl", {
17
- className: "ttw:flex ttw:flex-col",
18
- children: e.map((e) => /* @__PURE__ */ x("div", {
19
- className: "ttw:flex ttw:items-start ttw:justify-between ttw:gap-6 ttw:border-b ttw:border-border ttw:py-3 ttw:last:border-b-0",
20
- children: [/* @__PURE__ */ b("dt", {
21
- className: "ttw:text-sm ttw:text-muted-foreground",
22
- children: e.label
23
- }), /* @__PURE__ */ x("dd", {
24
- className: "ttw:flex ttw:flex-col ttw:items-end ttw:text-right",
25
- children: [/* @__PURE__ */ b("span", {
26
- className: "ttw:text-sm ttw:font-medium",
27
- children: e.value
28
- }), e.secondaryValue ? /* @__PURE__ */ b("span", {
29
- className: "ttw:text-sm ttw:text-muted-foreground",
30
- children: e.secondaryValue
31
- }) : null]
32
- })]
33
- }, e.label))
34
- });
35
- }
36
- function E({ heading: e, children: t }) {
37
- return /* @__PURE__ */ x(n, {
38
- defaultOpen: !0,
39
- className: "ttw:flex ttw:flex-col ttw:gap-3",
40
- children: [/* @__PURE__ */ x(i, {
41
- className: "ttw:group ttw:flex ttw:w-full ttw:items-center ttw:justify-between ttw:rounded-xs ttw:focus-visible:ring-2 ttw:focus-visible:ring-ring ttw:focus-visible:outline-hidden",
42
- children: [/* @__PURE__ */ b(d, {
43
- variant: "body1",
44
- className: "ttw:font-semibold",
45
- children: e
46
- }), /* @__PURE__ */ b(S, { className: "ttw:size-4 ttw:text-muted-foreground ttw:transition-transform ttw:group-data-[state=closed]:-rotate-90" })]
47
- }), /* @__PURE__ */ b(r, { children: t })]
48
- });
49
- }
50
- function D({ open: n, onOpenChange: r, details: i, actions: d = _, approvalPolicy: S, isLoading: D, isError: O, notice: k, onClose: A, onExpand: j, testId: M, labels: N }) {
51
- let P = {
52
- ...v,
53
- ...N,
54
- statusBadge: {
55
- ...v.statusBadge,
56
- ...N?.statusBadge
57
- },
58
- approvalPolicy: {
59
- ...v.approvalPolicy,
60
- ...N?.approvalPolicy
61
- },
62
- dueDate: {
63
- ...v.dueDate,
64
- ...N?.dueDate
65
- }
66
- };
67
- return /* @__PURE__ */ b(a, {
68
- open: n,
69
- onOpenChange: (e) => e ? r(e) : A(),
70
- children: /* @__PURE__ */ x(o, {
71
- showCloseButton: !1,
72
- className: "ttw:w-150 ttw:gap-0 ttw:overflow-y-auto ttw:sm:max-w-150",
73
- "data-testid": M,
74
- children: [/* @__PURE__ */ x(c, {
75
- className: "ttw:flex ttw:flex-row ttw:items-start ttw:justify-between ttw:gap-3",
76
- children: [/* @__PURE__ */ x("div", {
77
- className: "ttw:flex ttw:flex-col ttw:gap-0.5",
78
- children: [
79
- /* @__PURE__ */ b(l, {
80
- className: D ? "ttw:sr-only" : "ttw:text-xl ttw:font-semibold",
81
- children: O ? P.errorTitle : D ? P.loadingTitle : i?.title
82
- }),
83
- D ? /* @__PURE__ */ x("div", {
84
- "aria-hidden": !0,
85
- className: "ttw:flex ttw:flex-col ttw:gap-2 ttw:py-1",
86
- children: [/* @__PURE__ */ b(u, { className: "ttw:h-6 ttw:w-48" }), /* @__PURE__ */ b(u, { className: "ttw:h-4 ttw:w-28" })]
87
- }) : null,
88
- i && !D && !O ? /* @__PURE__ */ b("p", {
89
- className: "ttw:text-sm ttw:text-muted-foreground",
90
- children: i.subtitle
91
- }) : null,
92
- /* @__PURE__ */ b(s, {
93
- className: "ttw:sr-only",
94
- children: P.hiddenDescription
95
- })
96
- ]
97
- }), /* @__PURE__ */ x("div", {
98
- className: "ttw:flex ttw:items-center ttw:gap-1",
99
- children: [
100
- j ? /* @__PURE__ */ b(t, {
101
- type: "button",
102
- variant: "ghost",
103
- size: "icon",
104
- "aria-label": P.expandButton,
105
- onClick: j,
106
- children: /* @__PURE__ */ b(C, { className: "ttw:size-4" })
107
- }) : null,
108
- i && !D && !O ? /* @__PURE__ */ b(p, {
109
- actions: d.menu,
110
- triggerLabel: P.overflowMenuTrigger,
111
- placement: "header"
112
- }) : null,
113
- /* @__PURE__ */ b(t, {
114
- type: "button",
115
- variant: "ghost",
116
- size: "icon",
117
- "aria-label": P.closeButton,
118
- onClick: A,
119
- children: /* @__PURE__ */ b(w, { className: "ttw:size-4" })
120
- })
121
- ]
122
- })]
123
- }), /* @__PURE__ */ b("div", {
124
- className: "ttw:flex ttw:flex-col ttw:gap-6 ttw:px-6 ttw:pb-6",
125
- children: O ? /* @__PURE__ */ b("p", {
126
- className: "ttw:text-sm ttw:text-muted-foreground",
127
- children: P.errorDescription
128
- }) : D ? /* @__PURE__ */ x("div", {
129
- className: "ttw:flex ttw:flex-col ttw:gap-6",
130
- children: [/* @__PURE__ */ b(u, { className: "ttw:h-32 ttw:w-full" }), /* @__PURE__ */ x("div", {
131
- className: "ttw:flex ttw:flex-col ttw:gap-2",
132
- children: [
133
- /* @__PURE__ */ b(u, { className: "ttw:h-4 ttw:w-40" }),
134
- /* @__PURE__ */ b(u, { className: "ttw:h-9 ttw:w-full" }),
135
- /* @__PURE__ */ b(u, { className: "ttw:h-9 ttw:w-full" })
136
- ]
137
- })]
138
- }) : i ? /* @__PURE__ */ x(y, { children: [
139
- k,
140
- /* @__PURE__ */ x("section", {
141
- className: "ttw:flex ttw:flex-col ttw:gap-3 ttw:rounded-lg ttw:bg-muted/50 ttw:p-4",
142
- children: [
143
- /* @__PURE__ */ x("div", {
144
- className: "ttw:flex ttw:flex-col ttw:gap-2",
145
- children: [i.paidOnLabel ? /* @__PURE__ */ x("div", {
146
- className: "ttw:grid ttw:grid-cols-2 ttw:gap-x-6",
147
- children: [/* @__PURE__ */ x("div", {
148
- className: "ttw:flex ttw:flex-col",
149
- children: [/* @__PURE__ */ b("span", {
150
- className: "ttw:text-sm ttw:text-muted-foreground",
151
- children: P.amountDueHeading
152
- }), /* @__PURE__ */ b("span", {
153
- className: "ttw:text-3xl ttw:font-semibold",
154
- children: i.amountDueLabel
155
- })]
156
- }), /* @__PURE__ */ x("div", {
157
- className: "ttw:flex ttw:flex-col",
158
- children: [/* @__PURE__ */ b("span", {
159
- className: "ttw:text-sm ttw:text-muted-foreground",
160
- children: P.amountPaidHeading
161
- }), /* @__PURE__ */ b("span", {
162
- className: "ttw:text-3xl ttw:font-semibold ttw:text-emerald-600",
163
- children: i.amountPaidLabel
164
- })]
165
- })]
166
- }) : /* @__PURE__ */ x(y, { children: [/* @__PURE__ */ b("span", {
167
- className: "ttw:text-sm ttw:text-muted-foreground",
168
- children: P.amountDueHeading
169
- }), /* @__PURE__ */ b("span", {
170
- className: "ttw:text-3xl ttw:font-semibold",
171
- children: i.amountDueLabel
172
- })] }), /* @__PURE__ */ b("div", { children: i.paidOnLabel ? /* @__PURE__ */ b(e, {
173
- variant: "outline",
174
- className: "ttw:border-emerald-200 ttw:bg-emerald-50 ttw:text-emerald-700",
175
- children: i.paidOnLabel
176
- }) : /* @__PURE__ */ b(m, {
177
- status: i.status,
178
- tone: i.statusTone,
179
- labels: P.statusBadge
180
- }) })]
181
- }),
182
- /* @__PURE__ */ x("div", {
183
- className: "ttw:grid ttw:grid-cols-2 ttw:gap-x-6 ttw:gap-y-1",
184
- children: [/* @__PURE__ */ x("div", {
185
- className: "ttw:flex ttw:flex-col",
186
- children: [/* @__PURE__ */ b("span", {
187
- className: "ttw:text-xs ttw:text-muted-foreground",
188
- children: P.invoiceDateLabel
189
- }), /* @__PURE__ */ b("span", {
190
- className: "ttw:text-sm ttw:font-medium",
191
- children: i.invoiceDateLabel
192
- })]
193
- }), /* @__PURE__ */ x("div", {
194
- className: "ttw:flex ttw:flex-col",
195
- children: [/* @__PURE__ */ b("span", {
196
- className: "ttw:text-xs ttw:text-muted-foreground",
197
- children: P.dueDateLabel
198
- }), /* @__PURE__ */ b(h, {
199
- className: "ttw:text-sm ttw:font-medium",
200
- value: i.dueDateLabel,
201
- tone: i.dueDateTone,
202
- labels: P.dueDate
203
- })]
204
- })]
205
- }),
206
- d.row.length ? /* @__PURE__ */ b("div", {
207
- className: "ttw:flex ttw:items-center ttw:gap-2",
208
- children: /* @__PURE__ */ b(g, { actions: d.row })
209
- }) : null
210
- ]
211
- }),
212
- /* @__PURE__ */ b(E, {
213
- heading: i.paidOnLabel ? P.payToHeadingPaid : P.payToHeading,
214
- children: /* @__PURE__ */ b(T, { items: i.payToItems })
215
- }),
216
- /* @__PURE__ */ b(E, {
217
- heading: P.invoiceDetailsHeading,
218
- children: /* @__PURE__ */ x("div", {
219
- className: "ttw:flex ttw:flex-col ttw:gap-4",
220
- children: [
221
- /* @__PURE__ */ b(T, { items: i.invoiceItems }),
222
- i.lineItems.length ? /* @__PURE__ */ x("table", {
223
- className: "ttw:w-full ttw:text-sm",
224
- children: [/* @__PURE__ */ b("thead", { children: /* @__PURE__ */ x("tr", {
225
- className: "ttw:bg-muted/50 ttw:text-xs ttw:text-muted-foreground",
226
- children: [
227
- /* @__PURE__ */ b("th", {
228
- className: "ttw:px-3 ttw:py-2 ttw:text-left ttw:font-normal",
229
- children: P.lineItemsHeading
230
- }),
231
- /* @__PURE__ */ b("th", {
232
- className: "ttw:px-3 ttw:py-2 ttw:text-right ttw:font-normal",
233
- children: P.lineItemsQuantityHeading
234
- }),
235
- /* @__PURE__ */ b("th", {
236
- className: "ttw:px-3 ttw:py-2 ttw:text-right ttw:font-normal",
237
- children: P.lineItemsAmountHeading
238
- })
239
- ]
240
- }) }), /* @__PURE__ */ b("tbody", { children: i.lineItems.map((e) => /* @__PURE__ */ x("tr", {
241
- className: "ttw:border-b ttw:border-border",
242
- children: [
243
- /* @__PURE__ */ x("td", {
244
- className: "ttw:px-3 ttw:py-2",
245
- children: [/* @__PURE__ */ b("span", {
246
- className: "ttw:block",
247
- children: e.description
248
- }), /* @__PURE__ */ b("span", {
249
- className: "ttw:block ttw:text-xs ttw:text-muted-foreground",
250
- children: e.glCodeLabel
251
- })]
252
- }),
253
- /* @__PURE__ */ b("td", {
254
- className: "ttw:px-3 ttw:py-2 ttw:text-right ttw:whitespace-nowrap ttw:text-muted-foreground",
255
- children: e.quantityLabel
256
- }),
257
- /* @__PURE__ */ b("td", {
258
- className: "ttw:px-3 ttw:py-2 ttw:text-right ttw:whitespace-nowrap",
259
- children: e.amountLabel
260
- })
261
- ]
262
- }, e.id)) })]
263
- }) : null,
264
- /* @__PURE__ */ b("dl", {
265
- className: "ttw:flex ttw:flex-col ttw:gap-1",
266
- children: i.totals.map((e) => /* @__PURE__ */ x("div", {
267
- className: e.emphasis ? "ttw:flex ttw:justify-between ttw:gap-6 ttw:border-t ttw:border-border ttw:pt-2 ttw:text-base ttw:font-semibold" : "ttw:flex ttw:justify-between ttw:gap-6 ttw:text-sm",
268
- children: [/* @__PURE__ */ b("dt", {
269
- className: e.emphasis ? "" : "ttw:text-muted-foreground",
270
- children: e.label
271
- }), /* @__PURE__ */ b("dd", { children: e.value })]
272
- }, e.label))
273
- })
274
- ]
275
- })
276
- }),
277
- S ? /* @__PURE__ */ b(f, {
278
- view: S,
279
- labels: P.approvalPolicy
280
- }) : null
281
- ] }) : null
282
- })]
283
- })
284
- });
285
- }
13
+ var o = {
14
+ loadingTitle: "Loading bill…",
15
+ hiddenDescription: "Bill details",
16
+ errorTitle: "Couldn't load this bill",
17
+ errorDescription: "Something went wrong. Try again.",
18
+ amountDueHeading: "Amount due",
19
+ amountPaidHeading: "Amount paid",
20
+ invoiceDateLabel: "Invoice date",
21
+ dueDateLabel: "Due date",
22
+ payToHeading: "Pay to",
23
+ payToHeadingPaid: "Paid to",
24
+ invoiceDetailsHeading: "Invoice details",
25
+ lineItemsHeading: "Line items",
26
+ lineItemsQuantityHeading: "Qty/Price",
27
+ lineItemsAmountHeading: "Amount",
28
+ payButton: "Pay",
29
+ markAsPaidButton: "Mark as paid",
30
+ rejectButton: "Reject",
31
+ approveButton: "Approve",
32
+ cancelButton: "Cancel bill",
33
+ cancelScheduledPaymentButton: "Cancel scheduled payment",
34
+ reopenButton: "Reopen bill",
35
+ forceApproveButton: "Approve",
36
+ forceRejectButton: "Reject",
37
+ policyOverridesGroup: "Policy overrides",
38
+ overflowMenuTrigger: "Bill actions",
39
+ expandButton: "Open full screen",
40
+ closeButton: "Close",
41
+ statusBadge: r,
42
+ approvalPolicy: n,
43
+ dueDate: i
44
+ }, s = ".pdf,.png,.jpg,.jpeg,.doc,.docx", c = {
45
+ ...t,
46
+ dropzone: {
47
+ ...t.dropzone,
48
+ fileTypesHint: "PDF, DOC, JPG, or PNG (max. 3MB)"
49
+ }
50
+ }, l = {
51
+ createButton: "Add bill",
52
+ columnVendor: "Vendor",
53
+ columnAttachment: "Attachment",
54
+ columnIssueDate: "Issue date",
55
+ columnDueDate: "Due date",
56
+ columnScheduledDate: "Scheduled date",
57
+ columnPaidDate: "Paid date",
58
+ columnAmountDue: "Amount due",
59
+ columnAmountScheduled: "Amount scheduled",
60
+ columnAmountPaid: "Amount paid",
61
+ columnTotalAmount: "Total amount",
62
+ columnStatus: "Status",
63
+ columnAddedOn: "Added on",
64
+ columnActions: "Actions",
65
+ openRow: (e) => `View bill — ${e}`,
66
+ duplicateBillsReviewButton: "Review duplicates",
67
+ searchPlaceholder: "Search by vendor name",
68
+ searchLabel: "Search bills by vendor name",
69
+ filterTabsLabel: "Filter bills by status",
70
+ filteredEmptyTitle: "No bills match",
71
+ filteredEmptyDescription: "Try a different search or status filter.",
72
+ errorTitle: "Couldn't load bills",
73
+ errorDescription: "Something went wrong. Try again.",
74
+ errorRetry: "Retry",
75
+ statusBadge: r,
76
+ addBill: c,
77
+ sortableHeader: {
78
+ sortedAscending: e.sortedAscending,
79
+ sortedDescending: e.sortedDescending,
80
+ notSorted: e.notSorted
81
+ },
82
+ missingValue: a,
83
+ dueDate: i
84
+ };
286
85
  //#endregion
287
- export { D as BillDetailsSheet, D as default };
86
+ export { l as BILLS_SCREEN_LABELS_EN, s as BILLS_SCREEN_UPLOAD_ACCEPT, o as BILL_DETAILS_SHEET_LABELS_EN };
@@ -1,13 +1,287 @@
1
- import { Badge as e } from "../../../../../packages/shared-ui-shadcn/dist/index.js";
2
- import { BADGE_TONE_CLASS_NAME as t } from "./index19.js";
3
- import { jsx as n } from "react/jsx-runtime";
1
+ import { Badge as e, Button as t, Collapsible as n, CollapsibleContent as r, CollapsibleTrigger as i, Sheet as a, SheetContent as o, SheetDescription as s, SheetHeader as c, SheetTitle as l, Skeleton as u, Typography as d } from "../../../../../packages/shared-ui-shadcn/dist/index.js";
2
+ import { ApprovalPolicyCard as f } from "./index13.js";
3
+ import "./index14.js";
4
+ import { BillStatusBadge as p } from "./index18.js";
5
+ import "./index19.js";
6
+ import { DueDateValue as m } from "./index21.js";
7
+ import "./index22.js";
8
+ import { BillActionButtons as h, NO_BILL_ACTIONS as g } from "./index15.js";
9
+ import { BillOverflowMenu as _ } from "./index30.js";
10
+ import "./index31.js";
11
+ import { BILL_DETAILS_SHEET_LABELS_EN as v } from "./index57.js";
12
+ import { Fragment as y, jsx as b, jsxs as x } from "react/jsx-runtime";
13
+ import { ChevronDownIcon as S, MoveDiagonal2Icon as C, XIcon as w } from "lucide-react";
4
14
  //#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index58.js
5
- function r({ label: r, tone: i = "warning" }) {
6
- return /* @__PURE__ */ n(e, {
7
- variant: "outline",
8
- className: t[i],
9
- children: r
15
+ function T({ items: e }) {
16
+ return /* @__PURE__ */ b("dl", {
17
+ className: "ttw:flex ttw:flex-col",
18
+ children: e.map((e) => /* @__PURE__ */ x("div", {
19
+ className: "ttw:flex ttw:items-start ttw:justify-between ttw:gap-6 ttw:border-b ttw:border-border ttw:py-3 ttw:last:border-b-0",
20
+ children: [/* @__PURE__ */ b("dt", {
21
+ className: "ttw:text-sm ttw:text-muted-foreground",
22
+ children: e.label
23
+ }), /* @__PURE__ */ x("dd", {
24
+ className: "ttw:flex ttw:flex-col ttw:items-end ttw:text-right",
25
+ children: [/* @__PURE__ */ b("span", {
26
+ className: "ttw:text-sm ttw:font-medium",
27
+ children: e.value
28
+ }), e.secondaryValue ? /* @__PURE__ */ b("span", {
29
+ className: "ttw:text-sm ttw:text-muted-foreground",
30
+ children: e.secondaryValue
31
+ }) : null]
32
+ })]
33
+ }, e.label))
34
+ });
35
+ }
36
+ function E({ heading: e, children: t }) {
37
+ return /* @__PURE__ */ x(n, {
38
+ defaultOpen: !0,
39
+ className: "ttw:flex ttw:flex-col ttw:gap-3",
40
+ children: [/* @__PURE__ */ x(i, {
41
+ className: "ttw:group ttw:flex ttw:w-full ttw:items-center ttw:justify-between ttw:rounded-xs ttw:focus-visible:ring-2 ttw:focus-visible:ring-ring ttw:focus-visible:outline-hidden",
42
+ children: [/* @__PURE__ */ b(d, {
43
+ variant: "body1",
44
+ className: "ttw:font-semibold",
45
+ children: e
46
+ }), /* @__PURE__ */ b(S, { className: "ttw:size-4 ttw:text-muted-foreground ttw:transition-transform ttw:group-data-[state=closed]:-rotate-90" })]
47
+ }), /* @__PURE__ */ b(r, { children: t })]
48
+ });
49
+ }
50
+ function D({ open: n, onOpenChange: r, details: i, actions: d = g, approvalPolicy: S, isLoading: D, isError: O, notice: k, onClose: A, onExpand: j, testId: M, labels: N }) {
51
+ let P = {
52
+ ...v,
53
+ ...N,
54
+ statusBadge: {
55
+ ...v.statusBadge,
56
+ ...N?.statusBadge
57
+ },
58
+ approvalPolicy: {
59
+ ...v.approvalPolicy,
60
+ ...N?.approvalPolicy
61
+ },
62
+ dueDate: {
63
+ ...v.dueDate,
64
+ ...N?.dueDate
65
+ }
66
+ };
67
+ return /* @__PURE__ */ b(a, {
68
+ open: n,
69
+ onOpenChange: (e) => e ? r(e) : A(),
70
+ children: /* @__PURE__ */ x(o, {
71
+ showCloseButton: !1,
72
+ className: "ttw:w-150 ttw:gap-0 ttw:overflow-y-auto ttw:sm:max-w-150",
73
+ "data-testid": M,
74
+ children: [/* @__PURE__ */ x(c, {
75
+ className: "ttw:flex ttw:flex-row ttw:items-start ttw:justify-between ttw:gap-3",
76
+ children: [/* @__PURE__ */ x("div", {
77
+ className: "ttw:flex ttw:flex-col ttw:gap-0.5",
78
+ children: [
79
+ /* @__PURE__ */ b(l, {
80
+ className: D ? "ttw:sr-only" : "ttw:text-xl ttw:font-semibold",
81
+ children: O ? P.errorTitle : D ? P.loadingTitle : i?.title
82
+ }),
83
+ D ? /* @__PURE__ */ x("div", {
84
+ "aria-hidden": !0,
85
+ className: "ttw:flex ttw:flex-col ttw:gap-2 ttw:py-1",
86
+ children: [/* @__PURE__ */ b(u, { className: "ttw:h-6 ttw:w-48" }), /* @__PURE__ */ b(u, { className: "ttw:h-4 ttw:w-28" })]
87
+ }) : null,
88
+ i && !D && !O ? /* @__PURE__ */ b("p", {
89
+ className: "ttw:text-sm ttw:text-muted-foreground",
90
+ children: i.subtitle
91
+ }) : null,
92
+ /* @__PURE__ */ b(s, {
93
+ className: "ttw:sr-only",
94
+ children: P.hiddenDescription
95
+ })
96
+ ]
97
+ }), /* @__PURE__ */ x("div", {
98
+ className: "ttw:flex ttw:items-center ttw:gap-1",
99
+ children: [
100
+ j ? /* @__PURE__ */ b(t, {
101
+ type: "button",
102
+ variant: "ghost",
103
+ size: "icon",
104
+ "aria-label": P.expandButton,
105
+ onClick: j,
106
+ children: /* @__PURE__ */ b(C, { className: "ttw:size-4" })
107
+ }) : null,
108
+ i && !D && !O ? /* @__PURE__ */ b(_, {
109
+ actions: d.menu,
110
+ triggerLabel: P.overflowMenuTrigger,
111
+ placement: "header"
112
+ }) : null,
113
+ /* @__PURE__ */ b(t, {
114
+ type: "button",
115
+ variant: "ghost",
116
+ size: "icon",
117
+ "aria-label": P.closeButton,
118
+ onClick: A,
119
+ children: /* @__PURE__ */ b(w, { className: "ttw:size-4" })
120
+ })
121
+ ]
122
+ })]
123
+ }), /* @__PURE__ */ b("div", {
124
+ className: "ttw:flex ttw:flex-col ttw:gap-6 ttw:px-6 ttw:pb-6",
125
+ children: O ? /* @__PURE__ */ b("p", {
126
+ className: "ttw:text-sm ttw:text-muted-foreground",
127
+ children: P.errorDescription
128
+ }) : D ? /* @__PURE__ */ x("div", {
129
+ className: "ttw:flex ttw:flex-col ttw:gap-6",
130
+ children: [/* @__PURE__ */ b(u, { className: "ttw:h-32 ttw:w-full" }), /* @__PURE__ */ x("div", {
131
+ className: "ttw:flex ttw:flex-col ttw:gap-2",
132
+ children: [
133
+ /* @__PURE__ */ b(u, { className: "ttw:h-4 ttw:w-40" }),
134
+ /* @__PURE__ */ b(u, { className: "ttw:h-9 ttw:w-full" }),
135
+ /* @__PURE__ */ b(u, { className: "ttw:h-9 ttw:w-full" })
136
+ ]
137
+ })]
138
+ }) : i ? /* @__PURE__ */ x(y, { children: [
139
+ k,
140
+ /* @__PURE__ */ x("section", {
141
+ className: "ttw:flex ttw:flex-col ttw:gap-3 ttw:rounded-lg ttw:bg-muted/50 ttw:p-4",
142
+ children: [
143
+ /* @__PURE__ */ x("div", {
144
+ className: "ttw:flex ttw:flex-col ttw:gap-2",
145
+ children: [i.paidOnLabel ? /* @__PURE__ */ x("div", {
146
+ className: "ttw:grid ttw:grid-cols-2 ttw:gap-x-6",
147
+ children: [/* @__PURE__ */ x("div", {
148
+ className: "ttw:flex ttw:flex-col",
149
+ children: [/* @__PURE__ */ b("span", {
150
+ className: "ttw:text-sm ttw:text-muted-foreground",
151
+ children: P.amountDueHeading
152
+ }), /* @__PURE__ */ b("span", {
153
+ className: "ttw:text-3xl ttw:font-semibold",
154
+ children: i.amountDueLabel
155
+ })]
156
+ }), /* @__PURE__ */ x("div", {
157
+ className: "ttw:flex ttw:flex-col",
158
+ children: [/* @__PURE__ */ b("span", {
159
+ className: "ttw:text-sm ttw:text-muted-foreground",
160
+ children: P.amountPaidHeading
161
+ }), /* @__PURE__ */ b("span", {
162
+ className: "ttw:text-3xl ttw:font-semibold ttw:text-emerald-600",
163
+ children: i.amountPaidLabel
164
+ })]
165
+ })]
166
+ }) : /* @__PURE__ */ x(y, { children: [/* @__PURE__ */ b("span", {
167
+ className: "ttw:text-sm ttw:text-muted-foreground",
168
+ children: P.amountDueHeading
169
+ }), /* @__PURE__ */ b("span", {
170
+ className: "ttw:text-3xl ttw:font-semibold",
171
+ children: i.amountDueLabel
172
+ })] }), /* @__PURE__ */ b("div", { children: i.paidOnLabel ? /* @__PURE__ */ b(e, {
173
+ variant: "outline",
174
+ className: "ttw:border-emerald-200 ttw:bg-emerald-50 ttw:text-emerald-700",
175
+ children: i.paidOnLabel
176
+ }) : /* @__PURE__ */ b(p, {
177
+ status: i.status,
178
+ tone: i.statusTone,
179
+ labels: P.statusBadge
180
+ }) })]
181
+ }),
182
+ /* @__PURE__ */ x("div", {
183
+ className: "ttw:grid ttw:grid-cols-2 ttw:gap-x-6 ttw:gap-y-1",
184
+ children: [/* @__PURE__ */ x("div", {
185
+ className: "ttw:flex ttw:flex-col",
186
+ children: [/* @__PURE__ */ b("span", {
187
+ className: "ttw:text-xs ttw:text-muted-foreground",
188
+ children: P.invoiceDateLabel
189
+ }), /* @__PURE__ */ b("span", {
190
+ className: "ttw:text-sm ttw:font-medium",
191
+ children: i.invoiceDateLabel
192
+ })]
193
+ }), /* @__PURE__ */ x("div", {
194
+ className: "ttw:flex ttw:flex-col",
195
+ children: [/* @__PURE__ */ b("span", {
196
+ className: "ttw:text-xs ttw:text-muted-foreground",
197
+ children: P.dueDateLabel
198
+ }), /* @__PURE__ */ b(m, {
199
+ className: "ttw:text-sm ttw:font-medium",
200
+ value: i.dueDateLabel,
201
+ tone: i.dueDateTone,
202
+ labels: P.dueDate
203
+ })]
204
+ })]
205
+ }),
206
+ d.row.length ? /* @__PURE__ */ b("div", {
207
+ className: "ttw:flex ttw:items-center ttw:gap-2",
208
+ children: /* @__PURE__ */ b(h, { actions: d.row })
209
+ }) : null
210
+ ]
211
+ }),
212
+ /* @__PURE__ */ b(E, {
213
+ heading: i.paidOnLabel ? P.payToHeadingPaid : P.payToHeading,
214
+ children: /* @__PURE__ */ b(T, { items: i.payToItems })
215
+ }),
216
+ /* @__PURE__ */ b(E, {
217
+ heading: P.invoiceDetailsHeading,
218
+ children: /* @__PURE__ */ x("div", {
219
+ className: "ttw:flex ttw:flex-col ttw:gap-4",
220
+ children: [
221
+ /* @__PURE__ */ b(T, { items: i.invoiceItems }),
222
+ i.lineItems.length ? /* @__PURE__ */ x("table", {
223
+ className: "ttw:w-full ttw:text-sm",
224
+ children: [/* @__PURE__ */ b("thead", { children: /* @__PURE__ */ x("tr", {
225
+ className: "ttw:bg-muted/50 ttw:text-xs ttw:text-muted-foreground",
226
+ children: [
227
+ /* @__PURE__ */ b("th", {
228
+ className: "ttw:px-3 ttw:py-2 ttw:text-left ttw:font-normal",
229
+ children: P.lineItemsHeading
230
+ }),
231
+ /* @__PURE__ */ b("th", {
232
+ className: "ttw:px-3 ttw:py-2 ttw:text-right ttw:font-normal",
233
+ children: P.lineItemsQuantityHeading
234
+ }),
235
+ /* @__PURE__ */ b("th", {
236
+ className: "ttw:px-3 ttw:py-2 ttw:text-right ttw:font-normal",
237
+ children: P.lineItemsAmountHeading
238
+ })
239
+ ]
240
+ }) }), /* @__PURE__ */ b("tbody", { children: i.lineItems.map((e) => /* @__PURE__ */ x("tr", {
241
+ className: "ttw:border-b ttw:border-border",
242
+ children: [
243
+ /* @__PURE__ */ x("td", {
244
+ className: "ttw:px-3 ttw:py-2",
245
+ children: [/* @__PURE__ */ b("span", {
246
+ className: "ttw:block",
247
+ children: e.description
248
+ }), /* @__PURE__ */ b("span", {
249
+ className: "ttw:block ttw:text-xs ttw:text-muted-foreground",
250
+ children: e.glCodeLabel
251
+ })]
252
+ }),
253
+ /* @__PURE__ */ b("td", {
254
+ className: "ttw:px-3 ttw:py-2 ttw:text-right ttw:whitespace-nowrap ttw:text-muted-foreground",
255
+ children: e.quantityLabel
256
+ }),
257
+ /* @__PURE__ */ b("td", {
258
+ className: "ttw:px-3 ttw:py-2 ttw:text-right ttw:whitespace-nowrap",
259
+ children: e.amountLabel
260
+ })
261
+ ]
262
+ }, e.id)) })]
263
+ }) : null,
264
+ /* @__PURE__ */ b("dl", {
265
+ className: "ttw:flex ttw:flex-col ttw:gap-1",
266
+ children: i.totals.map((e) => /* @__PURE__ */ x("div", {
267
+ className: e.emphasis ? "ttw:flex ttw:justify-between ttw:gap-6 ttw:border-t ttw:border-border ttw:pt-2 ttw:text-base ttw:font-semibold" : "ttw:flex ttw:justify-between ttw:gap-6 ttw:text-sm",
268
+ children: [/* @__PURE__ */ b("dt", {
269
+ className: e.emphasis ? "" : "ttw:text-muted-foreground",
270
+ children: e.label
271
+ }), /* @__PURE__ */ b("dd", { children: e.value })]
272
+ }, e.label))
273
+ })
274
+ ]
275
+ })
276
+ }),
277
+ S ? /* @__PURE__ */ b(f, {
278
+ view: S,
279
+ labels: P.approvalPolicy
280
+ }) : null
281
+ ] }) : null
282
+ })]
283
+ })
10
284
  });
11
285
  }
12
286
  //#endregion
13
- export { r as BillDuplicateBadge, r as default };
287
+ export { D as BillDetailsSheet, D as default };