@tesouro/embedded-components-react 0.11.141 → 0.11.168
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/NOTICE +24 -0
- package/README.md +15 -37
- package/dist/experimental/BalanceHistoryWidget.d.ts +0 -11
- package/dist/experimental/QuickViewWidget.d.ts +0 -11
- package/dist/experimental/RemoteCheckCapture.d.ts +0 -11
- package/dist/experimental/index.d.ts +0 -11
- package/dist/fixtures/index.d.ts +27 -1
- package/dist/index.css +6976 -6246
- package/dist/index.d.ts +67 -173
- package/dist/index.js +9 -10
- package/dist/lib/AcceptDisclosuresWidget.d.ts +0 -11
- package/dist/lib/BalancesWidget.d.ts +0 -11
- package/dist/lib/BankAccountOnboardingWidget.d.ts +0 -11
- package/dist/lib/BankAccountsWidget.d.ts +3 -11
- package/dist/lib/BankingComplianceBannerWidget.d.ts +0 -11
- package/dist/lib/BillPayWidget.d.ts +0 -11
- package/dist/lib/CardDetailsWidget.d.ts +0 -11
- package/dist/lib/CounterpartsWidget.d.ts +1 -12
- package/dist/lib/CounterpartsWidgetPublic.d.ts +1 -12
- package/dist/lib/CreditCardsWidget.d.ts +1 -11
- package/dist/lib/DebitCardsWidget.d.ts +1 -11
- package/dist/lib/ExpenseManagementWidget.d.ts +1 -12
- package/dist/lib/InsightsWidget.d.ts +0 -11
- package/dist/lib/LinkedAccountsWidget.d.ts +1 -11
- package/dist/lib/OfferWidget.d.ts +0 -11
- package/dist/lib/ReceivablesWidget.d.ts +60 -17
- package/dist/lib/ReceivablesWidget.js +3 -2
- package/dist/lib/SettingsWidget.d.ts +0 -11
- package/dist/lib/TransfersWidget.d.ts +0 -11
- package/dist/lib/WidgetProvider.d.ts +0 -11
- package/dist/lib/WidgetProviderPublic.d.ts +0 -11
- package/dist/lib/WidgetSuite.d.ts +63 -15
- package/dist/libs/tesouro-embedded-components-react/accept-disclosures-widget/feature/dist/lib/AcceptDisclosuresWidget/AcceptDisclosuresWidget.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/lib/BankAccountOnboardingWidget/BankAccountOnboardingWidget.js +20 -19
- package/dist/libs/tesouro-embedded-components-react/bank-accounts-widget/account-details/feature/dist/index10.js +8 -8
- package/dist/libs/tesouro-embedded-components-react/bank-accounts-widget/account-details/feature/dist/index4.js +2 -3
- package/dist/libs/tesouro-embedded-components-react/bank-accounts-widget/account-details/ui/dist/index10.js +83 -82
- package/dist/libs/tesouro-embedded-components-react/bank-accounts-widget/account-details/ui/dist/index4.js +84 -79
- package/dist/libs/tesouro-embedded-components-react/bank-accounts-widget/account-details/ui/dist/index9.js +2 -1
- package/dist/libs/tesouro-embedded-components-react/bank-accounts-widget/feature/dist/lib/BankAccountsWidget/BankAccountsWidget.js +1 -0
- package/dist/libs/tesouro-embedded-components-react/bank-accounts-widget/feature/dist/lib/formatters.js +2 -3
- package/dist/libs/tesouro-embedded-components-react/bank-accounts-widget/feature/dist/lib/useBankAccountsWidget.js +122 -121
- package/dist/libs/tesouro-embedded-components-react/bank-accounts-widget/ui/dist/lib/AccountCard.js +51 -46
- package/dist/libs/tesouro-embedded-components-react/bank-accounts-widget/ui/dist/lib/BankAccountsWidgetUi.js +63 -59
- package/dist/libs/tesouro-embedded-components-react/bank-accounts-widget/ui/dist/lib/labels.js +3 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index22.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index25.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index35.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index36.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index4.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index40.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-upload/feature/dist/index4.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bills-list/feature/dist/index16.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bills-list/feature/dist/index17.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/pay-bill/feature/dist/index10.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/pay-bill/feature/dist/index4.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/card-details-widget/feature/dist/lib/useActivateCard.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/card-details-widget/feature/dist/lib/useCardLock.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/card-details-widget/feature/dist/lib/useEditCardNickname.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/cards-widget/create-card/feature/dist/index8.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/cards-widget/feature/dist/lib/testIds.js +2 -0
- package/dist/libs/tesouro-embedded-components-react/cards-widget/feature/dist/lib/useCardsWidget.js +161 -160
- package/dist/libs/tesouro-embedded-components-react/cards-widget/ui/dist/lib/CardsList/CardsList.js +126 -122
- package/dist/libs/tesouro-embedded-components-react/cards-widget/ui/dist/lib/CardsList/labels.js +1 -0
- package/dist/libs/tesouro-embedded-components-react/counterparts-widget/feature/dist/lib/CounterpartsWidget/useCounterpartDetailsActions.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/approval-policies/feature/dist/index7.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/feature/dist/lib/ExpenseManagementWidget/ExpenseManagementWidget.js +10 -9
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/feature/dist/lib/TransactionDetails/TransactionDetailsFeature.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/receipt-match/feature/dist/index2.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/data-access/dist/index.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/data-access/dist/index16.js +66 -74
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index.js +3 -2
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/ReceivablesWidget.js +351 -318
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/details.js +126 -133
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/helpers.js +63 -56
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/invoicesFilter.js +78 -72
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/invoicesFilterLabels.js +2 -1
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/labels.js +14 -1
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/recurrence.js +138 -129
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/recurringSeries.js +119 -0
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/statusCards.js +37 -28
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/tabs.js +1 -2
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/useInvoicesFilter.js +131 -81
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/useLocalDayStart.js +15 -0
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/useReceivableActions.js +46 -46
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/useReceivableActionsModal.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/useReceivableAttachmentUploads.js +13 -13
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/useReceivableBankAccount.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/useReceivableForm.js +440 -438
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/useReceivablePaymentRecord.js +7 -7
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/useReceivablePaymentTerms.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/useReceivableRecurrence.js +62 -56
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/useReceivableReminders.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/useReceivableStatusCards.js +47 -16
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/useReceivablesTable.js +78 -86
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/useReceivablesWidget.js +180 -158
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/useRecurringSeriesTable.js +132 -0
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/mocks/invoicing.js +4 -0
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/mocks/receivables.js +153 -137
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index.js +22 -19
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index18.js +6 -4
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index2.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index47.js +3 -3
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index60.js +137 -129
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index61.js +21 -46
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index62.js +143 -0
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index63.js +2 -0
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index64.js +47 -0
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index7.js +25 -25
- package/dist/libs/tesouro-embedded-components-react/linked-accounts-widget/feature/dist/lib/useLinkedAccountsWidget.js +193 -192
- package/dist/libs/tesouro-embedded-components-react/linked-accounts-widget/ui/dist/index13.js +2 -1
- package/dist/libs/tesouro-embedded-components-react/linked-accounts-widget/ui/dist/index14.js +100 -96
- package/dist/libs/tesouro-embedded-components-react/linked-accounts-widget/ui/dist/index6.js +1 -0
- package/dist/libs/tesouro-embedded-components-react/products-widget/feature/dist/lib/ProductsWidget/useProductDelete.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/products-widget/feature/dist/mocks/products.js +3 -11
- package/dist/libs/tesouro-embedded-components-react/products-widget/feature/dist/scenarios.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/quick-view-widget/cards/data-access/dist/index2.js +36 -77
- package/dist/libs/tesouro-embedded-components-react/quick-view-widget/cards/feature/dist/lib/CardsQuickViewWidget/summarizeCardSpend.js +11 -13
- package/dist/libs/tesouro-embedded-components-react/quick-view-widget/cards/feature/dist/lib/CardsQuickViewWidget/useCardSpendSummary.js +20 -17
- package/dist/libs/tesouro-embedded-components-react/remote-check-capture/feature/dist/lib/RemoteCheckCaptureWidget/useRemoteCheckCaptureWidget.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/settings-widget/chart-of-accounts/feature/dist/index7.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/settings-widget/feature/dist/mocks/settings.js +7 -0
- package/dist/libs/tesouro-embedded-components-react/settings-widget/invoice-settings/feature/dist/index7.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/settings-widget/invoice-settings/feature/dist/index8.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/settings-widget/team/data-access/dist/index8.js +4 -9
- package/dist/libs/tesouro-embedded-components-react/settings-widget/team/feature/dist/index12.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/settings-widget/team/feature/dist/index16.js +2 -3
- package/dist/libs/tesouro-embedded-components-react/settings-widget/ui/dist/lib/SettingsWidgetUi/SettingsWidgetUi.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/shared/approval-policy/feature/dist/lib/useApprovalPolicyRules.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/shared/approval-policy/ui/dist/index3.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/feature/dist/lib/subEntityForms.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/feature/dist/lib/useDeleteController.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/index.js +43 -43
- package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/rest/@tanstack/react-query.gen.js +233 -211
- package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/rest/sdk.gen.js +66 -42
- package/dist/libs/tesouro-embedded-components-react/shared/document-status/util/dist/lib/receivableFilledTone.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/shared/expense-requirements/feature/dist/lib/ExpenseRequirementsWidget.js +5 -4
- 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/product-catalog/feature/dist/lib/MeasureUnitsManagerContainer.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/shared/product-catalog/feature/dist/lib/toasts.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/shared/ui/dist/index.js +28 -28
- package/dist/libs/tesouro-embedded-components-react/shared/ui/dist/lib/EmbeddedToaster.js +33 -32
- package/dist/libs/tesouro-embedded-components-react/transfers-widget/feature/dist/lib/TransfersWidget/useTransferMoneyModalController.js +9 -8
- package/dist/node_modules/sonner/dist/index.js +620 -0
- package/dist/packages/shared-ui-shadcn/dist/index.js +6072 -6062
- package/dist/scenarios/index.d.ts +1 -3
- package/dist/scenarios/index.js +17 -20
- package/package.json +17 -4
- package/dist/lib/CustomersWidget.d.ts +0 -993
- package/dist/lib/CustomersWidget.js +0 -2
- package/dist/lib/ProductsWidget.d.ts +0 -893
- package/dist/lib/ProductsWidget.js +0 -2
- package/dist/libs/tesouro-embedded-components-react/customers-widget/feature/dist/index.js +0 -1
- package/dist/libs/tesouro-embedded-components-react/customers-widget/feature/dist/lib/CustomersWidget/CustomersWidget.js +0 -41
- package/dist/libs/tesouro-embedded-components-react/customers-widget/feature/dist/lib/analytics/events.js +0 -3
- package/dist/libs/tesouro-embedded-components-react/customers-widget/feature/dist/scenarios.js +0 -2
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/useUtcDayStart.js +0 -15
|
@@ -1,44 +1,44 @@
|
|
|
1
1
|
import { InvoicesFilterField as e } from "../../../../ui/dist/index3.js";
|
|
2
2
|
import "../../../../ui/dist/index.js";
|
|
3
3
|
import { formatMoney as t } from "./helpers.js";
|
|
4
|
-
import { INVOICES_DATE_PRESET_GROUPS as n } from "./datePresets.js";
|
|
5
|
-
import { addDays as
|
|
4
|
+
import { INVOICES_DATE_PRESET_GROUPS as n, InvoicesDatePreset as r } from "./datePresets.js";
|
|
5
|
+
import { addDays as i, format as a, formatISO as o, startOfDay as s } from "date-fns";
|
|
6
6
|
// ../../libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/invoicesFilter.js
|
|
7
|
-
var
|
|
7
|
+
var c = [
|
|
8
8
|
"draft",
|
|
9
9
|
"issued",
|
|
10
10
|
"overdue",
|
|
11
11
|
"partially_paid",
|
|
12
12
|
"paid",
|
|
13
13
|
"uncollectible",
|
|
14
|
-
"canceled"
|
|
15
|
-
|
|
16
|
-
], c = [
|
|
14
|
+
"canceled"
|
|
15
|
+
], l = [
|
|
17
16
|
"draft",
|
|
18
17
|
"issued",
|
|
19
18
|
"overdue",
|
|
20
19
|
"partially_paid",
|
|
21
20
|
"paid",
|
|
22
21
|
"uncollectible"
|
|
23
|
-
],
|
|
22
|
+
], u = [
|
|
24
23
|
e.DueDate,
|
|
25
24
|
e.CreatedAt,
|
|
26
25
|
e.IssueDate,
|
|
27
26
|
e.Status,
|
|
28
27
|
e.Amount,
|
|
29
28
|
e.Customer
|
|
30
|
-
],
|
|
29
|
+
], d = {
|
|
31
30
|
dueDate: "due_date",
|
|
32
31
|
createdAt: "created_at",
|
|
33
32
|
issueDate: "issue_date"
|
|
34
|
-
},
|
|
33
|
+
}, f = {
|
|
35
34
|
Status: "status",
|
|
36
35
|
Customer: "customer",
|
|
37
36
|
Counterpart: "counterpart",
|
|
38
37
|
Amount: "amount",
|
|
38
|
+
PaidDate: "paid_date",
|
|
39
39
|
Search: "search"
|
|
40
|
-
},
|
|
41
|
-
function
|
|
40
|
+
}, p = "date_";
|
|
41
|
+
function m(e) {
|
|
42
42
|
return {
|
|
43
43
|
dateRanges: {},
|
|
44
44
|
statuses: [],
|
|
@@ -49,105 +49,109 @@ function p(e) {
|
|
|
49
49
|
customerId: e
|
|
50
50
|
};
|
|
51
51
|
}
|
|
52
|
-
function
|
|
52
|
+
function h(e) {
|
|
53
53
|
return !!(e?.from || e?.to || e?.preset);
|
|
54
54
|
}
|
|
55
|
-
function
|
|
55
|
+
function g(e) {
|
|
56
56
|
return Object.entries(e.dateRanges);
|
|
57
57
|
}
|
|
58
|
-
function
|
|
58
|
+
function _(e) {
|
|
59
59
|
let t = Number.parseFloat(e);
|
|
60
60
|
return Number.isNaN(t) ? void 0 : Math.round(t * 100);
|
|
61
61
|
}
|
|
62
|
-
function
|
|
62
|
+
function v(e) {
|
|
63
63
|
if (e.amountMode === "any") return {};
|
|
64
|
-
let t =
|
|
64
|
+
let t = _(e.amountMin);
|
|
65
65
|
return e.amountMode === "exact" ? {
|
|
66
66
|
min: t,
|
|
67
67
|
max: t
|
|
68
68
|
} : {
|
|
69
69
|
min: t,
|
|
70
|
-
max:
|
|
70
|
+
max: _(e.amountMax)
|
|
71
71
|
};
|
|
72
72
|
}
|
|
73
|
-
function
|
|
74
|
-
let { min: t, max: n } =
|
|
73
|
+
function y(e) {
|
|
74
|
+
let { min: t, max: n } = v(e);
|
|
75
75
|
return t !== void 0 || n !== void 0;
|
|
76
76
|
}
|
|
77
|
-
function
|
|
78
|
-
let
|
|
79
|
-
for (let [
|
|
80
|
-
let e =
|
|
81
|
-
e === "due_date" ? (
|
|
77
|
+
function b(e, t) {
|
|
78
|
+
let n = {};
|
|
79
|
+
for (let [t, r] of g(e)) {
|
|
80
|
+
let e = d[t];
|
|
81
|
+
e === "due_date" ? (r?.from && (n.due_date__gte = o(r.from, { representation: "date" })), r?.to && (n.due_date__lte = o(r.to, { representation: "date" }))) : (r?.from && (n[`${e}__gte`] = s(r.from).toISOString()), r?.to && (n[`${e}__lt`] = i(s(r.to), 1).toISOString()));
|
|
82
82
|
}
|
|
83
|
-
|
|
84
|
-
let { min:
|
|
85
|
-
return
|
|
83
|
+
n.status__in = e.statuses.length > 0 ? e.statuses : l, e.customerName && (n.counterpart_name__icontains = e.customerName), e.customerId && (n.counterpart_id = e.customerId);
|
|
84
|
+
let { min: r, max: a } = v(e);
|
|
85
|
+
return r !== void 0 && (n.total_amount__gte = r), a !== void 0 && (n.total_amount__lte = a), e.isPaidWindowApplied && t && Object.assign(n, t), n;
|
|
86
86
|
}
|
|
87
|
-
function
|
|
87
|
+
function x(e, t) {
|
|
88
88
|
return [
|
|
89
|
-
Object.values(e.dateRanges).some(
|
|
89
|
+
Object.values(e.dateRanges).some(h),
|
|
90
90
|
e.statuses.length > 0,
|
|
91
91
|
!!e.customerName,
|
|
92
92
|
!!e.customerId,
|
|
93
|
-
|
|
93
|
+
y(e),
|
|
94
|
+
!!e.isPaidWindowApplied,
|
|
94
95
|
!!t
|
|
95
96
|
].filter(Boolean).length;
|
|
96
97
|
}
|
|
97
|
-
var
|
|
98
|
-
function
|
|
98
|
+
var S = "MMM d, yyyy";
|
|
99
|
+
function C(e, t) {
|
|
99
100
|
if (e?.preset && e.preset in t.presets) return t.presets[e.preset];
|
|
100
|
-
let n = e?.from &&
|
|
101
|
+
let n = e?.from && a(e.from, S), r = e?.to && a(e.to, S);
|
|
101
102
|
if (n && r) return t.dateRange(n, r);
|
|
102
103
|
if (n) return t.dateFrom(n);
|
|
103
104
|
if (r) return t.dateTo(r);
|
|
104
105
|
}
|
|
105
|
-
var
|
|
106
|
+
var w = (e) => e === void 0 ? void 0 : t({
|
|
106
107
|
amount: e,
|
|
107
108
|
currency: "USD",
|
|
108
109
|
fallback: ""
|
|
109
110
|
});
|
|
110
|
-
function
|
|
111
|
-
let n =
|
|
111
|
+
function T(e, t) {
|
|
112
|
+
let n = v(e), r = w(n.min), i = w(n.max);
|
|
112
113
|
if (e.amountMode === "exact") return r;
|
|
113
114
|
if (r && i) return t.amountBetween(r, i);
|
|
114
115
|
if (r) return t.amountAtLeast(r);
|
|
115
116
|
if (i) return t.amountAtMost(i);
|
|
116
117
|
}
|
|
117
|
-
function
|
|
118
|
-
let
|
|
119
|
-
for (let [t, n] of
|
|
120
|
-
let e =
|
|
121
|
-
e &&
|
|
122
|
-
key: `${
|
|
123
|
-
label:
|
|
118
|
+
function E({ state: e, search: t, counterpartName: n, labels: i, statusLabels: a }) {
|
|
119
|
+
let o = [], s = new Map(Object.entries(a));
|
|
120
|
+
for (let [t, n] of g(e)) {
|
|
121
|
+
let e = C(n, i);
|
|
122
|
+
e && o.push({
|
|
123
|
+
key: `${p}${t}`,
|
|
124
|
+
label: i.dateChip(i.dateFieldNames[t], e)
|
|
124
125
|
});
|
|
125
126
|
}
|
|
126
127
|
if (e.statuses.length > 0) {
|
|
127
|
-
let [t, ...n] = e.statuses.map((e) =>
|
|
128
|
-
|
|
129
|
-
key:
|
|
130
|
-
label:
|
|
128
|
+
let [t, ...n] = e.statuses.map((e) => s.get(e) ?? e);
|
|
129
|
+
o.push({
|
|
130
|
+
key: f.Status,
|
|
131
|
+
label: i.statusChip(n.length === 0 ? t : i.moreSelected(t, n.length))
|
|
131
132
|
});
|
|
132
133
|
}
|
|
133
|
-
e.customerName &&
|
|
134
|
-
key:
|
|
135
|
-
label:
|
|
136
|
-
}), e.customerId &&
|
|
137
|
-
key:
|
|
138
|
-
label:
|
|
134
|
+
e.customerName && o.push({
|
|
135
|
+
key: f.Customer,
|
|
136
|
+
label: i.customerChip(e.customerName)
|
|
137
|
+
}), e.customerId && o.push({
|
|
138
|
+
key: f.Counterpart,
|
|
139
|
+
label: i.customerChip(n || e.customerId)
|
|
139
140
|
});
|
|
140
|
-
let
|
|
141
|
-
return
|
|
142
|
-
key:
|
|
143
|
-
label:
|
|
144
|
-
}),
|
|
145
|
-
key:
|
|
146
|
-
label: r.
|
|
147
|
-
}),
|
|
141
|
+
let c = T(e, i);
|
|
142
|
+
return c && o.push({
|
|
143
|
+
key: f.Amount,
|
|
144
|
+
label: i.amountChip(c)
|
|
145
|
+
}), e.isPaidWindowApplied && o.push({
|
|
146
|
+
key: f.PaidDate,
|
|
147
|
+
label: i.dateChip(i.paidDateFieldName, i.presets[r.Last30Days])
|
|
148
|
+
}), t && o.push({
|
|
149
|
+
key: f.Search,
|
|
150
|
+
label: i.searchChip(t)
|
|
151
|
+
}), o;
|
|
148
152
|
}
|
|
149
|
-
function
|
|
150
|
-
if (t.startsWith(
|
|
153
|
+
function D(e, t) {
|
|
154
|
+
if (t.startsWith(p)) {
|
|
151
155
|
let n = t.slice(5), r = { ...e.dateRanges };
|
|
152
156
|
return delete r[n], {
|
|
153
157
|
...e,
|
|
@@ -155,19 +159,21 @@ function E(e, t) {
|
|
|
155
159
|
};
|
|
156
160
|
}
|
|
157
161
|
switch (t) {
|
|
158
|
-
case
|
|
162
|
+
case f.Status:
|
|
163
|
+
case f.PaidDate: return {
|
|
159
164
|
...e,
|
|
160
|
-
statuses: []
|
|
165
|
+
statuses: [],
|
|
166
|
+
isPaidWindowApplied: void 0
|
|
161
167
|
};
|
|
162
|
-
case
|
|
168
|
+
case f.Customer: return {
|
|
163
169
|
...e,
|
|
164
170
|
customerName: ""
|
|
165
171
|
};
|
|
166
|
-
case
|
|
172
|
+
case f.Counterpart: return {
|
|
167
173
|
...e,
|
|
168
174
|
customerId: void 0
|
|
169
175
|
};
|
|
170
|
-
case
|
|
176
|
+
case f.Amount: return {
|
|
171
177
|
...e,
|
|
172
178
|
amountMode: "any",
|
|
173
179
|
amountMin: "",
|
|
@@ -176,18 +182,18 @@ function E(e, t) {
|
|
|
176
182
|
default: return e;
|
|
177
183
|
}
|
|
178
184
|
}
|
|
179
|
-
function
|
|
180
|
-
return
|
|
185
|
+
function O(e, t) {
|
|
186
|
+
return c.map((n) => ({
|
|
181
187
|
value: n,
|
|
182
188
|
label: e[n],
|
|
183
189
|
description: t.statusDescriptions[n]
|
|
184
190
|
}));
|
|
185
191
|
}
|
|
186
|
-
function
|
|
192
|
+
function k(e) {
|
|
187
193
|
return Object.entries(n).map(([t, n]) => ({
|
|
188
194
|
value: t,
|
|
189
195
|
label: e.presets[t],
|
|
190
196
|
group: n === "current" ? e.presetGroupCurrent : e.presetGroupPast
|
|
191
197
|
}));
|
|
192
198
|
}
|
|
193
|
-
export {
|
|
199
|
+
export { u as INVOICES_FILTER_FIELDS, l as INVOICE_DEFAULT_STATUSES, c as INVOICE_FILTER_STATUSES, f as InvoicesFilterChipKey, k as buildInvoicesDatePresetOptions, E as buildInvoicesFilterChips, b as buildInvoicesFilterQuery, O as buildInvoicesStatusOptions, D as clearInvoicesFilter, x as countActiveInvoiceFilters, m as emptyInvoicesFilterState };
|
|
@@ -20,8 +20,9 @@ var t = {
|
|
|
20
20
|
dateFieldNames: {
|
|
21
21
|
dueDate: "Due date",
|
|
22
22
|
createdAt: "Created on",
|
|
23
|
-
issueDate: "
|
|
23
|
+
issueDate: "Invoice date"
|
|
24
24
|
},
|
|
25
|
+
paidDateFieldName: "Paid date",
|
|
25
26
|
dateRange: (e, t) => `${e} - ${t}`,
|
|
26
27
|
dateFrom: (e) => `From ${e}`,
|
|
27
28
|
dateTo: (e) => `Until ${e}`,
|
|
@@ -46,9 +46,22 @@ var e = {
|
|
|
46
46
|
bankAccountCreateFailed: "Failed to create Bank Account.",
|
|
47
47
|
untitledDocument: "Untitled document",
|
|
48
48
|
pendingValue: "Pending",
|
|
49
|
-
|
|
49
|
+
listSeriesNoValue: "-",
|
|
50
|
+
listSeriesEveryDays: "Every {interval} days",
|
|
51
|
+
listSeriesEveryWeeks: "Every {interval} weeks",
|
|
52
|
+
listSeriesEveryMonths: "Every {interval} months",
|
|
53
|
+
listSeriesEveryQuarters: "Every {interval} quarters",
|
|
54
|
+
listSeriesEveryYears: "Every {interval} years",
|
|
55
|
+
listSeriesMonthDay: "{cadence}, {day}",
|
|
56
|
+
listSeriesFirstDay: "first day",
|
|
57
|
+
listSeriesLastDay: "last day",
|
|
58
|
+
listSeriesNoNextInvoice: "None",
|
|
59
|
+
listDueToday: "Today",
|
|
60
|
+
listDueTomorrow: "Tomorrow",
|
|
50
61
|
listDayOverdue: "{days} day overdue",
|
|
51
62
|
listDaysOverdue: "{days} days overdue",
|
|
63
|
+
listOverdueAccessibleName: "{overdue}, due {date}",
|
|
64
|
+
listRecurringBadge: "Recurring",
|
|
52
65
|
unknownCustomer: "-",
|
|
53
66
|
notAvailable: "Not available",
|
|
54
67
|
summaryUnpaid: "Unpaid",
|