dcp-design-react 1.12.3 → 1.12.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.
@@ -1,6 +1,6 @@
1
1
  import React from 'react';
2
2
  import type { Virtualizer } from '../../../virtual-list/src/useVirtual';
3
- import type { IRowKey } from '../../../table/src/table/types';
3
+ import type { IColumn, IRowKey } from '../../../table/src/table/types';
4
4
  import type { ScrollbarRef } from '../../../scrollbar';
5
5
  import type { Nullable, ValueOf } from '../../../_utils/types';
6
6
  type GridRef = {
@@ -11,11 +11,12 @@ export type IGridLayoutContext = {
11
11
  scrollbarRef: React.RefObject<ScrollbarRef>;
12
12
  gridRef: React.MutableRefObject<GridRef>;
13
13
  indentDepth: number;
14
+ fixedWidth: number;
15
+ gridColumns: IColumn[];
14
16
  selectionKeys: IRowKey[];
15
17
  treeExpandKeys: IRowKey[];
16
18
  highlightKey: IRowKey;
17
19
  checkedColumnKey: string;
18
- updateLayout: number;
19
20
  clicked: [IRowKey, string] | [];
20
21
  isPingLeft: boolean;
21
22
  };
@@ -31,7 +32,6 @@ export declare const useGridLayoutContext: () => (IGridLayoutContext & {
31
32
  setTreeExpandKeys: (rowKeys: IRowKey[]) => void;
32
33
  setHighlightKey: (value: IRowKey) => void;
33
34
  setCheckColumnKey: (value: string) => void;
34
- forceUpdateLayout: () => void;
35
35
  updateColumnsWidth: () => void;
36
36
  setClicked: (value: [IRowKey, string] | [
37
37
  ]) => void;
@@ -1,9 +1,8 @@
1
1
  import React from 'react';
2
2
  import type { GroupLayout } from '../utils';
3
3
  import type { VirtualItem } from '../../../virtual-list/src/useVirtual';
4
- import type { IColumn, IRecord } from '../../../table/src/table/types';
4
+ import type { IRecord } from '../../../table/src/table/types';
5
5
  type IProps = {
6
- tbodyColumns: IColumn[];
7
6
  layout: GroupLayout[];
8
7
  displayList: IRecord[];
9
8
  virtualRows: VirtualItem[];
@@ -1,9 +1,8 @@
1
1
  import React from 'react';
2
2
  import type { GroupLayout } from '../utils';
3
3
  import type { VirtualItem } from '../../../virtual-list/src/useVirtual';
4
- import type { IColumn, IRecord } from '../../../table/src/table/types';
4
+ import type { IRecord } from '../../../table/src/table/types';
5
5
  type IProps = {
6
- tbodyColumns: IColumn[];
7
6
  layout: GroupLayout[];
8
7
  displayList: IRecord[];
9
8
  virtualRows: VirtualItem[];
@@ -1,5 +1,5 @@
1
1
  /// <reference types="react" />
2
- import type { IColumn, IRecord, IRowHighlight, IRowKey, ISelectionType, ISuperFilter } from '../../../table/src/table/types';
2
+ import type { IColumn, IFilter, IRecord, IRowHighlight, IRowKey, ISelectionType, ISorter, ISuperFilter } from '../../../table/src/table/types';
3
3
  import type { ComponentSize } from '../../../_utils/types';
4
4
  import type { GroupItem, SorterItem } from './Context';
5
5
  export type IPivotMode = 'table' | 'gantt' | 'card';
@@ -44,7 +44,10 @@ export type PivotGridProps = {
44
44
  treeExpandable?: TreeExpandType;
45
45
  initialGroup?: GroupItem[];
46
46
  initialCount?: Record<string, ICountFn>;
47
+ initialSorter?: ISorter;
48
+ initialFilter?: IFilter;
47
49
  contextMenues?: CxtMenuItem[];
50
+ openRowDraggable?: boolean;
48
51
  onDataChange?: (records: IRecord[]) => void;
49
52
  onColumnsChange?: (columns: IColumn[]) => void;
50
53
  onGroupChange?: (group: GroupItem[]) => void;
@@ -20,11 +20,11 @@ export type Summary = {
20
20
  export type FieldCalculations = Record<string, (dataList: number[]) => number>;
21
21
  export declare const calculateSummary: (groupData: Record<string, any> | Record<string, any>[], fieldCalculations: Record<string, (data: number[]) => number>) => Summary;
22
22
  export declare const calculations: {
23
- sum: (arr: number[]) => string;
24
- avg: (arr: number[]) => string | 0;
25
- max: (arr: number[]) => number | undefined;
26
- min: (arr: number[]) => number | undefined;
27
- count: (arr: number[]) => string;
23
+ sum: (arr: number[]) => number;
24
+ avg: (arr: number[]) => string;
25
+ max: (arr: number[]) => number | "";
26
+ min: (arr: number[]) => number | "";
27
+ count: (arr: number[]) => number;
28
28
  unique: (arr: number[]) => number;
29
29
  empty: (arr: number[]) => number;
30
30
  notEmpty: (arr: number[]) => number;