@tesouro/embedded-components-react 0.4.20 → 0.4.22

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 (179) hide show
  1. package/dist/index.js +1 -1
  2. package/dist/lib/BillPayWidget.js +1 -1
  3. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index.js +12 -12
  4. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index10.js +64 -37
  5. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index11.js +38 -110
  6. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index12.js +104 -73
  7. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index13.js +87 -7
  8. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index14.js +7 -21
  9. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index15.js +17 -22
  10. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index16.js +23 -63
  11. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index17.js +66 -2
  12. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index18.js +2 -77
  13. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index19.js +74 -3
  14. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index20.js +4 -5
  15. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index21.js +5 -4
  16. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index22.js +3 -32
  17. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index23.js +30 -39
  18. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index24.js +37 -166
  19. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index25.js +164 -39
  20. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index26.js +48 -1
  21. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index27.js +1 -50
  22. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index28.js +47 -4
  23. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index29.js +1 -1
  24. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index32.js +7 -7
  25. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index33.js +8 -24
  26. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index34.js +18 -125
  27. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index35.js +135 -16
  28. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index36.js +24 -4
  29. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index37.js +4 -41
  30. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index38.js +39 -87
  31. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index39.js +79 -84
  32. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index4.js +5 -25
  33. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index40.js +95 -48
  34. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index41.js +47 -119
  35. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index42.js +119 -33
  36. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index43.js +33 -177
  37. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index44.js +186 -75
  38. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index45.js +75 -21
  39. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index46.js +22 -232
  40. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index47.js +223 -204
  41. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index48.js +202 -103
  42. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index49.js +121 -13
  43. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index5.js +25 -24
  44. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index50.js +12 -47
  45. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index51.js +47 -31
  46. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index52.js +27 -198
  47. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index53.js +198 -30
  48. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index54.js +30 -234
  49. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index55.js +240 -19
  50. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index56.js +19 -383
  51. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index57.js +416 -4
  52. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index58.js +4 -35
  53. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index59.js +35 -189
  54. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index6.js +21 -57
  55. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index60.js +214 -3
  56. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index61.js +3 -4
  57. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index62.js +2 -44
  58. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index63.js +46 -1
  59. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index64.js +1 -8
  60. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index65.js +6 -10
  61. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index66.js +10 -110
  62. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index67.js +112 -3
  63. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index68.js +3 -127
  64. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index69.js +124 -8
  65. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index7.js +58 -5
  66. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index70.js +8 -7
  67. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index71.js +8 -46
  68. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index72.js +43 -18
  69. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index73.js +20 -28
  70. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index74.js +27 -82
  71. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index75.js +83 -47
  72. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index76.js +47 -250
  73. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index77.js +239 -101
  74. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index78.js +107 -202
  75. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index79.js +209 -3
  76. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index8.js +5 -4
  77. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index80.js +4 -8
  78. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index81.js +6 -113
  79. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index82.js +115 -1
  80. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index83.js +0 -24
  81. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index84.js +25 -0
  82. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index9.js +5 -70
  83. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index.js +44 -40
  84. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index100.js +170 -2
  85. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index101.js +2 -10
  86. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index102.js +12 -50
  87. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index103.js +108 -2
  88. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index104.js +2 -0
  89. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index105.js +10 -0
  90. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index106.js +52 -0
  91. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index107.js +2 -0
  92. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index16.js +21 -12
  93. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index17.js +10 -9
  94. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index18.js +11 -16
  95. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index19.js +18 -2
  96. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index20.js +2 -4
  97. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index21.js +2 -28
  98. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index22.js +30 -2
  99. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index23.js +2 -32
  100. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index24.js +32 -1
  101. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index25.js +1 -29
  102. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index26.js +26 -19
  103. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index27.js +20 -152
  104. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index28.js +154 -2
  105. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index29.js +1 -64
  106. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index30.js +61 -253
  107. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index31.js +258 -1
  108. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index32.js +2 -9
  109. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index33.js +7 -47
  110. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index34.js +49 -2
  111. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index35.js +2 -18
  112. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index36.js +15 -47
  113. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index37.js +50 -2
  114. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index38.js +2 -23
  115. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index39.js +21 -338
  116. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index40.js +340 -2
  117. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index41.js +2 -12
  118. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index42.js +9 -97
  119. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index43.js +96 -2
  120. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index44.js +1 -12
  121. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index45.js +11 -57
  122. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index46.js +58 -1
  123. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index47.js +1 -54
  124. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index48.js +52 -10
  125. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index49.js +10 -179
  126. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index50.js +181 -1
  127. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index51.js +2 -4
  128. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index52.js +2 -39
  129. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index53.js +41 -2
  130. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index54.js +2 -7
  131. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index55.js +5 -90
  132. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index56.js +92 -2
  133. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index57.js +2 -4
  134. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index58.js +2 -14
  135. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index59.js +16 -2
  136. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index60.js +1 -88
  137. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index61.js +86 -298
  138. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index62.js +299 -9
  139. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index63.js +13 -1
  140. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index64.js +1 -8
  141. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index65.js +6 -37
  142. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index66.js +39 -2
  143. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index67.js +2 -39
  144. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index68.js +2 -10
  145. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index69.js +30 -195
  146. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index70.js +0 -1
  147. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index71.js +36 -14
  148. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index72.js +10 -345
  149. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index73.js +199 -8
  150. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index74.js +3 -9
  151. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index75.js +15 -91
  152. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index76.js +347 -0
  153. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index77.js +10 -2
  154. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index78.js +7 -123
  155. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index79.js +91 -26
  156. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index81.js +1 -1
  157. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index82.js +123 -5
  158. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index83.js +26 -28
  159. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index84.js +94 -2
  160. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index85.js +2 -7
  161. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index86.js +5 -32
  162. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index87.js +30 -2
  163. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index88.js +2 -12
  164. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index89.js +5 -104
  165. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index90.js +34 -2
  166. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index91.js +2 -17
  167. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index92.js +10 -123
  168. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index93.js +105 -1
  169. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index94.js +2 -18
  170. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index95.js +13 -6
  171. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index96.js +74 -119
  172. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index97.js +1 -1
  173. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index98.js +15 -11
  174. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index99.js +8 -106
  175. package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/analytics/build-info.js +1 -1
  176. package/dist/libs/tesouro-embedded-components-react/shared/util/dist/lib/formatRejectionDate.js +11 -0
  177. package/dist/libs/tesouro-embedded-components-react/widget-suite/feature/dist/index8.js +1 -1
  178. package/package.json +1 -1
  179. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index80.js +0 -94
