@univerjs-pro/engine-pivot 1.0.0-beta.0 → 1.0.0-beta.1
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/cjs/index.js +1 -1
- package/lib/es/index.js +1 -1
- package/lib/index.js +1 -1
- package/lib/types/index.d.ts +1 -1
- package/lib/types/layout/base-layout.d.ts +4 -3
- package/lib/types/layout/tabular.d.ts +5 -0
- package/lib/types/types/layout-type.d.ts +6 -1
- package/lib/umd/index.js +1 -1
- package/package.json +1 -1
package/lib/types/index.d.ts
CHANGED
|
@@ -8,7 +8,7 @@ export { isErrorValue, isPrefixValue, LabelViewItem, PivotView, PivotViewItem, }
|
|
|
8
8
|
export { PivotTable } from './pivot/pivot-table';
|
|
9
9
|
export { createLabelField, createValueField, PivotTableLabelField, PivotTableValueField, } from './pivot/table-field';
|
|
10
10
|
export { PivotCallbackEnum, PivotDataFieldDataTypeEnum, PivotDataFieldSortOperatorEnum, PivotDataFieldSortTypeEnum, PivotDataFieldTypeEnum, PivotDateGroupFieldDateSystemEnum, PivotDateGroupFieldDateTypeEnum, PivotErrorTypeEnum, PivotFilterTypeEnum, PivotLayoutTypeEnum, PivotShowAsTypeEnum, PivotSubtotalPositionEnum, PivotSubtotalTypeEnum, PivotTableFiledAreaEnum, PivotTableValuePositionEnum, ST_PivotFilterOperatorEnum, } from './types/enum';
|
|
11
|
-
export type { IDataFieldValue, IDateValue,
|
|
11
|
+
export type { IDataFieldValue, IDateValue, IPivotTableDateGroupInfo, IPivotTableFilterInfo, IPivotTableManualFilter, IPivotTableSortInfo, IPivotTableValueFilter, IValueFilterInfoItem, } from './types/interface';
|
|
12
12
|
export type { IBaseGroupFieldJSON, IDataFieldManagerBaseJSON, IFieldsCollectionJSON, IPivotTableLabelFieldJSON, IPivotTableSnapshot, IPivotTableValueFieldJSON, } from './types/json-types';
|
|
13
13
|
export { PivotTableChangeTypeEnum } from './types/json-types';
|
|
14
14
|
export type { IPivotTableAddFieldChange, IPivotTableChangeSet, IPivotTableRemoveFieldChange, IPivotTableRenameFieldChange, IPivotTableSetCollapseChange, IPivotTableSetFilterInfoChange, IPivotTableSetFormatChange, IPivotTableSetLayoutChange, IPivotTableSetOptionsChange, IPivotTableSetSortInfoChange, IPivotTableSetSubtotalTypeChange, IPivotTableSetValueFilterChange, IPivotTableUpdatePositionChange, IPivotTableUpdateValuePositionChange, IPivotUpdateSourceChange, } from './types/json-types';
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import type { PivotTable } from '../pivot/pivot-table';
|
|
2
2
|
import type { NodeTree } from '../summary/node-tree';
|
|
3
3
|
import type { SummaryManager } from '../summary/summary-manager';
|
|
4
|
-
import type { IColumnNodeSizeInfo, INodeSizeInfo, IPivotLayoutCtx, IPivotTableLabelFieldQueryData, IPivotTableQueryData, PivotErrorTypeEnum } from '../types';
|
|
5
|
-
import type { PageViewItem } from './pivot-view';
|
|
4
|
+
import type { IColumnNodeSizeInfo, INodeSizeInfo, IPivotLayoutCtx, IPivotTableLabelFieldQueryData, IPivotTableQueryData, IPivotViewValueType, PivotErrorTypeEnum } from '../types';
|
|
5
|
+
import type { ColViewItem, PageViewItem } from './pivot-view';
|
|
6
6
|
export declare class BaseLayout {
|
|
7
7
|
/**
|
|
8
8
|
*
|
|
@@ -15,7 +15,7 @@ export declare class BaseLayout {
|
|
|
15
15
|
static layoutPageOverThenDown(filters: IPivotTableLabelFieldQueryData[], page: PageViewItem, pageWrap?: number): void;
|
|
16
16
|
static layoutPageDownThenOver(filters: IPivotTableLabelFieldQueryData[], page: PageViewItem, pageWrap?: number): void;
|
|
17
17
|
static layoutCol(ctx: IPivotLayoutCtx): void;
|
|
18
|
-
static layoutCorner(
|
|
18
|
+
static layoutCorner(_ctx: IPivotLayoutCtx): void;
|
|
19
19
|
static layoutColHeader(ctx: IPivotLayoutCtx): void;
|
|
20
20
|
static setValueSize(ctx: IPivotLayoutCtx): void;
|
|
21
21
|
static layoutNoneColFields(ctx: IPivotLayoutCtx, nodeTree: NodeTree): IColumnNodeSizeInfo;
|
|
@@ -52,6 +52,7 @@ export declare class BaseLayout {
|
|
|
52
52
|
static shouldMultipleTotal(hasMultiValue: boolean, nodeLevel: number, valueIndex: number): boolean;
|
|
53
53
|
static shouldMultipleNode(hasMultiValue: boolean, nodeLevel: number, valueIndex: number): boolean;
|
|
54
54
|
static getRowIndexForColHeader(nodeLevel: number, valueIndex: number, hasMultiValue: boolean): number;
|
|
55
|
+
static setColLabelValue(colView: ColViewItem, row: number, col: number, value: IPivotViewValueType, isBlank: boolean, isOther: boolean): void;
|
|
55
56
|
static layoutColNode(ctx: IPivotLayoutCtx, nodeTree: NodeTree, col: number, valueIds: string[]): IColumnNodeSizeInfo;
|
|
56
57
|
static getMeasureIndex(isColMultiMeasure: boolean, valueIds: string[], measureIndexesMap: Record<string, number>): number;
|
|
57
58
|
static updateColumnSubtotal(ctx: IPivotLayoutCtx, col: number, nodeTree: NodeTree, valueIds: string[], colPathMap: Record<string, number>): void;
|
|
@@ -6,6 +6,11 @@ import type { PivotView } from './pivot-view';
|
|
|
6
6
|
import { BaseLayout } from './base-layout';
|
|
7
7
|
export declare class TabularLayout extends BaseLayout {
|
|
8
8
|
static layout(pivotTable: PivotTable, summaryManager: SummaryManager, queryData: IPivotTableQueryData): PivotView;
|
|
9
|
+
static layoutHeadersWithoutColumnDimensions(ctx: IPivotLayoutCtx): void;
|
|
10
|
+
static getCornerSize(ctx: IPivotLayoutCtx): {
|
|
11
|
+
rowCount: number;
|
|
12
|
+
colCount: number;
|
|
13
|
+
};
|
|
9
14
|
static layoutCorner(ctx: IPivotLayoutCtx): void;
|
|
10
15
|
static layoutRowFields(ctx: IPivotLayoutCtx): void;
|
|
11
16
|
static doRowLeafNode(ctx: IPivotLayoutCtx, nodeTree: NodeTree, row: number, valueIds: string[]): IRowNodeSizeInfo;
|
|
@@ -179,9 +179,13 @@ export interface IPivotTableOptions {
|
|
|
179
179
|
*/
|
|
180
180
|
mergeItems?: boolean;
|
|
181
181
|
/**
|
|
182
|
-
* Whether to repeat
|
|
182
|
+
* Whether to repeat row item labels in the pivot table
|
|
183
183
|
*/
|
|
184
184
|
repeatRowLabels?: boolean;
|
|
185
|
+
/**
|
|
186
|
+
* Whether to repeat column item labels in the pivot table
|
|
187
|
+
*/
|
|
188
|
+
repeatColLabels?: boolean;
|
|
185
189
|
/**
|
|
186
190
|
* Whether to show subtotal and grand total, if showSubtotal is false, the subtotal and grand total will not be calculated and rendered, if showGrandTotal is false, the grand total will not be calculated and rendered
|
|
187
191
|
*/
|
|
@@ -243,6 +247,7 @@ export interface IPivotLayoutCtx {
|
|
|
243
247
|
measureIndexesMap: Record<string, number>;
|
|
244
248
|
collapseInfo: Record<string, boolean | Record<string, boolean>>;
|
|
245
249
|
repeatRowLabels: boolean;
|
|
250
|
+
repeatColLabels: boolean;
|
|
246
251
|
valueFilterMap: Record<string, IValueFilterInfoItem>;
|
|
247
252
|
showRowSubtotal: boolean;
|
|
248
253
|
showRowGrandTotal: boolean;
|