@redneckz/wildless-cms-uni-blocks 0.14.969 → 0.14.971
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/bundle/bundle.umd.js +16 -8
- package/bundle/bundle.umd.min.js +1 -1
- package/bundle/retail/components/NoConsentDialog/NoConsentDialog.d.ts +2 -0
- package/bundle/retail/components/VerifyPhoneDialog/useVerifyPhoneDialogSubmit.d.ts +1 -0
- package/dist/components/ApplicationLeadForm/ApplicationLeadForm.js +1 -0
- package/dist/components/ApplicationLeadForm/ApplicationLeadForm.js.map +1 -1
- package/dist/retail/components/NoConsentDialog/NoConsentDialog.d.ts +2 -0
- package/dist/retail/components/NoConsentDialog/NoConsentDialog.js +7 -2
- package/dist/retail/components/NoConsentDialog/NoConsentDialog.js.map +1 -1
- package/dist/retail/components/VerifyPhoneDialog/VerifyPhoneDialog.js +7 -5
- package/dist/retail/components/VerifyPhoneDialog/VerifyPhoneDialog.js.map +1 -1
- package/dist/retail/components/VerifyPhoneDialog/useVerifyPhoneDialogSubmit.d.ts +1 -0
- package/dist/retail/components/VerifyPhoneDialog/useVerifyPhoneDialogSubmit.js.map +1 -1
- package/lib/components/ApplicationLeadForm/ApplicationLeadForm.js +1 -0
- package/lib/components/ApplicationLeadForm/ApplicationLeadForm.js.map +1 -1
- package/lib/retail/components/NoConsentDialog/NoConsentDialog.d.ts +2 -0
- package/lib/retail/components/NoConsentDialog/NoConsentDialog.js +7 -2
- package/lib/retail/components/NoConsentDialog/NoConsentDialog.js.map +1 -1
- package/lib/retail/components/VerifyPhoneDialog/VerifyPhoneDialog.js +7 -5
- package/lib/retail/components/VerifyPhoneDialog/VerifyPhoneDialog.js.map +1 -1
- package/lib/retail/components/VerifyPhoneDialog/useVerifyPhoneDialogSubmit.d.ts +1 -0
- package/lib/retail/components/VerifyPhoneDialog/useVerifyPhoneDialogSubmit.js.map +1 -1
- package/mobile/bundle/bundle.umd.js +16 -8
- package/mobile/bundle/bundle.umd.min.js +1 -1
- package/mobile/bundle/retail/components/NoConsentDialog/NoConsentDialog.d.ts +2 -0
- package/mobile/bundle/retail/components/VerifyPhoneDialog/useVerifyPhoneDialogSubmit.d.ts +1 -0
- package/mobile/dist/components/ApplicationLeadForm/ApplicationLeadForm.js +1 -0
- package/mobile/dist/components/ApplicationLeadForm/ApplicationLeadForm.js.map +1 -1
- package/mobile/dist/retail/components/NoConsentDialog/NoConsentDialog.d.ts +2 -0
- package/mobile/dist/retail/components/NoConsentDialog/NoConsentDialog.js +7 -2
- package/mobile/dist/retail/components/NoConsentDialog/NoConsentDialog.js.map +1 -1
- package/mobile/dist/retail/components/VerifyPhoneDialog/VerifyPhoneDialog.js +7 -5
- package/mobile/dist/retail/components/VerifyPhoneDialog/VerifyPhoneDialog.js.map +1 -1
- package/mobile/dist/retail/components/VerifyPhoneDialog/useVerifyPhoneDialogSubmit.d.ts +1 -0
- package/mobile/dist/retail/components/VerifyPhoneDialog/useVerifyPhoneDialogSubmit.js.map +1 -1
- package/mobile/lib/components/ApplicationLeadForm/ApplicationLeadForm.js +1 -0
- package/mobile/lib/components/ApplicationLeadForm/ApplicationLeadForm.js.map +1 -1
- package/mobile/lib/retail/components/NoConsentDialog/NoConsentDialog.d.ts +2 -0
- package/mobile/lib/retail/components/NoConsentDialog/NoConsentDialog.js +7 -2
- package/mobile/lib/retail/components/NoConsentDialog/NoConsentDialog.js.map +1 -1
- package/mobile/lib/retail/components/VerifyPhoneDialog/VerifyPhoneDialog.js +7 -5
- package/mobile/lib/retail/components/VerifyPhoneDialog/VerifyPhoneDialog.js.map +1 -1
- package/mobile/lib/retail/components/VerifyPhoneDialog/useVerifyPhoneDialogSubmit.d.ts +1 -0
- package/mobile/lib/retail/components/VerifyPhoneDialog/useVerifyPhoneDialogSubmit.js.map +1 -1
- package/mobile/src/components/ApplicationLeadForm/ApplicationLeadForm.tsx +1 -0
- package/mobile/src/retail/components/NoConsentDialog/NoConsentDialog.tsx +42 -32
- package/mobile/src/retail/components/VerifyPhoneDialog/VerifyPhoneDialog.tsx +8 -5
- package/mobile/src/retail/components/VerifyPhoneDialog/useVerifyPhoneDialogSubmit.tsx +1 -0
- package/package.json +1 -1
- package/src/components/ApplicationLeadForm/ApplicationLeadForm.tsx +1 -0
- package/src/retail/components/NoConsentDialog/NoConsentDialog.fixture.tsx +1 -1
- package/src/retail/components/NoConsentDialog/NoConsentDialog.tsx +42 -32
- package/src/retail/components/VerifyPhoneDialog/VerifyPhoneDialog.tsx +8 -5
- package/src/retail/components/VerifyPhoneDialog/useVerifyPhoneDialogSubmit.tsx +1 -0
package/bundle/bundle.umd.js
CHANGED
|
@@ -3103,7 +3103,12 @@
|
|
|
3103
3103
|
await handler(context);
|
|
3104
3104
|
};
|
|
3105
3105
|
|
|
3106
|
-
const
|
|
3106
|
+
const mapProductTypeToName = {
|
|
3107
|
+
creditCard: 'кредитной карты',
|
|
3108
|
+
debitCard: 'дебетовой карты',
|
|
3109
|
+
credit: 'кредита',
|
|
3110
|
+
};
|
|
3111
|
+
const NoConsentDialog = JSX(({ attempts, productType, onClose = noop }) => {
|
|
3107
3112
|
const navigator = locationNavigator();
|
|
3108
3113
|
const isMaxAttempts = attempts > 1;
|
|
3109
3114
|
const returnToMainPage = useCallback(() => {
|
|
@@ -3117,7 +3122,7 @@
|
|
|
3117
3122
|
onClose();
|
|
3118
3123
|
}
|
|
3119
3124
|
}, [isMaxAttempts]);
|
|
3120
|
-
return (jsx(Dialog, { onClose: handleClose, children: jsxs("div", { className: "flex flex-col gap-xl items-center", children: [jsx(Paragraph, { align: "text-center", children: "\u0423\u0432\u0430\u0436\u0430\u0435\u043C\u044B\u0439 \u043A\u043B\u0438\u0435\u043D\u0442!" }), jsx(Paragraph, { align: "text-center", children:
|
|
3125
|
+
return (jsx(Dialog, { onClose: handleClose, children: jsxs("div", { className: "flex flex-col gap-xl items-center", children: [jsx(Paragraph, { align: "text-center", children: "\u0423\u0432\u0430\u0436\u0430\u0435\u043C\u044B\u0439 \u043A\u043B\u0438\u0435\u043D\u0442!" }), jsx(Paragraph, { align: "text-center", children: `Для получения ${mapProductTypeToName[productType]} Вам необходимо обратиться в офис Банка` }), jsxs("div", { className: "flex flex-col sm:flex-row gap-xl items-center", children: [jsx(Button, { type: "button", version: "secondary", onClick: returnToMainPage, children: "\u0417\u0430\u0432\u0435\u0440\u0448\u0438\u0442\u044C" }), isMaxAttempts ? null : (jsx(Button, { type: "button", onClick: onClose, children: "\u041F\u0440\u043E\u0434\u043E\u043B\u0436\u0438\u0442\u044C" }))] })] }) }));
|
|
3121
3126
|
});
|
|
3122
3127
|
|
|
3123
3128
|
function copy(source, target) {
|
|
@@ -6130,10 +6135,7 @@
|
|
|
6130
6135
|
setTimeNextReq(TIME_TO_RESEND);
|
|
6131
6136
|
restartTimer(TIME_TO_RESEND);
|
|
6132
6137
|
setErrorText('');
|
|
6133
|
-
sessionStore.smsCode =
|
|
6134
|
-
sendTime: Date.now(),
|
|
6135
|
-
attempts: 0,
|
|
6136
|
-
};
|
|
6138
|
+
sessionStore.smsCode = getDefaultSmsCodeParams(phoneNumber);
|
|
6137
6139
|
}
|
|
6138
6140
|
else if (response.status === 429) {
|
|
6139
6141
|
captchaDialog.open({ phoneNumber, sendCode: handleSendCode });
|
|
@@ -6143,12 +6145,17 @@
|
|
|
6143
6145
|
}
|
|
6144
6146
|
}, [phoneNumber, restartTimer]);
|
|
6145
6147
|
useEffect(() => {
|
|
6146
|
-
if (!sessionStore.smsCode?.sendTime) {
|
|
6148
|
+
if (!sessionStore.smsCode?.sendTime || sessionStore.smsCode?.phoneNumber !== phoneNumber) {
|
|
6147
6149
|
handleSendCode();
|
|
6148
6150
|
}
|
|
6149
6151
|
}, []);
|
|
6150
6152
|
return (jsx(VerifyPhoneDialogLayout, { isSubmitButtonDisabled: isSubmitButtonDisabled, onSubmit: handleSubmit, onSendCode: handleSendCode, timeNextReq: timeNextReq, values: values, onChange: setValues, phone: phone, isLoading: isLoading, errorText: errorText, hasError: hasError, onClose: onClose, children: renderDescription$2(consents, withDescription) }));
|
|
6151
6153
|
});
|
|
6154
|
+
const getDefaultSmsCodeParams = (phoneNumber) => ({
|
|
6155
|
+
sendTime: Date.now(),
|
|
6156
|
+
attempts: 0,
|
|
6157
|
+
phoneNumber: phoneNumber,
|
|
6158
|
+
});
|
|
6152
6159
|
const renderDescription$2 = (consents, isRender = false) => isRender ? (jsxs(RichText, { itemSize: "list-s", children: [jsx("span", { children: "\u0412\u0432\u043E\u0434\u044F \u043A\u043E\u0434, \u044F \u043F\u043E\u0434\u0442\u0432\u0435\u0440\u0436\u0434\u0430\u044E, \u0447\u0442\u043E \u043E\u0437\u043D\u0430\u043A\u043E\u043C\u043B\u0435\u043D \u0438 \u043F\u043E\u0434\u043F\u0438\u0441\u044B\u0432\u0430\u044E: " }), jsx("ul", { children: consents?.map((_, i) => (jsx("li", { children: _ }, `${_}-${i}`))) })] })) : null;
|
|
6153
6160
|
|
|
6154
6161
|
const defaultConsentText = {
|
|
@@ -7363,6 +7370,7 @@
|
|
|
7363
7370
|
setAttemptsWithoutConsents((prev) => prev + 1);
|
|
7364
7371
|
attemptsWithoutConsents > 0 &&
|
|
7365
7372
|
noConsentDialog.open({
|
|
7373
|
+
productType,
|
|
7366
7374
|
attempts: attemptsWithoutConsents,
|
|
7367
7375
|
});
|
|
7368
7376
|
}
|
|
@@ -13051,7 +13059,7 @@
|
|
|
13051
13059
|
slots: () => [HEADER_SLOT, FOOTER_SLOT, STICKY_FOOTER_SLOT],
|
|
13052
13060
|
});
|
|
13053
13061
|
|
|
13054
|
-
const packageVersion = "0.14.
|
|
13062
|
+
const packageVersion = "0.14.970";
|
|
13055
13063
|
|
|
13056
13064
|
exports.Blocks = Blocks;
|
|
13057
13065
|
exports.ContentPage = ContentPage;
|