@tesouro/embedded-components-react 0.7.45 → 0.7.46

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 (95) hide show
  1. package/dist/index.d.ts +29 -39
  2. package/dist/lib/CounterpartsWidget.d.ts +29 -22
  3. package/dist/lib/CounterpartsWidgetPublic.d.ts +29 -22
  4. package/dist/lib/CustomersWidget.d.ts +29 -22
  5. package/dist/lib/ReceivablesWidget.d.ts +1 -0
  6. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index24.js +12 -12
  7. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index25.js +15 -15
  8. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index42.js +9 -9
  9. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index5.js +30 -30
  10. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/ui/dist/index14.js +3 -2
  11. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/ui/dist/index15.js +7 -6
  12. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/ui/dist/index33.js +3 -2
  13. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/ui/dist/index34.js +9 -8
  14. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/ui/dist/index37.js +5 -4
  15. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/ui/dist/index48.js +1 -1
  16. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/ui/dist/index49.js +1 -1
  17. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/ui/dist/index5.js +3 -2
  18. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bills-list/feature/dist/index16.js +40 -40
  19. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bills-list/ui/dist/index18.js +3 -2
  20. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bills-list/ui/dist/index2.js +1 -1
  21. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bills-list/ui/dist/index20.js +8 -7
  22. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bills-list/ui/dist/index3.js +1 -1
  23. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/pay-bill/ui/dist/index5.js +1 -1
  24. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/pay-bill/ui/dist/index6.js +1 -1
  25. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index.js +9 -13
  26. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index12.js +7 -10
  27. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index13.js +76 -11
  28. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index15.js +1 -1
  29. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index16.js +27 -9
  30. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index17.js +2 -76
  31. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index18.js +30 -0
  32. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index19.js +1 -1
  33. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index20.js +5 -27
  34. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index21.js +32 -2
  35. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index22.js +2 -30
  36. package/dist/libs/tesouro-embedded-components-react/counterparts-widget/feature/dist/lib/CounterpartsWidget/viewModels.js +73 -77
  37. package/dist/libs/tesouro-embedded-components-react/counterparts-widget/ui/dist/index2.js +8 -25
  38. package/dist/libs/tesouro-embedded-components-react/counterparts-widget/ui/dist/index7.js +197 -208
  39. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/ReceivablesWidget.js +9 -9
  40. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/auditHistory/labels.js +2 -2
  41. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/useReceivableDetails.js +1 -1
  42. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/useReceivablesWidget.js +2 -2
  43. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index.js +22 -23
  44. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index14.js +10 -24
  45. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index25.js +53 -37
  46. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index26.js +21 -53
  47. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index27.js +8 -21
  48. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index28.js +77 -8
  49. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index29.js +31 -69
  50. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index30.js +17 -38
  51. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index31.js +40 -17
  52. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index32.js +26 -38
  53. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index33.js +18 -27
  54. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index34.js +8 -18
  55. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index35.js +35 -9
  56. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index36.js +14 -36
  57. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index37.js +26 -14
  58. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index38.js +84 -23
  59. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index39.js +487 -80
  60. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index40.js +2 -494
  61. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index41.js +48 -2
  62. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index42.js +62 -38
  63. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index43.js +438 -61
  64. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index44.js +207 -431
  65. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index45.js +20 -222
  66. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index46.js +6 -21
  67. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index48.js +265 -0
  68. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index49.js +2 -265
  69. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index50.js +131 -2
  70. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index51.js +22 -125
  71. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index52.js +235 -23
  72. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index53.js +3 -240
  73. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index54.js +249 -3
  74. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index55.js +54 -242
  75. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index56.js +221 -51
  76. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index57.js +38 -222
  77. package/dist/libs/tesouro-embedded-components-react/shared/document-status/ui/dist/index.js +8 -0
  78. package/dist/libs/tesouro-embedded-components-react/shared/document-status/ui/dist/index2.js +14 -0
  79. package/dist/libs/tesouro-embedded-components-react/shared/document-status/ui/dist/index3.js +13 -0
  80. package/dist/libs/tesouro-embedded-components-react/shared/document-status/ui/dist/index4.js +18 -0
  81. package/dist/libs/tesouro-embedded-components-react/shared/document-status/ui/dist/index5.js +2 -0
  82. package/dist/libs/tesouro-embedded-components-react/shared/document-status/ui/dist/index6.js +20 -0
  83. package/dist/libs/tesouro-embedded-components-react/shared/document-status/ui/dist/index7.js +32 -0
  84. package/dist/libs/tesouro-embedded-components-react/shared/document-status/ui/dist/index8.js +2 -0
  85. package/dist/libs/tesouro-embedded-components-react/{bill-pay-widget → shared/document-status}/util/dist/lib/derivePayableStatus.js +23 -10
  86. package/dist/libs/tesouro-embedded-components-react/shared/document-status/util/dist/lib/receivableFilledTone.js +22 -0
  87. package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/analytics/build-info.js +1 -1
  88. package/package.json +1 -1
  89. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index14.js +0 -18
  90. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index23.js +0 -2
  91. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index24.js +0 -7
  92. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index25.js +0 -34
  93. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index26.js +0 -2
  94. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index47.js +0 -8
  95. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index58.js +0 -45
