@univerjs-pro/sheets-pivot-ui 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 +33 -1
- 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/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 +63 -15
- 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 +37 -28
- package/lib/locale/en-US.json +0 -100
- package/lib/locale/fa-IR.json +0 -100
- package/lib/locale/ru-RU.json +0 -100
- package/lib/locale/vi-VN.json +0 -100
- package/lib/locale/zh-CN.json +0 -100
- package/lib/locale/zh-TW.json +0 -100
- package/lib/types/commands/commands/add-pivot-field.command.d.ts +0 -3
- package/lib/types/commands/commands/add-pivot-table.command.d.ts +0 -3
- package/lib/types/commands/commands/move-pivot-field.command.d.ts +0 -3
- package/lib/types/commands/commands/pivot-drill-down.command.d.ts +0 -3
- package/lib/types/commands/commands/remove-pivot-field.command.d.ts +0 -3
- package/lib/types/commands/commands/set-pivot-collapse.command.d.ts +0 -3
- package/lib/types/commands/commands/set-pivot-filter.command.d.ts +0 -3
- package/lib/types/commands/commands/set-pivot-sort.command.d.ts +0 -3
- package/lib/types/commands/commands/update-pivot-setting.command.d.ts +0 -3
- package/lib/types/commands/commands/update-pivot-source.command.d.ts +0 -3
- package/lib/types/commands/commands/update-value-position.command.d.ts +0 -3
- package/lib/types/commands/operations/open-pivot-filter-panel.operation.d.ts +0 -3
- package/lib/types/commands/operations/open-pivot-range-panel.operation.d.ts +0 -2
- package/lib/types/commands/operations/open-pivot-setting-dialog.operation.d.ts +0 -3
- package/lib/types/commands/operations/open-pivot-table-panel.operation.d.ts +0 -3
- package/lib/types/const.d.ts +0 -18
- package/lib/types/controllers/config.schema.d.ts +0 -7
- package/lib/types/controllers/menu.schema.d.ts +0 -2
- package/lib/types/controllers/sheets-pivot-clear.controller.d.ts +0 -12
- package/lib/types/controllers/sheets-pivot-confirm.controller.d.ts +0 -19
- package/lib/types/controllers/sheets-pivot-edit.controller.d.ts +0 -13
- package/lib/types/controllers/sheets-pivot-menu.controller.d.ts +0 -9
- package/lib/types/controllers/sheets-pivot-paint-format.controller.d.ts +0 -12
- package/lib/types/controllers/sheets-pivot-panel.controller.d.ts +0 -23
- package/lib/types/controllers/sheets-pivot-permission.controller.d.ts +0 -7
- package/lib/types/controllers/sheets-pivot-print.controller.d.ts +0 -10
- package/lib/types/controllers/sheets-pivot-ref-range.controller.d.ts +0 -22
- package/lib/types/controllers/sheets-pivot-remove-sheet.controller.d.ts +0 -9
- package/lib/types/controllers/sheets-pivot-render.controller.d.ts +0 -21
- package/lib/types/controllers/sheets-pivot-toolbar.controller.d.ts +0 -10
- 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 -101
- package/lib/types/locale/zh-TW.d.ts +0 -3
- package/lib/types/plugin.d.ts +0 -19
- package/lib/types/services/sheets-pivot-ui.service.d.ts +0 -45
- package/lib/types/type.d.ts +0 -100
- package/lib/types/util.d.ts +0 -11
- package/lib/types/views/components/PivotFilterPanel.d.ts +0 -9
- package/lib/types/views/components/PivotNumfmtDialog.d.ts +0 -13
- package/lib/types/views/components/PivotPanel.d.ts +0 -19
- package/lib/types/views/components/PivotPanelArea.d.ts +0 -19
- package/lib/types/views/components/PivotPanelSourceRange.d.ts +0 -10
- package/lib/types/views/components/PivotSourceList.d.ts +0 -18
- package/lib/types/views/components/PivotTableRangeSelector.d.ts +0 -24
- package/lib/types/views/components/SettingDialog.d.ts +0 -14
- package/lib/types/views/components/const.d.ts +0 -24
- package/lib/types/views/components/util.d.ts +0 -87
- package/lib/types/views/menu.d.ts +0 -3
- package/lib/types/views/widgets/drawing.d.ts +0 -8
- package/lib/types/views/widgets/icons.d.ts +0 -5
- package/lib/types/views/widgets/pivot-button.shape.d.ts +0 -35
@@ -1,101 +0,0 @@
|
|
1
|
-
declare const locale: {
|
2
|
-
'sheets-pivot-panel': {
|
3
|
-
title: string;
|
4
|
-
sourceRangeLabel: string;
|
5
|
-
sourceRangePlaceholder: string;
|
6
|
-
sourceFieldTile: string;
|
7
|
-
sourceFieldDescription: string;
|
8
|
-
filter: string;
|
9
|
-
column: string;
|
10
|
-
row: string;
|
11
|
-
value: string;
|
12
|
-
multipleValue: string;
|
13
|
-
filterDesc: string;
|
14
|
-
columnDesc: string;
|
15
|
-
rowDesc: string;
|
16
|
-
valueDesc: string;
|
17
|
-
addToFilter: string;
|
18
|
-
addToColumn: string;
|
19
|
-
addToRow: string;
|
20
|
-
addToValue: string;
|
21
|
-
removeField: string;
|
22
|
-
filterField: string;
|
23
|
-
fieldSettings: string;
|
24
|
-
moveToRow: string;
|
25
|
-
moveToColumn: string;
|
26
|
-
dialog: {
|
27
|
-
fieldName: string;
|
28
|
-
sourceName: string;
|
29
|
-
summarizeBy: string;
|
30
|
-
format: string;
|
31
|
-
ok: string;
|
32
|
-
cancel: string;
|
33
|
-
filter: {
|
34
|
-
ascending: string;
|
35
|
-
descending: string;
|
36
|
-
selectAll: string;
|
37
|
-
clearFilter: string;
|
38
|
-
blank: string;
|
39
|
-
cancel: string;
|
40
|
-
confirm: string;
|
41
|
-
};
|
42
|
-
numfmt: {
|
43
|
-
general: string;
|
44
|
-
accounting: string;
|
45
|
-
currency: string;
|
46
|
-
date: string;
|
47
|
-
thousandthPercentile: string;
|
48
|
-
fieldSetting: string;
|
49
|
-
formatTypes: string;
|
50
|
-
confirm: string;
|
51
|
-
cancel: string;
|
52
|
-
generalDesc: string;
|
53
|
-
accountingDesc: string;
|
54
|
-
currencyDesc: string;
|
55
|
-
dateDesc: string;
|
56
|
-
thousandthPercentileDesc: string;
|
57
|
-
decimalPlaces: string;
|
58
|
-
currencyTypes: string;
|
59
|
-
negativeNumberTypes: string;
|
60
|
-
dateTypes: string;
|
61
|
-
};
|
62
|
-
source: {
|
63
|
-
insertPivotTable: string;
|
64
|
-
sourceData: string;
|
65
|
-
position: string;
|
66
|
-
newSheet: string;
|
67
|
-
existingSheet: string;
|
68
|
-
intersect: string;
|
69
|
-
};
|
70
|
-
};
|
71
|
-
subtotal: {
|
72
|
-
average: string;
|
73
|
-
count: string;
|
74
|
-
countNums: string;
|
75
|
-
max: string;
|
76
|
-
min: string;
|
77
|
-
product: string;
|
78
|
-
stdDev: string;
|
79
|
-
stdDevp: string;
|
80
|
-
sum: string;
|
81
|
-
var: string;
|
82
|
-
varp: string;
|
83
|
-
};
|
84
|
-
subTotalText: string;
|
85
|
-
grandTotalText: string;
|
86
|
-
perform: {
|
87
|
-
info: string;
|
88
|
-
confirm: string;
|
89
|
-
cancel: string;
|
90
|
-
rowColError: string;
|
91
|
-
};
|
92
|
-
msg: {
|
93
|
-
emptySourceRange: string;
|
94
|
-
invalidSize: string;
|
95
|
-
mergeCellError: string;
|
96
|
-
editCellError: string;
|
97
|
-
permissionError: string;
|
98
|
-
};
|
99
|
-
};
|
100
|
-
};
|
101
|
-
export default locale;
|
package/lib/types/plugin.d.ts
DELETED
@@ -1,19 +0,0 @@
|
|
1
|
-
import { IUniverSheetsPivotUIConfig } from './controllers/config.schema';
|
2
|
-
import { ICommandService, IConfigService, Injector, Plugin, UniverInstanceType } from '@univerjs/core';
|
3
|
-
import { IRenderManagerService } from '@univerjs/engine-render';
|
4
|
-
export declare class UniverSheetsPivotTableUIPlugin extends Plugin {
|
5
|
-
private readonly _config;
|
6
|
-
readonly _injector: Injector;
|
7
|
-
private readonly _commandService;
|
8
|
-
private readonly _renderManagerService;
|
9
|
-
private readonly _configService;
|
10
|
-
static pluginName: string;
|
11
|
-
static type: UniverInstanceType;
|
12
|
-
constructor(_config: Partial<IUniverSheetsPivotUIConfig> | undefined, _injector: Injector, _commandService: ICommandService, _renderManagerService: IRenderManagerService, _configService: IConfigService);
|
13
|
-
onStarting(): void;
|
14
|
-
onReady(): void;
|
15
|
-
onRendered(): void;
|
16
|
-
onSteady(): void;
|
17
|
-
private _registerRenderModules;
|
18
|
-
private _initRegisterCommand;
|
19
|
-
}
|
@@ -1,45 +0,0 @@
|
|
1
|
-
import { IMutationInfo, IRange, Disposable, Injector, IUniverInstanceService, LocaleService } from '@univerjs/core';
|
2
|
-
import { ISetRangeValuesMutationParams, SheetInterceptorService } from '@univerjs/sheets';
|
3
|
-
import { PivotView } from '@univerjs-pro/engine-pivot';
|
4
|
-
import { IPivotCellPositionInfo, SheetsPivotTableConfigModel } from '@univerjs-pro/sheets-pivot';
|
5
|
-
import { SheetPermissionInterceptorBaseController } from '@univerjs/sheets-ui';
|
6
|
-
import { IConfirmService } from '@univerjs/ui';
|
7
|
-
export declare class SheetsPivotTableUIService extends Disposable {
|
8
|
-
private readonly _injector;
|
9
|
-
private readonly _sheetInterceptorService;
|
10
|
-
private readonly _confirmService;
|
11
|
-
private readonly _localeService;
|
12
|
-
private readonly _univerInstanceService;
|
13
|
-
private readonly _sheetsPivotTableConfigModel;
|
14
|
-
private readonly _sheetPermissionInterceptorBaseController;
|
15
|
-
constructor(_injector: Injector, _sheetInterceptorService: SheetInterceptorService, _confirmService: IConfirmService, _localeService: LocaleService, _univerInstanceService: IUniverInstanceService, _sheetsPivotTableConfigModel: SheetsPivotTableConfigModel, _sheetPermissionInterceptorBaseController: SheetPermissionInterceptorBaseController);
|
16
|
-
confirmCheckByView(cellInfo: IPivotCellPositionInfo, view: PivotView, isEmpty: boolean): Promise<{
|
17
|
-
perform: boolean;
|
18
|
-
mutations: import('@univerjs/core').IUndoRedoCommandInfosByInterceptor;
|
19
|
-
}>;
|
20
|
-
getEmptyPivotRanges(cellInfo: IPivotCellPositionInfo): {
|
21
|
-
startRow: number;
|
22
|
-
endRow: number;
|
23
|
-
startColumn: number;
|
24
|
-
endColumn: number;
|
25
|
-
}[];
|
26
|
-
getAutoFitColumnsMutations(view: PivotView, cellInfo: IPivotCellPositionInfo): {
|
27
|
-
undos: IMutationInfo<object>[];
|
28
|
-
redos: IMutationInfo<object>[];
|
29
|
-
};
|
30
|
-
getInsertRowColMutations(view: PivotView, cellInfo: IPivotCellPositionInfo, isEmpty: boolean): {
|
31
|
-
undos: IMutationInfo<object>[];
|
32
|
-
redos: IMutationInfo<object>[];
|
33
|
-
};
|
34
|
-
generateSetRangeValueMutations(injector: Injector, unitId: string, subUnitId: string, ranges: IRange[]): {
|
35
|
-
setRangeValueUndoMutation: {
|
36
|
-
id: string;
|
37
|
-
params: ISetRangeValuesMutationParams;
|
38
|
-
};
|
39
|
-
setRangeValueRedoMutation: {
|
40
|
-
id: string;
|
41
|
-
params: ISetRangeValuesMutationParams;
|
42
|
-
};
|
43
|
-
shouldClear: boolean;
|
44
|
-
};
|
45
|
-
}
|
package/lib/types/type.d.ts
DELETED
@@ -1,100 +0,0 @@
|
|
1
|
-
import { IPivotTableFilterInfo, IPivotTableSortInfo, PivotDataFieldDataTypeEnum, PivotSubtotalTypeEnum, PivotTableFiledAreaEnum, PivotTableValuePositionEnum } from '@univerjs-pro/engine-pivot';
|
2
|
-
import { IPivotPanelSourceList, IPivotPanelTableListItemBase, IUnitRangeNameWithSubUnitId } from '@univerjs-pro/sheets-pivot';
|
3
|
-
export interface IOpenPivotTablePanelOperationParams {
|
4
|
-
pivotTableId: string;
|
5
|
-
}
|
6
|
-
export interface IOpenPivotTableFilterPanelOperationParams {
|
7
|
-
row: number;
|
8
|
-
col: number;
|
9
|
-
unitId: string;
|
10
|
-
subUnitId: string;
|
11
|
-
tableFieldId?: string;
|
12
|
-
pivotTableId?: string;
|
13
|
-
}
|
14
|
-
export interface IOpenPivotTableFieldSettingDialogOperationParams {
|
15
|
-
tableFieldId: string;
|
16
|
-
pivotTableId: string;
|
17
|
-
unitId: string;
|
18
|
-
subUnitId: string;
|
19
|
-
tableFieldInfo: IPivotPanelTableListItemBase;
|
20
|
-
dataFieldInfo: IPivotPanelSourceList;
|
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
|
-
export interface IFilterItemInfo {
|
83
|
-
tableFieldId: string;
|
84
|
-
pivotTableId: string;
|
85
|
-
items: string[];
|
86
|
-
itemTypes: PivotDataFieldDataTypeEnum[];
|
87
|
-
format?: string;
|
88
|
-
filterInfo: IPivotTableFilterInfo | undefined;
|
89
|
-
sortInfo: IPivotTableSortInfo | undefined;
|
90
|
-
}
|
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
|
-
}
|
package/lib/types/util.d.ts
DELETED
@@ -1,11 +0,0 @@
|
|
1
|
-
import { LabelViewItem, PivotView, PivotViewItem } from '@univerjs-pro/engine-pivot';
|
2
|
-
export declare function getPivotRowColCount(view: PivotView, startCell: {
|
3
|
-
row: number;
|
4
|
-
col: number;
|
5
|
-
}, isEmpty: boolean): {
|
6
|
-
rowCount: number;
|
7
|
-
colCount: number;
|
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,9 +0,0 @@
|
|
1
|
-
import { default as React } from 'react';
|
2
|
-
import { IFilterItemInfo } from '../../type';
|
3
|
-
interface IPivotFilterPanelProps {
|
4
|
-
unitId: string;
|
5
|
-
subUnitId: string;
|
6
|
-
filterItemInfo: IFilterItemInfo;
|
7
|
-
}
|
8
|
-
export declare function PivotFilterPanel(props: IPivotFilterPanelProps): React.JSX.Element | undefined;
|
9
|
-
export {};
|
@@ -1,13 +0,0 @@
|
|
1
|
-
import { default as React } from 'react';
|
2
|
-
import { IPivotPanelSourceList, IPivotPanelTableListItemBase } from '@univerjs-pro/sheets-pivot';
|
3
|
-
interface IPivotNumfmtPanelProps {
|
4
|
-
unitId: string;
|
5
|
-
subUnitId: string;
|
6
|
-
pivotTableId: string;
|
7
|
-
tableFieldId: string;
|
8
|
-
originPattern?: string;
|
9
|
-
tableFieldInfo: IPivotPanelTableListItemBase;
|
10
|
-
dataFieldInfo: IPivotPanelSourceList;
|
11
|
-
}
|
12
|
-
export declare const PivotNumfmtDialog: ({ unitId, subUnitId, pivotTableId, tableFieldId, originPattern, tableFieldInfo, dataFieldInfo }: IPivotNumfmtPanelProps) => React.JSX.Element;
|
13
|
-
export {};
|
@@ -1,19 +0,0 @@
|
|
1
|
-
import { default as React } from 'react';
|
2
|
-
import { DraggableLocation } from 'react-beautiful-dnd';
|
3
|
-
import { IPivotPanelDataInfo } from '@univerjs-pro/sheets-pivot';
|
4
|
-
import { Nullable } from '@univerjs/core';
|
5
|
-
interface IPivotPanelProps {
|
6
|
-
pivotTableId: string;
|
7
|
-
version: number;
|
8
|
-
setVersion: (version: number) => void;
|
9
|
-
unitId: string;
|
10
|
-
subUnitId: string;
|
11
|
-
panelInfo: IPivotPanelDataInfo;
|
12
|
-
}
|
13
|
-
export type IDraggingInfo = Nullable<{
|
14
|
-
draggingId: string;
|
15
|
-
destination?: Nullable<DraggableLocation>;
|
16
|
-
source?: Nullable<DraggableLocation>;
|
17
|
-
}>;
|
18
|
-
export declare function PivotPanel(props: IPivotPanelProps): React.JSX.Element | null;
|
19
|
-
export {};
|
@@ -1,19 +0,0 @@
|
|
1
|
-
import { default as React } from 'react';
|
2
|
-
import { IPivotPanelDataInfo, IPivotPanelTableListItemBase, IPivotTableConfig } from '@univerjs-pro/sheets-pivot';
|
3
|
-
import { PivotPanelAreaType } from './util';
|
4
|
-
import { IDraggingInfo } from './PivotPanel';
|
5
|
-
interface IPivotFieldAreaItemProps {
|
6
|
-
areaType: PivotPanelAreaType;
|
7
|
-
items: IPivotPanelTableListItemBase[];
|
8
|
-
positionInfo: IPivotTableConfig['targetCellInfo'];
|
9
|
-
pivotTableId: string;
|
10
|
-
pivotTableInfo: IPivotPanelDataInfo;
|
11
|
-
containerOffset: {
|
12
|
-
top: number;
|
13
|
-
left: number;
|
14
|
-
};
|
15
|
-
refreshHandler: () => void;
|
16
|
-
draggingInfo: IDraggingInfo;
|
17
|
-
}
|
18
|
-
export declare function PivotFieldAreaItem(props: IPivotFieldAreaItemProps): React.JSX.Element;
|
19
|
-
export {};
|
@@ -1,10 +0,0 @@
|
|
1
|
-
import { IPivotTableConfig, IUnitRangeNameWithSubUnitId } from '@univerjs-pro/sheets-pivot';
|
2
|
-
import { default as React } from 'react';
|
3
|
-
interface IPivotSourceRangeProps {
|
4
|
-
sourceRangeInfo: IUnitRangeNameWithSubUnitId;
|
5
|
-
pivotTableId: string;
|
6
|
-
refreshHandler: () => void;
|
7
|
-
positionInfo: IPivotTableConfig['targetCellInfo'];
|
8
|
-
}
|
9
|
-
export declare function PivotSourceRange(props: IPivotSourceRangeProps): React.JSX.Element;
|
10
|
-
export {};
|
@@ -1,18 +0,0 @@
|
|
1
|
-
import { default as React } from 'react';
|
2
|
-
import { IPivotPanelDataInfo, IPivotPanelSourceList } from '@univerjs-pro/sheets-pivot';
|
3
|
-
interface IPivotSourceListProps {
|
4
|
-
sourceList: IPivotPanelSourceList[];
|
5
|
-
refreshHandler: () => void;
|
6
|
-
pivotTableId: string;
|
7
|
-
pivotTableInfo: IPivotPanelDataInfo;
|
8
|
-
unitId: string;
|
9
|
-
subUnitId: string;
|
10
|
-
sourceRef: React.RefObject<HTMLDivElement>;
|
11
|
-
draggingId: string;
|
12
|
-
containerOffset: {
|
13
|
-
top: number;
|
14
|
-
left: number;
|
15
|
-
};
|
16
|
-
}
|
17
|
-
export declare function PivotSourceList(props: IPivotSourceListProps): React.JSX.Element;
|
18
|
-
export {};
|
@@ -1,24 +0,0 @@
|
|
1
|
-
import { IRange } from '@univerjs/core';
|
2
|
-
import { PositionType } from '@univerjs-pro/sheets-pivot';
|
3
|
-
import { default as React } from 'react';
|
4
|
-
export interface IPivotTableRangeSelectorReturns {
|
5
|
-
sourceRange: IRange;
|
6
|
-
sourceSheetName: string;
|
7
|
-
positionRange?: IRange;
|
8
|
-
positionSheetName?: string;
|
9
|
-
positionType: PositionType;
|
10
|
-
}
|
11
|
-
export interface IPivotTableRangeSelectorProps {
|
12
|
-
unitId: string;
|
13
|
-
subUnitId: string;
|
14
|
-
sourceRange: IRange;
|
15
|
-
sourceSheetName: string;
|
16
|
-
positionRange: IRange | null;
|
17
|
-
positionSheetName: string;
|
18
|
-
onConfirm: (info: IPivotTableRangeSelectorReturns) => void;
|
19
|
-
onCancel: () => void;
|
20
|
-
}
|
21
|
-
export declare function PivotTableRangeSelector(props: IPivotTableRangeSelectorProps): React.JSX.Element;
|
22
|
-
export declare namespace PivotTableRangeSelector {
|
23
|
-
var componentKey: string;
|
24
|
-
}
|
@@ -1,14 +0,0 @@
|
|
1
|
-
import { IPivotPanelSourceList, IPivotPanelTableListItemBase } from '@univerjs-pro/sheets-pivot';
|
2
|
-
interface IPivotFilterPanelProps {
|
3
|
-
pivotTableId: string;
|
4
|
-
tableFieldId: string;
|
5
|
-
unitId: string;
|
6
|
-
subUnitId: string;
|
7
|
-
closeFn: () => void;
|
8
|
-
format?: string;
|
9
|
-
tableFieldInfo: IPivotPanelTableListItemBase;
|
10
|
-
dataFieldInfo: IPivotPanelSourceList;
|
11
|
-
version: number;
|
12
|
-
}
|
13
|
-
export declare function PivotSettingDialog(props: IPivotFilterPanelProps): JSX.Element | undefined;
|
14
|
-
export {};
|
@@ -1,24 +0,0 @@
|
|
1
|
-
export declare const DateFormatList: {
|
2
|
-
label: string;
|
3
|
-
suffix: string;
|
4
|
-
}[];
|
5
|
-
export declare const ThousandsSeparatorFormatList: ({
|
6
|
-
label: string;
|
7
|
-
suffix: string;
|
8
|
-
color?: undefined;
|
9
|
-
} | {
|
10
|
-
label: string;
|
11
|
-
suffix: string;
|
12
|
-
color: string;
|
13
|
-
})[];
|
14
|
-
export declare const CurrencyFormatList: ({
|
15
|
-
label: (suffix: string) => string;
|
16
|
-
suffix: (suffix: string) => string;
|
17
|
-
color?: undefined;
|
18
|
-
} | {
|
19
|
-
label: (suffix: string) => string;
|
20
|
-
suffix: (suffix: string) => string;
|
21
|
-
color: string;
|
22
|
-
})[];
|
23
|
-
export declare const currencySymbols: string[];
|
24
|
-
export declare const SHEET_PIVOT_PANEL_SOURCE_RANGE = "sheet.pivot-panel-source-range";
|
@@ -1,87 +0,0 @@
|
|
1
|
-
import { IPivotTableFilterInfo, PivotSubtotalTypeEnum, PivotTableFiledAreaEnum, PivotTableValuePositionEnum } from '@univerjs-pro/engine-pivot';
|
2
|
-
import { ICommandService, IRange, Nullable, Worksheet } from '@univerjs/core';
|
3
|
-
import { IPivotPanelDataInfo, IUnitRangeNameWithSubUnitId } from '@univerjs-pro/sheets-pivot';
|
4
|
-
import { DraggingStyle, NotDraggingStyle } from 'react-beautiful-dnd';
|
5
|
-
import { PivotFilterStatus } from '../../const';
|
6
|
-
export declare const PivotDropId = "PivotDropId";
|
7
|
-
export declare const PivotMultipleValueId = "PivotMultipleValueId";
|
8
|
-
interface IExecuteRemoveCommandCtx {
|
9
|
-
pivotTableId: string;
|
10
|
-
unitId: string;
|
11
|
-
subUnitId: string;
|
12
|
-
commandService: ICommandService;
|
13
|
-
}
|
14
|
-
export declare enum PivotPanelAreaType {
|
15
|
-
Filter = "filter",
|
16
|
-
Row = "row",
|
17
|
-
Column = "column",
|
18
|
-
Value = "value",
|
19
|
-
Source = "source"
|
20
|
-
}
|
21
|
-
export declare function getDraggedStyle(isDragging: boolean): React.CSSProperties;
|
22
|
-
interface IPivotPanelDragCtx {
|
23
|
-
pivotTableInfo: IPivotPanelDataInfo;
|
24
|
-
pivotTableId: string;
|
25
|
-
commandService: ICommandService;
|
26
|
-
unitId: string;
|
27
|
-
subUnitId: string;
|
28
|
-
}
|
29
|
-
export declare enum PivotSourceRangeErrorEnum {
|
30
|
-
EmptyRange = 0,
|
31
|
-
InvalidSize = 1,
|
32
|
-
Valid = 2
|
33
|
-
}
|
34
|
-
/**
|
35
|
-
* - check if the range is valid for pivot source
|
36
|
-
* @param {Worksheet} sheet - the sheet to check
|
37
|
-
* @param {IRange} range -the range to check
|
38
|
-
* @returns {boolean} - if the range is valid for pivot source
|
39
|
-
*/
|
40
|
-
export declare function isValidPivotSourceRange(sheet: Worksheet, range: IRange): PivotSourceRangeErrorEnum;
|
41
|
-
export declare function handlerDropItemOut(ctx: IPivotPanelDragCtx, dragId: string, from: PivotPanelAreaType): Promise<void>;
|
42
|
-
export declare function handleUpdateSourceRange(commandService: ICommandService, pivotTableId: string, dataRangeInfo: IUnitRangeNameWithSubUnitId, unitId: string, subUnitId: string): Promise<void>;
|
43
|
-
export declare function handlerDragEnd(ctx: IPivotPanelDragCtx, dragId: string, from: PivotPanelAreaType, to: PivotPanelAreaType, index: number): Promise<void>;
|
44
|
-
export declare function executeRemoveCommand(ctx: IExecuteRemoveCommandCtx, fieldIds: string[]): Promise<void>;
|
45
|
-
export declare function executeUpdateValuePositionCommand(ctx: IExecuteRemoveCommandCtx, position: PivotTableValuePositionEnum, index: number): Promise<void>;
|
46
|
-
export declare function openFilterDialog(commandService: ICommandService, unitId: string, subUnitId: string, pivotTableId: string, tableFieldId: string): void;
|
47
|
-
export declare function openFieldSettingDialog(commandService: ICommandService, pivotTableId: string, tableFieldId: string, unitId: string, subUnitId: string, pivotTableInfo: IPivotPanelDataInfo): void;
|
48
|
-
interface ISummarizeListItem {
|
49
|
-
type: PivotSubtotalTypeEnum;
|
50
|
-
textKey: string;
|
51
|
-
}
|
52
|
-
export declare const SummarizeByList: ISummarizeListItem[];
|
53
|
-
export declare const getDecimalFromPattern: (pattern: string, defaultValue?: number) => number;
|
54
|
-
/**
|
55
|
-
* Determines whether two pattern are equal, excluding differences in decimal places
|
56
|
-
*/
|
57
|
-
export declare const isPatternEqualWithoutDecimal: (patternA: string, patternB: string) => boolean;
|
58
|
-
export declare const getDecimalString: (length: number) => string;
|
59
|
-
export declare const setPatternDecimal: (patterns: string, decimalLength: number) => string;
|
60
|
-
export declare const isPatternHasDecimal: (pattern: string) => boolean;
|
61
|
-
export declare const getCurrencyType: (pattern: string) => string | undefined;
|
62
|
-
export declare const isGeneralPanel: (pattern: string) => boolean;
|
63
|
-
export declare const isAccountingPanel: (pattern: string) => boolean;
|
64
|
-
export declare const isCurrencyPanel: (pattern: string) => boolean;
|
65
|
-
export declare const getDateFormatOptions: () => {
|
66
|
-
label: string;
|
67
|
-
value: string;
|
68
|
-
}[];
|
69
|
-
export declare const isDatePanel: (pattern: string) => boolean;
|
70
|
-
export declare const getNumberFormatOptions: () => {
|
71
|
-
label: string;
|
72
|
-
value: string;
|
73
|
-
color: string | undefined;
|
74
|
-
}[];
|
75
|
-
export declare const isThousandthPercentilePanel: (pattern: string) => boolean;
|
76
|
-
export declare const getAreaFieldCount: (pivotTableInfo: IPivotPanelDataInfo, area: PivotTableFiledAreaEnum) => number;
|
77
|
-
export declare const isPrefixName: (baseName: string, name: string, textInfo: Record<string, string>) => boolean;
|
78
|
-
export declare const getPrefixName: (baseName: string, textInfo: Record<string, string>, subtotalType: PivotSubtotalTypeEnum) => string;
|
79
|
-
export declare function getPivotFilterStatus(filterInfo: Nullable<IPivotTableFilterInfo>, additionalParams: {
|
80
|
-
items?: string[];
|
81
|
-
}): PivotFilterStatus;
|
82
|
-
export declare const getDraggingCorrectedStyle: (isDragging: boolean, style: DraggingStyle | NotDraggingStyle | undefined, containerOffset: {
|
83
|
-
top: number;
|
84
|
-
left: number;
|
85
|
-
}) => React.CSSProperties | null;
|
86
|
-
export declare const getNotDraggedStyle: (draggableId: string, currentId: string) => React.CSSProperties | null;
|
87
|
-
export {};
|
@@ -1,8 +0,0 @@
|
|
1
|
-
import { UniverRenderingContext2D } from '@univerjs/engine-render';
|
2
|
-
export declare const PIVOT_BUTTON_EMPTY: Path2D;
|
3
|
-
export declare class PivotButton {
|
4
|
-
static drawNoSetting(ctx: UniverRenderingContext2D, size: number, fgColor: string, bgColor: string): void;
|
5
|
-
static drawExpand(ctx: UniverRenderingContext2D, size: number, fgColor: string, bgColor: string, cellHeight: number): void;
|
6
|
-
static drawCollapse(ctx: UniverRenderingContext2D, size: number, fgColor: string, bgColor: string, cellHeight: number): void;
|
7
|
-
static drawIconByPath(ctx: UniverRenderingContext2D, pathData: string[], fgColor: string, bgColor: string): void;
|
8
|
-
}
|
@@ -1,35 +0,0 @@
|
|
1
|
-
import { PivotCellStyleTypeEnum } from '@univerjs-pro/engine-pivot';
|
2
|
-
import { ICommandService, IContextService, ThemeService } from '@univerjs/core';
|
3
|
-
import { IMouseEvent, IPointerEvent, IShapeProps, UniverRenderingContext2D, Shape } from '@univerjs/engine-render';
|
4
|
-
export declare const PIVOT_ICON_SIZE = 16;
|
5
|
-
export declare const PIVOT_PADDING_SIZE = 1;
|
6
|
-
export declare const PIVOT_EXPEND_SIZE = 12;
|
7
|
-
export declare const PIVOT_EXPAND_LEFT_PADDING = 4;
|
8
|
-
export declare const FILTER_BUTTON_TYPE_SET: Set<PivotCellStyleTypeEnum>;
|
9
|
-
export declare const COLLAPSE_BUTTON_TYPE_SET: Set<PivotCellStyleTypeEnum>;
|
10
|
-
export interface ISheetsPivotTableButtonShapeProps extends IShapeProps {
|
11
|
-
cellWidth: number;
|
12
|
-
cellHeight: number;
|
13
|
-
pivotParams: {
|
14
|
-
col: number;
|
15
|
-
row: number;
|
16
|
-
unitId: string;
|
17
|
-
subUnitId: string;
|
18
|
-
buttonType: PivotCellStyleTypeEnum;
|
19
|
-
};
|
20
|
-
}
|
21
|
-
export declare class SheetsPivotTableButtonShape extends Shape<ISheetsPivotTableButtonShapeProps> {
|
22
|
-
private readonly _contextService;
|
23
|
-
private readonly _commandService;
|
24
|
-
private readonly _themeService;
|
25
|
-
private _cellWidth;
|
26
|
-
private _cellHeight;
|
27
|
-
private _hovered;
|
28
|
-
private _pivotParams?;
|
29
|
-
constructor(key: string, props: ISheetsPivotTableButtonShapeProps, _contextService: IContextService, _commandService: ICommandService, _themeService: ThemeService);
|
30
|
-
setShapeProps(props: Partial<ISheetsPivotTableButtonShapeProps>): void;
|
31
|
-
onPointerDown(evt: IPointerEvent | IMouseEvent): void;
|
32
|
-
onPointerEnter(): void;
|
33
|
-
onPointerLeave(): void;
|
34
|
-
protected _draw(ctx: UniverRenderingContext2D): void;
|
35
|
-
}
|