@tesouro/embedded-components-react 0.4.22 → 0.4.23

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 (58) hide show
  1. package/dist/index.js +1 -1
  2. package/dist/lib/BillPayWidget.js +1 -1
  3. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index.js +8 -8
  4. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index19.js +24 -24
  5. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index35.js +45 -44
  6. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index41.js +3 -49
  7. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index42.js +47 -119
  8. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index43.js +119 -33
  9. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index44.js +33 -186
  10. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index45.js +186 -75
  11. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index46.js +75 -21
  12. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index47.js +22 -232
  13. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index48.js +223 -210
  14. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index49.js +202 -103
  15. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index50.js +121 -13
  16. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index51.js +12 -47
  17. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index52.js +47 -31
  18. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index53.js +27 -198
  19. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index54.js +198 -30
  20. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index55.js +30 -234
  21. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index56.js +240 -19
  22. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index57.js +19 -414
  23. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index58.js +427 -4
  24. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index59.js +4 -38
  25. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index60.js +34 -210
  26. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index61.js +221 -3
  27. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index62.js +3 -4
  28. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index63.js +2 -44
  29. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index64.js +46 -1
  30. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index65.js +1 -8
  31. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index66.js +6 -10
  32. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index67.js +10 -110
  33. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index68.js +112 -3
  34. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index69.js +3 -127
  35. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index70.js +124 -8
  36. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index71.js +8 -7
  37. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index72.js +8 -46
  38. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index73.js +43 -18
  39. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index74.js +20 -28
  40. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index75.js +27 -82
  41. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index76.js +83 -47
  42. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index77.js +47 -250
  43. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index78.js +239 -101
  44. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index79.js +107 -202
  45. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index80.js +209 -3
  46. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index81.js +4 -8
  47. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index82.js +6 -113
  48. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index83.js +115 -1
  49. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index84.js +0 -24
  50. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index85.js +25 -0
  51. package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/index.js +1 -1
  52. package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/client.config.js +2 -2
  53. package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/finopsApiVersion.js +4 -0
  54. package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/analytics/build-info.js +1 -1
  55. package/dist/libs/tesouro-embedded-components-react/widget-suite/feature/dist/index8.js +1 -1
  56. package/package.json +33 -1
  57. package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/api-version.js +0 -3
  58. package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/api-version.json.js +0 -4
@@ -1,214 +1,38 @@
1
- "use client";
2
- "use client";
3
- "use client";
4
- "use client";
5
- import { hasAnyScope as e } from "../../../shared/data-access/dist/lib/hasAnyScope.js";
6
- import { Scope as t } from "../../../shared/data-access/dist/lib/scopes.js";
7
- import { useAllLedgerAccountsQuery as ee } from "../../../shared/data-access/dist/lib/reference-data/useLedgerAccountsQuery.js";
8
- import { useAllOrganizationUsersQuery as te } from "../../../shared/data-access/dist/lib/user/useAllOrganizationUsersQuery.js";
9
- import "../../../shared/data-access/dist/index.js";
10
- import { useWidgetConfig as ne } from "../../../shared/feature/dist/lib/WidgetProvider/hooks.js";
11
- import "../../../shared/feature/dist/index.js";
12
- import { usePayableApprovalRequestsQuery as n } from "../../data-access/dist/index8.js";
13
- import { usePayableHistoryQuery as r } from "../../data-access/dist/index9.js";
14
- import { useAllPayableLineItemsQuery as i } from "../../data-access/dist/index10.js";
15
- import { usePayableQuery as a } from "../../data-access/dist/index16.js";
16
- import "../../data-access/dist/index.js";
17
- import { BillDecisionDialog as o } from "../../ui/dist/index56.js";
18
- import { BillDetailsSheet as s } from "../../ui/dist/index62.js";
19
- import { BillDuplicateNotice as c } from "../../ui/dist/index66.js";
20
- import { MarkAsPaidDialog as l } from "../../ui/dist/index96.js";
1
+ import { BILL_DETAILS_SHEET_LABELS_EN as e } from "../../ui/dist/index61.js";
21
2
  import "../../ui/dist/index.js";
