@tesouro/embedded-components-react 0.3.38 → 0.3.40

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 (16) hide show
  1. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index11.js +59 -48
  2. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index4.js +2 -2
  3. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index5.js +163 -51
  4. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index6.js +39 -20
  5. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index44.js +25 -24
  6. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index61.js +5 -0
  7. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index64.js +1 -0
  8. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index70.js +68 -65
  9. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index43.js +1 -0
  10. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index44.js +77 -65
  11. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index55.js +1 -0
  12. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index66.js +1 -0
  13. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index67.js +156 -138
  14. package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/index.js +23 -23
  15. package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/analytics/build-info.js +1 -1
  16. package/package.json +1 -1
@@ -8,28 +8,45 @@ import { postApprovalRequestsIdApprove as n, postApprovalRequestsIdReject as r }
8
8
  import { getApprovalRequestsOptions as i } from "../../../shared/data-access/dist/lib/rest/@tanstack/react-query.gen.js";
9
9
  import { withAuthEpoch as a } from "../../../shared/data-access/dist/lib/withAuthEpoch.js";
10
10
  import "../../../shared/data-access/dist/index.js";
11
- import { invalidateApprovalDecisionQueries as o } from "./index5.js";
12
- import { useMutation as s, useQuery as c } from "@tanstack/react-query";
11
+ import { NEWEST_REQUEST_FIRST as o, PAYABLE_OBJECT_TYPE as s } from "./index4.js";
12
+ import { beginApprovalRequestWatch as c, invalidateApprovalDecisionQueries as l, reconcileApprovalDecisionQueries as u } from "./index5.js";
13
+ import { useMutation as d, useQuery as f } from "@tanstack/react-query";
13
14
  //#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index6.js
