@redneckz/wildless-cms-uni-blocks 0.14.997 → 0.14.999

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 (461) hide show
  1. package/bundle/api/getSubmitBody.d.ts +1636 -244
  2. package/bundle/blocks.schema.json +1 -1
  3. package/bundle/bundle.umd.js +408 -6
  4. package/bundle/bundle.umd.min.js +1 -1
  5. package/bundle/components/CalculatorRko/CalculatorRko.d.ts +5 -0
  6. package/bundle/components/CalculatorRko/CalculatorRkoContent.d.ts +76 -0
  7. package/bundle/components/CalculatorRko/constants.d.ts +25 -0
  8. package/bundle/components/CalculatorRko/filterByClientType.d.ts +1 -0
  9. package/bundle/components/CalculatorRko/getCalculatedCommission.d.ts +9 -0
  10. package/bundle/components/CalculatorRko/getInitialRkoTariffsParams.d.ts +3 -0
  11. package/bundle/components/CalculatorRko/getRkoCalculatorParams.d.ts +2 -0
  12. package/bundle/components/CalculatorRko/markBestTariff.d.ts +5 -0
  13. package/bundle/components/CalculatorRko/mergeTariffData.d.ts +3 -0
  14. package/bundle/components/CalculatorRko/renderCommissionSum.d.ts +2 -0
  15. package/bundle/components/RkoTariffCardsTable/RkoTariffCard.d.ts +9 -0
  16. package/bundle/components/RkoTariffCardsTable/RkoTariffCardsTable.d.ts +5 -0
  17. package/bundle/components/RkoTariffCardsTable/RkoTariffCardsTableContent.d.ts +15 -0
  18. package/bundle/components/RkoTariffCardsTable/constants.d.ts +3 -0
  19. package/bundle/components/RkoTariffCardsTable/getCommissionTypes.d.ts +3 -0
  20. package/bundle/components/RkoTariffCardsTable/renderDesktopCard.d.ts +2 -0
  21. package/bundle/components/RkoTariffCardsTable/renderHiddenCommission.d.ts +9 -0
  22. package/bundle/components/RkoTariffCardsTable/renderMobileCard.d.ts +12 -0
  23. package/bundle/components/RkoTariffCardsTable/renderRecommendedLabel.d.ts +1 -0
  24. package/bundle/components/RkoTariffCardsTable/renderRkoTariffsTableHeader.d.ts +6 -0
  25. package/bundle/model/FormTypeFieldDef.d.ts +1 -1
  26. package/bundle/ui-kit/Button/ButtonTitle.d.ts +5 -1
  27. package/bundle/ui-kit/Calculator/CalculatorStyle.d.ts +2 -0
  28. package/bundle/ui-kit/Calculator/renderCountInput.d.ts +2 -0
  29. package/bundle/ui-kit/Foldable/DefaultFoldButton.d.ts +1 -0
  30. package/bundle/ui-kit/Text/Text.d.ts +2 -1
  31. package/dist/api/getSubmitBody.d.ts +1636 -244
  32. package/dist/api/getSubmitBody.js +6 -0
  33. package/dist/api/getSubmitBody.js.map +1 -1
  34. package/dist/components/Blocks.js +4 -0
  35. package/dist/components/Blocks.js.map +1 -1
  36. package/dist/components/Blocks.mobile.js +4 -0
  37. package/dist/components/Blocks.mobile.js.map +1 -1
  38. package/dist/components/CalculatorRko/CalculatorRko.d.ts +5 -0
  39. package/dist/components/CalculatorRko/CalculatorRko.js +75 -0
  40. package/dist/components/CalculatorRko/CalculatorRko.js.map +1 -0
  41. package/dist/components/CalculatorRko/CalculatorRkoContent.d.ts +76 -0
  42. package/dist/components/CalculatorRko/CalculatorRkoContent.js +2 -0
  43. package/dist/components/CalculatorRko/CalculatorRkoContent.js.map +1 -0
  44. package/dist/components/CalculatorRko/constants.d.ts +25 -0
  45. package/dist/components/CalculatorRko/constants.js +54 -0
  46. package/dist/components/CalculatorRko/constants.js.map +1 -0
  47. package/dist/components/CalculatorRko/filterByClientType.d.ts +1 -0
  48. package/dist/components/CalculatorRko/filterByClientType.js +27 -0
  49. package/dist/components/CalculatorRko/filterByClientType.js.map +1 -0
  50. package/dist/components/CalculatorRko/getCalculatedCommission.d.ts +9 -0
  51. package/dist/components/CalculatorRko/getCalculatedCommission.js +106 -0
  52. package/dist/components/CalculatorRko/getCalculatedCommission.js.map +1 -0
  53. package/dist/components/CalculatorRko/getInitialRkoTariffsParams.d.ts +3 -0
  54. package/dist/components/CalculatorRko/getInitialRkoTariffsParams.js +15 -0
  55. package/dist/components/CalculatorRko/getInitialRkoTariffsParams.js.map +1 -0
  56. package/dist/components/CalculatorRko/getRkoCalculatorParams.d.ts +2 -0
  57. package/dist/components/CalculatorRko/getRkoCalculatorParams.js +23 -0
  58. package/dist/components/CalculatorRko/getRkoCalculatorParams.js.map +1 -0
  59. package/dist/components/CalculatorRko/markBestTariff.d.ts +5 -0
  60. package/dist/components/CalculatorRko/markBestTariff.js +15 -0
  61. package/dist/components/CalculatorRko/markBestTariff.js.map +1 -0
  62. package/dist/components/CalculatorRko/mergeTariffData.d.ts +3 -0
  63. package/dist/components/CalculatorRko/mergeTariffData.js +26 -0
  64. package/dist/components/CalculatorRko/mergeTariffData.js.map +1 -0
  65. package/dist/components/CalculatorRko/renderCommissionSum.d.ts +2 -0
  66. package/dist/components/CalculatorRko/renderCommissionSum.js +8 -0
  67. package/dist/components/CalculatorRko/renderCommissionSum.js.map +1 -0
  68. package/dist/components/RkoTariffCardsTable/RkoTariffCard.d.ts +9 -0
  69. package/dist/components/RkoTariffCardsTable/RkoTariffCard.js +41 -0
  70. package/dist/components/RkoTariffCardsTable/RkoTariffCard.js.map +1 -0
  71. package/dist/components/RkoTariffCardsTable/RkoTariffCardsTable.d.ts +5 -0
  72. package/dist/components/RkoTariffCardsTable/RkoTariffCardsTable.js +22 -0
  73. package/dist/components/RkoTariffCardsTable/RkoTariffCardsTable.js.map +1 -0
  74. package/dist/components/RkoTariffCardsTable/RkoTariffCardsTableContent.d.ts +15 -0
  75. package/dist/components/RkoTariffCardsTable/RkoTariffCardsTableContent.js +2 -0
  76. package/dist/components/RkoTariffCardsTable/RkoTariffCardsTableContent.js.map +1 -0
  77. package/dist/components/RkoTariffCardsTable/constants.d.ts +3 -0
  78. package/dist/components/RkoTariffCardsTable/constants.js +20 -0
  79. package/dist/components/RkoTariffCardsTable/constants.js.map +1 -0
  80. package/dist/components/RkoTariffCardsTable/getCommissionTypes.d.ts +3 -0
  81. package/dist/components/RkoTariffCardsTable/getCommissionTypes.js +11 -0
  82. package/dist/components/RkoTariffCardsTable/getCommissionTypes.js.map +1 -0
  83. package/dist/components/RkoTariffCardsTable/renderDesktopCard.d.ts +2 -0
  84. package/dist/components/RkoTariffCardsTable/renderDesktopCard.js +7 -0
  85. package/dist/components/RkoTariffCardsTable/renderDesktopCard.js.map +1 -0
  86. package/dist/components/RkoTariffCardsTable/renderHiddenCommission.d.ts +9 -0
  87. package/dist/components/RkoTariffCardsTable/renderHiddenCommission.js +9 -0
  88. package/dist/components/RkoTariffCardsTable/renderHiddenCommission.js.map +1 -0
  89. package/dist/components/RkoTariffCardsTable/renderMobileCard.d.ts +12 -0
  90. package/dist/components/RkoTariffCardsTable/renderMobileCard.js +22 -0
  91. package/dist/components/RkoTariffCardsTable/renderMobileCard.js.map +1 -0
  92. package/dist/components/RkoTariffCardsTable/renderRecommendedLabel.d.ts +1 -0
  93. package/dist/components/RkoTariffCardsTable/renderRecommendedLabel.js +9 -0
  94. package/dist/components/RkoTariffCardsTable/renderRecommendedLabel.js.map +1 -0
  95. package/dist/components/RkoTariffCardsTable/renderRkoTariffsTableHeader.d.ts +6 -0
  96. package/dist/components/RkoTariffCardsTable/renderRkoTariffsTableHeader.js +11 -0
  97. package/dist/components/RkoTariffCardsTable/renderRkoTariffsTableHeader.js.map +1 -0
  98. package/dist/model/FormTypeFieldDef.d.ts +1 -1
  99. package/dist/ui-kit/Button/ButtonTitle.d.ts +5 -1
  100. package/dist/ui-kit/Button/ButtonTitle.js +1 -1
  101. package/dist/ui-kit/Button/ButtonTitle.js.map +1 -1
  102. package/dist/ui-kit/Calculator/CalculatorStyle.d.ts +2 -0
  103. package/dist/ui-kit/Calculator/CalculatorStyle.js +2 -0
  104. package/dist/ui-kit/Calculator/CalculatorStyle.js.map +1 -1
  105. package/dist/ui-kit/Calculator/renderCountInput.d.ts +2 -0
  106. package/dist/ui-kit/Calculator/renderCountInput.js +8 -0
  107. package/dist/ui-kit/Calculator/renderCountInput.js.map +1 -0
  108. package/dist/ui-kit/Foldable/DefaultFoldButton.d.ts +1 -0
  109. package/dist/ui-kit/Foldable/DefaultFoldButton.js +4 -1
  110. package/dist/ui-kit/Foldable/DefaultFoldButton.js.map +1 -1
  111. package/dist/ui-kit/Text/Text.d.ts +2 -1
  112. package/dist/ui-kit/Text/Text.js +1 -1
  113. package/dist/ui-kit/Text/Text.js.map +1 -1
  114. package/lib/api/getSubmitBody.d.ts +1636 -244
  115. package/lib/api/getSubmitBody.js +6 -0
  116. package/lib/api/getSubmitBody.js.map +1 -1
  117. package/lib/common.css +1 -1
  118. package/lib/components/ApplicationForm/ApplicationForm.fixture.d.ts +1 -0
  119. package/lib/components/Blocks.js +4 -0
  120. package/lib/components/Blocks.js.map +1 -1
  121. package/lib/components/Blocks.mobile.js +4 -0
  122. package/lib/components/Blocks.mobile.js.map +1 -1
  123. package/lib/components/CalculatorRko/CalculatorRko.d.ts +5 -0
  124. package/lib/components/CalculatorRko/CalculatorRko.fixture.d.ts +6 -0
  125. package/lib/components/CalculatorRko/CalculatorRko.fixture.mobile.d.ts +6 -0
  126. package/lib/components/CalculatorRko/CalculatorRko.js +73 -0
  127. package/lib/components/CalculatorRko/CalculatorRko.js.map +1 -0
  128. package/lib/components/CalculatorRko/CalculatorRkoContent.d.ts +76 -0
  129. package/lib/components/CalculatorRko/CalculatorRkoContent.js +2 -0
  130. package/lib/components/CalculatorRko/CalculatorRkoContent.js.map +1 -0
  131. package/lib/components/CalculatorRko/constants.d.ts +25 -0
  132. package/lib/components/CalculatorRko/constants.js +52 -0
  133. package/lib/components/CalculatorRko/constants.js.map +1 -0
  134. package/lib/components/CalculatorRko/filterByClientType.d.ts +1 -0
  135. package/lib/components/CalculatorRko/filterByClientType.js +24 -0
  136. package/lib/components/CalculatorRko/filterByClientType.js.map +1 -0
  137. package/lib/components/CalculatorRko/getCalculatedCommission.d.ts +9 -0
  138. package/lib/components/CalculatorRko/getCalculatedCommission.js +103 -0
  139. package/lib/components/CalculatorRko/getCalculatedCommission.js.map +1 -0
  140. package/lib/components/CalculatorRko/getInitialRkoTariffsParams.d.ts +3 -0
  141. package/lib/components/CalculatorRko/getInitialRkoTariffsParams.js +12 -0
  142. package/lib/components/CalculatorRko/getInitialRkoTariffsParams.js.map +1 -0
  143. package/lib/components/CalculatorRko/getRkoCalculatorParams.d.ts +2 -0
  144. package/lib/components/CalculatorRko/getRkoCalculatorParams.js +20 -0
  145. package/lib/components/CalculatorRko/getRkoCalculatorParams.js.map +1 -0
  146. package/lib/components/CalculatorRko/markBestTariff.d.ts +5 -0
  147. package/lib/components/CalculatorRko/markBestTariff.js +12 -0
  148. package/lib/components/CalculatorRko/markBestTariff.js.map +1 -0
  149. package/lib/components/CalculatorRko/mergeTariffData.d.ts +3 -0
  150. package/lib/components/CalculatorRko/mergeTariffData.js +23 -0
  151. package/lib/components/CalculatorRko/mergeTariffData.js.map +1 -0
  152. package/lib/components/CalculatorRko/renderCommissionSum.d.ts +2 -0
  153. package/lib/components/CalculatorRko/renderCommissionSum.js +5 -0
  154. package/lib/components/CalculatorRko/renderCommissionSum.js.map +1 -0
  155. package/lib/components/RkoTariffCardsTable/RkoTariffCard.d.ts +9 -0
  156. package/lib/components/RkoTariffCardsTable/RkoTariffCard.js +39 -0
  157. package/lib/components/RkoTariffCardsTable/RkoTariffCard.js.map +1 -0
  158. package/lib/components/RkoTariffCardsTable/RkoTariffCardsTable.d.ts +5 -0
  159. package/lib/components/RkoTariffCardsTable/RkoTariffCardsTable.fixture.d.ts +4 -0
  160. package/lib/components/RkoTariffCardsTable/RkoTariffCardsTable.fixture.mobile.d.ts +4 -0
  161. package/lib/components/RkoTariffCardsTable/RkoTariffCardsTable.js +20 -0
  162. package/lib/components/RkoTariffCardsTable/RkoTariffCardsTable.js.map +1 -0
  163. package/lib/components/RkoTariffCardsTable/RkoTariffCardsTableContent.d.ts +15 -0
  164. package/lib/components/RkoTariffCardsTable/RkoTariffCardsTableContent.js +2 -0
  165. package/lib/components/RkoTariffCardsTable/RkoTariffCardsTableContent.js.map +1 -0
  166. package/lib/components/RkoTariffCardsTable/constants.d.ts +3 -0
  167. package/lib/components/RkoTariffCardsTable/constants.js +18 -0
  168. package/lib/components/RkoTariffCardsTable/constants.js.map +1 -0
  169. package/lib/components/RkoTariffCardsTable/getCommissionTypes.d.ts +3 -0
  170. package/lib/components/RkoTariffCardsTable/getCommissionTypes.js +8 -0
  171. package/lib/components/RkoTariffCardsTable/getCommissionTypes.js.map +1 -0
  172. package/lib/components/RkoTariffCardsTable/renderDesktopCard.d.ts +2 -0
  173. package/lib/components/RkoTariffCardsTable/renderDesktopCard.js +4 -0
  174. package/lib/components/RkoTariffCardsTable/renderDesktopCard.js.map +1 -0
  175. package/lib/components/RkoTariffCardsTable/renderHiddenCommission.d.ts +9 -0
  176. package/lib/components/RkoTariffCardsTable/renderHiddenCommission.js +6 -0
  177. package/lib/components/RkoTariffCardsTable/renderHiddenCommission.js.map +1 -0
  178. package/lib/components/RkoTariffCardsTable/renderMobileCard.d.ts +12 -0
  179. package/lib/components/RkoTariffCardsTable/renderMobileCard.js +19 -0
  180. package/lib/components/RkoTariffCardsTable/renderMobileCard.js.map +1 -0
  181. package/lib/components/RkoTariffCardsTable/renderRecommendedLabel.d.ts +1 -0
  182. package/lib/components/RkoTariffCardsTable/renderRecommendedLabel.js +6 -0
  183. package/lib/components/RkoTariffCardsTable/renderRecommendedLabel.js.map +1 -0
  184. package/lib/components/RkoTariffCardsTable/renderRkoTariffsTableHeader.d.ts +6 -0
  185. package/lib/components/RkoTariffCardsTable/renderRkoTariffsTableHeader.js +8 -0
  186. package/lib/components/RkoTariffCardsTable/renderRkoTariffsTableHeader.js.map +1 -0
  187. package/lib/model/FormTypeFieldDef.d.ts +1 -1
  188. package/lib/ui-kit/Button/ButtonTitle.d.ts +5 -1
  189. package/lib/ui-kit/Button/ButtonTitle.js +1 -1
  190. package/lib/ui-kit/Button/ButtonTitle.js.map +1 -1
  191. package/lib/ui-kit/Calculator/CalculatorStyle.d.ts +2 -0
  192. package/lib/ui-kit/Calculator/CalculatorStyle.js +2 -0
  193. package/lib/ui-kit/Calculator/CalculatorStyle.js.map +1 -1
  194. package/lib/ui-kit/Calculator/renderCountInput.d.ts +2 -0
  195. package/lib/ui-kit/Calculator/renderCountInput.js +5 -0
  196. package/lib/ui-kit/Calculator/renderCountInput.js.map +1 -0
  197. package/lib/ui-kit/Foldable/DefaultFoldButton.d.ts +1 -0
  198. package/lib/ui-kit/Foldable/DefaultFoldButton.js +4 -1
  199. package/lib/ui-kit/Foldable/DefaultFoldButton.js.map +1 -1
  200. package/lib/ui-kit/Text/Text.d.ts +2 -1
  201. package/lib/ui-kit/Text/Text.js +1 -1
  202. package/lib/ui-kit/Text/Text.js.map +1 -1
  203. package/mobile/bundle/api/getSubmitBody.d.ts +1636 -244
  204. package/mobile/bundle/bundle.umd.js +408 -6
  205. package/mobile/bundle/bundle.umd.min.js +1 -1
  206. package/mobile/bundle/components/CalculatorRko/CalculatorRko.d.ts +5 -0
  207. package/mobile/bundle/components/CalculatorRko/CalculatorRkoContent.d.ts +76 -0
  208. package/mobile/bundle/components/CalculatorRko/constants.d.ts +25 -0
  209. package/mobile/bundle/components/CalculatorRko/filterByClientType.d.ts +1 -0
  210. package/mobile/bundle/components/CalculatorRko/getCalculatedCommission.d.ts +9 -0
  211. package/mobile/bundle/components/CalculatorRko/getInitialRkoTariffsParams.d.ts +3 -0
  212. package/mobile/bundle/components/CalculatorRko/getRkoCalculatorParams.d.ts +2 -0
  213. package/mobile/bundle/components/CalculatorRko/markBestTariff.d.ts +5 -0
  214. package/mobile/bundle/components/CalculatorRko/mergeTariffData.d.ts +3 -0
  215. package/mobile/bundle/components/CalculatorRko/renderCommissionSum.d.ts +2 -0
  216. package/mobile/bundle/components/RkoTariffCardsTable/RkoTariffCard.d.ts +9 -0
  217. package/mobile/bundle/components/RkoTariffCardsTable/RkoTariffCardsTable.d.ts +5 -0
  218. package/mobile/bundle/components/RkoTariffCardsTable/RkoTariffCardsTableContent.d.ts +15 -0
  219. package/mobile/bundle/components/RkoTariffCardsTable/constants.d.ts +3 -0
  220. package/mobile/bundle/components/RkoTariffCardsTable/getCommissionTypes.d.ts +3 -0
  221. package/mobile/bundle/components/RkoTariffCardsTable/renderDesktopCard.d.ts +2 -0
  222. package/mobile/bundle/components/RkoTariffCardsTable/renderHiddenCommission.d.ts +9 -0
  223. package/mobile/bundle/components/RkoTariffCardsTable/renderMobileCard.d.ts +12 -0
  224. package/mobile/bundle/components/RkoTariffCardsTable/renderRecommendedLabel.d.ts +1 -0
  225. package/mobile/bundle/components/RkoTariffCardsTable/renderRkoTariffsTableHeader.d.ts +6 -0
  226. package/mobile/bundle/model/FormTypeFieldDef.d.ts +1 -1
  227. package/mobile/bundle/ui-kit/Button/ButtonTitle.d.ts +5 -1
  228. package/mobile/bundle/ui-kit/Calculator/CalculatorStyle.d.ts +2 -0
  229. package/mobile/bundle/ui-kit/Calculator/renderCountInput.d.ts +2 -0
  230. package/mobile/bundle/ui-kit/Foldable/DefaultFoldButton.d.ts +1 -0
  231. package/mobile/bundle/ui-kit/Text/Text.d.ts +2 -1
  232. package/mobile/dist/api/getSubmitBody.d.ts +1636 -244
  233. package/mobile/dist/api/getSubmitBody.js +6 -0
  234. package/mobile/dist/api/getSubmitBody.js.map +1 -1
  235. package/mobile/dist/components/Blocks.js +4 -0
  236. package/mobile/dist/components/Blocks.js.map +1 -1
  237. package/mobile/dist/components/CalculatorRko/CalculatorRko.d.ts +5 -0
  238. package/mobile/dist/components/CalculatorRko/CalculatorRko.js +75 -0
  239. package/mobile/dist/components/CalculatorRko/CalculatorRko.js.map +1 -0
  240. package/mobile/dist/components/CalculatorRko/CalculatorRkoContent.d.ts +76 -0
  241. package/mobile/dist/components/CalculatorRko/CalculatorRkoContent.js +2 -0
  242. package/mobile/dist/components/CalculatorRko/CalculatorRkoContent.js.map +1 -0
  243. package/mobile/dist/components/CalculatorRko/constants.d.ts +25 -0
  244. package/mobile/dist/components/CalculatorRko/constants.js +54 -0
  245. package/mobile/dist/components/CalculatorRko/constants.js.map +1 -0
  246. package/mobile/dist/components/CalculatorRko/filterByClientType.d.ts +1 -0
  247. package/mobile/dist/components/CalculatorRko/filterByClientType.js +27 -0
  248. package/mobile/dist/components/CalculatorRko/filterByClientType.js.map +1 -0
  249. package/mobile/dist/components/CalculatorRko/getCalculatedCommission.d.ts +9 -0
  250. package/mobile/dist/components/CalculatorRko/getCalculatedCommission.js +106 -0
  251. package/mobile/dist/components/CalculatorRko/getCalculatedCommission.js.map +1 -0
  252. package/mobile/dist/components/CalculatorRko/getInitialRkoTariffsParams.d.ts +3 -0
  253. package/mobile/dist/components/CalculatorRko/getInitialRkoTariffsParams.js +15 -0
  254. package/mobile/dist/components/CalculatorRko/getInitialRkoTariffsParams.js.map +1 -0
  255. package/mobile/dist/components/CalculatorRko/getRkoCalculatorParams.d.ts +2 -0
  256. package/mobile/dist/components/CalculatorRko/getRkoCalculatorParams.js +23 -0
  257. package/mobile/dist/components/CalculatorRko/getRkoCalculatorParams.js.map +1 -0
  258. package/mobile/dist/components/CalculatorRko/markBestTariff.d.ts +5 -0
  259. package/mobile/dist/components/CalculatorRko/markBestTariff.js +15 -0
  260. package/mobile/dist/components/CalculatorRko/markBestTariff.js.map +1 -0
  261. package/mobile/dist/components/CalculatorRko/mergeTariffData.d.ts +3 -0
  262. package/mobile/dist/components/CalculatorRko/mergeTariffData.js +26 -0
  263. package/mobile/dist/components/CalculatorRko/mergeTariffData.js.map +1 -0
  264. package/mobile/dist/components/CalculatorRko/renderCommissionSum.d.ts +2 -0
  265. package/mobile/dist/components/CalculatorRko/renderCommissionSum.js +8 -0
  266. package/mobile/dist/components/CalculatorRko/renderCommissionSum.js.map +1 -0
  267. package/mobile/dist/components/RkoTariffCardsTable/RkoTariffCard.d.ts +9 -0
  268. package/mobile/dist/components/RkoTariffCardsTable/RkoTariffCard.js +41 -0
  269. package/mobile/dist/components/RkoTariffCardsTable/RkoTariffCard.js.map +1 -0
  270. package/mobile/dist/components/RkoTariffCardsTable/RkoTariffCardsTable.d.ts +5 -0
  271. package/mobile/dist/components/RkoTariffCardsTable/RkoTariffCardsTable.js +22 -0
  272. package/mobile/dist/components/RkoTariffCardsTable/RkoTariffCardsTable.js.map +1 -0
  273. package/mobile/dist/components/RkoTariffCardsTable/RkoTariffCardsTableContent.d.ts +15 -0
  274. package/mobile/dist/components/RkoTariffCardsTable/RkoTariffCardsTableContent.js +2 -0
  275. package/mobile/dist/components/RkoTariffCardsTable/RkoTariffCardsTableContent.js.map +1 -0
  276. package/mobile/dist/components/RkoTariffCardsTable/constants.d.ts +3 -0
  277. package/mobile/dist/components/RkoTariffCardsTable/constants.js +20 -0
  278. package/mobile/dist/components/RkoTariffCardsTable/constants.js.map +1 -0
  279. package/mobile/dist/components/RkoTariffCardsTable/getCommissionTypes.d.ts +3 -0
  280. package/mobile/dist/components/RkoTariffCardsTable/getCommissionTypes.js +11 -0
  281. package/mobile/dist/components/RkoTariffCardsTable/getCommissionTypes.js.map +1 -0
  282. package/mobile/dist/components/RkoTariffCardsTable/renderDesktopCard.d.ts +2 -0
  283. package/mobile/dist/components/RkoTariffCardsTable/renderDesktopCard.js +7 -0
  284. package/mobile/dist/components/RkoTariffCardsTable/renderDesktopCard.js.map +1 -0
  285. package/mobile/dist/components/RkoTariffCardsTable/renderHiddenCommission.d.ts +9 -0
  286. package/mobile/dist/components/RkoTariffCardsTable/renderHiddenCommission.js +9 -0
  287. package/mobile/dist/components/RkoTariffCardsTable/renderHiddenCommission.js.map +1 -0
  288. package/mobile/dist/components/RkoTariffCardsTable/renderMobileCard.d.ts +12 -0
  289. package/mobile/dist/components/RkoTariffCardsTable/renderMobileCard.js +22 -0
  290. package/mobile/dist/components/RkoTariffCardsTable/renderMobileCard.js.map +1 -0
  291. package/mobile/dist/components/RkoTariffCardsTable/renderRecommendedLabel.d.ts +1 -0
  292. package/mobile/dist/components/RkoTariffCardsTable/renderRecommendedLabel.js +9 -0
  293. package/mobile/dist/components/RkoTariffCardsTable/renderRecommendedLabel.js.map +1 -0
  294. package/mobile/dist/components/RkoTariffCardsTable/renderRkoTariffsTableHeader.d.ts +6 -0
  295. package/mobile/dist/components/RkoTariffCardsTable/renderRkoTariffsTableHeader.js +11 -0
  296. package/mobile/dist/components/RkoTariffCardsTable/renderRkoTariffsTableHeader.js.map +1 -0
  297. package/mobile/dist/model/FormTypeFieldDef.d.ts +1 -1
  298. package/mobile/dist/ui-kit/Button/ButtonTitle.d.ts +5 -1
  299. package/mobile/dist/ui-kit/Button/ButtonTitle.js +1 -1
  300. package/mobile/dist/ui-kit/Button/ButtonTitle.js.map +1 -1
  301. package/mobile/dist/ui-kit/Calculator/CalculatorStyle.d.ts +2 -0
  302. package/mobile/dist/ui-kit/Calculator/CalculatorStyle.js +2 -0
  303. package/mobile/dist/ui-kit/Calculator/CalculatorStyle.js.map +1 -1
  304. package/mobile/dist/ui-kit/Calculator/renderCountInput.d.ts +2 -0
  305. package/mobile/dist/ui-kit/Calculator/renderCountInput.js +8 -0
  306. package/mobile/dist/ui-kit/Calculator/renderCountInput.js.map +1 -0
  307. package/mobile/dist/ui-kit/Foldable/DefaultFoldButton.d.ts +1 -0
  308. package/mobile/dist/ui-kit/Foldable/DefaultFoldButton.js +4 -1
  309. package/mobile/dist/ui-kit/Foldable/DefaultFoldButton.js.map +1 -1
  310. package/mobile/dist/ui-kit/Text/Text.d.ts +2 -1
  311. package/mobile/dist/ui-kit/Text/Text.js +1 -1
  312. package/mobile/dist/ui-kit/Text/Text.js.map +1 -1
  313. package/mobile/lib/api/getSubmitBody.d.ts +1636 -244
  314. package/mobile/lib/api/getSubmitBody.js +6 -0
  315. package/mobile/lib/api/getSubmitBody.js.map +1 -1
  316. package/mobile/lib/common.css +1 -1
  317. package/mobile/lib/components/Blocks.js +4 -0
  318. package/mobile/lib/components/Blocks.js.map +1 -1
  319. package/mobile/lib/components/CalculatorRko/CalculatorRko.d.ts +5 -0
  320. package/mobile/lib/components/CalculatorRko/CalculatorRko.js +73 -0
  321. package/mobile/lib/components/CalculatorRko/CalculatorRko.js.map +1 -0
  322. package/mobile/lib/components/CalculatorRko/CalculatorRkoContent.d.ts +76 -0
  323. package/mobile/lib/components/CalculatorRko/CalculatorRkoContent.js +2 -0
  324. package/mobile/lib/components/CalculatorRko/CalculatorRkoContent.js.map +1 -0
  325. package/mobile/lib/components/CalculatorRko/constants.d.ts +25 -0
  326. package/mobile/lib/components/CalculatorRko/constants.js +52 -0
  327. package/mobile/lib/components/CalculatorRko/constants.js.map +1 -0
  328. package/mobile/lib/components/CalculatorRko/filterByClientType.d.ts +1 -0
  329. package/mobile/lib/components/CalculatorRko/filterByClientType.js +24 -0
  330. package/mobile/lib/components/CalculatorRko/filterByClientType.js.map +1 -0
  331. package/mobile/lib/components/CalculatorRko/getCalculatedCommission.d.ts +9 -0
  332. package/mobile/lib/components/CalculatorRko/getCalculatedCommission.js +103 -0
  333. package/mobile/lib/components/CalculatorRko/getCalculatedCommission.js.map +1 -0
  334. package/mobile/lib/components/CalculatorRko/getInitialRkoTariffsParams.d.ts +3 -0
  335. package/mobile/lib/components/CalculatorRko/getInitialRkoTariffsParams.js +12 -0
  336. package/mobile/lib/components/CalculatorRko/getInitialRkoTariffsParams.js.map +1 -0
  337. package/mobile/lib/components/CalculatorRko/getRkoCalculatorParams.d.ts +2 -0
  338. package/mobile/lib/components/CalculatorRko/getRkoCalculatorParams.js +20 -0
  339. package/mobile/lib/components/CalculatorRko/getRkoCalculatorParams.js.map +1 -0
  340. package/mobile/lib/components/CalculatorRko/markBestTariff.d.ts +5 -0
  341. package/mobile/lib/components/CalculatorRko/markBestTariff.js +12 -0
  342. package/mobile/lib/components/CalculatorRko/markBestTariff.js.map +1 -0
  343. package/mobile/lib/components/CalculatorRko/mergeTariffData.d.ts +3 -0
  344. package/mobile/lib/components/CalculatorRko/mergeTariffData.js +23 -0
  345. package/mobile/lib/components/CalculatorRko/mergeTariffData.js.map +1 -0
  346. package/mobile/lib/components/CalculatorRko/renderCommissionSum.d.ts +2 -0
  347. package/mobile/lib/components/CalculatorRko/renderCommissionSum.js +5 -0
  348. package/mobile/lib/components/CalculatorRko/renderCommissionSum.js.map +1 -0
  349. package/mobile/lib/components/RkoTariffCardsTable/RkoTariffCard.d.ts +9 -0
  350. package/mobile/lib/components/RkoTariffCardsTable/RkoTariffCard.js +39 -0
  351. package/mobile/lib/components/RkoTariffCardsTable/RkoTariffCard.js.map +1 -0
  352. package/mobile/lib/components/RkoTariffCardsTable/RkoTariffCardsTable.d.ts +5 -0
  353. package/mobile/lib/components/RkoTariffCardsTable/RkoTariffCardsTable.js +20 -0
  354. package/mobile/lib/components/RkoTariffCardsTable/RkoTariffCardsTable.js.map +1 -0
  355. package/mobile/lib/components/RkoTariffCardsTable/RkoTariffCardsTableContent.d.ts +15 -0
  356. package/mobile/lib/components/RkoTariffCardsTable/RkoTariffCardsTableContent.js +2 -0
  357. package/mobile/lib/components/RkoTariffCardsTable/RkoTariffCardsTableContent.js.map +1 -0
  358. package/mobile/lib/components/RkoTariffCardsTable/constants.d.ts +3 -0
  359. package/mobile/lib/components/RkoTariffCardsTable/constants.js +18 -0
  360. package/mobile/lib/components/RkoTariffCardsTable/constants.js.map +1 -0
  361. package/mobile/lib/components/RkoTariffCardsTable/getCommissionTypes.d.ts +3 -0
  362. package/mobile/lib/components/RkoTariffCardsTable/getCommissionTypes.js +8 -0
  363. package/mobile/lib/components/RkoTariffCardsTable/getCommissionTypes.js.map +1 -0
  364. package/mobile/lib/components/RkoTariffCardsTable/renderDesktopCard.d.ts +2 -0
  365. package/mobile/lib/components/RkoTariffCardsTable/renderDesktopCard.js +4 -0
  366. package/mobile/lib/components/RkoTariffCardsTable/renderDesktopCard.js.map +1 -0
  367. package/mobile/lib/components/RkoTariffCardsTable/renderHiddenCommission.d.ts +9 -0
  368. package/mobile/lib/components/RkoTariffCardsTable/renderHiddenCommission.js +6 -0
  369. package/mobile/lib/components/RkoTariffCardsTable/renderHiddenCommission.js.map +1 -0
  370. package/mobile/lib/components/RkoTariffCardsTable/renderMobileCard.d.ts +12 -0
  371. package/mobile/lib/components/RkoTariffCardsTable/renderMobileCard.js +19 -0
  372. package/mobile/lib/components/RkoTariffCardsTable/renderMobileCard.js.map +1 -0
  373. package/mobile/lib/components/RkoTariffCardsTable/renderRecommendedLabel.d.ts +1 -0
  374. package/mobile/lib/components/RkoTariffCardsTable/renderRecommendedLabel.js +6 -0
  375. package/mobile/lib/components/RkoTariffCardsTable/renderRecommendedLabel.js.map +1 -0
  376. package/mobile/lib/components/RkoTariffCardsTable/renderRkoTariffsTableHeader.d.ts +6 -0
  377. package/mobile/lib/components/RkoTariffCardsTable/renderRkoTariffsTableHeader.js +8 -0
  378. package/mobile/lib/components/RkoTariffCardsTable/renderRkoTariffsTableHeader.js.map +1 -0
  379. package/mobile/lib/model/FormTypeFieldDef.d.ts +1 -1
  380. package/mobile/lib/ui-kit/Button/ButtonTitle.d.ts +5 -1
  381. package/mobile/lib/ui-kit/Button/ButtonTitle.js +1 -1
  382. package/mobile/lib/ui-kit/Button/ButtonTitle.js.map +1 -1
  383. package/mobile/lib/ui-kit/Calculator/CalculatorStyle.d.ts +2 -0
  384. package/mobile/lib/ui-kit/Calculator/CalculatorStyle.js +2 -0
  385. package/mobile/lib/ui-kit/Calculator/CalculatorStyle.js.map +1 -1
  386. package/mobile/lib/ui-kit/Calculator/renderCountInput.d.ts +2 -0
  387. package/mobile/lib/ui-kit/Calculator/renderCountInput.js +5 -0
  388. package/mobile/lib/ui-kit/Calculator/renderCountInput.js.map +1 -0
  389. package/mobile/lib/ui-kit/Foldable/DefaultFoldButton.d.ts +1 -0
  390. package/mobile/lib/ui-kit/Foldable/DefaultFoldButton.js +4 -1
  391. package/mobile/lib/ui-kit/Foldable/DefaultFoldButton.js.map +1 -1
  392. package/mobile/lib/ui-kit/Text/Text.d.ts +2 -1
  393. package/mobile/lib/ui-kit/Text/Text.js +1 -1
  394. package/mobile/lib/ui-kit/Text/Text.js.map +1 -1
  395. package/mobile/src/api/getSubmitBody.ts +8 -0
  396. package/mobile/src/components/ApplicationForm/ApplicationForm.example.json +44 -0
  397. package/mobile/src/components/Blocks.ts +4 -0
  398. package/mobile/src/components/CalculatorRko/CalculatorRko.tsx +141 -0
  399. package/mobile/src/components/CalculatorRko/CalculatorRkoContent.ts +98 -0
  400. package/mobile/src/components/CalculatorRko/constants.ts +56 -0
  401. package/mobile/src/components/CalculatorRko/filterByClientType.ts +31 -0
  402. package/mobile/src/components/CalculatorRko/getCalculatedCommission.ts +174 -0
  403. package/mobile/src/components/CalculatorRko/getInitialRkoTariffsParams.ts +17 -0
  404. package/mobile/src/components/CalculatorRko/getRkoCalculatorParams.ts +47 -0
  405. package/mobile/src/components/CalculatorRko/markBestTariff.ts +16 -0
  406. package/mobile/src/components/CalculatorRko/mergeTariffData.ts +37 -0
  407. package/mobile/src/components/CalculatorRko/renderCommissionSum.tsx +9 -0
  408. package/mobile/src/components/RkoTariffCardsTable/RkoTariffCard.tsx +93 -0
  409. package/mobile/src/components/RkoTariffCardsTable/RkoTariffCardsTable.tsx +49 -0
  410. package/mobile/src/components/RkoTariffCardsTable/RkoTariffCardsTableContent.ts +17 -0
  411. package/mobile/src/components/RkoTariffCardsTable/constants.ts +20 -0
  412. package/mobile/src/components/RkoTariffCardsTable/getCommissionTypes.ts +10 -0
  413. package/mobile/src/components/RkoTariffCardsTable/renderDesktopCard.tsx +7 -0
  414. package/mobile/src/components/RkoTariffCardsTable/renderHiddenCommission.tsx +23 -0
  415. package/mobile/src/components/RkoTariffCardsTable/renderMobileCard.tsx +61 -0
  416. package/mobile/src/components/RkoTariffCardsTable/renderRecommendedLabel.tsx +9 -0
  417. package/mobile/src/components/RkoTariffCardsTable/renderRkoTariffsTableHeader.tsx +25 -0
  418. package/mobile/src/model/FormTypeFieldDef.ts +2 -1
  419. package/mobile/src/ui-kit/Button/ButtonTitle.tsx +7 -2
  420. package/mobile/src/ui-kit/Calculator/CalculatorStyle.tsx +2 -0
  421. package/mobile/src/ui-kit/Calculator/renderCountInput.tsx +13 -0
  422. package/mobile/src/ui-kit/Foldable/DefaultFoldButton.tsx +19 -13
  423. package/mobile/src/ui-kit/Text/Text.tsx +4 -3
  424. package/package.json +2 -2
  425. package/src/api/getSubmitBody.ts +8 -0
  426. package/src/components/ApplicationForm/ApplicationForm.example.json +44 -0
  427. package/src/components/ApplicationForm/ApplicationForm.fixture.tsx +26 -0
  428. package/src/components/Blocks.mobile.ts +4 -0
  429. package/src/components/Blocks.ts +4 -0
  430. package/src/components/CalculatorRko/CalculatorRko.fixture.mobile.tsx +28 -0
  431. package/src/components/CalculatorRko/CalculatorRko.fixture.tsx +29 -0
  432. package/src/components/CalculatorRko/CalculatorRko.tsx +141 -0
  433. package/src/components/CalculatorRko/CalculatorRkoContent.ts +98 -0
  434. package/src/components/CalculatorRko/constants.ts +56 -0
  435. package/src/components/CalculatorRko/filterByClientType.ts +31 -0
  436. package/src/components/CalculatorRko/getCalculatedCommission.ts +174 -0
  437. package/src/components/CalculatorRko/getInitialRkoTariffsParams.ts +17 -0
  438. package/src/components/CalculatorRko/getRkoCalculatorParams.ts +47 -0
  439. package/src/components/CalculatorRko/markBestTariff.ts +16 -0
  440. package/src/components/CalculatorRko/mergeTariffData.ts +37 -0
  441. package/src/components/CalculatorRko/renderCommissionSum.tsx +9 -0
  442. package/src/components/RkoTariffCardsTable/RkoTariffCard.tsx +93 -0
  443. package/src/components/RkoTariffCardsTable/RkoTariffCardsTable.fixture.mobile.tsx +49 -0
  444. package/src/components/RkoTariffCardsTable/RkoTariffCardsTable.fixture.tsx +49 -0
  445. package/src/components/RkoTariffCardsTable/RkoTariffCardsTable.tsx +49 -0
  446. package/src/components/RkoTariffCardsTable/RkoTariffCardsTableContent.ts +17 -0
  447. package/src/components/RkoTariffCardsTable/constants.ts +20 -0
  448. package/src/components/RkoTariffCardsTable/getCommissionTypes.ts +10 -0
  449. package/src/components/RkoTariffCardsTable/renderDesktopCard.tsx +7 -0
  450. package/src/components/RkoTariffCardsTable/renderHiddenCommission.tsx +23 -0
  451. package/src/components/RkoTariffCardsTable/renderMobileCard.tsx +61 -0
  452. package/src/components/RkoTariffCardsTable/renderRecommendedLabel.tsx +9 -0
  453. package/src/components/RkoTariffCardsTable/renderRkoTariffsTableHeader.tsx +25 -0
  454. package/src/icons/IconName.ts +4 -4
  455. package/src/model/FormTypeFieldDef.ts +2 -1
  456. package/src/ui-kit/Button/ButtonTitle.tsx +7 -2
  457. package/src/ui-kit/Calculator/CalculatorStyle.tsx +2 -0
  458. package/src/ui-kit/Calculator/renderCountInput.tsx +13 -0
  459. package/src/ui-kit/Foldable/DefaultFoldButton.tsx +19 -13
  460. package/src/ui-kit/Text/Text.tsx +4 -3
  461. package/tailwind.config.cjs +7 -1
