@redneckz/wildless-cms-uni-blocks 0.14.741 → 0.14.743

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 (271) hide show
  1. package/bundle/bundle.umd.js +109 -153
  2. package/bundle/bundle.umd.min.js +1 -1
  3. package/bundle/components/OfficesAtmsMap/{renderFiltrationForm.d.ts → FiltrationForm.d.ts} +2 -2
  4. package/bundle/components/OfficesAtmsMap/FoldableCardContent.d.ts +1 -0
  5. package/bundle/components/OfficesAtmsMap/renderOfficeCard.d.ts +1 -1
  6. package/bundle/model/FormTypeFieldDef.d.ts +1 -1
  7. package/bundle/ui-kit/BaseFiltration/GridBlocks.d.ts +8 -0
  8. package/bundle/ui-kit/Button/IconButton.d.ts +10 -0
  9. package/bundle/ui-kit/Foldable/Foldable.d.ts +0 -6
  10. package/bundle/utils/capitalize.d.ts +1 -0
  11. package/bundle/utils/dataAttributes.d.ts +2 -2
  12. package/dist/components/ApplicationLeadForm/GroupedConsents.js +6 -7
  13. package/dist/components/ApplicationLeadForm/GroupedConsents.js.map +1 -1
  14. package/dist/components/CarouselTariffsCard/CarouselTariffsCard.js +6 -5
  15. package/dist/components/CarouselTariffsCard/CarouselTariffsCard.js.map +1 -1
  16. package/{lib/components/OfficesAtmsMap/renderFiltrationForm.d.ts → dist/components/OfficesAtmsMap/FiltrationForm.d.ts} +2 -2
  17. package/dist/components/OfficesAtmsMap/FiltrationForm.js +24 -0
  18. package/dist/components/OfficesAtmsMap/FiltrationForm.js.map +1 -0
  19. package/dist/components/OfficesAtmsMap/FoldableCardContent.d.ts +1 -0
  20. package/dist/components/OfficesAtmsMap/FoldableCardContent.js +13 -0
  21. package/dist/components/OfficesAtmsMap/FoldableCardContent.js.map +1 -0
  22. package/dist/components/OfficesAtmsMap/OfficesAtmsMapLayout.js +2 -8
  23. package/dist/components/OfficesAtmsMap/OfficesAtmsMapLayout.js.map +1 -1
  24. package/dist/components/OfficesAtmsMap/renderAtmCard.js +6 -12
  25. package/dist/components/OfficesAtmsMap/renderAtmCard.js.map +1 -1
  26. package/dist/components/OfficesAtmsMap/renderFoldButton.js +2 -4
  27. package/dist/components/OfficesAtmsMap/renderFoldButton.js.map +1 -1
  28. package/dist/components/OfficesAtmsMap/renderOfficeCard.d.ts +1 -1
  29. package/dist/components/OfficesAtmsMap/renderOfficeCard.js +5 -29
  30. package/dist/components/OfficesAtmsMap/renderOfficeCard.js.map +1 -1
  31. package/dist/components/OfficesAtmsMap/renderRemoteWorkplaceCard.js +3 -11
  32. package/dist/components/OfficesAtmsMap/renderRemoteWorkplaceCard.js.map +1 -1
  33. package/dist/components/RollupItem/RollupItem.js +17 -13
  34. package/dist/components/RollupItem/RollupItem.js.map +1 -1
  35. package/dist/components/TariffsTable/TariffsTable.js +3 -1
  36. package/dist/components/TariffsTable/TariffsTable.js.map +1 -1
  37. package/dist/model/FormTypeFieldDef.d.ts +1 -1
  38. package/dist/ui-kit/BaseFiltration/FilteredBlocks.js +2 -2
  39. package/dist/ui-kit/BaseFiltration/FilteredBlocks.js.map +1 -1
  40. package/dist/ui-kit/BaseFiltration/GridBlocks.d.ts +8 -0
  41. package/dist/ui-kit/BaseFiltration/{renderGridBlocks.js → GridBlocks.js} +8 -7
  42. package/dist/ui-kit/BaseFiltration/GridBlocks.js.map +1 -0
  43. package/dist/ui-kit/Button/IconButton.d.ts +10 -0
  44. package/dist/ui-kit/Button/IconButton.js +13 -0
  45. package/dist/ui-kit/Button/IconButton.js.map +1 -0
  46. package/dist/ui-kit/Foldable/DefaultFoldButton.js +1 -5
  47. package/dist/ui-kit/Foldable/DefaultFoldButton.js.map +1 -1
  48. package/dist/ui-kit/Foldable/Foldable.d.ts +0 -6
  49. package/dist/ui-kit/Foldable/Foldable.js +3 -10
  50. package/dist/ui-kit/Foldable/Foldable.js.map +1 -1
  51. package/dist/utils/capitalize.d.ts +1 -0
  52. package/dist/utils/capitalize.js +5 -0
  53. package/dist/utils/capitalize.js.map +1 -0
  54. package/dist/utils/dataAttributes.d.ts +2 -2
  55. package/dist/utils/dataAttributes.js +1 -6
  56. package/dist/utils/dataAttributes.js.map +1 -1
  57. package/lib/common.css +1 -1
  58. package/lib/components/ApplicationForm/ApplicationForm.fixture.d.ts +1 -0
  59. package/lib/components/ApplicationLeadForm/GroupedConsents.js +7 -8
  60. package/lib/components/ApplicationLeadForm/GroupedConsents.js.map +1 -1
  61. package/lib/components/CarouselTariffsCard/CarouselTariffsCard.js +6 -5
  62. package/lib/components/CarouselTariffsCard/CarouselTariffsCard.js.map +1 -1
  63. package/{dist/components/OfficesAtmsMap/renderFiltrationForm.d.ts → lib/components/OfficesAtmsMap/FiltrationForm.d.ts} +2 -2
  64. package/lib/components/OfficesAtmsMap/FiltrationForm.js +21 -0
  65. package/lib/components/OfficesAtmsMap/FiltrationForm.js.map +1 -0
  66. package/lib/components/OfficesAtmsMap/FoldableCardContent.d.ts +1 -0
  67. package/lib/components/OfficesAtmsMap/FoldableCardContent.js +11 -0
  68. package/lib/components/OfficesAtmsMap/FoldableCardContent.js.map +1 -0
  69. package/lib/components/OfficesAtmsMap/OfficesAtmsMapLayout.js +2 -8
  70. package/lib/components/OfficesAtmsMap/OfficesAtmsMapLayout.js.map +1 -1
  71. package/lib/components/OfficesAtmsMap/renderAtmCard.js +6 -12
  72. package/lib/components/OfficesAtmsMap/renderAtmCard.js.map +1 -1
  73. package/lib/components/OfficesAtmsMap/renderFoldButton.js +3 -5
  74. package/lib/components/OfficesAtmsMap/renderFoldButton.js.map +1 -1
  75. package/lib/components/OfficesAtmsMap/renderOfficeCard.d.ts +1 -1
  76. package/lib/components/OfficesAtmsMap/renderOfficeCard.js +5 -29
  77. package/lib/components/OfficesAtmsMap/renderOfficeCard.js.map +1 -1
  78. package/lib/components/OfficesAtmsMap/renderRemoteWorkplaceCard.js +3 -11
  79. package/lib/components/OfficesAtmsMap/renderRemoteWorkplaceCard.js.map +1 -1
  80. package/lib/components/RollupItem/RollupItem.js +18 -14
  81. package/lib/components/RollupItem/RollupItem.js.map +1 -1
  82. package/lib/components/TariffsTable/TariffsTable.js +3 -1
  83. package/lib/components/TariffsTable/TariffsTable.js.map +1 -1
  84. package/lib/model/FormTypeFieldDef.d.ts +1 -1
  85. package/lib/ui-kit/BaseFiltration/FilteredBlocks.js +3 -3
  86. package/lib/ui-kit/BaseFiltration/FilteredBlocks.js.map +1 -1
  87. package/lib/ui-kit/BaseFiltration/GridBlocks.d.ts +8 -0
  88. package/{mobile/lib/ui-kit/BaseFiltration/renderGridBlocks.js → lib/ui-kit/BaseFiltration/GridBlocks.js} +7 -5
  89. package/lib/ui-kit/BaseFiltration/GridBlocks.js.map +1 -0
  90. package/lib/ui-kit/Button/IconButton.d.ts +10 -0
  91. package/lib/ui-kit/Button/IconButton.js +11 -0
  92. package/lib/ui-kit/Button/IconButton.js.map +1 -0
  93. package/lib/ui-kit/Foldable/DefaultFoldButton.js +1 -5
  94. package/lib/ui-kit/Foldable/DefaultFoldButton.js.map +1 -1
  95. package/lib/ui-kit/Foldable/Foldable.d.ts +0 -6
  96. package/lib/ui-kit/Foldable/Foldable.js +4 -11
  97. package/lib/ui-kit/Foldable/Foldable.js.map +1 -1
  98. package/lib/ui-kit/FormField/Fields/AddressField.d.ts +1 -1
  99. package/lib/utils/capitalize.d.ts +1 -0
  100. package/lib/utils/capitalize.js +2 -0
  101. package/lib/utils/capitalize.js.map +1 -0
  102. package/lib/utils/dataAttributes.d.ts +2 -2
  103. package/lib/utils/dataAttributes.js +1 -6
  104. package/lib/utils/dataAttributes.js.map +1 -1
  105. package/mobile/bundle/bundle.umd.js +109 -153
  106. package/mobile/bundle/bundle.umd.min.js +1 -1
  107. package/mobile/bundle/components/OfficesAtmsMap/{renderFiltrationForm.d.ts → FiltrationForm.d.ts} +2 -2
  108. package/mobile/bundle/components/OfficesAtmsMap/FoldableCardContent.d.ts +1 -0
  109. package/mobile/bundle/components/OfficesAtmsMap/renderOfficeCard.d.ts +1 -1
  110. package/mobile/bundle/model/FormTypeFieldDef.d.ts +1 -1
  111. package/mobile/bundle/ui-kit/BaseFiltration/GridBlocks.d.ts +8 -0
  112. package/mobile/bundle/ui-kit/Button/IconButton.d.ts +10 -0
  113. package/mobile/bundle/ui-kit/Foldable/Foldable.d.ts +0 -6
  114. package/mobile/bundle/utils/capitalize.d.ts +1 -0
  115. package/mobile/bundle/utils/dataAttributes.d.ts +2 -2
  116. package/mobile/dist/components/ApplicationLeadForm/GroupedConsents.js +6 -7
  117. package/mobile/dist/components/ApplicationLeadForm/GroupedConsents.js.map +1 -1
  118. package/mobile/dist/components/CarouselTariffsCard/CarouselTariffsCard.js +6 -5
  119. package/mobile/dist/components/CarouselTariffsCard/CarouselTariffsCard.js.map +1 -1
  120. package/mobile/dist/components/OfficesAtmsMap/FiltrationForm.d.ts +13 -0
  121. package/mobile/dist/components/OfficesAtmsMap/FiltrationForm.js +24 -0
  122. package/mobile/dist/components/OfficesAtmsMap/FiltrationForm.js.map +1 -0
  123. package/mobile/dist/components/OfficesAtmsMap/FoldableCardContent.d.ts +1 -0
  124. package/mobile/dist/components/OfficesAtmsMap/FoldableCardContent.js +13 -0
  125. package/mobile/dist/components/OfficesAtmsMap/FoldableCardContent.js.map +1 -0
  126. package/mobile/dist/components/OfficesAtmsMap/OfficesAtmsMapLayout.js +2 -8
  127. package/mobile/dist/components/OfficesAtmsMap/OfficesAtmsMapLayout.js.map +1 -1
  128. package/mobile/dist/components/OfficesAtmsMap/renderAtmCard.js +6 -12
  129. package/mobile/dist/components/OfficesAtmsMap/renderAtmCard.js.map +1 -1
  130. package/mobile/dist/components/OfficesAtmsMap/renderFoldButton.js +2 -4
  131. package/mobile/dist/components/OfficesAtmsMap/renderFoldButton.js.map +1 -1
  132. package/mobile/dist/components/OfficesAtmsMap/renderOfficeCard.d.ts +1 -1
  133. package/mobile/dist/components/OfficesAtmsMap/renderOfficeCard.js +5 -29
  134. package/mobile/dist/components/OfficesAtmsMap/renderOfficeCard.js.map +1 -1
  135. package/mobile/dist/components/OfficesAtmsMap/renderRemoteWorkplaceCard.js +3 -11
  136. package/mobile/dist/components/OfficesAtmsMap/renderRemoteWorkplaceCard.js.map +1 -1
  137. package/mobile/dist/components/RollupItem/RollupItem.js +17 -13
  138. package/mobile/dist/components/RollupItem/RollupItem.js.map +1 -1
  139. package/mobile/dist/components/TariffsTable/TariffsTable.js +3 -1
  140. package/mobile/dist/components/TariffsTable/TariffsTable.js.map +1 -1
  141. package/mobile/dist/model/FormTypeFieldDef.d.ts +1 -1
  142. package/mobile/dist/ui-kit/BaseFiltration/FilteredBlocks.js +2 -2
  143. package/mobile/dist/ui-kit/BaseFiltration/FilteredBlocks.js.map +1 -1
  144. package/mobile/dist/ui-kit/BaseFiltration/GridBlocks.d.ts +8 -0
  145. package/mobile/dist/ui-kit/BaseFiltration/{renderGridBlocks.js → GridBlocks.js} +8 -7
  146. package/mobile/dist/ui-kit/BaseFiltration/GridBlocks.js.map +1 -0
  147. package/mobile/dist/ui-kit/Button/IconButton.d.ts +10 -0
  148. package/mobile/dist/ui-kit/Button/IconButton.js +13 -0
  149. package/mobile/dist/ui-kit/Button/IconButton.js.map +1 -0
  150. package/mobile/dist/ui-kit/Foldable/DefaultFoldButton.js +1 -5
  151. package/mobile/dist/ui-kit/Foldable/DefaultFoldButton.js.map +1 -1
  152. package/mobile/dist/ui-kit/Foldable/Foldable.d.ts +0 -6
  153. package/mobile/dist/ui-kit/Foldable/Foldable.js +3 -10
  154. package/mobile/dist/ui-kit/Foldable/Foldable.js.map +1 -1
  155. package/mobile/dist/utils/capitalize.d.ts +1 -0
  156. package/mobile/dist/utils/capitalize.js +5 -0
  157. package/mobile/dist/utils/capitalize.js.map +1 -0
  158. package/mobile/dist/utils/dataAttributes.d.ts +2 -2
  159. package/mobile/dist/utils/dataAttributes.js +1 -6
  160. package/mobile/dist/utils/dataAttributes.js.map +1 -1
  161. package/mobile/lib/common.css +1 -1
  162. package/mobile/lib/components/ApplicationLeadForm/GroupedConsents.js +7 -8
  163. package/mobile/lib/components/ApplicationLeadForm/GroupedConsents.js.map +1 -1
  164. package/mobile/lib/components/CarouselTariffsCard/CarouselTariffsCard.js +6 -5
  165. package/mobile/lib/components/CarouselTariffsCard/CarouselTariffsCard.js.map +1 -1
  166. package/mobile/lib/components/OfficesAtmsMap/FiltrationForm.d.ts +13 -0
  167. package/mobile/lib/components/OfficesAtmsMap/FiltrationForm.js +21 -0
  168. package/mobile/lib/components/OfficesAtmsMap/FiltrationForm.js.map +1 -0
  169. package/mobile/lib/components/OfficesAtmsMap/FoldableCardContent.d.ts +1 -0
  170. package/mobile/lib/components/OfficesAtmsMap/FoldableCardContent.js +11 -0
  171. package/mobile/lib/components/OfficesAtmsMap/FoldableCardContent.js.map +1 -0
  172. package/mobile/lib/components/OfficesAtmsMap/OfficesAtmsMapLayout.js +2 -8
  173. package/mobile/lib/components/OfficesAtmsMap/OfficesAtmsMapLayout.js.map +1 -1
  174. package/mobile/lib/components/OfficesAtmsMap/renderAtmCard.js +6 -12
  175. package/mobile/lib/components/OfficesAtmsMap/renderAtmCard.js.map +1 -1
  176. package/mobile/lib/components/OfficesAtmsMap/renderFoldButton.js +3 -5
  177. package/mobile/lib/components/OfficesAtmsMap/renderFoldButton.js.map +1 -1
  178. package/mobile/lib/components/OfficesAtmsMap/renderOfficeCard.d.ts +1 -1
  179. package/mobile/lib/components/OfficesAtmsMap/renderOfficeCard.js +5 -29
  180. package/mobile/lib/components/OfficesAtmsMap/renderOfficeCard.js.map +1 -1
  181. package/mobile/lib/components/OfficesAtmsMap/renderRemoteWorkplaceCard.js +3 -11
  182. package/mobile/lib/components/OfficesAtmsMap/renderRemoteWorkplaceCard.js.map +1 -1
  183. package/mobile/lib/components/RollupItem/RollupItem.js +18 -14
  184. package/mobile/lib/components/RollupItem/RollupItem.js.map +1 -1
  185. package/mobile/lib/components/TariffsTable/TariffsTable.js +3 -1
  186. package/mobile/lib/components/TariffsTable/TariffsTable.js.map +1 -1
  187. package/mobile/lib/model/FormTypeFieldDef.d.ts +1 -1
  188. package/mobile/lib/ui-kit/BaseFiltration/FilteredBlocks.js +3 -3
  189. package/mobile/lib/ui-kit/BaseFiltration/FilteredBlocks.js.map +1 -1
  190. package/mobile/lib/ui-kit/BaseFiltration/GridBlocks.d.ts +8 -0
  191. package/{lib/ui-kit/BaseFiltration/renderGridBlocks.js → mobile/lib/ui-kit/BaseFiltration/GridBlocks.js} +7 -5
  192. package/mobile/lib/ui-kit/BaseFiltration/GridBlocks.js.map +1 -0
  193. package/mobile/lib/ui-kit/Button/IconButton.d.ts +10 -0
  194. package/mobile/lib/ui-kit/Button/IconButton.js +11 -0
  195. package/mobile/lib/ui-kit/Button/IconButton.js.map +1 -0
  196. package/mobile/lib/ui-kit/Foldable/DefaultFoldButton.js +1 -5
  197. package/mobile/lib/ui-kit/Foldable/DefaultFoldButton.js.map +1 -1
  198. package/mobile/lib/ui-kit/Foldable/Foldable.d.ts +0 -6
  199. package/mobile/lib/ui-kit/Foldable/Foldable.js +4 -11
  200. package/mobile/lib/ui-kit/Foldable/Foldable.js.map +1 -1
  201. package/mobile/lib/utils/capitalize.d.ts +1 -0
  202. package/mobile/lib/utils/capitalize.js +2 -0
  203. package/mobile/lib/utils/capitalize.js.map +1 -0
  204. package/mobile/lib/utils/dataAttributes.d.ts +2 -2
  205. package/mobile/lib/utils/dataAttributes.js +1 -6
  206. package/mobile/lib/utils/dataAttributes.js.map +1 -1
  207. package/mobile/src/components/ApplicationForm/ApplicationForm.example.json +36 -0
  208. package/mobile/src/components/ApplicationLeadForm/GroupedConsents.tsx +26 -44
  209. package/mobile/src/components/CarouselTariffsCard/CarouselTariffsCard.tsx +21 -36
  210. package/mobile/src/components/OfficesAtmsMap/FiltrationForm.tsx +79 -0
  211. package/mobile/src/components/OfficesAtmsMap/FoldableCardContent.tsx +16 -0
  212. package/mobile/src/components/OfficesAtmsMap/OfficesAtmsMapLayout.tsx +7 -9
  213. package/mobile/src/components/OfficesAtmsMap/renderAtmCard.tsx +12 -27
  214. package/mobile/src/components/OfficesAtmsMap/renderFoldButton.tsx +6 -12
  215. package/mobile/src/components/OfficesAtmsMap/renderOfficeCard.tsx +9 -56
  216. package/mobile/src/components/OfficesAtmsMap/renderRemoteWorkplaceCard.tsx +4 -21
  217. package/mobile/src/components/RollupItem/RollupItem.tsx +29 -27
  218. package/mobile/src/components/TariffsTable/TariffsTable.tsx +10 -9
  219. package/mobile/src/model/FormTypeFieldDef.ts +2 -1
  220. package/mobile/src/ui-kit/BaseFiltration/FilteredBlocks.tsx +2 -2
  221. package/mobile/src/ui-kit/BaseFiltration/{renderGridBlocks.tsx → GridBlocks.tsx} +29 -32
  222. package/mobile/src/ui-kit/Button/IconButton.tsx +36 -0
  223. package/mobile/src/ui-kit/Foldable/DefaultFoldButton.tsx +7 -12
  224. package/mobile/src/ui-kit/Foldable/Foldable.tsx +7 -37
  225. package/mobile/src/utils/capitalize.ts +2 -0
  226. package/mobile/src/utils/dataAttributes.ts +1 -7
  227. package/package.json +1 -1
  228. package/src/components/ApplicationForm/ApplicationForm.example.json +36 -0
  229. package/src/components/ApplicationForm/ApplicationForm.fixture.tsx +27 -0
  230. package/src/components/ApplicationLeadForm/GroupedConsents.tsx +26 -44
  231. package/src/components/CarouselTariffsCard/CarouselTariffsCard.tsx +21 -36
  232. package/src/components/OfficesAtmsMap/FiltrationForm.tsx +79 -0
  233. package/src/components/OfficesAtmsMap/FoldableCardContent.tsx +16 -0
  234. package/src/components/OfficesAtmsMap/OfficesAtmsMapLayout.tsx +7 -9
  235. package/src/components/OfficesAtmsMap/renderAtmCard.tsx +12 -27
  236. package/src/components/OfficesAtmsMap/renderFoldButton.tsx +6 -12
  237. package/src/components/OfficesAtmsMap/renderOfficeCard.tsx +9 -56
  238. package/src/components/OfficesAtmsMap/renderRemoteWorkplaceCard.tsx +4 -21
  239. package/src/components/RollupItem/RollupItem.tsx +29 -27
  240. package/src/components/TariffsTable/TariffsTable.tsx +10 -9
  241. package/src/icons/IconName.ts +4 -4
  242. package/src/model/FormTypeFieldDef.ts +2 -1
  243. package/src/ui-kit/BaseFiltration/FilteredBlocks.tsx +2 -2
  244. package/src/ui-kit/BaseFiltration/{renderGridBlocks.tsx → GridBlocks.tsx} +29 -32
  245. package/src/ui-kit/Button/IconButton.tsx +36 -0
  246. package/src/ui-kit/Foldable/DefaultFoldButton.tsx +7 -12
  247. package/src/ui-kit/Foldable/Foldable.tsx +7 -37
  248. package/src/utils/capitalize.ts +2 -0
  249. package/src/utils/dataAttributes.ts +1 -7
  250. package/bundle/ui-kit/BaseFiltration/renderGridBlocks.d.ts +0 -9
  251. package/dist/components/OfficesAtmsMap/renderFiltrationForm.js +0 -26
  252. package/dist/components/OfficesAtmsMap/renderFiltrationForm.js.map +0 -1
  253. package/dist/ui-kit/BaseFiltration/renderGridBlocks.d.ts +0 -9
  254. package/dist/ui-kit/BaseFiltration/renderGridBlocks.js.map +0 -1
  255. package/lib/components/OfficesAtmsMap/renderFiltrationForm.js +0 -22
  256. package/lib/components/OfficesAtmsMap/renderFiltrationForm.js.map +0 -1
  257. package/lib/ui-kit/BaseFiltration/renderGridBlocks.d.ts +0 -9
  258. package/lib/ui-kit/BaseFiltration/renderGridBlocks.js.map +0 -1
  259. package/mobile/bundle/ui-kit/BaseFiltration/renderGridBlocks.d.ts +0 -9
  260. package/mobile/dist/components/OfficesAtmsMap/renderFiltrationForm.d.ts +0 -13
  261. package/mobile/dist/components/OfficesAtmsMap/renderFiltrationForm.js +0 -26
  262. package/mobile/dist/components/OfficesAtmsMap/renderFiltrationForm.js.map +0 -1
  263. package/mobile/dist/ui-kit/BaseFiltration/renderGridBlocks.d.ts +0 -9
  264. package/mobile/dist/ui-kit/BaseFiltration/renderGridBlocks.js.map +0 -1
  265. package/mobile/lib/components/OfficesAtmsMap/renderFiltrationForm.d.ts +0 -13
  266. package/mobile/lib/components/OfficesAtmsMap/renderFiltrationForm.js +0 -22
  267. package/mobile/lib/components/OfficesAtmsMap/renderFiltrationForm.js.map +0 -1
  268. package/mobile/lib/ui-kit/BaseFiltration/renderGridBlocks.d.ts +0 -9
  269. package/mobile/lib/ui-kit/BaseFiltration/renderGridBlocks.js.map +0 -1
  270. package/mobile/src/components/OfficesAtmsMap/renderFiltrationForm.tsx +0 -87
  271. package/src/components/OfficesAtmsMap/renderFiltrationForm.tsx +0 -87
