@tesouro/embedded-components-react 0.2.254 → 0.2.256

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 (142) hide show
  1. package/dist/core.js +1 -1
  2. package/dist/index.css +15 -0
  3. package/dist/index.js +2 -2
  4. package/dist/lib/BillPayWidget.d.ts +151 -151
  5. package/dist/lib/BillPayWidget.js +1 -1
  6. package/dist/lib/InsightsWidget.js +1 -1
  7. package/dist/libs/tesouro-embedded-components-react/accept-disclosures-widget/feature/dist/index4.js +1 -1
  8. package/dist/libs/tesouro-embedded-components-react/balances-widget/feature/dist/index3.js +4 -4
  9. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/index17.js +119 -121
  10. package/dist/libs/tesouro-embedded-components-react/bank-accounts-widget/feature/dist/index7.js +1 -1
  11. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index.js +10 -0
  12. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index10.js +40 -0
  13. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index11.js +36 -0
  14. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index3.js +28 -0
  15. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index4.js +22 -0
  16. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index5.js +7 -0
  17. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index6.js +75 -0
  18. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index7.js +166 -0
  19. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index8.js +17 -0
  20. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index9.js +30 -0
  21. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index.js +15 -1
  22. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index10.js +9 -0
  23. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index11.js +99 -0
  24. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index12.js +4 -0
  25. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index13.js +4 -0
  26. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index14.js +43 -0
  27. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index15.js +1 -0
  28. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index16.js +50 -0
  29. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index17.js +8 -0
  30. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index18.js +7 -0
  31. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index19.js +93 -0
  32. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index2.js +42 -2
  33. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index20.js +3 -0
  34. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index21.js +8 -0
  35. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index22.js +9 -0
  36. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index23.js +85 -0
  37. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index24.js +3 -0
  38. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index25.js +8 -0
  39. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index26.js +112 -0
  40. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index27.js +1 -0
  41. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index28.js +25 -0
  42. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index3.js +51 -35
  43. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index4.js +235 -1
  44. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index5.js +106 -7
  45. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index6.js +35 -88
  46. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index7.js +122 -1
  47. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index8.js +36 -22
  48. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index9.js +74 -0
  49. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index.js +15 -8
  50. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index10.js +24 -3
  51. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index11.js +1 -0
  52. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index12.js +12 -0
  53. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index13.js +83 -3
  54. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index14.js +1 -0
  55. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index15.js +18 -0
  56. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index16.js +205 -4
  57. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index17.js +1 -0
  58. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index18.js +10 -0
  59. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index19.js +89 -4
  60. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index20.js +1 -0
  61. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index21.js +10 -0
  62. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index22.js +131 -4
  63. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index23.js +1 -0
  64. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index24.js +10 -0
  65. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index25.js +45 -5
  66. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index27.js +17 -1
  67. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index28.js +149 -7
  68. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index3.js +73 -4
  69. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index33.js +14 -0
  70. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index34.js +24 -2
  71. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index35.js +1 -0
  72. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index36.js +24 -1
  73. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index38.js +145 -6
  74. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index39.js +10 -0
  75. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index40.js +8 -0
  76. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index41.js +93 -4
  77. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index43.js +1 -0
  78. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index44.js +7 -0
  79. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index45.js +30 -2
  80. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index46.js +1 -0
  81. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index47.js +13 -0
  82. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index48.js +88 -5
  83. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index7.js +62 -5
  84. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index9.js +7 -0
  85. package/dist/libs/tesouro-embedded-components-react/cards-widget/feature/dist/index4.js +2 -2
  86. package/dist/libs/tesouro-embedded-components-react/counterparts-widget/feature/dist/index4.js +13 -13
  87. package/dist/libs/tesouro-embedded-components-react/counterparts-widget/feature/dist/index7.js +58 -58
  88. package/dist/libs/tesouro-embedded-components-react/counterparts-widget/feature/dist/index8.js +19 -19
  89. package/dist/libs/tesouro-embedded-components-react/gl-code-table-widget/feature/dist/index7.js +1 -1
  90. package/dist/libs/tesouro-embedded-components-react/insights-widget/feature/dist/index.js +2 -2
  91. package/dist/libs/tesouro-embedded-components-react/insights-widget/feature/dist/index10.js +13 -62
  92. package/dist/libs/tesouro-embedded-components-react/insights-widget/feature/dist/index11.js +66 -0
  93. package/dist/libs/tesouro-embedded-components-react/insights-widget/feature/dist/index7.js +11 -109
  94. package/dist/libs/tesouro-embedded-components-react/insights-widget/feature/dist/index8.js +113 -21
  95. package/dist/libs/tesouro-embedded-components-react/insights-widget/feature/dist/index9.js +21 -15
  96. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index7.js +1 -1
  97. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index9.js +2 -2
  98. package/dist/libs/tesouro-embedded-components-react/linked-accounts-widget/feature/dist/index8.js +3 -3
  99. package/dist/libs/tesouro-embedded-components-react/profile-widget/feature/dist/index4.js +1 -1
  100. package/dist/libs/tesouro-embedded-components-react/shared/approval-policy/feature/dist/lib/policyViewModel.js +1 -1
  101. package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/feature/dist/index.js +15 -15
  102. package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/feature/dist/lib/helpers.js +9 -9
  103. package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/feature/dist/lib/useAddressForm.js +1 -1
  104. package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/feature/dist/lib/useCounterpartForm.js +32 -29
  105. package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/feature/dist/lib/useSubEntityForm.js +1 -1
  106. package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/ui/dist/index.js +7 -7
  107. package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/ui/dist/index8.js +232 -220
  108. package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/index.js +19 -19
  109. package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/rest/@tanstack/react-query.gen.js +171 -138
  110. package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/rest/client/index.js +1 -0
  111. package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/rest/core/bodySerializer.gen.js +9 -2
  112. package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/rest/sdk.gen.js +404 -293
  113. package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/withAuthEpoch.js +6 -4
  114. package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/index.js +5 -5
  115. package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/WidgetProvider/WidgetTokenRefreshProvider.js +1 -1
  116. package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/WidgetProvider/hooks.js +6 -3
  117. package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/analytics/build-info.js +1 -1
  118. package/dist/libs/tesouro-embedded-components-react/shared/monite-wrapper/feature/dist/lib/MoniteWrapper.js +75 -45
  119. package/dist/libs/tesouro-embedded-components-react/shared/product-catalog/feature/dist/index.js +1 -1
  120. package/dist/libs/tesouro-embedded-components-react/shared/product-catalog/feature/dist/lib/MeasureUnitsManagerContainer.js +1 -1
  121. package/dist/libs/tesouro-embedded-components-react/shared/product-catalog/feature/dist/lib/useProductForm.js +1 -1
  122. package/dist/libs/tesouro-embedded-components-react/shared/util/dist/{index3.js → lib/amountOutputToMajorUnits.js} +1 -1
  123. package/dist/libs/tesouro-embedded-components-react/shared/util/dist/{index14.js → lib/apiErrors.js} +1 -1
  124. package/dist/libs/tesouro-embedded-components-react/shared/util/dist/{index2.js → lib/coerceAmountValueToMinorUnits.js} +1 -1
  125. package/dist/libs/tesouro-embedded-components-react/shared/util/dist/lib/formatCalendarDate.js +13 -0
  126. package/dist/libs/tesouro-embedded-components-react/shared/util/dist/{index4.js → lib/formatMoneyExact.js} +1 -1
  127. package/dist/libs/tesouro-embedded-components-react/shared/util/dist/{index5.js → lib/formatPhoneDisplay.js} +1 -1
  128. package/dist/libs/tesouro-embedded-components-react/shared/util/dist/{index6.js → lib/getInitials.js} +1 -1
  129. package/dist/libs/tesouro-embedded-components-react/shared/util/dist/{index7.js → lib/normalizeAmountOutputCurrencyCode.js} +1 -1
  130. package/dist/libs/tesouro-embedded-components-react/shared/util/dist/{index8.js → lib/parseAmountOutputMajorUnits.js} +1 -1
  131. package/dist/libs/tesouro-embedded-components-react/shared/util/dist/{index9.js → lib/parseDecimalAmountToMinorUnits.js} +2 -2
  132. package/dist/libs/tesouro-embedded-components-react/shared/util/dist/{index10.js → lib/sumAmountOutputsMajorUnits.js} +3 -3
  133. package/dist/libs/tesouro-embedded-components-react/shared/util/dist/{index11.js → lib/usStates.js} +1 -1
  134. package/dist/libs/tesouro-embedded-components-react/shared/util/dist/{index13.js → lib/widgetDomEvents.js} +1 -1
  135. package/dist/libs/tesouro-embedded-components-react/shared/util/dist/{index12.js → lib/widgetTokenManager.js} +1 -1
  136. package/dist/libs/tesouro-embedded-components-react/tags-widget/feature/dist/index8.js +1 -1
  137. package/dist/libs/tesouro-embedded-components-react/team-widget/feature/dist/index11.js +1 -1
  138. package/dist/libs/tesouro-embedded-components-react/team-widget/feature/dist/index4.js +1 -1
  139. package/dist/libs/tesouro-embedded-components-react/transfers-widget/feature/dist/index4.js +4 -4
  140. package/dist/libs/tesouro-embedded-components-react/transfers-widget/feature/dist/index5.js +1 -1
  141. package/dist/packages/shared-ui-shadcn/dist/index.js +3593 -3582
  142. package/package.json +1 -1
