@tesouro/embedded-components-react 0.11.234 → 0.11.236

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 (77) hide show
  1. package/README.md +53 -2
  2. package/dist/index.css +30 -0
  3. package/dist/index.d.ts +24 -0
  4. package/dist/lib/ReceivablesWidget.d.ts +24 -0
  5. package/dist/lib/WidgetSuite.d.ts +24 -0
  6. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index.js +6 -6
  7. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index31.js +198 -118
  8. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index32.js +76 -194
  9. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index33.js +67 -75
  10. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index34.js +111 -69
  11. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index35.js +459 -108
  12. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index36.js +101 -449
  13. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index37.js +9 -117
  14. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index38.js +85 -8
  15. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index39.js +67 -73
  16. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index40.js +246 -71
  17. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index41.js +40 -251
  18. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index42.js +237 -38
  19. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index43.js +21 -244
  20. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index44.js +529 -21
  21. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index45.js +4 -530
  22. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index46.js +44 -4
  23. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index47.js +242 -41
  24. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index48.js +3 -245
  25. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index49.js +5 -3
  26. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index50.js +63 -4
  27. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index51.js +1 -64
  28. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/lib/BillPayWidget/BillsTab.js +1 -1
  29. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/ReceivablesWidget.js +386 -354
  30. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/labels.js +1 -0
  31. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/useReceivableActions.js +1 -1
  32. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/useReceivableDetails.js +1 -1
  33. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/useReceivableForm.js +260 -258
  34. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/useReceivablesWidget.js +219 -179
  35. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index.js +26 -25
  36. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index19.js +15 -0
  37. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index32.js +31 -40
  38. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index33.js +18 -17
  39. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index34.js +40 -8
  40. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index35.js +30 -63
  41. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index36.js +463 -27
  42. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index37.js +15 -29
  43. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index38.js +8 -18
  44. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index39.js +18 -18
  45. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index40.js +19 -30
  46. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index41.js +15 -66
  47. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index42.js +66 -391
  48. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index43.js +148 -2
  49. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index44.js +173 -43
  50. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index45.js +3 -71
  51. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index46.js +37 -432
  52. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index47.js +66 -188
  53. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index48.js +455 -22
  54. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index49.js +191 -5
  55. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index50.js +23 -0
  56. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index51.js +5 -265
  57. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index53.js +261 -125
  58. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index54.js +2 -27
  59. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index55.js +122 -230
  60. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index56.js +27 -3
  61. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index57.js +216 -224
  62. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index58.js +3 -30
  63. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index59.js +228 -168
  64. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index60.js +29 -21
  65. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index61.js +152 -109
  66. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index62.js +22 -2
  67. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index63.js +140 -43
  68. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index64.js +2 -0
  69. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index65.js +47 -0
  70. package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/document-preview.js +1 -0
  71. package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/analytics/build-info.js +1 -1
  72. package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/document/documentPreview.js +122 -0
  73. package/dist/libs/tesouro-embedded-components-react/shared/ui/dist/lib/WidgetFrame/WidgetFrame.js +1 -1
  74. package/dist/packages/shared-ui-shadcn/dist/index.js +4584 -4551
  75. package/package.json +1 -1
  76. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index52.js +0 -1
  77. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index52.js +0 -2
@@ -1,30 +1,466 @@
1
- import { AccordionContent as e, AccordionItem as t, AuditHistoryList as n, Typography as r } from "../../../../../packages/shared-ui-shadcn/dist/index.js";
2
- import { RECEIVABLE_DETAILS_SECTION as i } from "./index34.js";
3
- import { sectionItemClass as a } from "./index32.js";
4
- import { SectionTrigger as o } from "./index33.js";
5
- import { jsx as s, jsxs as c } from "react/jsx-runtime";
1
+ import { AuditHistoryList as e, Badge as t, Button as n, DataTable as r, DisplayAmount as i, Heading as a, Skeleton as o, Tooltip as s, TooltipContent as c, TooltipProvider as l, TooltipTrigger as u, Typography as d, cn as f } from "../../../../../packages/shared-ui-shadcn/dist/index.js";
2
+ import { LoadingRegion as p } from "../../../shared/ui/dist/lib/LoadingRegion/LoadingRegion.js";
3
+ import "../../../shared/ui/dist/index.js";
4
+ import { StatusBadge as m } from "./index30.js";
5
+ import { ACTION_LABEL_KEY as h, preventTooltipFocusOpen as g } from "./index34.js";
6
+ import { AmountCell as _ } from "./index31.js";
7
+ import { CustomerNameRow as v } from "./index32.js";
8
+ import { InfoRow as y } from "./index33.js";
9
+ import { OverflowMenu as b } from "./index35.js";
10
+ import { Fragment as x, jsx as S, jsxs as C } from "react/jsx-runtime";
11
+ import { EyeIcon as w } from "lucide-react";
6
12
  // ../../libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index36.js
