@tesouro/embedded-components-react 0.4.13 → 0.4.14

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 (171) 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/monite-sdk/dist/index618.js +1 -1
  168. package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/analytics/build-info.js +1 -1
  169. package/dist/libs/tesouro-embedded-components-react/widget-suite/feature/dist/index8.js +1 -1
  170. package/package.json +7 -7
  171. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index75.js +0 -127
@@ -1,349 +1,21 @@
1
- "use client";
2
- "use client";
3
- "use client";
4
- "use client";
5
- import { hasAnyScope as e } from "../../../shared/data-access/dist/lib/hasAnyScope.js";
6
- import { Scope as t } from "../../../shared/data-access/dist/lib/scopes.js";
7
- import { useAllLedgerAccountsQuery as ee } from "../../../shared/data-access/dist/lib/reference-data/useLedgerAccountsQuery.js";
8
- import { useAllOrganizationUsersQuery as te } from "../../../shared/data-access/dist/lib/user/useAllOrganizationUsersQuery.js";
9
- import "../../../shared/data-access/dist/index.js";
10
- import { formatCalendarDate as ne } from "../../../shared/util/dist/lib/formatCalendarDate.js";
11
- import { useWidgetConfig as re } from "../../../shared/feature/dist/lib/WidgetProvider/hooks.js";
12
- import "../../../shared/feature/dist/index.js";
13
- import { usePayableHistoryQuery as ie } from "../../data-access/dist/index9.js";
14
- import { useAllPayableLineItemsQuery as ae } from "../../data-access/dist/index10.js";
15
- import { usePayableQuery as oe } from "../../data-access/dist/index15.js";
16
- import "../../data-access/dist/index.js";
17
- import { resolveVendor as se } from "./index5.js";
18
- import { BillCreateScreen as ce } from "../../ui/dist/index46.js";
19
- import { BillDecisionDialog as n } from "../../ui/dist/index52.js";
20
- import { BillDuplicateNotice as le } from "../../ui/dist/index62.js";
21
- import { ExtractionNotice as ue } from "../../ui/dist/index80.js";
22
- import { MarkAsPaidDialog as de } from "../../ui/dist/index89.js";
23
- import { UnsavedBillDialog as fe } from "../../ui/dist/index99.js";
24
- import "../../ui/dist/index.js";
25
- import { usePayableDuplicateReview as pe } from "./index10.js";
26
- import "./index11.js";
27
- import { resolveAmountDueMinorUnits as me } from "./index17.js";
28
- import { PayBillFlow as he } from "./index23.js";
29
- import "./index24.js";
30
- import { useMarkAsPaidFlow as ge } from "./index14.js";
31
- import "./index15.js";
32
- import { BILL_CREATE_MESSAGE_LABELS_EN as _e, mergeBillCreateScreenCopy as ve } from "./index42.js";
33
- import { useBillCreateController as ye } from "./index51.js";
34
- import { useBillForm as be } from "./index53.js";
35
- import { useApprovalPolicyCardView as xe } from "./index30.js";
36
- import { useCurrentApprovalRequestId as Se } from "./index31.js";
37
- import { usePayableDetailActions as Ce } from "./index32.js";
38
- import { useScheduledPayment as we } from "./index33.js";
39
- import { isEditablePayableStatus as Te } from "./index34.js";
40
- import { useDraftDelete as Ee } from "./index35.js";
41
- import { buildBillDetailView as De } from "./index38.js";
42
- import { buildBillHistory as Oe } from "./index39.js";
43
- import { SourceDocumentContainer as ke } from "./index43.js";
44
- import { useVendorSectionProps as Ae } from "./index46.js";
45
- import { usePaymentInstructionsForm as je } from "./index47.js";
46
- import { billCreateTestIds as r } from "./index54.js";
47
- import { useCallback as i, useEffect as Me, useMemo as a, useRef as Ne, useState as o } from "react";
48
- import { Fragment as s, jsx as c, jsxs as l } from "react/jsx-runtime";
49
- import { Trash2Icon as Pe } from "lucide-react";
50
1
  //#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index55.js
