@tesouro/embedded-components-react 0.11.188 → 0.11.190

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/README.md +12 -8
  2. package/dist/fixtures/index.d.ts +13 -46
  3. package/dist/index.css +3 -0
  4. package/dist/index.d.ts +18 -1
  5. package/dist/index.js +40 -39
  6. package/dist/lib/BankAccountsWidget.d.ts +2 -0
  7. package/dist/lib/BillPayWidget.d.ts +16 -1
  8. package/dist/lib/BillPayWidget.js +3 -1
  9. package/dist/lib/WidgetSuite.d.ts +2 -0
  10. package/dist/libs/tesouro-embedded-components-react/balance-history-widget/feature/dist/lib/BalanceHistoryWidget/BalanceHistoryWidgetFeature.js +2 -2
  11. package/dist/libs/tesouro-embedded-components-react/balances-widget/feature/dist/lib/BalancesWidget/BalancesWidgetContext.js +2 -2
  12. package/dist/libs/tesouro-embedded-components-react/bank-accounts-widget/account-details/ui/dist/index2.js +17 -14
  13. package/dist/libs/tesouro-embedded-components-react/bank-accounts-widget/feature/dist/lib/formatters.js +1 -1
  14. package/dist/libs/tesouro-embedded-components-react/bank-accounts-widget/feature/dist/lib/labels.js +2 -0
  15. package/dist/libs/tesouro-embedded-components-react/bank-accounts-widget/feature/dist/lib/useBankAccountsWidget.js +9 -3
  16. package/dist/libs/tesouro-embedded-components-react/bank-accounts-widget/ui/dist/lib/AccountCard.js +76 -58
  17. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index27.js +4 -4
  18. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index32.js +8 -8
  19. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index35.js +1 -1
  20. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index36.js +180 -180
  21. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index45.js +62 -62
  22. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index48.js +32 -32
  23. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/ui/dist/index14.js +7 -7
  24. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/ui/dist/index15.js +20 -20
  25. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/ui/dist/index33.js +5 -5
  26. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/ui/dist/index34.js +16 -16
  27. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/ui/dist/index37.js +7 -7
  28. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bills-list/feature/dist/index.js +3 -1
  29. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bills-list/feature/dist/index10.js +101 -58
  30. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bills-list/feature/dist/index11.js +19 -17
  31. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bills-list/feature/dist/index14.js +2 -0
  32. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bills-list/feature/dist/index15.js +169 -138
  33. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bills-list/feature/dist/index17.js +227 -204
  34. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bills-list/feature/dist/index18.js +208 -204
  35. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bills-list/feature/dist/index19.js +1 -0
  36. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bills-list/ui/dist/index21.js +10 -10
  37. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bills-list/ui/dist/index23.js +212 -212
  38. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bills-list/ui/dist/index9.js +9 -5
  39. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index.js +3 -1
  40. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/lib/BillPayWidget/BillPayWidget.js +43 -39
  41. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/lib/BillPayWidget/BillsTab.js +66 -64
  42. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/lib/BillPayWidget/index.js +1 -0
  43. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/pay-bill/feature/dist/index8.js +1 -1
  44. package/dist/libs/tesouro-embedded-components-react/counterparts-widget/feature/dist/lib/CounterpartsWidget/viewModels.js +9 -9
  45. package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/feature/dist/index.js +5 -5
  46. package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/feature/dist/lib/helpers.js +21 -21
  47. package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/rest/@tanstack/react-query.gen.js +20 -20
  48. package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/rest/sdk.gen.js +17 -17
  49. package/dist/libs/tesouro-embedded-components-react/shared/document-status/ui/dist/index7.js +4 -4
  50. package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/analytics/build-info.js +1 -1
  51. package/dist/libs/tesouro-embedded-components-react/transfers-widget/feature/dist/lib/TransfersWidget/TransfersWidgetInner.js +77 -77
  52. package/dist/libs/tesouro-embedded-components-react/transfers-widget/feature/dist/lib/TransfersWidget/transferViews.js +2 -2
  53. package/dist/libs/tesouro-embedded-components-react/transfers-widget/feature/dist/lib/TransfersWidget/useTransferMoneyModalController.js +129 -122
  54. package/dist/packages/shared-ui-shadcn/dist/index.js +1 -1
  55. package/package.json +1 -1
@@ -15,41 +15,41 @@ import "../../../../shared/feature/dist/index.js";
15
15
  import { isEditablePayableStatus as ie } from "../../../util/dist/lib/isEditablePayableStatus.js";
16
16
  import { resolveVendor as ae } from "../../../util/dist/lib/resolveVendor.js";
17
17
  import "../../../util/dist/index.js";
18
- import { formatGlCodeLabel as oe, resolveGlCodeAvailability as se } from "./index16.js";
19
- import { hasUnpaidBalance as ce } from "../../../../shared/document-status/util/dist/lib/derivePayableStatus.js";
20
18
  import { BillDecisionDialog as r } from "../../../ui/dist/index4.js";
21
19
  import "../../../ui/dist/index.js";
22
- import { BillDialogScreen as le } from "../../ui/dist/index31.js";
23
- import { BillDuplicateNotice as ue } from "../../ui/dist/index37.js";
24
- import { BillRejectedBanner as de } from "../../ui/dist/index40.js";
25
- import { DiscardChangesDialog as fe } from "../../ui/dist/index43.js";
26
- import { ExtractionNotice as pe } from "../../ui/dist/index46.js";
27
- import { UnsavedBillDialog as me } from "../../ui/dist/index52.js";
20
+ import { hasUnpaidBalance as oe } from "../../../../shared/document-status/util/dist/lib/derivePayableStatus.js";
21
+ import { usePayableAchInstructions as se } from "../../../../shared/counterpart-management/feature/dist/lib/usePayableAchInstructions.js";
22
+ import "../../../../shared/counterpart-management/feature/dist/index.js";
23
+ import { formatGlCodeLabel as ce, resolveGlCodeAvailability as le } from "./index16.js";
24
+ import { BillDialogScreen as ue } from "../../ui/dist/index31.js";
25
+ import { BillDuplicateNotice as de } from "../../ui/dist/index37.js";
26
+ import { BillRejectedBanner as fe } from "../../ui/dist/index40.js";
27
+ import { DiscardChangesDialog as pe } from "../../ui/dist/index43.js";
28
+ import { ExtractionNotice as me } from "../../ui/dist/index46.js";
29
+ import { UnsavedBillDialog as he } from "../../ui/dist/index52.js";
28
30
  import "../../ui/dist/index.js";
