@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
@@ -0,0 +1,140 @@
1
+ import { type JSONSchema7Definition } from 'json-schema';
2
+ import { renderBlock } from '../../BlockRenderer/renderBlock';
3
+ import { type ChildRenderProps } from '../../BlockRenderer/renderBlockList';
4
+ import { renderChildren } from '../../BlockRenderer/renderChildren';
5
+ import { type BlockDecorator } from '../../model/BlockDecorator';
6
+ import { type BlockDef } from '../../model/ContentPageDef';
7
+ import { type LinkProps } from '../../model/LinkProps';
8
+ import { BlockWrapper } from '../../ui-kit/BlockWrapper';
9
+ import { LinkWrapper } from '../../ui-kit/LinkWrapper/LinkWrapper';
10
+ import { UniBlock } from '../../UniBlock/UniBlock';
11
+ import { type UniBlockProps } from '../../UniBlock/UniBlockProps';
12
+ import { getBorderStyle } from '../../utils/getBorderStyle';
13
+ import { getInnerPadding } from '../../utils/getInnerPadding';
14
+ import { style } from '../../utils/style';
15
+ import { gapStyles } from '../HorizontalLayout/gapStyles';
16
+ import { type ProductBlockContent } from '../ProductBlock/ProductBlockContent';
17
+ import { type GalleryLayoutContent } from './GalleryLayoutContent';
18
+
19
+ const MIN_LENGTH_CHILD = 5;
20
+ const SHORT_TILE_INDEXES = [1, 2, 3, 4];
21
+ const LINK_SCHEMA: Record<string, JSONSchema7Definition> = {
22
+ link: {
23
+ allOf: [
24
+ { $ref: `#/definitions/LinkCommonProps` },
25
+ {
26
+ type: 'object',
27
+ properties: {
28
+ data: {
29
+ type: 'array',
30
+ items: { $ref: '#/definitions/AspectsDef' },
31
+ title: 'Дополнительные атрибуты',
32
+ },
33
+ },
34
+ },
35
+ ],
36
+ title: 'Ссылка',
37
+ required: ['href'],
38
+ },
39
+ };
40
+
41
+ export interface GalleryLayoutProps extends GalleryLayoutContent, UniBlockProps {}
42
+
43
+ export const GalleryLayout = UniBlock<GalleryLayoutProps>(
44
+ ({
45
+ className = '',
46
+ padding = 'p-0',
47
+ gap = '',
48
+ isInnerPadding = true,
49
+ version = 'transparent',
50
+ isTheme = false,
51
+ isCardBorder = false,
52
+ ...rest
53
+ }) => (
54
+ <BlockWrapper
55
+ className={style(
56
+ 'grid grid-cols-1 sm:grid-cols-1 lg:grid-cols-4 lg:auto-rows-fr',
57
+ gapStyles[gap],
58
+ className,
59
+ )}
60
+ padding={padding}
61
+ version={version}
62
+ isTheme={isTheme}
63
+ {...rest}
64
+ >
65
+ {renderChildren({
66
+ ...rest,
67
+ renderProps: getRenderProps({ isInnerPadding, isCardBorder }),
68
+ })}
69
+ </BlockWrapper>
70
+ ),
71
+ {
72
+ childrenTypes: ['ProductBlock'],
73
+ childSchema: () => LINK_SCHEMA,
74
+ allowRemoveChild: (slot) => (slot?.blocks ?? []).length > MIN_LENGTH_CHILD,
75
+ },
76
+ );
77
+
78
+ const getRenderProps =
79
+ ({
80
+ isInnerPadding,
81
+ isCardBorder,
82
+ }: {
83
+ isInnerPadding: boolean;
84
+ isCardBorder: boolean;
85
+ }): ChildRenderProps =>
86
+ (childBlock, childOptions, i) =>
87
+ renderBlock(
88
+ childBlock,
89
+ {
90
+ ...childOptions,
91
+ blockDecorator: blockDecoratorWrapper(childOptions.blockDecorator, i),
92
+ },
93
+ {
94
+ className: style('w-full', getBorderStyle(isCardBorder)),
95
+ ...getInnerPadding(isInnerPadding),
96
+ },
97
+ );
98
+
99
+ const blockDecoratorWrapper =
100
+ (blockDecorator?: BlockDecorator, idx = 0): BlockDecorator =>
101
+ (props, i) =>
102
+ blockDecorator?.(
103
+ {
104
+ ...props,
105
+ render: (renderProps) => productBlockDecorator(idx)({ ...props, ...renderProps }, i),
106
+ },
107
+ `wrap_${i}`,
108
+ ) ?? productBlockDecorator(idx)(props, i);
109
+
110
+ const productBlockDecorator =
111
+ (idx: number): BlockDecorator =>
112
+ ({ blockClassName, block, render }, i) =>
113
+ (
114
+ <LinkWrapper key={i} {...block.content?.link} className={getChildStyle(idx)}>
115
+ {render({
116
+ blockClassName: style(blockClassName, 'h-full'),
117
+ block: modifyBlock(block, idx),
118
+ })}
119
+ </LinkWrapper>
120
+ );
121
+
122
+ const getChildStyle = (index: number) =>
123
+ SHORT_TILE_INDEXES.includes(index)
124
+ ? 'lg:col-span-1 lg:row-span-1'
125
+ : 'lg:col-span-2 lg:row-span-2';
126
+
127
+ const modifyBlock = (block: BlockDef, i: number) => {
128
+ const content: ProductBlockContent & { link?: LinkProps } = { ...block.content };
129
+
130
+ if (SHORT_TILE_INDEXES.includes(i)) {
131
+ delete content.description;
132
+ delete content.benefits;
133
+ }
134
+
135
+ if (content.link?.href) {
136
+ delete content.buttons;
137
+ }
138
+
139
+ return { ...block, content };
140
+ };
@@ -0,0 +1,16 @@
1
+ import { type ImageContent } from '../../ui-kit/Img/ImgProps';
2
+ import { type UniBlockContent } from '../../UniBlock/UniBlockProps';
3
+ import { type GapVersion } from '../HorizontalLayout/HorizontalLayoutContent';
4
+
5
+ export type LayoutCommitProps = {
6
+ gap?: GapVersion;
7
+ /** @title контур на дочерних элементах */
8
+ isCardBorder?: boolean;
9
+ /** @title Отступы вложенных компонентов */
10
+ isInnerPadding?: boolean;
11
+ };
12
+
13
+ /**
14
+ * @title Компоновщик галереи
15
+ */
16
+ export type GalleryLayoutContent = UniBlockContent & LayoutCommitProps & ImageContent;
@@ -19,12 +19,13 @@ export const getFamilyStatusAndIncomeData = (formData: LeadFormState): Partial<P
19
19
  snils,
