dcp-design-react 1.11.17 → 1.11.19

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.
@@ -313,12 +313,15 @@ declare const _default: {
313
313
  notMatch: string;
314
314
  toTheEnd: string;
315
315
  toStart: string;
316
- tabPanes: string[];
317
316
  matchCase: string;
318
317
  matchFullchar: string;
319
- clear: string;
318
+ queryLabel: string;
320
319
  queryPrev: string;
321
320
  queryNext: string;
321
+ queryAll: string;
322
+ findTotal: string;
323
+ cellText: string;
324
+ valText: string;
322
325
  };
323
326
  pivotGrid: {
324
327
  text: string;
@@ -357,6 +360,7 @@ declare const _default: {
357
360
  title: string;
358
361
  cell: string;
359
362
  row: string;
363
+ col: string;
360
364
  };
361
365
  filter: {
362
366
  text: string;
@@ -319,12 +319,15 @@ export default {
319
319
  notMatch: 'There are no qualified records!',
320
320
  toTheEnd: 'It has been found to the end. Do you want to find it from the beginning?',
321
321
  toStart: 'The start has been found. Do you want to start from the end?',
322
- tabPanes: ['Search condition', 'More conditions'],
323
322
  matchCase: 'Case matching',
324
323
  matchFullchar: 'Full character matching',
325
- clear: 'Clear condition',
324
+ queryLabel: 'Find content',
326
325
  queryPrev: 'Find previous',
327
- queryNext: 'Find next'
326
+ queryNext: 'Find next',
327
+ queryAll: 'Find all',
328
+ findTotal: 'Found {total} cells',
329
+ cellText: 'Cell',
330
+ valText: 'Value'
328
331
  },
329
332
  pivotGrid: {
330
333
  text: 'Pivot Grid',
@@ -362,7 +365,8 @@ export default {
362
365
  add: 'Add condition',
363
366
  title: 'Set fill color conditions',
364
367
  cell: 'Cell',
365
- row: 'Row'
368
+ row: 'Row',
369
+ col: 'Col'
366
370
  },
367
371
  filter: {
368
372
  text: 'Filter',
@@ -313,12 +313,15 @@ declare const _default: {
313
313
  notMatch: string;
314
314
  toTheEnd: string;
315
315
  toStart: string;
316
- tabPanes: string[];
317
316
  matchCase: string;
318
317
  matchFullchar: string;
319
- clear: string;
318
+ queryLabel: string;
320
319
  queryPrev: string;
321
320
  queryNext: string;
321
+ queryAll: string;
322
+ findTotal: string;
323
+ cellText: string;
324
+ valText: string;
322
325
  };
323
326
  pivotGrid: {
324
327
  text: string;
@@ -357,6 +360,7 @@ declare const _default: {
357
360
  title: string;
358
361
  cell: string;
359
362
  row: string;
363
+ col: string;
360
364
  };
361
365
  filter: {
362
366
  text: string;
@@ -319,12 +319,15 @@ export default {
319
319
  notMatch: '没有符合条件的记录!',
320
320
  toTheEnd: '已查找到表格末尾,是否从头开始查找?',
321
321
  toStart: '已查找到表格开始,是否从末尾开始查找',
322
- tabPanes: ['查找条件', '更多条件'],
323
322
  matchCase: '大小写匹配',
324
323
  matchFullchar: '全字符匹配',
325
- clear: '清空条件',
324
+ queryLabel: '查找内容',
326
325
  queryPrev: '查找上一个',
327
- queryNext: '查找下一个'
326
+ queryNext: '查找下一个',
327
+ queryAll: '查找全部',
328
+ findTotal: '查找到 {total} 个单元格',
329
+ cellText: '单元格',
330
+ valText: '值'
328
331
  },
329
332
  pivotGrid: {
330
333
  text: '多维表',
@@ -362,7 +365,8 @@ export default {
362
365
  add: '添加条件',
363
366
  title: '设置填色条件',
364
367
  cell: '单元格',
365
- row: '整行'
368
+ row: '整行',
369
+ col: '整列'
366
370
  },
367
371
  filter: {
368
372
  text: '筛选',
@@ -1,16 +1,23 @@
1
1
  import React from 'react';
2
+ import type { Virtualizer } from '../../../virtual-list/src/useVirtual';
2
3
  import type { IRowKey } from '../../../table/src/table/types';
3
4
  import type { ScrollbarRef } from '../../../scrollbar';
5
+ import type { Nullable, ValueOf } from '../../../_utils/types';
6
+ type GridRef = {
7
+ bodyEl: Nullable<HTMLElement>;
8
+ rowVirtualizer: Virtualizer<HTMLElement, Element> | null;
9
+ };
4
10
  export type IGridLayoutContext = {
5
11
  scrollbarRef: React.RefObject<ScrollbarRef>;
12
+ gridRef: React.MutableRefObject<GridRef>;
6
13
  indentDepth: number;
7
14
  selectionKeys: IRowKey[];
8
15
  treeExpandKeys: IRowKey[];
9
16
  highlightKey: IRowKey;
10
17
  checkedColumnKey: string;
11
- hoverRowKey: IRowKey;
12
18
  updateLayout: number;
13
19
  clicked: [IRowKey, string] | [];
20
+ isPingLeft: boolean;
14
21
  };
15
22
  type IProps = {
16
23
  scrollbar: React.RefObject<ScrollbarRef>;
@@ -19,14 +26,15 @@ type IProps = {
19
26
  export declare const GridLayoutProvider: React.FC<IProps>;
20
27
  export declare const useGridLayoutContext: () => (IGridLayoutContext & {
21
28
  setContext: (data: Partial<IGridLayoutContext>) => void;
29
+ setGridLayoutRef: (key: string, value: ValueOf<GridRef>) => void;
22
30
  setSelectionKeys: (rowKeys: IRowKey[]) => void;
23
31
  setTreeExpandKeys: (rowKeys: IRowKey[]) => void;
24
32
  setHighlightKey: (value: IRowKey) => void;
25
33
  setCheckColumnKey: (value: string) => void;
26
- setHoverRowKey: (value: IRowKey) => void;
27
34
  forceUpdateLayout: () => void;
28
35
  updateColumnsWidth: () => void;
29
36
  setClicked: (value: [IRowKey, string] | [
30
37
  ]) => void;
38
+ setPingLeft: (value: boolean) => void;
31
39
  }) | undefined;
32
40
  export {};
@@ -7,6 +7,7 @@ type IProps = {
7
7
  layout: GroupLayout[];
8
8
  displayList: IRecord[];
9
9
  virtualRows: VirtualItem[];
10
+ notGroup: boolean;
10
11
  };
11
12
  declare const LeftPanel: React.FC<IProps>;
12
13
  export default LeftPanel;
@@ -7,6 +7,7 @@ type IProps = {
7
7
  layout: GroupLayout[];
8
8
  displayList: IRecord[];
9
9
  virtualRows: VirtualItem[];
10
+ notGroup: boolean;
10
11
  };
11
12
  declare const MainPanel: React.FC<IProps>;
12
13
  export default MainPanel;
@@ -13,7 +13,7 @@ export type SorterItem = {
13
13
  };
14
14
  export type FillColorItem = ISuperFilter & {
15
15
  color: string;
16
- mode: 'cell' | 'row';
16
+ mode: 'cell' | 'row' | 'col';
17
17
  };
18
18
  export type SearchResult = {
19
19
  value: string;
@@ -29,7 +29,7 @@ export declare const calculations: {
29
29
  empty: (arr: number[]) => number;
30
30
  notEmpty: (arr: number[]) => number;
31
31
  };
32
- export declare const flattenGroupedData: (groupData: Record<string, any> | Record<string, any>[]) => IRecord[];
32
+ export declare const flattenGroupedData: (groupData: Record<string, any> | Record<string, any>[], groupKeys?: Record<string, IOrderBy>[]) => IRecord[];
33
33
  export type GroupLayout = {
34
34
  key: IRowKey;
35
35
  top: number;
@@ -9,6 +9,26 @@
9
9
  .@{prefix-pivot-grid}__layout {
10
10
  .reset-container();
11
11
  width: 100%;
12
+
13
+ // =========== 变量 ===========
14
+ @header-bg-color: #d7f0ff;
15
+ @border-radius: 8px;
16
+ .bor-radius-left() {
17
+ border-top-left-radius: @border-radius;
18
+ border-bottom-left-radius: @border-radius;
19
+ }
20
+ .bor-radius-right() {
21
+ border-top-right-radius: @border-radius;
22
+ border-bottom-right-radius: @border-radius;
23
+ }
24
+ .bor-left-shadow() {
25
+ box-shadow: -5px 0px 0 0px @--background-color-light;
26
+ }
27
+ .bor-right-shadow() {
28
+ box-shadow: 5px 0px 0 0px @--background-color-light;
29
+ }
30
+ // =========== 变量 END ===========
31
+
12
32
  .@{qm-prefix}-scrollbar__wrap {
13
33
  // 调整为 flex 布局
14
34
  display: flex;
@@ -28,11 +48,21 @@
28
48
  display: flex;
29
49
  border-left: 1px solid @--border-color-secondary;
30
50
  border-bottom: 1px solid @--border-color-secondary;
51
+ .bor-left-shadow();
52
+ &,
53
+ .table-cell:first-child {
54
+ .bor-radius-left();
55
+ }
31
56
  }
32
57
  .no-fixed {
33
58
  flex: 1 0;
34
59
  display: flex;
35
60
  border-bottom: 1px solid @--border-color-secondary;
61
+ .bor-right-shadow();
62
+ &,
63
+ .table-cell:last-child {
64
+ .bor-radius-right();
65
+ }
36
66
  }
37
67
  }
38
68
  .header {
@@ -41,7 +71,7 @@
41
71
  z-index: 2;
42
72
  .table-cell {
43
73
  position: relative;
44
- background-color: #d6f2ff !important;
74
+ background-color: @header-bg-color !important;
45
75
  cursor: pointer;
46
76
  }
47
77
  .resize-bar {
@@ -129,9 +159,6 @@
129
159
  .cell {
130
160
  .text-overflow-cut();
131
161
  padding: 0 @--padding-sm;
132
- &.indent {
133
- padding-left: 16px;
134
- }
135
162
  }
136
163
  }
137
164
  .label-cell,
@@ -185,6 +212,22 @@
185
212
  border-left: 1px solid @--primary-3;
186
213
  z-index: 2;
187
214
  pointer-events: none;
215
+ &::after {
216
+ content: '';
217
+ position: absolute;
218
+ top: 0;
219
+ right: 0;
220
+ bottom: -1px;
221
+ width: 20px;
222
+ transform: translateX(100%);
223
+ transition: box-shadow 0.3s, -webkit-box-shadow 0.3s;
224
+ pointer-events: none;
225
+ }
226
+ &.active {
227
+ &::after {
228
+ box-shadow: inset 10px 0 8px -8px rgba(0, 0, 0, 0.15);
229
+ }
230
+ }
188
231
  }
189
232
  // 左侧面板
190
233
  .left-panel {
@@ -193,6 +236,30 @@
193
236
  z-index: 1;
194
237
  .group-label {
195
238
  border-right: 0 !important;
239
+ .bor-radius-left();
240
+ &.level0 {
241
+ .bor-left-shadow();
242
+ }
243
+ }
244
+ .row-item {
245
+ &:nth-of-type(1) {
246
+ border-top-left-radius: @border-radius;
247
+ .bor-left-shadow();
248
+ .table-cell:first-child {
249
+ border-top-left-radius: @border-radius;
250
+ }
251
+ }
252
+ &.last {
253
+ border-bottom-left-radius: @border-radius;
254
+ .table-cell:first-child {
255
+ border-bottom-left-radius: @border-radius;
256
+ }
257
+ }
258
+ }
259
+ .no-group {
260
+ .row-item:last-child {
261
+ .bor-left-shadow();
262
+ }
196
263
  }
197
264
  }
198
265
  .main-panel {
@@ -202,6 +269,23 @@
202
269
  .row-item {
203
270
  border-left: 0 !important;
204
271
  }
272
+ .group-label {
273
+ .bor-radius-right();
274
+ }
275
+ .row-item {
276
+ &:nth-of-type(1) {
277
+ border-top-right-radius: @border-radius;
278
+ .table-cell:last-child {
279
+ border-top-right-radius: @border-radius;
280
+ }
281
+ }
282
+ &.last {
283
+ border-bottom-right-radius: @border-radius;
284
+ .table-cell:last-child {
285
+ border-bottom-right-radius: @border-radius;
286
+ }
287
+ }
288
+ }
205
289
  }
206
290
  .container {
207
291
  position: relative;
@@ -237,7 +321,11 @@
237
321
  .title {
238
322
  flex-shrink: 0;
239
323
  margin-right: 20px;
240
- font-weight: 700;
324
+ font-weight: 600;
325
+ .empty {
326
+ color: @--text-color-placeholder;
327
+ font-weight: 400;
328
+ }
241
329
  }
242
330
  }
243
331
  }
@@ -14,7 +14,7 @@
14
14
  }
15
15
  &:not(.is-from-table) {
16
16
  border: 1px solid @--border-color-secondary;
17
- border-radius: @--border-radius-lg;
17
+ border-radius: @--border-radius-lg + 2px;
18
18
  }
19
19
  .top-bar {
20
20
  display: flex;
@@ -1,6 +1,7 @@
1
1
  import React, { Component } from 'react';
2
2
  import ConfigContext from '../../config-provider/context';
3
- import { QmForm, QmFormItem } from '../../index';
3
+ import type { IFormItem } from '../../form';
4
+ import Form from '../../form';
4
5
  type IProps = {
5
6
  setting: {
6
7
  distance: {
@@ -19,13 +20,13 @@ type IProps = {
19
20
  onClose: () => void;
20
21
  };
21
22
  type IState = {
22
- formList: QmFormItem[];
23
+ formList: IFormItem[];
23
24
  };
24
25
  declare class Setting extends Component<IProps, IState> {
25
26
  static contextType: React.Context<import("../../config-provider/context").IConfig>;
26
27
  context: React.ContextType<typeof ConfigContext>;
27
- formRef: React.RefObject<QmForm>;
28
- createFormList: () => QmFormItem[];
28
+ formRef: React.RefObject<Form>;
29
+ createFormList: () => IFormItem[];
29
30
  getInitialvalue: () => {
30
31
  disleft: number;
31
32
  disright: number;
@@ -1,34 +1,35 @@
1
- /*
2
- * @Author: 焦质晔
3
- * @Date: 2022-01-11 18:01:20
4
- * @Last Modified by: 焦质晔
5
- * @Last Modified time: 2022-09-04 16:40:18
6
- */
7
- @import '../../style/common';
8
-
9
- @prefix-search-tree: ~'@{qm-prefix}-search-tree';
10
-
11
- .@{prefix-search-tree} {
12
- .reset-container();
13
- height: 100%;
14
- .topper {
15
- display: flex;
16
- justify-content: space-between;
17
- align-items: center;
18
- .ant-input-search {
19
- flex: 1 0;
20
- margin-bottom: 8px;
21
- }
22
- .trigger {
23
- margin-left: 8px;
24
- margin-bottom: 8px;
25
- }
26
- }
27
- .ant-tree {
28
- .filter-node {
29
- & > span:last-of-type {
30
- color: @--primary-color;
31
- }
32
- }
33
- }
34
- }
1
+ /*
2
+ * @Author: 焦质晔
3
+ * @Date: 2022-01-11 18:01:20
4
+ * @Last Modified by: 焦质晔
5
+ * @Last Modified time: 2022-09-04 16:40:18
6
+ */
7
+ @import '../../style/common';
8
+
9
+ @prefix-search-tree: ~'@{qm-prefix}-search-tree';
10
+
11
+ .@{prefix-search-tree} {
12
+ .reset-container();
13
+ height: 100%;
14
+ .topper {
15
+ display: flex;
16
+ justify-content: space-between;
17
+ align-items: center;
18
+ .ant-input-search {
19
+ flex: 1 0;
20
+ margin-bottom: 8px;
21
+ }
22
+ .trigger {
23
+ flex-shrink: 0;
24
+ margin-left: 8px;
25
+ margin-bottom: 8px;
26
+ }
27
+ }
28
+ .ant-tree {
29
+ .filter-node {
30
+ & > span:last-of-type {
31
+ color: @--primary-color;
32
+ }
33
+ }
34
+ }
35
+ }