@univerjs-pro/sheets-pivot-ui 0.4.1-nightly.202410271605 → 0.4.1-nightly.202410291249

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.
Files changed (31) hide show
  1. package/lib/cjs/index.js +1 -1
  2. package/lib/es/index.js +1 -1
  3. package/lib/types/const.d.ts +0 -1
  4. package/lib/types/controllers/sheets-pivot-confirm.controller.d.ts +1 -3
  5. package/lib/types/controllers/sheets-pivot-intercept-ui.controller.d.ts +15 -0
  6. package/lib/types/controllers/sheets-pivot-render.controller.d.ts +1 -1
  7. package/lib/types/index.d.ts +0 -10
  8. package/lib/types/type.d.ts +2 -72
  9. package/lib/types/util.d.ts +1 -4
  10. package/lib/types/views/components/PivotFilterPanel.d.ts +1 -1
  11. package/lib/types/views/components/PivotSourceList.d.ts +1 -1
  12. package/lib/types/views/components/util.d.ts +1 -1
  13. package/lib/types/views/widgets/pivot-button.shape.d.ts +2 -2
  14. package/lib/umd/index.js +1 -1
  15. package/package.json +15 -15
  16. package/lib/types/commands/commands/add-pivot-field.command.d.ts +0 -3
  17. package/lib/types/commands/commands/add-pivot-table.command.d.ts +0 -3
  18. package/lib/types/commands/commands/move-pivot-field.command.d.ts +0 -3
  19. package/lib/types/commands/commands/pivot-drill-down.command.d.ts +0 -3
  20. package/lib/types/commands/commands/remove-pivot-field.command.d.ts +0 -3
  21. package/lib/types/commands/commands/set-pivot-collapse.command.d.ts +0 -3
  22. package/lib/types/commands/commands/set-pivot-filter.command.d.ts +0 -3
  23. package/lib/types/commands/commands/set-pivot-sort.command.d.ts +0 -3
  24. package/lib/types/commands/commands/update-pivot-setting.command.d.ts +0 -3
  25. package/lib/types/commands/commands/update-pivot-source.command.d.ts +0 -3
  26. package/lib/types/commands/commands/update-value-position.command.d.ts +0 -3
  27. package/lib/types/controllers/sheets-pivot-clear.controller.d.ts +0 -12
  28. package/lib/types/controllers/sheets-pivot-permission.controller.d.ts +0 -7
  29. package/lib/types/controllers/sheets-pivot-ref-range.controller.d.ts +0 -22
  30. package/lib/types/controllers/sheets-pivot-remove-sheet.controller.d.ts +0 -9
  31. package/lib/types/services/sheets-pivot-ui.service.d.ts +0 -45
@@ -10,7 +10,6 @@ export declare const DEFAULT_EMPTY_PIVOT_ROW_COUNT = 14;
10
10
  export declare const DEFAULT_EMPTY_PIVOT_COL_COUNT = 6;
11
11
  export declare const PIVOT_TABLE_ICON_KEY = "PIVOT_TABLE_ICON_KEY";
12
12
  export declare const PIVOT_TABLE_BACK_KEY = "PIVOT_TABLE_BACK_KEY";
