@redneckz/wildless-cms-uni-blocks 0.14.29 → 0.14.31

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 (455) hide show
  1. package/bin/migration-scripts/0.14.29.js +4 -34
  2. package/bin/migration-scripts/0.14.30.js +54 -0
  3. package/bin/utils.js +36 -0
  4. package/bundle/blocks.schema.json +1 -1
  5. package/bundle/bundle.umd.js +201 -89
  6. package/bundle/bundle.umd.min.js +1 -1
  7. package/bundle/components/Calculator/RefinancingCalculatorForm.d.ts +1 -0
  8. package/bundle/components/Calculator/renderBinaryRadioButtonGroup.d.ts +2 -1
  9. package/bundle/components/OfficesAtmsMap/CardCell.d.ts +3 -2
  10. package/bundle/components/OfficesAtmsMap/OfficesAtmsMapProps.d.ts +5 -0
  11. package/bundle/components/OfficesAtmsMap/getScheduleDescription.d.ts +4 -0
  12. package/bundle/components/OfficesAtmsMap/getWorkScheduleWeek.d.ts +3 -0
  13. package/bundle/components/OfficesAtmsMap/renderBusinessSchedule.d.ts +8 -0
  14. package/bundle/components/OfficesAtmsMap/renderOfficeCard.d.ts +2 -2
  15. package/bundle/hooks/useResizeObserver.d.ts +3 -0
  16. package/bundle/ui-kit/BaseProductTile/BaseProductTileContent.d.ts +9 -1
  17. package/bundle/ui-kit/List/List.d.ts +2 -0
  18. package/bundle/ui-kit/PriceList/PriceList.d.ts +2 -0
  19. package/bundle/ui-kit/PriceList/PriceListProps.d.ts +9 -0
  20. package/bundle/ui-kit/Select/SelectPopup.d.ts +5 -3
  21. package/bundle/ui-kit/Select/useSelectPopup.d.ts +1 -1
  22. package/dist/components/BenefitsBlock/BenefitsBlock.js +3 -1
  23. package/dist/components/BenefitsBlock/BenefitsBlock.js.map +1 -1
  24. package/dist/components/Blocks.js +0 -2
  25. package/dist/components/Blocks.js.map +1 -1
  26. package/dist/components/Blocks.mobile.js +0 -2
  27. package/dist/components/Blocks.mobile.js.map +1 -1
  28. package/dist/components/Calculator/CreditCalculatorForm.js +3 -2
  29. package/dist/components/Calculator/CreditCalculatorForm.js.map +1 -1
  30. package/dist/components/Calculator/RefinancingCalculatorForm.d.ts +1 -0
  31. package/dist/components/Calculator/RefinancingCalculatorForm.js +9 -3
  32. package/dist/components/Calculator/RefinancingCalculatorForm.js.map +1 -1
  33. package/dist/components/Calculator/renderBinaryRadioButtonGroup.d.ts +2 -1
  34. package/dist/components/Calculator/renderBinaryRadioButtonGroup.js +1 -1
  35. package/dist/components/Calculator/renderBinaryRadioButtonGroup.js.map +1 -1
  36. package/dist/components/CarouselCard/CarouselCard.js +1 -1
  37. package/dist/components/CarouselCard/CarouselCard.js.map +1 -1
  38. package/dist/components/Depository/Depository.js +12 -3
  39. package/dist/components/Depository/Depository.js.map +1 -1
  40. package/dist/components/Depository/DepositoryFilter.js +1 -1
  41. package/dist/components/Depository/DepositoryFilter.js.map +1 -1
  42. package/dist/components/Depository/DepositoryItem.js +1 -1
  43. package/dist/components/Depository/DepositoryItem.js.map +1 -1
  44. package/dist/components/Depository/useDepository.js +11 -1
  45. package/dist/components/Depository/useDepository.js.map +1 -1
  46. package/dist/components/OfficesAtmsMap/Badge.js +2 -2
  47. package/dist/components/OfficesAtmsMap/Badge.js.map +1 -1
  48. package/dist/components/OfficesAtmsMap/CardCell.d.ts +3 -2
  49. package/dist/components/OfficesAtmsMap/CardCell.js +6 -4
  50. package/dist/components/OfficesAtmsMap/CardCell.js.map +1 -1
  51. package/dist/components/OfficesAtmsMap/OfficesAtmsMapProps.d.ts +5 -0
  52. package/dist/components/OfficesAtmsMap/getScheduleDescription.d.ts +4 -0
  53. package/dist/components/OfficesAtmsMap/getScheduleDescription.js +36 -0
  54. package/dist/components/OfficesAtmsMap/getScheduleDescription.js.map +1 -0
  55. package/dist/components/OfficesAtmsMap/getWorkScheduleWeek.d.ts +3 -0
  56. package/dist/components/OfficesAtmsMap/getWorkScheduleWeek.js +28 -0
  57. package/dist/components/OfficesAtmsMap/getWorkScheduleWeek.js.map +1 -0
  58. package/dist/components/OfficesAtmsMap/renderBusinessSchedule.d.ts +8 -0
  59. package/dist/components/OfficesAtmsMap/renderBusinessSchedule.js +32 -0
  60. package/dist/components/OfficesAtmsMap/renderBusinessSchedule.js.map +1 -0
  61. package/dist/components/OfficesAtmsMap/renderOfficeCard.d.ts +2 -2
  62. package/dist/components/OfficesAtmsMap/renderOfficeCard.js +24 -28
  63. package/dist/components/OfficesAtmsMap/renderOfficeCard.js.map +1 -1
  64. package/dist/components/StepsBlock/StepsBlock.js +3 -2
  65. package/dist/components/StepsBlock/StepsBlock.js.map +1 -1
  66. package/dist/hooks/useResizeObserver.d.ts +3 -0
  67. package/dist/hooks/useResizeObserver.js +22 -0
  68. package/dist/hooks/useResizeObserver.js.map +1 -0
  69. package/dist/ui-kit/BaseProductTile/BaseProductTile.js +3 -2
  70. package/dist/ui-kit/BaseProductTile/BaseProductTile.js.map +1 -1
  71. package/dist/ui-kit/BaseProductTile/BaseProductTileContent.d.ts +9 -1
  72. package/dist/ui-kit/DatePicker/DatePicker.js +1 -1
  73. package/dist/ui-kit/DatePicker/DatePicker.js.map +1 -1
  74. package/dist/ui-kit/Foldable/FoldableSection.js +5 -4
  75. package/dist/ui-kit/Foldable/FoldableSection.js.map +1 -1
  76. package/dist/ui-kit/List/List.d.ts +2 -0
  77. package/dist/ui-kit/List/List.js +3 -3
  78. package/dist/ui-kit/List/List.js.map +1 -1
  79. package/dist/ui-kit/PriceList/PriceList.d.ts +2 -0
  80. package/dist/ui-kit/PriceList/PriceList.js +9 -0
  81. package/dist/ui-kit/PriceList/PriceList.js.map +1 -0
  82. package/dist/ui-kit/PriceList/PriceListProps.d.ts +9 -0
  83. package/dist/{components/PictureText/PictureTextContent.js → ui-kit/PriceList/PriceListProps.js} +1 -1
  84. package/dist/ui-kit/PriceList/PriceListProps.js.map +1 -0
  85. package/dist/ui-kit/Select/Select.js +1 -0
  86. package/dist/ui-kit/Select/Select.js.map +1 -1
  87. package/dist/ui-kit/Select/SelectPopup.d.ts +5 -3
  88. package/dist/ui-kit/Select/SelectPopup.js +2 -2
  89. package/dist/ui-kit/Select/SelectPopup.js.map +1 -1
  90. package/dist/ui-kit/Select/useSelectPopup.d.ts +1 -1
  91. package/dist/ui-kit/Select/useSelectPopup.js +2 -2
  92. package/dist/ui-kit/Select/useSelectPopup.js.map +1 -1
  93. package/lib/common.css +1 -1
  94. package/lib/components/BenefitsBlock/BenefitsBlock.js +3 -1
  95. package/lib/components/BenefitsBlock/BenefitsBlock.js.map +1 -1
  96. package/lib/components/Blocks.js +0 -2
  97. package/lib/components/Blocks.js.map +1 -1
  98. package/lib/components/Blocks.mobile.js +0 -2
  99. package/lib/components/Blocks.mobile.js.map +1 -1
  100. package/lib/components/Calculator/CreditCalculatorForm.js +3 -2
  101. package/lib/components/Calculator/CreditCalculatorForm.js.map +1 -1
  102. package/lib/components/Calculator/RefinancingCalculatorForm.d.ts +1 -0
  103. package/lib/components/Calculator/RefinancingCalculatorForm.js +10 -4
  104. package/lib/components/Calculator/RefinancingCalculatorForm.js.map +1 -1
  105. package/lib/components/Calculator/renderBinaryRadioButtonGroup.d.ts +2 -1
  106. package/lib/components/Calculator/renderBinaryRadioButtonGroup.js +1 -1
  107. package/lib/components/Calculator/renderBinaryRadioButtonGroup.js.map +1 -1
  108. package/lib/components/CarouselCard/CarouselCard.js +1 -1
  109. package/lib/components/CarouselCard/CarouselCard.js.map +1 -1
  110. package/lib/components/Depository/Depository.js +12 -3
  111. package/lib/components/Depository/Depository.js.map +1 -1
  112. package/lib/components/Depository/DepositoryFilter.js +1 -1
  113. package/lib/components/Depository/DepositoryFilter.js.map +1 -1
  114. package/lib/components/Depository/DepositoryItem.js +1 -1
  115. package/lib/components/Depository/DepositoryItem.js.map +1 -1
  116. package/lib/components/Depository/useDepository.js +11 -1
  117. package/lib/components/Depository/useDepository.js.map +1 -1
  118. package/lib/components/OfficesAtmsMap/Badge.js +2 -2
  119. package/lib/components/OfficesAtmsMap/Badge.js.map +1 -1
  120. package/lib/components/OfficesAtmsMap/CardCell.d.ts +3 -2
  121. package/lib/components/OfficesAtmsMap/CardCell.js +6 -4
  122. package/lib/components/OfficesAtmsMap/CardCell.js.map +1 -1
  123. package/lib/components/OfficesAtmsMap/OfficesAtmsMapProps.d.ts +5 -0
  124. package/lib/components/OfficesAtmsMap/getScheduleDescription.d.ts +4 -0
  125. package/lib/components/OfficesAtmsMap/getScheduleDescription.js +32 -0
  126. package/lib/components/OfficesAtmsMap/getScheduleDescription.js.map +1 -0
  127. package/lib/components/OfficesAtmsMap/getWorkScheduleWeek.d.ts +3 -0
  128. package/lib/components/OfficesAtmsMap/getWorkScheduleWeek.js +25 -0
  129. package/lib/components/OfficesAtmsMap/getWorkScheduleWeek.js.map +1 -0
  130. package/lib/components/OfficesAtmsMap/renderBusinessSchedule.d.ts +8 -0
  131. package/lib/components/OfficesAtmsMap/renderBusinessSchedule.js +27 -0
  132. package/lib/components/OfficesAtmsMap/renderBusinessSchedule.js.map +1 -0
  133. package/lib/components/OfficesAtmsMap/renderOfficeCard.d.ts +2 -2
  134. package/lib/components/OfficesAtmsMap/renderOfficeCard.js +24 -28
  135. package/lib/components/OfficesAtmsMap/renderOfficeCard.js.map +1 -1
  136. package/lib/components/ProductBlock/ProductBlock.fixture.d.ts +1 -0
  137. package/lib/components/ProductBlock/ProductBlock.fixture.mobile.d.ts +1 -0
  138. package/lib/components/StepsBlock/StepsBlock.js +3 -2
  139. package/lib/components/StepsBlock/StepsBlock.js.map +1 -1
  140. package/lib/hooks/useResizeObserver.d.ts +3 -0
  141. package/lib/hooks/useResizeObserver.js +19 -0
  142. package/lib/hooks/useResizeObserver.js.map +1 -0
  143. package/lib/ui-kit/BaseProductTile/BaseProductTile.js +3 -2
  144. package/lib/ui-kit/BaseProductTile/BaseProductTile.js.map +1 -1
  145. package/lib/ui-kit/BaseProductTile/BaseProductTileContent.d.ts +9 -1
  146. package/lib/ui-kit/DatePicker/DatePicker.js +1 -1
  147. package/lib/ui-kit/DatePicker/DatePicker.js.map +1 -1
  148. package/lib/ui-kit/Foldable/FoldableSection.js +6 -5
  149. package/lib/ui-kit/Foldable/FoldableSection.js.map +1 -1
  150. package/lib/ui-kit/List/List.d.ts +2 -0
  151. package/lib/ui-kit/List/List.js +1 -1
  152. package/lib/ui-kit/List/List.js.map +1 -1
  153. package/lib/ui-kit/PriceList/PriceList.d.ts +2 -0
  154. package/lib/ui-kit/PriceList/PriceList.fixture.d.ts +6 -0
  155. package/lib/ui-kit/PriceList/PriceList.js +7 -0
  156. package/lib/ui-kit/PriceList/PriceList.js.map +1 -0
  157. package/lib/ui-kit/PriceList/PriceListProps.d.ts +9 -0
  158. package/lib/ui-kit/PriceList/PriceListProps.js +2 -0
  159. package/lib/ui-kit/PriceList/PriceListProps.js.map +1 -0
  160. package/lib/ui-kit/Select/Select.js +1 -0
  161. package/lib/ui-kit/Select/Select.js.map +1 -1
  162. package/lib/ui-kit/Select/SelectPopup.d.ts +5 -3
  163. package/lib/ui-kit/Select/SelectPopup.js +2 -2
  164. package/lib/ui-kit/Select/SelectPopup.js.map +1 -1
  165. package/lib/ui-kit/Select/useSelectPopup.d.ts +1 -1
  166. package/lib/ui-kit/Select/useSelectPopup.js +2 -2
  167. package/lib/ui-kit/Select/useSelectPopup.js.map +1 -1
  168. package/mobile/bundle/bundle.umd.js +70 -47
  169. package/mobile/bundle/bundle.umd.min.js +1 -1
  170. package/mobile/bundle/components/Calculator/RefinancingCalculatorForm.d.ts +1 -0
  171. package/mobile/bundle/components/Calculator/renderBinaryRadioButtonGroup.d.ts +2 -1
  172. package/mobile/bundle/components/OfficesAtmsMap/CardCell.d.ts +3 -2
  173. package/mobile/bundle/components/OfficesAtmsMap/OfficesAtmsMapProps.d.ts +5 -0
  174. package/mobile/bundle/components/OfficesAtmsMap/getScheduleDescription.d.ts +4 -0
  175. package/mobile/bundle/components/OfficesAtmsMap/getWorkScheduleWeek.d.ts +3 -0
  176. package/mobile/bundle/components/OfficesAtmsMap/renderBusinessSchedule.d.ts +8 -0
  177. package/mobile/bundle/components/OfficesAtmsMap/renderOfficeCard.d.ts +2 -2
  178. package/mobile/bundle/hooks/useResizeObserver.d.ts +3 -0
  179. package/mobile/bundle/ui-kit/BaseProductTile/BaseProductTileContent.d.ts +9 -1
  180. package/mobile/bundle/ui-kit/List/List.d.ts +2 -0
  181. package/mobile/bundle/ui-kit/PriceList/PriceList.d.ts +2 -0
  182. package/mobile/bundle/ui-kit/PriceList/PriceListProps.d.ts +9 -0
  183. package/mobile/bundle/ui-kit/Select/SelectPopup.d.ts +5 -3
  184. package/mobile/bundle/ui-kit/Select/useSelectPopup.d.ts +1 -1
  185. package/mobile/dist/components/BenefitsBlock/BenefitsBlock.js +3 -1
  186. package/mobile/dist/components/BenefitsBlock/BenefitsBlock.js.map +1 -1
  187. package/mobile/dist/components/Blocks.js +0 -2
  188. package/mobile/dist/components/Blocks.js.map +1 -1
  189. package/mobile/dist/components/Calculator/CreditCalculatorForm.js +3 -2
  190. package/mobile/dist/components/Calculator/CreditCalculatorForm.js.map +1 -1
  191. package/mobile/dist/components/Calculator/RefinancingCalculatorForm.d.ts +1 -0
  192. package/mobile/dist/components/Calculator/RefinancingCalculatorForm.js +9 -3
  193. package/mobile/dist/components/Calculator/RefinancingCalculatorForm.js.map +1 -1
  194. package/mobile/dist/components/Calculator/renderBinaryRadioButtonGroup.d.ts +2 -1
  195. package/mobile/dist/components/Calculator/renderBinaryRadioButtonGroup.js +1 -1
  196. package/mobile/dist/components/Calculator/renderBinaryRadioButtonGroup.js.map +1 -1
  197. package/mobile/dist/components/CarouselCard/CarouselCard.js +1 -1
  198. package/mobile/dist/components/CarouselCard/CarouselCard.js.map +1 -1
  199. package/mobile/dist/components/Depository/Depository.js +12 -3
  200. package/mobile/dist/components/Depository/Depository.js.map +1 -1
  201. package/mobile/dist/components/Depository/DepositoryFilter.js +1 -1
  202. package/mobile/dist/components/Depository/DepositoryFilter.js.map +1 -1
  203. package/mobile/dist/components/Depository/DepositoryItem.js +1 -1
  204. package/mobile/dist/components/Depository/DepositoryItem.js.map +1 -1
  205. package/mobile/dist/components/Depository/useDepository.js +11 -1
  206. package/mobile/dist/components/Depository/useDepository.js.map +1 -1
  207. package/mobile/dist/components/OfficesAtmsMap/Badge.js +2 -2
  208. package/mobile/dist/components/OfficesAtmsMap/Badge.js.map +1 -1
  209. package/mobile/dist/components/OfficesAtmsMap/CardCell.d.ts +3 -2
  210. package/mobile/dist/components/OfficesAtmsMap/CardCell.js +6 -4
  211. package/mobile/dist/components/OfficesAtmsMap/CardCell.js.map +1 -1
  212. package/mobile/dist/components/OfficesAtmsMap/OfficesAtmsMapProps.d.ts +5 -0
  213. package/mobile/dist/components/OfficesAtmsMap/getScheduleDescription.d.ts +4 -0
  214. package/mobile/dist/components/OfficesAtmsMap/getScheduleDescription.js +36 -0
  215. package/mobile/dist/components/OfficesAtmsMap/getScheduleDescription.js.map +1 -0
  216. package/mobile/dist/components/OfficesAtmsMap/getWorkScheduleWeek.d.ts +3 -0
  217. package/mobile/dist/components/OfficesAtmsMap/getWorkScheduleWeek.js +28 -0
  218. package/mobile/dist/components/OfficesAtmsMap/getWorkScheduleWeek.js.map +1 -0
  219. package/mobile/dist/components/OfficesAtmsMap/renderBusinessSchedule.d.ts +8 -0
  220. package/mobile/dist/components/OfficesAtmsMap/renderBusinessSchedule.js +32 -0
  221. package/mobile/dist/components/OfficesAtmsMap/renderBusinessSchedule.js.map +1 -0
  222. package/mobile/dist/components/OfficesAtmsMap/renderOfficeCard.d.ts +2 -2
  223. package/mobile/dist/components/OfficesAtmsMap/renderOfficeCard.js +24 -28
  224. package/mobile/dist/components/OfficesAtmsMap/renderOfficeCard.js.map +1 -1
  225. package/mobile/dist/hooks/useResizeObserver.d.ts +3 -0
  226. package/mobile/dist/hooks/useResizeObserver.js +22 -0
  227. package/mobile/dist/hooks/useResizeObserver.js.map +1 -0
  228. package/mobile/dist/ui-kit/BaseProductTile/BaseProductTile.js +3 -2
  229. package/mobile/dist/ui-kit/BaseProductTile/BaseProductTile.js.map +1 -1
  230. package/mobile/dist/ui-kit/BaseProductTile/BaseProductTileContent.d.ts +9 -1
  231. package/mobile/dist/ui-kit/DatePicker/DatePicker.js +1 -1
  232. package/mobile/dist/ui-kit/DatePicker/DatePicker.js.map +1 -1
  233. package/mobile/dist/ui-kit/Foldable/FoldableSection.js +5 -4
  234. package/mobile/dist/ui-kit/Foldable/FoldableSection.js.map +1 -1
  235. package/mobile/dist/ui-kit/List/List.d.ts +2 -0
  236. package/mobile/dist/ui-kit/List/List.js +3 -3
  237. package/mobile/dist/ui-kit/List/List.js.map +1 -1
  238. package/mobile/dist/ui-kit/PriceList/PriceList.d.ts +2 -0
  239. package/mobile/dist/ui-kit/PriceList/PriceList.js +9 -0
  240. package/mobile/dist/ui-kit/PriceList/PriceList.js.map +1 -0
  241. package/mobile/dist/ui-kit/PriceList/PriceListProps.d.ts +9 -0
  242. package/mobile/dist/{components/PictureText/PictureTextContent.js → ui-kit/PriceList/PriceListProps.js} +1 -1
  243. package/mobile/dist/ui-kit/PriceList/PriceListProps.js.map +1 -0
  244. package/mobile/dist/ui-kit/Select/Select.js +1 -0
  245. package/mobile/dist/ui-kit/Select/Select.js.map +1 -1
  246. package/mobile/dist/ui-kit/Select/SelectPopup.d.ts +5 -3
  247. package/mobile/dist/ui-kit/Select/SelectPopup.js +2 -2
  248. package/mobile/dist/ui-kit/Select/SelectPopup.js.map +1 -1
  249. package/mobile/dist/ui-kit/Select/useSelectPopup.d.ts +1 -1
  250. package/mobile/dist/ui-kit/Select/useSelectPopup.js +2 -2
  251. package/mobile/dist/ui-kit/Select/useSelectPopup.js.map +1 -1
  252. package/mobile/lib/common.css +1 -1
  253. package/mobile/lib/components/BenefitsBlock/BenefitsBlock.js +3 -1
  254. package/mobile/lib/components/BenefitsBlock/BenefitsBlock.js.map +1 -1
  255. package/mobile/lib/components/Blocks.js +0 -2
  256. package/mobile/lib/components/Blocks.js.map +1 -1
  257. package/mobile/lib/components/Calculator/CreditCalculatorForm.js +3 -2
  258. package/mobile/lib/components/Calculator/CreditCalculatorForm.js.map +1 -1
  259. package/mobile/lib/components/Calculator/RefinancingCalculatorForm.d.ts +1 -0
  260. package/mobile/lib/components/Calculator/RefinancingCalculatorForm.js +10 -4
  261. package/mobile/lib/components/Calculator/RefinancingCalculatorForm.js.map +1 -1
  262. package/mobile/lib/components/Calculator/renderBinaryRadioButtonGroup.d.ts +2 -1
  263. package/mobile/lib/components/Calculator/renderBinaryRadioButtonGroup.js +1 -1
  264. package/mobile/lib/components/Calculator/renderBinaryRadioButtonGroup.js.map +1 -1
  265. package/mobile/lib/components/CarouselCard/CarouselCard.js +1 -1
  266. package/mobile/lib/components/CarouselCard/CarouselCard.js.map +1 -1
  267. package/mobile/lib/components/Depository/Depository.js +12 -3
  268. package/mobile/lib/components/Depository/Depository.js.map +1 -1
  269. package/mobile/lib/components/Depository/DepositoryFilter.js +1 -1
  270. package/mobile/lib/components/Depository/DepositoryFilter.js.map +1 -1
  271. package/mobile/lib/components/Depository/DepositoryItem.js +1 -1
  272. package/mobile/lib/components/Depository/DepositoryItem.js.map +1 -1
  273. package/mobile/lib/components/Depository/useDepository.js +11 -1
  274. package/mobile/lib/components/Depository/useDepository.js.map +1 -1
  275. package/mobile/lib/components/OfficesAtmsMap/Badge.js +2 -2
  276. package/mobile/lib/components/OfficesAtmsMap/Badge.js.map +1 -1
  277. package/mobile/lib/components/OfficesAtmsMap/CardCell.d.ts +3 -2
  278. package/mobile/lib/components/OfficesAtmsMap/CardCell.js +6 -4
  279. package/mobile/lib/components/OfficesAtmsMap/CardCell.js.map +1 -1
  280. package/mobile/lib/components/OfficesAtmsMap/OfficesAtmsMapProps.d.ts +5 -0
  281. package/mobile/lib/components/OfficesAtmsMap/getScheduleDescription.d.ts +4 -0
  282. package/mobile/lib/components/OfficesAtmsMap/getScheduleDescription.js +32 -0
  283. package/mobile/lib/components/OfficesAtmsMap/getScheduleDescription.js.map +1 -0
  284. package/mobile/lib/components/OfficesAtmsMap/getWorkScheduleWeek.d.ts +3 -0
  285. package/mobile/lib/components/OfficesAtmsMap/getWorkScheduleWeek.js +25 -0
  286. package/mobile/lib/components/OfficesAtmsMap/getWorkScheduleWeek.js.map +1 -0
  287. package/mobile/lib/components/OfficesAtmsMap/renderBusinessSchedule.d.ts +8 -0
  288. package/mobile/lib/components/OfficesAtmsMap/renderBusinessSchedule.js +27 -0
  289. package/mobile/lib/components/OfficesAtmsMap/renderBusinessSchedule.js.map +1 -0
  290. package/mobile/lib/components/OfficesAtmsMap/renderOfficeCard.d.ts +2 -2
  291. package/mobile/lib/components/OfficesAtmsMap/renderOfficeCard.js +24 -28
  292. package/mobile/lib/components/OfficesAtmsMap/renderOfficeCard.js.map +1 -1
  293. package/mobile/lib/hooks/useResizeObserver.d.ts +3 -0
  294. package/mobile/lib/hooks/useResizeObserver.js +19 -0
  295. package/mobile/lib/hooks/useResizeObserver.js.map +1 -0
  296. package/mobile/lib/ui-kit/BaseProductTile/BaseProductTile.js +3 -2
  297. package/mobile/lib/ui-kit/BaseProductTile/BaseProductTile.js.map +1 -1
  298. package/mobile/lib/ui-kit/BaseProductTile/BaseProductTileContent.d.ts +9 -1
  299. package/mobile/lib/ui-kit/DatePicker/DatePicker.js +1 -1
  300. package/mobile/lib/ui-kit/DatePicker/DatePicker.js.map +1 -1
  301. package/mobile/lib/ui-kit/Foldable/FoldableSection.js +6 -5
  302. package/mobile/lib/ui-kit/Foldable/FoldableSection.js.map +1 -1
  303. package/mobile/lib/ui-kit/List/List.d.ts +2 -0
  304. package/mobile/lib/ui-kit/List/List.js +1 -1
  305. package/mobile/lib/ui-kit/List/List.js.map +1 -1
  306. package/mobile/lib/ui-kit/PriceList/PriceList.d.ts +2 -0
  307. package/mobile/lib/ui-kit/PriceList/PriceList.js +7 -0
  308. package/mobile/lib/ui-kit/PriceList/PriceList.js.map +1 -0
  309. package/mobile/lib/ui-kit/PriceList/PriceListProps.d.ts +9 -0
  310. package/mobile/lib/ui-kit/PriceList/PriceListProps.js +2 -0
  311. package/mobile/lib/ui-kit/PriceList/PriceListProps.js.map +1 -0
  312. package/mobile/lib/ui-kit/Select/Select.js +1 -0
  313. package/mobile/lib/ui-kit/Select/Select.js.map +1 -1
  314. package/mobile/lib/ui-kit/Select/SelectPopup.d.ts +5 -3
  315. package/mobile/lib/ui-kit/Select/SelectPopup.js +2 -2
  316. package/mobile/lib/ui-kit/Select/SelectPopup.js.map +1 -1
  317. package/mobile/lib/ui-kit/Select/useSelectPopup.d.ts +1 -1
  318. package/mobile/lib/ui-kit/Select/useSelectPopup.js +2 -2
  319. package/mobile/lib/ui-kit/Select/useSelectPopup.js.map +1 -1
  320. package/mobile/src/common.css +1 -0
  321. package/mobile/src/components/BenefitsBlock/BenefitsBlock.tsx +9 -6
  322. package/mobile/src/components/Blocks.ts +0 -2
  323. package/mobile/src/components/Calculator/CreditCalculatorForm.tsx +3 -2
  324. package/mobile/src/components/Calculator/RefinancingCalculatorForm.tsx +14 -3
  325. package/mobile/src/components/Calculator/renderBinaryRadioButtonGroup.tsx +11 -1
  326. package/mobile/src/components/CarouselCard/CarouselCard.tsx +1 -1
  327. package/mobile/src/components/Depository/Depository.tsx +25 -8
  328. package/mobile/src/components/Depository/DepositoryFilter.tsx +1 -1
  329. package/mobile/src/components/Depository/DepositoryItem.tsx +6 -2
  330. package/mobile/src/components/Depository/useDepository.ts +15 -6
  331. package/mobile/src/components/OfficesAtmsMap/Badge.tsx +2 -2
  332. package/mobile/src/components/OfficesAtmsMap/CardCell.tsx +33 -21
  333. package/mobile/src/components/OfficesAtmsMap/OfficesAtmsMapProps.tsx +5 -0
  334. package/mobile/src/components/OfficesAtmsMap/getScheduleDescription.tsx +48 -0
  335. package/mobile/src/components/OfficesAtmsMap/getWorkScheduleWeek.tsx +28 -0
  336. package/mobile/src/components/OfficesAtmsMap/renderBusinessSchedule.tsx +54 -0
  337. package/mobile/src/components/OfficesAtmsMap/renderOfficeCard.tsx +46 -41
  338. package/mobile/src/hooks/useResizeObserver.ts +28 -0
  339. package/mobile/src/ui-kit/BaseProductTile/BaseProductTile.tsx +3 -0
  340. package/mobile/src/ui-kit/BaseProductTile/BaseProductTileContent.ts +12 -1
  341. package/mobile/src/ui-kit/DatePicker/DatePicker.tsx +3 -1
  342. package/mobile/src/ui-kit/Foldable/FoldableSection.tsx +16 -11
  343. package/mobile/src/ui-kit/List/List.tsx +1 -1
  344. package/mobile/src/ui-kit/PriceList/PriceList.tsx +25 -0
  345. package/mobile/src/ui-kit/PriceList/PriceListProps.ts +11 -0
  346. package/mobile/src/ui-kit/Select/Select.tsx +1 -0
  347. package/mobile/src/ui-kit/Select/SelectPopup.tsx +41 -34
  348. package/mobile/src/ui-kit/Select/useSelectPopup.tsx +2 -0
  349. package/package.json +2 -2
  350. package/src/common.css +1 -0
  351. package/src/components/BenefitsBlock/BenefitsBlock.tsx +9 -6
  352. package/src/components/Blocks.mobile.ts +0 -2
  353. package/src/components/Blocks.ts +0 -2
  354. package/src/components/Calculator/Calculator.fixture.mobile.tsx +15 -0
  355. package/src/components/Calculator/CreditCalculatorForm.tsx +3 -2
  356. package/src/components/Calculator/RefinancingCalculatorForm.tsx +14 -3
  357. package/src/components/Calculator/renderBinaryRadioButtonGroup.tsx +11 -1
  358. package/src/components/CarouselCard/CarouselCard.tsx +1 -1
  359. package/src/components/Depository/Depository.tsx +25 -8
  360. package/src/components/Depository/DepositoryFilter.tsx +1 -1
  361. package/src/components/Depository/DepositoryItem.tsx +6 -2
  362. package/src/components/Depository/useDepository.ts +15 -6
  363. package/src/components/OfficesAtmsMap/Badge.tsx +2 -2
  364. package/src/components/OfficesAtmsMap/CardCell.tsx +33 -21
  365. package/src/components/OfficesAtmsMap/OfficesAtmsMapProps.tsx +5 -0
  366. package/src/components/OfficesAtmsMap/getScheduleDescription.tsx +48 -0
  367. package/src/components/OfficesAtmsMap/getWorkScheduleWeek.tsx +28 -0
  368. package/src/components/OfficesAtmsMap/renderBusinessSchedule.tsx +54 -0
  369. package/src/components/OfficesAtmsMap/renderOfficeCard.tsx +46 -41
  370. package/src/components/ProductBlock/ProductBlock.fixture.mobile.tsx +42 -0
  371. package/src/components/ProductBlock/ProductBlock.fixture.tsx +42 -0
  372. package/src/components/StepsBlock/StepsBlock.tsx +7 -4
  373. package/src/hooks/useResizeObserver.ts +28 -0
  374. package/src/ui-kit/BaseProductTile/BaseProductTile.tsx +3 -0
  375. package/src/ui-kit/BaseProductTile/BaseProductTileContent.ts +12 -1
  376. package/src/ui-kit/DatePicker/DatePicker.tsx +3 -1
  377. package/src/ui-kit/Foldable/FoldableSection.tsx +16 -11
  378. package/src/ui-kit/List/List.tsx +1 -1
  379. package/src/ui-kit/PriceList/PriceList.fixture.tsx +16 -0
  380. package/src/ui-kit/PriceList/PriceList.tsx +25 -0
  381. package/src/ui-kit/PriceList/PriceListProps.ts +11 -0
  382. package/src/ui-kit/Select/Select.tsx +1 -0
  383. package/src/ui-kit/Select/SelectPopup.tsx +41 -34
  384. package/src/ui-kit/Select/useSelectPopup.tsx +2 -0
  385. package/tailwind.config.cjs +23 -20
  386. package/bundle/components/OfficesAtmsMap/renderLunchHour.d.ts +0 -2
  387. package/bundle/components/PictureText/PictureText.d.ts +0 -5
  388. package/bundle/components/PictureText/PictureTextContent.d.ts +0 -11
  389. package/bundle/components/PictureText/renderInsuranceSumMonth.d.ts +0 -2
  390. package/dist/components/OfficesAtmsMap/renderLunchHour.d.ts +0 -2
  391. package/dist/components/OfficesAtmsMap/renderLunchHour.js +0 -10
  392. package/dist/components/OfficesAtmsMap/renderLunchHour.js.map +0 -1
  393. package/dist/components/PictureText/PictureText.d.ts +0 -5
  394. package/dist/components/PictureText/PictureText.js +0 -9
  395. package/dist/components/PictureText/PictureText.js.map +0 -1
  396. package/dist/components/PictureText/PictureTextContent.d.ts +0 -11
  397. package/dist/components/PictureText/PictureTextContent.js.map +0 -1
  398. package/dist/components/PictureText/renderInsuranceSumMonth.d.ts +0 -2
  399. package/dist/components/PictureText/renderInsuranceSumMonth.js +0 -9
  400. package/dist/components/PictureText/renderInsuranceSumMonth.js.map +0 -1
  401. package/lib/components/OfficesAtmsMap/renderLunchHour.d.ts +0 -2
  402. package/lib/components/OfficesAtmsMap/renderLunchHour.js +0 -7
  403. package/lib/components/OfficesAtmsMap/renderLunchHour.js.map +0 -1
  404. package/lib/components/PictureText/PictureText.d.ts +0 -5
  405. package/lib/components/PictureText/PictureText.fixture.d.ts +0 -14
  406. package/lib/components/PictureText/PictureText.fixture.mobile.d.ts +0 -14
  407. package/lib/components/PictureText/PictureText.js +0 -7
  408. package/lib/components/PictureText/PictureText.js.map +0 -1
  409. package/lib/components/PictureText/PictureTextContent.d.ts +0 -11
  410. package/lib/components/PictureText/PictureTextContent.js +0 -2
  411. package/lib/components/PictureText/PictureTextContent.js.map +0 -1
  412. package/lib/components/PictureText/renderInsuranceSumMonth.d.ts +0 -1
  413. package/lib/components/PictureText/renderInsuranceSumMonth.js +0 -6
  414. package/lib/components/PictureText/renderInsuranceSumMonth.js.map +0 -1
  415. package/mobile/bundle/components/OfficesAtmsMap/renderLunchHour.d.ts +0 -2
  416. package/mobile/bundle/components/PictureText/PictureText.d.ts +0 -5
  417. package/mobile/bundle/components/PictureText/PictureTextContent.d.ts +0 -11
  418. package/mobile/bundle/components/PictureText/renderInsuranceSumMonth.d.ts +0 -2
  419. package/mobile/dist/components/OfficesAtmsMap/renderLunchHour.d.ts +0 -2
  420. package/mobile/dist/components/OfficesAtmsMap/renderLunchHour.js +0 -10
  421. package/mobile/dist/components/OfficesAtmsMap/renderLunchHour.js.map +0 -1
  422. package/mobile/dist/components/PictureText/PictureText.d.ts +0 -5
  423. package/mobile/dist/components/PictureText/PictureText.js +0 -9
  424. package/mobile/dist/components/PictureText/PictureText.js.map +0 -1
  425. package/mobile/dist/components/PictureText/PictureTextContent.d.ts +0 -11
  426. package/mobile/dist/components/PictureText/PictureTextContent.js.map +0 -1
  427. package/mobile/dist/components/PictureText/renderInsuranceSumMonth.d.ts +0 -2
  428. package/mobile/dist/components/PictureText/renderInsuranceSumMonth.js +0 -9
  429. package/mobile/dist/components/PictureText/renderInsuranceSumMonth.js.map +0 -1
  430. package/mobile/lib/components/OfficesAtmsMap/renderLunchHour.d.ts +0 -2
  431. package/mobile/lib/components/OfficesAtmsMap/renderLunchHour.js +0 -7
  432. package/mobile/lib/components/OfficesAtmsMap/renderLunchHour.js.map +0 -1
  433. package/mobile/lib/components/PictureText/PictureText.d.ts +0 -5
  434. package/mobile/lib/components/PictureText/PictureText.js +0 -7
  435. package/mobile/lib/components/PictureText/PictureText.js.map +0 -1
  436. package/mobile/lib/components/PictureText/PictureTextContent.d.ts +0 -11
  437. package/mobile/lib/components/PictureText/PictureTextContent.js +0 -2
  438. package/mobile/lib/components/PictureText/PictureTextContent.js.map +0 -1
  439. package/mobile/lib/components/PictureText/renderInsuranceSumMonth.d.ts +0 -2
  440. package/mobile/lib/components/PictureText/renderInsuranceSumMonth.js +0 -6
  441. package/mobile/lib/components/PictureText/renderInsuranceSumMonth.js.map +0 -1
  442. package/mobile/src/components/OfficesAtmsMap/renderLunchHour.tsx +0 -28
  443. package/mobile/src/components/PictureText/PictureText.example.json +0 -40
  444. package/mobile/src/components/PictureText/PictureText.tsx +0 -36
  445. package/mobile/src/components/PictureText/PictureText.ui.json +0 -23
  446. package/mobile/src/components/PictureText/PictureTextContent.ts +0 -13
  447. package/mobile/src/components/PictureText/renderInsuranceSumMonth.tsx +0 -21
  448. package/src/components/OfficesAtmsMap/renderLunchHour.tsx +0 -28
  449. package/src/components/PictureText/PictureText.example.json +0 -40
  450. package/src/components/PictureText/PictureText.fixture.mobile.tsx +0 -116
  451. package/src/components/PictureText/PictureText.fixture.tsx +0 -130
  452. package/src/components/PictureText/PictureText.tsx +0 -36
  453. package/src/components/PictureText/PictureText.ui.json +0 -23
  454. package/src/components/PictureText/PictureTextContent.ts +0 -13
  455. package/src/components/PictureText/renderInsuranceSumMonth.tsx +0 -21
