@tesouro/embedded-components-react 0.5.0 → 0.5.1

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 (55) 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 +10 -9
  4. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index40.js +14 -88
  5. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index41.js +8 -96
  6. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index42.js +91 -3
  7. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index43.js +96 -48
  8. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index44.js +3 -137
  9. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index45.js +49 -35
  10. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index46.js +129 -180
  11. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index47.js +32 -74
  12. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index48.js +186 -21
  13. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index49.js +70 -226
  14. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index50.js +22 -219
  15. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index51.js +221 -109
  16. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index52.js +220 -13
  17. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index53.js +119 -46
  18. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index54.js +13 -32
  19. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index55.js +43 -198
  20. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index56.js +29 -32
  21. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index57.js +186 -222
  22. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index58.js +37 -19
  23. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index59.js +229 -420
  24. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index60.js +21 -4
  25. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index61.js +429 -34
  26. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index62.js +4 -224
  27. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index63.js +38 -3
  28. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index64.js +222 -2
  29. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index65.js +3 -46
  30. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index66.js +4 -1
  31. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index67.js +44 -6
  32. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index68.js +1 -12
  33. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index69.js +6 -110
  34. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index70.js +12 -3
  35. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index71.js +109 -124
  36. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index72.js +3 -11
  37. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index73.js +124 -7
  38. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index74.js +8 -45
  39. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index75.js +8 -21
  40. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index76.js +45 -28
  41. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index77.js +20 -83
  42. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index78.js +28 -47
  43. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index79.js +76 -243
  44. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index80.js +48 -113
  45. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index81.js +239 -196
  46. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index82.js +115 -4
  47. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index83.js +207 -5
  48. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index84.js +3 -114
  49. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index85.js +8 -1
  50. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index86.js +106 -16
  51. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index87.js +1 -0
  52. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index88.js +25 -0
  53. package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/analytics/build-info.js +1 -1
  54. package/dist/libs/tesouro-embedded-components-react/widget-suite/feature/dist/index8.js +1 -1
  55. package/package.json +1 -1
@@ -1,224 +1,4 @@
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
+ import "./index48.js";
2
+ import "./index57.js";
3
+ import "./index59.js";
4
+ import "./index61.js";
@@ -1,3 +1,38 @@
1
- import "./index40.js";
2
- import "./index61.js";
3
- import "./index62.js";
1
+ import { BILL_DETAILS_SHEET_LABELS_EN as e } from "../../ui/dist/index61.js";
2
+ import "../../ui/dist/index.js";
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 "./index46.js";
7
+ //#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index63.js
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
+ };
37
+ //#endregion
38
+ export { o as BILL_DETAILS_LABELS_EN };
@@ -1,4 +1,224 @@
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 "./index42.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 "./index46.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 "./index63.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";
1
47
  //#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index64.js
2
- var e = { Mounted: "bill_pay_widget.mounted" }, t = "bill_pay_widget";
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
+ }
3
223
  //#endregion
4
- export { e as BillPayWidgetAnalyticsEvent, t as WIDGET_NAME };
224
+ export { S as BillDetailsContainer, S as default };
@@ -1,46 +1,3 @@
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/index441.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
+ import "./index42.js";
2
+ import "./index63.js";
3
+ import "./index64.js";
@@ -1 +1,4 @@
1
- import "./index65.js";
1
+ //#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index66.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,8 +1,46 @@
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 "./index66.js";
8
+ import { Payables as r } from "../../../monite-sdk/dist/index441.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";
1
14
  //#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index67.js
2
- var e = (e) => [
3
- "bill-pay",
4
- "upload-queue",
5
- e ?? ""
6
- ];
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
+ }
7
45
  //#endregion
8
- export { e as billPayUploadQueueKey };
46
+ export { l as BillPayWidgetMonite, l as default };
@@ -1,12 +1 @@
1
- //#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index68.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
- };
11
- //#endregion
12
- export { e as BILL_UPLOAD_QUEUE_LABELS_EN };
1
+ import "./index67.js";