@tesouro/embedded-components-react 0.3.53 → 0.3.57
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.
- package/README.md +0 -20
- package/dist/index.d.ts +2 -22
- package/dist/index.js +44 -48
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index16.js +65 -3
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index17.js +4 -5
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index18.js +5 -4
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index19.js +3 -32
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index20.js +30 -37
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index21.js +37 -158
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index22.js +165 -28
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index23.js +48 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index24.js +1 -50
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index25.js +47 -4
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index26.js +4 -13
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index27.js +13 -14
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index28.js +7 -57
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index29.js +54 -16
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index30.js +24 -60
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index31.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index36.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index40.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index43.js +6 -6
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index44.js +98 -98
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index53.js +51 -53
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index55.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index57.js +131 -140
- package/dist/libs/tesouro-embedded-components-react/create-card-widget/feature/dist/index.js +4 -4
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index22.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index98.js +47 -29
- package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/data-access/dist/index5.js +6 -6
- package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/feature/dist/index.js +6 -5
- package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/feature/dist/lib/helpers.js +2 -3
- package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/feature/dist/lib/usePayableAchInstructions.js +18 -0
- package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/analytics/build-info.js +1 -1
- package/package.json +1 -1
- package/dist/lib/CreateCardWidget.d.ts +0 -823
- package/dist/lib/CreateCardWidget.js +0 -5
|
@@ -76,7 +76,7 @@ var a = (e) => t, o = (e) => i.object({
|
|
|
76
76
|
})).default([]),
|
|
77
77
|
...m().shape
|
|
78
78
|
}).superRefine((t, i) => {
|
|
79
|
-
|
|
79
|
+
x(t, i, e, r), h(t, i, e, n), g(t, i, e);
|
|
80
80
|
}), d = (e) => i.array(i.object({
|
|
81
81
|
id: i.string().optional(),
|
|
82
82
|
quantity: i.number().optional(),
|
|
@@ -111,7 +111,7 @@ var a = (e) => t, o = (e) => i.object({
|
|
|
111
111
|
})).default([]),
|
|
112
112
|
...m().shape
|
|
113
113
|
}).superRefine((r, i) => {
|
|
114
|
-
|
|
114
|
+
x(r, i, e, n), h(r, i, e, t), g(r, i, e);
|
|
115
115
|
}), p = (e) => i.email().safeParse(e).success, m = () => i.object({
|
|
116
116
|
frequency: i.enum([
|
|
117
117
|
"once",
|
|
@@ -134,7 +134,7 @@ var a = (e) => t, o = (e) => i.object({
|
|
|
134
134
|
"su"
|
|
135
135
|
]).optional(),
|
|
136
136
|
recurrence_end_mode: i.enum(["after", "on"]).optional(),
|
|
137
|
-
recurrence_max_occurrences: i.coerce.number().
|
|
137
|
+
recurrence_max_occurrences: i.coerce.number().optional(),
|
|
138
138
|
recurrence_automation_level: i.enum([
|
|
139
139
|
"draft",
|
|
140
140
|
"issue",
|
|
@@ -165,7 +165,45 @@ var a = (e) => t, o = (e) => i.object({
|
|
|
165
165
|
path: ["discount", "amount"],
|
|
166
166
|
message: i._("Discount amount cannot exceed subtotal")
|
|
167
167
|
});
|
|
168
|
-
}, _ =
|
|
168
|
+
}, _ = 1, v = 1e3, y = {
|
|
169
|
+
day: {
|
|
170
|
+
required: (e) => e._("Number of days is required"),
|
|
171
|
+
belowMin: (e) => e._("Enter at least 1 day"),
|
|
172
|
+
aboveMax: (e) => e._("Enter no more than 1000 days")
|
|
173
|
+
},
|
|
174
|
+
week: {
|
|
175
|
+
required: (e) => e._("Number of weeks is required"),
|
|
176
|
+
belowMin: (e) => e._("Enter at least 1 week"),
|
|
177
|
+
aboveMax: (e) => e._("Enter no more than 1000 weeks")
|
|
178
|
+
},
|
|
179
|
+
month: {
|
|
180
|
+
required: (e) => e._("Number of months is required"),
|
|
181
|
+
belowMin: (e) => e._("Enter at least 1 month"),
|
|
182
|
+
aboveMax: (e) => e._("Enter no more than 1000 months")
|
|
183
|
+
},
|
|
184
|
+
quarter: {
|
|
185
|
+
required: (e) => e._("Number of quarters is required"),
|
|
186
|
+
belowMin: (e) => e._("Enter at least 1 quarter"),
|
|
187
|
+
aboveMax: (e) => e._("Enter no more than 1000 quarters")
|
|
188
|
+
},
|
|
189
|
+
year: {
|
|
190
|
+
required: (e) => e._("Number of years is required"),
|
|
191
|
+
belowMin: (e) => e._("Enter at least 1 year"),
|
|
192
|
+
aboveMax: (e) => e._("Enter no more than 1000 years")
|
|
193
|
+
}
|
|
194
|
+
}, b = (e, t, n, r) => {
|
|
195
|
+
let i = y[r], a = (() => {
|
|
196
|
+
if (e === void 0) return i.required(n);
|
|
197
|
+
if (e < _) return i.belowMin(n);
|
|
198
|
+
if (e > v) return i.aboveMax(n);
|
|
199
|
+
if (!Number.isInteger(e)) return n._("Enter a whole number");
|
|
200
|
+
})();
|
|
201
|
+
a && t.addIssue({
|
|
202
|
+
code: "custom",
|
|
203
|
+
message: a,
|
|
204
|
+
path: ["recurrence_max_occurrences"]
|
|
205
|
+
});
|
|
206
|
+
}, x = (e, t, n, r = 0) => {
|
|
169
207
|
if (!e.frequency || e.frequency === "once") return;
|
|
170
208
|
switch (e.recurrence_start_date || t.addIssue({
|
|
171
209
|
code: "custom",
|
|
@@ -177,42 +215,22 @@ var a = (e) => t, o = (e) => i.object({
|
|
|
177
215
|
code: "custom",
|
|
178
216
|
message: n._("Day of month is required"),
|
|
179
217
|
path: ["recurrence_issue_mode"]
|
|
180
|
-
}), e.recurrence_max_occurrences
|
|
181
|
-
code: "custom",
|
|
182
|
-
message: n._("Number of months is required"),
|
|
183
|
-
path: ["recurrence_max_occurrences"]
|
|
184
|
-
});
|
|
218
|
+
}), b(e.recurrence_max_occurrences, t, n, "month");
|
|
185
219
|
break;
|
|
186
220
|
case "week":
|
|
187
221
|
e.recurrence_days_of_week || t.addIssue({
|
|
188
222
|
code: "custom",
|
|
189
223
|
message: n._("Day of week is required"),
|
|
190
224
|
path: ["recurrence_days_of_week"]
|
|
191
|
-
}), e.recurrence_max_occurrences
|
|
192
|
-
code: "custom",
|
|
193
|
-
message: n._("Number of weeks is required"),
|
|
194
|
-
path: ["recurrence_max_occurrences"]
|
|
195
|
-
});
|
|
225
|
+
}), b(e.recurrence_max_occurrences, t, n, "week");
|
|
196
226
|
break;
|
|
197
227
|
case "quarter":
|
|
198
|
-
e.recurrence_max_occurrences
|
|
199
|
-
code: "custom",
|
|
200
|
-
message: n._("Number of quarters is required"),
|
|
201
|
-
path: ["recurrence_max_occurrences"]
|
|
202
|
-
});
|
|
228
|
+
b(e.recurrence_max_occurrences, t, n, "quarter");
|
|
203
229
|
break;
|
|
204
230
|
case "year":
|
|
205
|
-
e.recurrence_max_occurrences
|
|
206
|
-
code: "custom",
|
|
207
|
-
message: n._("Number of years is required"),
|
|
208
|
-
path: ["recurrence_max_occurrences"]
|
|
209
|
-
});
|
|
231
|
+
b(e.recurrence_max_occurrences, t, n, "year");
|
|
210
232
|
break;
|
|
211
|
-
case "day": e.recurrence_end_mode ? e.recurrence_end_mode === "after" && !e.
|
|
212
|
-
code: "custom",
|
|
213
|
-
message: n._("Number of days is required"),
|
|
214
|
-
path: ["recurrence_max_occurrences"]
|
|
215
|
-
}) : e.recurrence_end_mode === "on" && !e.recurrence_end_date && t.addIssue({
|
|
233
|
+
case "day": e.recurrence_end_mode ? e.recurrence_end_mode === "after" ? b(e.recurrence_max_occurrences, t, n, "day") : e.recurrence_end_mode === "on" && !e.recurrence_end_date && t.addIssue({
|
|
216
234
|
code: "custom",
|
|
217
235
|
message: n._("End date is required"),
|
|
218
236
|
path: ["recurrence_end_date"]
|
|
@@ -12,15 +12,15 @@ import "../../../data-access/dist/index.js";
|
|
|
12
12
|
import { counterpartBankAccountsInvalidationKey as l, counterpartInvalidationKey as u } from "./index2.js";
|
|
13
13
|
import { useMutation as d, useQuery as f } from "@tanstack/react-query";
|
|
14
14
|
//#region ../../libs/tesouro-embedded-components-react/shared/counterpart-management/data-access/dist/index5.js
|
|
15
|
-
function p(e) {
|
|
16
|
-
let { client:
|
|
17
|
-
client:
|
|
18
|
-
headers: n(
|
|
15
|
+
function p(e, { enabled: r = !0 } = {}) {
|
|
16
|
+
let { client: i, organizationId: a, widgetToken: o, authEpoch: l } = t(), u = !!(r && a && o && e), d = s({
|
|
17
|
+
client: i,
|
|
18
|
+
headers: n(a),
|
|
19
19
|
path: { counterpart_id: e ?? "" }
|
|
20
20
|
});
|
|
21
21
|
return f({
|
|
22
|
-
...c(
|
|
23
|
-
enabled:
|
|
22
|
+
...c(d, l),
|
|
23
|
+
enabled: u
|
|
24
24
|
});
|
|
25
25
|
}
|
|
26
26
|
function m() {
|
|
@@ -13,10 +13,11 @@ import { useCounterpartAddressesForRowsQuery as E, useCounterpartAddressesQuery
|
|
|
13
13
|
import "../../data-access/dist/index.js";
|
|
14
14
|
import { useAddressForm as O } from "./lib/useAddressForm.js";
|
|
15
15
|
import { useCounterpartDetails as k } from "./lib/useCounterpartDetails.js";
|
|
16
|
-
import {
|
|
16
|
+
import { usePayableAchInstructions as A } from "./lib/usePayableAchInstructions.js";
|
|
17
|
+
import { useCounterpartForm as j } from "./lib/useCounterpartForm.js";
|
|
17
18
|
import "./lib/useCounterpartSelector.js";
|
|
18
|
-
import { CounterpartSelector as
|
|
19
|
-
import { useDeleteController as
|
|
19
|
+
import { CounterpartSelector as M } from "./lib/CounterpartSelector.js";
|
|
20
|
+
import { useDeleteController as N } from "./lib/useDeleteController.js";
|
|
20
21
|
import "./lib/useSubEntityForm.js";
|
|
21
|
-
import { useBankAccountForm as
|
|
22
|
-
export { e as AchFieldGroup, a as AddressFormSheet, i as BankAccountFormSheet, s as COUNTERPART_MESSAGE_LABELS_EN, o as ConfirmDeleteDialog, t as CounterpartFormFields, n as CounterpartFormSheet,
|
|
22
|
+
import { useBankAccountForm as P } from "./lib/subEntityForms.js";
|
|
23
|
+
export { e as AchFieldGroup, a as AddressFormSheet, i as BankAccountFormSheet, s as COUNTERPART_MESSAGE_LABELS_EN, o as ConfirmDeleteDialog, t as CounterpartFormFields, n as CounterpartFormSheet, M as CounterpartSelector, c as buildAnalyticsMap, l as buildCounterpartRows, u as counterpartFormBankAccountToCreatePayload, d as counterpartFormBankAccountToUpdatePayload, f as formatCounterpartDate, p as formatMoney, m as getAchInstructions, h as getCounterpartEmail, g as getCounterpartName, _ as getPayableAchInstructions, v as hasAchFormValues, y as hasSelectedText, b as resolveCounterpartBankAccountWrite, O as useAddressForm, P as useBankAccountForm, E as useCounterpartAddressesForRowsQuery, D as useCounterpartAddressesQuery, C as useCounterpartBankAccountsQuery, k as useCounterpartDetails, j as useCounterpartForm, S as useCounterpartsQuery, w as useCreateCounterpartBankAccountMutation, N as useDeleteController, r as useFocusFirstInvalidField, A as usePayableAchInstructions, T as useUpdateCounterpartBankAccountMutation, x as validateAchFormValues };
|
|
@@ -129,9 +129,8 @@ function b(e) {
|
|
|
129
129
|
let t = (e ?? []).filter((e) => e.currency === "USD" && (!!e.routing_number || !!e.account_number));
|
|
130
130
|
return t.find((e) => e.is_default_for_currency) ?? t[0];
|
|
131
131
|
}
|
|
132
|
-
function x(e) {
|
|
133
|
-
|
|
134
|
-
return t.find((e) => e.is_default_for_currency) ?? t[0];
|
|
132
|
+
function x(e, t = "USD") {
|
|
133
|
+
return (e ?? []).find((e) => e.currency === t && e.is_default_for_currency && !!e.account_holder_name && !!e.routing_number && !!e.account_number);
|
|
135
134
|
}
|
|
136
135
|
function S(e, t = {}) {
|
|
137
136
|
let n = e.line2.trim();
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
"use client";
|
|
3
|
+
"use client";
|
|
4
|
+
"use client";
|
|
5
|
+
import { getPayableAchInstructions as e } from "./helpers.js";
|
|
6
|
+
import { useCounterpartBankAccountsQuery as t } from "../../../data-access/dist/index5.js";
|
|
7
|
+
import "../../../data-access/dist/index.js";
|
|
8
|
+
//#region ../../libs/tesouro-embedded-components-react/shared/counterpart-management/feature/dist/lib/usePayableAchInstructions.js
|
|
9
|
+
function n({ counterpartId: n, currency: r, enabled: i = !0 } = {}) {
|
|
10
|
+
let a = t(n, { enabled: i });
|
|
11
|
+
return {
|
|
12
|
+
achInstructions: e(a.data?.data, r ?? void 0),
|
|
13
|
+
isLoading: a.isLoading,
|
|
14
|
+
isError: a.isError
|
|
15
|
+
};
|
|
16
|
+
}
|
|
17
|
+
//#endregion
|
|
18
|
+
export { n as usePayableAchInstructions };
|
package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/analytics/build-info.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
//#region ../../libs/tesouro-embedded-components-react/shared/feature/dist/lib/analytics/build-info.js
|
|
2
|
-
var e = "@tesouro/embedded-components-react", t = "0.3.
|
|
2
|
+
var e = "@tesouro/embedded-components-react", t = "0.3.57", n = "c2b9c135886a1756b0e32c4577811bfab6f8c3e1", r = Object.freeze({
|
|
3
3
|
library_name: e,
|
|
4
4
|
library_version: t,
|
|
5
5
|
library_sha: n
|