@tesouro/embedded-components-react 0.3.9 → 0.3.12
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.js +1 -1
- package/dist/lib/BillPayWidget.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index.js +8 -8
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index14.js +13 -14
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index15.js +7 -46
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index16.js +54 -16
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index17.js +24 -52
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index18.js +61 -113
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index19.js +123 -13
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index20.js +11 -31
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index21.js +40 -50
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index22.js +51 -5
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index23.js +5 -72
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index24.js +71 -48
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index25.js +48 -79
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index26.js +91 -33
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index27.js +33 -137
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index28.js +138 -67
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index29.js +63 -200
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index30.js +194 -184
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index31.js +180 -50
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index32.js +64 -12
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index33.js +12 -46
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index34.js +46 -30
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index35.js +26 -158
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index36.js +159 -31
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index37.js +32 -98
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index38.js +102 -13
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index39.js +13 -241
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index40.js +244 -4
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index41.js +4 -29
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index42.js +28 -81
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index43.js +77 -130
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index44.js +145 -3
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index45.js +3 -4
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index46.js +2 -43
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index47.js +45 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index48.js +1 -8
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index49.js +6 -9
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index50.js +9 -92
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index51.js +94 -3
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index52.js +3 -9
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index53.js +7 -20
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index54.js +14 -51
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index55.js +59 -3
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index56.js +3 -110
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index57.js +107 -8
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index58.js +8 -40
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index59.js +38 -15
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index60.js +18 -98
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index61.js +92 -173
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index62.js +180 -4
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index63.js +5 -8
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index64.js +6 -112
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index65.js +114 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index66.js +0 -24
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index67.js +25 -0
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index16.js +56 -18
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index46.js +4 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index47.js +75 -46
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index52.js +3 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index53.js +120 -115
- package/dist/libs/tesouro-embedded-components-react/cards-widget/feature/dist/index7.js +45 -44
- package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/rest/zod.gen.js +846 -817
- package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/scopes.js +1 -0
- 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/index7.js +1 -1
- package/dist/packages/shared-ui-shadcn/dist/index.js +1998 -1935
- package/package.json +1 -1
|
@@ -5,25 +5,25 @@ import { BillOverflowMenu as f } from "./index16.js";
|
|
|
5
5
|
import "./index17.js";
|
|
6
6
|
import { BillStatusBadge as p } from "./index20.js";
|
|
7
7
|
import "./index21.js";
|
|
8
|
-
import { BillActionButtons as m, NO_BILL_ACTIONS as h
|
|
9
|
-
import { BILL_DETAILS_SHEET_LABELS_EN as
|
|
10
|
-
import { Fragment as
|
|
11
|
-
import { ChevronDownIcon as
|
|
8
|
+
import { BillActionButtons as m, NO_BILL_ACTIONS as h } from "./index15.js";
|
|
9
|
+
import { BILL_DETAILS_SHEET_LABELS_EN as g } from "./index52.js";
|
|
10
|
+
import { Fragment as _, jsx as v, jsxs as y } from "react/jsx-runtime";
|
|
11
|
+
import { ChevronDownIcon as b, MoveDiagonal2Icon as x, XIcon as S } from "lucide-react";
|
|
12
12
|
//#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index53.js
|
|
13
|
-
function
|
|
14
|
-
return /* @__PURE__ */
|
|
13
|
+
function C({ items: e }) {
|
|
14
|
+
return /* @__PURE__ */ v("dl", {
|
|
15
15
|
className: "ttw:flex ttw:flex-col",
|
|
16
|
-
children: e.map((e) => /* @__PURE__ */
|
|
16
|
+
children: e.map((e) => /* @__PURE__ */ y("div", {
|
|
17
17
|
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",
|
|
18
|
-
children: [/* @__PURE__ */
|
|
18
|
+
children: [/* @__PURE__ */ v("dt", {
|
|
19
19
|
className: "ttw:text-sm ttw:text-muted-foreground",
|
|
20
20
|
children: e.label
|
|
21
|
-
}), /* @__PURE__ */
|
|
21
|
+
}), /* @__PURE__ */ y("dd", {
|
|
22
22
|
className: "ttw:flex ttw:flex-col ttw:items-end ttw:text-right",
|
|
23
|
-
children: [/* @__PURE__ */
|
|
23
|
+
children: [/* @__PURE__ */ v("span", {
|
|
24
24
|
className: "ttw:text-sm ttw:font-medium",
|
|
25
25
|
children: e.value
|
|
26
|
-
}), e.secondaryValue ? /* @__PURE__ */
|
|
26
|
+
}), e.secondaryValue ? /* @__PURE__ */ v("span", {
|
|
27
27
|
className: "ttw:text-sm ttw:text-muted-foreground",
|
|
28
28
|
children: e.secondaryValue
|
|
29
29
|
}) : null]
|
|
@@ -31,218 +31,223 @@ function w({ items: e }) {
|
|
|
31
31
|
}, e.label))
|
|
32
32
|
});
|
|
33
33
|
}
|
|
34
|
-
function
|
|
35
|
-
return /* @__PURE__ */
|
|
34
|
+
function w({ heading: e, children: i }) {
|
|
35
|
+
return /* @__PURE__ */ y(t, {
|
|
36
36
|
defaultOpen: !0,
|
|
37
37
|
className: "ttw:flex ttw:flex-col ttw:gap-3",
|
|
38
|
-
children: [/* @__PURE__ */
|
|
38
|
+
children: [/* @__PURE__ */ y(r, {
|
|
39
39
|
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",
|
|
40
|
-
children: [/* @__PURE__ */
|
|
40
|
+
children: [/* @__PURE__ */ v(u, {
|
|
41
41
|
variant: "body1",
|
|
42
42
|
className: "ttw:font-semibold",
|
|
43
43
|
children: e
|
|
44
|
-
}), /* @__PURE__ */
|
|
45
|
-
}), /* @__PURE__ */
|
|
44
|
+
}), /* @__PURE__ */ v(b, { className: "ttw:size-4 ttw:text-muted-foreground ttw:transition-transform ttw:group-data-[state=closed]:-rotate-90" })]
|
|
45
|
+
}), /* @__PURE__ */ v(n, { children: i })]
|
|
46
46
|
});
|
|
47
47
|
}
|
|
48
|
-
function
|
|
49
|
-
let
|
|
50
|
-
...
|
|
51
|
-
...
|
|
48
|
+
function T({ open: t, onOpenChange: n, details: r, actions: u = h, approvalPolicy: b, isLoading: T, isError: E, notice: D, onClose: O, onExpand: k, testId: A, labels: j }) {
|
|
49
|
+
let M = {
|
|
50
|
+
...g,
|
|
51
|
+
...j,
|
|
52
52
|
statusBadge: {
|
|
53
|
-
...
|
|
54
|
-
...
|
|
53
|
+
...g.statusBadge,
|
|
54
|
+
...j?.statusBadge
|
|
55
55
|
},
|
|
56
56
|
approvalPolicy: {
|
|
57
|
-
...
|
|
58
|
-
...
|
|
57
|
+
...g.approvalPolicy,
|
|
58
|
+
...j?.approvalPolicy
|
|
59
59
|
}
|
|
60
60
|
};
|
|
61
|
-
return /* @__PURE__ */
|
|
61
|
+
return /* @__PURE__ */ v(i, {
|
|
62
62
|
open: t,
|
|
63
|
-
onOpenChange: (e) => e ? n(e) :
|
|
64
|
-
children: /* @__PURE__ */
|
|
63
|
+
onOpenChange: (e) => e ? n(e) : O(),
|
|
64
|
+
children: /* @__PURE__ */ y(a, {
|
|
65
65
|
showCloseButton: !1,
|
|
66
66
|
className: "ttw:w-150 ttw:gap-0 ttw:overflow-y-auto ttw:sm:max-w-150",
|
|
67
|
-
"data-testid":
|
|
68
|
-
children: [/* @__PURE__ */
|
|
67
|
+
"data-testid": A,
|
|
68
|
+
children: [/* @__PURE__ */ y(s, {
|
|
69
69
|
className: "ttw:flex ttw:flex-row ttw:items-start ttw:justify-between ttw:gap-3",
|
|
70
|
-
children: [/* @__PURE__ */
|
|
70
|
+
children: [/* @__PURE__ */ y("div", {
|
|
71
71
|
className: "ttw:flex ttw:flex-col ttw:gap-0.5",
|
|
72
72
|
children: [
|
|
73
|
-
/* @__PURE__ */
|
|
74
|
-
className:
|
|
75
|
-
children:
|
|
73
|
+
/* @__PURE__ */ v(c, {
|
|
74
|
+
className: T ? "ttw:sr-only" : "ttw:text-xl ttw:font-semibold",
|
|
75
|
+
children: E ? M.errorTitle : T ? M.loadingTitle : r?.title
|
|
76
76
|
}),
|
|
77
|
-
|
|
77
|
+
T ? /* @__PURE__ */ y("div", {
|
|
78
78
|
"aria-hidden": !0,
|
|
79
79
|
className: "ttw:flex ttw:flex-col ttw:gap-2 ttw:py-1",
|
|
80
|
-
children: [/* @__PURE__ */
|
|
80
|
+
children: [/* @__PURE__ */ v(l, { className: "ttw:h-6 ttw:w-48" }), /* @__PURE__ */ v(l, { className: "ttw:h-4 ttw:w-28" })]
|
|
81
81
|
}) : null,
|
|
82
|
-
r && !
|
|
82
|
+
r && !T && !E ? /* @__PURE__ */ v("p", {
|
|
83
83
|
className: "ttw:text-sm ttw:text-muted-foreground",
|
|
84
84
|
children: r.subtitle
|
|
85
85
|
}) : null,
|
|
86
|
-
/* @__PURE__ */
|
|
86
|
+
/* @__PURE__ */ v(o, {
|
|
87
87
|
className: "ttw:sr-only",
|
|
88
|
-
children:
|
|
88
|
+
children: M.hiddenDescription
|
|
89
89
|
})
|
|
90
90
|
]
|
|
91
|
-
}), /* @__PURE__ */
|
|
91
|
+
}), /* @__PURE__ */ y("div", {
|
|
92
92
|
className: "ttw:flex ttw:items-center ttw:gap-1",
|
|
93
|
-
children: [
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
93
|
+
children: [
|
|
94
|
+
k ? /* @__PURE__ */ v(e, {
|
|
95
|
+
type: "button",
|
|
96
|
+
variant: "ghost",
|
|
97
|
+
size: "icon",
|
|
98
|
+
"aria-label": M.expandButton,
|
|
99
|
+
onClick: k,
|
|
100
|
+
children: /* @__PURE__ */ v(x, { className: "ttw:size-4" })
|
|
101
|
+
}) : null,
|
|
102
|
+
r && !T && !E ? /* @__PURE__ */ v(f, {
|
|
103
|
+
actions: u.menu,
|
|
104
|
+
triggerLabel: M.overflowMenuTrigger,
|
|
105
|
+
placement: "header"
|
|
106
|
+
}) : null,
|
|
107
|
+
/* @__PURE__ */ v(e, {
|
|
108
|
+
type: "button",
|
|
109
|
+
variant: "ghost",
|
|
110
|
+
size: "icon",
|
|
111
|
+
"aria-label": M.closeButton,
|
|
112
|
+
onClick: O,
|
|
113
|
+
children: /* @__PURE__ */ v(S, { className: "ttw:size-4" })
|
|
114
|
+
})
|
|
115
|
+
]
|
|
108
116
|
})]
|
|
109
|
-
}), /* @__PURE__ */
|
|
117
|
+
}), /* @__PURE__ */ v("div", {
|
|
110
118
|
className: "ttw:flex ttw:flex-col ttw:gap-6 ttw:px-6 ttw:pb-6",
|
|
111
|
-
children:
|
|
119
|
+
children: E ? /* @__PURE__ */ v("p", {
|
|
112
120
|
className: "ttw:text-sm ttw:text-muted-foreground",
|
|
113
|
-
children:
|
|
114
|
-
}) :
|
|
121
|
+
children: M.errorDescription
|
|
122
|
+
}) : T ? /* @__PURE__ */ y("div", {
|
|
115
123
|
className: "ttw:flex ttw:flex-col ttw:gap-6",
|
|
116
|
-
children: [/* @__PURE__ */
|
|
124
|
+
children: [/* @__PURE__ */ v(l, { className: "ttw:h-32 ttw:w-full" }), /* @__PURE__ */ y("div", {
|
|
117
125
|
className: "ttw:flex ttw:flex-col ttw:gap-2",
|
|
118
126
|
children: [
|
|
119
|
-
/* @__PURE__ */
|
|
120
|
-
/* @__PURE__ */
|
|
121
|
-
/* @__PURE__ */
|
|
127
|
+
/* @__PURE__ */ v(l, { className: "ttw:h-4 ttw:w-40" }),
|
|
128
|
+
/* @__PURE__ */ v(l, { className: "ttw:h-9 ttw:w-full" }),
|
|
129
|
+
/* @__PURE__ */ v(l, { className: "ttw:h-9 ttw:w-full" })
|
|
122
130
|
]
|
|
123
131
|
})]
|
|
124
|
-
}) : r ? /* @__PURE__ */
|
|
125
|
-
|
|
126
|
-
/* @__PURE__ */
|
|
132
|
+
}) : r ? /* @__PURE__ */ y(_, { children: [
|
|
133
|
+
D,
|
|
134
|
+
/* @__PURE__ */ y("section", {
|
|
127
135
|
className: "ttw:flex ttw:flex-col ttw:gap-3 ttw:rounded-lg ttw:bg-muted/50 ttw:p-4",
|
|
128
136
|
children: [
|
|
129
|
-
/* @__PURE__ */
|
|
137
|
+
/* @__PURE__ */ y("div", {
|
|
130
138
|
className: "ttw:flex ttw:flex-col ttw:gap-2",
|
|
131
139
|
children: [
|
|
132
|
-
/* @__PURE__ */
|
|
140
|
+
/* @__PURE__ */ v("span", {
|
|
133
141
|
className: "ttw:text-sm ttw:text-muted-foreground",
|
|
134
|
-
children:
|
|
142
|
+
children: M.amountDueHeading
|
|
135
143
|
}),
|
|
136
|
-
/* @__PURE__ */
|
|
144
|
+
/* @__PURE__ */ v("span", {
|
|
137
145
|
className: "ttw:text-3xl ttw:font-semibold",
|
|
138
146
|
children: r.amountDueLabel
|
|
139
147
|
}),
|
|
140
|
-
/* @__PURE__ */
|
|
148
|
+
/* @__PURE__ */ v("div", { children: /* @__PURE__ */ v(p, {
|
|
141
149
|
status: r.status,
|
|
142
150
|
tone: r.statusTone,
|
|
143
|
-
labels:
|
|
151
|
+
labels: M.statusBadge
|
|
144
152
|
}) })
|
|
145
153
|
]
|
|
146
154
|
}),
|
|
147
|
-
/* @__PURE__ */
|
|
155
|
+
/* @__PURE__ */ y("div", {
|
|
148
156
|
className: "ttw:grid ttw:grid-cols-2 ttw:gap-x-6 ttw:gap-y-1",
|
|
149
|
-
children: [/* @__PURE__ */
|
|
157
|
+
children: [/* @__PURE__ */ y("div", {
|
|
150
158
|
className: "ttw:flex ttw:flex-col",
|
|
151
|
-
children: [/* @__PURE__ */
|
|
159
|
+
children: [/* @__PURE__ */ v("span", {
|
|
152
160
|
className: "ttw:text-xs ttw:text-muted-foreground",
|
|
153
|
-
children:
|
|
154
|
-
}), /* @__PURE__ */
|
|
161
|
+
children: M.invoiceDateLabel
|
|
162
|
+
}), /* @__PURE__ */ v("span", {
|
|
155
163
|
className: "ttw:text-sm ttw:font-medium",
|
|
156
164
|
children: r.invoiceDateLabel
|
|
157
165
|
})]
|
|
158
|
-
}), /* @__PURE__ */
|
|
166
|
+
}), /* @__PURE__ */ y("div", {
|
|
159
167
|
className: "ttw:flex ttw:flex-col",
|
|
160
|
-
children: [/* @__PURE__ */
|
|
168
|
+
children: [/* @__PURE__ */ v("span", {
|
|
161
169
|
className: "ttw:text-xs ttw:text-muted-foreground",
|
|
162
|
-
children:
|
|
163
|
-
}), /* @__PURE__ */
|
|
170
|
+
children: M.dueDateLabel
|
|
171
|
+
}), /* @__PURE__ */ v("span", {
|
|
164
172
|
className: "ttw:text-sm ttw:font-medium",
|
|
165
173
|
children: r.dueDateLabel
|
|
166
174
|
})]
|
|
167
175
|
})]
|
|
168
176
|
}),
|
|
169
|
-
|
|
177
|
+
u.row.length ? /* @__PURE__ */ v("div", {
|
|
170
178
|
className: "ttw:flex ttw:items-center ttw:gap-2",
|
|
171
|
-
children:
|
|
172
|
-
actions: u.menu,
|
|
173
|
-
triggerLabel: N.overflowMenuTrigger
|
|
174
|
-
})]
|
|
179
|
+
children: /* @__PURE__ */ v(m, { actions: u.row })
|
|
175
180
|
}) : null
|
|
176
181
|
]
|
|
177
182
|
}),
|
|
178
|
-
/* @__PURE__ */
|
|
179
|
-
heading:
|
|
180
|
-
children: /* @__PURE__ */
|
|
183
|
+
/* @__PURE__ */ v(w, {
|
|
184
|
+
heading: M.payToHeading,
|
|
185
|
+
children: /* @__PURE__ */ v(C, { items: r.payToItems })
|
|
181
186
|
}),
|
|
182
|
-
/* @__PURE__ */
|
|
183
|
-
heading:
|
|
184
|
-
children: /* @__PURE__ */
|
|
187
|
+
/* @__PURE__ */ v(w, {
|
|
188
|
+
heading: M.invoiceDetailsHeading,
|
|
189
|
+
children: /* @__PURE__ */ y("div", {
|
|
185
190
|
className: "ttw:flex ttw:flex-col ttw:gap-4",
|
|
186
191
|
children: [
|
|
187
|
-
/* @__PURE__ */
|
|
188
|
-
r.lineItems.length ? /* @__PURE__ */
|
|
192
|
+
/* @__PURE__ */ v(C, { items: r.invoiceItems }),
|
|
193
|
+
r.lineItems.length ? /* @__PURE__ */ y("table", {
|
|
189
194
|
className: "ttw:w-full ttw:text-sm",
|
|
190
|
-
children: [/* @__PURE__ */
|
|
195
|
+
children: [/* @__PURE__ */ v("thead", { children: /* @__PURE__ */ y("tr", {
|
|
191
196
|
className: "ttw:bg-muted/50 ttw:text-xs ttw:text-muted-foreground",
|
|
192
197
|
children: [
|
|
193
|
-
/* @__PURE__ */
|
|
198
|
+
/* @__PURE__ */ v("th", {
|
|
194
199
|
className: "ttw:px-3 ttw:py-2 ttw:text-left ttw:font-normal",
|
|
195
|
-
children:
|
|
200
|
+
children: M.lineItemsHeading
|
|
196
201
|
}),
|
|
197
|
-
/* @__PURE__ */
|
|
202
|
+
/* @__PURE__ */ v("th", {
|
|
198
203
|
className: "ttw:px-3 ttw:py-2 ttw:text-right ttw:font-normal",
|
|
199
|
-
children:
|
|
204
|
+
children: M.lineItemsQuantityHeading
|
|
200
205
|
}),
|
|
201
|
-
/* @__PURE__ */
|
|
206
|
+
/* @__PURE__ */ v("th", {
|
|
202
207
|
className: "ttw:px-3 ttw:py-2 ttw:text-right ttw:font-normal",
|
|
203
|
-
children:
|
|
208
|
+
children: M.lineItemsAmountHeading
|
|
204
209
|
})
|
|
205
210
|
]
|
|
206
|
-
}) }), /* @__PURE__ */
|
|
211
|
+
}) }), /* @__PURE__ */ v("tbody", { children: r.lineItems.map((e) => /* @__PURE__ */ y("tr", {
|
|
207
212
|
className: "ttw:border-b ttw:border-border",
|
|
208
213
|
children: [
|
|
209
|
-
/* @__PURE__ */
|
|
214
|
+
/* @__PURE__ */ y("td", {
|
|
210
215
|
className: "ttw:px-3 ttw:py-2",
|
|
211
|
-
children: [/* @__PURE__ */
|
|
216
|
+
children: [/* @__PURE__ */ v("span", {
|
|
212
217
|
className: "ttw:block",
|
|
213
218
|
children: e.description
|
|
214
|
-
}), /* @__PURE__ */
|
|
219
|
+
}), /* @__PURE__ */ v("span", {
|
|
215
220
|
className: "ttw:block ttw:text-xs ttw:text-muted-foreground",
|
|
216
221
|
children: e.glCodeLabel
|
|
217
222
|
})]
|
|
218
223
|
}),
|
|
219
|
-
/* @__PURE__ */
|
|
224
|
+
/* @__PURE__ */ v("td", {
|
|
220
225
|
className: "ttw:px-3 ttw:py-2 ttw:text-right ttw:whitespace-nowrap ttw:text-muted-foreground",
|
|
221
226
|
children: e.quantityLabel
|
|
222
227
|
}),
|
|
223
|
-
/* @__PURE__ */
|
|
228
|
+
/* @__PURE__ */ v("td", {
|
|
224
229
|
className: "ttw:px-3 ttw:py-2 ttw:text-right ttw:whitespace-nowrap",
|
|
225
230
|
children: e.amountLabel
|
|
226
231
|
})
|
|
227
232
|
]
|
|
228
233
|
}, e.id)) })]
|
|
229
234
|
}) : null,
|
|
230
|
-
/* @__PURE__ */
|
|
235
|
+
/* @__PURE__ */ v("dl", {
|
|
231
236
|
className: "ttw:flex ttw:flex-col ttw:gap-1",
|
|
232
|
-
children: r.totals.map((e) => /* @__PURE__ */
|
|
237
|
+
children: r.totals.map((e) => /* @__PURE__ */ y("div", {
|
|
233
238
|
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",
|
|
234
|
-
children: [/* @__PURE__ */
|
|
239
|
+
children: [/* @__PURE__ */ v("dt", {
|
|
235
240
|
className: e.emphasis ? "" : "ttw:text-muted-foreground",
|
|
236
241
|
children: e.label
|
|
237
|
-
}), /* @__PURE__ */
|
|
242
|
+
}), /* @__PURE__ */ v("dd", { children: e.value })]
|
|
238
243
|
}, e.label))
|
|
239
244
|
})
|
|
240
245
|
]
|
|
241
246
|
})
|
|
242
247
|
}),
|
|
243
|
-
|
|
244
|
-
view:
|
|
245
|
-
labels:
|
|
248
|
+
b ? /* @__PURE__ */ v(d, {
|
|
249
|
+
view: b,
|
|
250
|
+
labels: M.approvalPolicy
|
|
246
251
|
}) : null
|
|
247
252
|
] }) : null
|
|
248
253
|
})]
|
|
@@ -250,4 +255,4 @@ function E({ open: t, onOpenChange: n, details: r, actions: u = h, approvalPolic
|
|
|
250
255
|
});
|
|
251
256
|
}
|
|
252
257
|
//#endregion
|
|
253
|
-
export {
|
|
258
|
+
export { T as BillDetailsSheet, T as default };
|
|
@@ -96,20 +96,21 @@ function d({ cardProgram: c, pagination: d, defaultPagination: f, onPaginationCh
|
|
|
96
96
|
A,
|
|
97
97
|
k
|
|
98
98
|
]);
|
|
99
|
-
let L = A ? Se : ke ? j : E, Ae = L.paginationToken, R = L.pageSize, z = {
|
|
99
|
+
let L = A ? Se : ke ? j : E, Ae = L.paginationToken, R = L.pageSize, z = I ? x : void 0, B = {
|
|
100
100
|
limit: R,
|
|
101
|
-
paginationToken: Ae
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
101
|
+
paginationToken: Ae
|
|
102
|
+
}, V = ue({
|
|
103
|
+
...B,
|
|
104
|
+
userId: z,
|
|
105
105
|
enabled: T && c === r.Credit
|
|
106
|
-
}),
|
|
107
|
-
...
|
|
106
|
+
}), H = de({
|
|
107
|
+
...B,
|
|
108
|
+
cardholderUserId: z,
|
|
108
109
|
enabled: T && c === r.Debit
|
|
109
|
-
}),
|
|
110
|
+
}), U = c === r.Credit ? V : H, W = T && w.canReadFundingAccounts, G = e({ enabled: W }), K = o(() => {
|
|
110
111
|
let e = /* @__PURE__ */ new Map();
|
|
111
112
|
if (!w.canReadFundingAccounts) return e;
|
|
112
|
-
for (let t of
|
|
113
|
+
for (let t of G.data?.data ?? []) {
|
|
113
114
|
let n = t.nickname?.trim();
|
|
114
115
|
e.set(t.id, n ? {
|
|
115
116
|
name: n,
|
|
@@ -118,28 +119,28 @@ function d({ cardProgram: c, pagination: d, defaultPagination: f, onPaginationCh
|
|
|
118
119
|
}
|
|
119
120
|
return e;
|
|
120
121
|
}, [
|
|
121
|
-
|
|
122
|
+
G.data?.data,
|
|
122
123
|
_.untitledFundingAccount,
|
|
123
124
|
w.canReadFundingAccounts
|
|
124
|
-
]),
|
|
125
|
+
]), q = W && G.isError, je = W && !q && (G.isLoading || G.isFetchingNextPage || !!G.hasNextPage), J = o(() => T ? c === r.Credit ? ce(V.data?.data ?? []) : le(H.data?.data ?? []) : [], [
|
|
125
126
|
T,
|
|
126
127
|
c,
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
]), Me = o(() => se(
|
|
128
|
+
V.data?.data,
|
|
129
|
+
H.data?.data
|
|
130
|
+
]), Me = o(() => se(J, {
|
|
130
131
|
labels: _,
|
|
131
|
-
fundingAccountNames:
|
|
132
|
+
fundingAccountNames: K,
|
|
132
133
|
canActivate: w.canActivate,
|
|
133
134
|
onCardSelect: F,
|
|
134
135
|
onActivateCard: g
|
|
135
136
|
}), [
|
|
136
|
-
|
|
137
|
-
|
|
137
|
+
J,
|
|
138
|
+
K,
|
|
138
139
|
F,
|
|
139
140
|
_,
|
|
140
141
|
g,
|
|
141
142
|
w.canActivate
|
|
142
|
-
]),
|
|
143
|
+
]), Y = U.data?.nextPaginationToken ?? void 0, X = U.data?.prevPaginationToken ?? void 0, Ne = !!U.data, Z = T && (U.isError || q), Q = i((e) => {
|
|
143
144
|
A || M({
|
|
144
145
|
resetKey: k,
|
|
145
146
|
paginationToken: e.paginationToken,
|
|
@@ -149,42 +150,42 @@ function d({ cardProgram: c, pagination: d, defaultPagination: f, onPaginationCh
|
|
|
149
150
|
A,
|
|
150
151
|
p,
|
|
151
152
|
k
|
|
152
|
-
]),
|
|
153
|
-
|
|
153
|
+
]), $ = i(() => {
|
|
154
|
+
Q({
|
|
154
155
|
paginationToken: void 0,
|
|
155
156
|
pageSize: R
|
|
156
157
|
});
|
|
157
|
-
}, [
|
|
158
|
-
|
|
158
|
+
}, [Q, R]), Pe = i((e) => {
|
|
159
|
+
Q({
|
|
159
160
|
paginationToken: void 0,
|
|
160
161
|
pageSize: e
|
|
161
162
|
});
|
|
162
|
-
}, [
|
|
163
|
-
Ee(e),
|
|
164
|
-
}, [
|
|
165
|
-
|
|
166
|
-
paginationToken:
|
|
163
|
+
}, [Q]), Fe = i((e) => {
|
|
164
|
+
Ee(e), $();
|
|
165
|
+
}, [$]), Ie = i(() => {
|
|
166
|
+
Q({
|
|
167
|
+
paginationToken: X,
|
|
167
168
|
pageSize: R
|
|
168
169
|
});
|
|
169
170
|
}, [
|
|
170
|
-
|
|
171
|
+
Q,
|
|
171
172
|
R,
|
|
172
|
-
|
|
173
|
+
X
|
|
173
174
|
]), Le = i(() => {
|
|
174
|
-
|
|
175
|
-
paginationToken:
|
|
175
|
+
Q({
|
|
176
|
+
paginationToken: Y,
|
|
176
177
|
pageSize: R
|
|
177
178
|
});
|
|
178
179
|
}, [
|
|
179
|
-
|
|
180
|
-
|
|
180
|
+
Q,
|
|
181
|
+
Y,
|
|
181
182
|
R
|
|
182
|
-
]),
|
|
183
|
-
|
|
183
|
+
]), Re = U.refetch, ze = G.refetch, Be = i(() => {
|
|
184
|
+
Re(), W && ze();
|
|
184
185
|
}, [
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
186
|
+
W,
|
|
187
|
+
Re,
|
|
188
|
+
ze
|
|
188
189
|
]);
|
|
189
190
|
return {
|
|
190
191
|
rows: Me,
|
|
@@ -192,19 +193,19 @@ function d({ cardProgram: c, pagination: d, defaultPagination: f, onPaginationCh
|
|
|
192
193
|
onSelectCard: F,
|
|
193
194
|
canReadCards: w.canRead,
|
|
194
195
|
columns: oe[c],
|
|
195
|
-
isLoading: !S && (!C || xe && !b || T && (
|
|
196
|
-
isError: S ||
|
|
196
|
+
isLoading: !S && (!C || xe && !b || T && (U.isLoading || je)),
|
|
197
|
+
isError: S || Z,
|
|
197
198
|
canToggleShowMyCards: w.canRead && !!x,
|
|
198
199
|
isShowingMyCards: I,
|
|
199
200
|
onShowMyCardsChange: Fe,
|
|
200
201
|
canCreateCard: w.canCreate && (!!h || !!ye && w.canComposeDebitCreate),
|
|
201
202
|
onCreateCardClick: h,
|
|
202
|
-
onRetry:
|
|
203
|
-
isPaginationVisible: T && Ne && !
|
|
203
|
+
onRetry: Be,
|
|
204
|
+
isPaginationVisible: T && Ne && !Z,
|
|
204
205
|
pageSize: R,
|
|
205
206
|
pageSizeOptions: me,
|
|
206
|
-
isPreviousPageDisabled: !
|
|
207
|
-
isNextPageDisabled: !
|
|
207
|
+
isPreviousPageDisabled: !X,
|
|
208
|
+
isNextPageDisabled: !Y,
|
|
208
209
|
onPageSizeChange: Pe,
|
|
209
210
|
onPreviousPageClick: Ie,
|
|
210
211
|
onNextPageClick: Le
|