@univerjs-pro/engine-pivot 0.17.0 → 0.18.0
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/field/base-group-field.d.ts +1 -1
- package/lib/types/field/data-field-manager.d.ts +1 -1
- package/lib/types/field/data-field.d.ts +2 -1
- package/lib/types/field/date-group-field.d.ts +3 -2
- package/lib/types/field/fields-collection.d.ts +2 -2
- package/lib/types/filter-util.d.ts +1 -1
- package/lib/types/layout/base-layout.d.ts +5 -5
- package/lib/types/layout/compact.d.ts +4 -4
- package/lib/types/layout/outline.d.ts +4 -4
- package/lib/types/layout/pivot-view.d.ts +2 -2
- package/lib/types/layout/tabular.d.ts +5 -5
- package/lib/types/pivot/model.d.ts +2 -1
- package/lib/types/pivot/pivot-table.d.ts +6 -5
- package/lib/types/pivot/table-field.d.ts +2 -1
- package/lib/types/summary/node-tree.d.ts +2 -1
- package/lib/types/summary/pivot-tuple.d.ts +2 -1
- package/lib/types/summary/summary-manager.d.ts +4 -3
- package/lib/types/summary/tuple-group.d.ts +3 -2
- package/lib/types/types/interface.d.ts +1 -1
- package/lib/types/types/json-types.d.ts +3 -3
- package/lib/types/types/layout-type.d.ts +5 -5
- package/lib/types/types/summary-type.d.ts +3 -3
- package/lib/types/util.d.ts +5 -4
- package/lib/umd/index.js +1 -1
- package/package.json +5 -4
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { IBaseGroupFieldInfo, IBaseGroupFieldJSON, IPivotTableGroupInfo, PivotDataFieldTypeEnum } from '../types';
|
|
1
|
+
import type { IBaseGroupFieldInfo, IBaseGroupFieldJSON, IPivotTableGroupInfo, PivotDataFieldTypeEnum } from '../types';
|
|
2
2
|
import { DataField } from './data-field';
|
|
3
3
|
export declare abstract class BaseGroupField extends DataField {
|
|
4
4
|
protected originalFieldId: string;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { IDataFieldManagerBaseJSON, IDataFieldValue, PivotSubtotalTypeEnum } from '../types';
|
|
1
|
+
import type { IDataFieldManagerBaseJSON, IDataFieldValue, PivotSubtotalTypeEnum } from '../types';
|
|
2
2
|
import { DataField } from './data-field';
|
|
3
3
|
import { FieldsCollection } from './fields-collection';
|
|
4
4
|
type autoDisplayNameFunction = (name: string, subtotalType: PivotSubtotalTypeEnum) => string;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { IDataFieldInfo, IDataFieldJSON, IDataFieldValue
|
|
1
|
+
import type { IDataFieldInfo, IDataFieldJSON, IDataFieldValue } from '../types';
|
|
2
|
+
import { PivotDataFieldDataTypeEnum, PivotDataFieldTypeEnum } from '../types';
|
|
2
3
|
/**
|
|
3
4
|
* Represents a data field in a pivot table , it match the excel pivot cache field data structure.
|
|
4
5
|
* @param {string} id - The unique identifier of the data field.
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import { IDateGroupFieldInfo, IDateGroupFieldJSON, IPivotTableGroupInfo
|
|
2
|
-
import { DataField } from './data-field';
|
|
1
|
+
import type { IDateGroupFieldInfo, IDateGroupFieldJSON, IPivotTableGroupInfo } from '../types';
|
|
2
|
+
import type { DataField } from './data-field';
|
|
3
|
+
import { PivotDataFieldTypeEnum, PivotDateGroupFieldDateTypeEnum } from '../types';
|
|
3
4
|
import { BaseGroupField } from './base-group-field';
|
|
4
5
|
export declare class DateGroupField extends BaseGroupField {
|
|
5
6
|
private _dataIsValid;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { IDataFieldInfo, IFieldsCollectionJSON } from '../types';
|
|
2
|
-
import { DataFieldManager } from './data-field-manager';
|
|
1
|
+
import type { IDataFieldInfo, IFieldsCollectionJSON } from '../types';
|
|
2
|
+
import type { DataFieldManager } from './data-field-manager';
|
|
3
3
|
import { DataField } from './data-field';
|
|
4
4
|
/**
|
|
5
5
|
* Represents the collection of fields in the pivot table. which one to one with a pivot table.
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { IPivotTableCustomFilter, IPivotTableValueFilter } from './types';
|
|
1
|
+
import type { IPivotTableCustomFilter, IPivotTableValueFilter } from './types';
|
|
2
2
|
export declare function getFilterExecuteFunc(filterInfo: IPivotTableValueFilter | IPivotTableCustomFilter): (value: number) => boolean;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { PivotTable } from '../pivot/pivot-table';
|
|
2
|
-
import { NodeTree } from '../summary/node-tree';
|
|
3
|
-
import { SummaryManager } from '../summary/summary-manager';
|
|
4
|
-
import { IColumnNodeSizeInfo, INodeSizeInfo, IPivotLayoutCtx, IPivotTableLabelFieldQueryData, IPivotTableQueryData, PivotErrorTypeEnum } from '../types';
|
|
5
|
-
import { PageViewItem } from './pivot-view';
|
|
1
|
+
import type { PivotTable } from '../pivot/pivot-table';
|
|
2
|
+
import type { NodeTree } from '../summary/node-tree';
|
|
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';
|
|
6
6
|
export declare class BaseLayout {
|
|
7
7
|
/**
|
|
8
8
|
*
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { PivotTable } from '../pivot/pivot-table';
|
|
2
|
-
import { SummaryManager } from '../summary/summary-manager';
|
|
3
|
-
import { IPivotLayoutCtx, IPivotTableQueryData } from '../types';
|
|
4
|
-
import { PivotView } from './pivot-view';
|
|
1
|
+
import type { PivotTable } from '../pivot/pivot-table';
|
|
2
|
+
import type { SummaryManager } from '../summary/summary-manager';
|
|
3
|
+
import type { IPivotLayoutCtx, IPivotTableQueryData } from '../types';
|
|
4
|
+
import type { PivotView } from './pivot-view';
|
|
5
5
|
import { BaseLayout } from './base-layout';
|
|
6
6
|
export declare class CompactLayout extends BaseLayout {
|
|
7
7
|
static layout(pivotTable: PivotTable, SummaryManager: SummaryManager, queryData: IPivotTableQueryData): PivotView;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { PivotTable } from '../pivot/pivot-table';
|
|
2
|
-
import { SummaryManager } from '../summary/summary-manager';
|
|
3
|
-
import { IPivotLayoutCtx, IPivotTableQueryData } from '../types';
|
|
4
|
-
import { PivotView } from './pivot-view';
|
|
1
|
+
import type { PivotTable } from '../pivot/pivot-table';
|
|
2
|
+
import type { SummaryManager } from '../summary/summary-manager';
|
|
3
|
+
import type { IPivotLayoutCtx, IPivotTableQueryData } from '../types';
|
|
4
|
+
import type { PivotView } from './pivot-view';
|
|
5
5
|
import { BaseLayout } from './base-layout';
|
|
6
6
|
export declare class OutlineLayout extends BaseLayout {
|
|
7
7
|
static layout(pivotTable: PivotTable, SummaryManager: SummaryManager, queryData: IPivotTableQueryData): PivotView;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { PivotModel } from '../pivot/model';
|
|
2
|
-
import { ILabelViewHeaderMapItem, ILabelViewItemJSON, IPageViewItemJSON, IPageViewItemRange, IPivotTableGroupInfo, IPivotViewCellData, IPivotViewErrorValue, IPivotViewInfo, IPivotViewItemData, IPivotViewItemJSON, IPivotViewJSON, IPivotViewPrefixValue, IPivotViewValueType, PivotCellStyleTypeEnum } from '../types';
|
|
1
|
+
import type { PivotModel } from '../pivot/model';
|
|
2
|
+
import type { ILabelViewHeaderMapItem, ILabelViewItemJSON, IPageViewItemJSON, IPageViewItemRange, IPivotTableGroupInfo, IPivotViewCellData, IPivotViewErrorValue, IPivotViewInfo, IPivotViewItemData, IPivotViewItemJSON, IPivotViewJSON, IPivotViewPrefixValue, IPivotViewValueType, PivotCellStyleTypeEnum } from '../types';
|
|
3
3
|
/**
|
|
4
4
|
* @class PivotView
|
|
5
5
|
* @description the view of pivot table, which contains the page, row, col, data view, the page view separation the pivot table to two areas, the row and col view as the header of data area
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { PivotTable } from '../pivot/pivot-table';
|
|
2
|
-
import { NodeTree } from '../summary/node-tree';
|
|
3
|
-
import { SummaryManager } from '../summary/summary-manager';
|
|
4
|
-
import { INodeSizeInfo, IPivotLayoutCtx, IPivotTableQueryData, IPivotTableValueFieldQueryData, IPivotViewInfo, IRowNodeSizeInfo } from '../types';
|
|
5
|
-
import { PivotView } from './pivot-view';
|
|
1
|
+
import type { PivotTable } from '../pivot/pivot-table';
|
|
2
|
+
import type { NodeTree } from '../summary/node-tree';
|
|
3
|
+
import type { SummaryManager } from '../summary/summary-manager';
|
|
4
|
+
import type { INodeSizeInfo, IPivotLayoutCtx, IPivotTableQueryData, IPivotTableValueFieldQueryData, IPivotViewInfo, IRowNodeSizeInfo } from '../types';
|
|
5
|
+
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;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { IPivotTableChangeSet, IPivotTableFilterInfo, IPivotTableOptions, IPivotTableQueryData, IPivotTableSnapshot, IPivotTableSortInfo, IPivotTableValueFilter, IValueFilterInfoItem, PivotSubtotalTypeEnum
|
|
1
|
+
import type { IPivotTableChangeSet, IPivotTableFilterInfo, IPivotTableOptions, IPivotTableQueryData, IPivotTableSnapshot, IPivotTableSortInfo, IPivotTableValueFilter, IValueFilterInfoItem, PivotSubtotalTypeEnum } from '../types';
|
|
2
|
+
import { PivotLayoutTypeEnum, PivotTableFiledAreaEnum, PivotTableValuePositionEnum } from '../types';
|
|
2
3
|
import { PivotTableLabelField, PivotTableValueField } from './table-field';
|
|
3
4
|
/**
|
|
4
5
|
* @class PivotModel represents a config model for a pivot table.
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import { DataField } from '../field/data-field';
|
|
2
|
-
import { FieldsCollection } from '../field/fields-collection';
|
|
3
|
-
import { PivotView } from '../layout/pivot-view';
|
|
4
|
-
import { IPivotTableChangeSet, IPivotTableFilterInfo, IPivotTableOptions, IPivotTableQueryData, IPivotTableSnapshot, IPivotTableSortInfo, IPivotTableValueFilter, PivotTableFiledAreaEnum, PivotTableValuePositionEnum
|
|
1
|
+
import type { DataField } from '../field/data-field';
|
|
2
|
+
import type { FieldsCollection } from '../field/fields-collection';
|
|
3
|
+
import type { PivotView } from '../layout/pivot-view';
|
|
4
|
+
import type { IPivotTableChangeSet, IPivotTableFilterInfo, IPivotTableOptions, IPivotTableQueryData, IPivotTableSnapshot, IPivotTableSortInfo, IPivotTableValueFilter, PivotTableFiledAreaEnum, PivotTableValuePositionEnum } from '../types';
|
|
5
|
+
import { PivotCallbackEnum, PivotDataFieldDataTypeEnum, PivotSubtotalTypeEnum } from '../types';
|
|
5
6
|
import { PivotModel } from './model';
|
|
6
7
|
import { PivotTableLabelField, PivotTableValueField } from './table-field';
|
|
7
8
|
/**
|
|
@@ -253,7 +254,7 @@ export declare class PivotTable {
|
|
|
253
254
|
* Get the value filter information list of the pivot table.
|
|
254
255
|
* @returns {IPivotTableValueFilter[]} The value filter information list.
|
|
255
256
|
*/
|
|
256
|
-
getValueFilterInfos(): import(
|
|
257
|
+
getValueFilterInfos(): import("..").IValueFilterInfoItem[];
|
|
257
258
|
/**
|
|
258
259
|
* Get the value filter information of the pivot table by the field id.
|
|
259
260
|
* @param {string} fieldId The base label field id of the value filter.
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { IPivotTableFilterInfo, IPivotTableLabelFieldJSON, IPivotTableLabelFieldQueryData, IPivotTableShowDataAsInfo, IPivotTableSortInfo, IPivotTableValueFieldJSON, IPivotTableValueFieldQueryData
|
|
1
|
+
import type { IPivotTableFilterInfo, IPivotTableLabelFieldJSON, IPivotTableLabelFieldQueryData, IPivotTableShowDataAsInfo, IPivotTableSortInfo, IPivotTableValueFieldJSON, IPivotTableValueFieldQueryData } from '../types';
|
|
2
|
+
import { PivotSubtotalTypeEnum } from '../types';
|
|
2
3
|
/**
|
|
3
4
|
* Represents a base class for the field in a pivot table.
|
|
4
5
|
* @abstract
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { PivotDataFieldDataTypeEnum
|
|
1
|
+
import type { PivotDataFieldDataTypeEnum } from '../types';
|
|
2
|
+
import { PivotDataFieldSortOperatorEnum } from '../types';
|
|
2
3
|
export declare class NodeTree {
|
|
3
4
|
/**
|
|
4
5
|
* @property {number} index - The id of the node tree.which is the index of summary-manager tuples
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { IDataFieldValue, ITPivotTupleInfo
|
|
1
|
+
import type { IDataFieldValue, ITPivotTupleInfo } from '../types';
|
|
2
|
+
import { PivotErrorTypeEnum, PivotSubtotalTypeEnum } from '../types';
|
|
2
3
|
/**
|
|
3
4
|
* @class PivotTuple
|
|
4
5
|
* @description use Welford algorithm calc subtotal
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import { DataField } from '../field/data-field';
|
|
2
|
-
import { IDimensionMapItem, IMeasuresMapItem, IPivotSummaryLevelPool, IPivotTableQueryData, IPivotTableValueFilter, ITupleItem, IValueFilterInfoItem, PivotErrorTypeEnum, PivotSubtotalTypeEnum
|
|
3
|
-
import { TupleGroup } from './tuple-group';
|
|
1
|
+
import type { DataField } from '../field/data-field';
|
|
2
|
+
import type { IDimensionMapItem, IMeasuresMapItem, IPivotSummaryLevelPool, IPivotTableQueryData, IPivotTableValueFilter, ITupleItem, IValueFilterInfoItem, PivotErrorTypeEnum, PivotSubtotalTypeEnum } from '../types';
|
|
3
|
+
import type { TupleGroup } from './tuple-group';
|
|
4
|
+
import { PivotDataFieldSortOperatorEnum } from '../types';
|
|
4
5
|
import { NodeTree } from './node-tree';
|
|
5
6
|
export declare class SummaryManager {
|
|
6
7
|
counter: number;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import { FieldsCollection } from '../field/fields-collection';
|
|
2
|
-
import { IDimensionMapItem, IMeasuresMapItem, IPivotTableQueryData, ITupleItem
|
|
1
|
+
import type { FieldsCollection } from '../field/fields-collection';
|
|
2
|
+
import type { IDimensionMapItem, IMeasuresMapItem, IPivotTableQueryData, ITupleItem } from '../types';
|
|
3
|
+
import { PivotDataFieldDataTypeEnum } from '../types';
|
|
3
4
|
export declare class TupleGroup {
|
|
4
5
|
/**
|
|
5
6
|
* @property The tuples of the pivot table, it contains the path, indexes, and save the measure value of each tuple.
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { PivotDataFieldDataTypeEnum, PivotDataFieldSortOperatorEnum, PivotDataFieldTypeEnum, PivotDateGroupFieldDateTypeEnum, PivotFilterTypeEnum, PivotShowAsTypeEnum, PivotSubtotalTypeEnum, ST_PivotFilterOperatorEnum } from './enum';
|
|
1
|
+
import type { PivotDataFieldDataTypeEnum, PivotDataFieldSortOperatorEnum, PivotDataFieldTypeEnum, PivotDateGroupFieldDateTypeEnum, PivotFilterTypeEnum, PivotShowAsTypeEnum, PivotSubtotalTypeEnum, ST_PivotFilterOperatorEnum } from './enum';
|
|
2
2
|
export interface IDateValue {
|
|
3
3
|
/**
|
|
4
4
|
* @description the date value, it stores the number of seconds since January 1, 1970, 00:00:00 UTC, it is same to excel date value
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { PivotDataFieldDataTypeEnum, PivotDataFieldTypeEnum, PivotDateGroupFieldDateTypeEnum, PivotLayoutTypeEnum, PivotSubtotalTypeEnum, PivotTableFiledAreaEnum, PivotTableValuePositionEnum } from './enum';
|
|
2
|
-
import { IPivotTableFilterInfo, IPivotTableShowDataAsInfo, IPivotTableSortInfo, IPivotTableValueFilter, IValueFilterInfoItem } from './interface';
|
|
3
|
-
import { IPivotTableOptions } from './layout-type';
|
|
1
|
+
import type { PivotDataFieldDataTypeEnum, PivotDataFieldTypeEnum, PivotDateGroupFieldDateTypeEnum, PivotLayoutTypeEnum, PivotSubtotalTypeEnum, PivotTableFiledAreaEnum, PivotTableValuePositionEnum } from './enum';
|
|
2
|
+
import type { IPivotTableFilterInfo, IPivotTableShowDataAsInfo, IPivotTableSortInfo, IPivotTableValueFilter, IValueFilterInfoItem } from './interface';
|
|
3
|
+
import type { IPivotTableOptions } from './layout-type';
|
|
4
4
|
export interface IPivotTableValueFieldJSON {
|
|
5
5
|
dataFieldId: string;
|
|
6
6
|
id: string;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { PivotView } from '../layout/pivot-view';
|
|
2
|
-
import { NodeTree } from '../summary/node-tree';
|
|
3
|
-
import { SummaryManager } from '../summary/summary-manager';
|
|
4
|
-
import { PivotErrorTypeEnum } from './enum';
|
|
5
|
-
import { IPivotTableGroupInfo, IPivotTableQueryData, IPivotTableValueFieldQueryData, IValueFilterInfoItem } from './interface';
|
|
1
|
+
import type { PivotView } from '../layout/pivot-view';
|
|
2
|
+
import type { NodeTree } from '../summary/node-tree';
|
|
3
|
+
import type { SummaryManager } from '../summary/summary-manager';
|
|
4
|
+
import type { PivotErrorTypeEnum } from './enum';
|
|
5
|
+
import type { IPivotTableGroupInfo, IPivotTableQueryData, IPivotTableValueFieldQueryData, IValueFilterInfoItem } from './interface';
|
|
6
6
|
export interface IPivotViewItemData {
|
|
7
7
|
[row: number]: IPivotViewColData;
|
|
8
8
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { DataField } from '../field/data-field';
|
|
2
|
-
import { PivotTuple } from '../summary/pivot-tuple';
|
|
3
|
-
import { PivotDataFieldDataTypeEnum, PivotErrorTypeEnum, PivotSubtotalTypeEnum } from './enum';
|
|
1
|
+
import type { DataField } from '../field/data-field';
|
|
2
|
+
import type { PivotTuple } from '../summary/pivot-tuple';
|
|
3
|
+
import type { PivotDataFieldDataTypeEnum, PivotErrorTypeEnum, PivotSubtotalTypeEnum } from './enum';
|
|
4
4
|
export interface ITupleItem {
|
|
5
5
|
path: string[];
|
|
6
6
|
types: PivotDataFieldDataTypeEnum[];
|
package/lib/types/util.d.ts
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import { BaseGroupField } from './field/base-group-field';
|
|
2
|
-
import { DataField } from './field/data-field';
|
|
3
|
-
import { DateGroupField } from './field/date-group-field';
|
|
4
|
-
import { IBaseGroupFieldJSON, IDataFieldJSON, IDataFieldValue, IDateGroupFieldJSON, IDateValue, IMeasuresMapItem, IPivotTableCustomFilter, IPivotTableDateGroupInfo, IPivotTableFilterInfo, IPivotTableGroupInfo, IPivotTableLabelCustomSortInfo, IPivotTableManualFilter, IPivotTableSortInfo, ITupleItem, IValueFilterInfoItem, PivotErrorTypeEnum, ST_PivotFilterOperatorEnum
|
|
1
|
+
import type { BaseGroupField } from './field/base-group-field';
|
|
2
|
+
import type { DataField } from './field/data-field';
|
|
3
|
+
import type { DateGroupField } from './field/date-group-field';
|
|
4
|
+
import type { IBaseGroupFieldJSON, IDataFieldJSON, IDataFieldValue, IDateGroupFieldJSON, IDateValue, IMeasuresMapItem, IPivotTableCustomFilter, IPivotTableDateGroupInfo, IPivotTableFilterInfo, IPivotTableGroupInfo, IPivotTableLabelCustomSortInfo, IPivotTableManualFilter, IPivotTableSortInfo, ITupleItem, IValueFilterInfoItem, PivotErrorTypeEnum, ST_PivotFilterOperatorEnum } from './types';
|
|
5
5
|
import { PivotTuple } from './summary/pivot-tuple';
|
|
6
|
+
import { PivotCellStyleTypeEnum, PivotDataFieldDataTypeEnum, PivotDateGroupFieldDateTypeEnum, PivotSubtotalTypeEnum, PivotTableFiledAreaEnum } from './types';
|
|
6
7
|
/**
|
|
7
8
|
* - judge the value is date like type
|
|
8
9
|
* @param {IDataFieldValue} value the date like value
|