dcp-design-react 1.9.19 → 1.9.20
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/lib/index.esm.js +1 -1
- package/lib/index.full.js +1 -1
- package/lib/index.js +1 -1
- package/lib/table/src/context/index.d.ts +1 -0
- package/lib/table/src/hooks/useTableCore.d.ts +2 -0
- package/lib/table/src/hooks/useTableLayout.d.ts +0 -2
- package/lib/table/src/hooks/useTableRef.d.ts +3 -0
- package/lib/table/src/table/props.d.ts +3 -0
- package/lib/table/src/table/types.d.ts +4 -0
- package/lib/table/src/utils/index.d.ts +1 -0
- package/package.json +1 -1
|
@@ -45,6 +45,7 @@ export type ITableContext = {
|
|
|
45
45
|
tableChange: () => void;
|
|
46
46
|
getTableData: () => Promise<void>;
|
|
47
47
|
setElementStore: (key: string, value: HTMLElement) => void;
|
|
48
|
+
createWebPageData: () => IRecord[];
|
|
48
49
|
createTableFullData: (records: IRecord[]) => void;
|
|
49
50
|
updateTableData: () => void;
|
|
50
51
|
setSorter: (value: ITableState['sorter']) => void;
|
|
@@ -34,6 +34,7 @@ type IExtra = {
|
|
|
34
34
|
setTableFlatColumns: (columns: IColumn[]) => void;
|
|
35
35
|
setTableFullData: (records: IRecord[]) => void;
|
|
36
36
|
setTableOriginData: (records: IRecord[]) => void;
|
|
37
|
+
setTableFlatData: (records: IRecord[]) => void;
|
|
37
38
|
setAllTableData: (records: IRecord[]) => void;
|
|
38
39
|
setDeriveRowKeys: (records: IRecord[]) => void;
|
|
39
40
|
setPagination: <T extends IPagination>(pagination: T | ((prev: T) => T)) => void;
|
|
@@ -71,6 +72,7 @@ declare const useTableCore: <T extends ITableProps>(props: T, extra: IExtra) =>
|
|
|
71
72
|
createTableFullData: (list: IRecord[]) => void;
|
|
72
73
|
getTableData: () => Promise<void>;
|
|
73
74
|
handleTableData: (dataList: IRecord[]) => void;
|
|
75
|
+
createWebPageData: () => IRecord<any>[];
|
|
74
76
|
createTableData: (list: IRecord[]) => void;
|
|
75
77
|
createGroupData: (list: IRecord[]) => IRecord<any>[];
|
|
76
78
|
createSelectionKeys: (rowKeys?: IRowKey[]) => (string | number)[];
|
|
@@ -14,10 +14,8 @@ type IExtra = {
|
|
|
14
14
|
layout: ITableState['layout'];
|
|
15
15
|
scrollX: boolean;
|
|
16
16
|
scrollY: boolean;
|
|
17
|
-
tableData: IRecord[];
|
|
18
17
|
showFooter: boolean;
|
|
19
18
|
showPagination: boolean;
|
|
20
|
-
isWebPagination: boolean;
|
|
21
19
|
isFullScreen: boolean;
|
|
22
20
|
setLayout: <T extends ITableState['layout']>(layout: T | ((prev: T) => T)) => void;
|
|
23
21
|
setScrollX: (scrollX: boolean) => void;
|
|
@@ -12,6 +12,7 @@ export type ITableRef = {
|
|
|
12
12
|
originColumns: IColumn[];
|
|
13
13
|
tableFullData: IRecord[];
|
|
14
14
|
tableOriginData: IRecord[];
|
|
15
|
+
tableFlatData: IRecord[];
|
|
15
16
|
allTableData: IRecord[];
|
|
16
17
|
allRowKeys: IRowKey[];
|
|
17
18
|
deriveRowKeys: IDerivedRowKey[];
|
|
@@ -62,6 +63,7 @@ declare const useTableRef: <T extends ITableProps>(props: T, { getRowKey, $size
|
|
|
62
63
|
setElementStore: (key: string, value: HTMLElement) => void;
|
|
63
64
|
setOriginColumns: (columns: IColumn[]) => void;
|
|
64
65
|
setTableFullData: (records: IRecord[]) => void;
|
|
66
|
+
setTableFlatData: (records: IRecord[]) => void;
|
|
65
67
|
setTableOriginData: (records: IRecord[]) => void;
|
|
66
68
|
setAllTableData: (records: IRecord[]) => void;
|
|
67
69
|
setDeriveRowKeys: (records: IRecord[]) => void;
|
|
@@ -89,6 +91,7 @@ declare const useTableRef: <T extends ITableProps>(props: T, { getRowKey, $size
|
|
|
89
91
|
originColumns: IColumn[];
|
|
90
92
|
tableFullData: IRecord[];
|
|
91
93
|
tableOriginData: IRecord[];
|
|
94
|
+
tableFlatData: IRecord[];
|
|
92
95
|
allTableData: IRecord[];
|
|
93
96
|
allRowKeys: IRowKey[];
|
|
94
97
|
deriveRowKeys: IDerivedRowKey[];
|
|
@@ -180,6 +180,9 @@ export declare const propTypes: {
|
|
|
180
180
|
disabled: PropTypes.Requireable<(...args: any[]) => any>;
|
|
181
181
|
onChange: PropTypes.Requireable<(...args: any[]) => any>;
|
|
182
182
|
}>>;
|
|
183
|
+
tableConfig: PropTypes.Requireable<PropTypes.InferProps<{
|
|
184
|
+
virtual: PropTypes.Requireable<boolean>;
|
|
185
|
+
}>>;
|
|
183
186
|
treeConfig: PropTypes.Requireable<PropTypes.InferProps<{
|
|
184
187
|
virtual: PropTypes.Requireable<boolean>;
|
|
185
188
|
expandIconColumn: PropTypes.Requireable<string>;
|
|
@@ -200,6 +200,9 @@ export type IRowHighlight = {
|
|
|
200
200
|
disabled?: (row: IRecord) => boolean;
|
|
201
201
|
onChange?: (rowKey: IRowKey, row: IRecord) => void;
|
|
202
202
|
};
|
|
203
|
+
export type ITableConfig = {
|
|
204
|
+
virtual?: boolean;
|
|
205
|
+
};
|
|
203
206
|
export type ITreeConfig = {
|
|
204
207
|
virtual?: boolean;
|
|
205
208
|
expandIconColumn?: string;
|
|
@@ -356,6 +359,7 @@ export type ITableProps = {
|
|
|
356
359
|
initialFilter?: IFilter;
|
|
357
360
|
rowSelection?: IRowSelection;
|
|
358
361
|
rowHighlight?: IRowHighlight;
|
|
362
|
+
tableConfig?: ITableConfig;
|
|
359
363
|
treeConfig?: ITreeConfig;
|
|
360
364
|
expandable?: IExpandable;
|
|
361
365
|
summation?: ISummation;
|
|
@@ -53,3 +53,4 @@ export declare const sortableFormatter: <T>(items: T[]) => T[];
|
|
|
53
53
|
* @returns
|
|
54
54
|
*/
|
|
55
55
|
export declare const equalFn: <T = any>(obj1: T, obj2: T, shallow?: boolean) => boolean;
|
|
56
|
+
export declare const withDefaultProps: <T extends object>(defaultProps: T, props: Partial<T>) => T;
|