@redneckz/wildless-cms-uni-blocks 0.14.723 → 0.14.725
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 +113 -130
- package/bundle/bundle.umd.min.js +1 -1
- package/bundle/components/ApplicationLeadForm/LeadFormState.d.ts +0 -1
- package/bundle/services/retail/adaptors/getFamilyStatusAndIncomeData.d.ts +1 -0
- package/bundle/ui-kit/DraftDialog/utils.d.ts +1 -1
- package/bundle/ui-kit/FormField/NameFieldDef.d.ts +1 -1
- package/bundle/ui-kit/FormField/validators.d.ts +2 -1
- package/dist/components/ApplicationForm/ApplicationForm.js +1 -3
- package/dist/components/ApplicationForm/ApplicationForm.js.map +1 -1
- package/dist/components/ApplicationLeadForm/LeadFormState.d.ts +0 -1
- package/dist/services/retail/adaptors/getFamilyStatusAndIncomeData.d.ts +1 -0
- package/dist/services/retail/adaptors/getFamilyStatusAndIncomeData.js +5 -3
- package/dist/services/retail/adaptors/getFamilyStatusAndIncomeData.js.map +1 -1
- package/dist/ui-kit/DraftDialog/utils.d.ts +1 -1
- package/dist/ui-kit/DraftDialog/utils.js +2 -1
- package/dist/ui-kit/DraftDialog/utils.js.map +1 -1
- package/dist/ui-kit/FormField/Fields/RetirementIncomeField.js +1 -10
- package/dist/ui-kit/FormField/Fields/RetirementIncomeField.js.map +1 -1
- package/dist/ui-kit/FormField/Fields/WagesField.js +1 -10
- package/dist/ui-kit/FormField/Fields/WagesField.js.map +1 -1
- package/dist/ui-kit/FormField/NameFieldDef.d.ts +1 -1
- package/dist/ui-kit/FormField/getObjectValidator.js +1 -1
- package/dist/ui-kit/FormField/getObjectValidator.js.map +1 -1
- package/dist/ui-kit/FormField/validators.d.ts +2 -1
- package/dist/ui-kit/FormField/validators.js +5 -3
- package/dist/ui-kit/FormField/validators.js.map +1 -1
- package/lib/components/ApplicationForm/ApplicationForm.js +1 -3
- package/lib/components/ApplicationForm/ApplicationForm.js.map +1 -1
- package/lib/components/ApplicationLeadForm/LeadFormState.d.ts +0 -1
- package/lib/services/retail/adaptors/getFamilyStatusAndIncomeData.d.ts +1 -0
- package/lib/services/retail/adaptors/getFamilyStatusAndIncomeData.js +3 -2
- package/lib/services/retail/adaptors/getFamilyStatusAndIncomeData.js.map +1 -1
- package/lib/ui-kit/DraftDialog/utils.d.ts +1 -1
- package/lib/ui-kit/DraftDialog/utils.js +2 -1
- package/lib/ui-kit/DraftDialog/utils.js.map +1 -1
- package/lib/ui-kit/FormField/Fields/RetirementIncomeField.js +1 -10
- package/lib/ui-kit/FormField/Fields/RetirementIncomeField.js.map +1 -1
- package/lib/ui-kit/FormField/Fields/WagesField.js +1 -10
- package/lib/ui-kit/FormField/Fields/WagesField.js.map +1 -1
- package/lib/ui-kit/FormField/NameFieldDef.d.ts +1 -1
- package/lib/ui-kit/FormField/getObjectValidator.js +2 -2
- package/lib/ui-kit/FormField/getObjectValidator.js.map +1 -1
- package/lib/ui-kit/FormField/validators.d.ts +2 -1
- package/lib/ui-kit/FormField/validators.js +3 -2
- package/lib/ui-kit/FormField/validators.js.map +1 -1
- package/mobile/bundle/bundle.umd.js +113 -130
- package/mobile/bundle/bundle.umd.min.js +1 -1
- package/mobile/bundle/components/ApplicationLeadForm/LeadFormState.d.ts +0 -1
- package/mobile/bundle/services/retail/adaptors/getFamilyStatusAndIncomeData.d.ts +1 -0
- package/mobile/bundle/ui-kit/DraftDialog/utils.d.ts +1 -1
- package/mobile/bundle/ui-kit/FormField/NameFieldDef.d.ts +1 -1
- package/mobile/bundle/ui-kit/FormField/validators.d.ts +2 -1
- package/mobile/dist/components/ApplicationForm/ApplicationForm.js +1 -3
- package/mobile/dist/components/ApplicationForm/ApplicationForm.js.map +1 -1
- package/mobile/dist/components/ApplicationLeadForm/LeadFormState.d.ts +0 -1
- package/mobile/dist/services/retail/adaptors/getFamilyStatusAndIncomeData.d.ts +1 -0
- package/mobile/dist/services/retail/adaptors/getFamilyStatusAndIncomeData.js +5 -3
- package/mobile/dist/services/retail/adaptors/getFamilyStatusAndIncomeData.js.map +1 -1
- package/mobile/dist/ui-kit/DraftDialog/utils.d.ts +1 -1
- package/mobile/dist/ui-kit/DraftDialog/utils.js +2 -1
- package/mobile/dist/ui-kit/DraftDialog/utils.js.map +1 -1
- package/mobile/dist/ui-kit/FormField/Fields/RetirementIncomeField.js +1 -10
- package/mobile/dist/ui-kit/FormField/Fields/RetirementIncomeField.js.map +1 -1
- package/mobile/dist/ui-kit/FormField/Fields/WagesField.js +1 -10
- package/mobile/dist/ui-kit/FormField/Fields/WagesField.js.map +1 -1
- package/mobile/dist/ui-kit/FormField/NameFieldDef.d.ts +1 -1
- package/mobile/dist/ui-kit/FormField/getObjectValidator.js +1 -1
- package/mobile/dist/ui-kit/FormField/getObjectValidator.js.map +1 -1
- package/mobile/dist/ui-kit/FormField/validators.d.ts +2 -1
- package/mobile/dist/ui-kit/FormField/validators.js +5 -3
- package/mobile/dist/ui-kit/FormField/validators.js.map +1 -1
- package/mobile/lib/components/ApplicationForm/ApplicationForm.js +1 -3
- package/mobile/lib/components/ApplicationForm/ApplicationForm.js.map +1 -1
- package/mobile/lib/components/ApplicationLeadForm/LeadFormState.d.ts +0 -1
- package/mobile/lib/services/retail/adaptors/getFamilyStatusAndIncomeData.d.ts +1 -0
- package/mobile/lib/services/retail/adaptors/getFamilyStatusAndIncomeData.js +3 -2
- package/mobile/lib/services/retail/adaptors/getFamilyStatusAndIncomeData.js.map +1 -1
- package/mobile/lib/ui-kit/DraftDialog/utils.d.ts +1 -1
- package/mobile/lib/ui-kit/DraftDialog/utils.js +2 -1
- package/mobile/lib/ui-kit/DraftDialog/utils.js.map +1 -1
- package/mobile/lib/ui-kit/FormField/Fields/RetirementIncomeField.js +1 -10
- package/mobile/lib/ui-kit/FormField/Fields/RetirementIncomeField.js.map +1 -1
- package/mobile/lib/ui-kit/FormField/Fields/WagesField.js +1 -10
- package/mobile/lib/ui-kit/FormField/Fields/WagesField.js.map +1 -1
- package/mobile/lib/ui-kit/FormField/NameFieldDef.d.ts +1 -1
- package/mobile/lib/ui-kit/FormField/getObjectValidator.js +2 -2
- package/mobile/lib/ui-kit/FormField/getObjectValidator.js.map +1 -1
- package/mobile/lib/ui-kit/FormField/validators.d.ts +2 -1
- package/mobile/lib/ui-kit/FormField/validators.js +3 -2
- package/mobile/lib/ui-kit/FormField/validators.js.map +1 -1
- package/mobile/src/components/ApplicationForm/ApplicationForm.tsx +8 -10
- package/mobile/src/components/ApplicationLeadForm/LeadFormState.ts +0 -1
- package/mobile/src/services/retail/adaptors/getFamilyStatusAndIncomeData.ts +4 -2
- package/mobile/src/ui-kit/DraftDialog/utils.ts +2 -3
- package/mobile/src/ui-kit/FormField/Fields/RetirementIncomeField.tsx +9 -25
- package/mobile/src/ui-kit/FormField/Fields/WagesField.tsx +9 -25
- package/mobile/src/ui-kit/FormField/NameFieldDef.ts +0 -1
- package/mobile/src/ui-kit/FormField/getObjectValidator.tsx +2 -1
- package/mobile/src/ui-kit/FormField/validators.ts +7 -3
- package/package.json +1 -1
- package/src/components/ApplicationForm/ApplicationForm.tsx +8 -10
- package/src/components/ApplicationLeadForm/LeadFormState.ts +0 -1
- package/src/services/retail/adaptors/getFamilyStatusAndIncomeData.ts +4 -2
- package/src/ui-kit/DraftDialog/utils.ts +2 -3
- package/src/ui-kit/FormField/Fields/RetirementIncomeField.tsx +9 -25
- package/src/ui-kit/FormField/Fields/WagesField.tsx +9 -25
- package/src/ui-kit/FormField/NameFieldDef.ts +0 -1
- package/src/ui-kit/FormField/getObjectValidator.tsx +2 -1
- package/src/ui-kit/FormField/validators.ts +7 -3
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getObjectValidator.js","sourceRoot":"","sources":["../../../src/ui-kit/FormField/getObjectValidator.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AACxD,OAAO,EACL,sBAAsB,EACtB,4BAA4B,EAC5B,kBAAkB,EAClB,iBAAiB,EACjB,sBAAsB,EACtB,gBAAgB,EAChB,cAAc,EACd,YAAY,EACZ,kBAAkB,EAClB,qBAAqB,EACrB,wBAAwB,EACxB,aAAa,EACb,eAAe,EACf,cAAc,EACd,cAAc,EACd,cAAc,GACf,MAAM,cAAc,CAAC;AAEtB,MAAM,CAAC,MAAM,YAAY,GAA8B;IACrD,QAAQ,EAAE,gBAAgB,EAAE;IAC5B,OAAO,EAAE,aAAa,CAAC,sBAAsB,CAAC;IAC9C,IAAI,EAAE,aAAa,CAAC,kBAAkB,CAAC;IACvC,UAAU,EAAE,aAAa,CAAC,uBAAuB,CAAC;IAClD,MAAM,EAAE,sBAAsB,EAAE;IAChC,aAAa,EAAE,sBAAsB,EAAE;IACvC,KAAK,EAAE,cAAc,CAAC,wBAAwB,CAAC;IAC/C,cAAc,EAAE,
|
|
1
|
+
{"version":3,"file":"getObjectValidator.js","sourceRoot":"","sources":["../../../src/ui-kit/FormField/getObjectValidator.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AACxD,OAAO,EACL,sBAAsB,EACtB,4BAA4B,EAC5B,kBAAkB,EAClB,iBAAiB,EACjB,sBAAsB,EACtB,gBAAgB,EAChB,cAAc,EACd,YAAY,EACZ,kBAAkB,EAClB,qBAAqB,EACrB,wBAAwB,EACxB,aAAa,EACb,eAAe,EACf,sBAAsB,EACtB,cAAc,EACd,cAAc,EACd,cAAc,GACf,MAAM,cAAc,CAAC;AAEtB,MAAM,CAAC,MAAM,YAAY,GAA8B;IACrD,QAAQ,EAAE,gBAAgB,EAAE;IAC5B,OAAO,EAAE,aAAa,CAAC,sBAAsB,CAAC;IAC9C,IAAI,EAAE,aAAa,CAAC,kBAAkB,CAAC;IACvC,UAAU,EAAE,aAAa,CAAC,uBAAuB,CAAC;IAClD,MAAM,EAAE,sBAAsB,EAAE;IAChC,aAAa,EAAE,sBAAsB,EAA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AAC,IAAI,EAAE,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,SAAS,CAAC,EAAE,EAAE,CAAC,SAAS,CAAC,CAC7F,CAAC;AACJ,CAAC,CAAC"}
|
|
@@ -7,7 +7,8 @@ export declare const lengthStringValidator: (inputLength: number, errorMsg?: str
|
|
|
7
7
|
export declare const serieValidator: (errorMsg: string) => import("../../validation/validator").Validator<any>;
|
|
8
8
|
export declare const numberValidator: (errorMsg: string) => import("../../validation/validator").Validator<any>;
|
|
9
9
|
export declare const innValidator: (errorMsg: string) => import("../../validation/validator").Validator<any>;
|
|
10
|
-
export declare const phoneValidator: (errorMsg: string) => import("../../validation/validator").Validator<
|
|
10
|
+
export declare const phoneValidator: (errorMsg: string) => import("../../validation/validator").Validator<string>;
|
|
11
|
+
export declare const phoneOptionalValidator: (errorMsg: string) => import("../../validation/validator").Validator<string>;
|
|
11
12
|
export declare const agreementValidator: import("../../validation/validator").Validator<any>;
|
|
12
13
|
export declare const snilsValidator: (errorMsg: string) => import("../../validation/validator").Validator<string>;
|
|
13
14
|
export declare const emailValidator: (errorMsg: string) => import("../../validation/validator").Validator<string>;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { pattern } from '../../validation/pattern.js';
|
|
2
1
|
import { required } from '../../validation/required.js';
|
|
3
2
|
import { validator } from '../../validation/validator.js';
|
|
4
3
|
const ERROR_MESSAGE = 'Некорректно заполненное поле';
|
|
@@ -14,7 +13,9 @@ export const lengthStringValidator = (inputLength, errorMsg) => validator((_) =>
|
|
|
14
13
|
export const serieValidator = (errorMsg) => validator((_) => typeof _ === 'string' && _.length === 4)(errorMsg);
|
|
15
14
|
export const numberValidator = (errorMsg) => validator((_) => typeof _ === 'string' && _.length === 6)(errorMsg);
|
|
16
15
|
export const innValidator = (errorMsg) => validator((_) => typeof _ === 'string' && (_.length === 10 || _.length === 12))(errorMsg);
|
|
17
|
-
|
|
16
|
+
const phoneValidate = (email) => /^(\+7)?[\s-]?\(?[0-9]{3}\)?[\s-]?[0-9]{3}[\s-]?[0-9]{2}[\s-]?[0-9]{2}$/.test(email);
|
|
17
|
+
export const phoneValidator = (errorMsg) => validator(phoneValidate)(errorMsg);
|
|
18
|
+
export const phoneOptionalValidator = (errorMsg) => validator((_) => !_ || phoneValidate(_))(errorMsg);
|
|
18
19
|
export const agreementValidator = validator((_) => typeof _ === 'boolean' && _)('Согласие обязательно');
|
|
19
20
|
const snilsValidate = (snils) => {
|
|
20
21
|
const snl = String(snils).replace(/[^0-9]+/g, '');
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"validators.js","sourceRoot":"","sources":["../../../src/ui-kit/FormField/validators.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"validators.js","sourceRoot":"","sources":["../../../src/ui-kit/FormField/validators.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,EAAE,MAAM,2BAA2B,CAAC;AACrD,OAAO,EAAE,SAAS,EAAE,MAAM,4BAA4B,CAAC;AAEvD,MAAM,aAAa,GAAG,8BAA8B,CAAC;AAErD,MAAM,qBAAqB,GAAG,oDAAoD,CAAC;AAEnF,MAAM,OAAO,GAAG,EAAE,CAAC;AACnB,MAAM,OAAO,GAAG,EAAE,CAAC;AACnB,MAAM,iBAAiB,GAAG,+CAA+C,CAAC;AAE1E,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAAC,QAAiB,EAAE,EAAE,CAAC,QAAQ,CAAC,QAAQ,IAAI,aAAa,CAAC,CAAC;AAE3F,MAAM,CAAC,MAAM,sBAAsB,GAAG,CAAC,QAAiB,EAAE,EAAE,CAC1D,SAAS,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,EAAE,GAAG,IAAI,CAAC,EAAE,GAAG,KAAK,EAAE,CAAC,CAAC,QAAQ,IAAI,aAAa,CAAC,CAAC;AAEvE,MAAM,CAAC,MAAM,kBAAkB,GAAG,CAAC,QAAiB,EAAE,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CAAC,MAAM,IAAI,CAAC,IAAI,CAAC,CAAC,MAAM,IAAI,EAAE,IAAI,UAAU,CAAC,CAAC,CAAC,CAAC,CACzF,QAAQ,IAAI,aAAa,CAC1B,CAAC;AAEJ,MAAM,eAAe,GAAG,yBAAyB,CAAC;AAElD,MAAM,UAAU,GAAG,CAAC,CAAC,GAAG,EAAE,EAAE,EAAE,CAAC,eAAe,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AAEvD,MAAM,uBAAuB,GAAG,CAAC,IAAW,EAAE,EAAE;IAC9C,MAAM,KAAK,GAAG,IAAI,IAAI,EAAE,CAAC;IAEzB,MAAM,OAAO,GAAG,IAAI,IAAI,CAAC,KAAK,CAAC,WAAW,EAAE,GAAG,OAAO,EAAE,KAAK,CAAC,QAAQ,EAAE,EAAE,KAAK,CAAC,OAAO,EAAE,CAAC,CAAC;IAC3F,MAAM,OAAO,GAAG,IAAI,IAAI,CAAC,KAAK,CAAC,WAAW,EAAE,GAAG,OAAO,EAAE,KAAK,CAAC,QAAQ,EAAE,EAAE,KAAK,CAAC,OAAO,EAAE,CAAC,CAAC;IAE3F,IAAI,CAAC,IAAI,IAAI,IAAI,GAAG,OAAO,IAAI,IAAI,GAAG,OAAO,EAAE;QAC7C,OAAO,KAAK,CAAC;KACd;IAED,OAAO,IAAI,CAAC;AACd,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,wBAAwB,GAAG,GAAG,EAAE,CAAC,SAAS,CAAC,uBAAuB,CAAC,CAAC,iBAAiB,CAAC,CAAC"}
|
|
@@ -1563,8 +1563,6 @@
|
|
|
1563
1563
|
const isValidationSuccess = (info) => !info?.length;
|
|
1564
1564
|
const validator = (predicate) => (message) => (_) => predicate(_) ? [] : [message];
|
|
1565
1565
|
|
|
1566
|
-
const pattern = (regexp) => validator((_) => typeof _ === 'string' && regexp.test(_));
|
|
1567
|
-
|
|
1568
1566
|
const required = validator((_) => _ !== null && _ !== undefined && _ !== '');
|
|
1569
1567
|
|
|
1570
1568
|
const ERROR_MESSAGE = 'Некорректно заполненное поле';
|
|
@@ -1580,7 +1578,9 @@
|
|
|
1580
1578
|
const serieValidator = (errorMsg) => validator((_) => typeof _ === 'string' && _.length === 4)(errorMsg);
|
|
1581
1579
|
const numberValidator = (errorMsg) => validator((_) => typeof _ === 'string' && _.length === 6)(errorMsg);
|
|
1582
1580
|
const innValidator = (errorMsg) => validator((_) => typeof _ === 'string' && (_.length === 10 || _.length === 12))(errorMsg);
|
|
1583
|
-
const
|
|
1581
|
+
const phoneValidate = (email) => /^(\+7)?[\s-]?\(?[0-9]{3}\)?[\s-]?[0-9]{3}[\s-]?[0-9]{2}[\s-]?[0-9]{2}$/.test(email);
|
|
1582
|
+
const phoneValidator = (errorMsg) => validator(phoneValidate)(errorMsg);
|
|
1583
|
+
const phoneOptionalValidator = (errorMsg) => validator((_) => !_ || phoneValidate(_))(errorMsg);
|
|
1584
1584
|
const agreementValidator = validator((_) => typeof _ === 'boolean' && _)('Согласие обязательно');
|
|
1585
1585
|
const snilsValidate = (snils) => {
|
|
1586
1586
|
const snl = String(snils).replace(/[^0-9]+/g, '');
|
|
@@ -1627,7 +1627,7 @@
|
|
|
1627
1627
|
region: defaultSelectValidator(),
|
|
1628
1628
|
addressBranch: defaultSelectValidator(),
|
|
1629
1629
|
phone: phoneValidator('Укажите номер телефона'),
|
|
1630
|
-
secondaryPhone:
|
|
1630
|
+
secondaryPhone: phoneOptionalValidator('Укажите номер телефона'),
|
|
1631
1631
|
organizationPhone: phoneValidator('Укажите номер телефона'),
|
|
1632
1632
|
birthday: defaultValidator('Укажите дату рождения'),
|
|
1633
1633
|
limitedBirthday: limitedBirthdayValidator(),
|
|
@@ -4065,15 +4065,7 @@
|
|
|
4065
4065
|
return (jsx(SelectControl, { label: "\u0420\u0435\u0433\u0438\u043E\u043D", placeholder: "\u0412\u044B\u0431\u0435\u0440\u0438\u0442\u0435 \u0440\u0435\u0433\u0438\u043E\u043D", isSearch: true, options: formatRegions, ...getValidation(field('regionRetail'), validatorObj.regionRetail, input?.required) }));
|
|
4066
4066
|
});
|
|
4067
4067
|
|
|
4068
|
-
const RetirementIncomeField = JSX(({ field, input }) => {
|
|
4069
|
-
const currentWages = field('wages')?.value;
|
|
4070
|
-
const onChange = useCallback((_) => {
|
|
4071
|
-
const incomesSum = Number(_) + Number(currentWages || 0);
|
|
4072
|
-
field('retirementIncome')?.onChange?.(_);
|
|
4073
|
-
field('incomeAverage')?.onChange?.(String(incomesSum));
|
|
4074
|
-
}, [currentWages]);
|
|
4075
|
-
return (jsx(InputControl, { label: "\u041F\u0435\u043D\u0441\u0438\u043E\u043D\u043D\u044B\u0435 \u0434\u043E\u0445\u043E\u0434\u044B", placeholder: "\u0412\u0432\u0435\u0434\u0438\u0442\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435", isInteger: true, ...getValidation(field('retirementIncome'), validatorObj.retirementIncome, input?.required), ...input, onChange: onChange }));
|
|
4076
|
-
});
|
|
4068
|
+
const RetirementIncomeField = JSX(({ field, input }) => (jsx(InputControl, { label: "\u041F\u0435\u043D\u0441\u0438\u043E\u043D\u043D\u044B\u0435 \u0434\u043E\u0445\u043E\u0434\u044B", placeholder: "\u0412\u0432\u0435\u0434\u0438\u0442\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435", isInteger: true, ...getValidation(field('retirementIncome'), validatorObj.retirementIncome, input?.required), ...input })));
|
|
4077
4069
|
|
|
4078
4070
|
const SecondaryPhoneField = JSX(({ field }) => {
|
|
4079
4071
|
const fieldPhone = field('secondaryPhone');
|
|
@@ -4162,15 +4154,7 @@
|
|
|
4162
4154
|
return (jsx("div", { className: "py-m gap-m grid @xl:flex @xl:items-center", children: jsx(RadioButtonGroup, { className: "whitespace-normal", orientation: "horizontal", items: VED_TYPES, value: value, onChange: (_) => onChange && onChange(_) }) }));
|
|
4163
4155
|
});
|
|
4164
4156
|
|
|
4165
|
-
const WagesField = JSX(({ field, input }) => {
|
|
4166
|
-
const currentRetirementIncome = field('retirementIncome')?.value;
|
|
4167
|
-
const onChange = useCallback((_) => {
|
|
4168
|
-
const incomesSum = Number(_) + Number(currentRetirementIncome || 0);
|
|
4169
|
-
field('wages')?.onChange?.(_);
|
|
4170
|
-
field('incomeAverage')?.onChange?.(String(incomesSum));
|
|
4171
|
-
}, [currentRetirementIncome]);
|
|
4172
|
-
return (jsx(InputControl, { label: "\u0421\u043E\u0432\u043E\u043A\u0443\u043F\u043D\u044B\u0439 \u0434\u043E\u0445\u043E\u0434 \u0432 \u043C\u0435\u0441\u044F\u0446 \u043F\u043E\u0441\u043B\u0435 \u0432\u044B\u0447\u0435\u0442\u0430 \u043D\u0430\u043B\u043E\u0433\u043E\u0432 (\u0437\u0430\u0440\u043F\u043B\u0430\u0442\u0430, \u043F\u0440\u0435\u043C\u0438\u0438)", placeholder: "\u0412\u0432\u0435\u0434\u0438\u0442\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435", isInteger: true, ...getValidation(field('wages'), validatorObj.wages, input?.required), ...input, onChange: onChange }));
|
|
4173
|
-
});
|
|
4157
|
+
const WagesField = JSX(({ field, input }) => (jsx(InputControl, { label: "\u0421\u043E\u0432\u043E\u043A\u0443\u043F\u043D\u044B\u0439 \u0434\u043E\u0445\u043E\u0434 \u0432 \u043C\u0435\u0441\u044F\u0446 \u043F\u043E\u0441\u043B\u0435 \u0432\u044B\u0447\u0435\u0442\u0430 \u043D\u0430\u043B\u043E\u0433\u043E\u0432 (\u0437\u0430\u0440\u043F\u043B\u0430\u0442\u0430, \u043F\u0440\u0435\u043C\u0438\u0438)", placeholder: "\u0412\u0432\u0435\u0434\u0438\u0442\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435", isInteger: true, ...getValidation(field('wages'), validatorObj.wages, input?.required), ...input })));
|
|
4174
4158
|
|
|
4175
4159
|
function isRenderField({ input, field, }) {
|
|
4176
4160
|
const { condition } = input;
|
|
@@ -4423,9 +4407,7 @@
|
|
|
4423
4407
|
}, [responseType]);
|
|
4424
4408
|
return (jsxs(ApplicationFormLayout, { className: style('container space-y-m', className), title: title, ...rest, children: [jsxs("form", { onSubmit: onSubmit, children: [sections.map((_, i) => (jsxs("div", { className: style(inputColumnStyles(_.columns), 'grid gap-x-m'), children: [renderTitle(_.title), (_?.inputs || [])?.map(getField(field, { typeForm }))] }, `section-${i}`))), renderAgreementSubmit(fieldName ? field('consentDataProcessing') : undefined, link, button)] }), isContacts ? renderContacts() : null] }));
|
|
4425
4409
|
});
|
|
4426
|
-
const getFilteredInputs = (inputs, data) => inputs
|
|
4427
|
-
.filter((_) => (_?.name === 'secondaryPhone' ? Boolean(data.secondaryPhone) : _))
|
|
4428
|
-
.filter((input) => !input?.condition ||
|
|
4410
|
+
const getFilteredInputs = (inputs, data) => inputs.filter((input) => !input?.condition ||
|
|
4429
4411
|
input?.condition.values.find((_) => {
|
|
4430
4412
|
const dataValue = data?.[input?.condition?.name ?? ''];
|
|
4431
4413
|
return _ === (dataValue?.key ?? dataValue);
|
|
@@ -4800,6 +4782,98 @@
|
|
|
4800
4782
|
|
|
4801
4783
|
const DraftActionButton = JSX(({ title, icon, description, onClick = noop }) => (jsxs("button", { className: "flex gap-lg items-center border border-gray rounded-md cursor-pointer p-4 hover:border-green", type: "button", onClick: onClick, children: [jsx(Img, { image: { icon: icon, iconVersion: 'black' }, width: "78", height: "78" }), jsxs("div", { className: "w-full md:w-auto", children: [jsx(Heading, { className: "text-center md:text-left", title: title, headingType: "h5" }), description ? (jsx(Paragraph, { color: "text-secondary-text", size: "text-m", children: description })) : null] })] })));
|
|
4802
4784
|
|
|
4785
|
+
const fieldsNamesToContactKeysMap = {
|
|
4786
|
+
email: 'EMAIL',
|
|
4787
|
+
phone: 'MAIN_PHONE',
|
|
4788
|
+
organizationPhone: 'ORGANIZATION_PHONE',
|
|
4789
|
+
};
|
|
4790
|
+
const fieldsNamesToAddressKeysMap = {
|
|
4791
|
+
addressRegistration: 'REGISTRATION',
|
|
4792
|
+
addressFact: 'RESIDENTAL',
|
|
4793
|
+
organizationAddress: 'WORK',
|
|
4794
|
+
addressCourier: 'DELIVERY',
|
|
4795
|
+
};
|
|
4796
|
+
const fieldsNamesToIncomeKeysMap = {
|
|
4797
|
+
incomeAverage: 'INCOME_AVERAGE',
|
|
4798
|
+
mandatoryPayments: 'MANDATORY_PAYMENTS',
|
|
4799
|
+
additionalIncome: 'ADDITIONAL_INCOME',
|
|
4800
|
+
otherIncome: 'OTHER_INCOME',
|
|
4801
|
+
otherPayments: 'OTHER_PAYMENTS',
|
|
4802
|
+
rentalIncome: 'RENTAL_INCOME',
|
|
4803
|
+
wages: 'WAGES',
|
|
4804
|
+
retirementIncome: 'RETIREMENT_INCOME',
|
|
4805
|
+
};
|
|
4806
|
+
const getParticipantContacts$1 = (fields) => Object.entries(fields).reduce((acc, [key, value]) => {
|
|
4807
|
+
if (key in fieldsNamesToContactKeysMap) {
|
|
4808
|
+
return [
|
|
4809
|
+
...acc,
|
|
4810
|
+
{
|
|
4811
|
+
contactTypeCd: {
|
|
4812
|
+
key: fieldsNamesToContactKeysMap[key],
|
|
4813
|
+
},
|
|
4814
|
+
value,
|
|
4815
|
+
},
|
|
4816
|
+
];
|
|
4817
|
+
}
|
|
4818
|
+
return acc;
|
|
4819
|
+
}, []);
|
|
4820
|
+
const getParticipantAddresses$1 = (fields) => Object.entries(fields).reduce((acc, [key, value]) => {
|
|
4821
|
+
if (key in fieldsNamesToAddressKeysMap) {
|
|
4822
|
+
const address = Object.fromEntries(Object.entries(value ?? {})
|
|
4823
|
+
.filter(([k]) => !k.startsWith('qc')) // exclude dadata fields
|
|
4824
|
+
.map(([k, v]) => [k, v ?? '']));
|
|
4825
|
+
return [
|
|
4826
|
+
...acc,
|
|
4827
|
+
{
|
|
4828
|
+
addressType: {
|
|
4829
|
+
key: fieldsNamesToAddressKeysMap[key],
|
|
4830
|
+
},
|
|
4831
|
+
...address,
|
|
4832
|
+
},
|
|
4833
|
+
];
|
|
4834
|
+
}
|
|
4835
|
+
return acc;
|
|
4836
|
+
}, []);
|
|
4837
|
+
const getParticipantIncomes$1 = (fields) => Object.entries(fields).reduce((acc, [key, value]) => {
|
|
4838
|
+
if (key in fieldsNamesToIncomeKeysMap) {
|
|
4839
|
+
return [
|
|
4840
|
+
...acc,
|
|
4841
|
+
{
|
|
4842
|
+
incomeTypeCd: {
|
|
4843
|
+
key: fieldsNamesToIncomeKeysMap[key],
|
|
4844
|
+
},
|
|
4845
|
+
value: Number(value || 0),
|
|
4846
|
+
},
|
|
4847
|
+
];
|
|
4848
|
+
}
|
|
4849
|
+
return acc;
|
|
4850
|
+
}, []);
|
|
4851
|
+
|
|
4852
|
+
const getFamilyStatusAndIncomeData = (formData) => {
|
|
4853
|
+
const { familyStatus, dependents, familyMembers, children, confirmationIncome, wages, mandatoryPayments, additionalIncome, otherIncome, otherPayments, rentalIncome, retirementIncome, snils, armyIdFlg, conscription, } = formData;
|
|
4854
|
+
return {
|
|
4855
|
+
maritalStatusCd: familyStatus,
|
|
4856
|
+
totalDependents: familyMembers,
|
|
4857
|
+
incomeCertificateCd: confirmationIncome,
|
|
4858
|
+
otherDependents: dependents,
|
|
4859
|
+
childrenDependents: children,
|
|
4860
|
+
militaryStatusCd: conscription,
|
|
4861
|
+
participantIncomes: getParticipantIncomes$1({
|
|
4862
|
+
wages,
|
|
4863
|
+
mandatoryPayments,
|
|
4864
|
+
incomeAverage: countIncomeAverage(wages, retirementIncome),
|
|
4865
|
+
additionalIncome,
|
|
4866
|
+
otherIncome,
|
|
4867
|
+
otherPayments,
|
|
4868
|
+
rentalIncome,
|
|
4869
|
+
retirementIncome,
|
|
4870
|
+
}),
|
|
4871
|
+
snils: snils?.replaceAll(' ', '').replaceAll('-', ''),
|
|
4872
|
+
armyIdFlg,
|
|
4873
|
+
};
|
|
4874
|
+
};
|
|
4875
|
+
const countIncomeAverage = (wages, retirementIncome) => Number(wages) + Number(retirementIncome);
|
|
4876
|
+
|
|
4803
4877
|
const creditCodesToProgrammIdMap = {
|
|
4804
4878
|
credit_cash: '10',
|
|
4805
4879
|
credit_cash_single_doc: '28',
|
|
@@ -4822,15 +4896,15 @@
|
|
|
4822
4896
|
...creditCodesToProgrammIdMap,
|
|
4823
4897
|
...cardCodesToProgrammIdMap,
|
|
4824
4898
|
};
|
|
4825
|
-
const getParticipantIncomes
|
|
4899
|
+
const getParticipantIncomes = (participantIncomes) => {
|
|
4826
4900
|
const wages = participantIncomes?.find((contact) => contact.incomeTypeCd.key === "WAGES" /* EIncomesType.WAGES */)?.value;
|
|
4827
4901
|
const mandatoryPayments = participantIncomes?.find((contact) => contact.incomeTypeCd.key === "MANDATORY_PAYMENTS" /* EIncomesType.MANDATORY_PAYMENTS */)?.value;
|
|
4828
|
-
const incomeAverage = participantIncomes?.find((contact) => contact.incomeTypeCd.key === "INCOME_AVERAGE" /* EIncomesType.INCOME_AVERAGE */)?.value;
|
|
4829
4902
|
const additionalIncome = participantIncomes?.find((contact) => contact.incomeTypeCd.key === "ADDITIONAL_INCOME" /* EIncomesType.ADDITIONAL_INCOME */)?.value;
|
|
4830
4903
|
const otherIncome = participantIncomes?.find((contact) => contact.incomeTypeCd.key === "OTHER_INCOME" /* EIncomesType.OTHER_INCOME */)?.value;
|
|
4831
4904
|
const otherPayments = participantIncomes?.find((contact) => contact.incomeTypeCd.key === "OTHER_PAYMENTS" /* EIncomesType.OTHER_PAYMENTS */)?.value;
|
|
4832
4905
|
const rentalIncome = participantIncomes?.find((contact) => contact.incomeTypeCd.key === "RENTAL_INCOME" /* EIncomesType.RENTAL_INCOME */)?.value;
|
|
4833
4906
|
const retirementIncome = participantIncomes?.find((contact) => contact.incomeTypeCd.key === "RETIREMENT_INCOME" /* EIncomesType.RETIREMENT_INCOME */)?.value;
|
|
4907
|
+
const incomeAverage = countIncomeAverage(wages, retirementIncome);
|
|
4834
4908
|
return {
|
|
4835
4909
|
wages,
|
|
4836
4910
|
mandatoryPayments,
|
|
@@ -4842,7 +4916,7 @@
|
|
|
4842
4916
|
retirementIncome,
|
|
4843
4917
|
};
|
|
4844
4918
|
};
|
|
4845
|
-
const getParticipantAddresses
|
|
4919
|
+
const getParticipantAddresses = (participantAddresses) => {
|
|
4846
4920
|
const addressRegistration = participantAddresses?.find((address) => address.addressType.key === "REGISTRATION" /* EAddressType.REGISTRATION */);
|
|
4847
4921
|
const addressFact = participantAddresses?.find((address) => address.addressType.key === "RESIDENTAL" /* EAddressType.RESIDENTAL */);
|
|
4848
4922
|
const organizationAddress = participantAddresses?.find((address) => address.addressType.key === "WORK" /* EAddressType.WORK */);
|
|
@@ -4852,7 +4926,7 @@
|
|
|
4852
4926
|
organizationAddress,
|
|
4853
4927
|
};
|
|
4854
4928
|
};
|
|
4855
|
-
const getParticipantContacts
|
|
4929
|
+
const getParticipantContacts = (participantContacts) => {
|
|
4856
4930
|
const email = participantContacts?.find((contact) => contact.contactTypeCd.key === "EMAIL" /* EContactType.EMail */)?.value;
|
|
4857
4931
|
const phone = participantContacts?.find((contact) => contact.contactTypeCd.key === "MAIN_PHONE" /* EContactType.MainPhone */)?.value;
|
|
4858
4932
|
const organizationPhone = participantContacts?.find((contact) => contact.contactTypeCd.key === "ORGANIZATION_PHONE" /* EContactType.OrganizationPhone */)?.value;
|
|
@@ -4934,9 +5008,9 @@
|
|
|
4934
5008
|
monthsValue,
|
|
4935
5009
|
isAnnuity: paymentTypeCd?.key === 'ANNUITY',
|
|
4936
5010
|
},
|
|
4937
|
-
...getParticipantIncomes
|
|
4938
|
-
...getParticipantAddresses
|
|
4939
|
-
...getParticipantContacts
|
|
5011
|
+
...getParticipantIncomes(participantIncomes),
|
|
5012
|
+
...getParticipantAddresses(participantAddresses),
|
|
5013
|
+
...getParticipantContacts(participantContacts),
|
|
4940
5014
|
...getParticipantGender(genderCd),
|
|
4941
5015
|
};
|
|
4942
5016
|
};
|
|
@@ -5021,73 +5095,6 @@
|
|
|
5021
5095
|
}, [open, nextStepLink]);
|
|
5022
5096
|
};
|
|
5023
5097
|
|
|
5024
|
-
const fieldsNamesToContactKeysMap = {
|
|
5025
|
-
email: 'EMAIL',
|
|
5026
|
-
phone: 'MAIN_PHONE',
|
|
5027
|
-
organizationPhone: 'ORGANIZATION_PHONE',
|
|
5028
|
-
};
|
|
5029
|
-
const fieldsNamesToAddressKeysMap = {
|
|
5030
|
-
addressRegistration: 'REGISTRATION',
|
|
5031
|
-
addressFact: 'RESIDENTAL',
|
|
5032
|
-
organizationAddress: 'WORK',
|
|
5033
|
-
addressCourier: 'DELIVERY',
|
|
5034
|
-
};
|
|
5035
|
-
const fieldsNamesToIncomeKeysMap = {
|
|
5036
|
-
incomeAverage: 'INCOME_AVERAGE',
|
|
5037
|
-
mandatoryPayments: 'MANDATORY_PAYMENTS',
|
|
5038
|
-
additionalIncome: 'ADDITIONAL_INCOME',
|
|
5039
|
-
otherIncome: 'OTHER_INCOME',
|
|
5040
|
-
otherPayments: 'OTHER_PAYMENTS',
|
|
5041
|
-
rentalIncome: 'RENTAL_INCOME',
|
|
5042
|
-
wages: 'WAGES',
|
|
5043
|
-
retirementIncome: 'RETIREMENT_INCOME',
|
|
5044
|
-
};
|
|
5045
|
-
const getParticipantContacts = (fields) => Object.entries(fields).reduce((acc, [key, value]) => {
|
|
5046
|
-
if (key in fieldsNamesToContactKeysMap) {
|
|
5047
|
-
return [
|
|
5048
|
-
...acc,
|
|
5049
|
-
{
|
|
5050
|
-
contactTypeCd: {
|
|
5051
|
-
key: fieldsNamesToContactKeysMap[key],
|
|
5052
|
-
},
|
|
5053
|
-
value,
|
|
5054
|
-
},
|
|
5055
|
-
];
|
|
5056
|
-
}
|
|
5057
|
-
return acc;
|
|
5058
|
-
}, []);
|
|
5059
|
-
const getParticipantAddresses = (fields) => Object.entries(fields).reduce((acc, [key, value]) => {
|
|
5060
|
-
if (key in fieldsNamesToAddressKeysMap) {
|
|
5061
|
-
const address = Object.fromEntries(Object.entries(value ?? {})
|
|
5062
|
-
.filter(([k]) => !k.startsWith('qc')) // exclude dadata fields
|
|
5063
|
-
.map(([k, v]) => [k, v ?? '']));
|
|
5064
|
-
return [
|
|
5065
|
-
...acc,
|
|
5066
|
-
{
|
|
5067
|
-
addressType: {
|
|
5068
|
-
key: fieldsNamesToAddressKeysMap[key],
|
|
5069
|
-
},
|
|
5070
|
-
...address,
|
|
5071
|
-
},
|
|
5072
|
-
];
|
|
5073
|
-
}
|
|
5074
|
-
return acc;
|
|
5075
|
-
}, []);
|
|
5076
|
-
const getParticipantIncomes = (fields) => Object.entries(fields).reduce((acc, [key, value]) => {
|
|
5077
|
-
if (key in fieldsNamesToIncomeKeysMap) {
|
|
5078
|
-
return [
|
|
5079
|
-
...acc,
|
|
5080
|
-
{
|
|
5081
|
-
incomeTypeCd: {
|
|
5082
|
-
key: fieldsNamesToIncomeKeysMap[key],
|
|
5083
|
-
},
|
|
5084
|
-
value: Number(value || 0),
|
|
5085
|
-
},
|
|
5086
|
-
];
|
|
5087
|
-
}
|
|
5088
|
-
return acc;
|
|
5089
|
-
}, []);
|
|
5090
|
-
|
|
5091
5098
|
const getLeadFormTaskData = ({ participantId, taskId, profileId, formData, }) => {
|
|
5092
5099
|
const { name, surname, middleName, limitedBirthday, phone, email } = formData;
|
|
5093
5100
|
const navigator = locationNavigator();
|
|
@@ -5107,7 +5114,7 @@
|
|
|
5107
5114
|
profile: {
|
|
5108
5115
|
id: profileId,
|
|
5109
5116
|
},
|
|
5110
|
-
participantContacts: getParticipantContacts({
|
|
5117
|
+
participantContacts: getParticipantContacts$1({
|
|
5111
5118
|
phone: phone && formatPhone(phone),
|
|
5112
5119
|
email,
|
|
5113
5120
|
}),
|
|
@@ -7033,38 +7040,14 @@
|
|
|
7033
7040
|
jobsNumber,
|
|
7034
7041
|
lastWorkDuration: lastJobExperience,
|
|
7035
7042
|
positionCd: positionOrganization,
|
|
7036
|
-
participantContacts: getParticipantContacts({
|
|
7043
|
+
participantContacts: getParticipantContacts$1({
|
|
7037
7044
|
organizationPhone: organizationPhone && formatPhone(organizationPhone),
|
|
7038
7045
|
}),
|
|
7039
|
-
participantAddresses: getParticipantAddresses({ organizationAddress }),
|
|
7046
|
+
participantAddresses: getParticipantAddresses$1({ organizationAddress }),
|
|
7040
7047
|
ownershipShare: positionOrganization?.key === 'BUSINESS_OWNER' ? partInBusiness : '',
|
|
7041
7048
|
};
|
|
7042
7049
|
};
|
|
7043
7050
|
|
|
7044
|
-
const getFamilyStatusAndIncomeData = (formData) => {
|
|
7045
|
-
const { familyStatus, dependents, familyMembers, children, confirmationIncome, wages, mandatoryPayments, incomeAverage, additionalIncome, otherIncome, otherPayments, rentalIncome, retirementIncome, snils, armyIdFlg, conscription, } = formData;
|
|
7046
|
-
return {
|
|
7047
|
-
maritalStatusCd: familyStatus,
|
|
7048
|
-
totalDependents: familyMembers,
|
|
7049
|
-
incomeCertificateCd: confirmationIncome,
|
|
7050
|
-
otherDependents: dependents,
|
|
7051
|
-
childrenDependents: children,
|
|
7052
|
-
militaryStatusCd: conscription,
|
|
7053
|
-
participantIncomes: getParticipantIncomes({
|
|
7054
|
-
wages,
|
|
7055
|
-
mandatoryPayments,
|
|
7056
|
-
incomeAverage,
|
|
7057
|
-
additionalIncome,
|
|
7058
|
-
otherIncome,
|
|
7059
|
-
otherPayments,
|
|
7060
|
-
rentalIncome,
|
|
7061
|
-
retirementIncome,
|
|
7062
|
-
}),
|
|
7063
|
-
snils: snils?.replaceAll(' ', '').replaceAll('-', ''),
|
|
7064
|
-
armyIdFlg,
|
|
7065
|
-
};
|
|
7066
|
-
};
|
|
7067
|
-
|
|
7068
7051
|
const getPersonalInfoData = (formData) => {
|
|
7069
7052
|
const { name, surname, middleName, limitedBirthday = '', phone = '', email, sex, birthPlace, dulIssueDateField = '', dulIssuedBy, dulNumber, dulSerie, dulSubdivisionCode, education, participantDateRegistration = '', housing, addressRegistration, addressFact, } = formData;
|
|
7070
7053
|
return {
|
|
@@ -7081,11 +7064,11 @@
|
|
|
7081
7064
|
educationLevelCd: education,
|
|
7082
7065
|
registrationDate: formatDate(participantDateRegistration, true),
|
|
7083
7066
|
houseTypeCd: housing,
|
|
7084
|
-
participantContacts: getParticipantContacts({
|
|
7067
|
+
participantContacts: getParticipantContacts$1({
|
|
7085
7068
|
phone: formatPhone(phone),
|
|
7086
7069
|
email,
|
|
7087
7070
|
}),
|
|
7088
|
-
participantAddresses: getParticipantAddresses({ addressRegistration, addressFact }),
|
|
7071
|
+
participantAddresses: getParticipantAddresses$1({ addressRegistration, addressFact }),
|
|
7089
7072
|
genderCd: sex
|
|
7090
7073
|
? {
|
|
7091
7074
|
key: sex === 'male' ? 'MAN' : 'WOMAN',
|
|
@@ -7126,7 +7109,7 @@
|
|
|
7126
7109
|
const isCourierDelivery = methodObtain === 'courier';
|
|
7127
7110
|
return isCourierDelivery
|
|
7128
7111
|
? {
|
|
7129
|
-
participantAddresses: getParticipantAddresses({ addressCourier }),
|
|
7112
|
+
participantAddresses: getParticipantAddresses$1({ addressCourier }),
|
|
7130
7113
|
}
|
|
7131
7114
|
: {};
|
|
7132
7115
|
};
|
|
@@ -10133,7 +10116,7 @@
|
|
|
10133
10116
|
slots: () => [HEADER_SLOT, FOOTER_SLOT, STICKY_FOOTER_SLOT],
|
|
10134
10117
|
});
|
|
10135
10118
|
|
|
10136
|
-
const packageVersion = "0.14.
|
|
10119
|
+
const packageVersion = "0.14.724";
|
|
10137
10120
|
|
|
10138
10121
|
exports.Blocks = Blocks;
|
|
10139
10122
|
exports.ContentPage = ContentPage;
|