@@ -0,0 +1,47 @@
1
+ import { getRangeByKeys } from '../../ui-kit/Calculator/rangeHelpers';
2
+ import {
3
+ type ClientType,
4
+ type RkoCalculatorParams,
5
+ type RkoCalculatorRowsData,
6
+ type RkoCalculatorSourceBookCommissionsParams,
7
+ type RkoCalculatorUserInputParams,
8
+ } from './CalculatorRkoContent';
9
+
10
+ export const getRkoCalculatorParams = (
11
+ userInputParams: RkoCalculatorUserInputParams,
12
+ rows?: RkoCalculatorRowsData[],
13
+ clientType?: ClientType,
14
+ ): RkoCalculatorParams => {
15
+ const commissionsRows: RkoCalculatorSourceBookCommissionsParams | undefined =
16
+ rows?.[0]?.commissions;
17
+
18
+ const { minTransferLegalCount, maxTransferLegalCount } = getRangeByKeys(
19
+ ['minTransferLegalCount', 'maxTransferLegalCount'],
20
+ commissionsRows?.transferLegalCountCommission.filter((item) => item.clientType === clientType),
21
+ );
22
+ const { minFlTransferSum, maxFlTransferSum } = getRangeByKeys(
23
+ ['minFlTransferSum', 'maxFlTransferSum'],
24
+ commissionsRows?.flTransferSumCommission.filter((item) => item.clientType === clientType),
25
+ );
26
+
27
+ const { minCashInSum, maxCashInSum } = getRangeByKeys(
28
+ ['minCashInSum', 'maxCashInSum'],
29
+ commissionsRows?.cashInSumCommission.filter((item) => item.clientType === clientType),
30
+ );
31
+ const { minCashOutSum, maxCashOutSum } = getRangeByKeys(
32
+ ['minCashOutSum', 'maxCashOutSum'],
33
+ commissionsRows?.cashOutSumCommission.filter((item) => item.clientType === clientType),
34
+ );
35
+
36
+ return {
37
+ ...userInputParams,
38
+ minTransferLegalCount,
39
+ maxTransferLegalCount,
40
+ minFlTransferSum,
41
+ maxFlTransferSum,
42
+ minCashInSum,
43
+ maxCashInSum,
44
+ minCashOutSum,
45
+ maxCashOutSum,
46
+ };
47
+ };
@@ -0,0 +1,16 @@
1
+ export const markBestTariff = <T extends { totalCommission: number }>(
2
+ tariffs: T[],
3
+ ): (T & { isBest?: boolean })[] => {
4
+ if (tariffs.length === 0) {
5
+ return tariffs;
6
+ }
7
+
8
+ const minCommission = Math.min(...tariffs.map((t) => t.totalCommission));
9
+
10
+ const minTariffIndex = tariffs.findIndex((t) => t.totalCommission === minCommission);
11
+
12
+ return tariffs.map((tariff, index) => ({
13
+ ...tariff,
14
+ isBest: index === minTariffIndex,
15
+ }));
16
+ };
@@ -0,0 +1,37 @@
1
+ import { type TariffCardContent } from '../RkoTariffCardsTable/RkoTariffCardsTableContent';
2
+ import {
3
+ type RkoCalculatorSourceBookCommissionsParams,
4
+ type RkoCalculatorSourceBookTariffsParams,
5
+ } from './CalculatorRkoContent';
6
+
7
+ export const mergeTariffData = (
8
+ commissionData: RkoCalculatorSourceBookCommissionsParams,
9
+ tariffs: RkoCalculatorSourceBookTariffsParams[] = [],
10
+ ): TariffCardContent[] => {
11
+ const commissionKeys = [
12
+ 'flTransferSumCommission',
13
+ 'cashOutSumCommission',
14
+ 'cashInSumCommission',
15
+ 'transferLegalCountCommission',
16
+ ] as const;
17
+
18
+ return tariffs.map((tariff) => {
19
+ const { tariffName, accountServiceFee } = tariff;
20
+
21
+ const commissions = commissionKeys.reduce((acc, key) => {
22
+ acc[key] = commissionData[key]?.[tariffName] ?? 0;
23
+
24
+ return acc;
25
+ }, {} as Record<typeof commissionKeys[number], number>);
26
+
27
+ const totalCommission =
28
+ Object.values(commissions).reduce((sum, val) => sum + val, 0) + accountServiceFee;
29
+
30
+ return {
31
+ ...tariff,
32
+ ...commissions,
33
+ isBest: false,
34
+ totalCommission,
35
+ };
36
+ });
37
+ };
@@ -0,0 +1,9 @@
1
+ import { type Option } from '../../ui-kit/Select/Option';
2
+ import { Text } from '../../ui-kit/Text/Text';
3
+ import { RKO_DEFAULT_CURRENCY } from './constants';
4
+
5
+ export const renderCommissionSum = (value: number, currency: Option, className?: string) => (
6
+ <Text className={className}>
7
+ {value?.toLocaleString()}&nbsp;{(currency ?? RKO_DEFAULT_CURRENCY).text}
8
+ </Text>
9
+ );
@@ -0,0 +1,93 @@
1
+ import { JSX } from '@redneckz/uni-jsx';
2
+ import { useBool } from '@redneckz/uni-jsx/lib/hooks/useBool';
3
+ import { useMobileMode } from '../../hooks/useMobileMode';
4
+ import { type ComponentType } from '../../model/ComponentType';
5
+ import { Heading } from '../../ui-kit/Heading/Heading';
6
+ import { LinkButton } from '../../ui-kit/LinkButton/LinkButton';
7
+ import type { Option } from '../../ui-kit/Select/Option';
8
+ import { Text } from '../../ui-kit/Text/Text';
9
+ import { style } from '../../utils/style';
10
+ import { RKO_COLUMNS_ORDER } from './constants';
11
+ import { renderDesktopCard } from './renderDesktopCard';
12
+ import { renderMobileCard } from './renderMobileCard';
13
+ import { renderRecommendedLabel } from './renderRecommendedLabel';
14
+ import { type TariffCardContent } from './RkoTariffCardsTableContent';
15
+
16
+ export interface TariffCardProps extends TariffCardContent, ComponentType {
17
+ currency: Option;
18
+ commissionTypes?: string[];
19
+ openDepositBtnLink?: string;
20
+ }
21
+
22
+ export const RkoTariffCard = JSX(
23
+ ({
24
+ tariffName,
25
+ tariffDesc,
26
+ className,
27
+ transferLegalCountCommission,
28
+ flTransferSumCommission,
29
+ cashInSumCommission,
30
+ accountServiceFee,
31
+ cashOutSumCommission,
32
+ totalCommission,
33
+ currency,
34
+ isBest = false,
35
+ commissionTypes,
36
+ openDepositBtnLink,
37
+ }: TariffCardProps) => {
38
+ const [isUnfolded, { toggle }] = useBool(false);
39
+
40
+ const tariffData = {
41
+ accountServiceFee,
42
+ transferLegalCountCommission,
43
+ flTransferSumCommission,
44
+ cashOutSumCommission,
45
+ cashInSumCommission,
46
+ totalCommission,
47
+ };
48
+
49
+ const commissions = RKO_COLUMNS_ORDER.map((key) => tariffData[key]);
50
+
51
+ const isMobileMode = useMobileMode();
52
+
53
+ const handleOpenDepositClick = () =>
54
+ globalThis?.sessionStorage.setItem('rkoTariffName', tariffName);
55
+
56
+ return (
57
+ <div
58
+ className={style(
59
+ className,
60
+ 'rounded-xl min-h-24 items-center min-w-0 lg:p-xl p-3xl',
61
+ isBest
62
+ ? 'bg-primary-main text-white relative'
63
+ : 'bg-white text-primary-text border border-solid border-gray',
64
+ )}
65
+ >
66
+ <div className="col-span-2">
67
+ <Heading headingType={isMobileMode ? 'h2' : 'h6'} title={tariffName} />
68
+ <Text size="text-xs">{tariffDesc}</Text>
69
+ </div>
70
+ {isMobileMode
71
+ ? renderMobileCard({
72
+ commissions,
73
+ currency,
74
+ isUnfolded,
75
+ handleFold: toggle,
76
+ commissionTypes,
77
+ isBest,
78
+ })
79
+ : renderDesktopCard(commissions, currency)}
80
+ <div className="flex flex-wrap @xl:flex-nowrap gap-lg sm:gap-m w-full @lg:w-auto col-span-2">
81
+ <LinkButton
82
+ version={isBest ? 'secondary' : 'primary'}
83
+ className={style('basis-full @lg:basis-auto w-full')}
84
+ text="Открыть счёт"
85
+ href={openDepositBtnLink}
86
+ onClick={handleOpenDepositClick}
87
+ />
88
+ </div>
89
+ {renderRecommendedLabel(isBest)}
90
+ </div>
91
+ );
92
+ },
93
+ );
@@ -0,0 +1,49 @@
1
+ import { JSX } from '@redneckz/uni-jsx';
2
+ import { useMobileMode } from '../../hooks/useMobileMode';
3
+ import type { UniBlockProps } from '../../UniBlock/UniBlockProps';
4
+ import { RKO_DEFAULT_CURRENCY } from '../CalculatorRko/constants';
5
+ import { type CommissionKey } from './constants';
6
+ import { getSortedCommissionTypes } from './getCommissionTypes';
7
+ import { renderRkoTariffsTableHeader } from './renderRkoTariffsTableHeader';
8
+ import { RkoTariffCard } from './RkoTariffCard';
9
+ import { type RkoTariffCardsTableContent } from './RkoTariffCardsTableContent';
10
+
11
+ export interface RkoTariffCardsTableProps extends RkoTariffCardsTableContent, UniBlockProps {}
12
+
13
+ export const RkoTariffCardsTable = JSX(
14
+ ({
15
+ items = [],
16
+ currency = RKO_DEFAULT_CURRENCY,
17
+ openDepositBtnLink = '',
18
+ }: RkoTariffCardsTableProps) => {
19
+ const isMobileMode = useMobileMode();
20
+
21
+ const commissionTypes: CommissionKey[] = getSortedCommissionTypes(items) ?? [];
22
+ const columnsCount = commissionTypes.length + 4; // 2 на "Название тарифа" и 2 на кнопку
23
+
24
+ const tableLayoutStyle = `lg:grid lg:grid-cols-${String(columnsCount)} gap-m`;
25
+
26
+ return (
27
+ <div className="lg:space-y-m space-y-xl w-full">
28
+ {isMobileMode
29
+ ? null
30
+ : renderRkoTariffsTableHeader({
31
+ params: commissionTypes,
32
+ className: tableLayoutStyle,
33
+ })}
34
+
35
+ {items.map((item, index) => (
36
+ <div key={index}>
37
+ <RkoTariffCard
38
+ {...item}
39
+ className={tableLayoutStyle}
40
+ currency={currency}
41
+ openDepositBtnLink={openDepositBtnLink}
42
+ commissionTypes={commissionTypes}
43
+ />
44
+ </div>
45
+ ))}
46
+ </div>
47
+ );
48
+ },
49
+ );
@@ -0,0 +1,17 @@
1
+ import type { Option } from '../../ui-kit/Select/Option';
2
+ import { type TariffProps } from '../CalculatorRko/CalculatorRkoContent';
3
+
4
+ export interface TariffCardContent extends TariffProps {
5
+ transferLegalCountCommission: number;
6
+ flTransferSumCommission: number;
7
+ cashInSumCommission: number;
8
+ cashOutSumCommission: number;
9
+ totalCommission: number;
10
+ isBest?: boolean;
11
+ }
12
+
13
+ export interface RkoTariffCardsTableContent {
14
+ items?: TariffCardContent[];
15
+ currency?: Option;
16
+ openDepositBtnLink?: string;
17
+ }
@@ -0,0 +1,20 @@
1
+ export const RKO_COMMISSIONS_TITLE_MAP: Record<string, string> = {
2
+ tariffName: 'Название тарифа',
3
+ accountServiceFee: 'Обслуживание счета',
4
+ transferLegalCountCommission: 'Переводы Юрлицам и ИП',
5
+ flTransferSumCommission: 'Переводы физлицам',
6
+ cashOutSumCommission: 'Снятие наличных',
7
+ cashInSumCommission: 'Внесение наличных',
8
+ totalCommission: 'Итоговая комиссия',
9
+ };
10
+
11
+ export const RKO_COLUMNS_ORDER = [
12
+ 'accountServiceFee',
13
+ 'transferLegalCountCommission',
14
+ 'flTransferSumCommission',
15
+ 'cashOutSumCommission',
16
+ 'cashInSumCommission',
17
+ 'totalCommission',
18
+ ] as const;
19
+
20
+ export type CommissionKey = typeof RKO_COLUMNS_ORDER[number];
@@ -0,0 +1,10 @@
1
+ import { RKO_COLUMNS_ORDER, type CommissionKey } from './constants';
2
+ import { type TariffCardContent } from './RkoTariffCardsTableContent';
3
+
4
+ export const getSortedCommissionTypes = (items: TariffCardContent[]): CommissionKey[] => {
5
+ if (!items || items.length === 0) {
6
+ return [];
7
+ }
8
+
9
+ return RKO_COLUMNS_ORDER.filter((key) => key in items[0]);
10
+ };
@@ -0,0 +1,7 @@
1
+ import type { Option } from '../../ui-kit/Select/Option';
2
+ import { renderCommissionSum } from '../CalculatorRko/renderCommissionSum';
3
+
4
+ export const renderDesktopCard = (commissions: number[], currency: Option) =>
5
+ commissions.map((commission, index) => (
6
+ <div key={index}>{renderCommissionSum(commission, currency)}</div>
7
+ ));
@@ -0,0 +1,23 @@
1
+ import type { Option } from '../../ui-kit/Select/Option';
2
+ import { Text } from '../../ui-kit/Text/Text';
3
+ import { renderCommissionSum } from '../CalculatorRko/renderCommissionSum';
4
+ import { RKO_COMMISSIONS_TITLE_MAP } from './constants';
5
+
6
+ type RenderHiddenCommissionProps = {
7
+ commission: number;
8
+ currency: Option;
9
+ commissionType?: string;
10
+ index?: number;
11
+ };
12
+
13
+ export const renderHiddenCommission = ({
14
+ commission,
15
+ currency,
16
+ commissionType,
17
+ index,
18
+ }: RenderHiddenCommissionProps) => (
19
+ <div className="flex justify-between align-center" key={index}>
20
+ <Text>{RKO_COMMISSIONS_TITLE_MAP[commissionType ?? '']}</Text>
21
+ {renderCommissionSum(commission, currency)}
22
+ </div>
23
+ );
@@ -0,0 +1,61 @@
1
+ import { DefaultFoldButton } from '../../ui-kit/Foldable/DefaultFoldButton';
2
+ import { Foldable } from '../../ui-kit/Foldable/Foldable';
3
+ import { FoldableSection } from '../../ui-kit/Foldable/FoldableSection';
4
+ import { type Option } from '../../ui-kit/Select/Option';
5
+ import { Text } from '../../ui-kit/Text/Text';
6
+ import { renderCommissionSum } from '../CalculatorRko/renderCommissionSum';
7
+ import { RKO_COMMISSIONS_TITLE_MAP } from './constants';
8
+ import { renderHiddenCommission } from './renderHiddenCommission';
9
+
10
+ type MobileCardProps = {
11
+ commissions: number[];
12
+ currency: Option;
13
+ isUnfolded: boolean;
14
+ handleFold: () => void;
15
+ commissionTypes?: string[];
16
+ isMobileMode?: boolean;
17
+ isBest?: boolean;
18
+ };
19
+
20
+ export const renderMobileCard = ({
21
+ commissions,
22
+ currency,
23
+ isUnfolded,
24
+ handleFold,
25
+ commissionTypes,
26
+ isBest = false,
27
+ }: MobileCardProps) => {
28
+ const totalCommission = commissionTypes?.at(-1) ?? '';
29
+
30
+ return (
31
+ <Foldable className="py-4">
32
+ <div className="w-full space-y-xl">
33
+ <FoldableSection isUnfolded={isUnfolded} className="space-y-xl">
34
+ {commissions.map(
35
+ (commission, index) =>
36
+ index !== commissions.length - 1 &&
37
+ renderHiddenCommission({
38
+ commission,
39
+ currency,
40
+ commissionType: commissionTypes?.[index],
41
+ index,
42
+ }),
43
+ )}
44
+ </FoldableSection>
45
+ <div className="flex justify-between items-center">
46
+ <Text font="font-medium">{RKO_COMMISSIONS_TITLE_MAP[totalCommission]}</Text>
47
+ {renderCommissionSum(commissions.at(-1) ?? 0, currency, 'text-h2')}
48
+ </div>
49
+ </div>
50
+ <DefaultFoldButton
51
+ className="mt-m mx-auto"
52
+ label={isUnfolded ? 'Скрыть' : 'Подробнее'}
53
+ isUnfolded={isUnfolded}
54
+ embedded
55
+ labelColorStyle={isBest ? 'white' : ''}
56
+ onClick={handleFold}
57
+ short
58
+ />
59
+ </Foldable>
60
+ );
61
+ };
@@ -0,0 +1,9 @@
1
+ import { Text } from '../../ui-kit/Text/Text';
2
+
3
+ export const renderRecommendedLabel = (isBest: boolean) => {
4
+ return isBest ? (
5
+ <div className="absolute block rounded-xl min-h-xs flex justify-center align-center bg-orange py-1 px-2 lg:ml-xl top-[-10px]">
6
+ <Text size="text-xs">Рекомендуем</Text>
7
+ </div>
8
+ ) : null;
9
+ };
@@ -0,0 +1,25 @@
1
+ import { type ComponentType } from '../../model/ComponentType';
2
+ import { Text } from '../../ui-kit/Text/Text';
3
+ import { style } from '../../utils/style';
4
+ import { RKO_COMMISSIONS_TITLE_MAP } from './constants';
5
+
6
+ interface RkoTariffsTableHeader extends ComponentType {
7
+ params: string[];
8
+ }
9
+
10
+ export const renderRkoTariffsTableHeader = ({ params, className }: RkoTariffsTableHeader) => {
11
+ return params ? (
12
+ <div className={style(className)}>
13
+ <Text size="text-xs" font="font-medium" className="col-span-2">
14
+ {RKO_COMMISSIONS_TITLE_MAP['tariffName']}
15
+ </Text>
16
+ {params.map((param, index) => (
17
+ <div key={index}>
18
+ <Text size="text-xs" font="font-medium">
19
+ {RKO_COMMISSIONS_TITLE_MAP[param]}
20
+ </Text>
21
+ </div>
22
+ ))}
23
+ </div>
24
+ ) : null;
25
+ };
@@ -26,4 +26,5 @@ export type FormTypeFieldDef =
26
26
  | 'FINOMBUDSMAN'