14
- var l = "payable", u = "desc";
15
- function d(n, { enabled: r } = {}) {
16
- let { client: o, organizationId: s, widgetToken: d, authEpoch: f } = e(), p = !!(s && d && n) && r !== !1, m = i({
17
- client: o,
18
- headers: t(s),
15
+ function p(n, { enabled: r } = {}) {
16
+ let { client: c, organizationId: l, widgetToken: u, authEpoch: d } = e(), p = !!(l && u && n) && r !== !1, m = i({
17
+ client: c,
18
+ headers: t(l),
19
19
  query: {
20
20
  object_id: n ?? "",
21
- object_type: l,
22
- order: u
21
+ object_type: s,
22
+ order: o
23
23
  }
24
24
  });
25
- return c({
26
- ...a(m, f),
25
+ return f({
26
+ ...a(m, d),
27
27
  enabled: p
28
28
  });
29
29
  }
30
- function f() {
30
+ async function m({ client: e, organizationId: t, payableId: n, requestStatus: r }) {
31
+ let i = n && r !== "waiting" && n ? await c({
32
+ client: e,
33
+ organizationId: t,
34
+ payableId: n
35
+ }) : void 0;
36
+ await l({
37
+ client: e,
38
+ organizationId: t,
39
+ payableId: n
40
+ }), !(!n || !i) && u({
41
+ client: e,
42
+ organizationId: t,
43
+ payableId: n,
44
+ watch: i
45
+ }).catch(() => {});
46
+ }
47
+ function h() {
31
48
  let { client: r, organizationId: i } = e();
32
- return s({
49
+ return d({
33
50
  mutationFn: async ({ path: e }) => {
34
51
  let { data: a } = await n({
35
52
  client: r,
@@ -40,17 +57,18 @@ function f() {
40
57
  return a;
41
58
  },
42
59
  onSuccess: async (e) => {
43
- await o({
60
+ await m({
44
61
  client: r,
45
62
  organizationId: i,
46
- payableId: e?.object_id
63
+ payableId: e?.object_id,
64
+ requestStatus: e?.status
47
65
  });
48
66
  }
49
67
  });
50
68
  }
51
- function p() {
69
+ function g() {
52
70
  let { client: n, organizationId: i } = e();
53
- return s({
71
+ return d({
54
72
  mutationFn: async ({ path: e, body: a }) => {
55
73
  let { data: o } = await r({
56
74
  client: n,
@@ -62,13 +80,14 @@ function p() {
62
80
  return o;
63
81
  },
64
82
  onSuccess: async (e) => {
65
- await o({
83
+ await m({
66
84
  client: n,
67
85
  organizationId: i,
68
- payableId: e?.object_id
86
+ payableId: e?.object_id,
87
+ requestStatus: e?.status
69
88
  });
70
89
  }
71
90
  });
72
91
  }
73
92
  //#endregion
74
- export { f as useApprovePayableApprovalRequestMutation, d as usePayableApprovalRequestsQuery, p as useRejectPayableApprovalRequestMutation };
93
+ export { h as useApprovePayableApprovalRequestMutation, p as usePayableApprovalRequestsQuery, g as useRejectPayableApprovalRequestMutation };
@@ -47,21 +47,21 @@ import { Fragment as s, jsx as c, jsxs as l } from "react/jsx-runtime";
47
47
  function je(e) {
48
48
  return !!(e?.bank_account?.account_holder_name && e.bank_account.routing_number && e.bank_account.account_number);
49
49
  }
50
- function u({ open: u, onOpenChange: d, payableId: f, readOnly: p = !1, copy: m, poweredByBankName: Me, isPossibleDuplicate: Ne }) {
51
- let h = a(() => ge(m), [m]), [g, _] = o(), [v, y] = o(!1), [Pe, Fe] = o(!1), [Ie, b] = o(!1), [Le, x] = o(!1), [Re, S] = o(), C = f ?? Re, w = pe(C, { pollWhileOcrProcessing: !0 }), T = fe(C), E = ee(), D = w.data, O = ve({
50
+ function u({ open: u, onOpenChange: d, payableId: f, readOnly: p = !1, copy: m, onCollapse: Me, poweredByBankName: Ne, isPossibleDuplicate: Pe }) {
51
+ let h = a(() => ge(m), [m]), [g, _] = o(), [v, y] = o(!1), [Fe, Ie] = o(!1), [Le, b] = o(!1), [Re, x] = o(!1), [ze, S] = o(), C = f ?? ze, w = pe(C, { pollWhileOcrProcessing: !0 }), T = fe(C), E = ee(), D = w.data, O = ve({
52
52
  payable: D,
53
53
  lineItems: T.lineItems
54
54
  }), k = D?.counterpart_id;
55
55
  ke(() => {
56
56
  v || k && (_(k), y(!0));
57
57
  }, [v, k]);
58
- let ze = i((e) => {
58
+ let Be = i((e) => {
59
59
  y(!0), _(e);
60
60
  }, []), A = De({
61
61
  payableId: p ? void 0 : C,
62
62
  counterpartId: p ? void 0 : g,
63
63
  payableCounterpartId: k,
64
- onCounterpartChange: ze,
64
+ onCounterpartChange: Be,
65
65
  requiredError: O.errors?.vendor,
66
66
  payableCounterpartBankAccountId: D?.counterpart_bank_account_id ?? void 0,
67
67
  extractedVendor: D?.counterpart_raw_data ?? void 0
@@ -100,7 +100,7 @@ function u({ open: u, onOpenChange: d, payableId: f, readOnly: p = !1, copy: m,
100
100
  approvalPolicyId: D?.approval_policy_id,
101
101
  enabled: p,
102
102
  copy: h.approvalPolicyCopy
103
- }), { actions: Be, decisionDialog: Ve } = xe({
103
+ }), { actions: Ve, decisionDialog: He } = xe({
104
104
  payableId: N,
105
105
  status: D?.status,
106
106
  currentApprovalRequestId: P.id,
@@ -123,11 +123,11 @@ function u({ open: u, onOpenChange: d, payableId: f, readOnly: p = !1, copy: m,
123
123
  }), W = a(() => (E.data?.data ?? []).map((e) => ({
124
124
  value: e.id,
125
125
  label: [e.nominal_code, e.name].filter(Boolean).join(" — ")
126
- })), [E.data]), G = de(N), He = e(z?.scopes, [t.UserReadOrg]), K = te({ enabled: p && He }), q = a(() => Te(G.data?.data ?? [], K.data?.data ?? [], h.history), [
126
+ })), [E.data]), G = de(N), Ue = e(z?.scopes, [t.UserReadOrg]), K = te({ enabled: p && Ue }), q = a(() => Te(G.data?.data ?? [], K.data?.data ?? [], h.history), [
127
127
  G.data,
128
128
  K.data,
129
129
  h.history
130
- ]), Ue = a(() => p && D ? we({
130
+ ]), We = a(() => p && D ? we({
131
131
  payable: D,
132
132
  lineItems: T.lineItems,
133
133
  glCodeOptions: W,
@@ -144,7 +144,7 @@ function u({ open: u, onOpenChange: d, payableId: f, readOnly: p = !1, copy: m,
144
144
  T.lineItems,
145
145
  D,
146
146
  p
147
- ]), J = D?.source_of_payable_data === "ocr", Y = L?.name, We = p ? Y ? h.viewTitle(Y) : h.readOnlyTitle : J && Y ? h.extractedTitle(Y) : h.newTitle, Ge = p && D?.created_at ? h.addedOn(ne(D.created_at.slice(0, 10))) : void 0, X = i(() => {
147
+ ]), J = D?.source_of_payable_data === "ocr", Y = L?.name, Ge = p ? Y ? h.viewTitle(Y) : h.readOnlyTitle : J && Y ? h.extractedTitle(Y) : h.newTitle, Ke = p && D?.created_at ? h.addedOn(ne(D.created_at.slice(0, 10))) : void 0, X = i(() => {
148
148
  let e = O.isDirty || A.hasUnsavedVendorChanges || !!j.stagedFile || j.isFileDeletionPending;
149
149
  if (!p && e) {
150
150
  x(!0);
@@ -158,9 +158,9 @@ function u({ open: u, onOpenChange: d, payableId: f, readOnly: p = !1, copy: m,
158
158
  d,
159
159
  p,
160
160
  A.hasUnsavedVendorChanges
161
- ]), Ke = i(() => {
161
+ ]), qe = i(() => {
162
162
  x(!1), d(!1);
163
- }, [d]), Z = T.isResolving || A.mode === "creating", qe = i(async () => {
163
+ }, [d]), Z = T.isResolving || A.mode === "creating", Je = i(async () => {
164
164
  if (Z) return;
165
165
  let e = await j.saveDraft();
166
166
  x(!1), e && d(!1);
@@ -168,24 +168,24 @@ function u({ open: u, onOpenChange: d, payableId: f, readOnly: p = !1, copy: m,
168
168
  j,
169
169
  Z,
170
170
  d
171
- ]), Je = i((e) => {
171
+ ]), Ye = i((e) => {
172
172
  if (!M) return e ? d(!0) : X();
173
173
  }, [
174
174
  X,
175
175
  M,
176
176
  d
177
- ]), Q = !!Ne && !Ie, $ = !p && J && !Pe, Ye = Q || $ ? /* @__PURE__ */ l(s, { children: [Q ? /* @__PURE__ */ c(se, {
177
+ ]), Q = !!Pe && !Le, $ = !p && J && !Fe, Xe = Q || $ ? /* @__PURE__ */ l(s, { children: [Q ? /* @__PURE__ */ c(se, {
178
178
  onNotADuplicate: p ? void 0 : () => b(!0),
179
179
  onRemoveBill: p ? void 0 : () => b(!0),
180
180
  testId: r.duplicateNotice
181
- }) : null, $ ? /* @__PURE__ */ c(ce, { onDismiss: () => Fe(!0) }) : null] }) : void 0;
181
+ }) : null, $ ? /* @__PURE__ */ c(ce, { onDismiss: () => Ie(!0) }) : null] }) : void 0;
182
182
  return /* @__PURE__ */ l(s, { children: [
183
183
  /* @__PURE__ */ c(oe, {
184
184
  open: u,
185
- onOpenChange: Je,
186
- title: We,
187
- subtitle: Ge,
188
- notice: Ye,
185
+ onOpenChange: Ye,
186
+ title: Ge,
187
+ subtitle: Ke,
188
+ notice: Xe,
189
189
  vendor: {
190
190
  ...A,
191
191
  testId: r.vendorSection
@@ -233,8 +233,8 @@ function u({ open: u, onOpenChange: d, payableId: f, readOnly: p = !1, copy: m,
233
233
  menuItems: U.menuItems,
234
234
  readOnly: p,
235
235
  detail: p ? {
236
- view: Ue,
237
- actions: Be,
236
+ view: We,
237
+ actions: Ve,
238
238
  scheduledSummary: I.hasScheduledPayment && I.scheduledDateLabel ? h.scheduledSummary(I.scheduledDateLabel) : void 0,
239
239
  paymentInstructionsForm: k && B ? {
240
240
  isOpen: R.isOpen,
@@ -254,14 +254,15 @@ function u({ open: u, onOpenChange: d, payableId: f, readOnly: p = !1, copy: m,
254
254
  isSavingDraft: j.isSavingDraft,
255
255
  isFinalizing: j.isFinalizing,
256
256
  onCancel: X,
257
+ onCollapse: p ? Me : void 0,
257
258
  onSaveDraft: j.saveDraft,
258
259
  onFinalize: j.finalize,
259
260
  testId: r.dialog
260
261
  }),
261
262
  /* @__PURE__ */ c(ue, {
262
- open: Le,
263
- onSaveDraft: qe,
264
- onDiscard: Ke,
263
+ open: Re,
264
+ onSaveDraft: Je,
265
+ onDiscard: qe,
265
266
  onCancel: () => x(!1),
266
267
  isSaving: j.isSavingDraft,
267
268
  isSaveDraftDisabled: Z,
@@ -271,7 +272,7 @@ function u({ open: u, onOpenChange: d, payableId: f, readOnly: p = !1, copy: m,
271
272
  discardTestId: r.unsavedDiscard
272
273
  }),
273
274
  /* @__PURE__ */ c(n, {
274
- ...Ve,
275
+ ...He,
275
276
  labels: { cancelButton: h.actions.decisionDialog.cancelButton },
276
277
  testId: r.decisionDialog,
277
278
  confirmTestId: r.decisionConfirm,
@@ -287,7 +288,7 @@ function u({ open: u, onOpenChange: d, payableId: f, readOnly: p = !1, copy: m,
287
288
  p && D ? /* @__PURE__ */ c(me, {
288
289
  ref: F,
289
290
  payable: D,
290
- poweredByBankName: Me,
291
+ poweredByBankName: Ne,
291
292
  labels: h.payBill
292
293
  }) : null
293
294
  ] });
@@ -42,6 +42,7 @@ var a = t.Pending, o = [
42
42
  ], s = {
43
43
  [t.Drafts]: [
44
44
  e.Vendor,
45
+ e.Attachment,
45
46
  e.IssueDate,
46
47
  e.DueDate,
47
48
  e.Status,
@@ -51,6 +52,7 @@ var a = t.Pending, o = [
51
52
  ],
52
53
  [t.Pending]: [
53
54
  e.Vendor,
55
+ e.Attachment,
54
56
  e.IssueDate,
55
57
  e.DueDate,
56
58
  e.Status,
@@ -60,6 +62,7 @@ var a = t.Pending, o = [
60
62
  ],
61
63
  [t.Scheduled]: [
62
64
  e.Vendor,
65
+ e.Attachment,
63
66
  e.IssueDate,
64
67
  e.DueDate,
65
68
  e.ScheduledDate,
@@ -70,6 +73,7 @@ var a = t.Pending, o = [
70
73
  ],
71
74
  [t.Paid]: [
72
75
  e.Vendor,
76
+ e.Attachment,
73
77
  e.IssueDate,
74
78
  e.DueDate,
75
79
  e.PaidDate,
@@ -80,6 +84,7 @@ var a = t.Pending, o = [
80
84
  ],
81
85
  [t.All]: [
82
86
  e.Vendor,
87
+ e.Attachment,
83
88
  e.IssueDate,
84
89
  e.DueDate,
85
90
  e.ScheduledDate,
@@ -7,6 +7,7 @@ var t = {
7
7
  detailsSheet: "bill-pay-details-sheet"
8
8
  }, n = {
9
9
  [e.Vendor]: "bill-pay-bills-cell-vendor",
10
+ [e.Attachment]: "bill-pay-bills-cell-attachment",
10
11
  [e.IssueDate]: "bill-pay-bills-cell-issue-date",
11
12
  [e.DueDate]: "bill-pay-bills-cell-due-date",
12
13
  [e.ScheduledDate]: "bill-pay-bills-cell-scheduled-date",
@@ -7,127 +7,129 @@ import { hasAnyScope as t } from "../../../shared/data-access/dist/lib/hasAnySco
7
7
  import { Scope as n } from "../../../shared/data-access/dist/lib/scopes.js";
8
8
  import "../../../shared/data-access/dist/index.js";
9
9
  import "../../../shared/ui/dist/index.js";
10
- import { useWidgetConfig as ee, useWidgetInitStaleForToken as r } from "../../../shared/feature/dist/lib/WidgetProvider/hooks.js";
10
+ import { useWidgetConfig as r, useWidgetInitStaleForToken as ee } from "../../../shared/feature/dist/lib/WidgetProvider/hooks.js";
11
11
  import "../../../shared/feature/dist/index.js";
12
- import { AddBillDialog as i } from "../../ui/dist/index10.js";
13
- import { BillsScreen as a } from "../../ui/dist/index67.js";
12
+ import { AddBillDialog as te } from "../../ui/dist/index10.js";
13
+ import { BillsScreen as ne } from "../../ui/dist/index67.js";
14
14
  import "../../ui/dist/index.js";
15
- import { BillCreateDialog as o } from "./index44.js";
15
+ import { BillCreateDialog as i } from "./index44.js";
16
16
  import "./index45.js";
17
- import { BillDetailsContainer as s } from "./index48.js";
17
+ import { BillDetailsContainer as a } from "./index48.js";
18
18
  import "./index49.js";
19
19
  import "./index55.js";
20
20
  import "./index56.js";
21
- import { DuplicateBillsContainer as te } from "./index59.js";
21
+ import { DuplicateBillsContainer as o } from "./index59.js";
22
22
  import "./index60.js";
23
- import { BILL_QUEUE_ORDER as c, BillQueue as l } from "./index61.js";
24
- import { BILLS_TAB_LABELS_EN as u } from "./index63.js";
25
- import { useBillsTable as ne } from "./index69.js";
23
+ import { BILL_QUEUE_ORDER as s, BillQueue as c } from "./index61.js";
24
+ import { BILLS_TAB_LABELS_EN as l } from "./index63.js";
25
+ import { useBillsTable as u } from "./index69.js";
26
26
  import { copyTextToClipboard as re } from "./index62.js";
27
- import { billsTabTestIds as d, billsTableCellTestIds as f } from "./index64.js";
28
- import { useCallback as p, useEffect as ie, useMemo as m, useState as h } from "react";
27
+ import { billsTabTestIds as d, billsTableCellTestIds as ie } from "./index64.js";
28
+ import { useCallback as f, useEffect as p, useMemo as m, useState as h } from "react";
29
29
  import { jsx as g, jsxs as _ } from "react/jsx-runtime";
30
30
  import { CalendarClockIcon as v, CheckIcon as y, FilePenIcon as b, ListIcon as x, LoaderCircleIcon as S } from "lucide-react";
31
31
  //#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index70.js
32
- var C = "bills@business-banking.app", ae = {
33
- [l.Drafts]: /* @__PURE__ */ g(b, {
32
+ var C = "bills@business-banking.app", w = {
33
+ [c.Drafts]: /* @__PURE__ */ g(b, {
34
34
  className: "ttw:size-4",
35
35
  "aria-hidden": !0
36
36
  }),
37
- [l.Pending]: /* @__PURE__ */ g(S, {
37
+ [c.Pending]: /* @__PURE__ */ g(S, {
38
38
  className: "ttw:size-4",
39
39
  "aria-hidden": !0
40
40
  }),
41
- [l.Scheduled]: /* @__PURE__ */ g(v, {
41
+ [c.Scheduled]: /* @__PURE__ */ g(v, {
42
42
  className: "ttw:size-4",
43
43
  "aria-hidden": !0
44
44
  }),
45
- [l.Paid]: /* @__PURE__ */ g(y, {
45
+ [c.Paid]: /* @__PURE__ */ g(y, {
46
46
  className: "ttw:size-4",
47
47
  "aria-hidden": !0
48
48
  }),
49
- [l.All]: /* @__PURE__ */ g(x, {
49
+ [c.All]: /* @__PURE__ */ g(x, {
50
50
  className: "ttw:size-4",
51
51
  "aria-hidden": !0
52
52
  })
53
53
  };
54
- function w({ labels: l, onEnqueueFiles: v, openPayableId: y, onOpenPayableHandled: b, poweredByBankName: x, duplicateBills: S }) {
55
- let w = m(() => ({
56
- ...u,
54
+ function T({ labels: c, onEnqueueFiles: v, openPayableId: y, onOpenPayableHandled: b, poweredByBankName: x, duplicateBills: S }) {
55
+ let T = m(() => ({
57
56
  ...l,
57
+ ...c,
58
58
  queues: {
59
- ...u.queues,
60
- ...l?.queues
59
+ ...l.queues,
60
+ ...c?.queues
61
61
  },
62
62
  filters: {
63
- ...u.filters,
64
- ...l?.filters,
63
+ ...l.filters,
64
+ ...c?.filters,
65
65
  presets: {
66
- ...u.filters.presets,
67
- ...l?.filters?.presets
66
+ ...l.filters.presets,
67
+ ...c?.filters?.presets
68
68
  },
69
69
  statuses: {
70
- ...u.filters.statuses,
71
- ...l?.filters?.statuses
70
+ ...l.filters.statuses,
71
+ ...c?.filters?.statuses
72
72
  },
73
73
  dateFieldNames: {
74
- ...u.filters.dateFieldNames,
75
- ...l?.filters?.dateFieldNames
74
+ ...l.filters.dateFieldNames,
75
+ ...c?.filters?.dateFieldNames
76
76
  }
77
77
  },
78
78
  filterBar: {
79
- ...u.filterBar,
80
- ...l?.filterBar
79
+ ...l.filterBar,
80
+ ...c?.filterBar
81
81
  },
82
- queueEmptyStates: c.reduce((e, t) => ({
82
+ queueEmptyStates: s.reduce((e, t) => ({
83
83
  ...e,
84
84
  [t]: {
85
- ...u.queueEmptyStates[t],
86
- ...l?.queueEmptyStates?.[t]
85
+ ...l.queueEmptyStates[t],
86
+ ...c?.queueEmptyStates?.[t]
87
87
  }
88
88
  }), {})
89
- }), [l]), [T, E] = h(!1), [D, O] = h(), [k, A] = h(!1), [j, M] = h(), [N, P] = h(!1), [F, I] = h(!1), [L, R] = h(!1), { initResponse: z } = ee(), B = r(), V = t(z?.scopes, [n.PayableReadOrg]), H = t(z?.scopes, [n.PayableWriteOrg]), U = !z || V, W = !z || H, G = p((e, t) => {
89
+ }), [c]), [ae, E] = h(!1), [D, O] = h(), [k, A] = h(!1), [j, M] = h(), [N, P] = h(!1), [F, I] = h(!1), [L, R] = h(!1), { initResponse: z } = r(), B = ee(), V = t(z?.scopes, [n.PayableReadOrg]), H = t(z?.scopes, [n.PayableWriteOrg]), U = !z || V, W = !z || H, G = f((e, t) => {
90
90
  if (t && W) {
91
91
  O(e), A(!0);
92
92
  return;
93
93
  }
94
94
  M(e), P(!0);
95
- }, [W]), K = m(() => (S ?? []).filter((e) => e.isPossibleDuplicate).map((e) => e.id), [S]), q = t(z?.scopes, [n.CounterpartReadOrg]), J = ne({
95
+ }, [W]), K = m(() => (S ?? []).filter((e) => e.isPossibleDuplicate).map((e) => e.id), [S]), q = t(z?.scopes, [n.CounterpartReadOrg]), J = u({
96
96
  enabled: U,
97
97
  canReadVendors: q,
98
98
  isVendorFilterPaused: B,
99
- filterLabels: w.filters,
99
+ filterLabels: T.filters,
100
100
  onOpenBill: G,
101
101
  duplicateBillIds: K,
102
- duplicateBadgeLabel: w.duplicateBadge,
103
- attachmentLabel: w.attachmentIndicator
104
- }), Y = (e) => !!(e && K.includes(e)), X = K.length, oe = X === 0 ? void 0 : X === 1 ? w.duplicateWarningOne : w.duplicateWarningMany(X), se = m(() => c.map((e) => ({
102
+ duplicateBadgeLabel: T.duplicateBadge,
103
+ attachmentLabel: T.attachmentIndicator
104
+ }), Y = (e) => !!(e && K.includes(e)), X = K.length, oe = X === 0 ? void 0 : X === 1 ? T.duplicateWarningOne : T.duplicateWarningMany(X), se = m(() => s.map((e) => ({
105
105
  id: e,
106
- label: w.queues[e],
107
- icon: ae[e]
108
- })), [w.queues]), ce = (e) => {
106
+ label: T.queues[e],
107
+ icon: w[e]
108
+ })), [T.queues]), ce = (e) => {
109
109
  R(!1), M(e), P(!0);
110
110
  }, le = () => {
111
111
  P(!1), I(!0);
112
- }, ue = m(() => ({
113
- createButton: w.createButton,
114
- addBill: { heading: w.nonEmptyHeading }
115
- }), [w.createButton, w.nonEmptyHeading]), de = m(() => ({
112
+ }, ue = () => {
113
+ I(!1), P(!0);
114
+ }, de = m(() => ({
115
+ createButton: T.createButton,
116
+ addBill: { heading: T.nonEmptyHeading }
117
+ }), [T.createButton, T.nonEmptyHeading]), fe = m(() => ({
116
118
  ...J.filterBarProps,
117
- labels: w.filterBar
118
- }), [J.filterBarProps, w.filterBar]), Z = () => {
119
+ labels: T.filterBar
120
+ }), [J.filterBarProps, T.filterBar]), Z = () => {
119
121
  E(!1), O(void 0), A(!0);
120
122
  }, Q = (e) => {
121
123
  E(!1), v?.(e);
122
124
  }, $ = async () => {
123
- await re(C) ? e.success(w.emailCopiedToast) : e.error(w.emailCopyFailedToast);
125
+ await re(C) ? e.success(T.emailCopiedToast) : e.error(T.emailCopyFailedToast);
124
126
  };
125
- return ie(() => {
127
+ return p(() => {
126
128
  y && (O(y), A(!0), b?.());
127
129
  }, [b, y]), /* @__PURE__ */ _("div", {
128
130
  "data-testid": d.root,
129
131
  children: [
130
- /* @__PURE__ */ g(a, {
132
+ /* @__PURE__ */ g(ne, {
131
133
  rows: J.rows,
132
134
  isLoading: J.isLoading || !z,
133
135
  isError: J.isError,
@@ -145,12 +147,12 @@ function w({ labels: l, onEnqueueFiles: v, openPayableId: y, onOpenPayableHandle
145
147
  onFilterTabChange: J.onFilterTabChange,
146
148
  searchValue: J.searchValue,
147
149
  onSearchChange: J.onSearchChange,
148
- filters: de,
150
+ filters: fe,
149
151
  visibleColumns: J.visibleColumns,
150
- cellTestIds: f,
152
+ cellTestIds: ie,
151
153
  isSearchActive: J.isSearchActive,
152
154
  showAddPanelWhenEmpty: J.showAddPanelWhenEmpty,
153
- emptyState: w.queueEmptyStates[J.selectedFilterTabId],
155
+ emptyState: T.queueEmptyStates[J.selectedFilterTabId],
154
156
  onCreateClick: W ? () => E(!0) : void 0,
155
157
  onEnterManually: W ? Z : void 0,
156
158
  onFilesSelected: W ? Q : void 0,
@@ -159,32 +161,32 @@ function w({ labels: l, onEnqueueFiles: v, openPayableId: y, onOpenPayableHandle
159
161
  onCopyEmail: $,
160
162
  duplicateWarning: oe,
161
163
  onReviewDuplicates: () => R(!0),
162
- labels: ue
164
+ labels: de
163
165
  }),
164
- L ? /* @__PURE__ */ g(te, {
166
+ L ? /* @__PURE__ */ g(o, {
165
167
  open: L,
166
168
  onOpenChange: R,
167
169
  bills: S,
168
170
  canManageDuplicates: W,
169
171
  onOpenBill: ce
170
172
  }) : null,
171
- W ? /* @__PURE__ */ g(i, {
172
- open: T,
173
+ W ? /* @__PURE__ */ g(te, {
174
+ open: ae,
173
175
  onOpenChange: E,
174
176
  onFilesSelected: Q,
175
177
  maxFiles: 10,
176
178
  onEnterManually: Z,
177
179
  emailAddress: C,
178
180
  onCopyEmail: $,
179
- labels: { heading: J.hasAnyBills ? w.nonEmptyHeading : w.emptyHeading }
181
+ labels: { heading: J.hasAnyBills ? T.nonEmptyHeading : T.emptyHeading }
180
182
  }) : null,
181
- k ? /* @__PURE__ */ g(o, {
183
+ k ? /* @__PURE__ */ g(i, {
182
184
  open: k,
183
185
  onOpenChange: A,
184
186
  payableId: D,
185
187
  isPossibleDuplicate: Y(D)
186
188
  }) : null,
187
- N ? /* @__PURE__ */ g(s, {
189
+ N ? /* @__PURE__ */ g(a, {
188
190
  open: N,
189
191
  onOpenChange: P,
190
192
  payableId: j,
@@ -194,11 +196,12 @@ function w({ labels: l, onEnqueueFiles: v, openPayableId: y, onOpenPayableHandle
194
196
  testId: d.detailsSheet,
195
197
  poweredByBankName: x
196
198
  }) : null,
197
- F ? /* @__PURE__ */ g(o, {
199
+ F ? /* @__PURE__ */ g(i, {
198
200
  open: F,
199
201
  onOpenChange: I,
200
202
  payableId: j,
201
203
  readOnly: !0,
204
+ onCollapse: ue,
202
205
  poweredByBankName: x,
203
206
  isPossibleDuplicate: Y(j)
204
207
  }) : null
@@ -206,4 +209,4 @@ function w({ labels: l, onEnqueueFiles: v, openPayableId: y, onOpenPayableHandle
206
209
  });
207
210
  }
208
211
  //#endregion
209
- export { w as BillsTab, w as default };
212
+ export { T as BillsTab, T as default };
@@ -9,6 +9,7 @@ import "./index42.js";
9
9
  //#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index43.js
10
10
  var a = {
11
11
  closeButton: "Close",
12
+ collapseButton: "Exit full screen",
12
13
  menuTrigger: "More actions",
13
14
  cancelButton: "Cancel",
14
15
  saveDraftButton: "Save and close",