@redneckz/wildless-cms-uni-blocks 0.14.736 → 0.14.737
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 +8 -5
- package/bundle/bundle.umd.min.js +1 -1
- package/dist/ui-kit/CaptchaDialog/CaptchaDialog.js +8 -3
- package/dist/ui-kit/CaptchaDialog/CaptchaDialog.js.map +1 -1
- package/dist/ui-kit/VerifyPhoneDialog/VerifyPhoneDialog.js +1 -1
- package/dist/ui-kit/VerifyPhoneDialog/VerifyPhoneDialog.js.map +1 -1
- package/lib/ui-kit/CaptchaDialog/CaptchaDialog.js +8 -3
- package/lib/ui-kit/CaptchaDialog/CaptchaDialog.js.map +1 -1
- package/lib/ui-kit/VerifyPhoneDialog/VerifyPhoneDialog.js +1 -1
- package/lib/ui-kit/VerifyPhoneDialog/VerifyPhoneDialog.js.map +1 -1
- package/mobile/bundle/bundle.umd.js +8 -5
- package/mobile/bundle/bundle.umd.min.js +1 -1
- package/mobile/dist/ui-kit/CaptchaDialog/CaptchaDialog.js +8 -3
- package/mobile/dist/ui-kit/CaptchaDialog/CaptchaDialog.js.map +1 -1
- package/mobile/dist/ui-kit/VerifyPhoneDialog/VerifyPhoneDialog.js +1 -1
- package/mobile/dist/ui-kit/VerifyPhoneDialog/VerifyPhoneDialog.js.map +1 -1
- package/mobile/lib/ui-kit/CaptchaDialog/CaptchaDialog.js +8 -3
- package/mobile/lib/ui-kit/CaptchaDialog/CaptchaDialog.js.map +1 -1
- package/mobile/lib/ui-kit/VerifyPhoneDialog/VerifyPhoneDialog.js +1 -1
- package/mobile/lib/ui-kit/VerifyPhoneDialog/VerifyPhoneDialog.js.map +1 -1
- package/mobile/src/ui-kit/CaptchaDialog/CaptchaDialog.tsx +8 -2
- package/mobile/src/ui-kit/VerifyPhoneDialog/VerifyPhoneDialog.tsx +1 -1
- package/package.json +1 -1
- package/src/ui-kit/CaptchaDialog/CaptchaDialog.tsx +8 -2
- package/src/ui-kit/VerifyPhoneDialog/VerifyPhoneDialog.tsx +1 -1
package/bundle/bundle.umd.js
CHANGED
|
@@ -4573,21 +4573,24 @@
|
|
|
4573
4573
|
const [captcha, setCaptcha] = useState('');
|
|
4574
4574
|
const [code, setCode] = useState('');
|
|
4575
4575
|
const [hasError, setHasError] = useState(false);
|
|
4576
|
+
const [isLoading, { setTrue: startLoading, setFalse: endLoading }] = useBool(false);
|
|
4576
4577
|
const handleCheckCaptcha = useCallback(async () => {
|
|
4578
|
+
startLoading();
|
|
4577
4579
|
const isValidCode = await checkCaptcha({ captchaText: code });
|
|
4578
4580
|
if (isValidCode) {
|
|
4579
|
-
sendCode?.();
|
|
4580
4581
|
onClose?.();
|
|
4582
|
+
sendCode?.();
|
|
4581
4583
|
}
|
|
4582
4584
|
else {
|
|
4583
|
-
setHasError(
|
|
4585
|
+
setHasError(true);
|
|
4584
4586
|
}
|
|
4587
|
+
endLoading();
|
|
4585
4588
|
}, [code, sendCode]);
|
|
4586
4589
|
const handleCreateCaptcha = useCallback(() => {
|
|
4587
4590
|
(async () => setCaptcha(URL.createObjectURL(await createCaptcha(phoneNumber))))();
|
|
4588
4591
|
}, []);
|
|
4589
4592
|
useEffect(handleCreateCaptcha, []);
|
|
4590
|
-
return (jsx(Dialog, { className: "my-6xl max-w-lg w-full min-h-fit mx-auto rounded-lg", head: jsx(Logo, {}), onClose: onClose, children: jsxs("div", { className: "flex flex-col gap-lg items-center rounded-md", children: [jsxs("div", { className: "flex h-36 w-72", children: [jsx("img", { className: "grow", src: captcha }), jsx("div", { onClick: handleCreateCaptcha, className: "flex w-8 items-center justify-center cursor-pointer", children: jsx(Icon, { iconVersion: "normal", name: "RefreshIcon" }) })] }), jsx(Input, { className: "w-[300px]", onChange: setCode, value: code, placeholder: "\u0412\u0432\u0435\u0434\u0438\u0442\u0435 \u043A\u043E\u0434 \u0441 \u043A\u0430\u0440\u0442\u0438\u043D\u043A\u0438" }), hasError ? jsx("div", { className: "text-error", children: "\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u043A\u043E\u0434" }) : null, jsxs("div", { className: "flex w-[310px] justify-between", children: [jsx(Button, { onClick: close, version: "secondary", children: "\u0412\u0435\u0440\u043D\u0443\u0442\u044C\u0441\u044F" }), jsx(Button, { type: "submit", disabled: !code, onClick: handleCheckCaptcha, version: "secondary", children: "\u041E\u0442\u043F\u0440\u0430\u0432\u0438\u0442\u044C" })] })] }) }));
|
|
4593
|
+
return (jsx(Dialog, { className: "my-6xl max-w-lg w-full min-h-fit mx-auto rounded-lg", head: jsx(Logo, {}), onClose: onClose, children: jsxs("div", { className: "flex flex-col gap-lg items-center rounded-md", children: [jsxs("div", { className: "flex h-36 w-72", children: [jsx("img", { className: "grow", src: captcha }), jsx("div", { onClick: handleCreateCaptcha, className: "flex w-8 items-center justify-center cursor-pointer", children: jsx(Icon, { iconVersion: "normal", name: "RefreshIcon" }) })] }), jsx(Input, { className: "w-[300px]", onChange: setCode, value: code, placeholder: "\u0412\u0432\u0435\u0434\u0438\u0442\u0435 \u043A\u043E\u0434 \u0441 \u043A\u0430\u0440\u0442\u0438\u043D\u043A\u0438" }), hasError ? jsx("div", { className: "text-error", children: "\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u043A\u043E\u0434" }) : null, jsxs("div", { className: "flex w-[310px] justify-between", children: [jsx(Button, { onClick: close, version: "secondary", children: "\u0412\u0435\u0440\u043D\u0443\u0442\u044C\u0441\u044F" }), jsx(Button, { type: "submit", disabled: !code, onClick: handleCheckCaptcha, version: "secondary", children: "\u041E\u0442\u043F\u0440\u0430\u0432\u0438\u0442\u044C" })] }), isLoading ? jsx(Loader, { blur: false }) : null] }) }));
|
|
4591
4594
|
});
|
|
4592
4595
|
|
|
4593
4596
|
const Timer = JSX(({ time, setTime, className }) => {
|
|
@@ -4723,7 +4726,7 @@
|
|
|
4723
4726
|
setIsTimerStarted(true);
|
|
4724
4727
|
}
|
|
4725
4728
|
else {
|
|
4726
|
-
captchaDialog.open({ phoneNumber, sendCode: handleSendCode
|
|
4729
|
+
captchaDialog.open({ phoneNumber, sendCode: handleSendCode });
|
|
4727
4730
|
}
|
|
4728
4731
|
}, [phoneNumber, onClose]);
|
|
4729
4732
|
useEffect(() => {
|
|
@@ -10428,7 +10431,7 @@
|
|
|
10428
10431
|
slots: () => [HEADER_SLOT, FOOTER_SLOT, STICKY_FOOTER_SLOT],
|
|
10429
10432
|
});
|
|
10430
10433
|
|
|
10431
|
-
const packageVersion = "0.14.
|
|
10434
|
+
const packageVersion = "0.14.736";
|
|
10432
10435
|
|
|
10433
10436
|
exports.Blocks = Blocks;
|
|
10434
10437
|
exports.ContentPage = ContentPage;
|