@redneckz/wildless-cms-uni-blocks 0.8.9 → 0.8.11

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 (349) hide show
  1. package/bin/migration-scripts/0.8.10.js +31 -0
  2. package/bundle/blocks.schema.json +1 -1
  3. package/bundle/bundle.umd.js +154 -138
  4. package/bundle/bundle.umd.min.js +1 -1
  5. package/bundle/components/Calculator/rangeHelpers.d.ts +4 -0
  6. package/bundle/components/StepsBlock/StepsBlockContent.d.ts +11 -1
  7. package/bundle/components/StepsBlock/checkCanRenderIcon.d.ts +2 -0
  8. package/bundle/components/StepsBlock/{renderStepContent.d.ts → renderStep.d.ts} +5 -5
  9. package/bundle/components/Tile/TileContent.d.ts +2 -2
  10. package/bundle/services/BlockRouter/BlockRouter.d.ts +1 -3
  11. package/bundle/ui-kit/Img/ImgAsPicture.d.ts +0 -2
  12. package/bundle/utils/adjustHref.d.ts +3 -0
  13. package/bundle/utils/dirname.d.ts +1 -0
  14. package/bundle/utils/url.d.ts +2 -2
  15. package/dist/ProjectSettings.js +3 -4
  16. package/dist/ProjectSettings.js.map +1 -1
  17. package/dist/components/Calculator/Rate.js +1 -1
  18. package/dist/components/Calculator/Rate.js.map +1 -1
  19. package/dist/components/Calculator/constants.js +2 -2
  20. package/dist/components/Calculator/constants.js.map +1 -1
  21. package/dist/components/Calculator/rangeHelpers.d.ts +4 -0
  22. package/dist/components/Calculator/rangeHelpers.js +12 -0
  23. package/dist/components/Calculator/rangeHelpers.js.map +1 -0
  24. package/dist/components/Calculator/useBusinessDepositCalculatorParams.js +10 -3
  25. package/dist/components/Calculator/useBusinessDepositCalculatorParams.js.map +1 -1
  26. package/dist/components/Calculator/useCreditCalculatorParams.js +8 -2
  27. package/dist/components/Calculator/useCreditCalculatorParams.js.map +1 -1
  28. package/dist/components/Calculator/useDepositCalculatorParams.js +14 -4
  29. package/dist/components/Calculator/useDepositCalculatorParams.js.map +1 -1
  30. package/dist/components/Carousel/Carousel.js +6 -4
  31. package/dist/components/Carousel/Carousel.js.map +1 -1
  32. package/dist/components/PictureText/renderBenefit.js +1 -0
  33. package/dist/components/PictureText/renderBenefit.js.map +1 -1
  34. package/dist/components/ProductTile/renderBenefit.js +1 -0
  35. package/dist/components/ProductTile/renderBenefit.js.map +1 -1
  36. package/dist/components/StepsBlock/StepsBlock.js +7 -13
  37. package/dist/components/StepsBlock/StepsBlock.js.map +1 -1
  38. package/dist/components/StepsBlock/StepsBlock.mobile.js +24 -4
  39. package/dist/components/StepsBlock/StepsBlock.mobile.js.map +1 -1
  40. package/dist/components/StepsBlock/StepsBlockContent.d.ts +11 -1
  41. package/dist/components/StepsBlock/checkCanRenderIcon.d.ts +2 -0
  42. package/dist/components/StepsBlock/checkCanRenderIcon.js +5 -0
  43. package/dist/components/StepsBlock/checkCanRenderIcon.js.map +1 -0
  44. package/{lib/components/StepsBlock/renderStepContent.d.ts → dist/components/StepsBlock/renderStep.d.ts} +5 -5
  45. package/dist/components/StepsBlock/renderStep.js +34 -0
  46. package/dist/components/StepsBlock/renderStep.js.map +1 -0
  47. package/dist/components/Tile/Tile.js +3 -3
  48. package/dist/components/Tile/Tile.js.map +1 -1
  49. package/dist/components/Tile/TileContent.d.ts +2 -2
  50. package/dist/hooks/useLink.js +4 -16
  51. package/dist/hooks/useLink.js.map +1 -1
  52. package/dist/services/BlockRouter/BlockRouter.d.ts +1 -3
  53. package/dist/services/BlockRouter/BlockRouter.js +3 -9
  54. package/dist/services/BlockRouter/BlockRouter.js.map +1 -1
  55. package/dist/services/BlockRouter/useBlockRouterProvider.js +2 -10
  56. package/dist/services/BlockRouter/useBlockRouterProvider.js.map +1 -1
  57. package/dist/setup-fixture.js +3 -4
  58. package/dist/setup-fixture.js.map +1 -1
  59. package/dist/ui-kit/Icon/Icon.js +5 -1
  60. package/dist/ui-kit/Icon/Icon.js.map +1 -1
  61. package/dist/ui-kit/Img/ImgAsPicture.d.ts +0 -2
  62. package/dist/ui-kit/Img/ImgAsPicture.js +18 -21
  63. package/dist/ui-kit/Img/ImgAsPicture.js.map +1 -1
  64. package/dist/utils/adjustHref.d.ts +3 -0
  65. package/dist/utils/adjustHref.js +14 -0
  66. package/dist/utils/adjustHref.js.map +1 -0
  67. package/dist/utils/dirname.d.ts +1 -0
  68. package/dist/utils/dirname.js +5 -0
  69. package/dist/utils/dirname.js.map +1 -0
  70. package/dist/utils/url.d.ts +2 -2
  71. package/dist/utils/url.js +1 -1
  72. package/dist/utils/url.js.map +1 -1
  73. package/dist/wlc.json +0 -1
  74. package/lib/ProjectSettings.js +3 -4
  75. package/lib/ProjectSettings.js.map +1 -1
  76. package/lib/components/Calculator/Rate.js +1 -1
  77. package/lib/components/Calculator/Rate.js.map +1 -1
  78. package/lib/components/Calculator/constants.js +2 -2
  79. package/lib/components/Calculator/constants.js.map +1 -1
  80. package/lib/components/Calculator/rangeHelpers.d.ts +4 -0
  81. package/lib/components/Calculator/rangeHelpers.js +8 -0
  82. package/lib/components/Calculator/rangeHelpers.js.map +1 -0
  83. package/lib/components/Calculator/useBusinessDepositCalculatorParams.js +10 -3
  84. package/lib/components/Calculator/useBusinessDepositCalculatorParams.js.map +1 -1
  85. package/lib/components/Calculator/useCreditCalculatorParams.js +8 -2
  86. package/lib/components/Calculator/useCreditCalculatorParams.js.map +1 -1
  87. package/lib/components/Calculator/useDepositCalculatorParams.js +14 -4
  88. package/lib/components/Calculator/useDepositCalculatorParams.js.map +1 -1
  89. package/lib/components/Carousel/Carousel.js +6 -4
  90. package/lib/components/Carousel/Carousel.js.map +1 -1
  91. package/lib/components/PictureText/renderBenefit.js +1 -0
  92. package/lib/components/PictureText/renderBenefit.js.map +1 -1
  93. package/lib/components/ProductTile/renderBenefit.js +1 -0
  94. package/lib/components/ProductTile/renderBenefit.js.map +1 -1
  95. package/lib/components/StepsBlock/StepsBlock.js +7 -13
  96. package/lib/components/StepsBlock/StepsBlock.js.map +1 -1
  97. package/lib/components/StepsBlock/StepsBlock.mobile.js +24 -4
  98. package/lib/components/StepsBlock/StepsBlock.mobile.js.map +1 -1
  99. package/lib/components/StepsBlock/StepsBlockContent.d.ts +11 -1
  100. package/lib/components/StepsBlock/checkCanRenderIcon.d.ts +2 -0
  101. package/lib/components/StepsBlock/checkCanRenderIcon.js +2 -0
  102. package/lib/components/StepsBlock/checkCanRenderIcon.js.map +1 -0
  103. package/{dist/components/StepsBlock/renderStepContent.d.ts → lib/components/StepsBlock/renderStep.d.ts} +5 -5
  104. package/lib/components/StepsBlock/renderStep.js +31 -0
  105. package/lib/components/StepsBlock/renderStep.js.map +1 -0
  106. package/lib/components/Tile/Tile.js +3 -3
  107. package/lib/components/Tile/Tile.js.map +1 -1
  108. package/lib/components/Tile/TileContent.d.ts +2 -2
  109. package/lib/hooks/useLink.js +5 -17
  110. package/lib/hooks/useLink.js.map +1 -1
  111. package/lib/services/BlockRouter/BlockRouter.d.ts +1 -3
  112. package/lib/services/BlockRouter/BlockRouter.js +2 -7
  113. package/lib/services/BlockRouter/BlockRouter.js.map +1 -1
  114. package/lib/services/BlockRouter/useBlockRouterProvider.js +2 -10
  115. package/lib/services/BlockRouter/useBlockRouterProvider.js.map +1 -1
  116. package/lib/setup-fixture.js +3 -4
  117. package/lib/setup-fixture.js.map +1 -1
  118. package/lib/ui-kit/Icon/Icon.js +5 -1
  119. package/lib/ui-kit/Icon/Icon.js.map +1 -1
  120. package/lib/ui-kit/Img/ImgAsPicture.d.ts +0 -2
  121. package/lib/ui-kit/Img/ImgAsPicture.js +17 -19
  122. package/lib/ui-kit/Img/ImgAsPicture.js.map +1 -1
  123. package/lib/utils/adjustHref.d.ts +3 -0
  124. package/lib/utils/adjustHref.js +11 -0
  125. package/lib/utils/adjustHref.js.map +1 -0
  126. package/lib/utils/dirname.d.ts +1 -0
  127. package/lib/utils/dirname.js +2 -0
  128. package/lib/utils/dirname.js.map +1 -0
  129. package/lib/utils/url.d.ts +2 -2
  130. package/lib/utils/url.js +1 -1
  131. package/lib/utils/url.js.map +1 -1
  132. package/lib/wlc.json +0 -1
  133. package/mobile/bundle/bundle.umd.js +104 -95
  134. package/mobile/bundle/bundle.umd.min.js +1 -1
  135. package/mobile/bundle/components/Calculator/rangeHelpers.d.ts +4 -0
  136. package/mobile/bundle/components/StepsBlock/StepsBlockContent.d.ts +11 -1
  137. package/mobile/bundle/components/StepsBlock/checkCanRenderIcon.d.ts +2 -0
  138. package/mobile/bundle/components/StepsBlock/{renderStepContent.d.ts → renderStep.d.ts} +5 -5
  139. package/mobile/bundle/components/Tile/TileContent.d.ts +2 -2
  140. package/mobile/bundle/services/BlockRouter/BlockRouter.d.ts +1 -3
  141. package/mobile/bundle/ui-kit/Img/ImgAsPicture.d.ts +0 -2
  142. package/mobile/bundle/utils/adjustHref.d.ts +3 -0
  143. package/mobile/bundle/utils/dirname.d.ts +1 -0
  144. package/mobile/bundle/utils/url.d.ts +2 -2
  145. package/mobile/dist/ProjectSettings.js +3 -4
  146. package/mobile/dist/ProjectSettings.js.map +1 -1
  147. package/mobile/dist/components/Calculator/Rate.js +1 -1
  148. package/mobile/dist/components/Calculator/Rate.js.map +1 -1
  149. package/mobile/dist/components/Calculator/constants.js +2 -2
  150. package/mobile/dist/components/Calculator/constants.js.map +1 -1
  151. package/mobile/dist/components/Calculator/rangeHelpers.d.ts +4 -0
  152. package/mobile/dist/components/Calculator/rangeHelpers.js +12 -0
  153. package/mobile/dist/components/Calculator/rangeHelpers.js.map +1 -0
  154. package/mobile/dist/components/Calculator/useBusinessDepositCalculatorParams.js +10 -3
  155. package/mobile/dist/components/Calculator/useBusinessDepositCalculatorParams.js.map +1 -1
  156. package/mobile/dist/components/Calculator/useCreditCalculatorParams.js +8 -2
  157. package/mobile/dist/components/Calculator/useCreditCalculatorParams.js.map +1 -1
  158. package/mobile/dist/components/Calculator/useDepositCalculatorParams.js +14 -4
  159. package/mobile/dist/components/Calculator/useDepositCalculatorParams.js.map +1 -1
  160. package/mobile/dist/components/Carousel/Carousel.js +6 -4
  161. package/mobile/dist/components/Carousel/Carousel.js.map +1 -1
  162. package/mobile/dist/components/PictureText/renderBenefit.js +1 -0
  163. package/mobile/dist/components/PictureText/renderBenefit.js.map +1 -1
  164. package/mobile/dist/components/ProductTile/renderBenefit.js +1 -0
  165. package/mobile/dist/components/ProductTile/renderBenefit.js.map +1 -1
  166. package/mobile/dist/components/StepsBlock/StepsBlock.js +24 -4
  167. package/mobile/dist/components/StepsBlock/StepsBlock.js.map +1 -1
  168. package/mobile/dist/components/StepsBlock/StepsBlockContent.d.ts +11 -1
  169. package/mobile/dist/components/StepsBlock/checkCanRenderIcon.d.ts +2 -0
  170. package/mobile/dist/components/StepsBlock/checkCanRenderIcon.js +5 -0
  171. package/mobile/dist/components/StepsBlock/checkCanRenderIcon.js.map +1 -0
  172. package/mobile/dist/components/StepsBlock/renderStep.d.ts +11 -0
  173. package/mobile/dist/components/StepsBlock/renderStep.js +34 -0
  174. package/mobile/dist/components/StepsBlock/renderStep.js.map +1 -0
  175. package/mobile/dist/components/Tile/Tile.js +3 -3
  176. package/mobile/dist/components/Tile/Tile.js.map +1 -1
  177. package/mobile/dist/components/Tile/TileContent.d.ts +2 -2
  178. package/mobile/dist/hooks/useLink.js +4 -16
  179. package/mobile/dist/hooks/useLink.js.map +1 -1
  180. package/mobile/dist/services/BlockRouter/BlockRouter.d.ts +1 -3
  181. package/mobile/dist/services/BlockRouter/BlockRouter.js +3 -9
  182. package/mobile/dist/services/BlockRouter/BlockRouter.js.map +1 -1
  183. package/mobile/dist/services/BlockRouter/useBlockRouterProvider.js +2 -10
  184. package/mobile/dist/services/BlockRouter/useBlockRouterProvider.js.map +1 -1
  185. package/mobile/dist/setup-fixture.js +3 -4
  186. package/mobile/dist/setup-fixture.js.map +1 -1
  187. package/mobile/dist/ui-kit/Icon/Icon.js +5 -1
  188. package/mobile/dist/ui-kit/Icon/Icon.js.map +1 -1
  189. package/mobile/dist/ui-kit/Img/ImgAsPicture.d.ts +0 -2
  190. package/mobile/dist/ui-kit/Img/ImgAsPicture.js +18 -21
  191. package/mobile/dist/ui-kit/Img/ImgAsPicture.js.map +1 -1
  192. package/mobile/dist/utils/adjustHref.d.ts +3 -0
  193. package/mobile/dist/utils/adjustHref.js +14 -0
  194. package/mobile/dist/utils/adjustHref.js.map +1 -0
  195. package/mobile/dist/utils/dirname.d.ts +1 -0
  196. package/mobile/dist/utils/dirname.js +5 -0
  197. package/mobile/dist/utils/dirname.js.map +1 -0
  198. package/mobile/dist/utils/url.d.ts +2 -2
  199. package/mobile/dist/utils/url.js +1 -1
  200. package/mobile/dist/utils/url.js.map +1 -1
  201. package/mobile/dist/wlc.json +0 -1
  202. package/mobile/lib/ProjectSettings.js +3 -4
  203. package/mobile/lib/ProjectSettings.js.map +1 -1
  204. package/mobile/lib/components/Calculator/Rate.js +1 -1
  205. package/mobile/lib/components/Calculator/Rate.js.map +1 -1
  206. package/mobile/lib/components/Calculator/constants.js +2 -2
  207. package/mobile/lib/components/Calculator/constants.js.map +1 -1
  208. package/mobile/lib/components/Calculator/rangeHelpers.d.ts +4 -0
  209. package/mobile/lib/components/Calculator/rangeHelpers.js +8 -0
  210. package/mobile/lib/components/Calculator/rangeHelpers.js.map +1 -0
  211. package/mobile/lib/components/Calculator/useBusinessDepositCalculatorParams.js +10 -3
  212. package/mobile/lib/components/Calculator/useBusinessDepositCalculatorParams.js.map +1 -1
  213. package/mobile/lib/components/Calculator/useCreditCalculatorParams.js +8 -2
  214. package/mobile/lib/components/Calculator/useCreditCalculatorParams.js.map +1 -1
  215. package/mobile/lib/components/Calculator/useDepositCalculatorParams.js +14 -4
  216. package/mobile/lib/components/Calculator/useDepositCalculatorParams.js.map +1 -1
  217. package/mobile/lib/components/Carousel/Carousel.js +6 -4
  218. package/mobile/lib/components/Carousel/Carousel.js.map +1 -1
  219. package/mobile/lib/components/PictureText/renderBenefit.js +1 -0
  220. package/mobile/lib/components/PictureText/renderBenefit.js.map +1 -1
  221. package/mobile/lib/components/ProductTile/renderBenefit.js +1 -0
  222. package/mobile/lib/components/ProductTile/renderBenefit.js.map +1 -1
  223. package/mobile/lib/components/StepsBlock/StepsBlock.js +24 -4
  224. package/mobile/lib/components/StepsBlock/StepsBlock.js.map +1 -1
  225. package/mobile/lib/components/StepsBlock/StepsBlockContent.d.ts +11 -1
  226. package/mobile/lib/components/StepsBlock/checkCanRenderIcon.d.ts +2 -0
  227. package/mobile/lib/components/StepsBlock/checkCanRenderIcon.js +2 -0
  228. package/mobile/lib/components/StepsBlock/checkCanRenderIcon.js.map +1 -0
  229. package/mobile/lib/components/StepsBlock/renderStep.d.ts +11 -0
  230. package/mobile/lib/components/StepsBlock/renderStep.js +31 -0
  231. package/mobile/lib/components/StepsBlock/renderStep.js.map +1 -0
  232. package/mobile/lib/components/Tile/Tile.js +3 -3
  233. package/mobile/lib/components/Tile/Tile.js.map +1 -1
  234. package/mobile/lib/components/Tile/TileContent.d.ts +2 -2
  235. package/mobile/lib/hooks/useLink.js +5 -17
  236. package/mobile/lib/hooks/useLink.js.map +1 -1
  237. package/mobile/lib/services/BlockRouter/BlockRouter.d.ts +1 -3
  238. package/mobile/lib/services/BlockRouter/BlockRouter.js +2 -7
  239. package/mobile/lib/services/BlockRouter/BlockRouter.js.map +1 -1
  240. package/mobile/lib/services/BlockRouter/useBlockRouterProvider.js +2 -10
  241. package/mobile/lib/services/BlockRouter/useBlockRouterProvider.js.map +1 -1
  242. package/mobile/lib/setup-fixture.js +3 -4
  243. package/mobile/lib/setup-fixture.js.map +1 -1
  244. package/mobile/lib/ui-kit/Icon/Icon.js +5 -1
  245. package/mobile/lib/ui-kit/Icon/Icon.js.map +1 -1
  246. package/mobile/lib/ui-kit/Img/ImgAsPicture.d.ts +0 -2
  247. package/mobile/lib/ui-kit/Img/ImgAsPicture.js +17 -19
  248. package/mobile/lib/ui-kit/Img/ImgAsPicture.js.map +1 -1
  249. package/mobile/lib/utils/adjustHref.d.ts +3 -0
  250. package/mobile/lib/utils/adjustHref.js +11 -0
  251. package/mobile/lib/utils/adjustHref.js.map +1 -0
  252. package/mobile/lib/utils/dirname.d.ts +1 -0
  253. package/mobile/lib/utils/dirname.js +2 -0
  254. package/mobile/lib/utils/dirname.js.map +1 -0
  255. package/mobile/lib/utils/url.d.ts +2 -2
  256. package/mobile/lib/utils/url.js +1 -1
  257. package/mobile/lib/utils/url.js.map +1 -1
  258. package/mobile/lib/wlc.json +0 -1
  259. package/mobile/src/ProjectSettings.ts +4 -4
  260. package/mobile/src/components/Calculator/Rate.tsx +1 -1
  261. package/mobile/src/components/Calculator/constants.ts +2 -2
  262. package/mobile/src/components/Calculator/rangeHelpers.ts +24 -0
  263. package/mobile/src/components/Calculator/useBusinessDepositCalculatorParams.ts +15 -3
  264. package/mobile/src/components/Calculator/useCreditCalculatorParams.ts +8 -2
  265. package/mobile/src/components/Calculator/useDepositCalculatorParams.ts +18 -4
  266. package/mobile/src/components/Carousel/Carousel.tsx +6 -4
  267. package/mobile/src/components/PictureText/renderBenefit.tsx +1 -0
  268. package/mobile/src/components/ProductTile/renderBenefit.tsx +1 -0
  269. package/mobile/src/components/StepsBlock/StepsBlock.tsx +29 -5
  270. package/mobile/src/components/StepsBlock/StepsBlock.ui.json +6 -0
  271. package/mobile/src/components/StepsBlock/StepsBlockContent.ts +13 -1
  272. package/mobile/src/components/StepsBlock/checkCanRenderIcon.ts +3 -0
  273. package/mobile/src/components/StepsBlock/renderStep.tsx +83 -0
  274. package/mobile/src/components/Tile/Tile.example.json +1 -1
  275. package/mobile/src/components/Tile/Tile.tsx +4 -4
  276. package/mobile/src/components/Tile/Tile.ui.json +7 -1
  277. package/mobile/src/components/Tile/TileContent.ts +2 -2
  278. package/mobile/src/hooks/useLink.ts +5 -18
  279. package/mobile/src/services/BlockRouter/BlockRouter.ts +6 -9
  280. package/mobile/src/services/BlockRouter/useBlockRouterProvider.ts +4 -10
  281. package/mobile/src/setup-fixture.ts +5 -4
  282. package/mobile/src/ui-kit/Icon/Icon.tsx +5 -1
  283. package/mobile/src/ui-kit/Img/ImgAsPicture.tsx +23 -28
  284. package/mobile/src/utils/adjustHref.ts +17 -0
  285. package/mobile/src/utils/dirname.ts +1 -0
  286. package/mobile/src/utils/url.ts +2 -3
  287. package/mobile/src/wlc.json +0 -1
  288. package/package.json +1 -1
  289. package/src/ProjectSettings.ts +4 -4
  290. package/src/components/Calculator/Rate.tsx +1 -1
  291. package/src/components/Calculator/constants.ts +2 -2
  292. package/src/components/Calculator/rangeHelpers.ts +24 -0
  293. package/src/components/Calculator/useBusinessDepositCalculatorParams.ts +15 -3
  294. package/src/components/Calculator/useCreditCalculatorParams.ts +8 -2
  295. package/src/components/Calculator/useDepositCalculatorParams.ts +18 -4
  296. package/src/components/Carousel/Carousel.tsx +6 -4
  297. package/src/components/PictureText/renderBenefit.tsx +1 -0
  298. package/src/components/ProductTile/renderBenefit.tsx +1 -0
  299. package/src/components/StepsBlock/StepsBlock.fixture.mobile.tsx +19 -1
  300. package/src/components/StepsBlock/StepsBlock.fixture.tsx +10 -3
  301. package/src/components/StepsBlock/StepsBlock.mobile.tsx +29 -5
  302. package/src/components/StepsBlock/StepsBlock.tsx +28 -16
  303. package/src/components/StepsBlock/StepsBlock.ui.json +6 -0
  304. package/src/components/StepsBlock/StepsBlockContent.ts +13 -1
  305. package/src/components/StepsBlock/checkCanRenderIcon.ts +3 -0
  306. package/src/components/StepsBlock/renderStep.tsx +83 -0
  307. package/src/components/Tile/Tile.example.json +1 -1
  308. package/src/components/Tile/Tile.fixture.tsx +2 -2
  309. package/src/components/Tile/Tile.tsx +4 -4
  310. package/src/components/Tile/Tile.ui.json +7 -1
  311. package/src/components/Tile/TileContent.ts +2 -2
  312. package/src/hooks/useLink.ts +5 -18
  313. package/src/services/BlockRouter/BlockRouter.ts +6 -9
  314. package/src/services/BlockRouter/useBlockRouterProvider.ts +4 -10
  315. package/src/setup-fixture.ts +5 -4
  316. package/src/ui-kit/Icon/Icon.tsx +5 -1
  317. package/src/ui-kit/Img/ImgAsPicture.tsx +23 -28
  318. package/src/utils/adjustHref.ts +17 -0
  319. package/src/utils/dirname.ts +1 -0
  320. package/src/utils/url.ts +2 -3
  321. package/src/wlc.json +0 -1
  322. package/bundle/utils/checkIsIconRenderable.d.ts +0 -2
  323. package/dist/components/StepsBlock/renderStepContent.js +0 -19
  324. package/dist/components/StepsBlock/renderStepContent.js.map +0 -1
  325. package/dist/utils/checkIsIconRenderable.d.ts +0 -2
  326. package/dist/utils/checkIsIconRenderable.js +0 -5
  327. package/dist/utils/checkIsIconRenderable.js.map +0 -1
  328. package/lib/components/StepsBlock/renderStepContent.js +0 -16
  329. package/lib/components/StepsBlock/renderStepContent.js.map +0 -1
  330. package/lib/utils/checkIsIconRenderable.d.ts +0 -2
  331. package/lib/utils/checkIsIconRenderable.js +0 -2
  332. package/lib/utils/checkIsIconRenderable.js.map +0 -1
  333. package/mobile/bundle/utils/checkIsIconRenderable.d.ts +0 -2
  334. package/mobile/dist/components/StepsBlock/renderStepContent.d.ts +0 -11
  335. package/mobile/dist/components/StepsBlock/renderStepContent.js +0 -19
  336. package/mobile/dist/components/StepsBlock/renderStepContent.js.map +0 -1
  337. package/mobile/dist/utils/checkIsIconRenderable.d.ts +0 -2
  338. package/mobile/dist/utils/checkIsIconRenderable.js +0 -5
  339. package/mobile/dist/utils/checkIsIconRenderable.js.map +0 -1
  340. package/mobile/lib/components/StepsBlock/renderStepContent.d.ts +0 -11
  341. package/mobile/lib/components/StepsBlock/renderStepContent.js +0 -16
  342. package/mobile/lib/components/StepsBlock/renderStepContent.js.map +0 -1
  343. package/mobile/lib/utils/checkIsIconRenderable.d.ts +0 -2
  344. package/mobile/lib/utils/checkIsIconRenderable.js +0 -2
  345. package/mobile/lib/utils/checkIsIconRenderable.js.map +0 -1
  346. package/mobile/src/components/StepsBlock/renderStepContent.tsx +0 -83
  347. package/mobile/src/utils/checkIsIconRenderable.tsx +0 -3
  348. package/src/components/StepsBlock/renderStepContent.tsx +0 -83
  349. package/src/utils/checkIsIconRenderable.tsx +0 -3
