@tesouro/embedded-components-react 0.5.286 → 0.5.288
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/dist/index.css +6 -0
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index25.js +9 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index27.js +39 -22
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index28.js +102 -77
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index29.js +267 -248
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index33.js +20 -19
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index37.js +1 -0
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/ui/dist/index24.js +119 -88
- package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/feature/dist/index.js +11 -11
- package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/feature/dist/lib/useCounterpartForm.js +62 -55
- package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/ui/dist/index.js +4 -4
- package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/ui/dist/index7.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/ui/dist/index9.js +27 -22
- 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/usStates.js +4 -1
- package/package.json +1 -1
package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/ui/dist/index7.js
CHANGED
|
@@ -20,7 +20,7 @@ function s({ value: s, onChange: c, disabled: l, variant: u = "cards", labels: d
|
|
|
20
20
|
onValueChange: (e) => c(e),
|
|
21
21
|
children: [/* @__PURE__ */ o(e, {
|
|
22
22
|
htmlFor: `${p}-organization`,
|
|
23
|
-
className: m ? "ttw:flex ttw:cursor-pointer ttw:items-center ttw:gap-2 ttw:rounded-full ttw:border ttw:border-border ttw:px-3 ttw:py-1.5 ttw:text-sm ttw:has-[:checked]:border-primary ttw:has-[:checked]:bg-primary/10" : "ttw:flex ttw:cursor-pointer ttw:items-start ttw:gap-3 ttw:rounded-md ttw:border ttw:p-3 ttw:has-[:checked]:border-primary",
|
|
23
|
+
className: m ? "ttw:flex ttw:cursor-pointer ttw:items-center ttw:gap-2 ttw:rounded-full ttw:border ttw:border-border ttw:bg-background ttw:px-3 ttw:py-1.5 ttw:text-sm ttw:has-[:checked]:border-primary ttw:has-[:checked]:bg-primary/10" : "ttw:flex ttw:cursor-pointer ttw:items-start ttw:gap-3 ttw:rounded-md ttw:border ttw:p-3 ttw:has-[:checked]:border-primary",
|
|
24
24
|
children: [/* @__PURE__ */ a(n, {
|
|
25
25
|
value: "organization",
|
|
26
26
|
id: `${p}-organization`
|
|
@@ -36,7 +36,7 @@ function s({ value: s, onChange: c, disabled: l, variant: u = "cards", labels: d
|
|
|
36
36
|
})]
|
|
37
37
|
}), /* @__PURE__ */ o(e, {
|
|
38
38
|
htmlFor: `${p}-individual`,
|
|
39
|
-
className: m ? "ttw:flex ttw:cursor-pointer ttw:items-center ttw:gap-2 ttw:rounded-full ttw:border ttw:border-border ttw:px-3 ttw:py-1.5 ttw:text-sm ttw:has-[:checked]:border-primary ttw:has-[:checked]:bg-primary/10" : "ttw:flex ttw:cursor-pointer ttw:items-start ttw:gap-3 ttw:rounded-md ttw:border ttw:p-3 ttw:has-[:checked]:border-primary",
|
|
39
|
+
className: m ? "ttw:flex ttw:cursor-pointer ttw:items-center ttw:gap-2 ttw:rounded-full ttw:border ttw:border-border ttw:bg-background ttw:px-3 ttw:py-1.5 ttw:text-sm ttw:has-[:checked]:border-primary ttw:has-[:checked]:bg-primary/10" : "ttw:flex ttw:cursor-pointer ttw:items-start ttw:gap-3 ttw:rounded-md ttw:border ttw:p-3 ttw:has-[:checked]:border-primary",
|
|
40
40
|
children: [/* @__PURE__ */ a(n, {
|
|
41
41
|
value: "individual",
|
|
42
42
|
id: `${p}-individual`
|
package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/ui/dist/index9.js
CHANGED
|
@@ -25,12 +25,17 @@ function C({ show: e, sectionsToExpand: t }) {
|
|
|
25
25
|
};
|
|
26
26
|
}
|
|
27
27
|
function w(e) {
|
|
28
|
+
return typeof e == "string" ? +!!e : !e || typeof e != "object" ? 0 : Object.values(e).reduce((e, t) => e + w(t), 0);
|
|
29
|
+
}
|
|
30
|
+
function T(e) {
|
|
28
31
|
let t = _(null), n = _(e);
|
|
29
32
|
return h(() => {
|
|
30
|
-
e
|
|
33
|
+
if (e === n.current) return;
|
|
34
|
+
let r = n.current;
|
|
35
|
+
n.current = e, !(w(e) < w(r)) && (t.current?.querySelector("[aria-invalid=\"true\"]"))?.focus();
|
|
31
36
|
}, [e]), t;
|
|
32
37
|
}
|
|
33
|
-
function
|
|
38
|
+
function E(e) {
|
|
34
39
|
let t = {
|
|
35
40
|
...l.fieldMarkers,
|
|
36
41
|
...e?.fieldMarkers
|
|
@@ -61,14 +66,14 @@ function T(e) {
|
|
|
61
66
|
}
|
|
62
67
|
};
|
|
63
68
|
}
|
|
64
|
-
function
|
|
65
|
-
let B =
|
|
69
|
+
function D({ open: c, onOpenChange: l, mode: h, counterpartMode: _ = "customer", values: w, errors: D, stateOptions: O, inProgress: k, submitDisabled: A, onChange: j, onAddressChange: M, onBankAccountChange: N, onSubmit: P, onCancel: F, sections: I, sectionsToExpand: L, onAddressExpand: R, labels: z }) {
|
|
70
|
+
let B = E(z), V = {
|
|
66
71
|
...S,
|
|
67
72
|
...I
|
|
68
|
-
}, H = g(), U =
|
|
73
|
+
}, H = g(), U = w.entityType === "organization", W = _ === "customer", G = _ === "vendor", { isAddressShown: K, isAddressExpanded: q } = C({
|
|
69
74
|
show: V,
|
|
70
75
|
sectionsToExpand: L
|
|
71
|
-
}), J =
|
|
76
|
+
}), J = T(D), Y = h === "edit" ? W ? B.editTitleCustomer : B.editTitleVendor : W ? B.createTitleCustomer : B.createTitleVendor, X = h === "create" ? W ? B.createDescriptionCustomer : B.createDescriptionVendor : void 0, Z = W ? B.customerTypeHeading : B.vendorTypeHeading, Q = W ? B.customerTaxIdHelp : B.vendorTaxIdHelp;
|
|
72
77
|
return /* @__PURE__ */ y(m, {
|
|
73
78
|
open: c,
|
|
74
79
|
onOpenChange: l,
|
|
@@ -87,7 +92,7 @@ function E({ open: c, onOpenChange: l, mode: h, counterpartMode: _ = "customer",
|
|
|
87
92
|
children: [
|
|
88
93
|
/* @__PURE__ */ y(a, { labels: B.requiredFieldsLegend }),
|
|
89
94
|
h === "create" && /* @__PURE__ */ y(p, {
|
|
90
|
-
value:
|
|
95
|
+
value: w.entityType,
|
|
91
96
|
onChange: (e) => j({ entityType: e }),
|
|
92
97
|
variant: "pills",
|
|
93
98
|
labels: {
|
|
@@ -115,7 +120,7 @@ function E({ open: c, onOpenChange: l, mode: h, counterpartMode: _ = "customer",
|
|
|
115
120
|
/* @__PURE__ */ y(r, {
|
|
116
121
|
id: `${H}-legal-name`,
|
|
117
122
|
autoFocus: !0,
|
|
118
|
-
value:
|
|
123
|
+
value: w.legalName,
|
|
119
124
|
"aria-required": !0,
|
|
120
125
|
"aria-invalid": !!D?.legalName,
|
|
121
126
|
onChange: (e) => j({ legalName: e.target.value })
|
|
@@ -136,7 +141,7 @@ function E({ open: c, onOpenChange: l, mode: h, counterpartMode: _ = "customer",
|
|
|
136
141
|
/* @__PURE__ */ y(r, {
|
|
137
142
|
id: `${H}-first-name`,
|
|
138
143
|
autoFocus: !0,
|
|
139
|
-
value:
|
|
144
|
+
value: w.firstName,
|
|
140
145
|
"aria-required": !0,
|
|
141
146
|
"aria-invalid": !!D?.firstName,
|
|
142
147
|
onChange: (e) => j({ firstName: e.target.value })
|
|
@@ -154,7 +159,7 @@ function E({ open: c, onOpenChange: l, mode: h, counterpartMode: _ = "customer",
|
|
|
154
159
|
}),
|
|
155
160
|
/* @__PURE__ */ y(r, {
|
|
156
161
|
id: `${H}-last-name`,
|
|
157
|
-
value:
|
|
162
|
+
value: w.lastName,
|
|
158
163
|
"aria-required": !0,
|
|
159
164
|
"aria-invalid": !!D?.lastName,
|
|
160
165
|
onChange: (e) => j({ lastName: e.target.value })
|
|
@@ -172,7 +177,7 @@ function E({ open: c, onOpenChange: l, mode: h, counterpartMode: _ = "customer",
|
|
|
172
177
|
children: B.titleLabel
|
|
173
178
|
}), /* @__PURE__ */ y(r, {
|
|
174
179
|
id: `${H}-title`,
|
|
175
|
-
value:
|
|
180
|
+
value: w.title,
|
|
176
181
|
onChange: (e) => j({ title: e.target.value })
|
|
177
182
|
})]
|
|
178
183
|
}),
|
|
@@ -190,7 +195,7 @@ function E({ open: c, onOpenChange: l, mode: h, counterpartMode: _ = "customer",
|
|
|
190
195
|
/* @__PURE__ */ y(r, {
|
|
191
196
|
id: `${H}-email`,
|
|
192
197
|
type: "email",
|
|
193
|
-
value:
|
|
198
|
+
value: w.email,
|
|
194
199
|
"aria-required": !0,
|
|
195
200
|
"aria-invalid": !!D?.email,
|
|
196
201
|
onChange: (e) => j({ email: e.target.value })
|
|
@@ -206,7 +211,7 @@ function E({ open: c, onOpenChange: l, mode: h, counterpartMode: _ = "customer",
|
|
|
206
211
|
children: B.phoneLabel
|
|
207
212
|
}), /* @__PURE__ */ y(r, {
|
|
208
213
|
id: `${H}-phone`,
|
|
209
|
-
value:
|
|
214
|
+
value: w.phone,
|
|
210
215
|
onChange: (e) => j({ phone: e.target.value })
|
|
211
216
|
})]
|
|
212
217
|
})]
|
|
@@ -222,7 +227,7 @@ function E({ open: c, onOpenChange: l, mode: h, counterpartMode: _ = "customer",
|
|
|
222
227
|
}),
|
|
223
228
|
/* @__PURE__ */ y(r, {
|
|
224
229
|
id: `${H}-tax-id`,
|
|
225
|
-
value:
|
|
230
|
+
value: w.taxId,
|
|
226
231
|
onChange: (e) => j({ taxId: e.target.value })
|
|
227
232
|
}),
|
|
228
233
|
/* @__PURE__ */ y(s, {
|
|
@@ -237,7 +242,7 @@ function E({ open: c, onOpenChange: l, mode: h, counterpartMode: _ = "customer",
|
|
|
237
242
|
className: "ttw:flex ttw:items-start ttw:gap-3 ttw:rounded-md ttw:border ttw:p-3",
|
|
238
243
|
children: [/* @__PURE__ */ y(t, {
|
|
239
244
|
id: `${H}-reminders`,
|
|
240
|
-
checked:
|
|
245
|
+
checked: w.remindersEnabled,
|
|
241
246
|
onCheckedChange: (e) => j({ remindersEnabled: e === !0 })
|
|
242
247
|
}), /* @__PURE__ */ b("span", {
|
|
243
248
|
className: "ttw:flex ttw:flex-col ttw:gap-0.5",
|
|
@@ -263,7 +268,7 @@ function E({ open: c, onOpenChange: l, mode: h, counterpartMode: _ = "customer",
|
|
|
263
268
|
})]
|
|
264
269
|
})] }), q ? /* @__PURE__ */ y(f, {
|
|
265
270
|
idPrefix: `${H}-address`,
|
|
266
|
-
values:
|
|
271
|
+
values: w.address,
|
|
267
272
|
errors: D?.address,
|
|
268
273
|
stateOptions: O,
|
|
269
274
|
onChange: M,
|
|
@@ -291,7 +296,7 @@ function E({ open: c, onOpenChange: l, mode: h, counterpartMode: _ = "customer",
|
|
|
291
296
|
}),
|
|
292
297
|
/* @__PURE__ */ y(d, {
|
|
293
298
|
idPrefix: `${H}-ach`,
|
|
294
|
-
values:
|
|
299
|
+
values: w.bankAccount,
|
|
295
300
|
errors: D?.bankAccount,
|
|
296
301
|
onChange: (e) => N?.(e),
|
|
297
302
|
labels: B.ach
|
|
@@ -301,14 +306,14 @@ function E({ open: c, onOpenChange: l, mode: h, counterpartMode: _ = "customer",
|
|
|
301
306
|
})
|
|
302
307
|
});
|
|
303
308
|
}
|
|
304
|
-
function
|
|
305
|
-
let M =
|
|
309
|
+
function O({ mode: a, counterpartMode: c = "customer", values: l, errors: m, stateOptions: h, onChange: _, onAddressChange: w, onBankAccountChange: D, sections: O, sectionsToExpand: k, onAddressExpand: A, labels: j }) {
|
|
310
|
+
let M = E(j), N = {
|
|
306
311
|
...S,
|
|
307
312
|
...O
|
|
308
313
|
}, P = g(), F = l.entityType === "organization", I = c === "customer", L = c === "vendor", { isAddressShown: R, isAddressExpanded: z } = C({
|
|
309
314
|
show: N,
|
|
310
315
|
sectionsToExpand: k
|
|
311
|
-
}), B =
|
|
316
|
+
}), B = T(m), V = I ? M.customerTypeHeading : M.vendorTypeHeading, H = I ? M.customerTaxIdHelp : M.vendorTaxIdHelp;
|
|
312
317
|
return /* @__PURE__ */ b("div", {
|
|
313
318
|
ref: B,
|
|
314
319
|
style: { display: "contents" },
|
|
@@ -493,7 +498,7 @@ function D({ mode: a, counterpartMode: c = "customer", values: l, errors: m, sta
|
|
|
493
498
|
values: l.address,
|
|
494
499
|
errors: m?.address,
|
|
495
500
|
stateOptions: h,
|
|
496
|
-
onChange:
|
|
501
|
+
onChange: w,
|
|
497
502
|
labels: M.address
|
|
498
503
|
}) : /* @__PURE__ */ b(e, {
|
|
499
504
|
type: "button",
|
|
@@ -528,4 +533,4 @@ function D({ mode: a, counterpartMode: c = "customer", values: l, errors: m, sta
|
|
|
528
533
|
});
|
|
529
534
|
}
|
|
530
535
|
//#endregion
|
|
531
|
-
export {
|
|
536
|
+
export { O as CounterpartFormFields, D as CounterpartFormSheet, D as default, w as countErrors, T as useFocusFirstInvalidField };
|
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.288", n = "bb7cba9163cc39e4676c38f27c81b697fb1b6518", r = Object.freeze({
|
|
3
3
|
library_name: e,
|
|
4
4
|
library_version: t,
|
|
5
5
|
library_sha: n
|
|
@@ -114,5 +114,8 @@ function n(n) {
|
|
|
114
114
|
label: r[e]
|
|
115
115
|
}));
|
|
116
116
|
}
|
|
117
|
+
function r(t) {
|
|
118
|
+
return e.some((e) => e.abbreviation === t);
|
|
119
|
+
}
|
|
117
120
|
//#endregion
|
|
118
|
-
export { e as US_STATES_STRUCTURAL, t as US_STATE_NAMES_EN, n as getStateOptions };
|
|
121
|
+
export { e as US_STATES_STRUCTURAL, t as US_STATE_NAMES_EN, n as getStateOptions, r as isStateValid };
|