@univerjs-pro/sheets-pivot-ui 0.2.7 → 0.2.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/cjs/index.js +1 -1
- package/lib/es/index.js +1 -1
- package/lib/locale/en-US.json +8 -0
- package/lib/locale/ru-RU.json +8 -0
- package/lib/locale/vi-VN.json +8 -0
- package/lib/locale/zh-CN.json +8 -0
- package/lib/locale/zh-TW.json +8 -0
- package/lib/types/commands/commands/add-pivot-field.command.d.ts +0 -1
- package/lib/types/commands/commands/add-pivot-table.command.d.ts +0 -1
- package/lib/types/commands/commands/move-pivot-field.command.d.ts +0 -1
- package/lib/types/commands/commands/remove-pivot-field.command.d.ts +0 -1
- package/lib/types/commands/commands/set-pivot-collapse.command.d.ts +0 -1
- package/lib/types/commands/commands/set-pivot-filter.command.d.ts +0 -1
- package/lib/types/commands/commands/set-pivot-sort.command.d.ts +0 -1
- package/lib/types/commands/commands/update-pivot-setting.command.d.ts +0 -1
- package/lib/types/commands/commands/update-pivot-source.command.d.ts +0 -1
- package/lib/types/commands/commands/update-value-position.command.d.ts +0 -1
- package/lib/types/commands/operations/open-pivot-filter-panel.operation.d.ts +0 -1
- package/lib/types/commands/operations/open-pivot-range-panel.operation.d.ts +0 -1
- package/lib/types/commands/operations/open-pivot-setting-dialog.operation.d.ts +0 -1
- package/lib/types/commands/operations/open-pivot-table-panel.operation.d.ts +0 -1
- package/lib/types/const.d.ts +4 -0
- package/lib/types/controllers/sheets-pivot-clear.controller.d.ts +0 -1
- package/lib/types/controllers/sheets-pivot-confirm.controller.d.ts +0 -1
- package/lib/types/controllers/sheets-pivot-edit.controller.d.ts +0 -1
- package/lib/types/controllers/sheets-pivot-menu.controller.d.ts +0 -1
- package/lib/types/controllers/sheets-pivot-panel.controller.d.ts +0 -1
- package/lib/types/controllers/sheets-pivot-ref-range.controller.d.ts +0 -1
- package/lib/types/controllers/sheets-pivot-remove-sheet.controller.d.ts +0 -1
- package/lib/types/controllers/sheets-pivot-render.controller.d.ts +3 -6
- package/lib/types/controllers/sheets-pivot-table-menu.controller.d.ts +0 -1
- package/lib/types/locale/en-US.d.ts +0 -1
- package/lib/types/locale/ru-RU.d.ts +0 -1
- package/lib/types/locale/vi-VN.d.ts +0 -1
- package/lib/types/locale/zh-CN.d.ts +8 -0
- package/lib/types/locale/zh-TW.d.ts +0 -1
- package/lib/types/plugin.d.ts +1 -2
- package/lib/types/services/sheets-pivot-ui.service.d.ts +1 -2
- package/lib/types/type.d.ts +2 -3
- package/lib/types/util.d.ts +1 -2
- package/lib/types/views/components/PivotFilterPanel.d.ts +0 -1
- package/lib/types/views/components/PivotNumfmtDialog.d.ts +0 -1
- package/lib/types/views/components/PivotPanel.d.ts +0 -1
- package/lib/types/views/components/PivotPanelArea.d.ts +0 -1
- package/lib/types/views/components/PivotPanelSourceRange.d.ts +0 -1
- package/lib/types/views/components/PivotSourceList.d.ts +0 -1
- package/lib/types/views/components/PivotTableRangeSelector.d.ts +0 -1
- package/lib/types/views/components/SettingDialog.d.ts +0 -1
- package/lib/types/views/components/util.d.ts +6 -3
- package/lib/types/views/menu.d.ts +0 -1
- package/lib/types/views/widgets/drawing.d.ts +0 -1
- package/lib/types/views/widgets/pivot-button.shape.d.ts +2 -2
- package/lib/umd/index.js +1 -1
- package/package.json +21 -22
package/lib/locale/en-US.json
CHANGED
@@ -58,6 +58,14 @@
|
|
58
58
|
"currencyTypes": "Currency Types",
|
59
59
|
"negativeNumberTypes": "Negative Number Types",
|
60
60
|
"dateTypes": "Date Types"
|
61
|
+
},
|
62
|
+
"source": {
|
63
|
+
"insertPivotTable": "Insert Pivot Table",
|
64
|
+
"sourceData": "Data Source Range",
|
65
|
+
"position": "Pivot Table Placement",
|
66
|
+
"newSheet": "New Sheet",
|
67
|
+
"existingSheet": "Existing Sheet",
|
68
|
+
"intersect": "Cannot overlap with source data"
|
61
69
|
}
|
62
70
|
},
|
63
71
|
"subtotal": {
|
package/lib/locale/ru-RU.json
CHANGED
@@ -58,6 +58,14 @@
|
|
58
58
|
"currencyTypes": "Типы валют",
|
59
59
|
"negativeNumberTypes": "Типы отрицательных чисел",
|
60
60
|
"dateTypes": "Типы дат"
|
61
|
+
},
|
62
|
+
"source": {
|
63
|
+
"insertPivotTable": "Вставить сводную таблицу",
|
64
|
+
"sourceData": "Диапазон источника данных",
|
65
|
+
"position": "Расположение сводной таблицы",
|
66
|
+
"newSheet": "Новый лист",
|
67
|
+
"existingSheet": "Существующий лист",
|
68
|
+
"intersect": "Не может перекрываться с исходными данными"
|
61
69
|
}
|
62
70
|
},
|
63
71
|
"subtotal": {
|
package/lib/locale/vi-VN.json
CHANGED
@@ -58,6 +58,14 @@
|
|
58
58
|
"currencyTypes": "Loại tiền tệ",
|
59
59
|
"negativeNumberTypes": "Loại số âm",
|
60
60
|
"dateTypes": "Loại ngày"
|
61
|
+
},
|
62
|
+
"source": {
|
63
|
+
"insertPivotTable": "Chèn Bảng Pivot",
|
64
|
+
"sourceData": "Phạm vi nguồn dữ liệu",
|
65
|
+
"position": "Vị trí đặt Bảng Pivot",
|
66
|
+
"newSheet": "Bảng mới",
|
67
|
+
"existingSheet": "Bảng hiện có",
|
68
|
+
"intersect": "Không thể chồng lên dữ liệu nguồn"
|
61
69
|
}
|
62
70
|
},
|
63
71
|
"subtotal": {
|
package/lib/locale/zh-CN.json
CHANGED
@@ -58,6 +58,14 @@
|
|
58
58
|
"currencyTypes": "货币类型",
|
59
59
|
"negativeNumberTypes": "负数类型",
|
60
60
|
"dateTypes": "日期类型"
|
61
|
+
},
|
62
|
+
"source": {
|
63
|
+
"insertPivotTable": "插入数据透视表",
|
64
|
+
"sourceData": "数据源范围",
|
65
|
+
"position": "透视表放置位置",
|
66
|
+
"newSheet": "新工作表",
|
67
|
+
"existingSheet": "现有工作表",
|
68
|
+
"intersect": "不能和源数据重叠"
|
61
69
|
}
|
62
70
|
},
|
63
71
|
"subtotal": {
|
package/lib/locale/zh-TW.json
CHANGED
@@ -58,6 +58,14 @@
|
|
58
58
|
"currencyTypes": "貨幣類型",
|
59
59
|
"negativeNumberTypes": "負數類型",
|
60
60
|
"dateTypes": "日期類型"
|
61
|
+
},
|
62
|
+
"source": {
|
63
|
+
"insertPivotTable": "插入數據透視表",
|
64
|
+
"sourceData": "數據源範圍",
|
65
|
+
"position": "透視表放置位置",
|
66
|
+
"newSheet": "新工作表",
|
67
|
+
"existingSheet": "現有工作表",
|
68
|
+
"intersect": "不能和源數據重疊"
|
61
69
|
}
|
62
70
|
},
|
63
71
|
"subtotal": {
|
package/lib/types/const.d.ts
CHANGED
@@ -11,3 +11,7 @@ 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
13
|
export declare const SHEET_PIVOT_AUTO_FIT_COLUMN_TEST_COUNT = 100;
|
14
|
+
export declare enum PivotFilterStatus {
|
15
|
+
HasFilter = "HasFilter",
|
16
|
+
NotFilter = "NotFilter"
|
17
|
+
}
|
@@ -1,7 +1,6 @@
|
|
1
1
|
import { SheetsPivotTableConfigModel } from '@univerjs-pro/sheets-pivot';
|
2
2
|
import { Disposable, DisposableCollection, IUniverInstanceService } from '@univerjs/core';
|
3
3
|
import { SheetInterceptorService, SheetsSelectionsService } from '@univerjs/sheets';
|
4
|
-
|
5
4
|
export declare class SheetsPivotClearController extends Disposable {
|
6
5
|
private readonly _univerInstanceService;
|
7
6
|
private readonly _sheetInterceptorService;
|
@@ -3,7 +3,6 @@ import { Disposable, Injector, IUniverInstanceService, LocaleService } from '@un
|
|
3
3
|
import { SheetInterceptorService } from '@univerjs/sheets';
|
4
4
|
import { IConfirmService, IMessageService } from '@univerjs/ui';
|
5
5
|
import { SheetsPivotTableUIService } from '../services/sheets-pivot-ui.service';
|
6
|
-
|
7
6
|
export declare class SheetsPivotConfirmController extends Disposable {
|
8
7
|
private readonly _injector;
|
9
8
|
private readonly _univerInstanceService;
|
@@ -2,7 +2,6 @@ import { SheetsPivotTableAdaptorModel, SheetsPivotTableConfigModel } from '@univ
|
|
2
2
|
import { Disposable, ICommandService, IUniverInstanceService } from '@univerjs/core';
|
3
3
|
import { SheetsSelectionsService } from '@univerjs/sheets';
|
4
4
|
import { IRangeSelectorService, ISidebarService } from '@univerjs/ui';
|
5
|
-
|
6
5
|
export declare class SheetsPivotTableEditController extends Disposable {
|
7
6
|
private readonly _sheetsSelectionsService;
|
8
7
|
private readonly _univerInstanceService;
|
@@ -1,7 +1,6 @@
|
|
1
1
|
import { SheetsPivotTableConfigModel } from '@univerjs-pro/sheets-pivot';
|
2
2
|
import { Disposable, IUniverInstanceService } from '@univerjs/core';
|
3
3
|
import { MergeCellController } from '@univerjs/sheets';
|
4
|
-
|
5
4
|
export declare class SheetsPivotMenuController extends Disposable {
|
6
5
|
private _mergeCellController;
|
7
6
|
private _univerInstanceService;
|
@@ -2,7 +2,6 @@ import { SheetsPivotTableAdaptorModel } from '@univerjs-pro/sheets-pivot';
|
|
2
2
|
import { Disposable, ICommandService, IUniverInstanceService } from '@univerjs/core';
|
3
3
|
import { SheetsSelectionsService } from '@univerjs/sheets';
|
4
4
|
import { IRangeSelectorService, ISidebarService } from '@univerjs/ui';
|
5
|
-
|
6
5
|
export declare class SheetsPivotTablePanelController extends Disposable {
|
7
6
|
private readonly _sheetsSelectionsService;
|
8
7
|
private readonly _univerInstanceService;
|
@@ -2,7 +2,6 @@ import { SheetsPivotTableAdaptorModel, SheetsPivotTableConfigModel } from '@univ
|
|
2
2
|
import { IMutationInfo, Disposable, DisposableCollection, ICommandService, Injector, IUniverInstanceService } from '@univerjs/core';
|
3
3
|
import { IMoveRangeCommandParams, RefRangeService, SheetInterceptorService } from '@univerjs/sheets';
|
4
4
|
import { SheetsPivotTableUIService } from '../services/sheets-pivot-ui.service';
|
5
|
-
|
6
5
|
export declare class SheetsPivotRefRangeController extends Disposable {
|
7
6
|
private readonly _injector;
|
8
7
|
private readonly _sheetsPivotTableUIService;
|
@@ -1,7 +1,6 @@
|
|
1
1
|
import { SheetsPivotTableConfigModel } from '@univerjs-pro/sheets-pivot';
|
2
2
|
import { Disposable } from '@univerjs/core';
|
3
3
|
import { SheetInterceptorService } from '@univerjs/sheets';
|
4
|
-
|
5
4
|
export declare class SheetsPivotRemoveSheetController extends Disposable {
|
6
5
|
private readonly _sheetInterceptorService;
|
7
6
|
private readonly _sheetsPivotTableConfigModel;
|
@@ -1,20 +1,17 @@
|
|
1
|
-
import { Disposable, Injector
|
2
|
-
import { IRenderContext, IRenderModule
|
1
|
+
import { Workbook, Disposable, Injector } from '@univerjs/core';
|
2
|
+
import { IRenderContext, IRenderModule } from '@univerjs/engine-render';
|
3
3
|
import { SheetSkeletonManagerService } from '@univerjs/sheets-ui';
|
4
4
|
import { SheetsPivotTableAdaptorModel, SheetsPivotTableConfigModel } from '@univerjs-pro/sheets-pivot';
|
5
5
|
import { ComponentManager } from '@univerjs/ui';
|
6
|
-
|
7
6
|
export declare class SheetsPivotRenderController extends Disposable implements IRenderModule {
|
8
7
|
private readonly _context;
|
9
8
|
private readonly _injector;
|
10
9
|
private readonly _sheetsPivotTableAdaptorModel;
|
11
10
|
private _sheetSkeletonManagerService;
|
12
|
-
private readonly _renderManagerService;
|
13
11
|
private _componentManager;
|
14
|
-
private readonly _univerInstanceService;
|
15
12
|
private readonly _sheetsPivotTableConfigModel;
|
16
13
|
private _pivotButtonShapesArr;
|
17
|
-
constructor(_context: IRenderContext
|
14
|
+
constructor(_context: IRenderContext<Workbook>, _injector: Injector, _sheetsPivotTableAdaptorModel: SheetsPivotTableAdaptorModel, _sheetSkeletonManagerService: SheetSkeletonManagerService, _componentManager: ComponentManager, _sheetsPivotTableConfigModel: SheetsPivotTableConfigModel);
|
18
15
|
private _initButtonRender;
|
19
16
|
private _initSkeleton;
|
20
17
|
private _initComponents;
|
@@ -1,7 +1,6 @@
|
|
1
1
|
import { Disposable, Injector } from '@univerjs/core';
|
2
2
|
import { ComponentManager, IMenuService } from '@univerjs/ui';
|
3
3
|
import { IUniverSheetsPivotTableUIConfig } from '../plugin';
|
4
|
-
|
5
4
|
export declare class SheetsPivotTableMenuController extends Disposable {
|
6
5
|
private readonly _config;
|
7
6
|
private readonly _injector;
|
@@ -59,6 +59,14 @@ declare const locale: {
|
|
59
59
|
negativeNumberTypes: string;
|
60
60
|
dateTypes: string;
|
61
61
|
};
|
62
|
+
source: {
|
63
|
+
insertPivotTable: string;
|
64
|
+
sourceData: string;
|
65
|
+
position: string;
|
66
|
+
newSheet: string;
|
67
|
+
existingSheet: string;
|
68
|
+
intersect: string;
|
69
|
+
};
|
62
70
|
};
|
63
71
|
subtotal: {
|
64
72
|
average: string;
|
package/lib/types/plugin.d.ts
CHANGED
@@ -1,7 +1,6 @@
|
|
1
1
|
import { ICommandService, Injector, Plugin, UniverInstanceType } from '@univerjs/core';
|
2
2
|
import { IRenderManagerService } from '@univerjs/engine-render';
|
3
3
|
import { MenuConfig } from '@univerjs/ui';
|
4
|
-
|
5
4
|
export interface IUniverSheetsPivotTableUIConfig {
|
6
5
|
menu: MenuConfig;
|
7
6
|
}
|
@@ -13,7 +12,7 @@ export declare class UniverSheetsPivotTableUIPlugin extends Plugin {
|
|
13
12
|
static pluginName: string;
|
14
13
|
static type: UniverInstanceType;
|
15
14
|
constructor(_config: Partial<IUniverSheetsPivotTableUIConfig>, _injector: Injector, _commandService: ICommandService, _renderManagerService: IRenderManagerService);
|
16
|
-
onStarting(
|
15
|
+
onStarting(): void;
|
17
16
|
onReady(): void;
|
18
17
|
private _registerRenderModules;
|
19
18
|
private _initRegisterCommand;
|
@@ -1,9 +1,8 @@
|
|
1
|
-
import { PivotView } from '@univerjs-pro/pivot
|
1
|
+
import { PivotView } from '@univerjs-pro/engine-pivot';
|
2
2
|
import { IPivotCellPositionInfo, SheetsPivotTableConfigModel } from '@univerjs-pro/sheets-pivot';
|
3
3
|
import { IMutationInfo, IRange, Disposable, Injector, IUniverInstanceService, LocaleService } from '@univerjs/core';
|
4
4
|
import { ISetRangeValuesMutationParams, SheetInterceptorService } from '@univerjs/sheets';
|
5
5
|
import { IConfirmService } from '@univerjs/ui';
|
6
|
-
|
7
6
|
export declare class SheetsPivotTableUIService extends Disposable {
|
8
7
|
private readonly _injector;
|
9
8
|
private readonly _sheetInterceptorService;
|
package/lib/types/type.d.ts
CHANGED
@@ -1,6 +1,5 @@
|
|
1
|
-
import { IPivotTableFilterInfo, IPivotTableSortInfo, PivotDataFieldDataTypeEnum, PivotSubtotalTypeEnum, PivotTableFiledAreaEnum, PivotTableValuePositionEnum } from '@univerjs-pro/pivot
|
1
|
+
import { IPivotTableFilterInfo, IPivotTableSortInfo, PivotDataFieldDataTypeEnum, PivotSubtotalTypeEnum, PivotTableFiledAreaEnum, PivotTableValuePositionEnum } from '@univerjs-pro/engine-pivot';
|
2
2
|
import { IPivotPanelSourceList, IPivotPanelTableListItemBase, IUnitRangeNameWithSubUnitId } from '@univerjs-pro/sheets-pivot';
|
3
|
-
|
4
3
|
export interface IOpenPivotTablePanelOperationParams {
|
5
4
|
pivotTableId: string;
|
6
5
|
}
|
@@ -24,7 +23,7 @@ export interface IAddPivotFieldCommandParams {
|
|
24
23
|
unitId: string;
|
25
24
|
subUnitId: string;
|
26
25
|
pivotTableId: string;
|
27
|
-
|
26
|
+
dataFieldId: string;
|
28
27
|
fieldArea: PivotTableFiledAreaEnum;
|
29
28
|
index: number;
|
30
29
|
}
|
package/lib/types/util.d.ts
CHANGED
@@ -1,5 +1,4 @@
|
|
1
|
-
import { LabelViewItem, PivotView, PivotViewItem } from '@univerjs-pro/pivot
|
2
|
-
|
1
|
+
import { LabelViewItem, PivotView, PivotViewItem } from '@univerjs-pro/engine-pivot';
|
3
2
|
export declare function getPivotRowColCount(view: PivotView, startCell: {
|
4
3
|
row: number;
|
5
4
|
col: number;
|
@@ -1,7 +1,6 @@
|
|
1
1
|
import { default as React } from 'react';
|
2
2
|
import { IPivotPanelDataInfo, IPivotPanelTableListItemBase, IPivotTableConfig } from '@univerjs-pro/sheets-pivot';
|
3
3
|
import { PivotPanelAreaType } from './util';
|
4
|
-
|
5
4
|
interface IPivotFieldAreaItemProps {
|
6
5
|
areaType: PivotPanelAreaType;
|
7
6
|
items: IPivotPanelTableListItemBase[];
|
@@ -1,7 +1,7 @@
|
|
1
|
-
import { PivotSubtotalTypeEnum, PivotTableFiledAreaEnum, PivotTableValuePositionEnum } from '@univerjs-pro/pivot
|
2
|
-
import { ICommandService, IRange, Worksheet } from '@univerjs/core';
|
1
|
+
import { IPivotTableFilterInfo, PivotSubtotalTypeEnum, PivotTableFiledAreaEnum, PivotTableValuePositionEnum } from '@univerjs-pro/engine-pivot';
|
2
|
+
import { ICommandService, IRange, Nullable, Worksheet } from '@univerjs/core';
|
3
3
|
import { IPivotPanelDataInfo, IUnitRangeNameWithSubUnitId } from '@univerjs-pro/sheets-pivot';
|
4
|
-
|
4
|
+
import { PivotFilterStatus } from '../../const';
|
5
5
|
export declare const PivotDropId = "PivotDropId";
|
6
6
|
export declare const PivotMultipleValueId = "PivotMultipleValueId";
|
7
7
|
interface IExecuteRemoveCommandCtx {
|
@@ -75,4 +75,7 @@ export declare const isThousandthPercentilePanel: (pattern: string) => boolean;
|
|
75
75
|
export declare const getAreaFieldCount: (pivotTableInfo: IPivotPanelDataInfo, area: PivotTableFiledAreaEnum) => number;
|
76
76
|
export declare const isPrefixName: (baseName: string, name: string, textInfo: Record<string, string>) => boolean;
|
77
77
|
export declare const getPrefixName: (baseName: string, textInfo: Record<string, string>, subtotalType: PivotSubtotalTypeEnum) => string;
|
78
|
+
export declare function getPivotFilterStatus(filterInfo: Nullable<IPivotTableFilterInfo>, additionalParams: {
|
79
|
+
items?: string[];
|
80
|
+
}): PivotFilterStatus;
|
78
81
|
export {};
|
@@ -1,12 +1,12 @@
|
|
1
|
-
import { PivotCellStyleTypeEnum } from '@univerjs-pro/pivot
|
1
|
+
import { PivotCellStyleTypeEnum } from '@univerjs-pro/engine-pivot';
|
2
2
|
import { ICommandService, IContextService, ThemeService } from '@univerjs/core';
|
3
3
|
import { IMouseEvent, IPointerEvent, IShapeProps, UniverRenderingContext2D, Shape } from '@univerjs/engine-render';
|
4
|
-
|
5
4
|
export declare const PIVOT_ICON_SIZE = 16;
|
6
5
|
export declare const PIVOT_PADDING_SIZE = 1;
|
7
6
|
export declare const PIVOT_EXPEND_SIZE = 12;
|
8
7
|
export declare const PIVOT_EXPAND_LEFT_PADDING = 4;
|
9
8
|
export declare const FILTER_BUTTON_TYPE_SET: Set<PivotCellStyleTypeEnum>;
|
9
|
+
export declare const COLLAPSE_BUTTON_TYPE_SET: Set<PivotCellStyleTypeEnum>;
|
10
10
|
export interface ISheetsPivotTableButtonShapeProps extends IShapeProps {
|
11
11
|
cellWidth: number;
|
12
12
|
cellHeight: number;
|