@tesouro/embedded-components-react 0.11.253 → 0.11.255

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 (111) hide show
  1. package/dist/index.css +9 -344
  2. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index23.js +35 -38
  3. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index26.js +21 -14
  4. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index27.js +3 -105
  5. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index28.js +4 -0
  6. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index31.js +47 -47
  7. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index32.js +1 -1
  8. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index34.js +1 -1
  9. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index4.js +87 -90
  10. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index44.js +238 -248
  11. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index46.js +15 -34
  12. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index47.js +199 -202
  13. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index5.js +16 -14
  14. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/ui/dist/index.js +25 -25
  15. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/ui/dist/index10.js +18 -32
  16. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/ui/dist/index11.js +150 -19
  17. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/ui/dist/index12.js +2 -150
  18. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/ui/dist/index13.js +75 -1
  19. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/ui/dist/index14.js +272 -70
  20. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/ui/dist/index15.js +1 -279
  21. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/ui/dist/index16.js +20 -2
  22. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/ui/dist/index17.js +51 -16
  23. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/ui/dist/index18.js +2 -55
  24. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/ui/dist/index19.js +34 -2
  25. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/ui/dist/index20.js +369 -30
  26. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/ui/dist/index21.js +2 -373
  27. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/ui/dist/index22.js +22 -2
  28. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/ui/dist/index23.js +124 -20
  29. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/ui/dist/index24.js +2 -126
  30. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/ui/dist/index25.js +30 -1
  31. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/ui/dist/index26.js +51 -29
  32. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/ui/dist/index27.js +1 -52
  33. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/ui/dist/index28.js +54 -1
  34. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/ui/dist/index29.js +10 -54
  35. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/ui/dist/index3.js +35 -35
  36. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/ui/dist/index30.js +133 -10
  37. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/ui/dist/index31.js +1 -198
  38. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/ui/dist/index32.js +30 -2
  39. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/ui/dist/index33.js +52 -43
  40. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/ui/dist/index34.js +2 -315
  41. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/ui/dist/index35.js +15 -2
  42. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/ui/dist/index36.js +158 -14
  43. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/ui/dist/index37.js +2 -162
  44. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/ui/dist/index38.js +3 -2
  45. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/ui/dist/index39.js +19 -2
  46. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/ui/dist/index40.js +2 -35
  47. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/ui/dist/index41.js +9 -2
  48. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/ui/dist/index42.js +31 -8
  49. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/ui/dist/index43.js +2 -33
  50. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/ui/dist/index44.js +6 -2
  51. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/ui/dist/index45.js +27 -5
  52. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/ui/dist/index46.js +2 -29
  53. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/ui/dist/index47.js +13 -2
  54. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/ui/dist/index48.js +100 -11
  55. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/ui/dist/index49.js +2 -107
  56. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/ui/dist/index5.js +12 -16
  57. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/ui/dist/index50.js +9 -2
  58. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/ui/dist/index51.js +41 -8
  59. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/ui/dist/index52.js +2 -52
  60. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/ui/dist/index6.js +1 -22
  61. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/ui/dist/index7.js +31 -1
  62. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/ui/dist/index8.js +1 -31
  63. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/ui/dist/index9.js +34 -1
  64. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bills-list/feature/dist/index14.js +1 -3
  65. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bills-list/feature/dist/index19.js +2 -6
  66. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bills-list/ui/dist/index15.js +1 -1
  67. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bills-list/ui/dist/index17.js +2 -6
  68. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/pay-bill/feature/dist/index10.js +119 -104
  69. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/pay-bill/feature/dist/index11.js +2 -2
  70. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/pay-bill/feature/dist/index14.js +1 -1
  71. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/pay-bill/feature/dist/index2.js +2 -1
  72. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/pay-bill/feature/dist/index4.js +11 -11
  73. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/pay-bill/feature/dist/index9.js +9 -4
  74. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/pay-bill/ui/dist/index.js +8 -8
  75. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/pay-bill/ui/dist/index10.js +76 -171
  76. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/pay-bill/ui/dist/index11.js +1 -1
  77. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/pay-bill/ui/dist/index12.js +33 -0
  78. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/pay-bill/ui/dist/index13.js +9 -0
  79. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/pay-bill/ui/dist/index14.js +126 -0
  80. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/pay-bill/ui/dist/index15.js +2 -0
  81. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/pay-bill/ui/dist/index2.js +23 -29
  82. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/pay-bill/ui/dist/index3.js +32 -126
  83. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/pay-bill/ui/dist/index4.js +14 -2
  84. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/pay-bill/ui/dist/index5.js +3 -13
  85. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/pay-bill/ui/dist/index6.js +28 -104
  86. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/pay-bill/ui/dist/index7.js +72 -1
  87. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/pay-bill/ui/dist/index8.js +2 -33
  88. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/pay-bill/ui/dist/index9.js +12 -7
  89. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index.js +6 -9
  90. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index12.js +6 -9
  91. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index13.js +32 -31
  92. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index2.js +4 -2
  93. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index3.js +15 -5
  94. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index4.js +53 -84
  95. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/util/dist/index.js +17 -18
  96. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/util/dist/lib/billDetailLabels.js +12 -12
  97. package/dist/libs/tesouro-embedded-components-react/shared/document-status/ui/dist/index.js +4 -4
  98. package/dist/libs/tesouro-embedded-components-react/shared/document-status/ui/dist/index3.js +9 -9
  99. package/dist/libs/tesouro-embedded-components-react/shared/document-status/ui/dist/index4.js +13 -14
  100. package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/analytics/build-info.js +1 -1
  101. package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/document/documentPreview.js +1 -1
  102. package/dist/libs/tesouro-embedded-components-react/shared/ui/dist/index.js +20 -19
  103. package/dist/libs/tesouro-embedded-components-react/shared/ui/dist/lib/MaskedAccountNumber/MaskedAccountNumber.js +30 -34
  104. package/dist/libs/tesouro-embedded-components-react/shared/ui/dist/lib/TooltipIconButton/TooltipIconButton.js +55 -0
  105. package/dist/packages/shared-ui-shadcn/dist/index.js +1322 -1312
  106. package/package.json +1 -1
  107. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/ui/dist/index53.js +0 -2
  108. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index22.js +0 -6
  109. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index23.js +0 -31
  110. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index24.js +0 -2
  111. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/util/dist/lib/maskAccountNumber.js +0 -5