22
- import { usePayableDuplicateReview as u } from "./index13.js";
23
- import "./index14.js";
24
- import { canOverrideApprovalPolicy as d } from "./index19.js";
25
- import { resolveAmountDueMinorUnits as f } from "./index20.js";
26
- import { PayBillFlow as p } from "./index26.js";
27
- import "./index27.js";
28
- import { mapPayableToBillDetails as re } from "./index39.js";
29
- import { mergeMarkAsPaidFlowLabels as ie } from "./index15.js";
30
- import { useMarkAsPaidFlow as ae } from "./index17.js";
3
+ import { MARK_AS_PAID_FLOW_LABELS_EN as t } from "./index15.js";
31
4
  import "./index18.js";
32
- import { mergeDecisionDialogCopy as oe, mergePaymentHistoryMethodLabels as se } from "./index42.js";
33
- import { buildPaymentHistory as m } from "./index3.js";
34
- import { currentApprovalRound as ce } from "./index4.js";
35
- import { usePayableApprovalRoundStart as le } from "./index31.js";
36
- import { useApprovalPolicyCardView as ue } from "./index32.js";
37
- import { resolveBillRejectionNotice as h } from "./index33.js";
38
- import { useCurrentApprovalRequestId as g } from "./index34.js";
39
- import { usePayableDetailActions as _ } from "./index35.js";
40
- import { useScheduledPayment as de } from "./index36.js";
41
- import { BILL_DETAILS_LABELS_EN as v } from "./index59.js";
42
- import { useMemo as y, useRef as fe } from "react";
43
- import { Fragment as b, jsx as x, jsxs as S } from "react/jsx-runtime";
5
+ import { APPROVAL_POLICY_RULE_COPY_EN as n } from "./index28.js";
6
+ import { BILL_DETAIL_ACTIONS_LABELS_EN as r, PAYMENT_HISTORY_LABELS_EN as i, SCHEDULED_SUMMARY_LABEL_EN as a } from "./index43.js";
44
7
  //#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index60.js
