@univerjs/slides-ui 0.5.5-nightly.202501241606 → 0.6.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/LICENSE +176 -0
- package/lib/cjs/index.js +2 -2
- package/lib/cjs/locale/en-US.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/ru-RU.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-TW.js +1 -1
- package/lib/es/index.js +1461 -1494
- package/lib/es/locale/en-US.js +2 -2
- package/lib/es/locale/fa-IR.js +2 -2
- package/lib/es/locale/fr-FR.js +2 -2
- package/lib/es/locale/ru-RU.js +3 -3
- package/lib/es/locale/vi-VN.js +3 -3
- package/lib/es/locale/zh-CN.js +2 -2
- package/lib/es/locale/zh-TW.js +3 -3
- package/lib/umd/index.js +2 -2
- package/lib/umd/locale/en-US.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/ru-RU.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-TW.js +1 -1
- package/package.json +10 -10
package/lib/es/index.js
CHANGED
|
@@ -1,44 +1,43 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var
|
|
4
|
-
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
|
|
16
|
-
var
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
constructor(_renderContext, _injector, _univerInstanceService, _renderManagerService) {
|
|
1
|
+
var mn = Object.defineProperty;
|
|
2
|
+
var un = (i, e, t) => e in i ? mn(i, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : i[e] = t;
|
|
3
|
+
var I = (i, e, t) => un(i, typeof e != "symbol" ? e + "" : e, t);
|
|
4
|
+
import { Inject as Y, Injector as Ke, RxDisposable as Ce, UniverInstanceType as E, debounce as gn, getColorStyle as hn, IUniverInstanceService as y, CommandType as V, Tools as pn, useDependency as x, LocaleService as ee, ICommandService as j, generateRandomId as St, PageElementType as Ge, BasicShapes as Cn, Disposable as Ve, DisposableCollection as Xe, toDisposable as It, FOCUSING_COMMON_DRAWINGS as fn, IContextService as fe, createInternalEditorID as vn, createIdentifier as Pt, EDITOR_ACTIVATED as xe, FOCUSING_EDITOR_STANDALONE as bt, FOCUSING_UNIVER_EDITOR_STANDALONE_SINGLE_MODE as Et, DocumentDataModel as _n, VerticalAlign as ye, HorizontalAlign as Rt, WrapStrategy as tt, FOCUSING_EDITOR_BUT_HIDDEN as Sn, DEFAULT_EMPTY_DOCUMENT_VALUE as Ot, Direction as L, IUndoRedoService as In, DocumentFlavor as Pn, FOCUSING_UNIVER_EDITOR as xt, FORMULA_EDITOR_ACTIVATED as bn, connectInjector as nt, Plugin as En, merge as Rn, mergeOverrideWithDependencies as it, IConfigService as On } from "@univerjs/core";
|
|
5
|
+
import { Viewport as rt, ScrollBar as yt, Slide as xn, Rect as Mt, Scene as yn, IRenderManagerService as Z, ObjectType as ge, pxToNum as Mn, DeviceInputEventType as J, convertTextRotation as st, FIX_ONE_PIXEL_BLUR_OFFSET as se, fixLineWidthByScale as ot } from "@univerjs/engine-render";
|
|
6
|
+
import { ObjectProvider as Tn, SLIDE_KEY as oe } from "@univerjs/slides";
|
|
7
|
+
import { ISidebarService as Tt, ICanvasPopupService as wn, KeyCode as M, ILayoutService as Nn, ILocalFileService as Dn, useObservable as Un, DISABLE_AUTO_FOCUS_KEY as at, MenuItemType as ve, getMenuHiddenObservable as _e, RibbonStartGroup as Vn, MetaKeys as jn, ComponentManager as Bn, BuiltInUIPart as ct, IMenuManagerService as Ln, IUIPartsService as An, IShortcutService as $n } from "@univerjs/ui";
|
|
8
|
+
import { jsxs as R, jsx as m } from "react/jsx-runtime";
|
|
9
|
+
import { Button as Pe, InputNumber as me, DropdownLegacy as wt, ColorPicker as Hn, Scrollbar as Fn } from "@univerjs/design";
|
|
10
|
+
import Nt, { forwardRef as $, useRef as Dt, createElement as H, useState as X, useEffect as he, useMemo as zn, useCallback as lt } from "react";
|
|
11
|
+
import { BehaviorSubject as Q, Subject as Ut, filter as Wn, takeUntil as dt } from "rxjs";
|
|
12
|
+
import { DocSelectionManagerService as Kn, DocSkeletonManagerService as mt, RichTextEditingMutation as Gn } from "@univerjs/docs";
|
|
13
|
+
import { IEditorService as Ye, DocSelectionRenderService as ut, VIEWPORT_KEY as gt, DOCS_COMPONENT_MAIN_LAYER_INDEX as Xn, MoveSelectionOperation as Yn, MoveCursorOperation as Zn, DOCS_VIEW_KEY as kn, DeleteLeftCommand as qn } from "@univerjs/docs-ui";
|
|
14
|
+
import { DRAWING_IMAGE_ALLOW_IMAGE_LIST as Jn, IImageIoService as Qn, getImageSize as ei } from "@univerjs/drawing";
|
|
15
|
+
var ti = Object.defineProperty, ni = Object.getOwnPropertyDescriptor, ii = (i, e, t, n) => {
|
|
16
|
+
for (var r = n > 1 ? void 0 : n ? ni(e, t) : e, s = i.length - 1, o; s >= 0; s--)
|
|
17
|
+
(o = i[s]) && (r = (n ? o(e, t, r) : o(r)) || r);
|
|
18
|
+
return n && r && ti(e, t, r), r;
|
|
19
|
+
}, je = (i, e) => (t, n) => e(t, n, i);
|
|
20
|
+
let pe = class extends Ce {
|
|
21
|
+
constructor(e, t, n, r) {
|
|
23
22
|
super();
|
|
24
|
-
|
|
25
|
-
|
|
23
|
+
I(this, "_objectProvider", null);
|
|
24
|
+
I(this, "_refreshThumb", gn(() => {
|
|
26
25
|
this.createThumbs();
|
|
27
26
|
}, 300));
|
|
28
|
-
this._renderContext =
|
|
27
|
+
this._renderContext = e, this._injector = t, this._univerInstanceService = n, this._renderManagerService = r, this._objectProvider = this._injector.createInstance(Tn), this._addNewRender();
|
|
29
28
|
}
|
|
30
29
|
_addNewRender() {
|
|
31
|
-
const { unitId, engine, scene } = this._renderContext,
|
|
32
|
-
if (!
|
|
33
|
-
const
|
|
34
|
-
this._scrollToCenter(),
|
|
30
|
+
const { unitId: e, engine: t, scene: n } = this._renderContext, r = this._getCurrUnitModel();
|
|
31
|
+
if (!r) return;
|
|
32
|
+
const s = t.onTransformChange$.subscribeEvent(() => {
|
|
33
|
+
this._scrollToCenter(), s == null || s.unsubscribe();
|
|
35
34
|
});
|
|
36
|
-
|
|
35
|
+
t.onTransformChange$.subscribeEvent(() => {
|
|
37
36
|
setTimeout(() => {
|
|
38
37
|
this.createThumbs();
|
|
39
38
|
}, 300);
|
|
40
39
|
});
|
|
41
|
-
const
|
|
40
|
+
const o = new rt(oe.VIEW, n, {
|
|
42
41
|
left: 0,
|
|
43
42
|
top: 0,
|
|
44
43
|
bottom: 0,
|
|
@@ -47,97 +46,97 @@ let SlideRenderController = (_a = class extends RxDisposable {
|
|
|
47
46
|
explicitViewportHeightSet: !1,
|
|
48
47
|
isWheelPreventDefaultX: !0
|
|
49
48
|
});
|
|
50
|
-
|
|
51
|
-
const
|
|
52
|
-
if (
|
|
53
|
-
const
|
|
54
|
-
let
|
|
55
|
-
|
|
49
|
+
n.attachControl(), n.onMouseWheel$.subscribeEvent((c, g) => {
|
|
50
|
+
const l = c;
|
|
51
|
+
if (l.ctrlKey) {
|
|
52
|
+
const d = Math.abs(l.deltaX);
|
|
53
|
+
let p = d < 40 ? 0.2 : d < 80 ? 0.4 : 0.2;
|
|
54
|
+
p *= l.deltaY > 0 ? -1 : 1, n.scaleX < 1 && (p /= 2), n.scaleX + p > 4 ? n.scale(4, 4) : n.scaleX + p < 0.1 ? n.scale(0.1, 0.1) : (l.deltaY > 0, l.preventDefault());
|
|
56
55
|
} else
|
|
57
|
-
|
|
58
|
-
}),
|
|
56
|
+
o.onMouseWheel(l, g);
|
|
57
|
+
}), n.onFileLoaded$.subscribeEvent(() => {
|
|
59
58
|
this._refreshThumb();
|
|
60
|
-
}),
|
|
61
|
-
const
|
|
62
|
-
this._renderContext.mainComponent =
|
|
63
|
-
|
|
59
|
+
}), yt.attachTo(o), this._renderManagerService.setCurrent(e);
|
|
60
|
+
const a = this._createSlide(n);
|
|
61
|
+
this._renderContext.mainComponent = a, this._createSlidePages(r, a), this.createThumbs(), t.runRenderLoop(() => {
|
|
62
|
+
n.render();
|
|
64
63
|
});
|
|
65
64
|
}
|
|
66
65
|
_scrollToCenter() {
|
|
67
|
-
var
|
|
68
|
-
const
|
|
69
|
-
if (!
|
|
70
|
-
const { left:
|
|
71
|
-
|
|
72
|
-
x,
|
|
73
|
-
y
|
|
66
|
+
var c;
|
|
67
|
+
const e = (c = this._currentRender()) == null ? void 0 : c.scene, t = e == null ? void 0 : e.getViewport(oe.VIEW), n = this._getCenterPositionViewPort(e);
|
|
68
|
+
if (!t || !n) return;
|
|
69
|
+
const { left: r, top: s } = n, { x: o, y: a } = t.transViewportScroll2ScrollValue(r, s);
|
|
70
|
+
t.scrollToBarPos({
|
|
71
|
+
x: o,
|
|
72
|
+
y: a
|
|
74
73
|
});
|
|
75
74
|
}
|
|
76
75
|
_currentRender() {
|
|
77
|
-
return this._renderManagerService.getCurrentTypeOfRenderer(
|
|
76
|
+
return this._renderManagerService.getCurrentTypeOfRenderer(E.UNIVER_SLIDE);
|
|
78
77
|
}
|
|
79
78
|
/**
|
|
80
79
|
* @param mainScene
|
|
81
80
|
*/
|
|
82
|
-
_createSlide(
|
|
83
|
-
const
|
|
84
|
-
left: (
|
|
85
|
-
top: (
|
|
86
|
-
width,
|
|
87
|
-
height,
|
|
81
|
+
_createSlide(e) {
|
|
82
|
+
const t = this._univerInstanceService.getCurrentUnitForType(E.UNIVER_SLIDE), { width: n, height: r } = e, s = t.getPageSize(), { width: o = 100, height: a = 100 } = s, c = new xn(oe.COMPONENT, {
|
|
83
|
+
left: (n - o) / 2,
|
|
84
|
+
top: (r - a) / 2,
|
|
85
|
+
width: o,
|
|
86
|
+
height: a,
|
|
88
87
|
zIndex: 10
|
|
89
88
|
});
|
|
90
|
-
return
|
|
89
|
+
return c.enableSelectedClipElement(), e.addObject(c), c;
|
|
91
90
|
}
|
|
92
|
-
_addBackgroundRect(
|
|
93
|
-
const
|
|
91
|
+
_addBackgroundRect(e, t) {
|
|
92
|
+
const r = this._univerInstanceService.getCurrentUnitForType(E.UNIVER_SLIDE).getPageSize(), { width: s = 0, height: o = 0 } = r, a = new Mt("canvas", {
|
|
94
93
|
left: 0,
|
|
95
94
|
top: 0,
|
|
96
|
-
width:
|
|
97
|
-
height:
|
|
95
|
+
width: s,
|
|
96
|
+
height: o,
|
|
98
97
|
strokeWidth: 1,
|
|
99
98
|
stroke: "rgba(198,198,198,1)",
|
|
100
|
-
fill:
|
|
99
|
+
fill: hn(t) || "rgba(255,255,255,1)",
|
|
101
100
|
zIndex: 0,
|
|
102
101
|
evented: !1
|
|
103
102
|
});
|
|
104
|
-
|
|
103
|
+
e.addObject(a, 0);
|
|
105
104
|
}
|
|
106
|
-
_getCenterPositionViewPort(
|
|
107
|
-
if (!
|
|
108
|
-
const { width, height } =
|
|
105
|
+
_getCenterPositionViewPort(e) {
|
|
106
|
+
if (!e) return { left: 0, top: 0 };
|
|
107
|
+
const { width: t, height: n } = e, r = e.getEngine(), s = (r == null ? void 0 : r.width) || 0, o = (r == null ? void 0 : r.height) || 0;
|
|
109
108
|
return {
|
|
110
|
-
left: (
|
|
111
|
-
top: (
|
|
109
|
+
left: (t - s) / 2,
|
|
110
|
+
top: (n - o) / 2
|
|
112
111
|
};
|
|
113
112
|
}
|
|
114
|
-
_thumbSceneRender(
|
|
115
|
-
const
|
|
116
|
-
if (
|
|
113
|
+
_thumbSceneRender(e, t) {
|
|
114
|
+
const n = this._renderManagerService.getRenderById(e);
|
|
115
|
+
if (n == null)
|
|
117
116
|
return;
|
|
118
|
-
const { engine:
|
|
119
|
-
if (
|
|
117
|
+
const { engine: r } = n;
|
|
118
|
+
if (r == null)
|
|
120
119
|
return;
|
|
121
|
-
const { width, height } =
|
|
122
|
-
|
|
120
|
+
const { width: s, height: o } = t, { width: a = s, height: c = o } = r, g = r.getCanvas().getContext();
|
|
121
|
+
t.renderToThumb(g, e, a / s, c / o);
|
|
123
122
|
}
|
|
124
123
|
/**
|
|
125
124
|
* CreateScene by pages, and activate first one.
|
|
126
125
|
* @param slideDataModel
|
|
127
126
|
* @param slide
|
|
128
127
|
*/
|
|
129
|
-
_createSlidePages(
|
|
130
|
-
const
|
|
131
|
-
if (!(!
|
|
132
|
-
for (let
|
|
133
|
-
const
|
|
134
|
-
this.createPageScene(
|
|
128
|
+
_createSlidePages(e, t) {
|
|
129
|
+
const n = e.getPages(), r = e.getPageOrder();
|
|
130
|
+
if (!(!n || !r) && r.length !== 0) {
|
|
131
|
+
for (let s = 0, o = r.length; s < o; s++) {
|
|
132
|
+
const a = r[s];
|
|
133
|
+
this.createPageScene(a, n[a]), this._createThumb(a);
|
|
135
134
|
}
|
|
136
|
-
|
|
135
|
+
t.activeFirstPage();
|
|
137
136
|
}
|
|
138
137
|
}
|
|
139
|
-
_createThumb(
|
|
140
|
-
this._renderManagerService.createRender(
|
|
138
|
+
_createThumb(e) {
|
|
139
|
+
this._renderManagerService.createRender(e);
|
|
141
140
|
}
|
|
142
141
|
/**
|
|
143
142
|
* SlideDataModel is UnitModel
|
|
@@ -145,34 +144,34 @@ let SlideRenderController = (_a = class extends RxDisposable {
|
|
|
145
144
|
_getCurrUnitModel() {
|
|
146
145
|
return this._renderContext.unit;
|
|
147
146
|
}
|
|
148
|
-
activePage(
|
|
149
|
-
let
|
|
150
|
-
const
|
|
151
|
-
let
|
|
152
|
-
if (
|
|
153
|
-
|
|
147
|
+
activePage(e) {
|
|
148
|
+
let t = e;
|
|
149
|
+
const n = this._getCurrUnitModel();
|
|
150
|
+
let r;
|
|
151
|
+
if (t)
|
|
152
|
+
r = n.getPage(t);
|
|
154
153
|
else {
|
|
155
|
-
const
|
|
156
|
-
if (
|
|
154
|
+
const c = n.getPages(), g = n.getPageOrder();
|
|
155
|
+
if (g == null || c == null)
|
|
157
156
|
return;
|
|
158
|
-
|
|
157
|
+
r = c[g[0]], t = r.id;
|
|
159
158
|
}
|
|
160
|
-
const
|
|
161
|
-
if (
|
|
159
|
+
const s = this._currentRender();
|
|
160
|
+
if (r == null || s == null || s.mainComponent == null)
|
|
162
161
|
return;
|
|
163
|
-
const { id } =
|
|
164
|
-
if (
|
|
165
|
-
|
|
162
|
+
const { id: o } = r, a = s.mainComponent;
|
|
163
|
+
if (n.setActivePage(r), a != null && a.hasPage(o)) {
|
|
164
|
+
a.changePage(o);
|
|
166
165
|
return;
|
|
167
166
|
}
|
|
168
|
-
this.createPageScene(
|
|
167
|
+
this.createPageScene(o, r);
|
|
169
168
|
}
|
|
170
169
|
createThumbs() {
|
|
171
|
-
const
|
|
172
|
-
if (!(!
|
|
173
|
-
for (let
|
|
174
|
-
const
|
|
175
|
-
this._thumbSceneRender(
|
|
170
|
+
const t = this._getCurrUnitModel().getPageOrder(), n = this._currentRender();
|
|
171
|
+
if (!(!t || !n) && t.length !== 0)
|
|
172
|
+
for (let r = 0, s = t.length; r < s; r++) {
|
|
173
|
+
const o = t[r];
|
|
174
|
+
this._thumbSceneRender(o, n.mainComponent);
|
|
176
175
|
}
|
|
177
176
|
}
|
|
178
177
|
/**
|
|
@@ -180,15 +179,15 @@ let SlideRenderController = (_a = class extends RxDisposable {
|
|
|
180
179
|
* @param pageId
|
|
181
180
|
* @param page
|
|
182
181
|
*/
|
|
183
|
-
createPageScene(
|
|
184
|
-
const
|
|
185
|
-
if (!
|
|
182
|
+
createPageScene(e, t) {
|
|
183
|
+
const n = this._renderContext;
|
|
184
|
+
if (!n || !this._objectProvider)
|
|
186
185
|
return;
|
|
187
|
-
const { scene:
|
|
188
|
-
width,
|
|
189
|
-
height
|
|
186
|
+
const { scene: r, mainComponent: s } = n, o = s, { width: a, height: c } = o, g = new yn(e, o, {
|
|
187
|
+
width: a,
|
|
188
|
+
height: c
|
|
190
189
|
});
|
|
191
|
-
new
|
|
190
|
+
new rt(`PageViewer_${e}`, g, {
|
|
192
191
|
left: 0,
|
|
193
192
|
top: 0,
|
|
194
193
|
bottom: 0,
|
|
@@ -196,511 +195,500 @@ let SlideRenderController = (_a = class extends RxDisposable {
|
|
|
196
195
|
explicitViewportWidthSet: !1,
|
|
197
196
|
explicitViewportHeightSet: !1
|
|
198
197
|
}).closeClip();
|
|
199
|
-
const { pageElements, pageBackgroundFill } =
|
|
200
|
-
if (!
|
|
201
|
-
this._addBackgroundRect(
|
|
202
|
-
|
|
198
|
+
const { pageElements: d, pageBackgroundFill: p } = t, v = this._objectProvider.convertToRenderObjects(d, r);
|
|
199
|
+
if (!v || !o) return;
|
|
200
|
+
this._addBackgroundRect(g, p), g.addObjects(v), g.initTransformer(), v.forEach((C) => {
|
|
201
|
+
g.attachTransformerTo(C);
|
|
203
202
|
});
|
|
204
|
-
const
|
|
205
|
-
return
|
|
206
|
-
this._thumbSceneRender(
|
|
207
|
-
}),
|
|
208
|
-
this._thumbSceneRender(
|
|
209
|
-
}),
|
|
203
|
+
const f = g.getTransformer();
|
|
204
|
+
return f == null || f.changeEnd$.subscribe(() => {
|
|
205
|
+
this._thumbSceneRender(e, o);
|
|
206
|
+
}), f == null || f.clearControl$.subscribe(() => {
|
|
207
|
+
this._thumbSceneRender(e, o);
|
|
208
|
+
}), o.addPageScene(g), g;
|
|
210
209
|
}
|
|
211
210
|
/**
|
|
212
211
|
* Get pageScene from Slide.
|
|
213
212
|
* @param pageId
|
|
214
213
|
* @returns {Scene, Engine, UnitModel} scene & engine & unit from renderContext
|
|
215
214
|
*/
|
|
216
|
-
getPageRenderUnit(
|
|
217
|
-
const
|
|
215
|
+
getPageRenderUnit(e) {
|
|
216
|
+
const n = this._renderContext.mainComponent.getSubScenes().get(e), { engine: r, unit: s } = this._renderContext;
|
|
218
217
|
return {
|
|
219
|
-
scene:
|
|
220
|
-
engine,
|
|
221
|
-
unit
|
|
218
|
+
scene: n,
|
|
219
|
+
engine: r,
|
|
220
|
+
unit: s
|
|
222
221
|
};
|
|
223
222
|
}
|
|
224
|
-
createObjectToPage(
|
|
225
|
-
const { scene } = this.getPageRenderUnit(
|
|
226
|
-
if (!
|
|
223
|
+
createObjectToPage(e, t) {
|
|
224
|
+
const { scene: n } = this.getPageRenderUnit(t);
|
|
225
|
+
if (!n || !this._objectProvider)
|
|
227
226
|
return;
|
|
228
|
-
const
|
|
229
|
-
if (
|
|
230
|
-
return
|
|
231
|
-
}
|
|
232
|
-
setObjectActiveByPage(
|
|
233
|
-
const { scene } = this.getPageRenderUnit(
|
|
234
|
-
if (!
|
|
235
|
-
const
|
|
236
|
-
|
|
237
|
-
}
|
|
238
|
-
removeObjectById(
|
|
239
|
-
const { scene } = this.getPageRenderUnit(
|
|
240
|
-
if (!
|
|
241
|
-
|
|
242
|
-
const
|
|
243
|
-
|
|
227
|
+
const r = this._objectProvider.convertToRenderObject(e, n);
|
|
228
|
+
if (r)
|
|
229
|
+
return n.addObject(r), n.attachTransformerTo(r), n.getLayer().makeDirty(), r;
|
|
230
|
+
}
|
|
231
|
+
setObjectActiveByPage(e, t) {
|
|
232
|
+
const { scene: n } = this.getPageRenderUnit(t);
|
|
233
|
+
if (!n) return;
|
|
234
|
+
const r = n.getTransformer();
|
|
235
|
+
r == null || r.activeAnObject(e);
|
|
236
|
+
}
|
|
237
|
+
removeObjectById(e, t) {
|
|
238
|
+
const { scene: n } = this.getPageRenderUnit(t);
|
|
239
|
+
if (!n) return;
|
|
240
|
+
n.removeObject(e);
|
|
241
|
+
const r = n.getTransformer();
|
|
242
|
+
r == null || r.clearControls();
|
|
244
243
|
}
|
|
245
244
|
appendPage() {
|
|
246
|
-
const
|
|
247
|
-
if (
|
|
245
|
+
const e = this._getCurrUnitModel(), t = e.getBlankPage(), n = this._currentRender();
|
|
246
|
+
if (t == null || n == null || n.mainComponent == null)
|
|
248
247
|
return;
|
|
249
|
-
const { id:
|
|
250
|
-
|
|
248
|
+
const { id: r } = t, s = n.mainComponent, o = this.createPageScene(r, t);
|
|
249
|
+
s && o && s.addPageScene(o), e.appendPage(t), e.setActivePage(t);
|
|
251
250
|
}
|
|
252
|
-
}
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
],
|
|
258
|
-
var
|
|
259
|
-
for (var
|
|
260
|
-
(
|
|
261
|
-
return
|
|
262
|
-
},
|
|
263
|
-
let
|
|
264
|
-
constructor(
|
|
265
|
-
super(), this._renderManagerService =
|
|
251
|
+
};
|
|
252
|
+
pe = ii([
|
|
253
|
+
je(1, Y(Ke)),
|
|
254
|
+
je(2, y),
|
|
255
|
+
je(3, Z)
|
|
256
|
+
], pe);
|
|
257
|
+
var ri = Object.defineProperty, si = Object.getOwnPropertyDescriptor, oi = (i, e, t, n) => {
|
|
258
|
+
for (var r = n > 1 ? void 0 : n ? si(e, t) : e, s = i.length - 1, o; s >= 0; s--)
|
|
259
|
+
(o = i[s]) && (r = (n ? o(e, t, r) : o(r)) || r);
|
|
260
|
+
return n && r && ri(e, t, r), r;
|
|
261
|
+
}, ai = (i, e) => (t, n) => e(t, n, i);
|
|
262
|
+
let N = class extends Ce {
|
|
263
|
+
constructor(i) {
|
|
264
|
+
super(), this._renderManagerService = i;
|
|
266
265
|
}
|
|
267
|
-
_getSlideRenderControllerFromRenderUnit(
|
|
268
|
-
return this._renderManagerService.getRenderById(
|
|
266
|
+
_getSlideRenderControllerFromRenderUnit(i) {
|
|
267
|
+
return this._renderManagerService.getRenderById(i).with(pe);
|
|
269
268
|
}
|
|
270
|
-
createThumbs(
|
|
271
|
-
this._getSlideRenderControllerFromRenderUnit(
|
|
269
|
+
createThumbs(i) {
|
|
270
|
+
this._getSlideRenderControllerFromRenderUnit(i).createThumbs();
|
|
272
271
|
}
|
|
273
|
-
activePage(
|
|
274
|
-
this._getSlideRenderControllerFromRenderUnit(
|
|
272
|
+
activePage(i, e) {
|
|
273
|
+
this._getSlideRenderControllerFromRenderUnit(e).activePage(i);
|
|
275
274
|
}
|
|
276
|
-
getRenderUnitByPageId(
|
|
277
|
-
return this._getSlideRenderControllerFromRenderUnit(
|
|
275
|
+
getRenderUnitByPageId(i, e) {
|
|
276
|
+
return this._getSlideRenderControllerFromRenderUnit(e).getPageRenderUnit(i);
|
|
278
277
|
}
|
|
279
|
-
createObjectToPage(
|
|
280
|
-
return this._getSlideRenderControllerFromRenderUnit(
|
|
278
|
+
createObjectToPage(i, e, t) {
|
|
279
|
+
return this._getSlideRenderControllerFromRenderUnit(t).createObjectToPage(i, e);
|
|
281
280
|
}
|
|
282
|
-
setObjectActiveByPage(
|
|
283
|
-
return this._getSlideRenderControllerFromRenderUnit(
|
|
281
|
+
setObjectActiveByPage(i, e, t) {
|
|
282
|
+
return this._getSlideRenderControllerFromRenderUnit(t).setObjectActiveByPage(i, e);
|
|
284
283
|
}
|
|
285
|
-
removeObjectById(
|
|
286
|
-
this._getSlideRenderControllerFromRenderUnit(
|
|
284
|
+
removeObjectById(i, e, t) {
|
|
285
|
+
this._getSlideRenderControllerFromRenderUnit(t).removeObjectById(i, e);
|
|
287
286
|
}
|
|
288
287
|
/**
|
|
289
288
|
* append blank page
|
|
290
289
|
*/
|
|
291
|
-
appendPage(
|
|
292
|
-
this._getSlideRenderControllerFromRenderUnit(
|
|
293
|
-
}
|
|
294
|
-
}
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
],
|
|
298
|
-
const
|
|
290
|
+
appendPage(i) {
|
|
291
|
+
this._getSlideRenderControllerFromRenderUnit(i).appendPage();
|
|
292
|
+
}
|
|
293
|
+
};
|
|
294
|
+
N = oi([
|
|
295
|
+
ai(0, Z)
|
|
296
|
+
], N);
|
|
297
|
+
const ci = "slides-ui.config", ht = {}, Vt = {
|
|
299
298
|
id: "slide.operation.delete-element",
|
|
300
|
-
type:
|
|
301
|
-
handler:
|
|
302
|
-
if (!(
|
|
303
|
-
const
|
|
304
|
-
if (!
|
|
305
|
-
const
|
|
306
|
-
return delete
|
|
307
|
-
}
|
|
299
|
+
type: V.OPERATION,
|
|
300
|
+
handler: (i, e) => {
|
|
301
|
+
if (!(e != null && e.id)) return !1;
|
|
302
|
+
const t = e.unitId, r = i.get(y).getUnit(t);
|
|
303
|
+
if (!r) return !1;
|
|
304
|
+
const s = r.getActivePage();
|
|
305
|
+
return delete s.pageElements[e.id], r.updatePage(s.id, s), i.get(N).removeObjectById(e.id, s.id, t), !0;
|
|
306
|
+
}
|
|
308
307
|
};
|
|
309
|
-
function
|
|
310
|
-
var
|
|
311
|
-
if (typeof
|
|
312
|
-
else if (typeof
|
|
313
|
-
var
|
|
314
|
-
for (
|
|
315
|
-
} else for (
|
|
308
|
+
function jt(i) {
|
|
309
|
+
var e, t, n = "";
|
|
310
|
+
if (typeof i == "string" || typeof i == "number") n += i;
|
|
311
|
+
else if (typeof i == "object") if (Array.isArray(i)) {
|
|
312
|
+
var r = i.length;
|
|
313
|
+
for (e = 0; e < r; e++) i[e] && (t = jt(i[e])) && (n && (n += " "), n += t);
|
|
314
|
+
} else for (t in i) i[t] && (n && (n += " "), n += t);
|
|
316
315
|
return n;
|
|
317
316
|
}
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
for (var e, t, f = 0, n = "", o = arguments.length; f < o; f++) (e = arguments[f]) && (t = r(e)) && (n && (n += " "), n += t);
|
|
317
|
+
function T() {
|
|
318
|
+
for (var i, e, t = 0, n = "", r = arguments.length; t < r; t++) (i = arguments[t]) && (e = jt(i)) && (n && (n += " "), n += e);
|
|
321
319
|
return n;
|
|
322
320
|
}
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
for (var p in s) Object.prototype.hasOwnProperty.call(s, p) && (t[p] = s[p]);
|
|
321
|
+
var U = function() {
|
|
322
|
+
return U = Object.assign || function(i) {
|
|
323
|
+
for (var e, t = 1, n = arguments.length; t < n; t++) {
|
|
324
|
+
e = arguments[t];
|
|
325
|
+
for (var r in e) Object.prototype.hasOwnProperty.call(e, r) && (i[r] = e[r]);
|
|
329
326
|
}
|
|
330
|
-
return
|
|
331
|
-
},
|
|
332
|
-
},
|
|
327
|
+
return i;
|
|
328
|
+
}, U.apply(this, arguments);
|
|
329
|
+
}, li = function(i, e) {
|
|
333
330
|
var t = {};
|
|
334
|
-
for (var
|
|
335
|
-
if (
|
|
336
|
-
for (var
|
|
337
|
-
e.indexOf(
|
|
331
|
+
for (var n in i) Object.prototype.hasOwnProperty.call(i, n) && e.indexOf(n) < 0 && (t[n] = i[n]);
|
|
332
|
+
if (i != null && typeof Object.getOwnPropertySymbols == "function")
|
|
333
|
+
for (var r = 0, n = Object.getOwnPropertySymbols(i); r < n.length; r++)
|
|
334
|
+
e.indexOf(n[r]) < 0 && Object.prototype.propertyIsEnumerable.call(i, n[r]) && (t[n[r]] = i[n[r]]);
|
|
338
335
|
return t;
|
|
339
|
-
},
|
|
340
|
-
var
|
|
341
|
-
return
|
|
336
|
+
}, F = $(function(i, e) {
|
|
337
|
+
var t = i.icon, n = i.id, r = i.className, s = i.extend, o = li(i, ["icon", "id", "className", "extend"]), a = "univerjs-icon univerjs-icon-".concat(n, " ").concat(r || "").trim(), c = Dt("_".concat(ui()));
|
|
338
|
+
return Bt(t, "".concat(n), { defIds: t.defIds, idSuffix: c.current }, U({ ref: e, className: a }, o), s);
|
|
342
339
|
});
|
|
343
|
-
function
|
|
344
|
-
return
|
|
345
|
-
return
|
|
340
|
+
function Bt(i, e, t, n, r) {
|
|
341
|
+
return H(i.tag, U(U({ key: e }, di(i, t, r)), n), (mi(i, t).children || []).map(function(s, o) {
|
|
342
|
+
return Bt(s, "".concat(e, "-").concat(i.tag, "-").concat(o), t, void 0, r);
|
|
346
343
|
}));
|
|
347
344
|
}
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
})), attrs;
|
|
345
|
+
function di(i, e, t) {
|
|
346
|
+
var n = U({}, i.attrs);
|
|
347
|
+
t != null && t.colorChannel1 && n.fill === "colorChannel1" && (n.fill = t.colorChannel1);
|
|
348
|
+
var r = e.defIds;
|
|
349
|
+
return !r || r.length === 0 || (i.tag === "use" && n["xlink:href"] && (n["xlink:href"] = n["xlink:href"] + e.idSuffix), Object.entries(n).forEach(function(s) {
|
|
350
|
+
var o = s[0], a = s[1];
|
|
351
|
+
typeof a == "string" && (n[o] = a.replace(/url\(#(.*)\)/, "url(#$1".concat(e.idSuffix, ")")));
|
|
352
|
+
})), n;
|
|
357
353
|
}
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
}) }) : node;
|
|
354
|
+
function mi(i, e) {
|
|
355
|
+
var t, n = e.defIds;
|
|
356
|
+
return !n || n.length === 0 ? i : i.tag === "defs" && (!((t = i.children) === null || t === void 0) && t.length) ? U(U({}, i), { children: i.children.map(function(r) {
|
|
357
|
+
return typeof r.attrs.id == "string" && n && n.indexOf(r.attrs.id) > -1 ? U(U({}, r), { attrs: U(U({}, r.attrs), { id: r.attrs.id + e.idSuffix }) }) : r;
|
|
358
|
+
}) }) : i;
|
|
364
359
|
}
|
|
365
|
-
|
|
366
|
-
function generateShortUuid() {
|
|
360
|
+
function ui() {
|
|
367
361
|
return Math.random().toString(36).substring(2, 8);
|
|
368
362
|
}
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
return createElement(IconBase, Object.assign({}, props, {
|
|
363
|
+
F.displayName = "UniverIcon";
|
|
364
|
+
var gi = { tag: "svg", attrs: { fill: "none", viewBox: "0 0 16 16", width: "1em", height: "1em" }, children: [{ tag: "path", attrs: { fill: "currentColor", d: "M2.2498 3.65005C2.2498 2.87685 2.87661 2.25005 3.64981 2.25005H7.9998C8.33118 2.25005 8.5998 1.98142 8.5998 1.65005C8.5998 1.31868 8.33118 1.05005 7.9998 1.05005H3.64981C2.21387 1.05005 1.0498 2.21411 1.0498 3.65005V12.35C1.0498 13.786 2.21386 14.95 3.6498 14.95H12.3498C13.7857 14.95 14.9498 13.786 14.9498 12.3501V8.00005C14.9498 7.66868 14.6812 7.40005 14.3498 7.40005C14.0184 7.40005 13.7498 7.66868 13.7498 8.00005V9.23974L12.2385 8.1063C11.7252 7.72129 11.0068 7.7723 10.5531 8.22605L9.00869 9.77041L6.73916 7.8251C6.24387 7.40055 5.5095 7.41278 5.02864 7.85359L2.2498 10.4009V3.65005ZM2.2498 12.0287V12.35C2.2498 13.1232 2.87661 13.75 3.6498 13.75H12.3498C13.123 13.75 13.7498 13.1232 13.7498 12.3501V10.7397L11.5186 9.06631C11.4829 9.03956 11.433 9.04314 11.4016 9.07458L9.92249 10.5537L11.1015 11.5642C11.3531 11.7799 11.3822 12.1587 11.1666 12.4103C10.9509 12.6619 10.5721 12.691 10.3205 12.4753L5.9582 8.7362C5.92384 8.70674 5.87288 8.70758 5.83952 8.73816L2.2498 12.0287Z", fillRule: "evenodd", clipRule: "evenodd" } }, { tag: "path", attrs: { fill: "currentColor", d: "M11.8097 1.14783C12.1411 1.14783 12.4097 1.41646 12.4097 1.74783V3.297H14.1541C14.4855 3.297 14.7541 3.56563 14.7541 3.897C14.7541 4.22837 14.4855 4.497 14.1541 4.497H12.4097V6.24167C12.4097 6.57304 12.1411 6.84167 11.8097 6.84167C11.4783 6.84167 11.2097 6.57304 11.2097 6.24167V4.497H9.6603C9.32893 4.497 9.0603 4.22837 9.0603 3.897C9.0603 3.56563 9.32893 3.297 9.6603 3.297H11.2097V1.74783C11.2097 1.41646 11.4783 1.14783 11.8097 1.14783Z" } }] }, Lt = $(function(i, e) {
|
|
365
|
+
return H(F, Object.assign({}, i, {
|
|
373
366
|
id: "add-image-single",
|
|
374
|
-
ref,
|
|
375
|
-
icon:
|
|
367
|
+
ref: e,
|
|
368
|
+
icon: gi
|
|
376
369
|
}));
|
|
377
370
|
});
|
|
378
|
-
|
|
379
|
-
var
|
|
380
|
-
return
|
|
371
|
+
Lt.displayName = "AddImageSingle";
|
|
372
|
+
var hi = { tag: "svg", attrs: { fill: "none", viewBox: "0 0 16 16", width: "1em", height: "1em" }, children: [{ tag: "path", attrs: { fill: "colorChannel1", d: "M11.0363 12.2367V14.0367C11.0363 14.3681 11.3049 14.6367 11.6363 14.6367C11.9676 14.6367 12.2363 14.3681 12.2363 14.0367V12.2367H14.0364C14.3677 12.2367 14.6364 11.9681 14.6364 11.6367C14.6364 11.3054 14.3677 11.0367 14.0364 11.0367H12.2363V9.23672C12.2363 8.90535 11.9676 8.63672 11.6363 8.63672C11.3049 8.63672 11.0363 8.90535 11.0363 9.23672V11.0367H9.23635C8.90498 11.0367 8.63635 11.3054 8.63635 11.6367C8.63635 11.9681 8.90498 12.2367 9.23635 12.2367H11.0363Z" } }, { tag: "path", attrs: { fill: "currentColor", d: "M2.56365 1.36377C1.90091 1.36377 1.36365 1.90103 1.36365 2.56377V6.16377C1.36365 6.82651 1.90091 7.36377 2.56365 7.36377H6.16365C6.82639 7.36377 7.36365 6.82651 7.36365 6.16377V2.56377C7.36365 1.90103 6.82639 1.36377 6.16365 1.36377H2.56365zM6.16365 2.56377H2.56365L2.56365 6.16377H6.16365V2.56377zM2.56365 8.63647C1.90091 8.63647 1.36365 9.17373 1.36365 9.83647V13.4365C1.36365 14.0992 1.90091 14.6365 2.56365 14.6365H6.16365C6.82639 14.6365 7.36365 14.0992 7.36365 13.4365V9.83647C7.36365 9.17373 6.82639 8.63647 6.16365 8.63647H2.56365zM6.16365 9.83647H2.56365L2.56365 13.4365H6.16365V9.83647zM9.83635 7.36377C9.17361 7.36377 8.63635 6.82651 8.63635 6.16377V2.56377C8.63635 1.90103 9.17361 1.36377 9.83635 1.36377H13.4364C14.0991 1.36377 14.6364 1.90103 14.6364 2.56377V6.16377C14.6364 6.82651 14.0991 7.36377 13.4364 7.36377H9.83635zM9.83635 6.16377V2.56377L13.4364 2.56377V6.16377H9.83635z", fillRule: "evenodd", clipRule: "evenodd" } }] }, At = $(function(i, e) {
|
|
373
|
+
return H(F, Object.assign({}, i, {
|
|
381
374
|
id: "autofill",
|
|
382
|
-
ref,
|
|
383
|
-
icon:
|
|
375
|
+
ref: e,
|
|
376
|
+
icon: hi
|
|
384
377
|
}));
|
|
385
378
|
});
|
|
386
|
-
|
|
387
|
-
var
|
|
388
|
-
return
|
|
379
|
+
At.displayName = "Autofill";
|
|
380
|
+
var pi = { tag: "svg", attrs: { fill: "none", viewBox: "0 0 17 16", width: "1em", height: "1em" }, children: [{ tag: "path", attrs: { fill: "currentColor", d: "M14.0045 4.4334C14.8881 4.4334 15.6045 3.71705 15.6045 2.8334 15.6045 1.94974 14.8881 1.2334 14.0045 1.2334H3.70449C2.82084 1.2334 2.10449 1.94974 2.10449 2.8334 2.10449 3.71705 2.82084 4.4334 3.70449 4.4334H14.0045zM14.4045 2.8334C14.4045 3.05431 14.2254 3.2334 14.0045 3.2334H3.70449C3.48358 3.2334 3.30449 3.05431 3.30449 2.8334 3.30449 2.61248 3.48358 2.4334 3.70449 2.4334H14.0045C14.2254 2.4334 14.4045 2.61249 14.4045 2.8334zM14.1544 8.5999C15.038 8.5999 15.7544 7.88356 15.7544 6.9999 15.7544 6.11625 15.038 5.3999 14.1544 5.3999H3.85439C2.97074 5.3999 2.25439 6.11625 2.25439 6.9999 2.25439 7.88356 2.97074 8.5999 3.85439 8.5999H14.1544zM14.5544 6.9999C14.5544 7.22082 14.3753 7.3999 14.1544 7.3999H3.85439C3.63348 7.3999 3.45439 7.22082 3.45439 6.9999 3.45439 6.77899 3.63348 6.5999 3.85439 6.5999H14.1544C14.3753 6.5999 14.5544 6.77899 14.5544 6.9999z", fillRule: "evenodd", clipRule: "evenodd" } }, { tag: "path", attrs: { fill: "currentColor", d: "M8.57975 14.5902L6.58023 12.5907C6.34591 12.3564 6.34591 11.9765 6.58023 11.7421 6.81454 11.5078 7.19444 11.5078 7.42876 11.7421L8.40449 12.7179V10.1664C8.40449 9.83504 8.67312 9.56641 9.00449 9.56641 9.33586 9.56641 9.60449 9.83504 9.60449 10.1664V12.7179L10.5802 11.7421C10.8145 11.5078 11.1944 11.5078 11.4288 11.7421 11.6631 11.9765 11.6631 12.3564 11.4288 12.5907L9.42923 14.5902M8.57975 14.5902C8.58121 14.5917 8.58268 14.5931 8.58416 14.5946 8.64077 14.6502 8.70566 14.6923 8.77482 14.7209 8.84557 14.7502 8.92314 14.7664 9.00449 14.7664 9.08585 14.7664 9.16342 14.7502 9.23416 14.7209 9.30332 14.6923 9.36821 14.6502 9.42482 14.5946" } }] }, $t = $(function(i, e) {
|
|
381
|
+
return H(F, Object.assign({}, i, {
|
|
389
382
|
id: "bottom-single",
|
|
390
|
-
ref,
|
|
391
|
-
icon:
|
|
383
|
+
ref: e,
|
|
384
|
+
icon: pi
|
|
392
385
|
}));
|
|
393
386
|
});
|
|
394
|
-
|
|
395
|
-
var
|
|
396
|
-
return
|
|
387
|
+
$t.displayName = "BottomSingle";
|
|
388
|
+
var Ci = { tag: "svg", attrs: { fill: "none", viewBox: "0 0 17 16", width: "1em", height: "1em" }, children: [{ tag: "g", attrs: { clipPath: "url(#graph-single_clip0_1293_28)" }, children: [{ tag: "path", attrs: { fill: "currentColor", d: "M6.29541 11.1896C3.83208 10.7489 1.9624 8.59552 1.9624 6.00544C1.9624 3.09673 4.32036 0.73877 7.22907 0.73877C9.93483 0.73877 12.164 2.77918 12.4619 5.40527H13.5621C14.998 5.40527 16.1621 6.56933 16.1621 8.00527V12.6719C16.1621 14.1079 14.998 15.2719 13.5621 15.2719H8.89541C7.45947 15.2719 6.29541 14.1079 6.29541 12.6719V11.1896ZM3.1624 6.00544C3.1624 3.75947 4.98311 1.93877 7.22907 1.93877C9.27112 1.93877 10.9616 3.44388 11.2518 5.40527H8.89541C7.45947 5.40527 6.29541 6.56933 6.29541 8.00527V9.96442C4.49946 9.5425 3.1624 7.93012 3.1624 6.00544ZM7.49541 8.00527C7.49541 7.23207 8.12221 6.60527 8.89541 6.60527H13.5621C14.3353 6.60527 14.9621 7.23207 14.9621 8.00527V12.6719C14.9621 13.4451 14.3353 14.0719 13.5621 14.0719H8.89541C8.12221 14.0719 7.49541 13.4451 7.49541 12.6719V8.00527Z", fillRule: "evenodd", clipRule: "evenodd" } }] }, { tag: "defs", attrs: {}, children: [{ tag: "clipPath", attrs: { id: "graph-single_clip0_1293_28" }, children: [{ tag: "path", attrs: { fill: "#fff", d: "M0 0H16V16H0z", transform: "translate(.9)" } }] }] }], defIds: ["graph-single_clip0_1293_28"] }, Ht = $(function(i, e) {
|
|
389
|
+
return H(F, Object.assign({}, i, {
|
|
397
390
|
id: "graph-single",
|
|
398
|
-
ref,
|
|
399
|
-
icon:
|
|
391
|
+
ref: e,
|
|
392
|
+
icon: Ci
|
|
400
393
|
}));
|
|
401
394
|
});
|
|
402
|
-
|
|
403
|
-
var
|
|
404
|
-
return
|
|
395
|
+
Ht.displayName = "GraphSingle";
|
|
396
|
+
var fi = { tag: "svg", attrs: { fill: "none", viewBox: "0 0 16 16", width: "1em", height: "1em" }, children: [{ tag: "path", attrs: { fill: "currentColor", d: "M11.3536 6.14645C11.5488 6.34171 11.5488 6.65829 11.3536 6.85355L8.35355 9.85355C8.15829 10.0488 7.84171 10.0488 7.64645 9.85355L4.64645 6.85355C4.45118 6.65829 4.45118 6.34171 4.64645 6.14645C4.84171 5.95118 5.15829 5.95118 5.35355 6.14645L8 8.79289L10.6464 6.14645C10.8417 5.95118 11.1583 5.95118 11.3536 6.14645Z", fillRule: "evenodd", clipRule: "evenodd" } }] }, Ze = $(function(i, e) {
|
|
397
|
+
return H(F, Object.assign({}, i, {
|
|
405
398
|
id: "more-down-single",
|
|
406
|
-
ref,
|
|
407
|
-
icon:
|
|
399
|
+
ref: e,
|
|
400
|
+
icon: fi
|
|
408
401
|
}));
|
|
409
402
|
});
|
|
410
|
-
|
|
411
|
-
var
|
|
412
|
-
return
|
|
403
|
+
Ze.displayName = "MoreDownSingle";
|
|
404
|
+
var vi = { tag: "svg", attrs: { fill: "none", viewBox: "0 0 16 16", width: "1em", height: "1em" }, children: [{ tag: "path", attrs: { fill: "currentColor", d: "M1.25 2.96401C1.25 3.84767 1.96634 4.56401 2.85 4.56401H13.15C14.0337 4.56401 14.75 3.84767 14.75 2.96401C14.75 2.08036 14.0337 1.36401 13.15 1.36401H2.85C1.96635 1.36401 1.25 2.08036 1.25 2.96401ZM2.85 3.36401C2.62909 3.36401 2.45 3.18493 2.45 2.96401C2.45 2.7431 2.62909 2.56401 2.85 2.56401H13.15C13.3709 2.56401 13.55 2.7431 13.55 2.96401C13.55 3.18493 13.3709 3.36401 13.15 3.36401H2.85Z", fillRule: "evenodd", clipRule: "evenodd" } }, { tag: "path", attrs: { fill: "currentColor", d: "M5.57564 11.6118C5.80995 11.3774 6.18985 11.3774 6.42417 11.6118L7.3999 12.5875V6.36951C7.3999 6.03814 7.66853 5.76951 7.9999 5.76951C8.33127 5.76951 8.5999 6.03814 8.5999 6.36951V12.5875L9.57564 11.6118C9.80995 11.3774 10.1899 11.3774 10.4242 11.6118C10.6585 11.8461 10.6585 12.226 10.4242 12.4603L8.4324 14.452C8.32324 14.5655 8.16982 14.6362 7.9999 14.6362C7.82998 14.6362 7.67655 14.5655 7.56739 14.452L5.57564 12.4603C5.34132 12.226 5.34132 11.8461 5.57564 11.6118Z" } }] }, Ft = $(function(i, e) {
|
|
405
|
+
return H(F, Object.assign({}, i, {
|
|
413
406
|
id: "move-down-single",
|
|
414
|
-
ref,
|
|
415
|
-
icon:
|
|
407
|
+
ref: e,
|
|
408
|
+
icon: vi
|
|
416
409
|
}));
|
|
417
410
|
});
|
|
418
|
-
|
|
419
|
-
var
|
|
420
|
-
return
|
|
411
|
+
Ft.displayName = "MoveDownSingle";
|
|
412
|
+
var _i = { tag: "svg", attrs: { fill: "none", viewBox: "0 0 16 16", width: "1em", height: "1em" }, children: [{ tag: "path", attrs: { fill: "currentColor", d: "M1.25 13.036C1.25 12.1523 1.96634 11.436 2.85 11.436H13.15C14.0337 11.436 14.75 12.1523 14.75 13.036C14.75 13.9196 14.0337 14.636 13.15 14.636H2.85C1.96635 14.636 1.25 13.9196 1.25 13.036ZM2.85 12.636C2.62909 12.636 2.45 12.8151 2.45 13.036C2.45 13.2569 2.62909 13.436 2.85 13.436H13.15C13.3709 13.436 13.55 13.2569 13.55 13.036C13.55 12.8151 13.3709 12.636 13.15 12.636H2.85Z", fillRule: "evenodd", clipRule: "evenodd" } }, { tag: "path", attrs: { fill: "currentColor", d: "M5.57564 4.38825C5.80995 4.62256 6.18985 4.62256 6.42417 4.38825L7.3999 3.41251V9.63049C7.3999 9.96186 7.66853 10.2305 7.9999 10.2305C8.33127 10.2305 8.5999 9.96186 8.5999 9.63049V3.41251L9.57564 4.38825C9.80995 4.62256 10.1899 4.62256 10.4242 4.38825C10.6585 4.15393 10.6585 3.77403 10.4242 3.53972L8.4324 1.54796C8.32324 1.43445 8.16982 1.36382 7.9999 1.36382C7.82998 1.36382 7.67655 1.43446 7.56739 1.54797L5.57564 3.53972C5.34132 3.77403 5.34132 4.15393 5.57564 4.38825Z" } }] }, zt = $(function(i, e) {
|
|
413
|
+
return H(F, Object.assign({}, i, {
|
|
421
414
|
id: "move-up-single",
|
|
422
|
-
ref,
|
|
423
|
-
icon:
|
|
415
|
+
ref: e,
|
|
416
|
+
icon: _i
|
|
424
417
|
}));
|
|
425
418
|
});
|
|
426
|
-
|
|
427
|
-
var
|
|
428
|
-
return
|
|
419
|
+
zt.displayName = "MoveUpSingle";
|
|
420
|
+
var Si = { tag: "svg", attrs: { fill: "none", viewBox: "0 0 16 16", width: "1em", height: "1em" }, children: [{ tag: "mask", attrs: { id: "mask0_102_1204", style: { maskType: "alpha" }, width: 16, height: 16, x: 0, y: 0, maskUnits: "userSpaceOnUse" }, children: [{ tag: "path", attrs: { fill: "#DCDCDC", d: "M0 0H16V16H0z" } }] }, { tag: "g", attrs: { mask: "url(#mask0_102_1204)" }, children: [{ tag: "rect", attrs: { width: 12.62, height: 2.79, x: 1.69, y: 12.25, fill: "colorChannel1", rx: 1.4 } }, { tag: "path", attrs: { fill: "currentColor", d: "M7.74646 2.1642C7.34284 1.65121 6.85947 1.28205 6.38447 1.09593C5.86863 0.893787 5.15166 0.852126 4.70047 1.42917C4.29842 1.94344 4.33082 2.70249 4.57691 3.50395C4.68808 3.8661 4.86846 4.22254 5.12522 4.56617C5.13695 4.58185 5.14927 4.5968 5.16211 4.61102C5.17152 4.6214 5.18122 4.63139 5.19115 4.64096C5.20459 4.65393 5.21855 4.66618 5.23296 4.6777L3.5064 6.40422C3.26756 6.64306 3.26756 7.03033 3.5064 7.26919L7.23756 11.0004C7.47648 11.2392 7.86375 11.2392 8.1026 11.0004L12.8329 6.27001C13.0717 6.03117 13.0717 5.6439 12.8329 5.40505L9.10172 1.67387C8.86288 1.43503 8.47561 1.43503 8.23676 1.67387L7.74646 2.1642ZM7.46162 4.50638C7.47252 4.57574 7.48163 4.64652 7.4888 4.71868C7.52232 5.05481 7.82194 5.30013 8.15807 5.26661C8.4942 5.23311 8.73954 4.93345 8.70601 4.59732C8.65786 4.11463 8.54251 3.6666 8.37892 3.26169L8.66928 2.97135L11.5354 5.83753L10.6106 6.76237H4.87824L7.40802 4.2326C7.42885 4.32128 7.44684 4.41255 7.46162 4.50638ZM6.87284 3.03784C6.57441 2.62008 6.22261 2.34634 5.93815 2.23487C5.80233 2.18165 5.71528 2.17827 5.67638 2.18335C5.6725 2.18387 5.66929 2.18443 5.6666 2.18497L5.6619 2.18607C5.64166 2.21954 5.53594 2.45979 5.74626 3.1449C5.81241 3.36036 5.92262 3.58602 6.09307 3.81761L6.87284 3.03784Z", fillRule: "evenodd", clipRule: "evenodd" } }, { tag: "path", attrs: { fill: "currentColor", d: "M12.1932 11.5463C12.6454 11.5463 13.012 11.1797 13.012 10.7275C13.012 10.4475 12.6981 9.92821 12.459 9.5733C12.3299 9.38173 12.0564 9.38174 11.9274 9.57331C11.6883 9.92822 11.3744 10.4475 11.3744 10.7275C11.3744 11.1797 11.741 11.5463 12.1932 11.5463Z" } }] }] }, Wt = $(function(i, e) {
|
|
421
|
+
return H(F, Object.assign({}, i, {
|
|
429
422
|
id: "paint-bucket",
|
|
430
|
-
ref,
|
|
431
|
-
icon:
|
|
423
|
+
ref: e,
|
|
424
|
+
icon: Si
|
|
432
425
|
}));
|
|
433
426
|
});
|
|
434
|
-
|
|
435
|
-
var
|
|
436
|
-
return
|
|
427
|
+
Wt.displayName = "PaintBucket";
|
|
428
|
+
var Ii = { tag: "svg", attrs: { fill: "none", viewBox: "0 0 17 16", width: "1em", height: "1em" }, children: [{ tag: "g", attrs: { fill: "currentColor", clipPath: "url(#text-single_clip0_1293_26)" }, children: [{ tag: "path", attrs: { d: "M2.22891 2.07227C1.89754 2.07227 1.62891 2.34089 1.62891 2.67227C1.62891 3.00364 1.89754 3.27227 2.22891 3.27227H6.29541V14.0056C6.29541 14.337 6.56404 14.6056 6.89541 14.6056C7.22678 14.6056 7.49541 14.337 7.49541 14.0056V3.27227H11.5622C11.8936 3.27227 12.1622 3.00364 12.1622 2.67227C12.1622 2.34089 11.8936 2.07227 11.5622 2.07227H2.22891Z" } }, { tag: "path", attrs: { d: "M10.2289 6.40552C9.89754 6.40552 9.62891 6.67415 9.62891 7.00552C9.62891 7.33689 9.89754 7.60552 10.2289 7.60552H12.2954V14.0055C12.2954 14.3369 12.564 14.6055 12.8954 14.6055C13.2268 14.6055 13.4954 14.3369 13.4954 14.0055V7.60552H15.5622C15.8936 7.60552 16.1622 7.33689 16.1622 7.00552C16.1622 6.67415 15.8936 6.40552 15.5622 6.40552H10.2289Z" } }] }, { tag: "defs", attrs: {}, children: [{ tag: "clipPath", attrs: { id: "text-single_clip0_1293_26" }, children: [{ tag: "path", attrs: { fill: "#fff", d: "M0 0H16V16H0z", transform: "translate(.9)" } }] }] }], defIds: ["text-single_clip0_1293_26"] }, Kt = $(function(i, e) {
|
|
429
|
+
return H(F, Object.assign({}, i, {
|
|
437
430
|
id: "text-single",
|
|
438
|
-
ref,
|
|
439
|
-
icon:
|
|
431
|
+
ref: e,
|
|
432
|
+
icon: Ii
|
|
440
433
|
}));
|
|
441
434
|
});
|
|
442
|
-
|
|
443
|
-
var
|
|
444
|
-
return
|
|
435
|
+
Kt.displayName = "TextSingle";
|
|
436
|
+
var Pi = { tag: "svg", attrs: { fill: "none", viewBox: "0 0 17 16", width: "1em", height: "1em" }, children: [{ tag: "path", attrs: { fill: "currentColor", d: "M7.82994 1.40913C7.88746 1.35161 7.95376 1.30821 8.02453 1.27893C8.09527 1.24959 8.17285 1.2334 8.2542 1.2334C8.33555 1.2334 8.41313 1.24959 8.48387 1.27893C8.55464 1.30821 8.62094 1.35161 8.67846 1.40913L10.6785 3.40913C10.9128 3.64345 10.9128 4.02335 10.6785 4.25766C10.4441 4.49198 10.0642 4.49198 9.82994 4.25766L8.8542 3.28193V5.8334C8.8542 6.16477 8.58557 6.4334 8.2542 6.4334C7.92283 6.4334 7.6542 6.16477 7.6542 5.8334V3.28193L6.67846 4.25766C6.44415 4.49198 6.06425 4.49198 5.82994 4.25766C5.59562 4.02335 5.59562 3.64345 5.82994 3.40913L7.82994 1.40913Z" } }, { tag: "path", attrs: { fill: "currentColor", d: "M1.50439 9C1.50439 8.11634 2.22074 7.4 3.10439 7.4H13.4044C14.288 7.4 15.0044 8.11634 15.0044 9 15.0044 9.88366 14.2881 10.6 13.4044 10.6H3.1044C2.22074 10.6 1.50439 9.88366 1.50439 9zM3.10439 8.6C2.88348 8.6 2.70439 8.77909 2.70439 9 2.70439 9.22091 2.88348 9.4 3.1044 9.4H13.4044C13.6253 9.4 13.8044 9.22091 13.8044 9 13.8044 8.77909 13.6253 8.6 13.4044 8.6H3.10439zM1.6543 13.1665C1.6543 12.2828 2.37064 11.5665 3.2543 11.5665H13.5543C14.438 11.5665 15.1543 12.2828 15.1543 13.1665 15.1543 14.0502 14.438 14.7665 13.5543 14.7665H3.2543C2.37064 14.7665 1.6543 14.0502 1.6543 13.1665zM3.2543 12.7665C3.03338 12.7665 2.8543 12.9456 2.8543 13.1665 2.8543 13.3874 3.03338 13.5665 3.2543 13.5665H13.5543C13.7752 13.5665 13.9543 13.3874 13.9543 13.1665 13.9543 12.9456 13.7752 12.7665 13.5543 12.7665H3.2543z", fillRule: "evenodd", clipRule: "evenodd" } }] }, Gt = $(function(i, e) {
|
|
437
|
+
return H(F, Object.assign({}, i, {
|
|
445
438
|
id: "topmost-single",
|
|
446
|
-
ref,
|
|
447
|
-
icon:
|
|
439
|
+
ref: e,
|
|
440
|
+
icon: Pi
|
|
448
441
|
}));
|
|
449
442
|
});
|
|
450
|
-
|
|
451
|
-
const
|
|
443
|
+
Gt.displayName = "TopmostSingle";
|
|
444
|
+
const K = {
|
|
452
445
|
id: "slide.operation.update-element",
|
|
453
|
-
type:
|
|
454
|
-
handler:
|
|
455
|
-
const { oKey, props } =
|
|
456
|
-
if (!
|
|
457
|
-
const
|
|
458
|
-
return
|
|
459
|
-
}
|
|
460
|
-
},
|
|
461
|
-
imageCommonPanel:
|
|
462
|
-
imageCommonPanelGrid:
|
|
463
|
-
imageCommonPanelBorder:
|
|
464
|
-
imageCommonPanelTitle:
|
|
465
|
-
imageCommonPanelSubtitle:
|
|
466
|
-
imageCommonPanelRow:
|
|
467
|
-
imageCommonPanelRowVertical:
|
|
468
|
-
imageCommonPanelColumn:
|
|
469
|
-
imageCommonPanelColumnCenter:
|
|
470
|
-
imageCommonPanelInline:
|
|
471
|
-
imageCommonPanelSpan2:
|
|
472
|
-
imageCommonPanelSpan3:
|
|
473
|
-
imageCommonPanelInput:
|
|
474
|
-
slidePanelColorPicker
|
|
446
|
+
type: V.OPERATION,
|
|
447
|
+
handler: (i, e) => {
|
|
448
|
+
const { oKey: t, props: n } = e, r = i.get(y), s = e == null ? void 0 : e.unitId, o = r.getUnit(s);
|
|
449
|
+
if (!o) return !1;
|
|
450
|
+
const a = o.getActivePage();
|
|
451
|
+
return a.pageElements[t] = pn.deepMerge(a.pageElements[t], n), o.updatePage(a.id, a), !0;
|
|
452
|
+
}
|
|
453
|
+
}, bi = "univer-image-common-panel", Ei = "univer-image-common-panel-grid", Ri = "univer-image-common-panel-border", Oi = "univer-image-common-panel-title", xi = "univer-image-common-panel-subtitle", yi = "univer-image-common-panel-row", Mi = "univer-image-common-panel-row-vertical", Ti = "univer-image-common-panel-column", wi = "univer-image-common-panel-column-center", Ni = "univer-image-common-panel-inline", Di = "univer-image-common-panel-span2", Ui = "univer-image-common-panel-span3", Vi = "univer-image-common-panel-input", ji = "univer-slide-panel-color-picker", u = {
|
|
454
|
+
imageCommonPanel: bi,
|
|
455
|
+
imageCommonPanelGrid: Ei,
|
|
456
|
+
imageCommonPanelBorder: Ri,
|
|
457
|
+
imageCommonPanelTitle: Oi,
|
|
458
|
+
imageCommonPanelSubtitle: xi,
|
|
459
|
+
imageCommonPanelRow: yi,
|
|
460
|
+
imageCommonPanelRowVertical: Mi,
|
|
461
|
+
imageCommonPanelColumn: Ti,
|
|
462
|
+
imageCommonPanelColumnCenter: wi,
|
|
463
|
+
imageCommonPanelInline: Ni,
|
|
464
|
+
imageCommonPanelSpan2: Di,
|
|
465
|
+
imageCommonPanelSpan3: Ui,
|
|
466
|
+
imageCommonPanelInput: Vi,
|
|
467
|
+
slidePanelColorPicker: ji
|
|
475
468
|
};
|
|
476
|
-
function
|
|
477
|
-
const { pageId, unitId } =
|
|
478
|
-
if (!
|
|
479
|
-
const
|
|
480
|
-
if (!
|
|
481
|
-
const
|
|
482
|
-
if (!
|
|
483
|
-
const
|
|
484
|
-
const
|
|
485
|
-
const
|
|
486
|
-
return [
|
|
469
|
+
function Bi(i) {
|
|
470
|
+
const { pageId: e, unitId: t } = i, n = x(ee), r = x(N), s = x(j), o = r.getRenderUnitByPageId(e, t), a = o == null ? void 0 : o.scene;
|
|
471
|
+
if (!a) return null;
|
|
472
|
+
const c = a.getTransformer();
|
|
473
|
+
if (!c) return null;
|
|
474
|
+
const l = c.getSelectedObjectMap().values().next().value;
|
|
475
|
+
if (!l) return null;
|
|
476
|
+
const d = (p) => {
|
|
477
|
+
const v = a.getAllObjects(), [f, C] = v.reduce(([_, P], b) => {
|
|
478
|
+
const w = b.zIndex, D = w < _ ? w : _, B = w > P ? w : P;
|
|
479
|
+
return [D, B];
|
|
487
480
|
}, [0, 0]);
|
|
488
|
-
let
|
|
489
|
-
|
|
490
|
-
zIndex
|
|
491
|
-
}),
|
|
492
|
-
unitId,
|
|
493
|
-
oKey:
|
|
481
|
+
let h = l.zIndex;
|
|
482
|
+
p === 3 ? h = f - 1 : p === 2 ? h = C + 1 : p === 0 ? h = l.zIndex + 1 : p === 1 && (h = l.zIndex - 1), l.setProps({
|
|
483
|
+
zIndex: h
|
|
484
|
+
}), s.executeCommand(K.id, {
|
|
485
|
+
unitId: t,
|
|
486
|
+
oKey: l == null ? void 0 : l.oKey,
|
|
494
487
|
props: {
|
|
495
|
-
zIndex
|
|
488
|
+
zIndex: h
|
|
496
489
|
}
|
|
497
490
|
});
|
|
498
|
-
}
|
|
499
|
-
return /* @__PURE__ */
|
|
500
|
-
/* @__PURE__ */
|
|
501
|
-
/* @__PURE__ */
|
|
502
|
-
/* @__PURE__ */
|
|
503
|
-
|
|
491
|
+
};
|
|
492
|
+
return /* @__PURE__ */ R("div", { className: u.imageCommonPanelGrid, children: [
|
|
493
|
+
/* @__PURE__ */ m("div", { className: u.imageCommonPanelRow, children: /* @__PURE__ */ m("div", { className: T(u.imageCommonPanelColumn, u.imageCommonPanelTitle), children: /* @__PURE__ */ m("div", { children: n.t("image-panel.arrange.title") }) }) }),
|
|
494
|
+
/* @__PURE__ */ R("div", { className: u.imageCommonPanelRow, children: [
|
|
495
|
+
/* @__PURE__ */ m("div", { className: T(u.imageCommonPanelColumn, u.imageCommonPanelSpan2), children: /* @__PURE__ */ m(Pe, { size: "small", onClick: () => {
|
|
496
|
+
d(
|
|
504
497
|
0
|
|
505
498
|
/* forward */
|
|
506
499
|
);
|
|
507
|
-
},
|
|
508
|
-
/* @__PURE__ */
|
|
509
|
-
|
|
500
|
+
}, children: /* @__PURE__ */ R("span", { className: u.imageCommonPanelInline, children: [
|
|
501
|
+
/* @__PURE__ */ m(zt, {}),
|
|
502
|
+
n.t("image-panel.arrange.forward")
|
|
510
503
|
] }) }) }),
|
|
511
|
-
/* @__PURE__ */
|
|
512
|
-
|
|
504
|
+
/* @__PURE__ */ m("div", { className: T(u.imageCommonPanelColumn, u.imageCommonPanelSpan2), children: /* @__PURE__ */ m(Pe, { size: "small", onClick: () => {
|
|
505
|
+
d(
|
|
513
506
|
1
|
|
514
507
|
/* backward */
|
|
515
508
|
);
|
|
516
|
-
},
|
|
517
|
-
/* @__PURE__ */
|
|
518
|
-
|
|
509
|
+
}, children: /* @__PURE__ */ R("span", { className: u.imageCommonPanelInline, children: [
|
|
510
|
+
/* @__PURE__ */ m(Ft, {}),
|
|
511
|
+
n.t("image-panel.arrange.backward")
|
|
519
512
|
] }) }) })
|
|
520
513
|
] }),
|
|
521
|
-
/* @__PURE__ */
|
|
522
|
-
/* @__PURE__ */
|
|
523
|
-
|
|
514
|
+
/* @__PURE__ */ R("div", { className: u.imageCommonPanelRow, children: [
|
|
515
|
+
/* @__PURE__ */ m("div", { className: T(u.imageCommonPanelColumn, u.imageCommonPanelSpan2), children: /* @__PURE__ */ m(Pe, { size: "small", onClick: () => {
|
|
516
|
+
d(
|
|
524
517
|
2
|
|
525
518
|
/* front */
|
|
526
519
|
);
|
|
527
|
-
},
|
|
528
|
-
/* @__PURE__ */
|
|
529
|
-
|
|
520
|
+
}, children: /* @__PURE__ */ R("span", { className: u.imageCommonPanelInline, children: [
|
|
521
|
+
/* @__PURE__ */ m(Gt, {}),
|
|
522
|
+
n.t("image-panel.arrange.front")
|
|
530
523
|
] }) }) }),
|
|
531
|
-
/* @__PURE__ */
|
|
532
|
-
|
|
524
|
+
/* @__PURE__ */ m("div", { className: T(u.imageCommonPanelColumn, u.imageCommonPanelSpan2), children: /* @__PURE__ */ m(Pe, { size: "small", onClick: () => {
|
|
525
|
+
d(
|
|
533
526
|
3
|
|
534
527
|
/* back */
|
|
535
528
|
);
|
|
536
|
-
},
|
|
537
|
-
/* @__PURE__ */
|
|
538
|
-
|
|
529
|
+
}, children: /* @__PURE__ */ R("span", { className: u.imageCommonPanelInline, children: [
|
|
530
|
+
/* @__PURE__ */ m($t, {}),
|
|
531
|
+
n.t("image-panel.arrange.back")
|
|
539
532
|
] }) }) })
|
|
540
533
|
] })
|
|
541
534
|
] });
|
|
542
535
|
}
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
if (!object) return null;
|
|
536
|
+
function Li(i) {
|
|
537
|
+
const { pageId: e, unitId: t } = i, n = x(ee), r = x(N), s = x(j), o = r.getRenderUnitByPageId(e, t), a = o == null ? void 0 : o.scene;
|
|
538
|
+
if (!a) return null;
|
|
539
|
+
const c = a.getTransformer();
|
|
540
|
+
if (!c) return null;
|
|
541
|
+
const l = c.getSelectedObjectMap().values().next().value;
|
|
542
|
+
if (!l) return null;
|
|
551
543
|
const {
|
|
552
|
-
width:
|
|
553
|
-
height:
|
|
554
|
-
left:
|
|
555
|
-
top:
|
|
556
|
-
angle:
|
|
557
|
-
} =
|
|
558
|
-
const { objects } =
|
|
559
|
-
width:
|
|
560
|
-
height:
|
|
561
|
-
left:
|
|
562
|
-
top:
|
|
563
|
-
angle:
|
|
564
|
-
} =
|
|
565
|
-
|
|
566
|
-
}
|
|
567
|
-
|
|
568
|
-
const
|
|
569
|
-
|
|
570
|
-
}),
|
|
571
|
-
|
|
544
|
+
width: d = 0,
|
|
545
|
+
height: p = 0,
|
|
546
|
+
left: v = 0,
|
|
547
|
+
top: f = 0,
|
|
548
|
+
angle: C = 0
|
|
549
|
+
} = l, [h, _] = X(d), [P, b] = X(p), [w, D] = X(v), [B, O] = X(f), [G, ce] = X(C), z = (S) => {
|
|
550
|
+
const { objects: le } = S, de = le.values().next().value, {
|
|
551
|
+
width: on = 0,
|
|
552
|
+
height: an = 0,
|
|
553
|
+
left: cn = 0,
|
|
554
|
+
top: ln = 0,
|
|
555
|
+
angle: dn = 0
|
|
556
|
+
} = de;
|
|
557
|
+
_(on), b(an), D(cn), O(ln), ce(dn);
|
|
558
|
+
};
|
|
559
|
+
he(() => {
|
|
560
|
+
const S = c.changeStart$.subscribe((de) => {
|
|
561
|
+
z(de);
|
|
562
|
+
}), le = c.changing$.subscribe((de) => {
|
|
563
|
+
z(de);
|
|
572
564
|
});
|
|
573
565
|
return () => {
|
|
574
|
-
|
|
566
|
+
le.unsubscribe(), S.unsubscribe();
|
|
575
567
|
};
|
|
576
568
|
}, []);
|
|
577
|
-
function
|
|
578
|
-
!
|
|
579
|
-
pageId,
|
|
580
|
-
oKey:
|
|
569
|
+
function W(S) {
|
|
570
|
+
!S || !l || (s.executeCommand(K.id, {
|
|
571
|
+
pageId: e,
|
|
572
|
+
oKey: l.oKey,
|
|
581
573
|
props: {
|
|
582
|
-
width:
|
|
574
|
+
width: S
|
|
583
575
|
}
|
|
584
|
-
}),
|
|
576
|
+
}), l == null || l.resize(S, l.height), _(S), c == null || c.refreshControls());
|
|
585
577
|
}
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
oKey: object.oKey,
|
|
578
|
+
function te(S) {
|
|
579
|
+
!S || !l || (s.executeCommand(K.id, {
|
|
580
|
+
pageId: e,
|
|
581
|
+
oKey: l.oKey,
|
|
591
582
|
props: {
|
|
592
|
-
height:
|
|
583
|
+
height: S
|
|
593
584
|
}
|
|
594
|
-
}),
|
|
585
|
+
}), l == null || l.resize(l.width, S), b(S), c == null || c.refreshControls());
|
|
595
586
|
}
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
oKey: object.oKey,
|
|
587
|
+
function ne(S) {
|
|
588
|
+
!S || !l || (s.executeCommand(K.id, {
|
|
589
|
+
pageId: e,
|
|
590
|
+
oKey: l.oKey,
|
|
601
591
|
props: {
|
|
602
|
-
left:
|
|
592
|
+
left: S
|
|
603
593
|
}
|
|
604
|
-
}),
|
|
594
|
+
}), l == null || l.translate(S, l.top), D(S), c == null || c.refreshControls());
|
|
605
595
|
}
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
oKey: object.oKey,
|
|
596
|
+
function Se(S) {
|
|
597
|
+
!S || !l || (s.executeCommand(K.id, {
|
|
598
|
+
pageId: e,
|
|
599
|
+
oKey: l.oKey,
|
|
611
600
|
props: {
|
|
612
|
-
right:
|
|
601
|
+
right: S
|
|
613
602
|
}
|
|
614
|
-
}),
|
|
603
|
+
}), l == null || l.translate(l.left, S), O(S), c == null || c.refreshControls());
|
|
615
604
|
}
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
oKey: object.oKey,
|
|
605
|
+
function Ie(S) {
|
|
606
|
+
!S || !l || (s.executeCommand(K.id, {
|
|
607
|
+
pageId: e,
|
|
608
|
+
oKey: l.oKey,
|
|
621
609
|
props: {
|
|
622
|
-
angle:
|
|
610
|
+
angle: S
|
|
623
611
|
}
|
|
624
|
-
}),
|
|
625
|
-
angle:
|
|
626
|
-
}),
|
|
612
|
+
}), l == null || l.transformByState({
|
|
613
|
+
angle: S
|
|
614
|
+
}), ce(S), c == null || c.refreshControls());
|
|
627
615
|
}
|
|
628
|
-
return
|
|
616
|
+
return /* @__PURE__ */ R(
|
|
629
617
|
"div",
|
|
630
618
|
{
|
|
631
|
-
className:
|
|
619
|
+
className: T(u.imageCommonPanelGrid, u.imageCommonPanelBorder),
|
|
632
620
|
children: [
|
|
633
|
-
/* @__PURE__ */
|
|
634
|
-
/* @__PURE__ */
|
|
635
|
-
/* @__PURE__ */
|
|
636
|
-
/* @__PURE__ */
|
|
637
|
-
/* @__PURE__ */
|
|
638
|
-
|
|
621
|
+
/* @__PURE__ */ m("div", { className: u.imageCommonPanelRow, children: /* @__PURE__ */ m("div", { className: T(u.imageCommonPanelColumn, u.imageCommonPanelTitle), children: /* @__PURE__ */ m("div", { children: n.t("image-panel.transform.title") }) }) }),
|
|
622
|
+
/* @__PURE__ */ R("div", { className: u.imageCommonPanelRow, children: [
|
|
623
|
+
/* @__PURE__ */ m("div", { className: T(u.imageCommonPanelColumn, u.imageCommonPanelSpan3), children: /* @__PURE__ */ R("label", { children: [
|
|
624
|
+
/* @__PURE__ */ m("div", { className: u.imageCommonPanelRow, children: /* @__PURE__ */ m("div", { className: u.imageCommonPanelColumn, children: n.t("image-panel.transform.width") }) }),
|
|
625
|
+
/* @__PURE__ */ m("div", { className: u.imageCommonPanelRow, children: /* @__PURE__ */ m("div", { className: u.imageCommonPanelColumn, children: /* @__PURE__ */ m(
|
|
626
|
+
me,
|
|
639
627
|
{
|
|
640
|
-
className:
|
|
628
|
+
className: u.imageCommonPanelInput,
|
|
641
629
|
min: 1,
|
|
642
|
-
value:
|
|
643
|
-
onChange:
|
|
644
|
-
|
|
645
|
-
}
|
|
630
|
+
value: h,
|
|
631
|
+
onChange: (S) => {
|
|
632
|
+
W(S);
|
|
633
|
+
}
|
|
646
634
|
}
|
|
647
635
|
) }) })
|
|
648
636
|
] }) }),
|
|
649
|
-
/* @__PURE__ */
|
|
650
|
-
/* @__PURE__ */
|
|
651
|
-
/* @__PURE__ */
|
|
652
|
-
|
|
637
|
+
/* @__PURE__ */ m("div", { className: T(u.imageCommonPanelColumn, u.imageCommonPanelSpan3), children: /* @__PURE__ */ R("label", { children: [
|
|
638
|
+
/* @__PURE__ */ m("div", { className: u.imageCommonPanelRow, children: /* @__PURE__ */ m("div", { className: u.imageCommonPanelColumn, children: n.t("image-panel.transform.height") }) }),
|
|
639
|
+
/* @__PURE__ */ m("div", { className: u.imageCommonPanelRow, children: /* @__PURE__ */ m("div", { className: u.imageCommonPanelColumn, children: /* @__PURE__ */ m(
|
|
640
|
+
me,
|
|
653
641
|
{
|
|
654
|
-
className:
|
|
642
|
+
className: u.imageCommonPanelInput,
|
|
655
643
|
min: 1,
|
|
656
|
-
value:
|
|
657
|
-
onChange:
|
|
658
|
-
|
|
659
|
-
}
|
|
644
|
+
value: P,
|
|
645
|
+
onChange: (S) => {
|
|
646
|
+
te(S);
|
|
647
|
+
}
|
|
660
648
|
}
|
|
661
649
|
) }) })
|
|
662
650
|
] }) })
|
|
663
651
|
] }),
|
|
664
|
-
/* @__PURE__ */
|
|
665
|
-
/* @__PURE__ */
|
|
666
|
-
/* @__PURE__ */
|
|
667
|
-
/* @__PURE__ */
|
|
668
|
-
|
|
652
|
+
/* @__PURE__ */ R("div", { className: u.imageCommonPanelRow, children: [
|
|
653
|
+
/* @__PURE__ */ m("div", { className: T(u.imageCommonPanelColumn, u.imageCommonPanelSpan3), children: /* @__PURE__ */ R("label", { children: [
|
|
654
|
+
/* @__PURE__ */ m("div", { className: u.imageCommonPanelRow, children: /* @__PURE__ */ m("div", { className: u.imageCommonPanelColumn, children: n.t("image-panel.transform.x") }) }),
|
|
655
|
+
/* @__PURE__ */ m("div", { className: u.imageCommonPanelRow, children: /* @__PURE__ */ m("div", { className: u.imageCommonPanelColumn, children: /* @__PURE__ */ m(
|
|
656
|
+
me,
|
|
669
657
|
{
|
|
670
|
-
className:
|
|
658
|
+
className: u.imageCommonPanelInput,
|
|
671
659
|
precision: 1,
|
|
672
660
|
min: 0,
|
|
673
|
-
value:
|
|
674
|
-
onChange:
|
|
675
|
-
|
|
676
|
-
}
|
|
661
|
+
value: w,
|
|
662
|
+
onChange: (S) => {
|
|
663
|
+
ne(S);
|
|
664
|
+
}
|
|
677
665
|
}
|
|
678
666
|
) }) })
|
|
679
667
|
] }) }),
|
|
680
|
-
/* @__PURE__ */
|
|
681
|
-
/* @__PURE__ */
|
|
682
|
-
/* @__PURE__ */
|
|
683
|
-
|
|
668
|
+
/* @__PURE__ */ m("div", { className: T(u.imageCommonPanelColumn, u.imageCommonPanelSpan3), children: /* @__PURE__ */ R("label", { children: [
|
|
669
|
+
/* @__PURE__ */ m("div", { className: u.imageCommonPanelRow, children: /* @__PURE__ */ m("div", { className: u.imageCommonPanelColumn, children: n.t("image-panel.transform.y") }) }),
|
|
670
|
+
/* @__PURE__ */ m("div", { className: u.imageCommonPanelRow, children: /* @__PURE__ */ m("div", { className: u.imageCommonPanelColumn, children: /* @__PURE__ */ m(
|
|
671
|
+
me,
|
|
684
672
|
{
|
|
685
|
-
className:
|
|
673
|
+
className: u.imageCommonPanelInput,
|
|
686
674
|
precision: 1,
|
|
687
675
|
min: 0,
|
|
688
|
-
value:
|
|
689
|
-
onChange:
|
|
690
|
-
|
|
691
|
-
}
|
|
676
|
+
value: B,
|
|
677
|
+
onChange: (S) => {
|
|
678
|
+
Se(S);
|
|
679
|
+
}
|
|
692
680
|
}
|
|
693
681
|
) }) })
|
|
694
682
|
] }) }),
|
|
695
|
-
/* @__PURE__ */
|
|
696
|
-
/* @__PURE__ */
|
|
697
|
-
/* @__PURE__ */
|
|
698
|
-
|
|
683
|
+
/* @__PURE__ */ m("div", { className: T(u.imageCommonPanelColumn, u.imageCommonPanelSpan3), children: /* @__PURE__ */ R("label", { children: [
|
|
684
|
+
/* @__PURE__ */ m("div", { className: u.imageCommonPanelRow, children: /* @__PURE__ */ m("div", { className: u.imageCommonPanelColumn, children: n.t("image-panel.transform.rotate") }) }),
|
|
685
|
+
/* @__PURE__ */ m("div", { className: u.imageCommonPanelRow, children: /* @__PURE__ */ m("div", { className: u.imageCommonPanelColumn, children: /* @__PURE__ */ m(
|
|
686
|
+
me,
|
|
699
687
|
{
|
|
700
|
-
className:
|
|
688
|
+
className: u.imageCommonPanelInput,
|
|
701
689
|
precision: 1,
|
|
702
|
-
value:
|
|
703
|
-
onChange:
|
|
690
|
+
value: G,
|
|
691
|
+
onChange: Ie
|
|
704
692
|
}
|
|
705
693
|
) }) })
|
|
706
694
|
] }) })
|
|
@@ -709,55 +697,54 @@ function TransformPanel(props) {
|
|
|
709
697
|
}
|
|
710
698
|
);
|
|
711
699
|
}
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
oKey: object == null ? void 0 : object.oKey,
|
|
700
|
+
function Ai(i) {
|
|
701
|
+
var f, C;
|
|
702
|
+
const { pageId: e, unitId: t } = i, n = x(ee), r = x(N), s = x(j), o = r.getRenderUnitByPageId(e, t), a = o == null ? void 0 : o.scene;
|
|
703
|
+
if (!a) return null;
|
|
704
|
+
const c = a.getTransformer();
|
|
705
|
+
if (!c) return null;
|
|
706
|
+
const l = c.getSelectedObjectMap().values().next().value;
|
|
707
|
+
if (!l) return null;
|
|
708
|
+
const [d, p] = Nt.useState((C = (f = l.fill) == null ? void 0 : f.toString()) != null ? C : "");
|
|
709
|
+
function v(h) {
|
|
710
|
+
l == null || l.setProps({
|
|
711
|
+
fill: h
|
|
712
|
+
}), s.executeCommand(K.id, {
|
|
713
|
+
unitId: t,
|
|
714
|
+
oKey: l == null ? void 0 : l.oKey,
|
|
728
715
|
props: {
|
|
729
716
|
shape: {
|
|
730
717
|
shapeProperties: {
|
|
731
718
|
shapeBackgroundFill: {
|
|
732
|
-
rgb:
|
|
719
|
+
rgb: h
|
|
733
720
|
}
|
|
734
721
|
}
|
|
735
722
|
}
|
|
736
723
|
}
|
|
737
|
-
}),
|
|
724
|
+
}), p(h);
|
|
738
725
|
}
|
|
739
|
-
return
|
|
726
|
+
return /* @__PURE__ */ m(
|
|
740
727
|
"div",
|
|
741
728
|
{
|
|
742
|
-
className:
|
|
743
|
-
children: /* @__PURE__ */
|
|
744
|
-
/* @__PURE__ */
|
|
745
|
-
/* @__PURE__ */
|
|
746
|
-
|
|
729
|
+
className: T(u.imageCommonPanelGrid, u.imageCommonPanelBorder),
|
|
730
|
+
children: /* @__PURE__ */ R("div", { className: u.imageCommonPanelGrid, children: [
|
|
731
|
+
/* @__PURE__ */ m("div", { className: u.imageCommonPanelRow, children: /* @__PURE__ */ m("div", { className: T(u.imageCommonPanelColumn, u.imageCommonPanelTitle), children: /* @__PURE__ */ m("div", { children: n.t("slide.panel.fill.title") }) }) }),
|
|
732
|
+
/* @__PURE__ */ m("div", { className: u.imageCommonPanelRow, children: /* @__PURE__ */ m("div", { className: T(u.imageCommonPanelColumn, u.imageCommonPanelSpan2), children: /* @__PURE__ */ m(
|
|
733
|
+
wt,
|
|
747
734
|
{
|
|
748
735
|
align: {
|
|
749
736
|
offset: [0, 18]
|
|
750
737
|
},
|
|
751
|
-
overlay: /* @__PURE__ */
|
|
752
|
-
|
|
738
|
+
overlay: /* @__PURE__ */ m("section", { className: u.slidePanelColorPicker, children: /* @__PURE__ */ m(
|
|
739
|
+
Hn,
|
|
753
740
|
{
|
|
754
741
|
value: "#fff",
|
|
755
|
-
onChange:
|
|
742
|
+
onChange: v
|
|
756
743
|
}
|
|
757
744
|
) }),
|
|
758
|
-
children: /* @__PURE__ */
|
|
759
|
-
/* @__PURE__ */
|
|
760
|
-
/* @__PURE__ */
|
|
745
|
+
children: /* @__PURE__ */ R("a", { className: u.uiPluginSheetsBorderPanelButton, children: [
|
|
746
|
+
/* @__PURE__ */ m(Wt, { extend: { colorChannel1: d != null ? d : "rgb(var(--primary-color))" } }),
|
|
747
|
+
/* @__PURE__ */ m("span", { className: u.uiPluginSheetsBorderPanelMoreIcon, children: /* @__PURE__ */ m(Ze, {}) })
|
|
761
748
|
] })
|
|
762
749
|
}
|
|
763
750
|
) }) })
|
|
@@ -765,65 +752,63 @@ function ArrangePanel(props) {
|
|
|
765
752
|
}
|
|
766
753
|
);
|
|
767
754
|
}
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
if (!object)
|
|
755
|
+
const $i = "univer-image-common-panel", Hi = "univer-image-common-panel-grid", Fi = "univer-image-common-panel-border", zi = "univer-image-common-panel-title", Wi = "univer-image-common-panel-subtitle", Ki = "univer-image-common-panel-row", Gi = "univer-image-common-panel-row-vertical", Xi = "univer-image-common-panel-column", Yi = "univer-image-common-panel-column-center", Zi = "univer-image-common-panel-inline", ki = "univer-image-common-panel-span2", qi = "univer-image-common-panel-span3", Ji = "univer-image-common-panel-input", Qi = {
|
|
756
|
+
imageCommonPanel: $i,
|
|
757
|
+
imageCommonPanelGrid: Hi,
|
|
758
|
+
imageCommonPanelBorder: Fi,
|
|
759
|
+
imageCommonPanelTitle: zi,
|
|
760
|
+
imageCommonPanelSubtitle: Wi,
|
|
761
|
+
imageCommonPanelRow: Ki,
|
|
762
|
+
imageCommonPanelRowVertical: Gi,
|
|
763
|
+
imageCommonPanelColumn: Xi,
|
|
764
|
+
imageCommonPanelColumnCenter: Yi,
|
|
765
|
+
imageCommonPanelInline: Zi,
|
|
766
|
+
imageCommonPanelSpan2: ki,
|
|
767
|
+
imageCommonPanelSpan3: qi,
|
|
768
|
+
imageCommonPanelInput: Ji
|
|
769
|
+
}, Oe = "COMPONENT_SLIDE_SIDEBAR";
|
|
770
|
+
function er() {
|
|
771
|
+
var g, l, d;
|
|
772
|
+
const i = x(y), e = x(N), t = i.getCurrentUnitForType(E.UNIVER_SLIDE), n = (g = t == null ? void 0 : t.getActivePage()) == null ? void 0 : g.id;
|
|
773
|
+
if (!n) return null;
|
|
774
|
+
const s = (l = e.getRenderUnitByPageId(n, n).scene) == null ? void 0 : l.getTransformer();
|
|
775
|
+
if (!s) return null;
|
|
776
|
+
const a = s.getSelectedObjectMap().values().next().value;
|
|
777
|
+
if (!a)
|
|
792
778
|
return null;
|
|
793
|
-
const
|
|
794
|
-
return /* @__PURE__ */
|
|
795
|
-
/* @__PURE__ */
|
|
796
|
-
/* @__PURE__ */
|
|
797
|
-
|
|
779
|
+
const c = ((d = i.getFocusedUnit()) == null ? void 0 : d.getUnitId()) || "";
|
|
780
|
+
return /* @__PURE__ */ R("section", { className: Qi.imageCommonPanel, children: [
|
|
781
|
+
/* @__PURE__ */ m(Bi, { pageId: n, unitId: c }),
|
|
782
|
+
/* @__PURE__ */ m(Li, { pageId: n, unitId: c }),
|
|
783
|
+
a.objectType === ge.RECT && /* @__PURE__ */ m(Ai, { pageId: n, unitId: c })
|
|
798
784
|
] });
|
|
799
785
|
}
|
|
800
|
-
|
|
801
|
-
const InsertSlideShapeRectangleCommand = {
|
|
786
|
+
const ke = {
|
|
802
787
|
id: "slide.command.insert-float-shape",
|
|
803
|
-
type:
|
|
804
|
-
handler:
|
|
805
|
-
var
|
|
806
|
-
const
|
|
807
|
-
return
|
|
808
|
-
}
|
|
809
|
-
},
|
|
788
|
+
type: V.COMMAND,
|
|
789
|
+
handler: async (i) => {
|
|
790
|
+
var r;
|
|
791
|
+
const e = i.get(j), n = (r = i.get(y).getFocusedUnit()) == null ? void 0 : r.getUnitId();
|
|
792
|
+
return e.executeCommand(Xt.id, { unitId: n });
|
|
793
|
+
}
|
|
794
|
+
}, Xt = {
|
|
810
795
|
id: "slide.operation.insert-float-shape",
|
|
811
|
-
type:
|
|
812
|
-
handler:
|
|
813
|
-
const
|
|
814
|
-
if (!
|
|
815
|
-
const
|
|
816
|
-
id,
|
|
817
|
-
zIndex:
|
|
796
|
+
type: V.OPERATION,
|
|
797
|
+
handler: async (i, e) => {
|
|
798
|
+
const t = St(6), n = i.get(y), r = e.unitId, s = n.getUnit(r);
|
|
799
|
+
if (!s) return !1;
|
|
800
|
+
const o = s.getActivePage(), a = Object.values(o.pageElements), c = a != null && a.length ? Math.max(...a.map((p) => p.zIndex)) : 20, g = {
|
|
801
|
+
id: t,
|
|
802
|
+
zIndex: c + 1,
|
|
818
803
|
left: 378,
|
|
819
804
|
top: 142,
|
|
820
805
|
width: 250,
|
|
821
806
|
height: 250,
|
|
822
|
-
title:
|
|
807
|
+
title: t,
|
|
823
808
|
description: "",
|
|
824
|
-
type:
|
|
809
|
+
type: Ge.SHAPE,
|
|
825
810
|
shape: {
|
|
826
|
-
shapeType:
|
|
811
|
+
shapeType: Cn.Rect,
|
|
827
812
|
text: "",
|
|
828
813
|
shapeProperties: {
|
|
829
814
|
shapeBackgroundFill: {
|
|
@@ -832,256 +817,252 @@ const InsertSlideShapeRectangleCommand = {
|
|
|
832
817
|
}
|
|
833
818
|
}
|
|
834
819
|
};
|
|
835
|
-
|
|
836
|
-
const
|
|
837
|
-
return
|
|
838
|
-
}
|
|
839
|
-
},
|
|
820
|
+
o.pageElements[t] = g, s.updatePage(o.id, o);
|
|
821
|
+
const l = i.get(N), d = l.createObjectToPage(g, o.id, r);
|
|
822
|
+
return d && l.setObjectActiveByPage(d, o.id, r), !0;
|
|
823
|
+
}
|
|
824
|
+
}, $e = {
|
|
840
825
|
id: "sidebar.operation.slide-shape",
|
|
841
|
-
type:
|
|
842
|
-
handler:
|
|
843
|
-
const { visible, objectType } =
|
|
844
|
-
let
|
|
845
|
-
return
|
|
846
|
-
header: { title:
|
|
847
|
-
children: { label:
|
|
848
|
-
onClose:
|
|
849
|
-
},
|
|
826
|
+
type: V.COMMAND,
|
|
827
|
+
handler: async (i, e) => {
|
|
828
|
+
const { visible: t, objectType: n } = e, r = i.get(Tt), s = i.get(ee);
|
|
829
|
+
let o = "", a = "";
|
|
830
|
+
return n === ge.RECT ? (o = "slide.sidebar.shape", a = Oe) : n === ge.IMAGE ? (o = "slide.sidebar.image", a = Oe) : n === ge.RICH_TEXT && (o = "slide.sidebar.text", a = Oe), t ? r.open({
|
|
831
|
+
header: { title: s.t(o) },
|
|
832
|
+
children: { label: a },
|
|
833
|
+
onClose: () => {
|
|
834
|
+
},
|
|
850
835
|
width: 360
|
|
851
|
-
}) :
|
|
852
|
-
}
|
|
853
|
-
},
|
|
854
|
-
var
|
|
855
|
-
for (var
|
|
856
|
-
(
|
|
857
|
-
return
|
|
858
|
-
},
|
|
859
|
-
function
|
|
860
|
-
const
|
|
836
|
+
}) : r.close(), !0;
|
|
837
|
+
}
|
|
838
|
+
}, Yt = "COMPONENT_SLIDE_IMAGE_POPUP_MENU";
|
|
839
|
+
var tr = Object.defineProperty, nr = Object.getOwnPropertyDescriptor, ir = (i, e, t, n) => {
|
|
840
|
+
for (var r = n > 1 ? void 0 : n ? nr(e, t) : e, s = i.length - 1, o; s >= 0; s--)
|
|
841
|
+
(o = i[s]) && (r = (n ? o(e, t, r) : o(r)) || r);
|
|
842
|
+
return n && r && tr(e, t, r), r;
|
|
843
|
+
}, be = (i, e) => (t, n) => e(t, n, i);
|
|
844
|
+
function rr(i, e) {
|
|
845
|
+
const t = pt(i.left, i.top, e), n = pt(i.right, i.bottom, e);
|
|
861
846
|
return {
|
|
862
|
-
left:
|
|
863
|
-
top:
|
|
864
|
-
right:
|
|
865
|
-
bottom:
|
|
847
|
+
left: t.x,
|
|
848
|
+
top: t.y,
|
|
849
|
+
right: n.x,
|
|
850
|
+
bottom: n.y
|
|
866
851
|
};
|
|
867
852
|
}
|
|
868
|
-
|
|
869
|
-
|
|
870
|
-
|
|
871
|
-
if (!viewMain)
|
|
853
|
+
function pt(i, e, t) {
|
|
854
|
+
const { scaleX: n, scaleY: r } = t.getAncestorScale(), s = t.getViewport(oe.VIEW);
|
|
855
|
+
if (!s)
|
|
872
856
|
return {
|
|
873
|
-
x,
|
|
874
|
-
y
|
|
857
|
+
x: i,
|
|
858
|
+
y: e
|
|
875
859
|
};
|
|
876
|
-
const { viewportScrollX:
|
|
860
|
+
const { viewportScrollX: o, viewportScrollY: a } = s, c = (i - o) * n, g = (e - a) * r;
|
|
877
861
|
return {
|
|
878
|
-
x:
|
|
879
|
-
y:
|
|
862
|
+
x: c,
|
|
863
|
+
y: g
|
|
880
864
|
};
|
|
881
865
|
}
|
|
882
|
-
|
|
883
|
-
|
|
884
|
-
|
|
885
|
-
|
|
886
|
-
|
|
887
|
-
|
|
888
|
-
|
|
889
|
-
|
|
890
|
-
|
|
891
|
-
|
|
892
|
-
|
|
893
|
-
|
|
894
|
-
|
|
895
|
-
bottom: top + height
|
|
896
|
-
}, canvasElement = engine.getCanvasElement(), canvasClientRect = canvasElement.getBoundingClientRect(), widthOfCanvas = pxToNum(canvasElement.style.width), { scaleX, scaleY } = scene.getAncestorScale(), offsetBound = transformBound2OffsetBound(bound, scene), { top: topOffset, left: leftOffset, width: domWidth } = canvasClientRect, scaleAdjust = domWidth / widthOfCanvas;
|
|
866
|
+
let Me = class extends Ve {
|
|
867
|
+
constructor(i, e, t, n) {
|
|
868
|
+
super(), this._globalPopupManagerService = i, this._renderManagerService = e, this._univerInstanceService = t, this._commandService = n;
|
|
869
|
+
}
|
|
870
|
+
_createObjectPositionObserver(i, e) {
|
|
871
|
+
const n = (() => {
|
|
872
|
+
var z, W, te, ne;
|
|
873
|
+
const { scene: o, engine: a } = e, { left: c, top: g, width: l, height: d } = i, p = (o.width - ((W = (z = e.mainComponent) == null ? void 0 : z.width) != null ? W : 0)) / 2, v = (o.height - ((ne = (te = e.mainComponent) == null ? void 0 : te.height) != null ? ne : 0)) / 2, f = {
|
|
874
|
+
left: c,
|
|
875
|
+
right: c + l,
|
|
876
|
+
top: g,
|
|
877
|
+
bottom: g + d
|
|
878
|
+
}, C = a.getCanvasElement(), h = C.getBoundingClientRect(), _ = Mn(C.style.width), { scaleX: P, scaleY: b } = o.getAncestorScale(), w = rr(f, o), { top: D, left: B, width: O } = h, G = O / _;
|
|
897
879
|
return {
|
|
898
|
-
left:
|
|
899
|
-
right:
|
|
900
|
-
top:
|
|
901
|
-
bottom:
|
|
880
|
+
left: w.left * G * P + B + p,
|
|
881
|
+
right: w.right * G * P + B + p,
|
|
882
|
+
top: w.top * G * b + D + v,
|
|
883
|
+
bottom: w.bottom * G * b + D + v
|
|
902
884
|
};
|
|
903
|
-
}
|
|
885
|
+
})(), r = new Q(n), s = new Xe();
|
|
904
886
|
return {
|
|
905
|
-
position,
|
|
906
|
-
position
|
|
907
|
-
disposable
|
|
887
|
+
position: n,
|
|
888
|
+
position$: r,
|
|
889
|
+
disposable: s
|
|
908
890
|
};
|
|
909
891
|
}
|
|
910
|
-
attachPopupToObject(
|
|
911
|
-
const
|
|
912
|
-
if (!
|
|
892
|
+
attachPopupToObject(i, e) {
|
|
893
|
+
const n = this._univerInstanceService.getCurrentUnitForType(E.UNIVER_SLIDE).getUnitId(), r = this._renderManagerService.getRenderById(n);
|
|
894
|
+
if (!r)
|
|
913
895
|
return {
|
|
914
|
-
dispose:
|
|
915
|
-
}
|
|
896
|
+
dispose: () => {
|
|
897
|
+
}
|
|
916
898
|
};
|
|
917
|
-
const { position, position
|
|
918
|
-
...
|
|
919
|
-
unitId,
|
|
899
|
+
const { position: s, position$: o, disposable: a } = this._createObjectPositionObserver(i, r), c = this._globalPopupManagerService.addPopup({
|
|
900
|
+
...e,
|
|
901
|
+
unitId: n,
|
|
920
902
|
subUnitId: "default",
|
|
921
|
-
anchorRect:
|
|
922
|
-
anchorRect$:
|
|
923
|
-
canvasElement:
|
|
903
|
+
anchorRect: s,
|
|
904
|
+
anchorRect$: o,
|
|
905
|
+
canvasElement: r.engine.getCanvasElement()
|
|
924
906
|
});
|
|
925
907
|
return {
|
|
926
|
-
dispose:
|
|
927
|
-
this._globalPopupManagerService.removePopup(
|
|
928
|
-
}
|
|
908
|
+
dispose: () => {
|
|
909
|
+
this._globalPopupManagerService.removePopup(c), o.complete(), a.dispose();
|
|
910
|
+
}
|
|
929
911
|
};
|
|
930
912
|
}
|
|
931
|
-
}
|
|
932
|
-
|
|
933
|
-
|
|
934
|
-
|
|
935
|
-
|
|
936
|
-
|
|
937
|
-
],
|
|
938
|
-
var
|
|
939
|
-
for (var
|
|
940
|
-
(
|
|
941
|
-
return
|
|
942
|
-
},
|
|
943
|
-
let
|
|
944
|
-
constructor(
|
|
913
|
+
};
|
|
914
|
+
Me = ir([
|
|
915
|
+
be(0, Y(wn)),
|
|
916
|
+
be(1, Z),
|
|
917
|
+
be(2, y),
|
|
918
|
+
be(3, j)
|
|
919
|
+
], Me);
|
|
920
|
+
var sr = Object.defineProperty, or = Object.getOwnPropertyDescriptor, ar = (i, e, t, n) => {
|
|
921
|
+
for (var r = n > 1 ? void 0 : n ? or(e, t) : e, s = i.length - 1, o; s >= 0; s--)
|
|
922
|
+
(o = i[s]) && (r = (n ? o(e, t, r) : o(r)) || r);
|
|
923
|
+
return n && r && sr(e, t, r), r;
|
|
924
|
+
}, q = (i, e) => (t, n) => e(t, n, i);
|
|
925
|
+
let Te = class extends Ce {
|
|
926
|
+
constructor(e, t, n, r, s, o, a) {
|
|
945
927
|
super();
|
|
946
|
-
|
|
947
|
-
this._canvasPopManagerService =
|
|
928
|
+
I(this, "_initImagePopupMenu", /* @__PURE__ */ new Set());
|
|
929
|
+
this._canvasPopManagerService = e, this._renderManagerService = t, this._univerInstanceService = n, this._contextService = r, this._canvasView = s, this._sidebarService = o, this._commandService = a, this._init();
|
|
948
930
|
}
|
|
949
931
|
_init() {
|
|
950
|
-
this._univerInstanceService.getAllUnitsForType(
|
|
932
|
+
this._univerInstanceService.getAllUnitsForType(E.UNIVER_SLIDE).forEach((e) => this._create(e));
|
|
951
933
|
}
|
|
952
|
-
_create(
|
|
953
|
-
if (!
|
|
934
|
+
_create(e) {
|
|
935
|
+
if (!e)
|
|
954
936
|
return;
|
|
955
|
-
const
|
|
956
|
-
this._renderManagerService.has(
|
|
937
|
+
const t = e.getUnitId();
|
|
938
|
+
this._renderManagerService.has(t) && !this._initImagePopupMenu.has(t) && (this._popupMenuListener(t), this._initImagePopupMenu.add(t));
|
|
957
939
|
}
|
|
958
|
-
_hasCropObject(
|
|
940
|
+
_hasCropObject(e) {
|
|
959
941
|
}
|
|
960
942
|
// eslint-disable-next-line max-lines-per-function
|
|
961
|
-
_popupMenuListener(
|
|
962
|
-
var
|
|
963
|
-
const
|
|
964
|
-
Object.keys(
|
|
965
|
-
var
|
|
966
|
-
const
|
|
967
|
-
if (!
|
|
968
|
-
let
|
|
943
|
+
_popupMenuListener(e) {
|
|
944
|
+
var r;
|
|
945
|
+
const t = this._univerInstanceService.getCurrentUnitForType(E.UNIVER_SLIDE), n = (r = t == null ? void 0 : t.getPages()) != null ? r : {};
|
|
946
|
+
Object.keys(n).forEach((s) => {
|
|
947
|
+
var g;
|
|
948
|
+
const a = (g = this._canvasView.getRenderUnitByPageId(s, e).scene) == null ? void 0 : g.getTransformer();
|
|
949
|
+
if (!a) return;
|
|
950
|
+
let c;
|
|
969
951
|
this.disposeWithMe(
|
|
970
|
-
|
|
971
|
-
|
|
972
|
-
const
|
|
973
|
-
if (
|
|
974
|
-
|
|
952
|
+
It(
|
|
953
|
+
a.createControl$.subscribe(() => {
|
|
954
|
+
const l = a.getSelectedObjectMap();
|
|
955
|
+
if (l.size > 1) {
|
|
956
|
+
c == null || c.dispose();
|
|
975
957
|
return;
|
|
976
958
|
}
|
|
977
|
-
const
|
|
978
|
-
if (!
|
|
959
|
+
const d = l.values().next().value;
|
|
960
|
+
if (!d)
|
|
979
961
|
return;
|
|
980
|
-
const
|
|
981
|
-
|
|
982
|
-
componentKey:
|
|
962
|
+
const p = d.oKey;
|
|
963
|
+
c == null || c.dispose(), c = this.disposeWithMe(this._canvasPopManagerService.attachPopupToObject(d, {
|
|
964
|
+
componentKey: Yt,
|
|
983
965
|
direction: "horizontal",
|
|
984
966
|
offset: [2, 0],
|
|
985
967
|
extraProps: {
|
|
986
|
-
menuItems: this._getMenuItemsByObjectType(
|
|
968
|
+
menuItems: this._getMenuItemsByObjectType(d.objectType, p, e)
|
|
987
969
|
}
|
|
988
|
-
})), this._sidebarService.visible && this._commandService.executeCommand(
|
|
970
|
+
})), this._sidebarService.visible && this._commandService.executeCommand($e.id, {
|
|
989
971
|
visible: !0,
|
|
990
|
-
objectType:
|
|
972
|
+
objectType: d.objectType
|
|
991
973
|
});
|
|
992
974
|
})
|
|
993
975
|
)
|
|
994
976
|
), this.disposeWithMe(
|
|
995
|
-
|
|
996
|
-
|
|
977
|
+
a.clearControl$.subscribe(() => {
|
|
978
|
+
c == null || c.dispose(), this._contextService.setContextValue(fn, !1);
|
|
997
979
|
})
|
|
998
980
|
), this.disposeWithMe(
|
|
999
|
-
|
|
1000
|
-
|
|
1001
|
-
const
|
|
1002
|
-
if (
|
|
1003
|
-
|
|
981
|
+
a.changing$.subscribe(() => {
|
|
982
|
+
c == null || c.dispose();
|
|
983
|
+
const l = a.getSelectedObjectMap();
|
|
984
|
+
if (l.size > 1) {
|
|
985
|
+
c == null || c.dispose();
|
|
1004
986
|
return;
|
|
1005
987
|
}
|
|
1006
|
-
const
|
|
1007
|
-
|
|
1008
|
-
unitId,
|
|
1009
|
-
oKey:
|
|
988
|
+
const d = l.values().next().value;
|
|
989
|
+
d && this._commandService.executeCommand(K.id, {
|
|
990
|
+
unitId: e,
|
|
991
|
+
oKey: d.oKey,
|
|
1010
992
|
props: {
|
|
1011
|
-
width:
|
|
1012
|
-
height:
|
|
1013
|
-
left:
|
|
1014
|
-
top:
|
|
993
|
+
width: d.width,
|
|
994
|
+
height: d.height,
|
|
995
|
+
left: d.left,
|
|
996
|
+
top: d.top
|
|
1015
997
|
}
|
|
1016
998
|
});
|
|
1017
999
|
})
|
|
1018
1000
|
);
|
|
1019
1001
|
});
|
|
1020
1002
|
}
|
|
1021
|
-
_getMenuItemsByObjectType(
|
|
1003
|
+
_getMenuItemsByObjectType(e, t, n) {
|
|
1022
1004
|
return [{
|
|
1023
1005
|
label: "slide.popup.edit",
|
|
1024
1006
|
index: 0,
|
|
1025
|
-
commandId:
|
|
1007
|
+
commandId: $e.id,
|
|
1026
1008
|
commandParams: {
|
|
1027
1009
|
visible: !0,
|
|
1028
|
-
objectType
|
|
1010
|
+
objectType: e
|
|
1029
1011
|
},
|
|
1030
1012
|
disable: !1
|
|
1031
1013
|
}, {
|
|
1032
1014
|
label: "slide.popup.delete",
|
|
1033
1015
|
index: 5,
|
|
1034
|
-
commandId:
|
|
1016
|
+
commandId: Vt.id,
|
|
1035
1017
|
commandParams: {
|
|
1036
|
-
id:
|
|
1037
|
-
unitId
|
|
1018
|
+
id: t,
|
|
1019
|
+
unitId: n
|
|
1038
1020
|
},
|
|
1039
1021
|
disable: !1
|
|
1040
1022
|
}];
|
|
1041
1023
|
}
|
|
1042
|
-
}
|
|
1043
|
-
|
|
1044
|
-
|
|
1045
|
-
|
|
1046
|
-
|
|
1047
|
-
|
|
1048
|
-
|
|
1049
|
-
|
|
1050
|
-
|
|
1051
|
-
],
|
|
1052
|
-
const
|
|
1024
|
+
};
|
|
1025
|
+
Te = ar([
|
|
1026
|
+
q(0, Y(Me)),
|
|
1027
|
+
q(1, Z),
|
|
1028
|
+
q(2, y),
|
|
1029
|
+
q(3, fe),
|
|
1030
|
+
q(4, Y(N)),
|
|
1031
|
+
q(5, Tt),
|
|
1032
|
+
q(6, j)
|
|
1033
|
+
], Te);
|
|
1034
|
+
const we = {
|
|
1053
1035
|
id: "slide.operation.edit-arrow",
|
|
1054
|
-
type:
|
|
1055
|
-
handler:
|
|
1056
|
-
},
|
|
1057
|
-
var
|
|
1058
|
-
for (var
|
|
1059
|
-
(
|
|
1060
|
-
return
|
|
1061
|
-
},
|
|
1062
|
-
const
|
|
1063
|
-
|
|
1064
|
-
|
|
1065
|
-
constructor(_editorService, _contextService, _renderManagerService) {
|
|
1036
|
+
type: V.OPERATION,
|
|
1037
|
+
handler: () => !0
|
|
1038
|
+
}, ae = vn("SLIDE_EDITOR");
|
|
1039
|
+
var cr = Object.defineProperty, lr = Object.getOwnPropertyDescriptor, dr = (i, e, t, n) => {
|
|
1040
|
+
for (var r = n > 1 ? void 0 : n ? lr(e, t) : e, s = i.length - 1, o; s >= 0; s--)
|
|
1041
|
+
(o = i[s]) && (r = (n ? o(e, t, r) : o(r)) || r);
|
|
1042
|
+
return n && r && cr(e, t, r), r;
|
|
1043
|
+
}, Be = (i, e) => (t, n) => e(t, n, i);
|
|
1044
|
+
const qe = Pt("univer.slide-editor-bridge.service");
|
|
1045
|
+
let He = class extends Ve {
|
|
1046
|
+
constructor(e, t, n) {
|
|
1066
1047
|
super();
|
|
1067
|
-
|
|
1068
|
-
|
|
1069
|
-
|
|
1070
|
-
|
|
1071
|
-
|
|
1072
|
-
|
|
1073
|
-
|
|
1048
|
+
I(this, "_editorUnitId", ae);
|
|
1049
|
+
I(this, "_isForceKeepVisible", !1);
|
|
1050
|
+
I(this, "_editorIsDirty", !1);
|
|
1051
|
+
I(this, "_currentEditRectState", null);
|
|
1052
|
+
I(this, "_currentEditRectState$", new Q(null));
|
|
1053
|
+
I(this, "currentEditRectState$", this._currentEditRectState$.asObservable());
|
|
1054
|
+
I(this, "_visibleParam", {
|
|
1074
1055
|
visible: !1,
|
|
1075
|
-
eventType:
|
|
1056
|
+
eventType: J.Dblclick,
|
|
1076
1057
|
unitId: ""
|
|
1077
1058
|
});
|
|
1078
|
-
|
|
1079
|
-
|
|
1080
|
-
|
|
1081
|
-
|
|
1082
|
-
|
|
1083
|
-
|
|
1084
|
-
this._editorService =
|
|
1059
|
+
I(this, "_visible$", new Q(this._visibleParam));
|
|
1060
|
+
I(this, "visible$", this._visible$.asObservable());
|
|
1061
|
+
I(this, "_afterVisible$", new Q(this._visibleParam));
|
|
1062
|
+
I(this, "afterVisible$", this._afterVisible$.asObservable());
|
|
1063
|
+
I(this, "endEditing$", new Ut());
|
|
1064
|
+
I(this, "_currentEditRectInfo");
|
|
1065
|
+
this._editorService = e, this._contextService = t, this._renderManagerService = n;
|
|
1085
1066
|
}
|
|
1086
1067
|
dispose() {
|
|
1087
1068
|
super.dispose();
|
|
@@ -1093,13 +1074,13 @@ let SlideEditorBridgeService = (_a5 = class extends Disposable {
|
|
|
1093
1074
|
* 1st part of startEditing.
|
|
1094
1075
|
* @editorInfo editorInfo
|
|
1095
1076
|
*/
|
|
1096
|
-
setEditorRect(
|
|
1097
|
-
this._currentEditRectInfo =
|
|
1098
|
-
const
|
|
1099
|
-
this._currentEditRectState =
|
|
1077
|
+
setEditorRect(e) {
|
|
1078
|
+
this._currentEditRectInfo = e, this._editorService.getFocusEditor() || (this._editorService.focus(ae), this._contextService.setContextValue(xe, !1), this._contextService.setContextValue(bt, !1), this._contextService.setContextValue(Et, !1));
|
|
1079
|
+
const t = this.getEditRectState();
|
|
1080
|
+
this._currentEditRectState = t, this._currentEditRectState$.next(t);
|
|
1100
1081
|
}
|
|
1101
|
-
changeVisible(
|
|
1102
|
-
this._visibleParam =
|
|
1082
|
+
changeVisible(e) {
|
|
1083
|
+
this._visibleParam = e, e.visible && (this._editorIsDirty = !1), this._visible$.next(this._visibleParam), this._afterVisible$.next(this._visibleParam);
|
|
1103
1084
|
}
|
|
1104
1085
|
/**
|
|
1105
1086
|
* get info from _currentEditRectInfo
|
|
@@ -1108,43 +1089,43 @@ let SlideEditorBridgeService = (_a5 = class extends Disposable {
|
|
|
1108
1089
|
* && this@setEditorRect
|
|
1109
1090
|
*/
|
|
1110
1091
|
getEditRectState() {
|
|
1111
|
-
const
|
|
1112
|
-
|
|
1113
|
-
...
|
|
1114
|
-
pageSize: { width:
|
|
1092
|
+
const e = ae, t = this._currentEditRectInfo, n = t.unitId, r = t.richTextObj.documentData;
|
|
1093
|
+
r.id = e, r.documentStyle = {
|
|
1094
|
+
...r.documentStyle,
|
|
1095
|
+
pageSize: { width: t.richTextObj.width, height: 1 / 0 }
|
|
1115
1096
|
};
|
|
1116
|
-
const
|
|
1117
|
-
documentModel: new
|
|
1097
|
+
const o = {
|
|
1098
|
+
documentModel: new _n(r),
|
|
1118
1099
|
fontString: "document",
|
|
1119
1100
|
textRotation: { a: 0, v: 0 },
|
|
1120
1101
|
wrapStrategy: 0,
|
|
1121
|
-
verticalAlign:
|
|
1122
|
-
horizontalAlign:
|
|
1102
|
+
verticalAlign: ye.TOP,
|
|
1103
|
+
horizontalAlign: Rt.LEFT,
|
|
1123
1104
|
paddingData: { t: 0, b: 1, l: 2, r: 2 }
|
|
1124
|
-
},
|
|
1105
|
+
}, a = t.richTextObj.width, c = t.richTextObj.height, g = t.richTextObj.left, l = t.richTextObj.top, d = {
|
|
1125
1106
|
left: 0,
|
|
1126
1107
|
top: 0
|
|
1127
|
-
},
|
|
1128
|
-
x: (
|
|
1129
|
-
y: (
|
|
1130
|
-
},
|
|
1131
|
-
return
|
|
1108
|
+
}, p = this._renderManagerService.getRenderById(n), v = p == null ? void 0 : p.scene, f = v == null ? void 0 : v.getViewport(oe.VIEW), C = v == null ? void 0 : v.getObject(oe.COMPONENT), h = {
|
|
1109
|
+
x: (C == null ? void 0 : C.left) || 0,
|
|
1110
|
+
y: (C == null ? void 0 : C.top) || 0
|
|
1111
|
+
}, _ = (f == null ? void 0 : f.viewportScrollX) || 0, P = (f == null ? void 0 : f.viewportScrollY) || 0;
|
|
1112
|
+
return d.left = h.x - _, d.top = h.y - P, {
|
|
1132
1113
|
position: {
|
|
1133
|
-
startX:
|
|
1134
|
-
startY:
|
|
1135
|
-
endX:
|
|
1136
|
-
endY:
|
|
1114
|
+
startX: g,
|
|
1115
|
+
startY: l,
|
|
1116
|
+
endX: g + a,
|
|
1117
|
+
endY: l + c
|
|
1137
1118
|
},
|
|
1138
1119
|
scaleX: 1,
|
|
1139
1120
|
scaleY: 1,
|
|
1140
|
-
slideCardOffset:
|
|
1141
|
-
unitId,
|
|
1142
|
-
editorUnitId,
|
|
1143
|
-
documentLayoutObject
|
|
1121
|
+
slideCardOffset: d,
|
|
1122
|
+
unitId: n,
|
|
1123
|
+
editorUnitId: e,
|
|
1124
|
+
documentLayoutObject: o
|
|
1144
1125
|
};
|
|
1145
1126
|
}
|
|
1146
|
-
changeEditorDirty(
|
|
1147
|
-
this._editorIsDirty =
|
|
1127
|
+
changeEditorDirty(e) {
|
|
1128
|
+
this._editorIsDirty = e;
|
|
1148
1129
|
}
|
|
1149
1130
|
isVisible() {
|
|
1150
1131
|
return this._visibleParam.visible;
|
|
@@ -1158,14 +1139,14 @@ let SlideEditorBridgeService = (_a5 = class extends Disposable {
|
|
|
1158
1139
|
/**
|
|
1159
1140
|
* @deprecated
|
|
1160
1141
|
*/
|
|
1161
|
-
genDocData(
|
|
1162
|
-
const
|
|
1142
|
+
genDocData(e) {
|
|
1143
|
+
const t = this.getCurrentEditorId(), n = e.text, r = e.fs;
|
|
1163
1144
|
return {
|
|
1164
|
-
id:
|
|
1145
|
+
id: t,
|
|
1165
1146
|
body: {
|
|
1166
|
-
dataStream: `${
|
|
1147
|
+
dataStream: `${n}\r
|
|
1167
1148
|
`,
|
|
1168
|
-
textRuns: [{ st: 0, ed:
|
|
1149
|
+
textRuns: [{ st: 0, ed: n.length }],
|
|
1169
1150
|
paragraphs: [{
|
|
1170
1151
|
paragraphStyle: {
|
|
1171
1152
|
// no use
|
|
@@ -1173,9 +1154,9 @@ let SlideEditorBridgeService = (_a5 = class extends Disposable {
|
|
|
1173
1154
|
// horizontalAlign: HorizontalAlign.CENTER,
|
|
1174
1155
|
// verticalAlign: VerticalAlign.MIDDLE,
|
|
1175
1156
|
},
|
|
1176
|
-
startIndex:
|
|
1157
|
+
startIndex: n.length + 1
|
|
1177
1158
|
}],
|
|
1178
|
-
sectionBreaks: [{ startIndex:
|
|
1159
|
+
sectionBreaks: [{ startIndex: n.length + 2 }]
|
|
1179
1160
|
},
|
|
1180
1161
|
documentStyle: {
|
|
1181
1162
|
marginBottom: 0,
|
|
@@ -1183,10 +1164,10 @@ let SlideEditorBridgeService = (_a5 = class extends Disposable {
|
|
|
1183
1164
|
marginRight: 0,
|
|
1184
1165
|
marginTop: 0,
|
|
1185
1166
|
pageSize: { width: 1 / 0, height: 1 / 0 },
|
|
1186
|
-
textStyle: { fs:
|
|
1167
|
+
textStyle: { fs: r },
|
|
1187
1168
|
renderConfig: {
|
|
1188
1169
|
// horizontalAlign: HorizontalAlign.CENTER,
|
|
1189
|
-
verticalAlign:
|
|
1170
|
+
verticalAlign: ye.MIDDLE,
|
|
1190
1171
|
centerAngle: 0,
|
|
1191
1172
|
vertexAngle: 0,
|
|
1192
1173
|
wrapStrategy: 0
|
|
@@ -1197,73 +1178,70 @@ let SlideEditorBridgeService = (_a5 = class extends Disposable {
|
|
|
1197
1178
|
settings: { zoomRatio: 1 }
|
|
1198
1179
|
};
|
|
1199
1180
|
}
|
|
1200
|
-
}
|
|
1201
|
-
|
|
1202
|
-
|
|
1203
|
-
|
|
1204
|
-
|
|
1205
|
-
],
|
|
1206
|
-
|
|
1181
|
+
};
|
|
1182
|
+
He = dr([
|
|
1183
|
+
Be(0, Ye),
|
|
1184
|
+
Be(1, fe),
|
|
1185
|
+
Be(2, Z)
|
|
1186
|
+
], He);
|
|
1187
|
+
class mr {
|
|
1207
1188
|
constructor() {
|
|
1208
|
-
|
|
1209
|
-
|
|
1210
|
-
|
|
1211
|
-
|
|
1212
|
-
|
|
1213
|
-
|
|
1214
|
-
|
|
1215
|
-
|
|
1216
|
-
|
|
1189
|
+
I(this, "_state", null);
|
|
1190
|
+
I(this, "_rect", null);
|
|
1191
|
+
I(this, "_state$", new Q(null));
|
|
1192
|
+
I(this, "state$", this._state$.asObservable());
|
|
1193
|
+
I(this, "_rect$", new Q(null));
|
|
1194
|
+
I(this, "rect$", this._rect$.asObservable());
|
|
1195
|
+
I(this, "_focus", !1);
|
|
1196
|
+
I(this, "_focus$", new Q(this._focus));
|
|
1197
|
+
I(this, "focus$", this._focus$.asObservable());
|
|
1217
1198
|
}
|
|
1218
1199
|
dispose() {
|
|
1219
1200
|
this._state$.complete(), this._state = null, this._rect$.complete(), this._rect = null;
|
|
1220
1201
|
}
|
|
1221
|
-
setState(
|
|
1222
|
-
this._state =
|
|
1202
|
+
setState(e) {
|
|
1203
|
+
this._state = e, this._refresh(e);
|
|
1223
1204
|
}
|
|
1224
1205
|
getRect() {
|
|
1225
1206
|
return this._rect;
|
|
1226
1207
|
}
|
|
1227
|
-
setRect(
|
|
1228
|
-
this._rect =
|
|
1208
|
+
setRect(e) {
|
|
1209
|
+
this._rect = e, this._rect$.next(e);
|
|
1229
1210
|
}
|
|
1230
1211
|
getState() {
|
|
1231
1212
|
return this._state;
|
|
1232
1213
|
}
|
|
1233
|
-
setFocus(
|
|
1234
|
-
this._focus =
|
|
1214
|
+
setFocus(e = !1) {
|
|
1215
|
+
this._focus = e, this._focus$.next(e);
|
|
1235
1216
|
}
|
|
1236
|
-
_refresh(
|
|
1237
|
-
this._state$.next(
|
|
1217
|
+
_refresh(e) {
|
|
1218
|
+
this._state$.next(e);
|
|
1238
1219
|
}
|
|
1239
|
-
}
|
|
1240
|
-
|
|
1241
|
-
let SlideEditorManagerService = _SlideEditorManagerService;
|
|
1242
|
-
const ISlideEditorManagerService = createIdentifier(
|
|
1220
|
+
}
|
|
1221
|
+
const Je = Pt(
|
|
1243
1222
|
"univer.slide-editor-manager.service"
|
|
1244
1223
|
);
|
|
1245
|
-
var
|
|
1246
|
-
for (var
|
|
1247
|
-
(
|
|
1248
|
-
return
|
|
1249
|
-
},
|
|
1250
|
-
const
|
|
1251
|
-
|
|
1252
|
-
|
|
1253
|
-
constructor(_renderContext, _layoutService, _undoRedoService, _contextService, _instanceSrv, _renderManagerService, _editorBridgeService, _cellEditorManagerService, _textSelectionManagerService, _commandService, _localService, _editorService) {
|
|
1224
|
+
var k = /* @__PURE__ */ ((i) => (i[i.InitialState = 0] = "InitialState", i[i.StartEditor = 1] = "StartEditor", i[i.CursorChange = 2] = "CursorChange", i))(k || {}), ur = Object.defineProperty, gr = Object.getOwnPropertyDescriptor, hr = (i, e, t, n) => {
|
|
1225
|
+
for (var r = n > 1 ? void 0 : n ? gr(e, t) : e, s = i.length - 1, o; s >= 0; s--)
|
|
1226
|
+
(o = i[s]) && (r = (n ? o(e, t, r) : o(r)) || r);
|
|
1227
|
+
return n && r && ur(e, t, r), r;
|
|
1228
|
+
}, A = (i, e) => (t, n) => e(t, n, i);
|
|
1229
|
+
const Ct = -1e3, ft = 5, pr = 2;
|
|
1230
|
+
let Fe = class extends Ve {
|
|
1231
|
+
constructor(e, t, n, r, s, o, a, c, g, l, d, p) {
|
|
1254
1232
|
super();
|
|
1255
1233
|
/**
|
|
1256
1234
|
* It is used to distinguish whether the user has actively moved the cursor in the editor, mainly through mouse clicks.
|
|
1257
1235
|
*/
|
|
1258
|
-
|
|
1236
|
+
I(this, "_cursorChange", k.InitialState);
|
|
1259
1237
|
/** If the corresponding unit is active and prepared for editing. */
|
|
1260
|
-
|
|
1261
|
-
|
|
1262
|
-
this._renderContext =
|
|
1263
|
-
|
|
1238
|
+
I(this, "_isUnitEditing", !1);
|
|
1239
|
+
I(this, "_d");
|
|
1240
|
+
this._renderContext = e, this._layoutService = t, this._undoRedoService = n, this._contextService = r, this._instanceSrv = s, this._renderManagerService = o, this._editorBridgeService = a, this._cellEditorManagerService = c, this._textSelectionManagerService = g, this._commandService = l, this._localService = d, this._editorService = p, this.disposeWithMe(this._instanceSrv.getCurrentTypeOfUnit$(E.UNIVER_SLIDE).subscribe((v) => {
|
|
1241
|
+
v && v.getUnitId() === this._renderContext.unitId ? this._d = this._init() : (this._disposeCurrent(), this._isUnitEditing && (this._handleEditorInvisible({
|
|
1264
1242
|
visible: !1,
|
|
1265
|
-
eventType:
|
|
1266
|
-
keycode:
|
|
1243
|
+
eventType: J.Keyboard,
|
|
1244
|
+
keycode: M.ESC,
|
|
1267
1245
|
unitId: this._renderContext.unitId
|
|
1268
1246
|
}), this._isUnitEditing = !1));
|
|
1269
1247
|
})), this._initEditorVisibilityListener();
|
|
@@ -1272,61 +1250,61 @@ let SlideEditingRenderController = (_a6 = class extends Disposable {
|
|
|
1272
1250
|
super.dispose(), this._disposeCurrent();
|
|
1273
1251
|
}
|
|
1274
1252
|
_disposeCurrent() {
|
|
1275
|
-
var
|
|
1276
|
-
(
|
|
1253
|
+
var e;
|
|
1254
|
+
(e = this._d) == null || e.dispose(), this._d = null;
|
|
1277
1255
|
}
|
|
1278
1256
|
_init() {
|
|
1279
|
-
const
|
|
1280
|
-
return this._subscribeToCurrentCell(
|
|
1281
|
-
this._cursorStateListener(
|
|
1282
|
-
}, 1e3),
|
|
1257
|
+
const e = new Xe();
|
|
1258
|
+
return this._subscribeToCurrentCell(e), this._initialKeyboardListener(e), this._initialCursorSync(e), this._listenEditorFocus(e), this._commandExecutedListener(e), setTimeout(() => {
|
|
1259
|
+
this._cursorStateListener(e);
|
|
1260
|
+
}, 1e3), e;
|
|
1283
1261
|
}
|
|
1284
1262
|
_initEditorVisibilityListener() {
|
|
1285
|
-
this.disposeWithMe(this._editorBridgeService.visible$.subscribe((
|
|
1286
|
-
|
|
1263
|
+
this.disposeWithMe(this._editorBridgeService.visible$.subscribe((e) => {
|
|
1264
|
+
e.visible ? (this._isUnitEditing = !0, this._handleEditorVisible(e)) : this._isUnitEditing && (this._handleEditorInvisible(e), this._isUnitEditing = !1);
|
|
1287
1265
|
}));
|
|
1288
1266
|
}
|
|
1289
|
-
_listenEditorFocus(
|
|
1290
|
-
const
|
|
1291
|
-
|
|
1267
|
+
_listenEditorFocus(e) {
|
|
1268
|
+
const t = this._getEditorObject();
|
|
1269
|
+
t && e.add(t.document.onPointerDown$.subscribeEvent(() => {
|
|
1292
1270
|
}));
|
|
1293
1271
|
}
|
|
1294
|
-
_getEditorSkeleton(
|
|
1295
|
-
var
|
|
1296
|
-
return (
|
|
1272
|
+
_getEditorSkeleton(e) {
|
|
1273
|
+
var t;
|
|
1274
|
+
return (t = this._renderManagerService.getRenderById(e)) == null ? void 0 : t.with(mt).getSkeleton();
|
|
1297
1275
|
}
|
|
1298
|
-
_getEditorViewModel(
|
|
1299
|
-
var
|
|
1300
|
-
return (
|
|
1276
|
+
_getEditorViewModel(e) {
|
|
1277
|
+
var t;
|
|
1278
|
+
return (t = this._renderManagerService.getRenderById(e)) == null ? void 0 : t.with(mt).getViewModel();
|
|
1301
1279
|
}
|
|
1302
|
-
_initialCursorSync(
|
|
1303
|
-
|
|
1304
|
-
var
|
|
1305
|
-
const
|
|
1306
|
-
|
|
1280
|
+
_initialCursorSync(e) {
|
|
1281
|
+
e.add(this._cellEditorManagerService.focus$.pipe(Wn((t) => !!t)).subscribe(() => {
|
|
1282
|
+
var n;
|
|
1283
|
+
const t = (n = this._renderManagerService.getCurrentTypeOfRenderer(E.UNIVER_DOC)) == null ? void 0 : n.with(ut);
|
|
1284
|
+
t && t.sync();
|
|
1307
1285
|
}));
|
|
1308
1286
|
}
|
|
1309
1287
|
/**
|
|
1310
1288
|
* Set editorUnitId to curr doc.
|
|
1311
1289
|
* @param d DisposableCollection
|
|
1312
1290
|
*/
|
|
1313
|
-
_subscribeToCurrentCell(
|
|
1314
|
-
|
|
1315
|
-
var
|
|
1316
|
-
if (
|
|
1291
|
+
_subscribeToCurrentCell(e) {
|
|
1292
|
+
e.add(this._editorBridgeService.currentEditRectState$.subscribe((t) => {
|
|
1293
|
+
var p;
|
|
1294
|
+
if (t == null || this._contextService.getContextValue(bt) || this._contextService.getContextValue(Et))
|
|
1317
1295
|
return;
|
|
1318
1296
|
const {
|
|
1319
|
-
position: { startX, endX },
|
|
1320
|
-
documentLayoutObject: { textRotation, wrapStrategy, documentModel },
|
|
1321
|
-
scaleX,
|
|
1322
|
-
editorUnitId
|
|
1323
|
-
} =
|
|
1324
|
-
|
|
1297
|
+
position: { startX: n, endX: r },
|
|
1298
|
+
documentLayoutObject: { textRotation: s, wrapStrategy: o, documentModel: a },
|
|
1299
|
+
scaleX: c,
|
|
1300
|
+
editorUnitId: g
|
|
1301
|
+
} = t, { vertexAngle: l } = st(s);
|
|
1302
|
+
a.updateDocumentId(g), o === tt.WRAP && l === 0 && a.updateDocumentDataPageSize((r - n) / c), this._instanceSrv.changeDoc(g, a), this._contextService.setContextValue(Sn, !0), this._textSelectionManagerService.replaceTextRanges([{
|
|
1325
1303
|
startOffset: 0,
|
|
1326
1304
|
endOffset: 0
|
|
1327
1305
|
}]);
|
|
1328
|
-
const
|
|
1329
|
-
|
|
1306
|
+
const d = (p = this._renderManagerService.getCurrentTypeOfRenderer(E.UNIVER_DOC)) == null ? void 0 : p.with(ut);
|
|
1307
|
+
d && d.activate(Ct, Ct);
|
|
1330
1308
|
}));
|
|
1331
1309
|
}
|
|
1332
1310
|
/**
|
|
@@ -1338,113 +1316,112 @@ let SlideEditingRenderController = (_a6 = class extends Disposable {
|
|
|
1338
1316
|
* @param scaleX
|
|
1339
1317
|
* @param scaleY
|
|
1340
1318
|
*/
|
|
1341
|
-
_fitTextSize(
|
|
1342
|
-
const { startX, startY, endX, endY } =
|
|
1343
|
-
if (
|
|
1319
|
+
_fitTextSize(e, t, n, r, s = 1, o = 1) {
|
|
1320
|
+
const { startX: a, startY: c, endX: g, endY: l } = e, d = r.documentModel;
|
|
1321
|
+
if (d == null)
|
|
1344
1322
|
return;
|
|
1345
|
-
const { actualWidth, actualHeight } = this._predictingSize(
|
|
1346
|
-
|
|
1347
|
-
|
|
1348
|
-
|
|
1349
|
-
|
|
1350
|
-
|
|
1351
|
-
|
|
1352
|
-
), { verticalAlign, paddingData, fill } =
|
|
1353
|
-
let
|
|
1354
|
-
if (
|
|
1355
|
-
|
|
1323
|
+
const { actualWidth: p, actualHeight: v } = this._predictingSize(
|
|
1324
|
+
e,
|
|
1325
|
+
t,
|
|
1326
|
+
n,
|
|
1327
|
+
r,
|
|
1328
|
+
s,
|
|
1329
|
+
o
|
|
1330
|
+
), { verticalAlign: f, paddingData: C, fill: h } = r;
|
|
1331
|
+
let _ = g - a, P = l - c;
|
|
1332
|
+
if (_ < p && (_ = p), P < v)
|
|
1333
|
+
P = v, d.updateDocumentDataMargin(C);
|
|
1356
1334
|
else {
|
|
1357
|
-
let
|
|
1358
|
-
|
|
1359
|
-
t:
|
|
1335
|
+
let b = 0;
|
|
1336
|
+
f === ye.MIDDLE ? b = (P - v) / 2 / o : f === ye.TOP ? b = C.t || 0 : b = (P - v) / o - (C.b || 0), b = b < (C.t || 0) ? C.t || 0 : b, d.updateDocumentDataMargin({
|
|
1337
|
+
t: b
|
|
1360
1338
|
});
|
|
1361
1339
|
}
|
|
1362
|
-
|
|
1340
|
+
n.calculate(), this._editAreaProcessing(_, P, e, t, h, s, o);
|
|
1363
1341
|
}
|
|
1364
1342
|
/**
|
|
1365
1343
|
* Mainly used to pre-calculate the width of the editor,
|
|
1366
1344
|
* to determine whether it needs to be automatically widened.
|
|
1367
1345
|
*/
|
|
1368
|
-
_predictingSize(
|
|
1369
|
-
const { startX, endX } =
|
|
1370
|
-
if (
|
|
1371
|
-
const { actualWidth, actualHeight } =
|
|
1346
|
+
_predictingSize(e, t, n, r, s = 1, o = 1) {
|
|
1347
|
+
const { startX: a, endX: c } = e, { textRotation: g, wrapStrategy: l } = r, d = r.documentModel, { vertexAngle: p } = st(g), v = document.body.clientWidth;
|
|
1348
|
+
if (l === tt.WRAP && p === 0) {
|
|
1349
|
+
const { actualWidth: h, actualHeight: _ } = n.getActualSize();
|
|
1372
1350
|
return {
|
|
1373
|
-
actualWidth:
|
|
1374
|
-
actualHeight:
|
|
1351
|
+
actualWidth: h * s,
|
|
1352
|
+
actualHeight: _ * o
|
|
1375
1353
|
};
|
|
1376
1354
|
}
|
|
1377
|
-
|
|
1378
|
-
const
|
|
1379
|
-
let
|
|
1380
|
-
return
|
|
1381
|
-
horizontalAlign:
|
|
1355
|
+
d == null || d.updateDocumentDataPageSize((v - a - t.left) / s), n.calculate();
|
|
1356
|
+
const f = n.getActualSize();
|
|
1357
|
+
let C = c - a;
|
|
1358
|
+
return C < f.actualWidth * s + ft * s && (C = f.actualWidth * s + ft * s), d == null || d.updateDocumentDataPageSize(C / s), d == null || d.updateDocumentRenderConfig({
|
|
1359
|
+
horizontalAlign: Rt.UNSPECIFIED,
|
|
1382
1360
|
cellValueType: void 0
|
|
1383
1361
|
}), {
|
|
1384
|
-
actualWidth:
|
|
1385
|
-
actualHeight:
|
|
1362
|
+
actualWidth: C,
|
|
1363
|
+
actualHeight: f.actualHeight * o
|
|
1386
1364
|
};
|
|
1387
1365
|
}
|
|
1388
1366
|
/**
|
|
1389
1367
|
* control the size of editing area
|
|
1390
1368
|
*/
|
|
1391
1369
|
// eslint-disable-next-line max-lines-per-function
|
|
1392
|
-
_editAreaProcessing(
|
|
1393
|
-
var
|
|
1394
|
-
const
|
|
1395
|
-
if (
|
|
1370
|
+
_editAreaProcessing(e, t, n, r, s, o = 1, a = 1) {
|
|
1371
|
+
var S;
|
|
1372
|
+
const c = this._getEditorObject();
|
|
1373
|
+
if (c == null)
|
|
1396
1374
|
return;
|
|
1397
|
-
function
|
|
1398
|
-
return Number.parseInt(
|
|
1375
|
+
function g(le) {
|
|
1376
|
+
return Number.parseInt(le.replace("px", ""));
|
|
1399
1377
|
}
|
|
1400
|
-
|
|
1401
|
-
|
|
1402
|
-
|
|
1403
|
-
|
|
1404
|
-
|
|
1405
|
-
|
|
1406
|
-
|
|
1407
|
-
|
|
1408
|
-
|
|
1409
|
-
|
|
1410
|
-
|
|
1411
|
-
|
|
1412
|
-
|
|
1413
|
-
|
|
1414
|
-
|
|
1415
|
-
|
|
1416
|
-
fixLineWidthByScale(physicHeight, precisionScaleY)
|
|
1378
|
+
const d = this._renderContext.engine.getCanvasElement(), p = d.getBoundingClientRect(), v = g(d.style.width), { top: f, left: C, width: h } = p, _ = h / v;
|
|
1379
|
+
let { startX: P, startY: b } = n;
|
|
1380
|
+
P += r.left, b += r.top;
|
|
1381
|
+
const { document: w, scene: D, engine: B } = c, O = D.getViewport(gt.VIEW_MAIN), G = document.body.clientHeight - b - r.top - pr * 2, ce = document.body.clientWidth - P - r.left;
|
|
1382
|
+
let z = t, W = O == null ? void 0 : O.getScrollBar();
|
|
1383
|
+
z > G ? (z = G, W == null ? O && new yt(O, { enableHorizontal: !1, barSize: 8 }) : O == null || O.resetCanvasSizeAndUpdateScroll()) : (W = null, (S = O == null ? void 0 : O.getScrollBar()) == null || S.dispose()), e += (W == null ? void 0 : W.barSize) || 0, e = Math.min(e, ce), P -= se, b -= se, this._addBackground(D, e / o, t / a, s);
|
|
1384
|
+
const { scaleX: te, scaleY: ne } = D.getPrecisionScale();
|
|
1385
|
+
D.transformByState({
|
|
1386
|
+
width: e * _ / o,
|
|
1387
|
+
height: t * _ / a,
|
|
1388
|
+
scaleX: o * _,
|
|
1389
|
+
scaleY: a * _
|
|
1390
|
+
}), w.resize(e / o, t / a), setTimeout(() => {
|
|
1391
|
+
B.resizeBySize(
|
|
1392
|
+
ot(e, te),
|
|
1393
|
+
ot(z, ne)
|
|
1417
1394
|
);
|
|
1418
1395
|
}, 0);
|
|
1419
|
-
const
|
|
1420
|
-
|
|
1421
|
-
startX,
|
|
1422
|
-
startY,
|
|
1423
|
-
endX:
|
|
1424
|
-
endY:
|
|
1396
|
+
const Se = this._layoutService.getContentElement().getBoundingClientRect(), Ie = d.getBoundingClientRect();
|
|
1397
|
+
P = P * _ + (Ie.left - Se.left), b = b * _ + (Ie.top - Se.top), this._cellEditorManagerService.setState({
|
|
1398
|
+
startX: P,
|
|
1399
|
+
startY: b,
|
|
1400
|
+
endX: e * _ + P,
|
|
1401
|
+
endY: z * _ + b,
|
|
1425
1402
|
show: !0
|
|
1426
1403
|
});
|
|
1427
1404
|
}
|
|
1428
1405
|
/**
|
|
1429
1406
|
* Since the document does not support cell background color, an additional rect needs to be added.
|
|
1430
1407
|
*/
|
|
1431
|
-
_addBackground(
|
|
1432
|
-
const
|
|
1433
|
-
|
|
1408
|
+
_addBackground(e, t, n, r) {
|
|
1409
|
+
const s = "_backgroundRectHelperColor_", o = e.getObject(s);
|
|
1410
|
+
o == null && r == null || (o == null ? e.addObjects(
|
|
1434
1411
|
[
|
|
1435
|
-
new
|
|
1436
|
-
width:
|
|
1437
|
-
height:
|
|
1438
|
-
fill,
|
|
1412
|
+
new Mt(s, {
|
|
1413
|
+
width: t,
|
|
1414
|
+
height: n,
|
|
1415
|
+
fill: r,
|
|
1439
1416
|
evented: !1
|
|
1440
1417
|
})
|
|
1441
1418
|
],
|
|
1442
|
-
|
|
1443
|
-
) :
|
|
1444
|
-
fill
|
|
1445
|
-
}),
|
|
1446
|
-
width:
|
|
1447
|
-
height:
|
|
1419
|
+
Xn
|
|
1420
|
+
) : r == null ? o.dispose() : (o.setProps({
|
|
1421
|
+
fill: r
|
|
1422
|
+
}), o.transformByState({
|
|
1423
|
+
width: t,
|
|
1424
|
+
height: n
|
|
1448
1425
|
})));
|
|
1449
1426
|
}
|
|
1450
1427
|
/**
|
|
@@ -1455,114 +1432,114 @@ let SlideEditingRenderController = (_a6 = class extends Disposable {
|
|
|
1455
1432
|
// handleVisible is the 2nd part of editing.
|
|
1456
1433
|
// first part: startEditing --> _updateEditor
|
|
1457
1434
|
// 2nd part: startEditing --> changeVisible --> slide-editor-bridge.render-controller.ts@changeVisible --> _editorBridgeService.changeVisible
|
|
1458
|
-
_handleEditorVisible(
|
|
1459
|
-
var
|
|
1460
|
-
const { eventType } =
|
|
1461
|
-
this._cursorChange = [
|
|
1462
|
-
const
|
|
1463
|
-
if (
|
|
1435
|
+
_handleEditorVisible(e) {
|
|
1436
|
+
var h, _;
|
|
1437
|
+
const { eventType: t } = e;
|
|
1438
|
+
this._cursorChange = [J.PointerDown, J.Dblclick].includes(t) ? k.CursorChange : k.StartEditor;
|
|
1439
|
+
const n = this._editorBridgeService.getEditRectState();
|
|
1440
|
+
if (n == null)
|
|
1464
1441
|
return;
|
|
1465
1442
|
const {
|
|
1466
|
-
position,
|
|
1467
|
-
documentLayoutObject,
|
|
1468
|
-
slideCardOffset:
|
|
1469
|
-
scaleX,
|
|
1470
|
-
scaleY,
|
|
1471
|
-
editorUnitId,
|
|
1472
|
-
unitId
|
|
1473
|
-
} =
|
|
1474
|
-
if (
|
|
1443
|
+
position: r,
|
|
1444
|
+
documentLayoutObject: s,
|
|
1445
|
+
slideCardOffset: o,
|
|
1446
|
+
scaleX: a,
|
|
1447
|
+
scaleY: c,
|
|
1448
|
+
editorUnitId: g,
|
|
1449
|
+
unitId: l
|
|
1450
|
+
} = n, d = this._getEditorObject();
|
|
1451
|
+
if (d == null)
|
|
1475
1452
|
return;
|
|
1476
|
-
const { scene } =
|
|
1477
|
-
this._contextService.setContextValue(
|
|
1478
|
-
const { documentModel:
|
|
1479
|
-
if (!
|
|
1453
|
+
const { scene: p } = d;
|
|
1454
|
+
this._contextService.setContextValue(xe, !0);
|
|
1455
|
+
const { documentModel: v } = s, f = this._getEditorSkeleton(g);
|
|
1456
|
+
if (!f || !v)
|
|
1480
1457
|
return;
|
|
1481
|
-
this._fitTextSize(
|
|
1482
|
-
const
|
|
1483
|
-
(
|
|
1458
|
+
this._fitTextSize(r, o, f, s, a, c);
|
|
1459
|
+
const C = v.getBody().dataStream.length - 2 || 0;
|
|
1460
|
+
(h = p.getViewport(gt.VIEW_MAIN)) == null || h.scrollToViewportPos({
|
|
1484
1461
|
viewportScrollX: Number.POSITIVE_INFINITY
|
|
1485
1462
|
}), this._textSelectionManagerService.replaceTextRanges([
|
|
1486
1463
|
{
|
|
1487
|
-
startOffset:
|
|
1488
|
-
endOffset:
|
|
1464
|
+
startOffset: C,
|
|
1465
|
+
endOffset: C
|
|
1489
1466
|
}
|
|
1490
|
-
]), (
|
|
1467
|
+
]), (_ = this._renderManagerService.getRenderById(l)) == null || _.scene.resetCursor();
|
|
1491
1468
|
}
|
|
1492
|
-
_resetBodyStyle(
|
|
1493
|
-
|
|
1469
|
+
_resetBodyStyle(e, t = !1) {
|
|
1470
|
+
e.dataStream = Ot, e.textRuns != null && (e.textRuns.length === 1 && !t ? (e.textRuns[0].st = 0, e.textRuns[0].ed = 1) : e.textRuns = void 0), e.paragraphs != null && (e.paragraphs.length === 1 ? e.paragraphs[0].startIndex = 0 : e.paragraphs = [
|
|
1494
1471
|
{
|
|
1495
1472
|
startIndex: 0
|
|
1496
1473
|
}
|
|
1497
|
-
]),
|
|
1474
|
+
]), e.sectionBreaks != null && (e.sectionBreaks = void 0), e.tables != null && (e.tables = void 0), e.customRanges != null && (e.customRanges = void 0), e.customBlocks != null && (e.customBlocks = void 0);
|
|
1498
1475
|
}
|
|
1499
1476
|
/**
|
|
1500
1477
|
* Should activate the editor when the user inputs text.
|
|
1501
1478
|
* @param d DisposableCollection
|
|
1502
1479
|
*/
|
|
1503
|
-
_initialKeyboardListener(
|
|
1480
|
+
_initialKeyboardListener(e) {
|
|
1504
1481
|
}
|
|
1505
|
-
_showEditorByKeyboard(
|
|
1482
|
+
_showEditorByKeyboard(e) {
|
|
1506
1483
|
}
|
|
1507
|
-
_commandExecutedListener(
|
|
1508
|
-
const
|
|
1509
|
-
|
|
1510
|
-
this._editorService.getFocusId() ===
|
|
1484
|
+
_commandExecutedListener(e) {
|
|
1485
|
+
const t = [we.id], n = [Gn.id];
|
|
1486
|
+
e.add(this._commandService.onCommandExecuted((r) => {
|
|
1487
|
+
this._editorService.getFocusId() === ae && (t.includes(r.id) && this._moveCursorCmdHandler(r), n.includes(r.id) && this._editorBridgeService.isVisible() && this._editingChangedHandler());
|
|
1511
1488
|
}));
|
|
1512
1489
|
}
|
|
1513
|
-
_moveCursorCmdHandler(
|
|
1514
|
-
const
|
|
1515
|
-
|
|
1490
|
+
_moveCursorCmdHandler(e) {
|
|
1491
|
+
const t = e.params, { keycode: n, isShift: r } = t;
|
|
1492
|
+
n != null && this._cursorChange === k.CursorChange ? this._moveInEditor(n, r) : this._editorBridgeService.changeVisible(t);
|
|
1516
1493
|
}
|
|
1517
1494
|
_editingChangedHandler() {
|
|
1518
|
-
const
|
|
1519
|
-
if (!
|
|
1495
|
+
const e = this._editorBridgeService.getEditorRect();
|
|
1496
|
+
if (!e)
|
|
1520
1497
|
return;
|
|
1521
|
-
const
|
|
1522
|
-
|
|
1523
|
-
const { unitId } = this._renderContext;
|
|
1524
|
-
this._handleEditorVisible({ visible: !0, eventType: 3, unitId });
|
|
1498
|
+
const t = e.richTextObj;
|
|
1499
|
+
t.refreshDocumentByDocData(), t.resizeToContentSize();
|
|
1500
|
+
const { unitId: n } = this._renderContext;
|
|
1501
|
+
this._handleEditorVisible({ visible: !0, eventType: 3, unitId: n });
|
|
1525
1502
|
}
|
|
1526
1503
|
_getEditorObject() {
|
|
1527
|
-
return
|
|
1504
|
+
return Cr(this._editorBridgeService.getCurrentEditorId(), this._renderManagerService);
|
|
1528
1505
|
}
|
|
1529
|
-
async _handleEditorInvisible(
|
|
1530
|
-
const { keycode } =
|
|
1531
|
-
if (this._cursorChange =
|
|
1506
|
+
async _handleEditorInvisible(e) {
|
|
1507
|
+
const { keycode: t } = e;
|
|
1508
|
+
if (this._cursorChange = k.InitialState, this._exitInput(e), this._editorBridgeService.getEditRectState() == null)
|
|
1532
1509
|
return;
|
|
1533
1510
|
if (this._editorBridgeService.getEditorDirty() === !1) {
|
|
1534
|
-
this._moveCursor(
|
|
1511
|
+
this._moveCursor(t);
|
|
1535
1512
|
return;
|
|
1536
1513
|
}
|
|
1537
|
-
this._moveCursor(
|
|
1514
|
+
this._moveCursor(t);
|
|
1538
1515
|
}
|
|
1539
|
-
_exitInput(
|
|
1540
|
-
this._contextService.setContextValue(
|
|
1541
|
-
show:
|
|
1516
|
+
_exitInput(e) {
|
|
1517
|
+
this._contextService.setContextValue(xe, !1), this._cellEditorManagerService.setState({
|
|
1518
|
+
show: e.visible
|
|
1542
1519
|
});
|
|
1543
|
-
const
|
|
1544
|
-
|
|
1545
|
-
}
|
|
1546
|
-
_moveCursor(
|
|
1547
|
-
if (
|
|
1548
|
-
switch (
|
|
1549
|
-
case
|
|
1550
|
-
|
|
1520
|
+
const t = this._editorBridgeService.getCurrentEditorId();
|
|
1521
|
+
t != null && this._undoRedoService.clearUndoRedo(t);
|
|
1522
|
+
}
|
|
1523
|
+
_moveCursor(e) {
|
|
1524
|
+
if (e != null)
|
|
1525
|
+
switch (L.LEFT, e) {
|
|
1526
|
+
case M.ENTER:
|
|
1527
|
+
L.DOWN;
|
|
1551
1528
|
break;
|
|
1552
|
-
case
|
|
1553
|
-
|
|
1529
|
+
case M.TAB:
|
|
1530
|
+
L.RIGHT;
|
|
1554
1531
|
break;
|
|
1555
|
-
case
|
|
1556
|
-
|
|
1532
|
+
case M.ARROW_DOWN:
|
|
1533
|
+
L.DOWN;
|
|
1557
1534
|
break;
|
|
1558
|
-
case
|
|
1559
|
-
|
|
1535
|
+
case M.ARROW_UP:
|
|
1536
|
+
L.UP;
|
|
1560
1537
|
break;
|
|
1561
|
-
case
|
|
1562
|
-
|
|
1538
|
+
case M.ARROW_LEFT:
|
|
1539
|
+
L.LEFT;
|
|
1563
1540
|
break;
|
|
1564
|
-
case
|
|
1565
|
-
|
|
1541
|
+
case M.ARROW_RIGHT:
|
|
1542
|
+
L.RIGHT;
|
|
1566
1543
|
break;
|
|
1567
1544
|
}
|
|
1568
1545
|
}
|
|
@@ -1570,60 +1547,59 @@ let SlideEditingRenderController = (_a6 = class extends Disposable {
|
|
|
1570
1547
|
* The user's operations follow the sequence of opening the editor and then moving the cursor.
|
|
1571
1548
|
* The logic here predicts the user's first cursor movement behavior based on this rule
|
|
1572
1549
|
*/
|
|
1573
|
-
_cursorStateListener(
|
|
1574
|
-
const
|
|
1575
|
-
if (!
|
|
1550
|
+
_cursorStateListener(e) {
|
|
1551
|
+
const t = this._getEditorObject();
|
|
1552
|
+
if (!t)
|
|
1576
1553
|
return;
|
|
1577
|
-
const { document:
|
|
1578
|
-
|
|
1579
|
-
this._cursorChange ===
|
|
1554
|
+
const { document: n } = t;
|
|
1555
|
+
e.add(It(n.onPointerDown$.subscribeEvent(() => {
|
|
1556
|
+
this._cursorChange === k.StartEditor && (this._cursorChange = k.CursorChange);
|
|
1580
1557
|
})));
|
|
1581
1558
|
}
|
|
1582
1559
|
// TODO: @JOCS, is it necessary to move these commands MoveSelectionOperation\MoveCursorOperation to shortcut? and use multi-commands?
|
|
1583
|
-
_moveInEditor(
|
|
1584
|
-
let
|
|
1585
|
-
|
|
1586
|
-
direction
|
|
1587
|
-
}) : this._commandService.executeCommand(
|
|
1588
|
-
direction
|
|
1560
|
+
_moveInEditor(e, t) {
|
|
1561
|
+
let n = L.LEFT;
|
|
1562
|
+
e === M.ARROW_DOWN ? n = L.DOWN : e === M.ARROW_UP ? n = L.UP : e === M.ARROW_RIGHT && (n = L.RIGHT), t ? this._commandService.executeCommand(Yn.id, {
|
|
1563
|
+
direction: n
|
|
1564
|
+
}) : this._commandService.executeCommand(Zn.id, {
|
|
1565
|
+
direction: n
|
|
1589
1566
|
});
|
|
1590
1567
|
}
|
|
1591
|
-
}
|
|
1592
|
-
|
|
1593
|
-
|
|
1594
|
-
|
|
1595
|
-
|
|
1596
|
-
|
|
1597
|
-
|
|
1598
|
-
|
|
1599
|
-
|
|
1600
|
-
|
|
1601
|
-
|
|
1602
|
-
|
|
1603
|
-
|
|
1604
|
-
],
|
|
1605
|
-
function
|
|
1606
|
-
if (
|
|
1568
|
+
};
|
|
1569
|
+
Fe = hr([
|
|
1570
|
+
A(1, Nn),
|
|
1571
|
+
A(2, In),
|
|
1572
|
+
A(3, fe),
|
|
1573
|
+
A(4, y),
|
|
1574
|
+
A(5, Z),
|
|
1575
|
+
A(6, qe),
|
|
1576
|
+
A(7, Je),
|
|
1577
|
+
A(8, Y(Kn)),
|
|
1578
|
+
A(9, j),
|
|
1579
|
+
A(10, Y(ee)),
|
|
1580
|
+
A(11, Ye)
|
|
1581
|
+
], Fe);
|
|
1582
|
+
function Cr(i, e) {
|
|
1583
|
+
if (i == null)
|
|
1607
1584
|
return;
|
|
1608
|
-
const
|
|
1609
|
-
if (
|
|
1585
|
+
const t = e.getRenderById(i);
|
|
1586
|
+
if (t == null)
|
|
1610
1587
|
return;
|
|
1611
|
-
const { mainComponent, scene, engine, components } =
|
|
1588
|
+
const { mainComponent: n, scene: r, engine: s, components: o } = t, a = n, c = o.get(kn.BACKGROUND);
|
|
1612
1589
|
return {
|
|
1613
|
-
document:
|
|
1614
|
-
docBackground,
|
|
1615
|
-
scene,
|
|
1616
|
-
engine
|
|
1590
|
+
document: a,
|
|
1591
|
+
docBackground: c,
|
|
1592
|
+
scene: r,
|
|
1593
|
+
engine: s
|
|
1617
1594
|
};
|
|
1618
1595
|
}
|
|
1619
|
-
|
|
1620
|
-
var
|
|
1621
|
-
|
|
1622
|
-
|
|
1623
|
-
|
|
1624
|
-
|
|
1625
|
-
|
|
1626
|
-
constructor(_renderContext, _instanceSrv, _commandService, _editorBridgeService) {
|
|
1596
|
+
var fr = Object.defineProperty, vr = Object.getOwnPropertyDescriptor, _r = (i, e, t, n) => {
|
|
1597
|
+
for (var r = n > 1 ? void 0 : n ? vr(e, t) : e, s = i.length - 1, o; s >= 0; s--)
|
|
1598
|
+
(o = i[s]) && (r = (n ? o(e, t, r) : o(r)) || r);
|
|
1599
|
+
return n && r && fr(e, t, r), r;
|
|
1600
|
+
}, Le = (i, e) => (t, n) => e(t, n, i);
|
|
1601
|
+
let ze = class extends Ce {
|
|
1602
|
+
constructor(e, t, n, r) {
|
|
1627
1603
|
super();
|
|
1628
1604
|
/**
|
|
1629
1605
|
* It is used to distinguish whether the user has actively moved the cursor in the editor, mainly through mouse clicks.
|
|
@@ -1631,54 +1607,54 @@ let SlideEditorBridgeRenderController = (_a7 = class extends RxDisposable {
|
|
|
1631
1607
|
// private _cursorChange: CursorChange = CursorChange.InitialState;
|
|
1632
1608
|
/** If the corresponding unit is active and prepared for editing. */
|
|
1633
1609
|
// private _isUnitEditing = false;
|
|
1634
|
-
|
|
1635
|
-
|
|
1636
|
-
|
|
1637
|
-
this._renderContext =
|
|
1638
|
-
|
|
1610
|
+
I(this, "setSlideTextEditor$", new Ut());
|
|
1611
|
+
I(this, "_curRichText", null);
|
|
1612
|
+
I(this, "_d");
|
|
1613
|
+
this._renderContext = e, this._instanceSrv = t, this._commandService = n, this._editorBridgeService = r, this.disposeWithMe(this._instanceSrv.getCurrentTypeOfUnit$(E.UNIVER_SLIDE).subscribe((s) => {
|
|
1614
|
+
s && s.getUnitId() === this._renderContext.unitId ? this._d = this._init() : this._disposeCurrent();
|
|
1639
1615
|
}));
|
|
1640
1616
|
}
|
|
1641
1617
|
_init() {
|
|
1642
|
-
const
|
|
1643
|
-
return this._initEventListener(
|
|
1618
|
+
const e = new Xe();
|
|
1619
|
+
return this._initEventListener(e), e;
|
|
1644
1620
|
}
|
|
1645
1621
|
_disposeCurrent() {
|
|
1646
|
-
var
|
|
1647
|
-
(
|
|
1648
|
-
}
|
|
1649
|
-
_setEditorRect(
|
|
1650
|
-
this._curRichText =
|
|
1651
|
-
const { scene, engine } = this._renderContext,
|
|
1652
|
-
scene,
|
|
1653
|
-
engine,
|
|
1654
|
-
unitId,
|
|
1655
|
-
pageId,
|
|
1656
|
-
richTextObj:
|
|
1622
|
+
var e;
|
|
1623
|
+
(e = this._d) == null || e.dispose(), this._d = null;
|
|
1624
|
+
}
|
|
1625
|
+
_setEditorRect(e, t) {
|
|
1626
|
+
this._curRichText = t;
|
|
1627
|
+
const { scene: n, engine: r } = this._renderContext, s = this._renderContext.unitId, o = {
|
|
1628
|
+
scene: n,
|
|
1629
|
+
engine: r,
|
|
1630
|
+
unitId: s,
|
|
1631
|
+
pageId: e,
|
|
1632
|
+
richTextObj: t
|
|
1657
1633
|
};
|
|
1658
|
-
this._editorBridgeService.setEditorRect(
|
|
1634
|
+
this._editorBridgeService.setEditorRect(o);
|
|
1659
1635
|
}
|
|
1660
|
-
_initEventListener(
|
|
1661
|
-
const
|
|
1662
|
-
const
|
|
1663
|
-
|
|
1636
|
+
_initEventListener(e) {
|
|
1637
|
+
const t = (o) => {
|
|
1638
|
+
const a = o.getTransformer();
|
|
1639
|
+
a && (e.add(a.clearControl$.subscribe(() => {
|
|
1664
1640
|
this.setEditorVisible(!1), this.pickOtherObjects();
|
|
1665
|
-
})),
|
|
1641
|
+
})), e.add(a.createControl$.subscribe(() => {
|
|
1666
1642
|
this.setEditorVisible(!1);
|
|
1667
|
-
})),
|
|
1668
|
-
|
|
1669
|
-
const
|
|
1670
|
-
|
|
1671
|
-
})),
|
|
1643
|
+
})), e.add(o.onDblclick$.subscribeEvent(() => {
|
|
1644
|
+
a.clearControls();
|
|
1645
|
+
const g = a.getSelectedObjectMap().values().next().value;
|
|
1646
|
+
g && (g.objectType !== ge.RICH_TEXT ? this.pickOtherObjects() : this.startEditing(o.sceneKey, g));
|
|
1647
|
+
})), e.add(this._instanceSrv.focused$.subscribe((c) => {
|
|
1672
1648
|
this.endEditing();
|
|
1673
1649
|
})));
|
|
1674
|
-
},
|
|
1675
|
-
|
|
1676
|
-
|
|
1650
|
+
}, { mainComponent: n } = this._renderContext;
|
|
1651
|
+
n.subSceneChanged$.subscribeEvent((o) => {
|
|
1652
|
+
t(o);
|
|
1677
1653
|
});
|
|
1678
|
-
const
|
|
1679
|
-
for (let
|
|
1680
|
-
const
|
|
1681
|
-
|
|
1654
|
+
const s = Array.from(n.getSubScenes().values());
|
|
1655
|
+
for (let o = 0; o < s.length; o++) {
|
|
1656
|
+
const a = s[o];
|
|
1657
|
+
t(a);
|
|
1682
1658
|
}
|
|
1683
1659
|
}
|
|
1684
1660
|
pickOtherObjects() {
|
|
@@ -1690,26 +1666,26 @@ let SlideEditorBridgeRenderController = (_a7 = class extends RxDisposable {
|
|
|
1690
1666
|
* save editing state to curr richText.
|
|
1691
1667
|
*/
|
|
1692
1668
|
endEditing() {
|
|
1693
|
-
var
|
|
1669
|
+
var s;
|
|
1694
1670
|
if (!this._curRichText) return;
|
|
1695
1671
|
this.setEditorVisible(!1);
|
|
1696
|
-
const
|
|
1697
|
-
if (!this._instanceSrv.getCurrentUnitForType(
|
|
1698
|
-
|
|
1699
|
-
const
|
|
1672
|
+
const e = this._curRichText;
|
|
1673
|
+
if (!this._instanceSrv.getCurrentUnitForType(E.UNIVER_SLIDE)) return !1;
|
|
1674
|
+
e.refreshDocumentByDocData(), e.resizeToContentSize(), this._editorBridgeService.endEditing$.next(e);
|
|
1675
|
+
const n = {
|
|
1700
1676
|
bl: 1,
|
|
1701
|
-
fs:
|
|
1702
|
-
text:
|
|
1703
|
-
},
|
|
1704
|
-
if (
|
|
1705
|
-
const
|
|
1706
|
-
|
|
1677
|
+
fs: e.fs,
|
|
1678
|
+
text: e.text
|
|
1679
|
+
}, r = (s = e.documentData.body) == null ? void 0 : s.textRuns;
|
|
1680
|
+
if (r && r.length) {
|
|
1681
|
+
const a = r[0].ts;
|
|
1682
|
+
n.cl = a == null ? void 0 : a.cl;
|
|
1707
1683
|
}
|
|
1708
|
-
this._commandService.executeCommand(
|
|
1684
|
+
this._commandService.executeCommand(K.id, {
|
|
1709
1685
|
unitId: this._renderContext.unitId,
|
|
1710
|
-
oKey:
|
|
1686
|
+
oKey: e == null ? void 0 : e.oKey,
|
|
1711
1687
|
props: {
|
|
1712
|
-
richText
|
|
1688
|
+
richText: n
|
|
1713
1689
|
}
|
|
1714
1690
|
}), this._curRichText = null;
|
|
1715
1691
|
}
|
|
@@ -1720,106 +1696,106 @@ let SlideEditorBridgeRenderController = (_a7 = class extends RxDisposable {
|
|
|
1720
1696
|
* TODO @lumixraku need scale param
|
|
1721
1697
|
* @param target
|
|
1722
1698
|
*/
|
|
1723
|
-
startEditing(
|
|
1724
|
-
this._setEditorRect(
|
|
1725
|
-
}
|
|
1726
|
-
setEditorVisible(
|
|
1727
|
-
var
|
|
1728
|
-
|
|
1729
|
-
const { unitId } = this._renderContext;
|
|
1730
|
-
this._editorBridgeService.changeVisible({ visible, eventType:
|
|
1731
|
-
}
|
|
1732
|
-
}
|
|
1733
|
-
|
|
1734
|
-
|
|
1735
|
-
|
|
1736
|
-
|
|
1737
|
-
],
|
|
1738
|
-
const
|
|
1699
|
+
startEditing(e, t) {
|
|
1700
|
+
this._setEditorRect(e, t), this.setEditorVisible(!0);
|
|
1701
|
+
}
|
|
1702
|
+
setEditorVisible(e) {
|
|
1703
|
+
var n, r;
|
|
1704
|
+
e ? (n = this._curRichText) == null || n.hide() : (r = this._curRichText) == null || r.show();
|
|
1705
|
+
const { unitId: t } = this._renderContext;
|
|
1706
|
+
this._editorBridgeService.changeVisible({ visible: e, eventType: J.PointerDown, unitId: t });
|
|
1707
|
+
}
|
|
1708
|
+
};
|
|
1709
|
+
ze = _r([
|
|
1710
|
+
Le(1, y),
|
|
1711
|
+
Le(2, j),
|
|
1712
|
+
Le(3, qe)
|
|
1713
|
+
], ze);
|
|
1714
|
+
const Zt = {
|
|
1739
1715
|
id: "slide.operation.activate-slide",
|
|
1740
|
-
type:
|
|
1741
|
-
handler:
|
|
1742
|
-
var
|
|
1743
|
-
const
|
|
1744
|
-
if (!
|
|
1745
|
-
const
|
|
1746
|
-
if (!
|
|
1747
|
-
const
|
|
1748
|
-
return
|
|
1749
|
-
}
|
|
1750
|
-
},
|
|
1716
|
+
type: V.OPERATION,
|
|
1717
|
+
handler: (i, e) => {
|
|
1718
|
+
var g, l;
|
|
1719
|
+
const t = e.unitId, n = i.get(N), s = i.get(y).getUnit(t), o = (g = s == null ? void 0 : s.getActivePage()) == null ? void 0 : g.id;
|
|
1720
|
+
if (!o) return !1;
|
|
1721
|
+
const a = n.getRenderUnitByPageId(o, t);
|
|
1722
|
+
if (!a) return !1;
|
|
1723
|
+
const c = (l = a.scene) == null ? void 0 : l.getTransformer();
|
|
1724
|
+
return c && c.clearControls(), n.activePage(e.id, t), !0;
|
|
1725
|
+
}
|
|
1726
|
+
}, kt = {
|
|
1751
1727
|
id: "slide.operation.append-slide",
|
|
1752
|
-
type:
|
|
1753
|
-
handler:
|
|
1754
|
-
const
|
|
1755
|
-
return
|
|
1756
|
-
}
|
|
1757
|
-
},
|
|
1728
|
+
type: V.OPERATION,
|
|
1729
|
+
handler: (i, e) => {
|
|
1730
|
+
const t = e.unitId;
|
|
1731
|
+
return i.get(y).getUnit(t) ? (i.get(N).appendPage(t), !0) : !1;
|
|
1732
|
+
}
|
|
1733
|
+
}, Qe = {
|
|
1758
1734
|
id: "slide.command.insert-float-image",
|
|
1759
|
-
type:
|
|
1760
|
-
handler:
|
|
1761
|
-
var
|
|
1762
|
-
const
|
|
1763
|
-
if (!
|
|
1764
|
-
const
|
|
1735
|
+
type: V.COMMAND,
|
|
1736
|
+
handler: async (i, e) => {
|
|
1737
|
+
var B;
|
|
1738
|
+
const t = i.get(y), n = (B = t.getCurrentUnitForType(E.UNIVER_SLIDE)) == null ? void 0 : B.getUnitId();
|
|
1739
|
+
if (!n) return !1;
|
|
1740
|
+
const s = await i.get(Dn).openFile({
|
|
1765
1741
|
multiple: !0,
|
|
1766
|
-
accept:
|
|
1742
|
+
accept: Jn.map((O) => `.${O.replace("image/", "")}`).join(",")
|
|
1767
1743
|
});
|
|
1768
|
-
if (
|
|
1769
|
-
const
|
|
1770
|
-
if (!
|
|
1771
|
-
const { imageId, imageSourceType, source, base64Cache } =
|
|
1772
|
-
if (!
|
|
1773
|
-
const
|
|
1774
|
-
id:
|
|
1775
|
-
zIndex:
|
|
1744
|
+
if (s.length !== 1) return !1;
|
|
1745
|
+
const a = await i.get(Qn).saveImage(s[0]);
|
|
1746
|
+
if (!a) return !1;
|
|
1747
|
+
const { imageId: c, imageSourceType: g, source: l, base64Cache: d } = a, { width: p, height: v, image: f } = await ei(d || ""), C = t.getUnit(n);
|
|
1748
|
+
if (!C) return !1;
|
|
1749
|
+
const h = C.getActivePage(), _ = Object.values(h.pageElements), P = _ != null && _.length ? Math.max(..._.map((O) => O.zIndex)) : 20, b = {
|
|
1750
|
+
id: c,
|
|
1751
|
+
zIndex: P + 1,
|
|
1776
1752
|
left: 0,
|
|
1777
1753
|
top: 0,
|
|
1778
|
-
width,
|
|
1779
|
-
height,
|
|
1754
|
+
width: p,
|
|
1755
|
+
height: v,
|
|
1780
1756
|
title: "",
|
|
1781
1757
|
description: "",
|
|
1782
|
-
type:
|
|
1758
|
+
type: Ge.IMAGE,
|
|
1783
1759
|
image: {
|
|
1784
1760
|
imageProperties: {
|
|
1785
|
-
contentUrl:
|
|
1786
|
-
imageSourceType,
|
|
1787
|
-
source,
|
|
1788
|
-
base64Cache,
|
|
1789
|
-
image
|
|
1761
|
+
contentUrl: d,
|
|
1762
|
+
imageSourceType: g,
|
|
1763
|
+
source: l,
|
|
1764
|
+
base64Cache: d,
|
|
1765
|
+
image: f
|
|
1790
1766
|
}
|
|
1791
1767
|
}
|
|
1792
1768
|
};
|
|
1793
|
-
|
|
1794
|
-
const
|
|
1795
|
-
return
|
|
1796
|
-
}
|
|
1797
|
-
},
|
|
1769
|
+
h.pageElements[c] = b, C.updatePage(h.id, h);
|
|
1770
|
+
const w = i.get(N), D = w.createObjectToPage(b, h.id, n);
|
|
1771
|
+
return D && w.setObjectActiveByPage(D, h.id, n), !0;
|
|
1772
|
+
}
|
|
1773
|
+
}, et = {
|
|
1798
1774
|
id: "slide.command.add-text",
|
|
1799
|
-
type:
|
|
1800
|
-
handler:
|
|
1801
|
-
var
|
|
1802
|
-
const
|
|
1803
|
-
return await
|
|
1804
|
-
}
|
|
1805
|
-
},
|
|
1775
|
+
type: V.COMMAND,
|
|
1776
|
+
handler: async (i) => {
|
|
1777
|
+
var r;
|
|
1778
|
+
const e = i.get(j), n = (r = i.get(y).getFocusedUnit()) == null ? void 0 : r.getUnitId();
|
|
1779
|
+
return await e.executeCommand(qt.id, { unitId: n });
|
|
1780
|
+
}
|
|
1781
|
+
}, qt = {
|
|
1806
1782
|
id: "slide.operation.add-text",
|
|
1807
|
-
type:
|
|
1808
|
-
handler:
|
|
1809
|
-
const
|
|
1810
|
-
if (!
|
|
1811
|
-
const
|
|
1812
|
-
id:
|
|
1813
|
-
zIndex:
|
|
1814
|
-
left,
|
|
1815
|
-
top,
|
|
1816
|
-
width:
|
|
1817
|
-
height:
|
|
1783
|
+
type: V.OPERATION,
|
|
1784
|
+
handler: async (i, e) => {
|
|
1785
|
+
const t = e.unitId, n = St(6), r = 220, s = 40, o = 230, a = 142, c = (e == null ? void 0 : e.text) || "A New Text", l = i.get(y).getUnit(t);
|
|
1786
|
+
if (!l) return !1;
|
|
1787
|
+
const d = l.getActivePage(), p = Object.values(d.pageElements), v = p != null && p.length ? Math.max(...p.map((_) => _.zIndex)) : 21, f = {
|
|
1788
|
+
id: n,
|
|
1789
|
+
zIndex: v + 1,
|
|
1790
|
+
left: o,
|
|
1791
|
+
top: a,
|
|
1792
|
+
width: r,
|
|
1793
|
+
height: s,
|
|
1818
1794
|
title: "text",
|
|
1819
1795
|
description: "",
|
|
1820
|
-
type:
|
|
1796
|
+
type: Ge.TEXT,
|
|
1821
1797
|
richText: {
|
|
1822
|
-
text:
|
|
1798
|
+
text: c,
|
|
1823
1799
|
fs: 30,
|
|
1824
1800
|
cl: {
|
|
1825
1801
|
rgb: "rgb(51, 51, 51)"
|
|
@@ -1827,72 +1803,72 @@ const ActivateSlidePageOperation = {
|
|
|
1827
1803
|
bl: 1
|
|
1828
1804
|
}
|
|
1829
1805
|
};
|
|
1830
|
-
|
|
1831
|
-
const
|
|
1832
|
-
return
|
|
1833
|
-
}
|
|
1834
|
-
},
|
|
1806
|
+
d.pageElements[n] = f, l.updatePage(d.id, d);
|
|
1807
|
+
const C = i.get(N), h = C.createObjectToPage(f, d.id, t);
|
|
1808
|
+
return h && C.setObjectActiveByPage(h, d.id, t), !0;
|
|
1809
|
+
}
|
|
1810
|
+
}, Jt = {
|
|
1835
1811
|
id: "slide.operation.set-slide-page-thumb",
|
|
1836
|
-
type:
|
|
1837
|
-
handler:
|
|
1838
|
-
},
|
|
1839
|
-
imagePopupMenu,
|
|
1840
|
-
imagePopupMenuItem,
|
|
1841
|
-
imagePopupMenuItemIcon,
|
|
1842
|
-
imagePopupMenuItemTitle,
|
|
1843
|
-
imagePopupMenuItemHide,
|
|
1844
|
-
btnContainer,
|
|
1845
|
-
btnContainerExpand
|
|
1846
|
-
},
|
|
1847
|
-
var
|
|
1848
|
-
const
|
|
1849
|
-
if (!
|
|
1812
|
+
type: V.OPERATION,
|
|
1813
|
+
handler: (i, e) => (i.get(N).createThumbs(e.unitId), !0)
|
|
1814
|
+
}, Sr = "univer-image-popup-menu", Ir = "univer-image-popup-menu-item", Pr = "univer-image-popup-menu-item-icon", br = "univer-image-popup-menu-item-title", Er = "univer-image-popup-menu-item-hide", Rr = "univer-btn-container", Or = "univer-btn-container-expand", ue = {
|
|
1815
|
+
imagePopupMenu: Sr,
|
|
1816
|
+
imagePopupMenuItem: Ir,
|
|
1817
|
+
imagePopupMenuItemIcon: Pr,
|
|
1818
|
+
imagePopupMenuItemTitle: br,
|
|
1819
|
+
imagePopupMenuItemHide: Er,
|
|
1820
|
+
btnContainer: Rr,
|
|
1821
|
+
btnContainerExpand: Or
|
|
1822
|
+
}, xr = (i) => {
|
|
1823
|
+
var f, C;
|
|
1824
|
+
const e = (C = (f = i.popup) == null ? void 0 : f.extraProps) == null ? void 0 : C.menuItems;
|
|
1825
|
+
if (!e)
|
|
1850
1826
|
return null;
|
|
1851
|
-
const
|
|
1852
|
-
|
|
1853
|
-
},
|
|
1854
|
-
|
|
1855
|
-
},
|
|
1856
|
-
|
|
1857
|
-
},
|
|
1858
|
-
|
|
1859
|
-
},
|
|
1860
|
-
return /* @__PURE__ */
|
|
1827
|
+
const t = x(j), n = x(ee), [r, s] = X(!1), [o, a] = X(!1), c = () => {
|
|
1828
|
+
a(!0);
|
|
1829
|
+
}, g = () => {
|
|
1830
|
+
a(!1);
|
|
1831
|
+
}, l = (h) => {
|
|
1832
|
+
s(h);
|
|
1833
|
+
}, d = (h) => {
|
|
1834
|
+
t.executeCommand(h.commandId, h.commandParams), s(!1);
|
|
1835
|
+
}, p = r || o, v = e.filter((h) => !h.disable);
|
|
1836
|
+
return /* @__PURE__ */ m(
|
|
1861
1837
|
"div",
|
|
1862
1838
|
{
|
|
1863
|
-
onMouseEnter:
|
|
1864
|
-
onMouseLeave:
|
|
1865
|
-
children: /* @__PURE__ */
|
|
1866
|
-
|
|
1839
|
+
onMouseEnter: c,
|
|
1840
|
+
onMouseLeave: g,
|
|
1841
|
+
children: /* @__PURE__ */ m(
|
|
1842
|
+
wt,
|
|
1867
1843
|
{
|
|
1868
1844
|
placement: "bottomLeft",
|
|
1869
1845
|
trigger: ["click"],
|
|
1870
|
-
overlay: /* @__PURE__ */
|
|
1846
|
+
overlay: /* @__PURE__ */ m("ul", { className: ue.imagePopupMenu, children: v.map((h) => /* @__PURE__ */ m(
|
|
1871
1847
|
"li",
|
|
1872
1848
|
{
|
|
1873
|
-
onClick:
|
|
1874
|
-
className:
|
|
1875
|
-
children: /* @__PURE__ */
|
|
1849
|
+
onClick: () => d(h),
|
|
1850
|
+
className: ue.imagePopupMenuItem,
|
|
1851
|
+
children: /* @__PURE__ */ m("span", { className: ue.imagePopupMenuItemTitle, children: n.t(h.label) })
|
|
1876
1852
|
},
|
|
1877
|
-
|
|
1853
|
+
h.index
|
|
1878
1854
|
)) }),
|
|
1879
|
-
visible,
|
|
1880
|
-
onVisibleChange,
|
|
1881
|
-
children: /* @__PURE__ */
|
|
1855
|
+
visible: r,
|
|
1856
|
+
onVisibleChange: l,
|
|
1857
|
+
children: /* @__PURE__ */ R(
|
|
1882
1858
|
"div",
|
|
1883
1859
|
{
|
|
1884
|
-
className:
|
|
1885
|
-
[
|
|
1860
|
+
className: T(ue.btnContainer, {
|
|
1861
|
+
[ue.btnContainerExpand]: r
|
|
1886
1862
|
}),
|
|
1887
1863
|
children: [
|
|
1888
|
-
/* @__PURE__ */
|
|
1889
|
-
|
|
1864
|
+
/* @__PURE__ */ m(
|
|
1865
|
+
At,
|
|
1890
1866
|
{
|
|
1891
1867
|
style: { color: "#35322B" },
|
|
1892
1868
|
extend: { colorChannel1: "rgb(var(--green-700, #409f11))" }
|
|
1893
1869
|
}
|
|
1894
1870
|
),
|
|
1895
|
-
|
|
1871
|
+
p && /* @__PURE__ */ m(Ze, { style: { color: "#CCCCCC", fontSize: "8px", marginLeft: "8px" } })
|
|
1896
1872
|
]
|
|
1897
1873
|
}
|
|
1898
1874
|
)
|
|
@@ -1900,434 +1876,425 @@ const ActivateSlidePageOperation = {
|
|
|
1900
1876
|
)
|
|
1901
1877
|
}
|
|
1902
1878
|
);
|
|
1903
|
-
},
|
|
1904
|
-
slideBar,
|
|
1905
|
-
slideBarContent,
|
|
1906
|
-
slideBarContentHeader,
|
|
1907
|
-
slideBarItem,
|
|
1908
|
-
slideBarBox,
|
|
1909
|
-
slideBarItemActive,
|
|
1910
|
-
slideAddButton
|
|
1879
|
+
}, yr = "univer-slide-bar", Mr = "univer-slide-bar-content", Tr = "univer-slide-bar-content-header", wr = "univer-slide-bar-item", Nr = "univer-slide-bar-box", Dr = "univer-slide-bar-item-active", Ur = "univer-slide-add-button", ie = {
|
|
1880
|
+
slideBar: yr,
|
|
1881
|
+
slideBarContent: Mr,
|
|
1882
|
+
slideBarContentHeader: Tr,
|
|
1883
|
+
slideBarItem: wr,
|
|
1884
|
+
slideBarBox: Nr,
|
|
1885
|
+
slideBarItemActive: Dr,
|
|
1886
|
+
slideAddButton: Ur
|
|
1911
1887
|
};
|
|
1912
|
-
function
|
|
1913
|
-
var
|
|
1914
|
-
const
|
|
1915
|
-
if (!
|
|
1888
|
+
function Vr() {
|
|
1889
|
+
var f, C;
|
|
1890
|
+
const i = x(y), e = x(j), t = x(Z), n = x(ee), r = Dt(null), s = i.getCurrentUnitForType(E.UNIVER_SLIDE), o = s == null ? void 0 : s.getPages(), a = s == null ? void 0 : s.getPageOrder();
|
|
1891
|
+
if (!o || !a)
|
|
1916
1892
|
return null;
|
|
1917
|
-
const
|
|
1918
|
-
|
|
1919
|
-
const
|
|
1920
|
-
var
|
|
1921
|
-
const
|
|
1922
|
-
|
|
1893
|
+
const c = a.map((h) => o[h]), [g, l] = X((C = (f = s == null ? void 0 : s.getActivePage()) == null ? void 0 : f.id) != null ? C : null), d = zn(() => c.map(() => Nt.createRef()), [c]);
|
|
1894
|
+
he(() => {
|
|
1895
|
+
const h = s == null ? void 0 : s.activePage$.subscribe((_) => {
|
|
1896
|
+
var b;
|
|
1897
|
+
const P = (b = _ == null ? void 0 : _.id) != null ? b : null;
|
|
1898
|
+
P && l(P);
|
|
1923
1899
|
});
|
|
1924
1900
|
return () => {
|
|
1925
|
-
|
|
1901
|
+
h == null || h.unsubscribe();
|
|
1926
1902
|
};
|
|
1927
|
-
}, []),
|
|
1928
|
-
|
|
1929
|
-
var
|
|
1930
|
-
if (
|
|
1931
|
-
const
|
|
1932
|
-
(
|
|
1903
|
+
}, []), he(() => {
|
|
1904
|
+
d.forEach((h, _) => {
|
|
1905
|
+
var P;
|
|
1906
|
+
if (h.current) {
|
|
1907
|
+
const b = c[_];
|
|
1908
|
+
(P = t.getRenderById(b.id)) == null || P.engine.setContainer(h.current);
|
|
1933
1909
|
}
|
|
1934
|
-
}),
|
|
1935
|
-
}, [
|
|
1936
|
-
const
|
|
1937
|
-
|
|
1938
|
-
}, [
|
|
1939
|
-
|
|
1940
|
-
}, [
|
|
1941
|
-
return /* @__PURE__ */
|
|
1942
|
-
/* @__PURE__ */
|
|
1943
|
-
|
|
1910
|
+
}), d.length > 0 && e.syncExecuteCommand(Jt.id, { unitId: s == null ? void 0 : s.getUnitId() });
|
|
1911
|
+
}, [d, c, t, e, s]);
|
|
1912
|
+
const p = lt((h) => {
|
|
1913
|
+
e.syncExecuteCommand(Zt.id, { id: h, unitId: s == null ? void 0 : s.getUnitId() });
|
|
1914
|
+
}, [e, s]), v = lt(() => {
|
|
1915
|
+
e.syncExecuteCommand(kt.id, { unitId: s == null ? void 0 : s.getUnitId() });
|
|
1916
|
+
}, [e, s]);
|
|
1917
|
+
return /* @__PURE__ */ m("aside", { className: ie.slideBar, ref: r, children: /* @__PURE__ */ m(Fn, { children: /* @__PURE__ */ R("div", { className: ie.slideBarContent, children: [
|
|
1918
|
+
/* @__PURE__ */ m("header", { className: ie.slideBarContentHeader, children: /* @__PURE__ */ m("a", { onClick: v, children: n.t("slide.append") }) }),
|
|
1919
|
+
c.map((h, _) => /* @__PURE__ */ R(
|
|
1944
1920
|
"div",
|
|
1945
1921
|
{
|
|
1946
|
-
className:
|
|
1947
|
-
[
|
|
1922
|
+
className: T(ie.slideBarItem, {
|
|
1923
|
+
[ie.slideBarItemActive]: h.id === g
|
|
1948
1924
|
}),
|
|
1949
|
-
onClick:
|
|
1925
|
+
onClick: () => p(h.id),
|
|
1950
1926
|
children: [
|
|
1951
|
-
/* @__PURE__ */
|
|
1952
|
-
/* @__PURE__ */
|
|
1927
|
+
/* @__PURE__ */ m("span", { children: _ + 1 }),
|
|
1928
|
+
/* @__PURE__ */ m("div", { ref: d[_], className: ie.slideBarBox })
|
|
1953
1929
|
]
|
|
1954
1930
|
},
|
|
1955
|
-
|
|
1931
|
+
h.id
|
|
1956
1932
|
))
|
|
1957
1933
|
] }) }) });
|
|
1958
1934
|
}
|
|
1959
|
-
|
|
1960
|
-
|
|
1961
|
-
|
|
1962
|
-
|
|
1963
|
-
}, HIDDEN_EDITOR_POSITION = -1e3, EDITOR_DEFAULT_POSITION = {
|
|
1935
|
+
const jr = "univer-slide-editor-container", Br = "univer-editor-input", Lr = {
|
|
1936
|
+
slideEditorContainer: jr,
|
|
1937
|
+
editorInput: Br
|
|
1938
|
+
}, Ne = -1e3, vt = {
|
|
1964
1939
|
width: 0,
|
|
1965
1940
|
height: 0,
|
|
1966
|
-
top:
|
|
1967
|
-
left:
|
|
1968
|
-
},
|
|
1969
|
-
const [
|
|
1970
|
-
...
|
|
1971
|
-
}),
|
|
1972
|
-
() =>
|
|
1941
|
+
top: Ne,
|
|
1942
|
+
left: Ne
|
|
1943
|
+
}, Ar = () => {
|
|
1944
|
+
const [i, e] = X({
|
|
1945
|
+
...vt
|
|
1946
|
+
}), t = x(Je), n = x(Ye), r = x(fe), s = Un(
|
|
1947
|
+
() => r.subscribeContextValue$(at),
|
|
1973
1948
|
!1,
|
|
1974
1949
|
void 0,
|
|
1975
|
-
[
|
|
1950
|
+
[r, at]
|
|
1976
1951
|
);
|
|
1977
|
-
return `${
|
|
1978
|
-
|
|
1979
|
-
if (
|
|
1952
|
+
return `${Ot}`, Pn.UNSPECIFIED, he(() => {
|
|
1953
|
+
t.state$.subscribe((o) => {
|
|
1954
|
+
if (o == null)
|
|
1980
1955
|
return;
|
|
1981
1956
|
const {
|
|
1982
|
-
startX =
|
|
1983
|
-
startY =
|
|
1984
|
-
endX = 0,
|
|
1985
|
-
endY = 0,
|
|
1986
|
-
show = !1
|
|
1987
|
-
} =
|
|
1988
|
-
if (!
|
|
1989
|
-
|
|
1990
|
-
...
|
|
1957
|
+
startX: a = Ne,
|
|
1958
|
+
startY: c = Ne,
|
|
1959
|
+
endX: g = 0,
|
|
1960
|
+
endY: l = 0,
|
|
1961
|
+
show: d = !1
|
|
1962
|
+
} = o;
|
|
1963
|
+
if (!d)
|
|
1964
|
+
e({
|
|
1965
|
+
...vt
|
|
1991
1966
|
});
|
|
1992
1967
|
else {
|
|
1993
|
-
|
|
1994
|
-
width:
|
|
1995
|
-
height:
|
|
1996
|
-
left:
|
|
1997
|
-
top:
|
|
1968
|
+
e({
|
|
1969
|
+
width: g - a - se + 2,
|
|
1970
|
+
height: l - c - se + 2,
|
|
1971
|
+
left: a + se,
|
|
1972
|
+
top: c + se
|
|
1998
1973
|
});
|
|
1999
|
-
const
|
|
2000
|
-
if (
|
|
1974
|
+
const p = n.getEditor(ae);
|
|
1975
|
+
if (p == null)
|
|
2001
1976
|
return;
|
|
2002
|
-
const { left, top, width, height } =
|
|
2003
|
-
|
|
1977
|
+
const { left: v, top: f, width: C, height: h } = p.getBoundingClientRect();
|
|
1978
|
+
t.setRect({ left: v, top: f, width: C, height: h });
|
|
2004
1979
|
}
|
|
2005
1980
|
});
|
|
2006
|
-
}, []),
|
|
2007
|
-
|
|
2008
|
-
}, [
|
|
1981
|
+
}, []), he(() => {
|
|
1982
|
+
s || t.setFocus(!0);
|
|
1983
|
+
}, [s, i]), /* @__PURE__ */ m(
|
|
2009
1984
|
"div",
|
|
2010
1985
|
{
|
|
2011
|
-
className:
|
|
1986
|
+
className: Lr.slideEditorContainer,
|
|
2012
1987
|
style: {
|
|
2013
|
-
left:
|
|
2014
|
-
top:
|
|
2015
|
-
width:
|
|
2016
|
-
height:
|
|
1988
|
+
left: i.left,
|
|
1989
|
+
top: i.top,
|
|
1990
|
+
width: i.width,
|
|
1991
|
+
height: i.height
|
|
2017
1992
|
}
|
|
2018
1993
|
}
|
|
2019
1994
|
);
|
|
2020
|
-
},
|
|
2021
|
-
function
|
|
1995
|
+
}, Qt = "addition-and-subtraction-single", en = "slide.menu.image";
|
|
1996
|
+
function $r(i) {
|
|
2022
1997
|
return {
|
|
2023
|
-
id:
|
|
2024
|
-
type:
|
|
2025
|
-
icon:
|
|
1998
|
+
id: en,
|
|
1999
|
+
type: ve.SUBITEMS,
|
|
2000
|
+
icon: Qt,
|
|
2026
2001
|
tooltip: "slide.image.insert.title",
|
|
2027
|
-
hidden$:
|
|
2002
|
+
hidden$: _e(i, E.UNIVER_SLIDE)
|
|
2028
2003
|
};
|
|
2029
2004
|
}
|
|
2030
|
-
|
|
2031
|
-
function UploadSlideFloatImageMenuFactory(_accessor) {
|
|
2005
|
+
function Hr(i) {
|
|
2032
2006
|
return {
|
|
2033
|
-
id:
|
|
2007
|
+
id: Qe.id,
|
|
2034
2008
|
title: "slide.image.insert.float",
|
|
2035
|
-
type:
|
|
2036
|
-
hidden$:
|
|
2009
|
+
type: ve.BUTTON,
|
|
2010
|
+
hidden$: _e(i, E.UNIVER_SLIDE)
|
|
2037
2011
|
};
|
|
2038
2012
|
}
|
|
2039
|
-
|
|
2040
|
-
|
|
2041
|
-
function SlideShapeMenuFactory(accessor) {
|
|
2013
|
+
const tn = "graph-single", nn = "slide.menu.shape";
|
|
2014
|
+
function Fr(i) {
|
|
2042
2015
|
return {
|
|
2043
|
-
id:
|
|
2044
|
-
type:
|
|
2045
|
-
icon:
|
|
2016
|
+
id: nn,
|
|
2017
|
+
type: ve.SUBITEMS,
|
|
2018
|
+
icon: tn,
|
|
2046
2019
|
tooltip: "slide.shape.insert.title",
|
|
2047
|
-
hidden$:
|
|
2020
|
+
hidden$: _e(i, E.UNIVER_SLIDE)
|
|
2048
2021
|
// disabled$: getCurrentRangeDisable$(accessor, { workbookTypes: [WorkbookEditablePermission], worksheetTypes: [WorksheetEditPermission], rangeTypes: [RangeProtectionPermissionEditPoint] }),
|
|
2049
2022
|
};
|
|
2050
2023
|
}
|
|
2051
|
-
|
|
2052
|
-
function UploadSlideFloatShapeMenuFactory(_accessor) {
|
|
2024
|
+
function zr(i) {
|
|
2053
2025
|
return {
|
|
2054
|
-
id:
|
|
2026
|
+
id: ke.id,
|
|
2055
2027
|
title: "slide.shape.insert.rectangle",
|
|
2056
|
-
type:
|
|
2057
|
-
hidden$:
|
|
2028
|
+
type: ve.BUTTON,
|
|
2029
|
+
hidden$: _e(i, E.UNIVER_SLIDE)
|
|
2058
2030
|
};
|
|
2059
2031
|
}
|
|
2060
|
-
|
|
2061
|
-
|
|
2062
|
-
function SlideAddTextMenuItemFactory(_accessor) {
|
|
2032
|
+
const rn = "text-single";
|
|
2033
|
+
function Wr(i) {
|
|
2063
2034
|
return {
|
|
2064
|
-
id:
|
|
2065
|
-
type:
|
|
2066
|
-
icon:
|
|
2035
|
+
id: et.id,
|
|
2036
|
+
type: ve.BUTTON,
|
|
2037
|
+
icon: rn,
|
|
2067
2038
|
tooltip: "slide.text.insert.title",
|
|
2068
|
-
hidden$:
|
|
2039
|
+
hidden$: _e(i, E.UNIVER_SLIDE)
|
|
2069
2040
|
};
|
|
2070
2041
|
}
|
|
2071
|
-
|
|
2072
|
-
|
|
2073
|
-
|
|
2074
|
-
[SlideAddTextCommand.id]: {
|
|
2042
|
+
const Kr = {
|
|
2043
|
+
[Vn.FORMAT]: {
|
|
2044
|
+
[et.id]: {
|
|
2075
2045
|
order: 0,
|
|
2076
|
-
menuItemFactory:
|
|
2046
|
+
menuItemFactory: Wr
|
|
2077
2047
|
},
|
|
2078
|
-
[
|
|
2048
|
+
[en]: {
|
|
2079
2049
|
order: 0,
|
|
2080
|
-
menuItemFactory:
|
|
2081
|
-
[
|
|
2050
|
+
menuItemFactory: $r,
|
|
2051
|
+
[Qe.id]: {
|
|
2082
2052
|
order: 0,
|
|
2083
|
-
menuItemFactory:
|
|
2053
|
+
menuItemFactory: Hr
|
|
2084
2054
|
}
|
|
2085
2055
|
},
|
|
2086
|
-
[
|
|
2056
|
+
[nn]: {
|
|
2087
2057
|
order: 0,
|
|
2088
|
-
menuItemFactory:
|
|
2089
|
-
[
|
|
2058
|
+
menuItemFactory: Fr,
|
|
2059
|
+
[ke.id]: {
|
|
2090
2060
|
order: 0,
|
|
2091
|
-
menuItemFactory:
|
|
2061
|
+
menuItemFactory: zr
|
|
2092
2062
|
}
|
|
2093
2063
|
}
|
|
2094
2064
|
}
|
|
2095
2065
|
};
|
|
2096
|
-
function
|
|
2097
|
-
return
|
|
2066
|
+
function We(i) {
|
|
2067
|
+
return i.getContextValue(xt) && i.getContextValue(xe);
|
|
2098
2068
|
}
|
|
2099
|
-
|
|
2100
|
-
|
|
2101
|
-
return contextService.getContextValue(FORMULA_EDITOR_ACTIVATED) && contextService.getContextValue(FOCUSING_UNIVER_EDITOR);
|
|
2069
|
+
function Gr(i) {
|
|
2070
|
+
return i.getContextValue(bn) && i.getContextValue(xt);
|
|
2102
2071
|
}
|
|
2103
|
-
|
|
2104
|
-
|
|
2105
|
-
|
|
2106
|
-
|
|
2107
|
-
|
|
2108
|
-
KeyCode.ARROW_RIGHT
|
|
2072
|
+
const sn = [
|
|
2073
|
+
M.ARROW_DOWN,
|
|
2074
|
+
M.ARROW_UP,
|
|
2075
|
+
M.ARROW_LEFT,
|
|
2076
|
+
M.ARROW_RIGHT
|
|
2109
2077
|
];
|
|
2110
|
-
[
|
|
2111
|
-
function
|
|
2112
|
-
const
|
|
2113
|
-
for (const
|
|
2114
|
-
|
|
2115
|
-
id:
|
|
2116
|
-
binding:
|
|
2117
|
-
preconditions:
|
|
2078
|
+
[M.ENTER, M.TAB, ...sn];
|
|
2079
|
+
function Xr() {
|
|
2080
|
+
const i = [];
|
|
2081
|
+
for (const e of sn)
|
|
2082
|
+
i.push({
|
|
2083
|
+
id: we.id,
|
|
2084
|
+
binding: e,
|
|
2085
|
+
preconditions: (t) => We(t),
|
|
2118
2086
|
staticParameters: {
|
|
2119
2087
|
visible: !1,
|
|
2120
|
-
eventType:
|
|
2121
|
-
keycode,
|
|
2088
|
+
eventType: J.Keyboard,
|
|
2089
|
+
keycode: e,
|
|
2122
2090
|
isShift: !1
|
|
2123
2091
|
}
|
|
2124
|
-
}),
|
|
2125
|
-
id:
|
|
2126
|
-
binding:
|
|
2127
|
-
preconditions:
|
|
2092
|
+
}), i.push({
|
|
2093
|
+
id: we.id,
|
|
2094
|
+
binding: e | jn.SHIFT,
|
|
2095
|
+
preconditions: (t) => We(t),
|
|
2128
2096
|
staticParameters: {
|
|
2129
2097
|
visible: !1,
|
|
2130
|
-
eventType:
|
|
2131
|
-
keycode,
|
|
2098
|
+
eventType: J.Keyboard,
|
|
2099
|
+
keycode: e,
|
|
2132
2100
|
isShift: !0
|
|
2133
2101
|
}
|
|
2134
2102
|
});
|
|
2135
|
-
return
|
|
2103
|
+
return i;
|
|
2136
2104
|
}
|
|
2137
|
-
|
|
2138
|
-
|
|
2139
|
-
|
|
2140
|
-
|
|
2141
|
-
binding: KeyCode.BACKSPACE
|
|
2105
|
+
const Yr = {
|
|
2106
|
+
id: qn.id,
|
|
2107
|
+
preconditions: (i) => We(i) || Gr(i),
|
|
2108
|
+
binding: M.BACKSPACE
|
|
2142
2109
|
};
|
|
2143
|
-
var
|
|
2144
|
-
for (var
|
|
2145
|
-
(
|
|
2146
|
-
return
|
|
2147
|
-
},
|
|
2148
|
-
let
|
|
2149
|
-
constructor(
|
|
2150
|
-
super(), this._injector =
|
|
2110
|
+
var Zr = Object.defineProperty, kr = Object.getOwnPropertyDescriptor, qr = (i, e, t, n) => {
|
|
2111
|
+
for (var r = n > 1 ? void 0 : n ? kr(e, t) : e, s = i.length - 1, o; s >= 0; s--)
|
|
2112
|
+
(o = i[s]) && (r = (n ? o(e, t, r) : o(r)) || r);
|
|
2113
|
+
return n && r && Zr(e, t, r), r;
|
|
2114
|
+
}, re = (i, e) => (t, n) => e(t, n, i);
|
|
2115
|
+
let De = class extends Ve {
|
|
2116
|
+
constructor(i, e, t, n, r, s) {
|
|
2117
|
+
super(), this._injector = i, this._menuManagerService = e, this._componentManager = t, this._uiPartsService = n, this._commandService = r, this._shortcutService = s, this._initCommands(), this._initCustomComponents(), this._initUIComponents(), this._initMenus(), this._initShortcuts();
|
|
2151
2118
|
}
|
|
2152
2119
|
_initMenus() {
|
|
2153
|
-
this._menuManagerService.mergeMenu(
|
|
2120
|
+
this._menuManagerService.mergeMenu(Kr);
|
|
2154
2121
|
}
|
|
2155
2122
|
_initCustomComponents() {
|
|
2156
|
-
const
|
|
2157
|
-
this.disposeWithMe(
|
|
2123
|
+
const i = this._componentManager;
|
|
2124
|
+
this.disposeWithMe(i.register(Qt, Lt)), this.disposeWithMe(i.register(rn, Kt)), this.disposeWithMe(i.register(tn, Ht)), this.disposeWithMe(i.register(Yt, xr)), this.disposeWithMe(i.register(Oe, er));
|
|
2158
2125
|
}
|
|
2159
2126
|
_initCommands() {
|
|
2160
2127
|
[
|
|
2161
|
-
|
|
2162
|
-
|
|
2163
|
-
|
|
2164
|
-
|
|
2165
|
-
|
|
2166
|
-
|
|
2167
|
-
|
|
2168
|
-
|
|
2169
|
-
|
|
2170
|
-
|
|
2171
|
-
|
|
2128
|
+
kt,
|
|
2129
|
+
Zt,
|
|
2130
|
+
Jt,
|
|
2131
|
+
Qe,
|
|
2132
|
+
qt,
|
|
2133
|
+
et,
|
|
2134
|
+
Xt,
|
|
2135
|
+
ke,
|
|
2136
|
+
$e,
|
|
2137
|
+
Vt,
|
|
2138
|
+
K,
|
|
2172
2139
|
// commands for editor
|
|
2173
|
-
|
|
2174
|
-
].forEach((
|
|
2140
|
+
we
|
|
2141
|
+
].forEach((i) => this.disposeWithMe(this._commandService.registerCommand(i)));
|
|
2175
2142
|
}
|
|
2176
2143
|
_initUIComponents() {
|
|
2177
2144
|
this.disposeWithMe(
|
|
2178
|
-
this._uiPartsService.registerComponent(
|
|
2145
|
+
this._uiPartsService.registerComponent(ct.LEFT_SIDEBAR, () => nt(Vr, this._injector))
|
|
2179
2146
|
), this.disposeWithMe(
|
|
2180
|
-
this._uiPartsService.registerComponent(
|
|
2147
|
+
this._uiPartsService.registerComponent(ct.CONTENT, () => nt(Ar, this._injector))
|
|
2181
2148
|
);
|
|
2182
2149
|
}
|
|
2183
2150
|
_initShortcuts() {
|
|
2184
2151
|
[
|
|
2185
|
-
|
|
2186
|
-
...
|
|
2187
|
-
].forEach((
|
|
2188
|
-
this.disposeWithMe(this._shortcutService.registerShortcut(
|
|
2152
|
+
Yr,
|
|
2153
|
+
...Xr()
|
|
2154
|
+
].forEach((i) => {
|
|
2155
|
+
this.disposeWithMe(this._shortcutService.registerShortcut(i));
|
|
2189
2156
|
});
|
|
2190
2157
|
}
|
|
2191
|
-
}
|
|
2192
|
-
|
|
2193
|
-
|
|
2194
|
-
|
|
2195
|
-
|
|
2196
|
-
|
|
2197
|
-
|
|
2198
|
-
|
|
2199
|
-
],
|
|
2200
|
-
var
|
|
2201
|
-
for (var
|
|
2202
|
-
(
|
|
2203
|
-
return
|
|
2204
|
-
},
|
|
2205
|
-
let
|
|
2158
|
+
};
|
|
2159
|
+
De = qr([
|
|
2160
|
+
re(0, Y(Ke)),
|
|
2161
|
+
re(1, Ln),
|
|
2162
|
+
re(2, Y(Bn)),
|
|
2163
|
+
re(3, An),
|
|
2164
|
+
re(4, j),
|
|
2165
|
+
re(5, $n)
|
|
2166
|
+
], De);
|
|
2167
|
+
var Jr = Object.defineProperty, Qr = Object.getOwnPropertyDescriptor, es = (i, e, t, n) => {
|
|
2168
|
+
for (var r = n > 1 ? void 0 : n ? Qr(e, t) : e, s = i.length - 1, o; s >= 0; s--)
|
|
2169
|
+
(o = i[s]) && (r = (n ? o(e, t, r) : o(r)) || r);
|
|
2170
|
+
return n && r && Jr(e, t, r), r;
|
|
2171
|
+
}, Ae = (i, e) => (t, n) => e(t, n, i);
|
|
2172
|
+
let Ue = class extends Ce {
|
|
2206
2173
|
// private _skeletonChangeMutations = new Set<string>();
|
|
2207
|
-
constructor(
|
|
2208
|
-
super(), this._contextService =
|
|
2174
|
+
constructor(i, e, t) {
|
|
2175
|
+
super(), this._contextService = i, this._instanceSrv = e, this._renderManagerService = t, Promise.resolve().then(() => this._init());
|
|
2209
2176
|
}
|
|
2210
2177
|
_init() {
|
|
2211
2178
|
this._initSlideDataListener(), this._initContextListener();
|
|
2212
2179
|
}
|
|
2213
2180
|
_initSlideDataListener() {
|
|
2214
|
-
this._instanceSrv.getTypeOfUnitAdded$(
|
|
2215
|
-
this._createRenderer(
|
|
2216
|
-
}), this._instanceSrv.getAllUnitsForType(
|
|
2217
|
-
this._createRenderer(
|
|
2218
|
-
}), this._instanceSrv.getTypeOfUnitDisposed$(
|
|
2181
|
+
this._instanceSrv.getTypeOfUnitAdded$(E.UNIVER_SLIDE).pipe(dt(this.dispose$)).subscribe((i) => {
|
|
2182
|
+
this._createRenderer(i == null ? void 0 : i.getUnitId());
|
|
2183
|
+
}), this._instanceSrv.getAllUnitsForType(E.UNIVER_SLIDE).forEach((i) => {
|
|
2184
|
+
this._createRenderer(i.getUnitId());
|
|
2185
|
+
}), this._instanceSrv.getTypeOfUnitDisposed$(E.UNIVER_SLIDE).pipe(dt(this.dispose$)).subscribe((i) => this._disposeRenderer(i));
|
|
2219
2186
|
}
|
|
2220
|
-
_createRenderer(
|
|
2221
|
-
|
|
2187
|
+
_createRenderer(i) {
|
|
2188
|
+
i == null || this._instanceSrv.getUnit(i, E.UNIVER_SLIDE) == null || (this._renderManagerService.createRender(i), this._renderManagerService.setCurrent(i));
|
|
2222
2189
|
}
|
|
2223
|
-
_disposeRenderer(
|
|
2224
|
-
const
|
|
2225
|
-
this._renderManagerService.removeRender(
|
|
2190
|
+
_disposeRenderer(i) {
|
|
2191
|
+
const e = i.getUnitId();
|
|
2192
|
+
this._renderManagerService.removeRender(e);
|
|
2226
2193
|
}
|
|
2227
2194
|
_initContextListener() {
|
|
2228
2195
|
}
|
|
2229
|
-
}
|
|
2230
|
-
|
|
2231
|
-
|
|
2232
|
-
|
|
2233
|
-
|
|
2234
|
-
],
|
|
2235
|
-
var
|
|
2236
|
-
for (var
|
|
2237
|
-
(
|
|
2238
|
-
return
|
|
2239
|
-
},
|
|
2240
|
-
const
|
|
2241
|
-
var
|
|
2242
|
-
let
|
|
2243
|
-
constructor(
|
|
2244
|
-
super(), this._config =
|
|
2245
|
-
const { menu, ...
|
|
2196
|
+
};
|
|
2197
|
+
Ue = es([
|
|
2198
|
+
Ae(0, fe),
|
|
2199
|
+
Ae(1, y),
|
|
2200
|
+
Ae(2, Z)
|
|
2201
|
+
], Ue);
|
|
2202
|
+
var ts = Object.defineProperty, ns = Object.getOwnPropertyDescriptor, is = (i, e, t, n) => {
|
|
2203
|
+
for (var r = n > 1 ? void 0 : n ? ns(e, t) : e, s = i.length - 1, o; s >= 0; s--)
|
|
2204
|
+
(o = i[s]) && (r = (n ? o(e, t, r) : o(r)) || r);
|
|
2205
|
+
return n && r && ts(e, t, r), r;
|
|
2206
|
+
}, Ee = (i, e) => (t, n) => e(t, n, i);
|
|
2207
|
+
const rs = "SLIDE_UI";
|
|
2208
|
+
var Re;
|
|
2209
|
+
let _t = (Re = class extends En {
|
|
2210
|
+
constructor(i = ht, e, t, n, r) {
|
|
2211
|
+
super(), this._config = i, this._injector = e, this._renderManagerService = t, this._univerInstanceService = n, this._configService = r;
|
|
2212
|
+
const { menu: s, ...o } = Rn(
|
|
2246
2213
|
{},
|
|
2247
|
-
|
|
2214
|
+
ht,
|
|
2248
2215
|
this._config
|
|
2249
2216
|
);
|
|
2250
|
-
|
|
2217
|
+
s && this._configService.setConfig("menu", s, { merge: !0 }), this._configService.setConfig(ci, o);
|
|
2251
2218
|
}
|
|
2252
2219
|
onStarting() {
|
|
2253
|
-
|
|
2254
|
-
[
|
|
2255
|
-
[
|
|
2220
|
+
it([
|
|
2221
|
+
[Ue],
|
|
2222
|
+
[qe, { useClass: He }],
|
|
2256
2223
|
// used by SlideUIController --> EditorContainer
|
|
2257
|
-
[
|
|
2258
|
-
[
|
|
2259
|
-
], this._config.override).forEach((
|
|
2224
|
+
[Je, { useClass: mr }],
|
|
2225
|
+
[Me]
|
|
2226
|
+
], this._config.override).forEach((i) => this._injector.add(i));
|
|
2260
2227
|
}
|
|
2261
2228
|
onReady() {
|
|
2262
2229
|
[
|
|
2263
2230
|
// SlideRenderService will be init in ready stage, and then calling RenderManagerService@createRender --> init all deps in this rendering register block.
|
|
2264
|
-
[
|
|
2265
|
-
].forEach((
|
|
2266
|
-
this.disposeWithMe(this._renderManagerService.registerRenderModule(
|
|
2267
|
-
}),
|
|
2268
|
-
[
|
|
2231
|
+
[pe]
|
|
2232
|
+
].forEach((i) => {
|
|
2233
|
+
this.disposeWithMe(this._renderManagerService.registerRenderModule(E.UNIVER_SLIDE, i));
|
|
2234
|
+
}), it([
|
|
2235
|
+
[N],
|
|
2269
2236
|
// cannot register in _renderManagerService now.
|
|
2270
2237
|
// [ISlideEditorBridgeService, { useClass: SlideEditorBridgeService }],
|
|
2271
2238
|
// // used by SlideUIController --> EditorContainer
|
|
2272
2239
|
// [ISlideEditorManagerService, { useClass: SlideEditorManagerService }],
|
|
2273
2240
|
// SlidesUIController controller should be registered in Ready stage.
|
|
2274
2241
|
// SlidesUIController controller would add a new RenderUnit (__INTERNAL_EDITOR__DOCS_NORMAL)
|
|
2275
|
-
[
|
|
2242
|
+
[De],
|
|
2276
2243
|
// editor service was create in renderManagerService
|
|
2277
|
-
[
|
|
2278
|
-
[
|
|
2279
|
-
], this._config.override).forEach((
|
|
2280
|
-
this._injector.add(
|
|
2281
|
-
}), this._injector.get(
|
|
2244
|
+
[pe],
|
|
2245
|
+
[Te]
|
|
2246
|
+
], this._config.override).forEach((i) => {
|
|
2247
|
+
this._injector.add(i);
|
|
2248
|
+
}), this._injector.get(N), this._injector.get(Ue);
|
|
2282
2249
|
}
|
|
2283
2250
|
onRendered() {
|
|
2284
2251
|
[
|
|
2285
2252
|
// need slideEditorBridgeService
|
|
2286
2253
|
// need TextSelectionRenderService which init by EditorContainer
|
|
2287
|
-
[
|
|
2288
|
-
[
|
|
2289
|
-
].forEach((
|
|
2290
|
-
this.disposeWithMe(this._renderManagerService.registerRenderModule(
|
|
2291
|
-
}), this._markSlideAsFocused(), this._injector.get(
|
|
2254
|
+
[ze],
|
|
2255
|
+
[Fe]
|
|
2256
|
+
].forEach((i) => {
|
|
2257
|
+
this.disposeWithMe(this._renderManagerService.registerRenderModule(E.UNIVER_SLIDE, i));
|
|
2258
|
+
}), this._markSlideAsFocused(), this._injector.get(De);
|
|
2292
2259
|
}
|
|
2293
2260
|
onSteady() {
|
|
2294
|
-
this._injector.get(
|
|
2261
|
+
this._injector.get(Te);
|
|
2295
2262
|
}
|
|
2296
2263
|
_markSlideAsFocused() {
|
|
2297
|
-
const
|
|
2264
|
+
const i = this._univerInstanceService;
|
|
2298
2265
|
try {
|
|
2299
|
-
const
|
|
2300
|
-
|
|
2266
|
+
const e = i.getCurrentUnitForType(E.UNIVER_SLIDE);
|
|
2267
|
+
i.focusUnit(e.getUnitId());
|
|
2301
2268
|
} catch {
|
|
2302
2269
|
}
|
|
2303
2270
|
}
|
|
2304
|
-
},
|
|
2305
|
-
|
|
2306
|
-
|
|
2307
|
-
|
|
2308
|
-
|
|
2309
|
-
|
|
2310
|
-
],
|
|
2271
|
+
}, I(Re, "pluginName", rs), I(Re, "type", E.UNIVER_SLIDE), Re);
|
|
2272
|
+
_t = is([
|
|
2273
|
+
Ee(1, Y(Ke)),
|
|
2274
|
+
Ee(2, Z),
|
|
2275
|
+
Ee(3, y),
|
|
2276
|
+
Ee(4, On)
|
|
2277
|
+
], _t);
|
|
2311
2278
|
export {
|
|
2312
|
-
ActivateSlidePageOperation,
|
|
2313
|
-
AppendSlideOperation,
|
|
2314
|
-
CanvasView,
|
|
2315
|
-
DeleteSlideElementOperation,
|
|
2316
|
-
ISlideEditorBridgeService,
|
|
2317
|
-
InsertSlideFloatImageCommand,
|
|
2318
|
-
InsertSlideShapeRectangleCommand,
|
|
2319
|
-
InsertSlideShapeRectangleOperation,
|
|
2320
|
-
SHAPE_MENU_ID,
|
|
2321
|
-
SLIDES_IMAGE_MENU_ID,
|
|
2322
|
-
SLIDE_EDITOR_ID,
|
|
2323
|
-
SetSlidePageThumbOperation,
|
|
2324
|
-
SlideAddTextCommand,
|
|
2325
|
-
SlideAddTextOperation,
|
|
2326
|
-
SlideCanvasPopMangerService,
|
|
2327
|
-
SlideEditorContainer,
|
|
2328
|
-
SlideSideBar,
|
|
2329
|
-
SlidesUIController,
|
|
2330
|
-
|
|
2331
|
-
UniverSlidesUIPlugin,
|
|
2332
|
-
UpdateSlideElementOperation
|
|
2279
|
+
Zt as ActivateSlidePageOperation,
|
|
2280
|
+
kt as AppendSlideOperation,
|
|
2281
|
+
N as CanvasView,
|
|
2282
|
+
Vt as DeleteSlideElementOperation,
|
|
2283
|
+
qe as ISlideEditorBridgeService,
|
|
2284
|
+
Qe as InsertSlideFloatImageCommand,
|
|
2285
|
+
ke as InsertSlideShapeRectangleCommand,
|
|
2286
|
+
Xt as InsertSlideShapeRectangleOperation,
|
|
2287
|
+
nn as SHAPE_MENU_ID,
|
|
2288
|
+
en as SLIDES_IMAGE_MENU_ID,
|
|
2289
|
+
ae as SLIDE_EDITOR_ID,
|
|
2290
|
+
Jt as SetSlidePageThumbOperation,
|
|
2291
|
+
et as SlideAddTextCommand,
|
|
2292
|
+
qt as SlideAddTextOperation,
|
|
2293
|
+
Me as SlideCanvasPopMangerService,
|
|
2294
|
+
Ar as SlideEditorContainer,
|
|
2295
|
+
Vr as SlideSideBar,
|
|
2296
|
+
De as SlidesUIController,
|
|
2297
|
+
Kr as SlidesUIMenuSchema,
|
|
2298
|
+
_t as UniverSlidesUIPlugin,
|
|
2299
|
+
K as UpdateSlideElementOperation
|
|
2333
2300
|
};
|