51
- function u({ open: u, onOpenChange: d, payableId: Fe, readOnly: f = !1, copy: p, onCollapse: Ie, poweredByBankName: Le }) {
52
- let m = a(() => ve(p), [p]), [h, Re] = o(), [g, _] = o(!1), [ze, Be] = o(!1), [Ve, v] = o(!1), [He, y] = o(), b = Fe ?? He, x = oe(b, { pollWhileOcrProcessing: !0 }), S = ae(b), { initResponse: C } = re(), w = !!C, T = e(C?.scopes, [t.AccountingConfigReadOrg]), E = ee({ enabled: T }), D = x.data, O = !b || !!D, k = !f && O && !!b && D?.status !== "draft", Ue = !f && !!D && !Te(D?.status), A = f || Ue, j = be({
53
- payable: D,
54
- lineItems: S.lineItems
55
- }), M = D?.counterpart_id;
56
- Me(() => {
57
- g || M && (Re(M), _(!0));
58
- }, [g, M]);
59
- let We = i((e) => {
60
- _(!0), Re(e);
61
- }, []), N = Ae({
62
- payableId: f ? void 0 : b,
63
- counterpartId: f ? void 0 : h,
64
- payableCounterpartId: M,
65
- onCounterpartChange: We,
66
- requiredError: j.errors?.vendor,
67
- payableCounterpartBankAccountId: D?.counterpart_bank_account_id ?? void 0,
68
- extractedVendor: D?.counterpart_raw_data ?? void 0
69
- }), Ge = !!(b && g) && !h, Ke = a(() => k ? { saveDraftButton: m.submittedSaveButton } : void 0, [m.submittedSaveButton, k]), qe = a(() => k ? { draftSaved: _e.submittedSaved } : void 0, [k]), P = x.refetch, Je = i(async () => {
70
- let { data: e } = await P();
71
- return e?.status ?? void 0;
72
- }, [P]), F = ye({
73
- payableId: Fe,
74
- form: j,
75
- labels: qe,
76
- counterpartId: h,
77
- clearCounterpart: Ge,
78
- prepareVendorForSave: N.savePaymentInstructions,
79
- onPayableCreated: y,
80
- onSaved: y,
81
- onDraftSaved: () => d(!1),
82
- onFinalized: () => d(!1),
83
- readSavedStatus: k ? Je : void 0
84
- }), Ye = !!(F.isSavingDraft || F.isFinalizing), I = f ? b : void 0, L = Se({
85
- payableId: I,
86
- status: D?.status
87
- }), R = Ne(null), z = we({
88
- payableId: b,
89
- scheduledPaymentDate: D?.scheduled_payment_date,
90
- enabled: f || k
91
- }), Xe = se(D), B = je({
92
- payableId: I,
93
- counterpartId: f ? M : void 0,
94
- saveErrorMessage: m.detail.paymentInstructionsSaveError,
95
- linkErrorMessage: m.detail.paymentInstructionsLinkError
96
- }), Ze = e(C?.scopes, [t.PayableWriteOrg]), Qe = e(C?.scopes, [t.CounterpartWriteOrg]) && Ze, V = ge({
97
- payableId: I,
98
- amountDueMinorUnits: me(D) ?? 0,
99
- amountToPayMinorUnits: D?.amount_to_pay ?? void 0,
100
- currencyCode: D?.currency ?? void 0,
101
- dueDate: D?.due_date,
102
- hasScheduledPayment: z.hasScheduledPayment,
103
- labels: m.markAsPaid
104
- }), H = xe({
105
- payableId: I,
106
- approvalPolicyId: D?.approval_policy_id,
107
- enabled: f,
108
- copy: m.approvalPolicyCopy
109
- }), { actions: U, decisionDialog: $e, isActionPending: et } = Ce({
110
- payableId: f || k ? b : void 0,
111
- status: D?.status,
112
- currentApprovalRequestId: L.id,
113
- isPolicyApprover: L.isPolicyApprover,
114
- hasWaitingRequest: L.hasWaitingRequest,
115
- arePendingApproversUnknown: H.isLoading,
116
- hasScheduledPayment: z.hasScheduledPayment,
117
- scheduledPaymentIntentId: z.scheduledPaymentIntentId,
118
- isScheduledPaymentUnknown: z.isResolving,
119
- pendingApprovers: H.pendingApprovers,
120
- labels: m.actions,
121
- isMarkAsPaidPending: V.isPending,
122
- onMarkAsPaidSelect: V.open,
123
- onPayBillSelect: () => R.current?.open(),
124
- onActionSucceeded: k ? () => d(!1) : void 0
125
- }), W = Ee({
126
- payableId: b,
127
- status: D?.status,
128
- enabled: !f,
129
- labels: m.deleteDraft,
130
- onDeleted: () => d(!1)
131
- }), G = Ye || et, K = x.isLoading || S.isResolving || E.isResolving, q = x.isError || S.isError || E.isError, tt = a(() => [...W.menuItems, ...k || f && !K && !q ? U.menu.map((e) => ({
132
- id: e.id,
133
- label: e.label,
134
- onSelect: e.onSelect,
135
- disabled: e.disabled,
136
- icon: e.icon,
137
- sectionHeading: e.sectionHeading
138
- })) : []], [
139
- U.menu,
140
- W.menuItems,
141
- k,
142
- f,
143
- K,
144
- q
145
- ]), J = a(() => (E.data?.data ?? []).map((e) => ({
146
- value: e.id,
147
- label: [e.nominal_code, e.name].filter(Boolean).join(" — ")
148
- })), [E.data]), Y;
149
- w && (T ? E.isError ? Y = m.lineItemsGlCodeUnavailable.loadError : !E.isResolving && J.length === 0 && (Y = m.lineItemsGlCodeUnavailable.empty) : Y = m.lineItemsGlCodeUnavailable.noAccess);
150
- let nt = !w || !!Y || E.isResolving, rt = T && !E.isResolving && !E.isError, it = ie(I), at = e(C?.scopes, [t.UserReadOrg]), ot = te({ enabled: f && at }), st = a(() => Oe(it.data?.data ?? [], ot.data?.data ?? [], m.history), [
151
- it.data,
152
- ot.data,
153
- m.history
154
- ]), ct = a(() => f && D ? De({
155
- payable: D,
156
- lineItems: S.lineItems,
157
- glCodeOptions: J,
158
- glCodeRosterAvailable: rt,
159
- history: st,
160
- approvalPolicy: H.view,
161
- labels: m.detail,
162
- hasScheduledPayment: z.hasScheduledPayment
163
- }) : void 0, [
164
- z.hasScheduledPayment,
165
- H.view,
166
- m.detail,
167
- J,
168
- rt,
169
- st,
170
- S.lineItems,
171
- D,
172
- f
173
- ]), lt = D?.source_of_payable_data === "ocr", X = Xe?.name, ut = f ? X ? m.viewTitle(X) : m.readOnlyTitle : X && (lt || k) ? m.extractedTitle(X) : m.newTitle, dt = f && D?.created_at ? m.addedOn(ne(D.created_at.slice(0, 10))) : void 0, Z = i(() => {
174
- let e = j.isDirty || N.hasUnsavedVendorChanges || !!F.stagedFile || F.isFileDeletionPending;
175
- if (!A && e) {
176
- v(!0);
177
- return;
178
- }
179
- d(!1);
180
- }, [
181
- F.isFileDeletionPending,
182
- F.stagedFile,
183
- j.isDirty,
184
- A,
185
- d,
186
- N.hasUnsavedVendorChanges
187
- ]), ft = i(() => {
188
- v(!1), d(!1);
189
- }, [d]), Q = S.isResolving || N.mode === "creating", pt = i(async () => {
190
- if (Q) return;
191
- let e = await F.saveDraft();
192
- v(!1), e && d(!1);
193
- }, [
194
- F,
195
- Q,
196
- d
197
- ]), $ = pe({
198
- payable: D,
199
- onRemoved: () => d(!1),
200
- canManage: Ze
201
- }), mt = i((e) => {
202
- if (!(G || $.isBusy)) return e ? d(!0) : Z();
203
- }, [
204
- $.isBusy,
205
- G,
206
- Z,
207
- d
208
- ]), ht = $.isPossibleDuplicate, gt = !f && lt && !ze, _t = ht || gt ? /* @__PURE__ */ l(s, { children: [ht ? /* @__PURE__ */ c(le, {
209
- onNotADuplicate: $.onNotADuplicate,
210
- onRemoveBill: $.onRemoveBill,
211
- isActionDisabled: $.isBusy,
212
- labels: $.removeBillLabel ? { removeBillButton: $.removeBillLabel } : void 0,
213
- testId: r.duplicateNotice
214
- }) : null, gt ? /* @__PURE__ */ c(ue, { onDismiss: () => Be(!0) }) : null] }) : void 0;
215
- return /* @__PURE__ */ l(s, { children: [
216
- /* @__PURE__ */ c(ce, {
217
- open: u,
218
- onOpenChange: mt,
219
- title: ut,
220
- subtitle: dt,
221
- notice: _t,
222
- vendor: {
223
- ...N,
224
- testId: r.vendorSection
225
- },
226
- values: j.values,
227
- errors: j.errors,
228
- onChange: j.onChange,
229
- lineItems: {
230
- items: j.lineItemRows,
231
- glCodeOptions: J,
232
- glCodeDisabled: nt,
233
- glCodeUnavailableMessage: Y,
234
- discount: j.discount,
235
- onDiscountChange: j.onDiscountChange,
236
- tax: j.tax,
237
- onTaxChange: j.onTaxChange,
238
- total: j.total,
239
- onTotalChange: j.onTotalChange,
240
- onAddLineItem: j.onAddLineItem,
241
- errors: j.lineItemErrors,
242
- totalsErrors: j.totalsErrors,
243
- testId: r.lineItems
244
- },
245
- documentPanel: /* @__PURE__ */ c(ke, {
246
- payableId: b,
247
- readOnly: A,
248
- isDocumentPending: !!b && !D?.file && (x.isLoading || D?.ocr_status === "processing"),
249
- file: D?.file ? {
250
- id: D.file.id,
251
- name: D.file.name,
252
- url: D.file.url,
253
- mimetype: D.file.mimetype
254
- } : void 0,
255
- staging: {
256
- stagedFile: F.stagedFile,
257
- onFileStaged: F.stageFile,
258
- onClearStagedFile: F.clearStagedFile,
259
- isSaving: Ye
260
- },
261
- deletion: {
262
- isPending: F.isFileDeletionPending,
263
- onRequest: F.requestFileDeletion,
264
- onDetachNow: F.detachFileNow,
265
- isDeleting: F.isDeletingFile,
266
- hasFailed: F.hasFileDeletionFailed
267
- }
268
- }),
269
- menuItems: tt,
270
- readOnly: A,
271
- detail: f ? {
272
- view: ct,
273
- actions: U,
274
- scheduledSummary: z.hasScheduledPayment && z.scheduledDateLabel ? m.scheduledSummary(z.scheduledDateLabel) : void 0,
275
- paymentInstructionsForm: M && Qe ? {
276
- isOpen: B.isOpen,
277
- values: B.values,
278
- errors: B.errors,
279
- isSaving: B.isSaving,
280
- onOpen: B.open,
281
- onCancel: B.close,
282
- onChange: B.onChange,
283
- onSave: B.save
284
- } : void 0,
285
- isLoading: K,
286
- isError: q
287
- } : void 0,
288
- isLineItemsLoading: S.isResolving,
289
- isSaving: G,
290
- isSavingDraft: F.isSavingDraft,
291
- isFinalizing: F.isFinalizing,
292
- onCancel: Z,
293
- onCollapse: f ? Ie : void 0,
294
- onSaveDraft: F.saveDraft,
295
- onFinalize: F.finalize,
296
- scrollToErrorToken: F.scrollToErrorToken,
297
- showFinalize: !k && O,
298
- labels: Ke,
299
- testId: r.dialog
300
- }),
301
- /* @__PURE__ */ c(fe, {
302
- open: Ve,
303
- onSaveDraft: pt,
304
- onDiscard: ft,
305
- onCancel: () => v(!1),
306
- isSaving: F.isSavingDraft,
307
- isSaveDraftDisabled: Q,
308
- labels: m.unsavedChanges,
309
- testId: r.unsavedDialog,
310
- saveDraftTestId: r.unsavedSaveDraft,
311
- discardTestId: r.unsavedDiscard,
312
- closeTestId: r.unsavedClose
313
- }),
314
- /* @__PURE__ */ c(n, {
315
- ...$e,
316
- labels: { cancelButton: m.actions.decisionDialog.cancelButton },
317
- testId: r.decisionDialog,
318
- confirmTestId: r.decisionConfirm,
319
- reasonTestId: r.decisionReason
320
- }),
321
- /* @__PURE__ */ c(n, {
322
- ...W.dialog,
323
- labels: { cancelButton: m.actions.decisionDialog.cancelButton },
324
- testId: r.deleteDraftDialog,
325
- confirmTestId: r.deleteDraftConfirm
326
- }),
327
- /* @__PURE__ */ c(n, {
328
- open: $.removeConfirmation.open,
329
- copy: $.removeConfirmation.copy,
330
- onConfirm: $.removeConfirmation.onConfirm,
331
- onCancel: $.removeConfirmation.onCancel,
332
- isPending: $.removeConfirmation.isPending,
333
- confirmIcon: /* @__PURE__ */ c(Pe, {}),
334
- labels: { cancelButton: $.removeConfirmation.cancelButtonLabel },
335
- testId: r.duplicateRemoveDialog,
336
- confirmTestId: r.duplicateRemoveConfirm
337
- }),
338
- /* @__PURE__ */ c(de, { ...V.dialogProps }),
339
- f && D ? /* @__PURE__ */ c(he, {
340
- ref: R,
341
- payable: D,
342
- onMissingAchInstructions: Qe ? B.open : void 0,
343
- poweredByBankName: Le,
344
- labels: m.payBill
345
- }) : null
346
- ] });
347
- }
2
+ var e = {
3
+ dialog: "bill-pay-bill-create-dialog",
4
+ vendorSection: "bill-pay-bill-create-vendor",
5
+ lineItems: "bill-pay-bill-create-line-items",
6
+ documentPanel: "bill-pay-bill-create-document",
7
+ duplicateNotice: "bill-pay-bill-create-duplicate-notice",
8
+ duplicateRemoveDialog: "bill-pay-bill-create-duplicate-remove-dialog",
9
+ duplicateRemoveConfirm: "bill-pay-bill-create-duplicate-remove-confirm",
10
+ decisionDialog: "bill-pay-bill-decision-dialog",
11
+ decisionConfirm: "bill-pay-bill-decision-confirm",
12
+ decisionReason: "bill-pay-bill-decision-reason",
13
+ deleteDraftDialog: "bill-pay-bill-delete-draft-dialog",
14
+ deleteDraftConfirm: "bill-pay-bill-delete-draft-confirm",
15
+ unsavedDialog: "bill-pay-bill-unsaved-dialog",
16
+ unsavedSaveDraft: "bill-pay-bill-unsaved-save-draft",
17
+ unsavedDiscard: "bill-pay-bill-unsaved-discard",
18
+ unsavedClose: "bill-pay-bill-unsaved-close"
19
+ };
348
20
  //#endregion
349
- export { u as BillCreateDialog, u as default };
21
+ export { e as billCreateTestIds };