@tesouro/embedded-components-react 0.7.45 → 0.7.46
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +29 -39
- package/dist/lib/CounterpartsWidget.d.ts +29 -22
- package/dist/lib/CounterpartsWidgetPublic.d.ts +29 -22
- package/dist/lib/CustomersWidget.d.ts +29 -22
- package/dist/lib/ReceivablesWidget.d.ts +1 -0
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index24.js +12 -12
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index25.js +15 -15
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index42.js +9 -9
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index5.js +30 -30
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/ui/dist/index14.js +3 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/ui/dist/index15.js +7 -6
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/ui/dist/index33.js +3 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/ui/dist/index34.js +9 -8
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/ui/dist/index37.js +5 -4
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/ui/dist/index48.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/ui/dist/index49.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/ui/dist/index5.js +3 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bills-list/feature/dist/index16.js +40 -40
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bills-list/ui/dist/index18.js +3 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bills-list/ui/dist/index2.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bills-list/ui/dist/index20.js +8 -7
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bills-list/ui/dist/index3.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/pay-bill/ui/dist/index5.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/pay-bill/ui/dist/index6.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index.js +9 -13
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index12.js +7 -10
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index13.js +76 -11
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index15.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index16.js +27 -9
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index17.js +2 -76
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index18.js +30 -0
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index19.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index20.js +5 -27
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index21.js +32 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index22.js +2 -30
- package/dist/libs/tesouro-embedded-components-react/counterparts-widget/feature/dist/lib/CounterpartsWidget/viewModels.js +73 -77
- package/dist/libs/tesouro-embedded-components-react/counterparts-widget/ui/dist/index2.js +8 -25
- package/dist/libs/tesouro-embedded-components-react/counterparts-widget/ui/dist/index7.js +197 -208
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/ReceivablesWidget.js +9 -9
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/auditHistory/labels.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/useReceivableDetails.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/useReceivablesWidget.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index.js +22 -23
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index14.js +10 -24
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index25.js +53 -37
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index26.js +21 -53
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index27.js +8 -21
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index28.js +77 -8
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index29.js +31 -69
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index30.js +17 -38
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index31.js +40 -17
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index32.js +26 -38
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index33.js +18 -27
- 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 +35 -9
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index36.js +14 -36
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index37.js +26 -14
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index38.js +84 -23
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index39.js +487 -80
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index40.js +2 -494
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index41.js +48 -2
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index42.js +62 -38
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index43.js +438 -61
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index44.js +207 -431
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index45.js +20 -222
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index46.js +6 -21
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index48.js +265 -0
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index49.js +2 -265
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index50.js +131 -2
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index51.js +22 -125
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index52.js +235 -23
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index53.js +3 -240
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index54.js +249 -3
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index55.js +54 -242
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index56.js +221 -51
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index57.js +38 -222
- package/dist/libs/tesouro-embedded-components-react/shared/document-status/ui/dist/index.js +8 -0
- package/dist/libs/tesouro-embedded-components-react/shared/document-status/ui/dist/index2.js +14 -0
- package/dist/libs/tesouro-embedded-components-react/shared/document-status/ui/dist/index3.js +13 -0
- package/dist/libs/tesouro-embedded-components-react/shared/document-status/ui/dist/index4.js +18 -0
- package/dist/libs/tesouro-embedded-components-react/shared/document-status/ui/dist/index5.js +2 -0
- package/dist/libs/tesouro-embedded-components-react/shared/document-status/ui/dist/index6.js +20 -0
- package/dist/libs/tesouro-embedded-components-react/shared/document-status/ui/dist/index7.js +32 -0
- package/dist/libs/tesouro-embedded-components-react/shared/document-status/ui/dist/index8.js +2 -0
- package/dist/libs/tesouro-embedded-components-react/{bill-pay-widget → shared/document-status}/util/dist/lib/derivePayableStatus.js +23 -10
- package/dist/libs/tesouro-embedded-components-react/shared/document-status/util/dist/lib/receivableFilledTone.js +22 -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/bill-pay-widget/ui/dist/index14.js +0 -18
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index23.js +0 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index24.js +0 -7
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index25.js +0 -34
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index26.js +0 -2
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index47.js +0 -8
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index58.js +0 -45
|
@@ -1,60 +1,230 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import
|
|
1
|
+
import { Button as e, DataTable as t, Skeleton as n, Tooltip as r, TooltipContent as i, TooltipProvider as a, TooltipTrigger as o } from "../../../../../packages/shared-ui-shadcn/dist/index.js";
|
|
2
|
+
import { EmptyState as s } from "../../../shared/ui/dist/lib/EmptyState/EmptyState.js";
|
|
3
|
+
import { ErrorState as c } from "../../../shared/ui/dist/lib/ErrorState/ErrorState.js";
|
|
4
|
+
import "../../../shared/ui/dist/index.js";
|
|
5
|
+
import { ReceivableStatusBadge as l } from "../../../shared/document-status/ui/dist/index7.js";
|
|
6
|
+
import "../../../shared/document-status/ui/dist/index.js";
|
|
7
|
+
import { RECEIVABLES_SCREEN_LABELS_EN as u } from "./index14.js";
|
|
8
|
+
import { SeriesStatusChip as d } from "./index37.js";
|
|
9
|
+
import { ReceivableStatusCards as f } from "./index55.js";
|
|
10
|
+
import { jsx as p, jsxs as m } from "react/jsx-runtime";
|
|
11
|
+
import { ArrowDownIcon as h, ArrowUpDownIcon as g, ArrowUpIcon as _, CogIcon as v, LockKeyholeIcon as y, RefreshCwIcon as b } from "lucide-react";
|
|
5
12
|
//#region ../../libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index56.js
|
|
6
|
-
var
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
13
|
+
var x = [
|
|
14
|
+
10,
|
|
15
|
+
25,
|
|
16
|
+
50,
|
|
17
|
+
100
|
|
18
|
+
];
|
|
19
|
+
function S({ label: t, ariaLabel: n, column: r }) {
|
|
20
|
+
let i = r.getIsSorted();
|
|
21
|
+
return /* @__PURE__ */ m("div", {
|
|
22
|
+
className: "ttw:flex ttw:items-center ttw:gap-2 ttw:text-inherit",
|
|
23
|
+
children: [t, /* @__PURE__ */ p(e, {
|
|
24
|
+
variant: "ghost",
|
|
25
|
+
size: "icon-sm",
|
|
26
|
+
"aria-label": n,
|
|
27
|
+
onClick: () => r.toggleSorting(i === "asc"),
|
|
28
|
+
children: p(i === "asc" ? _ : i === "desc" ? h : g, { className: "ttw:size-4" })
|
|
29
|
+
})]
|
|
14
30
|
});
|
|
15
31
|
}
|
|
16
|
-
function
|
|
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
|
-
|
|
32
|
+
function C({ row: e }) {
|
|
33
|
+
return e.dueDateOverdueLabel ? /* @__PURE__ */ m("div", {
|
|
34
|
+
className: "ttw:flex ttw:flex-col ttw:justify-center ttw:gap-1 ttw:text-destructive",
|
|
35
|
+
children: [/* @__PURE__ */ p("span", {
|
|
36
|
+
className: "ttw:text-sm ttw:leading-5",
|
|
37
|
+
children: e.dueDateLabel
|
|
38
|
+
}), /* @__PURE__ */ p("span", {
|
|
39
|
+
className: "ttw:text-xs ttw:leading-4.5",
|
|
40
|
+
children: e.dueDateOverdueLabel
|
|
41
|
+
})]
|
|
42
|
+
}) : e.dueDateLabel;
|
|
43
|
+
}
|
|
44
|
+
function w({ row: e, statusBadgeLabels: t }) {
|
|
45
|
+
let r = e.statusOverride;
|
|
46
|
+
return r ? r.kind === "loading" ? /* @__PURE__ */ p(n, { className: "ttw:h-4 ttw:w-full" }) : r.kind === "chip" ? /* @__PURE__ */ p(d, {
|
|
47
|
+
label: r.label,
|
|
48
|
+
tone: r.tone
|
|
49
|
+
}) : null : /* @__PURE__ */ p(l, {
|
|
50
|
+
status: e.status,
|
|
51
|
+
variant: "filled",
|
|
52
|
+
labels: t
|
|
53
|
+
});
|
|
54
|
+
}
|
|
55
|
+
function T({ row: e }) {
|
|
56
|
+
return e.showDocumentSyncIcon ? /* @__PURE__ */ m("span", {
|
|
57
|
+
className: "ttw:flex ttw:items-center ttw:gap-1",
|
|
58
|
+
children: [/* @__PURE__ */ p(b, {
|
|
59
|
+
className: "ttw:size-[1em]",
|
|
60
|
+
"aria-hidden": !0
|
|
61
|
+
}), e.documentLabel]
|
|
62
|
+
}) : e.documentLabel;
|
|
63
|
+
}
|
|
64
|
+
function E({ row: e }) {
|
|
65
|
+
return e.customerState === "resolving" ? /* @__PURE__ */ p(n, { className: "ttw:h-4 ttw:w-full" }) : e.customerState === "missing" ? /* @__PURE__ */ p("span", {
|
|
66
|
+
className: "ttw:opacity-40",
|
|
67
|
+
children: e.customerLabel
|
|
68
|
+
}) : /* @__PURE__ */ p("span", { children: e.customerLabel });
|
|
69
|
+
}
|
|
70
|
+
function D({ rows: n, isLoading: l, isError: d, isAccessRestricted: h, sorting: g, onSortingChange: _, pageSize: b, onPageSizeChange: D, pageSizeOptions: O = x, pageInfo: k, hasNextPage: A, hasPrevPage: j, onNextPage: M, onPrevPage: N, statusCards: P, onStatusCardSelect: F, filterBar: I, isFiltering: L, headerStart: R, bankAttribution: z, onCreateClick: B, onSettingsClick: V, onRowClick: H, onRetry: U, labels: W }) {
|
|
71
|
+
let G = {
|
|
72
|
+
...u,
|
|
73
|
+
...W,
|
|
74
|
+
statusBadge: {
|
|
75
|
+
...u.statusBadge,
|
|
76
|
+
...W?.statusBadge
|
|
77
|
+
}
|
|
78
|
+
}, K = [
|
|
79
|
+
{
|
|
80
|
+
accessorKey: "dueDateLabel",
|
|
81
|
+
enableSorting: !0,
|
|
82
|
+
header: ({ column: e }) => /* @__PURE__ */ p(S, {
|
|
83
|
+
column: e,
|
|
84
|
+
label: G.columnDueDate,
|
|
85
|
+
ariaLabel: G.sortByDueDate
|
|
86
|
+
}),
|
|
87
|
+
cell: ({ row: e }) => /* @__PURE__ */ p(C, { row: e.original })
|
|
88
|
+
},
|
|
89
|
+
{
|
|
90
|
+
accessorKey: "status",
|
|
91
|
+
enableSorting: !0,
|
|
92
|
+
header: ({ column: e }) => /* @__PURE__ */ p(S, {
|
|
93
|
+
column: e,
|
|
94
|
+
label: G.columnStatus,
|
|
95
|
+
ariaLabel: G.sortByStatus
|
|
96
|
+
}),
|
|
97
|
+
cell: ({ row: e }) => /* @__PURE__ */ p(w, {
|
|
98
|
+
row: e.original,
|
|
99
|
+
statusBadgeLabels: G.statusBadge
|
|
100
|
+
})
|
|
101
|
+
},
|
|
102
|
+
{
|
|
103
|
+
accessorKey: "documentLabel",
|
|
104
|
+
enableSorting: !0,
|
|
105
|
+
header: ({ column: e }) => /* @__PURE__ */ p(S, {
|
|
106
|
+
column: e,
|
|
107
|
+
label: G.columnNumber,
|
|
108
|
+
ariaLabel: G.sortByNumber
|
|
109
|
+
}),
|
|
110
|
+
cell: ({ row: e }) => /* @__PURE__ */ p(T, { row: e.original })
|
|
111
|
+
},
|
|
112
|
+
{
|
|
113
|
+
accessorKey: "customerLabel",
|
|
114
|
+
header: G.columnCustomer,
|
|
115
|
+
cell: ({ row: e }) => /* @__PURE__ */ p(E, { row: e.original }),
|
|
116
|
+
minSize: 180
|
|
117
|
+
},
|
|
118
|
+
{
|
|
119
|
+
accessorKey: "issueDateLabel",
|
|
120
|
+
enableSorting: !0,
|
|
121
|
+
header: ({ column: e }) => /* @__PURE__ */ p(S, {
|
|
122
|
+
column: e,
|
|
123
|
+
label: G.columnIssueDate,
|
|
124
|
+
ariaLabel: G.sortByIssueDate
|
|
125
|
+
})
|
|
126
|
+
},
|
|
127
|
+
{
|
|
128
|
+
accessorKey: "totalLabel",
|
|
129
|
+
enableSorting: !0,
|
|
130
|
+
header: ({ column: e }) => /* @__PURE__ */ p("div", {
|
|
131
|
+
className: "ttw:flex ttw:justify-end",
|
|
132
|
+
children: /* @__PURE__ */ p(S, {
|
|
133
|
+
column: e,
|
|
134
|
+
label: G.columnAmount,
|
|
135
|
+
ariaLabel: G.sortByAmount
|
|
136
|
+
})
|
|
137
|
+
}),
|
|
138
|
+
cell: ({ row: e }) => /* @__PURE__ */ p("div", {
|
|
139
|
+
className: "ttw:text-right",
|
|
140
|
+
children: e.original.totalLabel
|
|
141
|
+
})
|
|
142
|
+
}
|
|
143
|
+
];
|
|
144
|
+
return /* @__PURE__ */ m("div", {
|
|
145
|
+
className: "ttw:flex ttw:flex-col ttw:gap-4",
|
|
146
|
+
children: [
|
|
147
|
+
/* @__PURE__ */ m("div", {
|
|
148
|
+
className: "ttw:flex ttw:justify-between ttw:gap-4",
|
|
149
|
+
children: [/* @__PURE__ */ m("div", {
|
|
150
|
+
className: "ttw:flex ttw:flex-col ttw:gap-2",
|
|
151
|
+
children: [R, z && /* @__PURE__ */ m("div", {
|
|
152
|
+
className: "ttw:flex ttw:items-center ttw:gap-2",
|
|
153
|
+
children: [/* @__PURE__ */ p("span", {
|
|
154
|
+
className: "ttw:text-muted-foreground",
|
|
155
|
+
children: G.bankAttributionPrefix
|
|
156
|
+
}), /* @__PURE__ */ p("img", {
|
|
157
|
+
width: 120,
|
|
158
|
+
src: z.logoSrc,
|
|
159
|
+
alt: z.logoAlt
|
|
160
|
+
})]
|
|
161
|
+
})]
|
|
162
|
+
}), /* @__PURE__ */ m("div", {
|
|
163
|
+
className: "ttw:flex ttw:items-center ttw:gap-2",
|
|
164
|
+
children: [V && /* @__PURE__ */ p(a, { children: /* @__PURE__ */ m(r, { children: [/* @__PURE__ */ p(o, {
|
|
165
|
+
asChild: !0,
|
|
166
|
+
children: /* @__PURE__ */ p(e, {
|
|
167
|
+
type: "button",
|
|
168
|
+
variant: "outline",
|
|
169
|
+
size: "lg",
|
|
170
|
+
className: "ttw:w-11 ttw:rounded-xl",
|
|
171
|
+
"aria-label": G.settingsButton,
|
|
172
|
+
onClick: V,
|
|
173
|
+
children: /* @__PURE__ */ p(v, {
|
|
174
|
+
className: "ttw:size-4.5",
|
|
175
|
+
"aria-hidden": !0
|
|
176
|
+
})
|
|
177
|
+
})
|
|
178
|
+
}), /* @__PURE__ */ p(i, {
|
|
179
|
+
sideOffset: 4,
|
|
180
|
+
children: G.settingsButton
|
|
181
|
+
})] }) }), B && /* @__PURE__ */ p(e, {
|
|
182
|
+
size: "lg",
|
|
183
|
+
onClick: B,
|
|
184
|
+
children: G.createInvoiceButton
|
|
50
185
|
})]
|
|
51
|
-
}), /* @__PURE__ */ i("span", {
|
|
52
|
-
className: "ttw:overflow-hidden ttw:text-ellipsis ttw:whitespace-nowrap ttw:text-2xl ttw:font-medium ttw:leading-8 ttw:tabular-nums ttw:text-foreground",
|
|
53
|
-
children: e.amountLabel
|
|
54
186
|
})]
|
|
187
|
+
}),
|
|
188
|
+
!h && P && F && /* @__PURE__ */ p(f, {
|
|
189
|
+
view: P,
|
|
190
|
+
onSelect: F,
|
|
191
|
+
labels: { all: G.statusCardsAll }
|
|
192
|
+
}),
|
|
193
|
+
h ? /* @__PURE__ */ p(c, {
|
|
194
|
+
icon: /* @__PURE__ */ p(y, { className: "ttw:size-8 ttw:text-primary" }),
|
|
195
|
+
title: G.accessRestrictedTitle,
|
|
196
|
+
description: G.accessRestrictedDescription
|
|
197
|
+
}) : /* @__PURE__ */ p(t, {
|
|
198
|
+
columns: K,
|
|
199
|
+
data: n,
|
|
200
|
+
isLoading: l,
|
|
201
|
+
sorting: g,
|
|
202
|
+
onSortingChange: _,
|
|
203
|
+
pageSize: b,
|
|
204
|
+
onPageSizeChange: D,
|
|
205
|
+
pageSizeOptions: O,
|
|
206
|
+
pageInfo: k,
|
|
207
|
+
hasNextPage: A,
|
|
208
|
+
hasPrevPage: j,
|
|
209
|
+
onNextPage: M,
|
|
210
|
+
onPrevPage: N,
|
|
211
|
+
onRowClick: H,
|
|
212
|
+
rowAriaLabel: (e) => G.openRow(e.documentLabel),
|
|
213
|
+
filterComponent: I,
|
|
214
|
+
children: d && !L ? /* @__PURE__ */ p(c, {
|
|
215
|
+
title: G.errorTitle,
|
|
216
|
+
description: G.errorDescription,
|
|
217
|
+
retryLabel: U ? G.errorRetry : void 0,
|
|
218
|
+
onRetry: U
|
|
219
|
+
}) : /* @__PURE__ */ p(s, {
|
|
220
|
+
title: L ? G.filterEmptyTitle : G.emptyTitle,
|
|
221
|
+
description: L ? void 0 : G.emptyDescription,
|
|
222
|
+
actionLabel: L ? void 0 : G.createInvoiceButton,
|
|
223
|
+
onAction: L ? void 0 : B
|
|
224
|
+
})
|
|
55
225
|
})
|
|
56
|
-
|
|
226
|
+
]
|
|
57
227
|
});
|
|
58
228
|
}
|
|
59
229
|
//#endregion
|
|
60
|
-
export {
|
|
230
|
+
export { D as ReceivablesScreen, D as default };
|
|
@@ -1,229 +1,45 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import "
|
|
5
|
-
import { RECEIVABLES_SCREEN_LABELS_EN as l } from "./index14.js";
|
|
6
|
-
import { ReceivableStatusBadge as u } from "./index25.js";
|
|
7
|
-
import { SeriesStatusChip as d } from "./index38.js";
|
|
8
|
-
import { ReceivableStatusCards as f } from "./index56.js";
|
|
9
|
-
import { jsx as p, jsxs as m } from "react/jsx-runtime";
|
|
10
|
-
import { ArrowDownIcon as h, ArrowUpDownIcon as g, ArrowUpIcon as _, CogIcon as v, LockKeyholeIcon as y, RefreshCwIcon as b } from "lucide-react";
|
|
1
|
+
import { AlertDialog as e, AlertDialogContent as t, AlertDialogDescription as n, AlertDialogFooter as r, AlertDialogHeader as i, AlertDialogTitle as a, Button as o } from "../../../../../packages/shared-ui-shadcn/dist/index.js";
|
|
2
|
+
import { UNSAVED_INVOICE_DIALOG_LABELS_EN as s } from "./index14.js";
|
|
3
|
+
import { jsx as c, jsxs as l } from "react/jsx-runtime";
|
|
4
|
+
import { XIcon as u } from "lucide-react";
|
|
11
5
|
//#region ../../libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index57.js
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
className: "ttw:flex ttw:items-center ttw:gap-2 ttw:text-inherit",
|
|
22
|
-
children: [t, /* @__PURE__ */ p(e, {
|
|
23
|
-
variant: "ghost",
|
|
24
|
-
size: "icon-sm",
|
|
25
|
-
"aria-label": n,
|
|
26
|
-
onClick: () => r.toggleSorting(i === "asc"),
|
|
27
|
-
children: p(i === "asc" ? _ : i === "desc" ? h : g, { className: "ttw:size-4" })
|
|
28
|
-
})]
|
|
29
|
-
});
|
|
30
|
-
}
|
|
31
|
-
function C({ row: e }) {
|
|
32
|
-
return e.dueDateOverdueLabel ? /* @__PURE__ */ m("div", {
|
|
33
|
-
className: "ttw:flex ttw:flex-col ttw:justify-center ttw:gap-1 ttw:text-destructive",
|
|
34
|
-
children: [/* @__PURE__ */ p("span", {
|
|
35
|
-
className: "ttw:text-sm ttw:leading-5",
|
|
36
|
-
children: e.dueDateLabel
|
|
37
|
-
}), /* @__PURE__ */ p("span", {
|
|
38
|
-
className: "ttw:text-xs ttw:leading-4.5",
|
|
39
|
-
children: e.dueDateOverdueLabel
|
|
40
|
-
})]
|
|
41
|
-
}) : e.dueDateLabel;
|
|
42
|
-
}
|
|
43
|
-
function w({ row: e, statusBadgeLabels: t }) {
|
|
44
|
-
let r = e.statusOverride;
|
|
45
|
-
return r ? r.kind === "loading" ? /* @__PURE__ */ p(n, { className: "ttw:h-4 ttw:w-full" }) : r.kind === "chip" ? /* @__PURE__ */ p(d, {
|
|
46
|
-
label: r.label,
|
|
47
|
-
tone: r.tone
|
|
48
|
-
}) : null : /* @__PURE__ */ p(u, {
|
|
49
|
-
status: e.status,
|
|
50
|
-
variant: "filled",
|
|
51
|
-
labels: t
|
|
52
|
-
});
|
|
53
|
-
}
|
|
54
|
-
function T({ row: e }) {
|
|
55
|
-
return e.showDocumentSyncIcon ? /* @__PURE__ */ m("span", {
|
|
56
|
-
className: "ttw:flex ttw:items-center ttw:gap-1",
|
|
57
|
-
children: [/* @__PURE__ */ p(b, {
|
|
58
|
-
className: "ttw:size-[1em]",
|
|
59
|
-
"aria-hidden": !0
|
|
60
|
-
}), e.documentLabel]
|
|
61
|
-
}) : e.documentLabel;
|
|
62
|
-
}
|
|
63
|
-
function E({ row: e }) {
|
|
64
|
-
return e.customerState === "resolving" ? /* @__PURE__ */ p(n, { className: "ttw:h-4 ttw:w-full" }) : e.customerState === "missing" ? /* @__PURE__ */ p("span", {
|
|
65
|
-
className: "ttw:opacity-40",
|
|
66
|
-
children: e.customerLabel
|
|
67
|
-
}) : /* @__PURE__ */ p("span", { children: e.customerLabel });
|
|
68
|
-
}
|
|
69
|
-
function D({ rows: n, isLoading: u, isError: d, isAccessRestricted: h, sorting: g, onSortingChange: _, pageSize: b, onPageSizeChange: D, pageSizeOptions: O = x, pageInfo: k, hasNextPage: A, hasPrevPage: j, onNextPage: M, onPrevPage: N, statusCards: P, onStatusCardSelect: F, filterBar: I, isFiltering: L, headerStart: R, bankAttribution: z, onCreateClick: B, onSettingsClick: V, onRowClick: H, onRetry: U, labels: W }) {
|
|
70
|
-
let G = {
|
|
71
|
-
...l,
|
|
72
|
-
...W,
|
|
73
|
-
statusBadge: {
|
|
74
|
-
...l.statusBadge,
|
|
75
|
-
...W?.statusBadge
|
|
76
|
-
}
|
|
77
|
-
}, K = [
|
|
78
|
-
{
|
|
79
|
-
accessorKey: "dueDateLabel",
|
|
80
|
-
enableSorting: !0,
|
|
81
|
-
header: ({ column: e }) => /* @__PURE__ */ p(S, {
|
|
82
|
-
column: e,
|
|
83
|
-
label: G.columnDueDate,
|
|
84
|
-
ariaLabel: G.sortByDueDate
|
|
85
|
-
}),
|
|
86
|
-
cell: ({ row: e }) => /* @__PURE__ */ p(C, { row: e.original })
|
|
6
|
+
function d({ open: d, onSaveDraft: f, onDiscard: p, onCancel: m, isSaving: h, isSaveDraftDisabled: g, labels: _ }) {
|
|
7
|
+
let v = {
|
|
8
|
+
...s,
|
|
9
|
+
..._
|
|
10
|
+
};
|
|
11
|
+
return /* @__PURE__ */ c(e, {
|
|
12
|
+
open: d,
|
|
13
|
+
onOpenChange: (e) => {
|
|
14
|
+
!e && !h && m();
|
|
87
15
|
},
|
|
88
|
-
{
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
row: e.original,
|
|
98
|
-
statusBadgeLabels: G.statusBadge
|
|
99
|
-
})
|
|
100
|
-
},
|
|
101
|
-
{
|
|
102
|
-
accessorKey: "documentLabel",
|
|
103
|
-
enableSorting: !0,
|
|
104
|
-
header: ({ column: e }) => /* @__PURE__ */ p(S, {
|
|
105
|
-
column: e,
|
|
106
|
-
label: G.columnNumber,
|
|
107
|
-
ariaLabel: G.sortByNumber
|
|
108
|
-
}),
|
|
109
|
-
cell: ({ row: e }) => /* @__PURE__ */ p(T, { row: e.original })
|
|
110
|
-
},
|
|
111
|
-
{
|
|
112
|
-
accessorKey: "customerLabel",
|
|
113
|
-
header: G.columnCustomer,
|
|
114
|
-
cell: ({ row: e }) => /* @__PURE__ */ p(E, { row: e.original }),
|
|
115
|
-
minSize: 180
|
|
116
|
-
},
|
|
117
|
-
{
|
|
118
|
-
accessorKey: "issueDateLabel",
|
|
119
|
-
enableSorting: !0,
|
|
120
|
-
header: ({ column: e }) => /* @__PURE__ */ p(S, {
|
|
121
|
-
column: e,
|
|
122
|
-
label: G.columnIssueDate,
|
|
123
|
-
ariaLabel: G.sortByIssueDate
|
|
124
|
-
})
|
|
125
|
-
},
|
|
126
|
-
{
|
|
127
|
-
accessorKey: "totalLabel",
|
|
128
|
-
enableSorting: !0,
|
|
129
|
-
header: ({ column: e }) => /* @__PURE__ */ p("div", {
|
|
130
|
-
className: "ttw:flex ttw:justify-end",
|
|
131
|
-
children: /* @__PURE__ */ p(S, {
|
|
132
|
-
column: e,
|
|
133
|
-
label: G.columnAmount,
|
|
134
|
-
ariaLabel: G.sortByAmount
|
|
135
|
-
})
|
|
136
|
-
}),
|
|
137
|
-
cell: ({ row: e }) => /* @__PURE__ */ p("div", {
|
|
138
|
-
className: "ttw:text-right",
|
|
139
|
-
children: e.original.totalLabel
|
|
140
|
-
})
|
|
141
|
-
}
|
|
142
|
-
];
|
|
143
|
-
return /* @__PURE__ */ m("div", {
|
|
144
|
-
className: "ttw:flex ttw:flex-col ttw:gap-4",
|
|
145
|
-
children: [
|
|
146
|
-
/* @__PURE__ */ m("div", {
|
|
147
|
-
className: "ttw:flex ttw:justify-between ttw:gap-4",
|
|
148
|
-
children: [/* @__PURE__ */ m("div", {
|
|
149
|
-
className: "ttw:flex ttw:flex-col ttw:gap-2",
|
|
150
|
-
children: [R, z && /* @__PURE__ */ m("div", {
|
|
151
|
-
className: "ttw:flex ttw:items-center ttw:gap-2",
|
|
152
|
-
children: [/* @__PURE__ */ p("span", {
|
|
153
|
-
className: "ttw:text-muted-foreground",
|
|
154
|
-
children: G.bankAttributionPrefix
|
|
155
|
-
}), /* @__PURE__ */ p("img", {
|
|
156
|
-
width: 120,
|
|
157
|
-
src: z.logoSrc,
|
|
158
|
-
alt: z.logoAlt
|
|
159
|
-
})]
|
|
160
|
-
})]
|
|
161
|
-
}), /* @__PURE__ */ m("div", {
|
|
162
|
-
className: "ttw:flex ttw:items-center ttw:gap-2",
|
|
163
|
-
children: [V && /* @__PURE__ */ p(a, { children: /* @__PURE__ */ m(r, { children: [/* @__PURE__ */ p(o, {
|
|
164
|
-
asChild: !0,
|
|
165
|
-
children: /* @__PURE__ */ p(e, {
|
|
166
|
-
type: "button",
|
|
167
|
-
variant: "outline",
|
|
168
|
-
size: "lg",
|
|
169
|
-
className: "ttw:w-11 ttw:rounded-xl",
|
|
170
|
-
"aria-label": G.settingsButton,
|
|
171
|
-
onClick: V,
|
|
172
|
-
children: /* @__PURE__ */ p(v, {
|
|
173
|
-
className: "ttw:size-4.5",
|
|
174
|
-
"aria-hidden": !0
|
|
175
|
-
})
|
|
176
|
-
})
|
|
177
|
-
}), /* @__PURE__ */ p(i, {
|
|
178
|
-
sideOffset: 4,
|
|
179
|
-
children: G.settingsButton
|
|
180
|
-
})] }) }), B && /* @__PURE__ */ p(e, {
|
|
181
|
-
size: "lg",
|
|
182
|
-
onClick: B,
|
|
183
|
-
children: G.createInvoiceButton
|
|
184
|
-
})]
|
|
16
|
+
children: /* @__PURE__ */ l(t, { children: [
|
|
17
|
+
/* @__PURE__ */ l("button", {
|
|
18
|
+
type: "button",
|
|
19
|
+
onClick: m,
|
|
20
|
+
disabled: h,
|
|
21
|
+
className: "ttw:absolute ttw:right-4 ttw:top-4 ttw:cursor-pointer ttw:rounded-sm ttw:opacity-70 ttw:ring-offset-background ttw:transition-opacity ttw:hover:opacity-100 ttw:focus:outline-hidden ttw:focus:ring-2 ttw:focus:ring-ring ttw:focus:ring-offset-2 ttw:disabled:pointer-events-none",
|
|
22
|
+
children: [/* @__PURE__ */ c(u, { className: "ttw:size-4" }), /* @__PURE__ */ c("span", {
|
|
23
|
+
className: "ttw:sr-only",
|
|
24
|
+
children: v.unsavedCloseButton
|
|
185
25
|
})]
|
|
186
26
|
}),
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
pageSize: b,
|
|
203
|
-
onPageSizeChange: D,
|
|
204
|
-
pageSizeOptions: O,
|
|
205
|
-
pageInfo: k,
|
|
206
|
-
hasNextPage: A,
|
|
207
|
-
hasPrevPage: j,
|
|
208
|
-
onNextPage: M,
|
|
209
|
-
onPrevPage: N,
|
|
210
|
-
onRowClick: H,
|
|
211
|
-
rowAriaLabel: (e) => G.openRow(e.documentLabel),
|
|
212
|
-
filterComponent: I,
|
|
213
|
-
children: d && !L ? /* @__PURE__ */ p(c, {
|
|
214
|
-
title: G.errorTitle,
|
|
215
|
-
description: G.errorDescription,
|
|
216
|
-
retryLabel: U ? G.errorRetry : void 0,
|
|
217
|
-
onRetry: U
|
|
218
|
-
}) : /* @__PURE__ */ p(s, {
|
|
219
|
-
title: L ? G.filterEmptyTitle : G.emptyTitle,
|
|
220
|
-
description: L ? void 0 : G.emptyDescription,
|
|
221
|
-
actionLabel: L ? void 0 : G.createInvoiceButton,
|
|
222
|
-
onAction: L ? void 0 : B
|
|
223
|
-
})
|
|
224
|
-
})
|
|
225
|
-
]
|
|
27
|
+
/* @__PURE__ */ l(i, { children: [/* @__PURE__ */ c(a, { children: v.unsavedTitle }), /* @__PURE__ */ c(n, { children: v.unsavedDescription })] }),
|
|
28
|
+
/* @__PURE__ */ l(r, { children: [/* @__PURE__ */ c(o, {
|
|
29
|
+
type: "button",
|
|
30
|
+
variant: "outline",
|
|
31
|
+
onClick: p,
|
|
32
|
+
disabled: h,
|
|
33
|
+
children: v.unsavedDiscardButton
|
|
34
|
+
}), /* @__PURE__ */ c(o, {
|
|
35
|
+
type: "button",
|
|
36
|
+
loading: h,
|
|
37
|
+
disabled: h || g,
|
|
38
|
+
onClick: f,
|
|
39
|
+
children: v.unsavedSaveDraftButton
|
|
40
|
+
})] })
|
|
41
|
+
] })
|
|
226
42
|
});
|
|
227
43
|
}
|
|
228
44
|
//#endregion
|
|
229
|
-
export {
|
|
45
|
+
export { d as UnsavedInvoiceDialog, d as default };
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { BILL_STATUS_BADGE_LABELS_EN as e } from "./index2.js";
|
|
2
|
+
import { BILL_STATUS_TONE_CLASS_NAME as t } from "./index3.js";
|
|
3
|
+
import { BillStatusBadge as n } from "./index4.js";
|
|
4
|
+
import "./index5.js";
|
|
5
|
+
import { RECEIVABLE_STATUS_BADGE_LABELS_EN as r } from "./index6.js";
|
|
6
|
+
import { ReceivableStatusBadge as i } from "./index7.js";
|
|
7
|
+
import "./index8.js";
|
|
8
|
+
export { e as BILL_STATUS_BADGE_LABELS_EN, t as BILL_STATUS_TONE_CLASS_NAME, n as BillStatusBadge, r as RECEIVABLE_STATUS_BADGE_LABELS_EN, i as ReceivableStatusBadge };
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
//#region ../../libs/tesouro-embedded-components-react/shared/document-status/ui/dist/index2.js
|
|
2
|
+
var e = {
|
|
3
|
+
draft: "Draft",
|
|
4
|
+
ready_to_submit: "Ready to submit",
|
|
5
|
+
pending_approval: "Pending review",
|
|
6
|
+
ready_to_pay: "Ready to pay",
|
|
7
|
+
scheduled: "Scheduled",
|
|
8
|
+
paid: "Paid",
|
|
9
|
+
canceled: "Cancelled",
|
|
10
|
+
rejected: "Rejected",
|
|
11
|
+
unknown: "Unknown"
|
|
12
|
+
};
|
|
13
|
+
//#endregion
|
|
14
|
+
export { e as BILL_STATUS_BADGE_LABELS_EN };
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
//#region ../../libs/tesouro-embedded-components-react/shared/document-status/ui/dist/index3.js
|
|
2
|
+
var e = {
|
|
3
|
+
accent: "ttw:border-violet-100 ttw:bg-violet-100 ttw:text-violet-700 ttw:hover:bg-violet-100",
|
|
4
|
+
committed: "ttw:border-cyan-200 ttw:bg-cyan-50 ttw:text-cyan-700 ttw:hover:bg-cyan-50",
|
|
5
|
+
danger: "ttw:border-destructive/20 ttw:bg-destructive/20 ttw:text-destructive ttw:hover:bg-destructive/20",
|
|
6
|
+
info: "ttw:border-blue-100 ttw:bg-blue-100 ttw:text-blue-700 ttw:hover:bg-blue-100",
|
|
7
|
+
neutral: "ttw:border-border ttw:bg-muted ttw:text-foreground ttw:hover:bg-muted",
|
|
8
|
+
settled: "ttw:border-border ttw:bg-background ttw:text-green-900 ttw:hover:bg-background",
|
|
9
|
+
success: "ttw:border-green-100 ttw:bg-green-100 ttw:text-green-700 ttw:hover:bg-green-100",
|
|
10
|
+
warning: "ttw:border-amber-100 ttw:bg-amber-100 ttw:text-amber-700 ttw:hover:bg-amber-100"
|
|
11
|
+
};
|
|
12
|
+
//#endregion
|
|
13
|
+
export { e as BILL_STATUS_TONE_CLASS_NAME };
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { Badge as e, cn as t } from "../../../../../../packages/shared-ui-shadcn/dist/index.js";
|
|
2
|
+
import { BILL_STATUS_BADGE_LABELS_EN as n } from "./index2.js";
|
|
3
|
+
import { BILL_STATUS_TONE_CLASS_NAME as r } from "./index3.js";
|
|
4
|
+
import { jsxs as i } from "react/jsx-runtime";
|
|
5
|
+
//#region ../../libs/tesouro-embedded-components-react/shared/document-status/ui/dist/index4.js
|
|
6
|
+
function a({ status: a, label: o, tone: s, labels: c, icon: l }) {
|
|
7
|
+
let u = {
|
|
8
|
+
...n,
|
|
9
|
+
...c
|
|
10
|
+
}, d = o ?? (a ? u[a] : u.unknown);
|
|
11
|
+
return /* @__PURE__ */ i(e, {
|
|
12
|
+
variant: "outline",
|
|
13
|
+
className: t(l && "ttw:gap-1", r[s]),
|
|
14
|
+
children: [l, d]
|
|
15
|
+
});
|
|
16
|
+
}
|
|
17
|
+
//#endregion
|
|
18
|
+
export { a as BillStatusBadge, a as default };
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
//#region ../../libs/tesouro-embedded-components-react/shared/document-status/ui/dist/index6.js
|
|
2
|
+
var e = {
|
|
3
|
+
draft: "Draft",
|
|
4
|
+
issuing: "Issuing",
|
|
5
|
+
issued: "Issued",
|
|
6
|
+
failed: "Failed",
|
|
7
|
+
accepted: "Accepted",
|
|
8
|
+
expired: "Expired",
|
|
9
|
+
declined: "Declined",
|
|
10
|
+
recurring: "Recurring",
|
|
11
|
+
partially_paid: "Partially paid",
|
|
12
|
+
paid: "Paid",
|
|
13
|
+
overdue: "Overdue",
|
|
14
|
+
uncollectible: "Uncollectible",
|
|
15
|
+
canceled: "Canceled",
|
|
16
|
+
deleted: "Deleted",
|
|
17
|
+
unknown: "Unknown"
|
|
18
|
+
};
|
|
19
|
+
//#endregion
|
|
20
|
+
export { e as RECEIVABLE_STATUS_BADGE_LABELS_EN };
|