dcp-design-react 1.11.6 → 1.11.7

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.
@@ -6,6 +6,7 @@ export type IGridLayoutContext = {
6
6
  scrollbarRef: React.RefObject<ScrollbarRef>;
7
7
  indentDepth: number;
8
8
  selectionKeys: IRowKey[];
9
+ treeExpandKeys: IRowKey[];
9
10
  countMethod: Record<string, string>;
10
11
  summationData: Summary;
11
12
  };
@@ -17,6 +18,7 @@ export declare const GridLayoutProvider: React.FC<IProps>;
17
18
  export declare const useGridLayoutContext: () => (IGridLayoutContext & {
18
19
  setContext: (data: Partial<IGridLayoutContext>) => void;
19
20
  setSelectionKeys: (rowKeys: IRowKey[]) => void;
21
+ setTreeExpandKeys: (rowKeys: IRowKey[]) => void;
20
22
  setCountMethod: (value: Record<string, string | undefined>) => void;
21
23
  setSummationData: (value: Summary) => void;
22
24
  }) | undefined;
@@ -1,6 +1,7 @@
1
1
  import React from 'react';
2
2
  import type { IColumn, IOrderBy, IRecord, IRowKey, ISuperFilter } from '../../../table/src/table/types';
3
- import type { ComponentSize } from '../../../_utils/types';
3
+ import type { ComponentSize, ValueOf } from '../../../_utils/types';
4
+ import type { IGridLayoutContext } from '../grid-layout/Context';
4
5
  export type IPivotMode = 'table' | 'gantt' | 'card' | 'chart';
5
6
  export type GroupItem = {
6
7
  fieldName: string;
@@ -18,6 +19,9 @@ export type SearchResult = {
18
19
  export type PivotRef = {
19
20
  originGridData: IRecord[];
20
21
  flatGroupData: IRecord[];
22
+ keyRecordMap: Map<IRowKey, IRecord>;
23
+ isTree: boolean;
24
+ gridLayoutContext: Partial<IGridLayoutContext>;
21
25
  };
22
26
  export type IPivotGridContext = {
23
27
  pivotRef: React.MutableRefObject<PivotRef>;
@@ -43,7 +47,8 @@ type IProps = {
43
47
  export declare const PivotGridProvider: React.FC<IProps>;
44
48
  export declare const usePivotGridContext: () => (IPivotGridContext & {
45
49
  setContext: (data: Partial<IPivotGridContext>) => void;
46
- setPivotGridRef: (value: Partial<PivotRef>) => void;
50
+ getRowKey: (row: IRecord, index: number) => IRowKey;
51
+ setPivotGridRef: (key: string, value: ValueOf<PivotRef>) => void;
47
52
  setColumns: (items: IColumn[]) => void;
48
53
  setGridData: (items: IRecord[]) => void;
49
54
  setGroupGridData: (data: Record<string, any> | Record<string, any>[]) => void;
@@ -1,3 +1,4 @@
1
1
  import React from 'react';
2
- declare const PivotGrid: React.FC;
2
+ import type { PivotGridProps } from './types';
3
+ declare const PivotGrid: React.FC<PivotGridProps>;
3
4
  export default PivotGrid;
@@ -0,0 +1,3 @@
1
+ import React from 'react';
2
+ declare const ExportPanel: () => React.JSX.Element;
3
+ export default ExportPanel;
@@ -1,7 +1,8 @@
1
1
  import type { IRecord, IOrderBy, IColumn } from '../../../table/src/table/types';
2
2
  export declare const createGridColumns: (columns: IColumn[]) => IColumn[];
3
+ export declare const filterGridColumns: (columns: IColumn[]) => IColumn[];
3
4
  export declare const getStickyLeft: (flattenColumns: IColumn[], fieldName: string) => number;
4
- export declare const groupMultiData: (records: IRecord[], groupKeys: Record<string, IOrderBy>[] | undefined, fn: (row: IRecord, key: string) => string | number) => any;
5
+ export declare const groupMultiData: (records: IRecord[], groupKeys: Record<string, IOrderBy>[] | undefined, isTree: boolean, fn: (row: IRecord, key: string) => string | number) => Record<string, any> | Record<string, any>[];
5
6
  export declare const getAllKeys: (data: Record<string, any> | Record<string, any>[], parentKey?: string) => string[];
6
7
  export type Subtotal = {
7
8
  [key: string]: number;
@@ -135,6 +135,17 @@
135
135
  background-color: rgba(255, 235, 140, 1);
136
136
  }
137
137
  }
138
+ .cell--expand {
139
+ display: inline-flex;
140
+ padding: 4px;
141
+ font-size: 13px;
142
+ color: @--text-color-placeholder;
143
+ cursor: pointer;
144
+ transition: transform 0.3s ease;
145
+ &.fold {
146
+ transform: rotate(-90deg);
147
+ }
148
+ }
138
149
  }
139
150
  }
140
151
  }
@@ -2,7 +2,7 @@
2
2
  * @Author: 焦质晔
3
3
  * @Date: 2022-03-16 19:05:30
4
4
  * @Last Modified by: 焦质晔
5
- * @Last Modified time: 2024-12-04 09:17:17
5
+ * @Last Modified time: 2024-12-13 14:07:07
6
6
  */
7
7
  @import '../../style/common';
8
8
 
@@ -136,4 +136,10 @@
136
136
  }
137
137
  }
138
138
  }
139
+ .ant-dropdown-menu-root {
140
+ padding: 5px;
141
+ .ant-dropdown-menu-item {
142
+ border-radius: @--border-radius-lg;
143
+ }
144
+ }
139
145
  }
@@ -31014,7 +31014,7 @@ body {
31014
31014
  * @Author: 焦质晔
31015
31015
  * @Date: 2022-03-16 19:05:30
31016
31016
  * @Last Modified by: 焦质晔
31017
- * @Last Modified time: 2024-12-04 09:17:17
31017
+ * @Last Modified time: 2024-12-13 14:07:07
31018
31018
  */
31019
31019
  .button-icon {
31020
31020
  display: inline-flex;
@@ -31136,6 +31136,12 @@ body {
31136
31136
  color: rgba(0, 0, 0, 0.45);
31137
31137
  line-height: 1;
31138
31138
  }
31139
+ .qm-pivot-grid__popper .ant-dropdown-menu-root {
31140
+ padding: 5px;
31141
+ }
31142
+ .qm-pivot-grid__popper .ant-dropdown-menu-root .ant-dropdown-menu-item {
31143
+ border-radius: 4px;
31144
+ }
31139
31145
  /*
31140
31146
  * @Author: 焦质晔
31141
31147
  * @Date: 2022-03-16 19:05:30
@@ -31283,6 +31289,17 @@ body {
31283
31289
  box-shadow: inset 0 0 0 2px #1890ff;
31284
31290
  background-color: #ffeb8c;
31285
31291
  }
31292
+ .qm-pivot-grid__layout .body .grid-list .table-row .cell--expand {
31293
+ display: inline-flex;
31294
+ padding: 4px;
31295
+ font-size: 13px;
31296
+ color: rgba(0, 0, 0, 0.45);
31297
+ cursor: pointer;
31298
+ transition: transform 0.3s ease;
31299
+ }
31300
+ .qm-pivot-grid__layout .body .grid-list .table-row .cell--expand.fold {
31301
+ transform: rotate(-90deg);
31302
+ }
31286
31303
  .qm-pivot-grid__layout .footer {
31287
31304
  position: sticky;
31288
31305
  bottom: 0;