7
- function l({ auditHistory: l, labels: u }) {
8
- return /* @__PURE__ */ c(t, {
9
- value: i.auditHistory,
10
- className: a,
11
- children: [/* @__PURE__ */ s(o, {
12
- heading: u.auditHistoryHeading,
13
- countLabel: l.countLabel
14
- }), /* @__PURE__ */ c(e, { children: [l.showNamesError ? /* @__PURE__ */ s(r, {
13
+ function T(e, t, n) {
14
+ return e?.actionLabels?.[n] ?? t[h[n]];
15
+ }
16
+ function E({ details: e, panel: t, onActionClick: r, disabledActions: i, labels: a }) {
17
+ let o = t.summaryActions, s = (o, s) => o ? /* @__PURE__ */ S(n, {
18
+ type: "button",
19
+ variant: s,
20
+ disabled: i?.includes(o),
21
+ onClick: () => r(o, e),
22
+ children: T(t, a, o)
23
+ }) : null, c = s(o.at(-1), "default"), l = o.length > 1 ? s(o[0], "outline") : null;
24
+ return !c && !l ? null : /* @__PURE__ */ C("div", {
25
+ className: "ttw:flex ttw:flex-wrap ttw:items-center ttw:gap-2",
26
+ children: [l, c]
27
+ });
28
+ }
29
+ function D({ label: e, children: t }) {
30
+ return /* @__PURE__ */ C(s, { children: [/* @__PURE__ */ S(u, {
31
+ asChild: !0,
32
+ onFocus: g,
33
+ children: t
34
+ }), /* @__PURE__ */ S(c, { children: e })] });
35
+ }
36
+ function O({ heading: e, countLabel: n }) {
37
+ return /* @__PURE__ */ C("span", {
38
+ className: "ttw:flex ttw:items-center ttw:gap-2",
39
+ children: [e, n ? /* @__PURE__ */ S(t, {
40
+ tone: "neutral",
41
+ children: n
42
+ }) : null]
43
+ });
44
+ }
45
+ function k({ layout: e, heading: t, countLabel: n, divided: r, children: i }) {
46
+ return e === "screen" ? /* @__PURE__ */ C("section", {
47
+ "aria-label": t,
48
+ className: "ttw:flex ttw:flex-col ttw:gap-3",
49
+ children: [/* @__PURE__ */ S(a, {
50
+ variant: "component",
51
+ level: 3,
52
+ children: /* @__PURE__ */ S(O, {
53
+ heading: t,
54
+ countLabel: n
55
+ })
56
+ }), i]
57
+ }) : /* @__PURE__ */ C("section", {
58
+ "aria-label": t,
59
+ className: f("ttw:py-4", r && "ttw:border-b ttw:border-border"),
60
+ children: [/* @__PURE__ */ S(d, {
61
+ component: "h3",
62
+ variant: "body2",
63
+ className: "ttw:mb-3 ttw:font-medium",
64
+ children: t
65
+ }), i]
66
+ });
67
+ }
68
+ function A({ details: e, panel: t, onActionClick: r, disabledActions: i, labels: a, showPdfLink: o, leading: s }) {
69
+ let c = (e) => T(t, a, e);
70
+ return /* @__PURE__ */ C(l, {
71
+ delayDuration: 500,
72
+ children: [
73
+ t.headerActions.map((t) => /* @__PURE__ */ S(n, {
74
+ type: "button",
75
+ variant: "ghost",
76
+ size: "sm",
77
+ disabled: i?.includes(t),
78
+ onClick: () => r(t, e),
79
+ children: c(t)
80
+ }, t)),
81
+ o && e.pdfUrl ? /* @__PURE__ */ S(D, {
82
+ label: a.viewPdfButton,
83
+ children: /* @__PURE__ */ S(n, {
84
+ asChild: !0,
85
+ variant: "ghost",
86
+ size: "icon",
87
+ children: /* @__PURE__ */ S("a", {
88
+ href: e.pdfUrl,
89
+ target: "_blank",
90
+ rel: "noreferrer",
91
+ "aria-label": a.viewPdfButton,
92
+ children: /* @__PURE__ */ S(w, { className: "ttw:size-4" })
93
+ })
94
+ })
95
+ }) : null,
96
+ s,
97
+ t.overflowActions.length > 0 ? /* @__PURE__ */ S(b, {
98
+ actions: t.overflowActions,
99
+ triggerLabel: a.moreActionsLabel,
100
+ getActionLabel: c,
101
+ onSelect: (t) => r(t, e),
102
+ disabledActions: i
103
+ }) : null
104
+ ]
105
+ });
106
+ }
107
+ function j({ caption: e, value: t }) {
108
+ return /* @__PURE__ */ C("div", {
109
+ className: "ttw:flex ttw:flex-col ttw:gap-0.5",
110
+ children: [/* @__PURE__ */ S(d, {
15
111
  variant: "caption",
16
112
  color: "muted",
17
- children: u.auditHistoryNamesError
18
- }) : null, /* @__PURE__ */ s(n, {
19
- rows: l.rows,
20
- isLoading: l.isLoading,
21
- isError: l.isError,
22
- labels: {
23
- empty: u.auditHistoryEmpty,
24
- loading: u.auditHistoryLoading,
25
- error: u.auditHistoryError
26
- }
27
- })] })]
28
- });
29
- }
30
- export { l as AuditHistoryItem };
113
+ children: e
114
+ }), /* @__PURE__ */ S(d, {
115
+ component: "span",
116
+ variant: "body2",
117
+ children: t
118
+ })]
119
+ });
120
+ }
121
+ function M({ panel: e, actions: n, labels: r }) {
122
+ let a = e.recurringSeries;
123
+ return a ? /* @__PURE__ */ C("div", {
124
+ className: "ttw:flex ttw:flex-col ttw:gap-3 ttw:rounded-lg ttw:bg-muted ttw:p-4",
125
+ children: [
126
+ /* @__PURE__ */ C("div", {
127
+ className: "ttw:flex ttw:flex-col ttw:gap-0.5",
128
+ children: [/* @__PURE__ */ S(d, {
129
+ variant: "caption",
130
+ color: "muted",
131
+ children: r.recurringAmountCaption
132
+ }), /* @__PURE__ */ C("div", {
133
+ className: "ttw:flex ttw:flex-wrap ttw:items-baseline ttw:gap-x-1.5",
134
+ children: [/* @__PURE__ */ S(i, {
135
+ component: "span",
136
+ children: a.amountLabel
137
+ }), /* @__PURE__ */ S(d, {
138
+ component: "span",
139
+ variant: "body2",
140
+ color: "muted",
141
+ children: a.amountPeriodLabel
142
+ })]
143
+ })]
144
+ }),
145
+ /* @__PURE__ */ C("div", {
146
+ className: "ttw:flex ttw:items-center ttw:gap-2",
147
+ children: [/* @__PURE__ */ S(t, {
148
+ tone: "neutral",
149
+ children: r.recurringBadge
150
+ }), /* @__PURE__ */ S(m, {
151
+ label: a.statusLabel,
152
+ color: a.statusColor
153
+ })]
154
+ }),
155
+ /* @__PURE__ */ C("div", {
156
+ className: "ttw:flex ttw:flex-wrap ttw:gap-x-12 ttw:gap-y-2",
157
+ children: [/* @__PURE__ */ S(j, {
158
+ caption: r.startsOnCaption,
159
+ value: a.startsOnLabel
160
+ }), /* @__PURE__ */ S(j, {
161
+ caption: r.endsOnCaption,
162
+ value: a.endsOnLabel
163
+ })]
164
+ })
165
+ ]
166
+ }) : /* @__PURE__ */ C("div", {
167
+ className: "ttw:flex ttw:flex-col ttw:gap-3 ttw:rounded-lg ttw:bg-muted ttw:p-4",
168
+ children: [
169
+ /* @__PURE__ */ S("div", {
170
+ className: "ttw:flex ttw:flex-row ttw:flex-wrap ttw:gap-x-12 ttw:gap-y-2",
171
+ children: e.amountRows.map((e) => /* @__PURE__ */ S(_, { row: e }, e.label))
172
+ }),
173
+ /* @__PURE__ */ C("div", {
174
+ className: "ttw:flex ttw:items-center ttw:gap-2",
175
+ children: [/* @__PURE__ */ S(m, {
176
+ label: e.statusLabel,
177
+ color: e.statusColor
178
+ }), e.recurring ? /* @__PURE__ */ S(t, {
179
+ tone: "neutral",
180
+ children: r.recurringBadge
181
+ }) : null]
182
+ }),
183
+ /* @__PURE__ */ C("div", {
184
+ className: "ttw:flex ttw:flex-wrap ttw:gap-x-12 ttw:gap-y-2",
185
+ children: [/* @__PURE__ */ S(j, {
186
+ caption: r.invoiceDateCaption,
187
+ value: e.issueDateLabel
188
+ }), /* @__PURE__ */ S(j, {
189
+ caption: e.dueDateCaption,
190
+ value: e.dueDateLabel
191
+ })]
192
+ }),
193
+ n
194
+ ]
195
+ });
196
+ }
197
+ function N({ paymentHistory: e, labels: t }) {
198
+ return e.isLoading ? /* @__PURE__ */ C(p, {
199
+ isLoading: !0,
200
+ loadingLabel: t.paymentHistoryLoading,
201
+ className: "ttw:flex ttw:flex-col ttw:gap-2",
202
+ children: [/* @__PURE__ */ S(o, { className: "ttw:h-4 ttw:w-full" }), /* @__PURE__ */ S(o, { className: "ttw:h-4 ttw:w-2/3" })]
203
+ }) : e.rows.length === 0 ? /* @__PURE__ */ S(d, {
204
+ variant: "body2",
205
+ color: "muted",
206
+ children: t.paymentHistoryEmpty
207
+ }) : /* @__PURE__ */ C("div", {
208
+ className: "ttw:flex ttw:flex-col",
209
+ children: [e.rows.map((e) => /* @__PURE__ */ C("div", {
210
+ className: "ttw:flex ttw:justify-between ttw:border-b ttw:border-border ttw:py-2",
211
+ children: [/* @__PURE__ */ S(d, {
212
+ component: "span",
213
+ variant: "body2",
214
+ children: e.dateLabel
215
+ }), /* @__PURE__ */ S(d, {
216
+ component: "span",
217
+ variant: "body2",
218
+ className: "ttw:tabular-nums",
219
+ children: e.amountLabel
220
+ })]
221
+ }, e.id)), /* @__PURE__ */ C("div", {
222
+ className: "ttw:flex ttw:justify-between ttw:py-2 ttw:font-medium",
223
+ children: [/* @__PURE__ */ S(d, {
224
+ component: "span",
225
+ variant: "body2",
226
+ children: t.paymentHistoryTotalLabel
227
+ }), /* @__PURE__ */ S(d, {
228
+ component: "span",
229
+ variant: "body2",
230
+ className: "ttw:tabular-nums",
231
+ children: e.totalLabel
232
+ })]
233
+ })]
234
+ });
235
+ }
236
+ function P(e) {
237
+ return !!e.customerName || e.customerContact.length > 0;
238
+ }
239
+ function F({ panel: e }) {
240
+ return /* @__PURE__ */ C("div", {
241
+ className: "ttw:flex ttw:flex-col",
242
+ children: [e.customerName ? /* @__PURE__ */ S(v, { ...e.customerName }) : null, e.customerContact.map((e) => /* @__PURE__ */ S(y, { ...e }, e.label))]
243
+ });
244
+ }
245
+ function I({ panel: e, labels: t }) {
246
+ return /* @__PURE__ */ C("div", {
247
+ className: "ttw:flex ttw:flex-col",
248
+ children: [e.billingItems.map((e) => /* @__PURE__ */ S(y, { ...e }, e.label)), e.seriesLink ? /* @__PURE__ */ C("div", {
249
+ className: "ttw:flex ttw:items-center ttw:gap-4 ttw:border-b ttw:border-border ttw:py-3 ttw:last:border-b-0",
250
+ children: [/* @__PURE__ */ S(d, {
251
+ component: "span",
252
+ variant: "body2",
253
+ color: "muted",
254
+ className: "ttw:w-40 ttw:shrink-0",
255
+ children: t.recurringSeriesRowLabel
256
+ }), /* @__PURE__ */ S(n, {
257
+ type: "button",
258
+ variant: "link",
259
+ className: "ttw:h-auto ttw:px-0 ttw:text-left",
260
+ onClick: e.seriesLink.onOpen,
261
+ children: e.seriesLink.title
262
+ })]
263
+ }) : null]
264
+ });
265
+ }
266
+ function L({ totals: e }) {
267
+ return e.length === 0 ? null : /* @__PURE__ */ S("div", {
268
+ className: "ttw:flex ttw:flex-col ttw:gap-1 ttw:py-3",
269
+ children: e.map((e) => /* @__PURE__ */ C("div", {
270
+ className: f("ttw:flex ttw:justify-between", e.emphasis && "ttw:font-medium"),
271
+ children: [/* @__PURE__ */ S(d, {
272
+ component: "span",
273
+ variant: "body2",
274
+ children: e.label
275
+ }), /* @__PURE__ */ S(d, {
276
+ component: "span",
277
+ variant: "body2",
278
+ className: "ttw:tabular-nums",
279
+ children: e.value
280
+ })]
281
+ }, e.label))
282
+ });
283
+ }
284
+ function R({ details: e, labels: t }) {
285
+ return e.lineItems.length === 0 ? /* @__PURE__ */ S(d, {
286
+ variant: "body2",
287
+ color: "muted",
288
+ className: "ttw:py-3",
289
+ children: t.noLineItems
290
+ }) : /* @__PURE__ */ S(x, { children: e.lineItems.map((e) => /* @__PURE__ */ C("div", {
291
+ className: "ttw:flex ttw:items-start ttw:justify-between ttw:border-b ttw:border-border ttw:py-3",
292
+ children: [/* @__PURE__ */ C("div", {
293
+ className: "ttw:flex ttw:flex-col",
294
+ children: [/* @__PURE__ */ S(d, {
295
+ component: "span",
296
+ variant: "body2",
297
+ className: "ttw:font-medium",
298
+ children: e.name
299
+ }), /* @__PURE__ */ C(d, {
300
+ component: "span",
301
+ variant: "body2",
302
+ color: "muted",
303
+ children: [
304
+ e.quantityLabel,
305
+ " ",
306
+ t.lineItemMultiplier,
307
+ " ",
308
+ e.unitPriceLabel,
309
+ " ",
310
+ t.lineItemEaLabel
311
+ ]
312
+ })]
313
+ }), /* @__PURE__ */ S(d, {
314
+ component: "span",
315
+ variant: "body2",
316
+ className: "ttw:tabular-nums",
317
+ children: e.totalLabel
318
+ })]
319
+ }, e.id)) });
320
+ }
321
+ var z = [], B = () => void 0, V = { meta: { fitContent: !0 } };
322
+ function H({ details: e, labels: t }) {
323
+ if (e.lineItems.length === 0) return /* @__PURE__ */ S(d, {
324
+ variant: "body2",
325
+ color: "muted",
326
+ className: "ttw:py-3",
327
+ children: t.noLineItems
328
+ });
329
+ let n = [
330
+ {
331
+ accessorKey: "name",
332
+ header: t.lineItemsDescriptionColumn
333
+ },
334
+ {
335
+ ...V,
336
+ accessorKey: "quantityLabel",
337
+ header: t.lineItemsQuantityColumn
338
+ },
339
+ {
340
+ ...V,
341
+ accessorKey: "unitPriceLabel",
342
+ header: t.lineItemsPriceColumn
343
+ },
344
+ {
345
+ ...V,
346
+ accessorKey: "totalLabel",
347
+ header: t.lineItemsAmountColumn
348
+ }
349
+ ];
350
+ return /* @__PURE__ */ S(r, {
351
+ columns: n,
352
+ data: e.lineItems,
353
+ getRowId: (e) => e.id,
354
+ sorting: z,
355
+ onSortingChange: B,
356
+ pageSize: e.lineItems.length,
357
+ onPageSizeChange: B,
358
+ pageSizeOptions: [],
359
+ onNextPage: B,
360
+ onPrevPage: B,
361
+ showPagination: !1
362
+ });
363
+ }
364
+ function U({ notes: e, labels: t }) {
365
+ return /* @__PURE__ */ C("div", {
366
+ className: "ttw:flex ttw:flex-col ttw:gap-3",
367
+ children: [e.opening ? /* @__PURE__ */ C("div", { children: [/* @__PURE__ */ S(d, {
368
+ variant: "body2",
369
+ className: "ttw:mb-1 ttw:font-medium",
370
+ children: t.notesOpeningLabel
371
+ }), /* @__PURE__ */ S(d, {
372
+ variant: "body2",
373
+ color: "muted",
374
+ children: e.opening
375
+ })] }) : null, e.closing ? /* @__PURE__ */ C("div", { children: [/* @__PURE__ */ S(d, {
376
+ variant: "body2",
377
+ className: "ttw:mb-1 ttw:font-medium",
378
+ children: t.notesClosingLabel
379
+ }), /* @__PURE__ */ S(d, {
380
+ variant: "body2",
381
+ color: "muted",
382
+ children: e.closing
383
+ })] }) : null]
384
+ });
385
+ }
386
+ function W({ attachments: e, labels: t }) {
387
+ return e.rows.length === 0 ? /* @__PURE__ */ S(d, {
388
+ variant: "body2",
389
+ color: "muted",
390
+ children: t.attachmentsEmpty
391
+ }) : /* @__PURE__ */ C("table", {
392
+ className: "ttw:w-full ttw:border-collapse",
393
+ children: [/* @__PURE__ */ S("thead", { children: /* @__PURE__ */ C("tr", {
394
+ className: "ttw:border-b ttw:border-border",
395
+ children: [/* @__PURE__ */ S("th", {
396
+ scope: "col",
397
+ className: "ttw:py-2 ttw:text-left",
398
+ children: /* @__PURE__ */ S(d, {
399
+ component: "span",
400
+ variant: "caption",
401
+ color: "muted",
402
+ children: t.attachmentsFileColumn
403
+ })
404
+ }), /* @__PURE__ */ S("th", {
405
+ scope: "col",
406
+ className: "ttw:py-2 ttw:text-right",
407
+ children: /* @__PURE__ */ S(d, {
408
+ component: "span",
409
+ variant: "caption",
410
+ color: "muted",
411
+ children: t.attachmentsEmailedColumn
412
+ })
413
+ })]
414
+ }) }), /* @__PURE__ */ S("tbody", { children: e.rows.map((e) => /* @__PURE__ */ C("tr", {
415
+ className: "ttw:border-b ttw:border-border ttw:last:border-b-0",
416
+ children: [/* @__PURE__ */ S("td", {
417
+ className: "ttw:py-3",
418
+ children: /* @__PURE__ */ S("a", {
419
+ href: e.url,
420
+ target: "_blank",
421
+ rel: "noreferrer",
422
+ className: "ttw:text-primary ttw:hover:underline",
423
+ children: e.name
424
+ })
425
+ }), /* @__PURE__ */ S("td", {
426
+ className: "ttw:py-3 ttw:text-right ttw:align-middle",
427
+ children: /* @__PURE__ */ S(d, {
428
+ component: "span",
429
+ variant: "body2",
430
+ color: e.includeInEmail ? void 0 : "muted",
431
+ children: e.emailedLabel
432
+ })
433
+ })]
434
+ }, e.id)) })]
435
+ });
436
+ }
437
+ function G({ auditHistory: t, labels: n }) {
438
+ return /* @__PURE__ */ C(x, { children: [t.showNamesError ? /* @__PURE__ */ S(d, {
439
+ variant: "caption",
440
+ color: "muted",
441
+ children: n.auditHistoryNamesError
442
+ }) : null, /* @__PURE__ */ S(e, {
443
+ rows: t.rows,
444
+ isLoading: t.isLoading,
445
+ isError: t.isError,
446
+ labels: {
447
+ empty: n.auditHistoryEmpty,
448
+ loading: n.auditHistoryLoading,
449
+ error: n.auditHistoryError
450
+ }
451
+ })] });
452
+ }
453
+ function K({ label: e }) {
454
+ return /* @__PURE__ */ C(p, {
455
+ isLoading: !0,
456
+ loadingLabel: e,
457
+ className: "ttw:flex ttw:flex-col ttw:gap-4 ttw:py-4",
458
+ children: [
459
+ /* @__PURE__ */ S(o, { className: "ttw:h-36 ttw:w-full ttw:rounded-lg" }),
460
+ /* @__PURE__ */ S(o, { className: "ttw:h-4 ttw:w-1/2" }),
461
+ /* @__PURE__ */ S(o, { className: "ttw:h-4 ttw:w-2/3" }),
462
+ /* @__PURE__ */ S(o, { className: "ttw:h-4 ttw:w-1/3" })
463
+ ]
464
+ });
465
+ }
466
+ export { W as AttachmentsContent, G as AuditHistoryContent, I as BillingContent, F as CustomerContent, k as DetailsSection, K as DetailsSkeleton, A as HeaderActions, D as HeaderIconTooltip, L as LineItemTotals, R as LineItemsList, H as LineItemsTable, U as NotesContent, N as PaymentHistoryContent, O as SectionLabel, E as SummaryActions, M as SummaryCard, P as hasCustomerContent };
@@ -1,32 +1,18 @@
1
- import { Button as e, Typography as t } from "../../../../../packages/shared-ui-shadcn/dist/index.js";
2
- import { jsx as n, jsxs as r } from "react/jsx-runtime";
1
+ import { AccordionTrigger as e } from "../../../../../packages/shared-ui-shadcn/dist/index.js";
2
+ import { SectionLabel as t } from "./index36.js";
3
+ import { jsx as n } from "react/jsx-runtime";
3
4
  // ../../libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index37.js
