@redneckz/wildless-cms-uni-blocks 0.14.620 → 0.14.622

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 (253) hide show
  1. package/bundle/api/RetailAPI/feedbackById.d.ts +1 -1
  2. package/bundle/blocks.schema.json +1 -1
  3. package/bundle/bundle.umd.js +54 -44
  4. package/bundle/bundle.umd.min.js +1 -1
  5. package/bundle/components/ApplicationForm/ApplicationFormContent.d.ts +1 -1
  6. package/bundle/components/ApplicationLeadForm/ApplicationLeadFormContent.d.ts +1 -1
  7. package/bundle/components/CreditForm/CreditFormStep.d.ts +1 -2
  8. package/bundle/components/CreditForm/StepsNavigationButtons.d.ts +0 -1
  9. package/bundle/components/CreditForm/creditFormStepsData.d.ts +2 -178
  10. package/bundle/ui-kit/Checkbox/getDocument.d.ts +1 -1
  11. package/bundle/ui-kit/DialogManager/openDocument.d.ts +1 -1
  12. package/bundle/ui-kit/FormField/getNamesFromInput.d.ts +1 -1
  13. package/dist/api/RetailAPI/feedbackById.d.ts +1 -1
  14. package/dist/api/RetailAPI/feedbackById.js +2 -2
  15. package/dist/api/RetailAPI/feedbackById.js.map +1 -1
  16. package/dist/components/ApplicationForm/ApplicationFormContent.d.ts +1 -1
  17. package/dist/components/ApplicationForm/getInitialFormState.js +1 -1
  18. package/dist/components/ApplicationForm/getInitialFormState.js.map +1 -1
  19. package/dist/components/ApplicationForm/renderInputs.js +2 -2
  20. package/dist/components/ApplicationForm/renderInputs.js.map +1 -1
  21. package/dist/components/ApplicationLeadForm/ApplicationLeadFormContent.d.ts +1 -1
  22. package/dist/components/ApplicationLeadForm/GroupedConsents.js.map +1 -1
  23. package/dist/components/ApplicationLeadForm/consents.js +8 -8
  24. package/dist/components/ApplicationLeadForm/consents.js.map +1 -1
  25. package/dist/components/ApplicationLeadForm/getInitialFormState.js +1 -1
  26. package/dist/components/ApplicationLeadForm/getInitialFormState.js.map +1 -1
  27. package/dist/components/ApplicationLeadForm/useInitApplicationLead.js +1 -1
  28. package/dist/components/ApplicationLeadForm/useInitApplicationLead.js.map +1 -1
  29. package/dist/components/CreditForm/CreditForm.js +3 -3
  30. package/dist/components/CreditForm/CreditForm.js.map +1 -1
  31. package/dist/components/CreditForm/CreditFormProgress.js +3 -3
  32. package/dist/components/CreditForm/CreditFormProgress.js.map +1 -1
  33. package/dist/components/CreditForm/CreditFormStep.d.ts +1 -2
  34. package/dist/components/CreditForm/CreditFormStep.js +3 -3
  35. package/dist/components/CreditForm/CreditFormStep.js.map +1 -1
  36. package/dist/components/CreditForm/StepsNavigationButtons.d.ts +0 -1
  37. package/dist/components/CreditForm/StepsNavigationButtons.js +2 -1
  38. package/dist/components/CreditForm/StepsNavigationButtons.js.map +1 -1
  39. package/dist/components/CreditForm/creditFormStepsData.d.ts +2 -178
  40. package/dist/components/CreditForm/creditFormStepsData.js +7 -8
  41. package/dist/components/CreditForm/creditFormStepsData.js.map +1 -1
  42. package/dist/ui-kit/Checkbox/CheckboxWithDoc.js +3 -1
  43. package/dist/ui-kit/Checkbox/CheckboxWithDoc.js.map +1 -1
  44. package/dist/ui-kit/Checkbox/getDocument.d.ts +1 -1
  45. package/dist/ui-kit/Checkbox/getDocument.js +2 -2
  46. package/dist/ui-kit/Checkbox/getDocument.js.map +1 -1
  47. package/dist/ui-kit/ConsentBkiDialog/ConsentBkiDialog.js +3 -1
  48. package/dist/ui-kit/ConsentBkiDialog/ConsentBkiDialog.js.map +1 -1
  49. package/dist/ui-kit/DialogManager/openDocument.d.ts +1 -1
  50. package/dist/ui-kit/DialogManager/openDocument.js +3 -3
  51. package/dist/ui-kit/DialogManager/openDocument.js.map +1 -1
  52. package/dist/ui-kit/FormField/Fields/PartInBusinessField.js +9 -1
  53. package/dist/ui-kit/FormField/Fields/PartInBusinessField.js.map +1 -1
  54. package/dist/ui-kit/FormField/getField.js +1 -1
  55. package/dist/ui-kit/FormField/getField.js.map +1 -1
  56. package/dist/ui-kit/FormField/getNamesFromInput.d.ts +1 -1
  57. package/dist/ui-kit/FormField/getObjectValidator.js +1 -1
  58. package/dist/ui-kit/FormField/getObjectValidator.js.map +1 -1
  59. package/lib/api/RetailAPI/feedbackById.d.ts +1 -1
  60. package/lib/api/RetailAPI/feedbackById.js +2 -2
  61. package/lib/api/RetailAPI/feedbackById.js.map +1 -1
  62. package/lib/components/ApplicationForm/ApplicationFormContent.d.ts +1 -1
  63. package/lib/components/ApplicationForm/getInitialFormState.js +1 -1
  64. package/lib/components/ApplicationForm/getInitialFormState.js.map +1 -1
  65. package/lib/components/ApplicationForm/renderInputs.js +2 -2
  66. package/lib/components/ApplicationForm/renderInputs.js.map +1 -1
  67. package/lib/components/ApplicationLeadForm/ApplicationLeadForm.fixture.d.ts +0 -2
  68. package/lib/components/ApplicationLeadForm/ApplicationLeadFormContent.d.ts +1 -1
  69. package/lib/components/ApplicationLeadForm/GroupedConsents.js.map +1 -1
  70. package/lib/components/ApplicationLeadForm/consents.js +8 -8
  71. package/lib/components/ApplicationLeadForm/consents.js.map +1 -1
  72. package/lib/components/ApplicationLeadForm/getInitialFormState.js +1 -1
  73. package/lib/components/ApplicationLeadForm/getInitialFormState.js.map +1 -1
  74. package/lib/components/ApplicationLeadForm/useInitApplicationLead.js +1 -1
  75. package/lib/components/ApplicationLeadForm/useInitApplicationLead.js.map +1 -1
  76. package/lib/components/CreditForm/CreditForm.js +3 -3
  77. package/lib/components/CreditForm/CreditForm.js.map +1 -1
  78. package/lib/components/CreditForm/CreditFormProgress.js +3 -3
  79. package/lib/components/CreditForm/CreditFormProgress.js.map +1 -1
  80. package/lib/components/CreditForm/CreditFormStep.d.ts +1 -2
  81. package/lib/components/CreditForm/CreditFormStep.js +3 -3
  82. package/lib/components/CreditForm/CreditFormStep.js.map +1 -1
  83. package/lib/components/CreditForm/StepsNavigationButtons.d.ts +0 -1
  84. package/lib/components/CreditForm/StepsNavigationButtons.js +2 -1
  85. package/lib/components/CreditForm/StepsNavigationButtons.js.map +1 -1
  86. package/lib/components/CreditForm/creditFormStepsData.d.ts +2 -178
  87. package/lib/components/CreditForm/creditFormStepsData.js +7 -8
  88. package/lib/components/CreditForm/creditFormStepsData.js.map +1 -1
  89. package/lib/ui-kit/Checkbox/CheckboxWithDoc.js +3 -1
  90. package/lib/ui-kit/Checkbox/CheckboxWithDoc.js.map +1 -1
  91. package/lib/ui-kit/Checkbox/getDocument.d.ts +1 -1
  92. package/lib/ui-kit/Checkbox/getDocument.js +2 -2
  93. package/lib/ui-kit/Checkbox/getDocument.js.map +1 -1
  94. package/lib/ui-kit/ConsentBkiDialog/ConsentBkiDialog.js +3 -1
  95. package/lib/ui-kit/ConsentBkiDialog/ConsentBkiDialog.js.map +1 -1
  96. package/lib/ui-kit/DialogManager/openDocument.d.ts +1 -1
  97. package/lib/ui-kit/DialogManager/openDocument.js +3 -3
  98. package/lib/ui-kit/DialogManager/openDocument.js.map +1 -1
  99. package/lib/ui-kit/FormField/Fields/PartInBusinessField.js +9 -1
  100. package/lib/ui-kit/FormField/Fields/PartInBusinessField.js.map +1 -1
  101. package/lib/ui-kit/FormField/getField.js +1 -1
  102. package/lib/ui-kit/FormField/getField.js.map +1 -1
  103. package/lib/ui-kit/FormField/getNamesFromInput.d.ts +1 -1
  104. package/lib/ui-kit/FormField/getObjectValidator.js +1 -1
  105. package/lib/ui-kit/FormField/getObjectValidator.js.map +1 -1
  106. package/mobile/bundle/api/RetailAPI/feedbackById.d.ts +1 -1
  107. package/mobile/bundle/bundle.umd.js +54 -44
  108. package/mobile/bundle/bundle.umd.min.js +1 -1
  109. package/mobile/bundle/components/ApplicationForm/ApplicationFormContent.d.ts +1 -1
  110. package/mobile/bundle/components/ApplicationLeadForm/ApplicationLeadFormContent.d.ts +1 -1
  111. package/mobile/bundle/components/CreditForm/CreditFormStep.d.ts +1 -2
  112. package/mobile/bundle/components/CreditForm/StepsNavigationButtons.d.ts +0 -1
  113. package/mobile/bundle/components/CreditForm/creditFormStepsData.d.ts +2 -178
  114. package/mobile/bundle/ui-kit/Checkbox/getDocument.d.ts +1 -1
  115. package/mobile/bundle/ui-kit/DialogManager/openDocument.d.ts +1 -1
  116. package/mobile/bundle/ui-kit/FormField/getNamesFromInput.d.ts +1 -1
  117. package/mobile/dist/api/RetailAPI/feedbackById.d.ts +1 -1
  118. package/mobile/dist/api/RetailAPI/feedbackById.js +2 -2
  119. package/mobile/dist/api/RetailAPI/feedbackById.js.map +1 -1
  120. package/mobile/dist/components/ApplicationForm/ApplicationFormContent.d.ts +1 -1
  121. package/mobile/dist/components/ApplicationForm/getInitialFormState.js +1 -1
  122. package/mobile/dist/components/ApplicationForm/getInitialFormState.js.map +1 -1
  123. package/mobile/dist/components/ApplicationForm/renderInputs.js +2 -2
  124. package/mobile/dist/components/ApplicationForm/renderInputs.js.map +1 -1
  125. package/mobile/dist/components/ApplicationLeadForm/ApplicationLeadFormContent.d.ts +1 -1
  126. package/mobile/dist/components/ApplicationLeadForm/GroupedConsents.js.map +1 -1
  127. package/mobile/dist/components/ApplicationLeadForm/consents.js +8 -8
  128. package/mobile/dist/components/ApplicationLeadForm/consents.js.map +1 -1
  129. package/mobile/dist/components/ApplicationLeadForm/getInitialFormState.js +1 -1
  130. package/mobile/dist/components/ApplicationLeadForm/getInitialFormState.js.map +1 -1
  131. package/mobile/dist/components/ApplicationLeadForm/useInitApplicationLead.js +1 -1
  132. package/mobile/dist/components/ApplicationLeadForm/useInitApplicationLead.js.map +1 -1
  133. package/mobile/dist/components/CreditForm/CreditForm.js +3 -3
  134. package/mobile/dist/components/CreditForm/CreditForm.js.map +1 -1
  135. package/mobile/dist/components/CreditForm/CreditFormProgress.js +3 -3
  136. package/mobile/dist/components/CreditForm/CreditFormProgress.js.map +1 -1
  137. package/mobile/dist/components/CreditForm/CreditFormStep.d.ts +1 -2
  138. package/mobile/dist/components/CreditForm/CreditFormStep.js +3 -3
  139. package/mobile/dist/components/CreditForm/CreditFormStep.js.map +1 -1
  140. package/mobile/dist/components/CreditForm/StepsNavigationButtons.d.ts +0 -1
  141. package/mobile/dist/components/CreditForm/StepsNavigationButtons.js +2 -1
  142. package/mobile/dist/components/CreditForm/StepsNavigationButtons.js.map +1 -1
  143. package/mobile/dist/components/CreditForm/creditFormStepsData.d.ts +2 -178
  144. package/mobile/dist/components/CreditForm/creditFormStepsData.js +7 -8
  145. package/mobile/dist/components/CreditForm/creditFormStepsData.js.map +1 -1
  146. package/mobile/dist/ui-kit/Checkbox/CheckboxWithDoc.js +3 -1
  147. package/mobile/dist/ui-kit/Checkbox/CheckboxWithDoc.js.map +1 -1
  148. package/mobile/dist/ui-kit/Checkbox/getDocument.d.ts +1 -1
  149. package/mobile/dist/ui-kit/Checkbox/getDocument.js +2 -2
  150. package/mobile/dist/ui-kit/Checkbox/getDocument.js.map +1 -1
  151. package/mobile/dist/ui-kit/ConsentBkiDialog/ConsentBkiDialog.js +3 -1
  152. package/mobile/dist/ui-kit/ConsentBkiDialog/ConsentBkiDialog.js.map +1 -1
  153. package/mobile/dist/ui-kit/DialogManager/openDocument.d.ts +1 -1
  154. package/mobile/dist/ui-kit/DialogManager/openDocument.js +3 -3
  155. package/mobile/dist/ui-kit/DialogManager/openDocument.js.map +1 -1
  156. package/mobile/dist/ui-kit/FormField/Fields/PartInBusinessField.js +9 -1
  157. package/mobile/dist/ui-kit/FormField/Fields/PartInBusinessField.js.map +1 -1
  158. package/mobile/dist/ui-kit/FormField/getField.js +1 -1
  159. package/mobile/dist/ui-kit/FormField/getField.js.map +1 -1
  160. package/mobile/dist/ui-kit/FormField/getNamesFromInput.d.ts +1 -1
  161. package/mobile/dist/ui-kit/FormField/getObjectValidator.js +1 -1
  162. package/mobile/dist/ui-kit/FormField/getObjectValidator.js.map +1 -1
  163. package/mobile/lib/api/RetailAPI/feedbackById.d.ts +1 -1
  164. package/mobile/lib/api/RetailAPI/feedbackById.js +2 -2
  165. package/mobile/lib/api/RetailAPI/feedbackById.js.map +1 -1
  166. package/mobile/lib/components/ApplicationForm/ApplicationFormContent.d.ts +1 -1
  167. package/mobile/lib/components/ApplicationForm/getInitialFormState.js +1 -1
  168. package/mobile/lib/components/ApplicationForm/getInitialFormState.js.map +1 -1
  169. package/mobile/lib/components/ApplicationForm/renderInputs.js +2 -2
  170. package/mobile/lib/components/ApplicationForm/renderInputs.js.map +1 -1
  171. package/mobile/lib/components/ApplicationLeadForm/ApplicationLeadFormContent.d.ts +1 -1
  172. package/mobile/lib/components/ApplicationLeadForm/GroupedConsents.js.map +1 -1
  173. package/mobile/lib/components/ApplicationLeadForm/consents.js +8 -8
  174. package/mobile/lib/components/ApplicationLeadForm/consents.js.map +1 -1
  175. package/mobile/lib/components/ApplicationLeadForm/getInitialFormState.js +1 -1
  176. package/mobile/lib/components/ApplicationLeadForm/getInitialFormState.js.map +1 -1
  177. package/mobile/lib/components/ApplicationLeadForm/useInitApplicationLead.js +1 -1
  178. package/mobile/lib/components/ApplicationLeadForm/useInitApplicationLead.js.map +1 -1
  179. package/mobile/lib/components/CreditForm/CreditForm.js +3 -3
  180. package/mobile/lib/components/CreditForm/CreditForm.js.map +1 -1
  181. package/mobile/lib/components/CreditForm/CreditFormProgress.js +3 -3
  182. package/mobile/lib/components/CreditForm/CreditFormProgress.js.map +1 -1
  183. package/mobile/lib/components/CreditForm/CreditFormStep.d.ts +1 -2
  184. package/mobile/lib/components/CreditForm/CreditFormStep.js +3 -3
  185. package/mobile/lib/components/CreditForm/CreditFormStep.js.map +1 -1
  186. package/mobile/lib/components/CreditForm/StepsNavigationButtons.d.ts +0 -1
  187. package/mobile/lib/components/CreditForm/StepsNavigationButtons.js +2 -1
  188. package/mobile/lib/components/CreditForm/StepsNavigationButtons.js.map +1 -1
  189. package/mobile/lib/components/CreditForm/creditFormStepsData.d.ts +2 -178
  190. package/mobile/lib/components/CreditForm/creditFormStepsData.js +7 -8
  191. package/mobile/lib/components/CreditForm/creditFormStepsData.js.map +1 -1
  192. package/mobile/lib/ui-kit/Checkbox/CheckboxWithDoc.js +3 -1
  193. package/mobile/lib/ui-kit/Checkbox/CheckboxWithDoc.js.map +1 -1
  194. package/mobile/lib/ui-kit/Checkbox/getDocument.d.ts +1 -1
  195. package/mobile/lib/ui-kit/Checkbox/getDocument.js +2 -2
  196. package/mobile/lib/ui-kit/Checkbox/getDocument.js.map +1 -1
  197. package/mobile/lib/ui-kit/ConsentBkiDialog/ConsentBkiDialog.js +3 -1
  198. package/mobile/lib/ui-kit/ConsentBkiDialog/ConsentBkiDialog.js.map +1 -1
  199. package/mobile/lib/ui-kit/DialogManager/openDocument.d.ts +1 -1
  200. package/mobile/lib/ui-kit/DialogManager/openDocument.js +3 -3
  201. package/mobile/lib/ui-kit/DialogManager/openDocument.js.map +1 -1
  202. package/mobile/lib/ui-kit/FormField/Fields/PartInBusinessField.js +9 -1
  203. package/mobile/lib/ui-kit/FormField/Fields/PartInBusinessField.js.map +1 -1
  204. package/mobile/lib/ui-kit/FormField/getField.js +1 -1
  205. package/mobile/lib/ui-kit/FormField/getField.js.map +1 -1
  206. package/mobile/lib/ui-kit/FormField/getNamesFromInput.d.ts +1 -1
  207. package/mobile/lib/ui-kit/FormField/getObjectValidator.js +1 -1
  208. package/mobile/lib/ui-kit/FormField/getObjectValidator.js.map +1 -1
  209. package/mobile/src/api/RetailAPI/feedbackById.ts +5 -2
  210. package/mobile/src/components/ApplicationForm/ApplicationFormContent.ts +1 -1
  211. package/mobile/src/components/ApplicationForm/getInitialFormState.tsx +1 -1
  212. package/mobile/src/components/ApplicationForm/renderInputs.tsx +2 -2
  213. package/mobile/src/components/ApplicationLeadForm/ApplicationLeadFormContent.ts +1 -1
  214. package/mobile/src/components/ApplicationLeadForm/GroupedConsents.tsx +9 -2
  215. package/mobile/src/components/ApplicationLeadForm/consents.ts +8 -8
  216. package/mobile/src/components/ApplicationLeadForm/getInitialFormState.tsx +1 -1
  217. package/mobile/src/components/ApplicationLeadForm/useInitApplicationLead.ts +1 -1
  218. package/mobile/src/components/CreditForm/CreditForm.tsx +7 -5
  219. package/mobile/src/components/CreditForm/CreditFormProgress.tsx +5 -5
  220. package/mobile/src/components/CreditForm/CreditFormStep.tsx +4 -5
  221. package/mobile/src/components/CreditForm/StepsNavigationButtons.tsx +3 -2
  222. package/mobile/src/components/CreditForm/creditFormStepsData.tsx +9 -8
  223. package/mobile/src/ui-kit/Checkbox/CheckboxWithDoc.tsx +6 -1
  224. package/mobile/src/ui-kit/Checkbox/getDocument.ts +2 -2
  225. package/mobile/src/ui-kit/ConsentBkiDialog/ConsentBkiDialog.tsx +3 -1
  226. package/mobile/src/ui-kit/DialogManager/openDocument.tsx +11 -3
  227. package/mobile/src/ui-kit/FormField/Fields/PartInBusinessField.tsx +25 -9
  228. package/mobile/src/ui-kit/FormField/getField.tsx +1 -1
  229. package/mobile/src/ui-kit/FormField/getObjectValidator.tsx +1 -1
  230. package/package.json +2 -2
  231. package/src/api/RetailAPI/feedbackById.ts +5 -2
  232. package/src/components/ApplicationForm/ApplicationFormContent.ts +1 -1
  233. package/src/components/ApplicationForm/getInitialFormState.tsx +1 -1
  234. package/src/components/ApplicationForm/renderInputs.tsx +2 -2
  235. package/src/components/ApplicationLeadForm/ApplicationLeadForm.fixture.tsx +0 -121
  236. package/src/components/ApplicationLeadForm/ApplicationLeadFormContent.ts +1 -1
  237. package/src/components/ApplicationLeadForm/GroupedConsents.tsx +9 -2
  238. package/src/components/ApplicationLeadForm/consents.ts +8 -8
  239. package/src/components/ApplicationLeadForm/getInitialFormState.tsx +1 -1
  240. package/src/components/ApplicationLeadForm/useInitApplicationLead.ts +1 -1
  241. package/src/components/CreditForm/CreditForm.tsx +7 -5
  242. package/src/components/CreditForm/CreditFormProgress.tsx +5 -5
  243. package/src/components/CreditForm/CreditFormStep.tsx +4 -5
  244. package/src/components/CreditForm/StepsNavigationButtons.tsx +3 -2
  245. package/src/components/CreditForm/creditFormStepsData.tsx +9 -8
  246. package/src/icons/IconName.ts +6 -360
  247. package/src/ui-kit/Checkbox/CheckboxWithDoc.tsx +6 -1
  248. package/src/ui-kit/Checkbox/getDocument.ts +2 -2
  249. package/src/ui-kit/ConsentBkiDialog/ConsentBkiDialog.tsx +3 -1
  250. package/src/ui-kit/DialogManager/openDocument.tsx +11 -3
  251. package/src/ui-kit/FormField/Fields/PartInBusinessField.tsx +25 -9
  252. package/src/ui-kit/FormField/getField.tsx +1 -1
  253. package/src/ui-kit/FormField/getObjectValidator.tsx +1 -1
