@tesouro/embedded-components-react 0.2.239 → 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.
Files changed (15) hide show
  1. package/dist/libs/tesouro-embedded-components-react/gl-code-table-widget/data-access/dist/index.js +4 -3
  2. package/dist/libs/tesouro-embedded-components-react/gl-code-table-widget/data-access/dist/index2.js +7 -20
  3. package/dist/libs/tesouro-embedded-components-react/gl-code-table-widget/data-access/dist/index3.js +75 -7
  4. package/dist/libs/tesouro-embedded-components-react/gl-code-table-widget/feature/dist/index7.js +1 -1
  5. package/dist/libs/tesouro-embedded-components-react/gl-code-table-widget/feature/dist/index8.js +25 -25
  6. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/data-access/dist/index.js +8 -6
  7. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/data-access/dist/index7.js +1 -25
  8. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index9.js +19 -19
  9. package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/index.js +13 -11
  10. package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/reference-data/useLedgerAccountsQuery.js +23 -0
  11. package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/reference-data/usePaymentTermsQuery.js +22 -0
  12. package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/analytics/build-info.js +1 -1
  13. package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/analytics/expectedApiNotFound.js +2 -1
  14. package/package.json +1 -1
  15. package/dist/libs/tesouro-embedded-components-react/gl-code-table-widget/data-access/dist/index4.js +0 -78
@@ -1,4 +1,5 @@
1
- import { useGetLedgerAccountsQuery as e } from "./index2.js";
2
- import "./index3.js";
3
- import { useCreateLedgerAccountMutation as t, useDeleteLedgerAccountMutation as n, useUpdateLedgerAccountMutation as r } from "./index4.js";
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 };
@@ -1,23 +1,10 @@
1
- "use client";
2
- "use client";
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
- function i({ enabled: i, ...a }) {
12
- let { client: o, organizationId: s, widgetToken: c, authEpoch: l } = e(), u = !!(s && c) && (i === !0 || i === void 0), d = t({
13
- query: a,
14
- client: o,
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 { i as useGetLedgerAccountsQuery };
10
+ export { n as ledgerAccountsInvalidationKey };
@@ -1,10 +1,78 @@
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";
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
- var n = ({ client: n, organizationId: r }) => t({
6
- client: n,
7
- headers: e(r)
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 { n as ledgerAccountsInvalidationKey };
78
+ export { c as useCreateLedgerAccountMutation, u as useDeleteLedgerAccountMutation, l as useUpdateLedgerAccountMutation };
@@ -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/index4.js";
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
@@ -2,19 +2,19 @@
2
2
  "use client";
3
3
  "use client";
4
4
  "use client";
5
- import { EmbeddedToaster as e } from "../../../shared/ui/dist/lib/EmbeddedToaster.js";
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 t } from "../../../shared/feature/dist/lib/analytics/hooks.js";
8
- import { WidgetProvider as n } from "../../../shared/feature/dist/lib/WidgetProvider/WidgetProvider.js";
9
- import { useWidgetConfig as r } from "../../../shared/feature/dist/lib/WidgetProvider/hooks.js";
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 i, WIDGET_NAME as a } from "./index2.js";
12
- import { getChartOfAccountsPermissions as o } from "./index3.js";
13
- import { ChartOfAccountsTable as s } from "../../ui/dist/index3.js";
14
- import { AccountFormSheet as c } from "../../ui/dist/index4.js";
15
- import { AccountDeleteDialog as l } from "../../ui/dist/index5.js";
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: n, onDelete: a, onAdd: b, screenLabels: x, formLabels: S, deleteLabels: C, messageLabels: w, ...T }) {
30
- let E = t();
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(i.Mounted);
32
+ E(a.Mounted);
33
33
  }, [E]);
