@tesouro/embedded-components-react 0.5.187 → 0.5.189

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 (99) hide show
  1. package/README.md +19 -9
  2. package/dist/index.css +110 -0
  3. package/dist/index.d.ts +233 -60
  4. package/dist/index.js +6 -6
  5. package/dist/lib/ExpenseManagementWidget.d.ts +189 -11
  6. package/dist/lib/ExpenseManagementWidget.js +1 -1
  7. package/dist/lib/UploadReceiptWidget.js +1 -1
  8. package/dist/lib/WidgetSuite.d.ts +213 -16
  9. package/dist/libs/tesouro-embedded-components-react/expense-management-widget/data-access/dist/index.js +17 -3
  10. package/dist/libs/tesouro-embedded-components-react/expense-management-widget/data-access/dist/index10.js +36 -0
  11. package/dist/libs/tesouro-embedded-components-react/expense-management-widget/data-access/dist/index11.js +71 -0
  12. package/dist/libs/tesouro-embedded-components-react/expense-management-widget/data-access/dist/index12.js +39 -0
  13. package/dist/libs/tesouro-embedded-components-react/expense-management-widget/data-access/dist/index13.js +32 -0
  14. package/dist/libs/tesouro-embedded-components-react/expense-management-widget/data-access/dist/index14.js +110 -0
  15. package/dist/libs/tesouro-embedded-components-react/expense-management-widget/data-access/dist/index15.js +33 -0
  16. package/dist/libs/tesouro-embedded-components-react/expense-management-widget/data-access/dist/index16.js +19 -0
  17. package/dist/libs/tesouro-embedded-components-react/expense-management-widget/data-access/dist/index17.js +33 -0
  18. package/dist/libs/tesouro-embedded-components-react/expense-management-widget/data-access/dist/index18.js +28 -0
  19. package/dist/libs/tesouro-embedded-components-react/expense-management-widget/data-access/dist/index19.js +35 -0
  20. package/dist/libs/tesouro-embedded-components-react/expense-management-widget/data-access/dist/index20.js +28 -0
  21. package/dist/libs/tesouro-embedded-components-react/expense-management-widget/data-access/dist/index21.js +164 -0
  22. package/dist/libs/tesouro-embedded-components-react/expense-management-widget/data-access/dist/index4.js +25 -18
  23. package/dist/libs/tesouro-embedded-components-react/expense-management-widget/data-access/dist/index5.js +20 -34
  24. package/dist/libs/tesouro-embedded-components-react/expense-management-widget/data-access/dist/index6.js +16 -20
  25. package/dist/libs/tesouro-embedded-components-react/expense-management-widget/data-access/dist/index7.js +16 -0
  26. package/dist/libs/tesouro-embedded-components-react/expense-management-widget/data-access/dist/index8.js +32 -0
  27. package/dist/libs/tesouro-embedded-components-react/expense-management-widget/data-access/dist/index9.js +26 -0
  28. package/dist/libs/tesouro-embedded-components-react/expense-management-widget/feature/dist/index.js +10 -7
  29. package/dist/libs/tesouro-embedded-components-react/expense-management-widget/feature/dist/index10.js +162 -59
  30. package/dist/libs/tesouro-embedded-components-react/expense-management-widget/feature/dist/index11.js +64 -16
  31. package/dist/libs/tesouro-embedded-components-react/expense-management-widget/feature/dist/index12.js +73 -2
  32. package/dist/libs/tesouro-embedded-components-react/expense-management-widget/feature/dist/index13.js +348 -42
  33. package/dist/libs/tesouro-embedded-components-react/expense-management-widget/feature/dist/index14.js +42 -1
  34. package/dist/libs/tesouro-embedded-components-react/expense-management-widget/feature/dist/index15.js +143 -0
  35. package/dist/libs/tesouro-embedded-components-react/expense-management-widget/feature/dist/index16.js +229 -0
  36. package/dist/libs/tesouro-embedded-components-react/expense-management-widget/feature/dist/index17.js +196 -0
  37. package/dist/libs/tesouro-embedded-components-react/expense-management-widget/feature/dist/index18.js +13 -0
  38. package/dist/libs/tesouro-embedded-components-react/expense-management-widget/feature/dist/index19.js +91 -0
  39. package/dist/libs/tesouro-embedded-components-react/expense-management-widget/feature/dist/index2.js +89 -2
  40. package/dist/libs/tesouro-embedded-components-react/expense-management-widget/feature/dist/index20.js +39 -0
  41. package/dist/libs/tesouro-embedded-components-react/expense-management-widget/feature/dist/index21.js +297 -0
  42. package/dist/libs/tesouro-embedded-components-react/expense-management-widget/feature/dist/index22.js +1 -0
  43. package/dist/libs/tesouro-embedded-components-react/expense-management-widget/feature/dist/index23.js +4 -0
  44. package/dist/libs/tesouro-embedded-components-react/expense-management-widget/feature/dist/index24.js +256 -0
  45. package/dist/libs/tesouro-embedded-components-react/expense-management-widget/feature/dist/index25.js +22 -0
  46. package/dist/libs/tesouro-embedded-components-react/expense-management-widget/feature/dist/index26.js +10 -0
  47. package/dist/libs/tesouro-embedded-components-react/expense-management-widget/feature/dist/index27.js +223 -0
  48. package/dist/libs/tesouro-embedded-components-react/expense-management-widget/feature/dist/index3.js +2 -254
  49. package/dist/libs/tesouro-embedded-components-react/expense-management-widget/feature/dist/index4.js +4 -20
  50. package/dist/libs/tesouro-embedded-components-react/expense-management-widget/feature/dist/index5.js +262 -8
  51. package/dist/libs/tesouro-embedded-components-react/expense-management-widget/feature/dist/index6.js +2 -221
  52. package/dist/libs/tesouro-embedded-components-react/expense-management-widget/feature/dist/index7.js +54 -80
  53. package/dist/libs/tesouro-embedded-components-react/expense-management-widget/feature/dist/index8.js +24 -254
  54. package/dist/libs/tesouro-embedded-components-react/expense-management-widget/feature/dist/index9.js +18 -2
  55. package/dist/libs/tesouro-embedded-components-react/expense-management-widget/ui/dist/index.js +34 -13
  56. package/dist/libs/tesouro-embedded-components-react/expense-management-widget/ui/dist/lib/AccordionItemCard/AccordionItemCard.js +549 -0
  57. package/dist/libs/tesouro-embedded-components-react/expense-management-widget/ui/dist/lib/AccordionItemCard/labels.js +38 -0
  58. package/dist/libs/tesouro-embedded-components-react/expense-management-widget/ui/dist/lib/ActionItemsList/ActionItemsList.js +64 -0
  59. package/dist/libs/tesouro-embedded-components-react/expense-management-widget/ui/dist/lib/ActionItemsList/labels.js +7 -0
  60. package/dist/libs/tesouro-embedded-components-react/expense-management-widget/ui/dist/lib/ExpenseStatusBadge/ExpenseStatusBadge.js +18 -0
  61. package/dist/libs/tesouro-embedded-components-react/expense-management-widget/ui/dist/lib/ExpenseStatusBadge/badgeTones.js +16 -0
  62. package/dist/libs/tesouro-embedded-components-react/expense-management-widget/ui/dist/lib/ExpenseStatusBadge/labels.js +13 -0
  63. package/dist/libs/tesouro-embedded-components-react/expense-management-widget/ui/dist/lib/ExpensesHeader/ExpensesHeader.js +37 -0
  64. package/dist/libs/tesouro-embedded-components-react/expense-management-widget/ui/dist/lib/ExpensesHeader/labels.js +7 -0
  65. package/dist/libs/tesouro-embedded-components-react/expense-management-widget/ui/dist/lib/ExpensesScreen/ExpensesScreen.js +112 -0
  66. package/dist/libs/tesouro-embedded-components-react/expense-management-widget/ui/dist/lib/ExpensesScreen/labels.js +11 -0
  67. package/dist/libs/tesouro-embedded-components-react/expense-management-widget/ui/dist/lib/ExpensesTransactionsFilterBar/ExpensesTransactionsFilterBar.js +158 -0
  68. package/dist/libs/tesouro-embedded-components-react/expense-management-widget/ui/dist/lib/ExpensesTransactionsFilterBar/labels.js +18 -0
  69. package/dist/libs/tesouro-embedded-components-react/expense-management-widget/ui/dist/lib/ExpensesTransactionsTable/ExpensesTransactionsTable.js +148 -0
  70. package/dist/libs/tesouro-embedded-components-react/expense-management-widget/ui/dist/lib/ExpensesTransactionsTable/labels.js +18 -0
  71. package/dist/libs/tesouro-embedded-components-react/expense-management-widget/ui/dist/lib/FileViewer/FileViewer.js +107 -0
  72. package/dist/libs/tesouro-embedded-components-react/expense-management-widget/ui/dist/lib/FileViewer/PdfFileViewer.js +37 -0
  73. package/dist/libs/tesouro-embedded-components-react/expense-management-widget/ui/dist/lib/FileViewer/labels.js +11 -0
  74. package/dist/libs/tesouro-embedded-components-react/expense-management-widget/ui/dist/lib/ReceiptMatchWidget/lib/ReceiptMatchLauncher.js +2 -24
  75. package/dist/libs/tesouro-embedded-components-react/expense-management-widget/ui/dist/lib/ReceiptMatchWidget/lib/ReceiptMatchSidebar.js +1 -1
  76. package/dist/libs/tesouro-embedded-components-react/expense-management-widget/ui/dist/lib/ReceiptMatchWidget/lib/TransactionsMatchStep.js +62 -65
  77. package/dist/libs/tesouro-embedded-components-react/expense-management-widget/ui/dist/lib/ReceiptMatchWidget/lib/labels.js +1 -4
  78. package/dist/libs/tesouro-embedded-components-react/expense-management-widget/ui/dist/lib/TransactionDetails/DeleteReceiptDialog/DeleteReceiptDialog.js +31 -0
  79. package/dist/libs/tesouro-embedded-components-react/expense-management-widget/ui/dist/lib/TransactionDetails/DeleteReceiptDialog/labels.js +9 -0
  80. package/dist/libs/tesouro-embedded-components-react/expense-management-widget/ui/dist/lib/TransactionDetails/TransactionDetails.js +268 -0
  81. package/dist/libs/tesouro-embedded-components-react/expense-management-widget/ui/dist/lib/TransactionDetails/labels.js +21 -0
  82. package/dist/libs/tesouro-embedded-components-react/expense-management-widget/ui/dist/lib/TransactionDetailsActions/BulkProgress.js +26 -0
  83. package/dist/libs/tesouro-embedded-components-react/expense-management-widget/ui/dist/lib/TransactionDetailsActions/TransactionDetailsActions.js +142 -0
  84. package/dist/libs/tesouro-embedded-components-react/expense-management-widget/ui/dist/lib/TransactionDetailsActions/labels.js +20 -0
  85. package/dist/libs/tesouro-embedded-components-react/expense-management-widget/ui/dist/lib/isPdf.js +7 -0
  86. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index109.js +55 -49
  87. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index56.js +24 -18
  88. package/dist/libs/tesouro-embedded-components-react/settings-widget/feature/dist/index5.js +2 -2
  89. package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/index.js +36 -36
  90. package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/rest/@tanstack/react-query.gen.js +268 -206
  91. package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/rest/sdk.gen.js +218 -113
  92. package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/analytics/build-info.js +1 -1
  93. package/dist/libs/tesouro-embedded-components-react/shared/util/dist/lib/formatCalendarDate.js +4 -4
  94. package/dist/libs/tesouro-embedded-components-react/widget-suite/feature/dist/index11.js +16 -14
  95. package/dist/libs/tesouro-embedded-components-react/widget-suite/feature/dist/index4.js +1 -2
  96. package/package.json +3 -3
  97. package/dist/libs/tesouro-embedded-components-react/expense-management-widget/ui/dist/lib/ExpenseManagementWidgetUi/ExpenseManagementWidgetUi.js +0 -71
  98. package/dist/libs/tesouro-embedded-components-react/expense-management-widget/ui/dist/lib/ExpenseManagementWidgetUi/index.js +0 -2
  99. package/dist/libs/tesouro-embedded-components-react/expense-management-widget/ui/dist/lib/ExpenseManagementWidgetUi/labels.js +0 -10
