@tesouro/embedded-components-react 0.7.28 → 0.7.30

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