UNPKG

@univerjs-pro/engine-pivot

Version:

[![npm version](https://img.shields.io/npm/v/@univerjs-pro/engine-pivot)](https://npmjs.org/packages/@univerjs-pro/engine-pivot) [![license](https://img.shields.io/npm/l/@univerjs-pro/engine-pivot)](https://img.shields.io/npm/l/@univerjs-pro/engine-pivot)

23 lines (22 loc) 1.04 kB
import { IBaseGroupFieldInfo, IBaseGroupFieldJSON, IPivotTableGroupInfo, PivotDataFieldTypeEnum } from '../types'; import { DataField } from './data-field'; export declare abstract class BaseGroupField extends DataField { protected originalFieldId: string; /** * Get the current group type * @returns {PivotDataFieldTypeEnum} - The group type */ abstract getDataFieldType(): PivotDataFieldTypeEnum; abstract getGroupInfo(): IPivotTableGroupInfo; abstract getOriginFieldId(): string; abstract refreshGroupField(originalField: DataField): void; getFieldInfo(): IBaseGroupFieldInfo; toJSON(): IBaseGroupFieldJSON; /** * This is a `static` method that returns different grouping instances based on the passed json * Then call the `fromJSON` method of the instance to initialize it * @param {IBaseGroupFieldInfo} json * @returns {BaseGroupField | undefined} - The instance of the group field */ static fromJSON(json: IBaseGroupFieldJSON): BaseGroupField | undefined; }