@tesouro/embedded-components-react 0.4.28 → 0.4.30

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 (93) 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/data-access/dist/index.js +2 -2
  4. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index16.js +15 -82
  5. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index17.js +87 -25
  6. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index18.js +36 -0
  7. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index.js +12 -12
  8. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index10.js +5 -70
  9. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index11.js +64 -37
  10. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index12.js +38 -110
  11. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index13.js +104 -73
  12. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index14.js +87 -7
  13. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index15.js +7 -21
  14. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index16.js +17 -22
  15. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index17.js +23 -63
  16. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index18.js +66 -2
  17. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index19.js +2 -77
  18. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index20.js +78 -3
  19. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index21.js +4 -5
  20. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index22.js +5 -4
  21. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index23.js +3 -32
  22. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index24.js +30 -39
  23. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index25.js +37 -166
  24. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index26.js +164 -39
  25. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index27.js +48 -1
  26. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index28.js +1 -50
  27. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index29.js +45 -11
  28. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index30.js +13 -8
  29. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index31.js +8 -14
  30. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index32.js +7 -59
  31. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index33.js +64 -8
  32. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index34.js +8 -24
  33. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index35.js +18 -136
  34. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index36.js +139 -16
  35. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index37.js +24 -4
  36. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index38.js +4 -41
  37. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index39.js +39 -88
  38. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index40.js +79 -85
  39. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index41.js +96 -3
  40. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index42.js +3 -49
  41. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index43.js +47 -119
  42. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index44.js +135 -33
  43. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index45.js +33 -186
  44. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index46.js +186 -75
  45. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index47.js +75 -21
  46. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index48.js +22 -232
  47. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index49.js +223 -210
  48. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index5.js +14 -25
  49. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index50.js +202 -103
  50. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index51.js +121 -13
  51. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index52.js +12 -47
  52. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index53.js +47 -31
  53. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index54.js +27 -198
  54. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index55.js +198 -30
  55. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index56.js +30 -234
  56. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index57.js +240 -19
  57. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index58.js +19 -425
  58. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index59.js +433 -4
  59. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index6.js +25 -24
  60. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index60.js +4 -38
  61. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index61.js +35 -218
  62. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index62.js +224 -3
  63. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index63.js +3 -4
  64. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index64.js +2 -44
  65. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index65.js +46 -1
  66. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index66.js +1 -8
  67. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index67.js +6 -10
  68. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index68.js +10 -110
  69. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index69.js +112 -3
  70. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index7.js +21 -57
  71. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index70.js +3 -127
  72. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index71.js +124 -8
  73. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index72.js +8 -7
  74. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index73.js +8 -46
  75. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index74.js +43 -18
  76. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index75.js +20 -28
  77. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index76.js +27 -82
  78. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index77.js +83 -47
  79. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index78.js +47 -250
  80. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index79.js +239 -101
  81. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index8.js +58 -5
  82. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index80.js +107 -202
  83. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index81.js +209 -3
  84. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index82.js +4 -8
  85. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index83.js +6 -113
  86. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index84.js +115 -1
  87. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index85.js +0 -24
  88. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index86.js +25 -0
  89. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index9.js +5 -4
  90. package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/rest/zod.gen.js +1784 -1769
  91. package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/analytics/build-info.js +1 -1
  92. package/dist/libs/tesouro-embedded-components-react/widget-suite/feature/dist/index8.js +1 -1
  93. package/package.json +1 -1
@@ -1,221 +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 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";
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 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";
3
+ import { MARK_AS_PAID_FLOW_LABELS_EN as t } from "./index16.js";
4
+ import "./index19.js";
5
+ import { APPROVAL_POLICY_RULE_COPY_EN as n } from "./index29.js";
6
+ import { BILL_DETAIL_ACTIONS_LABELS_EN as r, PAYMENT_HISTORY_LABELS_EN as i, SCHEDULED_SUMMARY_LABEL_EN as a } from "./index44.js";
46
7
  //#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
