@tesouro/embedded-components-react 0.3.19 → 0.3.20
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 +4 -4
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index10.js +2 -2
- 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/index41.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index56.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index58.js +14 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index60.js +4 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index61.js +3 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index62.js +28 -97
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index63.js +81 -176
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index64.js +50 -4
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index65.js +250 -5
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index66.js +106 -107
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index67.js +209 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index68.js +3 -24
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index69.js +8 -0
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index7.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index70.js +114 -0
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index71.js +1 -0
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index72.js +25 -0
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index.js +21 -17
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index52.js +2 -0
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index59.js +36 -11
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index60.js +10 -283
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index61.js +199 -8
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index62.js +3 -8
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index63.js +14 -91
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index64.js +314 -0
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index65.js +10 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index66.js +4 -14
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index67.js +85 -105
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index69.js +2 -7
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index70.js +16 -28
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index71.js +113 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index72.js +2 -7
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index73.js +5 -32
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index74.js +30 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index75.js +2 -12
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index76.js +5 -104
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index77.js +34 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index78.js +2 -18
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index79.js +9 -7
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index80.js +81 -145
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index81.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index82.js +15 -11
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index83.js +8 -87
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index84.js +170 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index85.js +2 -0
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index86.js +14 -0
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index87.js +89 -0
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index88.js +2 -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 +16 -11
- package/package.json +1 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index68.js +0 -2
|
@@ -1,285 +1,12 @@
|
|
|
1
|
-
import { Alert as e, AlertTitle as t, Button as n, DataTable as r, DataTableSortableHeader as i, Input as a, Tabs as ee, TabsContent as te, TabsList as ne, TabsTrigger 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 { AddBillPanel as l } from "./index7.js";
|
|
6
|
-
import "./index8.js";
|
|
7
|
-
import { BillStatusBadge as re } from "./index20.js";
|
|
8
|
-
import "./index21.js";
|
|
9
|
-
import { MissingValue as u } from "./index50.js";
|
|
10
|
-
import "./index51.js";
|
|
11
|
-
import { BILLS_SCREEN_LABELS_EN as d, BILLS_SCREEN_UPLOAD_ACCEPT as f } from "./index52.js";
|
|
12
|
-
import { BillDuplicateBadge as ie } from "./index54.js";
|
|
13
|
-
import "./index55.js";
|
|
14
|
-
import { BillColumn as p } from "./index59.js";
|
|
15
|
-
import { useMemo as m } from "react";
|
|
16
|
-
import { jsx as h, jsxs as g } from "react/jsx-runtime";
|
|
17
|
-
import { ChevronRightIcon as _, CopyX as v, PlusIcon as y, SearchIcon as b } from "lucide-react";
|
|
18
1
|
//#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index60.js
|
|
19
|
-
var
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
p.PaidDate,
|
|
29
|
-
p.Status,
|
|
30
|
-
p.AmountDue,
|
|
31
|
-
p.AmountScheduled,
|
|
32
|
-
p.AmountPaid,
|
|
33
|
-
p.AddedOn
|
|
34
|
-
], x = [
|
|
35
|
-
p.Vendor,
|
|
36
|
-
p.DueDate,
|
|
37
|
-
p.Status,
|
|
38
|
-
p.AmountDue,
|
|
39
|
-
p.AddedOn
|
|
40
|
-
];
|
|
41
|
-
function S({ rows: S, isLoading: C, isError: w, sorting: se, onSortingChange: ce, pageSize: le, onPageSizeChange: ue, pageSizeOptions: T = ae, pageInfo: de, hasNextPage: E, hasPrevPage: D, onNextPage: O, onPrevPage: k, filterTabs: A, selectedFilterTabId: j, onFilterTabChange: M, searchValue: N, onSearchChange: P, visibleColumns: F = x, cellTestIds: I, isSearchActive: L, showAddPanelWhenEmpty: R, emptyState: z, onCreateClick: B, onRetry: V, onFilesSelected: H, maxFiles: U, onEnterManually: W, uploadStatus: G, uploadErrorMessage: K, emailAddress: q, onCopyEmail: J, labels: Y, duplicateWarning: X, onReviewDuplicates: Z }) {
|
|
42
|
-
let Q = m(() => ({
|
|
43
|
-
...d,
|
|
44
|
-
...Y,
|
|
45
|
-
statusBadge: {
|
|
46
|
-
...d.statusBadge,
|
|
47
|
-
...Y?.statusBadge
|
|
48
|
-
},
|
|
49
|
-
addBill: {
|
|
50
|
-
...d.addBill,
|
|
51
|
-
...Y?.addBill,
|
|
52
|
-
dropzone: {
|
|
53
|
-
...d.addBill.dropzone,
|
|
54
|
-
...Y?.addBill?.dropzone
|
|
55
|
-
}
|
|
56
|
-
},
|
|
57
|
-
sortableHeader: {
|
|
58
|
-
...d.sortableHeader,
|
|
59
|
-
...Y?.sortableHeader
|
|
60
|
-
},
|
|
61
|
-
missingValue: {
|
|
62
|
-
...d.missingValue,
|
|
63
|
-
...Y?.missingValue
|
|
64
|
-
}
|
|
65
|
-
}), [Y]), $ = m(() => {
|
|
66
|
-
let e = (e) => function({ column: t }) {
|
|
67
|
-
return /* @__PURE__ */ h(i, {
|
|
68
|
-
column: t,
|
|
69
|
-
title: e,
|
|
70
|
-
labels: Q.sortableHeader
|
|
71
|
-
});
|
|
72
|
-
}, t = (e, t) => function({ row: n }) {
|
|
73
|
-
return /* @__PURE__ */ h("span", {
|
|
74
|
-
"data-testid": I?.[t],
|
|
75
|
-
children: n.original[e] || /* @__PURE__ */ h(u, { labels: Q.missingValue })
|
|
76
|
-
});
|
|
77
|
-
}, n = (e, t) => function({ row: n }) {
|
|
78
|
-
return /* @__PURE__ */ h("div", {
|
|
79
|
-
className: "ttw:text-right",
|
|
80
|
-
"data-testid": I?.[t],
|
|
81
|
-
children: n.original[e] || /* @__PURE__ */ h(u, { labels: Q.missingValue })
|
|
82
|
-
});
|
|
83
|
-
}, r = (e) => function() {
|
|
84
|
-
return /* @__PURE__ */ h("div", {
|
|
85
|
-
className: "ttw:text-right",
|
|
86
|
-
children: e
|
|
87
|
-
});
|
|
88
|
-
};
|
|
89
|
-
return {
|
|
90
|
-
[p.Vendor]: {
|
|
91
|
-
accessorKey: "vendorLabel",
|
|
92
|
-
enableSorting: !0,
|
|
93
|
-
header: e(Q.columnVendor),
|
|
94
|
-
cell: t("vendorLabel", p.Vendor)
|
|
95
|
-
},
|
|
96
|
-
[p.DueDate]: {
|
|
97
|
-
accessorKey: "dueDateLabel",
|
|
98
|
-
enableSorting: !0,
|
|
99
|
-
header: e(Q.columnDueDate),
|
|
100
|
-
cell: t("dueDateLabel", p.DueDate)
|
|
101
|
-
},
|
|
102
|
-
[p.ScheduledDate]: {
|
|
103
|
-
accessorKey: "scheduledDateLabel",
|
|
104
|
-
enableSorting: !0,
|
|
105
|
-
header: e(Q.columnScheduledDate),
|
|
106
|
-
cell: t("scheduledDateLabel", p.ScheduledDate)
|
|
107
|
-
},
|
|
108
|
-
[p.PaidDate]: {
|
|
109
|
-
accessorKey: "paidDateLabel",
|
|
110
|
-
enableSorting: !1,
|
|
111
|
-
header: Q.columnPaidDate,
|
|
112
|
-
cell: t("paidDateLabel", p.PaidDate)
|
|
113
|
-
},
|
|
114
|
-
[p.Status]: {
|
|
115
|
-
accessorKey: "status",
|
|
116
|
-
enableSorting: !1,
|
|
117
|
-
header: Q.columnStatus,
|
|
118
|
-
cell: ({ row: e }) => /* @__PURE__ */ g("div", {
|
|
119
|
-
className: "ttw:flex ttw:items-center ttw:gap-1",
|
|
120
|
-
"data-testid": I?.[p.Status],
|
|
121
|
-
children: [/* @__PURE__ */ h(re, {
|
|
122
|
-
status: e.original.status,
|
|
123
|
-
tone: e.original.statusTone,
|
|
124
|
-
labels: Q.statusBadge
|
|
125
|
-
}), e.original.duplicateBadge ? /* @__PURE__ */ h(ie, { ...e.original.duplicateBadge }) : null]
|
|
126
|
-
})
|
|
127
|
-
},
|
|
128
|
-
[p.AmountDue]: {
|
|
129
|
-
accessorKey: "amountDueLabel",
|
|
130
|
-
enableSorting: !1,
|
|
131
|
-
header: r(Q.columnAmountDue),
|
|
132
|
-
cell: n("amountDueLabel", p.AmountDue)
|
|
133
|
-
},
|
|
134
|
-
[p.AmountScheduled]: {
|
|
135
|
-
accessorKey: "amountScheduledLabel",
|
|
136
|
-
enableSorting: !1,
|
|
137
|
-
header: r(Q.columnAmountScheduled),
|
|
138
|
-
cell: n("amountScheduledLabel", p.AmountScheduled)
|
|
139
|
-
},
|
|
140
|
-
[p.AmountPaid]: {
|
|
141
|
-
accessorKey: "amountPaidLabel",
|
|
142
|
-
enableSorting: !1,
|
|
143
|
-
header: r(Q.columnAmountPaid),
|
|
144
|
-
cell: n("amountPaidLabel", p.AmountPaid)
|
|
145
|
-
},
|
|
146
|
-
[p.AddedOn]: {
|
|
147
|
-
accessorKey: "addedOnLabel",
|
|
148
|
-
enableSorting: !0,
|
|
149
|
-
header: e(Q.columnAddedOn),
|
|
150
|
-
cell: t("addedOnLabel", p.AddedOn)
|
|
151
|
-
}
|
|
152
|
-
};
|
|
153
|
-
}, [Q, I]), fe = m(() => [...oe.filter((e) => F.includes(e)).map((e) => $[e]), {
|
|
154
|
-
id: "actions",
|
|
155
|
-
enableSorting: !1,
|
|
156
|
-
header: () => /* @__PURE__ */ h("span", {
|
|
157
|
-
className: "ttw:sr-only",
|
|
158
|
-
children: Q.columnActions
|
|
159
|
-
}),
|
|
160
|
-
cell: ({ row: e }) => /* @__PURE__ */ h("div", {
|
|
161
|
-
className: "ttw:flex ttw:justify-end",
|
|
162
|
-
children: /* @__PURE__ */ h(n, {
|
|
163
|
-
variant: "ghost",
|
|
164
|
-
size: "icon",
|
|
165
|
-
"aria-label": Q.openRow(e.original.vendorLabel || Q.missingValue.missing),
|
|
166
|
-
onClick: (t) => {
|
|
167
|
-
t.stopPropagation(), e.original.onOpen();
|
|
168
|
-
},
|
|
169
|
-
children: /* @__PURE__ */ h(_, { className: "ttw:size-4" })
|
|
170
|
-
})
|
|
171
|
-
})
|
|
172
|
-
}], [
|
|
173
|
-
$,
|
|
174
|
-
Q,
|
|
175
|
-
F
|
|
176
|
-
]), pe = !!(B && H) && !C && !w && !L && S.length === 0 && R === !0, me = /* @__PURE__ */ h("div", {
|
|
177
|
-
className: "ttw:flex ttw:flex-wrap ttw:items-center ttw:gap-2 ttw:px-4",
|
|
178
|
-
children: /* @__PURE__ */ g("div", {
|
|
179
|
-
className: "ttw:relative ttw:w-80",
|
|
180
|
-
children: [/* @__PURE__ */ h(b, { className: "ttw:pointer-events-none ttw:absolute ttw:left-3 ttw:top-1/2 ttw:size-4 ttw:-translate-y-1/2 ttw:text-muted-foreground" }), /* @__PURE__ */ h(a, {
|
|
181
|
-
className: "ttw:pl-9",
|
|
182
|
-
type: "search",
|
|
183
|
-
"aria-label": Q.searchLabel,
|
|
184
|
-
placeholder: Q.searchPlaceholder,
|
|
185
|
-
value: N,
|
|
186
|
-
onChange: (e) => P(e.target.value)
|
|
187
|
-
})]
|
|
188
|
-
})
|
|
189
|
-
});
|
|
190
|
-
return /* @__PURE__ */ g("div", {
|
|
191
|
-
className: "ttw:flex ttw:flex-col ttw:gap-3",
|
|
192
|
-
children: [X ? /* @__PURE__ */ g(e, {
|
|
193
|
-
className: "ttw:[&>svg]:size-6 ttw:flex ttw:items-center ttw:bg-amber-50 ttw:text-amber-700 ttw:border-amber-300",
|
|
194
|
-
children: [
|
|
195
|
-
/* @__PURE__ */ h(v, {}),
|
|
196
|
-
/* @__PURE__ */ h(t, {
|
|
197
|
-
className: "ttw:flex-1",
|
|
198
|
-
children: X
|
|
199
|
-
}),
|
|
200
|
-
Z ? /* @__PURE__ */ h(n, {
|
|
201
|
-
type: "button",
|
|
202
|
-
variant: "outline",
|
|
203
|
-
className: "ttw:text-foreground",
|
|
204
|
-
onClick: Z,
|
|
205
|
-
children: Q.duplicateBillsReviewButton
|
|
206
|
-
}) : null
|
|
207
|
-
]
|
|
208
|
-
}) : null, /* @__PURE__ */ g(ee, {
|
|
209
|
-
value: j,
|
|
210
|
-
onValueChange: M,
|
|
211
|
-
className: "ttw:flex ttw:flex-col ttw:gap-4",
|
|
212
|
-
children: [/* @__PURE__ */ g("div", {
|
|
213
|
-
className: "ttw:flex ttw:flex-wrap ttw:items-center ttw:justify-between ttw:gap-3",
|
|
214
|
-
children: [/* @__PURE__ */ h(ne, {
|
|
215
|
-
"aria-label": Q.filterTabsLabel,
|
|
216
|
-
children: A.map((e) => /* @__PURE__ */ g(o, {
|
|
217
|
-
value: e.id,
|
|
218
|
-
className: "ttw:min-w-28",
|
|
219
|
-
children: [e.icon, e.label]
|
|
220
|
-
}, e.id))
|
|
221
|
-
}), B ? /* @__PURE__ */ g(n, {
|
|
222
|
-
onClick: B,
|
|
223
|
-
children: [/* @__PURE__ */ h(y, { className: "ttw:size-4" }), Q.createButton]
|
|
224
|
-
}) : null]
|
|
225
|
-
}), (() => {
|
|
226
|
-
let e = w ? /* @__PURE__ */ h(c, {
|
|
227
|
-
title: Q.errorTitle,
|
|
228
|
-
description: Q.errorDescription,
|
|
229
|
-
retryLabel: V ? Q.errorRetry : void 0,
|
|
230
|
-
onRetry: V
|
|
231
|
-
}) : pe && B && H ? /* @__PURE__ */ h("div", {
|
|
232
|
-
className: "ttw:rounded-lg ttw:border ttw:border-border ttw:bg-card",
|
|
233
|
-
children: q && J ? /* @__PURE__ */ h(l, {
|
|
234
|
-
emailAddress: q,
|
|
235
|
-
onCopyEmail: J,
|
|
236
|
-
onFilesSelected: H,
|
|
237
|
-
accept: f,
|
|
238
|
-
maxFiles: U,
|
|
239
|
-
uploadStatus: G,
|
|
240
|
-
uploadErrorMessage: K,
|
|
241
|
-
onEnterManually: W ?? B,
|
|
242
|
-
labels: Q.addBill
|
|
243
|
-
}) : /* @__PURE__ */ h(l, {
|
|
244
|
-
onFilesSelected: H,
|
|
245
|
-
accept: f,
|
|
246
|
-
maxFiles: U,
|
|
247
|
-
uploadStatus: G,
|
|
248
|
-
uploadErrorMessage: K,
|
|
249
|
-
onEnterManually: W ?? B,
|
|
250
|
-
labels: Q.addBill
|
|
251
|
-
})
|
|
252
|
-
}) : /* @__PURE__ */ h(r, {
|
|
253
|
-
columns: fe,
|
|
254
|
-
data: S,
|
|
255
|
-
isLoading: C,
|
|
256
|
-
sorting: se,
|
|
257
|
-
onSortingChange: ce,
|
|
258
|
-
pageSize: le,
|
|
259
|
-
onPageSizeChange: ue,
|
|
260
|
-
pageSizeOptions: T,
|
|
261
|
-
pageInfo: de,
|
|
262
|
-
hasNextPage: E,
|
|
263
|
-
hasPrevPage: D,
|
|
264
|
-
onNextPage: O,
|
|
265
|
-
onPrevPage: k,
|
|
266
|
-
onRowClick: (e) => e.onOpen(),
|
|
267
|
-
filterComponent: me,
|
|
268
|
-
children: L ? /* @__PURE__ */ h(s, {
|
|
269
|
-
title: Q.filteredEmptyTitle,
|
|
270
|
-
description: Q.filteredEmptyDescription
|
|
271
|
-
}) : z ? /* @__PURE__ */ h(s, {
|
|
272
|
-
title: z.title,
|
|
273
|
-
description: z.description
|
|
274
|
-
}) : void 0
|
|
275
|
-
});
|
|
276
|
-
return A.map((t) => /* @__PURE__ */ h(te, {
|
|
277
|
-
value: t.id,
|
|
278
|
-
children: t.id === j ? e : null
|
|
279
|
-
}, t.id));
|
|
280
|
-
})()]
|
|
281
|
-
})]
|
|
282
|
-
});
|
|
283
|
-
}
|
|
2
|
+
var e = {
|
|
3
|
+
Vendor: "vendor",
|
|
4
|
+
IssueDate: "issueDate",
|
|
5
|
+
DueDate: "dueDate",
|
|
6
|
+
Status: "status",
|
|
7
|
+
TotalAmount: "totalAmount",
|
|
8
|
+
AddedOn: "addedOn",
|
|
9
|
+
Attachment: "attachment"
|
|
10
|
+
};
|
|
284
11
|
//#endregion
|
|
285
|
-
export {
|
|
12
|
+
export { e as BillsFilterField };
|
|
@@ -1,10 +1,201 @@
|
|
|
1
|
+
import { AmountFilter as e, DateRangePicker as t, FilterBar as n, FilterMenuButton as r, FilterTag as ee, Input as te, MultiSelectFilter as i, Popover as a, PopoverContent as o, PopoverTrigger as s, RadioGroup as c, RadioGroupItem as l, useFilterPanel as u } from "../../../../../packages/shared-ui-shadcn/dist/index.js";
|
|
2
|
+
import { BILLS_FILTER_BAR_LABELS_EN as d } from "./index59.js";
|
|
3
|
+
import { BillsFilterField as f } from "./index60.js";
|
|
4
|
+
import { useMemo as ne } from "react";
|
|
5
|
+
import { jsx as p, jsxs as m } from "react/jsx-runtime";
|
|
6
|
+
import { ListFilterIcon as h } from "lucide-react";
|
|
1
7
|
//#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index61.js
|
|
2
|
-
var
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
}
|
|
8
|
+
var g = {
|
|
9
|
+
date: "ttw:w-auto",
|
|
10
|
+
status: "ttw:w-56",
|
|
11
|
+
amount: "ttw:w-64",
|
|
12
|
+
vendor: "ttw:w-64",
|
|
13
|
+
attachment: "ttw:w-56"
|
|
14
|
+
}, _ = {
|
|
15
|
+
[f.Vendor]: "vendor",
|
|
16
|
+
[f.IssueDate]: "date",
|
|
17
|
+
[f.DueDate]: "date",
|
|
18
|
+
[f.Status]: "status",
|
|
19
|
+
[f.TotalAmount]: "amount",
|
|
20
|
+
[f.AddedOn]: "date",
|
|
21
|
+
[f.Attachment]: "attachment"
|
|
22
|
+
}, v = [
|
|
23
|
+
f.IssueDate,
|
|
24
|
+
f.DueDate,
|
|
25
|
+
f.AddedOn
|
|
26
|
+
];
|
|
27
|
+
function y({ fields: f, activeFilterCount: y, chips: b, onRemoveChip: x, onClearAll: S, dateField: C, onDateFieldChange: w, datePresets: T, selectedDatePreset: E, dateFrom: D, dateTo: O, onDateRangeChange: k, onDatePresetChange: A, statusOptions: j, selectedStatuses: M, onStatusChange: N, amountMode: P, onAmountModeChange: F, amountMin: I, amountMax: L, onAmountMinChange: re, onAmountMaxChange: R, vendorOptions: z, selectedVendors: B, onVendorChange: V, vendorSearchValue: H, onVendorSearchChange: U, isVendorLoading: W, isVendorError: G, hasAttachment: K, onHasAttachmentChange: q, searchSlot: J, testIds: Y, labels: X, className: ie }) {
|
|
28
|
+
let Z = ne(() => ({
|
|
29
|
+
...d,
|
|
30
|
+
...X,
|
|
31
|
+
fields: {
|
|
32
|
+
...d.fields,
|
|
33
|
+
...X?.fields
|
|
34
|
+
},
|
|
35
|
+
filterMenuButton: {
|
|
36
|
+
...d.filterMenuButton,
|
|
37
|
+
...X?.filterMenuButton
|
|
38
|
+
},
|
|
39
|
+
filterTag: {
|
|
40
|
+
...d.filterTag,
|
|
41
|
+
...X?.filterTag
|
|
42
|
+
},
|
|
43
|
+
amountFilter: {
|
|
44
|
+
...d.amountFilter,
|
|
45
|
+
...X?.amountFilter
|
|
46
|
+
},
|
|
47
|
+
dateRangePicker: {
|
|
48
|
+
...d.dateRangePicker,
|
|
49
|
+
...X?.dateRangePicker
|
|
50
|
+
}
|
|
51
|
+
}), [X]), Q = u(), $ = Q.activePanelId, ae = Q.isMenuOpen || !!$, oe = ($ && g[$]) ?? "ttw:w-52", se = (e) => {
|
|
52
|
+
$ && e.preventDefault(), Q.toggleMenu();
|
|
53
|
+
}, ce = (e) => {
|
|
54
|
+
e || (Q.closeMenu(), Q.closePanel());
|
|
55
|
+
}, le = (e) => {
|
|
56
|
+
v.includes(e) && w(e), Q.openPanel(_[e]);
|
|
57
|
+
}, ue = K === void 0 ? "any" : K ? "has" : "none", de = (e) => {
|
|
58
|
+
q(e === "any" ? void 0 : e === "has");
|
|
59
|
+
};
|
|
60
|
+
return /* @__PURE__ */ p(n, {
|
|
61
|
+
className: ie,
|
|
62
|
+
searchSlot: J,
|
|
63
|
+
menuSlot: /* @__PURE__ */ m(a, {
|
|
64
|
+
open: ae,
|
|
65
|
+
onOpenChange: ce,
|
|
66
|
+
children: [/* @__PURE__ */ p(s, {
|
|
67
|
+
asChild: !0,
|
|
68
|
+
children: /* @__PURE__ */ p(r, {
|
|
69
|
+
size: "md",
|
|
70
|
+
activeCount: y,
|
|
71
|
+
onClick: se,
|
|
72
|
+
labels: Z.filterMenuButton,
|
|
73
|
+
"data-testid": Y?.menuButton
|
|
74
|
+
})
|
|
75
|
+
}), /* @__PURE__ */ m(o, {
|
|
76
|
+
align: "start",
|
|
77
|
+
className: `ttw:p-0 ${oe}`,
|
|
78
|
+
children: [
|
|
79
|
+
Q.isMenuOpen ? /* @__PURE__ */ p("div", {
|
|
80
|
+
className: "ttw:p-1",
|
|
81
|
+
role: "menu",
|
|
82
|
+
"aria-label": Z.fieldMenuLabel,
|
|
83
|
+
children: f.map((e) => /* @__PURE__ */ m("button", {
|
|
84
|
+
type: "button",
|
|
85
|
+
role: "menuitem",
|
|
86
|
+
className: "ttw:flex ttw:w-full ttw:cursor-pointer ttw:items-center ttw:gap-2 ttw:rounded-md ttw:px-2 ttw:py-1.5 ttw:text-xs ttw:font-medium ttw:transition-colors ttw:hover:bg-accent",
|
|
87
|
+
onClick: () => le(e),
|
|
88
|
+
children: [/* @__PURE__ */ p(h, {
|
|
89
|
+
className: "ttw:size-4 ttw:shrink-0 ttw:text-muted-foreground",
|
|
90
|
+
"aria-hidden": !0
|
|
91
|
+
}), Z.fields[e]]
|
|
92
|
+
}, e))
|
|
93
|
+
}) : null,
|
|
94
|
+
$ === "date" ? /* @__PURE__ */ p(t, {
|
|
95
|
+
from: D,
|
|
96
|
+
to: O,
|
|
97
|
+
onRangeChange: k,
|
|
98
|
+
selectedPreset: E,
|
|
99
|
+
onPresetChange: A,
|
|
100
|
+
presets: [...T],
|
|
101
|
+
labels: {
|
|
102
|
+
...Z.dateRangePicker,
|
|
103
|
+
fieldLabel: Z.fields[C]
|
|
104
|
+
}
|
|
105
|
+
}) : null,
|
|
106
|
+
$ === "status" ? /* @__PURE__ */ p(i, {
|
|
107
|
+
options: [...j],
|
|
108
|
+
selectedValues: [...M],
|
|
109
|
+
onSelectionChange: N
|
|
110
|
+
}) : null,
|
|
111
|
+
$ === "amount" ? /* @__PURE__ */ p(e, {
|
|
112
|
+
mode: P,
|
|
113
|
+
onModeChange: F,
|
|
114
|
+
min: I,
|
|
115
|
+
max: L,
|
|
116
|
+
onMinChange: re,
|
|
117
|
+
onMaxChange: R,
|
|
118
|
+
showFlowDirection: !1,
|
|
119
|
+
labels: {
|
|
120
|
+
...Z.amountFilter,
|
|
121
|
+
min: Z.amountMin,
|
|
122
|
+
max: Z.amountMax
|
|
123
|
+
}
|
|
124
|
+
}) : null,
|
|
125
|
+
$ === "vendor" ? /* @__PURE__ */ m("div", {
|
|
126
|
+
className: "ttw:flex ttw:flex-col ttw:gap-2 ttw:p-3",
|
|
127
|
+
children: [/* @__PURE__ */ p(te, {
|
|
128
|
+
type: "search",
|
|
129
|
+
className: "ttw:h-8 ttw:text-xs",
|
|
130
|
+
"aria-label": Z.vendorSearchLabel,
|
|
131
|
+
placeholder: Z.vendorSearchPlaceholder,
|
|
132
|
+
value: H,
|
|
133
|
+
onChange: (e) => U(e.target.value)
|
|
134
|
+
}), W ? /* @__PURE__ */ p("p", {
|
|
135
|
+
className: "ttw:px-1 ttw:text-xs ttw:text-muted-foreground",
|
|
136
|
+
children: Z.vendorLoading
|
|
137
|
+
}) : G ? /* @__PURE__ */ p("p", {
|
|
138
|
+
className: "ttw:px-1 ttw:text-xs ttw:text-destructive",
|
|
139
|
+
children: Z.vendorError
|
|
140
|
+
}) : z.length === 0 ? /* @__PURE__ */ p("p", {
|
|
141
|
+
className: "ttw:px-1 ttw:text-xs ttw:text-muted-foreground",
|
|
142
|
+
children: Z.vendorEmpty
|
|
143
|
+
}) : /* @__PURE__ */ p(i, {
|
|
144
|
+
options: [...z],
|
|
145
|
+
selectedValues: [...B],
|
|
146
|
+
onSelectionChange: V
|
|
147
|
+
})]
|
|
148
|
+
}) : null,
|
|
149
|
+
$ === "attachment" ? /* @__PURE__ */ p("div", {
|
|
150
|
+
className: "ttw:p-3",
|
|
151
|
+
children: /* @__PURE__ */ p(c, {
|
|
152
|
+
value: ue,
|
|
153
|
+
onValueChange: de,
|
|
154
|
+
"aria-label": Z.attachmentLabel,
|
|
155
|
+
className: "ttw:flex ttw:flex-col ttw:gap-1",
|
|
156
|
+
children: [
|
|
157
|
+
{
|
|
158
|
+
value: "any",
|
|
159
|
+
label: Z.attachmentAny
|
|
160
|
+
},
|
|
161
|
+
{
|
|
162
|
+
value: "has",
|
|
163
|
+
label: Z.attachmentHas
|
|
164
|
+
},
|
|
165
|
+
{
|
|
166
|
+
value: "none",
|
|
167
|
+
label: Z.attachmentNone
|
|
168
|
+
}
|
|
169
|
+
].map(({ value: e, label: t }) => /* @__PURE__ */ m("label", {
|
|
170
|
+
className: "ttw:flex ttw:cursor-pointer ttw:items-center ttw:gap-2",
|
|
171
|
+
children: [/* @__PURE__ */ p(l, { value: e }), /* @__PURE__ */ p("span", {
|
|
172
|
+
className: "ttw:text-xs ttw:font-medium",
|
|
173
|
+
children: t
|
|
174
|
+
})]
|
|
175
|
+
}, e))
|
|
176
|
+
})
|
|
177
|
+
}) : null
|
|
178
|
+
]
|
|
179
|
+
})]
|
|
180
|
+
}),
|
|
181
|
+
activeChipsSlot: /* @__PURE__ */ m("span", {
|
|
182
|
+
className: "ttw:flex ttw:flex-wrap ttw:items-center ttw:gap-2",
|
|
183
|
+
"data-testid": Y?.chips,
|
|
184
|
+
children: [b.map((e) => /* @__PURE__ */ p(ee, {
|
|
185
|
+
label: e.label,
|
|
186
|
+
labels: Z.filterTag,
|
|
187
|
+
onDismiss: () => x(e.key)
|
|
188
|
+
}, e.key)), b.length > 0 ? /* @__PURE__ */ p("button", {
|
|
189
|
+
type: "button",
|
|
190
|
+
className: "ttw:cursor-pointer ttw:whitespace-nowrap ttw:text-xs ttw:text-muted-foreground ttw:transition-colors ttw:hover:text-foreground",
|
|
191
|
+
onClick: S,
|
|
192
|
+
children: Z.clearAll
|
|
193
|
+
}) : null]
|
|
194
|
+
})
|
|
195
|
+
});
|
|
196
|
+
}
|
|
197
|
+
function b(e) {
|
|
198
|
+
return /* @__PURE__ */ p(y, { ...e }, e.fields.join("|"));
|
|
199
|
+
}
|
|
9
200
|
//#endregion
|
|
10
|
-
export {
|
|
201
|
+
export { b as BillsFilterBar, b as default };
|
|
@@ -1,8 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
ready: "ttw:text-emerald-600",
|
|
5
|
-
failed: "ttw:text-destructive"
|
|
6
|
-
};
|
|
7
|
-
//#endregion
|
|
8
|
-
export { e as UPLOAD_ITEM_ICON_TONE };
|
|
1
|
+
import "./index59.js";
|
|
2
|
+
import "./index60.js";
|
|
3
|
+
import "./index61.js";
|
|
@@ -1,93 +1,16 @@
|
|
|
1
|
-
import { cn as e } from "../../../../../packages/shared-ui-shadcn/dist/index.js";
|
|
2
|
-
import { BILL_UPLOAD_STATUS_TRAY_LABELS_EN as t } from "./index61.js";
|
|
3
|
-
import { UPLOAD_ITEM_ICON_TONE as n } from "./index62.js";
|
|
4
|
-
import { useId as r } from "react";
|
|
5
|
-
import { Fragment as i, jsx as a, jsxs as o } from "react/jsx-runtime";
|
|
6
|
-
import { CheckCircle2 as s, ChevronDown as c, ChevronRight as l, ChevronUp as u, Loader2 as d, X as f, XCircle as p } from "lucide-react";
|
|
7
1
|
//#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index63.js
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
/* @__PURE__ */ a("span", {
|
|
22
|
-
id: s,
|
|
23
|
-
className: "ttw:sr-only",
|
|
24
|
-
children: n.statusLabel(t.status)
|
|
25
|
-
}),
|
|
26
|
-
/* @__PURE__ */ a("span", {
|
|
27
|
-
className: "ttw:flex-1 ttw:truncate ttw:text-left ttw:text-sm ttw:text-foreground",
|
|
28
|
-
children: t.fileName
|
|
29
|
-
}),
|
|
30
|
-
t.onOpen ? /* @__PURE__ */ a(l, {
|
|
31
|
-
"aria-hidden": !0,
|
|
32
|
-
className: "ttw:size-4"
|
|
33
|
-
}) : null
|
|
34
|
-
] }), u = "ttw:flex ttw:items-center ttw:gap-3 ttw:px-4 ttw:py-2.5";
|
|
35
|
-
return t.onOpen ? /* @__PURE__ */ a("button", {
|
|
36
|
-
type: "button",
|
|
37
|
-
onClick: t.onOpen,
|
|
38
|
-
"aria-describedby": s,
|
|
39
|
-
"aria-label": n.openItem(t.fileName),
|
|
40
|
-
className: e(u, "ttw:w-full ttw:text-muted-foreground ttw:transition-colors ttw:hover:bg-muted/50 ttw:hover:text-foreground"),
|
|
41
|
-
children: c
|
|
42
|
-
}) : /* @__PURE__ */ a("div", {
|
|
43
|
-
"aria-describedby": s,
|
|
44
|
-
className: u,
|
|
45
|
-
children: c
|
|
46
|
-
});
|
|
47
|
-
}
|
|
48
|
-
function g({ sections: e, summaryLabel: n, collapsed: r, onToggleCollapsed: i, onClose: s, testId: l, labels: d }) {
|
|
49
|
-
let p = {
|
|
50
|
-
...t,
|
|
51
|
-
...d
|
|
52
|
-
};
|
|
53
|
-
return /* @__PURE__ */ o("div", {
|
|
54
|
-
className: "ttw:fixed ttw:right-4 ttw:bottom-4 ttw:z-50 ttw:w-96 ttw:max-w-[calc(100vw-2rem)] ttw:overflow-hidden ttw:rounded-lg ttw:border ttw:border-border ttw:bg-card",
|
|
55
|
-
"data-testid": l,
|
|
56
|
-
children: [/* @__PURE__ */ o("div", {
|
|
57
|
-
className: "ttw:flex ttw:items-center ttw:gap-2 ttw:border-b ttw:border-border ttw:bg-muted/40 ttw:px-4 ttw:py-3",
|
|
58
|
-
children: [
|
|
59
|
-
/* @__PURE__ */ a("span", {
|
|
60
|
-
"aria-live": "polite",
|
|
61
|
-
className: "ttw:flex-1 ttw:text-base ttw:font-semibold ttw:text-foreground",
|
|
62
|
-
children: n
|
|
63
|
-
}),
|
|
64
|
-
/* @__PURE__ */ a("button", {
|
|
65
|
-
type: "button",
|
|
66
|
-
onClick: i,
|
|
67
|
-
"aria-label": r ? p.expand : p.collapse,
|
|
68
|
-
"aria-expanded": !r,
|
|
69
|
-
className: "ttw:text-muted-foreground ttw:hover:text-foreground",
|
|
70
|
-
children: a(r ? u : c, { className: "ttw:size-4" })
|
|
71
|
-
}),
|
|
72
|
-
/* @__PURE__ */ a("button", {
|
|
73
|
-
type: "button",
|
|
74
|
-
onClick: s,
|
|
75
|
-
"aria-label": p.close,
|
|
76
|
-
className: "ttw:text-muted-foreground ttw:hover:text-foreground",
|
|
77
|
-
children: /* @__PURE__ */ a(f, { className: "ttw:size-4" })
|
|
78
|
-
})
|
|
79
|
-
]
|
|
80
|
-
}), r ? null : /* @__PURE__ */ a("div", {
|
|
81
|
-
className: "ttw:max-h-96 ttw:overflow-y-auto",
|
|
82
|
-
children: e.map((e) => /* @__PURE__ */ o("div", { children: [e.caption ? /* @__PURE__ */ a("p", {
|
|
83
|
-
className: "ttw:px-4 ttw:pt-3 ttw:pb-1 ttw:text-xs ttw:text-muted-foreground",
|
|
84
|
-
children: e.caption
|
|
85
|
-
}) : null, e.items.map((e) => /* @__PURE__ */ a(h, {
|
|
86
|
-
item: e,
|
|
87
|
-
labels: p
|
|
88
|
-
}, e.id))] }, e.id))
|
|
89
|
-
})]
|
|
90
|
-
});
|
|
91
|
-
}
|
|
2
|
+
var e = {
|
|
3
|
+
Vendor: "vendor",
|
|
4
|
+
IssueDate: "issueDate",
|
|
5
|
+
DueDate: "dueDate",
|
|
6
|
+
ScheduledDate: "scheduledDate",
|
|
7
|
+
PaidDate: "paidDate",
|
|
8
|
+
Status: "status",
|
|
9
|
+
AmountDue: "amountDue",
|
|
10
|
+
AmountScheduled: "amountScheduled",
|
|
11
|
+
AmountPaid: "amountPaid",
|
|
12
|
+
TotalAmount: "totalAmount",
|
|
13
|
+
AddedOn: "addedOn"
|
|
14
|
+
};
|
|
92
15
|
//#endregion
|
|
93
|
-
export {
|
|
16
|
+
export { e as BillColumn };
|