@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
|
@@ -19,6 +19,7 @@ export declare type CheckCodeProps = {
|
|
|
19
19
|
reqId: string;
|
|
20
20
|
code: string;
|
|
21
21
|
body: LeadRequest;
|
|
22
|
+
router: Router;
|
|
22
23
|
};
|
|
23
24
|
declare type CheckCodeResponse = {
|
|
24
25
|
errorCode?: string;
|
|
@@ -37,7 +38,7 @@ export declare type sendProps = {
|
|
|
37
38
|
export declare function LeadServiceAPI(): {
|
|
38
39
|
send: ({ body, router, endpoint }: sendProps) => Promise<any>;
|
|
39
40
|
sendCode: ({ phone }: PhoneOnly) => Promise<string | null>;
|
|
40
|
-
checkCode: ({ reqId, code, body }: CheckCodeProps) => Promise<CheckCodeResponse>;
|
|
41
|
+
checkCode: ({ reqId, code, body, router, }: CheckCodeProps) => Promise<CheckCodeResponse>;
|
|
41
42
|
sendPhoneCallRequest: (body: LeadRequest, endpoint?: EndpointType) => Promise<any>;
|
|
42
43
|
};
|
|
43
44
|
export {};
|
package/bundle/bundle.umd.js
CHANGED
|
@@ -1888,6 +1888,7 @@
|
|
|
1888
1888
|
}
|
|
1889
1889
|
: {};
|
|
1890
1890
|
|
|
1891
|
+
// eslint-disable-next-line max-lines-per-function
|
|
1891
1892
|
function LeadServiceAPI() {
|
|
1892
1893
|
async function send({ body, router, endpoint }) {
|
|
1893
1894
|
const calculatedEndpoint = endpoint && getEndpoint(endpoint, body);
|
|
@@ -1923,11 +1924,11 @@
|
|
|
1923
1924
|
return null;
|
|
1924
1925
|
}
|
|
1925
1926
|
}
|
|
1926
|
-
async function checkCode({ reqId, code, body }) {
|
|
1927
|
+
async function checkCode({ reqId, code, body, router, }) {
|
|
1927
1928
|
const submitBody = {
|
|
1928
1929
|
requestId: reqId,
|
|
1929
1930
|
confimationCode: code,
|
|
1930
|
-
leadRequest: getSubmitBody({ body }),
|
|
1931
|
+
leadRequest: getSubmitBody({ body, router }),
|
|
1931
1932
|
};
|
|
1932
1933
|
try {
|
|
1933
1934
|
const response = await LeadServiceFetch(`${API_BASE_URI}/confirmCorporateLead`, submitBody);
|
|
@@ -3519,6 +3520,7 @@
|
|
|
3519
3520
|
const API$1 = LeadServiceAPI();
|
|
3520
3521
|
const useVerifyPhoneDialogSubmit$1 = ({ values, onSuccess, formatData, reqId, }) => {
|
|
3521
3522
|
const timer = Math.max(getTimer(Date.now()), 0);
|
|
3523
|
+
const router = useRouter();
|
|
3522
3524
|
const [errorText, setErrorText] = useState('');
|
|
3523
3525
|
const [isLoading, { setTrue: startLoading, setFalse: endLoading }] = useBool(false);
|
|
3524
3526
|
const [timeNextReq, setTimeNextReq] = useState(timer);
|
|
@@ -3531,6 +3533,7 @@
|
|
|
3531
3533
|
code: values.join(''),
|
|
3532
3534
|
body: formatData,
|
|
3533
3535
|
reqId,
|
|
3536
|
+
router,
|
|
3534
3537
|
});
|
|
3535
3538
|
if (response?.errorDesc) {
|
|
3536
3539
|
setErrorText(response?.errorDesc);
|
|
@@ -6160,10 +6163,62 @@
|
|
|
6160
6163
|
];
|
|
6161
6164
|
const MethodObtainField = JSX(({ field, input }) => (jsx(RadioButtonGroupControl, { orientation: "horizontal", items: METHODS_OF_OBTAIN, ...field(input?.name ?? '') })));
|
|
6162
6165
|
|
|
6166
|
+
const autoLayoutKeyboard = (str) => {
|
|
6167
|
+
const replacer = {
|
|
6168
|
+
q: 'й',
|
|
6169
|
+
w: 'ц',
|
|
6170
|
+
e: 'у',
|
|
6171
|
+
r: 'к',
|
|
6172
|
+
t: 'е',
|
|
6173
|
+
y: 'н',
|
|
6174
|
+
u: 'г',
|
|
6175
|
+
i: 'ш',
|
|
6176
|
+
o: 'щ',
|
|
6177
|
+
p: 'з',
|
|
6178
|
+
'[': 'х',
|
|
6179
|
+
']': 'ъ',
|
|
6180
|
+
a: 'ф',
|
|
6181
|
+
s: 'ы',
|
|
6182
|
+
d: 'в',
|
|
6183
|
+
f: 'а',
|
|
6184
|
+
g: 'п',
|
|
6185
|
+
h: 'р',
|
|
6186
|
+
j: 'о',
|
|
6187
|
+
k: 'л',
|
|
6188
|
+
l: 'д',
|
|
6189
|
+
';': 'ж',
|
|
6190
|
+
"'": 'э',
|
|
6191
|
+
z: 'я',
|
|
6192
|
+
x: 'ч',
|
|
6193
|
+
c: 'с',
|
|
6194
|
+
v: 'м',
|
|
6195
|
+
b: 'и',
|
|
6196
|
+
n: 'т',
|
|
6197
|
+
m: 'ь',
|
|
6198
|
+
',': 'б',
|
|
6199
|
+
'.': 'ю',
|
|
6200
|
+
'`': 'ё',
|
|
6201
|
+
'{': 'Х',
|
|
6202
|
+
'}': 'Ъ',
|
|
6203
|
+
':': 'Ж',
|
|
6204
|
+
'~': 'Ё',
|
|
6205
|
+
'"': 'Э',
|
|
6206
|
+
'<': 'Б',
|
|
6207
|
+
'>': 'Ю',
|
|
6208
|
+
'\\': '\\',
|
|
6209
|
+
'^': '^',
|
|
6210
|
+
_: '_',
|
|
6211
|
+
};
|
|
6212
|
+
return str.replace(/[A-z,`~<.>;:\\'"[{\]}]/g, (x) => {
|
|
6213
|
+
return x === x.toLowerCase() ? replacer[x] : replacer[x.toLowerCase()].toUpperCase();
|
|
6214
|
+
});
|
|
6215
|
+
};
|
|
6216
|
+
|
|
6163
6217
|
const MiddleNameField = JSX(({ field, input }) => {
|
|
6164
6218
|
const onChange = useCallback((value) => {
|
|
6165
|
-
|
|
6166
|
-
|
|
6219
|
+
const translatedValue = autoLayoutKeyboard(value);
|
|
6220
|
+
if (retailCyrillicPattern.test(translatedValue) || translatedValue.length === 0) {
|
|
6221
|
+
field('middleName')?.onChange?.(translatedValue);
|
|
6167
6222
|
}
|
|
6168
6223
|
}, [field]);
|
|
6169
6224
|
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 }));
|
|
@@ -6171,8 +6226,9 @@
|
|
|
6171
6226
|
|
|
6172
6227
|
const NameField = JSX(({ field, input }) => {
|
|
6173
6228
|
const onChange = useCallback((value) => {
|
|
6174
|
-
|
|
6175
|
-
|
|
6229
|
+
const translatedValue = autoLayoutKeyboard(value);
|
|
6230
|
+
if (retailCyrillicPattern.test(translatedValue) || translatedValue.length === 0) {
|
|
6231
|
+
field('name')?.onChange?.(translatedValue);
|
|
6176
6232
|
}
|
|
6177
6233
|
}, [field]);
|
|
6178
6234
|
return (jsx(DaDataInputControl, { label: "\u0418\u043C\u044F", maxLength: 40, disabled: isEsiaAuthorize(field, input), ...field(input?.name ?? ''), ...input, onChange: onChange }));
|
|
@@ -6387,8 +6443,9 @@
|
|
|
6387
6443
|
|
|
6388
6444
|
const SurnameField = JSX(({ field, input }) => {
|
|
6389
6445
|
const onChange = useCallback((value) => {
|
|
6390
|
-
|
|
6391
|
-
|
|
6446
|
+
const translatedValue = autoLayoutKeyboard(value);
|
|
6447
|
+
if (retailCyrillicPattern.test(translatedValue) || translatedValue.length === 0) {
|
|
6448
|
+
field('surname')?.onChange?.(translatedValue);
|
|
6392
6449
|
}
|
|
6393
6450
|
}, [field]);
|
|
6394
6451
|
return (jsx(DaDataInputControl, { label: "\u0424\u0430\u043C\u0438\u043B\u0438\u044F", maxLength: 40, disabled: isEsiaAuthorize(field, input), ...field(input?.name ?? ''), ...input, onChange: onChange }));
|
|
@@ -6627,7 +6684,7 @@
|
|
|
6627
6684
|
(async () => setCaptcha(URL.createObjectURL(await createCaptcha(phoneNumber))))();
|
|
6628
6685
|
}, []);
|
|
6629
6686
|
useEffect(handleCreateCaptcha, []);
|
|
6630
|
-
return (jsx(Dialog, { head: jsx(Logo, {}), onClose:
|
|
6687
|
+
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] }) }));
|
|
6631
6688
|
});
|
|
6632
6689
|
|
|
6633
6690
|
const checkCode = async (body) => {
|
|
@@ -13679,7 +13736,7 @@
|
|
|
13679
13736
|
slots: () => [HEADER_SLOT, FOOTER_SLOT, STICKY_FOOTER_SLOT],
|
|
13680
13737
|
});
|
|
13681
13738
|
|
|
13682
|
-
const packageVersion = "0.14.
|
|
13739
|
+
const packageVersion = "0.14.991";
|
|
13683
13740
|
|
|
13684
13741
|
exports.Blocks = Blocks;
|
|
13685
13742
|
exports.ContentPage = ContentPage;
|