@@ -47,125 +47,4 @@ export default {
47
47
  <DialogManager />
48
48
  </div>
49
49
  ),
50
- step1: (
51
- <div className="container grid grid-cols-12">
52
- <ApplicationLeadForm
53
- className="col-span-12"
54
- title="Заявка на кредит &#171;Кредит на любые цели&#187;"
55
- typeForm="CORRUPTION"
56
- endpoint="lead"
57
- sections={[
58
- { title: 'Персональные данные', inputs: [] },
59
- {
60
- columns: 2,
61
- inputs: [
62
- { fieldType: 'common', name: 'surname', required: true, dadata: true },
63
- { fieldType: 'common', name: 'name', required: true, dadata: true },
64
- { fieldType: 'common', name: 'middleName', dadata: true },
65
- { fieldType: 'common', name: 'sex', required: true },
66
- { fieldType: 'common', name: 'birthday', required: true },
67
- { fieldType: 'common', name: 'birthPlace', required: true },
68
- { fieldType: 'common', name: 'phone', required: true },
69
- { fieldType: 'common', name: 'email', required: true, dadata: true },
70
- ],
71
- },
72
- {
73
- title: 'Паспортные данные',
74
- inputs: [
75
- { fieldType: 'common', name: 'dulSerie', required: true },
76
- { fieldType: 'common', name: 'dulNumber', required: true },
77
- { fieldType: 'common', name: 'dulIssueDateField', required: true },
78
- { fieldType: 'common', name: 'dulSubdivisionCode', required: true, dadata: true },
79
- ],
80
- },
81
- {
82
- inputs: [
83
- { fieldType: 'common', name: 'dulIssuedBy', required: true, dadata: true },
84
- {
85
- fieldType: 'common',
86
- name: 'education',
87
- required: true,
88
- },
89
- ],
90
- },
91
- {
92
- title: 'Адрес регистрации по месту жительства',
93
- inputs: [],
94
- },
95
- {
96
- inputs: [
97
- { fieldType: 'common', name: 'participantDateRegistration', required: true },
98
- { fieldType: 'common', name: 'participantAddress', required: true, dadata: true },
99
- ],
100
- },
101
- ]}
102
- button={button}
103
- />
104
- <PopupManager />
105
- <DialogManager />
106
- </div>
107
- ),
108
- employmentData: (
109
- <div className="container grid grid-cols-12">
110
- <ApplicationLeadForm
111
- className="col-span-12"
112
- title="Заявка на кредит &#171;Кредит на любые цели&#187;"
113
- typeForm="CORRUPTION"
114
- endpoint="lead"
115
- sections={[
116
- {
117
- title: 'Данные о трудоустройстве',
118
- inputs: [],
119
- },
120
- {
121
- inputs: [
122
- { fieldType: 'common', name: 'employment', required: true },
123
- { fieldType: 'common', name: 'organizationName', required: true, dadata: true },
124
- ],
125
- },
126
- {
127
- columns: 2,
128
- inputs: [
129
- { fieldType: 'common', name: 'inn', required: true, dadata: true },
130
- { fieldType: 'common', name: 'legalForm', required: true },
131
- ],
132
- },
133
- {
134
- inputs: [
135
- { fieldType: 'common', name: 'organization', required: true },
136
- { fieldType: 'common', name: 'amountWorkers', required: true },
137
- ],
138
- },
139
- {
140
- columns: 2,
141
- inputs: [
142
- { fieldType: 'common', name: 'employerActivities', required: true },
143
- { fieldType: 'common', name: 'employerOrganization', required: true },
144
- { fieldType: 'common', name: 'generalSeniority', required: true },
145
- { fieldType: 'common', name: 'lastJobExperience', required: true },
146
- { fieldType: 'common', name: 'experience5Years', required: true },
147
- { fieldType: 'common', name: 'jobsNumber', required: true },
148
- ],
149
- },
150
- {
151
- inputs: [
152
- { fieldType: 'common', name: 'phone', label: 'Телефон работодателя', required: true },
153
- { fieldType: 'common', name: 'beginDate', required: true },
154
- { fieldType: 'common', name: 'positionOrganization', required: true },
155
- ],
156
- },
157
- {
158
- title: 'Адрес работодателя',
159
- inputs: [],
160
- },
161
- {
162
- inputs: [{ fieldType: 'common', name: 'fullAddress', required: true }],
163
- },
164
- ]}
165
- button={button}
166
- />
167
- <PopupManager />
168
- <DialogManager />
169
- </div>
170
- ),
171
50
  };
