@tesouro/embedded-components-react 0.4.14 → 0.4.16
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/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index.js +5 -4
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index14.js +47 -21
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index15.js +20 -77
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index16.js +75 -24
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index17.js +36 -0
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index11.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/index23.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index25.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index39.js +64 -48
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index43.js +10 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index44.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index46.js +141 -118
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index47.js +93 -93
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index48.js +83 -67
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index56.js +235 -218
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index58.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index59.js +5 -5
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index6.js +9 -6
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index66.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index68.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index72.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index76.js +17 -17
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index77.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index78.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index81.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/index.js +39 -39
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index100.js +2 -10
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index101.js +8 -50
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index102.js +52 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index103.js +2 -0
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index25.js +26 -49
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index26.js +19 -306
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index27.js +154 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index28.js +2 -9
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index29.js +60 -45
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index30.js +251 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index31.js +2 -18
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index32.js +7 -48
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index33.js +49 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index34.js +2 -23
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index35.js +15 -337
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index36.js +50 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index37.js +2 -16
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index38.js +21 -118
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index39.js +340 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index40.js +2 -12
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index41.js +10 -97
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index42.js +99 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index43.js +1 -12
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index44.js +11 -57
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index45.js +58 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index46.js +1 -54
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index47.js +52 -10
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index48.js +10 -179
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index49.js +181 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index50.js +2 -4
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index51.js +2 -39
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index52.js +41 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index53.js +2 -7
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index54.js +5 -90
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index55.js +92 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index56.js +2 -4
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index57.js +2 -14
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index58.js +16 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index59.js +1 -87
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index60.js +83 -291
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index61.js +292 -9
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index62.js +13 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index63.js +1 -8
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index64.js +6 -37
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index65.js +39 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index66.js +2 -39
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index67.js +36 -9
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index68.js +10 -199
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index69.js +201 -3
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index70.js +3 -17
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index71.js +15 -345
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index72.js +345 -8
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index73.js +6 -4
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index74.js +6 -91
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index75.js +93 -0
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index77.js +2 -127
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index78.js +124 -25
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index79.js +26 -87
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index80.js +89 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index81.js +2 -7
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index82.js +5 -28
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index83.js +30 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index84.js +2 -7
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index85.js +5 -32
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index86.js +34 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index87.js +2 -12
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index88.js +10 -104
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index89.js +105 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index90.js +2 -17
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index91.js +15 -123
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index92.js +125 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index93.js +2 -18
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index94.js +14 -6
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index95.js +7 -167
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index96.js +170 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index97.js +2 -14
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index98.js +11 -105
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index99.js +108 -2
- package/dist/libs/tesouro-embedded-components-react/cards-widget/feature/dist/index3.js +15 -3
- package/dist/libs/tesouro-embedded-components-react/cards-widget/feature/dist/index9.js +63 -65
- package/dist/libs/tesouro-embedded-components-react/cards-widget/ui/dist/lib/CardsList/CardsList.js +4 -2
- package/dist/libs/tesouro-embedded-components-react/cards-widget/ui/dist/lib/CardsList/CardsListDetailsSheet.js +6 -5
- package/dist/libs/tesouro-embedded-components-react/cards-widget/ui/dist/lib/CardsList/CardsListRow.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/counterparts-widget/feature/dist/index4.js +8 -8
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index9.js +4 -4
- package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/data-access/dist/index.js +5 -5
- package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/feature/dist/index.js +19 -19
- package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/feature/dist/lib/helpers.js +39 -33
- package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/feature/dist/lib/subEntityForms.js +15 -15
- package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/feature/dist/lib/useAddressForm.js +9 -9
- package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/feature/dist/lib/useCounterpartDetails.js +7 -7
- package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/feature/dist/lib/useCounterpartForm.js +37 -37
- package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/feature/dist/lib/useCounterpartSelector.js +15 -15
- package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/feature/dist/lib/usePayableAchInstructions.js +7 -7
- package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/analytics/build-info.js +1 -1
- package/package.json +1 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index76.js +0 -2
|
@@ -1,201 +1,12 @@
|
|
|
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 "./index66.js";
|
|
3
|
-
import { BillsFilterField as f } from "./index67.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";
|
|
7
1
|
//#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index68.js
|
|
8
|
-
var
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
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
|
-
}
|
|
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
|
+
};
|
|
200
11
|
//#endregion
|
|
201
|
-
export {
|
|
12
|
+
export { e as BillsFilterField };
|
|
@@ -1,3 +1,201 @@
|
|
|
1
|
-
import "
|
|
2
|
-
import "./index67.js";
|
|
3
|
-
import "./index68.js";
|
|
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 "./index67.js";
|
|
3
|
+
import { BillsFilterField as f } from "./index68.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";
|
|
7
|
+
//#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index69.js
|
|
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
|
+
}
|
|
200
|
+
//#endregion
|
|
201
|
+
export { b as BillsFilterBar, b as default };
|
|
@@ -1,17 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
Attachment: "attachment",
|
|
5
|
-
IssueDate: "issueDate",
|
|
6
|
-
DueDate: "dueDate",
|
|
7
|
-
ScheduledDate: "scheduledDate",
|
|
8
|
-
PaidDate: "paidDate",
|
|
9
|
-
Status: "status",
|
|
10
|
-
AmountDue: "amountDue",
|
|
11
|
-
AmountScheduled: "amountScheduled",
|
|
12
|
-
AmountPaid: "amountPaid",
|
|
13
|
-
TotalAmount: "totalAmount",
|
|
14
|
-
AddedOn: "addedOn"
|
|
15
|
-
};
|
|
16
|
-
//#endregion
|
|
17
|
-
export { e as BillColumn };
|
|
1
|
+
import "./index67.js";
|
|
2
|
+
import "./index68.js";
|
|
3
|
+
import "./index69.js";
|