@tesouro/embedded-components-react 0.11.127 → 0.11.131

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 (61) hide show
  1. package/dist/fixtures/index.d.ts +4 -4
  2. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/data-access/dist/index.js +5 -4
  3. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/data-access/dist/index21.js +20 -17
  4. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/data-access/dist/index22.js +14 -37
  5. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/data-access/dist/index23.js +31 -14
  6. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/data-access/dist/index24.js +26 -2
  7. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/data-access/dist/index25.js +2 -0
  8. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index.js +7 -7
  9. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index10.js +35 -12
  10. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index11.js +57 -65
  11. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index12.js +6 -11
  12. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index13.js +20 -8
  13. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index14.js +97 -7
  14. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index15.js +10 -10
  15. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index16.js +10 -29
  16. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index17.js +7 -27
  17. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index18.js +8 -18
  18. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index19.js +24 -139
  19. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index20.js +24 -13
  20. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index21.js +14 -17
  21. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index22.js +130 -27
  22. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index23.js +17 -100
  23. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index24.js +21 -82
  24. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index25.js +41 -3
  25. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index26.js +98 -53
  26. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index27.js +82 -113
  27. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index28.js +3 -193
  28. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index29.js +57 -81
  29. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index30.js +110 -66
  30. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index31.js +190 -111
  31. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index32.js +71 -456
  32. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index33.js +69 -114
  33. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index34.js +113 -8
  34. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index35.js +458 -79
  35. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index36.js +116 -79
  36. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index37.js +10 -256
  37. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index38.js +78 -36
  38. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index39.js +73 -236
  39. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index4.js +1 -1
  40. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index40.js +256 -21
  41. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index41.js +43 -516
  42. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index42.js +245 -4
  43. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index43.js +20 -40
  44. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index44.js +497 -211
  45. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index45.js +3 -2
  46. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index46.js +40 -3
  47. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index47.js +235 -57
  48. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index48.js +2 -0
  49. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index49.js +5 -0
  50. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index50.js +64 -0
  51. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index51.js +1 -0
  52. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index6.js +4 -47
  53. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index7.js +13 -4
  54. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index8.js +8 -13
  55. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index9.js +18 -9
  56. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/ui/dist/index3.js +44 -34
  57. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/lib/BillPayWidget/BillsTab.js +1 -1
  58. package/dist/libs/tesouro-embedded-components-react/products-widget/ui/dist/index4.js +10 -10
  59. package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/analytics/build-info.js +1 -1
  60. package/dist/libs/tesouro-embedded-components-react/widget-suite/feature/dist/lib/WidgetSuite/sections/InvoicingSection.js +3 -3
  61. package/package.json +1 -1
@@ -1,3 +1,4 @@
1
- import "./index23.js";
2
- import "./index43.js";
1
+ import "./index31.js";
2
+ import "./index40.js";
3
+ import "./index42.js";
3
4
  import "./index44.js";
@@ -1,5 +1,42 @@
1
- import { BILL_PAY_WIDGET_NAME as e } from "../../../util/dist/lib/widgetName.js";
1
+ import { AWAITING_APPROVAL_LABEL_EN as e, AWAITING_APPROVAL_UNKNOWN_LABEL_EN as t, BILL_DETAIL_ACTIONS_LABELS_EN as n, PAYMENT_HISTORY_LABELS_EN as r, SCHEDULED_RELATIVE_DAY_LABELS_EN as i, SCHEDULED_STATUS_BADGE_LABEL_EN as a, SCHEDULED_SUMMARY_LABEL_EN as o } from "../../../util/dist/lib/billDetailLabels.js";
2
2
  import "../../../util/dist/index.js";
3
+ import { APPROVAL_POLICY_RULE_COPY_EN as s } from "./index9.js";
4
+ import { PAYABLE_AUDIT_HISTORY_LABELS_EN as c } from "./index29.js";
5
+ import { BILL_DETAILS_SHEET_LABELS_EN as l } from "../../ui/dist/index33.js";
6
+ import "../../ui/dist/index.js";
3
7
  // ../../libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index46.js