@@ -0,0 +1,166 @@
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 { deleteFilesId as n, patchPayablesId as r, postPayables as i, postPayablesIdAttachFile as a, postPayablesIdSubmitForApproval as o, postPayablesIdValidate as s, postPayablesUploadFromFile as c } from "../../../shared/data-access/dist/lib/rest/sdk.gen.js";
8
+ import "../../../shared/data-access/dist/index.js";
9
+ import { invalidatePayableQueries as l } from "./index4.js";
10
+ import { useMutation as u } from "@tanstack/react-query";
11
+ //#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index7.js
12
+ function d() {
13
+ let { client: n, organizationId: r } = e();
14
+ return u({
15
+ mutationFn: async ({ body: e }) => {
16
+ let { data: a } = await i({
17
+ client: n,
18
+ headers: t(r),
19
+ body: e,
20
+ throwOnError: !0
21
+ });
22
+ return a;
23
+ },
24
+ onSuccess: async () => {
25
+ await l({
26
+ client: n,
27
+ organizationId: r
28
+ });
29
+ }
30
+ });
31
+ }
32
+ function f() {
33
+ let { client: n, organizationId: i } = e();
34
+ return u({
35
+ mutationFn: async ({ path: e, body: a }) => {
36
+ let { data: o } = await r({
37
+ client: n,
38
+ headers: t(i),
39
+ path: e,
40
+ body: a,
41
+ throwOnError: !0
42
+ });
43
+ return o;
44
+ },
45
+ onSuccess: async (e, t) => {
46
+ await l({
47
+ client: n,
48
+ organizationId: i,
49
+ payableId: t.path.payable_id
50
+ });
51
+ }
52
+ });
53
+ }
54
+ function p() {
55
+ let { client: n, organizationId: i } = e();
56
+ return u({
57
+ mutationFn: async ({ file: e }) => {
58
+ let { data: a } = await c({
59
+ client: n,
60
+ headers: t(i),
61
+ body: { file: e },
62
+ throwOnError: !0
63
+ });
64
+ if (a?.id && a.currency !== "USD") try {
65
+ return await r({
66
+ client: n,
67
+ headers: t(i),
68
+ path: { payable_id: a.id },
69
+ body: { currency: "USD" },
70
+ throwOnError: !0
71
+ }), {
72
+ ...a,
73
+ currency: "USD"
74
+ };
75
+ } catch {}
76
+ return a;
77
+ },
78
+ onSuccess: async () => {
79
+ await l({
80
+ client: n,
81
+ organizationId: i
82
+ });
83
+ }
84
+ });
85
+ }
86
+ function m() {
87
+ let { client: n, organizationId: r } = e();
88
+ return u({
89
+ mutationFn: async ({ path: e, file: i }) => {
90
+ let { data: o } = await a({
91
+ client: n,
92
+ headers: t(r),
93
+ path: e,
94
+ body: { file: i },
95
+ throwOnError: !0
96
+ });
97
+ return o;
98
+ },
99
+ onSuccess: async (e, t) => {
100
+ await l({
101
+ client: n,
102
+ organizationId: r,
103
+ payableId: t.path.payable_id
104
+ });
105
+ }
106
+ });
107
+ }
108
+ function h() {
109
+ let { client: r, organizationId: i } = e();
110
+ return u({
111
+ mutationFn: async ({ path: e }) => {
112
+ await n({
113
+ client: r,
114
+ headers: t(i),
115
+ path: e,
116
+ throwOnError: !0
117
+ });
118
+ },
119
+ onSuccess: async (e, t) => {
120
+ await l({
121
+ client: r,
122
+ organizationId: i,
123
+ payableId: t.payableId
124
+ });
125
+ }
126
+ });
127
+ }
128
+ function g() {
129
+ let { client: n, organizationId: r } = e();
130
+ return u({ mutationFn: async ({ path: e }) => {
131
+ let { data: i } = await s({
132
+ client: n,
133
+ headers: t(r),
134
+ path: e,
135
+ throwOnError: !0
136
+ });
137
+ return {
138
+ id: i.id,
139
+ validation_errors: i.validation_errors ?? []
140
+ };
141
+ } });
142
+ }
143
+ function _() {
144
+ let { client: n, organizationId: r } = e();
145
+ return u({
146
+ mutationFn: async ({ path: e }) => {
147
+ let { data: i } = await o({
148
+ client: n,
149
+ headers: t(r),
150
+ path: e,
151
+ throwOnError: !0
152
+ });
153
+ return i;
154
+ },
155
+ onSuccess: async (e, t) => {
156
+ await l({
157
+ client: n,
158
+ organizationId: r,
159
+ payableId: t.path.payable_id,
160
+ includeApprovalRequests: !0
161
+ });
162
+ }
163
+ });
164
+ }
165
+ //#endregion
166
+ export { m as useAttachPayableFileMutation, d as useCreatePayableMutation, h as useDeletePayableFileMutation, _ as useSubmitPayableForApprovalMutation, f as useUpdatePayableMutation, p as useUploadPayableFromFileMutation, g as useValidatePayableMutation };
@@ -0,0 +1,17 @@
1
+ import { organizationHeaders as e } from "../../../shared/data-access/dist/lib/organizationHeaders.js";
2
+ import { getPayablesIdOptions as t } from "../../../shared/data-access/dist/lib/rest/@tanstack/react-query.gen.js";
3
+ import "../../../shared/data-access/dist/index.js";
4
+ //#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index8.js
5
+ var n = 2500;
6
+ function r({ client: n, organizationId: r, payableId: i }) {
7
+ return {
8
+ ...t({
9
+ client: n,
10
+ headers: e(r),
11
+ path: { payable_id: i }
12
+ }),
13
+ refetchInterval: (e) => e.state.data?.ocr_status === "processing" && 2500
14
+ };
15
+ }
16
+ //#endregion
17
+ export { n as OCR_POLL_INTERVAL_MS, r as payableOcrQueryOptions };
@@ -0,0 +1,30 @@
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 { withAuthEpoch as t } from "../../../shared/data-access/dist/lib/withAuthEpoch.js";
7
+ import "../../../shared/data-access/dist/index.js";
8
+ import { payableOcrQueryOptions as n } from "./index8.js";
9
+ import { useQueries as r } from "@tanstack/react-query";
10
+ //#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index9.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
+ }))
27
+ });
28
+ }
29
+ //#endregion
30
+ export { i as usePayableOcrQueries };
@@ -1,2 +1,16 @@
1
- import { BillPayWidget as e } from "./index8.js";
1
+ import "./index2.js";
2
+ import "./index7.js";
3
+ import "./index9.js";
4
+ import "./index11.js";
5
+ import "./index12.js";
6
+ import "./index16.js";
7
+ import "./index17.js";
8
+ import "./index18.js";
9
+ import "./index19.js";
10
+ import "./index20.js";
11
+ import "./index21.js";
12
+ import "./index22.js";
13
+ import "./index23.js";
14
+ import "./index24.js";
15
+ import { BillPayWidget as e } from "./index28.js";
2
16
  export { e as BillPayWidget };
