@tesouro/embedded-components-react 0.4.13 → 0.4.15

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 (176) hide show
  1. package/dist/index.js +1 -1
  2. package/dist/lib/BillPayWidget.js +1 -1
  3. package/dist/lib/monite-sdk.d.ts +204 -468
  4. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index.js +14 -14
  5. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index10.js +37 -78
  6. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index11.js +98 -7
  7. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index12.js +81 -15
  8. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index13.js +7 -26
  9. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index14.js +16 -61
  10. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index15.js +26 -2
  11. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index16.js +63 -65
  12. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index17.js +2 -6
  13. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index18.js +66 -5
  14. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index19.js +2 -2
  15. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index2.js +6 -24
  16. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index20.js +4 -32
  17. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index21.js +3 -41
  18. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index22.js +28 -166
  19. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index23.js +40 -44
  20. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index24.js +173 -1
  21. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index25.js +45 -47
  22. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index26.js +1 -7
  23. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index27.js +45 -11
  24. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index28.js +4 -8
  25. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index29.js +13 -14
  26. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index3.js +55 -22
  27. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index30.js +8 -66
  28. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index31.js +7 -19
  29. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index32.js +58 -126
  30. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index33.js +15 -11
  31. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index34.js +134 -4
  32. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index35.js +14 -31
  33. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index36.js +4 -5
  34. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index37.js +39 -87
  35. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index38.js +78 -67
  36. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index39.js +78 -48
  37. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index4.js +24 -57
  38. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index40.js +47 -91
  39. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index41.js +119 -33
  40. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index42.js +33 -168
  41. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index43.js +170 -75
  42. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index44.js +75 -21
  43. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index45.js +23 -210
  44. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index46.js +199 -203
  45. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index47.js +198 -89
  46. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index48.js +105 -13
  47. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index49.js +12 -47
  48. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index5.js +23 -6
  49. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index50.js +47 -31
  50. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index51.js +27 -198
  51. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index52.js +198 -30
  52. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index53.js +30 -234
  53. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index54.js +240 -19
  54. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index55.js +19 -347
  55. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index56.js +364 -4
  56. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index57.js +4 -34
  57. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index58.js +32 -167
  58. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index59.js +186 -3
  59. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index6.js +56 -5
  60. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index60.js +3 -4
  61. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index61.js +2 -44
  62. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index62.js +46 -1
  63. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index63.js +1 -8
  64. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index64.js +6 -9
  65. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index65.js +9 -92
  66. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index66.js +94 -3
  67. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index67.js +3 -128
  68. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index68.js +125 -8
  69. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index69.js +8 -7
  70. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index7.js +5 -69
  71. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index70.js +8 -46
  72. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index71.js +43 -18
  73. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index72.js +20 -28
  74. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index73.js +27 -82
  75. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index74.js +83 -47
  76. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index75.js +47 -250
  77. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index76.js +239 -101
  78. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index77.js +107 -202
  79. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index78.js +209 -3
  80. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index79.js +4 -8
  81. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index8.js +5 -43
  82. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index80.js +6 -113
  83. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index81.js +115 -1
  84. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index82.js +0 -24
  85. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index83.js +25 -0
  86. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index9.js +64 -89
  87. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index.js +42 -40
  88. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index100.js +10 -2
  89. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index101.js +52 -0
  90. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index102.js +2 -0
  91. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index23.js +29 -47
  92. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index24.js +1 -297
  93. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index25.js +52 -2
  94. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index26.js +307 -7
  95. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index27.js +2 -49
  96. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index28.js +9 -2
  97. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index29.js +45 -14
  98. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index30.js +2 -50
  99. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index31.js +18 -2
  100. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index32.js +48 -21
  101. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index33.js +2 -340
  102. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index34.js +23 -2
  103. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index35.js +338 -14
  104. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index36.js +2 -120
  105. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index37.js +16 -2
  106. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index38.js +118 -10
  107. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index39.js +2 -99
  108. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index40.js +12 -2
  109. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index41.js +97 -11
  110. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index42.js +1 -58
  111. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index43.js +12 -1
  112. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index44.js +53 -49
  113. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index45.js +2 -13
  114. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index46.js +52 -179
  115. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index47.js +13 -2
  116. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index48.js +180 -2
  117. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index49.js +2 -41
  118. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index50.js +4 -2
  119. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index51.js +39 -5
  120. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index52.js +2 -92
  121. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index53.js +7 -2
  122. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index54.js +90 -2
  123. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index55.js +2 -16
  124. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index56.js +4 -2
  125. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index57.js +14 -84
  126. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index58.js +2 -287
  127. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index59.js +86 -11
  128. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index60.js +296 -1
  129. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index61.js +11 -6
  130. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index62.js +1 -39
  131. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index63.js +8 -2
  132. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index64.js +37 -37
  133. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index65.js +2 -12
  134. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index66.js +37 -199
  135. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index67.js +12 -3
  136. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index68.js +199 -15
  137. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index69.js +2 -346
  138. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index70.js +13 -6
  139. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index71.js +345 -6
  140. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index72.js +8 -91
  141. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index73.js +8 -0
  142. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index74.js +93 -2
  143. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index76.js +2 -28
  144. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index77.js +120 -82
  145. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index78.js +28 -2
  146. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index79.js +87 -5
  147. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index80.js +2 -30
  148. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index81.js +7 -2
  149. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index82.js +28 -5
  150. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index83.js +2 -34
  151. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index84.js +7 -2
  152. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index85.js +32 -10
  153. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index86.js +1 -105
  154. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index87.js +12 -2
  155. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index88.js +104 -15
  156. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index89.js +2 -125
  157. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index90.js +17 -2
  158. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index91.js +123 -16
  159. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index92.js +2 -10
  160. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index93.js +15 -167
  161. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index94.js +10 -2
  162. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index95.js +167 -11
  163. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index96.js +2 -108
  164. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index97.js +14 -2
  165. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index98.js +106 -8
  166. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index99.js +2 -52
  167. package/dist/libs/tesouro-embedded-components-react/cards-widget/feature/dist/index3.js +15 -3
  168. package/dist/libs/tesouro-embedded-components-react/cards-widget/feature/dist/index9.js +63 -65
  169. package/dist/libs/tesouro-embedded-components-react/cards-widget/ui/dist/lib/CardsList/CardsList.js +4 -2
  170. package/dist/libs/tesouro-embedded-components-react/cards-widget/ui/dist/lib/CardsList/CardsListDetailsSheet.js +6 -5
  171. package/dist/libs/tesouro-embedded-components-react/cards-widget/ui/dist/lib/CardsList/CardsListRow.js +1 -1
  172. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index618.js +1 -1
  173. package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/analytics/build-info.js +1 -1
  174. package/dist/libs/tesouro-embedded-components-react/widget-suite/feature/dist/index8.js +1 -1
  175. package/package.json +7 -7
  176. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index75.js +0 -127
