dcp-design-react 1.12.14 → 1.12.15
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/types.d.ts +1 -0
- package/lib/form/style/index.less +393 -392
- package/lib/index.d.ts +4 -0
- package/lib/index.esm.js +1 -1
- package/lib/index.full.js +1 -1
- package/lib/index.js +1 -1
- package/lib/locale/index.js +5 -5
- package/lib/locale/lang/en.d.ts +5 -0
- package/lib/locale/lang/en.js +5 -0
- package/lib/locale/lang/zh-cn.d.ts +5 -0
- package/lib/locale/lang/zh-cn.js +5 -0
- package/lib/pivot-grid/style/grid-layout.less +507 -503
- package/lib/style/index.css +57 -16
- package/lib/style/index.less +1 -0
- package/lib/style/index.min.css +1 -1
- package/lib/style/mixins/reset.less +43 -43
- package/lib/table/src/context/index.d.ts +9 -2
- package/lib/table/src/hooks/useImperativeMethod.d.ts +1 -0
- package/lib/table/src/hooks/useTableCore.d.ts +10 -2
- package/lib/table/src/hooks/useTableState.d.ts +8 -2
- package/lib/table/src/table/props.d.ts +1 -0
- package/lib/table/src/table/types.d.ts +2 -1
- package/lib/table/style/header.less +303 -303
- package/lib/translate/index.d.ts +3 -0
- package/lib/translate/src/translate.d.ts +16 -0
- package/lib/translate/src/use-tooltip.d.ts +9 -0
- package/lib/translate/src/use-translation.d.ts +12 -0
- package/lib/translate/style/index.less +32 -0
- package/package.json +1 -1
|
@@ -1,43 +1,43 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* @Author: 焦质晔
|
|
3
|
-
* @Date: 2021-07-23 18:58:43
|
|
4
|
-
* @Last Modified by: 焦质晔
|
|
5
|
-
* @Last Modified time: 2021-07-23 18:58:43
|
|
6
|
-
*/
|
|
7
|
-
@import '../themes/index';
|
|
8
|
-
|
|
9
|
-
.reset-container() {
|
|
10
|
-
box-sizing: border-box;
|
|
11
|
-
margin: 0;
|
|
12
|
-
padding: 0;
|
|
13
|
-
color: @--text-color;
|
|
14
|
-
font-variant: @font-variant-base;
|
|
15
|
-
line-height: @--line-height-base;
|
|
16
|
-
list-style: none;
|
|
17
|
-
font-feature-settings: @font-feature-settings-base;
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
.box-sizing-content() {
|
|
21
|
-
box-sizing: border-box;
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
.text-overflow-cut() {
|
|
25
|
-
overflow: hidden;
|
|
26
|
-
text-overflow: ellipsis;
|
|
27
|
-
white-space: nowrap;
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
.text-ellipsis-2 () {
|
|
31
|
-
display: -webkit-box;
|
|
32
|
-
-webkit-box-orient: vertical;
|
|
33
|
-
-webkit-line-clamp: 2;
|
|
34
|
-
line-clamp: 2;
|
|
35
|
-
overflow: hidden;
|
|
36
|
-
text-overflow: ellipsis;
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
.user-select-none() {
|
|
40
|
-
-moz-user-select: none;
|
|
41
|
-
-webkit-user-select: none;
|
|
42
|
-
-ms-user-select: none;
|
|
43
|
-
}
|
|
1
|
+
/*
|
|
2
|
+
* @Author: 焦质晔
|
|
3
|
+
* @Date: 2021-07-23 18:58:43
|
|
4
|
+
* @Last Modified by: 焦质晔
|
|
5
|
+
* @Last Modified time: 2021-07-23 18:58:43
|
|
6
|
+
*/
|
|
7
|
+
@import '../themes/index';
|
|
8
|
+
|
|
9
|
+
.reset-container() {
|
|
10
|
+
box-sizing: border-box;
|
|
11
|
+
margin: 0;
|
|
12
|
+
padding: 0;
|
|
13
|
+
color: @--text-color;
|
|
14
|
+
font-variant: @font-variant-base;
|
|
15
|
+
line-height: @--line-height-base;
|
|
16
|
+
list-style: none;
|
|
17
|
+
font-feature-settings: @font-feature-settings-base;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
.box-sizing-content() {
|
|
21
|
+
box-sizing: border-box;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
.text-overflow-cut() {
|
|
25
|
+
overflow: hidden;
|
|
26
|
+
text-overflow: ellipsis;
|
|
27
|
+
white-space: nowrap;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
.text-ellipsis-2 () {
|
|
31
|
+
display: -webkit-box;
|
|
32
|
+
-webkit-box-orient: vertical;
|
|
33
|
+
-webkit-line-clamp: 2;
|
|
34
|
+
line-clamp: 2;
|
|
35
|
+
overflow: hidden;
|
|
36
|
+
text-overflow: ellipsis;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
.user-select-none() {
|
|
40
|
+
-moz-user-select: none;
|
|
41
|
+
-webkit-user-select: none;
|
|
42
|
+
-ms-user-select: none;
|
|
43
|
+
}
|
|
@@ -53,8 +53,14 @@ export type ITableContext = {
|
|
|
53
53
|
createGroupData: (records: IRecord[]) => IRecord[];
|
|
54
54
|
createAllExpandedKeys: () => IRowKey[];
|
|
55
55
|
updateTableFlatData: () => void;
|
|
56
|
-
setSorter: (
|
|
57
|
-
|
|
56
|
+
setSorter: (option: {
|
|
57
|
+
payload: ITableState['sorter'];
|
|
58
|
+
forceUpdate?: boolean;
|
|
59
|
+
}) => void;
|
|
60
|
+
setFilters: (option: {
|
|
61
|
+
payload: ITableState['filters'];
|
|
62
|
+
forceUpdate?: boolean;
|
|
63
|
+
}) => void;
|
|
58
64
|
setSuperFilters: (options: ITableState['superFilters']) => void;
|
|
59
65
|
setPagerFilter: (value: ITableState['pagerFilter']) => void;
|
|
60
66
|
setHighlightKey: (rowKey: IRowKey) => void;
|
|
@@ -82,6 +88,7 @@ export type ITableContext = {
|
|
|
82
88
|
clearTableFilter: () => void;
|
|
83
89
|
clearSuperFilters: () => void;
|
|
84
90
|
clearPagerFilter: () => void;
|
|
91
|
+
clearActivedCell: () => void;
|
|
85
92
|
clearRowSelection: () => void;
|
|
86
93
|
clearRowHighlight: () => void;
|
|
87
94
|
};
|
|
@@ -43,6 +43,7 @@ type IExtra = {
|
|
|
43
43
|
clearTableFilter: () => void;
|
|
44
44
|
clearSuperFilters: () => void;
|
|
45
45
|
clearPagerFilter: () => void;
|
|
46
|
+
clearActivedCell: () => void;
|
|
46
47
|
clearTableLog: () => void;
|
|
47
48
|
};
|
|
48
49
|
declare const useImperativeMethod: <T extends React.ForwardedRef<TableRef>>(ref: T, extra: IExtra) => void;
|
|
@@ -36,10 +36,17 @@ type IExtra = {
|
|
|
36
36
|
setPingRight: (value: boolean) => void;
|
|
37
37
|
setPingLeft: (value: boolean) => void;
|
|
38
38
|
setSpinning: (value: boolean) => void;
|
|
39
|
-
setSorter: (
|
|
40
|
-
|
|
39
|
+
setSorter: (option: {
|
|
40
|
+
payload: ITableState['sorter'];
|
|
41
|
+
forceUpdate?: boolean;
|
|
42
|
+
}) => void;
|
|
43
|
+
setFilters: (option: {
|
|
44
|
+
payload: ITableState['filters'];
|
|
45
|
+
forceUpdate?: boolean;
|
|
46
|
+
}) => void;
|
|
41
47
|
setSuperFilters: (options: ITableState['superFilters']) => void;
|
|
42
48
|
setPagerFilter: (options: ITableState['pagerFilter']) => void;
|
|
49
|
+
setActivedCell: (option: ITableState['activedCell']) => void;
|
|
43
50
|
setSelectionKeys: (rowKeys: IRowKey[]) => void;
|
|
44
51
|
setRowExpandedKeys: (rowKeys: IRowKey[]) => void;
|
|
45
52
|
setHighlightKey: (rowKey: IRowKey) => void;
|
|
@@ -83,6 +90,7 @@ declare const useTableCore: <T extends ITableProps>(props: T, extra: IExtra) =>
|
|
|
83
90
|
clearTableFilter: () => void;
|
|
84
91
|
clearSuperFilters: () => void;
|
|
85
92
|
clearPagerFilter: () => void;
|
|
93
|
+
clearActivedCell: () => void;
|
|
86
94
|
clearRowSelection: () => void;
|
|
87
95
|
clearRowHighlight: () => void;
|
|
88
96
|
clearTableLog: () => void;
|
|
@@ -38,9 +38,15 @@ declare const useTableState: <T extends ITableProps>(props: T) => {
|
|
|
38
38
|
tableFlatData: IRecord<any>[];
|
|
39
39
|
setTableFlatData: React.Dispatch<React.SetStateAction<IRecord<any>[]>>;
|
|
40
40
|
filters: IFilter;
|
|
41
|
-
setFilters: React.Dispatch<
|
|
41
|
+
setFilters: React.Dispatch<{
|
|
42
|
+
payload: IFilter;
|
|
43
|
+
forceUpdate?: boolean | undefined;
|
|
44
|
+
}>;
|
|
42
45
|
sorter: ISorter;
|
|
43
|
-
setSorter: React.Dispatch<
|
|
46
|
+
setSorter: React.Dispatch<{
|
|
47
|
+
payload: ISorter;
|
|
48
|
+
forceUpdate?: boolean | undefined;
|
|
49
|
+
}>;
|
|
44
50
|
superFilters: ISuperFilter[];
|
|
45
51
|
setSuperFilters: React.Dispatch<ISuperFilter[]>;
|
|
46
52
|
pagerFilter: IPageFilter;
|
|
@@ -95,6 +95,7 @@ export declare const propTypes: {
|
|
|
95
95
|
formatType: PropTypes.Requireable<string>;
|
|
96
96
|
required: PropTypes.Requireable<boolean>;
|
|
97
97
|
canCopy: PropTypes.Requireable<boolean>;
|
|
98
|
+
translate: PropTypes.Requireable<boolean>;
|
|
98
99
|
editRender: PropTypes.Requireable<(...args: any[]) => any>;
|
|
99
100
|
dictItems: PropTypes.Requireable<(PropTypes.InferProps<{
|
|
100
101
|
text: PropTypes.Requireable<string>;
|
|
@@ -315,6 +315,7 @@ export type IColumn = {
|
|
|
315
315
|
formatType?: IFormatType;
|
|
316
316
|
required?: boolean;
|
|
317
317
|
canCopy?: boolean;
|
|
318
|
+
translate?: boolean;
|
|
318
319
|
editRender?: (row: IRecord, column: IColumn) => IEditerReturn;
|
|
319
320
|
dictItems?: Array<IDict>;
|
|
320
321
|
summation?: {
|
|
@@ -467,7 +468,7 @@ export type TableBodyRef = {
|
|
|
467
468
|
scrollToYIndex: (index: number) => void;
|
|
468
469
|
};
|
|
469
470
|
export type ColumnDefineRef = {
|
|
470
|
-
initialHandler: () => void;
|
|
471
|
+
initialHandler: (columns?: IColumn[]) => void;
|
|
471
472
|
};
|
|
472
473
|
export type ToolBoxRef = {
|
|
473
474
|
exportHandle: () => void;
|