@redneckz/wildless-cms-uni-blocks 0.14.757 → 0.14.758

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 (108) hide show
  1. package/bundle/blocks.schema.json +1 -1
  2. package/bundle/bundle.umd.js +39 -5
  3. package/bundle/bundle.umd.min.js +1 -1
  4. package/bundle/components/ApplicationForm/getInitialFormState.d.ts +1 -1
  5. package/bundle/ui-kit/FormField/Fields/ApplierTypeField.d.ts +2 -0
  6. package/bundle/ui-kit/FormField/Fields/RepresentativeNameField.d.ts +2 -0
  7. package/bundle/ui-kit/FormField/NameFieldDef.d.ts +1 -1
  8. package/dist/components/ApplicationForm/getFormatData.js +1 -1
  9. package/dist/components/ApplicationForm/getFormatData.js.map +1 -1
  10. package/dist/components/ApplicationForm/getInitialFormState.d.ts +1 -1
  11. package/dist/ui-kit/FormField/Fields/ApplierTypeField.d.ts +2 -0
  12. package/dist/ui-kit/FormField/Fields/ApplierTypeField.js +17 -0
  13. package/dist/ui-kit/FormField/Fields/ApplierTypeField.js.map +1 -0
  14. package/dist/ui-kit/FormField/Fields/BirthdayField.js +1 -1
  15. package/dist/ui-kit/FormField/Fields/BirthdayField.js.map +1 -1
  16. package/dist/ui-kit/FormField/Fields/RegionField.js +1 -1
  17. package/dist/ui-kit/FormField/Fields/RegionField.js.map +1 -1
  18. package/dist/ui-kit/FormField/Fields/RepresentativeNameField.d.ts +2 -0
  19. package/dist/ui-kit/FormField/Fields/RepresentativeNameField.js +7 -0
  20. package/dist/ui-kit/FormField/Fields/RepresentativeNameField.js.map +1 -0
  21. package/dist/ui-kit/FormField/Fields/SufferedFromField.js +20 -2
  22. package/dist/ui-kit/FormField/Fields/SufferedFromField.js.map +1 -1
  23. package/dist/ui-kit/FormField/NameFieldDef.d.ts +1 -1
  24. package/dist/ui-kit/FormField/getField.js +4 -0
  25. package/dist/ui-kit/FormField/getField.js.map +1 -1
  26. package/lib/components/ApplicationForm/getFormatData.js +1 -1
  27. package/lib/components/ApplicationForm/getFormatData.js.map +1 -1
  28. package/lib/components/ApplicationForm/getInitialFormState.d.ts +1 -1
  29. package/lib/ui-kit/FormField/Fields/ApplierTypeField.d.ts +2 -0
  30. package/lib/ui-kit/FormField/Fields/ApplierTypeField.js +15 -0
  31. package/lib/ui-kit/FormField/Fields/ApplierTypeField.js.map +1 -0
  32. package/lib/ui-kit/FormField/Fields/BirthdayField.js +1 -1
  33. package/lib/ui-kit/FormField/Fields/BirthdayField.js.map +1 -1
  34. package/lib/ui-kit/FormField/Fields/RegionField.js +1 -1
  35. package/lib/ui-kit/FormField/Fields/RegionField.js.map +1 -1
  36. package/lib/ui-kit/FormField/Fields/RepresentativeNameField.d.ts +2 -0
  37. package/lib/ui-kit/FormField/Fields/RepresentativeNameField.js +5 -0
  38. package/lib/ui-kit/FormField/Fields/RepresentativeNameField.js.map +1 -0
  39. package/lib/ui-kit/FormField/Fields/SufferedFromField.js +20 -2
  40. package/lib/ui-kit/FormField/Fields/SufferedFromField.js.map +1 -1
  41. package/lib/ui-kit/FormField/NameFieldDef.d.ts +1 -1
  42. package/lib/ui-kit/FormField/getField.js +4 -0
  43. package/lib/ui-kit/FormField/getField.js.map +1 -1
  44. package/mobile/bundle/bundle.umd.js +39 -5
  45. package/mobile/bundle/bundle.umd.min.js +1 -1
  46. package/mobile/bundle/components/ApplicationForm/getInitialFormState.d.ts +1 -1
  47. package/mobile/bundle/ui-kit/FormField/Fields/ApplierTypeField.d.ts +2 -0
  48. package/mobile/bundle/ui-kit/FormField/Fields/RepresentativeNameField.d.ts +2 -0
  49. package/mobile/bundle/ui-kit/FormField/NameFieldDef.d.ts +1 -1
  50. package/mobile/dist/components/ApplicationForm/getFormatData.js +1 -1
  51. package/mobile/dist/components/ApplicationForm/getFormatData.js.map +1 -1
  52. package/mobile/dist/components/ApplicationForm/getInitialFormState.d.ts +1 -1
  53. package/mobile/dist/ui-kit/FormField/Fields/ApplierTypeField.d.ts +2 -0
  54. package/mobile/dist/ui-kit/FormField/Fields/ApplierTypeField.js +17 -0
  55. package/mobile/dist/ui-kit/FormField/Fields/ApplierTypeField.js.map +1 -0
  56. package/mobile/dist/ui-kit/FormField/Fields/BirthdayField.js +1 -1
  57. package/mobile/dist/ui-kit/FormField/Fields/BirthdayField.js.map +1 -1
  58. package/mobile/dist/ui-kit/FormField/Fields/RegionField.js +1 -1
  59. package/mobile/dist/ui-kit/FormField/Fields/RegionField.js.map +1 -1
  60. package/mobile/dist/ui-kit/FormField/Fields/RepresentativeNameField.d.ts +2 -0
  61. package/mobile/dist/ui-kit/FormField/Fields/RepresentativeNameField.js +7 -0
  62. package/mobile/dist/ui-kit/FormField/Fields/RepresentativeNameField.js.map +1 -0
  63. package/mobile/dist/ui-kit/FormField/Fields/SufferedFromField.js +20 -2
  64. package/mobile/dist/ui-kit/FormField/Fields/SufferedFromField.js.map +1 -1
  65. package/mobile/dist/ui-kit/FormField/NameFieldDef.d.ts +1 -1
  66. package/mobile/dist/ui-kit/FormField/getField.js +4 -0
  67. package/mobile/dist/ui-kit/FormField/getField.js.map +1 -1
  68. package/mobile/lib/components/ApplicationForm/getFormatData.js +1 -1
  69. package/mobile/lib/components/ApplicationForm/getFormatData.js.map +1 -1
  70. package/mobile/lib/components/ApplicationForm/getInitialFormState.d.ts +1 -1
  71. package/mobile/lib/ui-kit/FormField/Fields/ApplierTypeField.d.ts +2 -0
  72. package/mobile/lib/ui-kit/FormField/Fields/ApplierTypeField.js +15 -0
  73. package/mobile/lib/ui-kit/FormField/Fields/ApplierTypeField.js.map +1 -0
  74. package/mobile/lib/ui-kit/FormField/Fields/BirthdayField.js +1 -1
  75. package/mobile/lib/ui-kit/FormField/Fields/BirthdayField.js.map +1 -1
  76. package/mobile/lib/ui-kit/FormField/Fields/RegionField.js +1 -1
  77. package/mobile/lib/ui-kit/FormField/Fields/RegionField.js.map +1 -1
  78. package/mobile/lib/ui-kit/FormField/Fields/RepresentativeNameField.d.ts +2 -0
  79. package/mobile/lib/ui-kit/FormField/Fields/RepresentativeNameField.js +5 -0
  80. package/mobile/lib/ui-kit/FormField/Fields/RepresentativeNameField.js.map +1 -0
  81. package/mobile/lib/ui-kit/FormField/Fields/SufferedFromField.js +20 -2
  82. package/mobile/lib/ui-kit/FormField/Fields/SufferedFromField.js.map +1 -1
  83. package/mobile/lib/ui-kit/FormField/NameFieldDef.d.ts +1 -1
  84. package/mobile/lib/ui-kit/FormField/getField.js +4 -0
  85. package/mobile/lib/ui-kit/FormField/getField.js.map +1 -1
  86. package/mobile/src/components/ApplicationForm/ApplicationForm.example.json +20 -3
  87. package/mobile/src/components/ApplicationForm/getFormatData.tsx +1 -1
  88. package/mobile/src/components/ApplicationForm/getInitialFormState.tsx +1 -1
  89. package/mobile/src/ui-kit/FormField/Fields/ApplierTypeField.tsx +24 -0
  90. package/mobile/src/ui-kit/FormField/Fields/BirthdayField.tsx +1 -1
  91. package/mobile/src/ui-kit/FormField/Fields/RegionField.tsx +1 -1
  92. package/mobile/src/ui-kit/FormField/Fields/RepresentativeNameField.tsx +7 -0
  93. package/mobile/src/ui-kit/FormField/Fields/SufferedFromField.tsx +27 -2
  94. package/mobile/src/ui-kit/FormField/NameFieldDef.ts +3 -0
  95. package/mobile/src/ui-kit/FormField/getField.tsx +4 -0
  96. package/package.json +1 -1
  97. package/src/components/ApplicationForm/ApplicationForm.example.json +20 -3
  98. package/src/components/ApplicationForm/ApplicationForm.fixture.mobile.tsx +8 -8
  99. package/src/components/ApplicationForm/ApplicationForm.fixture.tsx +8 -8
  100. package/src/components/ApplicationForm/getFormatData.tsx +1 -1
  101. package/src/components/ApplicationForm/getInitialFormState.tsx +1 -1
  102. package/src/ui-kit/FormField/Fields/ApplierTypeField.tsx +24 -0
  103. package/src/ui-kit/FormField/Fields/BirthdayField.tsx +1 -1
  104. package/src/ui-kit/FormField/Fields/RegionField.tsx +1 -1
  105. package/src/ui-kit/FormField/Fields/RepresentativeNameField.tsx +7 -0
  106. package/src/ui-kit/FormField/Fields/SufferedFromField.tsx +27 -2
  107. package/src/ui-kit/FormField/NameFieldDef.ts +3 -0
  108. package/src/ui-kit/FormField/getField.tsx +4 -0
