@jiaozhiye/qm-design-react 1.9.19 → 1.9.21
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/_utils/with-default-props.d.ts +1 -0
- package/lib/index.esm.js +1 -1
- package/lib/index.full.js +1 -1
- package/lib/index.js +1 -1
- package/lib/scrollbar/src/scrollbar.d.ts +1 -0
- package/lib/scrollbar/src/thumb.d.ts +1 -0
- package/lib/scrollbar/style/index.less +76 -72
- package/lib/style/index.css +4 -0
- package/lib/style/index.min.css +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/useTableEffect.d.ts +0 -3
- 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 +4 -0
- package/lib/table/src/table/types.d.ts +5 -0
- package/lib/table/src/utils/index.d.ts +0 -2
- 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)[];
|
|
@@ -4,8 +4,6 @@ import type { TableBodyRef, IColumn, IPagination, IRowKey, ITableProps, IDeriveR
|
|
|
4
4
|
import type { ComponentSize } from '../../../_utils/types';
|
|
5
5
|
type IExtra = {
|
|
6
6
|
tableRef: React.MutableRefObject<ITableRef>;
|
|
7
|
-
topElementRef: React.RefObject<HTMLDivElement>;
|
|
8
|
-
tableElementRef: React.RefObject<HTMLDivElement>;
|
|
9
7
|
tableBodyRef: React.RefObject<TableBodyRef>;
|
|
10
8
|
$size: ComponentSize;
|
|
11
9
|
scrollX: boolean;
|
|
@@ -35,7 +33,6 @@ type IExtra = {
|
|
|
35
33
|
calcTableHeight: () => void;
|
|
36
34
|
createSelectionKeys: (rowKeys?: IRowKey[]) => IRowKey[];
|
|
37
35
|
createRowExpandedKeys: (rowKeys?: IRowKey[]) => IRowKey[];
|
|
38
|
-
createElementStore: (option: Record<string, HTMLElement>) => void;
|
|
39
36
|
initialTable: () => void;
|
|
40
37
|
destroy: () => void;
|
|
41
38
|
};
|
|
@@ -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,10 @@ 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
|
+
doubleXScrollbar: PropTypes.Requireable<boolean>;
|
|
186
|
+
}>>;
|
|
183
187
|
treeConfig: PropTypes.Requireable<PropTypes.InferProps<{
|
|
184
188
|
virtual: PropTypes.Requireable<boolean>;
|
|
185
189
|
expandIconColumn: PropTypes.Requireable<string>;
|
|
@@ -200,6 +200,10 @@ 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
|
+
doubleXScrollbar?: boolean;
|
|
206
|
+
};
|
|
203
207
|
export type ITreeConfig = {
|
|
204
208
|
virtual?: boolean;
|
|
205
209
|
expandIconColumn?: string;
|
|
@@ -356,6 +360,7 @@ export type ITableProps = {
|
|
|
356
360
|
initialFilter?: IFilter;
|
|
357
361
|
rowSelection?: IRowSelection;
|
|
358
362
|
rowHighlight?: IRowHighlight;
|
|
363
|
+
tableConfig?: ITableConfig;
|
|
359
364
|
treeConfig?: ITreeConfig;
|
|
360
365
|
expandable?: IExpandable;
|
|
361
366
|
summation?: ISummation;
|
|
@@ -1,9 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import dayjs, { Dayjs } from 'dayjs';
|
|
3
|
-
import { hasOwn } from '../../../_utils/util';
|
|
4
3
|
import type { IColumn, IDerivedRowKey, IRecord, IRowKey, ISorter } from '../table/types';
|
|
5
4
|
import type { Nullable, AnyObject } from '../../../_utils/types';
|
|
6
|
-
export { hasOwn };
|
|
7
5
|
export declare const columnsFlatMap: (columns: IColumn[]) => IColumn[];
|
|
8
6
|
export declare const createFilterColumns: (columns: IColumn[]) => IColumn[];
|
|
9
7
|
export declare const getAllColumns: (columns: IColumn[]) => IColumn[];
|