@tesouro/embedded-components-react 0.2.299 → 0.2.300

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.
@@ -10,7 +10,7 @@ import "../../../shared/data-access/dist/index.js";
10
10
  import { useQuery as a } from "@tanstack/react-query";
11
11
  //#region ../../libs/tesouro-embedded-components-react/counterparts-widget/data-access/dist/index2.js
12
12
  function o({ metric: n = "total_amount", type: o, statusIn: s, counterpartIdIn: c, enabled: l } = {}) {
13
- let { client: u, organizationId: d, widgetToken: f, authEpoch: p } = e(), m = c === void 0 || c.length > 0, h = !!(d && f) && m && (l === !0 || l === void 0), g = r({
13
+ let { client: u, organizationId: d, widgetToken: f, authEpoch: p } = e(), m = c == null || c.length > 0, h = !!(d && f) && m && (l === !0 || l === void 0), g = r({
14
14
  client: u,
15
15
  headers: t(d),
16
16
  query: {
@@ -28,7 +28,7 @@ function o({ metric: n = "total_amount", type: o, statusIn: s, counterpartIdIn:
28
28
  });
29
29
  }
30
30
  function s({ metric: r = "total_amount", statusIn: o, counterpartIdIn: s, enabled: c } = {}) {
31
- let { client: l, organizationId: u, widgetToken: d, authEpoch: f } = e(), p = s === void 0 || s.length > 0, m = !!(u && d) && p && (c === !0 || c === void 0), h = n({
31
+ let { client: l, organizationId: u, widgetToken: d, authEpoch: f } = e(), p = s == null || s.length > 0, m = !!(u && d) && p && (c === !0 || c === void 0), h = n({
32
32
  client: l,
33
33
  headers: t(u),
34
34
  query: {
@@ -56,9 +56,9 @@ function b({ onEdit: r, onDelete: o, onAdd: b, screenLabels: x, formLabels: S, d
56
56
  }, [P, B]), K = f((e) => {
57
57
  L(e), z(void 0);
58
58
  }, []), q = f(() => {
59
- z(U?.next_pagination_token);
59
+ z(U?.next_pagination_token ?? void 0);
60
60
  }, [U?.next_pagination_token]), J = f(() => {
61
- z(U?.prev_pagination_token);
61
+ z(U?.prev_pagination_token ?? void 0);
62
62
  }, [U?.prev_pagination_token]);
63
63
  return /* @__PURE__ */ v(g, { children: [/* @__PURE__ */ _(c, {
64
64
  ...T,
@@ -38,7 +38,7 @@ function l({ activeTab: l, messages: d }) {
38
38
  h(e), _(void 0);
39
39
  }, []), F = i((e) => {
40
40
  C(e), _(void 0);
41
- }, []), I = i(() => _(D.data?.next_pagination_token), [D.data?.next_pagination_token]), L = i(() => _(D.data?.prev_pagination_token), [D.data?.prev_pagination_token]), R = i(() => {
41
+ }, []), I = i(() => _(D.data?.next_pagination_token ?? void 0), [D.data?.next_pagination_token]), L = i(() => _(D.data?.prev_pagination_token ?? void 0), [D.data?.prev_pagination_token]), R = i(() => {
42
42
  D.refetch();
43
43
  }, [D]);
44
44
  return {
@@ -160,7 +160,7 @@ function v({ receivable: e, history: t, mails: n, pdfUrl: r, messages: i }) {
160
160
  currency: e.currency,
161
161
  fallback: i.notAvailable
162
162
  }),
163
- pdfUrl: r || e.file_url || e.original_file_url,
163
+ pdfUrl: r || e.file_url || e.original_file_url || void 0,
164
164
  summaryItems: [
165
165
  {
166
166
  label: i.summaryDocumentType,
@@ -22,7 +22,7 @@ function o({ selectedReceivableId: o, enabled: s = !0, messages: c }) {
22
22
  receivable: l.data,
23
23
  history: u.data?.data ?? [],
24
24
  mails: d.data?.data ?? [],
25
- pdfUrl: f.data?.file_url || f.data?.original_file_url,
25
+ pdfUrl: f.data?.file_url || f.data?.original_file_url || void 0,
26
26
  messages: c
27
27
  }), [
28
28
  l.data,
@@ -33,7 +33,7 @@ function o({ unitNamesById: o }) {
33
33
  c(t), f(void 0);
34
34
  }, [s]), D = n((e) => {
35
35
  u(e), f(void 0);
36
- }, []), O = n(() => f(C.data?.next_pagination_token), [C.data?.next_pagination_token]), k = n(() => f(C.data?.prev_pagination_token), [C.data?.prev_pagination_token]), A = n(() => {
36
+ }, []), O = n(() => f(C.data?.next_pagination_token ?? void 0), [C.data?.next_pagination_token]), k = n(() => f(C.data?.prev_pagination_token ?? void 0), [C.data?.prev_pagination_token]), A = n(() => {
37
37
  C.refetch();
38
38
  }, [C]), j = n((e) => (t) => {
39
39
  e(t), f(void 0);