@tesouro/embedded-components-react 0.5.226 → 0.5.228
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +21 -21
- package/dist/index.d.ts +54 -34
- package/dist/index.js +1 -1
- package/dist/lib/ReceivablesWidget.d.ts +54 -34
- package/dist/lib/ReceivablesWidget.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/balances-widget/feature/dist/index3.js +41 -39
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/data-access/dist/index12.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/bank-accounts-widget/account-details/data-access/dist/index2.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/bank-accounts-widget/account-details/data-access/dist/index3.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/bank-accounts-widget/account-details/data-access/dist/index4.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/bank-accounts-widget/account-details/feature/dist/index9.js +150 -147
- package/dist/libs/tesouro-embedded-components-react/bank-accounts-widget/data-access/dist/index5.js +46 -51
- package/dist/libs/tesouro-embedded-components-react/bank-accounts-widget/feature/dist/index7.js +130 -128
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/data-access/dist/index18.js +31 -32
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/data-access/dist/index19.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/data-access/dist/index2.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/data-access/dist/index21.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/data-access/dist/index22.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/data-access/dist/index3.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/data-access/dist/index4.js +36 -37
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-upload/data-access/dist/index2.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-upload/feature/dist/index4.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bills-list/data-access/dist/index2.js +6 -10
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bills-list/data-access/dist/index3.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bills-list/data-access/dist/index4.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bills-list/data-access/dist/index5.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/card-details-widget/data-access/dist/index6.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/card-details-widget/data-access/dist/index7.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/card-details-widget/data-access/dist/index8.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/card-details-widget/feature/dist/index13.js +154 -150
- package/dist/libs/tesouro-embedded-components-react/cards-widget/create-card/data-access/dist/index7.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/cards-widget/data-access/dist/index2.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/cards-widget/data-access/dist/index3.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/cards-widget/feature/dist/index9.js +151 -149
- package/dist/libs/tesouro-embedded-components-react/counterparts-widget/data-access/dist/index2.js +4 -4
- package/dist/libs/tesouro-embedded-components-react/counterparts-widget/data-access/dist/index3.js +4 -4
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/data-access/dist/index15.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/data-access/dist/index17.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/data-access/dist/index18.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/data-access/dist/index19.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/data-access/dist/index2.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/data-access/dist/index3.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/data-access/dist/index4.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/data-access/dist/index5.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/data-access/dist/index6.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/data-access/dist/index8.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/data-access/dist/index9.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/feature/dist/index24.js +1 -0
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/feature/dist/index27.js +89 -87
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/feature/dist/index5.js +133 -130
- package/dist/libs/tesouro-embedded-components-react/insights-widget/feature/dist/index8.js +36 -34
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/data-access/dist/index.js +4 -4
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/data-access/dist/index10.js +33 -63
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/data-access/dist/index11.js +6 -6
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/data-access/dist/index12.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/data-access/dist/index3.js +40 -39
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index12.js +36 -141
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index13.js +26 -16
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index17.js +58 -37
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index18.js +228 -122
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index19.js +300 -147
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index20.js +34 -37
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index21.js +126 -122
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index22.js +150 -58
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index23.js +38 -91
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index24.js +113 -107
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index25.js +98 -231
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index26.js +111 -27
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index27.js +25 -624
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index28.js +631 -39
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index29.js +41 -40
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index30.js +35 -74
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index31.js +73 -115
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index32.js +115 -313
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index33.js +325 -0
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index7.js +15 -2
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index.js +11 -12
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index14.js +42 -1
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index15.js +19 -3
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index16.js +73 -3
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index17.js +3 -1
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index18.js +16 -1
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index19.js +32 -4
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index20.js +304 -11
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index22.js +42 -258
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index23.js +62 -38
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index24.js +485 -61
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index25.js +90 -480
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index27.js +2 -0
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index28.js +3 -1
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index29.js +0 -3
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index30.js +100 -1
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index31.js +23 -95
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index32.js +231 -23
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index33.js +3 -236
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index34.js +249 -3
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index35.js +78 -234
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index36.js +53 -87
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index37.js +343 -49
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index4.js +29 -20
- package/dist/libs/tesouro-embedded-components-react/linked-accounts-widget/data-access/dist/index4.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/linked-accounts-widget/feature/dist/index9.js +209 -207
- package/dist/libs/tesouro-embedded-components-react/remote-check-capture/data-access/dist/index4.js +10 -5
- package/dist/libs/tesouro-embedded-components-react/remote-check-capture/data-access/dist/index5.js +10 -5
- package/dist/libs/tesouro-embedded-components-react/remote-check-capture/data-access/dist/index6.js +11 -6
- package/dist/libs/tesouro-embedded-components-react/settings-widget/invoice-settings/data-access/dist/index2.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/settings-widget/invoice-settings/data-access/dist/index3.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/settings-widget/profile/data-access/dist/index2.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/settings-widget/team/data-access/dist/index12.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/settings-widget/team/data-access/dist/index13.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/settings-widget/team/data-access/dist/index14.js +30 -28
- package/dist/libs/tesouro-embedded-components-react/settings-widget/team/data-access/dist/index17.js +28 -26
- package/dist/libs/tesouro-embedded-components-react/settings-widget/team/data-access/dist/index18.js +37 -34
- package/dist/libs/tesouro-embedded-components-react/settings-widget/team/data-access/dist/index21.js +28 -26
- package/dist/libs/tesouro-embedded-components-react/settings-widget/team/data-access/dist/index22.js +37 -34
- package/dist/libs/tesouro-embedded-components-react/settings-widget/team/feature/dist/index17.js +294 -292
- package/dist/libs/tesouro-embedded-components-react/settings-widget/team/feature/dist/index5.js +58 -58
- package/dist/libs/tesouro-embedded-components-react/shared/approval-policy/data-access/dist/lib/approvalPoliciesApi.js +47 -48
- package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/data-access/dist/index3.js +4 -4
- package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/data-access/dist/index5.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/data-access/dist/index7.js +4 -4
- package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/index.js +4 -3
- package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/EmbedApiContext.js +14 -13
- package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/allPages.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/applicationStatusQueryOptions.js +16 -15
- package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/bank-account/useAllBankAccountsQuery.js +7 -5
- package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/debit-card/useAllDebitCardsQuery.js +7 -5
- package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/disclosures/useDisclosuresQuery.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/external-bank-account/useAllExternalBankAccountsQuery.js +7 -5
- package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/merchant-category-group/useAllMerchantCategoryGroupsQuery.js +28 -29
- package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/organizationStatus.js +10 -0
- package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/reference-data/useLedgerAccountsQuery.js +26 -27
- package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/reference-data/usePaymentTermsQuery.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/rest/@tanstack/react-query.gen.js +189 -211
- package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/rest/sdk.gen.js +43 -59
- package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/role/useAllOrganizationRolesQuery.js +31 -32
- package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/role/useRolePermissionsQueries.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/useCurrentUserQuery.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/useGetUserDataQuery.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/useMailboxAddress.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/useMyEntityQuery.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/user/useAllOrganizationUsersQuery.js +33 -34
- package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/withAuthEpoch.js +33 -22
- package/dist/libs/tesouro-embedded-components-react/shared/expense-requirements/data-access/dist/index3.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/WidgetProvider/RootWidgetProvider.js +43 -32
- package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/WidgetProvider/WidgetProvider.js +138 -127
- package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/WidgetProvider/deriveOrganizationStatus.js +6 -0
- package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/WidgetProvider/useWidgetFetch.js +1 -1
- 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/data-access/dist/index10.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/shared/product-catalog/data-access/dist/index2.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/shared/product-catalog/data-access/dist/index3.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/shared/product-catalog/data-access/dist/index4.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/shared/product-catalog/data-access/dist/index9.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/transfers-widget/data-access/dist/index6.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/transfers-widget/feature/dist/index6.js +60 -58
- package/package.json +1 -1
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index26.js +0 -106
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index38.js +0 -353
package/dist/libs/tesouro-embedded-components-react/invoicing-widget/data-access/dist/index10.js
CHANGED
|
@@ -2,98 +2,68 @@
|
|
|
2
2
|
"use client";
|
|
3
3
|
"use client";
|
|
4
4
|
"use client";
|
|
5
|
-
import {
|
|
6
|
-
import { withAuthEpoch as
|
|
7
|
-
import { useEmbedApi as
|
|
8
|
-
import { organizationHeaders as
|
|
5
|
+
import { getReceivablesIdOptions as e, getReceivablesIdPdfLinkOptions as t, getReceivablesOptions as n, getReceivablesRequiredFieldsOptions as r } from "../../../shared/data-access/dist/lib/rest/@tanstack/react-query.gen.js";
|
|
6
|
+
import { withAuthEpoch as i } from "../../../shared/data-access/dist/lib/withAuthEpoch.js";
|
|
7
|
+
import { useEmbedApi as a } from "../../../shared/data-access/dist/lib/EmbedApiContext.js";
|
|
8
|
+
import { organizationHeaders as o } from "../../../shared/data-access/dist/lib/organizationHeaders.js";
|
|
9
9
|
import "../../../shared/data-access/dist/index.js";
|
|
10
|
-
import { useQuery as
|
|
10
|
+
import { useQuery as s } from "@tanstack/react-query";
|
|
11
11
|
//#region ../../libs/tesouro-embedded-components-react/invoicing-widget/data-access/dist/index10.js
|
|
12
|
-
function
|
|
13
|
-
let { client:
|
|
14
|
-
client:
|
|
15
|
-
headers: c
|
|
12
|
+
function c({ enabled: e, ...t } = {}) {
|
|
13
|
+
let { client: r, organizationId: c, widgetToken: l, authEpoch: u, organizationStatus: d } = a(), f = !!(c && l) && (e === !0 || e === void 0), p = n({
|
|
14
|
+
client: r,
|
|
15
|
+
headers: o(c),
|
|
16
16
|
query: t
|
|
17
17
|
});
|
|
18
|
-
return
|
|
19
|
-
...
|
|
18
|
+
return s({
|
|
19
|
+
...i(p, {
|
|
20
20
|
authEpoch: u,
|
|
21
|
-
|
|
21
|
+
organizationStatus: d
|
|
22
22
|
}, { carryWithinOrg: !0 }),
|
|
23
23
|
enabled: f
|
|
24
24
|
});
|
|
25
25
|
}
|
|
26
|
-
function
|
|
27
|
-
let { client: r, organizationId:
|
|
26
|
+
function l(t, { enabled: n = !0 } = {}) {
|
|
27
|
+
let { client: r, organizationId: c, widgetToken: l, authEpoch: u, organizationStatus: d } = a(), f = !!(c && l && t) && n, p = e({
|
|
28
28
|
client: r,
|
|
29
|
-
headers: c
|
|
30
|
-
path: { receivable_id:
|
|
29
|
+
headers: o(c),
|
|
30
|
+
path: { receivable_id: t ?? "" }
|
|
31
31
|
});
|
|
32
|
-
return
|
|
33
|
-
...
|
|
32
|
+
return s({
|
|
33
|
+
...i(p, {
|
|
34
34
|
authEpoch: u,
|
|
35
|
-
|
|
35
|
+
organizationStatus: d
|
|
36
36
|
}),
|
|
37
37
|
enabled: f
|
|
38
38
|
});
|
|
39
39
|
}
|
|
40
|
-
function
|
|
41
|
-
let { client: n, organizationId:
|
|
40
|
+
function u({ enabled: e, ...t } = {}) {
|
|
41
|
+
let { client: n, organizationId: c, widgetToken: l, authEpoch: u, organizationStatus: d } = a(), f = !!(c && l) && (e === !0 || e === void 0), p = r({
|
|
42
42
|
client: n,
|
|
43
|
-
headers: c
|
|
43
|
+
headers: o(c),
|
|
44
44
|
query: t
|
|
45
45
|
});
|
|
46
|
-
return
|
|
47
|
-
...
|
|
46
|
+
return s({
|
|
47
|
+
...i(p, {
|
|
48
48
|
authEpoch: u,
|
|
49
|
-
|
|
49
|
+
organizationStatus: d
|
|
50
50
|
}),
|
|
51
51
|
enabled: f
|
|
52
52
|
});
|
|
53
53
|
}
|
|
54
|
-
function
|
|
55
|
-
let { client:
|
|
56
|
-
client:
|
|
57
|
-
headers: c
|
|
58
|
-
path: { receivable_id: t ?? "" },
|
|
59
|
-
query: r
|
|
60
|
-
});
|
|
61
|
-
return l({
|
|
62
|
-
...o(m, {
|
|
63
|
-
authEpoch: d,
|
|
64
|
-
organizationPending: f
|
|
65
|
-
}),
|
|
66
|
-
enabled: p
|
|
67
|
-
});
|
|
68
|
-
}
|
|
69
|
-
function m(e, { enabled: n, ...r } = {}) {
|
|
70
|
-
let { client: i, organizationId: a, widgetToken: u, authEpoch: d, organizationPending: f } = s(), p = !!(a && u && e) && (n === !0 || n === void 0), m = t({
|
|
71
|
-
client: i,
|
|
72
|
-
headers: c(a),
|
|
73
|
-
path: { receivable_id: e ?? "" },
|
|
74
|
-
query: r
|
|
75
|
-
});
|
|
76
|
-
return l({
|
|
77
|
-
...o(m, {
|
|
78
|
-
authEpoch: d,
|
|
79
|
-
organizationPending: f
|
|
80
|
-
}),
|
|
81
|
-
enabled: p
|
|
82
|
-
});
|
|
83
|
-
}
|
|
84
|
-
function h(e, { enabled: t = !0 } = {}) {
|
|
85
|
-
let { client: n, organizationId: i, widgetToken: a, authEpoch: u, organizationPending: d } = s(), f = !!(i && a && e) && t, p = r({
|
|
86
|
-
client: n,
|
|
87
|
-
headers: c(i),
|
|
54
|
+
function d(e, { enabled: n = !0 } = {}) {
|
|
55
|
+
let { client: r, organizationId: c, widgetToken: l, authEpoch: u, organizationStatus: d } = a(), f = !!(c && l && e) && n, p = t({
|
|
56
|
+
client: r,
|
|
57
|
+
headers: o(c),
|
|
88
58
|
path: { receivable_id: e ?? "" }
|
|
89
59
|
});
|
|
90
|
-
return
|
|
91
|
-
...
|
|
60
|
+
return s({
|
|
61
|
+
...i(p, {
|
|
92
62
|
authEpoch: u,
|
|
93
|
-
|
|
63
|
+
organizationStatus: d
|
|
94
64
|
}),
|
|
95
65
|
enabled: f
|
|
96
66
|
});
|
|
97
67
|
}
|
|
98
68
|
//#endregion
|
|
99
|
-
export {
|
|
69
|
+
export { d as useReceivablePdfLinkQuery, l as useReceivableQuery, u as useReceivableRequiredFieldsQuery, c as useReceivablesQuery };
|
package/dist/libs/tesouro-embedded-components-react/invoicing-widget/data-access/dist/index11.js
CHANGED
|
@@ -21,27 +21,27 @@ function v() {
|
|
|
21
21
|
};
|
|
22
22
|
}
|
|
23
23
|
function y({ enabled: e = !0 } = {}) {
|
|
24
|
-
let { client: t, organizationId: n, authEpoch: r,
|
|
24
|
+
let { client: t, organizationId: n, authEpoch: r, organizationStatus: i, isEnabled: o } = v(), c = a({
|
|
25
25
|
client: t,
|
|
26
26
|
headers: u(n)
|
|
27
27
|
});
|
|
28
28
|
return _({
|
|
29
29
|
...s(c, {
|
|
30
30
|
authEpoch: r,
|
|
31
|
-
|
|
31
|
+
organizationStatus: i
|
|
32
32
|
}),
|
|
33
33
|
enabled: o && e
|
|
34
34
|
});
|
|
35
35
|
}
|
|
36
36
|
function b({ enabled: e = !0 } = {}) {
|
|
37
|
-
let { client: t, organizationId: n, authEpoch: r,
|
|
37
|
+
let { client: t, organizationId: n, authEpoch: r, organizationStatus: a, isEnabled: o } = v(), c = i({
|
|
38
38
|
client: t,
|
|
39
39
|
headers: u(n)
|
|
40
40
|
});
|
|
41
41
|
return _({
|
|
42
42
|
...s(c, {
|
|
43
43
|
authEpoch: r,
|
|
44
|
-
|
|
44
|
+
organizationStatus: a
|
|
45
45
|
}),
|
|
46
46
|
enabled: o && e
|
|
47
47
|
});
|
|
@@ -105,7 +105,7 @@ async function C({ client: e, organizationId: t, recurrenceId: n, receivableId:
|
|
|
105
105
|
]);
|
|
106
106
|
}
|
|
107
107
|
function w(e) {
|
|
108
|
-
let { client: t, organizationId: n, authEpoch: r,
|
|
108
|
+
let { client: t, organizationId: n, authEpoch: r, organizationStatus: i, isEnabled: a } = v(), c = o({
|
|
109
109
|
client: t,
|
|
110
110
|
headers: u(n),
|
|
111
111
|
path: { recurrence_id: e ?? "" }
|
|
@@ -113,7 +113,7 @@ function w(e) {
|
|
|
113
113
|
return _({
|
|
114
114
|
...s(c, {
|
|
115
115
|
authEpoch: r,
|
|
116
|
-
|
|
116
|
+
organizationStatus: i
|
|
117
117
|
}),
|
|
118
118
|
enabled: a && !!e
|
|
119
119
|
});
|
package/dist/libs/tesouro-embedded-components-react/invoicing-widget/data-access/dist/index12.js
CHANGED
|
@@ -10,7 +10,7 @@ import "../../../shared/data-access/dist/index.js";
|
|
|
10
10
|
import { useQuery as i } from "@tanstack/react-query";
|
|
11
11
|
//#region ../../libs/tesouro-embedded-components-react/invoicing-widget/data-access/dist/index12.js
|
|
12
12
|
function a({ enabled: a = !0, ...o }) {
|
|
13
|
-
let { client: s, organizationId: c, widgetToken: l, authEpoch: u,
|
|
13
|
+
let { client: s, organizationId: c, widgetToken: l, authEpoch: u, organizationStatus: d } = n(), f = !!(c && l) && a, p = e({
|
|
14
14
|
client: s,
|
|
15
15
|
headers: r(c),
|
|
16
16
|
query: o
|
|
@@ -18,7 +18,7 @@ function a({ enabled: a = !0, ...o }) {
|
|
|
18
18
|
return i({
|
|
19
19
|
...t(p, {
|
|
20
20
|
authEpoch: u,
|
|
21
|
-
|
|
21
|
+
organizationStatus: d
|
|
22
22
|
}),
|
|
23
23
|
enabled: f
|
|
24
24
|
});
|
package/dist/libs/tesouro-embedded-components-react/invoicing-widget/data-access/dist/index3.js
CHANGED
|
@@ -4,81 +4,82 @@
|
|
|
4
4
|
"use client";
|
|
5
5
|
import { postBankDetails as e } from "../../../shared/data-access/dist/lib/rest/sdk.gen.js";
|
|
6
6
|
import { getBankDetailsOptions as t } from "../../../shared/data-access/dist/lib/rest/@tanstack/react-query.gen.js";
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
7
|
+
import { OrganizationStatus as n } from "../../../shared/data-access/dist/lib/organizationStatus.js";
|
|
8
|
+
import { withAuthEpoch as r } from "../../../shared/data-access/dist/lib/withAuthEpoch.js";
|
|
9
|
+
import { invalidateAllClients as i } from "../../../shared/data-access/dist/lib/clientRegistry.js";
|
|
10
|
+
import { useEmbedApi as a } from "../../../shared/data-access/dist/lib/EmbedApiContext.js";
|
|
11
|
+
import { organizationHeaders as o } from "../../../shared/data-access/dist/lib/organizationHeaders.js";
|
|
12
|
+
import { useAllBankAccountsQuery as s } from "../../../shared/data-access/dist/lib/bank-account/useAllBankAccountsQuery.js";
|
|
13
|
+
import { useAllExternalBankAccountsQuery as c } from "../../../shared/data-access/dist/lib/external-bank-account/useAllExternalBankAccountsQuery.js";
|
|
13
14
|
import "../../../shared/data-access/dist/index.js";
|
|
14
|
-
import { entityBankAccountsInvalidationKey as
|
|
15
|
-
import { useMemo as
|
|
16
|
-
import { useMutation as
|
|
15
|
+
import { entityBankAccountsInvalidationKey as l } from "./index2.js";
|
|
16
|
+
import { useMemo as u } from "react";
|
|
17
|
+
import { useMutation as d, useQuery as f } from "@tanstack/react-query";
|
|
17
18
|
//#region ../../libs/tesouro-embedded-components-react/invoicing-widget/data-access/dist/index3.js
|
|
18
|
-
function
|
|
19
|
-
let { client:
|
|
20
|
-
client:
|
|
21
|
-
headers:
|
|
19
|
+
function p({ enabled: e = !0 } = {}) {
|
|
20
|
+
let { client: n, organizationId: i, widgetToken: s, authEpoch: c, organizationStatus: l } = a(), u = t({
|
|
21
|
+
client: n,
|
|
22
|
+
headers: o(i)
|
|
22
23
|
});
|
|
23
|
-
return
|
|
24
|
-
...
|
|
24
|
+
return f({
|
|
25
|
+
...r(u, {
|
|
25
26
|
authEpoch: c,
|
|
26
|
-
|
|
27
|
+
organizationStatus: l
|
|
27
28
|
}),
|
|
28
|
-
enabled: e && !!(
|
|
29
|
+
enabled: e && !!(i && s)
|
|
29
30
|
});
|
|
30
31
|
}
|
|
31
|
-
function
|
|
32
|
-
let { client: t, organizationId: n } =
|
|
33
|
-
return
|
|
32
|
+
function m() {
|
|
33
|
+
let { client: t, organizationId: n } = a();
|
|
34
|
+
return d({
|
|
34
35
|
mutationFn: async ({ body: r }) => {
|
|
35
36
|
let { data: i } = await e({
|
|
36
37
|
client: t,
|
|
37
|
-
headers:
|
|
38
|
+
headers: o(n),
|
|
38
39
|
body: r,
|
|
39
40
|
throwOnError: !0
|
|
40
41
|
});
|
|
41
42
|
return i;
|
|
42
43
|
},
|
|
43
44
|
onSuccess: async () => {
|
|
44
|
-
await
|
|
45
|
+
await i(l({
|
|
45
46
|
client: t,
|
|
46
47
|
organizationId: n
|
|
47
48
|
}));
|
|
48
49
|
}
|
|
49
50
|
});
|
|
50
51
|
}
|
|
51
|
-
var
|
|
52
|
-
function
|
|
53
|
-
let { organizationId:
|
|
54
|
-
...(
|
|
52
|
+
var h = (e) => e ? e.slice(-4) : null;
|
|
53
|
+
function g({ enabled: e = !0, canReadEmbedded: t = !1, canReadExternal: r = !1 } = {}) {
|
|
54
|
+
let { organizationId: i, widgetToken: o, organizationStatus: l } = a(), d = l === n.Rotating, f = e && !!(o && (i || d)), m = f && t, g = f && r, _ = p({ enabled: e }), v = s({ enabled: m }), y = c({ enabled: g }), b = f ? _.data?.data : void 0, x = m ? v.data?.data : void 0, S = g ? y.data?.data : void 0, C = u(() => [
|
|
55
|
+
...(b ?? []).map((e) => ({
|
|
55
56
|
id: e.id,
|
|
56
57
|
type: "BANK_DETAILS",
|
|
57
58
|
displayName: e.display_name ?? null,
|
|
58
|
-
accountNumberLast4:
|
|
59
|
+
accountNumberLast4: h(e.account_number) ?? e.account_number_last4 ?? null
|
|
59
60
|
})),
|
|
60
|
-
...(
|
|
61
|
+
...(x ?? []).filter((e) => e.status === "ACTIVE").map((e) => ({
|
|
61
62
|
id: e.id,
|
|
62
63
|
type: "INTERNAL",
|
|
63
64
|
displayName: e.nickname ?? null,
|
|
64
|
-
accountNumberLast4:
|
|
65
|
+
accountNumberLast4: h(e.accountNumber)
|
|
65
66
|
})),
|
|
66
|
-
...(
|
|
67
|
+
...(S ?? []).filter((e) => e.accountStatus === "ACTIVE" && e.verificationStatus === "VERIFIED").map((e) => ({
|
|
67
68
|
id: e.id,
|
|
68
69
|
type: "EXTERNAL",
|
|
69
70
|
displayName: e.nickname || e.nameOnAccount || null,
|
|
70
|
-
accountNumberLast4:
|
|
71
|
+
accountNumberLast4: h(e.accountNumber)
|
|
71
72
|
}))
|
|
72
73
|
], [
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
]),
|
|
74
|
+
b,
|
|
75
|
+
x,
|
|
76
|
+
S
|
|
77
|
+
]), w = f && _.isLoading || m && v.isLoading || g && y.isLoading;
|
|
77
78
|
return {
|
|
78
|
-
paymentAccounts:
|
|
79
|
-
isLoading:
|
|
80
|
-
isIncomplete:
|
|
79
|
+
paymentAccounts: C,
|
|
80
|
+
isLoading: w,
|
|
81
|
+
isIncomplete: w || f && d || f && (_.isFetching || _.isError) || m && (v.isFetching || v.isError || v.hasNextPage) || g && (y.isFetching || y.isError || y.hasNextPage) || !!(f && _.data?.next_pagination_token)
|
|
81
82
|
};
|
|
82
83
|
}
|
|
83
84
|
//#endregion
|
|
84
|
-
export {
|
|
85
|
+
export { m as useCreateEntityBankAccountMutation, p as useEntityBankAccountsQuery, g as usePaymentAccountsQuery };
|
package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index12.js
CHANGED
|
@@ -84,13 +84,10 @@ function j(t, n) {
|
|
|
84
84
|
function M(e, t) {
|
|
85
85
|
return e.document_id || t.untitledDocument;
|
|
86
86
|
}
|
|
87
|
-
function N(e
|
|
88
|
-
return e === "quote" ? t.quoteType : e === "credit_note" ? t.creditNoteType : t.invoiceType;
|
|
89
|
-
}
|
|
90
|
-
function P(e) {
|
|
87
|
+
function N(e) {
|
|
91
88
|
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";
|
|
92
89
|
}
|
|
93
|
-
function
|
|
90
|
+
function P(e) {
|
|
94
91
|
let t = e.status === "draft", n = e.status === "issued", r = e.type === "invoice", i = e.type === "quote", a = e.type === "credit_note", o = r && [
|
|
95
92
|
"issued",
|
|
96
93
|
"overdue",
|
|
@@ -120,7 +117,7 @@ function F(e) {
|
|
|
120
117
|
].includes(e.status) && !a
|
|
121
118
|
};
|
|
122
119
|
}
|
|
123
|
-
function
|
|
120
|
+
function F({ receivables: e, messages: t }) {
|
|
124
121
|
return e.map((e) => {
|
|
125
122
|
let n = e.type === "invoice" ? e.amount_due : void 0;
|
|
126
123
|
return {
|
|
@@ -129,7 +126,7 @@ function I({ receivables: e, messages: t }) {
|
|
|
129
126
|
documentLabel: M(e, t),
|
|
130
127
|
customerLabel: e.counterpart_name || t.unknownCustomer,
|
|
131
128
|
status: e.status,
|
|
132
|
-
statusTone:
|
|
129
|
+
statusTone: N(e.status),
|
|
133
130
|
issueDateLabel: k(e.issue_date, t.notAvailable),
|
|
134
131
|
dueDateLabel: k(e.type === "quote" ? e.expiry_date : e.due_date, t.notAvailable),
|
|
135
132
|
totalLabel: A({
|
|
@@ -142,119 +139,17 @@ function I({ receivables: e, messages: t }) {
|
|
|
142
139
|
currency: e.currency,
|
|
143
140
|
fallback: t.notAvailable
|
|
144
141
|
}),
|
|
145
|
-
actions:
|
|
142
|
+
actions: P(e)
|
|
146
143
|
};
|
|
147
144
|
});
|
|
148
145
|
}
|
|
149
|
-
function
|
|
150
|
-
if (
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
id: e.id,
|
|
154
|
-
type: e.type,
|
|
155
|
-
title: M(e, i),
|
|
156
|
-
customerLabel: e.counterpart_name || i.unknownCustomer,
|
|
157
|
-
status: e.status,
|
|
158
|
-
statusTone: P(e.status),
|
|
159
|
-
totalLabel: A({
|
|
160
|
-
amount: e.total_amount,
|
|
161
|
-
currency: e.currency,
|
|
162
|
-
fallback: i.notAvailable
|
|
163
|
-
}),
|
|
164
|
-
amountDueLabel: A({
|
|
165
|
-
amount: a,
|
|
166
|
-
currency: e.currency,
|
|
167
|
-
fallback: i.notAvailable
|
|
168
|
-
}),
|
|
169
|
-
pdfUrl: r || e.file_url || e.original_file_url || void 0,
|
|
170
|
-
summaryItems: [
|
|
171
|
-
{
|
|
172
|
-
label: i.summaryDocumentType,
|
|
173
|
-
value: N(e.type, i)
|
|
174
|
-
},
|
|
175
|
-
{
|
|
176
|
-
label: i.summaryDocumentNumber,
|
|
177
|
-
value: M(e, i)
|
|
178
|
-
},
|
|
179
|
-
{
|
|
180
|
-
label: i.summaryCustomer,
|
|
181
|
-
value: e.counterpart_name || i.unknownCustomer
|
|
182
|
-
},
|
|
183
|
-
{
|
|
184
|
-
label: i.summaryIssued,
|
|
185
|
-
value: k(e.issue_date, i.notAvailable)
|
|
186
|
-
},
|
|
187
|
-
{
|
|
188
|
-
label: i.summaryDue,
|
|
189
|
-
value: k(o, i.notAvailable)
|
|
190
|
-
},
|
|
191
|
-
{
|
|
192
|
-
label: i.summaryCreated,
|
|
193
|
-
value: k(e.created_at, i.notAvailable)
|
|
194
|
-
},
|
|
195
|
-
{
|
|
196
|
-
label: i.summaryUpdated,
|
|
197
|
-
value: k(e.updated_at, i.notAvailable)
|
|
198
|
-
},
|
|
199
|
-
{
|
|
200
|
-
label: i.summaryTotal,
|
|
201
|
-
value: A({
|
|
202
|
-
amount: e.total_amount,
|
|
203
|
-
currency: e.currency,
|
|
204
|
-
fallback: i.notAvailable
|
|
205
|
-
})
|
|
206
|
-
},
|
|
207
|
-
{
|
|
208
|
-
label: i.summaryAmountDue,
|
|
209
|
-
value: A({
|
|
210
|
-
amount: a,
|
|
211
|
-
currency: e.currency,
|
|
212
|
-
fallback: i.notAvailable
|
|
213
|
-
})
|
|
214
|
-
}
|
|
215
|
-
],
|
|
216
|
-
lineItems: e.line_items.map((t, n) => ({
|
|
217
|
-
id: t.product.id || String(n),
|
|
218
|
-
name: t.product.name,
|
|
219
|
-
quantityLabel: String(t.quantity),
|
|
220
|
-
unitPriceLabel: A({
|
|
221
|
-
amount: t.product.price?.value,
|
|
222
|
-
currency: t.product.price?.currency || e.currency,
|
|
223
|
-
fallback: i.notAvailable
|
|
224
|
-
}),
|
|
225
|
-
totalLabel: A({
|
|
226
|
-
amount: t.total_after_tax ?? t.total_before_tax,
|
|
227
|
-
currency: e.currency,
|
|
228
|
-
fallback: i.notAvailable
|
|
229
|
-
})
|
|
230
|
-
})),
|
|
231
|
-
activityItems: t.map((e) => ({
|
|
232
|
-
id: e.id,
|
|
233
|
-
title: R(e.event_type, i),
|
|
234
|
-
description: e.event_type,
|
|
235
|
-
timestampLabel: k(e.timestamp, i.notAvailable)
|
|
236
|
-
})),
|
|
237
|
-
mailItems: n.map((e) => ({
|
|
238
|
-
id: e.id,
|
|
239
|
-
statusLabel: e.status,
|
|
240
|
-
recipientsLabel: z(e, i),
|
|
241
|
-
sentAtLabel: k(e.created_at, i.notAvailable)
|
|
242
|
-
})),
|
|
243
|
-
actions: F(e)
|
|
146
|
+
function I(e) {
|
|
147
|
+
if (e.memo || e.footer) return {
|
|
148
|
+
opening: e.memo || void 0,
|
|
149
|
+
closing: e.footer || void 0
|
|
244
150
|
};
|
|
245
151
|
}
|
|
246
|
-
function
|
|
247
|
-
return e === "status_changed" ? t.activityStatusChanged : e === "receivable_created" ? t.activityReceivableCreated : e === "receivable_updated" ? t.activityReceivableUpdated : e === "payment_received" ? t.activityPaymentReceived : e === "mail_sent" ? t.activityMailSent : t.activityUnknown;
|
|
248
|
-
}
|
|
249
|
-
function z(e, t) {
|
|
250
|
-
let n = [
|
|
251
|
-
...e.recipients?.to ?? [],
|
|
252
|
-
...e.recipients?.cc ?? [],
|
|
253
|
-
...e.recipients?.bcc ?? []
|
|
254
|
-
].map((e) => e.email).filter(Boolean);
|
|
255
|
-
return n.length > 0 ? n.join(", ") : t.recipientsNone;
|
|
256
|
-
}
|
|
257
|
-
function B({ values: e, billingAddressId: t, messages: n, willIssue: r = !1, hasStartedRecurrence: i = !1 }) {
|
|
152
|
+
function L({ values: e, billingAddressId: t, messages: n, willIssue: r = !1, hasStartedRecurrence: i = !1 }) {
|
|
258
153
|
let a = {};
|
|
259
154
|
e.customerId ? t || (a.customerId = n.customerAddressRequired) : a.customerId = n.customerRequired, e.currency || (a.currency = n.currencyRequired), r && !e.paymentTermsId && (a.paymentTermsId = n.paymentTermsRequired), r && !e.bankAccountId && (a.bankAccountId = n.bankAccountRequired);
|
|
260
155
|
let o = u(e.lineItems, {
|
|
@@ -266,24 +161,24 @@ function B({ values: e, billingAddressId: t, messages: n, willIssue: r = !1, has
|
|
|
266
161
|
let l = b(e, n);
|
|
267
162
|
return l && (a.discount = l), a;
|
|
268
163
|
}
|
|
269
|
-
function
|
|
164
|
+
function R(e) {
|
|
270
165
|
return Object.keys(e).length > 0;
|
|
271
166
|
}
|
|
272
|
-
function
|
|
273
|
-
return !
|
|
274
|
-
values:
|
|
167
|
+
function z(e, t) {
|
|
168
|
+
return !R(L({
|
|
169
|
+
values: H(e),
|
|
275
170
|
billingAddressId: e.type === "invoice" ? e.counterpart_billing_address?.id ?? void 0 : void 0,
|
|
276
171
|
messages: t,
|
|
277
172
|
willIssue: !0
|
|
278
173
|
}));
|
|
279
174
|
}
|
|
280
|
-
function
|
|
175
|
+
function B({ bankAccountId: e, bankAccountType: t }) {
|
|
281
176
|
return {
|
|
282
177
|
bank_account_id: e || void 0,
|
|
283
178
|
bank_account_type: e && t || void 0
|
|
284
179
|
};
|
|
285
180
|
}
|
|
286
|
-
function
|
|
181
|
+
function V({ values: e, billingAddressId: t, unitNamesById: n }) {
|
|
287
182
|
let i = e.lineItems.filter((e) => !r(e)).map((t) => a({
|
|
288
183
|
lineItem: t,
|
|
289
184
|
currency: e.currency,
|
|
@@ -297,7 +192,7 @@ function W({ values: e, billingAddressId: t, unitNamesById: n }) {
|
|
|
297
192
|
memo: e.openingNote,
|
|
298
193
|
footer: e.closingNote,
|
|
299
194
|
discount: v(e) ?? void 0,
|
|
300
|
-
...
|
|
195
|
+
...B(e)
|
|
301
196
|
};
|
|
302
197
|
return e.type === "quote" ? {
|
|
303
198
|
...o,
|
|
@@ -312,7 +207,7 @@ function W({ values: e, billingAddressId: t, unitNamesById: n }) {
|
|
|
312
207
|
type: "invoice"
|
|
313
208
|
};
|
|
314
209
|
}
|
|
315
|
-
function
|
|
210
|
+
function H(e, t) {
|
|
316
211
|
let r = e.type === "quote" ? "quote" : "invoice", i = l(e.line_items), a = e.type === "invoice" ? e : void 0, o = e.line_items.map((n) => s({
|
|
317
212
|
lineItem: n,
|
|
318
213
|
currency: e.currency,
|
|
@@ -323,8 +218,8 @@ function G(e, t) {
|
|
|
323
218
|
type: r,
|
|
324
219
|
customerId: e.counterpart_id,
|
|
325
220
|
currency: e.currency,
|
|
326
|
-
issueDate:
|
|
327
|
-
dueDate: e.type === "quote" ?
|
|
221
|
+
issueDate: q(e.issue_date),
|
|
222
|
+
dueDate: e.type === "quote" ? q(e.expiry_date) : "",
|
|
328
223
|
openingNote: e.memo ?? "",
|
|
329
224
|
closingNote: e.footer ?? "",
|
|
330
225
|
...e.type === "invoice" ? g(e.payment_terms) : {},
|
|
@@ -333,16 +228,16 @@ function G(e, t) {
|
|
|
333
228
|
...y(e.discount, e.currency),
|
|
334
229
|
lineItems: o.length > 0 ? o : [n(e.currency)],
|
|
335
230
|
bankAccountId: e.bank_account_id ?? "",
|
|
336
|
-
bankAccountType:
|
|
231
|
+
bankAccountType: U(e.bank_account_type),
|
|
337
232
|
paymentReminderId: a?.payment_reminder_id ?? "",
|
|
338
233
|
overdueReminderId: a?.overdue_reminder_id ?? "",
|
|
339
234
|
attachments: f(e)
|
|
340
235
|
};
|
|
341
236
|
}
|
|
342
|
-
function
|
|
237
|
+
function U(e) {
|
|
343
238
|
return e === "BANK_DETAILS" || e === "INTERNAL" || e === "EXTERNAL" ? e : "";
|
|
344
239
|
}
|
|
345
|
-
function
|
|
240
|
+
function W({ values: e, billingAddressId: t, lineItemChanges: n }) {
|
|
346
241
|
let r = {
|
|
347
242
|
counterpart_billing_address_id: t,
|
|
348
243
|
counterpart_id: e.customerId,
|
|
@@ -351,7 +246,7 @@ function q({ values: e, billingAddressId: t, lineItemChanges: n }) {
|
|
|
351
246
|
memo: e.openingNote,
|
|
352
247
|
footer: e.closingNote,
|
|
353
248
|
discount: v(e),
|
|
354
|
-
...
|
|
249
|
+
...B(e)
|
|
355
250
|
};
|
|
356
251
|
return e.type === "quote" ? { quote: {
|
|
357
252
|
...r,
|
|
@@ -367,7 +262,7 @@ function q({ values: e, billingAddressId: t, lineItemChanges: n }) {
|
|
|
367
262
|
attachments: d(e.attachments) ?? null
|
|
368
263
|
} };
|
|
369
264
|
}
|
|
370
|
-
function
|
|
265
|
+
function G({ values: e, originalLineItems: t, originalCurrency: n, unitNamesById: a, units: c }) {
|
|
371
266
|
let u = l(t), d = i(e.taxRate, u), f = (e, t, n) => o({
|
|
372
267
|
lineItem: e,
|
|
373
268
|
currency: t,
|
|
@@ -393,7 +288,7 @@ function J({ values: e, originalLineItems: t, originalCurrency: n, unitNamesById
|
|
|
393
288
|
...v.length ? { remove: v } : {}
|
|
394
289
|
};
|
|
395
290
|
}
|
|
396
|
-
function
|
|
291
|
+
function K({ values: e, originalLineItems: t, changes: n }) {
|
|
397
292
|
let i = e.lineItems.filter((e) => !r(e)).map((e) => e.id);
|
|
398
293
|
if (!t) return { created: i };
|
|
399
294
|
let a = new Set(t.map((e) => e.id));
|
|
@@ -402,20 +297,20 @@ function Y({ values: e, originalLineItems: t, changes: n }) {
|
|
|
402
297
|
replaced: n?.replace?.map((e) => e.id) ?? []
|
|
403
298
|
};
|
|
404
299
|
}
|
|
405
|
-
function
|
|
300
|
+
function q(e) {
|
|
406
301
|
return e?.slice(0, 10) ?? "";
|
|
407
302
|
}
|
|
408
|
-
function
|
|
303
|
+
function J(e, t) {
|
|
409
304
|
let n = {};
|
|
410
305
|
return e.to.trim() || (n.to = t.sendToRequired), e.subject.trim() || (n.subject = t.sendSubjectRequired), e.body.trim() || (n.body = t.sendBodyRequired), n;
|
|
411
306
|
}
|
|
412
|
-
function
|
|
307
|
+
function Y(e) {
|
|
413
308
|
return Object.keys(e).length > 0;
|
|
414
309
|
}
|
|
415
|
-
function
|
|
310
|
+
function X(e) {
|
|
416
311
|
return e.split(",").map((e) => e.trim()).filter(Boolean);
|
|
417
312
|
}
|
|
418
|
-
function
|
|
313
|
+
function Z(e, t, n) {
|
|
419
314
|
let r = {};
|
|
420
315
|
if (e.mode === "partial") {
|
|
421
316
|
let i = j(e.amountPaid, n);
|
|
@@ -423,10 +318,10 @@ function ee(e, t, n) {
|
|
|
423
318
|
}
|
|
424
319
|
return r;
|
|
425
320
|
}
|
|
426
|
-
function
|
|
321
|
+
function Q(e) {
|
|
427
322
|
return Object.keys(e).length > 0;
|
|
428
323
|
}
|
|
429
|
-
function
|
|
324
|
+
function $(e, t) {
|
|
430
325
|
return {
|
|
431
326
|
...S,
|
|
432
327
|
to: e?.counterpart_contact?.email ?? "",
|
|
@@ -434,13 +329,13 @@ function ne(e, t) {
|
|
|
434
329
|
body: t.sendBodyDefault
|
|
435
330
|
};
|
|
436
331
|
}
|
|
437
|
-
function
|
|
332
|
+
function ee() {
|
|
438
333
|
return {
|
|
439
334
|
...C,
|
|
440
335
|
paidAt: (/* @__PURE__ */ new Date()).toISOString().slice(0, 10)
|
|
441
336
|
};
|
|
442
337
|
}
|
|
443
|
-
function
|
|
338
|
+
function te(e = "all") {
|
|
444
339
|
let t = [
|
|
445
340
|
"draft",
|
|
446
341
|
"issued",
|
|
@@ -461,4 +356,4 @@ function ie(e = "all") {
|
|
|
461
356
|
}));
|
|
462
357
|
}
|
|
463
358
|
//#endregion
|
|
464
|
-
export { C as EMPTY_RECEIVABLE_PAYMENT_VALUES, S as EMPTY_RECEIVABLE_SEND_VALUES,
|
|
359
|
+
export { C as EMPTY_RECEIVABLE_PAYMENT_VALUES, S as EMPTY_RECEIVABLE_SEND_VALUES, P as buildReceivableActions, I as buildReceivableNotesView, F as buildReceivableRows, D as coerceEnabledTabs, w as createEmptyReceivableFormValues, n as createLineItem, ee as defaultPaymentValues, $ as defaultSendValues, k as formatDate, A as formatMoney, j as fromMajorUnits, M as getDocumentTitle, N as getStatusTone, Q as hasPaymentErrors, R as hasReceivableFormErrors, Y as hasSendErrors, z as isReceivableReadyToIssue, V as receivableFormValuesToCreatePayload, G as receivableFormValuesToLineItemChanges, W as receivableFormValuesToUpdatePayload, H as receivableToFormValues, O as resolveInitialTab, X as splitEmailList, te as statusFilterOptions, K as submittedLineItemRows, E as tabForType, T as typeForTab, Z as validatePaymentValues, L as validateReceivableForm, J as validateSendValues };
|