@tesouro/embedded-components-react 0.4.1 → 0.4.4
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 +10 -10
- package/dist/index.css +3 -0
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index4.js +2 -6
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index72.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index9.js +1 -0
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index18.js +0 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index74.js +15 -9
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index75.js +7 -5
- package/dist/libs/tesouro-embedded-components-react/card-details-widget/feature/dist/index13.js +141 -138
- package/dist/libs/tesouro-embedded-components-react/card-details-widget/ui/dist/lib/ActivateCardPanel/ActivateCardPanel.js +39 -38
- package/dist/libs/tesouro-embedded-components-react/card-details-widget/ui/dist/lib/ActivateCardPanel/ActivateCardSuccessView.js +33 -21
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index523.js +6 -3
- package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/analytics/build-info.js +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -316,16 +316,16 @@ Details for one credit **or** debit card — status, form factor, program, maske
|
|
|
316
316
|
|
|
317
317
|
#### Props
|
|
318
318
|
|
|
319
|
-
| Prop | Type | Default | Description
|
|
320
|
-
| ---------------- | --------------------------------------- | -------------- |
|
|
321
|
-
| `cardId` | `string` | **Required** | Id of the card to show.
|
|
322
|
-
| `cardProgram` | `'credit' \| 'debit'` | **Required** | Which issuing program `cardId` belongs to. Selects the endpoint the card is fetched from.
|
|
323
|
-
| `onClose` | `() => void` | `undefined` | Called when the
|
|
324
|
-
| `labels` | `PartialDeep<CardDetailsWidgetLabels>` | English labels | Overrides the panel's own copy — header, card face alt text, row headings, copy-button accessible names, the nickname editor, the lock control and its locked notice, and the loading/error/not-found screens.
|
|
325
|
-
| `activateLabels` | `PartialDeep<ActivateCardPanelLabels>` | English labels | Overrides the Activate Card form's copy — its heading, the two field labels, the security-code explanation, and the validation and status text.
|
|
326
|
-
| `featureLabels` | `PartialDeep<CardDetailsFeatureLabels>` | English labels | Overrides the copy this widget resolves rather than passes through — status, form-factor and program vocabulary, the copy-success and nickname-updated toasts, the activation, lock and nickname conflict toasts, and the refused-reveal sentence.
|
|
327
|
-
| `bankLogoSrc` | `string` | `undefined` | Bank logo for the card face. Omit and the face renders without a logo rather than with a placeholder.
|
|
328
|
-
| `bankLogoAlt` | `string` | `undefined` | Alt text for `bankLogoSrc`. Falls back to `labels.cardFace.bankLogoAlt`.
|
|
319
|
+
| Prop | Type | Default | Description |
|
|
320
|
+
| ---------------- | --------------------------------------- | -------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
321
|
+
| `cardId` | `string` | **Required** | Id of the card to show. |
|
|
322
|
+
| `cardProgram` | `'credit' \| 'debit'` | **Required** | Which issuing program `cardId` belongs to. Selects the endpoint the card is fetched from. |
|
|
323
|
+
| `onClose` | `() => void` | `undefined` | Called when the reader is finished with the widget: the details panel's close control, and **Done** on the activation success screen. Omit it and neither is rendered. The activation form keeps its own close either way, which returns to the details. |
|
|
324
|
+
| `labels` | `PartialDeep<CardDetailsWidgetLabels>` | English labels | Overrides the panel's own copy — header, card face alt text, row headings, copy-button accessible names, the nickname editor, the lock control and its locked notice, and the loading/error/not-found screens. |
|
|
325
|
+
| `activateLabels` | `PartialDeep<ActivateCardPanelLabels>` | English labels | Overrides the Activate Card form's copy — its heading, the two field labels, the security-code explanation, and the validation and status text. |
|
|
326
|
+
| `featureLabels` | `PartialDeep<CardDetailsFeatureLabels>` | English labels | Overrides the copy this widget resolves rather than passes through — status, form-factor and program vocabulary, the copy-success and nickname-updated toasts, the activation, lock and nickname conflict toasts, and the refused-reveal sentence. |
|
|
327
|
+
| `bankLogoSrc` | `string` | `undefined` | Bank logo for the card face. Omit and the face renders without a logo rather than with a placeholder. |
|
|
328
|
+
| `bankLogoAlt` | `string` | `undefined` | Alt text for `bankLogoSrc`. Falls back to `labels.cardFace.bankLogoAlt`. |
|
|
329
329
|
|
|
330
330
|
### CounterpartsWidget
|
|
331
331
|
|
package/dist/index.css
CHANGED
|
@@ -17,16 +17,12 @@ function n({ apiStatus: n, dueDate: r, scheduledPaymentDate: i, hasScheduledPaym
|
|
|
17
17
|
};
|
|
18
18
|
let s = !!(e.has(n) && r && t(r, o));
|
|
19
19
|
switch (n) {
|
|
20
|
-
case "draft":
|
|
20
|
+
case "draft":
|
|
21
|
+
case "new": return {
|
|
21
22
|
status: "draft",
|
|
22
23
|
tone: "neutral",
|
|
23
24
|
isOverdue: s
|
|
24
25
|
};
|
|
25
|
-
case "new": return {
|
|
26
|
-
status: "finalized",
|
|
27
|
-
tone: "warning",
|
|
28
|
-
isOverdue: s
|
|
29
|
-
};
|
|
30
26
|
case "approve_in_progress": return {
|
|
31
27
|
status: "pending_approval",
|
|
32
28
|
tone: "warning",
|
|
@@ -16,8 +16,8 @@ var e = {
|
|
|
16
16
|
e.Rejected,
|
|
17
17
|
e.Canceled
|
|
18
18
|
], n = {
|
|
19
|
-
[e.Draft]: ["draft"],
|
|
20
|
-
[e.PendingApproval]: ["
|
|
19
|
+
[e.Draft]: ["draft", "new"],
|
|
20
|
+
[e.PendingApproval]: ["approve_in_progress"],
|
|
21
21
|
[e.ReadyToPay]: ["waiting_to_be_paid"],
|
|
22
22
|
[e.PartiallyPaid]: ["partially_paid"],
|
|
23
23
|
[e.Paid]: ["paid"],
|
|
@@ -61,6 +61,7 @@ function u({ open: u, onOpenChange: d, enabled: f = !0, canManageDuplicates: p =
|
|
|
61
61
|
id: e.id,
|
|
62
62
|
status: e.status,
|
|
63
63
|
statusTone: e.statusTone,
|
|
64
|
+
removalOutcome: e.removeBy === "delete" || e.removeBy === "cancel" ? e.removeBy : void 0,
|
|
64
65
|
invoiceNumberLabel: e.invoiceNumberLabel,
|
|
65
66
|
amountLabel: e.amountLabel,
|
|
66
67
|
invoiceDateLabel: e.invoiceDateLabel,
|
|
@@ -53,11 +53,17 @@ function v({ group: v, isBusy: y, labels: b }) {
|
|
|
53
53
|
}),
|
|
54
54
|
/* @__PURE__ */ l(i, {
|
|
55
55
|
className: m,
|
|
56
|
-
children:
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
56
|
+
children: /* @__PURE__ */ u("div", {
|
|
57
|
+
className: "ttw:flex ttw:flex-col ttw:items-start ttw:gap-0.5",
|
|
58
|
+
children: [n.status && n.statusTone ? /* @__PURE__ */ l(c, {
|
|
59
|
+
status: n.status,
|
|
60
|
+
tone: n.statusTone,
|
|
61
|
+
labels: b.statusBadge
|
|
62
|
+
}) : null, n.removalOutcome ? /* @__PURE__ */ l("span", {
|
|
63
|
+
className: "ttw:text-xs ttw:text-muted-foreground",
|
|
64
|
+
children: n.removalOutcome === "delete" ? b.removalOutcomeDelete : b.removalOutcomeCancel
|
|
65
|
+
}) : null]
|
|
66
|
+
})
|
|
61
67
|
}),
|
|
62
68
|
/* @__PURE__ */ l(i, {
|
|
63
69
|
className: m,
|
|
@@ -86,17 +92,17 @@ function v({ group: v, isBusy: y, labels: b }) {
|
|
|
86
92
|
children: [/* @__PURE__ */ u("p", {
|
|
87
93
|
className: "ttw:text-right ttw:text-sm ttw:text-muted-foreground",
|
|
88
94
|
children: [
|
|
89
|
-
b.
|
|
95
|
+
b.removalHelperBeforeUnsubmitted,
|
|
90
96
|
/* @__PURE__ */ l("span", {
|
|
91
97
|
className: "ttw:font-semibold",
|
|
92
|
-
children: b.
|
|
98
|
+
children: b.removalHelperUnsubmitted
|
|
93
99
|
}),
|
|
94
100
|
b.removalHelperBetween,
|
|
95
101
|
/* @__PURE__ */ l("span", {
|
|
96
102
|
className: "ttw:font-semibold",
|
|
97
|
-
children: b.
|
|
103
|
+
children: b.removalHelperSubmitted
|
|
98
104
|
}),
|
|
99
|
-
b.
|
|
105
|
+
b.removalHelperAfterSubmitted
|
|
100
106
|
]
|
|
101
107
|
}), S ? /* @__PURE__ */ u("div", {
|
|
102
108
|
className: `ttw:flex ttw:flex-wrap ttw:justify-end ${_}`,
|
|
@@ -12,11 +12,13 @@ var t = {
|
|
|
12
12
|
columnAmount: "Amount",
|
|
13
13
|
columnActions: "Actions",
|
|
14
14
|
statusBadge: e,
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
removalHelperBetween: "
|
|
18
|
-
|
|
19
|
-
|
|
15
|
+
removalHelperBeforeUnsubmitted: "Removing duplicates deletes ",
|
|
16
|
+
removalHelperUnsubmitted: "bills not yet submitted",
|
|
17
|
+
removalHelperBetween: ", and cancels ",
|
|
18
|
+
removalHelperSubmitted: "ones already submitted",
|
|
19
|
+
removalHelperAfterSubmitted: ". This action cannot be undone.",
|
|
20
|
+
removalOutcomeDelete: "Deletes this bill",
|
|
21
|
+
removalOutcomeCancel: "Cancels this bill",
|
|
20
22
|
keepSelectedButton: "Keep selected files as their own file",
|
|
21
23
|
removeDuplicatesButton: "Remove selected duplicates",
|
|
22
24
|
emptyState: "No possible duplicates left to review.",
|
package/dist/libs/tesouro-embedded-components-react/card-details-widget/feature/dist/index13.js
CHANGED
|
@@ -17,187 +17,190 @@ import { CardProgramValidity as m, resolveCanRevealCredentials as h, resolveCard
|
|
|
17
17
|
import { activateCardPanelTestIds as ie, cardDetailsPanelTestIds as ae } from "./index6.js";
|
|
18
18
|
import { useCreditCardDetailsQuery as oe } from "../../data-access/dist/index6.js";
|
|
19
19
|
import { useDebitCardCredentialsQuery as se } from "../../data-access/dist/index7.js";
|
|
20
|
-
import { useDebitCardDetailsQuery as
|
|
20
|
+
import { useDebitCardDetailsQuery as g } from "../../data-access/dist/index8.js";
|
|
21
21
|
import "../../data-access/dist/index.js";
|
|
22
|
-
import { CardDetailsPanel as
|
|
23
|
-
import { ActivateCardPanel as
|
|
22
|
+
import { CardDetailsPanel as ce } from "../../ui/dist/lib/CardDetailsPanel/CardDetailsPanel.js";
|
|
23
|
+
import { ActivateCardPanel as le } from "../../ui/dist/lib/ActivateCardPanel/ActivateCardPanel.js";
|
|
24
24
|
import "../../ui/dist/index.js";
|
|
25
25
|
import { useActivateCard as ue } from "./index9.js";
|
|
26
|
-
import { useCardLock as
|
|
27
|
-
import { useEditCardNickname as
|
|
28
|
-
import { useCallback as
|
|
29
|
-
import { Fragment as
|
|
26
|
+
import { useCardLock as de } from "./index11.js";
|
|
27
|
+
import { useEditCardNickname as fe } from "./index12.js";
|
|
28
|
+
import { useCallback as _, useEffect as v, useMemo as y, useState as pe } from "react";
|
|
29
|
+
import { Fragment as b, jsx as x, jsxs as S } from "react/jsx-runtime";
|
|
30
30
|
//#region ../../libs/tesouro-embedded-components-react/card-details-widget/feature/dist/index13.js
|
|
31
|
-
function C({ cardId: r, cardProgram: u, onClose: C, labels: w, activateLabels:
|
|
32
|
-
let
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
}, [
|
|
36
|
-
let
|
|
31
|
+
function C({ cardId: r, cardProgram: u, onClose: C, labels: w, activateLabels: me, featureLabels: T, bankLogoSrc: E, bankLogoAlt: D }) {
|
|
32
|
+
let O = n(), k = o(), A = i(), { initResponse: j } = a();
|
|
33
|
+
v(() => {
|
|
34
|
+
O(l.Mounted);
|
|
35
|
+
}, [O]);
|
|
36
|
+
let M = y(() => c(T), [T]), N = re(u), P = u === s.Credit, F = u === s.Debit, I = oe({
|
|
37
37
|
cardId: r,
|
|
38
|
-
enabled:
|
|
39
|
-
}),
|
|
38
|
+
enabled: P
|
|
39
|
+
}), L = g({
|
|
40
40
|
cardId: r,
|
|
41
|
-
enabled:
|
|
42
|
-
}), { data:
|
|
43
|
-
programValidity:
|
|
44
|
-
isNotFound:
|
|
45
|
-
isError: !!
|
|
46
|
-
hasCard: !!
|
|
41
|
+
enabled: F
|
|
42
|
+
}), { data: R, isError: he, isNotFound: ge, refetch: z } = P ? I : L, B = ee({
|
|
43
|
+
programValidity: N,
|
|
44
|
+
isNotFound: ge,
|
|
45
|
+
isError: !!k || he,
|
|
46
|
+
hasCard: !!R
|
|
47
47
|
});
|
|
48
|
-
|
|
49
|
-
if (
|
|
48
|
+
v(() => {
|
|
49
|
+
if (N === m.Supported) return;
|
|
50
50
|
let e = `"${s.Credit}" or "${s.Debit}"`;
|
|
51
|
-
console.error(
|
|
52
|
-
}, [u,
|
|
53
|
-
let [
|
|
54
|
-
|
|
55
|
-
|
|
51
|
+
console.error(N === m.Missing ? `[CardDetailsWidget] cardProgram is required and was not set. Pass ${e} — it selects which card program to read, so there is no default. No card was fetched.` : `[CardDetailsWidget] cardProgram must be ${e}, received ${JSON.stringify(u)}. No card was fetched.`);
|
|
52
|
+
}, [u, N]);
|
|
53
|
+
let [_e, V] = pe(), H = _e === r;
|
|
54
|
+
v(() => {
|
|
55
|
+
V(void 0);
|
|
56
56
|
}, [r]);
|
|
57
|
-
let
|
|
58
|
-
panelState:
|
|
57
|
+
let U = h({
|
|
58
|
+
panelState: B,
|
|
59
59
|
cardProgram: u,
|
|
60
|
-
cardStatus:
|
|
60
|
+
cardStatus: R?.cardStatus
|
|
61
61
|
});
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
}, [
|
|
65
|
-
let
|
|
62
|
+
v(() => {
|
|
63
|
+
H && !U && V(void 0);
|
|
64
|
+
}, [H, U]);
|
|
65
|
+
let W = se({
|
|
66
66
|
cardId: r,
|
|
67
|
-
enabled:
|
|
68
|
-
}),
|
|
69
|
-
isRevealRequested:
|
|
70
|
-
isError:
|
|
71
|
-
hasCredentials: !!
|
|
72
|
-
}),
|
|
73
|
-
card:
|
|
67
|
+
enabled: U && H
|
|
68
|
+
}), G = ne({
|
|
69
|
+
isRevealRequested: H,
|
|
70
|
+
isError: W.isError,
|
|
71
|
+
hasCredentials: !!W.data
|
|
72
|
+
}), K = y(() => B === "loaded" && R ? te({
|
|
73
|
+
card: R,
|
|
74
74
|
cardProgram: u,
|
|
75
|
-
labels:
|
|
75
|
+
labels: M
|
|
76
76
|
}) : void 0, [
|
|
77
|
-
|
|
77
|
+
R,
|
|
78
78
|
u,
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
]),
|
|
82
|
-
await d(t) && (e.success(
|
|
83
|
-
}, [
|
|
79
|
+
M,
|
|
80
|
+
B
|
|
81
|
+
]), ve = _(async (t) => {
|
|
82
|
+
await d(t) && (e.success(M.copySuccessToast), O(l.ValueCopied));
|
|
83
|
+
}, [M.copySuccessToast, O]), q = B === "loaded" ? R : void 0, J = ue({
|
|
84
84
|
cardId: r,
|
|
85
85
|
cardProgram: u,
|
|
86
|
-
card:
|
|
87
|
-
scopes:
|
|
88
|
-
conflictToast:
|
|
89
|
-
}),
|
|
86
|
+
card: q,
|
|
87
|
+
scopes: j?.scopes,
|
|
88
|
+
conflictToast: M.activationConflictToast
|
|
89
|
+
}), Y = de({
|
|
90
90
|
cardId: r,
|
|
91
91
|
cardProgram: u,
|
|
92
|
-
card:
|
|
93
|
-
scopes:
|
|
94
|
-
conflictToast:
|
|
95
|
-
}),
|
|
92
|
+
card: q,
|
|
93
|
+
scopes: j?.scopes,
|
|
94
|
+
conflictToast: M.lockConflictToast
|
|
95
|
+
}), X = fe({
|
|
96
96
|
cardId: r,
|
|
97
97
|
cardProgram: u,
|
|
98
|
-
card:
|
|
99
|
-
nickname:
|
|
100
|
-
scopes:
|
|
101
|
-
conflictToast:
|
|
102
|
-
successToast:
|
|
103
|
-
}), { refetch:
|
|
104
|
-
if (
|
|
105
|
-
|
|
98
|
+
card: q,
|
|
99
|
+
nickname: K?.nickname,
|
|
100
|
+
scopes: j?.scopes,
|
|
101
|
+
conflictToast: M.nicknameConflictToast,
|
|
102
|
+
successToast: M.nicknameUpdatedToast
|
|
103
|
+
}), { refetch: Z } = W, ye = _(() => {
|
|
104
|
+
if (H) {
|
|
105
|
+
Z();
|
|
106
106
|
return;
|
|
107
107
|
}
|
|
108
|
-
|
|
108
|
+
V(r);
|
|
109
109
|
}, [
|
|
110
110
|
r,
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
]),
|
|
114
|
-
|
|
115
|
-
}, []),
|
|
116
|
-
|
|
117
|
-
}, [C]), xe =
|
|
111
|
+
H,
|
|
112
|
+
Z
|
|
113
|
+
]), be = _(() => {
|
|
114
|
+
V(void 0);
|
|
115
|
+
}, []), Q = _(() => {
|
|
116
|
+
V(void 0), C?.();
|
|
117
|
+
}, [C]), xe = _(() => {
|
|
118
|
+
J.close(), Q();
|
|
119
|
+
}, [J.close, Q]), Se = y(() => W.isForbidden ? {
|
|
118
120
|
...w,
|
|
119
121
|
credentials: {
|
|
120
122
|
...w?.credentials,
|
|
121
|
-
errorDescription:
|
|
123
|
+
errorDescription: M.revealNotPermittedDescription
|
|
122
124
|
}
|
|
123
125
|
} : w, [
|
|
124
|
-
|
|
126
|
+
W.isForbidden,
|
|
125
127
|
w,
|
|
126
|
-
|
|
127
|
-
]), $ =
|
|
128
|
-
if (!(
|
|
129
|
-
cardNumber: f(
|
|
130
|
-
expirationDate: p(
|
|
131
|
-
securityCode:
|
|
128
|
+
M.revealNotPermittedDescription
|
|
129
|
+
]), $ = y(() => {
|
|
130
|
+
if (!(G !== "revealed" || !W.data)) return {
|
|
131
|
+
cardNumber: f(W.data.pan),
|
|
132
|
+
expirationDate: p(W.data.expirationDate),
|
|
133
|
+
securityCode: W.data.cvv
|
|
132
134
|
};
|
|
133
|
-
}, [
|
|
134
|
-
if (
|
|
135
|
-
|
|
135
|
+
}, [W.data, G]), Ce = _(() => {
|
|
136
|
+
if (k) {
|
|
137
|
+
A();
|
|
136
138
|
return;
|
|
137
139
|
}
|
|
138
|
-
|
|
140
|
+
z();
|
|
139
141
|
}, [
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
142
|
+
z,
|
|
143
|
+
A,
|
|
144
|
+
k
|
|
143
145
|
]);
|
|
144
|
-
return /* @__PURE__ */
|
|
146
|
+
return /* @__PURE__ */ S(b, { children: [/* @__PURE__ */ x(t, {}), J.isOpen ? /* @__PURE__ */ x(le, {
|
|
145
147
|
testIds: ie,
|
|
146
|
-
labels:
|
|
147
|
-
state:
|
|
148
|
-
values:
|
|
149
|
-
errors:
|
|
150
|
-
isSubmitDisabled:
|
|
151
|
-
onValuesChange:
|
|
152
|
-
onSubmit:
|
|
153
|
-
onClose:
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
148
|
+
labels: me,
|
|
149
|
+
state: J.state,
|
|
150
|
+
values: J.values,
|
|
151
|
+
errors: J.errors,
|
|
152
|
+
isSubmitDisabled: J.isSubmitDisabled,
|
|
153
|
+
onValuesChange: J.onValuesChange,
|
|
154
|
+
onSubmit: J.onSubmit,
|
|
155
|
+
onClose: J.close,
|
|
156
|
+
onDone: C ? xe : void 0,
|
|
157
|
+
bankLogoSrc: E,
|
|
158
|
+
bankLogoAlt: D,
|
|
159
|
+
cardholderName: K?.cardholderName,
|
|
160
|
+
maskedCardNumber: K?.maskedCardNumber,
|
|
161
|
+
programLabel: K?.programLabel
|
|
162
|
+
}) : /* @__PURE__ */ x(ce, {
|
|
160
163
|
testIds: ae,
|
|
161
|
-
labels:
|
|
162
|
-
state:
|
|
163
|
-
nickname:
|
|
164
|
-
statusLabel:
|
|
165
|
-
statusTone:
|
|
166
|
-
formFactorLabel:
|
|
167
|
-
onClose: C ?
|
|
168
|
-
bankLogoSrc:
|
|
169
|
-
bankLogoAlt:
|
|
170
|
-
cardholderName:
|
|
171
|
-
maskedCardNumber:
|
|
172
|
-
programLabel:
|
|
173
|
-
billingAddress:
|
|
174
|
-
allowedCategories:
|
|
175
|
-
spendLimitLabels:
|
|
176
|
-
perTransactionMaxLabel:
|
|
177
|
-
onCopy:
|
|
178
|
-
onEditNickname:
|
|
179
|
-
nicknameEditState:
|
|
180
|
-
nicknameDraft:
|
|
181
|
-
onNicknameDraftChange:
|
|
182
|
-
onSaveNickname:
|
|
183
|
-
onCancelNicknameEdit:
|
|
184
|
-
isNicknameSaveDisabled:
|
|
185
|
-
onActivate:
|
|
186
|
-
onViewCard:
|
|
187
|
-
onHideCard:
|
|
188
|
-
revealState:
|
|
164
|
+
labels: Se,
|
|
165
|
+
state: B,
|
|
166
|
+
nickname: K?.nickname,
|
|
167
|
+
statusLabel: K?.statusLabel,
|
|
168
|
+
statusTone: K?.statusTone,
|
|
169
|
+
formFactorLabel: K?.formFactorLabel,
|
|
170
|
+
onClose: C ? Q : void 0,
|
|
171
|
+
bankLogoSrc: E,
|
|
172
|
+
bankLogoAlt: D,
|
|
173
|
+
cardholderName: K?.cardholderName,
|
|
174
|
+
maskedCardNumber: K?.maskedCardNumber,
|
|
175
|
+
programLabel: K?.programLabel,
|
|
176
|
+
billingAddress: K?.billingAddress,
|
|
177
|
+
allowedCategories: K?.allowedCategories,
|
|
178
|
+
spendLimitLabels: K?.spendLimitLabels,
|
|
179
|
+
perTransactionMaxLabel: K?.perTransactionMaxLabel,
|
|
180
|
+
onCopy: ve,
|
|
181
|
+
onEditNickname: X.onEditNickname,
|
|
182
|
+
nicknameEditState: X.editState,
|
|
183
|
+
nicknameDraft: X.draft,
|
|
184
|
+
onNicknameDraftChange: X.onDraftChange,
|
|
185
|
+
onSaveNickname: X.onSave,
|
|
186
|
+
onCancelNicknameEdit: X.onCancel,
|
|
187
|
+
isNicknameSaveDisabled: X.isSaveDisabled,
|
|
188
|
+
onActivate: J.canActivate ? J.open : void 0,
|
|
189
|
+
onViewCard: U ? ye : void 0,
|
|
190
|
+
onHideCard: U ? be : void 0,
|
|
191
|
+
revealState: G,
|
|
189
192
|
revealedCardNumber: $?.cardNumber,
|
|
190
193
|
revealedExpirationDate: $?.expirationDate,
|
|
191
194
|
revealedSecurityCode: $?.securityCode,
|
|
192
|
-
isLocked:
|
|
193
|
-
lockState:
|
|
194
|
-
onLockCard:
|
|
195
|
-
onUnlockCard:
|
|
196
|
-
onRetry:
|
|
195
|
+
isLocked: Y.isLocked,
|
|
196
|
+
lockState: Y.lockState,
|
|
197
|
+
onLockCard: Y.onLockCard,
|
|
198
|
+
onUnlockCard: Y.onUnlockCard,
|
|
199
|
+
onRetry: N === m.Supported ? Ce : void 0
|
|
197
200
|
})] });
|
|
198
201
|
}
|
|
199
202
|
function w({ baseUrl: e, widgetToken: t, organizationId: n, configClient: i, gatewayRouting: a, linkComponent: o, implementation: s, uiFramework: c, errorFallback: l, onError: d, analytics: f, disclosuresAcceptance: p, providerLabels: m, ...h }) {
|
|
200
|
-
return /* @__PURE__ */
|
|
203
|
+
return /* @__PURE__ */ x(r, {
|
|
201
204
|
widgetName: u,
|
|
202
205
|
baseUrl: e,
|
|
203
206
|
widgetToken: t,
|
|
@@ -212,7 +215,7 @@ function w({ baseUrl: e, widgetToken: t, organizationId: n, configClient: i, gat
|
|
|
212
215
|
analytics: f,
|
|
213
216
|
disclosuresAcceptance: p,
|
|
214
217
|
providerLabels: m,
|
|
215
|
-
children: /* @__PURE__ */
|
|
218
|
+
children: /* @__PURE__ */ x(C, { ...h })
|
|
216
219
|
});
|
|
217
220
|
}
|
|
218
221
|
//#endregion
|
|
@@ -23,68 +23,69 @@ function O(e, t) {
|
|
|
23
23
|
default: return;
|
|
24
24
|
}
|
|
25
25
|
}
|
|
26
|
-
function k({ labels: p, state: m = "idle", values: k = h, onValuesChange: A, errors: j = D, isSubmitDisabled: M = !0, onSubmit: N, onClose: P,
|
|
27
|
-
let
|
|
26
|
+
function k({ labels: p, state: m = "idle", values: k = h, onValuesChange: A, errors: j = D, isSubmitDisabled: M = !0, onSubmit: N, onClose: P, onDone: F, bankLogoSrc: I, bankLogoAlt: L, cardholderName: R, maskedCardNumber: z, programLabel: B, testIds: V, className: H }) {
|
|
27
|
+
let U = x(() => f(p), [p]), W = b(), G = b(), K = b(), q = b(), J = m === "submitting", Y = O(j.expirationDate, U.validation), X = O(j.form, U.validation);
|
|
28
28
|
return /* @__PURE__ */ C("div", {
|
|
29
|
-
"data-testid":
|
|
30
|
-
className: l("ttw:flex ttw:w-full ttw:flex-col",
|
|
29
|
+
"data-testid": V?.root,
|
|
30
|
+
className: l("ttw:flex ttw:w-full ttw:flex-col", H),
|
|
31
31
|
children: [/* @__PURE__ */ C("div", {
|
|
32
32
|
className: "ttw:flex ttw:items-start ttw:gap-1.5 ttw:px-4 ttw:pt-4 ttw:pb-3",
|
|
33
33
|
children: [/* @__PURE__ */ S("h2", {
|
|
34
34
|
className: "ttw:min-w-0 ttw:flex-1 ttw:text-2xl ttw:font-semibold ttw:tracking-[-0.6px] ttw:text-foreground",
|
|
35
|
-
children:
|
|
35
|
+
children: U.header.title
|
|
36
36
|
}), P ? /* @__PURE__ */ S(e, {
|
|
37
37
|
type: "button",
|
|
38
38
|
variant: "ghost",
|
|
39
39
|
size: "icon",
|
|
40
40
|
className: "ttw:size-8 ttw:shrink-0",
|
|
41
|
-
"aria-label":
|
|
41
|
+
"aria-label": U.header.closeAriaLabel,
|
|
42
42
|
onClick: P,
|
|
43
43
|
children: /* @__PURE__ */ S(E, { className: "ttw:size-4" })
|
|
44
44
|
}) : null]
|
|
45
45
|
}), m === "succeeded" ? /* @__PURE__ */ S(v, {
|
|
46
|
-
labels:
|
|
47
|
-
|
|
46
|
+
labels: U.status,
|
|
47
|
+
onDone: F,
|
|
48
|
+
testIds: V?.successView
|
|
48
49
|
}) : /* @__PURE__ */ C("form", {
|
|
49
50
|
noValidate: !0,
|
|
50
51
|
onSubmit: (e) => {
|
|
51
|
-
e.preventDefault(), !(M ||
|
|
52
|
+
e.preventDefault(), !(M || J) && N?.();
|
|
52
53
|
},
|
|
53
54
|
className: "ttw:flex ttw:flex-col ttw:gap-4 ttw:px-4 ttw:pb-4",
|
|
54
55
|
children: [
|
|
55
56
|
/* @__PURE__ */ S("div", {
|
|
56
57
|
className: "ttw:flex ttw:justify-center",
|
|
57
58
|
children: /* @__PURE__ */ S(d, {
|
|
58
|
-
bankLogoSrc:
|
|
59
|
-
bankLogoAlt:
|
|
60
|
-
cardholderName:
|
|
61
|
-
maskedCardNumber:
|
|
62
|
-
programLabel:
|
|
63
|
-
testIds:
|
|
59
|
+
bankLogoSrc: I,
|
|
60
|
+
bankLogoAlt: L ?? U.cardFace.bankLogoAlt,
|
|
61
|
+
cardholderName: R ?? "",
|
|
62
|
+
maskedCardNumber: z ?? "",
|
|
63
|
+
programLabel: B ?? "",
|
|
64
|
+
testIds: V?.cardFace
|
|
64
65
|
})
|
|
65
66
|
}),
|
|
66
67
|
/* @__PURE__ */ C("div", {
|
|
67
68
|
className: "ttw:flex ttw:flex-col ttw:gap-1.5",
|
|
68
69
|
children: [
|
|
69
70
|
/* @__PURE__ */ S(n, {
|
|
70
|
-
htmlFor:
|
|
71
|
+
htmlFor: W,
|
|
71
72
|
className: "ttw:text-sm ttw:font-medium",
|
|
72
|
-
children:
|
|
73
|
+
children: U.fields.expirationDate
|
|
73
74
|
}),
|
|
74
75
|
/* @__PURE__ */ S(t, {
|
|
75
|
-
id:
|
|
76
|
+
id: W,
|
|
76
77
|
value: k.expirationDate,
|
|
77
|
-
placeholder:
|
|
78
|
-
disabled:
|
|
78
|
+
placeholder: U.fields.expirationDatePlaceholder,
|
|
79
|
+
disabled: J,
|
|
79
80
|
inputMode: "numeric",
|
|
80
81
|
autoComplete: "off",
|
|
81
|
-
"aria-invalid":
|
|
82
|
-
"aria-describedby":
|
|
82
|
+
"aria-invalid": Y ? !0 : void 0,
|
|
83
|
+
"aria-describedby": Y ? G : void 0,
|
|
83
84
|
onChange: (e) => A?.({ expirationDate: _(e.target.value) })
|
|
84
85
|
}),
|
|
85
86
|
/* @__PURE__ */ S(y, {
|
|
86
|
-
id:
|
|
87
|
-
message:
|
|
87
|
+
id: G,
|
|
88
|
+
message: Y
|
|
88
89
|
})
|
|
89
90
|
]
|
|
90
91
|
}),
|
|
@@ -94,46 +95,46 @@ function k({ labels: p, state: m = "idle", values: k = h, onValuesChange: A, err
|
|
|
94
95
|
/* @__PURE__ */ C("div", {
|
|
95
96
|
className: "ttw:flex ttw:items-center ttw:gap-1.5",
|
|
96
97
|
children: [/* @__PURE__ */ S(n, {
|
|
97
|
-
htmlFor:
|
|
98
|
+
htmlFor: K,
|
|
98
99
|
className: "ttw:text-sm ttw:font-medium",
|
|
99
|
-
children:
|
|
100
|
+
children: U.fields.securityCode
|
|
100
101
|
}), /* @__PURE__ */ S(s, { children: /* @__PURE__ */ C(a, { children: [/* @__PURE__ */ S(c, {
|
|
101
102
|
type: "button",
|
|
102
103
|
className: "ttw:inline-flex ttw:shrink-0 ttw:cursor-help ttw:text-muted-foreground",
|
|
103
|
-
"aria-label":
|
|
104
|
+
"aria-label": U.fields.securityCodeInfoAriaLabel,
|
|
104
105
|
children: /* @__PURE__ */ S(T, { className: "ttw:size-4" })
|
|
105
106
|
}), /* @__PURE__ */ S(o, {
|
|
106
107
|
className: "ttw:max-w-xs",
|
|
107
|
-
children:
|
|
108
|
+
children: U.fields.securityCodeInfo
|
|
108
109
|
})] }) })]
|
|
109
110
|
}),
|
|
110
111
|
/* @__PURE__ */ S(t, {
|
|
111
|
-
id:
|
|
112
|
+
id: K,
|
|
112
113
|
value: k.securityCode,
|
|
113
|
-
placeholder:
|
|
114
|
-
"aria-describedby":
|
|
115
|
-
disabled:
|
|
114
|
+
placeholder: U.fields.securityCodePlaceholder,
|
|
115
|
+
"aria-describedby": q,
|
|
116
|
+
disabled: J,
|
|
116
117
|
inputMode: "numeric",
|
|
117
118
|
autoComplete: "off",
|
|
118
119
|
maxLength: 4,
|
|
119
120
|
onChange: (e) => A?.({ securityCode: g(e.target.value, 4) })
|
|
120
121
|
}),
|
|
121
122
|
/* @__PURE__ */ S("span", {
|
|
122
|
-
id:
|
|
123
|
+
id: q,
|
|
123
124
|
className: "ttw:sr-only",
|
|
124
|
-
children:
|
|
125
|
+
children: U.fields.securityCodeInfo
|
|
125
126
|
})
|
|
126
127
|
]
|
|
127
128
|
}),
|
|
128
129
|
/* @__PURE__ */ S(r, {}),
|
|
129
|
-
m === "errored" ||
|
|
130
|
+
m === "errored" || X ? /* @__PURE__ */ S(u, { children: X ?? U.status.errorDescription }) : null,
|
|
130
131
|
/* @__PURE__ */ C(e, {
|
|
131
132
|
type: "submit",
|
|
132
133
|
className: "ttw:w-full",
|
|
133
|
-
disabled: M ||
|
|
134
|
+
disabled: M || J,
|
|
134
135
|
children: [
|
|
135
|
-
|
|
136
|
-
|
|
136
|
+
J ? /* @__PURE__ */ S(i, { "aria-label": U.status.submittingAriaLabel }) : null,
|
|
137
|
+
U.status.submit,
|
|
137
138
|
/* @__PURE__ */ S(w, { className: "ttw:size-4" })
|
|
138
139
|
]
|
|
139
140
|
})
|
|
@@ -1,26 +1,38 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { Button as e } from "../../../../../../../packages/shared-ui-shadcn/dist/index.js";
|
|
2
|
+
import { jsx as t, jsxs as n } from "react/jsx-runtime";
|
|
3
|
+
import { CheckIcon as r, ChevronRightIcon as i } from "lucide-react";
|
|
3
4
|
//#region ../../libs/tesouro-embedded-components-react/card-details-widget/ui/dist/lib/ActivateCardPanel/ActivateCardSuccessView.js
|
|
4
|
-
function
|
|
5
|
-
return /* @__PURE__ */
|
|
6
|
-
"data-testid":
|
|
7
|
-
className: "ttw:flex ttw:flex-col
|
|
8
|
-
children: [
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
5
|
+
function a({ labels: a, onDone: o, testIds: s }) {
|
|
6
|
+
return /* @__PURE__ */ n("div", {
|
|
7
|
+
"data-testid": s?.root,
|
|
8
|
+
className: "ttw:flex ttw:flex-col",
|
|
9
|
+
children: [/* @__PURE__ */ n("div", {
|
|
10
|
+
className: "ttw:flex ttw:flex-col ttw:items-center ttw:gap-3 ttw:px-4 ttw:pt-10 ttw:pb-8 ttw:text-center",
|
|
11
|
+
children: [
|
|
12
|
+
/* @__PURE__ */ t("div", {
|
|
13
|
+
"aria-hidden": "true",
|
|
14
|
+
className: "ttw:flex ttw:size-10 ttw:items-center ttw:justify-center ttw:rounded-lg ttw:bg-emerald-700 ttw:text-white",
|
|
15
|
+
children: /* @__PURE__ */ t(r, { className: "ttw:size-5" })
|
|
16
|
+
}),
|
|
17
|
+
/* @__PURE__ */ t("h3", {
|
|
18
|
+
className: "ttw:text-lg ttw:font-semibold ttw:text-foreground",
|
|
19
|
+
children: a.successTitle
|
|
20
|
+
}),
|
|
21
|
+
/* @__PURE__ */ t("p", {
|
|
22
|
+
className: "ttw:max-w-sm ttw:text-sm ttw:text-muted-foreground",
|
|
23
|
+
children: a.successDescription
|
|
24
|
+
})
|
|
25
|
+
]
|
|
26
|
+
}), o ? /* @__PURE__ */ t("div", {
|
|
27
|
+
className: "ttw:px-4 ttw:pb-4",
|
|
28
|
+
children: /* @__PURE__ */ n(e, {
|
|
29
|
+
type: "button",
|
|
30
|
+
className: "ttw:w-full",
|
|
31
|
+
onClick: o,
|
|
32
|
+
children: [a.done, /* @__PURE__ */ t(i, { className: "ttw:size-4" })]
|
|
21
33
|
})
|
|
22
|
-
]
|
|
34
|
+
}) : null]
|
|
23
35
|
});
|
|
24
36
|
}
|
|
25
37
|
//#endregion
|
|
26
|
-
export {
|
|
38
|
+
export { a as ActivateCardSuccessView };
|
|
@@ -40,7 +40,7 @@ var v = ({ inlineLineItems: v, title: y, onClose: b }) => {
|
|
|
40
40
|
children: [/* @__PURE__ */ h("div", {
|
|
41
41
|
className: "ttw:flex ttw:items-start ttw:justify-between ttw:gap-1.5",
|
|
42
42
|
children: [/* @__PURE__ */ h("div", {
|
|
43
|
-
className: "ttw:flex ttw:flex-col ttw:gap-1",
|
|
43
|
+
className: "ttw:flex ttw:min-w-0 ttw:flex-col ttw:gap-1",
|
|
44
44
|
children: [/* @__PURE__ */ m(o, {
|
|
45
45
|
variant: "h4",
|
|
46
46
|
children: x._("Do you want to also save these items?")
|
|
@@ -52,7 +52,7 @@ var v = ({ inlineLineItems: v, title: y, onClose: b }) => {
|
|
|
52
52
|
}), /* @__PURE__ */ m(n, {
|
|
53
53
|
type: "button",
|
|
54
54
|
variant: "ghost",
|
|
55
|
-
className: "ttw:text-primary ttw:hover:text-primary",
|
|
55
|
+
className: "ttw:shrink-0 ttw:text-primary ttw:hover:text-primary",
|
|
56
56
|
disabled: A,
|
|
57
57
|
onClick: N ? F : P,
|
|
58
58
|
children: N ? x._("Deselect all") : x._("Select all")
|
|
@@ -82,13 +82,16 @@ var v = ({ inlineLineItems: v, title: y, onClose: b }) => {
|
|
|
82
82
|
disabled: A,
|
|
83
83
|
"aria-label": t.product.name
|
|
84
84
|
}), /* @__PURE__ */ h("div", {
|
|
85
|
-
className: "ttw:flex ttw:flex-col ttw:gap-1",
|
|
85
|
+
className: "ttw:flex ttw:min-w-0 ttw:flex-1 ttw:flex-col ttw:gap-1",
|
|
86
86
|
children: [/* @__PURE__ */ m(o, {
|
|
87
87
|
variant: "caption",
|
|
88
|
+
className: "ttw:truncate",
|
|
89
|
+
title: t.product.name,
|
|
88
90
|
children: t.product.name
|
|
89
91
|
}), /* @__PURE__ */ m(o, {
|
|
90
92
|
variant: "caption",
|
|
91
93
|
color: "muted",
|
|
94
|
+
className: "ttw:truncate",
|
|
92
95
|
children: L(t)
|
|
93
96
|
})]
|
|
94
97
|
})]
|
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.4.
|
|
2
|
+
var e = "@tesouro/embedded-components-react", t = "0.4.4", n = "5f9f94fa0e8bab712971e7f419dae870c303fbff", r = Object.freeze({
|
|
3
3
|
library_name: e,
|
|
4
4
|
library_version: t,
|
|
5
5
|
library_sha: n
|