13
- export declare const SHEET_PIVOT_AUTO_FIT_COLUMN_TEST_COUNT = 100;
14
13
  export declare enum PivotFilterStatus {
15
14
  HasFilter = "HasFilter",
16
15
  NotFilter = "NotFilter"
@@ -2,7 +2,6 @@ import { Disposable, Injector, IUniverInstanceService, LocaleService } from '@un
2
2
  import { SheetInterceptorService } from '@univerjs/sheets';
3
3
  import { IConfirmService, IMessageService } from '@univerjs/ui';
4
4
  import { SheetsPivotTableAdaptorModel, SheetsPivotTableConfigModel } from '@univerjs-pro/sheets-pivot';
5
- import { SheetsPivotTableUIService } from '../services/sheets-pivot-ui.service';
6
5
  export declare class SheetsPivotConfirmController extends Disposable {
7
6
  private readonly _injector;
8
7
  private readonly _univerInstanceService;
@@ -11,9 +10,8 @@ export declare class SheetsPivotConfirmController extends Disposable {
11
10
  private readonly _confirmService;
12
11
  private readonly _localeService;
13
12
  private readonly _sheetsPivotTableConfigModel;
14
- private readonly _sheetsPivotTableUIService;
15
13
  private readonly _messageService;
16
- constructor(_injector: Injector, _univerInstanceService: IUniverInstanceService, _sheetsPivotTableAdaptorModel: SheetsPivotTableAdaptorModel, _sheetInterceptorService: SheetInterceptorService, _confirmService: IConfirmService, _localeService: LocaleService, _sheetsPivotTableConfigModel: SheetsPivotTableConfigModel, _sheetsPivotTableUIService: SheetsPivotTableUIService, _messageService: IMessageService);
14
+ constructor(_injector: Injector, _univerInstanceService: IUniverInstanceService, _sheetsPivotTableAdaptorModel: SheetsPivotTableAdaptorModel, _sheetInterceptorService: SheetInterceptorService, _confirmService: IConfirmService, _localeService: LocaleService, _sheetsPivotTableConfigModel: SheetsPivotTableConfigModel, _messageService: IMessageService);
17
15
  private _initMoveRangeConfirmCheck;
18
16
  private _initRowColOperationCheck;
19
17
  }
@@ -0,0 +1,15 @@
1
+ import { Disposable, Injector, IUniverInstanceService, LocaleService } from '@univerjs/core';
2
+ import { SheetInterceptorService } from '@univerjs/sheets';
3
+ import { IConfirmService } from '@univerjs/ui';
4
+ import { SheetsPivotTableConfigModel } from '@univerjs-pro/sheets-pivot';
5
+ export declare class SheetsPivotTableUIInterceptController extends Disposable {
6
+ private readonly _localeService;
7
+ private readonly _sheetInterceptorService;
8
+ private readonly _injector;
9
+ private readonly _confirmService;
10
+ private readonly _univerInstanceService;
11
+ private readonly _sheetsPivotTableConfigModel;
12
+ constructor(_localeService: LocaleService, _sheetInterceptorService: SheetInterceptorService, _injector: Injector, _confirmService: IConfirmService, _univerInstanceService: IUniverInstanceService, _sheetsPivotTableConfigModel: SheetsPivotTableConfigModel);
13
+ private _getPivotAppliedRanges;
14
+ private _initUIInterceptListener;
15
+ }
@@ -1,8 +1,8 @@
1
1
  import { Workbook, Disposable, ICommandService, Injector, IPermissionService } from '@univerjs/core';
2
2
  import { IRenderContext, IRenderModule } from '@univerjs/engine-render';
3
3
  import { SheetPermissionInterceptorBaseController, SheetSkeletonManagerService } from '@univerjs/sheets-ui';
4
- import { SheetsPivotTableAdaptorModel, SheetsPivotTableConfigModel } from '@univerjs-pro/sheets-pivot';
5
4
  import { ComponentManager } from '@univerjs/ui';
5
+ import { SheetsPivotTableAdaptorModel, SheetsPivotTableConfigModel } from '@univerjs-pro/sheets-pivot';
6
6
  export declare class SheetsPivotRenderController extends Disposable implements IRenderModule {
7
7
  private readonly _context;
8
8
  private readonly _injector;
@@ -3,13 +3,3 @@ export { OpenPivotTableRangeSelectorPanelOperation } from './commands/operations
3
3
  export { OpenPivotTableFilterPanelOperation } from './commands/operations/open-pivot-filter-panel.operation';
4
4
  export { OpenPivotTableFieldSettingDialogOperation } from './commands/operations/open-pivot-setting-dialog.operation';
5
5
  export { OpenPivotTablePanelOperation } from './commands/operations/open-pivot-table-panel.operation';
6
- export { AddPivotFieldCommand } from './commands/commands/add-pivot-field.command';
7
- export { AddPivotTableCommand } from './commands/commands/add-pivot-table.command';
8
- export { MovePivotFieldCommand } from './commands/commands/move-pivot-field.command';
9
- export { RemovePivotFieldCommand } from './commands/commands/remove-pivot-field.command';
10
- export { SetPivotCollapseCommand } from './commands/commands/set-pivot-collapse.command';
11
- export { SetPivotFilterCommand } from './commands/commands/set-pivot-filter.command';
12
- export { SetPivotSortCommand } from './commands/commands/set-pivot-sort.command';
13
- export { UpdatePivotFieldSettingCommand } from './commands/commands/update-pivot-setting.command';
14
- export { UpdatePivotTableSourceRangeCommand } from './commands/commands/update-pivot-source.command';
15
- export { UpdatePivotValuePositionCommand } from './commands/commands/update-value-position.command';
@@ -1,5 +1,5 @@
1
- import { IPivotTableFilterInfo, IPivotTableSortInfo, PivotDataFieldDataTypeEnum, PivotSubtotalTypeEnum, PivotTableFiledAreaEnum, PivotTableValuePositionEnum } from '@univerjs-pro/engine-pivot';
2
- import { IPivotPanelSourceList, IPivotPanelTableListItemBase, IUnitRangeNameWithSubUnitId } from '@univerjs-pro/sheets-pivot';
1
+ import { IPivotTableFilterInfo, IPivotTableSortInfo, PivotDataFieldDataTypeEnum } from '@univerjs-pro/engine-pivot';
2
+ import { IPivotPanelSourceList, IPivotPanelTableListItemBase } from '@univerjs-pro/sheets-pivot';
3
3
  export interface IOpenPivotTablePanelOperationParams {
4
4
  pivotTableId: string;
5
5
  }
@@ -19,66 +19,6 @@ export interface IOpenPivotTableFieldSettingDialogOperationParams {
19
19
  tableFieldInfo: IPivotPanelTableListItemBase;
20
20
  dataFieldInfo: IPivotPanelSourceList;
21
21
  }
22
- export interface IAddPivotFieldCommandParams {
23
- unitId: string;
24
- subUnitId: string;
25
- pivotTableId: string;
26
- dataFieldId: string;
27
- fieldArea: PivotTableFiledAreaEnum;
28
- index: number;
29
- }
30
- export interface IRemovePivotFieldCommandParams {
31
- unitId: string;
32
- subUnitId: string;
33
- pivotTableId: string;
34
- fieldIds: string[];
35
- }
36
- export interface IUpdatePivotValuePositionCommandParams {
37
- pivotTableId: string;
38
- position: PivotTableValuePositionEnum;
39
- index: number;
40
- }
41
- export interface IMovePivotFieldCommandParams {
42
- unitId: string;
43
- subUnitId: string;
44
- pivotTableId: string;
45
- fieldId: string;
46
- area: PivotTableFiledAreaEnum;
47
- index: number;
48
- }
49
- export interface ISetPivotFilterCommandParams {
50
- unitId: string;
51
- subUnitId: string;
52
- pivotTableId: string;
53
- tableFieldId: string;
54
- items: string[];
55
- isAll?: boolean;
56
- }
57
- export interface ISetPivotSortCommandParams {
58
- unitId: string;
59
- subUnitId: string;
60
- tableFieldId: string;
61
- pivotTableId: string;
62
- info: IPivotTableSortInfo;
63
- }
64
- export interface IUpdatePivotFieldSettingCommandParams {
65
- unitId: string;
66
- subUnitId: string;
67
- tableFieldId: string;
68
- pivotTableId: string;
69
- displayName?: string;
70
- format?: string;
71
- subtotalType?: PivotSubtotalTypeEnum;
72
- tableFieldInfo: IPivotPanelTableListItemBase;
73
- dataFieldInfo: IPivotPanelSourceList;
74
- }
75
- export interface ISetPivotCollapseCommandParams {
76
- unitId: string;
77
- subUnitId: string;
78
- row: number;
79
- col: number;
80
- collapse: boolean;
81
- }
82
22
  export interface IFilterItemInfo {
83
23
  tableFieldId: string;
84
24
  pivotTableId: string;
@@ -88,13 +28,3 @@ export interface IFilterItemInfo {
88
28
  filterInfo: IPivotTableFilterInfo | undefined;
89
29
  sortInfo: IPivotTableSortInfo | undefined;
90
30
  }
91
- export interface IUpdatePivotTableSourceRangeCommandParams {
92
- unitId: string;
93
- subUnitId: string;
94
- token: string;
95
- dataRangeInfo: IUnitRangeNameWithSubUnitId;
96
- }
97
- export interface IPivotDrillDownCommandParams {
98
- row: number;
99
- col: number;
100
- }
@@ -1,4 +1,4 @@
1
- import { LabelViewItem, PivotView, PivotViewItem } from '@univerjs-pro/engine-pivot';
1
+ import { PivotView } from '@univerjs-pro/engine-pivot';
2
2
  export declare function getPivotRowColCount(view: PivotView, startCell: {
3
3
  row: number;
4
4
  col: number;
@@ -6,6 +6,3 @@ export declare function getPivotRowColCount(view: PivotView, startCell: {
6
6
  rowCount: number;
7
7
  colCount: number;
8
8
  };
9
- export declare function getHeaderViewMaxText(labelView: LabelViewItem, textInfo: Record<string, string>, isCol: boolean, formatMap: Record<string, string>): string;
10
- export declare function getValueViewMaxText(rowView: PivotViewItem): string;
11
- export declare function getCornerMaxText(corner: PivotViewItem): string;
@@ -1,5 +1,5 @@
1
- import { default as React } from 'react';
2
1
  import { IFilterItemInfo } from '../../type';
2
+ import { default as React } from 'react';
3
3
  interface IPivotFilterPanelProps {
4
4
  unitId: string;
5
5
  subUnitId: string;
@@ -1,5 +1,5 @@
1
- import { default as React } from 'react';
2
1
  import { IPivotPanelDataInfo, IPivotPanelSourceList } from '@univerjs-pro/sheets-pivot';
2
+ import { default as React } from 'react';
3
3
  interface IPivotSourceListProps {
4
4
  sourceList: IPivotPanelSourceList[];
5
5
  refreshHandler: () => void;
@@ -1,5 +1,5 @@
1
- import { IPivotTableFilterInfo, PivotSubtotalTypeEnum, PivotTableFiledAreaEnum, PivotTableValuePositionEnum } from '@univerjs-pro/engine-pivot';
2
1
  import { ICommandService, IRange, Nullable, Worksheet } from '@univerjs/core';
2
+ import { IPivotTableFilterInfo, PivotSubtotalTypeEnum, PivotTableFiledAreaEnum, PivotTableValuePositionEnum } from '@univerjs-pro/engine-pivot';
3
3
  import { IPivotPanelDataInfo, IUnitRangeNameWithSubUnitId } from '@univerjs-pro/sheets-pivot';
4
4
  import { DraggingStyle, NotDraggingStyle } from 'react-beautiful-dnd';
5
5
  import { PivotFilterStatus } from '../../const';
@@ -1,6 +1,6 @@
1
- import { PivotCellStyleTypeEnum } from '@univerjs-pro/engine-pivot';
2
- import { ICommandService, IContextService, ThemeService } from '@univerjs/core';
3
1
  import { IMouseEvent, IPointerEvent, IShapeProps, UniverRenderingContext2D, Shape } from '@univerjs/engine-render';
2
+ import { ICommandService, IContextService, ThemeService } from '@univerjs/core';
3
+ import { PivotCellStyleTypeEnum } from '@univerjs-pro/engine-pivot';
4
4
  export declare const PIVOT_ICON_SIZE = 16;
5
5
  export declare const PIVOT_PADDING_SIZE = 1;
6
6
  export declare const PIVOT_EXPEND_SIZE = 12;