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,39 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports["default"] = exports.Default = void 0;
|
|
7
|
+
var _LongTileArticleBox = _interopRequireDefault(require("./LongTileArticleBox"));
|
|
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/LongTileArticleBox',
|
|
12
|
+
component: _LongTileArticleBox["default"],
|
|
13
|
+
parameters: {
|
|
14
|
+
layout: 'centered'
|
|
15
|
+
},
|
|
16
|
+
tags: ['autodocs'],
|
|
17
|
+
args: {
|
|
18
|
+
id: 1,
|
|
19
|
+
name: 'Как увеличить продажи',
|
|
20
|
+
author: 'Константиниус Константинопольский',
|
|
21
|
+
annotation: 'Когда селлер, торгующий на маркетплейсе, становится популярнее, ему приходится ежедневно обрабатывать… Когда селлер, торгующий на маркетплейсе, становится популярнее, ему приходится ежедневно обрабатывать…',
|
|
22
|
+
photoPreview: [{
|
|
23
|
+
value: 'https://assets.cdn.personio.de/career-site/header/43501/28ed0d8a9de664d5fdcd5314facf8b51png',
|
|
24
|
+
alt: ''
|
|
25
|
+
}, {
|
|
26
|
+
value: 'https://www.rollingstone.com/wp-content/uploads/2018/06/rs-186804-peripheryjeremysaffer.jpg',
|
|
27
|
+
alt: ''
|
|
28
|
+
}],
|
|
29
|
+
tags: [],
|
|
30
|
+
date: new Date(),
|
|
31
|
+
timeToRead: 100500,
|
|
32
|
+
views: 15,
|
|
33
|
+
statusArray: ["https://dl.ecomru.ru/svg-storage/icon-waiting.svg", "Update"],
|
|
34
|
+
pathBread: 'main',
|
|
35
|
+
onLinkClick: (0, _addonActions.action)('onLinkClick'),
|
|
36
|
+
showStatus: true
|
|
37
|
+
}
|
|
38
|
+
};
|
|
39
|
+
var Default = exports.Default = {};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
<svg width="12" height="12" viewBox="0 0 12 12" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
+
<g id="Group 393">
|
|
3
|
+
<path id="Vector" d="M1.07092 11L11 1" stroke="#4285F4" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round"/>
|
|
4
|
+
<path id="Vector_2" d="M11 11V1H1.07092" stroke="#4285F4" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round"/>
|
|
5
|
+
</g>
|
|
6
|
+
</svg>
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
+
<g id="bx-calendar.svg">
|
|
3
|
+
<path id="Vector" d="M4.6665 7.33331H5.99984V8.66665H4.6665V7.33331ZM4.6665 9.99998H5.99984V11.3333H4.6665V9.99998ZM7.33317 7.33331H8.6665V8.66665H7.33317V7.33331ZM7.33317 9.99998H8.6665V11.3333H7.33317V9.99998ZM9.99984 7.33331H11.3332V8.66665H9.99984V7.33331ZM9.99984 9.99998H11.3332V11.3333H9.99984V9.99998Z" fill="#5D5D75"/>
|
|
4
|
+
<path id="Vector_2" d="M3.33333 14.6666H12.6667C13.402 14.6666 14 14.0686 14 13.3333V3.99998C14 3.26465 13.402 2.66665 12.6667 2.66665H11.3333V1.33331H10V2.66665H6V1.33331H4.66667V2.66665H3.33333C2.598 2.66665 2 3.26465 2 3.99998V13.3333C2 14.0686 2.598 14.6666 3.33333 14.6666ZM12.6667 5.33331L12.6673 13.3333H3.33333V5.33331H12.6667Z" fill="#5D5D75"/>
|
|
5
|
+
</g>
|
|
6
|
+
</svg>
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
+
<g id="bx-copy.svg">
|
|
3
|
+
<path id="Vector" d="M13.3335 1.33331H6.66683C5.9315 1.33331 5.3335 1.93131 5.3335 2.66665V5.33331H2.66683C1.9315 5.33331 1.3335 5.93131 1.3335 6.66665V13.3333C1.3335 14.0686 1.9315 14.6666 2.66683 14.6666H9.3335C10.0688 14.6666 10.6668 14.0686 10.6668 13.3333V10.6666H13.3335C14.0688 10.6666 14.6668 10.0686 14.6668 9.33331V2.66665C14.6668 1.93131 14.0688 1.33331 13.3335 1.33331ZM2.66683 13.3333V6.66665H9.3335L9.33483 13.3333H2.66683ZM13.3335 9.33331H10.6668V6.66665C10.6668 5.93131 10.0688 5.33331 9.3335 5.33331H6.66683V2.66665H13.3335V9.33331Z" fill="#4285F4"/>
|
|
4
|
+
</g>
|
|
5
|
+
</svg>
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
+
<g id="bxl-ok-ru.svg">
|
|
3
|
+
<path id="Vector" d="M7.99044 8.22731C6.10711 8.22731 4.54177 6.66331 4.54177 4.81265C4.54177 2.89798 6.10711 1.33331 7.99111 1.33331C9.93911 1.33331 11.4398 2.89731 11.4398 4.81265C11.4364 5.72135 11.0724 6.59154 10.4277 7.23196C9.78305 7.87238 8.91048 8.23064 8.00177 8.22798L7.99044 8.22731ZM7.99044 3.34465C7.19311 3.34465 6.58644 4.01465 6.58644 4.81331C6.58644 5.61065 7.19311 6.21731 7.99111 6.21731C8.82111 6.21731 9.39577 5.61065 9.39577 4.81331C9.39644 4.01398 8.82111 3.34465 7.99044 3.34465ZM9.36377 11.0686L11.3124 12.952C11.6958 13.366 11.6958 13.9726 11.3124 14.356C10.8978 14.77 10.2584 14.77 9.93911 14.356L7.99111 12.4406L6.10711 14.356C5.91577 14.5473 5.65977 14.6426 5.37177 14.6426C5.14844 14.6426 4.89311 14.5466 4.66911 14.356C4.28577 13.9726 4.28577 13.366 4.66911 12.9513L6.64911 11.068C5.93406 10.8562 5.24813 10.5564 4.60711 10.1753C4.12777 9.91998 4.03244 9.28198 4.28777 8.80265C4.60711 8.32398 5.18177 8.19665 5.69311 8.51598C6.3855 8.93852 7.18096 9.16207 7.99211 9.16207C8.80325 9.16207 9.59871 8.93852 10.2911 8.51598C10.8024 8.19665 11.4084 8.32398 11.6958 8.80265C11.9838 9.28198 11.8551 9.91931 11.4078 10.1753C10.8018 10.5586 10.0991 10.846 9.36444 11.0693L9.36377 11.0686Z" fill="#4285F4"/>
|
|
4
|
+
</g>
|
|
5
|
+
</svg>
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
+
<g id="bx-share.svg">
|
|
3
|
+
<path id="Vector" d="M7.33314 4.7V2.66667C7.33314 2.48986 7.2629 2.32029 7.13787 2.19526C7.01285 2.07024 6.84328 2 6.66647 2C6.49158 2.00074 6.32398 2.07017 6.1998 2.19333L1.53314 6.86C1.47065 6.92198 1.42105 6.99571 1.38721 7.07695C1.35336 7.15819 1.33594 7.24533 1.33594 7.33333C1.33594 7.42134 1.35336 7.50848 1.38721 7.58972C1.42105 7.67096 1.47065 7.74469 1.53314 7.80667L6.1998 12.4733C6.29339 12.5651 6.41194 12.6272 6.54064 12.6519C6.66934 12.6767 6.80247 12.6629 6.9234 12.6124C7.04433 12.5619 7.14769 12.4769 7.22056 12.368C7.29344 12.259 7.33259 12.1311 7.33314 12V9.93333H7.8998C8.95308 9.91762 9.99716 10.1313 10.9596 10.5596C11.922 10.9878 12.7797 11.6204 13.4731 12.4133C13.5567 12.5246 13.673 12.6069 13.8057 12.6487C13.9384 12.6906 14.0809 12.6899 14.2131 12.6467C14.3477 12.6012 14.4643 12.514 14.5459 12.3977C14.6274 12.2814 14.6697 12.142 14.6665 12C14.6665 5.92 9.2798 4.88 7.33314 4.7ZM7.8998 8.58667C7.45391 8.58527 7.00843 8.61423 6.56647 8.67333C6.40864 8.69728 6.26465 8.77706 6.16066 8.89818C6.05667 9.01929 5.99959 9.1737 5.9998 9.33333V10.3933L2.94647 7.33333L5.9998 4.27333V5.33333C5.9998 5.51014 6.07004 5.67971 6.19507 5.80474C6.32009 5.92976 6.48966 6 6.66647 6C7.27314 6 12.0731 6.13333 13.1131 10.2867C11.6036 9.17371 9.77525 8.5775 7.8998 8.58667Z" fill="#4285F4"/>
|
|
4
|
+
</g>
|
|
5
|
+
</svg>
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
<svg width="12" height="13" viewBox="0 0 12 13" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
+
<g id="tag">
|
|
3
|
+
<path id="Vector" fill-rule="evenodd" clip-rule="evenodd" d="M9.79497 6.74318L6.14322 10.4673C6.00336 10.6099 5.81392 10.6903 5.61615 10.6912C5.41838 10.6921 5.22827 10.6132 5.08722 10.4719L1.74972 7.13012C1.60792 6.98794 1.52731 6.79415 1.52562 6.59137C1.52394 6.3886 1.60131 6.19344 1.74072 6.04883L5.39172 2.25589C5.49636 2.14704 5.62122 2.06056 5.759 2.00147C5.89679 1.94239 6.04475 1.91189 6.19422 1.91177H9.37497C9.57389 1.91177 9.76465 1.99234 9.9053 2.13575C10.046 2.27916 10.125 2.47366 10.125 2.67647V5.93183C10.1249 6.08254 10.0958 6.23177 10.0392 6.37099C9.98254 6.5102 9.89956 6.63668 9.79497 6.74318ZM4.58847 1.45142C4.79796 1.23392 5.04785 1.06117 5.32356 0.943262C5.59926 0.825355 5.89525 0.764655 6.19422 0.76471H9.37497C9.87226 0.76471 10.3492 0.966127 10.7008 1.32465C11.0524 1.68318 11.25 2.16944 11.25 2.67647V5.93183C11.25 6.2332 11.1918 6.53163 11.0787 6.81006C10.9656 7.08849 10.7998 7.34146 10.5907 7.55453L6.93822 11.2786C6.58859 11.6349 6.11517 11.8359 5.62091 11.838C5.12666 11.8402 4.65157 11.6433 4.29897 11.2901L0.961474 7.94836C0.606764 7.5931 0.404968 7.10874 0.400468 6.60181C0.395967 6.09487 0.58913 5.60686 0.937474 5.24512L4.58847 1.45294V1.45142ZM7.87497 4.97059C7.62633 4.97059 7.38788 4.86988 7.21206 4.69062C7.03625 4.51136 6.93747 4.26822 6.93747 4.01471C6.93747 3.76119 7.03625 3.51806 7.21206 3.3388C7.38788 3.15954 7.62633 3.05883 7.87497 3.05883C8.12361 3.05883 8.36207 3.15954 8.53789 3.3388C8.7137 3.51806 8.81247 3.76119 8.81247 4.01471C8.81247 4.26822 8.7137 4.51136 8.53789 4.69062C8.36207 4.86988 8.12361 4.97059 7.87497 4.97059Z" fill="#B4B8B4"/>
|
|
4
|
+
</g>
|
|
5
|
+
</svg>
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
+
<g id="bxl-telegram.svg">
|
|
3
|
+
<path id="Vector" d="M13.7766 2.478L1.95657 7.036C1.1499 7.36 1.15457 7.81 1.80857 8.01067L4.84323 8.95734L11.8646 4.52734C12.1966 4.32534 12.4999 4.434 12.2506 4.65534L6.5619 9.78934H6.56057L6.5619 9.79L6.35257 12.918C6.65923 12.918 6.79457 12.7773 6.96657 12.6113L8.44057 11.178L11.5066 13.4427C12.0719 13.754 12.4779 13.594 12.6186 12.9193L14.6312 3.434C14.8372 2.608 14.3159 2.234 13.7766 2.478Z" fill="#4285F4"/>
|
|
4
|
+
</g>
|
|
5
|
+
</svg>
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
+
<g id="bx-time-five.svg">
|
|
3
|
+
<path id="Vector" d="M8.00016 1.33331C4.32416 1.33331 1.3335 4.32398 1.3335 7.99998C1.3335 11.676 4.32416 14.6666 8.00016 14.6666C11.6762 14.6666 14.6668 11.676 14.6668 7.99998C14.6668 4.32398 11.6762 1.33331 8.00016 1.33331ZM8.00016 13.3333C5.0595 13.3333 2.66683 10.9406 2.66683 7.99998C2.66683 5.05931 5.0595 2.66665 8.00016 2.66665C10.9408 2.66665 13.3335 5.05931 13.3335 7.99998C13.3335 10.9406 10.9408 13.3333 8.00016 13.3333Z" fill="#5D5D75"/>
|
|
4
|
+
<path id="Vector_2" d="M8.66683 4.66669H7.3335V8.27602L9.52883 10.4714L10.4715 9.52869L8.66683 7.72402V4.66669Z" fill="#5D5D75"/>
|
|
5
|
+
</g>
|
|
6
|
+
</svg>
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
+
<g id="bx-show-alt.svg">
|
|
3
|
+
<path id="Vector" d="M9.33333 8C8.60333 8 8 7.39667 8 6.66667C8 6.43067 8.06867 6.21133 8.17867 6.018C8.11867 6.01333 8.06133 6 8 6C7.47065 6.00349 6.96397 6.21533 6.58965 6.58965C6.21533 6.96397 6.00349 7.47065 6 8C6 9.09467 6.90533 10 8 10C9.094 10 10 9.09467 10 8C10 7.93867 9.98667 7.88133 9.982 7.82133C9.78867 7.93133 9.56933 8 9.33333 8Z" fill="#5D5D75"/>
|
|
4
|
+
<path id="Vector_2" d="M8.00003 3.33331C2.91136 3.33331 1.38203 7.74465 1.36803 7.78931L1.29736 7.99998L1.36736 8.21065C1.38203 8.25531 2.91136 12.6666 8.00003 12.6666C13.0887 12.6666 14.618 8.25531 14.632 8.21065L14.7027 7.99998L14.6327 7.78931C14.618 7.74465 13.0887 3.33331 8.00003 3.33331ZM8.00003 11.3333C4.4327 11.3333 3.0507 8.76931 2.71603 7.99998C3.05203 7.22798 4.4347 4.66665 8.00003 4.66665C11.5674 4.66665 12.9494 7.23065 13.284 7.99998C12.948 8.77198 11.5654 11.3333 8.00003 11.3333Z" fill="#5D5D75"/>
|
|
5
|
+
</g>
|
|
6
|
+
</svg>
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
+
<g id="bxl-vk.svg">
|
|
3
|
+
<path id="Vector" d="M14.3862 4.56999C14.4795 4.25999 14.3862 4.03265 13.9448 4.03265H12.4828C12.1108 4.03265 11.9408 4.22932 11.8475 4.44532C11.8475 4.44532 11.1042 6.25799 10.0508 7.43332C9.71083 7.77532 9.5555 7.88332 9.37016 7.88332C9.2775 7.88332 9.14283 7.77532 9.14283 7.46532V4.56999C9.14283 4.19799 9.0355 4.03265 8.7255 4.03265H6.42816C6.19616 4.03265 6.05616 4.20465 6.05616 4.36865C6.05616 4.72065 6.58283 4.80199 6.63683 5.79399V7.94599C6.63683 8.41732 6.55216 8.50332 6.3655 8.50332C5.87016 8.50332 4.66483 6.68399 3.9495 4.60132C3.81016 4.19665 3.6695 4.03332 3.29616 4.03332H1.83483C1.41683 4.03332 1.3335 4.22999 1.3335 4.44599C1.3335 4.83399 1.82883 6.75399 3.64083 9.29332C4.84883 11.0273 6.5495 11.9673 8.09883 11.9673C9.0275 11.9673 9.14216 11.7587 9.14216 11.3987V10.088C9.14216 9.67065 9.23083 9.58665 9.52483 9.58665C9.74083 9.58665 10.1128 9.69599 10.9802 10.5313C11.9708 11.522 12.1348 11.9667 12.6915 11.9667H14.1528C14.5702 11.9667 14.7788 11.758 14.6588 11.346C14.5275 10.936 14.0542 10.3393 13.4262 9.63332C13.0848 9.23065 12.5748 8.79732 12.4195 8.58065C12.2028 8.30132 12.2655 8.17799 12.4195 7.92999C12.4202 7.93065 14.2008 5.42265 14.3862 4.56999Z" fill="#4285F4"/>
|
|
4
|
+
</g>
|
|
5
|
+
</svg>
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
+
<g id="bxl-whatsapp.svg">
|
|
3
|
+
<path id="Vector" fill-rule="evenodd" clip-rule="evenodd" d="M12.2687 3.75535C11.7142 3.19728 11.0546 2.75476 10.3279 2.45345C9.60123 2.15214 8.822 1.99802 8.03533 2.00002C4.73667 2.00002 2.05133 4.68469 2.05 7.98469C2.05 9.03935 2.32533 10.0687 2.84867 10.9767L2 14.0774L5.17267 13.2447C6.05026 13.7224 7.03347 13.9729 8.03267 13.9734H8.03533C11.3333 13.9734 14.0187 11.2887 14.02 7.98869C14.0223 7.20234 13.8687 6.42335 13.5681 5.69673C13.2674 4.9701 12.8258 4.31027 12.2687 3.75535ZM8.03533 12.9634H8.03333C7.14234 12.9634 6.26776 12.7237 5.50133 12.2694L5.32 12.1614L3.43733 12.6554L3.93933 10.82L3.82133 10.632C3.32319 9.83897 3.05949 8.92121 3.06067 7.98469C3.062 5.24202 5.29333 3.01069 8.03733 3.01069C8.69083 3.00923 9.33813 3.13741 9.94177 3.38779C10.5454 3.63817 11.0934 4.00578 11.554 4.46935C12.0171 4.93071 12.3841 5.47928 12.6339 6.08335C12.8837 6.68742 13.0113 7.33501 13.0093 7.98869C13.008 10.7314 10.7767 12.9634 8.03533 12.9634ZM10.764 9.23735C10.614 9.16202 9.87933 8.80069 9.742 8.75069C9.60533 8.70069 9.506 8.67602 9.406 8.82535C9.306 8.97469 9.01933 9.31135 8.932 9.41135C8.84467 9.51135 8.75733 9.52335 8.608 9.44869C8.45867 9.37402 7.97667 9.21602 7.40533 8.70669C6.96067 8.31002 6.66067 7.82068 6.57333 7.67069C6.486 7.52069 6.564 7.44002 6.63933 7.36535C6.70667 7.29869 6.78867 7.19069 6.86333 7.10335C6.938 7.01602 6.96267 6.95402 7.01267 6.85402C7.06267 6.75402 7.038 6.66669 7 6.59202C6.96267 6.51669 6.66333 5.78069 6.53867 5.48135C6.418 5.19135 6.29467 5.23002 6.20267 5.22602C6.10738 5.22212 6.01203 5.22034 5.91667 5.22069C5.84084 5.22262 5.76622 5.2402 5.69751 5.27232C5.62879 5.30444 5.56745 5.35041 5.51733 5.40735C5.38 5.55735 4.994 5.91869 4.994 6.65469C4.994 7.39069 5.53 8.10202 5.60467 8.20202C5.67933 8.30202 6.65933 9.81202 8.15933 10.46C8.51667 10.614 8.79533 10.706 9.012 10.7754C9.37 10.8894 9.696 10.8727 9.954 10.8347C10.2413 10.792 10.8387 10.4734 10.9633 10.124C11.088 9.77469 11.088 9.47535 11.0507 9.41269C11.0133 9.35002 10.9127 9.31202 10.764 9.23735Z" fill="#4285F4"/>
|
|
4
|
+
</g>
|
|
5
|
+
</svg>
|
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.ModalArticleAddElement = void 0;
|
|
7
|
+
var _react = require("react");
|
|
8
|
+
var _ArticleElement = require("../Article/ArticleElement");
|
|
9
|
+
require("./ModalArticleAddElement.scss");
|
|
10
|
+
function _slicedToArray(r, e) { return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest(); }
|
|
11
|
+
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."); }
|
|
12
|
+
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; } }
|
|
13
|
+
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; }
|
|
14
|
+
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; } }
|
|
15
|
+
function _arrayWithHoles(r) { if (Array.isArray(r)) return r; }
|
|
16
|
+
var ModalArticleAddElement = exports.ModalArticleAddElement = function ModalArticleAddElement(_ref) {
|
|
17
|
+
var onAddClick = _ref.onAddClick,
|
|
18
|
+
setShowModal = _ref.setShowModal;
|
|
19
|
+
var _useState = (0, _react.useState)(_ArticleElement.ARTICLE_TYPES.description),
|
|
20
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
21
|
+
selectedType = _useState2[0],
|
|
22
|
+
setSelectedType = _useState2[1];
|
|
23
|
+
var onRadioChange = function onRadioChange(type) {
|
|
24
|
+
setSelectedType(type);
|
|
25
|
+
};
|
|
26
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
27
|
+
className: "blackout"
|
|
28
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
29
|
+
className: "modal-article-add-element"
|
|
30
|
+
}, /*#__PURE__*/React.createElement("button", {
|
|
31
|
+
className: "btn__close",
|
|
32
|
+
onClick: function onClick() {
|
|
33
|
+
return setShowModal(false);
|
|
34
|
+
}
|
|
35
|
+
}), /*#__PURE__*/React.createElement("h3", {
|
|
36
|
+
className: "title"
|
|
37
|
+
}, "\u0414\u043E\u0431\u0430\u0432\u0438\u0442\u044C"), /*#__PURE__*/React.createElement("div", {
|
|
38
|
+
className: "modal-article-add-element__content"
|
|
39
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
40
|
+
className: "checkbox-item-box"
|
|
41
|
+
}, /*#__PURE__*/React.createElement("input", {
|
|
42
|
+
id: "description",
|
|
43
|
+
checked: selectedType === _ArticleElement.ARTICLE_TYPES.description,
|
|
44
|
+
onChange: function onChange() {
|
|
45
|
+
return onRadioChange(_ArticleElement.ARTICLE_TYPES.description);
|
|
46
|
+
},
|
|
47
|
+
className: "radio",
|
|
48
|
+
type: "radio",
|
|
49
|
+
radioGroup: "article"
|
|
50
|
+
}), /*#__PURE__*/React.createElement("label", {
|
|
51
|
+
htmlFor: "description",
|
|
52
|
+
className: "text"
|
|
53
|
+
}, "\u0422\u0435\u043A\u0441\u0442 ", /*#__PURE__*/React.createElement("span", {
|
|
54
|
+
className: "text_grey"
|
|
55
|
+
}, "(\u043E\u0441\u043D\u043E\u0432\u043D\u043E\u0439 \u0442\u0435\u043A\u0441\u0442)"))), /*#__PURE__*/React.createElement("div", {
|
|
56
|
+
className: "checkbox-item-box"
|
|
57
|
+
}, /*#__PURE__*/React.createElement("input", {
|
|
58
|
+
id: "header",
|
|
59
|
+
checked: selectedType === _ArticleElement.ARTICLE_TYPES.header,
|
|
60
|
+
onChange: function onChange() {
|
|
61
|
+
return onRadioChange(_ArticleElement.ARTICLE_TYPES.header);
|
|
62
|
+
},
|
|
63
|
+
className: "radio",
|
|
64
|
+
type: "radio",
|
|
65
|
+
radioGroup: "article"
|
|
66
|
+
}), /*#__PURE__*/React.createElement("label", {
|
|
67
|
+
htmlFor: "header",
|
|
68
|
+
className: "text"
|
|
69
|
+
}, "\u0422\u0435\u043A\u0441\u0442 ", /*#__PURE__*/React.createElement("span", {
|
|
70
|
+
className: "text_grey"
|
|
71
|
+
}, "(\u0437\u0430\u0433\u043E\u043B\u043E\u0432\u043E\u043A)"))), /*#__PURE__*/React.createElement("div", {
|
|
72
|
+
className: "checkbox-item-box"
|
|
73
|
+
}, /*#__PURE__*/React.createElement("input", {
|
|
74
|
+
id: "image",
|
|
75
|
+
checked: selectedType === _ArticleElement.ARTICLE_TYPES.image,
|
|
76
|
+
onChange: function onChange() {
|
|
77
|
+
return onRadioChange(_ArticleElement.ARTICLE_TYPES.image);
|
|
78
|
+
},
|
|
79
|
+
className: "radio",
|
|
80
|
+
type: "radio",
|
|
81
|
+
radioGroup: "article"
|
|
82
|
+
}), /*#__PURE__*/React.createElement("label", {
|
|
83
|
+
htmlFor: "image",
|
|
84
|
+
className: "text"
|
|
85
|
+
}, "\u0418\u0437\u043E\u0431\u0440\u0430\u0436\u0435\u043D\u0438\u0435 ", /*#__PURE__*/React.createElement("span", {
|
|
86
|
+
className: "text_grey"
|
|
87
|
+
}, "(\u0444\u0430\u0439\u043B \u0432 \u0444\u043E\u0440\u043C\u0430\u0442\u0435 jpg, jpeg, png)"))), /*#__PURE__*/React.createElement("div", {
|
|
88
|
+
className: "checkbox-item-box"
|
|
89
|
+
}, /*#__PURE__*/React.createElement("input", {
|
|
90
|
+
id: "warning",
|
|
91
|
+
checked: selectedType === _ArticleElement.ARTICLE_TYPES.warningBlock,
|
|
92
|
+
onChange: function onChange() {
|
|
93
|
+
return onRadioChange(_ArticleElement.ARTICLE_TYPES.warningBlock);
|
|
94
|
+
},
|
|
95
|
+
className: "radio",
|
|
96
|
+
type: "radio",
|
|
97
|
+
radioGroup: "article"
|
|
98
|
+
}), /*#__PURE__*/React.createElement("label", {
|
|
99
|
+
htmlFor: "warning",
|
|
100
|
+
className: "text"
|
|
101
|
+
}, "\u0420\u0435\u043A\u043E\u043C\u0435\u043D\u0434\u0430\u0446\u0438\u044E ", /*#__PURE__*/React.createElement("span", {
|
|
102
|
+
className: "text_grey"
|
|
103
|
+
}, "(\u0442\u0435\u043A\u0441\u0442 \u043F\u043E\u043C\u0435\u0449\u0435\u043D \u0432 \u043E\u0442\u0434\u0435\u043B\u044C\u043D\u044B\u0439 \u0431\u043B\u043E\u043A \u0438 \u0432\u044B\u0434\u0435\u043B\u0435\u043D \u0446\u0432\u0435\u0442\u043E\u043C)"))), /*#__PURE__*/React.createElement("div", {
|
|
104
|
+
className: "checkbox-item-box"
|
|
105
|
+
}, /*#__PURE__*/React.createElement("input", {
|
|
106
|
+
id: "form",
|
|
107
|
+
checked: selectedType === _ArticleElement.ARTICLE_TYPES.formBtn,
|
|
108
|
+
onChange: function onChange() {
|
|
109
|
+
return onRadioChange(_ArticleElement.ARTICLE_TYPES.formBtn);
|
|
110
|
+
},
|
|
111
|
+
className: "radio",
|
|
112
|
+
type: "radio",
|
|
113
|
+
radioGroup: "article"
|
|
114
|
+
}), /*#__PURE__*/React.createElement("label", {
|
|
115
|
+
htmlFor: "form",
|
|
116
|
+
className: "text"
|
|
117
|
+
}, "\u0424\u043E\u0440\u043C\u0443 ", /*#__PURE__*/React.createElement("span", {
|
|
118
|
+
className: "text_grey"
|
|
119
|
+
}, "(\u0424\u043E\u0440\u043C\u0430 \u0437\u0430\u0445\u0432\u0430\u0442\u0430 \u0432 \u043C\u043E\u0434\u0430\u043B\u044C\u043D\u043E\u043C \u043E\u043A\u043D\u0435, \u043E\u0442\u043A\u0440\u044B\u0432\u0430\u044E\u0449\u0430\u044F\u0441\u044F \u043F\u043E \u043D\u0430\u0436\u0430\u0442\u0438\u044E \u043D\u0430 \u043A\u043D\u043E\u043F\u043A\u0443)")))), /*#__PURE__*/React.createElement("div", {
|
|
120
|
+
className: "btn-box"
|
|
121
|
+
}, /*#__PURE__*/React.createElement("button", {
|
|
122
|
+
onClick: function onClick() {
|
|
123
|
+
onAddClick(selectedType);
|
|
124
|
+
setShowModal(false);
|
|
125
|
+
},
|
|
126
|
+
className: "btn__green"
|
|
127
|
+
}, "\u0414\u043E\u0431\u0430\u0432\u0438\u0442\u044C \u044D\u043B\u0435\u043C\u0435\u043D\u0442"))));
|
|
128
|
+
};
|
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
.blackout {
|
|
2
|
+
position: fixed;
|
|
3
|
+
top: 0;
|
|
4
|
+
left: 0;
|
|
5
|
+
bottom: 0;
|
|
6
|
+
right: 0;
|
|
7
|
+
z-index: 10;
|
|
8
|
+
min-height: 100vh;
|
|
9
|
+
overflow: auto;
|
|
10
|
+
|
|
11
|
+
&::before {
|
|
12
|
+
content: "";
|
|
13
|
+
display: block;
|
|
14
|
+
top: 0;
|
|
15
|
+
left: 0;
|
|
16
|
+
right: 0;
|
|
17
|
+
bottom: 0;
|
|
18
|
+
background-color: rgba(0, 0, 0, 0.3);
|
|
19
|
+
position: absolute;
|
|
20
|
+
z-index: 1000;
|
|
21
|
+
opacity: 0.3;
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
.modal-article-add-element {
|
|
26
|
+
max-width: 560px;
|
|
27
|
+
min-width: 560px;
|
|
28
|
+
min-height: 360px;
|
|
29
|
+
height: auto;
|
|
30
|
+
margin-top: 160px;
|
|
31
|
+
position: absolute;
|
|
32
|
+
left: calc(50% - 280px);
|
|
33
|
+
border-radius: 16px;
|
|
34
|
+
background-color: rgb(255, 255, 255);
|
|
35
|
+
padding: 24px 40px;
|
|
36
|
+
display: flex;
|
|
37
|
+
flex-direction: column;
|
|
38
|
+
align-items: center;
|
|
39
|
+
z-index: 5000;
|
|
40
|
+
|
|
41
|
+
.btn__close {
|
|
42
|
+
position: absolute;
|
|
43
|
+
display: block;
|
|
44
|
+
width: 20px;
|
|
45
|
+
height: 20px;
|
|
46
|
+
background-repeat: no-repeat;
|
|
47
|
+
border: none;
|
|
48
|
+
background-color: unset;
|
|
49
|
+
background-image: url('https://dl.ecomru.ru/svg-storage/close.svg');
|
|
50
|
+
right: 1.5em;
|
|
51
|
+
top: 25px;
|
|
52
|
+
cursor: pointer;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
.title {
|
|
56
|
+
font-size: 16px;
|
|
57
|
+
font-weight: 500;
|
|
58
|
+
padding: 0;
|
|
59
|
+
margin-top: 32px;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
.radio {
|
|
63
|
+
cursor: pointer;
|
|
64
|
+
background-color: white;
|
|
65
|
+
color: black;
|
|
66
|
+
-webkit-appearance: none;
|
|
67
|
+
-moz-appearance: none;
|
|
68
|
+
appearance: none;
|
|
69
|
+
border-radius: 50%;
|
|
70
|
+
width: 16px;
|
|
71
|
+
min-width: 16px;
|
|
72
|
+
height: 16px;
|
|
73
|
+
|
|
74
|
+
border: 1px solid #999;
|
|
75
|
+
outline: none;
|
|
76
|
+
position: relative;
|
|
77
|
+
top: 4px;
|
|
78
|
+
&:checked {
|
|
79
|
+
cursor: pointer;
|
|
80
|
+
min-width: 16px;
|
|
81
|
+
width: 16px;
|
|
82
|
+
height: 16px;
|
|
83
|
+
border: 4px solid #FBCD10;
|
|
84
|
+
background-color: black;
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
&__content {
|
|
89
|
+
display: flex;
|
|
90
|
+
flex-direction: column;
|
|
91
|
+
width: auto;
|
|
92
|
+
gap: 40px;
|
|
93
|
+
margin-top: 40px;
|
|
94
|
+
|
|
95
|
+
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
.btn-box {
|
|
99
|
+
display: flex;
|
|
100
|
+
justify-content: center;
|
|
101
|
+
width: 100%;
|
|
102
|
+
margin-top: 40px;
|
|
103
|
+
|
|
104
|
+
.btn__green {
|
|
105
|
+
max-width: 200px;
|
|
106
|
+
margin: 0;
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
.checkbox-item-box {
|
|
111
|
+
display: flex;
|
|
112
|
+
gap: 24px;
|
|
113
|
+
|
|
114
|
+
.text {
|
|
115
|
+
font-size: 14px;
|
|
116
|
+
margin-top: 0;
|
|
117
|
+
|
|
118
|
+
.text_grey {
|
|
119
|
+
font-size: 14px;
|
|
120
|
+
color: #AAAAAA;
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports["default"] = exports.Modal = void 0;
|
|
7
|
+
var _addonActions = require("@storybook/addon-actions");
|
|
8
|
+
var _ModalArticleAddElement = require("./ModalArticleAddElement");
|
|
9
|
+
var _default = exports["default"] = {
|
|
10
|
+
title: 'Article/ModalArticleAddElement',
|
|
11
|
+
component: _ModalArticleAddElement.ModalArticleAddElement,
|
|
12
|
+
parameters: {
|
|
13
|
+
layout: 'centered'
|
|
14
|
+
},
|
|
15
|
+
args: {
|
|
16
|
+
onAddClick: (0, _addonActions.action)('onAddClick')
|
|
17
|
+
}
|
|
18
|
+
};
|
|
19
|
+
var Modal = exports.Modal = {};
|
|
@@ -0,0 +1,236 @@
|
|
|
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["default"] = void 0;
|
|
8
|
+
var _done_icon = _interopRequireDefault(require("./img/done_icon.svg"));
|
|
9
|
+
var _close_icon = _interopRequireDefault(require("./img/close_icon.svg"));
|
|
10
|
+
var _DownSelector = _interopRequireDefault(require("../DropDownSelector/DownSelector"));
|
|
11
|
+
var _InputDinamycPlaceholder = _interopRequireDefault(require("../InputDinamycPlaceholder/InputDinamycPlaceholder"));
|
|
12
|
+
var _TextareaDynamicPlaceholder = _interopRequireDefault(require("../TextareaDynamicPlaceholder/TextareaDynamicPlaceholder"));
|
|
13
|
+
var _ButtonBasic = require("../ButtonBasic/ButtonBasic");
|
|
14
|
+
var _validationFunc = require("../../common/validationFunc");
|
|
15
|
+
var _react = require("react");
|
|
16
|
+
require("./ModalBitrixForm.scss");
|
|
17
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
|
|
18
|
+
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); }
|
|
19
|
+
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; }
|
|
20
|
+
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; }
|
|
21
|
+
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; }
|
|
22
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
23
|
+
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); }
|
|
24
|
+
function _toConsumableArray(r) { return _arrayWithoutHoles(r) || _iterableToArray(r) || _unsupportedIterableToArray(r) || _nonIterableSpread(); }
|
|
25
|
+
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."); }
|
|
26
|
+
function _iterableToArray(r) { if ("undefined" != typeof Symbol && null != r[Symbol.iterator] || null != r["@@iterator"]) return Array.from(r); }
|
|
27
|
+
function _arrayWithoutHoles(r) { if (Array.isArray(r)) return _arrayLikeToArray(r); }
|
|
28
|
+
function _slicedToArray(r, e) { return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest(); }
|
|
29
|
+
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."); }
|
|
30
|
+
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; } }
|
|
31
|
+
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; }
|
|
32
|
+
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; } }
|
|
33
|
+
function _arrayWithHoles(r) { if (Array.isArray(r)) return r; }
|
|
34
|
+
var ModalBitrixForm = function ModalBitrixForm(_ref) {
|
|
35
|
+
var setIsModal = _ref.setIsModal,
|
|
36
|
+
inputArr = _ref.inputArr,
|
|
37
|
+
formTitle = _ref.formTitle,
|
|
38
|
+
subTitle = _ref.subTitle,
|
|
39
|
+
bitrixToken = _ref.bitrixToken,
|
|
40
|
+
_ref$modal = _ref.modal,
|
|
41
|
+
modal = _ref$modal === void 0 ? true : _ref$modal,
|
|
42
|
+
_ref$colorBtn = _ref.colorBtn,
|
|
43
|
+
colorBtn = _ref$colorBtn === void 0 ? 'green' : _ref$colorBtn,
|
|
44
|
+
_ref$btnName = _ref.btnName,
|
|
45
|
+
btnName = _ref$btnName === void 0 ? false : _ref$btnName;
|
|
46
|
+
var _useState = (0, _react.useState)({}),
|
|
47
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
48
|
+
inputValue = _useState2[0],
|
|
49
|
+
setInputValue = _useState2[1];
|
|
50
|
+
var _useState3 = (0, _react.useState)([]),
|
|
51
|
+
_useState4 = _slicedToArray(_useState3, 2),
|
|
52
|
+
selectedValue = _useState4[0],
|
|
53
|
+
setSelectedValue = _useState4[1];
|
|
54
|
+
var _useState5 = (0, _react.useState)({}),
|
|
55
|
+
_useState6 = _slicedToArray(_useState5, 2),
|
|
56
|
+
err = _useState6[0],
|
|
57
|
+
setErr = _useState6[1];
|
|
58
|
+
var _useState7 = (0, _react.useState)([]),
|
|
59
|
+
_useState8 = _slicedToArray(_useState7, 2),
|
|
60
|
+
inputs = _useState8[0],
|
|
61
|
+
setInputs = _useState8[1];
|
|
62
|
+
var _useState9 = (0, _react.useState)(false),
|
|
63
|
+
_useState10 = _slicedToArray(_useState9, 2),
|
|
64
|
+
successfulResponse = _useState10[0],
|
|
65
|
+
setsuccessfulResponse = _useState10[1];
|
|
66
|
+
var fetchTest = function fetchTest() {
|
|
67
|
+
var _Object$entries;
|
|
68
|
+
var queries = (_Object$entries = Object.entries(inputValue)) === null || _Object$entries === void 0 || (_Object$entries = _Object$entries.map(function (_ref2) {
|
|
69
|
+
var _ref3 = _slicedToArray(_ref2, 2),
|
|
70
|
+
key = _ref3[0],
|
|
71
|
+
value = _ref3[1];
|
|
72
|
+
if (key == 'FIELDS[TITLE]') {
|
|
73
|
+
return "".concat(key, "=").concat(value + ' // ' + inputValue['FIELDS[NAME]']);
|
|
74
|
+
}
|
|
75
|
+
if (key == 'FIELDS[COMMENTS]') {
|
|
76
|
+
return selectedValue !== null && selectedValue !== void 0 && selectedValue.label ? "".concat(key, "=\u0422\u0438\u043F \u043F\u0430\u0440\u0442\u043D\u0435\u0440\u0430: ").concat(selectedValue === null || selectedValue === void 0 ? void 0 : selectedValue.label, " // ").concat(value) : "".concat(key, "=").concat(value);
|
|
77
|
+
} else return "".concat(key, "=").concat(value);
|
|
78
|
+
})) === null || _Object$entries === void 0 ? void 0 : _Object$entries.join('&');
|
|
79
|
+
var testUrl = "https://ecs.bitrix24.ru/rest/1/".concat(bitrixToken, "/crm.lead.add.json?").concat(queries);
|
|
80
|
+
fetch(testUrl).then(function (res) {
|
|
81
|
+
return res.json();
|
|
82
|
+
}).then(function (json) {
|
|
83
|
+
if (json !== null && json !== void 0 && json.result) {
|
|
84
|
+
setsuccessfulResponse(true);
|
|
85
|
+
}
|
|
86
|
+
})["catch"](function (err) {
|
|
87
|
+
return console.error(err);
|
|
88
|
+
});
|
|
89
|
+
};
|
|
90
|
+
var handleChange = function handleChange(e, id) {
|
|
91
|
+
// setInputValue(prev => ({ ...prev, [id]: e?.value }))
|
|
92
|
+
setSelectedValue(e);
|
|
93
|
+
};
|
|
94
|
+
(0, _react.useEffect)(function () {
|
|
95
|
+
setInputs(_toConsumableArray(inputArr === null || inputArr === void 0 ? void 0 : inputArr.map(function (_ref4, ind) {
|
|
96
|
+
var id = _ref4.id,
|
|
97
|
+
placeholder = _ref4.placeholder,
|
|
98
|
+
hidden = _ref4.hidden,
|
|
99
|
+
value = _ref4.value,
|
|
100
|
+
inputType = _ref4.inputType,
|
|
101
|
+
options_prop = _ref4.options_prop,
|
|
102
|
+
type = _ref4.type,
|
|
103
|
+
required = _ref4.required;
|
|
104
|
+
if (hidden) {
|
|
105
|
+
setInputValue(function (prev) {
|
|
106
|
+
return _objectSpread(_objectSpread({}, prev), {}, _defineProperty({}, id, value));
|
|
107
|
+
});
|
|
108
|
+
return;
|
|
109
|
+
}
|
|
110
|
+
if (type == 'textarea') {
|
|
111
|
+
return /*#__PURE__*/React.createElement(_TextareaDynamicPlaceholder["default"], {
|
|
112
|
+
width: "100%",
|
|
113
|
+
changeValue: inputValue === null || inputValue === void 0 ? void 0 : inputValue[id],
|
|
114
|
+
onChange: function onChange(e) {
|
|
115
|
+
return setInputValue(function (prev) {
|
|
116
|
+
return _objectSpread(_objectSpread({}, prev), {}, _defineProperty({}, id, e));
|
|
117
|
+
});
|
|
118
|
+
},
|
|
119
|
+
required: required,
|
|
120
|
+
placeholder: placeholder
|
|
121
|
+
});
|
|
122
|
+
}
|
|
123
|
+
if (type == 'dropdown') {
|
|
124
|
+
return /*#__PURE__*/React.createElement(_DownSelector["default"], {
|
|
125
|
+
options_prop: options_prop,
|
|
126
|
+
state: selectedValue,
|
|
127
|
+
setState: function setState(e) {
|
|
128
|
+
handleChange(e, id);
|
|
129
|
+
},
|
|
130
|
+
err: err === null || err === void 0 ? void 0 : err[id],
|
|
131
|
+
required: required,
|
|
132
|
+
placeholder: placeholder,
|
|
133
|
+
size: "l",
|
|
134
|
+
width: "100%"
|
|
135
|
+
});
|
|
136
|
+
}
|
|
137
|
+
if (type == 'input') {
|
|
138
|
+
return /*#__PURE__*/React.createElement(_InputDinamycPlaceholder["default"], {
|
|
139
|
+
key: id,
|
|
140
|
+
type: inputType ? inputType : 'text',
|
|
141
|
+
placeholder: placeholder,
|
|
142
|
+
changeValue: inputValue === null || inputValue === void 0 ? void 0 : inputValue[id],
|
|
143
|
+
onChange: function onChange(e) {
|
|
144
|
+
return setInputValue(function (prev) {
|
|
145
|
+
return _objectSpread(_objectSpread({}, prev), {}, _defineProperty({}, id, e));
|
|
146
|
+
});
|
|
147
|
+
},
|
|
148
|
+
autoComplete: false,
|
|
149
|
+
err: err === null || err === void 0 ? void 0 : err[id],
|
|
150
|
+
required: required,
|
|
151
|
+
textErr: err === null || err === void 0 ? void 0 : err[id]
|
|
152
|
+
});
|
|
153
|
+
}
|
|
154
|
+
})));
|
|
155
|
+
}, [inputArr, err, selectedValue]);
|
|
156
|
+
var validationFields = function validationFields() {
|
|
157
|
+
setErr({});
|
|
158
|
+
var error = {};
|
|
159
|
+
inputArr === null || inputArr === void 0 || inputArr.forEach(function (_ref5, ind) {
|
|
160
|
+
var id = _ref5.id,
|
|
161
|
+
inputType = _ref5.inputType,
|
|
162
|
+
required = _ref5.required;
|
|
163
|
+
if (required) {
|
|
164
|
+
if (inputType == 'email') {
|
|
165
|
+
if (!(0, _validationFunc.validationEmail)(inputValue === null || inputValue === void 0 ? void 0 : inputValue[id])) {
|
|
166
|
+
error[id] = 'Неверный email';
|
|
167
|
+
}
|
|
168
|
+
} else if (inputType == 'tel') {
|
|
169
|
+
var regex = /^[\d\+][\d\(\)\ -]{4,14}\d$/;
|
|
170
|
+
if (!regex.test(inputValue === null || inputValue === void 0 ? void 0 : inputValue[id])) {
|
|
171
|
+
error[id] = 'Неверный телефон';
|
|
172
|
+
}
|
|
173
|
+
} else if (inputType == 'dropdown') {
|
|
174
|
+
if (!(selectedValue !== null && selectedValue !== void 0 && selectedValue.label)) {
|
|
175
|
+
error[id] = 'Выберите значение';
|
|
176
|
+
}
|
|
177
|
+
} else if (inputType == 'text') {
|
|
178
|
+
if ((inputValue === null || inputValue === void 0 ? void 0 : inputValue[id].length) < 1) {
|
|
179
|
+
error[id] = 'Поле не заполнено';
|
|
180
|
+
}
|
|
181
|
+
}
|
|
182
|
+
}
|
|
183
|
+
setErr(error);
|
|
184
|
+
});
|
|
185
|
+
if (Object.keys(error).length === 0) {
|
|
186
|
+
return true;
|
|
187
|
+
} else return false;
|
|
188
|
+
};
|
|
189
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
190
|
+
className: modal ? 'blackout' : '',
|
|
191
|
+
onClick: function onClick(e) {
|
|
192
|
+
if (modal) {
|
|
193
|
+
var el = e.target;
|
|
194
|
+
if (el.classList.contains('blackout')) {
|
|
195
|
+
setIsModal(false);
|
|
196
|
+
}
|
|
197
|
+
}
|
|
198
|
+
}
|
|
199
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
200
|
+
className: "modal-bitrix-form"
|
|
201
|
+
}, successfulResponse && /*#__PURE__*/React.createElement("div", {
|
|
202
|
+
className: "modal-bitrix-form__successful"
|
|
203
|
+
}, /*#__PURE__*/React.createElement("img", _extends({
|
|
204
|
+
className: "modal-bitrix-form__icon-done",
|
|
205
|
+
alt: "icon"
|
|
206
|
+
}, _done_icon["default"])), /*#__PURE__*/React.createElement("p", {
|
|
207
|
+
className: "modal-bitrix-form__text-green"
|
|
208
|
+
}, "\u0417\u0430\u044F\u0432\u043A\u0443 \u043F\u0440\u0438\u043D\u044F\u043B\u0438!"), /*#__PURE__*/React.createElement("p", {
|
|
209
|
+
className: "modal-bitrix-form__text"
|
|
210
|
+
}, "\u0412 \u0431\u043B\u0438\u0436\u0430\u0439\u0448\u0435\u0435 \u0432\u0440\u0435\u043C\u044F \u0441\u0432\u044F\u0436\u0435\u043C\u0441\u044F \u0441 \u0432\u0430\u043C\u0438!")), /*#__PURE__*/React.createElement(React.Fragment, null, (formTitle || subTitle) && /*#__PURE__*/React.createElement("header", {
|
|
211
|
+
className: "modal-bitrix-form__header"
|
|
212
|
+
}, /*#__PURE__*/React.createElement("h1", {
|
|
213
|
+
className: "modal-bitrix-form__title"
|
|
214
|
+
}, formTitle), /*#__PURE__*/React.createElement("p", {
|
|
215
|
+
className: "modal-bitrix-form__description"
|
|
216
|
+
}, subTitle), modal && /*#__PURE__*/React.createElement("button", {
|
|
217
|
+
className: "modal-bitrix-form__btn-close",
|
|
218
|
+
onClick: function onClick(e) {
|
|
219
|
+
return setIsModal(false);
|
|
220
|
+
}
|
|
221
|
+
}, /*#__PURE__*/React.createElement("img", _close_icon["default"]))), /*#__PURE__*/React.createElement("div", {
|
|
222
|
+
className: "modal-bitrix-form__content"
|
|
223
|
+
}, inputs), /*#__PURE__*/React.createElement(_ButtonBasic.ButtonBasic, {
|
|
224
|
+
text: btnName ? btnName : 'Отправить',
|
|
225
|
+
green: colorBtn == 'green',
|
|
226
|
+
darkViolet: colorBtn == 'darkViolet',
|
|
227
|
+
width: "100%",
|
|
228
|
+
size: "56px",
|
|
229
|
+
onClick: function onClick(e) {
|
|
230
|
+
if (validationFields()) {
|
|
231
|
+
fetchTest();
|
|
232
|
+
}
|
|
233
|
+
}
|
|
234
|
+
}))));
|
|
235
|
+
};
|
|
236
|
+
var _default = exports["default"] = ModalBitrixForm;
|