@redneckz/wildless-cms-uni-blocks 0.14.853 → 0.14.855

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 (409) hide show
  1. package/bin/migration-scripts/0.14.850.js +70 -0
  2. package/bundle/blocks.schema.json +1 -1
  3. package/bundle/bundle.umd.js +61 -109
  4. package/bundle/bundle.umd.min.js +1 -1
  5. package/bundle/components/TariffsTable/TableCarouselContainer.d.ts +0 -2
  6. package/bundle/components/TariffsTable/TariffsTable.d.ts +1 -1
  7. package/bundle/components/TariffsTable/TariffsTableCell.d.ts +10 -8
  8. package/bundle/components/TariffsTable/TariffsTableContent.d.ts +2 -68
  9. package/bundle/components/TariffsTable/TariffsTableRow.d.ts +0 -2
  10. package/bundle/components/TariffsTable/TariffsTableRowContainer.d.ts +2 -1
  11. package/bundle/components/TariffsTable/TariffsTableWrapper.d.ts +1 -6
  12. package/bundle/components/TariffsTable/renderCell.d.ts +2 -0
  13. package/bundle/components/TariffsTable/renderHeader.d.ts +2 -0
  14. package/bundle/model/onClick.d.ts +3 -0
  15. package/bundle/model/onClose.d.ts +3 -0
  16. package/bundle/ui-kit/InnerTable/InnerTableButton.d.ts +2 -3
  17. package/bundle/ui-kit/InnerTable/InnerTableProps.d.ts +2 -4
  18. package/bundle/ui-kit/ResponseTypeDialog/ResponseTypeDialog.d.ts +1 -1
  19. package/dist/components/TariffsTable/TableCarouselContainer.d.ts +0 -2
  20. package/dist/components/TariffsTable/TableCarouselContainer.js +1 -1
  21. package/dist/components/TariffsTable/TableCarouselContainer.js.map +1 -1
  22. package/dist/components/TariffsTable/TariffsTable.d.ts +1 -1
  23. package/dist/components/TariffsTable/TariffsTable.js +4 -11
  24. package/dist/components/TariffsTable/TariffsTable.js.map +1 -1
  25. package/dist/components/TariffsTable/TariffsTableCell.d.ts +10 -8
  26. package/dist/components/TariffsTable/TariffsTableCell.js +14 -4
  27. package/dist/components/TariffsTable/TariffsTableCell.js.map +1 -1
  28. package/dist/components/TariffsTable/TariffsTableContent.d.ts +2 -68
  29. package/dist/components/TariffsTable/TariffsTableRow.d.ts +0 -2
  30. package/dist/components/TariffsTable/TariffsTableRow.js +6 -10
  31. package/dist/components/TariffsTable/TariffsTableRow.js.map +1 -1
  32. package/dist/components/TariffsTable/TariffsTableRowContainer.d.ts +2 -1
  33. package/dist/components/TariffsTable/TariffsTableRowContainer.js +3 -3
  34. package/dist/components/TariffsTable/TariffsTableRowContainer.js.map +1 -1
  35. package/dist/components/TariffsTable/TariffsTableWrapper.d.ts +1 -6
  36. package/dist/components/TariffsTable/TariffsTableWrapper.js +1 -9
  37. package/dist/components/TariffsTable/TariffsTableWrapper.js.map +1 -1
  38. package/dist/components/TariffsTable/dataFixture.js +1 -14
  39. package/dist/components/TariffsTable/dataFixture.js.map +1 -1
  40. package/dist/components/TariffsTable/renderCell.d.ts +2 -0
  41. package/dist/components/TariffsTable/renderCell.js +15 -0
  42. package/dist/components/TariffsTable/renderCell.js.map +1 -0
  43. package/dist/components/TariffsTable/renderHeader.d.ts +2 -0
  44. package/dist/components/TariffsTable/renderHeader.js +10 -0
  45. package/dist/components/TariffsTable/renderHeader.js.map +1 -0
  46. package/dist/components/TariffsTable/renderInnerTableCell.d.ts +0 -0
  47. package/dist/components/TariffsTable/renderInnerTableCell.js +1 -0
  48. package/dist/components/TariffsTable/renderInnerTableCell.js.map +1 -0
  49. package/dist/hooks/useLink.js +2 -1
  50. package/dist/hooks/useLink.js.map +1 -1
  51. package/dist/model/onClick.d.ts +3 -0
  52. package/dist/model/onClick.js +2 -0
  53. package/dist/model/onClick.js.map +1 -0
  54. package/dist/model/onClose.d.ts +3 -0
  55. package/dist/model/onClose.js +2 -0
  56. package/dist/model/onClose.js.map +1 -0
  57. package/dist/retail/components/DraftDialog/DraftActionButton.js +1 -1
  58. package/dist/retail/components/DraftDialog/DraftActionButton.js.map +1 -1
  59. package/dist/ui-kit/InnerTable/InnerTable.js +2 -3
  60. package/dist/ui-kit/InnerTable/InnerTable.js.map +1 -1
  61. package/dist/ui-kit/InnerTable/InnerTableBody.js +4 -6
  62. package/dist/ui-kit/InnerTable/InnerTableBody.js.map +1 -1
  63. package/dist/ui-kit/InnerTable/InnerTableButton.d.ts +2 -3
  64. package/dist/ui-kit/InnerTable/InnerTableButton.js.map +1 -1
  65. package/dist/ui-kit/InnerTable/InnerTableProps.d.ts +2 -4
  66. package/dist/ui-kit/InnerTable/renderInnerTableRow.js +1 -1
  67. package/dist/ui-kit/InnerTable/renderInnerTableRow.js.map +1 -1
  68. package/dist/ui-kit/ResponseTypeDialog/ResponseTypeDialog.d.ts +1 -1
  69. package/dist/utils/adjustBase.js +4 -1
  70. package/dist/utils/adjustBase.js.map +1 -1
  71. package/lib/common.css +1 -1
  72. package/lib/components/TariffsTable/TableCarouselContainer.d.ts +0 -2
  73. package/lib/components/TariffsTable/TableCarouselContainer.js +1 -1
  74. package/lib/components/TariffsTable/TableCarouselContainer.js.map +1 -1
  75. package/lib/components/TariffsTable/TariffsTable.d.ts +1 -1
  76. package/lib/components/TariffsTable/TariffsTable.fixture.mobile.d.ts +3 -1
  77. package/lib/components/TariffsTable/TariffsTable.js +4 -11
  78. package/lib/components/TariffsTable/TariffsTable.js.map +1 -1
  79. package/lib/components/TariffsTable/TariffsTableCell.d.ts +10 -8
  80. package/lib/components/TariffsTable/TariffsTableCell.js +14 -4
  81. package/lib/components/TariffsTable/TariffsTableCell.js.map +1 -1
  82. package/lib/components/TariffsTable/TariffsTableContent.d.ts +2 -68
  83. package/lib/components/TariffsTable/TariffsTableRow.d.ts +0 -2
  84. package/lib/components/TariffsTable/TariffsTableRow.js +6 -10
  85. package/lib/components/TariffsTable/TariffsTableRow.js.map +1 -1
  86. package/lib/components/TariffsTable/TariffsTableRowContainer.d.ts +2 -1
  87. package/lib/components/TariffsTable/TariffsTableRowContainer.js +2 -2
  88. package/lib/components/TariffsTable/TariffsTableRowContainer.js.map +1 -1
  89. package/lib/components/TariffsTable/TariffsTableWrapper.d.ts +1 -6
  90. package/lib/components/TariffsTable/TariffsTableWrapper.js +2 -10
  91. package/lib/components/TariffsTable/TariffsTableWrapper.js.map +1 -1
  92. package/lib/components/TariffsTable/dataFixture.js +1 -14
  93. package/lib/components/TariffsTable/dataFixture.js.map +1 -1
  94. package/lib/components/TariffsTable/renderCell.d.ts +2 -0
  95. package/lib/components/TariffsTable/renderCell.js +12 -0
  96. package/lib/components/TariffsTable/renderCell.js.map +1 -0
  97. package/lib/components/TariffsTable/renderHeader.d.ts +2 -0
  98. package/lib/components/TariffsTable/renderHeader.js +7 -0
  99. package/lib/components/TariffsTable/renderHeader.js.map +1 -0
  100. package/lib/components/TariffsTable/renderInnerTableCell.d.ts +0 -0
  101. package/lib/components/TariffsTable/renderInnerTableCell.js +1 -0
  102. package/lib/components/TariffsTable/renderInnerTableCell.js.map +1 -0
  103. package/lib/hooks/useLink.js +2 -1
  104. package/lib/hooks/useLink.js.map +1 -1
  105. package/lib/model/onClick.d.ts +3 -0
  106. package/lib/model/onClick.js +2 -0
  107. package/lib/model/onClick.js.map +1 -0
  108. package/lib/model/onClose.d.ts +3 -0
  109. package/lib/model/onClose.js +2 -0
  110. package/lib/model/onClose.js.map +1 -0
  111. package/lib/retail/components/DraftDialog/DraftActionButton.js +1 -1
  112. package/lib/retail/components/DraftDialog/DraftActionButton.js.map +1 -1
  113. package/lib/ui-kit/InnerTable/InnerTable.js +2 -3
  114. package/lib/ui-kit/InnerTable/InnerTable.js.map +1 -1
  115. package/lib/ui-kit/InnerTable/InnerTableBody.js +4 -6
  116. package/lib/ui-kit/InnerTable/InnerTableBody.js.map +1 -1
  117. package/lib/ui-kit/InnerTable/InnerTableButton.d.ts +2 -3
  118. package/lib/ui-kit/InnerTable/InnerTableButton.js.map +1 -1
  119. package/lib/ui-kit/InnerTable/InnerTableProps.d.ts +2 -4
  120. package/lib/ui-kit/InnerTable/renderInnerTableRow.js +1 -1
  121. package/lib/ui-kit/InnerTable/renderInnerTableRow.js.map +1 -1
  122. package/lib/ui-kit/ResponseTypeDialog/ResponseTypeDialog.d.ts +1 -1
  123. package/lib/utils/adjustBase.js +4 -1
  124. package/lib/utils/adjustBase.js.map +1 -1
  125. package/mobile/bundle/bundle.umd.js +51 -124
  126. package/mobile/bundle/bundle.umd.min.js +1 -1
  127. package/mobile/bundle/components/TariffsTable/TableCarouselContainer.d.ts +0 -2
  128. package/mobile/bundle/components/TariffsTable/TariffsTable.d.ts +1 -1
  129. package/mobile/bundle/components/TariffsTable/TariffsTableCell.d.ts +10 -8
  130. package/mobile/bundle/components/TariffsTable/TariffsTableContent.d.ts +2 -68
  131. package/mobile/bundle/components/TariffsTable/TariffsTableRow.d.ts +0 -2
  132. package/mobile/bundle/components/TariffsTable/TariffsTableRowContainer.d.ts +2 -1
  133. package/mobile/bundle/components/TariffsTable/TariffsTableWrapper.d.ts +1 -6
  134. package/mobile/bundle/components/TariffsTable/renderCell.d.ts +2 -0
  135. package/mobile/bundle/components/TariffsTable/renderHeader.d.ts +2 -0
  136. package/mobile/bundle/model/onClick.d.ts +3 -0
  137. package/mobile/bundle/model/onClose.d.ts +3 -0
  138. package/mobile/bundle/ui-kit/InnerTable/InnerTableButton.d.ts +2 -3
  139. package/mobile/bundle/ui-kit/InnerTable/InnerTableProps.d.ts +2 -4
  140. package/mobile/bundle/ui-kit/ResponseTypeDialog/ResponseTypeDialog.d.ts +1 -1
  141. package/mobile/dist/components/TariffsTable/TableCarouselContainer.d.ts +0 -2
  142. package/mobile/dist/components/TariffsTable/TableCarouselContainer.js +1 -1
  143. package/mobile/dist/components/TariffsTable/TableCarouselContainer.js.map +1 -1
  144. package/mobile/dist/components/TariffsTable/TariffsTable.d.ts +1 -1
  145. package/mobile/dist/components/TariffsTable/TariffsTable.js +4 -11
  146. package/mobile/dist/components/TariffsTable/TariffsTable.js.map +1 -1
  147. package/mobile/dist/components/TariffsTable/TariffsTableCell.d.ts +10 -8
  148. package/mobile/dist/components/TariffsTable/TariffsTableCell.js +14 -4
  149. package/mobile/dist/components/TariffsTable/TariffsTableCell.js.map +1 -1
  150. package/mobile/dist/components/TariffsTable/TariffsTableContent.d.ts +2 -68
  151. package/mobile/dist/components/TariffsTable/TariffsTableRow.d.ts +0 -2
  152. package/mobile/dist/components/TariffsTable/TariffsTableRow.js +6 -10
  153. package/mobile/dist/components/TariffsTable/TariffsTableRow.js.map +1 -1
  154. package/mobile/dist/components/TariffsTable/TariffsTableRowContainer.d.ts +2 -1
  155. package/mobile/dist/components/TariffsTable/TariffsTableRowContainer.js +3 -3
  156. package/mobile/dist/components/TariffsTable/TariffsTableRowContainer.js.map +1 -1
  157. package/mobile/dist/components/TariffsTable/TariffsTableWrapper.d.ts +1 -6
  158. package/mobile/dist/components/TariffsTable/TariffsTableWrapper.js +1 -9
  159. package/mobile/dist/components/TariffsTable/TariffsTableWrapper.js.map +1 -1
  160. package/mobile/dist/components/TariffsTable/dataFixture.js +1 -14
  161. package/mobile/dist/components/TariffsTable/dataFixture.js.map +1 -1
  162. package/mobile/dist/components/TariffsTable/renderCell.d.ts +2 -0
  163. package/mobile/dist/components/TariffsTable/renderCell.js +15 -0
  164. package/mobile/dist/components/TariffsTable/renderCell.js.map +1 -0
  165. package/mobile/dist/components/TariffsTable/renderHeader.d.ts +2 -0
  166. package/mobile/dist/components/TariffsTable/renderHeader.js +10 -0
  167. package/mobile/dist/components/TariffsTable/renderHeader.js.map +1 -0
  168. package/mobile/dist/components/TariffsTable/renderInnerTableCell.d.ts +0 -0
  169. package/mobile/dist/components/TariffsTable/renderInnerTableCell.js +1 -0
  170. package/mobile/dist/components/TariffsTable/renderInnerTableCell.js.map +1 -0
  171. package/mobile/dist/hooks/useLink.js +2 -1
  172. package/mobile/dist/hooks/useLink.js.map +1 -1
  173. package/mobile/dist/model/onClick.d.ts +3 -0
  174. package/mobile/dist/model/onClick.js +2 -0
  175. package/mobile/dist/model/onClick.js.map +1 -0
  176. package/mobile/dist/model/onClose.d.ts +3 -0
  177. package/mobile/dist/model/onClose.js +2 -0
  178. package/mobile/dist/model/onClose.js.map +1 -0
  179. package/mobile/dist/retail/components/DraftDialog/DraftActionButton.js +1 -1
  180. package/mobile/dist/retail/components/DraftDialog/DraftActionButton.js.map +1 -1
  181. package/mobile/dist/ui-kit/InnerTable/InnerTable.js +2 -3
  182. package/mobile/dist/ui-kit/InnerTable/InnerTable.js.map +1 -1
  183. package/mobile/dist/ui-kit/InnerTable/InnerTableBody.js +4 -6
  184. package/mobile/dist/ui-kit/InnerTable/InnerTableBody.js.map +1 -1
  185. package/mobile/dist/ui-kit/InnerTable/InnerTableButton.d.ts +2 -3
  186. package/mobile/dist/ui-kit/InnerTable/InnerTableButton.js.map +1 -1
  187. package/mobile/dist/ui-kit/InnerTable/InnerTableProps.d.ts +2 -4
  188. package/mobile/dist/ui-kit/InnerTable/renderInnerTableRow.js +1 -1
  189. package/mobile/dist/ui-kit/InnerTable/renderInnerTableRow.js.map +1 -1
  190. package/mobile/dist/ui-kit/ResponseTypeDialog/ResponseTypeDialog.d.ts +1 -1
  191. package/mobile/dist/utils/adjustBase.js +4 -1
  192. package/mobile/dist/utils/adjustBase.js.map +1 -1
  193. package/mobile/lib/common.css +1 -1
  194. package/mobile/lib/components/TariffsTable/TableCarouselContainer.d.ts +0 -2
  195. package/mobile/lib/components/TariffsTable/TableCarouselContainer.js +1 -1
  196. package/mobile/lib/components/TariffsTable/TableCarouselContainer.js.map +1 -1
  197. package/mobile/lib/components/TariffsTable/TariffsTable.d.ts +1 -1
  198. package/mobile/lib/components/TariffsTable/TariffsTable.js +4 -11
  199. package/mobile/lib/components/TariffsTable/TariffsTable.js.map +1 -1
  200. package/mobile/lib/components/TariffsTable/TariffsTableCell.d.ts +10 -8
  201. package/mobile/lib/components/TariffsTable/TariffsTableCell.js +14 -4
  202. package/mobile/lib/components/TariffsTable/TariffsTableCell.js.map +1 -1
  203. package/mobile/lib/components/TariffsTable/TariffsTableContent.d.ts +2 -68
  204. package/mobile/lib/components/TariffsTable/TariffsTableRow.d.ts +0 -2
  205. package/mobile/lib/components/TariffsTable/TariffsTableRow.js +6 -10
  206. package/mobile/lib/components/TariffsTable/TariffsTableRow.js.map +1 -1
  207. package/mobile/lib/components/TariffsTable/TariffsTableRowContainer.d.ts +2 -1
  208. package/mobile/lib/components/TariffsTable/TariffsTableRowContainer.js +2 -2
  209. package/mobile/lib/components/TariffsTable/TariffsTableRowContainer.js.map +1 -1
  210. package/mobile/lib/components/TariffsTable/TariffsTableWrapper.d.ts +1 -6
  211. package/mobile/lib/components/TariffsTable/TariffsTableWrapper.js +2 -10
  212. package/mobile/lib/components/TariffsTable/TariffsTableWrapper.js.map +1 -1
  213. package/mobile/lib/components/TariffsTable/dataFixture.js +1 -14
  214. package/mobile/lib/components/TariffsTable/dataFixture.js.map +1 -1
  215. package/mobile/lib/components/TariffsTable/renderCell.d.ts +2 -0
  216. package/mobile/lib/components/TariffsTable/renderCell.js +12 -0
  217. package/mobile/lib/components/TariffsTable/renderCell.js.map +1 -0
  218. package/mobile/lib/components/TariffsTable/renderHeader.d.ts +2 -0
  219. package/mobile/lib/components/TariffsTable/renderHeader.js +7 -0
  220. package/mobile/lib/components/TariffsTable/renderHeader.js.map +1 -0
  221. package/mobile/lib/components/TariffsTable/renderInnerTableCell.d.ts +0 -0
  222. package/mobile/lib/components/TariffsTable/renderInnerTableCell.js +1 -0
  223. package/mobile/lib/components/TariffsTable/renderInnerTableCell.js.map +1 -0
  224. package/mobile/lib/hooks/useLink.js +2 -1
  225. package/mobile/lib/hooks/useLink.js.map +1 -1
  226. package/mobile/lib/model/onClick.d.ts +3 -0
  227. package/mobile/lib/model/onClick.js +2 -0
  228. package/mobile/lib/model/onClick.js.map +1 -0
  229. package/mobile/lib/model/onClose.d.ts +3 -0
  230. package/mobile/lib/model/onClose.js +2 -0
  231. package/mobile/lib/model/onClose.js.map +1 -0
  232. package/mobile/lib/retail/components/DraftDialog/DraftActionButton.js +1 -1
  233. package/mobile/lib/retail/components/DraftDialog/DraftActionButton.js.map +1 -1
  234. package/mobile/lib/ui-kit/InnerTable/InnerTable.js +2 -3
  235. package/mobile/lib/ui-kit/InnerTable/InnerTable.js.map +1 -1
  236. package/mobile/lib/ui-kit/InnerTable/InnerTableBody.js +4 -6
  237. package/mobile/lib/ui-kit/InnerTable/InnerTableBody.js.map +1 -1
  238. package/mobile/lib/ui-kit/InnerTable/InnerTableButton.d.ts +2 -3
  239. package/mobile/lib/ui-kit/InnerTable/InnerTableButton.js.map +1 -1
  240. package/mobile/lib/ui-kit/InnerTable/InnerTableProps.d.ts +2 -4
  241. package/mobile/lib/ui-kit/InnerTable/renderInnerTableRow.js +1 -1
  242. package/mobile/lib/ui-kit/InnerTable/renderInnerTableRow.js.map +1 -1
  243. package/mobile/lib/ui-kit/ResponseTypeDialog/ResponseTypeDialog.d.ts +1 -1
  244. package/mobile/lib/utils/adjustBase.js +4 -1
  245. package/mobile/lib/utils/adjustBase.js.map +1 -1
  246. package/mobile/src/components/TariffsTable/TableCarouselContainer.tsx +3 -10
  247. package/mobile/src/components/TariffsTable/TariffsTable.example.json +1 -34
  248. package/mobile/src/components/TariffsTable/TariffsTable.tsx +6 -13
  249. package/mobile/src/components/TariffsTable/TariffsTable.ui.json +0 -3
  250. package/mobile/src/components/TariffsTable/TariffsTableCell.tsx +37 -35
  251. package/mobile/src/components/TariffsTable/TariffsTableContent.ts +7 -84
  252. package/mobile/src/components/TariffsTable/TariffsTableRow.tsx +9 -49
  253. package/mobile/src/components/TariffsTable/TariffsTableRowContainer.tsx +7 -13
  254. package/mobile/src/components/TariffsTable/TariffsTableWrapper.tsx +5 -25
  255. package/mobile/src/components/TariffsTable/dataFixture.tsx +9 -22
  256. package/mobile/src/components/TariffsTable/renderCell.tsx +42 -0
  257. package/mobile/src/components/TariffsTable/renderHeader.tsx +19 -0
  258. package/mobile/src/components/TariffsTable/renderInnerTableCell.tsx +0 -0
  259. package/mobile/src/hooks/useLink.ts +3 -1
  260. package/mobile/src/model/onClick.ts +3 -0
  261. package/mobile/src/model/onClose.ts +3 -0
  262. package/mobile/src/retail/components/DraftDialog/DraftActionButton.tsx +5 -3
  263. package/mobile/src/ui-kit/InnerTable/InnerTable.tsx +2 -6
  264. package/mobile/src/ui-kit/InnerTable/InnerTableBody.tsx +19 -21
  265. package/mobile/src/ui-kit/InnerTable/InnerTableButton.tsx +2 -4
  266. package/mobile/src/ui-kit/InnerTable/InnerTableProps.ts +2 -4
  267. package/mobile/src/ui-kit/InnerTable/renderInnerTableRow.tsx +1 -1
  268. package/mobile/src/ui-kit/ResponseTypeDialog/ResponseTypeDialog.tsx +1 -1
  269. package/mobile/src/utils/adjustBase.ts +6 -1
  270. package/package.json +1 -1
  271. package/src/components/TariffsTable/TableCarouselContainer.tsx +3 -10
  272. package/src/components/TariffsTable/TariffsTable.example.json +1 -34
  273. package/src/components/TariffsTable/TariffsTable.fixture.mobile.tsx +28 -2
  274. package/src/components/TariffsTable/TariffsTable.tsx +6 -13
  275. package/src/components/TariffsTable/TariffsTable.ui.json +0 -3
  276. package/src/components/TariffsTable/TariffsTableCell.tsx +37 -35
  277. package/src/components/TariffsTable/TariffsTableContent.ts +7 -84
  278. package/src/components/TariffsTable/TariffsTableRow.tsx +9 -49
  279. package/src/components/TariffsTable/TariffsTableRowContainer.tsx +7 -13
  280. package/src/components/TariffsTable/TariffsTableWrapper.tsx +5 -25
  281. package/src/components/TariffsTable/dataFixture.tsx +9 -22
  282. package/src/components/TariffsTable/renderCell.tsx +42 -0
  283. package/src/components/TariffsTable/renderHeader.tsx +19 -0
  284. package/src/components/TariffsTable/renderInnerTableCell.tsx +0 -0
  285. package/src/hooks/useLink.ts +3 -1
  286. package/src/model/onClick.ts +3 -0
  287. package/src/model/onClose.ts +3 -0
  288. package/src/retail/components/DraftDialog/DraftActionButton.tsx +5 -3
  289. package/src/ui-kit/InnerTable/InnerTable.fixture.mobile.tsx +1 -4
  290. package/src/ui-kit/InnerTable/InnerTable.fixture.tsx +1 -4
  291. package/src/ui-kit/InnerTable/InnerTable.tsx +2 -6
  292. package/src/ui-kit/InnerTable/InnerTableBody.tsx +19 -21
  293. package/src/ui-kit/InnerTable/InnerTableButton.tsx +2 -4
  294. package/src/ui-kit/InnerTable/InnerTableProps.ts +2 -4
  295. package/src/ui-kit/InnerTable/renderInnerTableRow.tsx +1 -1
  296. package/src/ui-kit/ResponseTypeDialog/ResponseTypeDialog.tsx +1 -1
  297. package/src/utils/adjustBase.ts +6 -1
  298. package/bundle/components/TariffsTable/EmbeddableCellData.d.ts +0 -20
  299. package/bundle/components/TariffsTable/TableTileHeader.d.ts +0 -2
  300. package/bundle/components/TariffsTable/TariffsTableHorizontal.d.ts +0 -2
  301. package/bundle/components/TariffsTable/TariffsTableRenderCell.d.ts +0 -12
  302. package/bundle/components/TariffsTable/TariffsTableTileCell.d.ts +0 -6
  303. package/bundle/components/TariffsTable/TariffsTableVertical.d.ts +0 -2
  304. package/bundle/components/TariffsTable/constants.d.ts +0 -4
  305. package/dist/components/TariffsTable/EmbeddableCellData.d.ts +0 -20
  306. package/dist/components/TariffsTable/EmbeddableCellData.js +0 -25
  307. package/dist/components/TariffsTable/EmbeddableCellData.js.map +0 -1
  308. package/dist/components/TariffsTable/TableTileHeader.d.ts +0 -2
  309. package/dist/components/TariffsTable/TableTileHeader.js +0 -8
  310. package/dist/components/TariffsTable/TableTileHeader.js.map +0 -1
  311. package/dist/components/TariffsTable/TariffsTableHorizontal.d.ts +0 -2
  312. package/dist/components/TariffsTable/TariffsTableHorizontal.js +0 -8
  313. package/dist/components/TariffsTable/TariffsTableHorizontal.js.map +0 -1
  314. package/dist/components/TariffsTable/TariffsTableRenderCell.d.ts +0 -12
  315. package/dist/components/TariffsTable/TariffsTableRenderCell.js +0 -41
  316. package/dist/components/TariffsTable/TariffsTableRenderCell.js.map +0 -1
  317. package/dist/components/TariffsTable/TariffsTableTileCell.d.ts +0 -6
  318. package/dist/components/TariffsTable/TariffsTableTileCell.js +0 -17
  319. package/dist/components/TariffsTable/TariffsTableTileCell.js.map +0 -1
  320. package/dist/components/TariffsTable/TariffsTableVertical.d.ts +0 -2
  321. package/dist/components/TariffsTable/TariffsTableVertical.js +0 -7
  322. package/dist/components/TariffsTable/TariffsTableVertical.js.map +0 -1
  323. package/dist/components/TariffsTable/constants.d.ts +0 -4
  324. package/dist/components/TariffsTable/constants.js +0 -7
  325. package/dist/components/TariffsTable/constants.js.map +0 -1
  326. package/lib/components/TariffsTable/EmbeddableCellData.d.ts +0 -20
  327. package/lib/components/TariffsTable/EmbeddableCellData.js +0 -23
  328. package/lib/components/TariffsTable/EmbeddableCellData.js.map +0 -1
  329. package/lib/components/TariffsTable/TableTileHeader.d.ts +0 -2
  330. package/lib/components/TariffsTable/TableTileHeader.js +0 -6
  331. package/lib/components/TariffsTable/TableTileHeader.js.map +0 -1
  332. package/lib/components/TariffsTable/TariffsTableHorizontal.d.ts +0 -2
  333. package/lib/components/TariffsTable/TariffsTableHorizontal.js +0 -6
  334. package/lib/components/TariffsTable/TariffsTableHorizontal.js.map +0 -1
  335. package/lib/components/TariffsTable/TariffsTableRenderCell.d.ts +0 -12
  336. package/lib/components/TariffsTable/TariffsTableRenderCell.js +0 -39
  337. package/lib/components/TariffsTable/TariffsTableRenderCell.js.map +0 -1
  338. package/lib/components/TariffsTable/TariffsTableTileCell.d.ts +0 -6
  339. package/lib/components/TariffsTable/TariffsTableTileCell.js +0 -15
  340. package/lib/components/TariffsTable/TariffsTableTileCell.js.map +0 -1
  341. package/lib/components/TariffsTable/TariffsTableVertical.d.ts +0 -2
  342. package/lib/components/TariffsTable/TariffsTableVertical.js +0 -5
  343. package/lib/components/TariffsTable/TariffsTableVertical.js.map +0 -1
  344. package/lib/components/TariffsTable/constants.d.ts +0 -4
  345. package/lib/components/TariffsTable/constants.js +0 -5
  346. package/lib/components/TariffsTable/constants.js.map +0 -1
  347. package/mobile/bundle/components/TariffsTable/EmbeddableCellData.d.ts +0 -20
  348. package/mobile/bundle/components/TariffsTable/TableTileHeader.d.ts +0 -2
  349. package/mobile/bundle/components/TariffsTable/TariffsTableHorizontal.d.ts +0 -2
  350. package/mobile/bundle/components/TariffsTable/TariffsTableRenderCell.d.ts +0 -12
  351. package/mobile/bundle/components/TariffsTable/TariffsTableTileCell.d.ts +0 -6
  352. package/mobile/bundle/components/TariffsTable/TariffsTableVertical.d.ts +0 -2
  353. package/mobile/bundle/components/TariffsTable/constants.d.ts +0 -4
  354. package/mobile/dist/components/TariffsTable/EmbeddableCellData.d.ts +0 -20
  355. package/mobile/dist/components/TariffsTable/EmbeddableCellData.js +0 -25
  356. package/mobile/dist/components/TariffsTable/EmbeddableCellData.js.map +0 -1
  357. package/mobile/dist/components/TariffsTable/TableTileHeader.d.ts +0 -2
  358. package/mobile/dist/components/TariffsTable/TableTileHeader.js +0 -8
  359. package/mobile/dist/components/TariffsTable/TableTileHeader.js.map +0 -1
  360. package/mobile/dist/components/TariffsTable/TariffsTableHorizontal.d.ts +0 -2
  361. package/mobile/dist/components/TariffsTable/TariffsTableHorizontal.js +0 -8
  362. package/mobile/dist/components/TariffsTable/TariffsTableHorizontal.js.map +0 -1
  363. package/mobile/dist/components/TariffsTable/TariffsTableRenderCell.d.ts +0 -12
  364. package/mobile/dist/components/TariffsTable/TariffsTableRenderCell.js +0 -41
  365. package/mobile/dist/components/TariffsTable/TariffsTableRenderCell.js.map +0 -1
  366. package/mobile/dist/components/TariffsTable/TariffsTableTileCell.d.ts +0 -6
  367. package/mobile/dist/components/TariffsTable/TariffsTableTileCell.js +0 -17
  368. package/mobile/dist/components/TariffsTable/TariffsTableTileCell.js.map +0 -1
  369. package/mobile/dist/components/TariffsTable/TariffsTableVertical.d.ts +0 -2
  370. package/mobile/dist/components/TariffsTable/TariffsTableVertical.js +0 -7
  371. package/mobile/dist/components/TariffsTable/TariffsTableVertical.js.map +0 -1
  372. package/mobile/dist/components/TariffsTable/constants.d.ts +0 -4
  373. package/mobile/dist/components/TariffsTable/constants.js +0 -7
  374. package/mobile/dist/components/TariffsTable/constants.js.map +0 -1
  375. package/mobile/lib/components/TariffsTable/EmbeddableCellData.d.ts +0 -20
  376. package/mobile/lib/components/TariffsTable/EmbeddableCellData.js +0 -23
  377. package/mobile/lib/components/TariffsTable/EmbeddableCellData.js.map +0 -1
  378. package/mobile/lib/components/TariffsTable/TableTileHeader.d.ts +0 -2
  379. package/mobile/lib/components/TariffsTable/TableTileHeader.js +0 -6
  380. package/mobile/lib/components/TariffsTable/TableTileHeader.js.map +0 -1
  381. package/mobile/lib/components/TariffsTable/TariffsTableHorizontal.d.ts +0 -2
  382. package/mobile/lib/components/TariffsTable/TariffsTableHorizontal.js +0 -6
  383. package/mobile/lib/components/TariffsTable/TariffsTableHorizontal.js.map +0 -1
  384. package/mobile/lib/components/TariffsTable/TariffsTableRenderCell.d.ts +0 -12
  385. package/mobile/lib/components/TariffsTable/TariffsTableRenderCell.js +0 -39
  386. package/mobile/lib/components/TariffsTable/TariffsTableRenderCell.js.map +0 -1
  387. package/mobile/lib/components/TariffsTable/TariffsTableTileCell.d.ts +0 -6
  388. package/mobile/lib/components/TariffsTable/TariffsTableTileCell.js +0 -15
  389. package/mobile/lib/components/TariffsTable/TariffsTableTileCell.js.map +0 -1
  390. package/mobile/lib/components/TariffsTable/TariffsTableVertical.d.ts +0 -2
  391. package/mobile/lib/components/TariffsTable/TariffsTableVertical.js +0 -5
  392. package/mobile/lib/components/TariffsTable/TariffsTableVertical.js.map +0 -1
  393. package/mobile/lib/components/TariffsTable/constants.d.ts +0 -4
  394. package/mobile/lib/components/TariffsTable/constants.js +0 -5
  395. package/mobile/lib/components/TariffsTable/constants.js.map +0 -1
  396. package/mobile/src/components/TariffsTable/EmbeddableCellData.tsx +0 -79
  397. package/mobile/src/components/TariffsTable/TableTileHeader.tsx +0 -15
  398. package/mobile/src/components/TariffsTable/TariffsTableHorizontal.tsx +0 -14
  399. package/mobile/src/components/TariffsTable/TariffsTableRenderCell.tsx +0 -83
  400. package/mobile/src/components/TariffsTable/TariffsTableTileCell.tsx +0 -33
  401. package/mobile/src/components/TariffsTable/TariffsTableVertical.tsx +0 -13
  402. package/mobile/src/components/TariffsTable/constants.ts +0 -4
  403. package/src/components/TariffsTable/EmbeddableCellData.tsx +0 -79
  404. package/src/components/TariffsTable/TableTileHeader.tsx +0 -15
  405. package/src/components/TariffsTable/TariffsTableHorizontal.tsx +0 -14
  406. package/src/components/TariffsTable/TariffsTableRenderCell.tsx +0 -83
  407. package/src/components/TariffsTable/TariffsTableTileCell.tsx +0 -33
  408. package/src/components/TariffsTable/TariffsTableVertical.tsx +0 -13
  409. package/src/components/TariffsTable/constants.ts +0 -4
