@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.
Files changed (98) hide show
  1. package/bundle/blocks.schema.json +1 -1
  2. package/bundle/bundle.umd.js +15 -2
  3. package/bundle/bundle.umd.min.js +1 -1
  4. package/bundle/components/ApplicationLeadForm/getInitialFormState.d.ts +1 -0
  5. package/bundle/components/CreditForm/formStateMap.d.ts +1 -0
  6. package/bundle/ui-kit/FormField/Fields/ConfirmationIncomeField.d.ts +2 -0
  7. package/bundle/ui-kit/FormField/NameFieldDef.d.ts +1 -1
  8. package/dist/components/ApplicationLeadForm/getInitialFormState.d.ts +1 -0
  9. package/dist/components/ApplicationLeadForm/getInitialFormState.js.map +1 -1
  10. package/dist/components/CreditForm/creditFormStepsData.js +4 -0
  11. package/dist/components/CreditForm/creditFormStepsData.js.map +1 -1
  12. package/dist/components/CreditForm/formStateMap.d.ts +1 -0
  13. package/dist/components/CreditForm/formStateMap.js +1 -0
  14. package/dist/components/CreditForm/formStateMap.js.map +1 -1
  15. package/dist/components/CreditForm/getThirdStepData.js +2 -1
  16. package/dist/components/CreditForm/getThirdStepData.js.map +1 -1
  17. package/dist/ui-kit/FormField/Fields/ConfirmationIncomeField.d.ts +2 -0
  18. package/dist/ui-kit/FormField/Fields/ConfirmationIncomeField.js +11 -0
  19. package/dist/ui-kit/FormField/Fields/ConfirmationIncomeField.js.map +1 -0
  20. package/dist/ui-kit/FormField/NameFieldDef.d.ts +1 -1
  21. package/dist/ui-kit/FormField/getField.js +2 -0
  22. package/dist/ui-kit/FormField/getField.js.map +1 -1
  23. package/dist/ui-kit/FormField/getObjectValidator.js +1 -0
  24. package/dist/ui-kit/FormField/getObjectValidator.js.map +1 -1
  25. package/lib/components/ApplicationLeadForm/getInitialFormState.d.ts +1 -0
  26. package/lib/components/ApplicationLeadForm/getInitialFormState.js.map +1 -1
  27. package/lib/components/CreditForm/creditFormStepsData.js +4 -0
  28. package/lib/components/CreditForm/creditFormStepsData.js.map +1 -1
  29. package/lib/components/CreditForm/formStateMap.d.ts +1 -0
  30. package/lib/components/CreditForm/formStateMap.js +1 -0
  31. package/lib/components/CreditForm/formStateMap.js.map +1 -1
  32. package/lib/components/CreditForm/getThirdStepData.js +2 -1
  33. package/lib/components/CreditForm/getThirdStepData.js.map +1 -1
  34. package/lib/ui-kit/FormField/Fields/ConfirmationIncomeField.d.ts +2 -0
  35. package/lib/ui-kit/FormField/Fields/ConfirmationIncomeField.js +9 -0
  36. package/lib/ui-kit/FormField/Fields/ConfirmationIncomeField.js.map +1 -0
  37. package/lib/ui-kit/FormField/NameFieldDef.d.ts +1 -1
  38. package/lib/ui-kit/FormField/getField.js +2 -0
  39. package/lib/ui-kit/FormField/getField.js.map +1 -1
  40. package/lib/ui-kit/FormField/getObjectValidator.js +1 -0
  41. package/lib/ui-kit/FormField/getObjectValidator.js.map +1 -1
  42. package/mobile/bundle/bundle.umd.js +15 -2
  43. package/mobile/bundle/bundle.umd.min.js +1 -1
  44. package/mobile/bundle/components/ApplicationLeadForm/getInitialFormState.d.ts +1 -0
  45. package/mobile/bundle/components/CreditForm/formStateMap.d.ts +1 -0
  46. package/mobile/bundle/ui-kit/FormField/Fields/ConfirmationIncomeField.d.ts +2 -0
  47. package/mobile/bundle/ui-kit/FormField/NameFieldDef.d.ts +1 -1
  48. package/mobile/dist/components/ApplicationLeadForm/getInitialFormState.d.ts +1 -0
  49. package/mobile/dist/components/ApplicationLeadForm/getInitialFormState.js.map +1 -1
  50. package/mobile/dist/components/CreditForm/creditFormStepsData.js +4 -0
  51. package/mobile/dist/components/CreditForm/creditFormStepsData.js.map +1 -1
  52. package/mobile/dist/components/CreditForm/formStateMap.d.ts +1 -0
  53. package/mobile/dist/components/CreditForm/formStateMap.js +1 -0
  54. package/mobile/dist/components/CreditForm/formStateMap.js.map +1 -1
  55. package/mobile/dist/components/CreditForm/getThirdStepData.js +2 -1
  56. package/mobile/dist/components/CreditForm/getThirdStepData.js.map +1 -1
  57. package/mobile/dist/ui-kit/FormField/Fields/ConfirmationIncomeField.d.ts +2 -0
  58. package/mobile/dist/ui-kit/FormField/Fields/ConfirmationIncomeField.js +11 -0
  59. package/mobile/dist/ui-kit/FormField/Fields/ConfirmationIncomeField.js.map +1 -0
  60. package/mobile/dist/ui-kit/FormField/NameFieldDef.d.ts +1 -1
  61. package/mobile/dist/ui-kit/FormField/getField.js +2 -0
  62. package/mobile/dist/ui-kit/FormField/getField.js.map +1 -1
  63. package/mobile/dist/ui-kit/FormField/getObjectValidator.js +1 -0
  64. package/mobile/dist/ui-kit/FormField/getObjectValidator.js.map +1 -1
  65. package/mobile/lib/components/ApplicationLeadForm/getInitialFormState.d.ts +1 -0
  66. package/mobile/lib/components/ApplicationLeadForm/getInitialFormState.js.map +1 -1
  67. package/mobile/lib/components/CreditForm/creditFormStepsData.js +4 -0
  68. package/mobile/lib/components/CreditForm/creditFormStepsData.js.map +1 -1
  69. package/mobile/lib/components/CreditForm/formStateMap.d.ts +1 -0
  70. package/mobile/lib/components/CreditForm/formStateMap.js +1 -0
  71. package/mobile/lib/components/CreditForm/formStateMap.js.map +1 -1
  72. package/mobile/lib/components/CreditForm/getThirdStepData.js +2 -1
  73. package/mobile/lib/components/CreditForm/getThirdStepData.js.map +1 -1
  74. package/mobile/lib/ui-kit/FormField/Fields/ConfirmationIncomeField.d.ts +2 -0
  75. package/mobile/lib/ui-kit/FormField/Fields/ConfirmationIncomeField.js +9 -0
  76. package/mobile/lib/ui-kit/FormField/Fields/ConfirmationIncomeField.js.map +1 -0
  77. package/mobile/lib/ui-kit/FormField/NameFieldDef.d.ts +1 -1
  78. package/mobile/lib/ui-kit/FormField/getField.js +2 -0
  79. package/mobile/lib/ui-kit/FormField/getField.js.map +1 -1
  80. package/mobile/lib/ui-kit/FormField/getObjectValidator.js +1 -0
  81. package/mobile/lib/ui-kit/FormField/getObjectValidator.js.map +1 -1
  82. package/mobile/src/components/ApplicationLeadForm/getInitialFormState.tsx +1 -0
  83. package/mobile/src/components/CreditForm/creditFormStepsData.tsx +4 -0
  84. package/mobile/src/components/CreditForm/formStateMap.tsx +3 -0
  85. package/mobile/src/components/CreditForm/getThirdStepData.ts +2 -0
  86. package/mobile/src/ui-kit/FormField/Fields/ConfirmationIncomeField.tsx +18 -0
  87. package/mobile/src/ui-kit/FormField/NameFieldDef.ts +2 -1
  88. package/mobile/src/ui-kit/FormField/getField.tsx +2 -0
  89. package/mobile/src/ui-kit/FormField/getObjectValidator.tsx +1 -0
  90. package/package.json +1 -1
  91. package/src/components/ApplicationLeadForm/getInitialFormState.tsx +1 -0
  92. package/src/components/CreditForm/creditFormStepsData.tsx +4 -0
  93. package/src/components/CreditForm/formStateMap.tsx +3 -0
  94. package/src/components/CreditForm/getThirdStepData.ts +2 -0
  95. package/src/ui-kit/FormField/Fields/ConfirmationIncomeField.tsx +18 -0
  96. package/src/ui-kit/FormField/NameFieldDef.ts +2 -1
  97. package/src/ui-kit/FormField/getField.tsx +2 -0
  98. 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
+ });
@@ -91,4 +91,5 @@ export type NameFieldDef =
91
91
  | 'paymentSystem'
92
92
  | 'currency'
93
93
  | 'cardCategory'
94
- | 'codeWord';
94
+ | 'codeWord'
95
+ | 'confirmationIncome';
@@ -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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@redneckz/wildless-cms-uni-blocks",
3
- "version": "0.14.648",
3
+ "version": "0.14.649",
4
4
  "private": false,
5
5
  "license": "MIT",
6
6
  "author": "ЦК",
@@ -124,6 +124,7 @@ export interface FormState extends FormConsents {
124
124
  bankEmployeeCode?: number;
125
125
  partInBusiness?: number;
126
126
  addressMatch?: boolean;
127
+ confirmationIncome?: Option;
127
128
  }
128
129
 
129
130
  const initialFormState = {
@@ -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
+ });
@@ -91,4 +91,5 @@ export type NameFieldDef =
91
91
  | 'paymentSystem'
92
92
  | 'currency'
93
93
  | 'cardCategory'
94
- | 'codeWord';
94
+ | 'codeWord'
95
+ | 'confirmationIncome';
@@ -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> => {