@tesouro/embedded-components-react 0.5.214 → 0.5.216
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 +144 -3
- package/dist/index.js +14 -13
- package/dist/lib/BankAccountOnboardingWidget.d.ts +56 -2
- package/dist/lib/BankAccountOnboardingWidget.js +4 -3
- package/dist/lib/MarketingWidget.js +1 -1
- package/dist/lib/ReceivablesWidget.d.ts +88 -1
- package/dist/lib/ReceivablesWidget.js +1 -1
- package/dist/lib/WidgetSuite.d.ts +53 -0
- package/dist/libs/shared/util-validation/dist/index5.js +7 -0
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/index.js +3 -2
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/index11.js +72 -72
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/index12.js +4 -1
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/index13.js +15 -15
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/index14.js +60 -60
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/index15.js +12 -12
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/index16.js +16 -16
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/index18.js +11 -11
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/index21.js +8 -8
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/index22.js +71 -5
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/index23.js +95 -33
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/index24.js +6 -17
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/index25.js +16 -616
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/index26.js +669 -0
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index.js +15 -13
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index10.js +52 -37
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index11.js +31 -37
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index12.js +33 -89
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index13.js +39 -12
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index14.js +98 -2
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index15.js +14 -4
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index16.js +2 -185
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index17.js +4 -30
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index18.js +183 -21
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index19.js +26 -66
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index20.js +21 -233
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index21.js +66 -27
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index22.js +233 -26
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index23.js +27 -72
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index24.js +26 -85
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index25.js +74 -8
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index26.js +83 -55
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index27.js +6 -7
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index28.js +37 -42
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index29.js +11 -0
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index30.js +64 -0
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index9.js +7 -33
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/data-access/dist/index.js +7 -7
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/data-access/dist/index10.js +63 -67
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/data-access/dist/index11.js +160 -1
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/data-access/dist/index12.js +6 -0
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/data-access/dist/index2.js +32 -25
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/data-access/dist/index6.js +25 -200
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/data-access/dist/index7.js +175 -1
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/data-access/dist/index8.js +1 -101
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/data-access/dist/index9.js +92 -71
- 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/index10.js +44 -100
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index11.js +93 -421
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index12.js +442 -112
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index13.js +166 -157
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index14.js +150 -204
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index15.js +202 -31
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index16.js +32 -145
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index17.js +145 -37
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index18.js +44 -58
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index19.js +113 -87
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index20.js +58 -116
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index21.js +83 -357
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index22.js +111 -65
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index23.js +449 -99
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index24.js +68 -281
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index25.js +115 -0
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index26.js +314 -0
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index5.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index6.js +34 -23
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index8.js +444 -92
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index9.js +113 -52
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index.js +18 -14
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index10.js +2 -92
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index11.js +95 -3
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index12.js +3 -24
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index13.js +24 -1
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index14.js +1 -3
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index15.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index16.js +3 -18
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index17.js +18 -1
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index18.js +0 -3
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index19.js +0 -8
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index20.js +11 -0
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index21.js +1 -264
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index22.js +258 -42
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index23.js +38 -62
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index24.js +61 -463
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index25.js +457 -89
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index26.js +91 -234
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index27.js +89 -82
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index28.js +22 -338
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index29.js +236 -0
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index3.js +26 -204
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index30.js +3 -0
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index31.js +249 -0
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index32.js +93 -0
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index33.js +344 -0
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index4.js +208 -32
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index5.js +29 -202
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index6.js +183 -137
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index7.js +157 -12
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index8.js +10 -19
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index9.js +23 -2
- package/dist/libs/tesouro-embedded-components-react/marketing-widget/feature/dist/index.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/marketing-widget/feature/dist/index5.js +16 -19
- package/dist/libs/tesouro-embedded-components-react/marketing-widget/feature/dist/index6.js +157 -16
- package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/index.js +40 -40
- package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/onboardingSuppressionReason.js +3 -1
- package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/rest/@tanstack/react-query.gen.js +167 -156
- package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/rest/sdk.gen.js +66 -34
- package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/index.js +2 -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/feature/dist/lib/application/bankAccountApplication.js +26 -0
- package/dist/libs/tesouro-embedded-components-react/widget-suite/feature/dist/index16.js +1 -1
- package/dist/packages/shared-ui-shadcn/dist/index.js +13 -13
- package/package.json +1 -1
- package/dist/libs/tesouro-embedded-components-react/marketing-widget/feature/dist/index7.js +0 -161
package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index9.js
CHANGED
|
@@ -1,35 +1,9 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
"use client";
|
|
3
|
-
"use client";
|
|
4
|
-
"use client";
|
|
5
|
-
import * as e from "react";
|
|
6
|
-
import { jsx as t } from "react/jsx-runtime";
|
|
7
|
-
import n from "react-confetti";
|
|
8
1
|
//#region ../../libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index9.js
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
let e = () => {
|
|
16
|
-
i({
|
|
17
|
-
width: window.innerWidth,
|
|
18
|
-
height: window.innerHeight
|
|
19
|
-
});
|
|
20
|
-
};
|
|
21
|
-
return window.addEventListener("resize", e), () => window.removeEventListener("resize", e);
|
|
22
|
-
}, []), /* @__PURE__ */ t(n, {
|
|
23
|
-
width: r.width,
|
|
24
|
-
height: r.height,
|
|
25
|
-
recycle: !1,
|
|
26
|
-
gravity: .6,
|
|
27
|
-
numberOfPieces: 400,
|
|
28
|
-
initialVelocityY: {
|
|
29
|
-
min: 10,
|
|
30
|
-
max: 12
|
|
31
|
-
}
|
|
32
|
-
});
|
|
33
|
-
}
|
|
2
|
+
var e = {
|
|
3
|
+
title: "Business bank account application",
|
|
4
|
+
bankDisclosure: "",
|
|
5
|
+
chipLabel: "Application status",
|
|
6
|
+
body: []
|
|
7
|
+
};
|
|
34
8
|
//#endregion
|
|
35
|
-
export {
|
|
9
|
+
export { e as APPLICATION_STATUS_CARD_LABELS_EN };
|
package/dist/libs/tesouro-embedded-components-react/invoicing-widget/data-access/dist/index.js
CHANGED
|
@@ -4,10 +4,10 @@ import "./index2.js";
|
|
|
4
4
|
import { useCreateEntityBankAccountMutation as t, usePaymentAccountsQuery as n } from "./index3.js";
|
|
5
5
|
import { useDeleteReceivableAttachmentMutation as r, useUploadReceivableAttachmentMutation as i } from "./index4.js";
|
|
6
6
|
import { useSendReceivableEmailMutation as a } from "./index5.js";
|
|
7
|
-
import { useAcceptReceivableMutation as o, useCancelReceivableMutation as s, useCloneReceivableMutation as c, useCreateReceivableMutation as l, useDeclineReceivableMutation as u, useDeleteReceivableMutation as d, useIssueReceivableMutation as f, useUpdateReceivableMutation as p } from "./
|
|
8
|
-
import "./
|
|
9
|
-
import { useMarkReceivablePaidMutation as m, useMarkReceivablePartiallyPaidMutation as h, useMarkReceivableUncollectibleMutation as g } from "./
|
|
10
|
-
import { useReceivableHistoryQuery as _, useReceivableMailsQuery as v, useReceivablePdfLinkQuery as y, useReceivableQuery as b, useReceivablesQuery as x } from "./
|
|
11
|
-
import { useCreateOverdueReminderMutation as S, useCreatePaymentReminderMutation as C,
|
|
12
|
-
import "./
|
|
13
|
-
export { o as useAcceptReceivableMutation, s as useCancelReceivableMutation, c as useCloneReceivableMutation, t as useCreateEntityBankAccountMutation, S as useCreateOverdueReminderMutation, C as useCreatePaymentReminderMutation, l as useCreateReceivableMutation, u as useDeclineReceivableMutation, r as useDeleteReceivableAttachmentMutation, d as useDeleteReceivableMutation, f as useIssueReceivableMutation, m as useMarkReceivablePaidMutation, h as useMarkReceivablePartiallyPaidMutation, g as useMarkReceivableUncollectibleMutation,
|
|
7
|
+
import { useAcceptReceivableMutation as o, useCancelReceivableMutation as s, useCloneReceivableMutation as c, useCreateReceivableMutation as l, useDeclineReceivableMutation as u, useDeleteReceivableMutation as d, useIssueReceivableMutation as f, useUpdateReceivableMutation as p } from "./index7.js";
|
|
8
|
+
import "./index8.js";
|
|
9
|
+
import { useMarkReceivablePaidMutation as m, useMarkReceivablePartiallyPaidMutation as h, useMarkReceivableUncollectibleMutation as g } from "./index9.js";
|
|
10
|
+
import { useReceivableHistoryQuery as _, useReceivableMailsQuery as v, useReceivablePdfLinkQuery as y, useReceivableQuery as b, useReceivablesQuery as x } from "./index10.js";
|
|
11
|
+
import { useCreateOverdueReminderMutation as S, useCreatePaymentReminderMutation as C, useCreateRecurrenceMutation as w, useOverdueRemindersQuery as T, usePaymentRemindersQuery as E, useRecurrenceQuery as D, useUpdateRecurrenceMutation as O } from "./index11.js";
|
|
12
|
+
import "./index12.js";
|
|
13
|
+
export { o as useAcceptReceivableMutation, s as useCancelReceivableMutation, c as useCloneReceivableMutation, t as useCreateEntityBankAccountMutation, S as useCreateOverdueReminderMutation, C as useCreatePaymentReminderMutation, l as useCreateReceivableMutation, w as useCreateRecurrenceMutation, u as useDeclineReceivableMutation, r as useDeleteReceivableAttachmentMutation, d as useDeleteReceivableMutation, f as useIssueReceivableMutation, m as useMarkReceivablePaidMutation, h as useMarkReceivablePartiallyPaidMutation, g as useMarkReceivableUncollectibleMutation, T as useOverdueRemindersQuery, n as usePaymentAccountsQuery, E as usePaymentRemindersQuery, e as usePaymentTermsQuery, _ as useReceivableHistoryQuery, v as useReceivableMailsQuery, y as useReceivablePdfLinkQuery, b as useReceivableQuery, x as useReceivablesQuery, D as useRecurrenceQuery, a as useSendReceivableEmailMutation, p as useUpdateReceivableMutation, O as useUpdateRecurrenceMutation, i as useUploadReceivableAttachmentMutation };
|
package/dist/libs/tesouro-embedded-components-react/invoicing-widget/data-access/dist/index10.js
CHANGED
|
@@ -2,88 +2,84 @@
|
|
|
2
2
|
"use client";
|
|
3
3
|
"use client";
|
|
4
4
|
"use client";
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import { withAuthEpoch as i } from "../../../shared/data-access/dist/lib/withAuthEpoch.js";
|
|
8
|
-
import { invalidateAllClients as a } from "../../../shared/data-access/dist/lib/clientRegistry.js";
|
|
5
|
+
import { getReceivablesIdHistoryOptions as e, getReceivablesIdMailsOptions as t, getReceivablesIdOptions as n, getReceivablesIdPdfLinkOptions as r, getReceivablesOptions as i } from "../../../shared/data-access/dist/lib/rest/@tanstack/react-query.gen.js";
|
|
6
|
+
import { withAuthEpoch as a } from "../../../shared/data-access/dist/lib/withAuthEpoch.js";
|
|
9
7
|
import { useEmbedApi as o } from "../../../shared/data-access/dist/lib/EmbedApiContext.js";
|
|
10
8
|
import { organizationHeaders as s } from "../../../shared/data-access/dist/lib/organizationHeaders.js";
|
|
11
9
|
import "../../../shared/data-access/dist/index.js";
|
|
12
|
-
import {
|
|
13
|
-
import { useMutation as u, useQuery as d } from "@tanstack/react-query";
|
|
10
|
+
import { useQuery as c } from "@tanstack/react-query";
|
|
14
11
|
//#region ../../libs/tesouro-embedded-components-react/invoicing-widget/data-access/dist/index10.js
|
|
15
|
-
function
|
|
16
|
-
let
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
};
|
|
12
|
+
function l({ enabled: e, ...t } = {}) {
|
|
13
|
+
let { client: n, organizationId: r, widgetToken: l, authEpoch: u, organizationPending: d } = o(), f = !!(r && l) && (e === !0 || e === void 0), p = i({
|
|
14
|
+
client: n,
|
|
15
|
+
headers: s(r),
|
|
16
|
+
query: t
|
|
17
|
+
});
|
|
18
|
+
return c({
|
|
19
|
+
...a(p, {
|
|
20
|
+
authEpoch: u,
|
|
21
|
+
organizationPending: d
|
|
22
|
+
}, { carryWithinOrg: !0 }),
|
|
23
|
+
enabled: f
|
|
24
|
+
});
|
|
21
25
|
}
|
|
22
|
-
function
|
|
23
|
-
let { client:
|
|
24
|
-
client:
|
|
25
|
-
headers: s(
|
|
26
|
+
function u(e, { enabled: t = !0 } = {}) {
|
|
27
|
+
let { client: r, organizationId: i, widgetToken: l, authEpoch: u, organizationPending: d } = o(), f = !!(i && l && e) && t, p = n({
|
|
28
|
+
client: r,
|
|
29
|
+
headers: s(i),
|
|
30
|
+
path: { receivable_id: e ?? "" }
|
|
26
31
|
});
|
|
27
|
-
return
|
|
28
|
-
...
|
|
29
|
-
authEpoch:
|
|
30
|
-
organizationPending:
|
|
32
|
+
return c({
|
|
33
|
+
...a(p, {
|
|
34
|
+
authEpoch: u,
|
|
35
|
+
organizationPending: d
|
|
31
36
|
}),
|
|
32
|
-
enabled:
|
|
37
|
+
enabled: f
|
|
33
38
|
});
|
|
34
39
|
}
|
|
35
|
-
function
|
|
36
|
-
let { client:
|
|
37
|
-
client:
|
|
38
|
-
headers: s(
|
|
40
|
+
function d(t, { enabled: n, ...r } = {}) {
|
|
41
|
+
let { client: i, organizationId: l, widgetToken: u, authEpoch: d, organizationPending: f } = o(), p = !!(l && u && t) && (n === !0 || n === void 0), m = e({
|
|
42
|
+
client: i,
|
|
43
|
+
headers: s(l),
|
|
44
|
+
path: { receivable_id: t ?? "" },
|
|
45
|
+
query: r
|
|
39
46
|
});
|
|
40
|
-
return
|
|
41
|
-
...
|
|
42
|
-
authEpoch:
|
|
43
|
-
organizationPending:
|
|
47
|
+
return c({
|
|
48
|
+
...a(m, {
|
|
49
|
+
authEpoch: d,
|
|
50
|
+
organizationPending: f
|
|
44
51
|
}),
|
|
45
|
-
enabled:
|
|
52
|
+
enabled: p
|
|
46
53
|
});
|
|
47
54
|
}
|
|
48
|
-
function
|
|
49
|
-
let { client:
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
},
|
|
60
|
-
|
|
61
|
-
await a(l({
|
|
62
|
-
client: e,
|
|
63
|
-
organizationId: n
|
|
64
|
-
}));
|
|
65
|
-
}
|
|
55
|
+
function f(e, { enabled: n, ...r } = {}) {
|
|
56
|
+
let { client: i, organizationId: l, widgetToken: u, authEpoch: d, organizationPending: f } = o(), p = !!(l && u && e) && (n === !0 || n === void 0), m = t({
|
|
57
|
+
client: i,
|
|
58
|
+
headers: s(l),
|
|
59
|
+
path: { receivable_id: e ?? "" },
|
|
60
|
+
query: r
|
|
61
|
+
});
|
|
62
|
+
return c({
|
|
63
|
+
...a(m, {
|
|
64
|
+
authEpoch: d,
|
|
65
|
+
organizationPending: f
|
|
66
|
+
}),
|
|
67
|
+
enabled: p
|
|
66
68
|
});
|
|
67
69
|
}
|
|
68
|
-
function
|
|
69
|
-
let { client:
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
onSuccess: async () => {
|
|
81
|
-
await a(c({
|
|
82
|
-
client: t,
|
|
83
|
-
organizationId: n
|
|
84
|
-
}));
|
|
85
|
-
}
|
|
70
|
+
function p(e, { enabled: t = !0 } = {}) {
|
|
71
|
+
let { client: n, organizationId: i, widgetToken: l, authEpoch: u, organizationPending: d } = o(), f = !!(i && l && e) && t, p = r({
|
|
72
|
+
client: n,
|
|
73
|
+
headers: s(i),
|
|
74
|
+
path: { receivable_id: e ?? "" }
|
|
75
|
+
});
|
|
76
|
+
return c({
|
|
77
|
+
...a(p, {
|
|
78
|
+
authEpoch: u,
|
|
79
|
+
organizationPending: d
|
|
80
|
+
}),
|
|
81
|
+
enabled: f
|
|
86
82
|
});
|
|
87
83
|
}
|
|
88
84
|
//#endregion
|
|
89
|
-
export {
|
|
85
|
+
export { d as useReceivableHistoryQuery, f as useReceivableMailsQuery, p as useReceivablePdfLinkQuery, u as useReceivableQuery, l as useReceivablesQuery };
|
package/dist/libs/tesouro-embedded-components-react/invoicing-widget/data-access/dist/index11.js
CHANGED
|
@@ -2,5 +2,164 @@
|
|
|
2
2
|
"use client";
|
|
3
3
|
"use client";
|
|
4
4
|
"use client";
|
|
5
|
+
import { patchRecurrencesId as e, postOverdueReminders as t, postPaymentReminders as n, postRecurrences as r } from "../../../shared/data-access/dist/lib/rest/sdk.gen.js";
|
|
6
|
+
import { getOverdueRemindersOptions as i, getPaymentRemindersOptions as a, getRecurrencesIdOptions as o } from "../../../shared/data-access/dist/lib/rest/@tanstack/react-query.gen.js";
|
|
7
|
+
import { withAuthEpoch as s } from "../../../shared/data-access/dist/lib/withAuthEpoch.js";
|
|
8
|
+
import { invalidateAllClients as c } from "../../../shared/data-access/dist/lib/clientRegistry.js";
|
|
9
|
+
import { useEmbedApi as l } from "../../../shared/data-access/dist/lib/EmbedApiContext.js";
|
|
10
|
+
import { organizationHeaders as u } from "../../../shared/data-access/dist/lib/organizationHeaders.js";
|
|
5
11
|
import "../../../shared/data-access/dist/index.js";
|
|
6
|
-
import "
|
|
12
|
+
import { overdueRemindersInvalidationKey as d, paymentRemindersInvalidationKey as f, recurrenceInvalidationKey as p, recurrencesInvalidationKey as m } from "./index2.js";
|
|
13
|
+
import { invalidateReceivable as h } from "./index6.js";
|
|
14
|
+
import { useMutation as g, useQuery as _ } from "@tanstack/react-query";
|
|
15
|
+
//#region ../../libs/tesouro-embedded-components-react/invoicing-widget/data-access/dist/index11.js
|
|
16
|
+
function v() {
|
|
17
|
+
let e = l();
|
|
18
|
+
return {
|
|
19
|
+
...e,
|
|
20
|
+
isEnabled: !!(e.organizationId && e.widgetToken)
|
|
21
|
+
};
|
|
22
|
+
}
|
|
23
|
+
function y({ enabled: e = !0 } = {}) {
|
|
24
|
+
let { client: t, organizationId: n, authEpoch: r, organizationPending: i, isEnabled: o } = v(), c = a({
|
|
25
|
+
client: t,
|
|
26
|
+
headers: u(n)
|
|
27
|
+
});
|
|
28
|
+
return _({
|
|
29
|
+
...s(c, {
|
|
30
|
+
authEpoch: r,
|
|
31
|
+
organizationPending: i
|
|
32
|
+
}),
|
|
33
|
+
enabled: o && e
|
|
34
|
+
});
|
|
35
|
+
}
|
|
36
|
+
function b({ enabled: e = !0 } = {}) {
|
|
37
|
+
let { client: t, organizationId: n, authEpoch: r, organizationPending: a, isEnabled: o } = v(), c = i({
|
|
38
|
+
client: t,
|
|
39
|
+
headers: u(n)
|
|
40
|
+
});
|
|
41
|
+
return _({
|
|
42
|
+
...s(c, {
|
|
43
|
+
authEpoch: r,
|
|
44
|
+
organizationPending: a
|
|
45
|
+
}),
|
|
46
|
+
enabled: o && e
|
|
47
|
+
});
|
|
48
|
+
}
|
|
49
|
+
function x() {
|
|
50
|
+
let { client: e, organizationId: t } = l();
|
|
51
|
+
return g({
|
|
52
|
+
mutationFn: async ({ body: r }) => {
|
|
53
|
+
let { data: i } = await n({
|
|
54
|
+
client: e,
|
|
55
|
+
headers: u(t),
|
|
56
|
+
body: r,
|
|
57
|
+
throwOnError: !0
|
|
58
|
+
});
|
|
59
|
+
return i;
|
|
60
|
+
},
|
|
61
|
+
onSuccess: async () => {
|
|
62
|
+
await c(f({
|
|
63
|
+
client: e,
|
|
64
|
+
organizationId: t
|
|
65
|
+
}));
|
|
66
|
+
}
|
|
67
|
+
});
|
|
68
|
+
}
|
|
69
|
+
function S() {
|
|
70
|
+
let { client: e, organizationId: n } = l();
|
|
71
|
+
return g({
|
|
72
|
+
mutationFn: async ({ body: r }) => {
|
|
73
|
+
let { data: i } = await t({
|
|
74
|
+
client: e,
|
|
75
|
+
headers: u(n),
|
|
76
|
+
body: r,
|
|
77
|
+
throwOnError: !0
|
|
78
|
+
});
|
|
79
|
+
return i;
|
|
80
|
+
},
|
|
81
|
+
onSuccess: async () => {
|
|
82
|
+
await c(d({
|
|
83
|
+
client: e,
|
|
84
|
+
organizationId: n
|
|
85
|
+
}));
|
|
86
|
+
}
|
|
87
|
+
});
|
|
88
|
+
}
|
|
89
|
+
async function C({ client: e, organizationId: t, recurrenceId: n, receivableId: r }) {
|
|
90
|
+
await Promise.all([
|
|
91
|
+
c(m({
|
|
92
|
+
client: e,
|
|
93
|
+
organizationId: t
|
|
94
|
+
})),
|
|
95
|
+
...n ? [c(p({
|
|
96
|
+
client: e,
|
|
97
|
+
organizationId: t,
|
|
98
|
+
recurrenceId: n
|
|
99
|
+
}))] : [],
|
|
100
|
+
h({
|
|
101
|
+
client: e,
|
|
102
|
+
organizationId: t,
|
|
103
|
+
receivableId: r
|
|
104
|
+
})
|
|
105
|
+
]);
|
|
106
|
+
}
|
|
107
|
+
function w(e) {
|
|
108
|
+
let { client: t, organizationId: n, authEpoch: r, organizationPending: i, isEnabled: a } = v(), c = o({
|
|
109
|
+
client: t,
|
|
110
|
+
headers: u(n),
|
|
111
|
+
path: { recurrence_id: e ?? "" }
|
|
112
|
+
});
|
|
113
|
+
return _({
|
|
114
|
+
...s(c, {
|
|
115
|
+
authEpoch: r,
|
|
116
|
+
organizationPending: i
|
|
117
|
+
}),
|
|
118
|
+
enabled: a && !!e
|
|
119
|
+
});
|
|
120
|
+
}
|
|
121
|
+
function T() {
|
|
122
|
+
let { client: e, organizationId: t } = l();
|
|
123
|
+
return g({
|
|
124
|
+
mutationFn: async ({ body: n }) => {
|
|
125
|
+
let { data: i } = await r({
|
|
126
|
+
client: e,
|
|
127
|
+
headers: u(t),
|
|
128
|
+
body: n,
|
|
129
|
+
throwOnError: !0
|
|
130
|
+
});
|
|
131
|
+
return i;
|
|
132
|
+
},
|
|
133
|
+
onSuccess: async (n, r) => {
|
|
134
|
+
await C({
|
|
135
|
+
client: e,
|
|
136
|
+
organizationId: t,
|
|
137
|
+
receivableId: r.body.invoice_id
|
|
138
|
+
});
|
|
139
|
+
}
|
|
140
|
+
});
|
|
141
|
+
}
|
|
142
|
+
function E() {
|
|
143
|
+
let { client: t, organizationId: n } = l();
|
|
144
|
+
return g({
|
|
145
|
+
mutationFn: async ({ path: r, body: i }) => {
|
|
146
|
+
let { data: a } = await e({
|
|
147
|
+
client: t,
|
|
148
|
+
headers: u(n),
|
|
149
|
+
path: r,
|
|
150
|
+
body: i,
|
|
151
|
+
throwOnError: !0
|
|
152
|
+
});
|
|
153
|
+
return a;
|
|
154
|
+
},
|
|
155
|
+
onSuccess: async (e, r) => {
|
|
156
|
+
await C({
|
|
157
|
+
client: t,
|
|
158
|
+
organizationId: n,
|
|
159
|
+
recurrenceId: r.path.recurrence_id
|
|
160
|
+
});
|
|
161
|
+
}
|
|
162
|
+
});
|
|
163
|
+
}
|
|
164
|
+
//#endregion
|
|
165
|
+
export { S as useCreateOverdueReminderMutation, x as useCreatePaymentReminderMutation, T as useCreateRecurrenceMutation, b as useOverdueRemindersQuery, y as usePaymentRemindersQuery, w as useRecurrenceQuery, E as useUpdateRecurrenceMutation };
|
package/dist/libs/tesouro-embedded-components-react/invoicing-widget/data-access/dist/index2.js
CHANGED
|
@@ -1,57 +1,64 @@
|
|
|
1
|
-
import { getAnalyticsReceivablesQueryKey as e, getBankDetailsQueryKey as t, getFilesQueryKey as n, getOverdueRemindersQueryKey as r, getPaymentRecordsQueryKey as i, getPaymentRemindersQueryKey as a, getReceivablesIdHistoryQueryKey as o, getReceivablesIdMailsQueryKey as s, getReceivablesIdPdfLinkQueryKey as c, getReceivablesIdQueryKey as l, getReceivablesQueryKey as u } from "../../../shared/data-access/dist/lib/rest/@tanstack/react-query.gen.js";
|
|
2
|
-
import { organizationHeaders as
|
|
1
|
+
import { getAnalyticsReceivablesQueryKey as e, getBankDetailsQueryKey as t, getFilesQueryKey as n, getOverdueRemindersQueryKey as r, getPaymentRecordsQueryKey as i, getPaymentRemindersQueryKey as a, getReceivablesIdHistoryQueryKey as o, getReceivablesIdMailsQueryKey as s, getReceivablesIdPdfLinkQueryKey as c, getReceivablesIdQueryKey as l, getReceivablesQueryKey as u, getRecurrencesIdQueryKey as d, getRecurrencesQueryKey as f } from "../../../shared/data-access/dist/lib/rest/@tanstack/react-query.gen.js";
|
|
2
|
+
import { organizationHeaders as p } from "../../../shared/data-access/dist/lib/organizationHeaders.js";
|
|
3
3
|
import "../../../shared/data-access/dist/index.js";
|
|
4
4
|
//#region ../../libs/tesouro-embedded-components-react/invoicing-widget/data-access/dist/index2.js
|
|
5
|
-
var
|
|
5
|
+
var m = ({ client: e, organizationId: t }) => {
|
|
6
6
|
let [n] = u({
|
|
7
7
|
client: e,
|
|
8
|
-
headers:
|
|
8
|
+
headers: p(t)
|
|
9
9
|
}), r = { ...n };
|
|
10
10
|
return delete r.query, [r];
|
|
11
|
-
},
|
|
11
|
+
}, h = ({ client: e, organizationId: t, receivableId: n }) => l({
|
|
12
12
|
client: e,
|
|
13
|
-
headers:
|
|
13
|
+
headers: p(t),
|
|
14
14
|
path: { receivable_id: n }
|
|
15
|
-
}),
|
|
15
|
+
}), g = ({ client: e, organizationId: t, receivableId: n }) => o({
|
|
16
16
|
client: e,
|
|
17
|
-
headers:
|
|
17
|
+
headers: p(t),
|
|
18
18
|
path: { receivable_id: n }
|
|
19
|
-
}),
|
|
19
|
+
}), _ = ({ client: e, organizationId: t, receivableId: n }) => s({
|
|
20
20
|
client: e,
|
|
21
|
-
headers:
|
|
21
|
+
headers: p(t),
|
|
22
22
|
path: { receivable_id: n }
|
|
23
|
-
}),
|
|
23
|
+
}), v = ({ client: e, organizationId: t, receivableId: n }) => c({
|
|
24
24
|
client: e,
|
|
25
|
-
headers:
|
|
25
|
+
headers: p(t),
|
|
26
26
|
path: { receivable_id: n }
|
|
27
|
-
}),
|
|
27
|
+
}), y = ({ client: e, organizationId: n }) => t({
|
|
28
28
|
client: e,
|
|
29
|
-
headers:
|
|
30
|
-
}),
|
|
29
|
+
headers: p(n)
|
|
30
|
+
}), b = ({ client: e, organizationId: t }) => a({
|
|
31
31
|
client: e,
|
|
32
|
-
headers:
|
|
33
|
-
}),
|
|
32
|
+
headers: p(t)
|
|
33
|
+
}), x = ({ client: e, organizationId: t }) => r({
|
|
34
34
|
client: e,
|
|
35
|
-
headers:
|
|
36
|
-
}),
|
|
35
|
+
headers: p(t)
|
|
36
|
+
}), S = ({ client: e, organizationId: t }) => f({
|
|
37
|
+
client: e,
|
|
38
|
+
headers: p(t)
|
|
39
|
+
}), C = ({ client: e, organizationId: t, recurrenceId: n }) => d({
|
|
40
|
+
client: e,
|
|
41
|
+
headers: p(t),
|
|
42
|
+
path: { recurrence_id: n }
|
|
43
|
+
}), w = ({ client: e, organizationId: t }) => {
|
|
37
44
|
let [r] = n({
|
|
38
45
|
client: e,
|
|
39
|
-
headers:
|
|
46
|
+
headers: p(t)
|
|
40
47
|
}), i = { ...r };
|
|
41
48
|
return delete i.query, [i];
|
|
42
|
-
},
|
|
49
|
+
}, T = ({ client: e, organizationId: t }) => {
|
|
43
50
|
let [n] = i({
|
|
44
51
|
client: e,
|
|
45
|
-
headers:
|
|
52
|
+
headers: p(t)
|
|
46
53
|
}), r = { ...n };
|
|
47
54
|
return delete r.query, [r];
|
|
48
|
-
},
|
|
55
|
+
}, E = ({ client: t, organizationId: n }) => {
|
|
49
56
|
let [r] = e({
|
|
50
57
|
client: t,
|
|
51
|
-
headers:
|
|
58
|
+
headers: p(n),
|
|
52
59
|
query: {}
|
|
53
60
|
}), i = { ...r };
|
|
54
61
|
return delete i.query, [i];
|
|
55
62
|
};
|
|
56
63
|
//#endregion
|
|
57
|
-
export {
|
|
64
|
+
export { y as entityBankAccountsInvalidationKey, x as overdueRemindersInvalidationKey, T as paymentRecordsInvalidationKey, b as paymentRemindersInvalidationKey, w as receivableAttachmentsInvalidationKey, g as receivableHistoryInvalidationKey, h as receivableInvalidationKey, _ as receivableMailsInvalidationKey, v as receivablePdfInvalidationKey, E as receivablesAnalyticsInvalidationKey, m as receivablesInvalidationKey, C as recurrenceInvalidationKey, S as recurrencesInvalidationKey };
|