@tesouro/embedded-components-react 0.11.200 → 0.11.201

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.
@@ -37,14 +37,14 @@ import "../../data-access/dist/index.js";
37
37
  import { useCallback as y, useEffect as b, useMemo as x, useRef as _e, useState as S } from "react";
38
38
  import { BanIcon as ve, FileCheckIcon as ye, Trash2Icon as be } from "lucide-react";
39
39
  // ../../libs/tesouro-embedded-components-react/bill-pay-widget/bills-list/feature/dist/index17.js
40
- var xe = 10, C = 100, Se = 3, Ce = [{
40
+ var xe = 10, Se = 100, Ce = 3, we = [{
41
41
  id: "addedOnLabel",
42
42
  desc: !0
43
- }], w = {
43
+ }], C = {
44
44
  AllBills: "allBills",
45
45
  PossibleDuplicates: "possibleDuplicates"
46
46
  };
47
- function we(e, t) {
47
+ function Te(e, t) {
48
48
  let n = new Map(e.map((e) => [e.id, e])), r = /* @__PURE__ */ new Map(), i = (e) => {
49
49
  r.has(e) || r.set(e, /* @__PURE__ */ new Set());
50
50
  }, a = (e, t) => {
@@ -97,16 +97,16 @@ function we(e, t) {
97
97
  }
98
98
  return f;
99
99
  }
100
- function Te({ enabled: c = !0, canPay: d, canReadVendors: h = !0, isVendorFilterPaused: de = !1, filterLabels: Te, onOpenBill: ke, duplicateRowNote: Ae, attachmentLabel: je, duplicateGroupLabels: T, canManageDuplicates: Me = !1, duplicateView: E = w.AllBills, scheduledRelativeDayLabels: Ne, dueDateLabels: Pe, selectedSummaryCard: D, onSummaryCardChange: Fe }) {
101
- let O = i(), [k, Ie] = S(D ? _.All : v), [Le, Re] = S(Ce), [ze, Be] = S(xe), [Ve, A] = S(), [He, Ue] = S(d);
102
- d !== void 0 && He !== d && (Ue(d), A(void 0));
103
- let j = d ?? He, [We, Ge] = S(0), [M, Ke] = S(""), [N, qe] = S(""), [P, Je] = S(), [F, Ye] = S(), I = y(() => {
104
- A(void 0), Ge(0);
100
+ function Ee({ enabled: c = !0, canPay: d, canReadVendors: h = !0, isVendorFilterPaused: de = !1, filterLabels: Ee, onOpenBill: Ae, duplicateRowNote: je, attachmentLabel: Me, duplicateGroupLabels: w, canManageDuplicates: Ne = !1, duplicateView: T = C.AllBills, scheduledRelativeDayLabels: Pe, dueDateLabels: Fe, selectedSummaryCard: E, onSummaryCardChange: Ie, selectedQueue: D, onQueueChange: Le }) {
101
+ let O = i(), [k, Re] = S(E ? _.All : D ?? v), [ze, Be] = S(we), [Ve, He] = S(xe), [Ue, A] = S(), [We, Ge] = S(d);
102
+ d !== void 0 && We !== d && (Ge(d), A(void 0));
103
+ let j = d ?? We, [Ke, qe] = S(0), [M, Je] = S(""), [N, Ye] = S(""), [P, Xe] = S(), [F, Ze] = S(), I = y(() => {
104
+ A(void 0), qe(0);
105
105
  }, []);
106
106
  b(() => {
107
107
  if (M === N) return;
108
108
  let e = setTimeout(() => {
109
- qe(M), I();
109
+ Ye(M), I();
110
110
  }, 300);
111
111
  return () => clearTimeout(e);
112
112
  }, [
@@ -115,60 +115,60 @@ function Te({ enabled: c = !0, canPay: d, canReadVendors: h = !0, isVendorFilter
115
115
  I
116
116
  ]), b(() => {
117
117
  I();
118
- }, [E, I]);
119
- let L = E === w.PossibleDuplicates, Xe = x(() => L ? [] : ie(k, j ?? !1), [
118
+ }, [T, I]);
119
+ let L = T === C.PossibleDuplicates, Qe = x(() => L ? [] : ie(k, j ?? !1), [
120
120
  L,
121
121
  k,
122
122
  j
123
123
  ]), R = ue({
124
- statusOptions: Xe,
124
+ statusOptions: Qe,
125
125
  offersVendorFilter: h,
126
126
  isVendorFilterPaused: de,
127
- labels: Te,
127
+ labels: Ee,
128
128
  onFiltersChange: I,
129
- initialSummaryCard: D,
130
- onSummaryCardChange: Fe,
129
+ initialSummaryCard: E,
130
+ onSummaryCardChange: Ie,
131
131
  today: O
132
- }), { clearAll: Ze, filterByVendor: Qe, summaryCard: z, selectSummaryCard: B, applySummaryCard: $e } = R, et = z === se.Overdue && !O, tt = Le[0], nt = oe(tt?.id), rt = nt ? tt?.desc ? "desc" : "asc" : void 0, it = L ? _.All : k, at = x(() => {
133
- let e = re(it, j ?? !1);
132
+ }), { clearAll: $e, filterByVendor: et, summaryCard: z, selectSummaryCard: B, applySummaryCard: V } = R, tt = z === se.Overdue && !O, nt = ze[0], rt = oe(nt?.id), it = rt ? nt?.desc ? "desc" : "asc" : void 0, at = L ? _.All : k, ot = x(() => {
133
+ let e = re(at, j ?? !1);
134
134
  return {
135
135
  ...R.query,
136
136
  ...e,
137
- limit: L ? C : ze,
138
- pagination_token: L ? void 0 : Ve,
137
+ limit: L ? Se : Ve,
138
+ pagination_token: L ? void 0 : Ue,
139
139
  status__in: L ? void 0 : R.query.status__in ?? e.status__in,
140
140
  duplicate_match_status: L ? "suspected" : void 0,
141
141
  counterpart_name__icontains: N || void 0,
142
- sort: nt,
143
- order: rt
142
+ sort: rt,
143
+ order: it
144
144
  };
145
145
  }, [
146
146
  R.query,
147
- ze,
148
147
  Ve,
148
+ Ue,
149
149
  L,
150
- it,
150
+ at,
151
151
  j,
152
152
  N,
153
- nt,
154
- rt
155
- ]), { organizationId: ot } = r(), V = JSON.stringify([ot, at]), H = he({
156
- ...at,
157
- enabled: c && d !== void 0 && !L && !et,
153
+ rt,
154
+ it
155
+ ]), { organizationId: st } = r(), H = JSON.stringify([st, ot]), U = he({
156
+ ...ot,
157
+ enabled: c && d !== void 0 && !L && !tt,
158
158
  pollWhileOcrProcessing: !0
159
- }), U = pe({
160
- ...at,
159
+ }), W = pe({
160
+ ...ot,
161
161
  enabled: c && L,
162
- maxPages: Se
163
- }), W = L ? {
164
- ...U,
165
- data: { data: U.payables },
166
- isLoading: U.isResolving,
167
- isFetching: U.isFetching || U.isResolving
168
- } : H, G = (W.data?.data ?? []).filter((e) => e.ocr_status !== "processing"), K = me(), q = y(async (t, n, r, i) => {
162
+ maxPages: Ce
163
+ }), G = L ? {
164
+ ...W,
165
+ data: { data: W.payables },
166
+ isLoading: W.isResolving,
167
+ isFetching: W.isFetching || W.isResolving
168
+ } : U, K = (G.data?.data ?? []).filter((e) => e.ocr_status !== "processing"), q = me(), J = y(async (t, n, r, i) => {
169
169
  let a = u(t, n, i);
170
170
  if (a.length) try {
171
- await K.mutateAsync({
171
+ await q.mutateAsync({
172
172
  verdict: n,
173
173
  targets: a.map((e) => ({
174
174
  payableId: t.id,
@@ -178,111 +178,111 @@ function Te({ enabled: c = !0, canPay: d, canReadVendors: h = !0, isVendorFilter
178
178
  }))
179
179
  }), e.success(r);
180
180
  } catch {
181
- e.error(T.actionFailedToast);
181
+ e.error(w.actionFailedToast);
182
182
  }
183
- }, [K, T.actionFailedToast]), J = x(() => ({
183
+ }, [q, w.actionFailedToast]), Y = x(() => ({
184
184
  delete: {
185
- action: T.deleteAction,
186
- title: T.deleteConfirmTitle,
187
- description: T.deleteConfirmDescription,
188
- confirmButton: T.deleteConfirmButton,
189
- backButton: T.cancelConfirmBackButton,
190
- toast: T.deletedToast
185
+ action: w.deleteAction,
186
+ title: w.deleteConfirmTitle,
187
+ description: w.deleteConfirmDescription,
188
+ confirmButton: w.deleteConfirmButton,
189
+ backButton: w.cancelConfirmBackButton,
190
+ toast: w.deletedToast
191
191
  },
192
192
  cancel: {
193
- action: T.cancelAction,
194
- title: T.cancelConfirmTitle,
195
- description: T.cancelConfirmDescription,
196
- confirmButton: T.cancelConfirmButton,
197
- backButton: T.cancelConfirmBackButton,
198
- toast: T.cancelledToast
193
+ action: w.cancelAction,
194
+ title: w.cancelConfirmTitle,
195
+ description: w.cancelConfirmDescription,
196
+ confirmButton: w.cancelConfirmButton,
197
+ backButton: w.cancelConfirmBackButton,
198
+ toast: w.cancelledToast
199
199
  },
200
200
  confirm: {
201
- action: T.confirmAction,
202
- title: T.confirmDuplicateTitle,
203
- description: T.confirmDuplicateDescription,
204
- confirmButton: T.confirmDuplicateButton,
205
- backButton: T.cancelConfirmBackButton,
206
- toast: T.confirmedToast
201
+ action: w.confirmAction,
202
+ title: w.confirmDuplicateTitle,
203
+ description: w.confirmDuplicateDescription,
204
+ confirmButton: w.confirmDuplicateButton,
205
+ backButton: w.cancelConfirmBackButton,
206
+ toast: w.confirmedToast
207
207
  }
208
- }), [T]), st = P?.removeBy ?? "cancel", ct = y(async () => {
209
- P && (await q(P.payable, a.Remove, J[P.removeBy].toast), Je(void 0));
208
+ }), [w]), ct = P?.removeBy ?? "cancel", lt = y(async () => {
209
+ P && (await J(P.payable, a.Remove, Y[P.removeBy].toast), Xe(void 0));
210
210
  }, [
211
- q,
211
+ J,
212
212
  P,
213
- J
214
- ]), lt = y(async () => {
215
- F && (await q(F.payable, a.Keep, T.dismissedToast, F.originalPayableId), Ye(void 0));
213
+ Y
214
+ ]), ut = y(async () => {
215
+ F && (await J(F.payable, a.Keep, w.dismissedToast, F.originalPayableId), Ze(void 0));
216
216
  }, [
217
- q,
218
- T.dismissedToast,
217
+ J,
218
+ w.dismissedToast,
219
219
  F
220
- ]), [ut, dt] = S(V);
220
+ ]), [dt, ft] = S(H);
221
221
  b(() => {
222
- W.isFetching || dt(V);
223
- }, [W.isFetching, V]);
224
- let ft = W.data?.data.length, pt = ft === 0, mt = ge({ enabled: c && pt }), ht = !pt || (mt.data?.count ?? 1) > 0, Y = x(() => E === w.PossibleDuplicates ? we(G, T) : /* @__PURE__ */ new Map(), [
225
- E,
226
- G,
227
- T
228
- ]), gt = x(() => {
229
- if (Y.size === 0) return G;
222
+ G.isFetching || ft(H);
223
+ }, [G.isFetching, H]);
224
+ let pt = G.data?.data.length, mt = pt === 0, ht = ge({ enabled: c && mt }), gt = !mt || (ht.data?.count ?? 1) > 0, X = x(() => T === C.PossibleDuplicates ? Te(K, w) : /* @__PURE__ */ new Map(), [
225
+ T,
226
+ K,
227
+ w
228
+ ]), _t = x(() => {
229
+ if (X.size === 0) return K;
230
230
  let e = /* @__PURE__ */ new Map();
231
- return G.forEach((t, n) => {
232
- let r = Y.get(t.id)?.key;
231
+ return K.forEach((t, n) => {
232
+ let r = X.get(t.id)?.key;
233
233
  r !== void 0 && !e.has(r) && e.set(r, n);
234
- }), G.map((t, n) => ({
234
+ }), K.map((t, n) => ({
235
235
  payable: t,
236
236
  index: n,
237
- order: e.get(Y.get(t.id)?.key ?? "") ?? n
237
+ order: e.get(X.get(t.id)?.key ?? "") ?? n
238
238
  })).sort((e, t) => e.order - t.order || l(e.payable, t.payable) || e.index - t.index).map(({ payable: e }) => e);
239
- }, [G, Y]), { vendorNames: X, lookup: _t } = fe({
240
- payables: W.data?.data,
239
+ }, [K, X]), { vendorNames: vt, lookup: yt } = fe({
240
+ payables: G.data?.data,
241
241
  enabled: c,
242
242
  canReadVendors: h,
243
243
  isPaused: de
244
- }), vt = y((e) => {
245
- let t = e.title || (e.vendorCounterpartId ? X.get(e.vendorCounterpartId) ?? "" : "");
244
+ }), bt = y((e) => {
245
+ let t = e.title || (e.vendorCounterpartId ? vt.get(e.vendorCounterpartId) ?? "" : "");
246
246
  return {
247
247
  key: e.key,
248
- label: t === e.title ? e.label : T.groupHeader({
248
+ label: t === e.title ? e.label : w.groupHeader({
249
249
  vendorLabel: t,
250
250
  invoiceNumberLabel: e.invoiceNumberLabel
251
251
  }),
252
252
  title: t,
253
253
  meta: e.meta
254
254
  };
255
- }, [X, T]), Z = x(() => Ee(gt.map((e) => {
255
+ }, [vt, w]), Z = x(() => De(_t.map((e) => {
256
256
  let r = te({
257
257
  apiStatus: e.status,
258
258
  dueDate: e.due_date,
259
259
  scheduledPaymentDate: e.scheduled_payment_date
260
- }), i = e.amount_due ?? e.total_amount, a = e.status === "partially_paid" || e.status === "paid", c = (t) => t == null ? "" : n(t / 100, { currencyCode: e.currency ?? "USD" }), l = o(e.scheduled_payment_date, Ne, O), u = m({
260
+ }), i = e.amount_due ?? e.total_amount, a = e.status === "partially_paid" || e.status === "paid", c = (t) => t == null ? "" : n(t / 100, { currencyCode: e.currency ?? "USD" }), l = o(e.scheduled_payment_date, Pe, O), u = m({
261
261
  status: e.status,
262
262
  dueDate: e.due_date,
263
263
  today: O,
264
264
  isScheduled: r.status === "scheduled",
265
- labels: Pe
266
- }), d = Y.get(e.id), h = s(e), g = ee(e) || (e.counterpart_id ? X.get(e.counterpart_id) ?? "" : ""), _ = e.document_id ?? "", v = p(e.status), ne = d?.originalPayableId !== void 0 && d.originalPayableId === e.id, re = L && h && Me && d ? {
267
- triggerLabel: T.menuTrigger({
265
+ labels: Fe
266
+ }), d = X.get(e.id), h = s(e), g = ee(e) || (e.counterpart_id ? vt.get(e.counterpart_id) ?? "" : ""), _ = e.document_id ?? "", v = p(e.status), ne = d?.originalPayableId !== void 0 && d.originalPayableId === e.id, re = L && h && Ne && d ? {
267
+ triggerLabel: w.menuTrigger({
268
268
  vendorLabel: g,
269
269
  invoiceNumberLabel: _
270
270
  }),
271
271
  items: [{
272
272
  id: "not-duplicate",
273
- label: T.notDuplicateAction,
273
+ label: w.notDuplicateAction,
274
274
  icon: ye,
275
- disabled: K.isPending,
276
- onSelect: () => Ye({
275
+ disabled: q.isPending,
276
+ onSelect: () => Ze({
277
277
  payable: e,
278
278
  originalPayableId: ne ? void 0 : d.originalPayableId
279
279
  })
280
280
  }, ...v ? [{
281
281
  id: "cancel-duplicate",
282
- label: J[v].action,
282
+ label: Y[v].action,
283
283
  icon: v === "delete" ? be : ve,
284
- disabled: K.isPending,
285
- onSelect: () => Je({
284
+ disabled: q.isPending,
285
+ onSelect: () => Xe({
286
286
  payable: e,
287
287
  removeBy: v
288
288
  })
@@ -291,7 +291,7 @@ function Te({ enabled: c = !0, canPay: d, canReadVendors: h = !0, isVendorFilter
291
291
  return {
292
292
  rowKey: e.id,
293
293
  vendorLabel: g,
294
- vendorLookup: g || !e.counterpart_id ? void 0 : Oe(_t),
294
+ vendorLookup: g || !e.counterpart_id ? void 0 : ke(yt),
295
295
  invoiceNumberLabel: _,
296
296
  issueDateLabel: t(e.issued_at),
297
297
  dueDateLabel: u.label,
@@ -304,42 +304,52 @@ function Te({ enabled: c = !0, canPay: d, canReadVendors: h = !0, isVendorFilter
304
304
  amountPaidLabel: a ? c(e.amount_paid) : "",
305
305
  amountScheduledLabel: c(e.amount_to_pay ?? i),
306
306
  totalAmountLabel: c(e.total_amount),
307
- attachment: e.file_id ? { label: je } : void 0,
307
+ attachment: e.file_id ? { label: Me } : void 0,
308
308
  status: r.status,
309
309
  statusTone: r.tone,
310
310
  addedOnLabel: t(e.created_at?.slice(0, 10)),
311
- ...d ? { group: vt(d) } : {},
311
+ ...d ? { group: bt(d) } : {},
312
312
  ...re ? { menu: re } : {},
313
313
  ...!L && !d && h ? {
314
314
  marker: "duplicate",
315
- rowNote: Ae
315
+ rowNote: je
316
316
  } : {},
317
- onOpen: () => ke(e.id, f(e.status))
317
+ onOpen: () => Ae(e.id, f(e.status))
318
318
  };
319
- }), T), [
320
- gt,
319
+ }), w), [
320
+ _t,
321
+ X,
322
+ w,
321
323
  Y,
322
- T,
323
- J,
324
- K.isPending,
325
- Me,
324
+ q.isPending,
325
+ Ne,
326
326
  L,
327
- Ae,
328
327
  je,
329
- Ne,
328
+ Me,
330
329
  Pe,
330
+ Fe,
331
331
  O,
332
- ke,
333
- X,
334
- _t,
335
- vt
336
- ]), yt = x(() => L ? De(Z, C) : [], [Z, L]), Q = Math.min(We, Math.max(0, yt.length - 1)), bt = L ? yt[Q] ?? [] : Z, $ = y((e) => {
337
- let t = e;
338
- Ie(t), t !== _.All && B(null), Re((e) => {
339
- let n = e[0]?.id;
340
- return n ? ne(t).some((e) => ae(e) === n) ? e : Ce : e;
332
+ Ae,
333
+ vt,
334
+ yt,
335
+ bt
336
+ ]), xt = x(() => L ? Oe(Z, Se) : [], [Z, L]), Q = Math.min(Ke, Math.max(0, xt.length - 1)), St = L ? xt[Q] ?? [] : Z, Ct = _e(k), wt = y((e, t = !1) => {
337
+ Ct.current = e, Re(e), e !== _.All && (t ? V : B)(null), Be((t) => {
338
+ let n = t[0]?.id;
339
+ return n ? ne(e).some((e) => ae(e) === n) ? t : we : t;
341
340
  }), I();
342
- }, [I, B]), xt = y((e) => {
341
+ }, [
342
+ V,
343
+ I,
344
+ B
345
+ ]), $ = y((e) => {
346
+ let t = e;
347
+ t !== Ct.current && (wt(t), Le?.(t));
348
+ }, [wt, Le]), Tt = _e(D);
349
+ b(() => {
350
+ D !== void 0 && D !== Tt.current && (Tt.current = D, D !== Ct.current && wt(D, !0));
351
+ }, [wt, D]);
352
+ let Et = y((e) => {
343
353
  if (!ce(e)) return;
344
354
  let t = e === z ? null : e;
345
355
  t && $(_.All), B(t);
@@ -347,52 +357,52 @@ function Te({ enabled: c = !0, canPay: d, canReadVendors: h = !0, isVendorFilter
347
357
  $,
348
358
  B,
349
359
  z
350
- ]), St = _e(D);
360
+ ]), Dt = _e(E);
351
361
  b(() => {
352
- D !== void 0 && D !== St.current && (St.current = D, D !== z && (D && $(_.All), $e(D)));
362
+ E !== void 0 && E !== Dt.current && (Dt.current = E, E !== z && (E && $(_.All), V(E)));
353
363
  }, [
354
- $e,
364
+ V,
355
365
  $,
356
- D,
366
+ E,
357
367
  z
358
368
  ]);
359
- let Ct = y((e) => {
360
- $(_.All), Ke(""), Qe(e);
361
- }, [Qe, $]), wt = y(() => {
362
- Ke(""), qe(""), Ze(), I();
363
- }, [Ze, I]), Tt = y((e) => {
364
- Re((t) => typeof e == "function" ? e(t) : e), I();
365
- }, [I]), Et = y((e) => {
366
- Be(e), I();
367
- }, [I]), Dt = y(() => {
368
- L ? Ge(Q + 1) : A(H.data?.next_pagination_token ?? void 0);
369
+ let Ot = y((e) => {
370
+ $(_.All), Je(""), et(e);
371
+ }, [et, $]), kt = y(() => {
372
+ Je(""), Ye(""), $e(), I();
373
+ }, [$e, I]), At = y((e) => {
374
+ Be((t) => typeof e == "function" ? e(t) : e), I();
375
+ }, [I]), jt = y((e) => {
376
+ He(e), I();
377
+ }, [I]), Mt = y(() => {
378
+ L ? qe(Q + 1) : A(U.data?.next_pagination_token ?? void 0);
369
379
  }, [
370
380
  Q,
371
381
  L,
372
- H.data?.next_pagination_token
373
- ]), Ot = y(() => {
374
- L ? Ge(Math.max(0, Q - 1)) : A(H.data?.prev_pagination_token ?? void 0);
382
+ U.data?.next_pagination_token
383
+ ]), Nt = y(() => {
384
+ L ? qe(Math.max(0, Q - 1)) : A(U.data?.prev_pagination_token ?? void 0);
375
385
  }, [
376
386
  Q,
377
387
  L,
378
- H.data?.prev_pagination_token
379
- ]), kt = W.refetch, At = y(() => {
380
- kt();
381
- }, [kt]);
388
+ U.data?.prev_pagination_token
389
+ ]), Pt = G.refetch, Ft = y(() => {
390
+ Pt();
391
+ }, [Pt]);
382
392
  return {
383
- rows: bt,
384
- isLoading: W.isLoading || !L && j === void 0 || et || V !== ut || pt && mt.isLoading || (ft ?? 0) > 0 && bt.length === 0,
385
- isError: W.isError,
386
- onRetry: At,
393
+ rows: St,
394
+ isLoading: G.isLoading || !L && j === void 0 || tt || H !== dt || mt && ht.isLoading || (pt ?? 0) > 0 && St.length === 0,
395
+ isError: G.isError,
396
+ onRetry: Ft,
387
397
  selectedFilterTabId: k,
388
398
  onFilterTabChange: $,
389
- showVendorBills: Ct,
390
- clearQueryConstraints: wt,
399
+ showVendorBills: Ot,
400
+ clearQueryConstraints: kt,
391
401
  summaryCard: z,
392
- onSummaryCardSelect: xt,
402
+ onSummaryCardSelect: Et,
393
403
  searchValue: M,
394
- onSearchChange: Ke,
395
- hasAnyBills: ht,
404
+ onSearchChange: Je,
405
+ hasAnyBills: gt,
396
406
  isSearchActive: N.length > 0 || R.isFilterActive,
397
407
  filterBarProps: R.filterBarProps,
398
408
  visibleColumns: L ? [
@@ -403,48 +413,48 @@ function Te({ enabled: c = !0, canPay: d, canReadVendors: h = !0, isVendorFilter
403
413
  ] : ne(k),
404
414
  keepsColumnOrder: L,
405
415
  isSortable: !L,
406
- pageInfo: L ? T.pageInfo({
416
+ pageInfo: L ? w.pageInfo({
407
417
  billCount: Z.length,
408
418
  groupCount: new Set(Z.map((e) => e.group?.key ?? e.rowKey)).size
409
419
  }) : void 0,
410
420
  showAddPanelWhenEmpty: !L,
411
- sorting: Le,
412
- onSortingChange: Tt,
413
- pageSize: L ? C : ze,
414
- pageSizeOptions: L ? [C] : void 0,
415
- onPageSizeChange: Et,
416
- hasNextPage: L ? Q < yt.length - 1 : !!H.data?.next_pagination_token,
417
- hasPrevPage: L ? Q > 0 : !!H.data?.prev_pagination_token,
418
- onNextPage: Dt,
419
- onPrevPage: Ot,
421
+ sorting: ze,
422
+ onSortingChange: At,
423
+ pageSize: L ? Se : Ve,
424
+ pageSizeOptions: L ? [Se] : void 0,
425
+ onPageSizeChange: jt,
426
+ hasNextPage: L ? Q < xt.length - 1 : !!U.data?.next_pagination_token,
427
+ hasPrevPage: L ? Q > 0 : !!U.data?.prev_pagination_token,
428
+ onNextPage: Mt,
429
+ onPrevPage: Nt,
420
430
  cancelConfirmation: {
421
431
  open: !!P,
422
- copy: le(J[st], st),
423
- onConfirm: () => void ct(),
424
- onCancel: () => Je(void 0),
425
- isPending: K.isPending,
426
- cancelButtonLabel: J[st].backButton
432
+ copy: le(Y[ct], ct),
433
+ onConfirm: () => void lt(),
434
+ onCancel: () => Xe(void 0),
435
+ isPending: q.isPending,
436
+ cancelButtonLabel: Y[ct].backButton
427
437
  },
428
438
  keepConfirmation: {
429
439
  open: !!F,
430
440
  copy: {
431
- title: T.notDuplicateConfirmTitle,
432
- description: T.notDuplicateConfirmDescription,
433
- confirmButton: T.notDuplicateConfirmButton,
441
+ title: w.notDuplicateConfirmTitle,
442
+ description: w.notDuplicateConfirmDescription,
443
+ confirmButton: w.notDuplicateConfirmButton,
434
444
  presentation: {
435
445
  alignment: "center",
436
446
  icon: ye,
437
447
  actionWidth: "equal"
438
448
  }
439
449
  },
440
- onConfirm: () => void lt(),
441
- onCancel: () => Ye(void 0),
442
- isPending: K.isPending,
443
- cancelButtonLabel: T.notDuplicateConfirmBackButton
450
+ onConfirm: () => void ut(),
451
+ onCancel: () => Ze(void 0),
452
+ isPending: q.isPending,
453
+ cancelButtonLabel: w.notDuplicateConfirmBackButton
444
454
  }
445
455
  };
446
456
  }
447
- function Ee(e, t) {
457
+ function De(e, t) {
448
458
  let n = /* @__PURE__ */ new Map();
449
459
  for (let t of e) {
450
460
  if (!t.group) continue;
@@ -470,14 +480,14 @@ function Ee(e, t) {
470
480
  } : e;
471
481
  });
472
482
  }
473
- function De(e, t) {
483
+ function Oe(e, t) {
474
484
  let n = [], r = [];
475
485
  return e.forEach((i, a) => {
476
486
  let o = i.group !== void 0 && i.group.key === e[a - 1]?.group?.key;
477
487
  r.length >= t && !o && (n.push(r), r = []), r.push(i);
478
488
  }), r.length && n.push(r), n;
479
489
  }
480
- function Oe(e) {
490
+ function ke(e) {
481
491
  return e === de.Settled ? void 0 : e;
482
492
  }
483
- export { w as BillDuplicateView, Te as useBillsTable };
493
+ export { C as BillDuplicateView, Ee as useBillsTable };