ecomlab-components-next 0.1.159 → 0.1.162

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 (333) hide show
  1. package/dist/common/headers.js +2 -2
  2. package/dist/common/hooks/hooks.js +108 -0
  3. package/dist/common/hooks/useResetOnBaseURL.js +15 -0
  4. package/dist/common/img/icon-delete.svg +3 -0
  5. package/dist/common/img/icon-edit.svg +3 -0
  6. package/dist/common/img/noPhoto.png +0 -0
  7. package/dist/common/img/time_icon.svg +5 -0
  8. package/dist/common/img/view_icon.svg +5 -0
  9. package/dist/common/styles/svg_img.scss +290 -0
  10. package/dist/common/svg_img.js +238 -0
  11. package/dist/common/validationFunc.js +14 -0
  12. package/dist/components/ArticleComponent/Article.js +252 -0
  13. package/dist/components/ArticleComponent/Article.scss +289 -0
  14. package/dist/components/ArticleElements/ShortTileArticleBox/ShortTileArticleBox.stories.js +1 -1
  15. package/dist/components/ArticleMain/ArticleMain.js +451 -0
  16. package/dist/components/ArticleMain/ArticleMain.scss +220 -0
  17. package/dist/components/ArticleMain/img/table_icon.svg +3 -0
  18. package/dist/components/ArticleMain/img/tile-long_icon.svg +3 -0
  19. package/dist/components/ArticleMain/img/tile_icon.svg +3 -0
  20. package/dist/components/ButtonColumn/ButtonColumn.js +113 -0
  21. package/dist/components/ButtonColumn/ButtonColumn.scss +117 -0
  22. package/dist/components/ButtonColumn/img/column.svg +7 -0
  23. package/dist/components/ButtonCopy/ButtonCopy.js +37 -0
  24. package/dist/components/ButtonCopy/ButtonCopy.scss +43 -0
  25. package/dist/components/ButtonCopy/img/copy.svg +3 -0
  26. package/dist/components/ButtonExport/ButtonExport.js +83 -0
  27. package/dist/components/ButtonExport/ButtonExport.scss +111 -0
  28. package/dist/components/ButtonExport/img/export.svg +8 -0
  29. package/dist/components/ButtonExport/img/pdf.svg +12 -0
  30. package/dist/components/ButtonExport/img/xlc.svg +11 -0
  31. package/dist/components/ButtonUpload/ButtonUpload.js +24 -0
  32. package/dist/components/ButtonUpload/ButtonUpload.scss +45 -0
  33. package/dist/components/ButtonUpload/img/upload_icon.svg +8 -0
  34. package/dist/components/ConstructorComponents/Tariff/TariffPlan.js +8 -5
  35. package/dist/components/Page404/Page404.js +36 -0
  36. package/dist/components/Page404/Page404.scss +67 -0
  37. package/dist/components/Page404/img/banner-404.svg +16 -0
  38. package/dist/components/ShareComponent/ShareComponent.js +152 -0
  39. package/dist/components/ShareComponent/ShareComponent.scss +53 -0
  40. package/dist/components/ShareComponent/img/copy_icon.svg +5 -0
  41. package/dist/components/ShareComponent/img/facebook_icon.svg +5 -0
  42. package/dist/components/ShareComponent/img/linkedin_icon.svg +6 -0
  43. package/dist/components/ShareComponent/img/ok_icon.svg +5 -0
  44. package/dist/components/ShareComponent/img/share_icon.svg +5 -0
  45. package/dist/components/ShareComponent/img/tg_icon.svg +5 -0
  46. package/dist/components/ShareComponent/img/vk_icon.svg +5 -0
  47. package/dist/components/ShareComponent/img/whatsapp_icon.svg +5 -0
  48. package/dist/components/ShareComponent/img/x_icon.svg +5 -0
  49. package/dist/components/Table/TableBox/TableBox.stories.js +1 -1
  50. package/dist/components/TableInput/TableInput.js +103 -0
  51. package/dist/components/TableInput/TableInput.scss +35 -0
  52. package/dist/components/TableWithoutData/TableWithoutData.js +25 -0
  53. package/dist/components/TableWithoutData/TableWithoutData.scss +32 -0
  54. package/dist/components/TableWithoutData/img/doc_icon.png +0 -0
  55. package/dist/fonts/GolosText/GolosText-Black.ttf +0 -0
  56. package/dist/fonts/GolosText/GolosText-Bold.ttf +0 -0
  57. package/dist/fonts/GolosText/GolosText-ExtraBold.ttf +0 -0
  58. package/dist/fonts/GolosText/GolosText-Medium.ttf +0 -0
  59. package/dist/fonts/GolosText/GolosText-Regular.ttf +0 -0
  60. package/dist/fonts/GolosText/GolosText-SemiBold.ttf +0 -0
  61. package/dist/fonts/Inter/Inter-Bold.otf +0 -0
  62. package/dist/fonts/Inter/Inter-Light.otf +0 -0
  63. package/dist/fonts/Inter/Inter-Medium.otf +0 -0
  64. package/dist/fonts/Inter/Inter-Regular.ttf +0 -0
  65. package/dist/fonts/Montserrat/Montserrat-Black.ttf +0 -0
  66. package/dist/fonts/Montserrat/Montserrat-BlackItalic.ttf +0 -0
  67. package/dist/fonts/Montserrat/Montserrat-Bold.ttf +0 -0
  68. package/dist/fonts/Montserrat/Montserrat-BoldItalic.ttf +0 -0
  69. package/dist/fonts/Montserrat/Montserrat-ExtraBold.ttf +0 -0
  70. package/dist/fonts/Montserrat/Montserrat-ExtraBoldItalic.ttf +0 -0
  71. package/dist/fonts/Montserrat/Montserrat-ExtraLight.ttf +0 -0
  72. package/dist/fonts/Montserrat/Montserrat-ExtraLightItalic.ttf +0 -0
  73. package/dist/fonts/Montserrat/Montserrat-Italic.ttf +0 -0
  74. package/dist/fonts/Montserrat/Montserrat-Light.ttf +0 -0
  75. package/dist/fonts/Montserrat/Montserrat-LightItalic.ttf +0 -0
  76. package/dist/fonts/Montserrat/Montserrat-Medium.ttf +0 -0
  77. package/dist/fonts/Montserrat/Montserrat-MediumItalic.ttf +0 -0
  78. package/dist/fonts/Montserrat/Montserrat-Regular.ttf +0 -0
  79. package/dist/fonts/Montserrat/Montserrat-SemiBold.ttf +0 -0
  80. package/dist/fonts/Montserrat/Montserrat-SemiBoldItalic.ttf +0 -0
  81. package/dist/fonts/Montserrat/Montserrat-Thin.ttf +0 -0
  82. package/dist/fonts/Montserrat/Montserrat-ThinItalic.ttf +0 -0
  83. package/dist/fonts/Nunito_Sans/NunitoSans-Black.ttf +0 -0
  84. package/dist/fonts/Nunito_Sans/NunitoSans-BlackItalic.ttf +0 -0
  85. package/dist/fonts/Nunito_Sans/NunitoSans-Bold.ttf +0 -0
  86. package/dist/fonts/Nunito_Sans/NunitoSans-BoldItalic.ttf +0 -0
  87. package/dist/fonts/Nunito_Sans/NunitoSans-ExtraBold.ttf +0 -0
  88. package/dist/fonts/Nunito_Sans/NunitoSans-ExtraBoldItalic.ttf +0 -0
  89. package/dist/fonts/Nunito_Sans/NunitoSans-ExtraLight.ttf +0 -0
  90. package/dist/fonts/Nunito_Sans/NunitoSans-ExtraLightItalic.ttf +0 -0
  91. package/dist/fonts/Nunito_Sans/NunitoSans-Italic.ttf +0 -0
  92. package/dist/fonts/Nunito_Sans/NunitoSans-Light.ttf +0 -0
  93. package/dist/fonts/Nunito_Sans/NunitoSans-LightItalic.ttf +0 -0
  94. package/dist/fonts/Nunito_Sans/NunitoSans-Regular.ttf +0 -0
  95. package/dist/fonts/Nunito_Sans/NunitoSans-SemiBold.ttf +0 -0
  96. package/dist/fonts/Nunito_Sans/NunitoSans-SemiBoldItalic.ttf +0 -0
  97. package/dist/fonts/Rubik/Rubik-Black.ttf +0 -0
  98. package/dist/fonts/Rubik/Rubik-BlackItalic.ttf +0 -0
  99. package/dist/fonts/Rubik/Rubik-Bold.ttf +0 -0
  100. package/dist/fonts/Rubik/Rubik-BoldItalic.ttf +0 -0
  101. package/dist/fonts/Rubik/Rubik-ExtraBold.ttf +0 -0
  102. package/dist/fonts/Rubik/Rubik-ExtraBoldItalic.ttf +0 -0
  103. package/dist/fonts/Rubik/Rubik-Italic.ttf +0 -0
  104. package/dist/fonts/Rubik/Rubik-Light.ttf +0 -0
  105. package/dist/fonts/Rubik/Rubik-LightItalic.ttf +0 -0
  106. package/dist/fonts/Rubik/Rubik-Medium.ttf +0 -0
  107. package/dist/fonts/Rubik/Rubik-MediumItalic.ttf +0 -0
  108. package/dist/fonts/Rubik/Rubik-Regular.ttf +0 -0
  109. package/dist/fonts/Rubik/Rubik-SemiBold.ttf +0 -0
  110. package/dist/fonts/Rubik/Rubik-SemiBoldItalic.ttf +0 -0
  111. package/dist/index.js +7 -0
  112. package/dist/main.js +14 -0
  113. package/dist/pages/_app.js +12 -0
  114. package/dist/pages/_document.js +12 -0
  115. package/dist/pages/index.js +92 -0
  116. package/dist/stories/Article/Article.scss +471 -0
  117. package/dist/stories/Article/ArticleElement.js +108 -0
  118. package/dist/stories/Article/ArticleStorybook.scss +6 -0
  119. package/dist/stories/Article/ArticleView.js +440 -0
  120. package/dist/stories/Article/ArticleView.stories.js +263 -0
  121. package/dist/stories/Article/Feedback/Feedback.js +58 -0
  122. package/dist/stories/Article/Feedback/Feedback.scss +86 -0
  123. package/dist/stories/Article/FormBtn/FormBtn.js +170 -0
  124. package/dist/stories/Article/FormBtn/FormBtn.scss +446 -0
  125. package/dist/stories/Article/FormBtn/img/clos_icon.svg +6 -0
  126. package/dist/stories/Article/FormBtn/img/close-icon.svg +3 -0
  127. package/dist/stories/Article/ImgArticle/ImgArticle.js +204 -0
  128. package/dist/stories/Article/ImgArticle/ImgArticle.scss +140 -0
  129. package/dist/stories/Article/ListOfContent/ListOfContent.js +41 -0
  130. package/dist/stories/Article/ListOfContent/ListOfContent.scss +83 -0
  131. package/dist/stories/Article/ListOfContent/ListOfContent.stories.js +66 -0
  132. package/dist/stories/Article/ListOfContent/img/time_icon.svg +3 -0
  133. package/dist/stories/Article/ListOfContent/img/view_icon.svg +3 -0
  134. package/dist/stories/Article/RecommendationList/RecommendationList.js +31 -0
  135. package/dist/stories/Article/RecommendationList/RecommendationList.scss +41 -0
  136. package/dist/stories/Article/TextArticle/TextArticle.js +129 -0
  137. package/dist/stories/Article/TextArticle/TextArticle.scss +43 -0
  138. package/dist/stories/Article/TitleText/TitleText.js +30 -0
  139. package/dist/stories/Article/TitleText/TitleText.scss +33 -0
  140. package/dist/stories/Article/YellowInformationBox/YellowInformationBox.js +30 -0
  141. package/dist/stories/Article/YellowInformationBox/YellowInformationBox.scss +46 -0
  142. package/dist/stories/Article/YellowInformationBox/img/bell.svg +9 -0
  143. package/dist/stories/Article/img/bell.svg +9 -0
  144. package/dist/stories/Article/img/btn-add-round.svg +4 -0
  145. package/dist/stories/Article/img/calendar_icon.svg +6 -0
  146. package/dist/stories/Article/img/close-round.svg +3 -0
  147. package/dist/stories/Article/img/close.svg +9 -0
  148. package/dist/stories/Article/img/copy_icon.svg +5 -0
  149. package/dist/stories/Article/img/info.svg +9 -0
  150. package/dist/stories/Article/img/ok_icon.svg +5 -0
  151. package/dist/stories/Article/img/share_icon.svg +5 -0
  152. package/dist/stories/Article/img/tg_icon.svg +5 -0
  153. package/dist/stories/Article/img/time_icon.svg +6 -0
  154. package/dist/stories/Article/img/view_icon.svg +6 -0
  155. package/dist/stories/Article/img/vk_icon.svg +5 -0
  156. package/dist/stories/Article/img/whatsapp_icon.svg +5 -0
  157. package/dist/stories/ArticleMainContainer/ArticleMainContainer.js +540 -0
  158. package/dist/stories/ArticleMainContainer/ArticleMainContainer.scss +377 -0
  159. package/dist/stories/ArticleMainContainer/ArticleMainContainer.stories.js +75 -0
  160. package/dist/stories/ArticleMainContainer/main/page.js +1 -0
  161. package/dist/stories/ArticleMinBox/ArticleMinBox.js +172 -0
  162. package/dist/stories/ArticleMinBox/ArticleMinBox.scss +38 -0
  163. package/dist/stories/ArticleMinBox/ArticleMinBox.stories.js +56 -0
  164. package/dist/stories/BasicSelection/BasicSelection.js +143 -0
  165. package/dist/stories/BasicSelection/BasicSelection.scss +97 -0
  166. package/dist/stories/BasicSelection/BasicSelection.stories.js +32 -0
  167. package/dist/stories/Breadcrumb/Breadcrumb.js +113 -0
  168. package/dist/stories/Breadcrumb/Breadcrumb.scss +92 -0
  169. package/dist/stories/Breadcrumb/Breadcrums.stories.js +31 -0
  170. package/dist/stories/Breadcrumb/img/drop-right.svg +3 -0
  171. package/dist/stories/Breadcrumb/img/home_icon.svg +5 -0
  172. package/dist/stories/ButtonBasic/ButtonBasic.js +70 -0
  173. package/dist/stories/ButtonBasic/ButtonBasic.scss +242 -0
  174. package/dist/stories/ButtonBasic/ButtonBasic.stories.js +60 -0
  175. package/dist/stories/Checkbox/Checkbox.js +70 -0
  176. package/dist/stories/Checkbox/Checkbox.scss +128 -0
  177. package/dist/stories/Checkbox/Checkbox.stories.js +49 -0
  178. package/dist/stories/Checkbox/img/check.svg +3 -0
  179. package/dist/stories/CheckboxToggle/CheckboxToggle.js +54 -0
  180. package/dist/stories/CheckboxToggle/CheckboxToggle.scss +117 -0
  181. package/dist/stories/CheckboxToggle/CheckboxToggle.stories.js +26 -0
  182. package/dist/stories/DropDownSelector/DownSelector.js +352 -0
  183. package/dist/stories/DropDownSelector/DownSelector.stories.js +161 -0
  184. package/dist/stories/DropDownSelector/DropdownSelector.scss +272 -0
  185. package/dist/stories/DropDownSelector/img/close_icon.svg +6 -0
  186. package/dist/stories/DropDownSelector/img/close_icon_disabled.svg +6 -0
  187. package/dist/stories/InputDinamycPlaceholder/InputDinamycPlaceholder.js +162 -0
  188. package/dist/stories/InputDinamycPlaceholder/InputDinamycPlaceholder.scss +475 -0
  189. package/dist/stories/InputDinamycPlaceholder/InputDinamycPlaceholder.stories.js +50 -0
  190. package/dist/stories/InputDinamycPlaceholder/img/close_grey.svg +5 -0
  191. package/dist/stories/InputDinamycPlaceholder/img/close_red.svg +5 -0
  192. package/dist/stories/InputDinamycPlaceholder/img/hide.svg +12 -0
  193. package/dist/stories/InputDinamycPlaceholder/img/info_tooltip.svg +12 -0
  194. package/dist/stories/InputDinamycPlaceholder/img/show.svg +3 -0
  195. package/dist/stories/InputDynamicWidth/InputDynamicWidth.js +85 -0
  196. package/dist/stories/InputDynamicWidth/InputDynamicWidth.scss +98 -0
  197. package/dist/stories/InputDynamicWidth/InputDynamicWidth.stories.js +32 -0
  198. package/dist/stories/InputDynamicWidth/img/close_icon.svg +3 -0
  199. package/dist/stories/InputDynamicWidth/img/search_icon.svg +6 -0
  200. package/dist/stories/LongTileArticleBox/LongTileArticleBox.js +168 -0
  201. package/dist/stories/LongTileArticleBox/LongTileArticleBox.scss +360 -0
  202. package/dist/stories/LongTileArticleBox/LongTileArticleBox.stories.js +39 -0
  203. package/dist/stories/LongTileArticleBox/img/arrow_blue.svg +6 -0
  204. package/dist/stories/LongTileArticleBox/img/calendar_icon.svg +6 -0
  205. package/dist/stories/LongTileArticleBox/img/copy_icon.svg +5 -0
  206. package/dist/stories/LongTileArticleBox/img/ok_icon.svg +5 -0
  207. package/dist/stories/LongTileArticleBox/img/share_icon.svg +5 -0
  208. package/dist/stories/LongTileArticleBox/img/tag_icon.svg +5 -0
  209. package/dist/stories/LongTileArticleBox/img/tg_icon.svg +5 -0
  210. package/dist/stories/LongTileArticleBox/img/time_icon.svg +6 -0
  211. package/dist/stories/LongTileArticleBox/img/view_icon.svg +6 -0
  212. package/dist/stories/LongTileArticleBox/img/vk_icon.svg +5 -0
  213. package/dist/stories/LongTileArticleBox/img/whatsapp_icon.svg +5 -0
  214. package/dist/stories/ModalArticleAddElement/ModalArticleAddElement.js +128 -0
  215. package/dist/stories/ModalArticleAddElement/ModalArticleAddElement.scss +124 -0
  216. package/dist/stories/ModalArticleAddElement/ModalArticleAddElement.stories.js +19 -0
  217. package/dist/stories/ModalBitrixForm/ModalBitrixForm.js +236 -0
  218. package/dist/stories/ModalBitrixForm/ModalBitrixForm.scss +167 -0
  219. package/dist/stories/ModalBitrixForm/ModalBitrixForm.stories.js +101 -0
  220. package/dist/stories/ModalBitrixForm/img/close_icon.svg +3 -0
  221. package/dist/stories/ModalBitrixForm/img/done_icon.svg +3 -0
  222. package/dist/stories/ModalBitrixForm/img/ozon.svg +9 -0
  223. package/dist/stories/ModalBitrixForm/img/ozon_bkg.svg +9 -0
  224. package/dist/stories/MultilevelSidebar/MultilevelSidebar.js +472 -0
  225. package/dist/stories/MultilevelSidebar/MultilevelSidebar.scss +237 -0
  226. package/dist/stories/MultilevelSidebar/MultilevelSidebar.stories.js +80 -0
  227. package/dist/stories/MultilevelSidebar/MultilevelSidebarStorybook.scss +7 -0
  228. package/dist/stories/MultilevelSidebar/img/drop.svg +3 -0
  229. package/dist/stories/MultilevelSidebar/img/settings.svg +4 -0
  230. package/dist/stories/NoArticles/NoArticles.js +29 -0
  231. package/dist/stories/NoArticles/NoArticles.scss +26 -0
  232. package/dist/stories/NoArticles/NoArticles.stories.js +20 -0
  233. package/dist/stories/NoArticles/img/banner.svg +266 -0
  234. package/dist/stories/Paginator/Paginator.js +254 -0
  235. package/dist/stories/Paginator/Paginator.scss +168 -0
  236. package/dist/stories/Paginator/Paginator.stories.js +56 -0
  237. package/dist/stories/Paginator/img/arrow_blue.svg +3 -0
  238. package/dist/stories/Paginator/img/arrow_next.svg +3 -0
  239. package/dist/stories/Paginator/img/arrow_prev.svg +3 -0
  240. package/dist/stories/ResultsFound/ResultsFound.js +269 -0
  241. package/dist/stories/ResultsFound/ResultsFound.scss +139 -0
  242. package/dist/stories/ResultsFound/ResultsFound.stories.js +25 -0
  243. package/dist/stories/ResultsFound/img/arrow_icon.svg +5 -0
  244. package/dist/stories/ResultsFound/img/no-data_img.svg +13 -0
  245. package/dist/stories/ShortTileArticleBox/ShortTileArticleBox.js +160 -0
  246. package/dist/stories/ShortTileArticleBox/ShortTileArticleBox.scss +827 -0
  247. package/dist/stories/ShortTileArticleBox/ShortTileArticleBox.stories.js +42 -0
  248. package/dist/stories/ShortTileArticleBox/img/arrow_blue.svg +6 -0
  249. package/dist/stories/ShortTileArticleBox/img/calendar_icon.svg +6 -0
  250. package/dist/stories/ShortTileArticleBox/img/copy_icon.svg +5 -0
  251. package/dist/stories/ShortTileArticleBox/img/ok_icon.svg +5 -0
  252. package/dist/stories/ShortTileArticleBox/img/share_icon.svg +5 -0
  253. package/dist/stories/ShortTileArticleBox/img/tag_icon.svg +5 -0
  254. package/dist/stories/ShortTileArticleBox/img/tg_icon.svg +5 -0
  255. package/dist/stories/ShortTileArticleBox/img/time_icon.svg +6 -0
  256. package/dist/stories/ShortTileArticleBox/img/view_icon.svg +6 -0
  257. package/dist/stories/ShortTileArticleBox/img/vk_icon.svg +5 -0
  258. package/dist/stories/ShortTileArticleBox/img/whatsapp_icon.svg +5 -0
  259. package/dist/stories/SliderCarousel/SliderCarousel.js +77 -0
  260. package/dist/stories/SliderCarousel/SliderCarousel.scss +85 -0
  261. package/dist/stories/SliderCarousel/SliderCarousel.stories.js +29 -0
  262. package/dist/stories/SliderCarousel/img/no_image.svg +3 -0
  263. package/dist/stories/Table/Filters/OptionsDate.js +208 -0
  264. package/dist/stories/Table/Filters/OptionsImage.js +92 -0
  265. package/dist/stories/Table/Filters/OptionsImage.scss +10 -0
  266. package/dist/stories/Table/Filters/OptionsList.js +244 -0
  267. package/dist/stories/Table/Filters/OptionsNumber.js +220 -0
  268. package/dist/stories/Table/Filters/OptionsNumber.scss +100 -0
  269. package/dist/stories/Table/Filters/OptionsText.js +165 -0
  270. package/dist/stories/Table/Filters/OptionsText.scss +71 -0
  271. package/dist/stories/Table/Filters/img/FilterDefault.js +26 -0
  272. package/dist/stories/Table/Filters/img/FilterReset.js +41 -0
  273. package/dist/stories/Table/Filters/img/dropFilters.png +0 -0
  274. package/dist/stories/Table/Filters/img/filterDefault.svg +3 -0
  275. package/dist/stories/Table/Filters/img/filter_blue.svg +3 -0
  276. package/dist/stories/Table/Filters/img/filter_blue_background.svg +5 -0
  277. package/dist/stories/Table/Filters/img/filter_reset.svg +7 -0
  278. package/dist/stories/Table/InputWithState/InputWithState.js +36 -0
  279. package/dist/stories/Table/RenderFiltersTh/RenderFiltersTh.js +140 -0
  280. package/dist/stories/Table/RenderTd/RenderTd.js +19 -0
  281. package/dist/stories/Table/RenderTh/RenderTh.js +112 -0
  282. package/dist/stories/Table/Table.js +1568 -0
  283. package/dist/stories/Table/Table.scss +1524 -0
  284. package/dist/stories/Table/Table.stories.js +83 -0
  285. package/dist/stories/Table/TableChartTd/TableChartTd.js +172 -0
  286. package/dist/stories/Table/TableChartTd/TableChartTd.scss +0 -0
  287. package/dist/stories/Table/TdDate/TdDate.js +36 -0
  288. package/dist/stories/Table/TdDate/TdDate.scss +0 -0
  289. package/dist/stories/Table/TdDate.js +34 -0
  290. package/dist/stories/Table/TypeTdImage.js +85 -0
  291. package/dist/stories/Table/img/Search.png +0 -0
  292. package/dist/stories/Table/img/SortArrow.js +12 -0
  293. package/dist/stories/Table/img/SortArrowUp.js +12 -0
  294. package/dist/stories/Table/img/SortTable.js +14 -0
  295. package/dist/stories/Table/img/close_icon.svg +7 -0
  296. package/dist/stories/Table/img/close_white.svg +3 -0
  297. package/dist/stories/Table/img/context-menu.svg +6 -0
  298. package/dist/stories/Table/img/contextMenuBtn.png +0 -0
  299. package/dist/stories/Table/img/delete_icon.svg +8 -0
  300. package/dist/stories/Table/img/dropFilters.png +0 -0
  301. package/dist/stories/Table/img/filter.png +0 -0
  302. package/dist/stories/Table/img/filterDefault.png +0 -0
  303. package/dist/stories/Table/img/filter_blue.svg +3 -0
  304. package/dist/stories/Table/img/filter_blue_background.svg +5 -0
  305. package/dist/stories/Table/img/imageNotFound.svg +3 -0
  306. package/dist/stories/Table/img/location.svg +3 -0
  307. package/dist/stories/Table/img/sort_arrow_down.svg +6 -0
  308. package/dist/stories/Table/img/sort_arrow_up.svg +4 -0
  309. package/dist/stories/Table/img/sort_table.svg +8 -0
  310. package/dist/stories/Table/svg_img.js +8 -0
  311. package/dist/stories/TableBox/TableBox.js +304 -0
  312. package/dist/stories/TableBox/TableBox.scss +418 -0
  313. package/dist/stories/TableBox/TableBox.stories.js +124 -0
  314. package/dist/stories/TableBox/img/delete_icon.svg +9 -0
  315. package/dist/stories/TableBox/img/forward_icon.svg +9 -0
  316. package/dist/stories/TableBox/img/more_icon.svg +10 -0
  317. package/dist/stories/TableBox/img_stories/tag_icon.svg +5 -0
  318. package/dist/stories/TextareaDynamicPlaceholder/TextareaDynamicPlaceholder.js +91 -0
  319. package/dist/stories/TextareaDynamicPlaceholder/TextareaDynamicPlaceholder.scss +124 -0
  320. package/dist/stories/TextareaDynamicPlaceholder/TextareaDynamicPlaceholder.stories.js +29 -0
  321. package/dist/stories/TitleContentEditable/TitleContentEditable.js +71 -0
  322. package/dist/stories/TitleContentEditable/TitleContentEditable.scss +69 -0
  323. package/dist/stories/TitleContentEditable/TitleContentEditable.stories.js +37 -0
  324. package/dist/stories/ViewSwitch/ViewSwitch.js +48 -0
  325. package/dist/stories/ViewSwitch/ViewSwitch.scss +135 -0
  326. package/dist/stories/ViewSwitch/ViewSwitch.stories.js +48 -0
  327. package/dist/stories/ViewSwitch/img/Chat.js +24 -0
  328. package/dist/stories/ViewSwitch/img/Table.js +21 -0
  329. package/dist/stories/ViewSwitch/img/Tile.js +20 -0
  330. package/dist/stories/ViewSwitch/img/TileLong.js +20 -0
  331. package/dist/styles/font.scss +93 -0
  332. package/dist/styles/globals.scss +66 -0
  333. package/package.json +1 -1
