@tesouro/embedded-components-react 0.5.9 → 0.5.11

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 (32) hide show
  1. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index.js +1 -1
  2. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index19.js +4 -78
  3. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index20.js +84 -3
  4. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index21.js +4 -5
  5. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index22.js +5 -4
  6. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index23.js +3 -32
  7. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index24.js +30 -39
  8. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index25.js +37 -166
  9. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index26.js +164 -39
  10. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index27.js +48 -1
  11. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index28.js +1 -50
  12. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index29.js +45 -11
  13. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index30.js +13 -8
  14. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index31.js +8 -14
  15. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index32.js +7 -59
  16. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index33.js +64 -8
  17. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index34.js +8 -24
  18. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index35.js +18 -139
  19. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index36.js +144 -16
  20. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index37.js +24 -4
  21. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index42.js +2 -2
  22. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index45.js +1 -0
  23. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index47.js +2 -2
  24. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index51.js +1 -1
  25. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index60.js +91 -84
  26. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index62.js +1 -1
  27. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index63.js +92 -87
  28. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index81.js +1 -1
  29. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index82.js +133 -129
  30. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index61.js +1 -0
  31. package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/analytics/build-info.js +1 -1
  32. package/package.json +1 -1
@@ -7,81 +7,81 @@ import { Scope as t } from "../../../shared/data-access/dist/lib/scopes.js";
7
7
  import { useAllLedgerAccountsQuery as ee } from "../../../shared/data-access/dist/lib/reference-data/useLedgerAccountsQuery.js";
8
8
  import { useAllOrganizationUsersQuery as te } from "../../../shared/data-access/dist/lib/user/useAllOrganizationUsersQuery.js";
9
9
  import "../../../shared/data-access/dist/index.js";
10
- import { useWidgetConfig as n } from "../../../shared/feature/dist/lib/WidgetProvider/hooks.js";
10
+ import { useWidgetConfig as ne } from "../../../shared/feature/dist/lib/WidgetProvider/hooks.js";
11
11
  import "../../../shared/feature/dist/index.js";
12
- import { usePayableApprovalRequestsQuery as r } from "../../data-access/dist/index8.js";
13
- import { usePayableHistoryQuery as i } from "../../data-access/dist/index9.js";
14
- import { useAllPayableLineItemsQuery as a } from "../../data-access/dist/index10.js";
15
- import { usePayableQuery as o } from "../../data-access/dist/index17.js";
12
+ import { usePayableApprovalRequestsQuery as re } from "../../data-access/dist/index8.js";
13
+ import { usePayableHistoryQuery as n } from "../../data-access/dist/index9.js";
14
+ import { useAllPayableLineItemsQuery as r } from "../../data-access/dist/index10.js";
15
+ import { usePayableQuery as i } from "../../data-access/dist/index17.js";
16
16
  import "../../data-access/dist/index.js";
17
- import { BillDecisionDialog as s } from "../../ui/dist/index56.js";
18
- import { BillDetailsSheet as c } from "../../ui/dist/index62.js";
19
- import { BillDuplicateNotice as l } from "../../ui/dist/index66.js";
20
- import { MarkAsPaidDialog as u } from "../../ui/dist/index96.js";
17
+ import { BillDecisionDialog as a } from "../../ui/dist/index56.js";
18
+ import { BillDetailsSheet as o } from "../../ui/dist/index62.js";
19
+ import { BillDuplicateNotice as s } from "../../ui/dist/index66.js";
20
+ import { MarkAsPaidDialog as c } from "../../ui/dist/index96.js";
21
21
  import "../../ui/dist/index.js";
22
- import { usePayableDuplicateReview as ne } from "./index13.js";
22
+ import { usePayableDuplicateReview as l } from "./index13.js";
23
23
  import "./index14.js";
24
- import { canOverrideApprovalPolicy as re, canReadCounterpartBankAccounts as ie } from "./index19.js";
25
- import { resolveAmountDueMinorUnits as ae } from "./index20.js";
26
- import { usePayableAchInstructions as oe } from "../../../shared/counterpart-management/feature/dist/lib/usePayableAchInstructions.js";
24
+ import { canOverrideApprovalPolicy as u, canReadCounterpartBankAccounts as d } from "./index20.js";
25
+ import { resolveAmountDueMinorUnits as f } from "./index21.js";
26
+ import { usePayableAchInstructions as p } from "../../../shared/counterpart-management/feature/dist/lib/usePayableAchInstructions.js";
27
27
  import "../../../shared/counterpart-management/feature/dist/index.js";
