@tesouro/embedded-components-react 0.5.268 → 0.5.270
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 +4 -10
- package/dist/index.d.ts +13 -9
- package/dist/lib/ReceivablesWidget.d.ts +13 -9
- package/dist/libs/tesouro-embedded-components-react/counterparts-widget/feature/dist/index.js +3 -1
- package/dist/libs/tesouro-embedded-components-react/counterparts-widget/feature/dist/lib/CounterpartsWidget/CounterpartDetailsContainer.js +44 -0
- package/dist/libs/tesouro-embedded-components-react/counterparts-widget/feature/dist/lib/CounterpartsWidget/useCounterpartDetailsSheetView.js +97 -0
- package/dist/libs/tesouro-embedded-components-react/counterparts-widget/feature/dist/lib/CounterpartsWidget/useCounterpartsWidget.js +76 -150
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/ReceivablesWidget.js +63 -57
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/actionsModal.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/auditHistory/labels.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/details.js +161 -152
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/helpers.js +30 -34
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/labels.js +12 -8
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/statusCards.js +18 -19
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/useReceivableActions.js +208 -158
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/useReceivableDetails.js +91 -85
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/useReceivableForm.js +197 -196
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/useReceivablesWidget.js +147 -115
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index.js +14 -14
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index13.js +3 -5
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index14.js +37 -34
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index22.js +22 -7
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index23.js +17 -15
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index24.js +17 -13
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index26.js +37 -31
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index27.js +29 -23
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index29.js +38 -11
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index30.js +26 -28
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index31.js +20 -14
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index32.js +8 -24
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index33.js +34 -83
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index34.js +14 -404
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index35.js +28 -2
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index36.js +79 -39
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index37.js +490 -68
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index38.js +2 -502
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index39.js +41 -216
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index40.js +70 -21
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index41.js +484 -5
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index42.js +224 -0
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index43.js +21 -263
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index44.js +8 -2
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index46.js +261 -24
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index47.js +2 -237
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index48.js +100 -3
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index49.js +21 -242
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index50.js +226 -82
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index51.js +3 -59
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index52.js +233 -178
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index53.js +85 -37
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index54.js +60 -0
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index55.js +194 -0
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index56.js +45 -0
- 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/index45.js +0 -100
|
@@ -44,7 +44,7 @@ function w() {
|
|
|
44
44
|
function T(e, n) {
|
|
45
45
|
let r = t(e);
|
|
46
46
|
return r ? new Intl.DateTimeFormat(void 0, {
|
|
47
|
-
day: "
|
|
47
|
+
day: "2-digit",
|
|
48
48
|
month: "short",
|
|
49
49
|
year: "numeric"
|
|
50
50
|
}).format(r) : n;
|
|
@@ -67,10 +67,7 @@ function O(e, t) {
|
|
|
67
67
|
function k(e, t) {
|
|
68
68
|
return e === "quote" ? t.quoteType : e === "credit_note" ? t.creditNoteType : t.invoiceType;
|
|
69
69
|
}
|
|
70
|
-
function A(e) {
|
|
71
|
-
return e === "paid" || e === "accepted" || e === "issued" || e === "recurring" ? "success" : e === "draft" || e === "issuing" ? "neutral" : e === "overdue" || e === "partially_paid" ? "warning" : e === "failed" || e === "declined" || e === "expired" || e === "uncollectible" || e === "canceled" || e === "deleted" ? "danger" : "info";
|
|
72
|
-
}
|
|
73
|
-
function j(e, t, n) {
|
|
70
|
+
function A(e, t, n) {
|
|
74
71
|
let r = e.counterpart_name || (e.counterpart_id ? t.names.get(e.counterpart_id) : void 0);
|
|
75
72
|
return r ? {
|
|
76
73
|
customerLabel: r,
|
|
@@ -83,18 +80,17 @@ function j(e, t, n) {
|
|
|
83
80
|
customerState: "missing"
|
|
84
81
|
};
|
|
85
82
|
}
|
|
86
|
-
var
|
|
83
|
+
var j = {
|
|
87
84
|
names: /* @__PURE__ */ new Map(),
|
|
88
85
|
isResolving: !1
|
|
89
86
|
};
|
|
90
|
-
function
|
|
87
|
+
function M({ receivables: e, messages: t, customerNames: n = j }) {
|
|
91
88
|
return e.map((e) => ({
|
|
92
89
|
id: e.id,
|
|
93
90
|
type: e.type,
|
|
94
91
|
documentLabel: e.document_id || t.pendingValue,
|
|
95
|
-
...
|
|
92
|
+
...A(e, n, t),
|
|
96
93
|
status: e.status,
|
|
97
|
-
statusTone: A(e.status),
|
|
98
94
|
issueDateLabel: T(e.issue_date, t.pendingValue),
|
|
99
95
|
dueDateLabel: T(e.type === "invoice" ? e.due_date : void 0, t.pendingValue),
|
|
100
96
|
totalLabel: E({
|
|
@@ -104,13 +100,13 @@ function N({ receivables: e, messages: t, customerNames: n = M }) {
|
|
|
104
100
|
})
|
|
105
101
|
}));
|
|
106
102
|
}
|
|
107
|
-
function
|
|
103
|
+
function N(e) {
|
|
108
104
|
if (e.memo || e.footer) return {
|
|
109
105
|
opening: e.memo || void 0,
|
|
110
106
|
closing: e.footer || void 0
|
|
111
107
|
};
|
|
112
108
|
}
|
|
113
|
-
function
|
|
109
|
+
function P({ values: e, counterpart: t, addresses: n }) {
|
|
114
110
|
let r = n?.length && t?.id === e.customerId ? t : void 0, i = e.billingAddressId || r?.default_billing_address_id || (n?.length === 1 ? n[0].id : ""), a = e.shippingAddressId || r?.default_shipping_address_id || "";
|
|
115
111
|
return {
|
|
116
112
|
billingAddressId: i,
|
|
@@ -118,7 +114,7 @@ function F({ values: e, counterpart: t, addresses: n }) {
|
|
|
118
114
|
shippingAddressId: a
|
|
119
115
|
};
|
|
120
116
|
}
|
|
121
|
-
function
|
|
117
|
+
function F({ values: e, billingAddressId: t, messages: r, willIssue: i = !1, hasStartedRecurrence: a = !1 }) {
|
|
122
118
|
let o = {};
|
|
123
119
|
e.customerId ? t || (o.customerId = r.customerAddressRequired) : o.customerId = r.customerRequired;
|
|
124
120
|
let s = e.customerEmail.trim();
|
|
@@ -132,24 +128,24 @@ function I({ values: e, billingAddressId: t, messages: r, willIssue: i = !1, has
|
|
|
132
128
|
let f = x(e, r);
|
|
133
129
|
return f && (o.discount = f), o;
|
|
134
130
|
}
|
|
135
|
-
function
|
|
131
|
+
function I(e) {
|
|
136
132
|
return Object.keys(e).length > 0;
|
|
137
133
|
}
|
|
138
|
-
function
|
|
139
|
-
return !
|
|
140
|
-
values:
|
|
134
|
+
function L(e, t) {
|
|
135
|
+
return !I(F({
|
|
136
|
+
values: B(e),
|
|
141
137
|
billingAddressId: e.type === "invoice" ? e.counterpart_billing_address?.id ?? void 0 : void 0,
|
|
142
138
|
messages: t,
|
|
143
139
|
willIssue: !0
|
|
144
140
|
}));
|
|
145
141
|
}
|
|
146
|
-
function
|
|
142
|
+
function R({ bankAccountId: e, bankAccountType: t }) {
|
|
147
143
|
return {
|
|
148
144
|
bank_account_id: e || void 0,
|
|
149
145
|
bank_account_type: e && t || void 0
|
|
150
146
|
};
|
|
151
147
|
}
|
|
152
|
-
function
|
|
148
|
+
function z({ values: e, billingAddressId: t, shippingAddressId: n, unitNamesById: r }) {
|
|
153
149
|
let a = e.lineItems.filter((e) => !i(e)).map((t) => o({
|
|
154
150
|
lineItem: t,
|
|
155
151
|
currency: e.currency,
|
|
@@ -164,7 +160,7 @@ function B({ values: e, billingAddressId: t, shippingAddressId: n, unitNamesById
|
|
|
164
160
|
memo: e.openingNote,
|
|
165
161
|
footer: e.closingNote,
|
|
166
162
|
discount: y(e) ?? void 0,
|
|
167
|
-
...
|
|
163
|
+
...R(e)
|
|
168
164
|
};
|
|
169
165
|
return e.type === "quote" ? {
|
|
170
166
|
...s,
|
|
@@ -180,7 +176,7 @@ function B({ values: e, billingAddressId: t, shippingAddressId: n, unitNamesById
|
|
|
180
176
|
type: "invoice"
|
|
181
177
|
};
|
|
182
178
|
}
|
|
183
|
-
function
|
|
179
|
+
function B(e, t) {
|
|
184
180
|
let n = e.type === "quote" ? "quote" : "invoice", i = u(e.line_items), a = e.type === "invoice" ? e : void 0, o = e.line_items.map((n) => c({
|
|
185
181
|
lineItem: n,
|
|
186
182
|
currency: e.currency,
|
|
@@ -191,8 +187,8 @@ function V(e, t) {
|
|
|
191
187
|
type: n,
|
|
192
188
|
customerId: e.counterpart_id,
|
|
193
189
|
currency: e.currency,
|
|
194
|
-
issueDate:
|
|
195
|
-
dueDate: e.type === "quote" ?
|
|
190
|
+
issueDate: G(e.issue_date),
|
|
191
|
+
dueDate: e.type === "quote" ? G(e.expiry_date) : "",
|
|
196
192
|
openingNote: e.memo ?? "",
|
|
197
193
|
closingNote: e.footer ?? "",
|
|
198
194
|
...e.type === "invoice" ? _(e.payment_terms) : {},
|
|
@@ -201,7 +197,7 @@ function V(e, t) {
|
|
|
201
197
|
...b(e.discount, e.currency),
|
|
202
198
|
lineItems: o.length > 0 ? o : [r(e.currency)],
|
|
203
199
|
bankAccountId: e.bank_account_id ?? "",
|
|
204
|
-
bankAccountType:
|
|
200
|
+
bankAccountType: V(e.bank_account_type),
|
|
205
201
|
billingAddressId: e.counterpart_billing_address?.id ?? "",
|
|
206
202
|
shippingAddressId: e.counterpart_shipping_address?.id ?? "",
|
|
207
203
|
paymentReminderId: a?.payment_reminder_id ?? "",
|
|
@@ -210,10 +206,10 @@ function V(e, t) {
|
|
|
210
206
|
attachments: p(e)
|
|
211
207
|
};
|
|
212
208
|
}
|
|
213
|
-
function
|
|
209
|
+
function V(e) {
|
|
214
210
|
return e === "BANK_DETAILS" || e === "INTERNAL" || e === "EXTERNAL" ? e : "";
|
|
215
211
|
}
|
|
216
|
-
function
|
|
212
|
+
function H({ values: e, billingAddressId: t, shippingAddressId: n, lineItemChanges: r }) {
|
|
217
213
|
let i = {
|
|
218
214
|
counterpart_billing_address_id: t,
|
|
219
215
|
counterpart_shipping_address_id: n || null,
|
|
@@ -223,7 +219,7 @@ function U({ values: e, billingAddressId: t, shippingAddressId: n, lineItemChang
|
|
|
223
219
|
memo: e.openingNote,
|
|
224
220
|
footer: e.closingNote,
|
|
225
221
|
discount: y(e),
|
|
226
|
-
...
|
|
222
|
+
...R(e)
|
|
227
223
|
};
|
|
228
224
|
return e.type === "quote" ? { quote: {
|
|
229
225
|
...i,
|
|
@@ -239,7 +235,7 @@ function U({ values: e, billingAddressId: t, shippingAddressId: n, lineItemChang
|
|
|
239
235
|
attachments: f(e.attachments) ?? null
|
|
240
236
|
} };
|
|
241
237
|
}
|
|
242
|
-
function
|
|
238
|
+
function U({ values: e, originalLineItems: t, originalCurrency: n, unitNamesById: r, units: o }) {
|
|
243
239
|
let l = u(t), d = a(e.taxRate, l), f = (e, t, n) => s({
|
|
244
240
|
lineItem: e,
|
|
245
241
|
currency: t,
|
|
@@ -265,7 +261,7 @@ function W({ values: e, originalLineItems: t, originalCurrency: n, unitNamesById
|
|
|
265
261
|
...v.length ? { remove: v } : {}
|
|
266
262
|
};
|
|
267
263
|
}
|
|
268
|
-
function
|
|
264
|
+
function W({ values: e, originalLineItems: t, changes: n }) {
|
|
269
265
|
let r = e.lineItems.filter((e) => !i(e)).map((e) => e.id);
|
|
270
266
|
if (!t) return { created: r };
|
|
271
267
|
let a = new Set(t.map((e) => e.id));
|
|
@@ -274,20 +270,20 @@ function G({ values: e, originalLineItems: t, changes: n }) {
|
|
|
274
270
|
replaced: n?.replace?.map((e) => e.id) ?? []
|
|
275
271
|
};
|
|
276
272
|
}
|
|
277
|
-
function
|
|
273
|
+
function G(e) {
|
|
278
274
|
return e?.slice(0, 10) ?? "";
|
|
279
275
|
}
|
|
280
|
-
function
|
|
276
|
+
function K(e, t) {
|
|
281
277
|
let n = {};
|
|
282
278
|
return e.to.trim() || (n.to = t.sendToRequired), e.subject.trim() || (n.subject = t.sendSubjectRequired), e.body.trim() || (n.body = t.sendBodyRequired), n;
|
|
283
279
|
}
|
|
284
|
-
function
|
|
280
|
+
function q(e) {
|
|
285
281
|
return Object.keys(e).length > 0;
|
|
286
282
|
}
|
|
287
|
-
function
|
|
283
|
+
function J(e) {
|
|
288
284
|
return e.split(",").map((e) => e.trim()).filter(Boolean);
|
|
289
285
|
}
|
|
290
|
-
function
|
|
286
|
+
function Y(e, t) {
|
|
291
287
|
return {
|
|
292
288
|
...C,
|
|
293
289
|
to: e?.counterpart_contact?.email ?? "",
|
|
@@ -296,4 +292,4 @@ function X(e, t) {
|
|
|
296
292
|
};
|
|
297
293
|
}
|
|
298
294
|
//#endregion
|
|
299
|
-
export { C as EMPTY_RECEIVABLE_SEND_VALUES,
|
|
295
|
+
export { C as EMPTY_RECEIVABLE_SEND_VALUES, N as buildReceivableNotesView, M as buildReceivableRows, w as createEmptyReceivableFormValues, r as createLineItem, Y as defaultSendValues, T as formatDate, E as formatMoney, D as fromMajorUnits, O as getDocumentTitle, k as getDocumentTypeLabel, I as hasReceivableFormErrors, q as hasSendErrors, L as isReceivableReadyToIssue, z as receivableFormValuesToCreatePayload, U as receivableFormValuesToLineItemChanges, H as receivableFormValuesToUpdatePayload, B as receivableToFormValues, P as resolveCounterpartAddresses, J as splitEmailList, W as submittedLineItemRows, F as validateReceivableForm, K as validateSendValues };
|
|
@@ -47,6 +47,8 @@ var e = {
|
|
|
47
47
|
creditNoteType: "Credit note",
|
|
48
48
|
detailsUnsupportedTitle: "Receivable type not supported",
|
|
49
49
|
detailsUnsupportedDescription: "Receivable type {type} is not supported. Only invoice is supported.",
|
|
50
|
+
detailsNotFoundTitle: "Invoice not found",
|
|
51
|
+
detailsNotFoundDescription: "There is no invoice for the provided id: {invoiceId}",
|
|
50
52
|
detailsInvoiceSubtitle: "Invoice: {number}",
|
|
51
53
|
detailsDaysOverdue: "{days} days overdue",
|
|
52
54
|
detailsInvoiceAmount: "Invoice amount",
|
|
@@ -99,21 +101,22 @@ var e = {
|
|
|
99
101
|
detailsIterationStatusCompleted: "Complete",
|
|
100
102
|
sendSubjectDefault: "Your receivable document",
|
|
101
103
|
sendBodyDefault: "Please find the receivable document attached.",
|
|
102
|
-
|
|
103
|
-
issueDescription: "Issuing locks the document and makes it ready to send to the customer.",
|
|
104
|
-
issueConfirm: "Issue",
|
|
104
|
+
issueSucceeded: "Invoice has been issued",
|
|
105
105
|
acceptTitle: "Accept quote?",
|
|
106
106
|
acceptDescription: "This marks the quote as accepted.",
|
|
107
107
|
acceptConfirm: "Accept",
|
|
108
108
|
declineTitle: "Decline quote?",
|
|
109
109
|
declineDescription: "This marks the quote as declined.",
|
|
110
110
|
declineConfirm: "Decline",
|
|
111
|
+
issueFailed: "Failed to issue invoice. Add any missing information to your draft invoice and try again.",
|
|
112
|
+
issueAndSendNoEmail: "This customer has no email address. Add one in the customer details to send the invoice.",
|
|
111
113
|
cancelTitle: "Cancel receivable?",
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
114
|
+
cancelNumberedTitle: "Cancel receivable \"{number}\"?",
|
|
115
|
+
cancelDescription: "This action can't be undone.",
|
|
116
|
+
cancelConfirm: "Cancel",
|
|
117
|
+
cancelClose: "Close",
|
|
118
|
+
cloneSuccess: "Invoice duplicate has been created.",
|
|
119
|
+
cloneError: "Failed to duplicate invoice.",
|
|
117
120
|
deleteTitle: "Delete draft?",
|
|
118
121
|
deleteDescription: "This permanently deletes the draft document. You cannot undo this action.",
|
|
119
122
|
deleteConfirm: "Delete",
|
|
@@ -246,6 +249,7 @@ var e = {
|
|
|
246
249
|
actionsTitleIssued: "Invoice issued",
|
|
247
250
|
actionsTitleRecurrence: "Recurring billing activated",
|
|
248
251
|
actionsTitleDraft: "Draft saved",
|
|
252
|
+
actionsTitleUpdated: "Invoice updated",
|
|
249
253
|
actionsSelectAll: "Select all",
|
|
250
254
|
actionsDeselectAll: "Deselect all",
|
|
251
255
|
actionsProductsSaved: "Products and services saved.",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { formatMoney as e
|
|
1
|
+
import { formatMoney as e } from "./helpers.js";
|
|
2
2
|
//#region ../../libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/statusCards.js
|
|
3
|
-
var
|
|
3
|
+
var t = [
|
|
4
4
|
"draft",
|
|
5
5
|
"issued",
|
|
6
6
|
"overdue",
|
|
@@ -10,35 +10,34 @@ var n = [
|
|
|
10
10
|
"canceled",
|
|
11
11
|
"uncollectible"
|
|
12
12
|
];
|
|
13
|
-
function
|
|
14
|
-
let
|
|
15
|
-
return
|
|
13
|
+
function n(e) {
|
|
14
|
+
let n = t.indexOf(e);
|
|
15
|
+
return n === -1 ? t.length : n;
|
|
16
16
|
}
|
|
17
|
-
function
|
|
18
|
-
let
|
|
17
|
+
function r({ counts: t, amounts: r, statusFilter: i, statusLabels: a, fallback: o }) {
|
|
18
|
+
let s = new Map(Object.entries(a)), c = new Map(r.map((e) => [e.dimension_value, e.metric_value])), l = t.flatMap((e) => e.dimension_value ? [{
|
|
19
19
|
status: e.dimension_value,
|
|
20
20
|
count: e.metric_value
|
|
21
|
-
}] : []),
|
|
21
|
+
}] : []), u = l.filter(({ status: e }) => e !== "recurring").reduce((e, { count: t }) => e + t, 0);
|
|
22
22
|
return {
|
|
23
23
|
kind: "ready",
|
|
24
24
|
all: {
|
|
25
25
|
value: "all",
|
|
26
|
-
countLabel: String(
|
|
27
|
-
selected:
|
|
26
|
+
countLabel: String(u),
|
|
27
|
+
selected: i === "all"
|
|
28
28
|
},
|
|
29
|
-
statuses: [...
|
|
30
|
-
value:
|
|
31
|
-
statusLabel:
|
|
32
|
-
|
|
33
|
-
countLabel: String(r),
|
|
29
|
+
statuses: [...l].sort((e, t) => n(e.status) - n(t.status)).map(({ status: t, count: n }) => ({
|
|
30
|
+
value: t,
|
|
31
|
+
statusLabel: s.get(t) ?? a.unknown,
|
|
32
|
+
countLabel: String(n),
|
|
34
33
|
amountLabel: e({
|
|
35
|
-
amount:
|
|
34
|
+
amount: c.get(t) ?? 0,
|
|
36
35
|
currency: "USD",
|
|
37
|
-
fallback:
|
|
36
|
+
fallback: o
|
|
38
37
|
}),
|
|
39
|
-
selected:
|
|
38
|
+
selected: i === t
|
|
40
39
|
}))
|
|
41
40
|
};
|
|
42
41
|
}
|
|
43
42
|
//#endregion
|
|
44
|
-
export {
|
|
43
|
+
export { r as buildReceivableStatusCardsView };
|