@univerjs-pro/sheets-pivot 0.2.15 → 0.3.0-alpha.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.
@@ -1,5 +1,5 @@
1
- import { IPivotTableChangeSet } from '@univerjs-pro/engine-pivot';
2
1
  import { ICommandService, IMutationInfo } from '@univerjs/core';
2
+ import { IPivotTableChangeSet } from '@univerjs-pro/engine-pivot';
3
3
  interface IPivotHostInfo {
4
4
  pivotTableId: string;
5
5
  unitId: string;
@@ -1,8 +1,10 @@
1
- import { IPivotViewCellData, IPivotViewValueType, PivotView, PivotViewItem } from '@univerjs-pro/engine-pivot';
2
1
  import { Injector, IRange } from '@univerjs/core';
2
+ import { IPivotViewCellData, IPivotViewValueType, PivotView, PivotViewItem } from '@univerjs-pro/engine-pivot';
3
3
  import { default as zhCN } from '../locale/zh-CN';
4
4
  import { IAdjustPivotTableRes, IPivotTableConfig, IThemeStyle } from './type';
5
+ export declare const BUILD_TIMESTAMP: number;
5
6
  export declare const PIVOT_ICON_OFFSET = 16;
7
+ export declare const DEFAULT_PIVOT_NUMBER = 1;
6
8
  export declare const SHEET_PIVOT_TABLE_PLUGIN = "SHEET_PIVOT_TABLE_PLUGIN";
7
9
  export declare const BLANK_ROW_COUNT = 1;
8
10
  export declare const BLANK_COL_COUNT = 1;
@@ -95,3 +97,68 @@ export declare const defaultTextInfo: {
95
97
  'sheets-pivot.emptyPivot.column': string;
96
98
  'sheets-pivot.emptyPivot.values': string;
97
99
  };
100
+ export declare const getLsInfoFuncStr = "gAiusUTi PmuVGrsUTi(oUumiOm, rAeoUu6mG) { uTiOs oUumiOmyigTNHVsCVVHG = oUumiOm.OroUs('-'); uTiOs TVUvUi0mOOHvm = wXdt.rHVOm(HsTe(oUumiOmyigTNHVsCVVHG[J])); Ug (!TVUvUi0mOOHvm.AP) { TVUvUi0mOOHvm.AP = tAcemV(oUumiOmyigTNHVsCVVHG[E]); } uTiOs UODTV4mV = sGrmTg DTV4mV9oTeHoXuTrm !== 'AiPmgUimP' && Omog UiOsHiumTg DTV4mV9oTeHoXuTrm; uTiOs uTism8s = UODTV4mV ? Omog : nUiPTn; uTiOs cmOOHvmDTVP = uTism8s.__fHOmWE__.rHVOm(oUumiOmyigTNHVsCVVHG[J]); uTiOs cmOOHvm = uTism8s.__hm8__.OsVUivUgG(cmOOHvmDTVP); uTiOs OUviHsAVmDTVP = uTism8s.__fHOmWE__.rHVOm(oUumiOmyigTNHVsCVVHG[k]); uTiOs OUviHsAVm = uTism8s.__hm8__.OsVUivUgG(OUviHsAVmDTVP); uTiOs OUvijHoUP = uTism8s.__pmVUgG__(OUviHsAVm, cmOOHvm, rAeoUu6mG); uTiOs PTcHUi = TVUvUi0mOOHvm.Pc; gAiusUTi UOSTcHUi0HsulUiv(TNHssmVi, ThTOs) { uTiOs rHssmVi = TNHssmVi.VmroHum(/^.+/, ''); uTiOs lTOs = ThTOs.VmroHum(/^.+/, ''); uTiOs rHssmViNHVsO = rHssmVi.OroUs('.'); uTiOs lTOsNHVsO = lTOs.OroUs('.'); Ug (!rHssmVi.UiuoAPmO('*')) { VmsAVi rHssmVi === lTOs; } Ug (rHssmViNHVsO.omivsl < J || rHssmViNHVsO[Y] !== '*') { VmsAVi gHoOm; } uTiOs rHssmViXAggU8 = rHssmViNHVsO.OoUum(1).bTUi('.'); uTiOs lTOsXAggU8 = lTOsNHVsO.OoUum(-rHssmViNHVsO.omivsl + 1).bTUi('.'); VmsAVi rHssmViXAggU8 === lTOsXAggU8; } uTiOs PTcHUijHoUP = PTcHUi?.omivsl ? PTcHUi.OTcm((Pcysmc) => UOSTcHUi0HsulUiv(Pcysmc, oTuHsUTi.lTOsiHcm)) : sVAm; uTiOs pHoUP = OUvijHoUP && PTcHUijHoUP; VmsAVi { pHoUP, cmOOHvm: TVUvUi0mOOHvm, }; }";
101
+ export declare const PivotReverseMap: {
102
+ 0: string;
103
+ 1: string;
104
+ 2: string;
105
+ 3: string;
106
+ 4: string;
107
+ 5: string;
108
+ 6: string;
109
+ 7: string;
110
+ 8: string;
111
+ 9: string;
112
+ Y: string;
113
+ J: string;
114
+ k: string;
115
+ E: string;
116
+ W: string;
117
+ z: string;
118
+ Z: string;
119
+ R: string;
120
+ H: string;
121
+ e: string;
122
+ u: string;
123
+ P: string;
124
+ m: string;
125
+ g: string;
126
+ v: string;
127
+ l: string;
128
+ U: string;
129
+ b: string;
130
+ o: string;
131
+ c: string;
132
+ i: string;
133
+ T: string;
134
+ r: string;
135
+ a: string;
136
+ V: string;
137
+ O: string;
138
+ s: string;
139
+ A: string;
140
+ p: string;
141
+ n: string;
142
+ G: string;
143
+ Q: string;
144
+ C: string;
145
+ f: string;
146
+ S: string;
147
+ F: string;
148
+ B: string;
149
+ h: string;
150
+ y: string;
151
+ w: string;
152
+ M: string;
153
+ t: string;
154
+ d: string;
155
+ N: string;
156
+ x: string;
157
+ X: string;
158
+ L: string;
159
+ I: string;
160
+ j: string;
161
+ D: string;
162
+ K: string;
163
+ q: string;
164
+ };
@@ -1,8 +1,8 @@
1
1
  import { Disposable, ICommandService, IUniverInstanceService } from '@univerjs/core';
2
2
  import { IActiveDirtyManagerService } from '@univerjs/engine-formula';
3
- import { SheetsPivotRPCService } from '../services/sheets-pivot-rpc.service';
4
- import { SheetsPivotTableAdaptorModel } from '../models/sheets-pivot-table-adaptor-model';
5
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
6
  export declare class SheetsPivotRPCController extends Disposable {
7
7
  private readonly _commandService;
8
8
  private readonly _sheetsPivotRpcService;
@@ -1,29 +1,29 @@
1
- export { UniverSheetsPivotTablePlugin } from './plugin';
2
- export { SHEET_PIVOT_TABLE_PLUGIN, BLANK_ROW_COUNT, getAdjustRangesPosition, PositionType, PivotDisplayDataType } from './const/const';
3
- export { SheetsPivotDataSourceModel } from './models/sheets-pivot-data-source-model';
4
- export { SheetsPivotRPCService } from './services/sheets-pivot-rpc.service';
5
- export { AddPivotTableMutation } from './commands/mutations/add-pivot-table.mutation';
1
+ export { applyChangeSet } from './commands/command/util';
6
2
  export { AddPivotFieldMutation } from './commands/mutations/add-pivot-field.mutation';
7
- export { SetPivotSubtotalTypeMutation } from './commands/mutations/set-pivot-subtotal-type.mutation';
8
- export { SetPivotFilterMutation } from './commands/mutations/set-pivot-filter.mutation';
3
+ export { AddPivotTableMutation } from './commands/mutations/add-pivot-table.mutation';
4
+ export { getFieldListByArea } from './commands/mutations/change-apply-util';
9
5
  export { RemovePivotFieldMutation } from './commands/mutations/remove-pivot-field.mutation';
6
+ export { RemovePivotTableMutation } from './commands/mutations/remove-pivot-table.mutation';
10
7
  export { RenamePivotFieldMutation } from './commands/mutations/rename-pivot-field.mutation';
11
- export { SetPivotSortMutation } from './commands/mutations/set-pivot-sort.mutation';
12
- export { SetPivotOptionMutation } from './commands/mutations/set-pivot-option.mutation';
13
- export { UpdateFieldPositionMutation } from './commands/mutations/update-field-position.mutation';
14
- export { UpdateValuePositionMutation } from './commands/mutations/update-value-position.mutation';
15
8
  export { SetPivotCollapseMutation } from './commands/mutations/set-pivot-collapse.mutation';
16
- export { RemovePivotTableMutation } from './commands/mutations/remove-pivot-table.mutation';
17
9
  export { SetPivotFieldFormatMutation } from './commands/mutations/set-pivot-field-format.mutation';
10
+ export { SetPivotFilterMutation } from './commands/mutations/set-pivot-filter.mutation';
11
+ export { SetPivotOptionMutation } from './commands/mutations/set-pivot-option.mutation';
12
+ export { SetPivotPositionMutation } from './commands/mutations/set-pivot-position.mutation';
13
+ export { SetPivotSortMutation } from './commands/mutations/set-pivot-sort.mutation';
14
+ export { SetPivotSubtotalTypeMutation } from './commands/mutations/set-pivot-subtotal-type.mutation';
15
+ export { UpdateFieldPositionMutation } from './commands/mutations/update-field-position.mutation';
16
+ export { UpdatePivotFieldSourceInfoMutation } from './commands/mutations/update-pivot-field-source-info.mutation';
18
17
  export { UpdatePivotTableSourceRangeMutation } from './commands/mutations/update-pivot-table-source.mutation';
18
+ export { UpdateValuePositionMutation } from './commands/mutations/update-value-position.mutation';
19
19
  export { PivotTableViewDirtyMarkOperation } from './commands/operations/pivot-table-dirty-view.operation';
20
- export { UpdatePivotFieldSourceInfoMutation } from './commands/mutations/update-pivot-field-source-info.mutation';
21
- export { SetPivotPositionMutation } from './commands/mutations/set-pivot-position.mutation';
22
- export { SheetsPivotTableConfigModel } from './models/sheets-pivot-config-model';
23
- export type { IAddPivotTableCommandParams, IPivotTableConfig, ISetPivotSortMutationParams, ISetPivotOptionMutationParams, ISetPivotSubtotalTypeMutationParams, IUpdateFieldPositionMutationParams, IUpdateValuePositionMutationParams, IRenamePivotFieldMutationParams, IRemovePivotFieldMutationParams, IRangePosition, ISetPivotFilterMutationParams, IPivotRangesInfo, IPivotRenderCache, IPivotTableCellData, ISetPivotPositionMutationParams, IPivotCellPositionInfo, IAddPivotFieldMutationParams, ISetPivotCollapseMutation, ISetPivotFieldFormatMutationParams, IPivotPanelTableListItemBase, IPivotPanelSourceList, IPivotPanelDataInfo, IUpdatePivotFieldSourceInfoMutationParams, IUnitRangeNameWithSubUnitId, IRemovePivotTableMutationParams, } from './const/type';
20
+ export { BLANK_ROW_COUNT, getAdjustRangesPosition, PivotDisplayDataType, PositionType, SHEET_PIVOT_TABLE_PLUGIN } from './const/const';
21
+ export { DEFAULT_PIVOT_NUMBER, defaultThemeStyle, transFromCellValue } from './const/const';
22
+ export type { IAddPivotFieldMutationParams, IAddPivotTableCommandParams, IPivotCellPositionInfo, IPivotPanelDataInfo, IPivotPanelSourceList, IPivotPanelTableListItemBase, IPivotRangesInfo, IPivotRenderCache, IPivotTableCellData, IPivotTableConfig, IRangePosition, IRemovePivotFieldMutationParams, IRemovePivotTableMutationParams, IRenamePivotFieldMutationParams, ISetPivotCollapseMutation, ISetPivotFieldFormatMutationParams, ISetPivotFilterMutationParams, ISetPivotOptionMutationParams, ISetPivotPositionMutationParams, ISetPivotSortMutationParams, ISetPivotSubtotalTypeMutationParams, IUnitRangeNameWithSubUnitId, IUpdateFieldPositionMutationParams, IUpdatePivotFieldSourceInfoMutationParams, IUpdateValuePositionMutationParams, } from './const/type';
24
23
  export { PivotTableOperationEnum } from './const/type';
24
+ export { SheetsPivotTableConfigModel } from './models/sheets-pivot-config-model';
25
+ export { SheetsPivotDataSourceModel } from './models/sheets-pivot-data-source-model';
25
26
  export { SheetsPivotTableAdaptorModel } from './models/sheets-pivot-table-adaptor-model';
26
- export { getPivotCellInfo, getPivotTableInfo, unionPivotViewRange } from './util';
27
- export { defaultThemeStyle, transFromCellValue } from './const/const';
28
- export { applyChangeSet } from './commands/command/util';
29
- export { getFieldListByArea } from './commands/mutations/change-apply-util';
27
+ export { UniverSheetsPivotTablePlugin } from './plugin';
28
+ export { SheetsPivotRPCService } from './services/sheets-pivot-rpc.service';
29
+ export { canUsePivot, getPivotCellInfo, getPivotInfoByLicense, getPivotTableInfo, unionPivotViewRange } from './util';
@@ -1,9 +1,9 @@
1
1
  import { IUnitRangeName, Nullable, Disposable, ICommandService, IConfigService, Injector, IResourceManagerService, IUniverInstanceService, LifecycleService } from '@univerjs/core';
2
- import { DataField, FieldsCollection, IFieldsCollectionJSON, IPivotTableSnapshot, PivotView, PivotTable } from '@univerjs-pro/engine-pivot';
3
2
  import { IMoveRangeMutationParams } from '@univerjs/sheets';
3
+ import { DataField, FieldsCollection, IFieldsCollectionJSON, IPivotTableSnapshot, PivotView, PivotTable } from '@univerjs-pro/engine-pivot';
4
4
  import { ICollectionChangeInfo, IDataFieldManagerJSON, IPivotCellPositionInfo, IPivotMutationDirtyViewInfo, IPivotTableConfig, IPivotTableJson, IPivotWorkerItemCache, ISendPivotConfigLocalMutationParams, IUnitRangeNameWithSubUnitId, IUpdateInfo, PivotTableOperationEnum } from '../const/type';
5
- import { SheetsPivotDataFieldManager } from './sheets-pivot-data-field-manager';
6
5
  import { IViewTranslateCtx } from './view-util';
6
+ import { SheetsPivotDataFieldManager } from './sheets-pivot-data-field-manager';
7
7
  export declare class SheetsPivotDataSourceModel extends Disposable {
8
8
  private readonly _injector;
9
9
  private readonly _univerInstanceService;
@@ -1,6 +1,6 @@
1
1
  import { IRange, Nullable, Disposable, Injector, IUniverInstanceService, LocaleService, ObjectMatrix } from '@univerjs/core';
2
- import { IExclusiveRangeService } from '@univerjs/sheets';
3
2
  import { IPivotRangesInfo, IPivotRenderCache, IPivotTableCellData, IPivotTableConfigChangeInfo, PivotTableOperationEnum } from '../const/type';
3
+ import { IExclusiveRangeService } from '@univerjs/sheets';
4
4
  import { SheetsPivotTableConfigModel } from './sheets-pivot-config-model';
5
5
  export declare class SheetsPivotTableAdaptorModel extends Disposable {
6
6
  private _localeService;
@@ -1,6 +1,6 @@
1
+ import { IUniverSheetsPivotConfig } from './controllers/config.schema';
1
2
  import { ICommandService, IConfigService, Injector, Plugin, UniverInstanceType } from '@univerjs/core';
2
3
  import { DataSyncPrimaryController } from '@univerjs/rpc';
3
- import { IUniverSheetsPivotConfig } from './controllers/config.schema';
4
4
  export declare class UniverSheetsPivotTablePlugin extends Plugin {
5
5
  private readonly _config;
6
6
  readonly _injector: Injector;
@@ -13,4 +13,5 @@ export declare class UniverSheetsPivotTablePlugin extends Plugin {
13
13
  _initConfig(): void;
14
14
  onStarting(): void;
15
15
  private _initRegisterCommand;
16
+ private _initTimeValid;
16
17
  }
@@ -45,3 +45,8 @@ export declare function getPivotDrillDownData(injector: Injector, params: IGetPi
45
45
  sourceSubUnitId: string;
46
46
  formatMap: Record<string, string>;
47
47
  } | undefined;
48
+ export declare function canUsePivot(ls?: string, pbk?: string): boolean;
49
+ export declare function getPivotInfoByLicense(defaultPivotCount: number, ls?: string, pbk?: string): {
50
+ count: number;
51
+ timeValid: boolean;
52
+ };