@tesouro/embedded-components-react 0.11.114 → 0.11.118
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 +81 -125
- package/dist/index.d.ts +11 -2
- package/dist/lib/AcceptDisclosuresWidget.d.ts +4 -0
- package/dist/lib/ReceivablesWidget.d.ts +7 -2
- package/dist/lib/WidgetSuite.d.ts +7 -2
- package/dist/libs/tesouro-embedded-components-react/accept-disclosures-widget/feature/dist/lib/AcceptDisclosuresWidget/AcceptDisclosuresWidget.js +91 -88
- package/dist/libs/tesouro-embedded-components-react/accept-disclosures-widget/ui/dist/lib/AcceptDisclosuresWidget/AcceptDisclosuresWidget.js +41 -59
- package/dist/libs/tesouro-embedded-components-react/accept-disclosures-widget/ui/dist/lib/AcceptDisclosuresWidget/labels.js +2 -0
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/lib/BankAccountOnboardingWidget/AdditionalOwnersStep.js +7 -5
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/lib/BankAccountOnboardingWidget/BankAccountOnboardingWidget.js +163 -160
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/lib/BankAccountOnboardingWidget/BusinessDetailsStep.js +18 -18
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/lib/BankAccountOnboardingWidget/PersonalDetailsStep.js +25 -25
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/lib/BankAccountOnboardingWidget/additionalOwnerDraft.js +34 -31
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/lib/BankAccountOnboardingWidget/applicationStatusView.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/lib/BankAccountOnboardingWidget/fieldInput/maxBirthDate.js +3 -2
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/lib/BankAccountOnboardingWidget/personalDetailsPanelMapping.js +21 -18
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/lib/BankAccountOnboardingWidget/testIds.js +3 -0
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index11.js +382 -275
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index12.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index13.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index15.js +37 -42
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index19.js +56 -50
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index2.js +32 -69
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index21.js +3 -3
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index22.js +14 -25
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index24.js +36 -39
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index25.js +120 -116
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index26.js +14 -26
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index27.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index28.js +41 -44
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index29.js +96 -115
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index3.js +14 -14
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index31.js +35 -57
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index33.js +37 -60
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index35.js +28 -42
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index4.js +266 -259
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index5.js +51 -55
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index6.js +42 -48
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index7.js +69 -70
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index9.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/invoicesFilter.js +85 -50
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/invoicesFilterLabels.js +7 -2
- 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/ui/dist/index.js +3 -2
- package/dist/libs/tesouro-embedded-components-react/shared/ui/dist/lib/ConsentBlock/ConsentBlock.js +51 -0
- package/dist/libs/tesouro-embedded-components-react/shared/ui/dist/lib/EmptyState/EmptyState.js +5 -3
- package/dist/libs/tesouro-embedded-components-react/shared/ui/dist/lib/InlineErrorAlert/InlineErrorAlert.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/shared/ui/dist/lib/OnboardingShell/OnboardingShell.js +84 -87
- package/dist/libs/tesouro-embedded-components-react/shared/ui/dist/lib/OnboardingShell/OnboardingShellScrollRegion.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/shared/ui/dist/lib/OnboardingShell/OnboardingShellStepper.js +35 -21
- package/dist/packages/shared-ui-shadcn/dist/index.js +38 -101
- package/package.json +1 -1
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { InvoicesFilterField as e } from "../../../../ui/dist/index3.js";
|
|
2
2
|
import "../../../../ui/dist/index.js";
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
3
|
+
import { formatMoney as t } from "./helpers.js";
|
|
4
|
+
import { INVOICES_DATE_PRESET_GROUPS as n } from "./datePresets.js";
|
|
5
|
+
import { addDays as r, format as i, formatISO as a, startOfDay as o } from "date-fns";
|
|
5
6
|
// ../../libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/invoicesFilter.js
|
|
6
|
-
var
|
|
7
|
+
var s = [
|
|
7
8
|
"draft",
|
|
8
9
|
"issued",
|
|
9
10
|
"overdue",
|
|
@@ -12,32 +13,32 @@ var a = [
|
|
|
12
13
|
"uncollectible",
|
|
13
14
|
"canceled",
|
|
14
15
|
"recurring"
|
|
15
|
-
],
|
|
16
|
+
], c = [
|
|
16
17
|
"draft",
|
|
17
18
|
"issued",
|
|
18
19
|
"overdue",
|
|
19
20
|
"partially_paid",
|
|
20
21
|
"paid",
|
|
21
22
|
"uncollectible"
|
|
22
|
-
],
|
|
23
|
+
], l = [
|
|
23
24
|
e.DueDate,
|
|
24
25
|
e.CreatedAt,
|
|
25
26
|
e.IssueDate,
|
|
26
27
|
e.Status,
|
|
27
28
|
e.Amount,
|
|
28
29
|
e.Customer
|
|
29
|
-
],
|
|
30
|
+
], u = {
|
|
30
31
|
dueDate: "due_date",
|
|
31
32
|
createdAt: "created_at",
|
|
32
33
|
issueDate: "issue_date"
|
|
33
|
-
},
|
|
34
|
+
}, d = {
|
|
34
35
|
Status: "status",
|
|
35
36
|
Customer: "customer",
|
|
36
37
|
Counterpart: "counterpart",
|
|
37
38
|
Amount: "amount",
|
|
38
39
|
Search: "search"
|
|
39
|
-
},
|
|
40
|
-
function
|
|
40
|
+
}, f = "date_";
|
|
41
|
+
function p(e) {
|
|
41
42
|
return {
|
|
42
43
|
dateRanges: {},
|
|
43
44
|
statuses: [],
|
|
@@ -48,71 +49,105 @@ function d(e) {
|
|
|
48
49
|
customerId: e
|
|
49
50
|
};
|
|
50
51
|
}
|
|
51
|
-
function
|
|
52
|
+
function m(e) {
|
|
52
53
|
return !!(e?.from || e?.to || e?.preset);
|
|
53
54
|
}
|
|
54
|
-
function
|
|
55
|
+
function h(e) {
|
|
55
56
|
return Object.entries(e.dateRanges);
|
|
56
57
|
}
|
|
57
|
-
function
|
|
58
|
+
function g(e) {
|
|
58
59
|
let t = Number.parseFloat(e);
|
|
59
60
|
return Number.isNaN(t) ? void 0 : Math.round(t * 100);
|
|
60
61
|
}
|
|
61
|
-
function
|
|
62
|
+
function _(e) {
|
|
63
|
+
if (e.amountMode === "any") return {};
|
|
64
|
+
let t = g(e.amountMin);
|
|
65
|
+
return e.amountMode === "exact" ? {
|
|
66
|
+
min: t,
|
|
67
|
+
max: t
|
|
68
|
+
} : {
|
|
69
|
+
min: t,
|
|
70
|
+
max: g(e.amountMax)
|
|
71
|
+
};
|
|
72
|
+
}
|
|
73
|
+
function v(e) {
|
|
74
|
+
let { min: t, max: n } = _(e);
|
|
75
|
+
return t !== void 0 || n !== void 0;
|
|
76
|
+
}
|
|
77
|
+
function y(e) {
|
|
62
78
|
let t = {};
|
|
63
|
-
for (let [
|
|
64
|
-
let e =
|
|
65
|
-
e === "due_date" ? (
|
|
66
|
-
}
|
|
67
|
-
if (t.status__in = e.statuses.length > 0 ? e.statuses : o, e.customerName && (t.counterpart_name__icontains = e.customerName), e.customerId && (t.counterpart_id = e.customerId), e.amountMode !== "any") {
|
|
68
|
-
let n = m(e.amountMin), r = m(e.amountMax);
|
|
69
|
-
e.amountMode === "exact" ? n !== void 0 && (t.total_amount__gte = n, t.total_amount__lte = n) : (n !== void 0 && (t.total_amount__gte = n), r !== void 0 && (t.total_amount__lte = r));
|
|
79
|
+
for (let [n, i] of h(e)) {
|
|
80
|
+
let e = u[n];
|
|
81
|
+
e === "due_date" ? (i?.from && (t.due_date__gte = a(i.from, { representation: "date" })), i?.to && (t.due_date__lte = a(i.to, { representation: "date" }))) : (i?.from && (t[`${e}__gte`] = o(i.from).toISOString()), i?.to && (t[`${e}__lt`] = r(o(i.to), 1).toISOString()));
|
|
70
82
|
}
|
|
71
|
-
|
|
83
|
+
t.status__in = e.statuses.length > 0 ? e.statuses : c, e.customerName && (t.counterpart_name__icontains = e.customerName), e.customerId && (t.counterpart_id = e.customerId);
|
|
84
|
+
let { min: n, max: i } = _(e);
|
|
85
|
+
return n !== void 0 && (t.total_amount__gte = n), i !== void 0 && (t.total_amount__lte = i), t;
|
|
72
86
|
}
|
|
73
|
-
function
|
|
87
|
+
function b(e, t) {
|
|
74
88
|
return [
|
|
75
|
-
Object.values(e.dateRanges).some(
|
|
89
|
+
Object.values(e.dateRanges).some(m),
|
|
76
90
|
e.statuses.length > 0,
|
|
77
91
|
!!e.customerName,
|
|
78
92
|
!!e.customerId,
|
|
79
|
-
e
|
|
93
|
+
v(e),
|
|
80
94
|
!!t
|
|
81
95
|
].filter(Boolean).length;
|
|
82
96
|
}
|
|
83
|
-
|
|
97
|
+
var x = "MMM d, yyyy";
|
|
98
|
+
function S(e, t) {
|
|
99
|
+
if (e?.preset && e.preset in t.presets) return t.presets[e.preset];
|
|
100
|
+
let n = e?.from && i(e.from, x), r = e?.to && i(e.to, x);
|
|
101
|
+
if (n && r) return t.dateRange(n, r);
|
|
102
|
+
if (n) return t.dateFrom(n);
|
|
103
|
+
if (r) return t.dateTo(r);
|
|
104
|
+
}
|
|
105
|
+
var C = (e) => e === void 0 ? void 0 : t({
|
|
106
|
+
amount: e,
|
|
107
|
+
currency: "USD",
|
|
108
|
+
fallback: ""
|
|
109
|
+
});
|
|
110
|
+
function w(e, t) {
|
|
111
|
+
let n = _(e), r = C(n.min), i = C(n.max);
|
|
112
|
+
if (e.amountMode === "exact") return r;
|
|
113
|
+
if (r && i) return t.amountBetween(r, i);
|
|
114
|
+
if (r) return t.amountAtLeast(r);
|
|
115
|
+
if (i) return t.amountAtMost(i);
|
|
116
|
+
}
|
|
117
|
+
function T({ state: e, search: t, counterpartName: n, labels: r, statusLabels: i }) {
|
|
84
118
|
let a = [], o = new Map(Object.entries(i));
|
|
85
|
-
for (let [t, n] of
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
label: r.dateChip(r.dateFieldNames[t], e ?? r.customRange)
|
|
119
|
+
for (let [t, n] of h(e)) {
|
|
120
|
+
let e = S(n, r);
|
|
121
|
+
e && a.push({
|
|
122
|
+
key: `${f}${t}`,
|
|
123
|
+
label: r.dateChip(r.dateFieldNames[t], e)
|
|
91
124
|
});
|
|
92
125
|
}
|
|
93
126
|
if (e.statuses.length > 0) {
|
|
94
127
|
let [t, ...n] = e.statuses.map((e) => o.get(e) ?? e);
|
|
95
128
|
a.push({
|
|
96
|
-
key:
|
|
129
|
+
key: d.Status,
|
|
97
130
|
label: r.statusChip(n.length === 0 ? t : r.moreSelected(t, n.length))
|
|
98
131
|
});
|
|
99
132
|
}
|
|
100
|
-
|
|
101
|
-
key:
|
|
133
|
+
e.customerName && a.push({
|
|
134
|
+
key: d.Customer,
|
|
102
135
|
label: r.customerChip(e.customerName)
|
|
103
136
|
}), e.customerId && a.push({
|
|
104
|
-
key:
|
|
137
|
+
key: d.Counterpart,
|
|
105
138
|
label: r.customerChip(n || e.customerId)
|
|
106
|
-
})
|
|
107
|
-
|
|
108
|
-
|
|
139
|
+
});
|
|
140
|
+
let s = w(e, r);
|
|
141
|
+
return s && a.push({
|
|
142
|
+
key: d.Amount,
|
|
143
|
+
label: r.amountChip(s)
|
|
109
144
|
}), t && a.push({
|
|
110
|
-
key:
|
|
145
|
+
key: d.Search,
|
|
111
146
|
label: r.searchChip(t)
|
|
112
147
|
}), a;
|
|
113
148
|
}
|
|
114
|
-
function
|
|
115
|
-
if (t.startsWith(
|
|
149
|
+
function E(e, t) {
|
|
150
|
+
if (t.startsWith(f)) {
|
|
116
151
|
let n = t.slice(5), r = { ...e.dateRanges };
|
|
117
152
|
return delete r[n], {
|
|
118
153
|
...e,
|
|
@@ -120,19 +155,19 @@ function v(e, t) {
|
|
|
120
155
|
};
|
|
121
156
|
}
|
|
122
157
|
switch (t) {
|
|
123
|
-
case
|
|
158
|
+
case d.Status: return {
|
|
124
159
|
...e,
|
|
125
160
|
statuses: []
|
|
126
161
|
};
|
|
127
|
-
case
|
|
162
|
+
case d.Customer: return {
|
|
128
163
|
...e,
|
|
129
164
|
customerName: ""
|
|
130
165
|
};
|
|
131
|
-
case
|
|
166
|
+
case d.Counterpart: return {
|
|
132
167
|
...e,
|
|
133
168
|
customerId: void 0
|
|
134
169
|
};
|
|
135
|
-
case
|
|
170
|
+
case d.Amount: return {
|
|
136
171
|
...e,
|
|
137
172
|
amountMode: "any",
|
|
138
173
|
amountMin: "",
|
|
@@ -141,18 +176,18 @@ function v(e, t) {
|
|
|
141
176
|
default: return e;
|
|
142
177
|
}
|
|
143
178
|
}
|
|
144
|
-
function
|
|
145
|
-
return
|
|
179
|
+
function D(e, t) {
|
|
180
|
+
return s.map((n) => ({
|
|
146
181
|
value: n,
|
|
147
182
|
label: e[n],
|
|
148
183
|
description: t.statusDescriptions[n]
|
|
149
184
|
}));
|
|
150
185
|
}
|
|
151
|
-
function
|
|
152
|
-
return Object.entries(
|
|
186
|
+
function O(e) {
|
|
187
|
+
return Object.entries(n).map(([t, n]) => ({
|
|
153
188
|
value: t,
|
|
154
189
|
label: e.presets[t],
|
|
155
190
|
group: n === "current" ? e.presetGroupCurrent : e.presetGroupPast
|
|
156
191
|
}));
|
|
157
192
|
}
|
|
158
|
-
export {
|
|
193
|
+
export { l as INVOICES_FILTER_FIELDS, c as INVOICE_DEFAULT_STATUSES, s as INVOICE_FILTER_STATUSES, d as InvoicesFilterChipKey, O as buildInvoicesDatePresetOptions, T as buildInvoicesFilterChips, y as buildInvoicesFilterQuery, D as buildInvoicesStatusOptions, E as clearInvoicesFilter, b as countActiveInvoiceFilters, p as emptyInvoicesFilterState };
|
|
@@ -22,7 +22,9 @@ var t = {
|
|
|
22
22
|
createdAt: "Created on",
|
|
23
23
|
issueDate: "Issue date"
|
|
24
24
|
},
|
|
25
|
-
|
|
25
|
+
dateRange: (e, t) => `${e} - ${t}`,
|
|
26
|
+
dateFrom: (e) => `From ${e}`,
|
|
27
|
+
dateTo: (e) => `Until ${e}`,
|
|
26
28
|
statusDescriptions: {
|
|
27
29
|
draft: "Created but not yet sent",
|
|
28
30
|
overdue: "Past due date",
|
|
@@ -33,7 +35,10 @@ var t = {
|
|
|
33
35
|
statusChip: (e) => `Status: ${e}`,
|
|
34
36
|
moreSelected: (e, t) => `${e} + ${t} more`,
|
|
35
37
|
customerChip: (e) => `Customer: ${e}`,
|
|
36
|
-
amountChip:
|
|
38
|
+
amountChip: (e) => `Amount: ${e}`,
|
|
39
|
+
amountAtLeast: (e) => `${e} or more`,
|
|
40
|
+
amountAtMost: (e) => `${e} or less`,
|
|
41
|
+
amountBetween: (e, t) => `${e} - ${t}`,
|
|
37
42
|
searchChip: (e) => `Search: ${e}`
|
|
38
43
|
};
|
|
39
44
|
function n(e) {
|
package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/analytics/build-info.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// ../../libs/tesouro-embedded-components-react/shared/feature/dist/lib/analytics/build-info.js
|
|
2
|
-
var e = "@tesouro/embedded-components-react", t = "0.11.
|
|
2
|
+
var e = "@tesouro/embedded-components-react", t = "0.11.118", n = "413556c820e5def7f1563b02bfc2ecd0463e9ee1", r = Object.freeze({
|
|
3
3
|
library_name: e,
|
|
4
4
|
library_version: t,
|
|
5
5
|
library_sha: n
|
|
@@ -30,5 +30,6 @@ import "./lib/OnboardingShell/OnboardingShellStepper.js";
|
|
|
30
30
|
import "./lib/OnboardingShell/OnboardingShellOverlayPortal.js";
|
|
31
31
|
import { OnboardingShell as T } from "./lib/OnboardingShell/OnboardingShell.js";
|
|
32
32
|
import { SectionHeading as E } from "./lib/SectionHeading/SectionHeading.js";
|
|
33
|
-
import {
|
|
34
|
-
|
|
33
|
+
import { ConsentBlock as D } from "./lib/ConsentBlock/ConsentBlock.js";
|
|
34
|
+
import { FileDropZone as O } from "./lib/FileDropZone/FileDropZone.js";
|
|
35
|
+
export { p as AddTile, y as AmountInput, D as ConsentBlock, g as ERROR_STATE_ID, e as EmbeddedToaster, h as EmptyState, _ as ErrorState, O as FileDropZone, l as HostIsolationScope, S as InlineErrorAlert, u as Link, b as LoadingRegion, x as MaskedAccountNumber, v as NoAccessState, T as OnboardingShell, C as PAGINATION_FOOTER_LABELS_EN, w as PaginationFooter, E as SectionHeading, m as StatePanel, t as ToastNameMessage, n as UIFramework, i as UIProvider, f as WidgetContainer, d as WidgetFrame, a as registerDesignSystemEnsurer, o as registerUIRenderers, r as resolveUIFramework, s as useDesignSystemEnsurer, c as useFrameworkRenderer };
|
package/dist/libs/tesouro-embedded-components-react/shared/ui/dist/lib/ConsentBlock/ConsentBlock.js
ADDED
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { Checkbox as e, FieldError as t } from "../../../../../../../packages/shared-ui-shadcn/dist/index.js";
|
|
2
|
+
import { useId as n } from "react";
|
|
3
|
+
import { jsx as r, jsxs as i } from "react/jsx-runtime";
|
|
4
|
+
// ../../libs/tesouro-embedded-components-react/shared/ui/dist/lib/ConsentBlock/ConsentBlock.js
|
|
5
|
+
function a({ links: a, agreement: o, checked: s, onCheckedChange: c, disabled: l, error: u, checkboxAriaLabel: d, testIds: f }) {
|
|
6
|
+
let p = n(), m = `${p}-agreement`, h = `${p}-error`;
|
|
7
|
+
return /* @__PURE__ */ i("div", {
|
|
8
|
+
className: "ttw:flex ttw:flex-col ttw:gap-4",
|
|
9
|
+
children: [a.length > 0 ? /* @__PURE__ */ r("ul", {
|
|
10
|
+
"data-testid": f?.links,
|
|
11
|
+
className: "ttw:list-disc ttw:space-y-2 ttw:pl-5",
|
|
12
|
+
children: a.map((e, t) => /* @__PURE__ */ r("li", { children: e.href ? /* @__PURE__ */ r("a", {
|
|
13
|
+
href: e.href,
|
|
14
|
+
target: "_blank",
|
|
15
|
+
rel: "noopener noreferrer",
|
|
16
|
+
className: "ttw:text-sm ttw:text-primary ttw:underline ttw:underline-offset-2",
|
|
17
|
+
children: e.label
|
|
18
|
+
}) : /* @__PURE__ */ r("span", {
|
|
19
|
+
className: "ttw:text-sm",
|
|
20
|
+
children: e.label
|
|
21
|
+
}) }, `${e.label}-${t}`))
|
|
22
|
+
}) : null, /* @__PURE__ */ i("div", {
|
|
23
|
+
className: "ttw:flex ttw:items-start ttw:gap-2",
|
|
24
|
+
children: [/* @__PURE__ */ r(e, {
|
|
25
|
+
id: p,
|
|
26
|
+
"data-testid": f?.checkbox,
|
|
27
|
+
checked: s,
|
|
28
|
+
disabled: l,
|
|
29
|
+
onCheckedChange: (e) => c(e === !0),
|
|
30
|
+
"aria-label": d,
|
|
31
|
+
"aria-labelledby": d ? void 0 : m,
|
|
32
|
+
"aria-describedby": [d ? m : void 0, u ? h : void 0].filter(Boolean).join(" ") || void 0,
|
|
33
|
+
"aria-invalid": u ? !0 : void 0,
|
|
34
|
+
className: "ttw:mt-1 ttw:shrink-0"
|
|
35
|
+
}), /* @__PURE__ */ i("div", {
|
|
36
|
+
className: "ttw:flex ttw:flex-col ttw:gap-1",
|
|
37
|
+
children: [/* @__PURE__ */ r("label", {
|
|
38
|
+
htmlFor: p,
|
|
39
|
+
id: m,
|
|
40
|
+
"data-testid": f?.agreement,
|
|
41
|
+
className: "ttw:text-sm ttw:leading-relaxed ttw:text-foreground",
|
|
42
|
+
children: o
|
|
43
|
+
}), u ? /* @__PURE__ */ r(t, {
|
|
44
|
+
id: h,
|
|
45
|
+
children: u
|
|
46
|
+
}) : null]
|
|
47
|
+
})]
|
|
48
|
+
})]
|
|
49
|
+
});
|
|
50
|
+
}
|
|
51
|
+
export { a as ConsentBlock };
|
package/dist/libs/tesouro-embedded-components-react/shared/ui/dist/lib/EmptyState/EmptyState.js
CHANGED
|
@@ -2,16 +2,18 @@ import { Button as e } from "../../../../../../../packages/shared-ui-shadcn/dist
|
|
|
2
2
|
import { StatePanel as t } from "../StatePanel/StatePanel.js";
|
|
3
3
|
import { jsx as n, jsxs as r } from "react/jsx-runtime";
|
|
4
4
|
// ../../libs/tesouro-embedded-components-react/shared/ui/dist/lib/EmptyState/EmptyState.js
|
|
5
|
-
function i({ icon: i, title: a, description: o, actionLabel: s, actionIcon: c, onAction: l,
|
|
5
|
+
function i({ icon: i, title: a, description: o, actionLabel: s, actionIcon: c, onAction: l, actionDisabled: u, actionTestId: d, className: f, testId: p }) {
|
|
6
6
|
return /* @__PURE__ */ n(t, {
|
|
7
7
|
kind: "empty",
|
|
8
8
|
icon: i,
|
|
9
9
|
title: a,
|
|
10
10
|
description: o,
|
|
11
|
-
className:
|
|
12
|
-
testId:
|
|
11
|
+
className: f,
|
|
12
|
+
testId: p,
|
|
13
13
|
action: s && l ? /* @__PURE__ */ r(e, {
|
|
14
14
|
onClick: l,
|
|
15
|
+
disabled: u,
|
|
16
|
+
"data-testid": d,
|
|
15
17
|
children: [c, s]
|
|
16
18
|
}) : void 0
|
|
17
19
|
});
|
|
@@ -3,7 +3,7 @@ import { jsx as e } from "react/jsx-runtime";
|
|
|
3
3
|
function t({ children: t, className: n }) {
|
|
4
4
|
return /* @__PURE__ */ e("div", {
|
|
5
5
|
role: "alert",
|
|
6
|
-
className: "ttw:rounded-md ttw:border ttw:border-destructive/30 ttw:p-3 ttw:text-sm ttw:text-destructive" + (n ? ` ${n}` : ""),
|
|
6
|
+
className: "ttw:rounded-md ttw:border ttw:border-destructive/30 ttw:bg-destructive-subtle ttw:p-3 ttw:text-sm ttw:text-destructive-subtle-foreground" + (n ? ` ${n}` : ""),
|
|
7
7
|
children: t
|
|
8
8
|
});
|
|
9
9
|
}
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { Button as e,
|
|
2
|
-
import { InlineErrorAlert as
|
|
3
|
-
import { ONBOARDING_SHELL_LABELS_EN as
|
|
4
|
-
import { OnboardingShellStepper as
|
|
5
|
-
import { OnboardingShellOverlayContainerContext as
|
|
6
|
-
import { FdicLogo as
|
|
7
|
-
import { OnboardingShellScrollRegion as
|
|
8
|
-
import * as
|
|
9
|
-
import { jsx as
|
|
10
|
-
import {
|
|
1
|
+
import { Button as e, Heading as t, Separator as n, cn as r } from "../../../../../../../packages/shared-ui-shadcn/dist/index.js";
|
|
2
|
+
import { InlineErrorAlert as i } from "../InlineErrorAlert/InlineErrorAlert.js";
|
|
3
|
+
import { ONBOARDING_SHELL_LABELS_EN as a } from "./labels.js";
|
|
4
|
+
import { OnboardingShellStepper as o } from "./OnboardingShellStepper.js";
|
|
5
|
+
import { OnboardingShellOverlayContainerContext as s } from "./OnboardingShellOverlayPortal.js";
|
|
6
|
+
import { FdicLogo as c } from "./FdicLogo.js";
|
|
7
|
+
import { OnboardingShellScrollRegion as l } from "./OnboardingShellScrollRegion.js";
|
|
8
|
+
import * as u from "react";
|
|
9
|
+
import { jsx as d, jsxs as f } from "react/jsx-runtime";
|
|
10
|
+
import { Trash2 as p } from "lucide-react";
|
|
11
11
|
// ../../libs/tesouro-embedded-components-react/shared/ui/dist/lib/OnboardingShell/OnboardingShell.js
|
|
12
12
|
function m(e) {
|
|
13
13
|
let t = e.ownerDocument.documentElement, n = (e) => Number.parseFloat(getComputedStyle(e).scrollPaddingTop) || 0, r = n(t);
|
|
@@ -17,124 +17,121 @@ function m(e) {
|
|
|
17
17
|
}
|
|
18
18
|
return r;
|
|
19
19
|
}
|
|
20
|
-
function h({ title: h, subtitle: g, isTitleVisuallyHidden: _ = !1, focusTitleOnMount: v = !1, stepLabels: y, activeStep: b,
|
|
21
|
-
let
|
|
22
|
-
...
|
|
23
|
-
...
|
|
24
|
-
}, [
|
|
25
|
-
|
|
26
|
-
}, []),
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
}, [b,
|
|
30
|
-
let
|
|
31
|
-
|
|
32
|
-
|
|
20
|
+
function h({ title: h, subtitle: g, isTitleVisuallyHidden: _ = !1, focusTitleOnMount: v = !1, stepLabels: y, activeStep: b, onStepClick: x, disclaimerText: S, onBack: C, onNext: w, onCancel: T, onSaveAndClose: E, isSaveAndCloseDisabled: D = !1, isSaveAndCloseLoading: O = !1, onDelete: k, isBackDisabled: A = !1, showBackButton: j = !0, backAriaLabel: M, isNextDisabled: N = !1, isNextLoading: P = !1, nextLabel: F, errorMessage: I, children: L, labels: R, testIds: z }) {
|
|
21
|
+
let B = {
|
|
22
|
+
...a,
|
|
23
|
+
...R
|
|
24
|
+
}, [V, H] = u.useState(null), U = u.useCallback((e) => {
|
|
25
|
+
H(e);
|
|
26
|
+
}, []), W = u.useRef(b);
|
|
27
|
+
u.useEffect(() => {
|
|
28
|
+
W.current !== b && (W.current = b, V && V.getBoundingClientRect().top < m(V) && V.scrollIntoView({ block: "start" }));
|
|
29
|
+
}, [b, V]);
|
|
30
|
+
let G = u.useRef(null), K = u.useRef(v);
|
|
31
|
+
u.useEffect(() => {
|
|
32
|
+
K.current && G.current?.focus();
|
|
33
33
|
}, []);
|
|
34
|
-
let
|
|
35
|
-
className: "ttw:size-5",
|
|
36
|
-
"aria-hidden": !0
|
|
37
|
-
}) : F), Z = A ? /* @__PURE__ */ u(e, {
|
|
34
|
+
let q = u.useMemo(() => ({ container: V }), [V]), J = P || O, Y = j ? /* @__PURE__ */ d(e, {
|
|
38
35
|
type: "button",
|
|
39
36
|
variant: "outline",
|
|
40
|
-
disabled:
|
|
41
|
-
onClick:
|
|
42
|
-
"aria-label":
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
children: V.backButton
|
|
37
|
+
disabled: A || J,
|
|
38
|
+
onClick: C,
|
|
39
|
+
"aria-label": M,
|
|
40
|
+
"data-testid": z?.back,
|
|
41
|
+
children: B.backButton
|
|
46
42
|
}) : null;
|
|
47
|
-
return /* @__PURE__ */
|
|
48
|
-
value:
|
|
49
|
-
children: /* @__PURE__ */
|
|
50
|
-
ref:
|
|
43
|
+
return /* @__PURE__ */ d(s.Provider, {
|
|
44
|
+
value: q,
|
|
45
|
+
children: /* @__PURE__ */ f("div", {
|
|
46
|
+
ref: U,
|
|
51
47
|
className: "ttw:relative ttw:grid ttw:max-h-full ttw:w-full ttw:min-h-0 ttw:grid-rows-[auto_1fr_auto] ttw:gap-0 ttw:overflow-hidden ttw:bg-background",
|
|
52
|
-
"data-testid":
|
|
48
|
+
"data-testid": z?.root,
|
|
53
49
|
children: [
|
|
54
|
-
/* @__PURE__ */
|
|
50
|
+
/* @__PURE__ */ f("header", {
|
|
55
51
|
className: "ttw:px-8 ttw:pt-8",
|
|
56
52
|
children: [
|
|
57
|
-
/* @__PURE__ */
|
|
58
|
-
|
|
53
|
+
/* @__PURE__ */ d(t, {
|
|
54
|
+
variant: "page",
|
|
55
|
+
ref: G,
|
|
59
56
|
tabIndex: -1,
|
|
60
|
-
className:
|
|
57
|
+
className: r("ttw:outline-none", _ ? "ttw:sr-only" : "ttw:text-foreground"),
|
|
61
58
|
children: h
|
|
62
59
|
}),
|
|
63
|
-
/* @__PURE__ */
|
|
60
|
+
/* @__PURE__ */ d("p", {
|
|
64
61
|
className: _ ? "ttw:sr-only" : "ttw:mt-1 ttw:mb-4 ttw:text-sm ttw:text-muted-foreground",
|
|
65
62
|
children: g
|
|
66
63
|
}),
|
|
67
|
-
/* @__PURE__ */
|
|
64
|
+
/* @__PURE__ */ d(o, {
|
|
68
65
|
stepLabels: y,
|
|
69
66
|
activeStep: b,
|
|
70
|
-
labels:
|
|
67
|
+
labels: R,
|
|
68
|
+
onStepClick: x,
|
|
69
|
+
isStepClickDisabled: J,
|
|
70
|
+
stepButtonTestIdPrefix: z?.stepButton
|
|
71
71
|
})
|
|
72
72
|
]
|
|
73
73
|
}),
|
|
74
|
-
/* @__PURE__ */
|
|
74
|
+
/* @__PURE__ */ d(l, {
|
|
75
75
|
activeStep: b,
|
|
76
|
-
testIds:
|
|
77
|
-
children:
|
|
76
|
+
testIds: z?.scrollRegion,
|
|
77
|
+
children: L
|
|
78
78
|
}),
|
|
79
|
-
/* @__PURE__ */
|
|
79
|
+
/* @__PURE__ */ f("footer", {
|
|
80
80
|
className: "ttw:px-8 ttw:pb-8",
|
|
81
81
|
children: [
|
|
82
|
-
/* @__PURE__ */
|
|
83
|
-
/* @__PURE__ */
|
|
82
|
+
/* @__PURE__ */ d(n, { className: "ttw:mb-3" }),
|
|
83
|
+
/* @__PURE__ */ f("div", {
|
|
84
84
|
className: "ttw:mb-4 ttw:flex ttw:items-center ttw:gap-1",
|
|
85
|
-
children: [/* @__PURE__ */
|
|
85
|
+
children: [/* @__PURE__ */ d("p", {
|
|
86
86
|
className: "ttw:text-sm ttw:text-muted-foreground",
|
|
87
|
-
children:
|
|
88
|
-
}), /* @__PURE__ */
|
|
87
|
+
children: S
|
|
88
|
+
}), /* @__PURE__ */ d(c, {})]
|
|
89
89
|
}),
|
|
90
|
-
|
|
90
|
+
I ? /* @__PURE__ */ d(i, {
|
|
91
91
|
className: "ttw:mb-3",
|
|
92
|
-
children:
|
|
92
|
+
children: I
|
|
93
93
|
}) : null,
|
|
94
|
-
/* @__PURE__ */
|
|
94
|
+
/* @__PURE__ */ f("div", {
|
|
95
95
|
className: "ttw:flex ttw:flex-wrap ttw:items-center ttw:justify-between ttw:gap-3",
|
|
96
|
-
children: [
|
|
96
|
+
children: [k ? /* @__PURE__ */ f(e, {
|
|
97
97
|
type: "button",
|
|
98
98
|
variant: "ghost",
|
|
99
|
-
disabled:
|
|
100
|
-
onClick:
|
|
101
|
-
className: "ttw:
|
|
102
|
-
"data-testid":
|
|
103
|
-
children: [/* @__PURE__ */
|
|
99
|
+
disabled: J,
|
|
100
|
+
onClick: k,
|
|
101
|
+
className: "ttw:max-w-full ttw:whitespace-normal ttw:text-destructive ttw:hover:text-destructive",
|
|
102
|
+
"data-testid": z?.delete,
|
|
103
|
+
children: [/* @__PURE__ */ d(p, {
|
|
104
104
|
className: "ttw:size-4",
|
|
105
105
|
"aria-hidden": !0
|
|
106
|
-
}),
|
|
107
|
-
}) :
|
|
106
|
+
}), B.deleteButton]
|
|
107
|
+
}) : Y, /* @__PURE__ */ f("div", {
|
|
108
108
|
className: "ttw:ml-auto ttw:flex ttw:min-w-0 ttw:max-w-full ttw:flex-wrap ttw:items-center ttw:justify-end ttw:gap-3",
|
|
109
109
|
children: [
|
|
110
|
-
|
|
111
|
-
|
|
110
|
+
k ? Y : null,
|
|
111
|
+
T ? /* @__PURE__ */ d(e, {
|
|
112
112
|
type: "button",
|
|
113
|
-
variant: "
|
|
114
|
-
disabled:
|
|
115
|
-
onClick:
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
children: V.cancelButton
|
|
113
|
+
variant: "ghost",
|
|
114
|
+
disabled: J,
|
|
115
|
+
onClick: T,
|
|
116
|
+
"data-testid": z?.cancel,
|
|
117
|
+
children: B.cancelButton
|
|
119
118
|
}) : null,
|
|
120
|
-
|
|
119
|
+
E ? /* @__PURE__ */ d(e, {
|
|
121
120
|
type: "button",
|
|
122
121
|
variant: "secondary",
|
|
123
|
-
disabled:
|
|
124
|
-
loading:
|
|
125
|
-
onClick:
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
children: V.saveAndCloseButton
|
|
122
|
+
disabled: D || J,
|
|
123
|
+
loading: O,
|
|
124
|
+
onClick: E,
|
|
125
|
+
"data-testid": z?.saveAndClose,
|
|
126
|
+
children: B.saveAndCloseButton
|
|
129
127
|
}) : null,
|
|
130
128
|
/* @__PURE__ */ d(e, {
|
|
131
129
|
type: "button",
|
|
132
|
-
disabled:
|
|
133
|
-
loading:
|
|
134
|
-
onClick:
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
children: [P, X]
|
|
130
|
+
disabled: N || J,
|
|
131
|
+
loading: P,
|
|
132
|
+
onClick: w,
|
|
133
|
+
"data-testid": z?.next,
|
|
134
|
+
children: F
|
|
138
135
|
})
|
|
139
136
|
]
|
|
140
137
|
})]
|
|
@@ -145,4 +142,4 @@ function h({ title: h, subtitle: g, isTitleVisuallyHidden: _ = !1, focusTitleOnM
|
|
|
145
142
|
})
|
|
146
143
|
});
|
|
147
144
|
}
|
|
148
|
-
export {
|
|
145
|
+
export { a as ONBOARDING_SHELL_LABELS_EN, h as OnboardingShell, o as OnboardingShellStepper };
|
|
@@ -41,7 +41,7 @@ function o({ activeStep: o, children: s, testIds: c }) {
|
|
|
41
41
|
marginTop: `-${f}px`,
|
|
42
42
|
opacity: +!!h,
|
|
43
43
|
transitionDuration: `${i}ms`,
|
|
44
|
-
background: "linear-gradient(to bottom,
|
|
44
|
+
background: "linear-gradient(to bottom, transparent 0%, var(--ttw-background) 85%, var(--ttw-background) 100%)"
|
|
45
45
|
}
|
|
46
46
|
}) : null]
|
|
47
47
|
});
|