@tesouro/embedded-components-react 0.4.14 → 0.4.16

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 (125) hide show
  1. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index.js +5 -4
  2. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index14.js +47 -21
  3. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index15.js +20 -77
  4. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index16.js +75 -24
  5. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index17.js +36 -0
  6. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index11.js +1 -1
  7. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index14.js +1 -1
  8. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index23.js +2 -2
  9. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index25.js +2 -2
  10. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index39.js +64 -48
  11. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index43.js +10 -2
  12. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index44.js +1 -1
  13. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index46.js +141 -118
  14. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index47.js +93 -93
  15. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index48.js +83 -67
  16. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index56.js +235 -218
  17. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index58.js +1 -1
  18. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index59.js +5 -5
  19. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index6.js +9 -6
  20. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index66.js +1 -1
  21. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index68.js +1 -1
  22. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index72.js +1 -1
  23. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index76.js +17 -17
  24. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index77.js +1 -1
  25. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index78.js +1 -1
  26. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index81.js +2 -2
  27. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index9.js +1 -1
  28. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index.js +39 -39
  29. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index100.js +2 -10
  30. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index101.js +8 -50
  31. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index102.js +52 -2
  32. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index103.js +2 -0
  33. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index25.js +26 -49
  34. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index26.js +19 -306
  35. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index27.js +154 -2
  36. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index28.js +2 -9
  37. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index29.js +60 -45
  38. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index30.js +251 -1
  39. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index31.js +2 -18
  40. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index32.js +7 -48
  41. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index33.js +49 -2
  42. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index34.js +2 -23
  43. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index35.js +15 -337
  44. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index36.js +50 -2
  45. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index37.js +2 -16
  46. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index38.js +21 -118
  47. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index39.js +340 -2
  48. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index40.js +2 -12
  49. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index41.js +10 -97
  50. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index42.js +99 -2
  51. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index43.js +1 -12
  52. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index44.js +11 -57
  53. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index45.js +58 -1
  54. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index46.js +1 -54
  55. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index47.js +52 -10
  56. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index48.js +10 -179
  57. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index49.js +181 -1
  58. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index50.js +2 -4
  59. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index51.js +2 -39
  60. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index52.js +41 -2
  61. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index53.js +2 -7
  62. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index54.js +5 -90
  63. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index55.js +92 -2
  64. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index56.js +2 -4
  65. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index57.js +2 -14
  66. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index58.js +16 -2
  67. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index59.js +1 -87
  68. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index60.js +83 -291
  69. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index61.js +292 -9
  70. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index62.js +13 -1
  71. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index63.js +1 -8
  72. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index64.js +6 -37
  73. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index65.js +39 -2
  74. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index66.js +2 -39
  75. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index67.js +36 -9
  76. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index68.js +10 -199
  77. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index69.js +201 -3
  78. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index70.js +3 -17
  79. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index71.js +15 -345
  80. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index72.js +345 -8
  81. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index73.js +6 -4
  82. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index74.js +6 -91
  83. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index75.js +93 -0
  84. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index77.js +2 -127
  85. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index78.js +124 -25
  86. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index79.js +26 -87
  87. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index80.js +89 -2
  88. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index81.js +2 -7
  89. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index82.js +5 -28
  90. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index83.js +30 -2
  91. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index84.js +2 -7
  92. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index85.js +5 -32
  93. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index86.js +34 -2
  94. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index87.js +2 -12
  95. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index88.js +10 -104
  96. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index89.js +105 -1
  97. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index90.js +2 -17
  98. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index91.js +15 -123
  99. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index92.js +125 -2
  100. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index93.js +2 -18
  101. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index94.js +14 -6
  102. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index95.js +7 -167
  103. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index96.js +170 -2
  104. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index97.js +2 -14
  105. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index98.js +11 -105
  106. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index99.js +108 -2
  107. package/dist/libs/tesouro-embedded-components-react/cards-widget/feature/dist/index3.js +15 -3
  108. package/dist/libs/tesouro-embedded-components-react/cards-widget/feature/dist/index9.js +63 -65
  109. package/dist/libs/tesouro-embedded-components-react/cards-widget/ui/dist/lib/CardsList/CardsList.js +4 -2
  110. package/dist/libs/tesouro-embedded-components-react/cards-widget/ui/dist/lib/CardsList/CardsListDetailsSheet.js +6 -5
  111. package/dist/libs/tesouro-embedded-components-react/cards-widget/ui/dist/lib/CardsList/CardsListRow.js +1 -1
  112. package/dist/libs/tesouro-embedded-components-react/counterparts-widget/feature/dist/index4.js +8 -8
  113. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index9.js +4 -4
  114. package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/data-access/dist/index.js +5 -5
  115. package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/feature/dist/index.js +19 -19
  116. package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/feature/dist/lib/helpers.js +39 -33
  117. package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/feature/dist/lib/subEntityForms.js +15 -15
  118. package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/feature/dist/lib/useAddressForm.js +9 -9
  119. package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/feature/dist/lib/useCounterpartDetails.js +7 -7
  120. package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/feature/dist/lib/useCounterpartForm.js +37 -37
  121. package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/feature/dist/lib/useCounterpartSelector.js +15 -15
  122. package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/feature/dist/lib/usePayableAchInstructions.js +7 -7
  123. package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/analytics/build-info.js +1 -1
  124. package/package.json +1 -1
  125. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index76.js +0 -2
