ecomlab-components-next 0.1.28 → 0.1.29
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/components/ConstructorComponents/HeaderMain/DropMenuItem/DropMenuItem.js +162 -0
- package/dist/components/ConstructorComponents/HeaderMain/DropMenuItem/DropMenuItem.scss +392 -0
- package/dist/components/ConstructorComponents/HeaderMain/DropMenuItem/img/cases.svg +3 -0
- package/dist/components/ConstructorComponents/HeaderMain/DropMenuItem/img/examples.svg +3 -0
- package/dist/components/ConstructorComponents/HeaderMain/DropMenuMobileVersion/DropMenuMobileVersion.js +139 -0
- package/dist/components/ConstructorComponents/HeaderMain/DropMenuMobileVersion/DropMenuMobileVersion.scss +149 -0
- package/dist/components/ConstructorComponents/HeaderMain/DropMenuMobileVersion/img/drop.svg +4 -0
- package/dist/components/ConstructorComponents/HeaderMain/Header.js +441 -0
- package/dist/components/ConstructorComponents/HeaderMain/Header.scss +551 -0
- package/dist/components/ConstructorComponents/HeaderMain/HeaderMain.stories.js +16 -0
- package/dist/components/ConstructorComponents/HeaderMain/Logo/Logo.js +26 -0
- package/dist/components/ConstructorComponents/HeaderMain/Logo/Logo.scss +15 -0
- package/dist/components/ConstructorComponents/HeaderMain/Logo/img/Header-img.svg +9 -0
- package/dist/components/ConstructorComponents/HeaderMain/Logo/img/Logo.svg +9 -0
- package/dist/components/ConstructorComponents/HeaderMain/img/ArrowGreen.js +21 -0
- package/dist/components/ConstructorComponents/HeaderMain/img/Banner.png +0 -0
- package/dist/components/ConstructorComponents/HeaderMain/img/Burger.js +21 -0
- package/dist/components/ConstructorComponents/HeaderMain/img/HeaderImg.svg +29 -0
- package/dist/components/ConstructorComponents/HeaderMain/img/Services-and-Solutions/banner_yandex.svg +32 -0
- package/dist/components/ConstructorComponents/HeaderMain/img/Services-and-Solutions//320/220/320/262/321/202/320/276/320/274/320/260/321/202/320/270/320/267/320/260/321/206/320/270/321/217 /320/274/320/260/321/200/320/272/320/265/321/202/320/277/320/273/320/265/320/271/321/201/320/276/320/262.svg" +12 -0
- package/dist/components/ConstructorComponents/HeaderMain/img/Services-and-Solutions//320/220/320/262/321/202/320/276/320/274/320/260/321/202/320/270/321/207/320/265/321/201/320/272/320/276/320/265 /321/203/320/273/321/203/321/207/321/210/320/265/320/275/320/270/320/265 /320/272/320/260/321/200/321/202/320/276/321/207/320/265/320/272 /321/202/320/276/320/262/320/260/321/200/320/276/320/262.svg" +11 -0
- package/dist/components/ConstructorComponents/HeaderMain/img/Services-and-Solutions//320/220/320/262/321/202/320/276/320/274/320/260/321/202/321/200/320/270/320/267/320/260/321/206/320/270/321/217_/320/272/320/276/320/275/321/202/320/265/320/275/321/202/320/260.svg +9 -0
- package/dist/components/ConstructorComponents/HeaderMain/img/Services-and-Solutions//320/220/320/262/321/202/320/276/320/277/320/276/320/264/320/261/320/276/321/200 /320/272/320/273/321/216/321/207/320/265/320/262/321/213/321/205 /321/201/320/273/320/276/320/262.svg" +5 -0
- package/dist/components/ConstructorComponents/HeaderMain/img/Services-and-Solutions//320/220/320/275/320/260/320/273/320/270/320/267 /320/272/320/276/320/275/320/272/321/203/321/200/320/265/320/275/321/202/320/276/320/262 /320/262 eCommerce.svg" +12 -0
- package/dist/components/ConstructorComponents/HeaderMain/img/Services-and-Solutions//320/225/320/264/320/270/320/275/320/260/321/217 /321/201/320/270/321/201/321/202/320/265/320/274/320/260 /321/203/320/277/321/200/320/260/320/262/320/273/320/265/320/275/320/270/321/217 /320/272/320/276/320/275/321/202/320/265/320/275/321/202/320/276/320/274.svg" +4 -0
- package/dist/components/ConstructorComponents/HeaderMain/img/Services-and-Solutions//320/230/320/267/320/276/320/261/321/200/320/260/320/266/320/265/320/275/320/270/320/265 /320/220/320/262/321/202/320/276/320/274/320/260/321/202/321/200/320/270/320/267/320/260/321/206/320/270/321/217 /320/272/320/276/320/275/321/202/320/265/320/275/321/202/320/260.svg" +9 -0
- package/dist/components/ConstructorComponents/HeaderMain/img/Services-and-Solutions//320/230/320/267/320/276/320/261/321/200/320/260/320/266/320/265/320/275/320/270/320/265 /320/237/320/276/320/264/320/272/320/273/321/216/321/207/320/270/321/201/321/214 /320/272 /320/257/320/275/320/264/320/265/320/272/321/201 /320/234/320/260/321/200/320/272/320/265/321/202.svg" +9 -0
- package/dist/components/ConstructorComponents/HeaderMain/img/Services-and-Solutions//320/234/320/260/321/200/320/272/320/265/321/202/320/277/320/273/320/265/320/271/321/201/321/213 /320/277/320/276/320/264 /320/272/320/273/321/216/321/207.svg" +11 -0
- package/dist/components/ConstructorComponents/HeaderMain/img/Services-and-Solutions//320/237/320/260/321/200/321/201/320/270/320/275/320/263 /321/201/320/260/320/271/321/202/320/276/320/262.svg" +11 -0
- package/dist/components/ConstructorComponents/HeaderMain/img/Services-and-Solutions//320/237/320/260/321/200/321/201/320/270/320/275/320/263_/320/272/320/276/320/275/320/272/321/203/321/200/320/265/320/275/321/202/320/276/320/262.svg +9 -0
- package/dist/components/ConstructorComponents/HeaderMain/img/Services-and-Solutions//320/237/320/265/321/200/321/201/320/276/320/275/320/260/320/273/321/214/320/275/321/213/320/271 /320/274/320/265/320/275/320/265/320/264/320/266/320/265/321/200 /320/274/320/260/321/200/320/272/320/265/321/202/320/277/320/273/320/265/320/271/321/201/320/276/320/262.svg" +4 -0
- package/dist/components/ConstructorComponents/HeaderMain/img/Services-and-Solutions//320/237/320/276/320/264/320/272/320/273/321/216/321/207/320/270/321/201/321/214 /320/272 /320/257/320/275/320/264/320/265/320/272/321/201 /320/234/320/260/321/200/320/272/320/265/321/202.svg" +9 -0
- package/dist/components/ConstructorComponents/HeaderMain/img/Services-and-Solutions//320/240/320/260/320/261/320/276/321/202/320/260 /321/201 /320/272/320/276/320/275/321/202/320/265/320/275/321/202/320/276/320/274.svg" +6 -0
- package/dist/components/ConstructorComponents/HeaderMain/img/Services-and-Solutions//320/240/320/260/320/267/321/200/320/260/320/261/320/276/321/202/320/272/320/260 /320/264/320/260/321/210/320/261/320/276/321/200/320/264/320/276/320/262.svg" +15 -0
- package/dist/components/ConstructorComponents/HeaderMain/img/Services-and-Solutions//320/240/320/265/320/272/320/273/320/260/320/274/320/260, /320/277/321/200/320/276/320/264/320/262/320/270/320/266/320/265/320/275/320/270/320/265 /320/270 /320/274/320/260/321/200/320/272/320/265/321/202/320/270/320/275/320/263.svg" +11 -0
- package/dist/components/ConstructorComponents/HeaderMain/img/Services-and-Solutions//320/243/320/277/321/200/320/260/320/262/320/273/320/265/320/275/320/270/320/265 /320/276/321/201/321/202/320/260/321/202/320/272/320/260/320/274/320/270.svg" +11 -0
- package/dist/components/ConstructorComponents/HeaderMain/img/Services-and-Solutions//320/246/320/265/320/275/320/276/320/276/320/261/321/200/320/260/320/267/320/276/320/262/320/260/320/275/320/270/320/265.svg +13 -0
- package/dist/components/ConstructorComponents/HeaderMain/img/Services-and-Solutions//320/260/320/262/321/202/320/276/320/274/320/260/321/202/320/270/321/207/320/265/321/201/320/272/320/270/320/271 /320/277/320/265/321/200/320/265/320/275/320/276/321/201.svg" +4 -0
- package/dist/components/ConstructorComponents/HeaderMain/img/Telegram.js +21 -0
- package/dist/components/ConstructorComponents/HeaderMain/img/UserCircle.js +23 -0
- package/dist/components/ConstructorComponents/HeaderMain/img/Whatsapp.js +23 -0
- package/dist/components/ConstructorComponents/HeaderMain/img/burger.svg +3 -0
- package/dist/components/ConstructorComponents/HeaderMain/img/bx-briefcase.svg +5 -0
- package/dist/components/ConstructorComponents/HeaderMain/img/bx-building.svg +6 -0
- package/dist/components/ConstructorComponents/HeaderMain/img/bx-chat.svg +4 -0
- package/dist/components/ConstructorComponents/HeaderMain/img/bx-detail.svg +6 -0
- package/dist/components/ConstructorComponents/HeaderMain/img/bx-grid-alt.svg +5 -0
- package/dist/components/ConstructorComponents/HeaderMain/img/bx-meteor.svg +6 -0
- package/dist/components/ConstructorComponents/HeaderMain/img/bx-spreadsheet.svg +6 -0
- package/dist/components/ConstructorComponents/HeaderMain/img/bx-user-circle.svg +13 -0
- package/dist/components/ConstructorComponents/HeaderMain/img/bx-user-pin.svg +6 -0
- package/dist/components/ConstructorComponents/HeaderMain/img/bxl-telegram.svg +5 -0
- package/dist/components/ConstructorComponents/HeaderMain/img/bxl-whatsapp.svg +5 -0
- package/dist/components/ConstructorComponents/HeaderMain/img/bxs-down-arrow.svg +5 -0
- package/dist/components/ConstructorComponents/HeaderMain/img/cases.svg +3 -0
- package/dist/components/ConstructorComponents/HeaderMain/img/close.svg +5 -0
- package/dist/components/ConstructorComponents/HeaderMain/img/done.svg +9 -0
- package/dist/components/ConstructorComponents/HeaderMain/img/drop.svg +9 -0
- package/dist/components/ConstructorComponents/HeaderMain/img/en.svg +9 -0
- package/dist/components/ConstructorComponents/HeaderMain/img/examples.svg +3 -0
- package/dist/components/ConstructorComponents/HeaderMain/img/industries/FMCG.svg +10 -0
- package/dist/components/ConstructorComponents/HeaderMain/img/industries//320/220/320/262/321/202/320/276/320/274/320/260/321/202/321/200/320/270/320/267/320/260/321/206/320/270/321/217 /320/272/320/276/320/275/321/202/320/265/320/275/321/202/320/260.svg" +3 -0
- package/dist/components/ConstructorComponents/HeaderMain/img/industries//320/220/320/263/320/265/320/275/321/201/321/202/320/262/320/260/320/274.svg +3 -0
- package/dist/components/ConstructorComponents/HeaderMain/img/industries//320/221/321/200/320/265/320/275/320/264/320/260/320/274.svg +6 -0
- package/dist/components/ConstructorComponents/HeaderMain/img/industries//320/230/320/267/320/276/320/261/321/200/320/260/320/266/320/265/320/275/320/270/320/265 /320/220/320/262/321/202/320/276/320/274/320/260/321/202/321/200/320/270/320/267/320/260/321/206/320/270/321/217 /320/272/320/276/320/275/321/202/320/265/320/275/321/202/320/260.svg" +9 -0
- package/dist/components/ConstructorComponents/HeaderMain/img/industries//320/230/320/267/320/276/320/261/321/200/320/260/320/266/320/265/320/275/320/270/320/265 /320/237/320/260/321/200/321/201/320/270/320/275/320/263 /320/272/320/276/320/275/320/272/321/203/321/200/320/265/320/275/321/202/320/276/320/262.svg" +9 -0
- package/dist/components/ConstructorComponents/HeaderMain/img/industries//320/236/320/264/320/265/320/266/320/264/320/260.svg +3 -0
- package/dist/components/ConstructorComponents/HeaderMain/img/industries//320/237/320/260/321/200/321/201/320/270/320/275/320/263 /320/272/320/276/320/275/320/272/321/203/321/200/320/265/320/275/321/202/320/276/320/262.svg" +3 -0
- package/dist/components/ConstructorComponents/HeaderMain/img/industries//320/237/320/276/321/201/321/202/320/260/320/262/321/211/320/270/320/272/320/260/320/274.svg +5 -0
- package/dist/components/ConstructorComponents/HeaderMain/img/industries//320/237/321/200/320/276/320/270/320/267/320/262/320/276/320/264/320/270/321/202/320/265/320/273/321/217/320/274.svg +11 -0
- package/dist/components/ConstructorComponents/HeaderMain/img/industries//320/244/320/260/321/200/320/274/320/260/321/206/320/265/320/262/321/202/320/270/320/272/320/260.svg +3 -0
- package/dist/components/ConstructorComponents/HeaderMain/img/industries//320/244/321/203/320/273/321/204/320/270/320/273/320/274/320/265/320/275/321/202 /320/246/320/265/320/275/321/202/321/200/320/260/320/274.svg" +11 -0
- package/dist/components/ConstructorComponents/HeaderMain/img/industries//320/255/320/273/320/265/320/272/321/202/321/200/320/276/320/275/320/270/320/272/320/260.svg +10 -0
- package/dist/components/ConstructorComponents/HeaderMain/img/lang.svg +10 -0
- package/dist/components/ConstructorComponents/HeaderMain/img/profile.svg +3 -0
- package/dist/components/ConstructorComponents/HeaderMain/img/search.svg +10 -0
- package/dist/components/ConstructorComponents/HeaderMain/img/service/analytics.svg +6 -0
- package/dist/components/ConstructorComponents/HeaderMain/img/service/calendar.svg +6 -0
- package/dist/components/ConstructorComponents/HeaderMain/img/service/competitors.svg +7 -0
- package/dist/components/ConstructorComponents/HeaderMain/img/service/crm.svg +5 -0
- package/dist/components/ConstructorComponents/HeaderMain/img/service/feedback.svg +6 -0
- package/dist/components/ConstructorComponents/HeaderMain/img/service/keyword.svg +6 -0
- package/dist/components/ConstructorComponents/HeaderMain/img/service/marketing.svg +6 -0
- package/dist/components/ConstructorComponents/HeaderMain/img/service/network.svg +5 -0
- package/dist/components/ConstructorComponents/HeaderMain/img/service/product.svg +5 -0
- package/dist/components/ConstructorComponents/HeaderMain/img/service/stocks.svg +3 -0
- package/dist/components/ConstructorComponents/HeaderMain/img/service/task.svg +6 -0
- package/dist/components/ConstructorComponents/HeaderMain/img/service/tools.svg +5 -0
- package/dist/components/ConstructorComponents/HeaderMain/img/service/wiki.svg +5 -0
- package/dist/components/ConstructorComponents/HeaderMain/img/service_icon.svg +5 -0
- package/dist/components/ConstructorComponents/HeaderMain/img/tur.svg +9 -0
- package/dist/components/ConstructorComponents/HeaderMain/img//321/203/320/277/321/200/320/260/320/262/320/273/320/265/320/275/320/270/320/265 /321/206/320/265/320/275/320/260/320/274/320/270.svg" +9 -0
- package/dist/components/Table/ButtonColumn/ButtonColumn.js +116 -0
- package/dist/components/Table/ButtonColumn/ButtonColumn.scss +117 -0
- package/dist/components/Table/ButtonColumn/img/column.svg +7 -0
- package/dist/components/Table/ButtonCopy/ButtonCopy.js +41 -0
- package/dist/components/Table/ButtonCopy/ButtonCopy.scss +43 -0
- package/dist/components/Table/ButtonCopy/img/copy.svg +3 -0
- package/dist/components/Table/ButtonExport/ButtonExport.js +87 -0
- package/dist/components/Table/ButtonExport/ButtonExport.scss +111 -0
- package/dist/components/Table/ButtonExport/img/export.svg +8 -0
- package/dist/components/Table/ButtonExport/img/pdf.svg +12 -0
- package/dist/components/Table/ButtonExport/img/xlc.svg +11 -0
- package/dist/components/Table/ButtonUpload/ButtonUpload.js +27 -0
- package/dist/components/Table/ButtonUpload/ButtonUpload.scss +45 -0
- package/dist/components/Table/ButtonUpload/img/upload_icon.svg +8 -0
- package/dist/components/Table/CheckboxToggle/CheckboxToggle.js +58 -0
- package/dist/components/Table/CheckboxToggle/CheckboxToggle.scss +117 -0
- package/dist/components/Table/Paginator/Paginator.js +260 -0
- package/dist/components/Table/Paginator/Paginator.scss +198 -0
- package/dist/components/Table/Paginator/img/arrow_blue.svg +3 -0
- package/dist/components/Table/Paginator/img/arrow_next.svg +3 -0
- package/dist/components/Table/Paginator/img/arrow_prev.svg +3 -0
- package/dist/components/Table/Table/Filters/OptionsDate.js +211 -0
- package/dist/components/Table/Table/Filters/OptionsImage.js +95 -0
- package/dist/components/Table/Table/Filters/OptionsImage.scss +10 -0
- package/dist/components/Table/Table/Filters/OptionsList.js +247 -0
- package/dist/components/Table/Table/Filters/OptionsNumber.js +226 -0
- package/dist/components/Table/Table/Filters/OptionsNumber.scss +100 -0
- package/dist/components/Table/Table/Filters/OptionsText.js +169 -0
- package/dist/components/Table/Table/Filters/OptionsText.scss +71 -0
- package/dist/components/Table/Table/Filters/img/FilterDefault.js +26 -0
- package/dist/components/Table/Table/Filters/img/FilterReset.js +41 -0
- package/dist/components/Table/Table/Filters/img/dropFilters.png +0 -0
- package/dist/components/Table/Table/Filters/img/filterDefault.svg +3 -0
- package/dist/components/Table/Table/Filters/img/filter_blue.svg +3 -0
- package/dist/components/Table/Table/Filters/img/filter_blue_background.svg +5 -0
- package/dist/components/Table/Table/Filters/img/filter_reset.svg +7 -0
- package/dist/components/Table/Table/InputWithState/InputWithState.js +40 -0
- package/dist/components/Table/Table/RenderFiltersTh/RenderFiltersTh.js +143 -0
- package/dist/components/Table/Table/RenderTd/RenderTd.js +23 -0
- package/dist/components/Table/Table/RenderTh/RenderTh.js +116 -0
- package/dist/components/Table/Table/Table.js +1569 -0
- package/dist/components/Table/Table/Table.scss +1524 -0
- package/dist/components/Table/Table/TableChartTd/TableChartTd.js +175 -0
- package/dist/components/Table/Table/TableChartTd/TableChartTd.scss +0 -0
- package/dist/components/Table/Table/TableInput/TableInput.js +107 -0
- package/dist/components/Table/Table/TableInput/TableInput.scss +35 -0
- package/dist/components/Table/Table/TableWithoutData/TableWithoutData.js +27 -0
- package/dist/components/Table/Table/TableWithoutData/TableWithoutData.scss +32 -0
- package/dist/components/Table/Table/TableWithoutData/img/doc_icon.png +0 -0
- package/dist/components/Table/Table/TdDate/TdDate.js +39 -0
- package/dist/components/Table/Table/TdDate/TdDate.scss +0 -0
- package/dist/components/Table/Table/TdDate.js +35 -0
- package/dist/components/Table/Table/TypeTdImage.js +90 -0
- package/dist/components/Table/Table/img/Search.png +0 -0
- package/dist/components/Table/Table/img/SortArrow.js +12 -0
- package/dist/components/Table/Table/img/SortArrowUp.js +12 -0
- package/dist/components/Table/Table/img/SortTable.js +14 -0
- package/dist/components/Table/Table/img/close_icon.svg +7 -0
- package/dist/components/Table/Table/img/close_white.svg +3 -0
- package/dist/components/Table/Table/img/context-menu.svg +6 -0
- package/dist/components/Table/Table/img/contextMenuBtn.png +0 -0
- package/dist/components/Table/Table/img/delete_icon.svg +8 -0
- package/dist/components/Table/Table/img/dropFilters.png +0 -0
- package/dist/components/Table/Table/img/filter.png +0 -0
- package/dist/components/Table/Table/img/filterDefault.png +0 -0
- package/dist/components/Table/Table/img/filter_blue.svg +3 -0
- package/dist/components/Table/Table/img/filter_blue_background.svg +5 -0
- package/dist/components/Table/Table/img/imageNotFound.svg +3 -0
- package/dist/components/Table/Table/img/location.svg +3 -0
- package/dist/components/Table/Table/img/sort_arrow_down.svg +6 -0
- package/dist/components/Table/Table/img/sort_arrow_up.svg +4 -0
- package/dist/components/Table/Table/img/sort_table.svg +8 -0
- package/dist/components/Table/Table/svg_img.js +8 -0
- package/dist/components/Table/TableBox/TableBox.js +310 -0
- package/dist/components/Table/TableBox/TableBox.scss +418 -0
- package/dist/components/Table/TableBox/TableBox.stories.js +339 -0
- package/dist/components/Table/TableBox/img/delete_icon.svg +9 -0
- package/dist/components/Table/TableBox/img/forward_icon.svg +9 -0
- package/dist/components/Table/TableBox/img/more_icon.svg +10 -0
- package/dist/components/Table/TableBox/img_stories/tag_icon.svg +5 -0
- package/dist/components/Table/TableInput/TableInput.js +107 -0
- package/dist/components/Table/TableInput/TableInput.scss +35 -0
- package/dist/components/Table/TableWithoutData/TableWithoutData.js +27 -0
- package/dist/components/Table/TableWithoutData/TableWithoutData.scss +32 -0
- package/dist/components/Table/TableWithoutData/img/doc_icon.png +0 -0
- package/dist/index.js +7 -0
- package/package.json +14 -9
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
.btn-box_upload {
|
|
2
|
+
position: relative;
|
|
3
|
+
cursor: pointer;
|
|
4
|
+
|
|
5
|
+
.btn__white_upload {
|
|
6
|
+
width: 108px;
|
|
7
|
+
min-width: 108px;
|
|
8
|
+
background-color: #F1F5F9;
|
|
9
|
+
font-size: 14px;
|
|
10
|
+
height: 32px;
|
|
11
|
+
border: 0;
|
|
12
|
+
color: #020617;
|
|
13
|
+
border-radius: 8px;
|
|
14
|
+
padding-left: 24px;
|
|
15
|
+
background-image: url('./img/upload_icon.svg');
|
|
16
|
+
background-position: center left 6px;
|
|
17
|
+
background-size: 16px;
|
|
18
|
+
background-repeat: no-repeat;
|
|
19
|
+
border: 1px solid var(--table-border, #E0E7F2);
|
|
20
|
+
color: var(--all-text-secondary-text, #475569);
|
|
21
|
+
/* Button link/Medium */
|
|
22
|
+
font-family: Inter;
|
|
23
|
+
font-size: 14px;
|
|
24
|
+
font-style: normal;
|
|
25
|
+
font-weight: 400;
|
|
26
|
+
line-height: 16px;
|
|
27
|
+
cursor: pointer;
|
|
28
|
+
|
|
29
|
+
&:hover {
|
|
30
|
+
background-color: #E0E7F2;
|
|
31
|
+
transition: 0.5s;
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
.input-file {
|
|
36
|
+
position: absolute;
|
|
37
|
+
opacity: 0;
|
|
38
|
+
top: 0;
|
|
39
|
+
left: 0;
|
|
40
|
+
right: 0;
|
|
41
|
+
bottom: 0;
|
|
42
|
+
z-index: 1;
|
|
43
|
+
cursor: pointer;
|
|
44
|
+
}
|
|
45
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
+
<mask id="path-1-inside-1_9164_310782" fill="white">
|
|
3
|
+
<path fill-rule="evenodd" clip-rule="evenodd" d="M14.1904 6.66699C13.9276 6.66699 13.7142 6.44978 13.7142 6.18214V3.7579C13.7142 2.95451 13.0747 2.30336 12.2857 2.30336L3.71424 2.30336C2.9252 2.30336 2.28567 2.95451 2.28567 3.7579V6.18214C2.28567 6.44978 2.07234 6.66699 1.80948 6.66699C1.54663 6.66699 1.33329 6.44978 1.33329 6.18214V3.7579C1.33329 2.41923 2.39948 1.33366 3.71424 1.33366L12.2857 1.33366C13.6004 1.33366 14.6666 2.41923 14.6666 3.7579V6.18214C14.6666 6.44978 14.4533 6.66699 14.1904 6.66699Z"/>
|
|
4
|
+
</mask>
|
|
5
|
+
<path fill-rule="evenodd" clip-rule="evenodd" d="M14.1904 6.66699C13.9276 6.66699 13.7142 6.44978 13.7142 6.18214V3.7579C13.7142 2.95451 13.0747 2.30336 12.2857 2.30336L3.71424 2.30336C2.9252 2.30336 2.28567 2.95451 2.28567 3.7579V6.18214C2.28567 6.44978 2.07234 6.66699 1.80948 6.66699C1.54663 6.66699 1.33329 6.44978 1.33329 6.18214V3.7579C1.33329 2.41923 2.39948 1.33366 3.71424 1.33366L12.2857 1.33366C13.6004 1.33366 14.6666 2.41923 14.6666 3.7579V6.18214C14.6666 6.44978 14.4533 6.66699 14.1904 6.66699Z" fill="#70808F"/>
|
|
6
|
+
<path d="M14.1904 5.66699C14.4968 5.66699 14.7142 5.91456 14.7142 6.18214H12.7142C12.7142 6.985 13.3584 7.66699 14.1904 7.66699V5.66699ZM14.7142 6.18214V3.7579L12.7142 3.7579V6.18214H14.7142ZM14.7142 3.7579C14.7142 2.41929 13.6439 1.30336 12.2857 1.30336V3.30336C12.5055 3.30336 12.7142 3.48973 12.7142 3.7579L14.7142 3.7579ZM12.2857 1.30336L3.71424 1.30336V3.30336L12.2857 3.30336V1.30336ZM3.71424 1.30336C2.356 1.30336 1.28567 2.41929 1.28567 3.7579L3.28567 3.7579C3.28567 3.48973 3.49439 3.30336 3.71424 3.30336V1.30336ZM1.28567 3.7579V6.18214H3.28567V3.7579L1.28567 3.7579ZM1.28567 6.18214C1.28567 5.91456 1.50314 5.66699 1.80948 5.66699V7.66699C2.64153 7.66699 3.28567 6.985 3.28567 6.18214H1.28567ZM1.80948 5.66699C2.11582 5.66699 2.33329 5.91456 2.33329 6.18214H0.333292C0.333292 6.985 0.97743 7.66699 1.80948 7.66699V5.66699ZM2.33329 6.18214V3.7579L0.333292 3.7579V6.18214H2.33329ZM2.33329 3.7579C2.33329 2.95446 2.96868 2.33366 3.71424 2.33366V0.333658C1.83029 0.333658 0.333292 1.88401 0.333292 3.7579L2.33329 3.7579ZM3.71424 2.33366L12.2857 2.33366V0.333658L3.71424 0.333658V2.33366ZM12.2857 2.33366C13.0312 2.33366 13.6666 2.95446 13.6666 3.7579H15.6666C15.6666 1.88401 14.1696 0.333658 12.2857 0.333658V2.33366ZM13.6666 3.7579V6.18214H15.6666V3.7579H13.6666ZM13.6666 6.18214C13.6666 5.91456 13.8841 5.66699 14.1904 5.66699V7.66699C15.0225 7.66699 15.6666 6.985 15.6666 6.18214H13.6666Z" fill="#1890FF" mask="url(#path-1-inside-1_9164_310782)"/>
|
|
7
|
+
<path fill-rule="evenodd" clip-rule="evenodd" d="M7.6634 4.1425C7.84911 3.95293 8.15097 3.95293 8.33668 4.1425L11.1937 7.05157C11.3799 7.24066 11.3799 7.54802 11.1937 7.73711C11.008 7.92668 10.7062 7.92668 10.5205 7.73711L8.47622 5.65569V14.1821C8.47622 14.4498 8.26289 14.667 8.00004 14.667C7.73719 14.667 7.52387 14.4498 7.52387 14.1821L7.52387 5.65569L5.47963 7.73711C5.29392 7.92668 4.99205 7.92668 4.80635 7.73711C4.62016 7.54802 4.62016 7.24066 4.80635 7.05157L7.6634 4.1425Z" fill="#1890FF"/>
|
|
8
|
+
</svg>
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
'use client';
|
|
3
|
+
|
|
4
|
+
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); }
|
|
5
|
+
Object.defineProperty(exports, "__esModule", {
|
|
6
|
+
value: true
|
|
7
|
+
});
|
|
8
|
+
exports["default"] = void 0;
|
|
9
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
10
|
+
require("./CheckboxToggle.scss");
|
|
11
|
+
var _excluded = ["id", "value", "onChange", "containerClassName", "inputClassName", "className", "disabled"];
|
|
12
|
+
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
|
|
13
|
+
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { "default": e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n["default"] = e, t && t.set(e, n), n; }
|
|
14
|
+
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); }
|
|
15
|
+
function _slicedToArray(r, e) { return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest(); }
|
|
16
|
+
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."); }
|
|
17
|
+
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; } }
|
|
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; }
|
|
19
|
+
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; } }
|
|
20
|
+
function _arrayWithHoles(r) { if (Array.isArray(r)) return r; }
|
|
21
|
+
function _objectWithoutProperties(e, t) { if (null == e) return {}; var o, r, i = _objectWithoutPropertiesLoose(e, t); if (Object.getOwnPropertySymbols) { var s = Object.getOwnPropertySymbols(e); for (r = 0; r < s.length; r++) o = s[r], t.includes(o) || {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]); } return i; }
|
|
22
|
+
function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (e.includes(n)) continue; t[n] = r[n]; } return t; }
|
|
23
|
+
var CheckboxToggle = function CheckboxToggle(_ref) {
|
|
24
|
+
var id = _ref.id,
|
|
25
|
+
value = _ref.value,
|
|
26
|
+
onChange = _ref.onChange,
|
|
27
|
+
containerClassName = _ref.containerClassName,
|
|
28
|
+
inputClassName = _ref.inputClassName,
|
|
29
|
+
className = _ref.className,
|
|
30
|
+
disabled = _ref.disabled,
|
|
31
|
+
props = _objectWithoutProperties(_ref, _excluded);
|
|
32
|
+
var _useState = (0, _react.useState)(value),
|
|
33
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
34
|
+
_value = _useState2[0],
|
|
35
|
+
set_value = _useState2[1];
|
|
36
|
+
var _onChange = function _onChange(e) {
|
|
37
|
+
set_value(e.target.checked);
|
|
38
|
+
if (onChange) {
|
|
39
|
+
onChange(e.target.checked);
|
|
40
|
+
}
|
|
41
|
+
};
|
|
42
|
+
(0, _react.useEffect)(function () {
|
|
43
|
+
set_value(value);
|
|
44
|
+
}, [value]);
|
|
45
|
+
return /*#__PURE__*/_react["default"].createElement("label", {
|
|
46
|
+
className: disabled ? 'checkbox-status_disabled' : "checkbox-status"
|
|
47
|
+
}, /*#__PURE__*/_react["default"].createElement("input", _extends({
|
|
48
|
+
type: "checkbox",
|
|
49
|
+
disabled: disabled,
|
|
50
|
+
id: id,
|
|
51
|
+
className: "checkbox " + (inputClassName ? inputClassName : ""),
|
|
52
|
+
checked: _value,
|
|
53
|
+
onChange: _onChange
|
|
54
|
+
}, props)), /*#__PURE__*/_react["default"].createElement("span", {
|
|
55
|
+
className: "checkbox-status-switch"
|
|
56
|
+
}));
|
|
57
|
+
};
|
|
58
|
+
var _default = exports["default"] = CheckboxToggle;
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
.checkbox-status,
|
|
2
|
+
.checkbox-status_disabled {
|
|
3
|
+
display: inline-block;
|
|
4
|
+
position: relative;
|
|
5
|
+
vertical-align: middle;
|
|
6
|
+
font-size: 14px;
|
|
7
|
+
user-select: none;
|
|
8
|
+
|
|
9
|
+
.checkbox-status-switch {
|
|
10
|
+
position: relative;
|
|
11
|
+
display: inline-block;
|
|
12
|
+
box-sizing: border-box;
|
|
13
|
+
width: 60px;
|
|
14
|
+
height: 26px;
|
|
15
|
+
border-radius: 16px;
|
|
16
|
+
border: 2px solid #94A3B8;
|
|
17
|
+
vertical-align: top;
|
|
18
|
+
background: #F1F5F9;
|
|
19
|
+
transition: .2s;
|
|
20
|
+
|
|
21
|
+
&::after {
|
|
22
|
+
content: 'OFF';
|
|
23
|
+
position: absolute;
|
|
24
|
+
top: 4px;
|
|
25
|
+
right: 8px;
|
|
26
|
+
display: inline-block;
|
|
27
|
+
width: 20px;
|
|
28
|
+
height: 16px;
|
|
29
|
+
border-radius: 100px;
|
|
30
|
+
color: #94A3B8;
|
|
31
|
+
transition: .15s;
|
|
32
|
+
font-family: Rubik;
|
|
33
|
+
font-size: 11px;
|
|
34
|
+
font-style: normal;
|
|
35
|
+
font-weight: 500;
|
|
36
|
+
line-height: 14px;
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
.checkbox-status-switch:before {
|
|
41
|
+
content: '';
|
|
42
|
+
position: absolute;
|
|
43
|
+
top: 3px;
|
|
44
|
+
left: 4px;
|
|
45
|
+
display: inline-block;
|
|
46
|
+
width: 20px;
|
|
47
|
+
height: 16px;
|
|
48
|
+
border-radius: 100px;
|
|
49
|
+
background: #94A3B8;
|
|
50
|
+
transition: .15s;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
input[type=checkbox] {
|
|
54
|
+
display: block;
|
|
55
|
+
width: 0;
|
|
56
|
+
height: 0;
|
|
57
|
+
position: absolute;
|
|
58
|
+
z-index: -1;
|
|
59
|
+
opacity: 0;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
input[type=checkbox]:not(:disabled):active+.checkbox-status-switch:before {
|
|
63
|
+
box-shadow: inset 0 0 2px rgba(0, 0, 0, .3);
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
input[type=checkbox]:checked+.checkbox-status-switch {
|
|
67
|
+
border: 2px solid #22C55E;
|
|
68
|
+
background: #22C55E;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
input[type=checkbox]:checked+.checkbox-status-switch::after {
|
|
72
|
+
content: 'ON';
|
|
73
|
+
position: absolute;
|
|
74
|
+
top: 4px;
|
|
75
|
+
left: 8px;
|
|
76
|
+
display: inline-block;
|
|
77
|
+
width: 20px;
|
|
78
|
+
height: 16px;
|
|
79
|
+
border-radius: 100px;
|
|
80
|
+
color: #fff;
|
|
81
|
+
transition: .15s;
|
|
82
|
+
font-family: Rubik;
|
|
83
|
+
font-size: 11px;
|
|
84
|
+
font-style: normal;
|
|
85
|
+
font-weight: 500;
|
|
86
|
+
line-height: 14px;
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
|
|
90
|
+
input[type=checkbox]:checked+.checkbox-status-switch:before {
|
|
91
|
+
background-color: #fff;
|
|
92
|
+
transform: translateX(28px);
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
/* Hover */
|
|
96
|
+
input[type="checkbox"]:not(:disabled)+.checkbox-status-switch {
|
|
97
|
+
cursor: pointer;
|
|
98
|
+
// border-color: rgba(0, 0, 0, .3);
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
/* Focus */
|
|
102
|
+
.focused .checkbox-status-switch:before {
|
|
103
|
+
box-shadow: inset 0px 0px 4px #ff5623;
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
&_disabled {
|
|
107
|
+
|
|
108
|
+
.checkbox-status-switch {
|
|
109
|
+
background: #F1F5F9;
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
.checkbox-status-switch:before {
|
|
113
|
+
background: #C5CCD3;
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
}
|
|
@@ -0,0 +1,260 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
'use client';
|
|
3
|
+
|
|
4
|
+
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); }
|
|
5
|
+
Object.defineProperty(exports, "__esModule", {
|
|
6
|
+
value: true
|
|
7
|
+
});
|
|
8
|
+
exports.usePagination = exports.PAGE_SIZES = void 0;
|
|
9
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
10
|
+
require("./Paginator.scss");
|
|
11
|
+
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
|
|
12
|
+
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { "default": e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n["default"] = e, t && t.set(e, n), n; }
|
|
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 _iterableToArray(r) { if ("undefined" != typeof Symbol && null != r[Symbol.iterator] || null != r["@@iterator"]) return Array.from(r); }
|
|
16
|
+
function _arrayWithoutHoles(r) { if (Array.isArray(r)) return _arrayLikeToArray(r); }
|
|
17
|
+
function _slicedToArray(r, e) { return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest(); }
|
|
18
|
+
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."); }
|
|
19
|
+
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; } }
|
|
20
|
+
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; }
|
|
21
|
+
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; } }
|
|
22
|
+
function _arrayWithHoles(r) { if (Array.isArray(r)) return r; }
|
|
23
|
+
var PAGE_SIZES = exports.PAGE_SIZES = [10, 50, 100];
|
|
24
|
+
var DEFAULT_PAGE = 1;
|
|
25
|
+
var DOT_SCROLL_STEP = 5;
|
|
26
|
+
var VISIBLE_ELEMENTS = 7;
|
|
27
|
+
var Paginator = function Paginator(_ref) {
|
|
28
|
+
var _Array$from;
|
|
29
|
+
var pageSize = _ref.pageSize,
|
|
30
|
+
pageNumber = _ref.pageNumber,
|
|
31
|
+
setPageSize = _ref.setPageSize,
|
|
32
|
+
setPageNumber = _ref.setPageNumber,
|
|
33
|
+
total = _ref.total,
|
|
34
|
+
lang = _ref.lang;
|
|
35
|
+
var totalPages = total ? Math.ceil(total / pageSize) : 0;
|
|
36
|
+
var firstItemOnThePage = pageSize * (pageNumber - 1) + 1;
|
|
37
|
+
var lastItemOnThePage = firstItemOnThePage === 1 ? pageSize : firstItemOnThePage - 1 + pageSize;
|
|
38
|
+
if (total < lastItemOnThePage) {
|
|
39
|
+
lastItemOnThePage = total;
|
|
40
|
+
}
|
|
41
|
+
var selectRef = (0, _react.useRef)();
|
|
42
|
+
var _useState = (0, _react.useState)([]),
|
|
43
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
44
|
+
viewRange = _useState2[0],
|
|
45
|
+
setViewRange = _useState2[1];
|
|
46
|
+
|
|
47
|
+
//перевод
|
|
48
|
+
var translateOf = function translateOf() {
|
|
49
|
+
if (lang == 'tur') return 'üzerinden';
|
|
50
|
+
if (lang == 'eng') return 'out of';
|
|
51
|
+
return 'из';
|
|
52
|
+
};
|
|
53
|
+
var onPageNumberClick = function onPageNumberClick(e) {
|
|
54
|
+
var newNumber = parseInt(e.target.title, 10);
|
|
55
|
+
setPageNumber(newNumber);
|
|
56
|
+
if (newNumber === DEFAULT_PAGE || newNumber === totalPages) updateViewRange(newNumber);
|
|
57
|
+
};
|
|
58
|
+
var onSelectChange = function onSelectChange(e) {
|
|
59
|
+
setPageNumber(DEFAULT_PAGE);
|
|
60
|
+
setPageSize(parseInt(e.target.value));
|
|
61
|
+
};
|
|
62
|
+
var updatePageNumber = function updatePageNumber(number) {
|
|
63
|
+
setPageNumber(number);
|
|
64
|
+
updateViewRange(number);
|
|
65
|
+
};
|
|
66
|
+
(0, _react.useEffect)(function () {
|
|
67
|
+
selectRef.current.value = pageSize;
|
|
68
|
+
}, []);
|
|
69
|
+
(0, _react.useEffect)(function () {
|
|
70
|
+
updateViewRange(pageNumber);
|
|
71
|
+
}, [totalPages]);
|
|
72
|
+
var LeftDots = function LeftDots(currentNumber) {
|
|
73
|
+
return /*#__PURE__*/_react["default"].createElement("span", {
|
|
74
|
+
className: "dots",
|
|
75
|
+
onClick: function onClick() {
|
|
76
|
+
return updatePageNumber(currentNumber - DOT_SCROLL_STEP);
|
|
77
|
+
}
|
|
78
|
+
}, "...");
|
|
79
|
+
};
|
|
80
|
+
var RightDots = function RightDots(currentNumber) {
|
|
81
|
+
return /*#__PURE__*/_react["default"].createElement("span", {
|
|
82
|
+
className: "dots",
|
|
83
|
+
onClick: function onClick() {
|
|
84
|
+
return updatePageNumber(currentNumber + DOT_SCROLL_STEP);
|
|
85
|
+
}
|
|
86
|
+
}, "...");
|
|
87
|
+
};
|
|
88
|
+
var LeftArrow = function LeftArrow() {
|
|
89
|
+
return /*#__PURE__*/_react["default"].createElement(Arrow, {
|
|
90
|
+
wrapperClassName: "arrow_wrapper",
|
|
91
|
+
className: "arrow_prev",
|
|
92
|
+
scrollCallback: function scrollCallback() {
|
|
93
|
+
return updatePageNumber(pageNumber - 1);
|
|
94
|
+
},
|
|
95
|
+
disabled: pageNumber === DEFAULT_PAGE
|
|
96
|
+
});
|
|
97
|
+
};
|
|
98
|
+
var RightArrow = function RightArrow() {
|
|
99
|
+
return /*#__PURE__*/_react["default"].createElement(Arrow, {
|
|
100
|
+
wrapperClassName: "arrow_wrapper",
|
|
101
|
+
className: "arrow_next",
|
|
102
|
+
scrollCallback: function scrollCallback() {
|
|
103
|
+
return updatePageNumber(pageNumber + 1);
|
|
104
|
+
},
|
|
105
|
+
disabled: pageNumber === totalPages
|
|
106
|
+
});
|
|
107
|
+
};
|
|
108
|
+
var updateViewRange = function updateViewRange(currentNumber) {
|
|
109
|
+
var allPageNumbers = Array.from(_toConsumableArray(Array(totalPages).keys())).map(function (p) {
|
|
110
|
+
return p + 1;
|
|
111
|
+
});
|
|
112
|
+
if (!totalPages || totalPages < VISIBLE_ELEMENTS) {
|
|
113
|
+
setViewRange(allPageNumbers);
|
|
114
|
+
return;
|
|
115
|
+
}
|
|
116
|
+
if (currentNumber === DEFAULT_PAGE || currentNumber - DEFAULT_PAGE < DOT_SCROLL_STEP) {
|
|
117
|
+
setViewRange([].concat(_toConsumableArray(allPageNumbers.slice(0, DOT_SCROLL_STEP)), [RightDots, totalPages]));
|
|
118
|
+
return;
|
|
119
|
+
}
|
|
120
|
+
if (currentNumber === totalPages || totalPages - currentNumber < DOT_SCROLL_STEP) {
|
|
121
|
+
setViewRange([DEFAULT_PAGE, LeftDots].concat(_toConsumableArray(allPageNumbers.slice(-DOT_SCROLL_STEP))));
|
|
122
|
+
return;
|
|
123
|
+
}
|
|
124
|
+
setViewRange([DEFAULT_PAGE, LeftDots, currentNumber - 1, currentNumber, currentNumber + 1, RightDots, totalPages]);
|
|
125
|
+
};
|
|
126
|
+
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
127
|
+
className: "paginator"
|
|
128
|
+
}, /*#__PURE__*/_react["default"].createElement("select", {
|
|
129
|
+
ref: selectRef,
|
|
130
|
+
onChange: onSelectChange,
|
|
131
|
+
className: "select-page"
|
|
132
|
+
}, PAGE_SIZES === null || PAGE_SIZES === void 0 ? void 0 : PAGE_SIZES.map(function (size) {
|
|
133
|
+
return /*#__PURE__*/_react["default"].createElement("option", {
|
|
134
|
+
key: size
|
|
135
|
+
}, size);
|
|
136
|
+
})), /*#__PURE__*/_react["default"].createElement("div", {
|
|
137
|
+
className: 'pagination_wrapper' + (totalPages ? '' : '_disabled')
|
|
138
|
+
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
139
|
+
className: "pagination_container"
|
|
140
|
+
}, /*#__PURE__*/_react["default"].createElement(LeftArrow, null), !totalPages && ((_Array$from = Array.from(_toConsumableArray(Array(3).keys()))) === null || _Array$from === void 0 ? void 0 : _Array$from.map(function (_, index) {
|
|
141
|
+
return /*#__PURE__*/_react["default"].createElement(PageNumber, {
|
|
142
|
+
itemId: index,
|
|
143
|
+
className: "page-num",
|
|
144
|
+
title: index + 1,
|
|
145
|
+
key: index
|
|
146
|
+
});
|
|
147
|
+
})), viewRange === null || viewRange === void 0 ? void 0 : viewRange.map(function (el) {
|
|
148
|
+
return typeof el === 'number' ? /*#__PURE__*/_react["default"].createElement(PageNumber, {
|
|
149
|
+
className: "page-num",
|
|
150
|
+
onClick: onPageNumberClick,
|
|
151
|
+
selected: pageNumber === el,
|
|
152
|
+
title: el,
|
|
153
|
+
key: el,
|
|
154
|
+
itemId: el
|
|
155
|
+
}) : el(pageNumber);
|
|
156
|
+
}), /*#__PURE__*/_react["default"].createElement(RightArrow, null))), total ? /*#__PURE__*/_react["default"].createElement("p", {
|
|
157
|
+
className: "total-info"
|
|
158
|
+
}, firstItemOnThePage, " \u2014 ", lastItemOnThePage, " ", translateOf(), " ", total) : /*#__PURE__*/_react["default"].createElement("p", {
|
|
159
|
+
className: "total-info",
|
|
160
|
+
style: {
|
|
161
|
+
minWidth: '60px'
|
|
162
|
+
}
|
|
163
|
+
}));
|
|
164
|
+
};
|
|
165
|
+
var Arrow = function Arrow(_ref2) {
|
|
166
|
+
var className = _ref2.className,
|
|
167
|
+
wrapperClassName = _ref2.wrapperClassName,
|
|
168
|
+
scrollCallback = _ref2.scrollCallback,
|
|
169
|
+
disabled = _ref2.disabled;
|
|
170
|
+
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
171
|
+
className: wrapperClassName
|
|
172
|
+
}, /*#__PURE__*/_react["default"].createElement("i", {
|
|
173
|
+
className: className,
|
|
174
|
+
disabled: disabled,
|
|
175
|
+
onClick: scrollCallback
|
|
176
|
+
}));
|
|
177
|
+
};
|
|
178
|
+
var PageNumber = function PageNumber(_ref3) {
|
|
179
|
+
var className = _ref3.className,
|
|
180
|
+
onClick = _ref3.onClick,
|
|
181
|
+
selected = _ref3.selected,
|
|
182
|
+
title = _ref3.title;
|
|
183
|
+
return /*#__PURE__*/_react["default"].createElement("span", {
|
|
184
|
+
className: className + (selected ? '_selected' : ''),
|
|
185
|
+
onClick: onClick,
|
|
186
|
+
title: title,
|
|
187
|
+
tabIndex: 0
|
|
188
|
+
}, title);
|
|
189
|
+
};
|
|
190
|
+
var usePagination = exports.usePagination = function usePagination(fetchCallback, dependencies, filters) {
|
|
191
|
+
var lang = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 'ru';
|
|
192
|
+
var setParams = arguments.length > 4 ? arguments[4] : undefined;
|
|
193
|
+
var _useState3 = (0, _react.useState)(0),
|
|
194
|
+
_useState4 = _slicedToArray(_useState3, 2),
|
|
195
|
+
total = _useState4[0],
|
|
196
|
+
setTotal = _useState4[1];
|
|
197
|
+
var _useState5 = (0, _react.useState)(DEFAULT_PAGE),
|
|
198
|
+
_useState6 = _slicedToArray(_useState5, 2),
|
|
199
|
+
page = _useState6[0],
|
|
200
|
+
setPage = _useState6[1];
|
|
201
|
+
var _useState7 = (0, _react.useState)(PAGE_SIZES[0]),
|
|
202
|
+
_useState8 = _slicedToArray(_useState7, 2),
|
|
203
|
+
limit = _useState8[0],
|
|
204
|
+
setLimit = _useState8[1];
|
|
205
|
+
var _useState9 = (0, _react.useState)(false),
|
|
206
|
+
_useState10 = _slicedToArray(_useState9, 2),
|
|
207
|
+
noFetch = _useState10[0],
|
|
208
|
+
setNoFetch = _useState10[1];
|
|
209
|
+
var reset = function reset() {
|
|
210
|
+
setPage(DEFAULT_PAGE);
|
|
211
|
+
if (page !== DEFAULT_PAGE) setNoFetch(true);
|
|
212
|
+
if (typeof setParams === 'function') {
|
|
213
|
+
setParams([]);
|
|
214
|
+
}
|
|
215
|
+
};
|
|
216
|
+
|
|
217
|
+
// todo - remove
|
|
218
|
+
(0, _react.useEffect)(function () {
|
|
219
|
+
if (dependencies && page !== DEFAULT_PAGE) {
|
|
220
|
+
setPage(DEFAULT_PAGE);
|
|
221
|
+
setNoFetch(true);
|
|
222
|
+
}
|
|
223
|
+
}, dependencies);
|
|
224
|
+
(0, _react.useEffect)(function () {
|
|
225
|
+
if (total === 0) {
|
|
226
|
+
return;
|
|
227
|
+
}
|
|
228
|
+
if (noFetch) {
|
|
229
|
+
setNoFetch(false);
|
|
230
|
+
return;
|
|
231
|
+
}
|
|
232
|
+
if (fetchCallback) {
|
|
233
|
+
var abortController = fetchCallback(filters) || new AbortController();
|
|
234
|
+
return function () {
|
|
235
|
+
if (abortController !== null && abortController !== void 0 && abortController.abort) {
|
|
236
|
+
console.log(abortController);
|
|
237
|
+
abortController.abort();
|
|
238
|
+
}
|
|
239
|
+
};
|
|
240
|
+
}
|
|
241
|
+
}, [page, limit, filters]);
|
|
242
|
+
var _useState11 = (0, _react.useState)(typeof localStorage !== 'undefined' ? localStorage.getItem("lang") : 'ru' || 'ru'),
|
|
243
|
+
_useState12 = _slicedToArray(_useState11, 2),
|
|
244
|
+
settings = _useState12[0],
|
|
245
|
+
setSettings = _useState12[1];
|
|
246
|
+
(0, _react.useEffect)(function () {
|
|
247
|
+
if (typeof localStorage !== 'undefined') {
|
|
248
|
+
setSettings(localStorage.getItem("lang"));
|
|
249
|
+
}
|
|
250
|
+
}, []);
|
|
251
|
+
var PaginatorComponent = /*#__PURE__*/_react["default"].createElement(Paginator, {
|
|
252
|
+
lang: settings,
|
|
253
|
+
pageSize: limit,
|
|
254
|
+
pageNumber: page,
|
|
255
|
+
setPageSize: setLimit,
|
|
256
|
+
setPageNumber: setPage,
|
|
257
|
+
total: total
|
|
258
|
+
});
|
|
259
|
+
return [page, limit, total, setTotal, PaginatorComponent, reset];
|
|
260
|
+
};
|
|
@@ -0,0 +1,198 @@
|
|
|
1
|
+
.pagination_wrapper {
|
|
2
|
+
&_disabled {
|
|
3
|
+
width: 123px;
|
|
4
|
+
opacity: 0.3;
|
|
5
|
+
pointer-events: none;
|
|
6
|
+
}
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
.pagination_container {
|
|
10
|
+
display: flex;
|
|
11
|
+
align-items: center;
|
|
12
|
+
flex-wrap: wrap;
|
|
13
|
+
justify-content: center;
|
|
14
|
+
gap: 2px;
|
|
15
|
+
|
|
16
|
+
&::-webkit-scrollbar {
|
|
17
|
+
display: none;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
-ms-overflow-style: none;
|
|
21
|
+
scrollbar-width: none;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
.page-num {
|
|
25
|
+
display: flex;
|
|
26
|
+
align-items: center;
|
|
27
|
+
justify-content: center;
|
|
28
|
+
min-width: 24px;
|
|
29
|
+
height: 24px;
|
|
30
|
+
text-align: center;
|
|
31
|
+
font-family: NunitoSans;
|
|
32
|
+
color: #11195D;
|
|
33
|
+
text-align: center;
|
|
34
|
+
font-size: 14px;
|
|
35
|
+
font-style: normal;
|
|
36
|
+
font-weight: 400;
|
|
37
|
+
//line-height: 16px;
|
|
38
|
+
border-radius: 4px;
|
|
39
|
+
cursor: pointer;
|
|
40
|
+
padding-left: 2px;
|
|
41
|
+
padding-right: 2px;
|
|
42
|
+
|
|
43
|
+
&_selected {
|
|
44
|
+
display: flex;
|
|
45
|
+
transition: 0.3s;
|
|
46
|
+
@extend .page-num;
|
|
47
|
+
background-color: #51CA64;
|
|
48
|
+
color: white;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
&:hover {
|
|
52
|
+
transition: 0.3s;
|
|
53
|
+
background-color: #51CA64;
|
|
54
|
+
color: white
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
.dots {
|
|
59
|
+
@extend .page-num;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
.arrow_next {
|
|
63
|
+
@extend .page-num;
|
|
64
|
+
display: flex;
|
|
65
|
+
position: relative;
|
|
66
|
+
width: 12px;
|
|
67
|
+
height: 24px;
|
|
68
|
+
background-image: url('./img/arrow_next.svg');
|
|
69
|
+
background-repeat: no-repeat;
|
|
70
|
+
background-position: center;
|
|
71
|
+
transform: rotate(180deg);
|
|
72
|
+
-ms-transform: rotate(180deg);
|
|
73
|
+
-webkit-transform: rotate(180deg);
|
|
74
|
+
-moz-transform: rotate(180deg);
|
|
75
|
+
-o-transform: rotate(180deg);
|
|
76
|
+
|
|
77
|
+
&:hover {
|
|
78
|
+
background-color: inherit;
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
// @include optimizeSafariSvg(url('./img/arrow_next.svg'));
|
|
82
|
+
&::before {
|
|
83
|
+
transform: scale(0.13);
|
|
84
|
+
transform-origin: 46px 7px;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
&[disabled] {
|
|
88
|
+
opacity: 0.5;
|
|
89
|
+
|
|
90
|
+
&:hover {
|
|
91
|
+
background-color: unset;
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
pointer-events: none;
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
.arrow_prev {
|
|
99
|
+
@extend .page-num;
|
|
100
|
+
display: flex;
|
|
101
|
+
position: relative;
|
|
102
|
+
width: 12px;
|
|
103
|
+
height: 24px;
|
|
104
|
+
background-image: url('./img/arrow_prev.svg');
|
|
105
|
+
background-repeat: no-repeat;
|
|
106
|
+
background-position: center;
|
|
107
|
+
|
|
108
|
+
// @include optimizeSafariSvg(url('./img/arrow_next.svg'));
|
|
109
|
+
&::before {
|
|
110
|
+
background-image: none;
|
|
111
|
+
transform: scale(0.13) scaleX(-1);
|
|
112
|
+
transform-origin: 42px 7px;
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
&[disabled] {
|
|
116
|
+
@extend .arrow_prev;
|
|
117
|
+
opacity: 0.1;
|
|
118
|
+
|
|
119
|
+
&:hover {
|
|
120
|
+
background-color: unset;
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
pointer-events: none;
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
.arrow_wrapper:has(.arrow_prev[disabled]) {
|
|
128
|
+
cursor: not-allowed;
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
.paginator {
|
|
132
|
+
padding: 8px 12px;
|
|
133
|
+
background-color: #FAFBFA;
|
|
134
|
+
border-radius: 0px 0px 8px 8px;
|
|
135
|
+
width: 100%;
|
|
136
|
+
display: flex;
|
|
137
|
+
gap: 16px;
|
|
138
|
+
align-items: flex-start;
|
|
139
|
+
justify-content: space-between;
|
|
140
|
+
gap: 0px;
|
|
141
|
+
|
|
142
|
+
.total-info {
|
|
143
|
+
font-size: 14px;
|
|
144
|
+
// align-self: center;
|
|
145
|
+
text-align: center;
|
|
146
|
+
font-family: NunitoSans;
|
|
147
|
+
color: #11195D;
|
|
148
|
+
font-size: 14px;
|
|
149
|
+
font-style: normal;
|
|
150
|
+
font-weight: 400;
|
|
151
|
+
padding: 2px;
|
|
152
|
+
// line-height: 16px;
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
.select-page {
|
|
157
|
+
box-sizing: border-box;
|
|
158
|
+
outline: .5px solid #F0F0F0;
|
|
159
|
+
padding: .25em .5em;
|
|
160
|
+
border: 1px solid #F0F0F0;
|
|
161
|
+
border-radius: 4px;
|
|
162
|
+
-moz-appearance: none;
|
|
163
|
+
-webkit-appearance: none;
|
|
164
|
+
width: 60px;
|
|
165
|
+
background-image: url('./img/arrow_blue.svg');
|
|
166
|
+
background-size: 12px 12px;
|
|
167
|
+
background-position: right 8px center;
|
|
168
|
+
background-repeat: no-repeat;
|
|
169
|
+
font-size: 12px;
|
|
170
|
+
margin: 0 4px;
|
|
171
|
+
background-color: #F9FAFF;
|
|
172
|
+
outline: none;
|
|
173
|
+
border: none;
|
|
174
|
+
font-family: NunitoSans;
|
|
175
|
+
color: #11195D;
|
|
176
|
+
font-size: 14px;
|
|
177
|
+
font-style: normal;
|
|
178
|
+
font-weight: 400;
|
|
179
|
+
line-height: 16px;
|
|
180
|
+
max-height: 24px;
|
|
181
|
+
min-height: 24px;
|
|
182
|
+
min-width: 50px;
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
@media (max-width: 600px) {
|
|
186
|
+
.page-num {
|
|
187
|
+
display: none;
|
|
188
|
+
|
|
189
|
+
&_selected {
|
|
190
|
+
display: flex;
|
|
191
|
+
}
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
.arrow_prev,
|
|
195
|
+
.arrow_next {
|
|
196
|
+
display: flex;
|
|
197
|
+
}
|
|
198
|
+
}
|