@tesouro/embedded-components-react 0.2.240 → 0.2.241
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/libs/tesouro-embedded-components-react/gl-code-table-widget/data-access/dist/index.js +4 -3
- package/dist/libs/tesouro-embedded-components-react/gl-code-table-widget/data-access/dist/index2.js +7 -20
- package/dist/libs/tesouro-embedded-components-react/gl-code-table-widget/data-access/dist/index3.js +75 -7
- package/dist/libs/tesouro-embedded-components-react/gl-code-table-widget/feature/dist/index7.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/gl-code-table-widget/feature/dist/index8.js +25 -25
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/data-access/dist/index.js +8 -6
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/data-access/dist/index7.js +1 -25
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index9.js +19 -19
- package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/index.js +13 -11
- package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/reference-data/useLedgerAccountsQuery.js +23 -0
- package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/reference-data/usePaymentTermsQuery.js +22 -0
- 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/analytics/expectedApiNotFound.js +2 -1
- package/package.json +1 -1
- package/dist/libs/tesouro-embedded-components-react/gl-code-table-widget/data-access/dist/index4.js +0 -78
package/dist/libs/tesouro-embedded-components-react/gl-code-table-widget/data-access/dist/index.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import "
|
|
3
|
-
import
|
|
1
|
+
import { useLedgerAccountsQuery as e } from "../../../shared/data-access/dist/lib/reference-data/useLedgerAccountsQuery.js";
|
|
2
|
+
import "../../../shared/data-access/dist/index.js";
|
|
3
|
+
import "./index2.js";
|
|
4
|
+
import { useCreateLedgerAccountMutation as t, useDeleteLedgerAccountMutation as n, useUpdateLedgerAccountMutation as r } from "./index3.js";
|
|
4
5
|
export { t as useCreateLedgerAccountMutation, n as useDeleteLedgerAccountMutation, e as useGetLedgerAccountsQuery, r as useUpdateLedgerAccountMutation };
|
package/dist/libs/tesouro-embedded-components-react/gl-code-table-widget/data-access/dist/index2.js
CHANGED
|
@@ -1,23 +1,10 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
"use client";
|
|
4
|
-
"use client";
|
|
5
|
-
import { useEmbedApi as e } from "../../../shared/data-access/dist/lib/EmbedApiContext.js";
|
|
6
|
-
import { getLedgerAccountsOptions as t } from "../../../shared/data-access/dist/lib/rest/@tanstack/react-query.gen.js";
|
|
7
|
-
import { withAuthEpoch as n } from "../../../shared/data-access/dist/lib/withAuthEpoch.js";
|
|
1
|
+
import { organizationHeaders as e } from "../../../shared/data-access/dist/lib/organizationHeaders.js";
|
|
2
|
+
import { getLedgerAccountsQueryKey as t } from "../../../shared/data-access/dist/lib/rest/@tanstack/react-query.gen.js";
|
|
8
3
|
import "../../../shared/data-access/dist/index.js";
|
|
9
|
-
import { useQuery as r } from "@tanstack/react-query";
|
|
10
4
|
//#region ../../libs/tesouro-embedded-components-react/gl-code-table-widget/data-access/dist/index2.js
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
headers: { "x-organization-id": s ?? "" }
|
|
16
|
-
});
|
|
17
|
-
return r({
|
|
18
|
-
...n(d, l),
|
|
19
|
-
enabled: u
|
|
20
|
-
});
|
|
21
|
-
}
|
|
5
|
+
var n = ({ client: n, organizationId: r }) => t({
|
|
6
|
+
client: n,
|
|
7
|
+
headers: e(r)
|
|
8
|
+
});
|
|
22
9
|
//#endregion
|
|
23
|
-
export {
|
|
10
|
+
export { n as ledgerAccountsInvalidationKey };
|
package/dist/libs/tesouro-embedded-components-react/gl-code-table-widget/data-access/dist/index3.js
CHANGED
|
@@ -1,10 +1,78 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
"use client";
|
|
2
|
+
"use client";
|
|
3
|
+
"use client";
|
|
4
|
+
"use client";
|
|
5
|
+
import { invalidateAllClients as e } from "../../../shared/data-access/dist/lib/clientRegistry.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";
|
|
8
|
+
import { deleteLedgerAccountsIdMutation as r, patchLedgerAccountsIdMutation as i, postLedgerAccountsMutation as a } from "../../../shared/data-access/dist/lib/rest/@tanstack/react-query.gen.js";
|
|
3
9
|
import "../../../shared/data-access/dist/index.js";
|
|
10
|
+
import { ledgerAccountsInvalidationKey as o } from "./index2.js";
|
|
11
|
+
import { useMutation as s } from "@tanstack/react-query";
|
|
4
12
|
//#region ../../libs/tesouro-embedded-components-react/gl-code-table-widget/data-access/dist/index3.js
|
|
5
|
-
|
|
6
|
-
client: n,
|
|
7
|
-
|
|
8
|
-
|
|
13
|
+
function c() {
|
|
14
|
+
let { client: r, organizationId: i } = t(), c = n(i), l = s({
|
|
15
|
+
...a({
|
|
16
|
+
client: r,
|
|
17
|
+
headers: c
|
|
18
|
+
}),
|
|
19
|
+
onSuccess: async () => {
|
|
20
|
+
await e(o({
|
|
21
|
+
client: r,
|
|
22
|
+
organizationId: i
|
|
23
|
+
}));
|
|
24
|
+
}
|
|
25
|
+
});
|
|
26
|
+
return {
|
|
27
|
+
createLedgerAccount: (e) => l.mutateAsync({
|
|
28
|
+
headers: c,
|
|
29
|
+
body: e
|
|
30
|
+
}),
|
|
31
|
+
isPending: l.isPending
|
|
32
|
+
};
|
|
33
|
+
}
|
|
34
|
+
function l() {
|
|
35
|
+
let { client: r, organizationId: a } = t(), c = n(a), l = s({
|
|
36
|
+
...i({
|
|
37
|
+
client: r,
|
|
38
|
+
headers: c
|
|
39
|
+
}),
|
|
40
|
+
onSuccess: async () => {
|
|
41
|
+
await e(o({
|
|
42
|
+
client: r,
|
|
43
|
+
organizationId: a
|
|
44
|
+
}));
|
|
45
|
+
}
|
|
46
|
+
});
|
|
47
|
+
return {
|
|
48
|
+
updateLedgerAccount: (e, t) => l.mutateAsync({
|
|
49
|
+
headers: c,
|
|
50
|
+
path: { ledger_account_id: e },
|
|
51
|
+
body: t
|
|
52
|
+
}),
|
|
53
|
+
isPending: l.isPending
|
|
54
|
+
};
|
|
55
|
+
}
|
|
56
|
+
function u() {
|
|
57
|
+
let { client: i, organizationId: a } = t(), c = n(a), l = s({
|
|
58
|
+
...r({
|
|
59
|
+
client: i,
|
|
60
|
+
headers: c
|
|
61
|
+
}),
|
|
62
|
+
onSuccess: async () => {
|
|
63
|
+
await e(o({
|
|
64
|
+
client: i,
|
|
65
|
+
organizationId: a
|
|
66
|
+
}));
|
|
67
|
+
}
|
|
68
|
+
});
|
|
69
|
+
return {
|
|
70
|
+
deleteLedgerAccount: (e) => l.mutateAsync({
|
|
71
|
+
headers: c,
|
|
72
|
+
path: { ledger_account_id: e }
|
|
73
|
+
}),
|
|
74
|
+
isPending: l.isPending
|
|
75
|
+
};
|
|
76
|
+
}
|
|
9
77
|
//#endregion
|
|
10
|
-
export {
|
|
78
|
+
export { c as useCreateLedgerAccountMutation, u as useDeleteLedgerAccountMutation, l as useUpdateLedgerAccountMutation };
|
package/dist/libs/tesouro-embedded-components-react/gl-code-table-widget/feature/dist/index7.js
CHANGED
|
@@ -10,7 +10,7 @@ import { ACCOUNT_DELETE_DIALOG_LABELS_EN as r, ACCOUNT_FORM_SHEET_LABELS_EN as i
|
|
|
10
10
|
import "../../ui/dist/index.js";
|
|
11
11
|
import { ACCOUNT_FIELD_LIMITS as a } from "./index4.js";
|
|
12
12
|
import { hasFormErrors as o, validateAccountForm as s } from "./index6.js";
|
|
13
|
-
import { useCreateLedgerAccountMutation as c, useDeleteLedgerAccountMutation as l, useUpdateLedgerAccountMutation as u } from "../../data-access/dist/
|
|
13
|
+
import { useCreateLedgerAccountMutation as c, useDeleteLedgerAccountMutation as l, useUpdateLedgerAccountMutation as u } from "../../data-access/dist/index3.js";
|
|
14
14
|
import "../../data-access/dist/index.js";
|
|
15
15
|
import { useCallback as d, useMemo as f, useRef as p, useState as m } from "react";
|
|
16
16
|
//#region ../../libs/tesouro-embedded-components-react/gl-code-table-widget/feature/dist/index7.js
|
package/dist/libs/tesouro-embedded-components-react/gl-code-table-widget/feature/dist/index8.js
CHANGED
|
@@ -2,19 +2,19 @@
|
|
|
2
2
|
"use client";
|
|
3
3
|
"use client";
|
|
4
4
|
"use client";
|
|
5
|
-
import {
|
|
5
|
+
import { useLedgerAccountsQuery as e } from "../../../shared/data-access/dist/lib/reference-data/useLedgerAccountsQuery.js";
|
|
6
|
+
import { EmbeddedToaster as t } from "../../../shared/ui/dist/lib/EmbeddedToaster.js";
|
|
6
7
|
import "../../../shared/ui/dist/index.js";
|
|
7
|
-
import { useAnalyticsTrack as
|
|
8
|
-
import { WidgetProvider as
|
|
9
|
-
import { useWidgetConfig as
|
|
8
|
+
import { useAnalyticsTrack as n } from "../../../shared/feature/dist/lib/analytics/hooks.js";
|
|
9
|
+
import { WidgetProvider as r } from "../../../shared/feature/dist/lib/WidgetProvider/WidgetProvider.js";
|
|
10
|
+
import { useWidgetConfig as i } from "../../../shared/feature/dist/lib/WidgetProvider/hooks.js";
|
|
10
11
|
import "../../../shared/feature/dist/index.js";
|
|
11
|
-
import { GlCodeTableAnalyticsEvent as
|
|
12
|
-
import { getChartOfAccountsPermissions as
|
|
13
|
-
import { ChartOfAccountsTable as
|
|
14
|
-
import { AccountFormSheet as
|
|
15
|
-
import { AccountDeleteDialog as
|
|
12
|
+
import { GlCodeTableAnalyticsEvent as a, WIDGET_NAME as o } from "./index2.js";
|
|
13
|
+
import { getChartOfAccountsPermissions as s } from "./index3.js";
|
|
14
|
+
import { ChartOfAccountsTable as c } from "../../ui/dist/index3.js";
|
|
15
|
+
import { AccountFormSheet as l } from "../../ui/dist/index4.js";
|
|
16
|
+
import { AccountDeleteDialog as u } from "../../ui/dist/index5.js";
|
|
16
17
|
import "../../ui/dist/index.js";
|
|
17
|
-
import { useGetLedgerAccountsQuery as u } from "../../data-access/dist/index2.js";
|
|
18
18
|
import "../../data-access/dist/index.js";
|
|
19
19
|
import { useChartOfAccountsCrud as d } from "./index7.js";
|
|
20
20
|
import { useCallback as f, useEffect as p, useMemo as m, useState as h } from "react";
|
|
@@ -26,20 +26,20 @@ var y = [
|
|
|
26
26
|
50,
|
|
27
27
|
100
|
|
28
28
|
];
|
|
29
|
-
function b({ onEdit:
|
|
30
|
-
let E =
|
|
29
|
+
function b({ onEdit: r, onDelete: o, onAdd: b, screenLabels: x, formLabels: S, deleteLabels: C, messageLabels: w, ...T }) {
|
|
30
|
+
let E = n();
|
|
31
31
|
p(() => {
|
|
32
|
-
E(
|
|
32
|
+
E(a.Mounted);
|
|
33
33
|
}, [E]);
|
|
34
|
-
let { initResponse: D } =
|
|
34
|
+
let { initResponse: D } = i(), { canWrite: O } = m(() => s(D?.scopes), [D?.scopes]), k = d({
|
|
35
35
|
canWrite: O,
|
|
36
36
|
labels: w,
|
|
37
37
|
formLabels: S,
|
|
38
38
|
deleteLabels: C
|
|
39
|
-
}), A = O ?
|
|
39
|
+
}), A = O ? r ?? k.openEdit : void 0, j = O ? o ?? k.requestDelete : void 0, M = O ? b ?? k.openCreate : void 0, N = o || k.form.mode !== "edit" ? void 0 : k.requestDeleteFromForm, [P, F] = h([{
|
|
40
40
|
id: "name",
|
|
41
41
|
desc: !1
|
|
42
|
-
}]), [I, L] = h(10), [R, z] = h(), B = P[0]?.desc ? "desc" : "asc", { isLoading: V, isError: H, data: U } =
|
|
42
|
+
}]), [I, L] = h(10), [R, z] = h(), B = P[0]?.desc ? "desc" : "asc", { isLoading: V, isError: H, data: U } = e({
|
|
43
43
|
sort: "name",
|
|
44
44
|
order: B,
|
|
45
45
|
limit: I,
|
|
@@ -60,7 +60,7 @@ function b({ onEdit: n, onDelete: a, onAdd: b, screenLabels: x, formLabels: S, d
|
|
|
60
60
|
}, [U?.next_pagination_token]), J = f(() => {
|
|
61
61
|
z(U?.prev_pagination_token);
|
|
62
62
|
}, [U?.prev_pagination_token]);
|
|
63
|
-
return /* @__PURE__ */ v(g, { children: [/* @__PURE__ */ _(
|
|
63
|
+
return /* @__PURE__ */ v(g, { children: [/* @__PURE__ */ _(c, {
|
|
64
64
|
...T,
|
|
65
65
|
labels: x,
|
|
66
66
|
isLoading: V,
|
|
@@ -80,8 +80,8 @@ function b({ onEdit: n, onDelete: a, onAdd: b, screenLabels: x, formLabels: S, d
|
|
|
80
80
|
onDelete: j,
|
|
81
81
|
onAdd: M
|
|
82
82
|
}), O && /* @__PURE__ */ v(g, { children: [
|
|
83
|
-
/* @__PURE__ */ _(
|
|
84
|
-
/* @__PURE__ */ _(
|
|
83
|
+
/* @__PURE__ */ _(t, {}),
|
|
84
|
+
/* @__PURE__ */ _(l, {
|
|
85
85
|
labels: S,
|
|
86
86
|
open: k.form.open,
|
|
87
87
|
onOpenChange: k.form.onOpenChange,
|
|
@@ -99,7 +99,7 @@ function b({ onEdit: n, onDelete: a, onAdd: b, screenLabels: x, formLabels: S, d
|
|
|
99
99
|
onCancel: k.form.onCancel,
|
|
100
100
|
onDelete: N
|
|
101
101
|
}),
|
|
102
|
-
/* @__PURE__ */ _(
|
|
102
|
+
/* @__PURE__ */ _(u, {
|
|
103
103
|
labels: C,
|
|
104
104
|
open: k.deleteDialog.open,
|
|
105
105
|
onOpenChange: k.deleteDialog.onOpenChange,
|
|
@@ -111,14 +111,14 @@ function b({ onEdit: n, onDelete: a, onAdd: b, screenLabels: x, formLabels: S, d
|
|
|
111
111
|
})
|
|
112
112
|
] })] });
|
|
113
113
|
}
|
|
114
|
-
function x({ baseUrl: e, widgetToken: t, organizationId:
|
|
115
|
-
return /* @__PURE__ */ _(
|
|
116
|
-
widgetName:
|
|
114
|
+
function x({ baseUrl: e, widgetToken: t, organizationId: n, configClient: i, linkComponent: a, implementation: s, uiFramework: c, analytics: l, errorFallback: u, onError: d, ...f }) {
|
|
115
|
+
return /* @__PURE__ */ _(r, {
|
|
116
|
+
widgetName: o,
|
|
117
117
|
baseUrl: e,
|
|
118
118
|
widgetToken: t,
|
|
119
|
-
organizationId:
|
|
119
|
+
organizationId: n,
|
|
120
120
|
configClient: i,
|
|
121
|
-
linkComponent:
|
|
121
|
+
linkComponent: a,
|
|
122
122
|
implementation: s,
|
|
123
123
|
uiFramework: c,
|
|
124
124
|
analytics: l,
|
package/dist/libs/tesouro-embedded-components-react/invoicing-widget/data-access/dist/index.js
CHANGED
|
@@ -1,7 +1,9 @@
|
|
|
1
|
+
import { usePaymentTermsQuery as e } from "../../../shared/data-access/dist/lib/reference-data/usePaymentTermsQuery.js";
|
|
2
|
+
import "../../../shared/data-access/dist/index.js";
|
|
1
3
|
import "./index2.js";
|
|
2
|
-
import { useSendReceivableEmailMutation as
|
|
3
|
-
import { useAcceptReceivableMutation as
|
|
4
|
-
import { useMarkReceivablePaidMutation as
|
|
5
|
-
import { useReceivableHistoryQuery as
|
|
6
|
-
import
|
|
7
|
-
export {
|
|
4
|
+
import { useSendReceivableEmailMutation as t } from "./index3.js";
|
|
5
|
+
import { useAcceptReceivableMutation as n, useCancelReceivableMutation as r, useCloneReceivableMutation as i, useCreateReceivableMutation as a, useDeclineReceivableMutation as o, useDeleteReceivableMutation as s, useIssueReceivableMutation as c, useReplaceReceivableLineItemsMutation as l, useUpdateReceivableMutation as u } from "./index4.js";
|
|
6
|
+
import { useMarkReceivablePaidMutation as d, useMarkReceivablePartiallyPaidMutation as f, useMarkReceivableUncollectibleMutation as p } from "./index5.js";
|
|
7
|
+
import { useReceivableHistoryQuery as m, useReceivableMailsQuery as h, useReceivablePdfLinkQuery as g, useReceivableQuery as _, useReceivablesQuery as v } from "./index6.js";
|
|
8
|
+
import "./index7.js";
|
|
9
|
+
export { n as useAcceptReceivableMutation, r as useCancelReceivableMutation, i as useCloneReceivableMutation, a as useCreateReceivableMutation, o as useDeclineReceivableMutation, s as useDeleteReceivableMutation, c as useIssueReceivableMutation, d as useMarkReceivablePaidMutation, f as useMarkReceivablePartiallyPaidMutation, p as useMarkReceivableUncollectibleMutation, e as usePaymentTermsQuery, m as useReceivableHistoryQuery, h as useReceivableMailsQuery, g as useReceivablePdfLinkQuery, _ as useReceivableQuery, v as useReceivablesQuery, l as useReplaceReceivableLineItemsMutation, t as useSendReceivableEmailMutation, u as useUpdateReceivableMutation };
|
package/dist/libs/tesouro-embedded-components-react/invoicing-widget/data-access/dist/index7.js
CHANGED
|
@@ -2,30 +2,6 @@
|
|
|
2
2
|
"use client";
|
|
3
3
|
"use client";
|
|
4
4
|
"use client";
|
|
5
|
-
import { useEmbedApi as e } from "../../../shared/data-access/dist/lib/EmbedApiContext.js";
|
|
6
|
-
import { organizationHeaders as t } from "../../../shared/data-access/dist/lib/organizationHeaders.js";
|
|
7
|
-
import { getPaymentTermsOptions as n } from "../../../shared/data-access/dist/lib/rest/@tanstack/react-query.gen.js";
|
|
8
|
-
import { withAuthEpoch as r } from "../../../shared/data-access/dist/lib/withAuthEpoch.js";
|
|
9
5
|
import "../../../shared/data-access/dist/index.js";
|
|
10
6
|
import "./index2.js";
|
|
11
|
-
import
|
|
12
|
-
//#region ../../libs/tesouro-embedded-components-react/invoicing-widget/data-access/dist/index7.js
|
|
13
|
-
function a() {
|
|
14
|
-
let t = e();
|
|
15
|
-
return {
|
|
16
|
-
...t,
|
|
17
|
-
isEnabled: !!(t.organizationId && t.widgetToken)
|
|
18
|
-
};
|
|
19
|
-
}
|
|
20
|
-
function o() {
|
|
21
|
-
let { client: e, organizationId: o, authEpoch: s, isEnabled: c } = a(), l = n({
|
|
22
|
-
client: e,
|
|
23
|
-
headers: t(o)
|
|
24
|
-
});
|
|
25
|
-
return i({
|
|
26
|
-
...r(l, s),
|
|
27
|
-
enabled: c
|
|
28
|
-
});
|
|
29
|
-
}
|
|
30
|
-
//#endregion
|
|
31
|
-
export { o as usePaymentTermsQuery };
|
|
7
|
+
import "@tanstack/react-query";
|
|
@@ -2,31 +2,31 @@
|
|
|
2
2
|
"use client";
|
|
3
3
|
"use client";
|
|
4
4
|
"use client";
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
5
|
+
import { usePaymentTermsQuery as e } from "../../../shared/data-access/dist/lib/reference-data/usePaymentTermsQuery.js";
|
|
6
|
+
import { getStateOptions as t } from "../../../shared/util/dist/index11.js";
|
|
7
|
+
import { extractApiErrorMessage as n } from "../../../shared/util/dist/index14.js";
|
|
8
|
+
import { COUNTERPART_MESSAGE_LABELS_EN as r } from "../../../shared/counterpart-management/feature/dist/lib/labels.js";
|
|
9
|
+
import { useCounterpartAddressesQuery as i } from "../../../shared/counterpart-management/data-access/dist/index7.js";
|
|
10
|
+
import { useCounterpartForm as ee } from "../../../shared/counterpart-management/feature/dist/lib/useCounterpartForm.js";
|
|
10
11
|
import "../../../shared/counterpart-management/feature/dist/index.js";
|
|
11
|
-
import { createEmptyReceivableFormValues as a, createLineItem as o, getPaymentTermOptions as s, hasReceivableFormErrors as c, receivableFormValuesToCreatePayload as l, receivableFormValuesToLineItemsPayload as
|
|
12
|
-
import { useCreateReceivableMutation as p, useReplaceReceivableLineItemsMutation as
|
|
13
|
-
import { usePaymentTermsQuery as ne } from "../../data-access/dist/index7.js";
|
|
12
|
+
import { createEmptyReceivableFormValues as a, createLineItem as o, getPaymentTermOptions as s, hasReceivableFormErrors as c, receivableFormValuesToCreatePayload as l, receivableFormValuesToLineItemsPayload as te, receivableFormValuesToUpdatePayload as u, receivableToFormValues as d, validateReceivableForm as f } from "./index5.js";
|
|
13
|
+
import { useCreateReceivableMutation as p, useReplaceReceivableLineItemsMutation as ne, useUpdateReceivableMutation as re } from "../../data-access/dist/index4.js";
|
|
14
14
|
import "../../data-access/dist/index.js";
|
|
15
|
-
import { PRODUCT_MESSAGE_LABELS_EN as
|
|
16
|
-
import { EMPTY_PRODUCT_FORM_VALUES as
|
|
15
|
+
import { PRODUCT_MESSAGE_LABELS_EN as ie } from "../../../shared/product-catalog/feature/dist/lib/labels.js";
|
|
16
|
+
import { EMPTY_PRODUCT_FORM_VALUES as m, getCurrencyOptions as h } from "../../../shared/product-catalog/feature/dist/lib/helpers.js";
|
|
17
17
|
import { useMeasureUnits as g } from "../../../shared/product-catalog/feature/dist/lib/useMeasureUnits.js";
|
|
18
18
|
import { useProductForm as _ } from "../../../shared/product-catalog/feature/dist/lib/useProductForm.js";
|
|
19
19
|
import "../../../shared/product-catalog/feature/dist/index.js";
|
|
20
20
|
import { useCallback as v, useMemo as y, useState as b } from "react";
|
|
21
21
|
//#region ../../libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index9.js
|
|
22
22
|
function x({ messages: x, productMessageLabels: S, counterpartMessageLabels: C, onCreated: w }) {
|
|
23
|
-
let T = p(), E =
|
|
24
|
-
...
|
|
23
|
+
let T = p(), E = re(), D = ne(), O = e(), [k, A] = b(!1), [j, M] = b("create"), [N, P] = b(), [F, I] = b(() => a()), [L, R] = b({}), [z, B] = b("none"), [V, H] = b("none"), [U, W] = b(), G = g(), K = y(() => t(), []), q = y(() => ({
|
|
24
|
+
...ie,
|
|
25
25
|
...S
|
|
26
26
|
}), [S]), J = y(() => ({
|
|
27
|
-
...
|
|
27
|
+
...r,
|
|
28
28
|
...C
|
|
29
|
-
}), [C]), Y =
|
|
29
|
+
}), [C]), Y = i(F.customerId), ae = Y.data?.data?.[0], X = Y.data?.data?.[0]?.id, Z = _({
|
|
30
30
|
view: z,
|
|
31
31
|
setView: B,
|
|
32
32
|
selectedProductId: U,
|
|
@@ -38,7 +38,7 @@ function x({ messages: x, productMessageLabels: S, counterpartMessageLabels: C,
|
|
|
38
38
|
...t,
|
|
39
39
|
customerId: e ?? ""
|
|
40
40
|
}));
|
|
41
|
-
}, []), Q =
|
|
41
|
+
}, []), Q = ee({
|
|
42
42
|
view: V,
|
|
43
43
|
setView: H,
|
|
44
44
|
selectedId: F.customerId || void 0,
|
|
@@ -97,13 +97,13 @@ function x({ messages: x, productMessageLabels: S, counterpartMessageLabels: C,
|
|
|
97
97
|
let e = { receivable_id: N };
|
|
98
98
|
await E.mutateAsync({
|
|
99
99
|
path: e,
|
|
100
|
-
body:
|
|
100
|
+
body: u({
|
|
101
101
|
values: F,
|
|
102
102
|
billingAddressId: X ?? ""
|
|
103
103
|
})
|
|
104
104
|
}), await D.mutateAsync({
|
|
105
105
|
path: e,
|
|
106
|
-
body:
|
|
106
|
+
body: te(F)
|
|
107
107
|
}), A(!1), $();
|
|
108
108
|
return;
|
|
109
109
|
}
|
|
@@ -113,7 +113,7 @@ function x({ messages: x, productMessageLabels: S, counterpartMessageLabels: C,
|
|
|
113
113
|
}) });
|
|
114
114
|
A(!1), $(), e?.id && w?.(e.id, e.type);
|
|
115
115
|
} catch (e) {
|
|
116
|
-
R({ form:
|
|
116
|
+
R({ form: n(e) ?? x.genericError });
|
|
117
117
|
}
|
|
118
118
|
}, [
|
|
119
119
|
X,
|
|
@@ -153,7 +153,7 @@ function x({ messages: x, productMessageLabels: S, counterpartMessageLabels: C,
|
|
|
153
153
|
stateOptions: K,
|
|
154
154
|
openProductCreate: Z.openCreate,
|
|
155
155
|
openCounterpartCreate: Q.openCreate,
|
|
156
|
-
productCreateValues: z === "create" ? Z.values :
|
|
156
|
+
productCreateValues: z === "create" ? Z.values : m
|
|
157
157
|
};
|
|
158
158
|
}
|
|
159
159
|
//#endregion
|
|
@@ -7,20 +7,22 @@ import { optionalOrganizationHeaders as c, organizationHeaders as l } from "./li
|
|
|
7
7
|
import { bulkUpdateDepartmentMembers as u, bulkUpdateLocationMembers as d, bulkUpdateRoleMembers as f, createDepartment as p, createLocation as m, createUser as h, deactivateDepartment as g, deactivateLocation as _, deleteCounterpartsId as v, deleteCounterpartsIdBankAccountsId as y, deleteMeasureUnitsId as b, deleteProductsId as x, deleteReceivablesId as S, deleteTagsId as C, downloadBankAccountTransactions as w, getApplicationStatus as T, getApprovalPolicies as E, getBankAccountAccess as D, getDepartment as O, getExternalBankAccountAccess as k, getLocation as A, getUsers as j, listDepartments as M, listLocations as N, listRoles as P, manageBankAccountAccess as F, patchCounterpartsId as I, patchCounterpartsIdAddressesId as L, patchCounterpartsIdBankAccountsId as R, patchMeasureUnitsId as z, patchProductsId as B, patchReceivablesId as V, patchTagsId as H, postCounterparts as U, postCounterpartsIdAddresses as W, postCounterpartsIdBankAccounts as G, postCounterpartsIdBankAccountsIdMakeDefault as K, postMeasureUnits as q, postProducts as J, postReceivables as Y, postReceivablesIdAccept as X, postReceivablesIdCancel as Z, postReceivablesIdClone as Q, postReceivablesIdDecline as $, postReceivablesIdIssue as ee, postReceivablesIdMarkAsPaid as te, postReceivablesIdMarkAsPartiallyPaid as ne, postReceivablesIdMarkAsUncollectible as re, postReceivablesIdSend as ie, postTags as ae, putReceivablesIdLineItems as oe, updateDepartment as se, updateLocation as ce, updateUser as le } from "./lib/rest/sdk.gen.js";
|
|
8
8
|
import { fetchWidgetInit as ue } from "./lib/fetchWidgetInit.js";
|
|
9
9
|
import { hasAnyScope as de } from "./lib/hasAnyScope.js";
|
|
10
|
-
import { acceptDisclosuresMutation as fe, connectExternalBankAccountMutation as pe, createAchMoneyMovementMutation as me, createApplicationMutation as he, createBankAccountMutation as ge, createBookTransferMutation as _e, deleteApprovalPoliciesIdMutation as ve, deleteLedgerAccountsIdMutation as ye, deleteReceiptsIdMutation as be, disableUserMutation as xe, getAnalyticsPayablesOptions as Se, getAnalyticsReceivablesOptions as Ce, getApplicationStatusOptions as we, getApprovalPoliciesOptions as Te, getApprovalPoliciesQueryKey as Ee, getBankAccountAccessQueryKey as De, getBankAccountOptions as Oe, getBankAccountQueryKey as ke, getBankAccountTransactionsOptions as Ae, getBankAccountTransfersOptions as je, getBankAccountTransfersQueryKey as Me, getBankAccountsQueryKey as Ne, getCounterpartsIdAddressesOptions as Pe, getCounterpartsIdAddressesQueryKey as Fe, getCounterpartsIdBankAccountsOptions as Ie, getCounterpartsIdBankAccountsQueryKey as Le, getCounterpartsIdOptions as Re, getCounterpartsIdQueryKey as ze, getCounterpartsOptions as Be, getCounterpartsQueryKey as Ve, getCreditCardByIdOptions as He, getCreditCardsOptions as Ue, getDebitCardByIdOptions as We, getDebitCardsOptions as Ge, getDepartmentOptions as Ke, getDepartmentQueryKey as qe, getEntitiesIdSettingsOptions as Je, getEntitiesIdSettingsQueryKey as Ye, getEntitiesMeOptions as Xe, getEntityUsersMyEntityOptions as Ze, getEntityUsersOptions as Qe, getExternalBankAccountAccessQueryKey as $e, getExternalBankAccountsOptions as et, getExternalBankAccountsQueryKey as tt,
|
|
10
|
+
import { acceptDisclosuresMutation as fe, connectExternalBankAccountMutation as pe, createAchMoneyMovementMutation as me, createApplicationMutation as he, createBankAccountMutation as ge, createBookTransferMutation as _e, deleteApprovalPoliciesIdMutation as ve, deleteLedgerAccountsIdMutation as ye, deleteReceiptsIdMutation as be, disableUserMutation as xe, getAnalyticsPayablesOptions as Se, getAnalyticsReceivablesOptions as Ce, getApplicationStatusOptions as we, getApprovalPoliciesOptions as Te, getApprovalPoliciesQueryKey as Ee, getBankAccountAccessQueryKey as De, getBankAccountOptions as Oe, getBankAccountQueryKey as ke, getBankAccountTransactionsOptions as Ae, getBankAccountTransfersOptions as je, getBankAccountTransfersQueryKey as Me, getBankAccountsQueryKey as Ne, getCounterpartsIdAddressesOptions as Pe, getCounterpartsIdAddressesQueryKey as Fe, getCounterpartsIdBankAccountsOptions as Ie, getCounterpartsIdBankAccountsQueryKey as Le, getCounterpartsIdOptions as Re, getCounterpartsIdQueryKey as ze, getCounterpartsOptions as Be, getCounterpartsQueryKey as Ve, getCreditCardByIdOptions as He, getCreditCardsOptions as Ue, getDebitCardByIdOptions as We, getDebitCardsOptions as Ge, getDepartmentOptions as Ke, getDepartmentQueryKey as qe, getEntitiesIdSettingsOptions as Je, getEntitiesIdSettingsQueryKey as Ye, getEntitiesMeOptions as Xe, getEntityUsersMyEntityOptions as Ze, getEntityUsersOptions as Qe, getExternalBankAccountAccessQueryKey as $e, getExternalBankAccountsOptions as et, getExternalBankAccountsQueryKey as tt, getLedgerAccountsQueryKey as nt, getLocationOptions as rt, getLocationQueryKey as it, getMeasureUnitsOptions as at, getMeasureUnitsQueryKey as ot, getPayablesOptions as st, getProductsIdOptions as ct, getProductsIdQueryKey as lt, getProductsOptions as ut, getProductsQueryKey as dt, getReceiptsIdQueryKey as ft, getReceiptsOptions as pt, getReceiptsQueryKey as mt, getReceivablesIdHistoryOptions as ht, getReceivablesIdHistoryQueryKey as gt, getReceivablesIdMailsOptions as _t, getReceivablesIdMailsQueryKey as vt, getReceivablesIdOptions as yt, getReceivablesIdPdfLinkOptions as bt, getReceivablesIdPdfLinkQueryKey as xt, getReceivablesIdQueryKey as St, getReceivablesOptions as Ct, getReceivablesQueryKey as wt, getTagsOptions as Tt, getTagsQueryKey as Et, getTransactionsIdQueryKey as Dt, getTransactionsOptions as Ot, getTransactionsQueryKey as kt, getTransactionsValidationsOptions as At, getTransactionsValidationsQueryKey as jt, getUsersOptions as Mt, getUsersQueryKey as Nt, grantBankAccountAccessMutation as Pt, grantExternalBankAccountAccessMutation as Ft, linkExternalBankAccountMutation as It, listDepartmentsOptions as Lt, listDepartmentsQueryKey as Rt, listLocationsOptions as zt, listLocationsQueryKey as Bt, listRolesQueryKey as Vt, patchApprovalPoliciesIdMutation as Ht, patchEntitiesIdSettingsMutation as Ut, patchLedgerAccountsIdMutation as Wt, patchReceiptsIdMutation as Gt, postApprovalPoliciesMutation as Kt, postLedgerAccountsMutation as qt, putTransactionsValidationsMutation as Jt, submitApplicationMutation as Yt, unlinkExternalBankAccountMutation as Xt, updateApplicationMutation as Zt, updateBankAccountMutation as Qt, updateExternalBankAccountMutation as $t, validateExternalBankAccountMutation as en } from "./lib/rest/@tanstack/react-query.gen.js";
|
|
11
11
|
import "./lib/queryKeys.js";
|
|
12
|
-
import { withAuthEpoch as
|
|
13
|
-
import { useCurrentUserQuery as
|
|
14
|
-
import { isApiNotFoundError as
|
|
12
|
+
import { withAuthEpoch as tn } from "./lib/withAuthEpoch.js";
|
|
13
|
+
import { useCurrentUserQuery as nn } from "./lib/useCurrentUserQuery.js";
|
|
14
|
+
import { isApiNotFoundError as rn } from "./lib/isApiNotFoundError.js";
|
|
15
15
|
import "./lib/isUserDataNotFoundError.js";
|
|
16
|
-
import { useGetUserDataQuery as
|
|
17
|
-
import { useUpsertUserDataMutation as
|
|
16
|
+
import { useGetUserDataQuery as an } from "./lib/useGetUserDataQuery.js";
|
|
17
|
+
import { useUpsertUserDataMutation as on } from "./lib/useUpsertUserDataMutation.js";
|
|
18
18
|
import "./lib/rest/zod.gen.js";
|
|
19
|
-
import { Scope as
|
|
20
|
-
import { getAllPagesNextPageParam as
|
|
21
|
-
import { useAllBankAccountsQuery as
|
|
22
|
-
import { useAllExternalBankAccountsQuery as
|
|
19
|
+
import { Scope as sn } from "./lib/scopes.js";
|
|
20
|
+
import { getAllPagesNextPageParam as cn, getAllPagesNextPaginationTokenParam as ln, isAllPagesResolving as un, useAutoFetchNextPage as dn } from "./lib/allPages.js";
|
|
21
|
+
import { useAllBankAccountsQuery as fn } from "./lib/bank-account/useAllBankAccountsQuery.js";
|
|
22
|
+
import { useAllExternalBankAccountsQuery as pn } from "./lib/external-bank-account/useAllExternalBankAccountsQuery.js";
|
|
23
|
+
import { useLedgerAccountsQuery as mn } from "./lib/reference-data/useLedgerAccountsQuery.js";
|
|
24
|
+
import { usePaymentTermsQuery as hn } from "./lib/reference-data/usePaymentTermsQuery.js";
|
|
23
25
|
import { useAllOrganizationRolesQuery as gn } from "./lib/role/useAllOrganizationRolesQuery.js";
|
|
24
26
|
import { useRolePermissionsQueries as _n } from "./lib/role/useRolePermissionsQueries.js";
|
|
25
27
|
import { useAllOrganizationUsersQuery as vn } from "./lib/user/useAllOrganizationUsersQuery.js";
|
|
26
|
-
export { o as EmbedApiProvider,
|
|
28
|
+
export { o as EmbedApiProvider, sn as Scope, fe as acceptDisclosuresMutation, u as bulkUpdateDepartmentMembers, d as bulkUpdateLocationMembers, f as bulkUpdateRoleMembers, i as cloneEmbeddedClient, pe as connectExternalBankAccountMutation, me as createAchMoneyMovementMutation, he as createApplicationMutation, ge as createBankAccountMutation, _e as createBookTransferMutation, p as createDepartment, a as createEmbeddedClient, m as createLocation, h as createUser, g as deactivateDepartment, _ as deactivateLocation, ve as deleteApprovalPoliciesIdMutation, v as deleteCounterpartsId, y as deleteCounterpartsIdBankAccountsId, ye as deleteLedgerAccountsIdMutation, b as deleteMeasureUnitsId, x as deleteProductsId, be as deleteReceiptsIdMutation, S as deleteReceivablesId, C as deleteTagsId, xe as disableUserMutation, w as downloadBankAccountTransactions, ue as fetchWidgetInit, cn as getAllPagesNextPageParam, ln as getAllPagesNextPaginationTokenParam, Se as getAnalyticsPayablesOptions, Ce as getAnalyticsReceivablesOptions, T as getApplicationStatus, we as getApplicationStatusOptions, E as getApprovalPolicies, Te as getApprovalPoliciesOptions, Ee as getApprovalPoliciesQueryKey, D as getBankAccountAccess, De as getBankAccountAccessQueryKey, Oe as getBankAccountOptions, ke as getBankAccountQueryKey, Ae as getBankAccountTransactionsOptions, je as getBankAccountTransfersOptions, Me as getBankAccountTransfersQueryKey, Ne as getBankAccountsQueryKey, Pe as getCounterpartsIdAddressesOptions, Fe as getCounterpartsIdAddressesQueryKey, Ie as getCounterpartsIdBankAccountsOptions, Le as getCounterpartsIdBankAccountsQueryKey, Re as getCounterpartsIdOptions, ze as getCounterpartsIdQueryKey, Be as getCounterpartsOptions, Ve as getCounterpartsQueryKey, He as getCreditCardByIdOptions, Ue as getCreditCardsOptions, We as getDebitCardByIdOptions, Ge as getDebitCardsOptions, O as getDepartment, Ke as getDepartmentOptions, qe as getDepartmentQueryKey, Je as getEntitiesIdSettingsOptions, Ye as getEntitiesIdSettingsQueryKey, Xe as getEntitiesMeOptions, Ze as getEntityUsersMyEntityOptions, Qe as getEntityUsersOptions, k as getExternalBankAccountAccess, $e as getExternalBankAccountAccessQueryKey, et as getExternalBankAccountsOptions, tt as getExternalBankAccountsQueryKey, nt as getLedgerAccountsQueryKey, A as getLocation, rt as getLocationOptions, it as getLocationQueryKey, at as getMeasureUnitsOptions, ot as getMeasureUnitsQueryKey, st as getPayablesOptions, ct as getProductsIdOptions, lt as getProductsIdQueryKey, ut as getProductsOptions, dt as getProductsQueryKey, ft as getReceiptsIdQueryKey, pt as getReceiptsOptions, mt as getReceiptsQueryKey, ht as getReceivablesIdHistoryOptions, gt as getReceivablesIdHistoryQueryKey, _t as getReceivablesIdMailsOptions, vt as getReceivablesIdMailsQueryKey, yt as getReceivablesIdOptions, bt as getReceivablesIdPdfLinkOptions, xt as getReceivablesIdPdfLinkQueryKey, St as getReceivablesIdQueryKey, Ct as getReceivablesOptions, wt as getReceivablesQueryKey, Tt as getTagsOptions, Et as getTagsQueryKey, Dt as getTransactionsIdQueryKey, Ot as getTransactionsOptions, kt as getTransactionsQueryKey, At as getTransactionsValidationsOptions, jt as getTransactionsValidationsQueryKey, j as getUsers, Mt as getUsersOptions, Nt as getUsersQueryKey, Pt as grantBankAccountAccessMutation, Ft as grantExternalBankAccountAccessMutation, de as hasAnyScope, e as invalidateAllClients, un as isAllPagesResolving, rn as isApiNotFoundError, It as linkExternalBankAccountMutation, M as listDepartments, Lt as listDepartmentsOptions, Rt as listDepartmentsQueryKey, N as listLocations, zt as listLocationsOptions, Bt as listLocationsQueryKey, P as listRoles, Vt as listRolesQueryKey, F as manageBankAccountAccess, c as optionalOrganizationHeaders, l as organizationHeaders, Ht as patchApprovalPoliciesIdMutation, I as patchCounterpartsId, L as patchCounterpartsIdAddressesId, R as patchCounterpartsIdBankAccountsId, Ut as patchEntitiesIdSettingsMutation, Wt as patchLedgerAccountsIdMutation, z as patchMeasureUnitsId, B as patchProductsId, Gt as patchReceiptsIdMutation, V as patchReceivablesId, H as patchTagsId, Kt as postApprovalPoliciesMutation, U as postCounterparts, W as postCounterpartsIdAddresses, G as postCounterpartsIdBankAccounts, K as postCounterpartsIdBankAccountsIdMakeDefault, qt as postLedgerAccountsMutation, q as postMeasureUnits, J as postProducts, Y as postReceivables, X as postReceivablesIdAccept, Z as postReceivablesIdCancel, Q as postReceivablesIdClone, $ as postReceivablesIdDecline, ee as postReceivablesIdIssue, te as postReceivablesIdMarkAsPaid, ne as postReceivablesIdMarkAsPartiallyPaid, re as postReceivablesIdMarkAsUncollectible, ie as postReceivablesIdSend, ae as postTags, oe as putReceivablesIdLineItems, Jt as putTransactionsValidationsMutation, t as registerQueryClient, n as setAllClientsQueriesData, Yt as submitApplicationMutation, Xt as unlinkExternalBankAccountMutation, r as unregisterQueryClient, Zt as updateApplicationMutation, Qt as updateBankAccountMutation, se as updateDepartment, $t as updateExternalBankAccountMutation, ce as updateLocation, le as updateUser, fn as useAllBankAccountsQuery, pn as useAllExternalBankAccountsQuery, gn as useAllOrganizationRolesQuery, vn as useAllOrganizationUsersQuery, dn as useAutoFetchNextPage, nn as useCurrentUserQuery, s as useEmbedApi, an as useGetUserDataQuery, mn as useLedgerAccountsQuery, hn as usePaymentTermsQuery, _n as useRolePermissionsQueries, on as useUpsertUserDataMutation, en as validateExternalBankAccountMutation, tn as withAuthEpoch };
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
"use client";
|
|
3
|
+
"use client";
|
|
4
|
+
"use client";
|
|
5
|
+
import { useEmbedApi as e } from "../EmbedApiContext.js";
|
|
6
|
+
import { organizationHeaders as t } from "../organizationHeaders.js";
|
|
7
|
+
import { getLedgerAccountsOptions as n } from "../rest/@tanstack/react-query.gen.js";
|
|
8
|
+
import { withAuthEpoch as r } from "../withAuthEpoch.js";
|
|
9
|
+
import { useQuery as i } from "@tanstack/react-query";
|
|
10
|
+
//#region ../../libs/tesouro-embedded-components-react/shared/data-access/dist/lib/reference-data/useLedgerAccountsQuery.js
|
|
11
|
+
function a({ enabled: a, ...o } = {}) {
|
|
12
|
+
let { client: s, organizationId: c, widgetToken: l, authEpoch: u } = e(), d = !!(c && l) && (a === !0 || a === void 0), f = n({
|
|
13
|
+
client: s,
|
|
14
|
+
headers: t(c),
|
|
15
|
+
query: o
|
|
16
|
+
});
|
|
17
|
+
return i({
|
|
18
|
+
...r(f, u),
|
|
19
|
+
enabled: d
|
|
20
|
+
});
|
|
21
|
+
}
|
|
22
|
+
//#endregion
|
|
23
|
+
export { a as useLedgerAccountsQuery };
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
"use client";
|
|
3
|
+
"use client";
|
|
4
|
+
"use client";
|
|
5
|
+
import { useEmbedApi as e } from "../EmbedApiContext.js";
|
|
6
|
+
import { organizationHeaders as t } from "../organizationHeaders.js";
|
|
7
|
+
import { getPaymentTermsOptions as n } from "../rest/@tanstack/react-query.gen.js";
|
|
8
|
+
import { withAuthEpoch as r } from "../withAuthEpoch.js";
|
|
9
|
+
import { useQuery as i } from "@tanstack/react-query";
|
|
10
|
+
//#region ../../libs/tesouro-embedded-components-react/shared/data-access/dist/lib/reference-data/usePaymentTermsQuery.js
|
|
11
|
+
function a({ enabled: a } = {}) {
|
|
12
|
+
let { client: o, organizationId: s, widgetToken: c, authEpoch: l } = e(), u = !!(s && c) && (a === !0 || a === void 0), d = n({
|
|
13
|
+
client: o,
|
|
14
|
+
headers: t(s)
|
|
15
|
+
});
|
|
16
|
+
return i({
|
|
17
|
+
...r(d, l),
|
|
18
|
+
enabled: u
|
|
19
|
+
});
|
|
20
|
+
}
|
|
21
|
+
//#endregion
|
|
22
|
+
export { a as usePaymentTermsQuery };
|
package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/analytics/build-info.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
//#region ../../libs/tesouro-embedded-components-react/shared/feature/dist/lib/analytics/build-info.js
|
|
2
|
-
var e = "@tesouro/embedded-components-react", t = "0.2.
|
|
2
|
+
var e = "@tesouro/embedded-components-react", t = "0.2.241", n = "bacfed820f3a501a2d89e708142add40e1efa665", r = Object.freeze({
|
|
3
3
|
library_name: e,
|
|
4
4
|
library_version: t,
|
|
5
5
|
library_sha: n
|
|
@@ -2,7 +2,8 @@
|
|
|
2
2
|
var e = /* @__PURE__ */ new Set([
|
|
3
3
|
"GET /identity/v1/user-data/{key}",
|
|
4
4
|
"GET /embedded-banking/v1/credit-cards/{cardId}",
|
|
5
|
-
"GET /embedded-banking/v1/debit-cards/{cardId}"
|
|
5
|
+
"GET /embedded-banking/v1/debit-cards/{cardId}",
|
|
6
|
+
"GET /finops/v1/payables/{payable_id}/suggestions"
|
|
6
7
|
]);
|
|
7
8
|
function t(t, n, r) {
|
|
8
9
|
return t === 404 && n !== void 0 && r !== void 0 && e.has(`${n.toUpperCase()} ${r}`);
|
package/package.json
CHANGED
package/dist/libs/tesouro-embedded-components-react/gl-code-table-widget/data-access/dist/index4.js
DELETED
|
@@ -1,78 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
"use client";
|
|
3
|
-
"use client";
|
|
4
|
-
"use client";
|
|
5
|
-
import { invalidateAllClients as e } from "../../../shared/data-access/dist/lib/clientRegistry.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";
|
|
8
|
-
import { deleteLedgerAccountsIdMutation as r, patchLedgerAccountsIdMutation as i, postLedgerAccountsMutation as a } from "../../../shared/data-access/dist/lib/rest/@tanstack/react-query.gen.js";
|
|
9
|
-
import "../../../shared/data-access/dist/index.js";
|
|
10
|
-
import { ledgerAccountsInvalidationKey as o } from "./index3.js";
|
|
11
|
-
import { useMutation as s } from "@tanstack/react-query";
|
|
12
|
-
//#region ../../libs/tesouro-embedded-components-react/gl-code-table-widget/data-access/dist/index4.js
|
|
13
|
-
function c() {
|
|
14
|
-
let { client: r, organizationId: i } = t(), c = n(i), l = s({
|
|
15
|
-
...a({
|
|
16
|
-
client: r,
|
|
17
|
-
headers: c
|
|
18
|
-
}),
|
|
19
|
-
onSuccess: async () => {
|
|
20
|
-
await e(o({
|
|
21
|
-
client: r,
|
|
22
|
-
organizationId: i
|
|
23
|
-
}));
|
|
24
|
-
}
|
|
25
|
-
});
|
|
26
|
-
return {
|
|
27
|
-
createLedgerAccount: (e) => l.mutateAsync({
|
|
28
|
-
headers: c,
|
|
29
|
-
body: e
|
|
30
|
-
}),
|
|
31
|
-
isPending: l.isPending
|
|
32
|
-
};
|
|
33
|
-
}
|
|
34
|
-
function l() {
|
|
35
|
-
let { client: r, organizationId: a } = t(), c = n(a), l = s({
|
|
36
|
-
...i({
|
|
37
|
-
client: r,
|
|
38
|
-
headers: c
|
|
39
|
-
}),
|
|
40
|
-
onSuccess: async () => {
|
|
41
|
-
await e(o({
|
|
42
|
-
client: r,
|
|
43
|
-
organizationId: a
|
|
44
|
-
}));
|
|
45
|
-
}
|
|
46
|
-
});
|
|
47
|
-
return {
|
|
48
|
-
updateLedgerAccount: (e, t) => l.mutateAsync({
|
|
49
|
-
headers: c,
|
|
50
|
-
path: { ledger_account_id: e },
|
|
51
|
-
body: t
|
|
52
|
-
}),
|
|
53
|
-
isPending: l.isPending
|
|
54
|
-
};
|
|
55
|
-
}
|
|
56
|
-
function u() {
|
|
57
|
-
let { client: i, organizationId: a } = t(), c = n(a), l = s({
|
|
58
|
-
...r({
|
|
59
|
-
client: i,
|
|
60
|
-
headers: c
|
|
61
|
-
}),
|
|
62
|
-
onSuccess: async () => {
|
|
63
|
-
await e(o({
|
|
64
|
-
client: i,
|
|
65
|
-
organizationId: a
|
|
66
|
-
}));
|
|
67
|
-
}
|
|
68
|
-
});
|
|
69
|
-
return {
|
|
70
|
-
deleteLedgerAccount: (e) => l.mutateAsync({
|
|
71
|
-
headers: c,
|
|
72
|
-
path: { ledger_account_id: e }
|
|
73
|
-
}),
|
|
74
|
-
isPending: l.isPending
|
|
75
|
-
};
|
|
76
|
-
}
|
|
77
|
-
//#endregion
|
|
78
|
-
export { c as useCreateLedgerAccountMutation, u as useDeleteLedgerAccountMutation, l as useUpdateLedgerAccountMutation };
|