@@ -1,81 +1,92 @@
1
1
  import { formatCalendarDate as e } from "../../../shared/util/dist/lib/formatCalendarDate.js";
2
- import { derivePayableStatus as t } from "./index4.js";
3
- import { resolveVendor as n } from "./index5.js";
4
- import { resolveAmountDueMinorUnits as r } from "./index17.js";
5
- import { formatBillMoney as i } from "./index36.js";
6
- import { getPaidAtLabel as a } from "./index37.js";
2
+ import { derivePayableStatus as t } from "./index6.js";
3
+ import { resolveVendor as n, resolveVendorName as r } from "./index7.js";
4
+ import { formatBillMoney as i } from "./index2.js";
7
5
  //#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index38.js
8
- function o({ payable: o, lineItems: s, glCodeOptions: c, glCodeRosterAvailable: l = !0, history: u, approvalPolicy: d, labels: f, hasScheduledPayment: p }) {
9
- let m = o.currency, h = t({
10
- apiStatus: o.status,
11
- dueDate: o.due_date,
12
- scheduledPaymentDate: o.scheduled_payment_date,
13
- hasScheduledPayment: p
14
- }), g = n(o), _ = g?.bank_account?.account_number, v = e(o.issued_at) || f.notProvided, y = e(o.due_date) || f.notProvided, b = new Map(c.map((e) => [e.value, e.label])), x = [
6
+ function a({ payable: a, lineItems: s, ledgerAccounts: c, labels: l, hasScheduledPayment: u, now: d }) {
7
+ let f = a.currency, p = (e) => i(e, f), m = t({
8
+ apiStatus: a.status,
9
+ dueDate: a.due_date,
10
+ scheduledPaymentDate: a.scheduled_payment_date,
11
+ hasScheduledPayment: u,
12
+ now: d
13
+ }), h = n(a), g = r(a), _ = e(a.issued_at) || l.notProvided, v = e(a.due_date) || l.notProvided, y = [{
14
+ label: l.vendorRow,
15
+ value: g || l.notProvided,
16
+ secondaryValue: h?.email ?? void 0
17
+ }], b = h?.bank_account?.account_number;
18
+ b && y.push({
19
+ label: l.bankAccountRow,
20
+ value: l.bankAccountValue(b.slice(-4))
21
+ });
22
+ let x = [
23
+ {
24
+ label: l.invoiceNumberRow,
25
+ value: a.document_id || l.notProvided
26
+ },
15
27
  {
16
- label: f.subtotalRow,
17
- minorUnits: o.subtotal
28
+ label: l.issueDateRow,
29
+ value: _
18
30
  },
19
31
  {
20
- label: f.discountRow,
21
- minorUnits: o.discount
32
+ label: l.dueDateRow,
33
+ value: v
22
34
  },
23
35
  {
24
- label: f.taxRow,
25
- minorUnits: o.tax_amount
36
+ label: l.poNumberRow,
37
+ value: l.notProvided
26
38
  }
27
- ].map((e) => ({
28
- label: e.label,
29
- value: i(e.minorUnits, m)
30
- })).filter((e) => !!e.value), S = i(o.total_amount, m);
31
- S && x.push({
32
- label: f.totalRow,
33
- value: S,
39
+ ], S = new Map(c.map((e) => [e.id, [e.nominal_code, e.name].filter(Boolean).join(" — ")])), C = s.map((e) => {
40
+ let t = p(e.unit_price);
41
+ return {
42
+ id: e.id,
43
+ description: e.name ?? e.description ?? "",
44
+ glCodeLabel: (e.ledger_account_id ? S.get(e.ledger_account_id) : void 0) || l.glCodeMissing,
45
+ quantityLabel: e.quantity != null && t ? l.quantityValue(String(e.quantity), t) : "",
46
+ amountLabel: p(e.subtotal) ?? ""
47
+ };
48
+ }), w = [
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: p(t)
64
+ })).filter((e) => !!e.value), T = p(a.total_amount);
65
+ T && w.push({
66
+ label: l.totalRow,
67
+ value: T,
34
68
  emphasis: !0
35
69
  });
36
- let C = a(o);
70
+ let E = o(a);
37
71
  return {
38
- amountDue: i(r(o), m) ?? "",
39
- amountPaid: C ? i(o.amount_paid, m) : void 0,
40
- paidOnLabel: C ? f.paidOnLabel(C) : void 0,
41
- invoiceDateLabel: v,
42
- dueDateLabel: y,
43
- dueDateTone: h.isOverdue ? "danger" : "default",
44
- status: h.status,
45
- statusTone: h.tone,
46
- payTo: {
47
- name: g?.name || f.notProvided,
48
- email: g?.email ?? void 0,
49
- paymentInstructionsLabel: _ ? f.paymentInstructionsValue(_.slice(-4)) : void 0
50
- },
51
- invoiceFields: [
52
- {
53
- label: f.invoiceDateRow,
54
- value: v
55
- },
56
- {
57
- label: f.dueDateRow,
58
- value: y
59
- },
60
- {
61
- label: f.invoiceNumberRow,
62
- value: o.document_id || f.notProvided
63
- }
64
- ],
65
- lineItems: s.map((e) => {
66
- let t = i(e.unit_price, m);
67
- return {
68
- id: e.id,
69
- description: e.name ?? e.description ?? "",
70
- glCodeLabel: e.ledger_account_id ? b.get(e.ledger_account_id) ?? (l ? f.glCodeMissing : f.glCodeUnavailable) : f.glCodeMissing,
71
- qtyPriceLabel: e.quantity != null && t ? f.qtyPriceValue(String(e.quantity), t) : "",
72
- amount: i(e.subtotal, m) ?? ""
73
- };
74
- }),
75
- amountRows: x,
76
- approvalPolicy: d,
77
- history: u
72
+ title: g,
73
+ subtitle: l.subtitle,
74
+ status: m.status,
75
+ statusTone: m.tone,
76
+ amountDueLabel: p(a.amount_due) ?? p(a.total_amount) ?? "",
77
+ amountPaidLabel: E ? p(a.amount_paid) : void 0,
78
+ paidOnLabel: E ? l.paidOnLabel(E) : void 0,
79
+ invoiceDateLabel: _,
80
+ dueDateLabel: v,
81
+ dueDateTone: m.isOverdue ? "danger" : "default",
82
+ payToItems: y,
83
+ invoiceItems: x,
84
+ lineItems: C,
85
+ totals: w
78
86
  };
79
87
  }
88
+ function o(t) {
89
+ return t.status === "paid" && t.paid_at ? e(t.paid_at.slice(0, 10)) : void 0;
90
+ }
80
91
  //#endregion
81
- export { o as buildBillDetailView };
92
+ export { o as getPaidAtLabel, a as mapPayableToBillDetails };
@@ -1,52 +1,82 @@
1
- import { derivePayableStatus as e } from "./index4.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 "./index6.js";
3
+ import { resolveVendor as n } from "./index7.js";
4
+ import { resolveAmountDueMinorUnits as r } from "./index19.js";
5
+ import { formatBillMoney as i } from "./index2.js";
6
+ import { getPaidAtLabel as a } from "./index38.js";
4
7
  //#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index39.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;
8
+ function o({ payable: o, lineItems: s, glCodeOptions: c, glCodeRosterAvailable: l = !0, history: u, paymentHistory: d, approvalPolicy: f, labels: p, hasScheduledPayment: m }) {
9
+ let h = o.currency, g = t({
10
+ apiStatus: o.status,
11
+ dueDate: o.due_date,
12
+ scheduledPaymentDate: o.scheduled_payment_date,
13
+ hasScheduledPayment: m
14
+ }), _ = n(o), v = _?.bank_account?.account_number, y = e(o.issued_at) || p.notProvided, b = e(o.due_date) || p.notProvided, x = new Map(c.map((e) => [e.value, e.label])), S = [
15
+ {
16
+ label: p.subtotalRow,
17
+ minorUnits: o.subtotal
18
+ },
19
+ {
20
+ label: p.discountRow,
21
+ minorUnits: o.discount
22
+ },
23
+ {
24
+ label: p.taxRow,
25
+ minorUnits: o.tax_amount
23
26
  }
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);
27
+ ].map((e) => ({
28
+ label: e.label,
29
+ value: i(e.minorUnits, h)
30
+ })).filter((e) => !!e.value), C = i(o.total_amount, h);
31
+ C && S.push({
32
+ label: p.totalRow,
33
+ value: C,
34
+ emphasis: !0
35
+ });
36
+ let w = a(o);
37
+ return {
38
+ amountDue: i(r(o), h) ?? "",
39
+ amountPaid: w ? i(o.amount_paid, h) : void 0,
40
+ paidOnLabel: w ? p.paidOnLabel(w) : void 0,
41
+ invoiceDateLabel: y,
42
+ dueDateLabel: b,
43
+ dueDateTone: g.isOverdue ? "danger" : "default",
44
+ status: g.status,
45
+ statusTone: g.tone,
46
+ payTo: {
47
+ name: _?.name || p.notProvided,
48
+ email: _?.email ?? void 0,
49
+ paymentInstructionsLabel: v ? p.paymentInstructionsValue(v.slice(-4)) : void 0
50
+ },
51
+ invoiceFields: [
52
+ {
53
+ label: p.invoiceDateRow,
54
+ value: y
55
+ },
56
+ {
57
+ label: p.dueDateRow,
58
+ value: b
59
+ },
60
+ {
61
+ label: p.invoiceNumberRow,
62
+ value: o.document_id || p.notProvided
63
+ }
64
+ ],
65
+ lineItems: s.map((e) => {
66
+ let t = i(e.unit_price, h);
67
+ return {
68
+ id: e.id,
69
+ description: e.name ?? e.description ?? "",
70
+ glCodeLabel: e.ledger_account_id ? x.get(e.ledger_account_id) ?? (l ? p.glCodeMissing : p.glCodeUnavailable) : p.glCodeMissing,
71
+ qtyPriceLabel: e.quantity != null && t ? p.qtyPriceValue(String(e.quantity), t) : "",
72
+ amount: i(e.subtotal, h) ?? ""
73
+ };
74
+ }),
75
+ amountRows: S,
76
+ approvalPolicy: f,
77
+ paymentHistory: d,
78
+ history: u
79
+ };
50
80
  }
