@tesouro/embedded-components-react 0.11.216 → 0.11.217
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 +0 -3
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/ui/dist/index5.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bills-list/feature/dist/index14.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bills-list/feature/dist/index15.js +49 -49
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bills-list/feature/dist/index17.js +287 -298
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bills-list/feature/dist/index18.js +62 -63
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bills-list/feature/dist/index5.js +12 -54
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bills-list/feature/dist/index7.js +4 -5
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bills-list/feature/dist/index8.js +1 -7
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bills-list/ui/dist/index.js +2 -8
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bills-list/ui/dist/index11.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bills-list/ui/dist/index15.js +45 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bills-list/ui/dist/index16.js +10 -14
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bills-list/ui/dist/index17.js +390 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bills-list/ui/dist/index18.js +3 -3
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/lib/BillPayWidget/BillPayWidget.js +9 -9
- 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/ui/dist/index.js +12 -9
- package/dist/libs/tesouro-embedded-components-react/shared/ui/dist/lib/DueDateText/DueDateText.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/{bill-pay-widget/bills-list/ui/dist/index19.js → shared/ui/dist/lib/EmptyValue/EmptyValue.js} +6 -6
- package/dist/libs/tesouro-embedded-components-react/shared/ui/dist/lib/EmptyValue/labels.js +3 -0
- package/dist/libs/tesouro-embedded-components-react/shared/ui/dist/lib/{DateDisclosure/DateDisclosure.js → HintDisclosure/HintDisclosure.js} +9 -8
- package/dist/libs/tesouro-embedded-components-react/shared/ui/dist/lib/RowStatusIcon/RowStatusIcon.js +19 -0
- package/package.json +1 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bills-list/ui/dist/index20.js +0 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bills-list/ui/dist/index21.js +0 -55
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bills-list/ui/dist/index22.js +0 -17
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bills-list/ui/dist/index23.js +0 -468
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bills-list/ui/dist/index24.js +0 -3
package/dist/index.css
CHANGED
package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/ui/dist/index5.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Badge as e } from "../../../../../../packages/shared-ui-shadcn/dist/index.js";
|
|
2
|
-
import {
|
|
2
|
+
import { HintDisclosure as t } from "../../../../shared/ui/dist/lib/HintDisclosure/HintDisclosure.js";
|
|
3
3
|
import "../../../../shared/ui/dist/index.js";
|
|
4
4
|
import { BILL_STATUS_TONE_CLASS_NAME as n } from "../../../../shared/document-status/ui/dist/index3.js";
|
|
5
5
|
import "../../../../shared/document-status/ui/dist/index.js";
|
|
@@ -12,7 +12,7 @@ function i({ summary: i, date: a }) {
|
|
|
12
12
|
children: i
|
|
13
13
|
});
|
|
14
14
|
return a ? /* @__PURE__ */ r(t, {
|
|
15
|
-
|
|
15
|
+
hint: a,
|
|
16
16
|
children: o
|
|
17
17
|
}) : o;
|
|
18
18
|
}
|
|
@@ -30,12 +30,12 @@ var n = {
|
|
|
30
30
|
dateFieldNames: {
|
|
31
31
|
issueDate: "Issue date",
|
|
32
32
|
dueDate: "Due date",
|
|
33
|
-
addedOn: "
|
|
33
|
+
addedOn: "Created"
|
|
34
34
|
},
|
|
35
35
|
dateChip: (e, t) => `${e}: ${t}`,
|
|
36
36
|
statusChip: (e) => `Status: ${e}`,
|
|
37
37
|
vendorChip: (e) => `Vendor: ${e}`,
|
|
38
|
-
amountChip: (e) => `
|
|
38
|
+
amountChip: (e) => `Amount: ${e}`,
|
|
39
39
|
attachmentChipHas: "Has attachment",
|
|
40
40
|
attachmentChipNone: "No attachment",
|
|
41
41
|
pastDue: "Past due",
|
|
@@ -6,11 +6,11 @@ import { formatMoneyExact as e } from "../../../../shared/util/dist/lib/formatMo
|
|
|
6
6
|
import "../../../../shared/util/dist/index.js";
|
|
7
7
|
import "../../../util/dist/index.js";
|
|
8
8
|
import { billStatusFilterApiValues as t } from "./index4.js";
|
|
9
|
-
import {
|
|
9
|
+
import { BillSummaryCard as n, billSummaryCardFilter as r } from "./index10.js";
|
|
10
|
+
import { BillsDatePreset as i, resolveDatePreset as a } from "./index13.js";
|
|
11
|
+
import { BILLS_FILTER_LABELS_EN as o } from "./index14.js";
|
|
12
|
+
import { BillsFilterField as s } from "../../ui/dist/index12.js";
|
|
10
13
|
import "../../ui/dist/index.js";
|
|
11
|
-
import { BillSummaryCard as r, billSummaryCardFilter as i } from "./index10.js";
|
|
12
|
-
import { BillsDatePreset as a, resolveDatePreset as o } from "./index13.js";
|
|
13
|
-
import { BILLS_FILTER_LABELS_EN as s } from "./index14.js";
|
|
14
14
|
import { getCounterpartName as c } from "../../../../shared/counterpart-management/feature/dist/lib/helpers.js";
|
|
15
15
|
import { useCounterpartsQuery as l } from "../../../../shared/counterpart-management/data-access/dist/index3.js";
|
|
16
16
|
import "../../../../shared/counterpart-management/feature/dist/index.js";
|
|
@@ -25,27 +25,27 @@ var _ = {
|
|
|
25
25
|
Vendor: "vendor",
|
|
26
26
|
Attachment: "attachment"
|
|
27
27
|
}, v = [], y = 50, b = 300, x = "MMM d, yyyy", S = 2, C = 864e5, ee = {
|
|
28
|
-
[
|
|
29
|
-
[
|
|
30
|
-
[
|
|
28
|
+
[s.IssueDate]: "issued_at",
|
|
29
|
+
[s.DueDate]: "due_date",
|
|
30
|
+
[s.AddedOn]: "created_at"
|
|
31
31
|
}, te = {
|
|
32
|
-
[
|
|
33
|
-
[
|
|
34
|
-
[
|
|
35
|
-
[
|
|
36
|
-
[
|
|
37
|
-
[
|
|
38
|
-
[
|
|
39
|
-
[
|
|
40
|
-
[
|
|
41
|
-
[
|
|
42
|
-
[
|
|
43
|
-
[
|
|
32
|
+
[i.Today]: "current",
|
|
33
|
+
[i.ThisWeek]: "current",
|
|
34
|
+
[i.ThisMonth]: "current",
|
|
35
|
+
[i.ThisQuarter]: "current",
|
|
36
|
+
[i.ThisYear]: "current",
|
|
37
|
+
[i.Yesterday]: "past",
|
|
38
|
+
[i.LastWeek]: "past",
|
|
39
|
+
[i.LastMonth]: "past",
|
|
40
|
+
[i.Last30Days]: "past",
|
|
41
|
+
[i.Last90Days]: "past",
|
|
42
|
+
[i.LastQuarter]: "past",
|
|
43
|
+
[i.LastYear]: "past"
|
|
44
44
|
};
|
|
45
45
|
function w(e = null) {
|
|
46
46
|
return {
|
|
47
47
|
summaryCard: e,
|
|
48
|
-
dateField:
|
|
48
|
+
dateField: s.DueDate,
|
|
49
49
|
statuses: [],
|
|
50
50
|
amountMode: "any",
|
|
51
51
|
amountMin: "",
|
|
@@ -57,23 +57,23 @@ function T(e) {
|
|
|
57
57
|
let t = Number.parseFloat(e);
|
|
58
58
|
return Number.isFinite(t) ? Math.round(t * 100) : void 0;
|
|
59
59
|
}
|
|
60
|
-
function E({ statusOptions:
|
|
60
|
+
function E({ statusOptions: i = v, offersVendorFilter: E = !0, isVendorFilterPaused: D = !1, onFiltersChange: O, initialSummaryCard: ne = null, onSummaryCardChange: k, today: A, labels: j } = {}) {
|
|
61
61
|
let M = f(() => ({
|
|
62
|
-
...
|
|
62
|
+
...o,
|
|
63
63
|
...j,
|
|
64
64
|
presets: {
|
|
65
|
-
...
|
|
65
|
+
...o.presets,
|
|
66
66
|
...j?.presets
|
|
67
67
|
},
|
|
68
68
|
statuses: {
|
|
69
|
-
...
|
|
69
|
+
...o.statuses,
|
|
70
70
|
...j?.statuses
|
|
71
71
|
},
|
|
72
72
|
dateFieldNames: {
|
|
73
|
-
...
|
|
73
|
+
...o.dateFieldNames,
|
|
74
74
|
...j?.dateFieldNames
|
|
75
75
|
}
|
|
76
|
-
}), [j]), [N, P] = m(() => w(ne)), F =
|
|
76
|
+
}), [j]), [N, P] = m(() => w(ne)), F = i.length > 0 && !N.summaryCard, I = F ? i : v, L = u((e) => {
|
|
77
77
|
e !== N.summaryCard && k?.(e);
|
|
78
78
|
}, [k, N.summaryCard]), [R, z] = m({}), [B, V] = m(""), [H, U] = m(""), W = u((e) => {
|
|
79
79
|
P((t) => ({
|
|
@@ -95,7 +95,7 @@ function E({ statusOptions: a = v, offersVendorFilter: E = !0, isVendorFilterPau
|
|
|
95
95
|
});
|
|
96
96
|
});
|
|
97
97
|
}, [I, O]);
|
|
98
|
-
let G = f(() => N.statuses.filter((e) => I.includes(e)), [N.statuses, I]), K = N.summaryCard ===
|
|
98
|
+
let G = f(() => N.statuses.filter((e) => I.includes(e)), [N.statuses, I]), K = N.summaryCard === n.Overdue ? A : void 0, q = p(K);
|
|
99
99
|
d(() => {
|
|
100
100
|
let e = q.current;
|
|
101
101
|
q.current = K, e && K && e !== K && O?.();
|
|
@@ -113,10 +113,10 @@ function E({ statusOptions: a = v, offersVendorFilter: E = !0, isVendorFilterPau
|
|
|
113
113
|
}), Y = f(() => (J.data?.data ?? []).map((e) => ({
|
|
114
114
|
value: e.id,
|
|
115
115
|
label: c(e)
|
|
116
|
-
})), [J.data?.data]), X = f(() =>
|
|
116
|
+
})), [J.data?.data]), X = f(() => i.map((e) => ({
|
|
117
117
|
value: e,
|
|
118
118
|
label: M.statuses[e]
|
|
119
|
-
})), [
|
|
119
|
+
})), [i, M.statuses]), re = f(() => Object.entries(te).map(([e, t]) => ({
|
|
120
120
|
value: e,
|
|
121
121
|
label: M.presets[e],
|
|
122
122
|
group: t === "current" ? M.presetGroupCurrent : M.presetGroupPast
|
|
@@ -125,18 +125,18 @@ function E({ statusOptions: a = v, offersVendorFilter: E = !0, isVendorFilterPau
|
|
|
125
125
|
M.presetGroupPast,
|
|
126
126
|
M.presets
|
|
127
127
|
]), ie = f(() => {
|
|
128
|
-
let e = {}, n = ee[N.dateField],
|
|
129
|
-
if (N.dateFrom && (e[`${n}__gte`] = n === "created_at" ? new Date(
|
|
128
|
+
let e = {}, n = ee[N.dateField], i = (e) => Date.UTC(e.getFullYear(), e.getMonth(), e.getDate());
|
|
129
|
+
if (N.dateFrom && (e[`${n}__gte`] = n === "created_at" ? new Date(i(N.dateFrom)).toISOString() : g(N.dateFrom, { representation: "date" })), N.dateTo && (n === "created_at" ? e.created_at__lt = new Date(i(N.dateTo) + C).toISOString() : e[`${n}__lte`] = g(N.dateTo, { representation: "date" })), G.length > 0 && (e.status__in = t(G)), N.amountMode !== "any") {
|
|
130
130
|
let t = "total_amount__gte", n = "total_amount__lte", r = T(N.amountMin), i = T(N.amountMax);
|
|
131
131
|
N.amountMode === "exact" ? r !== void 0 && (e[t] = r, e[n] = r) : (r !== void 0 && (e[t] = r), i !== void 0 && (e[n] = i));
|
|
132
132
|
}
|
|
133
|
-
return N.vendorIds.length > 0 && (e.counterpart_id__in = [...N.vendorIds]), N.hasFile !== void 0 && (e.has_file = N.hasFile), N.summaryCard && Object.assign(e,
|
|
133
|
+
return N.vendorIds.length > 0 && (e.counterpart_id__in = [...N.vendorIds]), N.hasFile !== void 0 && (e.has_file = N.hasFile), N.summaryCard && Object.assign(e, r(N.summaryCard, A).query), e;
|
|
134
134
|
}, [
|
|
135
135
|
N,
|
|
136
136
|
G,
|
|
137
137
|
A
|
|
138
138
|
]), Z = f(() => {
|
|
139
|
-
let t = [],
|
|
139
|
+
let t = [], i = (e) => h(e, x), a = (e, t, n) => {
|
|
140
140
|
let r = t(M.valueList(n));
|
|
141
141
|
return n.length <= S ? {
|
|
142
142
|
key: e,
|
|
@@ -148,20 +148,20 @@ function E({ statusOptions: a = v, offersVendorFilter: E = !0, isVendorFilterPau
|
|
|
148
148
|
};
|
|
149
149
|
};
|
|
150
150
|
if (N.summaryCard) {
|
|
151
|
-
let { statuses: e } =
|
|
152
|
-
t.push(N.summaryCard ===
|
|
151
|
+
let { statuses: e } = r(N.summaryCard, A);
|
|
152
|
+
t.push(N.summaryCard === n.Overdue ? {
|
|
153
153
|
key: _.SummaryCard,
|
|
154
|
-
label: M.dateChip(M.dateFieldNames[
|
|
155
|
-
} :
|
|
154
|
+
label: M.dateChip(M.dateFieldNames[s.DueDate], M.pastDue)
|
|
155
|
+
} : a(_.SummaryCard, M.statusChip, e ? e.map((e) => M.statuses[e]) : [M.scheduledStatus]));
|
|
156
156
|
}
|
|
157
157
|
if (N.dateFrom || N.dateTo) {
|
|
158
|
-
let e = (N.datePreset ? M.presets[N.datePreset] : void 0) ?? (N.dateFrom && N.dateTo ? M.dateRange(
|
|
158
|
+
let e = (N.datePreset ? M.presets[N.datePreset] : void 0) ?? (N.dateFrom && N.dateTo ? M.dateRange(i(N.dateFrom), i(N.dateTo)) : N.dateFrom ? M.dateFrom(i(N.dateFrom)) : M.dateTo(i(N.dateTo)));
|
|
159
159
|
t.push({
|
|
160
160
|
key: _.Date,
|
|
161
161
|
label: M.dateChip(M.dateFieldNames[N.dateField], e)
|
|
162
162
|
});
|
|
163
163
|
}
|
|
164
|
-
if (G.length > 0 && t.push(
|
|
164
|
+
if (G.length > 0 && t.push(a(_.Status, M.statusChip, G.map((e) => M.statuses[e] ?? e))), N.vendorIds.length > 0 && t.push(a(_.Vendor, M.vendorChip, N.vendorIds.map((e) => R[e] ?? e))), N.amountMode !== "any") {
|
|
165
165
|
let n = (t) => {
|
|
166
166
|
let n = Number.parseFloat(t);
|
|
167
167
|
return Number.isFinite(n) ? e(n, { currencyCode: "USD" }) : "";
|
|
@@ -235,13 +235,13 @@ function E({ statusOptions: a = v, offersVendorFilter: E = !0, isVendorFilterPau
|
|
|
235
235
|
return {
|
|
236
236
|
filterBarProps: {
|
|
237
237
|
fields: [...f(() => [
|
|
238
|
-
...E ? [
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
...F ? [
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
238
|
+
...E ? [s.Vendor] : [],
|
|
239
|
+
s.IssueDate,
|
|
240
|
+
s.DueDate,
|
|
241
|
+
...F ? [s.Status] : [],
|
|
242
|
+
s.TotalAmount,
|
|
243
|
+
s.AddedOn,
|
|
244
|
+
s.Attachment
|
|
245
245
|
], [F, E])],
|
|
246
246
|
activeFilterCount: Z.length,
|
|
247
247
|
chips: Z,
|
|
@@ -265,11 +265,11 @@ function E({ statusOptions: a = v, offersVendorFilter: E = !0, isVendorFilterPau
|
|
|
265
265
|
dateTo: t
|
|
266
266
|
}),
|
|
267
267
|
onDatePresetChange: (e) => {
|
|
268
|
-
let t = /* @__PURE__ */ new Date(),
|
|
268
|
+
let t = /* @__PURE__ */ new Date(), n = N.dateField === s.AddedOn ? new Date(t.getUTCFullYear(), t.getUTCMonth(), t.getUTCDate()) : t, { from: r, to: i } = a(e, n);
|
|
269
269
|
W({
|
|
270
270
|
datePreset: e,
|
|
271
|
-
dateFrom:
|
|
272
|
-
dateTo:
|
|
271
|
+
dateFrom: r,
|
|
272
|
+
dateTo: i
|
|
273
273
|
});
|
|
274
274
|
},
|
|
275
275
|
statusOptions: X,
|