@@ -1,88 +1,495 @@
1
- import { Button as e, Typography as t, cn as n } from "../../../../../packages/shared-ui-shadcn/dist/index.js";
2
- import { ReceivableStatusBadge as r } from "./index25.js";
3
- import { IterationStatusChip as i } from "./index38.js";
4
- import { jsx as a, jsxs as o } from "react/jsx-runtime";
5
- import { ChevronRight as s } from "lucide-react";
1
+ import { Accordion as e, AccordionContent as t, AccordionItem as n, AccordionTrigger as r, Badge as i, Button as a, Sheet as o, SheetContent as ee, SheetDescription as s, SheetHeader as te, SheetTitle as c, Tooltip as l, TooltipContent as u, TooltipProvider as d, TooltipTrigger as f, Typography as p, cn as m } from "../../../../../packages/shared-ui-shadcn/dist/index.js";
2
+ import { ReceivableStatusBadge as ne } from "../../../shared/document-status/ui/dist/index7.js";
3
+ import "../../../shared/document-status/ui/dist/index.js";
4
+ import { RECEIVABLE_DETAILS_PANEL_LABELS_EN as re } from "./index14.js";
5
+ import { RECEIVABLE_DETAILS_SECTION as h } from "./index27.js";
6
+ import { ACTION_ICON as ie, ACTION_LABEL_KEY as g, STATUS_ICON as _, amountValueToneClass as ae, headerIconButtonClass as v, headerTooltipArrowClass as y, headerTooltipClass as b, preventTooltipFocusOpen as x, sectionChevronClass as S, sectionCountBadgeClass as C, sectionItemClass as w, sectionTriggerClass as T } from "./index25.js";
7
+ import { AmountCell as E } from "./index26.js";
8
+ import { AttachmentsItem as D } from "./index28.js";
9
+ import { AuditHistoryItem as O } from "./index29.js";
10
+ import { CloseButton as k } from "./index30.js";
11
+ import { CustomerNameRow as oe } from "./index31.js";
12
+ import { DetailsMessage as se } from "./index32.js";
13
+ import { InfoRow as A } from "./index33.js";
14
+ import { LoadingSpinner as j } from "./index34.js";
15
+ import { OverflowMenu as ce } from "./index35.js";
16
+ import { SeriesStatusChip as le } from "./index37.js";
17
+ import { ScheduledInvoicesTable as ue } from "./index38.js";
18
+ import { Fragment as M, jsx as N, jsxs as P } from "react/jsx-runtime";
19
+ import { ChevronLeft as F, CircleAlert as I, EyeIcon as L, Repeat as R } from "lucide-react";
6
20
  //#region ../../libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index39.js
