@tesouro/embedded-components-react 0.11.205 → 0.11.209
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/experimental/BalanceHistoryWidget.d.ts +1 -1
- package/dist/experimental/index.d.ts +1 -1
- package/dist/index.css +13 -126
- package/dist/index.d.ts +7 -6
- package/dist/lib/ReceivablesWidget.d.ts +6 -5
- package/dist/lib/WidgetSuite.d.ts +7 -6
- package/dist/libs/tesouro-embedded-components-react/balance-history-widget/feature/dist/lib/BalanceHistoryWidget/labels.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/ReceivableAttachmentsSection.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/ReceivableCustomerSection.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/ReceivablesWidget.js +16 -18
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/details.js +186 -239
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/helpers.js +59 -52
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/labels.js +5 -4
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/paymentRecord.js +5 -5
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/paymentTerms.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/preview.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/recurrence.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/recurringSeries.js +19 -23
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/reminders.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/statusColors.js +34 -0
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/useReceivableActions.js +2 -6
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/useReceivableActionsModal.js +5 -1
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/useReceivableDetails.js +16 -16
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/useReceivableForm.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/useReceivablePaymentRecord.js +1 -2
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/useReceivablesTable.js +2 -0
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index.js +28 -27
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index11.js +18 -120
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index12.js +89 -84
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index13.js +91 -36
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index14.js +41 -2
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index15.js +2 -12
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index16.js +9 -9
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index17.js +9 -25
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index18.js +26 -208
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index19.js +209 -52
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index20.js +50 -208
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index21.js +186 -138
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index22.js +157 -12
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index23.js +10 -19
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index24.js +23 -2
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index25.js +2 -116
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index26.js +117 -3
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index27.js +3 -198
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index28.js +198 -2
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index29.js +2 -54
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index30.js +14 -19
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index31.js +22 -8
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index32.js +40 -77
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index33.js +17 -37
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index34.js +8 -18
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index35.js +61 -38
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index36.js +27 -27
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index37.js +26 -15
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index38.js +14 -6
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index39.js +19 -35
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index40.js +31 -14
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index41.js +67 -24
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index42.js +391 -84
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index43.js +2 -494
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index44.js +47 -2
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index45.js +62 -38
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index46.js +433 -61
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index47.js +176 -428
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index48.js +20 -224
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index49.js +6 -21
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index51.js +264 -0
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index52.js +2 -264
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index53.js +131 -2
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index54.js +22 -126
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index55.js +235 -23
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index56.js +3 -239
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index57.js +247 -3
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index58.js +26 -244
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index59.js +183 -26
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index60.js +21 -194
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index61.js +143 -21
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index62.js +2 -143
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index63.js +47 -2
- package/dist/libs/tesouro-embedded-components-react/shared/document-status/ui/dist/index.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/shared/document-status/ui/dist/index7.js +2 -31
- package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/analytics/build-info.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/shared/product-catalog/feature/dist/lib/helpers.js +1 -1
- package/dist/packages/shared-ui-shadcn/dist/index.js +1554 -1544
- package/package.json +1 -1
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index50.js +0 -7
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index64.js +0 -47
|
@@ -1,88 +1,395 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import "../../../shared/
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
1
|
+
import { Accordion as e, AccordionContent as t, AccordionItem as n, Badge as r, Button as i, DisplayAmount as a, FormSheet as ee, Skeleton as o, Tooltip as s, TooltipContent as c, TooltipProvider as l, TooltipTrigger as u, Typography as d, cn as f } from "../../../../../packages/shared-ui-shadcn/dist/index.js";
|
|
2
|
+
import { LoadingRegion as p } from "../../../shared/ui/dist/lib/LoadingRegion/LoadingRegion.js";
|
|
3
|
+
import "../../../shared/ui/dist/index.js";
|
|
4
|
+
import { RECEIVABLE_DETAILS_PANEL_LABELS_EN as m } from "./index19.js";
|
|
5
|
+
import { StatusBadge as h } from "./index30.js";
|
|
6
|
+
import { RECEIVABLE_DETAILS_SECTION as g } from "./index34.js";
|
|
7
|
+
import { AmountCell as _ } from "./index31.js";
|
|
8
|
+
import { ACTION_LABEL_KEY as v, preventTooltipFocusOpen as y, sectionItemClass as b } from "./index32.js";
|
|
9
|
+
import { SectionTrigger as x } from "./index33.js";
|
|
10
|
+
import { AttachmentsItem as S } from "./index35.js";
|
|
11
|
+
import { AuditHistoryItem as C } from "./index36.js";
|
|
12
|
+
import { CustomerNameRow as w } from "./index37.js";
|
|
13
|
+
import { DetailsMessage as T } from "./index38.js";
|
|
14
|
+
import { InfoRow as E } from "./index39.js";
|
|
15
|
+
import { OverflowMenu as D } from "./index40.js";
|
|
16
|
+
import { ScheduledInvoicesTable as O } from "./index41.js";
|
|
17
|
+
import { jsx as k, jsxs as A } from "react/jsx-runtime";
|
|
18
|
+
import { ChevronLeft as j, EyeIcon as M } from "lucide-react";
|
|
7
19
|
// ../../libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index42.js
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
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
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
children:
|
|
72
|
-
variant: "ghost",
|
|
73
|
-
size: "icon",
|
|
74
|
-
className: "ttw:size-6",
|
|
75
|
-
"aria-label": t.openLabel,
|
|
76
|
-
onClick: c,
|
|
77
|
-
children: /* @__PURE__ */ a(s, {
|
|
78
|
-
className: "ttw:size-4",
|
|
79
|
-
"aria-hidden": "true"
|
|
80
|
-
})
|
|
81
|
-
}) : null
|
|
20
|
+
function N({ caption: e, value: t }) {
|
|
21
|
+
return /* @__PURE__ */ A("div", {
|
|
22
|
+
className: "ttw:flex ttw:flex-col ttw:gap-0.5",
|
|
23
|
+
children: [/* @__PURE__ */ k(d, {
|
|
24
|
+
variant: "caption",
|
|
25
|
+
color: "muted",
|
|
26
|
+
children: e
|
|
27
|
+
}), /* @__PURE__ */ k(d, {
|
|
28
|
+
component: "span",
|
|
29
|
+
variant: "body2",
|
|
30
|
+
children: t
|
|
31
|
+
})]
|
|
32
|
+
});
|
|
33
|
+
}
|
|
34
|
+
function P({ label: e }) {
|
|
35
|
+
return /* @__PURE__ */ A(p, {
|
|
36
|
+
isLoading: !0,
|
|
37
|
+
loadingLabel: e,
|
|
38
|
+
className: "ttw:flex ttw:flex-col ttw:gap-4 ttw:py-4",
|
|
39
|
+
children: [
|
|
40
|
+
/* @__PURE__ */ k(o, { className: "ttw:h-36 ttw:w-full ttw:rounded-lg" }),
|
|
41
|
+
/* @__PURE__ */ k(o, { className: "ttw:h-4 ttw:w-1/2" }),
|
|
42
|
+
/* @__PURE__ */ k(o, { className: "ttw:h-4 ttw:w-2/3" }),
|
|
43
|
+
/* @__PURE__ */ k(o, { className: "ttw:h-4 ttw:w-1/3" })
|
|
44
|
+
]
|
|
45
|
+
});
|
|
46
|
+
}
|
|
47
|
+
function F({ open: F, onOpenChange: I, details: L, message: R, isLoading: z, onActionClick: B, openSections: V, onOpenSectionsChange: H, disabledActions: U, labels: W }) {
|
|
48
|
+
let G = {
|
|
49
|
+
...m,
|
|
50
|
+
...W
|
|
51
|
+
}, K = L?.panel, q = !z && !R && !!(L && K), J = (e) => K?.actionLabels?.[e] ?? G[v[e]], Y = K?.recurringSeries, X = (e, t) => e && L ? /* @__PURE__ */ k(i, {
|
|
52
|
+
type: "button",
|
|
53
|
+
variant: t,
|
|
54
|
+
disabled: U?.includes(e),
|
|
55
|
+
onClick: () => B(e, L),
|
|
56
|
+
children: J(e)
|
|
57
|
+
}) : void 0, Z = q ? K?.summaryActions ?? [] : [], Q = X(Z.at(-1), "default"), $ = Z.length > 1 ? X(Z[0], "outline") : void 0, te = Q || $ ? /* @__PURE__ */ A("div", {
|
|
58
|
+
className: "ttw:flex ttw:flex-wrap ttw:items-center ttw:gap-2",
|
|
59
|
+
children: [$, Q]
|
|
60
|
+
}) : null, ne = q && L && K ? /* @__PURE__ */ A(l, {
|
|
61
|
+
delayDuration: 500,
|
|
62
|
+
children: [
|
|
63
|
+
K.headerActions.map((e) => /* @__PURE__ */ k(i, {
|
|
64
|
+
type: "button",
|
|
65
|
+
variant: "ghost",
|
|
66
|
+
size: "sm",
|
|
67
|
+
disabled: U?.includes(e),
|
|
68
|
+
onClick: () => B(e, L),
|
|
69
|
+
children: J(e)
|
|
70
|
+
}, e)),
|
|
71
|
+
L.pdfUrl ? /* @__PURE__ */ A(s, { children: [/* @__PURE__ */ k(u, {
|
|
72
|
+
asChild: !0,
|
|
73
|
+
onFocus: y,
|
|
74
|
+
children: /* @__PURE__ */ k(i, {
|
|
75
|
+
asChild: !0,
|
|
76
|
+
variant: "ghost",
|
|
77
|
+
size: "icon",
|
|
78
|
+
children: /* @__PURE__ */ k("a", {
|
|
79
|
+
href: L.pdfUrl,
|
|
80
|
+
target: "_blank",
|
|
81
|
+
rel: "noreferrer",
|
|
82
|
+
"aria-label": G.viewPdfButton,
|
|
83
|
+
children: /* @__PURE__ */ k(M, { className: "ttw:size-4" })
|
|
82
84
|
})
|
|
83
|
-
|
|
84
|
-
},
|
|
85
|
-
|
|
85
|
+
})
|
|
86
|
+
}), /* @__PURE__ */ k(c, { children: G.viewPdfButton })] }) : null,
|
|
87
|
+
K.overflowActions.length > 0 ? /* @__PURE__ */ k(D, {
|
|
88
|
+
actions: K.overflowActions,
|
|
89
|
+
triggerLabel: G.moreActionsLabel,
|
|
90
|
+
getActionLabel: J,
|
|
91
|
+
onSelect: (e) => B(e, L),
|
|
92
|
+
disabledActions: U
|
|
93
|
+
}) : null
|
|
94
|
+
]
|
|
95
|
+
}) : void 0, re = q && L ? L.title : /* @__PURE__ */ k("span", {
|
|
96
|
+
className: "ttw:sr-only",
|
|
97
|
+
children: R && !z ? R.title : G.loadingTitle
|
|
98
|
+
});
|
|
99
|
+
return /* @__PURE__ */ k(ee, {
|
|
100
|
+
open: F,
|
|
101
|
+
onOpenChange: I,
|
|
102
|
+
title: re,
|
|
103
|
+
description: q ? K?.subtitle ?? K?.hiddenDescription : void 0,
|
|
104
|
+
descriptionHidden: q && !K?.subtitle && !!K?.hiddenDescription,
|
|
105
|
+
headerActions: ne,
|
|
106
|
+
labels: { close: G.closeButton },
|
|
107
|
+
children: R && !z ? /* @__PURE__ */ k(T, { ...R }) : !q || !L || !K ? /* @__PURE__ */ k(P, { label: G.loadingTitle }) : /* @__PURE__ */ A("div", {
|
|
108
|
+
className: "ttw:flex ttw:flex-col ttw:pb-4",
|
|
109
|
+
children: [
|
|
110
|
+
K.seriesLink ? /* @__PURE__ */ A(i, {
|
|
111
|
+
type: "button",
|
|
112
|
+
variant: "link",
|
|
113
|
+
className: "ttw:mb-3 ttw:self-start ttw:px-0",
|
|
114
|
+
onClick: K.seriesLink.onOpen,
|
|
115
|
+
children: [/* @__PURE__ */ k(j, {
|
|
116
|
+
className: "ttw:size-4",
|
|
117
|
+
"aria-hidden": "true"
|
|
118
|
+
}), K.seriesLink.backLabel]
|
|
119
|
+
}) : null,
|
|
120
|
+
Y ? /* @__PURE__ */ A("div", {
|
|
121
|
+
className: "ttw:flex ttw:flex-col ttw:gap-3 ttw:rounded-lg ttw:bg-muted ttw:p-4",
|
|
122
|
+
children: [
|
|
123
|
+
/* @__PURE__ */ A("div", {
|
|
124
|
+
className: "ttw:flex ttw:flex-col ttw:gap-0.5",
|
|
125
|
+
children: [/* @__PURE__ */ k(d, {
|
|
126
|
+
variant: "caption",
|
|
127
|
+
color: "muted",
|
|
128
|
+
children: G.recurringAmountCaption
|
|
129
|
+
}), /* @__PURE__ */ A("div", {
|
|
130
|
+
className: "ttw:flex ttw:flex-wrap ttw:items-baseline ttw:gap-x-1.5",
|
|
131
|
+
children: [/* @__PURE__ */ k(a, {
|
|
132
|
+
component: "span",
|
|
133
|
+
children: Y.amountLabel
|
|
134
|
+
}), /* @__PURE__ */ k(d, {
|
|
135
|
+
component: "span",
|
|
136
|
+
variant: "body2",
|
|
137
|
+
color: "muted",
|
|
138
|
+
children: Y.amountPeriodLabel
|
|
139
|
+
})]
|
|
140
|
+
})]
|
|
141
|
+
}),
|
|
142
|
+
/* @__PURE__ */ A("div", {
|
|
143
|
+
className: "ttw:flex ttw:items-center ttw:gap-2",
|
|
144
|
+
children: [/* @__PURE__ */ k(r, {
|
|
145
|
+
tone: "neutral",
|
|
146
|
+
children: G.recurringBadge
|
|
147
|
+
}), /* @__PURE__ */ k(h, {
|
|
148
|
+
label: Y.statusLabel,
|
|
149
|
+
color: Y.statusColor
|
|
150
|
+
})]
|
|
151
|
+
}),
|
|
152
|
+
/* @__PURE__ */ A("div", {
|
|
153
|
+
className: "ttw:flex ttw:flex-wrap ttw:gap-x-12 ttw:gap-y-2",
|
|
154
|
+
children: [/* @__PURE__ */ k(N, {
|
|
155
|
+
caption: G.startsOnCaption,
|
|
156
|
+
value: Y.startsOnLabel
|
|
157
|
+
}), /* @__PURE__ */ k(N, {
|
|
158
|
+
caption: G.endsOnCaption,
|
|
159
|
+
value: Y.endsOnLabel
|
|
160
|
+
})]
|
|
161
|
+
})
|
|
162
|
+
]
|
|
163
|
+
}) : /* @__PURE__ */ A("div", {
|
|
164
|
+
className: "ttw:flex ttw:flex-col ttw:gap-3 ttw:rounded-lg ttw:bg-muted ttw:p-4",
|
|
165
|
+
children: [
|
|
166
|
+
/* @__PURE__ */ k("div", {
|
|
167
|
+
className: "ttw:flex ttw:flex-row ttw:flex-wrap ttw:gap-x-12 ttw:gap-y-2",
|
|
168
|
+
children: K.amountRows.map((e) => /* @__PURE__ */ k(_, { row: e }, e.label))
|
|
169
|
+
}),
|
|
170
|
+
/* @__PURE__ */ A("div", {
|
|
171
|
+
className: "ttw:flex ttw:items-center ttw:gap-2",
|
|
172
|
+
children: [/* @__PURE__ */ k(h, {
|
|
173
|
+
label: K.statusLabel,
|
|
174
|
+
color: K.statusColor
|
|
175
|
+
}), K.recurring ? /* @__PURE__ */ k(r, {
|
|
176
|
+
tone: "neutral",
|
|
177
|
+
children: G.recurringBadge
|
|
178
|
+
}) : null]
|
|
179
|
+
}),
|
|
180
|
+
/* @__PURE__ */ A("div", {
|
|
181
|
+
className: "ttw:flex ttw:flex-wrap ttw:gap-x-12 ttw:gap-y-2",
|
|
182
|
+
children: [/* @__PURE__ */ k(N, {
|
|
183
|
+
caption: G.invoiceDateCaption,
|
|
184
|
+
value: K.issueDateLabel
|
|
185
|
+
}), /* @__PURE__ */ k(N, {
|
|
186
|
+
caption: K.dueDateCaption,
|
|
187
|
+
value: K.dueDateLabel
|
|
188
|
+
})]
|
|
189
|
+
}),
|
|
190
|
+
te
|
|
191
|
+
]
|
|
192
|
+
}),
|
|
193
|
+
K.paymentHistory ? /* @__PURE__ */ A("section", {
|
|
194
|
+
"aria-label": G.paymentHistoryHeading,
|
|
195
|
+
className: "ttw:border-b ttw:border-border ttw:py-4",
|
|
196
|
+
children: [/* @__PURE__ */ k(d, {
|
|
197
|
+
component: "h3",
|
|
198
|
+
variant: "body2",
|
|
199
|
+
className: "ttw:mb-3 ttw:font-medium",
|
|
200
|
+
children: G.paymentHistoryHeading
|
|
201
|
+
}), K.paymentHistory.isLoading ? /* @__PURE__ */ A(p, {
|
|
202
|
+
isLoading: !0,
|
|
203
|
+
loadingLabel: G.paymentHistoryLoading,
|
|
204
|
+
className: "ttw:flex ttw:flex-col ttw:gap-2",
|
|
205
|
+
children: [/* @__PURE__ */ k(o, { className: "ttw:h-4 ttw:w-full" }), /* @__PURE__ */ k(o, { className: "ttw:h-4 ttw:w-2/3" })]
|
|
206
|
+
}) : K.paymentHistory.rows.length === 0 ? /* @__PURE__ */ k(d, {
|
|
207
|
+
variant: "body2",
|
|
208
|
+
color: "muted",
|
|
209
|
+
children: G.paymentHistoryEmpty
|
|
210
|
+
}) : /* @__PURE__ */ A("div", {
|
|
211
|
+
className: "ttw:flex ttw:flex-col",
|
|
212
|
+
children: [K.paymentHistory.rows.map((e) => /* @__PURE__ */ A("div", {
|
|
213
|
+
className: "ttw:flex ttw:justify-between ttw:border-b ttw:border-border ttw:py-2",
|
|
214
|
+
children: [/* @__PURE__ */ k(d, {
|
|
215
|
+
component: "span",
|
|
216
|
+
variant: "body2",
|
|
217
|
+
children: e.dateLabel
|
|
218
|
+
}), /* @__PURE__ */ k(d, {
|
|
219
|
+
component: "span",
|
|
220
|
+
variant: "body2",
|
|
221
|
+
className: "ttw:tabular-nums",
|
|
222
|
+
children: e.amountLabel
|
|
223
|
+
})]
|
|
224
|
+
}, e.id)), /* @__PURE__ */ A("div", {
|
|
225
|
+
className: "ttw:flex ttw:justify-between ttw:py-2 ttw:font-medium",
|
|
226
|
+
children: [/* @__PURE__ */ k(d, {
|
|
227
|
+
component: "span",
|
|
228
|
+
variant: "body2",
|
|
229
|
+
children: G.paymentHistoryTotalLabel
|
|
230
|
+
}), /* @__PURE__ */ k(d, {
|
|
231
|
+
component: "span",
|
|
232
|
+
variant: "body2",
|
|
233
|
+
className: "ttw:tabular-nums",
|
|
234
|
+
children: K.paymentHistory.totalLabel
|
|
235
|
+
})]
|
|
236
|
+
})]
|
|
237
|
+
})]
|
|
238
|
+
}) : null,
|
|
239
|
+
K.customerName || K.customerContact.length > 0 ? /* @__PURE__ */ A("section", {
|
|
240
|
+
"aria-label": G.customerDetailsHeading,
|
|
241
|
+
className: "ttw:border-b ttw:border-border ttw:py-4",
|
|
242
|
+
children: [/* @__PURE__ */ k(d, {
|
|
243
|
+
component: "h3",
|
|
244
|
+
variant: "body2",
|
|
245
|
+
className: "ttw:mb-3 ttw:font-medium",
|
|
246
|
+
children: G.customerDetailsHeading
|
|
247
|
+
}), /* @__PURE__ */ A("div", {
|
|
248
|
+
className: "ttw:flex ttw:flex-col",
|
|
249
|
+
children: [K.customerName ? /* @__PURE__ */ k(w, { ...K.customerName }) : null, K.customerContact.map((e) => /* @__PURE__ */ k(E, { ...e }, e.label))]
|
|
250
|
+
})]
|
|
251
|
+
}) : null,
|
|
252
|
+
/* @__PURE__ */ A(e, {
|
|
253
|
+
type: "multiple",
|
|
254
|
+
value: V,
|
|
255
|
+
onValueChange: H,
|
|
256
|
+
className: "ttw:w-full",
|
|
257
|
+
children: [
|
|
258
|
+
/* @__PURE__ */ A(n, {
|
|
259
|
+
value: g.billing,
|
|
260
|
+
className: b,
|
|
261
|
+
children: [/* @__PURE__ */ k(x, { heading: G.billingHeading }), /* @__PURE__ */ k(t, { children: /* @__PURE__ */ A("div", {
|
|
262
|
+
className: "ttw:flex ttw:flex-col",
|
|
263
|
+
children: [K.billingItems.map((e) => /* @__PURE__ */ k(E, { ...e }, e.label)), K.seriesLink ? /* @__PURE__ */ A("div", {
|
|
264
|
+
className: "ttw:flex ttw:items-center ttw:gap-4 ttw:border-b ttw:border-border ttw:py-3 ttw:last:border-b-0",
|
|
265
|
+
children: [/* @__PURE__ */ k(d, {
|
|
266
|
+
component: "span",
|
|
267
|
+
variant: "body2",
|
|
268
|
+
color: "muted",
|
|
269
|
+
className: "ttw:w-40 ttw:shrink-0",
|
|
270
|
+
children: G.recurringSeriesRowLabel
|
|
271
|
+
}), /* @__PURE__ */ k(i, {
|
|
272
|
+
type: "button",
|
|
273
|
+
variant: "link",
|
|
274
|
+
className: "ttw:h-auto ttw:px-0 ttw:text-left",
|
|
275
|
+
onClick: K.seriesLink.onOpen,
|
|
276
|
+
children: K.seriesLink.title
|
|
277
|
+
})]
|
|
278
|
+
}) : null]
|
|
279
|
+
}) })]
|
|
280
|
+
}),
|
|
281
|
+
K.lineItemsSection ? /* @__PURE__ */ A(n, {
|
|
282
|
+
value: g.lineItems,
|
|
283
|
+
className: b,
|
|
284
|
+
children: [/* @__PURE__ */ k(x, {
|
|
285
|
+
heading: G.lineItemsHeading,
|
|
286
|
+
countLabel: K.lineItemsSection.countLabel
|
|
287
|
+
}), /* @__PURE__ */ k(t, { children: /* @__PURE__ */ A("div", {
|
|
288
|
+
className: "ttw:flex ttw:flex-col",
|
|
289
|
+
children: [L.lineItems.length === 0 ? /* @__PURE__ */ k(d, {
|
|
290
|
+
variant: "body2",
|
|
291
|
+
color: "muted",
|
|
292
|
+
className: "ttw:py-3",
|
|
293
|
+
children: G.noLineItems
|
|
294
|
+
}) : L.lineItems.map((e) => /* @__PURE__ */ A("div", {
|
|
295
|
+
className: "ttw:flex ttw:items-start ttw:justify-between ttw:border-b ttw:border-border ttw:py-3",
|
|
296
|
+
children: [/* @__PURE__ */ A("div", {
|
|
297
|
+
className: "ttw:flex ttw:flex-col",
|
|
298
|
+
children: [/* @__PURE__ */ k(d, {
|
|
299
|
+
component: "span",
|
|
300
|
+
variant: "body2",
|
|
301
|
+
className: "ttw:font-medium",
|
|
302
|
+
children: e.name
|
|
303
|
+
}), /* @__PURE__ */ A(d, {
|
|
304
|
+
component: "span",
|
|
305
|
+
variant: "body2",
|
|
306
|
+
color: "muted",
|
|
307
|
+
children: [
|
|
308
|
+
e.quantityLabel,
|
|
309
|
+
" ",
|
|
310
|
+
G.lineItemMultiplier,
|
|
311
|
+
" ",
|
|
312
|
+
e.unitPriceLabel,
|
|
313
|
+
" ",
|
|
314
|
+
G.lineItemEaLabel
|
|
315
|
+
]
|
|
316
|
+
})]
|
|
317
|
+
}), /* @__PURE__ */ k(d, {
|
|
318
|
+
component: "span",
|
|
319
|
+
variant: "body2",
|
|
320
|
+
className: "ttw:tabular-nums",
|
|
321
|
+
children: e.totalLabel
|
|
322
|
+
})]
|
|
323
|
+
}, e.id)), K.lineItemsSection.totals.length > 0 ? /* @__PURE__ */ k("div", {
|
|
324
|
+
className: "ttw:flex ttw:flex-col ttw:gap-1 ttw:py-3",
|
|
325
|
+
children: K.lineItemsSection.totals.map((e) => /* @__PURE__ */ A("div", {
|
|
326
|
+
className: f("ttw:flex ttw:justify-between", e.emphasis && "ttw:font-medium"),
|
|
327
|
+
children: [/* @__PURE__ */ k(d, {
|
|
328
|
+
component: "span",
|
|
329
|
+
variant: "body2",
|
|
330
|
+
children: e.label
|
|
331
|
+
}), /* @__PURE__ */ k(d, {
|
|
332
|
+
component: "span",
|
|
333
|
+
variant: "body2",
|
|
334
|
+
className: "ttw:tabular-nums",
|
|
335
|
+
children: e.value
|
|
336
|
+
})]
|
|
337
|
+
}, e.label))
|
|
338
|
+
}) : null]
|
|
339
|
+
}) })]
|
|
340
|
+
}) : null,
|
|
341
|
+
K.notes ? /* @__PURE__ */ A(n, {
|
|
342
|
+
value: g.notes,
|
|
343
|
+
className: b,
|
|
344
|
+
children: [/* @__PURE__ */ k(x, {
|
|
345
|
+
heading: G.notesHeading,
|
|
346
|
+
countLabel: K.notes.countLabel
|
|
347
|
+
}), /* @__PURE__ */ k(t, { children: /* @__PURE__ */ A("div", {
|
|
348
|
+
className: "ttw:flex ttw:flex-col ttw:gap-3",
|
|
349
|
+
children: [K.notes.opening ? /* @__PURE__ */ A("div", { children: [/* @__PURE__ */ k(d, {
|
|
350
|
+
variant: "body2",
|
|
351
|
+
className: "ttw:mb-1 ttw:font-medium",
|
|
352
|
+
children: G.notesOpeningLabel
|
|
353
|
+
}), /* @__PURE__ */ k(d, {
|
|
354
|
+
variant: "body2",
|
|
355
|
+
color: "muted",
|
|
356
|
+
children: K.notes.opening
|
|
357
|
+
})] }) : null, K.notes.closing ? /* @__PURE__ */ A("div", { children: [/* @__PURE__ */ k(d, {
|
|
358
|
+
variant: "body2",
|
|
359
|
+
className: "ttw:mb-1 ttw:font-medium",
|
|
360
|
+
children: G.notesClosingLabel
|
|
361
|
+
}), /* @__PURE__ */ k(d, {
|
|
362
|
+
variant: "body2",
|
|
363
|
+
color: "muted",
|
|
364
|
+
children: K.notes.closing
|
|
365
|
+
})] }) : null]
|
|
366
|
+
}) })]
|
|
367
|
+
}) : null,
|
|
368
|
+
/* @__PURE__ */ k(S, {
|
|
369
|
+
attachments: K.attachments,
|
|
370
|
+
labels: G
|
|
371
|
+
}),
|
|
372
|
+
/* @__PURE__ */ k(C, {
|
|
373
|
+
auditHistory: K.auditHistory,
|
|
374
|
+
labels: G
|
|
375
|
+
})
|
|
376
|
+
]
|
|
377
|
+
}),
|
|
378
|
+
Y ? /* @__PURE__ */ A("section", {
|
|
379
|
+
"aria-label": Y.scheduleTitle,
|
|
380
|
+
className: "ttw:py-4",
|
|
381
|
+
children: [/* @__PURE__ */ k(d, {
|
|
382
|
+
component: "h3",
|
|
383
|
+
variant: "body2",
|
|
384
|
+
className: "ttw:mb-3 ttw:font-medium",
|
|
385
|
+
children: Y.scheduleTitle
|
|
386
|
+
}), /* @__PURE__ */ k(O, {
|
|
387
|
+
rows: Y.schedule,
|
|
388
|
+
labels: G
|
|
389
|
+
})]
|
|
390
|
+
}) : null
|
|
391
|
+
]
|
|
392
|
+
})
|
|
86
393
|
});
|
|
87
394
|
}
|
|
88
|
-
export {
|
|
395
|
+
export { F as ReceivableDetailsPanel, F as default };
|