@redneckz/wildless-cms-uni-blocks 0.14.645 → 0.14.647
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/blocks.schema.json +1 -1
- package/bundle/bundle.umd.js +61 -17
- package/bundle/bundle.umd.min.js +1 -1
- package/bundle/components/ApplicationForm/renderInputs.d.ts +5 -1
- package/bundle/ui-kit/FormField/Fields/BirthdayField.d.ts +5 -1
- package/bundle/ui-kit/FormField/Fields/CardCategoryField.d.ts +2 -0
- package/bundle/ui-kit/FormField/Fields/CodeWordField.d.ts +2 -0
- package/bundle/ui-kit/FormField/Fields/CurrencyField.d.ts +4 -0
- package/bundle/ui-kit/FormField/Fields/PaymentSystemField.d.ts +4 -0
- package/bundle/ui-kit/FormField/NameFieldDef.d.ts +1 -1
- package/bundle/ui-kit/FormField/getField.d.ts +1 -1
- package/bundle/ui-kit/FormField/validators.d.ts +1 -0
- package/dist/components/ApplicationForm/renderInputs.d.ts +5 -1
- package/dist/components/ApplicationForm/renderInputs.js +2 -2
- package/dist/components/ApplicationForm/renderInputs.js.map +1 -1
- package/dist/components/ApplicationLeadForm/ApplicationLeadForm.js +1 -1
- package/dist/components/ApplicationLeadForm/ApplicationLeadForm.js.map +1 -1
- package/dist/ui-kit/Calculator/UnknownRate.js +1 -1
- package/dist/ui-kit/Calculator/UnknownRate.js.map +1 -1
- package/dist/ui-kit/ConsentBkiDialog/ConsentBkiDialog.js +1 -1
- package/dist/ui-kit/ConsentBkiDialog/ConsentBkiDialog.js.map +1 -1
- package/dist/ui-kit/FormField/Fields/BirthdayField.d.ts +5 -1
- package/dist/ui-kit/FormField/Fields/BirthdayField.js +16 -1
- package/dist/ui-kit/FormField/Fields/BirthdayField.js.map +1 -1
- package/dist/ui-kit/FormField/Fields/CardCategoryField.d.ts +2 -0
- package/dist/ui-kit/FormField/Fields/CardCategoryField.js +11 -0
- package/dist/ui-kit/FormField/Fields/CardCategoryField.js.map +1 -0
- package/dist/ui-kit/FormField/Fields/CodeWordField.d.ts +2 -0
- package/dist/ui-kit/FormField/Fields/CodeWordField.js +9 -0
- package/dist/ui-kit/FormField/Fields/CodeWordField.js.map +1 -0
- package/dist/ui-kit/FormField/Fields/CurrencyField.d.ts +4 -0
- package/dist/ui-kit/FormField/Fields/CurrencyField.js +12 -0
- package/dist/ui-kit/FormField/Fields/CurrencyField.js.map +1 -0
- package/dist/ui-kit/FormField/Fields/PaymentSystemField.d.ts +4 -0
- package/dist/ui-kit/FormField/Fields/PaymentSystemField.js +18 -0
- package/dist/ui-kit/FormField/Fields/PaymentSystemField.js.map +1 -0
- package/dist/ui-kit/FormField/NameFieldDef.d.ts +1 -1
- package/dist/ui-kit/FormField/getField.d.ts +1 -1
- package/dist/ui-kit/FormField/getField.js +10 -4
- package/dist/ui-kit/FormField/getField.js.map +1 -1
- package/dist/ui-kit/FormField/getObjectValidator.js +1 -0
- package/dist/ui-kit/FormField/getObjectValidator.js.map +1 -1
- package/dist/ui-kit/FormField/validators.d.ts +1 -0
- package/dist/ui-kit/FormField/validators.js +3 -1
- package/dist/ui-kit/FormField/validators.js.map +1 -1
- package/lib/common.css +1 -1
- package/lib/components/ApplicationForm/renderInputs.d.ts +5 -1
- package/lib/components/ApplicationForm/renderInputs.js +2 -2
- package/lib/components/ApplicationForm/renderInputs.js.map +1 -1
- package/lib/components/ApplicationLeadForm/ApplicationLeadForm.js +1 -1
- package/lib/components/ApplicationLeadForm/ApplicationLeadForm.js.map +1 -1
- package/lib/ui-kit/Calculator/UnknownRate.js +1 -1
- package/lib/ui-kit/Calculator/UnknownRate.js.map +1 -1
- package/lib/ui-kit/ConsentBkiDialog/ConsentBkiDialog.js +1 -1
- package/lib/ui-kit/ConsentBkiDialog/ConsentBkiDialog.js.map +1 -1
- package/lib/ui-kit/FormField/Fields/BirthdayField.d.ts +5 -1
- package/lib/ui-kit/FormField/Fields/BirthdayField.js +16 -1
- package/lib/ui-kit/FormField/Fields/BirthdayField.js.map +1 -1
- package/lib/ui-kit/FormField/Fields/CardCategoryField.d.ts +2 -0
- package/lib/ui-kit/FormField/Fields/CardCategoryField.js +9 -0
- package/lib/ui-kit/FormField/Fields/CardCategoryField.js.map +1 -0
- package/lib/ui-kit/FormField/Fields/CodeWordField.d.ts +2 -0
- package/lib/ui-kit/FormField/Fields/CodeWordField.js +7 -0
- package/lib/ui-kit/FormField/Fields/CodeWordField.js.map +1 -0
- package/lib/ui-kit/FormField/Fields/CurrencyField.d.ts +4 -0
- package/lib/ui-kit/FormField/Fields/CurrencyField.js +10 -0
- package/lib/ui-kit/FormField/Fields/CurrencyField.js.map +1 -0
- package/lib/ui-kit/FormField/Fields/PaymentSystemField.d.ts +4 -0
- package/lib/ui-kit/FormField/Fields/PaymentSystemField.js +16 -0
- package/lib/ui-kit/FormField/Fields/PaymentSystemField.js.map +1 -0
- package/lib/ui-kit/FormField/NameFieldDef.d.ts +1 -1
- package/lib/ui-kit/FormField/getField.d.ts +1 -1
- package/lib/ui-kit/FormField/getField.js +10 -4
- package/lib/ui-kit/FormField/getField.js.map +1 -1
- package/lib/ui-kit/FormField/getObjectValidator.js +2 -1
- package/lib/ui-kit/FormField/getObjectValidator.js.map +1 -1
- package/lib/ui-kit/FormField/validators.d.ts +1 -0
- package/lib/ui-kit/FormField/validators.js +1 -0
- package/lib/ui-kit/FormField/validators.js.map +1 -1
- package/mobile/bundle/bundle.umd.js +61 -17
- package/mobile/bundle/bundle.umd.min.js +1 -1
- package/mobile/bundle/components/ApplicationForm/renderInputs.d.ts +5 -1
- package/mobile/bundle/ui-kit/FormField/Fields/BirthdayField.d.ts +5 -1
- package/mobile/bundle/ui-kit/FormField/Fields/CardCategoryField.d.ts +2 -0
- package/mobile/bundle/ui-kit/FormField/Fields/CodeWordField.d.ts +2 -0
- package/mobile/bundle/ui-kit/FormField/Fields/CurrencyField.d.ts +4 -0
- package/mobile/bundle/ui-kit/FormField/Fields/PaymentSystemField.d.ts +4 -0
- package/mobile/bundle/ui-kit/FormField/NameFieldDef.d.ts +1 -1
- package/mobile/bundle/ui-kit/FormField/getField.d.ts +1 -1
- package/mobile/bundle/ui-kit/FormField/validators.d.ts +1 -0
- package/mobile/dist/components/ApplicationForm/renderInputs.d.ts +5 -1
- package/mobile/dist/components/ApplicationForm/renderInputs.js +2 -2
- package/mobile/dist/components/ApplicationForm/renderInputs.js.map +1 -1
- package/mobile/dist/components/ApplicationLeadForm/ApplicationLeadForm.js +1 -1
- package/mobile/dist/components/ApplicationLeadForm/ApplicationLeadForm.js.map +1 -1
- package/mobile/dist/ui-kit/Calculator/UnknownRate.js +1 -1
- package/mobile/dist/ui-kit/Calculator/UnknownRate.js.map +1 -1
- package/mobile/dist/ui-kit/ConsentBkiDialog/ConsentBkiDialog.js +1 -1
- package/mobile/dist/ui-kit/ConsentBkiDialog/ConsentBkiDialog.js.map +1 -1
- package/mobile/dist/ui-kit/FormField/Fields/BirthdayField.d.ts +5 -1
- package/mobile/dist/ui-kit/FormField/Fields/BirthdayField.js +16 -1
- package/mobile/dist/ui-kit/FormField/Fields/BirthdayField.js.map +1 -1
- package/mobile/dist/ui-kit/FormField/Fields/CardCategoryField.d.ts +2 -0
- package/mobile/dist/ui-kit/FormField/Fields/CardCategoryField.js +11 -0
- package/mobile/dist/ui-kit/FormField/Fields/CardCategoryField.js.map +1 -0
- package/mobile/dist/ui-kit/FormField/Fields/CodeWordField.d.ts +2 -0
- package/mobile/dist/ui-kit/FormField/Fields/CodeWordField.js +9 -0
- package/mobile/dist/ui-kit/FormField/Fields/CodeWordField.js.map +1 -0
- package/mobile/dist/ui-kit/FormField/Fields/CurrencyField.d.ts +4 -0
- package/mobile/dist/ui-kit/FormField/Fields/CurrencyField.js +12 -0
- package/mobile/dist/ui-kit/FormField/Fields/CurrencyField.js.map +1 -0
- package/mobile/dist/ui-kit/FormField/Fields/PaymentSystemField.d.ts +4 -0
- package/mobile/dist/ui-kit/FormField/Fields/PaymentSystemField.js +18 -0
- package/mobile/dist/ui-kit/FormField/Fields/PaymentSystemField.js.map +1 -0
- package/mobile/dist/ui-kit/FormField/NameFieldDef.d.ts +1 -1
- package/mobile/dist/ui-kit/FormField/getField.d.ts +1 -1
- package/mobile/dist/ui-kit/FormField/getField.js +10 -4
- package/mobile/dist/ui-kit/FormField/getField.js.map +1 -1
- package/mobile/dist/ui-kit/FormField/getObjectValidator.js +1 -0
- package/mobile/dist/ui-kit/FormField/getObjectValidator.js.map +1 -1
- package/mobile/dist/ui-kit/FormField/validators.d.ts +1 -0
- package/mobile/dist/ui-kit/FormField/validators.js +3 -1
- package/mobile/dist/ui-kit/FormField/validators.js.map +1 -1
- package/mobile/lib/common.css +1 -1
- package/mobile/lib/components/ApplicationForm/renderInputs.d.ts +5 -1
- package/mobile/lib/components/ApplicationForm/renderInputs.js +2 -2
- package/mobile/lib/components/ApplicationForm/renderInputs.js.map +1 -1
- package/mobile/lib/components/ApplicationLeadForm/ApplicationLeadForm.js +1 -1
- package/mobile/lib/components/ApplicationLeadForm/ApplicationLeadForm.js.map +1 -1
- package/mobile/lib/ui-kit/Calculator/UnknownRate.js +1 -1
- package/mobile/lib/ui-kit/Calculator/UnknownRate.js.map +1 -1
- package/mobile/lib/ui-kit/ConsentBkiDialog/ConsentBkiDialog.js +1 -1
- package/mobile/lib/ui-kit/ConsentBkiDialog/ConsentBkiDialog.js.map +1 -1
- package/mobile/lib/ui-kit/FormField/Fields/BirthdayField.d.ts +5 -1
- package/mobile/lib/ui-kit/FormField/Fields/BirthdayField.js +16 -1
- package/mobile/lib/ui-kit/FormField/Fields/BirthdayField.js.map +1 -1
- package/mobile/lib/ui-kit/FormField/Fields/CardCategoryField.d.ts +2 -0
- package/mobile/lib/ui-kit/FormField/Fields/CardCategoryField.js +9 -0
- package/mobile/lib/ui-kit/FormField/Fields/CardCategoryField.js.map +1 -0
- package/mobile/lib/ui-kit/FormField/Fields/CodeWordField.d.ts +2 -0
- package/mobile/lib/ui-kit/FormField/Fields/CodeWordField.js +7 -0
- package/mobile/lib/ui-kit/FormField/Fields/CodeWordField.js.map +1 -0
- package/mobile/lib/ui-kit/FormField/Fields/CurrencyField.d.ts +4 -0
- package/mobile/lib/ui-kit/FormField/Fields/CurrencyField.js +10 -0
- package/mobile/lib/ui-kit/FormField/Fields/CurrencyField.js.map +1 -0
- package/mobile/lib/ui-kit/FormField/Fields/PaymentSystemField.d.ts +4 -0
- package/mobile/lib/ui-kit/FormField/Fields/PaymentSystemField.js +16 -0
- package/mobile/lib/ui-kit/FormField/Fields/PaymentSystemField.js.map +1 -0
- package/mobile/lib/ui-kit/FormField/NameFieldDef.d.ts +1 -1
- package/mobile/lib/ui-kit/FormField/getField.d.ts +1 -1
- package/mobile/lib/ui-kit/FormField/getField.js +10 -4
- package/mobile/lib/ui-kit/FormField/getField.js.map +1 -1
- package/mobile/lib/ui-kit/FormField/getObjectValidator.js +2 -1
- package/mobile/lib/ui-kit/FormField/getObjectValidator.js.map +1 -1
- package/mobile/lib/ui-kit/FormField/validators.d.ts +1 -0
- package/mobile/lib/ui-kit/FormField/validators.js +1 -0
- package/mobile/lib/ui-kit/FormField/validators.js.map +1 -1
- package/mobile/src/components/ApplicationForm/renderInputs.tsx +12 -3
- package/mobile/src/components/ApplicationLeadForm/ApplicationLeadForm.tsx +1 -1
- package/mobile/src/ui-kit/Calculator/UnknownRate.tsx +1 -1
- package/mobile/src/ui-kit/ConsentBkiDialog/ConsentBkiDialog.tsx +10 -3
- package/mobile/src/ui-kit/FormField/Fields/BirthdayField.tsx +32 -6
- package/mobile/src/ui-kit/FormField/Fields/CardCategoryField.tsx +18 -0
- package/mobile/src/ui-kit/FormField/Fields/CodeWordField.tsx +13 -0
- package/mobile/src/ui-kit/FormField/Fields/CurrencyField.tsx +24 -0
- package/mobile/src/ui-kit/FormField/Fields/PaymentSystemField.tsx +31 -0
- package/mobile/src/ui-kit/FormField/NameFieldDef.ts +5 -1
- package/mobile/src/ui-kit/FormField/getField.tsx +12 -4
- package/mobile/src/ui-kit/FormField/getObjectValidator.tsx +2 -0
- package/mobile/src/ui-kit/FormField/validators.ts +5 -0
- package/package.json +2 -2
- package/src/components/ApplicationForm/renderInputs.tsx +12 -3
- package/src/components/ApplicationLeadForm/ApplicationLeadForm.tsx +1 -1
- package/src/ui-kit/Calculator/UnknownRate.tsx +1 -1
- package/src/ui-kit/ConsentBkiDialog/ConsentBkiDialog.tsx +10 -3
- package/src/ui-kit/FormField/Fields/BirthdayField.tsx +32 -6
- package/src/ui-kit/FormField/Fields/CardCategoryField.tsx +18 -0
- package/src/ui-kit/FormField/Fields/CodeWordField.tsx +13 -0
- package/src/ui-kit/FormField/Fields/CurrencyField.tsx +24 -0
- package/src/ui-kit/FormField/Fields/PaymentSystemField.tsx +31 -0
- package/src/ui-kit/FormField/NameFieldDef.ts +5 -1
- package/src/ui-kit/FormField/getField.tsx +12 -4
- package/src/ui-kit/FormField/getObjectValidator.tsx +2 -0
- package/src/ui-kit/FormField/validators.ts +5 -0
package/bundle/bundle.umd.js
CHANGED
|
@@ -1457,6 +1457,7 @@
|
|
|
1457
1457
|
const emailValidator = (errorMsg) => validator((_) => emailValidate(_))(errorMsg);
|
|
1458
1458
|
const addressDaDataValidate = (address) => Boolean(address.qc === '0' && address.qcComplete === '0' && address.qcHouse === '2');
|
|
1459
1459
|
const addressDaDataValidator = () => validator(addressDaDataValidate)('Укажите регион, город/населенный пункт, улицу, дом, квартиру');
|
|
1460
|
+
const codeWordValidator = (errorMsg) => validator((_) => typeof _ === 'string' && _.length >= 3 && _.length <= 21 && /^[\u0400-\u04FF\d]+$/u.test(_))(errorMsg ?? ERROR_MESSAGE);
|
|
1460
1461
|
|
|
1461
1462
|
const validatorObj = {
|
|
1462
1463
|
typeForm: defaultValidator(),
|
|
@@ -1538,6 +1539,7 @@
|
|
|
1538
1539
|
regionRetail: defaultSelectValidator('Выберите филиал банка'),
|
|
1539
1540
|
addressRetail: defaultSelectValidator('Выберите адрес банка'),
|
|
1540
1541
|
addressMatch: defaultValidator(),
|
|
1542
|
+
codeWord: codeWordValidator('Необходимо ввести кодовое слово'),
|
|
1541
1543
|
};
|
|
1542
1544
|
const getObjectValidator = (inputs) => {
|
|
1543
1545
|
const requiredInputs = getNamesFromInput(inputs.filter((_) => Boolean(_?.required)));
|
|
@@ -2164,12 +2166,34 @@
|
|
|
2164
2166
|
|
|
2165
2167
|
const BeginDateField = JSX(({ field, input }) => (jsx(DatePickerControl, { label: "\u0414\u0430\u0442\u0430 \u043D\u0430\u0447\u0430\u043B\u0430 \u0440\u0430\u0431\u043E\u0442\u044B \u043D\u0430 \u0442\u0435\u043A\u0443\u0449\u0435\u043C \u043C\u0435\u0441\u0442\u0435", ...getValidation(field('beginDate'), validatorObj.beginDate, calculateIsRequired(field, input?.required)), ...input })));
|
|
2166
2168
|
|
|
2167
|
-
const
|
|
2169
|
+
const MIN_AGE = 23;
|
|
2170
|
+
const MAX_AGE = 75;
|
|
2171
|
+
const AGE_ERROR_MESSAGE = 'Допустимый возраст заёмщика - от 23 до 75 лет';
|
|
2172
|
+
const BirthdayField = JSX(({ field, input, isRetailForm = false }) => {
|
|
2173
|
+
const { value } = field('birthday');
|
|
2174
|
+
return (jsx(DatePickerControl, { label: "\u0414\u0430\u0442\u0430 \u0440\u043E\u0436\u0434\u0435\u043D\u0438\u044F", ...getValidation(field('birthday'), validatorObj.birthday, input?.required), error: isRetailForm && value && !birthdayValidate(value) ? AGE_ERROR_MESSAGE : '' }));
|
|
2175
|
+
});
|
|
2176
|
+
const birthdayValidate = (date) => {
|
|
2177
|
+
const today = new Date();
|
|
2178
|
+
const minDate = new Date(today.getFullYear() - MIN_AGE, today.getMonth(), today.getDate());
|
|
2179
|
+
const maxDate = new Date(today.getFullYear() - MAX_AGE, today.getMonth(), today.getDate());
|
|
2180
|
+
if (!date || date > minDate || date < maxDate) {
|
|
2181
|
+
return false;
|
|
2182
|
+
}
|
|
2183
|
+
return true;
|
|
2184
|
+
};
|
|
2168
2185
|
|
|
2169
2186
|
const BirthPlaceField = JSX(({ field, input }) => (jsx(InputControl, { label: "\u041C\u0435\u0441\u0442\u043E \u0440\u043E\u0436\u0434\u0435\u043D\u0438\u044F", ...getValidation(field('birthPlace'), validatorObj.birthPlace, input?.required), ...input })));
|
|
2170
2187
|
|
|
2188
|
+
const CardCategoryField = JSX(({ field, input }) => {
|
|
2189
|
+
const { data: cardCategory } = useLeadFormData('CARD_TYPE');
|
|
2190
|
+
return (jsx(SelectField, { field: field, source: cardCategory, label: "\u041A\u0430\u0442\u0435\u0433\u043E\u0440\u0438\u044F \u043A\u0430\u0440\u0442\u044B", fieldName: "cardCategory", input: input }));
|
|
2191
|
+
});
|
|
2192
|
+
|
|
2171
2193
|
const ChildrenField = JSX(({ field, input }) => (jsx(InputControl, { label: "\u041A\u043E\u043B\u0438\u0447\u0435\u0441\u0442\u0432\u043E \u0434\u0435\u0442\u0435\u0439 \u0434\u043E 18 \u043B\u0435\u0442", placeholder: "\u0412\u0432\u0435\u0434\u0438\u0442\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435", type: "number", ...getValidation(field('children'), validatorObj.children, input?.required), ...input })));
|
|
2172
2194
|
|
|
2195
|
+
const CodeWordField = JSX(({ field, input }) => (jsx(InputControl, { label: "\u041A\u043E\u0434\u043E\u0432\u043E\u0435 \u0441\u043B\u043E\u0432\u043E", ...getValidation(field('codeWord'), validatorObj.codeWord, input?.required), ...input })));
|
|
2196
|
+
|
|
2173
2197
|
const CollectionCountField = JSX(({ field, input }) => (jsx(InputControl, { label: "\u041A\u043E\u043B\u0438\u0447\u0435\u0441\u0442\u0432\u043E \u043E\u0431\u044A\u0435\u043A\u0442\u043E\u0432 \u0438\u043D\u043A\u0430\u0441\u0441\u0430\u0446\u0438\u0438", type: "number", ...getValidation(field('collectionCount'), validatorObj.collectionCount, input?.required) })));
|
|
2174
2198
|
|
|
2175
2199
|
const CommentField = JSX(({ field, input }) => (jsx(InputControl, { className: "col-span-2", ...getValidation(field('comment'), validatorObj.comment, input?.required), placeholder: "\u0412\u0430\u0448\u0435 \u0441\u043E\u043E\u0431\u0449\u0435\u043D\u0438\u0435", isTextarea: true })));
|
|
@@ -2267,6 +2291,18 @@
|
|
|
2267
2291
|
return (jsx(SelectField, { field: field, source: creditInRshbCd, label: LABEL_TEXT, fieldName: "creditInRshbCd", input: input }));
|
|
2268
2292
|
});
|
|
2269
2293
|
|
|
2294
|
+
const orientationStyleMap = {
|
|
2295
|
+
horizontal: '@lg:flex-row',
|
|
2296
|
+
vertical: '',
|
|
2297
|
+
};
|
|
2298
|
+
const RadioButtonGroup = JSX(({ label, items, value, className, onChange: onChangeCheckedItem, disabled = false, orientation = 'horizontal', }) => (jsxs("div", { className: "grid gap-xs whitespace-nowrap", children: [label ? (jsx("div", { role: "radiogroup", "aria-label": label, children: jsx(Text, { color: "text-secondary-text", font: "font-light", children: label }) })) : null, jsx("div", { className: style('flex flex-col gap-s', orientationStyleMap[orientation], className), role: "radiogroup", "aria-label": "\u0413\u0440\u0443\u043F\u043F\u0430 \u043A\u043D\u043E\u043F\u043E\u043A", children: items?.map(({ id, text }) => (jsx(Checkbox, { isRadio: true, text: text, value: value === id, onChange: () => onChangeCheckedItem && onChangeCheckedItem(id), disabled: disabled }, String(id)))) })] })));
|
|
2299
|
+
|
|
2300
|
+
const CURRENCY_TYPES = [{ id: 'rub', text: 'Рубль' }];
|
|
2301
|
+
const CurrencyField = JSX(({ field }) => {
|
|
2302
|
+
const { value } = field('currency');
|
|
2303
|
+
return (jsxs("div", { className: "", children: [jsx(Text, { font: "font-light", children: "\u0412\u0430\u043B\u044E\u0442\u0430 \u0434\u0435\u0431\u0435\u0442\u043E\u0432\u043E\u0439 \u043A\u0430\u0440\u0442\u044B" }), jsx("div", { className: "py-m gap-m grid @xl:flex @xl:items-center", children: jsx(RadioButtonGroup, { className: "whitespace-normal", orientation: "horizontal", items: CURRENCY_TYPES, value: value ?? 'rub' }) })] }));
|
|
2304
|
+
});
|
|
2305
|
+
|
|
2270
2306
|
const DependentsField = JSX(({ field, input }) => (jsx(InputControl, { label: "\u041A\u043E\u043B\u0438\u0447\u0435\u0441\u0442\u0432\u043E \u0438\u0436\u0434\u0438\u0432\u0435\u043D\u0446\u0435\u0432", placeholder: "\u0417\u0430 \u0438\u0441\u043A\u043B\u044E\u0447\u0435\u043D\u0438\u0435 \u0434\u0435\u0442\u0435\u0439 \u0434\u043E 18 \u043B\u0435\u0442", type: "number", inputLength: 2, ...getValidation(field('dependents'), validatorObj.dependents, input?.required), ...input })));
|
|
2271
2307
|
|
|
2272
2308
|
const DesiredMeetingDateField = JSX(({ field, input }) => (jsx(DatePickerControl, { label: "\u0416\u0435\u043B\u0430\u0435\u043C\u0430\u044F \u0434\u0430\u0442\u0430 \u0432\u0441\u0442\u0440\u0435\u0447\u0438", ...getValidation(field('desiredMeetingDate'), validatorObj.meetingDay, input?.required) })));
|
|
@@ -2440,6 +2476,18 @@
|
|
|
2440
2476
|
return (jsx(InputControl, { ...getValidation(field('partnerComments'), validatorObj.partnerComments, required), placeholder: "\u0423\u043A\u0430\u0436\u0438\u0442\u0435 \u0438\u043D\u0442\u0435\u0440\u0435\u0441\u0443\u044E\u0449\u0438\u0439 \u0432\u0430\u0441 \u0432\u043E\u043F\u0440\u043E\u0441", isTextarea: true, ...rest }));
|
|
2441
2477
|
});
|
|
2442
2478
|
|
|
2479
|
+
const PAYMENT_SYSTEM_TYPES = [
|
|
2480
|
+
{ id: 'mir', text: 'Карта МИР' },
|
|
2481
|
+
{ id: 'union_pay', text: 'UnionPay' },
|
|
2482
|
+
{ id: 'payment_system_j', text: 'Платежная система (Дж)' },
|
|
2483
|
+
{ id: 'payment_system_b', text: 'Платежная система (B)* ' },
|
|
2484
|
+
{ id: 'free_card', text: 'Бесплатная карта' },
|
|
2485
|
+
];
|
|
2486
|
+
const PaymentSystemField = JSX(({ field }) => {
|
|
2487
|
+
const { value, onChange } = field('paymentSystem');
|
|
2488
|
+
return (jsxs("div", { className: "", children: [jsx(Text, { font: "font-light", children: "\u041F\u043B\u0430\u0442\u0435\u0436\u043D\u0430\u044F \u0441\u0438\u0441\u0442\u0435\u043C\u0430" }), jsx("div", { className: "py-m gap-m grid @xl:flex @xl:items-center", children: jsx(RadioButtonGroup, { className: "whitespace-normal", orientation: "horizontal", items: PAYMENT_SYSTEM_TYPES, value: value ?? 'mir', onChange: (_) => onChange && onChange(_) }) })] }));
|
|
2489
|
+
});
|
|
2490
|
+
|
|
2443
2491
|
const isPlaceholder = (_) => _ === '_';
|
|
2444
2492
|
const isDigit = (_) => /\d/.test(_);
|
|
2445
2493
|
const isWildcard = (_) => isPlaceholder(_) || isDigit(_);
|
|
@@ -3172,12 +3220,6 @@
|
|
|
3172
3220
|
|
|
3173
3221
|
const ServiceDirectionField = JSX(({ field, input }) => (jsx(SelectControl, { label: "\u041D\u0430\u043F\u0440\u0430\u0432\u043B\u0435\u043D\u0438\u0435 \u043E\u0431\u0441\u043B\u0443\u0436\u0438\u0432\u0430\u043D\u0438\u044F", placeholder: "\u0412\u044B\u0431\u0435\u0440\u0438\u0442\u0435 \u043D\u0430\u043F\u0440\u0430\u0432\u043B\u0435\u043D\u0438\u0435", options: SERVICE_DIRECTIONS, ...getValidation(field('serviceDirection'), validatorObj.serviceDirection, input?.required) })));
|
|
3174
3222
|
|
|
3175
|
-
const orientationStyleMap = {
|
|
3176
|
-
horizontal: '@lg:flex-row',
|
|
3177
|
-
vertical: '',
|
|
3178
|
-
};
|
|
3179
|
-
const RadioButtonGroup = JSX(({ label, items, value, className, onChange: onChangeCheckedItem, disabled = false, orientation = 'horizontal', }) => (jsxs("div", { className: "grid gap-xs whitespace-nowrap", children: [label ? (jsx("div", { role: "radiogroup", "aria-label": label, children: jsx(Text, { color: "text-secondary-text", font: "font-light", children: label }) })) : null, jsx("div", { className: style('flex flex-col gap-s', orientationStyleMap[orientation], className), role: "radiogroup", "aria-label": "\u0413\u0440\u0443\u043F\u043F\u0430 \u043A\u043D\u043E\u043F\u043E\u043A", children: items?.map(({ id, text }) => (jsx(Checkbox, { isRadio: true, text: text, value: value === id, onChange: () => onChangeCheckedItem && onChangeCheckedItem(id), disabled: disabled }, String(id)))) })] })));
|
|
3180
|
-
|
|
3181
3223
|
const RadioButtonGroupControl = JSX(({ className, label, onChange, error, ...rest }) => (jsxs("div", { className: style('shrink-0 w-full', className), children: [jsx(RadioButtonGroup, { label: getRequiredLabel({ label, errors: rest?.errors }), onChange: (_) => onChange && onChange(_), ...rest }), renderErrorText(error)] })));
|
|
3182
3224
|
|
|
3183
3225
|
const SEX_TYPES = [
|
|
@@ -3239,9 +3281,7 @@
|
|
|
3239
3281
|
const PRODUCT_REF = {
|
|
3240
3282
|
$ref: '/wcms-resources/outservice-productlist.json',
|
|
3241
3283
|
};
|
|
3242
|
-
const getField =
|
|
3243
|
-
// eslint-disable-next-line max-lines-per-function
|
|
3244
|
-
(field, typeForm) => (input, i) => {
|
|
3284
|
+
const getField = (field, typeForm, isRetailForm = false) => (input, i) => {
|
|
3245
3285
|
const isPremium = typeForm === 'ULTRASERVICE' || typeForm === 'PREMIUMSERVICE';
|
|
3246
3286
|
const InputsMap = {
|
|
3247
3287
|
surname: jsx(SurnameField, { field: field, input: input }),
|
|
@@ -3264,7 +3304,7 @@
|
|
|
3264
3304
|
comment: jsx(CommentField, { field: field, input: input }),
|
|
3265
3305
|
addressBranch: jsx(AddressBranchField, { field: field, input: input, isPremium: isPremium }),
|
|
3266
3306
|
sex: jsx(SexField, { field: field, input: input }),
|
|
3267
|
-
birthday: jsx(BirthdayField, { field: field, input: input }),
|
|
3307
|
+
birthday: jsx(BirthdayField, { field: field, input: input, isRetailForm: isRetailForm }),
|
|
3268
3308
|
birthPlace: jsx(BirthPlaceField, { field: field, input: input }),
|
|
3269
3309
|
desiredMeetingDate: jsx(DesiredMeetingDateField, { field: field, input: input }),
|
|
3270
3310
|
product: jsx(ProductField, { field: field, source: PRODUCT_REF }),
|
|
@@ -3330,6 +3370,10 @@
|
|
|
3330
3370
|
regionRetail: jsx(RetailRegionField, { field: field, input: input }),
|
|
3331
3371
|
addressRetail: jsx(RetailAddressField, { field: field, input: input }),
|
|
3332
3372
|
addressMatch: jsx(AddressMatchField, { field: field, input: input }),
|
|
3373
|
+
paymentSystem: jsx(PaymentSystemField, { field: field, input: input }),
|
|
3374
|
+
currency: jsx(CurrencyField, { field: field, input: input }),
|
|
3375
|
+
cardCategory: jsx(CardCategoryField, { field: field, input: input }),
|
|
3376
|
+
codeWord: jsx(CodeWordField, { field: field, input: input }),
|
|
3333
3377
|
};
|
|
3334
3378
|
return isRenderField({ input, field }) ? (jsx("div", { children: InputsMap[input?.name || ''] }, String(i))) : null;
|
|
3335
3379
|
};
|
|
@@ -3513,9 +3557,9 @@
|
|
|
3513
3557
|
});
|
|
3514
3558
|
const renderGeneralCheckbox = (generalCheckBox) => (foldableData) => (jsxs("div", { className: "flex items-start", children: [generalCheckBox, jsx("button", { onClick: foldableData.onToggle, className: "px-m py-2xs", type: "button", children: jsx(Icon, { className: "text-primary-text", name: foldableData.isUnfolded ? 'ArrowUpIcon' : 'ArrowDownIcon', width: "16", height: "16" }) })] }));
|
|
3515
3559
|
|
|
3516
|
-
const renderInputs$1 = ({ field, typeForm = '', inputs }) => {
|
|
3560
|
+
const renderInputs$1 = ({ field, typeForm = '', inputs, isRetailForm = false, }) => {
|
|
3517
3561
|
const { consentInputs, restInputs } = splitInputs(inputs || []);
|
|
3518
|
-
return consentInputs.length > 2 ? (jsxs("div", { children: [restInputs.map(getField(field, typeForm)), jsx(GroupedConsents, { inputs: consentInputs, field: field })] })) : ((inputs || [])?.map(getField(field, typeForm)));
|
|
3562
|
+
return consentInputs.length > 2 ? (jsxs("div", { children: [restInputs.map(getField(field, typeForm, isRetailForm)), jsx(GroupedConsents, { inputs: consentInputs, field: field })] })) : ((inputs || [])?.map(getField(field, typeForm, isRetailForm)));
|
|
3519
3563
|
};
|
|
3520
3564
|
const splitInputs = (inputs) => ({
|
|
3521
3565
|
consentInputs: inputs?.filter((_) => Object.keys(CONSENTS).includes(_.name || '')) || [],
|
|
@@ -3870,7 +3914,7 @@
|
|
|
3870
3914
|
}
|
|
3871
3915
|
}, []);
|
|
3872
3916
|
const consentText = showRefuceContent ? refuseConsentText : defaultConsentText;
|
|
3873
|
-
return (jsx(Dialog, { className: "my-6xl max-w-3xl w-full min-h-fit mx-auto rounded-lg", onClose: onClose, children: jsxs("div", { className: "flex flex-col gap-
|
|
3917
|
+
return (jsx(Dialog, { className: "my-6xl max-w-3xl w-full min-h-fit mx-auto rounded-lg py-0 px-5xl", onClose: onClose, children: jsxs("div", { className: "flex flex-col gap-xl items-center", children: [jsx("div", { role: "button", onClick: () => openDocument(open, CONSENT_BKI_ID, isMobile), children: jsx(Heading, { className: "text-center text-balance", headingType: "h2", title: consentText.title }) }), jsx(Paragraph, { align: "text-center", children: consentText.description }), jsx(RadioButtonGroup, { className: "whitespace-normal", orientation: "horizontal", items: ITEMS$1, value: confirmStatus, onChange: handleConfirmChange }), jsx(Button, { disabled: !confirmStatus, type: "button", onClick: handleClose, children: "\u041F\u0440\u043E\u0434\u043E\u043B\u0436\u0438\u0442\u044C" })] }) }));
|
|
3874
3918
|
});
|
|
3875
3919
|
const ITEMS$1 = [
|
|
3876
3920
|
{ id: 'SIGNED', text: 'Подписать' },
|
|
@@ -4229,7 +4273,7 @@
|
|
|
4229
4273
|
reset();
|
|
4230
4274
|
}
|
|
4231
4275
|
}, [responseType]);
|
|
4232
|
-
return (jsx(ApplicationFormLayout, { className: style('container space-y-m', className), title: title, ...rest, children: jsxs("form", { onSubmit: onSubmit, className: "space-y-m relative", children: [isLoading ? jsx(Loader, { blur: false }) : null, sections.map((_, i) => (jsxs("div", { className: style(inputColumnStyles(_.columns), 'grid gap-x-m'), children: [renderTitle(_.title), renderInputs$1({ field, inputs: _?.inputs })] }, `section-${i}`))), renderSubmitButton(button)] }) }));
|
|
4276
|
+
return (jsx(ApplicationFormLayout, { className: style('container space-y-m', className), title: title, ...rest, children: jsxs("form", { onSubmit: onSubmit, className: "space-y-m relative", children: [isLoading ? jsx(Loader, { blur: false }) : null, sections.map((_, i) => (jsxs("div", { className: style(inputColumnStyles(_.columns), 'grid gap-x-m'), children: [renderTitle(_.title), renderInputs$1({ field, inputs: _?.inputs, isRetailForm: true })] }, `section-${i}`))), renderSubmitButton(button)] }) }));
|
|
4233
4277
|
});
|
|
4234
4278
|
|
|
4235
4279
|
const InfoCard = JSX(({ __html, icon = 'InfoCircleIcon', iconVersion = 'black', link }) => (jsxs("div", { className: "flex flex-row items-center w-full min-h-14 bg-main-gray rounded-lg gap-m p-m", children: [jsx("div", { className: "rounded-full bg-white p-xs", children: jsx(Icon, { name: icon, width: "24", height: "24", iconVersion: iconVersion }) }), jsxs("div", { className: "", children: [jsx(RichText, { __html: __html }), link?.text ? jsx(LinkButton, { className: "text-primary-main", children: link.text }) : null] })] })));
|
|
@@ -4755,7 +4799,7 @@
|
|
|
4755
4799
|
|
|
4756
4800
|
const Rate = JSX(({ rate = 0, title = 'Ставка', unit, fractionDigits = 2, depositeName, isShowDepositeName, color = 'text-secondary-text', }) => (jsxs("div", { children: [jsx(Text, { size: "text-l", font: "font-light", color: color, children: title }), jsxs("div", { className: "relative", children: [jsxs("div", { className: "flex @xl:justify-center gradient-color-text", children: [jsx("span", { className: "font-mohave text-title-huge -mt-m tracking-[-15px]", children: toLocalNumberFormat(fractionDigits, { fixed: true })(rate) }), unit ? jsx("span", { className: "text-7xl mt-5", children: unit }) : null] }), depositeName && isShowDepositeName ? (jsx("div", { className: "absolute bottom-2 w-full text-left whitespace-nowrap", children: depositeName })) : null] })] })));
|
|
4757
4801
|
|
|
4758
|
-
const UnknownRate = JSX(({ title = 'Ставка' }) => (jsxs("div", { className: "space-y-s min-w-96", children: [jsx(Text, { size: "text-l", font: "font-light", color: "text-secondary-text", children: title }), jsx(Icon, { className: "w-10 h-auto lg:w-40", name: "PercentIcon" }), jsx("div", { className: "w-64", children: jsx(Paragraph, { size: "text-xl", font: "font-light", color: "text-primary-text", children: "\
|
|
4802
|
+
const UnknownRate = JSX(({ title = 'Ставка' }) => (jsxs("div", { className: "space-y-s min-w-96", children: [jsx(Text, { size: "text-l", font: "font-light", color: "text-secondary-text", children: title }), jsx(Icon, { className: "w-10 h-auto lg:w-40", name: "PercentIcon" }), jsx("div", { className: "w-64", children: jsx(Paragraph, { size: "text-xl", font: "font-light", color: "text-primary-text", children: "\u041F\u0440\u043E\u0446\u0435\u043D\u0442\u043D\u0430\u044F \u0441\u0442\u0430\u0432\u043A\u0430 \u043D\u0435 \u043D\u0430\u0439\u0434\u0435\u043D\u0430, \u0432\u044B\u0431\u0435\u0440\u0438\u0442\u0435 \u0434\u0440\u0443\u0433\u0438\u0435 \u043F\u0430\u0440\u0430\u043C\u0435\u0442\u0440\u044B" }) })] })));
|
|
4759
4803
|
|
|
4760
4804
|
const renderRate = ({ title = 'Ставка', rate = 0, unit = '%', fractionDigits = 2, color = 'text-secondary-text', children, ...rest }) => rate ? (jsxs("div", { className: "flex flex-col", children: [jsx("div", { className: "hidden lg:block min-w-96", children: jsx(Rate, { title: title, rate: rate, unit: unit, fractionDigits: fractionDigits, color: color, ...rest }) }), jsx(CalculatorValue, { className: "lg:hidden", title: title, value: rate, postfix: unit, fractionDigits: fractionDigits, fixed: true, color: color, ...rest }), children] })) : (jsx(UnknownRate, { title: title, ...rest }));
|
|
4761
4805
|
|
|
@@ -8840,7 +8884,7 @@
|
|
|
8840
8884
|
slots: () => [HEADER_SLOT, FOOTER_SLOT, STICKY_FOOTER_SLOT],
|
|
8841
8885
|
});
|
|
8842
8886
|
|
|
8843
|
-
const packageVersion = "0.14.
|
|
8887
|
+
const packageVersion = "0.14.646";
|
|
8844
8888
|
|
|
8845
8889
|
exports.Blocks = Blocks;
|
|
8846
8890
|
exports.ContentPage = ContentPage;
|