- }
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
+ };
220
37
  //#endregion
221
- export { C as BillDetailsContainer, C as default };
38
+ export { o as BILL_DETAILS_LABELS_EN };
@@ -1,3 +1,224 @@
1
- import "./index39.js";
2
- import "./index60.js";
3
- import "./index61.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 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/index17.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";
21
+ import "../../ui/dist/index.js";
22
+ import { usePayableDuplicateReview as u } from "./index14.js";
23
+ import "./index15.js";
24
+ import { canOverrideApprovalPolicy as d, canReadCounterpartBankAccounts as f } from "./index20.js";
25
+ import { resolveAmountDueMinorUnits as p } from "./index21.js";
26
+ import { usePayableAchInstructions as m } from "../../../shared/counterpart-management/feature/dist/lib/usePayableAchInstructions.js";
27
+ import "../../../shared/counterpart-management/feature/dist/index.js";
28
+ import { PayBillFlow as h } from "./index27.js";
29
+ import "./index28.js";
30
+ import { mapPayableToBillDetails as g } from "./index40.js";
31
+ import { mergeMarkAsPaidFlowLabels as re } from "./index16.js";
32
+ import { useMarkAsPaidFlow as ie } from "./index18.js";
33
+ import "./index19.js";
34
+ import { mergeDecisionDialogCopy as ae, mergePaymentHistoryMethodLabels as oe } from "./index44.js";
35
+ import { buildPaymentHistory as se } from "./index3.js";
36
+ import { currentApprovalRound as ce } from "./index4.js";
37
+ import { useIsApprovalPolicyAssignmentSettled as le } from "./index5.js";
38
+ import { usePayableApprovalRoundStart as ue } from "./index32.js";
39
+ import { useApprovalPolicyCardView as de } from "./index33.js";
40
+ import { resolveBillRejectionNotice as fe } from "./index34.js";
41
+ import { useCurrentApprovalRequestId as pe } from "./index35.js";
42
+ import { usePayableDetailActions as me } from "./index36.js";
43
+ import { useScheduledPayment as he } from "./index37.js";
44
+ import { BILL_DETAILS_LABELS_EN as _ } from "./index61.js";
45
+ import { useMemo as v, useRef as ge } from "react";
46
+ import { Fragment as y, jsx as b, jsxs as x } from "react/jsx-runtime";
47
+ //#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index62.js
48
+ function S({ open: S, onOpenChange: C, payableId: w, onClose: T, onExpand: E, testId: D, labels: O, poweredByBankName: k }) {
49
+ let A = v(() => ({
50
+ ..._,
51
+ ...O,
52
+ sheet: {
53
+ ..._.sheet,
54
+ ...O?.sheet,
55
+ statusBadge: {
56
+ ..._.sheet.statusBadge,
57
+ ...O?.sheet?.statusBadge
58
+ },
59
+ approvalPolicy: {
60
+ ..._.sheet.approvalPolicy,
61
+ ...O?.sheet?.approvalPolicy
62
+ },
63
+ dueDate: {
64
+ ..._.sheet.dueDate,
65
+ ...O?.sheet?.dueDate
66
+ }
67
+ },
68
+ decisionDialog: ae(_.decisionDialog, O?.decisionDialog),
69
+ approvalPolicyCopy: {
70
+ ..._.approvalPolicyCopy,
71
+ ...O?.approvalPolicyCopy
72
+ },
73
+ markAsPaid: re(O?.markAsPaid),
74
+ actionSuccess: {
75
+ ..._.actionSuccess,
76
+ ...O?.actionSuccess
77
+ },
78
+ paymentHistoryMethodLabels: oe(O?.paymentHistoryMethodLabels)
79
+ }), [O]), j = a(w, { pollWhilePolicyAssignmentUnsettled: !0 }), M = i(w), N = ee(), { initResponse: P } = ne(), F = j.data, I = ge(null), L = pe({
80
+ payableId: w,
81
+ status: F?.status
82
+ }), R = F?.status === "rejected", _e = e(P?.scopes, [t.ApprovalRequestReadOrg]), z = R && _e, B = ue({
83
+ payableId: w,
84
+ enabled: z
85
+ }), V = n(w, { enabled: z }), ve = e(P?.scopes, [t.UserReadOrg]), H = te({ enabled: R && ve }), U = v(() => ce(V.data?.data, B.roundStartedAt), [V.data, B.roundStartedAt]), W = v(() => fe({
86
+ payableStatus: F?.status,
87
+ approvalRequests: U,
88
+ users: H.data?.data ?? [],
89
+ payableUpdatedAt: F?.updated_at,
90
+ labels: A
91
+ }), [
92
+ F?.status,
93
+ F?.updated_at,
94
+ U,
95
+ H.data,
96
+ A
97
+ ]), G = de({
98
+ payableId: w,
99
+ approvalPolicyId: F?.approval_policy_id,
100
+ copy: A.approvalPolicyCopy
101
+ }), K = !le(F), ye = d({
102
+ status: F?.status,
103
+ scopes: P?.scopes,
104
+ arePendingApproversUnknown: G.isLoading || K,
105
+ hasApprovalPolicy: !!F?.approval_policy_id,
106
+ hasWaitingRequest: L.hasWaitingRequest
107
+ }), q = he({
108
+ payableId: w,
109
+ scheduledPaymentDate: F?.scheduled_payment_date
110
+ }), be = m({
111
+ counterpartId: F?.counterpart_id,
112
+ currency: F?.currency,
113
+ enabled: f(P?.scopes)
114
+ }), J = ie({
115
+ payableId: w,
116
+ amountDueMinorUnits: p(F) ?? 0,
117
+ amountToPayMinorUnits: F?.amount_to_pay ?? void 0,
118
+ currencyCode: F?.currency ?? void 0,
119
+ dueDate: F?.due_date,
120
+ hasScheduledPayment: q.hasScheduledPayment,
121
+ testId: D,
122
+ labels: A.markAsPaid
123
+ }), { actions: xe, decisionDialog: Se } = me({
124
+ payableId: F ? w : void 0,
125
+ status: F?.status,
126
+ currentApprovalRequestId: L.id,
127
+ hasScheduledPayment: q.hasScheduledPayment,
128
+ scheduledPaymentIntentId: q.scheduledPaymentIntentId,
129
+ isScheduledPaymentUnknown: q.isResolving,
130
+ isPayabilityUnknown: be.isLoading,
131
+ hasApprovalPolicy: !!F?.approval_policy_id,
132
+ hasWaitingRequest: L.hasWaitingRequest,
133
+ pendingApprovers: G.pendingApprovers,
134
+ arePendingApproversUnknown: G.isLoading || K,
135
+ labels: {
136
+ payBill: A.sheet.payButton,
137
+ markAsPaid: A.sheet.markAsPaidButton,
138
+ reject: A.sheet.rejectButton,
139
+ approve: A.sheet.approveButton,
140
+ cancel: A.sheet.cancelButton,
141
+ cancelScheduledPayment: A.sheet.cancelScheduledPaymentButton,
142
+ reopen: A.sheet.reopenButton,
143
+ forceApprove: A.sheet.forceApproveButton,
144
+ forceReject: A.sheet.forceRejectButton,
145
+ policyOverridesHeading: A.sheet.policyOverridesGroup,
146
+ decisionDialog: A.decisionDialog,
147
+ actionError: A.actionError,
148
+ actionSuccess: A.actionSuccess
149
+ },
150
+ isMarkAsPaidPending: J.isPending,
151
+ onMarkAsPaidSelect: J.open,
152
+ onPayBillSelect: () => I.current?.open()
153
+ }), Y = q.hasScheduledPayment && q.scheduledDateLabel ? /* @__PURE__ */ b("p", {
154
+ className: "ttw:text-sm ttw:text-muted-foreground",
155
+ children: A.scheduledSummary(q.scheduledDateLabel)
156
+ }) : void 0, X = u({
157
+ payable: F,
158
+ canManage: e(P?.scopes, [t.PayableWriteOrg])
159
+ }), Z = X.isPossibleDuplicate ? /* @__PURE__ */ b(c, {
160
+ onNotADuplicate: X.onNotADuplicate,
161
+ isActionDisabled: X.isBusy
162
+ }) : void 0, Ce = Z || Y ? /* @__PURE__ */ x(y, { children: [Z, Y] }) : void 0, Q = r(w), $ = v(() => se({
163
+ records: q.paymentRecords,
164
+ events: Q.data?.data ?? [],
165
+ currencyCode: F?.currency,
166
+ labels: A
167
+ }), [
168
+ q.paymentRecords,
169
+ Q.data,
170
+ F?.currency,
171
+ A
172
+ ]), we = v(() => F ? g({
173
+ payable: F,
174
+ lineItems: M.lineItems,
175
+ ledgerAccounts: N.data?.data ?? [],
176
+ labels: A,
177
+ hasScheduledPayment: q.hasScheduledPayment,
178
+ rejection: W
179
+ }) : void 0, [
180
+ F,
181
+ M.lineItems,
182
+ N.data,
183
+ A,
184
+ q.hasScheduledPayment,
185
+ W
186
+ ]), Te = j.isLoading || M.isResolving || N.isResolving, Ee = j.isError || M.isError || N.isError;
187
+ return /* @__PURE__ */ x(y, { children: [
188
+ /* @__PURE__ */ b(s, {
189
+ open: S,
190
+ onOpenChange: C,
191
+ details: we,
192
+ actions: xe,
193
+ approvalPolicy: G.view,
194
+ showApprovalOverrideNotice: ye && !!F?.approval_policy_id,
195
+ paymentHistory: $,
196
+ paymentHistoryError: q.isError || Q.isError,
197
+ paymentHistoryLoading: q.isResolving || Q.isLoading,
198
+ isLoading: Te,
199
+ isError: Ee,
200
+ notice: Ce,
201
+ onClose: T,
202
+ onExpand: E,
203
+ testId: D,
204
+ labels: A.sheet
205
+ }),
206
+ /* @__PURE__ */ b(o, {
207
+ ...Se,
208
+ labels: { cancelButton: A.decisionDialog.cancelButton },
209
+ testId: D ? `${D}-decision-dialog` : void 0,
210
+ confirmTestId: D ? `${D}-decision-confirm` : void 0,
211
+ reasonTestId: D ? `${D}-decision-reason` : void 0,
212
+ reasonFieldId: D ? `${D}-decision-reason-field` : void 0
213
+ }),
214
+ /* @__PURE__ */ b(l, { ...J.dialogProps }),
215
+ F ? /* @__PURE__ */ b(h, {
216
+ ref: I,
217
+ payable: F,
218
+ onMissingAchInstructions: E,
219
+ poweredByBankName: k
220
+ }) : null
221
+ ] });
222
+ }
223
+ //#endregion
224
+ export { S as BillDetailsContainer, S as default };
@@ -1,4 +1,3 @@
1
- //#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index63.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 "./index40.js";
2
+ import "./index61.js";
3
+ import "./index62.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 "./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
1
  //#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
- }
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 "./index64.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 "./index64.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/index65.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/index66.js
2
- var e = (e) => [
3
- "bill-pay",
4
- "upload-queue",
5
- e ?? ""
6
- ];
7
- //#endregion
8
- export { e as billPayUploadQueueKey };
1
+ import "./index65.js";
@@ -1,12 +1,8 @@
1
1
  //#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index67.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 };