@univerjs-pro/sheets-shape-ui 0.15.3-insiders.20260131-cbd5fac
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 -0
- package/lib/cjs/locale/ca-ES.js +1 -0
- package/lib/cjs/locale/en-US.js +1 -0
- package/lib/cjs/locale/es-ES.js +1 -0
- package/lib/cjs/locale/fa-IR.js +1 -0
- package/lib/cjs/locale/fr-FR.js +1 -0
- package/lib/cjs/locale/ja-JP.js +1 -0
- package/lib/cjs/locale/ko-KR.js +1 -0
- package/lib/cjs/locale/ru-RU.js +1 -0
- package/lib/cjs/locale/sk-SK.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 -0
- package/lib/es/locale/ca-ES.js +1 -0
- package/lib/es/locale/en-US.js +1 -0
- package/lib/es/locale/es-ES.js +1 -0
- package/lib/es/locale/fa-IR.js +1 -0
- package/lib/es/locale/fr-FR.js +1 -0
- package/lib/es/locale/ja-JP.js +1 -0
- package/lib/es/locale/ko-KR.js +1 -0
- package/lib/es/locale/ru-RU.js +1 -0
- package/lib/es/locale/sk-SK.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/index.js +1 -0
- package/lib/locale/ca-ES.js +1 -0
- package/lib/locale/en-US.js +1 -0
- package/lib/locale/es-ES.js +1 -0
- package/lib/locale/fa-IR.js +1 -0
- package/lib/locale/fr-FR.js +1 -0
- package/lib/locale/ja-JP.js +1 -0
- package/lib/locale/ko-KR.js +1 -0
- package/lib/locale/ru-RU.js +1 -0
- package/lib/locale/sk-SK.js +1 -0
- package/lib/locale/vi-VN.js +1 -0
- package/lib/locale/zh-CN.js +1 -0
- package/lib/locale/zh-TW.js +1 -0
- package/lib/types/command-util.d.ts +19 -0
- package/lib/types/commands/command/add-shape-command.d.ts +9 -0
- package/lib/types/commands/command/menu-insert-shape.command.d.ts +27 -0
- package/lib/types/commands/command/set-shape-fill.command.d.ts +5 -0
- package/lib/types/commands/command/set-shape-flip-command.d.ts +14 -0
- package/lib/types/commands/command/set-shape-rotate.command.d.ts +10 -0
- package/lib/types/commands/command/set-shape-text-align.command.d.ts +5 -0
- package/lib/types/commands/command/set-shape-text-style.command.d.ts +7 -0
- package/lib/types/commands/command/set-shape-text-vertical-align.command.d.ts +5 -0
- package/lib/types/commands/command/shape-doc-align.command.d.ts +10 -0
- package/lib/types/commands/command/test-line.shape.command.d.ts +8 -0
- package/lib/types/commands/command/update-connector-relation.command.d.ts +41 -0
- package/lib/types/commands/command/update-line-shape-resize.command.d.ts +18 -0
- package/lib/types/commands/command/update-shape-data-command.d.ts +13 -0
- package/lib/types/commands/menu/shape-doc-format.menu.d.ts +16 -0
- package/lib/types/commands/menu/shape-fill.menu.d.ts +3 -0
- package/lib/types/commands/menu/shape-font-size.menu.d.ts +5 -0
- package/lib/types/commands/menu/shape-text-align.menu.d.ts +8 -0
- package/lib/types/commands/menu/shape-vertical-align.menu.d.ts +8 -0
- package/lib/types/commands/operations/close-shape-panel.operation.d.ts +7 -0
- package/lib/types/commands/operations/open-shape-panel.operation.d.ts +7 -0
- package/lib/types/const.d.ts +5 -0
- package/lib/types/controllers/config.schema.d.ts +5 -0
- package/lib/types/controllers/menu.schema.d.ts +2 -0
- package/lib/types/controllers/shape-text-editing.render-controller.d.ts +17 -0
- package/lib/types/controllers/shape-update.controller.d.ts +19 -0
- package/lib/types/controllers/sheet-basic-shape-connection.controller.d.ts +99 -0
- package/lib/types/controllers/sheet-shape-adjust-controller.d.ts +45 -0
- package/lib/types/controllers/sheet-shape-command-interceptor.controller.d.ts +31 -0
- package/lib/types/controllers/sheet-shape-connector.controller.d.ts +110 -0
- package/lib/types/controllers/sheet-shape-render.controller.d.ts +12 -0
- package/lib/types/controllers/sheets-shape-ui.controller.d.ts +111 -0
- package/lib/types/index.d.ts +3 -0
- package/lib/types/locale/ca-ES.d.ts +3 -0
- package/lib/types/locale/en-US.d.ts +279 -0
- package/lib/types/locale/es-ES.d.ts +3 -0
- package/lib/types/locale/fa-IR.d.ts +3 -0
- package/lib/types/locale/fr-FR.d.ts +3 -0
- package/lib/types/locale/ja-JP.d.ts +3 -0
- package/lib/types/locale/ko-KR.d.ts +3 -0
- package/lib/types/locale/ru-RU.d.ts +3 -0
- package/lib/types/locale/sk-SK.d.ts +3 -0
- package/lib/types/locale/vi-VN.d.ts +3 -0
- package/lib/types/locale/zh-CN.d.ts +3 -0
- package/lib/types/locale/zh-TW.d.ts +3 -0
- package/lib/types/plugin.d.ts +18 -0
- package/lib/types/services/shape-text-editing.service.d.ts +19 -0
- package/lib/types/types.d.ts +14 -0
- package/lib/types/view-model/drawing-shape.d.ts +66 -0
- package/lib/types/view-model/shape-data-model.d.ts +5 -0
- package/lib/types/view-model/sheet-basic-shape-connection-site-object.d.ts +44 -0
- package/lib/types/view-model/sheet-shape-adjust-point-object.d.ts +21 -0
- package/lib/types/view-model/sheet-shape-connector-handler-object.d.ts +22 -0
- package/lib/types/views/ShapeOptions.d.ts +30 -0
- package/lib/types/views/ShapePicker.d.ts +2 -0
- package/lib/types/views/shape-editor-panel/ShapeEditorPanel.d.ts +12 -0
- package/lib/types/views/shape-editor-panel/ShapeFillEditor.d.ts +11 -0
- package/lib/types/views/shape-editor-panel/ShapeLineEditor.d.ts +11 -0
- package/lib/types/views/shape-editor-panel/ShapePositionEditor.d.ts +1 -0
- package/lib/types/views/shape-editor-panel/index.d.ts +1 -0
- package/lib/types/views/shape-menu/shape-menu-factory.d.ts +10 -0
- package/lib/types/views/shape-text-editor/Editor.d.ts +14 -0
- package/lib/types/views/shape-text-editor/hooks/use-shape-position.d.ts +37 -0
- package/lib/types/views/shape-text-editor/index.d.ts +6 -0
- package/lib/types/views/shape-text-editor/position-wrapper.d.ts +16 -0
- package/lib/types/views/shapes.d.ts +58 -0
- package/lib/umd/index.js +1 -0
- package/lib/umd/locale/ca-ES.js +1 -0
- package/lib/umd/locale/en-US.js +1 -0
- package/lib/umd/locale/es-ES.js +1 -0
- package/lib/umd/locale/fa-IR.js +1 -0
- package/lib/umd/locale/fr-FR.js +1 -0
- package/lib/umd/locale/ja-JP.js +1 -0
- package/lib/umd/locale/ko-KR.js +1 -0
- package/lib/umd/locale/ru-RU.js +1 -0
- package/lib/umd/locale/sk-SK.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 +99 -0
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
import { SheetsShapeServices } from '@univerjs-pro/sheets-shape';
|
|
2
|
+
import { Disposable, DrawingTypeEnum, ICommandService, IContextService, IUniverInstanceService, LocaleService } from '@univerjs/core';
|
|
3
|
+
import { IDrawingManagerService } from '@univerjs/drawing';
|
|
4
|
+
import { SheetInterceptorService } from '@univerjs/sheets';
|
|
5
|
+
import { SheetCanvasPopManagerService } from '@univerjs/sheets-ui';
|
|
6
|
+
import { ComponentManager, IMenuManagerService, ISidebarService } from '@univerjs/ui';
|
|
7
|
+
export declare class SheetsShapeUIController extends Disposable {
|
|
8
|
+
private readonly _univerInstanceService;
|
|
9
|
+
private readonly _sheetInterceptorService;
|
|
10
|
+
private _sidebarService;
|
|
11
|
+
protected readonly _menuManagerService: IMenuManagerService;
|
|
12
|
+
private _sheetsShapeServices;
|
|
13
|
+
private readonly _localeService;
|
|
14
|
+
private _componentManager;
|
|
15
|
+
private readonly _commandService;
|
|
16
|
+
private _drawingManagerService;
|
|
17
|
+
private readonly _sheetCanvasPopManagerService;
|
|
18
|
+
private readonly _contextService;
|
|
19
|
+
private _sidebarDisposable;
|
|
20
|
+
private _activeShapeInfo;
|
|
21
|
+
private _isOpenedShapeEditPanel;
|
|
22
|
+
constructor(_univerInstanceService: IUniverInstanceService, _sheetInterceptorService: SheetInterceptorService, _sidebarService: ISidebarService, _menuManagerService: IMenuManagerService, _sheetsShapeServices: SheetsShapeServices, _localeService: LocaleService, _componentManager: ComponentManager, _commandService: ICommandService, _drawingManagerService: IDrawingManagerService, _sheetCanvasPopManagerService: SheetCanvasPopManagerService, _contextService: IContextService);
|
|
23
|
+
private _initMenu;
|
|
24
|
+
private _registerShapeMenu;
|
|
25
|
+
getShapePopupMenus(unitId: string, subUnitId: string, drawingId: string, drawingType: DrawingTypeEnum): ({
|
|
26
|
+
label: string;
|
|
27
|
+
index: number;
|
|
28
|
+
commandId: string;
|
|
29
|
+
commandParams: {
|
|
30
|
+
unitId: string;
|
|
31
|
+
subUnitId: string;
|
|
32
|
+
drawingId: string;
|
|
33
|
+
drawings?: undefined;
|
|
34
|
+
shapeId?: undefined;
|
|
35
|
+
flipH?: undefined;
|
|
36
|
+
flipV?: undefined;
|
|
37
|
+
rotate?: undefined;
|
|
38
|
+
};
|
|
39
|
+
disable: boolean;
|
|
40
|
+
} | {
|
|
41
|
+
label: string;
|
|
42
|
+
index: number;
|
|
43
|
+
commandId: string;
|
|
44
|
+
commandParams: {
|
|
45
|
+
unitId: string;
|
|
46
|
+
drawings: {
|
|
47
|
+
unitId: string;
|
|
48
|
+
subUnitId: string;
|
|
49
|
+
drawingId: string;
|
|
50
|
+
drawingType: DrawingTypeEnum;
|
|
51
|
+
}[];
|
|
52
|
+
subUnitId?: undefined;
|
|
53
|
+
drawingId?: undefined;
|
|
54
|
+
shapeId?: undefined;
|
|
55
|
+
flipH?: undefined;
|
|
56
|
+
flipV?: undefined;
|
|
57
|
+
rotate?: undefined;
|
|
58
|
+
};
|
|
59
|
+
disable: boolean;
|
|
60
|
+
} | {
|
|
61
|
+
label: string;
|
|
62
|
+
index: number;
|
|
63
|
+
commandId: string;
|
|
64
|
+
commandParams: {
|
|
65
|
+
unitId: string;
|
|
66
|
+
subUnitId: string;
|
|
67
|
+
shapeId: string;
|
|
68
|
+
flipH: boolean;
|
|
69
|
+
drawingId?: undefined;
|
|
70
|
+
drawings?: undefined;
|
|
71
|
+
flipV?: undefined;
|
|
72
|
+
rotate?: undefined;
|
|
73
|
+
};
|
|
74
|
+
disable: boolean;
|
|
75
|
+
} | {
|
|
76
|
+
label: string;
|
|
77
|
+
index: number;
|
|
78
|
+
commandId: string;
|
|
79
|
+
commandParams: {
|
|
80
|
+
unitId: string;
|
|
81
|
+
subUnitId: string;
|
|
82
|
+
shapeId: string;
|
|
83
|
+
flipV: boolean;
|
|
84
|
+
drawingId?: undefined;
|
|
85
|
+
drawings?: undefined;
|
|
86
|
+
flipH?: undefined;
|
|
87
|
+
rotate?: undefined;
|
|
88
|
+
};
|
|
89
|
+
disable: boolean;
|
|
90
|
+
} | {
|
|
91
|
+
label: string;
|
|
92
|
+
index: number;
|
|
93
|
+
commandId: string;
|
|
94
|
+
commandParams: {
|
|
95
|
+
unitId: string;
|
|
96
|
+
subUnitId: string;
|
|
97
|
+
shapeId: string;
|
|
98
|
+
rotate: number;
|
|
99
|
+
drawingId?: undefined;
|
|
100
|
+
drawings?: undefined;
|
|
101
|
+
flipH?: undefined;
|
|
102
|
+
flipV?: undefined;
|
|
103
|
+
};
|
|
104
|
+
disable: boolean;
|
|
105
|
+
})[];
|
|
106
|
+
private _getShapeInfo;
|
|
107
|
+
private _registerOperations;
|
|
108
|
+
private _registerComponent;
|
|
109
|
+
private _openShapeEditPanel;
|
|
110
|
+
private _closeShapeEditPanel;
|
|
111
|
+
}
|
|
@@ -0,0 +1,279 @@
|
|
|
1
|
+
declare const locale: {
|
|
2
|
+
'sheets-shape': {
|
|
3
|
+
title: string;
|
|
4
|
+
insertShape: string;
|
|
5
|
+
openPanel: string;
|
|
6
|
+
deleteShape: string;
|
|
7
|
+
hidePanel: string;
|
|
8
|
+
formatShape: string;
|
|
9
|
+
shapeStyle: string;
|
|
10
|
+
shapePosition: string;
|
|
11
|
+
toggleFlipH: string;
|
|
12
|
+
toggleFlipV: string;
|
|
13
|
+
rotateRight90: string;
|
|
14
|
+
rotateLeft90: string;
|
|
15
|
+
fill: {
|
|
16
|
+
title: string;
|
|
17
|
+
noFill: string;
|
|
18
|
+
solidFill: string;
|
|
19
|
+
gradientFill: string;
|
|
20
|
+
pictureFill: string;
|
|
21
|
+
patternFill: string;
|
|
22
|
+
color: string;
|
|
23
|
+
transparency: string;
|
|
24
|
+
};
|
|
25
|
+
line: {
|
|
26
|
+
title: string;
|
|
27
|
+
noLine: string;
|
|
28
|
+
solidLine: string;
|
|
29
|
+
gradientLine: string;
|
|
30
|
+
color: string;
|
|
31
|
+
transparency: string;
|
|
32
|
+
width: string;
|
|
33
|
+
dashType: {
|
|
34
|
+
title: string;
|
|
35
|
+
solid: string;
|
|
36
|
+
roundDot: string;
|
|
37
|
+
squareDot: string;
|
|
38
|
+
dash: string;
|
|
39
|
+
dashDot: string;
|
|
40
|
+
longDash: string;
|
|
41
|
+
longDashDot: string;
|
|
42
|
+
longDashDotDot: string;
|
|
43
|
+
};
|
|
44
|
+
capType: {
|
|
45
|
+
title: string;
|
|
46
|
+
flat: string;
|
|
47
|
+
round: string;
|
|
48
|
+
square: string;
|
|
49
|
+
};
|
|
50
|
+
joinType: {
|
|
51
|
+
title: string;
|
|
52
|
+
miter: string;
|
|
53
|
+
round: string;
|
|
54
|
+
bevel: string;
|
|
55
|
+
};
|
|
56
|
+
beginArrowType: string;
|
|
57
|
+
beginArrowSize: string;
|
|
58
|
+
endArrowType: string;
|
|
59
|
+
endArrowSize: string;
|
|
60
|
+
arrowType: {
|
|
61
|
+
none: string;
|
|
62
|
+
arrow: string;
|
|
63
|
+
openArrow: string;
|
|
64
|
+
stealthArrow: string;
|
|
65
|
+
diamondArrow: string;
|
|
66
|
+
ovalArrow: string;
|
|
67
|
+
};
|
|
68
|
+
arrowSize: {
|
|
69
|
+
small: string;
|
|
70
|
+
medium: string;
|
|
71
|
+
large: string;
|
|
72
|
+
};
|
|
73
|
+
};
|
|
74
|
+
};
|
|
75
|
+
shape: {
|
|
76
|
+
group: {
|
|
77
|
+
line: string;
|
|
78
|
+
rectangle: string;
|
|
79
|
+
basicShape: string;
|
|
80
|
+
blockArrow: string;
|
|
81
|
+
equationShape: string;
|
|
82
|
+
flowchart: string;
|
|
83
|
+
starAndBanner: string;
|
|
84
|
+
callout: string;
|
|
85
|
+
other: string;
|
|
86
|
+
};
|
|
87
|
+
type: {
|
|
88
|
+
line: string;
|
|
89
|
+
'straight-connector1': string;
|
|
90
|
+
'straight-connector2': string;
|
|
91
|
+
'bent-connector3': string;
|
|
92
|
+
'bent-connector3-arrow1': string;
|
|
93
|
+
'bent-connector3-arrow2': string;
|
|
94
|
+
'curved-connector3': string;
|
|
95
|
+
'curved-connector3-arrow1': string;
|
|
96
|
+
'curved-connector3-arrow2': string;
|
|
97
|
+
rect: string;
|
|
98
|
+
'round-rect': string;
|
|
99
|
+
'snip1-rect': string;
|
|
100
|
+
'snip2-same-rect': string;
|
|
101
|
+
'snip2-diag-rect': string;
|
|
102
|
+
'snip-round-rect': string;
|
|
103
|
+
'round1-rect': string;
|
|
104
|
+
'round2-same-rect': string;
|
|
105
|
+
'round2-diag-rect': string;
|
|
106
|
+
'rect-textbox-horizontal': string;
|
|
107
|
+
'rect-textbox-vertical': string;
|
|
108
|
+
ellipse: string;
|
|
109
|
+
triangle: string;
|
|
110
|
+
'rt-triangle': string;
|
|
111
|
+
parallelogram: string;
|
|
112
|
+
trapezoid: string;
|
|
113
|
+
'non-isosceles-trapezoid': string;
|
|
114
|
+
diamond: string;
|
|
115
|
+
pentagon: string;
|
|
116
|
+
hexagon: string;
|
|
117
|
+
heptagon: string;
|
|
118
|
+
octagon: string;
|
|
119
|
+
decagon: string;
|
|
120
|
+
dodecagon: string;
|
|
121
|
+
pie: string;
|
|
122
|
+
chord: string;
|
|
123
|
+
teardrop: string;
|
|
124
|
+
frame: string;
|
|
125
|
+
'half-frame': string;
|
|
126
|
+
corner: string;
|
|
127
|
+
'diag-stripe': string;
|
|
128
|
+
plus: string;
|
|
129
|
+
plaque: string;
|
|
130
|
+
can: string;
|
|
131
|
+
cube: string;
|
|
132
|
+
bevel: string;
|
|
133
|
+
donut: string;
|
|
134
|
+
'no-smoking': string;
|
|
135
|
+
'block-arc': string;
|
|
136
|
+
'folder-corner': string;
|
|
137
|
+
'smiley-face': string;
|
|
138
|
+
heart: string;
|
|
139
|
+
'lightning-bolt': string;
|
|
140
|
+
sun: string;
|
|
141
|
+
moon: string;
|
|
142
|
+
cloud: string;
|
|
143
|
+
arc: string;
|
|
144
|
+
'bracket-pair': string;
|
|
145
|
+
'brace-pair': string;
|
|
146
|
+
'left-bracket': string;
|
|
147
|
+
'right-bracket': string;
|
|
148
|
+
'left-brace': string;
|
|
149
|
+
'right-brace': string;
|
|
150
|
+
'right-arrow': string;
|
|
151
|
+
'left-arrow': string;
|
|
152
|
+
'up-arrow': string;
|
|
153
|
+
'down-arrow': string;
|
|
154
|
+
'left-right-arrow': string;
|
|
155
|
+
'up-down-arrow': string;
|
|
156
|
+
'quad-arrow': string;
|
|
157
|
+
'left-right-up-arrow': string;
|
|
158
|
+
'bent-arrow': string;
|
|
159
|
+
'uturn-arrow': string;
|
|
160
|
+
'left-up-arrow': string;
|
|
161
|
+
'bent-up-arrow': string;
|
|
162
|
+
'curved-right-arrow': string;
|
|
163
|
+
'curved-left-arrow': string;
|
|
164
|
+
'curved-up-arrow': string;
|
|
165
|
+
'curved-down-arrow': string;
|
|
166
|
+
'striped-right-arrow': string;
|
|
167
|
+
'notched-right-arrow': string;
|
|
168
|
+
'home-plate': string;
|
|
169
|
+
chevron: string;
|
|
170
|
+
'right-arrow-callout': string;
|
|
171
|
+
'down-arrow-callout': string;
|
|
172
|
+
'left-arrow-callout': string;
|
|
173
|
+
'up-arrow-callout': string;
|
|
174
|
+
'left-right-arrow-callout': string;
|
|
175
|
+
'quad-arrow-callout': string;
|
|
176
|
+
'circular-arrow': string;
|
|
177
|
+
'math-plus': string;
|
|
178
|
+
'math-minus': string;
|
|
179
|
+
'math-multiply': string;
|
|
180
|
+
'math-divide': string;
|
|
181
|
+
'math-equal': string;
|
|
182
|
+
'math-not-equal': string;
|
|
183
|
+
'flow-chart-process': string;
|
|
184
|
+
'flow-chart-alternate-process': string;
|
|
185
|
+
'flow-chart-decision': string;
|
|
186
|
+
'flow-chart-input-output': string;
|
|
187
|
+
'flow-chart-predefined-process': string;
|
|
188
|
+
'flow-chart-internal-storage': string;
|
|
189
|
+
'flow-chart-document': string;
|
|
190
|
+
'flow-chart-multidocument': string;
|
|
191
|
+
'flow-chart-terminator': string;
|
|
192
|
+
'flow-chart-preparation': string;
|
|
193
|
+
'flow-chart-manual-input': string;
|
|
194
|
+
'flow-chart-manual-operation': string;
|
|
195
|
+
'flow-chart-connector': string;
|
|
196
|
+
'flow-chart-offpage-connector': string;
|
|
197
|
+
'flow-chart-punched-card': string;
|
|
198
|
+
'flow-chart-punched-tape': string;
|
|
199
|
+
'flow-chart-summing-junction': string;
|
|
200
|
+
'flow-chart-or': string;
|
|
201
|
+
'flow-chart-collate': string;
|
|
202
|
+
'flow-chart-sort': string;
|
|
203
|
+
'flow-chart-extract': string;
|
|
204
|
+
'flow-chart-merge': string;
|
|
205
|
+
'flow-chart-online-storage': string;
|
|
206
|
+
'flow-chart-delay': string;
|
|
207
|
+
'flow-chart-magnetic-tape': string;
|
|
208
|
+
'flow-chart-magnetic-disk': string;
|
|
209
|
+
'flow-chart-magnetic-drum': string;
|
|
210
|
+
'flow-chart-display': string;
|
|
211
|
+
'irregular-seal1': string;
|
|
212
|
+
'irregular-seal2': string;
|
|
213
|
+
star4: string;
|
|
214
|
+
star5: string;
|
|
215
|
+
star6: string;
|
|
216
|
+
star7: string;
|
|
217
|
+
star8: string;
|
|
218
|
+
star10: string;
|
|
219
|
+
star12: string;
|
|
220
|
+
star16: string;
|
|
221
|
+
star24: string;
|
|
222
|
+
star32: string;
|
|
223
|
+
ribbon2: string;
|
|
224
|
+
ribbon: string;
|
|
225
|
+
'ellipse-ribbon2': string;
|
|
226
|
+
'ellipse-ribbon': string;
|
|
227
|
+
'vertical-scroll': string;
|
|
228
|
+
'horizontal-scroll': string;
|
|
229
|
+
wave: string;
|
|
230
|
+
'double-wave': string;
|
|
231
|
+
'wedge-rect-callout': string;
|
|
232
|
+
'wedge-round-rect-callout': string;
|
|
233
|
+
'wedge-ellipse-callout': string;
|
|
234
|
+
'cloud-callout': string;
|
|
235
|
+
'border-callout1': string;
|
|
236
|
+
'border-callout2': string;
|
|
237
|
+
'border-callout3': string;
|
|
238
|
+
'accent-callout1': string;
|
|
239
|
+
'accent-callout2': string;
|
|
240
|
+
'accent-callout3': string;
|
|
241
|
+
callout1: string;
|
|
242
|
+
callout2: string;
|
|
243
|
+
callout3: string;
|
|
244
|
+
'accent-border-callout1': string;
|
|
245
|
+
'accent-border-callout2': string;
|
|
246
|
+
'accent-border-callout3': string;
|
|
247
|
+
'left-circular-arrow': string;
|
|
248
|
+
'left-right-circular-arrow': string;
|
|
249
|
+
'swoosh-arrow': string;
|
|
250
|
+
'left-right-ribbon': string;
|
|
251
|
+
'pie-wedge': string;
|
|
252
|
+
funnel: string;
|
|
253
|
+
gear6: string;
|
|
254
|
+
gear9: string;
|
|
255
|
+
'corner-tabs': string;
|
|
256
|
+
'action-button-back-previous': string;
|
|
257
|
+
'action-button-forward-next': string;
|
|
258
|
+
'action-button-beginning': string;
|
|
259
|
+
'action-button-end': string;
|
|
260
|
+
'action-button-home': string;
|
|
261
|
+
'action-button-information': string;
|
|
262
|
+
'action-button-return': string;
|
|
263
|
+
'action-button-movie': string;
|
|
264
|
+
'action-button-document': string;
|
|
265
|
+
'action-button-sound': string;
|
|
266
|
+
'action-button-help': string;
|
|
267
|
+
'action-button-blank': string;
|
|
268
|
+
'chart-plus': string;
|
|
269
|
+
'chart-star': string;
|
|
270
|
+
'chart-x': string;
|
|
271
|
+
'flow-chart-offline-storage': string;
|
|
272
|
+
'line-inv': string;
|
|
273
|
+
'plaque-tabs': string;
|
|
274
|
+
'square-tabs': string;
|
|
275
|
+
'up-down-arrow-callout': string;
|
|
276
|
+
};
|
|
277
|
+
};
|
|
278
|
+
};
|
|
279
|
+
export default locale;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { IUniverSheetsShapeUIConfig } from './controllers/config.schema';
|
|
2
|
+
import { ICommandService, IConfigService, Injector, Plugin, UniverInstanceType } from '@univerjs/core';
|
|
3
|
+
import { IRenderManagerService } from '@univerjs/engine-render';
|
|
4
|
+
export declare const SHEET_SHAPE_UI_PLUGIN_NAME = "SHEET_SHAPE_UI_PLUGIN";
|
|
5
|
+
export declare class UniverSheetsShapeUIPlugin extends Plugin {
|
|
6
|
+
private readonly _config;
|
|
7
|
+
protected readonly _injector: Injector;
|
|
8
|
+
private readonly _commandService;
|
|
9
|
+
private readonly _configService;
|
|
10
|
+
private readonly _renderManagerService;
|
|
11
|
+
static type: UniverInstanceType;
|
|
12
|
+
static pluginName: string;
|
|
13
|
+
constructor(_config: IUniverSheetsShapeUIConfig | undefined, _injector: Injector, _commandService: ICommandService, _configService: IConfigService, _renderManagerService: IRenderManagerService);
|
|
14
|
+
onRendered(): void;
|
|
15
|
+
onReady(): void;
|
|
16
|
+
onStarting(): void;
|
|
17
|
+
private _initCommands;
|
|
18
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { Nullable, Disposable } from '@univerjs/core';
|
|
2
|
+
import { Observable } from 'rxjs';
|
|
3
|
+
export interface IEditingParams {
|
|
4
|
+
unitId: string;
|
|
5
|
+
subUnitId: string;
|
|
6
|
+
shapeId: string;
|
|
7
|
+
shapeKey: string;
|
|
8
|
+
visible: boolean;
|
|
9
|
+
}
|
|
10
|
+
export declare class ShapeTextEditingService extends Disposable {
|
|
11
|
+
private readonly _editingParams$;
|
|
12
|
+
readonly editingParams$: Observable<Nullable<IEditingParams>>;
|
|
13
|
+
private readonly _onSavingEditorData$;
|
|
14
|
+
readonly onSavingEditorData$: Observable<Nullable<boolean>>;
|
|
15
|
+
dispose(): void;
|
|
16
|
+
setEditing(params: Nullable<IEditingParams>): void;
|
|
17
|
+
setOnSavingEditorData(params: Nullable<boolean>): void;
|
|
18
|
+
getEditing(): Nullable<IEditingParams>;
|
|
19
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { IShapeData, ShapeTypeEnum } from '@univerjs-pro/engine-shape';
|
|
2
|
+
import { ISheetShape } from '@univerjs/sheets-drawing';
|
|
3
|
+
export type ISheetShapeDrawingParam = ISheetShape & {
|
|
4
|
+
componentKey: string;
|
|
5
|
+
data: {
|
|
6
|
+
shapeType: ShapeTypeEnum;
|
|
7
|
+
shapeData?: IShapeData;
|
|
8
|
+
disablePopup?: boolean;
|
|
9
|
+
fill?: boolean;
|
|
10
|
+
rotateEnabled?: boolean;
|
|
11
|
+
resizeEnabled?: boolean;
|
|
12
|
+
borderEnabled?: boolean;
|
|
13
|
+
};
|
|
14
|
+
};
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import { ShapeModel } from '@univerjs-pro/engine-shape';
|
|
2
|
+
import { IDrawingParam, ISrcRect, LocaleService, Nullable, PresetGeometryType, DrawingTypeEnum } from '@univerjs/core';
|
|
3
|
+
import { IShapeProps, IViewportInfo, UniverRenderingContext, Vector2, RENDER_CLASS_TYPE, Shape } from '@univerjs/engine-render';
|
|
4
|
+
export interface IDrawingShapeProps extends IShapeProps {
|
|
5
|
+
shapeModel: ShapeModel;
|
|
6
|
+
/**
|
|
7
|
+
* 20.1.8.55 srcRect (Source Rectangle)
|
|
8
|
+
*/
|
|
9
|
+
srcRect?: Nullable<ISrcRect>;
|
|
10
|
+
/**
|
|
11
|
+
* 20.1.9.18 prstGeom (Preset geometry)
|
|
12
|
+
*/
|
|
13
|
+
prstGeom?: Nullable<PresetGeometryType>;
|
|
14
|
+
drawingType: DrawingTypeEnum;
|
|
15
|
+
/**
|
|
16
|
+
* LocaleService for rich text rendering
|
|
17
|
+
*/
|
|
18
|
+
localeService?: LocaleService;
|
|
19
|
+
shapeId: string;
|
|
20
|
+
/**
|
|
21
|
+
* The unit ID (workbook ID).
|
|
22
|
+
*/
|
|
23
|
+
unitId: string;
|
|
24
|
+
/**
|
|
25
|
+
* The sub-unit ID (worksheet ID).
|
|
26
|
+
*/
|
|
27
|
+
subUnitId: string;
|
|
28
|
+
/**
|
|
29
|
+
* Whether the shape is currently being edited
|
|
30
|
+
*/
|
|
31
|
+
isEditing?: boolean;
|
|
32
|
+
}
|
|
33
|
+
export interface IDrawingShapeData extends IDrawingParam {
|
|
34
|
+
/**
|
|
35
|
+
* 20.1.8.55 srcRect (Source Rectangle)
|
|
36
|
+
*/
|
|
37
|
+
srcRect?: Nullable<ISrcRect>;
|
|
38
|
+
/**
|
|
39
|
+
* 20.1.9.18 prstGeom (Preset geometry)
|
|
40
|
+
*/
|
|
41
|
+
prstGeom?: Nullable<PresetGeometryType>;
|
|
42
|
+
}
|
|
43
|
+
export declare class DrawingShape extends Shape<IDrawingShapeProps> {
|
|
44
|
+
protected _props: IDrawingShapeProps;
|
|
45
|
+
private _transformCalculateSrcRect;
|
|
46
|
+
private readonly _drawingType;
|
|
47
|
+
constructor(id: string, config: IDrawingShapeProps);
|
|
48
|
+
private _init;
|
|
49
|
+
setPrstGeom(prstGeom?: Nullable<PresetGeometryType>): void;
|
|
50
|
+
setEditing(isEditing: boolean): void;
|
|
51
|
+
get unitId(): string;
|
|
52
|
+
get subUnitId(): string;
|
|
53
|
+
private _updateSrcRectByTransform;
|
|
54
|
+
setSrcRect(srcRect?: Nullable<ISrcRect>): void;
|
|
55
|
+
get shapeModel(): ShapeModel;
|
|
56
|
+
get shapeId(): string;
|
|
57
|
+
get classType(): RENDER_CLASS_TYPE;
|
|
58
|
+
_draw(ctx: UniverRenderingContext, bounds?: IViewportInfo): void;
|
|
59
|
+
getDrawingPoints(_bounds: IViewportInfo): void;
|
|
60
|
+
private _drawShapeText;
|
|
61
|
+
private _drawSimpleText;
|
|
62
|
+
private _drawRichText;
|
|
63
|
+
render(mainCtx: UniverRenderingContext, bounds: IViewportInfo, _drawAdj?: boolean): this;
|
|
64
|
+
getInverseCoord(coord: Vector2): Vector2;
|
|
65
|
+
isHit(coord: Vector2): boolean;
|
|
66
|
+
}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { IShapeProps, Shape } from '@univerjs/engine-render';
|
|
2
|
+
export interface ISheetBasicShapeConnectionSiteObjectProps extends IShapeProps {
|
|
3
|
+
/** The target shape's ID that this connection site belongs to */
|
|
4
|
+
targetShapeId: string;
|
|
5
|
+
/** The connection site index within the target shape */
|
|
6
|
+
cxnIndex: number;
|
|
7
|
+
/** Unit ID */
|
|
8
|
+
unitId: string;
|
|
9
|
+
/** Sub-unit ID */
|
|
10
|
+
subUnitId: string;
|
|
11
|
+
/** Whether this connection site is highlighted (connector endpoint is nearby) */
|
|
12
|
+
isHighlighted?: boolean;
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* Render object for displaying connection sites on shapes.
|
|
16
|
+
* These are the points where connectors can attach.
|
|
17
|
+
*/
|
|
18
|
+
export declare class SheetBasicShapeConnectionSiteObject extends Shape<ISheetBasicShapeConnectionSiteObjectProps> {
|
|
19
|
+
private _targetShapeId;
|
|
20
|
+
private _cxnIndex;
|
|
21
|
+
private _unitId;
|
|
22
|
+
private _subUnitId;
|
|
23
|
+
private _isHighlighted;
|
|
24
|
+
constructor(key?: string, props?: ISheetBasicShapeConnectionSiteObjectProps);
|
|
25
|
+
/**
|
|
26
|
+
* Get the target shape info for this connection site
|
|
27
|
+
*/
|
|
28
|
+
getConnectionInfo(): {
|
|
29
|
+
unitId: string;
|
|
30
|
+
subUnitId: string;
|
|
31
|
+
shapeId: string;
|
|
32
|
+
cxnIndex: number;
|
|
33
|
+
};
|
|
34
|
+
/**
|
|
35
|
+
* Set whether this connection site is highlighted
|
|
36
|
+
*/
|
|
37
|
+
setHighlighted(highlighted: boolean): void;
|
|
38
|
+
/**
|
|
39
|
+
* Check if this connection site is highlighted
|
|
40
|
+
*/
|
|
41
|
+
isHighlighted(): boolean;
|
|
42
|
+
setShapeProps(props: Partial<ISheetBasicShapeConnectionSiteObjectProps>): void;
|
|
43
|
+
protected _draw(ctx: CanvasRenderingContext2D): void;
|
|
44
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { IShapeProps, Shape } from '@univerjs/engine-render';
|
|
2
|
+
export interface ISheetShapeAdjustPointObjectProps extends IShapeProps {
|
|
3
|
+
shapeId: string;
|
|
4
|
+
adjName: string;
|
|
5
|
+
unitId: string;
|
|
6
|
+
subUnitId: string;
|
|
7
|
+
}
|
|
8
|
+
export declare class SheetShapeAdjustPointObject extends Shape<ISheetShapeAdjustPointObjectProps> {
|
|
9
|
+
private _shapeId;
|
|
10
|
+
private _adjName;
|
|
11
|
+
private _unitId;
|
|
12
|
+
private _subUnitId;
|
|
13
|
+
constructor(key?: string, props?: ISheetShapeAdjustPointObjectProps);
|
|
14
|
+
getDrawingSearch(): {
|
|
15
|
+
unitId: string;
|
|
16
|
+
subUnitId: string;
|
|
17
|
+
drawingId: string;
|
|
18
|
+
};
|
|
19
|
+
setShapeProps(props: Partial<ISheetShapeAdjustPointObjectProps>): void;
|
|
20
|
+
protected _draw(ctx: CanvasRenderingContext2D): void;
|
|
21
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { IShapeProps, Shape } from '@univerjs/engine-render';
|
|
2
|
+
export interface ISheetShapeConnectorHandlerObjectProps extends IShapeProps {
|
|
3
|
+
shapeId: string;
|
|
4
|
+
unitId: string;
|
|
5
|
+
subUnitId: string;
|
|
6
|
+
isStartConnectorPoint: boolean;
|
|
7
|
+
}
|
|
8
|
+
export declare class SheetShapeConnectorHandlerObject extends Shape<ISheetShapeConnectorHandlerObjectProps> {
|
|
9
|
+
private _shapeId;
|
|
10
|
+
private _index;
|
|
11
|
+
private _unitId;
|
|
12
|
+
private _subUnitId;
|
|
13
|
+
private _isStartConnectorPoint;
|
|
14
|
+
constructor(key?: string, props?: ISheetShapeConnectorHandlerObjectProps);
|
|
15
|
+
getDrawingSearch(): {
|
|
16
|
+
unitId: string;
|
|
17
|
+
subUnitId: string;
|
|
18
|
+
drawingId: string;
|
|
19
|
+
};
|
|
20
|
+
setShapeProps(props: Partial<ISheetShapeConnectorHandlerObjectProps>): void;
|
|
21
|
+
protected _draw(ctx: CanvasRenderingContext2D): void;
|
|
22
|
+
}
|