@@ -0,0 +1,269 @@
1
+ "use strict";
2
+
3
+ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
4
+ Object.defineProperty(exports, "__esModule", {
5
+ value: true
6
+ });
7
+ exports.metadata = exports["default"] = void 0;
8
+ var _headers = _interopRequireDefault(require("../../common/headers"));
9
+ var _TableBox = _interopRequireDefault(require("../TableBox/TableBox"));
10
+ var _NoArticles = _interopRequireDefault(require("../NoArticles/NoArticles"));
11
+ var _LongTileArticleBox = _interopRequireDefault(require("../LongTileArticleBox/LongTileArticleBox"));
12
+ var _ShortTileArticleBox = _interopRequireDefault(require("../ShortTileArticleBox/ShortTileArticleBox"));
13
+ var _reactSpinners = require("react-spinners");
14
+ var _Paginator = require("../Paginator/Paginator");
15
+ var _fetchUrls = require("../../common/fetchUrls");
16
+ var _utils = require("../../common/utils");
17
+ var _react = require("react");
18
+ require("./ResultsFound.scss");
19
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
20
+ function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
21
+ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
22
+ function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
23
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
24
+ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
25
+ function _slicedToArray(r, e) { return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest(); }
26
+ function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
27
+ function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
28
+ function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
29
+ function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t["return"] && (u = t["return"](), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
30
+ function _arrayWithHoles(r) { if (Array.isArray(r)) return r; }
31
+ var metaLang = {
32
+ 'rus': 'ru_RU',
33
+ 'eng': 'en_EN',
34
+ 'tur': 'tr_TR'
35
+ };
36
+ var btn_tab = [{
37
+ label: 'Все результаты',
38
+ value: 'all_results'
39
+ }, {
40
+ label: 'В статьях ',
41
+ value: 'in_the_articles'
42
+ }, {
43
+ label: 'В разделах',
44
+ value: 'in_the_sections'
45
+ }];
46
+ var metadata = exports.metadata = {
47
+ title: 'Результаты поиска',
48
+ description: 'Результаты поиска',
49
+ openGraph: {
50
+ title: 'Результаты поиска',
51
+ description: 'Результаты поиска',
52
+ url: '',
53
+ site_name: '',
54
+ type: 'website'
55
+ // locale: metaLang?.[activeLang] ? metaLang?.[activeLang] : 'ru_RU'
56
+ // <meta property="og:url" content={window.location.href} />
57
+ // <meta property="og:site_name" content={window.location.host} />
58
+ }
59
+ };
60
+ var ResultsFound = function ResultsFound(_ref) {
61
+ var _articles$data, _paginatorRef$current, _articles$data2, _articles$data3;
62
+ var searchWord = _ref.searchWord,
63
+ PORTAL_ID = _ref.PORTAL_ID,
64
+ activeLang = _ref.activeLang,
65
+ selectView = _ref.selectView,
66
+ selectedEndLevelValue = _ref.selectedEndLevelValue,
67
+ BASE_ROUTE = _ref.BASE_ROUTE;
68
+ var _useState = (0, _react.useState)([]),
69
+ _useState2 = _slicedToArray(_useState, 2),
70
+ articles = _useState2[0],
71
+ setArticles = _useState2[1];
72
+ var _useState3 = (0, _react.useState)(null),
73
+ _useState4 = _slicedToArray(_useState3, 2),
74
+ sortingOption = _useState4[0],
75
+ setSortingOption = _useState4[1];
76
+ var _useState5 = (0, _react.useState)(btn_tab[0].value),
77
+ _useState6 = _slicedToArray(_useState5, 2),
78
+ pageValue = _useState6[0],
79
+ setPageValue = _useState6[1];
80
+ var paginatorCallback = (0, _react.useRef)();
81
+ var paginatorRef = (0, _react.useRef)();
82
+ var refTableBox = (0, _react.useRef)();
83
+ var tableFetchCallback = (0, _react.useRef)();
84
+ var tableHeaders = articles === null || articles === void 0 ? void 0 : articles.labels;
85
+ var tableData = (_articles$data = articles === null || articles === void 0 ? void 0 : articles.data) !== null && _articles$data !== void 0 ? _articles$data : [];
86
+ var _useState7 = (0, _react.useState)(false),
87
+ _useState8 = _slicedToArray(_useState7, 2),
88
+ loading = _useState8[0],
89
+ setLoading = _useState8[1];
90
+ var _useState9 = (0, _react.useState)([]),
91
+ _useState10 = _slicedToArray(_useState9, 2),
92
+ columnSize = _useState10[0],
93
+ setColumnSize = _useState10[1];
94
+ var _useState11 = (0, _react.useState)({}),
95
+ _useState12 = _slicedToArray(_useState11, 2),
96
+ sort = _useState12[0],
97
+ setSort = _useState12[1];
98
+ var _useState13 = (0, _react.useState)(0),
99
+ _useState14 = _slicedToArray(_useState13, 2),
100
+ top = _useState14[0],
101
+ setTop = _useState14[1];
102
+ var _useState15 = (0, _react.useState)(0),
103
+ _useState16 = _slicedToArray(_useState15, 2),
104
+ heightHeader = _useState16[0],
105
+ setHeightHeader = _useState16[1];
106
+ var _usePagination = (0, _Paginator.usePagination)(paginatorCallback.current, [activeLang], (_paginatorRef$current = paginatorRef.current) === null || _paginatorRef$current === void 0 ? void 0 : _paginatorRef$current.params, activeLang),
107
+ _usePagination2 = _slicedToArray(_usePagination, 7),
108
+ page = _usePagination2[0],
109
+ limit = _usePagination2[1],
110
+ total = _usePagination2[2],
111
+ setTotal = _usePagination2[3],
112
+ Paginator = _usePagination2[4],
113
+ resetPaginator = _usePagination2[5],
114
+ paginatorTransition = _usePagination2[6];
115
+ var fetchSearch = function fetchSearch(page, limit) {
116
+ setLoading(true);
117
+ var url = "".concat(_fetchUrls.RavshanArticlesHttps, "/search");
118
+ var getHeaders = _objectSpread({}, _headers["default"]);
119
+ var body = JSON.stringify({
120
+ query: searchWord,
121
+ 'level_id': selectedEndLevelValue,
122
+ 'portal_id': PORTAL_ID,
123
+ 'language': activeLang,
124
+ "page": page,
125
+ "limit": limit !== null && limit !== void 0 ? limit : 10
126
+ });
127
+ fetch(url, {
128
+ body: body,
129
+ method: 'POST',
130
+ headers: getHeaders
131
+ }).then(function (res) {
132
+ return (0, _utils.handleApiResponseOrThrow)(res);
133
+ }).then(function (json) {
134
+ // if (!Object.entries(json).length) return
135
+ setTotal(json.total);
136
+ setArticles(json);
137
+ setColumnSize(json.column_size);
138
+ //setTotalParent(json.total)
139
+ if (json.labels.sort) setSort(json.labels.sort);
140
+ })["catch"](function (err) {
141
+ return console.error(err);
142
+ })["finally"](function () {
143
+ return setLoading(false);
144
+ });
145
+ };
146
+ var scroll = function scroll() {
147
+ var tableBox = refTableBox === null || refTableBox === void 0 ? void 0 : refTableBox.current;
148
+ var header = document.querySelector('.header');
149
+ var heightHeader = header.getBoundingClientRect().height;
150
+ setHeightHeader(heightHeader);
151
+ setTop(tableBox === null || tableBox === void 0 ? void 0 : tableBox.getBoundingClientRect().top);
152
+ };
153
+ (0, _react.useEffect)(function () {
154
+ window.addEventListener("scroll", scroll);
155
+ return function () {
156
+ return window.removeEventListener("scroll", scroll);
157
+ };
158
+ }, []);
159
+ (0, _react.useEffect)(function () {
160
+ if (searchWord) {
161
+ fetchSearch(page, limit);
162
+ } else setArticles([]);
163
+ }, [searchWord, page, limit]);
164
+ return /*#__PURE__*/React.createElement("div", {
165
+ className: "article-search"
166
+ }, loading ? /*#__PURE__*/React.createElement("div", {
167
+ className: "loader-box"
168
+ }, /*#__PURE__*/React.createElement(_reactSpinners.MoonLoader, {
169
+ className: "loader",
170
+ color: "#7b7b7b",
171
+ speedMultiplier: 0.5,
172
+ size: 65
173
+ })) : articles !== null && articles !== void 0 && (_articles$data2 = articles.data) !== null && _articles$data2 !== void 0 && _articles$data2.length ? /*#__PURE__*/React.createElement(React.Fragment, null, selectView != 'Table' ? articles === null || articles === void 0 || (_articles$data3 = articles.data) === null || _articles$data3 === void 0 ? void 0 : _articles$data3.map(function (data, ind) {
174
+ var _data = _slicedToArray(data, 11),
175
+ id = _data[0],
176
+ portalId = _data[1],
177
+ active = _data[2],
178
+ photo_preview = _data[3],
179
+ name = _data[4],
180
+ annotation = _data[5],
181
+ tags = _data[6],
182
+ date = _data[7],
183
+ author = _data[8],
184
+ timeToRead = _data[9],
185
+ views = _data[10];
186
+ if (selectView == 'Tile-short') {
187
+ return /*#__PURE__*/React.createElement(_ShortTileArticleBox["default"], {
188
+ BASE_ROUTE: BASE_ROUTE,
189
+ key: ind,
190
+ id: id,
191
+ name: name,
192
+ author: author,
193
+ annotation: annotation,
194
+ photoPreview: photo_preview,
195
+ tags: tags,
196
+ date: new Date(date),
197
+ timeToRead: timeToRead,
198
+ views: views,
199
+ statusArray: ["https://dl.ecomru.ru/svg-storage/icon-waiting.svg", "Update"],
200
+ onLinkClick: function onLinkClick(e) {
201
+ return e;
202
+ },
203
+ pathBread: 'main',
204
+ showStatus: true,
205
+ search: searchWord,
206
+ transliter: function (_transliter) {
207
+ function transliter(_x) {
208
+ return _transliter.apply(this, arguments);
209
+ }
210
+ transliter.toString = function () {
211
+ return _transliter.toString();
212
+ };
213
+ return transliter;
214
+ }(function (e) {
215
+ return transliter(e);
216
+ })
217
+ });
218
+ }
219
+ if (selectView == 'Tile-long') {
220
+ return /*#__PURE__*/React.createElement(_LongTileArticleBox["default"], {
221
+ BASE_ROUTE: BASE_ROUTE,
222
+ key: ind,
223
+ id: id,
224
+ name: name,
225
+ author: author,
226
+ annotation: annotation,
227
+ photoPreview: photo_preview,
228
+ tags: tags,
229
+ date: new Date(date),
230
+ timeToRead: timeToRead,
231
+ views: views,
232
+ statusArray: ["https://dl.ecomru.ru/svg-storage/icon-waiting.svg", "Update"],
233
+ onLinkClick: function onLinkClick(e) {
234
+ return e;
235
+ },
236
+ pathBread: 'main',
237
+ showStatus: true,
238
+ search: searchWord,
239
+ transliter: function (_transliter2) {
240
+ function transliter(_x2) {
241
+ return _transliter2.apply(this, arguments);
242
+ }
243
+ transliter.toString = function () {
244
+ return _transliter2.toString();
245
+ };
246
+ return transliter;
247
+ }(function (e) {
248
+ return transliter(e);
249
+ })
250
+ });
251
+ }
252
+ }) : /*#__PURE__*/React.createElement("div", {
253
+ className: "table-box",
254
+ ref: refTableBox
255
+ }, /*#__PURE__*/React.createElement(_TableBox["default"], {
256
+ ref: paginatorRef,
257
+ fetchedData: tableData,
258
+ headers: tableHeaders,
259
+ columnSize: columnSize,
260
+ fetchCallback: function fetchCallback(e) {
261
+ // resetPaginator()
262
+ tableFetchCallback.current(e);
263
+ },
264
+ sort: sort,
265
+ loading: loading,
266
+ topHeader: top < heightHeader - 50 ? top > -50 ? heightHeader - top - 50 : heightHeader : 0
267
+ }), Paginator), selectView != 'Table' && Paginator) : /*#__PURE__*/React.createElement(_NoArticles["default"], null));
268
+ };
269
+ var _default = exports["default"] = ResultsFound;
@@ -0,0 +1,139 @@
1
+ .results-found {
2
+ display: flex;
3
+ flex-direction: column;
4
+ gap: 24px;
5
+ min-height: 800px;
6
+
7
+ &__no-data {
8
+ display: flex;
9
+ flex-direction: column;
10
+ gap: 16px;
11
+ align-items: center;
12
+ justify-content: center;
13
+ padding: 40px;
14
+ width: 100%;
15
+ height: 100%;
16
+
17
+ .title {
18
+ color: #2B3340;
19
+ font-family: NunitoSans;
20
+ font-size: 20px;
21
+ font-style: normal;
22
+ font-weight: 600;
23
+ line-height: 24px;
24
+ }
25
+ }
26
+
27
+ &__header {
28
+ display: flex;
29
+ flex-direction: column;
30
+ gap: 12px;
31
+ width: 100%;
32
+
33
+ .title_search {
34
+ color: #636D65;
35
+ font-family: NunitoSans;
36
+ font-size: 24px;
37
+ font-style: normal;
38
+ font-weight: 500;
39
+ line-height: 28px;
40
+
41
+ span {
42
+ color: #0B110B;
43
+ }
44
+ }
45
+
46
+ .text_description {
47
+ color: #636D65;
48
+ font-family: NunitoSans;
49
+ font-size: 14px;
50
+ font-style: normal;
51
+ font-weight: 400;
52
+ line-height: 16px;
53
+ }
54
+ }
55
+
56
+ &__content {
57
+ display: flex;
58
+ flex-direction: column;
59
+ gap: 70px;
60
+ width: 100%;
61
+
62
+ .found-section,
63
+ .found-articles {
64
+ display: flex;
65
+ flex-direction: column;
66
+ gap: 24px;
67
+ width: 100%;
68
+
69
+ .text_grey {
70
+ color: #0B110B;
71
+ font-family: NunitoSans;
72
+ font-size: 14px;
73
+ font-style: normal;
74
+ font-weight: 500;
75
+ line-height: 16px;
76
+ }
77
+
78
+ &__content {
79
+ display: flex;
80
+ flex-direction: column;
81
+ gap: 24px;
82
+ width: 100%;
83
+
84
+ .section-item {
85
+ display: flex;
86
+ flex-direction: column;
87
+ width: 100%;
88
+ cursor: pointer;
89
+
90
+ .text_section {
91
+ color: #0B110B;
92
+ font-family: NunitoSans;
93
+ font-size: 24px;
94
+ font-style: normal;
95
+ font-weight: 500;
96
+ line-height: 28px;
97
+ }
98
+
99
+ &__breadcrumb {
100
+ display: flex;
101
+ gap: 2px;
102
+ }
103
+
104
+ &__breadcrumb-item {
105
+ display: flex;
106
+ gap: 2px;
107
+ color: #B4B8B4;
108
+ font-family: Inter;
109
+ font-size: 14px;
110
+ font-style: normal;
111
+ font-weight: 400;
112
+ line-height: 18px;
113
+ }
114
+ }
115
+
116
+
117
+ }
118
+ }
119
+ }
120
+ }
121
+
122
+ .article-search {
123
+ display: flex;
124
+ flex-wrap: wrap;
125
+ width: 100%;
126
+ gap: 24px;
127
+ background-color: #fff;
128
+ border-radius: 12px;
129
+ padding: 20px;
130
+ min-height: 60vh;
131
+ }
132
+
133
+ @media(max-width: 430px) {
134
+
135
+ .article-search {
136
+ padding: 8px;
137
+ gap: 6px;
138
+ }
139
+ }
@@ -0,0 +1,25 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports["default"] = exports.Default = void 0;
7
+ var _react = require("react");
8
+ var _addonActions = require("@storybook/addon-actions");
9
+ var _ResultsFound = _interopRequireDefault(require("./ResultsFound"));
10
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
11
+ var _default = exports["default"] = {
12
+ title: 'Article/ResultsFound',
13
+ component: _ResultsFound["default"],
14
+ parameters: {
15
+ layout: 'centered'
16
+ },
17
+ args: {
18
+ searchWord: 'kjjj'
19
+ }
20
+ };
21
+ var Default = exports.Default = {
22
+ render: function render(args) {
23
+ return /*#__PURE__*/React.createElement(_ResultsFound["default"], args);
24
+ }
25
+ };
@@ -0,0 +1,5 @@
1
+ <svg width="8" height="18" viewBox="0 0 8 18" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <g id="Icon">
3
+ <path id="Icon (Stroke)" fill-rule="evenodd" clip-rule="evenodd" d="M2.20041 5.73966C2.48226 5.43613 2.95681 5.41856 3.26034 5.70041L6.76034 8.95041C6.91317 9.09232 7 9.29145 7 9.5C7 9.70855 6.91317 9.90769 6.76034 10.0496L3.26034 13.2996C2.95681 13.5815 2.48226 13.5639 2.20041 13.2603C1.91856 12.9568 1.93613 12.4823 2.23966 12.2004L5.14779 9.5L2.23966 6.7996C1.93613 6.51775 1.91856 6.0432 2.20041 5.73966Z" fill="#B4B8B4"/>
4
+ </g>
5
+ </svg>
@@ -0,0 +1,13 @@
1
+ <svg width="104" height="106" viewBox="0 0 104 106" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <g id="Group">
3
+ <path id="Vector" d="M33.8051 102.644C41.0743 107.026 46.2601 105.207 48.2454 101.693C52.0848 94.8989 64.8504 81.0046 85.0803 76.3085C111.874 70.0887 106.278 53.5742 89.8073 44.9081C73.3363 36.242 61.0207 24.2509 62.8847 11.2127C64.7486 -1.82552 46.2803 -6.32022 38.0671 18.7609C32.7596 34.9693 23.2482 39.3116 17.1829 40.3554C11.4665 41.3391 5.21351 42.5734 2.16424 47.5076C-1.53586 53.4945 -0.244702 59.5506 15.2468 63.7043C37.1997 69.5905 17.5118 92.8231 33.8051 102.644Z" fill="white"/>
4
+ <g id="Group_2">
5
+ <path id="Vector_2" d="M14.9183 74.2355C15.2259 74.0594 18.6981 72.5894 35.9713 80.6422C35.9209 80.7107 35.8996 80.7431 35.8996 80.7431C35.8996 80.7431 17.9424 86.7905 14.424 79.3405C13.3734 77.1226 13.6744 75.5953 14.8883 74.2527L14.9183 74.2355Z" fill="#BFC8D4"/>
6
+ <path id="Vector_3" d="M72.975 77.2835C69.2223 80.4384 63.3371 82.7282 57.6584 79.6832C58.5558 79.1098 59.4827 78.5192 60.428 77.9083C66.1308 74.2441 71.154 76.6958 72.975 77.2835Z" fill="#EDEFF1"/>
7
+ <path id="Vector_4" d="M79.6971 38.4813C83.5313 70.4081 74.4195 76.2024 73.4052 77.0826C73.1115 77.3374 72.9925 77.3188 72.5485 77.2045L72.5409 77.2088C70.6617 76.7106 66.131 74.2437 60.4279 77.9075C59.4826 78.5185 58.5555 79.1091 57.6584 79.6825C51.8407 83.3722 47.1427 85.9724 43.7581 84.4632C40.8871 82.9987 38.2986 81.7312 35.9715 80.6425C18.6982 72.5898 15.2261 74.0597 14.9185 74.2359C15.2754 74.0415 18.5499 72.2263 22.959 69.0344C22.974 69.0258 22.989 69.0173 22.9922 69.0055C28.8855 64.7345 36.7779 58.004 42.4509 49.346C46.3129 43.4585 50.091 28.5332 57.3807 25.6047C72.3624 20.0158 79.0751 31.9872 79.6971 38.4813Z" fill="#94A3B8"/>
8
+ <path id="Vector_5" d="M63.1314 37.9207C63.5965 36.6927 63.5512 35.5373 63.0302 35.34C62.5092 35.1427 61.7099 35.9782 61.2449 37.2062C60.7798 38.4342 60.8252 39.5896 61.3461 39.7869C61.8671 39.9842 62.6664 39.1487 63.1314 37.9207Z" fill="white"/>
9
+ <path id="Vector_6" d="M72.6706 39.4881C73.0002 38.217 72.8303 37.0732 72.291 36.9334C71.7518 36.7936 71.0474 37.7106 70.7179 38.9817C70.3883 40.2528 70.5582 41.3966 71.0975 41.5364C71.6367 41.6762 72.341 40.7591 72.6706 39.4881Z" fill="white"/>
10
+ <path id="Vector_7" d="M66.8639 44.1548C66.7858 44.1547 66.71 44.1279 66.6492 44.0788C66.5884 44.0298 66.5462 43.9614 66.5296 43.885C66.4686 43.6085 66.1969 42.7905 65.7662 42.6689C65.3354 42.5474 64.4905 43.0194 64.1487 43.267C64.0751 43.3203 63.9834 43.3422 63.8937 43.3278C63.804 43.3135 63.7236 43.2641 63.6703 43.1905C63.6171 43.1169 63.5952 43.0252 63.6095 42.9355C63.6239 42.8458 63.6733 42.7654 63.7469 42.7122C63.8816 42.6146 65.0881 41.7658 65.9521 42.0096C66.8533 42.2639 67.1662 43.589 67.1988 43.7393C67.2097 43.7893 67.2093 43.8412 67.1975 43.891C67.1857 43.9409 67.1629 43.9874 67.1308 44.0273C67.0987 44.0671 67.058 44.0993 67.0118 44.1213C66.9656 44.1434 66.915 44.1548 66.8638 44.1548H66.8639Z" fill="white"/>
11
+ </g>
12
+ </g>
13
+ </svg>
@@ -0,0 +1,160 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports["default"] = void 0;
7
+ var _link = _interopRequireDefault(require("next/link"));
8
+ var _htmlReactParser = _interopRequireDefault(require("html-react-parser"));
9
+ var _time_icon = _interopRequireDefault(require("./img/time_icon.svg"));
10
+ var _view_icon = _interopRequireDefault(require("./img/view_icon.svg"));
11
+ var _calendar_icon = _interopRequireDefault(require("./img/calendar_icon.svg"));
12
+ var _SliderCarousel = _interopRequireDefault(require("../SliderCarousel/SliderCarousel"));
13
+ var _utils = require("../../common/utils");
14
+ var _ShareComponent = require("../../components/ShareComponent/ShareComponent");
15
+ var _highlightWord = require("../../common/highlightWord ");
16
+ var _react = require("react");
17
+ require("./ShortTileArticleBox.scss");
18
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
19
+ function _slicedToArray(r, e) { return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest(); }
20
+ function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
21
+ function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
22
+ function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
23
+ function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t["return"] && (u = t["return"](), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
24
+ function _arrayWithHoles(r) { if (Array.isArray(r)) return r; }
25
+ function _objectDestructuringEmpty(t) { if (null == t) throw new TypeError("Cannot destructure " + t); }
26
+ function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
27
+ var ShortTileArticleBox = function ShortTileArticleBox(_ref) {
28
+ var _tags$map, _author$, _author$2;
29
+ var props = _extends({}, (_objectDestructuringEmpty(_ref), _ref));
30
+ var id = props.id,
31
+ name = props.name,
32
+ author = props.author,
33
+ annotation = props.annotation,
34
+ photoPreview = props.photoPreview,
35
+ tags = props.tags,
36
+ date = props.date,
37
+ timeToRead = props.timeToRead,
38
+ views = props.views,
39
+ onLinkClick = props.onLinkClick,
40
+ _props$activeLang = props.activeLang,
41
+ activeLang = _props$activeLang === void 0 ? 'rus' : _props$activeLang,
42
+ _props$linkString = props.linkString,
43
+ linkString = _props$linkString === void 0 ? false : _props$linkString,
44
+ _props$stopRedirect = props.stopRedirect,
45
+ stopRedirect = _props$stopRedirect === void 0 ? false : _props$stopRedirect,
46
+ _props$search = props.search,
47
+ search = _props$search === void 0 ? false : _props$search;
48
+ var _useState = (0, _react.useState)(''),
49
+ _useState2 = _slicedToArray(_useState, 2),
50
+ articleName = _useState2[0],
51
+ setArticleName = _useState2[1];
52
+ var articlePath = annotation === null || annotation === void 0 ? void 0 : annotation[1];
53
+ (0, _react.useEffect)(function () {
54
+ setArticleName(Array.isArray(name) ? name === null || name === void 0 ? void 0 : name[0] : name);
55
+ }, [name]);
56
+ var translateMin = function translateMin() {
57
+ if (activeLang == 'eng') return 'min';
58
+ if (activeLang == 'tur') return 'dak';
59
+ return 'мин';
60
+ };
61
+ var translateAuthor = function translateAuthor() {
62
+ if (author) {
63
+ if (activeLang == 'eng') return (0, _utils.transliter)(Array.isArray(author) ? author !== null && author !== void 0 && author[0] ? author === null || author === void 0 ? void 0 : author[0] : '' : author);
64
+ if (activeLang == 'tur') return (0, _utils.transliter)(Array.isArray(author) ? author !== null && author !== void 0 && author[0] ? author === null || author === void 0 ? void 0 : author[0] : '' : author);
65
+ } else {
66
+ if (activeLang == 'rus') return 'Неизвестный автор';
67
+ if (activeLang == 'tur') return 'Bilinmeyen Yazar';
68
+ if (activeLang == 'eng') return 'Unknown_author';
69
+ }
70
+ return author ? author === null || author === void 0 ? void 0 : author[0] : author;
71
+ };
72
+ return /*#__PURE__*/React.createElement("div", {
73
+ className: "tile-short",
74
+ key: id + '' + name + '' + author
75
+ }, /*#__PURE__*/React.createElement(_link["default"], {
76
+ target: linkString ? '_blank' : '',
77
+ onClick: function onClick(e) {
78
+ if (stopRedirect) {
79
+ e.preventDefault();
80
+ }
81
+ if (onLinkClick && !stopRedirect) {
82
+ onLinkClick(e, id, articlePath);
83
+ }
84
+ },
85
+ key: id,
86
+ href: articlePath ? articlePath : '#'
87
+ }, /*#__PURE__*/React.createElement("div", {
88
+ className: "article-min"
89
+ }, /*#__PURE__*/React.createElement("div", {
90
+ className: "img-content"
91
+ }, /*#__PURE__*/React.createElement("div", {
92
+ className: "img-box"
93
+ }, /*#__PURE__*/React.createElement(_SliderCarousel["default"], {
94
+ imgArr: photoPreview
95
+ }))), /*#__PURE__*/React.createElement("div", {
96
+ className: "content-box"
97
+ }, /*#__PURE__*/React.createElement("div", {
98
+ className: "tag-box"
99
+ }, (tags === null || tags === void 0 ? void 0 : tags.length) > 0 && (tags === null || tags === void 0 || (_tags$map = tags.map(function (t, index) {
100
+ return /*#__PURE__*/React.createElement("div", {
101
+ key: t + index,
102
+ className: "tag"
103
+ }, t);
104
+ })) === null || _tags$map === void 0 ? void 0 : _tags$map.splice(0, 1)), (tags === null || tags === void 0 ? void 0 : tags.length) > 1 && /*#__PURE__*/React.createElement("div", {
105
+ className: "tag",
106
+ style: {
107
+ marginLeft: 'auto',
108
+ textOverflow: 'clip',
109
+ overflow: 'visible'
110
+ }
111
+ }, '+ ' + ((tags === null || tags === void 0 ? void 0 : tags.length) - 1))), /*#__PURE__*/React.createElement("h3", {
112
+ className: "title"
113
+ }, search ? (0, _highlightWord.hightlightWord)(search, articleName) : articleName), /*#__PURE__*/React.createElement("div", {
114
+ className: "description-content"
115
+ }, /*#__PURE__*/React.createElement("p", {
116
+ className: "text_description"
117
+ }, Array.isArray(annotation) ? annotation !== null && annotation !== void 0 && annotation[0] ? (0, _htmlReactParser["default"])(annotation === null || annotation === void 0 ? void 0 : annotation[0]) : '' : annotation ? (0, _htmlReactParser["default"])(annotation) : '')), /*#__PURE__*/React.createElement("div", {
118
+ className: "text-and-info-box"
119
+ }, /*#__PURE__*/React.createElement("div", {
120
+ className: "top-info"
121
+ }, /*#__PURE__*/React.createElement("div", {
122
+ className: "date-box"
123
+ }, /*#__PURE__*/React.createElement("img", _calendar_icon["default"]), /*#__PURE__*/React.createElement("p", {
124
+ className: "text_grey"
125
+ }, date === null || date === void 0 ? void 0 : date.toLocaleDateString('ru-RU'))), /*#__PURE__*/React.createElement("div", {
126
+ className: "info-box"
127
+ }, /*#__PURE__*/React.createElement("div", {
128
+ className: "view-box"
129
+ }, /*#__PURE__*/React.createElement("div", {
130
+ className: "icon-box"
131
+ }, /*#__PURE__*/React.createElement("img", _view_icon["default"])), /*#__PURE__*/React.createElement("p", {
132
+ className: "text"
133
+ }, views)), /*#__PURE__*/React.createElement("div", {
134
+ className: "time-box"
135
+ }, /*#__PURE__*/React.createElement("div", {
136
+ className: "icon-box"
137
+ }, /*#__PURE__*/React.createElement("img", _time_icon["default"])), /*#__PURE__*/React.createElement("p", {
138
+ className: "text"
139
+ }, "".concat(timeToRead ? timeToRead : '-', " ").concat(translateMin()))))), /*#__PURE__*/React.createElement("div", {
140
+ className: "bottom-info"
141
+ }, /*#__PURE__*/React.createElement("div", {
142
+ className: "author-box"
143
+ }, /*#__PURE__*/React.createElement("div", {
144
+ className: "author-avatar",
145
+ style: {
146
+ backgroundColor: author[1] ? author[1] : ''
147
+ }
148
+ }, ((_author$ = author[0]) === null || _author$ === void 0 ? void 0 : _author$.length) > 0 ? (_author$2 = author[0]) === null || _author$2 === void 0 || (_author$2 = _author$2.split(' ').map(function (str) {
149
+ return str[0];
150
+ }).reduce(function (acc, current) {
151
+ return acc += current;
152
+ }, '')) === null || _author$2 === void 0 ? void 0 : _author$2.toUpperCase() : '-'), /*#__PURE__*/React.createElement("p", {
153
+ className: "text_grey"
154
+ }, translateAuthor(author)))), /*#__PURE__*/React.createElement(_ShareComponent.ShareComponent, {
155
+ activeLang: activeLang,
156
+ id: id,
157
+ articlePath: articlePath
158
+ }))))));
159
+ };
160
+ var _default = exports["default"] = ShortTileArticleBox;