@redneckz/wildless-cms-uni-blocks 0.14.1077 → 0.14.1078

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 (394) hide show
  1. package/bundle/bundle.umd.js +462 -249
  2. package/bundle/bundle.umd.min.js +1 -1
  3. package/bundle/components/ApplicationLeadForm/renderSubmitButton.d.ts +4 -1
  4. package/bundle/components/CreditCardForm/StepsNavigationButtons.d.ts +3 -0
  5. package/bundle/components/CreditCardForm/creditCardFormAspects.d.ts +2 -0
  6. package/bundle/components/CreditForm/creditFormAspects.d.ts +2 -0
  7. package/bundle/components/DebitForm/StepsNavigationButtons.d.ts +3 -0
  8. package/bundle/components/DebitForm/debitFormAspects.d.ts +2 -0
  9. package/bundle/retail/components/ConsentBkiDialog/ConsentBkiDialog.d.ts +1 -0
  10. package/bundle/retail/components/ConsentBkiDialog/useConsentBkiDialog.d.ts +2 -1
  11. package/bundle/retail/components/DraftDialog/DraftActionButton.d.ts +2 -0
  12. package/bundle/retail/components/DraftDialog/DraftDialogContent.d.ts +3 -0
  13. package/bundle/retail/model/ApplicationLeadFormTypes.d.ts +13 -0
  14. package/bundle/retail/utils/commonAspects.d.ts +2 -0
  15. package/bundle/retail/utils/formAspectsConfig.d.ts +6 -0
  16. package/bundle/retail/utils/yandexMetrika.d.ts +1 -0
  17. package/bundle/utils/getStepAspects.d.ts +11 -0
  18. package/dist/components/ApplicationLeadForm/ApplicationLeadForm.js +1 -1
  19. package/dist/components/ApplicationLeadForm/ApplicationLeadForm.js.map +1 -1
  20. package/dist/components/ApplicationLeadForm/renderSubmitButton.d.ts +4 -1
  21. package/dist/components/ApplicationLeadForm/renderSubmitButton.js +7 -1
  22. package/dist/components/ApplicationLeadForm/renderSubmitButton.js.map +1 -1
  23. package/dist/components/ApplicationLeadForm/useApplicationLeadApi.js +83 -40
  24. package/dist/components/ApplicationLeadForm/useApplicationLeadApi.js.map +1 -1
  25. package/dist/components/CreditCardForm/CreditCardFormStep.js +5 -2
  26. package/dist/components/CreditCardForm/CreditCardFormStep.js.map +1 -1
  27. package/dist/components/CreditCardForm/FailedStatusContent.js +15 -1
  28. package/dist/components/CreditCardForm/FailedStatusContent.js.map +1 -1
  29. package/dist/components/CreditCardForm/PendingStatusContent.js +21 -1
  30. package/dist/components/CreditCardForm/PendingStatusContent.js.map +1 -1
  31. package/dist/components/CreditCardForm/ReworkStatusContent.js +12 -0
  32. package/dist/components/CreditCardForm/ReworkStatusContent.js.map +1 -1
  33. package/dist/components/CreditCardForm/StepsNavigationButtons.d.ts +3 -0
  34. package/dist/components/CreditCardForm/StepsNavigationButtons.js +11 -2
  35. package/dist/components/CreditCardForm/StepsNavigationButtons.js.map +1 -1
  36. package/dist/components/CreditCardForm/SuccessStatusCardContent.js +12 -0
  37. package/dist/components/CreditCardForm/SuccessStatusCardContent.js.map +1 -1
  38. package/dist/components/CreditCardForm/creditCardFormAspects.d.ts +2 -0
  39. package/dist/components/CreditCardForm/creditCardFormAspects.js +10 -0
  40. package/dist/components/CreditCardForm/creditCardFormAspects.js.map +1 -0
  41. package/dist/components/CreditForm/FailedStatusContent.js +15 -1
  42. package/dist/components/CreditForm/FailedStatusContent.js.map +1 -1
  43. package/dist/components/CreditForm/PendingStatusContent.js +21 -1
  44. package/dist/components/CreditForm/PendingStatusContent.js.map +1 -1
  45. package/dist/components/CreditForm/ReworkStatusContent.js +12 -0
  46. package/dist/components/CreditForm/ReworkStatusContent.js.map +1 -1
  47. package/dist/components/CreditForm/StepsNavigationButtons.js +4 -92
  48. package/dist/components/CreditForm/StepsNavigationButtons.js.map +1 -1
  49. package/dist/components/CreditForm/SuccessStatusContent.js +12 -0
  50. package/dist/components/CreditForm/SuccessStatusContent.js.map +1 -1
  51. package/dist/components/CreditForm/creditFormAspects.d.ts +2 -0
  52. package/dist/components/CreditForm/creditFormAspects.js +35 -0
  53. package/dist/components/CreditForm/creditFormAspects.js.map +1 -0
  54. package/dist/components/DebitForm/DebitFormStep.js +5 -2
  55. package/dist/components/DebitForm/DebitFormStep.js.map +1 -1
  56. package/dist/components/DebitForm/StepsNavigationButtons.d.ts +3 -0
  57. package/dist/components/DebitForm/StepsNavigationButtons.js +11 -2
  58. package/dist/components/DebitForm/StepsNavigationButtons.js.map +1 -1
  59. package/dist/components/DebitForm/debitFormAspects.d.ts +2 -0
  60. package/dist/components/DebitForm/debitFormAspects.js +8 -0
  61. package/dist/components/DebitForm/debitFormAspects.js.map +1 -0
  62. package/dist/retail/components/ConsentBkiDialog/ConsentBkiDialog.d.ts +1 -0
  63. package/dist/retail/components/ConsentBkiDialog/ConsentBkiDialog.js +13 -2
  64. package/dist/retail/components/ConsentBkiDialog/ConsentBkiDialog.js.map +1 -1
  65. package/dist/retail/components/ConsentBkiDialog/useConsentBkiDialog.d.ts +2 -1
  66. package/dist/retail/components/ConsentBkiDialog/useConsentBkiDialog.js +64 -47
  67. package/dist/retail/components/ConsentBkiDialog/useConsentBkiDialog.js.map +1 -1
  68. package/dist/retail/components/DraftDialog/DraftActionButton.d.ts +2 -0
  69. package/dist/retail/components/DraftDialog/DraftActionButton.js +2 -1
  70. package/dist/retail/components/DraftDialog/DraftActionButton.js.map +1 -1
  71. package/dist/retail/components/DraftDialog/DraftDialog.js +14 -1
  72. package/dist/retail/components/DraftDialog/DraftDialog.js.map +1 -1
  73. package/dist/retail/components/DraftDialog/DraftDialogContent.d.ts +3 -0
  74. package/dist/retail/components/DraftDialog/DraftDialogContent.js +2 -2
  75. package/dist/retail/components/DraftDialog/DraftDialogContent.js.map +1 -1
  76. package/dist/retail/model/ApplicationLeadFormTypes.d.ts +13 -0
  77. package/dist/retail/utils/commonAspects.d.ts +2 -0
  78. package/dist/retail/utils/commonAspects.js +64 -0
  79. package/dist/retail/utils/commonAspects.js.map +1 -0
  80. package/dist/retail/utils/formAspectsConfig.d.ts +6 -0
  81. package/dist/retail/utils/formAspectsConfig.js +2 -0
  82. package/dist/retail/utils/formAspectsConfig.js.map +1 -0
  83. package/dist/retail/utils/yandexMetrika.d.ts +1 -0
  84. package/dist/retail/utils/yandexMetrika.js +5 -0
  85. package/dist/retail/utils/yandexMetrika.js.map +1 -0
  86. package/dist/utils/getStepAspects.d.ts +11 -0
  87. package/dist/utils/getStepAspects.js +50 -0
  88. package/dist/utils/getStepAspects.js.map +1 -0
  89. package/lib/components/ApplicationLeadForm/ApplicationLeadForm.js +1 -1
  90. package/lib/components/ApplicationLeadForm/ApplicationLeadForm.js.map +1 -1
  91. package/lib/components/ApplicationLeadForm/renderSubmitButton.d.ts +4 -1
  92. package/lib/components/ApplicationLeadForm/renderSubmitButton.js +7 -1
  93. package/lib/components/ApplicationLeadForm/renderSubmitButton.js.map +1 -1
  94. package/lib/components/ApplicationLeadForm/useApplicationLeadApi.js +83 -40
  95. package/lib/components/ApplicationLeadForm/useApplicationLeadApi.js.map +1 -1
  96. package/lib/components/CreditCardForm/CreditCardFormStep.js +5 -2
  97. package/lib/components/CreditCardForm/CreditCardFormStep.js.map +1 -1
  98. package/lib/components/CreditCardForm/FailedStatusContent.js +15 -1
  99. package/lib/components/CreditCardForm/FailedStatusContent.js.map +1 -1
  100. package/lib/components/CreditCardForm/PendingStatusContent.js +21 -1
  101. package/lib/components/CreditCardForm/PendingStatusContent.js.map +1 -1
  102. package/lib/components/CreditCardForm/ReworkStatusContent.js +12 -0
  103. package/lib/components/CreditCardForm/ReworkStatusContent.js.map +1 -1
  104. package/lib/components/CreditCardForm/StepsNavigationButtons.d.ts +3 -0
  105. package/lib/components/CreditCardForm/StepsNavigationButtons.js +11 -2
  106. package/lib/components/CreditCardForm/StepsNavigationButtons.js.map +1 -1
  107. package/lib/components/CreditCardForm/SuccessStatusCardContent.js +12 -0
  108. package/lib/components/CreditCardForm/SuccessStatusCardContent.js.map +1 -1
  109. package/lib/components/CreditCardForm/creditCardFormAspects.d.ts +2 -0
  110. package/lib/components/CreditCardForm/creditCardFormAspects.js +8 -0
  111. package/lib/components/CreditCardForm/creditCardFormAspects.js.map +1 -0
  112. package/lib/components/CreditForm/FailedStatusContent.js +15 -1
  113. package/lib/components/CreditForm/FailedStatusContent.js.map +1 -1
  114. package/lib/components/CreditForm/PendingStatusContent.js +21 -1
  115. package/lib/components/CreditForm/PendingStatusContent.js.map +1 -1
  116. package/lib/components/CreditForm/ReworkStatusContent.js +12 -0
  117. package/lib/components/CreditForm/ReworkStatusContent.js.map +1 -1
  118. package/lib/components/CreditForm/StepsNavigationButtons.js +4 -92
  119. package/lib/components/CreditForm/StepsNavigationButtons.js.map +1 -1
  120. package/lib/components/CreditForm/SuccessStatusContent.js +12 -0
  121. package/lib/components/CreditForm/SuccessStatusContent.js.map +1 -1
  122. package/lib/components/CreditForm/creditFormAspects.d.ts +2 -0
  123. package/lib/components/CreditForm/creditFormAspects.js +33 -0
  124. package/lib/components/CreditForm/creditFormAspects.js.map +1 -0
  125. package/lib/components/DebitForm/DebitFormStep.js +5 -2
  126. package/lib/components/DebitForm/DebitFormStep.js.map +1 -1
  127. package/lib/components/DebitForm/StepsNavigationButtons.d.ts +3 -0
  128. package/lib/components/DebitForm/StepsNavigationButtons.js +11 -2
  129. package/lib/components/DebitForm/StepsNavigationButtons.js.map +1 -1
  130. package/lib/components/DebitForm/debitFormAspects.d.ts +2 -0
  131. package/lib/components/DebitForm/debitFormAspects.js +6 -0
  132. package/lib/components/DebitForm/debitFormAspects.js.map +1 -0
  133. package/lib/components/OfficesAtmsMap/OfficesAtmsMapLayout.d.ts +1 -1
  134. package/lib/retail/components/ConsentBkiDialog/ConsentBkiDialog.d.ts +1 -0
  135. package/lib/retail/components/ConsentBkiDialog/ConsentBkiDialog.js +13 -2
  136. package/lib/retail/components/ConsentBkiDialog/ConsentBkiDialog.js.map +1 -1
  137. package/lib/retail/components/ConsentBkiDialog/useConsentBkiDialog.d.ts +2 -1
  138. package/lib/retail/components/ConsentBkiDialog/useConsentBkiDialog.js +64 -47
  139. package/lib/retail/components/ConsentBkiDialog/useConsentBkiDialog.js.map +1 -1
  140. package/lib/retail/components/DraftDialog/DraftActionButton.d.ts +2 -0
  141. package/lib/retail/components/DraftDialog/DraftActionButton.js +2 -1
  142. package/lib/retail/components/DraftDialog/DraftActionButton.js.map +1 -1
  143. package/lib/retail/components/DraftDialog/DraftDialog.js +14 -1
  144. package/lib/retail/components/DraftDialog/DraftDialog.js.map +1 -1
  145. package/lib/retail/components/DraftDialog/DraftDialogContent.d.ts +3 -0
  146. package/lib/retail/components/DraftDialog/DraftDialogContent.js +2 -2
  147. package/lib/retail/components/DraftDialog/DraftDialogContent.js.map +1 -1
  148. package/lib/retail/model/ApplicationLeadFormTypes.d.ts +13 -0
  149. package/lib/retail/utils/commonAspects.d.ts +2 -0
  150. package/lib/retail/utils/commonAspects.js +61 -0
  151. package/lib/retail/utils/commonAspects.js.map +1 -0
  152. package/lib/retail/utils/formAspectsConfig.d.ts +6 -0
  153. package/lib/retail/utils/formAspectsConfig.js +2 -0
  154. package/lib/retail/utils/formAspectsConfig.js.map +1 -0
  155. package/lib/retail/utils/yandexMetrika.d.ts +1 -0
  156. package/lib/retail/utils/yandexMetrika.js +3 -0
  157. package/lib/retail/utils/yandexMetrika.js.map +1 -0
  158. package/lib/utils/getStepAspects.d.ts +11 -0
  159. package/lib/utils/getStepAspects.js +47 -0
  160. package/lib/utils/getStepAspects.js.map +1 -0
  161. package/mobile/bundle/bundle.umd.js +462 -249
  162. package/mobile/bundle/bundle.umd.min.js +1 -1
  163. package/mobile/bundle/components/ApplicationLeadForm/renderSubmitButton.d.ts +4 -1
  164. package/mobile/bundle/components/CreditCardForm/StepsNavigationButtons.d.ts +3 -0
  165. package/mobile/bundle/components/CreditCardForm/creditCardFormAspects.d.ts +2 -0
  166. package/mobile/bundle/components/CreditForm/creditFormAspects.d.ts +2 -0
  167. package/mobile/bundle/components/DebitForm/StepsNavigationButtons.d.ts +3 -0
  168. package/mobile/bundle/components/DebitForm/debitFormAspects.d.ts +2 -0
  169. package/mobile/bundle/retail/components/ConsentBkiDialog/ConsentBkiDialog.d.ts +1 -0
  170. package/mobile/bundle/retail/components/ConsentBkiDialog/useConsentBkiDialog.d.ts +2 -1
  171. package/mobile/bundle/retail/components/DraftDialog/DraftActionButton.d.ts +2 -0
  172. package/mobile/bundle/retail/components/DraftDialog/DraftDialogContent.d.ts +3 -0
  173. package/mobile/bundle/retail/model/ApplicationLeadFormTypes.d.ts +13 -0
  174. package/mobile/bundle/retail/utils/commonAspects.d.ts +2 -0
  175. package/mobile/bundle/retail/utils/formAspectsConfig.d.ts +6 -0
  176. package/mobile/bundle/retail/utils/yandexMetrika.d.ts +1 -0
  177. package/mobile/bundle/utils/getStepAspects.d.ts +11 -0
  178. package/mobile/dist/components/ApplicationLeadForm/ApplicationLeadForm.js +1 -1
  179. package/mobile/dist/components/ApplicationLeadForm/ApplicationLeadForm.js.map +1 -1
  180. package/mobile/dist/components/ApplicationLeadForm/renderSubmitButton.d.ts +4 -1
  181. package/mobile/dist/components/ApplicationLeadForm/renderSubmitButton.js +7 -1
  182. package/mobile/dist/components/ApplicationLeadForm/renderSubmitButton.js.map +1 -1
  183. package/mobile/dist/components/ApplicationLeadForm/useApplicationLeadApi.js +83 -40
  184. package/mobile/dist/components/ApplicationLeadForm/useApplicationLeadApi.js.map +1 -1
  185. package/mobile/dist/components/CreditCardForm/CreditCardFormStep.js +5 -2
  186. package/mobile/dist/components/CreditCardForm/CreditCardFormStep.js.map +1 -1
  187. package/mobile/dist/components/CreditCardForm/FailedStatusContent.js +15 -1
  188. package/mobile/dist/components/CreditCardForm/FailedStatusContent.js.map +1 -1
  189. package/mobile/dist/components/CreditCardForm/PendingStatusContent.js +21 -1
  190. package/mobile/dist/components/CreditCardForm/PendingStatusContent.js.map +1 -1
  191. package/mobile/dist/components/CreditCardForm/ReworkStatusContent.js +12 -0
  192. package/mobile/dist/components/CreditCardForm/ReworkStatusContent.js.map +1 -1
  193. package/mobile/dist/components/CreditCardForm/StepsNavigationButtons.d.ts +3 -0
  194. package/mobile/dist/components/CreditCardForm/StepsNavigationButtons.js +11 -2
  195. package/mobile/dist/components/CreditCardForm/StepsNavigationButtons.js.map +1 -1
  196. package/mobile/dist/components/CreditCardForm/SuccessStatusCardContent.js +12 -0
  197. package/mobile/dist/components/CreditCardForm/SuccessStatusCardContent.js.map +1 -1
  198. package/mobile/dist/components/CreditCardForm/creditCardFormAspects.d.ts +2 -0
  199. package/mobile/dist/components/CreditCardForm/creditCardFormAspects.js +10 -0
  200. package/mobile/dist/components/CreditCardForm/creditCardFormAspects.js.map +1 -0
  201. package/mobile/dist/components/CreditForm/FailedStatusContent.js +15 -1
  202. package/mobile/dist/components/CreditForm/FailedStatusContent.js.map +1 -1
  203. package/mobile/dist/components/CreditForm/PendingStatusContent.js +21 -1
  204. package/mobile/dist/components/CreditForm/PendingStatusContent.js.map +1 -1
  205. package/mobile/dist/components/CreditForm/ReworkStatusContent.js +12 -0
  206. package/mobile/dist/components/CreditForm/ReworkStatusContent.js.map +1 -1
  207. package/mobile/dist/components/CreditForm/StepsNavigationButtons.js +4 -92
  208. package/mobile/dist/components/CreditForm/StepsNavigationButtons.js.map +1 -1
  209. package/mobile/dist/components/CreditForm/SuccessStatusContent.js +12 -0
  210. package/mobile/dist/components/CreditForm/SuccessStatusContent.js.map +1 -1
  211. package/mobile/dist/components/CreditForm/creditFormAspects.d.ts +2 -0
  212. package/mobile/dist/components/CreditForm/creditFormAspects.js +35 -0
  213. package/mobile/dist/components/CreditForm/creditFormAspects.js.map +1 -0
  214. package/mobile/dist/components/DebitForm/DebitFormStep.js +5 -2
  215. package/mobile/dist/components/DebitForm/DebitFormStep.js.map +1 -1
  216. package/mobile/dist/components/DebitForm/StepsNavigationButtons.d.ts +3 -0
  217. package/mobile/dist/components/DebitForm/StepsNavigationButtons.js +11 -2
  218. package/mobile/dist/components/DebitForm/StepsNavigationButtons.js.map +1 -1
  219. package/mobile/dist/components/DebitForm/debitFormAspects.d.ts +2 -0
  220. package/mobile/dist/components/DebitForm/debitFormAspects.js +8 -0
  221. package/mobile/dist/components/DebitForm/debitFormAspects.js.map +1 -0
  222. package/mobile/dist/retail/components/ConsentBkiDialog/ConsentBkiDialog.d.ts +1 -0
  223. package/mobile/dist/retail/components/ConsentBkiDialog/ConsentBkiDialog.js +13 -2
  224. package/mobile/dist/retail/components/ConsentBkiDialog/ConsentBkiDialog.js.map +1 -1
  225. package/mobile/dist/retail/components/ConsentBkiDialog/useConsentBkiDialog.d.ts +2 -1
  226. package/mobile/dist/retail/components/ConsentBkiDialog/useConsentBkiDialog.js +64 -47
  227. package/mobile/dist/retail/components/ConsentBkiDialog/useConsentBkiDialog.js.map +1 -1
  228. package/mobile/dist/retail/components/DraftDialog/DraftActionButton.d.ts +2 -0
  229. package/mobile/dist/retail/components/DraftDialog/DraftActionButton.js +2 -1
  230. package/mobile/dist/retail/components/DraftDialog/DraftActionButton.js.map +1 -1
  231. package/mobile/dist/retail/components/DraftDialog/DraftDialog.js +14 -1
  232. package/mobile/dist/retail/components/DraftDialog/DraftDialog.js.map +1 -1
  233. package/mobile/dist/retail/components/DraftDialog/DraftDialogContent.d.ts +3 -0
  234. package/mobile/dist/retail/components/DraftDialog/DraftDialogContent.js +2 -2
  235. package/mobile/dist/retail/components/DraftDialog/DraftDialogContent.js.map +1 -1
  236. package/mobile/dist/retail/model/ApplicationLeadFormTypes.d.ts +13 -0
  237. package/mobile/dist/retail/utils/commonAspects.d.ts +2 -0
  238. package/mobile/dist/retail/utils/commonAspects.js +64 -0
  239. package/mobile/dist/retail/utils/commonAspects.js.map +1 -0
  240. package/mobile/dist/retail/utils/formAspectsConfig.d.ts +6 -0
  241. package/mobile/dist/retail/utils/formAspectsConfig.js +2 -0
  242. package/mobile/dist/retail/utils/formAspectsConfig.js.map +1 -0
  243. package/mobile/dist/retail/utils/yandexMetrika.d.ts +1 -0
  244. package/mobile/dist/retail/utils/yandexMetrika.js +5 -0
  245. package/mobile/dist/retail/utils/yandexMetrika.js.map +1 -0
  246. package/mobile/dist/utils/getStepAspects.d.ts +11 -0
  247. package/mobile/dist/utils/getStepAspects.js +50 -0
  248. package/mobile/dist/utils/getStepAspects.js.map +1 -0
  249. package/mobile/lib/components/ApplicationLeadForm/ApplicationLeadForm.js +1 -1
  250. package/mobile/lib/components/ApplicationLeadForm/ApplicationLeadForm.js.map +1 -1
  251. package/mobile/lib/components/ApplicationLeadForm/renderSubmitButton.d.ts +4 -1
  252. package/mobile/lib/components/ApplicationLeadForm/renderSubmitButton.js +7 -1
  253. package/mobile/lib/components/ApplicationLeadForm/renderSubmitButton.js.map +1 -1
  254. package/mobile/lib/components/ApplicationLeadForm/useApplicationLeadApi.js +83 -40
  255. package/mobile/lib/components/ApplicationLeadForm/useApplicationLeadApi.js.map +1 -1
  256. package/mobile/lib/components/CreditCardForm/CreditCardFormStep.js +5 -2
  257. package/mobile/lib/components/CreditCardForm/CreditCardFormStep.js.map +1 -1
  258. package/mobile/lib/components/CreditCardForm/FailedStatusContent.js +15 -1
  259. package/mobile/lib/components/CreditCardForm/FailedStatusContent.js.map +1 -1
  260. package/mobile/lib/components/CreditCardForm/PendingStatusContent.js +21 -1
  261. package/mobile/lib/components/CreditCardForm/PendingStatusContent.js.map +1 -1
  262. package/mobile/lib/components/CreditCardForm/ReworkStatusContent.js +12 -0
  263. package/mobile/lib/components/CreditCardForm/ReworkStatusContent.js.map +1 -1
  264. package/mobile/lib/components/CreditCardForm/StepsNavigationButtons.d.ts +3 -0
  265. package/mobile/lib/components/CreditCardForm/StepsNavigationButtons.js +11 -2
  266. package/mobile/lib/components/CreditCardForm/StepsNavigationButtons.js.map +1 -1
  267. package/mobile/lib/components/CreditCardForm/SuccessStatusCardContent.js +12 -0
  268. package/mobile/lib/components/CreditCardForm/SuccessStatusCardContent.js.map +1 -1
  269. package/mobile/lib/components/CreditCardForm/creditCardFormAspects.d.ts +2 -0
  270. package/mobile/lib/components/CreditCardForm/creditCardFormAspects.js +8 -0
  271. package/mobile/lib/components/CreditCardForm/creditCardFormAspects.js.map +1 -0
  272. package/mobile/lib/components/CreditForm/FailedStatusContent.js +15 -1
  273. package/mobile/lib/components/CreditForm/FailedStatusContent.js.map +1 -1
  274. package/mobile/lib/components/CreditForm/PendingStatusContent.js +21 -1
  275. package/mobile/lib/components/CreditForm/PendingStatusContent.js.map +1 -1
  276. package/mobile/lib/components/CreditForm/ReworkStatusContent.js +12 -0
  277. package/mobile/lib/components/CreditForm/ReworkStatusContent.js.map +1 -1
  278. package/mobile/lib/components/CreditForm/StepsNavigationButtons.js +4 -92
  279. package/mobile/lib/components/CreditForm/StepsNavigationButtons.js.map +1 -1
  280. package/mobile/lib/components/CreditForm/SuccessStatusContent.js +12 -0
  281. package/mobile/lib/components/CreditForm/SuccessStatusContent.js.map +1 -1
  282. package/mobile/lib/components/CreditForm/creditFormAspects.d.ts +2 -0
  283. package/mobile/lib/components/CreditForm/creditFormAspects.js +33 -0
  284. package/mobile/lib/components/CreditForm/creditFormAspects.js.map +1 -0
  285. package/mobile/lib/components/DebitForm/DebitFormStep.js +5 -2
  286. package/mobile/lib/components/DebitForm/DebitFormStep.js.map +1 -1
  287. package/mobile/lib/components/DebitForm/StepsNavigationButtons.d.ts +3 -0
  288. package/mobile/lib/components/DebitForm/StepsNavigationButtons.js +11 -2
  289. package/mobile/lib/components/DebitForm/StepsNavigationButtons.js.map +1 -1
  290. package/mobile/lib/components/DebitForm/debitFormAspects.d.ts +2 -0
  291. package/mobile/lib/components/DebitForm/debitFormAspects.js +6 -0
  292. package/mobile/lib/components/DebitForm/debitFormAspects.js.map +1 -0
  293. package/mobile/lib/retail/components/ConsentBkiDialog/ConsentBkiDialog.d.ts +1 -0
  294. package/mobile/lib/retail/components/ConsentBkiDialog/ConsentBkiDialog.js +13 -2
  295. package/mobile/lib/retail/components/ConsentBkiDialog/ConsentBkiDialog.js.map +1 -1
  296. package/mobile/lib/retail/components/ConsentBkiDialog/useConsentBkiDialog.d.ts +2 -1
  297. package/mobile/lib/retail/components/ConsentBkiDialog/useConsentBkiDialog.js +64 -47
  298. package/mobile/lib/retail/components/ConsentBkiDialog/useConsentBkiDialog.js.map +1 -1
  299. package/mobile/lib/retail/components/DraftDialog/DraftActionButton.d.ts +2 -0
  300. package/mobile/lib/retail/components/DraftDialog/DraftActionButton.js +2 -1
  301. package/mobile/lib/retail/components/DraftDialog/DraftActionButton.js.map +1 -1
  302. package/mobile/lib/retail/components/DraftDialog/DraftDialog.js +14 -1
  303. package/mobile/lib/retail/components/DraftDialog/DraftDialog.js.map +1 -1
  304. package/mobile/lib/retail/components/DraftDialog/DraftDialogContent.d.ts +3 -0
  305. package/mobile/lib/retail/components/DraftDialog/DraftDialogContent.js +2 -2
  306. package/mobile/lib/retail/components/DraftDialog/DraftDialogContent.js.map +1 -1
  307. package/mobile/lib/retail/model/ApplicationLeadFormTypes.d.ts +13 -0
  308. package/mobile/lib/retail/utils/commonAspects.d.ts +2 -0
  309. package/mobile/lib/retail/utils/commonAspects.js +61 -0
  310. package/mobile/lib/retail/utils/commonAspects.js.map +1 -0
  311. package/mobile/lib/retail/utils/formAspectsConfig.d.ts +6 -0
  312. package/mobile/lib/retail/utils/formAspectsConfig.js +2 -0
  313. package/mobile/lib/retail/utils/formAspectsConfig.js.map +1 -0
  314. package/mobile/lib/retail/utils/yandexMetrika.d.ts +1 -0
  315. package/mobile/lib/retail/utils/yandexMetrika.js +3 -0
  316. package/mobile/lib/retail/utils/yandexMetrika.js.map +1 -0
  317. package/mobile/lib/utils/getStepAspects.d.ts +11 -0
  318. package/mobile/lib/utils/getStepAspects.js +47 -0
  319. package/mobile/lib/utils/getStepAspects.js.map +1 -0
  320. package/mobile/src/components/ApplicationLeadForm/ApplicationLeadForm.tsx +1 -1
  321. package/mobile/src/components/ApplicationLeadForm/renderSubmitButton.tsx +20 -5
  322. package/mobile/src/components/ApplicationLeadForm/useApplicationLeadApi.tsx +98 -38
  323. package/mobile/src/components/CreditCardForm/CreditCardFormStep.tsx +13 -2
  324. package/mobile/src/components/CreditCardForm/FailedStatusContent.tsx +24 -7
  325. package/mobile/src/components/CreditCardForm/PendingStatusContent.tsx +24 -1
  326. package/mobile/src/components/CreditCardForm/ReworkStatusContent.tsx +14 -0
  327. package/mobile/src/components/CreditCardForm/StepsNavigationButtons.tsx +15 -2
  328. package/mobile/src/components/CreditCardForm/SuccessStatusCardContent.tsx +14 -0
  329. package/mobile/src/components/CreditCardForm/creditCardFormAspects.ts +9 -0
  330. package/mobile/src/components/CreditForm/FailedStatusContent.tsx +24 -7
  331. package/mobile/src/components/CreditForm/PendingStatusContent.tsx +26 -1
  332. package/mobile/src/components/CreditForm/ReworkStatusContent.tsx +15 -0
  333. package/mobile/src/components/CreditForm/StepsNavigationButtons.tsx +5 -95
  334. package/mobile/src/components/CreditForm/SuccessStatusContent.tsx +15 -0
  335. package/mobile/src/components/CreditForm/creditFormAspects.ts +35 -0
  336. package/mobile/src/components/DebitForm/DebitFormStep.tsx +13 -2
  337. package/mobile/src/components/DebitForm/StepsNavigationButtons.tsx +15 -2
  338. package/mobile/src/components/DebitForm/debitFormAspects.ts +7 -0
  339. package/mobile/src/retail/components/ConsentBkiDialog/ConsentBkiDialog.tsx +16 -2
  340. package/mobile/src/retail/components/ConsentBkiDialog/useConsentBkiDialog.tsx +93 -51
  341. package/mobile/src/retail/components/DraftDialog/DraftActionButton.tsx +6 -1
  342. package/mobile/src/retail/components/DraftDialog/DraftDialog.tsx +15 -0
  343. package/mobile/src/retail/components/DraftDialog/DraftDialogContent.tsx +7 -0
  344. package/mobile/src/retail/model/ApplicationLeadFormTypes.ts +12 -0
  345. package/mobile/src/retail/utils/commonAspects.ts +64 -0
  346. package/mobile/src/retail/utils/formAspectsConfig.ts +6 -0
  347. package/mobile/src/retail/utils/yandexMetrika.ts +3 -0
  348. package/mobile/src/utils/getStepAspects.ts +71 -0
  349. package/package.json +2 -2
  350. package/src/components/ApplicationLeadForm/ApplicationLeadForm.tsx +1 -1
  351. package/src/components/ApplicationLeadForm/renderSubmitButton.tsx +20 -5
  352. package/src/components/ApplicationLeadForm/useApplicationLeadApi.tsx +98 -38
  353. package/src/components/CreditCardForm/CreditCardFormStep.tsx +13 -2
  354. package/src/components/CreditCardForm/FailedStatusContent.tsx +24 -7
  355. package/src/components/CreditCardForm/PendingStatusContent.tsx +24 -1
  356. package/src/components/CreditCardForm/ReworkStatusContent.tsx +14 -0
  357. package/src/components/CreditCardForm/StepsNavigationButtons.tsx +15 -2
  358. package/src/components/CreditCardForm/SuccessStatusCardContent.tsx +14 -0
  359. package/src/components/CreditCardForm/creditCardFormAspects.ts +9 -0
  360. package/src/components/CreditForm/FailedStatusContent.tsx +24 -7
  361. package/src/components/CreditForm/PendingStatusContent.tsx +26 -1
  362. package/src/components/CreditForm/ReworkStatusContent.tsx +15 -0
  363. package/src/components/CreditForm/StepsNavigationButtons.tsx +5 -95
  364. package/src/components/CreditForm/SuccessStatusContent.tsx +15 -0
  365. package/src/components/CreditForm/creditFormAspects.ts +35 -0
  366. package/src/components/DebitForm/DebitFormStep.tsx +13 -2
  367. package/src/components/DebitForm/StepsNavigationButtons.tsx +15 -2
  368. package/src/components/DebitForm/debitFormAspects.ts +7 -0
  369. package/src/retail/components/ConsentBkiDialog/ConsentBkiDialog.tsx +16 -2
  370. package/src/retail/components/ConsentBkiDialog/useConsentBkiDialog.tsx +93 -51
  371. package/src/retail/components/DraftDialog/DraftActionButton.tsx +6 -1
  372. package/src/retail/components/DraftDialog/DraftDialog.tsx +15 -0
  373. package/src/retail/components/DraftDialog/DraftDialogContent.tsx +7 -0
  374. package/src/retail/model/ApplicationLeadFormTypes.ts +12 -0
  375. package/src/retail/utils/commonAspects.ts +64 -0
  376. package/src/retail/utils/formAspectsConfig.ts +6 -0
  377. package/src/retail/utils/yandexMetrika.ts +3 -0
  378. package/src/utils/getStepAspects.ts +71 -0
  379. package/bundle/components/CreditForm/getYandexAspects.d.ts +0 -10
  380. package/dist/components/CreditForm/getYandexAspects.d.ts +0 -10
  381. package/dist/components/CreditForm/getYandexAspects.js +0 -38
  382. package/dist/components/CreditForm/getYandexAspects.js.map +0 -1
  383. package/lib/components/CreditForm/getYandexAspects.d.ts +0 -10
  384. package/lib/components/CreditForm/getYandexAspects.js +0 -35
  385. package/lib/components/CreditForm/getYandexAspects.js.map +0 -1
  386. package/mobile/bundle/components/CreditForm/getYandexAspects.d.ts +0 -10
  387. package/mobile/dist/components/CreditForm/getYandexAspects.d.ts +0 -10
  388. package/mobile/dist/components/CreditForm/getYandexAspects.js +0 -38
  389. package/mobile/dist/components/CreditForm/getYandexAspects.js.map +0 -1
  390. package/mobile/lib/components/CreditForm/getYandexAspects.d.ts +0 -10
  391. package/mobile/lib/components/CreditForm/getYandexAspects.js +0 -35
  392. package/mobile/lib/components/CreditForm/getYandexAspects.js.map +0 -1
  393. package/mobile/src/components/CreditForm/getYandexAspects.ts +0 -58
  394. package/src/components/CreditForm/getYandexAspects.ts +0 -58