4
- var i = "ttw:flex ttw:items-center ttw:gap-4 ttw:border-b ttw:border-border ttw:py-3 ttw:last:border-b-0";
5
- function a({ label: a, name: o, onOpen: s }) {
6
- let c = /* @__PURE__ */ n(t, {
7
- component: "span",
8
- variant: "body2",
9
- color: "muted",
10
- className: "ttw:w-40 ttw:shrink-0",
11
- children: a
12
- });
13
- return s ? /* @__PURE__ */ r("div", {
14
- className: i,
15
- children: [c, /* @__PURE__ */ n(e, {
16
- type: "button",
17
- variant: "link",
18
- "aria-haspopup": "dialog",
19
- className: "ttw:h-auto ttw:px-0 ttw:text-left",
20
- onClick: s,
21
- children: o
22
- })]
23
- }) : /* @__PURE__ */ r("div", {
24
- className: i,
25
- children: [c, /* @__PURE__ */ n(t, {
26
- component: "span",
27
- variant: "body2",
28
- children: o
29
- })]
5
+ function r({ heading: r, countLabel: i }) {
6
+ return /* @__PURE__ */ n(e, {
7
+ className: "ttw:group ttw:cursor-pointer ttw:hover:no-underline",
8
+ iconClassName: "ttw:translate-y-0.5",
9
+ children: /* @__PURE__ */ n(t, {
10
+ heading: /* @__PURE__ */ n("span", {
11
+ className: "ttw:group-hover:underline",
12
+ children: r
13
+ }),
14
+ countLabel: i
15
+ })
30
16
  });
31
17
  }
32
- export { a as CustomerNameRow };
18
+ export { r as SectionTrigger };
@@ -1,19 +1,9 @@
1
- import { EmptyState as e } from "../../../shared/ui/dist/lib/EmptyState/EmptyState.js";
2
- import "../../../shared/ui/dist/index.js";
3
- import { jsx as t } from "react/jsx-runtime";
4
- import { SearchX as n } from "lucide-react";
5
1
  // ../../libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index38.js
6
- function r({ title: r, description: i }) {
7
- return /* @__PURE__ */ t("div", {
8
- className: "ttw:flex ttw:min-h-full ttw:items-center ttw:justify-center",
9
- children: /* @__PURE__ */ t(e, {
10
- icon: /* @__PURE__ */ t(n, {
11
- className: "ttw:size-5",
12
- "aria-hidden": "true"
13
- }),
14
- title: r,
15
- description: i
16
- })
17
- });
18
- }
19
- export { r as DetailsMessage };
2
+ var e = {
3
+ billing: "billing",
4
+ lineItems: "line-items",
5
+ notes: "notes",
6
+ attachments: "attachments",
7
+ auditHistory: "audit-history"
8
+ };
9
+ export { e as RECEIVABLE_DETAILS_SECTION };
@@ -1,21 +1,21 @@
1
- import { Typography as e } from "../../../../../packages/shared-ui-shadcn/dist/index.js";
2
- import { jsx as t, jsxs as n } from "react/jsx-runtime";
1
+ import { AccordionContent as e, AccordionItem as t } from "../../../../../packages/shared-ui-shadcn/dist/index.js";
2
+ import { RECEIVABLE_DETAILS_SECTION as n } from "./index38.js";
3
+ import { sectionItemClass as r } from "./index34.js";
4
+ import { AttachmentsContent as i } from "./index36.js";
5
+ import { SectionTrigger as a } from "./index37.js";
6
+ import { jsx as o, jsxs as s } from "react/jsx-runtime";
3
7
  // ../../libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index39.js
4
- function r({ label: r, value: i }) {
5
- return /* @__PURE__ */ n("div", {
6
- className: "ttw:flex ttw:gap-4 ttw:border-b ttw:border-border ttw:py-3 ttw:last:border-b-0",
7
- children: [/* @__PURE__ */ t(e, {
8
- component: "span",
9
- variant: "body2",
10
- color: "muted",
11
- className: "ttw:w-40 ttw:shrink-0",
12
- children: r
13
- }), /* @__PURE__ */ t(e, {
14
- component: "span",
15
- variant: "body2",
16
- className: "ttw:whitespace-pre-line",
17
- children: i
18
- })]
8
+ function c({ attachments: c, labels: l }) {
9
+ return /* @__PURE__ */ s(t, {
10
+ value: n.attachments,
11
+ className: r,
12
+ children: [/* @__PURE__ */ o(a, {
13
+ heading: l.attachmentsHeading,
14
+ countLabel: c.countLabel
15
+ }), /* @__PURE__ */ o(e, { children: /* @__PURE__ */ o(i, {
16
+ attachments: c,
17
+ labels: l
18
+ }) })]
19
19
  });
20
20
  }
21
- export { r as InfoRow };
21
+ export { c as AttachmentsItem };
@@ -1,32 +1,21 @@
1
- import { Button as e, DropdownMenu as t, DropdownMenuContent as n, DropdownMenuItem as r, DropdownMenuTrigger as i, Tooltip as a, TooltipContent as o, TooltipTrigger as s } from "../../../../../packages/shared-ui-shadcn/dist/index.js";
2
- import { ACTION_ICON as c, DESTRUCTIVE_ACTIONS as l, preventTooltipFocusOpen as u } from "./index32.js";
3
- import { jsx as d, jsxs as f } from "react/jsx-runtime";
4
- import { MoreVerticalIcon as p } from "lucide-react";
1
+ import { AccordionContent as e, AccordionItem as t } from "../../../../../packages/shared-ui-shadcn/dist/index.js";
2
+ import { RECEIVABLE_DETAILS_SECTION as n } from "./index38.js";
3
+ import { sectionItemClass as r } from "./index34.js";
4
+ import { AuditHistoryContent as i } from "./index36.js";
5
+ import { SectionTrigger as a } from "./index37.js";
6
+ import { jsx as o, jsxs as s } from "react/jsx-runtime";
5
7
  // ../../libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index40.js
6
- function m({ actions: m, triggerLabel: h, getActionLabel: g, onSelect: _, disabledActions: v }) {
7
- return /* @__PURE__ */ f(t, { children: [/* @__PURE__ */ f(a, { children: [/* @__PURE__ */ d(s, {
8
- asChild: !0,
9
- onFocus: u,
10
- children: /* @__PURE__ */ d(i, {
11
- asChild: !0,
12
- children: /* @__PURE__ */ d(e, {
13
- variant: "ghost",
14
- size: "icon",
15
- "aria-label": h,
16
- children: /* @__PURE__ */ d(p, { className: "ttw:size-4" })
17
- })
18
- })
19
- }), /* @__PURE__ */ d(o, { children: h })] }), /* @__PURE__ */ d(n, {
20
- align: "end",
21
- children: m.map((e) => {
22
- let t = c[e];
23
- return /* @__PURE__ */ f(r, {
24
- variant: l.has(e) ? "destructive" : "default",
25
- disabled: v?.includes(e),
26
- onClick: () => _(e),
27
- children: [/* @__PURE__ */ d(t, { className: "ttw:size-4" }), g(e)]
28
- }, e);
29
- })
30
- })] });
8
+ function c({ auditHistory: c, labels: l }) {
9
+ return /* @__PURE__ */ s(t, {
10
+ value: n.auditHistory,
11
+ className: r,
12
+ children: [/* @__PURE__ */ o(a, {
13
+ heading: l.auditHistoryHeading,
14
+ countLabel: c.countLabel
15
+ }), /* @__PURE__ */ o(e, { children: /* @__PURE__ */ o(i, {
16
+ auditHistory: c,
17
+ labels: l
18
+ }) })]
19
+ });
31
20
  }
32
- export { m as OverflowMenu };
21
+ export { c as AuditHistoryItem };