@tesouro/embedded-components-react 0.5.268 → 0.5.270
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/dist/index.css +4 -10
- package/dist/index.d.ts +13 -9
- package/dist/lib/ReceivablesWidget.d.ts +13 -9
- package/dist/libs/tesouro-embedded-components-react/counterparts-widget/feature/dist/index.js +3 -1
- package/dist/libs/tesouro-embedded-components-react/counterparts-widget/feature/dist/lib/CounterpartsWidget/CounterpartDetailsContainer.js +44 -0
- package/dist/libs/tesouro-embedded-components-react/counterparts-widget/feature/dist/lib/CounterpartsWidget/useCounterpartDetailsSheetView.js +97 -0
- package/dist/libs/tesouro-embedded-components-react/counterparts-widget/feature/dist/lib/CounterpartsWidget/useCounterpartsWidget.js +76 -150
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/ReceivablesWidget.js +63 -57
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/actionsModal.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/auditHistory/labels.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/details.js +161 -152
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/helpers.js +30 -34
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/labels.js +12 -8
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/statusCards.js +18 -19
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/useReceivableActions.js +208 -158
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/useReceivableDetails.js +91 -85
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/useReceivableForm.js +197 -196
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/useReceivablesWidget.js +147 -115
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index.js +14 -14
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index13.js +3 -5
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index14.js +37 -34
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index22.js +22 -7
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index23.js +17 -15
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index24.js +17 -13
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index26.js +37 -31
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index27.js +29 -23
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index29.js +38 -11
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index30.js +26 -28
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index31.js +20 -14
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index32.js +8 -24
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index33.js +34 -83
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index34.js +14 -404
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index35.js +28 -2
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index36.js +79 -39
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index37.js +490 -68
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index38.js +2 -502
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index39.js +41 -216
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index40.js +70 -21
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index41.js +484 -5
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index42.js +224 -0
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index43.js +21 -263
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index44.js +8 -2
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index46.js +261 -24
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index47.js +2 -237
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index48.js +100 -3
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index49.js +21 -242
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index50.js +226 -82
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index51.js +3 -59
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index52.js +233 -178
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index53.js +85 -37
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index54.js +60 -0
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index55.js +194 -0
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index56.js +45 -0
- 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/index45.js +0 -100
|
@@ -1,406 +1,16 @@
|
|
|
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 c, SheetTitle as l, Spinner as te, Tooltip as u, TooltipContent as d, TooltipProvider as f, TooltipTrigger as p, cn as m } from "../../../../../packages/shared-ui-shadcn/dist/index.js";
|
|
2
|
-
import { ErrorState as h } from "../../../shared/ui/dist/lib/ErrorState/ErrorState.js";
|
|
3
|
-
import "../../../shared/ui/dist/index.js";
|
|
4
|
-
import { RECEIVABLE_DETAILS_PANEL_LABELS_EN as g } from "./index13.js";
|
|
5
|
-
import { ReceivableStatusBadge as _ } from "./index22.js";
|
|
6
|
-
import { RECEIVABLE_DETAILS_SECTION as v } from "./index25.js";
|
|
7
|
-
import { ACTION_ICON as y, ACTION_LABEL_KEY as b, STATUS_ICON as x, amountValueToneClass as S, headerIconButtonClass as C } from "./index23.js";
|
|
8
|
-
import { AmountCell as w } from "./index24.js";
|
|
9
|
-
import { AttachmentsItem as ne } from "./index26.js";
|
|
10
|
-
import { AuditHistoryItem as re } from "./index27.js";
|
|
11
|
-
import { CloseButton as T } from "./index28.js";
|
|
12
|
-
import { InfoRow as E } from "./index29.js";
|
|
13
|
-
import { OverflowMenu as ie } from "./index30.js";
|
|
14
|
-
import { SeriesStatusChip as ae } from "./index32.js";
|
|
15
|
-
import { ScheduledInvoicesTable as D } from "./index33.js";
|
|
16
|
-
import { Fragment as O, jsx as k, jsxs as A } from "react/jsx-runtime";
|
|
17
|
-
import { ChevronLeft as j, CircleAlert as M, EyeIcon as N, Repeat as P } from "lucide-react";
|
|
18
1
|
//#region ../../libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index34.js
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
variant: r ? "default" : "outline",
|
|
33
|
-
onClick: () => V(e, L),
|
|
34
|
-
children: [/* @__PURE__ */ k(n, { className: "ttw:size-4" }), X(e)]
|
|
35
|
-
}, e);
|
|
36
|
-
})
|
|
37
|
-
}) : null;
|
|
38
|
-
return /* @__PURE__ */ k(o, {
|
|
39
|
-
open: F,
|
|
40
|
-
onOpenChange: I,
|
|
41
|
-
children: /* @__PURE__ */ A(ee, {
|
|
42
|
-
showCloseButton: !1,
|
|
43
|
-
className: "ttw:w-180 ttw:overflow-y-auto ttw:p-0 ttw:sm:max-w-180",
|
|
44
|
-
children: [Y || z || !L ? /* @__PURE__ */ k(T, {
|
|
45
|
-
label: q.closeButton,
|
|
46
|
-
onClose: H,
|
|
47
|
-
className: m(C, "ttw:absolute ttw:right-4 ttw:top-4 ttw:z-10")
|
|
48
|
-
}) : null, Y ? /* @__PURE__ */ A("div", {
|
|
49
|
-
className: "ttw:p-6",
|
|
50
|
-
children: [/* @__PURE__ */ A(c, {
|
|
51
|
-
className: "ttw:sr-only",
|
|
52
|
-
children: [/* @__PURE__ */ k(l, { children: Y.title }), /* @__PURE__ */ k(s, { children: q.hiddenDescription })]
|
|
53
|
-
}), /* @__PURE__ */ k(h, {
|
|
54
|
-
title: Y.title,
|
|
55
|
-
description: Y.description
|
|
56
|
-
})]
|
|
57
|
-
}) : z || !L || !J ? /* @__PURE__ */ A(c, {
|
|
58
|
-
className: "ttw:p-6",
|
|
59
|
-
children: [/* @__PURE__ */ k(l, { children: q.loadingTitle }), /* @__PURE__ */ k(s, {
|
|
60
|
-
className: "ttw:sr-only",
|
|
61
|
-
children: q.hiddenDescription
|
|
62
|
-
})]
|
|
63
|
-
}) : /* @__PURE__ */ A(O, { children: [
|
|
64
|
-
J.seriesLink ? /* @__PURE__ */ k("div", {
|
|
65
|
-
className: "ttw:border-b ttw:border-border ttw:px-6 ttw:py-3",
|
|
66
|
-
children: /* @__PURE__ */ A("button", {
|
|
67
|
-
type: "button",
|
|
68
|
-
onClick: J.seriesLink.onOpen,
|
|
69
|
-
className: "ttw:flex ttw:items-center ttw:gap-1 ttw:text-sm ttw:text-primary ttw:hover:underline",
|
|
70
|
-
children: [/* @__PURE__ */ k(j, {
|
|
71
|
-
className: "ttw:size-4",
|
|
72
|
-
"aria-hidden": "true"
|
|
73
|
-
}), J.seriesLink.backLabel]
|
|
74
|
-
})
|
|
75
|
-
}) : null,
|
|
76
|
-
/* @__PURE__ */ A(c, {
|
|
77
|
-
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",
|
|
78
|
-
children: [/* @__PURE__ */ A("div", {
|
|
79
|
-
className: "ttw:flex ttw:flex-col ttw:gap-0.5",
|
|
80
|
-
children: [
|
|
81
|
-
/* @__PURE__ */ k(l, {
|
|
82
|
-
className: "ttw:text-xl ttw:font-semibold ttw:text-foreground",
|
|
83
|
-
children: L.title
|
|
84
|
-
}),
|
|
85
|
-
J.subtitle ? /* @__PURE__ */ k("p", {
|
|
86
|
-
className: "ttw:text-sm ttw:text-muted-foreground",
|
|
87
|
-
children: J.subtitle
|
|
88
|
-
}) : null,
|
|
89
|
-
/* @__PURE__ */ k(s, {
|
|
90
|
-
className: "ttw:sr-only",
|
|
91
|
-
children: q.hiddenDescription
|
|
92
|
-
})
|
|
93
|
-
]
|
|
94
|
-
}), /* @__PURE__ */ k(f, {
|
|
95
|
-
delayDuration: 500,
|
|
96
|
-
children: /* @__PURE__ */ A("div", {
|
|
97
|
-
className: "ttw:flex ttw:items-center ttw:gap-1.5",
|
|
98
|
-
children: [
|
|
99
|
-
L.pdfUrl ? /* @__PURE__ */ A(u, { children: [/* @__PURE__ */ k(p, {
|
|
100
|
-
asChild: !0,
|
|
101
|
-
children: /* @__PURE__ */ k(a, {
|
|
102
|
-
asChild: !0,
|
|
103
|
-
variant: "ghost",
|
|
104
|
-
size: "icon",
|
|
105
|
-
className: C,
|
|
106
|
-
children: /* @__PURE__ */ k("a", {
|
|
107
|
-
href: L.pdfUrl,
|
|
108
|
-
target: "_blank",
|
|
109
|
-
rel: "noreferrer",
|
|
110
|
-
"aria-label": q.viewPdfButton,
|
|
111
|
-
children: /* @__PURE__ */ k(N, { className: "ttw:size-4" })
|
|
112
|
-
})
|
|
113
|
-
})
|
|
114
|
-
}), /* @__PURE__ */ k(d, { children: q.viewPdfButton })] }) : null,
|
|
115
|
-
J.overflowActions.length > 0 ? /* @__PURE__ */ k(ie, {
|
|
116
|
-
actions: J.overflowActions,
|
|
117
|
-
triggerLabel: q.moreActionsLabel,
|
|
118
|
-
getActionLabel: X,
|
|
119
|
-
onSelect: (e) => V(e, L),
|
|
120
|
-
disabledActions: G,
|
|
121
|
-
className: C
|
|
122
|
-
}) : null,
|
|
123
|
-
/* @__PURE__ */ A(u, { children: [/* @__PURE__ */ k(p, {
|
|
124
|
-
asChild: !0,
|
|
125
|
-
children: /* @__PURE__ */ k(T, {
|
|
126
|
-
label: q.closeButton,
|
|
127
|
-
onClose: H,
|
|
128
|
-
className: C
|
|
129
|
-
})
|
|
130
|
-
}), /* @__PURE__ */ k(d, { children: q.closeButton })] })
|
|
131
|
-
]
|
|
132
|
-
})
|
|
133
|
-
})]
|
|
134
|
-
}),
|
|
135
|
-
/* @__PURE__ */ A("div", {
|
|
136
|
-
className: "ttw:flex ttw:flex-col",
|
|
137
|
-
children: [/* @__PURE__ */ k("div", {
|
|
138
|
-
className: "ttw:px-6",
|
|
139
|
-
children: Q ? /* @__PURE__ */ A("div", {
|
|
140
|
-
className: "ttw:flex ttw:flex-col ttw:gap-3 ttw:rounded-lg ttw:bg-violet-50 ttw:p-4 ttw:dark:bg-violet-950",
|
|
141
|
-
children: [
|
|
142
|
-
/* @__PURE__ */ A("div", {
|
|
143
|
-
className: "ttw:flex ttw:flex-col ttw:gap-0.5",
|
|
144
|
-
children: [/* @__PURE__ */ k("span", {
|
|
145
|
-
className: "ttw:text-xs ttw:text-muted-foreground",
|
|
146
|
-
children: q.recurringAmountCaption
|
|
147
|
-
}), /* @__PURE__ */ A("div", {
|
|
148
|
-
className: "ttw:flex ttw:items-baseline ttw:gap-1.5",
|
|
149
|
-
children: [/* @__PURE__ */ k("span", {
|
|
150
|
-
className: m("ttw:text-2xl ttw:font-semibold", S[J.amountTone]),
|
|
151
|
-
children: Q.amountLabel
|
|
152
|
-
}), /* @__PURE__ */ k("span", {
|
|
153
|
-
className: "ttw:text-sm ttw:text-muted-foreground",
|
|
154
|
-
children: Q.amountPeriodLabel
|
|
155
|
-
})]
|
|
156
|
-
})]
|
|
157
|
-
}),
|
|
158
|
-
/* @__PURE__ */ A("div", {
|
|
159
|
-
className: "ttw:flex ttw:items-center ttw:gap-2",
|
|
160
|
-
children: [/* @__PURE__ */ A(i, {
|
|
161
|
-
variant: "outline",
|
|
162
|
-
className: "ttw:gap-1 ttw:border-violet-200 ttw:bg-violet-50 ttw:text-violet-700",
|
|
163
|
-
children: [/* @__PURE__ */ k(P, { className: "ttw:size-3" }), q.recurringBadge]
|
|
164
|
-
}), /* @__PURE__ */ k(ae, {
|
|
165
|
-
label: Q.statusLabel,
|
|
166
|
-
tone: Q.statusTone,
|
|
167
|
-
icon: Q.statusIcon
|
|
168
|
-
})]
|
|
169
|
-
}),
|
|
170
|
-
/* @__PURE__ */ A("div", {
|
|
171
|
-
className: "ttw:flex ttw:gap-12 ttw:text-sm",
|
|
172
|
-
children: [/* @__PURE__ */ A("div", {
|
|
173
|
-
className: "ttw:flex ttw:flex-col ttw:gap-0.5",
|
|
174
|
-
children: [/* @__PURE__ */ k("span", {
|
|
175
|
-
className: "ttw:text-xs ttw:text-muted-foreground",
|
|
176
|
-
children: q.startsOnCaption
|
|
177
|
-
}), /* @__PURE__ */ k("span", {
|
|
178
|
-
className: "ttw:text-foreground",
|
|
179
|
-
children: Q.startsOnLabel
|
|
180
|
-
})]
|
|
181
|
-
}), /* @__PURE__ */ A("div", {
|
|
182
|
-
className: "ttw:flex ttw:flex-col ttw:gap-0.5",
|
|
183
|
-
children: [/* @__PURE__ */ k("span", {
|
|
184
|
-
className: "ttw:text-xs ttw:text-muted-foreground",
|
|
185
|
-
children: q.endsOnCaption
|
|
186
|
-
}), /* @__PURE__ */ k("span", {
|
|
187
|
-
className: "ttw:text-foreground",
|
|
188
|
-
children: Q.endsOnLabel
|
|
189
|
-
})]
|
|
190
|
-
})]
|
|
191
|
-
}),
|
|
192
|
-
$
|
|
193
|
-
]
|
|
194
|
-
}) : /* @__PURE__ */ A("div", {
|
|
195
|
-
className: m("ttw:flex ttw:flex-col ttw:gap-3 ttw:rounded-lg ttw:bg-muted ttw:p-4", oe && "ttw:border ttw:border-red-200"),
|
|
196
|
-
children: [
|
|
197
|
-
/* @__PURE__ */ k("div", {
|
|
198
|
-
className: "ttw:flex ttw:flex-row ttw:flex-wrap ttw:gap-x-12 ttw:gap-y-2",
|
|
199
|
-
children: J.amountRows.map((e) => /* @__PURE__ */ k(w, {
|
|
200
|
-
row: e,
|
|
201
|
-
defaultTone: J.amountTone
|
|
202
|
-
}, e.label))
|
|
203
|
-
}),
|
|
204
|
-
/* @__PURE__ */ A("div", {
|
|
205
|
-
className: "ttw:flex ttw:items-center ttw:gap-2",
|
|
206
|
-
children: [J.overdueLabel ? /* @__PURE__ */ A("span", {
|
|
207
|
-
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",
|
|
208
|
-
children: [/* @__PURE__ */ k(M, { className: "ttw:size-3" }), J.overdueLabel]
|
|
209
|
-
}) : /* @__PURE__ */ k(_, {
|
|
210
|
-
label: J.statusLabel,
|
|
211
|
-
tone: L.statusTone,
|
|
212
|
-
icon: Z ? /* @__PURE__ */ k(Z, { className: "ttw:size-3" }) : void 0
|
|
213
|
-
}), J.recurring ? /* @__PURE__ */ A(i, {
|
|
214
|
-
variant: "outline",
|
|
215
|
-
className: "ttw:gap-1 ttw:border-violet-200 ttw:bg-violet-50 ttw:text-violet-700",
|
|
216
|
-
children: [/* @__PURE__ */ k(P, { className: "ttw:size-3" }), q.recurringBadge]
|
|
217
|
-
}) : null]
|
|
218
|
-
}),
|
|
219
|
-
/* @__PURE__ */ A("div", {
|
|
220
|
-
className: "ttw:flex ttw:gap-12 ttw:text-sm",
|
|
221
|
-
children: [/* @__PURE__ */ A("div", {
|
|
222
|
-
className: "ttw:flex ttw:flex-col ttw:gap-0.5",
|
|
223
|
-
children: [/* @__PURE__ */ k("span", {
|
|
224
|
-
className: "ttw:text-xs ttw:text-muted-foreground",
|
|
225
|
-
children: q.invoiceDateCaption
|
|
226
|
-
}), /* @__PURE__ */ k("span", {
|
|
227
|
-
className: "ttw:text-foreground",
|
|
228
|
-
children: J.issueDateLabel
|
|
229
|
-
})]
|
|
230
|
-
}), /* @__PURE__ */ A("div", {
|
|
231
|
-
className: "ttw:flex ttw:flex-col ttw:gap-0.5",
|
|
232
|
-
children: [/* @__PURE__ */ k("span", {
|
|
233
|
-
className: "ttw:text-xs ttw:text-muted-foreground",
|
|
234
|
-
children: J.dueDateCaption
|
|
235
|
-
}), /* @__PURE__ */ k("span", {
|
|
236
|
-
className: "ttw:text-foreground",
|
|
237
|
-
children: J.dueDateLabel
|
|
238
|
-
})]
|
|
239
|
-
})]
|
|
240
|
-
}),
|
|
241
|
-
$
|
|
242
|
-
]
|
|
243
|
-
})
|
|
244
|
-
}), /* @__PURE__ */ A("div", {
|
|
245
|
-
className: "ttw:px-6",
|
|
246
|
-
children: [
|
|
247
|
-
J.paymentHistory ? /* @__PURE__ */ A("section", {
|
|
248
|
-
"aria-label": q.paymentHistoryHeading,
|
|
249
|
-
className: "ttw:border-b ttw:py-4",
|
|
250
|
-
children: [/* @__PURE__ */ k("h3", {
|
|
251
|
-
className: "ttw:mb-3 ttw:text-sm ttw:font-medium",
|
|
252
|
-
children: q.paymentHistoryHeading
|
|
253
|
-
}), J.paymentHistory.isLoading ? /* @__PURE__ */ k("div", {
|
|
254
|
-
className: "ttw:flex ttw:py-2",
|
|
255
|
-
children: /* @__PURE__ */ k(te, {
|
|
256
|
-
className: "ttw:size-5",
|
|
257
|
-
"aria-label": q.paymentHistoryLoading
|
|
258
|
-
})
|
|
259
|
-
}) : J.paymentHistory.rows.length === 0 ? /* @__PURE__ */ k("p", {
|
|
260
|
-
className: m("ttw:text-sm", J.paymentHistory.emptyTone === "danger" ? "ttw:text-red-600" : "ttw:text-muted-foreground"),
|
|
261
|
-
children: q.paymentHistoryEmpty
|
|
262
|
-
}) : /* @__PURE__ */ A("div", {
|
|
263
|
-
className: "ttw:flex ttw:flex-col",
|
|
264
|
-
children: [J.paymentHistory.rows.map((e) => /* @__PURE__ */ A("div", {
|
|
265
|
-
className: "ttw:flex ttw:justify-between ttw:border-b ttw:border-border ttw:py-2 ttw:text-sm",
|
|
266
|
-
children: [/* @__PURE__ */ k("span", { children: e.dateLabel }), /* @__PURE__ */ k("span", { children: e.amountLabel })]
|
|
267
|
-
}, e.id)), /* @__PURE__ */ A("div", {
|
|
268
|
-
className: "ttw:flex ttw:justify-between ttw:py-2 ttw:text-sm ttw:font-medium",
|
|
269
|
-
children: [/* @__PURE__ */ k("span", { children: q.paymentHistoryTotalLabel }), /* @__PURE__ */ k("span", { children: J.paymentHistory.totalLabel })]
|
|
270
|
-
})]
|
|
271
|
-
})]
|
|
272
|
-
}) : null,
|
|
273
|
-
J.customerContact.length > 0 ? /* @__PURE__ */ A("section", {
|
|
274
|
-
"aria-label": q.customerDetailsHeading,
|
|
275
|
-
className: "ttw:border-b ttw:py-4",
|
|
276
|
-
children: [/* @__PURE__ */ k("h3", {
|
|
277
|
-
className: "ttw:mb-3 ttw:text-sm ttw:font-medium",
|
|
278
|
-
children: q.customerDetailsHeading
|
|
279
|
-
}), /* @__PURE__ */ k("div", {
|
|
280
|
-
className: "ttw:flex ttw:flex-col",
|
|
281
|
-
children: J.customerContact.map((e) => /* @__PURE__ */ k(E, { ...e }, e.label))
|
|
282
|
-
})]
|
|
283
|
-
}) : null,
|
|
284
|
-
/* @__PURE__ */ A(e, {
|
|
285
|
-
type: "multiple",
|
|
286
|
-
value: U,
|
|
287
|
-
onValueChange: W,
|
|
288
|
-
className: "ttw:w-full",
|
|
289
|
-
children: [
|
|
290
|
-
/* @__PURE__ */ A(n, {
|
|
291
|
-
value: v.billing,
|
|
292
|
-
children: [/* @__PURE__ */ k(r, { children: q.billingHeading }), /* @__PURE__ */ k(t, { children: /* @__PURE__ */ A("div", {
|
|
293
|
-
className: "ttw:flex ttw:flex-col",
|
|
294
|
-
children: [J.billingItems.map((e) => /* @__PURE__ */ k(E, { ...e }, e.label)), J.seriesLink ? /* @__PURE__ */ A("div", {
|
|
295
|
-
className: "ttw:flex ttw:gap-4 ttw:border-b ttw:border-border ttw:py-3 ttw:text-sm ttw:last:border-b-0",
|
|
296
|
-
children: [/* @__PURE__ */ k("span", {
|
|
297
|
-
className: "ttw:w-40 ttw:shrink-0 ttw:text-muted-foreground",
|
|
298
|
-
children: q.recurringSeriesRowLabel
|
|
299
|
-
}), /* @__PURE__ */ k("button", {
|
|
300
|
-
type: "button",
|
|
301
|
-
onClick: J.seriesLink.onOpen,
|
|
302
|
-
className: "ttw:text-left ttw:text-primary ttw:hover:underline",
|
|
303
|
-
children: J.seriesLink.title
|
|
304
|
-
})]
|
|
305
|
-
}) : null]
|
|
306
|
-
}) })]
|
|
307
|
-
}),
|
|
308
|
-
J.lineItemsSection ? /* @__PURE__ */ A(n, {
|
|
309
|
-
value: v.lineItems,
|
|
310
|
-
children: [/* @__PURE__ */ k(r, { children: /* @__PURE__ */ A("span", {
|
|
311
|
-
className: "ttw:flex ttw:items-center ttw:gap-2",
|
|
312
|
-
children: [q.lineItemsHeading, /* @__PURE__ */ k(i, {
|
|
313
|
-
variant: "secondary",
|
|
314
|
-
className: "ttw:rounded-full",
|
|
315
|
-
children: J.lineItemsSection.countLabel
|
|
316
|
-
})]
|
|
317
|
-
}) }), /* @__PURE__ */ k(t, { children: /* @__PURE__ */ A("div", {
|
|
318
|
-
className: "ttw:flex ttw:flex-col ttw:text-sm",
|
|
319
|
-
children: [L.lineItems.length === 0 ? /* @__PURE__ */ k("p", {
|
|
320
|
-
className: "ttw:py-3 ttw:text-muted-foreground",
|
|
321
|
-
children: q.noLineItems
|
|
322
|
-
}) : L.lineItems.map((e) => /* @__PURE__ */ A("div", {
|
|
323
|
-
className: "ttw:flex ttw:items-start ttw:justify-between ttw:border-b ttw:border-border ttw:py-3",
|
|
324
|
-
children: [/* @__PURE__ */ A("div", {
|
|
325
|
-
className: "ttw:flex ttw:flex-col",
|
|
326
|
-
children: [/* @__PURE__ */ k("span", {
|
|
327
|
-
className: "ttw:font-medium",
|
|
328
|
-
children: e.name
|
|
329
|
-
}), /* @__PURE__ */ A("span", {
|
|
330
|
-
className: "ttw:text-muted-foreground",
|
|
331
|
-
children: [
|
|
332
|
-
e.quantityLabel,
|
|
333
|
-
" ",
|
|
334
|
-
q.lineItemMultiplier,
|
|
335
|
-
" ",
|
|
336
|
-
e.unitPriceLabel,
|
|
337
|
-
" ",
|
|
338
|
-
q.lineItemEaLabel
|
|
339
|
-
]
|
|
340
|
-
})]
|
|
341
|
-
}), /* @__PURE__ */ k("span", { children: e.totalLabel })]
|
|
342
|
-
}, e.id)), J.lineItemsSection.totals.length > 0 ? /* @__PURE__ */ k("div", {
|
|
343
|
-
className: "ttw:flex ttw:flex-col ttw:gap-1 ttw:py-3",
|
|
344
|
-
children: J.lineItemsSection.totals.map((e) => /* @__PURE__ */ A("div", {
|
|
345
|
-
className: m("ttw:flex ttw:justify-between", e.emphasis && "ttw:font-medium"),
|
|
346
|
-
children: [/* @__PURE__ */ k("span", { children: e.label }), /* @__PURE__ */ k("span", { children: e.value })]
|
|
347
|
-
}, e.label))
|
|
348
|
-
}) : null]
|
|
349
|
-
}) })]
|
|
350
|
-
}) : null,
|
|
351
|
-
J.notes ? /* @__PURE__ */ A(n, {
|
|
352
|
-
value: v.notes,
|
|
353
|
-
children: [/* @__PURE__ */ k(r, { children: /* @__PURE__ */ A("span", {
|
|
354
|
-
className: "ttw:flex ttw:items-center ttw:gap-2",
|
|
355
|
-
children: [q.notesHeading, /* @__PURE__ */ k(i, {
|
|
356
|
-
variant: "secondary",
|
|
357
|
-
className: "ttw:rounded-full",
|
|
358
|
-
children: J.notes.countLabel
|
|
359
|
-
})]
|
|
360
|
-
}) }), /* @__PURE__ */ k(t, { children: /* @__PURE__ */ A("div", {
|
|
361
|
-
className: "ttw:flex ttw:flex-col ttw:gap-3 ttw:text-sm",
|
|
362
|
-
children: [J.notes.opening ? /* @__PURE__ */ A("div", { children: [/* @__PURE__ */ k("p", {
|
|
363
|
-
className: "ttw:mb-1 ttw:font-medium",
|
|
364
|
-
children: q.notesOpeningLabel
|
|
365
|
-
}), /* @__PURE__ */ k("p", {
|
|
366
|
-
className: "ttw:text-muted-foreground",
|
|
367
|
-
children: J.notes.opening
|
|
368
|
-
})] }) : null, J.notes.closing ? /* @__PURE__ */ A("div", { children: [/* @__PURE__ */ k("p", {
|
|
369
|
-
className: "ttw:mb-1 ttw:font-medium",
|
|
370
|
-
children: q.notesClosingLabel
|
|
371
|
-
}), /* @__PURE__ */ k("p", {
|
|
372
|
-
className: "ttw:text-muted-foreground",
|
|
373
|
-
children: J.notes.closing
|
|
374
|
-
})] }) : null]
|
|
375
|
-
}) })]
|
|
376
|
-
}) : null,
|
|
377
|
-
/* @__PURE__ */ k(ne, {
|
|
378
|
-
attachments: J.attachments,
|
|
379
|
-
labels: q
|
|
380
|
-
}),
|
|
381
|
-
/* @__PURE__ */ k(re, {
|
|
382
|
-
auditHistory: J.auditHistory,
|
|
383
|
-
labels: q
|
|
384
|
-
})
|
|
385
|
-
]
|
|
386
|
-
}),
|
|
387
|
-
Q ? /* @__PURE__ */ A("section", {
|
|
388
|
-
"aria-label": Q.scheduleTitle,
|
|
389
|
-
className: "ttw:border-t ttw:border-border ttw:py-4",
|
|
390
|
-
children: [/* @__PURE__ */ k("h3", {
|
|
391
|
-
className: "ttw:mb-3 ttw:text-sm ttw:font-medium",
|
|
392
|
-
children: Q.scheduleTitle
|
|
393
|
-
}), /* @__PURE__ */ k(D, {
|
|
394
|
-
rows: Q.schedule,
|
|
395
|
-
labels: q
|
|
396
|
-
})]
|
|
397
|
-
}) : null
|
|
398
|
-
]
|
|
399
|
-
})]
|
|
400
|
-
})
|
|
401
|
-
] })]
|
|
402
|
-
})
|
|
403
|
-
});
|
|
404
|
-
}
|
|
2
|
+
var e = {
|
|
3
|
+
neutral: "ttw:bg-muted ttw:text-muted-foreground",
|
|
4
|
+
info: "ttw:bg-indigo-100 ttw:text-indigo-700",
|
|
5
|
+
warning: "ttw:bg-yellow-100 ttw:text-yellow-700",
|
|
6
|
+
danger: "ttw:bg-destructive/10 ttw:text-destructive",
|
|
7
|
+
success: "ttw:bg-green-100 ttw:text-green-700"
|
|
8
|
+
}, t = {
|
|
9
|
+
neutral: "ttw:bg-muted-foreground",
|
|
10
|
+
info: "ttw:bg-indigo-700",
|
|
11
|
+
warning: "ttw:bg-yellow-700",
|
|
12
|
+
danger: "ttw:bg-destructive",
|
|
13
|
+
success: "ttw:bg-green-700"
|
|
14
|
+
};
|
|
405
15
|
//#endregion
|
|
406
|
-
export {
|
|
16
|
+
export { e as RECURRENCE_CHIP_CLASS, t as RECURRENCE_DOT_CLASS };
|
|
@@ -1,2 +1,28 @@
|
|
|
1
|
-
import "
|
|
2
|
-
import "./
|
|
1
|
+
import { Badge as e, cn as t } from "../../../../../packages/shared-ui-shadcn/dist/index.js";
|
|
2
|
+
import { SERIES_STATUS_ICON as n } from "./index23.js";
|
|
3
|
+
import { RECURRENCE_CHIP_CLASS as r, RECURRENCE_DOT_CLASS as i } from "./index34.js";
|
|
4
|
+
import { jsx as a, jsxs as o } from "react/jsx-runtime";
|
|
5
|
+
//#region ../../libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index35.js
|
|
6
|
+
function s({ label: i, tone: s, icon: c }) {
|
|
7
|
+
let l = c ? n[c] : void 0;
|
|
8
|
+
return /* @__PURE__ */ o(e, {
|
|
9
|
+
variant: "outline",
|
|
10
|
+
className: t("ttw:inline-flex ttw:items-center ttw:gap-1 ttw:border-transparent", r[s]),
|
|
11
|
+
children: [l ? /* @__PURE__ */ a(l, {
|
|
12
|
+
className: "ttw:size-3",
|
|
13
|
+
"aria-hidden": !0
|
|
14
|
+
}) : null, i]
|
|
15
|
+
});
|
|
16
|
+
}
|
|
17
|
+
function c({ label: n, tone: s }) {
|
|
18
|
+
return /* @__PURE__ */ o(e, {
|
|
19
|
+
variant: "outline",
|
|
20
|
+
className: t("ttw:inline-flex ttw:items-center ttw:gap-1 ttw:border-transparent", r[s]),
|
|
21
|
+
children: [/* @__PURE__ */ a("span", {
|
|
22
|
+
"aria-hidden": !0,
|
|
23
|
+
className: t("ttw:inline-block ttw:size-2 ttw:rounded-full", i[s])
|
|
24
|
+
}), n]
|
|
25
|
+
});
|
|
26
|
+
}
|
|
27
|
+
//#endregion
|
|
28
|
+
export { c as IterationStatusChip, s as SeriesStatusChip };
|
|
@@ -1,48 +1,88 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
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 "./index22.js";
|
|
3
|
+
import { IterationStatusChip as i } from "./index35.js";
|
|
4
|
+
import { jsx as a, jsxs as o } from "react/jsx-runtime";
|
|
5
|
+
import { ChevronRight as s } from "lucide-react";
|
|
3
6
|
//#region ../../libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index36.js
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
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"
|
|
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
|
|
23
20
|
}),
|
|
24
|
-
/* @__PURE__ */
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
21
|
+
/* @__PURE__ */ a("th", {
|
|
22
|
+
scope: "col",
|
|
23
|
+
className: c,
|
|
24
|
+
children: d.scheduleAmountColumn
|
|
28
25
|
}),
|
|
29
|
-
/* @__PURE__ */
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
26
|
+
/* @__PURE__ */ a("th", {
|
|
27
|
+
scope: "col",
|
|
28
|
+
className: c,
|
|
29
|
+
children: d.scheduleStatusColumn
|
|
33
30
|
}),
|
|
34
|
-
/* @__PURE__ */
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
31
|
+
/* @__PURE__ */ a("th", {
|
|
32
|
+
scope: "col",
|
|
33
|
+
className: c,
|
|
34
|
+
children: d.scheduleNumberColumn
|
|
38
35
|
}),
|
|
39
|
-
/* @__PURE__ */
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
className: "ttw:text-lg ttw:font-medium"
|
|
36
|
+
/* @__PURE__ */ a("th", {
|
|
37
|
+
className: "ttw:h-10 ttw:w-6 ttw:pl-2",
|
|
38
|
+
"aria-hidden": "true"
|
|
43
39
|
})
|
|
44
|
-
]
|
|
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, {
|
|
77
|
+
className: "ttw:size-4",
|
|
78
|
+
"aria-hidden": "true"
|
|
79
|
+
})
|
|
80
|
+
}) : null
|
|
81
|
+
})
|
|
82
|
+
]
|
|
83
|
+
}, t.id);
|
|
84
|
+
}) })]
|
|
45
85
|
});
|
|
46
86
|
}
|
|
47
87
|
//#endregion
|
|
48
|
-
export {
|
|
88
|
+
export { u as ScheduledInvoicesTable };
|