@@ -0,0 +1,9 @@
1
+ //#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index10.js
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
+ };
8
+ //#endregion
9
+ export { e as billCreateTestIds };
@@ -0,0 +1,99 @@
1
+ "use client";
2
+ "use client";
3
+ "use client";
4
+ "use client";
5
+ import { useLedgerAccountsQuery as e } from "../../../shared/data-access/dist/lib/reference-data/useLedgerAccountsQuery.js";
6
+ import { usePaymentTermsQuery as t } from "../../../shared/data-access/dist/lib/reference-data/usePaymentTermsQuery.js";
7
+ import "../../../shared/data-access/dist/index.js";
8
+ import { BILL_CREATE_SCREEN_LABELS_EN as n } from "./index2.js";
9
+ import { useAllPayableLineItemsQuery as r } from "../../data-access/dist/index6.js";
10
+ import { usePayableQuery as i } from "../../data-access/dist/index10.js";
11
+ import "../../data-access/dist/index.js";
12
+ import { useBillCreateController as a } from "./index7.js";
13
+ import { useBillForm as o } from "./index9.js";
14
+ import { BillCreateScreen as s } from "../../ui/dist/index28.js";
15
+ import { ExtractionNotice as c } from "../../ui/dist/index45.js";
16
+ import "../../ui/dist/index.js";
17
+ import { SourceDocumentContainer as l } from "./index3.js";
18
+ import { useVendorSectionProps as u } from "./index5.js";
19
+ import { billCreateTestIds as d } from "./index10.js";
20
+ import { useCallback as f, useEffect as p, useMemo as m, useState as h } from "react";
21
+ import { jsx as g } from "react/jsx-runtime";
22
+ //#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index11.js
23
+ function _({ open: _, onOpenChange: v, payableId: y, copy: b }) {
24
+ let x = {
25
+ ...n,
26
+ ...b
27
+ }, [S, C] = h(), [w, T] = h(!1), [E, D] = h(!1), [O, k] = h(), A = y ?? O, j = i(A, { pollWhileOcrProcessing: !0 }), M = r(A), N = e(), P = t(), F = j.data, I = o({
28
+ payable: F,
29
+ lineItems: M.lineItems
30
+ }), L = F?.counterpart_id;
31
+ p(() => {
32
+ w || L && (C(L), T(!0));
33
+ }, [w, L]);
34
+ let R = f((e) => {
35
+ T(!0), C(e);
36
+ }, []), z = P.data?.data?.find((e) => e.id === I.values.paymentTerms), B = m(() => (P.data?.data ?? []).filter((e) => !!(e.id && e.name)).map((e) => ({
37
+ value: e.id,
38
+ label: e.name
39
+ })), [P.data]), V = a({
40
+ payableId: y,
41
+ form: I,
42
+ paymentTerm: z,
43
+ counterpartId: S,
44
+ onPayableCreated: k,
45
+ onSaved: k,
46
+ onDraftSaved: () => v(!1),
47
+ onFinalized: () => v(!1)
48
+ }), H = m(() => (N.data?.data ?? []).map((e) => ({
49
+ value: e.id,
50
+ label: [e.nominal_code, e.name].filter(Boolean).join(" — ")
51
+ })), [N.data]), U = F?.source_of_payable_data === "ocr", W = F?.counterpart_raw_data?.name, G = () => {
52
+ I.isDirty && !window.confirm(x.discardConfirm) || v(!1);
53
+ }, K = u({
54
+ payableId: A,
55
+ counterpartId: S,
56
+ payableCounterpartId: L,
57
+ onCounterpartChange: R
58
+ });
59
+ return /* @__PURE__ */ g(s, {
60
+ open: _,
61
+ onOpenChange: (e) => e ? v(!0) : G(),
62
+ title: U && W ? x.extractedTitle(W) : x.newTitle,
63
+ notice: U && !E ? /* @__PURE__ */ g(c, { onDismiss: () => D(!0) }) : void 0,
64
+ vendor: {
65
+ ...K,
66
+ testId: d.vendorSection
67
+ },
68
+ values: I.values,
69
+ errors: I.errors,
70
+ onChange: I.onChange,
71
+ paymentTermOptions: B,
72
+ lineItems: {
73
+ items: I.lineItemRows,
74
+ glCodeOptions: H,
75
+ totalAmountLabel: I.totalAmountLabel,
76
+ onAddLineItem: I.onAddLineItem,
77
+ testId: d.lineItems
78
+ },
79
+ documentPanel: /* @__PURE__ */ g(l, {
80
+ payableId: A,
81
+ isDocumentPending: !!A && !F?.file && (j.isLoading || F?.ocr_status === "processing"),
82
+ file: F?.file ? {
83
+ id: F.file.id,
84
+ name: F.file.name,
85
+ url: F.file.url,
86
+ mimetype: F.file.mimetype
87
+ } : void 0
88
+ }),
89
+ isLineItemsLoading: M.isResolving,
90
+ isSavingDraft: V.isSavingDraft,
91
+ isFinalizing: V.isFinalizing,
92
+ onCancel: G,
93
+ onSaveDraft: V.saveDraft,
94
+ onFinalize: V.finalize,
95
+ testId: d.dialog
96
+ });
97
+ }
98
+ //#endregion
99
+ export { _ as BillCreateDialog, _ as default };
@@ -0,0 +1,4 @@
1
+ import "./index2.js";
2
+ import "./index7.js";
3
+ import "./index9.js";
4
+ import "./index11.js";
@@ -0,0 +1,4 @@
1
+ //#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index13.js
2
+ var e = { Mounted: "bill_pay_widget.mounted" }, t = "bill_pay_widget";
3
+ //#endregion
4
+ export { e as BillPayWidgetAnalyticsEvent, t as WIDGET_NAME };
@@ -0,0 +1,43 @@
1
+ "use client";
2
+ "use client";
3
+ "use client";
4
+ "use client";
5
+ import { useAnalyticsTrack as e } from "../../../shared/feature/dist/lib/analytics/hooks.js";
6
+ import "../../../shared/feature/dist/index.js";
7
+ import { BillPayWidgetAnalyticsEvent as t, WIDGET_NAME as n } from "./index13.js";
8
+ import { Payables as r } from "../../../monite-sdk/dist/index431.js";
9
+ import "../../../monite-sdk/dist/index.js";
10
+ import { MoniteRegionProvider as i } from "../../../shared/monite-wrapper/feature/dist/lib/MoniteRegionProvider.js";
11
+ import "../../../shared/monite-wrapper/feature/dist/index.js";
12
+ import { useEffect as a } from "react";
13
+ import { jsx as o } from "react/jsx-runtime";
14
+ //#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index14.js
15
+ var s = (e) => e;
16
+ function c(n) {
17
+ let i = e();
18
+ return a(() => {
19
+ i(t.Mounted);
20
+ }, [i]), /* @__PURE__ */ o(r, { ...n });
21
+ }
22
+ function l({ baseUrl: e, widgetToken: t, organizationId: r, configClient: a, linkComponent: l, implementation: u, uiFramework: d, errorFallback: f, onError: p, finopsThemeColors: m, analytics: h, pageTitleComponent: g = s, ..._ }) {
23
+ return /* @__PURE__ */ o(i, {
24
+ widgetName: n,
25
+ baseUrl: e,
26
+ widgetToken: t,
27
+ organizationId: r,
28
+ configClient: a,
29
+ linkComponent: l,
30
+ implementation: u,
31
+ uiFramework: d,
32
+ errorFallback: f,
33
+ onError: p,
34
+ finopsThemeColors: m,
35
+ analytics: h,
36
+ children: /* @__PURE__ */ o(c, {
37
+ ..._,
38
+ pageTitleComponent: g
39
+ })
40
+ });
41
+ }
42
+ //#endregion
43
+ export { l as BillPayWidgetMonite, l as default };
@@ -0,0 +1,50 @@
1
+ //#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index16.js
2
+ var e = /* @__PURE__ */ new Set([
3
+ "new",
4
+ "approve_in_progress",
5
+ "waiting_to_be_paid",
6
+ "partially_paid"
7
+ ]);
8
+ function t(e, t) {
9
+ let n = /* @__PURE__ */ new Date(`${e.slice(0, 10)}T00:00:00Z`), r = Date.UTC(t.getUTCFullYear(), t.getUTCMonth(), t.getUTCDate());
10
+ return n.getTime() < r;
11
+ }
12
+ function n(n, r, i = /* @__PURE__ */ new Date()) {
13
+ if (e.has(n) && r && t(r, i)) return {
14
+ status: "overdue",
15
+ tone: "danger"
16
+ };
17
+ switch (n) {
18
+ case "draft": return {
19
+ status: "draft",
20
+ tone: "neutral"
21
+ };
22
+ case "new":
23
+ case "approve_in_progress": return {
24
+ status: "pending_approval",
25
+ tone: "warning"
26
+ };
27
+ case "waiting_to_be_paid": return {
28
+ status: "ready_to_pay",
29
+ tone: "info"
30
+ };
31
+ case "partially_paid": return {
32
+ status: "partially_paid",
33
+ tone: "success"
34
+ };
35
+ case "paid": return {
36
+ status: "paid",
37
+ tone: "success"
38
+ };
39
+ case "canceled": return {
40
+ status: "canceled",
41
+ tone: "neutral"
42
+ };
43
+ case "rejected": return {
44
+ status: "rejected",
45
+ tone: "danger"
46
+ };
47
+ }
48
+ }
49
+ //#endregion
50
+ export { n as derivePayableStatus };
@@ -0,0 +1,8 @@
1
+ //#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index17.js
2
+ var e = {
3
+ emptyHeading: "Add your first bill",
4
+ nonEmptyHeading: "Add a bill",
5
+ createButton: "Add bill"
6
+ };
7
+ //#endregion
8
+ export { e as BILLS_TAB_LABELS_EN };
@@ -0,0 +1,7 @@
1
+ //#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index18.js
2
+ var e = {
3
+ root: "bill-pay-bills-tab",
4
+ uploadTray: "bill-pay-upload-tray"
5
+ };
6
+ //#endregion
7
+ export { e as billsTabTestIds };
@@ -0,0 +1,93 @@
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 "../../../shared/data-access/dist/index.js";
8
+ import { formatCalendarDate as n } from "../../../shared/util/dist/lib/formatCalendarDate.js";
9
+ import { formatMoneyExact as r } from "../../../shared/util/dist/lib/formatMoneyExact.js";
10
+ import { useWidgetConfig as i } from "../../../shared/feature/dist/lib/WidgetProvider/hooks.js";
11
+ import "../../../shared/feature/dist/index.js";
12
+ import { usePayablesQuery as a } from "../../data-access/dist/index10.js";
13
+ import "../../data-access/dist/index.js";
14
+ import { AddBillDialog as o } from "../../ui/dist/index10.js";
15
+ import { BillsScreen as s } from "../../ui/dist/index38.js";
16
+ import "../../ui/dist/index.js";
17
+ import { BillCreateDialog as c } from "./index11.js";
18
+ import "./index12.js";
19
+ import { derivePayableStatus as l } from "./index16.js";
20
+ import { BILLS_TAB_LABELS_EN as u } from "./index17.js";
21
+ import { billsTabTestIds as d } from "./index18.js";
22
+ import { useEffect as f, useState as p } from "react";
23
+ import { jsx as m, jsxs as h } from "react/jsx-runtime";
24
+ //#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index19.js
25
+ var g = 10;
26
+ function _({ labels: _, onEnqueueFiles: v, openPayableId: y, onOpenPayableHandled: b }) {
27
+ let x = {
28
+ ...u,
29
+ ..._
30
+ }, [S, C] = p(!1), [w, T] = p(), [E, D] = p(!1), [O, k] = p([]), [A, j] = p(g), [M, N] = p(), { initResponse: P } = i(), F = e(P?.scopes, [t.PayableReadOrg]), I = e(P?.scopes, [t.PayableWriteOrg]), L = !P || F, R = !P || I, z = a({
31
+ limit: A,
32
+ pagination_token: M,
33
+ enabled: L
34
+ }), B = (z.data?.data ?? []).map((e) => {
35
+ let t = l(e.status, e.due_date);
36
+ return {
37
+ vendorLabel: e.counterpart_raw_data?.name ?? "",
38
+ dueDateLabel: n(e.due_date),
39
+ amountLabel: r((e.total_amount ?? 0) / 100, { currencyCode: e.currency ?? "USD" }),
40
+ status: t.status,
41
+ statusTone: t.tone,
42
+ onOpen: () => {
43
+ T(e.id), D(!0);
44
+ }
45
+ };
46
+ }), V = () => {
47
+ C(!1), T(void 0), D(!0);
48
+ }, H = (e) => {
49
+ C(!1), v?.(e);
50
+ };
51
+ return f(() => {
52
+ y && (T(y), D(!0), b?.());
53
+ }, [b, y]), /* @__PURE__ */ h("div", {
54
+ "data-testid": d.root,
55
+ children: [
56
+ /* @__PURE__ */ m(s, {
57
+ rows: B,
58
+ isLoading: z.isLoading || !P,
59
+ isError: z.isError,
60
+ onRetry: () => z.refetch(),
61
+ sorting: O,
62
+ onSortingChange: k,
63
+ pageSize: A,
64
+ onPageSizeChange: j,
65
+ hasNextPage: !!z.data?.next_pagination_token,
66
+ hasPrevPage: !!z.data?.prev_pagination_token,
67
+ onNextPage: () => N(z.data?.next_pagination_token),
68
+ onPrevPage: () => N(z.data?.prev_pagination_token),
69
+ onCreateClick: R ? () => C(!0) : void 0,
70
+ onEnterManually: R ? V : void 0,
71
+ onFilesSelected: R ? H : void 0,
72
+ labels: {
73
+ createButton: x.createButton,
74
+ addBill: { heading: x.emptyHeading }
75
+ }
76
+ }),
77
+ R ? /* @__PURE__ */ m(o, {
78
+ open: S,
79
+ onOpenChange: C,
80
+ onFilesSelected: H,
81
+ onEnterManually: V,
82
+ labels: { heading: B.length ? x.nonEmptyHeading : x.emptyHeading }
83
+ }) : null,
84
+ E ? /* @__PURE__ */ m(c, {
85
+ open: E,
86
+ onOpenChange: D,
87
+ payableId: w
88
+ }) : null
89
+ ]
90
+ });
91
+ }
92
+ //#endregion
93
+ export { _ as BillsTab, _ as default };
@@ -1,4 +1,44 @@
1
1
  //#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index2.js
