@tesouro/embedded-components-react 0.7.28 → 0.7.30
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 +1 -12
- package/dist/lib/CounterpartsWidget.d.ts +1 -12
- package/dist/lib/CounterpartsWidgetPublic.d.ts +1 -12
- package/dist/lib/CustomersWidget.d.ts +0 -2
- package/dist/lib/ReceivablesWidget.d.ts +0 -2
- package/dist/libs/tesouro-embedded-components-react/counterparts-widget/feature/dist/lib/CounterpartsWidget/CounterpartDetailsContainer.js +59 -38
- package/dist/libs/tesouro-embedded-components-react/counterparts-widget/feature/dist/lib/CounterpartsWidget/CounterpartDetailsPanel.js +137 -0
- package/dist/libs/tesouro-embedded-components-react/counterparts-widget/feature/dist/lib/CounterpartsWidget/CounterpartsWidget.js +86 -182
- package/dist/libs/tesouro-embedded-components-react/counterparts-widget/feature/dist/lib/CounterpartsWidget/useCounterpartDetailsActions.js +116 -0
- package/dist/libs/tesouro-embedded-components-react/counterparts-widget/feature/dist/lib/CounterpartsWidget/useCounterpartDetailsSheetView.js +16 -16
- package/dist/libs/tesouro-embedded-components-react/counterparts-widget/feature/dist/lib/CounterpartsWidget/useCounterpartsWidget.js +51 -108
- package/dist/libs/tesouro-embedded-components-react/counterparts-widget/feature/dist/lib/CounterpartsWidget/useRebaseOnRefresh.js +33 -0
- package/dist/libs/tesouro-embedded-components-react/counterparts-widget/feature/dist/lib/CounterpartsWidget/viewModels.js +40 -39
- package/dist/libs/tesouro-embedded-components-react/counterparts-widget/ui/dist/index.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/counterparts-widget/ui/dist/index4.js +2 -65
- package/dist/libs/tesouro-embedded-components-react/counterparts-widget/ui/dist/index5.js +37 -181
- package/dist/libs/tesouro-embedded-components-react/counterparts-widget/ui/dist/index6.js +193 -502
- package/dist/libs/tesouro-embedded-components-react/counterparts-widget/ui/dist/index7.js +520 -0
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/ReceivablesWidget.js +2 -0
- package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/data-access/dist/index.js +3 -3
- package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/data-access/dist/index5.js +31 -55
- package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/feature/dist/index.js +11 -11
- package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/feature/dist/lib/helpers.js +98 -163
- package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/feature/dist/lib/labels.js +1 -3
- package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/feature/dist/lib/subEntityForms.js +37 -32
- package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/feature/dist/lib/useCounterpartForm.js +86 -93
- package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/ui/dist/index10.js +2 -0
- package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/ui/dist/index12.js +42 -173
- package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/ui/dist/index2.js +3 -12
- package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/ui/dist/index5.js +16 -16
- package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/index.js +42 -42
- package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/rest/sdk.gen.js +117 -125
- package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/analytics/build-info.js +1 -1
- package/package.json +1 -1
|
@@ -2,37 +2,37 @@
|
|
|
2
2
|
"use client";
|
|
3
3
|
"use client";
|
|
4
4
|
"use client";
|
|
5
|
-
import { deleteCounterpartsIdBankAccountsId as e, patchCounterpartsIdBankAccountsId as t, postCounterpartsIdBankAccounts as n
|
|
6
|
-
import { getCounterpartsIdBankAccountsOptions as
|
|
7
|
-
import { withAuthEpoch as
|
|
8
|
-
import { invalidateAllClients as
|
|
9
|
-
import { useEmbedApi as
|
|
10
|
-
import { organizationHeaders as
|
|
5
|
+
import { deleteCounterpartsIdBankAccountsId as e, patchCounterpartsIdBankAccountsId as t, postCounterpartsIdBankAccounts as n } from "../../../data-access/dist/lib/rest/sdk.gen.js";
|
|
6
|
+
import { getCounterpartsIdBankAccountsOptions as r } from "../../../data-access/dist/lib/rest/@tanstack/react-query.gen.js";
|
|
7
|
+
import { withAuthEpoch as i } from "../../../data-access/dist/lib/withAuthEpoch.js";
|
|
8
|
+
import { invalidateAllClients as a } from "../../../data-access/dist/lib/clientRegistry.js";
|
|
9
|
+
import { useEmbedApi as o } from "../../../data-access/dist/lib/EmbedApiContext.js";
|
|
10
|
+
import { organizationHeaders as s } from "../../../data-access/dist/lib/organizationHeaders.js";
|
|
11
11
|
import "../../../data-access/dist/index.js";
|
|
12
|
-
import { counterpartBankAccountsInvalidationKey as
|
|
13
|
-
import { useMutation as
|
|
12
|
+
import { counterpartBankAccountsInvalidationKey as c } from "./index2.js";
|
|
13
|
+
import { useMutation as l, useQuery as u } from "@tanstack/react-query";
|
|
14
14
|
//#region ../../libs/tesouro-embedded-components-react/shared/counterpart-management/data-access/dist/index5.js
|
|
15
|
-
function
|
|
16
|
-
let { client: n, organizationId:
|
|
15
|
+
function d(e, { enabled: t = !0 } = {}) {
|
|
16
|
+
let { client: n, organizationId: a, widgetToken: c, authEpoch: l, organizationStatus: d } = o(), f = !!(t && a && c && e), p = r({
|
|
17
17
|
client: n,
|
|
18
|
-
headers:
|
|
18
|
+
headers: s(a),
|
|
19
19
|
path: { counterpart_id: e ?? "" }
|
|
20
20
|
});
|
|
21
|
-
return
|
|
22
|
-
...
|
|
21
|
+
return u({
|
|
22
|
+
...i(p, {
|
|
23
23
|
authEpoch: l,
|
|
24
|
-
organizationStatus:
|
|
24
|
+
organizationStatus: d
|
|
25
25
|
}),
|
|
26
|
-
enabled:
|
|
26
|
+
enabled: f
|
|
27
27
|
});
|
|
28
28
|
}
|
|
29
|
-
function
|
|
30
|
-
let { client: e, organizationId: t } =
|
|
31
|
-
return
|
|
29
|
+
function f() {
|
|
30
|
+
let { client: e, organizationId: t } = o();
|
|
31
|
+
return l({
|
|
32
32
|
mutationFn: async ({ path: r, body: i }) => {
|
|
33
33
|
let { data: a } = await n({
|
|
34
34
|
client: e,
|
|
35
|
-
headers:
|
|
35
|
+
headers: s(t),
|
|
36
36
|
path: r,
|
|
37
37
|
body: i,
|
|
38
38
|
throwOnError: !0
|
|
@@ -40,7 +40,7 @@ function m() {
|
|
|
40
40
|
return a;
|
|
41
41
|
},
|
|
42
42
|
onSuccess: async (n, r) => {
|
|
43
|
-
await
|
|
43
|
+
await a(c({
|
|
44
44
|
client: e,
|
|
45
45
|
organizationId: t,
|
|
46
46
|
counterpartId: r.path.counterpart_id
|
|
@@ -48,13 +48,13 @@ function m() {
|
|
|
48
48
|
}
|
|
49
49
|
});
|
|
50
50
|
}
|
|
51
|
-
function
|
|
52
|
-
let { client: e, organizationId: n } =
|
|
53
|
-
return
|
|
51
|
+
function p() {
|
|
52
|
+
let { client: e, organizationId: n } = o();
|
|
53
|
+
return l({
|
|
54
54
|
mutationFn: async ({ path: r, body: i }) => {
|
|
55
55
|
let { data: a } = await t({
|
|
56
56
|
client: e,
|
|
57
|
-
headers:
|
|
57
|
+
headers: s(n),
|
|
58
58
|
path: r,
|
|
59
59
|
body: i,
|
|
60
60
|
throwOnError: !0
|
|
@@ -62,7 +62,7 @@ function h() {
|
|
|
62
62
|
return a;
|
|
63
63
|
},
|
|
64
64
|
onSuccess: async (t, r) => {
|
|
65
|
-
await
|
|
65
|
+
await a(c({
|
|
66
66
|
client: e,
|
|
67
67
|
organizationId: n,
|
|
68
68
|
counterpartId: r.path.counterpart_id
|
|
@@ -70,19 +70,19 @@ function h() {
|
|
|
70
70
|
}
|
|
71
71
|
});
|
|
72
72
|
}
|
|
73
|
-
function
|
|
74
|
-
let { client: t, organizationId: n } =
|
|
75
|
-
return
|
|
73
|
+
function m() {
|
|
74
|
+
let { client: t, organizationId: n } = o();
|
|
75
|
+
return l({
|
|
76
76
|
mutationFn: async ({ path: r }) => {
|
|
77
77
|
await e({
|
|
78
78
|
client: t,
|
|
79
|
-
headers:
|
|
79
|
+
headers: s(n),
|
|
80
80
|
path: r,
|
|
81
81
|
throwOnError: !0
|
|
82
82
|
});
|
|
83
83
|
},
|
|
84
84
|
onSuccess: async (e, r) => {
|
|
85
|
-
await
|
|
85
|
+
await a(c({
|
|
86
86
|
client: t,
|
|
87
87
|
organizationId: n,
|
|
88
88
|
counterpartId: r.path.counterpart_id
|
|
@@ -90,29 +90,5 @@ function g() {
|
|
|
90
90
|
}
|
|
91
91
|
});
|
|
92
92
|
}
|
|
93
|
-
function _() {
|
|
94
|
-
let { client: e, organizationId: t } = s();
|
|
95
|
-
return d({
|
|
96
|
-
mutationFn: async ({ path: n }) => {
|
|
97
|
-
await r({
|
|
98
|
-
client: e,
|
|
99
|
-
headers: c(t),
|
|
100
|
-
path: n,
|
|
101
|
-
throwOnError: !0
|
|
102
|
-
});
|
|
103
|
-
},
|
|
104
|
-
onSuccess: async (n, r) => {
|
|
105
|
-
await Promise.all([o(l({
|
|
106
|
-
client: e,
|
|
107
|
-
organizationId: t,
|
|
108
|
-
counterpartId: r.path.counterpart_id
|
|
109
|
-
})), o(u({
|
|
110
|
-
client: e,
|
|
111
|
-
organizationId: t,
|
|
112
|
-
counterpartId: r.path.counterpart_id
|
|
113
|
-
}))]);
|
|
114
|
-
}
|
|
115
|
-
});
|
|
116
|
-
}
|
|
117
93
|
//#endregion
|
|
118
|
-
export {
|
|
94
|
+
export { d as useCounterpartBankAccountsQuery, f as useCreateCounterpartBankAccountMutation, m as useDeleteCounterpartBankAccountMutation, p as useUpdateCounterpartBankAccountMutation };
|
|
@@ -5,18 +5,18 @@ import { BankAccountFormSheet as r } from "../../ui/dist/index12.js";
|
|
|
5
5
|
import { ConfirmDeleteDialog as i } from "../../ui/dist/index15.js";
|
|
6
6
|
import "../../ui/dist/index.js";
|
|
7
7
|
import { COUNTERPART_MESSAGE_LABELS_EN as a } from "./lib/labels.js";
|
|
8
|
-
import { addressResponseToFormValues as o,
|
|
9
|
-
import { useCounterpartQuery as
|
|
10
|
-
import { useCreateCounterpartBankAccountMutation as
|
|
11
|
-
import { useCounterpartAddressesForRowsQuery as
|
|
8
|
+
import { addressResponseToFormValues as o, bankAccountToAchFormValues as s, buildAnalyticsMap as c, buildCounterpartFormTaxIdField as l, buildCounterpartRows as u, counterpartFormBankAccountToCreatePayload as d, counterpartFormBankAccountToUpdatePayload as f, counterpartToFormValues as p, emptyCounterpartFormValues as m, formatMoney as h, getAchInstructions as g, getCounterpartEmail as _, getCounterpartName as v, getPayableAchInstructions as y, hasCounterpartFormErrors as b, hasSelectedText as x, isAchCompatibleBankAccount as S, resolveCounterpartBankAccountWrite as C, validateAchFormValues as w, validateCounterpartForm as T } from "./lib/helpers.js";
|
|
9
|
+
import { useCounterpartQuery as E, useCounterpartsByIdsQuery as D, useCounterpartsQuery as O, useCreateCounterpartMutation as k } from "../../data-access/dist/index3.js";
|
|
10
|
+
import { useCreateCounterpartBankAccountMutation as A, useUpdateCounterpartBankAccountMutation as j } from "../../data-access/dist/index5.js";
|
|
11
|
+
import { useCounterpartAddressesForRowsQuery as M, useCounterpartAddressesQuery as N } from "../../data-access/dist/index7.js";
|
|
12
12
|
import "../../data-access/dist/index.js";
|
|
13
|
-
import { useAddressForm as
|
|
14
|
-
import { useCounterpartDetails as
|
|
15
|
-
import { usePayableAchInstructions as
|
|
16
|
-
import { useCounterpartForm as
|
|
13
|
+
import { useAddressForm as P } from "./lib/useAddressForm.js";
|
|
14
|
+
import { useCounterpartDetails as F } from "./lib/useCounterpartDetails.js";
|
|
15
|
+
import { usePayableAchInstructions as I } from "./lib/usePayableAchInstructions.js";
|
|
16
|
+
import { useCounterpartForm as L } from "./lib/useCounterpartForm.js";
|
|
17
17
|
import "./lib/useCounterpartSelector.js";
|
|
18
18
|
import "./lib/CounterpartSelector.js";
|
|
19
|
-
import { useDeleteController as
|
|
19
|
+
import { useDeleteController as R } from "./lib/useDeleteController.js";
|
|
20
20
|
import "./lib/useSubEntityForm.js";
|
|
21
|
-
import { useBankAccountForm as
|
|
22
|
-
export { r as BankAccountFormSheet, a as COUNTERPART_MESSAGE_LABELS_EN, i as ConfirmDeleteDialog, e as CounterpartFormFields, t as CounterpartFormSheet, o as addressResponseToFormValues, s as
|
|
21
|
+
import { useBankAccountForm as z } from "./lib/subEntityForms.js";
|
|
22
|
+
export { r as BankAccountFormSheet, a as COUNTERPART_MESSAGE_LABELS_EN, i as ConfirmDeleteDialog, e as CounterpartFormFields, t as CounterpartFormSheet, o as addressResponseToFormValues, s as bankAccountToAchFormValues, c as buildAnalyticsMap, l as buildCounterpartFormTaxIdField, u as buildCounterpartRows, d as counterpartFormBankAccountToCreatePayload, f as counterpartFormBankAccountToUpdatePayload, p as counterpartToFormValues, m as emptyCounterpartFormValues, h as formatMoney, g as getAchInstructions, _ as getCounterpartEmail, v as getCounterpartName, y as getPayableAchInstructions, b as hasCounterpartFormErrors, x as hasSelectedText, S as isAchCompatibleBankAccount, C as resolveCounterpartBankAccountWrite, P as useAddressForm, z as useBankAccountForm, M as useCounterpartAddressesForRowsQuery, N as useCounterpartAddressesQuery, F as useCounterpartDetails, L as useCounterpartForm, E as useCounterpartQuery, D as useCounterpartsByIdsQuery, O as useCounterpartsQuery, A as useCreateCounterpartBankAccountMutation, k as useCreateCounterpartMutation, R as useDeleteController, n as useFocusFirstInvalidField, I as usePayableAchInstructions, j as useUpdateCounterpartBankAccountMutation, w as validateAchFormValues, T as validateCounterpartForm };
|