2021-12-17 17:08:15 +05:00
|
|
|
|
export { makeDateSorter, makeNumericSorter, makeStringSorter } from './sorters'
|
2021-12-07 19:42:42 +05:00
|
|
|
|
export { EditableTable, makeActionHandler } from './EditableTable'
|
2021-08-20 10:49:20 +05:00
|
|
|
|
export { DatePickerWrapper } from './DatePickerWrapper'
|
2022-03-02 21:17:27 +05:00
|
|
|
|
export { Table } from './Table'
|
2022-03-02 21:18:13 +05:00
|
|
|
|
export {
|
|
|
|
|
RegExpIsFloat,
|
|
|
|
|
timezoneOptions,
|
|
|
|
|
TimezoneSelect,
|
|
|
|
|
makeGroupColumn,
|
|
|
|
|
makeColumn,
|
|
|
|
|
makeColumnsPlanFact,
|
|
|
|
|
makeFilterTextMatch,
|
|
|
|
|
makeNumericRender,
|
|
|
|
|
makeNumericColumn,
|
|
|
|
|
makeNumericColumnOptions,
|
|
|
|
|
makeNumericColumnPlanFact,
|
|
|
|
|
makeNumericStartEnd,
|
|
|
|
|
makeNumericMinMax,
|
|
|
|
|
makeNumericAvgRange,
|
|
|
|
|
makeSelectColumn,
|
|
|
|
|
makeTagColumn,
|
|
|
|
|
makeTagInput,
|
|
|
|
|
makeTextColumn,
|
|
|
|
|
makeTimezoneColumn,
|
|
|
|
|
makeTimezoneRenderer,
|
|
|
|
|
} from './Columns'
|
|
|
|
|
|
|
|
|
|
export type {
|
|
|
|
|
DataType,
|
|
|
|
|
RenderMethod,
|
|
|
|
|
SorterMethod,
|
|
|
|
|
TagInputProps,
|
|
|
|
|
columnPropsOther,
|
|
|
|
|
} from './Columns'
|
2022-03-02 21:17:27 +05:00
|
|
|
|
export type { BaseTableColumn, TableColumns, TableContainer } from './Table'
|
2021-08-20 10:49:20 +05:00
|
|
|
|
|
2022-01-13 20:32:46 +05:00
|
|
|
|
export const defaultPagination = {
|
2022-03-02 21:18:13 +05:00
|
|
|
|
defaultPageSize: 14,
|
|
|
|
|
showSizeChanger: true,
|
2021-12-27 18:06:26 +05:00
|
|
|
|
}
|
|
|
|
|
|
2021-08-20 10:49:20 +05:00
|
|
|
|
type PaginationContainer = {
|
2022-03-02 21:18:13 +05:00
|
|
|
|
skip?: number
|
|
|
|
|
take?: number
|
|
|
|
|
count?: number
|
|
|
|
|
items?: any[] | null
|
2021-08-20 10:49:20 +05:00
|
|
|
|
}
|
|
|
|
|
|
2021-12-02 15:21:10 +05:00
|
|
|
|
export const makePaginationObject = (сontainer: PaginationContainer, ...other: any) => ({
|
2022-03-02 21:18:13 +05:00
|
|
|
|
...other,
|
|
|
|
|
pageSize: сontainer.take,
|
|
|
|
|
total: сontainer.count ?? сontainer.items?.length ?? 0,
|
|
|
|
|
current: 1 + Math.floor((сontainer.skip ?? 0) / (сontainer.take ?? 1))
|
2022-02-28 12:51:45 +05:00
|
|
|
|
})
|