2
- var e = { Mounted: "bill_pay_widget.mounted" }, t = "bill_pay_widget";
2
+ var e = {
3
+ unmappedValidationError: (e, t) => `${e}: ${t}`,
4
+ unknownValidationField: "(unknown field)",
5
+ requiredField: "This field is required.",
6
+ saveFailed: "We could not save this bill. Try again.",
7
+ finalizeFailed: "We could not submit this bill. Try again.",
8
+ draftSaved: "Bill saved as a draft.",
9
+ billFinalized: "Bill submitted for approval."
10
+ }, t = {
11
+ achMethod: "via ACH bank transfer",
12
+ noMethod: "No payment method on file",
13
+ accountHolder: "Account holder",
14
+ routingNumber: "Routing number",
15
+ accountNumber: "Account number",
16
+ searchFailed: "We could not load vendors. Try again.",
17
+ vendorDetailsFailed: "We could not load this vendor. Try again."
18
+ }, n = {
19
+ attachFailed: "We could not attach that file. Try again.",
20
+ saveBeforeAttaching: "Save this bill before attaching a document."
21
+ }, r = {
22
+ newTitle: "Add bill",
23
+ extractedTitle: (e) => `Bill from ${e}`,
24
+ discardConfirm: "Discard your changes to this bill?"
25
+ }, i = {
26
+ createTitle: "New vendor",
27
+ editTitle: "Edit vendor",
28
+ close: "Close the vendor form",
29
+ nameLabel: "Name",
30
+ addAddress: "Add address (optional)",
31
+ paymentMethodsHeading: "Accepted payment methods",
32
+ paymentMethodsDescription: "How and where will the money be sent. Don't have these yet? No problem. You can save this vendor and add their payment details later — you just won't be able to send payments until you do.",
33
+ achTitle: "ACH bank transfer",
34
+ achDescription: "Fast, direct deposit to the vendor's bank. Arrives in 1–3 business days.",
35
+ addBankAccount: "Add bank account",
36
+ accountHolderNameLabel: "Account holder name",
37
+ routingNumberLabel: "Routing number",
38
+ accountNumberLabel: "Account number",
39
+ achHelp: "Ask your vendor for this — it's usually on their invoice, W-9, or a payment instructions email they send you.",
40
+ cancel: "Cancel",
41
+ save: "Save vendor"
42
+ };
3
43
  //#endregion
