@gobolt/genesis 0.4.12 → 0.4.13
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/Table/InfiniteScrollTable/InfiniteScrollTable.d.ts +2 -0
- package/dist/components/Table/InfiniteScrollTable/ResizableTitle.d.ts +10 -0
- package/dist/components/Table/Table.d.ts +25 -12
- package/dist/index.cjs +2215 -310
- package/dist/index.js +2215 -310
- package/package.json +6 -2
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
interface ResizableTitleProps {
|
|
3
|
+
onResize?: (newWidth: number) => void;
|
|
4
|
+
width?: number;
|
|
5
|
+
style?: React.CSSProperties;
|
|
6
|
+
children: React.ReactNode;
|
|
7
|
+
[key: string]: any;
|
|
8
|
+
}
|
|
9
|
+
export declare const ResizableTitle: React.FC<ResizableTitleProps>;
|
|
10
|
+
export {};
|
|
@@ -4,15 +4,28 @@ import { ActionEvent } from '../../types/events';
|
|
|
4
4
|
import * as React from "react";
|
|
5
5
|
export type Change = (actionEvent: ActionEvent) => void;
|
|
6
6
|
export type SelectionType = "checkbox" | "radio";
|
|
7
|
-
export interface
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
7
|
+
export interface InfiniteScrollConfig<T = any> {
|
|
8
|
+
instanceId: string;
|
|
9
|
+
fetchService: {
|
|
10
|
+
fetchData: (params: {
|
|
11
|
+
pageParam: number;
|
|
12
|
+
}) => Promise<{
|
|
13
|
+
docs: T[];
|
|
14
|
+
totalDocs: number;
|
|
15
|
+
limit: number;
|
|
16
|
+
page: number;
|
|
17
|
+
totalPages: number;
|
|
18
|
+
pagingCounter: number;
|
|
19
|
+
hasPrevPage: boolean;
|
|
20
|
+
hasNextPage: boolean;
|
|
21
|
+
prevPage?: number;
|
|
22
|
+
nextPage?: number;
|
|
23
|
+
}>;
|
|
24
|
+
queryKey: string[];
|
|
25
|
+
};
|
|
26
|
+
title: string;
|
|
27
|
+
scrollHeight?: number;
|
|
28
|
+
scrollWidth?: number;
|
|
16
29
|
}
|
|
17
30
|
export interface TableProps<T extends Record<string, any>> {
|
|
18
31
|
dataSource: T[];
|
|
@@ -44,8 +57,8 @@ export interface TableProps<T extends Record<string, any>> {
|
|
|
44
57
|
};
|
|
45
58
|
[key: string]: any;
|
|
46
59
|
isMainContentCell?: boolean;
|
|
47
|
-
|
|
48
|
-
|
|
60
|
+
isInfiniteScroll?: boolean;
|
|
61
|
+
infiniteScrollConfig?: InfiniteScrollConfig<T>;
|
|
49
62
|
enableRowKeyValidation?: boolean;
|
|
50
63
|
onRowKeyError?: (error: {
|
|
51
64
|
record: T;
|
|
@@ -66,5 +79,5 @@ export type SorterResult<T> = {
|
|
|
66
79
|
field?: keyof T | string | React.Key | readonly React.Key[];
|
|
67
80
|
columnKey?: React.Key;
|
|
68
81
|
};
|
|
69
|
-
declare function Table<T extends Record<string, any>>({ columns, dataSource, rowKey, size, onChange, rowSelection, onRowClick, pagination, isMainContentCell,
|
|
82
|
+
declare function Table<T extends Record<string, any>>({ columns, dataSource, rowKey, size, onChange, rowSelection, onRowClick, pagination, isMainContentCell, isInfiniteScroll, infiniteScrollConfig, enableRowKeyValidation, onRowKeyError, ...rest }: TableProps<T>): import("react/jsx-runtime").JSX.Element;
|
|
70
83
|
export default Table;
|