@@ -8,6 +8,7 @@ import { AcquiringField } from './Fields/AcquiringField';
8
8
  import { AddressBranchField } from './Fields/AddressBranchField';
9
9
  import { AmountField } from './Fields/AmountField';
10
10
  import { AnnualRevenueField } from './Fields/AnnualRevenueField';
11
+ import { ApplierTypeField } from './Fields/ApplierTypeField';
11
12
  import { BankEmpoleeField } from './Fields/BankEmpoleeField';
12
13
  import { BirthdayField } from './Fields/BirthdayField';
13
14
  import { CollectionCountField } from './Fields/CollectionCountField';
@@ -29,6 +30,7 @@ import { PosTerminalField } from './Fields/PosTerminalField';
29
30
  import { ProductField } from './Fields/ProductField';
30
31
  import { RegionField } from './Fields/RegionField';
31
32
  import { RegionPremiumField } from './Fields/RegionPremiumField';
33
+ import { RepresentativeNameField } from './Fields/RepresentativeNameField';
32
34
  import { SecondaryPhoneField } from './Fields/SecondaryPhoneField';
33
35
  import { ServiceDirectionField } from './Fields/ServiceDirectionField';
34
36
  import { SituationDescriptionField } from './Fields/SituationDescriptionField';
@@ -77,6 +79,8 @@ const InputsMap = {
77
79
  consentToReceiveMaterials: ConsentToReceiveMaterialsField,
78
80
  sufferedFrom: SufferedFromField,
79
81
  situationDescription: SituationDescriptionField,
82
+ representativeName: RepresentativeNameField,
83
+ applierType: ApplierTypeField,
80
84
  surname: SurnameField,
81
85
  name: NameField,
82
86
  middleName: MiddleNameField,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@redneckz/wildless-cms-uni-blocks",
3
- "version": "0.14.757",
3
+ "version": "0.14.758",
4
4
  "private": false,
5
5
  "license": "MIT",
6
6
  "author": "ЦК",
@@ -1109,23 +1109,40 @@
1109
1109
  {
1110
1110
  "name": "fullName",
1111
1111
  "required": true,
1112
- "label": "ФИО клиента/представителя"
1112
+ "label": "ФИО клиента"
1113
1113
  },
1114
1114
  {
1115
1115
  "name": "birthday",
1116
- "required": true
1116
+ "required": true,
1117
+ "label": "Дата рождения клиента"
1117
1118
  },
1118
1119
  {
1119
- "name": "phone",
1120
+ "name": "applierType",
1120
1121
  "required": true
1121
1122
  },
1123
+ {
1124
+ "name": "representativeName"
1125
+ },
1122
1126
  {
1123
1127
  "name": "sufferedFrom",
1124
1128
  "required": true
1125
1129
  },
1130
+ {
1131
+ "name": "region",
1132
+ "required": true,
1133
+ "label": "Регион обслуживания кредита"
1134
+ },
1126
1135
  {
1127
1136
  "name": "situationDescription",
1128
1137
  "required": true
1138
+ },
1139
+ {
1140
+ "name": "phone",
1141
+ "required": true
1142
+ },
1143
+ {
1144
+ "name": "email",
1145
+ "required": true
1129
1146
  }
1130
1147
  ]