45
- function C({ open: C, onOpenChange: w, payableId: T, onClose: E, onExpand: D, testId: O, labels: k, poweredByBankName: A }) {
46
- let j = y(() => ({
47
- ...v,
48
- ...k,
49
- sheet: {
50
- ...v.sheet,
51
- ...k?.sheet,
52
- statusBadge: {
53
- ...v.sheet.statusBadge,
54
- ...k?.sheet?.statusBadge
55
- },
56
- approvalPolicy: {
57
- ...v.sheet.approvalPolicy,
58
- ...k?.sheet?.approvalPolicy
59
- },
60
- dueDate: {
61
- ...v.sheet.dueDate,
62
- ...k?.sheet?.dueDate
63
- }
64
- },
65
- decisionDialog: oe(v.decisionDialog, k?.decisionDialog),
66
- approvalPolicyCopy: {
67
- ...v.approvalPolicyCopy,
68
- ...k?.approvalPolicyCopy
69
- },
70
- markAsPaid: ie(k?.markAsPaid),
71
- actionSuccess: {
72
- ...v.actionSuccess,
73
- ...k?.actionSuccess
74
- },
75
- paymentHistoryMethodLabels: se(k?.paymentHistoryMethodLabels)
76
- }), [k]), M = a(T), N = i(T), P = ee(), { initResponse: F } = ne(), I = M.data, L = fe(null), R = g({
77
- payableId: T,
78
- status: I?.status
79
- }), z = I?.status === "rejected", B = e(F?.scopes, [t.ApprovalRequestReadOrg]), V = z && B, H = le({
80
- payableId: T,
81
- enabled: V
82
- }), U = n(T, { enabled: V }), pe = e(F?.scopes, [t.UserReadOrg]), W = te({ enabled: z && pe }), G = y(() => ce(U.data?.data, H.roundStartedAt), [U.data, H.roundStartedAt]), K = y(() => h({
83
- payableStatus: I?.status,
84
- approvalRequests: G,
85
- users: W.data?.data ?? [],
86
- payableUpdatedAt: I?.updated_at,
87
- labels: j
88
- }), [
89
- I?.status,
90
- I?.updated_at,
91
- G,
92
- W.data,
93
- j
94
- ]), q = ue({
95
- payableId: T,
96
- approvalPolicyId: I?.approval_policy_id,
97
- copy: j.approvalPolicyCopy
98
- }), me = d({
99
- status: I?.status,
100
- scopes: F?.scopes,
101
- hasWaitingRequest: R.hasWaitingRequest,
102
- arePendingApproversUnknown: q.isLoading
103
- }), J = de({
104
- payableId: T,
105
- scheduledPaymentDate: I?.scheduled_payment_date
106
- }), Y = ae({
107
- payableId: T,
108
- amountDueMinorUnits: f(I) ?? 0,
109
- amountToPayMinorUnits: I?.amount_to_pay ?? void 0,
110
- currencyCode: I?.currency ?? void 0,
111
- dueDate: I?.due_date,
112
- hasScheduledPayment: J.hasScheduledPayment,
113
- testId: O,
114
- labels: j.markAsPaid
115
- }), { actions: he, decisionDialog: ge } = _({
116
- payableId: I ? T : void 0,
117
- status: I?.status,
118
- currentApprovalRequestId: R.id,
119
- hasWaitingRequest: R.hasWaitingRequest,
120
- hasScheduledPayment: J.hasScheduledPayment,
121
- scheduledPaymentIntentId: J.scheduledPaymentIntentId,
122
- isScheduledPaymentUnknown: J.isResolving,
123
- pendingApprovers: q.pendingApprovers,
124
- arePendingApproversUnknown: q.isLoading,
125
- labels: {
126
- payBill: j.sheet.payButton,
127
- markAsPaid: j.sheet.markAsPaidButton,
128
- reject: j.sheet.rejectButton,
129
- approve: j.sheet.approveButton,
130
- cancel: j.sheet.cancelButton,
131
- cancelScheduledPayment: j.sheet.cancelScheduledPaymentButton,
132
- reopen: j.sheet.reopenButton,
133
- forceApprove: j.sheet.forceApproveButton,
134
- forceReject: j.sheet.forceRejectButton,
135
- policyOverridesHeading: j.sheet.policyOverridesGroup,
136
- decisionDialog: j.decisionDialog,
137
- actionError: j.actionError,
138
- actionSuccess: j.actionSuccess
139
- },
140
- isMarkAsPaidPending: Y.isPending,
141
- onMarkAsPaidSelect: Y.open,
142
- onPayBillSelect: () => L.current?.open()
143
- }), X = J.hasScheduledPayment && J.scheduledDateLabel ? /* @__PURE__ */ x("p", {
144
- className: "ttw:text-sm ttw:text-muted-foreground",
145
- children: j.scheduledSummary(J.scheduledDateLabel)
146
- }) : void 0, Z = u({
147
- payable: I,
148
- canManage: e(F?.scopes, [t.PayableWriteOrg])
149
- }), Q = Z.isPossibleDuplicate ? /* @__PURE__ */ x(c, {
150
- onNotADuplicate: Z.onNotADuplicate,
151
- isActionDisabled: Z.isBusy
152
- }) : void 0, _e = Q || X ? /* @__PURE__ */ S(b, { children: [Q, X] }) : void 0, $ = r(T), ve = y(() => m({
153
- records: J.paymentRecords,
154
- events: $.data?.data ?? [],
155
- currencyCode: I?.currency,
156
- labels: j
157
- }), [
158
- J.paymentRecords,
159
- $.data,
160
- I?.currency,
161
- j
162
- ]), ye = y(() => I ? re({
163
- payable: I,
164
- lineItems: N.lineItems,
165
- ledgerAccounts: P.data?.data ?? [],
166
- labels: j,
167
- hasScheduledPayment: J.hasScheduledPayment,
168
- rejection: K
169
- }) : void 0, [
170
- I,
171
- N.lineItems,
172
- P.data,
173
- j,
174
- J.hasScheduledPayment,
175
- K
176
- ]), be = M.isLoading || N.isResolving || P.isResolving, xe = M.isError || N.isError || P.isError;
177
- return /* @__PURE__ */ S(b, { children: [
178
- /* @__PURE__ */ x(s, {
179
- open: C,
180
- onOpenChange: w,
181
- details: ye,
182
- actions: he,
183
- approvalPolicy: q.view,
184
- showApprovalOverrideNotice: me,
185
- paymentHistory: ve,
186
- paymentHistoryError: J.isError || $.isError,
187
- paymentHistoryLoading: J.isResolving || $.isLoading,
188
- isLoading: be,
189
- isError: xe,
190
- notice: _e,
191
- onClose: E,
192
- onExpand: D,
193
- testId: O,
194
- labels: j.sheet
195
- }),
196
- /* @__PURE__ */ x(o, {
197
- ...ge,
198
- labels: { cancelButton: j.decisionDialog.cancelButton },
199
- testId: O ? `${O}-decision-dialog` : void 0,
200
- confirmTestId: O ? `${O}-decision-confirm` : void 0,
201
- reasonTestId: O ? `${O}-decision-reason` : void 0,
202
- reasonFieldId: O ? `${O}-decision-reason-field` : void 0
203
- }),
204
- /* @__PURE__ */ x(l, { ...Y.dialogProps }),
205
- I ? /* @__PURE__ */ x(p, {
206
- ref: L,
207
- payable: I,
208
- onMissingAchInstructions: D,
209
- poweredByBankName: A
210
- }) : null
211
- ] });
212
- }
8
+ var o = {
9
+ subtitle: "Accounts payable",
10
+ vendorRow: "Vendor",
11
+ bankAccountRow: "ACH bank account",
12
+ bankAccountValue: (e) => `Account ending in ${e}`,
13
+ ...i,
14
+ invoiceNumberRow: "Number",
15
+ issueDateRow: "Issue date",
16
+ dueDateRow: "Due date",
17
+ poNumberRow: "PO number",
18
+ notProvided: "Not provided",
19
+ glCodeMissing: "GL code not specified",
20
+ quantityValue: (e, t) => `${e} x ${t}`,
21
+ subtotalRow: "Subtotal",
22
+ discountsRow: "Discounts",
23
+ taxRow: "Tax",
24
+ totalRow: "Total",
25
+ actionError: r.actionError,
26
+ actionSuccess: r.actionSuccess,
27
+ scheduledSummary: a,
28
+ paidOnLabel: (e) => `Paid on ${e}`,
29
+ rejectedByOn: (e, t) => `Rejected by ${e} on ${t}`,
30
+ rejectedOn: (e) => `Rejected on ${e}`,
31
+ rejectionMessage: (e) => `"${e}"`,
32
+ sheet: e,
33
+ decisionDialog: r.decisionDialog,
34
+ approvalPolicyCopy: n,
35
+ markAsPaid: t
36
+ };
213
37
  //#endregion
