@tesouro/embedded-components-react 0.5.273 → 0.5.275

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/README.md +1 -1
  2. package/dist/index.d.ts +1 -0
  3. package/dist/lib/ReceivablesWidget.d.ts +1 -0
  4. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/data-access/dist/index.js +10 -9
  5. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/data-access/dist/index10.js +173 -44
  6. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/data-access/dist/index11.js +42 -94
  7. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/data-access/dist/index12.js +91 -76
  8. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/data-access/dist/index13.js +67 -173
  9. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/data-access/dist/index14.js +186 -17
  10. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/data-access/dist/index15.js +27 -0
  11. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/data-access/dist/index6.js +16 -62
  12. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/data-access/dist/index7.js +66 -28
  13. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/data-access/dist/index8.js +28 -34
  14. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/data-access/dist/index9.js +24 -168
  15. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/ReceivablesWidget.js +18 -17
  16. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/details.js +9 -9
  17. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/labels.js +1 -0
  18. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/preview.js +47 -44
  19. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/useReceivableActions.js +125 -122
  20. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/useReceivableActionsModal.js +50 -47
  21. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/useReceivableAttachmentUploads.js +1 -1
  22. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/useReceivableDetails.js +3 -3
  23. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/useReceivableForm.js +2 -2
  24. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/useReceivableIssuePreflight.js +1 -1
  25. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/useReceivablePaymentRecord.js +1 -1
  26. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/useReceivableReminders.js +1 -1
  27. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/useReceivableStatusCards.js +1 -1
  28. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/useReceivablesTable.js +51 -51
  29. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/useReceivablesWidget.js +123 -119
  30. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/useSendReceivableWithPaymentLink.js +54 -0
  31. package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/index.js +41 -41
  32. package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/rest/sdk.gen.js +83 -71
  33. package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/analytics/build-info.js +1 -1
  34. package/package.json +1 -1
@@ -11,56 +11,59 @@ import { useCreateProductMutation as i } from "../../../../../shared/product-cat
11
11
  import { useMeasureUnits as a } from "../../../../../shared/product-catalog/feature/dist/lib/useMeasureUnits.js";
12
12
  import "../../../../../shared/product-catalog/feature/dist/index.js";
13
13
  import { getInlineItemPriceLabel as o, getIssueAttachments as s, getIssueSubject as c, getProductsStepTitle as l, inlineItemToProductRequest as u } from "./actionsModal.js";
14
- import { useSendReceivableEmailMutation as d } from "../../../../data-access/dist/index8.js";
15
- import { useReceivableQuery as f } from "../../../../data-access/dist/index12.js";
14
+ import { useReceivableQuery as d } from "../../../../data-access/dist/index13.js";
16
15
  import "../../../../data-access/dist/index.js";
16
+ import { useSendReceivableWithPaymentLink as f } from "./useSendReceivableWithPaymentLink.js";
17
17
  import { useCallback as p, useMemo as m, useState as h } from "react";
18
18
  //#region ../../libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/useReceivableActionsModal.js