@@ -1,11 +1,13 @@
1
+ import { type IconVersion } from '../../model/IconVersion';
1
2
  import { type Option } from './Option';
2
3
  export interface SelectPopupProps {
4
+ iconVersion?: IconVersion;
5
+ onChange?: (option: Option) => void;
6
+ options?: Option[];
3
7
  popupRef?: {
4
8
  current: HTMLDivElement | null;
5
9
  };
6
- options?: Option[];
7
- value?: Option;
8
10
  query?: string;
9
- onChange?: (option: Option) => void;
11
+ value?: Option;
10
12
  }
11
13
  export declare const SelectPopup: import("@redneckz/uni-jsx").UNIComponent<SelectPopupProps, any, any>;
@@ -4,10 +4,10 @@ import { style } from '../../utils/style.js';
4
4
  import { Icon } from '../Icon/Icon.js';
5
5
  import { filterOptions } from './filterOptions.js';
6
6
  import { formatOption } from './formatOption.js';
7
- export const SelectPopup = JSX(({ popupRef, options, value, query, onChange }) => options?.length ? (_jsx("div", { className: "bg-white text-l max-h-64 overflow-y-auto overflow-x-hidden rounded-md", role: "listbox", ref: popupRef, children: filterOptions(options, query).map((option) => (_jsxs("div", { className: "flex px-m py-s cursor-pointer hover:bg-main-divider pr-5xl relative", role: "option", "aria-selected": option.key === value?.key, onClick: (e) => {
7
+ export const SelectPopup = JSX(({ popupRef, options, value, query, onChange, iconVersion }) => options?.length ? (_jsx("div", { className: "bg-white text-l max-h-64 overflow-y-auto overflow-x-hidden rounded-md", role: "listbox", ref: popupRef, children: filterOptions(options, query).map((option) => (_jsxs("div", { className: "flex px-m py-s cursor-pointer hover:bg-main-divider pr-5xl relative", role: "option", "aria-selected": option.key === value?.key, onClick: (e) => {
8
8
  e.stopPropagation();
9
9
  if (onChange) {
10
10
  onChange(option);
11
11
  }
12
- }, children: [_jsx("span", { className: "min-h-6", children: formatOption(option) }), _jsx(Icon, { name: "DoneSimpleIcon", width: "16", height: "16", className: style('absolute right-4 pt-3xs', option.key === value?.key ? '' : 'hidden') })] }, option.key))) })) : null);
12
+ }, children: [_jsx("span", { className: "min-h-6", children: formatOption(option) }), _jsx(Icon, { name: "DoneSimpleIcon", width: "16", height: "16", iconVersion: iconVersion, className: style('absolute right-4 pt-3xs', option.key === value?.key ? '' : 'hidden') })] }, option.key))) })) : null);
13
13
  //# sourceMappingURL=SelectPopup.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"SelectPopup.js","sourceRoot":"","sources":["../../../src/ui-kit/Select/SelectPopup.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AACxC,OAAO,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAC1C,OAAO,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AACpC,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAW9C,MAAM,CAAC,MAAM,WAAW,GAAG,GAAG,CAAmB,CAAC,EAAE,QAAQ,EAAE,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,QAAQ,EAAE,EAAE,EAAE,CACjG,OAAO,EAAE,MAAM,CAAC,CAAC,CAAC,CAChB,cACE,SAAS,EAAC,uEAAuE,EACjF,IAAI,EAAC,SAAS,EACd,GAAG,EAAE,QAAQ,YAEZ,aAAa,CAAC,OAAO,EAAE,KAAK,CAAC,CAAC,GAAG,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,CAC7C,eAEE,SAAS,EAAC,qEAAqE,EAC/E,IAAI,EAAC,QAAQ,mBACE,MAAM,CAAC,GAAG,KAAK,KAAK,EAAE,GAAG,EACxC,OAAO,EAAE,CAAC,CAAC,EAAE,EAAE;YACb,CAAC,CAAC,eAAe,EAAE,CAAC;YACpB,IAAI,QAAQ,EAAE;gBACZ,QAAQ,CAAC,MAAM,CAAC,CAAC;aAClB;QACH,CAAC,aAED,eAAM,SAAS,EAAC,SAAS,YAAE,YAAY,CAAC,MAAM,CAAC,GAAQ,EACvD,KAAC,IAAI,IACH,IAAI,EAAC,gBAAgB,EACrB,KAAK,EAAC,IAAI,EACV,MAAM,EAAC,IAAI,EACX,SAAS,EAAE,KAAK,CAAC,yBAAyB,EAAE,MAAM,CAAC,GAAG,KAAK,KAAK,EAAE,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,QAAQ,CAAC,GACtF,KAjBG,MAAM,CAAC,GAAG,CAkBX,CACP,CAAC,GACE,CACP,CAAC,CAAC,CAAC,IAAI,CACT,CAAC"}