28
- import { PayBillFlow as d } from "./index26.js";
29
- import "./index27.js";
30
- import { mapPayableToBillDetails as f } from "./index41.js";
31
- import { mergeMarkAsPaidFlowLabels as p } from "./index15.js";
32
- import { useMarkAsPaidFlow as m } from "./index17.js";
28
+ import { PayBillFlow as m } from "./index27.js";
29
+ import "./index28.js";
30
+ import { mapPayableToBillDetails as h } from "./index41.js";
31
+ import { mergeMarkAsPaidFlowLabels as g } from "./index15.js";
32
+ import { useMarkAsPaidFlow as ie } from "./index17.js";
33
33
  import "./index18.js";
34
- import { mergeDecisionDialogCopy as h, mergePaymentHistoryMethodLabels as g } from "./index45.js";
35
- import { buildPaymentHistory as _ } from "./index3.js";
36
- import { currentApprovalRound as se } from "./index4.js";
37
- import { usePayableApprovalRoundStart as ce } from "./index31.js";
38
- import { useApprovalPolicyCardView as le } from "./index32.js";
39
- import { resolveBillRejectionNotice as ue } from "./index33.js";
40
- import { useCurrentApprovalRequestId as de } from "./index34.js";
41
- import { usePayableDetailActions as fe } from "./index35.js";
42
- import { useScheduledPayment as pe } from "./index36.js";
43
- import { BILL_DETAILS_LABELS_EN as v } from "./index62.js";
44
- import { useMemo as y, useRef as me } from "react";
45
- import { Fragment as b, jsx as x, jsxs as S } from "react/jsx-runtime";
34
+ import { mergeDecisionDialogCopy as ae, mergePaymentHistoryMethodLabels as oe } from "./index45.js";
35
+ import { buildPaymentHistory as se } from "./index3.js";
36
+ import { currentApprovalRound as ce } from "./index4.js";
37
+ import { usePayableApprovalRoundStart as le } from "./index32.js";
38
+ import { useApprovalPolicyCardView as ue } from "./index33.js";
39
+ import { resolveBillRejectionNotice as de } from "./index34.js";
40
+ import { useCurrentApprovalRequestId as fe } from "./index35.js";
41
+ import { usePayableDetailActions as pe } from "./index36.js";
42
+ import { useScheduledPayment as me } from "./index37.js";
43
+ import { BILL_DETAILS_LABELS_EN as _ } from "./index62.js";
44
+ import { useMemo as v, useRef as he } from "react";
45
+ import { Fragment as y, jsx as b, jsxs as x } from "react/jsx-runtime";
46
46
  //#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index63.js