27
27
  | 'PF'
28
28
  | 'UNIVERSAL'
29
- | 'PRACTICE';
29
+ | 'PRACTICE'
30
+ | 'CALC';
@@ -2,10 +2,15 @@ import { JSX } from '@redneckz/uni-jsx';
2
2
  import { type ComponentType } from '../../model/ComponentType';
3
3
  import { style } from '../../utils/style';
4
4
 
5
- export const ButtonTitle = JSX<ComponentType>(({ className, children }) => (
5
+ interface ButtonTitleProps extends ComponentType {
6
+ labelColor?: string;
7
+ }
8
+
9
+ export const ButtonTitle = JSX<ButtonTitleProps>(({ className, labelColor, children }) => (
6
10
  <span
7
11
  className={style(
8
- 'inline-flex items-center text-start gap-s group-[]/btn-embedded:text-primary-main',
12
+ 'inline-flex items-center text-start gap-s',
13
+ labelColor === 'white' ? 'text-white' : 'group-[]/btn-embedded:text-primary-main',
9
14
  className,
10
15
  )}
11
16
  >
@@ -1,5 +1,7 @@
1
1
  export const CalculatorStyle = {
2
2
  wrapper: 'flex flex-col justify-between lg:flex-row gap-4xl',
3
+ wrapperMax: 'w-full',
3
4
  input: 'flex flex-col lg:w-1/2 gap-2xl',
5
+ inputMax: 'grid lg:grid-cols-2 grid-cols-1 gap-4xl',
4
6
  result: 'flex flex-col gap-y-xl min-w-52',
5
7
  };
@@ -0,0 +1,13 @@
1
+ import { InputRange } from '../InputRange/InputRange';
2
+ import { type InputRangeProps } from '../InputRange/InputRangeProps';
3
+
4
+ const DEFAULT_AMOUNT_STEP = 1;
5
+
6
+ export const renderCountInput = ({
7
+ min = 0,
8
+ max = 0,
9
+ step = DEFAULT_AMOUNT_STEP,
10
+ ...rest
11
+ }: InputRangeProps) => (
12
+ <InputRange items={[`От ${min} шт`, `До ${max} шт`]} step={step} {...rest} />
13
+ );
@@ -8,6 +8,7 @@ import { ToggleIcon } from '../Icon/ToggleIcon';
8
8
  interface DefaultFoldButtonProps extends ButtonProps, LabelProps {
9
9
  isUnfolded?: boolean;
10
10
  short?: boolean;
11
+ labelColorStyle?: string;
11
12
  }
12
13
 
13
14
  export const DefaultFoldButton = JSX<DefaultFoldButtonProps>(
@@ -17,18 +18,23 @@ export const DefaultFoldButton = JSX<DefaultFoldButtonProps>(
17
18
  short,
18
19
  label = isUnfolded ? 'Скрыть' : 'Развернуть',
19
20
  embedded,
21
+ labelColorStyle,
20
22
  ...rest
21
- }) => (
22
- <Button
23
- className={style({ 'w-full': !short }, className)}
24
- embedded={embedded}
25
- shape={short ? 'default' : 'square'}
26
- role="tab"
27
- aria-label="Кнопка сворачивающейся секции"
28
- {...rest}
29
- >
30
- <ButtonTitle>{label}</ButtonTitle>
31
- <ToggleIcon isUnfolded={isUnfolded} iconVersion={embedded ? 'color' : ''} />
32
- </Button>
33
- ),
23
+ }) => {
24
+ const iconColor = labelColorStyle === 'white' ? '' : 'color';
25
+
26
+ return (
27
+ <Button
28
+ className={style({ 'w-full': !short }, className)}
29
+ embedded={embedded}
30
+ shape={short ? 'default' : 'square'}
31
+ role="tab"
32
+ aria-label="Кнопка сворачивающейся секции"
33
+ {...rest}
34
+ >
35
+ <ButtonTitle labelColor={labelColorStyle}>{label}</ButtonTitle>
36
+ <ToggleIcon isUnfolded={isUnfolded} iconVersion={embedded ? iconColor : ''} />
37
+ </Button>
38
+ );
39
+ },
34
40
  );
@@ -1,4 +1,5 @@
1
1
  import { JSX } from '@redneckz/uni-jsx';
2
+ import { type ComponentType } from '../../model/ComponentType';
2
3
  import { style } from '../../utils/style';
3
4
  import {
4
5
  type FontWeight,
@@ -8,13 +9,13 @@ import {
8
9
  type TitleSize,
9
10
  } from './TextProps';
10
11
 
11
- interface TextProps {
12
+ interface TextProps extends ComponentType {
12
13
  size?: TextSize | TitleSize;
13
14
  color?: TextColor;
14
15
  align?: TextAlign;
15
16
  font?: FontWeight;
16
17
  }
17
18
 
18
- export const Text = JSX<TextProps>(({ children, ...styleProps }) => (
19
- <span className={style('font-sans', Object.values(styleProps))}>{children}</span>
19
+ export const Text = JSX<TextProps>(({ children, className, ...styleProps }) => (
20
+ <span className={style('font-sans', Object.values(styleProps), className)}>{children}</span>
20
21
  ));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@redneckz/wildless-cms-uni-blocks",
3
- "version": "0.14.997",
3
+ "version": "0.14.999",
4
4
  "private": false,
5
5
  "license": "MIT",
6
6
  "author": "ЦК",
@@ -205,7 +205,7 @@
205
205
  "path": "lib/common.css"
206
206
  },
207
207
  {
208
- "limit": "110 kB",
208
+ "limit": "115 kB",
209
209
  "path": "bundle/bundle.umd.min.js"
210
210
  }
211
211
  ],
@@ -71,6 +71,7 @@ export const getSubmitBody = ({ body, endpoint, router }: submitBodyProps) => {
71
71
  partnerName,
72
72
  partnerSymbolCode,
73
73
  }),
74
+ ...getRkoTariffName(typeForm),
74
75
  ...staticBody,
75
76
  };
76
77
  };