214
- export { C as BillDetailsContainer, C as default };
38
+ export { o as BILL_DETAILS_LABELS_EN };
@@ -1,3 +1,221 @@
1
- import "./index39.js";
2
- import "./index59.js";
3
- import "./index60.js";
1
+ "use client";
2
+ "use client";
3
+ "use client";
4
+ "use client";
5
+ import { hasAnyScope as e } from "../../../shared/data-access/dist/lib/hasAnyScope.js";
6
+ import { Scope as t } from "../../../shared/data-access/dist/lib/scopes.js";
7
+ import { useAllLedgerAccountsQuery as ee } from "../../../shared/data-access/dist/lib/reference-data/useLedgerAccountsQuery.js";
8
+ import { useAllOrganizationUsersQuery as te } from "../../../shared/data-access/dist/lib/user/useAllOrganizationUsersQuery.js";
9
+ import "../../../shared/data-access/dist/index.js";
10
+ import { useWidgetConfig as n } from "../../../shared/feature/dist/lib/WidgetProvider/hooks.js";
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/index16.js";
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";
21
+ import "../../ui/dist/index.js";
22
+ import { usePayableDuplicateReview as ne } from "./index13.js";
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";
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 "./index39.js";
31
+ import { mergeMarkAsPaidFlowLabels as p } from "./index15.js";
32
+ import { useMarkAsPaidFlow as m } from "./index17.js";
33
+ import "./index18.js";
34
+ import { mergeDecisionDialogCopy as h, mergePaymentHistoryMethodLabels as g } from "./index43.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 "./index60.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";
46
+ //#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index61.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,
50
+ ...k,
51
+ sheet: {
52
+ ...v.sheet,
53
+ ...k?.sheet,
54
+ statusBadge: {
55
+ ...v.sheet.statusBadge,
56
+ ...k?.sheet?.statusBadge
57
+ },
58
+ approvalPolicy: {
59
+ ...v.sheet.approvalPolicy,
60
+ ...k?.sheet?.approvalPolicy
61
+ },
62
+ dueDate: {
63
+ ...v.sheet.dueDate,
64
+ ...k?.sheet?.dueDate
65
+ }
66
+ },
67
+ decisionDialog: h(v.decisionDialog, k?.decisionDialog),
68
+ approvalPolicyCopy: {
69
+ ...v.approvalPolicyCopy,
70
+ ...k?.approvalPolicyCopy
71
+ },
72
+ markAsPaid: p(k?.markAsPaid),
73
+ actionSuccess: {
74
+ ...v.actionSuccess,
75
+ ...k?.actionSuccess
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,
80
+ status: I?.status
81
+ }), z = I?.status === "rejected", he = e(F?.scopes, [t.ApprovalRequestReadOrg]), B = z && he, V = ce({
82
+ payableId: T,
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({
85
+ payableStatus: I?.status,
86
+ approvalRequests: W,
87
+ users: U.data?.data ?? [],
88
+ payableUpdatedAt: I?.updated_at,
89
+ labels: j
90
+ }), [
91
+ I?.status,
92
+ I?.updated_at,
93
+ W,
94
+ U.data,
95
+ j
96
+ ]), K = le({
97
+ payableId: T,
98
+ approvalPolicyId: I?.approval_policy_id,
99
+ copy: j.approvalPolicyCopy
100
+ }), _e = re({
101
+ status: I?.status,
102
+ scopes: F?.scopes,
103
+ hasWaitingRequest: R.hasWaitingRequest,
104
+ arePendingApproversUnknown: K.isLoading
105
+ }), q = pe({
106
+ payableId: T,
107
+ scheduledPaymentDate: I?.scheduled_payment_date
108
+ }), ve = oe({
109
+ counterpartId: I?.counterpart_id,
110
+ currency: I?.currency,
111
+ enabled: ie(F?.scopes)
112
+ }), J = m({
113
+ payableId: T,
114
+ amountDueMinorUnits: ae(I) ?? 0,
115
+ amountToPayMinorUnits: I?.amount_to_pay ?? void 0,
116
+ currencyCode: I?.currency ?? void 0,
117
+ dueDate: I?.due_date,
118
+ hasScheduledPayment: q.hasScheduledPayment,
119
+ testId: O,
120
+ labels: j.markAsPaid
121
+ }), { actions: ye, decisionDialog: be } = fe({
122
+ payableId: I ? T : void 0,
123
+ status: I?.status,
124
+ currentApprovalRequestId: R.id,
125
+ hasWaitingRequest: R.hasWaitingRequest,
126
+ hasScheduledPayment: q.hasScheduledPayment,
127
+ scheduledPaymentIntentId: q.scheduledPaymentIntentId,
128
+ isScheduledPaymentUnknown: q.isResolving,
129
+ isPayabilityUnknown: ve.isLoading,
130
+ pendingApprovers: K.pendingApprovers,
131
+ arePendingApproversUnknown: K.isLoading,
132
+ labels: {
133
+ payBill: j.sheet.payButton,
134
+ markAsPaid: j.sheet.markAsPaidButton,
135
+ reject: j.sheet.rejectButton,
136
+ approve: j.sheet.approveButton,
137
+ cancel: j.sheet.cancelButton,
138
+ cancelScheduledPayment: j.sheet.cancelScheduledPaymentButton,
139
+ reopen: j.sheet.reopenButton,
140
+ forceApprove: j.sheet.forceApproveButton,
141
+ forceReject: j.sheet.forceRejectButton,
142
+ policyOverridesHeading: j.sheet.policyOverridesGroup,
143
+ decisionDialog: j.decisionDialog,
144
+ actionError: j.actionError,
145
+ actionSuccess: j.actionSuccess
146
+ },
147
+ isMarkAsPaidPending: J.isPending,
148
+ onMarkAsPaidSelect: J.open,
149
+ onPayBillSelect: () => L.current?.open()
150
+ }), Y = q.hasScheduledPayment && q.scheduledDateLabel ? /* @__PURE__ */ x("p", {
151
+ className: "ttw:text-sm ttw:text-muted-foreground",
152
+ children: j.scheduledSummary(q.scheduledDateLabel)
153
+ }) : void 0, X = ne({
154
+ payable: I,
155
+ canManage: e(F?.scopes, [t.PayableWriteOrg])
156
+ }), Z = X.isPossibleDuplicate ? /* @__PURE__ */ x(l, {
157
+ onNotADuplicate: X.onNotADuplicate,
158
+ isActionDisabled: X.isBusy
159
+ }) : void 0, xe = Z || Y ? /* @__PURE__ */ S(b, { children: [Z, Y] }) : void 0, Q = i(T), Se = y(() => _({
160
+ records: q.paymentRecords,
161
+ events: Q.data?.data ?? [],
162
+ currencyCode: I?.currency,
163
+ labels: j
164
+ }), [
165
+ q.paymentRecords,
166
+ Q.data,
167
+ I?.currency,
168
+ j
169
+ ]), Ce = y(() => I ? f({
170
+ payable: I,
171
+ lineItems: N.lineItems,
172
+ ledgerAccounts: P.data?.data ?? [],
173
+ labels: j,
174
+ hasScheduledPayment: q.hasScheduledPayment,
175
+ rejection: G
176
+ }) : void 0, [
177
+ I,
178
+ N.lineItems,
179
+ P.data,
180
+ j,
181
+ q.hasScheduledPayment,
182
+ G
183
+ ]), we = M.isLoading || N.isResolving || P.isResolving, $ = M.isError || N.isError || P.isError;
184
+ return /* @__PURE__ */ S(b, { children: [
185
+ /* @__PURE__ */ x(c, {
186
+ open: C,
187
+ onOpenChange: w,
188
+ details: Ce,
189
+ actions: ye,
190
+ approvalPolicy: K.view,
191
+ showApprovalOverrideNotice: _e,
192
+ paymentHistory: Se,
193
+ paymentHistoryError: q.isError || Q.isError,
194
+ paymentHistoryLoading: q.isResolving || Q.isLoading,
195
+ isLoading: we,
196
+ isError: $,
197
+ notice: xe,
198
+ onClose: E,
199
+ onExpand: D,
200
+ testId: O,
201
+ labels: j.sheet
202
+ }),
203
+ /* @__PURE__ */ x(s, {
204
+ ...be,
205
+ labels: { cancelButton: j.decisionDialog.cancelButton },
206
+ testId: O ? `${O}-decision-dialog` : void 0,
207
+ confirmTestId: O ? `${O}-decision-confirm` : void 0,
208
+ reasonTestId: O ? `${O}-decision-reason` : void 0,
209
+ reasonFieldId: O ? `${O}-decision-reason-field` : void 0
210
+ }),
211
+ /* @__PURE__ */ x(u, { ...J.dialogProps }),
212
+ I ? /* @__PURE__ */ x(d, {
213
+ ref: L,
214
+ payable: I,
215
+ onMissingAchInstructions: D,
216
+ poweredByBankName: A
217
+ }) : null
218
+ ] });
219
+ }
220
+ //#endregion
221
+ export { C as BillDetailsContainer, C as default };
@@ -1,4 +1,3 @@
1
- //#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index62.js
2
- var e = { Mounted: "bill_pay_widget.mounted" }, t = "bill_pay_widget";
3
- //#endregion
4
- export { e as BillPayWidgetAnalyticsEvent, t as WIDGET_NAME };
1
+ import "./index39.js";
2
+ import "./index60.js";
3
+ import "./index61.js";
@@ -1,46 +1,4 @@
1
- "use client";
2
- "use client";
3
- "use client";
4
- "use client";
5
- import { useAnalyticsTrack as e } from "../../../shared/feature/dist/lib/analytics/hooks.js";
6
- import "../../../shared/feature/dist/index.js";
7
- import { BillPayWidgetAnalyticsEvent as t, WIDGET_NAME as n } from "./index62.js";
8
- import { Payables as r } from "../../../monite-sdk/dist/index444.js";
9
- import "../../../monite-sdk/dist/index.js";
10
- import { MoniteRegionProvider as i } from "../../../shared/monite-wrapper/feature/dist/lib/MoniteRegionProvider.js";
11
- import "../../../shared/monite-wrapper/feature/dist/index.js";
12
- import { useEffect as a } from "react";
13
- import { jsx as o } from "react/jsx-runtime";
14
1
  //#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index63.js
