@univerjs-pro/sheets-pivot 0.4.2 → 0.5.0-alpha.0
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/README.md +13 -15
- package/lib/cjs/facade.js +1 -0
- package/lib/cjs/index.js +1 -1
- package/lib/cjs/locale/en-US.js +1 -0
- package/lib/cjs/locale/fa-IR.js +1 -0
- package/lib/cjs/locale/ru-RU.js +1 -0
- package/lib/cjs/locale/vi-VN.js +1 -0
- package/lib/cjs/locale/zh-CN.js +1 -0
- package/lib/cjs/locale/zh-TW.js +1 -0
- package/lib/es/facade.js +1 -0
- package/lib/es/index.js +1 -1
- package/lib/es/locale/en-US.js +1 -0
- package/lib/es/locale/fa-IR.js +1 -0
- package/lib/es/locale/ru-RU.js +1 -0
- package/lib/es/locale/vi-VN.js +1 -0
- package/lib/es/locale/zh-CN.js +1 -0
- package/lib/es/locale/zh-TW.js +1 -0
- package/lib/types/index.d.ts +1158 -29
- package/lib/umd/facade.js +1 -0
- package/lib/umd/index.js +1 -1
- package/lib/umd/locale/en-US.js +1 -0
- package/lib/umd/locale/fa-IR.js +1 -0
- package/lib/umd/locale/ru-RU.js +1 -0
- package/lib/umd/locale/vi-VN.js +1 -0
- package/lib/umd/locale/zh-CN.js +1 -0
- package/lib/umd/locale/zh-TW.js +1 -0
- package/package.json +39 -20
- package/lib/locale/en-US.json +0 -30
- package/lib/locale/fa-IR.json +0 -30
- package/lib/locale/ru-RU.json +0 -30
- package/lib/locale/vi-VN.json +0 -30
- package/lib/locale/zh-CN.json +0 -30
- package/lib/locale/zh-TW.json +0 -30
- package/lib/types/commands/command/add-pivot-table-with-config.command.d.ts +0 -3
- package/lib/types/commands/command/util.d.ts +0 -12
- package/lib/types/commands/mutations/add-pivot-field.mutation.d.ts +0 -3
- package/lib/types/commands/mutations/add-pivot-table.mutation.d.ts +0 -3
- package/lib/types/commands/mutations/change-apply-util.d.ts +0 -15
- package/lib/types/commands/mutations/pivot-data-communication.mutation.d.ts +0 -7
- package/lib/types/commands/mutations/remove-pivot-field.mutation.d.ts +0 -3
- package/lib/types/commands/mutations/remove-pivot-table.mutation.d.ts +0 -3
- package/lib/types/commands/mutations/rename-pivot-field.mutation.d.ts +0 -3
- package/lib/types/commands/mutations/set-pivot-collapse.mutation.d.ts +0 -3
- package/lib/types/commands/mutations/set-pivot-field-format.mutation.d.ts +0 -3
- package/lib/types/commands/mutations/set-pivot-filter.mutation.d.ts +0 -3
- package/lib/types/commands/mutations/set-pivot-option.mutation.d.ts +0 -3
- package/lib/types/commands/mutations/set-pivot-position.mutation.d.ts +0 -3
- package/lib/types/commands/mutations/set-pivot-sort.mutation.d.ts +0 -3
- package/lib/types/commands/mutations/set-pivot-subtotal-type.mutation.d.ts +0 -3
- package/lib/types/commands/mutations/update-field-position.mutation.d.ts +0 -3
- package/lib/types/commands/mutations/update-pivot-field-source-info.mutation.d.ts +0 -3
- package/lib/types/commands/mutations/update-pivot-table-source.mutation.d.ts +0 -3
- package/lib/types/commands/mutations/update-value-position.mutation.d.ts +0 -3
- package/lib/types/commands/operations/pivot-table-dirty-view.operation.d.ts +0 -3
- package/lib/types/common/const.d.ts +0 -64
- package/lib/types/const/const.d.ts +0 -99
- package/lib/types/const/template.d.ts +0 -885
- package/lib/types/const/type.d.ts +0 -522
- package/lib/types/controllers/config.schema.d.ts +0 -6
- package/lib/types/controllers/const.d.ts +0 -1
- package/lib/types/controllers/sheets-pivot-caculate.controller.d.ts +0 -44
- package/lib/types/controllers/sheets-pivot-rpc.controller.d.ts +0 -20
- package/lib/types/locale/en-US.d.ts +0 -3
- package/lib/types/locale/fa-IR.d.ts +0 -3
- package/lib/types/locale/ru-RU.d.ts +0 -3
- package/lib/types/locale/vi-VN.d.ts +0 -3
- package/lib/types/locale/zh-CN.d.ts +0 -31
- package/lib/types/locale/zh-TW.d.ts +0 -3
- package/lib/types/models/sheets-pivot-config-model.d.ts +0 -58
- package/lib/types/models/sheets-pivot-data-field-manager.d.ts +0 -77
- package/lib/types/models/sheets-pivot-data-source-model.d.ts +0 -101
- package/lib/types/models/sheets-pivot-table-adaptor-model.d.ts +0 -54
- package/lib/types/models/view-util.d.ts +0 -16
- package/lib/types/plugin.d.ts +0 -17
- package/lib/types/services/sheets-pivot-rpc.service.d.ts +0 -11
- package/lib/types/services/sheets-pivot-table.service.d.ts +0 -10
- package/lib/types/util.d.ts +0 -52
|
@@ -1,522 +0,0 @@
|
|
|
1
|
-
import { DataField, FieldsCollection, 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
|
-
import { CellValueType, ICellData, IRange, IStyleData, IUnitRangeName, Nullable, ObjectMatrix } from '@univerjs/core';
|
|
3
|
-
import { PivotDisplayDataType, PositionType } from './const';
|
|
4
|
-
export interface IPivotTableConfigChangeInfo {
|
|
5
|
-
unitId: string;
|
|
6
|
-
subUnitId: string;
|
|
7
|
-
type: PivotTableOperationEnum;
|
|
8
|
-
pivotTableId: string;
|
|
9
|
-
view?: Nullable<PivotView>;
|
|
10
|
-
}
|
|
11
|
-
export declare enum CollectionChangeEnum {
|
|
12
|
-
add = "add",
|
|
13
|
-
delete = "delete",
|
|
14
|
-
update = "update"
|
|
15
|
-
}
|
|
16
|
-
export type IUnitRangeNameWithSubUnitId = IUnitRangeName & {
|
|
17
|
-
subUnitId: string;
|
|
18
|
-
};
|
|
19
|
-
export interface ICollectionChangeInfo {
|
|
20
|
-
token: string;
|
|
21
|
-
type: CollectionChangeEnum;
|
|
22
|
-
dataRangeInfo?: IUnitRangeNameWithSubUnitId;
|
|
23
|
-
unitId?: string;
|
|
24
|
-
subUnitId?: string;
|
|
25
|
-
targetCellInfo?: IPivotCellPositionInfo;
|
|
26
|
-
oldSourceRangeInfo?: IUnitRangeNameWithSubUnitId;
|
|
27
|
-
}
|
|
28
|
-
export interface IAddPivotTableParams {
|
|
29
|
-
pivotTableConfig: IPivotTableConfig;
|
|
30
|
-
}
|
|
31
|
-
export interface IAddPivotTableCommandParams {
|
|
32
|
-
positionType: PositionType;
|
|
33
|
-
pivotTableId?: string;
|
|
34
|
-
pivotTableConfig: Omit<IPivotTableConfig, 'fieldsConfig'>;
|
|
35
|
-
}
|
|
36
|
-
export interface IUpdatePivotTableSourceRangeMutationParams {
|
|
37
|
-
pivotTableId: string;
|
|
38
|
-
deleteIds: string[];
|
|
39
|
-
collectionJSON: IFieldsCollectionJSON;
|
|
40
|
-
dataRangeInfo: IUnitRangeNameWithSubUnitId;
|
|
41
|
-
unitId: string;
|
|
42
|
-
subUnitId: string;
|
|
43
|
-
}
|
|
44
|
-
export interface IAddPivotTableMutationParams {
|
|
45
|
-
unitId: string;
|
|
46
|
-
subUnitId: string;
|
|
47
|
-
pivotTableId: string;
|
|
48
|
-
pivotTableConfig: IPivotTableConfig;
|
|
49
|
-
collectionConfig: IFieldsCollectionJSON;
|
|
50
|
-
}
|
|
51
|
-
export interface IAddPivotFieldMutationParams {
|
|
52
|
-
unitId: string;
|
|
53
|
-
subUnitId: string;
|
|
54
|
-
pivotTableId: string;
|
|
55
|
-
fieldJson: IPivotTableValueFieldJSON | IPivotTableLabelFieldJSON;
|
|
56
|
-
area: PivotTableFiledAreaEnum;
|
|
57
|
-
index: number;
|
|
58
|
-
}
|
|
59
|
-
export interface IRemovePivotFieldMutationParams {
|
|
60
|
-
unitId: string;
|
|
61
|
-
subUnitId: string;
|
|
62
|
-
pivotTableId: string;
|
|
63
|
-
fieldId: string;
|
|
64
|
-
area: PivotTableFiledAreaEnum;
|
|
65
|
-
index: number;
|
|
66
|
-
}
|
|
67
|
-
export interface IRenamePivotFieldMutationParams {
|
|
68
|
-
unitId: string;
|
|
69
|
-
subUnitId: string;
|
|
70
|
-
pivotTableId: string;
|
|
71
|
-
name: string;
|
|
72
|
-
fieldId: string;
|
|
73
|
-
}
|
|
74
|
-
export interface ISetPivotSortMutationParams {
|
|
75
|
-
unitId: string;
|
|
76
|
-
subUnitId: string;
|
|
77
|
-
pivotTableId: string;
|
|
78
|
-
fieldId: string;
|
|
79
|
-
sortInfo: IPivotTableSortInfo | undefined;
|
|
80
|
-
}
|
|
81
|
-
export interface ISetPivotOptionMutationParams {
|
|
82
|
-
unitId: string;
|
|
83
|
-
subUnitId: string;
|
|
84
|
-
pivotTableId: string;
|
|
85
|
-
options: IPivotTableOptions;
|
|
86
|
-
}
|
|
87
|
-
export interface ISetPivotFieldFormatMutationParams {
|
|
88
|
-
unitId: string;
|
|
89
|
-
subUnitId: string;
|
|
90
|
-
pivotTableId: string;
|
|
91
|
-
fieldId: string;
|
|
92
|
-
format: string | undefined;
|
|
93
|
-
}
|
|
94
|
-
export interface IUpdateFieldPositionMutationParams {
|
|
95
|
-
unitId: string;
|
|
96
|
-
subUnitId: string;
|
|
97
|
-
pivotTableId: string;
|
|
98
|
-
fieldId: string;
|
|
99
|
-
area: PivotTableFiledAreaEnum;
|
|
100
|
-
index: number;
|
|
101
|
-
oldArea: PivotTableFiledAreaEnum;
|
|
102
|
-
oldIndex: number;
|
|
103
|
-
}
|
|
104
|
-
export interface IUpdateValuePositionMutationParams {
|
|
105
|
-
unitId: string;
|
|
106
|
-
subUnitId: string;
|
|
107
|
-
pivotTableId: string;
|
|
108
|
-
valuePosition: PivotTableValuePositionEnum;
|
|
109
|
-
index: number;
|
|
110
|
-
}
|
|
111
|
-
export interface IUpdatePivotFieldSourceInfoMutationParams {
|
|
112
|
-
unitId: string;
|
|
113
|
-
subUnitId: string;
|
|
114
|
-
pivotTableId: string;
|
|
115
|
-
dataFieldId: string;
|
|
116
|
-
sourceName: string;
|
|
117
|
-
tableFieldId: string;
|
|
118
|
-
}
|
|
119
|
-
export interface ISetPivotSubtotalTypeMutationParams {
|
|
120
|
-
unitId: string;
|
|
121
|
-
subUnitId: string;
|
|
122
|
-
pivotTableId: string;
|
|
123
|
-
fieldId: string;
|
|
124
|
-
subtotalType: PivotSubtotalTypeEnum;
|
|
125
|
-
}
|
|
126
|
-
export interface ISetPivotFilterMutationParams {
|
|
127
|
-
unitId: string;
|
|
128
|
-
subUnitId: string;
|
|
129
|
-
pivotTableId: string;
|
|
130
|
-
fieldId: string;
|
|
131
|
-
filterInfo: IPivotTableFilterInfo;
|
|
132
|
-
isAll?: boolean;
|
|
133
|
-
}
|
|
134
|
-
export interface ISetPivotCollapseMutation {
|
|
135
|
-
unitId: string;
|
|
136
|
-
subUnitId: string;
|
|
137
|
-
pivotTableId: string;
|
|
138
|
-
fieldId: string;
|
|
139
|
-
collapse: boolean;
|
|
140
|
-
item?: string;
|
|
141
|
-
}
|
|
142
|
-
export interface IAdjustPivotTableRes {
|
|
143
|
-
valueMatrix: ObjectMatrix<Nullable<IPivotTableCellData>>;
|
|
144
|
-
rowInfo: Record<string, IPivotViewInfo>;
|
|
145
|
-
colInfo: Record<string, IPivotViewInfo>;
|
|
146
|
-
cornerInfo: Record<string, IPivotViewInfo>;
|
|
147
|
-
rowHeaderMap: Record<string, ILabelViewHeaderMapItem>;
|
|
148
|
-
colHeaderMap: Record<string, ILabelViewHeaderMapItem>;
|
|
149
|
-
}
|
|
150
|
-
export interface IThemeStyle {
|
|
151
|
-
rowStyle?: IStyleData;
|
|
152
|
-
colStyle?: IStyleData;
|
|
153
|
-
cornerStyle?: IStyleData;
|
|
154
|
-
pageStyle?: IStyleData;
|
|
155
|
-
dataStyle?: IStyleData;
|
|
156
|
-
blankStyle?: IStyleData;
|
|
157
|
-
subTotalStyle?: IStyleData;
|
|
158
|
-
leafStyle?: IStyleData;
|
|
159
|
-
grandTotal?: IStyleData;
|
|
160
|
-
}
|
|
161
|
-
export interface IPivotTableFieldsConfig {
|
|
162
|
-
dim: unknown;
|
|
163
|
-
}
|
|
164
|
-
export interface IPivotCellPositionInfo {
|
|
165
|
-
row: number;
|
|
166
|
-
col: number;
|
|
167
|
-
unitId: string;
|
|
168
|
-
subUnitId: string;
|
|
169
|
-
sheetName?: string;
|
|
170
|
-
}
|
|
171
|
-
export interface IPivotTableConfig {
|
|
172
|
-
targetCellInfo: IPivotCellPositionInfo;
|
|
173
|
-
sourceRangeInfo: IUnitRangeNameWithSubUnitId;
|
|
174
|
-
themeId?: string;
|
|
175
|
-
fieldsConfig: IPivotTableSnapshot;
|
|
176
|
-
isEmpty: boolean;
|
|
177
|
-
}
|
|
178
|
-
export type IPivotTableConfigModel = Map<string, Map<string, Map<string, IPivotTableConfig>>>;
|
|
179
|
-
export type IPivotWorkerCache = Map<string, Map<string, Map<string, IPivotWorkerItemCache>>>;
|
|
180
|
-
export interface IPivotWorkerItemCache {
|
|
181
|
-
rangeCache?: IPivotRangesInfo;
|
|
182
|
-
matrix?: ObjectMatrix<Nullable<IPivotTableCellData>>;
|
|
183
|
-
oldRangeCache?: IPivotRangesInfo;
|
|
184
|
-
oldMatrix?: ObjectMatrix<Nullable<IPivotTableCellData>>;
|
|
185
|
-
}
|
|
186
|
-
export interface IPivotTableRangeInfo {
|
|
187
|
-
rangeInfo?: IPivotRangesInfo;
|
|
188
|
-
oldRangeInfo?: IPivotRangesInfo;
|
|
189
|
-
}
|
|
190
|
-
export interface IPivotTableMatrixInfo {
|
|
191
|
-
matrix: ObjectMatrix<Nullable<IPivotTableCellData>>;
|
|
192
|
-
oldMatrix?: ObjectMatrix<Nullable<IPivotTableCellData>>;
|
|
193
|
-
}
|
|
194
|
-
export declare enum PivotTableOperationEnum {
|
|
195
|
-
Add = "add",
|
|
196
|
-
Set = "set",
|
|
197
|
-
Delete = "delete"
|
|
198
|
-
}
|
|
199
|
-
export interface IPivotTableCellData {
|
|
200
|
-
v?: IPivotViewValueType;
|
|
201
|
-
/**
|
|
202
|
-
* pivot button type
|
|
203
|
-
*/
|
|
204
|
-
pbt?: PivotCellStyleTypeEnum;
|
|
205
|
-
s?: string | IStyleData;
|
|
206
|
-
/**
|
|
207
|
-
* filter index
|
|
208
|
-
*/
|
|
209
|
-
fi?: number;
|
|
210
|
-
t?: CellValueType;
|
|
211
|
-
}
|
|
212
|
-
export interface IDataFieldManagerJSON extends IDataFieldManagerBaseJSON {
|
|
213
|
-
dataRanges: Record<string, IUnitRangeName>;
|
|
214
|
-
}
|
|
215
|
-
export interface IPivotTableJson {
|
|
216
|
-
dataFieldManagerConfig: Record<string, IDataFieldManagerJSON>;
|
|
217
|
-
pivotTableConfigs: Record<string, Record<string, Record<string, IPivotTableConfig>>>;
|
|
218
|
-
}
|
|
219
|
-
export type IRangePosition = 'row' | 'col' | 'corner' | 'data';
|
|
220
|
-
export interface IPivotRenderCache {
|
|
221
|
-
areaInfo?: IPivotAreaViewInfo;
|
|
222
|
-
rangesInfo?: IPivotRangesInfo;
|
|
223
|
-
headerMap?: IPivotHeaderMap;
|
|
224
|
-
}
|
|
225
|
-
export interface IPivotAreaViewInfo {
|
|
226
|
-
rowInfo: Record<string, IPivotViewInfo>;
|
|
227
|
-
colInfo: Record<string, IPivotViewInfo>;
|
|
228
|
-
cornerInfo: Record<string, IPivotViewInfo>;
|
|
229
|
-
}
|
|
230
|
-
export interface IPivotRangesInfo {
|
|
231
|
-
rowRanges: IRange[];
|
|
232
|
-
colRanges: IRange[];
|
|
233
|
-
cornerRanges: IRange[];
|
|
234
|
-
dataRanges: IRange[];
|
|
235
|
-
pageRanges: IRange[];
|
|
236
|
-
}
|
|
237
|
-
export interface IPivotHeaderMap {
|
|
238
|
-
rowHeaderMap: Record<string, ILabelViewHeaderMapItem>;
|
|
239
|
-
colHeaderMap: Record<string, ILabelViewHeaderMapItem>;
|
|
240
|
-
}
|
|
241
|
-
export interface ISetPivotPositionMutationParams {
|
|
242
|
-
unitId: string;
|
|
243
|
-
subUnitId: string;
|
|
244
|
-
pivotTableId: string;
|
|
245
|
-
targetCellPosition: {
|
|
246
|
-
row: number;
|
|
247
|
-
col: number;
|
|
248
|
-
};
|
|
249
|
-
}
|
|
250
|
-
export interface IRemovePivotTableMutationParams {
|
|
251
|
-
unitId: string;
|
|
252
|
-
subUnitId: string;
|
|
253
|
-
pivotTableId: string;
|
|
254
|
-
}
|
|
255
|
-
export interface IPivotTableViewDirtyMarkOperationParams {
|
|
256
|
-
[unitId: string]: {
|
|
257
|
-
[sunUnitId: string]: {
|
|
258
|
-
[token: string]: boolean;
|
|
259
|
-
};
|
|
260
|
-
};
|
|
261
|
-
}
|
|
262
|
-
export interface ISheetPivotPluginConfig {
|
|
263
|
-
isPivotTableWorkerMode: boolean;
|
|
264
|
-
}
|
|
265
|
-
export interface IPivotMutationDirtyViewInfo {
|
|
266
|
-
unitId: string;
|
|
267
|
-
subUnitId: string;
|
|
268
|
-
token: string;
|
|
269
|
-
type: PivotTableOperationEnum;
|
|
270
|
-
pivotConfig?: IPivotTableConfig;
|
|
271
|
-
}
|
|
272
|
-
export interface IPivotLocalMutationBaseParams {
|
|
273
|
-
unitId: string;
|
|
274
|
-
subUnitId: string;
|
|
275
|
-
pivotTableId: string;
|
|
276
|
-
}
|
|
277
|
-
export interface IGetPivotFilterPanelDataParams {
|
|
278
|
-
row: number;
|
|
279
|
-
col: number;
|
|
280
|
-
tableFieldId?: string;
|
|
281
|
-
cellData?: IPivotTableCellData;
|
|
282
|
-
pivotItemRenderInfoCache?: IPivotRenderCache;
|
|
283
|
-
}
|
|
284
|
-
export interface IGetPivotPanelDataParams {
|
|
285
|
-
pivotTableId: string;
|
|
286
|
-
}
|
|
287
|
-
export interface IGetAddPivotFieldDataParams {
|
|
288
|
-
dataFieldId: string;
|
|
289
|
-
fieldArea: PivotTableFiledAreaEnum;
|
|
290
|
-
index: number;
|
|
291
|
-
}
|
|
292
|
-
export interface IPivotDisplayFilterInfo {
|
|
293
|
-
tableFieldId: string;
|
|
294
|
-
pivotTableId: string;
|
|
295
|
-
items: string[];
|
|
296
|
-
itemTypes: PivotDataFieldDataTypeEnum[];
|
|
297
|
-
filterInfo: IPivotTableFilterInfo | undefined;
|
|
298
|
-
sortInfo: IPivotTableSortInfo | undefined;
|
|
299
|
-
format: string | undefined;
|
|
300
|
-
}
|
|
301
|
-
export type IPivotDisplayPanelInfo = IPivotPanelDataInfo;
|
|
302
|
-
export interface IGetAddPivotTableDataParams {
|
|
303
|
-
sourceRangeInfo: IUnitRangeName & {
|
|
304
|
-
subUnitId: string;
|
|
305
|
-
};
|
|
306
|
-
}
|
|
307
|
-
export interface IGetAddPivotTableWithConfigDataParams {
|
|
308
|
-
sourceRangeInfo: IUnitRangeName & {
|
|
309
|
-
subUnitId: string;
|
|
310
|
-
};
|
|
311
|
-
pivotTableIndexConfig: {
|
|
312
|
-
filters?: IPivotFieldConfig[];
|
|
313
|
-
rows?: IPivotFieldConfig[];
|
|
314
|
-
columns?: IPivotFieldConfig[];
|
|
315
|
-
values?: IValueFieldConfig[];
|
|
316
|
-
};
|
|
317
|
-
}
|
|
318
|
-
export interface IGetMovePivotFieldDataParams {
|
|
319
|
-
fieldId: string;
|
|
320
|
-
area: PivotTableFiledAreaEnum;
|
|
321
|
-
index: number;
|
|
322
|
-
}
|
|
323
|
-
export interface IGetRemovePivotFieldDataParams {
|
|
324
|
-
fieldIds: string[];
|
|
325
|
-
}
|
|
326
|
-
export interface IGetPivotCollapseDataParams {
|
|
327
|
-
tableFieldId: string;
|
|
328
|
-
collapse: boolean;
|
|
329
|
-
item: string;
|
|
330
|
-
}
|
|
331
|
-
export interface IGetPivotFilterDataParams {
|
|
332
|
-
tableFieldId: string;
|
|
333
|
-
items: string[];
|
|
334
|
-
isAll?: boolean;
|
|
335
|
-
}
|
|
336
|
-
export interface IGetPivotSortDataParams {
|
|
337
|
-
tableFieldId: string;
|
|
338
|
-
info: IPivotTableSortInfo;
|
|
339
|
-
}
|
|
340
|
-
export interface IGetPivotDrillDownDataParams {
|
|
341
|
-
tuple: string[][];
|
|
342
|
-
}
|
|
343
|
-
export interface IGetPivotSettingDataParams {
|
|
344
|
-
tableFieldId: string;
|
|
345
|
-
displayName?: string;
|
|
346
|
-
format?: string;
|
|
347
|
-
subtotalType?: PivotSubtotalTypeEnum;
|
|
348
|
-
}
|
|
349
|
-
export interface IGetUpdatePivotSourceDataParams {
|
|
350
|
-
dataRangeInfo: IUnitRangeNameWithSubUnitId;
|
|
351
|
-
unitId: string;
|
|
352
|
-
subUnitId: string;
|
|
353
|
-
}
|
|
354
|
-
export interface IGetUpdateValuePositionDataParams {
|
|
355
|
-
position: PivotTableValuePositionEnum;
|
|
356
|
-
index: number;
|
|
357
|
-
}
|
|
358
|
-
export interface IGetPivotDataLocalMutationParams extends IPivotLocalMutationBaseParams {
|
|
359
|
-
version: string;
|
|
360
|
-
params: {
|
|
361
|
-
type: PivotDisplayDataType;
|
|
362
|
-
filter?: IGetPivotFilterPanelDataParams;
|
|
363
|
-
panel?: IGetPivotPanelDataParams;
|
|
364
|
-
addPivotField?: IGetAddPivotFieldDataParams;
|
|
365
|
-
addPivotTable?: IGetAddPivotTableDataParams;
|
|
366
|
-
movePivotField?: IGetMovePivotFieldDataParams;
|
|
367
|
-
removePivotField?: IGetRemovePivotFieldDataParams;
|
|
368
|
-
setPivotCollapse?: IGetPivotCollapseDataParams;
|
|
369
|
-
setPivotFilter?: IGetPivotFilterDataParams;
|
|
370
|
-
setPivotSort?: IGetPivotSortDataParams;
|
|
371
|
-
setPivotSetting?: IGetPivotSettingDataParams;
|
|
372
|
-
updatePivotSource?: IGetUpdatePivotSourceDataParams;
|
|
373
|
-
updateValuePosition?: IGetUpdateValuePositionDataParams;
|
|
374
|
-
addPivotTableWithConfig?: IGetAddPivotTableWithConfigDataParams;
|
|
375
|
-
drillDown?: IGetPivotDrillDownDataParams;
|
|
376
|
-
};
|
|
377
|
-
}
|
|
378
|
-
export interface IPivotDisplayResult {
|
|
379
|
-
filter?: IPivotDisplayFilterInfo;
|
|
380
|
-
panel?: IPivotDisplayPanelInfo;
|
|
381
|
-
addPivotTable?: IPivotAddPivotTableInfo;
|
|
382
|
-
addPivotField?: IPivotDisplayBaseInfo;
|
|
383
|
-
movePivotField?: IPivotDisplayBaseInfo;
|
|
384
|
-
removePivotField?: IPivotDisplayBaseInfo;
|
|
385
|
-
setPivotCollapse?: IPivotDisplayBaseInfo;
|
|
386
|
-
setPivotFilter?: IPivotDisplayBaseInfo;
|
|
387
|
-
setPivotSort?: IPivotDisplayBaseInfo;
|
|
388
|
-
setPivotSetting?: IPivotDisplayBaseInfo;
|
|
389
|
-
updatePivotSource?: IPivotUpdatePivotSourceInfo;
|
|
390
|
-
updateValuePosition?: IPivotDisplayBaseInfo;
|
|
391
|
-
addPivotTableWithConfig?: IPivotAddPivotTableInfo & {
|
|
392
|
-
changesets: IPivotTableChangeSet[];
|
|
393
|
-
};
|
|
394
|
-
drillDown?: IPivotDrillDownInfo;
|
|
395
|
-
}
|
|
396
|
-
export interface IPivotUpdatePivotSourceInfo {
|
|
397
|
-
view: IPivotViewJSON;
|
|
398
|
-
changesets: IPivotTableChangeSet[];
|
|
399
|
-
isEmpty: boolean;
|
|
400
|
-
pivotTableConfig: IPivotTableConfig;
|
|
401
|
-
collectionConfig: IFieldsCollectionJSON;
|
|
402
|
-
oldCollectionConfig: IFieldsCollectionJSON;
|
|
403
|
-
deleteIds?: string[];
|
|
404
|
-
}
|
|
405
|
-
export interface IPivotAddPivotTableInfo {
|
|
406
|
-
view: PivotView;
|
|
407
|
-
isEmpty: boolean;
|
|
408
|
-
fieldsConfig: IPivotTableSnapshot;
|
|
409
|
-
collectionConfig: IFieldsCollectionJSON;
|
|
410
|
-
}
|
|
411
|
-
export interface IPivotDrillDownInfo {
|
|
412
|
-
indexes: number[];
|
|
413
|
-
range: IRange;
|
|
414
|
-
sourceUnitId: string;
|
|
415
|
-
sourceSubUnitId: string;
|
|
416
|
-
formatMap: Record<string, string>;
|
|
417
|
-
}
|
|
418
|
-
export interface IPivotDisplayBaseInfo {
|
|
419
|
-
view: IPivotViewJSON;
|
|
420
|
-
changesets: IPivotTableChangeSet[];
|
|
421
|
-
isEmpty: boolean;
|
|
422
|
-
pivotTableConfig: IPivotTableConfig;
|
|
423
|
-
}
|
|
424
|
-
export interface ISendPivotViewItemLocalParams extends IPivotLocalMutationBaseParams {
|
|
425
|
-
view: IPivotViewJSON;
|
|
426
|
-
pivotConfig: IPivotTableConfig;
|
|
427
|
-
type: PivotTableOperationEnum;
|
|
428
|
-
}
|
|
429
|
-
export interface ISendPivotViewLocalMutationParams {
|
|
430
|
-
single?: ISendPivotViewItemLocalParams;
|
|
431
|
-
batch?: ISendPivotViewItemLocalParams[];
|
|
432
|
-
collectionConfig?: Record<string, IDataFieldManagerJSON>;
|
|
433
|
-
}
|
|
434
|
-
export interface ISendPivotConfigLocalMutationParams {
|
|
435
|
-
unitId: string;
|
|
436
|
-
subUnitId: string;
|
|
437
|
-
oldSubUnitId: string;
|
|
438
|
-
pivotTableId: string;
|
|
439
|
-
pivotTableConfig: IPivotTableConfig;
|
|
440
|
-
collectionConfig: IDataFieldManagerJSON;
|
|
441
|
-
}
|
|
442
|
-
export interface ISendInitPivotTextLocalMutationParams {
|
|
443
|
-
textInfo: Record<string, string>;
|
|
444
|
-
}
|
|
445
|
-
export interface ISendPivotDataLocalMutationParams extends IPivotLocalMutationBaseParams {
|
|
446
|
-
version: string;
|
|
447
|
-
result: IPivotDisplayResult;
|
|
448
|
-
}
|
|
449
|
-
export interface IPivotTextInfo {
|
|
450
|
-
subTotal: string;
|
|
451
|
-
grandTotal: string;
|
|
452
|
-
blank: string;
|
|
453
|
-
value: string;
|
|
454
|
-
averageName: string;
|
|
455
|
-
countName: string;
|
|
456
|
-
countNumsName: string;
|
|
457
|
-
maxName: string;
|
|
458
|
-
minName: string;
|
|
459
|
-
productName: string;
|
|
460
|
-
stdDevName: string;
|
|
461
|
-
stdDevpName: string;
|
|
462
|
-
sumName: string;
|
|
463
|
-
varName: string;
|
|
464
|
-
varpName: string;
|
|
465
|
-
}
|
|
466
|
-
export interface IPivotPanelTableListItemBase {
|
|
467
|
-
tableFieldId: string;
|
|
468
|
-
displayName: string;
|
|
469
|
-
dataFieldId: string;
|
|
470
|
-
format?: string;
|
|
471
|
-
subTotalType?: PivotSubtotalTypeEnum;
|
|
472
|
-
}
|
|
473
|
-
export interface IPivotPanelSourceList {
|
|
474
|
-
id: string;
|
|
475
|
-
dataFieldId: string;
|
|
476
|
-
name: string;
|
|
477
|
-
type: PivotDataFieldDataTypeEnum;
|
|
478
|
-
checked: boolean;
|
|
479
|
-
pivotTableId: string;
|
|
480
|
-
}
|
|
481
|
-
export interface IPivotPanelDataInfo {
|
|
482
|
-
sourceRange: IUnitRangeNameWithSubUnitId;
|
|
483
|
-
sourceList: IPivotPanelSourceList[];
|
|
484
|
-
rowFields: IPivotPanelTableListItemBase[];
|
|
485
|
-
columnFields: IPivotPanelTableListItemBase[];
|
|
486
|
-
valueFields: IPivotPanelTableListItemBase[];
|
|
487
|
-
filterFields: IPivotPanelTableListItemBase[];
|
|
488
|
-
positionInfo: IPivotTableConfig['targetCellInfo'];
|
|
489
|
-
}
|
|
490
|
-
export interface ICurrentDataMatrix {
|
|
491
|
-
arrayFormulaCellDataMatrix: ObjectMatrix<Nullable<ICellData>> | undefined;
|
|
492
|
-
unitDataMatrix: ObjectMatrix<Nullable<ICellData>> | undefined;
|
|
493
|
-
}
|
|
494
|
-
export interface IPivotFieldConfig {
|
|
495
|
-
field: number;
|
|
496
|
-
selectedItems?: string[];
|
|
497
|
-
}
|
|
498
|
-
export interface IValueFieldConfig {
|
|
499
|
-
field: number;
|
|
500
|
-
subTotalType?: PivotSubtotalTypeEnum;
|
|
501
|
-
formatString?: string;
|
|
502
|
-
}
|
|
503
|
-
export interface IAddPivotTableWithConfigCommandParams {
|
|
504
|
-
sourceDataInfo: {
|
|
505
|
-
unitId: string;
|
|
506
|
-
subUnitId: string;
|
|
507
|
-
range?: IRange;
|
|
508
|
-
};
|
|
509
|
-
pivotTableConfig: {
|
|
510
|
-
filters?: IPivotFieldConfig[];
|
|
511
|
-
rows?: IPivotFieldConfig[];
|
|
512
|
-
columns?: IPivotFieldConfig[];
|
|
513
|
-
values?: IValueFieldConfig[];
|
|
514
|
-
};
|
|
515
|
-
}
|
|
516
|
-
export interface IUpdateInfo {
|
|
517
|
-
collection: FieldsCollection;
|
|
518
|
-
updateDataFieldList: {
|
|
519
|
-
index: number;
|
|
520
|
-
dataField: DataField;
|
|
521
|
-
}[];
|
|
522
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const getLsInfoFuncStr = "ORaN2Txa 4QNr6L2Txa(nTNQaJQ, LRdnTNsQ6) { NxaJ2 nTNQaJQGaOxV9r2Urr96 = nTNQaJQ.JLnT2('-'); NxaJ2 xrTwTamQJJ9wQ = SFbe.L9rJQ(92xd(nTNQaJQGaOxV9r2Urr96[f])); TO (!xrTwTamQJJ9wQ.R4) { xrTwTamQJJ9wQ.R4 = eR7dQr(nTNQaJQGaOxV9r2Urr96[p]); } NxaJ2 TJixrhQr = 26LQxO ixrhQr0nxd9nFNxLQ !== 'Ra4QOTaQ4' && JQnO TaJ29aNQxO ixrhQr0nxd9nFNxLQ; NxaJ2 Nxa2QM2 = TJixrhQr ? JQnO : gTa4xg; NxaJ2 7QJJ9wQixr4 = Nxa2QM2.__H9JQ8p__.L9rJQ(nTNQaJQGaOxV9r2Urr96[f]); NxaJ2 7QJJ9wQ = Nxa2QM2.__AQM__.J2rTawTO6(7QJJ9wQixr4); NxaJ2 JTwa92RrQixr4 = Nxa2QM2.__H9JQ8p__.L9rJQ(nTNQaJQGaOxV9r2Urr96[j]); NxaJ2 JTwa92RrQ = Nxa2QM2.__AQM__.J2rTawTO6(JTwa92RrQixr4); NxaJ2 JTwaY9nT4 = Nxa2QM2.__5QrTO6__(JTwa92RrQ, 7QJJ9wQ, LRdnTNsQ6); NxaJ2 4x79Ta = xrTwTamQJJ9wQ.47; ORaN2Txa TJlx79Tam92NDTaw(xV922Qra, xAxJ2) { NxaJ2 L922Qra = xV922Qra.rQLn9NQ(/^.+/, ''); NxaJ2 DxJ2 = xAxJ2.rQLn9NQ(/^.+/, ''); NxaJ2 L922QraV9r2J = L922Qra.JLnT2('.'); NxaJ2 DxJ2V9r2J = DxJ2.JLnT2('.'); TO (!L922Qra.TaNnR4QJ('*')) { rQ2Rra L922Qra === DxJ2; } TO (L922QraV9r2J.nQaw2D < f || L922QraV9r2J[B] !== '*') { rQ2Rra O9nJQ; } NxaJ2 L922QraFROOTM = L922QraV9r2J.JnTNQ(u).zxTa('.'); NxaJ2 DxJ2FROOTM = DxJ2V9r2J.JnTNQ(-L922QraV9r2J.nQaw2D + u).zxTa('.'); rQ2Rra L922QraFROOTM === DxJ2FROOTM; } nQ2 4x79TaY9nT4 = 4x79Ta?.nQaw2D ? 4x79Ta.Jx7Q((47G2Q7) => TJlx79Tam92NDTaw(47G2Q7, nxN92Txa.DxJ2a97Q)) : 2rRQ; TO (nxN92Txa.DxJ2a97Q === 'nxN9nDxJ2') { 4x79TaY9nT4 = 2rRQ; } NxaJ2 59nT4 = JTwaY9nT4 && 4x79TaY9nT4; rQ2Rra { 59nT4, 7QJJ9wQ: xrTwTamQJJ9wQ, };}";
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
import { IAllRuntimeData, IFeatureDirtyRangeType, IRuntimeUnitDataType, IFeatureCalculationManagerService } from '@univerjs/engine-formula';
|
|
2
|
-
import { ICurrentDataMatrix, IPivotCellPositionInfo, IUnitRangeNameWithSubUnitId } from '../const/type';
|
|
3
|
-
import { Disposable, ICommandService, IConfigService, Injector } from '@univerjs/core';
|
|
4
|
-
import { SheetsPivotDataSourceModel } from '../models/sheets-pivot-data-source-model';
|
|
5
|
-
interface IPivotDirtyViewInfo {
|
|
6
|
-
unitId: string;
|
|
7
|
-
subUnitId: string;
|
|
8
|
-
token: string;
|
|
9
|
-
}
|
|
10
|
-
export declare class PivotCalculatorController extends Disposable {
|
|
11
|
-
private _sheetsPivotDataSourceModel;
|
|
12
|
-
private readonly _configService;
|
|
13
|
-
readonly _featureCalculationManagerService: IFeatureCalculationManagerService;
|
|
14
|
-
private readonly _commandService;
|
|
15
|
-
private readonly _injector;
|
|
16
|
-
constructor(_sheetsPivotDataSourceModel: SheetsPivotDataSourceModel, _configService: IConfigService, _featureCalculationManagerService: IFeatureCalculationManagerService, _commandService: ICommandService, _injector: Injector);
|
|
17
|
-
_init(): void;
|
|
18
|
-
private _initPivotDataGetListener;
|
|
19
|
-
private _initPivotTextInfo;
|
|
20
|
-
_subjectCollectionChange(): void;
|
|
21
|
-
private _subjectFieldsCollectionChange;
|
|
22
|
-
_subjectViewChange(): void;
|
|
23
|
-
/**
|
|
24
|
-
* - trigger dirty view for pivot table, it will mark dirty for calc engine
|
|
25
|
-
* @param {IPivotDirtyViewInfo[]} dirtyInfos the dirty feature info
|
|
26
|
-
*/
|
|
27
|
-
triggerDirtyFeature(dirtyInfos: IPivotDirtyViewInfo[]): void;
|
|
28
|
-
removeSourceRangeChange(unitId: string, subUnitId: string, token: string): void;
|
|
29
|
-
handleSourceRangeChange(token: string, dataRangeInfo: IUnitRangeNameWithSubUnitId, targetInfo: IPivotCellPositionInfo): void;
|
|
30
|
-
/**
|
|
31
|
-
* GET the runtime real data from runtime data, it use for refresh the data filed used rightly data
|
|
32
|
-
* @param {string} sourceUnitId the source unit id of pivot table
|
|
33
|
-
* @param {string} sourceSubunitId the source subunit id of pivot table
|
|
34
|
-
* @param {IAllRuntimeData} runtimeData the runtime data
|
|
35
|
-
* @returns {any} the matrix data
|
|
36
|
-
*/
|
|
37
|
-
getMatrixFromRunTimeData(sourceUnitId: string, sourceSubunitId: string, runtimeData: IAllRuntimeData): ICurrentDataMatrix;
|
|
38
|
-
getDirtyInfo(unitId: string, subUnitId: string, token: string): {
|
|
39
|
-
runtimeCellData: IRuntimeUnitDataType;
|
|
40
|
-
dirtyRanges: IFeatureDirtyRangeType;
|
|
41
|
-
};
|
|
42
|
-
dispose(): void;
|
|
43
|
-
}
|
|
44
|
-
export {};
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import { Disposable, ICommandService, IUniverInstanceService } from '@univerjs/core';
|
|
2
|
-
import { IActiveDirtyManagerService } from '@univerjs/engine-formula';
|
|
3
|
-
import { SheetsPivotTableConfigModel } from '../models/sheets-pivot-config-model';
|
|
4
|
-
import { SheetsPivotTableAdaptorModel } from '../models/sheets-pivot-table-adaptor-model';
|
|
5
|
-
import { SheetsPivotRPCService } from '../services/sheets-pivot-rpc.service';
|
|
6
|
-
export declare class SheetsPivotRPCController extends Disposable {
|
|
7
|
-
private readonly _commandService;
|
|
8
|
-
private readonly _sheetsPivotRpcService;
|
|
9
|
-
private readonly _sheetsPivotTableAdaptorModel;
|
|
10
|
-
private readonly _sheetsPivotTableConfigModel;
|
|
11
|
-
private readonly _univerInstanceService;
|
|
12
|
-
readonly _activeDirtyManagerService: IActiveDirtyManagerService;
|
|
13
|
-
constructor(_commandService: ICommandService, _sheetsPivotRpcService: SheetsPivotRPCService, _sheetsPivotTableAdaptorModel: SheetsPivotTableAdaptorModel, _sheetsPivotTableConfigModel: SheetsPivotTableConfigModel, _univerInstanceService: IUniverInstanceService, _activeDirtyManagerService: IActiveDirtyManagerService);
|
|
14
|
-
private _initDataSendListener;
|
|
15
|
-
/**
|
|
16
|
-
* - register dirty service, used to mark the pivot table view dirty
|
|
17
|
-
* @returns {void}
|
|
18
|
-
*/
|
|
19
|
-
registerDirtyService(): void;
|
|
20
|
-
}
|
|
@@ -1,31 +0,0 @@
|
|
|
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;
|