@tesouro/embedded-components-react 0.5.278 → 0.5.280
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.d.ts +21 -6
- package/dist/lib/ReceivablesWidget.d.ts +21 -6
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/data-access/dist/index.js +14 -13
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/data-access/dist/index10.js +24 -168
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/data-access/dist/index11.js +173 -44
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/data-access/dist/index12.js +42 -94
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/data-access/dist/index13.js +91 -76
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/data-access/dist/index14.js +67 -173
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/data-access/dist/index15.js +186 -17
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/data-access/dist/index16.js +27 -0
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/data-access/dist/index3.js +11 -13
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/data-access/dist/index4.js +42 -27
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/data-access/dist/index5.js +28 -132
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/data-access/dist/index6.js +137 -16
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/data-access/dist/index7.js +16 -62
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/data-access/dist/index8.js +66 -28
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/data-access/dist/index9.js +28 -34
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/ReceivableAttachmentsSection.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/ReceivableCustomerSection.js +38 -0
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/ReceivablesWidget.js +304 -287
- 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/customer.js +58 -0
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/helpers.js +15 -15
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/labels.js +14 -6
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/paymentTerms.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/permissions.js +2 -1
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/preview.js +62 -62
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/recurrence.js +41 -35
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/reminders.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/totals.js +21 -13
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/useReceivableActions.js +124 -124
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/useReceivableActionsModal.js +11 -11
- 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/useReceivableCustomerPicker.js +109 -0
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/useReceivableDetails.js +6 -6
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/useReceivableForm.js +520 -476
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/useReceivableIssuePreflight.js +10 -10
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/useReceivablePaymentRecord.js +6 -6
- 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/useReceivablePreview.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/useReceivableRecurrence.js +92 -77
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/useReceivableReminders.js +11 -11
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/useReceivableStatusCards.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/useReceivablesTable.js +4 -4
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/useReceivablesWidget.js +79 -75
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/useSendReceivableWithPaymentLink.js +3 -3
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index.js +26 -23
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index12.js +9 -25
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index13.js +26 -228
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index14.js +227 -52
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index15.js +50 -212
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index16.js +193 -138
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index17.js +157 -12
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index18.js +10 -19
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index19.js +23 -2
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index20.js +2 -116
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index21.js +118 -3
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index22.js +3 -39
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index23.js +209 -53
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index24.js +2 -23
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index25.js +36 -7
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index26.js +53 -77
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index27.js +17 -35
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index28.js +8 -18
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index29.js +73 -37
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index30.js +36 -26
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index31.js +17 -19
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index32.js +39 -8
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index33.js +26 -33
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index34.js +20 -14
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index35.js +8 -24
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index36.js +34 -84
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index37.js +14 -492
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index38.js +28 -2
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index39.js +79 -39
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index40.js +490 -68
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index41.js +2 -487
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index42.js +41 -217
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index43.js +70 -21
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index44.js +440 -5
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index45.js +224 -0
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index46.js +21 -263
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index47.js +8 -2
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index49.js +261 -24
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index50.js +2 -237
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index51.js +100 -3
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index52.js +21 -242
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index53.js +226 -82
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index54.js +3 -60
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index55.js +233 -178
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index56.js +85 -37
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index57.js +60 -0
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index58.js +194 -0
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index59.js +45 -0
- package/dist/libs/tesouro-embedded-components-react/linked-accounts-widget/feature/dist/lib/useLinkedAccountsWidget.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index503.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/feature/dist/index.js +9 -9
- package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/feature/dist/lib/CounterpartSelector.js +2 -23
- package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/feature/dist/lib/useCounterpartSelector.js +2 -51
- package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/ui/dist/index.js +8 -8
- package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/ui/dist/index15.js +4 -80
- package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/ui/dist/index2.js +10 -22
- 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/util/dist/lib/widgetDomEvents.js +1 -1
- package/package.json +1 -1
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index48.js +0 -100
package/dist/libs/tesouro-embedded-components-react/invoicing-widget/data-access/dist/index6.js
CHANGED
|
@@ -2,23 +2,144 @@
|
|
|
2
2
|
"use client";
|
|
3
3
|
"use client";
|
|
4
4
|
"use client";
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
5
|
+
import { postBankDetails as e } from "../../../shared/data-access/dist/lib/rest/sdk.gen.js";
|
|
6
|
+
import { getBankAccountOptions as t, getBankDetailsIdOptions as n, getBankDetailsOptions as r, getExternalBankAccountOptions as i } from "../../../shared/data-access/dist/lib/rest/@tanstack/react-query.gen.js";
|
|
7
|
+
import { OrganizationStatus as a } from "../../../shared/data-access/dist/lib/organizationStatus.js";
|
|
8
|
+
import { withAuthEpoch as o } from "../../../shared/data-access/dist/lib/withAuthEpoch.js";
|
|
9
|
+
import { invalidateAllClients as s } from "../../../shared/data-access/dist/lib/clientRegistry.js";
|
|
10
|
+
import { useEmbedApi as c } from "../../../shared/data-access/dist/lib/EmbedApiContext.js";
|
|
11
|
+
import { organizationHeaders as l } from "../../../shared/data-access/dist/lib/organizationHeaders.js";
|
|
12
|
+
import { useAllBankAccountsQuery as u } from "../../../shared/data-access/dist/lib/bank-account/useAllBankAccountsQuery.js";
|
|
13
|
+
import { useAllExternalBankAccountsQuery as d } from "../../../shared/data-access/dist/lib/external-bank-account/useAllExternalBankAccountsQuery.js";
|
|
8
14
|
import "../../../shared/data-access/dist/index.js";
|
|
9
|
-
import {
|
|
15
|
+
import { entityBankAccountsInvalidationKey as f } from "./index2.js";
|
|
16
|
+
import { useMemo as p } from "react";
|
|
17
|
+
import { useMutation as m, useQuery as h } from "@tanstack/react-query";
|
|
10
18
|
//#region ../../libs/tesouro-embedded-components-react/invoicing-widget/data-access/dist/index6.js
|
|
11
|
-
function
|
|
12
|
-
let { client:
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
19
|
+
function g({ enabled: e = !0 } = {}) {
|
|
20
|
+
let { client: t, organizationId: n, widgetToken: i, authEpoch: a, organizationStatus: s } = c(), u = r({
|
|
21
|
+
client: t,
|
|
22
|
+
headers: l(n)
|
|
23
|
+
});
|
|
24
|
+
return h({
|
|
25
|
+
...o(u, {
|
|
26
|
+
authEpoch: a,
|
|
27
|
+
organizationStatus: s
|
|
28
|
+
}),
|
|
29
|
+
enabled: e && !!(n && i)
|
|
30
|
+
});
|
|
31
|
+
}
|
|
32
|
+
function _() {
|
|
33
|
+
let { client: t, organizationId: n } = c();
|
|
34
|
+
return m({
|
|
35
|
+
mutationFn: async ({ body: r }) => {
|
|
36
|
+
let { data: i } = await e({
|
|
37
|
+
client: t,
|
|
38
|
+
headers: l(n),
|
|
39
|
+
body: r,
|
|
40
|
+
throwOnError: !0
|
|
41
|
+
});
|
|
42
|
+
return i;
|
|
43
|
+
},
|
|
44
|
+
onSuccess: async () => {
|
|
45
|
+
await s(f({
|
|
46
|
+
client: t,
|
|
47
|
+
organizationId: n
|
|
48
|
+
}));
|
|
49
|
+
}
|
|
50
|
+
});
|
|
51
|
+
}
|
|
52
|
+
var v = (e) => e ? e.slice(-4) : null;
|
|
53
|
+
function y(e) {
|
|
54
|
+
return {
|
|
55
|
+
id: e.id,
|
|
56
|
+
type: "BANK_DETAILS",
|
|
57
|
+
displayName: e.display_name ?? null,
|
|
58
|
+
accountNumberLast4: v(e.account_number) ?? e.account_number_last4 ?? null,
|
|
59
|
+
accountHolderName: e.account_holder_name ?? null,
|
|
60
|
+
routingNumber: e.routing_number ?? null,
|
|
61
|
+
accountNumber: e.account_number ?? null
|
|
62
|
+
};
|
|
63
|
+
}
|
|
64
|
+
function b(e) {
|
|
65
|
+
return {
|
|
66
|
+
id: e.id,
|
|
67
|
+
type: "INTERNAL",
|
|
68
|
+
displayName: e.nickname ?? null,
|
|
69
|
+
accountNumberLast4: v(e.accountNumber),
|
|
70
|
+
accountHolderName: e.nameOnAccount ?? null,
|
|
71
|
+
routingNumber: e.routingNumber ?? null,
|
|
72
|
+
accountNumber: e.accountNumber ?? null
|
|
73
|
+
};
|
|
74
|
+
}
|
|
75
|
+
function x(e) {
|
|
76
|
+
return {
|
|
77
|
+
id: e.id,
|
|
78
|
+
type: "EXTERNAL",
|
|
79
|
+
displayName: e.nickname || e.nameOnAccount || null,
|
|
80
|
+
accountNumberLast4: v(e.accountNumber),
|
|
81
|
+
accountHolderName: e.nameOnAccount ?? null,
|
|
82
|
+
routingNumber: e.routingNumber ?? null,
|
|
83
|
+
accountNumber: e.accountNumber ?? null
|
|
84
|
+
};
|
|
85
|
+
}
|
|
86
|
+
function S({ enabled: e = !0, canReadEmbedded: t = !1, canReadExternal: n = !1 } = {}) {
|
|
87
|
+
let { organizationId: r, widgetToken: i, organizationStatus: o } = c(), s = o === a.Rotating, l = e && !!(i && (r || s)), f = l && t, m = l && n, h = g({ enabled: e }), _ = u({ enabled: f }), v = d({ enabled: m }), S = l ? h.data?.data : void 0, C = f ? _.data?.data : void 0, w = m ? v.data?.data : void 0, T = p(() => [
|
|
88
|
+
...(S ?? []).map(y),
|
|
89
|
+
...(C ?? []).filter((e) => e.status === "ACTIVE").map(b),
|
|
90
|
+
...(w ?? []).filter((e) => e.accountStatus === "ACTIVE" && e.verificationStatus === "VERIFIED").map(x)
|
|
91
|
+
], [
|
|
92
|
+
S,
|
|
93
|
+
C,
|
|
94
|
+
w
|
|
95
|
+
]), E = l && h.isLoading || f && _.isLoading || m && v.isLoading;
|
|
96
|
+
return {
|
|
97
|
+
paymentAccounts: T,
|
|
98
|
+
isLoading: E,
|
|
99
|
+
isIncomplete: E || l && s || l && (h.isFetching || h.isError) || f && (_.isFetching || _.isError || _.hasNextPage) || m && (v.isFetching || v.isError || v.hasNextPage) || !!(l && h.data?.next_pagination_token)
|
|
100
|
+
};
|
|
101
|
+
}
|
|
102
|
+
function C({ id: e, type: r, enabled: a = !0 }) {
|
|
103
|
+
let { client: s, organizationId: u, widgetToken: d, authEpoch: f, organizationStatus: m } = c(), g = l(u), _ = a && !!(e && u && d), v = {
|
|
104
|
+
authEpoch: f,
|
|
105
|
+
organizationStatus: m
|
|
106
|
+
}, S = h({
|
|
107
|
+
...o(n({
|
|
108
|
+
client: s,
|
|
109
|
+
headers: g,
|
|
110
|
+
path: { bank_account_id: e ?? "" }
|
|
111
|
+
}), v),
|
|
112
|
+
enabled: _ && r === "BANK_DETAILS",
|
|
113
|
+
retry: !1
|
|
114
|
+
}), C = h({
|
|
115
|
+
...o(t({
|
|
116
|
+
client: s,
|
|
117
|
+
headers: g,
|
|
118
|
+
path: { id: e ?? "" }
|
|
119
|
+
}), v),
|
|
120
|
+
enabled: _ && r === "INTERNAL",
|
|
121
|
+
retry: !1
|
|
122
|
+
}), w = h({
|
|
123
|
+
...o(i({
|
|
124
|
+
client: s,
|
|
125
|
+
headers: g,
|
|
126
|
+
path: { id: e ?? "" }
|
|
127
|
+
}), v),
|
|
128
|
+
enabled: _ && r === "EXTERNAL",
|
|
129
|
+
retry: !1
|
|
130
|
+
}), T = r === "BANK_DETAILS" ? S.data : void 0, E = r === "INTERNAL" ? C.data : void 0, D = r === "EXTERNAL" ? w.data : void 0;
|
|
131
|
+
return { paymentAccount: p(() => {
|
|
132
|
+
if (_) {
|
|
133
|
+
if (T) return y(T);
|
|
134
|
+
if (E) return b(E);
|
|
135
|
+
if (D) return x(D);
|
|
136
|
+
}
|
|
137
|
+
}, [
|
|
138
|
+
E,
|
|
139
|
+
T,
|
|
140
|
+
D,
|
|
141
|
+
_
|
|
142
|
+
]) };
|
|
22
143
|
}
|
|
23
144
|
//#endregion
|
|
24
|
-
export {
|
|
145
|
+
export { _ as useCreateEntityBankAccountMutation, g as useEntityBankAccountsQuery, C as usePaymentAccountQuery, S as usePaymentAccountsQuery };
|
package/dist/libs/tesouro-embedded-components-react/invoicing-widget/data-access/dist/index7.js
CHANGED
|
@@ -2,69 +2,23 @@
|
|
|
2
2
|
"use client";
|
|
3
3
|
"use client";
|
|
4
4
|
"use client";
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import { organizationHeaders as i } from "../../../shared/data-access/dist/lib/organizationHeaders.js";
|
|
5
|
+
import { postPaymentLinks as e } from "../../../shared/data-access/dist/lib/rest/sdk.gen.js";
|
|
6
|
+
import { useEmbedApi as t } from "../../../shared/data-access/dist/lib/EmbedApiContext.js";
|
|
7
|
+
import { organizationHeaders as n } from "../../../shared/data-access/dist/lib/organizationHeaders.js";
|
|
9
8
|
import "../../../shared/data-access/dist/index.js";
|
|
10
|
-
import {
|
|
11
|
-
import { useMutation as s } from "@tanstack/react-query";
|
|
9
|
+
import { useMutation as r } from "@tanstack/react-query";
|
|
12
10
|
//#region ../../libs/tesouro-embedded-components-react/invoicing-widget/data-access/dist/index7.js
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
}
|
|
25
|
-
function u() {
|
|
26
|
-
let { client: e, organizationId: n } = r();
|
|
27
|
-
return s({
|
|
28
|
-
mutationFn: async ({ file: r }) => {
|
|
29
|
-
let { data: a } = await t({
|
|
30
|
-
client: e,
|
|
31
|
-
headers: i(n),
|
|
32
|
-
body: {
|
|
33
|
-
file: r,
|
|
34
|
-
file_type: c
|
|
35
|
-
},
|
|
36
|
-
throwOnError: !0
|
|
37
|
-
});
|
|
38
|
-
return a;
|
|
39
|
-
},
|
|
40
|
-
onSuccess: async (t, r) => {
|
|
41
|
-
await l({
|
|
42
|
-
client: e,
|
|
43
|
-
organizationId: n,
|
|
44
|
-
receivableId: r.receivableId
|
|
45
|
-
});
|
|
46
|
-
}
|
|
47
|
-
});
|
|
48
|
-
}
|
|
49
|
-
function d() {
|
|
50
|
-
let { client: t, organizationId: n } = r();
|
|
51
|
-
return s({
|
|
52
|
-
mutationFn: async ({ path: r }) => {
|
|
53
|
-
await e({
|
|
54
|
-
client: t,
|
|
55
|
-
headers: i(n),
|
|
56
|
-
path: r,
|
|
57
|
-
throwOnError: !0
|
|
58
|
-
});
|
|
59
|
-
},
|
|
60
|
-
onSuccess: async (e, r) => {
|
|
61
|
-
await l({
|
|
62
|
-
client: t,
|
|
63
|
-
organizationId: n,
|
|
64
|
-
receivableId: r.receivableId
|
|
65
|
-
});
|
|
66
|
-
}
|
|
67
|
-
});
|
|
11
|
+
function i() {
|
|
12
|
+
let { client: i, organizationId: a } = t();
|
|
13
|
+
return r({ mutationFn: async ({ body: t }) => {
|
|
14
|
+
let { data: r } = await e({
|
|
15
|
+
client: i,
|
|
16
|
+
headers: n(a),
|
|
17
|
+
body: t,
|
|
18
|
+
throwOnError: !0
|
|
19
|
+
});
|
|
20
|
+
return r;
|
|
21
|
+
} });
|
|
68
22
|
}
|
|
69
23
|
//#endregion
|
|
70
|
-
export {
|
|
24
|
+
export { i as useCreatePaymentLinkMutation };
|
package/dist/libs/tesouro-embedded-components-react/invoicing-widget/data-access/dist/index8.js
CHANGED
|
@@ -1,32 +1,70 @@
|
|
|
1
|
-
|
|
1
|
+
"use client";
|
|
2
|
+
"use client";
|
|
3
|
+
"use client";
|
|
4
|
+
"use client";
|
|
5
|
+
import { deleteFilesId as e, postFiles as t } from "../../../shared/data-access/dist/lib/rest/sdk.gen.js";
|
|
6
|
+
import { invalidateAllClients as n } from "../../../shared/data-access/dist/lib/clientRegistry.js";
|
|
7
|
+
import { useEmbedApi as r } from "../../../shared/data-access/dist/lib/EmbedApiContext.js";
|
|
8
|
+
import { organizationHeaders as i } from "../../../shared/data-access/dist/lib/organizationHeaders.js";
|
|
2
9
|
import "../../../shared/data-access/dist/index.js";
|
|
3
|
-
import {
|
|
10
|
+
import { receivableAttachmentsInvalidationKey as a, receivableInvalidationKey as o } from "./index2.js";
|
|
11
|
+
import { useMutation as s } from "@tanstack/react-query";
|
|
4
12
|
//#region ../../libs/tesouro-embedded-components-react/invoicing-widget/data-access/dist/index8.js
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
13
|
+
var c = "attachments";
|
|
14
|
+
async function l({ client: e, organizationId: t, receivableId: r }) {
|
|
15
|
+
let i = [a({
|
|
16
|
+
client: e,
|
|
17
|
+
organizationId: t
|
|
18
|
+
}), ...r ? [o({
|
|
19
|
+
client: e,
|
|
20
|
+
organizationId: t,
|
|
21
|
+
receivableId: r
|
|
22
|
+
})] : []];
|
|
23
|
+
await Promise.all(i.map((e) => n(e)));
|
|
24
|
+
}
|
|
25
|
+
function u() {
|
|
26
|
+
let { client: e, organizationId: n } = r();
|
|
27
|
+
return s({
|
|
28
|
+
mutationFn: async ({ file: r }) => {
|
|
29
|
+
let { data: a } = await t({
|
|
30
|
+
client: e,
|
|
31
|
+
headers: i(n),
|
|
32
|
+
body: {
|
|
33
|
+
file: r,
|
|
34
|
+
file_type: c
|
|
35
|
+
},
|
|
36
|
+
throwOnError: !0
|
|
37
|
+
});
|
|
38
|
+
return a;
|
|
39
|
+
},
|
|
40
|
+
onSuccess: async (t, r) => {
|
|
41
|
+
await l({
|
|
42
|
+
client: e,
|
|
43
|
+
organizationId: n,
|
|
44
|
+
receivableId: r.receivableId
|
|
45
|
+
});
|
|
46
|
+
}
|
|
47
|
+
});
|
|
48
|
+
}
|
|
49
|
+
function d() {
|
|
50
|
+
let { client: t, organizationId: n } = r();
|
|
51
|
+
return s({
|
|
52
|
+
mutationFn: async ({ path: r }) => {
|
|
53
|
+
await e({
|
|
54
|
+
client: t,
|
|
55
|
+
headers: i(n),
|
|
56
|
+
path: r,
|
|
57
|
+
throwOnError: !0
|
|
58
|
+
});
|
|
59
|
+
},
|
|
60
|
+
onSuccess: async (e, r) => {
|
|
61
|
+
await l({
|
|
62
|
+
client: t,
|
|
63
|
+
organizationId: n,
|
|
64
|
+
receivableId: r.receivableId
|
|
65
|
+
});
|
|
66
|
+
}
|
|
67
|
+
});
|
|
30
68
|
}
|
|
31
69
|
//#endregion
|
|
32
|
-
export {
|
|
70
|
+
export { d as useDeleteReceivableAttachmentMutation, u as useUploadReceivableAttachmentMutation };
|
package/dist/libs/tesouro-embedded-components-react/invoicing-widget/data-access/dist/index9.js
CHANGED
|
@@ -1,38 +1,32 @@
|
|
|
1
|
-
|
|
2
|
-
"use client";
|
|
3
|
-
"use client";
|
|
4
|
-
"use client";
|
|
5
|
-
import { postReceivablesIdSend as e } from "../../../shared/data-access/dist/lib/rest/sdk.gen.js";
|
|
6
|
-
import { invalidateAllClients as t } from "../../../shared/data-access/dist/lib/clientRegistry.js";
|
|
7
|
-
import { useEmbedApi as n } from "../../../shared/data-access/dist/lib/EmbedApiContext.js";
|
|
8
|
-
import { organizationHeaders as r } from "../../../shared/data-access/dist/lib/organizationHeaders.js";
|
|
1
|
+
import { invalidateAllClients as e, resetAllClients as t } from "../../../shared/data-access/dist/lib/clientRegistry.js";
|
|
9
2
|
import "../../../shared/data-access/dist/index.js";
|
|
10
|
-
import {
|
|
11
|
-
import { invalidateReceivable as a } from "./index8.js";
|
|
12
|
-
import { useMutation as o } from "@tanstack/react-query";
|
|
3
|
+
import { receivableHistoryInvalidationKey as n, receivableInvalidationKey as r, receivablePdfInvalidationKey as i, receivablesAnalyticsInvalidationKey as a, receivablesInvalidationKey as o } from "./index2.js";
|
|
13
4
|
//#region ../../libs/tesouro-embedded-components-react/invoicing-widget/data-access/dist/index9.js
|
|
14
|
-
function s() {
|
|
15
|
-
let
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
5
|
+
async function s({ client: s, organizationId: c, receivableId: l, resetPdf: u = !1 }) {
|
|
6
|
+
let d = [
|
|
7
|
+
o({
|
|
8
|
+
client: s,
|
|
9
|
+
organizationId: c
|
|
10
|
+
}),
|
|
11
|
+
a({
|
|
12
|
+
client: s,
|
|
13
|
+
organizationId: c
|
|
14
|
+
}),
|
|
15
|
+
...l ? [r({
|
|
16
|
+
client: s,
|
|
17
|
+
organizationId: c,
|
|
18
|
+
receivableId: l
|
|
19
|
+
}), n({
|
|
20
|
+
client: s,
|
|
21
|
+
organizationId: c,
|
|
22
|
+
receivableId: l
|
|
23
|
+
})] : []
|
|
24
|
+
], f = l ? i({
|
|
25
|
+
client: s,
|
|
26
|
+
organizationId: c,
|
|
27
|
+
receivableId: l
|
|
28
|
+
}) : void 0;
|
|
29
|
+
await Promise.all([...d.map((t) => e(t)), ...f ? [u ? t(f) : e(f)] : []]);
|
|
36
30
|
}
|
|
37
31
|
//#endregion
|
|
38
|
-
export { s as
|
|
32
|
+
export { s as invalidateReceivable };
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"use client";
|
|
3
3
|
"use client";
|
|
4
4
|
"use client";
|
|
5
|
-
import { ReceivableAttachmentsSection as e } from "../../../../ui/dist/
|
|
5
|
+
import { ReceivableAttachmentsSection as e } from "../../../../ui/dist/index17.js";
|
|
6
6
|
import "../../../../ui/dist/index.js";
|
|
7
7
|
import { useRef as t, useState as n } from "react";
|
|
8
8
|
import { jsx as r } from "react/jsx-runtime";
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
"use client";
|
|
3
|
+
"use client";
|
|
4
|
+
"use client";
|
|
5
|
+
import { ReceivableCustomerSection as e } from "../../../../ui/dist/index23.js";
|
|
6
|
+
import "../../../../ui/dist/index.js";
|
|
7
|
+
import { useReceivableCustomerPicker as t } from "./useReceivableCustomerPicker.js";
|
|
8
|
+
import { jsx as n } from "react/jsx-runtime";
|
|
9
|
+
//#region ../../libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/ReceivableCustomerSection.js
|
|
10
|
+
function r({ idPrefix: r, disabled: i, onCustomerEmailChange: a, onCustomerEmailBlur: o, onAddDetailsClick: s, onViewDetailsClick: c, onClearClick: l, labels: u, ...d }) {
|
|
11
|
+
let f = t({
|
|
12
|
+
...d,
|
|
13
|
+
disabled: i
|
|
14
|
+
});
|
|
15
|
+
return /* @__PURE__ */ n(e, {
|
|
16
|
+
idPrefix: r,
|
|
17
|
+
card: f.card,
|
|
18
|
+
picker: f.picker,
|
|
19
|
+
create: f.create,
|
|
20
|
+
disabled: i,
|
|
21
|
+
inputRef: f.inputRef,
|
|
22
|
+
onInputValueChange: f.changeInput,
|
|
23
|
+
onInputFocus: f.open,
|
|
24
|
+
onInputBlur: f.close,
|
|
25
|
+
onListToggle: f.toggle,
|
|
26
|
+
onKey: f.pressKey,
|
|
27
|
+
onOptionHighlight: f.highlight,
|
|
28
|
+
onOptionSelect: f.select,
|
|
29
|
+
onEmailChange: a,
|
|
30
|
+
onEmailBlur: o,
|
|
31
|
+
onAddDetailsClick: s,
|
|
32
|
+
onViewDetailsClick: c,
|
|
33
|
+
onClearClick: l,
|
|
34
|
+
labels: u
|
|
35
|
+
});
|
|
36
|
+
}
|
|
37
|
+
//#endregion
|
|
38
|
+
export { r as ReceivableCustomerSection };
|