fui-material 0.2.60 → 0.2.61
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/bundle.css +1980 -0
- package/dist/bundle.esm.css +1980 -0
- package/dist/bundle.esm.js +1341 -0
- package/dist/bundle.js +1398 -0
- package/dist/function-elements/fAlert/fAlert.d.ts +8 -0
- package/dist/function-elements/fAlert/index.d.ts +1 -0
- package/dist/function-elements/fConfirm/fConfirm.d.ts +7 -0
- package/dist/function-elements/fConfirm/index.d.ts +1 -0
- package/dist/function-elements/fPrompt/fPrompt.d.ts +8 -0
- package/dist/function-elements/fPrompt/index.d.ts +1 -0
- package/dist/function-elements/index.d.ts +3 -0
- package/dist/icons/FArrowIcon/FArrowIcon.d.ts +13 -0
- package/dist/icons/FArrowIcon/index.d.ts +1 -0
- package/dist/icons/FCheckIcon/FCheckIcon.d.ts +12 -0
- package/dist/icons/FCheckIcon/index.d.ts +1 -0
- package/dist/icons/FCloseIcon/FCloseIcon.d.ts +12 -0
- package/dist/icons/FCloseIcon/index.d.ts +1 -0
- package/dist/icons/FCopyAddIcon/FCopyAdd.d.ts +12 -0
- package/dist/icons/FDownloadIcon/FDownloadIcon.d.ts +11 -0
- package/dist/icons/FDownloadIcon/index.d.ts +1 -0
- package/dist/icons/FFilterIcon/FFilterIcon.d.ts +11 -0
- package/dist/icons/FFilterIcon/index.d.ts +1 -0
- package/dist/icons/FListIcon/FListIcon.d.ts +12 -0
- package/dist/icons/FListIcon/index.d.ts +1 -0
- package/dist/icons/FLoadIcon/FLoadIcon.d.ts +12 -0
- package/dist/icons/FLoadIcon/index.d.ts +1 -0
- package/dist/icons/FPenIcon/FPenIcon.d.ts +12 -0
- package/dist/icons/FPenIcon/index.d.ts +1 -0
- package/dist/icons/FPlusIcon/FPlusIcon.d.ts +12 -0
- package/dist/icons/FPlusIcon/index.d.ts +1 -0
- package/dist/icons/FTrashIcon/FTrashIcon.d.ts +12 -0
- package/dist/icons/FTrashIcon/index.d.ts +1 -0
- package/dist/icons/FUnlinkIcon/FUnlinkIcon.d.ts +12 -0
- package/dist/icons/index.d.ts +12 -0
- package/dist/material/Dialog/FDialog/FDialog.d.ts +14 -0
- package/dist/material/Dialog/FDialog/index.d.ts +1 -0
- package/dist/material/Dialog/FDialogBody/FDialogBody.d.ts +8 -0
- package/dist/material/Dialog/FDialogBody/index.d.ts +1 -0
- package/dist/material/Dialog/FDialogFooter/FDialogFooter.d.ts +6 -0
- package/dist/material/Dialog/FDialogFooter/index.d.ts +1 -0
- package/dist/material/Dialog/FDialogHeader/FDialogHeader.d.ts +7 -0
- package/dist/material/Dialog/FDialogHeader/index.d.ts +1 -0
- package/dist/material/Dropdown/FDropdown/FDropdown.d.ts +15 -0
- package/dist/material/Dropdown/FDropdownItem/FDropdownItem.d.ts +11 -0
- package/dist/material/FAccordion/FAccordion.d.ts +13 -0
- package/dist/material/FAccordion/index.d.ts +1 -0
- package/dist/material/FAlert/FAlert.d.ts +18 -0
- package/dist/material/FAlert/index.d.ts +1 -0
- package/dist/material/FButton/FButton.d.ts +18 -0
- package/dist/material/FButton/index.d.ts +1 -0
- package/dist/material/FButtonFile/FButtonFile.d.ts +21 -0
- package/dist/material/FButtonFile/index.d.ts +1 -0
- package/dist/material/FCheckbox/FCheckbox.d.ts +14 -0
- package/dist/material/FCheckbox/index.d.ts +1 -0
- package/dist/material/FContainer/FContainer.d.ts +11 -0
- package/dist/material/FContainer/index.d.ts +1 -0
- package/dist/material/FFile/FFile.d.ts +10 -0
- package/dist/material/FFile/index.d.ts +1 -0
- package/dist/material/FFullDateField/FFullDateField.d.ts +24 -0
- package/dist/material/FFullDateField/index.d.ts +1 -0
- package/dist/material/FGrid/FGrid.d.ts +17 -0
- package/dist/material/FGrid/index.d.ts +1 -0
- package/dist/material/FInputFileForm/FInputFileForm.d.ts +20 -0
- package/dist/material/FInputFileForm/index.d.ts +1 -0
- package/dist/material/FNative/FNative.d.ts +19 -0
- package/dist/material/FNative/index.d.ts +1 -0
- package/dist/material/FOpenImgFull/FOpenImgFull.d.ts +14 -0
- package/dist/material/FOpenImgFull/index.d.ts +1 -0
- package/dist/material/FPagination/FPagination.d.ts +14 -0
- package/dist/material/FPagination/hooks/usePagination.d.ts +9 -0
- package/dist/material/FPagination/index.d.ts +1 -0
- package/dist/material/FPaper/FPaper.d.ts +18 -0
- package/dist/material/FPaper/index.d.ts +1 -0
- package/dist/material/FPreloader/FPreloader.d.ts +10 -0
- package/dist/material/FPreloader/index.d.ts +1 -0
- package/dist/material/FProgress/FProgress.d.ts +8 -0
- package/dist/material/FProgress/index.d.ts +1 -0
- package/dist/material/FRadioButton/FRadioButton.d.ts +13 -0
- package/dist/material/FRadioButton/index.d.ts +1 -0
- package/dist/material/FSearchBox/FSearchBox.d.ts +32 -0
- package/dist/material/FSelectSearchDb/FSelectSearchDb.d.ts +21 -0
- package/dist/material/FSelectSearchDb/index.d.ts +1 -0
- package/dist/material/FStack/FStack.d.ts +14 -0
- package/dist/material/FStack/index.d.ts +1 -0
- package/dist/material/FTextArea/FTextArea.d.ts +23 -0
- package/dist/material/FTextArea/index.d.ts +1 -0
- package/dist/material/FTextField/FTextField.d.ts +26 -0
- package/dist/material/FTextField/index.d.ts +1 -0
- package/dist/material/FTimelineComponents/FTimeline/FTimeline.d.ts +10 -0
- package/dist/material/FTimelineComponents/FTimeline/index.d.ts +1 -0
- package/dist/material/FTimelineComponents/FTimelineCard/FTimelineCard.d.ts +10 -0
- package/dist/material/FTimelineComponents/FTimelineCard/index.d.ts +1 -0
- package/dist/material/SelectComponents/FSelect/FSelect.d.ts +21 -0
- package/dist/material/SelectComponents/FSelect/index.d.ts +1 -0
- package/dist/material/SelectComponents/FSelectItem/FSelectItem.d.ts +13 -0
- package/dist/material/SelectComponents/FSelectItem/index.d.ts +1 -0
- package/dist/material/TableComponents/FTable/FTable.d.ts +12 -0
- package/dist/material/TableComponents/FTable/index.d.ts +1 -0
- package/dist/material/TableComponents/FTableBody/FTableBody.d.ts +10 -0
- package/dist/material/TableComponents/FTableBody/index.d.ts +1 -0
- package/dist/material/TableComponents/FTableDataCell/FTableDataCell.d.ts +14 -0
- package/dist/material/TableComponents/FTableDataCell/index.d.ts +1 -0
- package/dist/material/TableComponents/FTableFooter/FTableFooter.d.ts +10 -0
- package/dist/material/TableComponents/FTableFooter/index.d.ts +1 -0
- package/dist/material/TableComponents/FTableHead/FTableHead.d.ts +10 -0
- package/dist/material/TableComponents/FTableHead/index.d.ts +1 -0
- package/dist/material/TableComponents/FTableHeaderCell/FTableHeaderCell.d.ts +12 -0
- package/dist/material/TableComponents/FTableHeaderCell/index.d.ts +1 -0
- package/dist/material/TableComponents/FTableRow/FTableRow.d.ts +10 -0
- package/dist/material/TableComponents/FTableRow/index.d.ts +1 -0
- package/dist/material/Tabs/FTab/FTab.d.ts +13 -0
- package/dist/material/Tabs/FTabs/FTabs.d.ts +10 -0
- package/dist/material/index.d.ts +41 -0
- package/package.json +7 -2
- package/.storybook/main.ts +0 -19
- package/.storybook/preview.ts +0 -15
- package/bun.lockb +0 -0
- package/public/favicon.ico +0 -0
- package/public/index.html +0 -43
- package/public/logo192.png +0 -0
- package/public/logo512.png +0 -0
- package/public/manifest.json +0 -25
- package/public/robots.txt +0 -3
- package/rollup.config.js +0 -33
- package/src/function-elements/fAlert/fAlert.css +0 -99
- package/src/function-elements/fAlert/fAlert.ts +0 -66
- package/src/function-elements/fAlert/index.tsx +0 -1
- package/src/function-elements/fConfirm/fConfirm.css +0 -80
- package/src/function-elements/fConfirm/fConfirm.ts +0 -66
- package/src/function-elements/fConfirm/index.tsx +0 -1
- package/src/function-elements/fPrompt/fPrompt.css +0 -85
- package/src/function-elements/fPrompt/fPrompt.ts +0 -77
- package/src/function-elements/fPrompt/index.tsx +0 -1
- package/src/function-elements/index.ts +0 -3
- package/src/icons/FArrowIcon/FArrowIcon.tsx +0 -50
- package/src/icons/FArrowIcon/index.ts +0 -1
- package/src/icons/FCheckIcon/FCheckIcon.tsx +0 -37
- package/src/icons/FCheckIcon/index.ts +0 -1
- package/src/icons/FCloseIcon/FCloseIcon.tsx +0 -28
- package/src/icons/FCloseIcon/index.ts +0 -1
- package/src/icons/FCopyAddIcon/FCopyAdd.tsx +0 -30
- package/src/icons/FDownloadIcon/FDownloadIcon.tsx +0 -29
- package/src/icons/FDownloadIcon/index.ts +0 -1
- package/src/icons/FFilterIcon/FFilterIcon.tsx +0 -28
- package/src/icons/FFilterIcon/index.ts +0 -1
- package/src/icons/FListIcon/FListIcon.tsx +0 -38
- package/src/icons/FListIcon/index.ts +0 -1
- package/src/icons/FLoadIcon/FLoadIcon.tsx +0 -61
- package/src/icons/FLoadIcon/FLoadIconCss.css +0 -48
- package/src/icons/FLoadIcon/index.ts +0 -1
- package/src/icons/FPenIcon/FPenIcon.tsx +0 -29
- package/src/icons/FPenIcon/index.ts +0 -1
- package/src/icons/FPlusIcon/FPlusIcon.tsx +0 -39
- package/src/icons/FPlusIcon/index.ts +0 -1
- package/src/icons/FTrashIcon/FTrashIcon.tsx +0 -40
- package/src/icons/FTrashIcon/index.ts +0 -1
- package/src/icons/FUnlinkIcon/FUnlinkIcon.tsx +0 -38
- package/src/icons/index.ts +0 -12
- package/src/material/Dialog/FDialog/FDialog.tsx +0 -61
- package/src/material/Dialog/FDialog/index.ts +0 -1
- package/src/material/Dialog/FDialogBody/FDialogBody.tsx +0 -43
- package/src/material/Dialog/FDialogBody/index.ts +0 -1
- package/src/material/Dialog/FDialogFooter/FDialogFooter.tsx +0 -26
- package/src/material/Dialog/FDialogFooter/index.ts +0 -1
- package/src/material/Dialog/FDialogHeader/FDialogHeader.tsx +0 -40
- package/src/material/Dialog/FDialogHeader/index.ts +0 -1
- package/src/material/Dialog/style/style.css +0 -73
- package/src/material/Dropdown/FDropdown/FDropdown.tsx +0 -60
- package/src/material/Dropdown/FDropdownItem/FDropdownItem.tsx +0 -35
- package/src/material/Dropdown/statick/FDropdown.css +0 -68
- package/src/material/Dropdown/statick/down-arrow.png +0 -0
- package/src/material/FAccordion/FAccordion.css +0 -80
- package/src/material/FAccordion/FAccordion.tsx +0 -37
- package/src/material/FAccordion/index.ts +0 -1
- package/src/material/FAlert/FAlert.css +0 -153
- package/src/material/FAlert/FAlert.tsx +0 -226
- package/src/material/FAlert/index.ts +0 -1
- package/src/material/FButton/FButton.css +0 -50
- package/src/material/FButton/FButton.tsx +0 -69
- package/src/material/FButton/index.ts +0 -1
- package/src/material/FButtonFile/FButtonFile.css +0 -180
- package/src/material/FButtonFile/FButtonFile.tsx +0 -157
- package/src/material/FButtonFile/index.ts +0 -1
- package/src/material/FCheckbox/Checkbox.css +0 -57
- package/src/material/FCheckbox/FCheckbox.tsx +0 -45
- package/src/material/FCheckbox/index.ts +0 -1
- package/src/material/FContainer/FContainer.css +0 -165
- package/src/material/FContainer/FContainer.tsx +0 -33
- package/src/material/FContainer/index.ts +0 -1
- package/src/material/FFile/FFile.css +0 -0
- package/src/material/FFile/FFile.tsx +0 -46
- package/src/material/FFile/index.ts +0 -1
- package/src/material/FFullDateField/FFullDateField.tsx +0 -137
- package/src/material/FFullDateField/index.ts +0 -1
- package/src/material/FGrid/FGrid.css +0 -179
- package/src/material/FGrid/FGrid.tsx +0 -76
- package/src/material/FGrid/css/bootstrap-theme.css +0 -589
- package/src/material/FGrid/css/bootstrap-theme.min.css +0 -7
- package/src/material/FGrid/css/bootstrap.css +0 -1020
- package/src/material/FGrid/css/bootstrap.min.css +0 -7
- package/src/material/FGrid/index.ts +0 -1
- package/src/material/FInputFileForm/FInputFileForm.css +0 -95
- package/src/material/FInputFileForm/FInputFileForm.tsx +0 -147
- package/src/material/FInputFileForm/index.ts +0 -1
- package/src/material/FNative/FNative.css +0 -41
- package/src/material/FNative/FNative.tsx +0 -97
- package/src/material/FNative/index.ts +0 -1
- package/src/material/FOpenImgFull/FOpenImgFull.css +0 -10
- package/src/material/FOpenImgFull/FOpenImgFull.tsx +0 -109
- package/src/material/FOpenImgFull/index.ts +0 -1
- package/src/material/FOpenImgFull/statick/1.png +0 -0
- package/src/material/FOpenImgFull/statick/3.png +0 -0
- package/src/material/FOpenImgFull/statick/OKrG1rmJMps.jpg +0 -0
- package/src/material/FPagination/FPagination.css +0 -59
- package/src/material/FPagination/FPagination.tsx +0 -90
- package/src/material/FPagination/hooks/usePagination.tsx +0 -69
- package/src/material/FPagination/index.ts +0 -1
- package/src/material/FPaper/FPaper.css +0 -61
- package/src/material/FPaper/FPaper.tsx +0 -62
- package/src/material/FPaper/index.ts +0 -1
- package/src/material/FPreloader/FPreloader.css +0 -21
- package/src/material/FPreloader/FPreloader.tsx +0 -49
- package/src/material/FPreloader/index.ts +0 -1
- package/src/material/FProgress/FProgress.css +0 -9
- package/src/material/FProgress/FProgress.tsx +0 -41
- package/src/material/FProgress/index.ts +0 -1
- package/src/material/FRadioButton/FRadioButton.tsx +0 -43
- package/src/material/FRadioButton/RadioButton.css +0 -58
- package/src/material/FRadioButton/index.ts +0 -1
- package/src/material/FSearchBox/FSearchBox.css +0 -11
- package/src/material/FSearchBox/FSearchBox.tsx +0 -184
- package/src/material/FSelectSearchDb/FSelectSearchDb.css +0 -83
- package/src/material/FSelectSearchDb/FSelectSearchDb.tsx +0 -196
- package/src/material/FSelectSearchDb/index.ts +0 -1
- package/src/material/FStack/FStack.css +0 -3
- package/src/material/FStack/FStack.tsx +0 -55
- package/src/material/FStack/index.ts +0 -1
- package/src/material/FTextArea/FTextArea.tsx +0 -124
- package/src/material/FTextArea/index.ts +0 -1
- package/src/material/FTextField/FTextField.css +0 -95
- package/src/material/FTextField/FTextField.tsx +0 -163
- package/src/material/FTextField/index.ts +0 -1
- package/src/material/FTimelineComponents/FTimeline/FTimeline.css +0 -82
- package/src/material/FTimelineComponents/FTimeline/FTimeline.tsx +0 -28
- package/src/material/FTimelineComponents/FTimeline/index.ts +0 -1
- package/src/material/FTimelineComponents/FTimelineCard/FTimelineCard.tsx +0 -31
- package/src/material/FTimelineComponents/FTimelineCard/index.ts +0 -1
- package/src/material/SelectComponents/FSelect/FSelect.css +0 -0
- package/src/material/SelectComponents/FSelect/FSelect.tsx +0 -121
- package/src/material/SelectComponents/FSelect/index.ts +0 -1
- package/src/material/SelectComponents/FSelectItem/FSelectItem.tsx +0 -42
- package/src/material/SelectComponents/FSelectItem/index.ts +0 -1
- package/src/material/TableComponents/FTable/FTable.css +0 -62
- package/src/material/TableComponents/FTable/FTable.tsx +0 -39
- package/src/material/TableComponents/FTable/index.ts +0 -1
- package/src/material/TableComponents/FTableBody/FTableBody.tsx +0 -28
- package/src/material/TableComponents/FTableBody/index.ts +0 -1
- package/src/material/TableComponents/FTableDataCell/FTableDataCell.tsx +0 -45
- package/src/material/TableComponents/FTableDataCell/index.ts +0 -1
- package/src/material/TableComponents/FTableFooter/FTableFooter.tsx +0 -29
- package/src/material/TableComponents/FTableFooter/index.ts +0 -1
- package/src/material/TableComponents/FTableHead/FTableHead.tsx +0 -28
- package/src/material/TableComponents/FTableHead/index.ts +0 -1
- package/src/material/TableComponents/FTableHeaderCell/FTableHeaderCell.tsx +0 -39
- package/src/material/TableComponents/FTableHeaderCell/index.ts +0 -1
- package/src/material/TableComponents/FTableRow/FTableRow.tsx +0 -28
- package/src/material/TableComponents/FTableRow/index.ts +0 -1
- package/src/material/Tabs/FTab/FTab.tsx +0 -39
- package/src/material/Tabs/FTabs/FTabs.tsx +0 -27
- package/src/material/Tabs/styles/FTabs.css +0 -49
- package/src/material/index.ts +0 -60
- package/src/material/statick/Colors.css +0 -87
- package/src/material/statick/index.css +0 -7
- package/tsconfig.json +0 -21
- /package/{src/icons/FCopyAddIcon/index.ts → dist/icons/FCopyAddIcon/index.d.ts} +0 -0
- /package/{src/icons/FUnlinkIcon/index.ts → dist/icons/FUnlinkIcon/index.d.ts} +0 -0
- /package/{src/index.ts → dist/index.d.ts} +0 -0
- /package/{src/material/Dropdown/FDropdown/index.ts → dist/material/Dropdown/FDropdown/index.d.ts} +0 -0
- /package/{src/material/Dropdown/FDropdownItem/index.ts → dist/material/Dropdown/FDropdownItem/index.d.ts} +0 -0
- /package/{src/material/FSearchBox/index.ts → dist/material/FSearchBox/index.d.ts} +0 -0
- /package/{src/material/Tabs/FTab/index.ts → dist/material/Tabs/FTab/index.d.ts} +0 -0
- /package/{src/material/Tabs/FTabs/index.ts → dist/material/Tabs/FTabs/index.d.ts} +0 -0
|
@@ -1,90 +0,0 @@
|
|
|
1
|
-
import React, {FC} from 'react';
|
|
2
|
-
import {usePagination, DOTS} from './hooks/usePagination';
|
|
3
|
-
import "./FPagination.css"
|
|
4
|
-
|
|
5
|
-
export interface IFPagination {
|
|
6
|
-
currentPage: number,
|
|
7
|
-
totalCount: number,
|
|
8
|
-
pageSize: number,
|
|
9
|
-
onPageChange: (page: number | string | number) => void,
|
|
10
|
-
id?: string,
|
|
11
|
-
className?: string,
|
|
12
|
-
st?: React.CSSProperties | undefined
|
|
13
|
-
siblingCount: 0 | 1 | 2
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
const FPagination: FC<IFPagination> = ({
|
|
17
|
-
currentPage,
|
|
18
|
-
totalCount,
|
|
19
|
-
pageSize,
|
|
20
|
-
onPageChange,
|
|
21
|
-
id,
|
|
22
|
-
className,
|
|
23
|
-
st,
|
|
24
|
-
siblingCount
|
|
25
|
-
}) => {
|
|
26
|
-
|
|
27
|
-
const paginationRange = usePagination({
|
|
28
|
-
currentPage,
|
|
29
|
-
totalCount,
|
|
30
|
-
siblingCount,
|
|
31
|
-
pageSize
|
|
32
|
-
});
|
|
33
|
-
|
|
34
|
-
// @ts-ignore
|
|
35
|
-
if (currentPage === 0 || paginationRange.length < 2) {
|
|
36
|
-
return null;
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
const onNext = () => {
|
|
40
|
-
onPageChange(currentPage + 1);
|
|
41
|
-
};
|
|
42
|
-
|
|
43
|
-
const onPrevious = () => {
|
|
44
|
-
onPageChange(currentPage - 1);
|
|
45
|
-
};
|
|
46
|
-
|
|
47
|
-
// @ts-ignore
|
|
48
|
-
let lastPage = paginationRange[paginationRange.length - 1];
|
|
49
|
-
|
|
50
|
-
return (
|
|
51
|
-
<React.Fragment>
|
|
52
|
-
<ul
|
|
53
|
-
className={`pagination-container ${className !== undefined ? className : ''}`}
|
|
54
|
-
style={st}
|
|
55
|
-
id={`${id !== undefined ? id : ''}`}
|
|
56
|
-
>
|
|
57
|
-
<li
|
|
58
|
-
className={`pagination-item ${currentPage === 1 ? 'disabled' : ''}`}
|
|
59
|
-
onClick={onPrevious}
|
|
60
|
-
>
|
|
61
|
-
<div className="arrow left"/>
|
|
62
|
-
</li>
|
|
63
|
-
{/*@ts-ignore*/}
|
|
64
|
-
{paginationRange.map(pageNumber => {
|
|
65
|
-
if (pageNumber === DOTS) {
|
|
66
|
-
return <li className="pagination-item dots">…</li>;
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
return (
|
|
70
|
-
<li
|
|
71
|
-
className={`pagination-item ${pageNumber === currentPage ? 'selected' : ''}`}
|
|
72
|
-
id={'test-id'}
|
|
73
|
-
onClick={() => onPageChange(pageNumber)}
|
|
74
|
-
>
|
|
75
|
-
{pageNumber}
|
|
76
|
-
</li>
|
|
77
|
-
);
|
|
78
|
-
})}
|
|
79
|
-
<li
|
|
80
|
-
className={`pagination-item ${currentPage === lastPage ? 'disabled' : ''}`}
|
|
81
|
-
onClick={onNext}
|
|
82
|
-
>
|
|
83
|
-
<div className="arrow right"/>
|
|
84
|
-
</li>
|
|
85
|
-
</ul>
|
|
86
|
-
</React.Fragment>
|
|
87
|
-
);
|
|
88
|
-
};
|
|
89
|
-
|
|
90
|
-
export default FPagination;
|
|
@@ -1,69 +0,0 @@
|
|
|
1
|
-
import React, {FC} from 'react';
|
|
2
|
-
import {useMemo} from 'react';
|
|
3
|
-
|
|
4
|
-
export const DOTS = '...';
|
|
5
|
-
|
|
6
|
-
const range = (start: number, end: number) => {
|
|
7
|
-
let length = end - start + 1;
|
|
8
|
-
return Array.from({length}, (_, idx) => idx + start);
|
|
9
|
-
};
|
|
10
|
-
|
|
11
|
-
interface IProps {
|
|
12
|
-
currentPage: number,
|
|
13
|
-
totalCount: number,
|
|
14
|
-
pageSize: number,
|
|
15
|
-
siblingCount: number,
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
export const usePagination = ({
|
|
19
|
-
totalCount,
|
|
20
|
-
pageSize,
|
|
21
|
-
siblingCount = 1,
|
|
22
|
-
currentPage
|
|
23
|
-
}: IProps) => {
|
|
24
|
-
|
|
25
|
-
const paginationRange = useMemo(() => {
|
|
26
|
-
const totalPageCount = Math.ceil(totalCount / pageSize);
|
|
27
|
-
|
|
28
|
-
const totalPageNumbers = siblingCount + 5;
|
|
29
|
-
|
|
30
|
-
if (totalPageNumbers >= totalPageCount) {
|
|
31
|
-
return range(1, totalPageCount);
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
const leftSiblingIndex = Math.max(currentPage - siblingCount, 1);
|
|
35
|
-
const rightSiblingIndex = Math.min(
|
|
36
|
-
currentPage + siblingCount,
|
|
37
|
-
totalPageCount
|
|
38
|
-
);
|
|
39
|
-
|
|
40
|
-
const shouldShowLeftDots = leftSiblingIndex > 2;
|
|
41
|
-
const shouldShowRightDots = rightSiblingIndex < totalPageCount - 2;
|
|
42
|
-
|
|
43
|
-
const firstPageIndex = 1;
|
|
44
|
-
const lastPageIndex = totalPageCount;
|
|
45
|
-
|
|
46
|
-
if (!shouldShowLeftDots && shouldShowRightDots) {
|
|
47
|
-
let leftItemCount = 3 + 2 * siblingCount;
|
|
48
|
-
let leftRange = range(1, leftItemCount);
|
|
49
|
-
|
|
50
|
-
return [...leftRange, DOTS, totalPageCount];
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
if (shouldShowLeftDots && !shouldShowRightDots) {
|
|
54
|
-
let rightItemCount = 3 + 2 * siblingCount;
|
|
55
|
-
let rightRange = range(
|
|
56
|
-
totalPageCount - rightItemCount + 1,
|
|
57
|
-
totalPageCount
|
|
58
|
-
);
|
|
59
|
-
return [firstPageIndex, DOTS, ...rightRange];
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
if (shouldShowLeftDots && shouldShowRightDots) {
|
|
63
|
-
let middleRange = range(leftSiblingIndex, rightSiblingIndex);
|
|
64
|
-
return [firstPageIndex, DOTS, ...middleRange, DOTS, lastPageIndex];
|
|
65
|
-
}
|
|
66
|
-
}, [totalCount, pageSize, siblingCount, currentPage]);
|
|
67
|
-
|
|
68
|
-
return paginationRange;
|
|
69
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { default } from "./FPagination";
|
|
@@ -1,61 +0,0 @@
|
|
|
1
|
-
.panel {
|
|
2
|
-
border: 0 none;
|
|
3
|
-
}
|
|
4
|
-
|
|
5
|
-
.panel-default {
|
|
6
|
-
box-shadow: 0px 0px 5px rgb(0 0 0 / 20%);
|
|
7
|
-
margin-bottom: 20px;
|
|
8
|
-
background-color: #fff;
|
|
9
|
-
border-radius: 8px;
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
.panel-default > .panel-heading {
|
|
13
|
-
color: #000;
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
.panel-default > .panel-heading {
|
|
17
|
-
background-color: #F8F8F8;
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
.panel-heading {
|
|
21
|
-
padding: 10px 40px;
|
|
22
|
-
border-bottom: 1px solid transparent;
|
|
23
|
-
border-top-right-radius: 7px;
|
|
24
|
-
border-top-left-radius: 7px;
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
.panel-body {
|
|
28
|
-
padding: 15px 40px;
|
|
29
|
-
width: auto;
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
.portlet-body .panel-title:last-child, .panel-group.panel-group-accordion .panel-title:last-child, .form-title:last-child {
|
|
33
|
-
margin-bottom: 0;
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
.panel-group.panel-group-accordion .panel-title, .portlet-body .panel-title {
|
|
37
|
-
font-size: 16px;
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
.portlet-body .panel-title, .panel-group.panel-group-accordion .panel-title, .form-title {
|
|
41
|
-
font-family: "SF UI Display", sans-serif;
|
|
42
|
-
line-height: 1.2;
|
|
43
|
-
color: inherit;
|
|
44
|
-
font-weight: bold;
|
|
45
|
-
margin: 0;
|
|
46
|
-
margin-bottom: 20px;
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
.panel-title {
|
|
50
|
-
font-size: 1em;
|
|
51
|
-
font-weight: 500;
|
|
52
|
-
overflow-wrap: break-word;
|
|
53
|
-
word-wrap: break-word;
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
.panel-title {
|
|
57
|
-
margin-top: 0;
|
|
58
|
-
margin-bottom: 0;
|
|
59
|
-
font-size: 16px;
|
|
60
|
-
color: inherit;
|
|
61
|
-
}
|
|
@@ -1,62 +0,0 @@
|
|
|
1
|
-
import React, {FC, useEffect} from "react";
|
|
2
|
-
import "./FPaper.css"
|
|
3
|
-
|
|
4
|
-
export interface IFPaper {
|
|
5
|
-
label?: string
|
|
6
|
-
children?: React.ReactChild | React.ReactNode
|
|
7
|
-
st?: React.CSSProperties
|
|
8
|
-
fontSizeLabel?: string
|
|
9
|
-
fontSizeBody?: string
|
|
10
|
-
id?: string
|
|
11
|
-
className?: string,
|
|
12
|
-
onAnimationEnd?: () => void,
|
|
13
|
-
animated?: {
|
|
14
|
-
name: string,
|
|
15
|
-
value: string
|
|
16
|
-
}
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
const FPaper: FC<IFPaper> = (
|
|
20
|
-
{
|
|
21
|
-
label,
|
|
22
|
-
children,
|
|
23
|
-
st,
|
|
24
|
-
fontSizeLabel,
|
|
25
|
-
id,
|
|
26
|
-
className,
|
|
27
|
-
fontSizeBody,
|
|
28
|
-
onAnimationEnd,
|
|
29
|
-
animated
|
|
30
|
-
}
|
|
31
|
-
) => {
|
|
32
|
-
|
|
33
|
-
useEffect(() => {
|
|
34
|
-
if (animated !== undefined) {
|
|
35
|
-
const element = document.getElementsByClassName(`animated-${animated.name}`)[0];
|
|
36
|
-
element?.setAttribute(animated.name, animated.value);
|
|
37
|
-
}
|
|
38
|
-
}, [animated?.value])
|
|
39
|
-
|
|
40
|
-
return (
|
|
41
|
-
<React.Fragment>
|
|
42
|
-
<div
|
|
43
|
-
className={`panel panel-default ${className} ${animated !== undefined ? `animated-${animated.name}` : ''}`}
|
|
44
|
-
style={st}
|
|
45
|
-
id={id}
|
|
46
|
-
onAnimationEnd={onAnimationEnd}
|
|
47
|
-
>
|
|
48
|
-
{label &&
|
|
49
|
-
<div className="panel-heading">
|
|
50
|
-
<h3 style={{fontSize:fontSizeLabel}} className="panel-title">{label}</h3>
|
|
51
|
-
</div>
|
|
52
|
-
}
|
|
53
|
-
<div
|
|
54
|
-
className="panel-body" style={{fontSize:fontSizeBody}}>
|
|
55
|
-
{children}
|
|
56
|
-
</div>
|
|
57
|
-
</div>
|
|
58
|
-
</React.Fragment>
|
|
59
|
-
)
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
export default FPaper;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { default } from "./FPaper";
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
.f-preloader {
|
|
2
|
-
display: block;
|
|
3
|
-
position: fixed;
|
|
4
|
-
left: 0;
|
|
5
|
-
top: 0;
|
|
6
|
-
right: 0;
|
|
7
|
-
bottom: 0;
|
|
8
|
-
z-index: 1001;
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
.f-preloader-row {
|
|
12
|
-
position: relative;
|
|
13
|
-
top: 50%;
|
|
14
|
-
left: 50%;
|
|
15
|
-
width: 70px;
|
|
16
|
-
height: 70px;
|
|
17
|
-
margin-top: -35px;
|
|
18
|
-
margin-left: -35px;
|
|
19
|
-
text-align: center;
|
|
20
|
-
animation: preloader-rotate 2s infinite linear;
|
|
21
|
-
}
|
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
// *********************************************************************************************************************
|
|
2
|
-
// Родительский компонет прелоадера
|
|
3
|
-
// *********************************************************************************************************************
|
|
4
|
-
|
|
5
|
-
import React, {FC} from "react";
|
|
6
|
-
import "./FPreloader.css"
|
|
7
|
-
|
|
8
|
-
export interface IFPreloader {
|
|
9
|
-
st?: React.CSSProperties,
|
|
10
|
-
backgroundColor?: string,
|
|
11
|
-
children?: React.ReactChild | React.ReactNode,
|
|
12
|
-
open: boolean
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
const FPreloader: FC<IFPreloader> = ({
|
|
17
|
-
st,
|
|
18
|
-
backgroundColor = '#e0e0e0',
|
|
19
|
-
children,
|
|
20
|
-
open
|
|
21
|
-
}) => {
|
|
22
|
-
|
|
23
|
-
if (open) {
|
|
24
|
-
document.body.style.overflow = 'hidden';
|
|
25
|
-
} else {
|
|
26
|
-
document.body.style.overflow = 'auto';
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
let style: React.CSSProperties = {
|
|
30
|
-
backgroundColor: backgroundColor,
|
|
31
|
-
display: open ? 'block' : 'none'
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
if (st !== undefined) {
|
|
35
|
-
style = Object.assign(style, st)
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
return (
|
|
39
|
-
<React.Fragment>
|
|
40
|
-
<div className="f-preloader" style={style}>
|
|
41
|
-
<div className="f-preloader-row">
|
|
42
|
-
{children}
|
|
43
|
-
</div>
|
|
44
|
-
</div>
|
|
45
|
-
</React.Fragment>
|
|
46
|
-
)
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
export default FPreloader
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { default } from "./FPreloader";
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
// *********************************************************************************************************************
|
|
2
|
-
// Родительский компонет прогресс бара
|
|
3
|
-
// *********************************************************************************************************************
|
|
4
|
-
|
|
5
|
-
import React, {FC} from "react";
|
|
6
|
-
import "./FProgress.css"
|
|
7
|
-
|
|
8
|
-
export interface IFProgress {
|
|
9
|
-
st?: React.CSSProperties,
|
|
10
|
-
color?: 'primary' | 'secondary' | 'success' | 'danger' | 'warning' | 'info' | 'light' | 'dark' | 'link'
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
const FProgress: FC<IFProgress> = ({
|
|
15
|
-
st,
|
|
16
|
-
color = 'primary'
|
|
17
|
-
}) => {
|
|
18
|
-
|
|
19
|
-
let style: React.CSSProperties = {
|
|
20
|
-
borderTopColor: color === 'primary' ? '#007bff' :
|
|
21
|
-
color === 'secondary' ? '#6c757d' :
|
|
22
|
-
color === 'success' ? '#28a745' :
|
|
23
|
-
color === 'danger' ? '#dc3545' :
|
|
24
|
-
color === 'warning' ? '#ffc107' :
|
|
25
|
-
color === 'info' ? '#17a2b8' :
|
|
26
|
-
color === 'light' ? '#f8f9fa' :
|
|
27
|
-
color === 'dark' ? '#343a40' : '#007bff'
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
if (st !== undefined) {
|
|
31
|
-
style = Object.assign(style, st)
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
return (
|
|
35
|
-
<React.Fragment>
|
|
36
|
-
<div style={style} className={'f-progress'}/>
|
|
37
|
-
</React.Fragment>
|
|
38
|
-
)
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
export default FProgress
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { default } from "./FProgress";
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
import React, {FC} from "react";
|
|
2
|
-
import './RadioButton.css'
|
|
3
|
-
|
|
4
|
-
export interface IFRadioButton {
|
|
5
|
-
label?: React.ReactChild | React.ReactNode,
|
|
6
|
-
onClick: React.MouseEventHandler<HTMLInputElement> | undefined
|
|
7
|
-
className?: string
|
|
8
|
-
id?: string
|
|
9
|
-
st?: React.CSSProperties | undefined,
|
|
10
|
-
checked?: boolean | undefined
|
|
11
|
-
disabled?: boolean
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
const FRadioButton: FC<IFRadioButton> = ({
|
|
16
|
-
label,
|
|
17
|
-
onClick,
|
|
18
|
-
className,
|
|
19
|
-
id,
|
|
20
|
-
st,
|
|
21
|
-
checked,
|
|
22
|
-
disabled
|
|
23
|
-
}) => {
|
|
24
|
-
|
|
25
|
-
return (
|
|
26
|
-
<React.Fragment>
|
|
27
|
-
<div className={`f-radio ${className !== undefined ? className : ''}`} id={id} style={st}>
|
|
28
|
-
<label>
|
|
29
|
-
<input
|
|
30
|
-
type="radio"
|
|
31
|
-
onClick={onClick}
|
|
32
|
-
checked={checked}
|
|
33
|
-
disabled={disabled}
|
|
34
|
-
/>
|
|
35
|
-
{label}
|
|
36
|
-
</label>
|
|
37
|
-
</div>
|
|
38
|
-
|
|
39
|
-
</React.Fragment>
|
|
40
|
-
)
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
export default FRadioButton;
|
|
@@ -1,58 +0,0 @@
|
|
|
1
|
-
.f-radio label {
|
|
2
|
-
display: flex;
|
|
3
|
-
flex-direction: row;
|
|
4
|
-
gap: 8px;
|
|
5
|
-
color: #656565;
|
|
6
|
-
font-family: "SF UI Display", sans-serif;
|
|
7
|
-
font-size: 14px;
|
|
8
|
-
font-weight: 500;
|
|
9
|
-
align-items: center;
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
/* Наружний круг */
|
|
13
|
-
.f-radio label input[type=radio] {
|
|
14
|
-
-webkit-appearance: none;
|
|
15
|
-
-moz-appearance: none;
|
|
16
|
-
appearance: none;
|
|
17
|
-
background-color: white;
|
|
18
|
-
margin: 0;
|
|
19
|
-
font: inherit;
|
|
20
|
-
color: #C4C4C4;
|
|
21
|
-
width: 16px;
|
|
22
|
-
height: 16px;
|
|
23
|
-
border: 1px solid #C4C4C4;
|
|
24
|
-
border-radius: 50%;
|
|
25
|
-
transform: translateY(-0.075em);
|
|
26
|
-
display: grid;
|
|
27
|
-
place-content: center;
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
/* Наружний круг Когда активен */
|
|
31
|
-
.f-radio label input[type=radio]:checked {
|
|
32
|
-
border: 1px solid #2F80ED;
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
.f-radio label input[type=radio]:focus {
|
|
36
|
-
outline: none !important;
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
/* Наружний круг Когда заблокирован */
|
|
40
|
-
.f-radio label input[type=radio]:disabled {
|
|
41
|
-
cursor: not-allowed;
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
/* Внутренний круг */
|
|
45
|
-
.f-radio label input[type=radio]::before {
|
|
46
|
-
content: "";
|
|
47
|
-
width: 8px;
|
|
48
|
-
height: 8px;
|
|
49
|
-
border-radius: 50%;
|
|
50
|
-
transform: scale(0);
|
|
51
|
-
transition: 120ms transform ease-in-out;
|
|
52
|
-
box-shadow: inset 1em 1em #2F80ED;
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
/* Внутренний круг Когда активен */
|
|
56
|
-
.f-radio label input[type=radio]:checked::before {
|
|
57
|
-
transform: scale(1);
|
|
58
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { default } from "./FRadioButton";
|