29
- import { BILL_CREATE_MESSAGE_LABELS_EN as he, mergeBillDialogCopy as ge } from "./index32.js";
30
- import { useAllPayableLineItemsQuery as _e } from "../../data-access/dist/index6.js";
31
- import { usePayableQuery as ve } from "../../data-access/dist/index24.js";
31
+ import { BILL_CREATE_MESSAGE_LABELS_EN as ge, mergeBillDialogCopy as _e } from "./index32.js";
32
+ import { useAllPayableLineItemsQuery as ve } from "../../data-access/dist/index6.js";
33
+ import { usePayableQuery as ye } from "../../data-access/dist/index24.js";
32
34
  import "../../data-access/dist/index.js";
33
- import { useBillCreateController as ye } from "./index41.js";
34
- import { useBillForm as be } from "./index43.js";
35
- import { buildPaymentHistory as xe } from "./index2.js";
36
- import { usePayableDuplicateReview as Se } from "./index4.js";
37
- import { canOverrideApprovalPolicy as Ce, canReadCounterpartBankAccounts as we } from "./index5.js";
38
- import { useApprovalPolicyCardView as Te } from "./index15.js";
39
- import { resolveApprovalNotices as Ee } from "./index17.js";
40
- import { resolvePaymentInstructionsGestures as De } from "./index18.js";
41
- import { useBillRejectionNotice as Oe } from "./index20.js";
42
- import { useCurrentApprovalRequestId as ke } from "./index21.js";
43
- import { usePayableAuditHistory as Ae } from "./index22.js";
44
- import { usePayableDetailActions as je } from "./index23.js";
45
- import { useScheduledDateLabel as Me } from "./index24.js";
46
- import { useScheduledPayment as Ne } from "./index25.js";
47
- import { useDraftDelete as Pe } from "./index26.js";
48
- import { buildBillDetailView as Fe } from "./index28.js";
49
- import { resolveEditorDismissal as Ie } from "./index29.js";
50
- import { SourceDocumentContainer as Le } from "./index33.js";
51
- import { usePayableAchInstructions as Re } from "../../../../shared/counterpart-management/feature/dist/lib/usePayableAchInstructions.js";
52
- import "../../../../shared/counterpart-management/feature/dist/index.js";
35
+ import { useBillCreateController as be } from "./index41.js";
36
+ import { useBillForm as xe } from "./index43.js";
37
+ import { buildPaymentHistory as Se } from "./index2.js";
38
+ import { usePayableDuplicateReview as Ce } from "./index4.js";
39
+ import { canOverrideApprovalPolicy as we, canReadCounterpartBankAccounts as Te } from "./index5.js";
40
+ import { useApprovalPolicyCardView as Ee } from "./index15.js";
41
+ import { resolveApprovalNotices as De } from "./index17.js";
42
+ import { resolvePaymentInstructionsGestures as Oe } from "./index18.js";
43
+ import { useBillRejectionNotice as ke } from "./index20.js";
44
+ import { useCurrentApprovalRequestId as Ae } from "./index21.js";
45
+ import { usePayableAuditHistory as je } from "./index22.js";
46
+ import { usePayableDetailActions as Me } from "./index23.js";
47
+ import { useScheduledDateLabel as Ne } from "./index24.js";
48
+ import { useScheduledPayment as Pe } from "./index25.js";
49
+ import { useDraftDelete as Fe } from "./index26.js";
50
+ import { buildBillDetailView as Ie } from "./index28.js";
51
+ import { resolveEditorDismissal as Le } from "./index29.js";
52
+ import { SourceDocumentContainer as Re } from "./index33.js";
53
53
  import { useVendorSectionProps as ze } from "./index36.js";
54
54
  import { usePayToSave as Be } from "./index37.js";
55
55
  import { billDialogTestIds as i } from "./index44.js";
@@ -58,15 +58,15 @@ import { Fragment as Ue, jsx as c, jsxs as We } from "react/jsx-runtime";
58
58
  import { Trash2Icon as Ge } from "lucide-react";
59
59
  // ../../libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index45.js
