@tesouro/embedded-components-react 0.4.21 → 0.4.23

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 (185) 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 +13 -13
  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 +136 -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 +3 -121
  35. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index42.js +49 -35
  36. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index43.js +113 -171
  37. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index44.js +32 -74
  38. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index45.js +186 -21
  39. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index46.js +70 -226
  40. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index47.js +22 -219
  41. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index48.js +221 -109
  42. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index49.js +220 -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 +119 -46
  45. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index51.js +13 -32
  46. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index52.js +43 -198
  47. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index53.js +29 -32
  48. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index54.js +186 -222
  49. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index55.js +36 -19
  50. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index56.js +230 -375
  51. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index57.js +21 -4
  52. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index58.js +424 -32
  53. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index59.js +4 -192
  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 +38 -3
  56. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index61.js +219 -2
  57. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index62.js +3 -46
  58. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index63.js +4 -1
  59. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index64.js +44 -6
  60. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index65.js +1 -12
  61. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index66.js +6 -110
  62. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index67.js +12 -3
  63. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index68.js +109 -124
  64. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index69.js +3 -11
  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 +124 -7
  67. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index71.js +8 -45
  68. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index72.js +8 -21
  69. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index73.js +45 -28
  70. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index74.js +20 -83
  71. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index75.js +28 -47
  72. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index76.js +76 -243
  73. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index77.js +48 -113
  74. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index78.js +239 -196
  75. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index79.js +115 -4
  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 +207 -5
  78. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index81.js +3 -114
  79. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index82.js +8 -1
  80. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index83.js +106 -16
  81. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index84.js +1 -0
  82. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index85.js +25 -0
  83. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index9.js +5 -70
  84. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index.js +44 -40
  85. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index100.js +170 -2
  86. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index101.js +2 -10
  87. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index102.js +12 -50
  88. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index103.js +108 -2
  89. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index104.js +2 -0
  90. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index105.js +10 -0
  91. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index106.js +52 -0
  92. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index107.js +2 -0
  93. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index16.js +21 -12
  94. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index17.js +10 -9
  95. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index18.js +11 -16
  96. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index19.js +18 -2
  97. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index20.js +2 -4
  98. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index21.js +2 -28
  99. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index22.js +30 -2
  100. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index23.js +2 -32
  101. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index24.js +32 -1
  102. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index25.js +1 -29
  103. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index26.js +26 -19
  104. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index27.js +20 -152
  105. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index28.js +154 -2
  106. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index29.js +1 -64
  107. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index30.js +61 -253
  108. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index31.js +258 -1
  109. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index32.js +2 -9
  110. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index33.js +7 -47
  111. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index34.js +49 -2
  112. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index35.js +2 -18
  113. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index36.js +15 -47
  114. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index37.js +50 -2
  115. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index38.js +2 -23
  116. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index39.js +21 -338
  117. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index40.js +340 -2
  118. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index41.js +2 -11
  119. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index42.js +9 -94
  120. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index43.js +96 -2
  121. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index44.js +1 -12
  122. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index45.js +11 -57
  123. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index46.js +58 -1
  124. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index47.js +1 -54
  125. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index48.js +52 -10
  126. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index49.js +10 -179
  127. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index50.js +181 -1
  128. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index51.js +2 -4
  129. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index52.js +2 -39
  130. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index53.js +41 -2
  131. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index54.js +2 -7
  132. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index55.js +5 -90
  133. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index56.js +92 -2
  134. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index57.js +2 -4
  135. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index58.js +2 -14
  136. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index59.js +16 -2
  137. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index60.js +1 -88
  138. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index61.js +86 -298
  139. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index62.js +299 -9
  140. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index63.js +13 -1
  141. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index64.js +1 -8
  142. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index65.js +6 -37
  143. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index66.js +39 -2
  144. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index67.js +2 -39
  145. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index68.js +2 -10
  146. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index69.js +30 -195
  147. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index70.js +0 -1
  148. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index71.js +36 -14
  149. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index72.js +10 -345
  150. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index73.js +199 -8
  151. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index74.js +3 -9
  152. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index75.js +15 -91
  153. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index76.js +347 -0
  154. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index77.js +10 -2
  155. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index78.js +7 -123
  156. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index79.js +91 -26
  157. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index81.js +1 -1
  158. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index82.js +123 -5
  159. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index83.js +26 -28
  160. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index84.js +94 -2
  161. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index85.js +2 -7
  162. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index86.js +5 -32
  163. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index87.js +30 -2
  164. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index88.js +2 -12
  165. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index89.js +5 -104
  166. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index90.js +34 -2
  167. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index91.js +2 -17
  168. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index92.js +10 -123
  169. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index93.js +105 -1
  170. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index94.js +2 -18
  171. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index95.js +13 -6
  172. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index96.js +74 -119
  173. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index97.js +1 -1
  174. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index98.js +15 -11
  175. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index99.js +8 -106
  176. package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/index.js +1 -1
  177. package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/client.config.js +2 -2
  178. package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/finopsApiVersion.js +4 -0
  179. package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/analytics/build-info.js +1 -1
  180. package/dist/libs/tesouro-embedded-components-react/shared/util/dist/lib/formatRejectionDate.js +11 -0
  181. package/dist/libs/tesouro-embedded-components-react/widget-suite/feature/dist/index8.js +1 -1
  182. package/package.json +33 -1
  183. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index80.js +0 -94
  184. package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/api-version.js +0 -3
  185. package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/api-version.json.js +0 -4
