@redneckz/wildless-cms-uni-blocks 0.14.672 → 0.14.674
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 +24 -11
- package/bundle/bundle.umd.min.js +1 -1
- package/bundle/ui-kit/YandexMap/YandexMap.d.ts +1 -0
- package/dist/components/CreditCardForm/CreditCardForm.js +1 -1
- package/dist/components/CreditCardForm/CreditCardForm.js.map +1 -1
- package/dist/components/CreditCardForm/StepsNavigationButtons.js +2 -2
- package/dist/components/CreditCardForm/StepsNavigationButtons.js.map +1 -1
- package/dist/components/CreditForm/CreditForm.js +1 -1
- package/dist/components/CreditForm/CreditForm.js.map +1 -1
- package/dist/components/CreditForm/StepsNavigationButtons.js +2 -2
- package/dist/components/CreditForm/StepsNavigationButtons.js.map +1 -1
- package/dist/ui-kit/FormField/Fields/AddressRetailField.js +1 -1
- package/dist/ui-kit/FormField/Fields/AddressRetailField.js.map +1 -1
- package/dist/ui-kit/FormField/validators.js +4 -2
- package/dist/ui-kit/FormField/validators.js.map +1 -1
- package/dist/ui-kit/YandexMap/YandexMap.d.ts +1 -0
- package/dist/ui-kit/YandexMap/YandexMap.js +11 -2
- package/dist/ui-kit/YandexMap/YandexMap.js.map +1 -1
- package/lib/components/CreditCardForm/CreditCardForm.js +1 -1
- package/lib/components/CreditCardForm/CreditCardForm.js.map +1 -1
- package/lib/components/CreditCardForm/StepsNavigationButtons.js +2 -2
- package/lib/components/CreditCardForm/StepsNavigationButtons.js.map +1 -1
- package/lib/components/CreditForm/CreditForm.js +1 -1
- package/lib/components/CreditForm/CreditForm.js.map +1 -1
- package/lib/components/CreditForm/StepsNavigationButtons.js +2 -2
- package/lib/components/CreditForm/StepsNavigationButtons.js.map +1 -1
- package/lib/ui-kit/FormField/Fields/AddressRetailField.js +1 -1
- package/lib/ui-kit/FormField/Fields/AddressRetailField.js.map +1 -1
- package/lib/ui-kit/FormField/validators.js +4 -2
- package/lib/ui-kit/FormField/validators.js.map +1 -1
- package/lib/ui-kit/YandexMap/YandexMap.d.ts +1 -0
- package/lib/ui-kit/YandexMap/YandexMap.js +11 -2
- package/lib/ui-kit/YandexMap/YandexMap.js.map +1 -1
- package/mobile/bundle/bundle.umd.js +24 -11
- package/mobile/bundle/bundle.umd.min.js +1 -1
- package/mobile/bundle/ui-kit/YandexMap/YandexMap.d.ts +1 -0
- package/mobile/dist/components/CreditCardForm/CreditCardForm.js +1 -1
- package/mobile/dist/components/CreditCardForm/CreditCardForm.js.map +1 -1
- package/mobile/dist/components/CreditCardForm/StepsNavigationButtons.js +2 -2
- package/mobile/dist/components/CreditCardForm/StepsNavigationButtons.js.map +1 -1
- package/mobile/dist/components/CreditForm/CreditForm.js +1 -1
- package/mobile/dist/components/CreditForm/CreditForm.js.map +1 -1
- package/mobile/dist/components/CreditForm/StepsNavigationButtons.js +2 -2
- package/mobile/dist/components/CreditForm/StepsNavigationButtons.js.map +1 -1
- package/mobile/dist/ui-kit/FormField/Fields/AddressRetailField.js +1 -1
- package/mobile/dist/ui-kit/FormField/Fields/AddressRetailField.js.map +1 -1
- package/mobile/dist/ui-kit/FormField/validators.js +4 -2
- package/mobile/dist/ui-kit/FormField/validators.js.map +1 -1
- package/mobile/dist/ui-kit/YandexMap/YandexMap.d.ts +1 -0
- package/mobile/dist/ui-kit/YandexMap/YandexMap.js +11 -2
- package/mobile/dist/ui-kit/YandexMap/YandexMap.js.map +1 -1
- package/mobile/lib/components/CreditCardForm/CreditCardForm.js +1 -1
- package/mobile/lib/components/CreditCardForm/CreditCardForm.js.map +1 -1
- package/mobile/lib/components/CreditCardForm/StepsNavigationButtons.js +2 -2
- package/mobile/lib/components/CreditCardForm/StepsNavigationButtons.js.map +1 -1
- package/mobile/lib/components/CreditForm/CreditForm.js +1 -1
- package/mobile/lib/components/CreditForm/CreditForm.js.map +1 -1
- package/mobile/lib/components/CreditForm/StepsNavigationButtons.js +2 -2
- package/mobile/lib/components/CreditForm/StepsNavigationButtons.js.map +1 -1
- package/mobile/lib/ui-kit/FormField/Fields/AddressRetailField.js +1 -1
- package/mobile/lib/ui-kit/FormField/Fields/AddressRetailField.js.map +1 -1
- package/mobile/lib/ui-kit/FormField/validators.js +4 -2
- package/mobile/lib/ui-kit/FormField/validators.js.map +1 -1
- package/mobile/lib/ui-kit/YandexMap/YandexMap.d.ts +1 -0
- package/mobile/lib/ui-kit/YandexMap/YandexMap.js +11 -2
- package/mobile/lib/ui-kit/YandexMap/YandexMap.js.map +1 -1
- package/mobile/src/components/ApplicationLeadForm/ApplicationLeadForm.example.json +4 -5
- package/mobile/src/components/CreditCardForm/CreditCardForm.tsx +1 -1
- package/mobile/src/components/CreditCardForm/StepsNavigationButtons.tsx +3 -11
- package/mobile/src/components/CreditForm/CreditForm.tsx +1 -1
- package/mobile/src/components/CreditForm/StepsNavigationButtons.tsx +4 -12
- package/mobile/src/ui-kit/FormField/Fields/AddressRetailField.tsx +6 -1
- package/mobile/src/ui-kit/FormField/validators.ts +10 -5
- package/mobile/src/ui-kit/YandexMap/YandexMap.tsx +58 -45
- package/package.json +1 -1
- package/src/components/ApplicationForm/ApplicationForm.fixture.tsx +1 -1
- package/src/components/ApplicationLeadForm/ApplicationLeadForm.example.json +4 -5
- package/src/components/ApplicationLeadForm/ApplicationLeadForm.fixture.tsx +1 -1
- package/src/components/CreditCardForm/CreditCardForm.tsx +1 -1
- package/src/components/CreditCardForm/StepsNavigationButtons.tsx +3 -11
- package/src/components/CreditForm/CreditForm.tsx +1 -1
- package/src/components/CreditForm/StepsNavigationButtons.tsx +4 -12
- package/src/ui-kit/FormField/Fields/AddressRetailField.tsx +6 -1
- package/src/ui-kit/FormField/validators.ts +10 -5
- package/src/ui-kit/YandexMap/YandexMap.tsx +58 -45
package/bundle/bundle.umd.js
CHANGED
|
@@ -1429,7 +1429,7 @@
|
|
|
1429
1429
|
const defaultValidator = (errorMsg) => required(errorMsg ?? ERROR_MESSAGE);
|
|
1430
1430
|
const defaultSelectValidator = (errorMsg) => validator((_) => _?.key && _?.key !== '')(errorMsg ?? ERROR_MESSAGE);
|
|
1431
1431
|
const jobNumberValidator = (errorMsg) => validator((_) => typeof _ === 'string' && _.length > 0 && _.length <= 2)(errorMsg ?? ERROR_MESSAGE);
|
|
1432
|
-
const nameValidator = (errorMsg) => validator((_) => typeof _ === 'string' && _.length > 1)(errorMsg ?? ERROR_MESSAGE);
|
|
1432
|
+
const nameValidator = (errorMsg) => validator((_) => typeof _ === 'string' && _.length > 1 && isCyrillic(_))(errorMsg ?? ERROR_MESSAGE);
|
|
1433
1433
|
const lengthStringValidator = (inputLength, errorMsg) => validator((_) => typeof _ === 'string' && _.length >= 1 && _.length <= inputLength)(errorMsg ?? ERROR_MESSAGE);
|
|
1434
1434
|
const serieValidator = (errorMsg) => validator((_) => typeof _ === 'string' && _.length === 4)(errorMsg);
|
|
1435
1435
|
const numberValidator = (errorMsg) => validator((_) => typeof _ === 'string' && _.length === 6)(errorMsg);
|
|
@@ -1459,7 +1459,9 @@
|
|
|
1459
1459
|
const addressDaDataValidate = (address) => Boolean(address.region && address.city && address.house);
|
|
1460
1460
|
const addressDaDataValidator = () => validator(addressDaDataValidate)('Укажите регион, город/населенный пункт, улицу, дом, квартиру');
|
|
1461
1461
|
const addressOrganizationValidator = () => validator((address) => Boolean(address.fiasCode && address.city && address.house))('Укажите регион, город/населенный пункт, улицу, дом');
|
|
1462
|
-
const codeWordValidator = (errorMsg) => validator((_) => typeof _ === 'string' && _.length >= 3 && _.length <= 21 &&
|
|
1462
|
+
const codeWordValidator = (errorMsg) => validator((_) => typeof _ === 'string' && _.length >= 3 && _.length <= 21 && isCyrillic(_))(errorMsg ?? ERROR_MESSAGE);
|
|
1463
|
+
const cyrillicPattern = /^[\u0400-\u04FF\d]+$/u;
|
|
1464
|
+
const isCyrillic = (_ = '') => cyrillicPattern.test(_);
|
|
1463
1465
|
|
|
1464
1466
|
const validatorObj = {
|
|
1465
1467
|
typeForm: defaultValidator(),
|
|
@@ -1975,7 +1977,7 @@
|
|
|
1975
1977
|
// Сейчас реализован поиск среди тестовых данных
|
|
1976
1978
|
// TODO: Также выяснить что делать когда ничего не найдено
|
|
1977
1979
|
// TODO: На макетах также когда есть поле поиска нет кнопки открыть на карте.
|
|
1978
|
-
const YandexMap = JSX(({ points, className = '', zoom = 5, isLoad }) => {
|
|
1980
|
+
const YandexMap = JSX(({ points, className = '', zoom = 5, isLoad, selectedAddress }) => {
|
|
1979
1981
|
const map = useRef(null);
|
|
1980
1982
|
const parentDiv = useRef(null);
|
|
1981
1983
|
const yandexMaps = useYandexMaps();
|
|
@@ -1999,7 +2001,16 @@
|
|
|
1999
2001
|
renderClusterer({ yandexMaps, map: map.current, points, isLoad });
|
|
2000
2002
|
});
|
|
2001
2003
|
}
|
|
2002
|
-
|
|
2004
|
+
// zoom к выбранному отделению банка в рамках задачи по retail
|
|
2005
|
+
if (map.current && selectedAddress) {
|
|
2006
|
+
yandexMaps?.geocode(selectedAddress).then((res) => {
|
|
2007
|
+
const firstGeoObject = res.geoObjects.get(0);
|
|
2008
|
+
const coords = firstGeoObject.geometry.getCoordinates();
|
|
2009
|
+
map.current.setCenter(coords);
|
|
2010
|
+
map.current.setZoom(18);
|
|
2011
|
+
});
|
|
2012
|
+
}
|
|
2013
|
+
}, [yandexMaps, points, zoom, isLoad, selectedAddress]);
|
|
2003
2014
|
if (!yandexMaps) {
|
|
2004
2015
|
return null;
|
|
2005
2016
|
}
|
|
@@ -2475,7 +2486,7 @@
|
|
|
2475
2486
|
const { data } = useLeadFormData('REGION_RF');
|
|
2476
2487
|
const regionValue = field('regionRetail')?.value || {};
|
|
2477
2488
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
2478
|
-
field('addressRetail');
|
|
2489
|
+
const fieldBranch = field('addressRetail');
|
|
2479
2490
|
useEffect(() => {
|
|
2480
2491
|
(async () => {
|
|
2481
2492
|
const officesList = await fetchRegionOffices(regionValue?.key ?? '');
|
|
@@ -2494,7 +2505,7 @@
|
|
|
2494
2505
|
return (jsxs("div", { children: [jsx(SelectControl, { label: "\u0410\u0434\u0440\u0435\u0441 \u043E\u0442\u0434\u0435\u043B\u0435\u043D\u0438\u044F", placeholder: "\u0412\u044B\u0431\u0435\u0440\u0438\u0442\u0435 \u043E\u0442\u0434\u0435\u043B\u0435\u043D\u0438\u0435", options: offices.map(({ id, address = '' }) => ({
|
|
2495
2506
|
key: id?.toString() || '',
|
|
2496
2507
|
text: address,
|
|
2497
|
-
})), ...getValidation(field('addressRetail'), validatorObj.addressRetail, input?.required && isRegionSelected), isSearch: true }), jsx("div", { className: "h-[600px]", children: jsx(ClientOnly, { children: jsx(YandexMap, { points: points, isLoad: !data, className: "h-full" }) }) })] }));
|
|
2508
|
+
})), ...getValidation(field('addressRetail'), validatorObj.addressRetail, input?.required && isRegionSelected), isSearch: true }), jsx("div", { className: "h-[600px]", children: jsx(ClientOnly, { children: jsx(YandexMap, { points: points, isLoad: !data, className: "h-full", selectedAddress: fieldBranch?.value?.text }) }) })] }));
|
|
2498
2509
|
});
|
|
2499
2510
|
|
|
2500
2511
|
const useNormalizedInput = (props, { normalize, format }) => {
|
|
@@ -6359,7 +6370,8 @@
|
|
|
6359
6370
|
|
|
6360
6371
|
const StepsNavigationButtons$1 = JSX(({ step, onPrevStep }) => {
|
|
6361
6372
|
const isFirstStep = step === 0;
|
|
6362
|
-
|
|
6373
|
+
const isFinalStep = step === 6;
|
|
6374
|
+
return (jsxs("div", { className: "flex justify-between gap-m", children: [jsx(Button, { onClick: onPrevStep, type: "button", version: "secondary", disabled: isFirstStep, children: "\u041D\u0430\u0437\u0430\u0434" }), jsx(Button, { type: "submit", children: isFinalStep ? 'Отправить заявку' : 'Далее' })] }));
|
|
6363
6375
|
});
|
|
6364
6376
|
|
|
6365
6377
|
const getFifthStepData$1 = (formData) => {
|
|
@@ -6930,7 +6942,7 @@
|
|
|
6930
6942
|
'Параметры карты',
|
|
6931
6943
|
'Персональные данные',
|
|
6932
6944
|
'Данные о трудоустройстве',
|
|
6933
|
-
'
|
|
6945
|
+
'Семейное положение и доход',
|
|
6934
6946
|
'Дополнительные сведения',
|
|
6935
6947
|
'Выбор способа получения',
|
|
6936
6948
|
];
|
|
@@ -7227,7 +7239,8 @@
|
|
|
7227
7239
|
|
|
7228
7240
|
const StepsNavigationButtons = JSX(({ step, onPrevStep }) => {
|
|
7229
7241
|
const isFirstStep = step === 0;
|
|
7230
|
-
|
|
7242
|
+
const isFinalStep = step === 5;
|
|
7243
|
+
return (jsxs("div", { className: 'flex justify-between gap-m', children: [jsx(Button, { onClick: onPrevStep, type: "button", version: "secondary", disabled: isFirstStep, children: "\u041D\u0430\u0437\u0430\u0434" }), jsx(Button, { type: "submit", children: isFinalStep ? 'Отправить заявку' : 'Далее' })] }));
|
|
7231
7244
|
});
|
|
7232
7245
|
|
|
7233
7246
|
const getFifthStepData = (formData) => {
|
|
@@ -7715,7 +7728,7 @@
|
|
|
7715
7728
|
'',
|
|
7716
7729
|
'Персональные данные',
|
|
7717
7730
|
'Данные о трудоустройстве',
|
|
7718
|
-
'
|
|
7731
|
+
'Семейное положение и доход',
|
|
7719
7732
|
'Дополнительные сведения',
|
|
7720
7733
|
'Отделение Банка',
|
|
7721
7734
|
];
|
|
@@ -10012,7 +10025,7 @@
|
|
|
10012
10025
|
slots: () => [HEADER_SLOT, FOOTER_SLOT, STICKY_FOOTER_SLOT],
|
|
10013
10026
|
});
|
|
10014
10027
|
|
|
10015
|
-
const packageVersion = "0.14.
|
|
10028
|
+
const packageVersion = "0.14.673";
|
|
10016
10029
|
|
|
10017
10030
|
exports.Blocks = Blocks;
|
|
10018
10031
|
exports.ContentPage = ContentPage;
|