@tesouro/embedded-components-react 0.4.4 → 0.4.6
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 +37 -37
- package/dist/index.d.ts +14 -8
- package/dist/lib/CreditCardsWidget.d.ts +4 -2
- package/dist/lib/DebitCardsWidget.d.ts +4 -2
- package/dist/lib/WidgetSuite.d.ts +14 -8
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index.js +8 -8
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index10.js +50 -29
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index11.js +39 -30
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index12.js +26 -311
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index13.js +326 -12
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index14.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index15.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index4.js +13 -27
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index5.js +28 -245
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index6.js +256 -92
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index7.js +86 -73
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index8.js +77 -14
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index9.js +18 -63
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index.js +4 -4
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index10.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index14.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index22.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index29.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index3.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index30.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index31.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index32.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index33.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index35.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index37.js +72 -56
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index38.js +77 -48
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index39.js +47 -91
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index40.js +91 -33
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index41.js +33 -167
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index42.js +168 -75
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index43.js +75 -21
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index44.js +23 -210
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index45.js +199 -203
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index46.js +198 -89
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index47.js +105 -13
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index48.js +12 -47
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index49.js +47 -31
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index50.js +27 -198
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index51.js +198 -30
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index52.js +30 -234
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index53.js +240 -18
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index54.js +19 -341
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index55.js +344 -4
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index56.js +4 -33
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index57.js +32 -83
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index58.js +25 -25
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index59.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index65.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index7.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index76.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index77.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index9.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index25.js +2 -0
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index26.js +28 -3
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index56.js +2 -0
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index57.js +152 -131
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index97.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index98.js +32 -27
- package/dist/libs/tesouro-embedded-components-react/cards-widget/ui/dist/lib/CardsList/CardsList.js +84 -87
- package/dist/libs/tesouro-embedded-components-react/cards-widget/ui/dist/lib/CardsList/labels.js +0 -1
- package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/analytics/build-info.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/widget-suite/feature/dist/index4.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/widget-suite/feature/dist/index9.js +12 -10
- package/package.json +1 -1
|
@@ -9,9 +9,11 @@ var r = {
|
|
|
9
9
|
errorTitle: "Couldn't load this bill",
|
|
10
10
|
errorDescription: "Something went wrong. Try again.",
|
|
11
11
|
amountDueHeading: "Amount due",
|
|
12
|
+
amountPaidHeading: "Amount paid",
|
|
12
13
|
invoiceDateLabel: "Invoice date",
|
|
13
14
|
dueDateLabel: "Due date",
|
|
14
15
|
payToHeading: "Pay to",
|
|
16
|
+
payToHeadingPaid: "Paid to",
|
|
15
17
|
vendorRow: "Vendor",
|
|
16
18
|
paymentInstructionsRow: "Payment instructions",
|
|
17
19
|
addPaymentInstructions: "Add payment instructions",
|
|
@@ -56,7 +56,28 @@ function x({ view: x, actions: S = d, scheduledSummary: C, paymentInstructionsFo
|
|
|
56
56
|
/* @__PURE__ */ h("section", {
|
|
57
57
|
className: "ttw:flex ttw:flex-col ttw:gap-3 ttw:rounded-lg ttw:bg-muted/50 ttw:p-4",
|
|
58
58
|
children: [
|
|
59
|
-
/* @__PURE__ */ h("div", {
|
|
59
|
+
x.paidOnLabel ? /* @__PURE__ */ h("div", {
|
|
60
|
+
className: "ttw:grid ttw:grid-cols-2 ttw:gap-x-6",
|
|
61
|
+
children: [/* @__PURE__ */ h("div", {
|
|
62
|
+
className: "ttw:flex ttw:flex-col ttw:gap-1",
|
|
63
|
+
children: [/* @__PURE__ */ m("span", {
|
|
64
|
+
className: "ttw:text-sm ttw:text-muted-foreground",
|
|
65
|
+
children: O.amountDueHeading
|
|
66
|
+
}), /* @__PURE__ */ m("span", {
|
|
67
|
+
className: "ttw:text-3xl ttw:font-semibold",
|
|
68
|
+
children: x.amountDue
|
|
69
|
+
})]
|
|
70
|
+
}), /* @__PURE__ */ h("div", {
|
|
71
|
+
className: "ttw:flex ttw:flex-col ttw:gap-1",
|
|
72
|
+
children: [/* @__PURE__ */ m("span", {
|
|
73
|
+
className: "ttw:text-sm ttw:text-muted-foreground",
|
|
74
|
+
children: O.amountPaidHeading
|
|
75
|
+
}), /* @__PURE__ */ m("span", {
|
|
76
|
+
className: "ttw:text-3xl ttw:font-semibold ttw:text-emerald-600",
|
|
77
|
+
children: x.amountPaid
|
|
78
|
+
})]
|
|
79
|
+
})]
|
|
80
|
+
}) : /* @__PURE__ */ h("div", {
|
|
60
81
|
className: "ttw:flex ttw:flex-col ttw:gap-1",
|
|
61
82
|
children: [/* @__PURE__ */ m("span", {
|
|
62
83
|
className: "ttw:text-sm ttw:text-muted-foreground",
|
|
@@ -66,7 +87,11 @@ function x({ view: x, actions: S = d, scheduledSummary: C, paymentInstructionsFo
|
|
|
66
87
|
children: x.amountDue
|
|
67
88
|
})]
|
|
68
89
|
}),
|
|
69
|
-
/* @__PURE__ */ m("div", { children: /* @__PURE__ */ m(
|
|
90
|
+
/* @__PURE__ */ m("div", { children: x.paidOnLabel ? /* @__PURE__ */ m(e, {
|
|
91
|
+
variant: "outline",
|
|
92
|
+
className: "ttw:border-emerald-200 ttw:bg-emerald-50 ttw:text-emerald-700",
|
|
93
|
+
children: x.paidOnLabel
|
|
94
|
+
}) : /* @__PURE__ */ m(s, {
|
|
70
95
|
status: x.status,
|
|
71
96
|
tone: x.statusTone,
|
|
72
97
|
labels: O.statusBadge
|
|
@@ -113,7 +138,7 @@ function x({ view: x, actions: S = d, scheduledSummary: C, paymentInstructionsFo
|
|
|
113
138
|
children: [
|
|
114
139
|
/* @__PURE__ */ m("h3", {
|
|
115
140
|
className: v,
|
|
116
|
-
children: O.payToHeading
|
|
141
|
+
children: x.paidOnLabel ? O.payToHeadingPaid : O.payToHeading
|
|
117
142
|
}),
|
|
118
143
|
/* @__PURE__ */ h("div", {
|
|
119
144
|
className: b,
|
|
@@ -16,9 +16,11 @@ var o = {
|
|
|
16
16
|
errorTitle: "Couldn't load this bill",
|
|
17
17
|
errorDescription: "Something went wrong. Try again.",
|
|
18
18
|
amountDueHeading: "Amount due",
|
|
19
|
+
amountPaidHeading: "Amount paid",
|
|
19
20
|
invoiceDateLabel: "Invoice date",
|
|
20
21
|
dueDateLabel: "Due date",
|
|
21
22
|
payToHeading: "Pay to",
|
|
23
|
+
payToHeadingPaid: "Paid to",
|
|
22
24
|
invoiceDetailsHeading: "Invoice details",
|
|
23
25
|
lineItemsHeading: "Line items",
|
|
24
26
|
lineItemsQuantityHeading: "Qty/Price",
|
|
@@ -1,31 +1,31 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { ApprovalPolicyCard as
|
|
1
|
+
import { Badge as e, Button as t, Collapsible as n, CollapsibleContent as r, CollapsibleTrigger as i, Sheet as a, SheetContent as o, SheetDescription as s, SheetHeader as c, SheetTitle as l, Skeleton as u, Typography as d } from "../../../../../packages/shared-ui-shadcn/dist/index.js";
|
|
2
|
+
import { ApprovalPolicyCard as f } from "./index13.js";
|
|
3
3
|
import "./index14.js";
|
|
4
|
-
import { BillOverflowMenu as
|
|
4
|
+
import { BillOverflowMenu as p } from "./index16.js";
|
|
5
5
|
import "./index17.js";
|
|
6
|
-
import { BillStatusBadge as
|
|
6
|
+
import { BillStatusBadge as m } from "./index20.js";
|
|
7
7
|
import "./index21.js";
|
|
8
|
-
import { DueDateValue as
|
|
8
|
+
import { DueDateValue as h } from "./index23.js";
|
|
9
9
|
import "./index24.js";
|
|
10
|
-
import { BillActionButtons as
|
|
11
|
-
import { BILL_DETAILS_SHEET_LABELS_EN as
|
|
12
|
-
import { Fragment as
|
|
13
|
-
import { ChevronDownIcon as
|
|
10
|
+
import { BillActionButtons as g, NO_BILL_ACTIONS as _ } from "./index15.js";
|
|
11
|
+
import { BILL_DETAILS_SHEET_LABELS_EN as v } from "./index56.js";
|
|
12
|
+
import { Fragment as y, jsx as b, jsxs as x } from "react/jsx-runtime";
|
|
13
|
+
import { ChevronDownIcon as S, MoveDiagonal2Icon as C, XIcon as w } from "lucide-react";
|
|
14
14
|
//#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index57.js
|
|
15
|
-
function
|
|
16
|
-
return /* @__PURE__ */
|
|
15
|
+
function T({ items: e }) {
|
|
16
|
+
return /* @__PURE__ */ b("dl", {
|
|
17
17
|
className: "ttw:flex ttw:flex-col",
|
|
18
|
-
children: e.map((e) => /* @__PURE__ */
|
|
18
|
+
children: e.map((e) => /* @__PURE__ */ x("div", {
|
|
19
19
|
className: "ttw:flex ttw:items-start ttw:justify-between ttw:gap-6 ttw:border-b ttw:border-border ttw:py-3 ttw:last:border-b-0",
|
|
20
|
-
children: [/* @__PURE__ */
|
|
20
|
+
children: [/* @__PURE__ */ b("dt", {
|
|
21
21
|
className: "ttw:text-sm ttw:text-muted-foreground",
|
|
22
22
|
children: e.label
|
|
23
|
-
}), /* @__PURE__ */
|
|
23
|
+
}), /* @__PURE__ */ x("dd", {
|
|
24
24
|
className: "ttw:flex ttw:flex-col ttw:items-end ttw:text-right",
|
|
25
|
-
children: [/* @__PURE__ */
|
|
25
|
+
children: [/* @__PURE__ */ b("span", {
|
|
26
26
|
className: "ttw:text-sm ttw:font-medium",
|
|
27
27
|
children: e.value
|
|
28
|
-
}), e.secondaryValue ? /* @__PURE__ */
|
|
28
|
+
}), e.secondaryValue ? /* @__PURE__ */ b("span", {
|
|
29
29
|
className: "ttw:text-sm ttw:text-muted-foreground",
|
|
30
30
|
children: e.secondaryValue
|
|
31
31
|
}) : null]
|
|
@@ -33,229 +33,250 @@ function w({ items: e }) {
|
|
|
33
33
|
}, e.label))
|
|
34
34
|
});
|
|
35
35
|
}
|
|
36
|
-
function
|
|
37
|
-
return /* @__PURE__ */
|
|
36
|
+
function E({ heading: e, children: t }) {
|
|
37
|
+
return /* @__PURE__ */ x(n, {
|
|
38
38
|
defaultOpen: !0,
|
|
39
39
|
className: "ttw:flex ttw:flex-col ttw:gap-3",
|
|
40
|
-
children: [/* @__PURE__ */
|
|
40
|
+
children: [/* @__PURE__ */ x(i, {
|
|
41
41
|
className: "ttw:group ttw:flex ttw:w-full ttw:items-center ttw:justify-between ttw:rounded-xs ttw:focus-visible:ring-2 ttw:focus-visible:ring-ring ttw:focus-visible:outline-hidden",
|
|
42
|
-
children: [/* @__PURE__ */
|
|
42
|
+
children: [/* @__PURE__ */ b(d, {
|
|
43
43
|
variant: "body1",
|
|
44
44
|
className: "ttw:font-semibold",
|
|
45
45
|
children: e
|
|
46
|
-
}), /* @__PURE__ */
|
|
47
|
-
}), /* @__PURE__ */
|
|
46
|
+
}), /* @__PURE__ */ b(S, { className: "ttw:size-4 ttw:text-muted-foreground ttw:transition-transform ttw:group-data-[state=closed]:-rotate-90" })]
|
|
47
|
+
}), /* @__PURE__ */ b(r, { children: t })]
|
|
48
48
|
});
|
|
49
49
|
}
|
|
50
|
-
function
|
|
51
|
-
let
|
|
52
|
-
...
|
|
53
|
-
...
|
|
50
|
+
function D({ open: n, onOpenChange: r, details: i, actions: d = _, approvalPolicy: S, isLoading: D, isError: O, notice: k, onClose: A, onExpand: j, testId: M, labels: N }) {
|
|
51
|
+
let P = {
|
|
52
|
+
...v,
|
|
53
|
+
...N,
|
|
54
54
|
statusBadge: {
|
|
55
|
-
...
|
|
56
|
-
...
|
|
55
|
+
...v.statusBadge,
|
|
56
|
+
...N?.statusBadge
|
|
57
57
|
},
|
|
58
58
|
approvalPolicy: {
|
|
59
|
-
...
|
|
60
|
-
...
|
|
59
|
+
...v.approvalPolicy,
|
|
60
|
+
...N?.approvalPolicy
|
|
61
61
|
},
|
|
62
62
|
dueDate: {
|
|
63
|
-
...
|
|
64
|
-
...
|
|
63
|
+
...v.dueDate,
|
|
64
|
+
...N?.dueDate
|
|
65
65
|
}
|
|
66
66
|
};
|
|
67
|
-
return /* @__PURE__ */
|
|
68
|
-
open:
|
|
69
|
-
onOpenChange: (e) => e ?
|
|
70
|
-
children: /* @__PURE__ */
|
|
67
|
+
return /* @__PURE__ */ b(a, {
|
|
68
|
+
open: n,
|
|
69
|
+
onOpenChange: (e) => e ? r(e) : A(),
|
|
70
|
+
children: /* @__PURE__ */ x(o, {
|
|
71
71
|
showCloseButton: !1,
|
|
72
72
|
className: "ttw:w-150 ttw:gap-0 ttw:overflow-y-auto ttw:sm:max-w-150",
|
|
73
|
-
"data-testid":
|
|
74
|
-
children: [/* @__PURE__ */
|
|
73
|
+
"data-testid": M,
|
|
74
|
+
children: [/* @__PURE__ */ x(c, {
|
|
75
75
|
className: "ttw:flex ttw:flex-row ttw:items-start ttw:justify-between ttw:gap-3",
|
|
76
|
-
children: [/* @__PURE__ */
|
|
76
|
+
children: [/* @__PURE__ */ x("div", {
|
|
77
77
|
className: "ttw:flex ttw:flex-col ttw:gap-0.5",
|
|
78
78
|
children: [
|
|
79
|
-
/* @__PURE__ */
|
|
80
|
-
className:
|
|
81
|
-
children:
|
|
79
|
+
/* @__PURE__ */ b(l, {
|
|
80
|
+
className: D ? "ttw:sr-only" : "ttw:text-xl ttw:font-semibold",
|
|
81
|
+
children: O ? P.errorTitle : D ? P.loadingTitle : i?.title
|
|
82
82
|
}),
|
|
83
|
-
|
|
83
|
+
D ? /* @__PURE__ */ x("div", {
|
|
84
84
|
"aria-hidden": !0,
|
|
85
85
|
className: "ttw:flex ttw:flex-col ttw:gap-2 ttw:py-1",
|
|
86
|
-
children: [/* @__PURE__ */
|
|
86
|
+
children: [/* @__PURE__ */ b(u, { className: "ttw:h-6 ttw:w-48" }), /* @__PURE__ */ b(u, { className: "ttw:h-4 ttw:w-28" })]
|
|
87
87
|
}) : null,
|
|
88
|
-
|
|
88
|
+
i && !D && !O ? /* @__PURE__ */ b("p", {
|
|
89
89
|
className: "ttw:text-sm ttw:text-muted-foreground",
|
|
90
|
-
children:
|
|
90
|
+
children: i.subtitle
|
|
91
91
|
}) : null,
|
|
92
|
-
/* @__PURE__ */
|
|
92
|
+
/* @__PURE__ */ b(s, {
|
|
93
93
|
className: "ttw:sr-only",
|
|
94
|
-
children:
|
|
94
|
+
children: P.hiddenDescription
|
|
95
95
|
})
|
|
96
96
|
]
|
|
97
|
-
}), /* @__PURE__ */
|
|
97
|
+
}), /* @__PURE__ */ x("div", {
|
|
98
98
|
className: "ttw:flex ttw:items-center ttw:gap-1",
|
|
99
99
|
children: [
|
|
100
|
-
|
|
100
|
+
j ? /* @__PURE__ */ b(t, {
|
|
101
101
|
type: "button",
|
|
102
102
|
variant: "ghost",
|
|
103
103
|
size: "icon",
|
|
104
|
-
"aria-label":
|
|
105
|
-
onClick:
|
|
106
|
-
children: /* @__PURE__ */
|
|
104
|
+
"aria-label": P.expandButton,
|
|
105
|
+
onClick: j,
|
|
106
|
+
children: /* @__PURE__ */ b(C, { className: "ttw:size-4" })
|
|
107
107
|
}) : null,
|
|
108
|
-
|
|
109
|
-
actions:
|
|
110
|
-
triggerLabel:
|
|
108
|
+
i && !D && !O ? /* @__PURE__ */ b(p, {
|
|
109
|
+
actions: d.menu,
|
|
110
|
+
triggerLabel: P.overflowMenuTrigger,
|
|
111
111
|
placement: "header"
|
|
112
112
|
}) : null,
|
|
113
|
-
/* @__PURE__ */
|
|
113
|
+
/* @__PURE__ */ b(t, {
|
|
114
114
|
type: "button",
|
|
115
115
|
variant: "ghost",
|
|
116
116
|
size: "icon",
|
|
117
|
-
"aria-label":
|
|
118
|
-
onClick:
|
|
119
|
-
children: /* @__PURE__ */
|
|
117
|
+
"aria-label": P.closeButton,
|
|
118
|
+
onClick: A,
|
|
119
|
+
children: /* @__PURE__ */ b(w, { className: "ttw:size-4" })
|
|
120
120
|
})
|
|
121
121
|
]
|
|
122
122
|
})]
|
|
123
|
-
}), /* @__PURE__ */
|
|
123
|
+
}), /* @__PURE__ */ b("div", {
|
|
124
124
|
className: "ttw:flex ttw:flex-col ttw:gap-6 ttw:px-6 ttw:pb-6",
|
|
125
|
-
children:
|
|
125
|
+
children: O ? /* @__PURE__ */ b("p", {
|
|
126
126
|
className: "ttw:text-sm ttw:text-muted-foreground",
|
|
127
|
-
children:
|
|
128
|
-
}) :
|
|
127
|
+
children: P.errorDescription
|
|
128
|
+
}) : D ? /* @__PURE__ */ x("div", {
|
|
129
129
|
className: "ttw:flex ttw:flex-col ttw:gap-6",
|
|
130
|
-
children: [/* @__PURE__ */
|
|
130
|
+
children: [/* @__PURE__ */ b(u, { className: "ttw:h-32 ttw:w-full" }), /* @__PURE__ */ x("div", {
|
|
131
131
|
className: "ttw:flex ttw:flex-col ttw:gap-2",
|
|
132
132
|
children: [
|
|
133
|
-
/* @__PURE__ */
|
|
134
|
-
/* @__PURE__ */
|
|
135
|
-
/* @__PURE__ */
|
|
133
|
+
/* @__PURE__ */ b(u, { className: "ttw:h-4 ttw:w-40" }),
|
|
134
|
+
/* @__PURE__ */ b(u, { className: "ttw:h-9 ttw:w-full" }),
|
|
135
|
+
/* @__PURE__ */ b(u, { className: "ttw:h-9 ttw:w-full" })
|
|
136
136
|
]
|
|
137
137
|
})]
|
|
138
|
-
}) :
|
|
139
|
-
|
|
140
|
-
/* @__PURE__ */
|
|
138
|
+
}) : i ? /* @__PURE__ */ x(y, { children: [
|
|
139
|
+
k,
|
|
140
|
+
/* @__PURE__ */ x("section", {
|
|
141
141
|
className: "ttw:flex ttw:flex-col ttw:gap-3 ttw:rounded-lg ttw:bg-muted/50 ttw:p-4",
|
|
142
142
|
children: [
|
|
143
|
-
/* @__PURE__ */
|
|
143
|
+
/* @__PURE__ */ x("div", {
|
|
144
144
|
className: "ttw:flex ttw:flex-col ttw:gap-2",
|
|
145
|
-
children: [
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
145
|
+
children: [i.paidOnLabel ? /* @__PURE__ */ x("div", {
|
|
146
|
+
className: "ttw:grid ttw:grid-cols-2 ttw:gap-x-6",
|
|
147
|
+
children: [/* @__PURE__ */ x("div", {
|
|
148
|
+
className: "ttw:flex ttw:flex-col",
|
|
149
|
+
children: [/* @__PURE__ */ b("span", {
|
|
150
|
+
className: "ttw:text-sm ttw:text-muted-foreground",
|
|
151
|
+
children: P.amountDueHeading
|
|
152
|
+
}), /* @__PURE__ */ b("span", {
|
|
153
|
+
className: "ttw:text-3xl ttw:font-semibold",
|
|
154
|
+
children: i.amountDueLabel
|
|
155
|
+
})]
|
|
156
|
+
}), /* @__PURE__ */ x("div", {
|
|
157
|
+
className: "ttw:flex ttw:flex-col",
|
|
158
|
+
children: [/* @__PURE__ */ b("span", {
|
|
159
|
+
className: "ttw:text-sm ttw:text-muted-foreground",
|
|
160
|
+
children: P.amountPaidHeading
|
|
161
|
+
}), /* @__PURE__ */ b("span", {
|
|
162
|
+
className: "ttw:text-3xl ttw:font-semibold ttw:text-emerald-600",
|
|
163
|
+
children: i.amountPaidLabel
|
|
164
|
+
})]
|
|
165
|
+
})]
|
|
166
|
+
}) : /* @__PURE__ */ x(y, { children: [/* @__PURE__ */ b("span", {
|
|
167
|
+
className: "ttw:text-sm ttw:text-muted-foreground",
|
|
168
|
+
children: P.amountDueHeading
|
|
169
|
+
}), /* @__PURE__ */ b("span", {
|
|
170
|
+
className: "ttw:text-3xl ttw:font-semibold",
|
|
171
|
+
children: i.amountDueLabel
|
|
172
|
+
})] }), /* @__PURE__ */ b("div", { children: i.paidOnLabel ? /* @__PURE__ */ b(e, {
|
|
173
|
+
variant: "outline",
|
|
174
|
+
className: "ttw:border-emerald-200 ttw:bg-emerald-50 ttw:text-emerald-700",
|
|
175
|
+
children: i.paidOnLabel
|
|
176
|
+
}) : /* @__PURE__ */ b(m, {
|
|
177
|
+
status: i.status,
|
|
178
|
+
tone: i.statusTone,
|
|
179
|
+
labels: P.statusBadge
|
|
180
|
+
}) })]
|
|
160
181
|
}),
|
|
161
|
-
/* @__PURE__ */
|
|
182
|
+
/* @__PURE__ */ x("div", {
|
|
162
183
|
className: "ttw:grid ttw:grid-cols-2 ttw:gap-x-6 ttw:gap-y-1",
|
|
163
|
-
children: [/* @__PURE__ */
|
|
184
|
+
children: [/* @__PURE__ */ x("div", {
|
|
164
185
|
className: "ttw:flex ttw:flex-col",
|
|
165
|
-
children: [/* @__PURE__ */
|
|
186
|
+
children: [/* @__PURE__ */ b("span", {
|
|
166
187
|
className: "ttw:text-xs ttw:text-muted-foreground",
|
|
167
|
-
children:
|
|
168
|
-
}), /* @__PURE__ */
|
|
188
|
+
children: P.invoiceDateLabel
|
|
189
|
+
}), /* @__PURE__ */ b("span", {
|
|
169
190
|
className: "ttw:text-sm ttw:font-medium",
|
|
170
|
-
children:
|
|
191
|
+
children: i.invoiceDateLabel
|
|
171
192
|
})]
|
|
172
|
-
}), /* @__PURE__ */
|
|
193
|
+
}), /* @__PURE__ */ x("div", {
|
|
173
194
|
className: "ttw:flex ttw:flex-col",
|
|
174
|
-
children: [/* @__PURE__ */
|
|
195
|
+
children: [/* @__PURE__ */ b("span", {
|
|
175
196
|
className: "ttw:text-xs ttw:text-muted-foreground",
|
|
176
|
-
children:
|
|
177
|
-
}), /* @__PURE__ */
|
|
197
|
+
children: P.dueDateLabel
|
|
198
|
+
}), /* @__PURE__ */ b(h, {
|
|
178
199
|
className: "ttw:text-sm ttw:font-medium",
|
|
179
|
-
value:
|
|
180
|
-
tone:
|
|
181
|
-
labels:
|
|
200
|
+
value: i.dueDateLabel,
|
|
201
|
+
tone: i.dueDateTone,
|
|
202
|
+
labels: P.dueDate
|
|
182
203
|
})]
|
|
183
204
|
})]
|
|
184
205
|
}),
|
|
185
|
-
|
|
206
|
+
d.row.length ? /* @__PURE__ */ b("div", {
|
|
186
207
|
className: "ttw:flex ttw:items-center ttw:gap-2",
|
|
187
|
-
children: /* @__PURE__ */
|
|
208
|
+
children: /* @__PURE__ */ b(g, { actions: d.row })
|
|
188
209
|
}) : null
|
|
189
210
|
]
|
|
190
211
|
}),
|
|
191
|
-
/* @__PURE__ */
|
|
192
|
-
heading:
|
|
193
|
-
children: /* @__PURE__ */
|
|
212
|
+
/* @__PURE__ */ b(E, {
|
|
213
|
+
heading: i.paidOnLabel ? P.payToHeadingPaid : P.payToHeading,
|
|
214
|
+
children: /* @__PURE__ */ b(T, { items: i.payToItems })
|
|
194
215
|
}),
|
|
195
|
-
/* @__PURE__ */
|
|
196
|
-
heading:
|
|
197
|
-
children: /* @__PURE__ */
|
|
216
|
+
/* @__PURE__ */ b(E, {
|
|
217
|
+
heading: P.invoiceDetailsHeading,
|
|
218
|
+
children: /* @__PURE__ */ x("div", {
|
|
198
219
|
className: "ttw:flex ttw:flex-col ttw:gap-4",
|
|
199
220
|
children: [
|
|
200
|
-
/* @__PURE__ */
|
|
201
|
-
|
|
221
|
+
/* @__PURE__ */ b(T, { items: i.invoiceItems }),
|
|
222
|
+
i.lineItems.length ? /* @__PURE__ */ x("table", {
|
|
202
223
|
className: "ttw:w-full ttw:text-sm",
|
|
203
|
-
children: [/* @__PURE__ */
|
|
224
|
+
children: [/* @__PURE__ */ b("thead", { children: /* @__PURE__ */ x("tr", {
|
|
204
225
|
className: "ttw:bg-muted/50 ttw:text-xs ttw:text-muted-foreground",
|
|
205
226
|
children: [
|
|
206
|
-
/* @__PURE__ */
|
|
227
|
+
/* @__PURE__ */ b("th", {
|
|
207
228
|
className: "ttw:px-3 ttw:py-2 ttw:text-left ttw:font-normal",
|
|
208
|
-
children:
|
|
229
|
+
children: P.lineItemsHeading
|
|
209
230
|
}),
|
|
210
|
-
/* @__PURE__ */
|
|
231
|
+
/* @__PURE__ */ b("th", {
|
|
211
232
|
className: "ttw:px-3 ttw:py-2 ttw:text-right ttw:font-normal",
|
|
212
|
-
children:
|
|
233
|
+
children: P.lineItemsQuantityHeading
|
|
213
234
|
}),
|
|
214
|
-
/* @__PURE__ */
|
|
235
|
+
/* @__PURE__ */ b("th", {
|
|
215
236
|
className: "ttw:px-3 ttw:py-2 ttw:text-right ttw:font-normal",
|
|
216
|
-
children:
|
|
237
|
+
children: P.lineItemsAmountHeading
|
|
217
238
|
})
|
|
218
239
|
]
|
|
219
|
-
}) }), /* @__PURE__ */
|
|
240
|
+
}) }), /* @__PURE__ */ b("tbody", { children: i.lineItems.map((e) => /* @__PURE__ */ x("tr", {
|
|
220
241
|
className: "ttw:border-b ttw:border-border",
|
|
221
242
|
children: [
|
|
222
|
-
/* @__PURE__ */
|
|
243
|
+
/* @__PURE__ */ x("td", {
|
|
223
244
|
className: "ttw:px-3 ttw:py-2",
|
|
224
|
-
children: [/* @__PURE__ */
|
|
245
|
+
children: [/* @__PURE__ */ b("span", {
|
|
225
246
|
className: "ttw:block",
|
|
226
247
|
children: e.description
|
|
227
|
-
}), /* @__PURE__ */
|
|
248
|
+
}), /* @__PURE__ */ b("span", {
|
|
228
249
|
className: "ttw:block ttw:text-xs ttw:text-muted-foreground",
|
|
229
250
|
children: e.glCodeLabel
|
|
230
251
|
})]
|
|
231
252
|
}),
|
|
232
|
-
/* @__PURE__ */
|
|
253
|
+
/* @__PURE__ */ b("td", {
|
|
233
254
|
className: "ttw:px-3 ttw:py-2 ttw:text-right ttw:whitespace-nowrap ttw:text-muted-foreground",
|
|
234
255
|
children: e.quantityLabel
|
|
235
256
|
}),
|
|
236
|
-
/* @__PURE__ */
|
|
257
|
+
/* @__PURE__ */ b("td", {
|
|
237
258
|
className: "ttw:px-3 ttw:py-2 ttw:text-right ttw:whitespace-nowrap",
|
|
238
259
|
children: e.amountLabel
|
|
239
260
|
})
|
|
240
261
|
]
|
|
241
262
|
}, e.id)) })]
|
|
242
263
|
}) : null,
|
|
243
|
-
/* @__PURE__ */
|
|
264
|
+
/* @__PURE__ */ b("dl", {
|
|
244
265
|
className: "ttw:flex ttw:flex-col ttw:gap-1",
|
|
245
|
-
children:
|
|
266
|
+
children: i.totals.map((e) => /* @__PURE__ */ x("div", {
|
|
246
267
|
className: e.emphasis ? "ttw:flex ttw:justify-between ttw:gap-6 ttw:border-t ttw:border-border ttw:pt-2 ttw:text-base ttw:font-semibold" : "ttw:flex ttw:justify-between ttw:gap-6 ttw:text-sm",
|
|
247
|
-
children: [/* @__PURE__ */
|
|
268
|
+
children: [/* @__PURE__ */ b("dt", {
|
|
248
269
|
className: e.emphasis ? "" : "ttw:text-muted-foreground",
|
|
249
270
|
children: e.label
|
|
250
|
-
}), /* @__PURE__ */
|
|
271
|
+
}), /* @__PURE__ */ b("dd", { children: e.value })]
|
|
251
272
|
}, e.label))
|
|
252
273
|
})
|
|
253
274
|
]
|
|
254
275
|
})
|
|
255
276
|
}),
|
|
256
|
-
|
|
257
|
-
view:
|
|
258
|
-
labels:
|
|
277
|
+
S ? /* @__PURE__ */ b(f, {
|
|
278
|
+
view: S,
|
|
279
|
+
labels: P.approvalPolicy
|
|
259
280
|
}) : null
|
|
260
281
|
] }) : null
|
|
261
282
|
})]
|
|
@@ -263,4 +284,4 @@ function E({ open: t, onOpenChange: n, details: r, actions: u = g, approvalPolic
|
|
|
263
284
|
});
|
|
264
285
|
}
|
|
265
286
|
//#endregion
|
|
266
|
-
export {
|
|
287
|
+
export { D as BillDetailsSheet, D as default };
|
|
@@ -4,7 +4,7 @@ var e = {
|
|
|
4
4
|
description: "This bill has changes that have not been saved. Save it as a draft to finish later, or discard the changes.",
|
|
5
5
|
saveDraftButton: "Save as draft",
|
|
6
6
|
discardButton: "Discard changes",
|
|
7
|
-
|
|
7
|
+
closeButton: "Close"
|
|
8
8
|
};
|
|
9
9
|
//#endregion
|
|
10
10
|
export { e as UNSAVED_BILL_DIALOG_LABELS_EN };
|
|
@@ -1,47 +1,52 @@
|
|
|
1
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
2
|
import { UNSAVED_BILL_DIALOG_LABELS_EN as s } from "./index97.js";
|
|
3
3
|
import { jsx as c, jsxs as l } from "react/jsx-runtime";
|
|
4
|
+
import { XIcon as u } from "lucide-react";
|
|
4
5
|
//#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index98.js
|
|
5
|
-
function
|
|
6
|
-
let
|
|
6
|
+
function d({ open: d, onSaveDraft: f, onDiscard: p, onCancel: m, isSaving: h, isSaveDraftDisabled: g, labels: _, testId: v, saveDraftTestId: y, discardTestId: b, closeTestId: x }) {
|
|
7
|
+
let S = {
|
|
7
8
|
...s,
|
|
8
|
-
...
|
|
9
|
+
..._
|
|
9
10
|
};
|
|
10
11
|
return /* @__PURE__ */ c(e, {
|
|
11
|
-
open:
|
|
12
|
+
open: d,
|
|
12
13
|
onOpenChange: (e) => {
|
|
13
|
-
!e && !
|
|
14
|
+
!e && !h && m();
|
|
14
15
|
},
|
|
15
16
|
children: /* @__PURE__ */ l(t, {
|
|
16
|
-
"data-testid":
|
|
17
|
-
children: [
|
|
18
|
-
/* @__PURE__ */
|
|
17
|
+
"data-testid": v,
|
|
18
|
+
children: [
|
|
19
|
+
/* @__PURE__ */ l("button", {
|
|
19
20
|
type: "button",
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
21
|
+
onClick: m,
|
|
22
|
+
disabled: h,
|
|
23
|
+
"data-testid": x,
|
|
24
|
+
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",
|
|
25
|
+
children: [/* @__PURE__ */ c(u, { className: "ttw:size-4" }), /* @__PURE__ */ c("span", {
|
|
26
|
+
className: "ttw:sr-only",
|
|
27
|
+
children: S.closeButton
|
|
28
|
+
})]
|
|
24
29
|
}),
|
|
25
|
-
/* @__PURE__ */ c(
|
|
30
|
+
/* @__PURE__ */ l(i, { children: [/* @__PURE__ */ c(a, { children: S.title }), /* @__PURE__ */ c(n, { children: S.description })] }),
|
|
31
|
+
/* @__PURE__ */ l(r, { children: [/* @__PURE__ */ c(o, {
|
|
26
32
|
type: "button",
|
|
27
33
|
variant: "outline",
|
|
28
|
-
onClick:
|
|
29
|
-
disabled:
|
|
30
|
-
"data-testid":
|
|
31
|
-
children:
|
|
32
|
-
}),
|
|
33
|
-
/* @__PURE__ */ c(o, {
|
|
34
|
+
onClick: p,
|
|
35
|
+
disabled: h,
|
|
36
|
+
"data-testid": b,
|
|
37
|
+
children: S.discardButton
|
|
38
|
+
}), /* @__PURE__ */ c(o, {
|
|
34
39
|
type: "button",
|
|
35
40
|
variant: "default",
|
|
36
|
-
loading:
|
|
37
|
-
disabled:
|
|
38
|
-
onClick:
|
|
39
|
-
"data-testid":
|
|
40
|
-
children:
|
|
41
|
-
})
|
|
42
|
-
]
|
|
41
|
+
loading: h,
|
|
42
|
+
disabled: h || g,
|
|
43
|
+
onClick: f,
|
|
44
|
+
"data-testid": y,
|
|
45
|
+
children: S.saveDraftButton
|
|
46
|
+
})] })
|
|
47
|
+
]
|
|
43
48
|
})
|
|
44
49
|
});
|
|
45
50
|
}
|
|
46
51
|
//#endregion
|
|
47
|
-
export {
|
|
52
|
+
export { d as UnsavedBillDialog, d as default };
|