@univerjs-pro/sheets-chart-ui 1.3.1 → 1.5.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 +9 -7
- package/lib/cjs/index.js +1 -1
- package/lib/cjs/locale/ar-SA.js +1 -1
- package/lib/cjs/locale/ca-ES.js +1 -1
- package/lib/cjs/locale/de-DE.js +1 -1
- package/lib/cjs/locale/en-US.js +1 -1
- package/lib/cjs/locale/es-ES.js +1 -1
- package/lib/cjs/locale/fa-IR.js +1 -1
- package/lib/cjs/locale/fr-FR.js +1 -1
- package/lib/cjs/locale/id-ID.js +1 -1
- package/lib/cjs/locale/it-IT.js +1 -1
- package/lib/cjs/locale/ja-JP.js +1 -1
- package/lib/cjs/locale/ko-KR.js +1 -1
- package/lib/cjs/locale/pl-PL.js +1 -1
- package/lib/cjs/locale/pt-BR.js +1 -1
- package/lib/cjs/locale/ru-RU.js +1 -1
- package/lib/cjs/locale/sk-SK.js +1 -1
- package/lib/cjs/locale/vi-VN.js +1 -1
- package/lib/cjs/locale/zh-CN.js +1 -1
- package/lib/cjs/locale/zh-HK.js +1 -1
- package/lib/cjs/locale/zh-TW.js +1 -1
- package/lib/es/index.js +1 -1
- package/lib/es/locale/ar-SA.js +1 -1
- package/lib/es/locale/ca-ES.js +1 -1
- package/lib/es/locale/de-DE.js +1 -1
- package/lib/es/locale/en-US.js +1 -1
- package/lib/es/locale/es-ES.js +1 -1
- package/lib/es/locale/fa-IR.js +1 -1
- package/lib/es/locale/fr-FR.js +1 -1
- package/lib/es/locale/id-ID.js +1 -1
- package/lib/es/locale/it-IT.js +1 -1
- package/lib/es/locale/ja-JP.js +1 -1
- package/lib/es/locale/ko-KR.js +1 -1
- package/lib/es/locale/pl-PL.js +1 -1
- package/lib/es/locale/pt-BR.js +1 -1
- package/lib/es/locale/ru-RU.js +1 -1
- package/lib/es/locale/sk-SK.js +1 -1
- package/lib/es/locale/vi-VN.js +1 -1
- package/lib/es/locale/zh-CN.js +1 -1
- package/lib/es/locale/zh-HK.js +1 -1
- package/lib/es/locale/zh-TW.js +1 -1
- package/lib/index.css +33 -0
- package/lib/index.js +1 -1
- package/lib/locale/ar-SA.js +1 -1
- package/lib/locale/ca-ES.js +1 -1
- package/lib/locale/de-DE.js +1 -1
- package/lib/locale/en-US.js +1 -1
- package/lib/locale/es-ES.js +1 -1
- package/lib/locale/fa-IR.js +1 -1
- package/lib/locale/fr-FR.js +1 -1
- package/lib/locale/id-ID.js +1 -1
- package/lib/locale/it-IT.js +1 -1
- package/lib/locale/ja-JP.js +1 -1
- package/lib/locale/ko-KR.js +1 -1
- package/lib/locale/pl-PL.js +1 -1
- package/lib/locale/pt-BR.js +1 -1
- package/lib/locale/ru-RU.js +1 -1
- package/lib/locale/sk-SK.js +1 -1
- package/lib/locale/vi-VN.js +1 -1
- package/lib/locale/zh-CN.js +1 -1
- package/lib/locale/zh-HK.js +1 -1
- package/lib/locale/zh-TW.js +1 -1
- package/lib/types/commands/commands/sheet-chart-menu.command.d.ts +3 -1
- package/lib/types/commands/operations/open-move-chart-dialog.operation.d.ts +4 -0
- package/lib/types/controllers/chart-render.controller.d.ts +4 -1
- package/lib/types/controllers/chart-sheet-ui.controller.d.ts +31 -0
- package/lib/types/controllers/sheets-chart-clipboard.controller.d.ts +11 -3
- package/lib/types/controllers/ui.controller.d.ts +3 -0
- package/lib/types/locale/en-US.d.ts +22 -0
- package/lib/types/menu/chart-sheet-menu.d.ts +6 -0
- package/lib/types/menu/chart-sheet-schema.d.ts +3 -0
- package/lib/types/services/chart-image-rect.d.ts +2 -1
- package/lib/types/services/chart-render.service.d.ts +26 -7
- package/lib/types/services/chart-sheet-presentation.d.ts +9 -0
- package/lib/types/services/chart-sheet-render.service.d.ts +39 -0
- package/lib/types/services/sheet-chart-host.d.ts +2 -1
- package/lib/types/services/sheet-image-chart-host.d.ts +4 -9
- package/lib/types/services/sheets-chart-host-provider.service.d.ts +11 -5
- package/lib/types/services/sheets-chart-ui.service.d.ts +13 -3
- package/lib/types/views/chart-edit-panel/chart-editor-default-values.d.ts +8 -8
- package/lib/types/views/move-chart/MoveChartDialog.d.ts +6 -0
- package/lib/umd/index.js +1 -1
- package/lib/umd/locale/ar-SA.js +1 -1
- package/lib/umd/locale/ca-ES.js +1 -1
- package/lib/umd/locale/de-DE.js +1 -1
- package/lib/umd/locale/en-US.js +1 -1
- package/lib/umd/locale/es-ES.js +1 -1
- package/lib/umd/locale/fa-IR.js +1 -1
- package/lib/umd/locale/fr-FR.js +1 -1
- package/lib/umd/locale/id-ID.js +1 -1
- package/lib/umd/locale/it-IT.js +1 -1
- package/lib/umd/locale/ja-JP.js +1 -1
- package/lib/umd/locale/ko-KR.js +1 -1
- package/lib/umd/locale/pl-PL.js +1 -1
- package/lib/umd/locale/pt-BR.js +1 -1
- package/lib/umd/locale/ru-RU.js +1 -1
- package/lib/umd/locale/sk-SK.js +1 -1
- package/lib/umd/locale/vi-VN.js +1 -1
- package/lib/umd/locale/zh-CN.js +1 -1
- package/lib/umd/locale/zh-HK.js +1 -1
- package/lib/umd/locale/zh-TW.js +1 -1
- package/package.json +29 -24
- package/lib/types/controllers/chart-sheet-change.controller.d.ts +0 -13
- package/lib/types/controllers/chart-sheet-copy-plan.d.ts +0 -16
|
@@ -27,6 +27,7 @@ export declare class SheetsChartUIController extends Disposable {
|
|
|
27
27
|
private _sidebarDisposable;
|
|
28
28
|
private readonly _isChartElementEditEnabled;
|
|
29
29
|
constructor(_drawingManagerService: IDrawingManagerService, _univerInstanceService: IUniverInstanceService, _chartModelService: ChartModelService, _sheetsChartService: SheetsChartService, _chartRenderService: ChartRenderService, _sheetDrawingHitTestService: SheetDrawingHitTestService, _sidebarService: ISidebarService, _menuManagerService: IMenuManagerService, _sheetCanvasFloatDomManagerService: SheetCanvasFloatDomManagerService, _sheetCanvasPopManagerService: SheetCanvasPopManagerService, _commandService: ICommandService, _sheetsChartUIService: ISheetsChartUIService, _contextService: IContextService, _localeService: LocaleService, configService: IConfigService);
|
|
30
|
+
dispose(): void;
|
|
30
31
|
private _openPanel;
|
|
31
32
|
hidePanel(): void;
|
|
32
33
|
initPanel(): void;
|
|
@@ -40,6 +41,7 @@ export declare class SheetsChartUIController extends Disposable {
|
|
|
40
41
|
private _shouldEnableChartElementEdit;
|
|
41
42
|
getChartPopupMenus(unitId: string, subUnitId: string, drawingId: string, drawingType: DrawingTypeEnum): ({
|
|
42
43
|
label: string;
|
|
44
|
+
icon: string;
|
|
43
45
|
index: number;
|
|
44
46
|
commandId: string;
|
|
45
47
|
commandParams: {
|
|
@@ -50,6 +52,7 @@ export declare class SheetsChartUIController extends Disposable {
|
|
|
50
52
|
disable: boolean;
|
|
51
53
|
} | {
|
|
52
54
|
label: string;
|
|
55
|
+
icon: string;
|
|
53
56
|
index: number;
|
|
54
57
|
commandId: string;
|
|
55
58
|
commandParams: {
|
|
@@ -1,5 +1,25 @@
|
|
|
1
1
|
declare const locale: {
|
|
2
2
|
'sheets-chart-ui': {
|
|
3
|
+
chartSheet: {
|
|
4
|
+
defaultName: string;
|
|
5
|
+
changeType: string;
|
|
6
|
+
move: {
|
|
7
|
+
confirmAction: string;
|
|
8
|
+
confirmTitle: string;
|
|
9
|
+
confirmDescription: string;
|
|
10
|
+
title: string;
|
|
11
|
+
newSheet: string;
|
|
12
|
+
objectIn: string;
|
|
13
|
+
name: string;
|
|
14
|
+
target: string;
|
|
15
|
+
cancel: string;
|
|
16
|
+
confirm: string;
|
|
17
|
+
invalidName: string;
|
|
18
|
+
unavailable: string;
|
|
19
|
+
ownChartObjects: string;
|
|
20
|
+
failed: string;
|
|
21
|
+
};
|
|
22
|
+
};
|
|
3
23
|
permission: {
|
|
4
24
|
editErr: string;
|
|
5
25
|
};
|
|
@@ -48,6 +68,8 @@ declare const locale: {
|
|
|
48
68
|
areaStacked3D: string;
|
|
49
69
|
areaPercentStacked3D: string;
|
|
50
70
|
line: string;
|
|
71
|
+
lineStacked: string;
|
|
72
|
+
linePercentStacked: string;
|
|
51
73
|
column: string;
|
|
52
74
|
columnStacked: string;
|
|
53
75
|
columnPercentStacked: string;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { IAccessor } from '@univerjs/core';
|
|
2
|
+
import type { IMenuButtonItem, IMenuSelectorItem } from '@univerjs/ui';
|
|
3
|
+
import type { LocaleKey } from '../locale/types';
|
|
4
|
+
export declare const CHANGE_CHART_TYPE_MENU_ID = "sheet.menu.change-chart-type";
|
|
5
|
+
export declare function ChangeChartTypeMenuItemFactory(accessor: IAccessor): IMenuSelectorItem;
|
|
6
|
+
export declare function MoveChartMenuItemFactory(accessor: IAccessor): IMenuButtonItem<LocaleKey>;
|
|
@@ -5,11 +5,12 @@ export declare class ChartImageRect extends Rect {
|
|
|
5
5
|
private readonly _getImage;
|
|
6
6
|
private readonly _shouldSuppressRender;
|
|
7
7
|
private readonly _disposeImage;
|
|
8
|
+
private readonly _shouldRenderLicenseWatermark;
|
|
8
9
|
private _urlImage;
|
|
9
10
|
private _url;
|
|
10
11
|
private _requestedUrl;
|
|
11
12
|
private _pendingUrlImage;
|
|
12
|
-
constructor(key: string, config: IRectProps, _getImage: () => ChartImageSource | undefined, _shouldSuppressRender?: () => boolean, _disposeImage?: () => void);
|
|
13
|
+
constructor(key: string, config: IRectProps, _getImage: () => ChartImageSource | undefined, _shouldSuppressRender?: () => boolean, _disposeImage?: () => void, _shouldRenderLicenseWatermark?: () => boolean);
|
|
13
14
|
dispose(): void;
|
|
14
15
|
render(mainCtx: UniverRenderingContext, bounds?: IViewportInfo): this;
|
|
15
16
|
protected _draw(ctx: UniverRenderingContext, _bounds?: IViewportInfo, renderWidth?: number, renderHeight?: number): void;
|
|
@@ -3,11 +3,12 @@ import type { ChartDirection, ChartElementEventHandler, ChartElementEventType, C
|
|
|
3
3
|
import type { IDisposable } from '@univerjs/core';
|
|
4
4
|
import type { Scene } from '@univerjs/engine-render';
|
|
5
5
|
import { ChartThemeService, IChartRenderModelManagerService } from '@univerjs-pro/engine-chart';
|
|
6
|
-
import { ChartModelService } from '@univerjs-pro/sheets-chart';
|
|
7
|
-
import { Disposable, IConfigService, Injector, IUniverInstanceService, LocaleService, ThemeService } from '@univerjs/core';
|
|
6
|
+
import { ChartModelService, SheetsChartService } from '@univerjs-pro/sheets-chart';
|
|
7
|
+
import { Disposable, ICommandService, IConfigService, ILogService, Injector, IUniverInstanceService, LifecycleService, LocaleService, ThemeService } from '@univerjs/core';
|
|
8
8
|
import { IDrawingManagerService } from '@univerjs/drawing';
|
|
9
9
|
import { IRenderManagerService } from '@univerjs/engine-render';
|
|
10
10
|
import { SheetCanvasFloatDomManagerService } from '@univerjs/sheets-drawing-ui';
|
|
11
|
+
import type { IChartSheetPresentation } from './chart-sheet-presentation';
|
|
11
12
|
import { ChartSnapshotStoreService } from './chart-snapshot-store.service';
|
|
12
13
|
import { IChartHostProviderService } from './sheets-chart-host-provider.service';
|
|
13
14
|
interface IRuntimeChartModel {
|
|
@@ -24,9 +25,13 @@ export declare class ChartRenderService extends Disposable {
|
|
|
24
25
|
private _chartHostProvider;
|
|
25
26
|
private readonly _sheetCanvasFloatDomManagerService;
|
|
26
27
|
private readonly _chartModelService;
|
|
28
|
+
private readonly _sheetsChartService;
|
|
29
|
+
private readonly _commandService;
|
|
30
|
+
private readonly _logService;
|
|
27
31
|
private readonly _drawingManagerService;
|
|
28
32
|
private _univerInstanceService;
|
|
29
33
|
private _renderManagerService;
|
|
34
|
+
private readonly _lifecycleService;
|
|
30
35
|
private readonly _localeService;
|
|
31
36
|
protected readonly _injector: Injector;
|
|
32
37
|
private readonly _chartThemeService;
|
|
@@ -42,15 +47,21 @@ export declare class ChartRenderService extends Disposable {
|
|
|
42
47
|
private _debounceHandleMap;
|
|
43
48
|
private readonly _chartChangeSubscriptions;
|
|
44
49
|
private readonly _chartRenderMode;
|
|
45
|
-
private readonly _addWatermark;
|
|
46
50
|
private readonly _lastRenderInputMap;
|
|
47
51
|
private readonly _dataUpdateAnimationChartIds;
|
|
48
52
|
private readonly _dataUpdateAnimationTimers;
|
|
53
|
+
private readonly _resourceBindings;
|
|
54
|
+
private _chartSheetPresentation;
|
|
55
|
+
private _chartSheetRegistration;
|
|
56
|
+
private _primaryDomComposition;
|
|
57
|
+
private _reconcileQueued;
|
|
49
58
|
private _activeChartId;
|
|
50
59
|
private _lastActiveSheet;
|
|
51
|
-
constructor(_chartHostProvider: IChartHostProviderService, _sheetCanvasFloatDomManagerService: SheetCanvasFloatDomManagerService, _chartModelService: ChartModelService, _drawingManagerService: IDrawingManagerService, _univerInstanceService: IUniverInstanceService, _renderManagerService: IRenderManagerService, _localeService: LocaleService, _injector: Injector, _chartThemeService: ChartThemeService, _themeService: ThemeService, _configService: IConfigService, _chartSnapshotStoreService: ChartSnapshotStoreService, _renderModelManager: IChartRenderModelManagerService);
|
|
60
|
+
constructor(_chartHostProvider: IChartHostProviderService, _sheetCanvasFloatDomManagerService: SheetCanvasFloatDomManagerService, _chartModelService: ChartModelService, _sheetsChartService: SheetsChartService, _commandService: ICommandService, _logService: ILogService, _drawingManagerService: IDrawingManagerService, _univerInstanceService: IUniverInstanceService, _renderManagerService: IRenderManagerService, _lifecycleService: LifecycleService, _localeService: LocaleService, _injector: Injector, _chartThemeService: ChartThemeService, _themeService: ThemeService, _configService: IConfigService, _chartSnapshotStoreService: ChartSnapshotStoreService, _renderModelManager: IChartRenderModelManagerService);
|
|
61
|
+
get chartSheetPresentationEnabled(): boolean;
|
|
62
|
+
registerChartSheetPresentation(presentation: IChartSheetPresentation): IDisposable;
|
|
52
63
|
getChartSnapshotImage(id: string): ChartImageSource | undefined;
|
|
53
|
-
private
|
|
64
|
+
private _getChartRenderMode;
|
|
54
65
|
private _getChartSnapshotKey;
|
|
55
66
|
private _registerChartImageRenderObjectFactory;
|
|
56
67
|
private _initActiveChartModelListener;
|
|
@@ -60,7 +71,6 @@ export declare class ChartRenderService extends Disposable {
|
|
|
60
71
|
private _disposeChartDomInstance;
|
|
61
72
|
private _disposeChartRenderInstance;
|
|
62
73
|
private _notifyChartRemoved;
|
|
63
|
-
private _notifySheetChartsDetached;
|
|
64
74
|
private _getChartRenderObject;
|
|
65
75
|
private _getChartRenderObjectContext;
|
|
66
76
|
private _setChartRuntimeZIndex;
|
|
@@ -72,6 +82,15 @@ export declare class ChartRenderService extends Disposable {
|
|
|
72
82
|
}): void;
|
|
73
83
|
private _debounceHandle;
|
|
74
84
|
handleActiveSubUnitChange(): void;
|
|
85
|
+
private _queueResourceReconciliation;
|
|
86
|
+
private _reconcileChartResources;
|
|
87
|
+
private _bindChartResources;
|
|
88
|
+
private _renderBoundChart;
|
|
89
|
+
private _detachChartResources;
|
|
90
|
+
private _getPrimaryChartModel;
|
|
91
|
+
private _isPrimaryChart;
|
|
92
|
+
private _clearPageFrame;
|
|
93
|
+
private _updateChartPage;
|
|
75
94
|
setElementEditMode(chartId: string, enabled: boolean): void;
|
|
76
95
|
exportImage(chartId: string, options?: IChartImageExportOptions): Promise<string | undefined>;
|
|
77
96
|
on(chartId: string, type: ChartElementEventType, handler: ChartElementEventHandler): IDisposable;
|
|
@@ -83,7 +102,7 @@ export declare class ChartRenderService extends Disposable {
|
|
|
83
102
|
createRuntimeChartStyle(chartModel: IRuntimeChartModel, direction: ChartDirection): ChartRuntimeStyle;
|
|
84
103
|
checkChartCanRender(id: string): boolean;
|
|
85
104
|
private _getChartRenderSkipReason;
|
|
86
|
-
render(id: string, config: IChartConfig,
|
|
105
|
+
render(id: string, config: IChartConfig, inputStyle: ChartRuntimeStyle, options?: ISheetChartRenderOptions): Promise<void>;
|
|
87
106
|
private _cacheActiveDomChartSnapshot;
|
|
88
107
|
private _prepareDataUpdateRender;
|
|
89
108
|
private _canAnimateDataUpdate;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { ChartModel } from '@univerjs-pro/engine-chart';
|
|
2
|
+
import type { IRender } from '@univerjs/engine-render';
|
|
3
|
+
import type { SheetCanvasFloatDomManagerService } from '@univerjs/sheets-drawing-ui';
|
|
4
|
+
export interface IChartSheetPresentation {
|
|
5
|
+
getPrimaryChartModel(unitId: string, subUnitId: string): ChartModel | undefined;
|
|
6
|
+
updatePage(): void;
|
|
7
|
+
clearPage(): void;
|
|
8
|
+
fitPrimaryChart(model: ChartModel, render: IRender, info: NonNullable<ReturnType<SheetCanvasFloatDomManagerService['getFloatDomInfo']>>): void;
|
|
9
|
+
}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import type { ChartModel } from '@univerjs-pro/engine-chart';
|
|
2
|
+
import type { IRender } from '@univerjs/engine-render';
|
|
3
|
+
import type { IChartSheetPresentation } from './chart-sheet-presentation';
|
|
4
|
+
import { ChartThemeService } from '@univerjs-pro/engine-chart';
|
|
5
|
+
import { ChartSheetService } from '@univerjs-pro/sheets-chart';
|
|
6
|
+
import { Disposable, ICommandService, ILogService, IUniverInstanceService, LifecycleService, ThemeService } from '@univerjs/core';
|
|
7
|
+
import { IDrawingManagerService } from '@univerjs/drawing';
|
|
8
|
+
import { IRenderManagerService } from '@univerjs/engine-render';
|
|
9
|
+
import { SheetCanvasFloatDomManagerService } from '@univerjs/sheets-drawing-ui';
|
|
10
|
+
import { ChartRenderService } from './chart-render.service';
|
|
11
|
+
export declare class ChartSheetRenderService extends Disposable implements IChartSheetPresentation {
|
|
12
|
+
private readonly _chartSheetService;
|
|
13
|
+
private readonly _sheetCanvasFloatDomManagerService;
|
|
14
|
+
private readonly _commandService;
|
|
15
|
+
private readonly _logService;
|
|
16
|
+
private readonly _univerInstanceService;
|
|
17
|
+
private readonly _renderManagerService;
|
|
18
|
+
private readonly _drawingManagerService;
|
|
19
|
+
private readonly _themeService;
|
|
20
|
+
private readonly _chartThemeService;
|
|
21
|
+
private _pageFrame;
|
|
22
|
+
private _pageFrameRender;
|
|
23
|
+
private _pageCanvasBackground;
|
|
24
|
+
private _pageViewportOrigin;
|
|
25
|
+
private _updatingChartPage;
|
|
26
|
+
private _applyingFit;
|
|
27
|
+
private _fitReady;
|
|
28
|
+
private readonly _drawingTransformSubscriptions;
|
|
29
|
+
constructor(renderer: ChartRenderService, _chartSheetService: ChartSheetService, _sheetCanvasFloatDomManagerService: SheetCanvasFloatDomManagerService, _commandService: ICommandService, _logService: ILogService, _univerInstanceService: IUniverInstanceService, _renderManagerService: IRenderManagerService, _drawingManagerService: IDrawingManagerService, _themeService: ThemeService, _chartThemeService: ChartThemeService, lifecycle: LifecycleService);
|
|
30
|
+
getPrimaryChartModel(unitId: string, subUnitId: string): ChartModel | undefined;
|
|
31
|
+
private _getPrimaryBinding;
|
|
32
|
+
private _attachDrawingTransformConstraint;
|
|
33
|
+
clearPage(): void;
|
|
34
|
+
updatePage(): void;
|
|
35
|
+
private _getSheetType;
|
|
36
|
+
private _updateChartPagePresentation;
|
|
37
|
+
fitPrimaryChart(model: ChartModel, render: IRender, info: NonNullable<ReturnType<SheetCanvasFloatDomManagerService['getFloatDomInfo']>>): void;
|
|
38
|
+
dispose(): void;
|
|
39
|
+
}
|
|
@@ -25,6 +25,7 @@ export declare class SheetChartHost extends Disposable implements IDomChartHost
|
|
|
25
25
|
private readonly _markReady;
|
|
26
26
|
private readonly _markNotReady;
|
|
27
27
|
private readonly _bindPointerEvents;
|
|
28
|
+
private readonly _getDrawingLayerRank;
|
|
28
29
|
readonly mode = ChartRenderMode.Dom;
|
|
29
30
|
private _domFrame;
|
|
30
31
|
private _managed;
|
|
@@ -35,7 +36,7 @@ export declare class SheetChartHost extends Disposable implements IDomChartHost
|
|
|
35
36
|
private _savedWrapperStyle;
|
|
36
37
|
private _dataUpdateAnimationDuration;
|
|
37
38
|
private _pointerEvents;
|
|
38
|
-
constructor(chartId: string, _getFloatDomInfo: () => ReturnType<SheetCanvasFloatDomManagerService['getFloatDomInfo']>, _getPlacement: () => ISheetChartHostPlacement | null, _setHostStyle: (style: IChartHostStyle) => void, _isProviderDisposed: () => boolean, _markReady: () => void, _markNotReady: () => void, _bindPointerEvents: (root: HTMLElement) => IDisposable);
|
|
39
|
+
constructor(chartId: string, _getFloatDomInfo: () => ReturnType<SheetCanvasFloatDomManagerService['getFloatDomInfo']>, _getPlacement: () => ISheetChartHostPlacement | null, _setHostStyle: (style: IChartHostStyle) => void, _isProviderDisposed: () => boolean, _markReady: () => void, _markNotReady: () => void, _bindPointerEvents: (root: HTMLElement) => IDisposable, _getDrawingLayerRank: () => number | undefined);
|
|
39
40
|
isManaged(): boolean;
|
|
40
41
|
markUnmanaged(): void;
|
|
41
42
|
getRect(): IChartHostRect | null;
|
|
@@ -1,19 +1,15 @@
|
|
|
1
1
|
import type { ChartImageSource, IChartHostRect, IChartHostStyle } from '@univerjs-pro/engine-chart';
|
|
2
|
-
import type { IChartOuterRect } from './chart-content-layout';
|
|
3
|
-
import type { ChartSnapshotStoreService } from './chart-snapshot-store.service';
|
|
4
2
|
import { ImageChartHost } from '@univerjs-pro/engine-chart';
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
subUnitId: string;
|
|
8
|
-
chartId: string;
|
|
9
|
-
}
|
|
3
|
+
import type { IChartOuterRect } from './chart-content-layout';
|
|
4
|
+
import type { ChartSnapshotStoreService, IChartSnapshotKey } from './chart-snapshot-store.service';
|
|
10
5
|
export declare class SheetImageChartHost extends ImageChartHost {
|
|
11
6
|
private readonly _getOuterRect;
|
|
12
7
|
private readonly _setHostStyle;
|
|
13
8
|
private readonly _snapshotKey;
|
|
14
9
|
private readonly _snapshotStore;
|
|
15
10
|
private readonly _requestPaint;
|
|
16
|
-
|
|
11
|
+
private readonly _isCurrent;
|
|
12
|
+
constructor(chartId: string, _getOuterRect: () => IChartOuterRect | null, _setHostStyle: (style: IChartHostStyle) => void, _snapshotKey: IChartSnapshotKey, _snapshotStore: ChartSnapshotStoreService, _requestPaint: () => void, _isCurrent: () => boolean);
|
|
17
13
|
getRect(): IChartHostRect | null;
|
|
18
14
|
setStyle(style: IChartHostStyle): void;
|
|
19
15
|
nextVersion(): number;
|
|
@@ -21,4 +17,3 @@ export declare class SheetImageChartHost extends ImageChartHost {
|
|
|
21
17
|
requestPaint(): void;
|
|
22
18
|
invalidateSnapshot(): void;
|
|
23
19
|
}
|
|
24
|
-
export {};
|
|
@@ -1,12 +1,14 @@
|
|
|
1
1
|
import type { IDomChartHost, IImageChartHost } from '@univerjs-pro/engine-chart';
|
|
2
2
|
import type { Observable } from 'rxjs';
|
|
3
|
-
import type { IChartOuterRect } from './chart-content-layout';
|
|
4
|
-
import type { IChartHostHandle } from './sheet-chart-host';
|
|
5
3
|
import { ChartRenderMode } from '@univerjs-pro/engine-chart';
|
|
6
|
-
import {
|
|
4
|
+
import { ChartModelService } from '@univerjs-pro/sheets-chart';
|
|
5
|
+
import { Disposable, IUniverInstanceService } from '@univerjs/core';
|
|
7
6
|
import { IRenderManagerService } from '@univerjs/engine-render';
|
|
7
|
+
import { ISheetDrawingService } from '@univerjs/sheets-drawing';
|
|
8
8
|
import { SheetCanvasFloatDomManagerService } from '@univerjs/sheets-drawing-ui';
|
|
9
9
|
import { CanvasFloatDomService } from '@univerjs/ui';
|
|
10
|
+
import type { IChartOuterRect } from './chart-content-layout';
|
|
11
|
+
import type { IChartHostHandle } from './sheet-chart-host';
|
|
10
12
|
import { ChartSnapshotStoreService } from './chart-snapshot-store.service';
|
|
11
13
|
export interface IChartHostProviderService {
|
|
12
14
|
ensureHost(chartId: string, mode: 'image'): Promise<IImageChartHost | null>;
|
|
@@ -34,11 +36,14 @@ export declare class SheetsChartHostProviderService extends Disposable implement
|
|
|
34
36
|
private _renderManagerService;
|
|
35
37
|
private readonly _chartSnapshotStoreService;
|
|
36
38
|
private readonly _canvasFloatDomService;
|
|
39
|
+
private readonly _chartModelService;
|
|
40
|
+
private readonly _instanceService;
|
|
41
|
+
private readonly _sheetDrawingService;
|
|
37
42
|
private _chartHostMap;
|
|
38
43
|
private _activeDomReadyChartIds;
|
|
39
44
|
private _removeHost$;
|
|
40
45
|
readonly removeHost$: Observable<string>;
|
|
41
|
-
constructor(_sheetCanvasFloatDomManagerService: SheetCanvasFloatDomManagerService, _renderManagerService: IRenderManagerService, _chartSnapshotStoreService: ChartSnapshotStoreService, _canvasFloatDomService: CanvasFloatDomService);
|
|
46
|
+
constructor(_sheetCanvasFloatDomManagerService: SheetCanvasFloatDomManagerService, _renderManagerService: IRenderManagerService, _chartSnapshotStoreService: ChartSnapshotStoreService, _canvasFloatDomService: CanvasFloatDomService, _chartModelService: ChartModelService, _instanceService: IUniverInstanceService, _sheetDrawingService: ISheetDrawingService);
|
|
42
47
|
private _getSceneAndTransformerByDrawingSearch;
|
|
43
48
|
setBorder(id: string, color: string): void;
|
|
44
49
|
setHostStyle(id: string, style: Record<string, any>): void;
|
|
@@ -57,6 +62,7 @@ export declare class SheetsChartHostProviderService extends Disposable implement
|
|
|
57
62
|
invalidateSnapshot(id: string): void;
|
|
58
63
|
private _createImageChartHost;
|
|
59
64
|
private _getOrCreateSheetChartHost;
|
|
65
|
+
private _createHostLivenessCheck;
|
|
60
66
|
private _bindChartPointerEvents;
|
|
61
67
|
private _markHostReady;
|
|
62
68
|
private _alignFloatDomPositionWithSceneRender;
|
|
@@ -66,4 +72,4 @@ export declare class SheetsChartHostProviderService extends Disposable implement
|
|
|
66
72
|
private _getHostPlacement;
|
|
67
73
|
dispose(): void;
|
|
68
74
|
}
|
|
69
|
-
export declare const IChartHostProviderService: import("@
|
|
75
|
+
export declare const IChartHostProviderService: import("@univerjs/core").IdentifierDecorator<IChartHostProviderService>;
|
|
@@ -1,24 +1,28 @@
|
|
|
1
1
|
import type { IChartEditPanelRoute, IChartPanelRouteState } from '@univerjs-pro/chart-ui';
|
|
2
2
|
import type { ChartModel } from '@univerjs-pro/engine-chart';
|
|
3
3
|
import type { IChartSourceMultiRangeItem, IChartUpdateConfigCommandParams, ISheetChartSourceSingleRange } from '@univerjs-pro/sheets-chart';
|
|
4
|
+
import type { IUnitRangeName } from '@univerjs/core';
|
|
4
5
|
import { ChartUIService, ChartViewStateRegistry } from '@univerjs-pro/chart-ui';
|
|
5
6
|
import { DataOrientation } from '@univerjs-pro/engine-chart';
|
|
6
7
|
import { ChartModelService, SheetsChartService } from '@univerjs-pro/sheets-chart';
|
|
7
|
-
import { ICommandService, IUniverInstanceService } from '@univerjs/core';
|
|
8
|
+
import { ICommandService, Injector, IUniverInstanceService } from '@univerjs/core';
|
|
9
|
+
import { SheetPermissionCheckController } from '@univerjs/sheets';
|
|
8
10
|
type SheetsChartUpdateConfigParams = Omit<IChartUpdateConfigCommandParams, 'unitId'>;
|
|
9
11
|
export type ISheetsChartUIService = SheetsChartUIService;
|
|
10
|
-
export declare const ISheetsChartUIService: import("@
|
|
12
|
+
export declare const ISheetsChartUIService: import("@univerjs/core").IdentifierDecorator<SheetsChartUIService>;
|
|
11
13
|
export declare class SheetsChartUIService extends ChartUIService<ChartModel, SheetsChartUpdateConfigParams> {
|
|
12
14
|
private readonly _chartModelService;
|
|
13
15
|
private readonly _sheetsChartService;
|
|
14
16
|
private readonly _commandService;
|
|
15
17
|
private readonly _univerInstanceService;
|
|
18
|
+
private readonly _injector;
|
|
19
|
+
private readonly _permissionCheck;
|
|
16
20
|
private _rangeSelectMode;
|
|
17
21
|
private readonly _chartEditorOpen$;
|
|
18
22
|
private readonly _panelRoute$;
|
|
19
23
|
readonly chartEditorOpen$: import("rxjs").Observable<boolean>;
|
|
20
24
|
readonly panelRoute$: import("rxjs").Observable<IChartPanelRouteState | null>;
|
|
21
|
-
constructor(_chartModelService: ChartModelService, _sheetsChartService: SheetsChartService, _commandService: ICommandService, _univerInstanceService: IUniverInstanceService, viewStates: ChartViewStateRegistry);
|
|
25
|
+
constructor(_chartModelService: ChartModelService, _sheetsChartService: SheetsChartService, _commandService: ICommandService, _univerInstanceService: IUniverInstanceService, _injector: Injector, _permissionCheck: SheetPermissionCheckController, viewStates: ChartViewStateRegistry);
|
|
22
26
|
get activeRuntimeModel(): ChartModel | null;
|
|
23
27
|
get chartEditorOpen(): boolean;
|
|
24
28
|
get rangeSelectMode(): boolean;
|
|
@@ -27,10 +31,16 @@ export declare class SheetsChartUIService extends ChartUIService<ChartModel, She
|
|
|
27
31
|
isElementEditModeActive(chartId: string): boolean;
|
|
28
32
|
setPanelRoute(chartId: string, route: IChartEditPanelRoute | null): void;
|
|
29
33
|
clearPanelRoute(): void;
|
|
34
|
+
getChartHost(chartId: string): {
|
|
35
|
+
unitId: string;
|
|
36
|
+
subUnitId: string;
|
|
37
|
+
} | null;
|
|
30
38
|
setDataRange(range: ISheetChartSourceSingleRange | IChartSourceMultiRangeItem[]): void;
|
|
39
|
+
openDataRangeSelector(unitId: string, chartId: string, initialRanges: IUnitRangeName[]): Promise<void>;
|
|
31
40
|
setOrientation(orientation: DataOrientation): void;
|
|
32
41
|
executeChartUpdateConfig(params: SheetsChartUpdateConfigParams): void;
|
|
33
42
|
private _executeChartUpdateSourceConfig;
|
|
43
|
+
private _isReadableSource;
|
|
34
44
|
dispose(): void;
|
|
35
45
|
}
|
|
36
46
|
export {};
|
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
export declare const SHEET_CHART_EDITOR_DEFAULT_VALUES: {
|
|
2
2
|
readonly axis: {
|
|
3
|
-
readonly primaryGridLineVisible: false;
|
|
4
|
-
readonly secondaryGridLineVisible: true;
|
|
5
3
|
readonly color: string;
|
|
6
4
|
readonly dateAxisRotation: number;
|
|
7
5
|
readonly gridlineWidth: number;
|
|
@@ -13,6 +11,8 @@ export declare const SHEET_CHART_EDITOR_DEFAULT_VALUES: {
|
|
|
13
11
|
readonly tickPosition: import("@univerjs-pro/engine-chart").ChartAxisTickPosition;
|
|
14
12
|
readonly tickVisible: boolean;
|
|
15
13
|
readonly tickWidth: string;
|
|
14
|
+
readonly primaryGridLineVisible: false;
|
|
15
|
+
readonly secondaryGridLineVisible: true;
|
|
16
16
|
};
|
|
17
17
|
readonly funnel: import("@univerjs-pro/chart-ui").IChartFunnelDefaultValues;
|
|
18
18
|
readonly heatmap: import("@univerjs-pro/chart-ui").IChartHeatmapDefaultValues;
|
|
@@ -22,7 +22,6 @@ export declare const SHEET_CHART_EDITOR_DEFAULT_VALUES: {
|
|
|
22
22
|
readonly pareto: import("@univerjs-pro/chart-ui").IChartParetoDefaultValues;
|
|
23
23
|
readonly pie: import("@univerjs-pro/chart-ui").IChartPieDefaultValues;
|
|
24
24
|
readonly relation: {
|
|
25
|
-
readonly useValueAsSymbolSize: true;
|
|
26
25
|
readonly circularLabelRotation: boolean;
|
|
27
26
|
readonly emphasisEnabled: boolean;
|
|
28
27
|
readonly force: {
|
|
@@ -31,14 +30,10 @@ export declare const SHEET_CHART_EDITOR_DEFAULT_VALUES: {
|
|
|
31
30
|
};
|
|
32
31
|
readonly layout: import("@univerjs-pro/engine-chart").RelationChartLayoutEnum;
|
|
33
32
|
readonly nodeShape: import("@univerjs-pro/engine-chart").LinePointShape;
|
|
33
|
+
readonly useValueAsSymbolSize: true;
|
|
34
34
|
};
|
|
35
35
|
readonly radar: import("@univerjs-pro/chart-ui").IChartRadarDefaultValues;
|
|
36
36
|
readonly series: {
|
|
37
|
-
readonly radarFillOpacity: 0.2;
|
|
38
|
-
readonly rightAxis: {
|
|
39
|
-
readonly ltr: false;
|
|
40
|
-
readonly rtl: boolean;
|
|
41
|
-
};
|
|
42
37
|
readonly borderDashType: import("@univerjs-pro/engine-chart").ChartBorderDashType;
|
|
43
38
|
readonly borderOpacity: number;
|
|
44
39
|
readonly borderWidth: number;
|
|
@@ -53,6 +48,11 @@ export declare const SHEET_CHART_EDITOR_DEFAULT_VALUES: {
|
|
|
53
48
|
readonly radarBorderWidth: number;
|
|
54
49
|
readonly scatterPointSize: number;
|
|
55
50
|
readonly seriesFillOpacity: number;
|
|
51
|
+
readonly radarFillOpacity: 0.2;
|
|
52
|
+
readonly rightAxis: {
|
|
53
|
+
readonly ltr: false;
|
|
54
|
+
readonly rtl: boolean;
|
|
55
|
+
};
|
|
56
56
|
};
|
|
57
57
|
readonly style: import("@univerjs-pro/chart-ui").IChartStyleDefaultValues;
|
|
58
58
|
readonly titles: import("@univerjs-pro/chart-ui").IChartTitleDefaultValues;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { IMoveChartCommandParams } from '@univerjs-pro/sheets-chart';
|
|
2
|
+
export declare const MOVE_CHART_DIALOG_KEY = "sheets-chart-ui.move-chart-dialog";
|
|
3
|
+
export interface IMoveChartDialogProps extends Pick<IMoveChartCommandParams, 'unitId' | 'subUnitId' | 'chartId'> {
|
|
4
|
+
onClose: () => void;
|
|
5
|
+
}
|
|
6
|
+
export declare function MoveChartDialog(props: IMoveChartDialogProps): import("react").JSX.Element;
|