@hi-ui/table 5.0.0-experimental.4 → 5.0.0
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/CHANGELOG.md +101 -173
- package/lib/cjs/SettingDrawer.js +12 -9
- package/lib/cjs/hooks/use-async-switch.js +18 -21
- package/lib/cjs/hooks/use-col-width.js +2 -1
- package/lib/cjs/node_modules/rc-resize-observer/node_modules/rc-util/es/Children/toArray.js +1 -1
- package/lib/cjs/node_modules/rc-resize-observer/node_modules/rc-util/es/ref.js +1 -1
- package/lib/cjs/node_modules/{rc-resize-observer/node_modules/react-is → react-is}/cjs/react-is.development.js +1 -1
- package/lib/cjs/node_modules/{rc-resize-observer/node_modules/react-is → react-is}/cjs/react-is.production.min.js +1 -1
- package/lib/cjs/node_modules/{rc-resize-observer/node_modules/react-is → react-is}/index.js +3 -3
- package/lib/esm/SettingDrawer.js +12 -9
- package/lib/esm/hooks/use-async-switch.js +18 -21
- package/lib/esm/hooks/use-col-width.js +2 -1
- package/lib/esm/node_modules/rc-resize-observer/node_modules/rc-util/es/Children/toArray.js +1 -1
- package/lib/esm/node_modules/rc-resize-observer/node_modules/rc-util/es/ref.js +1 -1
- package/lib/esm/node_modules/{rc-resize-observer/node_modules/react-is → react-is}/cjs/react-is.development.js +1 -1
- package/lib/esm/node_modules/{rc-resize-observer/node_modules/react-is → react-is}/cjs/react-is.production.min.js +1 -1
- package/lib/esm/node_modules/{rc-resize-observer/node_modules/react-is → react-is}/index.js +3 -3
- package/lib/types/Table.d.ts +4 -4
- package/lib/types/TableColumnMenu.d.ts +1 -1
- package/lib/types/TbodyContent.d.ts +3 -3
- package/lib/types/context.d.ts +54 -54
- package/lib/types/hooks/use-async-switch.d.ts +3 -3
- package/lib/types/hooks/use-check.d.ts +2 -2
- package/lib/types/hooks/use-col-frozen.d.ts +1 -1
- package/lib/types/hooks/use-col-hidden.d.ts +3 -2
- package/lib/types/hooks/use-col-set.d.ts +1 -1
- package/lib/types/hooks/use-col-sorter.d.ts +2 -1
- package/lib/types/hooks/use-col-width.d.ts +1 -1
- package/lib/types/hooks/use-embed-expand.d.ts +1 -1
- package/lib/types/hooks/use-expand.d.ts +2 -2
- package/lib/types/hooks/use-pagination.d.ts +2 -2
- package/lib/types/types.d.ts +12 -12
- package/lib/types/use-table.d.ts +8 -8
- package/package.json +37 -37
package/lib/types/use-table.d.ts
CHANGED
|
@@ -10,7 +10,7 @@ export declare const useTable: ({ data, columns: columnsProp, defaultFixedToColu
|
|
|
10
10
|
width: number | undefined;
|
|
11
11
|
};
|
|
12
12
|
};
|
|
13
|
-
getStickyColProps: (column: any, type?:
|
|
13
|
+
getStickyColProps: (column: any, type?: 'th' | 'td') => {
|
|
14
14
|
style: React.CSSProperties;
|
|
15
15
|
'data-sticky': "" | undefined;
|
|
16
16
|
};
|
|
@@ -25,7 +25,7 @@ export declare const useTable: ({ data, columns: columnsProp, defaultFixedToColu
|
|
|
25
25
|
trySetHighlightedColKeys: (stateOrFunction: React.SetStateAction<string[]>, ...args: any[]) => void;
|
|
26
26
|
showColHighlight: boolean;
|
|
27
27
|
isHoveredHighlightCol: (id: React.ReactText) => boolean;
|
|
28
|
-
onHoveredColChange: <T extends import("@hi-ui/use-check").UseCheckItem>(targetItem: T, shouldSelected?: boolean) => void;
|
|
28
|
+
onHoveredColChange: <T extends import("@hi-ui/use-check").UseCheckItem>(targetItem: T, shouldSelected?: boolean | undefined) => void;
|
|
29
29
|
draggable: boolean;
|
|
30
30
|
highlightColumns: any;
|
|
31
31
|
dragRowRef: React.MutableRefObject<any>;
|
|
@@ -65,25 +65,25 @@ export declare const useTable: ({ data, columns: columnsProp, defaultFixedToColu
|
|
|
65
65
|
/**
|
|
66
66
|
* 是否显示边框(表头分组模式下,表格自带边框)
|
|
67
67
|
*/
|
|
68
|
-
bordered?: boolean;
|
|
68
|
+
bordered?: boolean | undefined;
|
|
69
69
|
/**
|
|
70
70
|
* 表格分页配置项
|
|
71
71
|
*/
|
|
72
|
-
pagination?: PaginationProps;
|
|
72
|
+
pagination?: PaginationProps | undefined;
|
|
73
73
|
/**
|
|
74
74
|
* 是否集成控制面板功能
|
|
75
75
|
*/
|
|
76
76
|
setting?: boolean | {
|
|
77
77
|
trigger?: React.ReactNode;
|
|
78
|
-
};
|
|
78
|
+
} | undefined;
|
|
79
79
|
/**
|
|
80
80
|
* 加载中状态
|
|
81
81
|
*/
|
|
82
|
-
loading?: boolean;
|
|
82
|
+
loading?: boolean | undefined;
|
|
83
83
|
/**
|
|
84
84
|
* 唯一 id 前缀,废弃
|
|
85
85
|
*/
|
|
86
|
-
uniqueId?: string;
|
|
86
|
+
uniqueId?: string | undefined;
|
|
87
87
|
};
|
|
88
88
|
scrollWidth: number | undefined;
|
|
89
89
|
activeSorterColumn: string | null;
|
|
@@ -344,4 +344,4 @@ export interface UseTableProps {
|
|
|
344
344
|
*/
|
|
345
345
|
onScroll?: (event: React.UIEvent<HTMLDivElement>) => void;
|
|
346
346
|
}
|
|
347
|
-
export type UseTableReturn = ReturnType<typeof useTable>;
|
|
347
|
+
export declare type UseTableReturn = ReturnType<typeof useTable>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hi-ui/table",
|
|
3
|
-
"version": "5.0.0
|
|
3
|
+
"version": "5.0.0",
|
|
4
4
|
"description": "A sub-package for @hi-ui/hiui.",
|
|
5
5
|
"keywords": [],
|
|
6
6
|
"author": "HiUI <mi-hiui@xiaomi.com>",
|
|
@@ -44,49 +44,49 @@
|
|
|
44
44
|
"url": "https://github.com/XiaoMi/hiui/issues"
|
|
45
45
|
},
|
|
46
46
|
"dependencies": {
|
|
47
|
-
"@hi-ui/array-utils": "^5.0.0
|
|
48
|
-
"@hi-ui/button": "^5.0.0
|
|
49
|
-
"@hi-ui/checkbox": "^5.0.0
|
|
50
|
-
"@hi-ui/classname": "^5.0.0
|
|
51
|
-
"@hi-ui/dom-utils": "^5.0.0
|
|
52
|
-
"@hi-ui/drawer": "^5.0.0
|
|
53
|
-
"@hi-ui/empty-state": "^5.0.0
|
|
54
|
-
"@hi-ui/env": "^5.0.0
|
|
55
|
-
"@hi-ui/func-utils": "^5.0.0
|
|
56
|
-
"@hi-ui/icon-button": "^5.0.0
|
|
57
|
-
"@hi-ui/icons": "^5.0.0
|
|
58
|
-
"@hi-ui/loading": "^5.0.0
|
|
59
|
-
"@hi-ui/object-utils": "^5.0.0
|
|
60
|
-
"@hi-ui/pagination": "^5.0.0
|
|
61
|
-
"@hi-ui/popper": "^5.0.0
|
|
62
|
-
"@hi-ui/radio": "^5.0.0
|
|
63
|
-
"@hi-ui/react-utils": "^5.0.0
|
|
64
|
-
"@hi-ui/scrollbar": "^5.0.0
|
|
65
|
-
"@hi-ui/select": "^5.0.0
|
|
66
|
-
"@hi-ui/spinner": "^5.0.0
|
|
67
|
-
"@hi-ui/times": "^5.0.0
|
|
68
|
-
"@hi-ui/tree-utils": "^5.0.0
|
|
69
|
-
"@hi-ui/type-assertion": "^5.0.0
|
|
70
|
-
"@hi-ui/use-cache": "^5.0.0
|
|
71
|
-
"@hi-ui/use-check": "^5.0.0
|
|
72
|
-
"@hi-ui/use-check-state": "^5.0.0
|
|
73
|
-
"@hi-ui/use-drag-sorter": "^5.0.0
|
|
74
|
-
"@hi-ui/use-latest": "^5.0.0
|
|
75
|
-
"@hi-ui/use-
|
|
76
|
-
"@hi-ui/use-
|
|
77
|
-
"@hi-ui/use-
|
|
47
|
+
"@hi-ui/array-utils": "^5.0.0",
|
|
48
|
+
"@hi-ui/button": "^5.0.0",
|
|
49
|
+
"@hi-ui/checkbox": "^5.0.0",
|
|
50
|
+
"@hi-ui/classname": "^5.0.0",
|
|
51
|
+
"@hi-ui/dom-utils": "^5.0.0",
|
|
52
|
+
"@hi-ui/drawer": "^5.0.0",
|
|
53
|
+
"@hi-ui/empty-state": "^5.0.0",
|
|
54
|
+
"@hi-ui/env": "^5.0.0",
|
|
55
|
+
"@hi-ui/func-utils": "^5.0.0",
|
|
56
|
+
"@hi-ui/icon-button": "^5.0.0",
|
|
57
|
+
"@hi-ui/icons": "^5.0.0",
|
|
58
|
+
"@hi-ui/loading": "^5.0.0",
|
|
59
|
+
"@hi-ui/object-utils": "^5.0.0",
|
|
60
|
+
"@hi-ui/pagination": "^5.0.0",
|
|
61
|
+
"@hi-ui/popper": "^5.0.0",
|
|
62
|
+
"@hi-ui/radio": "^5.0.0",
|
|
63
|
+
"@hi-ui/react-utils": "^5.0.0",
|
|
64
|
+
"@hi-ui/scrollbar": "^5.0.0",
|
|
65
|
+
"@hi-ui/select": "^5.0.0",
|
|
66
|
+
"@hi-ui/spinner": "^5.0.0",
|
|
67
|
+
"@hi-ui/times": "^5.0.0",
|
|
68
|
+
"@hi-ui/tree-utils": "^5.0.0",
|
|
69
|
+
"@hi-ui/type-assertion": "^5.0.0",
|
|
70
|
+
"@hi-ui/use-cache": "^5.0.0",
|
|
71
|
+
"@hi-ui/use-check": "^5.0.0",
|
|
72
|
+
"@hi-ui/use-check-state": "^5.0.0",
|
|
73
|
+
"@hi-ui/use-drag-sorter": "^5.0.0",
|
|
74
|
+
"@hi-ui/use-latest": "^5.0.0",
|
|
75
|
+
"@hi-ui/use-merge-semantic": "^5.0.0",
|
|
76
|
+
"@hi-ui/use-toggle": "^5.0.0",
|
|
77
|
+
"@hi-ui/use-uncontrolled-state": "^5.0.0",
|
|
78
|
+
"@hi-ui/use-update-effect": "^5.0.0",
|
|
78
79
|
"axios": "^1.5.0",
|
|
79
|
-
"react-resizable": "^3.0.4"
|
|
80
|
-
"@hi-ui/use-merge-semantic": "^5.0.0-experimental.0"
|
|
80
|
+
"react-resizable": "^3.0.4"
|
|
81
81
|
},
|
|
82
82
|
"peerDependencies": {
|
|
83
|
-
"@hi-ui/core": ">=5.0.0
|
|
83
|
+
"@hi-ui/core": ">=5.0.0",
|
|
84
84
|
"react": ">=16.8.6",
|
|
85
85
|
"react-dom": ">=16.8.6"
|
|
86
86
|
},
|
|
87
87
|
"devDependencies": {
|
|
88
|
-
"@hi-ui/core": "^5.0.0
|
|
89
|
-
"@hi-ui/core-css": "^5.0.0
|
|
88
|
+
"@hi-ui/core": "^5.0.0",
|
|
89
|
+
"@hi-ui/core-css": "^5.0.0",
|
|
90
90
|
"@types/react-resizable": "^1.7.4",
|
|
91
91
|
"react": "^17.0.1",
|
|
92
92
|
"react-dom": "^17.0.1"
|