@@ -1,6 +1,10 @@
1
+ import { handleAspects } from '../../../hooks/useAspects/handleAspects';
2
+ import { useAspects, type Aspects } from '../../../hooks/useAspects/useAspects';
1
3
  import { useDialog } from '../../../ui-kit/DialogManager/useDialog';
4
+ import { type PreventableEventWithTarget } from '../../../ui-kit/PreventableEvent';
2
5
  import { updateUserProfile } from '../../api/updateUserProfile';
3
6
  import { updateUserTask } from '../../api/updateUserTask';
7
+ import { getAspects } from '../../utils/commonAspects';
4
8
  import { VerifyPhoneDialog } from '../VerifyPhoneDialog/VerifyPhoneDialog';
5
9
  import { ConsentBkiDialog } from './ConsentBkiDialog';
6
10
 
@@ -10,71 +14,109 @@ type SubmitBkiConsentProps = {
10
14
  onFail?: () => void;
11
15
  taskId?: number;
12
16
  participantId?: string | number;
17
+ productType?: string;
13
18
  };
14
19
 
15
- export const useConsentBkiDialog = (onClose: () => void) => {
16
- const { open } = useDialog(ConsentBkiDialog);
17
- const verifyPhoneDialog = useDialog(VerifyPhoneDialog);
20
+ interface HandleSuccessVerifyParams {
21
+ profileId?: number;
22
+ taskId?: number;
23
+ participantId?: string | number;
24
+ aspects: Aspects;
25
+ onClose: () => void;
26
+ productType?: string;
27
+ }
28
+
29
+ interface HandleSubmitBkiConsentParams {
30
+ submitProps: SubmitBkiConsentProps;
31
+ verifyPhoneDialog: any;
32
+ aspects: Aspects;
33
+ onClose: () => void;
34
+ }
18
35
 
19
- const handleSuccessVerify =
20
- (profileId?: number, taskId?: number, participantId?: string | number) =>
21
- async (smsCode?: string) => {
22
- try {
23
- if (profileId) {
24
- await updateUserProfile({
25
- profile: {
26
- id: profileId,
36
+ const createHandleSuccessVerify =
37
+ ({
38
+ profileId,
39
+ taskId,
40
+ participantId,
41
+ aspects,
42
+ onClose,
43
+ productType,
44
+ }: HandleSuccessVerifyParams) =>
45
+ async (smsCode?: string) => {
46
+ try {
47
+ if (profileId) {
48
+ await updateUserProfile({
49
+ profile: {
50
+ id: profileId,
51
+ consentBkiFlg: true,
52
+ smsConsentBki: smsCode,
53
+ },
54
+ });
55
+ } else if (taskId && participantId) {
56
+ await updateUserTask({
57
+ task: {
58
+ id: taskId,
59
+ participant: {
60
+ id: participantId,
27
61
  consentBkiFlg: true,
28
62
  smsConsentBki: smsCode,
29
63
  },
30
- });
31
- } else if (taskId && participantId) {
32
- await updateUserTask({
33
- task: {
34
- id: taskId,
35
- participant: {
36
- id: participantId,
37
- consentBkiFlg: true,
38
- smsConsentBki: smsCode,
39
- },
40
- },
41
- sendToBank: false,
42
- taskKind: 'SHORT',
43
- });
44
- }
45
-
46
- onClose();
47
- } catch (ex) {
48
- console.log(ex);
49
- }
50
- };
51
-
52
- const handleSubmitBkiConsent =
53
- ({ phone, profileId, onFail, taskId, participantId }: SubmitBkiConsentProps) =>
54
- async (confirmStatus: string) => {
55
- if (confirmStatus === 'SIGNED' && phone) {
56
- verifyPhoneDialog.open({
57
- phone,
58
- consents: ['согласие на запрос информации в БКИ'],
59
- onSuccess: handleSuccessVerify(profileId, taskId, participantId),
60
- onFail,
64
+ },
65
+ sendToBank: false,
66
+ taskKind: 'SHORT',
61
67
  });
62
- } else {
63
- onClose();
64
68
  }
65
- };
69
+ handleAspects({
70
+ aspectsAttributes: getAspects('smsBki', productType),
71
+ aspects,
72
+ ev: {} as PreventableEventWithTarget,
73
+ });
66
74
 
67
- return {
68
- open: ({ phone, profileId, onFail, taskId, participantId }: SubmitBkiConsentProps) =>
69
- open({
70
- onSubmit: handleSubmitBkiConsent({
71
- phone,
75
+ onClose();
76
+ } catch (ex) {
77
+ console.log(ex);
78
+ }
79
+ };
80
+
81
+ const createHandleSubmitBkiConsent =
82
+ ({ submitProps, verifyPhoneDialog, aspects, onClose }: HandleSubmitBkiConsentParams) =>
83
+ async (confirmStatus: string) => {
84
+ const { phone, profileId, onFail, taskId, participantId, productType } = submitProps;
85
+ if (confirmStatus === 'SIGNED' && phone) {
86
+ verifyPhoneDialog.open({
87
+ phone,
88
+ consents: ['согласие на запрос информации в БКИ'],
89
+ onSuccess: createHandleSuccessVerify({
72
90
  profileId,
73
- onFail,
74
91
  taskId,
75
92
  participantId,
93
+ aspects,
94
+ onClose,
95
+ productType,
96
+ }),
97
+ onFail,
98
+ });
99
+ } else {
100
+ onClose();
101
+ }
102
+ };
103
+
104
+ export const useConsentBkiDialog = (onClose: () => void, productType?: string) => {
105
+ const { open } = useDialog(ConsentBkiDialog);
106
+ const verifyPhoneDialog = useDialog(VerifyPhoneDialog);
107
+ const aspects = useAspects();
108
+
109
+ return {
110
+ open: ({ phone, profileId, onFail, taskId, participantId }: SubmitBkiConsentProps) =>
111
+ open({
112
+ onSubmit: createHandleSubmitBkiConsent({
113
+ submitProps: { phone, profileId, onFail, taskId, participantId, productType },
114
+ verifyPhoneDialog,
115
+ aspects,
116
+ onClose,
76
117
  }),
77
118
  onClose,
119
+ productType,
78
120
  }),
79
121
  };
80
122
  };
@@ -1,9 +1,11 @@
1
1
  import { JSX } from '@redneckz/uni-jsx';
2
2
  import { type IconName } from '../../../icons/IconName';
3
+ import { type AspectsDef } from '../../../model/AspectsProps';
3
4
  import { type DescriptionProps, type TitleProps } from '../../../model/HeadlineType';
4
5
  import type { OnClickProps } from '../../../model/OnClickProps';
5
6
  import { Img } from '../../../ui-kit/Img/Img';
6
7
  import { Text } from '../../../ui-kit/Text/Text';
8
+ import { getAspectsAttributes } from '../../../utils/dataAttributes';
7
9
  import { noop } from '../../../utils/noop';
8
10
 
9
11
  export type DraftActionButtonProps = TitleProps &
@@ -11,15 +13,18 @@ export type DraftActionButtonProps = TitleProps &
11
13
  OnClickProps & {
12
14
  icon: IconName;
13
15
  name?: string;
16
+ data?: AspectsDef[];
14
17
  };
15
18
 
16
19
  export const DraftActionButton = JSX<DraftActionButtonProps>(
17
- ({ title, icon, description, name, onClick = noop }) => (
20
+ ({ title, icon, description, name, onClick = noop, data }) => (
18
21
  <button
19
22
  className="flex gap-lg items-center border border-gray/30 rounded-xl cursor-pointer p-4 hover:border-green"
20
23
  type="button"
21
24
  onClick={onClick}
22
25
  data-test-id={name}
26
+ // eslint-disable-next-line react/jsx-props-no-spreading
27
+ {...getAspectsAttributes(data)}
23
28
  >
24
29
  <Img image={{ icon, iconVersion: 'normal' }} width="78" height="78" />
25
30
  <div className="flex flex-col items-start gap-xs md:w-72 md:mr-lg">
@@ -9,6 +9,7 @@ import { sendMessage } from '../../api/sendMessage';
9
9
  import { useRetailFormStore } from '../../hooks/useRetailFormStore';
10
10
  import { type DraftTaskType } from '../../model/DraftTaskType';
11
11
  import { checkNewMicroservice } from '../../utils/checkNewMicroservice';
12
+ import { getAspects } from '../../utils/commonAspects';
12
13
  import { creditProgramCodeToProductIdMap, getCreditProgramTaskType } from './creditProgramCodes';
13
14
  import { DraftDialogContent } from './DraftDialogContent';
14
15
  import { parseDraftTask } from './parseDraftTask';
@@ -40,6 +41,7 @@ export const DraftDialog = JSX<DraftDialogProps>(function ({
40
41
  );
41
42
  const currentParticipant = participant || participants?.[0];
42
43
  const { id: participantId, profile } = currentParticipant || {};
44
+
43
45
  const handleGoToDraft = useCallback(() => {
44
46
  const taskFromDraft = parseDraftTask(task);
45
47
  retailFormStore.participantId = participantId ?? null;
@@ -67,6 +69,17 @@ export const DraftDialog = JSX<DraftDialogProps>(function ({
67
69
  navigator.assign(productData.newTaskLink);
68
70
  }, [task.id, productData.newTaskLink, isNewMicroservice]);
69
71
 
72
+ let productType: string;
73
+ if (isDebit) {
74
+ productType = 'debitCard';
75
+ } else if (taskType === 'card') {
76
+ productType = 'creditCard';
77
+ } else {
78
+ productType = 'credit';
79
+ }
80
+ const draftAspects = getAspects('draft', productType);
81
+ const currentAspects = getAspects('current', productType);
82
+
70
83
  return (
71
84
  <Dialog onClose={onClose}>
72
85
  <DraftDialogContent
@@ -76,6 +89,8 @@ export const DraftDialog = JSX<DraftDialogProps>(function ({
76
89
  handleGoToDraft={handleGoToDraft}
77
90
  handleGoToNewTask={handleGoToNewTask}
78
91
  onClose={onClose}
92
+ draftAspects={draftAspects}
93
+ currentAspects={currentAspects}
79
94
  />
80
95
  </Dialog>
81
96
  );
@@ -1,4 +1,5 @@
1
1
  import { JSX } from '@redneckz/uni-jsx';
2
+ import { type AspectsDef } from '../../../model/AspectsProps';
2
3
  import { type OnCloseProps } from '../../../model/OnCloseProps';
3
4
  import { Heading } from '../../../ui-kit/Heading/Heading';
4
5
  import { formatDate } from '../../../utils/formatDate';
@@ -11,6 +12,8 @@ export interface DraftDialogContentProps extends OnCloseProps {
11
12
  isFromLead: boolean;
12
13
  handleGoToDraft: () => void;
13
14
  handleGoToNewTask: () => void;
15
+ draftAspects?: AspectsDef[];
16
+ currentAspects?: AspectsDef[];
14
17
  }
15
18
 
16
19
  export const DraftDialogContent = JSX<DraftDialogContentProps>(function ({
@@ -20,6 +23,8 @@ export const DraftDialogContent = JSX<DraftDialogContentProps>(function ({
20
23
  handleGoToDraft,
21
24
  handleGoToNewTask,
22
25
  onClose,
26
+ draftAspects,
27
+ currentAspects,
23
28
  }) {
24
29
  return (
25
30
  <div className="flex flex-col gap-lg items-center mt-xs mx-6xl">
@@ -35,6 +40,7 @@ export const DraftDialogContent = JSX<DraftDialogContentProps>(function ({
35
40
  description={createdDate ? `Черновик от ${formatDate(new Date(createdDate))}` : ''}
36
41
  onClick={handleGoToDraft}
37
42
  name="go-to-draft-button"
43
+ data={draftAspects}
38
44
  />
39
45
  <DraftActionButton
40
46
  title={isFromLead ? 'Продолжить заполнение текущей заявки' : 'Создать новую заявку'}
@@ -42,6 +48,7 @@ export const DraftDialogContent = JSX<DraftDialogContentProps>(function ({
42
48
  description={productData.description}
43
49
  onClick={isFromLead ? onClose : handleGoToNewTask}
44
50
  name="go-to-current-task-button"
51
+ data={isFromLead ? currentAspects : undefined}
45
52
  />
46
53
  </div>
47
54
  </div>
@@ -1,7 +1,10 @@
1
+ import { type Aspects } from '../../hooks/useAspects/useAspects';
1
2
  import { type DialogOptions } from '../../ui-kit/DialogManager/DialogAction';
2
3
  import { type VerifyPhoneDialogProps } from '../../ui-kit/VerifyPhoneDialogLayout/VerfiyPhoneDialogLayout';
3
4
  import { type Nullable } from '../../utils/Nullable';
4
5
  import { type MarketingInfo } from '../api/updateUserTask';
6
+ import { type useConsentBkiDialog } from '../components/ConsentBkiDialog/useConsentBkiDialog';
7
+ import { type useDraftDialog } from '../components/DraftDialog/useDraftDialog';
5
8
  import { type LeadFormState } from './LeadFormState';
6
9
  import { type ReferalData } from './ReferalData';
7
10
 
@@ -17,6 +20,7 @@ export interface UserData {
17
20
  export type ProductType = 'credit' | 'creditCard' | 'debitCard';
18
21
 
19
22
  export interface CommonLeadProps {
23
+ aspects: Aspects;
20
24
  programId: string;
21
25
  userId?: string | number;
22
26
  productType: ProductType;
@@ -54,3 +58,11 @@ export interface UpdateUserDataNewMicroserviceProps extends BaseUpdateUserDataPr
54
58
  participantId: string | number;
55
59
  userId?: string | number;
56
60
  }
61
+
62
+ export interface OldMicroserviceProps {
63
+ common: Omit<CommonLeadProps, 'userId'> & { profileId: number };
64
+ taskData: TaskDataProps;
65
+ goToNextStep: () => void;
66
+ consentBkiDialog: ReturnType<typeof useConsentBkiDialog>;
67
+ draftDialog: ReturnType<typeof useDraftDialog>;
68
+ }
@@ -0,0 +1,64 @@
1
+ import { type AspectsDef } from '../../model/AspectsProps';
2
+ import { YANDEX_ID } from './yandexMetrika';
3
+
4
+ const ASPECTS_MAP: Record<string, Record<string, string>> = {
5
+ leadForm: {
6
+ debitCard: 'debit_lead_form',
7
+ creditCard: 'card_lead_form',
8
+ default: 'lead_form',
9
+ },
10
+ draft: {
11
+ debitCard: 'debit_draft_app',
12
+ creditCard: 'card_draft_app',
13
+ default: 'draft_app',
14
+ },
15
+ smsAuth: {
16
+ debitCard: 'debit_sms_auth',
17
+ creditCard: 'card_sms_auth',
18
+ default: 'sms_auth',
19
+ },
20
+ consentBki: {
21
+ creditCard: 'card_consent_bki',
22
+ default: 'consent_bki',
23
+ },
24
+ smsBki: {
25
+ creditCard: 'card_sms_bki',
26
+ default: 'sms_bki',
27
+ },
28
+ current: {
29
+ debitCard: 'debit_current_app',
30
+ creditCard: 'card_current_app',
31
+ default: 'current_app',
32
+ },
33
+ timer: {
34
+ creditCard: 'card_timer',
35
+ default: 'timer',
36
+ },
37
+ timerEnd: {
38
+ creditCard: 'card_timer_end',
39
+ default: 'timer_end',
40
+ },
41
+ preDecision: {
42
+ creditCard: 'card_pre_decision',
43
+ default: 'pre_decision',
44
+ },
45
+ revision: {
46
+ creditCard: 'card_revision',
47
+ default: 'revision',
48
+ },
49
+ refuse: {
50
+ creditCard: 'card_refuse',
51
+ default: 'refuse',
52
+ },
53
+ };
54
+
55
+ export const getAspects = (aspectType: string, productType?: string): AspectsDef[] => {
56
+ const aspectForType = ASPECTS_MAP[aspectType];
57
+
58
+ return [
59
+ {
60
+ aspectName: 'ymReachGoal',
61
+ params: { yandexId: YANDEX_ID, targetName: aspectForType[productType || 'default'] },
62
+ },
63
+ ];
64
+ };
@@ -0,0 +1,6 @@
1
+ export interface StepAspectsConfig {
2
+ ymTargetName: string;
3
+ snowplowEventAction?: string;
4
+ snowplowEventCategory?: string;
5
+ snowplowEventValueText?: string;
6
+ }
@@ -0,0 +1,3 @@
1
+ import { projectSettings } from '../../ProjectSettings';
2
+
3
+ export const YANDEX_ID = projectSettings.YANDEX_METRIKA_ID || '92511315';
@@ -0,0 +1,71 @@
1
+ import { getCreditInfo } from '../components/CreditForm/getCreditInfo';
2
+ import { type AspectsDef } from '../model/AspectsProps';
3
+ import { type StepAspectsConfig } from '../retail/utils/formAspectsConfig';
4
+ import { YANDEX_ID } from '../retail/utils/yandexMetrika';
5
+
6
+ interface YandexAspectsParams {
7
+ step: number;
8
+ programId?: string | null;
9
+ productType?: string;
10
+ paymentSystem?: string;
11
+ stepsConfig: StepAspectsConfig[];
12
+ }
13
+
14
+ const getVisitParams = (
15
+ programId?: string | null,
16
+ productType?: string,
17
+ paymentSystem?: string,
18
+ ): Record<string, unknown> => {
19
+ const creditInfo = getCreditInfo(programId ?? null);
20
+ const productName = creditInfo?.name || '';
21
+ const productTypeValue = productType ?? '';
22
+
23
+ if (paymentSystem && productType !== 'credit') {
24
+ return {
25
+ [productTypeValue]: {
26
+ [productName]: paymentSystem,
27
+ },
28
+ };
29
+ } else {
30
+ return {
31
+ [productTypeValue]: productName,
32
+ };
33
+ }
34
+ };
35
+
36
+ export const getStepAspects = ({
37
+ step,
38
+ programId,
39
+ productType,
40
+ paymentSystem,
41
+ stepsConfig,
42
+ }: YandexAspectsParams): AspectsDef[] => {
43
+ const config = stepsConfig[step];
44
+ if (!config) {
45
+ return [];
46
+ }
47
+ const visitParams = getVisitParams(programId, productType, paymentSystem);
48
+ const aspects: AspectsDef[] = [];
49
+
50
+ aspects.push({
51
+ aspectName: 'ymReachGoal',
52
+ params: {
53
+ yandexId: YANDEX_ID,
54
+ targetName: config.ymTargetName,
55
+ ...visitParams,
56
+ },
57
+ });
58
+
59
+ if (config.snowplowEventAction) {
60
+ aspects.push({
61
+ aspectName: 'snowplowEvent',
62
+ params: {
63
+ eventAction: config.snowplowEventAction,
64
+ eventCategory: config.snowplowEventCategory || 'naturalCredits',
65
+ eventValueText: config.snowplowEventValueText || '',
66
+ },
67
+ });
68
+ }
69
+
70
+ return aspects;
71
+ };
@@ -1,10 +0,0 @@
1
- import { type AspectsDef } from '../../model/AspectsProps';
2
- interface YandexAspectsParams {
3
- step: number;
4
- programId?: string | null;
5
- productType?: string;
6
- paymentSystem?: string;
7
- aspectsData: AspectsDef[][];
8
- }
9
- export declare const getYandexAspects: ({ step, programId, productType, paymentSystem, aspectsData, }: YandexAspectsParams) => AspectsDef[];
10
- export {};
@@ -1,10 +0,0 @@
1
- import { type AspectsDef } from '../../model/AspectsProps';
2
- interface YandexAspectsParams {
3
- step: number;
4
- programId?: string | null;
5
- productType?: string;
6
- paymentSystem?: string;
7
- aspectsData: AspectsDef[][];
8
- }
9
- export declare const getYandexAspects: ({ step, programId, productType, paymentSystem, aspectsData, }: YandexAspectsParams) => AspectsDef[];
10
- export {};
@@ -1,38 +0,0 @@
1
- Object.defineProperty(exports, "__esModule", { value: true });
2
- exports.getYandexAspects = void 0;
3
- const getCreditInfo_1 = require("./getCreditInfo");
4
- const getVisitParams = (programId, productType, paymentSystem) => {
5
- const creditInfo = (0, getCreditInfo_1.getCreditInfo)(programId ?? null);
6
- const productName = creditInfo?.name || '';
7
- const productTypeValue = productType ?? '';
8
- if (paymentSystem && productType !== 'credit') {
9
- return {
10
- [productTypeValue]: {
11
- [productName]: paymentSystem,
12
- },
13
- };
14
- }
15
- else {
16
- return {
17
- [productTypeValue]: productName,
18
- };
19
- }
20
- };
21
- const getYandexAspects = ({ step, programId, productType, paymentSystem, aspectsData, }) => {
22
- const aspects = aspectsData[step] || [];
23
- const visitParams = getVisitParams(programId, productType, paymentSystem);
24
- return aspects.map((aspect) => {
25
- if (aspect.aspectName === 'ymReachGoal') {
26
- return {
27
- ...aspect,
28
- params: {
29
- ...aspect.params,
30
- ...visitParams,
31
- },
32
- };
33
- }
34
- return aspect;
35
- });
36
- };
37
- exports.getYandexAspects = getYandexAspects;
38
- //# sourceMappingURL=getYandexAspects.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"getYandexAspects.js","sourceRoot":"","sources":["../../../src/components/CreditForm/getYandexAspects.ts"],"names":[],"mappings":";;AAEA,mDAAgD;AAUhD,MAAM,cAAc,GAAG,CACrB,SAAyB,EACzB,WAAoB,EACpB,aAAsB,EACG,EAAE;IAC3B,MAAM,UAAU,GAAG,IAAA,6BAAa,EAAC,SAAS,IAAI,IAAI,CAAC,CAAC;IACpD,MAAM,WAAW,GAAG,UAAU,EAAE,IAAI,IAAI,EAAE,CAAC;IAC3C,MAAM,gBAAgB,GAAG,WAAW,IAAI,EAAE,CAAC;IAE3C,IAAI,aAAa,IAAI,WAAW,KAAK,QAAQ,EAAE;QAC7C,OAAO;YACL,CAAC,gBAAgB,CAAC,EAAE;gBAClB,CAAC,WAAW,CAAC,EAAE,aAAa;aAC7B;SACF,CAAC;KACH;SAAM;QACL,OAAO;YACL,CAAC,gBAAgB,CAAC,EAAE,WAAW;SAChC,CAAC;KACH;AACH,CAAC,CAAC;AAEK,MAAM,gBAAgB,GAAG,CAAC,EAC/B,IAAI,EACJ,SAAS,EACT,WAAW,EACX,aAAa,EACb,WAAW,GACS,EAAgB,EAAE;IACtC,MAAM,OAAO,GAAG,WAAW,CAAC,IAAI,CAAC,IAAI,EAAE,CAAC;IACxC,MAAM,WAAW,GAAG,cAAc,CAAC,SAAS,EAAE,WAAW,EAAE,aAAa,CAAC,CAAC;IAE1E,OAAO,OAAO,CAAC,GAAG,CAAC,CAAC,MAAM,EAAE,EAAE;QAC5B,IAAI,MAAM,CAAC,UAAU,KAAK,aAAa,EAAE;YACvC,OAAO;gBACL,GAAG,MAAM;gBACT,MAAM,EAAE;oBACN,GAAG,MAAM,CAAC,MAAM;oBAChB,GAAG,WAAW;iBACD;aAChB,CAAC;SACH;QAED,OAAO,MAAM,CAAC;IAChB,CAAC,CAAC,CAAC;AACL,CAAC,CAAC;AAvBW,QAAA,gBAAgB,oBAuB3B"}
@@ -1,10 +0,0 @@
1
- import { type AspectsDef } from '../../model/AspectsProps';
2
- interface YandexAspectsParams {
3
- step: number;
4
- programId?: string | null;
5
- productType?: string;
6
- paymentSystem?: string;
7
- aspectsData: AspectsDef[][];
8
- }
9
- export declare const getYandexAspects: ({ step, programId, productType, paymentSystem, aspectsData, }: YandexAspectsParams) => AspectsDef[];
10
- export {};
@@ -1,35 +0,0 @@
1
- import { getCreditInfo } from './getCreditInfo.js';
2
- const getVisitParams = (programId, productType, paymentSystem) => {
3
- const creditInfo = getCreditInfo(programId ?? null);
4
- const productName = creditInfo?.name || '';
5
- const productTypeValue = productType ?? '';
6
- if (paymentSystem && productType !== 'credit') {
7
- return {
8
- [productTypeValue]: {
9
- [productName]: paymentSystem,
10
- },
11
- };
12
- }
13
- else {
14
- return {
15
- [productTypeValue]: productName,
16
- };
17
- }
18
- };
19
- export const getYandexAspects = ({ step, programId, productType, paymentSystem, aspectsData, }) => {
20
- const aspects = aspectsData[step] || [];
21
- const visitParams = getVisitParams(programId, productType, paymentSystem);
22
- return aspects.map((aspect) => {
23
- if (aspect.aspectName === 'ymReachGoal') {
24
- return {
25
- ...aspect,
26
- params: {
27
- ...aspect.params,
28
- ...visitParams,
29
- },
30
- };
31
- }
32
- return aspect;
33
- });
34
- };
35
- //# sourceMappingURL=getYandexAspects.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"getYandexAspects.js","sourceRoot":"","sources":["../../../src/components/CreditForm/getYandexAspects.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAUhD,MAAM,cAAc,GAAG,CACrB,SAAyB,EACzB,WAAoB,EACpB,aAAsB,EACG,EAAE;IAC3B,MAAM,UAAU,GAAG,aAAa,CAAC,SAAS,IAAI,IAAI,CAAC,CAAC;IACpD,MAAM,WAAW,GAAG,UAAU,EAAE,IAAI,IAAI,EAAE,CAAC;IAC3C,MAAM,gBAAgB,GAAG,WAAW,IAAI,EAAE,CAAC;IAE3C,IAAI,aAAa,IAAI,WAAW,KAAK,QAAQ,EAAE;QAC7C,OAAO;YACL,CAAC,gBAAgB,CAAC,EAAE;gBAClB,CAAC,WAAW,CAAC,EAAE,aAAa;aAC7B;SACF,CAAC;KACH;SAAM;QACL,OAAO;YACL,CAAC,gBAAgB,CAAC,EAAE,WAAW;SAChC,CAAC;KACH;AACH,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAAC,EAC/B,IAAI,EACJ,SAAS,EACT,WAAW,EACX,aAAa,EACb,WAAW,GACS,EAAgB,EAAE;IACtC,MAAM,OAAO,GAAG,WAAW,CAAC,IAAI,CAAC,IAAI,EAAE,CAAC;IACxC,MAAM,WAAW,GAAG,cAAc,CAAC,SAAS,EAAE,WAAW,EAAE,aAAa,CAAC,CAAC;IAE1E,OAAO,OAAO,CAAC,GAAG,CAAC,CAAC,MAAM,EAAE,EAAE;QAC5B,IAAI,MAAM,CAAC,UAAU,KAAK,aAAa,EAAE;YACvC,OAAO;gBACL,GAAG,MAAM;gBACT,MAAM,EAAE;oBACN,GAAG,MAAM,CAAC,MAAM;oBAChB,GAAG,WAAW;iBACD;aAChB,CAAC;SACH;QAED,OAAO,MAAM,CAAC;IAChB,CAAC,CAAC,CAAC;AACL,CAAC,CAAC"}
@@ -1,10 +0,0 @@
1
- import { type AspectsDef } from '../../model/AspectsProps';
2
- interface YandexAspectsParams {
3
- step: number;
4
- programId?: string | null;
5
- productType?: string;
6
- paymentSystem?: string;
7
- aspectsData: AspectsDef[][];
8
- }
9
- export declare const getYandexAspects: ({ step, programId, productType, paymentSystem, aspectsData, }: YandexAspectsParams) => AspectsDef[];
10
- export {};
@@ -1,10 +0,0 @@
1
- import { type AspectsDef } from '../../model/AspectsProps';
2
- interface YandexAspectsParams {
3
- step: number;
4
- programId?: string | null;
5
- productType?: string;
6
- paymentSystem?: string;
7
- aspectsData: AspectsDef[][];
8
- }
9
- export declare const getYandexAspects: ({ step, programId, productType, paymentSystem, aspectsData, }: YandexAspectsParams) => AspectsDef[];
10
- export {};
@@ -1,38 +0,0 @@
1
- Object.defineProperty(exports, "__esModule", { value: true });
2
- exports.getYandexAspects = void 0;
3
- const getCreditInfo_1 = require("./getCreditInfo");
4
- const getVisitParams = (programId, productType, paymentSystem) => {
5
- const creditInfo = (0, getCreditInfo_1.getCreditInfo)(programId ?? null);
6
- const productName = creditInfo?.name || '';
7
- const productTypeValue = productType ?? '';
8
- if (paymentSystem && productType !== 'credit') {
9
- return {
10
- [productTypeValue]: {
11
- [productName]: paymentSystem,
12
- },
13
- };
14
- }
15
- else {
16
- return {
17
- [productTypeValue]: productName,
18
- };
19
- }
20
- };
21
- const getYandexAspects = ({ step, programId, productType, paymentSystem, aspectsData, }) => {
22
- const aspects = aspectsData[step] || [];
23
- const visitParams = getVisitParams(programId, productType, paymentSystem);
24
- return aspects.map((aspect) => {
25
- if (aspect.aspectName === 'ymReachGoal') {
26
- return {
27
- ...aspect,
28
- params: {
29
- ...aspect.params,
30
- ...visitParams,
31
- },
32
- };
33
- }
34
- return aspect;
35
- });
36
- };
37
- exports.getYandexAspects = getYandexAspects;
38
- //# sourceMappingURL=getYandexAspects.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"getYandexAspects.js","sourceRoot":"","sources":["../../../src/components/CreditForm/getYandexAspects.ts"],"names":[],"mappings":";;AAEA,mDAAgD;AAUhD,MAAM,cAAc,GAAG,CACrB,SAAyB,EACzB,WAAoB,EACpB,aAAsB,EACG,EAAE;IAC3B,MAAM,UAAU,GAAG,IAAA,6BAAa,EAAC,SAAS,IAAI,IAAI,CAAC,CAAC;IACpD,MAAM,WAAW,GAAG,UAAU,EAAE,IAAI,IAAI,EAAE,CAAC;IAC3C,MAAM,gBAAgB,GAAG,WAAW,IAAI,EAAE,CAAC;IAE3C,IAAI,aAAa,IAAI,WAAW,KAAK,QAAQ,EAAE;QAC7C,OAAO;YACL,CAAC,gBAAgB,CAAC,EAAE;gBAClB,CAAC,WAAW,CAAC,EAAE,aAAa;aAC7B;SACF,CAAC;KACH;SAAM;QACL,OAAO;YACL,CAAC,gBAAgB,CAAC,EAAE,WAAW;SAChC,CAAC;KACH;AACH,CAAC,CAAC;AAEK,MAAM,gBAAgB,GAAG,CAAC,EAC/B,IAAI,EACJ,SAAS,EACT,WAAW,EACX,aAAa,EACb,WAAW,GACS,EAAgB,EAAE;IACtC,MAAM,OAAO,GAAG,WAAW,CAAC,IAAI,CAAC,IAAI,EAAE,CAAC;IACxC,MAAM,WAAW,GAAG,cAAc,CAAC,SAAS,EAAE,WAAW,EAAE,aAAa,CAAC,CAAC;IAE1E,OAAO,OAAO,CAAC,GAAG,CAAC,CAAC,MAAM,EAAE,EAAE;QAC5B,IAAI,MAAM,CAAC,UAAU,KAAK,aAAa,EAAE;YACvC,OAAO;gBACL,GAAG,MAAM;gBACT,MAAM,EAAE;oBACN,GAAG,MAAM,CAAC,MAAM;oBAChB,GAAG,WAAW;iBACD;aAChB,CAAC;SACH;QAED,OAAO,MAAM,CAAC;IAChB,CAAC,CAAC,CAAC;AACL,CAAC,CAAC;AAvBW,QAAA,gBAAgB,oBAuB3B"}
@@ -1,10 +0,0 @@
1
- import { type AspectsDef } from '../../model/AspectsProps';
2
- interface YandexAspectsParams {
3
- step: number;
4
- programId?: string | null;
5
- productType?: string;
6
- paymentSystem?: string;
7
- aspectsData: AspectsDef[][];
8
- }
9
- export declare const getYandexAspects: ({ step, programId, productType, paymentSystem, aspectsData, }: YandexAspectsParams) => AspectsDef[];
10
- export {};