4
- var t = `${e}.bill_detail`, n = { Mounted: `${t}.mounted` };
5
- export { n as BillDetailWidgetAnalyticsEvent, t as WIDGET_NAME };
8
+ var u = {
9
+ subtitle: "Accounts payable",
10
+ vendorRow: "Vendor",
11
+ bankAccountRow: "ACH bank account",
12
+ bankAccountValue: (e) => `Account ending in ${e}`,
13
+ ...r,
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
+ quantityOnlyValue: (e) => e,
22
+ subtotalRow: "Subtotal",
23
+ discountsRow: "Discounts",
24
+ taxRow: "Tax",
25
+ totalRow: "Total",
26
+ actionError: n.actionError,
27
+ actionSuccess: n.actionSuccess,
28
+ scheduledRelativeDay: i,
29
+ scheduledSummary: o,
30
+ scheduledStatusBadge: a,
31
+ awaitingApprovalNotice: e,
32
+ awaitingApprovalUnknownNotice: t,
33
+ paidOnLabel: (e) => `Paid on ${e}`,
34
+ rejectedByOn: (e, t) => `Rejected by ${e} on ${t}`,
35
+ rejectedOn: (e) => `Rejected on ${e}`,
36
+ rejectionMessage: (e) => `"${e}"`,
37
+ sheet: l,
38
+ history: c,
39
+ decisionDialog: n.decisionDialog,
40
+ approvalPolicyCopy: s
41
+ };
42
+ export { u as BILL_DETAILS_LABELS_EN };
@@ -2,63 +2,241 @@
2
2
  "use client";
3
3
  "use client";
4
4
  "use client";
5
- import { useAnalyticsTrack as e } from "../../../../shared/feature/dist/lib/analytics/hooks.js";
6
- import { WidgetProvider as t } from "../../../../shared/feature/dist/lib/WidgetProvider/WidgetProvider.js";
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 "../../../../shared/data-access/dist/index.js";
9
+ import { useWidgetConfig as te } from "../../../../shared/feature/dist/lib/WidgetProvider/hooks.js";
10
+ import { useOrganizationUserNames as n } from "../../../../shared/feature/dist/lib/user/useOrganizationUserNames.js";
7
11
  import "../../../../shared/feature/dist/index.js";
8
- import { BillDialog as n } from "./index41.js";
9
- import "./index42.js";
10
- import { BillDetailsContainer as r } from "./index44.js";
11
- import "./index45.js";
12
- import { BillDetailWidgetAnalyticsEvent as i, WIDGET_NAME as a } from "./index46.js";
13
- import { useEffect as o } from "react";
14
- import { jsx as s } from "react/jsx-runtime";
12
+ import { mergeDecisionDialogCopy as r, mergePaymentHistoryMethodLabels as i } from "../../../util/dist/lib/billDetailLabels.js";
13
+ import { hasSuspectedPayableDuplicate as a } from "../../../util/dist/lib/payableDuplicates.js";
14
+ import "../../../util/dist/index.js";
15
+ import { mapPayableToBillDetails as o } from "./index26.js";
16
+ import { BillDecisionDialog as s } from "../../../ui/dist/index4.js";
17
+ import "../../../ui/dist/index.js";
18
+ import { BillDetailsSheet as c } from "../../ui/dist/index34.js";
19
+ import { BillDuplicateNotice as l } from "../../ui/dist/index37.js";
20
+ import "../../ui/dist/index.js";
21
+ import { useAllPayableLineItemsQuery as u } from "../../data-access/dist/index5.js";
22
+ import { usePayableQuery as d } from "../../data-access/dist/index23.js";
23
+ import "../../data-access/dist/index.js";
24
+ import { buildPaymentHistory as f } from "./index2.js";
25
+ import { canOverrideApprovalPolicy as p, canReadCounterpartBankAccounts as m } from "./index5.js";
26
+ import { useApprovalPolicyCardView as h } from "./index14.js";
27
+ import { resolveApprovalNotices as g } from "./index16.js";
28
+ import { useBillRejectionNotice as ne } from "./index19.js";
29
+ import { useCurrentApprovalRequestId as re } from "./index20.js";
30
+ import { usePayableAuditHistory as ie } from "./index21.js";
31
+ import { usePayableDetailActions as ae } from "./index22.js";
32
+ import { useScheduledDateLabel as oe } from "./index23.js";
33
+ import { useScheduledPayment as se } from "./index24.js";
34
+ import { usePayableAchInstructions as ce } from "../../../../shared/counterpart-management/feature/dist/lib/usePayableAchInstructions.js";
35
+ import "../../../../shared/counterpart-management/feature/dist/index.js";
36
+ import { BILL_DETAILS_LABELS_EN as _ } from "./index46.js";
37
+ import { useMemo as v, useRef as le, useState as ue } from "react";
38
+ import { Fragment as y, jsx as b, jsxs as x } from "react/jsx-runtime";
15
39
  // ../../libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index47.js