@@ -12,32 +12,39 @@ import "../../../../shared/feature/dist/index.js";
12
12
  import { useDeletePayableMutation as i } from "../../data-access/dist/index12.js";
13
13
  import "../../data-access/dist/index.js";
14
14
  import { useState as a } from "react";
15
+ import { Trash2Icon as o } from "lucide-react";
15
16
  // ../../libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index26.js
16
- function o({ payableId: o, status: s, enabled: c = !0, labels: l, onDeleted: u }) {
17
- let { initResponse: d } = r(), f = i(), [p, m] = a(!1), h = t(d?.scopes, [n.PayableWriteOrg]), g = !!(c && o && s === "draft" && h), _ = g ? [{
17
+ function s({ payableId: s, status: c, enabled: l = !0, labels: u, onDeleted: d }) {
18
+ let { initResponse: f } = r(), p = i(), [m, h] = a(!1), g = t(f?.scopes, [n.PayableWriteOrg]), _ = !!(l && s && c === "draft" && g), v = _ ? [{
18
19
  id: "deleteDraft",
19
- label: l.menuItem,
20
+ label: u.menuItem,
20
21
  destructive: !0,
21
- onSelect: () => m(!0)
22
- }] : [], v = p && g;
22
+ onSelect: () => h(!0)
23
+ }] : [], y = m && _;
23
24
  return {
24
- menuItems: _,
25
+ menuItems: v,
25
26
  dialog: {
26
- open: v,
27
- copy: v ? l.dialog : void 0,
28
- isPending: f.isPending,
27
+ open: y,
28
+ copy: y ? {
29
+ ...u.dialog,
30
+ presentation: {
31
+ tone: "destructive",
32
+ icon: o
33
+ }
34
+ } : void 0,
35
+ isPending: p.isPending,
29
36
  onCancel: () => {
30
- f.isPending || m(!1);
37
+ p.isPending || h(!1);
31
38
  },
32
39
  onConfirm: () => {
33
- g && o && !f.isPending && f.mutate({ path: { payable_id: o } }, {
34
- onError: () => e.error(l.error),
40
+ _ && s && !p.isPending && p.mutate({ path: { payable_id: s } }, {
41
+ onError: () => e.error(u.error),
35
42
  onSuccess: () => {
36
- m(!1), u();
43
+ h(!1), d();
37
44
  }
38
45
  });
39
46
  }
40
47
  }
41
48
  };
42
49
  }
43
- export { o as useDraftDelete };
50
+ export { s as useDraftDelete };
@@ -1,112 +1,10 @@
1
1
  import { formatCalendarDate as e } from "../../../../shared/util/dist/lib/formatCalendarDate.js";
2
2
  import "../../../../shared/util/dist/index.js";
3
- import { formatBillMoney as t } from "../../../util/dist/lib/formatBillMoney.js";
4
- import { resolveBillDueDate as n } from "../../../util/dist/lib/resolveBillDueDate.js";
5
- import { resolveLineItemAmountMinorUnits as r } from "../../../util/dist/lib/resolveLineItemAmount.js";
6
- import { resolveLineItemQuantity as i } from "../../../util/dist/lib/resolveLineItemQuantity.js";
7
- import { resolveVendor as a, resolveVendorName as o } from "../../../util/dist/lib/resolveVendor.js";
8
- import "../../../util/dist/index.js";
9
- import { derivePayableStatus as s } from "../../../../shared/document-status/util/dist/lib/derivePayableStatus.js";
10
- import { formatGlCodeLabel as c } from "./index16.js";
11
3
  // ../../libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index27.js
12
- function l(e) {
4
+ function t(e) {
13
5
  return e.total_amount ?? e.amount_due ?? void 0;
14
6
  }
15
- function u(e) {
16
- return typeof e == "string" ? e : "";
17
- }
18
- function d({ payable: d, lineItems: p, ledgerAccounts: m, labels: h, hasScheduledPayment: g, now: _, today: v, rejection: y, achInstructions: b, achInstructionsReadable: x = !1 }) {
19
- let S = d.currency, C = (e) => t(e, S), w = s({
20
- apiStatus: d.status,
21
- dueDate: d.due_date,
22
- scheduledPaymentDate: d.scheduled_payment_date,
23
- hasScheduledPayment: g,
24
- now: _
25
- }), T = a(d), E = o(d), D = e(d.issued_at) || h.notProvided, O = e(d.due_date) || h.notProvided, k = n({
26
- status: d.status,
27
- dueDate: d.due_date,
28
- today: v,
29
- isScheduled: w.status === "scheduled",
30
- labels: h.dueDate,
31
- emptyLabel: h.notProvided
32
- }), A = [{
33
- label: h.vendorRow,
34
- value: E || h.notProvided,
35
- secondaryValue: T?.email ?? void 0
36
- }], j = x ? b?.account_number : void 0;
37
- j && A.push({
38
- label: h.bankAccountRow,
39
- value: h.bankAccountValue(j.slice(-4))
40
- });
41
- let M = [
42
- {
43
- label: h.invoiceNumberRow,
44
- value: d.document_id || h.notProvided
45
- },
46
- {
47
- label: h.issueDateRow,
48
- value: D
49
- },
50
- {
51
- label: h.dueDateRow,
52
- value: O
53
- },
54
- {
55
- label: h.poNumberRow,
56
- value: u(d.purchase_order_number) || h.notProvided
57
- }
58
- ], N = new Map(m.map((e) => [e.id, c(e)])), P = p.map((e) => {
59
- let t = C(e.unit_price), n = String(i(e));
60
- return {
61
- id: e.id,
62
- description: e.name ?? e.description ?? "",
63
- glCodeLabel: (e.ledger_account_id ? N.get(e.ledger_account_id) : void 0) || h.glCodeMissing,
64
- quantityLabel: t ? h.quantityValue(n, t) : h.quantityOnlyValue(n),
65
- amountLabel: C(r(e)) ?? ""
66
- };
67
- }), F = [
68
- {
69
- label: h.subtotalRow,
70
- value: d.subtotal
71
- },
72
- {
73
- label: h.discountsRow,
74
- value: d.discount
75
- },
76
- {
77
- label: h.taxRow,
78
- value: d.tax_amount
79
- }
80
- ].map(({ label: e, value: t }) => ({
81
- label: e,
82
- value: C(t)
83
- })).filter((e) => !!e.value), I = C(l(d));
84
- I && F.push({
85
- label: h.totalRow,
86
- value: I,
87
- emphasis: !0
88
- });
89
- let L = f(d);
90
- return {
91
- title: E,
92
- subtitle: h.subtitle,
93
- status: w.status,
94
- statusTone: w.tone,
95
- amountDueLabel: C(d.amount_due) ?? C(d.total_amount) ?? "",
96
- amountPaidLabel: L ? C(d.amount_paid) : void 0,
97
- paidOnLabel: L ? h.paidOnLabel(L) : void 0,
98
- invoiceDateLabel: D,
99
- dueDateLabel: k.label,
100
- dueDateOverdueLabel: k.overdueLabel,
101
- dueDateAccessibleLabel: k.accessibleLabel,
102
- payToItems: A,
103
- invoiceItems: M,
104
- lineItems: P,
105
- totals: F,
106
- rejection: y
107
- };
108
- }
109
- function f(t) {
7
+ function n(t) {
110
8
  return t.status === "paid" && t.paid_at ? e(t.paid_at.slice(0, 10)) : void 0;
111
9
  }
112
- export { f as getPaidAtLabel, d as mapPayableToBillDetails, l as resolveInvoiceTotalMinorUnits };
10
+ export { n as getPaidAtLabel, t as resolveInvoiceTotalMinorUnits };
@@ -74,6 +74,10 @@ function u({ payable: u, lineItems: d, glCodeOptions: f, glCodeRosterAvailable:
74
74
  {
75
75
  label: _.invoiceNumberRow,
76
76
  value: u.document_id || _.notProvided
77
+ },
78
+ {
79
+ label: _.poNumberRow,
80
+ value: typeof u.purchase_order_number == "string" && u.purchase_order_number || _.notProvided
77
81
  }
78
82
  ],
79
83
  lineItems: d.map((e) => {
@@ -1,18 +1,18 @@
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, mergeBillDetailActionsLabels as s, mergePaymentHistoryMethodLabels as c } from "../../../util/dist/lib/billDetailLabels.js";
2
- import { BILL_DUE_DATE_LABELS_EN as l } from "../../../util/dist/lib/resolveBillDueDate.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_SUMMARY_LABEL_EN as a, mergeBillDetailActionsLabels as o, mergePaymentHistoryMethodLabels as s } from "../../../util/dist/lib/billDetailLabels.js";
2
+ import { BILL_DUE_DATE_LABELS_EN as c } from "../../../util/dist/lib/resolveBillDueDate.js";
3
3
  import "../../../util/dist/index.js";
4
- import { ACH_FIELD_GROUP_LABELS_EN as u } from "../../../../shared/counterpart-management/ui/dist/index2.js";
4
+ import { ACH_FIELD_GROUP_LABELS_EN as l } from "../../../../shared/counterpart-management/ui/dist/index2.js";
5
5
  import "../../../../shared/counterpart-management/ui/dist/index.js";
6
- import { APPROVAL_POLICY_RULE_COPY_EN as d } from "./index10.js";
7
- import { PAYABLE_AUDIT_HISTORY_LABELS_EN as f } from "./index30.js";
8
- import { BILL_REJECTED_BANNER_LABELS_EN as p } from "../../ui/dist/index39.js";
9
- import { DISCARD_CHANGES_DIALOG_LABELS_EN as m } from "../../ui/dist/index42.js";
10
- import { UNSAVED_BILL_DIALOG_LABELS_EN as h } from "../../ui/dist/index51.js";
6
+ import { APPROVAL_POLICY_RULE_COPY_EN as u } from "./index10.js";
7
+ import { PAYABLE_AUDIT_HISTORY_LABELS_EN as d } from "./index30.js";
8
+ import { BILL_REJECTED_BANNER_LABELS_EN as f } from "../../ui/dist/index38.js";
9
+ import { DISCARD_CHANGES_DIALOG_LABELS_EN as p } from "../../ui/dist/index41.js";
10
+ import { UNSAVED_BILL_DIALOG_LABELS_EN as m } from "../../ui/dist/index50.js";
11
11
  import "../../ui/dist/index.js";
12
- import { DOCUMENT_PREVIEW_LABELS_EN as g } from "../../../../shared/feature/dist/lib/document/documentPreview.js";
12
+ import { DOCUMENT_PREVIEW_LABELS_EN as h } from "../../../../shared/feature/dist/lib/document/documentPreview.js";
13
13
  import "../../../../shared/feature/dist/document-preview.js";
14
14
  // ../../libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index31.js
15
- var _ = {
15
+ var g = {
16
16
  unmappedValidationError: (e, t) => `${e}: ${t}`,
17
17
  unknownValidationField: "(unknown field)",
18
18
  requiredField: "This field is required.",
@@ -37,7 +37,7 @@ var _ = {
37
37
  implausibleInvoiceDate: "Enter an invoice date within the last 10 years, no more than 30 days from today.",
38
38
  implausibleDueDate: "Enter a due date within the last 10 years and next 5 years.",
39
39
  dueBeforeInvoiceDate: "Due date must be on or after the invoice date."
40
- }, v = {
40
+ }, _ = {
41
41
  paymentInstructionsValue: (e) => `Account ending in ${e}`,
42
42
  noMethod: "No payment method on file",
43
43
  paymentMethodLoading: "Loading payment method...",
@@ -47,13 +47,13 @@ var _ = {
47
47
  pendingVendorDescription: "Will be created when submitted",
48
48
  pendingVendorIncompleteDescription: "Add the missing vendor details before submitting",
49
49
  bankAccountSaveFailed: "We could not save these payment instructions. Try again."
50
- }, y = {
50
+ }, v = {
51
51
  attachFailed: "We could not attach that file. Try again.",
52
52
  deleteFailed: "We could not remove that document. Try again.",
53
53
  noDocument: "No document attached to this bill.",
54
54
  pendingDeletionNotice: "This document will be removed when you save this bill.",
55
- preview: g
56
- }, b = {
55
+ preview: h
56
+ }, y = {
57
57
  ...r,
58
58
  notProvided: "Not provided",
59
59
  paymentInstructionsValue: (e) => `Account ending in ${e}`,
@@ -61,6 +61,7 @@ var _ = {
61
61
  invoiceDateRow: "Invoice date",
62
62
  dueDateRow: "Due date",
63
63
  invoiceNumberRow: "Invoice number",
64
+ poNumberRow: "PO number",
64
65
  glCodeMissing: "GL code not specified",
65
66
  glCodeUnavailable: "GL code unavailable",
66
67
  qtyPriceValue: (e, t) => `${e} x ${t}`,
@@ -69,30 +70,29 @@ var _ = {
69
70
  taxRow: "Tax",
70
71
  discountRow: "Discounts",
71
72
  totalRow: "Total",
72
- paidOnLabel: (e) => `Paid on ${e}`,
73
+ paidOnLabel: (e) => `on ${e}`,
73
74
  paymentInstructionsSaveError: "Couldn't save payment instructions. Try again.",
74
75
  paymentInstructionsLinkError: "Payment instructions were saved to the vendor, but couldn't be added to this bill. Try again.",
75
76
  rejectedByOn: (e, t) => `Rejected by ${e} on ${t}`,
76
77
  rejectedOn: (e) => `Rejected on ${e}`,
77
78
  rejectionMessage: (e) => `"${e}"`
78
- }, x = {
79
+ }, b = {
79
80
  newTitle: "New bill",
80
81
  extractedTitle: (e) => `Bill from ${e}`,
81
82
  viewTitle: (e) => `Bill from ${e}`,
82
83
  readOnlyTitle: "Bill details",
83
84
  addedOn: (e) => `Added on ${e}`,
84
- unsavedChanges: h,
85
- discardChanges: m,
85
+ unsavedChanges: m,
86
+ discardChanges: p,
86
87
  scheduledRelativeDay: i,
87
- dueDate: l,
88
- scheduledSummary: o,
89
- scheduledStatusBadge: a,
88
+ dueDate: c,
89
+ scheduledSummary: a,
90
90
  awaitingApprovalNotice: e,
91
91
  awaitingApprovalUnknownNotice: t,
92
92
  actions: n,
93
- detail: b,
94
- history: f,
95
- approvalPolicyCopy: d,
93
+ detail: y,
94
+ history: d,
95
+ approvalPolicyCopy: u,
96
96
  deleteDraft: {
97
97
  menuItem: "Delete draft",
98
98
  dialog: {
@@ -107,56 +107,56 @@ var _ = {
107
107
  noAccess: "You don't have access to GL codes",
108
108
  empty: "No GL codes set up yet"
109
109
  },
110
- rejectedBanner: p
110
+ rejectedBanner: f
111
111
  };
112
- function S(e) {
112
+ function x(e) {
113
113
  return {
114
- ...x,
114
+ ...b,
115
115
  ...e,
116
- actions: s(e?.actions),
116
+ actions: o(e?.actions),
117
117
  detail: {
118
- ...x.detail,
118
+ ...b.detail,
119
119
  ...e?.detail,
120
- paymentHistoryMethodLabels: c(e?.detail?.paymentHistoryMethodLabels)
120
+ paymentHistoryMethodLabels: s(e?.detail?.paymentHistoryMethodLabels)
121
121
  },
122
122
  history: {
123
- ...x.history,
123
+ ...b.history,
124
124
  ...e?.history
125
125
  },
126
126
  lineItemsGlCodeUnavailable: {
127
- ...x.lineItemsGlCodeUnavailable,
127
+ ...b.lineItemsGlCodeUnavailable,
128
128
  ...e?.lineItemsGlCodeUnavailable
129
129
  },
130
130
  unsavedChanges: {
131
- ...x.unsavedChanges,
131
+ ...b.unsavedChanges,
132
132
  ...e?.unsavedChanges
133
133
  },
134
134
  discardChanges: {
135
- ...x.discardChanges,
135
+ ...b.discardChanges,
136
136
  ...e?.discardChanges
137
137
  },
138
138
  rejectedBanner: {
139
- ...x.rejectedBanner,
139
+ ...b.rejectedBanner,
140
140
  ...e?.rejectedBanner
141
141
  },
142
142
  approvalPolicyCopy: {
143
- ...x.approvalPolicyCopy,
143
+ ...b.approvalPolicyCopy,
144
144
  ...e?.approvalPolicyCopy
145
145
  },
146
146
  scheduledRelativeDay: {
147
- ...x.scheduledRelativeDay,
147
+ ...b.scheduledRelativeDay,
148
148
  ...e?.scheduledRelativeDay
149
149
  },
150
150
  dueDate: {
151
- ...x.dueDate,
151
+ ...b.dueDate,
152
152
  ...e?.dueDate
153
153
  },
154
154
  deleteDraft: {
155
- ...x.deleteDraft,
155
+ ...b.deleteDraft,
156
156
  ...e?.deleteDraft,
157
157
  dialog: (() => {
158
158
  let t = {
159
- ...x.deleteDraft.dialog,
159
+ ...b.deleteDraft.dialog,
160
160
  ...e?.deleteDraft?.dialog
161
161
  };
162
162
  return delete t.reason, t;
@@ -164,7 +164,7 @@ function S(e) {
164
164
  }
165
165
  };
166
166
  }
167
- var C = {
167
+ var S = {
168
168
  createTitle: "New vendor details",
169
169
  editTitle: "Edit vendor",
170
170
  switchVendorFieldLabel: "Switch to a different vendor",
@@ -183,20 +183,20 @@ var C = {
183
183
  paymentInstructionsHeading: "Payment instructions",
184
184
  paymentInstructionsDescription: "How and where will the money be sent. This information is required to send a payment.",
185
185
  paymentInstructionsExtracted: "We read these from the bill. Check them before saving.",
186
- ach: u
186
+ ach: l
187
187
  };
188
- function w(e) {
188
+ function C(e) {
189
189
  return {
190
- ...C,
190
+ ...S,
191
191
  ...e,
192
192
  ach: {
193
- ...C.ach,
193
+ ...S.ach,
194
194
  ...e?.ach,
195
195
  fieldMarkers: {
196
- ...C.ach.fieldMarkers,
196
+ ...S.ach.fieldMarkers,
197
197
  ...e?.ach?.fieldMarkers
198
198
  }
199
199
  }
200
200
  };
201
201
  }
202
- export { _ as BILL_CREATE_MESSAGE_LABELS_EN, b as BILL_DETAIL_VIEW_LABELS_EN, x as BILL_DIALOG_COPY_EN, y as SOURCE_DOCUMENT_CONTAINER_LABELS_EN, C as VENDOR_INLINE_FORM_LABELS_EN, v as VENDOR_SECTION_PROPS_LABELS_EN, S as mergeBillDialogCopy, w as mergeVendorInlineFormLabels };
202
+ export { g as BILL_CREATE_MESSAGE_LABELS_EN, y as BILL_DETAIL_VIEW_LABELS_EN, b as BILL_DIALOG_COPY_EN, v as SOURCE_DOCUMENT_CONTAINER_LABELS_EN, S as VENDOR_INLINE_FORM_LABELS_EN, _ as VENDOR_SECTION_PROPS_LABELS_EN, x as mergeBillDialogCopy, C as mergeVendorInlineFormLabels };
@@ -2,7 +2,7 @@
2
2
  "use client";
3
3
  "use client";
4
4
  "use client";
5
- import { SourceDocumentPanel as e } from "../../ui/dist/index49.js";
5
+ import { SourceDocumentPanel as e } from "../../ui/dist/index48.js";
6
6
  import "../../ui/dist/index.js";
7
7
  import { createDocumentPreview as t } from "../../../../shared/feature/dist/lib/document/documentPreview.js";
8
8
  import "../../../../shared/feature/dist/document-preview.js";
@@ -9,7 +9,7 @@ import { AchFieldGroup as n } from "../../../../shared/counterpart-management/ui
9
9
  import { CounterpartFormFields as r, countErrors as i, useFocusFirstInvalidField as a } from "../../../../shared/counterpart-management/ui/dist/index10.js";
10
10
  import "../../../../shared/counterpart-management/ui/dist/index.js";
11
11
  import "../../../../shared/counterpart-management/feature/dist/index.js";
12
- import { VendorSearchCombobox as o } from "../../ui/dist/index24.js";
12
+ import { VendorSearchCombobox as o } from "../../ui/dist/index23.js";
13
13
  import "../../ui/dist/index.js";
14
14
  import { mergeVendorInlineFormLabels as s } from "./index31.js";
15
15
  import { useMemo as c } from "react";
@@ -22,20 +22,20 @@ import { usePayablesByIdsQueries as p } from "../../data-access/dist/index25.js"
22
22
  import "../../data-access/dist/index.js";
23
23
  import { DUPLICATE_BILLS_LABELS_EN as m } from "./index3.js";
24
24
  import { useCallback as h, useMemo as g, useState as _ } from "react";
25
- import { FileCheckIcon as v } from "lucide-react";
25
+ import { BanIcon as v, Trash2Icon as y } from "lucide-react";
26
26
  // ../../libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index4.js
27
- var y = 5;
28
- function b(e, t) {
27
+ var b = 5;
28
+ function x(e, t) {
29
29
  return t ? o(e).map(({ members: e }) => e).find((e) => e.some((e) => e.id === t)) ?? [] : [];
30
30
  }
31
- function x({ payable: o, canManage: x = !0, onRemoved: S, onOpenPayable: C, labels: w }) {
32
- let T = g(() => ({
31
+ function S({ payable: o, canManage: S = !0, onRemoved: C, onOpenPayable: w, labels: T }) {
32
+ let E = g(() => ({
33
33
  ...m,
34
- ...w
35
- }), [w]), E = i(o), [D] = E, O = o?.id, k = g(() => [...new Set(E.map((e) => e.matched_payable_id))], [E]), A = p(k, { enabled: !!(D && O) }), j = f(), [M, N] = _(!1), [P, F] = _(), I = c(o?.status), L = h(async (t, n, r, i, o) => {
34
+ ...T
35
+ }), [T]), D = i(o), [O] = D, k = o?.id, A = g(() => [...new Set(D.map((e) => e.matched_payable_id))], [D]), j = p(A, { enabled: !!(O && k) }), M = f(), [N, P] = _(!1), [F, I] = _(), L = c(o?.status), R = h(async (t, n, r, i, o) => {
36
36
  let s = a(t, n, o);
37
37
  if (s.length && t?.id) try {
38
- await j.mutateAsync({
38
+ await M.mutateAsync({
39
39
  verdict: n,
40
40
  targets: s.map((e) => ({
41
41
  payableId: t.id,
@@ -45,67 +45,67 @@ function x({ payable: o, canManage: x = !0, onRemoved: S, onOpenPayable: C, labe
45
45
  }))
46
46
  }), e.success(r), i?.();
47
47
  } catch {
48
- e.error(T.verdictFailedToast);
48
+ e.error(E.verdictFailedToast);
49
49
  }
50
- }, [j, T]), R = h((e, t, n) => L(o, e, t, n), [L, o]), z = I === "delete" ? {
51
- button: T.deleteBillButton,
52
- title: T.deleteConfirmTitle,
53
- description: T.deleteConfirmDescription,
54
- confirmButton: T.deleteConfirmButton,
55
- backButton: T.deleteConfirmBackButton,
56
- toast: T.deletedToast
57
- } : I === "confirm" ? {
58
- button: T.confirmBillButton,
59
- title: T.confirmDuplicateTitle,
60
- description: T.confirmDuplicateDescription,
61
- confirmButton: T.confirmBillButton,
62
- backButton: T.cancelConfirmBackButton,
63
- toast: T.confirmedToast
50
+ }, [M, E]), z = h((e, t, n) => R(o, e, t, n), [R, o]), B = L === "delete" ? {
51
+ button: E.deleteBillButton,
52
+ title: E.deleteConfirmTitle,
53
+ description: E.deleteConfirmDescription,
54
+ confirmButton: E.deleteConfirmButton,
55
+ backButton: E.deleteConfirmBackButton,
56
+ toast: E.deletedToast
57
+ } : L === "confirm" ? {
58
+ button: E.confirmBillButton,
59
+ title: E.confirmDuplicateTitle,
60
+ description: E.confirmDuplicateDescription,
61
+ confirmButton: E.confirmBillButton,
62
+ backButton: E.cancelConfirmBackButton,
63
+ toast: E.confirmedToast
64
64
  } : {
65
- button: T.cancelBillButton,
66
- title: T.cancelConfirmTitle,
67
- description: T.cancelConfirmDescription,
68
- confirmButton: T.cancelConfirmButton,
69
- backButton: T.cancelConfirmBackButton,
70
- toast: T.cancelledToast
71
- }, B = I !== "confirm", V = h(async () => {
72
- await R(r.Remove, z.toast, S), N(!1);
65
+ button: E.cancelBillButton,
66
+ title: E.cancelConfirmTitle,
67
+ description: E.cancelConfirmDescription,
68
+ confirmButton: E.cancelConfirmButton,
69
+ backButton: E.cancelConfirmBackButton,
70
+ toast: E.cancelledToast
71
+ }, V = L !== "confirm", H = h(async () => {
72
+ await z(r.Remove, B.toast, C), P(!1);
73
73
  }, [
74
- R,
75
- S,
76
- z.toast
77
- ]), H = h(async () => {
78
- P && (await L(P.payable, r.Keep, T.dismissedToast, void 0, P.originalPayableId), F(void 0));
74
+ z,
75
+ C,
76
+ B.toast
77
+ ]), U = h(async () => {
78
+ F && (await R(F.payable, r.Keep, E.dismissedToast, void 0, F.originalPayableId), I(void 0));
79
79
  }, [
80
- L,
81
- T.dismissedToast,
82
- P
83
- ]), U = x && !!(D && O), W = U && !!I, G = g(() => {
84
- let e = new Map(A.flatMap((e) => e.data ? [[e.data.id, e.data]] : []));
80
+ R,
81
+ E.dismissedToast,
82
+ F
83
+ ]), W = S && !!(O && k), G = W && !!L, K = g(() => {
84
+ let e = new Map(j.flatMap((e) => e.data ? [[e.data.id, e.data]] : []));
85
85
  o?.id && e.set(o.id, o);
86
- let r = b([...e.values()], O);
86
+ let r = x([...e.values()], k);
87
87
  if (r.length < 2) return [];
88
88
  let i = (e) => {
89
89
  let t = e.total_amount ?? e.amount_due;
90
90
  return t == null ? "" : n(t / 100, { currencyCode: e.currency ?? "USD" });
91
91
  };
92
- return [...r.filter((e) => e.id === O), ...r.filter((e) => e.id !== O)].map((e) => {
92
+ return [...r.filter((e) => e.id === k), ...r.filter((e) => e.id !== k)].map((e) => {
93
93
  let n = e.status ? d({
94
94
  apiStatus: e.status,
95
95
  dueDate: e.due_date,
96
96
  scheduledPaymentDate: e.scheduled_payment_date
97
- }) : void 0, r = e.id === O, a = t(e.created_at?.slice(0, 10));
97
+ }) : void 0, r = e.id === k, a = t(e.created_at?.slice(0, 10));
98
98
  return {
99
99
  id: e.id,
100
100
  isCurrent: r,
101
- badges: r ? [T.currentBillBadge] : [],
101
+ badges: r ? [E.currentBillBadge] : [],
102
102
  createdOnLabel: a,
103
103
  dueDateLabel: t(e.due_date),
104
104
  amountLabel: i(e),
105
105
  status: n?.status,
106
106
  statusTone: n?.tone,
107
- onOpen: !r && C ? () => C(e.id, s(e.status ?? void 0)) : void 0,
108
- openLabel: T.openRow({
107
+ onOpen: !r && w ? () => w(e.id, s(e.status ?? void 0)) : void 0,
108
+ openLabel: E.openRow({
109
109
  vendorLabel: l(e),
110
110
  invoiceNumberLabel: e.document_id ?? "",
111
111
  addedOnLabel: a
@@ -113,62 +113,59 @@ function x({ payable: o, canManage: x = !0, onRemoved: S, onOpenPayable: C, labe
113
113
  };
114
114
  });
115
115
  }, [
116
- A,
117
- T,
118
- C,
116
+ j,
117
+ E,
118
+ w,
119
119
  o,
120
- O
121
- ]), K = l(o), q = o?.document_id ?? "", J = G.length > 1, Y = J && K ? K : void 0, X = J && q ? T.duplicateCardInvoice(q) : void 0;
120
+ k
121
+ ]), q = l(o), J = o?.document_id ?? "", Y = K.length > 1, X = Y && q ? q : void 0, Z = Y && J ? E.duplicateCardInvoice(J) : void 0;
122
122
  return {
123
- isPossibleDuplicate: !!D,
124
- onNotADuplicate: U ? () => F({ payable: o }) : void 0,
125
- onRemoveBill: W ? () => N(!0) : void 0,
126
- removeBillLabel: W ? z.button : void 0,
127
- isRemoveBillDestructive: B,
123
+ isPossibleDuplicate: !!O,
124
+ onNotADuplicate: W ? () => I({ payable: o }) : void 0,
125
+ onRemoveBill: G ? () => P(!0) : void 0,
126
+ removeBillLabel: G ? B.button : void 0,
128
127
  removeConfirmation: {
129
- open: M,
128
+ open: N,
130
129
  copy: {
131
- title: z.title,
132
- description: z.description,
133
- confirmButton: z.confirmButton,
134
- ...B ? { presentation: { tone: "destructive" } } : {}
130
+ title: B.title,
131
+ description: B.description,
132
+ confirmButton: B.confirmButton,
133
+ ...V ? { presentation: {
134
+ tone: "destructive",
135
+ icon: L === "delete" ? y : v
136
+ } } : {}
135
137
  },
136
- onConfirm: () => void V(),
137
- onCancel: () => N(!1),
138
- isPending: j.isPending,
139
- cancelButtonLabel: z.backButton
138
+ onConfirm: () => void H(),
139
+ onCancel: () => P(!1),
140
+ isPending: M.isPending,
141
+ cancelButtonLabel: B.backButton
140
142
  },
141
143
  keepRowConfirmation: {
142
- open: !!P,
144
+ open: !!F,
143
145
  copy: {
144
- title: T.notDuplicateConfirmTitle,
145
- description: T.notDuplicateConfirmDescription,
146
- confirmButton: T.notDuplicateConfirmButton,
147
- presentation: {
148
- alignment: "center",
149
- icon: v,
150
- actionWidth: "equal"
151
- }
146
+ title: E.notDuplicateConfirmTitle,
147
+ description: E.notDuplicateConfirmDescription,
148
+ confirmButton: E.notDuplicateConfirmButton
152
149
  },
153
- onConfirm: () => void H(),
154
- onCancel: () => F(void 0),
155
- isPending: j.isPending,
156
- cancelButtonLabel: T.notDuplicateConfirmBackButton
150
+ onConfirm: () => void U(),
151
+ onCancel: () => I(void 0),
152
+ isPending: M.isPending,
153
+ cancelButtonLabel: E.notDuplicateConfirmBackButton
157
154
  },
158
- isBusy: j.isPending,
159
- title: Y,
160
- meta: X,
161
- rows: G,
162
- isLoadingRows: G.length === 0 && A.some((e) => e.isLoading),
163
- loadingRowCount: Math.min(k.length + 1, y),
155
+ isBusy: M.isPending,
156
+ title: X,
157
+ meta: Z,
158
+ rows: K,
159
+ isLoadingRows: K.length === 0 && j.some((e) => e.isLoading),
160
+ loadingRowCount: Math.min(A.length + 1, b),
164
161
  collapse: u({
165
- statuses: G.map((e) => e.status),
162
+ statuses: K.map((e) => e.status),
166
163
  labels: {
167
- showMore: T.showMoreRows,
168
- showLess: T.showLessRows,
169
- statusSummary: (e) => T.statusSummary(e.map(({ status: e }) => T.statusLabels[e] ?? T.statusLabels.unknown ?? e))
164
+ showMore: E.showMoreRows,
165
+ showLess: E.showLessRows,
166
+ statusSummary: (e) => E.statusSummary(e.map(({ status: e }) => E.statusLabels[e] ?? E.statusLabels.unknown ?? e))
170
167
  }
171
168
  })
172
169
  };
173
170
  }
174
- export { x as usePayableDuplicateReview };
171
+ export { S as usePayableDuplicateReview };