1
+ {"version":3,"file":"SelectPopup.js","sourceRoot":"","sources":["../../../src/ui-kit/Select/SelectPopup.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AAExC,OAAO,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAC1C,OAAO,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AACpC,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAY9C,MAAM,CAAC,MAAM,WAAW,GAAG,GAAG,CAC5B,CAAC,EAAE,QAAQ,EAAE,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,QAAQ,EAAE,WAAW,EAAE,EAAE,EAAE,CAC7D,OAAO,EAAE,MAAM,CAAC,CAAC,CAAC,CAChB,cACE,SAAS,EAAC,uEAAuE,EACjF,IAAI,EAAC,SAAS,EACd,GAAG,EAAE,QAAQ,YAEZ,aAAa,CAAC,OAAO,EAAE,KAAK,CAAC,CAAC,GAAG,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,CAC7C,eAEE,SAAS,EAAC,qEAAqE,EAC/E,IAAI,EAAC,QAAQ,mBACE,MAAM,CAAC,GAAG,KAAK,KAAK,EAAE,GAAG,EACxC,OAAO,EAAE,CAAC,CAAC,EAAE,EAAE;YACb,CAAC,CAAC,eAAe,EAAE,CAAC;YACpB,IAAI,QAAQ,EAAE;gBACZ,QAAQ,CAAC,MAAM,CAAC,CAAC;aAClB;QACH,CAAC,aAED,eAAM,SAAS,EAAC,SAAS,YAAE,YAAY,CAAC,MAAM,CAAC,GAAQ,EACvD,KAAC,IAAI,IACH,IAAI,EAAC,gBAAgB,EACrB,KAAK,EAAC,IAAI,EACV,MAAM,EAAC,IAAI,EACX,WAAW,EAAE,WAAW,EACxB,SAAS,EAAE,KAAK,CACd,yBAAyB,EACzB,MAAM,CAAC,GAAG,KAAK,KAAK,EAAE,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,QAAQ,CAC1C,GACD,KArBG,MAAM,CAAC,GAAG,CAsBX,CACP,CAAC,GACE,CACP,CAAC,CAAC,CAAC,IAAI,CACX,CAAC"}
@@ -3,7 +3,7 @@ interface SelectPopupOptions extends SelectPopupProps {
3
3
  isOpen?: boolean;
4
4
  onClose?: () => void;
5
5
  }
6
- export declare function useSelectPopup({ isOpen, options, value, query, onChange, onClose, }: SelectPopupOptions): {
6
+ export declare function useSelectPopup({ isOpen, options, value, query, onChange, onClose, iconVersion, }: SelectPopupOptions): {
7
7
  current: HTMLDivElement | null;
8
8
  };
9
9
  export {};
@@ -3,7 +3,7 @@ import { useCallback, useEffect, useRef } from '@redneckz/uni-jsx/lib/hooks';
3
3
  import { useOutsideClick } from '@redneckz/uni-jsx/lib/hooks/useOutsideClick';
4
4
  import { usePopupManager } from '../PopupManager/usePopupManager.js';
5
5
  import { SelectPopup } from './SelectPopup.js';
6
- export function useSelectPopup({ isOpen, options, value, query, onChange, onClose, }) {
6
+ export function useSelectPopup({ isOpen, options, value, query, onChange, onClose, iconVersion, }) {
7
7
  const popup = usePopupManager();
8
8
  const close = useCallback(() => {
9
9
  popup.close();
@@ -21,7 +21,7 @@ export function useSelectPopup({ isOpen, options, value, query, onChange, onClos
21
21
  }
22
22
  const inputElement = inputRef.current;
23
23
  const { top, left, width, height } = inputElement.getBoundingClientRect();
24
- popup.update(_jsx(SelectPopup, { popupRef: popupRef, options: options, value: value, query: query, onChange: handleChange }), {
24
+ popup.update(_jsx(SelectPopup, { popupRef: popupRef, options: options, value: value, query: query, onChange: handleChange, iconVersion: iconVersion }), {
25
25
  top: top + window.scrollY + height,
26
26
  left,
27
27
  width,
@@ -1 +1 @@
1
- {"version":3,"file":"useSelectPopup.js","sourceRoot":"","sources":["../../../src/ui-kit/Select/useSelectPopup.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,6BAA6B,CAAC;AAC7E,OAAO,EAAE,eAAe,EAAE,MAAM,6CAA6C,CAAC;AAC9E,OAAO,EAAE,eAAe,EAAE,MAAM,iCAAiC,CAAC;AAElE,OAAO,EAAE,WAAW,EAAyB,MAAM,eAAe,CAAC;AAOnE,MAAM,UAAU,cAAc,CAAC,EAC7B,MAAM,EACN,OAAO,EACP,KAAK,EACL,KAAK,EACL,QAAQ,EACR,OAAO,GACY;IACnB,MAAM,KAAK,GAAG,eAAe,EAAE,CAAC;IAEhC,MAAM,KAAK,GAAG,WAAW,CAAC,GAAG,EAAE;QAC7B,KAAK,CAAC,KAAK,EAAE,CAAC;QACd,OAAO,IAAI,OAAO,EAAE,CAAC;IACvB,CAAC,EAAE,CAAC,OAAO,CAAC,CAAC,CAAC;IAEd,MAAM,YAAY,GAAG,WAAW,CAC9B,CAAC,MAAc,EAAE,EAAE;QACjB,KAAK,EAAE,CAAC;QACR,QAAQ,IAAI,QAAQ,CAAC,MAAM,CAAC,CAAC;IAC/B,CAAC,EACD,CAAC,KAAK,EAAE,QAAQ,CAAC,CAClB,CAAC;IAEF,MAAM,QAAQ,GAAG,MAAM,CAAwB,IAAI,CAAC,CAAC;IACrD,MAAM,QAAQ,GAAG,eAAe,CAAiB,KAAK,CAAC,CAAC;IAExD,SAAS,CAAC,GAAG,EAAE;QACb,IAAI,CAAC,MAAM,IAAI,CAAC,QAAQ,CAAC,OAAO,EAAE;YAChC,OAAO;SACR;QAED,MAAM,YAAY,GAAG,QAAQ,CAAC,OAAO,CAAC;QACtC,MAAM,EAAE,GAAG,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,EAAE,GAAG,YAAY,CAAC,qBAAqB,EAAE,CAAC;QAE1E,KAAK,CAAC,MAAM,CACV,KAAC,WAAW,IACV,QAAQ,EAAE,QAAQ,EAClB,OAAO,EAAE,OAAO,EAChB,KAAK,EAAE,KAAK,EACZ,KAAK,EAAE,KAAK,EACZ,QAAQ,EAAE,YAAY,GACtB,EACF;YACE,GAAG,EAAE,GAAG,GAAG,MAAM,CAAC,OAAO,GAAG,MAAM;YAClC,IAAI;YACJ,KAAK;SACN,CACF,CAAC;IACJ,CAAC,EAAE,CAAC,MAAM,EAAE,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,YAAY,CAAC,CAAC,CAAC;IAElD,OAAO,QAAQ,CAAC;AAClB,CAAC"}
1
+ {"version":3,"file":"useSelectPopup.js","sourceRoot":"","sources":["../../../src/ui-kit/Select/useSelectPopup.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,6BAA6B,CAAC;AAC7E,OAAO,EAAE,eAAe,EAAE,MAAM,6CAA6C,CAAC;AAC9E,OAAO,EAAE,eAAe,EAAE,MAAM,iCAAiC,CAAC;AAElE,OAAO,EAAE,WAAW,EAAyB,MAAM,eAAe,CAAC;AAOnE,MAAM,UAAU,cAAc,CAAC,EAC7B,MAAM,EACN,OAAO,EACP,KAAK,EACL,KAAK,EACL,QAAQ,EACR,OAAO,EACP,WAAW,GACQ;IACnB,MAAM,KAAK,GAAG,eAAe,EAAE,CAAC;IAEhC,MAAM,KAAK,GAAG,WAAW,CAAC,GAAG,EAAE;QAC7B,KAAK,CAAC,KAAK,EAAE,CAAC;QACd,OAAO,IAAI,OAAO,EAAE,CAAC;IACvB,CAAC,EAAE,CAAC,OAAO,CAAC,CAAC,CAAC;IAEd,MAAM,YAAY,GAAG,WAAW,CAC9B,CAAC,MAAc,EAAE,EAAE;QACjB,KAAK,EAAE,CAAC;QACR,QAAQ,IAAI,QAAQ,CAAC,MAAM,CAAC,CAAC;IAC/B,CAAC,EACD,CAAC,KAAK,EAAE,QAAQ,CAAC,CAClB,CAAC;IAEF,MAAM,QAAQ,GAAG,MAAM,CAAwB,IAAI,CAAC,CAAC;IACrD,MAAM,QAAQ,GAAG,eAAe,CAAiB,KAAK,CAAC,CAAC;IAExD,SAAS,CAAC,GAAG,EAAE;QACb,IAAI,CAAC,MAAM,IAAI,CAAC,QAAQ,CAAC,OAAO,EAAE;YAChC,OAAO;SACR;QAED,MAAM,YAAY,GAAG,QAAQ,CAAC,OAAO,CAAC;QACtC,MAAM,EAAE,GAAG,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,EAAE,GAAG,YAAY,CAAC,qBAAqB,EAAE,CAAC;QAE1E,KAAK,CAAC,MAAM,CACV,KAAC,WAAW,IACV,QAAQ,EAAE,QAAQ,EAClB,OAAO,EAAE,OAAO,EAChB,KAAK,EAAE,KAAK,EACZ,KAAK,EAAE,KAAK,EACZ,QAAQ,EAAE,YAAY,EACtB,WAAW,EAAE,WAAW,GACxB,EACF;YACE,GAAG,EAAE,GAAG,GAAG,MAAM,CAAC,OAAO,GAAG,MAAM;YAClC,IAAI;YACJ,KAAK;SACN,CACF,CAAC;IACJ,CAAC,EAAE,CAAC,MAAM,EAAE,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,YAAY,CAAC,CAAC,CAAC;IAElD,OAAO,QAAQ,CAAC;AAClB,CAAC"}
@@ -8,6 +8,7 @@ html {
8
8
  * {
9
9
  --color-green: 78, 190, 81;
10
10
  --color-green-light: 131, 184, 62;
11
+ --color-green-more-light: 219, 242, 219;
11
12
  --color-green-dark: 66, 171, 68;
12
13
  --color-green-more-dark: 39, 148, 41;
13
14
  --color-yellow: 221, 182, 61;
@@ -5,7 +5,9 @@ import { BlockWrapper } from '../../ui-kit/BlockWrapper';
5
5
  import { Heading } from '../../ui-kit/Heading/Heading';
6
6
  import { RoundedIcon } from '../../ui-kit/Icon/RoundedIcon';
7
7
  import { Img } from '../../ui-kit/Img/Img';
8
+ import { TEXT_SIZE_MAP } from '../../ui-kit/List/List';
8
9
  import { Text } from '../../ui-kit/Text/Text';
10
+ import { style } from '../../utils/style';
9
11
  import {
10
12
  type BenefitBlockItemProps,
11
13
  type BenefitsBlockContent,
@@ -84,14 +86,15 @@ const renderListBenefit = (description?: ListBenefitDef) => {
84
86
  const listStyleType = description?.bullets ? 'list-disc pl-3xl' : '';
85
87
 
86
88
  return description?.items && description.items.length > 0 ? (
87
- <ul className={listStyleType}>
89
+ <ul
90
+ className={style(
91
+ listStyleType,
92
+ description.listItemSize ? TEXT_SIZE_MAP[description.listItemSize] : '',
93
+ )}
94
+ >
88
95
  {description.items.map((_, i) => (
89
96
  <li key={`benefitListItem-${i}`}>
90
- <Text
91
- size="text-l"
92
- color="text-secondary-text group-data-secondary:text-white/80"
93
- font="font-light"
94
- >
97
+ <Text color="text-secondary-text group-data-secondary:text-white/80" font="font-light">
95
98
  {_}
96
99
  </Text>
97
100
  </li>
@@ -25,7 +25,6 @@ import { ImgBlock } from './ImgBlock/ImgBlock';
25
25
  import { LinkDocs } from './LinkDocs/LinkDocs';
26
26
  import { MobileAppTile } from './MobileAppTile/MobileAppTile';
27
27
  import { MortgageFiltration } from './MortgageFiltration/MortgageFiltration';
28
- import { PictureText } from './PictureText/PictureText';
29
28
  import { Placeholder } from './Placeholder/Placeholder';
30
29
  import { ProductBlock } from './ProductBlock/ProductBlock';
31
30
  import { ProductGallery } from './ProductGallery/ProductGallery';
@@ -69,7 +68,6 @@ export const Blocks: BlocksRegistry = {
69
68
  ImgBlock,
70
69
  LinkDocs,
71
70
  MobileAppTile,
72
- PictureText,
73
71
  Placeholder,
74
72
  ProductBlock,
75
73
  ProductGallery,
@@ -26,7 +26,7 @@ export interface CreditCalculatorProp extends CreditCalculatorProps {
26
26
  }
27
27
 
28
28
  export const CreditCalculatorForm = JSX<CreditCalculatorProp>(
29
- ({ className, sourceBookDir, buttons, footnote, paramsViewSettings, isMobile }) => {
29
+ ({ className, sourceBookDir, buttons, footnote, paramsViewSettings }) => {
30
30
  const [userInputParams, { field }] = useForm({
31
31
  isAnnuity: true,
32
32
  isInsurance: true,
@@ -44,7 +44,8 @@ export const CreditCalculatorForm = JSX<CreditCalculatorProp>(
44
44
  );
45
45
 
46
46
  const paymentTypeElement = renderPaymentType({
47
- title: isMobile ? 'Тип платежа' : '',
47
+ title: '',
48
+ mobileTitle: 'Тип платежа',
48
49
  orientation: 'vertical',
49
50
  ...field('isAnnuity'),
50
51
  });
@@ -26,6 +26,7 @@ import {
26
26
 
27
27
  export interface RefinancingCalculatorProp extends RefinancingCalculatorProps {
28
28
  className?: string;
29
+ isMobile?: boolean;
29
30
  }
30
31
 
31
32
  export const RefinancingCalculatorForm = JSX<RefinancingCalculatorProp>(
@@ -47,6 +48,13 @@ export const RefinancingCalculatorForm = JSX<RefinancingCalculatorProp>(
47
48
  paramsViewSettings,
48
49
  );
49
50
 
51
+ const paymentTypeElement = renderPaymentType({
52
+ title: '',
53
+ mobileTitle: 'Тип платежа',
54
+ orientation: 'vertical',
55
+ ...field('isAnnuity'),
56
+ });
57
+
50
58
  return (
51
59
  <section className={style('flex flex-col justify-between @5xl:flex-row gap-m', className)}>
52
60
  <div className="flex flex-col gap-y-m sm:max-w-md gap-2xl">
@@ -84,12 +92,15 @@ export const RefinancingCalculatorForm = JSX<RefinancingCalculatorProp>(
84
92
  value: calculatorParams.moneyExtra,
85
93
  })
86
94
  : null}
95
+ <div className="sm:hidden pt-1 pb-4 border-b border-main-divider">
96
+ {paymentTypeElement}
97
+ </div>
87
98
  </div>
88
99
  {renderRate({
89
100
  rate: calculatorParams.rate,
90
101
  fractionDigits: 1,
91
102
  })}
92
- <div className="flex flex-col gap-2xl sm:w-96">
103
+ <div className="flex flex-col gap-2xl mt-2 sm:w-96 sm:mt-0">
93
104
  <CalculatorValueBlock
94
105
  title={'Ежемесячный платеж'}
95
106
  value={calculatorParams.monthlyPayment}
@@ -102,7 +113,7 @@ export const RefinancingCalculatorForm = JSX<RefinancingCalculatorProp>(
102
113
  postfix="₽"
103
114
  />
104
115
  ) : null}
105
- {renderPaymentType({ orientation: 'vertical', ...field('isAnnuity') })}
116
+ <div className="hidden sm:block">{paymentTypeElement}</div>
106
117
  {renderButtonsSection(buttons, { isVertical: true })}
107
118
  {renderFootnote(footnote)}
108
119
  </div>
@@ -115,7 +126,7 @@ const renderCreditParamsForm = (
115
126
  params: RefinancingCalculatorParams & RefinancingCalculatorParamsViewSettings,
116
127
  field: FormFieldRegisterer<any>,
117
128
  ) => (
118
- <div className="space-y-s">
129
+ <div className="space-y-lg sm:space-y-s">
119
130
  {params.isShowSalaryClient ? (
120
131
  <Checkbox
121
132
  text="Получаю зарплату на счёт в Россельхозбанке"
@@ -9,6 +9,7 @@ import { style } from '../../utils/style';
9
9
  export interface BinaryRadioButtonGroupProps {
10
10
  items: [truthy: RadioButtonItem, falsy: RadioButtonItem];
11
11
  title?: string;
12
+ mobileTitle?: string;
12
13
  orientation?: ListOrientation;
13
14
  value?: boolean;
14
15
  radioGroupClassName?: string;
@@ -18,6 +19,7 @@ export interface BinaryRadioButtonGroupProps {
18
19
  export const renderBinaryRadioButtonGroup = ({
19
20
  items,
20
21
  title,
22
+ mobileTitle = title,
21
23
  orientation = 'horizontal',
22
24
  value,
23
25
  radioGroupClassName,
@@ -25,12 +27,20 @@ export const renderBinaryRadioButtonGroup = ({
25
27
  }: BinaryRadioButtonGroupProps) => (
26
28
  <div className="space-y-s">
27
29
  {title ? (
28
- <div>
30
+ <div className="hidden @5xl:block">
29
31
  <Text color="text-secondary-text" font="font-light">
30
32
  {title}
31
33
  </Text>
32
34
  </div>
33
35
  ) : null}
36
+ {mobileTitle ? (
37
+ <div className="@5xl:hidden">
38
+ <Text color="text-secondary-text" font="font-light">
39
+ {mobileTitle}
40
+ </Text>
41
+ </div>
42
+ ) : null}
43
+
34
44
  <RadioButtonGroup
35
45
  orientation={orientation}
36
46
  items={items}
@@ -26,7 +26,7 @@ export const CarouselCard = JSX<CarouselCardProps>(
26
26
  <div
27
27
  className={style(
28
28
  layerBaseStyle,
29
- 'relative p-xl sm:p-5xl bg-white border-transparent sm:border-green-light',
29
+ 'relative p-xl sm:p-5xl bg-white border-transparent sm:border-green-more-light',
30
30
  )}
31
31
  >
32
32
  <Headline
@@ -5,6 +5,7 @@ import { type JSXBlock, type UniBlockProps } from '../../model/JSXBlock';
5
5
  import { BlockWrapper } from '../../ui-kit/BlockWrapper';
6
6
  import { NotFound } from '../../ui-kit/NotFound/NotFound';
7
7
  import { Pagination } from '../../ui-kit/Pagination/Pagination';
8
+ import { Text } from '../../ui-kit/Text/Text';
8
9
  import { style } from '../../utils/style';
9
10
  import { type DepositoryContent } from './DepositoryContent';
10
11
  import { DepositoryFilter } from './DepositoryFilter';
@@ -33,32 +34,48 @@ export const Depository: JSXBlock<DepositoryProps> = JSX<DepositoryProps>(
33
34
  const [itemCount, setItemCount] = useState(DEFAULT_ITEMS_COUNT);
34
35
  const [filtrationState, { field, reset }] = useForm(initialFiltrationState);
35
36
 
36
- const { totalPages = 0, items } = useDepository({
37
+ const { totalPages = 0, items = [] } = useDepository({
37
38
  size: itemCount,
38
39
  page: currentPage,
39
40
  ...filtrationState,
40
41
  });
41
42
 
42
43
  const handleChangePage = useCallback((page: number) => setCurrentPage(page - 1), []);
43
- const handleItemCountChange = useCallback((count: number) => setItemCount(count), []);
44
+
45
+ const handleItemCountChange = useCallback((count: number) => {
46
+ if (itemCount !== count) {
47
+ setItemCount(count);
48
+ setCurrentPage(0);
49
+ } else {
50
+ setItemCount(count);
51
+ }
52
+ }, []);
44
53
 
45
54
  return (
46
- <BlockWrapper className={style(className, 'container p-4xl')} {...rest}>
55
+ <BlockWrapper className={style(className, 'container p-6xl')} {...rest}>
47
56
  <DepositoryFilter filtrationState={filtrationState} field={field} onClearFilter={reset} />
48
57
  <div className="flex flex-col">
49
58
  <div className="grid grid-cols-12 pb-lg border-gray border-opacity-50 border-b">
50
- <span className="col-span-2 text-gray text-m">Дата</span>
51
- <span className="col-span-10 text-gray text-m">Тема</span>
59
+ <div className="col-span-2">
60
+ <Text size="text-m" color="text-secondary-text">
61
+ Дата
62
+ </Text>
63
+ </div>
64
+ <span className="col-span-10">
65
+ <Text size="text-m" color="text-secondary-text">
66
+ Тема
67
+ </Text>
68
+ </span>
52
69
  </div>
53
- {items?.length ? (
54
- items?.map((params) => <DepositoryItem key={String(params.publicId)} {...params} />)
70
+ {items.length ? (
71
+ items.map((params) => <DepositoryItem key={String(params.publicId)} {...params} />)
55
72
  ) : (
56
73
  <NotFound title="Ничего не найдено" description="Попробуйте очистить фильтры" />
57
74
  )}
58
75
  <Pagination
59
76
  currentPage={currentPage + 1}
60
77
  onPageChange={handleChangePage}
61
- totalPages={totalPages + 1}
78
+ totalPages={totalPages}
62
79
  itemCount={itemCount}
63
80
  onItemCountChange={handleItemCountChange}
64
81
  />
@@ -28,7 +28,7 @@ export const DepositoryFilter = JSX<DepositoryFilterProps>(
28
28
  />
29
29
  <div className="col-span-2 mt-auto">
30
30
  <button
31
- className="px-m py-s rounded-md bg-main-gray text-green cursor-pointer w-full"
31
+ className="px-m py-s rounded-md bg-main-gray text-green hover:text-white hover:bg-primary-hover active:bg-primary-active cursor-pointer w-full"
32
32
  onClick={onClearFilter}
33
33
  >
34
34
  Очистить фильтр
@@ -9,8 +9,12 @@ export const DepositoryItem = ({ title, timestamp, publicId }: DepositoryDataIte
9
9
 
10
10
  return (
11
11
  <div className="grid grid-cols-12 py-lg border-gray border-opacity-50 border-b" key={publicId}>
12
- <div className="col-span-2 text-m">
13
- {timestamp ? <Text>{formatDate(timestamp)}</Text> : null}
12
+ <div className="col-span-2">
13
+ {timestamp ? (
14
+ <Text size="text-m" font-weight="font-light">
15
+ {formatDate(timestamp)}
16
+ </Text>
17
+ ) : null}
14
18
  </div>
15
19
  <div className="col-span-10 text-h6 hover:text-primary-active">
16
20
  <a href={href} download aria-label="Скачать">
@@ -19,14 +19,23 @@ interface UseDepositoryParams extends DepositoryFiltrationState {
19
19
  size: number;
20
20
  page: number;
21
21
  }
22
+ const DEPOSITARY_URL = '/api/v1/depository';
22
23
 
23
24
  export const useDepository = ({ size, page, query, startDate, endDate }: UseDepositoryParams) => {
24
- const { data } = useAsyncData<DepositoryData>(
25
- `/api/v1/depository?page=${page}&size=${size}&query=${query}&timestampStart=${
26
- startDate ? formatDate(startDate, true) : ''
27
- }&timestampEnd=${endDate ? formatDate(endDate, true) : ''}`,
28
- fetchJSONUnsafe,
29
- );
25
+ const formatStartDate = startDate ? formatDate(startDate, true) : '';
26
+ const formatEndDate = endDate ? formatDate(endDate, true) : '';
27
+
28
+ const searchParams = new URLSearchParams(DEPOSITARY_URL);
29
+
30
+ searchParams.set('page', String(page));
31
+ searchParams.set('size', String(size));
32
+ searchParams.set('query', query);
33
+ searchParams.set('startDate', formatStartDate);
34
+ searchParams.set('endDate', formatEndDate);
35
+
36
+ const queryString = `?${searchParams.toString()}`;
37
+
38
+ const { data } = useAsyncData<DepositoryData>(DEPOSITARY_URL + queryString, fetchJSONUnsafe);
30
39
 
31
40
  return { items: data?.content, totalPages: data?.totalPages };
32
41
  };
@@ -5,9 +5,9 @@ import { style } from '../../utils/style';
5
5
 
6
6
  const colorStyle: Record<string, { border: string; text: TextColor }> = {
7
7
  yellow: { border: 'border-yellow-light', text: 'text-yellow' },
8
- green: { border: 'border-green-light', text: 'text-green-dark' },
8
+ green: { border: 'border-green-more-light', text: 'text-green-dark' },
9
9
  gray: { border: 'border-gray', text: 'text-secondary-text' },
10
- red: { border: 'border-error', text: 'text-error' },
10
+ red: { border: 'border-error/30', text: 'text-error' },
11
11
  };
12
12
 
13
13
  export interface BadgeProps {
@@ -1,40 +1,52 @@
1
1
  import { JSX } from '@redneckz/uni-jsx';
2
2
  import { Text } from '../../ui-kit/Text/Text';
3
- import { type TextColor } from '../../ui-kit/Text/TextProps';
3
+ import { type TextColor, type TextSize } from '../../ui-kit/Text/TextProps';
4
4
  import { style } from '../../utils/style';
5
5
 
6
6
  export interface CardCellProps {
7
7
  className?: string;
8
8
  label?: string;
9
- value?: string;
9
+ labelSize?: TextSize;
10
+ value?: string | string[];
10
11
  subText?: string;
11
12
  subColor?: TextColor;
12
13
  }
13
14
 
14
- export const CardCell = JSX<CardCellProps>(({ className, label, value, subText, subColor }) => {
15
- const textItems = value?.split(',') ?? [];
15
+ export const CardCell = JSX<CardCellProps>(({ value, subText, children, ...props }) => {
16
+ const textItems = (Array.isArray(value) ? value : value?.split(',') ?? []).filter(Boolean);
16
17
 
17
- if (!textItems.length && !subText) {
18
+ if ([textItems.length, children, subText].every((_) => !_)) {
18
19
  return null;
19
20
  }
20
21
 
21
- return (
22
- <div className={style('flex gap-2xs flex-col h-full max-w-[300px]', className)}>
23
- {label ? (
24
- <Text color="text-secondary-text" font="font-light" size="text-m">
25
- {label}
26
- </Text>
27
- ) : null}
28
- {textItems.filter(Boolean).map((text, i) => (
22
+ return renderCardCell({ textItems, subText, children, ...props });
23
+ });
24
+
25
+ const renderCardCell = ({
26
+ label,
27
+ labelSize = 'text-m',
28
+ textItems,
29
+ subColor,
30
+ subText,
31
+ className,
32
+ children,
33
+ }: CardCellProps & { textItems: string[]; children: any }) => (
34
+ <div className={style('flex gap-2xs flex-col h-full max-w-[300px]', className)}>
35
+ {label ? (
36
+ <Text color="text-secondary-text" font="font-light" size={labelSize}>
37
+ {label}
38
+ </Text>
39
+ ) : null}
40
+ {children ||
41
+ textItems.filter(Boolean).map((text, i) => (
29
42
  <Text key={String(i)} size="text-l">
30
43
  {text.trim()}
31
44
  </Text>
32
45
  ))}
33
- {subText ? (
34
- <Text color={subColor} size="text-m">
35
- {subText}
36
- </Text>
37
- ) : null}
38
- </div>
39
- );
40
- });
46
+ {subText ? (
47
+ <Text color={subColor} size="text-m">
48
+ {subText}
49
+ </Text>
50
+ ) : null}
51
+ </div>
52
+ );
@@ -16,7 +16,9 @@ export interface ExchangeRate {
16
16
  }
17
17
 
18
18
  export type WorkScheduleWeek = {
19
+ key?: string;
19
20
  title?: string;
21
+ short?: string;
20
22
  status?: boolean;
21
23
  workTime?: string;
22
24
  lunchHour?: string;
@@ -42,6 +44,9 @@ export type WorkSchedule = {
42
44
  workingFriday?: boolean;
43
45
  workingSaturday?: boolean;
44
46
  workingSunday?: boolean;
47
+ isMatchesPattern?: boolean;
48
+ businessScheduleVisibleTag?: boolean;
49
+ businessScheduleDescription?: string;
45
50
  };
46
51
 
47
52
  export type SafeBoxCaseTariff = {
@@ -0,0 +1,48 @@
1
+ import { CardCell } from './CardCell';
2
+ import type { WorkScheduleWeek } from './OfficesAtmsMapProps';
3
+
4
+ export const getScheduleDescription = (workScheduleWeek: WorkScheduleWeek[]) => {
5
+ const workingWeekday = workScheduleWeek.find(
6
+ (_) => _.key !== 'workingSaturday' && Boolean(_.status) && Boolean(_.workTime),
7
+ );
8
+
9
+ const workingSaturday = workScheduleWeek.find(
10
+ (_) => _.key === 'workingSaturday' && Boolean(_.status) && Boolean(_.workTime),
11
+ );
12
+
13
+ const daysOff = workScheduleWeek
14
+ .filter((_) => !_.status)
15
+ .map((_) => _.short?.toLowerCase())
16
+ .join(', ');
17
+
18
+ const rows = [
19
+ buildScheduleText({
20
+ workTime: workingWeekday?.workTime,
21
+ lunchHour: workingWeekday?.lunchHour,
22
+ daysOff: workingSaturday ? '' : daysOff,
23
+ }),
24
+ buildScheduleText(
25
+ { workTime: workingSaturday?.workTime, lunchHour: workingSaturday?.lunchHour, daysOff },
26
+ true,
27
+ ),
28
+ ].filter(Boolean);
29
+
30
+ return <CardCell label="Режим работы" value={rows} className="max-w-none" />;
31
+ };
32
+
33
+ export const buildScheduleText = (
34
+ { workTime = '', lunchHour = '', daysOff = '' }: Record<string, string | undefined>,
35
+ isSaturday = false,
36
+ ) => {
37
+ if (!workTime) {
38
+ return '';
39
+ }
40
+
41
+ return [
42
+ `${isSaturday ? 'Суббота' : 'Будние дни'}: ${workTime}`,
43
+ lunchHour ? `перерыв: ${lunchHour}` : '',
44
+ daysOff ? `не работает: ${daysOff}` : '',
45
+ ]
46
+ .filter(Boolean)
47
+ .join('; ');
48
+ };
@@ -0,0 +1,28 @@
1
+ import type { WorkSchedule, WorkScheduleWeek } from './OfficesAtmsMapProps';
2
+
3
+ export const WEEKDAY_MAP = [
4
+ ['workingMonday', 'Пн', 'Понедельник'],
5
+ ['workingTuesday', 'Вт', 'Вторник'],
6
+ ['workingWednesday', 'Ср', 'Среда'],
7
+ ['workingThursday', 'Чт', 'Четверг'],
8
+ ['workingFriday', 'Пт', 'Пятница'],
9
+ ['workingSaturday', 'Сб', 'Суббота'],
10
+ ['workingSunday', 'Вс', 'Воскресенье'],
11
+ ];
12
+
13
+ export const getWorkScheduleWeek = (workSchedule?: WorkSchedule): WorkScheduleWeek[] =>
14
+ WEEKDAY_MAP.map(([key, short, title]) => ({
15
+ key,
16
+ title,
17
+ short,
18
+ status: Boolean(workSchedule?.[key]),
19
+ get workTime() {
20
+ return key === 'workingSaturday' ? workSchedule?.workTimeSaturday : workSchedule?.workTime;
21
+ },
22
+ get lunchHour() {
23
+ return key === 'workingSaturday' ? workSchedule?.lunchHourSaturday : workSchedule?.lunchHour;
24
+ },
25
+ get hasLunch() {
26
+ return /\d+/.test(this.lunchHour ?? '');
27
+ },
28
+ }));
@@ -0,0 +1,54 @@
1
+ import { Text } from '../../ui-kit/Text/Text';
2
+ import { style } from '../../utils/style';
3
+ import { CardCell } from './CardCell';
4
+ import { CardRow } from './CardRow';
5
+ import { WEEKDAY_MAP } from './getWorkScheduleWeek';
6
+ import type { WorkScheduleWeek } from './OfficesAtmsMapProps';
7
+
8
+ export const renderBusinessSchedule = (scheduleDescription?: string) => {
9
+ if (!scheduleDescription) {
10
+ return null;
11
+ }
12
+
13
+ const businessSchedule = getBusinessSchedule(scheduleDescription);
14
+
15
+ return (
16
+ <CardRow className="border-none">
17
+ <CardCell label="Для юридических лиц" labelSize="text-l">
18
+ <div className="flex gap-1">{businessSchedule.map(renderAlternativeDay)}</div>
19
+ </CardCell>
20
+ <CardCell label="Режим работы" className="max-w-none">
21
+ <Text>{scheduleDescription}</Text>
22
+ </CardCell>
23
+ </CardRow>
24
+ );
25
+ };
26
+
27
+ export const getBusinessSchedule = (scheduleDescription: string) => {
28
+ const weekDayMap = WEEKDAY_MAP.map(([, short]) => ({ short, status: true }));
29
+
30
+ const splittedScheduleDescription = scheduleDescription.split('/') ?? [];
31
+ const lastPartScheduleDescription =
32
+ splittedScheduleDescription[splittedScheduleDescription.length - 1]?.toLowerCase();
33
+
34
+ if (!lastPartScheduleDescription?.includes('выходной')) {
35
+ return weekDayMap;
36
+ }
37
+
38
+ return weekDayMap.map((_) => ({
39
+ ..._,
40
+ status: !lastPartScheduleDescription?.includes(_.short.toLowerCase()),
41
+ }));
42
+ };
43
+
44
+ export const renderAlternativeDay = ({ short, status }: WorkScheduleWeek, index: number) => (
45
+ <div
46
+ key={String(index)}
47
+ className={style(
48
+ 'w-9 h-9 rounded-md flex items-center justify-center',
49
+ status ? 'bg-green-more-light text-green-dark' : 'bg-error/30 text-error',
50
+ )}
51
+ >
52
+ <Text size="text-xs">{short}</Text>
53
+ </div>
54
+ );