51
81
  //#endregion
52
- export { i as buildBillHistory };
82
+ export { o as buildBillDetailView };
@@ -1,59 +1,26 @@
1
1
  //#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index4.js
2
- var e = /* @__PURE__ */ new Set([
3
- "new",
4
- "approve_in_progress",
5
- "waiting_to_be_paid",
6
- "partially_paid"
7
- ]);
8
- function t(e, t) {
9
- let n = /* @__PURE__ */ new Date(`${e.slice(0, 10)}T00:00:00Z`), r = Date.UTC(t.getUTCFullYear(), t.getUTCMonth(), t.getUTCDate());
10
- return n.getTime() < r;
11
- }
12
- function n({ apiStatus: n, dueDate: r, scheduledPaymentDate: i, hasScheduledPayment: a = !!i, now: o = /* @__PURE__ */ new Date() }) {
13
- if (e.has(n) && a) return {
14
- status: "scheduled",
15
- tone: "accent",
16
- isOverdue: !1
17
- };
18
- let s = !!(e.has(n) && r && t(r, o));
19
- switch (n) {
20
- case "draft":
21
- case "new": return {
22
- status: "draft",
23
- tone: "neutral",
24
- isOverdue: s
25
- };
26
- case "approve_in_progress": return {
27
- status: "pending_approval",
28
- tone: "warning",
29
- isOverdue: s
30
- };
31
- case "waiting_to_be_paid": return {
32
- status: "ready_to_pay",
33
- tone: "info",
34
- isOverdue: s
35
- };
36
- case "partially_paid": return {
37
- status: "partially_paid",
38
- tone: "success",
39
- isOverdue: s
40
- };
41
- case "paid": return {
42
- status: "paid",
43
- tone: "success",
44
- isOverdue: s
45
- };
46
- case "canceled": return {
47
- status: "canceled",
48
- tone: "muted",
49
- isOverdue: s
50
- };
51
- case "rejected": return {
52
- status: "rejected",
53
- tone: "danger",
54
- isOverdue: s
55
- };
56
- }
57
- }
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
+ };
58
25
  //#endregion
59
- export { n as derivePayableStatus };
26
+ export { e as DUPLICATE_BILLS_LABELS_EN };
@@ -1,96 +1,52 @@
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
4
  //#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index40.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."
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;
23
+ }
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;
56
36
  }
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
37
  }
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
92
- }
93
- };
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);
94
50
  }
95
51
  //#endregion
96
- export { e as BILL_DETAIL_ACTIONS_LABELS_EN, t as SCHEDULED_SUMMARY_LABEL_EN, a as mergeBillDetailActionsLabels, i as mergeDecisionDialogCopy };
52
+ export { i as buildBillHistory };