@redneckz/wildless-cms-uni-blocks 0.14.648 → 0.14.649
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 +15 -2
- package/bundle/bundle.umd.min.js +1 -1
- package/bundle/components/ApplicationLeadForm/getInitialFormState.d.ts +1 -0
- package/bundle/components/CreditForm/formStateMap.d.ts +1 -0
- package/bundle/ui-kit/FormField/Fields/ConfirmationIncomeField.d.ts +2 -0
- package/bundle/ui-kit/FormField/NameFieldDef.d.ts +1 -1
- package/dist/components/ApplicationLeadForm/getInitialFormState.d.ts +1 -0
- package/dist/components/ApplicationLeadForm/getInitialFormState.js.map +1 -1
- package/dist/components/CreditForm/creditFormStepsData.js +4 -0
- package/dist/components/CreditForm/creditFormStepsData.js.map +1 -1
- package/dist/components/CreditForm/formStateMap.d.ts +1 -0
- package/dist/components/CreditForm/formStateMap.js +1 -0
- package/dist/components/CreditForm/formStateMap.js.map +1 -1
- package/dist/components/CreditForm/getThirdStepData.js +2 -1
- package/dist/components/CreditForm/getThirdStepData.js.map +1 -1
- package/dist/ui-kit/FormField/Fields/ConfirmationIncomeField.d.ts +2 -0
- package/dist/ui-kit/FormField/Fields/ConfirmationIncomeField.js +11 -0
- package/dist/ui-kit/FormField/Fields/ConfirmationIncomeField.js.map +1 -0
- package/dist/ui-kit/FormField/NameFieldDef.d.ts +1 -1
- package/dist/ui-kit/FormField/getField.js +2 -0
- 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/lib/components/ApplicationLeadForm/getInitialFormState.d.ts +1 -0
- package/lib/components/ApplicationLeadForm/getInitialFormState.js.map +1 -1
- package/lib/components/CreditForm/creditFormStepsData.js +4 -0
- package/lib/components/CreditForm/creditFormStepsData.js.map +1 -1
- package/lib/components/CreditForm/formStateMap.d.ts +1 -0
- package/lib/components/CreditForm/formStateMap.js +1 -0
- package/lib/components/CreditForm/formStateMap.js.map +1 -1
- package/lib/components/CreditForm/getThirdStepData.js +2 -1
- package/lib/components/CreditForm/getThirdStepData.js.map +1 -1
- package/lib/ui-kit/FormField/Fields/ConfirmationIncomeField.d.ts +2 -0
- package/lib/ui-kit/FormField/Fields/ConfirmationIncomeField.js +9 -0
- package/lib/ui-kit/FormField/Fields/ConfirmationIncomeField.js.map +1 -0
- package/lib/ui-kit/FormField/NameFieldDef.d.ts +1 -1
- package/lib/ui-kit/FormField/getField.js +2 -0
- package/lib/ui-kit/FormField/getField.js.map +1 -1
- package/lib/ui-kit/FormField/getObjectValidator.js +1 -0
- package/lib/ui-kit/FormField/getObjectValidator.js.map +1 -1
- package/mobile/bundle/bundle.umd.js +15 -2
- package/mobile/bundle/bundle.umd.min.js +1 -1
- package/mobile/bundle/components/ApplicationLeadForm/getInitialFormState.d.ts +1 -0
- package/mobile/bundle/components/CreditForm/formStateMap.d.ts +1 -0
- package/mobile/bundle/ui-kit/FormField/Fields/ConfirmationIncomeField.d.ts +2 -0
- package/mobile/bundle/ui-kit/FormField/NameFieldDef.d.ts +1 -1
- package/mobile/dist/components/ApplicationLeadForm/getInitialFormState.d.ts +1 -0
- package/mobile/dist/components/ApplicationLeadForm/getInitialFormState.js.map +1 -1
- package/mobile/dist/components/CreditForm/creditFormStepsData.js +4 -0
- package/mobile/dist/components/CreditForm/creditFormStepsData.js.map +1 -1
- package/mobile/dist/components/CreditForm/formStateMap.d.ts +1 -0
- package/mobile/dist/components/CreditForm/formStateMap.js +1 -0
- package/mobile/dist/components/CreditForm/formStateMap.js.map +1 -1
- package/mobile/dist/components/CreditForm/getThirdStepData.js +2 -1
- package/mobile/dist/components/CreditForm/getThirdStepData.js.map +1 -1
- package/mobile/dist/ui-kit/FormField/Fields/ConfirmationIncomeField.d.ts +2 -0
- package/mobile/dist/ui-kit/FormField/Fields/ConfirmationIncomeField.js +11 -0
- package/mobile/dist/ui-kit/FormField/Fields/ConfirmationIncomeField.js.map +1 -0
- package/mobile/dist/ui-kit/FormField/NameFieldDef.d.ts +1 -1
- package/mobile/dist/ui-kit/FormField/getField.js +2 -0
- 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/lib/components/ApplicationLeadForm/getInitialFormState.d.ts +1 -0
- package/mobile/lib/components/ApplicationLeadForm/getInitialFormState.js.map +1 -1
- package/mobile/lib/components/CreditForm/creditFormStepsData.js +4 -0
- package/mobile/lib/components/CreditForm/creditFormStepsData.js.map +1 -1
- package/mobile/lib/components/CreditForm/formStateMap.d.ts +1 -0
- package/mobile/lib/components/CreditForm/formStateMap.js +1 -0
- package/mobile/lib/components/CreditForm/formStateMap.js.map +1 -1
- package/mobile/lib/components/CreditForm/getThirdStepData.js +2 -1
- package/mobile/lib/components/CreditForm/getThirdStepData.js.map +1 -1
- package/mobile/lib/ui-kit/FormField/Fields/ConfirmationIncomeField.d.ts +2 -0
- package/mobile/lib/ui-kit/FormField/Fields/ConfirmationIncomeField.js +9 -0
- package/mobile/lib/ui-kit/FormField/Fields/ConfirmationIncomeField.js.map +1 -0
- package/mobile/lib/ui-kit/FormField/NameFieldDef.d.ts +1 -1
- package/mobile/lib/ui-kit/FormField/getField.js +2 -0
- package/mobile/lib/ui-kit/FormField/getField.js.map +1 -1
- package/mobile/lib/ui-kit/FormField/getObjectValidator.js +1 -0
- package/mobile/lib/ui-kit/FormField/getObjectValidator.js.map +1 -1
- package/mobile/src/components/ApplicationLeadForm/getInitialFormState.tsx +1 -0
- package/mobile/src/components/CreditForm/creditFormStepsData.tsx +4 -0
- package/mobile/src/components/CreditForm/formStateMap.tsx +3 -0
- package/mobile/src/components/CreditForm/getThirdStepData.ts +2 -0
- package/mobile/src/ui-kit/FormField/Fields/ConfirmationIncomeField.tsx +18 -0
- package/mobile/src/ui-kit/FormField/NameFieldDef.ts +2 -1
- package/mobile/src/ui-kit/FormField/getField.tsx +2 -0
- package/mobile/src/ui-kit/FormField/getObjectValidator.tsx +1 -0
- package/package.json +1 -1
- package/src/components/ApplicationLeadForm/getInitialFormState.tsx +1 -0
- package/src/components/CreditForm/creditFormStepsData.tsx +4 -0
- package/src/components/CreditForm/formStateMap.tsx +3 -0
- package/src/components/CreditForm/getThirdStepData.ts +2 -0
- package/src/ui-kit/FormField/Fields/ConfirmationIncomeField.tsx +18 -0
- package/src/ui-kit/FormField/NameFieldDef.ts +2 -1
- package/src/ui-kit/FormField/getField.tsx +2 -0
- package/src/ui-kit/FormField/getObjectValidator.tsx +1 -0
|
@@ -7,6 +7,7 @@ export const getThirdStepData = (formData: FormState): Partial<Participant> => {
|
|
|
7
7
|
familyStatus,
|
|
8
8
|
dependents,
|
|
9
9
|
familyMembers,
|
|
10
|
+
confirmationIncome,
|
|
10
11
|
mandatoryIncome,
|
|
11
12
|
otherPayments,
|
|
12
13
|
snils,
|
|
@@ -16,6 +17,7 @@ export const getThirdStepData = (formData: FormState): Partial<Participant> => {
|
|
|
16
17
|
return {
|
|
17
18
|
maritalStatusCd: familyStatus,
|
|
18
19
|
totalDependents: familyMembers,
|
|
20
|
+
incomeCertificateCd: confirmationIncome,
|
|
19
21
|
otherDependents: dependents,
|
|
20
22
|
participantIncomes: getParticipantIncomes({
|
|
21
23
|
mandatoryIncome,
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { JSX } from '@redneckz/uni-jsx';
|
|
2
|
+
import { useLeadFormData } from '../../../hooks/useLeadFormData';
|
|
3
|
+
import { type CustomFieldProps } from '../CustomFieldProps';
|
|
4
|
+
import { SelectField } from '../SelectField';
|
|
5
|
+
|
|
6
|
+
export const ConfirmationIncomeField = JSX<CustomFieldProps>(({ field, input }) => {
|
|
7
|
+
const { data: confirmationIncome } = useLeadFormData('INCOME_CERT_UNITED');
|
|
8
|
+
|
|
9
|
+
return (
|
|
10
|
+
<SelectField
|
|
11
|
+
field={field}
|
|
12
|
+
source={confirmationIncome}
|
|
13
|
+
label="Способ подтверждения дохода"
|
|
14
|
+
fieldName="confirmationIncome"
|
|
15
|
+
input={input}
|
|
16
|
+
/>
|
|
17
|
+
);
|
|
18
|
+
});
|
|
@@ -24,6 +24,7 @@ import { ChildrenField } from './Fields/ChildrenField';
|
|
|
24
24
|
import { CodeWordField } from './Fields/CodeWordField';
|
|
25
25
|
import { CollectionCountField } from './Fields/CollectionCountField';
|
|
26
26
|
import { CommentField } from './Fields/CommentField';
|
|
27
|
+
import { ConfirmationIncomeField } from './Fields/ConfirmationIncomeField';
|
|
27
28
|
import { ConscriptionField } from './Fields/ConscriptionField';
|
|
28
29
|
import { ConsentField } from './Fields/ConsentField';
|
|
29
30
|
import { CreditInRshbCdField } from './Fields/CreditInRshbCdField';
|
|
@@ -195,6 +196,7 @@ export const getField =
|
|
|
195
196
|
currency: <CurrencyField field={field} input={input} />,
|
|
196
197
|
cardCategory: <CardCategoryField field={field} input={input} />,
|
|
197
198
|
codeWord: <CodeWordField field={field} input={input} />,
|
|
199
|
+
confirmationIncome: <ConfirmationIncomeField field={field} input={input} />,
|
|
198
200
|
};
|
|
199
201
|
|
|
200
202
|
return isRenderField({ input, field }) ? (
|
|
@@ -99,6 +99,7 @@ export const validatorObj: Record<string, Validator> = {
|
|
|
99
99
|
addressRetail: defaultSelectValidator('Выберите адрес банка'),
|
|
100
100
|
addressMatch: defaultValidator(),
|
|
101
101
|
codeWord: codeWordValidator('Необходимо ввести кодовое слово'),
|
|
102
|
+
confirmationIncome: defaultValidator(),
|
|
102
103
|
};
|
|
103
104
|
|
|
104
105
|
export const getObjectValidator = (inputs: FieldDef[]): Record<string, Validator> => {
|
package/package.json
CHANGED
|
@@ -192,6 +192,10 @@ export const stepsSectionsMap: SectionsProps[][] = [
|
|
|
192
192
|
},
|
|
193
193
|
],
|
|
194
194
|
},
|
|
195
|
+
{
|
|
196
|
+
columns: 1,
|
|
197
|
+
inputs: [{ fieldType: 'common', name: 'confirmationIncome', required: true }],
|
|
198
|
+
},
|
|
195
199
|
{
|
|
196
200
|
columns: 1,
|
|
197
201
|
inputs: [{ fieldType: 'common', name: 'mandatoryIncome', required: true }],
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
/* eslint-disable max-lines */
|
|
1
2
|
import type { Option } from '../../ui-kit/Select/Option';
|
|
2
3
|
import { type Address } from '../ApplicationLeadForm/getInitialFormState';
|
|
3
4
|
|
|
@@ -52,6 +53,7 @@ export interface FormStateMap {
|
|
|
52
53
|
familyStatus?: Option;
|
|
53
54
|
dependents?: number;
|
|
54
55
|
familyMembers?: number;
|
|
56
|
+
confirmationIncome?: Option;
|
|
55
57
|
mandatoryIncome?: number;
|
|
56
58
|
otherPayments?: number;
|
|
57
59
|
snils?: string;
|
|
@@ -131,6 +133,7 @@ export const formStateMap: FormStateMap = {
|
|
|
131
133
|
familyStatus: { key: '', text: '' },
|
|
132
134
|
dependents: undefined,
|
|
133
135
|
familyMembers: undefined,
|
|
136
|
+
confirmationIncome: { key: '', text: '' },
|
|
134
137
|
mandatoryIncome: undefined,
|
|
135
138
|
otherPayments: undefined,
|
|
136
139
|
snils: '',
|
|
@@ -7,6 +7,7 @@ export const getThirdStepData = (formData: FormState): Partial<Participant> => {
|
|
|
7
7
|
familyStatus,
|
|
8
8
|
dependents,
|
|
9
9
|
familyMembers,
|
|
10
|
+
confirmationIncome,
|
|
10
11
|
mandatoryIncome,
|
|
11
12
|
otherPayments,
|
|
12
13
|
snils,
|
|
@@ -16,6 +17,7 @@ export const getThirdStepData = (formData: FormState): Partial<Participant> => {
|
|
|
16
17
|
return {
|
|
17
18
|
maritalStatusCd: familyStatus,
|
|
18
19
|
totalDependents: familyMembers,
|
|
20
|
+
incomeCertificateCd: confirmationIncome,
|
|
19
21
|
otherDependents: dependents,
|
|
20
22
|
participantIncomes: getParticipantIncomes({
|
|
21
23
|
mandatoryIncome,
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { JSX } from '@redneckz/uni-jsx';
|
|
2
|
+
import { useLeadFormData } from '../../../hooks/useLeadFormData';
|
|
3
|
+
import { type CustomFieldProps } from '../CustomFieldProps';
|
|
4
|
+
import { SelectField } from '../SelectField';
|
|
5
|
+
|
|
6
|
+
export const ConfirmationIncomeField = JSX<CustomFieldProps>(({ field, input }) => {
|
|
7
|
+
const { data: confirmationIncome } = useLeadFormData('INCOME_CERT_UNITED');
|
|
8
|
+
|
|
9
|
+
return (
|
|
10
|
+
<SelectField
|
|
11
|
+
field={field}
|
|
12
|
+
source={confirmationIncome}
|
|
13
|
+
label="Способ подтверждения дохода"
|
|
14
|
+
fieldName="confirmationIncome"
|
|
15
|
+
input={input}
|
|
16
|
+
/>
|
|
17
|
+
);
|
|
18
|
+
});
|
|
@@ -24,6 +24,7 @@ import { ChildrenField } from './Fields/ChildrenField';
|
|
|
24
24
|
import { CodeWordField } from './Fields/CodeWordField';
|
|
25
25
|
import { CollectionCountField } from './Fields/CollectionCountField';
|
|
26
26
|
import { CommentField } from './Fields/CommentField';
|
|
27
|
+
import { ConfirmationIncomeField } from './Fields/ConfirmationIncomeField';
|
|
27
28
|
import { ConscriptionField } from './Fields/ConscriptionField';
|
|
28
29
|
import { ConsentField } from './Fields/ConsentField';
|
|
29
30
|
import { CreditInRshbCdField } from './Fields/CreditInRshbCdField';
|
|
@@ -195,6 +196,7 @@ export const getField =
|
|
|
195
196
|
currency: <CurrencyField field={field} input={input} />,
|
|
196
197
|
cardCategory: <CardCategoryField field={field} input={input} />,
|
|
197
198
|
codeWord: <CodeWordField field={field} input={input} />,
|
|
199
|
+
confirmationIncome: <ConfirmationIncomeField field={field} input={input} />,
|
|
198
200
|
};
|
|
199
201
|
|
|
200
202
|
return isRenderField({ input, field }) ? (
|
|
@@ -99,6 +99,7 @@ export const validatorObj: Record<string, Validator> = {
|
|
|
99
99
|
addressRetail: defaultSelectValidator('Выберите адрес банка'),
|
|
100
100
|
addressMatch: defaultValidator(),
|
|
101
101
|
codeWord: codeWordValidator('Необходимо ввести кодовое слово'),
|
|
102
|
+
confirmationIncome: defaultValidator(),
|
|
102
103
|
};
|
|
103
104
|
|
|
104
105
|
export const getObjectValidator = (inputs: FieldDef[]): Record<string, Validator> => {
|