@@ -0,0 +1,8 @@
1
+ import { type BlockDef } from '../../model/ContentPageDef';
2
+ import { type UniBlockProps } from '../../UniBlock/UniBlockProps';
3
+ import { type GridSection } from './BaseFiltrationContent';
4
+ interface GridBlocksProps extends GridSection, UniBlockProps {
5
+ blocksToRender?: BlockDef[];
6
+ }
7
+ export declare const GridBlocks: import("@redneckz/uni-jsx").UNIComponent<GridBlocksProps, any, any>;
8
+ export {};
@@ -1,4 +1,6 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "@redneckz/uni-jsx/jsx-runtime";
2
+ import { JSX } from '@redneckz/uni-jsx';
3
+ import { useBool } from '@redneckz/uni-jsx/lib/hooks/useBool';
2
4
  import { renderBlocksList } from '../../BlockRenderer/renderBlockList.js';
3
5
  import { AdTile } from '../../components/AdTile/AdTile.js';
4
6
  import { isOdd } from '../../utils/isOdd.js';
@@ -6,12 +8,12 @@ import { style } from '../../utils/style.js';
6
8
  import { DefaultFoldButton } from '../Foldable/DefaultFoldButton.js';
7
9
  import { Foldable } from '../Foldable/Foldable.js';