@@ -28,7 +28,7 @@ export type FieldDefaultDef = Required &
28
28
  TextProps &
29
29
  LabelProps &
30
30
  ConditionFieldProps & {
31
- name: NameFieldDef;
31
+ name?: NameFieldDef;
32
32
  };
33
33
 
34
34
  /**
@@ -18,7 +18,7 @@ const CONSENT_REQUIRED = 'Отметьте все обязательные со
18
18
 
19
19
  export const GroupedConsents = JSX<GroupedConsentsProps>(
20
20
  ({ inputs = [], typeForm = '', field, key }) => {
21
- const isChecked = inputs.every((_) => Boolean(field(_.name).value));
21
+ const isChecked = inputs.every((_) => Boolean(field(_.name as keyof FormState).value));
22
22
 
23
23
  const handleGeneralToggle = (value: boolean) => {
24
24
  for (const item of inputs) {
@@ -31,7 +31,14 @@ export const GroupedConsents = JSX<GroupedConsentsProps>(
31
31
  () =>
32
32
  inputs
33
33
  ?.filter((_) => _.required)
34
- ?.some((_) => Boolean(withValidator(field(_?.name), validatorObj[_?.name]).error)),
34
+ ?.some((_) =>
35
+ Boolean(
36
+ withValidator(
37
+ field(_?.name as keyof FormState),
38
+ validatorObj[_?.name as keyof FormState],
39
+ ).error,
40
+ ),
41
+ ),
35
42
  [inputs],
36
43
  );
37
44
 
@@ -10,23 +10,23 @@ export const CONSENTS: Record<keyof FormConsents, ConsentData> = {
10
10
  text: 'Согласие на обработку персональных данных',
11
11
  docId: 4,
12
12
  },
13
+ consentInformFlg: {
14
+ text: 'Согласие на информирование о продуктах и услугах Банка',
15
+ docId: 14,
16
+ },
13
17
  consentProviderFlg: {
14
18
  text: 'Согласие об использовании простой электронной подписи',
15
19
  docId: 5,
16
20
  },
21
+ consentOthersFlg: {
22
+ text: 'Прочие согласия',
23
+ docId: 1,
24
+ },
17
25
  consentPfrFlg: {
18
26
  text: 'Согласие на запрос в ПФР',
19
27
  docId: 3,
20
28
  },
21
- consentInformFlg: {
22
- text: 'Согласие на информирование о продуктах и услугах Банка',
23
- docId: 14,
24
- },
25
29
  consentToReceiveMaterials: {
26
30
  text: 'Согласен на получение информационных и аналитических материалов по электронной почте',
27
31
  },
28
- consentOthersFlg: {
29
- text: 'Прочие согласия',
30
- docId: 1,
31
- },
32
32
  };
@@ -150,7 +150,7 @@ export const getInitialFormState = (
150
150
  const formState = Object.fromEntries(
151
151
  inputs.map((_) => [
152
152
  _.name,
153
- (_.fieldType === 'ved' && _?.defaultValue) || initialFormState[_.name],
153
+ (_.fieldType === 'ved' && _?.defaultValue) || initialFormState[_.name || ''],
154
154
  ]),
155
155
  );
156
156
 
@@ -7,7 +7,7 @@ export const useInitApplicationLead = (nextStepLink: string) => {
7
7
  const [isLoading, setIsLoading] = useState(false);
8
8
  const [profileId] = useLocalStorage<string>('profileId');
9
9
  const [, setEsiaData] = useLocalStorage('esiaData');
10
- const params = new URLSearchParams(decodeURIComponent(window.location.search));
10
+ const params = new URLSearchParams(decodeURIComponent(globalThis.location.search));
11
11
  const esiaAuth = params.get('esiaAuth');
12
12
 
13
13
  const updateEsiaProfile = useCallback(async () => {
@@ -3,8 +3,10 @@ import { useCallback, useMemo, useState } from '@redneckz/uni-jsx/lib/hooks';
3
3
  import { BlockWrapper } from '../../ui-kit/BlockWrapper';
4
4
  import { type UniBlockProps } from '../../UniBlock/UniBlockProps';
5
5
  import { style } from '../../utils/style';
6
- import { type SectionsProps } from '../ApplicationForm/ApplicationFormContent';
7
- import { type FieldDef } from '../ApplicationLeadForm/ApplicationLeadFormContent';
6
+ import {
7
+ type FieldDef,
8
+ type SectionsProps,
9
+ } from '../ApplicationLeadForm/ApplicationLeadFormContent';
8
10
  import { type CreditFormContent } from './CreditFormContent';
9
11
  import { CreditFormProgress } from './CreditFormProgress';
10
12
  import { CreditFormStep } from './CreditFormStep';
@@ -22,12 +24,13 @@ const STEPS_TITLES = [
22
24
  interface CreditFormProps extends CreditFormContent, UniBlockProps {}
23
25
 
24
26
  export const CreditForm = JSX<CreditFormProps>(({ className, ...rest }) => {
25
- const [step, setStep] = useState(1);
27
+ const [step, setStep] = useState(0);
26
28
  const sections = useMemo(() => stepsSectionsMap[step], [step]);
29
+
27
30
  const inputs = (sections?.flatMap((_: SectionsProps) => _?.inputs) || []) as FieldDef[];
28
31
 
29
32
  const handleNextStep = useCallback(() => {
30
- setStep((_) => Math.min(_ + 1, STEPS_COUNT));
33
+ setStep((_) => Math.min(_ + 1, STEPS_COUNT - 1));
31
34
  }, []);
32
35
 
33
36
  const handlePrevStep = useCallback(() => {
@@ -43,7 +46,6 @@ export const CreditForm = JSX<CreditFormProps>(({ className, ...rest }) => {
43
46
  <CreditFormStep
44
47
  inputs={inputs}
45
48
  key={String(step)}
46
- totalSteps={STEPS_COUNT}
47
49
  step={step}
48
50
  sections={sections}
49
51
  onNextStep={handleNextStep}
@@ -9,16 +9,16 @@ export interface CreditFormProgressProps {
9
9
  }
10
10
 
11
11
  export const CreditFormProgress = JSX<CreditFormProgressProps>(
12
- ({ step = 1, totalSteps = 5, stepsTitles = [] }) => {
13
- const progress = useMemo(() => (step / totalSteps) * 100, [step, totalSteps]);
12
+ ({ step = 0, totalSteps = 5, stepsTitles = [] }) => {
13
+ const progress = useMemo(() => ((step + 1) / totalSteps) * 100, [step, totalSteps]);
14
14
 
15
15
  return (
16
16
  <div className="py-lg px-5xl bg-white col-span-12">
17
17
  <div>
18
18
  <span className="font-bold">
19
- Шаг {step} из {totalSteps}.
20
- </span>{' '}
21
- {stepsTitles[step - 1] || null}
19
+ Шаг {step + 1} из {totalSteps}.
20
+ </span>
21
+ {stepsTitles[step] || null}
22
22
  <ProgressBar step={progress} showPercentage={false} />
23
23
  </div>
24
24
  </div>
@@ -13,12 +13,11 @@ import { StepsNavigationButtons } from './StepsNavigationButtons';
13
13
  import { useCreditFormApi } from './useCreditFormApi';
14
14
 
15
15
  export interface StepProps {
16
- sections: SectionsProps[];
16
+ sections?: SectionsProps[];
17
17
  field: FormFieldRegisterer<FormStateMap[keyof FormStateMap]>;
18
18
  }
19
19
 
20
20
  export interface CreditFormStepProps {
21
- totalSteps: number;
22
21
  step: number;
23
22
  sections: SectionsProps[];
24
23
  inputs: FieldDef[];
@@ -27,7 +26,7 @@ export interface CreditFormStepProps {
27
26
  }
28
27
 
29
28
  export const CreditFormStep = JSX<CreditFormStepProps>(
30
- ({ totalSteps, step, sections, onPrevStep, onNextStep, inputs }) => {
29
+ ({ step, sections, onPrevStep, onNextStep, inputs }) => {
31
30
  const [localStorageData, saveStep] = useLocalStorage<Record<string, any>>('leadForm');
32
31
  const initialState = getInitialFormState(step as keyof FormStateMap, localStorageData);
33
32
 
@@ -42,14 +41,14 @@ export const CreditFormStep = JSX<CreditFormStepProps>(
42
41
  return (
43
42
  <form onSubmit={onSubmit} className="space-y-m">
44
43
  {renderStep({ sections, field })}
45
- <StepsNavigationButtons step={step} totalSteps={totalSteps} onPrevStep={onPrevStep} />
44
+ <StepsNavigationButtons step={step} onPrevStep={onPrevStep} />
46
45
  </form>
47
46
  );
48
47
  },
49
48
  );
50
49
 
51
50
  const renderStep = ({ sections, field }: StepProps) => {
52
- return sections.map((_, i) => (
51
+ return sections?.map((_, i) => (
53
52
  <div key={`section-${i}`} className={style(inputColumnStyles(_.columns), 'grid gap-x-m')}>
54
53
  {renderInfo(_?.inputs)}
55
54
  {renderTitle(_?.title)}
@@ -4,11 +4,12 @@ import { style } from '../../utils/style';
4
4
 
5
5
  export interface StepsNavigationButtonsProps {
6
6
  step: number;
7
- totalSteps: number;
8
7
  onPrevStep?: () => void;
9
8
  }
10
9
 
11
10
  export const StepsNavigationButtons = JSX<StepsNavigationButtonsProps>(({ step, onPrevStep }) => {
11
+ const isFirstStep = step === 0;
12
+
12
13
  return (
13
14
  <div className={'flex justify-between'}>
14
15
  <Button
@@ -16,7 +17,7 @@ export const StepsNavigationButtons = JSX<StepsNavigationButtonsProps>(({ step,
16
17
  className={style('w-full @xl:w-auto')}
17
18
  type="button"
18
19
  version="secondary"
19
- disabled={step === 1}
20
+ disabled={isFirstStep}
20
21
  >
21
22
  Назад
22
23
  </Button>
@@ -1,9 +1,10 @@
1
1
  /* eslint-disable max-lines */
