@tesouro/embedded-components-react 0.4.2 → 0.4.5
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/data-access/dist/index.js +8 -8
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index10.js +50 -29
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index11.js +39 -30
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index12.js +26 -311
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index13.js +326 -12
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index14.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index15.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index4.js +13 -27
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index5.js +28 -245
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index6.js +256 -92
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index7.js +86 -73
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index8.js +77 -14
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index9.js +18 -63
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index10.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index14.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index22.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index29.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index3.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index30.js +1 -1
- 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/index32.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index33.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index35.js +1 -1
- 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/index42.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index46.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index50.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index53.js +2 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index54.js +4 -3
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index58.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index65.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index7.js +1 -1
- 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/index76.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index9.js +2 -1
- 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/bill-pay-widget/ui/dist/index97.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index98.js +32 -27
- 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/shared/feature/dist/lib/analytics/build-info.js +1 -1
- package/package.json +1 -1
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 };
|
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.5", n = "8e167254e3d8cfa7777a923bbd458c5f8aea8ab0", r = Object.freeze({
|
|
3
3
|
library_name: e,
|
|
4
4
|
library_version: t,
|
|
5
5
|
library_sha: n
|