8
10
  import { FoldableSection } from '../Foldable/FoldableSection.js';
9
- const ICONS = ['ArrowDownIcon', 'ArrowUpIcon'];
10
11
  const resultsGridStyle = 'space-y-px lg:space-y-0 lg:grid lg:grid-cols-12 gap-2xs';
11
- export const renderGridBlocks = ({ topItemsCount = 0, label = '', block, blocksToRender = [], ...rest }) => {
12
+ export const GridBlocks = JSX(({ topItemsCount = 0, label = '', block, blocksToRender = [], ...rest }) => {
12
13
  const [visibleBlocks, hiddenBlocks] = topItemsCount > 0
13
14
  ? [blocksToRender.slice(0, topItemsCount), blocksToRender.slice(topItemsCount)]
14
15
  : [blocksToRender, []];
15
- return (_jsxs("div", { className: style('space-y-2xs', { hidden: !blocksToRender.length }), children: [_jsxs("div", { className: style(resultsGridStyle), children: [renderBlocksList(visibleBlocks, { ...rest.options, parent: block }), isOdd(visibleBlocks.length) ? _jsx(AdTile, { className: "col-span-6", ...rest }) : null] }), _jsx(Foldable, { renderFoldableSection: ({ isUnfolded }) => (_jsxs(FoldableSection, { className: style(resultsGridStyle), isUnfolded: isUnfolded, children: [renderBlocksList(hiddenBlocks, { ...rest.options, parent: block }), isOdd(hiddenBlocks.length) ? _jsx(AdTile, { className: "col-span-6", ...rest }) : null] })), renderFoldButton: ({ isUnfolded, onToggle }) => (_jsx(DefaultFoldButton, { className: style({ hidden: topItemsCount < 1 }), disabled: !hiddenBlocks?.length, label: label, icon: ICONS[Number(isUnfolded)], dataTheme: rest.options?.page?.colorPalette, onClick: onToggle })) })] }));
16
- };
17
- //# sourceMappingURL=renderGridBlocks.js.map
16
+ const [isUnfolded, { toggle }] = useBool(false);
17
+ return (_jsxs("div", { className: style('space-y-2xs', { hidden: !blocksToRender.length }), children: [_jsxs("div", { className: style(resultsGridStyle), children: [renderBlocksList(visibleBlocks, { ...rest.options, parent: block }), isOdd(visibleBlocks.length) ? _jsx(AdTile, { className: "col-span-6", ...rest }) : null] }), _jsxs(Foldable, { children: [_jsxs(FoldableSection, { className: style(resultsGridStyle), isUnfolded: isUnfolded, children: [renderBlocksList(hiddenBlocks, { ...rest.options, parent: block }), isOdd(hiddenBlocks.length) ? _jsx(AdTile, { className: "col-span-6", ...rest }) : null] }), _jsx(DefaultFoldButton, { className: style({ hidden: topItemsCount < 1 }), dataTheme: rest.options?.page?.colorPalette, disabled: !hiddenBlocks?.length, label: label, icon: isUnfolded ? 'ArrowUpIcon' : 'ArrowDownIcon', onClick: toggle })] })] }));
18
+ });
19
+ //# sourceMappingURL=GridBlocks.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"GridBlocks.js","sourceRoot":"","sources":["../../../src/ui-kit/BaseFiltration/GridBlocks.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AACxC,OAAO,EAAE,OAAO,EAAE,MAAM,qCAAqC,CAAC;AAC9D,OAAO,EAAE,gBAAgB,EAAE,MAAM,qCAAqC,CAAC;AACvE,OAAO,EAAE,MAAM,EAAE,MAAM,gCAAgC,CAAC;AAGxD,OAAO,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAC1C,OAAO,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAC1C,OAAO,EAAE,iBAAiB,EAAE,MAAM,+BAA+B,CAAC;AAClE,OAAO,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAChD,OAAO,EAAE,eAAe,EAAE,MAAM,6BAA6B,CAAC;AAG9D,MAAM,gBAAgB,GAAG,yDAAyD,CAAC;AAMnF,MAAM,CAAC,MAAM,UAAU,GAAG,GAAG,CAC3B,CAAC,EAAE,aAAa,GAAG,CAAC,EAAE,KAAK,GAAG,EAAE,EAAE,KAAK,EAAE,cAAc,GAAG,EAAE,EAAE,GAAG,IAAI,EAAE,EAAE,EAAE;IACzE,MAAM,CAAC,aAAa,EAAE,YAAY,CAAC,GACjC,aAAa,GAAG,CAAC;QACf,CAAC,CAAC,CAAC,cAAc,CAAC,KAAK,CAAC,CAAC,EAAE,aAAa,CAAC,EAAE,cAAc,CAAC,KAAK,CAAC,aAAa,CAAC,CAAC;QAC/E,CAAC,CAAC,CAAC,cAAc,EAAE,EAAE,CAAC,CAAC;IAE3B,MAAM,CAAC,UAAU,EAAE,EAAE,MAAM,EAAE,CAAC,GAAG,OAAO,CAAC,KAAK,CAAC,CAAC;IAEhD,OAAO,CACL,eAAK,SAAS,EAAE,KAAK,CAAC,aAAa,EAAE,EAAE,MAAM,EAAE,CAAC,cAAc,CAAC,MAAM,EAAE,CAAC,aACtE,eAAK,SAAS,EAAE,KAAK,CAAC,gBAAgB,CAAC,aACpC,gBAAgB,CAAC,aAAa,EAAE,EAAE,GAAG,IAAI,CAAC,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,CAAC,EACnE,KAAK,CAAC,aAAa,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,KAAC,MAAM,IAAC,SAAS,EAAC,YAAY,KAAK,IAAI,GAAI,CAAC,CAAC,CAAC,IAAI,IAC7E,EACN,MAAC,QAAQ,eACP,MAAC,eAAe,IAAC,SAAS,EAAE,KAAK,CAAC,gBAAgB,CAAC,EAAE,UAAU,EAAE,UAAU,aACxE,gBAAgB,CAAC,YAAY,EAAE,EAAE,GAAG,IAAI,CAAC,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,CAAC,EAClE,KAAK,CAAC,YAAY,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,KAAC,MAAM,IAAC,SAAS,EAAC,YAAY,KAAK,IAAI,GAAI,CAAC,CAAC,CAAC,IAAI,IAChE,EAClB,KAAC,iBAAiB,IAChB,SAAS,EAAE,KAAK,CAAC,EAAE,MAAM,EAAE,aAAa,GAAG,CAAC,EAAE,CAAC,EAC/C,SAAS,EAAE,IAAI,CAAC,OAAO,EAAE,IAAI,EAAE,YAAY,EAC3C,QAAQ,EAAE,CAAC,YAAY,EAAE,MAAM,EAC/B,KAAK,EAAE,KAAK,EACZ,IAAI,EAAE,UAAU,CAAC,CAAC,CAAC,aAAa,CAAC,CAAC,CAAC,eAAe,EAClD,OAAO,EAAE,MAAM,GACf,IACO,IACP,CACP,CAAC;AACJ,CAAC,CACF,CAAC"}
@@ -0,0 +1,10 @@
1
+ import type { IconName } from '../../icons/IconName';
2
+ import { type AspectsDef } from '../../model/AspectsProps';
3
+ export interface IconButtonProps {
4
+ className?: string;
5
+ name: IconName;
6
+ text?: string;
7
+ data?: AspectsDef[];
8
+ onClick?: () => void;
9
+ }
10
+ export declare const IconButton: import("@redneckz/uni-jsx").UNIComponent<IconButtonProps, any, any>;
@@ -0,0 +1,11 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "@redneckz/uni-jsx/jsx-runtime";
2
+ import { JSX } from '@redneckz/uni-jsx';
3
+ import { useMemo } from '@redneckz/uni-jsx/lib/hooks';
4
+ import { Icon } from '../../ui-kit/Icon/Icon.js';
5
+ import { getAspectsAttributes } from '../../utils/dataAttributes.js';
6
+ import { style } from '../../utils/style.js';
7
+ export const IconButton = JSX(({ className, name, text, data, onClick }) => {
8
+ const aspectsAttrs = useMemo(() => getAspectsAttributes(data), [data]);
9
+ return (_jsxs("button", { className: style('text-primary-main flex justify-between items-center border-none px-m', text ? 'pt-lg' : 'py-2xs', className), type: "button", ...aspectsAttrs, onClick: onClick, children: [text ? _jsx("div", { className: "pr-m", children: text }) : null, _jsx(Icon, { className: "text-primary-text", name: name, width: "16", height: "16" })] }));
10
+ });
11
+ //# sourceMappingURL=IconButton.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"IconButton.js","sourceRoot":"","sources":["../../../src/ui-kit/Button/IconButton.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AACxC,OAAO,EAAE,OAAO,EAAE,MAAM,6BAA6B,CAAC;AAGtD,OAAO,EAAE,IAAI,EAAE,MAAM,wBAAwB,CAAC;AAC9C,OAAO,EAAE,oBAAoB,EAAE,MAAM,4BAA4B,CAAC;AAClE,OAAO,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAU1C,MAAM,CAAC,MAAM,UAAU,GAAG,GAAG,CAAkB,CAAC,EAAE,SAAS,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,OAAO,EAAE,EAAE,EAAE;IAC1F,MAAM,YAAY,GAAG,OAAO,CAAC,GAAG,EAAE,CAAC,oBAAoB,CAAC,IAAI,CAAC,EAAE,CAAC,IAAI,CAAC,CAAC,CAAC;IAEvE,OAAO,CACL,kBACE,SAAS,EAAE,KAAK,CACd,sEAAsE,EACtE,IAAI,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,QAAQ,EACzB,SAAS,CACV,EACD,IAAI,EAAC,QAAQ,KAET,YAAY,EAChB,OAAO,EAAE,OAAO,aAEf,IAAI,CAAC,CAAC,CAAC,cAAK,SAAS,EAAC,MAAM,YAAE,IAAI,GAAO,CAAC,CAAC,CAAC,IAAI,EACjD,KAAC,IAAI,IAAC,SAAS,EAAC,mBAAmB,EAAC,IAAI,EAAE,IAAI,EAAE,KAAK,EAAC,IAAI,EAAC,MAAM,EAAC,IAAI,GAAG,IAClE,CACV,CAAC;AACJ,CAAC,CAAC,CAAC"}
@@ -10,9 +10,5 @@ export const DefaultFoldButton = JSX(({ className = '', label, icon, dataTheme =
10
10
  icon,
11
11
  iconVersion: 'white',
12
12
  }, className: "my-auto", width: "20", height: "20" })) : null })));