1131
1148
  },
@@ -682,21 +682,21 @@ export default {
682
682
  <div className="container grid grid-cols-12">
683
683
  <ApplicationForm
684
684
  className="col-span-12"
685
- title="Меры поддержки"
685
+ title="Меры поддержки жителей пострадавших населенных пунктов территорий Курской, Брянской и Белгородской областей"
686
686
  typeForm="SUPPORT"
687
687
  endpoint="lead"
688
688
  sections={[
689
689
  {
690
690
  inputs: [
691
- {
692
- name: 'fullName',
693
- required: true,
694
- label: 'ФИО клиента/представителя',
695
- },
696
- { name: 'birthday', required: true },
697
- { name: 'phone', required: true },
691
+ { name: 'fullName', required: true, label: 'ФИО клиента' },
692
+ { name: 'birthday', required: true, label: 'Дата рождения клиента' },
693
+ { name: 'applierType', required: true },
694
+ { name: 'representativeName' },
698
695
  { name: 'sufferedFrom', required: true },
696
+ { name: 'regionBranch', required: true, label: 'Регион обслуживания кредита' },
699
697
  { name: 'situationDescription', required: true },
698
+ { name: 'phone', required: true },
699
+ { name: 'email', required: true },
700
700
  ],
701
701
  },
702
702
  { inputs: [{ name: 'consentDataProcessing', required: true }] },
@@ -677,21 +677,21 @@ export default {
677
677
  <div className="container grid grid-cols-12">
678
678
  <ApplicationForm
679
679
  className="col-span-12"
680
- title="Меры поддержки"
680
+ title="Меры поддержки жителей пострадавших населенных пунктов территорий Курской, Брянской и Белгородской областей"
681
681
  typeForm="SUPPORT"
682
682
  endpoint="lead"
683
683
  sections={[
684
684
  {
685
685
  inputs: [
686
- {
687
- name: 'fullName',
688
- required: true,
689
- label: 'ФИО клиента/представителя',
690
- },
691
- { name: 'birthday', required: true },
692
- { name: 'phone', required: true },
686
+ { name: 'fullName', required: true, label: 'ФИО клиента' },
687
+ { name: 'birthday', required: true, label: 'Дата рождения клиента' },
688
+ { name: 'applierType', required: true },
689
+ { name: 'representativeName' },
693
690
  { name: 'sufferedFrom', required: true },
691
+ { name: 'region', required: true, label: 'Регион обслуживания кредита' },
694
692
  { name: 'situationDescription', required: true },
693
+ { name: 'phone', required: true },
694
+ { name: 'email', required: true },
695
695
  ],
696
696
  },
697
697
  { inputs: [{ name: 'consentDataProcessing', required: true }] },
@@ -29,7 +29,7 @@ export const getFormatData = (data: FormState): Record<string, any> => {
29
29
  ...(inn && { inn }),
30
30
  ...(partnerComments ? { partnerComments } : {}),
31
31
  ...(serviceType ? { typeForm: serviceType } : {}),
32
- ...getIncidentComment(sufferedFrom, situationDescription),
32
+ ...getIncidentComment(sufferedFrom, situationDescription?.text),
33
33
  };
34
34
 
35
35
  return Object.fromEntries(
@@ -30,7 +30,7 @@ export interface FormState {
30
30
  consentDataProcessing?: boolean;
31
31
  addressRetail?: Option;
32
32
  sufferedFrom?: string;
33
- situationDescription?: string;
33
+ situationDescription?: Option;
34
34
  }
35
35
 
36
36
  const initialFormState = {
@@ -0,0 +1,24 @@
1
+ import { JSX } from '@redneckz/uni-jsx';
2
+ import { type Option } from '../../Select/Option';
3
+ import { SelectControl } from '../../Select/SelectControl';
4
+ import { type CustomFieldProps } from '../CustomFieldProps';
5
+
6
+ const APPLIER_TYPES: Option[] = [
7
+ {
8
+ key: 'client',
9
+ text: 'Клиент',
10
+ },
11
+ {
12
+ key: 'representative',
13
+ text: 'Представитель клиента',
14
+ },
15
+ ];
16
+
17
+ export const ApplierTypeField = JSX<CustomFieldProps>(({ field, input }) => (
18
+ <SelectControl
19
+ label="Тип обратившегося"
20
+ {...input}
21
+ options={APPLIER_TYPES}
22
+ {...field('applierType')}
23
+ />
24
+ ));
@@ -3,5 +3,5 @@ import { DatePickerControl } from '../../DatePicker/DatePickerControl';
3
3
  import { type CustomFieldProps } from '../CustomFieldProps';
4
4
 
5
5
  export const BirthdayField = JSX<CustomFieldProps>(({ field, input }) => (
6
- <DatePickerControl label="Дата рождения" {...field(input?.name ?? '')} />
6
+ <DatePickerControl label={input?.label || 'Дата рождения'} {...field(input?.name ?? '')} />
7
7
  ));
@@ -11,7 +11,7 @@ export const RegionField = JSX<CustomFieldProps>(({ field, input, params }) => {
11
11
 
12
12
  return (
13
13
  <SelectControl
14
- label="Филиал"
14
+ label={input?.label || 'Филиал'}
15
15
  placeholder="Выберите филиал"
16
16
  isSearch={true}
17
17
  options={useMemo(
@@ -0,0 +1,7 @@
1
+ import { JSX } from '@redneckz/uni-jsx';
2
+ import { InputControl } from '../../Input/InputControl';
3
+ import { type CustomFieldProps } from '../CustomFieldProps';
4
+
5
+ export const RepresentativeNameField = JSX<CustomFieldProps>(({ field, input }) => (
6
+ <InputControl label="ФИО представителя" {...input} {...field('representativeName')} />
7
+ ));
@@ -1,7 +1,32 @@
1
1
  import { JSX } from '@redneckz/uni-jsx';
2
- import { InputControl } from '../../Input/InputControl';
2
+ import { type Option } from '../../Select/Option';
3
+ import { SelectControl } from '../../Select/SelectControl';
3
4
  import { type CustomFieldProps } from '../CustomFieldProps';
4
5
 
6
+ const SUFFERED_FROM_TYPES: Option[] = [
7
+ {
8
+ key: 'blg',
9
+ text: 'Белгородской области',
10
+ },
11
+ {
12
+ key: 'bshk',
13
+ text: 'Республике Башкортостан',
14
+ },
15
+ {
16
+ key: 'krsk',
17
+ text: 'Курской области',
18
+ },
19
+ {
20
+ key: 'chs',
21
+ text: 'От стихийного бедствия ЧС',
22
+ },
23
+ ];
24
+
5
25
  export const SufferedFromField = JSX<CustomFieldProps>(({ field, input }) => (
6
- <InputControl label="Пострадал в" {...input} {...field('sufferedFrom')} />
26
+ <SelectControl
27
+ label="Пострадал в"
28
+ {...input}
29
+ options={SUFFERED_FROM_TYPES}
30
+ {...field('sufferedFrom')}
31
+ />
7
32
  ));
@@ -33,6 +33,9 @@ type NameFieldApplicationDef =
33
33
  | 'partnerComments'
34
34
  | 'sufferedFrom'
35
35
  | 'situationDescription'
36
+ | 'applierType'
37
+ | 'representativeName'
38
+ | 'regionBranch'
36
39
  | 'consentToReceiveMaterials'
37
40
  | 'consentDataProcessing';
38
41
 
@@ -8,6 +8,7 @@ import { AcquiringField } from './Fields/AcquiringField';
8
8
  import { AddressBranchField } from './Fields/AddressBranchField';
9
9
  import { AmountField } from './Fields/AmountField';
10
10
  import { AnnualRevenueField } from './Fields/AnnualRevenueField';
11
+ import { ApplierTypeField } from './Fields/ApplierTypeField';
11
12
  import { BankEmpoleeField } from './Fields/BankEmpoleeField';
12
13
  import { BirthdayField } from './Fields/BirthdayField';
13
14
  import { CollectionCountField } from './Fields/CollectionCountField';
@@ -29,6 +30,7 @@ import { PosTerminalField } from './Fields/PosTerminalField';
29
30
  import { ProductField } from './Fields/ProductField';
30
31
  import { RegionField } from './Fields/RegionField';
31
32
  import { RegionPremiumField } from './Fields/RegionPremiumField';
33
+ import { RepresentativeNameField } from './Fields/RepresentativeNameField';
32
34
  import { SecondaryPhoneField } from './Fields/SecondaryPhoneField';
33
35
  import { ServiceDirectionField } from './Fields/ServiceDirectionField';
34
36
  import { SituationDescriptionField } from './Fields/SituationDescriptionField';
@@ -77,6 +79,8 @@ const InputsMap = {
77
79
  consentToReceiveMaterials: ConsentToReceiveMaterialsField,
78
80
  sufferedFrom: SufferedFromField,
79
81
  situationDescription: SituationDescriptionField,
82
+ representativeName: RepresentativeNameField,
83
+ applierType: ApplierTypeField,
80
84
  surname: SurnameField,
81
85
  name: NameField,
82
86
  middleName: MiddleNameField,