@tesouro/embedded-components-react 0.11.193 → 0.11.197
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/bill-detail/feature/dist/index4.js +1 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bills-list/feature/dist/index14.js +2 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bills-list/feature/dist/index15.js +138 -137
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bills-list/feature/dist/index17.js +6 -7
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bills-list/feature/dist/index18.js +107 -108
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bills-list/feature/dist/index7.js +12 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bills-list/ui/dist/index13.js +1 -0
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/util/dist/lib/groupCollapse.js +17 -8
- package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/analytics/build-info.js +1 -1
- package/package.json +1 -1
|
@@ -163,11 +163,10 @@ function x({ payable: o, canManage: x = !0, onRemoved: S, onOpenPayable: C, labe
|
|
|
163
163
|
loadingRowCount: Math.min(k.length + 1, y),
|
|
164
164
|
collapse: u({
|
|
165
165
|
statuses: G.map((e) => e.status),
|
|
166
|
-
statusLabels: T.statusLabels,
|
|
167
166
|
labels: {
|
|
168
167
|
showMore: T.showMoreRows,
|
|
169
168
|
showLess: T.showLessRows,
|
|
170
|
-
statusSummary: T.statusSummary
|
|
169
|
+
statusSummary: (e) => T.statusSummary(e.map(({ status: e }) => T.statusLabels[e] ?? T.statusLabels.unknown ?? e))
|
|
171
170
|
}
|
|
172
171
|
})
|
|
173
172
|
};
|
|
@@ -40,7 +40,8 @@ var n = {
|
|
|
40
40
|
attachmentChipNone: "No attachment",
|
|
41
41
|
pastDue: "Past due",
|
|
42
42
|
scheduledStatus: "Scheduled",
|
|
43
|
-
|
|
43
|
+
valueList: (e) => e.join(", "),
|
|
44
|
+
moreValues: (e) => `+${e}`,
|
|
44
45
|
amountAtLeast: (e) => `${e} or more`,
|
|
45
46
|
amountAtMost: (e) => `${e} or less`,
|
|
46
47
|
amountBetween: (e, t) => `${e} - ${t}`,
|
|
@@ -24,11 +24,11 @@ var _ = {
|
|
|
24
24
|
Amount: "amount",
|
|
25
25
|
Vendor: "vendor",
|
|
26
26
|
Attachment: "attachment"
|
|
27
|
-
}, v = [], y = 50, b = 300, x = "MMM d, yyyy", S =
|
|
27
|
+
}, v = [], y = 50, b = 300, x = "MMM d, yyyy", S = 2, C = 864e5, ee = {
|
|
28
28
|
[n.IssueDate]: "issued_at",
|
|
29
29
|
[n.DueDate]: "due_date",
|
|
30
30
|
[n.AddedOn]: "created_at"
|
|
31
|
-
},
|
|
31
|
+
}, te = {
|
|
32
32
|
[a.Today]: "current",
|
|
33
33
|
[a.ThisWeek]: "current",
|
|
34
34
|
[a.ThisMonth]: "current",
|
|
@@ -42,7 +42,7 @@ var _ = {
|
|
|
42
42
|
[a.LastQuarter]: "past",
|
|
43
43
|
[a.LastYear]: "past"
|
|
44
44
|
};
|
|
45
|
-
function
|
|
45
|
+
function w(e = null) {
|
|
46
46
|
return {
|
|
47
47
|
summaryCard: e,
|
|
48
48
|
dateField: n.DueDate,
|
|
@@ -53,250 +53,251 @@ function T(e = null) {
|
|
|
53
53
|
vendorIds: []
|
|
54
54
|
};
|
|
55
55
|
}
|
|
56
|
-
function
|
|
56
|
+
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
|
|
61
|
-
let
|
|
60
|
+
function E({ statusOptions: a = v, offersVendorFilter: E = !0, isVendorFilterPaused: D = !1, onFiltersChange: O, initialSummaryCard: ne = null, onSummaryCardChange: k, today: A, labels: j } = {}) {
|
|
61
|
+
let M = f(() => ({
|
|
62
62
|
...s,
|
|
63
|
-
...
|
|
63
|
+
...j,
|
|
64
64
|
presets: {
|
|
65
65
|
...s.presets,
|
|
66
|
-
...
|
|
66
|
+
...j?.presets
|
|
67
67
|
},
|
|
68
68
|
statuses: {
|
|
69
69
|
...s.statuses,
|
|
70
|
-
...
|
|
70
|
+
...j?.statuses
|
|
71
71
|
},
|
|
72
72
|
dateFieldNames: {
|
|
73
73
|
...s.dateFieldNames,
|
|
74
|
-
...
|
|
74
|
+
...j?.dateFieldNames
|
|
75
75
|
}
|
|
76
|
-
}), [
|
|
77
|
-
e !==
|
|
78
|
-
}, [
|
|
79
|
-
|
|
76
|
+
}), [j]), [N, P] = m(() => w(ne)), F = a.length > 0 && !N.summaryCard, I = F ? a : v, L = u((e) => {
|
|
77
|
+
e !== N.summaryCard && k?.(e);
|
|
78
|
+
}, [k, N.summaryCard]), [R, z] = m({}), [B, V] = m(""), [H, U] = m(""), W = u((e) => {
|
|
79
|
+
P((t) => ({
|
|
80
80
|
...t,
|
|
81
81
|
...e
|
|
82
|
-
})),
|
|
83
|
-
}, [
|
|
82
|
+
})), O?.();
|
|
83
|
+
}, [O]);
|
|
84
84
|
d(() => {
|
|
85
|
-
|
|
85
|
+
E || P((e) => e.vendorIds.length === 0 ? e : (O?.(), {
|
|
86
86
|
...e,
|
|
87
87
|
vendorIds: []
|
|
88
88
|
}));
|
|
89
|
-
}, [
|
|
90
|
-
|
|
91
|
-
let t = e.statuses.filter((e) =>
|
|
92
|
-
return t.length === e.statuses.length ? e : (
|
|
89
|
+
}, [E, O]), d(() => {
|
|
90
|
+
P((e) => {
|
|
91
|
+
let t = e.statuses.filter((e) => I.includes(e));
|
|
92
|
+
return t.length === e.statuses.length ? e : (O?.(), {
|
|
93
93
|
...e,
|
|
94
94
|
statuses: t
|
|
95
95
|
});
|
|
96
96
|
});
|
|
97
|
-
}, [
|
|
98
|
-
let
|
|
97
|
+
}, [I, O]);
|
|
98
|
+
let G = f(() => N.statuses.filter((e) => I.includes(e)), [N.statuses, I]), K = N.summaryCard === r.Overdue ? A : void 0, q = p(K);
|
|
99
99
|
d(() => {
|
|
100
|
-
let e =
|
|
101
|
-
|
|
102
|
-
}, [
|
|
103
|
-
let e = setTimeout(() =>
|
|
100
|
+
let e = q.current;
|
|
101
|
+
q.current = K, e && K && e !== K && O?.();
|
|
102
|
+
}, [K, O]), d(() => {
|
|
103
|
+
let e = setTimeout(() => U(B.trim()), b);
|
|
104
104
|
return () => clearTimeout(e);
|
|
105
|
-
}, [
|
|
106
|
-
let
|
|
107
|
-
enabled:
|
|
105
|
+
}, [B]);
|
|
106
|
+
let J = l({
|
|
107
|
+
enabled: E && !D,
|
|
108
108
|
is_vendor: !0,
|
|
109
109
|
sort: "counterpart_name",
|
|
110
110
|
order: "asc",
|
|
111
111
|
limit: y,
|
|
112
|
-
counterpart_name__icontains:
|
|
113
|
-
}),
|
|
112
|
+
counterpart_name__icontains: H || void 0
|
|
113
|
+
}), Y = f(() => (J.data?.data ?? []).map((e) => ({
|
|
114
114
|
value: e.id,
|
|
115
115
|
label: c(e)
|
|
116
|
-
})), [
|
|
116
|
+
})), [J.data?.data]), X = f(() => a.map((e) => ({
|
|
117
117
|
value: e,
|
|
118
|
-
label:
|
|
119
|
-
})), [a,
|
|
118
|
+
label: M.statuses[e]
|
|
119
|
+
})), [a, M.statuses]), re = f(() => Object.entries(te).map(([e, t]) => ({
|
|
120
120
|
value: e,
|
|
121
|
-
label:
|
|
122
|
-
group: t === "current" ?
|
|
121
|
+
label: M.presets[e],
|
|
122
|
+
group: t === "current" ? M.presetGroupCurrent : M.presetGroupPast
|
|
123
123
|
})), [
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
]),
|
|
128
|
-
let e = {}, n =
|
|
129
|
-
if (
|
|
130
|
-
let t = "total_amount__gte", n = "total_amount__lte", r =
|
|
131
|
-
|
|
124
|
+
M.presetGroupCurrent,
|
|
125
|
+
M.presetGroupPast,
|
|
126
|
+
M.presets
|
|
127
|
+
]), ie = f(() => {
|
|
128
|
+
let e = {}, n = ee[N.dateField], r = (e) => Date.UTC(e.getFullYear(), e.getMonth(), e.getDate());
|
|
129
|
+
if (N.dateFrom && (e[`${n}__gte`] = n === "created_at" ? new Date(r(N.dateFrom)).toISOString() : g(N.dateFrom, { representation: "date" })), N.dateTo && (n === "created_at" ? e.created_at__lt = new Date(r(N.dateTo) + C).toISOString() : e[`${n}__lte`] = g(N.dateTo, { representation: "date" })), G.length > 0 && (e.status__in = t(G)), N.amountMode !== "any") {
|
|
130
|
+
let t = "total_amount__gte", n = "total_amount__lte", r = T(N.amountMin), i = T(N.amountMax);
|
|
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
|
|
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, i(N.summaryCard, A).query), e;
|
|
134
134
|
}, [
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
135
|
+
N,
|
|
136
|
+
G,
|
|
137
|
+
A
|
|
138
138
|
]), Z = f(() => {
|
|
139
|
-
let t = [], a = (e) => h(e, x), o = (e) => {
|
|
140
|
-
let
|
|
141
|
-
return
|
|
139
|
+
let t = [], a = (e) => h(e, x), o = (e, t, n) => {
|
|
140
|
+
let r = t(M.valueList(n));
|
|
141
|
+
return n.length <= S ? {
|
|
142
|
+
key: e,
|
|
143
|
+
label: r
|
|
144
|
+
} : {
|
|
145
|
+
key: e,
|
|
146
|
+
label: t(M.valueList([...n.slice(0, S), M.moreValues(n.length - S)])),
|
|
147
|
+
fullLabel: r
|
|
148
|
+
};
|
|
142
149
|
};
|
|
143
|
-
if (
|
|
144
|
-
let { statuses: e } = i(
|
|
145
|
-
t.push({
|
|
150
|
+
if (N.summaryCard) {
|
|
151
|
+
let { statuses: e } = i(N.summaryCard, A);
|
|
152
|
+
t.push(N.summaryCard === r.Overdue ? {
|
|
146
153
|
key: _.SummaryCard,
|
|
147
|
-
label:
|
|
148
|
-
});
|
|
154
|
+
label: M.dateChip(M.dateFieldNames[n.DueDate], M.pastDue)
|
|
155
|
+
} : o(_.SummaryCard, M.statusChip, e ? e.map((e) => M.statuses[e]) : [M.scheduledStatus]));
|
|
149
156
|
}
|
|
150
|
-
if (
|
|
151
|
-
let e = (
|
|
157
|
+
if (N.dateFrom || N.dateTo) {
|
|
158
|
+
let e = (N.datePreset ? M.presets[N.datePreset] : void 0) ?? (N.dateFrom && N.dateTo ? M.dateRange(a(N.dateFrom), a(N.dateTo)) : N.dateFrom ? M.dateFrom(a(N.dateFrom)) : M.dateTo(a(N.dateTo)));
|
|
152
159
|
t.push({
|
|
153
160
|
key: _.Date,
|
|
154
|
-
label:
|
|
161
|
+
label: M.dateChip(M.dateFieldNames[N.dateField], e)
|
|
155
162
|
});
|
|
156
163
|
}
|
|
157
|
-
if (
|
|
158
|
-
key: _.Status,
|
|
159
|
-
label: N.statusChip(o(K.map((e) => N.statuses[e] ?? e)))
|
|
160
|
-
}), P.vendorIds.length > 0 && t.push({
|
|
161
|
-
key: _.Vendor,
|
|
162
|
-
label: N.vendorChip(o(P.vendorIds.map((e) => z[e] ?? e)))
|
|
163
|
-
}), P.amountMode !== "any") {
|
|
164
|
+
if (G.length > 0 && t.push(o(_.Status, M.statusChip, G.map((e) => M.statuses[e] ?? e))), N.vendorIds.length > 0 && t.push(o(_.Vendor, M.vendorChip, N.vendorIds.map((e) => R[e] ?? e))), N.amountMode !== "any") {
|
|
164
165
|
let n = (t) => {
|
|
165
166
|
let n = Number.parseFloat(t);
|
|
166
167
|
return Number.isFinite(n) ? e(n, { currencyCode: "USD" }) : "";
|
|
167
|
-
}, r = n(
|
|
168
|
+
}, r = n(N.amountMin), i = n(N.amountMax), a = N.amountMode === "exact" ? r : r && i ? M.amountBetween(r, i) : r ? M.amountAtLeast(r) : i ? M.amountAtMost(i) : "";
|
|
168
169
|
a && t.push({
|
|
169
170
|
key: _.Amount,
|
|
170
|
-
label:
|
|
171
|
+
label: M.amountChip(a)
|
|
171
172
|
});
|
|
172
173
|
}
|
|
173
|
-
return
|
|
174
|
+
return N.hasFile !== void 0 && t.push({
|
|
174
175
|
key: _.Attachment,
|
|
175
|
-
label:
|
|
176
|
+
label: N.hasFile ? M.attachmentChipHas : M.attachmentChipNone
|
|
176
177
|
}), t;
|
|
177
178
|
}, [
|
|
179
|
+
M,
|
|
178
180
|
N,
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
]), ie = u((e) => {
|
|
181
|
+
G,
|
|
182
|
+
A,
|
|
183
|
+
R
|
|
184
|
+
]), ae = u((e) => {
|
|
184
185
|
switch (e) {
|
|
185
186
|
case _.SummaryCard:
|
|
186
|
-
|
|
187
|
+
L(null), W({ summaryCard: null });
|
|
187
188
|
break;
|
|
188
189
|
case _.Date:
|
|
189
|
-
|
|
190
|
+
W({
|
|
190
191
|
datePreset: void 0,
|
|
191
192
|
dateFrom: void 0,
|
|
192
193
|
dateTo: void 0
|
|
193
194
|
});
|
|
194
195
|
break;
|
|
195
196
|
case _.Status:
|
|
196
|
-
|
|
197
|
+
W({ statuses: [] });
|
|
197
198
|
break;
|
|
198
199
|
case _.Vendor:
|
|
199
|
-
|
|
200
|
+
W({ vendorIds: [] });
|
|
200
201
|
break;
|
|
201
202
|
case _.Amount:
|
|
202
|
-
|
|
203
|
+
W({
|
|
203
204
|
amountMode: "any",
|
|
204
205
|
amountMin: "",
|
|
205
206
|
amountMax: ""
|
|
206
207
|
});
|
|
207
208
|
break;
|
|
208
|
-
case _.Attachment:
|
|
209
|
+
case _.Attachment: W({ hasFile: void 0 });
|
|
209
210
|
}
|
|
210
|
-
}, [
|
|
211
|
-
|
|
212
|
-
}, [
|
|
213
|
-
|
|
211
|
+
}, [L, W]), Q = u(() => {
|
|
212
|
+
L(null), P(w()), O?.();
|
|
213
|
+
}, [O, L]), $ = u((e) => {
|
|
214
|
+
P((t) => t.summaryCard === e ? t : {
|
|
214
215
|
...t,
|
|
215
216
|
summaryCard: e
|
|
216
|
-
}),
|
|
217
|
-
}, [
|
|
218
|
-
|
|
219
|
-
}, [$,
|
|
220
|
-
|
|
217
|
+
}), O?.();
|
|
218
|
+
}, [O]), oe = u((e) => {
|
|
219
|
+
L(e), $(e);
|
|
220
|
+
}, [$, L]), se = u((e) => {
|
|
221
|
+
z((t) => ({
|
|
221
222
|
...t,
|
|
222
223
|
[e.id]: e.name
|
|
223
|
-
})),
|
|
224
|
-
...
|
|
224
|
+
})), L(null), P({
|
|
225
|
+
...w(),
|
|
225
226
|
vendorIds: [e.id]
|
|
226
|
-
}),
|
|
227
|
-
}, [
|
|
228
|
-
|
|
227
|
+
}), O?.();
|
|
228
|
+
}, [O, L]), ce = u((e) => {
|
|
229
|
+
z((t) => {
|
|
229
230
|
let n = { ...t };
|
|
230
|
-
for (let t of
|
|
231
|
+
for (let t of Y) e.includes(t.value) && (n[t.value] = t.label);
|
|
231
232
|
return n;
|
|
232
|
-
}),
|
|
233
|
-
}, [
|
|
233
|
+
}), W({ vendorIds: e });
|
|
234
|
+
}, [W, Y]);
|
|
234
235
|
return {
|
|
235
236
|
filterBarProps: {
|
|
236
237
|
fields: [...f(() => [
|
|
237
|
-
...
|
|
238
|
+
...E ? [n.Vendor] : [],
|
|
238
239
|
n.IssueDate,
|
|
239
240
|
n.DueDate,
|
|
240
|
-
...
|
|
241
|
+
...F ? [n.Status] : [],
|
|
241
242
|
n.TotalAmount,
|
|
242
243
|
n.AddedOn,
|
|
243
244
|
n.Attachment
|
|
244
|
-
], [
|
|
245
|
+
], [F, E])],
|
|
245
246
|
activeFilterCount: Z.length,
|
|
246
247
|
chips: Z,
|
|
247
|
-
onRemoveChip:
|
|
248
|
+
onRemoveChip: ae,
|
|
248
249
|
onClearAll: Q,
|
|
249
|
-
dateField:
|
|
250
|
+
dateField: N.dateField,
|
|
250
251
|
onDateFieldChange: (e) => {
|
|
251
|
-
let t = !!(
|
|
252
|
-
|
|
252
|
+
let t = !!(N.dateFrom || N.dateTo);
|
|
253
|
+
P((t) => ({
|
|
253
254
|
...t,
|
|
254
255
|
dateField: e
|
|
255
|
-
})), t &&
|
|
256
|
+
})), t && O?.();
|
|
256
257
|
},
|
|
257
|
-
datePresets:
|
|
258
|
-
selectedDatePreset:
|
|
259
|
-
dateFrom:
|
|
260
|
-
dateTo:
|
|
261
|
-
onDateRangeChange: ({ from: e, to: t }) =>
|
|
258
|
+
datePresets: re,
|
|
259
|
+
selectedDatePreset: N.datePreset,
|
|
260
|
+
dateFrom: N.dateFrom,
|
|
261
|
+
dateTo: N.dateTo,
|
|
262
|
+
onDateRangeChange: ({ from: e, to: t }) => W({
|
|
262
263
|
datePreset: void 0,
|
|
263
264
|
dateFrom: e,
|
|
264
265
|
dateTo: t
|
|
265
266
|
}),
|
|
266
267
|
onDatePresetChange: (e) => {
|
|
267
|
-
let t = /* @__PURE__ */ new Date(), r =
|
|
268
|
-
|
|
268
|
+
let t = /* @__PURE__ */ new Date(), r = N.dateField === n.AddedOn ? new Date(t.getUTCFullYear(), t.getUTCMonth(), t.getUTCDate()) : t, { from: i, to: a } = o(e, r);
|
|
269
|
+
W({
|
|
269
270
|
datePreset: e,
|
|
270
271
|
dateFrom: i,
|
|
271
272
|
dateTo: a
|
|
272
273
|
});
|
|
273
274
|
},
|
|
274
|
-
statusOptions:
|
|
275
|
-
selectedStatuses:
|
|
276
|
-
onStatusChange: (e) =>
|
|
277
|
-
amountMode:
|
|
278
|
-
onAmountModeChange: (e) =>
|
|
279
|
-
amountMin:
|
|
280
|
-
amountMax:
|
|
281
|
-
onAmountMinChange: (e) =>
|
|
282
|
-
onAmountMaxChange: (e) =>
|
|
283
|
-
vendorOptions:
|
|
284
|
-
selectedVendors:
|
|
285
|
-
onVendorChange:
|
|
286
|
-
vendorSearchValue:
|
|
287
|
-
onVendorSearchChange:
|
|
288
|
-
isVendorLoading:
|
|
289
|
-
isVendorError:
|
|
290
|
-
hasAttachment:
|
|
291
|
-
onHasAttachmentChange: (e) =>
|
|
275
|
+
statusOptions: X,
|
|
276
|
+
selectedStatuses: G,
|
|
277
|
+
onStatusChange: (e) => W({ statuses: e }),
|
|
278
|
+
amountMode: N.amountMode,
|
|
279
|
+
onAmountModeChange: (e) => W({ amountMode: e }),
|
|
280
|
+
amountMin: N.amountMin,
|
|
281
|
+
amountMax: N.amountMax,
|
|
282
|
+
onAmountMinChange: (e) => W({ amountMin: e }),
|
|
283
|
+
onAmountMaxChange: (e) => W({ amountMax: e }),
|
|
284
|
+
vendorOptions: Y,
|
|
285
|
+
selectedVendors: N.vendorIds,
|
|
286
|
+
onVendorChange: ce,
|
|
287
|
+
vendorSearchValue: B,
|
|
288
|
+
onVendorSearchChange: V,
|
|
289
|
+
isVendorLoading: J.isLoading || D,
|
|
290
|
+
isVendorError: J.isError,
|
|
291
|
+
hasAttachment: N.hasFile,
|
|
292
|
+
onHasAttachmentChange: (e) => W({ hasFile: e })
|
|
292
293
|
},
|
|
293
|
-
query:
|
|
294
|
+
query: ie,
|
|
294
295
|
isFilterActive: Z.length > 0,
|
|
295
296
|
clearAll: Q,
|
|
296
|
-
filterByVendor:
|
|
297
|
-
summaryCard:
|
|
298
|
-
selectSummaryCard:
|
|
297
|
+
filterByVendor: se,
|
|
298
|
+
summaryCard: N.summaryCard,
|
|
299
|
+
selectSummaryCard: oe,
|
|
299
300
|
applySummaryCard: $
|
|
300
301
|
};
|
|
301
302
|
}
|
|
302
|
-
export { _ as BillsFilterChipKey,
|
|
303
|
+
export { _ as BillsFilterChipKey, E as useBillsFilters };
|
|
@@ -376,14 +376,14 @@ function Te({ enabled: c = !0, canPay: d, canReadVendors: h = !0, isVendorFilter
|
|
|
376
376
|
Q,
|
|
377
377
|
L,
|
|
378
378
|
H.data?.prev_pagination_token
|
|
379
|
-
]), kt = y(() => {
|
|
380
|
-
|
|
381
|
-
}, [
|
|
379
|
+
]), kt = W.refetch, At = y(() => {
|
|
380
|
+
kt();
|
|
381
|
+
}, [kt]);
|
|
382
382
|
return {
|
|
383
383
|
rows: bt,
|
|
384
384
|
isLoading: W.isLoading || !L && j === void 0 || et || V !== ut || pt && mt.isLoading || (ft ?? 0) > 0 && bt.length === 0,
|
|
385
385
|
isError: W.isError,
|
|
386
|
-
onRetry:
|
|
386
|
+
onRetry: At,
|
|
387
387
|
selectedFilterTabId: k,
|
|
388
388
|
onFilterTabChange: $,
|
|
389
389
|
showVendorBills: Ct,
|
|
@@ -405,7 +405,7 @@ function Te({ enabled: c = !0, canPay: d, canReadVendors: h = !0, isVendorFilter
|
|
|
405
405
|
isSortable: !L,
|
|
406
406
|
pageInfo: L ? T.pageInfo({
|
|
407
407
|
billCount: Z.length,
|
|
408
|
-
|
|
408
|
+
groupCount: new Set(Z.map((e) => e.group?.key ?? e.rowKey)).size
|
|
409
409
|
}) : void 0,
|
|
410
410
|
showAddPanelWhenEmpty: !L,
|
|
411
411
|
sorting: Le,
|
|
@@ -455,11 +455,10 @@ function Ee(e, t) {
|
|
|
455
455
|
if (!e.group) return e;
|
|
456
456
|
let r = h({
|
|
457
457
|
statuses: n.get(e.group.key) ?? [],
|
|
458
|
-
statusLabels: t.statusLabels,
|
|
459
458
|
labels: {
|
|
460
459
|
showMore: t.showMore,
|
|
461
460
|
showLess: t.showLess,
|
|
462
|
-
statusSummary: t.statusSummary
|
|
461
|
+
statusSummary: (e) => t.statusSummary(e.map(({ status: e, count: n }) => (t.statusCount[e] ?? t.statusCount.unknown)(n)))
|
|
463
462
|
}
|
|
464
463
|
});
|
|
465
464
|
return r ? {
|
|
@@ -8,30 +8,28 @@ import { useMailboxAddress as ee } from "../../../../shared/data-access/dist/lib
|
|
|
8
8
|
import { Scope as n } from "../../../../shared/data-access/dist/lib/scopes.js";
|
|
9
9
|
import "../../../../shared/data-access/dist/index.js";
|
|
10
10
|
import "../../../../shared/ui/dist/index.js";
|
|
11
|
-
import { useWidgetConfig as
|
|
11
|
+
import { useWidgetConfig as r, useWidgetInitStaleForToken as te } from "../../../../shared/feature/dist/lib/WidgetProvider/hooks.js";
|
|
12
12
|
import "../../../../shared/feature/dist/index.js";
|
|
13
|
-
import { BillDecisionDialog as
|
|
14
|
-
import { BillDuplicateIcon as
|
|
13
|
+
import { BillDecisionDialog as i } from "../../../ui/dist/index4.js";
|
|
14
|
+
import { BillDuplicateIcon as ne } from "../../../ui/dist/index6.js";
|
|
15
15
|
import "../../../ui/dist/index.js";
|
|
16
|
-
import { AddBillDialog as
|
|
17
|
-
import { BILL_STATUS_BADGE_LABELS_EN as a } from "../../../../shared/document-status/ui/dist/index2.js";
|
|
18
|
-
import "../../../../shared/document-status/ui/dist/index.js";
|
|
16
|
+
import { AddBillDialog as a } from "../../ui/dist/index6.js";
|
|
19
17
|
import { BillsScreen as o } from "../../ui/dist/index23.js";
|
|
20
18
|
import "../../ui/dist/index.js";
|
|
21
19
|
import { BILL_QUEUE_ORDER as s, BillQueue as c } from "./index5.js";
|
|
22
20
|
import { BILLS_TAB_LABELS_EN as l } from "./index7.js";
|
|
23
|
-
import { BillDuplicateView as u, useBillsTable as
|
|
24
|
-
import { useDuplicateBillsCount as
|
|
25
|
-
import { formatBillQueueBadge as
|
|
21
|
+
import { BillDuplicateView as u, useBillsTable as re } from "./index17.js";
|
|
22
|
+
import { useDuplicateBillsCount as ie } from "./index2.js";
|
|
23
|
+
import { formatBillQueueBadge as ae } from "./index3.js";
|
|
26
24
|
import { copyTextToClipboard as d } from "./index6.js";
|
|
27
25
|
import { billsTableCellTestIds as f } from "./index8.js";
|
|
28
26
|
import { useAssignedToMeCount as p } from "./index9.js";
|
|
29
27
|
import { useBillSummaryCards as m } from "./index11.js";
|
|
30
28
|
import { useCallback as h, useImperativeHandle as g, useMemo as _, useState as v } from "react";
|
|
31
|
-
import { Fragment as
|
|
29
|
+
import { Fragment as oe, jsx as y, jsxs as se } from "react/jsx-runtime";
|
|
32
30
|
// ../../libs/tesouro-embedded-components-react/bill-pay-widget/bills-list/feature/dist/index18.js
|
|
33
|
-
var
|
|
34
|
-
function b({ labels: b, onOpenBill:
|
|
31
|
+
var ce = () => void 0;
|
|
32
|
+
function b({ labels: b, onOpenBill: le, onEnterManually: ue, onFilesSelected: de, maxFiles: x, headerActionContainer: fe, selectedSummaryCard: pe, onSummaryCardChange: me, ref: he }) {
|
|
35
33
|
let S = _(() => ({
|
|
36
34
|
...l,
|
|
37
35
|
...b,
|
|
@@ -83,6 +81,10 @@ function b({ labels: b, onOpenBill: ue, onEnterManually: de, onFilesSelected: fe
|
|
|
83
81
|
...l.duplicatesEmptyState,
|
|
84
82
|
...b?.duplicatesEmptyState
|
|
85
83
|
},
|
|
84
|
+
duplicateStatusCount: {
|
|
85
|
+
...l.duplicateStatusCount,
|
|
86
|
+
...b?.duplicateStatusCount
|
|
87
|
+
},
|
|
86
88
|
queueEmptyStates: s.reduce((e, t) => ({
|
|
87
89
|
...e,
|
|
88
90
|
[t]: {
|
|
@@ -90,10 +92,7 @@ function b({ labels: b, onOpenBill: ue, onEnterManually: de, onFilesSelected: fe
|
|
|
90
92
|
...b?.queueEmptyStates?.[t]
|
|
91
93
|
}
|
|
92
94
|
}), {})
|
|
93
|
-
}), [b]), [
|
|
94
|
-
...a,
|
|
95
|
-
...P
|
|
96
|
-
}), [P]), I = _(() => ({
|
|
95
|
+
}), [b]), [ge, C] = v(!1), [w, T] = v(u.AllBills), { initResponse: E } = r(), D = te(), O = t(E?.scopes, [n.PayableReadOrg]), k = t(E?.scopes, [n.PayableWriteOrg]), A = !E || O, j = !E || k, M = E && !D ? t(E.scopes, [n.PayablePayOrg]) : void 0, N = t(E?.scopes, [n.CounterpartReadOrg]), P = _(() => ({
|
|
97
96
|
menuTrigger: S.duplicateMenuTrigger,
|
|
98
97
|
notDuplicateAction: S.duplicateNotDuplicateAction,
|
|
99
98
|
notDuplicateConfirmTitle: S.duplicateNotDuplicateConfirmTitle,
|
|
@@ -123,7 +122,7 @@ function b({ labels: b, onOpenBill: ue, onEnterManually: de, onFilesSelected: fe
|
|
|
123
122
|
showMore: S.duplicateShowMore,
|
|
124
123
|
showLess: S.duplicateShowLess,
|
|
125
124
|
statusSummary: S.duplicateStatusSummary,
|
|
126
|
-
|
|
125
|
+
statusCount: S.duplicateStatusCount,
|
|
127
126
|
pageInfo: S.duplicatePageInfo
|
|
128
127
|
}), [
|
|
129
128
|
S.duplicateMenuTrigger,
|
|
@@ -155,167 +154,167 @@ function b({ labels: b, onOpenBill: ue, onEnterManually: de, onFilesSelected: fe
|
|
|
155
154
|
S.duplicateShowMore,
|
|
156
155
|
S.duplicateShowLess,
|
|
157
156
|
S.duplicateStatusSummary,
|
|
158
|
-
|
|
157
|
+
S.duplicateStatusCount,
|
|
159
158
|
S.duplicatePageInfo
|
|
160
|
-
]),
|
|
159
|
+
]), F = t(E?.scopes, [n.MailboxReadOrg]), { mailboxAddress: I } = ee({
|
|
161
160
|
relatedObjectType: "payable",
|
|
162
|
-
enabled:
|
|
163
|
-
}),
|
|
161
|
+
enabled: F && !D
|
|
162
|
+
}), L = F ? I : void 0, R = re({
|
|
164
163
|
enabled: A,
|
|
165
164
|
canPay: M,
|
|
166
165
|
canReadVendors: N,
|
|
167
166
|
isVendorFilterPaused: D,
|
|
168
167
|
filterLabels: S.filters,
|
|
169
|
-
onOpenBill:
|
|
168
|
+
onOpenBill: le ?? ce,
|
|
170
169
|
duplicateRowNote: S.duplicateRowNote,
|
|
171
170
|
attachmentLabel: S.attachmentIndicator,
|
|
172
|
-
duplicateGroupLabels:
|
|
171
|
+
duplicateGroupLabels: P,
|
|
173
172
|
canManageDuplicates: j,
|
|
174
173
|
duplicateView: w,
|
|
175
174
|
scheduledRelativeDayLabels: S.scheduledRelativeDay,
|
|
176
175
|
dueDateLabels: S.dueDate,
|
|
177
|
-
selectedSummaryCard:
|
|
178
|
-
onSummaryCardChange:
|
|
179
|
-
}),
|
|
176
|
+
selectedSummaryCard: pe,
|
|
177
|
+
onSummaryCardChange: me
|
|
178
|
+
}), z = ie({ enabled: A }), B = w === u.PossibleDuplicates, V = p({
|
|
180
179
|
enabled: A,
|
|
181
180
|
canPay: M
|
|
182
|
-
}),
|
|
181
|
+
}), H = m({
|
|
183
182
|
enabled: A,
|
|
184
183
|
labels: S.summaryCards,
|
|
185
|
-
selectedCard:
|
|
186
|
-
}),
|
|
184
|
+
selectedCard: R.summaryCard
|
|
185
|
+
}), _e = _(() => s.map((e) => ({
|
|
187
186
|
id: e,
|
|
188
187
|
label: S.queues[e],
|
|
189
|
-
badge: e === c.AssignedToMe ?
|
|
190
|
-
})), [S.queues,
|
|
191
|
-
|
|
192
|
-
}, [
|
|
193
|
-
T(u.AllBills),
|
|
194
|
-
}, [
|
|
195
|
-
T(u.AllBills),
|
|
196
|
-
}, [
|
|
197
|
-
|
|
198
|
-
let
|
|
188
|
+
badge: e === c.AssignedToMe ? ae(V) : void 0
|
|
189
|
+
})), [S.queues, V]), { clearQueryConstraints: U, onFilterTabChange: W } = R, ve = h(() => {
|
|
190
|
+
U(), T(u.PossibleDuplicates);
|
|
191
|
+
}, [U]), G = h(() => {
|
|
192
|
+
T(u.AllBills), W(c.All);
|
|
193
|
+
}, [W]), ye = h((e) => {
|
|
194
|
+
T(u.AllBills), W(e);
|
|
195
|
+
}, [W]), be = !z.isError && z.groupCount > 0, K = j && be, xe = !z.isLoading && !z.isError && z.count === 0;
|
|
196
|
+
B && (xe || R.summaryCard) && G();
|
|
197
|
+
let Se = K ? [{
|
|
199
198
|
id: "duplicates",
|
|
200
|
-
label: S.attentionDuplicates(
|
|
199
|
+
label: S.attentionDuplicates(z.groupCount, z.isCapped),
|
|
201
200
|
tone: "warning",
|
|
202
|
-
icon: /* @__PURE__ */ y(
|
|
203
|
-
pressed:
|
|
204
|
-
onToggle:
|
|
205
|
-
}] : [], q = b?.screen,
|
|
201
|
+
icon: /* @__PURE__ */ y(ne, {}),
|
|
202
|
+
pressed: B,
|
|
203
|
+
onToggle: B ? G : ve
|
|
204
|
+
}] : [], q = b?.screen, Ce = _(() => ({
|
|
206
205
|
...q,
|
|
207
206
|
createButton: S.createButton,
|
|
208
207
|
addBill: {
|
|
209
208
|
...q?.addBill,
|
|
210
209
|
heading: S.nonEmptyHeading
|
|
211
210
|
},
|
|
212
|
-
...
|
|
211
|
+
...B ? {
|
|
213
212
|
columnAddedOn: S.duplicateColumnCreated,
|
|
214
213
|
columnAmountDue: S.duplicateColumnAmount
|
|
215
214
|
} : {}
|
|
216
215
|
}), [
|
|
217
|
-
|
|
216
|
+
B,
|
|
218
217
|
S.duplicateColumnCreated,
|
|
219
218
|
S.duplicateColumnAmount,
|
|
220
219
|
q,
|
|
221
220
|
S.createButton,
|
|
222
221
|
S.nonEmptyHeading
|
|
223
|
-
]),
|
|
224
|
-
...
|
|
222
|
+
]), we = _(() => ({
|
|
223
|
+
...R.filterBarProps,
|
|
225
224
|
labels: S.filterBar
|
|
226
|
-
}), [
|
|
227
|
-
C(!1),
|
|
225
|
+
}), [R.filterBarProps, S.filterBar]), J = () => {
|
|
226
|
+
C(!1), ue?.();
|
|
228
227
|
}, Y = (e) => {
|
|
229
|
-
C(!1),
|
|
230
|
-
}, X =
|
|
231
|
-
emailAddress:
|
|
228
|
+
C(!1), de?.(e);
|
|
229
|
+
}, X = L ? {
|
|
230
|
+
emailAddress: L,
|
|
232
231
|
onCopyEmail: async () => {
|
|
233
|
-
|
|
232
|
+
L && (await d(L) ? e.success(S.emailCopiedToast) : e.error(S.emailCopyFailedToast));
|
|
234
233
|
}
|
|
235
234
|
} : {
|
|
236
235
|
emailAddress: void 0,
|
|
237
236
|
onCopyEmail: void 0
|
|
238
|
-
}, { showVendorBills: Z } =
|
|
237
|
+
}, { showVendorBills: Z } = R, Q = h((e) => {
|
|
239
238
|
T(u.AllBills), Z(e);
|
|
240
239
|
}, [Z]), $ = h(() => C(!0), []);
|
|
241
|
-
return g(
|
|
240
|
+
return g(he, () => ({
|
|
242
241
|
showVendorBills: Q,
|
|
243
242
|
openAddBill: $
|
|
244
|
-
}), [Q, $]), /* @__PURE__ */
|
|
243
|
+
}), [Q, $]), /* @__PURE__ */ se(oe, { children: [
|
|
245
244
|
/* @__PURE__ */ y(o, {
|
|
246
|
-
rows:
|
|
247
|
-
isLoading:
|
|
248
|
-
isError:
|
|
249
|
-
onRetry:
|
|
250
|
-
sorting:
|
|
251
|
-
onSortingChange:
|
|
252
|
-
pageSize:
|
|
253
|
-
onPageSizeChange:
|
|
254
|
-
pageSizeOptions:
|
|
255
|
-
hasNextPage:
|
|
256
|
-
hasPrevPage:
|
|
257
|
-
onNextPage:
|
|
258
|
-
onPrevPage:
|
|
259
|
-
filterTabs:
|
|
260
|
-
selectedFilterTabId:
|
|
261
|
-
onFilterTabChange:
|
|
262
|
-
searchValue:
|
|
263
|
-
onSearchChange:
|
|
264
|
-
filters:
|
|
265
|
-
visibleColumns:
|
|
266
|
-
keepsColumnOrder:
|
|
267
|
-
isSortable:
|
|
268
|
-
pageInfo:
|
|
245
|
+
rows: R.rows,
|
|
246
|
+
isLoading: R.isLoading || !E,
|
|
247
|
+
isError: R.isError,
|
|
248
|
+
onRetry: R.onRetry,
|
|
249
|
+
sorting: R.sorting,
|
|
250
|
+
onSortingChange: R.onSortingChange,
|
|
251
|
+
pageSize: R.pageSize,
|
|
252
|
+
onPageSizeChange: R.onPageSizeChange,
|
|
253
|
+
pageSizeOptions: R.pageSizeOptions,
|
|
254
|
+
hasNextPage: R.hasNextPage,
|
|
255
|
+
hasPrevPage: R.hasPrevPage,
|
|
256
|
+
onNextPage: R.onNextPage,
|
|
257
|
+
onPrevPage: R.onPrevPage,
|
|
258
|
+
filterTabs: _e,
|
|
259
|
+
selectedFilterTabId: R.selectedFilterTabId,
|
|
260
|
+
onFilterTabChange: ye,
|
|
261
|
+
searchValue: R.searchValue,
|
|
262
|
+
onSearchChange: R.onSearchChange,
|
|
263
|
+
filters: we,
|
|
264
|
+
visibleColumns: R.visibleColumns,
|
|
265
|
+
keepsColumnOrder: R.keepsColumnOrder,
|
|
266
|
+
isSortable: R.isSortable,
|
|
267
|
+
pageInfo: R.pageInfo,
|
|
269
268
|
cellTestIds: f,
|
|
270
|
-
isSearchActive:
|
|
271
|
-
showAddPanelWhenEmpty:
|
|
272
|
-
emptyState:
|
|
269
|
+
isSearchActive: R.isSearchActive,
|
|
270
|
+
showAddPanelWhenEmpty: R.showAddPanelWhenEmpty,
|
|
271
|
+
emptyState: B ? S.duplicatesEmptyState : S.queueEmptyStates[R.selectedFilterTabId],
|
|
273
272
|
onCreateClick: j ? () => C(!0) : void 0,
|
|
274
|
-
headerActionContainer:
|
|
273
|
+
headerActionContainer: fe,
|
|
275
274
|
onEnterManually: j ? J : void 0,
|
|
276
275
|
onFilesSelected: j ? Y : void 0,
|
|
277
276
|
maxFiles: x,
|
|
278
277
|
...X,
|
|
279
|
-
summaryCards:
|
|
280
|
-
view:
|
|
278
|
+
summaryCards: H ? {
|
|
279
|
+
view: H,
|
|
281
280
|
labels: {
|
|
282
281
|
group: S.summaryCards.group,
|
|
283
282
|
loading: S.summaryCards.loading,
|
|
284
283
|
info: S.summaryCards.info
|
|
285
284
|
},
|
|
286
|
-
onSelect:
|
|
285
|
+
onSelect: R.onSummaryCardSelect
|
|
287
286
|
} : void 0,
|
|
288
287
|
attentionStrip: {
|
|
289
288
|
label: S.attentionStripLabel,
|
|
290
|
-
items:
|
|
289
|
+
items: Se
|
|
291
290
|
},
|
|
292
|
-
attentionView:
|
|
291
|
+
attentionView: B ? {
|
|
293
292
|
backLabel: S.queues[c.All],
|
|
294
293
|
backAccessibleLabel: S.attentionBackAccessible,
|
|
295
294
|
title: S.duplicatesViewTitle,
|
|
296
295
|
tone: "warning",
|
|
297
|
-
onBack:
|
|
296
|
+
onBack: G
|
|
298
297
|
} : void 0,
|
|
299
|
-
labels:
|
|
298
|
+
labels: Ce
|
|
300
299
|
}),
|
|
301
|
-
/* @__PURE__ */ y(
|
|
302
|
-
open:
|
|
303
|
-
copy:
|
|
304
|
-
onConfirm:
|
|
305
|
-
onCancel:
|
|
306
|
-
isPending:
|
|
307
|
-
labels: { cancelButton:
|
|
300
|
+
/* @__PURE__ */ y(i, {
|
|
301
|
+
open: R.cancelConfirmation.open,
|
|
302
|
+
copy: R.cancelConfirmation.copy,
|
|
303
|
+
onConfirm: R.cancelConfirmation.onConfirm,
|
|
304
|
+
onCancel: R.cancelConfirmation.onCancel,
|
|
305
|
+
isPending: R.cancelConfirmation.isPending,
|
|
306
|
+
labels: { cancelButton: R.cancelConfirmation.cancelButtonLabel }
|
|
308
307
|
}),
|
|
309
|
-
/* @__PURE__ */ y(
|
|
310
|
-
open:
|
|
311
|
-
copy:
|
|
312
|
-
onConfirm:
|
|
313
|
-
onCancel:
|
|
314
|
-
isPending:
|
|
315
|
-
labels: { cancelButton:
|
|
308
|
+
/* @__PURE__ */ y(i, {
|
|
309
|
+
open: R.keepConfirmation.open,
|
|
310
|
+
copy: R.keepConfirmation.copy,
|
|
311
|
+
onConfirm: R.keepConfirmation.onConfirm,
|
|
312
|
+
onCancel: R.keepConfirmation.onCancel,
|
|
313
|
+
isPending: R.keepConfirmation.isPending,
|
|
314
|
+
labels: { cancelButton: R.keepConfirmation.cancelButtonLabel }
|
|
316
315
|
}),
|
|
317
|
-
j ? /* @__PURE__ */ y(
|
|
318
|
-
open:
|
|
316
|
+
j ? /* @__PURE__ */ y(a, {
|
|
317
|
+
open: ge,
|
|
319
318
|
onOpenChange: C,
|
|
320
319
|
onFilesSelected: Y,
|
|
321
320
|
maxFiles: x,
|
|
@@ -324,7 +323,7 @@ function b({ labels: b, onOpenBill: ue, onEnterManually: de, onFilesSelected: fe
|
|
|
324
323
|
dialogLabels: b?.addBillDialog?.dialog,
|
|
325
324
|
labels: {
|
|
326
325
|
...b?.addBillDialog?.panel,
|
|
327
|
-
heading:
|
|
326
|
+
heading: R.hasAnyBills ? S.nonEmptyHeading : S.emptyHeading
|
|
328
327
|
}
|
|
329
328
|
}) : null
|
|
330
329
|
] });
|
|
@@ -81,9 +81,20 @@ var n = {
|
|
|
81
81
|
duplicateColumnCreated: "Created",
|
|
82
82
|
duplicateShowMore: (e) => `Show ${e} more`,
|
|
83
83
|
duplicateShowLess: "Show less",
|
|
84
|
+
duplicateStatusCount: {
|
|
85
|
+
draft: (e) => i(e, "Draft", "Drafts"),
|
|
86
|
+
ready_to_submit: (e) => `${e} Ready to submit`,
|
|
87
|
+
pending_approval: (e) => `${e} Pending review`,
|
|
88
|
+
ready_to_pay: (e) => `${e} Ready to pay`,
|
|
89
|
+
scheduled: (e) => `${e} Scheduled`,
|
|
90
|
+
paid: (e) => `${e} Paid`,
|
|
91
|
+
canceled: (e) => `${e} Cancelled`,
|
|
92
|
+
rejected: (e) => `${e} Rejected`,
|
|
93
|
+
unknown: (e) => `${e} Unknown`
|
|
94
|
+
},
|
|
84
95
|
duplicateStatusSummary: (e) => e.join(", "),
|
|
85
96
|
duplicateColumnAmount: "Amount",
|
|
86
|
-
duplicatePageInfo: ({ billCount: e,
|
|
97
|
+
duplicatePageInfo: ({ billCount: e, groupCount: t }) => `${i(e, "bill", "bills")} across ${i(t, "duplicate group", "duplicate groups")}`,
|
|
87
98
|
attachmentIndicator: "Has an attachment",
|
|
88
99
|
scheduledRelativeDay: {
|
|
89
100
|
today: "Today",
|
package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bills-list/ui/dist/index13.js
CHANGED
|
@@ -183,6 +183,7 @@ function v({ fields: d, activeFilterCount: v, chips: y, onRemoveChip: b, onClear
|
|
|
183
183
|
"data-testid": Y?.chips,
|
|
184
184
|
children: [y.map((e) => /* @__PURE__ */ f(ee, {
|
|
185
185
|
label: e.label,
|
|
186
|
+
fullLabel: e.fullLabel,
|
|
186
187
|
labels: Z.filterTag,
|
|
187
188
|
onDismiss: () => b(e.key)
|
|
188
189
|
}, e.key)), /* @__PURE__ */ f("button", {
|
package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/util/dist/lib/groupCollapse.js
CHANGED
|
@@ -4,19 +4,28 @@ var e = [
|
|
|
4
4
|
"scheduled",
|
|
5
5
|
"ready_to_pay",
|
|
6
6
|
"pending_approval",
|
|
7
|
+
"ready_to_submit",
|
|
7
8
|
"draft"
|
|
8
9
|
];
|
|
9
|
-
function t({ statuses: t,
|
|
10
|
-
if (t.length <=
|
|
11
|
-
let
|
|
10
|
+
function t({ statuses: t, labels: n }) {
|
|
11
|
+
if (t.length <= 4) return;
|
|
12
|
+
let r = t.slice(3), i = /* @__PURE__ */ new Map();
|
|
13
|
+
for (let e of r) {
|
|
14
|
+
let t = e ?? "unknown";
|
|
15
|
+
i.set(t, (i.get(t) ?? 0) + 1);
|
|
16
|
+
}
|
|
17
|
+
let a = (t) => {
|
|
12
18
|
let n = e.indexOf(t);
|
|
13
19
|
return n === -1 ? e.length : n;
|
|
14
|
-
},
|
|
20
|
+
}, o = [...i.keys()].sort((e, t) => a(e) - a(t));
|
|
15
21
|
return {
|
|
16
|
-
visibleCount:
|
|
17
|
-
showMoreLabel:
|
|
18
|
-
summary:
|
|
19
|
-
|
|
22
|
+
visibleCount: 3,
|
|
23
|
+
showMoreLabel: n.showMore(r.length),
|
|
24
|
+
summary: n.statusSummary(o.map((e) => ({
|
|
25
|
+
status: e,
|
|
26
|
+
count: i.get(e) ?? 0
|
|
27
|
+
}))),
|
|
28
|
+
showLessLabel: n.showLess
|
|
20
29
|
};
|
|
21
30
|
}
|
|
22
31
|
export { e as GROUP_SUMMARY_STATUS_ORDER, t as buildGroupCollapse };
|
package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/analytics/build-info.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// ../../libs/tesouro-embedded-components-react/shared/feature/dist/lib/analytics/build-info.js
|
|
2
|
-
var e = "@tesouro/embedded-components-react", t = "0.11.
|
|
2
|
+
var e = "@tesouro/embedded-components-react", t = "0.11.197", n = "91c2d16805b212581b2ff35a5e016262f605288f", r = Object.freeze({
|
|
3
3
|
library_name: e,
|
|
4
4
|
library_version: t,
|
|
5
5
|
library_sha: n
|