@@ -116,3 +117,10 @@ const addPageSlug = (typeForm?: string, router?: Router) =>
116
117
  typeForm: router?.pathname?.split('/')?.at(-1) || '/',
117
118
  }
118
119
  : {};
120
+
121
+ const getRkoTariffName = (typeForm?: string) =>
122
+ typeForm === 'CALC'
123
+ ? {
124
+ partnerComments: globalThis?.sessionStorage.getItem('rkoTariffName') ?? 'Неизвестный тариф',
125
+ }
126
+ : {};
@@ -1798,5 +1798,49 @@
1798
1798
  }
1799
1799
  }
1800
1800
  }
1801
+ ],
1802
+ [
1803
+ "Калькулятор РКО",
1804
+ {
1805
+ "content": {
1806
+ "version": "primary",
1807
+ "padding": "",
1808
+ "title": "Открыть счёт РКО",
1809
+ "typeForm": "CALC",
1810
+ "endpoint": "sendcorporatelead",
1811
+ "sections": [
1812
+ {
1813
+ "inputs": [
1814
+ {
1815
+ "name": "name",
1816
+ "required": true
1817
+ }
1818
+ ]
1819
+ },
1820
+ {
1821
+ "columns": 2,
1822
+ "inputs": [
1823
+ {
1824
+ "name": "dadataPartyInnSelect",
1825
+ "required": true
1826
+ },
1827
+ {
1828
+ "name": "phone",
1829
+ "required": true
1830
+ }
1831
+ ]
1832
+ }
1833
+ ],
1834
+ "button": {
1835
+ "text": "Отправить заявку",
1836
+ "version": "primary"
1837
+ },
1838
+ "link": {
1839
+ "text": "условиями передачи данных",
1840
+ "href": "/privacy-policy",
1841
+ "target": "_blank"
1842
+ }
1843
+ }
1844
+ }
1801
1845
  ]
1802
1846
  ]