@tesouro/embedded-components-react 0.11.191 → 0.11.193
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/fixtures/index.d.ts +257 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bills-list/feature/dist/index15.js +179 -171
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bills-list/feature/dist/index17.js +124 -123
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bills-list/feature/dist/index18.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bills-list/feature/dist/index5.js +55 -113
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bills-list/feature/dist/index7.js +6 -21
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bills-list/feature/dist/index9.js +5 -5
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bills-list/ui/dist/index13.js +94 -94
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bills-list/ui/dist/index21.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bills-list/ui/dist/index23.js +172 -167
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/mocks/labels.js +4 -4
- package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/rest/sdk.gen.js +5 -1
- package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/analytics/build-info.js +1 -1
- package/package.json +1 -1
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"use client";
|
|
3
3
|
"use client";
|
|
4
4
|
"use client";
|
|
5
|
-
import {
|
|
5
|
+
import { BillQueue as e, billQueueFilters as t } from "./index5.js";
|
|
6
6
|
import { usePayablesCountQueries as n } from "../../data-access/dist/index3.js";
|
|
7
7
|
import "../../data-access/dist/index.js";
|
|
8
8
|
import { useMemo as r, useState as i } from "react";
|
|
@@ -10,10 +10,10 @@ import { useMemo as r, useState as i } from "react";
|
|
|
10
10
|
function a({ enabled: a = !0, canPay: o } = {}) {
|
|
11
11
|
let [s, c] = i(o);
|
|
12
12
|
o !== void 0 && s !== o && c(o);
|
|
13
|
-
let l = o ?? s, u = r(() =>
|
|
13
|
+
let l = o ?? s, u = r(() => [t(e.AssignedToMe, l ?? !1)], [l]);
|
|
14
|
+
return n({
|
|
14
15
|
filters: u,
|
|
15
16
|
enabled: a && o !== void 0
|
|
16
|
-
});
|
|
17
|
-
return r(() => Object.fromEntries(e.map((e, t) => [e, d[t]?.count])), [d]);
|
|
17
|
+
})[0]?.count;
|
|
18
18
|
}
|
|
19
|
-
export { a as
|
|
19
|
+
export { a as useAssignedToMeCount };
|
package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bills-list/ui/dist/index13.js
CHANGED
|
@@ -1,120 +1,120 @@
|
|
|
1
|
-
import { AmountFilter as e, DateRangePicker as t,
|
|
2
|
-
import { BILLS_FILTER_BAR_LABELS_EN as
|
|
3
|
-
import { BillsFilterField as
|
|
4
|
-
import { useMemo as
|
|
5
|
-
import { jsx as
|
|
6
|
-
import { ListFilterIcon as
|
|
1
|
+
import { AmountFilter as e, DateRangePicker as t, FilterMenuButton as n, FilterTag as ee, Input as te, MultiSelectFilter as r, Popover as i, PopoverContent as a, PopoverTrigger as o, RadioGroup as s, RadioGroupItem as c, TableToolbar as l, useFilterPanel as ne } from "../../../../../../packages/shared-ui-shadcn/dist/index.js";
|
|
2
|
+
import { BILLS_FILTER_BAR_LABELS_EN as u } from "./index11.js";
|
|
3
|
+
import { BillsFilterField as d } from "./index12.js";
|
|
4
|
+
import { useMemo as re } from "react";
|
|
5
|
+
import { Fragment as ie, jsx as f, jsxs as p } from "react/jsx-runtime";
|
|
6
|
+
import { ListFilterIcon as m } from "lucide-react";
|
|
7
7
|
// ../../libs/tesouro-embedded-components-react/bill-pay-widget/bills-list/ui/dist/index13.js
|
|
8
|
-
var
|
|
8
|
+
var h = {
|
|
9
9
|
date: "ttw:w-auto",
|
|
10
10
|
status: "ttw:w-56",
|
|
11
11
|
amount: "ttw:w-64",
|
|
12
12
|
vendor: "ttw:w-64",
|
|
13
13
|
attachment: "ttw:w-56"
|
|
14
|
-
},
|
|
15
|
-
[
|
|
16
|
-
[
|
|
17
|
-
[
|
|
18
|
-
[
|
|
19
|
-
[
|
|
20
|
-
[
|
|
21
|
-
[
|
|
22
|
-
},
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
14
|
+
}, g = {
|
|
15
|
+
[d.Vendor]: "vendor",
|
|
16
|
+
[d.IssueDate]: "date",
|
|
17
|
+
[d.DueDate]: "date",
|
|
18
|
+
[d.Status]: "status",
|
|
19
|
+
[d.TotalAmount]: "amount",
|
|
20
|
+
[d.AddedOn]: "date",
|
|
21
|
+
[d.Attachment]: "attachment"
|
|
22
|
+
}, _ = [
|
|
23
|
+
d.IssueDate,
|
|
24
|
+
d.DueDate,
|
|
25
|
+
d.AddedOn
|
|
26
26
|
];
|
|
27
|
-
function
|
|
28
|
-
let Z =
|
|
29
|
-
...
|
|
27
|
+
function v({ fields: d, activeFilterCount: v, chips: y, onRemoveChip: b, onClearAll: x, dateField: S, onDateFieldChange: C, datePresets: w, selectedDatePreset: T, dateFrom: E, dateTo: D, onDateRangeChange: O, onDatePresetChange: k, statusOptions: A, selectedStatuses: j, onStatusChange: M, amountMode: N, onAmountModeChange: P, amountMin: F, amountMax: ae, onAmountMinChange: I, onAmountMaxChange: L, vendorOptions: R, selectedVendors: z, onVendorChange: B, vendorSearchValue: V, onVendorSearchChange: H, isVendorLoading: U, isVendorError: W, hasAttachment: G, onHasAttachmentChange: K, leadingSlot: q, searchSlot: J, testIds: Y, labels: X, className: oe }) {
|
|
28
|
+
let Z = re(() => ({
|
|
29
|
+
...u,
|
|
30
30
|
...X,
|
|
31
31
|
fields: {
|
|
32
|
-
...
|
|
32
|
+
...u.fields,
|
|
33
33
|
...X?.fields
|
|
34
34
|
},
|
|
35
35
|
filterMenuButton: {
|
|
36
|
-
...
|
|
36
|
+
...u.filterMenuButton,
|
|
37
37
|
...X?.filterMenuButton
|
|
38
38
|
},
|
|
39
39
|
filterTag: {
|
|
40
|
-
...
|
|
40
|
+
...u.filterTag,
|
|
41
41
|
...X?.filterTag
|
|
42
42
|
},
|
|
43
43
|
amountFilter: {
|
|
44
|
-
...
|
|
44
|
+
...u.amountFilter,
|
|
45
45
|
...X?.amountFilter
|
|
46
46
|
},
|
|
47
47
|
dateRangePicker: {
|
|
48
|
-
...
|
|
48
|
+
...u.dateRangePicker,
|
|
49
49
|
...X?.dateRangePicker
|
|
50
50
|
}
|
|
51
|
-
}), [X]), Q =
|
|
51
|
+
}), [X]), Q = ne(), $ = Q.activePanelId, se = Q.isMenuOpen || !!$, ce = ($ && h[$]) ?? "ttw:w-52", le = (e) => {
|
|
52
52
|
$ && e.preventDefault(), Q.toggleMenu();
|
|
53
|
-
},
|
|
53
|
+
}, ue = (e) => {
|
|
54
54
|
e || (Q.closeMenu(), Q.closePanel());
|
|
55
|
-
},
|
|
56
|
-
|
|
57
|
-
},
|
|
58
|
-
|
|
55
|
+
}, de = (e) => {
|
|
56
|
+
_.includes(e) && C(e), Q.openPanel(g[e]);
|
|
57
|
+
}, fe = G === void 0 ? "any" : G ? "has" : "none", pe = (e) => {
|
|
58
|
+
K(e === "any" ? void 0 : e === "has");
|
|
59
59
|
};
|
|
60
|
-
return /* @__PURE__ */
|
|
61
|
-
className:
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
open:
|
|
65
|
-
onOpenChange:
|
|
66
|
-
children: [/* @__PURE__ */
|
|
60
|
+
return /* @__PURE__ */ f(l, {
|
|
61
|
+
className: oe,
|
|
62
|
+
filters: q,
|
|
63
|
+
action: /* @__PURE__ */ p(ie, { children: [J, /* @__PURE__ */ p(i, {
|
|
64
|
+
open: se,
|
|
65
|
+
onOpenChange: ue,
|
|
66
|
+
children: [/* @__PURE__ */ f(o, {
|
|
67
67
|
asChild: !0,
|
|
68
|
-
children: /* @__PURE__ */
|
|
68
|
+
children: /* @__PURE__ */ f(n, {
|
|
69
69
|
size: "default",
|
|
70
|
-
activeCount:
|
|
71
|
-
onClick:
|
|
70
|
+
activeCount: v,
|
|
71
|
+
onClick: le,
|
|
72
72
|
labels: Z.filterMenuButton,
|
|
73
73
|
"data-testid": Y?.menuButton
|
|
74
74
|
})
|
|
75
|
-
}), /* @__PURE__ */
|
|
75
|
+
}), /* @__PURE__ */ p(a, {
|
|
76
76
|
align: "start",
|
|
77
|
-
className: `ttw:p-0 ${
|
|
77
|
+
className: `ttw:p-0 ${ce}`,
|
|
78
78
|
children: [
|
|
79
|
-
Q.isMenuOpen ? /* @__PURE__ */
|
|
79
|
+
Q.isMenuOpen ? /* @__PURE__ */ f("div", {
|
|
80
80
|
className: "ttw:p-1",
|
|
81
81
|
role: "menu",
|
|
82
82
|
"aria-label": Z.fieldMenuLabel,
|
|
83
|
-
children:
|
|
83
|
+
children: d.map((e) => /* @__PURE__ */ p("button", {
|
|
84
84
|
type: "button",
|
|
85
85
|
role: "menuitem",
|
|
86
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: () =>
|
|
88
|
-
children: [/* @__PURE__ */
|
|
87
|
+
onClick: () => de(e),
|
|
88
|
+
children: [/* @__PURE__ */ f(m, {
|
|
89
89
|
className: "ttw:size-4 ttw:shrink-0 ttw:text-muted-foreground",
|
|
90
90
|
"aria-hidden": !0
|
|
91
91
|
}), Z.fields[e]]
|
|
92
92
|
}, e))
|
|
93
93
|
}) : null,
|
|
94
|
-
$ === "date" ? /* @__PURE__ */
|
|
95
|
-
from:
|
|
96
|
-
to:
|
|
97
|
-
onRangeChange:
|
|
98
|
-
selectedPreset:
|
|
99
|
-
onPresetChange:
|
|
100
|
-
presets: [...
|
|
94
|
+
$ === "date" ? /* @__PURE__ */ f(t, {
|
|
95
|
+
from: E,
|
|
96
|
+
to: D,
|
|
97
|
+
onRangeChange: O,
|
|
98
|
+
selectedPreset: T,
|
|
99
|
+
onPresetChange: k,
|
|
100
|
+
presets: [...w],
|
|
101
101
|
labels: {
|
|
102
102
|
...Z.dateRangePicker,
|
|
103
|
-
fieldLabel: Z.fields[
|
|
103
|
+
fieldLabel: Z.fields[S]
|
|
104
104
|
}
|
|
105
105
|
}) : null,
|
|
106
|
-
$ === "status" ? /* @__PURE__ */
|
|
107
|
-
options: [...
|
|
108
|
-
selectedValues: [...
|
|
109
|
-
onSelectionChange:
|
|
106
|
+
$ === "status" ? /* @__PURE__ */ f(r, {
|
|
107
|
+
options: [...A],
|
|
108
|
+
selectedValues: [...j],
|
|
109
|
+
onSelectionChange: M
|
|
110
110
|
}) : null,
|
|
111
|
-
$ === "amount" ? /* @__PURE__ */
|
|
112
|
-
mode:
|
|
113
|
-
onModeChange:
|
|
114
|
-
min:
|
|
115
|
-
max:
|
|
116
|
-
onMinChange:
|
|
117
|
-
onMaxChange:
|
|
111
|
+
$ === "amount" ? /* @__PURE__ */ f(e, {
|
|
112
|
+
mode: N,
|
|
113
|
+
onModeChange: P,
|
|
114
|
+
min: F,
|
|
115
|
+
max: ae,
|
|
116
|
+
onMinChange: I,
|
|
117
|
+
onMaxChange: L,
|
|
118
118
|
showFlowDirection: !1,
|
|
119
119
|
labels: {
|
|
120
120
|
...Z.amountFilter,
|
|
@@ -122,35 +122,35 @@ function y({ fields: f, activeFilterCount: y, chips: b, onRemoveChip: x, onClear
|
|
|
122
122
|
max: Z.amountMax
|
|
123
123
|
}
|
|
124
124
|
}) : null,
|
|
125
|
-
$ === "vendor" ? /* @__PURE__ */
|
|
125
|
+
$ === "vendor" ? /* @__PURE__ */ p("div", {
|
|
126
126
|
className: "ttw:flex ttw:flex-col ttw:gap-2 ttw:p-3",
|
|
127
|
-
children: [/* @__PURE__ */
|
|
127
|
+
children: [/* @__PURE__ */ f(te, {
|
|
128
128
|
type: "search",
|
|
129
129
|
className: "ttw:h-8 ttw:text-xs",
|
|
130
130
|
"aria-label": Z.vendorSearchLabel,
|
|
131
131
|
placeholder: Z.vendorSearchPlaceholder,
|
|
132
|
-
value:
|
|
133
|
-
onChange: (e) =>
|
|
134
|
-
}),
|
|
132
|
+
value: V,
|
|
133
|
+
onChange: (e) => H(e.target.value)
|
|
134
|
+
}), U ? /* @__PURE__ */ f("p", {
|
|
135
135
|
className: "ttw:px-1 ttw:text-xs ttw:text-muted-foreground",
|
|
136
136
|
children: Z.vendorLoading
|
|
137
|
-
}) :
|
|
137
|
+
}) : W ? /* @__PURE__ */ f("p", {
|
|
138
138
|
className: "ttw:px-1 ttw:text-xs ttw:text-destructive",
|
|
139
139
|
children: Z.vendorError
|
|
140
|
-
}) :
|
|
140
|
+
}) : R.length === 0 ? /* @__PURE__ */ f("p", {
|
|
141
141
|
className: "ttw:px-1 ttw:text-xs ttw:text-muted-foreground",
|
|
142
142
|
children: Z.vendorEmpty
|
|
143
|
-
}) : /* @__PURE__ */
|
|
144
|
-
options: [...
|
|
145
|
-
selectedValues: [...
|
|
146
|
-
onSelectionChange:
|
|
143
|
+
}) : /* @__PURE__ */ f(r, {
|
|
144
|
+
options: [...R],
|
|
145
|
+
selectedValues: [...z],
|
|
146
|
+
onSelectionChange: B
|
|
147
147
|
})]
|
|
148
148
|
}) : null,
|
|
149
|
-
$ === "attachment" ? /* @__PURE__ */
|
|
149
|
+
$ === "attachment" ? /* @__PURE__ */ f("div", {
|
|
150
150
|
className: "ttw:p-3",
|
|
151
|
-
children: /* @__PURE__ */
|
|
152
|
-
value:
|
|
153
|
-
onValueChange:
|
|
151
|
+
children: /* @__PURE__ */ f(s, {
|
|
152
|
+
value: fe,
|
|
153
|
+
onValueChange: pe,
|
|
154
154
|
"aria-label": Z.attachmentLabel,
|
|
155
155
|
className: "ttw:flex ttw:flex-col ttw:gap-1",
|
|
156
156
|
children: [
|
|
@@ -166,9 +166,9 @@ function y({ fields: f, activeFilterCount: y, chips: b, onRemoveChip: x, onClear
|
|
|
166
166
|
value: "none",
|
|
167
167
|
label: Z.attachmentNone
|
|
168
168
|
}
|
|
169
|
-
].map(({ value: e, label: t }) => /* @__PURE__ */
|
|
169
|
+
].map(({ value: e, label: t }) => /* @__PURE__ */ p("label", {
|
|
170
170
|
className: "ttw:flex ttw:cursor-pointer ttw:items-center ttw:gap-2",
|
|
171
|
-
children: [/* @__PURE__ */
|
|
171
|
+
children: [/* @__PURE__ */ f(c, { value: e }), /* @__PURE__ */ f("span", {
|
|
172
172
|
className: "ttw:text-xs ttw:font-medium",
|
|
173
173
|
children: t
|
|
174
174
|
})]
|
|
@@ -177,24 +177,24 @@ function y({ fields: f, activeFilterCount: y, chips: b, onRemoveChip: x, onClear
|
|
|
177
177
|
}) : null
|
|
178
178
|
]
|
|
179
179
|
})]
|
|
180
|
-
}),
|
|
181
|
-
|
|
180
|
+
})] }),
|
|
181
|
+
tags: y.length > 0 ? /* @__PURE__ */ p("span", {
|
|
182
182
|
className: "ttw:flex ttw:flex-wrap ttw:items-center ttw:gap-2",
|
|
183
183
|
"data-testid": Y?.chips,
|
|
184
|
-
children: [
|
|
184
|
+
children: [y.map((e) => /* @__PURE__ */ f(ee, {
|
|
185
185
|
label: e.label,
|
|
186
186
|
labels: Z.filterTag,
|
|
187
|
-
onDismiss: () =>
|
|
188
|
-
}, e.key)), /* @__PURE__ */
|
|
187
|
+
onDismiss: () => b(e.key)
|
|
188
|
+
}, e.key)), /* @__PURE__ */ f("button", {
|
|
189
189
|
type: "button",
|
|
190
190
|
className: "ttw:cursor-pointer ttw:whitespace-nowrap ttw:text-xs ttw:text-muted-foreground ttw:transition-colors ttw:hover:text-foreground",
|
|
191
|
-
onClick:
|
|
191
|
+
onClick: x,
|
|
192
192
|
children: Z.clearAll
|
|
193
193
|
})]
|
|
194
194
|
}) : void 0
|
|
195
195
|
});
|
|
196
196
|
}
|
|
197
|
-
function
|
|
198
|
-
return /* @__PURE__ */
|
|
197
|
+
function y(e) {
|
|
198
|
+
return /* @__PURE__ */ f(v, { ...e }, e.fields.join("|"));
|
|
199
199
|
}
|
|
200
|
-
export {
|
|
200
|
+
export { y as BillsFilterBar, y as default };
|
package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bills-list/ui/dist/index21.js
CHANGED
|
@@ -35,7 +35,7 @@ var a = ".pdf,.png,.jpg,.jpeg,.doc,.docx", o = {
|
|
|
35
35
|
vendorUnavailable: "Vendor unavailable",
|
|
36
36
|
searchPlaceholder: "Search by vendor name",
|
|
37
37
|
searchLabel: "Search bills by vendor name",
|
|
38
|
-
filterTabsLabel: "
|
|
38
|
+
filterTabsLabel: "Bill views",
|
|
39
39
|
filteredEmptyTitle: "No bills match",
|
|
40
40
|
filteredEmptyDescription: "Try a different search or status filter.",
|
|
41
41
|
errorTitle: "Couldn't load bills",
|