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.
- package/dist/common/headers.js +2 -2
- package/dist/common/hooks/hooks.js +108 -0
- package/dist/common/hooks/useResetOnBaseURL.js +15 -0
- package/dist/common/img/icon-delete.svg +3 -0
- package/dist/common/img/icon-edit.svg +3 -0
- package/dist/common/img/noPhoto.png +0 -0
- package/dist/common/img/time_icon.svg +5 -0
- package/dist/common/img/view_icon.svg +5 -0
- package/dist/common/styles/svg_img.scss +290 -0
- package/dist/common/svg_img.js +238 -0
- package/dist/common/validationFunc.js +14 -0
- package/dist/components/ArticleComponent/Article.js +252 -0
- package/dist/components/ArticleComponent/Article.scss +289 -0
- package/dist/components/ArticleElements/ShortTileArticleBox/ShortTileArticleBox.stories.js +1 -1
- package/dist/components/ArticleMain/ArticleMain.js +451 -0
- package/dist/components/ArticleMain/ArticleMain.scss +220 -0
- package/dist/components/ArticleMain/img/table_icon.svg +3 -0
- package/dist/components/ArticleMain/img/tile-long_icon.svg +3 -0
- package/dist/components/ArticleMain/img/tile_icon.svg +3 -0
- package/dist/components/ButtonColumn/ButtonColumn.js +113 -0
- package/dist/components/ButtonColumn/ButtonColumn.scss +117 -0
- package/dist/components/ButtonColumn/img/column.svg +7 -0
- package/dist/components/ButtonCopy/ButtonCopy.js +37 -0
- package/dist/components/ButtonCopy/ButtonCopy.scss +43 -0
- package/dist/components/ButtonCopy/img/copy.svg +3 -0
- package/dist/components/ButtonExport/ButtonExport.js +83 -0
- package/dist/components/ButtonExport/ButtonExport.scss +111 -0
- package/dist/components/ButtonExport/img/export.svg +8 -0
- package/dist/components/ButtonExport/img/pdf.svg +12 -0
- package/dist/components/ButtonExport/img/xlc.svg +11 -0
- package/dist/components/ButtonUpload/ButtonUpload.js +24 -0
- package/dist/components/ButtonUpload/ButtonUpload.scss +45 -0
- package/dist/components/ButtonUpload/img/upload_icon.svg +8 -0
- package/dist/components/ConstructorComponents/Tariff/TariffPlan.js +8 -5
- package/dist/components/Page404/Page404.js +36 -0
- package/dist/components/Page404/Page404.scss +67 -0
- package/dist/components/Page404/img/banner-404.svg +16 -0
- package/dist/components/ShareComponent/ShareComponent.js +152 -0
- package/dist/components/ShareComponent/ShareComponent.scss +53 -0
- package/dist/components/ShareComponent/img/copy_icon.svg +5 -0
- package/dist/components/ShareComponent/img/facebook_icon.svg +5 -0
- package/dist/components/ShareComponent/img/linkedin_icon.svg +6 -0
- package/dist/components/ShareComponent/img/ok_icon.svg +5 -0
- package/dist/components/ShareComponent/img/share_icon.svg +5 -0
- package/dist/components/ShareComponent/img/tg_icon.svg +5 -0
- package/dist/components/ShareComponent/img/vk_icon.svg +5 -0
- package/dist/components/ShareComponent/img/whatsapp_icon.svg +5 -0
- package/dist/components/ShareComponent/img/x_icon.svg +5 -0
- package/dist/components/Table/TableBox/TableBox.stories.js +1 -1
- package/dist/components/TableInput/TableInput.js +103 -0
- package/dist/components/TableInput/TableInput.scss +35 -0
- package/dist/components/TableWithoutData/TableWithoutData.js +25 -0
- package/dist/components/TableWithoutData/TableWithoutData.scss +32 -0
- package/dist/components/TableWithoutData/img/doc_icon.png +0 -0
- package/dist/fonts/GolosText/GolosText-Black.ttf +0 -0
- package/dist/fonts/GolosText/GolosText-Bold.ttf +0 -0
- package/dist/fonts/GolosText/GolosText-ExtraBold.ttf +0 -0
- package/dist/fonts/GolosText/GolosText-Medium.ttf +0 -0
- package/dist/fonts/GolosText/GolosText-Regular.ttf +0 -0
- package/dist/fonts/GolosText/GolosText-SemiBold.ttf +0 -0
- package/dist/fonts/Inter/Inter-Bold.otf +0 -0
- package/dist/fonts/Inter/Inter-Light.otf +0 -0
- package/dist/fonts/Inter/Inter-Medium.otf +0 -0
- package/dist/fonts/Inter/Inter-Regular.ttf +0 -0
- package/dist/fonts/Montserrat/Montserrat-Black.ttf +0 -0
- package/dist/fonts/Montserrat/Montserrat-BlackItalic.ttf +0 -0
- package/dist/fonts/Montserrat/Montserrat-Bold.ttf +0 -0
- package/dist/fonts/Montserrat/Montserrat-BoldItalic.ttf +0 -0
- package/dist/fonts/Montserrat/Montserrat-ExtraBold.ttf +0 -0
- package/dist/fonts/Montserrat/Montserrat-ExtraBoldItalic.ttf +0 -0
- package/dist/fonts/Montserrat/Montserrat-ExtraLight.ttf +0 -0
- package/dist/fonts/Montserrat/Montserrat-ExtraLightItalic.ttf +0 -0
- package/dist/fonts/Montserrat/Montserrat-Italic.ttf +0 -0
- package/dist/fonts/Montserrat/Montserrat-Light.ttf +0 -0
- package/dist/fonts/Montserrat/Montserrat-LightItalic.ttf +0 -0
- package/dist/fonts/Montserrat/Montserrat-Medium.ttf +0 -0
- package/dist/fonts/Montserrat/Montserrat-MediumItalic.ttf +0 -0
- package/dist/fonts/Montserrat/Montserrat-Regular.ttf +0 -0
- package/dist/fonts/Montserrat/Montserrat-SemiBold.ttf +0 -0
- package/dist/fonts/Montserrat/Montserrat-SemiBoldItalic.ttf +0 -0
- package/dist/fonts/Montserrat/Montserrat-Thin.ttf +0 -0
- package/dist/fonts/Montserrat/Montserrat-ThinItalic.ttf +0 -0
- package/dist/fonts/Nunito_Sans/NunitoSans-Black.ttf +0 -0
- package/dist/fonts/Nunito_Sans/NunitoSans-BlackItalic.ttf +0 -0
- package/dist/fonts/Nunito_Sans/NunitoSans-Bold.ttf +0 -0
- package/dist/fonts/Nunito_Sans/NunitoSans-BoldItalic.ttf +0 -0
- package/dist/fonts/Nunito_Sans/NunitoSans-ExtraBold.ttf +0 -0
- package/dist/fonts/Nunito_Sans/NunitoSans-ExtraBoldItalic.ttf +0 -0
- package/dist/fonts/Nunito_Sans/NunitoSans-ExtraLight.ttf +0 -0
- package/dist/fonts/Nunito_Sans/NunitoSans-ExtraLightItalic.ttf +0 -0
- package/dist/fonts/Nunito_Sans/NunitoSans-Italic.ttf +0 -0
- package/dist/fonts/Nunito_Sans/NunitoSans-Light.ttf +0 -0
- package/dist/fonts/Nunito_Sans/NunitoSans-LightItalic.ttf +0 -0
- package/dist/fonts/Nunito_Sans/NunitoSans-Regular.ttf +0 -0
- package/dist/fonts/Nunito_Sans/NunitoSans-SemiBold.ttf +0 -0
- package/dist/fonts/Nunito_Sans/NunitoSans-SemiBoldItalic.ttf +0 -0
- package/dist/fonts/Rubik/Rubik-Black.ttf +0 -0
- package/dist/fonts/Rubik/Rubik-BlackItalic.ttf +0 -0
- package/dist/fonts/Rubik/Rubik-Bold.ttf +0 -0
- package/dist/fonts/Rubik/Rubik-BoldItalic.ttf +0 -0
- package/dist/fonts/Rubik/Rubik-ExtraBold.ttf +0 -0
- package/dist/fonts/Rubik/Rubik-ExtraBoldItalic.ttf +0 -0
- package/dist/fonts/Rubik/Rubik-Italic.ttf +0 -0
- package/dist/fonts/Rubik/Rubik-Light.ttf +0 -0
- package/dist/fonts/Rubik/Rubik-LightItalic.ttf +0 -0
- package/dist/fonts/Rubik/Rubik-Medium.ttf +0 -0
- package/dist/fonts/Rubik/Rubik-MediumItalic.ttf +0 -0
- package/dist/fonts/Rubik/Rubik-Regular.ttf +0 -0
- package/dist/fonts/Rubik/Rubik-SemiBold.ttf +0 -0
- package/dist/fonts/Rubik/Rubik-SemiBoldItalic.ttf +0 -0
- package/dist/index.js +7 -0
- package/dist/main.js +14 -0
- package/dist/pages/_app.js +12 -0
- package/dist/pages/_document.js +12 -0
- package/dist/pages/index.js +92 -0
- package/dist/stories/Article/Article.scss +471 -0
- package/dist/stories/Article/ArticleElement.js +108 -0
- package/dist/stories/Article/ArticleStorybook.scss +6 -0
- package/dist/stories/Article/ArticleView.js +440 -0
- package/dist/stories/Article/ArticleView.stories.js +263 -0
- package/dist/stories/Article/Feedback/Feedback.js +58 -0
- package/dist/stories/Article/Feedback/Feedback.scss +86 -0
- package/dist/stories/Article/FormBtn/FormBtn.js +170 -0
- package/dist/stories/Article/FormBtn/FormBtn.scss +446 -0
- package/dist/stories/Article/FormBtn/img/clos_icon.svg +6 -0
- package/dist/stories/Article/FormBtn/img/close-icon.svg +3 -0
- package/dist/stories/Article/ImgArticle/ImgArticle.js +204 -0
- package/dist/stories/Article/ImgArticle/ImgArticle.scss +140 -0
- package/dist/stories/Article/ListOfContent/ListOfContent.js +41 -0
- package/dist/stories/Article/ListOfContent/ListOfContent.scss +83 -0
- package/dist/stories/Article/ListOfContent/ListOfContent.stories.js +66 -0
- package/dist/stories/Article/ListOfContent/img/time_icon.svg +3 -0
- package/dist/stories/Article/ListOfContent/img/view_icon.svg +3 -0
- package/dist/stories/Article/RecommendationList/RecommendationList.js +31 -0
- package/dist/stories/Article/RecommendationList/RecommendationList.scss +41 -0
- package/dist/stories/Article/TextArticle/TextArticle.js +129 -0
- package/dist/stories/Article/TextArticle/TextArticle.scss +43 -0
- package/dist/stories/Article/TitleText/TitleText.js +30 -0
- package/dist/stories/Article/TitleText/TitleText.scss +33 -0
- package/dist/stories/Article/YellowInformationBox/YellowInformationBox.js +30 -0
- package/dist/stories/Article/YellowInformationBox/YellowInformationBox.scss +46 -0
- package/dist/stories/Article/YellowInformationBox/img/bell.svg +9 -0
- package/dist/stories/Article/img/bell.svg +9 -0
- package/dist/stories/Article/img/btn-add-round.svg +4 -0
- package/dist/stories/Article/img/calendar_icon.svg +6 -0
- package/dist/stories/Article/img/close-round.svg +3 -0
- package/dist/stories/Article/img/close.svg +9 -0
- package/dist/stories/Article/img/copy_icon.svg +5 -0
- package/dist/stories/Article/img/info.svg +9 -0
- package/dist/stories/Article/img/ok_icon.svg +5 -0
- package/dist/stories/Article/img/share_icon.svg +5 -0
- package/dist/stories/Article/img/tg_icon.svg +5 -0
- package/dist/stories/Article/img/time_icon.svg +6 -0
- package/dist/stories/Article/img/view_icon.svg +6 -0
- package/dist/stories/Article/img/vk_icon.svg +5 -0
- package/dist/stories/Article/img/whatsapp_icon.svg +5 -0
- package/dist/stories/ArticleMainContainer/ArticleMainContainer.js +540 -0
- package/dist/stories/ArticleMainContainer/ArticleMainContainer.scss +377 -0
- package/dist/stories/ArticleMainContainer/ArticleMainContainer.stories.js +75 -0
- package/dist/stories/ArticleMainContainer/main/page.js +1 -0
- package/dist/stories/ArticleMinBox/ArticleMinBox.js +172 -0
- package/dist/stories/ArticleMinBox/ArticleMinBox.scss +38 -0
- package/dist/stories/ArticleMinBox/ArticleMinBox.stories.js +56 -0
- package/dist/stories/BasicSelection/BasicSelection.js +143 -0
- package/dist/stories/BasicSelection/BasicSelection.scss +97 -0
- package/dist/stories/BasicSelection/BasicSelection.stories.js +32 -0
- package/dist/stories/Breadcrumb/Breadcrumb.js +113 -0
- package/dist/stories/Breadcrumb/Breadcrumb.scss +92 -0
- package/dist/stories/Breadcrumb/Breadcrums.stories.js +31 -0
- package/dist/stories/Breadcrumb/img/drop-right.svg +3 -0
- package/dist/stories/Breadcrumb/img/home_icon.svg +5 -0
- package/dist/stories/ButtonBasic/ButtonBasic.js +70 -0
- package/dist/stories/ButtonBasic/ButtonBasic.scss +242 -0
- package/dist/stories/ButtonBasic/ButtonBasic.stories.js +60 -0
- package/dist/stories/Checkbox/Checkbox.js +70 -0
- package/dist/stories/Checkbox/Checkbox.scss +128 -0
- package/dist/stories/Checkbox/Checkbox.stories.js +49 -0
- package/dist/stories/Checkbox/img/check.svg +3 -0
- package/dist/stories/CheckboxToggle/CheckboxToggle.js +54 -0
- package/dist/stories/CheckboxToggle/CheckboxToggle.scss +117 -0
- package/dist/stories/CheckboxToggle/CheckboxToggle.stories.js +26 -0
- package/dist/stories/DropDownSelector/DownSelector.js +352 -0
- package/dist/stories/DropDownSelector/DownSelector.stories.js +161 -0
- package/dist/stories/DropDownSelector/DropdownSelector.scss +272 -0
- package/dist/stories/DropDownSelector/img/close_icon.svg +6 -0
- package/dist/stories/DropDownSelector/img/close_icon_disabled.svg +6 -0
- package/dist/stories/InputDinamycPlaceholder/InputDinamycPlaceholder.js +162 -0
- package/dist/stories/InputDinamycPlaceholder/InputDinamycPlaceholder.scss +475 -0
- package/dist/stories/InputDinamycPlaceholder/InputDinamycPlaceholder.stories.js +50 -0
- package/dist/stories/InputDinamycPlaceholder/img/close_grey.svg +5 -0
- package/dist/stories/InputDinamycPlaceholder/img/close_red.svg +5 -0
- package/dist/stories/InputDinamycPlaceholder/img/hide.svg +12 -0
- package/dist/stories/InputDinamycPlaceholder/img/info_tooltip.svg +12 -0
- package/dist/stories/InputDinamycPlaceholder/img/show.svg +3 -0
- package/dist/stories/InputDynamicWidth/InputDynamicWidth.js +85 -0
- package/dist/stories/InputDynamicWidth/InputDynamicWidth.scss +98 -0
- package/dist/stories/InputDynamicWidth/InputDynamicWidth.stories.js +32 -0
- package/dist/stories/InputDynamicWidth/img/close_icon.svg +3 -0
- package/dist/stories/InputDynamicWidth/img/search_icon.svg +6 -0
- package/dist/stories/LongTileArticleBox/LongTileArticleBox.js +168 -0
- package/dist/stories/LongTileArticleBox/LongTileArticleBox.scss +360 -0
- package/dist/stories/LongTileArticleBox/LongTileArticleBox.stories.js +39 -0
- package/dist/stories/LongTileArticleBox/img/arrow_blue.svg +6 -0
- package/dist/stories/LongTileArticleBox/img/calendar_icon.svg +6 -0
- package/dist/stories/LongTileArticleBox/img/copy_icon.svg +5 -0
- package/dist/stories/LongTileArticleBox/img/ok_icon.svg +5 -0
- package/dist/stories/LongTileArticleBox/img/share_icon.svg +5 -0
- package/dist/stories/LongTileArticleBox/img/tag_icon.svg +5 -0
- package/dist/stories/LongTileArticleBox/img/tg_icon.svg +5 -0
- package/dist/stories/LongTileArticleBox/img/time_icon.svg +6 -0
- package/dist/stories/LongTileArticleBox/img/view_icon.svg +6 -0
- package/dist/stories/LongTileArticleBox/img/vk_icon.svg +5 -0
- package/dist/stories/LongTileArticleBox/img/whatsapp_icon.svg +5 -0
- package/dist/stories/ModalArticleAddElement/ModalArticleAddElement.js +128 -0
- package/dist/stories/ModalArticleAddElement/ModalArticleAddElement.scss +124 -0
- package/dist/stories/ModalArticleAddElement/ModalArticleAddElement.stories.js +19 -0
- package/dist/stories/ModalBitrixForm/ModalBitrixForm.js +236 -0
- package/dist/stories/ModalBitrixForm/ModalBitrixForm.scss +167 -0
- package/dist/stories/ModalBitrixForm/ModalBitrixForm.stories.js +101 -0
- package/dist/stories/ModalBitrixForm/img/close_icon.svg +3 -0
- package/dist/stories/ModalBitrixForm/img/done_icon.svg +3 -0
- package/dist/stories/ModalBitrixForm/img/ozon.svg +9 -0
- package/dist/stories/ModalBitrixForm/img/ozon_bkg.svg +9 -0
- package/dist/stories/MultilevelSidebar/MultilevelSidebar.js +472 -0
- package/dist/stories/MultilevelSidebar/MultilevelSidebar.scss +237 -0
- package/dist/stories/MultilevelSidebar/MultilevelSidebar.stories.js +80 -0
- package/dist/stories/MultilevelSidebar/MultilevelSidebarStorybook.scss +7 -0
- package/dist/stories/MultilevelSidebar/img/drop.svg +3 -0
- package/dist/stories/MultilevelSidebar/img/settings.svg +4 -0
- package/dist/stories/NoArticles/NoArticles.js +29 -0
- package/dist/stories/NoArticles/NoArticles.scss +26 -0
- package/dist/stories/NoArticles/NoArticles.stories.js +20 -0
- package/dist/stories/NoArticles/img/banner.svg +266 -0
- package/dist/stories/Paginator/Paginator.js +254 -0
- package/dist/stories/Paginator/Paginator.scss +168 -0
- package/dist/stories/Paginator/Paginator.stories.js +56 -0
- package/dist/stories/Paginator/img/arrow_blue.svg +3 -0
- package/dist/stories/Paginator/img/arrow_next.svg +3 -0
- package/dist/stories/Paginator/img/arrow_prev.svg +3 -0
- package/dist/stories/ResultsFound/ResultsFound.js +269 -0
- package/dist/stories/ResultsFound/ResultsFound.scss +139 -0
- package/dist/stories/ResultsFound/ResultsFound.stories.js +25 -0
- package/dist/stories/ResultsFound/img/arrow_icon.svg +5 -0
- package/dist/stories/ResultsFound/img/no-data_img.svg +13 -0
- package/dist/stories/ShortTileArticleBox/ShortTileArticleBox.js +160 -0
- package/dist/stories/ShortTileArticleBox/ShortTileArticleBox.scss +827 -0
- package/dist/stories/ShortTileArticleBox/ShortTileArticleBox.stories.js +42 -0
- package/dist/stories/ShortTileArticleBox/img/arrow_blue.svg +6 -0
- package/dist/stories/ShortTileArticleBox/img/calendar_icon.svg +6 -0
- package/dist/stories/ShortTileArticleBox/img/copy_icon.svg +5 -0
- package/dist/stories/ShortTileArticleBox/img/ok_icon.svg +5 -0
- package/dist/stories/ShortTileArticleBox/img/share_icon.svg +5 -0
- package/dist/stories/ShortTileArticleBox/img/tag_icon.svg +5 -0
- package/dist/stories/ShortTileArticleBox/img/tg_icon.svg +5 -0
- package/dist/stories/ShortTileArticleBox/img/time_icon.svg +6 -0
- package/dist/stories/ShortTileArticleBox/img/view_icon.svg +6 -0
- package/dist/stories/ShortTileArticleBox/img/vk_icon.svg +5 -0
- package/dist/stories/ShortTileArticleBox/img/whatsapp_icon.svg +5 -0
- package/dist/stories/SliderCarousel/SliderCarousel.js +77 -0
- package/dist/stories/SliderCarousel/SliderCarousel.scss +85 -0
- package/dist/stories/SliderCarousel/SliderCarousel.stories.js +29 -0
- package/dist/stories/SliderCarousel/img/no_image.svg +3 -0
- package/dist/stories/Table/Filters/OptionsDate.js +208 -0
- package/dist/stories/Table/Filters/OptionsImage.js +92 -0
- package/dist/stories/Table/Filters/OptionsImage.scss +10 -0
- package/dist/stories/Table/Filters/OptionsList.js +244 -0
- package/dist/stories/Table/Filters/OptionsNumber.js +220 -0
- package/dist/stories/Table/Filters/OptionsNumber.scss +100 -0
- package/dist/stories/Table/Filters/OptionsText.js +165 -0
- package/dist/stories/Table/Filters/OptionsText.scss +71 -0
- package/dist/stories/Table/Filters/img/FilterDefault.js +26 -0
- package/dist/stories/Table/Filters/img/FilterReset.js +41 -0
- package/dist/stories/Table/Filters/img/dropFilters.png +0 -0
- package/dist/stories/Table/Filters/img/filterDefault.svg +3 -0
- package/dist/stories/Table/Filters/img/filter_blue.svg +3 -0
- package/dist/stories/Table/Filters/img/filter_blue_background.svg +5 -0
- package/dist/stories/Table/Filters/img/filter_reset.svg +7 -0
- package/dist/stories/Table/InputWithState/InputWithState.js +36 -0
- package/dist/stories/Table/RenderFiltersTh/RenderFiltersTh.js +140 -0
- package/dist/stories/Table/RenderTd/RenderTd.js +19 -0
- package/dist/stories/Table/RenderTh/RenderTh.js +112 -0
- package/dist/stories/Table/Table.js +1568 -0
- package/dist/stories/Table/Table.scss +1524 -0
- package/dist/stories/Table/Table.stories.js +83 -0
- package/dist/stories/Table/TableChartTd/TableChartTd.js +172 -0
- package/dist/stories/Table/TableChartTd/TableChartTd.scss +0 -0
- package/dist/stories/Table/TdDate/TdDate.js +36 -0
- package/dist/stories/Table/TdDate/TdDate.scss +0 -0
- package/dist/stories/Table/TdDate.js +34 -0
- package/dist/stories/Table/TypeTdImage.js +85 -0
- package/dist/stories/Table/img/Search.png +0 -0
- package/dist/stories/Table/img/SortArrow.js +12 -0
- package/dist/stories/Table/img/SortArrowUp.js +12 -0
- package/dist/stories/Table/img/SortTable.js +14 -0
- package/dist/stories/Table/img/close_icon.svg +7 -0
- package/dist/stories/Table/img/close_white.svg +3 -0
- package/dist/stories/Table/img/context-menu.svg +6 -0
- package/dist/stories/Table/img/contextMenuBtn.png +0 -0
- package/dist/stories/Table/img/delete_icon.svg +8 -0
- package/dist/stories/Table/img/dropFilters.png +0 -0
- package/dist/stories/Table/img/filter.png +0 -0
- package/dist/stories/Table/img/filterDefault.png +0 -0
- package/dist/stories/Table/img/filter_blue.svg +3 -0
- package/dist/stories/Table/img/filter_blue_background.svg +5 -0
- package/dist/stories/Table/img/imageNotFound.svg +3 -0
- package/dist/stories/Table/img/location.svg +3 -0
- package/dist/stories/Table/img/sort_arrow_down.svg +6 -0
- package/dist/stories/Table/img/sort_arrow_up.svg +4 -0
- package/dist/stories/Table/img/sort_table.svg +8 -0
- package/dist/stories/Table/svg_img.js +8 -0
- package/dist/stories/TableBox/TableBox.js +304 -0
- package/dist/stories/TableBox/TableBox.scss +418 -0
- package/dist/stories/TableBox/TableBox.stories.js +124 -0
- package/dist/stories/TableBox/img/delete_icon.svg +9 -0
- package/dist/stories/TableBox/img/forward_icon.svg +9 -0
- package/dist/stories/TableBox/img/more_icon.svg +10 -0
- package/dist/stories/TableBox/img_stories/tag_icon.svg +5 -0
- package/dist/stories/TextareaDynamicPlaceholder/TextareaDynamicPlaceholder.js +91 -0
- package/dist/stories/TextareaDynamicPlaceholder/TextareaDynamicPlaceholder.scss +124 -0
- package/dist/stories/TextareaDynamicPlaceholder/TextareaDynamicPlaceholder.stories.js +29 -0
- package/dist/stories/TitleContentEditable/TitleContentEditable.js +71 -0
- package/dist/stories/TitleContentEditable/TitleContentEditable.scss +69 -0
- package/dist/stories/TitleContentEditable/TitleContentEditable.stories.js +37 -0
- package/dist/stories/ViewSwitch/ViewSwitch.js +48 -0
- package/dist/stories/ViewSwitch/ViewSwitch.scss +135 -0
- package/dist/stories/ViewSwitch/ViewSwitch.stories.js +48 -0
- package/dist/stories/ViewSwitch/img/Chat.js +24 -0
- package/dist/stories/ViewSwitch/img/Table.js +21 -0
- package/dist/stories/ViewSwitch/img/Tile.js +20 -0
- package/dist/stories/ViewSwitch/img/TileLong.js +20 -0
- package/dist/styles/font.scss +93 -0
- package/dist/styles/globals.scss +66 -0
- package/package.json +1 -1
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports["default"] = exports.NoData = exports.Default = void 0;
|
|
7
|
+
var _ArticleMinBox = require("./ArticleMinBox");
|
|
8
|
+
var _addonActions = require("@storybook/addon-actions");
|
|
9
|
+
var _default = exports["default"] = {
|
|
10
|
+
title: 'Article/ArticleMinBox',
|
|
11
|
+
component: _ArticleMinBox.ArticleMinBox,
|
|
12
|
+
parameters: {
|
|
13
|
+
layout: 'centered'
|
|
14
|
+
},
|
|
15
|
+
tags: ['autodocs'],
|
|
16
|
+
argTypes: {
|
|
17
|
+
selectView: {
|
|
18
|
+
options: ['Tile-short', 'Tile-long'],
|
|
19
|
+
control: {
|
|
20
|
+
type: 'radio'
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
},
|
|
24
|
+
args: {
|
|
25
|
+
activeLang: 'rus',
|
|
26
|
+
paginator: /*#__PURE__*/React.createElement("span", null, "paginator"),
|
|
27
|
+
pathBread: 'main',
|
|
28
|
+
onRedirect: (0, _addonActions.action)('onRedirect'),
|
|
29
|
+
showStatus: true
|
|
30
|
+
}
|
|
31
|
+
};
|
|
32
|
+
var NoData = exports.NoData = {
|
|
33
|
+
args: {
|
|
34
|
+
articlesData: {}
|
|
35
|
+
}
|
|
36
|
+
};
|
|
37
|
+
var Default = exports.Default = {
|
|
38
|
+
args: {
|
|
39
|
+
articlesData: {
|
|
40
|
+
"data": [[52, 1, [{
|
|
41
|
+
value: "https://apps1.ecomru.ru:9001/developerimages/52_5_2023-06-20_193005.619110.jpeg",
|
|
42
|
+
alt: ''
|
|
43
|
+
}, {
|
|
44
|
+
value: "https://apps1.ecomru.ru:9001/developerimages/52_6_2023-07-26_205440.922556.jpeg",
|
|
45
|
+
alt: ''
|
|
46
|
+
}], ["\u043D\u043E\u0432\u043E\u0435\n", "/article/novoe/52"], ['Когда селлер, торгующий на маркетплейсе, становится популярнее, ему приходится ежедневно обрабатывать… Когда селлер, торгующий на маркетплейсе, становится популярнее, ему приходится ежедневно обрабатывать…', 'https://google.com'], ["add tag", "\u043C\u0430\u0440\u043A\u0435\u0442\u0438\u043D\u0433"], "07 Mar 2023", "-", 1, 194, ["https://dl.ecomru.ru/service-files/account_status_ok.png", "Active"]], [51, 3, [null], ["\u0411\u0438\u043E\u044D\u043B\u0435\u043A\u0442\u0440\u043E\u043D\u0438\u043A\u0430: \u041F\u0435\u0447\u0430\u0442\u043D\u044B\u0435 \u043F\u043B\u0430\u0442\u044B \u0438\u0437 \u0447\u0430\u0439\u043D\u043E\u0433\u043E \u0433\u0440\u0438\u0431\u0430", "/article/bioelektronika-pechatnye-platy-iz-chainogo-griba/51"], ['Когда селлер, торгующий на маркетплейсе, становится популярнее, ему приходится ежедневно обрабатывать… Когда селлер, торгующий на маркетплейсе, становится популярнее, ему приходится ежедневно обрабатывать…', 'https://google.com'], ["test tag", "\u043C\u0430\u0440\u043A\u0435\u0442\u0438\u043D\u0433"], "08 Mar 2023", "ES", 1, 66, ["https://dl.ecomru.ru/service-files/account_status_ok.png", "Active"]], [79, 1, [null], ["\u0411\u0438\u043E\u044D\u043B\u0435\u043A\u0442\u0440\u043E\u043D\u0438\u043A\u0430: \u041F\u0435\u0447\u0430\u0442\u043D\u044B\u0435 \u043F\u043B\u0430\u0442\u044B \u0438\u0437 \u0447\u0430\u0439\u043D\u043E\u0433\u043E \u0433\u0440\u0438\u0431\u0430", "/article/bioelektronika-pechatnye-platy-iz-chainogo-griba/79"], null, ["marketing", "\u043C\u0430\u0440\u043A", "\u0442\u0435\u0441\u0442"], "08 Mar 2023", "-", 1, 86, ["https://dl.ecomru.ru/svg-storage/icon-waiting.svg", "Update"]], [72, 2, ["blob:https://redactor.ecomru.ru/32b591ba-91be-4561-9b10-79ff2ad437fa"], ["123214", "/article/123214/72"], null, ["\u043C\u0430\u0440\u043A\u0435\u0442\u0438\u043D\u0433"], "08 Mar 2023", "kn", 1, 39, ["https://dl.ecomru.ru/svg-storage/icon-not-published.svg", "Redact"]], [105, 1, [null], ["edit", "/article/edit/105"], null, ["marketing", "\u043C\u0430\u0440\u043A"], "08 Mar 2023", "-", 1, 75, ["https://dl.ecomru.ru/svg-storage/icon-not-published.svg", "Redact"]], [55, 1, [null], ["\u0411\u0438\u043E\u044D\u043B\u0435\u043A\u0442\u0440\u043E\u043D\u0438\u043A\u0430: \u041F\u0435\u0447\u0430\u0442\u043D\u044B\u0435 \u043F\u043B\u0430\u0442\u044B \u0438\u0437 \u0447\u0430\u0439\u043D\u043E\u0433\u043E \u0433\u0440\u0438\u0431\u0430", "/article/bioelektronika-pechatnye-platy-iz-chainogo-griba/55"], ['Когда селлер, торгующий на маркетплейсе, становится популярнее, ему приходится ежедневно обрабатывать… Когда селлер, торгующий на маркетплейсе, становится популярнее, ему приходится ежедневно обрабатывать…', 'https://google.com'], ["t1", "t3", "\u043C\u0430\u0440\u043A\u0435\u0442\u0438\u043D\u0433"], "08 Mar 2023", "-", 1, 41, ["https://dl.ecomru.ru/svg-storage/icon-not-published.svg", "Redact"]], [54, 1, [null], ["1trA", "/article/1tra/54"], null, [null], "08 Mar 2023", "ES", 1, 38, ["https://dl.ecomru.ru/service-files/account_status_ok.png", "Active"]], [75, 2, [null], ["edited text1 test text", "/article/edited-text1-test-text/75"], ['Когда селлер, торгующий на маркетплейсе, становится популярнее, ему приходится ежедневно обрабатывать… Когда селлер, торгующий на маркетплейсе, становится популярнее, ему приходится ежедневно обрабатывать…', 'https://google.com'], ["\u043C\u0430\u0440\u043A\u0435\u0442\u0438\u043D\u0433", "\u0442\u0435\u0441\u0442"], "08 Mar 2023", "kn", 1, 8, ["https://dl.ecomru.ru/service-files/account_status_ok.png", "Active"]], [92, 1, ["https://habr.com/ru/company/timeweb/blog/719056/"], ["\u0411\u0438\u043E\u044D\u043B\u0435\u043A\u0442\u0440\u043E\u043D\u0438\u043A\u0430: \u041F\u0435\u0447\u0430\u0442\u043D\u044B\u0435 \u043F\u043B\u0430\u0442\u044B \u0438\u0437 \u0447\u0430\u0439\u043D\u043E\u0433\u043E \u0433\u0440\u0438\u0431\u0430", "/article/bioelektronika-pechatnye-platy-iz-chainogo-griba/92"], ['Когда селлер, торгующий на маркетплейсе, становится популярнее, ему приходится ежедневно обрабатывать… Когда селлер, торгующий на маркетплейсе, становится популярнее, ему приходится ежедневно обрабатывать…', 'https://google.com'], ["\u043C\u0430\u0440\u043A\u0435\u0442\u0438\u043D\u0433"], "08 Mar 2023", "\u0412\u0430\u043B\u0435\u0440\u0438\u044F", 1, 29, ["https://dl.ecomru.ru/service-files/account_status_ok.png", "Active"]], [73, 3, ["https://habr.com/ru/company/timeweb/blog/719056/"], ["\u0411\u0438\u043E\u044D\u043B\u0435\u043A\u0442\u0440\u043E\u043D\u0438\u043A\u0430: \u041F\u0435\u0447\u0430\u0442\u043D\u044B\u0435 \u043F\u043B\u0430\u0442\u044B \u0438\u0437 \u0447\u0430\u0439\u043D\u043E\u0433\u043E \u0433\u0440\u0438\u0431\u0430", "/article/bioelektronika-pechatnye-platy-iz-chainogo-griba/73"], ['Когда селлер, торгующий на маркетплейсе, становится популярнее, ему приходится ежедневно обрабатывать… Когда селлер, торгующий на маркетплейсе, становится популярнее, ему приходится ежедневно обрабатывать…', 'https://google.com'], ["test tag"], "08 Mar 2023", "\u0412\u0430\u043B\u0435\u0440\u0438\u044F", 1, 10, ["https://dl.ecomru.ru/service-files/account_status_ok.png", "Active"]]],
|
|
47
|
+
"labels": {
|
|
48
|
+
"header": ["id", "portal_id", "\u0424\u043E\u0442\u043E", "\u041D\u0430\u0437\u0432\u0430\u043D\u0438\u0435", "Аннотация", "\u0422\u0435\u0433\u0438", "\u0414\u0430\u0442\u0430 \u043F\u0443\u0431\u043B\u0438\u043A\u0430\u0446\u0438\u0438", "\u0410\u0432\u0442\u043E\u0440", "\u0412\u0440\u0435\u043C\u044F \u0447\u0442\u0435\u043D\u0438\u044F", "\u041A\u043E\u043B\u0438\u0447\u0435\u0441\u0442\u0432\u043E \u043F\u0440\u043E\u0441\u043C\u043E\u0442\u0440\u043E\u0432", "Статус"],
|
|
49
|
+
"type": ["hidden", "hidden", "image", "textWithLink", "text", "stringLayers", "date", "text", "text", "text", "imageWithText"]
|
|
50
|
+
},
|
|
51
|
+
"total": 69
|
|
52
|
+
},
|
|
53
|
+
selectView: 'Tile-short',
|
|
54
|
+
hideInfo: false
|
|
55
|
+
}
|
|
56
|
+
};
|
|
@@ -0,0 +1,143 @@
|
|
|
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 _headers = _interopRequireDefault(require("../../common/headers"));
|
|
9
|
+
var _NoArticles = _interopRequireDefault(require("./../NoArticles/NoArticles"));
|
|
10
|
+
var _LongTileArticleBox = _interopRequireDefault(require("./../LongTileArticleBox/LongTileArticleBox"));
|
|
11
|
+
var _ShortTileArticleBox = _interopRequireDefault(require("./../ShortTileArticleBox/ShortTileArticleBox"));
|
|
12
|
+
var _reactSpinners = require("react-spinners");
|
|
13
|
+
var _utils = require("../../common/utils");
|
|
14
|
+
var _fetchUrls = require("../../common/fetchUrls");
|
|
15
|
+
var _react = require("react");
|
|
16
|
+
require("./BasicSelection.scss");
|
|
17
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
|
|
18
|
+
function _slicedToArray(r, e) { return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest(); }
|
|
19
|
+
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."); }
|
|
20
|
+
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; } }
|
|
21
|
+
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; }
|
|
22
|
+
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; } }
|
|
23
|
+
function _arrayWithHoles(r) { if (Array.isArray(r)) return r; }
|
|
24
|
+
var BasicSelection = function BasicSelection(_ref) {
|
|
25
|
+
var _ref$activeLang = _ref.activeLang,
|
|
26
|
+
activeLang = _ref$activeLang === void 0 ? 'rus' : _ref$activeLang,
|
|
27
|
+
setSelectedEndLevelValue = _ref.setSelectedEndLevelValue,
|
|
28
|
+
PORTAL_ID = _ref.PORTAL_ID,
|
|
29
|
+
_ref$widthContent = _ref.widthContent,
|
|
30
|
+
widthContent = _ref$widthContent === void 0 ? false : _ref$widthContent;
|
|
31
|
+
var _useState = (0, _react.useState)(false),
|
|
32
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
33
|
+
loading = _useState2[0],
|
|
34
|
+
setLoading = _useState2[1];
|
|
35
|
+
var translateSeeAll = function translateSeeAll() {
|
|
36
|
+
if (activeLang == 'eng') return 'See all results';
|
|
37
|
+
if (activeLang == 'tur') return 'Tüm sonuçları gör';
|
|
38
|
+
return 'Смотреть все результаты';
|
|
39
|
+
};
|
|
40
|
+
var _useState3 = (0, _react.useState)([]),
|
|
41
|
+
_useState4 = _slicedToArray(_useState3, 2),
|
|
42
|
+
articles = _useState4[0],
|
|
43
|
+
setArticles = _useState4[1];
|
|
44
|
+
var fetchArticlesPreview = function fetchArticlesPreview() {
|
|
45
|
+
var abortController = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : new AbortController();
|
|
46
|
+
setLoading(true);
|
|
47
|
+
var url = "".concat(_fetchUrls.RavshanArticlesHttps, "/article/preview");
|
|
48
|
+
var body = JSON.stringify({
|
|
49
|
+
portal_id: PORTAL_ID,
|
|
50
|
+
lang: activeLang
|
|
51
|
+
});
|
|
52
|
+
fetch(url, {
|
|
53
|
+
body: body,
|
|
54
|
+
method: 'POST',
|
|
55
|
+
headers: _headers["default"],
|
|
56
|
+
signal: abortController.signal
|
|
57
|
+
}).then(function (res) {
|
|
58
|
+
return res.json();
|
|
59
|
+
}).then(function (json) {
|
|
60
|
+
setArticles(json);
|
|
61
|
+
})["catch"](function (err) {
|
|
62
|
+
return console.error(err);
|
|
63
|
+
})["finally"](function () {
|
|
64
|
+
return setLoading(false);
|
|
65
|
+
});
|
|
66
|
+
};
|
|
67
|
+
(0, _react.useEffect)(function () {
|
|
68
|
+
var abortController = new AbortController();
|
|
69
|
+
fetchArticlesPreview(abortController);
|
|
70
|
+
setSelectedEndLevelValue(null);
|
|
71
|
+
return function () {
|
|
72
|
+
if (abortController) abortController.abort();
|
|
73
|
+
};
|
|
74
|
+
}, []);
|
|
75
|
+
(0, _react.useEffect)(function () {
|
|
76
|
+
var abortController = new AbortController();
|
|
77
|
+
fetchArticlesPreview(abortController);
|
|
78
|
+
setSelectedEndLevelValue(null);
|
|
79
|
+
return function () {
|
|
80
|
+
if (abortController) abortController.abort();
|
|
81
|
+
};
|
|
82
|
+
}, [activeLang]);
|
|
83
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
84
|
+
className: "basic-selection"
|
|
85
|
+
}, loading ? /*#__PURE__*/React.createElement("div", {
|
|
86
|
+
className: "loader-box"
|
|
87
|
+
}, /*#__PURE__*/React.createElement(_reactSpinners.MoonLoader, {
|
|
88
|
+
className: "loader",
|
|
89
|
+
color: "#7b7b7b",
|
|
90
|
+
speedMultiplier: 0.5,
|
|
91
|
+
size: 65
|
|
92
|
+
})) : /*#__PURE__*/React.createElement(React.Fragment, null, articles.length > 0 ? articles === null || articles === void 0 ? void 0 : articles.map(function (_ref2) {
|
|
93
|
+
var name = _ref2.name,
|
|
94
|
+
article = _ref2.article,
|
|
95
|
+
type = _ref2.type,
|
|
96
|
+
link = _ref2.link;
|
|
97
|
+
return /*#__PURE__*/React.createElement("section", {
|
|
98
|
+
className: "basic-selection__item"
|
|
99
|
+
}, /*#__PURE__*/React.createElement("h2", {
|
|
100
|
+
className: "title"
|
|
101
|
+
}, name), /*#__PURE__*/React.createElement("div", {
|
|
102
|
+
className: "article-group"
|
|
103
|
+
}, article === null || article === void 0 ? void 0 : article.map(function (data) {
|
|
104
|
+
return type == 'длинная плитка' && widthContent > 1000 ? /*#__PURE__*/React.createElement(_LongTileArticleBox["default"], {
|
|
105
|
+
activeLang: activeLang,
|
|
106
|
+
key: data.id,
|
|
107
|
+
id: data.id,
|
|
108
|
+
name: data.cpu,
|
|
109
|
+
author: data.author,
|
|
110
|
+
annotation: data.annotation,
|
|
111
|
+
photoPreview: data === null || data === void 0 ? void 0 : data.value,
|
|
112
|
+
tags: data.tags,
|
|
113
|
+
date: new Date(data.date),
|
|
114
|
+
timeToRead: data.reading_time_min,
|
|
115
|
+
views: data.clicks,
|
|
116
|
+
transliter: function transliter(e) {
|
|
117
|
+
return (0, _utils.transliter)(e);
|
|
118
|
+
},
|
|
119
|
+
pathBread: 'main'
|
|
120
|
+
}) : /*#__PURE__*/React.createElement(_ShortTileArticleBox["default"], {
|
|
121
|
+
activeLang: activeLang,
|
|
122
|
+
key: data.id,
|
|
123
|
+
id: data.id,
|
|
124
|
+
name: data.cpu,
|
|
125
|
+
author: data.author,
|
|
126
|
+
annotation: data.annotation,
|
|
127
|
+
photoPreview: data === null || data === void 0 ? void 0 : data.value,
|
|
128
|
+
tags: data.tags,
|
|
129
|
+
date: new Date(data.date),
|
|
130
|
+
timeToRead: data.reading_time_min,
|
|
131
|
+
views: data.clicks,
|
|
132
|
+
transliter: function transliter(e) {
|
|
133
|
+
return (0, _utils.transliter)(e);
|
|
134
|
+
},
|
|
135
|
+
pathBread: 'main'
|
|
136
|
+
});
|
|
137
|
+
})), /*#__PURE__*/React.createElement(_link["default"], {
|
|
138
|
+
href: "".concat(link),
|
|
139
|
+
className: "link_grey"
|
|
140
|
+
}, translateSeeAll()));
|
|
141
|
+
}) : /*#__PURE__*/React.createElement(_NoArticles["default"], null)));
|
|
142
|
+
};
|
|
143
|
+
var _default = exports["default"] = BasicSelection;
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
.basic-selection {
|
|
2
|
+
display: flex;
|
|
3
|
+
flex-direction: column;
|
|
4
|
+
width: 100%;
|
|
5
|
+
height: 100%;
|
|
6
|
+
gap: 50px;
|
|
7
|
+
|
|
8
|
+
&__item {
|
|
9
|
+
display: flex;
|
|
10
|
+
flex-direction: column;
|
|
11
|
+
width: 100%;
|
|
12
|
+
height: 100%;
|
|
13
|
+
gap: 20px;
|
|
14
|
+
|
|
15
|
+
.title {
|
|
16
|
+
color: #0B110B;
|
|
17
|
+
font-family: NunitoSans;
|
|
18
|
+
font-size: 28px;
|
|
19
|
+
font-style: normal;
|
|
20
|
+
font-weight: 500;
|
|
21
|
+
line-height: 32px;
|
|
22
|
+
letter-spacing: -0.56px;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
.article-group {
|
|
26
|
+
display: flex;
|
|
27
|
+
flex-wrap: wrap;
|
|
28
|
+
width: 100%;
|
|
29
|
+
gap: 10px;
|
|
30
|
+
column-gap: 30px;
|
|
31
|
+
row-gap: 24px;
|
|
32
|
+
|
|
33
|
+
.tile-long .article-min .content-box .title {
|
|
34
|
+
word-break: break-word;
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
.link_grey {
|
|
39
|
+
color: #747F90;
|
|
40
|
+
text-align: right;
|
|
41
|
+
font-family: NunitoSans;
|
|
42
|
+
font-size: 16px;
|
|
43
|
+
font-style: normal;
|
|
44
|
+
font-weight: 600;
|
|
45
|
+
line-height: 24px;
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
@media(max-width: 430px) {
|
|
51
|
+
.basic-selection {
|
|
52
|
+
flex-direction: column;
|
|
53
|
+
row-gap: 6px;
|
|
54
|
+
column-gap: 6px;
|
|
55
|
+
|
|
56
|
+
&__item {
|
|
57
|
+
display: flex;
|
|
58
|
+
flex-direction: column;
|
|
59
|
+
// align-items: center;
|
|
60
|
+
width: 100%;
|
|
61
|
+
height: 100%;
|
|
62
|
+
gap: 20px;
|
|
63
|
+
|
|
64
|
+
.title {
|
|
65
|
+
color: #0B110B;
|
|
66
|
+
font-family: NunitoSans;
|
|
67
|
+
font-size: 26px;
|
|
68
|
+
font-style: normal;
|
|
69
|
+
font-weight: 500;
|
|
70
|
+
line-height: 32px;
|
|
71
|
+
letter-spacing: -0.56px;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
.article-group {
|
|
75
|
+
gap: 6px !important;
|
|
76
|
+
column-gap: 6px !important;
|
|
77
|
+
row-gap: 6px !important;
|
|
78
|
+
|
|
79
|
+
.tile-long .article-min .content-box .title {
|
|
80
|
+
word-break: break-word;
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
.link_grey {
|
|
85
|
+
align-self: center;
|
|
86
|
+
color: #747F90;
|
|
87
|
+
text-align: right;
|
|
88
|
+
font-family: NunitoSans;
|
|
89
|
+
font-size: 16px;
|
|
90
|
+
font-style: normal;
|
|
91
|
+
font-weight: 600;
|
|
92
|
+
line-height: 24px;
|
|
93
|
+
padding-bottom: 20px;
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports["default"] = exports.Default = void 0;
|
|
7
|
+
var _BasicSelection = _interopRequireDefault(require("./BasicSelection"));
|
|
8
|
+
var _addonActions = require("@storybook/addon-actions");
|
|
9
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
|
|
10
|
+
var _default = exports["default"] = {
|
|
11
|
+
title: 'Article/BasicSelection',
|
|
12
|
+
component: _BasicSelection["default"],
|
|
13
|
+
parameters: {
|
|
14
|
+
layout: 'centered'
|
|
15
|
+
},
|
|
16
|
+
args: {
|
|
17
|
+
activeLang: 'rus',
|
|
18
|
+
setSelectedEndLevelValue: (0, _addonActions.action)('setSelectedEndLevelValue'),
|
|
19
|
+
PORTAL_ID: 2,
|
|
20
|
+
widthContent: false
|
|
21
|
+
}
|
|
22
|
+
};
|
|
23
|
+
var Default = exports.Default = {
|
|
24
|
+
render: function render(args) {
|
|
25
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
26
|
+
style: {
|
|
27
|
+
width: '100%',
|
|
28
|
+
height: '100%'
|
|
29
|
+
}
|
|
30
|
+
}, /*#__PURE__*/React.createElement(_BasicSelection["default"], args));
|
|
31
|
+
}
|
|
32
|
+
};
|
|
@@ -0,0 +1,113 @@
|
|
|
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 _home_icon = _interopRequireDefault(require("./img/home_icon.svg"));
|
|
9
|
+
var _router = require("next/router");
|
|
10
|
+
require("./Breadcrumb.scss");
|
|
11
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
|
|
12
|
+
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); }
|
|
13
|
+
function _toConsumableArray(r) { return _arrayWithoutHoles(r) || _iterableToArray(r) || _unsupportedIterableToArray(r) || _nonIterableSpread(); }
|
|
14
|
+
function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
15
|
+
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; } }
|
|
16
|
+
function _iterableToArray(r) { if ("undefined" != typeof Symbol && null != r[Symbol.iterator] || null != r["@@iterator"]) return Array.from(r); }
|
|
17
|
+
function _arrayWithoutHoles(r) { if (Array.isArray(r)) return _arrayLikeToArray(r); }
|
|
18
|
+
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; } // import { transliter } from '../../common/utils';
|
|
19
|
+
// import { useEffect, useState } from 'react';
|
|
20
|
+
var translate = {
|
|
21
|
+
news: {
|
|
22
|
+
rus: 'новостей',
|
|
23
|
+
eng: 'news'
|
|
24
|
+
}
|
|
25
|
+
};
|
|
26
|
+
var Breadcrumb = function Breadcrumb(_ref) {
|
|
27
|
+
var breadcrumbs = _ref.breadcrumbs,
|
|
28
|
+
elementTitle = _ref.elementTitle,
|
|
29
|
+
localizedPath = _ref.localizedPath,
|
|
30
|
+
noPortal = _ref.noPortal,
|
|
31
|
+
firstItem = _ref.firstItem,
|
|
32
|
+
newsCount = _ref.newsCount,
|
|
33
|
+
_ref$activeLang = _ref.activeLang,
|
|
34
|
+
activeLang = _ref$activeLang === void 0 ? 'rus' : _ref$activeLang,
|
|
35
|
+
_ref$hideTitle = _ref.hideTitle,
|
|
36
|
+
hideTitle = _ref$hideTitle === void 0 ? false : _ref$hideTitle,
|
|
37
|
+
paths = _ref.paths,
|
|
38
|
+
setPaths = _ref.setPaths,
|
|
39
|
+
pathsWebName = _ref.pathsWebName,
|
|
40
|
+
setPathsWebName = _ref.setPathsWebName;
|
|
41
|
+
var router = (0, _router.useRouter)();
|
|
42
|
+
var translateMain = function translateMain() {
|
|
43
|
+
if (activeLang == 'eng') return 'Main';
|
|
44
|
+
if (activeLang == 'tur') return 'Ana Sayfa';
|
|
45
|
+
return 'Главная';
|
|
46
|
+
};
|
|
47
|
+
var getPathToLink = function getPathToLink(index) {
|
|
48
|
+
return pathsWebName === null || pathsWebName === void 0 ? void 0 : pathsWebName.filter(function (p) {
|
|
49
|
+
return p;
|
|
50
|
+
}).reduce(function (previous, current, i) {
|
|
51
|
+
return i <= index ? "".concat(previous, "/").concat(current) : previous;
|
|
52
|
+
}, '');
|
|
53
|
+
};
|
|
54
|
+
var onClickHandler = function onClickHandler(item, path) {
|
|
55
|
+
router.push(path);
|
|
56
|
+
if (item === 'main') {
|
|
57
|
+
if (typeof setPaths === 'function') {
|
|
58
|
+
return setPaths([]);
|
|
59
|
+
}
|
|
60
|
+
if (typeof setPathsWebName === 'function') {
|
|
61
|
+
return setPathsWebName([]);
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
var index = paths === null || paths === void 0 ? void 0 : paths.indexOf(item);
|
|
65
|
+
setPaths(function (prev) {
|
|
66
|
+
return index > -1 ? prev === null || prev === void 0 ? void 0 : prev.slice(0, index + 1) : [].concat(_toConsumableArray(prev), [item]);
|
|
67
|
+
});
|
|
68
|
+
setPathsWebName(function (prev) {
|
|
69
|
+
return index > -1 ? prev === null || prev === void 0 ? void 0 : prev.slice(0, index + 1) : [].concat(_toConsumableArray(prev), [item]);
|
|
70
|
+
});
|
|
71
|
+
};
|
|
72
|
+
var mainPath = '/articles/main';
|
|
73
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
74
|
+
className: "header-breadcrumb"
|
|
75
|
+
}, /*#__PURE__*/React.createElement("nav", {
|
|
76
|
+
className: "breadcrumb__nav"
|
|
77
|
+
}, /*#__PURE__*/React.createElement("ul", {
|
|
78
|
+
className: "breadcrumb"
|
|
79
|
+
}, /*#__PURE__*/React.createElement("li", {
|
|
80
|
+
className: "breadcrumb__link",
|
|
81
|
+
onClick: function onClick(e) {
|
|
82
|
+
return onClickHandler('main', mainPath);
|
|
83
|
+
}
|
|
84
|
+
}, /*#__PURE__*/React.createElement("img", _extends({
|
|
85
|
+
className: "img-home"
|
|
86
|
+
}, _home_icon["default"])), /*#__PURE__*/React.createElement(_link["default"], {
|
|
87
|
+
href: mainPath
|
|
88
|
+
}, firstItem ? firstItem : translateMain())), localizedPath && /*#__PURE__*/React.createElement("li", {
|
|
89
|
+
className: "breadcrumb__link"
|
|
90
|
+
}, /*#__PURE__*/React.createElement(_link["default"], {
|
|
91
|
+
href: '/'
|
|
92
|
+
}, localizedPath)), paths === null || paths === void 0 ? void 0 : paths.filter(function (p) {
|
|
93
|
+
return p;
|
|
94
|
+
}).map(function (path, i) {
|
|
95
|
+
var url = "/articles".concat(getPathToLink(i));
|
|
96
|
+
return /*#__PURE__*/React.createElement("li", {
|
|
97
|
+
key: path,
|
|
98
|
+
className: "breadcrumb__link",
|
|
99
|
+
onClick: function onClick(e) {
|
|
100
|
+
return onClickHandler(path, url);
|
|
101
|
+
}
|
|
102
|
+
}, /*#__PURE__*/React.createElement(_link["default"], {
|
|
103
|
+
href: url
|
|
104
|
+
}, path));
|
|
105
|
+
}), elementTitle && /*#__PURE__*/React.createElement("li", {
|
|
106
|
+
className: "element-title"
|
|
107
|
+
}, elementTitle))), !hideTitle && /*#__PURE__*/React.createElement("h2", {
|
|
108
|
+
className: "title"
|
|
109
|
+
}, !hideTitle ? elementTitle ? elementTitle : paths.at(-1) : 'ㅤ', newsCount !== 0 && newsCount !== undefined && newsCount !== null && newsCount !== "" && /*#__PURE__*/React.createElement("span", {
|
|
110
|
+
className: "text_grey"
|
|
111
|
+
}, "".concat(newsCount, " ").concat(translate.news[activeLang]))));
|
|
112
|
+
};
|
|
113
|
+
var _default = exports["default"] = Breadcrumb;
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
.breadcrumb {
|
|
2
|
+
display: flex;
|
|
3
|
+
list-style: none;
|
|
4
|
+
flex-wrap: wrap;
|
|
5
|
+
color: #2B2B46;
|
|
6
|
+
font-family: NunitoSans;
|
|
7
|
+
font-size: 16px;
|
|
8
|
+
font-style: normal;
|
|
9
|
+
font-weight: 400;
|
|
10
|
+
line-height: 20px;
|
|
11
|
+
|
|
12
|
+
&__nav {
|
|
13
|
+
display: block;
|
|
14
|
+
width: 100%;
|
|
15
|
+
height: auto;
|
|
16
|
+
margin-left: auto;
|
|
17
|
+
margin-right: auto;
|
|
18
|
+
color: #AAAAAA;
|
|
19
|
+
font-size: 14px;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
li:last-child {
|
|
23
|
+
&::after {
|
|
24
|
+
display: none;
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
&__link {
|
|
29
|
+
display: flex;
|
|
30
|
+
align-items: center;
|
|
31
|
+
|
|
32
|
+
.img-home {
|
|
33
|
+
margin-right: 8px;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
&::after,
|
|
37
|
+
&::before {
|
|
38
|
+
content: "/";
|
|
39
|
+
display: inline-block;
|
|
40
|
+
// background-image: url("./img/drop-right.svg");
|
|
41
|
+
// background-position: center;
|
|
42
|
+
// background-repeat: no-repeat;
|
|
43
|
+
// width: 6px;
|
|
44
|
+
// height: 12px;
|
|
45
|
+
vertical-align: middle;
|
|
46
|
+
margin-left: 8px;
|
|
47
|
+
margin-right: 8px;
|
|
48
|
+
color: #2B2B46;
|
|
49
|
+
font-family: NunitoSans;
|
|
50
|
+
font-size: 18px;
|
|
51
|
+
font-style: normal;
|
|
52
|
+
font-weight: 400;
|
|
53
|
+
line-height: 22px;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
&::before {
|
|
57
|
+
content: "";
|
|
58
|
+
display: none;
|
|
59
|
+
transform: rotate(180deg);
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
.element-title {
|
|
64
|
+
// color: #88306D;
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
.header-breadcrumb {
|
|
69
|
+
display: flex;
|
|
70
|
+
flex-direction: column;
|
|
71
|
+
gap: 16px;
|
|
72
|
+
|
|
73
|
+
.title {
|
|
74
|
+
color: #2B2B46;
|
|
75
|
+
font-family: "Golos Text";
|
|
76
|
+
font-size: 30px;
|
|
77
|
+
font-style: normal;
|
|
78
|
+
font-weight: 600;
|
|
79
|
+
line-height: 38px;
|
|
80
|
+
|
|
81
|
+
.text_grey {
|
|
82
|
+
display: inline-block;
|
|
83
|
+
margin-left: 16px;
|
|
84
|
+
color: var(--unnamed, #AAA);
|
|
85
|
+
font-family: "Golos Text";
|
|
86
|
+
font-size: 14px;
|
|
87
|
+
font-style: normal;
|
|
88
|
+
font-weight: 400;
|
|
89
|
+
line-height: normal;
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports["default"] = exports.Default = void 0;
|
|
7
|
+
var _Breadcrumb = _interopRequireDefault(require("./Breadcrumb"));
|
|
8
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
|
|
9
|
+
var _default = exports["default"] = {
|
|
10
|
+
title: 'Article/Breadcrumbs',
|
|
11
|
+
component: _Breadcrumb["default"],
|
|
12
|
+
parameters: {
|
|
13
|
+
layout: 'centered'
|
|
14
|
+
},
|
|
15
|
+
args: {
|
|
16
|
+
baseRoute: 'articles',
|
|
17
|
+
breadcrumbs: {
|
|
18
|
+
'portal_name': 'gtcom.io',
|
|
19
|
+
'1level_name': 'services',
|
|
20
|
+
'2level_name': 'parsing'
|
|
21
|
+
},
|
|
22
|
+
elementTitle: 'test article',
|
|
23
|
+
localizedPath: 'статьи',
|
|
24
|
+
// mainRoute: 'main',
|
|
25
|
+
firstItem: undefined,
|
|
26
|
+
newsCount: 15,
|
|
27
|
+
activeLang: 'eng',
|
|
28
|
+
hideTitle: false
|
|
29
|
+
}
|
|
30
|
+
};
|
|
31
|
+
var Default = exports.Default = {};
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
<svg width="8" height="17" viewBox="0 0 8 17" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
+
<path fill-rule="evenodd" clip-rule="evenodd" d="M2.20041 5.23966C2.48226 4.93613 2.95681 4.91856 3.26034 5.20041L6.76034 8.45041C6.91317 8.59232 7 8.79145 7 9C7 9.20856 6.91317 9.40769 6.76034 9.5496L3.26034 12.7996C2.95681 13.0815 2.48226 13.0639 2.20041 12.7603C1.91856 12.4568 1.93613 11.9823 2.23966 11.7004L5.14779 9L2.23966 6.2996C1.93613 6.01775 1.91856 5.5432 2.20041 5.23966Z" fill="#111111"/>
|
|
3
|
+
</svg>
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.ButtonBasic = void 0;
|
|
7
|
+
require("./ButtonBasic.scss");
|
|
8
|
+
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); }
|
|
9
|
+
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); }
|
|
10
|
+
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; }
|
|
11
|
+
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; }
|
|
12
|
+
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; }
|
|
13
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
14
|
+
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); }
|
|
15
|
+
var ButtonBasic = exports.ButtonBasic = function ButtonBasic(_ref) {
|
|
16
|
+
var text = _ref.text,
|
|
17
|
+
_onClick = _ref.onClick,
|
|
18
|
+
_ref$width = _ref.width,
|
|
19
|
+
width = _ref$width === void 0 ? 210 : _ref$width,
|
|
20
|
+
minWidth = _ref.minWidth,
|
|
21
|
+
size = _ref.size,
|
|
22
|
+
_ref$disabled = _ref.disabled,
|
|
23
|
+
disabled = _ref$disabled === void 0 ? false : _ref$disabled,
|
|
24
|
+
props = _ref.props,
|
|
25
|
+
maxWidth = _ref.maxWidth,
|
|
26
|
+
style = _ref.style,
|
|
27
|
+
_ref$blue = _ref.blue,
|
|
28
|
+
blue = _ref$blue === void 0 ? false : _ref$blue,
|
|
29
|
+
_ref$orange = _ref.orange,
|
|
30
|
+
orange = _ref$orange === void 0 ? false : _ref$orange,
|
|
31
|
+
_ref$red = _ref.red,
|
|
32
|
+
red = _ref$red === void 0 ? false : _ref$red,
|
|
33
|
+
_ref$green = _ref.green,
|
|
34
|
+
green = _ref$green === void 0 ? false : _ref$green,
|
|
35
|
+
_ref$whiteBlue = _ref.whiteBlue,
|
|
36
|
+
whiteBlue = _ref$whiteBlue === void 0 ? false : _ref$whiteBlue,
|
|
37
|
+
_ref$violet = _ref.violet,
|
|
38
|
+
violet = _ref$violet === void 0 ? false : _ref$violet,
|
|
39
|
+
_ref$action = _ref.action,
|
|
40
|
+
action = _ref$action === void 0 ? false : _ref$action,
|
|
41
|
+
_ref$whiteGreen = _ref.whiteGreen,
|
|
42
|
+
whiteGreen = _ref$whiteGreen === void 0 ? false : _ref$whiteGreen;
|
|
43
|
+
// Если передан только "width" - то она становится статичной шириной, кнопка не расширяется и не сужается
|
|
44
|
+
// Если передана "minWidth" кнопка становится пластичной и тянется до with(наибольшей ширины), minWidt(наименьшей ширины)
|
|
45
|
+
|
|
46
|
+
var colorClassName = function colorClassName() {
|
|
47
|
+
if (blue) return 'blue-btn';
|
|
48
|
+
if (whiteBlue) return 'white-blue-btn';
|
|
49
|
+
if (green) return 'green-btn';
|
|
50
|
+
if (orange) return 'orange-btn';
|
|
51
|
+
if (red) return 'red-btn';
|
|
52
|
+
if (violet) return 'violet-btn';
|
|
53
|
+
if (action) return 'action-btn';
|
|
54
|
+
if (whiteGreen) return 'white-green-btn';
|
|
55
|
+
};
|
|
56
|
+
return /*#__PURE__*/React.createElement("button", _extends({
|
|
57
|
+
className: "btn-basic ".concat(colorClassName() || 'blue-btn'),
|
|
58
|
+
disabled: disabled,
|
|
59
|
+
style: _objectSpread(_defineProperty({
|
|
60
|
+
minWidth: minWidth ? minWidth : '',
|
|
61
|
+
maxWidth: width,
|
|
62
|
+
height: size ? size : '40px'
|
|
63
|
+
}, "maxWidth", maxWidth ? maxWidth : ''), style),
|
|
64
|
+
onClick: function onClick(e) {
|
|
65
|
+
if (typeof _onClick === 'function') {
|
|
66
|
+
_onClick(e);
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
}, props), text);
|
|
70
|
+
};
|