15
- var s = (e) => e;
16
- function c(n) {
17
- let i = e();
18
- return a(() => {
19
- i(t.Mounted);
20
- }, [i]), /* @__PURE__ */ o(r, { ...n });
21
- }
22
- function l({ baseUrl: e, widgetToken: t, organizationId: r, configClient: a, gatewayRouting: l, linkComponent: u, implementation: d, uiFramework: f, errorFallback: p, onError: m, finopsThemeColors: h, analytics: g, disclosuresAcceptance: _, providerLabels: v, pageTitleComponent: y = s, ...b }) {
23
- return /* @__PURE__ */ o(i, {
24
- widgetName: n,
25
- baseUrl: e,
26
- widgetToken: t,
27
- organizationId: r,
28
- configClient: a,
29
- gatewayRouting: l,
30
- linkComponent: u,
31
- implementation: d,
32
- uiFramework: f,
33
- errorFallback: p,
34
- onError: m,
35
- finopsThemeColors: h,
36
- analytics: g,
37
- disclosuresAcceptance: _,
38
- providerLabels: v,
39
- children: /* @__PURE__ */ o(c, {
40
- ...b,
41
- pageTitleComponent: y
42
- })
43
- });
44
- }
2
+ var e = { Mounted: "bill_pay_widget.mounted" }, t = "bill_pay_widget";
45
3
  //#endregion