20
20
  armyIdFlg,
21
21
  conscription,
22
+ esiaAccountTypeCd,
22
23
  } = formData;
23
24
 
24
25
  return {
25
26
  maritalStatusCd: familyStatus,
26
27
  totalDependents: familyMembers,
27
- incomeCertificateCd: confirmationIncome,
28
+ incomeCertificateCd: esiaAccountTypeCd?.key ? { key: 'SFR_CERTIFICATE' } : confirmationIncome,
28
29
  otherDependents: dependents,
29
30
  childrenDependents: children,
30
31
  militaryStatusCd: conscription,
@@ -16,7 +16,7 @@ export type CheckCodeResponse = {
16
16
  export const checkCode = async (body: CheckCodeBody) =>
17
17
  fetchRetailJSON<CheckCodeResponse>('/sms/checkCode', 'POST', body).then(saveToken);
18
18
 
19
- const saveToken = (data: CheckCodeResponse | null) => {
19
+ export const saveToken = (data: CheckCodeResponse | null) => {
20
20
  if (data) {
21
21
  globalThis.sessionStorage.setItem('accessToken', data.access_token);
22
22
  globalThis.sessionStorage.setItem('refreshToken', data.refresh_token);
@@ -1,13 +1,14 @@
1
+ import { saveToken, type CheckCodeResponse } from './checkCode';
1
2
  import { fetchRetailJSON } from './doRequest';
2
3
 
3
- export type UpdateProfileEsiaBody = {
4
+ export type EsiaRequestProfileBody = {
4
5
  code: string;
5
- profileId: string;
6
+ authorize: boolean;
6
7
  state: string;
7
8
  redirectUri: string;
8
9
  };
9
10
 
10
- export type UpdateProfileEsiaResponse = {
11
+ export type EsiaRequestProfileResponse = CheckCodeResponse & {
11
12
  profile: {
12
13
  id: number;
13
14
  esiaId: string;
@@ -75,8 +76,18 @@ export type UpdateProfileEsiaResponse = {
75
76
  workLengthLastJob: number;
76
77
  pdfFileWorkbook: string;
77
78
  pdfFilePayout: string;
79
+ pdfFileSigPayout: string;
80
+ pdfFileSigWorkbook: string;
81
+ xmlFilePayout: string;
82
+ xmlFileSigPayout: string;
83
+ xmlFileSigWorkbook: string;
84
+ xmlFileWorkbook: string;
78
85
  };
79
86
  };
80
87
 
81
- export const updateProfileEsia = (body: UpdateProfileEsiaBody) =>
82
- fetchRetailJSON<UpdateProfileEsiaResponse>('/esia/updateProfileEsia', 'POST', body);
88
+ export const esiaRequestProfile = (body: EsiaRequestProfileBody) =>
89
+ fetchRetailJSON<EsiaRequestProfileResponse>('/esia/requestProfile', 'POST', body).then((res) => {
90
+ saveToken(res);
91
+
92
+ return res;
93
+ });
@@ -52,6 +52,7 @@ export type Participant = {
52
52
  surname?: string;
53
53
  profile?: {
54
54
  id: number;
55
+ esiaAccountTypeCd?: Option;
55
56
  };
56
57
  armyIdFlg?: boolean;
57
58
  birthPlace?: string;
@@ -5,13 +5,12 @@ export type DocumentCategory = 'CONFIRMING_EMPLOYMENT_DOC' | 'CONFIRMING_INCOME_
5
5
 
6
6
  export const uploadFile = async (
7
7
  file: Blob,
8
- taskId: string,
9
8
  documentCategory: DocumentCategory,
9
+ isPDF = false,
10
10
  ): Promise<File> => {
11
11
  const fd = new FormData();
12
- fd.append('taskId', taskId);
13
12
  fd.append('documentCategory', documentCategory);
14
- fd.append('file', file, 'file.pdf');
13
+ fd.append('file', file, `file.${isPDF ? 'pdf' : 'xml'}`);
15
14
 
16
15
  const res = await globalThis
17
16
  ?.fetch?.(`/light-api-cash/v1/file`, {
@@ -68,6 +68,7 @@ export const parseDraftTask = (task: Task): LeadFormState => {
68
68
  payrollCardRshbFlg: isInsurance,
69
69
  consentInsuranceFlg: isSalaryClient,
70
70
  incomeCertificateCd,
71
+ profile,
71
72
  } = participant;
72
73
 
73
74
  return {
@@ -121,6 +122,7 @@ export const parseDraftTask = (task: Task): LeadFormState => {
121
122
  monthsValue,
122
123
  isAnnuity: paymentTypeCd?.key === 'ANNUITY',
123
124
  },
125
+ esiaAccountTypeCd: profile?.esiaAccountTypeCd,
124
126
  ...getParticipantIncomes(participantIncomes),
125
127
  ...getParticipantAddresses(participantAddresses),
126
128
  ...getParticipantContacts(participantContacts),
@@ -190,7 +190,16 @@ const FAMILY_STATUS_AND_INCOME_CONTENT: CreditCardSectionsProps[] = [
190
190
  },
191
191
  {
192
192
  columns: 1,
193
- inputs: [{ name: 'confirmationIncome', required: true }],
193
+ inputs: [
194
+ {
195
+ name: 'confirmationIncome',
196
+ required: true,
197
+ condition: {
198
+ name: 'esiaAccountTypeCd',
199
+ values: [''],
200
+ },
201
+ },
202
+ ],
194
203
  },
195
204
  {
196
205
  columns: 1,
@@ -86,6 +86,7 @@ type NameFieldRetailDef =
86
86
  | 'calculator'
87
87
  | 'infoCard'
88
88
  | 'deliveryTime'
89
+ | 'esiaAccountTypeCd'
89
90
  | 'comment';
90
91
 
91
92
  export type NameFieldDef =
@@ -56,6 +56,7 @@ export const mainFormStateMap: Partial<LeadFormState>[] = [
56
56
  mandatoryPayments: undefined,
57
57
  snils: '',
58
58
  armyIdFlg: false,
59
+ esiaAccountTypeCd: { key: '', text: '' },
59
60
  },
60
61
  {
61
62
  bankruptcyFlg: false,
@@ -1,17 +1,20 @@
1
1
  import { JSX } from '@redneckz/uni-jsx';
2
2
  import { Headline } from '../../components/Headline/Headline';
3
+ import { type Align } from '../../model/Align';
3
4
  import { type HeadlineVersion } from '../../model/HeadlineType';
5
+ import { type IconVersion } from '../../model/IconVersion';
4
6
  import { type VNode } from '../../model/VNode';
5
7
  import { type UniBlockProps } from '../../UniBlock/UniBlockProps';
6
8
  import { BaseTile } from '../BaseTile/BaseTile';
9
+ import { type BenefitItemContent } from '../BenefitItem/BenefitItemContent';
7
10
  import { BenefitsList } from '../BenefitsList/BenefitsList';
8
11
  import { Img } from '../Img/Img';
9
12
  import { renderButtonsSection } from '../LinkButton/renderButtonsSection';
10
13
  import { PriceList } from '../PriceList/PriceList';
11
14
  import { RichText } from '../RichText/RichText';
12
- import { type RichTextItemSize } from '../RichText/RichTextProps';
15
+ import { type RichTextItemSize, type RichVersion } from '../RichText/RichTextProps';
13
16
  import { Tags } from '../Tags/Tags';
14
- import { type BaseProductTileContent } from './BaseProductTileContent';
17
+ import { type BaseProductTileContent, type PriceItem } from './BaseProductTileContent';
15
18
 
16
19
  const RICHTEXT_SIZE: Record<HeadlineVersion, RichTextItemSize> = {
17
20
  XXL: 'list-l',
@@ -47,7 +50,7 @@ export const BaseProductTile = JSX<BaseProductTileProps>(
47
50
  buttons,
48
51
  image,
49
52
  imageOptions: {
50
- imageAlign = 'center',
53
+ imageAlign = 'center' as Align,
51
54
  directionRight = true,
52
55
  isImageAlwaysOnRight,
53
56
  isImageSecondary = false,
@@ -84,31 +87,65 @@ export const BaseProductTile = JSX<BaseProductTileProps>(
84
87
  backwardButton={backwardButton}
85
88
  {...rest}
86
89
  >
87
- <div className="flex flex-col sm:gap-xl gap-4xl">
88
- {filteredBenefits?.length ? (
89
- <BenefitsList
90
- benefitsVersion={benefitsVersion}
91
- isTabularBenefits={isTabularBenefits}
92
- benefits={filteredBenefits}
93
- />
94
- ) : null}
95
- {__html ? (
96
- <RichText
97
- richVersion={richVersion}
98
- __html={__html}
99
- isDotted={isDotted}
100
- itemSize={RICHTEXT_SIZE[headlineVersion]}
101
- />
102
- ) : null}
103
- {children}
104
- {priceList?.length ? <PriceList priceList={priceList} /> : null}
105
- {renderTags(tags)}
106
- </div>
90
+ {renderChildList(
91
+ renderBenefits(filteredBenefits, { benefitsVersion, isTabularBenefits }),
92
+ renderRichText(__html, { richVersion, isDotted, headlineVersion }),
93
+ children,
94
+ renderPriceList(priceList),
95
+ renderTags(tags),
96
+ )}
107
97
  </BaseTile>
108
98
  );
109
99
  },
110
100
  );
111
101
 
102
+ const renderBenefits = (
103
+ benefits?: BenefitItemContent[],
104
+ {
105
+ benefitsVersion,
106
+ isTabularBenefits,
107
+ }: { benefitsVersion?: IconVersion; isTabularBenefits?: boolean } = {},
108
+ ) =>
109
+ benefits?.length ? (
110
+ <BenefitsList
111
+ benefitsVersion={benefitsVersion}
112
+ isTabularBenefits={isTabularBenefits}
113
+ benefits={benefits}
114
+ />
115
+ ) : null;
116
+
117
+ const renderRichText = (
118
+ __html?: string,
119
+ {
120
+ richVersion,
121
+ isDotted,
122
+ headlineVersion,
123
+ }: { richVersion?: RichVersion; isDotted?: boolean; headlineVersion?: HeadlineVersion } = {},
124
+ ) =>
125
+ __html ? (
126
+ <RichText
127
+ __html={__html}
128
+ richVersion={richVersion}
129
+ isDotted={isDotted}
130
+ itemSize={RICHTEXT_SIZE[headlineVersion ?? 'L']}
131
+ />
132
+ ) : null;
133
+
134
+ const renderPriceList = (priceList?: PriceItem[]) =>
135
+ priceList?.length ? <PriceList priceList={priceList} /> : null;
136
+
137
+ const renderChildList = (...elements: VNode[]) => {
138
+ const cleanElements = elements.filter(Boolean);
139
+
140
+ return cleanElements.length ? (
141
+ <div className="flex flex-col sm:gap-xl gap-4xl">
142
+ {cleanElements.map((_, i) => (
143
+ <div key={String(i)}>{_}</div>
144
+ ))}
145
+ </div>
146
+ ) : null;
147
+ };
148
+
112
149
  export const leftOrRightImage = (img: VNode, directionRight: boolean) =>
113
150
  directionRight ? { rightImage: img } : { leftImage: img };
114
151
 
@@ -55,7 +55,7 @@ export const BaseTile = JSX<BaseTileProps>(
55
55
  )}
56
56
  >
57
57
  {isBackBtn && renderBackwardButton({ version, handleClick, text: backwardButtonText })}
58
- {title ? <div className="relative h-full">{title}</div> : null}
58
+ {title ? <div className="relative">{title}</div> : null}
59
59
  <div
60
60
  className={style('grow relative flex flex-col @xl:flex-row gap-3xl w-full', {
61
61
  'self-start @xl:w-auto': leftImage,
@@ -69,14 +69,10 @@ export const BaseTile = JSX<BaseTileProps>(
69
69
  '@xl:grid-cols-2 auto-cols-fr': rightImage,
70
70
  grow: !leftImage,
71
71
  },
72
- 'h-full', //? fix issue https://github.com/redneckz/temp_wcms/issues/1254
73
- 'auto-rows-[max-content_1fr]', //? fix issue https://github.com/redneckz/temp_wcms/issues/1324
72
+ 'h-auto',
74
73
  )}
75
74
  >
76
- <div className="grow space-y-lg min-w-fit">
77
- {insetTitle}
78
- {children}
79
- </div>
75
+ {renderMiddleContent(insetTitle, children)}
80
76
  {renderUnitContainer(
81
77
  renderChildren({ ...rest, extraProps: { className: '@container-normal' } }),
82
78
  )}
@@ -96,6 +92,14 @@ export const BaseTile = JSX<BaseTileProps>(
96
92
  },
97
93
  );
98
94
 
95
+ const renderMiddleContent = (insetTitle: VNode, children: VNode) =>
96
+ insetTitle || children ? (
97
+ <div className="grow space-y-lg min-w-fit">
98
+ {insetTitle}
99
+ {children}
100
+ </div>
101
+ ) : null;
102
+
99
103
  const imageAlwaysOnRightContainerStyle = (isImage: boolean) =>
100
104
  style(isImage ? 'row-span-2' : '@xl:row-span-2');
101
105
 
@@ -1,9 +1,17 @@
1
1
  import { JSX } from '@redneckz/uni-jsx';
2
+ import { isEsiaAuthorize } from '../../../retail/utils/isEsiaAuthorize';
2
3
  import { InputPhoneControl } from '../../Input/InputPhoneControl';
3
4
  import { type CustomFieldProps } from '../CustomFieldProps';
4
5
 
5
6
  export const PhoneField = JSX<CustomFieldProps>(({ field, input }) => {
6
7
  const fieldName = input?.name || 'phone';
7
8
 
8
- return <InputPhoneControl label="Телефон" {...field(fieldName)} {...input} />;
9
+ return (
10
+ <InputPhoneControl
11
+ label="Телефон"
12
+ disabled={input?.filledByEsia && isEsiaAuthorize(field, input.name ?? '')}
13
+ {...field(fieldName)}
14
+ {...input}
15
+ />
16
+ );
9
17
  });
@@ -1,3 +1,4 @@
1
+ /* eslint-disable @typescript-eslint/no-unsafe-argument */
1
2
  import { type FormFieldRegisterer } from '../../hooks/useForm/useForm';
2
3
  import { type BaseFieldDef } from './BaseFieldDef';
3
4
 
@@ -11,5 +12,5 @@ export function shouldRenderField<F extends BaseFieldDef>({
11
12
  const { condition } = input;
12
13
  const { value } = field(condition?.name || '');
13
14
 
14
- return !condition || condition?.values?.find((_) => _ === (value?.key ?? value));
15
+ return !condition || condition?.values?.includes(value?.key ?? value);
15
16
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@redneckz/wildless-cms-uni-blocks",
3
- "version": "0.14.813",
3
+ "version": "0.14.815",
4
4
  "private": false,
5
5
  "license": "MIT",
6
6
  "author": "ЦК",
@@ -214,7 +214,7 @@
214
214
  "path": "lib/common.css"
215
215
  },
216
216
  {
217
- "limit": "101 kB",
217
+ "limit": "102 kB",
218
218
  "path": "bundle/bundle.umd.min.js"
219
219
  }
220
220
  ],
@@ -42,11 +42,11 @@ export function renderBlock(
42
42
  return BlockComponent ? (
43
43
  <BlockComponent
44
44
  key={key}
45
- className={adjustedBlockClassName}
46
- block={block}
47
- options={options}
48
45
  {...content}
49
46
  {...extraProps}
47
+ className={style(adjustedBlockClassName, content?.className as string)}
48
+ block={block}
49
+ options={options}
50
50
  />
51
51
  ) : null;
52
52
  },
@@ -3,7 +3,7 @@ import { JSX, type UNIComponent } from '@redneckz/uni-jsx';
3
3
  import { type JSONSchema7Definition } from 'json-schema';
4
4
  import { useJSONRef } from '../hooks/useJSONRef/useJSONRef';
5
5
  import { type SlotName } from '../model/BlockDecorator';
6
- import { type BlockDef } from '../model/ContentPageDef';
6
+ import { type BlockDef, type Slot } from '../model/ContentPageDef';
7
7
  import { type VNode } from '../model/VNode';
8
8
  import { extractContent } from './extractContent';
9
9
  import { type UniBlockProps } from './UniBlockProps';
@@ -12,6 +12,8 @@ export interface UniBlockMeta<Props extends UniBlockProps = UniBlockProps> {
12
12
  displayName?: string;
13
13
  childrenTypes?: string[] | { include?: string[]; exclude?: string[] };
14
14
  childSchema?: (content: BlockDef['content']) => Record<string, JSONSchema7Definition>;
15
+ allowAddChild?: (slot?: Slot) => boolean;
16
+ allowRemoveChild?: (slot?: Slot) => boolean;
15
17
  slots?: (props: Props) => SlotName[];
16
18
  }
17
19
 
@@ -1,3 +1,4 @@
1
+ /* eslint-disable max-lines-per-function */
1
2
  import { JSX } from '@redneckz/uni-jsx';
2
3
  import { useEffect, useMemo } from '@redneckz/uni-jsx/lib/hooks';
3
4
  import { useBool } from '@redneckz/uni-jsx/lib/hooks/useBool';
@@ -16,6 +17,7 @@ import { type UniBlockProps } from '../../UniBlock/UniBlockProps';
16
17
  import { style } from '../../utils/style';
17
18
  import { getApplicationFormData } from './applicationFormData';
18
19
  import { type ApplicationLeadFormContent } from './ApplicationLeadFormContent';
20
+ import { EsiaLoginBanner } from './EsiaLoginBanner';
19
21
  import { renderInputs } from './renderInputs';
20
22
  import { renderSubmitButton } from './renderSubmitButton';
21
23
  import { useApplicationLeadApi } from './useApplicationLeadApi';
@@ -35,6 +37,7 @@ export const ApplicationLeadForm = JSX<ApplicationLeadFormProps>(
35
37
  ...rest
36
38
  }) => {
37
39
  const [esiaError, { setTrue: setEsiaError }] = useBool(false);
40
+ const [esiaAuthSuccess, { setTrue: setEsiaAuthSuccess }] = useBool(false);
38
41
  const applicationFormData = useMemo(() => getApplicationFormData(productType), [productType]);
39
42
  const inputs = useMemo(
40
43
  () => (applicationFormData?.flatMap((_) => _?.inputs) || []) as FieldRetailDef[],
@@ -48,16 +51,18 @@ export const ApplicationLeadForm = JSX<ApplicationLeadFormProps>(
48
51
  nextStepLink,
49
52
  productType,
50
53
  setEsiaError,
54
+ setEsiaAuthSuccess,
55
+ esiaAuthSuccess,
51
56
  });
52
57
  const { isSending, ok, handleSubmit } = useApplicationLeadApi({
53
58
  programId,
54
59
  nextStepLink,
55
60
  productType,
56
- esiaError,
61
+ esiaAuthSuccess,
57
62
  data,
58
63
  });
59
64
 
60
- const [, { field, onSubmit }] = useForm(initialFormState, {
65
+ const [, { field, onSubmit, reset }] = useForm(initialFormState, {
61
66
  formValidator,
62
67
  onSubmit: handleSubmit,
63
68
  });
@@ -69,12 +74,19 @@ export const ApplicationLeadForm = JSX<ApplicationLeadFormProps>(
69
74
  }
70
75
  }, [ok]);
71
76
 
77
+ useEffect(() => {
78
+ if (initialFormState?.esiaAccountTypeCd) {
79
+ reset();
80
+ }
81
+ }, [initialFormState]);
82
+
72
83
  return (
73
84
  <ApplicationFormLayout
74
85
  className={style('container space-y-m', className)}
75
86
  title={title}
76
87
  {...rest}
77
88
  >
89
+ {!esiaAuthSuccess && !esiaError ? <EsiaLoginBanner /> : null}
78
90
  <form onSubmit={onSubmit} className="space-y-m relative">
79
91
  {isLoading ? <Loader blur={false} /> : null}
80
92
  {applicationFormData.map((_, i) => (
@@ -0,0 +1,52 @@
1
+ import { JSX } from '@redneckz/uni-jsx';
2
+ import { useCallback } from '@redneckz/uni-jsx/lib/hooks';
3
+ import { locationNavigator } from '../../external/locationNavigator';
4
+ import { getLink } from '../../retail/api/getLink';
5
+ import { Button } from '../../ui-kit/Button/Button';
6
+ import { Img } from '../../ui-kit/Img/Img';
7
+
8
+ export interface EsiaLoginBannerProps {
9
+ onClose?: () => void;
10
+ }
11
+
12
+ export const EsiaLoginBanner = JSX<EsiaLoginBannerProps>(() => {
13
+ const navigator = locationNavigator();
14
+
15
+ const handleAuth = useCallback(async () => {
16
+ const resp = await getLink({
17
+ redirectUri: globalThis.location.origin + globalThis.location.pathname,
18
+ });
19
+
20
+ if (resp?.link) {
21
+ navigator.assign(resp.link);
22
+ globalThis.location.href = resp.link;
23
+ }
24
+ }, []);
25
+
26
+ return (
27
+ <div className="flex gap-lg items-center rounded-md bg-main-gray px-4 py-6 @md:p-9">
28
+ <div className="flex flex-col justify-around w-full">
29
+ <p className="mb-4 text-xl @md:text-2xl @md:mb-6">Заполните данные через Госуслуги</p>
30
+ <ul className="list-disc list-inside mb-9">
31
+ <li>Вероятность одобрения выше</li>
32
+ <li>Без справок о доходах и трудоустройстве</li>
33
+ <li>С защитой Ваших данных</li>
34
+ </ul>
35
+ <Img
36
+ className="block mb-6 self-center @md:hidden"
37
+ image={{ icon: 'GosUslugiIcon', iconVersion: 'normal' }}
38
+ height="80"
39
+ width="80"
40
+ />
41
+ <Button type="button" onClick={handleAuth} className="w-full @md:w-fit">
42
+ Заполнить
43
+ </Button>
44
+ </div>
45
+ <Img
46
+ className="hidden @md:block"
47
+ image={{ icon: 'GosUslugiIcon', iconVersion: 'normal' }}
48
+ height="164"
49
+ />
50
+ </div>
51
+ );
52
+ });