13
- export const renderDefaultFoldButton = ({ isUnfolded, onToggle }) => {
14
- const labels = ['Развернуть', 'Скрыть'];
15
- const icons = ['ArrowDownIcon', 'ArrowUpIcon'];
16
- return (_jsx(DefaultFoldButton, { icon: icons[Number(isUnfolded)], label: labels[Number(isUnfolded)], onClick: onToggle }));
17
- };
13
+ export const renderDefaultFoldButton = ({ isUnfolded, onToggle }) => (_jsx(DefaultFoldButton, { icon: isUnfolded ? 'ArrowUpIcon' : 'ArrowDownIcon', label: isUnfolded ? 'Скрыть' : 'Развернуть', onClick: onToggle }));
18
14
  //# sourceMappingURL=DefaultFoldButton.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"DefaultFoldButton.js","sourceRoot":"","sources":["../../../src/ui-kit/Foldable/DefaultFoldButton.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AAExC,OAAO,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAE1C,OAAO,EAAE,GAAG,EAAE,MAAM,YAAY,CAAC;AACjC,OAAO,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AACpC,OAAO,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAC;AAY5D,MAAM,CAAC,MAAM,iBAAiB,GAAG,GAAG,CAClC,CAAC,EAAE,SAAS,GAAG,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,SAAS,GAAG,IAAI,EAAE,QAAQ,GAAG,KAAK,EAAE,OAAO,EAAE,EAAE,EAAE,CAAC,CAChF,KAAC,YAAY,IACX,GAAG,EAAC,QAAQ,EACZ,OAAO,EAAE,OAAO,EAChB,QAAQ,EAAE,QAAQ,gBACN,SAAS,EACrB,cAAc,EAAC,QAAQ,EACvB,IAAI,EAAC,QAAQ,EACb,SAAS,EAAE,KAAK,CACd,iFAAiF,EACjF,QAAQ;QACN,CAAC,CAAC,0DAA0D;QAC5D,CAAC,CAAC,kDAAkD,EACtD,SAAS,CACV,EACD,QAAQ,EAAE,KAAC,IAAI,IAAC,IAAI,EAAC,SAAS,YAAE,KAAK,GAAQ,EAC7C,QAAQ,EACN,IAAI,CAAC,CAAC,CAAC,CACL,KAAC,GAAG,IACF,KAAK,EAAE;YACL,IAAI;YACJ,WAAW,EAAE,OAAO;SACrB,EACD,SAAS,EAAC,SAAS,EACnB,KAAK,EAAC,IAAI,EACV,MAAM,EAAC,IAAI,GACX,CACH,CAAC,CAAC,CAAC,IAAI,GAEV,CACH,CACF,CAAC;AAEF,MAAM,CAAC,MAAM,uBAAuB,GAAG,CAAC,EAAE,UAAU,EAAE,QAAQ,EAAqB,EAAE,EAAE;IACrF,MAAM,MAAM,GAAG,CAAC,YAAY,EAAE,QAAQ,CAAC,CAAC;IACxC,MAAM,KAAK,GAAe,CAAC,eAAe,EAAE,aAAa,CAAC,CAAC;IAE3D,OAAO,CACL,KAAC,iBAAiB,IAChB,IAAI,EAAE,KAAK,CAAC,MAAM,CAAC,UAAU,CAAC,CAAC,EAC/B,KAAK,EAAE,MAAM,CAAC,MAAM,CAAC,UAAU,CAAC,CAAC,EACjC,OAAO,EAAE,QAAQ,GACjB,CACH,CAAC;AACJ,CAAC,CAAC"}