@@ -1,26 +1,21 @@
1
+ import { MARK_AS_PAID_DIALOG_LABELS_EN as e } from "../../ui/dist/index95.js";
2
+ import "../../ui/dist/index.js";
1
3
  //#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index15.js
2
- var e = new Intl.DateTimeFormat("en-CA", {
3
- timeZone: "America/New_York",
4
- year: "numeric",
5
- month: "2-digit",
6
- day: "2-digit"
7
- });
8
- function t(t = /* @__PURE__ */ new Date()) {
9
- let n = e.formatToParts(t), r = Object.fromEntries(n.map((e) => [e.type, e.value]));
10
- return `${r.year}-${r.month}-${r.day}`;
11
- }
4
+ var t = {
5
+ dueDateSuffix: (e) => `by ${e}`,
6
+ paidToast: "Bill marked as paid",
7
+ submitError: "Couldn't mark this bill as paid. Try again.",
8
+ dialog: e
9
+ };
12
10
  function n(e) {
13
- return `${e.getFullYear()}-${String(e.getMonth() + 1).padStart(2, "0")}-${String(e.getDate()).padStart(2, "0")}`;
14
- }
15
- function r(e, r = /* @__PURE__ */ new Date()) {
16
- return n(e) === t(r);
17
- }
18
- function i(e = /* @__PURE__ */ new Date()) {
19
- let [n, r, i] = t(e).split("-").map(Number);
20
- return new Date(n, r - 1, i);
21
- }
22
- function a(e, r = /* @__PURE__ */ new Date()) {
23
- return n(e) < t(r);
11
+ return {
12
+ ...t,
13
+ ...e,
14
+ dialog: {
15
+ ...t.dialog,
16
+ ...e?.dialog
17
+ }
18
+ };
24
19
  }
25
20
  //#endregion
26
- export { n as dateToCalendarKey, i as getDefaultPaymentDate, t as getEasternDateKey, a as isPastEasternDate, r as isTodayInEastern };
21
+ export { t as MARK_AS_PAID_FLOW_LABELS_EN, n as mergeMarkAsPaidFlowLabels };
@@ -1,66 +1,26 @@
1
- "use client";
2
- "use client";
3
- "use client";
4
- "use client";
5
- import { toast as e } from "../../../../../packages/shared-ui-shadcn/dist/index.js";
6
- import "../../../shared/ui/dist/index.js";
7
- import { formatCalendarDate as t } from "../../../shared/util/dist/lib/formatCalendarDate.js";
8
- import { formatMoneyExact as n } from "../../../shared/util/dist/lib/formatMoneyExact.js";
9
- import { extractApiErrorMessage as r } from "../../../shared/util/dist/lib/apiErrors.js";
10
- import { useMarkPayableAsPaidMutation as i } from "../../data-access/dist/index13.js";
11
- import "../../data-access/dist/index.js";
12
- import { dateToCalendarKey as a, getDefaultPaymentDate as o, isTodayInEastern as s } from "./index15.js";
13
- import { mergeMarkAsPaidFlowLabels as c } from "./index14.js";
14
- import { useEffect as l, useState as u } from "react";
15
1
  //#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index16.js
