@tesouro/embedded-components-react 0.5.292 → 0.5.294
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 +1 -1
- package/dist/index.d.ts +26 -1
- package/dist/lib/CounterpartsWidget.d.ts +2 -0
- package/dist/lib/CounterpartsWidgetPublic.d.ts +2 -0
- package/dist/lib/CustomersWidget.d.ts +2 -0
- package/dist/lib/ReceivablesWidget.d.ts +26 -1
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/data-access/dist/index.js +4 -4
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/data-access/dist/index11.js +3 -2
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/data-access/dist/index14.js +5 -88
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/data-access/dist/index15.js +70 -173
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/data-access/dist/index16.js +210 -17
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/data-access/dist/index17.js +29 -0
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/ReceivablesWidget.js +6 -7
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/details.js +142 -141
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/helpers.js +84 -54
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/labels.js +21 -3
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/paymentTerms.js +27 -27
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/recurrence.js +2 -1
- 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/totals.js +13 -10
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/useReceivableActions.js +84 -80
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/useReceivableActionsModal.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/useReceivableDetails.js +32 -30
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/useReceivableForm.js +417 -414
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/useReceivableIssuePreflight.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/useReceivableReminders.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/useReceivableStatusCards.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/useReceivablesTable.js +83 -66
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/useReceivablesWidget.js +133 -129
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/useSendReceivableWithPaymentLink.js +26 -22
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/useUtcDayStart.js +16 -0
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index13.js +0 -1
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index15.js +20 -22
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index23.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index40.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index44.js +91 -85
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index45.js +1 -0
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index51.js +119 -88
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index53.js +19 -16
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index57.js +130 -96
- package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/feature/dist/lib/helpers.js +24 -8
- package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/feature/dist/lib/labels.js +2 -0
- package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/feature/dist/lib/useCounterpartForm.js +101 -98
- package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/ui/dist/index9.js +34 -20
- 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/ui/dist/index6.js +4 -3
- package/dist/packages/shared-ui-shadcn/dist/index.js +15 -10
- package/package.json +1 -1
|
@@ -1,100 +1,131 @@
|
|
|
1
|
-
import { Button as e, Dialog as t, DialogContent as n, DialogDescription as r, DialogFooter as i, DialogHeader as a, DialogTitle as o,
|
|
2
|
-
import { RECEIVABLE_RECURRENCE_EMAIL_DIALOG_LABELS_EN as
|
|
3
|
-
import { jsx as
|
|
1
|
+
import { Button as e, Dialog as t, DialogContent as n, DialogDescription as r, DialogFooter as i, DialogHeader as a, DialogTitle as o, Input as s, InputTags as c, Label as l, Textarea as u, Typography as d, cn as f } from "../../../../../packages/shared-ui-shadcn/dist/index.js";
|
|
2
|
+
import { RECEIVABLE_RECURRENCE_EMAIL_DIALOG_LABELS_EN as p } from "./index13.js";
|
|
3
|
+
import { jsx as m, jsxs as h } from "react/jsx-runtime";
|
|
4
4
|
//#region ../../libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index51.js
|
|
5
|
-
function
|
|
6
|
-
let
|
|
7
|
-
...
|
|
8
|
-
...
|
|
9
|
-
},
|
|
10
|
-
to: `${
|
|
11
|
-
cc: `${
|
|
12
|
-
bcc: `${
|
|
13
|
-
subject: `${
|
|
14
|
-
message: `${
|
|
5
|
+
function g({ idPrefix: l, view: f, onOpenChange: g, onChange: v, onSave: y, labels: b }) {
|
|
6
|
+
let x = {
|
|
7
|
+
...p,
|
|
8
|
+
...b
|
|
9
|
+
}, S = {
|
|
10
|
+
to: `${l}-recipients-to`,
|
|
11
|
+
cc: `${l}-recipients-cc`,
|
|
12
|
+
bcc: `${l}-recipients-bcc`,
|
|
13
|
+
subject: `${l}-subject`,
|
|
14
|
+
message: `${l}-message`
|
|
15
15
|
};
|
|
16
|
-
return /* @__PURE__ */
|
|
17
|
-
open:
|
|
18
|
-
onOpenChange:
|
|
19
|
-
children: /* @__PURE__ */
|
|
20
|
-
className: "ttw:sm:max-w-
|
|
21
|
-
children: [/* @__PURE__ */
|
|
22
|
-
className: "ttw:
|
|
16
|
+
return /* @__PURE__ */ m(t, {
|
|
17
|
+
open: f.open,
|
|
18
|
+
onOpenChange: g,
|
|
19
|
+
children: /* @__PURE__ */ h(n, {
|
|
20
|
+
className: "ttw:gap-0 ttw:p-0 ttw:max-w-150 ttw:sm:max-w-150",
|
|
21
|
+
children: [/* @__PURE__ */ h(a, {
|
|
22
|
+
className: "ttw:border-b ttw:border-border ttw:p-6",
|
|
23
|
+
children: [/* @__PURE__ */ m(o, { children: x.recurrenceEmailTitle }), /* @__PURE__ */ m(r, {
|
|
24
|
+
className: "ttw:text-xs",
|
|
25
|
+
children: x.recurrenceEmailDescription
|
|
26
|
+
})]
|
|
27
|
+
}), f.ready && /* @__PURE__ */ h("form", {
|
|
23
28
|
onSubmit: (e) => {
|
|
24
|
-
e.preventDefault(), e.stopPropagation(),
|
|
29
|
+
e.preventDefault(), e.stopPropagation(), f.saveDisabled || y();
|
|
25
30
|
},
|
|
26
|
-
children: [
|
|
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
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
31
|
+
children: [/* @__PURE__ */ h("div", {
|
|
32
|
+
className: "ttw:flex ttw:flex-col ttw:gap-2.5 ttw:p-6",
|
|
33
|
+
children: [
|
|
34
|
+
/* @__PURE__ */ m(_, {
|
|
35
|
+
label: x.recurrenceEmailTo,
|
|
36
|
+
htmlFor: S.to,
|
|
37
|
+
children: /* @__PURE__ */ m(c, {
|
|
38
|
+
id: S.to,
|
|
39
|
+
value: f.to,
|
|
40
|
+
onChange: (e) => v("to", e),
|
|
41
|
+
inputValue: f.toInput,
|
|
42
|
+
onInputValueChange: (e) => v("toInput", e),
|
|
43
|
+
removeTagLabel: f.removeRecipientLabel,
|
|
44
|
+
placeholder: f.showToPlaceholder ? x.recurrenceEmailRecipientPlaceholder : void 0
|
|
45
|
+
})
|
|
46
|
+
}),
|
|
47
|
+
/* @__PURE__ */ m(_, {
|
|
48
|
+
label: x.recurrenceEmailCc,
|
|
49
|
+
htmlFor: S.cc,
|
|
50
|
+
children: /* @__PURE__ */ m(c, {
|
|
51
|
+
id: S.cc,
|
|
52
|
+
value: f.cc,
|
|
53
|
+
onChange: (e) => v("cc", e),
|
|
54
|
+
inputValue: f.ccInput,
|
|
55
|
+
onInputValueChange: (e) => v("ccInput", e),
|
|
56
|
+
removeTagLabel: f.removeRecipientLabel
|
|
57
|
+
})
|
|
58
|
+
}),
|
|
59
|
+
/* @__PURE__ */ m(_, {
|
|
60
|
+
label: x.recurrenceEmailBcc,
|
|
61
|
+
htmlFor: S.bcc,
|
|
62
|
+
children: /* @__PURE__ */ m(c, {
|
|
63
|
+
id: S.bcc,
|
|
64
|
+
value: f.bcc,
|
|
65
|
+
onChange: (e) => v("bcc", e),
|
|
66
|
+
inputValue: f.bccInput,
|
|
67
|
+
onInputValueChange: (e) => v("bccInput", e),
|
|
68
|
+
removeTagLabel: f.removeRecipientLabel
|
|
69
|
+
})
|
|
70
|
+
}),
|
|
71
|
+
/* @__PURE__ */ m(_, {
|
|
72
|
+
label: x.recurrenceEmailSubject,
|
|
73
|
+
htmlFor: S.subject,
|
|
74
|
+
children: /* @__PURE__ */ m(s, {
|
|
75
|
+
id: S.subject,
|
|
76
|
+
value: f.subject,
|
|
77
|
+
onChange: (e) => v("subject", e.target.value)
|
|
78
|
+
})
|
|
79
|
+
}),
|
|
80
|
+
/* @__PURE__ */ m(_, {
|
|
81
|
+
label: x.recurrenceEmailMessage,
|
|
82
|
+
htmlFor: S.message,
|
|
83
|
+
alignTop: !0,
|
|
84
|
+
children: /* @__PURE__ */ m(u, {
|
|
85
|
+
id: S.message,
|
|
86
|
+
placeholder: x.recurrenceEmailMessagePlaceholder,
|
|
87
|
+
value: f.message,
|
|
88
|
+
onChange: (e) => v("message", e.target.value)
|
|
89
|
+
})
|
|
90
|
+
}),
|
|
91
|
+
/* @__PURE__ */ m(d, {
|
|
92
|
+
variant: "caption",
|
|
93
|
+
color: "muted",
|
|
94
|
+
className: "ttw:pl-20",
|
|
95
|
+
children: x.recurrenceEmailFootnote
|
|
96
|
+
})
|
|
97
|
+
]
|
|
98
|
+
}), /* @__PURE__ */ h(i, {
|
|
99
|
+
className: "ttw:flex ttw:flex-row ttw:gap-4 ttw:border-t ttw:border-border ttw:p-6",
|
|
100
|
+
children: [/* @__PURE__ */ m(e, {
|
|
85
101
|
type: "button",
|
|
86
102
|
variant: "outline",
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
103
|
+
className: "ttw:flex-1",
|
|
104
|
+
onClick: () => g(!1),
|
|
105
|
+
children: x.recurrenceEmailCancel
|
|
106
|
+
}), /* @__PURE__ */ m(e, {
|
|
90
107
|
type: "submit",
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
108
|
+
className: "ttw:flex-1",
|
|
109
|
+
disabled: f.saveDisabled,
|
|
110
|
+
children: x.recurrenceEmailSave
|
|
111
|
+
})]
|
|
112
|
+
})]
|
|
95
113
|
})]
|
|
96
114
|
})
|
|
97
115
|
});
|
|
98
116
|
}
|
|
117
|
+
function _({ label: e, htmlFor: t, alignTop: n = !1, children: r }) {
|
|
118
|
+
return /* @__PURE__ */ h("div", {
|
|
119
|
+
className: f("ttw:flex ttw:gap-4", n ? "ttw:items-start" : "ttw:items-center"),
|
|
120
|
+
children: [/* @__PURE__ */ m(l, {
|
|
121
|
+
htmlFor: t,
|
|
122
|
+
className: f("ttw:w-16 ttw:shrink-0 ttw:font-normal ttw:text-muted-foreground", n && "ttw:pt-2"),
|
|
123
|
+
children: e
|
|
124
|
+
}), /* @__PURE__ */ m("div", {
|
|
125
|
+
className: "ttw:flex-1",
|
|
126
|
+
children: r
|
|
127
|
+
})]
|
|
128
|
+
});
|
|
129
|
+
}
|
|
99
130
|
//#endregion
|
|
100
|
-
export {
|
|
131
|
+
export { g as ReceivableRecurrenceEmailDialog, g as default };
|
|
@@ -32,16 +32,23 @@ function y({ idPrefix: y, view: b, disabled: x, onFrequencyChange: S, onMonthDay
|
|
|
32
32
|
"aria-invalid": n.invalid || void 0,
|
|
33
33
|
className: "ttw:flex-row-reverse ttw:justify-between ttw:text-foreground ttw:[&>svg]:mr-0"
|
|
34
34
|
})
|
|
35
|
-
}), R = (e) => /* @__PURE__ */ _(h, { children: [/* @__PURE__ */
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
35
|
+
}), R = (e) => /* @__PURE__ */ _(h, { children: [/* @__PURE__ */ _("div", {
|
|
36
|
+
className: "ttw:relative",
|
|
37
|
+
children: [/* @__PURE__ */ g(r, {
|
|
38
|
+
id: P.occurrences,
|
|
39
|
+
className: "ttw:w-16",
|
|
40
|
+
type: "text",
|
|
41
|
+
inputMode: "numeric",
|
|
42
|
+
value: e.value,
|
|
43
|
+
disabled: x,
|
|
44
|
+
"aria-invalid": e.invalid || void 0,
|
|
45
|
+
"aria-describedby": F?.maxOccurrencesError ? `${P.occurrences}-error` : void 0,
|
|
46
|
+
onChange: (e) => O(e.target.value)
|
|
47
|
+
}), F?.maxOccurrencesError && /* @__PURE__ */ g(n, {
|
|
48
|
+
id: `${P.occurrences}-error`,
|
|
49
|
+
className: "ttw:absolute ttw:top-full ttw:left-0 ttw:mt-1 ttw:text-nowrap",
|
|
50
|
+
errors: [{ message: F.maxOccurrencesError }]
|
|
51
|
+
})]
|
|
45
52
|
}), /* @__PURE__ */ g(i, {
|
|
46
53
|
htmlFor: P.occurrences,
|
|
47
54
|
className: v,
|
|
@@ -103,7 +110,7 @@ function y({ idPrefix: y, view: b, disabled: x, onFrequencyChange: S, onMonthDay
|
|
|
103
110
|
color: "muted",
|
|
104
111
|
component: "span",
|
|
105
112
|
className: "ttw:text-nowrap",
|
|
106
|
-
children:
|
|
113
|
+
children: b.monthDay.trailLabel
|
|
107
114
|
})
|
|
108
115
|
] }),
|
|
109
116
|
b.weekday && /* @__PURE__ */ _(h, { children: [/* @__PURE__ */ g(d, {
|
|
@@ -125,7 +132,7 @@ function y({ idPrefix: y, view: b, disabled: x, onFrequencyChange: S, onMonthDay
|
|
|
125
132
|
]
|
|
126
133
|
}),
|
|
127
134
|
F && /* @__PURE__ */ _("div", {
|
|
128
|
-
className: "ttw:flex ttw:flex-wrap ttw:items-center ttw:gap-2.5",
|
|
135
|
+
className: f("ttw:flex ttw:flex-wrap ttw:items-center ttw:gap-2.5", F.maxOccurrencesError && "ttw:pb-6"),
|
|
129
136
|
children: [
|
|
130
137
|
/* @__PURE__ */ g(i, {
|
|
131
138
|
htmlFor: P.startDate,
|
|
@@ -162,10 +169,6 @@ function y({ idPrefix: y, view: b, disabled: x, onFrequencyChange: S, onMonthDay
|
|
|
162
169
|
}), R(F.end.occurrences)] })
|
|
163
170
|
]
|
|
164
171
|
}),
|
|
165
|
-
F?.maxOccurrencesError && /* @__PURE__ */ g(n, {
|
|
166
|
-
id: `${P.occurrences}-error`,
|
|
167
|
-
errors: [{ message: F.maxOccurrencesError }]
|
|
168
|
-
}),
|
|
169
172
|
j,
|
|
170
173
|
b.lastDayCaption && /* @__PURE__ */ g(d, {
|
|
171
174
|
variant: "caption",
|
|
@@ -4,191 +4,225 @@ import { ErrorState as c } from "../../../shared/ui/dist/lib/ErrorState/ErrorSta
|
|
|
4
4
|
import "../../../shared/ui/dist/index.js";
|
|
5
5
|
import { RECEIVABLES_SCREEN_LABELS_EN as l } from "./index14.js";
|
|
6
6
|
import { ReceivableStatusBadge as u } from "./index25.js";
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
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";
|
|
10
11
|
//#region ../../libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index57.js
|
|
11
|
-
var
|
|
12
|
+
var x = [
|
|
12
13
|
10,
|
|
13
14
|
25,
|
|
14
15
|
50,
|
|
15
16
|
100
|
|
16
17
|
];
|
|
17
|
-
function
|
|
18
|
+
function S({ label: t, ariaLabel: n, column: r }) {
|
|
18
19
|
let i = r.getIsSorted();
|
|
19
|
-
return /* @__PURE__ */
|
|
20
|
+
return /* @__PURE__ */ m("div", {
|
|
20
21
|
className: "ttw:flex ttw:items-center ttw:gap-2 ttw:text-inherit",
|
|
21
|
-
children: [t, /* @__PURE__ */
|
|
22
|
+
children: [t, /* @__PURE__ */ p(e, {
|
|
22
23
|
variant: "ghost",
|
|
23
24
|
size: "icon-sm",
|
|
24
25
|
"aria-label": n,
|
|
25
26
|
onClick: () => r.toggleSorting(i === "asc"),
|
|
26
|
-
children:
|
|
27
|
+
children: p(i === "asc" ? _ : i === "desc" ? h : g, { className: "ttw:size-4" })
|
|
27
28
|
})]
|
|
28
29
|
});
|
|
29
30
|
}
|
|
30
|
-
function
|
|
31
|
-
return e.
|
|
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", {
|
|
32
65
|
className: "ttw:opacity-40",
|
|
33
66
|
children: e.customerLabel
|
|
34
|
-
}) : /* @__PURE__ */
|
|
67
|
+
}) : /* @__PURE__ */ p("span", { children: e.customerLabel });
|
|
35
68
|
}
|
|
36
|
-
function
|
|
37
|
-
let
|
|
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 = {
|
|
38
71
|
...l,
|
|
39
|
-
...
|
|
72
|
+
...W,
|
|
40
73
|
statusBadge: {
|
|
41
74
|
...l.statusBadge,
|
|
42
|
-
...
|
|
75
|
+
...W?.statusBadge
|
|
43
76
|
}
|
|
44
|
-
},
|
|
77
|
+
}, K = [
|
|
45
78
|
{
|
|
46
79
|
accessorKey: "dueDateLabel",
|
|
47
80
|
enableSorting: !0,
|
|
48
|
-
header: ({ column: e }) => /* @__PURE__ */
|
|
81
|
+
header: ({ column: e }) => /* @__PURE__ */ p(S, {
|
|
49
82
|
column: e,
|
|
50
|
-
label:
|
|
51
|
-
ariaLabel:
|
|
52
|
-
})
|
|
83
|
+
label: G.columnDueDate,
|
|
84
|
+
ariaLabel: G.sortByDueDate
|
|
85
|
+
}),
|
|
86
|
+
cell: ({ row: e }) => /* @__PURE__ */ p(C, { row: e.original })
|
|
53
87
|
},
|
|
54
88
|
{
|
|
55
89
|
accessorKey: "status",
|
|
56
90
|
enableSorting: !0,
|
|
57
|
-
header: ({ column: e }) => /* @__PURE__ */
|
|
91
|
+
header: ({ column: e }) => /* @__PURE__ */ p(S, {
|
|
58
92
|
column: e,
|
|
59
|
-
label:
|
|
60
|
-
ariaLabel:
|
|
93
|
+
label: G.columnStatus,
|
|
94
|
+
ariaLabel: G.sortByStatus
|
|
61
95
|
}),
|
|
62
|
-
cell: ({ row: e }) => /* @__PURE__ */
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
labels: U.statusBadge
|
|
96
|
+
cell: ({ row: e }) => /* @__PURE__ */ p(w, {
|
|
97
|
+
row: e.original,
|
|
98
|
+
statusBadgeLabels: G.statusBadge
|
|
66
99
|
})
|
|
67
100
|
},
|
|
68
101
|
{
|
|
69
102
|
accessorKey: "documentLabel",
|
|
70
103
|
enableSorting: !0,
|
|
71
|
-
header: ({ column: e }) => /* @__PURE__ */
|
|
104
|
+
header: ({ column: e }) => /* @__PURE__ */ p(S, {
|
|
72
105
|
column: e,
|
|
73
|
-
label:
|
|
74
|
-
ariaLabel:
|
|
75
|
-
})
|
|
106
|
+
label: G.columnNumber,
|
|
107
|
+
ariaLabel: G.sortByNumber
|
|
108
|
+
}),
|
|
109
|
+
cell: ({ row: e }) => /* @__PURE__ */ p(T, { row: e.original })
|
|
76
110
|
},
|
|
77
111
|
{
|
|
78
112
|
accessorKey: "customerLabel",
|
|
79
|
-
header:
|
|
80
|
-
cell: ({ row: e }) => /* @__PURE__ */
|
|
113
|
+
header: G.columnCustomer,
|
|
114
|
+
cell: ({ row: e }) => /* @__PURE__ */ p(E, { row: e.original }),
|
|
81
115
|
minSize: 180
|
|
82
116
|
},
|
|
83
117
|
{
|
|
84
118
|
accessorKey: "issueDateLabel",
|
|
85
119
|
enableSorting: !0,
|
|
86
|
-
header: ({ column: e }) => /* @__PURE__ */
|
|
120
|
+
header: ({ column: e }) => /* @__PURE__ */ p(S, {
|
|
87
121
|
column: e,
|
|
88
|
-
label:
|
|
89
|
-
ariaLabel:
|
|
122
|
+
label: G.columnIssueDate,
|
|
123
|
+
ariaLabel: G.sortByIssueDate
|
|
90
124
|
})
|
|
91
125
|
},
|
|
92
126
|
{
|
|
93
127
|
accessorKey: "totalLabel",
|
|
94
128
|
enableSorting: !0,
|
|
95
|
-
header: ({ column: e }) => /* @__PURE__ */
|
|
129
|
+
header: ({ column: e }) => /* @__PURE__ */ p("div", {
|
|
96
130
|
className: "ttw:flex ttw:justify-end",
|
|
97
|
-
children: /* @__PURE__ */
|
|
131
|
+
children: /* @__PURE__ */ p(S, {
|
|
98
132
|
column: e,
|
|
99
|
-
label:
|
|
100
|
-
ariaLabel:
|
|
133
|
+
label: G.columnAmount,
|
|
134
|
+
ariaLabel: G.sortByAmount
|
|
101
135
|
})
|
|
102
136
|
}),
|
|
103
|
-
cell: ({ row: e }) => /* @__PURE__ */
|
|
137
|
+
cell: ({ row: e }) => /* @__PURE__ */ p("div", {
|
|
104
138
|
className: "ttw:text-right",
|
|
105
139
|
children: e.original.totalLabel
|
|
106
140
|
})
|
|
107
141
|
}
|
|
108
142
|
];
|
|
109
|
-
return /* @__PURE__ */
|
|
143
|
+
return /* @__PURE__ */ m("div", {
|
|
110
144
|
className: "ttw:flex ttw:flex-col ttw:gap-4",
|
|
111
145
|
children: [
|
|
112
|
-
/* @__PURE__ */
|
|
146
|
+
/* @__PURE__ */ m("div", {
|
|
113
147
|
className: "ttw:flex ttw:justify-between ttw:gap-4",
|
|
114
|
-
children: [/* @__PURE__ */
|
|
148
|
+
children: [/* @__PURE__ */ m("div", {
|
|
115
149
|
className: "ttw:flex ttw:flex-col ttw:gap-2",
|
|
116
|
-
children: [
|
|
150
|
+
children: [R, z && /* @__PURE__ */ m("div", {
|
|
117
151
|
className: "ttw:flex ttw:items-center ttw:gap-2",
|
|
118
|
-
children: [/* @__PURE__ */
|
|
152
|
+
children: [/* @__PURE__ */ p("span", {
|
|
119
153
|
className: "ttw:text-muted-foreground",
|
|
120
|
-
children:
|
|
121
|
-
}), /* @__PURE__ */
|
|
154
|
+
children: G.bankAttributionPrefix
|
|
155
|
+
}), /* @__PURE__ */ p("img", {
|
|
122
156
|
width: 120,
|
|
123
|
-
src:
|
|
124
|
-
alt:
|
|
157
|
+
src: z.logoSrc,
|
|
158
|
+
alt: z.logoAlt
|
|
125
159
|
})]
|
|
126
160
|
})]
|
|
127
|
-
}), /* @__PURE__ */
|
|
161
|
+
}), /* @__PURE__ */ m("div", {
|
|
128
162
|
className: "ttw:flex ttw:items-center ttw:gap-2",
|
|
129
|
-
children: [
|
|
163
|
+
children: [V && /* @__PURE__ */ p(a, { children: /* @__PURE__ */ m(r, { children: [/* @__PURE__ */ p(o, {
|
|
130
164
|
asChild: !0,
|
|
131
|
-
children: /* @__PURE__ */
|
|
165
|
+
children: /* @__PURE__ */ p(e, {
|
|
132
166
|
type: "button",
|
|
133
167
|
variant: "outline",
|
|
134
168
|
size: "lg",
|
|
135
|
-
"aria-label":
|
|
136
|
-
onClick:
|
|
137
|
-
children: /* @__PURE__ */
|
|
169
|
+
"aria-label": G.settingsButton,
|
|
170
|
+
onClick: V,
|
|
171
|
+
children: /* @__PURE__ */ p(v, {
|
|
138
172
|
className: "ttw:size-4.5",
|
|
139
173
|
"aria-hidden": !0
|
|
140
174
|
})
|
|
141
175
|
})
|
|
142
|
-
}), /* @__PURE__ */
|
|
176
|
+
}), /* @__PURE__ */ p(i, {
|
|
143
177
|
sideOffset: 4,
|
|
144
|
-
children:
|
|
145
|
-
})] }) }),
|
|
178
|
+
children: G.settingsButton
|
|
179
|
+
})] }) }), B && /* @__PURE__ */ p(e, {
|
|
146
180
|
size: "lg",
|
|
147
|
-
onClick:
|
|
148
|
-
children:
|
|
181
|
+
onClick: B,
|
|
182
|
+
children: G.createInvoiceButton
|
|
149
183
|
})]
|
|
150
184
|
})]
|
|
151
185
|
}),
|
|
152
|
-
!
|
|
153
|
-
view:
|
|
154
|
-
onSelect:
|
|
155
|
-
labels: { all:
|
|
186
|
+
!h && P && F && /* @__PURE__ */ p(f, {
|
|
187
|
+
view: P,
|
|
188
|
+
onSelect: F,
|
|
189
|
+
labels: { all: G.statusCardsAll }
|
|
156
190
|
}),
|
|
157
|
-
|
|
158
|
-
icon: /* @__PURE__ */
|
|
159
|
-
title:
|
|
160
|
-
description:
|
|
161
|
-
}) :
|
|
162
|
-
|
|
163
|
-
description: U.errorDescription,
|
|
164
|
-
retryLabel: V ? U.errorRetry : void 0,
|
|
165
|
-
onRetry: V
|
|
166
|
-
}) : /* @__PURE__ */ f(t, {
|
|
167
|
-
columns: W,
|
|
191
|
+
h ? /* @__PURE__ */ p(c, {
|
|
192
|
+
icon: /* @__PURE__ */ p(y, { className: "ttw:size-8 ttw:text-primary" }),
|
|
193
|
+
title: G.accessRestrictedTitle,
|
|
194
|
+
description: G.accessRestrictedDescription
|
|
195
|
+
}) : /* @__PURE__ */ p(t, {
|
|
196
|
+
columns: K,
|
|
168
197
|
data: n,
|
|
169
|
-
isLoading:
|
|
170
|
-
sorting:
|
|
171
|
-
onSortingChange:
|
|
172
|
-
pageSize:
|
|
173
|
-
onPageSizeChange:
|
|
174
|
-
pageSizeOptions:
|
|
175
|
-
pageInfo:
|
|
176
|
-
hasNextPage:
|
|
177
|
-
hasPrevPage:
|
|
178
|
-
onNextPage:
|
|
179
|
-
onPrevPage:
|
|
180
|
-
onRowClick:
|
|
181
|
-
rowAriaLabel: (e) =>
|
|
182
|
-
filterComponent:
|
|
183
|
-
children: /* @__PURE__ */
|
|
184
|
-
title:
|
|
185
|
-
description:
|
|
186
|
-
|
|
187
|
-
|
|
198
|
+
isLoading: u,
|
|
199
|
+
sorting: g,
|
|
200
|
+
onSortingChange: _,
|
|
201
|
+
pageSize: b,
|
|
202
|
+
onPageSizeChange: D,
|
|
203
|
+
pageSizeOptions: O,
|
|
204
|
+
pageInfo: k,
|
|
205
|
+
hasNextPage: A,
|
|
206
|
+
hasPrevPage: j,
|
|
207
|
+
onNextPage: M,
|
|
208
|
+
onPrevPage: N,
|
|
209
|
+
onRowClick: H,
|
|
210
|
+
rowAriaLabel: (e) => G.openRow(e.documentLabel),
|
|
211
|
+
filterComponent: I,
|
|
212
|
+
children: d && !L ? /* @__PURE__ */ p(c, {
|
|
213
|
+
title: G.errorTitle,
|
|
214
|
+
description: G.errorDescription,
|
|
215
|
+
retryLabel: U ? G.errorRetry : void 0,
|
|
216
|
+
onRetry: U
|
|
217
|
+
}) : /* @__PURE__ */ p(s, {
|
|
218
|
+
title: L ? G.filterEmptyTitle : G.emptyTitle,
|
|
219
|
+
description: L ? void 0 : G.emptyDescription,
|
|
220
|
+
actionLabel: L ? void 0 : G.createInvoiceButton,
|
|
221
|
+
onAction: L ? void 0 : B
|
|
188
222
|
})
|
|
189
223
|
})
|
|
190
224
|
]
|
|
191
225
|
});
|
|
192
226
|
}
|
|
193
227
|
//#endregion
|
|
194
|
-
export {
|
|
228
|
+
export { D as ReceivablesScreen, D as default };
|