@akinon/pz-masterpass-rest 1.123.0 → 1.124.0-rc.0
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/package.json
CHANGED
|
@@ -204,15 +204,21 @@ const OTPModal: React.FC<OTPModalProps> = ({
|
|
|
204
204
|
>
|
|
205
205
|
<div className="px-6">
|
|
206
206
|
{getTitle() && (
|
|
207
|
-
<h3 className="text-center mt-4 text-lg font-semibold">
|
|
207
|
+
<h3 className="text-center mt-4 text-lg font-semibold">
|
|
208
|
+
{getTitle()}
|
|
209
|
+
</h3>
|
|
208
210
|
)}
|
|
209
|
-
<p className="text-center mt-2 text-sm text-gray-600">
|
|
211
|
+
<p className="text-center mt-2 text-sm text-gray-600">
|
|
212
|
+
{getDescription()}
|
|
213
|
+
</p>
|
|
210
214
|
<div className="flex flex-col gap-3 p-5 w-3/4 m-auto">
|
|
211
215
|
<Input
|
|
212
216
|
type="text"
|
|
213
217
|
value={otp}
|
|
214
218
|
onChange={(e: React.ChangeEvent<HTMLInputElement>) => {
|
|
215
|
-
setOtp(
|
|
219
|
+
setOtp(
|
|
220
|
+
e.target.value.replace(/\D/g, '').slice(0, getMaxLength())
|
|
221
|
+
);
|
|
216
222
|
setError(null);
|
|
217
223
|
}}
|
|
218
224
|
maxLength={getMaxLength()}
|
|
@@ -222,7 +228,9 @@ const OTPModal: React.FC<OTPModalProps> = ({
|
|
|
222
228
|
placeholder={getPlaceholder()}
|
|
223
229
|
/>
|
|
224
230
|
{getHelperText() && (
|
|
225
|
-
<p className="text-xs text-gray-500 text-center">
|
|
231
|
+
<p className="text-xs text-gray-500 text-center">
|
|
232
|
+
{getHelperText()}
|
|
233
|
+
</p>
|
|
226
234
|
)}
|
|
227
235
|
{error && (
|
|
228
236
|
<p className="text-[#d72b01] text-xs text-center">{error}</p>
|
|
@@ -126,7 +126,10 @@ export const useMasterpassAccount = () => {
|
|
|
126
126
|
dispatch(resetState());
|
|
127
127
|
}, [dispatch]);
|
|
128
128
|
|
|
129
|
-
const refreshToken = async (options?: {
|
|
129
|
+
const refreshToken = async (options?: {
|
|
130
|
+
three_d?: boolean;
|
|
131
|
+
skipReset?: boolean;
|
|
132
|
+
}) => {
|
|
130
133
|
if (options?.three_d !== false && !options?.skipReset) {
|
|
131
134
|
resetData();
|
|
132
135
|
}
|
|
@@ -218,8 +221,12 @@ export const useMasterpassAccount = () => {
|
|
|
218
221
|
informationModalData: {
|
|
219
222
|
type: 'warning',
|
|
220
223
|
title: texts?.sessionExpiredTitle || 'Session Expired',
|
|
221
|
-
message:
|
|
222
|
-
|
|
224
|
+
message:
|
|
225
|
+
texts?.sessionExpiredMessage ||
|
|
226
|
+
'Your session has expired due to inactivity. Please restart the process to continue.',
|
|
227
|
+
secondaryMessage:
|
|
228
|
+
texts?.sessionExpiredSecondaryMessage ||
|
|
229
|
+
'For security reasons, verification codes are only valid for a limited time.',
|
|
223
230
|
buttonText: texts?.sessionExpiredButton || 'Start Again'
|
|
224
231
|
}
|
|
225
232
|
})
|