47
- function C({ open: C, onOpenChange: w, payableId: T, onClose: E, onExpand: D, testId: O, labels: k, poweredByBankName: A }) {
48
- let j = y(() => ({
49
- ...v,
47
+ function S({ open: S, onOpenChange: C, payableId: w, onClose: T, onExpand: E, onEdit: D, testId: O, labels: k, poweredByBankName: A }) {
48
+ let j = v(() => ({
49
+ ..._,
50
50
  ...k,
51
51
  sheet: {
52
- ...v.sheet,
52
+ ..._.sheet,
53
53
  ...k?.sheet,
54
54
  statusBadge: {
55
- ...v.sheet.statusBadge,
55
+ ..._.sheet.statusBadge,
56
56
  ...k?.sheet?.statusBadge
57
57
  },
58
58
  approvalPolicy: {
59
- ...v.sheet.approvalPolicy,
59
+ ..._.sheet.approvalPolicy,
60
60
  ...k?.sheet?.approvalPolicy
61
61
  },
62
62
  dueDate: {
63
- ...v.sheet.dueDate,
63
+ ..._.sheet.dueDate,
64
64
  ...k?.sheet?.dueDate
65
65
  }
66
66
  },
67
- decisionDialog: h(v.decisionDialog, k?.decisionDialog),
67
+ decisionDialog: ae(_.decisionDialog, k?.decisionDialog),
68
68
  approvalPolicyCopy: {
69
- ...v.approvalPolicyCopy,
69
+ ..._.approvalPolicyCopy,
70
70
  ...k?.approvalPolicyCopy
71
71
  },
72
- markAsPaid: p(k?.markAsPaid),
72
+ markAsPaid: g(k?.markAsPaid),
73
73
  actionSuccess: {
74
- ...v.actionSuccess,
74
+ ..._.actionSuccess,
75
75
  ...k?.actionSuccess
76
76
  },
77
- paymentHistoryMethodLabels: g(k?.paymentHistoryMethodLabels)
78
- }), [k]), M = o(T), N = a(T), P = ee(), { initResponse: F } = n(), I = M.data, L = me(null), R = de({
79
- payableId: T,
77
+ paymentHistoryMethodLabels: oe(k?.paymentHistoryMethodLabels)
78
+ }), [k]), M = i(w), N = r(w), P = ee(), { initResponse: F } = ne(), I = M.data, L = he(null), R = fe({
79
+ payableId: w,
80
80
  status: I?.status
81
- }), z = I?.status === "rejected", he = e(F?.scopes, [t.ApprovalRequestReadOrg]), B = z && he, V = ce({
82
- payableId: T,
81
+ }), z = I?.status === "rejected", ge = e(F?.scopes, [t.ApprovalRequestReadOrg]), B = z && ge, V = le({
82
+ payableId: w,
83
83
  enabled: B
84
- }), H = r(T, { enabled: B }), ge = e(F?.scopes, [t.UserReadOrg]), U = te({ enabled: z && ge }), W = y(() => se(H.data?.data, V.roundStartedAt), [H.data, V.roundStartedAt]), G = y(() => ue({
84
+ }), H = re(w, { enabled: B }), _e = e(F?.scopes, [t.UserReadOrg]), U = te({ enabled: z && _e }), W = v(() => ce(H.data?.data, V.roundStartedAt), [H.data, V.roundStartedAt]), G = v(() => de({
85
85
  payableStatus: I?.status,
86
86
  approvalRequests: W,
87
87
  users: U.data?.data ?? [],
@@ -93,45 +93,46 @@ function C({ open: C, onOpenChange: w, payableId: T, onClose: E, onExpand: D, te
93
93
  W,
94
94
  U.data,
95
95
  j
96
- ]), K = le({
97
- payableId: T,
96
+ ]), K = ue({
97
+ payableId: w,
98
98
  approvalPolicyId: I?.approval_policy_id,
99
99
  copy: j.approvalPolicyCopy
100
- }), _e = re({
100
+ }), ve = u({
101
101
  status: I?.status,
102
102
  scopes: F?.scopes,
103
103
  arePendingApproversUnknown: K.isLoading,
104
104
  hasApprovalPolicy: !!I?.approval_policy_id,
105
105
  hasWaitingRequest: R.hasWaitingRequest
106
- }), q = pe({
107
- payableId: T,
106
+ }), q = me({
107
+ payableId: w,
108
108
  scheduledPaymentDate: I?.scheduled_payment_date
109
- }), ve = oe({
109
+ }), ye = p({
110
110
  counterpartId: I?.counterpart_id,
111
111
  currency: I?.currency,
112
- enabled: ie(F?.scopes)
113
- }), J = m({
114
- payableId: T,
115
- amountDueMinorUnits: ae(I) ?? 0,
112
+ enabled: d(F?.scopes)
113
+ }), J = ie({
114
+ payableId: w,
115
+ amountDueMinorUnits: f(I) ?? 0,
116
116
  amountToPayMinorUnits: I?.amount_to_pay ?? void 0,
117
117
  currencyCode: I?.currency ?? void 0,
118
118
  dueDate: I?.due_date,
119
119
  hasScheduledPayment: q.hasScheduledPayment,
120
120
  testId: O,
121
121
  labels: j.markAsPaid
122
- }), { actions: ye, decisionDialog: be } = fe({
123
- payableId: I ? T : void 0,
122
+ }), { actions: be, decisionDialog: xe } = pe({
123
+ payableId: I ? w : void 0,
124
124
  status: I?.status,
125
125
  currentApprovalRequestId: R.id,
126
126
  hasScheduledPayment: q.hasScheduledPayment,
127
127
  scheduledPaymentIntentId: q.scheduledPaymentIntentId,
128
128
  isScheduledPaymentUnknown: q.isResolving,
129
- isPayabilityUnknown: ve.isLoading,
129
+ isPayabilityUnknown: ye.isLoading,
130
130
  hasApprovalPolicy: !!I?.approval_policy_id,
131
131
  hasWaitingRequest: R.hasWaitingRequest,
132
132
  pendingApprovers: K.pendingApprovers,
133
133
  arePendingApproversUnknown: K.isLoading,
134
134
  labels: {
135
+ edit: j.sheet.editButton,
135
136
  payBill: j.sheet.payButton,
136
137
  markAsPaid: j.sheet.markAsPaidButton,
137
138
  reject: j.sheet.rejectButton,
@@ -148,27 +149,31 @@ function C({ open: C, onOpenChange: w, payableId: T, onClose: E, onExpand: D, te
148
149
  },
149
150
  isMarkAsPaidPending: J.isPending,
150
151
  onMarkAsPaidSelect: J.open,
151
- onPayBillSelect: () => L.current?.open()
152
- }), Y = q.hasScheduledPayment && q.scheduledDateLabel ? /* @__PURE__ */ x("p", {
152
+ onPayBillSelect: () => L.current?.open(),
153
+ onEditSelect: D,
154
+ onActionSucceeded: (e) => {
155
+ e === "reopen" && D?.();
156
+ }
157
+ }), Y = q.hasScheduledPayment && q.scheduledDateLabel ? /* @__PURE__ */ b("p", {
153
158
  className: "ttw:text-sm ttw:text-muted-foreground",
154
159
  children: j.scheduledSummary(q.scheduledDateLabel)
155
- }) : void 0, X = ne({
160
+ }) : void 0, X = l({
156
161
  payable: I,
157
162
  canManage: e(F?.scopes, [t.PayableWriteOrg])
158
- }), Z = X.isPossibleDuplicate ? /* @__PURE__ */ x(l, {
163
+ }), Z = X.isPossibleDuplicate ? /* @__PURE__ */ b(s, {
159
164
  onNotADuplicate: X.onNotADuplicate,
160
165
  isActionDisabled: X.isBusy
161
- }) : void 0, xe = Z || Y ? /* @__PURE__ */ S(b, { children: [Z, Y] }) : void 0, Q = i(T), Se = y(() => _({
166
+ }) : void 0, Q = Z || Y ? /* @__PURE__ */ x(y, { children: [Z, Y] }) : void 0, $ = n(w), Se = v(() => se({
162
167
  records: q.paymentRecords,
163
- events: Q.data?.data ?? [],
168
+ events: $.data?.data ?? [],
164
169
  currencyCode: I?.currency,
165
170
  labels: j
166
171
  }), [
167
172
  q.paymentRecords,
168
- Q.data,
173
+ $.data,
169
174
  I?.currency,
170
175
  j
171
- ]), Ce = y(() => I ? f({
176
+ ]), Ce = v(() => I ? h({
172
177
  payable: I,
173
178
  lineItems: N.lineItems,
174
179
  ledgerAccounts: P.data?.data ?? [],
@@ -182,42 +187,42 @@ function C({ open: C, onOpenChange: w, payableId: T, onClose: E, onExpand: D, te
182
187
  j,
183
188
  q.hasScheduledPayment,
184
189
  G
185
- ]), we = M.isLoading || N.isResolving || P.isResolving, $ = M.isError || N.isError || P.isError;
186
- return /* @__PURE__ */ S(b, { children: [
187
- /* @__PURE__ */ x(c, {
188
- open: C,
189
- onOpenChange: w,
190
+ ]), we = M.isLoading || N.isResolving || P.isResolving, Te = M.isError || N.isError || P.isError;
191
+ return /* @__PURE__ */ x(y, { children: [
192
+ /* @__PURE__ */ b(o, {
193
+ open: S,
194
+ onOpenChange: C,
190
195
  details: Ce,
191
- actions: ye,
196
+ actions: be,
192
197
  approvalPolicy: K.view,
193
- showApprovalOverrideNotice: _e && !!I?.approval_policy_id,
198
+ showApprovalOverrideNotice: ve && !!I?.approval_policy_id,
194
199
  paymentHistory: Se,
195
- paymentHistoryError: q.isError || Q.isError,
196
- paymentHistoryLoading: q.isResolving || Q.isLoading,
200
+ paymentHistoryError: q.isError || $.isError,
201
+ paymentHistoryLoading: q.isResolving || $.isLoading,
197
202
  isLoading: we,
198
- isError: $,
199
- notice: xe,
200
- onClose: E,
201
- onExpand: D,
203
+ isError: Te,
204
+ notice: Q,
205
+ onClose: T,
206
+ onExpand: E,
202
207
  testId: O,
203
208
  labels: j.sheet
204
209
  }),
205
- /* @__PURE__ */ x(s, {
206
- ...be,
210
+ /* @__PURE__ */ b(a, {
211
+ ...xe,
207
212
  labels: { cancelButton: j.decisionDialog.cancelButton },
208
213
  testId: O ? `${O}-decision-dialog` : void 0,
209
214
  confirmTestId: O ? `${O}-decision-confirm` : void 0,
210
215
  reasonTestId: O ? `${O}-decision-reason` : void 0,
211
216
  reasonFieldId: O ? `${O}-decision-reason-field` : void 0
212
217
  }),
213
- /* @__PURE__ */ x(u, { ...J.dialogProps }),
214
- I ? /* @__PURE__ */ x(d, {
218
+ /* @__PURE__ */ b(c, { ...J.dialogProps }),
219
+ I ? /* @__PURE__ */ b(m, {
215
220
  ref: L,
216
221
  payable: I,
217
- onMissingAchInstructions: D,
222
+ onMissingAchInstructions: E,
218
223
  poweredByBankName: A
219
224
  }) : null
220
225
  ] });
221
226
  }
222
227
  //#endregion
223
- export { C as BillDetailsContainer, C as default };
228
+ export { S as BillDetailsContainer, S as default };
@@ -9,7 +9,7 @@ import { usePayablesQuery as r, usePayablesTotalCountQuery as i } from "../../da
9
9
  import "../../data-access/dist/index.js";
10
10
  import { derivePayableStatus as a } from "./index7.js";
11
11
  import { resolveVendorName as o } from "./index8.js";
12
- import { isEditablePayableStatus as s } from "./index37.js";
12
+ import { isEditablePayableStatus as s } from "./index19.js";
13
13
  import { BillQueue as c, DEFAULT_BILL_QUEUE as l, billQueueColumns as u, billQueueHasScheduledPayment as d, billQueueOffersAddPanel as f, billQueueStatuses as p, billSortColumnId as m, billSortField as h } from "./index72.js";
14
14
  import { useBillsFilters as g } from "./index80.js";
15
15
  import { useCallback as _, useEffect as v, useMemo as y, useState as b } from "react";
@@ -17,194 +17,198 @@ import { DuplicateBillsContainer as te } from "./index12.js";
17
17
  import "./index14.js";
18
18
  import { BillCreateDialog as s } from "./index60.js";
19
19
  import "./index61.js";
20
- import { BillDetailsContainer as c } from "./index63.js";
20
+ import { BillDetailsContainer as ne } from "./index63.js";
21
21
  import "./index64.js";
22
22
  import "./index70.js";
23
23
  import "./index71.js";
24
- import { BILL_QUEUE_ORDER as l, BillQueue as u } from "./index72.js";
25
- import { BILLS_TAB_LABELS_EN as d } from "./index75.js";
26
- import { useBillsTable as f } from "./index81.js";
27
- import { copyTextToClipboard as p } from "./index73.js";
28
- import { resolveDuplicateWarning as m } from "./index74.js";
29
- import { billsTabTestIds as h, billsTableCellTestIds as ne } from "./index76.js";
30
- import { useCallback as re, useEffect as ie, useMemo as g, useState as _ } from "react";
31
- import { jsx as v, jsxs as y } from "react/jsx-runtime";
32
- import { CalendarClockIcon as b, CheckIcon as x, FilePenIcon as S, ListIcon as C, LoaderCircleIcon as w } from "lucide-react";
24
+ import { BILL_QUEUE_ORDER as c, BillQueue as l } from "./index72.js";
25
+ import { BILLS_TAB_LABELS_EN as u } from "./index75.js";
26
+ import { useBillsTable as d } from "./index81.js";
27
+ import { copyTextToClipboard as f } from "./index73.js";
28
+ import { resolveDuplicateWarning as p } from "./index74.js";
29
+ import { billsTabTestIds as m, billsTableCellTestIds as re } from "./index76.js";
30
+ import { useCallback as ie, useEffect as ae, useMemo as h, useState as g } from "react";
31
+ import { jsx as _, jsxs as v } from "react/jsx-runtime";
32
+ import { CalendarClockIcon as y, CheckIcon as b, FilePenIcon as x, ListIcon as S, LoaderCircleIcon as C } from "lucide-react";
33
33
  //#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index82.js
34
- var T = "bills@business-banking.app", E = {
35
- [u.Drafts]: /* @__PURE__ */ v(S, {
34
+ var w = "bills@business-banking.app", T = {
35
+ [l.Drafts]: /* @__PURE__ */ _(x, {
36
36
  className: "ttw:size-4",
37
37
  "aria-hidden": !0
38
38
  }),
39
- [u.Pending]: /* @__PURE__ */ v(w, {
39
+ [l.Pending]: /* @__PURE__ */ _(C, {
40
40
  className: "ttw:size-4",
41
41
  "aria-hidden": !0
42
42
  }),
43
- [u.Scheduled]: /* @__PURE__ */ v(b, {
43
+ [l.Scheduled]: /* @__PURE__ */ _(y, {
44
44
  className: "ttw:size-4",
45
45
  "aria-hidden": !0
46
46
  }),
47
- [u.Paid]: /* @__PURE__ */ v(x, {
47
+ [l.Paid]: /* @__PURE__ */ _(b, {
48
48
  className: "ttw:size-4",
49
49
  "aria-hidden": !0
50
50
  }),
51
- [u.All]: /* @__PURE__ */ v(C, {
51
+ [l.All]: /* @__PURE__ */ _(S, {
52
52
  className: "ttw:size-4",
53
53
  "aria-hidden": !0
54
54
  })
55
55
  };
56
- function D({ labels: u, onEnqueueFiles: b, openPayableId: x, onOpenPayableHandled: S, poweredByBankName: C }) {
57
- let w = g(() => ({
58
- ...d,
56
+ function E({ labels: l, onEnqueueFiles: y, openPayableId: b, onOpenPayableHandled: x, poweredByBankName: S }) {
57
+ let C = h(() => ({
59
58
  ...u,
59
+ ...l,
60
60
  queues: {
61
- ...d.queues,
62
- ...u?.queues
61
+ ...u.queues,
62
+ ...l?.queues
63
63
  },
64
64
  filters: {
65
- ...d.filters,
66
- ...u?.filters,
65
+ ...u.filters,
66
+ ...l?.filters,
67
67
  presets: {
68
- ...d.filters.presets,
69
- ...u?.filters?.presets
68
+ ...u.filters.presets,
69
+ ...l?.filters?.presets
70
70
  },
71
71
  statuses: {
72
- ...d.filters.statuses,
73
- ...u?.filters?.statuses
72
+ ...u.filters.statuses,
73
+ ...l?.filters?.statuses
74
74
  },
75
75
  dateFieldNames: {
76
- ...d.filters.dateFieldNames,
77
- ...u?.filters?.dateFieldNames
76
+ ...u.filters.dateFieldNames,
77
+ ...l?.filters?.dateFieldNames
78
78
  }
79
79
  },
80
80
  filterBar: {
81
- ...d.filterBar,
82
- ...u?.filterBar
81
+ ...u.filterBar,
82
+ ...l?.filterBar
83
83
  },
84
- queueEmptyStates: l.reduce((e, t) => ({
84
+ queueEmptyStates: c.reduce((e, t) => ({
85
85
  ...e,
86
86
  [t]: {
87
- ...d.queueEmptyStates[t],
88
- ...u?.queueEmptyStates?.[t]
87
+ ...u.queueEmptyStates[t],
88
+ ...l?.queueEmptyStates?.[t]
89
89
  }
90
90
  }), {})
91
- }), [u]), [D, O] = _(!1), [ae, k] = _(), [A, j] = _(!1), [M, N] = _(), [P, F] = _(!1), [I, L] = _(!1), [R, z] = _(!1), { initResponse: B } = ee(), V = r(), H = t(B?.scopes, [n.PayableReadOrg]), U = t(B?.scopes, [n.PayableWriteOrg]), W = !B || H, G = !B || U, K = re((e, t) => {
92
- if (t && G) {
93
- k(e), j(!0);
91
+ }), [l]), [E, D] = g(!1), [oe, O] = g(), [k, A] = g(!1), [j, M] = g(), [N, P] = g(!1), [F, I] = g(!1), [L, R] = g(!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 = ie((e, t) => {
92
+ if (t && W) {
93
+ O(e), A(!0);
94
94
  return;
95
95
  }
96
- N(e), F(!0);
97
- }, [G]), q = t(B?.scopes, [n.CounterpartReadOrg]), J = f({
98
- enabled: W,
99
- canReadVendors: q,
100
- isVendorFilterPaused: V,
101
- filterLabels: w.filters,
102
- onOpenBill: K,
103
- duplicateRowNote: w.duplicateRowNote,
104
- attachmentLabel: w.attachmentIndicator
105
- }), Y = i({ enabled: W }), oe = m(Y, w), se = g(() => l.map((e) => ({
96
+ M(e), P(!0);
97
+ }, [W]), K = t(z?.scopes, [n.CounterpartReadOrg]), q = d({
98
+ enabled: U,
99
+ canReadVendors: K,
100
+ isVendorFilterPaused: B,
101
+ filterLabels: C.filters,
102
+ onOpenBill: G,
103
+ duplicateRowNote: C.duplicateRowNote,
104
+ attachmentLabel: C.attachmentIndicator
105
+ }), J = i({ enabled: U }), se = p(J, C), ce = h(() => c.map((e) => ({
106
106
  id: e,
107
- label: w.queues[e],
108
- icon: E[e]
109
- })), [w.queues]), ce = (e) => {
110
- z(!1), N(e), F(!0);
111
- }, le = () => {
112
- F(!1), L(!0);
107
+ label: C.queues[e],
108
+ icon: T[e]
109
+ })), [C.queues]), le = (e) => {
110
+ R(!1), M(e), P(!0);
111
+ }, ue = () => {
112
+ P(!1), I(!0);
113
+ }, Y = () => {
114
+ I(!1), P(!0);
113
115
  }, X = () => {
114
- L(!1), F(!0);
115
- }, ue = g(() => ({
116
- createButton: w.createButton,
117
- addBill: { heading: w.nonEmptyHeading }
118
- }), [w.createButton, w.nonEmptyHeading]), de = g(() => ({
119
- ...J.filterBarProps,
120
- labels: w.filterBar
121
- }), [J.filterBarProps, w.filterBar]), Z = () => {
122
- O(!1), k(void 0), j(!0);
116
+ P(!1), I(!1), O(j), A(!0);
117
+ }, de = h(() => ({
118
+ createButton: C.createButton,
119
+ addBill: { heading: C.nonEmptyHeading }
120
+ }), [C.createButton, C.nonEmptyHeading]), fe = h(() => ({
121
+ ...q.filterBarProps,
122
+ labels: C.filterBar
123
+ }), [q.filterBarProps, C.filterBar]), Z = () => {
124
+ D(!1), O(void 0), A(!0);
123
125
  }, Q = (e) => {
124
- O(!1), b?.(e);
126
+ D(!1), y?.(e);
125
127
  }, $ = async () => {
126
- await p(T) ? e.success(w.emailCopiedToast) : e.error(w.emailCopyFailedToast);
128
+ await f(w) ? e.success(C.emailCopiedToast) : e.error(C.emailCopyFailedToast);
127
129
  };
128
- return ie(() => {
129
- x && (k(x), j(!0), S?.());
130
- }, [S, x]), /* @__PURE__ */ y("div", {
131
- "data-testid": h.root,
130
+ return ae(() => {
131
+ b && (O(b), A(!0), x?.());
132
+ }, [x, b]), /* @__PURE__ */ v("div", {
133
+ "data-testid": m.root,
132
134
  children: [
133
- /* @__PURE__ */ v(o, {
134
- rows: J.rows,
135
- isLoading: J.isLoading || !B,
136
- isError: J.isError,
137
- onRetry: J.onRetry,
138
- sorting: J.sorting,
139
- onSortingChange: J.onSortingChange,
140
- pageSize: J.pageSize,
141
- onPageSizeChange: J.onPageSizeChange,
142
- hasNextPage: J.hasNextPage,
143
- hasPrevPage: J.hasPrevPage,
144
- onNextPage: J.onNextPage,
145
- onPrevPage: J.onPrevPage,
146
- filterTabs: se,
147
- selectedFilterTabId: J.selectedFilterTabId,
148
- onFilterTabChange: J.onFilterTabChange,
149
- searchValue: J.searchValue,
150
- onSearchChange: J.onSearchChange,
151
- filters: de,
152
- visibleColumns: J.visibleColumns,
153
- cellTestIds: ne,
154
- isSearchActive: J.isSearchActive,
155
- showAddPanelWhenEmpty: J.showAddPanelWhenEmpty,
156
- emptyState: w.queueEmptyStates[J.selectedFilterTabId],
157
- onCreateClick: G ? () => O(!0) : void 0,
158
- onEnterManually: G ? Z : void 0,
159
- onFilesSelected: G ? Q : void 0,
135
+ /* @__PURE__ */ _(o, {
136
+ rows: q.rows,
137
+ isLoading: q.isLoading || !z,
138
+ isError: q.isError,
139
+ onRetry: q.onRetry,
140
+ sorting: q.sorting,
141
+ onSortingChange: q.onSortingChange,
142
+ pageSize: q.pageSize,
143
+ onPageSizeChange: q.onPageSizeChange,
144
+ hasNextPage: q.hasNextPage,
145
+ hasPrevPage: q.hasPrevPage,
146
+ onNextPage: q.onNextPage,
147
+ onPrevPage: q.onPrevPage,
148
+ filterTabs: ce,
149
+ selectedFilterTabId: q.selectedFilterTabId,
150
+ onFilterTabChange: q.onFilterTabChange,
151
+ searchValue: q.searchValue,
152
+ onSearchChange: q.onSearchChange,
153
+ filters: fe,
154
+ visibleColumns: q.visibleColumns,
155
+ cellTestIds: re,
156
+ isSearchActive: q.isSearchActive,
157
+ showAddPanelWhenEmpty: q.showAddPanelWhenEmpty,
158
+ emptyState: C.queueEmptyStates[q.selectedFilterTabId],
159
+ onCreateClick: W ? () => D(!0) : void 0,
160
+ onEnterManually: W ? Z : void 0,
161
+ onFilesSelected: W ? Q : void 0,
160
162
  maxFiles: 10,
161
- emailAddress: T,
163
+ emailAddress: w,
162
164
  onCopyEmail: $,
163
- duplicateWarning: oe,
164
- onReviewDuplicates: Y.isError ? void 0 : () => z(!0),
165
- labels: ue
165
+ duplicateWarning: se,
166
+ onReviewDuplicates: J.isError ? void 0 : () => R(!0),
167
+ labels: de
166
168
  }),
167
- R ? /* @__PURE__ */ v(te, {
168
- open: R,
169
- onOpenChange: z,
170
- enabled: W,
171
- canManageDuplicates: G,
172
- onOpenBill: ce
169
+ L ? /* @__PURE__ */ _(te, {
170
+ open: L,
171
+ onOpenChange: R,
172
+ enabled: U,
173
+ canManageDuplicates: W,
174
+ onOpenBill: le
173
175
  }) : null,
174
- G ? /* @__PURE__ */ v(a, {
175
- open: D,
176
- onOpenChange: O,
176
+ W ? /* @__PURE__ */ _(a, {
177
+ open: E,
178
+ onOpenChange: D,
177
179
  onFilesSelected: Q,
178
180
  maxFiles: 10,
179
181
  onEnterManually: Z,
180
- emailAddress: T,
182
+ emailAddress: w,
181
183
  onCopyEmail: $,
182
- labels: { heading: J.hasAnyBills ? w.nonEmptyHeading : w.emptyHeading }
184
+ labels: { heading: q.hasAnyBills ? C.nonEmptyHeading : C.emptyHeading }
183
185
  }) : null,
184
- A ? /* @__PURE__ */ v(s, {
185
- open: A,
186
- onOpenChange: j,
187
- payableId: ae
186
+ k ? /* @__PURE__ */ _(s, {
187
+ open: k,
188
+ onOpenChange: A,
189
+ payableId: oe
188
190
  }) : null,
189
- P ? /* @__PURE__ */ v(c, {
190
- open: P,
191
- onOpenChange: F,
192
- payableId: M,
193
- onClose: () => F(!1),
194
- onExpand: le,
195
- testId: h.detailsSheet,
196
- poweredByBankName: C
191
+ N ? /* @__PURE__ */ _(ne, {
192
+ open: N,
193
+ onOpenChange: P,
194
+ payableId: j,
195
+ onClose: () => P(!1),
196
+ onExpand: ue,
197
+ onEdit: X,
198
+ testId: m.detailsSheet,
199
+ poweredByBankName: S
197
200
  }) : null,
198
- I ? /* @__PURE__ */ v(s, {
199
- open: I,
200
- onOpenChange: L,
201
- payableId: M,
201
+ F ? /* @__PURE__ */ _(s, {
202
+ open: F,
203
+ onOpenChange: I,
204
+ payableId: j,
202
205
  readOnly: !0,
203
- onCollapse: X,
204
- poweredByBankName: C
206
+ onCollapse: Y,
207
+ onEdit: X,
208
+ poweredByBankName: S
205
209
  }) : null
206
210
  ]
207
211
  });
208
212
  }
209
213
  //#endregion
210
- export { D as BillsTab, D as default };
214
+ export { E as BillsTab, E as default };
@@ -28,6 +28,7 @@ var o = {
28
28
  lineItemsHeading: "Line items",
29
29
  lineItemsQuantityHeading: "Qty/Price",
30
30
  lineItemsAmountHeading: "Amount",
31
+ editButton: "Edit bill",
31
32
  payButton: "Pay",
32
33
  markAsPaidButton: "Mark as paid",
33
34
  rejectButton: "Reject",
@@ -1,5 +1,5 @@
1
1
  //#region ../../libs/tesouro-embedded-components-react/shared/feature/dist/lib/analytics/build-info.js
2
- var e = "@tesouro/embedded-components-react", t = "0.5.9", n = "fa29013241e781286ad74752703fc9b45fd401b2", r = Object.freeze({
2
+ var e = "@tesouro/embedded-components-react", t = "0.5.11", n = "378f94b86ee3573ee3d141fd9fe1c7cc7c3420b0", r = Object.freeze({
3
3
  library_name: e,
4
4
  library_version: t,
5
5
  library_sha: n