@@ -0,0 +1,549 @@
1
+ "use client";
2
+ "use client";
3
+ "use client";
4
+ "use client";
5
+ import { Accordion as e, AccordionContent as t, AccordionItem as n, AccordionTrigger as r, Alert as i, AlertDescription as a, AlertTitle as o, AuditHistoryList as s, Button as c, DropdownMenu as l, DropdownMenuContent as u, DropdownMenuItem as d, DropdownMenuTrigger as f, Select as p, SelectContent as m, SelectItem as h, SelectTrigger as g, SelectValue as _, Textarea as v, Typography as y, cn as b } from "../../../../../../../packages/shared-ui-shadcn/dist/index.js";
6
+ import { ACCORDION_ITEM_CARD_LABELS_EN as x } from "./labels.js";
7
+ import { useId as S } from "react";
8
+ import { Fragment as C, jsx as w, jsxs as T } from "react/jsx-runtime";
9
+ import { ArrowRight as E, ChevronDown as D, CircleAlert as O, ClipboardCheck as k, CreditCard as ee, Download as te, FileImage as ne, FileText as A, Paperclip as j, Receipt as M, Send as N, Sparkles as re, Trash2 as ie, TriangleAlert as ae, X as P, Zap as F } from "lucide-react";
10
+ //#region ../../libs/tesouro-embedded-components-react/expense-management-widget/ui/dist/lib/AccordionItemCard/AccordionItemCard.js
11
+ var I = {
12
+ receipt: M,
13
+ paperclip: j,
14
+ send: N
15
+ }, L = "ttw:rounded-sm ttw:bg-muted ttw:p-1 ttw:text-sm ttw:text-muted-foreground", R = "ttw:rounded-sm ttw:bg-muted ttw:px-1.5 ttw:py-0.5 ttw:text-[10px] ttw:leading-none ttw:text-muted-foreground", z = "ttw:min-w-35 ttw:px-3 ttw:py-4";
16
+ function oe() {
17
+ let e = `spent-from-card-${S().replace(/:/g, "")}`;
18
+ return /* @__PURE__ */ T("svg", {
19
+ width: "42",
20
+ height: "28",
21
+ viewBox: "0 0 42 28",
22
+ fill: "none",
23
+ "aria-hidden": !0,
24
+ xmlns: "http://www.w3.org/2000/svg",
25
+ children: [
26
+ /* @__PURE__ */ w("rect", {
27
+ width: "42",
28
+ height: "28",
29
+ rx: "3.5",
30
+ fill: `url(#${e})`
31
+ }),
32
+ /* @__PURE__ */ w("rect", {
33
+ x: "5",
34
+ y: "7",
35
+ width: "6",
36
+ height: "5",
37
+ rx: "1",
38
+ fill: "#A1A1AA"
39
+ }),
40
+ /* @__PURE__ */ w("defs", { children: /* @__PURE__ */ T("radialGradient", {
41
+ id: e,
42
+ cx: "0",
43
+ cy: "0",
44
+ r: "1",
45
+ gradientUnits: "userSpaceOnUse",
46
+ gradientTransform: "rotate(33.6901) scale(50.4777 75.7166)",
47
+ children: [/* @__PURE__ */ w("stop", { stopColor: "#3F3F46" }), /* @__PURE__ */ w("stop", {
48
+ offset: "1",
49
+ stopColor: "#18181B"
50
+ })]
51
+ }) })
52
+ ]
53
+ });
54
+ }
55
+ function B({ title: i, value: a, children: o }) {
56
+ return /* @__PURE__ */ w(e, {
57
+ type: "single",
58
+ collapsible: !0,
59
+ defaultValue: a,
60
+ children: /* @__PURE__ */ T(n, {
61
+ value: a,
62
+ className: "ttw:flex ttw:w-full ttw:flex-col ttw:gap-4 ttw:rounded-xl ttw:border ttw:border-border ttw:p-4 ttw:last:border-b",
63
+ children: [/* @__PURE__ */ w(r, {
64
+ iconPosition: "left",
65
+ iconClassName: "ttw:size-5",
66
+ className: "ttw:items-center ttw:py-0 ttw:hover:no-underline",
67
+ children: /* @__PURE__ */ w(y, {
68
+ variant: "h6",
69
+ children: i
70
+ })
71
+ }), /* @__PURE__ */ w(t, {
72
+ className: "ttw:flex ttw:flex-col ttw:pb-0",
73
+ children: o
74
+ })]
75
+ })
76
+ });
77
+ }
78
+ function V({ marker: e }) {
79
+ return /* @__PURE__ */ w("span", {
80
+ className: "ttw:inline-block ttw:-translate-y-0.5 ttw:text-sm ttw:font-normal ttw:text-destructive",
81
+ children: e
82
+ });
83
+ }
84
+ function H({ title: e, cardLabel: t, cardName: n, cardholder: r, showCardholder: s = !0, showPhysicalPill: p, receiptFileUrl: m, hasMissingInfo: h, showNoReceiptWarning: g, isReceiptRequired: _, isDescriptionRequired: S, isReceiptAutoMatched: E, isReceiptActionDisabled: k, receiptButtonLabel: P, receiptButtonIcon: F = "receipt", receiptButtonVariant: L = "outline", onUploadClick: H, onOpenReceiptInbox: U, onSubmitWithoutReceipt: W, onDeleteReceipt: G, descriptionValue: K, initialDescriptionValue: q, onDescriptionChange: se, onSaveDescription: ce, onCancelDescription: le, isSavingDescription: J, isMemoEditable: ue, memoBadgeLabel: Y, labels: de }) {
85
+ let X = {
86
+ ...x,
87
+ ...de
88
+ }, Z = I[F], fe = m ? [] : [
89
+ H && /* @__PURE__ */ T(d, {
90
+ onSelect: H,
91
+ children: [/* @__PURE__ */ w(j, {
92
+ className: "ttw:size-4",
93
+ "aria-hidden": !0
94
+ }), X.uploadDropdownUploadOption]
95
+ }, "upload"),
96
+ U && /* @__PURE__ */ T(d, {
97
+ onSelect: U,
98
+ children: [/* @__PURE__ */ w(ne, {
99
+ className: "ttw:size-4",
100
+ "aria-hidden": !0
101
+ }), X.uploadDropdownFindReceiptOption]
102
+ }, "inbox"),
103
+ W && /* @__PURE__ */ T(d, {
104
+ onSelect: W,
105
+ children: [/* @__PURE__ */ w(N, {
106
+ className: "ttw:size-4",
107
+ "aria-hidden": !0
108
+ }), X.uploadDropdownSubmitWithoutOption]
109
+ }, "without")
110
+ ], pe = m ? [/* @__PURE__ */ w(d, {
111
+ asChild: !0,
112
+ children: /* @__PURE__ */ T("a", {
113
+ href: m,
114
+ download: !0,
115
+ target: "_blank",
116
+ rel: "noreferrer",
117
+ children: [/* @__PURE__ */ w(te, { "aria-hidden": !0 }), X.uploadedReceiptDownloadOption]
118
+ })
119
+ }, "download"), G && /* @__PURE__ */ T(d, {
120
+ variant: "destructive",
121
+ onClick: G,
122
+ children: [/* @__PURE__ */ w(ie, { "aria-hidden": !0 }), X.uploadedReceiptDeleteOption]
123
+ }, "delete")] : [], Q = [...fe, ...pe].filter(Boolean), $ = E ? /* @__PURE__ */ T(c, {
124
+ type: "button",
125
+ variant: "ghost",
126
+ className: "ttw:flex ttw:items-center ttw:gap-2 ttw:text-purple-700 ttw:hover:bg-purple-50",
127
+ disabled: k,
128
+ children: [
129
+ /* @__PURE__ */ w(M, {
130
+ className: "ttw:size-4",
131
+ "aria-hidden": !0
132
+ }),
133
+ X.receiptAutoMatchedBadge,
134
+ Q.length > 0 && /* @__PURE__ */ w(D, {
135
+ className: "ttw:size-4",
136
+ "aria-hidden": !0
137
+ })
138
+ ]
139
+ }) : /* @__PURE__ */ T(c, {
140
+ type: "button",
141
+ variant: L,
142
+ className: "ttw:flex ttw:items-center ttw:gap-2",
143
+ disabled: k,
144
+ children: [
145
+ /* @__PURE__ */ w(Z, {
146
+ className: "ttw:size-4",
147
+ "aria-hidden": !0
148
+ }),
149
+ P,
150
+ Q.length > 0 && /* @__PURE__ */ w(D, {
151
+ className: "ttw:size-4",
152
+ "aria-hidden": !0
153
+ })
154
+ ]
155
+ });
156
+ return /* @__PURE__ */ T(B, {
157
+ title: e,
158
+ value: "requirements",
159
+ children: [
160
+ h && /* @__PURE__ */ T(i, {
161
+ className: "ttw:mb-4 ttw:flex ttw:border-amber-100 ttw:bg-amber-50 ttw:text-amber-700",
162
+ children: [/* @__PURE__ */ w(ae, { "aria-hidden": !0 }), /* @__PURE__ */ w(o, {
163
+ className: "ttw:font-medium",
164
+ children: X.missingInfoWarning
165
+ })]
166
+ }),
167
+ g && /* @__PURE__ */ T(i, {
168
+ className: "ttw:mb-4 ttw:flex ttw:border-border ttw:bg-muted",
169
+ children: [/* @__PURE__ */ w(O, {
170
+ className: "ttw:size-5 ttw:shrink-0",
171
+ "aria-hidden": !0
172
+ }), /* @__PURE__ */ T(a, {
173
+ className: "ttw:text-muted-foreground",
174
+ children: [
175
+ /* @__PURE__ */ w("span", {
176
+ className: "ttw:font-semibold ttw:text-foreground",
177
+ children: X.noReceiptWarningTitle
178
+ }),
179
+ " ",
180
+ X.noReceiptWarningDescription
181
+ ]
182
+ })]
183
+ }),
184
+ /* @__PURE__ */ T("div", {
185
+ className: "ttw:flex",
186
+ children: [/* @__PURE__ */ w("div", {
187
+ className: z,
188
+ children: /* @__PURE__ */ T(y, {
189
+ variant: "body2",
190
+ color: "muted",
191
+ className: "ttw:flex ttw:items-center ttw:gap-2",
192
+ children: [
193
+ /* @__PURE__ */ w(ee, {
194
+ className: "ttw:size-4",
195
+ "aria-hidden": !0
196
+ }),
197
+ " ",
198
+ X.spentFrom
199
+ ]
200
+ })
201
+ }), /* @__PURE__ */ w("div", {
202
+ className: "ttw:flex ttw:items-center ttw:gap-3 ttw:px-3",
203
+ children: n ? /* @__PURE__ */ T(C, { children: [/* @__PURE__ */ w(oe, {}), /* @__PURE__ */ T("div", {
204
+ className: "ttw:flex ttw:flex-col",
205
+ children: [/* @__PURE__ */ w(y, {
206
+ variant: "body2",
207
+ className: "ttw:m-0 ttw:font-semibold ttw:leading-tight",
208
+ children: n
209
+ }), /* @__PURE__ */ T("div", {
210
+ className: "ttw:flex ttw:items-center ttw:gap-2",
211
+ children: [/* @__PURE__ */ w(y, {
212
+ variant: "caption",
213
+ color: "muted",
214
+ className: "ttw:leading-tight",
215
+ children: t
216
+ }), p && /* @__PURE__ */ w("span", {
217
+ className: R,
218
+ children: X.physical
219
+ })]
220
+ })]
221
+ })] }) : /* @__PURE__ */ T(C, { children: [/* @__PURE__ */ w(y, {
222
+ variant: "body2",
223
+ className: "ttw:font-medium",
224
+ children: t
225
+ }), p && /* @__PURE__ */ w("span", {
226
+ className: R,
227
+ children: X.physical
228
+ })] })
229
+ })]
230
+ }),
231
+ s && /* @__PURE__ */ T("div", {
232
+ className: "ttw:flex",
233
+ children: [/* @__PURE__ */ w("div", {
234
+ className: z,
235
+ children: /* @__PURE__ */ w(y, {
236
+ variant: "body2",
237
+ color: "muted",
238
+ children: X.cardholder
239
+ })
240
+ }), /* @__PURE__ */ w("div", {
241
+ className: "ttw:flex ttw:items-center ttw:px-3",
242
+ children: /* @__PURE__ */ w(y, {
243
+ variant: "body2",
244
+ className: "ttw:font-medium",
245
+ children: r
246
+ })
247
+ })]
248
+ }),
249
+ /* @__PURE__ */ T("div", {
250
+ className: "ttw:flex",
251
+ children: [/* @__PURE__ */ w("div", {
252
+ className: z,
253
+ children: /* @__PURE__ */ T(y, {
254
+ variant: "body2",
255
+ color: "muted",
256
+ className: "ttw:flex ttw:items-center ttw:gap-2",
257
+ children: [
258
+ /* @__PURE__ */ w(M, {
259
+ className: "ttw:size-4",
260
+ "aria-hidden": !0
261
+ }),
262
+ " ",
263
+ /* @__PURE__ */ T("span", { children: [X.receipt, _ && /* @__PURE__ */ w(V, { marker: X.requiredMarker })] })
264
+ ]
265
+ })
266
+ }), /* @__PURE__ */ w("div", {
267
+ className: "ttw:flex ttw:items-center ttw:px-3",
268
+ children: Q.length > 0 ? /* @__PURE__ */ T(l, { children: [/* @__PURE__ */ w(f, {
269
+ asChild: !0,
270
+ children: $
271
+ }), /* @__PURE__ */ w(u, {
272
+ "aria-label": X.receiptMenuAriaLabel,
273
+ children: Q
274
+ })] }) : $
275
+ })]
276
+ }),
277
+ /* @__PURE__ */ T("div", {
278
+ className: "ttw:flex",
279
+ children: [/* @__PURE__ */ T("div", {
280
+ className: z,
281
+ children: [/* @__PURE__ */ T(y, {
282
+ variant: "body2",
283
+ color: Y ? void 0 : "muted",
284
+ className: b("ttw:flex ttw:items-center ttw:gap-2", Y && "ttw:text-purple-700"),
285
+ children: [
286
+ w(Y ? re : A, {
287
+ className: "ttw:size-4",
288
+ "aria-hidden": !0
289
+ }),
290
+ " ",
291
+ /* @__PURE__ */ T("span", { children: [X.memo, S && /* @__PURE__ */ w(V, { marker: X.requiredMarker })] })
292
+ ]
293
+ }), Y && /* @__PURE__ */ w("span", {
294
+ className: "ttw:rounded-md ttw:bg-purple-100 ttw:px-2 ttw:py-0.5 ttw:text-sm ttw:font-medium ttw:text-purple-700",
295
+ children: Y
296
+ })]
297
+ }), /* @__PURE__ */ T("div", {
298
+ className: "ttw:flex ttw:w-full ttw:flex-col ttw:gap-3 ttw:px-3 ttw:py-1",
299
+ children: [/* @__PURE__ */ w(v, {
300
+ "aria-label": X.memo,
301
+ className: "ttw:max-h-24 ttw:min-h-24 ttw:resize-none",
302
+ value: K,
303
+ onChange: se,
304
+ disabled: !ue
305
+ }), K !== q && /* @__PURE__ */ T("div", {
306
+ className: "ttw:flex ttw:gap-2",
307
+ children: [/* @__PURE__ */ w(c, {
308
+ type: "button",
309
+ variant: "ghost",
310
+ disabled: J,
311
+ onClick: le,
312
+ children: X.cancelButton
313
+ }), /* @__PURE__ */ w(c, {
314
+ type: "button",
315
+ onClick: ce,
316
+ disabled: J,
317
+ children: X.saveButton
318
+ })]
319
+ })]
320
+ })]
321
+ })
322
+ ]
323
+ });
324
+ }
325
+ function U({ title: e, greaterThanValue: t, lessThanValue: n, ruleLabel: r, hasAppliedPolicy: o, isRejected: s, isAutoApproved: c, isManuallyApproved: l, isPendingReview: u, rejectionReason: d, approverName: f, labels: p }) {
326
+ let m = {
327
+ ...x,
328
+ ...p
329
+ };
330
+ return /* @__PURE__ */ T(B, {
331
+ title: e,
332
+ value: "approvals",
333
+ children: [
334
+ s && /* @__PURE__ */ T(i, {
335
+ className: "ttw:mb-4 ttw:flex ttw:border-pink-200 ttw:bg-pink-50 ttw:text-pink-700",
336
+ children: [/* @__PURE__ */ w(P, { "aria-hidden": !0 }), /* @__PURE__ */ w(a, {
337
+ className: "ttw:text-pink-700",
338
+ children: d ? `"${d}"` : m.emptyRejectionReason
339
+ })]
340
+ }),
341
+ /* @__PURE__ */ T("div", {
342
+ className: "ttw:flex",
343
+ children: [/* @__PURE__ */ w("div", {
344
+ className: z,
345
+ children: /* @__PURE__ */ T(y, {
346
+ variant: "body2",
347
+ color: "muted",
348
+ className: "ttw:flex ttw:items-center ttw:gap-2",
349
+ children: [
350
+ /* @__PURE__ */ w(k, {
351
+ className: "ttw:size-4",
352
+ "aria-hidden": !0
353
+ }),
354
+ " ",
355
+ m.rule
356
+ ]
357
+ })
358
+ }), /* @__PURE__ */ w("div", {
359
+ className: "ttw:flex ttw:items-center ttw:gap-0.5 ttw:px-3",
360
+ children: r ? /* @__PURE__ */ w("span", {
361
+ className: L,
362
+ children: r
363
+ }) : o ? /* @__PURE__ */ T(C, { children: [
364
+ !!t && /* @__PURE__ */ T(C, { children: [/* @__PURE__ */ w(y, {
365
+ variant: "body2",
366
+ className: "ttw:font-medium",
367
+ children: m.greaterThan
368
+ }), /* @__PURE__ */ w("span", {
369
+ className: L,
370
+ children: t
371
+ })] }),
372
+ !!(t && n) && /* @__PURE__ */ w(E, {
373
+ className: "ttw:size-4",
374
+ "aria-hidden": !0
375
+ }),
376
+ !!n && /* @__PURE__ */ T(C, { children: [/* @__PURE__ */ w(y, {
377
+ variant: "body2",
378
+ className: "ttw:font-medium",
379
+ children: m.lessThan
380
+ }), /* @__PURE__ */ w("span", {
381
+ className: L,
382
+ children: n
383
+ })] })
384
+ ] }) : /* @__PURE__ */ w("span", {
385
+ className: L,
386
+ children: m.systemDefaultApplied
387
+ })
388
+ })]
389
+ }),
390
+ /* @__PURE__ */ T("div", {
391
+ className: "ttw:flex",
392
+ children: [/* @__PURE__ */ w("div", {
393
+ className: z,
394
+ children: /* @__PURE__ */ T(y, {
395
+ variant: "body2",
396
+ color: "muted",
397
+ className: "ttw:flex ttw:items-center ttw:gap-2",
398
+ children: [
399
+ /* @__PURE__ */ w(F, {
400
+ className: "ttw:size-4",
401
+ "aria-hidden": !0
402
+ }),
403
+ " ",
404
+ m.status
405
+ ]
406
+ })
407
+ }), /* @__PURE__ */ T("div", {
408
+ className: "ttw:flex ttw:items-center ttw:px-3",
409
+ children: [
410
+ c && /* @__PURE__ */ w("span", {
411
+ className: "ttw:rounded-md ttw:bg-emerald-100 ttw:px-2 ttw:py-0.5 ttw:text-sm ttw:font-medium ttw:text-emerald-700",
412
+ children: m.autoApproval
413
+ }),
414
+ l && /* @__PURE__ */ w("span", {
415
+ className: "ttw:rounded-md ttw:bg-indigo-100 ttw:px-2 ttw:py-0.5 ttw:text-sm ttw:font-medium ttw:text-indigo-700",
416
+ children: f ? m.approvedBy(f) : m.approved
417
+ }),
418
+ s && /* @__PURE__ */ w("span", {
419
+ className: "ttw:rounded-md ttw:bg-indigo-100 ttw:px-2 ttw:py-0.5 ttw:text-sm ttw:font-medium ttw:text-indigo-700",
420
+ children: f ? m.rejectedBy(f) : m.rejected
421
+ }),
422
+ u && /* @__PURE__ */ w("span", {
423
+ className: "ttw:rounded-md ttw:bg-amber-100 ttw:px-2 ttw:py-0.5 ttw:text-sm ttw:font-medium ttw:text-amber-700",
424
+ children: m.awaitingReview
425
+ })
426
+ ]
427
+ })]
428
+ })
429
+ ]
430
+ });
431
+ }
432
+ function W({ title: i, rows: a, isLoading: o, isError: c, historyLabels: l }) {
433
+ return /* @__PURE__ */ w(e, {
434
+ type: "single",
435
+ collapsible: !0,
436
+ children: /* @__PURE__ */ T(n, {
437
+ value: "auditHistory",
438
+ className: "ttw:flex ttw:w-full ttw:flex-col ttw:gap-4 ttw:rounded-xl ttw:border ttw:border-border ttw:p-4 ttw:last:border-b",
439
+ children: [/* @__PURE__ */ w(r, {
440
+ iconPosition: "left",
441
+ iconClassName: "ttw:size-5",
442
+ className: "ttw:items-center ttw:py-0 ttw:hover:no-underline",
443
+ children: /* @__PURE__ */ w(y, {
444
+ variant: "h6",
445
+ children: i
446
+ })
447
+ }), /* @__PURE__ */ w(t, {
448
+ className: "ttw:flex ttw:flex-col ttw:pb-0",
449
+ children: /* @__PURE__ */ w(s, {
450
+ rows: a,
451
+ isLoading: o,
452
+ isError: c,
453
+ labels: l,
454
+ showHeader: !0
455
+ })
456
+ })]
457
+ })
458
+ });
459
+ }
460
+ function G({ label: e, highlighted: t, value: n, options: r, onChange: i, disabled: a }) {
461
+ return /* @__PURE__ */ T("div", {
462
+ className: "ttw:flex ttw:items-center",
463
+ children: [/* @__PURE__ */ w("div", {
464
+ className: z,
465
+ children: /* @__PURE__ */ T(y, {
466
+ variant: "body2",
467
+ color: t ? void 0 : "muted",
468
+ className: b("ttw:flex ttw:items-center ttw:gap-2 ttw:font-medium", t && "ttw:text-purple-700"),
469
+ children: [
470
+ /* @__PURE__ */ w(F, {
471
+ className: "ttw:size-4",
472
+ "aria-hidden": !0
473
+ }),
474
+ " ",
475
+ e
476
+ ]
477
+ })
478
+ }), /* @__PURE__ */ w("div", {
479
+ className: "ttw:w-full ttw:px-3",
480
+ children: /* @__PURE__ */ T(p, {
481
+ value: n,
482
+ onValueChange: i,
483
+ disabled: a,
484
+ children: [/* @__PURE__ */ w(g, {
485
+ className: "ttw:w-full",
486
+ "aria-label": e,
487
+ children: /* @__PURE__ */ w(_, {})
488
+ }), /* @__PURE__ */ w(m, { children: r.map((e) => /* @__PURE__ */ w(h, {
489
+ value: e.value,
490
+ children: e.label
491
+ }, e.value)) })]
492
+ })
493
+ })]
494
+ });
495
+ }
496
+ function K({ title: e, glCategory: t, initialGlCategory: n, glCategoryOptions: r, onGlCategoryChange: i, department: a, initialDepartment: o, departmentOptions: s, onDepartmentChange: l, location: u, initialLocation: d, locationOptions: f, onLocationChange: p, onSave: m, onCancel: h, isSaving: g, isGlCategoryDisabled: _, glCategoryHighlight: v, departmentHighlight: y, locationHighlight: b, labels: S }) {
497
+ let C = {
498
+ ...x,
499
+ ...S
500
+ }, E = t !== n || a !== o || u !== d;
501
+ return /* @__PURE__ */ T(B, {
502
+ title: e,
503
+ value: "accounting",
504
+ children: [
505
+ /* @__PURE__ */ w(G, {
506
+ label: C.glCategory,
507
+ highlighted: v,
508
+ value: t,
509
+ options: r,
510
+ onChange: i,
511
+ disabled: _
512
+ }),
513
+ /* @__PURE__ */ w(G, {
514
+ label: C.department,
515
+ highlighted: y,
516
+ value: a,
517
+ options: s,
518
+ onChange: l
519
+ }),
520
+ /* @__PURE__ */ w(G, {
521
+ label: C.location,
522
+ highlighted: b,
523
+ value: u,
524
+ options: f,
525
+ onChange: p
526
+ }),
527
+ E && /* @__PURE__ */ T("div", {
528
+ className: "ttw:flex ttw:justify-end ttw:gap-2 ttw:px-3",
529
+ children: [/* @__PURE__ */ w(c, {
530
+ type: "button",
531
+ variant: "ghost",
532
+ disabled: g,
533
+ onClick: h,
534
+ children: C.cancelButton
535
+ }), /* @__PURE__ */ w(c, {
536
+ type: "button",
537
+ disabled: g,
538
+ onClick: m,
539
+ children: C.saveButton
540
+ })]
541
+ })
542
+ ]
543
+ });
544
+ }
545
+ function q(e) {
546
+ return e.type === "auditHistory" ? /* @__PURE__ */ w(W, { ...e }) : e.type === "approvals" ? /* @__PURE__ */ w(U, { ...e }) : e.type === "accounting" ? /* @__PURE__ */ w(K, { ...e }) : /* @__PURE__ */ w(H, { ...e });
547
+ }
548
+ //#endregion
549
+ export { q as AccordionItemCard, q as default };
@@ -0,0 +1,38 @@
1
+ //#region ../../libs/tesouro-embedded-components-react/expense-management-widget/ui/dist/lib/AccordionItemCard/labels.js
2
+ var e = {
3
+ spentFrom: "Spent from",
4
+ cardholder: "Cardholder",
5
+ physical: "Physical",
6
+ receipt: "Receipt",
7
+ memo: "Memo",
8
+ requiredMarker: "*",
9
+ missingInfoWarning: "Missing information",
10
+ noReceiptWarningTitle: "No receipt?",
11
+ noReceiptWarningDescription: "You can attach another piece of evidence, such as a payment confirmation email, flight booking, or event attendance confirmation.",
12
+ receiptAutoMatchedBadge: "Auto-matched",
13
+ receiptMenuAriaLabel: "Receipt actions",
14
+ uploadDropdownUploadOption: "Upload receipt attachment",
15
+ uploadDropdownFindReceiptOption: "Find in receipt inbox",
16
+ uploadDropdownSubmitWithoutOption: "Submit transaction without receipt",
17
+ uploadedReceiptDownloadOption: "Download attachment",
18
+ uploadedReceiptDeleteOption: "Delete attachment",
19
+ saveButton: "Save",
20
+ cancelButton: "Cancel",
21
+ emptyRejectionReason: "Approver did not provide a rejection reason.",
22
+ rule: "Rule",
23
+ greaterThan: "Greater than",
24
+ lessThan: "Less than",
25
+ systemDefaultApplied: "System default rule applied.",
26
+ status: "Status",
27
+ autoApproval: "Auto approval",
28
+ approved: "Approved",
29
+ approvedBy: (e) => `Approved by ${e}`,
30
+ rejected: "Rejected",
31
+ rejectedBy: (e) => `Rejected by ${e}`,
32
+ awaitingReview: "Awaiting review",
33
+ glCategory: "GL Category",
34
+ department: "Department",
35
+ location: "Location"
36
+ };
37
+ //#endregion
38
+ export { e as ACCORDION_ITEM_CARD_LABELS_EN };
@@ -0,0 +1,64 @@
1
+ "use client";
2
+ "use client";
3
+ "use client";
4
+ "use client";
5
+ import { Button as e, Collapsible as t, CollapsibleContent as n, CollapsibleTrigger as r, Typography as i, cn as a } from "../../../../../../../packages/shared-ui-shadcn/dist/index.js";
6
+ import { ACTION_ITEMS_LIST_LABELS_EN as o } from "./labels.js";
7
+ import { jsx as s, jsxs as c } from "react/jsx-runtime";
8
+ import { ArrowRight as l, ChevronDown as u } from "lucide-react";
9
+ //#region ../../libs/tesouro-embedded-components-react/expense-management-widget/ui/dist/lib/ActionItemsList/ActionItemsList.js
10
+ var d = {
11
+ success: "ttw:bg-green-500",
12
+ danger: "ttw:bg-red-500",
13
+ info: "ttw:bg-indigo-500"
14
+ };
15
+ function f({ labels: f, items: p }) {
16
+ let m = {
17
+ ...o,
18
+ ...f
19
+ };
20
+ return p.length === 0 ? null : /* @__PURE__ */ c(t, {
21
+ defaultOpen: !0,
22
+ className: "ttw:mb-6 ttw:flex ttw:w-full ttw:flex-col ttw:gap-4",
23
+ children: [/* @__PURE__ */ c(r, {
24
+ className: "ttw:group ttw:flex ttw:w-fit ttw:cursor-pointer ttw:items-center ttw:gap-1 ttw:rounded-md ttw:text-left ttw:outline-none ttw:focus-visible:ring-[3px] ttw:focus-visible:ring-ring/50",
25
+ children: [/* @__PURE__ */ s(u, {
26
+ "aria-hidden": !0,
27
+ className: "ttw:size-5 ttw:shrink-0 ttw:transition-transform ttw:duration-200 ttw:group-data-[state=closed]:-rotate-90"
28
+ }), /* @__PURE__ */ s(i, {
29
+ variant: "h6",
30
+ component: "span",
31
+ children: m.heading
32
+ })]
33
+ }), /* @__PURE__ */ s(n, { children: /* @__PURE__ */ s("ul", {
34
+ className: "ttw:flex ttw:flex-col ttw:gap-4",
35
+ children: p.map((t) => /* @__PURE__ */ c("li", {
36
+ className: "ttw:flex ttw:w-full ttw:items-center ttw:gap-2.5 ttw:rounded-xl ttw:border ttw:border-border ttw:bg-white ttw:px-4 ttw:py-3",
37
+ children: [
38
+ /* @__PURE__ */ s("span", {
39
+ className: a("ttw:shrink-0 ttw:rounded-lg ttw:p-2.5 ttw:text-white", d[t.tone]),
40
+ children: t.icon
41
+ }),
42
+ /* @__PURE__ */ s(i, {
43
+ variant: "body2",
44
+ className: "ttw:min-w-0 ttw:flex-1 ttw:font-semibold",
45
+ children: t.message
46
+ }),
47
+ /* @__PURE__ */ c(e, {
48
+ type: "button",
49
+ variant: "ghost",
50
+ className: "ttw:flex ttw:shrink-0 ttw:items-center ttw:gap-1.5 ttw:text-primary ttw:hover:text-primary",
51
+ onClick: t.onReview,
52
+ "aria-label": t.reviewAriaLabel ?? m.reviewButton,
53
+ children: [m.reviewButton, /* @__PURE__ */ s(l, {
54
+ className: "ttw:size-4",
55
+ "aria-hidden": !0
56
+ })]
57
+ })
58
+ ]
59
+ }, t.id))
60
+ }) })]
61
+ });
62
+ }
63
+ //#endregion
64
+ export { f as ActionItemsList, f as default };
@@ -0,0 +1,7 @@
1
+ //#region ../../libs/tesouro-embedded-components-react/expense-management-widget/ui/dist/lib/ActionItemsList/labels.js
2
+ var e = {
3
+ heading: "Action items",
4
+ reviewButton: "Review"
5
+ };
6
+ //#endregion
7
+ export { e as ACTION_ITEMS_LIST_LABELS_EN };
@@ -0,0 +1,18 @@
1
+ import { Badge as e } from "../../../../../../../packages/shared-ui-shadcn/dist/index.js";
2
+ import { EXPENSE_STATUS_BADGE_LABELS_EN as t } from "./labels.js";
3
+ import { EXPENSE_BADGE_TONE_CLASS_NAME as n, EXPENSE_STATUS_TONE as r } from "./badgeTones.js";
4
+ import { jsx as i } from "react/jsx-runtime";
5
+ //#region ../../libs/tesouro-embedded-components-react/expense-management-widget/ui/dist/lib/ExpenseStatusBadge/ExpenseStatusBadge.js
6
+ function a({ status: a, hasValidationErrors: o = !1, labels: s }) {
7
+ let c = {
8
+ ...t,
9
+ ...s
10
+ }, l = a === "new", u = l ? o ? c.missingInfo : c.readyToSubmit : c[a] ?? c.unknown, d = l ? o ? "warning" : "info" : r[a] ?? "neutral";
11
+ return /* @__PURE__ */ i(e, {
12
+ variant: "outline",
13
+ className: n[d],
14
+ children: u
15
+ });
16
+ }
17
+ //#endregion
18
+ export { a as ExpenseStatusBadge, a as default };