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