16
- function d({ payableId: d, amountDueMinorUnits: f, amountToPayMinorUnits: p, currencyCode: m, dueDate: h, hasScheduledPayment: g, testId: _, labels: v }) {
17
- let y = c(v), b = i(), [x, S] = u(!1), [C, w] = u(void 0), [T, E] = u(""), D = x && !g, O = n(f / 100, { currencyCode: m }), k = n((p ?? f) / 100, { currencyCode: m }), A = C ? t(a(C)) : void 0, j = h ? y.dueDateSuffix(t(h)) : void 0, M = () => {
18
- S(!1), w(void 0), E("");
19
- };
20
- return l(() => {
21
- g && (S(!1), w(void 0), E(""));
22
- }, [g]), {
23
- open: () => {
24
- w(o()), E(""), S(!0);
25
- },
26
- isPending: b.isPending,
27
- dialogProps: {
28
- open: D,
29
- amountDue: O,
30
- dueDateSuffix: j,
31
- paymentAmount: k,
32
- selectedDate: C,
33
- selectedDateLabel: A,
34
- isToday: C ? s(C) : !1,
35
- comment: T,
36
- isSubmitting: b.isPending,
37
- onDateChange: w,
38
- onCommentChange: E,
39
- onConfirm: () => {
40
- !d || !C || b.isPending || g || b.mutate({
41
- path: { payable_id: d },
42
- body: {
43
- paid_at: `${a(C)}T12:00:00.000Z`,
44
- is_external: !0,
45
- ...T.trim() ? { comment: T.trim() } : {}
46
- }
47
- }, {
48
- onSuccess: () => {
49
- e.success(y.paidToast), M();
50
- },
51
- onError: (t) => {
52
- e.error(r(t) ?? y.submitError);
53
- }
54
- });
55
- },
56
- onCancel: () => {
57
- b.isPending || M();
58
- },
59
- testId: _ ? `${_}-mark-as-paid-dialog` : void 0,
60
- confirmTestId: _ ? `${_}-mark-as-paid-confirm` : void 0,
61
- labels: y.dialog
62
- }
63
- };
2
+ var e = new Intl.DateTimeFormat("en-CA", {
3
+ timeZone: "America/New_York",
4
+ year: "numeric",
5
+ month: "2-digit",
6
+ day: "2-digit"
7
+ });
8
+ function t(t = /* @__PURE__ */ new Date()) {
9
+ let n = e.formatToParts(t), r = Object.fromEntries(n.map((e) => [e.type, e.value]));
10
+ return `${r.year}-${r.month}-${r.day}`;
11
+ }
12
+ function n(e) {
13
+ return `${e.getFullYear()}-${String(e.getMonth() + 1).padStart(2, "0")}-${String(e.getDate()).padStart(2, "0")}`;
14
+ }
15
+ function r(e, r = /* @__PURE__ */ new Date()) {
16
+ return n(e) === t(r);
17
+ }
18
+ function i(e = /* @__PURE__ */ new Date()) {
19
+ let [n, r, i] = t(e).split("-").map(Number);
20
+ return new Date(n, r - 1, i);
21
+ }
22
+ function a(e, r = /* @__PURE__ */ new Date()) {
23
+ return n(e) < t(r);
64
24
  }
65
25
  //#endregion
66
- export { d as useMarkAsPaidFlow };
26
+ export { n as dateToCalendarKey, i as getDefaultPaymentDate, t as getEasternDateKey, a as isPastEasternDate, r as isTodayInEastern };
@@ -1,2 +1,66 @@
1
- import "./index14.js";
2
- import "./index16.js";
1
+ "use client";
2
+ "use client";
3
+ "use client";
4
+ "use client";
5
+ import { toast as e } from "../../../../../packages/shared-ui-shadcn/dist/index.js";
6
+ import "../../../shared/ui/dist/index.js";
7
+ import { formatCalendarDate as t } from "../../../shared/util/dist/lib/formatCalendarDate.js";
8
+ import { formatMoneyExact as n } from "../../../shared/util/dist/lib/formatMoneyExact.js";
9
+ import { extractApiErrorMessage as r } from "../../../shared/util/dist/lib/apiErrors.js";
10
+ import { useMarkPayableAsPaidMutation as i } from "../../data-access/dist/index13.js";
11
+ import "../../data-access/dist/index.js";
12
+ import { dateToCalendarKey as a, getDefaultPaymentDate as o, isTodayInEastern as s } from "./index16.js";
13
+ import { mergeMarkAsPaidFlowLabels as c } from "./index15.js";
14
+ import { useEffect as l, useState as u } from "react";
15
+ //#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index17.js
16
+ function d({ payableId: d, amountDueMinorUnits: f, amountToPayMinorUnits: p, currencyCode: m, dueDate: h, hasScheduledPayment: g, testId: _, labels: v }) {
17
+ let y = c(v), b = i(), [x, S] = u(!1), [C, w] = u(void 0), [T, E] = u(""), D = x && !g, O = n(f / 100, { currencyCode: m }), k = n((p ?? f) / 100, { currencyCode: m }), A = C ? t(a(C)) : void 0, j = h ? y.dueDateSuffix(t(h)) : void 0, M = () => {
18
+ S(!1), w(void 0), E("");
19
+ };
20
+ return l(() => {
21
+ g && (S(!1), w(void 0), E(""));
22
+ }, [g]), {
23
+ open: () => {
24
+ w(o()), E(""), S(!0);
25
+ },
26
+ isPending: b.isPending,
27
+ dialogProps: {
28
+ open: D,
29
+ amountDue: O,
30
+ dueDateSuffix: j,
31
+ paymentAmount: k,
32
+ selectedDate: C,
33
+ selectedDateLabel: A,
34
+ isToday: C ? s(C) : !1,
35
+ comment: T,
36
+ isSubmitting: b.isPending,
37
+ onDateChange: w,
38
+ onCommentChange: E,
39
+ onConfirm: () => {
40
+ !d || !C || b.isPending || g || b.mutate({
41
+ path: { payable_id: d },
42
+ body: {
43
+ paid_at: `${a(C)}T12:00:00.000Z`,
44
+ is_external: !0,
45
+ ...T.trim() ? { comment: T.trim() } : {}
46
+ }
47
+ }, {
48
+ onSuccess: () => {
49
+ e.success(y.paidToast), M();
50
+ },
51
+ onError: (t) => {
52
+ e.error(r(t) ?? y.submitError);
53
+ }
54
+ });
55
+ },
56
+ onCancel: () => {
57
+ b.isPending || M();
58
+ },
59
+ testId: _ ? `${_}-mark-as-paid-dialog` : void 0,
60
+ confirmTestId: _ ? `${_}-mark-as-paid-confirm` : void 0,
61
+ labels: y.dialog
62
+ }
63
+ };
64
+ }
65
+ //#endregion
66
+ export { d as useMarkAsPaidFlow };
@@ -1,77 +1,2 @@
1
- import { hasAnyScope as e } from "../../../shared/data-access/dist/lib/hasAnyScope.js";
2
- import { Scope as t } from "../../../shared/data-access/dist/lib/scopes.js";
3
- import "../../../shared/data-access/dist/index.js";
4
- import { BanIcon as n, CalendarXIcon as r, RotateCcwIcon as i, ThumbsDownIcon as a, ThumbsUpIcon as o } from "lucide-react";
5
- //#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index18.js
6
- function s(n) {
7
- return e(n, [t.CounterpartReadOrg]);
8
- }
9
- function c({ status: n, scopes: r, hasWaitingRequest: i, arePendingApproversUnknown: a }) {
10
- let o = e(r, [t.PayableApproveOrg]);
11
- return !!(n === "approve_in_progress" && i && o && !a);
12
- }
13
- function l({ status: l, scopes: u, canDecideApprovalRequest: d, hasScheduledPayment: f, scheduledPaymentIntentId: p, hasWaitingRequest: m, arePendingApproversUnknown: h, labels: g }) {
14
- let _ = e(u, [t.PayablePayOrg]), v = e(u, [t.BankAccountReadOrg]), y = s(u), b = e(u, [t.PaymentRailAch]), x = e(u, [t.PayableWriteOrg]), S = _, C = [];
15
- l === "approve_in_progress" && d && (C.push({
16
- id: "approve",
17
- label: g.approve,
18
- variant: "default",
19
- surface: "row"
20
- }), C.push({
21
- id: "reject",
22
- label: g.reject,
23
- variant: "ghost",
24
- surface: "row"
25
- })), c({
26
- status: l,
27
- scopes: u,
28
- hasWaitingRequest: m,
29
- arePendingApproversUnknown: h
30
- }) && (C.push({
31
- id: "forceApprove",
32
- label: g.forceApprove,
33
- variant: "ghost",
34
- surface: "menu",
35
- icon: o,
36
- sectionHeading: g.policyOverridesHeading
37
- }), C.push({
38
- id: "forceReject",
39
- label: g.forceReject,
40
- variant: "ghost",
41
- surface: "menu",
42
- icon: a,
43
- sectionHeading: g.policyOverridesHeading
44
- }));
45
- let w = l === "waiting_to_be_paid" && _ && !f, T = l === "waiting_to_be_paid" && _ && v && y && b && !f;
46
- return w && C.push({
47
- id: "markAsPaid",
48
- label: g.markAsPaid,
49
- variant: "outline",
50
- surface: "row"
51
- }), T && C.push({
52
- id: "payBill",
53
- label: g.payBill,
54
- variant: "default",
55
- surface: "row"
56
- }), l === "new" && x && C.push({
57
- id: "cancel",
58
- label: g.cancel,
59
- variant: "ghost",
60
- surface: "menu",
61
- icon: n
62
- }), (l === "rejected" || l === "waiting_to_be_paid" && !f) && x && C.push({
63
- id: "reopen",
64
- label: g.reopen,
65
- variant: "ghost",
66
- surface: "menu",
67
- icon: i
68
- }), l === "waiting_to_be_paid" && f && p && S && C.push({
69
- id: "cancelScheduledPayment",
70
- label: g.cancelScheduledPayment,
71
- variant: "ghost",
72
- surface: "menu",
73
- icon: r
74
- }), C;
75
- }
76
- //#endregion
77
- export { c as canOverrideApprovalPolicy, s as canReadCounterpartBankAccounts, l as getBillDetailActions };
1
+ import "./index15.js";
2
+ import "./index17.js";
@@ -1,6 +1,77 @@
1
+ import { hasAnyScope as e } from "../../../shared/data-access/dist/lib/hasAnyScope.js";
2
+ import { Scope as t } from "../../../shared/data-access/dist/lib/scopes.js";
3
+ import "../../../shared/data-access/dist/index.js";
4
+ import { BanIcon as n, CalendarXIcon as r, RotateCcwIcon as i, ThumbsDownIcon as a, ThumbsUpIcon as o } from "lucide-react";
1
5
  //#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index19.js
2
- function e(e) {
3
- return e?.amount_due ?? e?.total_amount ?? void 0;
6
+ function s(n) {
7
+ return e(n, [t.CounterpartReadOrg]);
8
+ }
9
+ function c({ status: n, scopes: r, hasWaitingRequest: i, arePendingApproversUnknown: a }) {
10
+ let o = e(r, [t.PayableApproveOrg]);
11
+ return !!(n === "approve_in_progress" && i && o && !a);
12
+ }
13
+ function l({ status: l, scopes: u, canDecideApprovalRequest: d, hasScheduledPayment: f, scheduledPaymentIntentId: p, hasWaitingRequest: m, arePendingApproversUnknown: h, isPayabilityUnknown: g, labels: _ }) {
14
+ let v = e(u, [t.PayablePayOrg]), y = e(u, [t.BankAccountReadOrg]), b = s(u), x = e(u, [t.PaymentRailAch]), S = e(u, [t.PayableWriteOrg]), C = v, w = [];
15
+ l === "approve_in_progress" && d && (w.push({
16
+ id: "approve",
17
+ label: _.approve,
18
+ variant: "default",
19
+ surface: "row"
20
+ }), w.push({
21
+ id: "reject",
22
+ label: _.reject,
23
+ variant: "ghost",
24
+ surface: "row"
25
+ })), c({
26
+ status: l,
27
+ scopes: u,
28
+ hasWaitingRequest: m,
29
+ arePendingApproversUnknown: h
30
+ }) && (w.push({
31
+ id: "forceApprove",
32
+ label: _.forceApprove,
33
+ variant: "ghost",
34
+ surface: "menu",
35
+ icon: o,
36
+ sectionHeading: _.policyOverridesHeading
37
+ }), w.push({
38
+ id: "forceReject",
39
+ label: _.forceReject,
40
+ variant: "ghost",
41
+ surface: "menu",
42
+ icon: a,
43
+ sectionHeading: _.policyOverridesHeading
44
+ }));
45
+ let T = l === "waiting_to_be_paid" && v && !f, E = l === "waiting_to_be_paid" && v && y && b && x && !f && !g;
46
+ return T && w.push({
47
+ id: "markAsPaid",
48
+ label: _.markAsPaid,
49
+ variant: "outline",
50
+ surface: "row"
51
+ }), E && w.push({
52
+ id: "payBill",
53
+ label: _.payBill,
54
+ variant: "default",
55
+ surface: "row"
56
+ }), l === "new" && S && w.push({
57
+ id: "cancel",
58
+ label: _.cancel,
59
+ variant: "ghost",
60
+ surface: "menu",
61
+ icon: n
62
+ }), (l === "rejected" || l === "waiting_to_be_paid" && !f) && S && w.push({
63
+ id: "reopen",
64
+ label: _.reopen,
65
+ variant: "ghost",
66
+ surface: "menu",
67
+ icon: i
68
+ }), l === "waiting_to_be_paid" && f && p && C && w.push({
69
+ id: "cancelScheduledPayment",
70
+ label: _.cancelScheduledPayment,
71
+ variant: "ghost",
72
+ surface: "menu",
73
+ icon: r
74
+ }), w;
4
75
  }
5
76
  //#endregion
6
- export { e as resolveAmountDueMinorUnits };
77
+ export { c as canOverrideApprovalPolicy, s as canReadCounterpartBankAccounts, l as getBillDetailActions };
@@ -1,7 +1,6 @@
1
1
  //#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index20.js
2
- var e = {
3
- scheduleDialog: "pay-bill-schedule-dialog",
4
- reviewDialog: "pay-bill-review-dialog"
5
- };
2
+ function e(e) {
3
+ return e?.amount_due ?? e?.total_amount ?? void 0;
4
+ }
6
5
  //#endregion
7
- export { e as payBillFlowTestIds };
6
+ export { e as resolveAmountDueMinorUnits };
@@ -1,6 +1,7 @@
1
1
  //#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index21.js
2
- function e(e) {
3
- return e ? `••••${e.slice(-4)}` : void 0;
4
- }
2
+ var e = {
3
+ scheduleDialog: "pay-bill-schedule-dialog",
4
+ reviewDialog: "pay-bill-review-dialog"
5
+ };
5
6
  //#endregion
6
- export { e as maskAccountNumber };
7
+ export { e as payBillFlowTestIds };
@@ -1,35 +1,6 @@
1
- import { coerceAmountValueToMinorUnits as e } from "../../../shared/util/dist/lib/coerceAmountValueToMinorUnits.js";
2
- import { formatMoneyExact as t } from "../../../shared/util/dist/lib/formatMoneyExact.js";
3
1
  //#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index22.js
4
- var n = {
5
- unnamedSourceAccount: "Bank account",
6
- availableBalancePrefix: (e) => `Available balance: ${e}`,
7
- futureInsufficientFunds: "Not enough funds right now. Add funds before the payment date.",
8
- todayInsufficientFunds: "Not enough funds to pay today. Choose a different account or a later date."
9
- };
10
- function r(e) {
11
- return e.slice(-4);
12
- }
13
- function i(i, a = n) {
14
- return i.filter((e) => e.status === "ACTIVE").map((n) => {
15
- let i = e(n.balance.value), o = n.balance.currencyCode;
16
- return {
17
- id: n.id,
18
- primaryLabel: `${n.nickname || a.unnamedSourceAccount} - ${r(n.accountNumber)}`,
19
- secondaryLabel: a.availableBalancePrefix(t(i / 100, { currencyCode: o })),
20
- balanceMinorUnits: i
21
- };
22
- });
23
- }
24
- function a({ selectedAccount: e, amountDueMinorUnits: t, isToday: r, labels: i = n }) {
25
- let a = e?.balanceMinorUnits;
26
- return a === void 0 ? { state: "warning" } : a >= t ? { state: "sufficient" } : r ? {
27
- state: "error",
28
- message: i.todayInsufficientFunds
29
- } : {
30
- state: "warning",
31
- message: i.futureInsufficientFunds
32
- };
2
+ function e(e) {
3
+ return e ? `••••${e.slice(-4)}` : void 0;
33
4
  }
34
5
  //#endregion
35
- export { n as SOURCE_ACCOUNT_LABELS_EN, a as deriveSourceAccountFunds, i as mapSourceAccountOptions };
6
+ export { e as maskAccountNumber };
@@ -1,44 +1,35 @@
1
- import { REVIEW_TRANSACTION_DIALOG_LABELS_EN as e } from "../../ui/dist/index88.js";
2
- import { SCHEDULE_PAYMENT_DIALOG_LABELS_EN as t } from "../../ui/dist/index94.js";
3
- import "../../ui/dist/index.js";
4
- import { SOURCE_ACCOUNT_LABELS_EN as n } from "./index22.js";
1
+ import { coerceAmountValueToMinorUnits as e } from "../../../shared/util/dist/lib/coerceAmountValueToMinorUnits.js";
2
+ import { formatMoneyExact as t } from "../../../shared/util/dist/lib/formatMoneyExact.js";
5
3
  //#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index23.js
6
- var r = {
7
- amountDue: "Amount due",
8
- paymentAmount: "Payment amount",
9
- dueDateSuffix: (e) => `by ${e}`,
10
- paymentDate: "Payment date",
11
- sourceAccount: "Pay from",
12
- accountHolder: "Account holder name",
13
- routingNumber: "Routing number",
14
- accountNumber: "Account number",
15
- achMethod: "Pay by ACH bank transfer",
16
- scheduledToast: "Payment scheduled",
17
- submitError: "Couldn't schedule this payment. Try again.",
18
- selectAccountError: "Select a source account.",
19
- selectDateError: "Select a payment date.",
20
- staleDateError: "That date has passed. Choose a new payment date.",
21
- missingPaymentInstructionsError: "This vendor does not have ACH payment instructions on file.",
22
- checkingPaymentInstructionsError: "Still checking this vendor's payment instructions. Try again in a moment.",
23
- paymentInstructionsUnavailableError: "Couldn't check this vendor's payment instructions. Try again.",
24
- missingVendorName: "Not provided",
25
- ...n,
26
- scheduleDialog: t,
27
- reviewDialog: e
4
+ var n = {
5
+ unnamedSourceAccount: "Bank account",
6
+ availableBalancePrefix: (e) => `Available balance: ${e}`,
7
+ futureInsufficientFunds: "Not enough funds right now. Add funds before the payment date.",
8
+ todayInsufficientFunds: "Not enough funds to pay today. Choose a different account or a later date."
28
9
  };
29
- function i(e) {
30
- return {
31
- ...r,
32
- ...e,
33
- scheduleDialog: {
34
- ...r.scheduleDialog,
35
- ...e?.scheduleDialog
36
- },
37
- reviewDialog: {
38
- ...r.reviewDialog,
39
- ...e?.reviewDialog
40
- }
10
+ function r(e) {
11
+ return e.slice(-4);
12
+ }
13
+ function i(i, a = n) {
14
+ return i.filter((e) => e.status === "ACTIVE").map((n) => {
15
+ let i = e(n.balance.value), o = n.balance.currencyCode;
16
+ return {
17
+ id: n.id,
18
+ primaryLabel: `${n.nickname || a.unnamedSourceAccount} - ${r(n.accountNumber)}`,
19
+ secondaryLabel: a.availableBalancePrefix(t(i / 100, { currencyCode: o })),
20
+ balanceMinorUnits: i
21
+ };
22
+ });
23
+ }
24
+ function a({ selectedAccount: e, amountDueMinorUnits: t, isToday: r, labels: i = n }) {
25
+ let a = e?.balanceMinorUnits;
26
+ return a === void 0 ? { state: "warning" } : a >= t ? { state: "sufficient" } : r ? {
27
+ state: "error",
28
+ message: i.todayInsufficientFunds
29
+ } : {
30
+ state: "warning",
31
+ message: i.futureInsufficientFunds
41
32
  };
42
33
  }
43
34
  //#endregion
44
- export { r as PAY_BILL_FLOW_LABELS_EN, i as mergePayBillFlowLabels };
35
+ export { n as SOURCE_ACCOUNT_LABELS_EN, a as deriveSourceAccountFunds, i as mapSourceAccountOptions };