46
- export { l as BillPayWidgetMonite, l as default };
4
+ export { e as BillPayWidgetAnalyticsEvent, t as WIDGET_NAME };
@@ -1 +1,46 @@
1
- import "./index63.js";
1
+ "use client";
2
+ "use client";
3
+ "use client";
4
+ "use client";
5
+ import { useAnalyticsTrack as e } from "../../../shared/feature/dist/lib/analytics/hooks.js";
6
+ import "../../../shared/feature/dist/index.js";
7
+ import { BillPayWidgetAnalyticsEvent as t, WIDGET_NAME as n } from "./index63.js";
8
+ import { Payables as r } from "../../../monite-sdk/dist/index444.js";
9
+ import "../../../monite-sdk/dist/index.js";
10
+ import { MoniteRegionProvider as i } from "../../../shared/monite-wrapper/feature/dist/lib/MoniteRegionProvider.js";
11
+ import "../../../shared/monite-wrapper/feature/dist/index.js";
12
+ import { useEffect as a } from "react";
13
+ import { jsx as o } from "react/jsx-runtime";
14
+ //#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index64.js
15
+ var s = (e) => e;
16
+ function c(n) {
17
+ let i = e();
18
+ return a(() => {
19
+ i(t.Mounted);
20
+ }, [i]), /* @__PURE__ */ o(r, { ...n });
21
+ }
22
+ function l({ baseUrl: e, widgetToken: t, organizationId: r, configClient: a, gatewayRouting: l, linkComponent: u, implementation: d, uiFramework: f, errorFallback: p, onError: m, finopsThemeColors: h, analytics: g, disclosuresAcceptance: _, providerLabels: v, pageTitleComponent: y = s, ...b }) {
23
+ return /* @__PURE__ */ o(i, {
24
+ widgetName: n,
25
+ baseUrl: e,
26
+ widgetToken: t,
27
+ organizationId: r,
28
+ configClient: a,
29
+ gatewayRouting: l,
30
+ linkComponent: u,
31
+ implementation: d,
32
+ uiFramework: f,
33
+ errorFallback: p,
34
+ onError: m,
35
+ finopsThemeColors: h,
36
+ analytics: g,
37
+ disclosuresAcceptance: _,
38
+ providerLabels: v,
39
+ children: /* @__PURE__ */ o(c, {
40
+ ...b,
41
+ pageTitleComponent: y
42
+ })
43
+ });
44
+ }
45
+ //#endregion
46
+ export { l as BillPayWidgetMonite, l as default };
@@ -1,8 +1 @@
1
- //#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index65.js
2
- var e = (e) => [
3
- "bill-pay",
4
- "upload-queue",
5
- e ?? ""
6
- ];
7
- //#endregion
8
- export { e as billPayUploadQueueKey };
1
+ import "./index64.js";
@@ -1,12 +1,8 @@
1
1
  //#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index66.js
2
- var e = {
3
- uploadingSummary: (e) => `Uploading and scanning ${e} ${e === 1 ? "file" : "files"}`,
4
- completeSummary: (e) => `${e} ${e === 1 ? "upload" : "uploads"} complete`,
5
- readyCaption: (e) => `${e} new ${e === 1 ? "bill" : "bills"} ready`,
6
- duplicateCaption: (e) => `${e} possible ${e === 1 ? "duplicate" : "duplicates"}`,
7
- failedCaption: (e) => `${e} failed to upload`,
8
- tooManyFilesError: (e) => `You can only upload up to ${e} files at a time`,
9
- remainingCapacityError: (e) => e === 0 ? "Wait for the current uploads to finish before adding more files" : `You can upload ${e} more ${e === 1 ? "file" : "files"} right now`
10
- };
2
+ var e = (e) => [
3
+ "bill-pay",
4
+ "upload-queue",
5
+ e ?? ""
6
+ ];
11
7
  //#endregion
12
- export { e as BILL_UPLOAD_QUEUE_LABELS_EN };
8
+ export { e as billPayUploadQueueKey };