2
2
  /* eslint-disable max-len */
3
3
 
4
- //TODO: DO List
5
- export const stepsSectionsMap = {
6
- 1: [
4
+ import { type SectionsProps } from '../ApplicationLeadForm/ApplicationLeadFormContent';
5
+
6
+ export const stepsSectionsMap: SectionsProps[][] = [
7
+ [
7
8
  {
8
9
  title: 'Персональные данные',
9
10
  columns: 2,
@@ -58,7 +59,7 @@ export const stepsSectionsMap = {
58
59
  ],
59
60
  },
60
61
  ],
61
- 2: [
62
+ [
62
63
  {
63
64
  title: 'Данные о трудоустройстве',
64
65
  inputs: [],
@@ -122,7 +123,7 @@ export const stepsSectionsMap = {
122
123
  inputs: [{ fieldType: 'common', name: 'fullAddress', required: true }],
123
124
  },
124
125
  ],
125
- 3: [
126
+ [
126
127
  {
127
128
  title: 'Семейное положение',
128
129
  },
@@ -166,7 +167,7 @@ export const stepsSectionsMap = {
166
167
  inputs: [{ fieldType: 'common', name: 'armyIdFlg' }],
167
168
  },
168
169
  ],
169
- 4: [
170
+ [
170
171
  {
171
172
  title: 'Дополнительные сведения',
172
173
  columns: 1,
@@ -188,7 +189,7 @@ export const stepsSectionsMap = {
188
189
  inputs: [{ fieldType: 'common', name: 'creditInRshbCd' }],
189
190
  },
190
191
  ],
191
- 5: [
192
+ [
192
193
  {
193
194
  title: 'Отделение Банка',
194
195
  columns: 1,
@@ -217,4 +218,4 @@ export const stepsSectionsMap = {
217
218
  inputs: [{ fieldType: 'common', name: 'bankEmployeeCode' }],
218
219
  },
219
220
  ],
220
- };
221
+ ];