60
60
  function Ke({ open: Ke, onOpenChange: l, payableId: qe, initialCounterpartId: Je, readOnly: u = !1, copy: d, onCollapse: Ye, onEdit: Xe, onOpenBill: f, renderPaymentFlows: Ze }) {
61
- let p = o(() => ge(d), [d]), m = d?.messages, h = o(() => ({
62
- ...he,
61
+ let p = o(() => _e(d), [d]), m = d?.messages, h = o(() => ({
62
+ ...ge,
63
63
  ...m
64
64
  }), [m]), Qe = qe ? void 0 : Je, [g, $e] = s(Qe), [_, et] = s(!!Qe), [tt, nt] = s(!1), [v, y] = s(!1), [rt, b] = s(), x = a((e) => {
65
65
  b(() => e);
66
- }, []), [it, at] = s(), S = qe ?? it, C = ve(S, {
66
+ }, []), [it, at] = s(), S = qe ?? it, C = ye(S, {
67
67
  pollWhileOcrProcessing: !0,
68
68
  pollWhilePolicyAssignmentUnsettled: !0
69
- }), w = _e(S), { initResponse: T } = te(), ot = !!T, st = t(T?.scopes, [n.AccountingConfigReadOrg]), E = ee({ enabled: st }), D = C.data, O = !S || !!D, k = !u && O && !!S && D?.status !== "draft", ct = !u && !!D && !ie(D?.status), A = u || ct, j = be({
69
+ }), w = ve(S), { initResponse: T } = te(), ot = !!T, st = t(T?.scopes, [n.AccountingConfigReadOrg]), E = ee({ enabled: st }), D = C.data, O = !S || !!D, k = !u && O && !!S && D?.status !== "draft", ct = !u && !!D && !ie(D?.status), A = u || ct, j = xe({
70
70
  payable: D,
71
71
  lineItems: w.lineItems,
72
72
  labels: h
@@ -76,15 +76,15 @@ function Ke({ open: Ke, onOpenChange: l, payableId: qe, initialCounterpartId: Je
76
76
  }, [_, M]);
77
77
  let lt = a((e) => {
78
78
  et(!0), $e(e);
79
- }, []), N = Ne({
79
+ }, []), N = Pe({
80
80
  payableId: S,
81
81
  scheduledPaymentDate: D?.scheduled_payment_date,
82
82
  enabled: u || k
83
- }), P = Me({
83
+ }), P = Ne({
84
84
  hasScheduledPayment: N.hasScheduledPayment,
85
85
  scheduledDate: N.scheduledDate,
86
86
  labels: p.scheduledRelativeDay
87
- }), F = we(T?.scopes), ut = t(T?.scopes, [n.PayableWriteOrg]), I = t(T?.scopes, [n.CounterpartWriteOrg]) && ut, L = I && ce(D?.status) && !N.hasScheduledPayment && !N.isResolving, dt = L && F, ft = L || I && D?.status === "rejected", pt = !u && O && (!S || D?.status === "draft") && !N.hasScheduledPayment && !N.isResolving, R = ze({
87
+ }), F = Te(T?.scopes), ut = t(T?.scopes, [n.PayableWriteOrg]), I = t(T?.scopes, [n.CounterpartWriteOrg]) && ut, L = I && oe(D?.status) && !N.hasScheduledPayment && !N.isResolving, dt = L && F, ft = L || I && D?.status === "rejected", pt = !u && O && (!S || D?.status === "draft") && !N.hasScheduledPayment && !N.isResolving, R = ze({
88
88
  payableId: S,
89
89
  counterpartId: u ? M : g,
90
90
  payableCounterpartId: M,
@@ -118,7 +118,7 @@ function Ke({ open: Ke, onOpenChange: l, payableId: qe, initialCounterpartId: Je
118
118
  k,
119
119
  m,
120
120
  h.submittedSaved
121
- ]), V = ye({
121
+ ]), V = be({
122
122
  payableId: qe,
123
123
  form: j,
124
124
  labels: vt,
@@ -132,15 +132,15 @@ function Ke({ open: Ke, onOpenChange: l, payableId: qe, initialCounterpartId: Je
132
132
  onDraftSaved: () => l(!1),
133
133
  onFinalized: () => l(!1),
134
134
  readSavedStatus: k ? gt : void 0
135
- }), yt = !!(V.isSavingDraft || V.isFinalizing || R.isVendorSavePending), H = u ? S : void 0, U = ke({
135
+ }), yt = !!(V.isSavingDraft || V.isFinalizing || R.isVendorSavePending), H = u ? S : void 0, U = Ae({
136
136
  payableId: H,
137
137
  status: D?.status
138
- }), W = He(null), [bt, xt] = s(!1), St = ae(D), G = Re({
138
+ }), W = He(null), [bt, xt] = s(!1), St = ae(D), G = se({
139
139
  counterpartId: u ? M : void 0,
140
140
  currency: D?.currency,
141
141
  currentBankAccountId: u ? D?.counterpart_bank_account_id ?? void 0 : void 0,
142
142
  enabled: F && u
143
- }), K = Te({
143
+ }), K = Ee({
144
144
  payableId: H,
145
145
  approvalPolicyId: D?.approval_policy_id,
146
146
  status: D?.status,
@@ -148,13 +148,13 @@ function Ke({ open: Ke, onOpenChange: l, payableId: qe, initialCounterpartId: Je
148
148
  payableFetchedAt: C.dataUpdatedAt,
149
149
  enabled: u,
150
150
  copy: p.approvalPolicyCopy
151
- }), Ct = Ce({
151
+ }), Ct = we({
152
152
  status: D?.status,
153
153
  scopes: T?.scopes,
154
154
  arePendingApproversUnknown: K.isLoading,
155
155
  hasApprovalPolicy: !!D?.approval_policy_id,
156
156
  hasWaitingRequest: U.hasWaitingRequest
157
- }), wt = Ee({
157
+ }), wt = De({
158
158
  isCapabilityUnknown: U.isLoading || K.isLoading,
159
159
  canApproveNow: !!U.id,
160
160
  canOverridePolicy: Ct,
@@ -167,7 +167,7 @@ function Ke({ open: Ke, onOpenChange: l, payableId: qe, initialCounterpartId: Je
167
167
  R.discardPayToEdits(), e?.();
168
168
  };
169
169
  R.hasUnsavedVendorChanges ? x(t) : t();
170
- }, [x, R]), { actions: Dt, decisionDialog: Ot, isActionPending: kt } = je({
170
+ }, [x, R]), { actions: Dt, decisionDialog: Ot, isActionPending: kt } = Me({
171
171
  payableId: Tt,
172
172
  status: D?.status,
173
173
  currentApprovalRequestId: U.id,
@@ -187,7 +187,7 @@ function Ke({ open: Ke, onOpenChange: l, payableId: qe, initialCounterpartId: Je
187
187
  onActionSucceeded: (e) => {
188
188
  e === "reopen" ? Et?.() : k && l(!1);
189
189
  }
190
- }), At = Pe({
190
+ }), At = Fe({
191
191
  payableId: S,
192
192
  status: D?.status,
193
193
  enabled: !u,
@@ -209,27 +209,27 @@ function Ke({ open: Ke, onOpenChange: l, payableId: qe, initialCounterpartId: Je
209
209
  Ft
210
210
  ]), J = o(() => (E.data?.data ?? []).map((e) => ({
211
211
  value: e.id,
212
- label: oe(e)
213
- })), [E.data]), { unavailableMessage: Lt, disabled: Rt, rosterAvailable: zt } = se({
212
+ label: ce(e)
213
+ })), [E.data]), { unavailableMessage: Lt, disabled: Rt, rosterAvailable: zt } = le({
214
214
  isInitResolved: ot,
215
215
  canReadGlCodes: st,
216
216
  isResolving: E.isResolving,
217
217
  isError: E.isError,
218
218
  optionCount: J.length,
219
219
  labels: p.lineItemsGlCodeUnavailable
220
- }), Bt = D?.status === "rejected" || !u && k, Vt = t(T?.scopes, [n.ApprovalRequestReadOrg]), Ht = Bt && Vt, Ut = t(T?.scopes, [n.UserReadOrg]), { userNames: Wt, isError: Gt, isResolving: Kt } = ne({ enabled: (u || Bt) && Ut }), { historyQuery: Y, rows: qt, namesError: Jt } = Ae({
220
+ }), Bt = D?.status === "rejected" || !u && k, Vt = t(T?.scopes, [n.ApprovalRequestReadOrg]), Ht = Bt && Vt, Ut = t(T?.scopes, [n.UserReadOrg]), { userNames: Wt, isError: Gt, isResolving: Kt } = ne({ enabled: (u || Bt) && Ut }), { historyQuery: Y, rows: qt, namesError: Jt } = je({
221
221
  payableId: H,
222
222
  userNames: Wt,
223
223
  isRosterError: Ut && Gt,
224
224
  labels: p.history
225
- }), X = Oe({
225
+ }), X = ke({
226
226
  payableId: S,
227
227
  payableStatus: D?.status,
228
228
  payableUpdatedAt: D?.updated_at,
229
229
  enabled: Ht,
230
230
  userNames: Wt,
231
231
  labels: p.detail
232
- }), Yt = o(() => xe({
232
+ }), Yt = o(() => Se({
233
233
  records: N.paymentRecords,
234
234
  events: Y.data?.data ?? [],
235
235
  currencyCode: D?.currency,
@@ -241,7 +241,7 @@ function Ke({ open: Ke, onOpenChange: l, payableId: qe, initialCounterpartId: Je
241
241
  p.detail
242
242
  ]), Xt = re(), Zt = o(() => {
243
243
  if (!u || !D) return;
244
- let e = Fe({
244
+ let e = Ie({
245
245
  payable: D,
246
246
  lineItems: w.lineItems,
247
247
  glCodeOptions: J,
@@ -282,7 +282,7 @@ function Ke({ open: Ke, onOpenChange: l, payableId: qe, initialCounterpartId: Je
282
282
  R.summary
283
283
  ]), Qt = D?.source_of_payable_data === "ocr", Z = St?.name, $t = u ? Z ? p.viewTitle(Z) : p.readOnlyTitle : Z && (Qt || k) ? p.extractedTitle(Z) : p.newTitle, en = u && D?.created_at ? p.addedOn(e(D.created_at.slice(0, 10))) : void 0, Q = j.isDirty || R.hasUnsavedVendorChanges || !!V.stagedFile || V.isFileDeletionPending, tn = a(() => {
284
284
  if (u && R.isEditingPayTo) q(() => l(!1));
285
- else switch (Ie({
285
+ else switch (Le({
286
286
  isUnsavedPromptOpen: v,
287
287
  isLocked: A,
288
288
  isDirty: Q
@@ -331,7 +331,7 @@ function Ke({ open: Ke, onOpenChange: l, payableId: qe, initialCounterpartId: Je
331
331
  V,
332
332
  on,
333
333
  l
334
- ]), $ = Se({
334
+ ]), $ = Ce({
335
335
  payable: D,
336
336
  onOpenPayable: f ? nn : void 0,
337
337
  onRemoved: () => l(!1),
@@ -344,11 +344,11 @@ function Ke({ open: Ke, onOpenChange: l, payableId: qe, initialCounterpartId: Je
344
344
  tn,
345
345
  l
346
346
  ]), ln = $.isPossibleDuplicate, un = !u && Qt && !tt, dn = !u && !!X, fn = dn || ln || un ? /* @__PURE__ */ We(Ue, { children: [
347
- dn && X ? /* @__PURE__ */ c(de, {
347
+ dn && X ? /* @__PURE__ */ c(fe, {
348
348
  ...X,
349
349
  labels: p.rejectedBanner
350
350
  }) : null,
351
- ln ? /* @__PURE__ */ c(ue, {
351
+ ln ? /* @__PURE__ */ c(de, {
352
352
  title: $.title,
353
353
  meta: $.meta,
354
354
  onNotADuplicate: $.onNotADuplicate,
@@ -361,13 +361,13 @@ function Ke({ open: Ke, onOpenChange: l, payableId: qe, initialCounterpartId: Je
361
361
  labels: $.removeBillLabel ? { removeBillButton: $.removeBillLabel } : void 0,
362
362
  testId: i.duplicateNotice
363
363
  }) : null,
364
- un ? /* @__PURE__ */ c(pe, {
364
+ un ? /* @__PURE__ */ c(me, {
365
365
  onDismiss: () => nt(!0),
366
366
  labels: d?.extractionNotice
367
367
  }) : null
368
368
  ] }) : void 0;
369
369
  return /* @__PURE__ */ We(Ue, { children: [
370
- /* @__PURE__ */ c(le, {
370
+ /* @__PURE__ */ c(ue, {
371
371
  open: Ke,
372
372
  onOpenChange: cn,
373
373
  title: $t,
@@ -399,7 +399,7 @@ function Ke({ open: Ke, onOpenChange: l, payableId: qe, initialCounterpartId: Je
399
399
  totalsErrors: j.totalsErrors,
400
400
  testId: i.lineItems
401
401
  },
402
- documentPanel: /* @__PURE__ */ c(Le, {
402
+ documentPanel: /* @__PURE__ */ c(Re, {
403
403
  payableId: S,
404
404
  readOnly: A,
405
405
  isDocumentPending: !!S && !D?.file && (C.isLoading || D?.ocr_status === "processing"),
@@ -435,7 +435,7 @@ function Ke({ open: Ke, onOpenChange: l, payableId: qe, initialCounterpartId: Je
435
435
  ...wt,
436
436
  payTo: {
437
437
  onEdit: B.mode === "resolved" ? B.onEdit : void 0,
438
- paymentInstructions: D?.status === "paid" || D?.status === "canceled" ? void 0 : De(B.paymentInstructionsEditor, !!Zt?.payTo.hasPaymentInstructions),
438
+ paymentInstructions: D?.status === "paid" || D?.status === "canceled" ? void 0 : Oe(B.paymentInstructionsEditor, !!Zt?.payTo.hasPaymentInstructions),
439
439
  detailsWarning: B.detailsWarning,
440
440
  editForm: B.mode === "creating" ? B.newVendorForm : void 0
441
441
  },
@@ -460,7 +460,7 @@ function Ke({ open: Ke, onOpenChange: l, payableId: qe, initialCounterpartId: Je
460
460
  testId: i.dialog,
461
461
  labels: d?.screen
462
462
  }),
463
- /* @__PURE__ */ c(me, {
463
+ /* @__PURE__ */ c(he, {
464
464
  open: v,
465
465
  onSaveDraft: sn,
466
466
  onDiscard: an,
@@ -473,7 +473,7 @@ function Ke({ open: Ke, onOpenChange: l, payableId: qe, initialCounterpartId: Je
473
473
  discardTestId: i.unsavedDiscard,
474
474
  closeTestId: i.unsavedClose
475
475
  }),
476
- /* @__PURE__ */ c(fe, {
476
+ /* @__PURE__ */ c(pe, {
477
477
  open: !!rt,
478
478
  onDiscard: () => {
479
479
  let e = rt;
@@ -13,27 +13,27 @@ import "../../../../shared/feature/dist/index.js";
13
13
  import { mergeDecisionDialogCopy as i, mergePaymentHistoryMethodLabels as a } from "../../../util/dist/lib/billDetailLabels.js";
14
14
  import { hasSuspectedPayableDuplicate as o } from "../../../util/dist/lib/payableDuplicates.js";
15
15
  import "../../../util/dist/index.js";
16
- import { mapPayableToBillDetails as s } from "./index27.js";
17
- import { BillDecisionDialog as c } from "../../../ui/dist/index4.js";
16
+ import { BillDecisionDialog as s } from "../../../ui/dist/index4.js";
18
17
  import "../../../ui/dist/index.js";
19
- import { BillDetailsSheet as l } from "../../ui/dist/index34.js";
20
- import { BillDuplicateNotice as u } from "../../ui/dist/index37.js";
18
+ import { usePayableAchInstructions as c } from "../../../../shared/counterpart-management/feature/dist/lib/usePayableAchInstructions.js";
19
+ import "../../../../shared/counterpart-management/feature/dist/index.js";
20
+ import { mapPayableToBillDetails as l } from "./index27.js";
21
+ import { BillDetailsSheet as u } from "../../ui/dist/index34.js";
22
+ import { BillDuplicateNotice as d } from "../../ui/dist/index37.js";
21
23
  import "../../ui/dist/index.js";
22
- import { useAllPayableLineItemsQuery as d } from "../../data-access/dist/index6.js";
23
- import { usePayableQuery as f } from "../../data-access/dist/index24.js";
24
+ import { useAllPayableLineItemsQuery as f } from "../../data-access/dist/index6.js";
25
+ import { usePayableQuery as p } from "../../data-access/dist/index24.js";
24
26
  import "../../data-access/dist/index.js";
25
- import { buildPaymentHistory as p } from "./index2.js";
26
- import { canOverrideApprovalPolicy as m, canReadCounterpartBankAccounts as h } from "./index5.js";
27
- import { useApprovalPolicyCardView as g } from "./index15.js";
28
- import { resolveApprovalNotices as ne } from "./index17.js";
29
- import { useBillRejectionNotice as re } from "./index20.js";
30
- import { useCurrentApprovalRequestId as ie } from "./index21.js";
31
- import { usePayableAuditHistory as ae } from "./index22.js";
32
- import { usePayableDetailActions as oe } from "./index23.js";
33
- import { useScheduledDateLabel as se } from "./index24.js";
34
- import { useScheduledPayment as ce } from "./index25.js";
35
- import { usePayableAchInstructions as le } from "../../../../shared/counterpart-management/feature/dist/lib/usePayableAchInstructions.js";
36
- import "../../../../shared/counterpart-management/feature/dist/index.js";
27
+ import { buildPaymentHistory as m } from "./index2.js";
28
+ import { canOverrideApprovalPolicy as h, canReadCounterpartBankAccounts as g } from "./index5.js";
29
+ import { useApprovalPolicyCardView as ne } from "./index15.js";
30
+ import { resolveApprovalNotices as re } from "./index17.js";
31
+ import { useBillRejectionNotice as ie } from "./index20.js";
32
+ import { useCurrentApprovalRequestId as ae } from "./index21.js";
33
+ import { usePayableAuditHistory as oe } from "./index22.js";
34
+ import { usePayableDetailActions as se } from "./index23.js";
35
+ import { useScheduledDateLabel as ce } from "./index24.js";
36
+ import { useScheduledPayment as le } from "./index25.js";
37
37
  import { BILL_DETAILS_LABELS_EN as _ } from "./index47.js";
38
38
  import { useMemo as v, useRef as ue, useState as de } from "react";
39
39
  import { Fragment as fe, jsx as y, jsxs as b } from "react/jsx-runtime";
@@ -80,30 +80,30 @@ function x({ open: x, onOpenChange: S, payableId: C, onClose: w, onExpand: T, on
80
80
  ...O?.actionSuccess
81
81
  },
82
82
  paymentHistoryMethodLabels: a(O?.paymentHistoryMethodLabels)
83
- }), [O]), j = f(C, { pollWhilePolicyAssignmentUnsettled: !0 }), M = d(C), N = ee(), { initResponse: P } = te(), F = j.data, I = ue(null), [L, R] = de(!1), z = ie({
83
+ }), [O]), j = p(C, { pollWhilePolicyAssignmentUnsettled: !0 }), M = f(C), N = ee(), { initResponse: P } = te(), F = j.data, I = ue(null), [L, R] = de(!1), z = ae({
84
84
  payableId: C,
85
85
  status: F?.status
86
- }), B = F?.status === "rejected", V = e(P?.scopes, [t.ApprovalRequestReadOrg]), pe = B && V, H = e(P?.scopes, [t.UserReadOrg]), { userNames: U, isError: me, isResolving: he } = n({ enabled: H }), W = re({
86
+ }), B = F?.status === "rejected", V = e(P?.scopes, [t.ApprovalRequestReadOrg]), pe = B && V, H = e(P?.scopes, [t.UserReadOrg]), { userNames: U, isError: me, isResolving: he } = n({ enabled: H }), W = ie({
87
87
  payableId: C,
88
88
  payableStatus: F?.status,
89
89
  payableUpdatedAt: F?.updated_at,
90
90
  enabled: pe,
91
91
  userNames: U,
92
92
  labels: A
93
- }), G = g({
93
+ }), G = ne({
94
94
  payableId: C,
95
95
  approvalPolicyId: F?.approval_policy_id,
96
96
  status: F?.status,
97
97
  updatedAt: F?.updated_at,
98
98
  payableFetchedAt: j.dataUpdatedAt,
99
99
  copy: A.approvalPolicyCopy
100
- }), ge = m({
100
+ }), ge = h({
101
101
  status: F?.status,
102
102
  scopes: P?.scopes,
103
103
  arePendingApproversUnknown: G.isLoading,
104
104
  hasApprovalPolicy: !!F?.approval_policy_id,
105
105
  hasWaitingRequest: z.hasWaitingRequest
106
- }), K = ne({
106
+ }), K = re({
107
107
  isCapabilityUnknown: z.isLoading || G.isLoading,
108
108
  canApproveNow: !!z.id,
109
109
  canOverridePolicy: ge,
@@ -111,15 +111,15 @@ function x({ open: x, onOpenChange: S, payableId: C, onClose: w, onExpand: T, on
111
111
  hasApprovalPolicy: !!F?.approval_policy_id,
112
112
  pendingApproverNames: G.pendingApprovers.flatMap((e) => e.names),
113
113
  labels: A
114
- }), q = ce({
114
+ }), q = le({
115
115
  payableId: C,
116
116
  scheduledPaymentDate: F?.scheduled_payment_date
117
- }), J = h(P?.scopes), Y = le({
117
+ }), J = g(P?.scopes), Y = c({
118
118
  counterpartId: F?.counterpart_id,
119
119
  currency: F?.currency,
120
120
  currentBankAccountId: F?.counterpart_bank_account_id,
121
121
  enabled: J
122
- }), { actions: _e, decisionDialog: ve } = oe({
122
+ }), { actions: _e, decisionDialog: ve } = se({
123
123
  payableId: F ? C : void 0,
124
124
  status: F?.status,
125
125
  currentApprovalRequestId: z.id,
@@ -154,16 +154,16 @@ function x({ open: x, onOpenChange: S, payableId: C, onClose: w, onExpand: T, on
154
154
  onActionSucceeded: (e) => {
155
155
  e === "reopen" && E?.();
156
156
  }
157
- }), X = se({
157
+ }), X = ce({
158
158
  hasScheduledPayment: q.hasScheduledPayment,
159
159
  scheduledDate: q.scheduledDate,
160
160
  labels: A.scheduledRelativeDay
161
- }), ye = X ? A.scheduledSummary(X.label) : void 0, be = o(F) ? /* @__PURE__ */ y(u, { onOpenFullScreen: T }) : void 0, { historyQuery: Z, rows: xe, namesError: Q } = ae({
161
+ }), ye = X ? A.scheduledSummary(X.label) : void 0, be = o(F) ? /* @__PURE__ */ y(d, { onOpenFullScreen: T }) : void 0, { historyQuery: Z, rows: xe, namesError: Q } = oe({
162
162
  payableId: C,
163
163
  userNames: U,
164
164
  isRosterError: H && me,
165
165
  labels: A.history
166
- }), Se = v(() => p({
166
+ }), Se = v(() => m({
167
167
  records: q.paymentRecords,
168
168
  events: Z.data?.data ?? [],
169
169
  currencyCode: F?.currency,
@@ -173,7 +173,7 @@ function x({ open: x, onOpenChange: S, payableId: C, onClose: w, onExpand: T, on
173
173
  Z.data,
174
174
  F?.currency,
175
175
  A
176
- ]), $ = r(), Ce = v(() => F ? s({
176
+ ]), $ = r(), Ce = v(() => F ? l({
177
177
  payable: F,
178
178
  lineItems: M.lineItems,
179
179
  ledgerAccounts: N.data?.data ?? [],
@@ -197,7 +197,7 @@ function x({ open: x, onOpenChange: S, payableId: C, onClose: w, onExpand: T, on
197
197
  J
198
198
  ]), we = j.isLoading || M.isResolving || N.isResolving || Y.isLoading, Te = j.isError || M.isError || N.isError;
199
199
  return /* @__PURE__ */ b(fe, { children: [
200
- /* @__PURE__ */ y(l, {
200
+ /* @__PURE__ */ y(u, {
201
201
  open: x,
202
202
  onOpenChange: S,
203
203
  details: Ce,
@@ -222,7 +222,7 @@ function x({ open: x, onOpenChange: S, payableId: C, onClose: w, onExpand: T, on
222
222
  testId: D,
223
223
  labels: A.sheet
224
224
  }),
225
- /* @__PURE__ */ y(c, {
225
+ /* @__PURE__ */ y(s, {
226
226
  ...ve,
227
227
  labels: { cancelButton: A.decisionDialog.cancelButton },
228
228
  testId: D ? `${D}-decision-dialog` : void 0,
@@ -1,10 +1,10 @@
1
1
  import { AUDIT_HISTORY_LABELS_EN as e, REQUIRED_FIELDS_LEGEND_LABELS_EN as t, mergeRequiredFieldsLegendLabels as n } from "../../../../../../packages/shared-ui-shadcn/dist/index.js";
2
- import { APPROVAL_POLICY_CARD_LABELS_EN as r } from "./index2.js";
2
+ import { BILL_STATUS_BADGE_LABELS_EN as r } from "../../../../shared/document-status/ui/dist/index2.js";
3
+ import "../../../../shared/document-status/ui/dist/index.js";
4
+ import { APPROVAL_POLICY_CARD_LABELS_EN as i } from "./index2.js";
3
5
  import "./index4.js";
4
- import { VENDOR_SUMMARY_CARD_LABELS_EN as i } from "./index11.js";
6
+ import { VENDOR_SUMMARY_CARD_LABELS_EN as a } from "./index11.js";
5
7
  import "./index13.js";
6
- import { BILL_STATUS_BADGE_LABELS_EN as a } from "../../../../shared/document-status/ui/dist/index2.js";
7
- import "../../../../shared/document-status/ui/dist/index.js";
8
8
  // ../../libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/ui/dist/index14.js
9
9
  var o = {
10
10
  ...e,
@@ -31,10 +31,10 @@ var o = {
31
31
  paymentHistoryHeading: "Payment history",
32
32
  paymentHistoryErrorDescription: "Couldn't load payment history.",
33
33
  history: o,
34
- statusBadge: a,
35
- approvalPolicy: r,
34
+ statusBadge: r,
35
+ approvalPolicy: i,
36
36
  payToCard: {
37
- ...i,
37
+ ...a,
38
38
  editAction: "Edit vendor"
39
39
  },
40
40
  requiredFieldsLegend: t
@@ -2,27 +2,27 @@ import { AuditHistoryList as e, Badge as t, Button as n, RequiredFieldsLegend as
2
2
  import { ErrorState as s } from "../../../../shared/ui/dist/lib/ErrorState/ErrorState.js";
3
3
  import { DueDateText as c } from "../../../../shared/ui/dist/lib/DueDateText/DueDateText.js";
4
4
  import "../../../../shared/ui/dist/index.js";
5
- import { ApprovalPolicyCard as l } from "./index3.js";
5
+ import { BillActionButtons as l, NO_BILL_ACTIONS as u } from "../../../ui/dist/index2.js";
6
+ import "../../../ui/dist/index.js";
7
+ import { BillStatusBadge as d } from "../../../../shared/document-status/ui/dist/index4.js";
8
+ import "../../../../shared/document-status/ui/dist/index.js";
9
+ import { ApprovalPolicyCard as f } from "./index3.js";
6
10
  import "./index4.js";
7
- import { BillRejectionNotice as u } from "./index6.js";
11
+ import { BillRejectionNotice as p } from "./index6.js";
8
12
  import "./index7.js";
9
- import { PaymentHistoryList as d } from "./index8.js";
13
+ import { PaymentHistoryList as m } from "./index8.js";
10
14
  import "./index9.js";
11
- import { VendorSummaryCard as f } from "./index12.js";
15
+ import { VendorSummaryCard as h } from "./index12.js";
12
16
  import "./index13.js";
13
- import { BillStatusBadge as p } from "../../../../shared/document-status/ui/dist/index4.js";
14
- import "../../../../shared/document-status/ui/dist/index.js";
15
- import { mergeBillDetailBodyLabels as m } from "./index14.js";
16
- import { ScheduledSummaryBadge as h } from "./index5.js";
17
- import { BillActionButtons as g, NO_BILL_ACTIONS as _ } from "../../../ui/dist/index2.js";
18
- import "../../../ui/dist/index.js";
17
+ import { mergeBillDetailBodyLabels as g } from "./index14.js";
18
+ import { ScheduledSummaryBadge as _ } from "./index5.js";
19
19
  import { useMemo as v } from "react";
20
20
  import { jsx as y, jsxs as b } from "react/jsx-runtime";
21
21
  import { AlertTriangle as x } from "lucide-react";
22
22
  // ../../libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/ui/dist/index15.js
23
23
  var S = "ttw:text-base ttw:font-semibold", C = "ttw:px-3 ttw:py-2", w = "ttw:py-2 ttw:pr-3", T = "ttw:flex ttw:items-start ttw:gap-4 ttw:py-2.5", E = "ttw:w-[140px] ttw:shrink-0 ttw:text-sm ttw:font-medium ttw:text-muted-foreground";
24
- function D({ view: D, actions: O = _, scheduledSummary: k, scheduledSummaryDate: A, scheduledStatusLabel: j, showApprovalOverrideNotice: M, awaitingApprovalNotice: N, payTo: P, paymentHistoryError: F, paymentHistoryLoading: I, historyError: L, historyLoading: R, historyNamesError: z, isLoading: B, isError: V, labels: H }) {
25
- let U = v(() => m(H), [H]), W = v(() => ({
24
+ function D({ view: D, actions: O = u, scheduledSummary: k, scheduledSummaryDate: A, scheduledStatusLabel: j, showApprovalOverrideNotice: M, awaitingApprovalNotice: N, payTo: P, paymentHistoryError: F, paymentHistoryLoading: I, historyError: L, historyLoading: R, historyNamesError: z, isLoading: B, isError: V, labels: H }) {
25
+ let U = v(() => g(H), [H]), W = v(() => ({
26
26
  ...U.payToCard,
27
27
  payToHeading: D?.paidOnLabel ? U.payToHeadingPaid : U.payToHeading,
28
28
  vendorLabel: U.vendorRow,
@@ -103,10 +103,10 @@ function D({ view: D, actions: O = _, scheduledSummary: k, scheduledSummaryDate:
103
103
  variant: "outline",
104
104
  className: "ttw:border-emerald-200 ttw:bg-emerald-50 ttw:text-emerald-700",
105
105
  children: D.paidOnLabel
106
- }) : k ? /* @__PURE__ */ y(h, {
106
+ }) : k ? /* @__PURE__ */ y(_, {
107
107
  summary: k,
108
108
  date: A
109
- }) : /* @__PURE__ */ y(p, {
109
+ }) : /* @__PURE__ */ y(d, {
110
110
  status: D.status,
111
111
  tone: D.statusTone,
112
112
  labels: G
@@ -137,7 +137,7 @@ function D({ view: D, actions: O = _, scheduledSummary: k, scheduledSummaryDate:
137
137
  })]
138
138
  })]
139
139
  }),
140
- D.rejection ? /* @__PURE__ */ y(u, { ...D.rejection }) : null,
140
+ D.rejection ? /* @__PURE__ */ y(p, { ...D.rejection }) : null,
141
141
  M ? /* @__PURE__ */ y(a, {
142
142
  variant: "caption",
143
143
  color: "muted",
@@ -149,20 +149,20 @@ function D({ view: D, actions: O = _, scheduledSummary: k, scheduledSummaryDate:
149
149
  }) : null,
150
150
  !k && O.row.length ? /* @__PURE__ */ y("div", {
151
151
  className: "ttw:flex ttw:flex-wrap ttw:items-center ttw:gap-2",
152
- children: /* @__PURE__ */ y(g, { actions: O.row })
152
+ children: /* @__PURE__ */ y(l, { actions: O.row })
153
153
  }) : null
154
154
  ]
155
155
  }),
156
156
  K?.isOpen ? /* @__PURE__ */ y(r, { labels: U.requiredFieldsLegend }) : null,
157
157
  P?.editForm ? /* @__PURE__ */ b("div", {
158
158
  className: "ttw:flex ttw:flex-col ttw:gap-3",
159
- children: [P.editForm, /* @__PURE__ */ y(f, {
159
+ children: [P.editForm, /* @__PURE__ */ y(h, {
160
160
  summary: D.payTo,
161
161
  paymentInstructions: K,
162
162
  detailsWarning: P?.detailsWarning,
163
163
  labels: W
164
164
  })]
165
- }) : /* @__PURE__ */ y(f, {
165
+ }) : /* @__PURE__ */ y(h, {
166
166
  summary: D.payTo,
167
167
  onEdit: P?.onEdit,
168
168
  paymentInstructions: K,
@@ -177,7 +177,7 @@ function D({ view: D, actions: O = _, scheduledSummary: k, scheduledSummaryDate:
177
177
  }), F ? /* @__PURE__ */ y("p", {
178
178
  className: "ttw:text-sm ttw:text-muted-foreground",
179
179
  children: U.paymentHistoryErrorDescription
180
- }) : I ? /* @__PURE__ */ y(i, { className: "ttw:h-9 ttw:w-full" }) : /* @__PURE__ */ y(d, { records: D.paymentHistory })]
180
+ }) : I ? /* @__PURE__ */ y(i, { className: "ttw:h-9 ttw:w-full" }) : /* @__PURE__ */ y(m, { records: D.paymentHistory })]
181
181
  }) : null,
182
182
  /* @__PURE__ */ b("section", {
183
183
  className: "ttw:flex ttw:flex-col ttw:gap-3",
@@ -250,7 +250,7 @@ function D({ view: D, actions: O = _, scheduledSummary: k, scheduledSummaryDate:
250
250
  })]
251
251
  }, e.label))] })]
252
252
  }) }),
253
- D.approvalPolicy ? /* @__PURE__ */ y(l, {
253
+ D.approvalPolicy ? /* @__PURE__ */ y(f, {
254
254
  view: D.approvalPolicy,
255
255
  labels: U.approvalPolicy
256
256
  }) : null,
@@ -1,7 +1,7 @@
1
- import { APPROVAL_POLICY_CARD_LABELS_EN as e } from "./index2.js";
2
- import "./index4.js";
3
- import { BILL_STATUS_BADGE_LABELS_EN as t } from "../../../../shared/document-status/ui/dist/index2.js";
1
+ import { BILL_STATUS_BADGE_LABELS_EN as e } from "../../../../shared/document-status/ui/dist/index2.js";
4
2
  import "../../../../shared/document-status/ui/dist/index.js";
3
+ import { APPROVAL_POLICY_CARD_LABELS_EN as t } from "./index2.js";
4
+ import "./index4.js";
5
5
  import { BILL_AUDIT_HISTORY_SECTION_LABELS_EN as n } from "./index14.js";
6
6
  import "./index16.js";
7
7
  // ../../libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/ui/dist/index33.js
@@ -37,8 +37,8 @@ var r = {
37
37
  overflowMenuTrigger: "Bill actions",
38
38
  expandButton: "Open full screen",
39
39
  closeButton: "Close",
40
- statusBadge: t,
41
- approvalPolicy: e,
40
+ statusBadge: e,
41
+ approvalPolicy: t,
42
42
  auditHistory: n
43
43
  };
44
44
  export { r as BILL_DETAILS_SHEET_LABELS_EN };