34
- let { initResponse: D } = r(), { canWrite: O } = m(() => o(D?.scopes), [D?.scopes]), k = 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 ? n ?? k.openEdit : void 0, j = O ? a ?? k.requestDelete : void 0, M = O ? b ?? k.openCreate : void 0, N = a || k.form.mode !== "edit" ? void 0 : k.requestDeleteFromForm, [P, F] = h([{
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 } = 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__ */ _(s, {
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__ */ _(e, {}),
84
- /* @__PURE__ */ _(c, {
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__ */ _(l, {
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: r, configClient: i, linkComponent: o, implementation: s, uiFramework: c, analytics: l, errorFallback: u, onError: d, ...f }) {
115
- return /* @__PURE__ */ _(n, {
116
- widgetName: a,
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: r,
119
+ organizationId: n,
120
120
  configClient: i,
121
- linkComponent: o,
121
+ linkComponent: a,
122
122
  implementation: s,
123
123
  uiFramework: c,
124
124
  analytics: l,
@@ -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 e } from "./index3.js";
3
- import { useAcceptReceivableMutation as t, useCancelReceivableMutation as n, useCloneReceivableMutation as r, useCreateReceivableMutation as i, useDeclineReceivableMutation as a, useDeleteReceivableMutation as o, useIssueReceivableMutation as s, useReplaceReceivableLineItemsMutation as c, useUpdateReceivableMutation as l } from "./index4.js";
4
- import { useMarkReceivablePaidMutation as u, useMarkReceivablePartiallyPaidMutation as d, useMarkReceivableUncollectibleMutation as f } from "./index5.js";
5
- import { useReceivableHistoryQuery as p, useReceivableMailsQuery as m, useReceivablePdfLinkQuery as h, useReceivableQuery as g, useReceivablesQuery as _ } from "./index6.js";
6
- import { usePaymentTermsQuery as v } from "./index7.js";
7
- export { t as useAcceptReceivableMutation, n as useCancelReceivableMutation, r as useCloneReceivableMutation, i as useCreateReceivableMutation, a as useDeclineReceivableMutation, o as useDeleteReceivableMutation, s as useIssueReceivableMutation, u as useMarkReceivablePaidMutation, d as useMarkReceivablePartiallyPaidMutation, f as useMarkReceivableUncollectibleMutation, v as usePaymentTermsQuery, p as useReceivableHistoryQuery, m as useReceivableMailsQuery, h as useReceivablePdfLinkQuery, g as useReceivableQuery, _ as useReceivablesQuery, c as useReplaceReceivableLineItemsMutation, e as useSendReceivableEmailMutation, l as useUpdateReceivableMutation };
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 };
@@ -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 { useQuery as i } from "@tanstack/react-query";
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 { getStateOptions as e } from "../../../shared/util/dist/index11.js";
6
- import { extractApiErrorMessage as t } from "../../../shared/util/dist/index14.js";
7
- import { COUNTERPART_MESSAGE_LABELS_EN as n } from "../../../shared/counterpart-management/feature/dist/lib/labels.js";
8
- import { useCounterpartAddressesQuery as r } from "../../../shared/counterpart-management/data-access/dist/index7.js";
9
- import { useCounterpartForm as i } from "../../../shared/counterpart-management/feature/dist/lib/useCounterpartForm.js";
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 u, receivableFormValuesToUpdatePayload as ee, receivableToFormValues as d, validateReceivableForm as f } from "./index5.js";
12
- import { useCreateReceivableMutation as p, useReplaceReceivableLineItemsMutation as te, useUpdateReceivableMutation as m } from "../../data-access/dist/index4.js";
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 re } from "../../../shared/product-catalog/feature/dist/lib/labels.js";
16
- import { EMPTY_PRODUCT_FORM_VALUES as ie, getCurrencyOptions as h } from "../../../shared/product-catalog/feature/dist/lib/helpers.js";
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 = m(), D = te(), O = ne(), [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(() => e(), []), q = y(() => ({
24
- ...re,
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
- ...n,
27
+ ...r,
28
28
  ...C
29
- }), [C]), Y = r(F.customerId), ae = Y.data?.data?.[0], X = Y.data?.data?.[0]?.id, Z = _({
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 = i({
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: ee({
100
+ body: u({
101
101
  values: F,
102
102
  billingAddressId: X ?? ""
103
103
  })
104
104
  }), await D.mutateAsync({
105
105
  path: e,
106
- body: u(F)
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: t(e) ?? x.genericError });
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 : ie
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, getLedgerAccountsOptions as nt, getLedgerAccountsQueryKey as rt, getLocationOptions as it, getLocationQueryKey as at, getMeasureUnitsOptions as ot, getMeasureUnitsQueryKey as st, getPayablesOptions as ct, getPaymentTermsOptions as lt, getProductsIdOptions as ut, getProductsIdQueryKey as dt, getProductsOptions as ft, getProductsQueryKey as pt, getReceiptsIdQueryKey as mt, getReceiptsOptions as ht, getReceiptsQueryKey as gt, getReceivablesIdHistoryOptions as _t, getReceivablesIdHistoryQueryKey as vt, getReceivablesIdMailsOptions as yt, getReceivablesIdMailsQueryKey as bt, getReceivablesIdOptions as xt, getReceivablesIdPdfLinkOptions as St, getReceivablesIdPdfLinkQueryKey as Ct, getReceivablesIdQueryKey as wt, getReceivablesOptions as Tt, getReceivablesQueryKey as Et, getTagsOptions as Dt, getTagsQueryKey as Ot, getTransactionsIdQueryKey as kt, getTransactionsOptions as At, getTransactionsQueryKey as jt, getTransactionsValidationsOptions as Mt, getTransactionsValidationsQueryKey as Nt, getUsersOptions as Pt, getUsersQueryKey as Ft, grantBankAccountAccessMutation as It, grantExternalBankAccountAccessMutation as Lt, linkExternalBankAccountMutation as Rt, listDepartmentsOptions as zt, listDepartmentsQueryKey as Bt, listLocationsOptions as Vt, listLocationsQueryKey as Ht, listRolesQueryKey as Ut, patchApprovalPoliciesIdMutation as Wt, patchEntitiesIdSettingsMutation as Gt, patchLedgerAccountsIdMutation as Kt, patchReceiptsIdMutation as qt, postApprovalPoliciesMutation as Jt, postLedgerAccountsMutation as Yt, putTransactionsValidationsMutation as Xt, submitApplicationMutation as Zt, unlinkExternalBankAccountMutation as Qt, updateApplicationMutation as $t, updateBankAccountMutation as en, updateExternalBankAccountMutation as tn, validateExternalBankAccountMutation as nn } from "./lib/rest/@tanstack/react-query.gen.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, 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 rn } from "./lib/withAuthEpoch.js";
13
- import { useCurrentUserQuery as an } from "./lib/useCurrentUserQuery.js";
14
- import { isApiNotFoundError as on } from "./lib/isApiNotFoundError.js";
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 sn } from "./lib/useGetUserDataQuery.js";
17
- import { useUpsertUserDataMutation as cn } from "./lib/useUpsertUserDataMutation.js";
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 ln } from "./lib/scopes.js";
20
- import { getAllPagesNextPageParam as un, getAllPagesNextPaginationTokenParam as dn, isAllPagesResolving as fn, useAutoFetchNextPage as pn } from "./lib/allPages.js";
21
- import { useAllBankAccountsQuery as mn } from "./lib/bank-account/useAllBankAccountsQuery.js";
22
- import { useAllExternalBankAccountsQuery as hn } from "./lib/external-bank-account/useAllExternalBankAccountsQuery.js";
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, ln 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, un as getAllPagesNextPageParam, dn 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 getLedgerAccountsOptions, rt as getLedgerAccountsQueryKey, A as getLocation, it as getLocationOptions, at as getLocationQueryKey, ot as getMeasureUnitsOptions, st as getMeasureUnitsQueryKey, ct as getPayablesOptions, lt as getPaymentTermsOptions, ut as getProductsIdOptions, dt as getProductsIdQueryKey, ft as getProductsOptions, pt as getProductsQueryKey, mt as getReceiptsIdQueryKey, ht as getReceiptsOptions, gt as getReceiptsQueryKey, _t as getReceivablesIdHistoryOptions, vt as getReceivablesIdHistoryQueryKey, yt as getReceivablesIdMailsOptions, bt as getReceivablesIdMailsQueryKey, xt as getReceivablesIdOptions, St as getReceivablesIdPdfLinkOptions, Ct as getReceivablesIdPdfLinkQueryKey, wt as getReceivablesIdQueryKey, Tt as getReceivablesOptions, Et as getReceivablesQueryKey, Dt as getTagsOptions, Ot as getTagsQueryKey, kt as getTransactionsIdQueryKey, At as getTransactionsOptions, jt as getTransactionsQueryKey, Mt as getTransactionsValidationsOptions, Nt as getTransactionsValidationsQueryKey, j as getUsers, Pt as getUsersOptions, Ft as getUsersQueryKey, It as grantBankAccountAccessMutation, Lt as grantExternalBankAccountAccessMutation, de as hasAnyScope, e as invalidateAllClients, fn as isAllPagesResolving, on as isApiNotFoundError, Rt as linkExternalBankAccountMutation, M as listDepartments, zt as listDepartmentsOptions, Bt as listDepartmentsQueryKey, N as listLocations, Vt as listLocationsOptions, Ht as listLocationsQueryKey, P as listRoles, Ut as listRolesQueryKey, F as manageBankAccountAccess, c as optionalOrganizationHeaders, l as organizationHeaders, Wt as patchApprovalPoliciesIdMutation, I as patchCounterpartsId, L as patchCounterpartsIdAddressesId, R as patchCounterpartsIdBankAccountsId, Gt as patchEntitiesIdSettingsMutation, Kt as patchLedgerAccountsIdMutation, z as patchMeasureUnitsId, B as patchProductsId, qt as patchReceiptsIdMutation, V as patchReceivablesId, H as patchTagsId, Jt as postApprovalPoliciesMutation, U as postCounterparts, W as postCounterpartsIdAddresses, G as postCounterpartsIdBankAccounts, K as postCounterpartsIdBankAccountsIdMakeDefault, Yt 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, Xt as putTransactionsValidationsMutation, t as registerQueryClient, n as setAllClientsQueriesData, Zt as submitApplicationMutation, Qt as unlinkExternalBankAccountMutation, r as unregisterQueryClient, $t as updateApplicationMutation, en as updateBankAccountMutation, se as updateDepartment, tn as updateExternalBankAccountMutation, ce as updateLocation, le as updateUser, mn as useAllBankAccountsQuery, hn as useAllExternalBankAccountsQuery, gn as useAllOrganizationRolesQuery, vn as useAllOrganizationUsersQuery, pn as useAutoFetchNextPage, an as useCurrentUserQuery, s as useEmbedApi, sn as useGetUserDataQuery, _n as useRolePermissionsQueries, cn as useUpsertUserDataMutation, nn as validateExternalBankAccountMutation, rn as withAuthEpoch };
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 };
@@ -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.239", n = "7e7cf07d67aab9645c79394f486ca20dc7e41792", r = Object.freeze({
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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tesouro/embedded-components-react",
3
- "version": "0.2.239",
3
+ "version": "0.2.241",
4
4
  "license": "Apache-2.0",
5
5
  "type": "module",
6
6
  "packageDepSync": {
@@ -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 };