16
- function c() {
17
- let t = e();
18
- o(() => {
19
- t(i.Mounted);
20
- }, [t]);
40
+ function S({ open: S, onOpenChange: C, payableId: w, onClose: T, onExpand: E, onEdit: D, testId: O, labels: k, renderPaymentFlows: A }) {
41
+ let j = v(() => ({
42
+ ..._,
43
+ ...k,
44
+ sheet: {
45
+ ..._.sheet,
46
+ ...k?.sheet,
47
+ statusBadge: {
48
+ ..._.sheet.statusBadge,
49
+ ...k?.sheet?.statusBadge
50
+ },
51
+ approvalPolicy: {
52
+ ..._.sheet.approvalPolicy,
53
+ ...k?.sheet?.approvalPolicy
54
+ },
55
+ dueDate: {
56
+ ..._.sheet.dueDate,
57
+ ...k?.sheet?.dueDate
58
+ },
59
+ auditHistory: {
60
+ ..._.sheet.auditHistory,
61
+ ...k?.sheet?.auditHistory
62
+ }
63
+ },
64
+ decisionDialog: r(_.decisionDialog, k?.decisionDialog),
65
+ approvalPolicyCopy: {
66
+ ..._.approvalPolicyCopy,
67
+ ...k?.approvalPolicyCopy
68
+ },
69
+ history: {
70
+ ..._.history,
71
+ ...k?.history
72
+ },
73
+ scheduledRelativeDay: {
74
+ ..._.scheduledRelativeDay,
75
+ ...k?.scheduledRelativeDay
76
+ },
77
+ actionSuccess: {
78
+ ..._.actionSuccess,
79
+ ...k?.actionSuccess
80
+ },
81
+ paymentHistoryMethodLabels: i(k?.paymentHistoryMethodLabels)
82
+ }), [k]), M = d(w, { pollWhilePolicyAssignmentUnsettled: !0 }), N = u(w), P = ee(), { initResponse: F } = te(), I = M.data, L = le(null), [R, z] = ue(!1), B = re({
83
+ payableId: w,
84
+ status: I?.status
85
+ }), V = I?.status === "rejected", H = e(F?.scopes, [t.ApprovalRequestReadOrg]), de = V && H, U = e(F?.scopes, [t.UserReadOrg]), { userNames: W, isError: fe, isResolving: pe } = n({ enabled: U }), G = ne({
86
+ payableId: w,
87
+ payableStatus: I?.status,
88
+ payableUpdatedAt: I?.updated_at,
89
+ enabled: de,
90
+ userNames: W,
91
+ labels: j
92
+ }), K = h({
93
+ payableId: w,
94
+ approvalPolicyId: I?.approval_policy_id,
95
+ status: I?.status,
96
+ updatedAt: I?.updated_at,
97
+ payableFetchedAt: M.dataUpdatedAt,
98
+ copy: j.approvalPolicyCopy
99
+ }), me = p({
100
+ status: I?.status,
101
+ scopes: F?.scopes,
102
+ arePendingApproversUnknown: K.isLoading,
103
+ hasApprovalPolicy: !!I?.approval_policy_id,
104
+ hasWaitingRequest: B.hasWaitingRequest
105
+ }), q = g({
106
+ isCapabilityUnknown: B.isLoading || K.isLoading,
107
+ canApproveNow: !!B.id,
108
+ canOverridePolicy: me,
109
+ status: I?.status,
110
+ hasApprovalPolicy: !!I?.approval_policy_id,
111
+ pendingApproverNames: K.pendingApprovers.flatMap((e) => e.names),
112
+ labels: j
113
+ }), J = se({
114
+ payableId: w,
115
+ scheduledPaymentDate: I?.scheduled_payment_date
116
+ }), Y = m(F?.scopes), X = ce({
117
+ counterpartId: I?.counterpart_id,
118
+ currency: I?.currency,
119
+ currentBankAccountId: I?.counterpart_bank_account_id,
120
+ enabled: Y
121
+ }), { actions: he, decisionDialog: ge } = ae({
122
+ payableId: I ? w : void 0,
123
+ status: I?.status,
124
+ currentApprovalRequestId: B.id,
125
+ hasScheduledPayment: J.hasScheduledPayment,
126
+ scheduledPaymentIntentId: J.scheduledPaymentIntentId,
127
+ isScheduledPaymentUnknown: J.isResolving,
128
+ isPayabilityUnknown: X.isLoading,
129
+ hasApprovalPolicy: !!I?.approval_policy_id,
130
+ hasWaitingRequest: B.hasWaitingRequest,
131
+ pendingApprovers: K.pendingApprovers,
132
+ arePendingApproversUnknown: K.isLoading,
133
+ labels: {
134
+ edit: j.sheet.editButton,
135
+ payBill: j.sheet.payButton,
136
+ markAsPaid: j.sheet.markAsPaidButton,
137
+ reject: j.sheet.rejectButton,
138
+ approve: j.sheet.approveButton,
139
+ cancel: j.sheet.cancelButton,
140
+ cancelScheduledPayment: j.sheet.cancelScheduledPaymentButton,
141
+ reopen: j.sheet.reopenButton,
142
+ forceApprove: j.sheet.forceApproveButton,
143
+ forceReject: j.sheet.forceRejectButton,
144
+ policyOverridesHeading: j.sheet.policyOverridesGroup,
145
+ decisionDialog: j.decisionDialog,
146
+ actionError: j.actionError,
147
+ actionSuccess: j.actionSuccess
148
+ },
149
+ isMarkAsPaidPending: R,
150
+ onMarkAsPaidSelect: () => L.current?.openMarkAsPaid(),
151
+ onPayBillSelect: () => L.current?.openPayBill(),
152
+ onEditSelect: D,
153
+ onActionSucceeded: (e) => {
154
+ e === "reopen" && D?.();
155
+ }
156
+ }), Z = oe({
157
+ hasScheduledPayment: J.hasScheduledPayment,
158
+ scheduledDate: J.scheduledDate,
159
+ labels: j.scheduledRelativeDay
160
+ }), _e = Z ? j.scheduledSummary(Z.label) : void 0, Q = a(I) ? /* @__PURE__ */ b(l, { onOpenFullScreen: E }) : void 0, { historyQuery: $, rows: ve, namesError: ye } = ie({
161
+ payableId: w,
162
+ userNames: W,
163
+ isRosterError: U && fe,
164
+ labels: j.history
165
+ }), be = v(() => f({
166
+ records: J.paymentRecords,
167
+ events: $.data?.data ?? [],
168
+ currencyCode: I?.currency,
169
+ labels: j
170
+ }), [
171
+ J.paymentRecords,
172
+ $.data,
173
+ I?.currency,
174
+ j
175
+ ]), xe = v(() => I ? o({
176
+ payable: I,
177
+ lineItems: N.lineItems,
178
+ ledgerAccounts: P.data?.data ?? [],
179
+ labels: j,
180
+ hasScheduledPayment: J.hasScheduledPayment,
181
+ rejection: G,
182
+ achInstructions: X.achInstructions,
183
+ achInstructionsReadable: Y && !X.isLoading && !X.isError
184
+ }) : void 0, [
185
+ I,
186
+ N.lineItems,
187
+ P.data,
188
+ j,
189
+ J.hasScheduledPayment,
190
+ G,
191
+ X.achInstructions,
192
+ X.isError,
193
+ X.isLoading,
194
+ Y
195
+ ]), Se = M.isLoading || N.isResolving || P.isResolving || X.isLoading, Ce = M.isError || N.isError || P.isError;
196
+ return /* @__PURE__ */ x(y, { children: [
197
+ /* @__PURE__ */ b(c, {
198
+ open: S,
199
+ onOpenChange: C,
200
+ details: xe,
201
+ actions: he,
202
+ approvalPolicy: K.view,
203
+ showApprovalOverrideNotice: q.showApprovalOverrideNotice,
204
+ awaitingApprovalNotice: q.awaitingApprovalNotice,
205
+ scheduledSummary: _e,
206
+ scheduledSummaryDate: Z?.absoluteLabel,
207
+ auditHistory: ve,
208
+ auditHistoryError: $.isError,
209
+ auditHistoryLoading: $.isLoading || pe,
210
+ auditHistoryNamesError: ye,
211
+ paymentHistory: be,
212
+ paymentHistoryError: J.isError || $.isError,
213
+ paymentHistoryLoading: J.isResolving || $.isLoading,
214
+ isLoading: Se,
215
+ isError: Ce,
216
+ notice: Q,
217
+ onClose: T,
218
+ onExpand: E,
219
+ testId: O,
220
+ labels: j.sheet
221
+ }),
222
+ /* @__PURE__ */ b(s, {
223
+ ...ge,
224
+ labels: { cancelButton: j.decisionDialog.cancelButton },
225
+ testId: O ? `${O}-decision-dialog` : void 0,
226
+ confirmTestId: O ? `${O}-decision-confirm` : void 0,
227
+ reasonTestId: O ? `${O}-decision-reason` : void 0,
228
+ reasonFieldId: O ? `${O}-decision-reason-field` : void 0
229
+ }),
230
+ A?.({
231
+ ref: L,
232
+ payable: I,
233
+ payableId: w,
234
+ isPayBillEnabled: !0,
235
+ hasScheduledPayment: J.hasScheduledPayment,
236
+ onMissingAchInstructions: E,
237
+ onMarkAsPaidPendingChange: z,
238
+ testId: O
239
+ })
240
+ ] });
21
241
  }
22
- function l(e) {
23
- return c(), /* @__PURE__ */ s(n, { ...e });
24
- }
25
- function u(e) {
26
- return c(), /* @__PURE__ */ s(r, { ...e });
27
- }
28
- function d({ baseUrl: e, widgetToken: n, organizationId: r, configClient: i, gatewayRouting: o, linkComponent: c, uiFramework: u, errorFallback: d, onError: f, analytics: p, disclosuresAcceptance: m, providerLabels: h, ...g }) {
29
- return /* @__PURE__ */ s(t, {
30
- widgetName: a,
31
- baseUrl: e,
32
- widgetToken: n,
33
- organizationId: r,
34
- configClient: i,
35
- gatewayRouting: o,
36
- linkComponent: c,
37
- uiFramework: u,
38
- errorFallback: d,
39
- onError: f,
40
- analytics: p,
41
- disclosuresAcceptance: m,
42
- providerLabels: h,
43
- children: /* @__PURE__ */ s(l, { ...g })
44
- });
45
- }
46
- function f({ baseUrl: e, widgetToken: n, organizationId: r, configClient: i, gatewayRouting: o, linkComponent: c, uiFramework: l, errorFallback: d, onError: f, analytics: p, disclosuresAcceptance: m, providerLabels: h, ...g }) {
47
- return /* @__PURE__ */ s(t, {
48
- widgetName: a,
49
- baseUrl: e,
50
- widgetToken: n,
51
- organizationId: r,
52
- configClient: i,
53
- gatewayRouting: o,
54
- linkComponent: c,
55
- uiFramework: l,
56
- errorFallback: d,
57
- onError: f,
58
- analytics: p,
59
- disclosuresAcceptance: m,
60
- providerLabels: h,
61
- children: /* @__PURE__ */ s(u, { ...g })
62
- });
63
- }
64
- export { f as BillDetailsWidget, d as BillDialogWidget };
242
+ export { S as BillDetailsContainer, S as default };
@@ -1 +1,3 @@
1
+ import "./index26.js";
2
+ import "./index46.js";
1
3
  import "./index47.js";
@@ -0,0 +1,5 @@
1
+ import { BILL_PAY_WIDGET_NAME as e } from "../../../util/dist/lib/widgetName.js";
2
+ import "../../../util/dist/index.js";
3
+ // ../../libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index49.js
4
+ var t = `${e}.bill_detail`, n = { Mounted: `${t}.mounted` };
5
+ export { n as BillDetailWidgetAnalyticsEvent, t as WIDGET_NAME };
@@ -0,0 +1,64 @@
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 { WidgetProvider as t } from "../../../../shared/feature/dist/lib/WidgetProvider/WidgetProvider.js";
7
+ import "../../../../shared/feature/dist/index.js";
8
+ import { BillDialog as n } from "./index44.js";
9
+ import "./index45.js";
10
+ import { BillDetailsContainer as r } from "./index47.js";
11
+ import "./index48.js";
12
+ import { BillDetailWidgetAnalyticsEvent as i, WIDGET_NAME as a } from "./index49.js";
13
+ import { useEffect as o } from "react";
14
+ import { jsx as s } from "react/jsx-runtime";
15
+ // ../../libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index50.js
16
+ function c() {
17
+ let t = e();
18
+ o(() => {
19
+ t(i.Mounted);
20
+ }, [t]);
21
+ }
22
+ function l(e) {
23
+ return c(), /* @__PURE__ */ s(n, { ...e });
24
+ }
25
+ function u(e) {
26
+ return c(), /* @__PURE__ */ s(r, { ...e });
27
+ }
28
+ function d({ baseUrl: e, widgetToken: n, organizationId: r, configClient: i, gatewayRouting: o, linkComponent: c, uiFramework: u, errorFallback: d, onError: f, analytics: p, disclosuresAcceptance: m, providerLabels: h, ...g }) {
29
+ return /* @__PURE__ */ s(t, {
30
+ widgetName: a,
31
+ baseUrl: e,
32
+ widgetToken: n,
33
+ organizationId: r,
34
+ configClient: i,
35
+ gatewayRouting: o,
36
+ linkComponent: c,
37
+ uiFramework: u,
38
+ errorFallback: d,
39
+ onError: f,
40
+ analytics: p,
41
+ disclosuresAcceptance: m,
42
+ providerLabels: h,
43
+ children: /* @__PURE__ */ s(l, { ...g })
44
+ });
45
+ }
46
+ function f({ baseUrl: e, widgetToken: n, organizationId: r, configClient: i, gatewayRouting: o, linkComponent: c, uiFramework: l, errorFallback: d, onError: f, analytics: p, disclosuresAcceptance: m, providerLabels: h, ...g }) {
47
+ return /* @__PURE__ */ s(t, {
48
+ widgetName: a,
49
+ baseUrl: e,
50
+ widgetToken: n,
51
+ organizationId: r,
52
+ configClient: i,
53
+ gatewayRouting: o,
54
+ linkComponent: c,
55
+ uiFramework: l,
56
+ errorFallback: d,
57
+ onError: f,
58
+ analytics: p,
59
+ disclosuresAcceptance: m,
60
+ providerLabels: h,
61
+ children: /* @__PURE__ */ s(u, { ...g })
62
+ });
63
+ }
64
+ export { f as BillDetailsWidget, d as BillDialogWidget };
@@ -1,49 +1,6 @@
1
- import { ApprovalPoliciesSettingsDefaultLabels as e } from "../../../../shared/approval-policy/feature/dist/lib/labels.js";
2
- import { parseApprovalPolicyScript as t } from "../../../../shared/approval-policy/util/dist/lib/policyScript.js";
3
- import { parseApprovalPolicyTrigger as n } from "../../../../shared/approval-policy/util/dist/lib/policyTrigger.js";
4
- import { buildPolicySentence as r, buildPolicyTitle as i } from "../../../../shared/approval-policy/feature/dist/lib/policyViewModel.js";
5
- import "../../../../shared/approval-policy/feature/dist/index.js";
6
1
  // ../../libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index6.js
7
- var a = {
8
- ruleTitleRange: e.ruleTitleRange,
9
- ruleTitleUpTo: e.ruleTitleUpTo,
10
- ruleTitleFrom: e.ruleTitleFrom,
11
- ruleTitleAny: e.ruleTitleAny,
12
- ruleSentenceRange: e.ruleSentenceRange,
13
- ruleSentenceUpTo: e.ruleSentenceUpTo,
14
- ruleSentenceFrom: e.ruleSentenceFrom,
15
- ruleSentenceAny: e.ruleSentenceAny
16
- };
17
- function o({ policy: a, lookup: o, approvedUserIds: s, approvedRoleIds: c, copy: l }) {
18
- let u = t(a.script);
19
- if (!u.groups.length || !u.isSupported) return;
20
- let d = [];
21
- for (let [e, t] of u.groups.entries()) {
22
- let n = [];
23
- for (let e of [...t.roleIds, ...t.userIds]) {
24
- let t = o.get(e);
25
- t && n.push({
26
- id: e,
27
- label: t.label,
28
- approved: t.kind === "user" ? s.has(e) : !!c?.has(e)
29
- });
30
- }
31
- n.length && d.push({
32
- id: `group-${e + 1}`,
33
- chips: n
34
- });
35
- }
36
- if (!d.length) return;
37
- let { condition: f, hasKnownAmountBounds: p } = n(a.trigger);
38
- if (!p) return;
39
- let m = {
40
- ...e,
41
- ...l
42
- };
43
- return {
44
- title: i(f, m),
45
- sentence: r(f, m),
46
- steps: d
47
- };
2
+ function e(e, t) {
3
+ let n = e ?? [];
4
+ return t ? n.filter((e) => !e.created_at || e.created_at >= t) : n.slice(0, 1);
48
5
  }
49
- export { a as APPROVAL_POLICY_RULE_COPY_EN, o as buildApprovalPolicyCardView };
6
+ export { e as currentApprovalRound };
@@ -1,6 +1,15 @@
1
+ import { currentApprovalRound as e } from "./index6.js";
1
2
  // ../../libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index7.js
2
- function e(e, t) {
3
- let n = e ?? [];
4
- return t ? n.filter((e) => !e.created_at || e.created_at >= t) : n.slice(0, 1);
3
+ function t({ requestsNewestFirst: t, roundStartedAt: n, lookup: r }) {
4
+ let i = e(t, n), a = [];
5
+ for (let e of i) {
6
+ if (e.status !== "waiting") continue;
7
+ let t = [...e.role_ids ?? [], ...e.user_ids ?? []].map((e) => r.get(e)?.label).filter((e) => !!e);
8
+ t.length && a.push({
9
+ id: e.id,
10
+ names: t
11
+ });
12
+ }
13
+ return a;
5
14
  }
6
- export { e as currentApprovalRound };
15
+ export { t as buildPendingApproverGroups };
@@ -1,15 +1,10 @@
1
- import { currentApprovalRound as e } from "./index7.js";
2
1
  // ../../libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index8.js
3
- function t({ requestsNewestFirst: t, roundStartedAt: n, lookup: r }) {
4
- let i = e(t, n), a = [];
5
- for (let e of i) {
6
- if (e.status !== "waiting") continue;
7
- let t = [...e.role_ids ?? [], ...e.user_ids ?? []].map((e) => r.get(e)?.label).filter((e) => !!e);
8
- t.length && a.push({
9
- id: e.id,
10
- names: t
11
- });
12
- }
13
- return a;
2
+ function e(e) {
3
+ let t = [];
4
+ for (let n of e.steps) n.chips.some((e) => e.approved) || t.push({
5
+ id: n.id,
6
+ names: n.chips.map((e) => e.label)
7
+ });
8
+ return t;
14
9
  }
15
- export { t as buildPendingApproverGroups };
10
+ export { e as buildPendingApproverGroupsFromCardView };
@@ -1,10 +1,19 @@
1
+ import { ApprovalPoliciesSettingsDefaultLabels as e } from "../../../../shared/approval-policy/feature/dist/lib/labels.js";
2
+ import "../../../../shared/approval-policy/feature/dist/index.js";
1
3
  // ../../libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index9.js
2
- function e(e) {
3
- let t = [];
4
- for (let n of e.steps) n.chips.some((e) => e.approved) || t.push({
5
- id: n.id,
6
- names: n.chips.map((e) => e.label)
7
- });
8
- return t;
9
- }
10
- export { e as buildPendingApproverGroupsFromCardView };
4
+ var t = {
5
+ deletedBadge: "Deleted",
6
+ deletedNote: "This rule was deleted after this bill was submitted.",
7
+ deletedApprovalsNote: "The approvals below still apply to this bill.",
8
+ noRuleTitle: "No approval rule",
9
+ noRuleSentence: "No rule covered this bill when it was submitted.",
10
+ ruleTitleRange: e.ruleTitleRange,
11
+ ruleTitleUpTo: e.ruleTitleUpTo,
12
+ ruleTitleFrom: e.ruleTitleFrom,
13
+ ruleTitleAny: e.ruleTitleAny,
14
+ ruleSentenceRange: e.ruleSentenceRange,
15
+ ruleSentenceUpTo: e.ruleSentenceUpTo,
16
+ ruleSentenceFrom: e.ruleSentenceFrom,
17
+ ruleSentenceAny: e.ruleSentenceAny
18
+ };
19
+ export { t as APPROVAL_POLICY_RULE_COPY_EN };
@@ -1,54 +1,64 @@
1
- import { Badge as e, Typography as t } from "../../../../../../packages/shared-ui-shadcn/dist/index.js";
2
- import { mergeApprovalPolicyCardLabels as n } from "./index2.js";
3
- import { Fragment as r } from "react";
4
- import { jsx as i, jsxs as a } from "react/jsx-runtime";
5
- import { CheckCircle2Icon as o } from "lucide-react";
1
+ import { Alert as e, AlertDescription as t, Badge as n, Typography as r } from "../../../../../../packages/shared-ui-shadcn/dist/index.js";
2
+ import { mergeApprovalPolicyCardLabels as i } from "./index2.js";
3
+ import { Fragment as a } from "react";
4
+ import { jsx as o, jsxs as s } from "react/jsx-runtime";
5
+ import { CheckCircle2Icon as c, InfoIcon as l } from "lucide-react";
6
6
  // ../../libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/ui/dist/index3.js
7
- var s = "ttw:text-base ttw:font-semibold";
8
- function c({ view: c, labels: l }) {
9
- let u = n(l);
10
- return /* @__PURE__ */ a("section", {
7
+ var u = "ttw:text-base ttw:font-semibold";
8
+ function d({ view: d, labels: f }) {
9
+ let p = i(f);
10
+ return /* @__PURE__ */ s("section", {
11
11
  className: "ttw:flex ttw:flex-col ttw:gap-3",
12
- children: [/* @__PURE__ */ i("h3", {
13
- className: s,
14
- children: u.heading
15
- }), /* @__PURE__ */ a("div", {
12
+ children: [/* @__PURE__ */ o("h3", {
13
+ className: u,
14
+ children: p.heading
15
+ }), /* @__PURE__ */ s("div", {
16
16
  className: "ttw:flex ttw:flex-col ttw:gap-2.5 ttw:rounded-lg ttw:bg-muted ttw:p-4",
17
17
  children: [
18
- /* @__PURE__ */ i(t, {
19
- variant: "body1",
20
- className: "ttw:font-medium",
21
- children: c.title
22
- }),
23
- /* @__PURE__ */ i(t, {
18
+ d.title || d.badge ? /* @__PURE__ */ s("div", {
19
+ className: "ttw:flex ttw:flex-wrap ttw:items-center ttw:gap-2",
20
+ children: [d.title ? /* @__PURE__ */ o(r, {
21
+ variant: "body1",
22
+ className: "ttw:font-medium",
23
+ children: d.title
24
+ }) : null, d.badge ? /* @__PURE__ */ o(n, {
25
+ tone: "neutral",
26
+ children: d.badge
27
+ }) : null]
28
+ }) : null,
29
+ d.note ? /* @__PURE__ */ s(e, {
30
+ variant: "info",
31
+ children: [/* @__PURE__ */ o(l, { "aria-hidden": !0 }), /* @__PURE__ */ o(t, { children: d.note })]
32
+ }) : null,
33
+ d.sentence ? /* @__PURE__ */ o(r, {
24
34
  variant: "body2",
25
35
  color: "muted",
26
- children: c.sentence
27
- }),
28
- c.steps.map((n, s) => /* @__PURE__ */ a(r, { children: [s > 0 ? /* @__PURE__ */ a("div", {
36
+ children: d.sentence
37
+ }) : null,
38
+ d.steps.map((e, t) => /* @__PURE__ */ s(a, { children: [t > 0 ? /* @__PURE__ */ s("div", {
29
39
  className: "ttw:flex ttw:items-center ttw:gap-2.5",
30
- children: [/* @__PURE__ */ i(t, {
40
+ children: [/* @__PURE__ */ o(r, {
31
41
  variant: "caption",
32
42
  color: "muted",
33
- children: u.stepConnector
34
- }), /* @__PURE__ */ i("div", { className: "ttw:h-px ttw:flex-1 ttw:bg-border" })]
35
- }) : null, /* @__PURE__ */ i("div", {
43
+ children: p.stepConnector
44
+ }), /* @__PURE__ */ o("div", { className: "ttw:h-px ttw:flex-1 ttw:bg-border" })]
45
+ }) : null, /* @__PURE__ */ o("div", {
36
46
  className: "ttw:flex ttw:flex-wrap ttw:items-center ttw:gap-1.5",
37
- children: n.chips.map((n, s) => /* @__PURE__ */ a(r, { children: [s > 0 ? /* @__PURE__ */ i(t, {
47
+ children: e.chips.map((e, t) => /* @__PURE__ */ s(a, { children: [t > 0 ? /* @__PURE__ */ o(r, {
38
48
  variant: "body2",
39
49
  color: "muted",
40
- children: u.chipConnector
41
- }) : null, /* @__PURE__ */ a(e, {
50
+ children: p.chipConnector
51
+ }) : null, /* @__PURE__ */ s(n, {
42
52
  variant: "outline",
43
53
  className: "ttw:flex ttw:items-center ttw:gap-1",
44
- children: [n.label, n.approved ? /* @__PURE__ */ i(o, {
45
- "aria-label": u.approvedIndicator,
54
+ children: [e.label, e.approved ? /* @__PURE__ */ o(c, {
55
+ "aria-label": p.approvedIndicator,
46
56
  className: "ttw:size-3.5 ttw:text-emerald-600"
47
57
  }) : null]
48
- })] }, n.id))
49
- })] }, n.id))
58
+ })] }, e.id))
59
+ })] }, e.id))
50
60
  ]
51
61
  })]
52
62
  });
53
63
  }
54
- export { c as ApprovalPolicyCard, c as default };
64
+ export { d as ApprovalPolicyCard, d as default };