@tesouro/embedded-components-react 0.5.227 → 0.5.228
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.
- package/README.md +21 -21
- package/dist/index.d.ts +54 -34
- package/dist/index.js +1 -1
- package/dist/lib/ReceivablesWidget.d.ts +54 -34
- package/dist/lib/ReceivablesWidget.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/data-access/dist/index.js +4 -4
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/data-access/dist/index10.js +29 -59
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index12.js +36 -141
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index13.js +26 -16
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index17.js +58 -37
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index18.js +228 -122
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index19.js +300 -147
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index20.js +34 -37
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index21.js +126 -122
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index22.js +150 -58
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index23.js +38 -91
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index24.js +113 -107
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index25.js +98 -231
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index26.js +111 -27
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index27.js +25 -624
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index28.js +631 -39
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index29.js +41 -40
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index30.js +35 -74
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index31.js +73 -115
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index32.js +115 -313
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index33.js +325 -0
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index7.js +15 -2
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index.js +11 -12
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index14.js +42 -1
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index15.js +19 -3
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index16.js +73 -3
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index17.js +3 -1
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index18.js +16 -1
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index19.js +32 -4
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index20.js +304 -11
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index22.js +42 -258
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index23.js +62 -38
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index24.js +485 -61
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index25.js +90 -480
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index27.js +2 -0
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index28.js +3 -1
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index29.js +0 -3
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index30.js +100 -1
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index31.js +23 -95
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index32.js +231 -23
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index33.js +3 -236
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index34.js +249 -3
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index35.js +78 -234
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index36.js +53 -87
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index37.js +343 -49
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index4.js +29 -20
- package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/index.js +40 -40
- package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/rest/@tanstack/react-query.gen.js +189 -211
- package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/rest/sdk.gen.js +43 -59
- package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/analytics/build-info.js +1 -1
- package/package.json +1 -1
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index26.js +0 -106
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index38.js +0 -353
|
@@ -1,12 +1,305 @@
|
|
|
1
|
-
import "../../../../../packages/shared-ui-shadcn/dist/index.js";
|
|
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 s, SheetDescription as c, SheetHeader as l, SheetTitle as u, Tooltip as d, TooltipContent as f, TooltipProvider as p, TooltipTrigger as m, cn as h } from "../../../../../packages/shared-ui-shadcn/dist/index.js";
|
|
2
|
+
import { ErrorState as g } from "../../../shared/ui/dist/lib/ErrorState/ErrorState.js";
|
|
2
3
|
import "../../../shared/ui/dist/index.js";
|
|
3
|
-
import "./index4.js";
|
|
4
|
-
import "./index13.js";
|
|
5
|
-
import "./index14.js";
|
|
6
|
-
import "./index15.js";
|
|
7
|
-
import "./index16.js";
|
|
8
|
-
import "./index17.js";
|
|
9
|
-
import "./index18.js";
|
|
10
|
-
import "./index19.js";
|
|
11
|
-
import "react/jsx-runtime";
|
|
12
|
-
import "lucide-react";
|
|
4
|
+
import { RECEIVABLE_DETAILS_PANEL_LABELS_EN as _ } from "./index4.js";
|
|
5
|
+
import { ReceivableStatusBadge as v } from "./index13.js";
|
|
6
|
+
import { ACTION_ICON as y, ACTION_LABEL_KEY as b, STATUS_ICON as x, headerIconButtonClass as S } from "./index14.js";
|
|
7
|
+
import { AmountCell as C } from "./index15.js";
|
|
8
|
+
import { ATTACHMENTS_ITEM_VALUE as w, AttachmentsItem as T } from "./index16.js";
|
|
9
|
+
import { CloseButton as E } from "./index17.js";
|
|
10
|
+
import { InfoRow as D } from "./index18.js";
|
|
11
|
+
import { OverflowMenu as O } from "./index19.js";
|
|
12
|
+
import { Fragment as k, jsx as A, jsxs as j } from "react/jsx-runtime";
|
|
13
|
+
import { CircleAlert as M, EyeIcon as N, Repeat as P } from "lucide-react";
|
|
14
|
+
//#region ../../libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index20.js
|
|
15
|
+
function F({ open: F, onOpenChange: I, details: L, unsupported: R, isLoading: z, isError: B, onActionClick: V, onClose: H, labels: U }) {
|
|
16
|
+
let W = {
|
|
17
|
+
..._,
|
|
18
|
+
...U
|
|
19
|
+
}, G = L?.panel, K = B ? {
|
|
20
|
+
title: W.errorTitle,
|
|
21
|
+
description: W.errorDescription
|
|
22
|
+
} : R, q = G?.amountTone === "danger", J = (e) => W[b[e]], Y = L ? x[L.status] : void 0;
|
|
23
|
+
return /* @__PURE__ */ A(o, {
|
|
24
|
+
open: F,
|
|
25
|
+
onOpenChange: I,
|
|
26
|
+
children: /* @__PURE__ */ j(s, {
|
|
27
|
+
showCloseButton: !1,
|
|
28
|
+
className: "ttw:w-180 ttw:overflow-y-auto ttw:p-0 ttw:sm:max-w-180",
|
|
29
|
+
children: [K || z || !L ? /* @__PURE__ */ A(E, {
|
|
30
|
+
label: W.closeButton,
|
|
31
|
+
onClose: H,
|
|
32
|
+
className: h(S, "ttw:absolute ttw:right-4 ttw:top-4 ttw:z-10")
|
|
33
|
+
}) : null, K ? /* @__PURE__ */ j("div", {
|
|
34
|
+
className: "ttw:p-6",
|
|
35
|
+
children: [/* @__PURE__ */ j(l, {
|
|
36
|
+
className: "ttw:sr-only",
|
|
37
|
+
children: [/* @__PURE__ */ A(u, { children: K.title }), /* @__PURE__ */ A(c, { children: W.hiddenDescription })]
|
|
38
|
+
}), /* @__PURE__ */ A(g, {
|
|
39
|
+
title: K.title,
|
|
40
|
+
description: K.description
|
|
41
|
+
})]
|
|
42
|
+
}) : z || !L || !G ? /* @__PURE__ */ j(l, {
|
|
43
|
+
className: "ttw:p-6",
|
|
44
|
+
children: [/* @__PURE__ */ A(u, { children: W.loadingTitle }), /* @__PURE__ */ A(c, {
|
|
45
|
+
className: "ttw:sr-only",
|
|
46
|
+
children: W.hiddenDescription
|
|
47
|
+
})]
|
|
48
|
+
}) : /* @__PURE__ */ j(k, { children: [/* @__PURE__ */ j(l, {
|
|
49
|
+
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",
|
|
50
|
+
children: [/* @__PURE__ */ j("div", {
|
|
51
|
+
className: "ttw:flex ttw:flex-col ttw:gap-0.5",
|
|
52
|
+
children: [
|
|
53
|
+
/* @__PURE__ */ A(u, {
|
|
54
|
+
className: "ttw:text-xl ttw:font-semibold ttw:text-foreground",
|
|
55
|
+
children: L.title
|
|
56
|
+
}),
|
|
57
|
+
G.subtitle ? /* @__PURE__ */ A("p", {
|
|
58
|
+
className: "ttw:text-sm ttw:text-muted-foreground",
|
|
59
|
+
children: G.subtitle
|
|
60
|
+
}) : null,
|
|
61
|
+
/* @__PURE__ */ A(c, {
|
|
62
|
+
className: "ttw:sr-only",
|
|
63
|
+
children: W.hiddenDescription
|
|
64
|
+
})
|
|
65
|
+
]
|
|
66
|
+
}), /* @__PURE__ */ A(p, {
|
|
67
|
+
delayDuration: 500,
|
|
68
|
+
children: /* @__PURE__ */ j("div", {
|
|
69
|
+
className: "ttw:flex ttw:items-center ttw:gap-1.5",
|
|
70
|
+
children: [
|
|
71
|
+
L.pdfUrl ? /* @__PURE__ */ j(d, { children: [/* @__PURE__ */ A(m, {
|
|
72
|
+
asChild: !0,
|
|
73
|
+
children: /* @__PURE__ */ A(a, {
|
|
74
|
+
asChild: !0,
|
|
75
|
+
variant: "ghost",
|
|
76
|
+
size: "icon",
|
|
77
|
+
className: S,
|
|
78
|
+
children: /* @__PURE__ */ A("a", {
|
|
79
|
+
href: L.pdfUrl,
|
|
80
|
+
target: "_blank",
|
|
81
|
+
rel: "noreferrer",
|
|
82
|
+
"aria-label": W.viewPdfButton,
|
|
83
|
+
children: /* @__PURE__ */ A(N, { className: "ttw:size-4" })
|
|
84
|
+
})
|
|
85
|
+
})
|
|
86
|
+
}), /* @__PURE__ */ A(f, { children: W.viewPdfButton })] }) : null,
|
|
87
|
+
G.overflowActions.length > 0 ? /* @__PURE__ */ A(O, {
|
|
88
|
+
actions: G.overflowActions,
|
|
89
|
+
triggerLabel: W.moreActionsLabel,
|
|
90
|
+
getActionLabel: J,
|
|
91
|
+
onSelect: (e) => V(e, L),
|
|
92
|
+
className: S
|
|
93
|
+
}) : null,
|
|
94
|
+
/* @__PURE__ */ j(d, { children: [/* @__PURE__ */ A(m, {
|
|
95
|
+
asChild: !0,
|
|
96
|
+
children: /* @__PURE__ */ A(E, {
|
|
97
|
+
label: W.closeButton,
|
|
98
|
+
onClose: H,
|
|
99
|
+
className: S
|
|
100
|
+
})
|
|
101
|
+
}), /* @__PURE__ */ A(f, { children: W.closeButton })] })
|
|
102
|
+
]
|
|
103
|
+
})
|
|
104
|
+
})]
|
|
105
|
+
}), /* @__PURE__ */ j("div", {
|
|
106
|
+
className: "ttw:flex ttw:flex-col",
|
|
107
|
+
children: [/* @__PURE__ */ A("div", {
|
|
108
|
+
className: "ttw:px-6",
|
|
109
|
+
children: /* @__PURE__ */ j("div", {
|
|
110
|
+
className: h("ttw:flex ttw:flex-col ttw:gap-3 ttw:rounded-lg ttw:bg-muted ttw:p-4", q && "ttw:border ttw:border-red-200"),
|
|
111
|
+
children: [
|
|
112
|
+
/* @__PURE__ */ A("div", {
|
|
113
|
+
className: "ttw:flex ttw:flex-row ttw:flex-wrap ttw:gap-x-12 ttw:gap-y-2",
|
|
114
|
+
children: G.amountRows.map((e) => /* @__PURE__ */ A(C, {
|
|
115
|
+
row: e,
|
|
116
|
+
defaultTone: G.amountTone
|
|
117
|
+
}, e.label))
|
|
118
|
+
}),
|
|
119
|
+
/* @__PURE__ */ j("div", {
|
|
120
|
+
className: "ttw:flex ttw:items-center ttw:gap-2",
|
|
121
|
+
children: [G.overdueLabel ? /* @__PURE__ */ j("span", {
|
|
122
|
+
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",
|
|
123
|
+
children: [/* @__PURE__ */ A(M, { className: "ttw:size-3" }), G.overdueLabel]
|
|
124
|
+
}) : /* @__PURE__ */ A(v, {
|
|
125
|
+
label: G.statusLabel,
|
|
126
|
+
tone: L.statusTone,
|
|
127
|
+
icon: Y ? /* @__PURE__ */ A(Y, { className: "ttw:size-3" }) : void 0
|
|
128
|
+
}), G.recurring ? /* @__PURE__ */ j(i, {
|
|
129
|
+
variant: "outline",
|
|
130
|
+
className: "ttw:gap-1 ttw:border-violet-200 ttw:bg-violet-50 ttw:text-violet-700",
|
|
131
|
+
children: [/* @__PURE__ */ A(P, { className: "ttw:size-3" }), W.recurringBadge]
|
|
132
|
+
}) : null]
|
|
133
|
+
}),
|
|
134
|
+
/* @__PURE__ */ j("div", {
|
|
135
|
+
className: "ttw:flex ttw:gap-12 ttw:text-sm",
|
|
136
|
+
children: [/* @__PURE__ */ j("div", {
|
|
137
|
+
className: "ttw:flex ttw:flex-col ttw:gap-0.5",
|
|
138
|
+
children: [/* @__PURE__ */ A("span", {
|
|
139
|
+
className: "ttw:text-xs ttw:text-muted-foreground",
|
|
140
|
+
children: W.invoiceDateCaption
|
|
141
|
+
}), /* @__PURE__ */ A("span", {
|
|
142
|
+
className: "ttw:text-foreground",
|
|
143
|
+
children: G.issueDateLabel
|
|
144
|
+
})]
|
|
145
|
+
}), /* @__PURE__ */ j("div", {
|
|
146
|
+
className: "ttw:flex ttw:flex-col ttw:gap-0.5",
|
|
147
|
+
children: [/* @__PURE__ */ A("span", {
|
|
148
|
+
className: "ttw:text-xs ttw:text-muted-foreground",
|
|
149
|
+
children: G.dueDateCaption
|
|
150
|
+
}), /* @__PURE__ */ A("span", {
|
|
151
|
+
className: "ttw:text-foreground",
|
|
152
|
+
children: G.dueDateLabel
|
|
153
|
+
})]
|
|
154
|
+
})]
|
|
155
|
+
}),
|
|
156
|
+
G.primaryActions.length > 0 ? /* @__PURE__ */ A("div", {
|
|
157
|
+
className: "ttw:flex ttw:items-center ttw:gap-2 ttw:border-t ttw:border-border ttw:pt-3",
|
|
158
|
+
children: G.primaryActions.map((e, t) => {
|
|
159
|
+
let n = y[e], r = t === G.primaryActions.length - 1;
|
|
160
|
+
return /* @__PURE__ */ j(a, {
|
|
161
|
+
size: "sm",
|
|
162
|
+
variant: r ? "default" : "outline",
|
|
163
|
+
onClick: () => V(e, L),
|
|
164
|
+
children: [/* @__PURE__ */ A(n, { className: "ttw:size-4" }), J(e)]
|
|
165
|
+
}, e);
|
|
166
|
+
})
|
|
167
|
+
}) : null
|
|
168
|
+
]
|
|
169
|
+
})
|
|
170
|
+
}), /* @__PURE__ */ j("div", {
|
|
171
|
+
className: "ttw:px-6",
|
|
172
|
+
children: [
|
|
173
|
+
G.paymentHistory ? /* @__PURE__ */ j("section", {
|
|
174
|
+
"aria-label": W.paymentHistoryHeading,
|
|
175
|
+
className: "ttw:border-b ttw:py-4",
|
|
176
|
+
children: [/* @__PURE__ */ A("h3", {
|
|
177
|
+
className: "ttw:mb-3 ttw:text-sm ttw:font-medium",
|
|
178
|
+
children: W.paymentHistoryHeading
|
|
179
|
+
}), G.paymentHistory.rows.length === 0 ? /* @__PURE__ */ A("p", {
|
|
180
|
+
className: h("ttw:text-sm", G.paymentHistory.emptyTone === "danger" ? "ttw:text-red-600" : "ttw:text-muted-foreground"),
|
|
181
|
+
children: W.paymentHistoryEmpty
|
|
182
|
+
}) : /* @__PURE__ */ j("div", {
|
|
183
|
+
className: "ttw:flex ttw:flex-col",
|
|
184
|
+
children: [G.paymentHistory.rows.map((e) => /* @__PURE__ */ j("div", {
|
|
185
|
+
className: "ttw:flex ttw:justify-between ttw:border-b ttw:border-border ttw:py-2 ttw:text-sm",
|
|
186
|
+
children: [/* @__PURE__ */ A("span", { children: e.dateLabel }), /* @__PURE__ */ A("span", { children: e.amountLabel })]
|
|
187
|
+
}, e.id)), /* @__PURE__ */ j("div", {
|
|
188
|
+
className: "ttw:flex ttw:justify-between ttw:py-2 ttw:text-sm ttw:font-medium",
|
|
189
|
+
children: [/* @__PURE__ */ A("span", { children: W.paymentHistoryTotalLabel }), /* @__PURE__ */ A("span", { children: G.paymentHistory.totalLabel })]
|
|
190
|
+
})]
|
|
191
|
+
})]
|
|
192
|
+
}) : null,
|
|
193
|
+
G.customerContact.length > 0 ? /* @__PURE__ */ j("section", {
|
|
194
|
+
"aria-label": W.customerDetailsHeading,
|
|
195
|
+
className: "ttw:border-b ttw:py-4",
|
|
196
|
+
children: [/* @__PURE__ */ A("h3", {
|
|
197
|
+
className: "ttw:mb-3 ttw:text-sm ttw:font-medium",
|
|
198
|
+
children: W.customerDetailsHeading
|
|
199
|
+
}), /* @__PURE__ */ A("div", {
|
|
200
|
+
className: "ttw:flex ttw:flex-col",
|
|
201
|
+
children: G.customerContact.map((e) => /* @__PURE__ */ A(D, { ...e }, e.label))
|
|
202
|
+
})]
|
|
203
|
+
}) : null,
|
|
204
|
+
/* @__PURE__ */ j(e, {
|
|
205
|
+
type: "multiple",
|
|
206
|
+
defaultValue: [w],
|
|
207
|
+
className: "ttw:w-full",
|
|
208
|
+
children: [
|
|
209
|
+
G.recurrenceItems ? /* @__PURE__ */ j(n, {
|
|
210
|
+
value: "recurrence",
|
|
211
|
+
children: [/* @__PURE__ */ A(r, { children: W.recurrenceHeading }), /* @__PURE__ */ A(t, { children: /* @__PURE__ */ A("div", {
|
|
212
|
+
className: "ttw:flex ttw:flex-col",
|
|
213
|
+
children: G.recurrenceItems.map((e) => /* @__PURE__ */ A(D, { ...e }, e.label))
|
|
214
|
+
}) })]
|
|
215
|
+
}) : null,
|
|
216
|
+
/* @__PURE__ */ j(n, {
|
|
217
|
+
value: "billing",
|
|
218
|
+
children: [/* @__PURE__ */ A(r, { children: W.billingHeading }), /* @__PURE__ */ A(t, { children: /* @__PURE__ */ A("div", {
|
|
219
|
+
className: "ttw:flex ttw:flex-col",
|
|
220
|
+
children: G.billingItems.map((e) => /* @__PURE__ */ A(D, { ...e }, e.label))
|
|
221
|
+
}) })]
|
|
222
|
+
}),
|
|
223
|
+
/* @__PURE__ */ j(n, {
|
|
224
|
+
value: "line-items",
|
|
225
|
+
children: [/* @__PURE__ */ A(r, { children: /* @__PURE__ */ j("span", {
|
|
226
|
+
className: "ttw:flex ttw:items-center ttw:gap-2",
|
|
227
|
+
children: [W.lineItemsHeading, /* @__PURE__ */ A(i, {
|
|
228
|
+
variant: "secondary",
|
|
229
|
+
className: "ttw:rounded-full",
|
|
230
|
+
children: G.lineItemsCountLabel
|
|
231
|
+
})]
|
|
232
|
+
}) }), /* @__PURE__ */ A(t, { children: /* @__PURE__ */ j("div", {
|
|
233
|
+
className: "ttw:flex ttw:flex-col ttw:text-sm",
|
|
234
|
+
children: [L.lineItems.length === 0 ? /* @__PURE__ */ A("p", {
|
|
235
|
+
className: "ttw:py-3 ttw:text-muted-foreground",
|
|
236
|
+
children: W.noLineItems
|
|
237
|
+
}) : L.lineItems.map((e) => /* @__PURE__ */ j("div", {
|
|
238
|
+
className: "ttw:flex ttw:items-start ttw:justify-between ttw:border-b ttw:border-border ttw:py-3",
|
|
239
|
+
children: [/* @__PURE__ */ j("div", {
|
|
240
|
+
className: "ttw:flex ttw:flex-col",
|
|
241
|
+
children: [/* @__PURE__ */ A("span", {
|
|
242
|
+
className: "ttw:font-medium",
|
|
243
|
+
children: e.name
|
|
244
|
+
}), /* @__PURE__ */ j("span", {
|
|
245
|
+
className: "ttw:text-muted-foreground",
|
|
246
|
+
children: [
|
|
247
|
+
e.quantityLabel,
|
|
248
|
+
" ",
|
|
249
|
+
W.lineItemMultiplier,
|
|
250
|
+
" ",
|
|
251
|
+
e.unitPriceLabel,
|
|
252
|
+
" ",
|
|
253
|
+
W.lineItemEaLabel
|
|
254
|
+
]
|
|
255
|
+
})]
|
|
256
|
+
}), /* @__PURE__ */ A("span", { children: e.totalLabel })]
|
|
257
|
+
}, e.id)), G.lineItemTotals.length > 0 ? /* @__PURE__ */ A("div", {
|
|
258
|
+
className: "ttw:flex ttw:flex-col ttw:gap-1 ttw:py-3",
|
|
259
|
+
children: G.lineItemTotals.map((e) => /* @__PURE__ */ j("div", {
|
|
260
|
+
className: h("ttw:flex ttw:justify-between", e.emphasis && "ttw:font-medium"),
|
|
261
|
+
children: [/* @__PURE__ */ A("span", { children: e.label }), /* @__PURE__ */ A("span", { children: e.value })]
|
|
262
|
+
}, e.label))
|
|
263
|
+
}) : null]
|
|
264
|
+
}) })]
|
|
265
|
+
}),
|
|
266
|
+
G.notes ? /* @__PURE__ */ j(n, {
|
|
267
|
+
value: "notes",
|
|
268
|
+
children: [/* @__PURE__ */ A(r, { children: /* @__PURE__ */ j("span", {
|
|
269
|
+
className: "ttw:flex ttw:items-center ttw:gap-2",
|
|
270
|
+
children: [W.notesHeading, /* @__PURE__ */ A(i, {
|
|
271
|
+
variant: "secondary",
|
|
272
|
+
className: "ttw:rounded-full",
|
|
273
|
+
children: G.notes.countLabel
|
|
274
|
+
})]
|
|
275
|
+
}) }), /* @__PURE__ */ A(t, { children: /* @__PURE__ */ j("div", {
|
|
276
|
+
className: "ttw:flex ttw:flex-col ttw:gap-3 ttw:text-sm",
|
|
277
|
+
children: [G.notes.opening ? /* @__PURE__ */ j("div", { children: [/* @__PURE__ */ A("p", {
|
|
278
|
+
className: "ttw:mb-1 ttw:font-medium",
|
|
279
|
+
children: W.notesOpeningLabel
|
|
280
|
+
}), /* @__PURE__ */ A("p", {
|
|
281
|
+
className: "ttw:text-muted-foreground",
|
|
282
|
+
children: G.notes.opening
|
|
283
|
+
})] }) : null, G.notes.closing ? /* @__PURE__ */ j("div", { children: [/* @__PURE__ */ A("p", {
|
|
284
|
+
className: "ttw:mb-1 ttw:font-medium",
|
|
285
|
+
children: W.notesClosingLabel
|
|
286
|
+
}), /* @__PURE__ */ A("p", {
|
|
287
|
+
className: "ttw:text-muted-foreground",
|
|
288
|
+
children: G.notes.closing
|
|
289
|
+
})] }) : null]
|
|
290
|
+
}) })]
|
|
291
|
+
}) : null,
|
|
292
|
+
/* @__PURE__ */ A(T, {
|
|
293
|
+
attachments: G.attachments,
|
|
294
|
+
labels: W
|
|
295
|
+
})
|
|
296
|
+
]
|
|
297
|
+
})
|
|
298
|
+
]
|
|
299
|
+
})]
|
|
300
|
+
})] })]
|
|
301
|
+
})
|
|
302
|
+
});
|
|
303
|
+
}
|
|
304
|
+
//#endregion
|
|
305
|
+
export { F as ReceivableDetailsPanel, F as default };
|
|
@@ -1,264 +1,48 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import "../../../shared/ui/dist/index.js";
|
|
4
|
-
import { RECEIVABLE_DETAILS_SHEET_LABELS_EN as l } from "./index4.js";
|
|
5
|
-
import { ReceivableStatusBadge as u } from "./index13.js";
|
|
6
|
-
import { Fragment as d, jsx as f, jsxs as p } from "react/jsx-runtime";
|
|
7
|
-
import { DownloadIcon as m } from "lucide-react";
|
|
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";
|
|
8
3
|
//#region ../../libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index22.js
|
|
9
|
-
function
|
|
10
|
-
return /* @__PURE__ */
|
|
11
|
-
className: "ttw:flex ttw:
|
|
12
|
-
children: [/* @__PURE__ */
|
|
13
|
-
variant: "body2",
|
|
14
|
-
className: "ttw:font-semibold",
|
|
15
|
-
children: e
|
|
16
|
-
}), t]
|
|
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 })]
|
|
17
8
|
});
|
|
18
9
|
}
|
|
19
|
-
function
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
status: _.status,
|
|
55
|
-
tone: _.statusTone,
|
|
56
|
-
labels: C.statusBadge
|
|
57
|
-
}), /* @__PURE__ */ f("span", {
|
|
58
|
-
className: "ttw:text-sm ttw:font-medium",
|
|
59
|
-
children: _.totalLabel
|
|
60
|
-
})]
|
|
61
|
-
})]
|
|
62
|
-
}), _.pdfUrl && /* @__PURE__ */ f(e, {
|
|
63
|
-
asChild: !0,
|
|
64
|
-
variant: "outline",
|
|
65
|
-
children: /* @__PURE__ */ p("a", {
|
|
66
|
-
href: _.pdfUrl,
|
|
67
|
-
target: "_blank",
|
|
68
|
-
rel: "noreferrer",
|
|
69
|
-
children: [/* @__PURE__ */ f(m, { className: "ttw:size-4" }), C.downloadPdfButton]
|
|
70
|
-
})
|
|
71
|
-
})]
|
|
72
|
-
}),
|
|
73
|
-
/* @__PURE__ */ f(h, {
|
|
74
|
-
title: C.summaryHeading,
|
|
75
|
-
children: /* @__PURE__ */ f("dl", {
|
|
76
|
-
className: "ttw:grid ttw:grid-cols-2 ttw:gap-x-6 ttw:gap-y-3",
|
|
77
|
-
children: _.summaryItems.map((e) => /* @__PURE__ */ p("div", {
|
|
78
|
-
className: "ttw:flex ttw:flex-col",
|
|
79
|
-
children: [/* @__PURE__ */ f("dt", {
|
|
80
|
-
className: "ttw:text-xs ttw:text-muted-foreground",
|
|
81
|
-
children: e.label
|
|
82
|
-
}), /* @__PURE__ */ f("dd", {
|
|
83
|
-
className: "ttw:text-sm ttw:font-medium",
|
|
84
|
-
children: e.value
|
|
85
|
-
})]
|
|
86
|
-
}, e.label))
|
|
87
|
-
})
|
|
88
|
-
}),
|
|
89
|
-
/* @__PURE__ */ f(h, {
|
|
90
|
-
title: C.lineItemsHeading,
|
|
91
|
-
children: _.lineItems.length === 0 ? /* @__PURE__ */ f("p", {
|
|
92
|
-
className: "ttw:text-sm ttw:text-muted-foreground",
|
|
93
|
-
children: C.noLineItems
|
|
94
|
-
}) : /* @__PURE__ */ f("div", {
|
|
95
|
-
className: "ttw:overflow-hidden ttw:rounded-md ttw:border",
|
|
96
|
-
children: /* @__PURE__ */ p("table", {
|
|
97
|
-
className: "ttw:w-full ttw:text-sm",
|
|
98
|
-
children: [/* @__PURE__ */ f("thead", {
|
|
99
|
-
className: "ttw:bg-muted/50",
|
|
100
|
-
children: /* @__PURE__ */ p("tr", { children: [
|
|
101
|
-
/* @__PURE__ */ f("th", {
|
|
102
|
-
className: "ttw:p-2 ttw:text-left",
|
|
103
|
-
children: C.lineItemsHeading
|
|
104
|
-
}),
|
|
105
|
-
/* @__PURE__ */ f("th", {
|
|
106
|
-
className: "ttw:p-2 ttw:text-right",
|
|
107
|
-
children: C.quantityColumn
|
|
108
|
-
}),
|
|
109
|
-
/* @__PURE__ */ f("th", {
|
|
110
|
-
className: "ttw:p-2 ttw:text-right",
|
|
111
|
-
children: C.unitPriceColumn
|
|
112
|
-
}),
|
|
113
|
-
/* @__PURE__ */ f("th", {
|
|
114
|
-
className: "ttw:p-2 ttw:text-right",
|
|
115
|
-
children: C.totalColumn
|
|
116
|
-
})
|
|
117
|
-
] })
|
|
118
|
-
}), /* @__PURE__ */ f("tbody", { children: _.lineItems.map((e) => /* @__PURE__ */ p("tr", {
|
|
119
|
-
className: "ttw:border-t",
|
|
120
|
-
children: [
|
|
121
|
-
/* @__PURE__ */ f("td", {
|
|
122
|
-
className: "ttw:p-2",
|
|
123
|
-
children: e.name
|
|
124
|
-
}),
|
|
125
|
-
/* @__PURE__ */ f("td", {
|
|
126
|
-
className: "ttw:p-2 ttw:text-right",
|
|
127
|
-
children: e.quantityLabel
|
|
128
|
-
}),
|
|
129
|
-
/* @__PURE__ */ f("td", {
|
|
130
|
-
className: "ttw:p-2 ttw:text-right",
|
|
131
|
-
children: e.unitPriceLabel
|
|
132
|
-
}),
|
|
133
|
-
/* @__PURE__ */ f("td", {
|
|
134
|
-
className: "ttw:p-2 ttw:text-right",
|
|
135
|
-
children: e.totalLabel
|
|
136
|
-
})
|
|
137
|
-
]
|
|
138
|
-
}, e.id)) })]
|
|
139
|
-
})
|
|
140
|
-
})
|
|
141
|
-
}),
|
|
142
|
-
/* @__PURE__ */ f(h, {
|
|
143
|
-
title: C.activityHeading,
|
|
144
|
-
children: _.activityItems.length === 0 ? /* @__PURE__ */ f("p", {
|
|
145
|
-
className: "ttw:text-sm ttw:text-muted-foreground",
|
|
146
|
-
children: C.noActivity
|
|
147
|
-
}) : /* @__PURE__ */ f("div", {
|
|
148
|
-
className: "ttw:flex ttw:flex-col ttw:gap-3",
|
|
149
|
-
children: _.activityItems.map((e) => /* @__PURE__ */ p("div", {
|
|
150
|
-
className: "ttw:flex ttw:flex-col",
|
|
151
|
-
children: [
|
|
152
|
-
/* @__PURE__ */ f("span", {
|
|
153
|
-
className: "ttw:text-sm ttw:font-medium",
|
|
154
|
-
children: e.title
|
|
155
|
-
}),
|
|
156
|
-
/* @__PURE__ */ f("span", {
|
|
157
|
-
className: "ttw:text-sm ttw:text-muted-foreground",
|
|
158
|
-
children: e.description
|
|
159
|
-
}),
|
|
160
|
-
/* @__PURE__ */ f("span", {
|
|
161
|
-
className: "ttw:text-xs ttw:text-muted-foreground",
|
|
162
|
-
children: e.timestampLabel
|
|
163
|
-
})
|
|
164
|
-
]
|
|
165
|
-
}, e.id))
|
|
166
|
-
})
|
|
167
|
-
}),
|
|
168
|
-
/* @__PURE__ */ f(h, {
|
|
169
|
-
title: C.mailsHeading,
|
|
170
|
-
children: _.mailItems.length === 0 ? /* @__PURE__ */ f("p", {
|
|
171
|
-
className: "ttw:text-sm ttw:text-muted-foreground",
|
|
172
|
-
children: C.noMails
|
|
173
|
-
}) : /* @__PURE__ */ f("div", {
|
|
174
|
-
className: "ttw:flex ttw:flex-col ttw:gap-3",
|
|
175
|
-
children: _.mailItems.map((e) => /* @__PURE__ */ p("div", {
|
|
176
|
-
className: "ttw:flex ttw:flex-col",
|
|
177
|
-
children: [
|
|
178
|
-
/* @__PURE__ */ f("span", {
|
|
179
|
-
className: "ttw:text-sm ttw:font-medium",
|
|
180
|
-
children: e.statusLabel
|
|
181
|
-
}),
|
|
182
|
-
/* @__PURE__ */ f("span", {
|
|
183
|
-
className: "ttw:text-sm ttw:text-muted-foreground",
|
|
184
|
-
children: e.recipientsLabel
|
|
185
|
-
}),
|
|
186
|
-
/* @__PURE__ */ f("span", {
|
|
187
|
-
className: "ttw:text-xs ttw:text-muted-foreground",
|
|
188
|
-
children: e.sentAtLabel
|
|
189
|
-
})
|
|
190
|
-
]
|
|
191
|
-
}, e.id))
|
|
192
|
-
})
|
|
193
|
-
})
|
|
194
|
-
] }) : null
|
|
195
|
-
}),
|
|
196
|
-
/* @__PURE__ */ f(i, { children: _ && /* @__PURE__ */ p("div", {
|
|
197
|
-
className: "ttw:flex ttw:flex-wrap ttw:justify-end ttw:gap-2",
|
|
198
|
-
children: [
|
|
199
|
-
_.actions.edit && /* @__PURE__ */ f(e, {
|
|
200
|
-
variant: "outline",
|
|
201
|
-
onClick: () => b("edit", _),
|
|
202
|
-
children: C.editButton
|
|
203
|
-
}),
|
|
204
|
-
_.actions.issue && /* @__PURE__ */ f(e, {
|
|
205
|
-
onClick: () => b("issue", _),
|
|
206
|
-
children: C.issueButton
|
|
207
|
-
}),
|
|
208
|
-
_.actions.send && /* @__PURE__ */ f(e, {
|
|
209
|
-
variant: "outline",
|
|
210
|
-
onClick: () => b("send", _),
|
|
211
|
-
children: C.sendButton
|
|
212
|
-
}),
|
|
213
|
-
_.actions.accept && /* @__PURE__ */ f(e, {
|
|
214
|
-
onClick: () => b("accept", _),
|
|
215
|
-
children: C.acceptButton
|
|
216
|
-
}),
|
|
217
|
-
_.actions.decline && /* @__PURE__ */ f(e, {
|
|
218
|
-
variant: "outline",
|
|
219
|
-
onClick: () => b("decline", _),
|
|
220
|
-
children: C.declineButton
|
|
221
|
-
}),
|
|
222
|
-
_.actions.recordPayment && /* @__PURE__ */ f(e, {
|
|
223
|
-
variant: "outline",
|
|
224
|
-
onClick: () => b("recordPayment", _),
|
|
225
|
-
children: C.recordPaymentButton
|
|
226
|
-
}),
|
|
227
|
-
_.actions.markPaid && /* @__PURE__ */ f(e, {
|
|
228
|
-
variant: "outline",
|
|
229
|
-
onClick: () => b("markPaid", _),
|
|
230
|
-
children: C.markPaidButton
|
|
231
|
-
}),
|
|
232
|
-
_.actions.markUncollectible && /* @__PURE__ */ f(e, {
|
|
233
|
-
variant: "outline",
|
|
234
|
-
onClick: () => b("markUncollectible", _),
|
|
235
|
-
children: C.markUncollectibleButton
|
|
236
|
-
}),
|
|
237
|
-
_.actions.cancel && /* @__PURE__ */ f(e, {
|
|
238
|
-
variant: "outline",
|
|
239
|
-
onClick: () => b("cancel", _),
|
|
240
|
-
children: C.cancelButton
|
|
241
|
-
}),
|
|
242
|
-
_.actions.clone && /* @__PURE__ */ f(e, {
|
|
243
|
-
variant: "outline",
|
|
244
|
-
onClick: () => b("clone", _),
|
|
245
|
-
children: C.cloneButton
|
|
246
|
-
}),
|
|
247
|
-
_.actions.delete && /* @__PURE__ */ f(e, {
|
|
248
|
-
variant: "destructive",
|
|
249
|
-
onClick: () => b("delete", _),
|
|
250
|
-
children: C.deleteButton
|
|
251
|
-
}),
|
|
252
|
-
/* @__PURE__ */ f(e, {
|
|
253
|
-
variant: "ghost",
|
|
254
|
-
onClick: x,
|
|
255
|
-
children: C.closeButton
|
|
256
|
-
})
|
|
257
|
-
]
|
|
258
|
-
}) })
|
|
259
|
-
]
|
|
260
|
-
})
|
|
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
|
+
]
|
|
261
45
|
});
|
|
262
46
|
}
|
|
263
47
|
//#endregion
|
|
264
|
-
export {
|
|
48
|
+
export { i as ReceivableFormTotals };
|