@tesouro/embedded-components-react 0.5.56 → 0.5.59
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 +9 -9
- package/dist/index.d.ts +5 -3
- package/dist/lib/CounterpartsWidget.d.ts +5 -3
- package/dist/lib/ReceivablesWidget.d.ts +3 -2
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/index18.js +39 -45
- package/dist/libs/tesouro-embedded-components-react/bank-accounts-widget/account-details/feature/dist/index4.js +9 -15
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index49.js +53 -53
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index52.js +42 -65
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index53.js +288 -226
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index57.js +104 -101
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index61.js +313 -285
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index26.js +12 -4
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index27.js +2 -0
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index28.js +41 -31
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index31.js +8 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index46.js +9 -0
- package/dist/libs/tesouro-embedded-components-react/counterparts-widget/feature/dist/index8.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index5.js +54 -60
- package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/feature/dist/lib/helpers.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/feature/dist/lib/labels.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/feature/dist/lib/useDeleteController.js +4 -4
- package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/ui/dist/index11.js +121 -115
- package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/ui/dist/index2.js +2 -1
- package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/ui/dist/index6.js +1 -0
- package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/analytics/build-info.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/shared/util/dist/lib/parseCalendarDate.js +17 -0
- package/package.json +1 -1
package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/ui/dist/index11.js
CHANGED
|
@@ -1,173 +1,179 @@
|
|
|
1
|
-
import { Checkbox as e,
|
|
2
|
-
import { BANK_ACCOUNT_FORM_SHEET_LABELS_EN as
|
|
3
|
-
import { FieldError as
|
|
4
|
-
import { FormSheet as
|
|
5
|
-
import { useId as
|
|
6
|
-
import { jsx as
|
|
1
|
+
import { Checkbox as e, FieldRequirement as t, Input as n, Label as r, Select as i, SelectContent as a, SelectItem as o, SelectTrigger as s, SelectValue as c } from "../../../../../../packages/shared-ui-shadcn/dist/index.js";
|
|
2
|
+
import { BANK_ACCOUNT_FORM_SHEET_LABELS_EN as l } from "./index2.js";
|
|
3
|
+
import { FieldError as u } from "./index4.js";
|
|
4
|
+
import { FormSheet as d } from "./index8.js";
|
|
5
|
+
import { useId as f } from "react";
|
|
6
|
+
import { jsx as p, jsxs as m } from "react/jsx-runtime";
|
|
7
7
|
//#region ../../libs/tesouro-embedded-components-react/shared/counterpart-management/ui/dist/index11.js
|
|
8
|
-
function
|
|
9
|
-
let
|
|
10
|
-
...
|
|
11
|
-
...
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
8
|
+
function h({ open: h, onOpenChange: g, mode: _, values: v, errors: y, currencyOptions: b, inProgress: x, onChange: S, onSubmit: C, onCancel: w, labels: T }) {
|
|
9
|
+
let E = {
|
|
10
|
+
...l,
|
|
11
|
+
...T,
|
|
12
|
+
fieldMarkers: {
|
|
13
|
+
...l.fieldMarkers,
|
|
14
|
+
...T?.fieldMarkers
|
|
15
|
+
}
|
|
16
|
+
}, D = f(), O = _ === "edit" ? E.editTitle : E.createTitle;
|
|
17
|
+
return /* @__PURE__ */ m(d, {
|
|
18
|
+
open: h,
|
|
19
|
+
onOpenChange: g,
|
|
20
|
+
title: O,
|
|
21
|
+
formError: y?.form,
|
|
22
|
+
inProgress: x,
|
|
23
|
+
submitLabel: _ === "edit" ? E.saveButton : E.createButton,
|
|
24
|
+
cancelLabel: E.cancelButton,
|
|
25
|
+
onSubmit: C,
|
|
26
|
+
onCancel: w,
|
|
23
27
|
children: [
|
|
24
|
-
/* @__PURE__ */
|
|
28
|
+
/* @__PURE__ */ m("div", {
|
|
25
29
|
className: "ttw:flex ttw:flex-col ttw:gap-1.5",
|
|
26
30
|
children: [
|
|
27
|
-
/* @__PURE__ */
|
|
28
|
-
htmlFor: `${
|
|
29
|
-
|
|
31
|
+
/* @__PURE__ */ p(r, {
|
|
32
|
+
htmlFor: `${D}-name`,
|
|
33
|
+
requirement: t.Optional,
|
|
34
|
+
labels: E.fieldMarkers,
|
|
35
|
+
children: E.nameLabel
|
|
30
36
|
}),
|
|
31
|
-
/* @__PURE__ */
|
|
32
|
-
id: `${
|
|
37
|
+
/* @__PURE__ */ p(n, {
|
|
38
|
+
id: `${D}-name`,
|
|
33
39
|
autoFocus: !0,
|
|
34
|
-
value:
|
|
35
|
-
"aria-invalid": !!
|
|
36
|
-
onChange: (e) =>
|
|
40
|
+
value: v.name,
|
|
41
|
+
"aria-invalid": !!y?.name,
|
|
42
|
+
onChange: (e) => S({ name: e.target.value })
|
|
37
43
|
}),
|
|
38
|
-
/* @__PURE__ */
|
|
44
|
+
/* @__PURE__ */ p(u, { message: y?.name })
|
|
39
45
|
]
|
|
40
46
|
}),
|
|
41
|
-
/* @__PURE__ */
|
|
47
|
+
/* @__PURE__ */ m("div", {
|
|
42
48
|
className: "ttw:flex ttw:flex-col ttw:gap-1.5",
|
|
43
|
-
children: [/* @__PURE__ */
|
|
44
|
-
htmlFor: `${
|
|
45
|
-
children:
|
|
46
|
-
}), /* @__PURE__ */
|
|
47
|
-
id: `${
|
|
48
|
-
value:
|
|
49
|
-
onChange: (e) =>
|
|
49
|
+
children: [/* @__PURE__ */ p(r, {
|
|
50
|
+
htmlFor: `${D}-holder`,
|
|
51
|
+
children: E.accountHolderNameLabel
|
|
52
|
+
}), /* @__PURE__ */ p(n, {
|
|
53
|
+
id: `${D}-holder`,
|
|
54
|
+
value: v.accountHolderName,
|
|
55
|
+
onChange: (e) => S({ accountHolderName: e.target.value })
|
|
50
56
|
})]
|
|
51
57
|
}),
|
|
52
|
-
/* @__PURE__ */
|
|
58
|
+
/* @__PURE__ */ m("div", {
|
|
53
59
|
className: "ttw:grid ttw:grid-cols-2 ttw:gap-4",
|
|
54
|
-
children: [/* @__PURE__ */
|
|
60
|
+
children: [/* @__PURE__ */ m("div", {
|
|
55
61
|
className: "ttw:flex ttw:flex-col ttw:gap-1.5",
|
|
56
62
|
children: [
|
|
57
|
-
/* @__PURE__ */
|
|
58
|
-
htmlFor: `${
|
|
59
|
-
children:
|
|
63
|
+
/* @__PURE__ */ p(r, {
|
|
64
|
+
htmlFor: `${D}-account-number`,
|
|
65
|
+
children: E.accountNumberLabel
|
|
60
66
|
}),
|
|
61
|
-
/* @__PURE__ */
|
|
62
|
-
id: `${
|
|
63
|
-
value:
|
|
64
|
-
"aria-invalid": !!
|
|
65
|
-
onChange: (e) =>
|
|
67
|
+
/* @__PURE__ */ p(n, {
|
|
68
|
+
id: `${D}-account-number`,
|
|
69
|
+
value: v.accountNumber,
|
|
70
|
+
"aria-invalid": !!y?.accountNumber,
|
|
71
|
+
onChange: (e) => S({ accountNumber: e.target.value })
|
|
66
72
|
}),
|
|
67
|
-
/* @__PURE__ */
|
|
73
|
+
/* @__PURE__ */ p(u, { message: y?.accountNumber })
|
|
68
74
|
]
|
|
69
|
-
}), /* @__PURE__ */
|
|
75
|
+
}), /* @__PURE__ */ m("div", {
|
|
70
76
|
className: "ttw:flex ttw:flex-col ttw:gap-1.5",
|
|
71
77
|
children: [
|
|
72
|
-
/* @__PURE__ */
|
|
73
|
-
htmlFor: `${
|
|
74
|
-
children:
|
|
78
|
+
/* @__PURE__ */ p(r, {
|
|
79
|
+
htmlFor: `${D}-routing`,
|
|
80
|
+
children: E.routingNumberLabel
|
|
75
81
|
}),
|
|
76
|
-
/* @__PURE__ */
|
|
77
|
-
id: `${
|
|
78
|
-
value:
|
|
79
|
-
"aria-invalid": !!
|
|
80
|
-
onChange: (e) =>
|
|
82
|
+
/* @__PURE__ */ p(n, {
|
|
83
|
+
id: `${D}-routing`,
|
|
84
|
+
value: v.routingNumber,
|
|
85
|
+
"aria-invalid": !!y?.routingNumber,
|
|
86
|
+
onChange: (e) => S({ routingNumber: e.target.value })
|
|
81
87
|
}),
|
|
82
|
-
/* @__PURE__ */
|
|
88
|
+
/* @__PURE__ */ p(u, { message: y?.routingNumber })
|
|
83
89
|
]
|
|
84
90
|
})]
|
|
85
91
|
}),
|
|
86
|
-
/* @__PURE__ */
|
|
92
|
+
/* @__PURE__ */ m("div", {
|
|
87
93
|
className: "ttw:grid ttw:grid-cols-2 ttw:gap-4",
|
|
88
|
-
children: [/* @__PURE__ */
|
|
94
|
+
children: [/* @__PURE__ */ m("div", {
|
|
89
95
|
className: "ttw:flex ttw:flex-col ttw:gap-1.5",
|
|
90
|
-
children: [/* @__PURE__ */
|
|
91
|
-
htmlFor: `${
|
|
92
|
-
children:
|
|
93
|
-
}), /* @__PURE__ */
|
|
94
|
-
id: `${
|
|
95
|
-
value:
|
|
96
|
-
onChange: (e) =>
|
|
96
|
+
children: [/* @__PURE__ */ p(r, {
|
|
97
|
+
htmlFor: `${D}-iban`,
|
|
98
|
+
children: E.ibanLabel
|
|
99
|
+
}), /* @__PURE__ */ p(n, {
|
|
100
|
+
id: `${D}-iban`,
|
|
101
|
+
value: v.iban,
|
|
102
|
+
onChange: (e) => S({ iban: e.target.value })
|
|
97
103
|
})]
|
|
98
|
-
}), /* @__PURE__ */
|
|
104
|
+
}), /* @__PURE__ */ m("div", {
|
|
99
105
|
className: "ttw:flex ttw:flex-col ttw:gap-1.5",
|
|
100
|
-
children: [/* @__PURE__ */
|
|
101
|
-
htmlFor: `${
|
|
102
|
-
children:
|
|
103
|
-
}), /* @__PURE__ */
|
|
104
|
-
id: `${
|
|
105
|
-
value:
|
|
106
|
-
onChange: (e) =>
|
|
106
|
+
children: [/* @__PURE__ */ p(r, {
|
|
107
|
+
htmlFor: `${D}-bic`,
|
|
108
|
+
children: E.bicLabel
|
|
109
|
+
}), /* @__PURE__ */ p(n, {
|
|
110
|
+
id: `${D}-bic`,
|
|
111
|
+
value: v.bic,
|
|
112
|
+
onChange: (e) => S({ bic: e.target.value })
|
|
107
113
|
})]
|
|
108
114
|
})]
|
|
109
115
|
}),
|
|
110
|
-
/* @__PURE__ */
|
|
116
|
+
/* @__PURE__ */ m("div", {
|
|
111
117
|
className: "ttw:grid ttw:grid-cols-2 ttw:gap-4",
|
|
112
|
-
children: [/* @__PURE__ */
|
|
118
|
+
children: [/* @__PURE__ */ m("div", {
|
|
113
119
|
className: "ttw:flex ttw:flex-col ttw:gap-1.5",
|
|
114
|
-
children: [/* @__PURE__ */
|
|
115
|
-
htmlFor: `${
|
|
116
|
-
children:
|
|
117
|
-
}), /* @__PURE__ */
|
|
118
|
-
id: `${
|
|
119
|
-
value:
|
|
120
|
-
onChange: (e) =>
|
|
120
|
+
children: [/* @__PURE__ */ p(r, {
|
|
121
|
+
htmlFor: `${D}-sort-code`,
|
|
122
|
+
children: E.sortCodeLabel
|
|
123
|
+
}), /* @__PURE__ */ p(n, {
|
|
124
|
+
id: `${D}-sort-code`,
|
|
125
|
+
value: v.sortCode,
|
|
126
|
+
onChange: (e) => S({ sortCode: e.target.value })
|
|
121
127
|
})]
|
|
122
|
-
}), /* @__PURE__ */
|
|
128
|
+
}), /* @__PURE__ */ m("div", {
|
|
123
129
|
className: "ttw:flex ttw:flex-col ttw:gap-1.5",
|
|
124
130
|
children: [
|
|
125
|
-
/* @__PURE__ */ f(n, {
|
|
126
|
-
htmlFor: `${E}-currency`,
|
|
127
|
-
children: T.currencyLabel
|
|
128
|
-
}),
|
|
129
131
|
/* @__PURE__ */ p(r, {
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
132
|
+
htmlFor: `${D}-currency`,
|
|
133
|
+
children: E.currencyLabel
|
|
134
|
+
}),
|
|
135
|
+
/* @__PURE__ */ m(i, {
|
|
136
|
+
value: v.currency === "" ? void 0 : v.currency,
|
|
137
|
+
onValueChange: (e) => S({ currency: e }),
|
|
138
|
+
children: [/* @__PURE__ */ p(s, {
|
|
139
|
+
id: `${D}-currency`,
|
|
134
140
|
className: "ttw:w-full",
|
|
135
|
-
"aria-invalid": !!
|
|
136
|
-
children: /* @__PURE__ */
|
|
137
|
-
}), /* @__PURE__ */
|
|
141
|
+
"aria-invalid": !!y?.currency,
|
|
142
|
+
children: /* @__PURE__ */ p(c, { placeholder: E.currencyPlaceholder })
|
|
143
|
+
}), /* @__PURE__ */ p(a, { children: b.map((e) => /* @__PURE__ */ p(o, {
|
|
138
144
|
value: e.value,
|
|
139
145
|
children: e.label
|
|
140
146
|
}, e.value)) })]
|
|
141
147
|
}),
|
|
142
|
-
/* @__PURE__ */
|
|
148
|
+
/* @__PURE__ */ p(u, { message: y?.currency })
|
|
143
149
|
]
|
|
144
150
|
})]
|
|
145
151
|
}),
|
|
146
|
-
/* @__PURE__ */
|
|
152
|
+
/* @__PURE__ */ m("div", {
|
|
147
153
|
className: "ttw:flex ttw:flex-col ttw:gap-1.5",
|
|
148
|
-
children: [/* @__PURE__ */
|
|
149
|
-
htmlFor: `${
|
|
150
|
-
children:
|
|
151
|
-
}), /* @__PURE__ */
|
|
152
|
-
id: `${
|
|
153
|
-
value:
|
|
154
|
+
children: [/* @__PURE__ */ p(r, {
|
|
155
|
+
htmlFor: `${D}-country`,
|
|
156
|
+
children: E.countryLabel
|
|
157
|
+
}), /* @__PURE__ */ p(n, {
|
|
158
|
+
id: `${D}-country`,
|
|
159
|
+
value: E.countryValue,
|
|
154
160
|
disabled: !0,
|
|
155
161
|
readOnly: !0
|
|
156
162
|
})]
|
|
157
163
|
}),
|
|
158
|
-
/* @__PURE__ */
|
|
164
|
+
/* @__PURE__ */ m("div", {
|
|
159
165
|
className: "ttw:flex ttw:items-center ttw:gap-2",
|
|
160
|
-
children: [/* @__PURE__ */
|
|
161
|
-
id: `${
|
|
162
|
-
checked:
|
|
163
|
-
onCheckedChange: (e) =>
|
|
164
|
-
}), /* @__PURE__ */
|
|
165
|
-
htmlFor: `${
|
|
166
|
-
children:
|
|
166
|
+
children: [/* @__PURE__ */ p(e, {
|
|
167
|
+
id: `${D}-default`,
|
|
168
|
+
checked: v.isDefault,
|
|
169
|
+
onCheckedChange: (e) => S({ isDefault: e === !0 })
|
|
170
|
+
}), /* @__PURE__ */ p(r, {
|
|
171
|
+
htmlFor: `${D}-default`,
|
|
172
|
+
children: E.isDefaultLabel
|
|
167
173
|
})]
|
|
168
174
|
})
|
|
169
175
|
]
|
|
170
176
|
});
|
|
171
177
|
}
|
|
172
178
|
//#endregion
|
|
173
|
-
export {
|
|
179
|
+
export { h as BankAccountFormSheet, h as default };
|
package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/ui/dist/index6.js
CHANGED
|
@@ -89,6 +89,7 @@ function p({ idPrefix: f, values: p, errors: m, stateOptions: h, onChange: g, la
|
|
|
89
89
|
children: [/* @__PURE__ */ u(o, {
|
|
90
90
|
id: `${f}-state`,
|
|
91
91
|
"aria-required": !0,
|
|
92
|
+
"aria-invalid": !!m?.state,
|
|
92
93
|
className: "ttw:w-full",
|
|
93
94
|
children: /* @__PURE__ */ u(s, { placeholder: v.statePlaceholder })
|
|
94
95
|
}), /* @__PURE__ */ u(i, { children: h.map((e) => /* @__PURE__ */ u(a, {
|
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.5.
|
|
2
|
+
var e = "@tesouro/embedded-components-react", t = "0.5.59", n = "cdb1defe4a957ae12e2679514e5d847916c687d9", r = Object.freeze({
|
|
3
3
|
library_name: e,
|
|
4
4
|
library_version: t,
|
|
5
5
|
library_sha: n
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
//#region ../../libs/tesouro-embedded-components-react/shared/util/dist/lib/parseCalendarDate.js
|
|
2
|
+
var e = /^(\d{4})-(\d{2})-(\d{2})$/;
|
|
3
|
+
function t(t) {
|
|
4
|
+
if (!t) return;
|
|
5
|
+
let n = e.exec(t);
|
|
6
|
+
if (!n) return;
|
|
7
|
+
let r = Number(n[1]), i = Number(n[2]) - 1, a = Number(n[3]), o = new Date(r, i, a);
|
|
8
|
+
if (o.getFullYear() === r && o.getMonth() === i && o.getDate() === a) return o;
|
|
9
|
+
}
|
|
10
|
+
function n(n) {
|
|
11
|
+
if (!n) return;
|
|
12
|
+
if (e.test(n)) return t(n);
|
|
13
|
+
let r = new Date(n);
|
|
14
|
+
return Number.isNaN(r.getTime()) ? void 0 : r;
|
|
15
|
+
}
|
|
16
|
+
//#endregion
|
|
17
|
+
export { t as parseCalendarDate, n as parseDateOrTimestamp };
|