@redneckz/wildless-cms-uni-blocks 0.14.813 → 0.14.815

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 (396) hide show
  1. package/bundle/UniBlock/UniBlock.d.ts +3 -1
  2. package/bundle/blocks.schema.json +1 -1
  3. package/bundle/bundle.umd.js +257 -149
  4. package/bundle/bundle.umd.min.js +1 -1
  5. package/bundle/components/ApplicationLeadForm/EsiaLoginBanner.d.ts +4 -0
  6. package/bundle/components/ApplicationLeadForm/applicationFormData.d.ts +0 -1
  7. package/bundle/components/ApplicationLeadForm/getInitialFormState.d.ts +1 -1
  8. package/bundle/components/ApplicationLeadForm/parseEsiaProfile.d.ts +2 -2
  9. package/bundle/components/ApplicationLeadForm/useApplicationLeadApi.d.ts +2 -2
  10. package/bundle/components/ApplicationLeadForm/useInitApplicationLead.d.ts +3 -1
  11. package/bundle/components/GalleryLayout/GalleryLayout.d.ts +5 -0
  12. package/bundle/components/GalleryLayout/GalleryLayoutContent.d.ts +14 -0
  13. package/bundle/retail/api/checkCode.d.ts +1 -0
  14. package/bundle/retail/api/{updateProfileEsia.d.ts → esiaRequestProfile.d.ts} +11 -4
  15. package/bundle/retail/api/updateUserTask.d.ts +1 -0
  16. package/bundle/retail/api/uploadFile.d.ts +1 -1
  17. package/bundle/retail/model/NameFieldDef.d.ts +1 -1
  18. package/bundle/ui-kit/FormField/shouldRenderField.d.ts +1 -1
  19. package/dist/BlockRenderer/renderBlock.js +1 -1
  20. package/dist/BlockRenderer/renderBlock.js.map +1 -1
  21. package/dist/UniBlock/UniBlock.d.ts +3 -1
  22. package/dist/UniBlock/UniBlock.js.map +1 -1
  23. package/dist/components/ApplicationLeadForm/ApplicationLeadForm.js +13 -3
  24. package/dist/components/ApplicationLeadForm/ApplicationLeadForm.js.map +1 -1
  25. package/dist/components/ApplicationLeadForm/EsiaLoginBanner.d.ts +4 -0
  26. package/dist/components/ApplicationLeadForm/EsiaLoginBanner.js +23 -0
  27. package/dist/components/ApplicationLeadForm/EsiaLoginBanner.js.map +1 -0
  28. package/dist/components/ApplicationLeadForm/applicationFormData.d.ts +0 -1
  29. package/dist/components/ApplicationLeadForm/applicationFormData.js +6 -31
  30. package/dist/components/ApplicationLeadForm/applicationFormData.js.map +1 -1
  31. package/dist/components/ApplicationLeadForm/getInitialFormState.d.ts +1 -1
  32. package/dist/components/ApplicationLeadForm/getInitialFormState.js +8 -2
  33. package/dist/components/ApplicationLeadForm/getInitialFormState.js.map +1 -1
  34. package/dist/components/ApplicationLeadForm/parseEsiaProfile.d.ts +2 -2
  35. package/dist/components/ApplicationLeadForm/parseEsiaProfile.js +54 -19
  36. package/dist/components/ApplicationLeadForm/parseEsiaProfile.js.map +1 -1
  37. package/dist/components/ApplicationLeadForm/useApplicationLeadApi.d.ts +2 -2
  38. package/dist/components/ApplicationLeadForm/useApplicationLeadApi.js +7 -10
  39. package/dist/components/ApplicationLeadForm/useApplicationLeadApi.js.map +1 -1
  40. package/dist/components/ApplicationLeadForm/useInitApplicationLead.d.ts +3 -1
  41. package/dist/components/ApplicationLeadForm/useInitApplicationLead.js +12 -16
  42. package/dist/components/ApplicationLeadForm/useInitApplicationLead.js.map +1 -1
  43. package/dist/components/Blocks.js +2 -0
  44. package/dist/components/Blocks.js.map +1 -1
  45. package/dist/components/Blocks.mobile.js +2 -0
  46. package/dist/components/Blocks.mobile.js.map +1 -1
  47. package/dist/components/CarouselCatalogCard/CarouselCatalogCard.js +1 -1
  48. package/dist/components/CarouselCatalogCard/CarouselCatalogCard.js.map +1 -1
  49. package/dist/components/GalleryLayout/GalleryLayout.d.ts +5 -0
  50. package/dist/components/GalleryLayout/GalleryLayout.js +71 -0
  51. package/dist/components/GalleryLayout/GalleryLayout.js.map +1 -0
  52. package/dist/components/GalleryLayout/GalleryLayoutContent.d.ts +14 -0
  53. package/dist/components/GalleryLayout/GalleryLayoutContent.js +2 -0
  54. package/dist/components/GalleryLayout/GalleryLayoutContent.js.map +1 -0
  55. package/dist/retail/adaptors/getFamilyStatusAndIncomeData.js +2 -2
  56. package/dist/retail/adaptors/getFamilyStatusAndIncomeData.js.map +1 -1
  57. package/dist/retail/api/checkCode.d.ts +1 -0
  58. package/dist/retail/api/checkCode.js +3 -2
  59. package/dist/retail/api/checkCode.js.map +1 -1
  60. package/{lib/retail/api/updateProfileEsia.d.ts → dist/retail/api/esiaRequestProfile.d.ts} +11 -4
  61. package/dist/retail/api/esiaRequestProfile.js +10 -0
  62. package/dist/retail/api/esiaRequestProfile.js.map +1 -0
  63. package/dist/retail/api/updateUserTask.d.ts +1 -0
  64. package/dist/retail/api/updateUserTask.js.map +1 -1
  65. package/dist/retail/api/uploadFile.d.ts +1 -1
  66. package/dist/retail/api/uploadFile.js +2 -3
  67. package/dist/retail/api/uploadFile.js.map +1 -1
  68. package/dist/retail/components/DraftDialog/parseDraftTask.js +2 -1
  69. package/dist/retail/components/DraftDialog/parseDraftTask.js.map +1 -1
  70. package/dist/retail/content.js +10 -1
  71. package/dist/retail/content.js.map +1 -1
  72. package/dist/retail/model/NameFieldDef.d.ts +1 -1
  73. package/dist/retail/utils/mainFormStateMap.js +1 -0
  74. package/dist/retail/utils/mainFormStateMap.js.map +1 -1
  75. package/dist/ui-kit/BaseProductTile/BaseProductTile.js +8 -1
  76. package/dist/ui-kit/BaseProductTile/BaseProductTile.js.map +1 -1
  77. package/dist/ui-kit/BaseTile/BaseTile.js +3 -3
  78. package/dist/ui-kit/BaseTile/BaseTile.js.map +1 -1
  79. package/dist/ui-kit/FormField/Fields/PhoneField.js +2 -1
  80. package/dist/ui-kit/FormField/Fields/PhoneField.js.map +1 -1
  81. package/dist/ui-kit/FormField/shouldRenderField.d.ts +1 -1
  82. package/dist/ui-kit/FormField/shouldRenderField.js +1 -1
  83. package/dist/ui-kit/FormField/shouldRenderField.js.map +1 -1
  84. package/lib/BlockRenderer/renderBlock.js +1 -1
  85. package/lib/BlockRenderer/renderBlock.js.map +1 -1
  86. package/lib/UniBlock/UniBlock.d.ts +3 -1
  87. package/lib/UniBlock/UniBlock.js.map +1 -1
  88. package/lib/common.css +1 -1
  89. package/lib/components/ApplicationLeadForm/ApplicationLeadForm.js +13 -3
  90. package/lib/components/ApplicationLeadForm/ApplicationLeadForm.js.map +1 -1
  91. package/lib/components/ApplicationLeadForm/EsiaLoginBanner.d.ts +4 -0
  92. package/lib/components/ApplicationLeadForm/EsiaLoginBanner.js +21 -0
  93. package/lib/components/ApplicationLeadForm/EsiaLoginBanner.js.map +1 -0
  94. package/lib/components/ApplicationLeadForm/applicationFormData.d.ts +0 -1
  95. package/lib/components/ApplicationLeadForm/applicationFormData.js +5 -30
  96. package/lib/components/ApplicationLeadForm/applicationFormData.js.map +1 -1
  97. package/lib/components/ApplicationLeadForm/getInitialFormState.d.ts +1 -1
  98. package/lib/components/ApplicationLeadForm/getInitialFormState.js +8 -2
  99. package/lib/components/ApplicationLeadForm/getInitialFormState.js.map +1 -1
  100. package/lib/components/ApplicationLeadForm/parseEsiaProfile.d.ts +2 -2
  101. package/lib/components/ApplicationLeadForm/parseEsiaProfile.js +54 -19
  102. package/lib/components/ApplicationLeadForm/parseEsiaProfile.js.map +1 -1
  103. package/lib/components/ApplicationLeadForm/useApplicationLeadApi.d.ts +2 -2
  104. package/lib/components/ApplicationLeadForm/useApplicationLeadApi.js +7 -10
  105. package/lib/components/ApplicationLeadForm/useApplicationLeadApi.js.map +1 -1
  106. package/lib/components/ApplicationLeadForm/useInitApplicationLead.d.ts +3 -1
  107. package/lib/components/ApplicationLeadForm/useInitApplicationLead.js +12 -16
  108. package/lib/components/ApplicationLeadForm/useInitApplicationLead.js.map +1 -1
  109. package/lib/components/Blocks.js +2 -0
  110. package/lib/components/Blocks.js.map +1 -1
  111. package/lib/components/Blocks.mobile.js +2 -0
  112. package/lib/components/Blocks.mobile.js.map +1 -1
  113. package/lib/components/CarouselCatalogCard/CarouselCatalogCard.js +1 -1
  114. package/lib/components/CarouselCatalogCard/CarouselCatalogCard.js.map +1 -1
  115. package/lib/components/GalleryLayout/GalleryLayout.d.ts +5 -0
  116. package/lib/{retail/components/EsiaLoginDialog/EsiaLoginDialog.fixture.d.ts → components/GalleryLayout/GalleryLayout.fixture.d.ts} +1 -1
  117. package/lib/components/GalleryLayout/GalleryLayout.js +69 -0
  118. package/lib/components/GalleryLayout/GalleryLayout.js.map +1 -0
  119. package/lib/components/GalleryLayout/GalleryLayoutContent.d.ts +14 -0
  120. package/lib/components/GalleryLayout/GalleryLayoutContent.js +2 -0
  121. package/lib/components/GalleryLayout/GalleryLayoutContent.js.map +1 -0
  122. package/lib/retail/adaptors/getFamilyStatusAndIncomeData.js +2 -2
  123. package/lib/retail/adaptors/getFamilyStatusAndIncomeData.js.map +1 -1
  124. package/lib/retail/api/checkCode.d.ts +1 -0
  125. package/lib/retail/api/checkCode.js +1 -1
  126. package/lib/retail/api/checkCode.js.map +1 -1
  127. package/{mobile/bundle/retail/api/updateProfileEsia.d.ts → lib/retail/api/esiaRequestProfile.d.ts} +11 -4
  128. package/lib/retail/api/esiaRequestProfile.js +7 -0
  129. package/lib/retail/api/esiaRequestProfile.js.map +1 -0
  130. package/lib/retail/api/updateUserTask.d.ts +1 -0
  131. package/lib/retail/api/updateUserTask.js.map +1 -1
  132. package/lib/retail/api/uploadFile.d.ts +1 -1
  133. package/lib/retail/api/uploadFile.js +2 -3
  134. package/lib/retail/api/uploadFile.js.map +1 -1
  135. package/lib/retail/components/DraftDialog/parseDraftTask.js +2 -1
  136. package/lib/retail/components/DraftDialog/parseDraftTask.js.map +1 -1
  137. package/lib/retail/content.js +10 -1
  138. package/lib/retail/content.js.map +1 -1
  139. package/lib/retail/model/NameFieldDef.d.ts +1 -1
  140. package/lib/retail/utils/mainFormStateMap.js +1 -0
  141. package/lib/retail/utils/mainFormStateMap.js.map +1 -1
  142. package/lib/ui-kit/BaseProductTile/BaseProductTile.js +9 -2
  143. package/lib/ui-kit/BaseProductTile/BaseProductTile.js.map +1 -1
  144. package/lib/ui-kit/BaseTile/BaseTile.js +3 -3
  145. package/lib/ui-kit/BaseTile/BaseTile.js.map +1 -1
  146. package/lib/ui-kit/FormField/Fields/PhoneField.js +2 -1
  147. package/lib/ui-kit/FormField/Fields/PhoneField.js.map +1 -1
  148. package/lib/ui-kit/FormField/shouldRenderField.d.ts +1 -1
  149. package/lib/ui-kit/FormField/shouldRenderField.js +1 -1
  150. package/lib/ui-kit/FormField/shouldRenderField.js.map +1 -1
  151. package/mobile/bundle/UniBlock/UniBlock.d.ts +3 -1
  152. package/mobile/bundle/bundle.umd.js +257 -149
  153. package/mobile/bundle/bundle.umd.min.js +1 -1
  154. package/mobile/bundle/components/ApplicationLeadForm/EsiaLoginBanner.d.ts +4 -0
  155. package/mobile/bundle/components/ApplicationLeadForm/applicationFormData.d.ts +0 -1
  156. package/mobile/bundle/components/ApplicationLeadForm/getInitialFormState.d.ts +1 -1
  157. package/mobile/bundle/components/ApplicationLeadForm/parseEsiaProfile.d.ts +2 -2
  158. package/mobile/bundle/components/ApplicationLeadForm/useApplicationLeadApi.d.ts +2 -2
  159. package/mobile/bundle/components/ApplicationLeadForm/useInitApplicationLead.d.ts +3 -1
  160. package/mobile/bundle/components/GalleryLayout/GalleryLayout.d.ts +5 -0
  161. package/mobile/bundle/components/GalleryLayout/GalleryLayoutContent.d.ts +14 -0
  162. package/mobile/bundle/retail/api/checkCode.d.ts +1 -0
  163. package/{dist/retail/api/updateProfileEsia.d.ts → mobile/bundle/retail/api/esiaRequestProfile.d.ts} +11 -4
  164. package/mobile/bundle/retail/api/updateUserTask.d.ts +1 -0
  165. package/mobile/bundle/retail/api/uploadFile.d.ts +1 -1
  166. package/mobile/bundle/retail/model/NameFieldDef.d.ts +1 -1
  167. package/mobile/bundle/ui-kit/FormField/shouldRenderField.d.ts +1 -1
  168. package/mobile/dist/BlockRenderer/renderBlock.js +1 -1
  169. package/mobile/dist/BlockRenderer/renderBlock.js.map +1 -1
  170. package/mobile/dist/UniBlock/UniBlock.d.ts +3 -1
  171. package/mobile/dist/UniBlock/UniBlock.js.map +1 -1
  172. package/mobile/dist/components/ApplicationLeadForm/ApplicationLeadForm.js +13 -3
  173. package/mobile/dist/components/ApplicationLeadForm/ApplicationLeadForm.js.map +1 -1
  174. package/mobile/dist/components/ApplicationLeadForm/EsiaLoginBanner.d.ts +4 -0
  175. package/mobile/dist/components/ApplicationLeadForm/EsiaLoginBanner.js +23 -0
  176. package/mobile/dist/components/ApplicationLeadForm/EsiaLoginBanner.js.map +1 -0
  177. package/mobile/dist/components/ApplicationLeadForm/applicationFormData.d.ts +0 -1
  178. package/mobile/dist/components/ApplicationLeadForm/applicationFormData.js +6 -31
  179. package/mobile/dist/components/ApplicationLeadForm/applicationFormData.js.map +1 -1
  180. package/mobile/dist/components/ApplicationLeadForm/getInitialFormState.d.ts +1 -1
  181. package/mobile/dist/components/ApplicationLeadForm/getInitialFormState.js +8 -2
  182. package/mobile/dist/components/ApplicationLeadForm/getInitialFormState.js.map +1 -1
  183. package/mobile/dist/components/ApplicationLeadForm/parseEsiaProfile.d.ts +2 -2
  184. package/mobile/dist/components/ApplicationLeadForm/parseEsiaProfile.js +54 -19
  185. package/mobile/dist/components/ApplicationLeadForm/parseEsiaProfile.js.map +1 -1
  186. package/mobile/dist/components/ApplicationLeadForm/useApplicationLeadApi.d.ts +2 -2
  187. package/mobile/dist/components/ApplicationLeadForm/useApplicationLeadApi.js +7 -10
  188. package/mobile/dist/components/ApplicationLeadForm/useApplicationLeadApi.js.map +1 -1
  189. package/mobile/dist/components/ApplicationLeadForm/useInitApplicationLead.d.ts +3 -1
  190. package/mobile/dist/components/ApplicationLeadForm/useInitApplicationLead.js +12 -16
  191. package/mobile/dist/components/ApplicationLeadForm/useInitApplicationLead.js.map +1 -1
  192. package/mobile/dist/components/Blocks.js +2 -0
  193. package/mobile/dist/components/Blocks.js.map +1 -1
  194. package/mobile/dist/components/CarouselCatalogCard/CarouselCatalogCard.js +1 -1
  195. package/mobile/dist/components/CarouselCatalogCard/CarouselCatalogCard.js.map +1 -1
  196. package/mobile/dist/components/GalleryLayout/GalleryLayout.d.ts +5 -0
  197. package/mobile/dist/components/GalleryLayout/GalleryLayout.js +71 -0
  198. package/mobile/dist/components/GalleryLayout/GalleryLayout.js.map +1 -0
  199. package/mobile/dist/components/GalleryLayout/GalleryLayoutContent.d.ts +14 -0
  200. package/mobile/dist/components/GalleryLayout/GalleryLayoutContent.js +2 -0
  201. package/mobile/dist/components/GalleryLayout/GalleryLayoutContent.js.map +1 -0
  202. package/mobile/dist/retail/adaptors/getFamilyStatusAndIncomeData.js +2 -2
  203. package/mobile/dist/retail/adaptors/getFamilyStatusAndIncomeData.js.map +1 -1
  204. package/mobile/dist/retail/api/checkCode.d.ts +1 -0
  205. package/mobile/dist/retail/api/checkCode.js +3 -2
  206. package/mobile/dist/retail/api/checkCode.js.map +1 -1
  207. package/mobile/dist/retail/api/esiaRequestProfile.d.ts +84 -0
  208. package/mobile/dist/retail/api/esiaRequestProfile.js +10 -0
  209. package/mobile/dist/retail/api/esiaRequestProfile.js.map +1 -0
  210. package/mobile/dist/retail/api/updateUserTask.d.ts +1 -0
  211. package/mobile/dist/retail/api/updateUserTask.js.map +1 -1
  212. package/mobile/dist/retail/api/uploadFile.d.ts +1 -1
  213. package/mobile/dist/retail/api/uploadFile.js +2 -3
  214. package/mobile/dist/retail/api/uploadFile.js.map +1 -1
  215. package/mobile/dist/retail/components/DraftDialog/parseDraftTask.js +2 -1
  216. package/mobile/dist/retail/components/DraftDialog/parseDraftTask.js.map +1 -1
  217. package/mobile/dist/retail/content.js +10 -1
  218. package/mobile/dist/retail/content.js.map +1 -1
  219. package/mobile/dist/retail/model/NameFieldDef.d.ts +1 -1
  220. package/mobile/dist/retail/utils/mainFormStateMap.js +1 -0
  221. package/mobile/dist/retail/utils/mainFormStateMap.js.map +1 -1
  222. package/mobile/dist/ui-kit/BaseProductTile/BaseProductTile.js +8 -1
  223. package/mobile/dist/ui-kit/BaseProductTile/BaseProductTile.js.map +1 -1
  224. package/mobile/dist/ui-kit/BaseTile/BaseTile.js +3 -3
  225. package/mobile/dist/ui-kit/BaseTile/BaseTile.js.map +1 -1
  226. package/mobile/dist/ui-kit/FormField/Fields/PhoneField.js +2 -1
  227. package/mobile/dist/ui-kit/FormField/Fields/PhoneField.js.map +1 -1
  228. package/mobile/dist/ui-kit/FormField/shouldRenderField.d.ts +1 -1
  229. package/mobile/dist/ui-kit/FormField/shouldRenderField.js +1 -1
  230. package/mobile/dist/ui-kit/FormField/shouldRenderField.js.map +1 -1
  231. package/mobile/lib/BlockRenderer/renderBlock.js +1 -1
  232. package/mobile/lib/BlockRenderer/renderBlock.js.map +1 -1
  233. package/mobile/lib/UniBlock/UniBlock.d.ts +3 -1
  234. package/mobile/lib/UniBlock/UniBlock.js.map +1 -1
  235. package/mobile/lib/common.css +1 -1
  236. package/mobile/lib/components/ApplicationLeadForm/ApplicationLeadForm.js +13 -3
  237. package/mobile/lib/components/ApplicationLeadForm/ApplicationLeadForm.js.map +1 -1
  238. package/mobile/lib/components/ApplicationLeadForm/EsiaLoginBanner.d.ts +4 -0
  239. package/mobile/lib/components/ApplicationLeadForm/EsiaLoginBanner.js +21 -0
  240. package/mobile/lib/components/ApplicationLeadForm/EsiaLoginBanner.js.map +1 -0
  241. package/mobile/lib/components/ApplicationLeadForm/applicationFormData.d.ts +0 -1
  242. package/mobile/lib/components/ApplicationLeadForm/applicationFormData.js +5 -30
  243. package/mobile/lib/components/ApplicationLeadForm/applicationFormData.js.map +1 -1
  244. package/mobile/lib/components/ApplicationLeadForm/getInitialFormState.d.ts +1 -1
  245. package/mobile/lib/components/ApplicationLeadForm/getInitialFormState.js +8 -2
  246. package/mobile/lib/components/ApplicationLeadForm/getInitialFormState.js.map +1 -1
  247. package/mobile/lib/components/ApplicationLeadForm/parseEsiaProfile.d.ts +2 -2
  248. package/mobile/lib/components/ApplicationLeadForm/parseEsiaProfile.js +54 -19
  249. package/mobile/lib/components/ApplicationLeadForm/parseEsiaProfile.js.map +1 -1
  250. package/mobile/lib/components/ApplicationLeadForm/useApplicationLeadApi.d.ts +2 -2
  251. package/mobile/lib/components/ApplicationLeadForm/useApplicationLeadApi.js +7 -10
  252. package/mobile/lib/components/ApplicationLeadForm/useApplicationLeadApi.js.map +1 -1
  253. package/mobile/lib/components/ApplicationLeadForm/useInitApplicationLead.d.ts +3 -1
  254. package/mobile/lib/components/ApplicationLeadForm/useInitApplicationLead.js +12 -16
  255. package/mobile/lib/components/ApplicationLeadForm/useInitApplicationLead.js.map +1 -1
  256. package/mobile/lib/components/Blocks.js +2 -0
  257. package/mobile/lib/components/Blocks.js.map +1 -1
  258. package/mobile/lib/components/CarouselCatalogCard/CarouselCatalogCard.js +1 -1
  259. package/mobile/lib/components/CarouselCatalogCard/CarouselCatalogCard.js.map +1 -1
  260. package/mobile/lib/components/GalleryLayout/GalleryLayout.d.ts +5 -0
  261. package/mobile/lib/components/GalleryLayout/GalleryLayout.js +69 -0
  262. package/mobile/lib/components/GalleryLayout/GalleryLayout.js.map +1 -0
  263. package/mobile/lib/components/GalleryLayout/GalleryLayoutContent.d.ts +14 -0
  264. package/mobile/lib/components/GalleryLayout/GalleryLayoutContent.js +2 -0
  265. package/mobile/lib/components/GalleryLayout/GalleryLayoutContent.js.map +1 -0
  266. package/mobile/lib/retail/adaptors/getFamilyStatusAndIncomeData.js +2 -2
  267. package/mobile/lib/retail/adaptors/getFamilyStatusAndIncomeData.js.map +1 -1
  268. package/mobile/lib/retail/api/checkCode.d.ts +1 -0
  269. package/mobile/lib/retail/api/checkCode.js +1 -1
  270. package/mobile/lib/retail/api/checkCode.js.map +1 -1
  271. package/mobile/lib/retail/api/esiaRequestProfile.d.ts +84 -0
  272. package/mobile/lib/retail/api/esiaRequestProfile.js +7 -0
  273. package/mobile/lib/retail/api/esiaRequestProfile.js.map +1 -0
  274. package/mobile/lib/retail/api/updateUserTask.d.ts +1 -0
  275. package/mobile/lib/retail/api/updateUserTask.js.map +1 -1
  276. package/mobile/lib/retail/api/uploadFile.d.ts +1 -1
  277. package/mobile/lib/retail/api/uploadFile.js +2 -3
  278. package/mobile/lib/retail/api/uploadFile.js.map +1 -1
  279. package/mobile/lib/retail/components/DraftDialog/parseDraftTask.js +2 -1
  280. package/mobile/lib/retail/components/DraftDialog/parseDraftTask.js.map +1 -1
  281. package/mobile/lib/retail/content.js +10 -1
  282. package/mobile/lib/retail/content.js.map +1 -1
  283. package/mobile/lib/retail/model/NameFieldDef.d.ts +1 -1
  284. package/mobile/lib/retail/utils/mainFormStateMap.js +1 -0
  285. package/mobile/lib/retail/utils/mainFormStateMap.js.map +1 -1
  286. package/mobile/lib/ui-kit/BaseProductTile/BaseProductTile.js +9 -2
  287. package/mobile/lib/ui-kit/BaseProductTile/BaseProductTile.js.map +1 -1
  288. package/mobile/lib/ui-kit/BaseTile/BaseTile.js +3 -3
  289. package/mobile/lib/ui-kit/BaseTile/BaseTile.js.map +1 -1
  290. package/mobile/lib/ui-kit/FormField/Fields/PhoneField.js +2 -1
  291. package/mobile/lib/ui-kit/FormField/Fields/PhoneField.js.map +1 -1
  292. package/mobile/lib/ui-kit/FormField/shouldRenderField.d.ts +1 -1
  293. package/mobile/lib/ui-kit/FormField/shouldRenderField.js +1 -1
  294. package/mobile/lib/ui-kit/FormField/shouldRenderField.js.map +1 -1
  295. package/mobile/src/BlockRenderer/renderBlock.tsx +3 -3
  296. package/mobile/src/UniBlock/UniBlock.tsx +3 -1
  297. package/mobile/src/components/ApplicationLeadForm/ApplicationLeadForm.tsx +14 -2
  298. package/mobile/src/components/ApplicationLeadForm/EsiaLoginBanner.tsx +52 -0
  299. package/mobile/src/components/ApplicationLeadForm/applicationFormData.tsx +5 -31
  300. package/mobile/src/components/ApplicationLeadForm/getInitialFormState.tsx +8 -1
  301. package/mobile/src/components/ApplicationLeadForm/parseEsiaProfile.ts +68 -34
  302. package/mobile/src/components/ApplicationLeadForm/useApplicationLeadApi.tsx +58 -65
  303. package/mobile/src/components/ApplicationLeadForm/useInitApplicationLead.ts +31 -41
  304. package/mobile/src/components/Blocks.ts +2 -0
  305. package/mobile/src/components/CarouselCatalogCard/CarouselCatalogCard.tsx +1 -0
  306. package/mobile/src/components/GalleryLayout/GalleryLayout.example.json +102 -0
  307. package/mobile/src/components/GalleryLayout/GalleryLayout.tsx +140 -0
  308. package/mobile/src/components/GalleryLayout/GalleryLayout.ui.json +1 -0
  309. package/mobile/src/components/GalleryLayout/GalleryLayoutContent.ts +16 -0
  310. package/mobile/src/retail/adaptors/getFamilyStatusAndIncomeData.ts +2 -1
  311. package/mobile/src/retail/api/checkCode.ts +1 -1
  312. package/mobile/src/retail/api/{updateProfileEsia.ts → esiaRequestProfile.ts} +16 -5
  313. package/mobile/src/retail/api/updateUserTask.ts +1 -0
  314. package/mobile/src/retail/api/uploadFile.ts +2 -3
  315. package/mobile/src/retail/components/DraftDialog/parseDraftTask.ts +2 -0
  316. package/mobile/src/retail/content.tsx +10 -1
  317. package/mobile/src/retail/model/NameFieldDef.ts +1 -0
  318. package/mobile/src/retail/utils/mainFormStateMap.ts +1 -0
  319. package/mobile/src/ui-kit/BaseProductTile/BaseProductTile.tsx +60 -23
  320. package/mobile/src/ui-kit/BaseTile/BaseTile.tsx +11 -7
  321. package/mobile/src/ui-kit/FormField/Fields/PhoneField.tsx +9 -1
  322. package/mobile/src/ui-kit/FormField/shouldRenderField.tsx +2 -1
  323. package/package.json +2 -2
  324. package/src/BlockRenderer/renderBlock.tsx +3 -3
  325. package/src/UniBlock/UniBlock.tsx +3 -1
  326. package/src/components/ApplicationLeadForm/ApplicationLeadForm.tsx +14 -2
  327. package/src/components/ApplicationLeadForm/EsiaLoginBanner.tsx +52 -0
  328. package/src/components/ApplicationLeadForm/applicationFormData.tsx +5 -31
  329. package/src/components/ApplicationLeadForm/getInitialFormState.tsx +8 -1
  330. package/src/components/ApplicationLeadForm/parseEsiaProfile.ts +68 -34
  331. package/src/components/ApplicationLeadForm/useApplicationLeadApi.tsx +58 -65
  332. package/src/components/ApplicationLeadForm/useInitApplicationLead.ts +31 -41
  333. package/src/components/Blocks.mobile.ts +2 -0
  334. package/src/components/Blocks.ts +2 -0
  335. package/src/components/CarouselCatalogCard/CarouselCatalogCard.tsx +1 -0
  336. package/src/components/GalleryLayout/GalleryLayout.example.json +102 -0
  337. package/src/components/GalleryLayout/GalleryLayout.fixture.tsx +61 -0
  338. package/src/components/GalleryLayout/GalleryLayout.tsx +140 -0
  339. package/src/components/GalleryLayout/GalleryLayout.ui.json +1 -0
  340. package/src/components/GalleryLayout/GalleryLayoutContent.ts +16 -0
  341. package/src/retail/adaptors/getFamilyStatusAndIncomeData.ts +2 -1
  342. package/src/retail/api/checkCode.ts +1 -1
  343. package/src/retail/api/{updateProfileEsia.ts → esiaRequestProfile.ts} +16 -5
  344. package/src/retail/api/updateUserTask.ts +1 -0
  345. package/src/retail/api/uploadFile.ts +2 -3
  346. package/src/retail/components/DraftDialog/parseDraftTask.ts +2 -0
  347. package/src/retail/content.tsx +10 -1
  348. package/src/retail/model/NameFieldDef.ts +1 -0
  349. package/src/retail/utils/mainFormStateMap.ts +1 -0
  350. package/src/ui-kit/BaseProductTile/BaseProductTile.tsx +60 -23
  351. package/src/ui-kit/BaseTile/BaseTile.tsx +11 -7
  352. package/src/ui-kit/FormField/Fields/PhoneField.tsx +9 -1
  353. package/src/ui-kit/FormField/shouldRenderField.tsx +2 -1
  354. package/bundle/retail/components/EsiaLoginDialog/EsiaLoginDialog.d.ts +0 -4
  355. package/bundle/retail/components/EsiaLoginDialog/useEsiaLoginDialog.d.ts +0 -1
  356. package/dist/retail/api/updateProfileEsia.js +0 -6
  357. package/dist/retail/api/updateProfileEsia.js.map +0 -1
  358. package/dist/retail/components/EsiaLoginDialog/EsiaLoginDialog.d.ts +0 -4
  359. package/dist/retail/components/EsiaLoginDialog/EsiaLoginDialog.js +0 -34
  360. package/dist/retail/components/EsiaLoginDialog/EsiaLoginDialog.js.map +0 -1
  361. package/dist/retail/components/EsiaLoginDialog/useEsiaLoginDialog.d.ts +0 -1
  362. package/dist/retail/components/EsiaLoginDialog/useEsiaLoginDialog.js +0 -15
  363. package/dist/retail/components/EsiaLoginDialog/useEsiaLoginDialog.js.map +0 -1
  364. package/lib/retail/api/updateProfileEsia.js +0 -3
  365. package/lib/retail/api/updateProfileEsia.js.map +0 -1
  366. package/lib/retail/components/EsiaLoginDialog/EsiaLoginDialog.d.ts +0 -4
  367. package/lib/retail/components/EsiaLoginDialog/EsiaLoginDialog.js +0 -32
  368. package/lib/retail/components/EsiaLoginDialog/EsiaLoginDialog.js.map +0 -1
  369. package/lib/retail/components/EsiaLoginDialog/useEsiaLoginDialog.d.ts +0 -1
  370. package/lib/retail/components/EsiaLoginDialog/useEsiaLoginDialog.js +0 -12
  371. package/lib/retail/components/EsiaLoginDialog/useEsiaLoginDialog.js.map +0 -1
  372. package/mobile/bundle/retail/components/EsiaLoginDialog/EsiaLoginDialog.d.ts +0 -4
  373. package/mobile/bundle/retail/components/EsiaLoginDialog/useEsiaLoginDialog.d.ts +0 -1
  374. package/mobile/dist/retail/api/updateProfileEsia.d.ts +0 -77
  375. package/mobile/dist/retail/api/updateProfileEsia.js +0 -6
  376. package/mobile/dist/retail/api/updateProfileEsia.js.map +0 -1
  377. package/mobile/dist/retail/components/EsiaLoginDialog/EsiaLoginDialog.d.ts +0 -4
  378. package/mobile/dist/retail/components/EsiaLoginDialog/EsiaLoginDialog.js +0 -34
  379. package/mobile/dist/retail/components/EsiaLoginDialog/EsiaLoginDialog.js.map +0 -1
  380. package/mobile/dist/retail/components/EsiaLoginDialog/useEsiaLoginDialog.d.ts +0 -1
  381. package/mobile/dist/retail/components/EsiaLoginDialog/useEsiaLoginDialog.js +0 -15
  382. package/mobile/dist/retail/components/EsiaLoginDialog/useEsiaLoginDialog.js.map +0 -1
  383. package/mobile/lib/retail/api/updateProfileEsia.d.ts +0 -77
  384. package/mobile/lib/retail/api/updateProfileEsia.js +0 -3
  385. package/mobile/lib/retail/api/updateProfileEsia.js.map +0 -1
  386. package/mobile/lib/retail/components/EsiaLoginDialog/EsiaLoginDialog.d.ts +0 -4
  387. package/mobile/lib/retail/components/EsiaLoginDialog/EsiaLoginDialog.js +0 -32
  388. package/mobile/lib/retail/components/EsiaLoginDialog/EsiaLoginDialog.js.map +0 -1
  389. package/mobile/lib/retail/components/EsiaLoginDialog/useEsiaLoginDialog.d.ts +0 -1
  390. package/mobile/lib/retail/components/EsiaLoginDialog/useEsiaLoginDialog.js +0 -12
  391. package/mobile/lib/retail/components/EsiaLoginDialog/useEsiaLoginDialog.js.map +0 -1
  392. package/mobile/src/retail/components/EsiaLoginDialog/EsiaLoginDialog.tsx +0 -65
  393. package/mobile/src/retail/components/EsiaLoginDialog/useEsiaLoginDialog.tsx +0 -13
  394. package/src/retail/components/EsiaLoginDialog/EsiaLoginDialog.fixture.tsx +0 -7
  395. package/src/retail/components/EsiaLoginDialog/EsiaLoginDialog.tsx +0 -65
  396. package/src/retail/components/EsiaLoginDialog/useEsiaLoginDialog.tsx +0 -13
