@univerjs/slides-ui 0.7.0-beta.0 → 0.7.0-nightly.202504301607
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/cjs/index.js +32 -4
- package/lib/es/index.js +1021 -1007
- package/lib/index.css +1 -1
- package/lib/index.js +1021 -1007
- package/lib/umd/index.js +32 -4
- package/package.json +11 -12
- package/LICENSE +0 -176
package/lib/index.js
CHANGED
|
@@ -1,33 +1,33 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var
|
|
4
|
-
import { Inject as
|
|
5
|
-
import { IRenderManagerService as
|
|
6
|
-
import { ObjectProvider as
|
|
7
|
-
import { useDependency as
|
|
8
|
-
import { jsxs as
|
|
9
|
-
import {
|
|
10
|
-
import
|
|
11
|
-
import { BehaviorSubject as
|
|
12
|
-
import { DocSelectionManagerService as
|
|
13
|
-
import { IEditorService as
|
|
14
|
-
import { DRAWING_IMAGE_ALLOW_IMAGE_LIST as
|
|
15
|
-
var
|
|
16
|
-
for (var r =
|
|
17
|
-
(o =
|
|
1
|
+
var si = Object.defineProperty;
|
|
2
|
+
var oi = (n, e, t) => e in n ? si(n, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : n[e] = t;
|
|
3
|
+
var S = (n, e, t) => oi(n, typeof e != "symbol" ? e + "" : e, t);
|
|
4
|
+
import { Inject as K, Injector as We, IUniverInstanceService as y, RxDisposable as he, UniverInstanceType as E, debounce as ai, getColorStyle as ci, CommandType as D, Tools as li, LocaleService as J, ICommandService as U, generateRandomId as _t, BasicShapes as di, PageElementType as ze, Disposable as Me, DisposableCollection as ke, IContextService as ve, toDisposable as Ct, FOCUSING_COMMON_DRAWINGS as ui, createInternalEditorID as hi, createIdentifier as St, EDITOR_ACTIVATED as Ee, FOCUSING_EDITOR_STANDALONE as It, FOCUSING_UNIVER_EDITOR_STANDALONE_SINGLE_MODE as bt, DocumentDataModel as vi, HorizontalAlign as Et, VerticalAlign as Oe, IUndoRedoService as gi, WrapStrategy as Qe, FOCUSING_EDITOR_BUT_HIDDEN as fi, DEFAULT_EMPTY_DOCUMENT_VALUE as mi, Direction as j, DocumentFlavor as pi, FOCUSING_UNIVER_EDITOR as Ot, FORMULA_EDITOR_ACTIVATED as _i, Plugin as Ci, merge as Si, mergeOverrideWithDependencies as et, IConfigService as Ii } from "@univerjs/core";
|
|
5
|
+
import { IRenderManagerService as X, Viewport as tt, ScrollBar as xt, getCurrentTypeOfRenderer as je, Slide as bi, Rect as Rt, Scene as Ei, ObjectType as ce, pxToNum as Oi, DeviceInputEventType as Z, convertTextRotation as it, FIX_ONE_PIXEL_BLUR_OFFSET as ie, fixLineWidthByScale as nt } from "@univerjs/engine-render";
|
|
6
|
+
import { ObjectProvider as xi, SLIDE_KEY as ne } from "@univerjs/slides";
|
|
7
|
+
import { useDependency as R, ISidebarService as yt, ICanvasPopupService as Ri, ILayoutService as yi, KeyCode as P, ILocalFileService as Pi, useObservable as wi, DISABLE_AUTO_FOCUS_KEY as rt, getMenuHiddenObservable as ge, MenuItemType as fe, RibbonStartGroup as Ti, MetaKeys as Mi, IMenuManagerService as Ni, ComponentManager as Di, IUIPartsService as Ui, IShortcutService as Vi, BuiltInUIPart as st, connectInjector as ot } from "@univerjs/ui";
|
|
8
|
+
import { jsxs as O, jsx as u } from "react/jsx-runtime";
|
|
9
|
+
import { Button as _e, Dropdown as Pt, ColorPicker as ji, InputNumber as ae, clsx as Le, scrollbarClassName as Li } from "@univerjs/design";
|
|
10
|
+
import Ai, { forwardRef as A, useRef as wt, createElement as B, useState as k, useEffect as de, useMemo as Bi, createRef as $i, useCallback as at } from "react";
|
|
11
|
+
import { BehaviorSubject as q, Subject as Tt, filter as Hi, takeUntil as ct } from "rxjs";
|
|
12
|
+
import { DocSelectionManagerService as Fi, DocSkeletonManagerService as lt, RichTextEditingMutation as Wi } from "@univerjs/docs";
|
|
13
|
+
import { IEditorService as Ke, DocSelectionRenderService as dt, VIEWPORT_KEY as ut, DOCS_COMPONENT_MAIN_LAYER_INDEX as zi, MoveSelectionOperation as ki, MoveCursorOperation as Ki, DOCS_VIEW_KEY as Xi, DeleteLeftCommand as Gi } from "@univerjs/docs-ui";
|
|
14
|
+
import { DRAWING_IMAGE_ALLOW_IMAGE_LIST as Yi, IImageIoService as Zi, getImageSize as qi } from "@univerjs/drawing";
|
|
15
|
+
var Ji = Object.getOwnPropertyDescriptor, Qi = (n, e, t, i) => {
|
|
16
|
+
for (var r = i > 1 ? void 0 : i ? Ji(e, t) : e, s = n.length - 1, o; s >= 0; s--)
|
|
17
|
+
(o = n[s]) && (r = o(r) || r);
|
|
18
18
|
return r;
|
|
19
|
-
},
|
|
20
|
-
let
|
|
21
|
-
constructor(e, t,
|
|
19
|
+
}, Ne = (n, e) => (t, i) => e(t, i, n);
|
|
20
|
+
let ue = class extends he {
|
|
21
|
+
constructor(e, t, i, r) {
|
|
22
22
|
super();
|
|
23
|
-
|
|
24
|
-
|
|
23
|
+
S(this, "_objectProvider", null);
|
|
24
|
+
S(this, "_refreshThumb", ai(() => {
|
|
25
25
|
this.createThumbs();
|
|
26
26
|
}, 300));
|
|
27
|
-
this._renderContext = e, this._injector = t, this._univerInstanceService =
|
|
27
|
+
this._renderContext = e, this._injector = t, this._univerInstanceService = i, this._renderManagerService = r, this._objectProvider = this._injector.createInstance(xi), this._addNewRender();
|
|
28
28
|
}
|
|
29
29
|
_addNewRender() {
|
|
30
|
-
const { unitId: e, engine: t, scene:
|
|
30
|
+
const { unitId: e, engine: t, scene: i } = this._renderContext, r = this._getCurrUnitModel();
|
|
31
31
|
if (!r) return;
|
|
32
32
|
const s = t.onTransformChange$.subscribeEvent(() => {
|
|
33
33
|
this._scrollToCenter(), s == null || s.unsubscribe();
|
|
@@ -37,7 +37,7 @@ let ve = class extends pe {
|
|
|
37
37
|
this.createThumbs();
|
|
38
38
|
}, 300);
|
|
39
39
|
});
|
|
40
|
-
const o = new
|
|
40
|
+
const o = new tt(ne.VIEW, i, {
|
|
41
41
|
left: 0,
|
|
42
42
|
top: 0,
|
|
43
43
|
bottom: 0,
|
|
@@ -46,41 +46,41 @@ let ve = class extends pe {
|
|
|
46
46
|
explicitViewportHeightSet: !1,
|
|
47
47
|
isWheelPreventDefaultX: !0
|
|
48
48
|
});
|
|
49
|
-
|
|
49
|
+
i.attachControl(), i.onMouseWheel$.subscribeEvent((c, h) => {
|
|
50
50
|
const l = c;
|
|
51
51
|
if (l.ctrlKey) {
|
|
52
52
|
const d = Math.abs(l.deltaX);
|
|
53
|
-
let
|
|
54
|
-
|
|
53
|
+
let g = d < 40 ? 0.2 : d < 80 ? 0.4 : 0.2;
|
|
54
|
+
g *= l.deltaY > 0 ? -1 : 1, i.scaleX < 1 && (g /= 2), i.scaleX + g > 4 ? i.scale(4, 4) : i.scaleX + g < 0.1 ? i.scale(0.1, 0.1) : (l.deltaY > 0, l.preventDefault());
|
|
55
55
|
} else
|
|
56
56
|
o.onMouseWheel(l, h);
|
|
57
|
-
}),
|
|
57
|
+
}), i.onFileLoaded$.subscribeEvent(() => {
|
|
58
58
|
this._refreshThumb();
|
|
59
|
-
}),
|
|
60
|
-
const a = this._createSlide(
|
|
59
|
+
}), xt.attachTo(o);
|
|
60
|
+
const a = this._createSlide(i);
|
|
61
61
|
this._renderContext.mainComponent = a, this._createSlidePages(r, a), this.createThumbs(), t.runRenderLoop(() => {
|
|
62
|
-
|
|
62
|
+
i.render();
|
|
63
63
|
});
|
|
64
64
|
}
|
|
65
65
|
_scrollToCenter() {
|
|
66
66
|
var c;
|
|
67
|
-
const e = (c = this._currentRender()) == null ? void 0 : c.scene, t = e == null ? void 0 : e.getViewport(
|
|
68
|
-
if (!t || !
|
|
69
|
-
const { left: r, top: s } =
|
|
67
|
+
const e = (c = this._currentRender()) == null ? void 0 : c.scene, t = e == null ? void 0 : e.getViewport(ne.VIEW), i = this._getCenterPositionViewPort(e);
|
|
68
|
+
if (!t || !i) return;
|
|
69
|
+
const { left: r, top: s } = i, { x: o, y: a } = t.transViewportScroll2ScrollValue(r, s);
|
|
70
70
|
t.scrollToBarPos({
|
|
71
71
|
x: o,
|
|
72
72
|
y: a
|
|
73
73
|
});
|
|
74
74
|
}
|
|
75
75
|
_currentRender() {
|
|
76
|
-
return
|
|
76
|
+
return je(E.UNIVER_SLIDE, this._univerInstanceService, this._renderManagerService);
|
|
77
77
|
}
|
|
78
78
|
/**
|
|
79
79
|
* @param mainScene
|
|
80
80
|
*/
|
|
81
81
|
_createSlide(e) {
|
|
82
|
-
const t = this._univerInstanceService.getCurrentUnitForType(E.UNIVER_SLIDE), { width:
|
|
83
|
-
left: (
|
|
82
|
+
const t = this._univerInstanceService.getCurrentUnitForType(E.UNIVER_SLIDE), { width: i, height: r } = e, s = t.getPageSize(), { width: o = 100, height: a = 100 } = s, c = new bi(ne.COMPONENT, {
|
|
83
|
+
left: (i - o) / 2,
|
|
84
84
|
top: (r - a) / 2,
|
|
85
85
|
width: o,
|
|
86
86
|
height: a,
|
|
@@ -89,14 +89,14 @@ let ve = class extends pe {
|
|
|
89
89
|
return c.enableSelectedClipElement(), e.addObject(c), c;
|
|
90
90
|
}
|
|
91
91
|
_addBackgroundRect(e, t) {
|
|
92
|
-
const r = this._univerInstanceService.getCurrentUnitForType(E.UNIVER_SLIDE).getPageSize(), { width: s = 0, height: o = 0 } = r, a = new
|
|
92
|
+
const r = this._univerInstanceService.getCurrentUnitForType(E.UNIVER_SLIDE).getPageSize(), { width: s = 0, height: o = 0 } = r, a = new Rt("canvas", {
|
|
93
93
|
left: 0,
|
|
94
94
|
top: 0,
|
|
95
95
|
width: s,
|
|
96
96
|
height: o,
|
|
97
97
|
strokeWidth: 1,
|
|
98
98
|
stroke: "rgba(198,198,198,1)",
|
|
99
|
-
fill:
|
|
99
|
+
fill: ci(t) || "rgba(255,255,255,1)",
|
|
100
100
|
zIndex: 0,
|
|
101
101
|
evented: !1
|
|
102
102
|
});
|
|
@@ -104,17 +104,17 @@ let ve = class extends pe {
|
|
|
104
104
|
}
|
|
105
105
|
_getCenterPositionViewPort(e) {
|
|
106
106
|
if (!e) return { left: 0, top: 0 };
|
|
107
|
-
const { width: t, height:
|
|
107
|
+
const { width: t, height: i } = e, r = e.getEngine(), s = (r == null ? void 0 : r.width) || 0, o = (r == null ? void 0 : r.height) || 0;
|
|
108
108
|
return {
|
|
109
109
|
left: (t - s) / 2,
|
|
110
|
-
top: (
|
|
110
|
+
top: (i - o) / 2
|
|
111
111
|
};
|
|
112
112
|
}
|
|
113
113
|
_thumbSceneRender(e, t) {
|
|
114
|
-
const
|
|
115
|
-
if (
|
|
114
|
+
const i = this._renderManagerService.getRenderById(e);
|
|
115
|
+
if (i == null)
|
|
116
116
|
return;
|
|
117
|
-
const { engine: r } =
|
|
117
|
+
const { engine: r } = i;
|
|
118
118
|
if (r == null)
|
|
119
119
|
return;
|
|
120
120
|
const { width: s, height: o } = t, { width: a = s, height: c = o } = r, h = r.getCanvas().getContext();
|
|
@@ -126,11 +126,11 @@ let ve = class extends pe {
|
|
|
126
126
|
* @param slide
|
|
127
127
|
*/
|
|
128
128
|
_createSlidePages(e, t) {
|
|
129
|
-
const
|
|
130
|
-
if (!(!
|
|
129
|
+
const i = e.getPages(), r = e.getPageOrder();
|
|
130
|
+
if (!(!i || !r) && r.length !== 0) {
|
|
131
131
|
for (let s = 0, o = r.length; s < o; s++) {
|
|
132
132
|
const a = r[s];
|
|
133
|
-
this.createPageScene(a,
|
|
133
|
+
this.createPageScene(a, i[a]), this._createThumb(a);
|
|
134
134
|
}
|
|
135
135
|
t.activeFirstPage();
|
|
136
136
|
}
|
|
@@ -146,12 +146,12 @@ let ve = class extends pe {
|
|
|
146
146
|
}
|
|
147
147
|
activePage(e) {
|
|
148
148
|
let t = e;
|
|
149
|
-
const
|
|
149
|
+
const i = this._getCurrUnitModel();
|
|
150
150
|
let r;
|
|
151
151
|
if (t)
|
|
152
|
-
r =
|
|
152
|
+
r = i.getPage(t);
|
|
153
153
|
else {
|
|
154
|
-
const c =
|
|
154
|
+
const c = i.getPages(), h = i.getPageOrder();
|
|
155
155
|
if (h == null || c == null)
|
|
156
156
|
return;
|
|
157
157
|
r = c[h[0]], t = r.id;
|
|
@@ -160,18 +160,18 @@ let ve = class extends pe {
|
|
|
160
160
|
if (r == null || s == null || s.mainComponent == null)
|
|
161
161
|
return;
|
|
162
162
|
const { id: o } = r, a = s.mainComponent;
|
|
163
|
-
if (
|
|
163
|
+
if (i.setActivePage(r), a != null && a.hasPage(o)) {
|
|
164
164
|
a.changePage(o);
|
|
165
165
|
return;
|
|
166
166
|
}
|
|
167
167
|
this.createPageScene(o, r);
|
|
168
168
|
}
|
|
169
169
|
createThumbs() {
|
|
170
|
-
const t = this._getCurrUnitModel().getPageOrder(),
|
|
171
|
-
if (!(!t || !
|
|
170
|
+
const t = this._getCurrUnitModel().getPageOrder(), i = this._currentRender();
|
|
171
|
+
if (!(!t || !i) && t.length !== 0)
|
|
172
172
|
for (let r = 0, s = t.length; r < s; r++) {
|
|
173
173
|
const o = t[r];
|
|
174
|
-
this._thumbSceneRender(o,
|
|
174
|
+
this._thumbSceneRender(o, i.mainComponent);
|
|
175
175
|
}
|
|
176
176
|
}
|
|
177
177
|
/**
|
|
@@ -180,14 +180,14 @@ let ve = class extends pe {
|
|
|
180
180
|
* @param page
|
|
181
181
|
*/
|
|
182
182
|
createPageScene(e, t) {
|
|
183
|
-
const
|
|
184
|
-
if (!
|
|
183
|
+
const i = this._renderContext;
|
|
184
|
+
if (!i || !this._objectProvider)
|
|
185
185
|
return;
|
|
186
|
-
const { scene: r, mainComponent: s } =
|
|
186
|
+
const { scene: r, mainComponent: s } = i, o = s, { width: a, height: c } = o, h = new Ei(e, o, {
|
|
187
187
|
width: a,
|
|
188
188
|
height: c
|
|
189
189
|
});
|
|
190
|
-
new
|
|
190
|
+
new tt(`PageViewer_${e}`, h, {
|
|
191
191
|
left: 0,
|
|
192
192
|
top: 0,
|
|
193
193
|
bottom: 0,
|
|
@@ -195,15 +195,15 @@ let ve = class extends pe {
|
|
|
195
195
|
explicitViewportWidthSet: !1,
|
|
196
196
|
explicitViewportHeightSet: !1
|
|
197
197
|
}).closeClip();
|
|
198
|
-
const { pageElements: d, pageBackgroundFill:
|
|
199
|
-
if (!
|
|
200
|
-
this._addBackgroundRect(h,
|
|
201
|
-
h.attachTransformerTo(
|
|
198
|
+
const { pageElements: d, pageBackgroundFill: g } = t, p = this._objectProvider.convertToRenderObjects(d, r);
|
|
199
|
+
if (!p || !o) return;
|
|
200
|
+
this._addBackgroundRect(h, g), h.addObjects(p), h.initTransformer(), p.forEach((f) => {
|
|
201
|
+
h.attachTransformerTo(f);
|
|
202
202
|
});
|
|
203
|
-
const
|
|
204
|
-
return
|
|
203
|
+
const m = h.getTransformer();
|
|
204
|
+
return m == null || m.changeEnd$.subscribe(() => {
|
|
205
205
|
this._thumbSceneRender(e, o);
|
|
206
|
-
}),
|
|
206
|
+
}), m == null || m.clearControl$.subscribe(() => {
|
|
207
207
|
this._thumbSceneRender(e, o);
|
|
208
208
|
}), o.addPageScene(h), h;
|
|
209
209
|
}
|
|
@@ -213,356 +213,349 @@ let ve = class extends pe {
|
|
|
213
213
|
* @returns {Scene, Engine, UnitModel} scene & engine & unit from renderContext
|
|
214
214
|
*/
|
|
215
215
|
getPageRenderUnit(e) {
|
|
216
|
-
const
|
|
216
|
+
const i = this._renderContext.mainComponent.getSubScenes().get(e), { engine: r, unit: s } = this._renderContext;
|
|
217
217
|
return {
|
|
218
|
-
scene:
|
|
218
|
+
scene: i,
|
|
219
219
|
engine: r,
|
|
220
220
|
unit: s
|
|
221
221
|
};
|
|
222
222
|
}
|
|
223
223
|
createObjectToPage(e, t) {
|
|
224
|
-
const { scene:
|
|
225
|
-
if (!
|
|
224
|
+
const { scene: i } = this.getPageRenderUnit(t);
|
|
225
|
+
if (!i || !this._objectProvider)
|
|
226
226
|
return;
|
|
227
|
-
const r = this._objectProvider.convertToRenderObject(e,
|
|
227
|
+
const r = this._objectProvider.convertToRenderObject(e, i);
|
|
228
228
|
if (r)
|
|
229
|
-
return
|
|
229
|
+
return i.addObject(r), i.attachTransformerTo(r), i.getLayer().makeDirty(), r;
|
|
230
230
|
}
|
|
231
231
|
setObjectActiveByPage(e, t) {
|
|
232
|
-
const { scene:
|
|
233
|
-
if (!
|
|
234
|
-
const r =
|
|
232
|
+
const { scene: i } = this.getPageRenderUnit(t);
|
|
233
|
+
if (!i) return;
|
|
234
|
+
const r = i.getTransformer();
|
|
235
235
|
r == null || r.activeAnObject(e);
|
|
236
236
|
}
|
|
237
237
|
removeObjectById(e, t) {
|
|
238
|
-
const { scene:
|
|
239
|
-
if (!
|
|
240
|
-
|
|
241
|
-
const r =
|
|
238
|
+
const { scene: i } = this.getPageRenderUnit(t);
|
|
239
|
+
if (!i) return;
|
|
240
|
+
i.removeObject(e);
|
|
241
|
+
const r = i.getTransformer();
|
|
242
242
|
r == null || r.clearControls();
|
|
243
243
|
}
|
|
244
244
|
appendPage() {
|
|
245
|
-
const e = this._getCurrUnitModel(), t = e.getBlankPage(),
|
|
246
|
-
if (t == null ||
|
|
245
|
+
const e = this._getCurrUnitModel(), t = e.getBlankPage(), i = this._currentRender();
|
|
246
|
+
if (t == null || i == null || i.mainComponent == null)
|
|
247
247
|
return;
|
|
248
|
-
const { id: r } = t, s =
|
|
248
|
+
const { id: r } = t, s = i.mainComponent, o = this.createPageScene(r, t);
|
|
249
249
|
s && o && s.addPageScene(o), e.appendPage(t), e.setActivePage(t);
|
|
250
250
|
}
|
|
251
251
|
};
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
],
|
|
257
|
-
var
|
|
258
|
-
for (var r =
|
|
259
|
-
(o =
|
|
252
|
+
ue = Qi([
|
|
253
|
+
Ne(1, K(We)),
|
|
254
|
+
Ne(2, y),
|
|
255
|
+
Ne(3, X)
|
|
256
|
+
], ue);
|
|
257
|
+
var en = Object.getOwnPropertyDescriptor, tn = (n, e, t, i) => {
|
|
258
|
+
for (var r = i > 1 ? void 0 : i ? en(e, t) : e, s = n.length - 1, o; s >= 0; s--)
|
|
259
|
+
(o = n[s]) && (r = o(r) || r);
|
|
260
260
|
return r;
|
|
261
|
-
},
|
|
262
|
-
let
|
|
263
|
-
constructor(
|
|
264
|
-
super(), this._renderManagerService =
|
|
261
|
+
}, nn = (n, e) => (t, i) => e(t, i, n);
|
|
262
|
+
let T = class extends he {
|
|
263
|
+
constructor(n) {
|
|
264
|
+
super(), this._renderManagerService = n;
|
|
265
265
|
}
|
|
266
|
-
_getSlideRenderControllerFromRenderUnit(
|
|
267
|
-
return this._renderManagerService.getRenderById(
|
|
266
|
+
_getSlideRenderControllerFromRenderUnit(n) {
|
|
267
|
+
return this._renderManagerService.getRenderById(n).with(ue);
|
|
268
268
|
}
|
|
269
|
-
createThumbs(
|
|
270
|
-
this._getSlideRenderControllerFromRenderUnit(
|
|
269
|
+
createThumbs(n) {
|
|
270
|
+
this._getSlideRenderControllerFromRenderUnit(n).createThumbs();
|
|
271
271
|
}
|
|
272
|
-
activePage(
|
|
273
|
-
this._getSlideRenderControllerFromRenderUnit(e).activePage(
|
|
272
|
+
activePage(n, e) {
|
|
273
|
+
this._getSlideRenderControllerFromRenderUnit(e).activePage(n);
|
|
274
274
|
}
|
|
275
|
-
getRenderUnitByPageId(
|
|
276
|
-
return this._getSlideRenderControllerFromRenderUnit(e).getPageRenderUnit(
|
|
275
|
+
getRenderUnitByPageId(n, e) {
|
|
276
|
+
return this._getSlideRenderControllerFromRenderUnit(e).getPageRenderUnit(n);
|
|
277
277
|
}
|
|
278
|
-
createObjectToPage(
|
|
279
|
-
return this._getSlideRenderControllerFromRenderUnit(t).createObjectToPage(
|
|
278
|
+
createObjectToPage(n, e, t) {
|
|
279
|
+
return this._getSlideRenderControllerFromRenderUnit(t).createObjectToPage(n, e);
|
|
280
280
|
}
|
|
281
|
-
setObjectActiveByPage(
|
|
282
|
-
return this._getSlideRenderControllerFromRenderUnit(t).setObjectActiveByPage(
|
|
281
|
+
setObjectActiveByPage(n, e, t) {
|
|
282
|
+
return this._getSlideRenderControllerFromRenderUnit(t).setObjectActiveByPage(n, e);
|
|
283
283
|
}
|
|
284
|
-
removeObjectById(
|
|
285
|
-
this._getSlideRenderControllerFromRenderUnit(t).removeObjectById(
|
|
284
|
+
removeObjectById(n, e, t) {
|
|
285
|
+
this._getSlideRenderControllerFromRenderUnit(t).removeObjectById(n, e);
|
|
286
286
|
}
|
|
287
287
|
/**
|
|
288
288
|
* append blank page
|
|
289
289
|
*/
|
|
290
|
-
appendPage(
|
|
291
|
-
this._getSlideRenderControllerFromRenderUnit(
|
|
290
|
+
appendPage(n) {
|
|
291
|
+
this._getSlideRenderControllerFromRenderUnit(n).appendPage();
|
|
292
292
|
}
|
|
293
293
|
};
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
],
|
|
297
|
-
const
|
|
294
|
+
T = tn([
|
|
295
|
+
nn(0, X)
|
|
296
|
+
], T);
|
|
297
|
+
const rn = "slides-ui.config", ht = {}, Mt = {
|
|
298
298
|
id: "slide.operation.delete-element",
|
|
299
|
-
type:
|
|
300
|
-
handler: (
|
|
299
|
+
type: D.OPERATION,
|
|
300
|
+
handler: (n, e) => {
|
|
301
301
|
if (!(e != null && e.id)) return !1;
|
|
302
|
-
const t = e.unitId, r =
|
|
302
|
+
const t = e.unitId, r = n.get(y).getUnit(t);
|
|
303
303
|
if (!r) return !1;
|
|
304
304
|
const s = r.getActivePage();
|
|
305
|
-
return delete s.pageElements[e.id], r.updatePage(s.id, s),
|
|
305
|
+
return delete s.pageElements[e.id], r.updatePage(s.id, s), n.get(T).removeObjectById(e.id, s.id, t), !0;
|
|
306
306
|
}
|
|
307
307
|
};
|
|
308
|
-
var
|
|
309
|
-
return
|
|
310
|
-
for (var e, t = 1,
|
|
308
|
+
var N = function() {
|
|
309
|
+
return N = Object.assign || function(n) {
|
|
310
|
+
for (var e, t = 1, i = arguments.length; t < i; t++) {
|
|
311
311
|
e = arguments[t];
|
|
312
|
-
for (var r in e) Object.prototype.hasOwnProperty.call(e, r) && (
|
|
312
|
+
for (var r in e) Object.prototype.hasOwnProperty.call(e, r) && (n[r] = e[r]);
|
|
313
313
|
}
|
|
314
|
-
return
|
|
315
|
-
},
|
|
316
|
-
},
|
|
314
|
+
return n;
|
|
315
|
+
}, N.apply(this, arguments);
|
|
316
|
+
}, sn = function(n, e) {
|
|
317
317
|
var t = {};
|
|
318
|
-
for (var
|
|
319
|
-
if (
|
|
320
|
-
for (var r = 0,
|
|
321
|
-
e.indexOf(
|
|
318
|
+
for (var i in n) Object.prototype.hasOwnProperty.call(n, i) && e.indexOf(i) < 0 && (t[i] = n[i]);
|
|
319
|
+
if (n != null && typeof Object.getOwnPropertySymbols == "function")
|
|
320
|
+
for (var r = 0, i = Object.getOwnPropertySymbols(n); r < i.length; r++)
|
|
321
|
+
e.indexOf(i[r]) < 0 && Object.prototype.propertyIsEnumerable.call(n, i[r]) && (t[i[r]] = n[i[r]]);
|
|
322
322
|
return t;
|
|
323
|
-
},
|
|
324
|
-
var t =
|
|
325
|
-
return
|
|
323
|
+
}, $ = A(function(n, e) {
|
|
324
|
+
var t = n.icon, i = n.id, r = n.className, s = n.extend, o = sn(n, ["icon", "id", "className", "extend"]), a = "univerjs-icon univerjs-icon-".concat(i, " ").concat(r || "").trim(), c = wt("_".concat(cn()));
|
|
325
|
+
return Nt(t, "".concat(i), { defIds: t.defIds, idSuffix: c.current }, N({ ref: e, className: a }, o), s);
|
|
326
326
|
});
|
|
327
|
-
function
|
|
328
|
-
return
|
|
329
|
-
return
|
|
327
|
+
function Nt(n, e, t, i, r) {
|
|
328
|
+
return B(n.tag, N(N({ key: e }, on(n, t, r)), i), (an(n, t).children || []).map(function(s, o) {
|
|
329
|
+
return Nt(s, "".concat(e, "-").concat(n.tag, "-").concat(o), t, void 0, r);
|
|
330
330
|
}));
|
|
331
331
|
}
|
|
332
|
-
function
|
|
333
|
-
var
|
|
334
|
-
t != null && t.colorChannel1 &&
|
|
332
|
+
function on(n, e, t) {
|
|
333
|
+
var i = N({}, n.attrs);
|
|
334
|
+
t != null && t.colorChannel1 && i.fill === "colorChannel1" && (i.fill = t.colorChannel1), n.tag === "mask" && i.id && (i.id = i.id + e.idSuffix), Object.entries(i).forEach(function(s) {
|
|
335
335
|
var o = s[0], a = s[1];
|
|
336
|
-
o === "mask" && typeof a == "string" && (
|
|
336
|
+
o === "mask" && typeof a == "string" && (i[o] = a.replace(/url\(#(.*)\)/, "url(#$1".concat(e.idSuffix, ")")));
|
|
337
337
|
});
|
|
338
338
|
var r = e.defIds;
|
|
339
|
-
return !r || r.length === 0 || (
|
|
339
|
+
return !r || r.length === 0 || (n.tag === "use" && i["xlink:href"] && (i["xlink:href"] = i["xlink:href"] + e.idSuffix), Object.entries(i).forEach(function(s) {
|
|
340
340
|
var o = s[0], a = s[1];
|
|
341
|
-
typeof a == "string" && (
|
|
342
|
-
})),
|
|
341
|
+
typeof a == "string" && (i[o] = a.replace(/url\(#(.*)\)/, "url(#$1".concat(e.idSuffix, ")")));
|
|
342
|
+
})), i;
|
|
343
343
|
}
|
|
344
|
-
function
|
|
345
|
-
var t,
|
|
346
|
-
return !
|
|
347
|
-
return typeof r.attrs.id == "string" &&
|
|
348
|
-
}) }) :
|
|
344
|
+
function an(n, e) {
|
|
345
|
+
var t, i = e.defIds;
|
|
346
|
+
return !i || i.length === 0 ? n : n.tag === "defs" && (!((t = n.children) === null || t === void 0) && t.length) ? N(N({}, n), { children: n.children.map(function(r) {
|
|
347
|
+
return typeof r.attrs.id == "string" && i && i.indexOf(r.attrs.id) > -1 ? N(N({}, r), { attrs: N(N({}, r.attrs), { id: r.attrs.id + e.idSuffix }) }) : r;
|
|
348
|
+
}) }) : n;
|
|
349
349
|
}
|
|
350
|
-
function
|
|
350
|
+
function cn() {
|
|
351
351
|
return Math.random().toString(36).substring(2, 8);
|
|
352
352
|
}
|
|
353
|
-
|
|
354
|
-
var
|
|
355
|
-
return
|
|
353
|
+
$.displayName = "UniverIcon";
|
|
354
|
+
var ln = { 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" } }] }, Dt = A(function(n, e) {
|
|
355
|
+
return B($, Object.assign({}, n, {
|
|
356
356
|
id: "add-image-single",
|
|
357
357
|
ref: e,
|
|
358
|
-
icon:
|
|
358
|
+
icon: ln
|
|
359
359
|
}));
|
|
360
360
|
});
|
|
361
|
-
|
|
362
|
-
var
|
|
363
|
-
return
|
|
361
|
+
Dt.displayName = "AddImageSingle";
|
|
362
|
+
var dn = { 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" } }] }, Ut = A(function(n, e) {
|
|
363
|
+
return B($, Object.assign({}, n, {
|
|
364
364
|
id: "autofill",
|
|
365
365
|
ref: e,
|
|
366
|
-
icon:
|
|
366
|
+
icon: dn
|
|
367
367
|
}));
|
|
368
368
|
});
|
|
369
|
-
|
|
370
|
-
var
|
|
371
|
-
return
|
|
369
|
+
Ut.displayName = "Autofill";
|
|
370
|
+
var un = { 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" } }] }, Vt = A(function(n, e) {
|
|
371
|
+
return B($, Object.assign({}, n, {
|
|
372
372
|
id: "bottom-single",
|
|
373
373
|
ref: e,
|
|
374
|
-
icon:
|
|
374
|
+
icon: un
|
|
375
375
|
}));
|
|
376
376
|
});
|
|
377
|
-
|
|
378
|
-
var
|
|
379
|
-
return
|
|
377
|
+
Vt.displayName = "BottomSingle";
|
|
378
|
+
var hn = { 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"] }, jt = A(function(n, e) {
|
|
379
|
+
return B($, Object.assign({}, n, {
|
|
380
380
|
id: "graph-single",
|
|
381
381
|
ref: e,
|
|
382
|
-
icon:
|
|
382
|
+
icon: hn
|
|
383
383
|
}));
|
|
384
384
|
});
|
|
385
|
-
|
|
386
|
-
var
|
|
387
|
-
return
|
|
385
|
+
jt.displayName = "GraphSingle";
|
|
386
|
+
var vn = { 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" } }] }, Xe = A(function(n, e) {
|
|
387
|
+
return B($, Object.assign({}, n, {
|
|
388
388
|
id: "more-down-single",
|
|
389
389
|
ref: e,
|
|
390
|
-
icon:
|
|
390
|
+
icon: vn
|
|
391
391
|
}));
|
|
392
392
|
});
|
|
393
|
-
|
|
394
|
-
var
|
|
395
|
-
return
|
|
393
|
+
Xe.displayName = "MoreDownSingle";
|
|
394
|
+
var gn = { 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" } }] }, Lt = A(function(n, e) {
|
|
395
|
+
return B($, Object.assign({}, n, {
|
|
396
396
|
id: "move-down-single",
|
|
397
397
|
ref: e,
|
|
398
|
-
icon:
|
|
398
|
+
icon: gn
|
|
399
399
|
}));
|
|
400
400
|
});
|
|
401
|
-
|
|
402
|
-
var
|
|
403
|
-
return
|
|
401
|
+
Lt.displayName = "MoveDownSingle";
|
|
402
|
+
var fn = { 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" } }] }, At = A(function(n, e) {
|
|
403
|
+
return B($, Object.assign({}, n, {
|
|
404
404
|
id: "move-up-single",
|
|
405
405
|
ref: e,
|
|
406
|
-
icon:
|
|
406
|
+
icon: fn
|
|
407
407
|
}));
|
|
408
408
|
});
|
|
409
|
-
|
|
410
|
-
var
|
|
411
|
-
return
|
|
409
|
+
At.displayName = "MoveUpSingle";
|
|
410
|
+
var mn = { tag: "svg", attrs: { fill: "none", viewBox: "0 0 17 16", width: "1em", height: "1em" }, children: [{ tag: "path", attrs: { fill: "currentColor", d: "M8.01281 1.36643C8.79386 0.585377 10.0602 0.585378 10.8412 1.36643L12.9223 3.44752C13.7034 4.22857 13.7034 5.4949 12.9223 6.27595L9.36445 9.83383C8.5834 10.6149 7.31707 10.6149 6.53602 9.83383L4.45493 7.75273C3.67388 6.97168 3.67388 5.70535 4.45493 4.9243L8.01281 1.36643ZM9.9927 2.21495C9.68028 1.90253 9.17375 1.90253 8.86133 2.21495L5.30346 5.77283L5.29671 5.77966L10.839 6.66224L12.0738 5.42742C12.3862 5.115 12.3862 4.60847 12.0738 4.29605L9.9927 2.21495Z", fillRule: "evenodd", clipRule: "evenodd" } }, { tag: "path", attrs: { fill: "currentColor", d: "M14.5179 9.48875C14.5179 9.99175 14.1101 10.3995 13.607 10.3995C13.1041 10.3995 12.6963 9.99175 12.6963 9.48875C12.6963 9.1773 13.0455 8.59966 13.3114 8.20487C13.4549 7.99177 13.7591 7.99177 13.9027 8.20486C14.1687 8.59965 14.5179 9.1773 14.5179 9.48875Z" } }, { tag: "path", attrs: { fill: "colorChannel1", d: "M1.98682 13.4992C1.98682 12.5603 2.74793 11.7992 3.68682 11.7992H14.2868C15.2257 11.7992 15.9868 12.5603 15.9868 13.4992V13.4992C15.9868 14.4381 15.2257 15.1992 14.2868 15.1992H3.68682C2.74793 15.1992 1.98682 14.4381 1.98682 13.4992V13.4992Z" } }] }, Bt = A(function(n, e) {
|
|
411
|
+
return B($, Object.assign({}, n, {
|
|
412
412
|
id: "paint-bucket",
|
|
413
413
|
ref: e,
|
|
414
|
-
icon:
|
|
414
|
+
icon: mn
|
|
415
415
|
}));
|
|
416
416
|
});
|
|
417
|
-
|
|
418
|
-
var
|
|
419
|
-
return
|
|
417
|
+
Bt.displayName = "PaintBucket";
|
|
418
|
+
var pn = { tag: "svg", attrs: { fill: "none", viewBox: "0 0 16 16", width: "1em", height: "1em" }, children: [{ tag: "path", attrs: { fill: "currentColor", d: "M2.66695 1.33496C2.29968 1.33496 2.00195 1.63269 2.00195 1.99996V3.64439C2.00195 4.01166 2.29968 4.30939 2.66695 4.30939C3.03422 4.30939 3.33195 4.01166 3.33195 3.64439V2.66496H7.33521V13.335H5.3337C4.96643 13.335 4.6687 13.6327 4.6687 14C4.6687 14.3672 4.96643 14.665 5.3337 14.665H10.667C11.0343 14.665 11.332 14.3672 11.332 14C11.332 13.6327 11.0343 13.335 10.667 13.335H8.66521V2.66496H12.6686V3.64439C12.6686 4.01166 12.9664 4.30939 13.3336 4.30939C13.7009 4.30939 13.9986 4.01166 13.9986 3.64439V1.99996C13.9986 1.63269 13.7009 1.33496 13.3336 1.33496H2.66695Z" } }] }, $t = A(function(n, e) {
|
|
419
|
+
return B($, Object.assign({}, n, {
|
|
420
420
|
id: "text-single",
|
|
421
421
|
ref: e,
|
|
422
|
-
icon:
|
|
422
|
+
icon: pn
|
|
423
423
|
}));
|
|
424
424
|
});
|
|
425
|
-
|
|
426
|
-
var
|
|
427
|
-
return
|
|
425
|
+
$t.displayName = "TextSingle";
|
|
426
|
+
var _n = { 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" } }] }, Ht = A(function(n, e) {
|
|
427
|
+
return B($, Object.assign({}, n, {
|
|
428
428
|
id: "topmost-single",
|
|
429
429
|
ref: e,
|
|
430
|
-
icon:
|
|
430
|
+
icon: _n
|
|
431
431
|
}));
|
|
432
432
|
});
|
|
433
|
-
|
|
434
|
-
const
|
|
433
|
+
Ht.displayName = "TopmostSingle";
|
|
434
|
+
const W = {
|
|
435
435
|
id: "slide.operation.update-element",
|
|
436
|
-
type:
|
|
437
|
-
handler: (
|
|
438
|
-
const { oKey: t, props:
|
|
436
|
+
type: D.OPERATION,
|
|
437
|
+
handler: (n, e) => {
|
|
438
|
+
const { oKey: t, props: i } = e, r = n.get(y), s = e == null ? void 0 : e.unitId, o = r.getUnit(s);
|
|
439
439
|
if (!o) return !1;
|
|
440
440
|
const a = o.getActivePage();
|
|
441
|
-
return a.pageElements[t] =
|
|
442
|
-
}
|
|
443
|
-
}, Ii = "univer-image-common-panel-grid", bi = "univer-image-common-panel-border", Pi = "univer-image-common-panel-title", Ei = "univer-image-common-panel-row", Ri = "univer-image-common-panel-column", Oi = "univer-image-common-panel-inline", xi = "univer-image-common-panel-span2", yi = "univer-image-common-panel-span3", Ti = "univer-image-common-panel-input", g = {
|
|
444
|
-
imageCommonPanelGrid: Ii,
|
|
445
|
-
imageCommonPanelBorder: bi,
|
|
446
|
-
imageCommonPanelTitle: Pi,
|
|
447
|
-
imageCommonPanelRow: Ei,
|
|
448
|
-
imageCommonPanelColumn: Ri,
|
|
449
|
-
imageCommonPanelInline: Oi,
|
|
450
|
-
imageCommonPanelSpan2: xi,
|
|
451
|
-
imageCommonPanelSpan3: yi,
|
|
452
|
-
imageCommonPanelInput: Ti
|
|
441
|
+
return a.pageElements[t] = li.deepMerge(a.pageElements[t], i), o.updatePage(a.id, a), !0;
|
|
442
|
+
}
|
|
453
443
|
};
|
|
454
|
-
function
|
|
455
|
-
const { pageId: e, unitId: t } =
|
|
444
|
+
function Cn(n) {
|
|
445
|
+
const { pageId: e, unitId: t } = n, i = R(J), r = R(T), s = R(U), o = r.getRenderUnitByPageId(e, t), a = o == null ? void 0 : o.scene;
|
|
456
446
|
if (!a) return null;
|
|
457
447
|
const c = a.getTransformer();
|
|
458
448
|
if (!c) return null;
|
|
459
449
|
const l = c.getSelectedObjectMap().values().next().value;
|
|
460
450
|
if (!l) return null;
|
|
461
|
-
const d = (
|
|
462
|
-
const
|
|
463
|
-
const w =
|
|
464
|
-
return [
|
|
451
|
+
const d = (g) => {
|
|
452
|
+
const p = a.getAllObjects(), [m, f] = p.reduce(([_, I], b) => {
|
|
453
|
+
const w = b.zIndex, M = w < _ ? w : _, V = w > I ? w : I;
|
|
454
|
+
return [M, V];
|
|
465
455
|
}, [0, 0]);
|
|
466
|
-
let
|
|
467
|
-
|
|
468
|
-
zIndex:
|
|
469
|
-
}), s.executeCommand(
|
|
456
|
+
let v = l.zIndex;
|
|
457
|
+
g === 3 ? v = m - 1 : g === 2 ? v = f + 1 : g === 0 ? v = l.zIndex + 1 : g === 1 && (v = l.zIndex - 1), l.setProps({
|
|
458
|
+
zIndex: v
|
|
459
|
+
}), s.executeCommand(W.id, {
|
|
470
460
|
unitId: t,
|
|
471
461
|
oKey: l == null ? void 0 : l.oKey,
|
|
472
462
|
props: {
|
|
473
|
-
zIndex:
|
|
463
|
+
zIndex: v
|
|
474
464
|
}
|
|
475
465
|
});
|
|
476
466
|
};
|
|
477
|
-
return /* @__PURE__ */
|
|
478
|
-
/* @__PURE__ */ u("div", { className:
|
|
479
|
-
/* @__PURE__ */
|
|
480
|
-
/* @__PURE__ */ u("div", { className:
|
|
467
|
+
return /* @__PURE__ */ O("div", { className: "univer-relative univer-w-full", children: [
|
|
468
|
+
/* @__PURE__ */ u("div", { className: "univer-relative univer-mt-2.5 univer-flex univer-h-full univer-items-start", children: /* @__PURE__ */ u("div", { className: "univer-w-full univer-text-left univer-text-gray-600", children: /* @__PURE__ */ u("div", { children: i.t("image-panel.arrange.title") }) }) }),
|
|
469
|
+
/* @__PURE__ */ O("div", { className: "univer-relative univer-mt-2.5 univer-flex univer-h-full univer-items-start", children: [
|
|
470
|
+
/* @__PURE__ */ u("div", { className: "univer-w-1/2", children: /* @__PURE__ */ u(_e, { onClick: () => {
|
|
481
471
|
d(
|
|
482
472
|
0
|
|
483
473
|
/* forward */
|
|
484
474
|
);
|
|
485
|
-
}, children: /* @__PURE__ */
|
|
486
|
-
/* @__PURE__ */ u(
|
|
487
|
-
|
|
475
|
+
}, children: /* @__PURE__ */ O("span", { className: "univer-flex univer-items-center univer-gap-1", children: [
|
|
476
|
+
/* @__PURE__ */ u(At, {}),
|
|
477
|
+
i.t("image-panel.arrange.forward")
|
|
488
478
|
] }) }) }),
|
|
489
|
-
/* @__PURE__ */ u("div", { className:
|
|
479
|
+
/* @__PURE__ */ u("div", { className: "univer-w-1/2", children: /* @__PURE__ */ u(_e, { onClick: () => {
|
|
490
480
|
d(
|
|
491
481
|
1
|
|
492
482
|
/* backward */
|
|
493
483
|
);
|
|
494
|
-
}, children: /* @__PURE__ */
|
|
495
|
-
/* @__PURE__ */ u(
|
|
496
|
-
|
|
484
|
+
}, children: /* @__PURE__ */ O("span", { className: "univer-flex univer-items-center univer-gap-1", children: [
|
|
485
|
+
/* @__PURE__ */ u(Lt, {}),
|
|
486
|
+
i.t("image-panel.arrange.backward")
|
|
497
487
|
] }) }) })
|
|
498
488
|
] }),
|
|
499
|
-
/* @__PURE__ */
|
|
500
|
-
/* @__PURE__ */ u("div", { className:
|
|
489
|
+
/* @__PURE__ */ O("div", { className: "univer-relative univer-mt-2.5 univer-flex univer-h-full univer-items-start", children: [
|
|
490
|
+
/* @__PURE__ */ u("div", { className: "univer-w-1/2", children: /* @__PURE__ */ u(_e, { onClick: () => {
|
|
501
491
|
d(
|
|
502
492
|
2
|
|
503
493
|
/* front */
|
|
504
494
|
);
|
|
505
|
-
}, children: /* @__PURE__ */
|
|
506
|
-
/* @__PURE__ */ u(
|
|
507
|
-
|
|
495
|
+
}, children: /* @__PURE__ */ O("span", { className: "univer-flex univer-items-center univer-gap-1", children: [
|
|
496
|
+
/* @__PURE__ */ u(Ht, {}),
|
|
497
|
+
i.t("image-panel.arrange.front")
|
|
508
498
|
] }) }) }),
|
|
509
|
-
/* @__PURE__ */ u("div", { className:
|
|
499
|
+
/* @__PURE__ */ u("div", { className: "univer-w-1/2", children: /* @__PURE__ */ u(_e, { onClick: () => {
|
|
510
500
|
d(
|
|
511
501
|
3
|
|
512
502
|
/* back */
|
|
513
503
|
);
|
|
514
|
-
}, children: /* @__PURE__ */
|
|
515
|
-
/* @__PURE__ */ u(
|
|
516
|
-
|
|
504
|
+
}, children: /* @__PURE__ */ O("span", { className: "univer-flex univer-items-center univer-gap-1", children: [
|
|
505
|
+
/* @__PURE__ */ u(Vt, {}),
|
|
506
|
+
i.t("image-panel.arrange.back")
|
|
517
507
|
] }) }) })
|
|
518
508
|
] })
|
|
519
509
|
] });
|
|
520
510
|
}
|
|
521
|
-
function
|
|
522
|
-
var
|
|
523
|
-
const { pageId: e, unitId: t } =
|
|
511
|
+
function Sn(n) {
|
|
512
|
+
var m, f;
|
|
513
|
+
const { pageId: e, unitId: t } = n, i = R(J), r = R(T), s = R(U), o = r.getRenderUnitByPageId(e, t), a = o == null ? void 0 : o.scene;
|
|
524
514
|
if (!a) return null;
|
|
525
515
|
const c = a.getTransformer();
|
|
526
516
|
if (!c) return null;
|
|
527
517
|
const l = c.getSelectedObjectMap().values().next().value;
|
|
528
518
|
if (!l) return null;
|
|
529
|
-
const [d,
|
|
530
|
-
function
|
|
519
|
+
const [d, g] = Ai.useState((f = (m = l.fill) == null ? void 0 : m.toString()) != null ? f : "");
|
|
520
|
+
function p(v) {
|
|
531
521
|
l == null || l.setProps({
|
|
532
|
-
fill:
|
|
533
|
-
}), s.executeCommand(
|
|
522
|
+
fill: v
|
|
523
|
+
}), s.executeCommand(W.id, {
|
|
534
524
|
unitId: t,
|
|
535
525
|
oKey: l == null ? void 0 : l.oKey,
|
|
536
526
|
props: {
|
|
537
527
|
shape: {
|
|
538
528
|
shapeProperties: {
|
|
539
529
|
shapeBackgroundFill: {
|
|
540
|
-
rgb:
|
|
530
|
+
rgb: v
|
|
541
531
|
}
|
|
542
532
|
}
|
|
543
533
|
}
|
|
544
534
|
}
|
|
545
|
-
}), v
|
|
535
|
+
}), g(v);
|
|
546
536
|
}
|
|
547
537
|
return /* @__PURE__ */ u(
|
|
548
538
|
"div",
|
|
549
539
|
{
|
|
550
|
-
className:
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
540
|
+
className: `
|
|
541
|
+
univer-relative univer-bottom-0 univer-mt-5 univer-w-full univer-border-t univer-border-solid
|
|
542
|
+
univer-border-t-gray-200
|
|
543
|
+
`,
|
|
544
|
+
children: /* @__PURE__ */ O("div", { className: "univer-relative univer-w-full", children: [
|
|
545
|
+
/* @__PURE__ */ u("div", { className: "univer-relative univer-mt-2.5 univer-flex univer-h-full univer-items-start", children: /* @__PURE__ */ u("div", { className: "univer-w-full univer-text-left univer-text-gray-600", children: /* @__PURE__ */ u("div", { children: i.t("slide.panel.fill.title") }) }) }),
|
|
546
|
+
/* @__PURE__ */ u("div", { className: "univer-relative univer-mt-2.5 univer-flex univer-h-full univer-items-start", children: /* @__PURE__ */ u("div", { className: "univer-w-1/2", children: /* @__PURE__ */ u(
|
|
547
|
+
Pt,
|
|
555
548
|
{
|
|
556
549
|
overlay: /* @__PURE__ */ u("div", { className: "univer-rounded-lg univer-p-4", children: /* @__PURE__ */ u(
|
|
557
|
-
|
|
550
|
+
ji,
|
|
558
551
|
{
|
|
559
552
|
value: "#fff",
|
|
560
|
-
onChange:
|
|
553
|
+
onChange: p
|
|
561
554
|
}
|
|
562
555
|
) }),
|
|
563
|
-
children: /* @__PURE__ */
|
|
564
|
-
/* @__PURE__ */ u(
|
|
565
|
-
/* @__PURE__ */ u(
|
|
556
|
+
children: /* @__PURE__ */ O("a", { className: "univer-flex univer-cursor-pointer univer-items-center univer-gap-1", children: [
|
|
557
|
+
/* @__PURE__ */ u(Bt, { className: "univer-fill-primary-600" }),
|
|
558
|
+
/* @__PURE__ */ u(Xe, { className: "univer-text-[10px] univer-text-gray-400" })
|
|
566
559
|
] })
|
|
567
560
|
}
|
|
568
561
|
) }) })
|
|
@@ -570,8 +563,8 @@ function wi(i) {
|
|
|
570
563
|
}
|
|
571
564
|
);
|
|
572
565
|
}
|
|
573
|
-
function
|
|
574
|
-
const { pageId: e, unitId: t } =
|
|
566
|
+
function In(n) {
|
|
567
|
+
const { pageId: e, unitId: t } = n, i = R(J), r = R(T), s = R(U), o = r.getRenderUnitByPageId(e, t), a = o == null ? void 0 : o.scene;
|
|
575
568
|
if (!a) return null;
|
|
576
569
|
const c = a.getTransformer();
|
|
577
570
|
if (!c) return null;
|
|
@@ -579,153 +572,156 @@ function Ni(i) {
|
|
|
579
572
|
if (!l) return null;
|
|
580
573
|
const {
|
|
581
574
|
width: d = 0,
|
|
582
|
-
height:
|
|
583
|
-
left:
|
|
584
|
-
top:
|
|
585
|
-
angle:
|
|
586
|
-
} = l, [
|
|
587
|
-
const { objects:
|
|
588
|
-
width:
|
|
589
|
-
height:
|
|
590
|
-
left:
|
|
591
|
-
top:
|
|
592
|
-
angle:
|
|
593
|
-
} =
|
|
594
|
-
_(
|
|
575
|
+
height: g = 0,
|
|
576
|
+
left: p = 0,
|
|
577
|
+
top: m = 0,
|
|
578
|
+
angle: f = 0
|
|
579
|
+
} = l, [v, _] = k(d), [I, b] = k(g), [w, M] = k(p), [V, x] = k(m), [z, re] = k(f), H = (C) => {
|
|
580
|
+
const { objects: se } = C, oe = se.values().next().value, {
|
|
581
|
+
width: ei = 0,
|
|
582
|
+
height: ti = 0,
|
|
583
|
+
left: ii = 0,
|
|
584
|
+
top: ni = 0,
|
|
585
|
+
angle: ri = 0
|
|
586
|
+
} = oe;
|
|
587
|
+
_(ei), b(ti), M(ii), x(ni), re(ri);
|
|
595
588
|
};
|
|
596
|
-
|
|
597
|
-
const
|
|
598
|
-
|
|
599
|
-
}),
|
|
600
|
-
|
|
589
|
+
de(() => {
|
|
590
|
+
const C = c.changeStart$.subscribe((oe) => {
|
|
591
|
+
H(oe);
|
|
592
|
+
}), se = c.changing$.subscribe((oe) => {
|
|
593
|
+
H(oe);
|
|
601
594
|
});
|
|
602
595
|
return () => {
|
|
603
|
-
|
|
596
|
+
se.unsubscribe(), C.unsubscribe();
|
|
604
597
|
};
|
|
605
598
|
}, []);
|
|
606
|
-
function
|
|
607
|
-
!
|
|
599
|
+
function F(C) {
|
|
600
|
+
!C || !l || (s.executeCommand(W.id, {
|
|
608
601
|
pageId: e,
|
|
609
602
|
oKey: l.oKey,
|
|
610
603
|
props: {
|
|
611
|
-
width:
|
|
604
|
+
width: C
|
|
612
605
|
}
|
|
613
|
-
}), l == null || l.resize(
|
|
606
|
+
}), l == null || l.resize(C, l.height), _(C), c == null || c.refreshControls());
|
|
614
607
|
}
|
|
615
|
-
function
|
|
616
|
-
!
|
|
608
|
+
function Q(C) {
|
|
609
|
+
!C || !l || (s.executeCommand(W.id, {
|
|
617
610
|
pageId: e,
|
|
618
611
|
oKey: l.oKey,
|
|
619
612
|
props: {
|
|
620
|
-
height:
|
|
613
|
+
height: C
|
|
621
614
|
}
|
|
622
|
-
}), l == null || l.resize(l.width,
|
|
615
|
+
}), l == null || l.resize(l.width, C), b(C), c == null || c.refreshControls());
|
|
623
616
|
}
|
|
624
|
-
function
|
|
625
|
-
!
|
|
617
|
+
function ee(C) {
|
|
618
|
+
!C || !l || (s.executeCommand(W.id, {
|
|
626
619
|
pageId: e,
|
|
627
620
|
oKey: l.oKey,
|
|
628
621
|
props: {
|
|
629
|
-
left:
|
|
622
|
+
left: C
|
|
630
623
|
}
|
|
631
|
-
}), l == null || l.translate(
|
|
624
|
+
}), l == null || l.translate(C, l.top), M(C), c == null || c.refreshControls());
|
|
632
625
|
}
|
|
633
|
-
function
|
|
634
|
-
!
|
|
626
|
+
function me(C) {
|
|
627
|
+
!C || !l || (s.executeCommand(W.id, {
|
|
635
628
|
pageId: e,
|
|
636
629
|
oKey: l.oKey,
|
|
637
630
|
props: {
|
|
638
|
-
right:
|
|
631
|
+
right: C
|
|
639
632
|
}
|
|
640
|
-
}), l == null || l.translate(l.left,
|
|
633
|
+
}), l == null || l.translate(l.left, C), x(C), c == null || c.refreshControls());
|
|
641
634
|
}
|
|
642
|
-
function
|
|
643
|
-
!
|
|
635
|
+
function pe(C) {
|
|
636
|
+
!C || !l || (s.executeCommand(W.id, {
|
|
644
637
|
pageId: e,
|
|
645
638
|
oKey: l.oKey,
|
|
646
639
|
props: {
|
|
647
|
-
angle:
|
|
640
|
+
angle: C
|
|
648
641
|
}
|
|
649
642
|
}), l == null || l.transformByState({
|
|
650
|
-
angle:
|
|
651
|
-
}),
|
|
643
|
+
angle: C
|
|
644
|
+
}), re(C), c == null || c.refreshControls());
|
|
652
645
|
}
|
|
653
|
-
return /* @__PURE__ */
|
|
646
|
+
return /* @__PURE__ */ O(
|
|
654
647
|
"div",
|
|
655
648
|
{
|
|
656
|
-
className:
|
|
649
|
+
className: `
|
|
650
|
+
univer-relative univer-bottom-0 univer-mt-5 univer-w-full univer-border-t univer-border-solid
|
|
651
|
+
univer-border-t-gray-200
|
|
652
|
+
`,
|
|
657
653
|
children: [
|
|
658
|
-
/* @__PURE__ */ u("div", { className:
|
|
659
|
-
/* @__PURE__ */
|
|
660
|
-
/* @__PURE__ */ u("div", { className:
|
|
661
|
-
/* @__PURE__ */ u("div", { className:
|
|
662
|
-
/* @__PURE__ */ u("div", { className:
|
|
663
|
-
|
|
654
|
+
/* @__PURE__ */ u("div", { className: "univer-relative univer-mt-2.5 univer-flex univer-h-full univer-items-start", children: /* @__PURE__ */ u("div", { className: "univer-w-full univer-text-left univer-text-gray-600", children: /* @__PURE__ */ u("div", { children: i.t("image-panel.transform.title") }) }) }),
|
|
655
|
+
/* @__PURE__ */ O("div", { className: "univer-relative univer-mt-2.5 univer-flex univer-h-full univer-items-start", children: [
|
|
656
|
+
/* @__PURE__ */ u("div", { className: "univer-w-1/3", children: /* @__PURE__ */ O("label", { children: [
|
|
657
|
+
/* @__PURE__ */ u("div", { className: "univer-relative univer-mt-2.5 univer-flex univer-h-full univer-items-start", children: /* @__PURE__ */ u("div", { className: "univer-w-full", children: i.t("image-panel.transform.width") }) }),
|
|
658
|
+
/* @__PURE__ */ u("div", { className: "univer-relative univer-mt-2.5 univer-flex univer-h-full univer-items-start", children: /* @__PURE__ */ u("div", { className: "univer-w-full", children: /* @__PURE__ */ u(
|
|
659
|
+
ae,
|
|
664
660
|
{
|
|
665
|
-
className:
|
|
661
|
+
className: "univer-w-11/12",
|
|
666
662
|
min: 1,
|
|
667
|
-
value:
|
|
668
|
-
onChange: (
|
|
669
|
-
|
|
663
|
+
value: v,
|
|
664
|
+
onChange: (C) => {
|
|
665
|
+
F(C);
|
|
670
666
|
}
|
|
671
667
|
}
|
|
672
668
|
) }) })
|
|
673
669
|
] }) }),
|
|
674
|
-
/* @__PURE__ */ u("div", { className:
|
|
675
|
-
/* @__PURE__ */ u("div", { className:
|
|
676
|
-
/* @__PURE__ */ u("div", { className:
|
|
677
|
-
|
|
670
|
+
/* @__PURE__ */ u("div", { className: "univer-w-1/3", children: /* @__PURE__ */ O("label", { children: [
|
|
671
|
+
/* @__PURE__ */ u("div", { className: "univer-relative univer-mt-2.5 univer-flex univer-h-full univer-items-start", children: /* @__PURE__ */ u("div", { className: "univer-w-full", children: i.t("image-panel.transform.height") }) }),
|
|
672
|
+
/* @__PURE__ */ u("div", { className: "univer-relative univer-mt-2.5 univer-flex univer-h-full univer-items-start", children: /* @__PURE__ */ u("div", { className: "univer-w-full", children: /* @__PURE__ */ u(
|
|
673
|
+
ae,
|
|
678
674
|
{
|
|
679
|
-
className:
|
|
675
|
+
className: "univer-w-11/12",
|
|
680
676
|
min: 1,
|
|
681
|
-
value:
|
|
682
|
-
onChange: (
|
|
683
|
-
|
|
677
|
+
value: I,
|
|
678
|
+
onChange: (C) => {
|
|
679
|
+
Q(C);
|
|
684
680
|
}
|
|
685
681
|
}
|
|
686
682
|
) }) })
|
|
687
683
|
] }) })
|
|
688
684
|
] }),
|
|
689
|
-
/* @__PURE__ */
|
|
690
|
-
/* @__PURE__ */ u("div", { className:
|
|
691
|
-
/* @__PURE__ */ u("div", { className:
|
|
692
|
-
/* @__PURE__ */ u("div", { className:
|
|
693
|
-
|
|
685
|
+
/* @__PURE__ */ O("div", { className: "univer-relative univer-mt-2.5 univer-flex univer-h-full univer-items-start", children: [
|
|
686
|
+
/* @__PURE__ */ u("div", { className: "univer-w-1/3", children: /* @__PURE__ */ O("label", { children: [
|
|
687
|
+
/* @__PURE__ */ u("div", { className: "univer-relative univer-mt-2.5 univer-flex univer-h-full univer-items-start", children: /* @__PURE__ */ u("div", { className: "univer-w-full", children: i.t("image-panel.transform.x") }) }),
|
|
688
|
+
/* @__PURE__ */ u("div", { className: "univer-relative univer-mt-2.5 univer-flex univer-h-full univer-items-start", children: /* @__PURE__ */ u("div", { className: "univer-w-full", children: /* @__PURE__ */ u(
|
|
689
|
+
ae,
|
|
694
690
|
{
|
|
695
|
-
className:
|
|
691
|
+
className: "univer-w-11/12",
|
|
696
692
|
precision: 1,
|
|
697
693
|
min: 0,
|
|
698
694
|
value: w,
|
|
699
|
-
onChange: (
|
|
700
|
-
|
|
695
|
+
onChange: (C) => {
|
|
696
|
+
ee(C);
|
|
701
697
|
}
|
|
702
698
|
}
|
|
703
699
|
) }) })
|
|
704
700
|
] }) }),
|
|
705
|
-
/* @__PURE__ */ u("div", { className:
|
|
706
|
-
/* @__PURE__ */ u("div", { className:
|
|
707
|
-
/* @__PURE__ */ u("div", { className:
|
|
708
|
-
|
|
701
|
+
/* @__PURE__ */ u("div", { className: "univer-w-1/3", children: /* @__PURE__ */ O("label", { children: [
|
|
702
|
+
/* @__PURE__ */ u("div", { className: "univer-relative univer-mt-2.5 univer-flex univer-h-full univer-items-start", children: /* @__PURE__ */ u("div", { className: "univer-w-full", children: i.t("image-panel.transform.y") }) }),
|
|
703
|
+
/* @__PURE__ */ u("div", { className: "univer-relative univer-mt-2.5 univer-flex univer-h-full univer-items-start", children: /* @__PURE__ */ u("div", { className: "univer-w-full", children: /* @__PURE__ */ u(
|
|
704
|
+
ae,
|
|
709
705
|
{
|
|
710
|
-
className:
|
|
706
|
+
className: "univer-w-11/12",
|
|
711
707
|
precision: 1,
|
|
712
708
|
min: 0,
|
|
713
|
-
value:
|
|
714
|
-
onChange: (
|
|
715
|
-
|
|
709
|
+
value: V,
|
|
710
|
+
onChange: (C) => {
|
|
711
|
+
me(C);
|
|
716
712
|
}
|
|
717
713
|
}
|
|
718
714
|
) }) })
|
|
719
715
|
] }) }),
|
|
720
|
-
/* @__PURE__ */ u("div", { className:
|
|
721
|
-
/* @__PURE__ */ u("div", { className:
|
|
722
|
-
/* @__PURE__ */ u("div", { className:
|
|
723
|
-
|
|
716
|
+
/* @__PURE__ */ u("div", { className: "univer-w-1/3", children: /* @__PURE__ */ O("label", { children: [
|
|
717
|
+
/* @__PURE__ */ u("div", { className: "univer-relative univer-mt-2.5 univer-flex univer-h-full univer-items-start", children: /* @__PURE__ */ u("div", { className: "univer-w-full", children: i.t("image-panel.transform.rotate") }) }),
|
|
718
|
+
/* @__PURE__ */ u("div", { className: "univer-relative univer-mt-2.5 univer-flex univer-h-full univer-items-start", children: /* @__PURE__ */ u("div", { className: "univer-w-full", children: /* @__PURE__ */ u(
|
|
719
|
+
ae,
|
|
724
720
|
{
|
|
725
|
-
className:
|
|
721
|
+
className: "univer-w-11/12",
|
|
726
722
|
precision: 1,
|
|
727
|
-
value:
|
|
728
|
-
onChange:
|
|
723
|
+
value: z,
|
|
724
|
+
onChange: pe
|
|
729
725
|
}
|
|
730
726
|
) }) })
|
|
731
727
|
] }) })
|
|
@@ -734,40 +730,38 @@ function Ni(i) {
|
|
|
734
730
|
}
|
|
735
731
|
);
|
|
736
732
|
}
|
|
737
|
-
const
|
|
738
|
-
|
|
739
|
-
}, Oe = "COMPONENT_SLIDE_SIDEBAR";
|
|
740
|
-
function Vi() {
|
|
733
|
+
const be = "COMPONENT_SLIDE_SIDEBAR";
|
|
734
|
+
function bn() {
|
|
741
735
|
var h, l, d;
|
|
742
|
-
const
|
|
743
|
-
if (!
|
|
744
|
-
const s = (l = e.getRenderUnitByPageId(
|
|
736
|
+
const n = R(y), e = R(T), t = n.getCurrentUnitForType(E.UNIVER_SLIDE), i = (h = t == null ? void 0 : t.getActivePage()) == null ? void 0 : h.id;
|
|
737
|
+
if (!i) return null;
|
|
738
|
+
const s = (l = e.getRenderUnitByPageId(i, i).scene) == null ? void 0 : l.getTransformer();
|
|
745
739
|
if (!s) return null;
|
|
746
740
|
const a = s.getSelectedObjectMap().values().next().value;
|
|
747
741
|
if (!a)
|
|
748
742
|
return null;
|
|
749
|
-
const c = ((d =
|
|
750
|
-
return /* @__PURE__ */
|
|
751
|
-
/* @__PURE__ */ u(
|
|
752
|
-
/* @__PURE__ */ u(
|
|
753
|
-
a.objectType ===
|
|
743
|
+
const c = ((d = n.getFocusedUnit()) == null ? void 0 : d.getUnitId()) || "";
|
|
744
|
+
return /* @__PURE__ */ O("section", { className: "univer-p-2 univer-text-center univer-text-sm", children: [
|
|
745
|
+
/* @__PURE__ */ u(Cn, { pageId: i, unitId: c }),
|
|
746
|
+
/* @__PURE__ */ u(In, { pageId: i, unitId: c }),
|
|
747
|
+
a.objectType === ce.RECT && /* @__PURE__ */ u(Sn, { pageId: i, unitId: c })
|
|
754
748
|
] });
|
|
755
749
|
}
|
|
756
|
-
const
|
|
750
|
+
const Ge = {
|
|
757
751
|
id: "slide.command.insert-float-shape",
|
|
758
|
-
type:
|
|
759
|
-
handler: async (
|
|
752
|
+
type: D.COMMAND,
|
|
753
|
+
handler: async (n) => {
|
|
760
754
|
var r;
|
|
761
|
-
const e =
|
|
762
|
-
return e.executeCommand(
|
|
755
|
+
const e = n.get(U), i = (r = n.get(y).getFocusedUnit()) == null ? void 0 : r.getUnitId();
|
|
756
|
+
return e.executeCommand(Ft.id, { unitId: i });
|
|
763
757
|
}
|
|
764
|
-
},
|
|
758
|
+
}, Ft = {
|
|
765
759
|
id: "slide.operation.insert-float-shape",
|
|
766
|
-
type:
|
|
767
|
-
handler: async (
|
|
768
|
-
const t =
|
|
760
|
+
type: D.OPERATION,
|
|
761
|
+
handler: async (n, e) => {
|
|
762
|
+
const t = _t(6), i = n.get(y), r = e.unitId, s = i.getUnit(r);
|
|
769
763
|
if (!s) return !1;
|
|
770
|
-
const o = s.getActivePage(), a = Object.values(o.pageElements), c = a != null && a.length ? Math.max(...a.map((
|
|
764
|
+
const o = s.getActivePage(), a = Object.values(o.pageElements), c = a != null && a.length ? Math.max(...a.map((g) => g.zIndex)) : 20, h = {
|
|
771
765
|
id: t,
|
|
772
766
|
zIndex: c + 1,
|
|
773
767
|
left: 378,
|
|
@@ -776,9 +770,9 @@ const qe = {
|
|
|
776
770
|
height: 250,
|
|
777
771
|
title: t,
|
|
778
772
|
description: "",
|
|
779
|
-
type:
|
|
773
|
+
type: ze.SHAPE,
|
|
780
774
|
shape: {
|
|
781
|
-
shapeType:
|
|
775
|
+
shapeType: di.Rect,
|
|
782
776
|
text: "",
|
|
783
777
|
shapeProperties: {
|
|
784
778
|
shapeBackgroundFill: {
|
|
@@ -788,16 +782,16 @@ const qe = {
|
|
|
788
782
|
}
|
|
789
783
|
};
|
|
790
784
|
o.pageElements[t] = h, s.updatePage(o.id, o);
|
|
791
|
-
const l =
|
|
785
|
+
const l = n.get(T), d = l.createObjectToPage(h, o.id, r);
|
|
792
786
|
return d && l.setObjectActiveByPage(d, o.id, r), !0;
|
|
793
787
|
}
|
|
794
|
-
},
|
|
788
|
+
}, Ae = {
|
|
795
789
|
id: "sidebar.operation.slide-shape",
|
|
796
|
-
type:
|
|
797
|
-
handler: async (
|
|
798
|
-
const { visible: t, objectType:
|
|
790
|
+
type: D.COMMAND,
|
|
791
|
+
handler: async (n, e) => {
|
|
792
|
+
const { visible: t, objectType: i } = e, r = n.get(yt), s = n.get(J);
|
|
799
793
|
let o = "", a = "";
|
|
800
|
-
return
|
|
794
|
+
return i === ce.RECT ? (o = "slide.sidebar.shape", a = be) : i === ce.IMAGE ? (o = "slide.sidebar.image", a = be) : i === ce.RICH_TEXT && (o = "slide.sidebar.text", a = be), t ? r.open({
|
|
801
795
|
header: { title: s.t(o) },
|
|
802
796
|
children: { label: a },
|
|
803
797
|
onClose: () => {
|
|
@@ -805,70 +799,70 @@ const qe = {
|
|
|
805
799
|
width: 360
|
|
806
800
|
}) : r.close(), !0;
|
|
807
801
|
}
|
|
808
|
-
},
|
|
809
|
-
var
|
|
810
|
-
for (var r =
|
|
811
|
-
(o =
|
|
802
|
+
}, Wt = "COMPONENT_SLIDE_IMAGE_POPUP_MENU";
|
|
803
|
+
var En = Object.getOwnPropertyDescriptor, On = (n, e, t, i) => {
|
|
804
|
+
for (var r = i > 1 ? void 0 : i ? En(e, t) : e, s = n.length - 1, o; s >= 0; s--)
|
|
805
|
+
(o = n[s]) && (r = o(r) || r);
|
|
812
806
|
return r;
|
|
813
|
-
},
|
|
814
|
-
function
|
|
815
|
-
const t =
|
|
807
|
+
}, Ce = (n, e) => (t, i) => e(t, i, n);
|
|
808
|
+
function xn(n, e) {
|
|
809
|
+
const t = vt(n.left, n.top, e), i = vt(n.right, n.bottom, e);
|
|
816
810
|
return {
|
|
817
811
|
left: t.x,
|
|
818
812
|
top: t.y,
|
|
819
|
-
right:
|
|
820
|
-
bottom:
|
|
813
|
+
right: i.x,
|
|
814
|
+
bottom: i.y
|
|
821
815
|
};
|
|
822
816
|
}
|
|
823
|
-
function
|
|
824
|
-
const { scaleX:
|
|
817
|
+
function vt(n, e, t) {
|
|
818
|
+
const { scaleX: i, scaleY: r } = t.getAncestorScale(), s = t.getViewport(ne.VIEW);
|
|
825
819
|
if (!s)
|
|
826
820
|
return {
|
|
827
|
-
x:
|
|
821
|
+
x: n,
|
|
828
822
|
y: e
|
|
829
823
|
};
|
|
830
|
-
const { viewportScrollX: o, viewportScrollY: a } = s, c = (
|
|
824
|
+
const { viewportScrollX: o, viewportScrollY: a } = s, c = (n - o) * i, h = (e - a) * r;
|
|
831
825
|
return {
|
|
832
826
|
x: c,
|
|
833
827
|
y: h
|
|
834
828
|
};
|
|
835
829
|
}
|
|
836
|
-
let
|
|
837
|
-
constructor(
|
|
838
|
-
super(), this._globalPopupManagerService =
|
|
839
|
-
}
|
|
840
|
-
_createObjectPositionObserver(
|
|
841
|
-
const
|
|
842
|
-
var
|
|
843
|
-
const { scene: o, engine: a } = e, { left: c, top: h, width: l, height: d } =
|
|
830
|
+
let xe = class extends Me {
|
|
831
|
+
constructor(n, e, t, i) {
|
|
832
|
+
super(), this._globalPopupManagerService = n, this._renderManagerService = e, this._univerInstanceService = t, this._commandService = i;
|
|
833
|
+
}
|
|
834
|
+
_createObjectPositionObserver(n, e) {
|
|
835
|
+
const i = (() => {
|
|
836
|
+
var H, F, Q, ee;
|
|
837
|
+
const { scene: o, engine: a } = e, { left: c, top: h, width: l, height: d } = n, g = (o.width - ((F = (H = e.mainComponent) == null ? void 0 : H.width) != null ? F : 0)) / 2, p = (o.height - ((ee = (Q = e.mainComponent) == null ? void 0 : Q.height) != null ? ee : 0)) / 2, m = {
|
|
844
838
|
left: c,
|
|
845
839
|
right: c + l,
|
|
846
840
|
top: h,
|
|
847
841
|
bottom: h + d
|
|
848
|
-
},
|
|
842
|
+
}, f = a.getCanvasElement(), v = f.getBoundingClientRect(), _ = Oi(f.style.width), { scaleX: I, scaleY: b } = o.getAncestorScale(), w = xn(m, o), { top: M, left: V, width: x } = v, z = x / _;
|
|
849
843
|
return {
|
|
850
|
-
left: w.left *
|
|
851
|
-
right: w.right *
|
|
852
|
-
top: w.top *
|
|
853
|
-
bottom: w.bottom *
|
|
844
|
+
left: w.left * z * I + V + g,
|
|
845
|
+
right: w.right * z * I + V + g,
|
|
846
|
+
top: w.top * z * b + M + p,
|
|
847
|
+
bottom: w.bottom * z * b + M + p
|
|
854
848
|
};
|
|
855
|
-
})(), r = new
|
|
849
|
+
})(), r = new q(i), s = new ke();
|
|
856
850
|
return {
|
|
857
|
-
position:
|
|
851
|
+
position: i,
|
|
858
852
|
position$: r,
|
|
859
853
|
disposable: s
|
|
860
854
|
};
|
|
861
855
|
}
|
|
862
|
-
attachPopupToObject(
|
|
863
|
-
const
|
|
856
|
+
attachPopupToObject(n, e) {
|
|
857
|
+
const i = this._univerInstanceService.getCurrentUnitForType(E.UNIVER_SLIDE).getUnitId(), r = this._renderManagerService.getRenderById(i);
|
|
864
858
|
if (!r)
|
|
865
859
|
return {
|
|
866
860
|
dispose: () => {
|
|
867
861
|
}
|
|
868
862
|
};
|
|
869
|
-
const { position: s, position$: o, disposable: a } = this._createObjectPositionObserver(
|
|
863
|
+
const { position: s, position$: o, disposable: a } = this._createObjectPositionObserver(n, r), c = this._globalPopupManagerService.addPopup({
|
|
870
864
|
...e,
|
|
871
|
-
unitId:
|
|
865
|
+
unitId: i,
|
|
872
866
|
subUnitId: "default",
|
|
873
867
|
anchorRect: s,
|
|
874
868
|
anchorRect$: o,
|
|
@@ -881,22 +875,22 @@ let Te = class extends Ve {
|
|
|
881
875
|
};
|
|
882
876
|
}
|
|
883
877
|
};
|
|
884
|
-
|
|
885
|
-
|
|
886
|
-
|
|
887
|
-
|
|
888
|
-
|
|
889
|
-
],
|
|
890
|
-
var
|
|
891
|
-
for (var r =
|
|
892
|
-
(o =
|
|
878
|
+
xe = On([
|
|
879
|
+
Ce(0, K(Ri)),
|
|
880
|
+
Ce(1, X),
|
|
881
|
+
Ce(2, y),
|
|
882
|
+
Ce(3, U)
|
|
883
|
+
], xe);
|
|
884
|
+
var Rn = Object.getOwnPropertyDescriptor, yn = (n, e, t, i) => {
|
|
885
|
+
for (var r = i > 1 ? void 0 : i ? Rn(e, t) : e, s = n.length - 1, o; s >= 0; s--)
|
|
886
|
+
(o = n[s]) && (r = o(r) || r);
|
|
893
887
|
return r;
|
|
894
|
-
},
|
|
895
|
-
let
|
|
896
|
-
constructor(e, t,
|
|
888
|
+
}, Y = (n, e) => (t, i) => e(t, i, n);
|
|
889
|
+
let Re = class extends he {
|
|
890
|
+
constructor(e, t, i, r, s, o, a) {
|
|
897
891
|
super();
|
|
898
|
-
|
|
899
|
-
this._canvasPopManagerService = e, this._renderManagerService = t, this._univerInstanceService =
|
|
892
|
+
S(this, "_initImagePopupMenu", /* @__PURE__ */ new Set());
|
|
893
|
+
this._canvasPopManagerService = e, this._renderManagerService = t, this._univerInstanceService = i, this._contextService = r, this._canvasView = s, this._sidebarService = o, this._commandService = a, this._init();
|
|
900
894
|
}
|
|
901
895
|
_init() {
|
|
902
896
|
this._univerInstanceService.getAllUnitsForType(E.UNIVER_SLIDE).forEach((e) => this._create(e));
|
|
@@ -912,14 +906,14 @@ let Me = class extends pe {
|
|
|
912
906
|
// eslint-disable-next-line max-lines-per-function
|
|
913
907
|
_popupMenuListener(e) {
|
|
914
908
|
var r;
|
|
915
|
-
const t = this._univerInstanceService.getCurrentUnitForType(E.UNIVER_SLIDE),
|
|
916
|
-
Object.keys(
|
|
909
|
+
const t = this._univerInstanceService.getCurrentUnitForType(E.UNIVER_SLIDE), i = (r = t == null ? void 0 : t.getPages()) != null ? r : {};
|
|
910
|
+
Object.keys(i).forEach((s) => {
|
|
917
911
|
var h;
|
|
918
912
|
const a = (h = this._canvasView.getRenderUnitByPageId(s, e).scene) == null ? void 0 : h.getTransformer();
|
|
919
913
|
if (!a) return;
|
|
920
914
|
let c;
|
|
921
915
|
this.disposeWithMe(
|
|
922
|
-
|
|
916
|
+
Ct(
|
|
923
917
|
a.createControl$.subscribe(() => {
|
|
924
918
|
const l = a.getSelectedObjectMap();
|
|
925
919
|
if (l.size > 1) {
|
|
@@ -929,15 +923,15 @@ let Me = class extends pe {
|
|
|
929
923
|
const d = l.values().next().value;
|
|
930
924
|
if (!d)
|
|
931
925
|
return;
|
|
932
|
-
const
|
|
926
|
+
const g = d.oKey;
|
|
933
927
|
c == null || c.dispose(), c = this.disposeWithMe(this._canvasPopManagerService.attachPopupToObject(d, {
|
|
934
|
-
componentKey:
|
|
928
|
+
componentKey: Wt,
|
|
935
929
|
direction: "horizontal",
|
|
936
930
|
offset: [2, 0],
|
|
937
931
|
extraProps: {
|
|
938
|
-
menuItems: this._getMenuItemsByObjectType(d.objectType,
|
|
932
|
+
menuItems: this._getMenuItemsByObjectType(d.objectType, g, e)
|
|
939
933
|
}
|
|
940
|
-
})), this._sidebarService.visible && this._commandService.executeCommand(
|
|
934
|
+
})), this._sidebarService.visible && this._commandService.executeCommand(Ae.id, {
|
|
941
935
|
visible: !0,
|
|
942
936
|
objectType: d.objectType
|
|
943
937
|
});
|
|
@@ -945,7 +939,7 @@ let Me = class extends pe {
|
|
|
945
939
|
)
|
|
946
940
|
), this.disposeWithMe(
|
|
947
941
|
a.clearControl$.subscribe(() => {
|
|
948
|
-
c == null || c.dispose(), this._contextService.setContextValue(
|
|
942
|
+
c == null || c.dispose(), this._contextService.setContextValue(ui, !1);
|
|
949
943
|
})
|
|
950
944
|
), this.disposeWithMe(
|
|
951
945
|
a.changing$.subscribe(() => {
|
|
@@ -956,7 +950,7 @@ let Me = class extends pe {
|
|
|
956
950
|
return;
|
|
957
951
|
}
|
|
958
952
|
const d = l.values().next().value;
|
|
959
|
-
d && this._commandService.executeCommand(
|
|
953
|
+
d && this._commandService.executeCommand(W.id, {
|
|
960
954
|
unitId: e,
|
|
961
955
|
oKey: d.oKey,
|
|
962
956
|
props: {
|
|
@@ -970,11 +964,11 @@ let Me = class extends pe {
|
|
|
970
964
|
);
|
|
971
965
|
});
|
|
972
966
|
}
|
|
973
|
-
_getMenuItemsByObjectType(e, t,
|
|
967
|
+
_getMenuItemsByObjectType(e, t, i) {
|
|
974
968
|
return [{
|
|
975
969
|
label: "slide.popup.edit",
|
|
976
970
|
index: 0,
|
|
977
|
-
commandId:
|
|
971
|
+
commandId: Ae.id,
|
|
978
972
|
commandParams: {
|
|
979
973
|
visible: !0,
|
|
980
974
|
objectType: e
|
|
@@ -983,56 +977,56 @@ let Me = class extends pe {
|
|
|
983
977
|
}, {
|
|
984
978
|
label: "slide.popup.delete",
|
|
985
979
|
index: 5,
|
|
986
|
-
commandId:
|
|
980
|
+
commandId: Mt.id,
|
|
987
981
|
commandParams: {
|
|
988
982
|
id: t,
|
|
989
|
-
unitId:
|
|
983
|
+
unitId: i
|
|
990
984
|
},
|
|
991
985
|
disable: !1
|
|
992
986
|
}];
|
|
993
987
|
}
|
|
994
988
|
};
|
|
995
|
-
|
|
996
|
-
|
|
997
|
-
|
|
998
|
-
|
|
999
|
-
|
|
1000
|
-
|
|
1001
|
-
|
|
1002
|
-
|
|
1003
|
-
],
|
|
1004
|
-
const
|
|
989
|
+
Re = yn([
|
|
990
|
+
Y(0, K(xe)),
|
|
991
|
+
Y(1, X),
|
|
992
|
+
Y(2, y),
|
|
993
|
+
Y(3, ve),
|
|
994
|
+
Y(4, K(T)),
|
|
995
|
+
Y(5, yt),
|
|
996
|
+
Y(6, U)
|
|
997
|
+
], Re);
|
|
998
|
+
const ye = {
|
|
1005
999
|
id: "slide.operation.edit-arrow",
|
|
1006
|
-
type:
|
|
1000
|
+
type: D.OPERATION,
|
|
1007
1001
|
handler: () => !0
|
|
1008
|
-
},
|
|
1009
|
-
var
|
|
1010
|
-
for (var r =
|
|
1011
|
-
(o =
|
|
1002
|
+
}, le = hi("SLIDE_EDITOR");
|
|
1003
|
+
var Pn = Object.getOwnPropertyDescriptor, wn = (n, e, t, i) => {
|
|
1004
|
+
for (var r = i > 1 ? void 0 : i ? Pn(e, t) : e, s = n.length - 1, o; s >= 0; s--)
|
|
1005
|
+
(o = n[s]) && (r = o(r) || r);
|
|
1012
1006
|
return r;
|
|
1013
|
-
},
|
|
1014
|
-
const
|
|
1015
|
-
let
|
|
1016
|
-
constructor(e, t,
|
|
1007
|
+
}, De = (n, e) => (t, i) => e(t, i, n);
|
|
1008
|
+
const Ye = St("univer.slide-editor-bridge.service");
|
|
1009
|
+
let Be = class extends Me {
|
|
1010
|
+
constructor(e, t, i) {
|
|
1017
1011
|
super();
|
|
1018
|
-
|
|
1019
|
-
|
|
1020
|
-
|
|
1021
|
-
|
|
1022
|
-
|
|
1023
|
-
|
|
1024
|
-
|
|
1012
|
+
S(this, "_editorUnitId", le);
|
|
1013
|
+
S(this, "_isForceKeepVisible", !1);
|
|
1014
|
+
S(this, "_editorIsDirty", !1);
|
|
1015
|
+
S(this, "_currentEditRectState", null);
|
|
1016
|
+
S(this, "_currentEditRectState$", new q(null));
|
|
1017
|
+
S(this, "currentEditRectState$", this._currentEditRectState$.asObservable());
|
|
1018
|
+
S(this, "_visibleParam", {
|
|
1025
1019
|
visible: !1,
|
|
1026
|
-
eventType:
|
|
1020
|
+
eventType: Z.Dblclick,
|
|
1027
1021
|
unitId: ""
|
|
1028
1022
|
});
|
|
1029
|
-
|
|
1030
|
-
|
|
1031
|
-
|
|
1032
|
-
|
|
1033
|
-
|
|
1034
|
-
|
|
1035
|
-
this._editorService = e, this._contextService = t, this._renderManagerService =
|
|
1023
|
+
S(this, "_visible$", new q(this._visibleParam));
|
|
1024
|
+
S(this, "visible$", this._visible$.asObservable());
|
|
1025
|
+
S(this, "_afterVisible$", new q(this._visibleParam));
|
|
1026
|
+
S(this, "afterVisible$", this._afterVisible$.asObservable());
|
|
1027
|
+
S(this, "endEditing$", new Tt());
|
|
1028
|
+
S(this, "_currentEditRectInfo");
|
|
1029
|
+
this._editorService = e, this._contextService = t, this._renderManagerService = i;
|
|
1036
1030
|
}
|
|
1037
1031
|
dispose() {
|
|
1038
1032
|
super.dispose();
|
|
@@ -1045,7 +1039,7 @@ let Fe = class extends Ve {
|
|
|
1045
1039
|
* @editorInfo editorInfo
|
|
1046
1040
|
*/
|
|
1047
1041
|
setEditorRect(e) {
|
|
1048
|
-
this._currentEditRectInfo = e, this._editorService.getFocusEditor() || (this._editorService.focus(
|
|
1042
|
+
this._currentEditRectInfo = e, this._editorService.getFocusEditor() || (this._editorService.focus(le), this._contextService.setContextValue(Ee, !1), this._contextService.setContextValue(It, !1), this._contextService.setContextValue(bt, !1));
|
|
1049
1043
|
const t = this.getEditRectState();
|
|
1050
1044
|
this._currentEditRectState = t, this._currentEditRectState$.next(t);
|
|
1051
1045
|
}
|
|
@@ -1059,27 +1053,27 @@ let Fe = class extends Ve {
|
|
|
1059
1053
|
* && this@setEditorRect
|
|
1060
1054
|
*/
|
|
1061
1055
|
getEditRectState() {
|
|
1062
|
-
const e =
|
|
1056
|
+
const e = le, t = this._currentEditRectInfo, i = t.unitId, r = t.richTextObj.documentData;
|
|
1063
1057
|
r.id = e, r.documentStyle = {
|
|
1064
1058
|
...r.documentStyle,
|
|
1065
1059
|
pageSize: { width: t.richTextObj.width, height: 1 / 0 }
|
|
1066
1060
|
};
|
|
1067
1061
|
const o = {
|
|
1068
|
-
documentModel: new
|
|
1062
|
+
documentModel: new vi(r),
|
|
1069
1063
|
fontString: "document",
|
|
1070
1064
|
textRotation: { a: 0, v: 0 },
|
|
1071
1065
|
wrapStrategy: 0,
|
|
1072
|
-
verticalAlign:
|
|
1073
|
-
horizontalAlign:
|
|
1066
|
+
verticalAlign: Oe.TOP,
|
|
1067
|
+
horizontalAlign: Et.LEFT,
|
|
1074
1068
|
paddingData: { t: 0, b: 1, l: 2, r: 2 }
|
|
1075
1069
|
}, a = t.richTextObj.width, c = t.richTextObj.height, h = t.richTextObj.left, l = t.richTextObj.top, d = {
|
|
1076
1070
|
left: 0,
|
|
1077
1071
|
top: 0
|
|
1078
|
-
},
|
|
1079
|
-
x: (
|
|
1080
|
-
y: (
|
|
1081
|
-
}, _ = (
|
|
1082
|
-
return d.left =
|
|
1072
|
+
}, g = this._renderManagerService.getRenderById(i), p = g == null ? void 0 : g.scene, m = p == null ? void 0 : p.getViewport(ne.VIEW), f = p == null ? void 0 : p.getObject(ne.COMPONENT), v = {
|
|
1073
|
+
x: (f == null ? void 0 : f.left) || 0,
|
|
1074
|
+
y: (f == null ? void 0 : f.top) || 0
|
|
1075
|
+
}, _ = (m == null ? void 0 : m.viewportScrollX) || 0, I = (m == null ? void 0 : m.viewportScrollY) || 0;
|
|
1076
|
+
return d.left = v.x - _, d.top = v.y - I, {
|
|
1083
1077
|
position: {
|
|
1084
1078
|
startX: h,
|
|
1085
1079
|
startY: l,
|
|
@@ -1089,7 +1083,7 @@ let Fe = class extends Ve {
|
|
|
1089
1083
|
scaleX: 1,
|
|
1090
1084
|
scaleY: 1,
|
|
1091
1085
|
slideCardOffset: d,
|
|
1092
|
-
unitId:
|
|
1086
|
+
unitId: i,
|
|
1093
1087
|
editorUnitId: e,
|
|
1094
1088
|
documentLayoutObject: o
|
|
1095
1089
|
};
|
|
@@ -1110,13 +1104,13 @@ let Fe = class extends Ve {
|
|
|
1110
1104
|
* @deprecated
|
|
1111
1105
|
*/
|
|
1112
1106
|
genDocData(e) {
|
|
1113
|
-
const t = this.getCurrentEditorId(),
|
|
1107
|
+
const t = this.getCurrentEditorId(), i = e.text, r = e.fs;
|
|
1114
1108
|
return {
|
|
1115
1109
|
id: t,
|
|
1116
1110
|
body: {
|
|
1117
|
-
dataStream: `${
|
|
1111
|
+
dataStream: `${i}\r
|
|
1118
1112
|
`,
|
|
1119
|
-
textRuns: [{ st: 0, ed:
|
|
1113
|
+
textRuns: [{ st: 0, ed: i.length }],
|
|
1120
1114
|
paragraphs: [{
|
|
1121
1115
|
paragraphStyle: {
|
|
1122
1116
|
// no use
|
|
@@ -1124,9 +1118,9 @@ let Fe = class extends Ve {
|
|
|
1124
1118
|
// horizontalAlign: HorizontalAlign.CENTER,
|
|
1125
1119
|
// verticalAlign: VerticalAlign.MIDDLE,
|
|
1126
1120
|
},
|
|
1127
|
-
startIndex:
|
|
1121
|
+
startIndex: i.length + 1
|
|
1128
1122
|
}],
|
|
1129
|
-
sectionBreaks: [{ startIndex:
|
|
1123
|
+
sectionBreaks: [{ startIndex: i.length + 2 }]
|
|
1130
1124
|
},
|
|
1131
1125
|
documentStyle: {
|
|
1132
1126
|
marginBottom: 0,
|
|
@@ -1137,7 +1131,7 @@ let Fe = class extends Ve {
|
|
|
1137
1131
|
textStyle: { fs: r },
|
|
1138
1132
|
renderConfig: {
|
|
1139
1133
|
// horizontalAlign: HorizontalAlign.CENTER,
|
|
1140
|
-
verticalAlign:
|
|
1134
|
+
verticalAlign: Oe.MIDDLE,
|
|
1141
1135
|
centerAngle: 0,
|
|
1142
1136
|
vertexAngle: 0,
|
|
1143
1137
|
wrapStrategy: 0
|
|
@@ -1149,22 +1143,22 @@ let Fe = class extends Ve {
|
|
|
1149
1143
|
};
|
|
1150
1144
|
}
|
|
1151
1145
|
};
|
|
1152
|
-
|
|
1153
|
-
|
|
1154
|
-
|
|
1155
|
-
|
|
1156
|
-
],
|
|
1157
|
-
class
|
|
1146
|
+
Be = wn([
|
|
1147
|
+
De(0, Ke),
|
|
1148
|
+
De(1, ve),
|
|
1149
|
+
De(2, X)
|
|
1150
|
+
], Be);
|
|
1151
|
+
class Tn {
|
|
1158
1152
|
constructor() {
|
|
1159
|
-
|
|
1160
|
-
|
|
1161
|
-
|
|
1162
|
-
|
|
1163
|
-
|
|
1164
|
-
|
|
1165
|
-
|
|
1166
|
-
|
|
1167
|
-
|
|
1153
|
+
S(this, "_state", null);
|
|
1154
|
+
S(this, "_rect", null);
|
|
1155
|
+
S(this, "_state$", new q(null));
|
|
1156
|
+
S(this, "state$", this._state$.asObservable());
|
|
1157
|
+
S(this, "_rect$", new q(null));
|
|
1158
|
+
S(this, "rect$", this._rect$.asObservable());
|
|
1159
|
+
S(this, "_focus", !1);
|
|
1160
|
+
S(this, "_focus$", new q(this._focus));
|
|
1161
|
+
S(this, "focus$", this._focus$.asObservable());
|
|
1168
1162
|
}
|
|
1169
1163
|
dispose() {
|
|
1170
1164
|
this._state$.complete(), this._state = null, this._rect$.complete(), this._rect = null;
|
|
@@ -1188,30 +1182,30 @@ class Wi {
|
|
|
1188
1182
|
this._state$.next(e);
|
|
1189
1183
|
}
|
|
1190
1184
|
}
|
|
1191
|
-
const
|
|
1185
|
+
const Ze = St(
|
|
1192
1186
|
"univer.slide-editor-manager.service"
|
|
1193
1187
|
);
|
|
1194
|
-
var
|
|
1195
|
-
for (var r =
|
|
1196
|
-
(o =
|
|
1188
|
+
var G = /* @__PURE__ */ ((n) => (n[n.InitialState = 0] = "InitialState", n[n.StartEditor = 1] = "StartEditor", n[n.CursorChange = 2] = "CursorChange", n))(G || {}), Mn = Object.getOwnPropertyDescriptor, Nn = (n, e, t, i) => {
|
|
1189
|
+
for (var r = i > 1 ? void 0 : i ? Mn(e, t) : e, s = n.length - 1, o; s >= 0; s--)
|
|
1190
|
+
(o = n[s]) && (r = o(r) || r);
|
|
1197
1191
|
return r;
|
|
1198
|
-
},
|
|
1199
|
-
const
|
|
1200
|
-
let
|
|
1201
|
-
constructor(e, t,
|
|
1192
|
+
}, L = (n, e) => (t, i) => e(t, i, n);
|
|
1193
|
+
const gt = -1e3, ft = 5, Dn = 2;
|
|
1194
|
+
let $e = class extends Me {
|
|
1195
|
+
constructor(e, t, i, r, s, o, a, c, h, l, d, g) {
|
|
1202
1196
|
super();
|
|
1203
1197
|
/**
|
|
1204
1198
|
* It is used to distinguish whether the user has actively moved the cursor in the editor, mainly through mouse clicks.
|
|
1205
1199
|
*/
|
|
1206
|
-
|
|
1200
|
+
S(this, "_cursorChange", G.InitialState);
|
|
1207
1201
|
/** If the corresponding unit is active and prepared for editing. */
|
|
1208
|
-
|
|
1209
|
-
|
|
1210
|
-
this._renderContext = e, this._layoutService = t, this._undoRedoService =
|
|
1211
|
-
|
|
1202
|
+
S(this, "_isUnitEditing", !1);
|
|
1203
|
+
S(this, "_d");
|
|
1204
|
+
this._renderContext = e, this._layoutService = t, this._undoRedoService = i, this._contextService = r, this._instanceSrv = s, this._renderManagerService = o, this._editorBridgeService = a, this._cellEditorManagerService = c, this._textSelectionManagerService = h, this._commandService = l, this._localService = d, this._editorService = g, this.disposeWithMe(this._instanceSrv.getCurrentTypeOfUnit$(E.UNIVER_SLIDE).subscribe((p) => {
|
|
1205
|
+
p && p.getUnitId() === this._renderContext.unitId ? this._d = this._init() : (this._disposeCurrent(), this._isUnitEditing && (this._handleEditorInvisible({
|
|
1212
1206
|
visible: !1,
|
|
1213
|
-
eventType:
|
|
1214
|
-
keycode:
|
|
1207
|
+
eventType: Z.Keyboard,
|
|
1208
|
+
keycode: P.ESC,
|
|
1215
1209
|
unitId: this._renderContext.unitId
|
|
1216
1210
|
}), this._isUnitEditing = !1));
|
|
1217
1211
|
})), this._initEditorVisibilityListener();
|
|
@@ -1224,7 +1218,7 @@ let We = class extends Ve {
|
|
|
1224
1218
|
(e = this._d) == null || e.dispose(), this._d = null;
|
|
1225
1219
|
}
|
|
1226
1220
|
_init() {
|
|
1227
|
-
const e = new
|
|
1221
|
+
const e = new ke();
|
|
1228
1222
|
return this._subscribeToCurrentCell(e), this._initialKeyboardListener(e), this._initialCursorSync(e), this._listenEditorFocus(e), this._commandExecutedListener(e), setTimeout(() => {
|
|
1229
1223
|
this._cursorStateListener(e);
|
|
1230
1224
|
}, 1e3), e;
|
|
@@ -1241,16 +1235,16 @@ let We = class extends Ve {
|
|
|
1241
1235
|
}
|
|
1242
1236
|
_getEditorSkeleton(e) {
|
|
1243
1237
|
var t;
|
|
1244
|
-
return (t = this._renderManagerService.getRenderById(e)) == null ? void 0 : t.with(
|
|
1238
|
+
return (t = this._renderManagerService.getRenderById(e)) == null ? void 0 : t.with(lt).getSkeleton();
|
|
1245
1239
|
}
|
|
1246
1240
|
_getEditorViewModel(e) {
|
|
1247
1241
|
var t;
|
|
1248
|
-
return (t = this._renderManagerService.getRenderById(e)) == null ? void 0 : t.with(
|
|
1242
|
+
return (t = this._renderManagerService.getRenderById(e)) == null ? void 0 : t.with(lt).getViewModel();
|
|
1249
1243
|
}
|
|
1250
1244
|
_initialCursorSync(e) {
|
|
1251
|
-
e.add(this._cellEditorManagerService.focus$.pipe(
|
|
1245
|
+
e.add(this._cellEditorManagerService.focus$.pipe(Hi((t) => !!t)).subscribe(() => {
|
|
1252
1246
|
var t;
|
|
1253
|
-
(t =
|
|
1247
|
+
(t = je(E.UNIVER_DOC, this._instanceSrv, this._renderManagerService)) == null || t.with(dt).sync();
|
|
1254
1248
|
}));
|
|
1255
1249
|
}
|
|
1256
1250
|
/**
|
|
@@ -1260,18 +1254,18 @@ let We = class extends Ve {
|
|
|
1260
1254
|
_subscribeToCurrentCell(e) {
|
|
1261
1255
|
e.add(this._editorBridgeService.currentEditRectState$.subscribe((t) => {
|
|
1262
1256
|
var d;
|
|
1263
|
-
if (t == null || this._contextService.getContextValue(
|
|
1257
|
+
if (t == null || this._contextService.getContextValue(It) || this._contextService.getContextValue(bt))
|
|
1264
1258
|
return;
|
|
1265
1259
|
const {
|
|
1266
|
-
position: { startX:
|
|
1260
|
+
position: { startX: i, endX: r },
|
|
1267
1261
|
documentLayoutObject: { textRotation: s, wrapStrategy: o, documentModel: a },
|
|
1268
1262
|
scaleX: c,
|
|
1269
1263
|
editorUnitId: h
|
|
1270
|
-
} = t, { vertexAngle: l } =
|
|
1271
|
-
a.updateDocumentId(h), o ===
|
|
1264
|
+
} = t, { vertexAngle: l } = it(s);
|
|
1265
|
+
a.updateDocumentId(h), o === Qe.WRAP && l === 0 && a.updateDocumentDataPageSize((r - i) / c), this._instanceSrv.changeDoc(h, a), this._contextService.setContextValue(fi, !0), this._textSelectionManagerService.replaceTextRanges([{
|
|
1272
1266
|
startOffset: 0,
|
|
1273
1267
|
endOffset: 0
|
|
1274
|
-
}]), (d =
|
|
1268
|
+
}]), (d = je(E.UNIVER_DOC, this._instanceSrv, this._renderManagerService)) == null || d.with(dt).activate(gt, gt);
|
|
1275
1269
|
}));
|
|
1276
1270
|
}
|
|
1277
1271
|
/**
|
|
@@ -1283,112 +1277,112 @@ let We = class extends Ve {
|
|
|
1283
1277
|
* @param scaleX
|
|
1284
1278
|
* @param scaleY
|
|
1285
1279
|
*/
|
|
1286
|
-
_fitTextSize(e, t,
|
|
1280
|
+
_fitTextSize(e, t, i, r, s = 1, o = 1) {
|
|
1287
1281
|
const { startX: a, startY: c, endX: h, endY: l } = e, d = r.documentModel;
|
|
1288
1282
|
if (d == null)
|
|
1289
1283
|
return;
|
|
1290
|
-
const { actualWidth:
|
|
1284
|
+
const { actualWidth: g, actualHeight: p } = this._predictingSize(
|
|
1291
1285
|
e,
|
|
1292
1286
|
t,
|
|
1293
|
-
|
|
1287
|
+
i,
|
|
1294
1288
|
r,
|
|
1295
1289
|
s,
|
|
1296
1290
|
o
|
|
1297
|
-
), { verticalAlign:
|
|
1298
|
-
let _ = h - a,
|
|
1299
|
-
if (_ <
|
|
1300
|
-
|
|
1291
|
+
), { verticalAlign: m, paddingData: f, fill: v } = r;
|
|
1292
|
+
let _ = h - a, I = l - c;
|
|
1293
|
+
if (_ < g && (_ = g), I < p)
|
|
1294
|
+
I = p, d.updateDocumentDataMargin(f);
|
|
1301
1295
|
else {
|
|
1302
|
-
let
|
|
1303
|
-
|
|
1304
|
-
t:
|
|
1296
|
+
let b = 0;
|
|
1297
|
+
m === Oe.MIDDLE ? b = (I - p) / 2 / o : m === Oe.TOP ? b = f.t || 0 : b = (I - p) / o - (f.b || 0), b = b < (f.t || 0) ? f.t || 0 : b, d.updateDocumentDataMargin({
|
|
1298
|
+
t: b
|
|
1305
1299
|
});
|
|
1306
1300
|
}
|
|
1307
|
-
|
|
1301
|
+
i.calculate(), this._editAreaProcessing(_, I, e, t, v, s, o);
|
|
1308
1302
|
}
|
|
1309
1303
|
/**
|
|
1310
1304
|
* Mainly used to pre-calculate the width of the editor,
|
|
1311
1305
|
* to determine whether it needs to be automatically widened.
|
|
1312
1306
|
*/
|
|
1313
|
-
_predictingSize(e, t,
|
|
1314
|
-
const { startX: a, endX: c } = e, { textRotation: h, wrapStrategy: l } = r, d = r.documentModel, { vertexAngle:
|
|
1315
|
-
if (l ===
|
|
1316
|
-
const { actualWidth:
|
|
1307
|
+
_predictingSize(e, t, i, r, s = 1, o = 1) {
|
|
1308
|
+
const { startX: a, endX: c } = e, { textRotation: h, wrapStrategy: l } = r, d = r.documentModel, { vertexAngle: g } = it(h), p = document.body.clientWidth;
|
|
1309
|
+
if (l === Qe.WRAP && g === 0) {
|
|
1310
|
+
const { actualWidth: v, actualHeight: _ } = i.getActualSize();
|
|
1317
1311
|
return {
|
|
1318
|
-
actualWidth:
|
|
1312
|
+
actualWidth: v * s,
|
|
1319
1313
|
actualHeight: _ * o
|
|
1320
1314
|
};
|
|
1321
1315
|
}
|
|
1322
|
-
d == null || d.updateDocumentDataPageSize((
|
|
1323
|
-
const
|
|
1324
|
-
let
|
|
1325
|
-
return
|
|
1326
|
-
horizontalAlign:
|
|
1316
|
+
d == null || d.updateDocumentDataPageSize((p - a - t.left) / s), i.calculate();
|
|
1317
|
+
const m = i.getActualSize();
|
|
1318
|
+
let f = c - a;
|
|
1319
|
+
return f < m.actualWidth * s + ft * s && (f = m.actualWidth * s + ft * s), d == null || d.updateDocumentDataPageSize(f / s), d == null || d.updateDocumentRenderConfig({
|
|
1320
|
+
horizontalAlign: Et.UNSPECIFIED,
|
|
1327
1321
|
cellValueType: void 0
|
|
1328
1322
|
}), {
|
|
1329
|
-
actualWidth:
|
|
1330
|
-
actualHeight:
|
|
1323
|
+
actualWidth: f,
|
|
1324
|
+
actualHeight: m.actualHeight * o
|
|
1331
1325
|
};
|
|
1332
1326
|
}
|
|
1333
1327
|
/**
|
|
1334
1328
|
* control the size of editing area
|
|
1335
1329
|
*/
|
|
1336
1330
|
// eslint-disable-next-line max-lines-per-function
|
|
1337
|
-
_editAreaProcessing(e, t,
|
|
1338
|
-
var
|
|
1331
|
+
_editAreaProcessing(e, t, i, r, s, o = 1, a = 1) {
|
|
1332
|
+
var C;
|
|
1339
1333
|
const c = this._getEditorObject();
|
|
1340
1334
|
if (c == null)
|
|
1341
1335
|
return;
|
|
1342
|
-
function h(
|
|
1343
|
-
return Number.parseInt(
|
|
1336
|
+
function h(se) {
|
|
1337
|
+
return Number.parseInt(se.replace("px", ""));
|
|
1344
1338
|
}
|
|
1345
|
-
const d = this._renderContext.engine.getCanvasElement(),
|
|
1346
|
-
let { startX:
|
|
1347
|
-
|
|
1348
|
-
const { document: w, scene:
|
|
1349
|
-
let
|
|
1350
|
-
|
|
1351
|
-
const { scaleX:
|
|
1352
|
-
|
|
1339
|
+
const d = this._renderContext.engine.getCanvasElement(), g = d.getBoundingClientRect(), p = h(d.style.width), { top: m, left: f, width: v } = g, _ = v / p;
|
|
1340
|
+
let { startX: I, startY: b } = i;
|
|
1341
|
+
I += r.left, b += r.top;
|
|
1342
|
+
const { document: w, scene: M, engine: V } = c, x = M.getViewport(ut.VIEW_MAIN), z = document.body.clientHeight - b - r.top - Dn * 2, re = document.body.clientWidth - I - r.left;
|
|
1343
|
+
let H = t, F = x == null ? void 0 : x.getScrollBar();
|
|
1344
|
+
H > z ? (H = z, F == null ? x && new xt(x, { enableHorizontal: !1, barSize: 8 }) : x == null || x.resetCanvasSizeAndUpdateScroll()) : (F = null, (C = x == null ? void 0 : x.getScrollBar()) == null || C.dispose()), e += (F == null ? void 0 : F.barSize) || 0, e = Math.min(e, re), I -= ie, b -= ie, this._addBackground(M, e / o, t / a, s);
|
|
1345
|
+
const { scaleX: Q, scaleY: ee } = M.getPrecisionScale();
|
|
1346
|
+
M.transformByState({
|
|
1353
1347
|
width: e * _ / o,
|
|
1354
1348
|
height: t * _ / a,
|
|
1355
1349
|
scaleX: o * _,
|
|
1356
1350
|
scaleY: a * _
|
|
1357
1351
|
}), w.resize(e / o, t / a), setTimeout(() => {
|
|
1358
|
-
|
|
1359
|
-
|
|
1360
|
-
|
|
1352
|
+
V.resizeBySize(
|
|
1353
|
+
nt(e, Q),
|
|
1354
|
+
nt(H, ee)
|
|
1361
1355
|
);
|
|
1362
1356
|
}, 0);
|
|
1363
|
-
const
|
|
1364
|
-
|
|
1365
|
-
startX:
|
|
1366
|
-
startY:
|
|
1367
|
-
endX: e * _ +
|
|
1368
|
-
endY:
|
|
1357
|
+
const me = this._layoutService.getContentElement().getBoundingClientRect(), pe = d.getBoundingClientRect();
|
|
1358
|
+
I = I * _ + (pe.left - me.left), b = b * _ + (pe.top - me.top), this._cellEditorManagerService.setState({
|
|
1359
|
+
startX: I,
|
|
1360
|
+
startY: b,
|
|
1361
|
+
endX: e * _ + I,
|
|
1362
|
+
endY: H * _ + b,
|
|
1369
1363
|
show: !0
|
|
1370
1364
|
});
|
|
1371
1365
|
}
|
|
1372
1366
|
/**
|
|
1373
1367
|
* Since the document does not support cell background color, an additional rect needs to be added.
|
|
1374
1368
|
*/
|
|
1375
|
-
_addBackground(e, t,
|
|
1369
|
+
_addBackground(e, t, i, r) {
|
|
1376
1370
|
const s = "_backgroundRectHelperColor_", o = e.getObject(s);
|
|
1377
1371
|
o == null && r == null || (o == null ? e.addObjects(
|
|
1378
1372
|
[
|
|
1379
|
-
new
|
|
1373
|
+
new Rt(s, {
|
|
1380
1374
|
width: t,
|
|
1381
|
-
height:
|
|
1375
|
+
height: i,
|
|
1382
1376
|
fill: r,
|
|
1383
1377
|
evented: !1
|
|
1384
1378
|
})
|
|
1385
1379
|
],
|
|
1386
|
-
|
|
1380
|
+
zi
|
|
1387
1381
|
) : r == null ? o.dispose() : (o.setProps({
|
|
1388
1382
|
fill: r
|
|
1389
1383
|
}), o.transformByState({
|
|
1390
1384
|
width: t,
|
|
1391
|
-
height:
|
|
1385
|
+
height: i
|
|
1392
1386
|
})));
|
|
1393
1387
|
}
|
|
1394
1388
|
/**
|
|
@@ -1400,11 +1394,11 @@ let We = class extends Ve {
|
|
|
1400
1394
|
// first part: startEditing --> _updateEditor
|
|
1401
1395
|
// 2nd part: startEditing --> changeVisible --> slide-editor-bridge.render-controller.ts@changeVisible --> _editorBridgeService.changeVisible
|
|
1402
1396
|
_handleEditorVisible(e) {
|
|
1403
|
-
var
|
|
1397
|
+
var v, _;
|
|
1404
1398
|
const { eventType: t } = e;
|
|
1405
|
-
this._cursorChange = [
|
|
1406
|
-
const
|
|
1407
|
-
if (
|
|
1399
|
+
this._cursorChange = [Z.PointerDown, Z.Dblclick].includes(t) ? G.CursorChange : G.StartEditor;
|
|
1400
|
+
const i = this._editorBridgeService.getEditRectState();
|
|
1401
|
+
if (i == null)
|
|
1408
1402
|
return;
|
|
1409
1403
|
const {
|
|
1410
1404
|
position: r,
|
|
@@ -1414,27 +1408,27 @@ let We = class extends Ve {
|
|
|
1414
1408
|
scaleY: c,
|
|
1415
1409
|
editorUnitId: h,
|
|
1416
1410
|
unitId: l
|
|
1417
|
-
} =
|
|
1411
|
+
} = i, d = this._getEditorObject();
|
|
1418
1412
|
if (d == null)
|
|
1419
1413
|
return;
|
|
1420
|
-
const { scene:
|
|
1421
|
-
this._contextService.setContextValue(
|
|
1422
|
-
const { documentModel:
|
|
1423
|
-
if (!
|
|
1414
|
+
const { scene: g } = d;
|
|
1415
|
+
this._contextService.setContextValue(Ee, !0);
|
|
1416
|
+
const { documentModel: p } = s, m = this._getEditorSkeleton(h);
|
|
1417
|
+
if (!m || !p)
|
|
1424
1418
|
return;
|
|
1425
|
-
this._fitTextSize(r, o,
|
|
1426
|
-
const
|
|
1427
|
-
(
|
|
1419
|
+
this._fitTextSize(r, o, m, s, a, c);
|
|
1420
|
+
const f = p.getBody().dataStream.length - 2 || 0;
|
|
1421
|
+
(v = g.getViewport(ut.VIEW_MAIN)) == null || v.scrollToViewportPos({
|
|
1428
1422
|
viewportScrollX: Number.POSITIVE_INFINITY
|
|
1429
1423
|
}), this._textSelectionManagerService.replaceTextRanges([
|
|
1430
1424
|
{
|
|
1431
|
-
startOffset:
|
|
1432
|
-
endOffset:
|
|
1425
|
+
startOffset: f,
|
|
1426
|
+
endOffset: f
|
|
1433
1427
|
}
|
|
1434
1428
|
]), (_ = this._renderManagerService.getRenderById(l)) == null || _.scene.resetCursor();
|
|
1435
1429
|
}
|
|
1436
1430
|
_resetBodyStyle(e, t = !1) {
|
|
1437
|
-
e.dataStream =
|
|
1431
|
+
e.dataStream = mi, 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 = [
|
|
1438
1432
|
{
|
|
1439
1433
|
startIndex: 0
|
|
1440
1434
|
}
|
|
@@ -1449,14 +1443,14 @@ let We = class extends Ve {
|
|
|
1449
1443
|
_showEditorByKeyboard(e) {
|
|
1450
1444
|
}
|
|
1451
1445
|
_commandExecutedListener(e) {
|
|
1452
|
-
const t = [
|
|
1446
|
+
const t = [ye.id], i = [Wi.id];
|
|
1453
1447
|
e.add(this._commandService.onCommandExecuted((r) => {
|
|
1454
|
-
this._editorService.getFocusId() ===
|
|
1448
|
+
this._editorService.getFocusId() === le && (t.includes(r.id) && this._moveCursorCmdHandler(r), i.includes(r.id) && this._editorBridgeService.isVisible() && this._editingChangedHandler());
|
|
1455
1449
|
}));
|
|
1456
1450
|
}
|
|
1457
1451
|
_moveCursorCmdHandler(e) {
|
|
1458
|
-
const t = e.params, { keycode:
|
|
1459
|
-
|
|
1452
|
+
const t = e.params, { keycode: i, isShift: r } = t;
|
|
1453
|
+
i != null && this._cursorChange === G.CursorChange ? this._moveInEditor(i, r) : this._editorBridgeService.changeVisible(t);
|
|
1460
1454
|
}
|
|
1461
1455
|
_editingChangedHandler() {
|
|
1462
1456
|
const e = this._editorBridgeService.getEditorRect();
|
|
@@ -1464,15 +1458,15 @@ let We = class extends Ve {
|
|
|
1464
1458
|
return;
|
|
1465
1459
|
const t = e.richTextObj;
|
|
1466
1460
|
t.refreshDocumentByDocData(), t.resizeToContentSize();
|
|
1467
|
-
const { unitId:
|
|
1468
|
-
this._handleEditorVisible({ visible: !0, eventType: 3, unitId:
|
|
1461
|
+
const { unitId: i } = this._renderContext;
|
|
1462
|
+
this._handleEditorVisible({ visible: !0, eventType: 3, unitId: i });
|
|
1469
1463
|
}
|
|
1470
1464
|
_getEditorObject() {
|
|
1471
|
-
return
|
|
1465
|
+
return Un(this._editorBridgeService.getCurrentEditorId(), this._renderManagerService);
|
|
1472
1466
|
}
|
|
1473
1467
|
async _handleEditorInvisible(e) {
|
|
1474
1468
|
const { keycode: t } = e;
|
|
1475
|
-
if (this._cursorChange =
|
|
1469
|
+
if (this._cursorChange = G.InitialState, this._exitInput(e), this._editorBridgeService.getEditRectState() == null)
|
|
1476
1470
|
return;
|
|
1477
1471
|
if (this._editorBridgeService.getEditorDirty() === !1) {
|
|
1478
1472
|
this._moveCursor(t);
|
|
@@ -1481,7 +1475,7 @@ let We = class extends Ve {
|
|
|
1481
1475
|
this._moveCursor(t);
|
|
1482
1476
|
}
|
|
1483
1477
|
_exitInput(e) {
|
|
1484
|
-
this._contextService.setContextValue(
|
|
1478
|
+
this._contextService.setContextValue(Ee, !1), this._cellEditorManagerService.setState({
|
|
1485
1479
|
show: e.visible
|
|
1486
1480
|
});
|
|
1487
1481
|
const t = this._editorBridgeService.getCurrentEditorId();
|
|
@@ -1489,24 +1483,24 @@ let We = class extends Ve {
|
|
|
1489
1483
|
}
|
|
1490
1484
|
_moveCursor(e) {
|
|
1491
1485
|
if (e != null)
|
|
1492
|
-
switch (
|
|
1493
|
-
case
|
|
1494
|
-
|
|
1486
|
+
switch (j.LEFT, e) {
|
|
1487
|
+
case P.ENTER:
|
|
1488
|
+
j.DOWN;
|
|
1495
1489
|
break;
|
|
1496
|
-
case
|
|
1497
|
-
|
|
1490
|
+
case P.TAB:
|
|
1491
|
+
j.RIGHT;
|
|
1498
1492
|
break;
|
|
1499
|
-
case
|
|
1500
|
-
|
|
1493
|
+
case P.ARROW_DOWN:
|
|
1494
|
+
j.DOWN;
|
|
1501
1495
|
break;
|
|
1502
|
-
case
|
|
1503
|
-
|
|
1496
|
+
case P.ARROW_UP:
|
|
1497
|
+
j.UP;
|
|
1504
1498
|
break;
|
|
1505
|
-
case
|
|
1506
|
-
|
|
1499
|
+
case P.ARROW_LEFT:
|
|
1500
|
+
j.LEFT;
|
|
1507
1501
|
break;
|
|
1508
|
-
case
|
|
1509
|
-
|
|
1502
|
+
case P.ARROW_RIGHT:
|
|
1503
|
+
j.RIGHT;
|
|
1510
1504
|
break;
|
|
1511
1505
|
}
|
|
1512
1506
|
}
|
|
@@ -1518,41 +1512,41 @@ let We = class extends Ve {
|
|
|
1518
1512
|
const t = this._getEditorObject();
|
|
1519
1513
|
if (!t)
|
|
1520
1514
|
return;
|
|
1521
|
-
const { document:
|
|
1522
|
-
e.add(
|
|
1523
|
-
this._cursorChange ===
|
|
1515
|
+
const { document: i } = t;
|
|
1516
|
+
e.add(Ct(i.onPointerDown$.subscribeEvent(() => {
|
|
1517
|
+
this._cursorChange === G.StartEditor && (this._cursorChange = G.CursorChange);
|
|
1524
1518
|
})));
|
|
1525
1519
|
}
|
|
1526
1520
|
// TODO: @JOCS, is it necessary to move these commands MoveSelectionOperation\MoveCursorOperation to shortcut? and use multi-commands?
|
|
1527
1521
|
_moveInEditor(e, t) {
|
|
1528
|
-
let
|
|
1529
|
-
e ===
|
|
1530
|
-
direction:
|
|
1531
|
-
}) : this._commandService.executeCommand(
|
|
1532
|
-
direction:
|
|
1522
|
+
let i = j.LEFT;
|
|
1523
|
+
e === P.ARROW_DOWN ? i = j.DOWN : e === P.ARROW_UP ? i = j.UP : e === P.ARROW_RIGHT && (i = j.RIGHT), t ? this._commandService.executeCommand(ki.id, {
|
|
1524
|
+
direction: i
|
|
1525
|
+
}) : this._commandService.executeCommand(Ki.id, {
|
|
1526
|
+
direction: i
|
|
1533
1527
|
});
|
|
1534
1528
|
}
|
|
1535
1529
|
};
|
|
1536
|
-
|
|
1537
|
-
|
|
1538
|
-
|
|
1539
|
-
|
|
1540
|
-
|
|
1541
|
-
|
|
1542
|
-
|
|
1543
|
-
|
|
1544
|
-
|
|
1545
|
-
|
|
1546
|
-
|
|
1547
|
-
|
|
1548
|
-
],
|
|
1549
|
-
function
|
|
1550
|
-
if (
|
|
1530
|
+
$e = Nn([
|
|
1531
|
+
L(1, yi),
|
|
1532
|
+
L(2, gi),
|
|
1533
|
+
L(3, ve),
|
|
1534
|
+
L(4, y),
|
|
1535
|
+
L(5, X),
|
|
1536
|
+
L(6, Ye),
|
|
1537
|
+
L(7, Ze),
|
|
1538
|
+
L(8, K(Fi)),
|
|
1539
|
+
L(9, U),
|
|
1540
|
+
L(10, K(J)),
|
|
1541
|
+
L(11, Ke)
|
|
1542
|
+
], $e);
|
|
1543
|
+
function Un(n, e) {
|
|
1544
|
+
if (n == null)
|
|
1551
1545
|
return;
|
|
1552
|
-
const t = e.getRenderById(
|
|
1546
|
+
const t = e.getRenderById(n);
|
|
1553
1547
|
if (t == null)
|
|
1554
1548
|
return;
|
|
1555
|
-
const { mainComponent:
|
|
1549
|
+
const { mainComponent: i, scene: r, engine: s, components: o } = t, a = i, c = o.get(Xi.BACKGROUND);
|
|
1556
1550
|
return {
|
|
1557
1551
|
document: a,
|
|
1558
1552
|
docBackground: c,
|
|
@@ -1560,13 +1554,13 @@ function Gi(i, e) {
|
|
|
1560
1554
|
engine: s
|
|
1561
1555
|
};
|
|
1562
1556
|
}
|
|
1563
|
-
var
|
|
1564
|
-
for (var r =
|
|
1565
|
-
(o =
|
|
1557
|
+
var Vn = Object.getOwnPropertyDescriptor, jn = (n, e, t, i) => {
|
|
1558
|
+
for (var r = i > 1 ? void 0 : i ? Vn(e, t) : e, s = n.length - 1, o; s >= 0; s--)
|
|
1559
|
+
(o = n[s]) && (r = o(r) || r);
|
|
1566
1560
|
return r;
|
|
1567
|
-
},
|
|
1568
|
-
let
|
|
1569
|
-
constructor(e, t,
|
|
1561
|
+
}, Ue = (n, e) => (t, i) => e(t, i, n);
|
|
1562
|
+
let He = class extends he {
|
|
1563
|
+
constructor(e, t, i, r) {
|
|
1570
1564
|
super();
|
|
1571
1565
|
/**
|
|
1572
1566
|
* It is used to distinguish whether the user has actively moved the cursor in the editor, mainly through mouse clicks.
|
|
@@ -1574,15 +1568,15 @@ let ze = class extends pe {
|
|
|
1574
1568
|
// private _cursorChange: CursorChange = CursorChange.InitialState;
|
|
1575
1569
|
/** If the corresponding unit is active and prepared for editing. */
|
|
1576
1570
|
// private _isUnitEditing = false;
|
|
1577
|
-
|
|
1578
|
-
|
|
1579
|
-
|
|
1580
|
-
this._renderContext = e, this._instanceSrv = t, this._commandService =
|
|
1571
|
+
S(this, "setSlideTextEditor$", new Tt());
|
|
1572
|
+
S(this, "_curRichText", null);
|
|
1573
|
+
S(this, "_d");
|
|
1574
|
+
this._renderContext = e, this._instanceSrv = t, this._commandService = i, this._editorBridgeService = r, this.disposeWithMe(this._instanceSrv.getCurrentTypeOfUnit$(E.UNIVER_SLIDE).subscribe((s) => {
|
|
1581
1575
|
s && s.getUnitId() === this._renderContext.unitId ? this._d = this._init() : this._disposeCurrent();
|
|
1582
1576
|
}));
|
|
1583
1577
|
}
|
|
1584
1578
|
_init() {
|
|
1585
|
-
const e = new
|
|
1579
|
+
const e = new ke();
|
|
1586
1580
|
return this._initEventListener(e), e;
|
|
1587
1581
|
}
|
|
1588
1582
|
_disposeCurrent() {
|
|
@@ -1591,8 +1585,8 @@ let ze = class extends pe {
|
|
|
1591
1585
|
}
|
|
1592
1586
|
_setEditorRect(e, t) {
|
|
1593
1587
|
this._curRichText = t;
|
|
1594
|
-
const { scene:
|
|
1595
|
-
scene:
|
|
1588
|
+
const { scene: i, engine: r } = this._renderContext, s = this._renderContext.unitId, o = {
|
|
1589
|
+
scene: i,
|
|
1596
1590
|
engine: r,
|
|
1597
1591
|
unitId: s,
|
|
1598
1592
|
pageId: e,
|
|
@@ -1610,15 +1604,15 @@ let ze = class extends pe {
|
|
|
1610
1604
|
})), e.add(o.onDblclick$.subscribeEvent(() => {
|
|
1611
1605
|
a.clearControls();
|
|
1612
1606
|
const h = a.getSelectedObjectMap().values().next().value;
|
|
1613
|
-
h && (h.objectType !==
|
|
1607
|
+
h && (h.objectType !== ce.RICH_TEXT ? this.pickOtherObjects() : this.startEditing(o.sceneKey, h));
|
|
1614
1608
|
})), e.add(this._instanceSrv.focused$.subscribe((c) => {
|
|
1615
1609
|
this.endEditing();
|
|
1616
1610
|
})));
|
|
1617
|
-
}, { mainComponent:
|
|
1618
|
-
|
|
1611
|
+
}, { mainComponent: i } = this._renderContext;
|
|
1612
|
+
i.subSceneChanged$.subscribeEvent((o) => {
|
|
1619
1613
|
t(o);
|
|
1620
1614
|
});
|
|
1621
|
-
const s = Array.from(
|
|
1615
|
+
const s = Array.from(i.getSubScenes().values());
|
|
1622
1616
|
for (let o = 0; o < s.length; o++) {
|
|
1623
1617
|
const a = s[o];
|
|
1624
1618
|
t(a);
|
|
@@ -1639,20 +1633,20 @@ let ze = class extends pe {
|
|
|
1639
1633
|
const e = this._curRichText;
|
|
1640
1634
|
if (!this._instanceSrv.getCurrentUnitForType(E.UNIVER_SLIDE)) return !1;
|
|
1641
1635
|
e.refreshDocumentByDocData(), e.resizeToContentSize(), this._editorBridgeService.endEditing$.next(e);
|
|
1642
|
-
const
|
|
1636
|
+
const i = {
|
|
1643
1637
|
bl: 1,
|
|
1644
1638
|
fs: e.fs,
|
|
1645
1639
|
text: e.text
|
|
1646
1640
|
}, r = (s = e.documentData.body) == null ? void 0 : s.textRuns;
|
|
1647
1641
|
if (r && r.length) {
|
|
1648
1642
|
const a = r[0].ts;
|
|
1649
|
-
|
|
1643
|
+
i.cl = a == null ? void 0 : a.cl;
|
|
1650
1644
|
}
|
|
1651
|
-
this._commandService.executeCommand(
|
|
1645
|
+
this._commandService.executeCommand(W.id, {
|
|
1652
1646
|
unitId: this._renderContext.unitId,
|
|
1653
1647
|
oKey: e == null ? void 0 : e.oKey,
|
|
1654
1648
|
props: {
|
|
1655
|
-
richText:
|
|
1649
|
+
richText: i
|
|
1656
1650
|
}
|
|
1657
1651
|
}), this._curRichText = null;
|
|
1658
1652
|
}
|
|
@@ -1667,100 +1661,100 @@ let ze = class extends pe {
|
|
|
1667
1661
|
this._setEditorRect(e, t), this.setEditorVisible(!0);
|
|
1668
1662
|
}
|
|
1669
1663
|
setEditorVisible(e) {
|
|
1670
|
-
var
|
|
1671
|
-
e ? (
|
|
1664
|
+
var i, r;
|
|
1665
|
+
e ? (i = this._curRichText) == null || i.hide() : (r = this._curRichText) == null || r.show();
|
|
1672
1666
|
const { unitId: t } = this._renderContext;
|
|
1673
|
-
this._editorBridgeService.changeVisible({ visible: e, eventType:
|
|
1667
|
+
this._editorBridgeService.changeVisible({ visible: e, eventType: Z.PointerDown, unitId: t });
|
|
1674
1668
|
}
|
|
1675
1669
|
};
|
|
1676
|
-
|
|
1677
|
-
|
|
1678
|
-
|
|
1679
|
-
|
|
1680
|
-
],
|
|
1681
|
-
const
|
|
1670
|
+
He = jn([
|
|
1671
|
+
Ue(1, y),
|
|
1672
|
+
Ue(2, U),
|
|
1673
|
+
Ue(3, Ye)
|
|
1674
|
+
], He);
|
|
1675
|
+
const zt = {
|
|
1682
1676
|
id: "slide.operation.activate-slide",
|
|
1683
|
-
type:
|
|
1684
|
-
handler: (
|
|
1677
|
+
type: D.OPERATION,
|
|
1678
|
+
handler: (n, e) => {
|
|
1685
1679
|
var h, l;
|
|
1686
|
-
const t = e.unitId,
|
|
1680
|
+
const t = e.unitId, i = n.get(T), s = n.get(y).getUnit(t), o = (h = s == null ? void 0 : s.getActivePage()) == null ? void 0 : h.id;
|
|
1687
1681
|
if (!o) return !1;
|
|
1688
|
-
const a =
|
|
1682
|
+
const a = i.getRenderUnitByPageId(o, t);
|
|
1689
1683
|
if (!a) return !1;
|
|
1690
1684
|
const c = (l = a.scene) == null ? void 0 : l.getTransformer();
|
|
1691
|
-
return c && c.clearControls(),
|
|
1685
|
+
return c && c.clearControls(), i.activePage(e.id, t), !0;
|
|
1692
1686
|
}
|
|
1693
|
-
},
|
|
1687
|
+
}, kt = {
|
|
1694
1688
|
id: "slide.operation.append-slide",
|
|
1695
|
-
type:
|
|
1696
|
-
handler: (
|
|
1689
|
+
type: D.OPERATION,
|
|
1690
|
+
handler: (n, e) => {
|
|
1697
1691
|
const t = e.unitId;
|
|
1698
|
-
return
|
|
1692
|
+
return n.get(y).getUnit(t) ? (n.get(T).appendPage(t), !0) : !1;
|
|
1699
1693
|
}
|
|
1700
|
-
},
|
|
1694
|
+
}, qe = {
|
|
1701
1695
|
id: "slide.command.insert-float-image",
|
|
1702
|
-
type:
|
|
1703
|
-
handler: async (
|
|
1704
|
-
var
|
|
1705
|
-
const t =
|
|
1706
|
-
if (!
|
|
1707
|
-
const s = await
|
|
1696
|
+
type: D.COMMAND,
|
|
1697
|
+
handler: async (n, e) => {
|
|
1698
|
+
var V;
|
|
1699
|
+
const t = n.get(y), i = (V = t.getCurrentUnitForType(E.UNIVER_SLIDE)) == null ? void 0 : V.getUnitId();
|
|
1700
|
+
if (!i) return !1;
|
|
1701
|
+
const s = await n.get(Pi).openFile({
|
|
1708
1702
|
multiple: !0,
|
|
1709
|
-
accept:
|
|
1703
|
+
accept: Yi.map((x) => `.${x.replace("image/", "")}`).join(",")
|
|
1710
1704
|
});
|
|
1711
1705
|
if (s.length !== 1) return !1;
|
|
1712
|
-
const a = await
|
|
1706
|
+
const a = await n.get(Zi).saveImage(s[0]);
|
|
1713
1707
|
if (!a) return !1;
|
|
1714
|
-
const { imageId: c, imageSourceType: h, source: l, base64Cache: d } = a, { width:
|
|
1715
|
-
if (!
|
|
1716
|
-
const
|
|
1708
|
+
const { imageId: c, imageSourceType: h, source: l, base64Cache: d } = a, { width: g, height: p, image: m } = await qi(d || ""), f = t.getUnit(i);
|
|
1709
|
+
if (!f) return !1;
|
|
1710
|
+
const v = f.getActivePage(), _ = Object.values(v.pageElements), I = _ != null && _.length ? Math.max(..._.map((x) => x.zIndex)) : 20, b = {
|
|
1717
1711
|
id: c,
|
|
1718
|
-
zIndex:
|
|
1712
|
+
zIndex: I + 1,
|
|
1719
1713
|
left: 0,
|
|
1720
1714
|
top: 0,
|
|
1721
|
-
width:
|
|
1722
|
-
height:
|
|
1715
|
+
width: g,
|
|
1716
|
+
height: p,
|
|
1723
1717
|
title: "",
|
|
1724
1718
|
description: "",
|
|
1725
|
-
type:
|
|
1719
|
+
type: ze.IMAGE,
|
|
1726
1720
|
image: {
|
|
1727
1721
|
imageProperties: {
|
|
1728
1722
|
contentUrl: d,
|
|
1729
1723
|
imageSourceType: h,
|
|
1730
1724
|
source: l,
|
|
1731
1725
|
base64Cache: d,
|
|
1732
|
-
image:
|
|
1726
|
+
image: m
|
|
1733
1727
|
}
|
|
1734
1728
|
}
|
|
1735
1729
|
};
|
|
1736
|
-
|
|
1737
|
-
const w =
|
|
1738
|
-
return
|
|
1730
|
+
v.pageElements[c] = b, f.updatePage(v.id, v);
|
|
1731
|
+
const w = n.get(T), M = w.createObjectToPage(b, v.id, i);
|
|
1732
|
+
return M && w.setObjectActiveByPage(M, v.id, i), !0;
|
|
1739
1733
|
}
|
|
1740
|
-
},
|
|
1734
|
+
}, Je = {
|
|
1741
1735
|
id: "slide.command.add-text",
|
|
1742
|
-
type:
|
|
1743
|
-
handler: async (
|
|
1736
|
+
type: D.COMMAND,
|
|
1737
|
+
handler: async (n) => {
|
|
1744
1738
|
var r;
|
|
1745
|
-
const e =
|
|
1746
|
-
return await e.executeCommand(
|
|
1739
|
+
const e = n.get(U), i = (r = n.get(y).getFocusedUnit()) == null ? void 0 : r.getUnitId();
|
|
1740
|
+
return await e.executeCommand(Kt.id, { unitId: i });
|
|
1747
1741
|
}
|
|
1748
|
-
},
|
|
1742
|
+
}, Kt = {
|
|
1749
1743
|
id: "slide.operation.add-text",
|
|
1750
|
-
type:
|
|
1751
|
-
handler: async (
|
|
1752
|
-
const t = e.unitId,
|
|
1744
|
+
type: D.OPERATION,
|
|
1745
|
+
handler: async (n, e) => {
|
|
1746
|
+
const t = e.unitId, i = _t(6), r = 220, s = 40, o = 230, a = 142, c = (e == null ? void 0 : e.text) || "A New Text", l = n.get(y).getUnit(t);
|
|
1753
1747
|
if (!l) return !1;
|
|
1754
|
-
const d = l.getActivePage(),
|
|
1755
|
-
id:
|
|
1756
|
-
zIndex:
|
|
1748
|
+
const d = l.getActivePage(), g = Object.values(d.pageElements), p = g != null && g.length ? Math.max(...g.map((_) => _.zIndex)) : 21, m = {
|
|
1749
|
+
id: i,
|
|
1750
|
+
zIndex: p + 1,
|
|
1757
1751
|
left: o,
|
|
1758
1752
|
top: a,
|
|
1759
1753
|
width: r,
|
|
1760
1754
|
height: s,
|
|
1761
1755
|
title: "text",
|
|
1762
1756
|
description: "",
|
|
1763
|
-
type:
|
|
1757
|
+
type: ze.TEXT,
|
|
1764
1758
|
richText: {
|
|
1765
1759
|
text: c,
|
|
1766
1760
|
fs: 30,
|
|
@@ -1770,78 +1764,75 @@ const Xt = {
|
|
|
1770
1764
|
bl: 1
|
|
1771
1765
|
}
|
|
1772
1766
|
};
|
|
1773
|
-
d.pageElements[
|
|
1774
|
-
const
|
|
1775
|
-
return
|
|
1767
|
+
d.pageElements[i] = m, l.updatePage(d.id, d);
|
|
1768
|
+
const f = n.get(T), v = f.createObjectToPage(m, d.id, t);
|
|
1769
|
+
return v && f.setObjectActiveByPage(v, d.id, t), !0;
|
|
1776
1770
|
}
|
|
1777
|
-
},
|
|
1771
|
+
}, Xt = {
|
|
1778
1772
|
id: "slide.operation.set-slide-page-thumb",
|
|
1779
|
-
type:
|
|
1780
|
-
handler: (
|
|
1781
|
-
}, Zi = "univer-image-popup-menu", qi = "univer-image-popup-menu-item", Ji = "univer-image-popup-menu-item-title", Qi = "univer-btn-container", er = "univer-btn-container-expand", ue = {
|
|
1782
|
-
imagePopupMenu: Zi,
|
|
1783
|
-
imagePopupMenuItem: qi,
|
|
1784
|
-
imagePopupMenuItemTitle: Ji,
|
|
1785
|
-
btnContainer: Qi,
|
|
1786
|
-
btnContainerExpand: er
|
|
1773
|
+
type: D.OPERATION,
|
|
1774
|
+
handler: (n, e) => (n.get(T).createThumbs(e.unitId), !0)
|
|
1787
1775
|
};
|
|
1788
|
-
function
|
|
1789
|
-
var
|
|
1790
|
-
const e = (
|
|
1776
|
+
function Ln(n) {
|
|
1777
|
+
var m, f;
|
|
1778
|
+
const e = (f = (m = n.popup) == null ? void 0 : m.extraProps) == null ? void 0 : f.menuItems;
|
|
1791
1779
|
if (!e)
|
|
1792
1780
|
return null;
|
|
1793
|
-
const t =
|
|
1781
|
+
const t = R(U), i = R(J), [r, s] = k(!1), [o, a] = k(!1), c = () => {
|
|
1794
1782
|
a(!0);
|
|
1795
1783
|
}, h = () => {
|
|
1796
1784
|
a(!1);
|
|
1797
|
-
}, l = (
|
|
1798
|
-
s(
|
|
1799
|
-
}, d = (
|
|
1800
|
-
t.executeCommand(
|
|
1801
|
-
},
|
|
1785
|
+
}, l = (v) => {
|
|
1786
|
+
s(v);
|
|
1787
|
+
}, d = (v) => {
|
|
1788
|
+
t.executeCommand(v.commandId, v.commandParams), s(!1);
|
|
1789
|
+
}, g = r || o, p = e.filter((v) => !v.disable);
|
|
1802
1790
|
return /* @__PURE__ */ u(
|
|
1803
1791
|
"div",
|
|
1804
1792
|
{
|
|
1805
1793
|
onMouseEnter: c,
|
|
1806
1794
|
onMouseLeave: h,
|
|
1807
1795
|
children: /* @__PURE__ */ u(
|
|
1808
|
-
|
|
1796
|
+
Pt,
|
|
1809
1797
|
{
|
|
1810
1798
|
align: "start",
|
|
1811
1799
|
overlay: /* @__PURE__ */ u(
|
|
1812
1800
|
"ul",
|
|
1813
1801
|
{
|
|
1814
|
-
className:
|
|
1815
|
-
univer-box-border univer-
|
|
1816
|
-
|
|
1817
|
-
|
|
1802
|
+
className: `
|
|
1803
|
+
univer-m-0 univer-box-border univer-grid univer-list-none univer-items-center univer-gap-1
|
|
1804
|
+
univer-rounded-lg univer-border univer-border-solid univer-border-gray-200 univer-bg-white
|
|
1805
|
+
univer-p-1.5 univer-text-sm univer-shadow-lg
|
|
1806
|
+
`,
|
|
1807
|
+
children: p.map((v) => /* @__PURE__ */ u(
|
|
1818
1808
|
"li",
|
|
1819
1809
|
{
|
|
1820
|
-
|
|
1821
|
-
|
|
1822
|
-
|
|
1810
|
+
className: `
|
|
1811
|
+
univer-relative univer-box-border univer-flex univer-h-8 univer-cursor-pointer
|
|
1812
|
+
univer-items-center univer-rounded univer-text-sm univer-transition-colors
|
|
1813
|
+
hover:univer-bg-gray-100
|
|
1814
|
+
`,
|
|
1815
|
+
onClick: () => d(v),
|
|
1816
|
+
children: /* @__PURE__ */ u("span", { className: "univer-px-2 univer-py-1.5 univer-align-middle", children: i.t(v.label) })
|
|
1823
1817
|
},
|
|
1824
|
-
|
|
1818
|
+
v.index
|
|
1825
1819
|
))
|
|
1826
1820
|
}
|
|
1827
1821
|
),
|
|
1828
1822
|
open: r,
|
|
1829
1823
|
onOpenChange: l,
|
|
1830
|
-
children: /* @__PURE__ */
|
|
1824
|
+
children: /* @__PURE__ */ O(
|
|
1831
1825
|
"div",
|
|
1832
1826
|
{
|
|
1833
|
-
className:
|
|
1834
|
-
|
|
1827
|
+
className: Le(`
|
|
1828
|
+
univer-flex univer-items-center univer-justify-center univer-rounded univer-border
|
|
1829
|
+
univer-border-solid univer-border-gray-200 univer-bg-white univer-p-1
|
|
1830
|
+
`, {
|
|
1831
|
+
"univer-bg-gray-100": r
|
|
1835
1832
|
}),
|
|
1836
1833
|
children: [
|
|
1837
|
-
/* @__PURE__ */ u(
|
|
1838
|
-
|
|
1839
|
-
{
|
|
1840
|
-
style: { color: "#35322B" },
|
|
1841
|
-
extend: { colorChannel1: "rgb(var(--green-700, #409f11))" }
|
|
1842
|
-
}
|
|
1843
|
-
),
|
|
1844
|
-
v && /* @__PURE__ */ u(Ze, { style: { color: "#CCCCCC", fontSize: "8px", marginLeft: "8px" } })
|
|
1834
|
+
/* @__PURE__ */ u(Ut, { className: "univer-fill-green-500 univer-text-gray-900" }),
|
|
1835
|
+
g && /* @__PURE__ */ u(Xe, { className: "univer-text-[10px] univer-text-gray-400" })
|
|
1845
1836
|
]
|
|
1846
1837
|
}
|
|
1847
1838
|
)
|
|
@@ -1850,423 +1841,446 @@ function tr(i) {
|
|
|
1850
1841
|
}
|
|
1851
1842
|
);
|
|
1852
1843
|
}
|
|
1853
|
-
|
|
1854
|
-
|
|
1855
|
-
|
|
1856
|
-
slideBarContentHeader: rr,
|
|
1857
|
-
slideBarItem: sr,
|
|
1858
|
-
slideBarBox: or,
|
|
1859
|
-
slideBarItemActive: ar
|
|
1860
|
-
};
|
|
1861
|
-
function cr() {
|
|
1862
|
-
var C, p;
|
|
1863
|
-
const i = x(T), e = x(B), t = x(Y), 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();
|
|
1844
|
+
function An() {
|
|
1845
|
+
var m, f;
|
|
1846
|
+
const n = R(y), e = R(U), t = R(X), i = R(J), r = wt(null), s = n.getCurrentUnitForType(E.UNIVER_SLIDE), o = s == null ? void 0 : s.getPages(), a = s == null ? void 0 : s.getPageOrder();
|
|
1864
1847
|
if (!o || !a)
|
|
1865
1848
|
return null;
|
|
1866
|
-
const c = a.map((
|
|
1867
|
-
|
|
1868
|
-
const
|
|
1869
|
-
var
|
|
1870
|
-
const
|
|
1871
|
-
|
|
1849
|
+
const c = a.map((v) => o[v]), [h, l] = k((f = (m = s == null ? void 0 : s.getActivePage()) == null ? void 0 : m.id) != null ? f : null), d = Bi(() => c.map(() => $i()), [c]);
|
|
1850
|
+
de(() => {
|
|
1851
|
+
const v = s == null ? void 0 : s.activePage$.subscribe((_) => {
|
|
1852
|
+
var b;
|
|
1853
|
+
const I = (b = _ == null ? void 0 : _.id) != null ? b : null;
|
|
1854
|
+
I && l(I);
|
|
1872
1855
|
});
|
|
1873
1856
|
return () => {
|
|
1874
|
-
|
|
1857
|
+
v == null || v.unsubscribe();
|
|
1875
1858
|
};
|
|
1876
|
-
}, []),
|
|
1877
|
-
d.forEach((
|
|
1878
|
-
var
|
|
1879
|
-
if (
|
|
1880
|
-
const
|
|
1881
|
-
(
|
|
1859
|
+
}, []), de(() => {
|
|
1860
|
+
d.forEach((v, _) => {
|
|
1861
|
+
var I;
|
|
1862
|
+
if (v.current) {
|
|
1863
|
+
const b = c[_];
|
|
1864
|
+
(I = t.getRenderById(b.id)) == null || I.engine.setContainer(v.current);
|
|
1882
1865
|
}
|
|
1883
|
-
}), d.length > 0 && e.syncExecuteCommand(
|
|
1866
|
+
}), d.length > 0 && e.syncExecuteCommand(Xt.id, { unitId: s == null ? void 0 : s.getUnitId() });
|
|
1884
1867
|
}, [d, c, t, e, s]);
|
|
1885
|
-
const
|
|
1886
|
-
e.syncExecuteCommand(
|
|
1887
|
-
}, [e, s]),
|
|
1888
|
-
e.syncExecuteCommand(
|
|
1868
|
+
const g = at((v) => {
|
|
1869
|
+
e.syncExecuteCommand(zt.id, { id: v, unitId: s == null ? void 0 : s.getUnitId() });
|
|
1870
|
+
}, [e, s]), p = at(() => {
|
|
1871
|
+
e.syncExecuteCommand(kt.id, { unitId: s == null ? void 0 : s.getUnitId() });
|
|
1889
1872
|
}, [e, s]);
|
|
1890
|
-
return /* @__PURE__ */ u(
|
|
1891
|
-
|
|
1892
|
-
|
|
1893
|
-
|
|
1894
|
-
|
|
1895
|
-
|
|
1896
|
-
|
|
1897
|
-
|
|
1898
|
-
|
|
1899
|
-
|
|
1900
|
-
|
|
1901
|
-
|
|
1902
|
-
|
|
1903
|
-
|
|
1904
|
-
|
|
1905
|
-
|
|
1906
|
-
|
|
1873
|
+
return /* @__PURE__ */ u(
|
|
1874
|
+
"aside",
|
|
1875
|
+
{
|
|
1876
|
+
ref: r,
|
|
1877
|
+
className: Le(`
|
|
1878
|
+
univer-flex univer-h-full univer-w-64 univer-flex-col univer-overflow-y-auto univer-overflow-x-hidden
|
|
1879
|
+
`, Li),
|
|
1880
|
+
children: /* @__PURE__ */ O("div", { className: "univer-px-4", children: [
|
|
1881
|
+
/* @__PURE__ */ u("header", { className: "univer-flex univer-justify-center univer-pt-4", children: /* @__PURE__ */ u(
|
|
1882
|
+
"a",
|
|
1883
|
+
{
|
|
1884
|
+
className: `
|
|
1885
|
+
univer-box-border univer-block univer-h-8 univer-w-full univer-cursor-pointer
|
|
1886
|
+
univer-rounded-md univer-border univer-border-solid univer-border-gray-200 univer-bg-white
|
|
1887
|
+
univer-text-center univer-text-sm univer-leading-8 univer-transition-colors
|
|
1888
|
+
`,
|
|
1889
|
+
onClick: p,
|
|
1890
|
+
children: i.t("slide.append")
|
|
1891
|
+
}
|
|
1892
|
+
) }),
|
|
1893
|
+
c.map((v, _) => /* @__PURE__ */ O(
|
|
1894
|
+
"div",
|
|
1895
|
+
{
|
|
1896
|
+
className: Le("univer-my-4 univer-flex univer-gap-2", {
|
|
1897
|
+
"[&>div]:univer-border-primary-600 [&>span]:univer-text-primary-600": v.id === h
|
|
1898
|
+
}),
|
|
1899
|
+
onClick: () => g(v.id),
|
|
1900
|
+
children: [
|
|
1901
|
+
/* @__PURE__ */ u("span", { children: _ + 1 }),
|
|
1902
|
+
/* @__PURE__ */ u(
|
|
1903
|
+
"div",
|
|
1904
|
+
{
|
|
1905
|
+
ref: d[_],
|
|
1906
|
+
className: `
|
|
1907
|
+
univer-relative univer-box-border univer-h-32 univer-w-52 univer-border
|
|
1908
|
+
univer-border-solid univer-border-gray-200 univer-bg-white
|
|
1909
|
+
hover:univer-border-primary-600
|
|
1910
|
+
`
|
|
1911
|
+
}
|
|
1912
|
+
)
|
|
1913
|
+
]
|
|
1914
|
+
},
|
|
1915
|
+
v.id
|
|
1916
|
+
))
|
|
1917
|
+
] })
|
|
1918
|
+
}
|
|
1919
|
+
);
|
|
1907
1920
|
}
|
|
1908
|
-
const
|
|
1909
|
-
slideEditorContainer: lr
|
|
1910
|
-
}, Ne = -1e3, _t = {
|
|
1921
|
+
const Pe = -1e3, mt = {
|
|
1911
1922
|
width: 0,
|
|
1912
1923
|
height: 0,
|
|
1913
|
-
top:
|
|
1914
|
-
left:
|
|
1915
|
-
},
|
|
1916
|
-
const [
|
|
1917
|
-
...
|
|
1918
|
-
}), t =
|
|
1919
|
-
() => r.subscribeContextValue$(
|
|
1924
|
+
top: Pe,
|
|
1925
|
+
left: Pe
|
|
1926
|
+
}, Bn = () => {
|
|
1927
|
+
const [n, e] = k({
|
|
1928
|
+
...mt
|
|
1929
|
+
}), t = R(Ze), i = R(Ke), r = R(ve), s = wi(
|
|
1930
|
+
() => r.subscribeContextValue$(rt),
|
|
1920
1931
|
!1,
|
|
1921
1932
|
void 0,
|
|
1922
|
-
[r,
|
|
1933
|
+
[r, rt]
|
|
1923
1934
|
);
|
|
1924
|
-
return
|
|
1935
|
+
return pi.UNSPECIFIED, de(() => {
|
|
1925
1936
|
t.state$.subscribe((o) => {
|
|
1926
1937
|
if (o == null)
|
|
1927
1938
|
return;
|
|
1928
1939
|
const {
|
|
1929
|
-
startX: a =
|
|
1930
|
-
startY: c =
|
|
1940
|
+
startX: a = Pe,
|
|
1941
|
+
startY: c = Pe,
|
|
1931
1942
|
endX: h = 0,
|
|
1932
1943
|
endY: l = 0,
|
|
1933
1944
|
show: d = !1
|
|
1934
1945
|
} = o;
|
|
1935
1946
|
if (!d)
|
|
1936
1947
|
e({
|
|
1937
|
-
...
|
|
1948
|
+
...mt
|
|
1938
1949
|
});
|
|
1939
1950
|
else {
|
|
1940
1951
|
e({
|
|
1941
|
-
width: h - a -
|
|
1942
|
-
height: l - c -
|
|
1943
|
-
left: a +
|
|
1944
|
-
top: c +
|
|
1952
|
+
width: h - a - ie + 2,
|
|
1953
|
+
height: l - c - ie + 2,
|
|
1954
|
+
left: a + ie,
|
|
1955
|
+
top: c + ie
|
|
1945
1956
|
});
|
|
1946
|
-
const
|
|
1947
|
-
if (
|
|
1957
|
+
const g = i.getEditor(le);
|
|
1958
|
+
if (g == null)
|
|
1948
1959
|
return;
|
|
1949
|
-
const { left:
|
|
1950
|
-
t.setRect({ left:
|
|
1960
|
+
const { left: p, top: m, width: f, height: v } = g.getBoundingClientRect();
|
|
1961
|
+
t.setRect({ left: p, top: m, width: f, height: v });
|
|
1951
1962
|
}
|
|
1952
1963
|
});
|
|
1953
|
-
}, []),
|
|
1964
|
+
}, []), de(() => {
|
|
1954
1965
|
s || t.setFocus(!0);
|
|
1955
|
-
}, [s,
|
|
1966
|
+
}, [s, n]), /* @__PURE__ */ u(
|
|
1956
1967
|
"div",
|
|
1957
1968
|
{
|
|
1958
|
-
className:
|
|
1969
|
+
className: `
|
|
1970
|
+
univer-absolute univer-z-10 univer-box-border univer-flex univer-border univer-border-solid
|
|
1971
|
+
univer-border-gray-200
|
|
1972
|
+
`,
|
|
1959
1973
|
style: {
|
|
1960
|
-
left:
|
|
1961
|
-
top:
|
|
1962
|
-
width:
|
|
1963
|
-
height:
|
|
1974
|
+
left: n.left,
|
|
1975
|
+
top: n.top,
|
|
1976
|
+
width: n.width,
|
|
1977
|
+
height: n.height
|
|
1964
1978
|
}
|
|
1965
1979
|
}
|
|
1966
1980
|
);
|
|
1967
|
-
},
|
|
1968
|
-
function
|
|
1981
|
+
}, Gt = "addition-and-subtraction-single", Yt = "slide.menu.image";
|
|
1982
|
+
function $n(n) {
|
|
1969
1983
|
return {
|
|
1970
|
-
id:
|
|
1971
|
-
type:
|
|
1972
|
-
icon:
|
|
1984
|
+
id: Yt,
|
|
1985
|
+
type: fe.SUBITEMS,
|
|
1986
|
+
icon: Gt,
|
|
1973
1987
|
tooltip: "slide.image.insert.title",
|
|
1974
|
-
hidden$:
|
|
1988
|
+
hidden$: ge(n, E.UNIVER_SLIDE)
|
|
1975
1989
|
};
|
|
1976
1990
|
}
|
|
1977
|
-
function
|
|
1991
|
+
function Hn(n) {
|
|
1978
1992
|
return {
|
|
1979
|
-
id:
|
|
1993
|
+
id: qe.id,
|
|
1980
1994
|
title: "slide.image.insert.float",
|
|
1981
|
-
type:
|
|
1982
|
-
hidden$:
|
|
1995
|
+
type: fe.BUTTON,
|
|
1996
|
+
hidden$: ge(n, E.UNIVER_SLIDE)
|
|
1983
1997
|
};
|
|
1984
1998
|
}
|
|
1985
|
-
const
|
|
1986
|
-
function
|
|
1999
|
+
const Zt = "graph-single", qt = "slide.menu.shape";
|
|
2000
|
+
function Fn(n) {
|
|
1987
2001
|
return {
|
|
1988
|
-
id:
|
|
1989
|
-
type:
|
|
1990
|
-
icon:
|
|
2002
|
+
id: qt,
|
|
2003
|
+
type: fe.SUBITEMS,
|
|
2004
|
+
icon: Zt,
|
|
1991
2005
|
tooltip: "slide.shape.insert.title",
|
|
1992
|
-
hidden$:
|
|
2006
|
+
hidden$: ge(n, E.UNIVER_SLIDE)
|
|
1993
2007
|
// disabled$: getCurrentRangeDisable$(accessor, { workbookTypes: [WorkbookEditablePermission], worksheetTypes: [WorksheetEditPermission], rangeTypes: [RangeProtectionPermissionEditPoint] }),
|
|
1994
2008
|
};
|
|
1995
2009
|
}
|
|
1996
|
-
function
|
|
2010
|
+
function Wn(n) {
|
|
1997
2011
|
return {
|
|
1998
|
-
id:
|
|
2012
|
+
id: Ge.id,
|
|
1999
2013
|
title: "slide.shape.insert.rectangle",
|
|
2000
|
-
type:
|
|
2001
|
-
hidden$:
|
|
2014
|
+
type: fe.BUTTON,
|
|
2015
|
+
hidden$: ge(n, E.UNIVER_SLIDE)
|
|
2002
2016
|
};
|
|
2003
2017
|
}
|
|
2004
|
-
const
|
|
2005
|
-
function
|
|
2018
|
+
const Jt = "text-single";
|
|
2019
|
+
function zn(n) {
|
|
2006
2020
|
return {
|
|
2007
|
-
id:
|
|
2008
|
-
type:
|
|
2009
|
-
icon:
|
|
2021
|
+
id: Je.id,
|
|
2022
|
+
type: fe.BUTTON,
|
|
2023
|
+
icon: Jt,
|
|
2010
2024
|
tooltip: "slide.text.insert.title",
|
|
2011
|
-
hidden$:
|
|
2025
|
+
hidden$: ge(n, E.UNIVER_SLIDE)
|
|
2012
2026
|
};
|
|
2013
2027
|
}
|
|
2014
|
-
const
|
|
2015
|
-
[
|
|
2016
|
-
[
|
|
2028
|
+
const kn = {
|
|
2029
|
+
[Ti.FORMAT]: {
|
|
2030
|
+
[Je.id]: {
|
|
2017
2031
|
order: 0,
|
|
2018
|
-
menuItemFactory:
|
|
2032
|
+
menuItemFactory: zn
|
|
2019
2033
|
},
|
|
2020
|
-
[
|
|
2034
|
+
[Yt]: {
|
|
2021
2035
|
order: 0,
|
|
2022
|
-
menuItemFactory:
|
|
2023
|
-
[
|
|
2036
|
+
menuItemFactory: $n,
|
|
2037
|
+
[qe.id]: {
|
|
2024
2038
|
order: 0,
|
|
2025
|
-
menuItemFactory:
|
|
2039
|
+
menuItemFactory: Hn
|
|
2026
2040
|
}
|
|
2027
2041
|
},
|
|
2028
|
-
[
|
|
2042
|
+
[qt]: {
|
|
2029
2043
|
order: 0,
|
|
2030
|
-
menuItemFactory:
|
|
2031
|
-
[
|
|
2044
|
+
menuItemFactory: Fn,
|
|
2045
|
+
[Ge.id]: {
|
|
2032
2046
|
order: 0,
|
|
2033
|
-
menuItemFactory:
|
|
2047
|
+
menuItemFactory: Wn
|
|
2034
2048
|
}
|
|
2035
2049
|
}
|
|
2036
2050
|
}
|
|
2037
2051
|
};
|
|
2038
|
-
function
|
|
2039
|
-
return
|
|
2052
|
+
function Fe(n) {
|
|
2053
|
+
return n.getContextValue(Ot) && n.getContextValue(Ee);
|
|
2040
2054
|
}
|
|
2041
|
-
function
|
|
2042
|
-
return
|
|
2055
|
+
function Kn(n) {
|
|
2056
|
+
return n.getContextValue(_i) && n.getContextValue(Ot);
|
|
2043
2057
|
}
|
|
2044
|
-
const
|
|
2045
|
-
|
|
2046
|
-
|
|
2047
|
-
|
|
2048
|
-
|
|
2058
|
+
const Qt = [
|
|
2059
|
+
P.ARROW_DOWN,
|
|
2060
|
+
P.ARROW_UP,
|
|
2061
|
+
P.ARROW_LEFT,
|
|
2062
|
+
P.ARROW_RIGHT
|
|
2049
2063
|
];
|
|
2050
|
-
[
|
|
2051
|
-
function
|
|
2052
|
-
const
|
|
2053
|
-
for (const e of
|
|
2054
|
-
|
|
2055
|
-
id:
|
|
2064
|
+
[P.ENTER, P.TAB, ...Qt];
|
|
2065
|
+
function Xn() {
|
|
2066
|
+
const n = [];
|
|
2067
|
+
for (const e of Qt)
|
|
2068
|
+
n.push({
|
|
2069
|
+
id: ye.id,
|
|
2056
2070
|
binding: e,
|
|
2057
|
-
preconditions: (t) =>
|
|
2071
|
+
preconditions: (t) => Fe(t),
|
|
2058
2072
|
staticParameters: {
|
|
2059
2073
|
visible: !1,
|
|
2060
|
-
eventType:
|
|
2074
|
+
eventType: Z.Keyboard,
|
|
2061
2075
|
keycode: e,
|
|
2062
2076
|
isShift: !1
|
|
2063
2077
|
}
|
|
2064
|
-
}),
|
|
2065
|
-
id:
|
|
2066
|
-
binding: e |
|
|
2067
|
-
preconditions: (t) =>
|
|
2078
|
+
}), n.push({
|
|
2079
|
+
id: ye.id,
|
|
2080
|
+
binding: e | Mi.SHIFT,
|
|
2081
|
+
preconditions: (t) => Fe(t),
|
|
2068
2082
|
staticParameters: {
|
|
2069
2083
|
visible: !1,
|
|
2070
|
-
eventType:
|
|
2084
|
+
eventType: Z.Keyboard,
|
|
2071
2085
|
keycode: e,
|
|
2072
2086
|
isShift: !0
|
|
2073
2087
|
}
|
|
2074
2088
|
});
|
|
2075
|
-
return
|
|
2089
|
+
return n;
|
|
2076
2090
|
}
|
|
2077
|
-
const
|
|
2078
|
-
id:
|
|
2079
|
-
preconditions: (
|
|
2080
|
-
binding:
|
|
2091
|
+
const Gn = {
|
|
2092
|
+
id: Gi.id,
|
|
2093
|
+
preconditions: (n) => Fe(n) || Kn(n),
|
|
2094
|
+
binding: P.BACKSPACE
|
|
2081
2095
|
};
|
|
2082
|
-
var
|
|
2083
|
-
for (var r =
|
|
2084
|
-
(o =
|
|
2096
|
+
var Yn = Object.getOwnPropertyDescriptor, Zn = (n, e, t, i) => {
|
|
2097
|
+
for (var r = i > 1 ? void 0 : i ? Yn(e, t) : e, s = n.length - 1, o; s >= 0; s--)
|
|
2098
|
+
(o = n[s]) && (r = o(r) || r);
|
|
2085
2099
|
return r;
|
|
2086
|
-
},
|
|
2087
|
-
let
|
|
2088
|
-
constructor(
|
|
2089
|
-
super(), this._injector =
|
|
2100
|
+
}, te = (n, e) => (t, i) => e(t, i, n);
|
|
2101
|
+
let we = class extends Me {
|
|
2102
|
+
constructor(n, e, t, i, r, s) {
|
|
2103
|
+
super(), this._injector = n, this._menuManagerService = e, this._componentManager = t, this._uiPartsService = i, this._commandService = r, this._shortcutService = s, this._initCommands(), this._initCustomComponents(), this._initUIComponents(), this._initMenus(), this._initShortcuts();
|
|
2090
2104
|
}
|
|
2091
2105
|
_initMenus() {
|
|
2092
|
-
this._menuManagerService.mergeMenu(
|
|
2106
|
+
this._menuManagerService.mergeMenu(kn);
|
|
2093
2107
|
}
|
|
2094
2108
|
_initCustomComponents() {
|
|
2095
|
-
const
|
|
2096
|
-
this.disposeWithMe(
|
|
2109
|
+
const n = this._componentManager;
|
|
2110
|
+
this.disposeWithMe(n.register(Gt, Dt)), this.disposeWithMe(n.register(Jt, $t)), this.disposeWithMe(n.register(Zt, jt)), this.disposeWithMe(n.register(Wt, Ln)), this.disposeWithMe(n.register(be, bn));
|
|
2097
2111
|
}
|
|
2098
2112
|
_initCommands() {
|
|
2099
2113
|
[
|
|
2100
|
-
|
|
2114
|
+
kt,
|
|
2115
|
+
zt,
|
|
2101
2116
|
Xt,
|
|
2102
|
-
qt,
|
|
2103
|
-
et,
|
|
2104
|
-
Zt,
|
|
2105
|
-
tt,
|
|
2106
|
-
Kt,
|
|
2107
2117
|
qe,
|
|
2108
|
-
|
|
2109
|
-
|
|
2110
|
-
|
|
2118
|
+
Kt,
|
|
2119
|
+
Je,
|
|
2120
|
+
Ft,
|
|
2121
|
+
Ge,
|
|
2122
|
+
Ae,
|
|
2123
|
+
Mt,
|
|
2124
|
+
W,
|
|
2111
2125
|
// commands for editor
|
|
2112
|
-
|
|
2113
|
-
].forEach((
|
|
2126
|
+
ye
|
|
2127
|
+
].forEach((n) => this.disposeWithMe(this._commandService.registerCommand(n)));
|
|
2114
2128
|
}
|
|
2115
2129
|
_initUIComponents() {
|
|
2116
2130
|
this.disposeWithMe(
|
|
2117
|
-
this._uiPartsService.registerComponent(
|
|
2131
|
+
this._uiPartsService.registerComponent(st.LEFT_SIDEBAR, () => ot(An, this._injector))
|
|
2118
2132
|
), this.disposeWithMe(
|
|
2119
|
-
this._uiPartsService.registerComponent(
|
|
2133
|
+
this._uiPartsService.registerComponent(st.CONTENT, () => ot(Bn, this._injector))
|
|
2120
2134
|
);
|
|
2121
2135
|
}
|
|
2122
2136
|
_initShortcuts() {
|
|
2123
2137
|
[
|
|
2124
|
-
|
|
2125
|
-
...
|
|
2126
|
-
].forEach((
|
|
2127
|
-
this.disposeWithMe(this._shortcutService.registerShortcut(
|
|
2138
|
+
Gn,
|
|
2139
|
+
...Xn()
|
|
2140
|
+
].forEach((n) => {
|
|
2141
|
+
this.disposeWithMe(this._shortcutService.registerShortcut(n));
|
|
2128
2142
|
});
|
|
2129
2143
|
}
|
|
2130
2144
|
};
|
|
2131
|
-
|
|
2132
|
-
|
|
2133
|
-
|
|
2134
|
-
|
|
2135
|
-
|
|
2136
|
-
|
|
2137
|
-
|
|
2138
|
-
],
|
|
2139
|
-
var
|
|
2140
|
-
for (var r =
|
|
2141
|
-
(o =
|
|
2145
|
+
we = Zn([
|
|
2146
|
+
te(0, K(We)),
|
|
2147
|
+
te(1, Ni),
|
|
2148
|
+
te(2, K(Di)),
|
|
2149
|
+
te(3, Ui),
|
|
2150
|
+
te(4, U),
|
|
2151
|
+
te(5, Vi)
|
|
2152
|
+
], we);
|
|
2153
|
+
var qn = Object.getOwnPropertyDescriptor, Jn = (n, e, t, i) => {
|
|
2154
|
+
for (var r = i > 1 ? void 0 : i ? qn(e, t) : e, s = n.length - 1, o; s >= 0; s--)
|
|
2155
|
+
(o = n[s]) && (r = o(r) || r);
|
|
2142
2156
|
return r;
|
|
2143
|
-
},
|
|
2144
|
-
let
|
|
2157
|
+
}, Ve = (n, e) => (t, i) => e(t, i, n);
|
|
2158
|
+
let Te = class extends he {
|
|
2145
2159
|
// private _skeletonChangeMutations = new Set<string>();
|
|
2146
|
-
constructor(
|
|
2147
|
-
super(), this._contextService =
|
|
2160
|
+
constructor(n, e, t) {
|
|
2161
|
+
super(), this._contextService = n, this._instanceSrv = e, this._renderManagerService = t, Promise.resolve().then(() => this._init());
|
|
2148
2162
|
}
|
|
2149
2163
|
_init() {
|
|
2150
2164
|
this._initSlideDataListener(), this._initContextListener();
|
|
2151
2165
|
}
|
|
2152
2166
|
_initSlideDataListener() {
|
|
2153
|
-
this._instanceSrv.getTypeOfUnitAdded$(E.UNIVER_SLIDE).pipe(
|
|
2154
|
-
this._createRenderer(
|
|
2155
|
-
}), this._instanceSrv.getAllUnitsForType(E.UNIVER_SLIDE).forEach((
|
|
2156
|
-
this._createRenderer(
|
|
2157
|
-
}), this._instanceSrv.getTypeOfUnitDisposed$(E.UNIVER_SLIDE).pipe(
|
|
2167
|
+
this._instanceSrv.getTypeOfUnitAdded$(E.UNIVER_SLIDE).pipe(ct(this.dispose$)).subscribe((n) => {
|
|
2168
|
+
this._createRenderer(n == null ? void 0 : n.getUnitId());
|
|
2169
|
+
}), this._instanceSrv.getAllUnitsForType(E.UNIVER_SLIDE).forEach((n) => {
|
|
2170
|
+
this._createRenderer(n.getUnitId());
|
|
2171
|
+
}), this._instanceSrv.getTypeOfUnitDisposed$(E.UNIVER_SLIDE).pipe(ct(this.dispose$)).subscribe((n) => this._disposeRenderer(n));
|
|
2158
2172
|
}
|
|
2159
|
-
_createRenderer(
|
|
2160
|
-
|
|
2173
|
+
_createRenderer(n) {
|
|
2174
|
+
n == null || this._instanceSrv.getUnit(n, E.UNIVER_SLIDE) == null || this._renderManagerService.createRender(n);
|
|
2161
2175
|
}
|
|
2162
|
-
_disposeRenderer(
|
|
2163
|
-
const e =
|
|
2176
|
+
_disposeRenderer(n) {
|
|
2177
|
+
const e = n.getUnitId();
|
|
2164
2178
|
this._renderManagerService.removeRender(e);
|
|
2165
2179
|
}
|
|
2166
2180
|
_initContextListener() {
|
|
2167
2181
|
}
|
|
2168
2182
|
};
|
|
2169
|
-
|
|
2170
|
-
|
|
2171
|
-
|
|
2172
|
-
|
|
2173
|
-
],
|
|
2174
|
-
var
|
|
2175
|
-
for (var r =
|
|
2176
|
-
(o =
|
|
2183
|
+
Te = Jn([
|
|
2184
|
+
Ve(0, ve),
|
|
2185
|
+
Ve(1, y),
|
|
2186
|
+
Ve(2, X)
|
|
2187
|
+
], Te);
|
|
2188
|
+
var Qn = Object.getOwnPropertyDescriptor, er = (n, e, t, i) => {
|
|
2189
|
+
for (var r = i > 1 ? void 0 : i ? Qn(e, t) : e, s = n.length - 1, o; s >= 0; s--)
|
|
2190
|
+
(o = n[s]) && (r = o(r) || r);
|
|
2177
2191
|
return r;
|
|
2178
|
-
},
|
|
2179
|
-
const
|
|
2180
|
-
var
|
|
2181
|
-
let
|
|
2182
|
-
constructor(
|
|
2183
|
-
super(), this._config =
|
|
2184
|
-
const { menu: s, ...o } =
|
|
2192
|
+
}, Se = (n, e) => (t, i) => e(t, i, n);
|
|
2193
|
+
const tr = "SLIDE_UI";
|
|
2194
|
+
var Ie;
|
|
2195
|
+
let pt = (Ie = class extends Ci {
|
|
2196
|
+
constructor(n = ht, e, t, i, r) {
|
|
2197
|
+
super(), this._config = n, this._injector = e, this._renderManagerService = t, this._univerInstanceService = i, this._configService = r;
|
|
2198
|
+
const { menu: s, ...o } = Si(
|
|
2185
2199
|
{},
|
|
2186
|
-
|
|
2200
|
+
ht,
|
|
2187
2201
|
this._config
|
|
2188
2202
|
);
|
|
2189
|
-
s && this._configService.setConfig("menu", s, { merge: !0 }), this._configService.setConfig(
|
|
2203
|
+
s && this._configService.setConfig("menu", s, { merge: !0 }), this._configService.setConfig(rn, o);
|
|
2190
2204
|
}
|
|
2191
2205
|
onStarting() {
|
|
2192
|
-
|
|
2193
|
-
[
|
|
2194
|
-
[
|
|
2206
|
+
et([
|
|
2207
|
+
[Te],
|
|
2208
|
+
[Ye, { useClass: Be }],
|
|
2195
2209
|
// used by SlideUIController --> EditorContainer
|
|
2196
|
-
[
|
|
2197
|
-
[
|
|
2198
|
-
], this._config.override).forEach((
|
|
2210
|
+
[Ze, { useClass: Tn }],
|
|
2211
|
+
[xe]
|
|
2212
|
+
], this._config.override).forEach((n) => this._injector.add(n));
|
|
2199
2213
|
}
|
|
2200
2214
|
onReady() {
|
|
2201
2215
|
[
|
|
2202
2216
|
// SlideRenderService will be init in ready stage, and then calling RenderManagerService@createRender --> init all deps in this rendering register block.
|
|
2203
|
-
[
|
|
2204
|
-
].forEach((
|
|
2205
|
-
this.disposeWithMe(this._renderManagerService.registerRenderModule(E.UNIVER_SLIDE,
|
|
2206
|
-
}),
|
|
2207
|
-
[
|
|
2217
|
+
[ue]
|
|
2218
|
+
].forEach((n) => {
|
|
2219
|
+
this.disposeWithMe(this._renderManagerService.registerRenderModule(E.UNIVER_SLIDE, n));
|
|
2220
|
+
}), et([
|
|
2221
|
+
[T],
|
|
2208
2222
|
// cannot register in _renderManagerService now.
|
|
2209
2223
|
// [ISlideEditorBridgeService, { useClass: SlideEditorBridgeService }],
|
|
2210
2224
|
// // used by SlideUIController --> EditorContainer
|
|
2211
2225
|
// [ISlideEditorManagerService, { useClass: SlideEditorManagerService }],
|
|
2212
2226
|
// SlidesUIController controller should be registered in Ready stage.
|
|
2213
2227
|
// SlidesUIController controller would add a new RenderUnit (__INTERNAL_EDITOR__DOCS_NORMAL)
|
|
2214
|
-
[
|
|
2228
|
+
[we],
|
|
2215
2229
|
// editor service was create in renderManagerService
|
|
2216
|
-
[
|
|
2217
|
-
[
|
|
2218
|
-
], this._config.override).forEach((
|
|
2219
|
-
this._injector.add(
|
|
2220
|
-
}), this._injector.get(
|
|
2230
|
+
[ue],
|
|
2231
|
+
[Re]
|
|
2232
|
+
], this._config.override).forEach((n) => {
|
|
2233
|
+
this._injector.add(n);
|
|
2234
|
+
}), this._injector.get(T), this._injector.get(Te);
|
|
2221
2235
|
}
|
|
2222
2236
|
onRendered() {
|
|
2223
2237
|
[
|
|
2224
2238
|
// need slideEditorBridgeService
|
|
2225
2239
|
// need TextSelectionRenderService which init by EditorContainer
|
|
2226
|
-
[
|
|
2227
|
-
[
|
|
2228
|
-
].forEach((
|
|
2229
|
-
this.disposeWithMe(this._renderManagerService.registerRenderModule(E.UNIVER_SLIDE,
|
|
2230
|
-
}), this._markSlideAsFocused(), this._injector.get(
|
|
2240
|
+
[He],
|
|
2241
|
+
[$e]
|
|
2242
|
+
].forEach((n) => {
|
|
2243
|
+
this.disposeWithMe(this._renderManagerService.registerRenderModule(E.UNIVER_SLIDE, n));
|
|
2244
|
+
}), this._markSlideAsFocused(), this._injector.get(we);
|
|
2231
2245
|
}
|
|
2232
2246
|
onSteady() {
|
|
2233
|
-
this._injector.get(
|
|
2247
|
+
this._injector.get(Re);
|
|
2234
2248
|
}
|
|
2235
2249
|
_markSlideAsFocused() {
|
|
2236
|
-
const
|
|
2250
|
+
const n = this._univerInstanceService;
|
|
2237
2251
|
try {
|
|
2238
|
-
const e =
|
|
2239
|
-
|
|
2252
|
+
const e = n.getCurrentUnitForType(E.UNIVER_SLIDE);
|
|
2253
|
+
n.focusUnit(e.getUnitId());
|
|
2240
2254
|
} catch {
|
|
2241
2255
|
}
|
|
2242
2256
|
}
|
|
2243
|
-
},
|
|
2244
|
-
|
|
2245
|
-
|
|
2246
|
-
|
|
2247
|
-
|
|
2248
|
-
|
|
2249
|
-
],
|
|
2257
|
+
}, S(Ie, "pluginName", tr), S(Ie, "type", E.UNIVER_SLIDE), Ie);
|
|
2258
|
+
pt = er([
|
|
2259
|
+
Se(1, K(We)),
|
|
2260
|
+
Se(2, X),
|
|
2261
|
+
Se(3, y),
|
|
2262
|
+
Se(4, Ii)
|
|
2263
|
+
], pt);
|
|
2250
2264
|
export {
|
|
2251
|
-
|
|
2252
|
-
|
|
2253
|
-
|
|
2254
|
-
|
|
2255
|
-
|
|
2256
|
-
|
|
2257
|
-
|
|
2258
|
-
|
|
2259
|
-
|
|
2260
|
-
|
|
2261
|
-
|
|
2262
|
-
|
|
2263
|
-
|
|
2264
|
-
|
|
2265
|
-
|
|
2266
|
-
|
|
2267
|
-
|
|
2268
|
-
|
|
2269
|
-
|
|
2270
|
-
|
|
2271
|
-
|
|
2265
|
+
zt as ActivateSlidePageOperation,
|
|
2266
|
+
kt as AppendSlideOperation,
|
|
2267
|
+
T as CanvasView,
|
|
2268
|
+
Mt as DeleteSlideElementOperation,
|
|
2269
|
+
Ye as ISlideEditorBridgeService,
|
|
2270
|
+
qe as InsertSlideFloatImageCommand,
|
|
2271
|
+
Ge as InsertSlideShapeRectangleCommand,
|
|
2272
|
+
Ft as InsertSlideShapeRectangleOperation,
|
|
2273
|
+
qt as SHAPE_MENU_ID,
|
|
2274
|
+
Yt as SLIDES_IMAGE_MENU_ID,
|
|
2275
|
+
le as SLIDE_EDITOR_ID,
|
|
2276
|
+
Xt as SetSlidePageThumbOperation,
|
|
2277
|
+
Je as SlideAddTextCommand,
|
|
2278
|
+
Kt as SlideAddTextOperation,
|
|
2279
|
+
xe as SlideCanvasPopMangerService,
|
|
2280
|
+
Bn as SlideEditorContainer,
|
|
2281
|
+
An as SlideSideBar,
|
|
2282
|
+
we as SlidesUIController,
|
|
2283
|
+
kn as SlidesUIMenuSchema,
|
|
2284
|
+
pt as UniverSlidesUIPlugin,
|
|
2285
|
+
W as UpdateSlideElementOperation
|
|
2272
2286
|
};
|