4
- export { e as BillPayWidgetAnalyticsEvent, t as WIDGET_NAME };
44
+ export { e as BILL_CREATE_MESSAGE_LABELS_EN, r as BILL_CREATE_SCREEN_LABELS_EN, n as SOURCE_DOCUMENT_CONTAINER_LABELS_EN, i as VENDOR_INLINE_FORM_LABELS_EN, t as VENDOR_SECTION_PROPS_LABELS_EN };
@@ -0,0 +1,3 @@
1
+ import "./index17.js";
2
+ import "./index18.js";
3
+ import "./index19.js";
@@ -0,0 +1,8 @@
1
+ //#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index21.js
2
+ var e = (e) => [
3
+ "bill-pay",
4
+ "upload-queue",
5
+ e ?? ""
6
+ ];
7
+ //#endregion
8
+ export { e as billPayUploadQueueKey };
@@ -0,0 +1,9 @@
1
+ //#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index22.js
2
+ var e = {
3
+ uploadingSummary: (e) => `Uploading and scanning ${e} ${e === 1 ? "file" : "files"}`,
4
+ completeSummary: (e) => `${e} ${e === 1 ? "upload" : "uploads"} complete`,
5
+ readyCaption: (e) => `${e} new ${e === 1 ? "bill" : "bills"} ready`,
6
+ failedCaption: (e) => `${e} failed to upload`
7
+ };
8
+ //#endregion
9
+ export { e as BILL_UPLOAD_QUEUE_LABELS_EN };