@univerjs-pro/sheets-pivot 0.2.7 → 0.2.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/types/commands/command/add-pivot-table-with-config.command.d.ts +0 -1
- package/lib/types/commands/command/util.d.ts +0 -1
- package/lib/types/commands/mutations/add-pivot-field.mutation.d.ts +0 -1
- package/lib/types/commands/mutations/add-pivot-table.mutation.d.ts +0 -1
- package/lib/types/commands/mutations/change-apply-util.d.ts +0 -1
- package/lib/types/commands/mutations/pivot-data-communication.mutation.d.ts +2 -2
- package/lib/types/commands/mutations/remove-pivot-field.mutation.d.ts +0 -1
- package/lib/types/commands/mutations/remove-pivot-table.mutation.d.ts +0 -1
- package/lib/types/commands/mutations/rename-pivot-field.mutation.d.ts +0 -1
- package/lib/types/commands/mutations/set-pivot-collapse.mutation.d.ts +0 -1
- package/lib/types/commands/mutations/set-pivot-field-format.mutation.d.ts +0 -1
- package/lib/types/commands/mutations/set-pivot-filter.mutation.d.ts +0 -1
- package/lib/types/commands/mutations/set-pivot-option.mutation.d.ts +0 -1
- package/lib/types/commands/mutations/set-pivot-position.mutation.d.ts +0 -1
- package/lib/types/commands/mutations/set-pivot-sort.mutation.d.ts +0 -1
- package/lib/types/commands/mutations/set-pivot-subtotal-type.mutation.d.ts +0 -1
- package/lib/types/commands/mutations/update-field-position.mutation.d.ts +0 -1
- package/lib/types/commands/mutations/update-pivot-field-source-info.mutation.d.ts +0 -1
- package/lib/types/commands/mutations/update-pivot-table-source.mutation.d.ts +0 -1
- package/lib/types/commands/mutations/update-value-position.mutation.d.ts +0 -1
- package/lib/types/commands/operations/pivot-table-dirty-view.operation.d.ts +0 -1
- package/lib/types/const/const.d.ts +0 -1
- package/lib/types/const/template.d.ts +0 -1
- package/lib/types/const/type.d.ts +13 -3
- package/lib/types/controllers/sheets-pivot-caculate.controller.d.ts +0 -1
- package/lib/types/controllers/sheets-pivot-rpc.controller.d.ts +0 -1
- package/lib/types/locale/en-US.d.ts +0 -1
- package/lib/types/locale/ru-RU.d.ts +0 -1
- package/lib/types/locale/vi-VN.d.ts +0 -1
- package/lib/types/locale/zh-TW.d.ts +0 -1
- package/lib/types/models/sheets-pivot-config-model.d.ts +0 -1
- package/lib/types/models/sheets-pivot-data-field-manager.d.ts +2 -1
- package/lib/types/models/sheets-pivot-data-source-model.d.ts +4 -2
- package/lib/types/models/sheets-pivot-table-adaptor-model.d.ts +0 -1
- package/lib/types/models/view-util.d.ts +0 -1
- package/lib/types/plugin.d.ts +1 -2
- package/lib/types/services/sheets-pivot-rpc.service.d.ts +0 -1
- package/lib/types/services/sheets-pivot-table.service.d.ts +0 -1
- package/lib/types/util.d.ts +0 -1
- package/lib/umd/index.js +1 -1
- package/package.json +12 -13
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { IPivotTableSnapshot } from '@univerjs-pro/pivot-engine';
|
|
2
2
|
import { IAddPivotFieldMutationParams, IRemovePivotFieldMutationParams, IRenamePivotFieldMutationParams, ISetPivotCollapseMutation, ISetPivotFieldFormatMutationParams, ISetPivotFilterMutationParams, ISetPivotOptionMutationParams, ISetPivotSortMutationParams, ISetPivotSubtotalTypeMutationParams, IUpdateFieldPositionMutationParams, IUpdatePivotFieldSourceInfoMutationParams, IUpdateValuePositionMutationParams } from '../../const/type';
|
|
3
|
-
|
|
4
3
|
export declare function applyAddFieldChangeSet(config: IPivotTableSnapshot, change: IAddPivotFieldMutationParams): void;
|
|
5
4
|
export declare function applyRemoveFieldChangeSet(config: IPivotTableSnapshot, change: IRemovePivotFieldMutationParams): void;
|
|
6
5
|
export declare function applyRenameFieldChangeSet(config: IPivotTableSnapshot, change: IRenamePivotFieldMutationParams): void;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { IMutation } from '@univerjs/core';
|
|
2
|
-
import { IGetPivotDataLocalMutationParams, ISendInitPivotTextLocalMutationParams, ISendPivotDataLocalMutationParams, ISendPivotViewLocalMutationParams } from '../../const/type';
|
|
3
|
-
|
|
2
|
+
import { IGetPivotDataLocalMutationParams, ISendInitPivotTextLocalMutationParams, ISendPivotConfigLocalMutationParams, ISendPivotDataLocalMutationParams, ISendPivotViewLocalMutationParams } from '../../const/type';
|
|
4
3
|
export declare const GetPivotDataLocalMutation: IMutation<IGetPivotDataLocalMutationParams>;
|
|
5
4
|
export declare const SendPivotDataLocalMutation: IMutation<ISendPivotDataLocalMutationParams>;
|
|
6
5
|
export declare const SendPivotViewLocalMutation: IMutation<ISendPivotViewLocalMutationParams>;
|
|
6
|
+
export declare const SendPivotConfigLocalMutation: IMutation<ISendPivotConfigLocalMutationParams>;
|
|
7
7
|
export declare const SendInitPivotTextLocalMutation: IMutation<ISendInitPivotTextLocalMutationParams>;
|
|
@@ -2,7 +2,6 @@ import { IPivotViewCellData, IPivotViewValueType, PivotView, PivotViewItem } fro
|
|
|
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';
|
|
5
|
-
|
|
6
5
|
export declare const SHEET_PIVOT_TABLE_PLUGIN = "SHEET_PIVOT_TABLE_PLUGIN";
|
|
7
6
|
export declare const BLANK_ROW_COUNT = 1;
|
|
8
7
|
export declare const BLANK_COL_COUNT = 1;
|
|
@@ -1,7 +1,6 @@
|
|
|
1
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';
|
|
2
2
|
import { CellValueType, ICellData, IRange, IStyleData, IUnitRangeName, Nullable, ObjectMatrix } from '@univerjs/core';
|
|
3
3
|
import { PivotDisplayDataType, PositionType } from './const';
|
|
4
|
-
|
|
5
4
|
export interface IPivotTableConfigChangeInfo {
|
|
6
5
|
unitId: string;
|
|
7
6
|
subUnitId: string;
|
|
@@ -11,7 +10,8 @@ export interface IPivotTableConfigChangeInfo {
|
|
|
11
10
|
}
|
|
12
11
|
export declare enum CollectionChangeEnum {
|
|
13
12
|
add = "add",
|
|
14
|
-
delete = "delete"
|
|
13
|
+
delete = "delete",
|
|
14
|
+
update = "update"
|
|
15
15
|
}
|
|
16
16
|
export type IUnitRangeNameWithSubUnitId = IUnitRangeName & {
|
|
17
17
|
subUnitId: string;
|
|
@@ -23,6 +23,7 @@ export interface ICollectionChangeInfo {
|
|
|
23
23
|
unitId?: string;
|
|
24
24
|
subUnitId?: string;
|
|
25
25
|
targetCellInfo?: IPivotCellPositionInfo;
|
|
26
|
+
oldSourceRangeInfo?: IUnitRangeNameWithSubUnitId;
|
|
26
27
|
}
|
|
27
28
|
export interface IAddPivotTableParams {
|
|
28
29
|
pivotTableConfig: IPivotTableConfig;
|
|
@@ -283,7 +284,7 @@ export interface IGetPivotPanelDataParams {
|
|
|
283
284
|
pivotTableId: string;
|
|
284
285
|
}
|
|
285
286
|
export interface IGetAddPivotFieldDataParams {
|
|
286
|
-
|
|
287
|
+
dataFieldId: string;
|
|
287
288
|
fieldArea: PivotTableFiledAreaEnum;
|
|
288
289
|
index: number;
|
|
289
290
|
}
|
|
@@ -417,6 +418,14 @@ export interface ISendPivotViewLocalMutationParams {
|
|
|
417
418
|
batch?: ISendPivotViewItemLocalParams[];
|
|
418
419
|
collectionConfig?: Record<string, IDataFieldManagerJSON>;
|
|
419
420
|
}
|
|
421
|
+
export interface ISendPivotConfigLocalMutationParams {
|
|
422
|
+
unitId: string;
|
|
423
|
+
subUnitId: string;
|
|
424
|
+
oldSubUnitId: string;
|
|
425
|
+
pivotTableId: string;
|
|
426
|
+
pivotTableConfig: IPivotTableConfig;
|
|
427
|
+
collectionConfig: IDataFieldManagerJSON;
|
|
428
|
+
}
|
|
420
429
|
export interface ISendInitPivotTextLocalMutationParams {
|
|
421
430
|
textInfo: Record<string, string>;
|
|
422
431
|
}
|
|
@@ -476,6 +485,7 @@ export interface IPivotFieldConfig {
|
|
|
476
485
|
export interface IValueFieldConfig {
|
|
477
486
|
field: number;
|
|
478
487
|
subTotalType?: PivotSubtotalTypeEnum;
|
|
488
|
+
formatString?: string;
|
|
479
489
|
}
|
|
480
490
|
export interface IAddPivotTableWithConfigCommandParams {
|
|
481
491
|
sourceDataInfo: {
|
|
@@ -2,7 +2,6 @@ import { Disposable, ICommandService, IConfigService } from '@univerjs/core';
|
|
|
2
2
|
import { IAllRuntimeData, IFeatureDirtyRangeType, IRuntimeUnitDataType, IFeatureCalculationManagerService } from '@univerjs/engine-formula';
|
|
3
3
|
import { SheetsPivotDataSourceModel } from '../models/sheets-pivot-data-source-model';
|
|
4
4
|
import { ICurrentDataMatrix, IPivotCellPositionInfo, IUnitRangeNameWithSubUnitId } from '../const/type';
|
|
5
|
-
|
|
6
5
|
interface IPivotDirtyViewInfo {
|
|
7
6
|
unitId: string;
|
|
8
7
|
subUnitId: string;
|
|
@@ -3,7 +3,6 @@ import { IActiveDirtyManagerService } from '@univerjs/engine-formula';
|
|
|
3
3
|
import { SheetsPivotRPCService } from '../services/sheets-pivot-rpc.service';
|
|
4
4
|
import { SheetsPivotTableAdaptorModel } from '../models/sheets-pivot-table-adaptor-model';
|
|
5
5
|
import { SheetsPivotTableConfigModel } from '../models/sheets-pivot-config-model';
|
|
6
|
-
|
|
7
6
|
export declare class SheetsPivotRPCController extends Disposable {
|
|
8
7
|
private readonly _commandService;
|
|
9
8
|
private readonly _sheetsPivotRpcService;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { Nullable, ObjectMatrix, Disposable, ICommandService, Injector, IUniverInstanceService } from '@univerjs/core';
|
|
2
2
|
import { IDataFieldManagerJSON, IPivotRangesInfo, IPivotTableCellData, IPivotTableConfig, IPivotTableMatrixInfo, IPivotTableRangeInfo } from '../const/type';
|
|
3
|
-
|
|
4
3
|
export declare class SheetsPivotTableConfigModel extends Disposable {
|
|
5
4
|
private _injector;
|
|
6
5
|
private _commandService;
|
|
@@ -3,7 +3,6 @@ import { IDataFieldValue, IFieldsCollectionJSON, DataField, DataFieldManager, Fi
|
|
|
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';
|
|
6
|
-
|
|
7
6
|
interface IFeatureDirtyRangeType {
|
|
8
7
|
[unitId: string]: Nullable<{
|
|
9
8
|
[sheetId: string]: IRange[];
|
|
@@ -24,6 +23,7 @@ export declare class SheetsPivotDataFieldManager extends DataFieldManager {
|
|
|
24
23
|
getRangeKey(rangeInfo: IUnitRangeName, colIndex: number): string;
|
|
25
24
|
getDataFieldByRangeKey(rangeKey: string): DataField;
|
|
26
25
|
setRangeKeyMap(rangeKey: string, dataFieldId: string): void;
|
|
26
|
+
updateRangeKeyMap(oldRangeKey: string, newRangeKey: string): void;
|
|
27
27
|
addCollectionByJSON(token: string, collectionJSON: IFieldsCollectionJSON, sourceRangeInfo: IUnitRangeNameWithSubUnitId, targetCellInfo: IPivotCellPositionInfo): {
|
|
28
28
|
collection: FieldsCollection;
|
|
29
29
|
updateDataFieldList: {
|
|
@@ -53,6 +53,7 @@ export declare class SheetsPivotDataFieldManager extends DataFieldManager {
|
|
|
53
53
|
uniqueDataFieldName(name: IDataFieldValue, colIndex: number): string;
|
|
54
54
|
getCollection(token: string): FieldsCollection;
|
|
55
55
|
addCollection(token: string, collection: FieldsCollection, sourceRangeInfo: IUnitRangeNameWithSubUnitId, targetCellInfo: IPivotCellPositionInfo): void;
|
|
56
|
+
handleMoveRange(token: string, sourceRangeInfo: IUnitRangeNameWithSubUnitId): void;
|
|
56
57
|
getPivotDirtyViewInfo(): {
|
|
57
58
|
runtimeCellData: IRuntimeUnitDataType;
|
|
58
59
|
dirtyRanges: IFeatureDirtyRangeType;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { IUnitRangeName, Nullable, Disposable, ICommandService, IConfigService, Injector, IResourceManagerService, IUniverInstanceService, LifecycleService } from '@univerjs/core';
|
|
2
2
|
import { DataField, FieldsCollection, IFieldsCollectionJSON, IPivotTableSnapshot, PivotView, PivotTable } from '@univerjs-pro/pivot-engine';
|
|
3
|
-
import {
|
|
3
|
+
import { IMoveRangeMutationParams } from '@univerjs/sheets';
|
|
4
|
+
import { ICollectionChangeInfo, IDataFieldManagerJSON, IPivotCellPositionInfo, IPivotMutationDirtyViewInfo, IPivotTableConfig, IPivotTableJson, IPivotWorkerItemCache, ISendPivotConfigLocalMutationParams, IUnitRangeNameWithSubUnitId, PivotTableOperationEnum } from '../const/type';
|
|
4
5
|
import { SheetsPivotDataFieldManager } from './sheets-pivot-data-field-manager';
|
|
5
6
|
import { IViewTranslateCtx } from './view-util';
|
|
6
|
-
|
|
7
7
|
export declare class SheetsPivotDataSourceModel extends Disposable {
|
|
8
8
|
private readonly _injector;
|
|
9
9
|
private readonly _univerInstanceService;
|
|
@@ -61,6 +61,7 @@ export declare class SheetsPivotDataSourceModel extends Disposable {
|
|
|
61
61
|
'sheets-pivot.emptyPivot.values': string;
|
|
62
62
|
};
|
|
63
63
|
setTextInfo(textInfo: Record<string, string>): void;
|
|
64
|
+
handleMoveRange(params: IMoveRangeMutationParams): void;
|
|
64
65
|
broadcastCollectionChange(info: ICollectionChangeInfo): void;
|
|
65
66
|
getDataFieldManager(unitId: string): SheetsPivotDataFieldManager;
|
|
66
67
|
getCollection(unitId: string, token: string): FieldsCollection;
|
|
@@ -71,6 +72,7 @@ export declare class SheetsPivotDataSourceModel extends Disposable {
|
|
|
71
72
|
private _updatePivotTableInstanceCache;
|
|
72
73
|
private _deletePivotTableInstanceCache;
|
|
73
74
|
private _ensureViewDataMap;
|
|
75
|
+
updateConfig(info: ISendPivotConfigLocalMutationParams): void;
|
|
74
76
|
updateView(unitId: string, subUnitId: string, type: PivotTableOperationEnum, pivotTableId: string, view: Nullable<PivotView>, pivotConfig: Nullable<IPivotTableConfig>, collectionConfig?: IDataFieldManagerJSON, ignoreDirty?: boolean): void;
|
|
75
77
|
/**
|
|
76
78
|
* - the function is used to save the dirty view data and range for formula calculation
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { Nullable, Disposable, Injector, IUniverInstanceService, LocaleService, ObjectMatrix } from '@univerjs/core';
|
|
2
2
|
import { IPivotRangesInfo, IPivotRenderCache, IPivotTableCellData, IPivotTableConfigChangeInfo, PivotTableOperationEnum } from '../const/type';
|
|
3
3
|
import { SheetsPivotTableConfigModel } from './sheets-pivot-config-model';
|
|
4
|
-
|
|
5
4
|
export declare class SheetsPivotTableAdaptorModel extends Disposable {
|
|
6
5
|
private _localeService;
|
|
7
6
|
private _injector;
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { PivotView } from '@univerjs-pro/pivot-engine';
|
|
2
2
|
import { Nullable, ObjectMatrix } from '@univerjs/core';
|
|
3
3
|
import { IPivotCellPositionInfo, IPivotRangesInfo, IPivotTableCellData } from '../const/type';
|
|
4
|
-
|
|
5
4
|
export interface IViewTranslateCtx {
|
|
6
5
|
view: Nullable<PivotView>;
|
|
7
6
|
pivotTableId: string;
|
package/lib/types/plugin.d.ts
CHANGED
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import { ICommandService, IConfigService, Injector, Plugin, UniverInstanceType } from '@univerjs/core';
|
|
2
2
|
import { DataSyncPrimaryController } from '@univerjs/rpc';
|
|
3
3
|
import { IUniverSheetsConfig } from '@univerjs/sheets';
|
|
4
|
-
|
|
5
4
|
interface IUniverSheetsPivotConfig extends IUniverSheetsConfig {
|
|
6
|
-
|
|
5
|
+
registerInOneThread?: boolean;
|
|
7
6
|
}
|
|
8
7
|
export declare class UniverSheetsPivotTablePlugin extends Plugin {
|
|
9
8
|
private _config;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { Disposable, ICommandService, Injector } from '@univerjs/core';
|
|
2
2
|
import { IGetPivotDataLocalMutationParams, ISendPivotDataLocalMutationParams } from '../const/type';
|
|
3
|
-
|
|
4
3
|
export declare class SheetsPivotRPCService extends Disposable {
|
|
5
4
|
private readonly _injector;
|
|
6
5
|
private readonly _commandService;
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { Disposable } from '@univerjs/core';
|
|
2
2
|
import { SheetInterceptorService } from '@univerjs/sheets';
|
|
3
3
|
import { SheetsPivotTableAdaptorModel } from '../models/sheets-pivot-table-adaptor-model';
|
|
4
|
-
|
|
5
4
|
export declare class SheetsPivotTableService extends Disposable {
|
|
6
5
|
private _sheetInterceptorService;
|
|
7
6
|
private _sheetsPivotTableAdaptorModel;
|
package/lib/types/util.d.ts
CHANGED
|
@@ -2,7 +2,6 @@ import { Injector, Nullable, ObjectMatrix } from '@univerjs/core';
|
|
|
2
2
|
import { ILabelViewHeaderMapItem, IPivotViewInfo, PivotTable, PivotSubtotalTypeEnum } from '@univerjs-pro/pivot-engine';
|
|
3
3
|
import { IPivotPanelDataInfo, IPivotRangesInfo, IPivotRenderCache, IPivotTableCellData, IPivotTableConfig } from './const/type';
|
|
4
4
|
import { SheetsPivotDataSourceModel } from './models/sheets-pivot-data-source-model';
|
|
5
|
-
|
|
6
5
|
export declare const generateDefaultEmptyCache: (textOptions: {
|
|
7
6
|
filter: string;
|
|
8
7
|
row: string;
|