dcp-design-react 1.11.3 → 1.11.5
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/pivot-grid/src/main/Context.d.ts +10 -1
- package/lib/pivot-grid/style/grid-layout.less +243 -239
- package/lib/style/index.css +4 -0
- package/lib/style/index.min.css +1 -1
- package/lib/table/src/table/props.d.ts +0 -1
- package/lib/table/src/table/types.d.ts +0 -1
- package/package.json +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import type { IColumn, IOrderBy, IRecord, ISuperFilter } from '../../../table/src/table/types';
|
|
2
|
+
import type { IColumn, IOrderBy, IRecord, IRowKey, ISuperFilter } from '../../../table/src/table/types';
|
|
3
3
|
import type { ComponentSize } from '../../../_utils/types';
|
|
4
4
|
export type IPivotMode = 'table' | 'gantt' | 'card' | 'chart';
|
|
5
5
|
export type GroupItem = {
|
|
@@ -10,6 +10,11 @@ export type SorterItem = {
|
|
|
10
10
|
fieldName: string;
|
|
11
11
|
order: IOrderBy;
|
|
12
12
|
};
|
|
13
|
+
export type SearchResult = {
|
|
14
|
+
value: string;
|
|
15
|
+
rowKey: IRowKey;
|
|
16
|
+
dataIndex: string;
|
|
17
|
+
};
|
|
13
18
|
export type IPivotGridContext = {
|
|
14
19
|
prefixCls: string;
|
|
15
20
|
viewMode: IPivotMode;
|
|
@@ -22,6 +27,8 @@ export type IPivotGridContext = {
|
|
|
22
27
|
filterList: ISuperFilter[];
|
|
23
28
|
sorterList: SorterItem[];
|
|
24
29
|
expandedKeys: string[];
|
|
30
|
+
searchResults: SearchResult[];
|
|
31
|
+
switchIndex: number;
|
|
25
32
|
};
|
|
26
33
|
type IProps = {
|
|
27
34
|
prefixCls: string;
|
|
@@ -39,5 +46,7 @@ export declare const usePivotGridContext: () => (IPivotGridContext & {
|
|
|
39
46
|
setFilterList: (items: ISuperFilter[]) => void;
|
|
40
47
|
setSorterList: (items: SorterItem[]) => void;
|
|
41
48
|
setExpandedKeys: (keys: string[]) => void;
|
|
49
|
+
setSearchResults: (value: SearchResult[]) => void;
|
|
50
|
+
setSwitchIndex: (value: number) => void;
|
|
42
51
|
}) | undefined;
|
|
43
52
|
export {};
|
|
@@ -1,239 +1,243 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* @Author: 焦质晔
|
|
3
|
-
* @Date: 2022-03-16 19:05:30
|
|
4
|
-
* @Last Modified by: 焦质晔
|
|
5
|
-
* @Last Modified time: 2024-12-02 20:51:13
|
|
6
|
-
*/
|
|
7
|
-
@import '../../style/common';
|
|
8
|
-
|
|
9
|
-
.@{prefix-pivot-grid}__layout {
|
|
10
|
-
.reset-container();
|
|
11
|
-
height: 100%;
|
|
12
|
-
.header,
|
|
13
|
-
.footer {
|
|
14
|
-
border: 1px solid @--border-color-secondary;
|
|
15
|
-
.table {
|
|
16
|
-
table-layout: fixed;
|
|
17
|
-
display: contents;
|
|
18
|
-
thead th,
|
|
19
|
-
tfoot td {
|
|
20
|
-
text-align: left;
|
|
21
|
-
font-weight: normal;
|
|
22
|
-
border-right: 1px solid @--border-color-secondary;
|
|
23
|
-
position: relative;
|
|
24
|
-
&.selection-column {
|
|
25
|
-
text-align: center;
|
|
26
|
-
justify-content: center;
|
|
27
|
-
border-right-color: transparent;
|
|
28
|
-
}
|
|
29
|
-
}
|
|
30
|
-
}
|
|
31
|
-
}
|
|
32
|
-
.header {
|
|
33
|
-
position: sticky;
|
|
34
|
-
top: 0;
|
|
35
|
-
z-index: 2;
|
|
36
|
-
.resize-bar {
|
|
37
|
-
position: absolute;
|
|
38
|
-
top: 0;
|
|
39
|
-
bottom: 0;
|
|
40
|
-
right: -3px;
|
|
41
|
-
width: 6px;
|
|
42
|
-
z-index: 2;
|
|
43
|
-
cursor: col-resize;
|
|
44
|
-
}
|
|
45
|
-
}
|
|
46
|
-
.body {
|
|
47
|
-
min-height: fit-content;
|
|
48
|
-
.group-card {
|
|
49
|
-
margin: 15px 0;
|
|
50
|
-
background-color: #fff;
|
|
51
|
-
border: 1px solid @--border-color-secondary;
|
|
52
|
-
&.inner {
|
|
53
|
-
margin: 0 12px 12px;
|
|
54
|
-
}
|
|
55
|
-
&:has(.inner) > .label-row > .label-cell {
|
|
56
|
-
border-bottom: 0;
|
|
57
|
-
}
|
|
58
|
-
.label-row {
|
|
59
|
-
display: flex;
|
|
60
|
-
align-items: center;
|
|
61
|
-
.label-cell {
|
|
62
|
-
align-self: stretch;
|
|
63
|
-
display: inline-flex;
|
|
64
|
-
align-items: center;
|
|
65
|
-
background-color: #fff;
|
|
66
|
-
border-bottom: 1px solid @--border-color-secondary;
|
|
67
|
-
&.expandable-column {
|
|
68
|
-
justify-content: center;
|
|
69
|
-
.button-icon {
|
|
70
|
-
& > .anticon {
|
|
71
|
-
transition: transform 0.3s ease;
|
|
72
|
-
}
|
|
73
|
-
&.expand > .anticon {
|
|
74
|
-
transform: rotate(90deg);
|
|
75
|
-
}
|
|
76
|
-
}
|
|
77
|
-
}
|
|
78
|
-
&.col--fix-left {
|
|
79
|
-
position: sticky;
|
|
80
|
-
z-index: 1;
|
|
81
|
-
}
|
|
82
|
-
.title {
|
|
83
|
-
flex-shrink: 0;
|
|
84
|
-
margin-right: 20px;
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
border-right
|
|
148
|
-
}
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
}
|
|
159
|
-
&.col--
|
|
160
|
-
text-align:
|
|
161
|
-
justify-content:
|
|
162
|
-
}
|
|
163
|
-
&.col--
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
}
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
}
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
&.
|
|
197
|
-
visibility: visible;
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
1
|
+
/*
|
|
2
|
+
* @Author: 焦质晔
|
|
3
|
+
* @Date: 2022-03-16 19:05:30
|
|
4
|
+
* @Last Modified by: 焦质晔
|
|
5
|
+
* @Last Modified time: 2024-12-02 20:51:13
|
|
6
|
+
*/
|
|
7
|
+
@import '../../style/common';
|
|
8
|
+
|
|
9
|
+
.@{prefix-pivot-grid}__layout {
|
|
10
|
+
.reset-container();
|
|
11
|
+
height: 100%;
|
|
12
|
+
.header,
|
|
13
|
+
.footer {
|
|
14
|
+
border: 1px solid @--border-color-secondary;
|
|
15
|
+
.table {
|
|
16
|
+
table-layout: fixed;
|
|
17
|
+
display: contents;
|
|
18
|
+
thead th,
|
|
19
|
+
tfoot td {
|
|
20
|
+
text-align: left;
|
|
21
|
+
font-weight: normal;
|
|
22
|
+
border-right: 1px solid @--border-color-secondary;
|
|
23
|
+
position: relative;
|
|
24
|
+
&.selection-column {
|
|
25
|
+
text-align: center;
|
|
26
|
+
justify-content: center;
|
|
27
|
+
border-right-color: transparent;
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
.header {
|
|
33
|
+
position: sticky;
|
|
34
|
+
top: 0;
|
|
35
|
+
z-index: 2;
|
|
36
|
+
.resize-bar {
|
|
37
|
+
position: absolute;
|
|
38
|
+
top: 0;
|
|
39
|
+
bottom: 0;
|
|
40
|
+
right: -3px;
|
|
41
|
+
width: 6px;
|
|
42
|
+
z-index: 2;
|
|
43
|
+
cursor: col-resize;
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
.body {
|
|
47
|
+
min-height: fit-content;
|
|
48
|
+
.group-card {
|
|
49
|
+
margin: 15px 0;
|
|
50
|
+
background-color: #fff;
|
|
51
|
+
border: 1px solid @--border-color-secondary;
|
|
52
|
+
&.inner {
|
|
53
|
+
margin: 0 12px 12px;
|
|
54
|
+
}
|
|
55
|
+
&:has(.inner) > .label-row > .label-cell {
|
|
56
|
+
border-bottom: 0;
|
|
57
|
+
}
|
|
58
|
+
.label-row {
|
|
59
|
+
display: flex;
|
|
60
|
+
align-items: center;
|
|
61
|
+
.label-cell {
|
|
62
|
+
align-self: stretch;
|
|
63
|
+
display: inline-flex;
|
|
64
|
+
align-items: center;
|
|
65
|
+
background-color: #fff;
|
|
66
|
+
border-bottom: 1px solid @--border-color-secondary;
|
|
67
|
+
&.expandable-column {
|
|
68
|
+
justify-content: center;
|
|
69
|
+
.button-icon {
|
|
70
|
+
& > .anticon {
|
|
71
|
+
transition: transform 0.3s ease;
|
|
72
|
+
}
|
|
73
|
+
&.expand > .anticon {
|
|
74
|
+
transform: rotate(90deg);
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
&.col--fix-left {
|
|
79
|
+
position: sticky;
|
|
80
|
+
z-index: 1;
|
|
81
|
+
}
|
|
82
|
+
.title {
|
|
83
|
+
flex-shrink: 0;
|
|
84
|
+
margin-right: 20px;
|
|
85
|
+
font-weight: 700;
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
.grid-list {
|
|
90
|
+
margin: 0;
|
|
91
|
+
border: 0;
|
|
92
|
+
background: transparent;
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
.grid-list {
|
|
96
|
+
margin: 15px 0;
|
|
97
|
+
border: 1px solid @--border-color-secondary;
|
|
98
|
+
.table-row {
|
|
99
|
+
display: flex;
|
|
100
|
+
align-items: center;
|
|
101
|
+
&:hover {
|
|
102
|
+
.table-cell {
|
|
103
|
+
background-color: @--background-color-light;
|
|
104
|
+
.order {
|
|
105
|
+
display: none;
|
|
106
|
+
}
|
|
107
|
+
.checkbox {
|
|
108
|
+
display: inline-flex;
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
&.row--selection {
|
|
113
|
+
background-color: @--primary-1;
|
|
114
|
+
.table-cell {
|
|
115
|
+
.order {
|
|
116
|
+
display: none;
|
|
117
|
+
}
|
|
118
|
+
.checkbox {
|
|
119
|
+
display: inline-flex;
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
.table-cell {
|
|
124
|
+
align-self: stretch; // 子元素高度和父元素一致
|
|
125
|
+
display: inline-flex;
|
|
126
|
+
align-items: center;
|
|
127
|
+
border-bottom: 1px solid @--border-color-secondary;
|
|
128
|
+
&.active {
|
|
129
|
+
box-shadow: inset 0 0 0 2px @--primary-color;
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
.footer {
|
|
136
|
+
position: sticky;
|
|
137
|
+
bottom: 0;
|
|
138
|
+
z-index: 2;
|
|
139
|
+
}
|
|
140
|
+
.header,
|
|
141
|
+
.body,
|
|
142
|
+
.footer {
|
|
143
|
+
.table-cell {
|
|
144
|
+
background-color: #fff;
|
|
145
|
+
border-right: 1px solid @--border-color-secondary;
|
|
146
|
+
&:last-child {
|
|
147
|
+
border-right: 0;
|
|
148
|
+
}
|
|
149
|
+
&.selection-column {
|
|
150
|
+
justify-content: center;
|
|
151
|
+
border-right-color: transparent;
|
|
152
|
+
}
|
|
153
|
+
.order {
|
|
154
|
+
display: inline-block;
|
|
155
|
+
}
|
|
156
|
+
.checkbox {
|
|
157
|
+
display: none;
|
|
158
|
+
}
|
|
159
|
+
&.col--center {
|
|
160
|
+
text-align: center !important;
|
|
161
|
+
justify-content: center;
|
|
162
|
+
}
|
|
163
|
+
&.col--right {
|
|
164
|
+
text-align: right !important;
|
|
165
|
+
justify-content: flex-end;
|
|
166
|
+
}
|
|
167
|
+
&.col--fix-left {
|
|
168
|
+
position: sticky;
|
|
169
|
+
z-index: 1;
|
|
170
|
+
}
|
|
171
|
+
.cell {
|
|
172
|
+
.text-overflow-cut();
|
|
173
|
+
padding: 0 @--padding-sm;
|
|
174
|
+
}
|
|
175
|
+
}
|
|
176
|
+
.label-cell,
|
|
177
|
+
.table-cell {
|
|
178
|
+
&:hover {
|
|
179
|
+
.count-select {
|
|
180
|
+
visibility: visible;
|
|
181
|
+
}
|
|
182
|
+
}
|
|
183
|
+
}
|
|
184
|
+
.count-select {
|
|
185
|
+
.text-overflow-cut();
|
|
186
|
+
display: inline-flex;
|
|
187
|
+
align-items: center;
|
|
188
|
+
justify-content: flex-end;
|
|
189
|
+
height: 100%;
|
|
190
|
+
width: 100%;
|
|
191
|
+
padding: 0 @--padding-sm;
|
|
192
|
+
color: @--text-color-placeholder;
|
|
193
|
+
cursor: pointer;
|
|
194
|
+
visibility: hidden;
|
|
195
|
+
&:hover,
|
|
196
|
+
&.ant-dropdown-open {
|
|
197
|
+
visibility: visible;
|
|
198
|
+
background-color: @--background-color-light;
|
|
199
|
+
}
|
|
200
|
+
&.show {
|
|
201
|
+
visibility: visible;
|
|
202
|
+
}
|
|
203
|
+
.icon {
|
|
204
|
+
margin-left: 4px;
|
|
205
|
+
}
|
|
206
|
+
}
|
|
207
|
+
}
|
|
208
|
+
.resize-line {
|
|
209
|
+
position: absolute;
|
|
210
|
+
left: -2px;
|
|
211
|
+
top: 0;
|
|
212
|
+
width: 2px;
|
|
213
|
+
height: 100%;
|
|
214
|
+
background-color: @--primary-color;
|
|
215
|
+
cursor: col-resize;
|
|
216
|
+
z-index: 2;
|
|
217
|
+
}
|
|
218
|
+
// size
|
|
219
|
+
&.small {
|
|
220
|
+
.header .table th,
|
|
221
|
+
.footer .table td,
|
|
222
|
+
.body .grid-list > li,
|
|
223
|
+
.body .group-card > li {
|
|
224
|
+
height: 26px;
|
|
225
|
+
}
|
|
226
|
+
}
|
|
227
|
+
&.middle {
|
|
228
|
+
.header .table th,
|
|
229
|
+
.footer .table td,
|
|
230
|
+
.body .grid-list > li,
|
|
231
|
+
.body .group-card > li {
|
|
232
|
+
height: 34px;
|
|
233
|
+
}
|
|
234
|
+
}
|
|
235
|
+
&.large {
|
|
236
|
+
.header .table th,
|
|
237
|
+
.footer .table td,
|
|
238
|
+
.body .grid-list > li,
|
|
239
|
+
.body .group-card > li {
|
|
240
|
+
height: 42px;
|
|
241
|
+
}
|
|
242
|
+
}
|
|
243
|
+
}
|
package/lib/style/index.css
CHANGED
|
@@ -31232,6 +31232,7 @@ body {
|
|
|
31232
31232
|
.qm-pivot-grid__layout .body .group-card .label-row .label-cell .title {
|
|
31233
31233
|
flex-shrink: 0;
|
|
31234
31234
|
margin-right: 20px;
|
|
31235
|
+
font-weight: 700;
|
|
31235
31236
|
}
|
|
31236
31237
|
.qm-pivot-grid__layout .body .group-card .grid-list {
|
|
31237
31238
|
margin: 0;
|
|
@@ -31270,6 +31271,9 @@ body {
|
|
|
31270
31271
|
align-items: center;
|
|
31271
31272
|
border-bottom: 1px solid #e8e8e8;
|
|
31272
31273
|
}
|
|
31274
|
+
.qm-pivot-grid__layout .body .grid-list .table-row .table-cell.active {
|
|
31275
|
+
box-shadow: inset 0 0 0 2px #1890ff;
|
|
31276
|
+
}
|
|
31273
31277
|
.qm-pivot-grid__layout .footer {
|
|
31274
31278
|
position: sticky;
|
|
31275
31279
|
bottom: 0;
|