@redneckz/wildless-cms-uni-blocks 0.14.990 → 0.14.992
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/api/LeadServiceAPI.d.ts +2 -1
- package/bundle/bundle.umd.js +67 -10
- package/bundle/bundle.umd.min.js +1 -1
- package/bundle/retail/utils/autoLayoutKeyboard.d.ts +1 -0
- package/dist/api/LeadServiceAPI.d.ts +2 -1
- package/dist/api/LeadServiceAPI.js +3 -2
- package/dist/api/LeadServiceAPI.js.map +1 -1
- package/dist/components/ApplicationForm/useVerifyPhoneDialogSubmit.js +3 -0
- package/dist/components/ApplicationForm/useVerifyPhoneDialogSubmit.js.map +1 -1
- package/dist/retail/components/CaptchaDialog/CaptchaDialog.js +1 -1
- package/dist/retail/components/CaptchaDialog/CaptchaDialog.js.map +1 -1
- package/dist/retail/components/Fields/MiddleNameField.js +4 -2
- package/dist/retail/components/Fields/MiddleNameField.js.map +1 -1
- package/dist/retail/components/Fields/NameField.js +4 -2
- package/dist/retail/components/Fields/NameField.js.map +1 -1
- package/dist/retail/components/Fields/SurnameField.js +4 -2
- package/dist/retail/components/Fields/SurnameField.js.map +1 -1
- package/dist/retail/utils/autoLayoutKeyboard.d.ts +1 -0
- package/dist/retail/utils/autoLayoutKeyboard.js +54 -0
- package/dist/retail/utils/autoLayoutKeyboard.js.map +1 -0
- package/lib/api/LeadServiceAPI.d.ts +2 -1
- package/lib/api/LeadServiceAPI.js +3 -2
- package/lib/api/LeadServiceAPI.js.map +1 -1
- package/lib/components/ApplicationForm/useVerifyPhoneDialogSubmit.js +3 -0
- package/lib/components/ApplicationForm/useVerifyPhoneDialogSubmit.js.map +1 -1
- package/lib/retail/components/CaptchaDialog/CaptchaDialog.js +1 -1
- package/lib/retail/components/CaptchaDialog/CaptchaDialog.js.map +1 -1
- package/lib/retail/components/Fields/MiddleNameField.js +4 -2
- package/lib/retail/components/Fields/MiddleNameField.js.map +1 -1
- package/lib/retail/components/Fields/NameField.js +4 -2
- package/lib/retail/components/Fields/NameField.js.map +1 -1
- package/lib/retail/components/Fields/SurnameField.js +4 -2
- package/lib/retail/components/Fields/SurnameField.js.map +1 -1
- package/lib/retail/utils/autoLayoutKeyboard.d.ts +1 -0
- package/lib/retail/utils/autoLayoutKeyboard.js +51 -0
- package/lib/retail/utils/autoLayoutKeyboard.js.map +1 -0
- package/mobile/bundle/api/LeadServiceAPI.d.ts +2 -1
- package/mobile/bundle/bundle.umd.js +67 -10
- package/mobile/bundle/bundle.umd.min.js +1 -1
- package/mobile/bundle/retail/utils/autoLayoutKeyboard.d.ts +1 -0
- package/mobile/dist/api/LeadServiceAPI.d.ts +2 -1
- package/mobile/dist/api/LeadServiceAPI.js +3 -2
- package/mobile/dist/api/LeadServiceAPI.js.map +1 -1
- package/mobile/dist/components/ApplicationForm/useVerifyPhoneDialogSubmit.js +3 -0
- package/mobile/dist/components/ApplicationForm/useVerifyPhoneDialogSubmit.js.map +1 -1
- package/mobile/dist/retail/components/CaptchaDialog/CaptchaDialog.js +1 -1
- package/mobile/dist/retail/components/CaptchaDialog/CaptchaDialog.js.map +1 -1
- package/mobile/dist/retail/components/Fields/MiddleNameField.js +4 -2
- package/mobile/dist/retail/components/Fields/MiddleNameField.js.map +1 -1
- package/mobile/dist/retail/components/Fields/NameField.js +4 -2
- package/mobile/dist/retail/components/Fields/NameField.js.map +1 -1
- package/mobile/dist/retail/components/Fields/SurnameField.js +4 -2
- package/mobile/dist/retail/components/Fields/SurnameField.js.map +1 -1
- package/mobile/dist/retail/utils/autoLayoutKeyboard.d.ts +1 -0
- package/mobile/dist/retail/utils/autoLayoutKeyboard.js +54 -0
- package/mobile/dist/retail/utils/autoLayoutKeyboard.js.map +1 -0
- package/mobile/lib/api/LeadServiceAPI.d.ts +2 -1
- package/mobile/lib/api/LeadServiceAPI.js +3 -2
- package/mobile/lib/api/LeadServiceAPI.js.map +1 -1
- package/mobile/lib/components/ApplicationForm/useVerifyPhoneDialogSubmit.js +3 -0
- package/mobile/lib/components/ApplicationForm/useVerifyPhoneDialogSubmit.js.map +1 -1
- package/mobile/lib/retail/components/CaptchaDialog/CaptchaDialog.js +1 -1
- package/mobile/lib/retail/components/CaptchaDialog/CaptchaDialog.js.map +1 -1
- package/mobile/lib/retail/components/Fields/MiddleNameField.js +4 -2
- package/mobile/lib/retail/components/Fields/MiddleNameField.js.map +1 -1
- package/mobile/lib/retail/components/Fields/NameField.js +4 -2
- package/mobile/lib/retail/components/Fields/NameField.js.map +1 -1
- package/mobile/lib/retail/components/Fields/SurnameField.js +4 -2
- package/mobile/lib/retail/components/Fields/SurnameField.js.map +1 -1
- package/mobile/lib/retail/utils/autoLayoutKeyboard.d.ts +1 -0
- package/mobile/lib/retail/utils/autoLayoutKeyboard.js +51 -0
- package/mobile/lib/retail/utils/autoLayoutKeyboard.js.map +1 -0
- package/mobile/src/api/LeadServiceAPI.ts +9 -2
- package/mobile/src/components/ApplicationForm/useVerifyPhoneDialogSubmit.tsx +3 -0
- package/mobile/src/retail/components/CaptchaDialog/CaptchaDialog.tsx +1 -1
- package/mobile/src/retail/components/Fields/MiddleNameField.tsx +4 -2
- package/mobile/src/retail/components/Fields/NameField.tsx +4 -2
- package/mobile/src/retail/components/Fields/SurnameField.tsx +5 -2
- package/mobile/src/retail/utils/autoLayoutKeyboard.ts +57 -0
- package/package.json +1 -1
- package/src/api/LeadServiceAPI.ts +9 -2
- package/src/components/ApplicationForm/useVerifyPhoneDialogSubmit.tsx +3 -0
- package/src/retail/components/CaptchaDialog/CaptchaDialog.tsx +1 -1
- package/src/retail/components/Fields/MiddleNameField.tsx +4 -2
- package/src/retail/components/Fields/NameField.tsx +4 -2
- package/src/retail/components/Fields/SurnameField.tsx +5 -2
- package/src/retail/utils/autoLayoutKeyboard.ts +57 -0
|
@@ -1896,6 +1896,7 @@
|
|
|
1896
1896
|
}
|
|
1897
1897
|
: {};
|
|
1898
1898
|
|
|
1899
|
+
// eslint-disable-next-line max-lines-per-function
|
|
1899
1900
|
function LeadServiceAPI() {
|
|
1900
1901
|
async function send({ body, router, endpoint }) {
|
|
1901
1902
|
const calculatedEndpoint = endpoint && getEndpoint(endpoint, body);
|
|
@@ -1931,11 +1932,11 @@
|
|
|
1931
1932
|
return null;
|
|
1932
1933
|
}
|
|
1933
1934
|
}
|
|
1934
|
-
async function checkCode({ reqId, code, body }) {
|
|
1935
|
+
async function checkCode({ reqId, code, body, router, }) {
|
|
1935
1936
|
const submitBody = {
|
|
1936
1937
|
requestId: reqId,
|
|
1937
1938
|
confimationCode: code,
|
|
1938
|
-
leadRequest: getSubmitBody({ body }),
|
|
1939
|
+
leadRequest: getSubmitBody({ body, router }),
|
|
1939
1940
|
};
|
|
1940
1941
|
try {
|
|
1941
1942
|
const response = await LeadServiceFetch(`${API_BASE_URI}/confirmCorporateLead`, submitBody);
|
|
@@ -3527,6 +3528,7 @@
|
|
|
3527
3528
|
const API$1 = LeadServiceAPI();
|
|
3528
3529
|
const useVerifyPhoneDialogSubmit$1 = ({ values, onSuccess, formatData, reqId, }) => {
|
|
3529
3530
|
const timer = Math.max(getTimer(Date.now()), 0);
|
|
3531
|
+
const router = useRouter();
|
|
3530
3532
|
const [errorText, setErrorText] = useState('');
|
|
3531
3533
|
const [isLoading, { setTrue: startLoading, setFalse: endLoading }] = useBool(false);
|
|
3532
3534
|
const [timeNextReq, setTimeNextReq] = useState(timer);
|
|
@@ -3539,6 +3541,7 @@
|
|
|
3539
3541
|
code: values.join(''),
|
|
3540
3542
|
body: formatData,
|
|
3541
3543
|
reqId,
|
|
3544
|
+
router,
|
|
3542
3545
|
});
|
|
3543
3546
|
if (response?.errorDesc) {
|
|
3544
3547
|
setErrorText(response?.errorDesc);
|
|
@@ -6168,10 +6171,62 @@
|
|
|
6168
6171
|
];
|
|
6169
6172
|
const MethodObtainField = JSX(({ field, input }) => (jsx(RadioButtonGroupControl, { orientation: "horizontal", items: METHODS_OF_OBTAIN, ...field(input?.name ?? '') })));
|
|
6170
6173
|
|
|
6174
|
+
const autoLayoutKeyboard = (str) => {
|
|
6175
|
+
const replacer = {
|
|
6176
|
+
q: 'й',
|
|
6177
|
+
w: 'ц',
|
|
6178
|
+
e: 'у',
|
|
6179
|
+
r: 'к',
|
|
6180
|
+
t: 'е',
|
|
6181
|
+
y: 'н',
|
|
6182
|
+
u: 'г',
|
|
6183
|
+
i: 'ш',
|
|
6184
|
+
o: 'щ',
|
|
6185
|
+
p: 'з',
|
|
6186
|
+
'[': 'х',
|
|
6187
|
+
']': 'ъ',
|
|
6188
|
+
a: 'ф',
|
|
6189
|
+
s: 'ы',
|
|
6190
|
+
d: 'в',
|
|
6191
|
+
f: 'а',
|
|
6192
|
+
g: 'п',
|
|
6193
|
+
h: 'р',
|
|
6194
|
+
j: 'о',
|
|
6195
|
+
k: 'л',
|
|
6196
|
+
l: 'д',
|
|
6197
|
+
';': 'ж',
|
|
6198
|
+
"'": 'э',
|
|
6199
|
+
z: 'я',
|
|
6200
|
+
x: 'ч',
|
|
6201
|
+
c: 'с',
|
|
6202
|
+
v: 'м',
|
|
6203
|
+
b: 'и',
|
|
6204
|
+
n: 'т',
|
|
6205
|
+
m: 'ь',
|
|
6206
|
+
',': 'б',
|
|
6207
|
+
'.': 'ю',
|
|
6208
|
+
'`': 'ё',
|
|
6209
|
+
'{': 'Х',
|
|
6210
|
+
'}': 'Ъ',
|
|
6211
|
+
':': 'Ж',
|
|
6212
|
+
'~': 'Ё',
|
|
6213
|
+
'"': 'Э',
|
|
6214
|
+
'<': 'Б',
|
|
6215
|
+
'>': 'Ю',
|
|
6216
|
+
'\\': '\\',
|
|
6217
|
+
'^': '^',
|
|
6218
|
+
_: '_',
|
|
6219
|
+
};
|
|
6220
|
+
return str.replace(/[A-z,`~<.>;:\\'"[{\]}]/g, (x) => {
|
|
6221
|
+
return x === x.toLowerCase() ? replacer[x] : replacer[x.toLowerCase()].toUpperCase();
|
|
6222
|
+
});
|
|
6223
|
+
};
|
|
6224
|
+
|
|
6171
6225
|
const MiddleNameField = JSX(({ field, input }) => {
|
|
6172
6226
|
const onChange = useCallback((value) => {
|
|
6173
|
-
|
|
6174
|
-
|
|
6227
|
+
const translatedValue = autoLayoutKeyboard(value);
|
|
6228
|
+
if (retailCyrillicPattern.test(translatedValue) || translatedValue.length === 0) {
|
|
6229
|
+
field('middleName')?.onChange?.(translatedValue);
|
|
6175
6230
|
}
|
|
6176
6231
|
}, [field]);
|
|
6177
6232
|
return (jsx(DaDataInputControl, { label: "\u041E\u0442\u0447\u0435\u0441\u0442\u0432\u043E (\u041E\u0431\u044F\u0437\u0430\u0442\u0435\u043B\u044C\u043D\u043E, \u043F\u0440\u0438 \u043D\u0430\u043B\u0438\u0447\u0438\u0438)", maxLength: 40, disabled: isEsiaAuthorize(field, input), ...field(input?.name ?? ''), ...input, onChange: onChange }));
|
|
@@ -6179,8 +6234,9 @@
|
|
|
6179
6234
|
|
|
6180
6235
|
const NameField = JSX(({ field, input }) => {
|
|
6181
6236
|
const onChange = useCallback((value) => {
|
|
6182
|
-
|
|
6183
|
-
|
|
6237
|
+
const translatedValue = autoLayoutKeyboard(value);
|
|
6238
|
+
if (retailCyrillicPattern.test(translatedValue) || translatedValue.length === 0) {
|
|
6239
|
+
field('name')?.onChange?.(translatedValue);
|
|
6184
6240
|
}
|
|
6185
6241
|
}, [field]);
|
|
6186
6242
|
return (jsx(DaDataInputControl, { label: "\u0418\u043C\u044F", maxLength: 40, disabled: isEsiaAuthorize(field, input), ...field(input?.name ?? ''), ...input, onChange: onChange }));
|
|
@@ -6395,8 +6451,9 @@
|
|
|
6395
6451
|
|
|
6396
6452
|
const SurnameField = JSX(({ field, input }) => {
|
|
6397
6453
|
const onChange = useCallback((value) => {
|
|
6398
|
-
|
|
6399
|
-
|
|
6454
|
+
const translatedValue = autoLayoutKeyboard(value);
|
|
6455
|
+
if (retailCyrillicPattern.test(translatedValue) || translatedValue.length === 0) {
|
|
6456
|
+
field('surname')?.onChange?.(translatedValue);
|
|
6400
6457
|
}
|
|
6401
6458
|
}, [field]);
|
|
6402
6459
|
return (jsx(DaDataInputControl, { label: "\u0424\u0430\u043C\u0438\u043B\u0438\u044F", maxLength: 40, disabled: isEsiaAuthorize(field, input), ...field(input?.name ?? ''), ...input, onChange: onChange }));
|
|
@@ -6635,7 +6692,7 @@
|
|
|
6635
6692
|
(async () => setCaptcha(URL.createObjectURL(await createCaptcha(phoneNumber))))();
|
|
6636
6693
|
}, []);
|
|
6637
6694
|
useEffect(handleCreateCaptcha, []);
|
|
6638
|
-
return (jsx(Dialog, { head: jsx(Logo, {}), onClose:
|
|
6695
|
+
return (jsx(Dialog, { head: jsx(Logo, {}), onClose: closeAll, children: jsxs("div", { className: "flex flex-col gap-lg items-center", children: [jsxs("div", { className: "flex", children: [jsx("img", { className: "grow", src: captcha }), jsx(Button, { className: "w-8", embedded: true, onClick: handleCreateCaptcha, children: jsx(Icon, { iconVersion: "normal", name: "RefreshIcon" }) })] }), jsx(Input, { className: "w-80", 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-80 justify-between", children: [jsx(Button, { version: "secondary", onClick: closeAll, children: "\u0412\u0435\u0440\u043D\u0443\u0442\u044C\u0441\u044F" }), jsx(SubmitButton$1, { version: "secondary", disabled: !code, onClick: handleCheckCaptcha, children: "\u041E\u0442\u043F\u0440\u0430\u0432\u0438\u0442\u044C" })] }), isLoading ? jsx(Loader, { blur: false }) : null] }) }));
|
|
6639
6696
|
});
|
|
6640
6697
|
|
|
6641
6698
|
const checkCode = async (body) => {
|
|
@@ -13461,7 +13518,7 @@
|
|
|
13461
13518
|
slots: () => [HEADER_SLOT, FOOTER_SLOT, STICKY_FOOTER_SLOT],
|
|
13462
13519
|
});
|
|
13463
13520
|
|
|
13464
|
-
const packageVersion = "0.14.
|
|
13521
|
+
const packageVersion = "0.14.991";
|
|
13465
13522
|
|
|
13466
13523
|
exports.Blocks = Blocks;
|
|
13467
13524
|
exports.ContentPage = ContentPage;
|