@jiaozhiye/qm-design-react 1.7.53 → 1.7.55
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/form/src/fields-filter.d.ts +3 -3
- package/lib/index.esm.js +1 -1
- package/lib/index.full.js +1 -1
- package/lib/index.js +1 -1
- package/lib/style/index.css +42 -16
- package/lib/style/index.min.css +1 -1
- package/lib/table/src/column-filter/index.d.ts +2 -2
- package/lib/table/src/hooks/useImperativeMethod.d.ts +3 -1
- package/lib/table/src/hooks/useTableRef.d.ts +3 -0
- package/lib/table/src/table/props.d.ts +1 -0
- package/lib/table/src/table/types.d.ts +4 -0
- package/lib/table/src/utils/index.d.ts +1 -0
- package/lib/table/style/column-filter.less +18 -2
- package/lib/watermark/style/index.less +6 -6
- package/package.json +1 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import type { IColumn } from '../table/types';
|
|
2
|
+
import type { ColumnDefineRef, IColumn } from '../table/types';
|
|
3
3
|
type IColumnFilterProps = {
|
|
4
4
|
columns: IColumn[];
|
|
5
5
|
};
|
|
6
|
-
declare const ColumnFilter: React.
|
|
6
|
+
declare const ColumnFilter: React.ForwardRefExoticComponent<IColumnFilterProps & React.RefAttributes<ColumnDefineRef>>;
|
|
7
7
|
export default ColumnFilter;
|
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import type { ITableRef } from './useTableRef';
|
|
3
|
-
import type { getRowKeyType, ITableProps, IColumn, IFetchParams, IPagination, IRecord, IRowKey, IRule, IValidItem, TableRef, ToolBoxRef, TableBodyRef } from '../table/types';
|
|
3
|
+
import type { getRowKeyType, ITableProps, IColumn, IFetchParams, IPagination, IRecord, IRowKey, IRule, IValidItem, TableRef, ToolBoxRef, TableBodyRef, ColumnDefineRef } from '../table/types';
|
|
4
4
|
type IExtra = {
|
|
5
5
|
getRowKey: getRowKeyType;
|
|
6
6
|
tableProps: ITableProps;
|
|
7
7
|
tableRef: React.MutableRefObject<ITableRef>;
|
|
8
8
|
toolBoxRef: React.RefObject<ToolBoxRef>;
|
|
9
9
|
tableBodyRef: React.RefObject<TableBodyRef>;
|
|
10
|
+
columnFilterRef: React.RefObject<ColumnDefineRef>;
|
|
10
11
|
flattenColumns: IColumn[];
|
|
11
12
|
editableColumns: IColumn[];
|
|
12
13
|
pagination: IPagination;
|
|
@@ -25,6 +26,7 @@ type IExtra = {
|
|
|
25
26
|
doFieldValidate: (rules: IRule[], val: unknown, rowKey: IRowKey, columnKey: string) => void;
|
|
26
27
|
setHandleState: (option: ITableRef['handleState']) => void;
|
|
27
28
|
forceUpdate: () => void;
|
|
29
|
+
setColumnsDefined: (value: boolean) => void;
|
|
28
30
|
setSelectionKeysEffect: (rowKeys: IRowKey[]) => void;
|
|
29
31
|
setRowExpandedKeys: (rowKeys: IRowKey[]) => void;
|
|
30
32
|
setHighlightKey: (rowKey: IRowKey) => void;
|
|
@@ -15,6 +15,7 @@ export type ITableRef = {
|
|
|
15
15
|
invalidRowKeys: IRowKey[];
|
|
16
16
|
fieldAuth: Record<string, IFieldAuthItem>;
|
|
17
17
|
mergeCells: IMergeCell[];
|
|
18
|
+
columnsDefined: boolean;
|
|
18
19
|
scrollYStore: {
|
|
19
20
|
startIndex: number;
|
|
20
21
|
endIndex: number;
|
|
@@ -56,6 +57,7 @@ declare const useTableRef: <T extends ITableProps>(props: T, { getRowKey, $size
|
|
|
56
57
|
setInvalidRowKeys: (rowKeys: IRowKey[]) => void;
|
|
57
58
|
setFieldAuth: (key: string, value: IFieldAuthItem) => void;
|
|
58
59
|
setMergeCells: (values: IMergeCell[]) => void;
|
|
60
|
+
setColumnsDefined: (value: boolean) => void;
|
|
59
61
|
setScrollYStore: (option: ITableRef['scrollYStore']) => void;
|
|
60
62
|
setResizeState: (option: ITableRef['resizeState']) => void;
|
|
61
63
|
setHandleState: (option: ITableRef['handleState']) => void;
|
|
@@ -80,6 +82,7 @@ declare const useTableRef: <T extends ITableProps>(props: T, { getRowKey, $size
|
|
|
80
82
|
invalidRowKeys: IRowKey[];
|
|
81
83
|
fieldAuth: Record<string, IFieldAuthItem>;
|
|
82
84
|
mergeCells: IMergeCell[];
|
|
85
|
+
columnsDefined: boolean;
|
|
83
86
|
scrollYStore: {
|
|
84
87
|
startIndex: number;
|
|
85
88
|
endIndex: number;
|
|
@@ -137,6 +137,7 @@ export declare const propTypes: {
|
|
|
137
137
|
customClass: PropTypes.Requireable<string>;
|
|
138
138
|
showHeader: PropTypes.Requireable<boolean>;
|
|
139
139
|
ellipsis: PropTypes.Requireable<boolean>;
|
|
140
|
+
dynamicThead: PropTypes.Requireable<boolean>;
|
|
140
141
|
nativeScrollBar: PropTypes.Requireable<boolean>;
|
|
141
142
|
rowStyle: PropTypes.Requireable<object>;
|
|
142
143
|
cellStyle: PropTypes.Requireable<object>;
|
|
@@ -334,6 +334,7 @@ export type ITableProps = {
|
|
|
334
334
|
customClass?: string;
|
|
335
335
|
showHeader?: boolean;
|
|
336
336
|
ellipsis?: boolean;
|
|
337
|
+
dynamicThead?: boolean;
|
|
337
338
|
nativeScrollBar?: boolean;
|
|
338
339
|
rowStyle?: CSSProperties | ((row: IRecord, rowIndex: number) => CSSProperties);
|
|
339
340
|
cellStyle?: CSSProperties | ((row: IRecord, column: IColumn, rowIndex: number, columnIndex: number) => CSSProperties);
|
|
@@ -436,6 +437,9 @@ export type TableBodyRef = {
|
|
|
436
437
|
createFocus: (rowKey: IRowKey, dataIndex: string) => void;
|
|
437
438
|
forceUpdate: () => void;
|
|
438
439
|
};
|
|
440
|
+
export type ColumnDefineRef = {
|
|
441
|
+
initialHandler: () => void;
|
|
442
|
+
};
|
|
439
443
|
export type ToolBoxRef = {
|
|
440
444
|
exportHandle: () => void;
|
|
441
445
|
};
|
|
@@ -41,3 +41,4 @@ export declare const deepGetRowkey: (arr: any[], value: IRowKey) => IRowKey[] |
|
|
|
41
41
|
export declare const deepFindRecord: (arr: IRecord[], fn: (node: IRecord) => boolean) => Nullable<IRecord>;
|
|
42
42
|
export declare const deepTreeFilter: (tree: any[], fn: (node: unknown) => boolean) => any[];
|
|
43
43
|
export declare const flatToTree: (list: any[], id: string, pid: string) => any[];
|
|
44
|
+
export declare const sortableFormatter: <T>(items: T[]) => T[];
|
|
@@ -24,10 +24,26 @@
|
|
|
24
24
|
|
|
25
25
|
.column-filter__popper {
|
|
26
26
|
padding: 0 !important;
|
|
27
|
+
min-width: 150px;
|
|
28
|
+
max-width: 200px;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
.column-item__popper {
|
|
32
|
+
padding-right: @v-module-distance !important;
|
|
33
|
+
min-width: 150px;
|
|
34
|
+
max-width: 200px;
|
|
35
|
+
.ant-popover-arrow {
|
|
36
|
+
display: none;
|
|
37
|
+
}
|
|
38
|
+
.ant-popover-inner-content {
|
|
39
|
+
padding: 0;
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
.column-filter__popper,
|
|
44
|
+
.column-item__popper {
|
|
27
45
|
.column-filter--wrap {
|
|
28
46
|
padding: 5px @v-module-distance;
|
|
29
|
-
min-width: 150px;
|
|
30
|
-
max-width: 200px;
|
|
31
47
|
overflow-y: auto;
|
|
32
48
|
.box-sizing-content();
|
|
33
49
|
li.item {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* @Author: 焦质晔
|
|
3
|
-
* @Date: 2023-12-14 13:24:17
|
|
4
|
-
* @Last Modified by: 焦质晔
|
|
5
|
-
* @Last Modified time: 2023-12-14 13:24:17
|
|
6
|
-
*/
|
|
1
|
+
/*
|
|
2
|
+
* @Author: 焦质晔
|
|
3
|
+
* @Date: 2023-12-14 13:24:17
|
|
4
|
+
* @Last Modified by: 焦质晔
|
|
5
|
+
* @Last Modified time: 2023-12-14 13:24:17
|
|
6
|
+
*/
|