@tesouro/embedded-components-react 0.3.19 → 0.3.22
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.css +9 -0
- package/dist/index.js +1 -1
- package/dist/lib/BillPayWidget.js +1 -1
- package/dist/lib/monite-sdk.js +18 -18
- 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/invoicing-widget/feature/dist/index3.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index.js +19 -19
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index422.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index479.js +16 -20
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index480.js +13 -12
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index481.js +19 -97
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index482.js +98 -42
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index483.js +43 -27
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index484.js +30 -1
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index485.js +1 -17
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index486.js +11 -10
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index487.js +14 -4
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index488.js +4 -13
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index489.js +7 -7
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index490.js +18 -9
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index491.js +8 -105
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index492.js +102 -35
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index493.js +36 -45
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index494.js +44 -71
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index495.js +72 -100
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index496.js +99 -43
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index497.js +35 -178
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index498.js +171 -125
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index499.js +134 -123
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index500.js +125 -73
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index501.js +63 -232
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index502.js +248 -8
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index503.js +8 -6
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index504.js +5 -456
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index505.js +455 -21
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index506.js +17 -12
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index507.js +13 -49
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index508.js +51 -43
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index509.js +46 -14
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index510.js +13 -41
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index511.js +39 -144
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index512.js +143 -112
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index513.js +114 -39
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index514.js +33 -25
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index515.js +32 -19
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index516.js +3 -3
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index517.js +19 -21
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index518.js +20 -72
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index519.js +73 -17
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index520.js +18 -172
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index521.js +149 -116
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index522.js +136 -30
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index523.js +31 -115
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index524.js +116 -19
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index525.js +10 -36
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index526.js +46 -14
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index527.js +13 -23
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index528.js +21 -25
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index529.js +26 -36
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index530.js +36 -77
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index531.js +77 -50
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index532.js +50 -33
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index533.js +34 -89
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index534.js +86 -48
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index535.js +54 -1
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index536.js +1 -40
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index537.js +40 -1
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index538.js +0 -135
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index539.js +129 -102
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index540.js +105 -50
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index541.js +48 -779
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index542.js +780 -87
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index543.js +84 -97
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index544.js +105 -6
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index545.js +6 -27
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index546.js +23 -11
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index547.js +13 -2
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index548.js +2 -25
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index549.js +25 -14
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index550.js +14 -171
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index551.js +163 -200
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index552.js +204 -78
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index553.js +82 -17
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index554.js +17 -158
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index555.js +146 -85
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index556.js +95 -42
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index557.js +46 -4
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index558.js +4 -16
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index559.js +13 -24
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index560.js +27 -1
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index561.js +0 -186
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index562.js +186 -0
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index563.js +0 -42
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index564.js +41 -3
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index565.js +5 -24
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index566.js +20 -73
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index567.js +74 -16
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index568.js +16 -19
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index569.js +19 -5
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index570.js +4 -8
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index571.js +10 -11
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index572.js +11 -131
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index573.js +129 -4
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index574.js +4 -4
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index575.js +8 -5
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index576.js +4 -221
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index577.js +219 -11
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index578.js +12 -34
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index579.js +32 -181
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index580.js +168 -189
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index581.js +192 -88
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index582.js +97 -61
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index583.js +63 -54
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index584.js +46 -83
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index585.js +91 -40
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index586.js +39 -75
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index587.js +63 -71
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index588.js +85 -12
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index589.js +12 -24
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index590.js +25 -16
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index591.js +14 -2
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index592.js +4 -23
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index593.js +23 -0
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index594.js +1 -24
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index595.js +24 -4
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index596.js +4 -13
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index597.js +9 -13
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index598.js +13 -4
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index599.js +4 -8
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index600.js +8 -4
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index601.js +8 -6
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index602.js +6 -22
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index603.js +17 -68
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index604.js +66 -113
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index605.js +104 -64
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index606.js +72 -138
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index607.js +144 -28
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index608.js +28 -16
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index609.js +14 -87
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index610.js +91 -3
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index611.js +3 -26
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index612.js +22 -67
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index613.js +71 -1
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index614.js +0 -65
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index615.js +66 -29
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index616.js +30 -2
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index617.js +2 -34
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index618.js +33 -15
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index619.js +14 -29
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index620.js +29 -26
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index621.js +30 -2
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index622.js +2 -97
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index623.js +97 -0
- package/dist/libs/tesouro-embedded-components-react/settings-widget/feature/dist/index6.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/analytics/build-info.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/shared/monite-wrapper/feature/dist/lib/MoniteWrapper.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,181 +1,86 @@
|
|
|
1
|
-
|
|
2
|
-
"use client";
|
|
3
|
-
"use client";
|
|
4
|
-
"use client";
|
|
5
|
-
import { toast as e } from "../../../../../packages/shared-ui-shadcn/dist/index.js";
|
|
6
|
-
import { hasAnyScope as t } from "../../../shared/data-access/dist/lib/hasAnyScope.js";
|
|
7
|
-
import { Scope as n } from "../../../shared/data-access/dist/lib/scopes.js";
|
|
8
|
-
import "../../../shared/data-access/dist/index.js";
|
|
9
|
-
import "../../../shared/ui/dist/index.js";
|
|
10
|
-
import { useWidgetConfig as r } from "../../../shared/feature/dist/lib/WidgetProvider/hooks.js";
|
|
11
|
-
import "../../../shared/feature/dist/index.js";
|
|
12
|
-
import { AddBillDialog as i } from "../../ui/dist/index10.js";
|
|
13
|
-
import { BillsScreen as a } from "../../ui/dist/index60.js";
|
|
14
|
-
import "../../ui/dist/index.js";
|
|
15
|
-
import { BillCreateDialog as o } from "./index41.js";
|
|
16
|
-
import "./index42.js";
|
|
17
|
-
import { BillDetailsContainer as ee } from "./index45.js";
|
|
18
|
-
import "./index46.js";
|
|
19
|
-
import "./index52.js";
|
|
20
|
-
import "./index53.js";
|
|
21
|
-
import { DuplicateBillsContainer as s } from "./index56.js";
|
|
22
|
-
import "./index57.js";
|
|
23
|
-
import { BILL_QUEUE_ORDER as c, BillQueue as l } from "./index58.js";
|
|
24
|
-
import { BILLS_TAB_LABELS_EN as u } from "./index60.js";
|
|
25
|
-
import { useBillsTable as d } from "./index62.js";
|
|
26
|
-
import { copyTextToClipboard as f } from "./index59.js";
|
|
27
|
-
import { billsTabTestIds as p, billsTableCellTestIds as te } from "./index61.js";
|
|
28
|
-
import { useCallback as ne, useEffect as m, useMemo as h, useState as g } from "react";
|
|
29
|
-
import { jsx as _, jsxs as v } from "react/jsx-runtime";
|
|
30
|
-
import { CalendarClockIcon as y, CheckIcon as b, FilePenIcon as x, ListIcon as S, LoaderCircleIcon as C } from "lucide-react";
|
|
1
|
+
import { endOfDay as e, endOfMonth as t, endOfQuarter as n, endOfWeek as r, endOfYear as i, startOfDay as a, startOfMonth as o, startOfQuarter as s, startOfWeek as c, startOfYear as l, subDays as u, subMonths as d, subQuarters as f, subWeeks as p, subYears as m } from "date-fns";
|
|
31
2
|
//#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index63.js
|
|
32
|
-
var
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
[l.Paid]: /* @__PURE__ */ _(b, {
|
|
46
|
-
className: "ttw:size-4",
|
|
47
|
-
"aria-hidden": !0
|
|
48
|
-
}),
|
|
49
|
-
[l.All]: /* @__PURE__ */ _(S, {
|
|
50
|
-
className: "ttw:size-4",
|
|
51
|
-
"aria-hidden": !0
|
|
52
|
-
})
|
|
3
|
+
var h = {
|
|
4
|
+
Today: "today",
|
|
5
|
+
ThisWeek: "this_week",
|
|
6
|
+
ThisMonth: "this_month",
|
|
7
|
+
ThisQuarter: "this_quarter",
|
|
8
|
+
ThisYear: "this_year",
|
|
9
|
+
Yesterday: "yesterday",
|
|
10
|
+
LastWeek: "last_week",
|
|
11
|
+
LastMonth: "last_month",
|
|
12
|
+
Last30Days: "last_30_days",
|
|
13
|
+
Last90Days: "last_90_days",
|
|
14
|
+
LastQuarter: "last_quarter",
|
|
15
|
+
LastYear: "last_year"
|
|
53
16
|
};
|
|
54
|
-
function
|
|
55
|
-
let
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
17
|
+
function g(g, _ = /* @__PURE__ */ new Date()) {
|
|
18
|
+
let v = a(_);
|
|
19
|
+
switch (g) {
|
|
20
|
+
case h.Today: return {
|
|
21
|
+
from: v,
|
|
22
|
+
to: e(v)
|
|
23
|
+
};
|
|
24
|
+
case h.ThisWeek: return {
|
|
25
|
+
from: c(v),
|
|
26
|
+
to: r(v)
|
|
27
|
+
};
|
|
28
|
+
case h.ThisMonth: return {
|
|
29
|
+
from: o(v),
|
|
30
|
+
to: t(v)
|
|
31
|
+
};
|
|
32
|
+
case h.ThisQuarter: return {
|
|
33
|
+
from: s(v),
|
|
34
|
+
to: n(v)
|
|
35
|
+
};
|
|
36
|
+
case h.ThisYear: return {
|
|
37
|
+
from: l(v),
|
|
38
|
+
to: i(v)
|
|
39
|
+
};
|
|
40
|
+
case h.Yesterday: {
|
|
41
|
+
let t = u(v, 1);
|
|
42
|
+
return {
|
|
43
|
+
from: t,
|
|
44
|
+
to: e(t)
|
|
45
|
+
};
|
|
73
46
|
}
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
onPageSizeChange: J.onPageSizeChange,
|
|
112
|
-
hasNextPage: J.hasNextPage,
|
|
113
|
-
hasPrevPage: J.hasPrevPage,
|
|
114
|
-
onNextPage: J.onNextPage,
|
|
115
|
-
onPrevPage: J.onPrevPage,
|
|
116
|
-
filterTabs: ie,
|
|
117
|
-
selectedFilterTabId: J.selectedFilterTabId,
|
|
118
|
-
onFilterTabChange: J.onFilterTabChange,
|
|
119
|
-
searchValue: J.searchValue,
|
|
120
|
-
onSearchChange: J.onSearchChange,
|
|
121
|
-
visibleColumns: J.visibleColumns,
|
|
122
|
-
cellTestIds: te,
|
|
123
|
-
isSearchActive: J.isSearchActive,
|
|
124
|
-
showAddPanelWhenEmpty: J.showAddPanelWhenEmpty,
|
|
125
|
-
emptyState: E.queueEmptyStates[J.selectedFilterTabId],
|
|
126
|
-
onCreateClick: G ? () => O(!0) : void 0,
|
|
127
|
-
onEnterManually: G ? Z : void 0,
|
|
128
|
-
onFilesSelected: G ? Q : void 0,
|
|
129
|
-
maxFiles: 10,
|
|
130
|
-
emailAddress: w,
|
|
131
|
-
onCopyEmail: $,
|
|
132
|
-
duplicateWarning: re,
|
|
133
|
-
onReviewDuplicates: () => B(!0),
|
|
134
|
-
labels: se
|
|
135
|
-
}),
|
|
136
|
-
z ? /* @__PURE__ */ _(s, {
|
|
137
|
-
open: z,
|
|
138
|
-
onOpenChange: B,
|
|
139
|
-
bills: C,
|
|
140
|
-
canManageDuplicates: G,
|
|
141
|
-
onOpenBill: ae
|
|
142
|
-
}) : null,
|
|
143
|
-
G ? /* @__PURE__ */ _(i, {
|
|
144
|
-
open: D,
|
|
145
|
-
onOpenChange: O,
|
|
146
|
-
onFilesSelected: Q,
|
|
147
|
-
maxFiles: 10,
|
|
148
|
-
onEnterManually: Z,
|
|
149
|
-
emailAddress: w,
|
|
150
|
-
onCopyEmail: $,
|
|
151
|
-
labels: { heading: J.hasAnyBills ? E.nonEmptyHeading : E.emptyHeading }
|
|
152
|
-
}) : null,
|
|
153
|
-
j ? /* @__PURE__ */ _(o, {
|
|
154
|
-
open: j,
|
|
155
|
-
onOpenChange: M,
|
|
156
|
-
payableId: k,
|
|
157
|
-
isPossibleDuplicate: Y(k)
|
|
158
|
-
}) : null,
|
|
159
|
-
F ? /* @__PURE__ */ _(ee, {
|
|
160
|
-
open: F,
|
|
161
|
-
onOpenChange: I,
|
|
162
|
-
payableId: N,
|
|
163
|
-
onClose: () => I(!1),
|
|
164
|
-
onExpand: oe,
|
|
165
|
-
isPossibleDuplicate: Y(N),
|
|
166
|
-
testId: p.detailsSheet,
|
|
167
|
-
poweredByBankName: S
|
|
168
|
-
}) : null,
|
|
169
|
-
L ? /* @__PURE__ */ _(o, {
|
|
170
|
-
open: L,
|
|
171
|
-
onOpenChange: R,
|
|
172
|
-
payableId: N,
|
|
173
|
-
readOnly: !0,
|
|
174
|
-
poweredByBankName: S,
|
|
175
|
-
isPossibleDuplicate: Y(N)
|
|
176
|
-
}) : null
|
|
177
|
-
]
|
|
178
|
-
});
|
|
47
|
+
case h.LastWeek: {
|
|
48
|
+
let e = c(p(v, 1));
|
|
49
|
+
return {
|
|
50
|
+
from: e,
|
|
51
|
+
to: r(e)
|
|
52
|
+
};
|
|
53
|
+
}
|
|
54
|
+
case h.LastMonth: {
|
|
55
|
+
let e = o(d(v, 1));
|
|
56
|
+
return {
|
|
57
|
+
from: e,
|
|
58
|
+
to: t(e)
|
|
59
|
+
};
|
|
60
|
+
}
|
|
61
|
+
case h.Last30Days: return {
|
|
62
|
+
from: u(v, 29),
|
|
63
|
+
to: e(v)
|
|
64
|
+
};
|
|
65
|
+
case h.Last90Days: return {
|
|
66
|
+
from: u(v, 89),
|
|
67
|
+
to: e(v)
|
|
68
|
+
};
|
|
69
|
+
case h.LastQuarter: {
|
|
70
|
+
let e = s(f(v, 1));
|
|
71
|
+
return {
|
|
72
|
+
from: e,
|
|
73
|
+
to: n(e)
|
|
74
|
+
};
|
|
75
|
+
}
|
|
76
|
+
case h.LastYear: {
|
|
77
|
+
let e = l(m(v, 1));
|
|
78
|
+
return {
|
|
79
|
+
from: e,
|
|
80
|
+
to: i(e)
|
|
81
|
+
};
|
|
82
|
+
}
|
|
83
|
+
}
|
|
179
84
|
}
|
|
180
85
|
//#endregion
|
|
181
|
-
export {
|
|
86
|
+
export { h as BillsDatePreset, g as resolveDatePreset };
|
|
@@ -1,4 +1,50 @@
|
|
|
1
|
-
import "./
|
|
2
|
-
import "./
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
import { BillStatusFilter as e } from "./index62.js";
|
|
2
|
+
import { BillsDatePreset as t } from "./index63.js";
|
|
3
|
+
//#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index64.js
|
|
4
|
+
var n = {
|
|
5
|
+
presets: {
|
|
6
|
+
[t.Today]: "Today",
|
|
7
|
+
[t.ThisWeek]: "This week",
|
|
8
|
+
[t.ThisMonth]: "This month",
|
|
9
|
+
[t.ThisQuarter]: "This quarter",
|
|
10
|
+
[t.ThisYear]: "This year",
|
|
11
|
+
[t.Yesterday]: "Yesterday",
|
|
12
|
+
[t.LastWeek]: "Last week",
|
|
13
|
+
[t.LastMonth]: "Last month",
|
|
14
|
+
[t.Last30Days]: "Last 30 days",
|
|
15
|
+
[t.Last90Days]: "Last 90 days",
|
|
16
|
+
[t.LastQuarter]: "Last quarter",
|
|
17
|
+
[t.LastYear]: "Last year"
|
|
18
|
+
},
|
|
19
|
+
presetGroupCurrent: "Current",
|
|
20
|
+
presetGroupPast: "Past",
|
|
21
|
+
statuses: {
|
|
22
|
+
[e.Draft]: "Draft",
|
|
23
|
+
[e.PendingApproval]: "Pending approval",
|
|
24
|
+
[e.ReadyToPay]: "Ready to pay",
|
|
25
|
+
[e.PartiallyPaid]: "Partially paid",
|
|
26
|
+
[e.Paid]: "Paid",
|
|
27
|
+
[e.Rejected]: "Rejected",
|
|
28
|
+
[e.Canceled]: "Canceled"
|
|
29
|
+
},
|
|
30
|
+
dateFieldNames: {
|
|
31
|
+
issueDate: "Issue date",
|
|
32
|
+
dueDate: "Due date",
|
|
33
|
+
addedOn: "Added on"
|
|
34
|
+
},
|
|
35
|
+
dateChip: (e, t) => `${e}: ${t}`,
|
|
36
|
+
statusChip: (e) => `Status: ${e}`,
|
|
37
|
+
vendorChip: (e) => `Vendor: ${e}`,
|
|
38
|
+
amountChip: (e) => `Total amount: ${e}`,
|
|
39
|
+
attachmentChipHas: "Has attachment",
|
|
40
|
+
attachmentChipNone: "No attachment",
|
|
41
|
+
moreSelected: (e, t) => `${e} + ${t} more`,
|
|
42
|
+
amountAtLeast: (e) => `${e} or more`,
|
|
43
|
+
amountAtMost: (e) => `${e} or less`,
|
|
44
|
+
amountBetween: (e, t) => `${e} - ${t}`,
|
|
45
|
+
dateRange: (e, t) => `${e} - ${t}`,
|
|
46
|
+
dateFrom: (e) => `From ${e}`,
|
|
47
|
+
dateTo: (e) => `Until ${e}`
|
|
48
|
+
};
|
|
49
|
+
//#endregion
|
|
50
|
+
export { n as BILLS_FILTER_LABELS_EN };
|
|
@@ -1,8 +1,253 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
"use client";
|
|
3
|
+
"use client";
|
|
4
|
+
"use client";
|
|
5
|
+
import { formatMoneyExact as e } from "../../../shared/util/dist/lib/formatMoneyExact.js";
|
|
6
|
+
import { BillsFilterField as t } from "../../ui/dist/index60.js";
|
|
7
|
+
import "../../ui/dist/index.js";
|
|
8
|
+
import "../../data-access/dist/index.js";
|
|
9
|
+
import { getCounterpartName as n } from "../../../shared/counterpart-management/feature/dist/lib/helpers.js";
|
|
10
|
+
import { useCounterpartsQuery as r } from "../../../shared/counterpart-management/data-access/dist/index3.js";
|
|
11
|
+
import "../../../shared/counterpart-management/feature/dist/index.js";
|
|
12
|
+
import { BILL_STATUS_FILTER_ORDER as i, billStatusFilterApiValues as a } from "./index62.js";
|
|
13
|
+
import { BillsDatePreset as o, resolveDatePreset as s } from "./index63.js";
|
|
14
|
+
import { BILLS_FILTER_LABELS_EN as c } from "./index64.js";
|
|
15
|
+
import { useCallback as l, useEffect as u, useMemo as d, useState as f } from "react";
|
|
16
|
+
import { format as p, formatISO as m } from "date-fns";
|
|
1
17
|
//#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index65.js
|
|
2
|
-
var
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
18
|
+
var h = {
|
|
19
|
+
Date: "date",
|
|
20
|
+
Status: "status",
|
|
21
|
+
Amount: "amount",
|
|
22
|
+
Vendor: "vendor",
|
|
23
|
+
Attachment: "attachment"
|
|
24
|
+
}, g = 50, _ = 300, v = "MMM d, yyyy", y = 864e5, b = {
|
|
25
|
+
[t.IssueDate]: "issued_at",
|
|
26
|
+
[t.DueDate]: "due_date",
|
|
27
|
+
[t.AddedOn]: "created_at"
|
|
28
|
+
}, x = {
|
|
29
|
+
[o.Today]: "current",
|
|
30
|
+
[o.ThisWeek]: "current",
|
|
31
|
+
[o.ThisMonth]: "current",
|
|
32
|
+
[o.ThisQuarter]: "current",
|
|
33
|
+
[o.ThisYear]: "current",
|
|
34
|
+
[o.Yesterday]: "past",
|
|
35
|
+
[o.LastWeek]: "past",
|
|
36
|
+
[o.LastMonth]: "past",
|
|
37
|
+
[o.Last30Days]: "past",
|
|
38
|
+
[o.Last90Days]: "past",
|
|
39
|
+
[o.LastQuarter]: "past",
|
|
40
|
+
[o.LastYear]: "past"
|
|
6
41
|
};
|
|
42
|
+
function S() {
|
|
43
|
+
return {
|
|
44
|
+
dateField: t.DueDate,
|
|
45
|
+
statuses: [],
|
|
46
|
+
amountMode: "any",
|
|
47
|
+
amountMin: "",
|
|
48
|
+
amountMax: "",
|
|
49
|
+
vendorIds: []
|
|
50
|
+
};
|
|
51
|
+
}
|
|
52
|
+
function C(e) {
|
|
53
|
+
let t = Number.parseFloat(e);
|
|
54
|
+
return Number.isFinite(t) ? Math.round(t * 100) : void 0;
|
|
55
|
+
}
|
|
56
|
+
function w({ offersStatusFilter: o = !1, offersVendorFilter: w = !0, isVendorFilterPaused: T = !1, onFiltersChange: E, labels: D } = {}) {
|
|
57
|
+
let O = d(() => ({
|
|
58
|
+
...c,
|
|
59
|
+
...D,
|
|
60
|
+
presets: {
|
|
61
|
+
...c.presets,
|
|
62
|
+
...D?.presets
|
|
63
|
+
},
|
|
64
|
+
statuses: {
|
|
65
|
+
...c.statuses,
|
|
66
|
+
...D?.statuses
|
|
67
|
+
},
|
|
68
|
+
dateFieldNames: {
|
|
69
|
+
...c.dateFieldNames,
|
|
70
|
+
...D?.dateFieldNames
|
|
71
|
+
}
|
|
72
|
+
}), [D]), [k, A] = f(S), [j, M] = f({}), [N, P] = f(""), [F, I] = f(""), L = l((e) => {
|
|
73
|
+
A((t) => ({
|
|
74
|
+
...t,
|
|
75
|
+
...e
|
|
76
|
+
})), E?.();
|
|
77
|
+
}, [E]);
|
|
78
|
+
u(() => {
|
|
79
|
+
w || A((e) => e.vendorIds.length === 0 ? e : (E?.(), {
|
|
80
|
+
...e,
|
|
81
|
+
vendorIds: []
|
|
82
|
+
}));
|
|
83
|
+
}, [w, E]), u(() => {
|
|
84
|
+
o || A((e) => e.statuses.length === 0 ? e : (E?.(), {
|
|
85
|
+
...e,
|
|
86
|
+
statuses: []
|
|
87
|
+
}));
|
|
88
|
+
}, [o, E]), u(() => {
|
|
89
|
+
let e = setTimeout(() => I(N.trim()), _);
|
|
90
|
+
return () => clearTimeout(e);
|
|
91
|
+
}, [N]);
|
|
92
|
+
let R = r({
|
|
93
|
+
enabled: w && !T,
|
|
94
|
+
is_vendor: !0,
|
|
95
|
+
sort: "counterpart_name",
|
|
96
|
+
order: "asc",
|
|
97
|
+
limit: g,
|
|
98
|
+
counterpart_name__icontains: F || void 0
|
|
99
|
+
}), z = d(() => (R.data?.data ?? []).map((e) => ({
|
|
100
|
+
value: e.id,
|
|
101
|
+
label: n(e)
|
|
102
|
+
})), [R.data?.data]), B = d(() => i.map((e) => ({
|
|
103
|
+
value: e,
|
|
104
|
+
label: O.statuses[e]
|
|
105
|
+
})), [O.statuses]), V = d(() => Object.entries(x).map(([e, t]) => ({
|
|
106
|
+
value: e,
|
|
107
|
+
label: O.presets[e],
|
|
108
|
+
group: t === "current" ? O.presetGroupCurrent : O.presetGroupPast
|
|
109
|
+
})), [
|
|
110
|
+
O.presetGroupCurrent,
|
|
111
|
+
O.presetGroupPast,
|
|
112
|
+
O.presets
|
|
113
|
+
]), H = d(() => {
|
|
114
|
+
let e = {}, t = b[k.dateField], n = (e) => Date.UTC(e.getFullYear(), e.getMonth(), e.getDate());
|
|
115
|
+
if (k.dateFrom && (e[`${t}__gte`] = t === "created_at" ? new Date(n(k.dateFrom)).toISOString() : m(k.dateFrom, { representation: "date" })), k.dateTo && (t === "created_at" ? e.created_at__lt = new Date(n(k.dateTo) + y).toISOString() : e[`${t}__lte`] = m(k.dateTo, { representation: "date" })), k.statuses.length > 0 && (e.status__in = a(k.statuses)), k.amountMode !== "any") {
|
|
116
|
+
let t = "total_amount__gte", n = "total_amount__lte", r = C(k.amountMin), i = C(k.amountMax);
|
|
117
|
+
k.amountMode === "exact" ? r !== void 0 && (e[t] = r, e[n] = r) : (r !== void 0 && (e[t] = r), i !== void 0 && (e[n] = i));
|
|
118
|
+
}
|
|
119
|
+
return k.vendorIds.length > 0 && (e.counterpart_id__in = [...k.vendorIds]), k.hasFile !== void 0 && (e.has_file = k.hasFile), e;
|
|
120
|
+
}, [k]), U = d(() => {
|
|
121
|
+
let t = [], n = (e) => p(e, v), r = (e) => {
|
|
122
|
+
let [t, ...n] = e;
|
|
123
|
+
return t ? n.length === 0 ? t : O.moreSelected(t, n.length) : "";
|
|
124
|
+
};
|
|
125
|
+
if (k.dateFrom || k.dateTo) {
|
|
126
|
+
let e = (k.datePreset ? O.presets[k.datePreset] : void 0) ?? (k.dateFrom && k.dateTo ? O.dateRange(n(k.dateFrom), n(k.dateTo)) : k.dateFrom ? O.dateFrom(n(k.dateFrom)) : O.dateTo(n(k.dateTo)));
|
|
127
|
+
t.push({
|
|
128
|
+
key: h.Date,
|
|
129
|
+
label: O.dateChip(O.dateFieldNames[k.dateField], e)
|
|
130
|
+
});
|
|
131
|
+
}
|
|
132
|
+
if (k.statuses.length > 0 && t.push({
|
|
133
|
+
key: h.Status,
|
|
134
|
+
label: O.statusChip(r(k.statuses.map((e) => O.statuses[e] ?? e)))
|
|
135
|
+
}), k.vendorIds.length > 0 && t.push({
|
|
136
|
+
key: h.Vendor,
|
|
137
|
+
label: O.vendorChip(r(k.vendorIds.map((e) => j[e] ?? e)))
|
|
138
|
+
}), k.amountMode !== "any") {
|
|
139
|
+
let n = (t) => {
|
|
140
|
+
let n = Number.parseFloat(t);
|
|
141
|
+
return Number.isFinite(n) ? e(n, { currencyCode: "USD" }) : "";
|
|
142
|
+
}, r = n(k.amountMin), i = n(k.amountMax), a = k.amountMode === "exact" ? r : r && i ? O.amountBetween(r, i) : r ? O.amountAtLeast(r) : i ? O.amountAtMost(i) : "";
|
|
143
|
+
a && t.push({
|
|
144
|
+
key: h.Amount,
|
|
145
|
+
label: O.amountChip(a)
|
|
146
|
+
});
|
|
147
|
+
}
|
|
148
|
+
return k.hasFile !== void 0 && t.push({
|
|
149
|
+
key: h.Attachment,
|
|
150
|
+
label: k.hasFile ? O.attachmentChipHas : O.attachmentChipNone
|
|
151
|
+
}), t;
|
|
152
|
+
}, [
|
|
153
|
+
O,
|
|
154
|
+
k,
|
|
155
|
+
j
|
|
156
|
+
]), W = l((e) => {
|
|
157
|
+
switch (e) {
|
|
158
|
+
case h.Date:
|
|
159
|
+
L({
|
|
160
|
+
datePreset: void 0,
|
|
161
|
+
dateFrom: void 0,
|
|
162
|
+
dateTo: void 0
|
|
163
|
+
});
|
|
164
|
+
break;
|
|
165
|
+
case h.Status:
|
|
166
|
+
L({ statuses: [] });
|
|
167
|
+
break;
|
|
168
|
+
case h.Vendor:
|
|
169
|
+
L({ vendorIds: [] });
|
|
170
|
+
break;
|
|
171
|
+
case h.Amount:
|
|
172
|
+
L({
|
|
173
|
+
amountMode: "any",
|
|
174
|
+
amountMin: "",
|
|
175
|
+
amountMax: ""
|
|
176
|
+
});
|
|
177
|
+
break;
|
|
178
|
+
case h.Attachment: L({ hasFile: void 0 });
|
|
179
|
+
}
|
|
180
|
+
}, [L]), G = l(() => {
|
|
181
|
+
A(S()), E?.();
|
|
182
|
+
}, [E]), K = l((e) => {
|
|
183
|
+
M((t) => {
|
|
184
|
+
let n = { ...t };
|
|
185
|
+
for (let t of z) e.includes(t.value) && (n[t.value] = t.label);
|
|
186
|
+
return n;
|
|
187
|
+
}), L({ vendorIds: e });
|
|
188
|
+
}, [L, z]);
|
|
189
|
+
return {
|
|
190
|
+
filterBarProps: {
|
|
191
|
+
fields: [...d(() => [
|
|
192
|
+
...w ? [t.Vendor] : [],
|
|
193
|
+
t.IssueDate,
|
|
194
|
+
t.DueDate,
|
|
195
|
+
...o ? [t.Status] : [],
|
|
196
|
+
t.TotalAmount,
|
|
197
|
+
t.AddedOn,
|
|
198
|
+
t.Attachment
|
|
199
|
+
], [o, w])],
|
|
200
|
+
activeFilterCount: U.length,
|
|
201
|
+
chips: U,
|
|
202
|
+
onRemoveChip: W,
|
|
203
|
+
onClearAll: G,
|
|
204
|
+
dateField: k.dateField,
|
|
205
|
+
onDateFieldChange: (e) => {
|
|
206
|
+
let t = !!(k.dateFrom || k.dateTo);
|
|
207
|
+
A((t) => ({
|
|
208
|
+
...t,
|
|
209
|
+
dateField: e
|
|
210
|
+
})), t && E?.();
|
|
211
|
+
},
|
|
212
|
+
datePresets: V,
|
|
213
|
+
selectedDatePreset: k.datePreset,
|
|
214
|
+
dateFrom: k.dateFrom,
|
|
215
|
+
dateTo: k.dateTo,
|
|
216
|
+
onDateRangeChange: ({ from: e, to: t }) => L({
|
|
217
|
+
datePreset: void 0,
|
|
218
|
+
dateFrom: e,
|
|
219
|
+
dateTo: t
|
|
220
|
+
}),
|
|
221
|
+
onDatePresetChange: (e) => {
|
|
222
|
+
let n = /* @__PURE__ */ new Date(), r = k.dateField === t.AddedOn ? new Date(n.getUTCFullYear(), n.getUTCMonth(), n.getUTCDate()) : n, { from: i, to: a } = s(e, r);
|
|
223
|
+
L({
|
|
224
|
+
datePreset: e,
|
|
225
|
+
dateFrom: i,
|
|
226
|
+
dateTo: a
|
|
227
|
+
});
|
|
228
|
+
},
|
|
229
|
+
statusOptions: B,
|
|
230
|
+
selectedStatuses: k.statuses,
|
|
231
|
+
onStatusChange: (e) => L({ statuses: e }),
|
|
232
|
+
amountMode: k.amountMode,
|
|
233
|
+
onAmountModeChange: (e) => L({ amountMode: e }),
|
|
234
|
+
amountMin: k.amountMin,
|
|
235
|
+
amountMax: k.amountMax,
|
|
236
|
+
onAmountMinChange: (e) => L({ amountMin: e }),
|
|
237
|
+
onAmountMaxChange: (e) => L({ amountMax: e }),
|
|
238
|
+
vendorOptions: z,
|
|
239
|
+
selectedVendors: k.vendorIds,
|
|
240
|
+
onVendorChange: K,
|
|
241
|
+
vendorSearchValue: N,
|
|
242
|
+
onVendorSearchChange: P,
|
|
243
|
+
isVendorLoading: R.isLoading || T,
|
|
244
|
+
isVendorError: R.isError,
|
|
245
|
+
hasAttachment: k.hasFile,
|
|
246
|
+
onHasAttachmentChange: (e) => L({ hasFile: e })
|
|
247
|
+
},
|
|
248
|
+
query: H,
|
|
249
|
+
isFilterActive: U.length > 0
|
|
250
|
+
};
|
|
251
|
+
}
|
|
7
252
|
//#endregion
|
|
8
|
-
export {
|
|
253
|
+
export { h as BillsFilterChipKey, w as useBillsFilters };
|