@univerjs-pro/engine-pivot 1.0.0-alpha.7 → 1.0.0-alpha.8
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 +2 -2
- package/lib/types/field/date-group-field.d.ts +2 -2
- package/lib/types/index.d.ts +1 -1
- package/lib/types/layout/pivot-view.d.ts +3 -3
- package/lib/types/types/interface.d.ts +0 -1
- package/lib/types/types/layout-type.d.ts +2 -2
- package/lib/types/util.d.ts +2 -2
- package/lib/umd/index.js +1 -1
- package/package.json +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { IBaseGroupFieldInfo, IBaseGroupFieldJSON,
|
|
1
|
+
import type { IBaseGroupFieldInfo, IBaseGroupFieldJSON, IPivotTableDateGroupInfo, PivotDataFieldTypeEnum } from '../types';
|
|
2
2
|
import { DataField } from './data-field';
|
|
3
3
|
export declare abstract class BaseGroupField extends DataField {
|
|
4
4
|
protected originalFieldId: string;
|
|
@@ -7,7 +7,7 @@ export declare abstract class BaseGroupField extends DataField {
|
|
|
7
7
|
* @returns {PivotDataFieldTypeEnum} - The group type
|
|
8
8
|
*/
|
|
9
9
|
abstract getDataFieldType(): PivotDataFieldTypeEnum;
|
|
10
|
-
abstract getGroupInfo():
|
|
10
|
+
abstract getGroupInfo(): IPivotTableDateGroupInfo;
|
|
11
11
|
abstract getOriginFieldId(): string;
|
|
12
12
|
abstract refreshGroupField(originalField: DataField): void;
|
|
13
13
|
getFieldInfo(): IBaseGroupFieldInfo;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { IDateGroupFieldInfo, IDateGroupFieldJSON,
|
|
1
|
+
import type { IDateGroupFieldInfo, IDateGroupFieldJSON, IPivotTableDateGroupInfo } from '../types';
|
|
2
2
|
import type { DataField } from './data-field';
|
|
3
3
|
import { PivotDataFieldTypeEnum, PivotDateGroupFieldDateTypeEnum } from '../types';
|
|
4
4
|
import { BaseGroupField } from './base-group-field';
|
|
@@ -10,7 +10,7 @@ export declare class DateGroupField extends BaseGroupField {
|
|
|
10
10
|
getDateType(): PivotDateGroupFieldDateTypeEnum;
|
|
11
11
|
getDateGroupValid(): boolean;
|
|
12
12
|
refreshGroupField(originalField: DataField): void;
|
|
13
|
-
getGroupInfo():
|
|
13
|
+
getGroupInfo(): IPivotTableDateGroupInfo;
|
|
14
14
|
getDataFieldType(): PivotDataFieldTypeEnum;
|
|
15
15
|
getOriginFieldId(): string;
|
|
16
16
|
getFieldInfo(): IDateGroupFieldInfo;
|
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, IPivotTableFilterInfo,
|
|
11
|
+
export type { IDataFieldValue, IDateValue, IPivotTableFilterInfo, IPivotTableDateGroupInfo, 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,5 +1,5 @@
|
|
|
1
1
|
import type { PivotModel } from '../pivot/model';
|
|
2
|
-
import type { ILabelViewHeaderMapItem, ILabelViewItemJSON, IPageViewItemJSON, IPageViewItemRange,
|
|
2
|
+
import type { ILabelViewHeaderMapItem, ILabelViewItemJSON, IPageViewItemJSON, IPageViewItemRange, IPivotTableDateGroupInfo, 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
|
|
@@ -36,10 +36,10 @@ export declare class PivotView {
|
|
|
36
36
|
/**
|
|
37
37
|
* the group info map of the table field id, it will be used to store the group info of the pivot view
|
|
38
38
|
*/
|
|
39
|
-
groupInfo: Record<string,
|
|
39
|
+
groupInfo: Record<string, IPivotTableDateGroupInfo>;
|
|
40
40
|
constructor();
|
|
41
41
|
setVersion(version?: number): void;
|
|
42
|
-
setGroupInfo(groupInfo: Record<string,
|
|
42
|
+
setGroupInfo(groupInfo: Record<string, IPivotTableDateGroupInfo>): void;
|
|
43
43
|
/**
|
|
44
44
|
* - the func effect is to set the format code , for label view, it will used to format the header , such as date type data, in the data view, it will used to format the data of show data as
|
|
45
45
|
* @param model the pivot model, it will be used to set the format of the pivot view
|
|
@@ -69,7 +69,6 @@ export interface IPivotTuple {
|
|
|
69
69
|
}
|
|
70
70
|
export type IPivotTableFilterInfo = IPivotTableManualFilter | IPivotTableCustomFilter | IPivotTableValueFilter;
|
|
71
71
|
export type IPivotTableSortInfo = IPivotTableLabelSortInfo | IPivotTableValueSortInfo | IPivotTableLabelCustomSortInfo;
|
|
72
|
-
export type IPivotTableGroupInfo = IPivotTableDateGroupInfo;
|
|
73
72
|
export interface IPivotTableDateGroupInfo {
|
|
74
73
|
type: PivotDataFieldTypeEnum.dateGroupField;
|
|
75
74
|
dateType: PivotDateGroupFieldDateTypeEnum;
|
|
@@ -2,7 +2,7 @@ import type { PivotView } from '../layout/pivot-view';
|
|
|
2
2
|
import type { NodeTree } from '../summary/node-tree';
|
|
3
3
|
import type { SummaryManager } from '../summary/summary-manager';
|
|
4
4
|
import type { PivotErrorTypeEnum, PivotSubtotalPositionEnum } from './enum';
|
|
5
|
-
import type {
|
|
5
|
+
import type { IPivotTableDateGroupInfo, IPivotTableQueryData, IPivotTableValueFieldQueryData, IValueFilterInfoItem } from './interface';
|
|
6
6
|
export interface IPivotViewItemData {
|
|
7
7
|
[row: number]: IPivotViewColData;
|
|
8
8
|
}
|
|
@@ -287,6 +287,6 @@ export interface IPivotViewJSON {
|
|
|
287
287
|
cornerView: IPivotViewItemJSON;
|
|
288
288
|
version: number;
|
|
289
289
|
formatMap: Record<string, string>;
|
|
290
|
-
groupInfo: Record<string,
|
|
290
|
+
groupInfo: Record<string, IPivotTableDateGroupInfo>;
|
|
291
291
|
}
|
|
292
292
|
export {};
|
package/lib/types/util.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { BaseGroupField } from './field/base-group-field';
|
|
2
2
|
import type { DataField } from './field/data-field';
|
|
3
3
|
import type { DateGroupField } from './field/date-group-field';
|
|
4
|
-
import type { IBaseGroupFieldJSON, IDataFieldJSON, IDataFieldValue, IDateGroupFieldJSON, IDateValue, IMeasuresMapItem, IPivotTableCustomFilter, IPivotTableDateGroupInfo, IPivotTableFilterInfo,
|
|
4
|
+
import type { IBaseGroupFieldJSON, IDataFieldJSON, IDataFieldValue, IDateGroupFieldJSON, IDateValue, IMeasuresMapItem, IPivotTableCustomFilter, IPivotTableDateGroupInfo, IPivotTableFilterInfo, IPivotTableLabelCustomSortInfo, IPivotTableManualFilter, IPivotTableSortInfo, ITupleItem, IValueFilterInfoItem, PivotErrorTypeEnum, ST_PivotFilterOperatorEnum } from './types';
|
|
5
5
|
import { PivotTuple } from './summary/pivot-tuple';
|
|
6
6
|
import { PivotCellStyleTypeEnum, PivotDataFieldDataTypeEnum, PivotDateGroupFieldDateTypeEnum, PivotSubtotalTypeEnum, PivotTableFiledAreaEnum } from './types';
|
|
7
7
|
/**
|
|
@@ -143,5 +143,5 @@ export declare function isDateGroupField(field: DataField): field is DateGroupFi
|
|
|
143
143
|
export declare function isBaseGroupField(field: DataField): field is BaseGroupField;
|
|
144
144
|
export declare function isBaseGroupFieldJSON(field: IDataFieldJSON | IBaseGroupFieldJSON): field is IBaseGroupFieldJSON;
|
|
145
145
|
export declare function isDateGroupFieldJSON(field: IDataFieldJSON | IBaseGroupFieldJSON): field is IDateGroupFieldJSON;
|
|
146
|
-
export declare function isDateGroupInfo(groupInfo:
|
|
146
|
+
export declare function isDateGroupInfo(groupInfo: IPivotTableDateGroupInfo): groupInfo is IPivotTableDateGroupInfo;
|
|
147
147
|
export declare function getDateGroupValue(excelDate: number, dateType: PivotDateGroupFieldDateTypeEnum, useDefault1900DateSystem?: boolean): string;
|