@tesouro/embedded-components-react 0.5.235 → 0.5.236
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/README.md +3 -0
- package/dist/index.d.ts +110 -1
- package/dist/index.js +1 -1
- package/dist/lib/ReceivablesWidget.d.ts +110 -1
- package/dist/lib/ReceivablesWidget.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index10.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index15.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index16.js +3 -3
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index19.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index21.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index23.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index31.js +210 -208
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index32.js +98 -40
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index33.js +159 -39
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index34.js +53 -77
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index35.js +99 -132
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index36.js +40 -341
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index37.js +43 -0
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index38.js +92 -0
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index39.js +146 -0
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index40.js +354 -0
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index5.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index9.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index.js +28 -24
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index10.js +2 -37
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index11.js +9 -214
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index12.js +27 -159
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index13.js +233 -14
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index14.js +34 -22
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index15.js +214 -2
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index16.js +153 -87
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index17.js +16 -3
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index18.js +22 -21
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index19.js +2 -51
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index2.js +30 -15
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index20.js +90 -14
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index21.js +3 -10
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index22.js +20 -69
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index23.js +51 -33
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index24.js +16 -17
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index25.js +8 -14
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index26.js +70 -30
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index27.js +33 -14
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index28.js +17 -25
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index29.js +12 -83
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index3.js +9 -121
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index30.js +28 -401
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index31.js +16 -2
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index32.js +22 -42
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index33.js +80 -65
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index34.js +383 -473
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index35.js +2 -106
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index36.js +48 -0
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index37.js +72 -2
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index38.js +498 -4
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index39.js +106 -1
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index4.js +141 -93
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index41.js +2 -28
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index42.js +4 -236
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index43.js +0 -2
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index44.js +90 -239
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index45.js +24 -89
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index46.js +231 -54
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index47.js +3 -353
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index48.js +249 -0
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index49.js +93 -0
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index5.js +3 -40
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index50.js +59 -0
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index51.js +353 -0
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index6.js +18 -2
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index7.js +121 -9
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index8.js +100 -27
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index9.js +38 -233
- 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/invoicing-widget/ui/dist/index40.js +0 -100
package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index32.js
CHANGED
|
@@ -1,44 +1,102 @@
|
|
|
1
|
-
import {
|
|
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";
|
|
2
2
|
//#region ../../libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index32.js
|
|
3
|
-
var
|
|
4
|
-
"
|
|
5
|
-
"
|
|
6
|
-
"
|
|
7
|
-
"
|
|
8
|
-
"
|
|
9
|
-
"
|
|
10
|
-
"
|
|
11
|
-
"
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
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"
|
|
16
|
+
}, g = {
|
|
17
|
+
[h.Today]: "current",
|
|
18
|
+
[h.ThisWeek]: "current",
|
|
19
|
+
[h.ThisMonth]: "current",
|
|
20
|
+
[h.ThisQuarter]: "current",
|
|
21
|
+
[h.ThisYear]: "current",
|
|
22
|
+
[h.Yesterday]: "past",
|
|
23
|
+
[h.LastWeek]: "past",
|
|
24
|
+
[h.LastMonth]: "past",
|
|
25
|
+
[h.Last30Days]: "past",
|
|
26
|
+
[h.Last90Days]: "past",
|
|
27
|
+
[h.LastQuarter]: "past",
|
|
28
|
+
[h.LastYear]: "past"
|
|
29
|
+
};
|
|
30
|
+
function _(e) {
|
|
31
|
+
return e in g;
|
|
16
32
|
}
|
|
17
|
-
function
|
|
18
|
-
let
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
33
|
+
function v(g, _ = /* @__PURE__ */ new Date()) {
|
|
34
|
+
let v = a(_);
|
|
35
|
+
switch (g) {
|
|
36
|
+
case h.Today: return {
|
|
37
|
+
from: v,
|
|
38
|
+
to: e(v)
|
|
39
|
+
};
|
|
40
|
+
case h.ThisWeek: return {
|
|
41
|
+
from: c(v),
|
|
42
|
+
to: r(v)
|
|
43
|
+
};
|
|
44
|
+
case h.ThisMonth: return {
|
|
45
|
+
from: o(v),
|
|
46
|
+
to: t(v)
|
|
47
|
+
};
|
|
48
|
+
case h.ThisQuarter: return {
|
|
49
|
+
from: s(v),
|
|
50
|
+
to: n(v)
|
|
51
|
+
};
|
|
52
|
+
case h.ThisYear: return {
|
|
53
|
+
from: l(v),
|
|
54
|
+
to: i(v)
|
|
55
|
+
};
|
|
56
|
+
case h.Yesterday: {
|
|
57
|
+
let t = u(v, 1);
|
|
58
|
+
return {
|
|
59
|
+
from: t,
|
|
60
|
+
to: e(t)
|
|
61
|
+
};
|
|
62
|
+
}
|
|
63
|
+
case h.LastWeek: {
|
|
64
|
+
let e = c(p(v, 1));
|
|
65
|
+
return {
|
|
66
|
+
from: e,
|
|
67
|
+
to: r(e)
|
|
68
|
+
};
|
|
69
|
+
}
|
|
70
|
+
case h.LastMonth: {
|
|
71
|
+
let e = o(d(v, 1));
|
|
72
|
+
return {
|
|
73
|
+
from: e,
|
|
74
|
+
to: t(e)
|
|
75
|
+
};
|
|
76
|
+
}
|
|
77
|
+
case h.Last30Days: return {
|
|
78
|
+
from: u(v, 30),
|
|
79
|
+
to: v
|
|
80
|
+
};
|
|
81
|
+
case h.Last90Days: return {
|
|
82
|
+
from: u(v, 90),
|
|
83
|
+
to: v
|
|
84
|
+
};
|
|
85
|
+
case h.LastQuarter: {
|
|
86
|
+
let e = s(f(v, 1));
|
|
87
|
+
return {
|
|
88
|
+
from: e,
|
|
89
|
+
to: n(e)
|
|
90
|
+
};
|
|
91
|
+
}
|
|
92
|
+
case h.LastYear: {
|
|
93
|
+
let e = l(m(v, 1));
|
|
94
|
+
return {
|
|
95
|
+
from: e,
|
|
96
|
+
to: i(e)
|
|
97
|
+
};
|
|
98
|
+
}
|
|
99
|
+
}
|
|
42
100
|
}
|
|
43
101
|
//#endregion
|
|
44
|
-
export {
|
|
102
|
+
export { g as INVOICES_DATE_PRESET_GROUPS, h as InvoicesDatePreset, _ as isInvoicesDatePreset, v as resolveInvoicesDatePreset };
|
package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index33.js
CHANGED
|
@@ -1,43 +1,163 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
import { useReceivablesAnalyticsQuery as e } from "../../data-access/dist/index13.js";
|
|
6
|
-
import "../../data-access/dist/index.js";
|
|
7
|
-
import { buildReceivableStatusCardsView as t } from "./index32.js";
|
|
8
|
-
import { useMemo as n } from "react";
|
|
1
|
+
import { InvoicesFilterField as e } from "../../ui/dist/index3.js";
|
|
2
|
+
import "../../ui/dist/index.js";
|
|
3
|
+
import { INVOICES_DATE_PRESET_GROUPS as t } from "./index32.js";
|
|
4
|
+
import { addDays as n, formatISO as r, startOfDay as i } from "date-fns";
|
|
9
5
|
//#region ../../libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index33.js
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
6
|
+
var a = [
|
|
7
|
+
"draft",
|
|
8
|
+
"issued",
|
|
9
|
+
"overdue",
|
|
10
|
+
"partially_paid",
|
|
11
|
+
"paid",
|
|
12
|
+
"uncollectible",
|
|
13
|
+
"canceled",
|
|
14
|
+
"recurring"
|
|
15
|
+
], o = [
|
|
16
|
+
"draft",
|
|
17
|
+
"issued",
|
|
18
|
+
"overdue",
|
|
19
|
+
"partially_paid",
|
|
20
|
+
"paid",
|
|
21
|
+
"uncollectible"
|
|
22
|
+
], s = [
|
|
23
|
+
e.DueDate,
|
|
24
|
+
e.CreatedAt,
|
|
25
|
+
e.IssueDate,
|
|
26
|
+
e.Status,
|
|
27
|
+
e.Amount,
|
|
28
|
+
e.Customer
|
|
29
|
+
], c = {
|
|
30
|
+
dueDate: "due_date",
|
|
31
|
+
createdAt: "created_at",
|
|
32
|
+
issueDate: "issue_date"
|
|
33
|
+
}, l = {
|
|
34
|
+
Status: "status",
|
|
35
|
+
Customer: "customer",
|
|
36
|
+
Counterpart: "counterpart",
|
|
37
|
+
Amount: "amount",
|
|
38
|
+
Search: "search"
|
|
39
|
+
}, u = "date_";
|
|
40
|
+
function d(e) {
|
|
41
|
+
return {
|
|
42
|
+
dateRanges: {},
|
|
43
|
+
statuses: [],
|
|
44
|
+
amountMode: "any",
|
|
45
|
+
amountMin: "",
|
|
46
|
+
amountMax: "",
|
|
47
|
+
customerName: "",
|
|
48
|
+
customerId: e
|
|
49
|
+
};
|
|
50
|
+
}
|
|
51
|
+
function f(e) {
|
|
52
|
+
return !!(e?.from || e?.to || e?.preset);
|
|
53
|
+
}
|
|
54
|
+
function p(e) {
|
|
55
|
+
return Object.entries(e.dateRanges);
|
|
56
|
+
}
|
|
57
|
+
function m(e) {
|
|
58
|
+
let t = Number.parseFloat(e);
|
|
59
|
+
return Number.isNaN(t) ? void 0 : Math.round(t * 100);
|
|
60
|
+
}
|
|
61
|
+
function h(e) {
|
|
62
|
+
let t = {};
|
|
63
|
+
for (let [a, o] of p(e)) {
|
|
64
|
+
let e = c[a];
|
|
65
|
+
if (e === "due_date") {
|
|
66
|
+
o?.from && (t.due_date__gte = r(o.from, { representation: "date" })), o?.to && (t.due_date__lte = r(o.to, { representation: "date" }));
|
|
67
|
+
continue;
|
|
68
|
+
}
|
|
69
|
+
o?.from && (t[`${e}__gte`] = i(o.from).toISOString()), o?.to && (t[`${e}__lt`] = n(i(o.to), 1).toISOString());
|
|
70
|
+
}
|
|
71
|
+
if (t.status__in = e.statuses.length > 0 ? e.statuses : o, e.customerName && (t.counterpart_name__icontains = e.customerName), e.customerId && (t.counterpart_id = e.customerId), e.amountMode !== "any") {
|
|
72
|
+
let n = m(e.amountMin), r = m(e.amountMax);
|
|
73
|
+
e.amountMode === "exact" ? n !== void 0 && (t.total_amount__gte = n, t.total_amount__lte = n) : (n !== void 0 && (t.total_amount__gte = n), r !== void 0 && (t.total_amount__lte = r));
|
|
74
|
+
}
|
|
75
|
+
return t;
|
|
76
|
+
}
|
|
77
|
+
function g(e, t) {
|
|
78
|
+
return [
|
|
79
|
+
Object.values(e.dateRanges).some(f),
|
|
80
|
+
e.statuses.length > 0,
|
|
81
|
+
!!e.customerName,
|
|
82
|
+
!!e.customerId,
|
|
83
|
+
e.amountMode !== "any",
|
|
84
|
+
!!t
|
|
85
|
+
].filter(Boolean).length;
|
|
86
|
+
}
|
|
87
|
+
function _({ state: e, search: t, counterpartName: n, labels: r, statusLabels: i }) {
|
|
88
|
+
let a = [], o = new Map(Object.entries(i));
|
|
89
|
+
for (let [t, n] of p(e)) {
|
|
90
|
+
if (!f(n)) continue;
|
|
91
|
+
let e = n?.preset && n.preset in r.presets ? r.presets[n.preset] : void 0;
|
|
92
|
+
a.push({
|
|
93
|
+
key: `${u}${t}`,
|
|
94
|
+
label: r.dateChip(r.dateFieldNames[t], e ?? r.customRange)
|
|
95
|
+
});
|
|
96
|
+
}
|
|
97
|
+
if (e.statuses.length > 0) {
|
|
98
|
+
let [t, ...n] = e.statuses.map((e) => o.get(e) ?? e);
|
|
99
|
+
a.push({
|
|
100
|
+
key: l.Status,
|
|
101
|
+
label: r.statusChip(n.length === 0 ? t : r.moreSelected(t, n.length))
|
|
31
102
|
});
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
l,
|
|
35
|
-
r
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
103
|
+
}
|
|
104
|
+
return e.customerName && a.push({
|
|
105
|
+
key: l.Customer,
|
|
106
|
+
label: r.customerChip(e.customerName)
|
|
107
|
+
}), e.customerId && a.push({
|
|
108
|
+
key: l.Counterpart,
|
|
109
|
+
label: r.customerChip(n || e.customerId)
|
|
110
|
+
}), e.amountMode !== "any" && a.push({
|
|
111
|
+
key: l.Amount,
|
|
112
|
+
label: r.amountChip
|
|
113
|
+
}), t && a.push({
|
|
114
|
+
key: l.Search,
|
|
115
|
+
label: r.searchChip(t)
|
|
116
|
+
}), a;
|
|
117
|
+
}
|
|
118
|
+
function v(e, t) {
|
|
119
|
+
if (t.startsWith(u)) {
|
|
120
|
+
let n = t.slice(5), r = { ...e.dateRanges };
|
|
121
|
+
return delete r[n], {
|
|
122
|
+
...e,
|
|
123
|
+
dateRanges: r
|
|
124
|
+
};
|
|
125
|
+
}
|
|
126
|
+
switch (t) {
|
|
127
|
+
case l.Status: return {
|
|
128
|
+
...e,
|
|
129
|
+
statuses: []
|
|
130
|
+
};
|
|
131
|
+
case l.Customer: return {
|
|
132
|
+
...e,
|
|
133
|
+
customerName: ""
|
|
134
|
+
};
|
|
135
|
+
case l.Counterpart: return {
|
|
136
|
+
...e,
|
|
137
|
+
customerId: void 0
|
|
138
|
+
};
|
|
139
|
+
case l.Amount: return {
|
|
140
|
+
...e,
|
|
141
|
+
amountMode: "any",
|
|
142
|
+
amountMin: "",
|
|
143
|
+
amountMax: ""
|
|
144
|
+
};
|
|
145
|
+
default: return e;
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
function y(e, t) {
|
|
149
|
+
return a.map((n) => ({
|
|
150
|
+
value: n,
|
|
151
|
+
label: e[n],
|
|
152
|
+
description: t.statusDescriptions[n]
|
|
153
|
+
}));
|
|
154
|
+
}
|
|
155
|
+
function b(e) {
|
|
156
|
+
return Object.entries(t).map(([t, n]) => ({
|
|
157
|
+
value: t,
|
|
158
|
+
label: e.presets[t],
|
|
159
|
+
group: n === "current" ? e.presetGroupCurrent : e.presetGroupPast
|
|
160
|
+
}));
|
|
41
161
|
}
|
|
42
162
|
//#endregion
|
|
43
|
-
export {
|
|
163
|
+
export { s as INVOICES_FILTER_FIELDS, o as INVOICE_DEFAULT_STATUSES, a as INVOICE_FILTER_STATUSES, l as InvoicesFilterChipKey, b as buildInvoicesDatePresetOptions, _ as buildInvoicesFilterChips, h as buildInvoicesFilterQuery, y as buildInvoicesStatusOptions, v as clearInvoicesFilter, g as countActiveInvoiceFilters, d as emptyInvoicesFilterState };
|
package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index34.js
CHANGED
|
@@ -1,82 +1,58 @@
|
|
|
1
|
-
|
|
2
|
-
"use client";
|
|
3
|
-
"use client";
|
|
4
|
-
"use client";
|
|
5
|
-
import { buildReceivableRows as e, statusFilterOptions as t, typeForTab as n } from "./index13.js";
|
|
6
|
-
import { useReceivablesQuery as r } from "../../data-access/dist/index11.js";
|
|
7
|
-
import "../../data-access/dist/index.js";
|
|
8
|
-
import { useReceivableStatusCards as i } from "./index33.js";
|
|
9
|
-
import { useCallback as a, useEffect as o, useMemo as s, useState as c } from "react";
|
|
1
|
+
import { InvoicesDatePreset as e } from "./index32.js";
|
|
10
2
|
//#region ../../libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index34.js
|
|
11
|
-
var
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
k.refetch();
|
|
49
|
-
}, [k]);
|
|
3
|
+
var t = {
|
|
4
|
+
presets: {
|
|
5
|
+
[e.Today]: "Today",
|
|
6
|
+
[e.ThisWeek]: "This week",
|
|
7
|
+
[e.ThisMonth]: "This month",
|
|
8
|
+
[e.ThisQuarter]: "This quarter",
|
|
9
|
+
[e.ThisYear]: "This year",
|
|
10
|
+
[e.Yesterday]: "Yesterday",
|
|
11
|
+
[e.LastWeek]: "Last week",
|
|
12
|
+
[e.LastMonth]: "Last month",
|
|
13
|
+
[e.Last30Days]: "Last 30 days",
|
|
14
|
+
[e.Last90Days]: "Last 90 days",
|
|
15
|
+
[e.LastQuarter]: "Last quarter",
|
|
16
|
+
[e.LastYear]: "Last year"
|
|
17
|
+
},
|
|
18
|
+
presetGroupCurrent: "Current",
|
|
19
|
+
presetGroupPast: "Past",
|
|
20
|
+
dateFieldNames: {
|
|
21
|
+
dueDate: "Due date",
|
|
22
|
+
createdAt: "Created on",
|
|
23
|
+
issueDate: "Issue date"
|
|
24
|
+
},
|
|
25
|
+
customRange: "Custom range",
|
|
26
|
+
statusDescriptions: {
|
|
27
|
+
draft: "Created but not yet sent",
|
|
28
|
+
overdue: "Past due date",
|
|
29
|
+
partially_paid: "Some payment received",
|
|
30
|
+
paid: "Fully paid"
|
|
31
|
+
},
|
|
32
|
+
dateChip: (e, t) => `${e}: ${t}`,
|
|
33
|
+
statusChip: (e) => `Status: ${e}`,
|
|
34
|
+
moreSelected: (e, t) => `${e} + ${t} more`,
|
|
35
|
+
customerChip: (e) => `Customer: ${e}`,
|
|
36
|
+
amountChip: "Amount",
|
|
37
|
+
searchChip: (e) => `Search: ${e}`
|
|
38
|
+
};
|
|
39
|
+
function n(e) {
|
|
50
40
|
return {
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
statusOptions: t(w),
|
|
66
|
-
onStatusFilterChange: R,
|
|
67
|
-
statusCards: A,
|
|
68
|
-
isFiltering: F,
|
|
69
|
-
onRetry: V,
|
|
70
|
-
getReceivableById: N
|
|
41
|
+
...t,
|
|
42
|
+
...e,
|
|
43
|
+
presets: {
|
|
44
|
+
...t.presets,
|
|
45
|
+
...e?.presets
|
|
46
|
+
},
|
|
47
|
+
dateFieldNames: {
|
|
48
|
+
...t.dateFieldNames,
|
|
49
|
+
...e?.dateFieldNames
|
|
50
|
+
},
|
|
51
|
+
statusDescriptions: {
|
|
52
|
+
...t.statusDescriptions,
|
|
53
|
+
...e?.statusDescriptions
|
|
54
|
+
}
|
|
71
55
|
};
|
|
72
56
|
}
|
|
73
|
-
var d = {
|
|
74
|
-
documentLabel: "document_id",
|
|
75
|
-
customerLabel: "counterpart_name",
|
|
76
|
-
status: "status",
|
|
77
|
-
issueDateLabel: "issue_date",
|
|
78
|
-
dueDateLabel: "due_date",
|
|
79
|
-
totalLabel: "total_amount"
|
|
80
|
-
};
|
|
81
57
|
//#endregion
|
|
82
|
-
export {
|
|
58
|
+
export { t as INVOICES_FILTER_LABELS_EN, n as mergeInvoicesFilterLabels };
|