@@ -9,7 +9,8 @@ import { useAllPayableLineItemsQuery as u, useReplacePayableLineItemsMutation as
9
9
  import { usePayablePaymentRecordsQuery as f } from "./index11.js";
10
10
  import { useSchedulePaymentMutation as p } from "./index12.js";
11
11
  import { useAttachPayableFileMutation as m, useCancelPayableMutation as h, useCancelScheduledPaymentMutation as g, useCreatePayableMutation as _, useDeletePayableFileMutation as v, useDeletePayableMutation as y, useForceApprovePayableMutation as b, useForceRejectPayableMutation as x, useMarkPayableAsPaidMutation as S, useReopenPayableMutation as C, useSubmitPayableForApprovalMutation as w, useUpdatePayableMutation as T, useUploadPayableFromFileMutation as E, useValidatePayableMutation as D } from "./index13.js";
12
- import { usePayableOcrQueries as O } from "./index14.js";
13
- import { useAllSuspectedDuplicatePayablesQuery as k, usePayableQuery as A, usePayablesQuery as j, usePayablesTotalCountQuery as M } from "./index15.js";
14
- import { usePayableSuggestionsQuery as N } from "./index16.js";
15
- export { n as DuplicateVerdict, r as hasSuspectedPayableDuplicate, t as isLiveScheduledPaymentRecord, i as suspectedPayableDuplicates, u as useAllPayableLineItemsQuery, k as useAllSuspectedDuplicatePayablesQuery, a as useApplyDuplicateVerdictsMutation, o as useApprovePayableApprovalRequestMutation, m as useAttachPayableFileMutation, h as useCancelPayableMutation, g as useCancelScheduledPaymentMutation, _ as useCreatePayableMutation, v as useDeletePayableFileMutation, y as useDeletePayableMutation, e as useEmbedApi, b as useForceApprovePayableMutation, x as useForceRejectPayableMutation, S as useMarkPayableAsPaidMutation, s as usePayableApprovalRequestsQuery, l as usePayableHistoryQuery, O as usePayableOcrQueries, f as usePayablePaymentRecordsQuery, A as usePayableQuery, N as usePayableSuggestionsQuery, j as usePayablesQuery, M as usePayablesTotalCountQuery, c as useRejectPayableApprovalRequestMutation, C as useReopenPayableMutation, d as useReplacePayableLineItemsMutation, p as useSchedulePaymentMutation, w as useSubmitPayableForApprovalMutation, T as useUpdatePayableMutation, E as useUploadPayableFromFileMutation, D as useValidatePayableMutation };
12
+ import { useUpdatePayableCounterpartBankAccountMutation as O } from "./index14.js";
13
+ import { usePayableOcrQueries as k } from "./index15.js";
14
+ import { useAllSuspectedDuplicatePayablesQuery as A, usePayableQuery as j, usePayablesQuery as M, usePayablesTotalCountQuery as N } from "./index16.js";
15
+ import { usePayableSuggestionsQuery as P } from "./index17.js";
16
+ export { n as DuplicateVerdict, r as hasSuspectedPayableDuplicate, t as isLiveScheduledPaymentRecord, i as suspectedPayableDuplicates, u as useAllPayableLineItemsQuery, A as useAllSuspectedDuplicatePayablesQuery, a as useApplyDuplicateVerdictsMutation, o as useApprovePayableApprovalRequestMutation, m as useAttachPayableFileMutation, h as useCancelPayableMutation, g as useCancelScheduledPaymentMutation, _ as useCreatePayableMutation, v as useDeletePayableFileMutation, y as useDeletePayableMutation, e as useEmbedApi, b as useForceApprovePayableMutation, x as useForceRejectPayableMutation, S as useMarkPayableAsPaidMutation, s as usePayableApprovalRequestsQuery, l as usePayableHistoryQuery, k as usePayableOcrQueries, f as usePayablePaymentRecordsQuery, j as usePayableQuery, P as usePayableSuggestionsQuery, M as usePayablesQuery, N as usePayablesTotalCountQuery, c as useRejectPayableApprovalRequestMutation, C as useReopenPayableMutation, d as useReplacePayableLineItemsMutation, p as useSchedulePaymentMutation, w as useSubmitPayableForApprovalMutation, O as useUpdatePayableCounterpartBankAccountMutation, T as useUpdatePayableMutation, E as useUploadPayableFromFileMutation, D as useValidatePayableMutation };
@@ -2,29 +2,55 @@
2
2
  "use client";
3
3
  "use client";
4
4
  "use client";
5
- import { useEmbedApi as e } from "../../../shared/data-access/dist/lib/EmbedApiContext.js";
6
- import { withAuthEpoch as t } from "../../../shared/data-access/dist/lib/withAuthEpoch.js";
5
+ import { invalidateAllClients as e } from "../../../shared/data-access/dist/lib/clientRegistry.js";
6
+ import { useEmbedApi as t } from "../../../shared/data-access/dist/lib/EmbedApiContext.js";
7
+ import { organizationHeaders as n } from "../../../shared/data-access/dist/lib/organizationHeaders.js";
8
+ import { patchCounterpartsIdBankAccountsId as r, postCounterpartsIdBankAccountsIdMakeDefault as i } from "../../../shared/data-access/dist/lib/rest/sdk.gen.js";
7
9
  import "../../../shared/data-access/dist/index.js";
8
- import { payableOcrQueryOptions as n } from "./index4.js";
9
- import { useQueries as r } from "@tanstack/react-query";
10
+ import { invalidatePayableQueries as a } from "./index6.js";
11
+ import { counterpartBankAccountsInvalidationKey as o } from "../../../shared/counterpart-management/data-access/dist/index2.js";
12
+ import "../../../shared/counterpart-management/data-access/dist/index.js";
13
+ import { useMutation as s } from "@tanstack/react-query";
10
14
  //#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index14.js
11
- function i({ payableIds: i, enabled: a }) {
12
- let { client: o, organizationId: s, widgetToken: c, authEpoch: l } = e(), u = !!(s && c) && (a === !0 || a === void 0);
13
- return r({
14
- queries: i.map((e) => ({
15
- ...t(n({
16
- client: o,
17
- organizationId: s,
18
- payableId: e
19
- }), l),
20
- enabled: u && !!e
21
- })),
22
- combine: (e) => e.map((e, t) => ({
23
- payableId: i[t],
24
- ocrStatus: e.data?.ocr_status,
25
- isError: e.isError
26
- }))
15
+ function c() {
16
+ let { client: c, organizationId: l } = t();
17
+ return s({
18
+ mutationFn: async ({ path: t, body: a, makeDefault: s }) => {
19
+ let { data: u } = await r({
20
+ client: c,
21
+ headers: n(l),
22
+ path: t,
23
+ body: a,
24
+ throwOnError: !0
25
+ });
26
+ if (s) try {
27
+ await i({
28
+ client: c,
29
+ headers: n(l),
30
+ path: t,
31
+ throwOnError: !0
32
+ });
33
+ } catch (n) {
34
+ throw await e(o({
35
+ client: c,
36
+ organizationId: l,
37
+ counterpartId: t.counterpart_id
38
+ })), n;
39
+ }
40
+ return u;
41
+ },
42
+ onSuccess: async (t, n) => {
43
+ await Promise.all([e(o({
44
+ client: c,
45
+ organizationId: l,
46
+ counterpartId: n.path.counterpart_id
47
+ })), a({
48
+ client: c,
49
+ organizationId: l,
50
+ payableId: n.payableId
51
+ })]);
52
+ }
27
53
  });
28
54
  }
29
55
  //#endregion
30
- export { i as usePayableOcrQueries };
56
+ export { c as useUpdatePayableCounterpartBankAccountMutation };
@@ -3,85 +3,28 @@
3
3
  "use client";
4
4
  "use client";
5
5
  import { useEmbedApi as e } from "../../../shared/data-access/dist/lib/EmbedApiContext.js";
6
- import { organizationHeaders as t } from "../../../shared/data-access/dist/lib/organizationHeaders.js";
7
- import { getPayables as n } from "../../../shared/data-access/dist/lib/rest/sdk.gen.js";
8
- import { getPayablesAnalyticsOptions as r, getPayablesIdOptions as i, getPayablesOptions as a, getPayablesQueryKey as o } from "../../../shared/data-access/dist/lib/rest/@tanstack/react-query.gen.js";
9
- import { withAuthEpoch as s } from "../../../shared/data-access/dist/lib/withAuthEpoch.js";
6
+ import { withAuthEpoch as t } from "../../../shared/data-access/dist/lib/withAuthEpoch.js";
10
7
  import "../../../shared/data-access/dist/index.js";
11
- import { payableOcrQueryOptions as c } from "./index4.js";
12
- import { queryOptions as l, useQuery as u } from "@tanstack/react-query";
8
+ import { payableOcrQueryOptions as n } from "./index4.js";
9
+ import { useQueries as r } from "@tanstack/react-query";
13
10
  //#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index15.js
14
- function d({ enabled: n, ...r } = {}) {
15
- let { client: i, organizationId: o, widgetToken: c, authEpoch: l } = e(), d = !!(o && c) && (n === !0 || n === void 0), f = a({
16
- client: i,
17
- headers: t(o),
18
- query: r
19
- });
20
- return u({
21
- ...s(f, l),
22
- enabled: d
23
- });
24
- }
25
- var f = 100;
26
- function p({ enabled: r } = {}) {
27
- let { client: i, organizationId: a, widgetToken: c, authEpoch: d } = e(), p = t(a), m = {
28
- duplicate_match_status: "suspected",
29
- limit: f
30
- }, h = l({
31
- queryKey: [...o({
32
- client: i,
33
- headers: p,
34
- query: m
35
- }), "all"],
36
- queryFn: async ({ signal: e }) => {
37
- let t = [], r = /* @__PURE__ */ new Set(), a;
38
- do {
39
- let { data: o } = await n({
40
- client: i,
41
- headers: p,
42
- query: {
43
- ...m,
44
- pagination_token: a
45
- },
46
- signal: e,
47
- throwOnError: !0
48
- });
49
- t.push(...o.data ?? []);
50
- let s = o.next_pagination_token ?? void 0;
51
- a = s && !r.has(s) ? (r.add(s), s) : void 0;
52
- } while (a);
53
- return { data: t };
54
- }
55
- });
56
- return u({
57
- ...s(h, d),
58
- enabled: !!(a && c) && r !== !1
59
- });
60
- }
61
- function m({ enabled: n } = {}) {
62
- let { client: i, organizationId: a, widgetToken: o, authEpoch: c } = e(), l = !!(a && o) && (n === !0 || n === void 0), d = r({
63
- client: i,
64
- headers: t(a)
65
- });
66
- return u({
67
- ...s(d, c),
68
- enabled: l
69
- });
70
- }
71
- function h(n, { enabled: r = !0, pollWhileOcrProcessing: a = !1 } = {}) {
72
- let { client: o, organizationId: l, widgetToken: d, authEpoch: f } = e(), p = !!(l && d && n) && r, m = a ? c({
73
- client: o,
74
- organizationId: l,
75
- payableId: n ?? ""
76
- }) : i({
77
- client: o,
78
- headers: t(l),
79
- path: { payable_id: n ?? "" }
80
- });
81
- return u({
82
- ...s(m, f),
83
- enabled: p
11
+ function i({ payableIds: i, enabled: a }) {
12
+ let { client: o, organizationId: s, widgetToken: c, authEpoch: l } = e(), u = !!(s && c) && (a === !0 || a === void 0);
13
+ return r({
14
+ queries: i.map((e) => ({
15
+ ...t(n({
16
+ client: o,
17
+ organizationId: s,
18
+ payableId: e
19
+ }), l),
20
+ enabled: u && !!e
21
+ })),
22
+ combine: (e) => e.map((e, t) => ({
23
+ payableId: i[t],
24
+ ocrStatus: e.data?.ocr_status,
25
+ isError: e.isError
26
+ }))
84
27
  });
85
28
  }
86
29
  //#endregion
87
- export { p as useAllSuspectedDuplicatePayablesQuery, h as usePayableQuery, d as usePayablesQuery, m as usePayablesTotalCountQuery };
30
+ export { i as usePayableOcrQueries };
@@ -4,33 +4,84 @@
4
4
  "use client";
5
5
  import { useEmbedApi as e } from "../../../shared/data-access/dist/lib/EmbedApiContext.js";
6
6
  import { organizationHeaders as t } from "../../../shared/data-access/dist/lib/organizationHeaders.js";
7
- import { getPayablesIdSuggestionsOptions as n } from "../../../shared/data-access/dist/lib/rest/@tanstack/react-query.gen.js";
8
- import { withAuthEpoch as r } from "../../../shared/data-access/dist/lib/withAuthEpoch.js";
9
- import { isApiNotFoundError as i } from "../../../shared/data-access/dist/lib/isApiNotFoundError.js";
7
+ import { getPayables as n } from "../../../shared/data-access/dist/lib/rest/sdk.gen.js";
8
+ import { getPayablesAnalyticsOptions as r, getPayablesIdOptions as i, getPayablesOptions as a, getPayablesQueryKey as o } from "../../../shared/data-access/dist/lib/rest/@tanstack/react-query.gen.js";
9
+ import { withAuthEpoch as s } from "../../../shared/data-access/dist/lib/withAuthEpoch.js";
10
10
  import "../../../shared/data-access/dist/index.js";
11
- import { useQuery as a } from "@tanstack/react-query";
11
+ import { payableOcrQueryOptions as c } from "./index4.js";
12
+ import { queryOptions as l, useQuery as u } from "@tanstack/react-query";
12
13
  //#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index16.js
13
- function o(o, { enabled: s = !0 } = {}) {
14
- let { client: c, organizationId: l, widgetToken: u, authEpoch: d } = e(), f = !!(l && u && o) && s, p = n({
15
- client: c,
14
+ function d({ enabled: n, ...r } = {}) {
15
+ let { client: i, organizationId: o, widgetToken: c, authEpoch: l } = e(), d = !!(o && c) && (n === !0 || n === void 0), f = a({
16
+ client: i,
17
+ headers: t(o),
18
+ query: r
19
+ });
20
+ return u({
21
+ ...s(f, l),
22
+ enabled: d
23
+ });
24
+ }
25
+ var f = 100;
26
+ function p({ enabled: r } = {}) {
27
+ let { client: i, organizationId: a, widgetToken: c, authEpoch: d } = e(), p = t(a), m = {
28
+ duplicate_match_status: "suspected",
29
+ limit: f
30
+ }, h = l({
31
+ queryKey: [...o({
32
+ client: i,
33
+ headers: p,
34
+ query: m
35
+ }), "all"],
36
+ queryFn: async ({ signal: e }) => {
37
+ let t = [], r = /* @__PURE__ */ new Set(), a;
38
+ do {
39
+ let { data: o } = await n({
40
+ client: i,
41
+ headers: p,
42
+ query: {
43
+ ...m,
44
+ pagination_token: a
45
+ },
46
+ signal: e,
47
+ throwOnError: !0
48
+ });
49
+ t.push(...o.data ?? []);
50
+ let s = o.next_pagination_token ?? void 0;
51
+ a = s && !r.has(s) ? (r.add(s), s) : void 0;
52
+ } while (a);
53
+ return { data: t };
54
+ }
55
+ });
56
+ return u({
57
+ ...s(h, d),
58
+ enabled: !!(a && c) && r !== !1
59
+ });
60
+ }
61
+ function m({ enabled: n } = {}) {
62
+ let { client: i, organizationId: a, widgetToken: o, authEpoch: c } = e(), l = !!(a && o) && (n === !0 || n === void 0), d = r({
63
+ client: i,
64
+ headers: t(a)
65
+ });
66
+ return u({
67
+ ...s(d, c),
68
+ enabled: l
69
+ });
70
+ }
71
+ function h(n, { enabled: r = !0, pollWhileOcrProcessing: a = !1 } = {}) {
72
+ let { client: o, organizationId: l, widgetToken: d, authEpoch: f } = e(), p = !!(l && d && n) && r, m = a ? c({
73
+ client: o,
74
+ organizationId: l,
75
+ payableId: n ?? ""
76
+ }) : i({
77
+ client: o,
16
78
  headers: t(l),
17
- path: { payable_id: o ?? "" }
18
- }), { queryKey: m, queryFn: h } = r(p, d);
19
- return a({
20
- queryKey: m,
21
- enabled: f,
22
- retry: !1,
23
- queryFn: async (e) => {
24
- try {
25
- if (typeof h != "function") throw Error("getPayablesIdSuggestionsOptions has no queryFn");
26
- return await h(e);
27
- } catch (e) {
28
- if (i(e)) return null;
29
- throw e;
30
- }
31
- },
32
- select: (e) => e ?? void 0
79
+ path: { payable_id: n ?? "" }
80
+ });
81
+ return u({
82
+ ...s(m, f),
83
+ enabled: p
33
84
  });
34
85
  }
35
86
  //#endregion
36
- export { o as usePayableSuggestionsQuery };
87
+ export { p as useAllSuspectedDuplicatePayablesQuery, h as usePayableQuery, d as usePayablesQuery, m as usePayablesTotalCountQuery };
@@ -0,0 +1,36 @@
1
+ "use client";
2
+ "use client";
3
+ "use client";
4
+ "use client";
5
+ import { useEmbedApi as e } from "../../../shared/data-access/dist/lib/EmbedApiContext.js";
6
+ import { organizationHeaders as t } from "../../../shared/data-access/dist/lib/organizationHeaders.js";
7
+ import { getPayablesIdSuggestionsOptions as n } from "../../../shared/data-access/dist/lib/rest/@tanstack/react-query.gen.js";
8
+ import { withAuthEpoch as r } from "../../../shared/data-access/dist/lib/withAuthEpoch.js";
9
+ import { isApiNotFoundError as i } from "../../../shared/data-access/dist/lib/isApiNotFoundError.js";
10
+ import "../../../shared/data-access/dist/index.js";
11
+ import { useQuery as a } from "@tanstack/react-query";
12
+ //#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index17.js
13
+ function o(o, { enabled: s = !0 } = {}) {
14
+ let { client: c, organizationId: l, widgetToken: u, authEpoch: d } = e(), f = !!(l && u && o) && s, p = n({
15
+ client: c,
16
+ headers: t(l),
17
+ path: { payable_id: o ?? "" }
18
+ }), { queryKey: m, queryFn: h } = r(p, d);
19
+ return a({
20
+ queryKey: m,
21
+ enabled: f,
22
+ retry: !1,
23
+ queryFn: async (e) => {
24
+ try {
25
+ if (typeof h != "function") throw Error("getPayablesIdSuggestionsOptions has no queryFn");
26
+ return await h(e);
27
+ } catch (e) {
28
+ if (i(e)) return null;
29
+ throw e;
30
+ }
31
+ },
32
+ select: (e) => e ?? void 0
33
+ });
34
+ }
35
+ //#endregion
36
+ export { o as usePayableSuggestionsQuery };
@@ -9,7 +9,7 @@ import { DuplicateVerdict as n, useApplyDuplicateVerdictsMutation as r } from ".
9
9
  import "../../data-access/dist/index.js";
10
10
  import { useDuplicateBills as i } from "./index9.js";
11
11
  import { useDuplicateBillsSelection as a } from "./index10.js";
12
- import { DuplicateBillsDialog as o } from "../../ui/dist/index79.js";
12
+ import { DuplicateBillsDialog as o } from "../../ui/dist/index80.js";
13
13
  import "../../ui/dist/index.js";
14
14
  import { useMemo as s, useState as c } from "react";
15
15
  import { jsx as l } from "react/jsx-runtime";
@@ -1,4 +1,4 @@
1
- import { MARK_AS_PAID_DIALOG_LABELS_EN as e } from "../../ui/dist/index90.js";
1
+ import { MARK_AS_PAID_DIALOG_LABELS_EN as e } from "../../ui/dist/index91.js";
2
2
  import "../../ui/dist/index.js";
3
3
  //#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index14.js
4
4
  var t = {
@@ -1,5 +1,5 @@
1
- import { REVIEW_TRANSACTION_DIALOG_LABELS_EN as e } from "../../ui/dist/index87.js";
2
- import { SCHEDULE_PAYMENT_DIALOG_LABELS_EN as t } from "../../ui/dist/index93.js";
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
3
  import "../../ui/dist/index.js";
4
4
  import { SOURCE_ACCOUNT_LABELS_EN as n } from "./index22.js";
5
5
  //#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index23.js
@@ -5,8 +5,8 @@
5
5
  import { useWidgetConfig as e } from "../../../shared/feature/dist/lib/WidgetProvider/hooks.js";
6
6
  import "../../../shared/feature/dist/index.js";
7
7
  import { resolveVendor as t } from "./index7.js";
8
- import { ReviewTransactionDialog as n } from "../../ui/dist/index88.js";
9
- import { SchedulePaymentDialog as r } from "../../ui/dist/index95.js";
8
+ import { ReviewTransactionDialog as n } from "../../ui/dist/index89.js";
9
+ import { SchedulePaymentDialog as r } from "../../ui/dist/index96.js";
10
10
  import "../../ui/dist/index.js";
11
11
  import { canReadCounterpartBankAccounts as i } from "./index18.js";
12
12
  import { resolveAmountDueMinorUnits as a } from "./index19.js";
@@ -2,81 +2,97 @@ import { formatCalendarDate as e } from "../../../shared/util/dist/lib/formatCal
2
2
  import { derivePayableStatus as t } from "./index6.js";
3
3
  import { resolveVendor as n } from "./index7.js";
4
4
  import { resolveAmountDueMinorUnits as r } from "./index19.js";
5
- import { formatBillMoney as i } from "./index2.js";
6
- import { getPaidAtLabel as a } from "./index38.js";
5
+ import { maskAccountNumber as i } from "./index21.js";
6
+ import { formatBillMoney as a } from "./index2.js";
7
+ import { getPaidAtLabel as o } from "./index38.js";
7
8
  //#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index39.js
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 = [
9
+ function s({ payable: s, lineItems: c, glCodeOptions: l, glCodeRosterAvailable: u = !0, history: d, paymentHistory: f, approvalPolicy: p, labels: m, hasScheduledPayment: h, payableAchInstructions: g, payableAchInstructionsReadable: _ = !1 }) {
10
+ let v = s.currency, y = t({
11
+ apiStatus: s.status,
12
+ dueDate: s.due_date,
13
+ scheduledPaymentDate: s.scheduled_payment_date,
14
+ hasScheduledPayment: h
15
+ }), b = n(s), x = _ ? g : b?.bank_account, S = x?.account_number, C = !!(x?.account_holder_name && x.routing_number && x.account_number), w = e(s.issued_at) || m.notProvided, T = e(s.due_date) || m.notProvided, E = new Map(l.map((e) => [e.value, e.label])), D = [
15
16
  {
16
- label: p.subtotalRow,
17
- minorUnits: o.subtotal
17
+ label: m.subtotalRow,
18
+ minorUnits: s.subtotal
18
19
  },
19
20
  {
20
- label: p.discountRow,
21
- minorUnits: o.discount
21
+ label: m.discountRow,
22
+ minorUnits: s.discount
22
23
  },
23
24
  {
24
- label: p.taxRow,
25
- minorUnits: o.tax_amount
25
+ label: m.taxRow,
26
+ minorUnits: s.tax_amount
26
27
  }
27
28
  ].map((e) => ({
28
29
  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,
30
+ value: a(e.minorUnits, v)
31
+ })).filter((e) => !!e.value), O = a(s.total_amount, v);
32
+ O && D.push({
33
+ label: m.totalRow,
34
+ value: O,
34
35
  emphasis: !0
35
36
  });
36
- let w = a(o);
37
+ let k = o(s);
37
38
  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,
39
+ amountDue: a(r(s), v) ?? "",
40
+ amountPaid: k ? a(s.amount_paid, v) : void 0,
41
+ paidOnLabel: k ? m.paidOnLabel(k) : void 0,
42
+ invoiceDateLabel: w,
43
+ dueDateLabel: T,
44
+ dueDateTone: y.isOverdue ? "danger" : "default",
45
+ status: y.status,
46
+ statusTone: y.tone,
46
47
  payTo: {
47
- name: _?.name || p.notProvided,
48
- email: _?.email ?? void 0,
49
- paymentInstructionsLabel: v ? p.paymentInstructionsValue(v.slice(-4)) : void 0
48
+ name: b?.name || m.notProvided,
49
+ email: b?.email ?? "",
50
+ methodLabel: C ? m.paymentInstructionsValue(S?.slice(-4) ?? "") : m.paymentInstructionsNotSet,
51
+ fields: C ? [
52
+ {
53
+ label: m.accountHolderFieldLabel,
54
+ value: x?.account_holder_name ?? ""
55
+ },
56
+ {
57
+ label: m.routingNumberFieldLabel,
58
+ value: x?.routing_number ?? ""
59
+ },
60
+ {
61
+ label: m.accountNumberFieldLabel,
62
+ value: S ?? "",
63
+ maskedValue: i(S ?? void 0)
64
+ }
65
+ ] : []
50
66
  },
51
67
  invoiceFields: [
52
68
  {
53
- label: p.invoiceDateRow,
54
- value: y
69
+ label: m.invoiceDateRow,
70
+ value: w
55
71
  },
56
72
  {
57
- label: p.dueDateRow,
58
- value: b
73
+ label: m.dueDateRow,
74
+ value: T
59
75
  },
60
76
  {
61
- label: p.invoiceNumberRow,
62
- value: o.document_id || p.notProvided
77
+ label: m.invoiceNumberRow,
78
+ value: s.document_id || m.notProvided
63
79
  }
64
80
  ],
65
- lineItems: s.map((e) => {
66
- let t = i(e.unit_price, h);
81
+ lineItems: c.map((e) => {
82
+ let t = a(e.unit_price, v);
67
83
  return {
68
84
  id: e.id,
69
85
  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) ?? ""
86
+ glCodeLabel: e.ledger_account_id ? E.get(e.ledger_account_id) ?? (u ? m.glCodeMissing : m.glCodeUnavailable) : m.glCodeMissing,
87
+ qtyPriceLabel: e.quantity != null && t ? m.qtyPriceValue(String(e.quantity), t) : "",
88
+ amount: a(e.subtotal, v) ?? ""
73
89
  };
74
90
  }),
75
- amountRows: S,
76
- approvalPolicy: f,
77
- paymentHistory: d,
78
- history: u
91
+ amountRows: D,
92
+ approvalPolicy: p,
93
+ paymentHistory: f,
94
+ history: d
79
95
  };
80
96
  }
81
97
  //#endregion
82
- export { o as buildBillDetailView };
98
+ export { s as buildBillDetailView };
@@ -1,4 +1,4 @@
1
- import { UNSAVED_BILL_DIALOG_LABELS_EN as e } from "../../ui/dist/index100.js";
1
+ import { UNSAVED_BILL_DIALOG_LABELS_EN as e } from "../../ui/dist/index101.js";
2
2
  import "../../ui/dist/index.js";
3
3
  import { PAY_BILL_FLOW_LABELS_EN as t, mergePayBillFlowLabels as n } from "./index23.js";
4
4
  import { MARK_AS_PAID_FLOW_LABELS_EN as r, mergeMarkAsPaidFlowLabels as i } from "./index14.js";
@@ -45,6 +45,10 @@ var f = {
45
45
  ...s,
46
46
  notProvided: "Not provided",
47
47
  paymentInstructionsValue: (e) => `Account ending in ${e}`,
48
+ paymentInstructionsNotSet: "Not set",
49
+ accountHolderFieldLabel: "Account holder",
50
+ routingNumberFieldLabel: "Routing number",
51
+ accountNumberFieldLabel: "Account number",
48
52
  invoiceDateRow: "Invoice date",
49
53
  dueDateRow: "Due date",
50
54
  invoiceNumberRow: "Invoice number",
@@ -169,7 +173,11 @@ var y = {
169
173
  accountNumberLabel: "Account number",
170
174
  achHelp: "Ask your vendor for this — it's usually on their invoice, W-9, or a payment instructions email they send you.",
171
175
  cancel: "Cancel",
172
- save: "Save vendor"
176
+ save: "Save vendor",
177
+ discardConfirmTitle: "Discard unsaved changes?",
178
+ discardConfirmDescription: "You've made changes to this vendor that haven't been saved. If you leave now, they'll be lost.",
179
+ keepEditingAction: "Keep editing",
180
+ discardChangesAction: "Discard changes"
173
181
  };
174
182
  //#endregion
175
183
  export { f as BILL_CREATE_MESSAGE_LABELS_EN, _ as BILL_CREATE_SCREEN_LABELS_EN, h as BILL_DETAIL_VIEW_LABELS_EN, g as BILL_HISTORY_LABELS_EN, m as SOURCE_DOCUMENT_CONTAINER_LABELS_EN, y as VENDOR_INLINE_FORM_LABELS_EN, p as VENDOR_SECTION_PROPS_LABELS_EN, v as mergeBillCreateScreenCopy };
@@ -4,7 +4,7 @@
4
4
  "use client";
5
5
  import { useAttachPayableFileMutation as e } from "../../data-access/dist/index13.js";
6
6
  import "../../data-access/dist/index.js";
7
- import { SourceDocumentPanel as t } from "../../ui/dist/index98.js";
7
+ import { SourceDocumentPanel as t } from "../../ui/dist/index99.js";
8
8
  import "../../ui/dist/index.js";
9
9
  import { createSourceDocumentPreview as n } from "./index42.js";
10
10
  import { SOURCE_DOCUMENT_CONTAINER_LABELS_EN as r } from "./index43.js";