@@ -1,98 +1,93 @@
1
1
  import { formatCalendarDate as e } from "../../../shared/util/dist/lib/formatCalendarDate.js";
2
- import { derivePayableStatus as t } from "./index6.js";
3
- import { resolveVendor as n } from "./index7.js";
4
- import { resolveAmountDueMinorUnits as r } from "./index19.js";
5
- import { maskAccountNumber as i } from "./index21.js";
6
- import { formatBillMoney as a } from "./index2.js";
7
- import { getPaidAtLabel as o } from "./index38.js";
2
+ import { derivePayableStatus as t } from "./index7.js";
3
+ import { resolveVendor as n, resolveVendorName as r } from "./index8.js";
4
+ import { formatBillMoney as i } from "./index2.js";
8
5
  //#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index39.js
9
- function s({ payable: s, lineItems: c, glCodeOptions: l, glCodeRosterAvailable: u = !0, history: d, paymentHistory: f, approvalPolicy: p, labels: m, hasScheduledPayment: h, payableAchInstructions: g, payableAchInstructionsReadable: _ = !1 }) {
10
- let v = s.currency, y = t({
11
- apiStatus: s.status,
12
- dueDate: s.due_date,
13
- scheduledPaymentDate: s.scheduled_payment_date,
14
- hasScheduledPayment: h
15
- }), b = n(s), x = _ ? g : b?.bank_account, S = x?.account_number, C = !!(x?.account_holder_name && x.routing_number && x.account_number), w = e(s.issued_at) || m.notProvided, T = e(s.due_date) || m.notProvided, E = new Map(l.map((e) => [e.value, e.label])), D = [
6
+ function a({ payable: a, lineItems: s, ledgerAccounts: c, labels: l, hasScheduledPayment: u, now: d, rejection: f }) {
7
+ let p = a.currency, m = (e) => i(e, p), h = t({
8
+ apiStatus: a.status,
9
+ dueDate: a.due_date,
10
+ scheduledPaymentDate: a.scheduled_payment_date,
11
+ hasScheduledPayment: u,
12
+ now: d
13
+ }), g = n(a), _ = r(a), v = e(a.issued_at) || l.notProvided, y = e(a.due_date) || l.notProvided, b = [{
14
+ label: l.vendorRow,
15
+ value: _ || l.notProvided,
16
+ secondaryValue: g?.email ?? void 0
17
+ }], x = g?.bank_account?.account_number;
18
+ x && b.push({
19
+ label: l.bankAccountRow,
20
+ value: l.bankAccountValue(x.slice(-4))
21
+ });
22
+ let S = [
23
+ {
24
+ label: l.invoiceNumberRow,
25
+ value: a.document_id || l.notProvided
26
+ },
16
27
  {
17
- label: m.subtotalRow,
18
- minorUnits: s.subtotal
28
+ label: l.issueDateRow,
29
+ value: v
19
30
  },
20
31
  {
21
- label: m.discountRow,
22
- minorUnits: s.discount
32
+ label: l.dueDateRow,
33
+ value: y
23
34
  },
24
35
  {
25
- label: m.taxRow,
26
- minorUnits: s.tax_amount
36
+ label: l.poNumberRow,
37
+ value: l.notProvided
27
38
  }
28
- ].map((e) => ({
29
- label: e.label,
30
- value: a(e.minorUnits, v)
31
- })).filter((e) => !!e.value), O = a(s.total_amount, v);
32
- O && D.push({
33
- label: m.totalRow,
34
- value: O,
39
+ ], C = new Map(c.map((e) => [e.id, [e.nominal_code, e.name].filter(Boolean).join(" — ")])), w = s.map((e) => {
40
+ let t = m(e.unit_price);
41
+ return {
42
+ id: e.id,
43
+ description: e.name ?? e.description ?? "",
44
+ glCodeLabel: (e.ledger_account_id ? C.get(e.ledger_account_id) : void 0) || l.glCodeMissing,
45
+ quantityLabel: e.quantity != null && t ? l.quantityValue(String(e.quantity), t) : "",
46
+ amountLabel: m(e.subtotal) ?? ""
47
+ };
48
+ }), T = [
49
+ {
50
+ label: l.subtotalRow,
51
+ value: a.subtotal
52
+ },
53
+ {
54
+ label: l.discountsRow,
55
+ value: a.discount
56
+ },
57
+ {
58
+ label: l.taxRow,
59
+ value: a.tax_amount
60
+ }
61
+ ].map(({ label: e, value: t }) => ({
62
+ label: e,
63
+ value: m(t)
64
+ })).filter((e) => !!e.value), E = m(a.total_amount);
65
+ E && T.push({
66
+ label: l.totalRow,
67
+ value: E,
35
68
  emphasis: !0
36
69
  });
37
- let k = o(s);
70
+ let D = o(a);
38
71
  return {
39
- amountDue: a(r(s), v) ?? "",
40
- amountPaid: k ? a(s.amount_paid, v) : void 0,
41
- paidOnLabel: k ? m.paidOnLabel(k) : void 0,
42
- invoiceDateLabel: w,
43
- dueDateLabel: T,
44
- dueDateTone: y.isOverdue ? "danger" : "default",
45
- status: y.status,
46
- statusTone: y.tone,
47
- payTo: {
48
- name: b?.name || m.notProvided,
49
- email: b?.email ?? "",
50
- methodLabel: C ? m.paymentInstructionsValue(S?.slice(-4) ?? "") : m.paymentInstructionsNotSet,
51
- fields: C ? [
52
- {
53
- label: m.accountHolderFieldLabel,
54
- value: x?.account_holder_name ?? ""
55
- },
56
- {
57
- label: m.routingNumberFieldLabel,
58
- value: x?.routing_number ?? ""
59
- },
60
- {
61
- label: m.accountNumberFieldLabel,
62
- value: S ?? "",
63
- maskedValue: i(S ?? void 0)
64
- }
65
- ] : []
66
- },
67
- invoiceFields: [
68
- {
69
- label: m.invoiceDateRow,
70
- value: w
71
- },
72
- {
73
- label: m.dueDateRow,
74
- value: T
75
- },
76
- {
77
- label: m.invoiceNumberRow,
78
- value: s.document_id || m.notProvided
79
- }
80
- ],
81
- lineItems: c.map((e) => {
82
- let t = a(e.unit_price, v);
83
- return {
84
- id: e.id,
85
- description: e.name ?? e.description ?? "",
86
- glCodeLabel: e.ledger_account_id ? E.get(e.ledger_account_id) ?? (u ? m.glCodeMissing : m.glCodeUnavailable) : m.glCodeMissing,
87
- qtyPriceLabel: e.quantity != null && t ? m.qtyPriceValue(String(e.quantity), t) : "",
88
- amount: a(e.subtotal, v) ?? ""
89
- };
90
- }),
91
- amountRows: D,
92
- approvalPolicy: p,
93
- paymentHistory: f,
94
- history: d
72
+ title: _,
73
+ subtitle: l.subtitle,
74
+ status: h.status,
75
+ statusTone: h.tone,
76
+ amountDueLabel: m(a.amount_due) ?? m(a.total_amount) ?? "",
77
+ amountPaidLabel: D ? m(a.amount_paid) : void 0,
78
+ paidOnLabel: D ? l.paidOnLabel(D) : void 0,
79
+ invoiceDateLabel: v,
80
+ dueDateLabel: y,
81
+ dueDateTone: h.isOverdue ? "danger" : "default",
82
+ payToItems: b,
83
+ invoiceItems: S,
84
+ lineItems: w,
85
+ totals: T,
86
+ rejection: f
95
87
  };
96
88
  }
89
+ function o(t) {
90
+ return t.status === "paid" && t.paid_at ? e(t.paid_at.slice(0, 10)) : void 0;
91
+ }
97
92
  //#endregion
98
- export { s as buildBillDetailView };
93
+ export { o as getPaidAtLabel, a as mapPayableToBillDetails };
@@ -1,27 +1,7 @@
1
1
  //#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index4.js
2
- var e = {
3
- selectRow: ({ vendorLabel: e, invoiceNumberLabel: t, addedOnLabel: n }) => `Select bill — ${e}, invoice ${t}, added ${n}`,
4
- openRow: ({ vendorLabel: e, invoiceNumberLabel: t, addedOnLabel: n }) => `View bill — ${e}, invoice ${t}, added ${n}`,
5
- reviewGroup: ({ vendorLabel: e, count: t }) => `${e} — ${t} possible duplicate bills`,
6
- selectGroup: ({ vendorLabel: e }) => `Select every bill from ${e}`,
7
- deleteBillButton: "Remove this bill",
8
- deleteConfirmTitle: "Remove duplicate bill?",
9
- deleteConfirmDescription: "You can't undo this action.",
10
- deleteConfirmButton: "Remove duplicate bill",
11
- deleteConfirmBackButton: "Cancel",
12
- cancelBillButton: "Cancel this bill",
13
- confirmBillButton: "Confirm duplicate",
14
- cancelConfirmTitle: "Cancel duplicate bill?",
15
- cancelConfirmDescription: "You can't undo this action.",
16
- cancelConfirmButton: "Cancel this bill",
17
- cancelConfirmBackButton: "Back",
18
- deletedToast: "Duplicate removed",
19
- cancelledToast: "Duplicate cancelled",
20
- confirmedToast: "Duplicate confirmed",
21
- dismissedToast: "Marked as “not a duplicate”.",
22
- removedToast: "Duplicate removed",
23
- verdictFailedToast: "Couldn't update this duplicate. Try again.",
24
- allResolvedToast: "All possible duplicates resolved"
25
- };
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);
5
+ }
26
6
  //#endregion
27
- export { e as DUPLICATE_BILLS_LABELS_EN };
7
+ export { e as currentApprovalRound };
@@ -1,52 +1,99 @@
1
- import { derivePayableStatus as e } from "./index6.js";
2
- import { BILL_STATUS_BADGE_LABELS_EN as t } from "../../ui/dist/index16.js";
3
- import "../../ui/dist/index.js";
1
+ import { formatCalendarDate as e } from "../../../shared/util/dist/lib/formatCalendarDate.js";
2
+ import { derivePayableStatus as t } from "./index7.js";
3
+ import { resolveVendor as n } from "./index8.js";
4
+ import { resolveAmountDueMinorUnits as r } from "./index20.js";
5
+ import { maskAccountNumber as i } from "./index22.js";
6
+ import { formatBillMoney as a } from "./index2.js";
7
+ import { getPaidAtLabel as o } from "./index39.js";
4
8
  //#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index40.js
5
- var n = /* @__PURE__ */ new Set([
6
- "credit_note_linked",
7
- "credit_note_unlinked",
8
- "line_item_added",
9
- "line_item_updated",
10
- "line_item_removed",
11
- "deleted"
12
- ]);
13
- function r(n, r, i) {
14
- switch (n) {
15
- case "payable_created": return r?.source_of_payable_data === "ocr" ? i.billUploaded : i.billAdded;
16
- case "payable_updated": return i.billUpdated;
17
- case "file_attached": return i.attachmentAdded;
18
- case "submitted_for_approval": return i.submittedForApproval;
19
- case "approval_requested": return i.approvalRequested;
20
- case "approval_action": {
21
- let e = r?.action, t = r?.reject_reason;
22
- return e === "approve" ? i.approved : e === "reject" ? typeof t == "string" && t ? i.rejectedWithReason(t) : i.rejected : void 0;
9
+ function s({ payable: s, lineItems: c, glCodeOptions: l, glCodeRosterAvailable: u = !0, history: d, paymentHistory: f, approvalPolicy: p, labels: m, hasScheduledPayment: h, rejection: g, payableAchInstructions: _, payableAchInstructionsReadable: v = !1 }) {
10
+ let y = s.currency, b = t({
11
+ apiStatus: s.status,
12
+ dueDate: s.due_date,
13
+ scheduledPaymentDate: s.scheduled_payment_date,
14
+ hasScheduledPayment: h
15
+ }), x = n(s), S = v ? _ : x?.bank_account, C = S?.account_number, w = !!(S?.account_holder_name && S.routing_number && S.account_number), T = e(s.issued_at) || m.notProvided, E = e(s.due_date) || m.notProvided, D = new Map(l.map((e) => [e.value, e.label])), O = [
16
+ {
17
+ label: m.subtotalRow,
18
+ minorUnits: s.subtotal
19
+ },
20
+ {
21
+ label: m.discountRow,
22
+ minorUnits: s.discount
23
+ },
24
+ {
25
+ label: m.taxRow,
26
+ minorUnits: s.tax_amount
23
27
  }
24
- case "auto_approved": return i.autoApproved;
25
- case "reopened": return i.reopened;
26
- case "marked_as_paid": return i.markedAsPaid;
27
- case "marked_as_partially_paid": return i.markedAsPartiallyPaid;
28
- case "payment_reverted": return i.paymentReverted;
29
- case "status_changed": {
30
- let n = r?.new_status;
31
- if (typeof n != "string") return;
32
- let a = e({ apiStatus: n }).status;
33
- return i.statusChanged(t[a] ?? t.unknown);
34
- }
35
- default: return;
36
- }
37
- }
38
- function i(e, t, i) {
39
- let a = new Map(t.map((e) => [e.id, e.name]));
40
- return e.filter((e) => !n.has(e.event_type)).map((e) => {
41
- let t = r(e.event_type, e.event_data, i);
42
- if (!t) return;
43
- let n = e.entity_user_id ? a.get(e.entity_user_id) : void 0;
44
- return {
45
- id: e.id,
46
- dateLabel: i.dateLabel(e.timestamp),
47
- description: n ? i.byActor(t, n) : t
48
- };
49
- }).filter((e) => !!e);
28
+ ].map((e) => ({
29
+ label: e.label,
30
+ value: a(e.minorUnits, y)
31
+ })).filter((e) => !!e.value), k = a(s.total_amount, y);
32
+ k && O.push({
33
+ label: m.totalRow,
34
+ value: k,
35
+ emphasis: !0
36
+ });
37
+ let A = o(s);
38
+ return {
39
+ amountDue: a(r(s), y) ?? "",
40
+ amountPaid: A ? a(s.amount_paid, y) : void 0,
41
+ paidOnLabel: A ? m.paidOnLabel(A) : void 0,
42
+ invoiceDateLabel: T,
43
+ dueDateLabel: E,
44
+ dueDateTone: b.isOverdue ? "danger" : "default",
45
+ status: b.status,
46
+ statusTone: b.tone,
47
+ payTo: {
48
+ name: x?.name || m.notProvided,
49
+ email: x?.email ?? "",
50
+ methodLabel: w ? m.paymentInstructionsValue(C?.slice(-4) ?? "") : m.paymentInstructionsNotSet,
51
+ fields: w ? [
52
+ {
53
+ label: m.accountHolderFieldLabel,
54
+ value: S?.account_holder_name ?? ""
55
+ },
56
+ {
57
+ label: m.routingNumberFieldLabel,
58
+ value: S?.routing_number ?? ""
59
+ },
60
+ {
61
+ label: m.accountNumberFieldLabel,
62
+ value: C ?? "",
63
+ maskedValue: i(C ?? void 0)
64
+ }
65
+ ] : []
66
+ },
67
+ invoiceFields: [
68
+ {
69
+ label: m.invoiceDateRow,
70
+ value: T
71
+ },
72
+ {
73
+ label: m.dueDateRow,
74
+ value: E
75
+ },
76
+ {
77
+ label: m.invoiceNumberRow,
78
+ value: s.document_id || m.notProvided
79
+ }
80
+ ],
81
+ lineItems: c.map((e) => {
82
+ let t = a(e.unit_price, y);
83
+ return {
84
+ id: e.id,
85
+ description: e.name ?? e.description ?? "",
86
+ glCodeLabel: e.ledger_account_id ? D.get(e.ledger_account_id) ?? (u ? m.glCodeMissing : m.glCodeUnavailable) : m.glCodeMissing,
87
+ qtyPriceLabel: e.quantity != null && t ? m.qtyPriceValue(String(e.quantity), t) : "",
88
+ amount: a(e.subtotal, y) ?? ""
89
+ };
90
+ }),
91
+ amountRows: O,
92
+ approvalPolicy: p,
93
+ paymentHistory: f,
94
+ history: d,
95
+ rejection: g
96
+ };
50
97
  }
51
98
  //#endregion
52
- export { i as buildBillHistory };
99
+ export { s as buildBillDetailView };
@@ -1,124 +1,52 @@
1
+ import { derivePayableStatus as e } from "./index7.js";
2
+ import { BILL_STATUS_BADGE_LABELS_EN as t } from "../../ui/dist/index17.js";
3
+ import "../../ui/dist/index.js";
1
4
  //#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index41.js
2
- var e = {
3
- payBill: "Pay bill",
4
- markAsPaid: "Mark as paid",
5
- reject: "Reject",
6
- approve: "Approve",
7
- cancel: "Cancel bill",
8
- cancelScheduledPayment: "Cancel scheduled payment",
9
- reopen: "Reopen bill",
10
- forceApprove: "Approve",
11
- forceReject: "Reject",
12
- policyOverridesHeading: "Policy overrides",
13
- decisionDialog: {
14
- reject: {
15
- title: "Reject this bill?",
16
- description: "The bill goes back as rejected and nobody else is asked to approve it.",
17
- confirmButton: "Reject bill",
18
- reason: {
19
- label: "Reason",
20
- placeholder: "Tell the submitter what needs to change",
21
- optionalHint: "Optional"
22
- }
23
- },
24
- cancel: {
25
- title: "Cancel this bill?",
26
- description: "Cancelling is permanent. The bill can't be reopened, edited, or paid afterwards.",
27
- confirmButton: "Cancel bill"
28
- },
29
- cancelScheduledPayment: {
30
- title: "Cancel this scheduled payment?",
31
- description: "The payment will not be sent. The bill stays ready to pay, so you can schedule it again for another date.",
32
- confirmButton: "Cancel payment"
33
- },
34
- forceApprove: {
35
- title: "Override approval policy?",
36
- description: "The below people haven't approved this bill yet. Approving now will bypass their required review. This will be recorded in the audit history and can't be undone.",
37
- confirmButton: "Override and approve"
38
- },
39
- forceReject: {
40
- title: "Override approval policy?",
41
- description: "The below people haven't approved this bill yet. Rejecting now will bypass their required review. This will be recorded in the audit history and can't be undone.",
42
- confirmButton: "Override and reject"
43
- },
44
- cancelButton: "Cancel"
45
- },
46
- actionError: "Couldn't update this bill. Try again.",
47
- actionSuccess: {
48
- approve: "Bill approved.",
49
- reject: "Bill rejected.",
50
- markAsPaid: "Bill marked as paid.",
51
- cancel: "Bill canceled.",
52
- cancelScheduledPayment: "Scheduled payment canceled.",
53
- reopen: "Bill reopened.",
54
- forceApprove: "Bill approved, overriding the approval policy.",
55
- forceReject: "Bill rejected, overriding the approval policy."
56
- }
57
- }, t = (e) => `Payment scheduled for ${e}`, n = [
58
- "reject",
59
- "cancel",
60
- "cancelScheduledPayment",
61
- "forceApprove",
62
- "forceReject"
63
- ];
64
- function r(e, t) {
65
- let n = e.reason ? {
66
- ...e.reason,
67
- ...t?.reason
68
- } : void 0, r = {
69
- ...e,
70
- ...t,
71
- reason: n
72
- };
73
- return n || delete r.reason, r;
74
- }
75
- function i(e, t) {
76
- let i = {
77
- ...e,
78
- ...t
79
- };
80
- for (let a of n) i[a] = r(e[a], t?.[a]);
81
- return i;
82
- }
83
- function a(t) {
84
- let n = e;
85
- return {
86
- ...n,
87
- ...t,
88
- decisionDialog: i(n.decisionDialog, t?.decisionDialog),
89
- actionSuccess: {
90
- ...n.actionSuccess,
91
- ...t?.actionSuccess
5
+ var n = /* @__PURE__ */ new Set([
6
+ "credit_note_linked",
7
+ "credit_note_unlinked",
8
+ "line_item_added",
9
+ "line_item_updated",
10
+ "line_item_removed",
11
+ "deleted"
12
+ ]);
13
+ function r(n, r, i) {
14
+ switch (n) {
15
+ case "payable_created": return r?.source_of_payable_data === "ocr" ? i.billUploaded : i.billAdded;
16
+ case "payable_updated": return i.billUpdated;
17
+ case "file_attached": return i.attachmentAdded;
18
+ case "submitted_for_approval": return i.submittedForApproval;
19
+ case "approval_requested": return i.approvalRequested;
20
+ case "approval_action": {
21
+ let e = r?.action, t = r?.reject_reason;
22
+ return e === "approve" ? i.approved : e === "reject" ? typeof t == "string" && t ? i.rejectedWithReason(t) : i.rejected : void 0;
92
23
  }
93
- };
94
- }
95
- var o = {
96
- paymentHistorySentLabel: "Payment sent",
97
- paymentHistoryScheduledLabel: "Payment scheduled",
98
- paymentHistoryCanceledLabel: "Payment canceled",
99
- paymentHistoryOtherLabel: "Payment",
100
- paymentHistoryMethodSuffix: (e, t) => `${e} via ${t}`,
101
- paymentHistoryOverpaidLabel: (e) => `+${e} overpaid`,
102
- paymentHistoryMarkedPaidExternalLabel: "Marked as paid manually",
103
- paymentHistoryMarkedPaidLabel: "Marked as paid",
104
- paymentHistoryPartiallyPaidExternalLabel: "Partial payment marked manually",
105
- paymentHistoryPartiallyPaidLabel: "Partial payment",
106
- paymentHistoryRevertedLabel: "Payment reverted",
107
- paymentHistoryMethodLabels: {
108
- ach: "ACH",
109
- us_ach: "ACH",
110
- wire: "Wire",
111
- check: "Check",
112
- paper_check: "Check",
113
- bank_account: "Bank transfer",
114
- card: "Card"
24
+ case "auto_approved": return i.autoApproved;
25
+ case "reopened": return i.reopened;
26
+ case "marked_as_paid": return i.markedAsPaid;
27
+ case "marked_as_partially_paid": return i.markedAsPartiallyPaid;
28
+ case "payment_reverted": return i.paymentReverted;
29
+ case "status_changed": {
30
+ let n = r?.new_status;
31
+ if (typeof n != "string") return;
32
+ let a = e({ apiStatus: n }).status;
33
+ return i.statusChanged(t[a] ?? t.unknown);
34
+ }
35
+ default: return;
115
36
  }
116
- };
117
- function s(e) {
118
- return {
119
- ...o.paymentHistoryMethodLabels,
120
- ...e
121
- };
37
+ }
38
+ function i(e, t, i) {
39
+ let a = new Map(t.map((e) => [e.id, e.name]));
40
+ return e.filter((e) => !n.has(e.event_type)).map((e) => {
41
+ let t = r(e.event_type, e.event_data, i);
42
+ if (!t) return;
43
+ let n = e.entity_user_id ? a.get(e.entity_user_id) : void 0;
44
+ return {
45
+ id: e.id,
46
+ dateLabel: i.dateLabel(e.timestamp),
47
+ description: n ? i.byActor(t, n) : t
48
+ };
49
+ }).filter((e) => !!e);
122
50
  }
123
51
  //#endregion
124
- export { e as BILL_DETAIL_ACTIONS_LABELS_EN, o as PAYMENT_HISTORY_LABELS_EN, t as SCHEDULED_SUMMARY_LABEL_EN, a as mergeBillDetailActionsLabels, i as mergeDecisionDialogCopy, s as mergePaymentHistoryMethodLabels };
52
+ export { i as buildBillHistory };