7
- var c = "ttw:h-10 ttw:px-2 ttw:text-left ttw:text-sm ttw:font-medium ttw:leading-5", l = "ttw:h-9 ttw:px-2 ttw:py-2 ttw:text-left ttw:text-sm ttw:font-normal ttw:leading-5";
8
- function u({ rows: u, labels: d }) {
9
- return u.length === 0 ? /* @__PURE__ */ a(t, {
10
- variant: "body2",
11
- color: "muted",
12
- children: d.scheduleEmpty
13
- }) : /* @__PURE__ */ o("table", {
14
- className: "ttw:w-full",
15
- children: [/* @__PURE__ */ a("thead", { children: /* @__PURE__ */ o("tr", { children: [
16
- /* @__PURE__ */ a("th", {
17
- scope: "col",
18
- className: n(c, "ttw:pl-0"),
19
- children: d.scheduleIssueDateColumn
20
- }),
21
- /* @__PURE__ */ a("th", {
22
- scope: "col",
23
- className: c,
24
- children: d.scheduleAmountColumn
25
- }),
26
- /* @__PURE__ */ a("th", {
27
- scope: "col",
28
- className: c,
29
- children: d.scheduleStatusColumn
30
- }),
31
- /* @__PURE__ */ a("th", {
32
- scope: "col",
33
- className: c,
34
- children: d.scheduleNumberColumn
35
- }),
36
- /* @__PURE__ */ a("th", {
37
- className: "ttw:h-10 ttw:w-6 ttw:pl-2",
38
- "aria-hidden": "true"
39
- })
40
- ] }) }), /* @__PURE__ */ a("tbody", { children: u.map((t) => {
41
- let { onOpen: c } = t;
42
- return /* @__PURE__ */ o("tr", {
43
- className: "ttw:border-t ttw:border-border",
44
- children: [
45
- /* @__PURE__ */ a("td", {
46
- className: n(l, "ttw:pl-0"),
47
- children: t.issueDateLabel
48
- }),
49
- /* @__PURE__ */ a("td", {
50
- className: l,
51
- children: t.amountLabel
52
- }),
53
- /* @__PURE__ */ a("td", {
54
- className: "ttw:h-9 ttw:px-2 ttw:py-2 ttw:text-left",
55
- children: t.chip.kind === "invoice" ? /* @__PURE__ */ a(r, {
56
- label: t.chip.label,
57
- status: t.chip.status,
58
- variant: "filled"
59
- }) : /* @__PURE__ */ a(i, {
60
- label: t.chip.label,
61
- tone: t.chip.tone
62
- })
63
- }),
64
- /* @__PURE__ */ a("td", {
65
- className: l,
66
- children: t.numberLabel
67
- }),
68
- /* @__PURE__ */ a("td", {
69
- className: "ttw:h-9 ttw:w-6 ttw:py-2 ttw:pl-2 ttw:text-right ttw:text-muted-foreground",
70
- children: c ? /* @__PURE__ */ a(e, {
71
- variant: "ghost",
72
- size: "icon",
73
- className: "ttw:size-6",
74
- "aria-label": t.openLabel,
75
- onClick: c,
76
- children: /* @__PURE__ */ a(s, {
21
+ function z({ open: z, onOpenChange: B, details: V, message: H, isLoading: U, onActionClick: W, onClose: G, openSections: de, onOpenSectionsChange: fe, disabledActions: K, labels: pe }) {
22
+ let q = {
23
+ ...re,
24
+ ...pe
25
+ }, J = V?.panel, Y = !U && !H && !!(V && J), me = J?.amountTone === "danger", X = (e) => J?.actionLabels?.[e] ?? q[g[e]], Z = V ? _[V.status] : void 0, Q = J?.recurringSeries, $ = V && J && J.primaryActions.length > 0 ? /* @__PURE__ */ N("div", {
26
+ className: "ttw:flex ttw:items-center ttw:gap-2 ttw:border-t ttw:border-border ttw:pt-3",
27
+ children: J.primaryActions.map((e, t) => {
28
+ let n = ie[e], r = t === J.primaryActions.length - 1;
29
+ return /* @__PURE__ */ P(a, {
30
+ size: "sm",
31
+ variant: r ? "default" : "outline",
32
+ disabled: K?.includes(e),
33
+ onClick: () => W(e, V),
34
+ children: [/* @__PURE__ */ N(n, { className: "ttw:size-4" }), X(e)]
35
+ }, e);
36
+ })
37
+ }) : null;
38
+ return /* @__PURE__ */ N(o, {
39
+ open: z,
40
+ modal: !1,
41
+ onOpenChange: B,
42
+ children: /* @__PURE__ */ P(ee, {
43
+ showCloseButton: !1,
44
+ onFocusOutside: (e) => e.preventDefault(),
45
+ className: "ttw:overflow-y-auto ttw:border-l-0 ttw:p-0 ttw:sm:max-w-150",
46
+ children: [
47
+ /* @__PURE__ */ N(s, {
48
+ className: "ttw:sr-only",
49
+ children: q.hiddenDescription
50
+ }),
51
+ Y ? null : /* @__PURE__ */ N(k, {
52
+ label: q.closeButton,
53
+ onClose: G,
54
+ className: m(v, "ttw:absolute ttw:right-4 ttw:top-4 ttw:z-10")
55
+ }),
56
+ H && !U ? /* @__PURE__ */ N(se, { ...H }) : !Y || !V || !J ? /* @__PURE__ */ P("div", {
57
+ className: "ttw:flex ttw:h-full ttw:w-full ttw:items-center ttw:justify-center",
58
+ children: [/* @__PURE__ */ N(c, {
59
+ className: "ttw:sr-only",
60
+ children: q.loadingTitle
61
+ }), /* @__PURE__ */ N(j, {})]
62
+ }) : /* @__PURE__ */ P(M, { children: [
63
+ J.seriesLink ? /* @__PURE__ */ N("div", {
64
+ className: "ttw:border-b ttw:border-border ttw:px-6 ttw:py-3",
65
+ children: /* @__PURE__ */ P("button", {
66
+ type: "button",
67
+ onClick: J.seriesLink.onOpen,
68
+ className: "ttw:flex ttw:items-center ttw:gap-1 ttw:text-sm ttw:text-primary ttw:hover:underline",
69
+ children: [/* @__PURE__ */ N(F, {
77
70
  className: "ttw:size-4",
78
71
  "aria-hidden": "true"
72
+ }), J.seriesLink.backLabel]
73
+ })
74
+ }) : null,
75
+ /* @__PURE__ */ P(te, {
76
+ className: "ttw:flex ttw:flex-row ttw:items-start ttw:justify-between ttw:gap-2 ttw:space-y-0 ttw:px-6 ttw:py-4",
77
+ children: [/* @__PURE__ */ P("div", {
78
+ className: "ttw:flex ttw:flex-col ttw:gap-0.5",
79
+ children: [/* @__PURE__ */ N(c, {
80
+ className: "ttw:text-xl ttw:font-semibold ttw:text-foreground",
81
+ children: V.title
82
+ }), J.subtitle ? /* @__PURE__ */ N(p, {
83
+ variant: "body2",
84
+ color: "muted",
85
+ children: J.subtitle
86
+ }) : null]
87
+ }), /* @__PURE__ */ N(d, {
88
+ delayDuration: 500,
89
+ children: /* @__PURE__ */ P("div", {
90
+ className: "ttw:flex ttw:items-center ttw:gap-1.5",
91
+ children: [
92
+ V.pdfUrl ? /* @__PURE__ */ P(l, { children: [/* @__PURE__ */ N(f, {
93
+ asChild: !0,
94
+ onFocus: x,
95
+ children: /* @__PURE__ */ N(a, {
96
+ asChild: !0,
97
+ variant: "ghost",
98
+ size: "icon",
99
+ className: v,
100
+ children: /* @__PURE__ */ N("a", {
101
+ href: V.pdfUrl,
102
+ target: "_blank",
103
+ rel: "noreferrer",
104
+ "aria-label": q.viewPdfButton,
105
+ children: /* @__PURE__ */ N(L, { className: "ttw:size-4" })
106
+ })
107
+ })
108
+ }), /* @__PURE__ */ N(u, {
109
+ className: b,
110
+ arrowClassName: y,
111
+ children: q.viewPdfButton
112
+ })] }) : null,
113
+ J.overflowActions.length > 0 ? /* @__PURE__ */ N(ce, {
114
+ actions: J.overflowActions,
115
+ triggerLabel: q.moreActionsLabel,
116
+ getActionLabel: X,
117
+ onSelect: (e) => W(e, V),
118
+ disabledActions: K,
119
+ className: v
120
+ }) : null,
121
+ /* @__PURE__ */ P(l, { children: [/* @__PURE__ */ N(f, {
122
+ asChild: !0,
123
+ onFocus: x,
124
+ children: /* @__PURE__ */ N(k, {
125
+ label: q.closeButton,
126
+ onClose: G,
127
+ className: v
128
+ })
129
+ }), /* @__PURE__ */ N(u, {
130
+ className: b,
131
+ arrowClassName: y,
132
+ children: q.closeButton
133
+ })] })
134
+ ]
135
+ })
136
+ })]
137
+ }),
138
+ /* @__PURE__ */ P("div", {
139
+ className: "ttw:flex ttw:flex-col",
140
+ children: [/* @__PURE__ */ N("div", {
141
+ className: "ttw:px-6",
142
+ children: Q ? /* @__PURE__ */ P("div", {
143
+ className: "ttw:flex ttw:flex-col ttw:gap-3 ttw:rounded-lg ttw:bg-violet-50 ttw:p-4",
144
+ children: [
145
+ /* @__PURE__ */ P("div", {
146
+ className: "ttw:flex ttw:flex-col ttw:gap-0.5",
147
+ children: [/* @__PURE__ */ N(p, {
148
+ variant: "caption",
149
+ color: "muted",
150
+ children: q.recurringAmountCaption
151
+ }), /* @__PURE__ */ P("div", {
152
+ className: "ttw:flex ttw:items-baseline ttw:gap-1.5",
153
+ children: [/* @__PURE__ */ N(p, {
154
+ component: "span",
155
+ variant: "h3",
156
+ className: ae[J.amountTone],
157
+ children: Q.amountLabel
158
+ }), /* @__PURE__ */ N(p, {
159
+ component: "span",
160
+ variant: "body2",
161
+ color: "muted",
162
+ children: Q.amountPeriodLabel
163
+ })]
164
+ })]
165
+ }),
166
+ /* @__PURE__ */ P("div", {
167
+ className: "ttw:flex ttw:items-center ttw:gap-2",
168
+ children: [/* @__PURE__ */ P(i, {
169
+ variant: "outline",
170
+ className: "ttw:gap-1 ttw:border-violet-200 ttw:bg-violet-50 ttw:text-violet-700",
171
+ children: [/* @__PURE__ */ N(R, { className: "ttw:size-3" }), q.recurringBadge]
172
+ }), /* @__PURE__ */ N(le, {
173
+ label: Q.statusLabel,
174
+ tone: Q.statusTone,
175
+ icon: Q.statusIcon
176
+ })]
177
+ }),
178
+ /* @__PURE__ */ P("div", {
179
+ className: "ttw:flex ttw:gap-12",
180
+ children: [/* @__PURE__ */ P("div", {
181
+ className: "ttw:flex ttw:flex-col ttw:gap-0.5",
182
+ children: [/* @__PURE__ */ N(p, {
183
+ variant: "caption",
184
+ color: "muted",
185
+ children: q.startsOnCaption
186
+ }), /* @__PURE__ */ N(p, {
187
+ component: "span",
188
+ variant: "body2",
189
+ children: Q.startsOnLabel
190
+ })]
191
+ }), /* @__PURE__ */ P("div", {
192
+ className: "ttw:flex ttw:flex-col ttw:gap-0.5",
193
+ children: [/* @__PURE__ */ N(p, {
194
+ variant: "caption",
195
+ color: "muted",
196
+ children: q.endsOnCaption
197
+ }), /* @__PURE__ */ N(p, {
198
+ component: "span",
199
+ variant: "body2",
200
+ children: Q.endsOnLabel
201
+ })]
202
+ })]
203
+ }),
204
+ $
205
+ ]
206
+ }) : /* @__PURE__ */ P("div", {
207
+ className: m("ttw:flex ttw:flex-col ttw:gap-3 ttw:rounded-lg ttw:bg-muted ttw:p-4", me && "ttw:border ttw:border-red-200"),
208
+ children: [
209
+ /* @__PURE__ */ N("div", {
210
+ className: "ttw:flex ttw:flex-row ttw:flex-wrap ttw:gap-x-12 ttw:gap-y-2",
211
+ children: J.amountRows.map((e) => /* @__PURE__ */ N(E, {
212
+ row: e,
213
+ defaultTone: J.amountTone
214
+ }, e.label))
215
+ }),
216
+ /* @__PURE__ */ P("div", {
217
+ className: "ttw:flex ttw:items-center ttw:gap-2",
218
+ children: [J.overdueLabel ? /* @__PURE__ */ P("span", {
219
+ className: "ttw:inline-flex ttw:items-center ttw:gap-1 ttw:rounded-full ttw:bg-red-100 ttw:px-2.5 ttw:py-0.5 ttw:text-xs ttw:font-medium ttw:text-red-700",
220
+ children: [/* @__PURE__ */ N(I, { className: "ttw:size-3" }), J.overdueLabel]
221
+ }) : /* @__PURE__ */ N(ne, {
222
+ label: J.statusLabel,
223
+ tone: V.statusTone,
224
+ icon: Z ? /* @__PURE__ */ N(Z, { className: "ttw:size-3" }) : void 0
225
+ }), J.recurring ? /* @__PURE__ */ P(i, {
226
+ variant: "outline",
227
+ className: "ttw:gap-1 ttw:border-violet-200 ttw:bg-violet-50 ttw:text-violet-700",
228
+ children: [/* @__PURE__ */ N(R, { className: "ttw:size-3" }), q.recurringBadge]
229
+ }) : null]
230
+ }),
231
+ /* @__PURE__ */ P("div", {
232
+ className: "ttw:flex ttw:gap-12",
233
+ children: [/* @__PURE__ */ P("div", {
234
+ className: "ttw:flex ttw:flex-col ttw:gap-0.5",
235
+ children: [/* @__PURE__ */ N(p, {
236
+ variant: "caption",
237
+ color: "muted",
238
+ children: q.invoiceDateCaption
239
+ }), /* @__PURE__ */ N(p, {
240
+ component: "span",
241
+ variant: "body2",
242
+ children: J.issueDateLabel
243
+ })]
244
+ }), /* @__PURE__ */ P("div", {
245
+ className: "ttw:flex ttw:flex-col ttw:gap-0.5",
246
+ children: [/* @__PURE__ */ N(p, {
247
+ variant: "caption",
248
+ color: "muted",
249
+ children: J.dueDateCaption
250
+ }), /* @__PURE__ */ N(p, {
251
+ component: "span",
252
+ variant: "body2",
253
+ children: J.dueDateLabel
254
+ })]
255
+ })]
256
+ }),
257
+ $
258
+ ]
79
259
  })
80
- }) : null
260
+ }), /* @__PURE__ */ P("div", {
261
+ className: "ttw:px-6",
262
+ children: [
263
+ J.paymentHistory ? /* @__PURE__ */ P("section", {
264
+ "aria-label": q.paymentHistoryHeading,
265
+ className: "ttw:border-b ttw:border-border ttw:py-4",
266
+ children: [/* @__PURE__ */ N(p, {
267
+ component: "h3",
268
+ variant: "body2",
269
+ className: "ttw:mb-3 ttw:font-medium",
270
+ children: q.paymentHistoryHeading
271
+ }), J.paymentHistory.isLoading ? /* @__PURE__ */ N("div", {
272
+ className: "ttw:flex ttw:py-2",
273
+ children: /* @__PURE__ */ N(j, {
274
+ className: "ttw:size-5 ttw:border-2",
275
+ label: q.paymentHistoryLoading
276
+ })
277
+ }) : J.paymentHistory.rows.length === 0 ? /* @__PURE__ */ N(p, {
278
+ variant: "body2",
279
+ className: J.paymentHistory.emptyTone === "danger" ? "ttw:text-red-600" : "ttw:text-muted-foreground",
280
+ children: q.paymentHistoryEmpty
281
+ }) : /* @__PURE__ */ P("div", {
282
+ className: "ttw:flex ttw:flex-col",
283
+ children: [J.paymentHistory.rows.map((e) => /* @__PURE__ */ P("div", {
284
+ className: "ttw:flex ttw:justify-between ttw:border-b ttw:border-border ttw:py-2",
285
+ children: [/* @__PURE__ */ N(p, {
286
+ component: "span",
287
+ variant: "body2",
288
+ children: e.dateLabel
289
+ }), /* @__PURE__ */ N(p, {
290
+ component: "span",
291
+ variant: "body2",
292
+ children: e.amountLabel
293
+ })]
294
+ }, e.id)), /* @__PURE__ */ P("div", {
295
+ className: "ttw:flex ttw:justify-between ttw:py-2 ttw:font-medium",
296
+ children: [/* @__PURE__ */ N(p, {
297
+ component: "span",
298
+ variant: "body2",
299
+ children: q.paymentHistoryTotalLabel
300
+ }), /* @__PURE__ */ N(p, {
301
+ component: "span",
302
+ variant: "body2",
303
+ children: J.paymentHistory.totalLabel
304
+ })]
305
+ })]
306
+ })]
307
+ }) : null,
308
+ J.customerName || J.customerContact.length > 0 ? /* @__PURE__ */ P("section", {
309
+ "aria-label": q.customerDetailsHeading,
310
+ className: "ttw:border-b ttw:border-border ttw:py-4",
311
+ children: [/* @__PURE__ */ N(p, {
312
+ component: "h3",
313
+ variant: "body2",
314
+ className: "ttw:mb-3 ttw:font-medium",
315
+ children: q.customerDetailsHeading
316
+ }), /* @__PURE__ */ P("div", {
317
+ className: "ttw:flex ttw:flex-col",
318
+ children: [J.customerName ? /* @__PURE__ */ N(oe, { ...J.customerName }) : null, J.customerContact.map((e) => /* @__PURE__ */ N(A, { ...e }, e.label))]
319
+ })]
320
+ }) : null,
321
+ /* @__PURE__ */ P(e, {
322
+ type: "multiple",
323
+ value: de,
324
+ onValueChange: fe,
325
+ className: "ttw:w-full",
326
+ children: [
327
+ /* @__PURE__ */ P(n, {
328
+ value: h.billing,
329
+ className: w,
330
+ children: [/* @__PURE__ */ N(r, {
331
+ className: T,
332
+ iconClassName: S,
333
+ children: /* @__PURE__ */ N("span", {
334
+ className: "ttw:group-hover:underline",
335
+ children: q.billingHeading
336
+ })
337
+ }), /* @__PURE__ */ N(t, { children: /* @__PURE__ */ P("div", {
338
+ className: "ttw:flex ttw:flex-col",
339
+ children: [J.billingItems.map((e) => /* @__PURE__ */ N(A, { ...e }, e.label)), J.seriesLink ? /* @__PURE__ */ P("div", {
340
+ className: "ttw:flex ttw:gap-4 ttw:border-b ttw:border-border ttw:py-3 ttw:last:border-b-0",
341
+ children: [/* @__PURE__ */ N(p, {
342
+ component: "span",
343
+ variant: "body2",
344
+ color: "muted",
345
+ className: "ttw:w-40 ttw:shrink-0",
346
+ children: q.recurringSeriesRowLabel
347
+ }), /* @__PURE__ */ N("button", {
348
+ type: "button",
349
+ onClick: J.seriesLink.onOpen,
350
+ className: "ttw:text-left ttw:text-primary ttw:hover:underline",
351
+ children: J.seriesLink.title
352
+ })]
353
+ }) : null]
354
+ }) })]
355
+ }),
356
+ J.lineItemsSection ? /* @__PURE__ */ P(n, {
357
+ value: h.lineItems,
358
+ className: w,
359
+ children: [/* @__PURE__ */ N(r, {
360
+ className: T,
361
+ iconClassName: S,
362
+ children: /* @__PURE__ */ P("span", {
363
+ className: "ttw:flex ttw:items-center ttw:gap-2",
364
+ children: [/* @__PURE__ */ N("span", {
365
+ className: "ttw:group-hover:underline",
366
+ children: q.lineItemsHeading
367
+ }), /* @__PURE__ */ N(i, {
368
+ variant: "secondary",
369
+ className: C,
370
+ children: J.lineItemsSection.countLabel
371
+ })]
372
+ })
373
+ }), /* @__PURE__ */ N(t, { children: /* @__PURE__ */ P("div", {
374
+ className: "ttw:flex ttw:flex-col",
375
+ children: [V.lineItems.length === 0 ? /* @__PURE__ */ N(p, {
376
+ variant: "body2",
377
+ color: "muted",
378
+ className: "ttw:py-3",
379
+ children: q.noLineItems
380
+ }) : V.lineItems.map((e) => /* @__PURE__ */ P("div", {
381
+ className: "ttw:flex ttw:items-start ttw:justify-between ttw:border-b ttw:border-border ttw:py-3",
382
+ children: [/* @__PURE__ */ P("div", {
383
+ className: "ttw:flex ttw:flex-col",
384
+ children: [/* @__PURE__ */ N(p, {
385
+ component: "span",
386
+ variant: "body2",
387
+ className: "ttw:font-medium",
388
+ children: e.name
389
+ }), /* @__PURE__ */ P(p, {
390
+ component: "span",
391
+ variant: "body2",
392
+ color: "muted",
393
+ children: [
394
+ e.quantityLabel,
395
+ " ",
396
+ q.lineItemMultiplier,
397
+ " ",
398
+ e.unitPriceLabel,
399
+ " ",
400
+ q.lineItemEaLabel
401
+ ]
402
+ })]
403
+ }), /* @__PURE__ */ N(p, {
404
+ component: "span",
405
+ variant: "body2",
406
+ children: e.totalLabel
407
+ })]
408
+ }, e.id)), J.lineItemsSection.totals.length > 0 ? /* @__PURE__ */ N("div", {
409
+ className: "ttw:flex ttw:flex-col ttw:gap-1 ttw:py-3",
410
+ children: J.lineItemsSection.totals.map((e) => /* @__PURE__ */ P("div", {
411
+ className: m("ttw:flex ttw:justify-between", e.emphasis && "ttw:font-medium"),
412
+ children: [/* @__PURE__ */ N(p, {
413
+ component: "span",
414
+ variant: "body2",
415
+ children: e.label
416
+ }), /* @__PURE__ */ N(p, {
417
+ component: "span",
418
+ variant: "body2",
419
+ children: e.value
420
+ })]
421
+ }, e.label))
422
+ }) : null]
423
+ }) })]
424
+ }) : null,
425
+ J.notes ? /* @__PURE__ */ P(n, {
426
+ value: h.notes,
427
+ className: w,
428
+ children: [/* @__PURE__ */ N(r, {
429
+ className: T,
430
+ iconClassName: S,
431
+ children: /* @__PURE__ */ P("span", {
432
+ className: "ttw:flex ttw:items-center ttw:gap-2",
433
+ children: [/* @__PURE__ */ N("span", {
434
+ className: "ttw:group-hover:underline",
435
+ children: q.notesHeading
436
+ }), /* @__PURE__ */ N(i, {
437
+ variant: "secondary",
438
+ className: C,
439
+ children: J.notes.countLabel
440
+ })]
441
+ })
442
+ }), /* @__PURE__ */ N(t, { children: /* @__PURE__ */ P("div", {
443
+ className: "ttw:flex ttw:flex-col ttw:gap-3",
444
+ children: [J.notes.opening ? /* @__PURE__ */ P("div", { children: [/* @__PURE__ */ N(p, {
445
+ variant: "body2",
446
+ className: "ttw:mb-1 ttw:font-medium",
447
+ children: q.notesOpeningLabel
448
+ }), /* @__PURE__ */ N(p, {
449
+ variant: "body2",
450
+ color: "muted",
451
+ children: J.notes.opening
452
+ })] }) : null, J.notes.closing ? /* @__PURE__ */ P("div", { children: [/* @__PURE__ */ N(p, {
453
+ variant: "body2",
454
+ className: "ttw:mb-1 ttw:font-medium",
455
+ children: q.notesClosingLabel
456
+ }), /* @__PURE__ */ N(p, {
457
+ variant: "body2",
458
+ color: "muted",
459
+ children: J.notes.closing
460
+ })] }) : null]
461
+ }) })]
462
+ }) : null,
463
+ /* @__PURE__ */ N(D, {
464
+ attachments: J.attachments,
465
+ labels: q
466
+ }),
467
+ /* @__PURE__ */ N(O, {
468
+ auditHistory: J.auditHistory,
469
+ labels: q
470
+ })
471
+ ]
472
+ }),
473
+ Q ? /* @__PURE__ */ P("section", {
474
+ "aria-label": Q.scheduleTitle,
475
+ className: "ttw:border-t ttw:border-border ttw:py-4",
476
+ children: [/* @__PURE__ */ N(p, {
477
+ component: "h3",
478
+ variant: "body2",
479
+ className: "ttw:mb-3 ttw:font-medium",
480
+ children: Q.scheduleTitle
481
+ }), /* @__PURE__ */ N(ue, {
482
+ rows: Q.schedule,
483
+ labels: q
484
+ })]
485
+ }) : null
486
+ ]
487
+ })]
81
488
  })
82
- ]
83
- }, t.id);
84
- }) })]
489
+ ] })
490
+ ]
491
+ })
85
492
  });
86
493
  }
87
494
  //#endregion
88
- export { u as ScheduledInvoicesTable };
495
+ export { z as ReceivableDetailsPanel, z as default };