@tesouro/embedded-components-react 0.5.284 → 0.5.286
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +27 -28
- package/dist/index.css +5 -0
- package/dist/index.d.ts +6 -19
- package/dist/lib/ReceivablesWidget.d.ts +6 -19
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/ReceivablesWidget.js +268 -285
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/helpers.js +35 -60
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/labels.js +4 -6
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/useReceivableActions.js +124 -147
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/useReceivableActionsModal.js +6 -2
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/useReceivableIssuePreflight.js +10 -9
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/useReceivableRecurrence.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/useReceivablesWidget.js +54 -48
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index.js +3 -4
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index14.js +2 -12
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index56.js +54 -87
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index57.js +185 -51
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index58.js +38 -187
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index7.js +33 -33
- package/dist/libs/tesouro-embedded-components-react/linked-accounts-widget/ui/dist/index13.js +2 -1
- package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/analytics/build-info.js +1 -1
- package/dist/packages/shared-ui-shadcn/dist/index.js +4 -4
- package/package.json +1 -1
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index59.js +0 -45
|
@@ -1,60 +1,194 @@
|
|
|
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 { RECEIVABLES_SCREEN_LABELS_EN as l } from "./index14.js";
|
|
6
|
+
import { ReceivableStatusBadge as u } from "./index25.js";
|
|
7
|
+
import { ReceivableStatusCards as d } from "./index56.js";
|
|
8
|
+
import { jsx as f, jsxs as p } from "react/jsx-runtime";
|
|
9
|
+
import { ArrowDownIcon as m, ArrowUpDownIcon as h, ArrowUpIcon as g, CogIcon as _, LockKeyholeIcon as v } from "lucide-react";
|
|
5
10
|
//#region ../../libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index57.js
|
|
6
|
-
var
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
11
|
+
var y = [
|
|
12
|
+
10,
|
|
13
|
+
25,
|
|
14
|
+
50,
|
|
15
|
+
100
|
|
16
|
+
];
|
|
17
|
+
function b({ label: t, ariaLabel: n, column: r }) {
|
|
18
|
+
let i = r.getIsSorted();
|
|
19
|
+
return /* @__PURE__ */ p("div", {
|
|
20
|
+
className: "ttw:flex ttw:items-center ttw:gap-2 ttw:text-inherit",
|
|
21
|
+
children: [t, /* @__PURE__ */ f(e, {
|
|
22
|
+
variant: "ghost",
|
|
23
|
+
size: "icon-sm",
|
|
24
|
+
"aria-label": n,
|
|
25
|
+
onClick: () => r.toggleSorting(i === "asc"),
|
|
26
|
+
children: f(i === "asc" ? g : i === "desc" ? m : h, { className: "ttw:size-4" })
|
|
27
|
+
})]
|
|
14
28
|
});
|
|
15
29
|
}
|
|
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
|
-
|
|
30
|
+
function x({ row: e }) {
|
|
31
|
+
return e.customerState === "resolving" ? /* @__PURE__ */ f(n, { className: "ttw:h-4 ttw:w-full" }) : e.customerState === "missing" ? /* @__PURE__ */ f("span", {
|
|
32
|
+
className: "ttw:opacity-40",
|
|
33
|
+
children: e.customerLabel
|
|
34
|
+
}) : /* @__PURE__ */ f("span", { children: e.customerLabel });
|
|
35
|
+
}
|
|
36
|
+
function S({ rows: n, isLoading: m, isError: h, isAccessRestricted: g, sorting: S, onSortingChange: C, pageSize: w, onPageSizeChange: T, pageSizeOptions: E = y, pageInfo: D, hasNextPage: O, hasPrevPage: k, onNextPage: A, onPrevPage: j, statusCards: M, onStatusCardSelect: N, filterBar: P, isFiltering: F, headerStart: I, bankAttribution: L, onCreateClick: R, onSettingsClick: z, onRowClick: B, onRetry: V, labels: H }) {
|
|
37
|
+
let U = {
|
|
38
|
+
...l,
|
|
39
|
+
...H,
|
|
40
|
+
statusBadge: {
|
|
41
|
+
...l.statusBadge,
|
|
42
|
+
...H?.statusBadge
|
|
43
|
+
}
|
|
44
|
+
}, W = [
|
|
45
|
+
{
|
|
46
|
+
accessorKey: "dueDateLabel",
|
|
47
|
+
enableSorting: !0,
|
|
48
|
+
header: ({ column: e }) => /* @__PURE__ */ f(b, {
|
|
49
|
+
column: e,
|
|
50
|
+
label: U.columnDueDate,
|
|
51
|
+
ariaLabel: U.sortByDueDate
|
|
52
|
+
})
|
|
53
|
+
},
|
|
54
|
+
{
|
|
55
|
+
accessorKey: "status",
|
|
56
|
+
enableSorting: !0,
|
|
57
|
+
header: ({ column: e }) => /* @__PURE__ */ f(b, {
|
|
58
|
+
column: e,
|
|
59
|
+
label: U.columnStatus,
|
|
60
|
+
ariaLabel: U.sortByStatus
|
|
61
|
+
}),
|
|
62
|
+
cell: ({ row: e }) => /* @__PURE__ */ f(u, {
|
|
63
|
+
status: e.original.status,
|
|
64
|
+
variant: "filled",
|
|
65
|
+
labels: U.statusBadge
|
|
66
|
+
})
|
|
67
|
+
},
|
|
68
|
+
{
|
|
69
|
+
accessorKey: "documentLabel",
|
|
70
|
+
enableSorting: !0,
|
|
71
|
+
header: ({ column: e }) => /* @__PURE__ */ f(b, {
|
|
72
|
+
column: e,
|
|
73
|
+
label: U.columnNumber,
|
|
74
|
+
ariaLabel: U.sortByNumber
|
|
75
|
+
})
|
|
76
|
+
},
|
|
77
|
+
{
|
|
78
|
+
accessorKey: "customerLabel",
|
|
79
|
+
header: U.columnCustomer,
|
|
80
|
+
cell: ({ row: e }) => /* @__PURE__ */ f(x, { row: e.original }),
|
|
81
|
+
minSize: 180
|
|
82
|
+
},
|
|
83
|
+
{
|
|
84
|
+
accessorKey: "issueDateLabel",
|
|
85
|
+
enableSorting: !0,
|
|
86
|
+
header: ({ column: e }) => /* @__PURE__ */ f(b, {
|
|
87
|
+
column: e,
|
|
88
|
+
label: U.columnIssueDate,
|
|
89
|
+
ariaLabel: U.sortByIssueDate
|
|
90
|
+
})
|
|
91
|
+
},
|
|
92
|
+
{
|
|
93
|
+
accessorKey: "totalLabel",
|
|
94
|
+
enableSorting: !0,
|
|
95
|
+
header: ({ column: e }) => /* @__PURE__ */ f("div", {
|
|
96
|
+
className: "ttw:flex ttw:justify-end",
|
|
97
|
+
children: /* @__PURE__ */ f(b, {
|
|
98
|
+
column: e,
|
|
99
|
+
label: U.columnAmount,
|
|
100
|
+
ariaLabel: U.sortByAmount
|
|
101
|
+
})
|
|
102
|
+
}),
|
|
103
|
+
cell: ({ row: e }) => /* @__PURE__ */ f("div", {
|
|
104
|
+
className: "ttw:text-right",
|
|
105
|
+
children: e.original.totalLabel
|
|
106
|
+
})
|
|
107
|
+
}
|
|
108
|
+
];
|
|
109
|
+
return /* @__PURE__ */ p("div", {
|
|
110
|
+
className: "ttw:flex ttw:flex-col ttw:gap-4",
|
|
111
|
+
children: [
|
|
112
|
+
/* @__PURE__ */ p("div", {
|
|
113
|
+
className: "ttw:flex ttw:justify-between ttw:gap-4",
|
|
114
|
+
children: [/* @__PURE__ */ p("div", {
|
|
115
|
+
className: "ttw:flex ttw:flex-col ttw:gap-2",
|
|
116
|
+
children: [I, L && /* @__PURE__ */ p("div", {
|
|
117
|
+
className: "ttw:flex ttw:items-center ttw:gap-2",
|
|
118
|
+
children: [/* @__PURE__ */ f("span", {
|
|
119
|
+
className: "ttw:text-muted-foreground",
|
|
120
|
+
children: U.bankAttributionPrefix
|
|
121
|
+
}), /* @__PURE__ */ f("img", {
|
|
122
|
+
width: 120,
|
|
123
|
+
src: L.logoSrc,
|
|
124
|
+
alt: L.logoAlt
|
|
125
|
+
})]
|
|
126
|
+
})]
|
|
127
|
+
}), /* @__PURE__ */ p("div", {
|
|
128
|
+
className: "ttw:flex ttw:items-center ttw:gap-2",
|
|
129
|
+
children: [z && /* @__PURE__ */ f(a, { children: /* @__PURE__ */ p(r, { children: [/* @__PURE__ */ f(o, {
|
|
130
|
+
asChild: !0,
|
|
131
|
+
children: /* @__PURE__ */ f(e, {
|
|
132
|
+
type: "button",
|
|
133
|
+
variant: "outline",
|
|
134
|
+
size: "lg",
|
|
135
|
+
"aria-label": U.settingsButton,
|
|
136
|
+
onClick: z,
|
|
137
|
+
children: /* @__PURE__ */ f(_, {
|
|
138
|
+
className: "ttw:size-4.5",
|
|
139
|
+
"aria-hidden": !0
|
|
140
|
+
})
|
|
141
|
+
})
|
|
142
|
+
}), /* @__PURE__ */ f(i, {
|
|
143
|
+
sideOffset: 4,
|
|
144
|
+
children: U.settingsButton
|
|
145
|
+
})] }) }), R && /* @__PURE__ */ f(e, {
|
|
146
|
+
size: "lg",
|
|
147
|
+
onClick: R,
|
|
148
|
+
children: U.createInvoiceButton
|
|
50
149
|
})]
|
|
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
150
|
})]
|
|
151
|
+
}),
|
|
152
|
+
!g && M && N && /* @__PURE__ */ f(d, {
|
|
153
|
+
view: M,
|
|
154
|
+
onSelect: N,
|
|
155
|
+
labels: { all: U.statusCardsAll }
|
|
156
|
+
}),
|
|
157
|
+
g ? /* @__PURE__ */ f(c, {
|
|
158
|
+
icon: /* @__PURE__ */ f(v, { className: "ttw:size-8 ttw:text-primary" }),
|
|
159
|
+
title: U.accessRestrictedTitle,
|
|
160
|
+
description: U.accessRestrictedDescription
|
|
161
|
+
}) : h ? /* @__PURE__ */ f(c, {
|
|
162
|
+
title: U.errorTitle,
|
|
163
|
+
description: U.errorDescription,
|
|
164
|
+
retryLabel: V ? U.errorRetry : void 0,
|
|
165
|
+
onRetry: V
|
|
166
|
+
}) : /* @__PURE__ */ f(t, {
|
|
167
|
+
columns: W,
|
|
168
|
+
data: n,
|
|
169
|
+
isLoading: m,
|
|
170
|
+
sorting: S,
|
|
171
|
+
onSortingChange: C,
|
|
172
|
+
pageSize: w,
|
|
173
|
+
onPageSizeChange: T,
|
|
174
|
+
pageSizeOptions: E,
|
|
175
|
+
pageInfo: D,
|
|
176
|
+
hasNextPage: O,
|
|
177
|
+
hasPrevPage: k,
|
|
178
|
+
onNextPage: A,
|
|
179
|
+
onPrevPage: j,
|
|
180
|
+
onRowClick: B,
|
|
181
|
+
rowAriaLabel: (e) => U.openRow(e.documentLabel),
|
|
182
|
+
filterComponent: P,
|
|
183
|
+
children: /* @__PURE__ */ f(s, {
|
|
184
|
+
title: F ? U.filterEmptyTitle : U.emptyTitle,
|
|
185
|
+
description: F ? void 0 : U.emptyDescription,
|
|
186
|
+
actionLabel: F ? void 0 : U.createInvoiceButton,
|
|
187
|
+
onAction: F ? void 0 : R
|
|
188
|
+
})
|
|
55
189
|
})
|
|
56
|
-
|
|
190
|
+
]
|
|
57
191
|
});
|
|
58
192
|
}
|
|
59
193
|
//#endregion
|
|
60
|
-
export {
|
|
194
|
+
export { S as ReceivablesScreen, S as default };
|
|
@@ -1,194 +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 { ReceivableStatusCards as d } from "./index57.js";
|
|
8
|
-
import { jsx as f, jsxs as p } from "react/jsx-runtime";
|
|
9
|
-
import { ArrowDownIcon as m, ArrowUpDownIcon as h, ArrowUpIcon as g, CogIcon as _, LockKeyholeIcon as v } 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";
|
|
10
5
|
//#region ../../libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index58.js
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
className: "ttw:flex ttw:items-center ttw:gap-2 ttw:text-inherit",
|
|
21
|
-
children: [t, /* @__PURE__ */ f(e, {
|
|
22
|
-
variant: "ghost",
|
|
23
|
-
size: "icon-sm",
|
|
24
|
-
"aria-label": n,
|
|
25
|
-
onClick: () => r.toggleSorting(i === "asc"),
|
|
26
|
-
children: f(i === "asc" ? g : i === "desc" ? m : h, { className: "ttw:size-4" })
|
|
27
|
-
})]
|
|
28
|
-
});
|
|
29
|
-
}
|
|
30
|
-
function x({ row: e }) {
|
|
31
|
-
return e.customerState === "resolving" ? /* @__PURE__ */ f(n, { className: "ttw:h-4 ttw:w-full" }) : e.customerState === "missing" ? /* @__PURE__ */ f("span", {
|
|
32
|
-
className: "ttw:opacity-40",
|
|
33
|
-
children: e.customerLabel
|
|
34
|
-
}) : /* @__PURE__ */ f("span", { children: e.customerLabel });
|
|
35
|
-
}
|
|
36
|
-
function S({ rows: n, isLoading: m, isError: h, isAccessRestricted: g, sorting: S, onSortingChange: C, pageSize: w, onPageSizeChange: T, pageSizeOptions: E = y, pageInfo: D, hasNextPage: O, hasPrevPage: k, onNextPage: A, onPrevPage: j, statusCards: M, onStatusCardSelect: N, filterBar: P, isFiltering: F, headerStart: I, bankAttribution: L, onCreateClick: R, onSettingsClick: z, onRowClick: B, onRetry: V, labels: H }) {
|
|
37
|
-
let U = {
|
|
38
|
-
...l,
|
|
39
|
-
...H,
|
|
40
|
-
statusBadge: {
|
|
41
|
-
...l.statusBadge,
|
|
42
|
-
...H?.statusBadge
|
|
43
|
-
}
|
|
44
|
-
}, W = [
|
|
45
|
-
{
|
|
46
|
-
accessorKey: "dueDateLabel",
|
|
47
|
-
enableSorting: !0,
|
|
48
|
-
header: ({ column: e }) => /* @__PURE__ */ f(b, {
|
|
49
|
-
column: e,
|
|
50
|
-
label: U.columnDueDate,
|
|
51
|
-
ariaLabel: U.sortByDueDate
|
|
52
|
-
})
|
|
53
|
-
},
|
|
54
|
-
{
|
|
55
|
-
accessorKey: "status",
|
|
56
|
-
enableSorting: !0,
|
|
57
|
-
header: ({ column: e }) => /* @__PURE__ */ f(b, {
|
|
58
|
-
column: e,
|
|
59
|
-
label: U.columnStatus,
|
|
60
|
-
ariaLabel: U.sortByStatus
|
|
61
|
-
}),
|
|
62
|
-
cell: ({ row: e }) => /* @__PURE__ */ f(u, {
|
|
63
|
-
status: e.original.status,
|
|
64
|
-
variant: "filled",
|
|
65
|
-
labels: U.statusBadge
|
|
66
|
-
})
|
|
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();
|
|
67
15
|
},
|
|
68
|
-
{
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
{
|
|
78
|
-
accessorKey: "customerLabel",
|
|
79
|
-
header: U.columnCustomer,
|
|
80
|
-
cell: ({ row: e }) => /* @__PURE__ */ f(x, { row: e.original }),
|
|
81
|
-
minSize: 180
|
|
82
|
-
},
|
|
83
|
-
{
|
|
84
|
-
accessorKey: "issueDateLabel",
|
|
85
|
-
enableSorting: !0,
|
|
86
|
-
header: ({ column: e }) => /* @__PURE__ */ f(b, {
|
|
87
|
-
column: e,
|
|
88
|
-
label: U.columnIssueDate,
|
|
89
|
-
ariaLabel: U.sortByIssueDate
|
|
90
|
-
})
|
|
91
|
-
},
|
|
92
|
-
{
|
|
93
|
-
accessorKey: "totalLabel",
|
|
94
|
-
enableSorting: !0,
|
|
95
|
-
header: ({ column: e }) => /* @__PURE__ */ f("div", {
|
|
96
|
-
className: "ttw:flex ttw:justify-end",
|
|
97
|
-
children: /* @__PURE__ */ f(b, {
|
|
98
|
-
column: e,
|
|
99
|
-
label: U.columnAmount,
|
|
100
|
-
ariaLabel: U.sortByAmount
|
|
101
|
-
})
|
|
102
|
-
}),
|
|
103
|
-
cell: ({ row: e }) => /* @__PURE__ */ f("div", {
|
|
104
|
-
className: "ttw:text-right",
|
|
105
|
-
children: e.original.totalLabel
|
|
106
|
-
})
|
|
107
|
-
}
|
|
108
|
-
];
|
|
109
|
-
return /* @__PURE__ */ p("div", {
|
|
110
|
-
className: "ttw:flex ttw:flex-col ttw:gap-4",
|
|
111
|
-
children: [
|
|
112
|
-
/* @__PURE__ */ p("div", {
|
|
113
|
-
className: "ttw:flex ttw:justify-between ttw:gap-4",
|
|
114
|
-
children: [/* @__PURE__ */ p("div", {
|
|
115
|
-
className: "ttw:flex ttw:flex-col ttw:gap-2",
|
|
116
|
-
children: [I, L && /* @__PURE__ */ p("div", {
|
|
117
|
-
className: "ttw:flex ttw:items-center ttw:gap-2",
|
|
118
|
-
children: [/* @__PURE__ */ f("span", {
|
|
119
|
-
className: "ttw:text-muted-foreground",
|
|
120
|
-
children: U.bankAttributionPrefix
|
|
121
|
-
}), /* @__PURE__ */ f("img", {
|
|
122
|
-
width: 120,
|
|
123
|
-
src: L.logoSrc,
|
|
124
|
-
alt: L.logoAlt
|
|
125
|
-
})]
|
|
126
|
-
})]
|
|
127
|
-
}), /* @__PURE__ */ p("div", {
|
|
128
|
-
className: "ttw:flex ttw:items-center ttw:gap-2",
|
|
129
|
-
children: [z && /* @__PURE__ */ f(a, { children: /* @__PURE__ */ p(r, { children: [/* @__PURE__ */ f(o, {
|
|
130
|
-
asChild: !0,
|
|
131
|
-
children: /* @__PURE__ */ f(e, {
|
|
132
|
-
type: "button",
|
|
133
|
-
variant: "outline",
|
|
134
|
-
size: "lg",
|
|
135
|
-
"aria-label": U.settingsButton,
|
|
136
|
-
onClick: z,
|
|
137
|
-
children: /* @__PURE__ */ f(_, {
|
|
138
|
-
className: "ttw:size-4.5",
|
|
139
|
-
"aria-hidden": !0
|
|
140
|
-
})
|
|
141
|
-
})
|
|
142
|
-
}), /* @__PURE__ */ f(i, {
|
|
143
|
-
sideOffset: 4,
|
|
144
|
-
children: U.settingsButton
|
|
145
|
-
})] }) }), R && /* @__PURE__ */ f(e, {
|
|
146
|
-
size: "lg",
|
|
147
|
-
onClick: R,
|
|
148
|
-
children: U.createInvoiceButton
|
|
149
|
-
})]
|
|
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
|
|
150
25
|
})]
|
|
151
26
|
}),
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
columns: W,
|
|
168
|
-
data: n,
|
|
169
|
-
isLoading: m,
|
|
170
|
-
sorting: S,
|
|
171
|
-
onSortingChange: C,
|
|
172
|
-
pageSize: w,
|
|
173
|
-
onPageSizeChange: T,
|
|
174
|
-
pageSizeOptions: E,
|
|
175
|
-
pageInfo: D,
|
|
176
|
-
hasNextPage: O,
|
|
177
|
-
hasPrevPage: k,
|
|
178
|
-
onNextPage: A,
|
|
179
|
-
onPrevPage: j,
|
|
180
|
-
onRowClick: B,
|
|
181
|
-
rowAriaLabel: (e) => U.openRow(e.documentLabel),
|
|
182
|
-
filterComponent: P,
|
|
183
|
-
children: /* @__PURE__ */ f(s, {
|
|
184
|
-
title: F ? U.filterEmptyTitle : U.emptyTitle,
|
|
185
|
-
description: F ? void 0 : U.emptyDescription,
|
|
186
|
-
actionLabel: F ? void 0 : U.createInvoiceButton,
|
|
187
|
-
onAction: F ? void 0 : R
|
|
188
|
-
})
|
|
189
|
-
})
|
|
190
|
-
]
|
|
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
|
+
] })
|
|
191
42
|
});
|
|
192
43
|
}
|
|
193
44
|
//#endregion
|
|
194
|
-
export {
|
|
45
|
+
export { d as UnsavedInvoiceDialog, d as default };
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { Button as e, DialogDescription as t, DialogFooter as n, DialogHeader as r, DialogTitle as i, Input as a, Label as o, Textarea as s, Typography as c } from "../../../../../packages/shared-ui-shadcn/dist/index.js";
|
|
2
2
|
import { Fragment as l, jsx as u, jsxs as d } from "react/jsx-runtime";
|
|
3
|
-
import { Check as f } from "lucide-react";
|
|
3
|
+
import { Check as f, Send as p } from "lucide-react";
|
|
4
4
|
//#region ../../libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index7.js
|
|
5
|
-
function
|
|
6
|
-
let
|
|
5
|
+
function m({ idPrefix: m, view: h, onSubjectChange: g, onMessageChange: _, onSkip: v, onSend: y, labels: b }) {
|
|
6
|
+
let x = `${m}-subject`, S = `${m}-message`;
|
|
7
7
|
return /* @__PURE__ */ d(l, { children: [
|
|
8
8
|
/* @__PURE__ */ u(r, {
|
|
9
9
|
className: "ttw:border-b ttw:border-border ttw:p-6",
|
|
@@ -11,12 +11,12 @@ function p({ idPrefix: p, view: m, onSubjectChange: h, onMessageChange: g, onSki
|
|
|
11
11
|
className: "ttw:flex ttw:items-center ttw:gap-4",
|
|
12
12
|
children: [/* @__PURE__ */ u("span", {
|
|
13
13
|
className: "ttw:flex ttw:size-10 ttw:shrink-0 ttw:items-center ttw:justify-center ttw:rounded-full ttw:border ttw:border-emerald-200 ttw:bg-emerald-50",
|
|
14
|
-
children: /* @__PURE__ */ u(f, { className: "ttw:size-6 ttw:text-green-700" })
|
|
14
|
+
children: h.icon === "send" ? /* @__PURE__ */ u(p, { className: "ttw:size-6 ttw:text-green-700" }) : /* @__PURE__ */ u(f, { className: "ttw:size-6 ttw:text-green-700" })
|
|
15
15
|
}), /* @__PURE__ */ d("div", {
|
|
16
16
|
className: "ttw:flex ttw:flex-col ttw:gap-1",
|
|
17
|
-
children: [/* @__PURE__ */ u(i, { children:
|
|
17
|
+
children: [/* @__PURE__ */ u(i, { children: h.title }), /* @__PURE__ */ u(t, {
|
|
18
18
|
className: "ttw:text-xs",
|
|
19
|
-
children:
|
|
19
|
+
children: b.issueDescription
|
|
20
20
|
})]
|
|
21
21
|
})]
|
|
22
22
|
})
|
|
@@ -30,57 +30,57 @@ function p({ idPrefix: p, view: m, onSubjectChange: h, onMessageChange: g, onSki
|
|
|
30
30
|
variant: "body2",
|
|
31
31
|
color: "muted",
|
|
32
32
|
className: "ttw:w-16 ttw:shrink-0",
|
|
33
|
-
children:
|
|
33
|
+
children: b.toLabel
|
|
34
34
|
}), /* @__PURE__ */ u(c, {
|
|
35
35
|
variant: "body2",
|
|
36
|
-
children:
|
|
36
|
+
children: h.recipient
|
|
37
37
|
})]
|
|
38
38
|
}),
|
|
39
39
|
/* @__PURE__ */ d("div", {
|
|
40
40
|
className: "ttw:flex ttw:items-center ttw:gap-4",
|
|
41
41
|
children: [/* @__PURE__ */ u(o, {
|
|
42
|
-
htmlFor:
|
|
42
|
+
htmlFor: x,
|
|
43
43
|
className: "ttw:w-16 ttw:shrink-0 ttw:font-normal ttw:text-muted-foreground",
|
|
44
|
-
children:
|
|
44
|
+
children: b.subjectLabel
|
|
45
45
|
}), /* @__PURE__ */ u(a, {
|
|
46
|
-
id:
|
|
46
|
+
id: x,
|
|
47
47
|
className: "ttw:flex-1",
|
|
48
|
-
value:
|
|
49
|
-
onChange: (e) =>
|
|
50
|
-
disabled:
|
|
48
|
+
value: h.subject,
|
|
49
|
+
onChange: (e) => g(e.target.value),
|
|
50
|
+
disabled: h.inProgress
|
|
51
51
|
})]
|
|
52
52
|
}),
|
|
53
53
|
/* @__PURE__ */ d("div", {
|
|
54
54
|
className: "ttw:flex ttw:items-start ttw:gap-4",
|
|
55
55
|
children: [/* @__PURE__ */ u(o, {
|
|
56
|
-
htmlFor:
|
|
56
|
+
htmlFor: S,
|
|
57
57
|
className: "ttw:w-16 ttw:shrink-0 ttw:pt-2 ttw:font-normal ttw:text-muted-foreground",
|
|
58
|
-
children:
|
|
58
|
+
children: b.messageLabel
|
|
59
59
|
}), /* @__PURE__ */ u(s, {
|
|
60
|
-
id:
|
|
60
|
+
id: S,
|
|
61
61
|
className: "ttw:flex-1",
|
|
62
|
-
value:
|
|
63
|
-
onChange: (e) =>
|
|
64
|
-
placeholder:
|
|
65
|
-
disabled:
|
|
62
|
+
value: h.message,
|
|
63
|
+
onChange: (e) => _(e.target.value),
|
|
64
|
+
placeholder: b.messagePlaceholder,
|
|
65
|
+
disabled: h.inProgress
|
|
66
66
|
})]
|
|
67
67
|
}),
|
|
68
|
-
|
|
68
|
+
h.attachments.length > 0 && /* @__PURE__ */ d("div", {
|
|
69
69
|
className: "ttw:flex ttw:flex-col ttw:gap-2.5 ttw:pl-20",
|
|
70
70
|
children: [/* @__PURE__ */ d("div", {
|
|
71
71
|
className: "ttw:flex ttw:flex-col",
|
|
72
72
|
children: [/* @__PURE__ */ u(c, {
|
|
73
73
|
variant: "body2",
|
|
74
74
|
color: "muted",
|
|
75
|
-
children:
|
|
75
|
+
children: b.attachmentsLabel
|
|
76
76
|
}), /* @__PURE__ */ u(c, {
|
|
77
77
|
variant: "caption",
|
|
78
78
|
color: "muted",
|
|
79
|
-
children:
|
|
79
|
+
children: b.attachmentsCaption
|
|
80
80
|
})]
|
|
81
81
|
}), /* @__PURE__ */ u("ul", {
|
|
82
82
|
className: "ttw:flex ttw:flex-col ttw:gap-2.5",
|
|
83
|
-
children:
|
|
83
|
+
children: h.attachments.map((e) => /* @__PURE__ */ d("li", {
|
|
84
84
|
className: "ttw:rounded-lg ttw:bg-muted ttw:px-2 ttw:py-1 ttw:text-sm ttw:font-medium",
|
|
85
85
|
children: [
|
|
86
86
|
e.name,
|
|
@@ -105,19 +105,19 @@ function p({ idPrefix: p, view: m, onSubjectChange: h, onMessageChange: g, onSki
|
|
|
105
105
|
type: "button",
|
|
106
106
|
variant: "outline",
|
|
107
107
|
className: "ttw:flex-1 ttw:border-border",
|
|
108
|
-
disabled:
|
|
109
|
-
onClick:
|
|
110
|
-
children:
|
|
108
|
+
disabled: h.inProgress,
|
|
109
|
+
onClick: v,
|
|
110
|
+
children: h.dismissLabel
|
|
111
111
|
}), /* @__PURE__ */ u(e, {
|
|
112
112
|
type: "button",
|
|
113
113
|
className: "ttw:flex-1",
|
|
114
|
-
disabled:
|
|
115
|
-
loading:
|
|
116
|
-
onClick:
|
|
117
|
-
children:
|
|
114
|
+
disabled: h.sendDisabled,
|
|
115
|
+
loading: h.inProgress,
|
|
116
|
+
onClick: y,
|
|
117
|
+
children: b.sendButton
|
|
118
118
|
})]
|
|
119
119
|
})
|
|
120
120
|
] });
|
|
121
121
|
}
|
|
122
122
|
//#endregion
|
|
123
|
-
export {
|
|
123
|
+
export { m as ReceivableActionsModalIssueStep };
|
package/dist/libs/tesouro-embedded-components-react/linked-accounts-widget/ui/dist/index13.js
CHANGED
|
@@ -47,7 +47,8 @@ function m({ open: m, labels: h, accountNumber: g, isSubmitting: _, isActionDisa
|
|
|
47
47
|
className: "ttw:flex-1",
|
|
48
48
|
children: h.cancelButton
|
|
49
49
|
}), /* @__PURE__ */ u(t, {
|
|
50
|
-
|
|
50
|
+
variant: "destructive",
|
|
51
|
+
className: "ttw:flex-1",
|
|
51
52
|
disabled: v || _,
|
|
52
53
|
onClick: (e) => {
|
|
53
54
|
e.preventDefault(), x();
|
package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/analytics/build-info.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
//#region ../../libs/tesouro-embedded-components-react/shared/feature/dist/lib/analytics/build-info.js
|
|
2
|
-
var e = "@tesouro/embedded-components-react", t = "0.5.
|
|
2
|
+
var e = "@tesouro/embedded-components-react", t = "0.5.286", n = "ff9e36b19a83b6e257eee8d7f5f9a046f204c441", r = Object.freeze({
|
|
3
3
|
library_name: e,
|
|
4
4
|
library_version: t,
|
|
5
5
|
library_sha: n
|
|
@@ -8434,7 +8434,7 @@ var wv = _v("ttw:inline-flex ttw:cursor-pointer ttw:items-center ttw:justify-cen
|
|
|
8434
8434
|
variants: {
|
|
8435
8435
|
variant: {
|
|
8436
8436
|
default: "ttw:bg-primary ttw:text-primary-foreground ttw:hover:bg-primary/90",
|
|
8437
|
-
destructive: "ttw:bg-destructive ttw:text-
|
|
8437
|
+
destructive: "ttw:bg-destructive ttw:text-destructive-foreground ttw:hover:bg-destructive/90 ttw:focus-visible:ring-destructive/20 ttw:dark:focus-visible:ring-destructive/40 ttw:dark:bg-destructive/60",
|
|
8438
8438
|
outline: "ttw:border ttw:border-border ttw:bg-background ttw:shadow-xs ttw:hover:bg-accent ttw:hover:text-accent-foreground ttw:dark:bg-input/30 ttw:dark:border-input ttw:dark:hover:bg-input/50",
|
|
8439
8439
|
secondary: "ttw:bg-secondary ttw:text-secondary-foreground ttw:hover:bg-secondary/80",
|
|
8440
8440
|
ghost: "ttw:hover:bg-accent ttw:hover:text-accent-foreground ttw:dark:hover:bg-accent/50",
|
|
@@ -8546,10 +8546,10 @@ function Iv({ className: e, ...t }) {
|
|
|
8546
8546
|
...t
|
|
8547
8547
|
});
|
|
8548
8548
|
}
|
|
8549
|
-
function Lv({
|
|
8549
|
+
function Lv({ variant: e, className: t, ...n }) {
|
|
8550
8550
|
return /* @__PURE__ */ _(Ka, {
|
|
8551
|
-
className: J(wv(),
|
|
8552
|
-
...
|
|
8551
|
+
className: J(wv({ variant: e }), t),
|
|
8552
|
+
...n
|
|
8553
8553
|
});
|
|
8554
8554
|
}
|
|
8555
8555
|
function Rv({ className: e, ...t }) {
|