@@ -0,0 +1,83 @@
1
+ import type { BlockVersion } from '../../model/BlockVersion';
2
+ import type { ButtonVersion } from '../../model/ButtonVersion';
3
+ import type { VNode } from '../../model/VNode';
4
+ import { Button } from '../../ui-kit/Button/Button';
5
+ import { List } from '../../ui-kit/List/List';
6
+ import { RichText } from '../../ui-kit/RichText/RichText';
7
+ import { Text } from '../../ui-kit/Text/Text';
8
+ import { assertUnreachable } from '../../utils/assertUnreachable';
9
+ import { style } from '../../utils/style';
10
+ import type { DefaultStep, Step } from './StepsBlockContent';
11
+ import type { StyleType } from './StepsBlockStyleMaps';
12
+
13
+ interface RenderStepProps {
14
+ styleMap: StyleType;
15
+ isMainButton: boolean;
16
+ version?: BlockVersion;
17
+ }
18
+
19
+ // TODO: Create universal function for this case
20
+ export const renderStep =
21
+ (props: RenderStepProps) =>
22
+ // Linter doesn't understand that switch processes all cases
23
+ // eslint-disable-next-line consistent-return
24
+ (step: Step, i: number, arr: Step[]): VNode => {
25
+ const { type } = step;
26
+
27
+ if (!(type === 'default' || type === 'rte')) {
28
+ return null;
29
+ }
30
+
31
+ switch (type) {
32
+ case 'default':
33
+ return renderDefaultStep(props)(step, i, arr);
34
+ case 'rte':
35
+ return <RichText __html={step.__html} />;
36
+ default:
37
+ assertUnreachable(step);
38
+ }
39
+ };
40
+
41
+ const renderDefaultStep =
42
+ ({ styleMap, isMainButton, version }: RenderStepProps) =>
43
+ (step: DefaultStep, i: number, arr: Step[]) => {
44
+ const { label, description, button, items, isDotted } = step;
45
+
46
+ return (
47
+ <div
48
+ key={String(i)}
49
+ className={style(
50
+ 'relative flex flex-col items-center text-center whitespace-pre-line overflow-hidden',
51
+ getContainerWidth(arr.length),
52
+ )}
53
+ >
54
+ <div className={style(button?.text ? 'mb-8' : '', 'text-center')}>
55
+ {label ? (
56
+ <div className="mb-2">
57
+ <Text size="text-h6">{label}</Text>
58
+ </div>
59
+ ) : null}
60
+ <div className="flex flex-col items-center">
61
+ {description ? <div className={styleMap.description}>{description}</div> : null}
62
+ <List
63
+ className={style(description ? `${styleMap.description} mt-0.5` : 'text-h6')}
64
+ items={items}
65
+ listItemSize="M"
66
+ isDotted={isDotted}
67
+ />
68
+ </div>
69
+ </div>
70
+ {button?.text && !isMainButton ? (
71
+ <Button
72
+ className="box-border py-3 h-12 w-full max-w-[240px] mt-auto"
73
+ version={version as ButtonVersion}
74
+ {...button}
75
+ >
76
+ {button?.text}
77
+ </Button>
78
+ ) : null}
79
+ </div>
80
+ );
81
+ };
82
+
83
+ const getContainerWidth = (length: number): string => (length < 5 ? 'w-[276px]' : 'w-[210px]');
@@ -2,7 +2,7 @@
2
2
  "content": {
3
3
  "title": "Плитка",
4
4
  "headingType": "h3",
5
- "description": "Описание",
5
+ "__html": "<p>Описание</p>",
6
6
  "image": {
7
7
  "format": "webp",
8
8
  "size": {
@@ -46,8 +46,8 @@ export const TILE: TileContent = {
46
46
  export const TILE_PREMIUM: TileContent = {
47
47
  title: 'Премиальные продукты',
48
48
  headingType: 'h4',
49
- description:
50
- 'Выделенные зоны обслуживания и персональный финансовый консультант. Полный спектр премиальных продуктов, подчеркивающих ваш статус',
49
+ __html:
50
+ '<p>Выделенные зоны обслуживания и персональный финансовый консультант. <strong>Полный спектр</strong> премиальных продуктов, <u>подчеркивающих</u> ваш статус</p>',
51
51
  buttons: [
52
52
  {
53
53
  href: 'https://rshb.ru',
@@ -5,7 +5,7 @@ import { renderButtonsSection } from '../../ui-kit/Button/renderButtonsSection';
5
5
  import { Heading } from '../../ui-kit/Heading/Heading';
6
6
  import { Img } from '../../ui-kit/Img/Img';
7
7
  import { List } from '../../ui-kit/List/List';
8
- import { Paragraph } from '../../ui-kit/Paragraph/Paragraph';
8
+ import { RichText } from '../../ui-kit/RichText/RichText';
9
9
  import { Tags } from '../../ui-kit/Tags/Tags';
10
10
  import { BaseTile } from '../BaseTile/BaseTile';
11
11
  import { getTileMinHeight } from '../BaseTile/getTileMinHeight';
@@ -18,7 +18,7 @@ export const Tile = JSX<TileProps>(
18
18
  ({
19
19
  title,
20
20
  headingType = 'h3',
21
- description,
21
+ __html,
22
22
  items,
23
23
  buttons,
24
24
  image,
@@ -52,9 +52,9 @@ export const Tile = JSX<TileProps>(
52
52
  })}
53
53
  image={image?.src ? <Img className="mt-auto ml-7" image={image} /> : null}
54
54
  >
55
- {description ? (
55
+ {__html ? (
56
56
  <div className="max-w-[600px] mt-2.5">
57
- <Paragraph size="text-xl-light">{description}</Paragraph>
57
+ <RichText __html={__html} />
58
58
  </div>
59
59
  ) : null}
60
60
  {children}
@@ -1 +1,7 @@
1
- {}
1
+ {
2
+ "content": {
3
+ "__html": {
4
+ "ui:widget": "html"
5
+ }
6
+ }
7
+ }
@@ -1,17 +1,17 @@
1
1
  import type { BlockVersion } from '../../model/BlockVersion';
2
- import type { DescriptionProps } from '../../model/HeadlineType';
3
2
  import type { Picture } from '../../model/Picture';
4
3
  import type { ButtonContent } from '../../ui-kit/Button/ButtonProps';
5
4
  import type { HeadingCommonProps } from '../../ui-kit/Heading/HeadingProps';
6
5
  import type { ListContent } from '../../ui-kit/List/ListContent';
7
6
  import type { ListItemSize } from '../../ui-kit/List/ListProps';
7
+ import type { RichTextProps } from '../../ui-kit/RichText/RichTextProps';
8
8
  import type { TagsContent } from '../../ui-kit/Tags/TagsContent';
9
9
 
10
10
  /**
11
11
  * @title Плитка
12
12
  */
13
13
  export type TileContent = HeadingCommonProps &
14
- DescriptionProps &
14
+ RichTextProps &
15
15
  ListContent &
16
16
  ButtonContent &
17
17
  TagsContent & {
@@ -1,7 +1,6 @@
1
1
  import type { LinkProps } from '../model/LinkProps';
2
- import { projectSettings } from '../ProjectSettings';
3
- import { gotoBlock } from '../services/BlockRouter/BlockRouter';
4
- import { isHash, isLocalURL, joinPath } from '../utils/url';
2
+ import { adjustHref } from '../utils/adjustHref';
3
+ import { isLocalURL } from '../utils/url';
5
4
  import { handlerDecorator } from './handlerDecorator';
6
5
  import { useRouter } from './useRouter';
7
6
 
@@ -18,35 +17,23 @@ export function useLink(isRemote?: boolean) {
18
17
 
19
18
  return <L extends Partial<LinkProps & Clickable>>(props: L): L & Clickable => ({
20
19
  ...props,
21
- href: adjustHref(props.href),
20
+ href: isRemote ? props.href : adjustHref(router)(props.href),
22
21
  'aria-label': props.text,
23
22
  onClick: handlerDecorator(handleHref(props), props),
24
23
  });
25
24
 
26
- function adjustHref(href: string | undefined) {
27
- const isRelativeToBase = !isRemote && href?.startsWith('/');
28
-
29
- return projectSettings.BASE_PATH && href && isRelativeToBase
30
- ? joinPath(projectSettings.BASE_PATH, href)
31
- : href;
32
- }
33
-
34
25
  function handleHref({ href, target, onClick }: Partial<LinkProps & Clickable>) {
35
26
  return (ev?: PreventableEvent) => {
36
27
  onClick && onClick(ev);
37
28
 
38
- if (isRemote || !isLocalURL(href, target)) {
29
+ if (!href || isRemote || !isLocalURL(href, target)) {
39
30
  // Default routing
40
31
  return;
41
32
  }
42
33
 
43
34
  // Client routing
44
35
  ev?.preventDefault();
45
- if (isHash(href)) {
46
- gotoBlock(router, href);
47
- } else if (href) {
48
- router.push(href);
49
- }
36
+ router.push(href);
50
37
  };
51
38
  }
52
39
  }
@@ -1,14 +1,11 @@
1
- import type { Router } from '../../hooks/useRouter';
2
1
  import type { BlockDef } from '../../model/ContentPageDef';
3
2
 
4
3
  const normalizeAnchor = (anchor?: string) => anchor?.replace('#', '') || '';
5
4
 
6
- export function gotoBlock(router: Router, anchor?: string) {
7
- router.replace(`#${normalizeAnchor(anchor)}`);
8
- }
9
-
10
- export function trackBlock(router: Router, block?: BlockDef) {
11
- router.replace(`#${normalizeAnchor(block?.anchor)}`, undefined, {
12
- scroll: false,
13
- });
5
+ export function trackBlock(block?: BlockDef) {
6
+ globalThis.history?.replaceState(
7
+ globalThis.history?.state,
8
+ '',
9
+ `#${normalizeAnchor(block?.anchor)}`,
10
+ );
14
11
  }
@@ -1,5 +1,4 @@
1
1
  import { useEffect, useRef } from '@redneckz/uni-jsx/lib/hooks';
2
- import { useRouter } from '../../hooks/useRouter';
3
2
  import type { BlockDef } from '../../model/ContentPageDef';
4
3
  import { debounce } from '../../utils/debounce';
5
4
  import { trackBlock } from './BlockRouter';
@@ -9,8 +8,6 @@ import { findActiveBlock } from './findActiveBlock';
9
8
  const isScrolledEnough = () => globalThis.scrollY > (globalThis.innerHeight * 3) / 4;
10
9
 
11
10
  export function useBlockRouterProvider(scrollTarget: EventTarget = globalThis) {
12
- const router = useRouter();
13
-
14
11
  const intersectionsMapRef = useRef<Map<BlockDef, IntersectionObserverEntry>>(new Map());
15
12
 
16
13
  useEffect(
@@ -25,12 +22,9 @@ export function useBlockRouterProvider(scrollTarget: EventTarget = globalThis) {
25
22
 
26
23
  useEffect(() => {
27
24
  const handleScroll = debounce(() => {
28
- if (isScrolledEnough()) {
29
- const activeBlock = findActiveBlock([...(intersectionsMapRef.current || [])]);
30
- trackBlock(router, activeBlock);
31
- } else {
32
- trackBlock(router);
33
- }
25
+ trackBlock(
26
+ isScrolledEnough() ? findActiveBlock([...(intersectionsMapRef.current || [])]) : undefined,
27
+ );
34
28
  }, 100);
35
29
 
36
30
  scrollTarget.addEventListener('scroll', handleScroll);
@@ -39,5 +33,5 @@ export function useBlockRouterProvider(scrollTarget: EventTarget = globalThis) {
39
33
  handleScroll.dispose();
40
34
  scrollTarget.removeEventListener('scroll', handleScroll);
41
35
  };
42
- }, [router, scrollTarget]);
36
+ }, [scrollTarget]);
43
37
  }
@@ -3,13 +3,14 @@ import { useEffect, useState } from 'react';
3
3
  import { handlerDecorator } from './hooks/handlerDecorator';
4
4
  import { useRouter } from './hooks/useRouter';
5
5
  import { projectSettings } from './ProjectSettings';
6
+ import { joinPath } from './utils/url';
6
7
  import wlc from './wlc.json';
7
8
 
8
9
  projectSettings.setup(wlc);
9
10
 
10
11
  useRouter.setup(() => {
11
12
  const [href, setHref] = useState<string>(
12
- `${globalThis.location.origin}${projectSettings.BASE_PATH}cards-credit`,
13
+ joinPath(globalThis.location.origin, projectSettings.BASE_PATH, 'cards-credit'),
13
14
  );
14
15
 
15
16
  useEffect(() => {
@@ -26,9 +27,9 @@ useRouter.setup(() => {
26
27
 
27
28
  return {
28
29
  href,
29
- pathname: projectSettings.BASE_PATH
30
- ? new URL(href).pathname.substring(projectSettings.BASE_PATH.length - 1)
31
- : '',
30
+ pathname: new URL(href).pathname.substring(
31
+ projectSettings.BASE_PATH ? projectSettings.BASE_PATH.length - 1 : 0,
32
+ ),
32
33
  query: {},
33
34
  push: (url: string) => {
34
35
  globalThis.history.pushState(null, '', url);
@@ -1,7 +1,10 @@
1
1
  import { JSX } from '@redneckz/uni-jsx';
2
+ import { useRouter } from '../../hooks/useRouter';
2
3
  import type { IconVersion } from '../../model/IconVersion';
3
4
  import { projectSettings } from '../../ProjectSettings';
5
+ import { adjustHref } from '../../utils/adjustHref';
4
6
  import { style } from '../../utils/style';
7
+ import { joinPath } from '../../utils/url';
5
8
  import type { IconProps } from './IconProps';
6
9
 
7
10
  const svgUseStyleMap: Record<IconVersion, string> = {
@@ -22,7 +25,8 @@ export const Icon = JSX<IconProps>(
22
25
  asSVG,
23
26
  ...imgProps
24
27
  }) => {
25
- const href = `${projectSettings.CDN || ''}icons/${name}.svg`;
28
+ const router = useRouter();
29
+ const href = adjustHref(router)(joinPath(projectSettings.CDN, '/icons', `${name}.svg`));
26
30
 
27
31
  if (asSVG && iconVersion !== 'normal') {
28
32
  return (
@@ -1,20 +1,16 @@
1
1
  import { JSX } from '@redneckz/uni-jsx';
2
+ import { Router, useRouter } from '../../hooks/useRouter';
2
3
  import type { ImgSource, Picture } from '../../model/Picture';
4
+ import { adjustHref } from '../../utils/adjustHref';
5
+ import { isURL, joinPath } from '../../utils/url';
3
6
  import type { ImageProps } from './ImgProps';
4
7
 
5
- const sourcesComparator = (a: Picture, b: Picture) => {
6
- if (a.media && b.media) {
7
- return a.media - b.media;
8
- }
9
-
10
- return 0;
11
- };
8
+ const sourcesComparator = (a: Picture, b: Picture) =>
9
+ a?.media && b?.media ? a.media - b.media : 0;
12
10
 
13
11
  export const ImgAsPicture = JSX<ImageProps>(
14
12
  ({ className = '', image, imageClassName = '', isMobile = false, pathPrefix }) => {
15
- if (!image || (!image?.sources && !image?.src)) {
16
- return null;
17
- }
13
+ const router = useRouter();
18
14
 
19
15
  const pictureStyles = isMobile ? 'flex' : 'flex-none';
20
16
 
@@ -22,22 +18,25 @@ export const ImgAsPicture = JSX<ImageProps>(
22
18
  <picture className={`${pictureStyles} ${className}`}>
23
19
  {image?.sources?.length
24
20
  ? image.sources
21
+ .filter((_) => _?.src)
25
22
  .sort(sourcesComparator)
26
23
  .map(({ src, format, media }, index) => (
27
24
  <source
28
25
  key={`${index}_${src}`}
29
- srcSet={addPathPrefixToSrcSet(src, pathPrefix)}
26
+ srcSet={adjustSrcset(router, pathPrefix)(src)}
30
27
  type={formatToMimeType(format)}
31
28
  media={media ? `(max-width: ${media}px)` : ''}
32
29
  {...image.size}
33
30
  />
34
31
  ))
35
32
  : null}
36
- {renderImg(
37
- { ...image, src: addPathPrefixToSrc(image.src, pathPrefix) },
38
- imageClassName,
39
- isMobile,
40
- )}
33
+ {image?.src
34
+ ? renderImg(
35
+ { ...image, src: adjustSrcset(router, pathPrefix)(image.src) },
36
+ imageClassName,
37
+ isMobile,
38
+ )
39
+ : null}
41
40
  </picture>
42
41
  );
43
42
  },
@@ -65,18 +64,14 @@ const renderImg = (image: Picture, imageClassName = '', isMobile = false) => {
65
64
  );
66
65
  };
67
66
 
68
- const normalizePathPrefix = (pathPrefix = '') =>
69
- pathPrefix && !pathPrefix.endsWith('/') ? `${pathPrefix}/` : pathPrefix;
70
-
71
- const addPathPrefixToSrc = (src?: string, pathPrefix?: string) =>
72
- !src || src?.startsWith('data:image') ? src : `${normalizePathPrefix(pathPrefix)}${src}`;
73
-
74
- const addPathPrefixToSrcSet = (srcset?: string, pathPrefix?: string) =>
67
+ const adjustSrcset = (router: Router, pathPrefix?: string) => (srcset: string | undefined) =>
75
68
  srcset
76
- ?.split(',')
77
- .map((src) => addPathPrefixToSrc(src.trim(), pathPrefix))
69
+ ?.split(/\s*,\s*/)
70
+ .map((src) => src.trim())
71
+ .filter(Boolean)
72
+ .map((src) => (isURL(src) ? src : joinPath(pathPrefix, src)))
73
+ .map(adjustHref(router))
78
74
  .join(', ');
79
75
 
80
- export function formatToMimeType(format: ImgSource['format']): string | undefined {
81
- return format ? `image/${String(format)}` : undefined;
82
- }
76
+ const formatToMimeType = (format: ImgSource['format']) =>
77
+ format ? `image/${String(format)}` : undefined;
@@ -0,0 +1,17 @@
1
+ import { projectSettings } from '../ProjectSettings';
2
+ import { dirname } from './dirname';
3
+ import { isURL, joinPath } from './url';
4
+
5
+ export const adjustHref = (router: { pathname: string }) => (href: string | undefined) => {
6
+ if (!href || isURL(href) || (projectSettings.CDN && href.startsWith(projectSettings.CDN))) {
7
+ return href;
8
+ }
9
+
10
+ const isRelativeToBase = href.startsWith('/');
11
+
12
+ return joinPath(
13
+ projectSettings.BASE_PATH,
14
+ isRelativeToBase ? '/' : dirname(router.pathname),
15
+ href,
16
+ );
17
+ };
@@ -0,0 +1 @@
1
+ export const dirname = (path: string | undefined) => path?.split('/').slice(0, -1).join('/');
package/src/utils/url.ts CHANGED
@@ -1,7 +1,6 @@
1
1
  import type { Target } from '../model/LinkProps';
2
2
 
3
- export const isURL = (href?: string): href is `${string}//${string}` =>
4
- Boolean(href?.includes('//'));
3
+ export const isURL = (href?: string): href is `${string}:${string}` => Boolean(href?.includes(':'));
5
4
 
6
5
  export const isLocalURL = (href: string | undefined, target?: Target) =>
7
6
  Boolean(href && !isURL(href) && (!target || target === '_self'));
@@ -11,5 +10,5 @@ export const isHash = (href?: string): href is `#${string}` => Boolean(href?.sta
11
10
  export const withoutQuery = (href?: string): string =>
12
11
  (href || '').replace(/\?.*/, '').replace(/\/$/, '');
13
12
 
14
- export const joinPath = (...path: string[]): string =>
13
+ export const joinPath = (...path: (string | undefined)[]): string =>
15
14
  path.filter(Boolean).join('/').replace(/\/+/g, '/');
package/src/wlc.json CHANGED
@@ -2,6 +2,5 @@
2
2
  "PROD_BRANCH": "master",
3
3
  "FORCED_DRAFT_FLOW": false,
4
4
  "YANDEX_MAP_API_KEY": "f4b40c1e-1891-45f2-b307-90c481af210b",
5
- "BASE_PATH": "/natural/",
6
5
  "SITEMAP": "sayt-rshb"
7
6
  }
@@ -1,2 +0,0 @@
1
- import type { Picture } from '../model/Picture';
2
- export declare const checkIsIconRenderable: (icon?: Picture) => boolean;
@@ -1,19 +0,0 @@
1
- Object.defineProperty(exports, "__esModule", { value: true });
2
- exports.renderStepContent = void 0;
3
- const jsx_runtime_1 = require("@redneckz/uni-jsx/jsx-runtime");
4
- const Button_1 = require("../../ui-kit/Button/Button");
5
- const List_1 = require("../../ui-kit/List/List");
6
- const renderStepContent = ({ styleMap, isMainButton, version, }) => (step, i, { length }) => {
7
- const { label, description, button, items, isDotted } = step;
8
- const contentMarginClass = label && (description || items) ? 'mt-2' : '';
9
- return ((0, jsx_runtime_1.jsxs)("div", { className: `relative flex flex-col items-center text-center whitespace-pre-line overflow-hidden ${getContainerWidth(length)}`, children: [(0, jsx_runtime_1.jsxs)("div", { className: `${button?.text ? 'mb-8' : ''} text-center`, children: [renderStepLabel(label), (0, jsx_runtime_1.jsxs)("div", { className: `${contentMarginClass} flex flex-col items-center`, children: [renderStepDescription({
10
- description,
11
- className: styleMap.description,
12
- }), (0, jsx_runtime_1.jsx)(List_1.List, { className: getItemsClasses({ className: 'text-left', description, styleMap }), items: items, listItemSize: "M", isDotted: isDotted })] })] }), button?.text && !isMainButton ? ((0, jsx_runtime_1.jsx)(Button_1.Button, { className: "box-border py-3 h-12 w-full max-w-[240px] mt-auto", version: version, ...button, children: button?.text })) : null] }, String(i)));
13
- };
14
- exports.renderStepContent = renderStepContent;
15
- const renderStepLabel = (label) => label ? (0, jsx_runtime_1.jsx)("div", { className: "text-h6", children: label }) : null;
16
- const renderStepDescription = ({ description, className = '', }) => (description ? (0, jsx_runtime_1.jsx)("div", { className: className, children: description }) : null);
17
- const getItemsClasses = ({ className, description, styleMap, }) => [description ? styleMap.description : 'text-h6', description ? 'mt-0.5' : '', className].join(' ');
18
- const getContainerWidth = (length) => (length < 5 ? 'w-[276px]' : 'w-[210px]');
19
- //# sourceMappingURL=renderStepContent.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"renderStepContent.js","sourceRoot":"","sources":["../../../src/components/StepsBlock/renderStepContent.tsx"],"names":[],"mappings":";;;AAGA,uDAAoD;AACpD,iDAA8C;AAIvC,MAAM,iBAAiB,GAC5B,CAAC,EACC,QAAQ,EACR,YAAY,EACZ,OAAO,GAKR,EAAE,EAAE,CACL,CAAC,IAAU,EAAE,CAAS,EAAE,EAAE,MAAM,EAAsB,EAAS,EAAE;IAC/D,MAAM,EAAE,KAAK,EAAE,WAAW,EAAE,MAAM,EAAE,KAAK,EAAE,QAAQ,EAAE,GAAG,IAAI,CAAC;IAE7D,MAAM,kBAAkB,GAAG,KAAK,IAAI,CAAC,WAAW,IAAI,KAAK,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC;IAEzE,OAAO,CACL,iCAEE,SAAS,EAAE,uFAAuF,iBAAiB,CACjH,MAAM,CACP,EAAE,aAEH,iCAAK,SAAS,EAAE,GAAG,MAAM,EAAE,IAAI,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,eAAe,aACzD,eAAe,CAAC,KAAK,CAAC,EACvB,iCAAK,SAAS,EAAE,GAAG,kBAAkB,6BAA6B,aAC/D,qBAAqB,CAAC;gCACrB,WAAW;gCACX,SAAS,EAAE,QAAQ,CAAC,WAAW;6BAChC,CAAC,EACF,uBAAC,WAAI,IACH,SAAS,EAAE,eAAe,CAAC,EAAE,SAAS,EAAE,WAAW,EAAE,WAAW,EAAE,QAAQ,EAAE,CAAC,EAC7E,KAAK,EAAE,KAAK,EACZ,YAAY,EAAC,GAAG,EAChB,QAAQ,EAAE,QAAQ,GAClB,IACE,IACF,EACL,MAAM,EAAE,IAAI,IAAI,CAAC,YAAY,CAAC,CAAC,CAAC,CAC/B,uBAAC,eAAM,IACL,SAAS,EAAC,mDAAmD,EAC7D,OAAO,EAAE,OAAwB,KAC7B,MAAM,YAET,MAAM,EAAE,IAAI,GACN,CACV,CAAC,CAAC,CAAC,IAAI,KA5BH,MAAM,CAAC,CAAC,CAAC,CA6BV,CACP,CAAC;AACJ,CAAC,CAAC;AAhDS,QAAA,iBAAiB,qBAgD1B;AAEJ,MAAM,eAAe,GAAG,CAAC,KAAc,EAAS,EAAE,CAChD,KAAK,CAAC,CAAC,CAAC,gCAAK,SAAS,EAAC,SAAS,YAAE,KAAK,GAAO,CAAC,CAAC,CAAC,IAAI,CAAC;AAExD,MAAM,qBAAqB,GAAG,CAAC,EAC7B,WAAW,EACX,SAAS,GAAG,EAAE,GAIf,EAAS,EAAE,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,gCAAK,SAAS,EAAE,SAAS,YAAG,WAAW,GAAO,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC;AAEnF,MAAM,eAAe,GAAG,CAAC,EACvB,SAAS,EACT,WAAW,EACX,QAAQ,GAKT,EAAU,EAAE,CACX,CAAC,WAAW,CAAC,CAAC,CAAC,QAAQ,CAAC,WAAW,CAAC,CAAC,CAAC,SAAS,EAAE,WAAW,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,EAAE,EAAE,SAAS,CAAC,CAAC,IAAI,CAC3F,GAAG,CACJ,CAAC;AAEJ,MAAM,iBAAiB,GAAG,CAAC,MAAc,EAAU,EAAE,CAAC,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC"}
@@ -1,2 +0,0 @@
1
- import type { Picture } from '../model/Picture';
2
- export declare const checkIsIconRenderable: (icon?: Picture) => boolean;
@@ -1,5 +0,0 @@
1
- Object.defineProperty(exports, "__esModule", { value: true });
2
- exports.checkIsIconRenderable = void 0;
3
- const checkIsIconRenderable = (icon) => Boolean(icon?.icon || icon?.src);
4
- exports.checkIsIconRenderable = checkIsIconRenderable;
5
- //# sourceMappingURL=checkIsIconRenderable.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"checkIsIconRenderable.js","sourceRoot":"","sources":["../../src/utils/checkIsIconRenderable.tsx"],"names":[],"mappings":";;AAEO,MAAM,qBAAqB,GAAG,CAAC,IAAc,EAAE,EAAE,CAAC,OAAO,CAAC,IAAI,EAAE,IAAI,IAAI,IAAI,EAAE,GAAG,CAAC,CAAC;AAA7E,QAAA,qBAAqB,yBAAwD"}
@@ -1,16 +0,0 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "@redneckz/uni-jsx/jsx-runtime";
2
- import { Button } from '../../ui-kit/Button/Button.js';
3
- import { List } from '../../ui-kit/List/List.js';
4
- export const renderStepContent = ({ styleMap, isMainButton, version, }) => (step, i, { length }) => {
5
- const { label, description, button, items, isDotted } = step;
6
- const contentMarginClass = label && (description || items) ? 'mt-2' : '';
7
- return (_jsxs("div", { className: `relative flex flex-col items-center text-center whitespace-pre-line overflow-hidden ${getContainerWidth(length)}`, children: [_jsxs("div", { className: `${button?.text ? 'mb-8' : ''} text-center`, children: [renderStepLabel(label), _jsxs("div", { className: `${contentMarginClass} flex flex-col items-center`, children: [renderStepDescription({
8
- description,
9
- className: styleMap.description,
10
- }), _jsx(List, { className: getItemsClasses({ className: 'text-left', description, styleMap }), items: items, listItemSize: "M", isDotted: isDotted })] })] }), button?.text && !isMainButton ? (_jsx(Button, { className: "box-border py-3 h-12 w-full max-w-[240px] mt-auto", version: version, ...button, children: button?.text })) : null] }, String(i)));
11
- };
12
- const renderStepLabel = (label) => label ? _jsx("div", { className: "text-h6", children: label }) : null;
13
- const renderStepDescription = ({ description, className = '', }) => (description ? _jsx("div", { className: className, children: description }) : null);
14
- const getItemsClasses = ({ className, description, styleMap, }) => [description ? styleMap.description : 'text-h6', description ? 'mt-0.5' : '', className].join(' ');
15
- const getContainerWidth = (length) => (length < 5 ? 'w-[276px]' : 'w-[210px]');
16
- //# sourceMappingURL=renderStepContent.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"renderStepContent.js","sourceRoot":"","sources":["../../../src/components/StepsBlock/renderStepContent.tsx"],"names":[],"mappings":";AAGA,OAAO,EAAE,MAAM,EAAE,MAAM,4BAA4B,CAAC;AACpD,OAAO,EAAE,IAAI,EAAE,MAAM,wBAAwB,CAAC;AAI9C,MAAM,CAAC,MAAM,iBAAiB,GAC5B,CAAC,EACC,QAAQ,EACR,YAAY,EACZ,OAAO,GAKR,EAAE,EAAE,CACL,CAAC,IAAU,EAAE,CAAS,EAAE,EAAE,MAAM,EAAsB,EAAS,EAAE;IAC/D,MAAM,EAAE,KAAK,EAAE,WAAW,EAAE,MAAM,EAAE,KAAK,EAAE,QAAQ,EAAE,GAAG,IAAI,CAAC;IAE7D,MAAM,kBAAkB,GAAG,KAAK,IAAI,CAAC,WAAW,IAAI,KAAK,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC;IAEzE,OAAO,CACL,eAEE,SAAS,EAAE,uFAAuF,iBAAiB,CACjH,MAAM,CACP,EAAE,aAEH,eAAK,SAAS,EAAE,GAAG,MAAM,EAAE,IAAI,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,eAAe,aACzD,eAAe,CAAC,KAAK,CAAC,EACvB,eAAK,SAAS,EAAE,GAAG,kBAAkB,6BAA6B,aAC/D,qBAAqB,CAAC;gCACrB,WAAW;gCACX,SAAS,EAAE,QAAQ,CAAC,WAAW;6BAChC,CAAC,EACF,KAAC,IAAI,IACH,SAAS,EAAE,eAAe,CAAC,EAAE,SAAS,EAAE,WAAW,EAAE,WAAW,EAAE,QAAQ,EAAE,CAAC,EAC7E,KAAK,EAAE,KAAK,EACZ,YAAY,EAAC,GAAG,EAChB,QAAQ,EAAE,QAAQ,GAClB,IACE,IACF,EACL,MAAM,EAAE,IAAI,IAAI,CAAC,YAAY,CAAC,CAAC,CAAC,CAC/B,KAAC,MAAM,IACL,SAAS,EAAC,mDAAmD,EAC7D,OAAO,EAAE,OAAwB,KAC7B,MAAM,YAET,MAAM,EAAE,IAAI,GACN,CACV,CAAC,CAAC,CAAC,IAAI,KA5BH,MAAM,CAAC,CAAC,CAAC,CA6BV,CACP,CAAC;AACJ,CAAC,CAAC;AAEJ,MAAM,eAAe,GAAG,CAAC,KAAc,EAAS,EAAE,CAChD,KAAK,CAAC,CAAC,CAAC,cAAK,SAAS,EAAC,SAAS,YAAE,KAAK,GAAO,CAAC,CAAC,CAAC,IAAI,CAAC;AAExD,MAAM,qBAAqB,GAAG,CAAC,EAC7B,WAAW,EACX,SAAS,GAAG,EAAE,GAIf,EAAS,EAAE,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,cAAK,SAAS,EAAE,SAAS,YAAG,WAAW,GAAO,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC;AAEnF,MAAM,eAAe,GAAG,CAAC,EACvB,SAAS,EACT,WAAW,EACX,QAAQ,GAKT,EAAU,EAAE,CACX,CAAC,WAAW,CAAC,CAAC,CAAC,QAAQ,CAAC,WAAW,CAAC,CAAC,CAAC,SAAS,EAAE,WAAW,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,EAAE,EAAE,SAAS,CAAC,CAAC,IAAI,CAC3F,GAAG,CACJ,CAAC;AAEJ,MAAM,iBAAiB,GAAG,CAAC,MAAc,EAAU,EAAE,CAAC,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC"}
@@ -1,2 +0,0 @@
1
- import type { Picture } from '../model/Picture';
2
- export declare const checkIsIconRenderable: (icon?: Picture) => boolean;
@@ -1,2 +0,0 @@
1
- export const checkIsIconRenderable = (icon) => Boolean(icon?.icon || icon?.src);
2
- //# sourceMappingURL=checkIsIconRenderable.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"checkIsIconRenderable.js","sourceRoot":"","sources":["../../src/utils/checkIsIconRenderable.tsx"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,qBAAqB,GAAG,CAAC,IAAc,EAAE,EAAE,CAAC,OAAO,CAAC,IAAI,EAAE,IAAI,IAAI,IAAI,EAAE,GAAG,CAAC,CAAC"}
@@ -1,2 +0,0 @@
1
- import type { Picture } from '../model/Picture';
2
- export declare const checkIsIconRenderable: (icon?: Picture) => boolean;
@@ -1,11 +0,0 @@
1
- import type { BlockVersion } from '../../model/BlockVersion';
2
- import type { VNode } from '../../model/VNode';
3
- import type { Step } from './StepsBlockContent';
4
- import type { StyleType } from './StepsBlockStyleMaps';
5
- export declare const renderStepContent: ({ styleMap, isMainButton, version, }: {
6
- styleMap: StyleType;
7
- isMainButton: boolean;
8
- version?: BlockVersion | undefined;
9
- }) => (step: Step, i: number, { length }: {
10
- length: number;
11
- }) => VNode;
@@ -1,19 +0,0 @@
1
- Object.defineProperty(exports, "__esModule", { value: true });
2
- exports.renderStepContent = void 0;
3
- const jsx_runtime_1 = require("@redneckz/uni-jsx/jsx-runtime");
4
- const Button_1 = require("../../ui-kit/Button/Button");
5
- const List_1 = require("../../ui-kit/List/List");
6
- const renderStepContent = ({ styleMap, isMainButton, version, }) => (step, i, { length }) => {
7
- const { label, description, button, items, isDotted } = step;
8
- const contentMarginClass = label && (description || items) ? 'mt-2' : '';
9
- return ((0, jsx_runtime_1.jsxs)("div", { className: `relative flex flex-col items-center text-center whitespace-pre-line overflow-hidden ${getContainerWidth(length)}`, children: [(0, jsx_runtime_1.jsxs)("div", { className: `${button?.text ? 'mb-8' : ''} text-center`, children: [renderStepLabel(label), (0, jsx_runtime_1.jsxs)("div", { className: `${contentMarginClass} flex flex-col items-center`, children: [renderStepDescription({
10
- description,
11
- className: styleMap.description,
12
- }), (0, jsx_runtime_1.jsx)(List_1.List, { className: getItemsClasses({ className: 'text-left', description, styleMap }), items: items, listItemSize: "M", isDotted: isDotted })] })] }), button?.text && !isMainButton ? ((0, jsx_runtime_1.jsx)(Button_1.Button, { className: "box-border py-3 h-12 w-full max-w-[240px] mt-auto", version: version, ...button, children: button?.text })) : null] }, String(i)));
13
- };
14
- exports.renderStepContent = renderStepContent;
15
- const renderStepLabel = (label) => label ? (0, jsx_runtime_1.jsx)("div", { className: "text-h6", children: label }) : null;
16
- const renderStepDescription = ({ description, className = '', }) => (description ? (0, jsx_runtime_1.jsx)("div", { className: className, children: description }) : null);
17
- const getItemsClasses = ({ className, description, styleMap, }) => [description ? styleMap.description : 'text-h6', description ? 'mt-0.5' : '', className].join(' ');
18
- const getContainerWidth = (length) => (length < 5 ? 'w-[276px]' : 'w-[210px]');
19
- //# sourceMappingURL=renderStepContent.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"renderStepContent.js","sourceRoot":"","sources":["../../../src/components/StepsBlock/renderStepContent.tsx"],"names":[],"mappings":";;;AAGA,uDAAoD;AACpD,iDAA8C;AAIvC,MAAM,iBAAiB,GAC5B,CAAC,EACC,QAAQ,EACR,YAAY,EACZ,OAAO,GAKR,EAAE,EAAE,CACL,CAAC,IAAU,EAAE,CAAS,EAAE,EAAE,MAAM,EAAsB,EAAS,EAAE;IAC/D,MAAM,EAAE,KAAK,EAAE,WAAW,EAAE,MAAM,EAAE,KAAK,EAAE,QAAQ,EAAE,GAAG,IAAI,CAAC;IAE7D,MAAM,kBAAkB,GAAG,KAAK,IAAI,CAAC,WAAW,IAAI,KAAK,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC;IAEzE,OAAO,CACL,iCAEE,SAAS,EAAE,uFAAuF,iBAAiB,CACjH,MAAM,CACP,EAAE,aAEH,iCAAK,SAAS,EAAE,GAAG,MAAM,EAAE,IAAI,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,eAAe,aACzD,eAAe,CAAC,KAAK,CAAC,EACvB,iCAAK,SAAS,EAAE,GAAG,kBAAkB,6BAA6B,aAC/D,qBAAqB,CAAC;gCACrB,WAAW;gCACX,SAAS,EAAE,QAAQ,CAAC,WAAW;6BAChC,CAAC,EACF,uBAAC,WAAI,IACH,SAAS,EAAE,eAAe,CAAC,EAAE,SAAS,EAAE,WAAW,EAAE,WAAW,EAAE,QAAQ,EAAE,CAAC,EAC7E,KAAK,EAAE,KAAK,EACZ,YAAY,EAAC,GAAG,EAChB,QAAQ,EAAE,QAAQ,GAClB,IACE,IACF,EACL,MAAM,EAAE,IAAI,IAAI,CAAC,YAAY,CAAC,CAAC,CAAC,CAC/B,uBAAC,eAAM,IACL,SAAS,EAAC,mDAAmD,EAC7D,OAAO,EAAE,OAAwB,KAC7B,MAAM,YAET,MAAM,EAAE,IAAI,GACN,CACV,CAAC,CAAC,CAAC,IAAI,KA5BH,MAAM,CAAC,CAAC,CAAC,CA6BV,CACP,CAAC;AACJ,CAAC,CAAC;AAhDS,QAAA,iBAAiB,qBAgD1B;AAEJ,MAAM,eAAe,GAAG,CAAC,KAAc,EAAS,EAAE,CAChD,KAAK,CAAC,CAAC,CAAC,gCAAK,SAAS,EAAC,SAAS,YAAE,KAAK,GAAO,CAAC,CAAC,CAAC,IAAI,CAAC;AAExD,MAAM,qBAAqB,GAAG,CAAC,EAC7B,WAAW,EACX,SAAS,GAAG,EAAE,GAIf,EAAS,EAAE,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,gCAAK,SAAS,EAAE,SAAS,YAAG,WAAW,GAAO,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC;AAEnF,MAAM,eAAe,GAAG,CAAC,EACvB,SAAS,EACT,WAAW,EACX,QAAQ,GAKT,EAAU,EAAE,CACX,CAAC,WAAW,CAAC,CAAC,CAAC,QAAQ,CAAC,WAAW,CAAC,CAAC,CAAC,SAAS,EAAE,WAAW,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,EAAE,EAAE,SAAS,CAAC,CAAC,IAAI,CAC3F,GAAG,CACJ,CAAC;AAEJ,MAAM,iBAAiB,GAAG,CAAC,MAAc,EAAU,EAAE,CAAC,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC"}
@@ -1,2 +0,0 @@
1
- import type { Picture } from '../model/Picture';
2
- export declare const checkIsIconRenderable: (icon?: Picture) => boolean;
@@ -1,5 +0,0 @@
1
- Object.defineProperty(exports, "__esModule", { value: true });
2
- exports.checkIsIconRenderable = void 0;
3
- const checkIsIconRenderable = (icon) => Boolean(icon?.icon || icon?.src);
4
- exports.checkIsIconRenderable = checkIsIconRenderable;
5
- //# sourceMappingURL=checkIsIconRenderable.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"checkIsIconRenderable.js","sourceRoot":"","sources":["../../src/utils/checkIsIconRenderable.tsx"],"names":[],"mappings":";;AAEO,MAAM,qBAAqB,GAAG,CAAC,IAAc,EAAE,EAAE,CAAC,OAAO,CAAC,IAAI,EAAE,IAAI,IAAI,IAAI,EAAE,GAAG,CAAC,CAAC;AAA7E,QAAA,qBAAqB,yBAAwD"}
@@ -1,11 +0,0 @@
1
- import type { BlockVersion } from '../../model/BlockVersion';
2
- import type { VNode } from '../../model/VNode';
3
- import type { Step } from './StepsBlockContent';
4
- import type { StyleType } from './StepsBlockStyleMaps';
5
- export declare const renderStepContent: ({ styleMap, isMainButton, version, }: {
6
- styleMap: StyleType;
7
- isMainButton: boolean;
8
- version?: BlockVersion | undefined;
9
- }) => (step: Step, i: number, { length }: {
10
- length: number;
11
- }) => VNode;