@univerjs-pro/sheets-pivot 0.5.0-alpha.0 → 0.5.0-beta.1
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/facade.js +1 -1
- package/lib/cjs/index.js +1 -1
- package/lib/cjs/locale/en-US.js +1 -1
- package/lib/cjs/locale/fa-IR.js +1 -1
- package/lib/cjs/locale/ru-RU.js +1 -1
- package/lib/cjs/locale/vi-VN.js +1 -1
- package/lib/cjs/locale/zh-CN.js +1 -1
- package/lib/cjs/locale/zh-TW.js +1 -1
- package/lib/es/facade.js +1 -1
- package/lib/es/index.js +1 -1
- package/lib/es/locale/en-US.js +1 -1
- package/lib/es/locale/fa-IR.js +1 -1
- package/lib/es/locale/ru-RU.js +1 -1
- package/lib/es/locale/vi-VN.js +1 -1
- package/lib/es/locale/zh-CN.js +1 -1
- package/lib/es/locale/zh-TW.js +1 -1
- package/lib/types/commands/command/add-pivot-field.command.d.ts +11 -0
- package/lib/types/commands/command/add-pivot-table-with-config.command.d.ts +3 -0
- package/lib/types/commands/command/add-pivot-table.command.d.ts +9 -0
- package/lib/types/commands/command/move-pivot-field.command.d.ts +11 -0
- package/lib/types/commands/command/pivot-drill-down.command.d.ts +6 -0
- package/lib/types/commands/command/remove-pivot-field.command.d.ts +8 -0
- package/lib/types/commands/command/set-pivot-collapse.command.d.ts +9 -0
- package/lib/types/commands/command/set-pivot-filter.command.d.ts +10 -0
- package/lib/types/commands/command/set-pivot-sort.command.d.ts +10 -0
- package/lib/types/commands/command/update-pivot-setting.command.d.ts +15 -0
- package/lib/types/commands/command/update-pivot-source.command.d.ts +9 -0
- package/lib/types/commands/command/update-value-position.command.d.ts +8 -0
- package/lib/types/commands/command/util.d.ts +14 -0
- package/lib/types/commands/mutations/add-pivot-field.mutation.d.ts +3 -0
- package/lib/types/commands/mutations/add-pivot-table.mutation.d.ts +3 -0
- package/lib/types/commands/mutations/change-apply-util.d.ts +15 -0
- package/lib/types/commands/mutations/pivot-data-communication.mutation.d.ts +7 -0
- package/lib/types/commands/mutations/remove-pivot-field.mutation.d.ts +3 -0
- package/lib/types/commands/mutations/remove-pivot-table.mutation.d.ts +3 -0
- package/lib/types/commands/mutations/rename-pivot-field.mutation.d.ts +3 -0
- package/lib/types/commands/mutations/set-pivot-collapse.mutation.d.ts +3 -0
- package/lib/types/commands/mutations/set-pivot-field-format.mutation.d.ts +3 -0
- package/lib/types/commands/mutations/set-pivot-filter.mutation.d.ts +3 -0
- package/lib/types/commands/mutations/set-pivot-option.mutation.d.ts +3 -0
- package/lib/types/commands/mutations/set-pivot-position.mutation.d.ts +3 -0
- package/lib/types/commands/mutations/set-pivot-sort.mutation.d.ts +3 -0
- package/lib/types/commands/mutations/set-pivot-subtotal-type.mutation.d.ts +3 -0
- package/lib/types/commands/mutations/update-field-position.mutation.d.ts +3 -0
- package/lib/types/commands/mutations/update-pivot-field-source-info.mutation.d.ts +3 -0
- package/lib/types/commands/mutations/update-pivot-table-source.mutation.d.ts +3 -0
- package/lib/types/commands/mutations/update-value-position.mutation.d.ts +3 -0
- package/lib/types/commands/operations/pivot-table-dirty-view.operation.d.ts +3 -0
- package/lib/types/common/const.d.ts +64 -0
- package/lib/types/const/const.d.ts +107 -0
- package/lib/types/const/template.d.ts +885 -0
- package/lib/types/const/type.d.ts +525 -0
- package/lib/types/controllers/config.schema.d.ts +6 -0
- package/lib/types/controllers/const.d.ts +1 -0
- package/lib/types/controllers/sheets-pivot-caculate.controller.d.ts +44 -0
- package/lib/types/controllers/sheets-pivot-clear.controller.d.ts +12 -0
- package/lib/types/controllers/sheets-pivot-interceptor.controller.d.ts +21 -0
- package/lib/types/controllers/sheets-pivot-permission.controller.d.ts +7 -0
- package/lib/types/controllers/sheets-pivot-ref-range.controller.d.ts +21 -0
- package/lib/types/controllers/sheets-pivot-remove-sheet.controller.d.ts +9 -0
- package/lib/types/controllers/sheets-pivot-rpc.controller.d.ts +20 -0
- package/lib/types/facade/f-pivot-table.d.ts +83 -0
- package/lib/types/facade/f-workbook.d.ts +72 -0
- package/lib/types/facade/index.d.ts +2 -0
- package/lib/types/index.d.ts +52 -1158
- package/lib/types/locale/en-US.d.ts +3 -0
- package/lib/types/locale/fa-IR.d.ts +3 -0
- package/lib/types/locale/ru-RU.d.ts +3 -0
- package/lib/types/locale/vi-VN.d.ts +3 -0
- package/lib/types/locale/zh-CN.d.ts +31 -0
- package/lib/types/locale/zh-TW.d.ts +3 -0
- package/lib/types/models/sheets-pivot-config-model.d.ts +58 -0
- package/lib/types/models/sheets-pivot-data-field-manager.d.ts +77 -0
- package/lib/types/models/sheets-pivot-data-source-model.d.ts +101 -0
- package/lib/types/models/sheets-pivot-table-adaptor-model.d.ts +54 -0
- package/lib/types/models/view-util.d.ts +16 -0
- package/lib/types/plugin.d.ts +17 -0
- package/lib/types/services/sheets-pivot-rpc.service.d.ts +11 -0
- package/lib/types/services/sheets-pivot-table.service.d.ts +18 -0
- package/lib/types/util.d.ts +84 -0
- package/lib/umd/facade.js +1 -1
- package/lib/umd/index.js +1 -1
- package/lib/umd/locale/en-US.js +1 -1
- package/lib/umd/locale/fa-IR.js +1 -1
- package/lib/umd/locale/ru-RU.js +1 -1
- package/lib/umd/locale/vi-VN.js +1 -1
- package/lib/umd/locale/zh-CN.js +1 -1
- package/lib/umd/locale/zh-TW.js +1 -1
- package/package.json +14 -14
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
declare const locale: {
|
|
2
|
+
'sheets-pivot': {
|
|
3
|
+
blankValue: string;
|
|
4
|
+
columnName: string;
|
|
5
|
+
subTotalText: string;
|
|
6
|
+
grandTotalText: string;
|
|
7
|
+
valueText: string;
|
|
8
|
+
averageName: string;
|
|
9
|
+
countName: string;
|
|
10
|
+
countNumsName: string;
|
|
11
|
+
maxName: string;
|
|
12
|
+
minName: string;
|
|
13
|
+
productName: string;
|
|
14
|
+
stdDevName: string;
|
|
15
|
+
stdDevpName: string;
|
|
16
|
+
sumName: string;
|
|
17
|
+
varName: string;
|
|
18
|
+
varpName: string;
|
|
19
|
+
subTotal: string;
|
|
20
|
+
grandTotal: string;
|
|
21
|
+
value: string;
|
|
22
|
+
blank: string;
|
|
23
|
+
emptyPivot: {
|
|
24
|
+
filter: string;
|
|
25
|
+
row: string;
|
|
26
|
+
column: string;
|
|
27
|
+
values: string;
|
|
28
|
+
};
|
|
29
|
+
};
|
|
30
|
+
};
|
|
31
|
+
export default locale;
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import { Nullable, ObjectMatrix, Disposable, ICommandService, Injector, IUniverInstanceService } from '@univerjs/core';
|
|
2
|
+
import { IFieldsCollectionJSON } from '@univerjs-pro/engine-pivot';
|
|
3
|
+
import { IDataFieldManagerJSON, IPivotCellPositionInfo, IPivotRangesInfo, IPivotTableCellData, IPivotTableConfig, IPivotTableMatrixInfo, IPivotTableRangeInfo } from '../const/type';
|
|
4
|
+
export declare class SheetsPivotTableConfigModel extends Disposable {
|
|
5
|
+
private _injector;
|
|
6
|
+
private _commandService;
|
|
7
|
+
private _univerInstanceService;
|
|
8
|
+
private _model;
|
|
9
|
+
private _collectionConfigModel;
|
|
10
|
+
private _pivotTableRangeInfo;
|
|
11
|
+
private _pivotTableMatrixInfo;
|
|
12
|
+
private _configVersion$;
|
|
13
|
+
private _pivotInitCompleted$;
|
|
14
|
+
pivotInitCompleted$: import('rxjs').Observable<boolean>;
|
|
15
|
+
private _pivotConfigChange$;
|
|
16
|
+
pivotConfigChange$: import('rxjs').Observable<{
|
|
17
|
+
unitId: string;
|
|
18
|
+
subUnitId: string;
|
|
19
|
+
pivotTableId: string;
|
|
20
|
+
pivotTableConfig: Nullable<IPivotTableConfig>;
|
|
21
|
+
}>;
|
|
22
|
+
private _textInfo;
|
|
23
|
+
configVersion$: import('rxjs').Observable<number>;
|
|
24
|
+
constructor(_injector: Injector, _commandService: ICommandService, _univerInstanceService: IUniverInstanceService);
|
|
25
|
+
private _initUnitDisposed;
|
|
26
|
+
setPivotInitCompleted(): void;
|
|
27
|
+
private _initLocale;
|
|
28
|
+
getTextInfo(): Record<string, string>;
|
|
29
|
+
updateViewInfo(unitId: string, subUnitId: string, pivotTableId: string, valueMatrix: ObjectMatrix<Nullable<IPivotTableCellData>>, rangesCache: IPivotRangesInfo | undefined): void;
|
|
30
|
+
getPivotTableConfig(unitId: string, subUnitId: string, pivotTableId: string): Nullable<IPivotTableConfig>;
|
|
31
|
+
getTargetByPivotId(unitId: string, subUnitId: string, pivotTableId: string): Nullable<IPivotCellPositionInfo>;
|
|
32
|
+
getSubUnitPivotConfigs(unitId: string, subUnitId: string): Map<string, IPivotTableConfig> | undefined;
|
|
33
|
+
updateConfigCache(unitId: string, subUnitId: string, pivotTableId: string, pivotTableConfig: Nullable<IPivotTableConfig>): void;
|
|
34
|
+
getCollection(unitId: string, pivotTableId: string): IFieldsCollectionJSON | undefined;
|
|
35
|
+
updateCollectionConfig(unitId: string, collectionConfig: IDataFieldManagerJSON): void;
|
|
36
|
+
private _ensurePivotMap;
|
|
37
|
+
private _ensurePivotTableRangeInfo;
|
|
38
|
+
private _ensurePivotTableMatrixInfo;
|
|
39
|
+
updatePivotTableRangeInfo(unitId: string, subUnitId: string, pivotTableId: string, rangeInfo: IPivotRangesInfo | undefined): void;
|
|
40
|
+
updatePivotTableMatrixInfo(unitId: string, subUnitId: string, pivotTableId: string, matrixInfo: ObjectMatrix<Nullable<IPivotTableCellData>>): void;
|
|
41
|
+
/**
|
|
42
|
+
* - get the pivot table range info for sheet or calc engine
|
|
43
|
+
* @param {string} unitId - the unit id
|
|
44
|
+
* @param {string} subUnitId - the sub unit id
|
|
45
|
+
* @param {string} pivotTableId - the pivot table id
|
|
46
|
+
* @returns {IPivotTableRangeInfo} - the pivot table range info
|
|
47
|
+
*/
|
|
48
|
+
getPivotTableRangeInfo(unitId: string, subUnitId: string, pivotTableId: string): IPivotTableRangeInfo | undefined;
|
|
49
|
+
/**
|
|
50
|
+
* - get the pivot table matrix info for sheet or calc engine
|
|
51
|
+
* @param {string} unitId - the unit id
|
|
52
|
+
* @param {string} subUnitId - the sub unit id
|
|
53
|
+
* @param {string} pivotTableId - the pivot table id
|
|
54
|
+
* @returns {IPivotTableMatrixInfo} - the pivot table matrix info
|
|
55
|
+
*/
|
|
56
|
+
getPivotTableMatrixInfo(unitId: string, subUnitId: string, pivotTableId: string): IPivotTableMatrixInfo | undefined;
|
|
57
|
+
deleteUnitId(unitId: string): void;
|
|
58
|
+
}
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
import { ICellData, IRange, IUnitRangeName, IUniverInstanceService, Nullable, ObjectMatrix, Styles, Worksheet } from '@univerjs/core';
|
|
2
|
+
import { IDataFieldValue, IFieldsCollectionJSON, PivotSubtotalTypeEnum, DataField, DataFieldManager, FieldsCollection } from '@univerjs-pro/engine-pivot';
|
|
3
|
+
import { IRuntimeUnitDataType } from '@univerjs/engine-formula';
|
|
4
|
+
import { ICurrentDataMatrix, IDataFieldManagerJSON, IPivotCellPositionInfo, IUnitRangeNameWithSubUnitId, IUpdateInfo } from '../const/type';
|
|
5
|
+
import { SheetsPivotDataSourceModel } from './sheets-pivot-data-source-model';
|
|
6
|
+
interface IFeatureDirtyRangeType {
|
|
7
|
+
[unitId: string]: Nullable<{
|
|
8
|
+
[sheetId: string]: IRange[];
|
|
9
|
+
}>;
|
|
10
|
+
}
|
|
11
|
+
export declare class SheetsPivotDataFieldManager extends DataFieldManager {
|
|
12
|
+
/**
|
|
13
|
+
* the key is pivot table id, the value is the data range info. those data range is one-to-one with the pivot table
|
|
14
|
+
*/
|
|
15
|
+
rangeKeyMap: Record<string, string>;
|
|
16
|
+
private _univerInstanceService;
|
|
17
|
+
_host: SheetsPivotDataSourceModel;
|
|
18
|
+
constructor(host: SheetsPivotDataSourceModel, univerInstanceService: IUniverInstanceService);
|
|
19
|
+
initDataRanges(): void;
|
|
20
|
+
getAutoDisplayNameFunction(): (baseName: string, subtotalType: PivotSubtotalTypeEnum) => string;
|
|
21
|
+
deleteDataField(dataFieldId: string): void;
|
|
22
|
+
removeCollectionImp(token: string): void;
|
|
23
|
+
getRangeKey(rangeInfo: IUnitRangeName, colIndex: number): string;
|
|
24
|
+
getDataFieldByRangeKey(rangeKey: string): DataField | undefined;
|
|
25
|
+
setRangeKeyMap(rangeKey: string, dataFieldId: string): void;
|
|
26
|
+
updateRangeKeyMap(oldRangeKey: string, newRangeKey: string): void;
|
|
27
|
+
addCollectionByJSON(token: string, collectionJSON: IFieldsCollectionJSON, sourceRangeInfo: IUnitRangeNameWithSubUnitId, targetCellInfo: IPivotCellPositionInfo): IUpdateInfo;
|
|
28
|
+
getRangeStartEndInfo(range: IRange, sheet: Worksheet): IRange;
|
|
29
|
+
/**
|
|
30
|
+
* - when add pivot table, we should create a collection with data range first
|
|
31
|
+
* @param {IUnitRangeName} dataRangeInfo the data range info
|
|
32
|
+
* @returns {FieldsCollection} the created collection
|
|
33
|
+
*/
|
|
34
|
+
createCollectionWithDataRange(dataRangeInfo: IUnitRangeName): IUpdateInfo;
|
|
35
|
+
_getAutoName(colIndex: number): string;
|
|
36
|
+
uniqueDataFieldName(name: IDataFieldValue, colIndex: number): string;
|
|
37
|
+
getCollection(token: string): FieldsCollection;
|
|
38
|
+
addCollection(token: string, collection: FieldsCollection, sourceRangeInfo: IUnitRangeNameWithSubUnitId, targetCellInfo: IPivotCellPositionInfo): void;
|
|
39
|
+
handleMoveRange(token: string, sourceRangeInfo: IUnitRangeNameWithSubUnitId): void;
|
|
40
|
+
getPivotDirtyViewInfo(): {
|
|
41
|
+
runtimeCellData: IRuntimeUnitDataType;
|
|
42
|
+
dirtyRanges: IFeatureDirtyRangeType;
|
|
43
|
+
};
|
|
44
|
+
getUpdateRangeDeleteIds(token: string, dataRangeInfo: IUnitRangeName): string[] | undefined;
|
|
45
|
+
/**
|
|
46
|
+
* get the matrix value from different matrix, when refresh the data source of pivot table
|
|
47
|
+
* @param matrix the sheet cell matrix
|
|
48
|
+
* @param arrayFormulaCellDataMatrix the array formula cell data matrix from run time data
|
|
49
|
+
* @param unitDataMatrix the unit data matrix from runtime data
|
|
50
|
+
* @param {number} rowIndex - the row index
|
|
51
|
+
* @param {number} colIndex - the column index
|
|
52
|
+
* @returns {Nullable<ICellData>} the cell data
|
|
53
|
+
*/
|
|
54
|
+
getMatrixValue(matrix: ObjectMatrix<Nullable<ICellData>>, arrayFormulaCellDataMatrix: ObjectMatrix<Nullable<ICellData>> | undefined, unitDataMatrix: ObjectMatrix<Nullable<ICellData>> | undefined, rowIndex: number, colIndex: number): Nullable<ICellData>;
|
|
55
|
+
refreshDataField(dataFieldId: string, dataRangeInfo: IUnitRangeNameWithSubUnitId, index: number, currentDataMatrix?: ICurrentDataMatrix): void;
|
|
56
|
+
refreshData(collection: FieldsCollection, list: {
|
|
57
|
+
index: number;
|
|
58
|
+
dataField: DataField;
|
|
59
|
+
}[], dataRangeInfo: IUnitRangeNameWithSubUnitId): void;
|
|
60
|
+
getRangeKeyList(dataRangeInfo: IUnitRangeName): string[];
|
|
61
|
+
/**
|
|
62
|
+
* - adjust sheet cell value to the type that pivot engine can recognize
|
|
63
|
+
* @param {Nullable<ICellData>} cellData the cell data
|
|
64
|
+
* @param {Styles} styles styles in the workbook
|
|
65
|
+
* @param {Record<string, any>} patternInfoRecord the pattern info record
|
|
66
|
+
* @returns {IDataFieldValue} the value to add into the data field
|
|
67
|
+
*/
|
|
68
|
+
adjustSheetCellData(cellData: Nullable<ICellData>, styles: Styles, patternInfoRecord: Record<string, any>): IDataFieldValue;
|
|
69
|
+
getRangeData(dataRangeInfo: IUnitRangeName): {
|
|
70
|
+
header: (string | null)[];
|
|
71
|
+
data: IDataFieldValue[][];
|
|
72
|
+
};
|
|
73
|
+
toJSON(): IDataFieldManagerJSON;
|
|
74
|
+
fromJSON(jsonData: IDataFieldManagerJSON): void;
|
|
75
|
+
dispose(): void;
|
|
76
|
+
}
|
|
77
|
+
export {};
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
import { IUnitRangeName, Nullable, Disposable, ICommandService, IConfigService, Injector, IResourceManagerService, IUniverInstanceService, LifecycleService } from '@univerjs/core';
|
|
2
|
+
import { IMoveRangeMutationParams } from '@univerjs/sheets';
|
|
3
|
+
import { DataField, FieldsCollection, IFieldsCollectionJSON, IPivotTableSnapshot, PivotView, PivotTable } from '@univerjs-pro/engine-pivot';
|
|
4
|
+
import { ICollectionChangeInfo, IDataFieldManagerJSON, IPivotCellPositionInfo, IPivotMutationDirtyViewInfo, IPivotTableConfig, IPivotTableJson, IPivotWorkerItemCache, ISendPivotConfigLocalMutationParams, IUnitRangeNameWithSubUnitId, IUpdateInfo, PivotTableOperationEnum } from '../const/type';
|
|
5
|
+
import { IViewTranslateCtx } from './view-util';
|
|
6
|
+
import { SheetsPivotDataFieldManager } from './sheets-pivot-data-field-manager';
|
|
7
|
+
export declare class SheetsPivotDataSourceModel extends Disposable {
|
|
8
|
+
private readonly _injector;
|
|
9
|
+
private readonly _univerInstanceService;
|
|
10
|
+
readonly _lifecycleService: LifecycleService;
|
|
11
|
+
private readonly _configService;
|
|
12
|
+
private readonly _commandService;
|
|
13
|
+
private _resourceManagerService;
|
|
14
|
+
private _model;
|
|
15
|
+
private _pivotTableInstanceCache;
|
|
16
|
+
private _viewData;
|
|
17
|
+
private _textInfo;
|
|
18
|
+
private _collectionChange$;
|
|
19
|
+
collectionChange$: import('rxjs').Observable<ICollectionChangeInfo>;
|
|
20
|
+
private _viewData$;
|
|
21
|
+
viewData$: import('rxjs').Observable<{
|
|
22
|
+
unitId: string;
|
|
23
|
+
subUnitId: string;
|
|
24
|
+
pivotTableId: string;
|
|
25
|
+
}>;
|
|
26
|
+
private _fieldsCollectionChange$;
|
|
27
|
+
fieldsCollectionChange$: import('rxjs').Observable<Record<string, FieldsCollection>>;
|
|
28
|
+
private _dataFieldManagerCollection;
|
|
29
|
+
needSameDeleteModel: {
|
|
30
|
+
deleteUnitId: (unitId: string) => void;
|
|
31
|
+
}[];
|
|
32
|
+
/**
|
|
33
|
+
* - this property is used to store the dirty pivot table collection which need to be marked dirty when mutations is executed
|
|
34
|
+
*/
|
|
35
|
+
private _queryingMap;
|
|
36
|
+
constructor(_injector: Injector, _univerInstanceService: IUniverInstanceService, _lifecycleService: LifecycleService, _configService: IConfigService, _commandService: ICommandService, _resourceManagerService: IResourceManagerService);
|
|
37
|
+
getTextInfo(): Record<string, string>;
|
|
38
|
+
setTextInfo(textInfo: Record<string, string>): void;
|
|
39
|
+
handleMoveRange(params: IMoveRangeMutationParams): void;
|
|
40
|
+
broadcastCollectionChange(info: ICollectionChangeInfo): void;
|
|
41
|
+
getDataFieldManager(unitId: string): SheetsPivotDataFieldManager;
|
|
42
|
+
getCollection(unitId: string, token: string): FieldsCollection;
|
|
43
|
+
getUpdateRangeDeleteIds(unitId: string, token: string, dataRangeInfo: IUnitRangeName): string[] | undefined;
|
|
44
|
+
private _ensurePivotMap;
|
|
45
|
+
private _updateModelCache;
|
|
46
|
+
private _deleteModelCache;
|
|
47
|
+
private _updatePivotTableInstanceCache;
|
|
48
|
+
private _deletePivotTableInstanceCache;
|
|
49
|
+
private _ensureViewDataMap;
|
|
50
|
+
updateConfig(info: ISendPivotConfigLocalMutationParams): void;
|
|
51
|
+
updateView(unitId: string, subUnitId: string, type: PivotTableOperationEnum, pivotTableId: string, view: Nullable<PivotView>, pivotConfig: Nullable<IPivotTableConfig>, collectionConfig?: IDataFieldManagerJSON, ignoreDirty?: boolean): void;
|
|
52
|
+
/**
|
|
53
|
+
* - the function is used to save the dirty view data and range for formula calculation
|
|
54
|
+
* @param {IViewTranslateCtx} ctx the dirty context
|
|
55
|
+
* @param {boolean} ignoreDirty the flag to ignore the dirty view area, only in handleSourceRangeChange , we get a dirty change from the source range change, we need ignore the dirty view area,because the dirty view area has done immediately
|
|
56
|
+
*/
|
|
57
|
+
updateViewData(ctx: IViewTranslateCtx, ignoreDirty: boolean): void;
|
|
58
|
+
addPivotTable(unitId: string, subUnitId: string, pivotTableId: string, pivotTable: PivotTable, pivotTableConfig: IPivotTableConfig): void;
|
|
59
|
+
removePivotTable(unitId: string, subUnitId: string, pivotTableId: string): void;
|
|
60
|
+
setPivotTable(unitId: string, subUnitId: string, pivotTableId: string, pivotTableConfig: IPivotTableConfig): void;
|
|
61
|
+
getPivotTableConfig(unitId: string, subUnitId: string, pivotTableId: string): IPivotTableConfig | undefined;
|
|
62
|
+
/**
|
|
63
|
+
* - get the pivot table model json config
|
|
64
|
+
* @param {string} unitId
|
|
65
|
+
* @param {string} subUnitId
|
|
66
|
+
* @param {string} pivotTableId - the pivot table id
|
|
67
|
+
* @returns {IPivotTableSnapshot|undefined} the pivot table model json config
|
|
68
|
+
*/
|
|
69
|
+
getPivotTableModelConfig(unitId: string, subUnitId: string, pivotTableId: string): IPivotTableSnapshot | undefined;
|
|
70
|
+
getPivotTableInstance(pivotTableId: string): PivotTable | undefined;
|
|
71
|
+
deleteUnitId(unitId: string): void;
|
|
72
|
+
addCollectionByJSON(token: string, collectionJSON: IFieldsCollectionJSON, sourceRangeInfo: IUnitRangeNameWithSubUnitId, targetCellInfo: IPivotCellPositionInfo): IUpdateInfo;
|
|
73
|
+
/**
|
|
74
|
+
* - this function just create a collection with data range info, but wil not add it to the dataFieldManager
|
|
75
|
+
*/
|
|
76
|
+
createCollectionWithDataRange(dataRangeInfo: IUnitRangeNameWithSubUnitId): IUpdateInfo;
|
|
77
|
+
refreshData(collection: FieldsCollection, updateDataFieldList: {
|
|
78
|
+
index: number;
|
|
79
|
+
dataField: DataField;
|
|
80
|
+
}[], dataRangeInfo: IUnitRangeNameWithSubUnitId): void;
|
|
81
|
+
removeDataField(unitId: string, dataFieldId: string): void;
|
|
82
|
+
removeCollections(unitId: string, token: string): void;
|
|
83
|
+
getSubUnitPivotConfigs(unitId: string, subUnitId: string): Map<string, IPivotTableConfig> | undefined;
|
|
84
|
+
getTargetByPivotId(pivotTableId: string): {
|
|
85
|
+
unitId: string;
|
|
86
|
+
subUnitId: string;
|
|
87
|
+
} | null;
|
|
88
|
+
sideEffectUpdateWorkerCache(unitId: string, subUnitId: string, pivotTableId: string, workerCache?: IPivotWorkerItemCache): void;
|
|
89
|
+
dispose(): void;
|
|
90
|
+
getViewData(unitId: string, subUnitId: string, pivotTableId: string): IPivotWorkerItemCache | null;
|
|
91
|
+
addDirtyPivotTable(dirtyInfo: IPivotMutationDirtyViewInfo): void;
|
|
92
|
+
updateDirtyPivotTable(dirtyInfo: IPivotMutationDirtyViewInfo): void;
|
|
93
|
+
/**
|
|
94
|
+
* trigger the pivot table query
|
|
95
|
+
* @param dirtyInfo
|
|
96
|
+
*/
|
|
97
|
+
queryDirtyPivotTable(dirtyInfo: IPivotMutationDirtyViewInfo): void;
|
|
98
|
+
toJSON(unitId: string): IPivotTableJson;
|
|
99
|
+
fromJSON(jsonData: IPivotTableJson): void;
|
|
100
|
+
private _initSnapshot;
|
|
101
|
+
}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { IRange, Nullable, Disposable, Injector, IUniverInstanceService, LocaleService, ObjectMatrix } from '@univerjs/core';
|
|
2
|
+
import { IPivotRangesInfo, IPivotRenderCache, IPivotTableCellData, IPivotTableConfigChangeInfo, PivotTableOperationEnum } from '../const/type';
|
|
3
|
+
import { IExclusiveRangeService } from '@univerjs/sheets';
|
|
4
|
+
import { SheetsPivotTableConfigModel } from './sheets-pivot-config-model';
|
|
5
|
+
export declare class SheetsPivotTableAdaptorModel extends Disposable {
|
|
6
|
+
private _localeService;
|
|
7
|
+
private _injector;
|
|
8
|
+
private _sheetsPivotTableConfigModel;
|
|
9
|
+
private _univerInstanceService;
|
|
10
|
+
private readonly _exclusiveRangeService;
|
|
11
|
+
private _pivotRenderInfoCache;
|
|
12
|
+
private _pivotRenderValueMatrixCache;
|
|
13
|
+
private _markDirty$;
|
|
14
|
+
markDirty$: import('rxjs').Observable<{
|
|
15
|
+
unitId: string;
|
|
16
|
+
subUnitId: string;
|
|
17
|
+
}>;
|
|
18
|
+
private _viewUpdate$;
|
|
19
|
+
viewUpdate$: import('rxjs').Observable<{
|
|
20
|
+
unitId: string;
|
|
21
|
+
subUnitId: string;
|
|
22
|
+
pivotTableId: string;
|
|
23
|
+
rangesCache: IPivotRangesInfo | undefined;
|
|
24
|
+
valueMatrix: ObjectMatrix<Nullable<IPivotTableCellData>>;
|
|
25
|
+
type: PivotTableOperationEnum;
|
|
26
|
+
}>;
|
|
27
|
+
private _textInfo;
|
|
28
|
+
constructor(_localeService: LocaleService, _injector: Injector, _sheetsPivotTableConfigModel: SheetsPivotTableConfigModel, _univerInstanceService: IUniverInstanceService, _exclusiveRangeService: IExclusiveRangeService);
|
|
29
|
+
private _initUnitDisposed;
|
|
30
|
+
private _initLocale;
|
|
31
|
+
updateRenderCache(config: IPivotTableConfigChangeInfo): {
|
|
32
|
+
rangeCache: IPivotRangesInfo | undefined;
|
|
33
|
+
matrix: ObjectMatrix<Nullable<IPivotTableCellData>>;
|
|
34
|
+
} | undefined;
|
|
35
|
+
private _updateRenderEmptyCache;
|
|
36
|
+
private _createExclusiveRange;
|
|
37
|
+
clearRenderCache(config: IPivotTableConfigChangeInfo): void;
|
|
38
|
+
private _ensurePivotItemRenderInfoCache;
|
|
39
|
+
private _ensurePivotItemRenderValueMatrixCache;
|
|
40
|
+
getPivotTableCellData(unitId: string, subUnitId: string, row: number, col: number): IPivotTableCellData | undefined;
|
|
41
|
+
getPivotTableIdByCell(unitId: string, subUnitId: string, row: number, col: number): Nullable<string>;
|
|
42
|
+
/**
|
|
43
|
+
* Get pivot table ids that intersect with the range
|
|
44
|
+
* @param {string} unitId The test unit id of range
|
|
45
|
+
* @param {string} subUnitId The sub unit id of range
|
|
46
|
+
* @param {IRange} range The range to check
|
|
47
|
+
* @returns {string[]} The pivot table ids that intersect with the range
|
|
48
|
+
*/
|
|
49
|
+
getIntersectsPivotTable(unitId: string, subUnitId: string, range: IRange): string[];
|
|
50
|
+
getSubUnitPivotMatrix(unitId: string, subUnitId: string): ObjectMatrix<Nullable<IPivotTableCellData>>;
|
|
51
|
+
getPivotItemRenderInfoCache(unitId: string, subUnitId: string, pivotTableId: string): Nullable<IPivotRenderCache>;
|
|
52
|
+
deleteUnitId(unitId: string): void;
|
|
53
|
+
markDirty(unitId: string, subUnitId: string): void;
|
|
54
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { PivotView } from '@univerjs-pro/engine-pivot';
|
|
2
|
+
import { Nullable, ObjectMatrix } from '@univerjs/core';
|
|
3
|
+
import { IPivotCellPositionInfo, IPivotRangesInfo, IPivotTableCellData } from '../const/type';
|
|
4
|
+
export interface IViewTranslateCtx {
|
|
5
|
+
view: Nullable<PivotView>;
|
|
6
|
+
pivotTableId: string;
|
|
7
|
+
isEmpty: boolean;
|
|
8
|
+
targetCellInfo: IPivotCellPositionInfo;
|
|
9
|
+
textInfo: Record<string, string>;
|
|
10
|
+
}
|
|
11
|
+
interface IViewTranslateResult {
|
|
12
|
+
matrix: ObjectMatrix<Nullable<IPivotTableCellData>>;
|
|
13
|
+
rangesCache: IPivotRangesInfo;
|
|
14
|
+
}
|
|
15
|
+
export declare const adjustViewForCalcEngine: (ctx: IViewTranslateCtx) => IViewTranslateResult;
|
|
16
|
+
export {};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { IUniverSheetsPivotConfig } from './controllers/config.schema';
|
|
2
|
+
import { ICommandService, IConfigService, Injector, Plugin, UniverInstanceType } from '@univerjs/core';
|
|
3
|
+
import { DataSyncPrimaryController } from '@univerjs/rpc';
|
|
4
|
+
export declare class UniverSheetsPivotTablePlugin extends Plugin {
|
|
5
|
+
private readonly _config;
|
|
6
|
+
readonly _injector: Injector;
|
|
7
|
+
private readonly _commandService;
|
|
8
|
+
private readonly _configService;
|
|
9
|
+
private readonly _dataSyncPrimaryController?;
|
|
10
|
+
static pluginName: string;
|
|
11
|
+
static type: UniverInstanceType;
|
|
12
|
+
constructor(_config: IUniverSheetsPivotConfig | undefined, _injector: Injector, _commandService: ICommandService, _configService: IConfigService, _dataSyncPrimaryController?: DataSyncPrimaryController | undefined);
|
|
13
|
+
_initConfig(): void;
|
|
14
|
+
onStarting(): void;
|
|
15
|
+
private _initRegisterCommand;
|
|
16
|
+
private _initTimeValid;
|
|
17
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { Disposable, ICommandService, Injector } from '@univerjs/core';
|
|
2
|
+
import { IGetPivotDataLocalMutationParams, ISendPivotDataLocalMutationParams } from '../const/type';
|
|
3
|
+
export declare class SheetsPivotRPCService extends Disposable {
|
|
4
|
+
private readonly _injector;
|
|
5
|
+
private readonly _commandService;
|
|
6
|
+
private _requestResolvers;
|
|
7
|
+
constructor(_injector: Injector, _commandService: ICommandService);
|
|
8
|
+
handleAsyncResponse(data: ISendPivotDataLocalMutationParams): void;
|
|
9
|
+
getPivotDisplayConfig(params: Omit<IGetPivotDataLocalMutationParams, 'version'>): Promise<ISendPivotDataLocalMutationParams>;
|
|
10
|
+
private _generateUniqueVersion;
|
|
11
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { IPivotPerformCheckParams } from '../const/type';
|
|
2
|
+
import { AsyncInterceptorManager, Disposable, InterceptorManager } from '@univerjs/core';
|
|
3
|
+
import { SheetInterceptorService } from '@univerjs/sheets';
|
|
4
|
+
import { SheetsPivotTableAdaptorModel } from '../models/sheets-pivot-table-adaptor-model';
|
|
5
|
+
export declare class SheetsPivotTableService extends Disposable {
|
|
6
|
+
private _sheetInterceptorService;
|
|
7
|
+
private _sheetsPivotTableAdaptorModel;
|
|
8
|
+
readonly asyncInterceptor: AsyncInterceptorManager<{
|
|
9
|
+
PIVOT_PERFORM_CHECK: import('@univerjs/core/common/interceptor.js').IAsyncInterceptor<boolean, IPivotPerformCheckParams>;
|
|
10
|
+
}>;
|
|
11
|
+
readonly interceptor: InterceptorManager<{
|
|
12
|
+
PIVOT_MUTATION_GENERATE: import('@univerjs/core').IInterceptor<import('@univerjs/core').IUndoRedoCommandInfosByInterceptor, IPivotPerformCheckParams>;
|
|
13
|
+
}>;
|
|
14
|
+
constructor(_sheetInterceptorService: SheetInterceptorService, _sheetsPivotTableAdaptorModel: SheetsPivotTableAdaptorModel);
|
|
15
|
+
private _init;
|
|
16
|
+
getPivotPerformCheck(params: IPivotPerformCheckParams): Promise<import('@univerjs/core').Nullable<boolean>>;
|
|
17
|
+
private _initViewModelBySheetInterceptor;
|
|
18
|
+
}
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
import { IAccessor, IMutationInfo, Injector, IRange, Nullable, ObjectMatrix } from '@univerjs/core';
|
|
2
|
+
import { ISetRangeValuesMutationParams } from '@univerjs/sheets';
|
|
3
|
+
import { ILabelViewHeaderMapItem, IPivotViewInfo, LabelViewItem, PivotTable, PivotView, PivotViewItem, PivotSubtotalTypeEnum } from '@univerjs-pro/engine-pivot';
|
|
4
|
+
import { IGetPivotDataLocalMutationParams, IPivotCellPositionInfo, IPivotPanelDataInfo, IPivotRangesInfo, IPivotRenderCache, IPivotTableCellData, IPivotTableConfig } from './const/type';
|
|
5
|
+
import { SheetsPivotDataSourceModel } from './models/sheets-pivot-data-source-model';
|
|
6
|
+
export declare const generateDefaultEmptyCache: (textOptions: {
|
|
7
|
+
filter: string;
|
|
8
|
+
row: string;
|
|
9
|
+
column: string;
|
|
10
|
+
values: string;
|
|
11
|
+
}, startCell: {
|
|
12
|
+
row: number;
|
|
13
|
+
col: number;
|
|
14
|
+
}) => {
|
|
15
|
+
matrixCache: ObjectMatrix<IPivotTableCellData>;
|
|
16
|
+
rangesCache: IPivotRangesInfo;
|
|
17
|
+
};
|
|
18
|
+
/**
|
|
19
|
+
* - Get the auto display name of the value field.
|
|
20
|
+
* @description - which may use prefix text like excel
|
|
21
|
+
* - the prefix text is create by subtotal type
|
|
22
|
+
* @param {string} baseName the name without prefix text
|
|
23
|
+
* @param {PivotSubtotalTypeEnum} subtotalType the type of subtotal to be displayed for this value field.
|
|
24
|
+
* @returns {string} the auto display name of the value field.
|
|
25
|
+
*/
|
|
26
|
+
export declare function getAutoDisplayName(this: SheetsPivotDataSourceModel, baseName: string, subtotalType: PivotSubtotalTypeEnum): string;
|
|
27
|
+
export declare function getPivotCellInfo(row: number, col: number, cellInfo: Nullable<IPivotTableCellData>, pivotTable: PivotTable, pivotItemRenderCache: IPivotRenderCache): {
|
|
28
|
+
filterId: Nullable<string>;
|
|
29
|
+
info: Nullable<IPivotViewInfo>;
|
|
30
|
+
data: Nullable<IPivotTableCellData>;
|
|
31
|
+
headerInfo: Nullable<ILabelViewHeaderMapItem>;
|
|
32
|
+
} | undefined;
|
|
33
|
+
export declare function getPivotTableInfo(pivotTable: PivotTable, pivotTableId: string, config: IPivotTableConfig): IPivotPanelDataInfo;
|
|
34
|
+
export declare function flattenObject(inject: Injector, obj: {
|
|
35
|
+
[key: string]: any;
|
|
36
|
+
}, parentKey?: string, result?: {
|
|
37
|
+
[key: string]: any;
|
|
38
|
+
}): {
|
|
39
|
+
[key: string]: any;
|
|
40
|
+
};
|
|
41
|
+
export declare const unionPivotViewRange: (rangeInfo: IPivotRangesInfo | undefined) => IRange[];
|
|
42
|
+
export declare function getPivotDrillDownData(injector: Injector, params: IGetPivotDataLocalMutationParams): {
|
|
43
|
+
indexes: number[];
|
|
44
|
+
range: IRange;
|
|
45
|
+
sourceUnitId: string;
|
|
46
|
+
sourceSubUnitId: string;
|
|
47
|
+
formatMap: Record<string, string>;
|
|
48
|
+
} | undefined;
|
|
49
|
+
export declare function canUsePivot(ls?: string, pbk?: string): boolean;
|
|
50
|
+
export declare function getPivotInfoByLicense(defaultPivotCount: number, ls?: string, pbk?: string): {
|
|
51
|
+
count: number;
|
|
52
|
+
timeValid: boolean;
|
|
53
|
+
};
|
|
54
|
+
export declare function generateSetRangeValueMutations(injector: Injector, unitId: string, subUnitId: string, ranges: IRange[]): {
|
|
55
|
+
setRangeValueUndoMutation: {
|
|
56
|
+
id: string;
|
|
57
|
+
params: ISetRangeValuesMutationParams;
|
|
58
|
+
};
|
|
59
|
+
setRangeValueRedoMutation: {
|
|
60
|
+
id: string;
|
|
61
|
+
params: ISetRangeValuesMutationParams;
|
|
62
|
+
};
|
|
63
|
+
shouldClear: boolean;
|
|
64
|
+
};
|
|
65
|
+
export declare function getEmptyPivotRanges(cellInfo: IPivotCellPositionInfo): {
|
|
66
|
+
startRow: number;
|
|
67
|
+
endRow: number;
|
|
68
|
+
startColumn: number;
|
|
69
|
+
endColumn: number;
|
|
70
|
+
}[];
|
|
71
|
+
export declare function getPivotRowColCount(view: PivotView, startCell: {
|
|
72
|
+
row: number;
|
|
73
|
+
col: number;
|
|
74
|
+
}, isEmpty: boolean): {
|
|
75
|
+
rowCount: number;
|
|
76
|
+
colCount: number;
|
|
77
|
+
};
|
|
78
|
+
export declare function getInsertRowColMutations(accessor: IAccessor, view: PivotView, cellInfo: IPivotCellPositionInfo, isEmpty: boolean): {
|
|
79
|
+
undos: IMutationInfo<object>[];
|
|
80
|
+
redos: IMutationInfo<object>[];
|
|
81
|
+
};
|
|
82
|
+
export declare function getHeaderViewMaxText(labelView: LabelViewItem, textInfo: Record<string, string>, isCol: boolean, formatMap: Record<string, string>): string;
|
|
83
|
+
export declare function getValueViewMaxText(rowView: PivotViewItem): string;
|
|
84
|
+
export declare function getCornerMaxText(corner: PivotViewItem): string;
|
package/lib/umd/facade.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function _0xc4d6(_0x27ab88,_0x561476){const _0x2bf3e2=_0x2bf3();return _0xc4d6=function(_0xc4d649,_0x1cb29f){_0xc4d649=_0xc4d649-0xb8;let _0x523422=_0x2bf3e2[_0xc4d649];return _0x523422;},_0xc4d6(_0x27ab88,_0x561476);}(function(_0x23ed08,_0x12cf86){const _0xf119ee=_0xc4d6,_0x324254=_0x23ed08();while(!![]){try{const _0x24e22c=-parseInt(_0xf119ee(0xe6))/0x1+parseInt(_0xf119ee(0xe1))/0x2*(parseInt(_0xf119ee(0xb9))/0x3)+-parseInt(_0xf119ee(0xd9))/0x4+-parseInt(_0xf119ee(0xd7))/0x5+parseInt(_0xf119ee(0xe0))/0x6+-parseInt(_0xf119ee(0xec))/0x7*(-parseInt(_0xf119ee(0xd5))/0x8)+parseInt(_0xf119ee(0xc1))/0x9*(parseInt(_0xf119ee(0xd0))/0xa);if(_0x24e22c===_0x12cf86)break;else _0x324254['push'](_0x324254['shift']());}catch(_0x5575d5){_0x324254['push'](_0x324254['shift']());}}}(_0x2bf3,0x19cb0),function(_0x276a46,_0x1342c7){const _0x4ffd4f=_0xc4d6;typeof exports==_0x4ffd4f(0xc8)&&typeof module<'u'?_0x1342c7(exports,require(_0x4ffd4f(0xbf)),require(_0x4ffd4f(0xee)),require(_0x4ffd4f(0xc2)),require('@univerjs-pro/sheets-pivot')):typeof define==_0x4ffd4f(0xdf)&&define['amd']?define([_0x4ffd4f(0xbc),_0x4ffd4f(0xbf),_0x4ffd4f(0xee),_0x4ffd4f(0xc2),_0x4ffd4f(0xcc)],_0x1342c7):(_0x276a46=typeof globalThis<'u'?globalThis:_0x276a46||self,_0x1342c7(_0x276a46['UniverProSheetsPivotFacade']={},_0x276a46[_0x4ffd4f(0xea)],_0x276a46[_0x4ffd4f(0xce)],_0x276a46[_0x4ffd4f(0xc0)],_0x276a46[_0x4ffd4f(0xba)]));}(this,function(_0x32b790,_0x461329,_0x4a6293,_0x142c97,_0x4b2908){'use strict';const _0x44f549=_0xc4d6;var _0xe813df=Object[_0x44f549(0xf0)],_0x3b7d6b=(_0x2cad12,_0x5424b3,_0x200eed)=>_0x5424b3 in _0x2cad12?_0xe813df(_0x2cad12,_0x5424b3,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x200eed}):_0x2cad12[_0x5424b3]=_0x200eed,_0x55c890=(_0xd4a208,_0xbb27fd,_0x3fbc7d)=>_0x3b7d6b(_0xd4a208,typeof _0xbb27fd!=_0x44f549(0xdc)?_0xbb27fd+'':_0xbb27fd,_0x3fbc7d);class _0x256130{constructor(_0x1c9f7b,_0x4fde06,_0x6850fb,_0x46b968){const _0x2e8878=_0x44f549;_0x55c890(this,'unitId'),_0x55c890(this,_0x2e8878(0xd1)),_0x55c890(this,_0x2e8878(0xbd)),_0x55c890(this,_0x2e8878(0xe2)),(this[_0x2e8878(0xc3)]=_0x1c9f7b,this[_0x2e8878(0xd1)]=_0x4fde06,this[_0x2e8878(0xbd)]=_0x6850fb,this['_injector']=_0x46b968);}['getConfig'](){const _0x5308c5=_0x44f549;return this[_0x5308c5(0xe2)]['get'](_0x4b2908['SheetsPivotTableConfigModel'])[_0x5308c5(0xd3)](this[_0x5308c5(0xc3)],this[_0x5308c5(0xd1)],this[_0x5308c5(0xbd)]);}async['remove'](){const _0x2f5963=_0x44f549;return await this['_injector'][_0x2f5963(0xe7)](_0x461329[_0x2f5963(0xdb)])[_0x2f5963(0xc7)](_0x4b2908[_0x2f5963(0xca)]['id'],{'unitId':this['unitId'],'subUnitId':this[_0x2f5963(0xd1)],'pivotTableId':this['pivotTableId']});}async[_0x44f549(0xeb)](_0x1a96c1,_0x3cfff1,_0x226ab5){const _0x14ad87=_0x44f549,_0x799058=this[_0x14ad87(0xe2)],_0x48e81b=this['unitId'],_0x3c7132=this[_0x14ad87(0xd1)],_0x357641=this[_0x14ad87(0xbd)],_0x582ae6=_0x799058[_0x14ad87(0xe7)](_0x461329[_0x14ad87(0xdb)]),_0x6e6d46=_0x799058[_0x14ad87(0xe7)](_0x4b2908[_0x14ad87(0xd2)]),_0xcb6691=_0x6e6d46[_0x14ad87(0xd3)](_0x48e81b,_0x3c7132,_0x357641),_0x2e3fad=_0x6e6d46[_0x14ad87(0xed)](_0x48e81b,_0x357641);if(!_0xcb6691||!_0x2e3fad)return!0x1;let _0x366a83=_0x1a96c1;typeof _0x366a83=='number'&&(_0x366a83=_0x6e6d46['getCollection'](_0x48e81b,_0x357641)[_0x14ad87(0xef)][_0x1a96c1]);const _0x16b777={'unitId':_0x48e81b,'subUnitId':_0x3c7132,'pivotTableId':_0x357641,'dataFieldId':_0x366a83,'fieldArea':_0x3cfff1,'index':_0x226ab5};return _0x582ae6['executeCommand'](_0x4b2908[_0x14ad87(0xbb)]['id'],_0x16b777);}async[_0x44f549(0xc9)](_0x3c8b27){const _0x14482a=_0x44f549,_0x26df9f=this['_injector'],_0x11c49d=this[_0x14482a(0xc3)],_0x574e93=this[_0x14482a(0xd1)],_0x1030a1=this[_0x14482a(0xbd)],_0x34a3a3=_0x26df9f['get'](_0x461329[_0x14482a(0xdb)]),_0x12c972={'unitId':_0x11c49d,'subUnitId':_0x574e93,'pivotTableId':_0x1030a1,'fieldIds':_0x3c8b27};return _0x34a3a3[_0x14482a(0xc5)](_0x4b2908[_0x14482a(0xe3)]['id'],_0x12c972);}async[_0x44f549(0xd6)](_0x51e7fb,_0x1c8027,_0x338610){const _0x18e78e=_0x44f549,_0x2c3c32=this[_0x18e78e(0xe2)],_0x3b3da9=this[_0x18e78e(0xc3)],_0xb1dd23=this[_0x18e78e(0xd1)],_0x12760f=this[_0x18e78e(0xbd)],_0x41fe59=_0x2c3c32['get'](_0x461329[_0x18e78e(0xdb)]),_0x5773f3={'unitId':_0x3b3da9,'subUnitId':_0xb1dd23,'pivotTableId':_0x12760f,'fieldId':_0x51e7fb,'area':_0x1c8027,'index':_0x338610};return _0x41fe59['executeCommand'](_0x4b2908[_0x18e78e(0xe8)]['id'],_0x5773f3);}async[_0x44f549(0xdd)](_0x1c6e35,_0x391eb3){const _0x7ea1ba=_0x44f549,_0x5b59f9=this[_0x7ea1ba(0xe2)],_0x1e1384=this['unitId'],_0x2f1ee4=this['subUnitId'],_0x23e501=this[_0x7ea1ba(0xbd)],_0x310926=_0x5b59f9[_0x7ea1ba(0xe7)](_0x461329[_0x7ea1ba(0xdb)]),_0x45b823={'unitId':_0x1e1384,'subUnitId':_0x2f1ee4,'pivotTableId':_0x23e501,'position':_0x1c6e35,'index':_0x391eb3};return _0x310926[_0x7ea1ba(0xc5)](_0x4b2908['UpdatePivotValuePositionCommand']['id'],_0x45b823);}async[_0x44f549(0xe5)](_0x2d6dc0,_0x52e092){const _0x1ac160=_0x44f549,_0x192a99=this[_0x1ac160(0xe2)],_0xa88956=this[_0x1ac160(0xc3)],_0x198fb5=this['subUnitId'],_0x571cd5=this[_0x1ac160(0xbd)],_0x1b2832=_0x192a99[_0x1ac160(0xe7)](_0x461329[_0x1ac160(0xdb)]),_0x721293={'unitId':_0xa88956,'subUnitId':_0x198fb5,'pivotTableId':_0x571cd5,'fieldId':_0x2d6dc0,'subtotalType':_0x52e092};return _0x1b2832[_0x1ac160(0xc5)](_0x4b2908[_0x1ac160(0xda)]['id'],_0x721293);}async['setLabelSort'](_0x5e1323,_0x35661e){const _0x2af60b=_0x44f549,_0x4bb14c=this[_0x2af60b(0xe2)],_0x8b71bc=this[_0x2af60b(0xc3)],_0x3d8597=this[_0x2af60b(0xd1)],_0x4317fa=this[_0x2af60b(0xbd)],_0x4acf3d=_0x4bb14c[_0x2af60b(0xe7)](_0x461329[_0x2af60b(0xdb)]),_0x57c07a={'unitId':_0x8b71bc,'subUnitId':_0x3d8597,'tableFieldId':_0x5e1323,'pivotTableId':_0x4317fa,'info':_0x35661e};return _0x4acf3d[_0x2af60b(0xc5)](_0x4b2908[_0x2af60b(0xb8)]['id'],_0x57c07a);}async[_0x44f549(0xcd)](_0x749619,_0x3f020a,_0x5cd0e6){const _0x10df0f=_0x44f549,_0x3a690b=this[_0x10df0f(0xe2)],_0x22a261=this['unitId'],_0x50ce09=this[_0x10df0f(0xd1)],_0x51784d=this['pivotTableId'],_0x38e2cd=_0x3a690b['get'](_0x461329[_0x10df0f(0xdb)]),_0x1e81e1={'unitId':_0x22a261,'subUnitId':_0x50ce09,'pivotTableId':_0x51784d,'tableFieldId':_0x749619,'items':_0x3f020a,'isAll':_0x5cd0e6};return _0x38e2cd['executeCommand'](_0x4b2908[_0x10df0f(0xd8)]['id'],_0x1e81e1);}async[_0x44f549(0xe4)](_0x31f0dd,_0x2a3e65){const _0x53f0f2=_0x44f549,_0x1e0bdd=this[_0x53f0f2(0xe2)],_0x1d8902=this[_0x53f0f2(0xc3)],_0x2dcb4e=this[_0x53f0f2(0xd1)],_0x3af2d2=this[_0x53f0f2(0xbd)],_0x42ffc8=_0x1e0bdd[_0x53f0f2(0xe7)](_0x461329['ICommandService']),_0x347967={'unitId':_0x1d8902,'subUnitId':_0x2dcb4e,'pivotTableId':_0x3af2d2,'fieldId':_0x31f0dd,'name':_0x2a3e65};return _0x42ffc8[_0x53f0f2(0xc5)](_0x4b2908[_0x53f0f2(0xcf)]['id'],_0x347967);}}class _0x585128 extends _0x4a6293[_0x44f549(0xde)]{async['addPivotTable'](_0x15e0c4,_0xed3373,_0x216b9a){const _0x3421dc=_0x44f549,_0x3b5b1f=this[_0x3421dc(0xe2)],_0x5a9002=_0x3b5b1f['get'](_0x461329['ICommandService']),_0x208548=_0x142c97[_0x3421dc(0xe9)](0x8),_0x2adbf9={'positionType':_0xed3373,'pivotTableId':_0x208548,'pivotTableConfig':{'targetCellInfo':_0x216b9a,'sourceRangeInfo':_0x15e0c4,'isEmpty':!0x0}};if(await _0x5a9002[_0x3421dc(0xc5)](_0x4b2908[_0x3421dc(0xd4)]['id'],_0x2adbf9))return new _0x256130(_0x216b9a[_0x3421dc(0xc3)],_0x216b9a[_0x3421dc(0xd1)],_0x208548,_0x3b5b1f);}[_0x44f549(0xcb)](_0x2bf317,_0x3bcab1,_0x51c807,_0x5cad36){const _0x3a19a6=_0x44f549,_0x567132=this[_0x3a19a6(0xe2)],_0x6abc7b=_0x567132[_0x3a19a6(0xe7)](_0x4b2908[_0x3a19a6(0xf1)])['getPivotTableIdByCell'](_0x2bf317,_0x3bcab1,_0x51c807,_0x5cad36);if(_0x6abc7b)return new _0x256130(_0x2bf317,_0x3bcab1,_0x6abc7b,_0x567132);}}_0x4a6293[_0x44f549(0xde)][_0x44f549(0xc4)](_0x585128),_0x32b790['FPivotTable']=_0x256130,Object['defineProperty'](_0x32b790,Symbol[_0x44f549(0xbe)],{'value':_0x44f549(0xc6)});}));function _0x2bf3(){const _0x874655=['renameField','setSubtotalType','117398pmXmwq','get','MovePivotFieldCommand','generateHexNumber','UniverCore','addField','7iaQhFm','getCollection','@univerjs/sheets/facade','fieldIds','defineProperty','SheetsPivotTableAdaptorModel','SetPivotSortCommand','8292kSEpNj','UniverProSheetsPivot','AddPivotFieldCommand','exports','pivotTableId','toStringTag','@univerjs/core','UniverProEnginePivot','493380UzrFPG','@univerjs-pro/engine-pivot','unitId','extend','executeCommand','Module','syncExecuteCommand','object','removeField','RemovePivotTableMutation','getPivotTableByCell','@univerjs-pro/sheets-pivot','setLabelManualFilter','UniverSheetsFacade','RenamePivotFieldMutation','10ddhVov','subUnitId','SheetsPivotTableConfigModel','getPivotTableConfig','AddPivotTableCommand','1039448LdsnFa','updateFieldPosition','192395nGcAQU','SetPivotFilterCommand','684568WAnpnl','SetPivotSubtotalTypeMutation','ICommandService','symbol','updateValuePosition','FWorkbook','function','625128hptGEt','104BeuKkR','_injector','RemovePivotFieldCommand'];_0x2bf3=function(){return _0x874655;};return _0x2bf3();}
|