@@ -1,9 +1,8 @@
1
1
  /* eslint-disable max-lines */
2
2
  import { type Picture } from '../../model/Picture';
3
+ import type { TariffsTableInnerContent } from '../../ui-kit/InnerTable/InnerTableProps';
3
4
  import {
4
- type InnerTableBlockDef,
5
- type LabelDescriptionCellDef,
6
- type RichTextDef,
5
+ type CellDef,
7
6
  type TariffsTableColumn,
8
7
  type TariffsTableContent,
9
8
  type TariffsTableRowHeader,
@@ -23,30 +22,25 @@ const image: Picture = {
23
22
  title: 'Платёжные системы',
24
23
  };
25
24
 
26
- const LABEL_BLOCK: LabelDescriptionCellDef = {
27
- tableCellType: 'LabelDescription',
25
+ const LABEL_BLOCK: CellDef = {
28
26
  label: 'Заголовок без описания',
29
27
  };
30
28
 
31
- const LABEL_DESCRIPTION_BLOCK: LabelDescriptionCellDef = {
29
+ const LABEL_DESCRIPTION_BLOCK: CellDef = {
32
30
  label: 'Ячейка 1-2',
33
- tableCellType: 'LabelDescription',
31
+
34
32
  description: 'Описание',
35
33
  };
36
34
 
37
- const TABLE_BLOCK: InnerTableBlockDef = {
38
- tableCellType: 'Table',
35
+ const TABLE_BLOCK: TariffsTableInnerContent = {
39
36
  tableSource: { $ref: '/wcms-resources/tariffs-inner-table-data.json' },
40
- pdfUrl: '#',
41
37
  };
42
38
 
43
- const DESCRIPTION_BLOCK: LabelDescriptionCellDef = {
44
- tableCellType: 'LabelDescription',
39
+ const DESCRIPTION_BLOCK: CellDef = {
45
40
  description: 'Описание без заголовка',
46
41
  };
47
42
 
48
- const RICHTEXT_BLOCK: RichTextDef = {
49
- tableCellType: 'RichText',
43
+ const RICHTEXT_BLOCK: CellDef = {
50
44
  __html: `
51
45
  <ul>
52
46
  <li>Элемент списка 1</li>
@@ -77,29 +71,24 @@ export const columns: TariffsTableColumn[] = [
77
71
  {
78
72
  label: 'Бесплатно',
79
73
  description: 'В банкоматах и кассах Россельхозбанка и банков-партнеров',
80
- tableCellType: 'LabelDescription',
81
74
  },
82
75
  {
83
76
  label: 'Бесплатно',
84
77
  description: 'В сторонних банкоматах - 1 раз в месяц, далее 1% минимум 150 руб',
85
- tableCellType: 'LabelDescription',
86
78
  },
87
79
  ],
88
80
  [LABEL_BLOCK],
89
81
  [
90
82
  {
91
83
  label: 'Платёжные системы картинкой',
92
- tableCellType: 'LabelDescription',
93
84
  },
94
85
  {
95
86
  image: image,
96
- tableCellType: 'Img',
97
87
  },
98
88
  ],
99
89
  [
100
- { label: 'Кнопки-иконки', tableCellType: 'LabelDescription' },
90
+ { label: 'Кнопки-иконки' },
101
91
  {
102
- tableCellType: 'Buttons',
103
92
  buttons: [
104
93
  {
105
94
  icon: { icon: 'AppleIcon' },
@@ -121,7 +110,6 @@ export const columns: TariffsTableColumn[] = [
121
110
  [
122
111
  {
123
112
  label: 'Бесплатно',
124
- tableCellType: 'LabelDescription',
125
113
  },
126
114
  ],
127
115
  [
@@ -135,7 +123,6 @@ export const columns: TariffsTableColumn[] = [
135
123
  },
136
124
  alt: 'Деньги',
137
125
  },
138
- tableCellType: 'Img',
139
126
  },
140
127
  ],
141
128
  ],
@@ -0,0 +1,42 @@
1
+ import { Img } from '../../ui-kit/Img/Img';
2
+ import { renderButtonsSection } from '../../ui-kit/LinkButton/renderButtonsSection';
3
+ import { RichText } from '../../ui-kit/RichText/RichText';
4
+ import { type RichTextProps } from '../../ui-kit/RichText/RichTextProps';
5
+ import { Text } from '../../ui-kit/Text/Text';
6
+ import type { CellDef } from './TariffsTableContent';
7
+
8
+ export const renderCell = (
9
+ { label, description, __html, isDotted, buttons, image }: CellDef,
10
+ i: number,
11
+ ) => (
12
+ <div className="grid gap-xs" key={String(i)}>
13
+ {renderLabel(label)}
14
+ {renderDescription(description)}
15
+ {renderRich({ __html, isDotted })}
16
+ {renderButtonsSection(buttons, {
17
+ buttonClassName: 'basis-0',
18
+ })}
19
+ {image?.src ? <Img image={image} /> : null}
20
+ </div>
21
+ );
22
+
23
+ const renderLabel = (label?: string) =>
24
+ label ? (
25
+ <div>
26
+ <Text size="text-h6">{label}</Text>
27
+ </div>
28
+ ) : null;
29
+
30
+ const renderDescription = (description?: string) =>
31
+ description ? (
32
+ <div className="text-l font-light">
33
+ <Text color="text-secondary-text">{description}</Text>
34
+ </div>
35
+ ) : null;
36
+
37
+ const renderRich = ({ __html, isDotted }: RichTextProps) =>
38
+ __html ? (
39
+ <div className="flex flex-col justify-between items-start text-h6">
40
+ <RichText __html={__html} isDotted={isDotted} itemSize="list-m" />
41
+ </div>
42
+ ) : null;
@@ -0,0 +1,19 @@
1
+ import { Img } from '../../ui-kit/Img/Img';
2
+ import { Text } from '../../ui-kit/Text/Text';
3
+ import { style } from '../../utils/style';
4
+ import type { TariffsTableRowHeader } from './TariffsTableContent';
5
+
6
+ const FIRST_CELL_STYLES = 'w-80 flex-shrink-0 sticky left-0 bg-white';
7
+
8
+ export const renderHeader = ({ title, icon }: TariffsTableRowHeader) => (
9
+ <div className={style('flex gap-m items-center', FIRST_CELL_STYLES)} role="cell">
10
+ {icon ? (
11
+ <Img className="hidden lg:block max-w-6 shrink-0" image={icon} width="24" height="24" />
12
+ ) : null}
13
+ {title ? (
14
+ <Text size="text-m" font="font-light" color="text-primary-text">
15
+ {title}
16
+ </Text>
17
+ ) : null}
18
+ </div>
19
+ );
@@ -9,6 +9,8 @@ import { adjustHref } from '../utils/adjustHref';
9
9
  import { getBasePath } from '../utils/getBasePath';
10
10
  import { hasPrefix, isLocalURL } from '../utils/url';
11
11
 
12
+ const RESERVED_PREFIX = ['/api'];
13
+
12
14
  export interface Clickable {
13
15
  onClick(ev?: PreventableEvent): void;
14
16
  }
@@ -40,5 +42,5 @@ export function useLink() {
40
42
 
41
43
  const isClientRouting = (href: string | undefined, target?: Target, basePath?: string) =>
42
44
  isLocalURL(href, target) &&
43
- !env.SUB_PORTALS?.split(',')?.some(hasPrefix(href)) &&
45
+ ![...RESERVED_PREFIX, ...(env.SUB_PORTALS?.split(',') ?? [])].some(hasPrefix(href)) &&
44
46
  hasPrefix(href)(basePath || '/');
@@ -0,0 +1,3 @@
1
+ export interface OnClickProps {
2
+ onClick?: () => void;
3
+ }
@@ -0,0 +1,3 @@
1
+ export interface OnCloseProps {
2
+ onClose?: () => void;
3
+ }
@@ -21,9 +21,11 @@ export const DraftActionButton = JSX<DraftActionButtonProps>(
21
21
  >
22
22
  <Img image={{ icon, iconVersion: 'normal' }} width="78" height="78" />
23
23
  <div className="flex flex-col items-start gap-xs md:w-72 md:mr-lg">
24
- <Text font="font-medium" size="text-s">
25
- {title}
26
- </Text>
24
+ {title ? (
25
+ <Text font="font-medium" size="text-s">
26
+ {title}
27
+ </Text>
28
+ ) : null}
27
29
  {description ? (
28
30
  <Text color="text-secondary-text" size="text-xs">
29
31
  {description}
@@ -5,7 +5,6 @@ import { UniBlock } from '../../UniBlock/UniBlock';
5
5
  import { type UniBlockProps } from '../../UniBlock/UniBlockProps';
6
6
  import { Text } from '../Text/Text';
7
7
  import { InnerTableBody } from './InnerTableBody';
8
- import { TableInnerButton } from './InnerTableButton';
9
8
  import { InnerTableHeader } from './InnerTableHeader';
10
9
  import { type TableFetchData, type TariffsTableInnerContent } from './InnerTableProps';
11
10
 
@@ -15,7 +14,7 @@ export interface InnerTableProps extends TariffsTableInnerContent, UniBlockProps
15
14
 
16
15
  const EMPTY_DATA = 'Данных нет';
17
16
 
18
- export const InnerTable = UniBlock<InnerTableProps>(({ tableSource, pdfUrl, onClick }) => {
17
+ export const InnerTable = UniBlock<InnerTableProps>(({ tableSource }) => {
19
18
  const tableData = tableSource?.tableData;
20
19
  const [activeTabIndex, setActiveTabIndex] = useState(0);
21
20
  const handleActiveTabIndex = useCallback((_: number) => setActiveTabIndex(_), []);
@@ -28,15 +27,12 @@ export const InnerTable = UniBlock<InnerTableProps>(({ tableSource, pdfUrl, onCl
28
27
  currencies={currencies}
29
28
  activeTabIndex={activeTabIndex}
30
29
  setActiveTabIndex={handleActiveTabIndex}
31
- linkToPDF={pdfUrl} //TODO: need link to service
32
30
  />
33
31
  <InnerTableBody activeTabIndex={activeTabIndex} items={items} />
34
- <TableInnerButton className="mt-xl" onClick={onClick} isOpen />
35
32
  </div>
36
33
  ) : (
37
- <div className="my-lg space-y-m text-center">
34
+ <div className="space-y-m text-center">
38
35
  <Text size="text-h6">{EMPTY_DATA}</Text>
39
- <TableInnerButton onClick={onClick} isOpen />
40
36
  </div>
41
37
  );
42
38
  });
@@ -8,27 +8,25 @@ export interface InnerTableBodyProps {
8
8
  items: DataItem[];
9
9
  }
10
10
 
11
- export const InnerTableBody = JSX<InnerTableBodyProps>(({ activeTabIndex, items }) => {
12
- return (
13
- <div>
14
- {items.map((_, tableIdx) => {
15
- const key = `activeTabIdx:${activeTabIndex}-tableIdx:${tableIdx}`;
11
+ export const InnerTableBody = JSX<InnerTableBodyProps>(({ activeTabIndex, items }) => (
12
+ <div>
13
+ {items.map((_, tableIdx) => {
14
+ const key = `activeTabIdx:${activeTabIndex}-tableIdx:${tableIdx}`;
16
15
 
17
- return (
18
- <div key={key} className="w-full @container">
19
- <div className="flex py-m sm:px-m bg-white @4xl:bg-gray relative">
20
- <Text size="text-xl" align="text-left">
21
- {_.title}
22
- </Text>
23
- </div>
24
- <div className="w-full sm:pl-xs overflow-hidden transition-height duration-500 ease-in-out">
25
- <div className="relative">
26
- <InnerTableBodyItem rows={_.rowsData} />
27
- </div>
16
+ return (
17
+ <div key={key} className="w-full @container">
18
+ <div className="flex py-m px-m bg-white @4xl:bg-gray relative">
19
+ <Text size="text-xl" align="text-left">
20
+ {_.title}
21
+ </Text>
22
+ </div>
23
+ <div className="w-full sm:pl-xs overflow-hidden transition-height duration-500 ease-in-out">
24
+ <div className="relative">
25
+ <InnerTableBodyItem rows={_.rowsData} />
28
26
  </div>
29
27
  </div>
30
- );
31
- })}
32
- </div>
33
- );
34
- });
28
+ </div>
29
+ );
30
+ })}
31
+ </div>
32
+ ));
@@ -1,13 +1,11 @@
1
1
  import { JSX } from '@redneckz/uni-jsx';
2
- import { type TariffsTableCellIndexProps } from '../../components/TariffsTable/TariffsTableContent';
3
2
  import { type ComponentType } from '../../model/ComponentType';
4
- import type { OnClickProps } from '../../model/OnClickProps';
3
+ import { type OnClickProps } from '../../model/onClick';
5
4
  import { DefaultFoldButton } from '../Foldable/DefaultFoldButton';
6
5
  import { type TariffsTableInnerContent } from './InnerTableProps';
7
6
 
8
7
  export interface InnerTableButtonProps
9
- extends Partial<TariffsTableCellIndexProps>,
10
- TariffsTableInnerContent,
8
+ extends TariffsTableInnerContent,
11
9
  ComponentType,
12
10
  OnClickProps {
13
11
  isOpen?: boolean;
@@ -19,9 +19,7 @@ export type TableFetchData = {
19
19
  tableData?: TableData[];
20
20
  };
21
21
 
22
- export interface TariffsTableInnerContent {
22
+ export type TariffsTableInnerContent = {
23
23
  /** @title Справочник */
24
24
  tableSource?: JSONRefObject;
25
- /** @title Ссылка PDF-файл */
26
- pdfUrl?: string;
27
- }
25
+ };
@@ -17,7 +17,7 @@ export const renderInnerTableRow =
17
17
  return (
18
18
  <div key={String(rowIdx)} className="flex border-main-divider border-b border-solid h-full">
19
19
  {headerColumn?.data ? (
20
- <div className="whitespace-pre-wrap sm:whitespace-normal w-48 sm:w-56 sm:min-w-56 py-lg pr-lg sm:pr-0">
20
+ <div className="whitespace-pre-wrap sm:whitespace-normal w-48 min-w-48 sm:w-56 sm:min-w-56 py-lg pr-lg sm:pr-0">
21
21
  <Text size="text-xl" font="font-light">
22
22
  {headerColumn.data}
23
23
  </Text>
@@ -1,6 +1,6 @@
1
1
  import { JSX } from '@redneckz/uni-jsx';
2
2
  import { Headline } from '../../components/Headline/Headline';
3
- import type { OnCloseProps } from '../../model/OnCloseProps';
3
+ import { type OnCloseProps } from '../../model/onClose';
4
4
  import { Button } from '../Button/Button';
5
5
  import { Dialog } from '../DialogManager/Dialog';
6
6
  import { Img } from '../Img/Img';
@@ -1 +1,6 @@
1
- export const adjustBase = (href?: string, basePath = '') => href?.replace(basePath, '') || '/';
1
+ const FORWARD_SLASH = '/';
2
+
3
+ export const adjustBase = (href: string = FORWARD_SLASH, basePath: string = FORWARD_SLASH) =>
4
+ [href, basePath].some((_) => _ === FORWARD_SLASH)
5
+ ? href
6
+ : href.replace(basePath, '') || FORWARD_SLASH;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@redneckz/wildless-cms-uni-blocks",
3
- "version": "0.14.853",
3
+ "version": "0.14.855",
4
4
  "private": false,
5
5
  "license": "MIT",
6
6
  "author": "ЦК",
@@ -2,8 +2,6 @@ import { JSX } from '@redneckz/uni-jsx';
2
2
  import { type TableVersion } from '../../model/TableVersion';
3
3
 
4
4
  export interface TableCarouselContainerProps {
5
- activeIndex: number;
6
- columnWidth: number;
7
5
  version?: TableVersion;
8
6
  }
9
7
 
@@ -13,14 +11,9 @@ const carouselContainerClassesMap: Record<TableVersion, string> = {
13
11
  };
14
12
 
15
13
  export const TableCarouselContainer = JSX<TableCarouselContainerProps>(
16
- ({ children, activeIndex, columnWidth, version = 'comparison' }) => (
17
- <div className="flex flex-1 overflow-hidden">
18
- <div
19
- className={carouselContainerClassesMap[version]}
20
- style={{ transform: `translateX(-${activeIndex * columnWidth}px)` }}
21
- >
22
- {children}
23
- </div>
14
+ ({ children, version = 'comparison' }) => (
15
+ <div className="flex flex-1">
16
+ <div className={carouselContainerClassesMap[version]}>{children}</div>
24
17
  </div>
25
18
  ),
26
19
  );
@@ -29,67 +29,34 @@
29
29
  "data": [
30
30
  [
31
31
  {
32
- "tableCellType": "LabelDescription",
33
32
  "label": "Ячейка 1-1",
34
33
  "description": "Описание для ячейки 2-1"
35
34
  },
36
35
  {
37
- "tableCellType": "RichText",
38
36
  "isDotted": true,
39
- "listItemSize": "M",
40
37
  "__html": "<ul><li>Элемент списка 1</li><li>Элемент списка 2</li><li>Элемент списка 3</li></ul>"
41
38
  },
42
39
  {
43
40
  "label": "Ячейка 1-2",
44
- "tableCellType": "LabelDescription",
45
41
  "description": "Описание"
46
42
  },
47
43
  {
48
- "tableCellType": "RichText",
49
44
  "isDotted": false,
50
- "listItemSize": "M",
51
45
  "__html": "<ul><li>Элемент списка 1</li><li>Элемент списка 2</li><li>Элемент списка 3</li></ul>"
52
46
  }
53
47
  ],
54
48
  [
55
49
  {
56
- "tableCellType": "LabelDescription",
57
50
  "label": "Ячейка 2-1"
58
51
  },
59
52
  {
60
- "tableCellType": "RichText",
61
53
  "isDotted": true,
62
- "listItemSize": "M",
63
54
  "__html": "<ul><li>Элемент списка 1</li><li>Элемент списка 2</li><li>Элемент списка 3</li></ul>"
64
55
  }
65
56
  ],
66
57
  [
67
58
  {
68
- "label": "Ячейка 3-1",
69
- "tableCellType": "LabelDescription"
70
- },
71
- {
72
- "tableCellType": "Button",
73
- "buttons": [
74
- {
75
- "icon": {
76
- "icon": "AppleIcon"
77
- },
78
- "rounded": true,
79
- "version": "secondary",
80
- "href": "/",
81
- "target": "_blank"
82
- },
83
- {
84
- "icon": {
85
- "icon": "PlayMarketIcon"
86
- },
87
- "rounded": true,
88
- "version": "secondary",
89
- "href": "/",
90
- "target": "_blank"
91
- }
92
- ]
59
+ "label": "Ячейка 3-1"
93
60
  }
94
61
  ]
95
62
  ]
@@ -1,6 +1,8 @@
1
+ // eslint-disable max-len
1
2
  import '../../setup-fixture';
2
3
 
3
4
  import {
5
+ columns,
4
6
  columnsTable,
5
7
  TARIFFS_TABLE_FIXTURE_EXAMPLE,
6
8
  TARIFFS_TABLE_INNER_TABLE_FIXTURE_EXAMPLE,
@@ -8,9 +10,13 @@ import {
8
10
  import { TariffsTable } from './TariffsTable';
9
11
 
10
12
  export default {
11
- 'default (vertical)': (
13
+ default: (
12
14
  <div className="container grid grid-cols-12">
13
- <TariffsTable className="col-span-12" {...TARIFFS_TABLE_FIXTURE_EXAMPLE} />
15
+ <TariffsTable
16
+ className="col-span-12"
17
+ {...TARIFFS_TABLE_FIXTURE_EXAMPLE}
18
+ tariffsColumns={columns.slice(0, 1)}
19
+ />
14
20
  </div>
15
21
  ),
16
22
  '1 columns with inner table': (
@@ -22,4 +28,24 @@ export default {
22
28
  />
23
29
  </div>
24
30
  ),
31
+ '1 column': (
32
+ <div className="container grid grid-cols-12">
33
+ <TariffsTable
34
+ className="col-span-12"
35
+ {...TARIFFS_TABLE_FIXTURE_EXAMPLE}
36
+ tariffsColumns={Array(1).fill(columns).flat()}
37
+ hiddenRowsNum={2}
38
+ />
39
+ </div>
40
+ ),
41
+ '2 columns': (
42
+ <div className="container grid grid-cols-12">
43
+ <TariffsTable
44
+ className="col-span-12"
45
+ {...TARIFFS_TABLE_FIXTURE_EXAMPLE}
46
+ tariffsColumns={Array(2).fill(columns).flat()}
47
+ hiddenRowsNum={2}
48
+ />
49
+ </div>
50
+ ),
25
51
  };
@@ -1,21 +1,19 @@
1
- import { JSX } from '@redneckz/uni-jsx';
2
1
  import { useBool } from '@redneckz/uni-jsx/lib/hooks/useBool';
3
- import { useCarouselControls } from '../../hooks/useCarouselControls';
4
2
  import { BlockWrapper } from '../../ui-kit/BlockWrapper';
5
3
  import { DefaultFoldButton } from '../../ui-kit/Foldable/DefaultFoldButton';
6
4
  import { Foldable } from '../../ui-kit/Foldable/Foldable';
7
5
  import { FoldableSection } from '../../ui-kit/Foldable/FoldableSection';
6
+ import { UniBlock } from '../../UniBlock/UniBlock';
8
7
  import { type UniBlockProps } from '../../UniBlock/UniBlockProps';
9
8
  import { style } from '../../utils/style';
10
9
  import { Headline } from '../Headline/Headline';
11
- import { COLS_LENGTH_FOR_SCROLL } from './constants';
12
10
  import { type TariffsTableContent } from './TariffsTableContent';
13
11
  import { TariffsTableRow } from './TariffsTableRow';
14
12
  import { TariffsTableWrapper } from './TariffsTableWrapper';
15
13
 
16
14
  export interface TariffsTableProps extends TariffsTableContent, UniBlockProps {}
17
15
 
18
- export const TariffsTable = JSX<TariffsTableProps>(
16
+ export const TariffsTable = UniBlock<TariffsTableProps>(
19
17
  ({
20
18
  className = '',
21
19
  title,
@@ -30,13 +28,8 @@ export const TariffsTable = JSX<TariffsTableProps>(
30
28
  header,
31
29
  data: colData.map((col) => col?.[i] || []),
32
30
  }));
33
- const itemCount = colData.length;
34
- const [activeIndex, controls] = useCarouselControls({
35
- itemCount: itemCount,
36
- visibleItemCount: COLS_LENGTH_FOR_SCROLL,
37
- });
38
31
  const rows = (rowData || []).map((row, i) => (
39
- <TariffsTableRow key={String(i)} row={row} activeIndex={activeIndex} rowIdx={i} {...rest} />
32
+ <TariffsTableRow key={String(i)} row={row} {...rest} />
40
33
  ));
41
34
  const [visibleRows, hiddenRows] =
42
35
  hiddenRowsNum > 0 ? [rows.slice(0, -hiddenRowsNum), rows.slice(-hiddenRowsNum)] : [rows, []];
@@ -45,7 +38,7 @@ export const TariffsTable = JSX<TariffsTableProps>(
45
38
 
46
39
  return (
47
40
  <BlockWrapper
48
- className={style('relative space-y-6xl @4xl:space-y-xl', className)}
41
+ className={style('relative space-y-xl', className)}
49
42
  defaultPadding="p-6xl"
50
43
  {...rest}
51
44
  >
@@ -59,14 +52,14 @@ export const TariffsTable = JSX<TariffsTableProps>(
59
52
  <div className="space-y-m overflow-hidden">
60
53
  {hiddenRowsNum > 0 ? (
61
54
  <Foldable>
62
- <TariffsTableWrapper controls={controls}>
55
+ <TariffsTableWrapper>
63
56
  {visibleRows}
64
57
  <FoldableSection isUnfolded={isUnfolded}>{hiddenRows}</FoldableSection>
65
58
  </TariffsTableWrapper>
66
59
  <DefaultFoldButton className="text-h4" isUnfolded={isUnfolded} onClick={toggle} />
67
60
  </Foldable>
68
61
  ) : (
69
- <TariffsTableWrapper controls={controls}>{rows}</TariffsTableWrapper>
62
+ <TariffsTableWrapper>{rows}</TariffsTableWrapper>
70
63
  )}
71
64
  </div>
72
65
  </BlockWrapper>
@@ -5,9 +5,6 @@
5
5
  "data": {
6
6
  "items": {
7
7
  "items": {
8
- "tableCellType": {
9
- "ui:widget": "hidden"
10
- },
11
8
  "image": {
12
9
  "ui:field": "picture"
13
10
  },
@@ -1,48 +1,50 @@
1
1
  import { JSX } from '@redneckz/uni-jsx';
2
- import { type TariffsTableInnerContent } from '../../ui-kit/InnerTable/InnerTableProps';
2
+ import type { JSONRefObject } from '../../data/JSONRefObject';
3
+ import { type OnCloseProps } from '../../model/onClose';
4
+ import { TableInnerButton } from '../../ui-kit/InnerTable/InnerTableButton';
5
+ import {
6
+ type TableFetchData,
7
+ type TariffsTableInnerContent,
8
+ } from '../../ui-kit/InnerTable/InnerTableProps';
3
9
  import { type UniBlockProps } from '../../UniBlock/UniBlockProps';
10
+ import { renderCell } from './renderCell';
4
11
  import { type CellDef } from './TariffsTableContent';
5
- import { RenderCellInner } from './TariffsTableRenderCell';
6
12
 
7
13
  export interface TariffTableContentProps {
8
- openTableInnerIdx?: number;
9
- setOpenTableInnerIdx: (props?: number) => void;
10
- setTableInner: (props?: TariffsTableInnerContent) => void;
14
+ onSetTable: (props?: TariffsTableInnerContent) => void;
11
15
  tableInner?: TariffsTableInnerContent;
12
16
  }
13
17
 
14
- export interface TariffsTableCellProps extends TariffTableContentProps, UniBlockProps {
15
- rowIdx: number;
16
- cellIdx: number;
17
- cells: CellDef[];
18
+ type CellDefProps = CellDef & { tableSource?: JSONRefObject & TableFetchData };
19
+
20
+ export interface TariffsTableCellProps
21
+ extends TariffTableContentProps,
22
+ UniBlockProps,
23
+ OnCloseProps {
24
+ cells: CellDefProps[];
18
25
  }
19
26
 
20
- export const TariffsTableCell = JSX<TariffsTableCellProps>(
21
- ({
22
- cells,
23
- rowIdx,
24
- cellIdx,
25
- setTableInner,
26
- tableInner,
27
- openTableInnerIdx,
28
- setOpenTableInnerIdx,
29
- }) => (
30
- <div className="w-80 flex-grow flex flex-col gap-m @4xl:gap-lg" role="cell">
27
+ export const TariffsTableCell = JSX<TariffsTableCellProps>(({ cells, tableInner, onSetTable }) => {
28
+ return (
29
+ <div className="w-80 flex-grow flex flex-col gap-lg" role="cell">
31
30
  {cells?.length
32
- ? cells.map((_, i) => (
33
- <RenderCellInner
34
- key={String(i)}
35
- cell={_}
36
- fieldIdx={i}
37
- rowIdx={rowIdx}
38
- cellIdx={cellIdx}
39
- setTableInner={setTableInner}
40
- tableInner={tableInner}
41
- openTableInnerIdx={openTableInnerIdx}
42
- setOpenTableInnerIdx={setOpenTableInnerIdx}
43
- />
44
- ))
31
+ ? cells.map((_, i) => {
32
+ if (_?.tableSource?.tableData) {
33
+ return (
34
+ <TableInnerButton
35
+ key={String(i)}
36
+ className="w-fit"
37
+ isOpen={Boolean(tableInner)}
38
+ onClick={() => {
39
+ onSetTable(tableInner ? undefined : { tableSource: _.tableSource });
40
+ }}
41
+ />
42
+ );
43
+ }
44
+
45
+ return renderCell(_, i);
46
+ })
45
47
  : null}
46
48
  </div>
47
- ),
48
- );
49
+ );
50
+ });