@univerjs-pro/sheets-pivot 0.2.8 → 0.2.9

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,4 +1,4 @@
1
- import { IPivotTableChangeSet } from '@univerjs-pro/pivot-engine';
1
+ import { IPivotTableChangeSet } from '@univerjs-pro/engine-pivot';
2
2
  import { ICommandService, IMutationInfo } from '@univerjs/core';
3
3
  interface IPivotHostInfo {
4
4
  pivotTableId: string;
@@ -1,5 +1,6 @@
1
- import { IPivotTableSnapshot } from '@univerjs-pro/pivot-engine';
1
+ import { IPivotTableSnapshot, PivotTableFiledAreaEnum } from '@univerjs-pro/engine-pivot';
2
2
  import { IAddPivotFieldMutationParams, IRemovePivotFieldMutationParams, IRenamePivotFieldMutationParams, ISetPivotCollapseMutation, ISetPivotFieldFormatMutationParams, ISetPivotFilterMutationParams, ISetPivotOptionMutationParams, ISetPivotSortMutationParams, ISetPivotSubtotalTypeMutationParams, IUpdateFieldPositionMutationParams, IUpdatePivotFieldSourceInfoMutationParams, IUpdateValuePositionMutationParams } from '../../const/type';
3
+ export declare function getFieldListByArea(config: IPivotTableSnapshot, area: PivotTableFiledAreaEnum): string[];
3
4
  export declare function applyAddFieldChangeSet(config: IPivotTableSnapshot, change: IAddPivotFieldMutationParams): void;
4
5
  export declare function applyRemoveFieldChangeSet(config: IPivotTableSnapshot, change: IRemovePivotFieldMutationParams): void;
5
6
  export declare function applyRenameFieldChangeSet(config: IPivotTableSnapshot, change: IRenamePivotFieldMutationParams): void;
@@ -1,4 +1,4 @@
1
- import { IPivotViewCellData, IPivotViewValueType, PivotView, PivotViewItem } from '@univerjs-pro/pivot-engine';
1
+ import { IPivotViewCellData, IPivotViewValueType, PivotView, PivotViewItem } from '@univerjs-pro/engine-pivot';
2
2
  import { Injector, IRange } from '@univerjs/core';
3
3
  import { default as zhCN } from '../locale/zh-CN';
4
4
  import { IAdjustPivotTableRes, IPivotTableConfig, IThemeStyle } from './type';
@@ -45,7 +45,7 @@ export declare const defaultEmptyPivotDataCellStyle: {
45
45
  export declare const defaultThemeStyle: IThemeStyle;
46
46
  export declare const generatorAdjustPositionData: (injector: Injector, data: PivotView, pivotTableConfig: IPivotTableConfig, textInfo: Record<string, string>) => IAdjustPivotTableRes;
47
47
  export declare function transFromCellValue(cellData: IPivotViewCellData, isValue: boolean, format: string | undefined, textInfo: Record<string, string>): IPivotViewValueType;
48
- export declare function transformErrorValue(value: IPivotViewValueType): string | number | import('@univerjs-pro/pivot-engine').IPivotViewPrefixValue | undefined;
48
+ export declare function transformErrorValue(value: IPivotViewValueType): string | number | import('@univerjs-pro/engine-pivot').IPivotViewPrefixValue | undefined;
49
49
  export declare function getAdjustRangesPosition(startCell: {
50
50
  row: number;
51
51
  col: number;
@@ -1,4 +1,4 @@
1
- import { IDataFieldManagerBaseJSON, IFieldsCollectionJSON, ILabelViewHeaderMapItem, IPivotTableChangeSet, IPivotTableFilterInfo, IPivotTableLabelFieldJSON, IPivotTableOptions, IPivotTableSnapshot, IPivotTableSortInfo, IPivotTableValueFieldJSON, IPivotViewInfo, IPivotViewJSON, IPivotViewValueType, PivotCellStyleTypeEnum, PivotDataFieldDataTypeEnum, PivotSubtotalTypeEnum, PivotTableFiledAreaEnum, PivotTableValuePositionEnum, PivotView } from '@univerjs-pro/pivot-engine';
1
+ import { IDataFieldManagerBaseJSON, IFieldsCollectionJSON, ILabelViewHeaderMapItem, IPivotTableChangeSet, IPivotTableFilterInfo, IPivotTableLabelFieldJSON, IPivotTableOptions, IPivotTableSnapshot, IPivotTableSortInfo, IPivotTableValueFieldJSON, IPivotViewInfo, IPivotViewJSON, IPivotViewValueType, PivotCellStyleTypeEnum, PivotDataFieldDataTypeEnum, PivotSubtotalTypeEnum, PivotTableFiledAreaEnum, PivotTableValuePositionEnum, PivotView } from '@univerjs-pro/engine-pivot';
2
2
  import { CellValueType, ICellData, IRange, IStyleData, IUnitRangeName, Nullable, ObjectMatrix } from '@univerjs/core';
3
3
  import { PivotDisplayDataType, PositionType } from './const';
4
4
  export interface IPivotTableConfigChangeInfo {
@@ -30,7 +30,8 @@ export interface IAddPivotTableParams {
30
30
  }
31
31
  export interface IAddPivotTableCommandParams {
32
32
  positionType: PositionType;
33
- pivotTableConfig: IPivotTableConfig;
33
+ pivotTableId?: string;
34
+ pivotTableConfig: Omit<IPivotTableConfig, 'fieldsConfig'>;
34
35
  }
35
36
  export interface IUpdatePivotTableSourceRangeMutationParams {
36
37
  pivotTableId: string;
@@ -26,3 +26,4 @@ export { SheetsPivotTableAdaptorModel } from './models/sheets-pivot-table-adapto
26
26
  export { getPivotCellInfo, getPivotTableInfo } from './util';
27
27
  export { defaultThemeStyle, transFromCellValue } from './const/const';
28
28
  export { applyChangeSet } from './commands/command/util';
29
+ export { getFieldListByArea } from './commands/mutations/change-apply-util';
@@ -30,7 +30,7 @@ export declare class SheetsPivotTableConfigModel extends Disposable {
30
30
  getTargetByPivotId(unitId: string, subUnitId: string, pivotTableId: string): import('../const/type').IPivotCellPositionInfo | undefined;
31
31
  getSubUnitPivotConfigs(unitId: string, subUnitId: string): Map<string, IPivotTableConfig> | undefined;
32
32
  updateConfigCache(unitId: string, subUnitId: string, pivotTableId: string, pivotTableConfig: Nullable<IPivotTableConfig>): void;
33
- getCollection(unitId: string, pivotTableId: string): import('@univerjs-pro/pivot-engine').IFieldsCollectionJSON | undefined;
33
+ getCollection(unitId: string, pivotTableId: string): import('@univerjs-pro/engine-pivot').IFieldsCollectionJSON | undefined;
34
34
  updateCollectionConfig(unitId: string, collectionConfig: IDataFieldManagerJSON): void;
35
35
  private _ensurePivotMap;
36
36
  private _ensurePivotTableRangeInfo;
@@ -1,5 +1,5 @@
1
1
  import { ICellData, IRange, IUnitRangeName, IUniverInstanceService, Nullable, ObjectMatrix, Styles, Worksheet } from '@univerjs/core';
2
- import { IDataFieldValue, IFieldsCollectionJSON, DataField, DataFieldManager, FieldsCollection } from '@univerjs-pro/pivot-engine';
2
+ import { IDataFieldValue, IFieldsCollectionJSON, DataField, DataFieldManager, FieldsCollection } from '@univerjs-pro/engine-pivot';
3
3
  import { IRuntimeUnitDataType } from '@univerjs/engine-formula';
4
4
  import { ICurrentDataMatrix, IDataFieldManagerJSON, IPivotCellPositionInfo, IUnitRangeNameWithSubUnitId } from '../const/type';
5
5
  import { SheetsPivotDataSourceModel } from './sheets-pivot-data-source-model';
@@ -17,7 +17,7 @@ export declare class SheetsPivotDataFieldManager extends DataFieldManager {
17
17
  _host: SheetsPivotDataSourceModel;
18
18
  constructor(host: SheetsPivotDataSourceModel, univerInstanceService: IUniverInstanceService);
19
19
  initDataRanges(): void;
20
- getAutoDisplayNameFunction(): (baseName: string, subtotalType: import('@univerjs-pro/pivot-engine').PivotSubtotalTypeEnum) => string;
20
+ getAutoDisplayNameFunction(): (baseName: string, subtotalType: import('@univerjs-pro/engine-pivot').PivotSubtotalTypeEnum) => string;
21
21
  deleteDataField(dataFieldId: string): void;
22
22
  removeCollectionImp(token: string): void;
23
23
  getRangeKey(rangeInfo: IUnitRangeName, colIndex: number): string;
@@ -91,7 +91,7 @@ export declare class SheetsPivotDataFieldManager extends DataFieldManager {
91
91
  adjustSheetCellData(cellData: Nullable<ICellData>, styles: Styles, patternInfoRecord: Record<string, any>): IDataFieldValue;
92
92
  getRangeData(dataRangeInfo: IUnitRangeName): {
93
93
  header: (string | null)[];
94
- data: (string | number | boolean | import('@univerjs-pro/pivot-engine').IDateValue | null | undefined)[][];
94
+ data: (string | number | boolean | import('@univerjs-pro/engine-pivot').IDateValue | null | undefined)[][];
95
95
  };
96
96
  toJSON(): IDataFieldManagerJSON;
97
97
  fromJSON(jsonData: IDataFieldManagerJSON): void;
@@ -1,5 +1,5 @@
1
1
  import { IUnitRangeName, Nullable, Disposable, ICommandService, IConfigService, Injector, IResourceManagerService, IUniverInstanceService, LifecycleService } from '@univerjs/core';
2
- import { DataField, FieldsCollection, IFieldsCollectionJSON, IPivotTableSnapshot, PivotView, PivotTable } from '@univerjs-pro/pivot-engine';
2
+ import { DataField, FieldsCollection, IFieldsCollectionJSON, IPivotTableSnapshot, PivotView, PivotTable } from '@univerjs-pro/engine-pivot';
3
3
  import { IMoveRangeMutationParams } from '@univerjs/sheets';
4
4
  import { ICollectionChangeInfo, IDataFieldManagerJSON, IPivotCellPositionInfo, IPivotMutationDirtyViewInfo, IPivotTableConfig, IPivotTableJson, IPivotWorkerItemCache, ISendPivotConfigLocalMutationParams, IUnitRangeNameWithSubUnitId, PivotTableOperationEnum } from '../const/type';
5
5
  import { SheetsPivotDataFieldManager } from './sheets-pivot-data-field-manager';
@@ -34,7 +34,7 @@ export declare class SheetsPivotTableAdaptorModel extends Disposable {
34
34
  private _ensurePivotItemRenderInfoCache;
35
35
  private _ensurePivotItemRenderValueMatrixCache;
36
36
  getPivotTableCellData(unitId: string, subUnitId: string, row: number, col: number): IPivotTableCellData | undefined;
37
- getPivotTableIdByCell(unitId: string, subUnitId: string, startRow: number, startCol: number): string | undefined;
37
+ getPivotTableIdByCell(unitId: string, subUnitId: string, row: number, col: number): string | undefined;
38
38
  getSubUnitPivotMatrix(unitId: string, subUnitId: string): ObjectMatrix<Nullable<IPivotTableCellData>>;
39
39
  getPivotItemRenderInfoCache(unitId: string, subUnitId: string, pivotTableId: string): IPivotRenderCache | undefined;
40
40
  deleteUnitId(unitId: string): void;
@@ -1,4 +1,4 @@
1
- import { PivotView } from '@univerjs-pro/pivot-engine';
1
+ import { PivotView } from '@univerjs-pro/engine-pivot';
2
2
  import { Nullable, ObjectMatrix } from '@univerjs/core';
3
3
  import { IPivotCellPositionInfo, IPivotRangesInfo, IPivotTableCellData } from '../const/type';
4
4
  export interface IViewTranslateCtx {
@@ -2,7 +2,6 @@ import { ICommandService, IConfigService, Injector, Plugin, UniverInstanceType }
2
2
  import { DataSyncPrimaryController } from '@univerjs/rpc';
3
3
  import { IUniverSheetsConfig } from '@univerjs/sheets';
4
4
  interface IUniverSheetsPivotConfig extends IUniverSheetsConfig {
5
- registerInOneThread?: boolean;
6
5
  }
7
6
  export declare class UniverSheetsPivotTablePlugin extends Plugin {
8
7
  private _config;
@@ -1,5 +1,5 @@
1
1
  import { Injector, Nullable, ObjectMatrix } from '@univerjs/core';
2
- import { ILabelViewHeaderMapItem, IPivotViewInfo, PivotTable, PivotSubtotalTypeEnum } from '@univerjs-pro/pivot-engine';
2
+ import { ILabelViewHeaderMapItem, IPivotViewInfo, PivotTable, PivotSubtotalTypeEnum } from '@univerjs-pro/engine-pivot';
3
3
  import { IPivotPanelDataInfo, IPivotRangesInfo, IPivotRenderCache, IPivotTableCellData, IPivotTableConfig } from './const/type';
4
4
  import { SheetsPivotDataSourceModel } from './models/sheets-pivot-data-source-model';
5
5
  export declare const generateDefaultEmptyCache: (textOptions: {