1
+ {"version":3,"file":"DefaultFoldButton.js","sourceRoot":"","sources":["../../../src/ui-kit/Foldable/DefaultFoldButton.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AAExC,OAAO,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAE1C,OAAO,EAAE,GAAG,EAAE,MAAM,YAAY,CAAC;AACjC,OAAO,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AACpC,OAAO,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAC;AAY5D,MAAM,CAAC,MAAM,iBAAiB,GAAG,GAAG,CAClC,CAAC,EAAE,SAAS,GAAG,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,SAAS,GAAG,IAAI,EAAE,QAAQ,GAAG,KAAK,EAAE,OAAO,EAAE,EAAE,EAAE,CAAC,CAChF,KAAC,YAAY,IACX,GAAG,EAAC,QAAQ,EACZ,OAAO,EAAE,OAAO,EAChB,QAAQ,EAAE,QAAQ,gBACN,SAAS,EACrB,cAAc,EAAC,QAAQ,EACvB,IAAI,EAAC,QAAQ,EACb,SAAS,EAAE,KAAK,CACd,iFAAiF,EACjF,QAAQ;QACN,CAAC,CAAC,0DAA0D;QAC5D,CAAC,CAAC,kDAAkD,EACtD,SAAS,CACV,EACD,QAAQ,EAAE,KAAC,IAAI,IAAC,IAAI,EAAC,SAAS,YAAE,KAAK,GAAQ,EAC7C,QAAQ,EACN,IAAI,CAAC,CAAC,CAAC,CACL,KAAC,GAAG,IACF,KAAK,EAAE;YACL,IAAI;YACJ,WAAW,EAAE,OAAO;SACrB,EACD,SAAS,EAAC,SAAS,EACnB,KAAK,EAAC,IAAI,EACV,MAAM,EAAC,IAAI,GACX,CACH,CAAC,CAAC,CAAC,IAAI,GAEV,CACH,CACF,CAAC;AAEF,MAAM,CAAC,MAAM,uBAAuB,GAAG,CAAC,EAAE,UAAU,EAAE,QAAQ,EAAqB,EAAE,EAAE,CAAC,CACtF,KAAC,iBAAiB,IAChB,IAAI,EAAE,UAAU,CAAC,CAAC,CAAC,aAAa,CAAC,CAAC,CAAC,eAAe,EAClD,KAAK,EAAE,UAAU,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,YAAY,EAC3C,OAAO,EAAE,QAAQ,GACjB,CACH,CAAC"}
@@ -1,10 +1,4 @@
1
- import { type VNode } from '../../model/VNode';
2
- import { type FoldablePartProps } from './FoldablePartProps';
3
1
  export interface FoldableProps {
4
2
  className?: string;
5
- unfoldedByDefault?: boolean;
6
- isFoldButtonOnTop?: boolean;
7
- renderFoldableSection: (props: FoldablePartProps) => VNode;
8
- renderFoldButton?: ((props: FoldablePartProps) => VNode) | null;
9
3
  }
10
4
  export declare const Foldable: import("@redneckz/uni-jsx").UNIComponent<FoldableProps, any, any>;
@@ -1,13 +1,6 @@
1
- import { jsxs as _jsxs } from "@redneckz/uni-jsx/jsx-runtime";
1
+ import { jsx as _jsx } from "@redneckz/uni-jsx/jsx-runtime";
2
2
  import { JSX } from '@redneckz/uni-jsx';
3
- import { useCallback, useState } from '@redneckz/uni-jsx/lib/hooks';
4
- export const Foldable = JSX(({ className = '', isFoldButtonOnTop = false, unfoldedByDefault = false, renderFoldableSection, renderFoldButton, }) => {
5
- const [isUnfolded, setIsUnfolded] = useState(unfoldedByDefault);
6
- const onToggle = useCallback(() => {
7
- setIsUnfolded((_) => !_);
8
- }, []);
9
- const sectionNode = renderFoldableSection({ isUnfolded, onToggle });
10
- const buttonNode = renderFoldButton ? renderFoldButton({ isUnfolded, onToggle }) : null;
11
- return isFoldButtonOnTop ? (_jsxs("div", { className: className, role: "group", children: [buttonNode, sectionNode] })) : (_jsxs("div", { className: className, role: "group", children: [sectionNode, buttonNode] }));
12
- });
3
+ import { style } from '../../utils/style.js';
4
+ // TODO Не особо полезно, в итоге
5
+ export const Foldable = JSX(({ className, children }) => (_jsx("div", { className: style(className), role: "group", children: children })));
13
6
  //# sourceMappingURL=Foldable.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Foldable.js","sourceRoot":"","sources":["../../../src/ui-kit/Foldable/Foldable.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AACxC,OAAO,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,6BAA6B,CAAC;AAYpE,MAAM,CAAC,MAAM,QAAQ,GAAG,GAAG,CACzB,CAAC,EACC,SAAS,GAAG,EAAE,EACd,iBAAiB,GAAG,KAAK,EACzB,iBAAiB,GAAG,KAAK,EACzB,qBAAqB,EACrB,gBAAgB,GACjB,EAAE,EAAE;IACH,MAAM,CAAC,UAAU,EAAE,aAAa,CAAC,GAAG,QAAQ,CAAC,iBAAiB,CAAC,CAAC;IAEhE,MAAM,QAAQ,GAAG,WAAW,CAAC,GAAG,EAAE;QAChC,aAAa,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC;IAC3B,CAAC,EAAE,EAAE,CAAC,CAAC;IAEP,MAAM,WAAW,GAAG,qBAAqB,CAAC,EAAE,UAAU,EAAE,QAAQ,EAAE,CAAC,CAAC;IACpE,MAAM,UAAU,GAAG,gBAAgB,CAAC,CAAC,CAAC,gBAAgB,CAAC,EAAE,UAAU,EAAE,QAAQ,EAAE,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC;IAExF,OAAO,iBAAiB,CAAC,CAAC,CAAC,CACzB,eAAK,SAAS,EAAE,SAAS,EAAE,IAAI,EAAC,OAAO,aACpC,UAAU,EACV,WAAW,IACR,CACP,CAAC,CAAC,CAAC,CACF,eAAK,SAAS,EAAE,SAAS,EAAE,IAAI,EAAC,OAAO,aACpC,WAAW,EACX,UAAU,IACP,CACP,CAAC;AACJ,CAAC,CACF,CAAC"}
1
+ {"version":3,"file":"Foldable.js","sourceRoot":"","sources":["../../../src/ui-kit/Foldable/Foldable.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AACxC,OAAO,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAM1C,iCAAiC;AACjC,MAAM,CAAC,MAAM,QAAQ,GAAG,GAAG,CAAgB,CAAC,EAAE,SAAS,EAAE,QAAQ,EAAE,EAAE,EAAE,CAAC,CACtE,cAAK,SAAS,EAAE,KAAK,CAAC,SAAS,CAAC,EAAE,IAAI,EAAC,OAAO,YAC3C,QAAQ,GACL,CACP,CAAC,CAAC"}
@@ -0,0 +1 @@
1
+ export declare const capitalize: (text?: string) => string;
@@ -0,0 +1,2 @@
1
+ export const capitalize = (text) => text ? `${text.charAt(0).toUpperCase()}${text.slice(1)}` : '';
2
+ //# sourceMappingURL=capitalize.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"capitalize.js","sourceRoot":"","sources":["../../src/utils/capitalize.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,UAAU,GAAG,CAAC,IAAa,EAAU,EAAE,CAClD,IAAI,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,WAAW,EAAE,GAAG,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC"}
@@ -1,6 +1,6 @@
1
1
  import { type AspectsDef } from '../model/AspectsProps';
2
2
  export declare const getAspectsAttributes: (data?: AspectsDef[]) => {
3
- 'data-aspects'?: undefined;
4
- } | {
5
3
  'data-aspects': string;
4
+ } | {
5
+ 'data-aspects'?: undefined;
6
6
  };
@@ -1,11 +1,6 @@
1
1
  export const getAspectsAttributes = (data) => {
2
- if (!Array.isArray(data) || !data.length) {
3
- return {};
4
- }
5
2
  try {
6
- return {
7
- 'data-aspects': JSON.stringify(data),
8
- };
3
+ return Array.isArray(data) && data.length ? { 'data-aspects': JSON.stringify(data) } : {};
9
4
  }
10
5
  catch (_) {
11
6
  return {};
@@ -1 +1 @@
1
- {"version":3,"file":"dataAttributes.js","sourceRoot":"","sources":["../../src/utils/dataAttributes.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,oBAAoB,GAAG,CAAC,IAAmB,EAAE,EAAE;IAC1D,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,MAAM,EAAE;QACxC,OAAO,EAAE,CAAC;KACX;IAED,IAAI;QACF,OAAO;YACL,cAAc,EAAE,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC;SACrC,CAAC;KACH;IAAC,OAAO,CAAC,EAAE;QACV,OAAO,EAAE,CAAC;KACX;AACH,CAAC,CAAC"}
1
+ {"version":3,"file":"dataAttributes.js","sourceRoot":"","sources":["../../src/utils/dataAttributes.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,oBAAoB,GAAG,CAAC,IAAmB,EAAE,EAAE;IAC1D,IAAI;QACF,OAAO,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,cAAc,EAAE,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;KAC3F;IAAC,OAAO,CAAC,EAAE;QACV,OAAO,EAAE,CAAC;KACX;AACH,CAAC,CAAC"}
@@ -1068,5 +1068,41 @@
1068
1068
  }
1069
1069
  }
1070
1070
  }
1071
+ ],
1072
+ [
1073
+ "Рецепт для бизнеса",
1074
+ {
1075
+ "content": {
1076
+ "version": "primary",
1077
+ "padding": "",
1078
+ "title": "Заявка по акции 'Рецепт для бизнеса'",
1079
+ "typeForm": "RFB",
1080
+ "endpoint": "sendcorporatelead",
1081
+ "sections": [
1082
+ {
1083
+ "inputs": [{ "name": "name", "required": true, "label": "ФИО" }]
1084
+ },
1085
+ {
1086
+ "columns": 2,
1087
+ "inputs": [
1088
+ { "name": "phone", "required": true },
1089
+ { "name": "inn", "required": true }
1090
+ ]
1091
+ },
1092
+ {
1093
+ "inputs": [{ "name": "consentDataProcessing", "required": true }]
1094
+ }
1095
+ ],
1096
+ "button": {
1097
+ "text": "Отправить заявку",
1098
+ "version": "primary"
1099
+ },
1100
+ "link": {
1101
+ "text": "Согласен на обработку персональных данных",
1102
+ "href": "/privacy-policy",
1103
+ "target": "_blank"
1104
+ }
1105
+ }
1106
+ }
1071
1107
  ]
1072
1108
  ]
@@ -1,16 +1,16 @@
1
1
  import { JSX } from '@redneckz/uni-jsx';
2
- import { useMemo } from '@redneckz/uni-jsx/lib/hooks';
3
- import { type FormFieldRegisterer, type VNode } from '../../services/retail/external/types';
2
+ import { useCallback, useMemo } from '@redneckz/uni-jsx/lib/hooks';
3
+ import { useBool } from '@redneckz/uni-jsx/lib/hooks/useBool';
4
+ import { type FormFieldRegisterer } from '../../services/retail/external/types';
4
5
  import { InputsConsentsMap } from '../../services/retail/inputs';
5
6
  import { type LeadFormState } from '../../services/retail/model/LeadFormState';
6
7
  import { type FieldRetailDef } from '../../services/retail/model/RetailFormContent';
8
+ import { IconButton } from '../../ui-kit/Button/IconButton';
7
9
  import { Checkbox } from '../../ui-kit/Checkbox/Checkbox';
8
10
  import { Foldable } from '../../ui-kit/Foldable/Foldable';
9
- import { type FoldablePartProps } from '../../ui-kit/Foldable/FoldablePartProps';
10
11
  import { FoldableSection } from '../../ui-kit/Foldable/FoldableSection';
11
12
  import { getField } from '../../ui-kit/FormField/getField';
12
13
  import { validatorObj } from '../../ui-kit/FormField/getObjectValidator';
13
- import { Icon } from '../../ui-kit/Icon/Icon';
14
14
  import { renderErrorText } from '../../ui-kit/Input/renderErrorText';
15
15
  import { withValidator } from '../../validation/withValidator';
16
16
 
@@ -25,12 +25,15 @@ const CONSENT_REQUIRED = 'Отметьте все обязательные со
25
25
  export const GroupedConsents = JSX<GroupedConsentsProps>(({ inputs = [], field, key }) => {
26
26
  const isChecked = inputs.every((_) => Boolean(field(_.name as keyof LeadFormState).value));
27
27
 
28
- const handleGeneralToggle = (value: boolean) => {
29
- for (const item of inputs) {
30
- const itemField = field(item.name as keyof LeadFormState);
31
- itemField.onChange?.(value);
32
- }
33
- };
28
+ const handleGeneralToggle = useCallback(
29
+ (value: boolean) => {
30
+ for (const item of inputs) {
31
+ const itemField = field(item.name as keyof LeadFormState);
32
+ itemField.onChange?.(value);
33
+ }
34
+ },
35
+ [inputs],
36
+ );
34
37
 
35
38
  const hasValidationErrors = useMemo(
36
39
  () =>
@@ -47,48 +50,27 @@ export const GroupedConsents = JSX<GroupedConsentsProps>(({ inputs = [], field,
47
50
  [inputs],
48
51
  );
49
52
 
53
+ const [isUnfolded, { toggle }] = useBool(true);
54
+
50
55
  return (
51
56
  <div className="w-fit">
52
- <Foldable
53
- isFoldButtonOnTop
54
- unfoldedByDefault
55
- renderFoldableSection={({ isUnfolded }) => (
56
- <FoldableSection isUnfolded={isUnfolded} className="flex flex-col pl-2xl">
57
- {
58
- // eslint-disable-next-line @typescript-eslint/no-unsafe-argument
59
- inputs.map(getField<FieldRetailDef>(field, {}, { ...InputsConsentsMap }))
60
- }
61
- </FoldableSection>
62
- )}
63
- renderFoldButton={renderGeneralCheckbox(
57
+ <Foldable>
58
+ <div className="flex items-start">
64
59
  <div>
65
60
  <Checkbox
61
+ key={key}
62
+ text={CONSENT_ALL_DOCS_TEXT}
66
63
  value={isChecked}
67
64
  onChange={handleGeneralToggle}
68
- text={CONSENT_ALL_DOCS_TEXT}
69
- key={key}
70
65
  />
71
66
  {renderErrorText(hasValidationErrors ? CONSENT_REQUIRED : '')}
72
- </div>,
73
- )}
74
- />
67
+ </div>
68
+ <IconButton name={isUnfolded ? 'ArrowUpIcon' : 'ArrowDownIcon'} onClick={toggle} />
69
+ </div>
70
+ <FoldableSection className="flex flex-col pl-2xl" isUnfolded={isUnfolded}>
71
+ {inputs.map(getField<FieldRetailDef>(field, {}, InputsConsentsMap))}
72
+ </FoldableSection>
73
+ </Foldable>
75
74
  </div>
76
75
  );
77
76
  });
78
-
79
- const renderGeneralCheckbox =
80
- (generalCheckBox: VNode) =>
81
- (foldableData: FoldablePartProps): VNode =>
82
- (
83
- <div className="flex items-start">
84
- {generalCheckBox}
85
- <button onClick={foldableData.onToggle} className="px-m py-2xs" type="button">
86
- <Icon
87
- className="text-primary-text"
88
- name={foldableData.isUnfolded ? 'ArrowUpIcon' : 'ArrowDownIcon'}
89
- width="16"
90
- height="16"
91
- />
92
- </button>
93
- </div>
94
- );
@@ -2,14 +2,13 @@ import { JSX } from '@redneckz/uni-jsx';
2
2
  import { useCallback, useEffect, useState } from '@redneckz/uni-jsx/lib/hooks';
3
3
  import { type AspectsDef } from '../../model/AspectsProps';
4
4
  import { BlockWrapper } from '../../ui-kit/BlockWrapper';
5
+ import { IconButton } from '../../ui-kit/Button/IconButton';
5
6
  import { Foldable } from '../../ui-kit/Foldable/Foldable';
6
7
  import { FoldableSection } from '../../ui-kit/Foldable/FoldableSection';
7
8
  import { Heading } from '../../ui-kit/Heading/Heading';
8
- import { Icon } from '../../ui-kit/Icon/Icon';
9
9
  import { Img } from '../../ui-kit/Img/Img';
10
10
  import { LinkButton } from '../../ui-kit/LinkButton/LinkButton';
11
11
  import { type UniBlockProps } from '../../UniBlock/UniBlockProps';
12
- import { getAspectsAttributes } from '../../utils/dataAttributes';
13
12
  import { isIcon } from '../../utils/isIcon';
14
13
  import { style } from '../../utils/style';
15
14
  import { type CarouselTariffsCardContent } from './CarouselTariffsCardContent';
@@ -49,7 +48,7 @@ export const CarouselTariffsCard = JSX<CarouselTariffsCardProps>(
49
48
  [options?.parent],
50
49
  );
51
50
 
52
- const toggle = useCallback(() => {
51
+ const handleFold = useCallback(() => {
53
52
  carouselTariffsCardEventBus.fire('fold', {
54
53
  type: 'fold',
55
54
  isUnfolded: !isVisible,
@@ -69,19 +68,15 @@ export const CarouselTariffsCard = JSX<CarouselTariffsCardProps>(
69
68
  ) : null}
70
69
  {button?.text ? <LinkButton className="w-full mt-m mb-lg" {...button} /> : null}
71
70
  {hiddenCells.length ? (
72
- <Foldable
73
- renderFoldableSection={() => (
74
- <div>
75
- {visibleCells}
76
- <FoldableSection isUnfolded={isVisible}>{hiddenCells}</FoldableSection>
77
- </div>
78
- )}
79
- renderFoldButton={() =>
80
- cardCells.length >= visibleCellsCount ? (
81
- <FoldButton data={data} isUnfolded={isVisible} onClick={toggle} />
82
- ) : null
83
- }
84
- />
71
+ <Foldable>
72
+ <div>
73
+ {visibleCells}
74
+ <FoldableSection isUnfolded={isVisible}>{hiddenCells}</FoldableSection>
75
+ </div>
76
+ {cardCells.length >= visibleCellsCount ? (
77
+ <FoldButton isUnfolded={isVisible} data={data} onClick={handleFold} />
78
+ ) : null}
79
+ </Foldable>
85
80
  ) : (
86
81
  <div>{visibleCells}</div>
87
82
  )}
@@ -90,24 +85,14 @@ export const CarouselTariffsCard = JSX<CarouselTariffsCardProps>(
90
85
  },
91
86
  );
92
87
 
93
- const FoldButton = JSX<{
94
- data?: AspectsDef[];
95
- isUnfolded?: boolean;
96
- onClick?: () => void;
97
- }>(({ data, isUnfolded = false, onClick }) => (
98
- <button
99
- className="w-full cursor-pointer text-primary-main pt-lg flex justify-between items-center"
100
- type="button"
101
- onClick={onClick}
102
- // eslint-disable-next-line react/jsx-props-no-spreading
103
- {...(isUnfolded ? getAspectsAttributes(data) : {})}
104
- >
105
- <div>{isUnfolded ? 'Скрыть' : 'Подробнее о тарифе'}</div>
106
- <Icon
107
- className="text-primary-text"
108
- name={isUnfolded ? 'ArrowUpIcon' : 'ArrowDownIcon'}
109
- width="16"
110
- height="16"
88
+ const FoldButton = JSX<{ isUnfolded?: boolean; data?: AspectsDef[]; onClick?: () => void }>(
89
+ ({ data, isUnfolded, onClick }) => (
90
+ <IconButton
91
+ className="w-full"
92
+ {...(isUnfolded
93
+ ? { name: 'ArrowUpIcon', text: 'Скрыть', data }
94
+ : { name: 'ArrowDownIcon', text: 'Подробнее о тарифе' })}
95
+ onClick={onClick}
111
96
  />
112
- </button>
113
- ));
97
+ ),
98
+ );
@@ -0,0 +1,79 @@
1
+ import { JSX } from '@redneckz/uni-jsx';
2
+ import { useBool } from '@redneckz/uni-jsx/lib/hooks/useBool';
3
+ import { type FormFieldRegisterer } from '../../hooks/useForm/useForm';
4
+ import { Checkbox } from '../../ui-kit/Checkbox/Checkbox';
5
+ import { Foldable } from '../../ui-kit/Foldable/Foldable';
6
+ import { type FoldablePartProps } from '../../ui-kit/Foldable/FoldablePartProps';
7
+ import { FoldableSection } from '../../ui-kit/Foldable/FoldableSection';
8
+ import { Icon } from '../../ui-kit/Icon/Icon';
9
+ import { LinkButton } from '../../ui-kit/LinkButton/LinkButton';
10
+
11
+ const COMMON_FILTERS_STYLES = 'flex flex-col sm:flex-row sm:flex-wrap gap-3xl pb-2xl';
12
+
13
+ export interface RenderFiltrationFormProps {
14
+ filters: string[];
15
+ field: { field: FormFieldRegisterer<any>; reset: () => void };
16
+ onlyOffice?: boolean;
17
+ labels: Record<string, string>;
18
+ }
19
+
20
+ export const FiltrationForm = JSX<RenderFiltrationFormProps>(
21
+ ({ filters, field: { field, reset }, onlyOffice, labels }) => {
22
+ const visibleFiltersNum = onlyOffice ? 5 : 6;
23
+
24
+ const filtersCheckbox = (filters || []).map((key) => (
25
+ <Checkbox key={key} text={labels[key]} {...field(key)} />
26
+ ));
27
+
28
+ const [visibleFilters, hiddenFilters] =
29
+ visibleFiltersNum > 0
30
+ ? [filtersCheckbox.slice(0, visibleFiltersNum), filtersCheckbox.slice(visibleFiltersNum)]
31
+ : [filtersCheckbox, []];
32
+
33
+ const [isUnfolded, { toggle }] = useBool(false);
34
+
35
+ return (
36
+ <div>
37
+ {filters?.length ? (
38
+ <div>
39
+ <Foldable>
40
+ <div>
41
+ <div className={COMMON_FILTERS_STYLES}>{visibleFilters}</div>
42
+ <FoldableSection className={COMMON_FILTERS_STYLES} isUnfolded={isUnfolded}>
43
+ {hiddenFilters}
44
+ </FoldableSection>
45
+ </div>
46
+ {renderFoldButton(reset, onlyOffice)({ isUnfolded, onToggle: toggle })}
47
+ </Foldable>
48
+ </div>
49
+ ) : null}
50
+ </div>
51
+ );
52
+ },
53
+ );
54
+
55
+ // TODO Столько разных кнопок с иконками, но эта самая творчески-ударённая реализация))
56
+ export const renderFoldButton =
57
+ (reset: () => void, onlyOffice = false) =>
58
+ ({ isUnfolded, onToggle }: FoldablePartProps) =>
59
+ (
60
+ <div className="flex space-x-lg">
61
+ {onlyOffice ? (
62
+ <LinkButton
63
+ version="transparent"
64
+ className="text-secondary-text [&>*]:p-0"
65
+ appendRight={
66
+ <Icon name={isUnfolded ? 'ArrowUpIcon' : 'ArrowDownIcon'} width="16" height="16" />
67
+ }
68
+ text={isUnfolded ? 'Меньше фильтров' : 'Больше фильтров'}
69
+ onClick={onToggle}
70
+ />
71
+ ) : null}
72
+ <LinkButton version="transparent" className="text-secondary-text [&>*]:p-0" onClick={reset}>
73
+ <div className="flex items-center">
74
+ Очистить фильтр
75
+ <Icon name="CloseIcon" width="16" height="16" className="ml-2xs" />
76
+ </div>
77
+ </LinkButton>
78
+ </div>
79
+ );
@@ -0,0 +1,16 @@
1
+ import { JSX } from '@redneckz/uni-jsx';
2
+ import { useBool } from '@redneckz/uni-jsx/lib/hooks/useBool';
3
+ import { Foldable } from '../../ui-kit/Foldable/Foldable';
4
+ import { FoldableSection } from '../../ui-kit/Foldable/FoldableSection';
5
+ import { renderFoldButton } from './renderFoldButton';
6
+
7
+ export const FoldableCardContent = JSX(({ children }) => {
8
+ const [isUnfolded, { toggle }] = useBool(false);
9
+
10
+ return (
11
+ <Foldable className="block sm:hidden">
12
+ <FoldableSection isUnfolded={isUnfolded}>{children}</FoldableSection>
13
+ {renderFoldButton({ isUnfolded, onToggle: toggle })}
14
+ </Foldable>
15
+ );
16
+ });
@@ -6,11 +6,11 @@ import { ClientOnly } from '../../ui-kit/ClientOnly';
6
6
  import { YandexMap } from '../../ui-kit/YandexMap/YandexMap';
7
7
  import { style } from '../../utils/style';
8
8
  import { FILTRATION_LABELS, FILTRATION_PREDICATES, INITIAL_FILTRATION_STATE } from './filters';
9
+ import { FiltrationForm } from './FiltrationForm';
9
10
  import { type AtmsDef } from './OfficesAtmsMapContent';
10
11
  import { type Atm, type Branch, type RemoteWorkplace } from './OfficesAtmsMapProps';
11
12
  import { renderButtonsGroup } from './renderButtonsGroup';
12
13
  import { renderDescriptionBlock } from './renderDescriptionBlock';
13
- import { renderFiltrationForm, type RenderFiltrationFormOptions } from './renderFiltrationForm';
14
14
  import { renderHeading } from './renderHeading';
15
15
  import { useOfficesAtmsMapData } from './useOfficesAtmsMapData';
16
16
  import { type BalloonContent } from './YandexMapProps';
@@ -63,13 +63,6 @@ export const OfficesAtmsMapLayout = JSX<OfficesAtmsMapLayoutProps<Branch | Atm |
63
63
 
64
64
  const [activeButton, setActiveButton] = useState('all');
65
65
 
66
- const filterOptions: RenderFiltrationFormOptions = {
67
- filters: getFiltersWithNonEmptyData([...data, ...remoteWorkplaces]),
68
- field: { field, reset },
69
- onlyOffice,
70
- labels: FILTRATION_LABELS,
71
- };
72
-
73
66
  return (
74
67
  <div className={style('space-y-1', className)}>
75
68
  <div className="bg-white">
@@ -78,7 +71,12 @@ export const OfficesAtmsMapLayout = JSX<OfficesAtmsMapLayoutProps<Branch | Atm |
78
71
  {descriptionData ? renderDescriptionBlock(descriptionData) : null}
79
72
  {onlyOffice && renderButtonsGroup(data, activeButton, setActiveButton)}
80
73
  <div className={style('pb-3xl', filtersVisibleStyles(activeButton))}>
81
- {renderFiltrationForm(filterOptions)}
74
+ <FiltrationForm
75
+ filters={getFiltersWithNonEmptyData([...data, ...remoteWorkplaces])}
76
+ field={{ field, reset }}
77
+ onlyOffice={onlyOffice}
78
+ labels={FILTRATION_LABELS}
79
+ />
82
80
  </div>
83
81
  </div>
84
82
  <div className="h-[600px]">
@@ -1,12 +1,11 @@
1
- import { Foldable } from '../../ui-kit/Foldable/Foldable';
2
- import { FoldableSection } from '../../ui-kit/Foldable/FoldableSection';
3
1
  import { Icon } from '../../ui-kit/Icon/Icon';
4
2
  import { Text } from '../../ui-kit/Text/Text';
3
+ import { capitalize } from '../../utils/capitalize';
5
4
  import { Badge } from './Badge';
6
- import { CardCell } from './CardCell';
5
+ import { CardCell, type CardCellProps } from './CardCell';
7
6
  import { CardRow } from './CardRow';
7
+ import { FoldableCardContent } from './FoldableCardContent';
8
8
  import { type Atm } from './OfficesAtmsMapProps';
9
- import { renderFoldButton } from './renderFoldButton';
10
9
 
11
10
  export const renderAtmCard = (
12
11
  {
@@ -21,10 +20,10 @@ export const renderAtmCard = (
21
20
  }: Atm,
22
21
  i: number,
23
22
  ) => {
24
- const additionalInfo = [
23
+ const additionalInfo: CardCellProps[] = [
25
24
  {
26
25
  label: 'Устройство',
27
- value: capitalizedFirstLetter(terminalType),
26
+ value: capitalize(terminalType),
28
27
  },
29
28
  { label: 'Модуль приема наличных', value: billAcceptorEnable ? 'Да' : 'Нет' },
30
29
  {
@@ -42,7 +41,7 @@ export const renderAtmCard = (
42
41
  <div key={String(i)} className="bg-white col-span-12 p-3xl sm:border-green sm:border">
43
42
  <div className="sm:flex sm:justify-between">
44
43
  <div>
45
- <Text size="text-h4">{capitalizedFirstLetter(location)}</Text>
44
+ <Text size="text-h4">{capitalize(location)}</Text>
46
45
  {address ? (
47
46
  <div className="flex pb-xl pt-xs gap-2xs">
48
47
  <Icon name="GeolocationIcon" width="24" height="24" />
@@ -51,38 +50,24 @@ export const renderAtmCard = (
51
50
  ) : null}
52
51
  </div>
53
52
  <div className="whitespace-nowrap">
54
- <Badge color="green">{capitalizedFirstLetter(workTime)}</Badge>
53
+ <Badge color="green">{capitalize(workTime)}</Badge>
55
54
  </div>
56
55
  </div>
57
56
  <div className="hidden sm:block">
58
57
  <CardRow className="flex-wrap">{additionalInfo?.map(renderInfo)}</CardRow>
59
58
  </div>
60
- <Foldable
61
- className="block sm:hidden"
62
- renderFoldableSection={({ isUnfolded }) => {
63
- return (
64
- <FoldableSection isUnfolded={isUnfolded}>
65
- <CardRow className="flex-wrap">{additionalInfo?.map(renderInfo)}</CardRow>
66
- </FoldableSection>
67
- );
68
- }}
69
- //** TODO: Remove styles with refactoring DefaultFoldButton*/
70
- renderFoldButton={({ isUnfolded, onToggle }) => renderFoldButton({ isUnfolded, onToggle })}
71
- />
59
+ <FoldableCardContent>
60
+ <CardRow className="flex-wrap">{additionalInfo?.map(renderInfo)}</CardRow>
61
+ </FoldableCardContent>
72
62
  </div>
73
63
  );
74
64
  };
75
65
 
76
66
  export const getAtmPoint = ({ address = '', terminalType, atmCode = '' }: Atm) => {
77
- const header = `${capitalizedFirstLetter(terminalType)} №${atmCode}`;
67
+ const header = `${capitalize(terminalType)} №${atmCode}`;
78
68
  const body = address.toUpperCase();
79
69
 
80
70
  return { header, body };
81
71
  };
82
72
 
83
- const renderInfo = (item: Record<string, string>, i: number) => (
84
- <CardCell key={String(i)} {...item} />
85
- );
86
-
87
- const capitalizedFirstLetter = (text?: string) =>
88
- text ? `${text?.charAt(0)?.toUpperCase()}${text?.slice(1)}` : '';
73
+ const renderInfo = (item: CardCellProps, i: number) => <CardCell key={String(i)} {...item} />;