19
19
  function g({ messages: g }) {
20
- let [_, v] = h(), [y, b] = h("products"), [x, S] = h(), [C, w] = h(), [T, E] = h(""), [D, O] = h(() => /* @__PURE__ */ new Set()), [k, A] = h(!1), j = !!_ && y === "issue", M = f(_?.receivableId, { enabled: j }), N = r(j ? _?.counterpartId : void 0), { unitNamesById: P } = a({ enabled: !!_?.inlineItems.length }), F = d(), I = i(), L = N.data?.id === _?.counterpartId ? N.data : void 0, R = L ? n(L) : "", z = L ? t(L) : "", B = M.data?.id === _?.receivableId ? M.data : void 0, V = C ?? c(B?.document_id, R, g), H = p((e) => {
20
+ let [_, v] = h(), [y, b] = h("products"), [x, S] = h(), [C, w] = h(), [T, E] = h(""), [D, O] = h(() => /* @__PURE__ */ new Set()), [k, A] = h(!1), j = !!_ && y === "issue", M = d(_?.receivableId, { enabled: j }), N = r(j ? _?.counterpartId : void 0), { unitNamesById: P } = a({ enabled: !!_?.inlineItems.length }), { send: F, isPending: I } = f({
21
+ messages: g,
22
+ documentType: j ? _?.documentType : void 0
23
+ }), L = i(), R = N.data?.id === _?.counterpartId ? N.data : void 0, z = R ? n(R) : "", B = R ? t(R) : "", V = M.data?.id === _?.receivableId ? M.data : void 0, H = C ?? c(V?.document_id, z, g), U = p((e) => {
21
24
  v(e), b(e.showEmailStep ? "issue" : "products"), S(void 0), w(void 0), E(""), O(new Set(e.inlineItems.map((e) => e.key)));
22
- }, []), U = p(() => v(void 0), []), W = p((e) => {
23
- S(e), _?.inlineItems.length ? b("products") : U();
24
- }, [U, _]), G = p(() => {
25
- y === "issue" ? W("issued") : U();
25
+ }, []), W = p(() => v(void 0), []), G = p((e) => {
26
+ S(e), _?.inlineItems.length ? b("products") : W();
27
+ }, [W, _]), K = p(() => {
28
+ y === "issue" ? G("issued") : W();
26
29
  }, [
27
- U,
28
30
  W,
31
+ G,
29
32
  y
30
- ]), K = p(async () => {
33
+ ]), q = p(async () => {
31
34
  if (_) try {
32
- await F.mutateAsync({
35
+ await F({
33
36
  path: { receivable_id: _.receivableId },
34
37
  body: {
35
- subject_text: V,
38
+ subject_text: H,
36
39
  body_text: T,
37
- recipients: z ? { to: [z] } : void 0
40
+ recipients: B ? { to: [B] } : void 0
38
41
  }
39
- }), e.success(g.actionsSendSucceeded), W("sent");
42
+ }), e.success(g.actionsSendSucceeded), G("sent");
40
43
  } catch {
41
44
  e.error(g.actionsSendFailed);
42
45
  }
43
46
  }, [
44
- z,
47
+ B,
45
48
  T,
46
49
  g,
47
- W,
48
- V,
50
+ G,
51
+ H,
49
52
  F,
50
53
  _
51
- ]), q = _?.inlineItems ?? [], J = D.size > 0, Y = p((e) => {
54
+ ]), J = _?.inlineItems ?? [], Y = D.size > 0, X = p((e) => {
52
55
  O(new Set(e ? (_?.inlineItems ?? []).map((e) => e.key) : []));
53
- }, [_]), X = p(() => Y(!J), [Y, J]), Z = p((e) => {
56
+ }, [_]), Z = p(() => X(!Y), [X, Y]), Q = p((e) => {
54
57
  O((t) => {
55
58
  let n = new Set(t);
56
59
  return n.has(e) ? n.delete(e) : n.add(e), n;
57
60
  });
58
- }, []), Q = p(async () => {
61
+ }, []), $ = p(async () => {
59
62
  let t = (_?.inlineItems ?? []).filter((e) => D.has(e.key));
60
63
  if (t.length) {
61
64
  A(!0);
62
65
  try {
63
- await Promise.all(t.map((e) => I.mutateAsync({ body: u(e) }))), e.success(g.actionsProductsSaved), U();
66
+ await Promise.all(t.map((e) => L.mutateAsync({ body: u(e) }))), e.success(g.actionsProductsSaved), W();
64
67
  } catch {
65
68
  e.error(g.actionsProductsSaveFailed);
66
69
  } finally {
@@ -68,65 +71,65 @@ function g({ messages: g }) {
68
71
  }
69
72
  }
70
73
  }, [
71
- U,
72
- I,
74
+ W,
75
+ L,
73
76
  g,
74
77
  D,
75
78
  _
76
- ]), $ = m(() => {
79
+ ]), ee = m(() => {
77
80
  if (_) return y === "issue" ? {
78
81
  step: "issue",
79
- title: g.actionsIssueTitle.replace("{name}", R),
80
- recipient: z ? `${R} <${z}>` : R,
81
- subject: V,
82
+ title: g.actionsIssueTitle.replace("{name}", z),
83
+ recipient: B ? `${z} <${B}>` : z,
84
+ subject: H,
82
85
  message: T,
83
- attachments: s(B),
84
- sendDisabled: F.isPending || !V.trim() || !T.trim(),
85
- inProgress: F.isPending
86
+ attachments: s(V),
87
+ sendDisabled: I || !H.trim() || !T.trim(),
88
+ inProgress: I
86
89
  } : {
87
90
  step: "products",
88
91
  title: l(_.action, x, g),
89
- items: q.map((e) => ({
92
+ items: J.map((e) => ({
90
93
  key: e.key,
91
94
  name: e.name,
92
95
  priceLabel: o(e, P),
93
96
  selected: D.has(e.key)
94
97
  })),
95
- allSelected: q.length > 0 && D.size === q.length,
96
- toggleAllLabel: J ? g.actionsDeselectAll : g.actionsSelectAll,
97
- saveDisabled: !J || k,
98
+ allSelected: J.length > 0 && D.size === J.length,
99
+ toggleAllLabel: Y ? g.actionsDeselectAll : g.actionsSelectAll,
100
+ saveDisabled: !Y || k,
98
101
  inProgress: k
99
102
  };
100
103
  }, [
104
+ B,
101
105
  z,
102
- R,
103
106
  k,
104
107
  x,
105
- q,
108
+ J,
106
109
  T,
107
110
  g,
108
- B,
109
111
  V,
112
+ H,
110
113
  D,
111
- F.isPending,
112
- J,
114
+ I,
115
+ Y,
113
116
  y,
114
117
  _,
115
118
  P
116
119
  ]);
117
120
  return {
118
121
  isOpen: !!_,
119
- view: $,
120
- open: H,
121
- close: U,
122
- skip: G,
122
+ view: ee,
123
+ open: U,
124
+ close: W,
125
+ skip: K,
123
126
  changeSubject: w,
124
127
  changeMessage: E,
125
- send: K,
126
- toggleItem: Z,
127
- toggleAll: X,
128
- setAllSelected: Y,
129
- saveItems: Q
128
+ send: q,
129
+ toggleItem: Q,
130
+ toggleAll: Z,
131
+ setAllSelected: X,
132
+ saveItems: $
130
133
  };
131
134
  }
132
135
  //#endregion
@@ -3,7 +3,7 @@
3
3
  "use client";
4
4
  "use client";
5
5
  import { toFileArray as e, validateAttachmentFile as t } from "./attachments.js";
6
- import { useDeleteReceivableAttachmentMutation as n, useUploadReceivableAttachmentMutation as r } from "../../../../data-access/dist/index6.js";
6
+ import { useDeleteReceivableAttachmentMutation as n, useUploadReceivableAttachmentMutation as r } from "../../../../data-access/dist/index7.js";
7
7
  import "../../../../data-access/dist/index.js";
8
8
  import { useCallback as i, useEffect as a, useRef as o, useState as s } from "react";
9
9
  //#region ../../libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/useReceivableAttachmentUploads.js
@@ -13,9 +13,9 @@ import { RECEIVABLE_DETAILS_SECTION as a } from "../../../../ui/dist/index25.js"
13
13
  import "../../../../ui/dist/index.js";
14
14
  import { useAllReceivableHistoryQuery as ee } from "../../../../data-access/dist/index3.js";
15
15
  import { usePaymentAccountsQuery as o } from "../../../../data-access/dist/index5.js";
16
- import { useReceivablePaymentRecordsQuery as s } from "../../../../data-access/dist/index10.js";
17
- import { useReceivablePdfLinkQuery as te, useReceivableQuery as ne, useReceivablesByIdQueries as re } from "../../../../data-access/dist/index12.js";
18
- import { useOverdueRemindersQuery as ie, usePaymentRemindersQuery as c, useRecurrenceQuery as l } from "../../../../data-access/dist/index13.js";
16
+ import { useReceivablePaymentRecordsQuery as s } from "../../../../data-access/dist/index11.js";
17
+ import { useReceivablePdfLinkQuery as te, useReceivableQuery as ne, useReceivablesByIdQueries as re } from "../../../../data-access/dist/index13.js";
18
+ import { useOverdueRemindersQuery as ie, usePaymentRemindersQuery as c, useRecurrenceQuery as l } from "../../../../data-access/dist/index14.js";
19
19
  import "../../../../data-access/dist/index.js";
20
20
  import { canRecordPayments as u } from "./paymentRecord.js";
21
21
  import { buildReceivableAuditHistoryLabels as ae } from "./auditHistory/labels.js";
@@ -24,8 +24,8 @@ import { convertDiscountInput as we, decorateDiscountInput as Te, discountInputT
24
24
  import { buildFormTotalsView as Oe, calculateFormTotals as ke, validateDiscount as Ae, validateInvoiceTotals as je } from "./totals.js";
25
25
  import { createEmptyReceivableFormValues as Me, hasReceivableFormErrors as Ne, receivableFormValuesToCreatePayload as Pe, receivableFormValuesToLineItemChanges as Fe, receivableFormValuesToUpdatePayload as Ie, receivableToFormValues as Le, resolveCounterpartAddresses as Re, submittedLineItemRows as ze, validateReceivableForm as Be } from "./helpers.js";
26
26
  import { getIssueReminderBlocker as Ve, shouldShowRemindersInitially as He } from "./reminders.js";
27
- import { useCreateReceivableMutation as Ue, useIssueReceivableMutation as We, useUpdateReceivableMutation as Ge } from "../../../../data-access/dist/index9.js";
28
- import { useCreateRecurrenceMutation as Ke, useRecurrenceQuery as qe, useUpdateRecurrenceMutation as Je } from "../../../../data-access/dist/index13.js";
27
+ import { useCreateReceivableMutation as Ue, useIssueReceivableMutation as We, useUpdateReceivableMutation as Ge } from "../../../../data-access/dist/index10.js";
28
+ import { useCreateRecurrenceMutation as Ke, useRecurrenceQuery as qe, useUpdateRecurrenceMutation as Je } from "../../../../data-access/dist/index14.js";
29
29
  import "../../../../data-access/dist/index.js";
30
30
  import { useReceivableIssuePreflight as Ye } from "./useReceivableIssuePreflight.js";
31
31
  import { UNSUBMITTED_PAYLOAD_VARIANTS as Xe, apiValidationErrorsToFormErrors as Ze, getApiErrorMessage as Qe, parseApiValidationErrors as $e } from "./apiValidationErrors.js";
@@ -6,7 +6,7 @@ import { useMyEntityQuery as e } from "../../../../../shared/data-access/dist/li
6
6
  import "../../../../../shared/data-access/dist/index.js";
7
7
  import { useCounterpartQuery as t } from "../../../../../shared/counterpart-management/data-access/dist/index3.js";
8
8
  import "../../../../../shared/counterpart-management/feature/dist/index.js";
9
- import { useReceivableRequiredFieldsQuery as n } from "../../../../data-access/dist/index12.js";
9
+ import { useReceivableRequiredFieldsQuery as n } from "../../../../data-access/dist/index13.js";
10
10
  import "../../../../data-access/dist/index.js";
11
11
  //#region ../../libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/useReceivableIssuePreflight.js
12
12
  function r({ counterpartId: r, billingAddressId: i, billingCountry: a }) {
@@ -11,7 +11,7 @@ import { useWidgetConfig as r } from "../../../../../shared/feature/dist/lib/Wid
11
11
  import "../../../../../shared/feature/dist/index.js";
12
12
  import { getCurrencySymbol as i } from "./lineItems.js";
13
13
  import { formatMoney as a } from "./helpers.js";
14
- import { useCreateReceivablePaymentRecordMutation as o } from "../../../../data-access/dist/index11.js";
14
+ import { useCreateReceivablePaymentRecordMutation as o } from "../../../../data-access/dist/index12.js";
15
15
  import "../../../../data-access/dist/index.js";
16
16
  import { amountDueInputValue as s, buildPaymentRecordPayload as c, buildPaymentReviewView as l, defaultPaymentRecordValues as u, hasPaymentRecordErrors as d, validatePaymentRecordValues as f } from "./paymentRecord.js";
17
17
  import { useCallback as p, useState as m } from "react";
@@ -9,7 +9,7 @@ import "../../../../../shared/ui/dist/index.js";
9
9
  import { useWidgetConfig as r } from "../../../../../shared/feature/dist/lib/WidgetProvider/hooks.js";
10
10
  import "../../../../../shared/feature/dist/index.js";
11
11
  import { areOverdueTermsValid as i, buildOverdueReminderPayload as a, buildPaymentReminderPayload as o, buildRemindersView as s, canCreateReminders as c, getImpliedDueDate as l, isBeforeDueDaysValid as u, sanitizeReminderDays as d } from "./reminders.js";
12
- import { useCreateOverdueReminderMutation as f, useCreatePaymentReminderMutation as p, useOverdueRemindersQuery as m, usePaymentRemindersQuery as h } from "../../../../data-access/dist/index13.js";
12
+ import { useCreateOverdueReminderMutation as f, useCreatePaymentReminderMutation as p, useOverdueRemindersQuery as m, usePaymentRemindersQuery as h } from "../../../../data-access/dist/index14.js";
13
13
  import "../../../../data-access/dist/index.js";
14
14
  import { useCallback as g, useMemo as _, useState as v } from "react";
15
15
  //#region ../../libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/useReceivableReminders.js
@@ -2,7 +2,7 @@
2
2
  "use client";
3
3
  "use client";
4
4
  "use client";
5
- import { useReceivablesAnalyticsQuery as e } from "../../../../data-access/dist/index14.js";
5
+ import { useReceivablesAnalyticsQuery as e } from "../../../../data-access/dist/index15.js";
6
6
  import "../../../../data-access/dist/index.js";
7
7
  import { buildReceivableStatusCardsView as t } from "./statusCards.js";
8
8
  import { useMemo as n } from "react";
@@ -3,7 +3,7 @@
3
3
  "use client";
4
4
  "use client";
5
5
  import { buildReceivableRows as e } from "./helpers.js";
6
- import { useReceivablesQuery as t } from "../../../../data-access/dist/index12.js";
6
+ import { useReceivablesQuery as t } from "../../../../data-access/dist/index13.js";
7
7
  import "../../../../data-access/dist/index.js";
8
8
  import { useInvoicesFilter as n } from "./useInvoicesFilter.js";
9
9
  import { useReceivableCustomerNames as r } from "./useReceivableCustomerNames.js";
@@ -14,72 +14,72 @@ var l = [], u = [{
14
14
  id: "dueDateLabel",
15
15
  desc: !0
16
16
  }];
17
- function d({ initialCounterpartId: d, messages: p, statusLabels: m, filterLabels: h, enabled: g = !0, visible: _ = g }) {
18
- let [v, y] = c(u), [b, x] = c(10), [S, C] = c(), [w, T] = c(""), [E, D] = c(""), O = a(() => C(void 0), []), k = n({
17
+ function d({ initialCounterpartId: d, messages: p, statusLabels: m, filterLabels: h, pageSizeOptions: g, enabled: _ = !0, visible: v = _ }) {
18
+ let [y, b] = c(u), [x, S] = c(g?.[0] ?? 10), [C, w] = c(), [T, E] = c(""), [D, O] = c(""), k = a(() => w(void 0), []), A = n({
19
19
  initialCounterpartId: d,
20
- search: w,
21
- onSearchChange: T,
22
- onFiltersChange: O,
20
+ search: T,
21
+ onSearchChange: E,
22
+ onFiltersChange: k,
23
23
  statusLabels: m,
24
24
  labels: h
25
25
  });
26
26
  o(() => {
27
27
  let e = setTimeout(() => {
28
- D(w), C(void 0);
28
+ O(T), w(void 0);
29
29
  }, 300);
30
30
  return () => clearTimeout(e);
31
- }, [w]);
32
- let A = v[0]?.id, j = A ? f[A] : void 0, M = v[0] ? v[0].desc ? "desc" : "asc" : void 0, N = t({
33
- enabled: g,
31
+ }, [T]);
32
+ let j = y[0]?.id, M = j ? f[j] : void 0, N = y[0] ? y[0].desc ? "desc" : "asc" : void 0, P = t({
33
+ enabled: _,
34
34
  type: "invoice",
35
- limit: b,
36
- pagination_token: S,
37
- search_text: E || void 0,
38
- ...k.query,
39
- ...j ? {
40
- sort: j,
41
- order: M
35
+ limit: x,
36
+ pagination_token: C,
37
+ search_text: D || void 0,
38
+ ...A.query,
39
+ ...M ? {
40
+ sort: M,
41
+ order: N
42
42
  } : {}
43
- }), P = i({
44
- enabled: g,
45
- visible: _,
46
- statusFilter: k.cardStatus,
43
+ }), F = i({
44
+ enabled: _,
45
+ visible: v,
46
+ statusFilter: A.cardStatus,
47
47
  messages: p,
48
48
  statusLabels: m
49
- }), F = N.data?.data ?? l, I = s(() => new Map(F.map((e) => [e.id, e])), [F]), L = a((e) => I.get(e), [I]), R = r(F), z = s(() => e({
50
- receivables: F,
49
+ }), I = P.data?.data ?? l, L = s(() => new Map(I.map((e) => [e.id, e])), [I]), R = a((e) => L.get(e), [L]), z = r(I), B = s(() => e({
50
+ receivables: I,
51
51
  messages: p,
52
- customerNames: R
52
+ customerNames: z
53
53
  }), [
54
- R,
54
+ z,
55
55
  p,
56
- F
57
- ]), B = a((e) => {
58
- let t = typeof e == "function" ? e(v) : e;
59
- y(t[0] && Object.hasOwn(f, t[0].id) ? t : u), C(void 0);
60
- }, [v]), V = a((e) => {
61
- x(e), C(void 0);
62
- }, []), H = a(() => C(N.data?.next_pagination_token ?? void 0), [N.data?.next_pagination_token]), U = a(() => C(N.data?.prev_pagination_token ?? void 0), [N.data?.prev_pagination_token]), W = a(() => {
63
- N.refetch();
64
- }, [N]);
56
+ I
57
+ ]), V = a((e) => {
58
+ let t = typeof e == "function" ? e(y) : e;
59
+ b(t[0] && Object.hasOwn(f, t[0].id) ? t : u), w(void 0);
60
+ }, [y]), H = a((e) => {
61
+ S(e), w(void 0);
62
+ }, []), U = a(() => w(P.data?.next_pagination_token ?? void 0), [P.data?.next_pagination_token]), W = a(() => w(P.data?.prev_pagination_token ?? void 0), [P.data?.prev_pagination_token]), G = a(() => {
63
+ P.refetch();
64
+ }, [P]);
65
65
  return {
66
- rows: z,
67
- isLoading: N.isLoading,
68
- isError: N.isError,
69
- sorting: v,
70
- onSortingChange: B,
71
- pageSize: b,
72
- onPageSizeChange: V,
73
- hasNextPage: !!N.data?.next_pagination_token,
74
- hasPrevPage: !!N.data?.prev_pagination_token,
75
- onNextPage: H,
76
- onPrevPage: U,
77
- statusCards: P,
78
- onStatusCardSelect: k.selectStatusCard,
79
- filterBar: k.filterBar,
80
- isFiltering: k.isFiltering,
81
- onRetry: W,
82
- getReceivableById: L
66
+ rows: B,
67
+ isLoading: P.isLoading,
68
+ isError: P.isError,
69
+ sorting: y,
70
+ onSortingChange: V,
71
+ pageSize: x,
72
+ onPageSizeChange: H,
73
+ hasNextPage: !!P.data?.next_pagination_token,
74
+ hasPrevPage: !!P.data?.prev_pagination_token,
75
+ onNextPage: U,
76
+ onPrevPage: W,
77
+ statusCards: F,
78
+ onStatusCardSelect: A.selectStatusCard,
79
+ filterBar: A.filterBar,
80
+ isFiltering: A.isFiltering,
81
+ onRetry: G,
82
+ getReceivableById: R
83
83
  };
84
84
  }
85
85
  var f = {