@tesouro/embedded-components-react 0.3.58 → 0.3.61
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/feature/dist/index12.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index21.js +2 -2
- 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/index40.js +6 -2
- 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/index48.js +4 -3
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index49.js +105 -93
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index50.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index51.js +220 -82
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index53.js +8 -6
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index55.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index57.js +4 -4
- 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/index70.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index74.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index76.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index79.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 +37 -37
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index32.js +112 -90
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index41.js +1 -0
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index44.js +10 -152
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index45.js +160 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index46.js +2 -4
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index47.js +2 -39
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index48.js +41 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index49.js +2 -7
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index50.js +5 -90
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index51.js +92 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index52.js +2 -4
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index53.js +2 -14
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index54.js +16 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index55.js +1 -83
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index56.js +79 -261
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index57.js +262 -9
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index58.js +13 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index59.js +1 -8
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index60.js +6 -37
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index61.js +39 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index62.js +2 -39
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index63.js +36 -9
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index64.js +10 -199
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index65.js +201 -3
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index66.js +3 -17
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index67.js +15 -345
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index68.js +345 -8
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index69.js +6 -4
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index70.js +6 -91
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index71.js +93 -0
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index73.js +2 -121
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index74.js +118 -23
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index75.js +24 -87
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index76.js +89 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index77.js +2 -7
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index78.js +5 -28
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index79.js +30 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index80.js +2 -7
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index81.js +5 -32
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index82.js +34 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index83.js +2 -12
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index84.js +10 -104
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index85.js +105 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index86.js +2 -17
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index87.js +15 -123
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index88.js +125 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index89.js +2 -18
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index90.js +14 -6
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index91.js +7 -167
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index92.js +170 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index93.js +2 -14
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index94.js +11 -105
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index95.js +108 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index96.js +2 -10
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index97.js +8 -45
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index98.js +47 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index99.js +2 -0
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index22.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index479.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index553.js +3 -2
- 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/index72.js +0 -2
|
@@ -1,39 +1,8 @@
|
|
|
1
|
-
import { Alert as e, AlertTitle as t, Button as n } from "../../../../../packages/shared-ui-shadcn/dist/index.js";
|
|
2
|
-
import { BILL_DUPLICATE_NOTICE_LABELS_EN as r } from "./index59.js";
|
|
3
|
-
import { jsx as i, jsxs as a } from "react/jsx-runtime";
|
|
4
|
-
import { CopyX as o } from "lucide-react";
|
|
5
1
|
//#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index60.js
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
return /* @__PURE__ */ a(e, {
|
|
12
|
-
className: "ttw:[&>svg]:size-6 ttw:flex ttw:items-center ttw:bg-amber-50 ttw:text-amber-700 ttw:border-amber-300",
|
|
13
|
-
"data-testid": u,
|
|
14
|
-
children: [
|
|
15
|
-
/* @__PURE__ */ i(o, {}),
|
|
16
|
-
/* @__PURE__ */ i(t, {
|
|
17
|
-
className: "ttw:flex-1",
|
|
18
|
-
children: f.message
|
|
19
|
-
}),
|
|
20
|
-
s ? /* @__PURE__ */ i(n, {
|
|
21
|
-
type: "button",
|
|
22
|
-
variant: "outline",
|
|
23
|
-
className: "ttw:text-foreground",
|
|
24
|
-
disabled: l,
|
|
25
|
-
onClick: s,
|
|
26
|
-
children: f.notADuplicateButton
|
|
27
|
-
}) : null,
|
|
28
|
-
c ? /* @__PURE__ */ i(n, {
|
|
29
|
-
type: "button",
|
|
30
|
-
variant: "destructive",
|
|
31
|
-
disabled: l,
|
|
32
|
-
onClick: c,
|
|
33
|
-
children: f.removeBillButton
|
|
34
|
-
}) : null
|
|
35
|
-
]
|
|
36
|
-
});
|
|
37
|
-
}
|
|
2
|
+
var e = {
|
|
3
|
+
message: "This bill is a possible duplicate of another bill.",
|
|
4
|
+
notADuplicateButton: "Not a duplicate",
|
|
5
|
+
removeBillButton: "Remove this bill"
|
|
6
|
+
};
|
|
38
7
|
//#endregion
|
|
39
|
-
export {
|
|
8
|
+
export { e as BILL_DUPLICATE_NOTICE_LABELS_EN };
|
|
@@ -1,2 +1,39 @@
|
|
|
1
|
-
import "
|
|
2
|
-
import "./index60.js";
|
|
1
|
+
import { Alert as e, AlertTitle as t, Button as n } from "../../../../../packages/shared-ui-shadcn/dist/index.js";
|
|
2
|
+
import { BILL_DUPLICATE_NOTICE_LABELS_EN as r } from "./index60.js";
|
|
3
|
+
import { jsx as i, jsxs as a } from "react/jsx-runtime";
|
|
4
|
+
import { CopyX as o } from "lucide-react";
|
|
5
|
+
//#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index61.js
|
|
6
|
+
function s({ onNotADuplicate: s, onRemoveBill: c, isActionDisabled: l, testId: u, labels: d }) {
|
|
7
|
+
let f = {
|
|
8
|
+
...r,
|
|
9
|
+
...d
|
|
10
|
+
};
|
|
11
|
+
return /* @__PURE__ */ a(e, {
|
|
12
|
+
className: "ttw:[&>svg]:size-6 ttw:flex ttw:items-center ttw:bg-amber-50 ttw:text-amber-700 ttw:border-amber-300",
|
|
13
|
+
"data-testid": u,
|
|
14
|
+
children: [
|
|
15
|
+
/* @__PURE__ */ i(o, {}),
|
|
16
|
+
/* @__PURE__ */ i(t, {
|
|
17
|
+
className: "ttw:flex-1",
|
|
18
|
+
children: f.message
|
|
19
|
+
}),
|
|
20
|
+
s ? /* @__PURE__ */ i(n, {
|
|
21
|
+
type: "button",
|
|
22
|
+
variant: "outline",
|
|
23
|
+
className: "ttw:text-foreground",
|
|
24
|
+
disabled: l,
|
|
25
|
+
onClick: s,
|
|
26
|
+
children: f.notADuplicateButton
|
|
27
|
+
}) : null,
|
|
28
|
+
c ? /* @__PURE__ */ i(n, {
|
|
29
|
+
type: "button",
|
|
30
|
+
variant: "destructive",
|
|
31
|
+
disabled: l,
|
|
32
|
+
onClick: c,
|
|
33
|
+
children: f.removeBillButton
|
|
34
|
+
}) : null
|
|
35
|
+
]
|
|
36
|
+
});
|
|
37
|
+
}
|
|
38
|
+
//#endregion
|
|
39
|
+
export { s as BillDuplicateNotice, s as default };
|
|
@@ -1,39 +1,2 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
var i = {
|
|
4
|
-
fields: {
|
|
5
|
-
vendor: "Vendor",
|
|
6
|
-
issueDate: "Issue date",
|
|
7
|
-
dueDate: "Due date",
|
|
8
|
-
status: "Status",
|
|
9
|
-
totalAmount: "Total amount",
|
|
10
|
-
addedOn: "Added on",
|
|
11
|
-
attachment: "Attachment"
|
|
12
|
-
},
|
|
13
|
-
fieldMenuLabel: "Filter bills by",
|
|
14
|
-
amountMin: "No less than",
|
|
15
|
-
amountMax: "No more than",
|
|
16
|
-
vendorSearchPlaceholder: "Search vendors",
|
|
17
|
-
vendorSearchLabel: "Search vendors",
|
|
18
|
-
vendorEmpty: "No vendors match",
|
|
19
|
-
vendorLoading: "Loading vendors",
|
|
20
|
-
vendorError: "Couldn't load vendors",
|
|
21
|
-
attachmentAny: "Any",
|
|
22
|
-
attachmentHas: "Has attachment",
|
|
23
|
-
attachmentNone: "No attachment",
|
|
24
|
-
attachmentLabel: "Filter by attachment",
|
|
25
|
-
clearAll: "Clear all",
|
|
26
|
-
filterMenuButton: n,
|
|
27
|
-
filterTag: r,
|
|
28
|
-
amountFilter: {
|
|
29
|
-
modeAny: e.modeAny,
|
|
30
|
-
modeExact: e.modeExact,
|
|
31
|
-
modeRange: e.modeRange,
|
|
32
|
-
flowAny: e.flowAny,
|
|
33
|
-
flowIn: e.flowIn,
|
|
34
|
-
flowOut: e.flowOut
|
|
35
|
-
},
|
|
36
|
-
dateRangePicker: { presetPlaceholder: t.presetPlaceholder }
|
|
37
|
-
};
|
|
38
|
-
//#endregion
|
|
39
|
-
export { i as BILLS_FILTER_BAR_LABELS_EN };
|
|
1
|
+
import "./index60.js";
|
|
2
|
+
import "./index61.js";
|
|
@@ -1,12 +1,39 @@
|
|
|
1
|
+
import { AMOUNT_FILTER_LABELS_EN as e, DATE_RANGE_PICKER_LABELS_EN as t, FILTER_MENU_BUTTON_LABELS_EN as n, FILTER_TAG_LABELS_EN as r } from "../../../../../packages/shared-ui-shadcn/dist/index.js";
|
|
1
2
|
//#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index63.js
|
|
2
|
-
var
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
3
|
+
var i = {
|
|
4
|
+
fields: {
|
|
5
|
+
vendor: "Vendor",
|
|
6
|
+
issueDate: "Issue date",
|
|
7
|
+
dueDate: "Due date",
|
|
8
|
+
status: "Status",
|
|
9
|
+
totalAmount: "Total amount",
|
|
10
|
+
addedOn: "Added on",
|
|
11
|
+
attachment: "Attachment"
|
|
12
|
+
},
|
|
13
|
+
fieldMenuLabel: "Filter bills by",
|
|
14
|
+
amountMin: "No less than",
|
|
15
|
+
amountMax: "No more than",
|
|
16
|
+
vendorSearchPlaceholder: "Search vendors",
|
|
17
|
+
vendorSearchLabel: "Search vendors",
|
|
18
|
+
vendorEmpty: "No vendors match",
|
|
19
|
+
vendorLoading: "Loading vendors",
|
|
20
|
+
vendorError: "Couldn't load vendors",
|
|
21
|
+
attachmentAny: "Any",
|
|
22
|
+
attachmentHas: "Has attachment",
|
|
23
|
+
attachmentNone: "No attachment",
|
|
24
|
+
attachmentLabel: "Filter by attachment",
|
|
25
|
+
clearAll: "Clear all",
|
|
26
|
+
filterMenuButton: n,
|
|
27
|
+
filterTag: r,
|
|
28
|
+
amountFilter: {
|
|
29
|
+
modeAny: e.modeAny,
|
|
30
|
+
modeExact: e.modeExact,
|
|
31
|
+
modeRange: e.modeRange,
|
|
32
|
+
flowAny: e.flowAny,
|
|
33
|
+
flowIn: e.flowIn,
|
|
34
|
+
flowOut: e.flowOut
|
|
35
|
+
},
|
|
36
|
+
dateRangePicker: { presetPlaceholder: t.presetPlaceholder }
|
|
10
37
|
};
|
|
11
38
|
//#endregion
|
|
12
|
-
export {
|
|
39
|
+
export { i as BILLS_FILTER_BAR_LABELS_EN };
|
|
@@ -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 "./index62.js";
|
|
3
|
-
import { BillsFilterField as f } from "./index63.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/index64.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 "./index63.js";
|
|
3
|
-
import "./index64.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 "./index63.js";
|
|
3
|
+
import { BillsFilterField as f } from "./index64.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/index65.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 "./index63.js";
|
|
2
|
+
import "./index64.js";
|
|
3
|
+
import "./index65.js";
|