@@ -3,32 +3,6 @@ import { type FieldRetailDef } from '../../retail/model/RetailFormContent';
3
3
  import { type ProductType } from './ApplicationLeadFormContent';
4
4
  import { productTypeToConsentsMap } from './consents';
5
5
 
6
- export const applicationFormData: SectionsRetailProps[] = [
7
- {
8
- columns: 2,
9
- inputs: [
10
- { name: 'surname', required: true, dadata: true },
11
- { name: 'name', required: true, dadata: true },
12
- { name: 'middleName', dadata: true },
13
- { name: 'limitedBirthday', required: true },
14
- { name: 'phone', required: true },
15
- { name: 'email', required: true, dadata: true },
16
- ],
17
- },
18
- {
19
- inputs: [
20
- { name: 'processPersonalDataFlg', required: true },
21
- { name: 'consentProviderFlg', required: true },
22
- { name: 'consentOthersFlg', required: true },
23
- { name: 'consentInformFlg' },
24
- { name: 'consentPfrFlg' },
25
- { name: 'consentInformMaterialsFlg' },
26
- { name: 'consentPhotoFlg' },
27
- { name: 'consentFATCA' },
28
- ],
29
- },
30
- ];
31
-
32
6
  export const getApplicationFormData = (productType: ProductType): SectionsRetailProps[] => {
33
7
  const currentProductConsents = productTypeToConsentsMap[productType];
34
8
  const allConsents: FieldRetailDef[] = [
@@ -46,11 +20,11 @@ export const getApplicationFormData = (productType: ProductType): SectionsRetail
46
20
  {
47
21
  columns: 2,
48
22
  inputs: [
49
- { name: 'surname', required: true, dadata: true },
50
- { name: 'name', required: true, dadata: true },
51
- { name: 'middleName', dadata: true },
52
- { name: 'limitedBirthday', required: true },
53
- { name: 'phone', required: true },
23
+ { name: 'surname', required: true, dadata: true, filledByEsia: true },
24
+ { name: 'name', required: true, dadata: true, filledByEsia: true },
25
+ { name: 'middleName', dadata: true, filledByEsia: true },
26
+ { name: 'limitedBirthday', required: true, filledByEsia: true },
27
+ { name: 'phone', required: true, filledByEsia: true },
54
28
  { name: 'email', required: true, dadata: true },
55
29
  ],
56
30
  },
@@ -21,9 +21,16 @@ const initialFormState = {
21
21
  export const getInitialFormState = (
22
22
  inputs: FieldRetailDef[],
23
23
  savedForm: LeadFormState | null,
24
+ esiaAuthSuccess: boolean,
24
25
  ): LeadFormState => {
25
26
  if (savedForm) {
26
- return { ...savedForm, limitedBirthday: new Date(savedForm?.limitedBirthday || 0) };
27
+ return {
28
+ ...savedForm,
29
+ limitedBirthday: new Date(savedForm?.limitedBirthday || 0),
30
+ ...(!esiaAuthSuccess && {
31
+ esiaAccountTypeCd: { key: '' },
32
+ }),
33
+ };
27
34
  }
28
35
 
29
36
  const formState = Object.fromEntries(inputs.map((_) => [_.name, initialFormState[_.name || '']]));
@@ -1,33 +1,62 @@
1
1
  /* eslint-disable max-lines */
2
- import { type UpdateProfileEsiaResponse } from '../../retail/api/updateProfileEsia';
2
+ /* eslint-disable max-lines-per-function */
3
+ import { type EsiaRequestProfileResponse } from '../../retail/api/esiaRequestProfile';
3
4
  import { uploadFile, type DocumentCategory } from '../../retail/api/uploadFile';
4
5
  import { type Address, type File, type LeadFormState } from '../../retail/model/LeadFormState';
5
6
  import { normalizePhone } from '../../ui-kit/PhoneInput/normalizePhone';
6
7
 
8
+ type Document = {
9
+ file: string;
10
+ category: DocumentCategory;
11
+ isPDF: boolean;
12
+ };
13
+
7
14
  export const parseEsiaProfile = async (
8
- esiaProfile: UpdateProfileEsiaResponse,
9
- taskId: string,
15
+ esiaProfile: EsiaRequestProfileResponse,
10
16
  isDebit: boolean,
11
17
  ): Promise<LeadFormState> => {
12
18
  isDebit ? checkEsiaDataForDebit(esiaProfile) : checkEsiaDataForCredit(esiaProfile);
13
19
 
14
20
  const { profile, addInfo, document, addressRegistration, addressFact, esiaAdditionalDocument } =
15
21
  esiaProfile;
16
- const files: File[] = [];
22
+ let files: File[] = [];
17
23
 
18
24
  if (!isDebit) {
19
- await saveDocument({
20
- document: esiaAdditionalDocument.pdfFileWorkbook,
21
- taskId,
22
- category: 'CONFIRMING_INCOME_DOC',
23
- files,
24
- });
25
- await saveDocument({
26
- document: esiaAdditionalDocument.pdfFilePayout,
27
- taskId,
28
- category: 'CONFIRMING_EMPLOYMENT_DOC',
29
- files,
30
- });
25
+ files = await saveDocuments([
26
+ {
27
+ file: esiaAdditionalDocument.pdfFileWorkbook,
28
+ category: 'CONFIRMING_INCOME_DOC',
29
+ isPDF: true,
30
+ },
31
+ {
32
+ file: esiaAdditionalDocument.pdfFilePayout,
33
+ category: 'CONFIRMING_EMPLOYMENT_DOC',
34
+ isPDF: true,
35
+ },
36
+ {
37
+ file: esiaAdditionalDocument.pdfFileSigPayout,
38
+ category: 'CONFIRMING_EMPLOYMENT_DOC',
39
+ isPDF: true,
40
+ },
41
+ {
42
+ file: esiaAdditionalDocument.xmlFilePayout,
43
+ category: 'CONFIRMING_EMPLOYMENT_DOC',
44
+ isPDF: false,
45
+ },
46
+ {
47
+ file: esiaAdditionalDocument.xmlFileSigPayout,
48
+ category: 'CONFIRMING_EMPLOYMENT_DOC',
49
+ isPDF: false,
50
+ },
51
+ {
52
+ file: esiaAdditionalDocument.xmlFileWorkbook,
53
+ category: 'CONFIRMING_INCOME_DOC',
54
+ isPDF: false,
55
+ },
56
+ //TODO: После тестирования добавить документы снизу
57
+ // {file: esiaAdditionalDocument.pdfFileSigWorkbook, category: 'CONFIRMING_INCOME_DOC', isPDF: true},
58
+ // {file: esiaAdditionalDocument.xmlFileSigWorkbook, category: 'CONFIRMING_INCOME_DOC', isPDF: false},
59
+ ]);
31
60
  }
32
61
 
33
62
  const mainData = {
@@ -74,7 +103,7 @@ const concatFullAddress = (address: Array<string | undefined>): string => {
74
103
  }, '');
75
104
  };
76
105
 
77
- const buildAddress = (fields: UpdateProfileEsiaResponse['addressRegistration']): Address => {
106
+ const buildAddress = (fields: EsiaRequestProfileResponse['addressRegistration']): Address => {
78
107
  const {
79
108
  postcode,
80
109
  region,
@@ -110,24 +139,22 @@ const buildAddress = (fields: UpdateProfileEsiaResponse['addressRegistration']):
110
139
 
111
140
  const getYearFromMonth = (month: number) => Math.floor(month / 12);
112
141
 
113
- const saveDocument = async ({
114
- document,
115
- taskId,
116
- category,
117
- files,
118
- }: {
119
- document: string;
120
- taskId: string;
121
- category: DocumentCategory;
122
- files: File[];
123
- }) => {
124
- await fetch(`data:application/pdf;base64,${document}`)
125
- .then((res) => res.blob())
126
- .then((value) => uploadFile(value, taskId, category))
127
- .then((file) => files.push(file));
142
+ const saveDocuments = async (documents: Document[]): Promise<File[]> => {
143
+ const files: File[] = [];
144
+
145
+ for (const doc of documents) {
146
+ const contentType = doc.isPDF ? 'data:application/pdf;base64' : 'data:application/xml;base64';
147
+
148
+ await fetch(`${contentType},${doc.file}`)
149
+ .then((res) => res.blob())
150
+ .then((value) => uploadFile(value, doc.category, doc.isPDF))
151
+ .then((file) => files.push(file));
152
+ }
153
+
154
+ return files;
128
155
  };
129
156
 
130
- const checkEsiaDataForCredit = (esiaProfile: UpdateProfileEsiaResponse) => {
157
+ const checkEsiaDataForCredit = (esiaProfile: EsiaRequestProfileResponse) => {
131
158
  const { profile, document, addressRegistration, esiaAdditionalDocument } = esiaProfile;
132
159
 
133
160
  const data = [
@@ -153,6 +180,13 @@ const checkEsiaDataForCredit = (esiaProfile: UpdateProfileEsiaResponse) => {
153
180
  esiaAdditionalDocument.jobsNumberInFiveYears.toString(),
154
181
  esiaAdditionalDocument.pdfFilePayout,
155
182
  esiaAdditionalDocument.pdfFileWorkbook,
183
+ esiaAdditionalDocument.pdfFileSigPayout,
184
+ esiaAdditionalDocument.xmlFilePayout,
185
+ esiaAdditionalDocument.xmlFileSigPayout,
186
+ esiaAdditionalDocument.xmlFileWorkbook,
187
+ //TODO: После тестирования добавить документы снизу
188
+ // esiaAdditionalDocument.pdfFileSigWorkbook,
189
+ // esiaAdditionalDocument.xmlFileSigWorkbook
156
190
  ];
157
191
 
158
192
  if (!data.every((_) => Boolean(_))) {
@@ -160,7 +194,7 @@ const checkEsiaDataForCredit = (esiaProfile: UpdateProfileEsiaResponse) => {
160
194
  }
161
195
  };
162
196
 
163
- const checkEsiaDataForDebit = (esiaProfile: UpdateProfileEsiaResponse) => {
197
+ const checkEsiaDataForDebit = (esiaProfile: EsiaRequestProfileResponse) => {
164
198
  const { profile, document, addressRegistration } = esiaProfile;
165
199
 
166
200
  const data = [
@@ -12,7 +12,6 @@ import { updateUserProfile } from '../../retail/api/updateUserProfile';
12
12
  import { updateUserTask } from '../../retail/api/updateUserTask';
13
13
  import { useConsentBkiDialog } from '../../retail/components/ConsentBkiDialog/useConsentBkiDialog';
14
14
  import { useDraftDialog } from '../../retail/components/DraftDialog/useDraftDialog';
15
- import { useEsiaLoginDialog } from '../../retail/components/EsiaLoginDialog/useEsiaLoginDialog';
16
15
  import { VerifyPhoneDialog } from '../../retail/components/VerifyPhoneDialog/VerifyPhoneDialog';
17
16
  import { type FormRetailConsents, type LeadFormState } from '../../retail/model/LeadFormState';
18
17
  import { getUpdateUserProfileData } from '../../retail/utils/getUpdateUserProfile';
@@ -28,7 +27,7 @@ interface ApplicationLeadApiProps extends AspectsProps {
28
27
  programId: string;
29
28
  nextStepLink: string;
30
29
  productType: ProductType;
31
- esiaError: boolean;
30
+ esiaAuthSuccess: boolean;
32
31
  }
33
32
 
34
33
  // eslint-disable-next-line max-lines-per-function
@@ -36,7 +35,6 @@ export const useApplicationLeadApi = ({
36
35
  programId,
37
36
  nextStepLink,
38
37
  productType,
39
- esiaError,
40
38
  data,
41
39
  }: ApplicationLeadApiProps) => {
42
40
  const [isSending, { setTrue: startSending, setFalse: endSending }] = useBool(false);
@@ -45,77 +43,72 @@ export const useApplicationLeadApi = ({
45
43
  const sendAspects = useSendLeadFormAspects({ data });
46
44
  const navigator = locationNavigator();
47
45
 
48
- const openEsiaLoginDialog = useEsiaLoginDialog(nextStepLink);
49
- const consentBkiDialog = useConsentBkiDialog(openEsiaLoginDialog);
46
+ const goToNextStep = useCallback(() => {
47
+ navigator.assign(nextStepLink);
48
+ }, []);
49
+
50
+ const consentBkiDialog = useConsentBkiDialog(goToNextStep);
50
51
  const verifyPhoneDialog = useDialog(VerifyPhoneDialog);
51
52
  const draftDialog = useDraftDialog();
52
53
 
53
- const handleSubmit = useCallback(
54
- async (formData: LeadFormState) => {
55
- if (esiaError) {
56
- navigator.assign(nextStepLink);
57
-
58
- return;
59
- }
60
- try {
61
- startSending();
62
- const profileId = await createUserProfile({
63
- profile: { phone: formatPhone(formData.phone as string) },
64
- });
54
+ const handleSubmit = useCallback(async (formData: LeadFormState) => {
55
+ try {
56
+ startSending();
57
+ const profileId = await createUserProfile({
58
+ profile: { phone: formatPhone(formData.phone as string) },
59
+ });
65
60
 
66
- if (profileId && formData?.phone) {
67
- const sendCurrentTask = async () => {
68
- await updateUserData({
69
- programId,
70
- profileId,
71
- formData,
72
- productType,
73
- saveUserData,
74
- sendAspects,
75
- });
76
- verifyPhoneDialog.close();
77
- if (productType === 'debitCard') {
78
- openEsiaLoginDialog();
61
+ if (profileId && formData?.phone) {
62
+ const sendCurrentTask = async () => {
63
+ await updateUserData({
64
+ programId,
65
+ profileId,
66
+ formData,
67
+ productType,
68
+ saveUserData,
69
+ sendAspects,
70
+ });
71
+ verifyPhoneDialog.close();
72
+ if (productType === 'debitCard') {
73
+ goToNextStep();
74
+ } else {
75
+ consentBkiDialog.open(formData.phone, profileId);
76
+ }
77
+ };
78
+ const handleSuccessVerify = async () => {
79
+ try {
80
+ const lastTaskId = await getLastTaskStatus({ profileId, programId });
81
+
82
+ if (lastTaskId) {
83
+ const task = await getTaskById({ taskId: lastTaskId });
84
+ verifyPhoneDialog.close();
85
+ draftDialog.open({
86
+ task,
87
+ isFromLead: true,
88
+ sendAspects,
89
+ onClose: sendCurrentTask,
90
+ });
79
91
  } else {
80
- consentBkiDialog.open(formData.phone, profileId);
81
- }
82
- };
83
- const handleSuccessVerify = async () => {
84
- try {
85
- const lastTaskId = await getLastTaskStatus({ profileId, programId });
86
-
87
- if (lastTaskId) {
88
- const task = await getTaskById({ taskId: lastTaskId });
89
- verifyPhoneDialog.close();
90
- draftDialog.open({
91
- task,
92
- isFromLead: true,
93
- sendAspects,
94
- onClose: sendCurrentTask,
95
- });
96
- } else {
97
- await sendCurrentTask();
98
- }
99
- } catch {
100
- setOK(false);
92
+ await sendCurrentTask();
101
93
  }
102
- };
94
+ } catch {
95
+ setOK(false);
96
+ }
97
+ };
103
98
 
104
- const acceptedConsents = getAcceptedConsents(formData, productType);
99
+ const acceptedConsents = getAcceptedConsents(formData, productType);
105
100
 
106
- verifyPhoneDialog.open({
107
- phone: formData?.phone,
108
- consents: acceptedConsents,
109
- onSuccess: handleSuccessVerify,
110
- });
111
- endSending();
112
- }
113
- } catch {
114
- setOK(false);
101
+ verifyPhoneDialog.open({
102
+ phone: formData?.phone,
103
+ consents: acceptedConsents,
104
+ onSuccess: handleSuccessVerify,
105
+ });
106
+ endSending();
115
107
  }
116
- },
117
- [esiaError],
118
- );
108
+ } catch {
109
+ setOK(false);
110
+ }
111
+ }, []);
119
112
 
120
113
  return { isSending, ok, handleSubmit };
121
114
  };
@@ -1,11 +1,9 @@
1
1
  import { useCallback, useEffect, useMemo } from '@redneckz/uni-jsx/lib/hooks';
2
2
  import { useBool } from '@redneckz/uni-jsx/lib/hooks/useBool';
3
- import { locationNavigator } from '../../external/locationNavigator';
4
3
  import { useSetter } from '../../hooks/useSetter';
5
- import { updateProfileEsia } from '../../retail/api/updateProfileEsia';
4
+ import { esiaRequestProfile } from '../../retail/api/esiaRequestProfile';
6
5
  import { type LeadFormState } from '../../retail/model/LeadFormState';
7
6
  import { type FieldRetailDef } from '../../retail/model/RetailFormContent';
8
- import { safeJsonParse } from '../../utils/safeJsonParse';
9
7
  import { type ProductType } from './ApplicationLeadFormContent';
10
8
  import { getInitialFormState } from './getInitialFormState';
11
9
  import { parseEsiaProfile } from './parseEsiaProfile';
@@ -16,70 +14,62 @@ type InitApplicationLeadProps = {
16
14
  nextStepLink: string;
17
15
  productType: ProductType;
18
16
  setEsiaError: () => void;
17
+ setEsiaAuthSuccess: () => void;
18
+ esiaAuthSuccess: boolean;
19
19
  };
20
20
 
21
21
  export const useInitApplicationLead = ({
22
22
  inputs,
23
- nextStepLink,
24
23
  productType,
25
24
  setEsiaError,
25
+ setEsiaAuthSuccess,
26
+ esiaAuthSuccess,
26
27
  }: InitApplicationLeadProps): [LeadFormState, { isLoading: boolean }] => {
27
- const navigator = locationNavigator();
28
28
  const [isLoading, { setTrue: startLoading, setFalse: endLoading }] = useBool(false);
29
29
 
30
30
  const leadFormStore = useLeadFormStore();
31
31
  const saveForm = useSetter(leadFormStore, 'leadForm');
32
32
 
33
33
  const initialFormState = useMemo(
34
- () => getInitialFormState(inputs, leadFormStore.leadForm),
34
+ () => getInitialFormState(inputs, leadFormStore.leadForm, esiaAuthSuccess),
35
35
  [inputs, leadFormStore.leadForm],
36
36
  );
37
37
 
38
- const updateEsiaProfile = useCallback(
39
- async (profileId: string, code: string, state: string) => {
40
- startLoading();
41
- try {
42
- const data = await updateProfileEsia({
43
- profileId,
44
- code,
45
- state,
46
- redirectUri: globalThis.location?.href,
47
- });
38
+ const requestEsiaProfile = useCallback(async (code: string, state: string) => {
39
+ startLoading();
40
+ try {
41
+ const data = await esiaRequestProfile({
42
+ code,
43
+ state,
44
+ redirectUri: globalThis.location?.href,
45
+ authorize: true,
46
+ });
48
47
 
49
- if (data && leadFormStore?.taskId) {
50
- const parsedData = await parseEsiaProfile(
51
- data,
52
- leadFormStore.taskId.toString(),
53
- productType === 'debitCard',
54
- );
48
+ if (data) {
49
+ const parsedData = await parseEsiaProfile(data, productType === 'debitCard');
55
50
 
56
- saveForm((_) => ({
57
- ..._,
58
- ...parsedData,
59
- }));
60
- }
61
-
62
- navigator.assign(nextStepLink);
63
- } catch {
64
- setEsiaError();
65
- } finally {
66
- endLoading();
51
+ saveForm((_) => ({
52
+ ..._,
53
+ ...parsedData,
54
+ }));
55
+ setEsiaAuthSuccess();
67
56
  }
68
- },
69
- [nextStepLink],
70
- );
57
+ } catch {
58
+ setEsiaError();
59
+ } finally {
60
+ endLoading();
61
+ }
62
+ }, []);
71
63
 
72
64
  useEffect(() => {
73
65
  leadFormStore.productType = productType;
74
- const profileId: string = <string>(
75
- safeJsonParse(globalThis.localStorage?.getItem('profileId') ?? '')
76
- );
66
+
77
67
  const params = new URLSearchParams(decodeURIComponent(globalThis.location?.search));
78
68
  const code = params.get('code');
79
69
  const state = params.get('state');
80
70
 
81
- if (profileId && code && state) {
82
- updateEsiaProfile(profileId, code, state);
71
+ if (code && state) {
72
+ requestEsiaProfile(code, state);
83
73
  } else {
84
74
  sessionStorage.removeItem('accessToken');
85
75
  sessionStorage.removeItem('refreshToken');
@@ -26,6 +26,7 @@ import { Depository } from './Depository/Depository';
26
26
  import { ErrorBlock } from './ErrorBlock/ErrorBlock';
27
27
  import { ExchangeRateTile } from './ExchangeRateTile/ExchangeRateTile';
28
28
  import { Footer } from './Footer/Footer';
29
+ import { GalleryLayout } from './GalleryLayout/GalleryLayout';
29
30
  import { GrantSupport } from './GrantSupport/GrantSupport';
30
31
  import { Header } from './Header/Header';
31
32
  import { Headline } from './Headline/Headline';
@@ -74,6 +75,7 @@ export const Blocks: BlocksRegistry = {
74
75
  ErrorBlock,
75
76
  ExchangeRateTile,
76
77
  Footer,
78
+ GalleryLayout,
77
79
  GrantSupport,
78
80
  Header,
79
81
  Headline,
@@ -28,6 +28,7 @@ import { Depository } from './Depository/Depository';
28
28
  import { ErrorBlock } from './ErrorBlock/ErrorBlock';
29
29
  import { ExchangeRateTile } from './ExchangeRateTile/ExchangeRateTile';
30
30
  import { Footer } from './Footer/Footer';
31
+ import { GalleryLayout } from './GalleryLayout/GalleryLayout';
31
32
  import { GracePeriod } from './GracePeriod/GracePeriod';
32
33
  import { GrantSupport } from './GrantSupport/GrantSupport';
33
34
  import { Header } from './Header/Header';
@@ -81,6 +82,7 @@ export const Blocks: BlocksRegistry = {
81
82
  ErrorBlock,
82
83
  ExchangeRateTile,
83
84
  Footer,
85
+ GalleryLayout,
84
86
  GracePeriod,
85
87
  GrantSupport,
86
88
  Header,
@@ -45,6 +45,7 @@ export const CarouselCatalogCard = JSX<CarouselCatalogCardProps>(
45
45
  headlineVersion="XS"
46
46
  isEmbedded={true}
47
47
  align={align}
48
+ className="min-h-24"
48
49
  />
49
50
  }
50
51
  rightImage={
@@ -0,0 +1,102 @@
1
+ {
2
+ "content": {
3
+ "gap": "L",
4
+ "version": "primary",
5
+ "padding": "p-xl"
6
+ },
7
+ "blocks": [
8
+ {
9
+ "content": {
10
+ "version": "secondary",
11
+ "title": "Продукт",
12
+ "description": "Описание",
13
+ "headlineVersion": "XL",
14
+ "backwardButton": false,
15
+ "isDotted": true,
16
+ "buttons": [
17
+ {
18
+ "text": "Кнопка",
19
+ "version": "secondary"
20
+ }
21
+ ],
22
+ "padding": "p-xl",
23
+ "benefitsVersion": "normal",
24
+ "benefits": [
25
+ {
26
+ "label": "Преимущество №1",
27
+ "icon": {
28
+ "icon": "SmallClockIcon"
29
+ }
30
+ },
31
+ {
32
+ "label": "Преимущество №2",
33
+ "icon": {
34
+ "icon": "SignDocsIcon"
35
+ }
36
+ }
37
+ ],
38
+ "imageOptions": {
39
+ "imageAlign": "end"
40
+ }
41
+ },
42
+ "style": ["col-span-12"],
43
+ "type": "ProductBlock"
44
+ },
45
+ {
46
+ "content": {
47
+ "version": "secondary",
48
+ "title": "Продукт",
49
+ "headlineVersion": "S",
50
+ "backwardButton": false,
51
+ "padding": "p-xl",
52
+ "imageOptions": {
53
+ "imageAlign": "end"
54
+ }
55
+ },
56
+ "style": ["col-span-12"],
57
+ "type": "ProductBlock"
58
+ },
59
+ {
60
+ "content": {
61
+ "version": "secondary",
62
+ "title": "Продукт",
63
+ "headlineVersion": "S",
64
+ "backwardButton": false,
65
+ "padding": "p-xl",
66
+ "imageOptions": {
67
+ "imageAlign": "end"
68
+ }
69
+ },
70
+ "style": ["col-span-12"],
71
+ "type": "ProductBlock"
72
+ },
73
+ {
74
+ "content": {
75
+ "version": "secondary",
76
+ "title": "Продукт",
77
+ "headlineVersion": "S",
78
+ "backwardButton": false,
79
+ "padding": "p-xl",
80
+ "imageOptions": {
81
+ "imageAlign": "end"
82
+ }
83
+ },
84
+ "style": ["col-span-12"],
85
+ "type": "ProductBlock"
86
+ },
87
+ {
88
+ "content": {
89
+ "version": "secondary",
90
+ "title": "Продукт",
91
+ "headlineVersion": "S",
92
+ "backwardButton": false,
93
+ "padding": "p-xl",
94
+ "imageOptions": {
95
+ "imageAlign": "end"
96
+ }
97
+ },
98
+ "style": ["col-span-12"],
99
+ "type": "ProductBlock"
100
+ }
101
+ ]
102
+ }